(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4051,9364,1716,3272,877],{99784:function(e,t,l){"use strict";var s=l(67294),d=l(36834),__rest=function(e,t){var l={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(l[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,s=Object.getOwnPropertySymbols(e);dt.indexOf(s[d])&&Object.prototype.propertyIsEnumerable.call(e,s[d])&&(l[s[d]]=e[s[d]]);return l};t.Z=e=>{var{size:t,color:l=d.SQ,hasNoti:p,notiColor:m="#F44D2C"}=e,v=__rest(e,["size","color","hasNoti","notiColor"]);let h=(0,d.jd)(t);return s.createElement("svg",Object.assign({width:h,height:h,viewBox:"0 0 24 24",fill:"none"},v),s.createElement("path",{fill:l,"fill-rule":"evenodd",d:"M2 11c0-4.962 4.486-9 10-9s10 4.038 10 9q0 .483-.057.955c-.596 5.522-6.271 9.424-7.403 10.15l-.54.346c-.877.482-.97-.235-.992-.413Q13.003 22 13 22v-2.047C7.04 20.508 2 16.259 2 11m6 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2m5-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2","clip-rule":"evenodd"}),p&&s.createElement("circle",{cx:"19",cy:"5",r:"4",fill:m||"#F44D2C"}))}},40053:function(e,t,l){"use strict";var s=l(67294),d=l(36834),__rest=function(e,t){var l={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(l[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,s=Object.getOwnPropertySymbols(e);dt.indexOf(s[d])&&Object.prototype.propertyIsEnumerable.call(e,s[d])&&(l[s[d]]=e[s[d]]);return l};t.Z=e=>{var{size:t=24,color:l=d.SQ,useCurrentColor:p,isActive:m,activeColor:v=d.SK}=e,h=__rest(e,["size","color","useCurrentColor","isActive","activeColor"]);let f=Object.assign({width:t,height:t},h);return s.createElement("svg",Object.assign({viewBox:"0 0 20 20",fill:"none"},f),s.createElement("path",{d:"M9 12V13C9 13.2778 9.09722 13.5139 9.29167 13.7083C9.48611 13.9028 9.72222 14 10 14C10.2778 14 10.5139 13.9028 10.7083 13.7083C10.9028 13.5139 11 13.2778 11 13V12H12C12.2778 12 12.5139 11.9028 12.7083 11.7083C12.9028 11.5139 13 11.2778 13 11C13 10.7222 12.9028 10.4861 12.7083 10.2917C12.5139 10.0972 12.2778 10 12 10H11V9C11 8.72222 10.9028 8.48611 10.7083 8.29167C10.5139 8.09722 10.2778 8 10 8C9.72222 8 9.48611 8.09722 9.29167 8.29167C9.09722 8.48611 9 8.72222 9 9V10H8C7.72222 10 7.48611 10.0972 7.29167 10.2917C7.09722 10.4861 7 10.7222 7 11C7 11.2778 7.09722 11.5139 7.29167 11.7083C7.48611 11.9028 7.72222 12 8 12H9ZM5.4941 17C5.08137 17 4.72917 16.8531 4.4375 16.5594C4.14583 16.2656 4 15.9125 4 15.5V8.25C4 8.01599 4.05208 7.79429 4.15625 7.5849C4.26042 7.37552 4.40972 7.19444 4.60417 7.04167L9.10417 3.66667C9.38194 3.47222 9.68056 3.375 10 3.375C10.3194 3.375 10.6181 3.47222 10.8958 3.66667L15.3958 7.04167C15.5903 7.19444 15.7396 7.37552 15.8438 7.5849C15.9479 7.79429 16 8.01599 16 8.25V15.5C16 15.9125 15.853 16.2656 15.5591 16.5594C15.2652 16.8531 14.9119 17 14.4992 17H5.4941ZM5.5 15.5H14.5V8.25L10 4.875L5.5 8.25V15.5Z",fill:p?"currentColor":m?v:l}))}},89130:function(e,t,l){"use strict";var s=l(67294),d=l(36834),__rest=function(e,t){var l={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(l[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,s=Object.getOwnPropertySymbols(e);dt.indexOf(s[d])&&Object.prototype.propertyIsEnumerable.call(e,s[d])&&(l[s[d]]=e[s[d]]);return l};t.Z=e=>{var{size:t=24,color:l=d.SQ,useCurrentColor:p,isActive:m,activeColor:v=d.SK}=e,h=__rest(e,["size","color","useCurrentColor","isActive","activeColor"]);let f=Object.assign({width:t,height:t},h);return s.createElement("svg",Object.assign({viewBox:"0 0 16 16",fill:"none"},f),s.createElement("path",{d:"M8.88294 14.4C7.79405 14.4 6.86905 14.0168 6.10794 13.2503C5.34683 12.4838 4.96628 11.5559 4.96628 10.4667V9.96667C4.02183 9.84445 3.22461 9.43056 2.57461 8.72501C1.92461 8.01945 1.59961 7.17778 1.59961 6.20001V3.00001C1.59961 2.83001 1.65711 2.68751 1.77211 2.57251C1.88711 2.45751 2.02961 2.40001 2.19961 2.40001H3.59961V2.20001C3.59961 2.03001 3.65677 1.88751 3.77109 1.77251C3.88543 1.65751 4.02709 1.60001 4.19609 1.60001C4.3651 1.60001 4.50794 1.65751 4.62461 1.77251C4.74128 1.88751 4.79961 2.03001 4.79961 2.20001V3.80001C4.79961 3.97001 4.74245 4.11251 4.62813 4.22751C4.51379 4.34251 4.37213 4.40001 4.20313 4.40001C4.03412 4.40001 3.89128 4.34251 3.77461 4.22751C3.65794 4.11251 3.59961 3.97001 3.59961 3.80001V3.60001H2.79961V6.20767C2.79961 6.92478 3.05239 7.53612 3.55794 8.04167C4.0635 8.54723 4.67739 8.80001 5.39961 8.80001C6.12183 8.80001 6.73572 8.54723 7.24128 8.04167C7.74683 7.53612 7.99961 6.92478 7.99961 6.20767V3.60001H7.19961V3.80001C7.19961 3.97001 7.14245 4.11251 7.02813 4.22751C6.91379 4.34251 6.77213 4.40001 6.60313 4.40001C6.43411 4.40001 6.29128 4.34251 6.17461 4.22751C6.05794 4.11251 5.99961 3.97001 5.99961 3.80001V2.20001C5.99961 2.03001 6.05677 1.88751 6.17109 1.77251C6.28543 1.65751 6.42709 1.60001 6.59609 1.60001C6.7651 1.60001 6.90794 1.65751 7.02461 1.77251C7.14128 1.88751 7.19961 2.03001 7.19961 2.20001V2.40001H8.59961C8.76961 2.40001 8.91211 2.45751 9.02711 2.57251C9.14211 2.68751 9.19961 2.83001 9.19961 3.00001V6.20001C9.19961 7.13723 8.9135 7.95209 8.34128 8.64459C7.76905 9.33709 7.04405 9.76667 6.16628 9.93334V10.4833C6.16628 11.2426 6.4304 11.888 6.95864 12.4195C7.48688 12.9509 8.12831 13.2167 8.88294 13.2167V14.4ZM11.4163 11.9L13.5359 9.77922C13.6561 9.65975 13.7978 9.60001 13.9607 9.60001C14.1237 9.60001 14.2644 9.66112 14.3829 9.78334C14.5052 9.90186 14.5663 10.0426 14.5663 10.2056C14.5663 10.3685 14.5061 10.5101 14.3859 10.6304L11.83 13.1863C11.7097 13.3065 11.5681 13.3667 11.4052 13.3667C11.2422 13.3667 11.1015 13.3056 10.9829 13.1833L9.84961 12.05C9.72739 11.9307 9.66628 11.789 9.66628 11.625C9.66628 11.461 9.72739 11.3193 9.84961 11.2C9.97082 11.0778 10.1122 11.0167 10.2739 11.0167C10.4355 11.0167 10.5774 11.0778 10.6996 11.2L11.4163 11.9Z",fill:p?"currentColor":m?v:l}))}},6655:function(e,t,l){"use strict";var s=l(67294),d=l(36834),__rest=function(e,t){var l={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(l[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,s=Object.getOwnPropertySymbols(e);dt.indexOf(s[d])&&Object.prototype.propertyIsEnumerable.call(e,s[d])&&(l[s[d]]=e[s[d]]);return l};t.Z=e=>{var{size:t=24,color:l=d.SQ,useCurrentColor:p,isActive:m,activeColor:v=d.SK,isSolid:h}=e,f=__rest(e,["size","color","useCurrentColor","isActive","activeColor","isSolid"]);let g=p?"currentColor":m?v:l,y=Object.assign({width:t,height:t},f);return h?s.createElement("svg",Object.assign({viewBox:"0 0 32 32",fill:"none"},y),s.createElement("path",{d:"M3.9987 6.66675C2.52803 6.66675 1.33203 7.86275 1.33203 9.33341V22.6667C1.33203 24.1374 2.52803 25.3334 3.9987 25.3334H21.332C22.8027 25.3334 23.9987 24.1374 23.9987 22.6667V18.7761L28.4987 22.3751C28.74 22.5671 29.0347 22.6667 29.332 22.6667C29.528 22.6667 29.7262 22.6219 29.9102 22.5339C30.3728 22.3126 30.6654 21.8454 30.6654 21.3334V10.6667C30.6654 10.1547 30.3728 9.68629 29.9102 9.46362C29.4488 9.24362 28.8987 9.30508 28.4987 9.62508L23.9987 13.224V9.33341C23.9987 7.86275 22.8027 6.66675 21.332 6.66675H3.9987Z",fill:g})):s.createElement("svg",Object.assign({viewBox:"0 0 32 32",fill:"none"},y),s.createElement("path",{d:"M4.00065 6.66663C2.54323 6.66663 1.33398 7.87588 1.33398 9.33329V22.6666C1.33398 24.124 2.54323 25.3333 4.00065 25.3333H21.334C22.7914 25.3333 24.0007 24.124 24.0007 22.6666V18.7734L30.6673 24.1067V7.89319L24.0007 13.2265V9.33329C24.0007 7.87588 22.7914 6.66663 21.334 6.66663H4.00065ZM4.00065 9.33329H21.334V22.6666H4.00065V9.33329ZM28.0007 13.4427V18.5573L24.8027 16L28.0007 13.4427Z",fill:g}))}},59018:function(e){var t,l;e.exports=(t={8027:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_DOMAIN=t.POPUP_SIZE=t.SLIDER_WIDTH=t.SLIDER_POSITION=t.LIVE_EMBED_ATTRIBUTE=t.SIDETAB_ATTRIBUTE=t.WIDGET_ATTRIBUTE=t.SLIDER_ATTRIBUTE=t.POPUP_ATTRIBUTE=t.POPOVER_ATTRIBUTE=void 0,t.POPOVER_ATTRIBUTE="data-tf-popover",t.POPUP_ATTRIBUTE="data-tf-popup",t.SLIDER_ATTRIBUTE="data-tf-slider",t.WIDGET_ATTRIBUTE="data-tf-widget",t.SIDETAB_ATTRIBUTE="data-tf-sidetab",t.LIVE_EMBED_ATTRIBUTE="data-tf-live",t.SLIDER_POSITION="right",t.SLIDER_WIDTH=800,t.POPUP_SIZE=100,t.DEFAULT_DOMAIN="form.typeform.com"},7528:function(e,t,l){var s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,l=1,s=arguments.length;lt.indexOf(s)&&(l[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var d=0;for(s=Object.getOwnPropertySymbols(e);dt.indexOf(s[d])&&Object.prototype.propertyIsEnumerable.call(e,s[d])&&(l[s[d]]=e[s[d]])}return l};Object.defineProperty(t,"__esModule",{value:!0}),t.createPopover=void 0;var p=l(6797),m=l(1320),c=function(e,t){var l=e.parentNode;l&&(l.removeChild(e),l.appendChild(t))},u=function(e,t){void 0===e&&(e="span"),void 0===t&&(t="tf-v1-popover-button-icon");var l=document.createElement(e);return l.className="".concat(t," tf-v1-close-icon"),l.innerHTML="×",l.dataset.testid=t,l},v={buttonColor:"#3a7685"};t.createPopover=function(e,t){void 0===t&&(t={});var l,h,f,g,y,b,_,w,E,k,A,x,Z,R,N,B,D,H,U,z,V,G,F=s(s({},v),t),W=F.domain,X=d(F,["domain"]),q=(0,p.createIframe)("popover",{formId:e,domain:W,options:X}),K=q.iframe,Y=q.embedId,$=q.refresh,Q=q.focus,J=(y=X.width,b=X.height,(_=document.createElement("div")).className="tf-v1-popover",_.dataset.testid="tf-v1-popover",(0,p.setElementSize)(_,{width:y,height:b})),ee=((w=document.createElement("div")).className="tf-v1-popover-wrapper",w.dataset.testid="tf-v1-popover-wrapper",w),et=(E=X.customIcon,k=X.buttonColor||v.buttonColor,A=(0,p.getTextColor)(k),(x=document.createElement("div")).className="tf-v1-popover-button-icon",Z=null==E?void 0:E.startsWith("http"),x.innerHTML=Z?"popover trigger icon button"):null!=E?E:'\n \n '),x.dataset.testid="default-icon",x),en=((R=document.createElement("div")).className="tf-v1-spinner",(N=document.createElement("div")).className="tf-v1-popover-button-icon",N.dataset.testid="spinner-icon",N.append(R),N),eo=u(),ei=u("button","tf-v1-popover-close"),er=(B=X.buttonColor||v.buttonColor,void 0===(D=X.buttonProps)&&(D={}),H=(0,p.getTextColor)(B),(U=document.createElement("button")).className="tf-v1-popover-button",U.dataset.testid="tf-v1-popover-button",U.style.backgroundColor=B,U.style.color=H,(0,p.addAttributesToElement)(U,D),U);(X.container||document.body).append(J),ee.append(K),J.append(er),J.append(ei),er.append(et);var I=function(){V&&V.parentNode&&(V.classList.add("closing"),setTimeout(function(){(0,p.unmountElement)(V)},250))};X.tooltip&&X.tooltip.length>0&&(l=X.tooltip,(h=document.createElement("span")).className="tf-v1-popover-tooltip-close",h.dataset.testid="tf-v1-popover-tooltip-close",h.innerHTML="×",h.onclick=I,(f=document.createElement("div")).className="tf-v1-popover-tooltip-text",f.innerHTML=l,(g=document.createElement("div")).className="tf-v1-popover-tooltip",g.dataset.testid="tf-v1-popover-tooltip",g.appendChild(f),g.appendChild(h),V=g,J.append(V)),X.notificationDays&&(X.enableSandbox||(0,m.canBuildNotificationDot)(e))&&(G=(0,m.buildNotificationDot)(),er.append(G)),K.onload=function(){J.classList.add("open"),ee.style.opacity="1",ei.style.opacity="1",c(en,eo),(0,p.addCustomKeyboardListener)(M)};var ea=(0,p.makeAutoResize)(J),S=function(){(0,p.isOpen)(ee)||(I(),G&&(G.classList.add("closing"),X.notificationDays&&!X.enableSandbox&&(0,m.saveNotificationDotHideUntilTime)(e,X.notificationDays),setTimeout(function(){(0,p.unmountElement)(G)},250)),ea(),window.addEventListener("resize",ea),setTimeout(function(){(0,p.isInPage)(ee)?(ee.style.opacity="0",ei.style.opacity="0",ee.style.display="flex",setTimeout(function(){J.classList.add("open"),ee.style.opacity="1",ei.style.opacity="1"}),c(et,eo)):(J.append(ee),c(et,en),ee.style.opacity="0",ei.style.opacity="0")}))},M=function(){var e;(0,p.isOpen)(J)&&(null===(e=t.onClose)||void 0===e||e.call(t),setTimeout(function(){X.keepSession?ee.style.display="none":(0,p.unmountElement)(ee),J.classList.remove("open"),c(eo,et)},250))};(0,p.setAutoClose)(Y,X.autoClose,M);var L=function(){(0,p.isOpen)(ee)?M():S()};return er.onclick=(0,p.invokeWithoutDefault)(L),ei.onclick=(0,p.invokeWithoutDefault)(M),X.open&&!(0,p.isOpen)(ee)&&(z=(0,p.handleCustomOpen)(S,X.open,X.openValue)),{open:S,close:M,toggle:L,refresh:$,focus:Q,unmount:function(){(0,p.unmountElement)(J),window.removeEventListener("resize",ea),X.open&&(null==z?void 0:z.remove)&&z.remove()}}}},1797:function(e,t,l){var s=this&&this.__createBinding||(Object.create?function(e,t,l,s){void 0===s&&(s=l);var d=Object.getOwnPropertyDescriptor(t,l);d&&!("get"in d?!t.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,s,d)}:function(e,t,l,s){void 0===s&&(s=l),e[s]=t[l]}),d=this&&this.__exportStar||function(e,t){for(var l in e)"default"===l||Object.prototype.hasOwnProperty.call(t,l)||s(t,e,l)};Object.defineProperty(t,"__esModule",{value:!0}),d(l(7528),t),d(l(6100),t)},1320:function(e,t){var l=this&&this.__assign||function(){return(l=Object.assign||function(e){for(var t,l=1,s=arguments.length;ls&&(s&&(l=r(),delete l[e],i(l)),!0)},t.buildNotificationDot=function(){var e=document.createElement("span");return e.className="tf-v1-popover-unread-dot",e.dataset.testid="tf-v1-popover-unread-dot",e}},6100:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},9630:function(e,t,l){var s=this&&this.__rest||function(e,t){var l={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(l[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var d=0;for(s=Object.getOwnPropertySymbols(e);dt.indexOf(s[d])&&Object.prototype.propertyIsEnumerable.call(e,s[d])&&(l[s[d]]=e[s[d]])}return l};Object.defineProperty(t,"__esModule",{value:!0}),t.createPopup=void 0;var d=l(6797),p=l(8027),m=l(6797);t.createPopup=function(e,t){if(void 0===t&&(t={}),!(0,d.hasDom)())return{open:function(){},close:function(){},toggle:function(){},refresh:function(){},focus:function(){},unmount:function(){}};var l,v,h,f,g,y=t.width,b=t.height,_=t.size,w=void 0===_?p.POPUP_SIZE:_,E=t.onClose,k=t.domain,A=s(t,["width","height","size","onClose","domain"]),x=(0,d.createIframe)("popup",{formId:e,domain:k,options:A}),Z=x.iframe,R=x.embedId,N=x.refresh,B=x.focus,D=document.body.style.overflow,H=((v=document.createElement("div")).className="tf-v1-popup",v.dataset.testid="tf-v1-popup",v.style.opacity="0",v),U=((h=document.createElement("div")).className="tf-v1-spinner",h),z=((f=document.createElement("div")).className="tf-v1-iframe-wrapper",f.style.opacity="0",(0,d.isDefined)(y)&&(0,d.isDefined)(b)?(0,d.setElementSize)(f,{width:y,height:b}):(f.style.width="calc(".concat(w,"% - 80px)"),f.style.height="calc(".concat(w,"% - 80px)"),f));z.append(Z),H.append(U),H.append(z);var V=A.container||document.body;Z.onload=function(){z.style.opacity="1",setTimeout(function(){U.style.display="none"},250),(0,d.addCustomKeyboardListener)(C)};var G=(0,m.makeAutoResize)(H),j=function(){(0,m.isOpen)(H)||((0,m.isInPage)(H)?H.style.display="flex":(U.style.display="block",V.append(H)),document.body.style.overflow="hidden",G(),window.addEventListener("resize",G),setTimeout(function(){H.style.opacity="1"}))},C=function(){(0,m.isOpen)(H)&&(null==E||E(),H.style.opacity="0",document.body.style.overflow=D,setTimeout(function(){A.keepSession?H.style.display="none":I()},250))};z.append(((l=document.createElement("button")).className="tf-v1-close tf-v1-close-icon",l.innerHTML="×",l.onclick=(0,d.invokeWithoutDefault)(C),l)),(0,d.setAutoClose)(R,A.autoClose,C),A.open&&!(0,m.isOpen)(H)&&(g=(0,d.handleCustomOpen)(j,A.open,A.openValue));var I=function(){(0,d.unmountElement)(H),window.removeEventListener("resize",G),A.open&&(null==g?void 0:g.remove)&&g.remove()};return{open:j,close:C,toggle:function(){(0,m.isOpen)(H)?C():j()},refresh:N,focus:B,unmount:I}}},5970:function(e,t,l){var s=this&&this.__createBinding||(Object.create?function(e,t,l,s){void 0===s&&(s=l);var d=Object.getOwnPropertyDescriptor(t,l);d&&!("get"in d?!t.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,s,d)}:function(e,t,l,s){void 0===s&&(s=l),e[s]=t[l]}),d=this&&this.__exportStar||function(e,t){for(var l in e)"default"===l||Object.prototype.hasOwnProperty.call(t,l)||s(t,e,l)};Object.defineProperty(t,"__esModule",{value:!0}),d(l(9630),t),d(l(7394),t)},7394:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},382:function(e,t,l){var s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,l=1,s=arguments.length;lt.indexOf(s)&&(l[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var d=0;for(s=Object.getOwnPropertySymbols(e);dt.indexOf(s[d])&&Object.prototype.propertyIsEnumerable.call(e,s[d])&&(l[s[d]]=e[s[d]])}return l};Object.defineProperty(t,"__esModule",{value:!0}),t.createSidetab=void 0;var p=l(6797),m={buttonColor:"#3a7685",buttonText:"Launch me"},c=function(e,t){void 0===e&&(e="div"),void 0===t&&(t="tf-v1-sidetab-button-icon");var l=document.createElement(e);return l.className="".concat(t," tf-v1-close-icon"),l.innerHTML="×",l.dataset.testid=t,l},u=function(e,t){var l=e.parentNode;l&&(l.removeChild(e),l.appendChild(t))};t.createSidetab=function(e,t){void 0===t&&(t={});var l,v,h,f,g,y,b,_,w,E,k,A,x,Z,R,N,B,D,H=s(s({},m),t),U=H.domain,z=d(H,["domain"]),V=(0,p.createIframe)("side-tab",{formId:e,domain:U,options:z}),G=V.iframe,F=V.embedId,W=V.refresh,X=V.focus,q=(l=z.width,v=z.height,(h=document.createElement("div")).className="tf-v1-sidetab",h.dataset.testid="tf-v1-sidetab",(0,p.setElementSize)(h,{width:l,height:v})),K=((f=document.createElement("div")).className="tf-v1-sidetab-wrapper",f.dataset.testid="tf-v1-sidetab-wrapper",f),Y=((g=document.createElement("div")).className="tf-v1-spinner",(y=document.createElement("div")).className="tf-v1-sidetab-button-icon",y.dataset.testid="spinner-icon",y.append(g),y),$=(b=z.buttonColor||m.buttonColor,void 0===(_=z.buttonProps)&&(_={}),w=(0,p.getTextColor)(b),(E=document.createElement("button")).className="tf-v1-sidetab-button",E.style.backgroundColor=b,E.style.color=w,(0,p.addAttributesToElement)(E,_),E),Q=(k=z.buttonText||m.buttonText,(A=document.createElement("span")).className="tf-v1-sidetab-button-text",A.innerHTML=k,A),J=(x=z.customIcon,Z=z.buttonColor||m.buttonColor,R=(0,p.getTextColor)(Z),(N=document.createElement("div")).className="tf-v1-sidetab-button-icon",B=null==x?void 0:x.startsWith("http"),N.innerHTML=B?"popover trigger icon button"):null!=x?x:'\n \n '),N.dataset.testid="default-icon",N),ee=c(),et=c("button","tf-v1-sidetab-close");(z.container||document.body).append(q),K.append(G),q.append($),q.append(et),$.append(J),$.append(Q),setTimeout(function(){q.classList.add("ready")},250),G.onload=function(){q.classList.add("open"),u(Y,ee),(0,p.addCustomKeyboardListener)(I)};var en=(0,p.makeAutoResize)(q),C=function(){(0,p.isOpen)(K)||(en(),window.addEventListener("resize",en),(0,p.isInPage)(K)?(K.style.display="flex",q.classList.add("open"),u(J,ee)):(q.append(K),u(J,Y)))},I=function(){var e;(0,p.isOpen)(K)&&(null===(e=z.onClose)||void 0===e||e.call(z),q.classList.remove("open"),setTimeout(function(){z.keepSession?K.style.display="none":(0,p.unmountElement)(K),u(ee,J)},250))};(0,p.setAutoClose)(F,z.autoClose,I);var T=function(){(0,p.isOpen)(K)?I():C()};return $.onclick=(0,p.invokeWithoutDefault)(T),et.onclick=(0,p.invokeWithoutDefault)(I),z.open&&!(0,p.isOpen)(K)&&(D=(0,p.handleCustomOpen)(C,z.open,z.openValue)),{open:C,close:I,toggle:T,refresh:W,focus:X,unmount:function(){(0,p.unmountElement)(q),window.removeEventListener("resize",en),z.open&&(null==D?void 0:D.remove)&&D.remove()}}}},1434:function(e,t,l){var s=this&&this.__createBinding||(Object.create?function(e,t,l,s){void 0===s&&(s=l);var d=Object.getOwnPropertyDescriptor(t,l);d&&!("get"in d?!t.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,s,d)}:function(e,t,l,s){void 0===s&&(s=l),e[s]=t[l]}),d=this&&this.__exportStar||function(e,t){for(var l in e)"default"===l||Object.prototype.hasOwnProperty.call(t,l)||s(t,e,l)};Object.defineProperty(t,"__esModule",{value:!0}),d(l(382),t),d(l(7668),t)},7668:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},2603:function(e,t,l){var s=this&&this.__rest||function(e,t){var l={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(l[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var d=0;for(s=Object.getOwnPropertySymbols(e);dt.indexOf(s[d])&&Object.prototype.propertyIsEnumerable.call(e,s[d])&&(l[s[d]]=e[s[d]])}return l};Object.defineProperty(t,"__esModule",{value:!0}),t.createSlider=void 0;var d=l(6797),p=l(8027);t.createSlider=function(e,t){if(void 0===t&&(t={}),!(0,d.hasDom)())return{open:function(){},close:function(){},toggle:function(){},refresh:function(){},focus:function(){},unmount:function(){}};var l,m,v,h,f,g=t.position,y=void 0===g?p.SLIDER_POSITION:g,b=t.width,_=void 0===b?p.SLIDER_WIDTH:b,w=t.onClose,E=t.domain,k=s(t,["position","width","onClose","domain"]),A=(0,d.createIframe)("slider",{formId:e,domain:E,options:k}),x=A.iframe,Z=A.embedId,R=A.refresh,N=A.focus,B=document.body.style.overflow,D=((m=document.createElement("div")).className="tf-v1-slider ".concat(y),m.dataset.testid="tf-v1-slider",m.style.opacity="0",m),H=((v=document.createElement("div")).className="tf-v1-spinner",v),U=((h=document.createElement("div")).className="tf-v1-iframe-wrapper",h.style[y]="-100%",(0,d.setElementSize)(h,{width:_}));U.append(x),D.append(H),D.append(U);var z=k.container||document.body;x.onload=function(){U.style[y]="0",setTimeout(function(){H.style.display="none"},500),(0,d.addCustomKeyboardListener)(j)};var V=(0,d.makeAutoResize)(D),P=function(){(0,d.isOpen)(D)||(V(),window.addEventListener("resize",V),(0,d.isInPage)(D)?(D.style.display="flex",setTimeout(function(){U.style[y]="0"})):(z.append(D),H.style.display="block"),document.body.style.overflow="hidden",setTimeout(function(){D.style.opacity="1"}))},j=function(){(0,d.isOpen)(D)&&(null==w||w(),D.style.opacity="0",U.style[y]="-100%",document.body.style.overflow=B,setTimeout(function(){k.keepSession?D.style.display="none":C()},500))};(0,d.setAutoClose)(Z,k.autoClose,j),U.append(((l=document.createElement("button")).className="tf-v1-close tf-v1-close-icon",l.innerHTML="×",l.onclick=(0,d.invokeWithoutDefault)(j),l)),k.open&&!(0,d.isOpen)(D)&&(f=(0,d.handleCustomOpen)(P,k.open,k.openValue));var C=function(){(0,d.unmountElement)(D),window.removeEventListener("resize",V),k.open&&(null==f?void 0:f.remove)&&f.remove()};return{open:P,close:j,toggle:function(){(0,d.isOpen)(D)?j():P()},refresh:R,focus:N,unmount:C}}},4071:function(e,t,l){var s=this&&this.__createBinding||(Object.create?function(e,t,l,s){void 0===s&&(s=l);var d=Object.getOwnPropertyDescriptor(t,l);d&&!("get"in d?!t.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,s,d)}:function(e,t,l,s){void 0===s&&(s=l),e[s]=t[l]}),d=this&&this.__exportStar||function(e,t){for(var l in e)"default"===l||Object.prototype.hasOwnProperty.call(t,l)||s(t,e,l)};Object.defineProperty(t,"__esModule",{value:!0}),d(l(2603),t),d(l(3162),t)},3162:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},718:function(e,t,l){var s=this&&this.__rest||function(e,t){var l={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(l[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var d=0;for(s=Object.getOwnPropertySymbols(e);dt.indexOf(s[d])&&Object.prototype.propertyIsEnumerable.call(e,s[d])&&(l[s[d]]=e[s[d]])}return l},d=this&&this.__read||function(e,t){var l="function"==typeof Symbol&&e[Symbol.iterator];if(!l)return e;var s,d,p=l.call(e),m=[];try{for(;(void 0===t||t-->0)&&!(s=p.next()).done;)m.push(s.value)}catch(e){d={error:e}}finally{try{s&&!s.done&&(l=p.return)&&l.call(p)}finally{if(d)throw d.error}}return m};Object.defineProperty(t,"__esModule",{value:!0}),t.createWidget=void 0;var p=l(6797),m=l(8554),v=l(2313),h=l(1126);t.createWidget=function(e,t){if(!(0,p.hasDom)())return{refresh:function(){},focus:function(){},unmount:function(){}};var l=t.domain,f=s(t,["domain"]);f.inlineOnMobile=t.inlineOnMobile||t.fullScreen,!f.inlineOnMobile&&(f.forceTouch||(0,p.isFullscreen)())&&(f.displayAsFullScreenModal=!0,f.forceTouch=!0);var g,y=(0,p.createIframe)("widget",{formId:e,domain:l,options:f}),b=y.embedId,_=y.iframe,w=y.refresh,E=y.focus,k=(0,v.buildWidget)(_,f.width,f.height);if(f.fullScreen&&((0,h.overrideFullScreenStyles)(t.container,_),g=(0,p.makeAutoResize)(t.container,!0),window.addEventListener("resize",g),g()),f.autoResize){var A=d("string"==typeof f.autoResize?f.autoResize.split(",").map(function(e){return parseInt(e)}):[],2),x=A[0],Z=A[1];window.addEventListener("message",(0,m.getFormHeightChangedHandler)(b,function(e){var l=Math.max(e.height,x||0);Z&&(l=Math.min(l,Z)),t.container.style.height="".concat(l,"px")}))}f.autoFocus&&window.addEventListener("message",(0,m.getFormReadyHandler)(b,function(){setTimeout(function(){E()},1e3)}));var R,O=function(){return t.container.append(k)};if(t.container.innerHTML="",t.lazy?(0,p.lazyInitialize)(t.container,O):O(),f.displayAsFullScreenModal){var N="",B=t.container;g=(0,p.makeAutoResize)(B);var D=B.style.height;window.addEventListener("message",(0,m.getWelcomeScreenHiddenHandler)(b,function(){B.classList.add("tf-v1-widget-fullscreen"),void 0!==t.opacity&&(B.style.backgroundColor=N),g(),window.addEventListener("resize",g)})),window.addEventListener("message",(0,m.getFormThemeHandler)(b,function(e){var t;N=(0,p.changeColorOpacity)(null===(t=null==e?void 0:e.theme)||void 0===t?void 0:t.backgroundColor)}));var H=((R=document.createElement("button")).className="tf-v1-widget-close tf-v1-close-icon",R.innerHTML="×",R);H.onclick=(0,p.invokeWithoutDefault)(function(){var e;if(window.removeEventListener("resize",g),B.style.height=D,null===(e=t.onClose)||void 0===e||e.call(t),B.classList.remove("tf-v1-widget-fullscreen"),B.style.backgroundColor="",t.keepSession){var l=document.createElement("div");l.className="tf-v1-widget-iframe-overlay",l.onclick=function(){B.classList.add("tf-v1-widget-fullscreen"),(0,p.unmountElement)(l)},k.append(l)}else t.container.innerHTML="",O(),B.append(H)}),B.append(H)}return{refresh:w,focus:E,unmount:function(){g&&window.removeEventListener("resize",g),(0,p.unmountElement)(k)}}}},1419:function(e,t,l){Object.defineProperty(t,"__esModule",{value:!0}),t.buildWidget=void 0;var s=l(6797);t.buildWidget=function(e,t,l){var d=document.createElement("div");return d.className="tf-v1-widget",d.dataset.testid="tf-v1-widget",d.append(e),(0,s.setElementSize)(d,{width:t,height:l})}},2313:function(e,t,l){var s=this&&this.__createBinding||(Object.create?function(e,t,l,s){void 0===s&&(s=l);var d=Object.getOwnPropertyDescriptor(t,l);d&&!("get"in d?!t.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,s,d)}:function(e,t,l,s){void 0===s&&(s=l),e[s]=t[l]}),d=this&&this.__exportStar||function(e,t){for(var l in e)"default"===l||Object.prototype.hasOwnProperty.call(t,l)||s(t,e,l)};Object.defineProperty(t,"__esModule",{value:!0}),d(l(1419),t)},1126:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.overrideFullScreenStyles=void 0,t.overrideFullScreenStyles=function(e,t){Object.assign(e.style,{zIndex:"10001",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}),t.style.borderRadius="0",Object.assign(document.body.style,{overflow:"hidden"})}},9321:function(e,t,l){var s=this&&this.__createBinding||(Object.create?function(e,t,l,s){void 0===s&&(s=l);var d=Object.getOwnPropertyDescriptor(t,l);d&&!("get"in d?!t.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,s,d)}:function(e,t,l,s){void 0===s&&(s=l),e[s]=t[l]}),d=this&&this.__exportStar||function(e,t){for(var l in e)"default"===l||Object.prototype.hasOwnProperty.call(t,l)||s(t,e,l)};Object.defineProperty(t,"__esModule",{value:!0}),d(l(718),t),d(l(4058),t)},4058:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},1920:function(e,t,l){var s=this&&this.__createBinding||(Object.create?function(e,t,l,s){void 0===s&&(s=l);var d=Object.getOwnPropertyDescriptor(t,l);d&&!("get"in d?!t.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,s,d)}:function(e,t,l,s){void 0===s&&(s=l),e[s]=t[l]}),d=this&&this.__exportStar||function(e,t){for(var l in e)"default"===l||Object.prototype.hasOwnProperty.call(t,l)||s(t,e,l)};Object.defineProperty(t,"__esModule",{value:!0}),d(l(1797),t),d(l(5970),t),d(l(4071),t),d(l(9321),t),d(l(1434),t)},5084:function(e,t,l){Object.defineProperty(t,"__esModule",{value:!0}),t.addAttributesToElement=void 0;var s=l(7377);t.addAttributesToElement=function(e,t){void 0===t&&(t={}),Object.keys(t).forEach(function(l){e.setAttribute((0,s.camelCaseToKebabCase)(l),t[l])})}},3626:function(e,t,l){var s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,l=1,s=arguments.length;l0)&&!(s=p.next()).done;)m.push(s.value)}catch(e){d={error:e}}finally{try{s&&!s.done&&(l=p.return)&&l.call(p)}finally{if(d)throw d.error}}return m};Object.defineProperty(t,"__esModule",{value:!0}),t.buildIframeSrc=void 0;var p=l(8027),m=l(4527),v=l(2346),h=l(2698),f=l(863),g={widget:"embed-widget",popup:"popup-blank",slider:"popup-drawer",popover:"popup-popover","side-tab":"popup-side-panel"};t.buildIframeSrc=function(e){var t,l,y,b,_,w,E,k,A,x,Z,R,N,B,D,H,U,z,V,G,F,W=e.domain,X=e.formId,q=e.type,K=e.embedId,Y=e.options,$=(y=(Y.noHeading||(Y.noHeading=document.querySelectorAll("h1").length>0),l=s(s({},{source:null===(t=null==window?void 0:window.location)||void 0===t?void 0:t.hostname.replace(/^www\./,""),medium:"embed-sdk",mediumVersion:"next"}),(0,m.removeUndefinedKeys)(Y))).transitiveSearchParams,b=l.source,_=l.medium,w=l.mediumVersion,E=l.hideFooter,k=l.hideHeaders,A=l.opacity,x=l.disableTracking,Z=l.enableSandbox,R=l.shareGaInstance,N=l.forceTouch,B=l.displayAsFullScreenModal,D=l.tracking,H=l.redirectTarget,U=l.autoResize,z=l.disableScroll,V=l.onEndingButtonClick,G=l.noHeading,F=(0,h.getTransitiveSearchParams)(y),s(s(s({},{"typeform-embed-id":K,"typeform-embed":g[q],"typeform-source":b,"typeform-medium":_,"typeform-medium-version":w,"embed-hide-footer":E?"true":void 0,"embed-hide-headers":k?"true":void 0,"embed-opacity":A,"disable-tracking":x||Z?"true":void 0,"__dangerous-disable-submissions":Z?"true":void 0,"share-ga-instance":R?"true":void 0,"force-touch":N?"true":void 0,"add-placeholder-ws":"widget"===q&&B?"true":void 0,"typeform-embed-redirect-target":H,"typeform-embed-auto-resize":U?"true":void 0,"typeform-embed-disable-scroll":z?"true":void 0,"typeform-embed-handle-ending-button-click":V?"true":void 0,"typeform-embed-no-heading":G?"true":void 0}),F),D)),Q=function(e,t,l){if(void 0===t&&(t=p.DEFAULT_DOMAIN),void 0===l&&(l=!1),e.startsWith("http://")||e.startsWith("https://"))return new URL(e);var s=l?"c":"to";return new URL("https://".concat(t,"/").concat(s,"/").concat(e))}(X,W,Y.chat);if(Object.entries($).filter(function(e){var t=d(e,2)[1];return(0,v.isDefined)(t)}).forEach(function(e){var t=d(e,2),l=t[0],s=t[1];Q.searchParams.set(l,s)}),Y.hubspot){var J=(0,f.getHubspotHiddenFields)();Y.hidden=s(s({},Y.hidden),J)}if(Y.hidden){var ee=new URLSearchParams;Object.entries(Y.hidden).filter(function(e){var t=d(e,2)[1];return(0,v.isDefined)(t)&&""!==t}).forEach(function(e){var t=d(e,2),l=t[0],s=t[1];"boolean"==typeof Y.transitiveSearchParams&&Q.searchParams.delete(l),ee.set(l,s)});var et=ee.toString();et&&(Q.hash=et)}return Q.href}},2391:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.changeColorOpacity=void 0,t.changeColorOpacity=function(e,t){return void 0===e&&(e=""),void 0===t&&(t=255),e.startsWith("rgba(")?null==e?void 0:e.replace(/, [\d.]+\)$/,", ".concat(t,")")):e}},8972:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.handleCustomOpen=void 0;var l={remove:function(){}};t.handleCustomOpen=function(e,t,s){switch(t){case"load":return e(),l;case"exit":var d,p;return s?(d=0,p=function(t){t.clientY=d;(p/d*100>=e||m)&&(t(),document.removeEventListener("scroll",n))}return document.addEventListener("scroll",n),{remove:function(){return document.removeEventListener("scroll",n)}}}(s,e):l;default:return l}}},1553:function(e,t,l){Object.defineProperty(t,"__esModule",{value:!0}),t.createIframe=void 0;var s=l(3626),d=l(6797),p=l(8866),m=l(8554),v=l(2256),h=l(7144),f=l(5511);t.createIframe=function(e,t){var l=t.formId,g=t.domain,y=t.options,b=(0,p.generateEmbedId)(),_=y.iframeProps,w=void 0===_?{}:_,E=y.onReady,k=y.onQuestionChanged,A=y.onHeightChanged,x=y.onSubmit,Z=y.onEndingButtonClick,R=y.shareGaInstance,N=(0,s.buildIframeSrc)({formId:l,domain:g,embedId:b,type:e,options:y}),B=document.createElement("iframe");return B.src=N,B.dataset.testid="iframe",B.style.border="0px",B.allow="microphone; camera",(0,d.addAttributesToElement)(B,w),B.addEventListener("load",v.triggerIframeRedraw,{once:!0}),window.addEventListener("message",(0,m.getFormReadyHandler)(b,E)),window.addEventListener("message",(0,m.getFormQuestionChangedHandler)(b,k)),window.addEventListener("message",(0,m.getFormHeightChangedHandler)(b,A)),window.addEventListener("message",(0,m.getFormSubmitHandler)(b,x)),window.addEventListener("message",(0,m.getFormThemeHandler)(b,function(e){var t;if(null==e?void 0:e.theme){var l=document.querySelector(".tf-v1-close-icon");l&&(l.style.color=null===(t=e.theme)||void 0===t?void 0:t.color)}})),window.addEventListener("message",(0,m.getThankYouScreenButtonClickHandler)(b,Z)),"widget"!==e&&window.addEventListener("message",h.dispatchCustomKeyEventFromIframe),R&&window.addEventListener("message",(0,m.getFormReadyHandler)(b,function(){(0,d.setupGaInstance)(B,b,R)})),{iframe:B,embedId:b,refresh:function(){return(0,f.refreshIframe)(B)},focus:function(){var e;null===(e=B.contentWindow)||void 0===e||e.postMessage("embed-focus","*")}}}},8866:function(e,t){var l=this&&this.__read||function(e,t){var l="function"==typeof Symbol&&e[Symbol.iterator];if(!l)return e;var s,d,p=l.call(e),m=[];try{for(;(void 0===t||t-->0)&&!(s=p.next()).done;)m.push(s.value)}catch(e){d={error:e}}finally{try{s&&!s.done&&(l=p.return)&&l.call(p)}finally{if(d)throw d.error}}return m};Object.defineProperty(t,"__esModule",{value:!0}),t.generateEmbedId=void 0,t.generateEmbedId=function(){return l(String(Math.random()).split("."),2)[1]}},8554:function(e,t){var l=this&&this.__rest||function(e,t){var l={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(l[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var d=0;for(s=Object.getOwnPropertySymbols(e);dt.indexOf(s[d])&&Object.prototype.propertyIsEnumerable.call(e,s[d])&&(l[s[d]]=e[s[d]])}return l};function o(e,t,s){return function(d){var p=d.data,m=p.type,v=p.embedId,h=l(p,["type","embedId"]);m===e&&v===t&&(null==s||s(h))}}Object.defineProperty(t,"__esModule",{value:!0}),t.getThankYouScreenButtonClickHandler=t.getFormThemeHandler=t.getWelcomeScreenHiddenHandler=t.getFormSubmitHandler=t.getFormHeightChangedHandler=t.getFormQuestionChangedHandler=t.getFormReadyHandler=void 0,t.getFormReadyHandler=function(e,t){return o("form-ready",e,t)},t.getFormQuestionChangedHandler=function(e,t){return o("form-screen-changed",e,t)},t.getFormHeightChangedHandler=function(e,t){return o("form-height-changed",e,t)},t.getFormSubmitHandler=function(e,t){return o("form-submit",e,t)},t.getWelcomeScreenHiddenHandler=function(e,t){return o("welcome-screen-hidden",e,t)},t.getFormThemeHandler=function(e,t){return o("form-theme",e,t)},t.getThankYouScreenButtonClickHandler=function(e,t){return o("thank-you-screen-button-click",e,t)}},339:function(e,t,l){var s=this&&this.__createBinding||(Object.create?function(e,t,l,s){void 0===s&&(s=l);var d=Object.getOwnPropertyDescriptor(t,l);d&&!("get"in d?!t.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return t[l]}}),Object.defineProperty(e,s,d)}:function(e,t,l,s){void 0===s&&(s=l),e[s]=t[l]}),d=this&&this.__exportStar||function(e,t){for(var l in e)"default"===l||Object.prototype.hasOwnProperty.call(t,l)||s(t,e,l)};Object.defineProperty(t,"__esModule",{value:!0}),d(l(1553),t),d(l(7144),t)},5511:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.refreshIframe=void 0,t.refreshIframe=function(e){if(e){var t=e.src;if(t.includes("&refresh")){var l=t.split("&refresh#");e.src=l.join("#")}else(l=t.split("#"))[0]="".concat(l[0],"&refresh"),e.src=l.join("#")}}},7144:function(e,t){var l=this&&this.__awaiter||function(e,t,l,s){return new(l||(l=Promise))(function(d,p){function a(e){try{u(s.next(e))}catch(e){p(e)}}function c(e){try{u(s.throw(e))}catch(e){p(e)}}function u(e){var t;e.done?d(e.value):((t=e.value)instanceof l?t:new l(function(e){e(t)})).then(a,c)}u((s=s.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var l,s,d,p,m={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return p={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(p[Symbol.iterator]=function(){return this}),p;function c(v){return function(h){return function(v){if(l)throw TypeError("Generator is already executing.");for(;p&&(p=0,v[0]&&(m=0)),m;)try{if(l=1,s&&(d=2&v[0]?s.return:v[0]?s.throw||((d=s.return)&&d.call(s),0):s.next)&&!(d=d.call(s,v[1])).done)return d;switch(s=0,d&&(v=[2&v[0],d.value]),v[0]){case 0:case 1:d=v;break;case 4:return m.label++,{value:v[1],done:!1};case 5:m.label++,s=v[1],v=[0];continue;case 7:v=m.ops.pop(),m.trys.pop();continue;default:if(!((d=(d=m.trys).length>0&&d[d.length-1])||6!==v[0]&&2!==v[0])){m=0;continue}if(3===v[0]&&(!d||v[1]>d[0]&&v[1]150?"#000000":"#FFFFFF"}},2698:function(e,t){var l=this&&this.__assign||function(){return(l=Object.assign||function(e){for(var t,l=1,s=arguments.length;l0?e.reduce(function(e,s){var d,p=t.searchParams.get(s);return p?l(l({},e),((d={})[s]=p,d)):e},{}):{}}},8252:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hasDom=void 0,t.hasDom=function(){return"undefined"!=typeof document&&"undefined"!=typeof window}},2938:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hexRgb=void 0;var l="a-f\\d",s="#?[".concat(l,"]{3}[").concat(l,"]?"),d="#?[".concat(l,"]{6}([").concat(l,"]{2})?"),p=RegExp("[^#".concat(l,"]"),"gi"),m=RegExp("^".concat(s,"$|^").concat(d,"$"),"i");t.hexRgb=function(e){if("string"!=typeof e||p.test(e)||!m.test(e))throw TypeError("Expected a valid hex string");8===(e=e.replace(/^#/,"")).length&&(e=e.slice(0,6)),4===e.length&&(e=e.slice(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=Number.parseInt(e,16);return{red:t>>16,green:t>>8&255,blue:255&t}}},863:function(e,t,l){var s=this&&this.__awaiter||function(e,t,l,s){return new(l||(l=Promise))(function(d,p){function a(e){try{u(s.next(e))}catch(e){p(e)}}function c(e){try{u(s.throw(e))}catch(e){p(e)}}function u(e){var t;e.done?d(e.value):((t=e.value)instanceof l?t:new l(function(e){e(t)})).then(a,c)}u((s=s.apply(e,t||[])).next())})},d=this&&this.__generator||function(e,t){var l,s,d,p,m={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return p={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(p[Symbol.iterator]=function(){return this}),p;function c(v){return function(h){return function(v){if(l)throw TypeError("Generator is already executing.");for(;p&&(p=0,v[0]&&(m=0)),m;)try{if(l=1,s&&(d=2&v[0]?s.return:v[0]?s.throw||((d=s.return)&&d.call(s),0):s.next)&&!(d=d.call(s,v[1])).done)return d;switch(s=0,d&&(v=[2&v[0],d.value]),v[0]){case 0:case 1:d=v;break;case 4:return m.label++,{value:v[1],done:!1};case 5:m.label++,s=v[1],v=[0];continue;case 7:v=m.ops.pop(),m.trys.pop();continue;default:if(!((d=(d=m.trys).length>0&&d[d.length-1])||6!==v[0]&&2!==v[0])){m=0;continue}if(3===v[0]&&(!d||v[1]>d[0]&&v[1]0)&&!(s=p.next()).done;)m.push(s.value)}catch(e){d={error:e}}finally{try{s&&!s.done&&(l=p.return)&&l.call(p)}finally{if(d)throw d.error}}return m};Object.defineProperty(t,"__esModule",{value:!0}),t.loadOptionsFromAttributes=t.transformAttributeValue=t.camelCaseToKebabCase=void 0,t.camelCaseToKebabCase=function(e){return e.split("").map(function(e,t){return e.toUpperCase()===e?"".concat(0!==t?"-":"").concat(e.toLowerCase()):e}).join("")};var r=function(e){return e||void 0},i=function(e){return""===e||"yes"===e||"true"===e},a=function(e){var t=e?parseInt(e,10):NaN;return isNaN(t)?void 0:t},d="%ESCAPED_COMMA%",u=function(e){if(e)return e.replace(/\s/g,"").replace(/\\,/g,d).split(",").filter(function(e){return!!e}).map(function(e){return e.replace(d,",")})};t.transformAttributeValue=function(e,t){var p,m,v,h;switch(t){case"string":return r(e);case"boolean":return i(e);case"integer":return a(e);case"function":return"function"==typeof(h=e&&e in window?window[e]:void 0)?h:void 0;case"array":return u(e);case"record":return function(e){if(e)return e.replace(/\\,/g,d).split(",").filter(function(e){return!!e}).map(function(e){return e.replace(d,",")}).reduce(function(e,t){var d,p=t.match(/^([^=]+)=(.*)$/);if(p){var m=s(p,3),v=m[1],h=m[2];return l(l({},e),((d={})[v.trim()]=h,d))}return e},{})}(e);case"integerOrBoolean":return null!==(p=a(e))&&void 0!==p?p:i(e);case"stringOrBoolean":return null!==(m=r(e))&&void 0!==m?m:i(e);case"arrayOrBoolean":return null!==(v=u(e))&&void 0!==v?v:i(e);default:throw Error("Invalid attribute transformation ".concat(t))}},t.loadOptionsFromAttributes=function(e,s){return Object.keys(s).reduce(function(d,p){var m;return l(l({},d),((m={})[p]=(0,t.transformAttributeValue)(e.getAttribute("data-tf-".concat((0,t.camelCaseToKebabCase)(p))),s[p]),m))},{})}},318:function(e,t,l){Object.defineProperty(t,"__esModule",{value:!0}),t.makeAutoResize=void 0;var s=l(6563);t.makeAutoResize=function(e,t){return void 0===t&&(t=!1),function(){var l=t||(0,s.isMobile)();e&&l&&e.style.setProperty("height","".concat(window.innerHeight,"px"),"important")}}},6563:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isFullscreen=t.isMobile=t.isBigScreen=void 0,t.isBigScreen=function(){return window.screen.width>=1024&&window.screen.height>=768},t.isMobile=function(){return/mobile|tablet|android/i.test(navigator.userAgent.toLowerCase())},t.isFullscreen=function(){return(0,t.isMobile)()&&!(0,t.isBigScreen)()}},4527:function(e,t,l){var s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,l=1,s=arguments.length;l0)&&!(s=p.next()).done;)m.push(s.value)}catch(e){d={error:e}}finally{try{s&&!s.done&&(l=p.return)&&l.call(p)}finally{if(d)throw d.error}}return m};Object.defineProperty(t,"__esModule",{value:!0}),t.removeUndefinedKeys=void 0;var p=l(2346);t.removeUndefinedKeys=function(e){return Object.entries(e).filter(function(e){var t=d(e,2)[1];return(0,p.isDefined)(t)}).reduce(function(e,t){var l,p=d(t,2),m=p[0],v=p[1];return s(s({},e),((l={})[m]=v,l))},{})}},4748:function(e,t,l){Object.defineProperty(t,"__esModule",{value:!0}),t.setAutoClose=void 0;var s=l(8554);t.setAutoClose=function(e,t,l){if(t&&l){var d="number"==typeof t?t:0;window.addEventListener("message",(0,s.getFormSubmitHandler)(e,function(){return setTimeout(l,d)}))}}},9533:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setElementSize=void 0,t.setElementSize=function(e,t){var l=t.width,s=t.height;return l&&(e.style.width="".concat(l,"px")),s&&(e.style.height="".concat(s,"px")),e}},4392:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setupGaInstance=t.sendGaIdMessage=void 0,t.sendGaIdMessage=function(e,t,l){var s={embedId:e,gaClientId:t};setTimeout(function(){l&&l.contentWindow&&l.contentWindow.postMessage({type:"ga-client-id",data:s},"*")},0)};var n=function(e){console.error(e)},o=function(e){n("Whoops! You enabled the shareGaInstance feature in your typeform embed but ".concat(e,".\n\n")+"Make sure to include Google Analytics Javascript code before the Typeform Embed Javascript code in your page and use correct tracker ID.\n\nIt is also possible the Google Analytics was blocked by your adblock plugin.")};t.setupGaInstance=function(e,l,s){var d="string"==typeof s?s:void 0;if(window.gtag){if(d||(d=function(){if(window.dataLayer){var e=window.dataLayer.find(function(e){return e.length>1&&"config"===e[0]});return e&&e[1]}}()),!d)return void o("the tracking ID could not be retrieved");var p=!1;window.gtag("get",d,"client_id",function(s){p=!0,(0,t.sendGaIdMessage)(l,s,e)}),setTimeout(function(){p||o("the tracker with ID ".concat(d," was not found"))},3e3)}else try{var m,v,h=(m=window.ga.getAll(),(v=d)?m.find(function(e){return e.get("trackingId")===v}):m[0]);h?(0,t.sendGaIdMessage)(l,h.get("clientId"),e):o("the tracker with ID ".concat(d," was not found"))}catch(e){o("the Google Analytics object was not found"),n(e)}}},4623:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=void 0,t.sleep=function(e){return new Promise(function(t){return setTimeout(t,e)})}},1451:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.unmountElement=void 0,t.unmountElement=function(e){var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)}}},l={},function n(e){var s=l[e];if(void 0!==s)return s.exports;var d=l[e]={exports:{}};return t[e].call(d.exports,d,d.exports,n),d.exports}(1920))},22074:function(e,t,l){"use strict";l.d(t,{Z:function(){return Autoplay}});var s=l(61689),d={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function Autoplay(e){var t,l,p,m=s.Z.optionsHandler(),v=m.merge(d,Autoplay.globalOptions),h=0,f=!1;function destroy(){l.off("pointerDown",p),t.stopOnInteraction||l.off("pointerUp",reset),stop(),h=0}function play(e){stop(),void 0!==e&&(f=e),h=window.setTimeout(next,t.delay)}function stop(){h&&window.clearTimeout(h)}function reset(){h&&(stop(),play())}function next(){var e=l.internalEngine().index;if(t.stopOnLastSnap&&e.get()===e.max)return destroy();l.canScrollNext()?l.scrollNext(f):l.scrollTo(0,f),play()}var g={name:"autoplay",options:m.merge(v,e),init:function(e){l=e,f=(t=m.atMedia(g.options)).jump,p=t.stopOnInteraction?destroy:stop;var s=l.internalEngine().eventStore,d=l.rootNode(),v=t.rootNode&&t.rootNode(d)||d;l.on("pointerDown",p),t.stopOnInteraction||l.on("pointerUp",reset),t.stopOnMouseEnter&&(s.add(v,"mouseenter",p),t.stopOnInteraction||s.add(v,"mouseleave",reset)),s.add(document,"visibilitychange",function(){if("hidden"===document.visibilityState)return stop();reset()}),s.add(window,"pagehide",function(e){e.persisted&&stop()}),t.playOnInit&&play()},destroy:destroy,play:play,stop:stop,reset:reset};return g}Autoplay.globalOptions=void 0},96874:function(e){e.exports=function(e,t,l){switch(l.length){case 0:return e.call(t);case 1:return e.call(t,l[0]);case 2:return e.call(t,l[0],l[1]);case 3:return e.call(t,l[0],l[1],l[2])}return e.apply(t,l)}},89881:function(e,t,l){var s=l(47816),d=l(99291)(s);e.exports=d},21078:function(e,t,l){var s=l(62488),d=l(37285);e.exports=function baseFlatten(e,t,l,p,m){var v=-1,h=e.length;for(l||(l=d),m||(m=[]);++v0&&l(f)?t>1?baseFlatten(f,t-1,l,p,m):s(m,f):p||(m[m.length]=f)}return m}},28483:function(e,t,l){var s=l(25063)();e.exports=s},47816:function(e,t,l){var s=l(28483),d=l(3674);e.exports=function(e,t){return e&&s(e,t,d)}},69199:function(e,t,l){var s=l(89881),d=l(98612);e.exports=function(e,t){var l=-1,p=d(e)?Array(e.length):[];return s(e,function(e,s,d){p[++l]=t(e,s,d)}),p}},82689:function(e,t,l){var s=l(29932),d=l(97786),p=l(67206),m=l(69199),v=l(71131),h=l(7518),f=l(85022),g=l(6557),y=l(1469);e.exports=function(e,t,l){t=t.length?s(t,function(e){return y(e)?function(t){return d(t,1===e.length?e[0]:e)}:e}):[g];var b=-1;return t=s(t,h(p)),v(m(e,function(e,l,d){return{criteria:s(t,function(t){return t(e)}),index:++b,value:e}}),function(e,t){return f(e,t,l)})}},5976:function(e,t,l){var s=l(6557),d=l(45357),p=l(30061);e.exports=function(e,t){return p(d(e,t,s),e+"")}},56560:function(e,t,l){var s=l(75703),d=l(38777),p=l(6557),m=d?function(e,t){return d(e,"toString",{configurable:!0,enumerable:!1,value:s(t),writable:!0})}:p;e.exports=m},71131:function(e){e.exports=function(e,t){var l=e.length;for(e.sort(t);l--;)e[l]=e[l].value;return e}},26393:function(e,t,l){var s=l(33448);e.exports=function(e,t){if(e!==t){var l=void 0!==e,d=null===e,p=e==e,m=s(e),v=void 0!==t,h=null===t,f=t==t,g=s(t);if(!h&&!g&&!m&&e>t||m&&v&&f&&!h&&!g||d&&v&&f||!l&&f||!p)return 1;if(!d&&!m&&!g&&e=h)return f;return f*("desc"==l[d]?-1:1)}}return e.index-t.index}},99291:function(e,t,l){var s=l(98612);e.exports=function(e,t){return function(l,d){if(null==l)return l;if(!s(l))return e(l,d);for(var p=l.length,m=t?p:-1,v=Object(l);(t?m--:++m0){if(++l>=800)return arguments[0]}else l=0;return e.apply(void 0,arguments)}}},75703:function(e){e.exports=function(e){return function(){return e}}},85564:function(e,t,l){var s=l(21078);e.exports=function(e){return(null==e?0:e.length)?s(e,1):[]}},10928:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},89734:function(e,t,l){var s=l(21078),d=l(82689),p=l(5976),m=l(16612),v=p(function(e,t){if(null==e)return[];var l=t.length;return l>1&&m(e,t[0],t[1])?t=[]:l>2&&m(t[0],t[1],t[2])&&(t=[t[0]]),d(e,s(t,1),[])});e.exports=v},59275:function(e,t,l){"use strict";l.d(t,{v:function(){return d}});var s=l(58206);let d={formatProductPromotion:e=>e?{id:e.id||0,name:e.name||"",thumbnail:e.thumbnail||"",expirationDate:e.expiration_date||""}:null,formatPriceInfo:e=>e?{final:e.final||0,regular:e.regular||0,discountPercent:e.discount_percent||0}:null,formatCategory:function(e,t,l){var s,p,m;let v=l?l+"/"+e.slug:e.slug,h=(null==e?void 0:null===(p=e.children)||void 0===p?void 0:null===(s=p.map)||void 0===s?void 0:s.call(p,t=>d.formatCategory(t,e.id,v)))||[];return{id:null==e?void 0:e.id,name:(null==e?void 0:e.name)||"",logo:(null==e?void 0:e.logo)||"",slug:(null==e?void 0:e.slug)||"",fullSlug:v||"",children:h,parentId:t||0,products:(null===(m=e.products)||void 0===m?void 0:m.map(this.formatProduct))||[]}},formatProduct:e=>{var t,l,p;return e?{id:e.id||0,price:e.price&&d.formatPriceInfo(e.price)||{final:0,regular:0,discountPercent:0},thumbnail:e.thumbnail||"",name:e.name||"",averageRating:Number((e.average_rating||0).toFixed(2)),reviewsCount:e.reviews_count||0,tag:e.tag||null,sku:e.sku||"",slug:e.slug||"",images:e.images||[],tags:e.tags||[],unit:e.unit||"",brand:e.brand?{name:e.brand.name||"",image:e.brand.image||"",slug:e.brand.slug||"",productsCount:e.brand.products_count||0}:null,description:e.description||"",productPromotions:(null===(l=e.product_promotions)||void 0===l?void 0:null===(t=l.map)||void 0===t?void 0:t.call(l,d.formatProductPromotion).filter(s.$K))||[],isInStock:(null==e?void 0:e.is_in_stock)||!1,isAffiliateProduct:(null==e?void 0:e.is_affiliate_product)||!1,affiliates:(null===(p=e.affiliates)||void 0===p?void 0:p.map(e=>({channelCode:e.channel_code||"",price:e.price,url:e.url})))||[]}:null}}},46108:function(e,t,l){"use strict";l.d(t,{R:function(){return NextImageWrap}});var s=l(35944);l(67294);var d=l(89755),p=l.n(d),m=l(39675);let NextImageWrap=e=>(0,s.tZ)(p(),{objectFit:"cover",loader:m.Z,...e})},12237:function(e,t,l){"use strict";var s=l(35944),d=l(1216);t.Z=e=>{let{...t}=e;return(0,s.tZ)(d.ZP,{once:!0,offset:1200,...t})}},17303:function(e,t,l){"use strict";l.d(t,{_:function(){return h}});var s=l(35944),d=l(67294),p=l(64523),m=l(83015),v=l(24612);let h=d.memo(e=>{let{type:t="general",...l}=e,d=(0,m.d)();return(0,s.tZ)(p.x,{...l,children:(0,s.tZ)("img",{loading:"lazy",src:"".concat(v.Nr,"/app/").concat(d?"mobile":"desktop","-").concat(t,".png?v=2"),alt:"app promote banner",style:{width:"100%"}})})})},28410:function(e,t,l){"use strict";l.d(t,{g:function(){return Z}});var s=l(35944),d=l(67294),p=l(74706),m=l(54576),v=l(7259),h=l(64523),f=l(69876),g=l(64577),y=l(97564),b=l(50064),_=l(36808),w=l.n(_),E=l(86896),k=l(20868),A=l(24612),x=l(50176);let Z=d.memo(e=>{let{...t}=e,l=(0,d.useRef)(null),{formatMessage:_}=(0,E.Z)(),Z=(0,b.i)(),R=(0,k.U)();return(0,s.BX)(s.HY,{children:[(0,s.tZ)("script",{dangerouslySetInnerHTML:{__html:"\n (() => {\n var getCookie = (name) => document.cookie.split('; ').reduce((r, v) => {\n const parts = v.split('='); return parts[0] === name ? decodeURIComponent(parts[1]) : r\n }, '')\n var style = document.createElement('style')\n style.innerHTML = getCookie(\"".concat(A.UK,"\") === 'true' ? '#smart-app { display: none; }' : '#smart-app { display: block; }'\n document.body.appendChild(style)\n })()\n ")}}),(0,s.tZ)("a",{href:"https://hellobacsivn.page.link/app","data-event-category":"App Banner","data-event-action":"Smart Banner Click","data-event-label":R,className:"pointer-event-child-none",children:(0,s.tZ)(h.x,{ref:l,sx:{background:p.t.neutral[0],width:"100%",height:80,paddingInline:16,[v.M.mbUp]:{display:"none"}},id:"smart-app",...t,children:(0,s.BX)(f.k,{align:"center",justify:"space-evenly",h:"100%",gap:10,children:[(0,s.tZ)(p.B,{variant:"ghost",compact:!0,size:"sm",leftIcon:(0,s.BX)("svg",{width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",children:[(0,s.BX)("g",{clipPath:"url(#clip0_194_115591)",children:[(0,s.tZ)("circle",{cx:"11.5",cy:"11.5",r:"11.5",fill:"#F3F0F4"}),(0,s.tZ)("path",{d:"M8.99504 8.49533C8.89557 8.49536 8.79837 8.52505 8.71587 8.58061C8.63336 8.63616 8.5693 8.71506 8.53187 8.80722C8.49444 8.89938 8.48535 9.0006 8.50575 9.09795C8.52615 9.1953 8.57512 9.28436 8.6464 9.35373L11.2929 12.0002L8.6464 14.6467C8.59842 14.6928 8.56011 14.748 8.53371 14.809C8.50732 14.8701 8.49338 14.9358 8.4927 15.0023C8.49202 15.0688 8.50463 15.1348 8.52977 15.1964C8.55492 15.258 8.5921 15.314 8.63914 15.361C8.68618 15.408 8.74213 15.4452 8.80372 15.4704C8.86531 15.4955 8.93129 15.5081 8.99781 15.5074C9.06433 15.5068 9.13005 15.4928 9.19111 15.4664C9.25218 15.44 9.30736 15.4017 9.35344 15.3537L11.9999 12.7072L14.6464 15.3537C14.6925 15.4017 14.7477 15.44 14.8087 15.4664C14.8698 15.4928 14.9355 15.5068 15.002 15.5074C15.0685 15.5081 15.1345 15.4955 15.1961 15.4704C15.2577 15.4452 15.3137 15.408 15.3607 15.361C15.4077 15.314 15.4449 15.258 15.4701 15.1964C15.4952 15.1348 15.5078 15.0688 15.5071 15.0023C15.5065 14.9358 15.4925 14.8701 15.4661 14.809C15.4397 14.748 15.4014 14.6928 15.3534 14.6467L12.707 12.0002L15.3534 9.35373C15.4257 9.2835 15.475 9.19308 15.495 9.09432C15.515 8.99556 15.5047 8.89307 15.4654 8.80028C15.4261 8.70748 15.3597 8.62872 15.2749 8.5743C15.1901 8.51989 15.0909 8.49236 14.9902 8.49533C14.8603 8.49921 14.737 8.55349 14.6464 8.6467L11.9999 11.2932L9.35344 8.6467C9.30684 8.5988 9.25112 8.56073 9.18956 8.53473C9.128 8.50874 9.06186 8.49534 8.99504 8.49533V8.49533Z",fill:"#595959"})]}),(0,s.tZ)("defs",{children:(0,s.tZ)("clipPath",{id:"clip0_194_115591",children:(0,s.tZ)("rect",{width:"23",height:"23",fill:"white"})})})]}),sx:{border:"none",padding:0,"&:hover":{all:"unset"}},onClick:()=>{w().set(A.UK,"true"),x.E.mutate(()=>{(null==l?void 0:l.current)&&(l.current.style.display="none")})}}),(0,s.BX)(f.k,{gap:6,align:"center",sx:{flexGrow:1},children:[(0,s.tZ)(g.o,{ratio:1,w:44,children:(0,s.tZ)("img",{loading:"lazy",src:"".concat(A.Nr,"/app/appIcon.png?v=2"),alt:"Hello Bacsi App Icon"})}),(0,s.BX)(y.K,{spacing:0,children:[(0,s.tZ)(m.T,{size:"c1",color:p.t.gray[8],children:"Hello Bacsi"}),(0,s.tZ)(m.T,{size:"n1",color:p.t.gray[4],children:_({id:"smartApp.description",defaultMessage:"Available in {os}"},{os:["macos","ios"].includes(Z)?"App Store":"Google Play"})})]})]}),(0,s.tZ)(p.B,{variant:"ghost",compact:!0,size:"sm",children:_({id:"smartApp.button",defaultMessage:"Use"})})]})})})]})})},80432:function(e,t,l){"use strict";l.d(t,{E:function(){return FixedBottomAdBlock}});var s=l(35944),d=l(67294),p=l(5152),m=l.n(p);let v=m()(()=>l.e(2756).then(l.bind(l,92756)).then(e=>e.FixedBottomAdBlock),{loadableGenerated:{webpack:()=>[92756]},ssr:!1}),FixedBottomAdBlock=e=>{let[t,l]=(0,d.useState)(!1);return((0,d.useEffect)(()=>{setTimeout(()=>{l(!0)},500)},[]),t)?(0,s.tZ)(v,{...e}):null}},73940:function(e,t,l){"use strict";l.d(t,{b3:function(){return N},Bi:function(){return D},vo:function(){return B}});var s=l(35944),d=l(67294),p=l(86896),m=l(24612),v=l(15184),h=l(74706),f=l(54576),g=l(50667),y=l(20868),b=l(95386),_=l(63116),w=l(10166),E=l(7259);let k=(0,w.Z)("div",{target:"e12okbpm0"})("content-visibility:auto;contain-intrinsic-size:200px;padding:12px;border:1px solid ",null===v.t||void 0===v.t?void 0:v.t.colors.neutral100,";border-radius:4px;.expert{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:4px;.information{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;}}.divider{background-color:",null===v.t||void 0===v.t?void 0:v.t.colors.neutral100,";height:1px;border:none;margin-block:8px;}",E.M.mbUp,"{&[data-mobile='true']{display:none;}}",E.M.mbDown,"{&[data-mobile='false']{display:none;}padding-block:8px;margin-bottom:16px;.expert{padding:0;padding-block:6px;flex-direction:row;align-items:center;justify-content:start;}.divider{margin-top:0;}}");var A=l(13023),x=l(97564),Z=l(41609),R=l.n(Z);function withArticleAuthor(e){let t=e.displayName||e.name||"Component",ComponentWithArticleAuthor=t=>{var l;let{articleReviewed:v}=t,{formatMessage:h}=(0,p.Z)(),f=null==v?void 0:null===(l=v.expert)||void 0===l?void 0:l.authorOnCare,{title:g,name:y,location:b,isExpertSameAsAuthor:_}=(0,d.useMemo)(()=>{if(void 0!==v){let{expert:e,editor:t,is_author:l}=v;if(e){let t={name:e.display_name,location:e.organisation,authorOnCare:f};return l?{title:h({id:"articleAuthor.title.written-by",defaultMessage:"Written by"}),isExpertSameAsAuthor:!0,...t}:"expert"===e.role?{title:h({id:"articleAuthor.title.expert",defaultMessage:"Expertly reviewed by"}),...t}:{title:h({id:"articleAuthor.title.medical",defaultMessage:"Medically reviewed by"}),...t}}if(t)return{title:h({id:"articleAuthor.title.fact-check",defaultMessage:"Fact-checked by"}),name:t.display_name}}return{title:null,name:null,location:null,authorOnCare:null,isExpertSameAsAuthor:!1}},[v]),{reviewerUrl:w,authorUrl:E}=(0,d.useMemo)(()=>{if(void 0!==v){let{expert:e,editor:t,is_author:l,author:s}=v;if(e){let t={reviewerUrl:!e.turn_off_profile&&e.profile_url,authorUrl:null};return l?t:{...t,authorUrl:!(null==s?void 0:s.turn_off_profile)&&(null==s?void 0:s.profile_url)}}if(t)return{reviewerUrl:!t.turn_off_profile&&t.profile_url,authorUrl:!(null==s?void 0:s.turn_off_profile)&&(null==s?void 0:s.profile_url)}}return{reviewerUrl:null,authorUrl:null}},[v]),k=(0,d.useMemo)(()=>(null==v?void 0:v.expert)&&(null==v?void 0:v.is_author),[v]),{avatar:A,badge:x}=(0,d.useMemo)(()=>{if(void 0!==v){let{expert:e,editor:t,fact_check:l,author:s}=v,d=(null==t?void 0:t.user_id)===(null==s?void 0:s.user_id),p=d?l:t;if(e)return{avatar:e.avatar_thumbnail||"",avatarLink:e.profile_url,badge:e.role||""};if(t)return{avatar:t.avatar_thumbnail||"",avatarLink:t.profile_url||"",badge:"fact-check"};if(p)return{avatar:p.avatar_thumbnail||"",avatarLink:p.profile_url||"",badge:"fact-check"}}return{avatar:"".concat(m.Nr,"/hhg-logo.png"),badge:"fact-check"}},[v]);return void 0===v?null:(0,s.tZ)(e,{title:g,name:y,location:b,authorOnCare:f,reviewerUrl:w,authorUrl:E,shouldHideAuthor:k,avatar:A,badge:x,isExpertSameAsAuthor:_,...t})};return ComponentWithArticleAuthor.displayName="withTheme(".concat(t,")"),ComponentWithArticleAuthor}let N=d.memo(withArticleAuthor(e=>{var t,l,w,E,A,x;let{reviewer:Z,articleReviewed:R,author:N,expert:B,updatedAt:D,title:H,name:U,location:z,reviewerUrl:V,authorUrl:G,shouldHideAuthor:F,avatar:W,badge:X,authorOnCare:q,...K}=e,{formatMessage:Y}=(0,p.Z)(),{locale:$}=(0,b.h)(),Q=(0,y.U)(),J=(0,d.useMemo)(()=>{var e,t,l;return(null==q?void 0:q.type)==="service"?null===(e=m.a8[$])||void 0===e?void 0:e.SERVICE:(null==q?void 0:q.type)==="hospital"?null===(t=m.a8[$])||void 0===t?void 0:t.HOSPITAL:null===(l=m.a8[$])||void 0===l?void 0:l.DOCTOR},[null==q?void 0:q.type,$]);return(0,s.BX)(k,{"data-mobile":"false",...K,children:[(0,s.BX)("div",{className:"expert",children:[(0,s.tZ)("a",{"data-event-category":"Reviewer Name","data-event-action":U,"data-event-label":"".concat((0,g.UC)($)).concat(V),href:V||"#",children:(0,s.tZ)(h.a,{src:W||(null==B?void 0:B.thumbnailAvatar)||(null==Z?void 0:Z.thumbnailAvatar)||(null==N?void 0:N.thumbnailAvatar),withIndicator:!!X,indicatorConfig:X?{size:18,label:(0,s.tZ)("img",{loading:"lazy",width:"18",height:"18",src:"".concat(m.Nr,"/article-").concat(X,".svg"),alt:""})}:void 0})}),(0,s.BX)("div",{className:"information",children:[H&&(0,s.tZ)(f.T,{size:"n1",color:v.t.colors.gray600,children:H}),U&&(0,s.tZ)("a",{"data-event-category":"Reviewer Name","data-event-action":U,"data-event-label":"".concat((0,g.UC)($)).concat(V),href:V||"#",children:(0,s.tZ)(f.T,{size:"base",color:v.t.colors.gray800,weight:"semiBold",children:U})}),(z||(null==R?void 0:null===(t=R.expert)||void 0===t?void 0:t.specialty))&&(0,s.tZ)(f.T,{size:"n1",color:v.t.colors.gray600,children:"".concat((null==R?void 0:null===(l=R.expert)||void 0===l?void 0:l.specialty)&&(null==R?void 0:null===(w=R.expert)||void 0===w?void 0:w.specialty)).concat(z&&" \xb7 ".concat(z))})]}),q&&(0,s.tZ)(h.B,{size:"md",fullWidth:!0,type:"button","data-event-category":"Care","data-event-action":"Embedded Booking Button","data-event-label":Q,onClick:()=>window.location.href="/care/".concat(J,"/").concat(null==q?void 0:q.slug,"-").concat(null==q?void 0:q.id,"/"),children:Y({id:"articleAuthor.button",defaultMessage:"Book now"})})]}),(0,s.tZ)("hr",{className:"divider"}),(0,s.BX)(f.T,{className:"author",size:"n1",color:v.t.colors.gray600,style:{textAlign:F?"center":"left"},children:[!F&&(0,s.BX)(f.T,{as:"span",size:"n1",children:[Y({id:"articlePage.articleWrittenBy",defaultMessage:"Written by {name}"},{name:G?(0,s.tZ)("a",{"data-event-category":"Author Name","data-event-action":null==R?void 0:null===(E=R.author)||void 0===E?void 0:E.display_name,"data-event-label":"".concat((0,g.UC)($)).concat(G),href:G,children:(0,s.tZ)(f.T,{as:"span",size:"s5",color:v.t.colors.gray600,weight:"semiBold",children:null==R?void 0:null===(A=R.author)||void 0===A?void 0:A.display_name})}):(0,s.tZ)(f.T,{as:"span",size:"s5",color:v.t.colors.gray600,weight:"semiBold",children:null==R?void 0:null===(x=R.author)||void 0===x?void 0:x.display_name})})," ","\xb7"," "]}),Y({id:"articlePage.articleUpdatedDate",defaultMessage:"Updated {date}"},{date:(0,_.m)(D,$)})]})]})})),B=d.memo(withArticleAuthor(e=>{var t,l,w,E;let{reviewer:A,articleReviewed:x,author:Z,expert:R,updatedAt:N,title:B,name:D,location:H,reviewerUrl:U,authorUrl:z,shouldHideAuthor:V,avatar:G,badge:F,authorOnCare:W,...X}=e,{formatMessage:q}=(0,p.Z)(),{locale:K}=(0,b.h)(),Y=(0,y.U)(),$=(0,d.useMemo)(()=>{var e,t,l;return(null==W?void 0:W.type)==="service"?null===(e=m.a8[K])||void 0===e?void 0:e.SERVICE:(null==W?void 0:W.type)==="hospital"?null===(t=m.a8[K])||void 0===t?void 0:t.HOSPITAL:null===(l=m.a8[K])||void 0===l?void 0:l.DOCTOR},[null==W?void 0:W.type,K]);return(0,s.BX)(k,{"data-mobile":"true",...X,children:[(0,s.BX)("div",{className:"expert",children:[(0,s.tZ)("a",{"data-event-category":"Reviewer Name","data-event-action":D,"data-event-label":"".concat((0,g.UC)(K)).concat(U),href:U||"#",children:(0,s.tZ)(h.a,{src:G||(null==R?void 0:R.thumbnailAvatar)||(null==A?void 0:A.thumbnailAvatar)||(null==Z?void 0:Z.thumbnailAvatar),size:40,withIndicator:!!F,indicatorConfig:F?{size:16,label:(0,s.tZ)("img",{loading:"lazy",width:"16",height:"16",src:"".concat(m.Nr,"/article-").concat(F,".svg"),alt:""})}:void 0})}),(0,s.BX)(f.T,{size:"n1",color:v.t.colors.gray600,children:[B&&(0,s.tZ)(f.T,{as:"span",size:"n1",children:B})," ",D&&(0,s.tZ)("a",{"data-event-category":"Reviewer Name","data-event-action":D,"data-event-label":"".concat((0,g.UC)(K)).concat(U),href:U||"#",children:(0,s.tZ)(f.T,{as:"span",size:"s4",color:v.t.colors.gray800,weight:"semiBold",children:D})}),(null==x?void 0:null===(t=x.expert)||void 0===t?void 0:t.specialty)&&(0,s.BX)(f.T,{as:"span",size:"n1",color:v.t.colors.gray600,children:[" ","\xb7 ",x.expert.specialty]}),H&&(0,s.BX)(f.T,{as:"span",size:"n1",color:v.t.colors.gray600,children:[" ","\xb7 ",H]})]})]}),W&&(0,s.tZ)("a",{href:"/care/".concat($,"/").concat(null==W?void 0:W.slug,"-").concat(null==W?void 0:W.id,"/"),children:(0,s.tZ)(h.B,{size:"sm",fullWidth:!0,type:"button",mt:8,"data-event-category":"Care","data-event-action":"Embedded Booking Button","data-event-label":Y,children:q({id:"articleAuthor.button",defaultMessage:"Book now"})})}),(0,s.tZ)("hr",{className:"divider"}),(0,s.BX)(f.T,{className:"author",size:"n1",color:v.t.colors.gray600,style:{textAlign:V?"center":"left"},children:[!V&&(0,s.BX)(f.T,{as:"span",size:"n1",children:[q({id:"articlePage.articleWrittenBy",defaultMessage:"Written by {name}"},{name:z?(0,s.tZ)("a",{"data-event-category":"Author Name","data-event-action":null==x?void 0:null===(l=x.author)||void 0===l?void 0:l.display_name,"data-event-label":"".concat((0,g.UC)(K)).concat(z),href:z,children:(0,s.tZ)(f.T,{as:"span",size:"s4",color:v.t.colors.gray600,weight:"semiBold",children:null==x?void 0:null===(w=x.author)||void 0===w?void 0:w.display_name})}):(0,s.tZ)(f.T,{as:"span",size:"s4",color:v.t.colors.gray600,weight:"semiBold",children:null==x?void 0:null===(E=x.author)||void 0===E?void 0:E.display_name})})," ","\xb7"," "]}),q({id:"articlePage.articleUpdatedDate",defaultMessage:"Updated {date}"},{date:(0,_.m)(N,K)})]})]})})),D=d.memo(withArticleAuthor(e=>{var t;let{articleReviewed:l,title:d,name:m,updater:h,isExpertSameAsAuthor:f}=e,{formatMessage:g}=(0,p.Z)();return(0,s.BX)(x.K,{spacing:4,children:[!f&&(0,s.tZ)(A.T,{size:"p3",color:v.t.colors.gray600,children:g({id:"articlePage.articleWrittenBy",defaultMessage:"Written by {name}"},{name:(0,s.tZ)(A.T,{as:"span",size:"p3",color:v.t.colors.gray800,children:null==l?void 0:null===(t=l.author)||void 0===t?void 0:t.display_name})})}),(0,s.BX)(A.T,{size:"p3",color:v.t.colors.gray600,children:[d&&(0,s.tZ)(A.T,{as:"span",size:"p3",children:d})," ",m&&(0,s.tZ)(A.T,{as:"span",size:"p3",color:v.t.colors.gray800,children:m})]}),h&&!R()(h)&&(0,s.tZ)(A.T,{size:"p3",color:v.t.colors.gray600,children:g({id:"articlePage.history.updatedBy",defaultMessage:"Updated by: {name}"},{name:(0,s.tZ)(A.T,{as:"span",size:"p3",color:v.t.colors.gray800,children:null==h?void 0:h.displayName})})})]})}))},20877:function(e,t,l){"use strict";l.r(t),l.d(t,{ArticleCardWrapper:function(){return ArticleCardWrapper}});var s=l(35944),d=l(67294),p=l(90545),m=l(36380),v=l.n(m),h=l(41664),f=l.n(h),g=l(86896),y=l(97627),b=l(45683),_=l(46108),w=l(12237),E=l(11591),k=l(2251),A=l(83015),x=l(95386),Z=l(99285),R=l(24612),N=l(98926),B=l(29017),D=l(63116),H=l(10166),U=l(91344),z=l(15184);let V=(0,H.Z)("div",{target:"essgep40"})("position:relative;width:100%;height:100%;img{border-radius:50%;object-fit:cover;}.badge{position:absolute;right:0;bottom:0;display:flex;}"),G=(0,H.Z)("div",{target:"essgep41"})("width:12px;height:12px;"),F=(0,H.Z)(U.f,{target:"essgep42"})(".author .poster p span:not(.author-name){font-weight:400;}.author .poster p span:not(.name){color:",z.t.colors.gray800,";}.author-name{font-weight:600;}"),W=(0,H.Z)("div",{target:"essgep43"})("width:100%;height:100%;position:relative;");var X=l(71216);let ArticleCardWrapper=e=>{var t,l,m,h,H,U,z,q,K,Y;let{article:$,avatarImg:Q,authorName:J,authorLink:ee,title:et,text:en,disabledBadge:eo=!1,className:ei,uploadTime:er,isLazyLoad:ea,bannerImageWrapProps:el,authorImageWrapProps:es,banner:ec,hideBookmark:ed,dataEventCategoryForReviewer:eu,dataEventActionForReviewer:ep,...em}=e,{formatMessage:ev}=(0,g.Z)(),{state:{userInfo:eh},dispatch:ef}=(0,d.useContext)(B.I),eg=(0,A.d)(),{isLargeMobile:ey}=(0,Z.eI)(),{bookmarks:eb=[]}=eh||{},[e_,eC]=(0,d.useState)(-1!==eb.indexOf($.id)),[ew,eO]=(0,d.useState)(!1),{locale:eE=N.MV.PhilippinesEnglish}=(0,x.h)(),ek=(0,E.X4)($),bookmarkArticle=e=>{if(null==eh?void 0:eh.id)eC(e=>!e),e_?(async()=>{let{_status:t}=await(0,y.d)(b.y.SSO.DELETE_BOOKMARK,{method:"DELETE",data:{host_name:k.domainLocales[eE],post_ids:[e]}},"sso");1===t&&ef({type:X.H.REMOVE_BOOKMARKS,payload:{bookmarks:[e],bookmarkId:e}})})():(async()=>{let{_status:t,_data:l}=await(0,y.d)(b.y.SSO.CREATE_BOOKMARK,{method:"POST",data:{host_name:k.domainLocales[eE],post_ids:[e]}},"sso");1===t&&ef({type:X.H.ADD_BOOKMARKS,payload:{bookmarks:[e],bookmarkId:e,isFirstTimeBookmark:l.first_time_bookmark}})})();else{let t=window.location.href,l=encodeURIComponent("".concat(t).concat(t.includes("?")?"&":"?","source=bookmark,").concat(e));window.location.href=R.MO?"".concat(R.MO,"?returnUrl=").concat(l):t}},{reviewContent:eT,avatar:eI,badge:eP,avatarLink:eS}=(0,d.useMemo)(()=>{let{articleReviewed:e}=$;if(void 0!==e&&e){var t,l,d,p,m,v,h,f,g,y;let{fact_check:b,editor:_,is_author:w}=e;if(null==e?void 0:e.expert)return w?{reviewContent:ev({id:"articlePage.articleWrittenBy",defaultMessage:"Written by {name}"},{name:(0,s.tZ)("span",{className:"author-name",children:null==e?void 0:null===(t=e.expert)||void 0===t?void 0:t.display_name})}),avatar:(null==e?void 0:null===(l=e.expert)||void 0===l?void 0:l.avatar_thumbnail)||"",avatarLink:null==e?void 0:null===(d=e.expert)||void 0===d?void 0:d.profile_url,badge:(null==e?void 0:null===(p=e.expert)||void 0===p?void 0:p.role)||""}:{reviewContent:ev({id:(null==e?void 0:null===(m=e.expert)||void 0===m?void 0:m.role)==="medical"?"articlePage.reviewed.medically":"articlePage.reviewed.expertly"},{name:(0,s.tZ)("span",{className:"author-name",children:null==e?void 0:null===(v=e.expert)||void 0===v?void 0:v.display_name})}),avatar:(null==e?void 0:null===(h=e.expert)||void 0===h?void 0:h.avatar_thumbnail)||"",avatarLink:null==e?void 0:null===(f=e.expert)||void 0===f?void 0:f.profile_url,badge:(null==e?void 0:null===(g=e.expert)||void 0===g?void 0:g.role)||""};{let t=_&&(null==_?void 0:_.user_id)!==(null==e?void 0:null===(y=e.author)||void 0===y?void 0:y.user_id)?_:b;return{reviewContent:ev({id:"articlePage.reviewed.factCheck"},{name:(0,s.tZ)("span",{className:"author-name",children:null==t?void 0:t.display_name})}),avatar:(null==t?void 0:t.avatar_thumbnail)||"",avatarLink:null==t?void 0:t.profile_url,badge:"fact-check"}}}return{reviewContent:null,avatar:null,avatarLink:null,badge:null}},[]);(0,d.useEffect)(()=>{eO(!ed)},[]),(0,d.useEffect)(()=>{eC(-1!==eb.indexOf($.id))},[eb.length]);let eA=eS||ee||ek.permalink,ex=eA.startsWith("http")?eA:"".concat((0,p.g)(eE)).concat(eA),eM=(0,s.tZ)(F,{isPremium:$.isPremium,isMobile:eg,className:ei,dataEventCategoryForBookmark:"Bookmark",dataEventActionForBookmark:"Click",dataEventLabelForBookmark:"https://".concat(k.domainLocales[eE]).concat($.permalink),hasAffiliate:$.hasAffiliate,articleLink:$.permalink,categoryLink:$.category.permalink||"#",categoryName:(null===(t=$.category)||void 0===t?void 0:t.displayName)||(null===(l=$.category)||void 0===l?void 0:l.name)||(null===(h=$.categories)||void 0===h?void 0:null===(m=h[0])||void 0===m?void 0:m.displayName)||(null===(U=$.categories)||void 0===U?void 0:null===(H=U[0])||void 0===H?void 0:H.name)||"",banner:ec||(0,s.tZ)(_.R,{src:(eg?$.featureImageMobile:$.featureImage)||$.featureImage||R.YS,layout:"fill",alt:$.postName,...el}),specialty:(null===(z=$.expert)||void 0===z?void 0:z.specialty)||(null===(q=$.author)||void 0===q?void 0:q.specialty),...em,uploadTime:(0,D.m)(er||$.modifiedTime,eE)||er||$.modifiedTime,title:v()(et||$.postTitle||$.postName||"")||"",text:void 0!==en?v()(en||""):$.excerpt||$.description||$.postContent?v()($.excerpt||$.description||(null===(K=$.postContent)||void 0===K?void 0:K.split("\r\n")[0])||""):"",avatarImg:(0,s.tZ)(f(),{href:eA,className:"pointer-event-child-none","data-event-category":eu,"data-event-action":ep,"data-event-label":ex,children:(0,s.BX)(V,{children:[(0,s.tZ)(W,{children:Q||(0,s.tZ)(_.R,{className:"avatar",src:eI||ek.avatar||R.DP,alt:eI?ev({id:"articlePage.authorAvatarAlt"}):ek.name,..."lg"!==em.size||eg||ey?{width:24,height:24}:{width:32,height:32},placeholder:void 0,blurDataURL:void 0,...es})}),!eo&&eP&&(0,s.tZ)(G,{className:"badge",children:(0,s.tZ)("img",{src:"".concat(R.Nr,"/reviewer-").concat(eP,".svg"),loading:"lazy",alt:"badge",width:12,height:12})})]})}),authorName:(0,s.tZ)("span",{"data-event-category":eu,"data-event-action":ep,"data-event-label":ex,className:"pointer-event-child-none",children:eT||J||ev({id:"expert"===ek.type?"articlePage.articleWrittenBy":"articlePage.articleReviewerBy"},{name:ek.name})}),authorLink:"".concat(R.sb).concat(eS||ee||ek.permalink),isBookmarkDisplayed:ew,isBookmark:e_,onBookmark:()=>bookmarkArticle($.id),styleLabel:{color:(null===(Y=$.category)||void 0===Y?void 0:Y.textColor)||"#008C50",...em.styleLabel}});return ea?(0,s.tZ)(w.Z,{placeholder:(0,s.BX)("div",{style:{opacity:0,pointerEvents:"none",height:180},children:[(0,s.tZ)("a",{href:"".concat(R.sb).concat(eS||ee||ek.permalink),children:"".concat(R.sb).concat(eS||ee||ek.permalink)}),(0,s.tZ)("a",{href:eS||"https://".concat(k.domainLocales[eE]).concat(ee||ek.permalink),children:(0,s.tZ)("img",{"data-src":eI||"",alt:ek.name})}),(0,s.tZ)("div",{children:eT||J||ev({id:"expert"===ek.type?"articlePage.articleWrittenBy":"articlePage.articleReviewerBy"},{name:ek.name})}),(0,s.BX)("a",{href:em.articleLink,children:[(0,s.tZ)("img",{"data-src":$.featureImage,alt:$.postTitle}),(0,s.tZ)("img",{"data-src":$.featureImageMobile,alt:$.postTitle}),(0,s.tZ)("img",{"data-src":$.featureImageMobileXs,alt:$.postTitle}),(0,s.tZ)("div",{children:em.categoryName}),(0,s.tZ)("div",{children:er}),(0,s.tZ)("div",{children:et||""}),(0,s.tZ)("div",{children:en||""})]})]}),children:eM}):eM}},61408:function(e,t,l){"use strict";l.d(t,{m:function(){return Tabs}});var s=l(35944),d=l(67294),p=l(13023),m=l(63431),v=l(82729),h=l(7259),f=l(72660);function _templateObject(){let e=(0,v._)(["\n display: inline-flex;\n max-width: 100%;\n border-bottom: 1px solid\n ",";\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: hidden;\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,v._)(["\n display: flex;\n\n align-items: center;\n padding-bottom: 4px;\n\n "," {\n height: 37px;\n }\n\n "," {\n height: 35px;\n }\n\n p {\n color: ",";\n white-space: nowrap;\n }\n\n &:not(:last-child) {\n margin-right: 24px;\n }\n\n &[data-is-tab-active] {\n p {\n color: ",";\n }\n border-bottom: 3px solid\n ",";\n margin-bottom: -1px;\n }\n\n &:not([data-is-tab-active]) {\n cursor: pointer;\n }\n"]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,v._)(["\n display: flex;\n align-items: center;\n"]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,v._)(["\n margin-right: 8px;\n"]);return _templateObject3=function(){return e},e}let g=f.ZP.ul.withConfig({componentId:"sc-5a785d23-0"})(_templateObject(),e=>{var t;return null===(t=e.theme)||void 0===t?void 0:t.colors.neutral100}),y=f.ZP.li.withConfig({componentId:"sc-5a785d23-1"})(_templateObject1(),h.M.mbDown,h.M.mbUp,e=>{var t;return null===(t=e.theme)||void 0===t?void 0:t.colors.gray400},e=>{var t;return null===(t=e.theme)||void 0===t?void 0:t.colors.primaryBase},e=>{var t;return null===(t=e.theme)||void 0===t?void 0:t.colors.primaryBase}),b=f.ZP.div.withConfig({componentId:"sc-5a785d23-2"})(_templateObject2()),_=f.ZP.div.withConfig({componentId:"sc-5a785d23-3"})(_templateObject3()),Tabs=e=>{let{style:t,initialTab:l,tabContent:v,onChange:h,className:f}=e,[w,E]=(0,d.useState)(l||0),k=(0,m.Me)(v.length);return(0,d.useEffect)(()=>{E(l)},[l]),(0,s.tZ)(g,{style:t,className:f,children:v.map((e,t)=>(0,s.tZ)(y,{"data-is-tab-active":w===t||void 0,onClick:()=>{E(t),h&&h(t)},children:(0,s.BX)(b,{children:[e.icon&&(0,s.tZ)(_,{children:e.icon}),(0,s.tZ)(p.T,{size:"sm",type:"bold",children:(0,s.tZ)("a",{"data-event-category":e.dataEventCategory,"data-event-action":e.dataEventAction,"data-event-label":e.dataEventLabel,className:"pointer-event-child-none",children:e.name})})]})},k[t]))})}},92773:function(e,t,l){"use strict";l.d(t,{k$:function(){return getLocation},k5:function(){return carePostMessage}});var s=l(5152),d=l.n(s);l(73577),d()(()=>Promise.all([l.e(429),l.e(8644),l.e(5513),l.e(3253),l.e(2751),l.e(1845),l.e(6948)]).then(l.bind(l,51845)),{loadableGenerated:{webpack:()=>[51845]}}),d()(()=>Promise.all([l.e(429),l.e(8644),l.e(5513),l.e(3253),l.e(2751),l.e(9121),l.e(4058)]).then(l.bind(l,89121)),{loadableGenerated:{webpack:()=>[89121]}});let carePostMessage=(e,t,l)=>{"self"===e.targetWindow?window.postMessage(e,t||"*",l):window.parent.postMessage(e,t||"*",l)},getLocation=()=>new Promise((e,t)=>{navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition(t=>{e({longitude:t.coords.longitude,latitude:t.coords.latitude})},e=>{console.log("Getting location failed:",e.message),t()},{timeout:3e4,maximumAge:0}):t()})},91601:function(e,t,l){"use strict";l.d(t,{h:function(){return useCity}});var s=l(67294),d=l(97627),p=l(45683),m=l(92773);let useCity=function(e,t,l,v){let h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",[f,g]=(0,s.useState)(!1),[y,b]=(0,s.useState)([]),_=(0,s.useRef)([]),[w,E]=(0,s.useState)(!0),k=(0,s.useCallback)(()=>{b(_.current)},[]);return(0,s.useEffect)(()=>{e&&(async()=>{try{g(!0);let e=await(0,d.d)(p.y.CARE.GET_CARE_GEOBYIP,void 0,"care");if(null==e?void 0:e._data){let{default:l={},cities:s}=e._data;b(s||[]),_.current=s;let d=v?s.find(e=>e.id===v):l;null==t||t("selected_city",{...d,value:d.id,label:d.name})}}catch(e){}finally{g(!1)}})()},[e,v]),(0,s.useEffect)(()=>{h&&""!==h&&h.length>=3?(async()=>{try{g(!0);let e=await(0,d.d)(p.y.CARE.GET_CARE_CITY_LIST,{params:{keyword:h}},"care");if(null==e?void 0:e._data){let{cities:t}=e._data;b(t||[])}}catch(e){}finally{g(!1)}})():b(_.current)},[h]),(0,s.useEffect)(()=>{e&&(async()=>{g(!0);try{if((null==l?void 0:l.value)===0){let e={latitude:"",longitude:""};try{e=await(0,m.k$)(),E(!0)}catch(e){E(!1)}let l=await(0,d.d)(p.y.CARE.GET_CARE_GEOBYIP,{params:e},"care");if(null==l?void 0:l._data){let{default:e={}}=l._data;null==t||t("selected_city",{...e,value:e.id,label:e.name})}}}catch(e){}finally{g(!1)}})()},[null==l?void 0:l.value]),{loading:f,permission:w,setCityLoading:g,cityList:y,onFocus:k}}},73577:function(e,t,l){"use strict";var s,d,p,m,v,h;l.d(t,{jE:function(){return p},yU:function(){return s}}),(m=s||(s={}))[m.DOCTOR=0]="DOCTOR",m[m.SERVICE=1]="SERVICE",(v=d||(d={}))[v.GRANTED=0]="GRANTED",v[v.DENIED=1]="DENIED",v[v.UNSUPPORTED=2]="UNSUPPORTED",(h=p||(p={}))[h.DEFAULT=0]="DEFAULT",h[h.SEARCH=1]="SEARCH"},44038:function(e,t,l){"use strict";l.d(t,{z:function(){return TogetherCommentPopup},p:function(){return TogetherCommentPopupContext}});var s=l(35944),d=l(67294),p=l(18618),m=l(50722),v=l(92935),h=l(86896),f=l(76248),g=l(97627),y=l(94189),b=l(45683),_=l(50667),w=l(82729),E=l(7259),k=l(72660);function _templateObject(){let e=(0,w._)(["\n position: absolute;\n right: 0;\n background-color: ",";\n\n &[data-animation='true'] {\n transition: all 0.5s ease-in-out;\n }\n\n &[data-open='true'] {\n z-index: 310;\n top: 120%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n display: none;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='welcome'] {\n position: fixed;\n "," {\n width: 100%;\n height: 424px;\n bottom: 0;\n top: unset;\n }\n "," {\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n min-height: 445px;\n max-width: 407px;\n }\n }\n\n &[data-type='due-date'] {\n position: fixed;\n z-index: 202;\n "," {\n width: 100%;\n height: 100%;\n overflow-y: scroll;\n bottom: 0;\n top: unset;\n }\n "," {\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100vw;\n height: 55vw;\n max-height: 598px;\n max-width: 1080px;\n }\n .close-button {\n margin-top: 5px;\n }\n }\n\n .popup-content {\n z-index: 111;\n height: 100%;\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n }\n\n &[data-type='confirm'] {\n width: 380px;\n height: 252px;\n }\n\n &[data-type='profile'] {\n "," {\n border-radius: ",";\n box-shadow: 0px 4px 8px\n ",";\n &:before {\n position: absolute;\n right: 11px;\n bottom: 100%;\n width: 0;\n height: 0;\n border: 0.5rem solid transparent;\n border-top: none;\n border-bottom-color: #fff;\n content: '';\n filter: drop-shadow(0 -0.0625rem 0.0625rem rgba(0, 0, 0, 0.1));\n }\n }\n "," {\n position: fixed;\n left: 0;\n top: 69px;\n width: 100%;\n }\n "," {\n width: 368px;\n }\n }\n\n .close-button {\n position: absolute;\n top: 0;\n right: 0;\n width: 32px;\n height: 32px;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,w._)(["\n position: fixed;\n z-index: 150;\n top: 69px;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n\n "," {\n &[data-type='welcome'] {\n background: rgba(38, 38, 38, 0.3);\n }\n &[data-type='due-date'] {\n background: rgba(38, 38, 38, 0.3);\n }\n &[data-type!='welcome'] {\n background-color: transparent;\n }\n }\n\n "," {\n background: rgba(38, 38, 38, 0.3);\n }\n\n &[data-open='false'] {\n display: none;\n }\n\n &[data-type='welcome'] {\n top: 0;\n }\n\n &[data-type='due-date'] {\n z-index: 201;\n top: 0;\n }\n"]);return _templateObject1=function(){return e},e}let A=k.ZP.div.withConfig({componentId:"sc-60c7a9e6-0"})(_templateObject(),e=>{var t;return null===(t=e.theme)||void 0===t?void 0:t.colors.white},E.M.mbDown,E.M.mbUp,E.M.mbDown,E.M.mbUp,E.M.mbUp,e=>{var t;return null===(t=e.theme)||void 0===t?void 0:t.borderRadius},e=>{var t;return null===(t=e.theme)||void 0===t?void 0:t.colors.gray200},E.M.mbDown,E.M.mbUp),x=k.ZP.div.withConfig({componentId:"sc-60c7a9e6-1"})(_templateObject1(),E.M.mbUp,E.M.mbDown),Popup=e=>{let{type:t="lead",closeIcon:l,isOpen:d=!0,onClose:p,children:m,enableAnimation:v=!0,targetAvatar:h,id:f,className:g}=e;return(0,s.BX)(s.HY,{children:[(0,s.tZ)(A,{"data-open":d,"data-type":t,"data-animation":v,"data-target":h,id:f,className:g,children:(0,s.BX)("div",{className:"popup-content",children:[!!l&&(0,s.tZ)("div",{className:"close-button",onClick:p,children:l}),m]})}),(0,s.tZ)(x,{"data-type":t,"data-open":d,onClick:p,id:f?"wrapper-".concat(f):void 0,className:"".concat(g||"","-wrapper")})]})};var Z=l(20868),R=l(83015),N=l(24612),B=l(12159),D=l(79364),H=l(50176),U=l(74360),z=l(48104),V=l(37847),G=l(16372),F=l(51655),W=l(15184);function index_styled_templateObject(){let e=(0,w._)(["\n .popup-comment-danger {\n .popup-frame {\n > [data-open='true'][data-type='confirm'] {\n z-index: 600;\n }\n }\n }\n .post-reaction {\n padding: 8px 16px;\n }\n"]);return index_styled_templateObject=function(){return e},e}function index_styled_templateObject1(){let e=(0,w._)(["\n position: fixed;\n z-index: 100;\n top: 0;\n height: 100%;\n display: flex;\n flex-direction: column;\n width: 100vw;\n\n max-width: 436px;\n right: 0;\n box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),\n 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),\n 0px 0px 1px rgba(0, 0, 0, 0.04);\n "," {\n left: 0;\n max-width: 100vw;\n }\n\n background: white;\n overflow-y: scroll;\n ::-webkit-scrollbar {\n display: none;\n }\n .create-edit-container {\n width: 100%;\n background: white;\n flex: 1;\n overflow-y: auto;\n }\n"]);return index_styled_templateObject1=function(){return e},e}function _templateObject2(){let e=(0,w._)(["\n display: flex;\n width: 100%;\n height: 64px;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n border-bottom: 1px solid ",";\n background-color: white;\n\n "," {\n max-width: 436px;\n }\n .comment-popup-back-button {\n position: absolute;\n left: 16px;\n .button-back {\n line-height: 10px;\n width: 24px;\n height: 24px;\n img {\n width: 1rem;\n height: 1rem;\n }\n }\n }\n"]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,w._)(["\n position: absolute;\n right: 16px;\n .button-close {\n line-height: 10px;\n }\n"]);return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,w._)(["\n width: 100%;\n flex: 1;\n overflow-y: auto;\n background: ",";\n"]);return _templateObject4=function(){return e},e}function _templateObject5(){let e=(0,w._)(["\n display: flex;\n justify-content: space-between;\n margin-bottom: 12px;\n cursor: pointer;\n min-height: 40px;\n\n * {\n pointer-events: none;\n }\n .button-reply-comment {\n width: 40px;\n height: 40px;\n padding: 10px;\n line-height: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n &[data-size='md'] {\n padding: 10px;\n line-height: 0;\n }\n }\n .input-reply-icon {\n width: 24px;\n height: 24px;\n margin-top: auto;\n margin-bottom: auto;\n margin-right: 8px;\n }\n .input-reply-comment {\n margin-right: 8px;\n margin-top: auto;\n margin-bottom: auto;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.5;\n color: ",";\n }\n svg {\n top: 25px;\n width: 20px;\n height: 20px;\n }\n"]);return _templateObject5=function(){return e},e}function _templateObject6(){let e=(0,w._)(["\n display: flex;\n padding: 0 8px;\n flex: 1;\n border: solid 1px ",";\n border-radius: ",";\n margin-left: 8px;\n /* set min width here to prevent overflow horizontal */\n min-width: 0;\n\n &[data-is-focus] {\n padding: 0 0 0 8px;\n border-color: ",";\n box-shadow: 0px 0px 2px 2px ",";\n }\n"]);return _templateObject6=function(){return e},e}function _templateObject7(){let e=(0,w._)(["\n width: 100%;\n padding: 16px;\n background: white;\n\n "," {\n max-width: 436px;\n }\n .join-or-login {\n --text-color: var(--custom-color, #262626);\n color: var(--text-color);\n\n font-size: 14px;\n line-height: 22px;\n\n "," {\n font-size: 16px;\n line-height: 24px;\n }\n\n a {\n color: ",";\n cursor: pointer;\n text-decoration: none;\n }\n }\n"]);return _templateObject7=function(){return e},e}function _templateObject8(){let e=(0,w._)(["\n height: 100%;\n &[data-current-tab='popular'] {\n padding: 1rem 0 0 0;\n }\n &[data-current-tab='allComments'] {\n padding: 1rem 0 0 0;\n }\n .view-more-button {\n width: 100%;\n }\n"]);return _templateObject8=function(){return e},e}function _templateObject9(){let e=(0,w._)(["\n display: grid;\n grid-gap: 15px;\n padding: 1rem;\n"]);return _templateObject9=function(){return e},e}function _templateObject10(){let e=(0,w._)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding-left: 16px;\n padding-right: 16px;\n text-align: center;\n height: 100%;\n\n .empty-comment-icon {\n width: 80px;\n height: 80px;\n }\n\n .title {\n margin-top: 32px;\n color: ",";\n }\n\n .description {\n margin-top: 8px;\n color: ",";\n }\n\n .login-button {\n border-color: ",";\n margin-top: 36px;\n color: ",";\n }\n"]);return _templateObject10=function(){return e},e}function _templateObject11(){let e=(0,w._)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n .description {\n color: ",";\n }\n\n .login-button {\n border-color: ",";\n margin-top: 16px;\n color: ",";\n }\n"]);return _templateObject11=function(){return e},e}function _templateObject12(){let e=(0,w._)(["\n overflow: hidden;\n flex: 1;\n display: flex;\n flex-direction: column;\n\n .tab-comment-popup {\n z-index: 10;\n width: 100%;\n padding-left: 1rem;\n "," {\n max-width: 426px;\n }\n background-color: white;\n\n li {\n div {\n p {\n font-size: 13px;\n font-weight: 600;\n }\n }\n &[data-is-tab-active='true'] {\n border-bottom-width: 2px;\n div {\n p {\n font-weight: 700;\n }\n }\n }\n }\n }\n"]);return _templateObject12=function(){return e},e}function _templateObject13(){let e=(0,w._)([""]);return _templateObject13=function(){return e},e}function _templateObject14(){let e=(0,w._)(["\n display: flex;\n"]);return _templateObject14=function(){return e},e}function _templateObject15(){let e=(0,w._)(["\n display: flex;\n flex-direction: column;\n /* align-items: center; */\n justify-content: center;\n"]);return _templateObject15=function(){return e},e}let X=k.ZP.div.withConfig({componentId:"sc-77fc8647-0"})(index_styled_templateObject()),q=k.ZP.div.withConfig({componentId:"sc-77fc8647-1"})(index_styled_templateObject1(),E.M.mbDown),K=k.ZP.div.withConfig({componentId:"sc-77fc8647-2"})(_templateObject2(),W.t.colors.neutral100,E.M.mbUp),Y=k.ZP.div.withConfig({componentId:"sc-77fc8647-3"})(_templateObject3()),$=k.ZP.div.withConfig({componentId:"sc-77fc8647-4"})(_templateObject4(),W.t.colors.neutral50),Q=k.ZP.div.withConfig({componentId:"sc-77fc8647-5"})(_templateObject5(),W.t.colors.gray400),J=k.ZP.div.withConfig({componentId:"sc-77fc8647-6"})(_templateObject6(),W.t.colors.gray200,W.t.borderRadius,W.t.colors.primaryBase,W.t.colors.primary200),ee=k.ZP.div.withConfig({componentId:"sc-77fc8647-7"})(_templateObject7(),E.M.mbUp,E.M.mbUp,W.t.colors.primaryActive),et=k.ZP.div.withConfig({componentId:"sc-77fc8647-8"})(_templateObject8()),en=k.ZP.div.withConfig({componentId:"sc-77fc8647-9"})(_templateObject9()),eo=k.ZP.div.withConfig({componentId:"sc-77fc8647-10"})(_templateObject10(),W.t.colors.gray800,W.t.colors.gray500,W.t.colors.primaryActive,W.t.colors.primaryActive),ei=k.ZP.div.withConfig({componentId:"sc-77fc8647-11"})(_templateObject11(),W.t.colors.gray500,W.t.colors.primaryActive,W.t.colors.primaryActive),er=k.ZP.div.withConfig({componentId:"sc-77fc8647-12"})(_templateObject12(),E.M.mbUp),ea=k.ZP.div.withConfig({componentId:"sc-77fc8647-13"})(_templateObject13()),el=k.ZP.div.withConfig({componentId:"sc-77fc8647-14"})(_templateObject14()),es=k.ZP.div.withConfig({componentId:"sc-77fc8647-15"})(_templateObject15()),CardCommentSkeleton=()=>(0,s.BX)(ea,{children:[(0,s.BX)(el,{children:[(0,s.tZ)(F.ZP,{circle:!0,height:32,width:32,style:{marginRight:"10px"}}),(0,s.BX)(es,{children:[(0,s.tZ)(F.ZP,{height:10,width:100}),(0,s.tZ)(F.ZP,{height:10,width:60})]})]}),(0,s.tZ)(F.ZP,{style:{marginTop:"8px"},count:5})]}),CommentDetail=e=>{let{post:t,openEditPostPopup:l,cityId:v}=e,{setCareType:y,setOpenQuickBookingDrawer:_,setData:w}=(0,V.B)(e=>e,f.X),[E,k]=(0,d.useState)(!1),[A,x]=(0,d.useState)(t||null),[Z,N]=(0,d.useState)(!1),{formatMessage:B}=(0,h.Z)(),D=(0,R.d)(),H=[{label:B({id:"commentPopup.choicePopover.latest",defaultMessage:"Latest"}),value:"newest"},{label:B({id:"commentPopup.choicePopover.oldest",defaultMessage:"Oldest"}),value:"oldest"}],[F,W]=(0,d.useState)({label:B({id:"commentPopup.choicePopover.latest",defaultMessage:"Latest"}),value:"newest"}),[X,q]=(0,d.useState)([]),K=(0,d.useRef)(null),[Y,Q]=(0,d.useState)({current:0,first:1,last:1,next:1,prev:1,total_items:0,items_per_page:10}),fetchMoreComments=async(e,t)=>{if(!E&&(null==A?void 0:A.id)){k(!0);try{var l,s,d,p;let m=await(0,g.d)(b.y.TOGETHER.GET_TOGETHER_POST_COMMENT,{params:{postId:A.id,sort:t||"newest",page:void 0!==e?e:Y.next}},"together");1===e?q((null==m?void 0:null===(p=m.data)||void 0===p?void 0:null===(d=p.comments)||void 0===d?void 0:null===(s=d.map)||void 0===s?void 0:s.call(d,U.d.formatComment))||[]):q(e=>{var t,l,s;return e.concat((null==m?void 0:null===(s=m.data)||void 0===s?void 0:null===(l=s.comments)||void 0===l?void 0:null===(t=l.map)||void 0===t?void 0:t.call(l,U.d.formatComment))||[])}),Q(null==m?void 0:null===(l=m.data)||void 0===l?void 0:l.pagination)}catch(e){console.log(e)}k(!1)}},fetchPost=async e=>{var t;let l=await(0,g.d)(b.y.TOGETHER.GET_TOGETHER_POST_DETAIL,{params:{idOrSlug:e}},"together");(null==l?void 0:null===(t=l.data)||void 0===t?void 0:t.id)&&(x(U.d.formatPost(null==l?void 0:l.data)),N(e=>!e))};if((0,d.useEffect)(()=>{fetchMoreComments(1)},[null==A?void 0:A.id]),(0,d.useEffect)(()=>{(null==t?void 0:t.id)&&fetchPost(t.id)},[t.id]),!A)return(0,s.tZ)(z.L,{});let handleMakeAppointment=async(e,t)=>{if(e){let t=await(0,g.d)(b.y.CARE.GET_DOCTOR_DETAIL,{params:{id:e}},"care"),l=t._data.doctor,s={cityId:v||0,specialty:l.specialties[0],doctor:l,hospital:l.hospital_branch};y(G.y.DOCTOR),w(s),_(!0)}if(t){var l,s,d,p,m,h;let e=await(0,g.d)(b.y.CARE.GET_HOSPITAL_DETAIL,{params:{id:t}},"care"),f=e._data.branch,E=await(0,g.d)(b.y.CARE.GET_BRANCH_DETAIL,{params:{id:t,type:f.total_available_doctor>0?"doctor":"service"}},"care"),k=null==E?void 0:null===(l=E._data)||void 0===l?void 0:l.searches;if(null==k?void 0:k[0]){if(f.total_available_doctor>0){let e={cityId:v||0,specialty:k[0].specialties_transform[0],doctor:k[0],hospital:k[0].hospital_branch};y(G.y.DOCTOR),w(e),_(!0)}else if(f.total_available_service>0){let e={cityId:v||0,serviceType:{id:k[0].service_id,name:k[0].name,logo:k[0].logo,slug:k[0].slug},service:{id:null===(s=k[0].hospital_branch)||void 0===s?void 0:s.id,name:null===(d=k[0].hospital_branch)||void 0===d?void 0:d.name,logo:null===(p=k[0].hospital_branch)||void 0===p?void 0:p.logo,price:null===(m=k[0].hospital_branch)||void 0===m?void 0:m.price,priceUnit:(null===(h=k[0].hospital_branch)||void 0===h?void 0:h.price_unit)||"",serviceId:k[0].id}};y(G.y.SERVICE),w(e),_(!0)}}}};return(0,s.tZ)(er,{children:(0,s.tZ)($,{children:(0,s.BX)(et,{children:[(0,s.tZ)(p.B,{hasQuickBookingEnable:!0,handleMakeAppointment:handleMakeAppointment,post:{...A,isPin:!1},style:{marginBottom:8},onCommentCountClick:()=>{var e;return null===(e=K.current)||void 0===e?void 0:e.scrollIntoView()},onDeletePost:()=>!1,onEditPost:()=>l&&l(A),onPostCommentSuccess:e=>{(null==F?void 0:F.value)==="oldest"?q(t=>t.concat(e)):q(t=>[e].concat(t))}},"".concat(A.id,"-").concat(Z)),E?(0,s.tZ)("div",{style:{padding:"1rem"},children:(0,s.BX)(en,{children:[(0,s.tZ)(CardCommentSkeleton,{}),(0,s.tZ)(CardCommentSkeleton,{}),(0,s.tZ)(CardCommentSkeleton,{})]})}):(null==X?void 0:X.length)?(0,s.BX)(s.HY,{children:[(0,s.tZ)("div",{className:"sort-container",ref:K,children:(0,s.tZ)(p.e,{value:null==F?void 0:F.value,onChange:e=>{e!==(null==F?void 0:F.value)&&(W(H.find(t=>t.value===e)),fetchMoreComments(1,e))},className:"label-sorting",leftLabel:D?(null==F?void 0:F.label)||"":B({id:"commentPopup.comment.count",defaultMessage:"{count} comments"},{count:A.commentsCount}),rightLabel:D?B({id:"commentPopup.choicePopover.sort",defaultMessage:"Sort"}):(null==F?void 0:F.label)||"",choices:H})}),(0,s.BX)("div",{style:{padding:"0 1rem 1rem"},children:[X.map(e=>(0,s.tZ)(p.E,{hasQuickBookingEnable:!0,handleMakeAppointment:handleMakeAppointment,className:"post-comment",post:A,comment:e,style:{marginBottom:8},onDeleteComment:()=>{q(t=>t.filter(t=>t.id!==e.id)),Q(e=>({...e,total_items:e.total_items-1}))},refetchComment:async e=>{q(t=>{let l=t.findIndex(t=>t.id===e.id);return t.splice(l,1,e),t.slice()})},disableShortenContent:!0},e.id)),Y.currentfetchMoreComments(Y.current+1),className:"view-more-button",children:B({id:"commentPopup.comment.seeMoreComments",defaultMessage:"See {count} more comments"},{count:Y.current+1===Y.last?Y.total_items-Y.items_per_page*Y.current:Y.items_per_page})}):null]})]}):null]})})})};var ec=l(13023),ed=l(61408),eu=l(29017);let CommentList=e=>{let{articleId:t,redirectUrl:l,openCreatePostPopup:y,openEditPostPopup:w,openPostDetail:E,cityId:k}=e,A=(0,Z.U)(),[x,R]=(0,d.useState)(!1),{currentArticle:B,setTotalComment:H}=(0,D.WM)(e=>({currentArticle:e.currentArticle,setTotalComment:e.setTotalComment,totalComment:e.totalComment}),f.X),{formatMessage:z}=(0,h.Z)(),F=[{name:z({id:"commentPopup.tabs.all"}),key:"allComments",dataEventCategory:"Ask Doctor",dataEventAction:"All Post Click",dataEventLabel:A},{name:z({id:"commentPopup.tabs.popular"}),key:"popular",dataEventCategory:"Ask Doctor",dataEventAction:"Trending Post Click",dataEventLabel:A}],[W,X]=(0,d.useState)(F[0]),{state:q}=(0,d.useContext)(eu.I)||{},{setCareType:K,setOpenQuickBookingDrawer:Y,setData:ea}=(0,V.B)(e=>e,f.X),{userInfo:el}=q||{},es=!!(null==el?void 0:el.id),[ep,em]=(0,d.useState)([]),[ev,eh]=(0,d.useState)(null),fetchMorePosts=async e=>{if(t&&!x){R(!0);try{var l,s,d,p;let m=await(0,g.d)(b.y.TOGETHER.GET_TOGETHER_POST_LIST,{params:{articleId:String(t),sortBy:"allComments"===W.key?"newest":"popularity",page:void 0!==e?e:(null==ev?void 0:ev.next)||1}},"together");1===e?em((null==m?void 0:null===(p=m.data)||void 0===p?void 0:null===(d=p.posts)||void 0===d?void 0:null===(s=d.map)||void 0===s?void 0:s.call(d,U.d.formatPost))||[]):em(e=>{var t,l,s;return e.concat((null==m?void 0:null===(s=m.data)||void 0===s?void 0:null===(l=s.posts)||void 0===l?void 0:null===(t=l.map)||void 0===t?void 0:t.call(l,U.d.formatPost))||[])}),eh(null==m?void 0:null===(l=m.data)||void 0===l?void 0:l.pagination)}catch(e){console.log(e)}R(!1)}};(0,d.useEffect)(()=>{(null==B?void 0:B.id)===t&&ev&&H((null==ev?void 0:ev.total_items)||0)},[null==ev?void 0:ev.total_items,null==B?void 0:B.id,t]),(0,d.useEffect)(()=>{(null==B?void 0:B.id)===t&&fetchMorePosts(1)},[W.key,t,null==B?void 0:B.id]);let goToLogin=()=>{var e,t;(0,_.p0)(A+"?commentsExpanded=1","","articlecomment",(null==B?void 0:null===(e=B.primaryCategory)||void 0===e?void 0:e.permalink)||(null==B?void 0:null===(t=B.categories[0])||void 0===t?void 0:t.permalink)||void 0)},handleMakeAppointment=async(e,t)=>{if(e){let t=await(0,g.d)(b.y.CARE.GET_DOCTOR_DETAIL,{params:{id:e}},"care"),l=t._data.doctor,s={cityId:k||0,specialty:l.specialties[0],doctor:l,hospital:l.hospital_branch};K(G.y.DOCTOR),ea(s),Y(!0)}if(t){var l,s,d,p,m,v;let e=await(0,g.d)(b.y.CARE.GET_HOSPITAL_DETAIL,{params:{id:t}},"care"),h=e._data.branch,f=await(0,g.d)(b.y.CARE.GET_BRANCH_DETAIL,{params:{id:t,type:h.total_available_doctor>0?"doctor":"service"}},"care"),y=null==f?void 0:null===(l=f._data)||void 0===l?void 0:l.searches;if(null==y?void 0:y[0]){if(h.total_available_doctor>0){let e={cityId:k||0,specialty:y[0].specialties_transform[0],doctor:y[0],hospital:y[0].hospital_branch};K(G.y.DOCTOR),ea(e),Y(!0)}else if(h.total_available_service>0){let e={cityId:k||0,serviceType:{id:y[0].service_id,name:y[0].name,logo:y[0].logo,slug:y[0].slug},service:{id:null===(s=y[0].hospital_branch)||void 0===s?void 0:s.id,name:null===(d=y[0].hospital_branch)||void 0===d?void 0:d.name,logo:null===(p=y[0].hospital_branch)||void 0===p?void 0:p.logo,price:null===(m=y[0].hospital_branch)||void 0===m?void 0:m.price,priceUnit:(null===(v=y[0].hospital_branch)||void 0===v?void 0:v.price_unit)||"",serviceId:y[0].id}};K(G.y.SERVICE),ea(e),Y(!0)}}}};return(0,s.BX)(er,{children:[ep&&(null==ep?void 0:ep.length)>0&&(0,s.tZ)(ed.m,{initialTab:0,onChange:e=>X(F[e]),tabContent:F,className:"tab-comment-popup"}),(0,s.tZ)($,{children:(0,s.tZ)(et,{"data-current-tab":W.key,children:x?(0,s.BX)(en,{children:[(0,s.tZ)(CardCommentSkeleton,{}),(0,s.tZ)(CardCommentSkeleton,{}),(0,s.tZ)(CardCommentSkeleton,{})]}):(null==ep?void 0:ep.length)?(0,s.BX)(s.HY,{children:[ep.map(e=>(0,s.tZ)(p.B,{hasQuickBookingEnable:!0,handleMakeAppointment:handleMakeAppointment,post:{...e,isPin:!1},showMostEngaging:!0,style:{marginBottom:8},onDeletePost:()=>fetchMorePosts(),onEditPost:()=>w&&w(e),onMostEngagingCommentClick:()=>{E&&E(e)},onCommentCountClick:()=>E&&E(e),onPostCommentSuccess:()=>E&&E(e)},e.id)),ev&&ev.currentfetchMorePosts(ev.current+1),className:"view-more-button",children:z({id:"commentPopup.morePost",defaultMessage:"View {count} more posts"},{count:ev.current+1===ev.last?ev.total_items-ev.items_per_page*ev.current:ev.items_per_page})}):null]}):(0,s.BX)(eo,{children:[(0,s.tZ)("img",{className:"empty-comment-icon",src:"".concat(N.Nr,"/speak1.svg"),alt:"0 comments",loading:"lazy"}),(0,s.tZ)(v.H,{tag:"h3",className:"title",children:z(es?{id:"commentPopup.loggedIn.title"}:{id:"commentPopup.emptyComment.title"})}),(0,s.tZ)(ec.T,{size:"p3",className:"description",children:z({id:"commentPopup.emptyComment.description"})}),!es&&(0,s.tZ)("a",{"data-event-category":"Comments","data-event-action":"Join Button","data-event-label":A,children:(0,s.tZ)(m.B,{size:"lg",color:"tertiary",className:"login-button",onClick:goToLogin,children:z({id:"commentPopup.sigupButton.joinHelloSite"})})})]})})}),(0,s.tZ)(ee,{children:!es&&ep&&(null==ep?void 0:ep.length)>0&&(null==ep?void 0:ep.length)<6?(0,s.BX)(ei,{children:[(0,s.tZ)(ec.T,{size:"p3",className:"description",children:z({id:"commentPopup.fewComment.p1"})}),(0,s.tZ)(ec.T,{size:"p3",className:"description",children:z({id:"commentPopup.fewComment.p2"})}),!es&&(0,s.tZ)("a",{children:(0,s.tZ)(m.B,{size:"lg",color:"tertiary",className:"login-button pointer-event-child-none",onClick:goToLogin,"data-event-category":"Ask Doctor","data-event-action":"Join Asking Question","data-event-label":A,children:z({id:"commentPopup.sigupButton.joinTheDisscussion"})})})]}):(0,s.BX)(s.HY,{children:[(0,s.BX)(Q,{"data-testid":"art-post-write","data-event-category":"Ask Doctor","data-event-action":"Write Question Click","data-event-label":A,onClick:()=>{es?null==y||y():l&&(window.location.href=l)},children:[es&&(0,s.tZ)(U.U,{avatar:null==el?void 0:el.avatar,username:null==el?void 0:el.name,style:{width:40,height:40}}),(0,s.BX)(J,{"data-is-loggedin":es||void 0,children:[(0,s.tZ)("img",{className:"input-reply-icon",src:"/svg/icon-edit.svg",alt:"reply",loading:"lazy"}),(0,s.tZ)("div",{className:"input-reply-comment",children:z({id:"commentPopup.startANewPost",defaultMessage:"Start a new post"})})]})]}),!es&&(0,s.tZ)("p",{className:"join-or-login",dangerouslySetInnerHTML:{__html:z({id:"commentPopup.comment.loginOrSignup.toJoinDiscuss",defaultMessage:"{joinUsWithLink} or {signInWithLink} to join the discussion"},{joinUsWithLink:'\n ').concat(z({id:"commentPopup.comment.loginOrSignup.joinUs",defaultMessage:"Join us"}),"\n "),signInWithLink:'\n ').concat(z({id:"commentPopup.comment.loginOrSignup.logIn",defaultMessage:"Log in"}),"\n ")})}})]})})]})};var ep=l(91601);l(37676);let TogetherCommentPopup=e=>{let{articleId:t,categories:l,articleSlug:w,defaultCommentsWithReplies:E}=e,{setIsCommentPopupOpen:k,isCommentPopupOpen:A}=(0,D.WM)(e=>({setIsCommentPopupOpen:e.setIsCommentPopupOpen,isCommentPopupOpen:e.isCommentPopupOpen}),f.X),[x,U]=(0,d.useState)(),z=null==w?void 0:w.split("/").filter(Boolean).slice(0,-1),[V,G]=(0,d.useState)([]),[F,W]=(0,d.useState)(null),{currentArticle:X}=(0,D.WM)(e=>({currentArticle:e.currentArticle})),$=A&&(null==X?void 0:X.id)===t;(0,ep.h)(!!$,(e,t)=>W(t),N.XL),(0,d.useEffect)(()=>{z?Promise.all(null==z?void 0:z.map(async(e,t)=>{let s=z.slice(0,t+1).join("/"),d=l.find(e=>{var t;return(null===(t=e.permalink)||void 0===t?void 0:t.split("/").filter(Boolean).join("/"))===s});if(d)return d;{var p,m;let e=await(0,g.d)(b.y.CATEGORY.GET_CATEGORY_DETAIL,{params:{slug:s}});if(null==e?void 0:null===(m=e.data)||void 0===m?void 0:null===(p=m.category)||void 0===p?void 0:p.term_id)return(0,y.DG)(e.data.category)}})).then(e=>G(e.filter(Boolean))):G(l.sort((e,t)=>{let l=e.permalink.split("/").length-1,s=t.permalink.split("/").length-1;return l>s?1:le.slug).join("/")]);let Q=(0,Z.U)(),[J,ee]=(0,d.useState)("comment-list"),[et,en]=(0,d.useState)(void 0),[eo,ei]=(0,d.useState)(void 0),[er,ea]=(0,d.useState)(""),{formatMessage:el}=(0,h.Z)(),es=(0,d.useRef)(null),ec=(0,R.d)(),ed=(0,d.useRef)();(0,d.useEffect)(()=>{H.E.mutate(()=>{document.body.classList.toggle("noscroll",$&&ec),$?(ee("comment-list"),en(void 0),ei(void 0),document.querySelectorAll('div[id^="spotx_content_container"]').forEach(e=>{e.parentElement&&(e.parentElement.style.display="none")})):document.querySelectorAll('div[id^="spotx_content_container"]').forEach(e=>{e.parentElement&&(e.parentElement.style.display="block")})})},[$]),(0,d.useEffect)(()=>{ea((0,_.bT)("","","comment"))},[]);let handleClose=()=>{"create-edit"===J?U({thumbnail:"/svg/icon-cancel.svg",title:el({id:"commentPopup.createPost.confirmCloseTitle",defaultMessage:"Are you sure?"}),description:el({id:"commentPopup.createPost.confirmCloseDescription",defaultMessage:"If you discard now, you’ll lose this post"}),acceptText:el({id:et?"commentPopup.discardPostEdit":"commentPopup.discardPost",defaultMessage:et?"Discard changes":"Discard post"}),cancelText:el({id:"commentPopup.keepEditing",defaultMessage:"Keep editing"}),onAccept:async()=>{k(!1),U(void 0)}}):k(!1)};return(0,s.BX)(Popup,{isOpen:$,type:"profile",onClose:handleClose,id:"popup-".concat(t),className:"comment-popup",children:[(0,s.tZ)("div",{style:{display:"none"},children:(0,s.tZ)("div",{className:"comment-list",children:null==E?void 0:E.map(e=>{var t,l,d,m,v,h;return(0,s.BX)("div",{children:[(0,s.BX)("a",{href:"/community/".concat(null===(t=e.comment.community)||void 0===t?void 0:t.slug,"/").concat(e.comment.slug,"/"),children:["img: ",e.comment.bannerImage,(0,s.tZ)("br",{}),"author: ",e.comment.isAnonymous?"":null===(l=e.comment.author)||void 0===l?void 0:l.name,(0,s.tZ)("br",{}),"detail: ",e.comment.description,(0,s.tZ)("br",{}),"time: ",e.comment.postTime,(0,s.tZ)("br",{}),"reply: ",e.comment.commentsCount,(0,s.tZ)("br",{}),"likes: ",e.comment.likesCount]}),(0,s.BX)("a",{href:"/community/".concat(null===(d=e.comment.community)||void 0===d?void 0:d.slug,"/"),children:["community: ",null===(m=e.comment.community)||void 0===m?void 0:m.name]}),(0,s.tZ)("br",{}),null===(v=e.comment.topics)||void 0===v?void 0:v.map(t=>{var l;return(0,s.BX)("a",{href:"/community/".concat(null===(l=e.comment.community)||void 0===l?void 0:l.slug,"/").concat(null==t?void 0:t.slug),children:["topic: ",t.name]},t.id)}),(0,s.tZ)("div",{className:"comment-replies",children:null===(h=e.replies)||void 0===h?void 0:h.map(t=>(0,s.tZ)(p.E,{hasQuickBookingEnable:!0,className:"post-comment",comment:t,post:e.comment},t.id))})]},e.comment.id)})})}),(0,s.tZ)(q,{ref:es,children:$&&(0,s.BX)(s.HY,{children:[x&&(0,s.tZ)(p.P,{onClose:()=>U(void 0),...x}),(0,s.BX)(K,{children:["comment-list"!==J&&(0,s.tZ)("div",{className:"comment-popup-back-button",children:(0,s.tZ)(m.B,{color:"transparent",size:"sm",className:"button-back",onClick:()=>{"create-edit"===J?U({thumbnail:"/svg/icon-cancel.svg",title:el({id:"commentPopup.createPost.confirmCloseTitle",defaultMessage:"Are you sure?"}),description:el({id:"commentPopup.createPost.confirmCloseDescription",defaultMessage:"If you discard now, you’ll lose this post"}),acceptText:el({id:et?"commentPopup.discardPostEdit":"commentPopup.discardPost",defaultMessage:et?"Discard changes":"Discard post"}),cancelText:el({id:"commentPopup.keepEditing",defaultMessage:"Keep editing"}),onAccept:async()=>{ee("comment-list"),U(void 0)}}):ee("comment-list")},children:(0,s.tZ)("img",{src:"".concat(N.Nr,"/back-icon.svg"),alt:"",loading:"lazy"})})}),(0,s.tZ)(v.H,{tag:"h5",style:{width:"70%",textAlign:"center"},children:"create-edit"===J?el({id:"commentPopup.title.newPost",defaultMessage:"New post"}):el({id:"commentPopup.title",defaultMessage:"Comments"})}),(0,s.tZ)(Y,{id:"comment-popup-close-button",children:(0,s.tZ)(m.B,{"data-event-category":"Comments","data-event-action":"Close","data-event-label":Q,color:"transparent",size:"sm",className:"button-close",onClick:handleClose,children:(0,s.tZ)("img",{"data-event-category":"Comments","data-event-action":"Close","data-event-label":Q,src:"".concat(N.Nr,"/close.svg"),alt:"",loading:"lazy"})})})]}),"comment-list"===J&&(0,s.tZ)(CommentList,{articleId:t,redirectUrl:er,openCreatePostPopup:()=>{ee("create-edit"),en(void 0)},openEditPostPopup:e=>{ee("create-edit"),en(e)},openPostDetail:e=>{ee("comment-detail"),ei(e)},cityId:null==F?void 0:F.id},String($)),"comment-detail"===J&&eo&&(0,s.tZ)(CommentDetail,{openEditPostPopup:e=>{ee("create-edit"),en(e)},post:eo,cityId:null==F?void 0:F.id}),"create-edit"===J&&(0,s.tZ)("div",{className:"create-edit-container",children:(0,s.tZ)(p.g,{forceSelectCommunity:{name:V[0].name,mappedCategoryId:Number(V[0].termId)},forceSelectTopics:V.slice(1).map(e=>({name:e.name,mappedCategoryId:Number(e.termId)})),articleId:String(t),onClose:()=>{var e;(null===(e=ed.current)||void 0===e?void 0:e.id)?(ee("comment-detail"),ei(ed.current)):ee("comment-list"),ed.current=void 0},optionalTopic:!0,editPostData:et,noFetchTopic:!0,onPostCreatedEdited:e=>ed.current=e,hideTopicList:!0,showAskDoctorOptions:-1!==B.MN.indexOf(N.ENV.NEXT_PUBLIC_DEPLOY_LOCALE||""),selectAskDoctor:!0})})]})})]})},TogetherCommentPopupContext=e=>{let{children:t}=e;return(0,s.tZ)(X,{children:(0,s.tZ)(p.a,{defaultParams:{action:"comment"},children:t})})};TogetherCommentPopupContext.displayName="TogetherCommentPopupContext"},84826:function(e,t,l){"use strict";l.r(t),l.d(t,{ArticleLeftWrapper:function(){return N}});var s=l(35944),d=l(67294),p=l(5152),m=l.n(p),v=l(76248),h=l(97627),f=l(45683),g=l(50667),y=l(48309),b=l(83015),_=l(95386),w=l(24612),E=l(98926),k=l(71216),A=l(29017),x=l(79364),Z=l(50743);let R=m()(()=>l.e(448).then(l.bind(l,40448)),{loadableGenerated:{webpack:()=>[40448]},ssr:!1}),N=(0,d.memo)(()=>{var e;let t=(0,b.d)(),{locale:l}=(0,_.h)(),{state:{currentDomain:p,userInfo:m,isLoggedIn:N},dispatch:B}=(0,d.useContext)(A.I),{articles:D,bookmarkIds:H,currentArticle:U,currentProgress:z,setIsLiked:V,setIsCommentPopupOpen:G,addToBookmark:F,removeBookmark:W}=(0,x.WM)(e=>({articles:e.articles,bookmarkIds:e.bookmarkIds,currentArticle:e.currentArticle,currentProgress:e.currentProgress,setIsLiked:e.setIsLiked,setIsCommentPopupOpen:e.setIsCommentPopupOpen,addToBookmark:e.addToBookmark,removeBookmark:e.removeBookmark}),v.X),X=(0,d.useMemo)(()=>-1!==((null==m?void 0:m.bookmarks)||H).indexOf((null==U?void 0:U.id)||""),[H,U,null==m?void 0:m.bookmarks]),bookmarkArticle=async()=>{let{id:e}=U||{};if(e&&(null==m?void 0:m.id)){if(X){let t=await(0,h.d)(f.y.SSO.DELETE_BOOKMARK,{method:"DELETE",data:{host_name:p,post_ids:[e]}},"sso");(null==t?void 0:t._status)===1&&(W(e),B({type:k.H.REMOVE_BOOKMARKS,payload:{bookmarks:[e],bookmarkId:e}}))}else{let t=await(0,h.d)(f.y.SSO.CREATE_BOOKMARK,{method:"POST",data:{host_name:p,post_ids:[e]}},"sso");(null==t?void 0:t._status)===1&&(F(e),B({type:k.H.ADD_BOOKMARKS,payload:{bookmarks:[e],bookmarkId:e}}))}}else{let t=window.location.href,l=encodeURIComponent("".concat(t).concat(t.includes("?")?"&":"?","source=bookmark,").concat(e));window.location.href=w.ENV.NEXT_PUBLIC_SSO?"".concat(w.MO,"?returnUrl=").concat(l):t}},handleArticleReaction=async e=>{if(N){var t,s;switch(e){case"like":let l=await(0,h.d)(f.y.SSO.SSO_FEEDBACK,{method:"POST",data:{post_id:null==U?void 0:U.id,feedback:E.lo.Like}},"sso");(null==l?void 0:null===(t=l._data)||void 0===t?void 0:t.total)&&V(!0);break;case"none":let d=await(0,h.d)(f.y.SSO.SSO_FEEDBACK,{method:"POST",data:{post_id:null==U?void 0:U.id,feedback:E.lo.None}},"sso");(null==d?void 0:null===(s=d._data)||void 0===s?void 0:s.total)&&V(!1)}}else(0,g.p0)("".concat((0,g.UC)(l)).concat(null==U?void 0:U.permalink,"?feedback=").concat({like:1,dislike:0,none:2}[e],"&postId=").concat(null==U?void 0:U.id),"reaction")},q=(0,d.useRef)("no_value");(0,d.useEffect)(()=>{let e=z>=.25&&z<.5?"at25percent":z>=.5&&z<.75?"at50percent":z>=.75?"at75percent":1===z?"at100percent":"no_value";"no_value"!==e&&e!==q.current&&(window.dataLayer&&window.dataLayer.push&&window.dataLayer.push({at25percent:!1,at50percent:!1,at75percent:!1,[e]:!0,event:"scrolldepth"}),q.current=e)},[z,null==U?void 0:U.id]);let K=(0,d.useMemo)(()=>(null==U?void 0:U.isPremium)?!N:null!=U&&!!U.turnOffArticleVoice||!(null==U?void 0:U.enableAudio),[N,U,null==U?void 0:U.isPremium,null==U?void 0:U.turnOffArticleVoice,null==U?void 0:U.enableAudio]);return(0,s.BX)(Z.Cm,{children:[!t&&(0,s.tZ)(R,{articleUrl:"".concat(p).concat((null==U?void 0:U.permalink)||(null===(e=D[0])||void 0===e?void 0:e.permalink)||""),isBookmarked:X,onAskDoctorClick:()=>G(!0),onBookmarkClick:bookmarkArticle,onLikeClick:handleArticleReaction,turnOffComment:!!(null==U?void 0:U.turnOffComment)}),(0,s.tZ)(y.default.Article,{jumpingLink:null==U?void 0:U.jumpingLink,isBookmarked:X,onBookmarkClick:bookmarkArticle,progress:z,turnOffComment:!!(null==U?void 0:U.turnOffComment),turnOffArticleVoice:K,articleId:null==U?void 0:U.id,articleContent:null==U?void 0:U.postContent,isPremium:null==U?void 0:U.isPremium})]})})},14292:function(e,t,l){"use strict";l.d(t,{ck:function(){return et},c2:function(){return ArticleConsumer}});var s=l(35944),d=l(67294),p=l(36380),m=l.n(p),v=l(85564),h=l.n(v),f=l(5152),g=l.n(f),y=l(9008),b=l.n(y),_=l(42708),w=l(76248),E=l(97627),k=l(45683),A=l(28410),x=l(39139),Z=l(80432),R=l(36965);l(20746);var N=l(50667);let getOgImagePath=(e,t)=>"".concat((0,N.UC)(t),"/api/og-images/?locale=").concat(t,"&articleId=").concat(e).concat(t===R.L.Cambodia&&"151002"===String(e)?"&t=1":"");var B=l(20948),D=l(43272),H=l(2251),U=l(83015),z=l(95386),V=l(24612),G=l(20374),F=l(98926),W=l(71216),X=l(29017),q=l(79364),K=l(91961),Y=l(50722),$=l(74706),Q=l(20868),J=l(4891),ee=l(50743);let et=(0,d.memo)(()=>{let{locale:e}=(0,z.h)(),t=(0,Q.U)(),{currentArticle:l,chineseTranslate:d,setChineseTranslate:p}=(0,q.WM)(e=>({chineseTranslate:e.chineseTranslate,currentArticle:e.currentArticle,setChineseTranslate:e.setChineseTranslate}),w.X);return(0,s.BX)(ee.UN,{className:"breadcrumbs-top",children:[(0,s.tZ)($.l,{children:((null==l?void 0:l.breadcrumb)||[]).map(t=>({dataEventCategory:"Breadcrumb",dataEventAction:"Click",dataEventLabel:"".concat((0,N.UC)(e)).concat(t.permalink),label:t.catName||"",value:t.permalink||""})).map(e=>(0,s.tZ)($.l.Item,{href:e.value,...e,children:e.label},e.value))}),e===F.MV.Taiwan?(0,s.tZ)(Y.B,{dataEventCategory:"Language Switch",dataEventAction:"Click",dataEventLabel:t,size:"md",color:"transparent",className:"translate-button",onClick:()=>{window.TongWen&&(d===J.w.traditional?(window.TongWen.trans2Trad(document),p(J.w.simplified)):(window.TongWen.trans2Simp(document),p(J.w.traditional)))},children:(0,s.tZ)("img",{alt:"","data-event-category":"Language Switch","data-event-action":"Click","data-event-label":t,style:{width:32,height:32},src:d===J.w.simplified?"".concat(V.Nr,"/ch_traditional.png"):"".concat(V.Nr,"/ch_simplified.png"),loading:"lazy"})}):null]})});var en=l(36808),eo=l.n(en),ei=l(10928),er=l.n(ei),ea=l(23493),el=l.n(ea),es=l(61362),ec=l(81077),ed=l(50176),eu=l(1973),ep=l(11591);let em=eo().get(V.Ud),ArticleLoading=()=>{let[e,t]=(0,d.useState)(!1),[l,p]=(0,d.useState)(!1),m=(0,d.useRef)(l);m.current=l;let v=(0,d.useRef)(null),h=(0,d.useRef)(0),{currentArticle:f,articles:g,addToArticles:y}=(0,q.WM)(e=>({currentArticle:e.currentArticle,articles:e.articles,addToArticles:e.addToArticles}),w.X);(0,d.useEffect)(()=>{t(!1),!1!==m.current&&p(!1)},[null==f?void 0:f.id]),(0,d.useEffect)(()=>{if(!(0,ep.$A)()){let e=el()(()=>{ed.E.measure(()=>{if(v.current){let e=(0,eu.tb)(v.current);m.current!==e&&p(e)}})},200);return document.addEventListener("scroll",e,{passive:!0}),()=>document.removeEventListener("scroll",e)}},[]);let b=(0,d.useCallback)(async()=>{if(l&&!e&&h.current<3)try{var s,d,p,m,v,f,b,_,w,A,x,Z,R,N,B,D;t(!0);let e=g.reduce((e,t)=>e.concat(String(t.id)),[]).join(","),l=er()(g),H=null==l?void 0:null===(s=l.nextArticle)||void 0===s?void 0:s.permalink;if(!H)return;for(let t=0;t<1;t++){let t=await(0,ep.vX)({slug:H,skipIds:e,requestFrom:em});if(t){let l=(null==t?void 0:null===(m=t.articleReviewed)||void 0===m?void 0:null===(p=m.expert)||void 0===p?void 0:null===(d=p["care-booking"])||void 0===d?void 0:d.id)||null,s=null;if(!(null==t?void 0:null===(f=t.articleReviewed)||void 0===f?void 0:null===(v=f.expert)||void 0===v?void 0:v.authorOnCare)&&l){let e=await(0,E.d)(k.y.CARE.GET_DOCTOR_DETAIL,{params:{id:l}},"care");s=(null==e?void 0:e._status)===1?{id:null==e?void 0:null===(x=e._data)||void 0===x?void 0:null===(A=x.doctor)||void 0===A?void 0:A.id,slug:null==e?void 0:null===(R=e._data)||void 0===R?void 0:null===(Z=R.doctor)||void 0===Z?void 0:Z.slug,type:(null==e?void 0:null===(B=e._data)||void 0===B?void 0:null===(N=B.doctor)||void 0===N?void 0:N.type)||"doctor"}:null}(null==t?void 0:null===(b=t.articleReviewed)||void 0===b?void 0:b.expert)&&(t.articleReviewed.expert.authorOnCare=s),h.current=0,t.nextArticle=null===(_=t.relatedArticles)||void 0===_?void 0:_.filter(t=>!e.includes(String(t.id)))[0],(null===(w=t.nextArticle)||void 0===w?void 0:w.id)&&(t.relatedArticles=null===(D=t.relatedArticles)||void 0===D?void 0:D.filter(e=>{var l;return e.id!==(null===(l=t.nextArticle)||void 0===l?void 0:l.id)})),y(t);break}h.current++}setTimeout(()=>t(!1),500)}catch(e){h.current++,setTimeout(()=>t(!1),500),(0,es.Tb)(e.message)}},[l,e,g]);return(0,d.useEffect)(()=>{b()},[b]),(0,s.BX)(s.HY,{children:[(0,s.tZ)(ee.Dv,{ref:v}),(0,s.tZ)(ee.ZY,{"data-show":e,children:(0,s.tZ)(ec.g,{})})]})};var ev=l(44038),eh=l(13023),ef=l(86896),eg=l(22387),ey=l(82729),eb=l(7259),e_=l(15184),eC=l(72660),ew=l(60577);function _templateObject(){let e=(0,ey._)(["\n background: ",";\n &[data-visible='true'] {\n padding: 1rem 0;\n &[data-sponsored='true'] {\n padding: 0 0 1rem;\n }\n }\n "," {\n &[data-sticky='true'] {\n position: sticky;\n top: 0;\n z-index: 999;\n width: 100%;\n }\n }\n"]);return _templateObject=function(){return e},e}let MastheadAd=e=>{let{adUnitPath:t,customTargetting:l,isSponsored:p,defaultNoScroll:m,initialSticky:v=!1,className:h}=e,{formatMessage:f}=(0,ef.Z)(),g=(0,U.d)(),[y,b]=(0,d.useState)(!1),[_,w]=(0,d.useState)(v);return(0,d.useEffect)(()=>{let e=null,checkShowPadding=()=>{ed.E.measure(()=>{let e=document.querySelector("[id^=super-masthead-ad-]");((null==e?void 0:e.getBoundingClientRect().height)||0)>10&&b(!0)}),e=setTimeout(checkShowPadding,1e3)};e=setTimeout(checkShowPadding,1e3),window.googletag=window.googletag||{cmd:[]};let{googletag:t}=window;return t.cmd.push(()=>{t.pubads().addEventListener("slotRenderEnded",e=>{var t;(null===(t=e.slot)||void 0===t?void 0:t.getSlotElementId().startsWith("super-masthead-ad"))&&(setTimeout(()=>{w(!1)},4e3),setTimeout(()=>{var e;null===(e=document.querySelector("html"))||void 0===e||e.classList.remove("ad-noscroll")},700))})}),setTimeout(()=>{var e;null===(e=document.querySelector("html"))||void 0===e||e.classList.remove("ad-noscroll")},1500),()=>{e&&clearTimeout(e)}},[]),(0,s.BX)(eO,{"data-visible":y,"data-sponsored":p,"data-sticky":_,className:h,children:[m&&(0,s.tZ)("script",{async:!0,dangerouslySetInnerHTML:{__html:"\n if (window.innerWidth > ".concat(eb.B.BREAK_POINT_MOBILE,") {\n document.querySelector('html')?.classList.add('ad-noscroll')\n }\n ")}}),y&&(0,s.BX)(ew.R7,{children:[(0,s.tZ)("img",{src:"/svg/adsIcon.svg",alt:"",loading:"lazy"}),(0,s.tZ)("span",{children:f({id:"adBanner.title",defaultMessage:"Advertisement"})})]}),(0,s.tZ)(x.AdBlock,{adUnitPath:t,size:g?[[414,200],[375,188],[1,1]]:[[970,250],[1,1]],divId:"super-masthead-ad-".concat(g?"mobile":"desktop","-").concat(null==l?void 0:l.Content_ID),pos:["masthead"],customTargetings:l,contentId:String(null==l?void 0:l.Content_ID),adDefaultSize:[0,0],noWrapper:!0,showCloseBtn:!0,wrapperProps:{m:0}},String(g))]})},ArticleMastheadAd=e=>{var t,l,d,p;let{article:v,defaultNoScroll:h,className:f,initialSticky:g}=e,{locale:y}=(0,z.h)(),b=(0,U.d)();if(!v)return null;let _=(0,K.WV)(y,(0,K.gV)(v.permalink)),w=(0,K.od)({countryAdTag:(0,K.Em)(y,{isMobile:b}),contentAdTag:_}),E={Is_Sponsored:[v.isSponsored?1:0],Is_Expert_Article:[(null===(t=v.expert)||void 0===t?void 0:t.id)||(null===(d=v.articleReviewed)||void 0===d?void 0:null===(l=d.expert)||void 0===l?void 0:l.ID)&&(null===(p=v.articleReviewed)||void 0===p?void 0:p.is_author)?1:0],Is_Affiliate:[v.hasAffiliate?1:0],Keywords:[m()((0,B.Xm)(v.metaTag||"","content_tags")||"")],Content_ID:String(v.id)};return(0,s.tZ)(MastheadAd,{adUnitPath:w,customTargetting:E,isSponsored:!!v.isSponsored,defaultNoScroll:h,initialSticky:g,className:f})},eO=eC.ZP.div.withConfig({componentId:"sc-82a82a2e-0"})(_templateObject(),e_.t.colors.neutral50,eb.M.mbDown);var eE=l(74363),ek=l(13810);let eT=g()(()=>Promise.resolve().then(l.bind(l,74363)).then(e=>e.InlineDynamicSpotlight),{loadableGenerated:{webpack:()=>[74363]},ssr:!1}),ArticlePageV2=e=>{let{defaultCommentsWithReplies:t,healthTools:l}=e,{formatMessage:p}=(0,ef.Z)(),m=(0,U.d)(),{articles:v,currentArticle:h}=(0,q.WM)(e=>({articles:e.articles,currentArticle:e.currentArticle}),w.X);return(0,ek.J)(),(0,s.tZ)(s.HY,{children:v.map((e,v)=>{let f=eE.InlineDynamicSpotlighthMap[null==e?void 0:e.permalink];return(0,s.BX)(d.Fragment,{children:[v>0&&String(null==h?void 0:h.id)===String(e.id)&&(0,s.tZ)(ArticleMastheadAd,{className:"full-width",article:e,initialSticky:!0}),v>0&&(0,s.tZ)(ee.LN,{children:(0,s.tZ)(eh.T,{size:m?"xs":"md",color:"#8C8C8C",type:"bold",style:{textTransform:"uppercase",...m?{}:{fontSize:18}},children:p({id:"articlePage.nextPostv2"})})}),(0,s.tZ)("div",{className:"inner-container",children:(0,s.tZ)(eg.d,{index:v,article:e,defaultCommentsWithReplies:0===v?t:void 0},e.id)}),null==f?void 0:f.map((e,t)=>(0,s.tZ)(eT,{spotlightSlug:e,healthTools:l},t))]},v)})})},ArticleMainContent=e=>{let{postCommentsData:t,healthTools:l}=e;return(0,s.tZ)(ev.p,{children:(0,s.tZ)(ArticlePageV2,{defaultCommentsWithReplies:null==t?void 0:t.comments,healthTools:l})})},eI=g()(()=>Promise.resolve().then(l.bind(l,84826)).then(e=>e.ArticleLeftWrapper),{loadableGenerated:{webpack:()=>[84826]}}),eP=g()(()=>Promise.all([l.e(6417),l.e(3846),l.e(5977)]).then(l.bind(l,33846)).then(e=>e.WeekOfPregnancy),{loadableGenerated:{webpack:()=>[33846]}}),ArticleConsumer=e=>{var t,l,p,v,f,g,y,R,N,Y,$,Q,J,en,eo,ei,er,ea,el,es,ec,ed;let{sitewideBanner:eu,footerInfo:ep,pregnancyWeeks:em,currentPregnancyWeek:ev=1,dataNavMenuContent:eh}=e,{locale:ef,router:eg,query:ey}=(0,z.h)(),eb=(0,U.d)(),{state:{isLoggedIn:e_},dispatch:eC}=(0,d.useContext)(X.I),{setIsCommentPopupOpen:ew,articles:eO,currentArticle:eE,setIsDisliked:ek,setIsLiked:eT}=(0,q.WM)(e=>({setIsCommentPopupOpen:e.setIsCommentPopupOpen,articles:e.articles,currentArticle:e.currentArticle,setIsDisliked:e.setIsDisliked,setIsLiked:e.setIsLiked}),w.X);(0,d.useEffect)(()=>{var e;return"1"===ey.commentsExpanded&&ew(!0),null===(e=document.querySelector("body"))||void 0===e||e.classList.add("article-page"),()=>{var e;null===(e=document.querySelector("body"))||void 0===e||e.classList.remove("article-page")}},[]),(0,d.useEffect)(()=>{(async()=>{if((null==ey?void 0:ey.feedback)==="0"){let e=await(0,E.d)(k.y.SSO.SSO_FEEDBACK,{method:"POST",data:{post_id:null==eE?void 0:eE.id,feedback:F.lo.DisLike,feedback_stat:Number(null==ey?void 0:ey.feedback_stat)||3,message:(null==ey?void 0:ey.message)||""}},"sso");ek(!!e._data.dislike)}else if((null==ey?void 0:ey.feedback)==="1"){let e=await(0,E.d)(k.y.SSO.SSO_FEEDBACK,{method:"POST",data:{post_id:null==eE?void 0:eE.id,feedback:F.lo.Like}},"sso");eT(!!e._data.liked)}})()},[eE,ey]),(0,d.useEffect)(()=>{var e;let fetchReaction=async()=>{let[e]=await Promise.all([e_&&(0,E.d)(k.y.SSO.SSO_FEEDBACK_USER,{method:"POST",data:{post_id:null==eE?void 0:eE.id}},"sso")]);(null==e?void 0:e._data)&&(ek(!!e._data.dislike),eT(!!e._data.liked))};fetchReaction(),e_?(async()=>{var e;let[t,l]=await Promise.all([(0,E.d)(k.y.UNIFIED.GET_USER_FIELDS,void 0,"unified"),(0,E.d)(k.y.SIDIS.GET_SIDIS_HEALTH_INFO,void 0,"sidis_frontend")]),s=(null==t?void 0:null===(e=t.data)||void 0===e?void 0:e["need-collected"])||[];eC({type:W.H.SET_COLLECTING_ACTION,payload:h()(s.map(e=>e.actions))}),eC({type:W.H.SET_HEALTH_INFO,payload:null==l?void 0:l._data})})():(null==eE?void 0:null===(e=eE.unifiedProfileSubot)||void 0===e?void 0:e.id)&&eC({type:W.H.SET_COLLECTING_ACTION,payload:[{id:eE.unifiedProfileSubot.id,name:F.F_.SUBOT}]})},[null==eE?void 0:eE.id,e_]),(0,d.useEffect)(()=>{var e,t,l;return(null==eE?void 0:null===(e=eE.integrates3rdParty)||void 0===e?void 0:e.chatwoodToken)&&eC({type:W.H.SET_CHATWOOT_WEBSITE_TOKEN,payload:eE.integrates3rdParty.chatwoodToken}),(null==eE?void 0:null===(l=eE.integrates3rdParty)||void 0===l?void 0:null===(t=l.zaloConfig)||void 0===t?void 0:t.oaid)&&eC({type:W.H.SET_ZALO_CONFIG,payload:eE.integrates3rdParty.zaloConfig}),()=>{eC({type:W.H.SET_CHATWOOT_WEBSITE_TOKEN,payload:null}),eC({type:W.H.SET_ZALO_CONFIG,payload:null})}},[eE]);let eS=(0,K.od)({countryAdTag:(0,K.Em)(ef,{isMobile:eb}),contentAdTag:(0,K.WV)(ef,(0,K.gV)((null===(t=eO[0])||void 0===t?void 0:t.permalink)||""))}),eA=(0,K.od)({countryAdTag:(0,K.Em)(ef,{isMobile:eb}),contentAdTag:(0,K.WV)(ef,(0,K.gV)((null==eE?void 0:eE.permalink)||""))}),ex={Is_Sponsored:[(null===(l=eO[0])||void 0===l?void 0:l.isSponsored)?1:0],Is_Expert_Article:[(null===(v=eO[0])||void 0===v?void 0:null===(p=v.expert)||void 0===p?void 0:p.id)||(null===(y=eO[0])||void 0===y?void 0:null===(g=y.articleReviewed)||void 0===g?void 0:null===(f=g.expert)||void 0===f?void 0:f.ID)&&(null===(N=eO[0])||void 0===N?void 0:null===(R=N.articleReviewed)||void 0===R?void 0:R.is_author)?1:0],Is_Affiliate:[(null===(Y=eO[0])||void 0===Y?void 0:Y.hasAffiliate)?1:0],Keywords:[m()((0,B.Xm)((null===($=eO[0])||void 0===$?void 0:$.metaTag)||"","content_tags")||"")]},eM={Is_Sponsored:[(null==eE?void 0:eE.isSponsored)?1:0],Is_Expert_Article:[(null==eE?void 0:null===(Q=eE.expert)||void 0===Q?void 0:Q.id)||(null==eE?void 0:null===(en=eE.articleReviewed)||void 0===en?void 0:null===(J=en.expert)||void 0===J?void 0:J.ID)&&(null==eE?void 0:null===(eo=eE.articleReviewed)||void 0===eo?void 0:eo.is_author)?1:0],Is_Affiliate:[(null==eE?void 0:eE.hasAffiliate)?1:0],Keywords:[m()((0,B.Xm)((null==eE?void 0:eE.metaTag)||"","content_tags")||"")]},eZ=null===(ei=eO[0])||void 0===ei?void 0:ei.permalink.split("/").filter(Boolean).join("/"),ej=!!eZ&&!!(null===(er=G.M5[ef])||void 0===er?void 0:er.includes(eZ)),{ref:eL,inView:eR}=(0,_.YD)(),eN=(0,d.useMemo)(()=>{if(null==eE||!eE.metaTag||ef===F.MV.Indonesia)return null==eE?void 0:eE.metaTag;{let e=eE.metaTag.replace(/]*>|]*>|]*>|]*>|]*>/gi,"");return e}},[null==eE?void 0:eE.metaTag,ef]);return(0,s.BX)(s.HY,{children:[(0,s.tZ)("img",{loading:"lazy",style:{display:"none"},src:ef!==F.MV.Indonesia&&getOgImagePath((null===(ea=eO[0])||void 0===ea?void 0:ea.id)||0,ef)||(null==eE?void 0:eE.featureImage),alt:"backup og meta"}),ej&&(0,s.tZ)(x.AdBlock,{adUnitPath:eS,size:[414,207],divId:"above-nav-ad",pos:[],customTargetings:ex,noWrapper:!0,showCloseBtn:!0,wrapperProps:{my:0,mx:"auto"},ref:eL},String(eb)),ef===F.MV.Vietnam&&eb&&(0,s.tZ)(A.g,{}),(0,s.tZ)(D.x,{SEOData:{title:(null==eE?void 0:eE.metaTag)?void 0:null==eE?void 0:eE.postTitle,image:ef!==F.MV.Indonesia&&getOgImagePath((null===(el=eO[0])||void 0===el?void 0:el.id)||0,ef)||(null==eE?void 0:eE.featureImage),apiMetaData:eN,isIndexable:!0,description:null==eE?void 0:eE.description,type:"article",...(null==eE?void 0:null===(es=eE.primaryCategory)||void 0===es?void 0:es.slug)===V.rN[ef||F.MV.Vietnam]?{customMetaData:[{name:"apple-itunes-app",content:"app-id=1645060016, app-argument=https://".concat(H.domainLocales[ef||F.MV.Vietnam]).concat(eg.asPath)}]}:{}},noUsingRouterPush:!0,isSponsored:!!(null==eE?void 0:eE.isSponsored),sitewideBanner:eu,footerInfo:ep,languageOptions:(null==eE?void 0:eE.translateOptions)||[],dataNavMenuContent:eh,sponsoredType:"content",sponsoredBy:null==eE?void 0:eE.sponsor,children:(0,s.BX)(s.HY,{children:[ef===F.MV.Taiwan?(0,s.tZ)(b(),{children:(0,s.tZ)("script",{defer:!0,type:"text/javascript",src:"/libs/tongwen.js"},"tongwen-translator")}):null,String(null==eE?void 0:eE.id)===String(null==eO?void 0:null===(ec=eO[0])||void 0===ec?void 0:ec.id)&&(0,s.tZ)(ArticleMastheadAd,{article:null==eO?void 0:eO[0],initialSticky:!0}),(null==em?void 0:em.length)>0&&(0,s.tZ)(eP,{className:"homepage-weekofpregnancy",data:em||[],defaultWeekIndex:ev-1,isArticle:!0}),(0,s.tZ)("div",{style:{display:"flex",justifyContent:"center",position:"relative",maxWidth:"100%"},id:"article-page-container-wrapper",children:(0,s.tZ)(ee.nV,{id:"article-page-container","data-type-mobile":eb,children:(0,s.BX)(ee.H1,{children:[!eb&&(0,s.tZ)(et,{}),(0,s.tZ)(eI,{}),(0,s.BX)(ee.EM,{children:[(0,s.tZ)(ArticleMainContent,{healthTools:(null==eh?void 0:null===(ed=eh.healthTools)||void 0===ed?void 0:ed.items)||[]}),(0,s.tZ)(ArticleLoading,{})]}),eE?(0,s.tZ)("div",{style:{display:eR?"none":void 0},children:(0,s.tZ)(Z.E,{divId:"div-gpt-ad-sticky",className:"article-bottom-ad",adUnitPath:eA,isMobile:eb,contentId:String(null==eE?void 0:eE.id),customTargetings:eM},String(null==eE?void 0:eE.id))}):null]})})})]})})]})};l(84826)},19206:function(e,t,l){"use strict";l.d(t,{I:function(){return p}});var s=l(67294),d=l(91961);let p=(0,s.memo)(e=>{let{adUnitPath:t,customTargetings:l}=e,p=(0,s.useRef)();return(0,s.useEffect)(()=>{window.googletag=window.googletag||{cmd:[]};let{googletag:e}=window;e.cmd.push(function(){let s=e.defineOutOfPageSlot(t,e.enums.OutOfPageFormat.INTERSTITIAL);p.current=s,s&&((0,d.Tm)(s),s.setTargeting("Pos",["intersitial"]),l&&Object.keys(l).forEach(e=>{e&&s.setTargeting(e,l[e])}),s.addService(e.pubads()),s.setConfig({interstitial:{triggers:{unhideWindow:!0}}}))})},[t]),null},(e,t)=>e.adUnitPath===t.adUnitPath)},50743:function(e,t,l){"use strict";l.d(t,{Cm:function(){return w},Dv:function(){return E},EM:function(){return _},H1:function(){return b},LN:function(){return g},UN:function(){return h},ZY:function(){return f},nV:function(){return y}});var s=l(82729),d=l(15184),p=l(7259),m=l(72660),v=l(38339);function _templateObject(){let e=(0,s._)(["\n position: relative;\n padding: 1rem 0 1rem;\n background: white;\n .translate-button {\n position: absolute;\n top: 0.5rem;\n right: 0;\n }\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,s._)(["\n margin-bottom: 4em;\n opacity: 0;\n transition: opacity 3s ease;\n &[data-show='true'] {\n opacity: 1;\n transition: opacity 0.3s ease;\n }\n"]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,s._)(["\n padding: 0;\n margin-bottom: 0.5rem;\n background: ",";\n "," {\n padding: 0.5rem 0 0;\n margin-bottom: 0;\n }\n"]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,s._)(["\n position: relative;\n background: white;\n --author-width: 330px;\n --author-avatar-width: min(64px, calc(0.2 * var(--author-width)));\n .full-width {\n "," {\n margin-left: calc((-1 * (100vw - min(1170px, 100vw)) / 2) - 90px);\n width: 100vw;\n }\n }\n .article-bottom-ad {\n background-color: transparent;\n /* Mobile bottom bar height */\n margin-bottom: var(--mobile-bottom-height);\n @supports (margin-bottom: env(safe-area-inset-bottom)) {\n margin-bottom: calc(\n env(safe-area-inset-bottom) + var(--mobile-bottom-height)\n );\n }\n "," {\n margin-bottom: 0;\n }\n }\n .inner-container {\n "," {\n display: flex;\n justify-content: center;\n background: white;\n .article-bottom-ad {\n margin-bottom: 0;\n }\n }\n }\n"]);return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,s._)(["\n "," {\n padding-left: 90px;\n }\n"]);return _templateObject4=function(){return e},e}function _templateObject5(){let e=(0,s._)(["\n position: relative;\n min-height: 100vh;\n\n "," {\n flex: 1;\n max-width: 100%;\n }\n"]);return _templateObject5=function(){return e},e}function _templateObject6(){let e=(0,s._)(["\n position: absolute;\n height: 100%;\n"]);return _templateObject6=function(){return e},e}function _templateObject7(){let e=(0,s._)(["\n position: absolute;\n bottom: 0;\n width: 100%;\n height: 450vh;\n pointer-events: none;\n"]);return _templateObject7=function(){return e},e}let h=m.ZP.div.withConfig({componentId:"sc-19858203-0"})(_templateObject()),f=m.ZP.div.withConfig({componentId:"sc-19858203-1"})(_templateObject1()),g=m.ZP.div.withConfig({componentId:"sc-19858203-2"})(_templateObject2(),d.t.colors.white,p.M.mbUp),y=(0,m.ZP)(v.W).withConfig({componentId:"sc-19858203-3"})(_templateObject3(),p.M.mbUp,p.M.mbUp,p.M.mbUp),b=m.ZP.div.withConfig({componentId:"sc-19858203-4"})(_templateObject4(),p.M.mbUp),_=m.ZP.div.withConfig({componentId:"sc-19858203-5"})(_templateObject5(),p.M.mbUp),w=m.ZP.div.withConfig({componentId:"sc-19858203-6"})(_templateObject6()),E=m.ZP.div.withConfig({componentId:"sc-19858203-7"})(_templateObject7())},30513:function(e,t,l){"use strict";l.r(t),l.d(t,{ArticlePageComponent:function(){return ArticlePageComponent}});var s=l(35944),d=l(67294),p=l(23493),m=l.n(p),v=l(76248);l(95903);var h=l(83015),f=l(95386),g=l(24612),y=l(79364),b=l(50176),_=l(11591);let useProgressHook=()=>{let{router:e}=(0,f.h)(),t=(0,h.d)(),{setCurrentProgress:l,setCurrentArticle:s,articles:p,currentArticle:w}=(0,y.WM)(e=>({setCurrentProgress:e.setCurrentProgress,setCurrentArticle:e.setCurrentArticle,articles:e.articles,currentArticle:e.currentArticle}),v.X),E=(0,d.useRef)(w),k=(0,d.useRef)(t),A=(0,d.useRef)(p);E.current=w,k.current=t,A.current=p||[],(0,d.useEffect)(()=>{let t=m()(()=>{b.E.measure(()=>{var t;let d=E.current,p=3.5*window.innerHeight/4;if(d){let e=document.getElementById("a-".concat(null==d?void 0:d.id));if(e){let{top:t,bottom:s}=e.getBoundingClientRect();if(t<=p&&s>=p){k.current&&l(Math.floor((p-t)/(s-t)*100)/100);return}}}null===(t=A.current)||void 0===t||t.some(t=>{if(t){if(t.id===(null==d?void 0:d.id))return!1;let m=document.getElementById("a-".concat(t.id));if(m){let{top:d,bottom:v}=m.getBoundingClientRect();if(d<=p&&v>=p){k.current&&l(Math.floor((p-d)/(v-d)*100)/100),s(t);let m=window.location.pathname.split("/").filter(Boolean).pop(),h=t.permalink.split("/").filter(Boolean).pop();if(h!==m&&!(0,_.$A)()){let l=t.permalink.replace("".concat(g.sb,"/"),"/");e.push({pathname:"/[...slug]",query:{articleId:String(t.id),slug:l.split("/").filter(Boolean)}},l,{shallow:!0,scroll:!1})}return!0}}}})})},300);return document.addEventListener("scroll",t,{passive:!0}),()=>document.removeEventListener("scroll",t)},[])},ProgressHookComp=()=>(useProgressHook(),null);var w=l(98926),E=l(29017),k=l(14292);let ArticlePageComponent=e=>{var t;let{articles:l,postCommentsData:p,isMobileSsr:m}=e,{router:v,locale:h}=(0,f.h)(),{state:{userInfo:g}}=(0,d.useContext)(E.I);(0,d.useEffect)(()=>{if(!(0,_.$A)()){var e,t;v.replace({pathname:v.pathname,query:{...v.query,articleId:l[0].id,source:null!==(t=null==v?void 0:null===(e=v.query)||void 0===e?void 0:e.source)&&void 0!==t?t:""}},v.asPath,{shallow:!0,scroll:!1})}},[l[0].id]),(0,d.useEffect)(()=>{v.beforePopState(e=>{let{url:t}=e,l=t.split("?")[0],s=t.split("?")[1];if("/[...slug]"===l){let e=new URLSearchParams(s);e.forEach((e,t)=>{if("articleId"===t){var l;null===(l=document.getElementById("a-"+e))||void 0===l||l.scrollIntoView()}})}return!0})},[]);let b=(0,d.useMemo)(()=>{m&&w.MV.Vietnam},[m,null===(t=l[0])||void 0===t?void 0:t.permalink]);return(0,s.BX)(y.Ep,{init:{articles:l,currentArticle:l[0],bookmarkIds:(null==g?void 0:g.bookmarks)||[],categories:e.categories||[],totalComment:"number"==typeof(null==p?void 0:p.count)?null==p?void 0:p.count:null},refreshKey:String(l[0].id||""),children:[(0,s.tZ)(ProgressHookComp,{}),b&&(0,s.BX)(s.HY,{children:[(0,s.tZ)("a",{href:b,id:"hidden-app-link",style:{display:"none"},children:b}),(0,s.tZ)("script",{type:"text/javascript",async:!0,dangerouslySetInnerHTML:{__html:"if (window.location.pathname.startsWith('/articles/')) console.log('no app'); else document.getElementById(\"hidden-app-link\")?.click();"}})]}),(0,s.tZ)(k.c2,{...e})]})}},74363:function(e,t,l){"use strict";l.r(t),l.d(t,{InlineDynamicSpotlight:function(){return InlineDynamicSpotlight},InlineDynamicSpotlighthMap:function(){return D}});var s=l(82729),d=l(35944),p=l(67294),m=l(7259),v=l(23493),h=l.n(v),f=l(72660),g=l(76248),y=l(97627),b=l(94189),_=l(45683),w=l(5488),E=l(3601),k=l(83015),A=l(95386),x=l(98926),Z=l(2700),R=l(79364),N=l(50176);function _templateObject(){let e=(0,s._)(["\n "," {\n margin-left: -1rem;\n margin-right: -1rem;\n }\n > div {\n margin-bottom: 0;\n }\n"]);return _templateObject=function(){return e},e}let InlineDynamicSpotlight=e=>{let{spotlightSlug:t,healthTools:l}=e,{locale:s,router:m}=(0,A.h)(),v=(0,k.d)(),{setCurrentProgress:f}=(0,R.WM)(e=>({setCurrentProgress:e.setCurrentProgress}),g.X),[D,H]=(0,p.useState)(void 0);(0,p.useEffect)(()=>{(async()=>{var e,l,d,p,m,v;let h=t.split("/").filter(Boolean),f=(null==h?void 0:h[0])||"",g=(null==h?void 0:h[1])||"",E=(null==h?void 0:h[2])||"",k=Array.isArray(f)?f.join("/"):f,A=await(0,y.d)(_.y.SPOTLIGHT.GET_SPOTLIGHT_LANDING,{params:{slug:k||"",...g&&{groupId:g},...E&&{additionalSlug:E}}});if(!A||(null==A?void 0:A.status)===-1||!(null==A?void 0:A.data))return H(void 0);let{isSoya:R}=(0,w.iz)(f,s),N=(null==A?void 0:null===(e=A.data)||void 0===e?void 0:e.list_sessions)||[],B=N.length,D=(0,b.CC)({...null==A?void 0:A.data,...R&&{list_sessions:[{...null==A?void 0:null===(d=A.data)||void 0===d?void 0:null===(l=d.list_sessions)||void 0===l?void 0:l[0],navigating:[{id_scroll:"aivideo",session_layout:x.FF.SOYA_OPEN_CHAT,title:"Tanya Expert",description:"",icon:"",cta_title:"",type:"open_chat"},...null==A?void 0:null===(v=A.data)||void 0===v?void 0:null===(m=v.list_sessions)||void 0===m?void 0:null===(p=m[0])||void 0===p?void 0:p.navigating,{id_scroll:"cari",session_layout:x.FF.SOYA_EXTERNAL_LINK,title:"Cari Tahu Nutrisi Tepat",description:"",icon:"",cta_title:"",type:"none",url:"https://www.generasimaju.co.id/produk/sgm-eksplor-soya"}]},...N.slice(1,B)]}});if(!(null==A?void 0:A.data)&&"services-connection"===D.type&&-1===D.permalink.search("/spotlight"))return H(void 0);let U=new Date;if(null==D?void 0:D.startDate){let e=new Date(D.startDate);if(isNaN(e.getTime())||U.getTime()e.getTime())return H(void 0)}H({spotlight:D,template:null==D?void 0:D.type,..."services-connection"===D.type&&{pageType:D.listSessions.length>0?"detail":null,spotLightFormatted:await(0,Z.handleFetchMoreData)(D)}})})()},[t]);let U=(0,p.useRef)(null),[z,V]=(0,p.useState)(!1),G=(0,p.useRef)(z);G.current=z,(0,p.useEffect)(()=>{let e=h()(()=>{N.E.measure(()=>{if(U.current){let{top:e,bottom:t}=U.current.getBoundingClientRect(),l=3.5*window.innerHeight/4,s=e<=l&&t>=l;s!==G.current&&V(s),s&&f(Math.floor((l-e)/(t-e)*100)/100)}})},300);return document.addEventListener("scroll",e,{passive:!0}),()=>document.removeEventListener("scroll",e)},[]);let{spotlight:F,pageType:W}=D||{};return((0,p.useEffect)(()=>{var e,l,s,d;z?(null===(l=document.getElementsByClassName("action-bar"))||void 0===l||null===(e=l[0])||void 0===e||e.setAttribute("style","display: none"),m.push({pathname:m.pathname,query:{slug:t.split("/").filter(Boolean)}},void 0,{shallow:!0,scroll:!1})):null===(d=document.getElementsByClassName("action-bar"))||void 0===d||null===(s=d[0])||void 0===s||s.removeAttribute("style")},[z]),null==F?void 0:F.id)?(0,d.tZ)(B,{className:"full-width",ref:U,children:(0,d.tZ)(R.Ep,{init:{currentArticle:F},children:(0,d.tZ)(E.default,{isMobile:v,spotlight:F,healthTools:l||[],pageType:W||null,noReFetch:!0,hideSticky:!0},"".concat(F.groupIdActive,"-").concat(F.additionalSlugActive))})}):null},B=f.ZP.div.withConfig({componentId:"sc-b82a103e-0"})(_templateObject(),m.M.mbDown),D={}},13810:function(e,t,l){"use strict";l.d(t,{J:function(){return usePromoteArticles},f:function(){return f}});var s=l(67294),d=l(36965),p=l(76248),m=l(95386),v=l(79364),h=l(11591);let f={},usePromoteArticles=()=>{let{locale:e}=(0,m.h)(),{articles:t,setArticles:l}=(0,v.WM)(e=>({setArticles:e.setArticles,articles:e.articles}),p.X),g=(0,s.useRef)([]),fetchArticleAndInsertAfterId=async(t,s)=>{e===d.L.Vietnam&&t.map(e=>{(0,h.vX)({slug:e}).then(t=>{t&&l(l=>l.reduce((d,p,m)=>{var v,h,f;let g=l[m+1],y=l.reduce((e,t)=>e.concat(String(t.id)),[]).join(",");return(t.nextArticle=null===(v=t.relatedArticles)||void 0===v?void 0:v.filter(e=>!y.includes(String(e.id)))[0],(null===(h=t.nextArticle)||void 0===h?void 0:h.id)&&(t.relatedArticles=null===(f=t.relatedArticles)||void 0===f?void 0:f.filter(e=>{var l;return e.id!==(null===(l=t.nextArticle)||void 0===l?void 0:l.id)})),String(p.id)!==String(s)||g&&g.permalink===e)?d.concat(p):d.concat([p,t])},[])),g.current=g.current.filter(e=>e!==s)})})};(0,s.useEffect)(()=>{e===d.L.Vietnam&&t.forEach((e,l)=>{let s=f[e.permalink],d=t[l+1];null==s||!s.length||d&&(null==s?void 0:s.includes(d.permalink))||g.current.includes(String(e.id))||(g.current.push(String(e.id)),fetchArticleAndInsertAfterId(s,String(e.id)))})},[t,e])}},11591:function(e,t,l){"use strict";l.d(t,{$A:function(){return isPreviewSlug},X4:function(){return getArticleCardDisplayAuthor},vX:function(){return getArticleBySlug}});var s=l(97627),d=l(94189),p=l(45683),m=l(24612),v=l(1973);async function fetchArticleRelatedCategories(e){var t,l,m;let h=Object.keys(e.category).length>0?e.category:null===(m=e.categories)||void 0===m?void 0:m.sort((e,t)=>t.permalink.length-e.permalink.length)[0];if(!h)return[];let f=h.slug||(0,v.Qu)(h.permalink).split("/").pop(),g=await(0,s.d)(p.y.CATEGORY.GET_CATEGORY_DETAIL,{params:{slug:f||""}}),y=Array.isArray(null==g?void 0:null===(t=g.data)||void 0===t?void 0:t.sub_categories)?null==g?void 0:null===(l=g.data)||void 0===l?void 0:l.sub_categories:[];return y.slice(0,3).map(d.DG)}async function getArticleBySlug(e){var t,l,v;let{slug:h,skipIds:f="",isRelated:g="",requestFrom:y}=e;if(!h)return null;let b=await(0,s.d)(p.y.ARTICLE.GET_ARTICLE_DETAIL,{params:{slug:h.split("/").filter(Boolean).join("/"),skipIds:f,isRelated:g}}),_=null==b?void 0:null===(t=b.data)||void 0===t?void 0:t.redirect_url;if(_)return getArticleBySlug({slug:_,skipIds:f,isRelated:g,requestFrom:y});let w=null==b?void 0:null===(l=b.data)||void 0===l?void 0:l.post;if(!w)return null;let E=(null==b?void 0:null===(v=b.data)||void 0===v?void 0:v.related_articles)||[],k=(0,d.qP)(w);return k.relatedArticles=E.map(d.qP),m.Yx.articleType===m.Iq.ArticleType3?k.relatedCategories=[]:k.relatedCategories=await fetchArticleRelatedCategories(k),k}let getArticleCardDisplayAuthor=e=>{var t,l,s;return(null===(t=e.expert)||void 0===t?void 0:t.name)?{name:e.expert.name,avatar:e.expert.thumbnailAvatar||"".concat(m.Nr,"/avatar.jpg"),permalink:e.expert.permalink||"",type:"expert"}:(null===(l=e.reviewer)||void 0===l?void 0:l.displayName)?{name:e.reviewer.displayName,avatar:e.reviewer.thumbnailAvatar||"".concat(m.Nr,"/avatar.jpg"),permalink:e.reviewer.profileUrl||"",type:"reviewer"}:(null===(s=e.author)||void 0===s?void 0:s.displayName)?{name:e.author.displayName,avatar:e.author.thumbnailAvatar||"".concat(m.Nr,"/avatar.jpg"),permalink:e.author.profileUrl||"",type:"author"}:{name:"",avatar:"".concat(m.Nr,"/avatar.jpg"),permalink:"",type:"author"}},isPreviewSlug=()=>window.location.pathname.includes("/preview")},84359:function(e,t,l){"use strict";l.d(t,{$:function(){return PrePageTrackingScript},L:function(){return PostPageTrackingScript}});var s=l(35944),d=l(9008),p=l.n(d);let PrePageTrackingScript=()=>(0,s.BX)(s.HY,{children:[(0,s.BX)(p(),{children:[(0,s.tZ)("script",{async:!0,src:"https://www.googletagmanager.com/gtag/js?id=DC-12730486"},"special-spotlight-tracking"),(0,s.tZ)("script",{dangerouslySetInnerHTML:{__html:"window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n \n gtag('config', 'DC-12730486');"}},"special-spotlight-tracking2")]}),(0,s.tZ)("script",{dangerouslySetInnerHTML:{__html:"!function(f,b,e,v,n,t,s)\n{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\nn.callMethod.apply(n,arguments):n.queue.push(arguments)};\nif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\nn.queue=[];t=b.createElement(e);t.async=!0;\nt.src=v;s=b.getElementsByTagName(e)[0];\ns.parentNode.insertBefore(t,s)}(window, document,'script',\n'https://connect.facebook.net/en_US/fbevents.js');\nfbq('init', '779154057297874');\nfbq('track', 'PageView');"}}),(0,s.tZ)("noscript",{children:(0,s.tZ)("img",{height:"1",width:"1",style:{display:"none"},src:"https://www.facebook.com/tr?id=779154057297874&ev=PageView&noscript=1",alt:""})}),(0,s.tZ)("script",{dangerouslySetInnerHTML:{__html:'!function (w, d, t) {\n w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=[""page"",""track"",""identify"",""instances"",""debug"",""on"",""off"",""once"",""ready"",""alias"",""group"",""enableCookie"",""disableCookie""],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i(0,s.BX)(s.HY,{children:[(0,s.tZ)("script",{src:"https://js.adsrvr.org/up_loader.1.1.0.js",type:"text/javascript"}),(0,s.tZ)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:'ttd_dom_ready( function() {\nif (typeof TTDUniversalPixelApi === \'function\') {\n var universalPixelApi = new TTDUniversalPixelApi();\n universalPixelApi.init("3dc1drw", ["ej4eafq"], "https://insight.adsrvr.org/track/up");\n}\n});'}})]})},27932:function(e,t,l){"use strict";l.d(t,{E:function(){return MGIDScript},k:function(){return InnerMGIDScript}});var s=l(35944),d=l(67294),p=l(9008),m=l.n(p),v=l(83015),h=l(95386),f=l(30326);let MGIDScript=e=>{var t;let{articlePath:l,initMgid:d}=e,{locale:p}=(0,h.h)(),m=(0,v.d)(),g=null===(t=f.T[p])||void 0===t?void 0:t[m?"mobile":"desktop"];if(!g)return null;let y=g.divId,b=g.script;return y&&b?(0,s.tZ)(InnerMGIDScript,{initMgid:d,divId:y,script:b,articlePath:l}):null},InnerMGIDScript=e=>{var t;let{divId:l,script:p,initMgid:v,articlePath:g}=e,{locale:y}=(0,h.h)(),[b,_]=(0,d.useState)(!1),[w,E]=(0,d.useState)(!1),k=(0,d.useRef)(!1),A=(0,d.useRef)(null);(0,d.useEffect)(()=>{var e;let t=null===(e=A.current)||void 0===e?void 0:e.shadowRoot;t||k.current||!v?t&&!v&&(_(!1),E(!1)):(_(!0),setTimeout(()=>{E(!0)},1e3)),k.current=!!v},[v]);let x=(null===(t=f.T[y])||void 0===t?void 0:t.excludes)||[];return g&&x.some(e=>g.startsWith("/"+e+"/"))?null:(0,s.BX)(s.HY,{children:[(0,s.tZ)("div",{ref:A,id:b?l:void 0}),b&&w&&(0,s.tZ)(m(),{children:(0,s.tZ)("script",{src:p,async:!0})})]})}},3319:function(e,t,l){"use strict";l.d(t,{Y:function(){return CurrentArticleOnlyDisplay}});var s=l(35944),d=l(76248),p=l(79364);let CurrentArticleOnlyDisplay=e=>{let{articleId:t,children:l,placeholderSize:m}=e,{currentArticle:v}=(0,p.WM)(e=>({currentArticle:e.currentArticle}),d.X),h=String(null==v?void 0:v.id)===t;return h?(0,s.tZ)(s.HY,{children:l}):(null==m?void 0:m.length)?(0,s.tZ)("div",{style:{width:null==m?void 0:m[0],height:null==m?void 0:m[1]}}):null}},22387:function(e,t,l){"use strict";l.d(t,{p:function(){return ey},d:function(){return eb}});var s=l(35944),d=l(67294),p=l(74706),m=l(36965),v=l(59018),h=l(66321),f=l(36380),g=l.n(f),y=l(5152),b=l.n(y),_=l(17563),w=l(82191),E=l(76248);l(95903);var k=l(15184),A=l(13023),x=l(72445),Z=l(69876),R=l(97564),N=l(86896),B=d.memo(()=>{let{formatMessage:e}=(0,N.Z)();return(0,s.tZ)(x.W,{fluid:!0,mb:16,sx:{borderRadius:8,padding:"12px 16px",backgroundColor:k.t.colors.yellow50},children:(0,s.BX)(Z.k,{gap:10,w:"100%",children:[(0,s.tZ)("div",{children:(0,s.tZ)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,s.tZ)("path",{d:"M22.2389 18.451L13.4419 3.816C13.1349 3.305 12.5959 3 11.9999 3C11.4039 3 10.8649 3.305 10.5589 3.815L1.76088 18.451C1.44888 18.97 1.44088 19.619 1.73888 20.146C2.03588 20.673 2.59688 21 3.20288 21H20.7979C21.4029 21 21.9649 20.673 22.2619 20.146C22.5599 19.619 22.5509 18.97 22.2389 18.451ZM12.4999 18H11.4999C11.2239 18 10.9999 17.776 10.9999 17.5V16.5C10.9999 16.224 11.2239 16 11.4999 16H12.4999C12.7759 16 12.9999 16.224 12.9999 16.5V17.5C12.9999 17.776 12.7759 18 12.4999 18ZM11.9999 14C11.4479 14 10.9999 13.552 10.9999 13V10C10.9999 9.448 11.4479 9 11.9999 9C12.5519 9 12.9999 9.448 12.9999 10V13C12.9999 13.552 12.5519 14 11.9999 14Z",fill:"#FE921D"})})}),(0,s.BX)(R.K,{spacing:4,children:[(0,s.tZ)(A.T,{size:"s2",type:"semiBold",children:e({id:"tools.disclaimer",defaultMessage:"Disclaimer"})}),(0,s.tZ)(A.T,{size:"p1",color:k.t.colors.gray800,children:e({id:"articlePage.disclaimer"})})]})]})})}),D=l(17303),H=l(39139),U=l(73940),z=l(46108),V=l(10166),G=l(7259);let F=(0,V.Z)("div",{target:"e1xnq2fo0"})("position:relative;min-height:280px;height:0;padding-top:66.66%;margin-top:1rem;margin-right:-1rem;margin-left:-1rem;background-color:",k.t.colors.neutral50,";",G.M.mbUp,"{margin-right:0;margin-left:0;}"),ArticleFeatureImage=e=>{let{featureImage:t,title:l,priority:d}=e;return t?(0,s.tZ)(F,{children:(0,s.tZ)(z.R,{layout:"fill",src:t,alt:l||"Article Image",sizes:"(max-width: 768px) 100vw, (max-width: 1170px) 60vw, 700px",priority:d,style:{contentVisibility:"auto"},...d?{placeholder:void 0,blurDataURL:void 0}:{}})}):null};var W=l(14145),X=l(10981),q=l(5504),K=l(83015),Y=l(95386),$=l(63116);let Q=X.C.getAssetPath("source-opened.svg"),J=X.C.getAssetPath("source-closed.svg"),ee=d.memo(e=>{let{article:t}=e,{formatMessage:l}=(0,N.Z)(),{locale:m}=(0,Y.h)(),v=(0,K.d)(),[h,f]=(0,d.useState)(J),[g,y]=(0,d.useState)("none");return(0,d.useEffect)(()=>{y("block")},[]),(0,s.tZ)(p.m,{chevronPosition:"left",chevron:(0,s.tZ)("img",{src:h,alt:"",loading:"lazy"}),styles:{item:{border:"1px solid #E4E8EC",borderRadius:"8px",marginBottom:"16px"},control:{padding:"16px",textTransform:"uppercase"},panel:{backgroundColor:"#ffffff"},content:{display:g,a:{color:k.t.colors.primaryBase}}},sx:{contentVisibility:"auto",containIntrinsicSize:"100px"},onChange:e=>{e?f(Q):f(J)},children:(0,s.BX)(p.m.Item,{value:"history",children:[(0,s.tZ)(p.m.Control,{children:(0,s.tZ)(A.T,{size:"c2",type:"bold",color:k.t.colors.gray600,children:l({id:"articlePage.history"})})}),(0,s.tZ)(p.m.Panel,{children:(0,s.tZ)(x.W,{p:6,pt:v?0:6,children:(0,s.BX)(q.T,{bulletSize:8,lineWidth:1,styles:{item:{"&::before":{borderColor:k.t.colors.primaryBase}},itemBody:{transform:"translateY(-8px)"},itemBullet:{borderColor:k.t.colors.primaryBase,backgroundColor:"#ffffff","&[data-active='true']":{backgroundColor:k.t.colors.primaryBase}}},children:[(0,s.tZ)(q.T.Item,{active:!0,title:(0,s.tZ)(A.T,{size:v?"s3":"s4",type:"semiBold",children:l({id:"articlePage.history.current",defaultMessage:"Current Version"})})}),(0,s.tZ)(q.T.Item,{title:(0,s.tZ)(A.T,{size:v?"s3":"s4",type:"semiBold",children:(0,$.m)(t.postModified,m,"YYYY-MM-DD HH:mm:ss")}),children:(0,s.tZ)(U.Bi,{expert:null==t?void 0:t.expert,author:null==t?void 0:t.author,articleReviewed:null==t?void 0:t.articleReviewed,updater:null==t?void 0:t.editLast,reviewer:null==t?void 0:t.reviewer,updatedAt:(null==t?void 0:t.modifiedTime)||""})})]})})})]})})});var et=l(44038),en=l(19206),eo=l(2251),ei=l(20868),er=l(24612),ea=l(29017),el=l(79364),es=l(91961),ec=l(3319),ed=l(20254),eu=l(27932),ep=l(20948),em=l(88005);let ev=b()(()=>Promise.all([l.e(429),l.e(786),l.e(8224)]).then(l.bind(l,78224)).then(e=>e.ArticleContents),{loadableGenerated:{webpack:()=>[78224]}}),eh=b()(()=>l.e(6061).then(l.bind(l,16061)).then(e=>e.OpeningOfArticle),{loadableGenerated:{webpack:()=>[16061]}}),ef=b()(()=>Promise.all([l.e(429),l.e(4190)]).then(l.bind(l,14190)).then(e=>e.Sources),{loadableGenerated:{webpack:()=>[14190]}}),eg=b()(()=>l.e(6883).then(l.bind(l,36883)).then(e=>e.ArticleBottomContainer),{loadableGenerated:{webpack:()=>[36883]}}),processHTML=e=>{var t;let{htmlContent:l}=e,s=h.zD(l,null,!1);s("*").each((e,t)=>{let l=s(t).attr("style")||"",d=l.split(";").filter(e=>e.includes("padding")||e.includes("margin")).join(";");d?s(t).attr("style",d):s(t).removeAttr("style")}),s("a").each((e,t)=>{let l=s(t).attr("href")||"",d=l.replace("http://","https://"),p=s(t).text().replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(//g,">");s(t).attr("href",d).attr("data-event-category","Internal Link Click on Article").attr("data-event-action",p).attr("data-event-label",d);let m=!d.startsWith("http")||Object.values(eo.domainLocales).concat(["hellohealthgroup.com","localhost:[a-z0-9]+"]).some(e=>{let t=RegExp("^(https?://)?([a-z0-9]+[.])*".concat(e,"(/|$)"),"i");return t.test(d)});m&&s(t).removeAttr("target").removeAttr("rel")}),s("img").each((e,t)=>{let l=s(t).attr("src")||"";s(t).attr("loading","lazy").attr("src",l.replace("http://","https://"))}),s(".continue-reading-articles").remove(),s("p").each(function(){(""===s(this).html()||" "===s(this).html())&&s(this).remove()}),s("iframe").each((e,t)=>{let l=s(t).attr("src")||"",d=_.parseUrl(l),p=_.stringifyUrl({url:d.url.replace("http://","https://"),query:{...d.query,autoplay:1,mute:1}});s(t).attr("src",p).attr("loading","lazy").attr("allow","autoplay")}),s("#mc4wp-form-1").attr("style","display: none");let d=null===(t=s.html())||void 0===t?void 0:t.split("\n"),p=[{html:""}];return d.forEach((e,t)=>{if(e.includes("wp-embedded-content")){if(e.includes("blockquote"))return;let l=/href="(.*?)"/gi.exec(e),s=(null==l?void 0:l[1])||"";s.includes("/embed")&&(s=s.slice(0,s.indexOf("/embed"))),s.startsWith("/")||(s=(s=s.replace("https://","").replace("http://","")).slice(s.indexOf("/")));let m=s;if(!s){let t=/src="(.*?)"/gi.exec(e),l=(null==t?void 0:t[1])||"";l.includes("/embed")&&(l=l.slice(0,l.indexOf("/embed"))),s.startsWith("/")||(s=(s=s.replace("https://","").replace("http://","")).slice(s.indexOf("/"))),m=l}m&&(p[p.length-1]&&(p[p.length-1].injectedSlug=m),t+1{var t,l,h,f,y;let{article:b,index:_,defaultCommentsWithReplies:k}=e,[A,x]=(0,d.useTransition)(),{locale:Z}=(0,Y.h)(),R=(0,K.d)(),{state:N}=(0,d.useContext)(ea.I),z=null==N?void 0:N.userInfo,V=null==N?void 0:N.collectingAction,{currentArticle:G}=(0,el.WM)(e=>({currentArticle:e.currentArticle}),E.X);(0,d.useEffect)(()=>{setTimeout(()=>{let e=document.querySelectorAll("#a-".concat(b.id||"",' [data-url*="typeform.com/"], #a-').concat(b.id||"",' [href*="typeform.com/"], #a-').concat(b.id||""," [data-tf-widget], #a-").concat(b.id||""," [data-tf-live]"));e.forEach(e=>getTypeForm(e))},1e3)},[]);let getTypeForm=e=>{if(e){if(e.getAttribute("data-tf-live")){e.setAttribute("data-tf-auto-resize","true"),e.setAttribute("data-tf-auto-focus","false");let t=document.createElement("script");t.src="//embed.typeform.com/next/embed.js",document.body.appendChild(t),setTimeout(()=>{document.body.removeChild(t)},1e3)}else{var t;let l=e.getAttribute("data-url")||e.getAttribute("href")||"",s=(l?null===(t=l.match(/\/to\/([^/]+)\/?/))||void 0===t?void 0:t[1]:e.getAttribute("data-tf-widget"))||"";s&&(0,v.createWidget)(s,{autoFocus:!1,autoResize:!0,container:e})}}},F=(0,es.WV)(Z,(0,es.gV)(b.permalink)),X=(0,es.od)({countryAdTag:(0,es.Em)(Z,{isMobile:!1}),contentAdTag:F}),q=(0,es.od)({countryAdTag:(0,es.Em)(Z,{isMobile:!0}),contentAdTag:F}),$=(0,es.od)({countryAdTag:(0,es.Em)(Z,{isMobile:R}),contentAdTag:F}),[Q,J]=(0,d.useState)(()=>0===_?processHTML({htmlContent:b.postContent||""}):[]);(0,d.useEffect)(()=>{0!==_&&x(()=>{J(processHTML({htmlContent:b.postContent||""}))})},[b.postContent]);let eo=(0,d.useMemo)(()=>{let e=/name="content_id".*?content="(.*?)"/gi.exec(b.metaTag||"");return(null==e?void 0:e[1])||""},[b.metaTag]),eb={Is_Sponsored:[(null==b?void 0:b.isSponsored)?1:0],Is_Expert_Article:[(null==b?void 0:null===(t=b.expert)||void 0===t?void 0:t.id)||(null==b?void 0:null===(h=b.articleReviewed)||void 0===h?void 0:null===(l=h.expert)||void 0===l?void 0:l.ID)&&(null==b?void 0:null===(f=b.articleReviewed)||void 0===f?void 0:f.is_author)?1:0],Is_Affiliate:[(null==b?void 0:b.hasAffiliate)?1:0],Keywords:[g()((0,ep.Xm)((null==b?void 0:b.metaTag)||"","content_tags")||"")]},{isNavCollapse:e_,isNavBanner:eC,isNavSponsor:ew}=(0,em.P)(e=>({isNavCollapse:e.isNavCollapse,isNavBanner:e.isNavBanner,isNavSponsor:e.isNavSponsor}),E.X),eO=(0,d.useMemo)(()=>"article-desktop-ad ".concat(!e_&&eC?"avoid-nav-banner":""," ").concat(ew?"avoid-nav-sponsor":""),[e_,eC,ew]),eE=(0,ei.U)(),ek=(0,d.useMemo)(()=>{var e;if(R||Z!==m.L.Vietnam)return null;let t=null===(e=b.primaryCategory)||void 0===e?void 0:e.permalink,l="";Object.entries(er.po[Z]).every(e=>{let[s,d]=e;return null==t||!t.includes(d)||(l=s,!1)});let s="general";return Object.entries(ey).every(e=>{let[t,d]=e;return!d.includes(l)||(s=t,!1)}),{template:s}},[R,b.primaryCategory,Z]),eT=(0,d.useMemo)(()=>{var e;let t=null===(e=b.primaryCategory)||void 0===e?void 0:e.permalink;if(!t)return!1;let l=er.po[Z];return Z===m.L.Indonesia||Z===m.L.Taiwan||Z===m.L.Malaysia||Z===m.L.Thailand?!(t.includes("/".concat(l.parenting,"/"))||t.includes("/".concat(l.pregnancy,"/"))):Z===m.L.India||Z===m.L.PhilippinesEnglish||Z===m.L.PhilippinesTagalog},[b.primaryCategory,Z]);return(0,d.useEffect)(()=>{setTimeout(()=>{let e=document.querySelectorAll(".content-recommendation .title");for(let t of e)(null==t?void 0:t.textContent)===""&&(t.style.display="none")},500)},[]),(0,s.BX)(ed.o8,{children:[eT&&String(null==G?void 0:G.id)===String(b.id)&&(0,s.tZ)(en.I,{customTargetings:{...eb,Content_ID:String(b.id)},adUnitPath:$}),er.DY.includes(Z)&&(0,s.tZ)(et.z,{articleId:b.id,articleTitle:b.postTitle,categories:b.categories,articleSlug:b.permalink,defaultCommentsWithReplies:k}),(0,s.BX)(ed.UZ,{id:"a-".concat(b.id),"data-url":b.permalink,children:[(0,s.BX)(ed.H6,{children:[(0,s.tZ)(eh,{article:b}),!!(null==b?void 0:null===(y=b.jumpingLink)||void 0===y?void 0:y.length)&&(0,s.BX)(s.HY,{children:[(0,s.tZ)(ed.fK,{className:"article-jumplinks prefont",children:null==b?void 0:b.jumpingLink.map((e,t)=>(0,s.tZ)("li",{children:(0,s.tZ)("span",{dangerouslySetInnerHTML:{__html:(0,ep.mG)(e,eE)}})},t))}),(0,s.tZ)("script",{dangerouslySetInnerHTML:{__html:"\n document.fonts.ready.then(function () {\n var articleJumplinks = document.querySelector('.article-jumplinks')\n if (articleJumplinks) {\n articleJumplinks.classList.remove('prefont')\n }\n })"}})]}),(0,s.tZ)(ArticleFeatureImage,{featureImage:b.featureImage,title:b.postTitle,priority:0===_}),(0,s.tZ)(w.Z,{whenVisible:!0,style:{marginBlock:"1em"},children:(0,s.tZ)(ev,{article:b,formattedPostContents:Q,adUnitPathMobile:q,adUnitPath:$,articleContentId:eo,articleId:String(b.id),articleLink:b.permalink,articleCategories:b.categories,isMobile:R,faqs:null==b?void 0:b.faqs,customTargetings:eb,isLoggedIn:!!(null==z?void 0:z.id),articleIsPremium:b.isPremium,newsletter:b.subscriptionBanner,unifiedProfileSubot:b.unifiedProfileSubot,collectingAction:V})}),(0,s.tZ)("span",{className:"end-of-article"}),(0,s.tZ)(B,{}),b.sources&&(0,s.tZ)(w.Z,{whenVisible:!0,children:(0,s.tZ)(ef,{sources:b.sources})}),b&&(0,s.tZ)(w.Z,{whenVisible:!0,children:(0,s.tZ)(ee,{article:b})}),R&&(0,s.tZ)(W.b,{style:{marginBottom:"16px"}})]}),(0,s.tZ)(w.Z,{whenVisible:!0,children:(0,s.tZ)(eg,{isMobile:R,relatedArticles:b.relatedArticles})}),(0,s.tZ)(eu.E,{initMgid:(null==G?void 0:G.id)===b.id,articlePath:b.permalink})]}),(0,s.BX)(ed.Gt,{children:[(0,s.tZ)(U.b3,{expert:b.expert,author:b.author,articleReviewed:b.articleReviewed,reviewer:b.reviewer||void 0,typeUpdate:new Date(b.postDate)==new Date(b.postModified)?"published":"lastUpdated",updatedAt:b.modifiedTime||""}),(0,s.tZ)(ec.Y,{articleId:String(null==b?void 0:b.id),placeholderSize:[0,0],children:(0,s.tZ)("div",{className:"hhg-lead-sidebar",style:{maxWidth:"100%"}})}),(0,s.BX)("div",{className:"article-desktop-ad-container",children:[(0,s.tZ)("div",{className:"article-desktop-ad-wrapper",children:(0,s.tZ)(ec.Y,{articleId:String(null==b?void 0:b.id),placeholderSize:[300,250],children:(0,s.tZ)(H.AdBlock,{className:eO,adUnitPath:X,size:[[300,250],[300,600]],divId:"div-gpt-ad-topbanner-desktop-"+eo,pos:["TopBanner"],contentId:eo,isHidden:R,customTargetings:eb,...Z===m.L.Vietnam?{onlyRefreshInview:!0,refreshInterval:30}:{}})})}),!R&&Z===m.L.Vietnam&&(0,s.tZ)(p.A,{href:"https://hellobacsivn.page.link/app","data-event-category":"App Banner","data-event-action":"Article Position 25%","data-event-label":eE,children:(0,s.tZ)(D._,{type:null==ek?void 0:ek.template,my:16})}),(0,s.tZ)(W.b,{}),(0,s.tZ)("div",{className:"article-desktop-ad-wrapper",children:(0,s.tZ)(ec.Y,{articleId:String(null==b?void 0:b.id),placeholderSize:[300,250],children:(0,s.tZ)(H.AdBlock,{className:eO,adUnitPath:X,size:[[300,250],[300,600]],divId:"div-gpt-ad-midbanner1-desktop-"+eo,pos:["MidBanner1"],contentId:eo,isHidden:R,customTargetings:eb,...Z===m.L.Vietnam?{onlyRefreshInview:!0,refreshInterval:30}:{}})})}),(0,s.tZ)("div",{className:"article-desktop-ad-wrapper",children:(0,s.tZ)(ec.Y,{articleId:String(null==b?void 0:b.id),placeholderSize:[300,250],children:(0,s.tZ)(H.AdBlock,{className:eO,adUnitPath:X,size:[[300,250],[300,600]],divId:"div-gpt-ad-midbanner2-desktop-"+eo,pos:["MidBanner2"],contentId:eo,isHidden:R,customTargetings:eb,...Z===m.L.Vietnam?{onlyRefreshInview:!0,refreshInterval:30}:{}})})})]})]})]})},(e,t)=>{var l,s;return(null===(l=e.article)||void 0===l?void 0:l.id)===(null===(s=t.article)||void 0===s?void 0:s.id)})},47902:function(e,t,l){"use strict";l.d(t,{q:function(){return DiscoverHead}});var s=l(35944),d=l(67294),p=l(25935),m=l(9008),v=l.n(m),h=l(2251),f=l(95386),g=l(24612);let DiscoverHead=e=>{var t,l,m,y,b,_,w,E,k,A,x;let Z,{SEOData:R={},noUsingRouterPush:N=!1,languageOptions:B=[]}=e,{DEPLOY_ENV:D}=g.ENV,{totalPages:H,currentPage:U,title:z="",description:V="",image:G,type:F,customMetaData:W=[],isIndexable:X=!0,hasNoCanonical:q=!1}=R,{locale:K,router:{pathname:Y,query:$,push:Q}}=(0,f.h)(),J="".concat(g.sb).concat(Y);Object.keys($).forEach(e=>{let t=$[e];t&&Array.isArray(t)&&(J=J.replace("[...".concat(e,"]"),t.join("/"))),"string"==typeof t&&Y.endsWith("[".concat(e,"]"))&&(J=J.replace("[".concat(e,"]"),t))});let ee=(0,d.useMemo)(()=>(null==B?void 0:B.length)>=2?B.map(e=>e.label===g.K4.EN?{...e,label:"en-PH"}:e.label===g.K4.FIL?{...e,label:"tl-PH"}:e):[],[B]);(0,d.useEffect)(()=>{let replaceClick=e=>{if(e&&e.target){let t=e.target;"A"!=t.nodeName||t.closest(".no-replace-click")||"_blank"===t.target||(e.preventDefault(),Q(t.href))}};return()=>{N||window.document.body.removeEventListener("click",replaceClick)}},[]);let et="/"===J?"":"/";if(R.apiMetaData&&"string"==typeof R.apiMetaData){let e=null===(k=R.apiMetaData)||void 0===k?void 0:k.match(/(.*)<\/title>/),t=" - Page ".concat(U," of ").concat(H),l=U&&1!==U&&e&&e[0]&&e[1]?R.apiMetaData.replace(e[0],e[0].includes("-")?e[0].replace("-",t+" - "):"".concat(e[1].concat(t),"")):R.apiMetaData;try{Z=(0,p.ZP)(l,{trim:!0,replace:e=>{e.attribs&&Object.keys(e.attribs).forEach(t=>{t.includes('"')&&delete e.attribs[t]})}})}catch(e){console.error(e)}let d=null==Z?void 0:Z.some(e=>{var t;return(null===(t=e.props)||void 0===t?void 0:t.property)==="og:image"});if(G&&!d&&(Z=[...Z,(0,s.tZ)("meta",{property:"og:image",content:G},"og:image"),(0,s.tZ)("meta",{property:"og:image:secure_url",content:G},"og:image:secure_url"),(0,s.tZ)("meta",{property:"og:image:width",content:"1200"},"og:image:width"),(0,s.tZ)("meta",{property:"og:image:height",content:"630"},"og:image:height"),(0,s.tZ)("meta",{name:"twitter:image",content:G},"twitter:image")]),!d&&!G){let e="https://".concat(h.domainLocales[K]).concat(g.Nr,"/").concat(K,".png");Z=[...Z,(0,s.tZ)("meta",{property:"og:image",content:(null===(A=R.openGraph)||void 0===A?void 0:A.image)||e||""},"og:image"),(0,s.tZ)("meta",{property:"og:image:secure_url",content:(null===(x=R.openGraph)||void 0===x?void 0:x.image)||e},"og:image:secure_url"),(0,s.tZ)("meta",{property:"og:image:width",content:"1200"},"og:image:width"),(0,s.tZ)("meta",{property:"og:image:height",content:"630"},"og:image:height")]}}let en="https://".concat(h.domainLocales[K]).concat(g.Nr,"/").concat(K,".png");return(0,s.BX)(v(),{children:[(0,s.tZ)("meta",{charSet:"UTF-8"}),(0,s.tZ)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"}),(0,s.tZ)("meta",{name:"google",content:"notranslate"}),(0,s.tZ)("meta",{name:"robots",content:X&&"production"===D?"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1":"noindex"}),(0,s.tZ)("meta",{property:"fb:app_id",content:"653713035016537"}),W.map((e,t)=>(0,s.tZ)("meta",{...e},"custom-meta-".concat(t))),(0,s.tZ)("meta",{name:"theme-color",content:"#2c87f3"}),(0,s.tZ)("meta",{name:"page_type",content:"Home"}),(0,s.tZ)("meta",{name:"page_platform",content:"WEB"}),(0,s.tZ)("meta",{name:"page_language",content:K}),ee&&ee.length>=2?ee.map(e=>(0,s.tZ)("link",{rel:"alternate",hrefLang:e.label,href:"https://".concat(h.domainLocales[K]).concat(e.value)},e.value)):(0,s.tZ)("link",{rel:"alternate",href:"https://".concat(h.domainLocales[K]).concat(J).concat(et)}),(0,s.tZ)("meta",{name:"ahrefs-site-verification",content:"46e7521a2b89a1013149c4685bbe02a1d36a4732fef98655142b829bc87cba4d"}),!Z&&(0,s.BX)(s.HY,{children:[(0,s.tZ)("title",{children:null===(t=R.openGraph)||void 0===t?void 0:t.title}),!q&&(0,s.tZ)("link",{rel:"canonical",href:"https://".concat(h.domainLocales[K]).concat(J).concat(et)}),(0,s.tZ)("meta",{name:"description",content:V||(null===(l=R.openGraph)||void 0===l?void 0:l.description)}),R.schemaData&&(0,s.tZ)("script",{type:"application/ld+json",className:"yoast-schema-graph",dangerouslySetInnerHTML:{__html:R.schemaData}}),(0,s.tZ)("meta",{property:"og:locale",content:K}),(0,s.tZ)("meta",{property:"og:type",content:F||"website"}),(0,s.tZ)("meta",{property:"og:title",content:(null===(m=R.openGraph)||void 0===m?void 0:m.title)||z}),(0,s.tZ)("meta",{property:"og:description",content:(null===(y=R.openGraph)||void 0===y?void 0:y.description)||V}),(0,s.tZ)("meta",{property:"og:url",content:"https://".concat(h.domainLocales[K]).concat(J,"/")}),(0,s.tZ)("meta",{property:"og:site_name",content:g.CX[K].SITE_NAME_FORMATTED}),(0,s.tZ)("meta",{property:"og:image",content:(null===(b=R.openGraph)||void 0===b?void 0:b.image)||G||en||""}),(0,s.tZ)("meta",{property:"og:image:secure_url",content:(null===(_=R.openGraph)||void 0===_?void 0:_.image)||G||en}),(0,s.tZ)("meta",{property:"og:image:width",content:"1200"}),(0,s.tZ)("meta",{property:"og:image:height",content:"630"}),(0,s.tZ)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,s.tZ)("meta",{name:"twitter:title",content:(null===(w=R.twitter)||void 0===w?void 0:w.title)||z}),(0,s.tZ)("meta",{name:"twitter:description",content:V}),(0,s.tZ)("meta",{name:"twitter:image",content:(null===(E=R.twitter)||void 0===E?void 0:E.image)||G})]}),(g.rF[K]||[]).map((e,t)=>"link"===e.type?(0,s.tZ)("link",{rel:e.rel,href:e.href,sizes:e.sizes},"favicon-".concat(t)):"meta"===e.type?(0,s.tZ)("meta",{name:e.name,content:e.content},t):null),Z,z&&(0,s.tZ)("title",{children:z})]})}},78232:function(e,t,l){"use strict";var s=l(35944),d=l(67294),p=l(61362);let ErrorBoundary=class ErrorBoundary extends d.Component{static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught React Boundary error:",e,t),(0,p.Tb)("React Boundary Error",{extra:{error:e,errorInfo:t}})}render(){return this.state.hasError?this.props.fallback||(0,s.tZ)(s.HY,{}):this.props.children||(0,s.tZ)(s.HY,{})}constructor(...e){super(...e),this.state={hasError:!1}}};t.Z=ErrorBoundary},43272:function(e,t,l){"use strict";l.d(t,{x:function(){return NavigatorLayout},c:function(){return getDefaultLanguageOptions}});var s=l(35944),d=l(78232),p=l(95386),m=l(24612),v=l(67294),h=l(36808),f=l.n(h),g=l(5152),y=l.n(g),b=l(86896),_=l(2251);let w=y()(()=>Promise.all([l.e(429),l.e(1930),l.e(8373),l.e(3379),l.e(7206),l.e(2471),l.e(7499),l.e(5657),l.e(2578)]).then(l.bind(l,92656)).then(e=>e.default),{loadableGenerated:{webpack:()=>[92656]},ssr:!1}),E=y()(()=>Promise.all([l.e(429),l.e(1930),l.e(9314)]).then(l.bind(l,29314)).then(e=>e.LeavePageConfirmPopup),{loadableGenerated:{webpack:()=>[29314]},ssr:!1}),k=y()(()=>Promise.all([l.e(8473),l.e(429),l.e(1930),l.e(8373),l.e(3379),l.e(7621),l.e(7206),l.e(6380),l.e(9367)]).then(l.bind(l,19367)).then(e=>e.CookieAcceptConfirm),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),BelowMainContent=()=>{var e;let{locale:t,router:{asPath:l}}=(0,p.h)(),[h,g]=(0,v.useState)(!1),[y,A]=(0,v.useState)(!1),[x,Z]=(0,v.useTransition)(),{formatMessage:R}=(0,b.Z)();(0,v.useEffect)(()=>{Z(()=>{g(m.P8.includes(t)&&!f().get(m.gV))}),setTimeout(()=>{Z(()=>{A(!0)})},1e3)},[]),(0,v.useEffect)(()=>{let e=document.getElementsByTagName("body")[0];h?e.classList.add("hasCookieConfirm"):e.classList.remove("hasCookieConfirm")},[h]);let N=(0,v.useCallback)(()=>{let e={adConsentGranted:!0,analyticsConsentGranted:!0,functionalityConsentGranted:!0,personalizationConsentGranted:!0,securityConsentGranted:!0};f().set(m.gV,JSON.stringify(e),{domain:"development"===m.ENV.NEXT_PUBLIC_DEPLOY_ENV?"localhost":".".concat(_.domainLocales[t])}),g(!1),window.consentListeners.forEach(t=>{t(e)})},[g]);return(0,s.BX)(s.HY,{children:[(0,s.tZ)("div",{id:"mantine-modal-target",style:{position:"relative",zIndex:305},children:y&&(0,s.BX)(s.HY,{children:[(0,s.tZ)(d.Z,{children:(0,s.tZ)(w,{})}),(0,s.tZ)(d.Z,{children:(0,s.tZ)(E,{})})]})}),h&&y?(0,s.tZ)(d.Z,{children:(0,s.tZ)(k,{theme:"helloSites",className:"cookie-confirm-box",title:R({id:"cookiePolicies.modal.title",defaultMessage:"Please accept our privacy policy"}),description:R({id:"cookiePolicies.modal.description",defaultMessage:"Hello Health Group uses cookies to improve your experience and to show you personalized ads"}),policiesUrl:"/static".concat(null===(e=m.p[t])||void 0===e?void 0:e.PRIVACY_POLICY),onAcceptClick:N,translations:{acceptButton:R({id:"cookiePolicies.modal.accept",defaultMessage:"Accept"}),policiesButton:R({id:"cookiePolicies.modal.ourPolicies",defaultMessage:"Our Policies"})},trackingAttributes:{dataEventCategory:"Consent Pop Up",dataEventAction:"Accept Click",dataEventLabel:"https://".concat(_.domainLocales[t]).concat(m.sb).concat(l)}})}):void 0]})};var A=l(47902),x=l(38575),Z=l(36965),R=l(76248),N=l(97627),B=l(45683),D=l(13090),H=l(20868),U=l(83015),z=l(71216),V=l(29017),G=l(37847),F=l(88005);let W=y()(()=>Promise.all([l.e(5860),l.e(2022)]).then(l.bind(l,12022)).then(e=>e.SiteWide),{loadableGenerated:{webpack:()=>[12022]}}),X=y()(()=>Promise.all([l.e(429),l.e(5860),l.e(1875)]).then(l.bind(l,51875)).then(e=>e.StickySponsoredBy),{loadableGenerated:{webpack:()=>[51875]}}),MainNav=e=>{var t,l;let{onTopBarAppears:m,sitewideBanner:h,isSponsored:g,sponsoredType:y,sponsoredBy:b,dataNavMenuContent:w,languageOptions:E,activeMenuService:k}=e,{locale:A,router:{asPath:q}}=(0,p.h)(),K=(0,H.U)(),{setIsNavCollapse:Y,setIsNavBanner:$,setIsNavSponsor:Q}=(0,F.P)(e=>({setIsNavCollapse:e.setIsNavCollapse,setIsNavBanner:e.setIsNavBanner,setIsNavSponsor:e.setIsNavSponsor}),R.X),[J,ee]=(0,v.useState)(!1),{state:et={},dispatch:en}=(0,v.useContext)(V.I),{setOpenQuickBookingDrawer:eo}=(0,G.B)(e=>e,R.X),{userInfo:ei,cartNumber:er}=et,ea=(0,U.d)(),el=void 0===b||Array.isArray(b)?b:[b],es=!!h&&!J;return(0,v.useEffect)(()=>{Q(!!g)},[g]),(0,v.useEffect)(()=>{$(es)},[es]),(0,v.useEffect)(()=>{(null==h?void 0:h.type)&&"true"===f().get("discover-disable-sitewide-".concat(null==h?void 0:h.type))&&ee(!0)},[null==h?void 0:h.type]),(0,v.useEffect)(()=>{A===Z.L.Vietnam&&(async()=>{(null==ei?void 0:ei.id)?(await D.M.getCartId(),D.M.getCart().then(e=>{var t;en({type:z.H.UPDATE_CART,payload:(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.items_qty)||0})})):(await D.z.getCartId(),D.z.getCart().then(e=>{var t;en({type:z.H.UPDATE_CART,payload:(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.items_qty)||0})}))})()},[null==ei?void 0:ei.id,q]),(0,s.tZ)(d.Z,{children:(0,s.tZ)(x.N,{siteType:"helloSites",locale:A,currentUrl:K,onLogout:()=>{(0,N.d)(B.y.USER_PROFILE.POST_LOGOUT,{method:"POST"},"sso"),en({type:z.H.LOGOUT,payload:{domain:"."+_.domainLocales[A]}})},ssrMenuContent:w||{},onTopBarAppears:e=>{null==m||m(e),Y(!e)},userState:{...et,userInfo:ei||void 0},isMobile:ea,cartNumber:A===Z.L.Vietnam?er:void 0,activeMenuService:k||"categories",sitewideBanner:h?(0,s.tZ)(W,{isMobile:ea,icon:null!==(t=h.icon)&&void 0!==t?t:"",content:null!==(l=h.content)&&void 0!==l?l:"",type:h.type,link:h.link||"",onClose:()=>ee(!0)}):void 0,sitewideBannerShown:es,languageOptions:E,onBookingClick:e=>{e.preventDefault(),eo(!0)},sponsorComponent:g?(0,s.tZ)(X,{isCollapsed:!1,sponsoredType:y,sponsoredBy:el,isMobile:ea}):void 0,isUserLoading:(null==et?void 0:et.userInfo)===void 0})})};var q=l(78806),K=l(82191);let NavFooter=e=>{let{footerInfo:t}=e,{locale:l}=(0,p.h)();return(0,s.tZ)(s.HY,{children:t&&(0,s.tZ)(d.Z,{children:(0,s.tZ)(K.Z,{ssrOnly:!0,children:(0,s.tZ)(q.F,{footerInfo:t,locale:l,siteType:"helloSites",type:"main",basePath:m.sb})})})})},Y={English:"en",Filipino:"tl"},$={English:"EN",Filipino:"FIL"},getDefaultLanguageOptions=(e,t)=>["en-PH","tl-PH"].includes(e)?[{label:"EN",value:t,locale:"en-PH"},{label:"FIL",value:"/fil"+t,locale:"tl-PH"}]:[],NavigatorLayout=e=>{let{title:t,description:l,image:v,children:h,onTopBarAppears:f,SEOData:g={},type:y="website",footerInfo:b,sitewideBanner:_,isSponsored:w,sponsoredType:E,sponsoredBy:k,noUsingRouterPush:x,dataNavMenuContent:Z,languageOptions:R,activeMenuService:N}=e,{locale:B}=(0,p.h)(),D=m.CX[B].SITE_NAME_FORMATTED,H=null==R?void 0:R.map(e=>({...e,locale:e.locale?e.locale:Y[e.label]+"-"+B.split("-")[1],label:$[e.label]||e.label,originalLabel:e.label}));return(0,s.BX)(s.HY,{children:[(0,s.tZ)(d.Z,{children:(0,s.tZ)(A.q,{SEOData:{title:t,image:v,description:l,siteName:D,type:y,...g},noUsingRouterPush:x,languageOptions:null==H?void 0:H.map(e=>({...e,label:e.originalLabel}))})}),(0,s.tZ)(MainNav,{onTopBarAppears:f,isSponsored:w,sponsoredType:E,sponsoredBy:k,sitewideBanner:_,languageOptions:H,dataNavMenuContent:Z,activeMenuService:N}),(0,s.tZ)(d.Z,{fallback:(0,s.tZ)("div",{style:{width:"100%",height:200}}),children:h}),(0,s.tZ)(BelowMainContent,{}),(0,s.tZ)(NavFooter,{footerInfo:b})]})}},88005:function(e,t,l){"use strict";l.d(t,{P:function(){return d}});var s=l(73445);let d=(0,s.Ue)(e=>({isNavCollapse:!1,isNavSponsor:!1,isNavBanner:!1,setIsNavCollapse(t){e({isNavCollapse:t})},setIsNavSponsor(t){e({isNavSponsor:t})},setIsNavBanner(t){e({isNavBanner:t})}}))},13090:function(e,t,l){"use strict";l.d(t,{M:function(){return y},z:function(){return g}});var s=l(37658),d=l(36808),p=l.n(d),m=l(97627),v=l(45683),h=l(50667),f=l(24612);let g={getCartId:async()=>{let e=p().get(f.QP)||"";if(e)return e;let t=await(0,h.t9)((0,h.wE)(v.y.ECOMMERCE.GUEST_GET_CART_ID),"POST");return e=(null==t?void 0:t.data)||"",p().set(f.QP,e,{domain:"development"===f.ENV.NEXT_PUBLIC_DEPLOY_ENV?"localhost":".".concat(s.d[f.ENV.DEPLOY_LOCALE])}),e},addToCart:async(e,t)=>{if(!e||!t)return;let l=await g.getCartId();if(l)return await(0,h.t9)((0,h.wE)(v.y.ECOMMERCE.GUEST_ADD_ITEM_TO_CART,{cartId:l}),"POST",{data:{cartItem:{sku:e,qty:t}}})},getCart:async()=>{let e=await g.getCartId();if(!e)return;let t=await(0,m.d)(v.y.ECOMMERCE.GUEST_GET_CART,{method:"GET",params:{cartId:e}},"ecommerce");return t},getCartTotals:async()=>{let e=await g.getCartId();if(e)return await(0,m.d)(v.y.ECOMMERCE.GUEST_GET_CART_TOTALS,{method:"GET",params:{cartId:e}},"ecommerce")}},y={getCartId:()=>(0,m.d)(v.y.ECOMMERCE.GET_CART_ID,{method:"POST"},"ecommerce"),addToCart:(e,t)=>{if(e&&t)return(0,m.d)(v.y.ECOMMERCE.ADD_ITEM_TO_CART,{method:"POST",data:{cartItem:{sku:e,qty:t}}},"ecommerce")},getCart:async()=>{let e=await(0,m.d)(v.y.ECOMMERCE.GET_CART,{method:"GET"},"ecommerce");return e},getCartTotals:async()=>(0,m.d)(v.y.ECOMMERCE.GET_CART_TOTALS,{method:"POST"},"ecommerce")}},39675:function(e,t,l){"use strict";function myImageLoader(e){let{src:t,width:l,quality:s}=e;return t.includes("?")?"".concat(t,"&w=").concat(l,"&q=").concat(s||75):"".concat(t,"?w=").concat(l,"&q=").concat(s||75)}l.d(t,{Z:function(){return myImageLoader}})},30326:function(e,t,l){"use strict";l.d(t,{T:function(){return d}});var s=l(36965);let d={[s.L.Indonesia]:{excludes:["kehamilan","parenting","seks","diabetes","nutrisi","infeksi","wanita","penyakit-kulit","pernapasan","pencernaan","mental","kebugaran","hidup-sehat","sehat","kanker","saraf","tht","gigi-mulut"],desktopInArticle:{divId:"M755102ScriptRootC1545593",script:"https://jsc.mgid.com/h/e/hellosehat.com.1545593.js"},mobileInArticle:{divId:"M755102ScriptRootC1545594",script:"https://jsc.mgid.com/h/e/hellosehat.com.1545594.js"},desktopEndArticle:{divId:"M755102ScriptRootC1545595",script:"https://jsc.mgid.com/h/e/hellosehat.com.1545595.js"},mobileEndArticle:{divId:"M755102ScriptRootC1545596",script:"https://jsc.mgid.com/h/e/hellosehat.com.1545596.js"}},[s.L.Malaysia]:{excludes:["kencing-manis","penyakit-perut-gastrousus","keadaan-telinga-hidung-tekak","penjagaan-warga-emas","pemakanan","habit-sihat","kesihatan-mental","penyakit-jantung","herba","berjangkit","kesihatan-mulut","penyakit-muskuloskeletal","keibubapaan","kehamilan","penyakit-batuk-saluran-pernafasan","seks-hubungan","sihat-bergaya","kesihatan-wanita","kesihatan"],desktopInArticle:{divId:"M808433ScriptRootC1545598",script:"https://jsc.mgid.com/h/e/hellodoktor.com.1545598.js"},mobileInArticle:{divId:"M808433ScriptRootC1545599",script:"https://jsc.mgid.com/h/e/hellodoktor.com.1545599.js"},desktopEndArticle:{divId:"M808433ScriptRootC1545600",script:"https://jsc.mgid.com/h/e/hellodoktor.com.1545600.js"},mobileEndArticle:{divId:"M808433ScriptRootC1545601",script:"https://jsc.mgid.com/h/e/hellodoktor.com.1545601.js"}},[s.L.India]:{excludes:["health","parenting"],desktopInArticle:{divId:"M808438ScriptRootC1545609",script:"https://jsc.mgid.com/h/e/helloswasthya.com.1545609.js"},mobileInArticle:{divId:"M808438ScriptRootC1545610",script:"https://jsc.mgid.com/h/e/helloswasthya.com.1545610.js"},desktop:{divId:"M808438ScriptRootC1410063",script:"https://jsc.mgid.com/h/e/helloswasthya.com.1410063.js"},mobile:{divId:"M808438ScriptRootC1434017",script:"https://jsc.mgid.com/h/e/helloswasthya.com.1434017.js"}},[s.L.Thailand]:{excludes:["%e0%b9%82%e0%b8%a0%e0%b8%8a%e0%b8%99%e0%b8%b2%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%9e%e0%b8%b7%e0%b9%88%e0%b8%ad%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e","%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e"],desktopInArticle:{divId:"M808434ScriptRootC1543830",script:"https://jsc.mgid.com/h/e/hellokhunmor.com.1543830.js"},mobileInArticle:{divId:"M808434ScriptRootC1543831",script:"https://jsc.mgid.com/h/e/hellokhunmor.com.1543831.js"},desktopEndArticle:{divId:"M808434ScriptRootC1543832",script:"https://jsc.mgid.com/h/e/hellokhunmor.com.1543832.js"},mobileEndArticle:{divId:"M808434ScriptRootC1543833",script:"https://jsc.mgid.com/h/e/hellokhunmor.com.1543833.js"}},[s.L.PhilippinesEnglish]:{excludes:["parenting","health"],desktopInArticle:{divId:"M808439ScriptRootC1543819",script:"https://jsc.mgid.com/h/e/hellodoctor.com.ph.1543819.js"},mobileInArticle:{divId:"M808439ScriptRootC1543820",script:"https://jsc.mgid.com/h/e/hellodoctor.com.ph.1543820.js"},desktopEndArticle:{divId:"M808439ScriptRootC1543821",script:"https://jsc.mgid.com/h/e/hellodoctor.com.ph.1543821.js"},mobileEndArticle:{divId:"M808439ScriptRootC1543822",script:"https://jsc.mgid.com/h/e/hellodoctor.com.ph.1543822.js"}},[s.L.Cambodia]:{desktopInArticle:{divId:"M829293ScriptRootC1552654",script:"https://jsc.mgid.com/h/e/hellokrupet.com.1552654.js"},mobileInArticle:{divId:"M829293ScriptRootC1552655",script:"https://jsc.mgid.com/h/e/hellokrupet.com.1552655.js"},desktopEndArticle:{divId:"M829293ScriptRootC1552652",script:"https://jsc.mgid.com/h/e/hellokrupet.com.1552652.js"},mobileEndArticle:{divId:"M829293ScriptRootC1552653",script:"https://jsc.mgid.com/h/e/hellokrupet.com.1552653.js"}},[s.L.Myanmar]:{desktopInArticle:{divId:"M829295ScriptRootC1552676",script:"https://jsc.mgid.com/h/e/hellosayarwon.com.1552676.js"},mobileInArticle:{divId:"M829295ScriptRootC1552677",script:"https://jsc.mgid.com/h/e/hellosayarwon.com.1552677.js"},desktopEndArticle:{divId:"M829295ScriptRootC1552678",script:"https://jsc.mgid.com/h/e/hellosayarwon.com.1552678.js"},mobileEndArticle:{divId:"M829295ScriptRootC1552679",script:"https://jsc.mgid.com/h/e/hellosayarwon.com.1552679.js"}}}},20374:function(e,t,l){"use strict";l.d(t,{M5:function(){return d},Oy:function(){return p}});var s=l(36965);let d={[s.L.PhilippinesEnglish]:[],[s.L.PhilippinesTagalog]:[],[s.L.India]:[]},p={"Interscroller - InRead":{[s.L.India]:[]},"Top Desktop - Masthead":{[s.L.India]:[]}};s.L.Vietnam},12714:function(e,t){"use strict";function getHostname(e,t){let l;if((null==t?void 0:t.host)&&!Array.isArray(t.host))l=t.host.toString().split(":")[0];else{if(!e.hostname)return;l=e.hostname}return l.toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getHostname",{enumerable:!0,get:function(){return getHostname}})},2700:function(e,t,l){"use strict";l.r(t),l.d(t,{__N_SSP:function(){return F},handleFetchMoreData:function(){return handleFetchMoreData}});var s=l(35944),d=l(67294),p=l(74360),m=l(36965),v=l(85564),h=l.n(v),f=l(89734),g=l.n(f),y=l(5152),b=l.n(y),_=l(97627),w=l(94189),E=l(36579),k=l(59275),A=l(45683),x=l(84359),Z=l(43272),R=l(83015),N=l(95386),B=l(24612),D=l(98926),H=l(79364);let U=b()(()=>Promise.all([l.e(8473),l.e(8556),l.e(429),l.e(3534),l.e(5860),l.e(1930),l.e(8373),l.e(1664),l.e(3379),l.e(7621),l.e(2471),l.e(9987),l.e(7499),l.e(6551),l.e(9238),l.e(1655),l.e(8709),l.e(1208),l.e(8309),l.e(877),l.e(8335),l.e(7118),l.e(617),l.e(8745),l.e(6567)]).then(l.bind(l,86907)),{loadableGenerated:{webpack:()=>[86907]}}),z=b()(()=>Promise.all([l.e(8473),l.e(8556),l.e(1255),l.e(429),l.e(3534),l.e(5860),l.e(1930),l.e(8373),l.e(1664),l.e(3379),l.e(7621),l.e(9987),l.e(6551),l.e(9238),l.e(1655),l.e(8709),l.e(5851),l.e(8309),l.e(877),l.e(7118),l.e(7168),l.e(8329),l.e(8745),l.e(2681)]).then(l.bind(l,82950)),{loadableGenerated:{webpack:()=>[82950]}}),V=b()(()=>Promise.all([l.e(8473),l.e(8556),l.e(2757),l.e(429),l.e(5860),l.e(1930),l.e(8373),l.e(1664),l.e(3379),l.e(7621),l.e(2471),l.e(7499),l.e(6551),l.e(9238),l.e(1655),l.e(8709),l.e(884),l.e(6064),l.e(8309),l.e(8335),l.e(7118),l.e(617),l.e(2885),l.e(6138)]).then(l.bind(l,60538)),{loadableGenerated:{webpack:()=>[60538]}}),G=b()(()=>Promise.all([l.e(8473),l.e(8556),l.e(429),l.e(3534),l.e(5860),l.e(1930),l.e(8373),l.e(1664),l.e(3379),l.e(7621),l.e(2471),l.e(9987),l.e(7499),l.e(9238),l.e(8709),l.e(583),l.e(5390),l.e(1716),l.e(877),l.e(6349),l.e(7168),l.e(3601),l.e(4160)]).then(l.bind(l,3601)),{loadableGenerated:{webpack:()=>[3601]}});var F=!0;let handleFetchMoreData=async e=>{let t=await Promise.all(e.listSessions.map(t=>t.sessionLayout===D.FF.EMBEDDING_DOCTORS?t.embebIds&&"top_service"===t.typeEmbedding?(0,_.d)(A.y.CARE.GET_TOP_SERVICES,{params:{categoryIds:t.embebIds.join(",")}},"care"):"doctors"===t.typeEmbedding||"specialties"===t.typeEmbedding?(0,_.d)(A.y.CARE.GET_SEARCH_CARE,{params:{type:"doctor",page:1,perPage:12,..."doctors"===t.typeEmbedding&&{doctorIds:t.embebIds.join(",")},..."specialties"===t.typeEmbedding&&t.embebIds.length>0&&{specialtyId:t.embebIds.join(","),isCarePath:Number("care-path"===e.postName)}}},"careV2"):void 0:t.sessionLayout===D.FF.ECOMMERCE_PRODUCS?(0,_.d)(A.y.ECOMMERCE.GET_PRODUCT_DETAIL_BY_LIST_IDS,{params:{skuList:t.productSkuList.replace(/ /g,"")}},"ecommerce"):t.sessionLayout===D.FF.COMMUNITY_WITH_POSTS?t.typeEmbeb===D.VA.POST&&t.postsIds.length>0?(0,_.d)(A.y.TOGETHER.GET_TOGETHER_POST_LIST,{method:"GET",params:{includeIds:t.postsIds.join(",")}},"together"):t.typeEmbeb===D.VA.COMMUNITY&&t.communityId?(0,_.d)(A.y.TOGETHER.GET_TOGETHER_COMMUNITY_DETAIL,{method:"GET",params:{communityId:t.communityId}},"together"):t.typeEmbeb===D.VA.MINIGAME&&t.post?(0,_.d)(A.y.TOGETHER.GET_TOGETHER_POST_DETAIL,{method:"GET",params:{idOrSlug:t.post}},"together"):void 0:void 0)),l={...e};return e.listSessions.map((e,s)=>{var d,m,v,f,y,b,_,A;if(e.sessionLayout===D.FF.EMBEDDING_DOCTORS){let p=t[s];l.listSessions[s].doctors="top_service"===e.typeEmbedding?g()(h()((0,E.PE)(null==p?void 0:null===(d=p._data)||void 0===d?void 0:d.top_services).serviceList.map(e=>e.services)),["position"],"asc"):g()(((null==p?void 0:null===(m=p._data)||void 0===m?void 0:m.searches)||[]).map(w.XR),["position"],"asc")}else e.sessionLayout===D.FF.ECOMMERCE_PRODUCS?l.listSessions[s].products=((null===(f=t[s])||void 0===f?void 0:null===(v=f.data)||void 0===v?void 0:v.products)||[]).map(k.v.formatProduct):e.sessionLayout===D.FF.COMMUNITY_WITH_POSTS&&(e.typeEmbeb===D.VA.POST?l.listSessions[s].posts=((null===(b=t[s])||void 0===b?void 0:null===(y=b.data)||void 0===y?void 0:y.posts)||[]).map(p.d.formatPost):e.typeEmbeb===D.VA.COMMUNITY?l.listSessions[s].community=p.d.formatCommunity((null===(_=t[s])||void 0===_?void 0:_.data)||{}):e.typeEmbeb===D.VA.MINIGAME&&(null===(A=t[s])||void 0===A?void 0:A.data)&&(l.listSessions[s].postDetail=p.d.formatPost(t[s].data||{})))}),l};t.default=e=>{var t,l;let{spotlight:p,footerInfo:v,template:h,dataNavMenuContent:f,pageType:g}=e,y=(0,R.d)(),{locale:b,query:{slug:_}}=(0,N.h)(),[,w]=(0,d.useState)(!1),E=(null==f?void 0:null===(t=f.healthTools)||void 0===t?void 0:t.items)||[],k=b===m.L.Thailand&&(null==p?void 0:null===(l=p.permalink)||void 0===l?void 0:l.includes("/%e0%b8%a7%e0%b8%b1%e0%b8%84%e0%b8%8b%e0%b8%b5%e0%b8%99-hpv/")),A=(0,d.useMemo)(()=>(0,s.tZ)(G,{isMobile:y,spotlight:p,healthTools:E,pageType:g||null}),[_]);return(0,s.BX)(s.HY,{children:[k&&(0,s.tZ)(x.$,{}),(0,s.tZ)(Z.x,{title:p.postTitle,description:p.postTitle,image:B.CX[b].HOMEPAGE_IMAGE,onTopBarAppears:e=>{w(e)},isSponsored:null==p?void 0:p.isSponsor,sponsoredType:"content",sponsoredBy:p.sponsor,SEOData:{title:p.postTitle,description:p.postTitle,apiMetaData:p.metaTag,isIndexable:!0},type:"profile",footerInfo:v,languageOptions:(null==p?void 0:p.translateOptions)||[],dataNavMenuContent:f,children:(0,s.BX)(H.Ep,{init:{currentArticle:p},children:["default"===h&&(0,s.tZ)(U,{isMobile:y,spotlight:p,healthTools:E}),"super_content"===h&&(0,s.tZ)(V,{isMobile:y,spotlight:p,isSponsored:(null==p?void 0:p.isSponsor)||!1}),"landing"===h&&(0,s.tZ)(z,{isMobile:y,spotlight:p,healthTools:E}),"services-connection"===h&&A]})}),k&&(0,s.tZ)(x.L,{})]})}},71216:function(e,t,l){"use strict";l.d(t,{H:function(){return s}});let s={LOGIN:"LOGIN",LOGOUT:"LOGOUT",AUTHORIZING:"AUTHORIZING",SET_IS_MOBILE_SSR:"SET_IS_MOBILE_SSR",ADD_BOOKMARKS:"ADD_BOOKMARKS",REMOVE_BOOKMARKS:"REMOVE_BOOKMARKS",SET_OPEN_LOGOUT_POPUP:"SET_OPEN_LOGOUT_POPUP",SET_COMMENT_FOCUS:"SET_COMMENT_FOCUS",SET_OPEN_DUE_DATE_POPUP:"SET_OPEN_DUE_DATE_POPUP",INIT_USER:"INIT_USER",PLAY_ARTICLE:"PLAY_ARTICLE",SET_OPEN_CONFIRM_LEAVE_PAGE_POPUP:"SET_OPEN_CONFIRM_LEAVE_PAGE_POPUP",SET_CHATWOOT_WEBSITE_TOKEN:"SET_CHATWOOT_WEBSITE_TOKEN",SET_ZALO_CONFIG:"SET_ZALO_CONFIG",SET_COLLECTING_ACTION:"SET_COLLECTING_ACTION",SET_HEALTH_INFO:"SET_HEALTH_INFO",UPDATE_CART:"UPDATE_CART"}},29017:function(e,t,l){"use strict";l.d(t,{I:function(){return d}});var s=l(67294);let d=(0,s.createContext)({})},79364:function(e,t,l){"use strict";l.d(t,{Ep:function(){return ArticleStoreProvider},WM:function(){return useArticleStore}});var s=l(35944),d=l(67294),p=l(23279),m=l.n(p),v=l(43973),h=l(73445),f=l(4891);let g=["small","medium","large"],y=(0,d.createContext)(null),createArticleStore=e=>(0,v.M)((t,l)=>({articles:[],bookmarkIds:[],chineseTranslate:f.w.traditional,currentArticle:null,currentProgress:0,fontSize:"small",isBookmarked:!1,isCommentPopupOpen:!1,isLiked:!1,isDisliked:!1,totalComment:0,categories:[],...e||{},addToArticles:e=>{!e||l().articles.find(t=>e.id===t.id)||t({articles:l().articles.concat(e)})},addToBookmark:e=>t({isBookmarked:!0,bookmarkIds:[...l().bookmarkIds,e]}),removeBookmark:e=>{let s=l().bookmarkIds.filter(t=>t!==e);t({isBookmarked:!1,bookmarkIds:s})},setArticles:e=>t(t=>({articles:"function"==typeof e?e(t.articles):e})),setBookmarkIds:e=>{t({bookmarkIds:e})},setChineseTranslate:e=>t({chineseTranslate:e}),setCurrentArticle:m()(e=>t({currentArticle:e}),400),setCurrentProgress:e=>t({currentProgress:e}),cycleFontSize:()=>t({fontSize:function(e,t){let l=e.indexOf(t);return l===e.length-1?e[0]:e[l+1]}(g,l().fontSize)}),setIsBookmarked:e=>t({isBookmarked:e}),setIsCommentPopupOpen:e=>t({isCommentPopupOpen:e}),setIsLiked:e=>t({isLiked:e}),setIsDisliked:e=>t({isDisliked:e}),setTotalComment:e=>t({totalComment:e}),setCategories:e=>t({categories:e})})),ArticleStoreProvider=e=>{let{init:t,refreshKey:l,children:p}=e,m=(0,d.useRef)(createArticleStore(t)),v=m.current;return(0,d.useEffect)(()=>{l&&m.current.setState(t)},[l]),(0,s.tZ)(y.Provider,{value:v,children:p})},useArticleStore=(e,t)=>{let l=(0,d.useContext)(y),s=(0,h.oR)(l,e,t);return s}},4891:function(e,t,l){"use strict";var s,d;l.d(t,{w:function(){return s}}),(d=s||(s={}))[d.traditional=0]="traditional",d[d.simplified=1]="simplified"},37847:function(e,t,l){"use strict";l.d(t,{B:function(){return p}});var s=l(73445),d=l(16372);let p=(0,s.Ue)(e=>({openQuickBookingDrawer:!1,setOpenQuickBookingDrawer(t){e({openQuickBookingDrawer:t})},careType:d.y.DOCTOR,setCareType(t){e({careType:t})},setData(t){e({data:t})}}))},16372:function(e,t,l){"use strict";var s,d;l.d(t,{y:function(){return s}}),(d=s||(s={}))[d.DOCTOR=0]="DOCTOR",d[d.SERVICE=1]="SERVICE"},58206:function(e,t,l){"use strict";l.d(t,{OH:function(){return currencyFormat},$K:function(){return isDefined}});let s={"vi-VN":"₫","id-ID":"Rp","ms-MY":"RM","km-KH":"៛","en-PH":"₱","th-TH":"฿","my-MM":"K","zh-TW":"$","hi-IN":"₹"};function isDefined(e){return null!=e}function currencyFormat(e,t,l){return e&&t?new Intl.NumberFormat(t,{style:"currency",currency:l}).format(Number(e)):"0 ".concat(s["vi-VN"]||"")}},1973:function(e,t,l){"use strict";function cleanLink(e){return e.split("?")[0].split("/").filter((e,t)=>0===t||!!e).join("/")+"/"}function isElementScrollPosHigherThanScreen(e){return e.getBoundingClientRect().top<=window.innerHeight}l.d(t,{Qu:function(){return cleanLink},tb:function(){return isElementScrollPosHigherThanScreen}})},63116:function(e,t,l){"use strict";l.d(t,{m:function(){return renderDate}});var s=l(37658),d=l(36965),p=l(27484),m=l.n(p),v=l(24612);function renderDate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.L.PhilippinesEnglish,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v.Ze;return m()(e,l).isValid()?m()(e,l).format(s.I[t].dateFormat):e}},89079:function(e){"use strict";var t=Object.defineProperty,l=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,p={};function stringifyCookie(e){var t;let l=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean);return`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}; ${l.join("; ")}`}function parseCookie(e){let t=new Map;for(let l of e.split(/; */)){if(!l)continue;let e=l.indexOf("=");if(-1===e){t.set(l,"true");continue}let[s,d]=[l.slice(0,e),l.slice(e+1)];try{t.set(s,decodeURIComponent(null!=d?d:"true"))}catch{}}return t}function parseSetCookie(e){var t,l;if(!e)return;let[[s,d],...p]=parseCookie(e),{domain:h,expires:f,httponly:g,maxage:y,path:b,samesite:_,secure:w,priority:E}=Object.fromEntries(p.map(([e,t])=>[e.toLowerCase(),t])),k={name:s,value:decodeURIComponent(d),domain:h,...f&&{expires:new Date(f)},...g&&{httpOnly:!0},..."string"==typeof y&&{maxAge:Number(y)},path:b,..._&&{sameSite:m.includes(t=(t=_).toLowerCase())?t:void 0},...w&&{secure:!0},...E&&{priority:v.includes(l=(l=E).toLowerCase())?l:void 0}};return function(e){let t={};for(let l in e)e[l]&&(t[l]=e[l]);return t}(k)}((e,l)=>{for(var s in l)t(e,s,{get:l[s],enumerable:!0})})(p,{RequestCookies:()=>h,ResponseCookies:()=>f,parseCookie:()=>parseCookie,parseSetCookie:()=>parseSetCookie,stringifyCookie:()=>stringifyCookie}),e.exports=((e,p,m,v)=>{if(p&&"object"==typeof p||"function"==typeof p)for(let m of s(p))d.call(e,m)||void 0===m||t(e,m,{get:()=>p[m],enumerable:!(v=l(p,m))||v.enumerable});return e})(t({},"__esModule",{value:!0}),p);var m=["strict","lax","none"],v=["low","medium","high"],h=class{constructor(e){this._parsed=new Map,this._headers=e;let t=e.get("cookie");if(t){let e=parseCookie(t);for(let[t,l]of e)this._parsed.set(t,{name:t,value:l})}}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let l=Array.from(this._parsed);if(!e.length)return l.map(([e,t])=>t);let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return l.filter(([e])=>e===s).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,l]=1===e.length?[e[0].name,e[0].value]:e,s=this._parsed;return s.set(t,{name:t,value:l}),this._headers.set("cookie",Array.from(s).map(([e,t])=>stringifyCookie(t)).join("; ")),this}delete(e){let t=this._parsed,l=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>stringifyCookie(t)).join("; ")),l}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},f=class{constructor(e){var t,l,s;this._parsed=new Map,this._headers=e;let d=null!=(s=null!=(l=null==(t=e.getSetCookie)?void 0:t.call(e))?l:e.get("set-cookie"))?s:[],p=Array.isArray(d)?d:function(e){if(!e)return[];var t,l,s,d,p,m=[],v=0;function skipWhitespace(){for(;v=e.length)&&m.push(e.substring(t,e.length))}return m}(d);for(let e of p){let t=parseSetCookie(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let l=Array.from(this._parsed.values());if(!e.length)return l;let s="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return l.filter(e=>e.name===s)}has(e){return this._parsed.has(e)}set(...e){let[t,l,s]=1===e.length?[e[0].name,e[0].value,e[0]]:e,d=this._parsed;return d.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:l,...s})),function(e,t){for(let[,l]of(t.delete("set-cookie"),e)){let e=stringifyCookie(l);t.append("set-cookie",e)}}(d,this._headers),this}delete(...e){let[t,l,s]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0].path,e[0].domain];return this.set({name:t,path:l,domain:s,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(stringifyCookie).join("; ")}}},95903:function(){},37676:function(){},20746:function(e,t,l){"use strict";l(63013)},1289:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NextURL",{enumerable:!0,get:function(){return NextURL}});let s=l(96707),d=l(47841),p=l(12714),m=l(97007),v=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function parseURL(e,t){return new URL(String(e).replace(v,"localhost"),t&&String(t).replace(v,"localhost"))}let h=Symbol("NextURLInternal");let NextURL=class NextURL{constructor(e,t,l){let s,d;"object"==typeof t&&"pathname"in t||"string"==typeof t?(s=t,d=l||{}):d=l||t||{},this[h]={url:parseURL(e,s??d.base),options:d,basePath:""},this.analyze()}analyze(){var e,t,l,d,v;let f=(0,m.getNextPathnameInfo)(this[h].url.pathname,{nextConfig:this[h].options.nextConfig,parseData:!0,i18nProvider:this[h].options.i18nProvider}),g=(0,p.getHostname)(this[h].url,this[h].options.headers);this[h].domainLocale=this[h].options.i18nProvider?this[h].options.i18nProvider.detectDomainLocale(g):(0,s.detectDomainLocale)(null==(t=this[h].options.nextConfig)?void 0:null==(e=t.i18n)?void 0:e.domains,g);let y=(null==(l=this[h].domainLocale)?void 0:l.defaultLocale)||(null==(v=this[h].options.nextConfig)?void 0:null==(d=v.i18n)?void 0:d.defaultLocale);this[h].url.pathname=f.pathname,this[h].defaultLocale=y,this[h].basePath=f.basePath??"",this[h].buildId=f.buildId,this[h].locale=f.locale??y,this[h].trailingSlash=f.trailingSlash}formatPathname(){return(0,d.formatNextPathnameInfo)({basePath:this[h].basePath,buildId:this[h].buildId,defaultLocale:this[h].options.forceLocale?void 0:this[h].defaultLocale,locale:this[h].locale,pathname:this[h].url.pathname,trailingSlash:this[h].trailingSlash})}formatSearch(){return this[h].url.search}get buildId(){return this[h].buildId}set buildId(e){this[h].buildId=e}get locale(){return this[h].locale??""}set locale(e){var t,l;if(!this[h].locale||!(null==(l=this[h].options.nextConfig)?void 0:null==(t=l.i18n)?void 0:t.locales.includes(e)))throw TypeError(`The NextURL configuration includes no locale "${e}"`);this[h].locale=e}get defaultLocale(){return this[h].defaultLocale}get domainLocale(){return this[h].domainLocale}get searchParams(){return this[h].url.searchParams}get host(){return this[h].url.host}set host(e){this[h].url.host=e}get hostname(){return this[h].url.hostname}set hostname(e){this[h].url.hostname=e}get port(){return this[h].url.port}set port(e){this[h].url.port=e}get protocol(){return this[h].url.protocol}set protocol(e){this[h].url.protocol=e}get href(){let e=this.formatPathname(),t=this.formatSearch();return`${this.protocol}//${this.host}${e}${t}${this.hash}`}set href(e){this[h].url=parseURL(e),this.analyze()}get origin(){return this[h].url.origin}get pathname(){return this[h].url.pathname}set pathname(e){this[h].url.pathname=e}get hash(){return this[h].url.hash}set hash(e){this[h].url.hash=e}get search(){return this[h].url.search}set search(e){this[h].url.search=e}get password(){return this[h].url.password}set password(e){this[h].url.password=e}get username(){return this[h].url.username}set username(e){this[h].url.username=e}get basePath(){return this[h].basePath}set basePath(e){this[h].basePath=e.startsWith("/")?e:`/${e}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new NextURL(String(this),this[h].options)}}},80255:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var l in t)Object.defineProperty(e,l,{enumerable:!0,get:t[l]})}(t,{RequestCookies:function(){return s.RequestCookies},ResponseCookies:function(){return s.ResponseCookies}});let s=l(89079)},63013:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NextResponse",{enumerable:!0,get:function(){return NextResponse}});let s=l(1289),d=l(9129),p=l(80255),m=Symbol("internal response"),v=new Set([301,302,303,307,308]);function handleMiddlewareField(e,t){var l;if(null==e?void 0:null==(l=e.request)?void 0:l.headers){if(!(e.request.headers instanceof Headers))throw Error("request.headers must be an instance of Headers");let l=[];for(let[s,d]of e.request.headers)t.set("x-middleware-request-"+s,d),l.push(s);t.set("x-middleware-override-headers",l.join(","))}}let NextResponse=class NextResponse extends Response{constructor(e,t={}){super(e,t),this[m]={cookies:new p.ResponseCookies(this.headers),url:t.url?new s.NextURL(t.url,{headers:(0,d.toNodeOutgoingHttpHeaders)(this.headers),nextConfig:t.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[m].cookies}static json(e,t){let l=Response.json(e,t);return new NextResponse(l.body,l)}static redirect(e,t){let l="number"==typeof t?t:(null==t?void 0:t.status)??307;if(!v.has(l))throw RangeError('Failed to execute "redirect" on "response": Invalid status code');let s="object"==typeof t?t:{},p=new Headers(null==s?void 0:s.headers);return p.set("Location",(0,d.validateURL)(e)),new NextResponse(null,{...s,headers:p,status:l})}static rewrite(e,t){let l=new Headers(null==t?void 0:t.headers);return l.set("x-middleware-rewrite",(0,d.validateURL)(e)),handleMiddlewareField(t,l),new NextResponse(null,{...t,headers:l})}static next(e){let t=new Headers(null==e?void 0:e.headers);return t.set("x-middleware-next","1"),handleMiddlewareField(e,t),new NextResponse(null,{...e,headers:t})}}},9129:function(e,t){"use strict";function fromNodeOutgoingHttpHeaders(e){let t=new Headers;for(let[l,s]of Object.entries(e)){let e=Array.isArray(s)?s:[s];for(let s of e)void 0!==s&&("number"==typeof s&&(s=s.toString()),t.append(l,s))}return t}function splitCookiesString(e){var t,l,s,d,p,m=[],v=0;function skipWhitespace(){for(;v=e.length)&&m.push(e.substring(t,e.length))}return m}function toNodeOutgoingHttpHeaders(e){let t={},l=[];if(e)for(let[s,d]of e.entries())"set-cookie"===s.toLowerCase()?(l.push(...splitCookiesString(d)),t[s]=1===l.length?l[0]:l):t[s]=d;return t}function validateURL(e){try{return String(new URL(String(e)))}catch(t){throw Error(`URL is malformed "${String(e)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:t})}}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var l in t)Object.defineProperty(e,l,{enumerable:!0,get:t[l]})}(t,{fromNodeOutgoingHttpHeaders:function(){return fromNodeOutgoingHttpHeaders},splitCookiesString:function(){return splitCookiesString},toNodeOutgoingHttpHeaders:function(){return toNodeOutgoingHttpHeaders},validateURL:function(){return validateURL}})},4298:function(e,t,l){e.exports=l(85354)},63431:function(e,t,l){"use strict";var s,d=(s=l(67294))&&"object"==typeof s&&"default"in s?s.default:s,p=0,getIds=function(e,t){for(var l=[],s=0;s0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,l=d.useRef([]),s=usePrevious(e),p=usePrevious(t);return(e!==s||p!==t)&&(l.current=getIds(e,t)),l.current}},7675:function(e,t,l){"use strict";l.d(t,{Z:function(){return p}});var s=l(3958),d=l(68697),esm_browser_parse=function(e){if(!(0,d.Z)(e))throw TypeError("Invalid UUID");var t,l=new Uint8Array(16);return l[0]=(t=parseInt(e.slice(0,8),16))>>>24,l[1]=t>>>16&255,l[2]=t>>>8&255,l[3]=255&t,l[4]=(t=parseInt(e.slice(9,13),16))>>>8,l[5]=255&t,l[6]=(t=parseInt(e.slice(14,18),16))>>>8,l[7]=255&t,l[8]=(t=parseInt(e.slice(19,23),16))>>>8,l[9]=255&t,l[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,l[11]=t/4294967296&255,l[12]=t>>>24&255,l[13]=t>>>16&255,l[14]=t>>>8&255,l[15]=255&t,l};function ROTL(e,t){return e<>>32-t}var p=function(e,t,l){function generateUUID(e,t,d,p){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],l=0;l>>0;x=A,A=k,k=ROTL(E,30)>>>0,E=w,w=N}l[0]=l[0]+w>>>0,l[1]=l[1]+E>>>0,l[2]=l[2]+k>>>0,l[3]=l[3]+A>>>0,l[4]=l[4]+x>>>0}return[l[0]>>24&255,l[0]>>16&255,l[0]>>8&255,255&l[0],l[1]>>24&255,l[1]>>16&255,l[1]>>8&255,255&l[1],l[2]>>24&255,l[2]>>16&255,l[2]>>8&255,255&l[2],l[3]>>24&255,l[3]>>16&255,l[3]>>8&255,255&l[3],l[4]>>24&255,l[4]>>16&255,l[4]>>8&255,255&l[4]]})},42708:function(e,t,l){"use strict";l.d(t,{YD:function(){return useInView}});var s=l(67294),d=Object.defineProperty,p=new Map,m=new WeakMap,v=0,h=void 0;function useInView({threshold:e,delay:t,trackVisibility:l,rootMargin:d,root:f,triggerOnce:g,skip:y,initialInView:b,fallbackInView:_,onChange:w}={}){var E;let[k,A]=s.useState(null),x=s.useRef(),[Z,R]=s.useState({inView:!!b,entry:void 0});x.current=w,s.useEffect(()=>{let s;if(!y&&k)return s=function(e,t,l={},s=h){if(void 0===window.IntersectionObserver&&void 0!==s){let d=e.getBoundingClientRect();return t(s,{isIntersecting:s,target:e,intersectionRatio:"number"==typeof l.threshold?l.threshold:0,time:0,boundingClientRect:d,intersectionRect:d,rootBounds:d}),()=>{}}let{id:d,observer:f,elements:g}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var l;return`${t}_${"root"===t?(l=e.root)?(m.has(l)||(v+=1,m.set(l,v.toString())),m.get(l)):"0":e[t]}`}).toString(),l=p.get(t);if(!l){let s;let d=new Map,m=new IntersectionObserver(t=>{t.forEach(t=>{var l;let p=t.isIntersecting&&s.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=p),null==(l=d.get(t.target))||l.forEach(e=>{e(p,t)})})},e);s=m.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),l={id:t,observer:m,elements:d},p.set(t,l)}return l}(l),y=g.get(e)||[];return g.has(e)||g.set(e,y),y.push(t),f.observe(e),function(){y.splice(y.indexOf(t),1),0===y.length&&(g.delete(e),f.unobserve(e)),0===g.size&&(f.disconnect(),p.delete(d))}}(k,(e,t)=>{R({inView:e,entry:t}),x.current&&x.current(e,t),t.isIntersecting&&g&&s&&(s(),s=void 0)},{root:f,rootMargin:d,threshold:e,trackVisibility:l,delay:t},_),()=>{s&&s()}},[Array.isArray(e)?e.toString():e,k,f,d,g,y,l,_,t]);let N=null==(E=Z.entry)?void 0:E.target,B=s.useRef();k||!N||g||y||B.current===N||(B.current=N,R({inView:!!b,entry:void 0}));let D=[A,Z.inView,Z.entry];return D.ref=D[0],D.inView=D[1],D.entry=D[2],D}s.Component}}]);