@hhgtech/hhg-components 1.19.37 → 1.19.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ageGenerate-b636a650.js +1 -0
- package/build/babyGrowth.js +1 -1
- package/build/care.js +1 -1
- package/build/components.js +1 -1
- package/build/constants-3cd37eba.js +1 -0
- package/build/core.js +1 -1
- package/build/esm/ageGenerate-2a2c1e14.js +1 -0
- package/build/esm/babyGrowth.js +1 -1
- package/build/esm/care.js +1 -1
- package/build/esm/components.js +1 -1
- package/build/esm/constants-bd92e982.js +1 -0
- package/build/esm/core.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/index-28859a65.js +1 -0
- package/build/esm/index-3b8f5d3a.js +1 -0
- package/build/esm/index-570254d1.js +1 -0
- package/build/esm/index-e09947ac.js +1 -0
- package/build/esm/index.js +1 -1
- package/build/esm/index.styled-08082348.js +1 -0
- package/build/esm/index.styled-09287716.js +1 -0
- package/build/esm/{index.styled-a50d332d.js → index.styled-a6269e59.js} +1 -1
- package/build/esm/lazyLoad-d80d3fd1.js +1 -0
- package/build/esm/navigation.js +1 -1
- package/build/esm/routing-914e53ff.js +1 -0
- package/build/esm/together.js +1 -1
- package/build/esm/{translationsContext-717621a0.js → translationsContext-78f42743.js} +1 -1
- package/build/esm/translationsProvider-1ddfe46a.js +1 -0
- package/build/esm/types-aef8a1c1.js +1 -0
- package/build/esm/types-ba278f5c.js +1 -0
- package/build/esm/{useTranslations-d2f104c4.js → useTranslations-0b650088.js} +1 -1
- package/build/i18n.js +1 -1
- package/build/{index-0178fd34.js → index-c6e4d6c7.js} +1 -1
- package/build/index-cd11825e.js +1 -0
- package/build/{index-bf90f1d0.js → index-db0c8c89.js} +1 -1
- package/build/index-fbdd8ef9.js +1 -0
- package/build/index.js +1 -1
- package/build/{index.styled-bef71f17.js → index.styled-3898ef06.js} +1 -1
- package/build/index.styled-3f048fc2.js +1 -0
- package/build/index.styled-d41606bf.js +1 -0
- package/build/lazyLoad-0454885d.js +1 -0
- package/build/navigation.js +1 -1
- package/build/routing-d42175b7.js +1 -0
- package/build/together/components/atoms/sensitiveMask/index.d.ts +7 -0
- package/build/together/components/atoms/sensitiveMask/index.styled.d.ts +11 -0
- package/build/together/components/molecules/postImagePreview/index.d.ts +2 -1
- package/build/together.js +1 -1
- package/build/{translationsContext-749279e6.js → translationsContext-1968f8ef.js} +1 -1
- package/build/translationsProvider-52a4676f.js +1 -0
- package/build/types-50344fd4.js +1 -0
- package/build/types-9e2b5b61.js +1 -0
- package/build/{useTranslations-b4596d50.js → useTranslations-e724fe88.js} +1 -1
- package/package.json +1 -1
- package/build/Locale-11b51016.js +0 -1
- package/build/ageGenerate-e0b2593d.js +0 -1
- package/build/constants-ea7b35a2.js +0 -1
- package/build/esm/Locale-69030fff.js +0 -1
- package/build/esm/ageGenerate-975ad729.js +0 -1
- package/build/esm/constants-dc22740c.js +0 -1
- package/build/esm/index-1eb434ba.js +0 -1
- package/build/esm/index-55ed119c.js +0 -1
- package/build/esm/index-81d121ec.js +0 -1
- package/build/esm/index-95804243.js +0 -1
- package/build/esm/index-d08172df.js +0 -1
- package/build/esm/index-df2df35a.js +0 -1
- package/build/esm/index.styled-54de2131.js +0 -1
- package/build/esm/index.styled-d70f836f.js +0 -1
- package/build/esm/lazyLoad-59e8ff6d.js +0 -1
- package/build/esm/number-3cb24023.js +0 -1
- package/build/esm/routing-9abd8389.js +0 -1
- package/build/esm/translationsProvider-951e3271.js +0 -1
- package/build/esm/types-213b9831.js +0 -1
- package/build/esm/types-992cf1cf.js +0 -1
- package/build/index-2ebe68d8.js +0 -1
- package/build/index-57825404.js +0 -1
- package/build/index-58f54b53.js +0 -1
- package/build/index-8272ac9d.js +0 -1
- package/build/index.styled-acf38c59.js +0 -1
- package/build/index.styled-f4fee88c.js +0 -1
- package/build/lazyLoad-f5c59bb0.js +0 -1
- package/build/number-87b13133.js +0 -1
- package/build/routing-27112fb4.js +0 -1
- package/build/translationsProvider-bfc3c8b9.js +0 -1
- package/build/types-1d01eb2e.js +0 -1
- package/build/types-e988e4eb.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f7929e76.js"),t=require("react"),n=require("./constants-3cd37eba.js"),a=require("./theme-81c0c062.js"),i=require("./cookieHelper-612b90fa.js"),o=require("./useTranslations-e724fe88.js"),r=require("lodash/debounce"),l=require("./index.styled-3898ef06.js");require("react-range"),require("react-dom");var s=require("styled-components"),c=require("react-loading-skeleton"),u=require("react-id-generator"),d=require("lodash/shuffle"),p=require("./useOutsideClick-528bfd6c.js"),h=require("string-format");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=f(t),m=f(r),C=f(s),v=f(c),x=f(d),b=f(h);var y,_,w,E,k,L,S,T,O,I,M,R,A=C.default.div(y||(y=e.__makeTemplateObject([""],[""]))),N=C.default.div(_||(_=e.__makeTemplateObject(["\n --searchbar-z-index: 305;\n &[data-is-modal='true'] {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n height: var(--mobile-care-searchbar-height, 100%);\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n background-color: white;\n z-index: var(--searchbar-z-index);\n }\n"],["\n --searchbar-z-index: 305;\n &[data-is-modal='true'] {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n height: var(--mobile-care-searchbar-height, 100%);\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n background-color: white;\n z-index: var(--searchbar-z-index);\n }\n"]))),P=C.default.section(w||(w=e.__makeTemplateObject([""],[""]))),F=C.default.input(E||(E=e.__makeTemplateObject(["\n position: fixed;\n left: -100%;\n top: -100%;\n"],["\n position: fixed;\n left: -100%;\n top: -100%;\n"]))),z=C.default(n.Input)(k||(k=e.__makeTemplateObject(["\n #booking-search-bar & {\n input {\n font-size: 16px;\n }\n }\n"],["\n #booking-search-bar & {\n input {\n font-size: 16px;\n }\n }\n"]))),j=s.createGlobalStyle(L||(L=e.__makeTemplateObject(["\n .care-popup-open {\n overflow: hidden;\n position: fixed;\n &::before {\n content: '';\n inset: 0;\n position: absolute;\n background-color: white;\n min-height: 100vh;\n min-width: 100vw;\n z-index: 2;\n }\n }\n"],["\n .care-popup-open {\n overflow: hidden;\n position: fixed;\n &::before {\n content: '';\n inset: 0;\n position: absolute;\n background-color: white;\n min-height: 100vh;\n min-width: 100vw;\n z-index: 2;\n }\n }\n"]))),B=function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("path",{d:"M18 6L6 18",stroke:n||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),g.default.createElement("path",{d:"M6 6L18 18",stroke:n||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},D=function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{width:"14",height:"20",viewBox:"0 0 14 20",className:t},g.default.createElement("path",{d:"M7 0C3.134 0 0 3.134 0 7C0 10.966 4.404 16.82 6.226 19.071C6.626 19.565 7.374 19.565 7.774 19.071C9.596 16.82 14 10.966 14 7C14 3.134 10.866 0 7 0ZM7 9.5C5.619 9.5 4.5 8.381 4.5 7C4.5 5.619 5.619 4.5 7 4.5C8.381 4.5 9.5 5.619 9.5 7C9.5 8.381 8.381 9.5 7 9.5Z",fill:n||"currentColor"}))},H=function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:t},g.default.createElement("path",{d:"M9.99967 6.66658C8.15801 6.66658 6.66634 8.15825 6.66634 9.99992C6.66634 11.8416 8.15801 13.3333 9.99967 13.3333C11.8413 13.3333 13.333 11.8416 13.333 9.99992C13.333 8.15825 11.8413 6.66658 9.99967 6.66658ZM17.4497 9.16658C17.0663 5.69158 14.308 2.93325 10.833 2.54992V1.66659C10.833 1.20825 10.458 0.833252 9.99967 0.833252C9.54134 0.833252 9.16634 1.20825 9.16634 1.66659V2.54992C5.69134 2.93325 2.93301 5.69158 2.54967 9.16658H1.66634C1.20801 9.16658 0.833008 9.54158 0.833008 9.99992C0.833008 10.4583 1.20801 10.8333 1.66634 10.8333H2.54967C2.93301 14.3083 5.69134 17.0666 9.16634 17.4499V18.3333C9.16634 18.7916 9.54134 19.1666 9.99967 19.1666C10.458 19.1666 10.833 18.7916 10.833 18.3333V17.4499C14.308 17.0666 17.0663 14.3083 17.4497 10.8333H18.333C18.7913 10.8333 19.1663 10.4583 19.1663 9.99992C19.1663 9.54158 18.7913 9.16658 18.333 9.16658H17.4497ZM9.99967 15.8333C6.77467 15.8333 4.16634 13.2249 4.16634 9.99992C4.16634 6.77492 6.77467 4.16658 9.99967 4.16658C13.2247 4.16658 15.833 6.77492 15.833 9.99992C15.833 13.2249 13.2247 15.8333 9.99967 15.8333Z",fill:n||"currentColor"}))},V=function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("path",{d:"M11 18C14.866 18 18 14.866 18 11C18 7.13401 14.866 4 11 4C7.13401 4 4 7.13401 4 11C4 14.866 7.13401 18 11 18Z",stroke:n||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),g.default.createElement("path",{d:"M20 20L16 16",stroke:n||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},K=function(e){var t=e.width,n=e.height;return g.default.createElement("svg",{width:t||30,height:n||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}))},Z=C.default.li(S||(S=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 16px;\n\n > :first-child {\n flex: 1;\n }\n\n > :nth-child(2) {\n flex: 6;\n }\n\n & + li::before {\n content: '';\n position: absolute;\n left: 18px;\n right: 18px;\n top: 0;\n height: 1px;\n background-color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 16px;\n\n > :first-child {\n flex: 1;\n }\n\n > :nth-child(2) {\n flex: 6;\n }\n\n & + li::before {\n content: '';\n position: absolute;\n left: 18px;\n right: 18px;\n top: 0;\n height: 1px;\n background-color: ",";\n }\n"])),a.theme.colors.neutral100),G=C.default.div(T||(T=e.__makeTemplateObject(["\n display: flex;\n position: absolute;\n top: 48px;\n min-width: 100%;\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 border-radius: 6px;\n background-color: white;\n z-index: 30;\n\n "," {\n position: relative;\n top: 0;\n box-shadow: initial;\n }\n"],["\n display: flex;\n position: absolute;\n top: 48px;\n min-width: 100%;\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 border-radius: 6px;\n background-color: white;\n z-index: 30;\n\n "," {\n position: relative;\n top: 0;\n box-shadow: initial;\n }\n"])),o.MediaQueries.mbDown),U=C.default.ul(O||(O=e.__makeTemplateObject(["\n width: 100%;\n max-height: 600px;\n overflow-y: auto;\n"],["\n width: 100%;\n max-height: 600px;\n overflow-y: auto;\n"]))),q=C.default(D)(I||(I=e.__makeTemplateObject(["\n width: 12px;\n height: 18px;\n"],["\n width: 12px;\n height: 18px;\n"]))),Q=C.default.li(M||(M=e.__makeTemplateObject(["\n position: relative;\n cursor: pointer;\n padding: 12px 18px;\n display: flex;\n align-items: center;\n gap: 14px;\n overflow: hidden;\n\n ","\n\n & + li::before {\n content: '';\n position: absolute;\n left: 18px;\n right: 18px;\n top: 0;\n height: 1px;\n background-color: ",";\n }\n\n &:not([data-is-denied='true']):hover {\n background-color: ",";\n }\n\n &:last-child:hover {\n border-bottom-right-radius: 6px;\n border-bottom-left-radius: 6px;\n }\n\n &:first-child:hover {\n border-top-right-radius: 6px;\n border-top-left-radius: 6px;\n }\n\n &[data-is-denied='true'] {\n cursor: not-allowed;\n }\n"],["\n position: relative;\n cursor: pointer;\n padding: 12px 18px;\n display: flex;\n align-items: center;\n gap: 14px;\n overflow: hidden;\n\n ","\n\n & + li::before {\n content: '';\n position: absolute;\n left: 18px;\n right: 18px;\n top: 0;\n height: 1px;\n background-color: ",";\n }\n\n &:not([data-is-denied='true']):hover {\n background-color: ",";\n }\n\n &:last-child:hover {\n border-bottom-right-radius: 6px;\n border-bottom-left-radius: 6px;\n }\n\n &:first-child:hover {\n border-top-right-radius: 6px;\n border-top-left-radius: 6px;\n }\n\n &[data-is-denied='true'] {\n cursor: not-allowed;\n }\n"])),(function(e){return e.isSelected&&"\n &::after {\n content: ".concat("url(\"data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.9803 0.990669C16.7205 0.99841 16.4739 1.10699 16.2928 1.2934L5.99984 11.5864L2.70687 8.2934C2.61473 8.19743 2.50436 8.12081 2.38223 8.06802C2.2601 8.01524 2.12867 7.98735 1.99563 7.986C1.86259 7.98464 1.73061 8.00985 1.60743 8.06014C1.48426 8.11043 1.37235 8.18479 1.27827 8.27887C1.1842 8.37295 1.10983 8.48485 1.05954 8.60803C1.00926 8.73121 0.98405 8.86318 0.985403 8.99622C0.986757 9.12926 1.01464 9.26069 1.06743 9.38282C1.12021 9.50495 1.19684 9.61532 1.29281 9.70747L5.29281 13.7075C5.48035 13.8949 5.73467 14.0002 5.99984 14.0002C6.26501 14.0002 6.51933 13.8949 6.70687 13.7075L17.7069 2.70747C17.8514 2.567 17.9501 2.38616 17.99 2.18864C18.03 1.99112 18.0093 1.78614 17.9308 1.60055C17.8523 1.41497 17.7195 1.25744 17.5499 1.14861C17.3803 1.03978 17.1817 0.984729 16.9803 0.990669Z' fill='%232685F1'/%3E%3C/svg%3E%0A\")",";\n top: 50%;\n right: 18px;\n position: absolute;\n transform: translateY(-50%);\n }\n ")}),a.theme.colors.neutral100,a.theme.colors.neutral50),W=C.default((function(t){var n=t.count,a=t.className,i=u.useId(n);return g.default.createElement(g.default.Fragment,null,e.__spreadArray([],Array(n),!0).map((function(e,t){return g.default.createElement(Z,{className:a,key:i[t]},g.default.createElement(v.default,{count:1,height:32}),g.default.createElement(v.default,{count:1,height:24}))})))}))(R||(R=e.__makeTemplateObject(["\n &:first-child {\n padding-top: 18px;\n }\n"],["\n &:first-child {\n padding-top: 18px;\n }\n"]))),Y=function(e){var t=e.cities,n=e.isLoading,i=e.onLocationClick,r=e.onCurrentLocationClick,s=e.geoLocationPermission,c=void 0===s?"unset":s,u=e.isLocationLoading,d=e.selectedLocation,p=o.useTranslations().t,h="denied"===c,f=function(){return g.default.createElement(Q,{role:"button",tabIndex:0,onClick:function(e){h||(e.nativeEvent.stopImmediatePropagation(),u||r())},"data-is-denied":h},h?g.default.createElement(l.Text,{color:"var(--gray600)",size:"md"},"x"):u?g.default.createElement(v.default,{height:20,width:20}):g.default.createElement(H,{color:a.theme.colors.primaryBase}),g.default.createElement("div",null,h?g.default.createElement(l.Text,{color:"var(--gray600)",size:"sm",style:{lineHeight:1.5}},p("booking.searchBar.grantLocation")):u?g.default.createElement(v.default,{height:20,style:{width:"calc(100% - 16px)"}}):g.default.createElement(l.Text,{size:"md"},p("booking.searchBar.useCurrentLocation"))))};return g.default.createElement(G,{"data-testid":"location-search-results"},g.default.createElement(U,null,n?g.default.createElement(W,{count:5}):!t||t.length<1?g.default.createElement(g.default.Fragment,null,f(),g.default.createElement(Q,{"data-is-denied":"true"},g.default.createElement(l.Text,{size:"sm",color:"#ccc"},p("booking.searchBar.noResults")))):g.default.createElement(g.default.Fragment,null,f(),t.map((function(e){return g.default.createElement(Q,{key:e.id,onClick:function(t){t.nativeEvent.stopImmediatePropagation(),i&&i(e)},role:"button",tabIndex:0,"aria-label":"Select ".concat(e.name," as location"),isSelected:(null==d?void 0:d.id)===e.id},g.default.createElement(q,{color:a.theme.colors.neutral400}),g.default.createElement(l.Text,{size:"md"},e.name))})))))},J="TYPE_CHARACTER",X="REMOVE_CHARACTER",$="REMOVE_ALL",ee="REMOVE_LAST_VISIBLE_NODE",te="PAUSE_FOR",ne="CHANGE_DELETE_SPEED",ae="CHANGE_DELAY",ie="PASTE_STRING",oe=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},re="TEXT_NODE",le=function(){function t(t){var n=this;this.state={lastFrameTime:null,pauseUntil:null,eventQueue:[],eventLoop:null,eventLoopPaused:!1,reverseCalledEvents:[],calledEvents:[],visibleNodes:[],initialOptions:null},this.options={strings:null,delay:"natural",pauseFor:1500,deleteSpeed:"natural",loop:!1,autoStart:!1,stringSplitter:null,onCreateTextNode:null,onRemoveNode:null},this.start=function(){return n.state.eventLoopPaused=!1,n.runEventLoop(),n},this.pause=function(){return n.state.eventLoopPaused=!0,n},this.stop=function(){return n.state.eventLoop&&(window.cancelAnimationFrame(n.state.eventLoop),n.state.eventLoop=null),n},this.pauseFor=function(e){return n.addEventToQueue(te,{ms:e}),n},this.typeOutAllStrings=function(){return"string"==typeof n.options.strings?(n.typeString(n.options.strings).pauseFor(n.options.pauseFor),n):(n.options.strings.forEach((function(e){n.typeString(e).pauseFor(n.options.pauseFor).deleteAll(n.options.deleteSpeed)})),n)},this.typeString=function(e,t){if(void 0===t&&(t=null),e){var a=(n.options||{}).stringSplitter,i="function"==typeof a?a(e):e.split("");n.typeCharacters(i,t)}return n},this.pasteString=function(e,t){return void 0===t&&(t=null),e&&n.addEventToQueue(ie,{character:e,node:t}),n},this.deleteAll=function(e){return void 0===e&&(e="natural"),n.addEventToQueue($,{speed:e}),n},this.changeDeleteSpeed=function(e){if(!e)throw new Error("Must provide new delete speed");return n.addEventToQueue(ne,{speed:e}),n},this.changeDelay=function(e){if(!e)throw new Error("Must provide new delay");return n.addEventToQueue(ae,{delay:e}),n},this.deleteChars=function(e){if(!e)throw new Error("Must provide amount of characters to delete");for(var t=0;t<e;t++)n.addEventToQueue(X);return n},this.typeCharacters=function(e,t){if(void 0===t&&(t=null),!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((function(e){n.addEventToQueue(J,{character:e,node:t})})),n},this.removeCharacters=function(e){if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((function(){n.addEventToQueue(X)})),n},this.addEventToQueue=function(e,t,a){return void 0===a&&(a=!1),n.addEventToStateProperty(e,t,a,"eventQueue")},this.addReverseCalledEvent=function(e,t,a){return void 0===a&&(a=!1),n.options.loop?n.addEventToStateProperty(e,t,a,"reverseCalledEvents"):n},this.addEventToStateProperty=function(t,a,i,o){void 0===i&&(i=!1);var r={eventName:t,eventArgs:a||{}};return n.state[o]=i?e.__spreadArray([r],n.state[o],!0):e.__spreadArray(e.__spreadArray([],n.state[o],!0),[r],!1),n},this.runEventLoop=function(){n.state.lastFrameTime||(n.state.lastFrameTime=Date.now());var t=Date.now(),a=t-n.state.lastFrameTime;if(!n.state.eventQueue.length){if(!n.options.loop)return;n.state.eventQueue=e.__spreadArray([],n.state.calledEvents,!0),n.state.calledEvents=[],n.options=e.__assign({},n.state.initialOptions)}if(n.state.eventLoop=window.requestAnimationFrame(n.runEventLoop),!n.state.eventLoopPaused){if(n.state.pauseUntil){if(t<n.state.pauseUntil)return;n.state.pauseUntil=null}var i=e.__spreadArray([],n.state.eventQueue,!0),o=i.shift();if(!(a<=(o.eventName===ee||o.eventName===X?"natural"===n.options.deleteSpeed?oe(40,80):n.options.deleteSpeed:"natural"===n.options.delay?oe(120,160):n.options.delay))){var r=o.eventName,l=o.eventArgs;switch(r){case ie:case J:var s=l.character,c=document.createTextNode(s),u=c;n.options.onCreateTextNode&&"function"==typeof n.options.onCreateTextNode&&(u=n.options.onCreateTextNode(s,c)),n.state.visibleNodes=e.__spreadArray(e.__spreadArray([],n.state.visibleNodes,!0),[{type:re,character:s,node:u}],!1);break;case X:i.unshift({eventName:ee,eventArgs:{removingCharacterNode:!0}});break;case te:var d=o.eventArgs.ms;n.state.pauseUntil=Date.now()+parseInt(d);break;case $:var p=n.state.visibleNodes,h=l.speed,f=[];h&&f.push({eventName:ne,eventArgs:{speed:h,temp:!0}});for(var g=0,m=p.length;g<m;g++)f.push({eventName:ee,eventArgs:{removingCharacterNode:!1}});h&&f.push({eventName:ne,eventArgs:{speed:n.options.deleteSpeed,temp:!0}}),i.unshift.apply(i,f);break;case ee:if(n.state.visibleNodes.length){var C=n.state.visibleNodes.pop(),v=C.node;s=C.character;n.options.onRemoveNode&&"function"==typeof n.options.onRemoveNode&&n.options.onRemoveNode({node:v,character:s}),v&&v.parentNode.removeChild(v)}break;case ne:n.options.deleteSpeed=o.eventArgs.speed;break;case ae:n.options.delay=o.eventArgs.delay}n.options.loop&&(o.eventName===ee||o.eventArgs&&o.eventArgs.temp||(n.state.calledEvents=e.__spreadArray(e.__spreadArray([],n.state.calledEvents,!0),[o],!1))),n.state.eventQueue=i,n.state.lastFrameTime=t}}},t&&(this.options=e.__assign(e.__assign({},this.options),t)),this.state.initialOptions=e.__assign({},this.options),this.init()}return t.prototype.init=function(){this.addEventToQueue($,null,!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()},t}();function se(e){var n=e.inputRef,a=e.wrapperRef,i=e.disabled,r=o.useTranslations(),l=r.t,s=r.locale,c=t.useMemo((function(){if(i)return[];var e=["booking.searchBar.placeholder.hospital","booking.searchBar.placeholder.doctor"];return"zh-TW"!==s&&e.push("booking.searchBar.placeholder.specialty","booking.searchBar.placeholder.service"),x.default(e).map((function(e){return l(e)}))}),[l,s]);function u(e){var t=p();return t&&(t.placeholder=t.placeholder+e),null}function d(){var e=p();e&&(e.placeholder=e.placeholder.slice(0,-1))}function p(){return n&&n.current?n.current:a&&a.current&&a.current.querySelector("input")||null}t.useEffect((function(){if(!i){var e=p();e&&(e.placeholder="",new le({strings:c,autoStart:!0,loop:!0,delay:32,deleteSpeed:32,pauseFor:1500,onCreateTextNode:u,onRemoveNode:d}))}}),[n,a])}var ce,ue=C.default.div(ce||(ce=e.__makeTemplateObject(["\n user-select: none;\n input {\n pointer-events: none;\n background-color: white;\n }\n"],["\n user-select: none;\n input {\n pointer-events: none;\n background-color: white;\n }\n"])));function de(n){var i=n.focused,r=n.value,l=void 0===r?"":r,s=n.onClick,c=n.trackingAttributes,u=n.inputSearchPlaceholder,d=o.useTranslations().t,p=t.useRef(null);se({wrapperRef:p,disabled:!!u});var h=t.useMemo((function(){return c?{"data-event-category":c.dataEventCategory,"data-event-action":c.dataEventAction,"data-event-label":c.dataEventLabel}:{}}),[c]);return g.default.createElement(ue,e.__assign({onClick:function(){return s&&s()},ref:p},h),g.default.createElement(z,{inputClassName:"location"===i?"focused":void 0,name:"booking-search-placeholder",displayIcon:g.default.createElement(V,{color:a.theme.colors.gray400}),placeholder:d("booking.searchBar.searchInput.placeholder"),value:l,size:"md"}))}var pe,he,fe,ge,me,Ce,ve=C.default.header(pe||(pe=e.__makeTemplateObject(["\n display: flex;\n height: 64px;\n align-items: center;\n justify-content: space-between;\n margin: 0 auto;\n position: sticky;\n z-index: 99;\n background-color: white;\n top: 0;\n left: 0;\n"],["\n display: flex;\n height: 64px;\n align-items: center;\n justify-content: space-between;\n margin: 0 auto;\n position: sticky;\n z-index: 99;\n background-color: white;\n top: 0;\n left: 0;\n"]))),xe=C.default.div(he||(he=e.__makeTemplateObject(["\n display: inline-flex;\n flex: 1;\n justify-content: flex-end;\n cursor: pointer;\n text-decoration: underline;\n"],["\n display: inline-flex;\n flex: 1;\n justify-content: flex-end;\n cursor: pointer;\n text-decoration: underline;\n"]))),be=C.default.div(fe||(fe=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: 16px;\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n margin-left: 16px;\n cursor: pointer;\n"]))),ye=C.default.div(ge||(ge=e.__makeTemplateObject(["\n width: 100%;\n margin-left: 24px;\n"],["\n width: 100%;\n margin-left: 24px;\n"]))),_e=C.default(l.Text)(me||(me=e.__makeTemplateObject(["\n color: ",";\n text-align: start;\n"],["\n color: ",";\n text-align: start;\n"])),a.theme.colors.secondaryDark),we=function(e){var t=e.className,n=e.onLeftClick,i=e.headingText,o=e.onRightClick,r=e.iconLeft,l=e.textRight;return g.default.createElement(ve,{className:t},g.default.createElement(be,{onClick:n},r||g.default.createElement(B,{color:a.theme.colors.gray800})),g.default.createElement(ye,null,g.default.createElement(_e,{size:"md",type:"bold"},i)),g.default.createElement(xe,{onClick:o},l&&g.default.createElement("p",null,l)))},Ee={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0},ke={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",searchLocationKeywords:"",searchKeywords:"",selectedLocation:null,defaultCity:null,initialCities:[],cities:[],searchResults:[],initialSearchResults:[],isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN"};function Le(t){var n=t.selectedLocation,a=t.searchLocationKeywords;return n&&a!==n.name?e.__assign(e.__assign({},t),{searchLocationKeywords:n.name}):t}function Se(t,a){var i;switch(t.isDebug&&console.log("bookingSearchBar",{action:a,state:t}),a.type){case Ce.NavigateTo:return e.__assign(e.__assign({},t),{navigateTo:a.payload,focused:"none",isMobileModalOpened:!1});case Ce.ClickOutsideInputLocation:return t.isMobile||"location"!==t.focused?t:Le(e.__assign(e.__assign({},t),{focused:"none"}));case Ce.ClickOutsideInputSearch:return t.isMobile||"search"!==t.focused?t:e.__assign(e.__assign({},t),{focused:"none"});case Ce.FocusInputLocation:var o=e.__assign(e.__assign({},t),{focused:"location"});return(null===(i=t.selectedLocation)||void 0===i?void 0:i.id)===n.ID_OPTION_CURRENT_LOCATION&&(o.searchLocationKeywords=""),o;case Ce.FocusInputSearch:var r=e.__assign(e.__assign({},t),{focused:"search"});return t.isMobile?Le(r):r;case Ce.ChangeInputLocation:return e.__assign(e.__assign({},t),{searchLocationKeywords:a.payload});case Ce.ChangeInputSearch:var l=a.payload;return e.__assign(e.__assign({},t),{searchKeywords:l,isLoadingSearchResults:l.trim().length>Ee[t.locale]});case Ce.SelectCurrentLocation:return e.__assign(e.__assign({},t),{focused:"none",selectedLocation:a.payload,searchLocationKeywords:a.payload.name});case Ce.ClearInputLocation:return e.__assign(e.__assign({},t),{focused:"location",cities:t.initialCities,searchLocationKeywords:""});case Ce.ClearInputSearch:return e.__assign(e.__assign({},t),{focused:"search",searchKeywords:""});case Ce.SelectLocation:return e.__assign(e.__assign({},t),{focused:"none",selectedLocation:a.payload,searchLocationKeywords:a.payload.name});case Ce.SelectSearchResult:return e.__assign(e.__assign({},t),{searchKeywords:a.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:a.payload.url});case Ce.FetchCitiesStart:return e.__assign(e.__assign({},t),{isLoadingCities:!0});case Ce.FetchCitiesFinish:return e.__assign(e.__assign({},t),{isLoadingCities:!1});case Ce.FetchSearchResultsStart:return e.__assign(e.__assign({},t),{isLoadingSearchResults:!0});case Ce.FetchSearchResultsFinish:return e.__assign(e.__assign({},t),{isLoadingSearchResults:!1});case Ce.FetchSearchResultsComplete:var s=e.__assign(e.__assign({},t),{searchResults:a.payload});return 0===t.initialSearchResults.length&&(s.initialSearchResults=a.payload),s;case Ce.FetchCitiesByGeoIpComplete:var c=a.payload.cities,u=a.payload.default;(c=c.filter((function(e){return e.id!==u.id}))).unshift(u),t.initialSelectedCity&&!c.find((function(e){return e.id===t.initialSelectedCity.id}))&&c.unshift(t.initialSelectedCity);var d=e.__assign(e.__assign({},t),{defaultCity:u,initialCities:c,cities:c});return"denied"!==t.geoLocationPermission||t.initialSelectedCity||(d.selectedLocation=u,d.searchLocationKeywords=u.name),d;case Ce.FetchCitiesByKeywordComplete:return e.__assign(e.__assign({},t),{cities:a.payload});case Ce.DisplayInitialCities:return e.__assign(e.__assign({},t),{cities:t.initialCities});case Ce.DisplayInitialSearchResults:return e.__assign(e.__assign({},t),{searchResults:t.initialSearchResults,isLoadingSearchResults:!1});case Ce.GrantGeoLocationPermission:return e.__assign(e.__assign({},t),{geoLocationPermission:"granted",geoLocationCoordinates:a.payload});case Ce.DenyGeoLocationPermission:return e.__assign(e.__assign({},t),{geoLocationPermission:"denied",geoLocationCoordinates:null});case Ce.OpenMobileModal:return e.__assign(e.__assign({},t),{isMobileModalOpened:!0});case Ce.CloseMobileModal:return e.__assign(e.__assign({},t),{isMobileModalOpened:!1});case Ce.UpdateInitialSearchValue:return e.__assign(e.__assign({},t),{searchKeywords:a.payload});case Ce.SetInputSearchPlaceholder:return e.__assign(e.__assign({},t),{inputSearchPlaceholder:a.payload});default:return t}}!function(e){e.NavigateTo="navigate to url",e.ClickOutsideInputLocation="click outside input location",e.ClickOutsideInputSearch="click outside input search",e.SelectCurrentLocation="select current location",e.FocusInputLocation="focus input location",e.FocusInputSearch="focus input search",e.ChangeInputLocation="change input location",e.ChangeInputSearch="change input search",e.ClearInputLocation="clear input location",e.ClearInputSearch="clear input search",e.SelectLocation="select location",e.FetchCitiesStart="fetch cities start",e.FetchCitiesFinish="fetch cities finish",e.FetchSearchResultsStart="fetch search results start",e.FetchSearchResultsComplete="fetch search results complete",e.FetchSearchResultsFinish="fetch search results finish",e.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",e.FetchCitiesByKeywordComplete="fetch cities by keyword finish",e.DisplayInitialCities="display initial cities",e.DisplayInitialSearchResults="display initial search results",e.GrantGeoLocationPermission="grant geolocation permission",e.DenyGeoLocationPermission="deny geolocation permission",e.OpenMobileModal="open mobile modal",e.CloseMobileModal="close mobile modal",e.UpdateInitialSearchValue="update initial search value",e.SelectSearchResult="select search result",e.SetInputSearchPlaceholder="set input search placeholder"}(Ce||(Ce={}));var Te,Oe,Ie,Me,Re,Ae,Ne,Pe=function(){return g.default.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},g.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.97887 8.15493C2.97887 5.29627 5.29627 2.97887 8.15493 2.97887C11.0136 2.97887 13.331 5.29627 13.331 8.15493C13.331 11.0136 11.0136 13.331 8.15493 13.331C5.29627 13.331 2.97887 11.0136 2.97887 8.15493ZM8.15493 1.5C4.47951 1.5 1.5 4.47951 1.5 8.15493C1.5 11.8303 4.47951 14.8099 8.15493 14.8099C9.72624 14.8099 11.1704 14.2653 12.3089 13.3546L15.2377 16.2834C15.5265 16.5722 15.9947 16.5722 16.2834 16.2834C16.5722 15.9947 16.5722 15.5265 16.2834 15.2377L13.3546 12.3089C14.2653 11.1704 14.8099 9.72624 14.8099 8.15493C14.8099 4.47951 11.8303 1.5 8.15493 1.5Z",fill:"white"}))},Fe=C.default.button(Te||(Te=e.__makeTemplateObject(["\n min-height: 100%;\n border-radius: 6px;\n background-color: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 11px;\n cursor: pointer;\n flex: 0.3;\n\n "," {\n --margin: 16px;\n min-height: 44px;\n margin: var(--margin);\n width: calc(100% - var(--margin) * 2);\n position: absolute;\n bottom: 0;\n }\n\n &:hover {\n background-color: ",";\n }\n\n &:active {\n background-color: ",";\n }\n\n &:focus-visible {\n outline: 1px solid black;\n }\n"],["\n min-height: 100%;\n border-radius: 6px;\n background-color: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 11px;\n cursor: pointer;\n flex: 0.3;\n\n "," {\n --margin: 16px;\n min-height: 44px;\n margin: var(--margin);\n width: calc(100% - var(--margin) * 2);\n position: absolute;\n bottom: 0;\n }\n\n &:hover {\n background-color: ",";\n }\n\n &:active {\n background-color: ",";\n }\n\n &:focus-visible {\n outline: 1px solid black;\n }\n"])),(function(e){return e.theme.colors.primaryBase}),o.MediaQueries.mbDown,(function(e){return e.theme.colors.primaryHover}),(function(e){return e.theme.colors.primaryActive})),ze=C.default(l.Text)(Oe||(Oe=e.__makeTemplateObject(["\n font-weight: ",";\n"],["\n font-weight: ",";\n"])),(function(e){return e.theme.sizes.fwSemiBold})),je=function(e){var t=e.onClick,n=(0,o.useTranslations().t)("booking.searchBar.searchButton");return g.default.createElement(Fe,{onClick:t,title:n},g.default.createElement(Pe,null),g.default.createElement(ze,{size:"s3",color:"white"},n))},Be=C.default.div(Ie||(Ie=e.__makeTemplateObject(["\n display: flex;\n gap: 16px;\n "," {\n flex-direction: column;\n padding: 14px;\n background-color: ",";\n\n input {\n filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.04))\n drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.06))\n drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04));\n }\n }\n\n input {\n background-color: white;\n }\n"],["\n display: flex;\n gap: 16px;\n "," {\n flex-direction: column;\n padding: 14px;\n background-color: ",";\n\n input {\n filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.04))\n drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.06))\n drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04));\n }\n }\n\n input {\n background-color: white;\n }\n"])),o.MediaQueries.mbDown,a.theme.colors.blue50),De=C.default.div(Me||(Me=e.__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"]))),He=C.default(De)(Re||(Re=e.__makeTemplateObject(["\n flex: 1;\n"],["\n flex: 1;\n"]))),Ve=C.default(De)(Ae||(Ae=e.__makeTemplateObject(["\n flex: 2;\n"],["\n flex: 2;\n"]))),Ke=C.default((function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("rect",{x:"4",y:"4",width:"16",height:"16",rx:"8",fill:"white"}),g.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L12 10.5858L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L13.4142 12L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L12 13.4142L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L10.5858 12L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289Z",fill:n||"currentColor"}))}))(Ne||(Ne=e.__makeTemplateObject(["\n display: none;\n &.shown {\n display: block;\n }\n"],["\n display: none;\n &.shown {\n display: block;\n }\n"])));function Ze(e){var i=e.isMobile,r=e.state,l=e.dispatch,s=e.debouncedFetchCitiesByKeyword,c=e.debouncedFetchSearchResults,u=e.focusLocationInput,d=e.focusSearchInput,h=e.renderLocationResults,f=e.renderSearchResults,m=e.locationTrackingAttributes,C=e.trackingAttributes,v=e.onSearch,x=e.initalSearchValue,b=t.useRef(null),y=t.useRef(null),_=r.focused,w=r.searchLocationKeywords,E=r.geoLocationPermission,k=r.selectedLocation,L=r.searchKeywords,S=r.inputSearchPlaceholder,T=o.useTranslations().t;se({wrapperRef:y,disabled:!!S}),p.useOutsideClick(b,(function(){l({type:Ce.ClickOutsideInputLocation})})),p.useOutsideClick(y,(function(){l({type:Ce.ClickOutsideInputSearch})}));var O=t.useMemo((function(){return"granted"===E&&(null==k?void 0:k.id)===n.ID_OPTION_CURRENT_LOCATION?a.theme.colors.primaryBase:a.theme.colors.gray400}),[E,k]),I=t.useCallback((function(e){l({type:Ce.ChangeInputSearch,payload:e}),"function"!=typeof v&&(e.trim().length>Ee[r.locale]||x?c(e.trim(),r):(c.cancel(),l({type:Ce.DisplayInitialSearchResults})))}),[l,r]),M=t.useCallback((function(e){l({type:Ce.ChangeInputLocation,payload:e}),e.trim().length>Ee[r.locale]?s(e.trim()):(s.cancel(),l({type:Ce.DisplayInitialCities}))}),[s,l]);return g.default.createElement(Be,null,g.default.createElement(He,{ref:b},g.default.createElement(z,{inputClassName:"location"===_?"focused":void 0,placeholder:T("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:g.default.createElement(D,{className:"location-pin-icon",color:O}),actionIcon:g.default.createElement(Ke,{color:a.theme.colors.gray300,className:""!==w?"shown":""}),onActionClick:function(){l({type:Ce.ClearInputLocation}),s.cancel(),u()},value:w,onChange:M,onFocus:function(){return l({type:Ce.FocusInputLocation})},size:"md",trackingAttributes:m}),!i&&h()),g.default.createElement(Ve,{ref:y},g.default.createElement(z,{placeholder:S||T("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:g.default.createElement(Ke,{color:a.theme.colors.gray300,className:""!==L?"shown":""}),onActionClick:function(){l({type:Ce.ClearInputSearch}),c.cancel(),c("",r),d()},value:L,onChange:I,onFocus:function(){return l({type:Ce.FocusInputSearch})},inputClassName:"search"===_?"focused":void 0,size:"md",trackingAttributes:C,onKeyPress:function(e){r.autoCompleteDisabled&&"Enter"===e.key&&v&&v({cityId:r.selectedLocation.id,keyword:L})},enterKeyHint:r.autoCompleteDisabled?"search":void 0}),!i&&f()),r.autoCompleteDisabled&&!r.isMobile&&g.default.createElement(je,{onClick:function(){v({cityId:r.selectedLocation.id,keyword:L})}}))}var Ge,Ue,qe,Qe,We,Ye,Je,Xe,$e,et,tt,nt,at,it,ot=C.default.li(Ge||(Ge=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: var(--rowGap);\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n gap: var(--rowGap);\n cursor: pointer;\n"]))),rt=C.default.div(Ue||(Ue=e.__makeTemplateObject(["\n --wrapper-size: var(--graphicSize);\n border-radius: calc(var(--wrapper-size) / 2);\n background-color: var(--neutral50);\n width: var(--wrapper-size);\n height: var(--wrapper-size);\n aspect-ratio: 1/1;\n overflow: hidden;\n\n ","\n\n img {\n width: var(--graphicSize);\n height: var(--graphicSize);\n ","\n }\n\n &:focus-visible {\n outline: 1px solid ",";\n }\n"],["\n --wrapper-size: var(--graphicSize);\n border-radius: calc(var(--wrapper-size) / 2);\n background-color: var(--neutral50);\n width: var(--wrapper-size);\n height: var(--wrapper-size);\n aspect-ratio: 1/1;\n overflow: hidden;\n\n ","\n\n img {\n width: var(--graphicSize);\n height: var(--graphicSize);\n ","\n }\n\n &:focus-visible {\n outline: 1px solid ",";\n }\n"])),(function(e){var t=e.type;return t&&"doctors"===t&&"\n border-radius: calc(var(--graphicSize) / 2);\n "}),(function(e){var t=e.type;return t&&"doctors"===t?"\n\n object-fit: cover; \n ":"\n object-fit: contain;\n "}),a.theme.colors.gray600),lt=C.default(l.Text)(qe||(qe=e.__makeTemplateObject(["\n line-height: 22px;\n letter-spacing: -0.2px;\n\n "," {\n &[data-size='p3'] {\n font-size: 14px;\n }\n }\n"],["\n line-height: 22px;\n letter-spacing: -0.2px;\n\n "," {\n &[data-size='p3'] {\n font-size: 14px;\n }\n }\n"])),o.MediaQueries.tdUp),st=C.default.figure(Qe||(Qe=e.__makeTemplateObject(["\n max-width: var(--graphicSize);\n min-width: var(--graphicSize);\n"],["\n max-width: var(--graphicSize);\n min-width: var(--graphicSize);\n"]))),ct=C.default.svg(We||(We=e.__makeTemplateObject(["\n margin: 0 auto;\n display: block;\n"],["\n margin: 0 auto;\n display: block;\n"]))),ut=C.default.div(Ye||(Ye=e.__makeTemplateObject(["\n display: grid;\n place-items: center;\n"],["\n display: grid;\n place-items: center;\n"]))),dt={doctors:function(e){var t=e.width,n=e.height;return g.default.createElement("svg",{width:t||32,height:n||32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("g",{clipPath:"url(#clip0_14712_400114)"},g.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),g.default.createElement("path",{d:"M22.065 9.58305C22.1108 9.80952 22.1431 10.0396 22.1614 10.2722C22.3769 13.0522 22.5858 16.1276 22.5727 17.618C22.5306 20.5688 19.708 21.1325 19.4564 21.1769L19.4495 21.5357L19.5228 23.9014C20.8688 23.9341 22.203 24.1759 23.4772 24.6196C24.5264 24.9739 25.4827 25.5591 26.2757 26.332C27.0688 27.105 27.6783 28.0461 28.0594 29.0858L31.9886 39.2068C31.91 39.3048 30.6939 39.6356 29.4888 39.944C30.1695 42.3315 30.4582 44.8142 30.3432 47.2953C30.2991 48.2666 30.1816 49.264 29.7245 50.1211C29.4508 50.6342 29.0319 51.0912 28.5296 51.3753C28.5099 51.4347 28.4864 51.4928 28.4593 51.5495C28.4293 51.6146 28.3908 51.6756 28.3448 51.7307C28.3293 51.7772 28.3232 51.8406 28.3162 51.9135C28.3004 52.0779 28.2799 52.2909 28.1362 52.4685C28.001 52.6373 27.8519 52.7945 27.6905 52.9386C27.6905 52.9386 27.092 52.9667 26.4133 52.9845L26.458 58.4088H5.7492L6.30965 52.9523L5.66093 53.1637C5.07664 53.3528 4.45628 53.4028 3.84925 53.3099C3.24222 53.2169 2.66526 52.9835 2.1643 52.6283C1.61489 52.2388 1.17445 51.715 0.884966 51.1068C0.595484 50.4987 0.46662 49.8266 0.510669 49.1545L0.644528 47.1369L1.41503 38.3366L1.81323 38.4135L-0.914307 37.8437L-0.402886 36.5663C-0.407359 36.5645 -0.411803 36.5627 -0.416214 36.5608C-0.410804 36.56 -0.40538 36.5594 -0.399946 36.5589L2.05995 30.4146C3.00034 28.0825 4.7421 26.1624 6.97187 24.9999C8.56171 24.176 10.3028 23.6861 12.0882 23.5597L11.788 16.5865C11.1882 16.6507 10.0095 16.5266 9.96087 14.954C9.91229 13.3824 11.0457 13.3171 11.6507 13.3961L11.6445 13.2523C11.5785 12.8433 11.5088 12.439 11.4577 12.2132C11.3782 11.8628 11.2611 11.4953 11.1419 11.1207C10.8794 10.2967 10.6061 9.43855 10.697 8.65293C10.697 8.65293 10.6909 8.00438 11.4565 7.24044C11.3707 6.86644 11.3686 6.47786 11.4507 6.10258C11.5366 5.70965 11.7125 5.34199 11.9645 5.02848C12.2165 4.71497 12.5377 4.46414 12.9029 4.29569C13.2682 4.12725 13.6675 4.04577 14.0696 4.05766C14.2277 4.06393 14.3849 4.08493 14.5418 4.10589C14.7932 4.13945 15.0439 4.17294 15.2971 4.14581C15.7708 4.09409 16.177 3.83884 16.5862 3.58167C16.8357 3.42492 17.0863 3.26745 17.354 3.15494C17.9119 2.93744 18.5266 2.91281 19.1002 3.08497C19.6738 3.25713 20.1733 3.61619 20.5192 4.105C20.5943 4.21716 20.6621 4.33678 20.7298 4.45631C20.9035 4.76299 21.077 5.06915 21.373 5.24769C21.5927 5.38236 21.8482 5.42658 22.1057 5.47114C22.2633 5.49842 22.4216 5.52582 22.5728 5.57417C23.0267 5.71015 23.3999 6.0411 23.6319 6.45436C23.6327 6.40753 23.6317 6.36062 23.629 6.31374C23.6502 6.3657 23.6623 6.42092 23.6649 6.47698C23.6661 6.49165 23.667 6.50632 23.6677 6.521C23.8246 6.82609 23.9058 7.17114 23.8885 7.51347C23.8544 7.93447 23.7053 8.33801 23.4574 8.68001C23.2096 9.02201 22.8725 9.28933 22.483 9.45278C22.3469 9.50712 22.2071 9.55061 22.065 9.58305Z",fill:"white"})),g.default.createElement("defs",null,g.default.createElement("clipPath",{id:"clip0_14712_400114"},g.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"}))))},services:function(e){var t=e.width,n=e.height;return g.default.createElement("svg",{width:t||30,height:n||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),g.default.createElement("path",{d:"M14.9998 6.66663C12.2752 6.66663 9.85335 7.97848 8.33317 9.99996H10.5988C11.8 8.94527 13.3625 8.33329 14.9998 8.33329C16.6372 8.33329 18.1997 8.94527 19.4009 9.99996H21.6665C20.1463 7.97848 17.7244 6.66663 14.9998 6.66663ZM7.7863 10.8333C7.07666 13.0403 6.6665 15.5989 6.6665 18.3333C6.6665 20.0846 6.82601 21.7675 7.13525 23.3333H22.8644C23.1737 21.7675 23.3332 20.0846 23.3332 18.3333C23.3332 15.5989 22.923 13.0403 22.2134 10.8333H7.7863ZM14.9998 13.3333C17.3013 13.3333 19.1665 15.1985 19.1665 17.5C19.1665 19.8014 17.3013 21.6666 14.9998 21.6666C12.6984 21.6666 10.8332 19.8014 10.8332 17.5C10.8332 15.1985 12.6984 13.3333 14.9998 13.3333ZM14.1665 15V16.6666H12.4998V18.3333H14.1665V20H15.8332V18.3333H17.4998V16.6666H15.8332V15H14.1665Z",fill:"#BFC5CC"}))}},pt=function(e){var n=e.type,i=e.item,o=e.imageUrl,r=e.onClickItem,l=t.useMemo((function(){var e=dt[n]||K;return g.default.createElement(e,{width:32,height:"services"===n?32:24})}),[n]);return g.default.createElement(ot,{onClick:function(){return r&&r(i)},onKeyDown:function(e){"Enter"!==e.key&&"Space"!==e.key||r&&r(i)},tabIndex:0,role:"button"},g.default.createElement(st,null,"hospitals"===n?g.default.createElement(ct,{width:"12",height:"16",viewBox:"0 0 12 16"},g.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 5.94873C0.75 3.04623 3.0975 0.69873 6 0.69873C8.9025 0.69873 11.25 3.04623 11.25 5.94873C11.25 9.07623 7.935 13.3887 6.5775 15.0312C6.2775 15.3912 5.73 15.3912 5.43 15.0312C4.065 13.3887 0.75 9.07623 0.75 5.94873ZM4.125 5.94873C4.125 6.98373 4.965 7.82373 6 7.82373C7.035 7.82373 7.875 6.98373 7.875 5.94873C7.875 4.91373 7.035 4.07373 6 4.07373C4.965 4.07373 4.125 4.91373 4.125 5.94873Z",fill:"#9AA2AC"})):g.default.createElement(rt,{type:n},o?g.default.createElement("img",{src:o,width:32,height:"services"===n?32:24}):l)),g.default.createElement(lt,{color:a.theme.colors.gray800,size:"p3"},i.name))},ht=function(){return g.default.createElement("svg",{width:"14",height:"18",viewBox:"0 0 14 18"},g.default.createElement("path",{d:"M7.00004 0.666992C5.29757 0.666992 3.64067 0.813476 2.52087 1.03158C1.73311 1.18457 1.16671 1.86816 1.16671 2.6722V4.83366C1.16671 5.29264 1.54106 5.66699 2.00004 5.66699H12C12.459 5.66699 12.8334 5.29264 12.8334 4.83366V2.69824C12.8334 1.89421 12.267 1.21061 11.4792 1.05762C10.3562 0.839518 8.69275 0.666992 7.00004 0.666992ZM6.16671 1.50033H7.83337V2.33366H8.66671V4.00033H7.83337V4.83366H6.16671V4.00033H5.33337V2.33366H6.16671V1.50033ZM1.42712 6.50033C1.3197 6.89421 1.24158 7.32389 1.19275 7.77637C1.14718 8.18001 1.05603 9.25423 1.06254 9.36491C0.603556 9.72624 0.333374 10.2861 0.333374 10.9014C0.333374 11.8356 0.977906 12.6364 1.84379 12.8285C2.74548 15.0192 4.55212 17.3337 7.00004 17.3337C9.44796 17.3337 11.2546 14.9964 12.1563 12.8024C13.0222 12.6136 13.6667 11.8356 13.6667 10.9014C13.6667 10.2861 13.3965 9.72624 12.9375 9.36491C12.9441 9.25423 12.8562 8.16048 12.8073 7.75033C12.7552 7.30436 12.6804 6.89095 12.573 6.50033H5.35942C6.52804 8.20606 9.27543 7.18717 11.0365 7.62012C11.5736 8.79199 11.1667 10.4326 11.1667 10.4326L11.8177 10.641C11.9121 10.6702 12 10.7549 12 10.9014C12 11.0576 11.8861 11.1943 11.6875 11.1878L11.0105 11.0837L10.7761 11.7347C9.96554 14.0492 8.4128 15.667 7.00004 15.667C5.58728 15.667 4.03455 14.0492 3.224 11.7347L2.96358 11.0837L2.26046 11.1878C2.11723 11.1878 2.00004 11.0576 2.00004 10.9014C2.00004 10.7549 2.08793 10.6702 2.18233 10.641L2.83337 10.4326C2.73246 10.5531 2.4102 8.7041 2.83337 8.03678C3.59184 7.5127 4.2266 7.87728 5.12504 6.50033H1.42712ZM5.17712 9.05241C4.57166 9.05241 4.08337 9.55371 4.08337 10.1722C4.08337 10.7907 4.57166 11.292 5.17712 11.292C5.78259 11.292 6.27087 10.7907 6.27087 10.1722C6.27087 9.55371 5.78259 9.05241 5.17712 9.05241ZM8.82296 9.05241C8.21749 9.05241 7.72921 9.55371 7.72921 10.1722C7.72921 10.7907 8.21749 11.292 8.82296 11.292C9.42843 11.292 9.91671 10.7907 9.91671 10.1722C9.91671 9.55371 9.42843 9.05241 8.82296 9.05241Z",fill:"#9AA2AC"}))},ft=function(){return g.default.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},g.default.createElement("path",{d:"M8.99996 0.666992C6.27535 0.666992 3.85348 1.97884 2.33329 4.00033H4.59892C5.80009 2.94564 7.36259 2.33366 8.99996 2.33366C10.6373 2.33366 12.1998 2.94564 13.401 4.00033H15.6666C14.1464 1.97884 11.7246 0.666992 8.99996 0.666992ZM1.78642 4.83366C1.07678 7.04069 0.666626 9.59928 0.666626 12.3337C0.666626 14.085 0.826131 15.7679 1.13538 17.3337H16.8645C17.1738 15.7679 17.3333 14.085 17.3333 12.3337C17.3333 9.59928 16.9231 7.04069 16.2135 4.83366H1.78642ZM8.99996 7.33366C11.3014 7.33366 13.1666 9.19889 13.1666 11.5003C13.1666 13.8018 11.3014 15.667 8.99996 15.667C6.69853 15.667 4.83329 13.8018 4.83329 11.5003C4.83329 9.19889 6.69853 7.33366 8.99996 7.33366ZM8.16663 9.00033V10.667H6.49996V12.3337H8.16663V14.0003H9.83329V12.3337H11.5V10.667H9.83329V9.00033H8.16663Z",fill:"#9AA2AC"}))},gt=function(){return g.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17"},g.default.createElement("path",{d:"M8 0.666992L0.5 5.63533V14.8337C0.5 15.7545 1.24583 16.5003 2.16667 16.5003H13.8333C14.7542 16.5003 15.5 15.7545 15.5 14.8337V5.63533L8 0.666992ZM11.3333 10.667H8.83333V13.167H7.16667V10.667H4.66667V9.00033H7.16667V6.50033H8.83333V9.00033H11.3333V10.667Z",fill:"#9AA2AC"}))},mt=function(){return g.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},g.default.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"}))},Ct=C.default.header(Je||(Je=e.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n padding: 12px 24px;\n background-color: ",";\n box-shadow: inset 0px 1px 0px #e4e8ec;\n"],["\n display: flex;\n justify-content: space-between;\n padding: 12px 24px;\n background-color: ",";\n box-shadow: inset 0px 1px 0px #e4e8ec;\n"])),a.theme.colors.neutral50),vt=C.default.div(Xe||(Xe=e.__makeTemplateObject(["\n display: grid;\n flex: 2;\n align-items: center;\n gap: 16px;\n grid-template-columns: 16px 1fr;\n"],["\n display: grid;\n flex: 2;\n align-items: center;\n gap: 16px;\n grid-template-columns: 16px 1fr;\n"]))),xt=C.default.p($e||($e=e.__makeTemplateObject(["\n color: ",";\n font-size: 14px;\n font-weight: ",";\n letter-spacing: -0.2px;\n line-height: 22px;\n"],["\n color: ",";\n font-size: 14px;\n font-weight: ",";\n letter-spacing: -0.2px;\n line-height: 22px;\n"])),a.theme.colors.neutral800,a.theme.sizes.fwSemiBold),bt=C.default.button(et||(et=e.__makeTemplateObject(["\n flex: 1;\n cursor: pointer;\n text-align: end;\n"],["\n flex: 1;\n cursor: pointer;\n text-align: end;\n"]))),yt=C.default.section(tt||(tt=e.__makeTemplateObject(["\n padding: 12px 16px;\n --rowGap: 16px;\n --graphicSize: 32px;\n\n "," {\n --rowGap: 8px;\n }\n"],["\n padding: 12px 16px;\n --rowGap: 16px;\n --graphicSize: 32px;\n\n "," {\n --rowGap: 8px;\n }\n"])),o.MediaQueries.tdUp),_t=C.default.ul(nt||(nt=e.__makeTemplateObject(["\n --gap: 16px;\n "," {\n --gap: 8px;\n }\n\n display: grid;\n overflow: hidden;\n gap: var(--gap);\n transition: max-height 0.8s ease-out;\n\n ","\n\n ","\n\n@media (prefers-reduced-motion) {\n transition: none;\n }\n\n "," {\n grid-template-columns: 1fr 1fr;\n } ;\n"],["\n --gap: 16px;\n "," {\n --gap: 8px;\n }\n\n display: grid;\n overflow: hidden;\n gap: var(--gap);\n transition: max-height 0.8s ease-out;\n\n ","\n\n ","\n\n@media (prefers-reduced-motion) {\n transition: none;\n }\n\n "," {\n grid-template-columns: 1fr 1fr;\n } ;\n"])),o.MediaQueries.tdUp,(function(e){return e.isMore&&"\n height: auto;\n max-height: 0;\n margin-top: var(--gap);\n "}),(function(e){return e.isShown&&"\n max-height: 600px;\n "}),o.MediaQueries.tdUp),wt=C.default(l.Text)(at||(at=e.__makeTemplateObject(["\n margin-top: 12px;\n margin-bottom: 8px;\n cursor: pointer;\n text-align: start;\n text-transform: capitalize;\n"],["\n margin-top: 12px;\n margin-bottom: 8px;\n cursor: pointer;\n text-align: start;\n text-transform: capitalize;\n"]))),Et=function(e){var i=e.type,r=e.data,s=e.state,c=e.dispatch,u=e.itemsToShow,d=e.itemsToShowDesktop,p=e.isMobile,h=e.isLoading,f=e.keyword,m=t.useState(!1),C=m[0],x=m[1],b=o.useTranslations(),y=b.t,_=b.locale,w=s.selectedLocation,E=s.searchKeywords,k=t.useMemo((function(){return n.LOCALIZED_SLUGS[_]}),[_]),L=t.useMemo((function(){return{doctors:{name:y("booking.searchPopup.doctors"),icon:g.default.createElement(ht,null),slug:k.DOCTOR},services:{name:y("booking.searchPopup.services"),icon:g.default.createElement(ft,null),slug:k.SERVICE},hospitals:{name:y("booking.searchPopup.hospitals"),icon:g.default.createElement(gt,null),slug:k.HOSPITAL},specialties:{name:y("booking.searchPopup.specialties"),icon:g.default.createElement(mt,null),slug:k.SPECIALTIES}}}),[i,k]),S=t.useMemo((function(){return L[i].slug}),[L]),T=p?u:d;function O(e){var t="";switch(i){case"specialties":t="/".concat(w.slug,"/").concat(L.doctors.slug,"/").concat(e.slug);break;case"services":t="/".concat(w.slug,"/").concat(S,"/").concat(e.slug);break;case"doctors":case"hospitals":t="/".concat(S,"/").concat(e.slug,"-").concat(e.id)}t&&c({type:Ce.SelectSearchResult,payload:{name:e.name,url:t}})}function I(e){return g.default.createElement(pt,{key:e.id,item:e,type:i,imageUrl:e.logo||e.avatar||e.thumbnail,onClickItem:O})}return g.default.createElement("section",null,g.default.createElement(Ct,null,g.default.createElement(vt,null,L[i].icon,g.default.createElement(xt,null,L[i].name)),f.trim().length<=Ee[_]&&g.default.createElement(bt,{onClick:function(){var e="";switch(i){case"specialties":e="/".concat(S);break;case"services":case"doctors":case"hospitals":e="/".concat(w.slug,"/").concat(S)}e&&c({type:Ce.NavigateTo,payload:e})}},g.default.createElement(l.Text,{size:"p3",color:a.theme.colors.primaryBase},y("booking.searchPopup.seeAll")))),(h||r&&r.length>0)&&g.default.createElement(yt,null,g.default.createElement(_t,null,h&&Array(2).fill(void 0).map((function(e,t){return g.default.createElement(ot,{key:i+"loading"+t},g.default.createElement(st,null,g.default.createElement(ut,null,g.default.createElement(v.default,{height:14,width:"hospitals"===i?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),g.default.createElement(v.default,{width:120,height:24}))})),!h&&r&&r.length>0&&r.slice(0,T).map(I)),g.default.createElement(_t,{isShown:C,isMore:!0},r.slice(T,-1).map(I)),"specialties"===i&&T<r.length&&!h&&g.default.createElement("button",{onClick:function(){return x(!C)}},g.default.createElement(wt,{size:"p3",color:a.theme.colors.primaryBase},y(C?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==i&&T<r.length&&!h&&f.trim().length>Ee[_]&&g.default.createElement("button",{onClick:function(){var e=L[i].slug,t="/".concat(w.slug,"/").concat(e,"?q=").concat(E);c({type:Ce.NavigateTo,payload:t})}},g.default.createElement(wt,{size:"p3",color:a.theme.colors.primaryBase},y("booking.searchPopup.searchIn.".concat(i),{name:f})))),!h&&0===(null==r?void 0:r.length)&&g.default.createElement(yt,null,g.default.createElement(l.Text,{size:"sm",color:a.theme.colors.gray400},y("booking.searchBar.noResults"))))},kt=C.default.section(it||(it=e.__makeTemplateObject(["\n background-color: white;\n border-radius: 4px;\n position: absolute;\n width: 100%;\n z-index: 30;\n\n "," {\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"],["\n background-color: white;\n border-radius: 4px;\n position: absolute;\n width: 100%;\n z-index: 30;\n\n "," {\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"])),o.MediaQueries.tdUp),Lt=function(e){var t=e.data,n=e.state,a=e.dispatch,i=e.isMobile,o=e.isLoading,r=e.keyword;return g.default.createElement(kt,null,t&&t.map((function(e){return g.default.createElement(Et,{type:e.type,state:n,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:i,isLoading:o,keyword:r})})))},St="api/lists/cities?keyword={keyword}&country_id={countryId}&site={domain}&_nopaging={noPaging}",Tt="api/v2/search/?site={domain}&type={searchType}&keyword={keyword}&city_id={city}&latitude={lat}&longitude={lng}",Ot="api/geobyip?site={domain}&latitude={lat}&longitude={lng}",It=function(t,a,i){return b.default(t,e.__assign(e.__assign({},a),{domain:n.domainLocales[i||"en-PH"]}))};var Mt;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Mt||(Mt={}));var Rt=Object.freeze({__proto__:null,get RedirectType(){return Mt}});exports.BookingSearchBar=function(r){var l=r.isMobile,s=r.careApiDomain,c=r.geoLocationPermission,u=r.geoLocationCoordinates,d=r.initialSelectedCity,p=r.initialSearchValue,h=void 0===p?"":p,f=r.careFrontDomain,C=void 0===f?"/care":f,v=r.isDebug,x=void 0!==v&&v,b=r.askForGeolocationPermission,y=void 0!==b&&b,_=r.gaTrackingSearchBar,w=r.gaTrackingLocationSearch,E=r.autoCompleteDisabled,k=void 0!==E&&E,L=r.inputSearchPlaceholder,S=void 0===L?"":L,T=r.routerPush,O=r.onGeoLocationPermissionChange,I=r.onSearch,M=r.onChangeLocation,R=o.useTranslations(),z=R.t,B=R.locale,D=t.useRef(null),H=t.useRef(null),V=t.useState(void 0),K=V[0],Z=V[1],G=function(){var e=t.useState((function(){if("undefined"==typeof window)return"unset";if(i.getCookie(a.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";var e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),n=e[0],o=e[1],r=t.useState((function(){if("undefined"==typeof window)return null;var e=i.getCookie(a.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=r[0],s=r[1],c=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(e){var t={lat:"".concat(Math.round(1e7*e.coords.latitude)/1e7),lng:"".concat(Math.round(1e7*e.coords.longitude)/1e7)};i.setCookie(a.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),0,15),s(t),o("granted")}),(function(){i.deleteCookie(a.USER_GEOLOCATION_COORDINATES_COOKIE),o("denied")}))}),[]);return t.useMemo((function(){return{geoLocationPermission:n,geoLocationCoordinates:l,requestGeoLocation:c}}),[n,l])}(),U=G.geoLocationPermission,q=G.geoLocationCoordinates,Q=G.requestGeoLocation,W=t.useReducer(Se,ke,(function(t){return e.__assign(e.__assign({},t),{isDebug:x,isMobile:l,geoLocationPermission:c||U||"unset",geoLocationCoordinates:u||q||null,searchKeywords:h,initialSelectedCity:d||null,selectedLocation:d||t.selectedLocation||null,searchLocationKeywords:(null==d?void 0:d.name)||t.searchLocationKeywords,autoCompleteDisabled:k,inputSearchPlaceholder:S,locale:B})})),J=W[0],X=W[1],$=J.navigateTo,ee=J.focused,te=J.isLoadingCities,ne=J.cities,ae=J.searchKeywords,ie=J.geoLocationPermission,oe=J.selectedLocation,re=J.initialSelectedCity,le=J.defaultCity,se=J.searchResults,ce=J.isLoadingSearchResults,ue=J.isMobileModalOpened,pe=J.inputSearchPlaceholder,he=function(a){var i=a.dispatch,o=a.careApiDomain,r=a.locale,l=void 0===r?"vi-VN":r,s=t.useCallback((function(e,t){void 0===t&&(t={});var n="".concat(o).concat(e);return i({type:Ce.FetchCitiesStart}),fetch(It(n,t,l),{method:"GET"}).then((function(e){return e.json()})).then((function(e){return 1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e))})).finally((function(){return i({type:Ce.FetchCitiesFinish})}))}),[l]),c=t.useCallback((function(t){var n=t.coordinates,a={};n&&(a={lat:n.lat,lng:n.lng});var o=[s(Ot,a)];return"zh-TW"===l&&o.push(s(St,{noPaging:1})),Promise.all(o).then((function(t){var n=t[0],a=t[1],o=e.__assign({},n);if(a){var r=o.cities.map((function(e){return e.id}));o.cities=o.cities.concat(a.cities.filter((function(e){return!r.includes(e.id)})))}i({type:Ce.FetchCitiesByGeoIpComplete,payload:o})})).catch((function(e){return console.error("error loading cities by location",e)}))}),[l,o,i]);return{fetchCitiesByLocation:c,fetchCitiesByKeyword:t.useCallback((function(e){return s(St,{keyword:e}).then((function(e){i({type:Ce.FetchCitiesByKeywordComplete,payload:e.cities})})).catch((function(e){return console.error("error loading cities by keyword",e)}))}),[l,o,i]),fetchSearchResults:t.useCallback((function(e,t){var a="".concat(o).concat(Tt);i({type:Ce.FetchSearchResultsStart});var r=t.defaultCity,s=t.selectedLocation,c=t.geoLocationCoordinates,u="";if(s&&r){s.id===n.ID_OPTION_CURRENT_LOCATION?c||(u=r.id):u=s.id;var d=(null==c?void 0:c.lat)||"",p=(null==c?void 0:c.lng)||"";return fetch(It(a,{domain:o,searchType:"global",keyword:e.trim().length>Ee[l]?e.trim():"",city:u===n.ID_OPTION_CURRENT_LOCATION?"":u,lat:d,lng:p},l),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((function(e){return e.json()})).then((function(e){return 1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e)})).then((function(e){return i({type:Ce.FetchSearchResultsComplete,payload:e})})).catch((function(e){console.log("error loading search results",{url:a,error:e})})).finally((function(){return i({type:Ce.FetchSearchResultsFinish})}))}i({type:Ce.FetchSearchResultsFinish})}),[l,o,i])}}({dispatch:X,locale:B,careApiDomain:s}),fe=he.fetchCitiesByLocation,ge=he.fetchCitiesByKeyword,me=he.fetchSearchResults,ve=t.useMemo((function(){var e;return{id:n.ID_OPTION_CURRENT_LOCATION,name:z("booking.searchBar.currentLocation"),slug:null===(e=n.LOCALIZED_SLUGS[B])||void 0===e?void 0:e.CURRENT}}),[z,B]),xe=t.useMemo((function(){return m.default(ge,400)}),[ge]),be=t.useMemo((function(){return m.default(me,400)}),[me]);t.useEffect((function(){""!==h&&h!==J.searchKeywords&&X({type:Ce.UpdateInitialSearchValue,payload:h})}),[h]),t.useEffect((function(){y&&(null==oe?void 0:oe.id)===n.ID_OPTION_CURRENT_LOCATION&&"unset"===ie&&Q()}),[y,oe,ie]),t.useEffect((function(){c||ie===U||("granted"===U&&q?X({type:Ce.GrantGeoLocationPermission,payload:q}):"denied"===U&&X({type:Ce.DenyGeoLocationPermission}))}),[ie,U,q,c]),t.useEffect((function(){$&&(T?T($):window.location.href="".concat(C).concat($))}),[$]);var ye=t.useCallback((function(){X({type:Ce.SelectCurrentLocation,payload:ve})}),[z,X]);t.useEffect((function(){"denied"===ie||re||ye(),O&&O(ie,J.geoLocationCoordinates),l&&"granted"===ie&&oe&&X({type:Ce.FocusInputSearch}),fe({coordinates:J.geoLocationCoordinates})}),[ie]),t.useEffect((function(){oe&&le&&me(J.searchKeywords,J)}),[oe,le]),t.useEffect((function(){S!==pe&&X({type:Ce.SetInputSearchPlaceholder,payload:S})}),[S,pe]),t.useEffect((function(){ue?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[ue]);var _e=t.useCallback((function(e){X({type:Ce.SelectLocation,payload:e}),Oe(),M&&M(e)}),[z,X]);function Le(){l&&"granted"!==J.geoLocationPermission?Q():(ye(),Oe())}function Te(){var e;D.current&&(null===(e=D.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Oe(){var e;D.current&&(null===(e=D.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Ie(){X({type:Ce.CloseMobileModal})}function Me(){return"location"!==ee?null:g.default.createElement(Y,{isLoading:te,cities:ne,onLocationClick:_e,onCurrentLocationClick:Le,isLocationLoading:te,geoLocationPermission:ie,selectedLocation:oe})}function Re(){return"search"!==ee?null:J.autoCompleteDisabled?l?g.default.createElement(je,{onClick:function(){I({cityId:J.selectedLocation.id,keyword:ae}),Ie()}}):null:g.default.createElement(Lt,{data:se,state:J,dispatch:X,isMobile:!1,keyword:ae,isLoading:ce})}function Ae(){return g.default.createElement(Ze,{isMobile:l,state:J,dispatch:X,debouncedFetchCitiesByKeyword:xe,debouncedFetchSearchResults:be,focusLocationInput:Te,focusSearchInput:Oe,renderLocationResults:Me,renderSearchResults:Re,trackingAttributes:_,locationTrackingAttributes:w,onSearch:I,initalSearchValue:h})}return t.useEffect((function(){if(window.visualViewport){var e=function(e){var t=e.target;Z(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e),function(){window.visualViewport.removeEventListener("resize",e)}}}),[Z]),l?g.default.createElement(g.default.Fragment,null,g.default.createElement(j,null),g.default.createElement(F,{ref:H}),g.default.createElement(N,{id:"booking-search-bar",ref:D,"data-is-modal":l&&ue,style:{"--mobile-care-searchbar-height":ue&&K?"".concat(K,"px"):"100%"}},ue?g.default.createElement(g.default.Fragment,null,g.default.createElement(P,null,g.default.createElement(we,{headingText:z("booking.searchBar.searchButton"),onLeftClick:Ie}),Ae()),Me(),Re()):g.default.createElement(de,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return H.current&&H.current.focus(),X({type:Ce.OpenMobileModal}),[4,Promise.resolve()];case 1:return e.sent(),D.current&&(null===(t=D.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus()),[2]}}))}))},focused:ee,value:ae,trackingAttributes:_,inputSearchPlaceholder:S}))):g.default.createElement(A,{id:"booking-search-bar",ref:D},Ae())},exports.types=Rt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f7929e76.js"),t=require("react"),n=require("./index.styled-d41606bf.js"),a=require("./index.styled-3898ef06.js"),o=require("./index-db0c8c89.js"),i=require("./useTranslations-e724fe88.js"),l=require("innertext"),r=require("./theme-81c0c062.js"),s=require("./index.styled-3f048fc2.js");require("react-range");var c=require("react-dom"),u=require("./constants-3cd37eba.js"),d=require("lodash/debounce"),m=require("react-contenteditable"),p=require("./lazyLoad-0454885d.js");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function f(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}require("date-fns"),require("styled-components");var g=v(t),h=v(l),C=f(c),w=v(d),E=v(m),y=function(o){var i=o.title,l=o.url,r=o.image,c=o.logo,u=o.className,d=o.style,m=o.noRefetch,p=t.useContext(s.TogetherComponentGlobalContext).data,v=p.locale,f=p.env.isMarryBaby,h=t.useState(!1),C=h[0],w=h[1],E=t.useRef(m);E.current=m;var y=t.useState(null),k=y[0],_=y[1];t.useEffect((function(){e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(t){return E.current?[2]:l?(_((function(t){return e.__assign(e.__assign({},t),{isFetching:!0})})),s.callApi(s.getApiPath(s.PATHS.FETCH_PREVIEW,{_locale:v}),"POST",{data:{link:l}}).then((function(e){var t,n,a;w(!1),_({title:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.title,url:l,image:(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.image)||(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.logo)})})).catch((function(){_(null)})),[2]):[2,_(null)]}))}))}),[l]);var b=(null==k?void 0:k.image)||r,T=(null==k?void 0:k.title)||i,S=(null==k?void 0:k.logo)||c,P=(null==k?void 0:k.url)||l,x=P.replace("http://","").replace("https://","").split(/[/?#]/)[0],N=t.useRef(!1);return g.default.createElement(s.StyledCardLink,{"data-is-marrybaby":f,className:"".concat(u," no-replace-click"),style:d},g.default.createElement("a",{href:P,target:"_blank",rel:"noreferrer"},b&&g.default.createElement("div",{className:"link-image-wrapper"},!f&&g.default.createElement("img",{className:"link-image-blur",src:b,onError:function(e){N.current||(N.current=!0,e.currentTarget.src=s.DEFAULT_IMG)}}),g.default.createElement("img",{className:"link-image",src:b,onError:function(e){N.current||(N.current=!0,e.currentTarget.src=s.DEFAULT_IMG)}})),g.default.createElement("div",{className:"link-info-container"},g.default.createElement(a.Text,{size:"n1"},f&&S&&!C&&g.default.createElement("img",{className:"link-logo",src:S,onError:function(e){return w(!0)}}),x),g.default.createElement(n.Heading,{tag:"h6"},T))))},k=function(e){var n=e.topics,o=e.onClick,i=e.className,l=e.style,r=function(){var e=t.useState(!1),n=e[0],a=e[1],o=t.useRef(null),i=t.useRef(null),l=t.useRef();return{sliding:n,mouseDownHandler:function(e){if(o.current){l.current=setTimeout((function(){a(!0)}),500),i.current={left:o.current.scrollLeft,x:e.clientX};var t=function(e){var t=i.current;if(t){var n=e.clientX-t.x;o.current&&(o.current.scrollLeft=t.left-n)}},n=function(){l.current&&(clearTimeout(l.current),l.current=void 0),a(!1),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",t),document.addEventListener("mouseup",n)}},sliderRef:o,pos:i}}(),c=r.sliding,u=r.mouseDownHandler,d=r.sliderRef,m=t.useContext(s.TogetherComponentGlobalContext),p=m.data.env.togetherBasePath,v=m.action.sanitizeFunction;return g.default.createElement(s.StyledTagTopic,{ref:d,onClick:o,onMouseDown:function(e){return u(e)},className:"".concat(i," ").concat(c?"sliding":""),style:l},n.map((function(e,t){return g.default.createElement("a",{className:"tag-link-item",key:t,href:e.isActive&&!e.isHidden?"".concat(p).concat(e.url):void 0},g.default.createElement(a.Text,{size:"p3"},g.default.createElement("span",{dangerouslySetInnerHTML:{__html:(null==v?void 0:v(e.name))||e.name}})))})))},_=function(e){var n=e.onClick;e.color;var a=e.className,o=e.style,l=t.useContext(s.TogetherComponentGlobalContext).data.env.isMarryBaby,r=i.useTranslations().t;return g.default.createElement(s.LabelSortPin,{label:g.default.createElement(g.default.Fragment,null,l&&g.default.createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M3.5 19.9999L7.87 15.6299' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.95634 11.294C4.56534 11.685 4.56534 12.318 4.95634 12.708L7.87434 15.626L10.7923 18.544C11.1833 18.935 11.8163 18.935 12.2063 18.544L13.3813 17.369C13.5693 17.181 13.6743 16.927 13.6743 16.662V12.726L16.5743 9.82597L18.8833 9.94897C19.1663 9.96397 19.4433 9.85797 19.6433 9.65797L20.2173 9.08397C20.6083 8.69297 20.6083 8.05997 20.2173 7.66997L15.8313 3.28397C15.4403 2.89297 14.8073 2.89297 14.4173 3.28397L13.8433 3.85797C13.6423 4.05897 13.5363 4.33497 13.5523 4.61797L13.6753 6.92697L10.7753 9.82697H6.83834C6.57334 9.82697 6.31834 9.93197 6.13134 10.12L4.95634 11.294V11.294Z' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath d='M16.5699 9.83018L13.6699 6.93018' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3c/svg%3e"})," ",r("label.pinnedPost")),rightLabel:!l&&g.default.createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cline x1='7.18605' y1='7.68219' x2='3.68219' y2='13.8139' stroke='%23FEA21E' stroke-linecap='round'/%3e%3cpath d='M3.24591 7.78426C3.21275 7.84168 3.20376 7.90993 3.22092 7.97398C3.23808 8.03803 3.27998 8.09264 3.3374 8.12579L8.78429 11.2706C8.90385 11.3396 9.05674 11.2986 9.12578 11.1791C9.71191 10.1641 9.71348 8.97262 9.23682 7.99339L10.8583 5.18521C11.5115 5.00603 12.0982 4.57973 12.4638 3.94629C12.5328 3.82672 12.4919 3.67383 12.3723 3.6048L8.18237 1.18584C8.12494 1.15268 8.0567 1.1437 7.99265 1.16086C7.92861 1.17803 7.874 1.21993 7.84086 1.27736C7.47521 1.91077 7.39934 2.63194 7.57065 3.28723L5.94919 6.09545C4.86323 6.1723 3.83201 6.76934 3.24591 7.78426Z' fill='%23FEA21E' stroke='%23FEA21E' stroke-width='0.5' stroke-linejoin='round'/%3e%3c/svg%3e"}),onClick:n,color:"white",className:"label-pinned ".concat(a),style:o})},b=function(e){return{message:e("notification.failure"),type:"danger"}},T="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%23FE921D'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",S=function(t){var n=t.id,a=t.locale;return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return n?[4,s.callApiWithAuth(s.getApiPath(s.PATHS.POST.LIKE,{id:n,_locale:a}),"GET")]:[2];case 1:return[2,e.sent()]}}))}))},P=function(t){var n=t.id,a=t.locale;return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return n?[4,s.callApiWithAuth(s.getApiPath(s.PATHS.POST.DELETE,{id:n,_locale:a}),"DELETE")]:[2];case 1:return[2,e.sent()]}}))}))},x=function(t){var n=t.title,a=t.description,o=t.communityId,i=t.imageFiles,l=t.previewUrl,r=t.topicIds,c=t.locale,u=t.sanitizeFunction,d=t.categoryCommunityId,m=t.categoryTopicIds,p=t.introUrl,v=t.bannerUrl,f=t.scheduleTime;return e.__awaiter(void 0,void 0,void 0,(function(){var t,g,h,C,w;return e.__generator(this,(function(e){switch(e.label){case 0:return t=new FormData,g=s.removeBannedWordWrapper(a),h=s.removeBannedWordWrapper(n),C=s.getMentionIdsFromString(g),t.append("title",h),t.append("description",s.encodePostContent(g,u)),d?t.append("category_community",String(d)):o&&t.append("community_id",String(o)),(null==l?void 0:l.title)&&t.append("preview_title",l.title),(null==l?void 0:l.description)&&t.append("preview_description",l.description),(null==l?void 0:l.url)&&t.append("preview_link",l.url),(null==l?void 0:l.image)&&t.append("preview_image",l.image),null==r||r.forEach((function(e){t.append("topics[]",String(e||""))})),null==m||m.forEach((function(e){t.append("category_topics[]",String(e||""))})),(null==i?void 0:i.length)?[4,Promise.all(i.map((function(e,t){return new Promise((function(n){setTimeout((function(){n(s.uploadAndGetSrc(e,c))}),2e3*t)}))})))]:[3,2];case 1:return null==(w=e.sent())||w.filter(Boolean).slice(0,s.MAX_IMAGE_UPLOADS).forEach((function(e,n){t.append("images[".concat(n,"]"),e)})),[3,3];case 2:t.append("images",""),e.label=3;case 3:return null==C||C.forEach((function(e){t.append("mention_ids[]",e)})),t.append("intro_url",p||""),t.append("banner",v||""),f&&(t.append("post_type","scheduled"),t.append("schedule_datetime",f)),[2,t]}}))}))},N=function(t){var n=t.locale,a=t.formData,o=t.isArticleComment;return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,s.callApiWithAuth(s.getApiPath(o?s.PATHS.POST.CREATE_ARTICLE_COMMENT:s.PATHS.POST.CREATE,{_locale:n}),"POST",{data:a,headers:{"Content-Type":"multipart/form-data"}})];case 1:return[2,e.sent()]}}))}))},I=function(t){var n=t.id,a=t.locale,o=t.formData;return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,s.callApiWithAuth(s.getApiPath(s.PATHS.POST.UPDATE,{id:n,_locale:a}),"POST",{data:o})];case 1:return[2,e.sent()]}}))}))},A=function(e){var t=e.id,n=e.reason,a=e.locale,o=new FormData;return o.append("reason",n),s.callApiWithAuth(s.getApiPath(s.PATHS.POST.REPORT,{_locale:a,id:t}),"POST",{data:o})},M=function(e,n){var a=t.useState(e||[]),o=a[0],i=a[1];return{onSelectImages:function(t){var a=t.target.files;a&&(n&&e?n((e||o).concat(Array.from(a))):i((function(t){var o=e||t;return n&&n(o.concat(Array.from(a))),o.concat(Array.from(a))})))},onRemoveImage:function(t){if(n&&e){var a=e;a.splice(t,1),n(a.slice())}else i((function(a){var o=e||a;return o.splice(t,1),n&&n(o.slice()),o.slice()}))},onRemoveAllImages:function(){n?n([]):i([])},imageSrcs:t.useMemo((function(){return(e||o).map((function(e){return"string"==typeof e?e:URL.createObjectURL(e)}))}),[e,o]),imageFiles:e||o}},L="data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 22.9844C17.5228 22.9844 22 18.5072 22 12.9844C22 7.46153 17.5228 2.98438 12 2.98438C6.47715 2.98438 2 7.46153 2 12.9844C2 18.5072 6.47715 22.9844 12 22.9844Z' fill='%23262626'/%3e%3cpath d='M14.8281 10.1562L9.17127 15.8131' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.17188 10.1562L14.8287 15.8131' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",R=function(e){var n=e.className,o=e.style,l=e.bannedWords,c=void 0===l?[]:l,u=e.value,d=e.onChange,m=e.onPreviewUrlChange,p=e.onInvalidUrlsChange,v=e.onImageFilesChange,f=e.imageFiles,C=e.isReplying,w=i.useTranslations().t,E=t.useState(null),k=E[0],_=E[1],b=t.useRef(null),S=M(f,v),P=S.onSelectImages,x=S.onRemoveImage,N=S.imageSrcs;return t.useEffect((function(){m&&((null==k?void 0:k.url)?m({title:k.title||"",url:k.url||"",image:k.image||"",description:k.description||""}):m(null))}),[k]),g.default.createElement(s.StyledCreatePostDescription,{className:n,style:o},g.default.createElement(a.Text,{size:"p4",className:"description-label"},w("createPost.popup.description")),g.default.createElement("div",{className:"textarea-control"},g.default.createElement("div",{className:"textarea-wrapper"},g.default.createElement(s.RichTextEditor,{html:u||"",onChange:d,bannedWords:c,onImagePickerClick:function(){var e;return null===(e=b.current)||void 0===e?void 0:e.click()},onPreviewUrlChange:_,onInvalidUrlsChange:p,isReplying:C}))),g.default.createElement(a.Text,{size:"p4",className:"count-string"},w("character"),": ",h.default(u||"").length),(!N||0===N.length)&&k&&g.default.createElement("div",{className:"link-preview-wrapper"},k.isFetching?g.default.createElement(s.Loading,null):g.default.createElement(g.default.Fragment,null,g.default.createElement(y,{title:k.title,url:k.url||"#",image:k.image,noRefetch:!0}),g.default.createElement("img",{src:L,className:"icon-close",onClick:function(){return _(null)}}))),g.default.createElement("input",{ref:b,type:"file",accept:"image/png, image/gif, image/jpeg",multiple:!0,style:{display:"none"},onChange:P}),N.length>s.MAX_IMAGE_UPLOADS?g.default.createElement("div",{className:"input-notification"},g.default.createElement("img",{src:T}),g.default.createElement(a.Text,{size:"p4",color:r.theme.colors.alertWarning},w("createPost.popup.warningImage"))):null,N.length>0&&g.default.createElement("div",{className:"image-gallery"},N.map((function(e,t){return g.default.createElement("div",{key:t,className:"image-item"},g.default.createElement("img",{src:e}),g.default.createElement("img",{className:"close-btn",src:L,onClick:function(){return x(t)}}))}))))},B=function(e,t){if(!t)return e;var n=t.limit,a=t.bannedWords,o=void 0===a?[]:a,i="number"==typeof n&&n>=0?e.substring(0,n):e;return s.highlightBadWords(i,o)},j=function(e){var n,o=e.className,l=e.style,r=e.bannedWords,c=void 0===r?[]:r,d=e.value,m=e.onChange,p=i.useTranslations().t,v=t.useState(""),f=v[0],h=v[1],C=t.useRef(null);t.useEffect((function(){if(C.current){var e=function(e){var t;e.preventDefault();var n=null===(t=e.clipboardData)||void 0===t?void 0:t.getData("text/plain");document.execCommand("insertHTML",!1,n)},t=C.current;return t.addEventListener("paste",e),function(){return t.removeEventListener("paste",e)}}}),[C]);var y=(null==c?void 0:c.join(","))||"";t.useEffect((function(){var e;if(y){var t=null===(e=C.current)||void 0===e?void 0:e.innerText;if(t){var n=s.highlightBadWords(t,c);n!==t&&(m&&m(n),h(n))}}}),[y]);var k=t.useCallback(w.default((function(e){if(C.current){var t=B(C.current.innerText,{limit:120,bannedWords:c});m&&m(t),h(t)}}),300),[]);return t.useEffect((function(){setTimeout((function(){var e;null===(e=C.current)||void 0===e||e.focus()}),500)}),[]),g.default.createElement(s.StyledCreatePostTitle,{className:o,style:l},g.default.createElement(u.Input,{name:"title",value:d||f,size:"md",label:p("createPost.title"),CustomInput:g.default.createElement(E.default,{innerRef:C,html:d||f,onChange:function(e){if(C.current&&C.current.innerText!==(d||f)){var t=B(C.current.innerText,{bannedWords:c});m&&m(t),h(t),k(C.current.innerText)}},className:"title-input"})}),g.default.createElement(a.Text,{size:"p4",className:"count-string"},p("createPost.popup.wordCount",{count:(null===(n=C.current)||void 0===n?void 0:n.innerText.length)||0,max:120})))},F=function(n){var a=n.className,o=n.style,i=n.topics,l=n.communityId,r=n.onChange,c=n.isLoading,u=n.disabled,d=n.forceTopics,m=n.selectedTopics,p=n.noFetch,v=t.useContext(s.TogetherComponentGlobalContext).data,f=v.locale,h=v.env.isMarryBaby,C=t.useState(i?e.__spreadArray([],i,!0):[]),w=C[0],E=C[1],y=t.useState(m?e.__spreadArray([],m,!0):[]),k=y[0],_=y[1],b=t.useState(!1),T=b[0],S=b[1],P=t.useRef(i);P.current=i,t.useEffect((function(){var t;!l||p||(null===(t=P.current)||void 0===t?void 0:t.length)||(E([]),S(!0),e.__awaiter(void 0,void 0,void 0,(function(){var t,n,a,o;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,s.callApi(s.getApiPath(s.PATHS.TOPIC.LIST,{communityId:l,_locale:f}),"GET")];case 1:return t=e.sent(),n=null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.topics,Array.isArray(n)&&E((function(){return(null==n?void 0:n.map(s.formatTopic).sort((function(e,t){return(e.order||0)-(t.order||0)})))||[]})),[3,3];case 2:return a=e.sent(),console.log(a),S(!1),[3,3];case 3:return S(!1),[2]}}))})))}),[l,p]);var x=null==i?void 0:i.map((function(e){return e.id})).join("-"),N=null==w?void 0:w.map((function(e){return e.id})).join("-"),I=null==d?void 0:d.map((function(e){return e.id})).join("-");t.useEffect((function(){i&&void 0!==x&&x!==N&&E(i)}),[i,x,N]);var A=t.useMemo((function(){return w.filter((function(e){return!(null==d?void 0:d.some((function(t){return t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId})))}))}),[N,I]);return g.default.createElement(s.StyledTopicSelectList,{"data-is-marrybaby":h,className:a,style:o},d.map((function(e){return g.default.createElement(D,{key:"".concat(e.id,"-").concat(e.mappedCategoryId),topic:e,disabled:!0,selected:!0})})),A.map((function(e){return g.default.createElement(D,{key:"".concat(e.id,"-").concat(e.mappedCategoryId),topic:e,disabled:u,selected:(m||k).some((function(t){return t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId})),onClick:function(){var t=m||k,n=t.findIndex((function(t){return t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId}));-1!==n?t.splice(n,1):t.push(e),r&&m?r(t.slice()):(r&&r(t.slice()),_(t.slice()))}})})),(c||T)&&g.default.createElement(s.Loading,{className:"topic-spinner"}))},D=function(e){var t=e.topic,n=e.disabled,a=e.selected,o=e.onClick;return g.default.createElement("div",{className:"tag-item"+(a?" --active":""),"data-disabled":n,onClick:n?void 0:o},t.name)},O=function(e){var o=e.className,l=e.isMarryBaby,r=e.style,c=e.title,u=e.description,d=e.acceptText,m=e.cancelText,p=e.onAccept,v=e.thumbnail,f=e.isThumbnailIcon,h=e.onClose,w=t.useContext(s.TogetherComponentGlobalContext).data.env.isMarryBaby,E="boolean"==typeof l?l:w,y=t.useState(!1),k=y[0],_=y[1];return t.useEffect((function(){return i.toggleNoScroll(!0),setTimeout((function(){return _(!0)}),0),function(){return i.toggleNoScroll(!1)}}),[]),C.createPortal(g.default.createElement(s.StyledPopupDanger,{"data-is-marrybaby":E,className:o,style:r,"data-open":k},g.default.createElement(s.PopupFrame,{className:"popup-frame",isOpen:k,onClose:h},g.default.createElement("div",{className:"confirm-dialog",onClick:function(e){return e.stopPropagation()}},g.default.createElement("div",{className:"confirm-content"},v&&g.default.createElement("div",{className:"thumbnail-container ".concat(f?"is-icon":"")},g.default.createElement("img",{className:"thumbnail",src:v})),g.default.createElement(n.Heading,{className:"title",tag:"h2"},c),g.default.createElement(a.Text,{className:"desc",size:"lg"},u),g.default.createElement("div",{className:"btn-group"},g.default.createElement(n.Button,{theme:E?"marryBaby":"helloSites",size:"md",color:"secondary",onClick:function(){null==p||p(),null==h||h()}},d),g.default.createElement(n.Button,{theme:E?"marryBaby":"helloSites",size:"md",onClick:h},m)))),E&&v&&g.default.createElement("div",{className:"thumbnail-container is-mobile ".concat(f?"is-icon":"")},g.default.createElement("img",{className:"thumbnail",src:v})))),i.getPopupWrapperDom())},H=function(t){var n=t.postId,a=t.message,o=t.photos,i=t.link,l=t.locale,r=t.sanitizeFunction,c=t.replyingUserId,u=t.replyingUserName,d=t.replyingId;return e.__awaiter(void 0,void 0,void 0,(function(){var t,m,p;return e.__generator(this,(function(e){switch(e.label){case 0:return t=new FormData,m=s.encodePostContent(a.replace(/(\ )+/g," "),r),p=s.getMentionIdsFromString(m),o&&o.length>0?[4,Promise.all(null==o?void 0:o.map((function(e){return s.uploadAndGetSrc(e,l)})))]:[3,2];case 1:e.sent().filter(Boolean).slice(0,s.MAX_IMAGE_UPLOADS).forEach((function(e){t.append("images[]",e)})),e.label=2;case 2:return i&&t.append("link",i),null==p||p.forEach((function(e){t.append("mention_ids[]",e)})),t.append("post_id",n),d&&t.append("parent_id",d),c&&(p.unshift(c),m='[mention+id="'.concat(c,'"+name="').concat((u||"").replace('"',"'"),'"]').concat(m),t.append("parent_user_id",String(c))),t.append("content",m),t.append("content",m),[2,t]}}))}))},W=function(t,n){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,s.callApiWithAuth(s.getApiPath(s.PATHS.COMMENT.CREATE,{_locale:n}),"POST",{data:t,headers:{"Content-Type":"multipart/form-data"}})]}))}))},U=function(t,n){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,s.callApiWithAuth(s.getApiPath(s.PATHS.COMMENT.REPLY,{_locale:n}),"POST",{data:t,headers:{"Content-Type":"multipart/form-data"}})]}))}))},z=function(t){var n=t.commentId,a=t.setLike,o=void 0!==a&&a,i=t.locale;return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,s.callApiWithAuth(s.getApiPath(o?s.PATHS.COMMENT.LIKE:s.PATHS.COMMENT.UNLIKE,{_locale:i,id:n}),"GET")]}))}))},V=function(e){var t=e.id,n=e.locale;return s.callApiWithAuth(s.getApiPath(s.PATHS.COMMENT.DELETE,{_locale:n,id:t}),"DELETE")},G=function(o){var l=o.isReply,r=o.className,c=o.onClose,d=o.replyToName,m=o.style,p=o.replyingId,v=o.replyingUser,f=o.onPostSuccess;o.isMainCmt;var h=o.post,C=o.isMarryBaby,w=t.useContext(s.TogetherComponentGlobalContext),E=w.action,k=E.pushNotifications,_=E.sanitizeFunction,b=w.data,T=b.userInfo,S=b.locale,P=b.env.isMarryBaby,x="boolean"==typeof C?C:P,N=i.useTranslations().t,I=M(),A=I.onSelectImages,R=I.onRemoveImage,B=I.imageSrcs,j=I.onRemoveAllImages,F=I.imageFiles,D=t.useState(""),O=D[0],z=D[1],V=t.useContext(s.MainInputTriggerContext).trigger,G=t.useState(!1),Z=G[0],q=G[1],$=t.useRef(null),K=t.useRef(null),Q=t.useRef(null),X=t.useState([]),J=X[0],Y=X[1],ee=t.useState([]),te=ee[0],ne=ee[1],ae=t.useState(null),oe=ae[0],ie=ae[1];return t.useEffect((function(){var e;null===(e=Q.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout((function(){var e;null===(e=K.current)||void 0===e||e.focus()}),400)}),[V]),g.default.createElement(s.StyledInputCommentBar,{"data-is-reply":l,className:r,style:m},l&&g.default.createElement("div",{className:"reply-to-container"},g.default.createElement(a.Text,{size:"p4"},g.default.createElement("span",{dangerouslySetInnerHTML:{__html:N("inputComment.replyTo",{name:'<span style="color: #2D87F3; cursor: pointer">@'.concat(d||"","</span>")})}})),g.default.createElement("img",{src:"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8.00016' cy='8.50004' r='6.66667' fill='white' stroke='%23404040'/%3e%3cpath d='M10 6.5L6 10.5' stroke='%23404040' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6 6.5L10 10.5' stroke='%23404040' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",className:"icon-close-comment",onClick:function(){return c&&c()}})),g.default.createElement("div",{className:"input-container",ref:Q},g.default.createElement(s.UserAvatar,{className:"avatar-wrapper ".concat(l?"avatar-wrapper-reply":""),avatar:(null==T?void 0:T.id)?T.avatar:s.DEFAULT_AVATAR_IMG,username:(null==T?void 0:T.name)||(null==T?void 0:T.username)}),g.default.createElement("input",{ref:$,onChange:A,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),g.default.createElement(u.Input,{value:O,name:"input",size:"md",className:"input-wrapper",displayIcon:g.default.createElement("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.7543 4.85352H4.49227C4.01776 4.85352 3.56268 5.04201 3.22715 5.37754C2.89162 5.71307 2.70313 6.16815 2.70312 6.64266V19.1667C2.70313 19.6412 2.89162 20.0963 3.22715 20.4318C3.56268 20.7673 4.01776 20.9558 4.49227 20.9558H17.0163C17.4908 20.9558 17.9459 20.7673 18.2814 20.4318C18.6169 20.0963 18.8054 19.6412 18.8054 19.1667V12.9047' stroke='%232D87F3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M17.4633 3.51187C17.8192 3.15599 18.3019 2.95605 18.8052 2.95605C19.3085 2.95605 19.7912 3.15599 20.147 3.51187C20.5029 3.86775 20.7029 4.35044 20.7029 4.85373C20.7029 5.35702 20.5029 5.83971 20.147 6.19559L11.6486 14.694L8.07031 15.5886L8.96489 12.0103L17.4633 3.51187Z' stroke='%232D87F3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"}),CustomInput:g.default.createElement("div",{className:"as-input"},g.default.createElement(s.RichTextEditor,{className:"textarea",html:O,onChange:z,onImagePickerClick:function(){var e;return null===(e=$.current)||void 0===e?void 0:e.click()},bannedWords:te,onPreviewUrlChange:ie,onInvalidUrlsChange:Y,setEditorRef:function(e){return K.current=e},isReplying:l}))}),g.default.createElement(n.Button,{theme:x?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,n,a,o,i,r,u,d,m,g,C,w,E;return e.__generator(this,(function(y){switch(y.label){case 0:if(!(null==h?void 0:h.id)||Z)return[2];q(!0),y.label=1;case 1:return y.trys.push([1,4,,5]),t=function(e){z(""),j(),c&&c();var t=s.formatComment(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),f&&f(t)},[4,H(e.__assign({message:O,photos:F,postId:String(h.id),link:null==oe?void 0:oe.url,sanitizeFunction:_,locale:S},l&&p?{replyingUserId:String((null==v?void 0:v.id)||(null===(i=null==h?void 0:h.author)||void 0===i?void 0:i.id)||""),replyingId:p,replyingUserName:(null==v?void 0:v.name)||(null==v?void 0:v.username)||""}:{}))];case 2:return n=y.sent(),[4,l&&p?U(n,S):W(n,S)];case 3:return a=y.sent(),(null==(o=null==a?void 0:a.data)?void 0:o.id)&&!(null===(u=null===(r=null==a?void 0:a.messages)||void 0===r?void 0:r.moderation)||void 0===u?void 0:u.type)?t(a):"banned"===(null===(m=null===(d=null==a?void 0:a.messages)||void 0===d?void 0:d.moderation)||void 0===m?void 0:m.type)?(k({title:N("notification.comment.blocked.title"),message:N("notification.comment.blocked.message"),type:"danger"}),a.messages.moderation.words&&ne(a.messages.moderation.words)):"suspect"===(null===(C=null===(g=null==a?void 0:a.messages)||void 0===g?void 0:g.moderation)||void 0===C?void 0:C.type)?(k({title:N("notification.comment.suspect.title"),message:N("notification.comment.suspect.message"),type:"warning"}),z(""),j(),c&&c()):(null===(w=null==a?void 0:a.messages)||void 0===w?void 0:w.find((function(e){var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(k({message:N("notification.suspend.message"),type:"warning"}),z(""),j(),c&&c()):k({title:"",message:(null===(E=null==a?void 0:a.messages)||void 0===E?void 0:E[0])||N("notification.comment.somethingWrong"),type:"danger"}),[3,5];case 4:return y.sent(),k({title:"",message:N("notification.comment.somethingWrong"),type:"danger"}),[3,5];case 5:return q(!1),[2]}}))}))},isLoading:Z,isDisabled:!!(null==J?void 0:J.length)||Z||!O||(null==O?void 0:O.length)<2||!O.trim()},g.default.createElement("img",{src:"data:image/svg+xml,%3csvg width='20' height='21' viewBox='0 0 20 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.5 9.73438L3.75 13.4844L7.5 17.2344' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M16.25 4.73438L16.25 10.3026C16.25 11.1464 15.9208 11.9557 15.3347 12.5524C14.7487 13.1491 13.9538 13.4844 13.125 13.4844L3.75 13.4844' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",className:"icon-enter"}))),(null==J?void 0:J.length)?g.default.createElement("div",{className:"error-text"},N("notification.limitUrlDomain")):null,(!B||0===B.length)&&oe&&g.default.createElement("div",{className:"link-preview-wrapper"},oe.isFetching?g.default.createElement(s.Loading,null):g.default.createElement(g.default.Fragment,null,g.default.createElement(y,{title:oe.title,url:oe.url||"#",image:oe.image,noRefetch:!0}),g.default.createElement("img",{src:L,className:"icon-close",onClick:function(){return ie(null)}}))),B&&B.length>0&&g.default.createElement("div",{className:"preview-images-container"},B.map((function(e,t){return g.default.createElement("div",{key:t,className:"image-src-wrapper"},g.default.createElement("img",{className:"preview-image",src:e}),g.default.createElement("img",{src:L,className:"icon-close-circle",onClick:function(){return R(t)}}))}))))},Z="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 5V8' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11H8.00708' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",q=function(o){var l=o.className,c=o.style,u=o.reason,d=o.reasonText,m=o.onClose,p=o.postId,v=t.useContext(s.TogetherComponentGlobalContext),f=v.data,h=f.locale,C=f.env.isMarryBaby,w=v.action.pushNotifications,E=i.useTranslations().t,y=t.useState(!1),k=y[0],_=y[1];return g.default.createElement(s.StyledSubmitReportForm,{"data-is-marrybaby":C,className:l,style:c},g.default.createElement("ul",{className:"report-list"},g.default.createElement("li",{className:"report-item"},g.default.createElement("img",{src:Z}),g.default.createElement(a.Text,{className:"__label",color:r.theme.colors.gray800,size:"p4"},d))),g.default.createElement(n.Button,{theme:C?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:k,onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:if(!p||k)return[2];_(!0),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,A({id:p,reason:u,locale:h})];case 2:return 1===(null==(t=e.sent())?void 0:t.status)&&(w({message:"Post reported",type:"success"}),m&&m()),[3,4];case 3:return e.sent(),[3,4];case 4:return _(!1),[2]}}))}))}},E("submit")))},$=function(e){var n=e.className,a=e.style,o=e.replyingTo,l=e.mentionedUser,r=e.description,c=e.disableShortenContent,u=e.mentions,d=void 0===u?[]:u,m=t.useState(!1),p=m[0],v=m[1],f=i.useTranslations().t,h=s.useTogetherAuthRequiredAction().authActionWrapper,C=t.useState(!1),w=C[0],E=C[1],y=s.decodeMention(s.decodePostUrl(r||"","display"),d),k=t.useContext(s.TogetherComponentGlobalContext).action.sanitizeFunction,_=t.useMemo((function(){var e=k(y||"");if(c||p)return{showContent:e,hasSeeMore:!1};var t=e.slice(0,1e3),n=1e3-27*((t.match(/<\/div>/g)||[]).length-1),a=(t||"").slice(0,n<40?40:n),o=k(a.replace(/(<|<\/)( +|[a-zA-Z]*)$/gi,"")),i=o.length<e.length-10;return{showContent:i?o:e,hasSeeMore:i}}),[c,p,y]),b=(null==l?void 0:l.name)||o,T="expert"===(null==l?void 0:l.role)&&!!(null==l?void 0:l.partnerId);return g.default.createElement(g.default.Fragment,null,T&&g.default.createElement(s.PopupExpert,{isOpen:w,onClose:function(){return E(!1)},expertId:String(null==l?void 0:l.partnerId)}),g.default.createElement(s.StyledPostContent,{className:"".concat(n," no-replace-click"),style:a},b&&g.default.createElement("span",{onClick:function(){return T&&E(!0)},className:"post-content-replying"},"@",b),(null==r?void 0:r.startsWith("[mention+id="))&&g.default.createElement("span",{className:"post-content-replying tag-only"},"@"),g.default.createElement("span",{dangerouslySetInnerHTML:{__html:_.showContent},className:"post-content ".concat(_.hasSeeMore?"has-see-more":"")}),_.hasSeeMore&&!p&&g.default.createElement("span",null,"... ",g.default.createElement("span",{onClick:function(e){e.preventDefault(),e.stopPropagation(),h((function(){return v(!0)}))},className:"see-more-text"},f("post.seeMore")))))},K=function(e){var n=e.className,o=e.style,l=e.authorName,r=e.images,c=e.onClose,u=e.onOpenSingleView,d=i.useTranslations().t,m=t.useState(!1),p=m[0],v=m[1];return t.useEffect((function(){setTimeout((function(){v(!0)}),0)}),[]),C.createPortal(g.default.createElement(s.StyledImagePreviewPopup,{className:n,style:o,"data-open":p},g.default.createElement("div",{className:"top-bar"},g.default.createElement("img",{className:"icon-arrow-left",src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.0508 18.0607L4.00078 12.0367L10.0508 6.01172' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4.00195 12.0352L19.002 12.0352' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",onClick:c,alt:"go back"}),g.default.createElement(a.Text,{size:"p2",type:"bold",style:{textAlign:"center"}},d("previewPhotos.title",{name:l}))),g.default.createElement("div",{className:"container"},r.map((function(e,t){return g.default.createElement("img",{className:"img-preview",key:t,src:e,onClick:function(){return null==u?void 0:u(t)},alt:"post img"})})))),i.getPopupWrapperDom())},Q="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 12.8125L10 8.8125L6 4.8125' stroke='white' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",X=function(e){var n=e.initialViewIndex,a=e.images,o=e.onClose,l=t.useState(n),r=l[0],c=l[1],u=t.useState(!1),d=u[0],m=u[1];t.useEffect((function(){setTimeout((function(){m(!0)}),0)}),[]);var p=null==a?void 0:a[r],v=0===r,f=!(null==a?void 0:a.length)||r===(null==a?void 0:a.length)-1;return C.createPortal(g.default.createElement(s.StyledImagePreviewContainer,{"data-open":d&&!!p},g.default.createElement(s.StyledImagePreviewTopbar,null,g.default.createElement("img",{src:s.img,className:"icon-close",onClick:o,alt:"close"})),p&&r>=0&&g.default.createElement(g.default.Fragment,null,g.default.createElement(s.StyledImagePreviewWrapper,null,g.default.createElement("img",{className:"img-preview",src:p,alt:"post img open"}),g.default.createElement(s.StyledArrowWrapper,{"data-disabled":v,onClick:function(){return!v&&c(r-1)}},g.default.createElement(s.StyledCircleArrow,null,g.default.createElement("img",{src:Q,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":v}))),g.default.createElement(s.StyledArrowWrapper,{"data-right":!0,"data-disabled":f,onClick:function(){return!f&&c(r+1)}},g.default.createElement(s.StyledCircleArrow,null,g.default.createElement("img",{src:Q,alt:"right arrow","data-disabled":f})))))),i.getPopupWrapperDom())},J=function(e){var n=e.image,a=e.isShortcut,o=t.useState(!0),l=o[0],r=o[1],c=i.useTranslations().t;return t.useEffect((function(){setTimeout((function(){return null===p.lazyLoadInstance||void 0===p.lazyLoadInstance?void 0:p.lazyLoadInstance.update()}),100)}),[n]),g.default.createElement(s.StyledWrapper$4,{"data-is-blurred":l,onClick:function(e){return l&&e.stopPropagation()}},g.default.createElement("img",{className:"lazy img-preview","data-src":n}),g.default.createElement(s.StyledInner,null,g.default.createElement(s.StyledInnerWrapper,null,g.default.createElement(s.StyledIcon$3,{"data-is-shortcut":a,onClick:function(){return r(!l)}},g.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.71 4.54039C2.32 4.15039 2.32 3.52039 2.71 3.13039C3.1 2.74039 3.74 2.74039 4.13 3.13039L20.44 19.4604C20.83 19.8504 20.83 20.4804 20.44 20.8704C20.05 21.2604 19.42 21.2604 19.03 20.8704L16.31 18.1504C14.97 18.6704 13.52 18.9704 12 18.9704C7 18.9704 2.73 15.8604 1 11.4704C1.77 9.50039 3.06 7.80039 4.68 6.51039L2.71 4.54039ZM17 11.4704C17 8.71039 14.76 6.47039 12 6.47039C11.49 6.47039 11 6.57039 10.53 6.71039L8.36 4.54039C9.51 4.17039 10.73 3.97039 12 3.97039C17 3.97039 21.27 7.08039 23 11.4604C22.31 13.2204 21.21 14.7604 19.82 15.9904L16.76 12.9304C16.9 12.4704 17 11.9804 17 11.4704ZM12 16.4704C9.24 16.4704 7 14.2304 7 11.4704C7 10.7004 7.18 9.97039 7.49 9.33039L9.06 10.9004C9.03 11.0804 9 11.2704 9 11.4704C9 13.1304 10.34 14.4704 12 14.4704C12.2 14.4704 12.38 14.4404 12.57 14.4004L14.14 15.9704C13.49 16.2904 12.77 16.4704 12 16.4704ZM14.97 11.1404C14.82 9.74039 13.72 8.65039 12.33 8.50039L14.97 11.1404Z",fill:"#ffffff"}))),g.default.createElement(s.StyledContentWrapper$2,null,!a&&g.default.createElement(s.StyledContainer$8,null,g.default.createElement(s.StyledHeading$2,null,c("sensitiveMask.contentWarningMessage")),g.default.createElement(s.StyledContent$1,null,c("sensitiveMask.contentWarningDescription"))),(a&&!l||!a)&&g.default.createElement(s.StyledAction,null,g.default.createElement(s.StyledButton,{size:"sm",onClick:function(e){!l&&e.stopPropagation(),r(!l)}},c(l?"sensitiveMask.unblur":"sensitiveMask.blur")))))))},Y=function(e){var a=e.className,o=e.images,l=void 0===o?[]:o,r=e.style,c=e.authorName,u=e.isSensitive,d=void 0!==u&&u,m=t.useContext(s.TogetherComponentGlobalContext).data.env.isMarryBaby,v="+ ".concat((l.length||0)-4),f=t.useState(!1),h=f[0],C=f[1],w=t.useState(-1),E=w[0],y=w[1];t.useEffect((function(){setTimeout((function(){return null===p.lazyLoadInstance||void 0===p.lazyLoadInstance?void 0:p.lazyLoadInstance.update()}),100)}),[null==l?void 0:l.slice(0,5).join("|")]);var k=l.length>5,_=t.useRef(!1);return t.useEffect((function(){return function(){_.current&&i.toggleNoScroll(!1)}}),[]),t.useEffect((function(){h||E>=0?(i.toggleNoScroll(!0),_.current=!0):(i.toggleNoScroll(!1),_.current=!1)}),[h,E]),g.default.createElement(g.default.Fragment,null,g.default.createElement(s.StyledPostImagePreview,{className:a,style:r,"data-image-count":k?5:l.length||0,"data-is-marrybaby":m},null==l?void 0:l.slice(0,5).map((function(e,t){return g.default.createElement("div",{className:"img-wrapper",key:t,onClick:function(){t>=4&&k?C(!0):y(t)}},d&&g.default.createElement(J,{image:e,isShortcut:0!==t}),!m&&g.default.createElement("img",{className:"lazy img-preview-blur","data-src":e}),g.default.createElement("img",{className:"lazy img-preview","data-src":e}),4===t&&k&&g.default.createElement("div",{className:"img-more-overlay"},g.default.createElement(n.Heading,{tag:"h1",color:"white"},v)))}))),h&&g.default.createElement(K,{authorName:c||"",images:l,onClose:function(){return C(!1)},onOpenSingleView:y}),E>=0&&g.default.createElement(X,{images:l,initialViewIndex:E,onClose:function(){return y(-1)}}))},ee=function(n){var a=n.url,o=n.image,i=n.className,l=n.style,r=t.useContext(s.TogetherComponentGlobalContext).data.locale,c=t.useState(null),u=c[0],d=c[1];t.useEffect((function(){e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(t){return o?[2]:a?(d((function(t){return e.__assign(e.__assign({},t),{isFetching:!0})})),s.callApi(s.getApiPath(s.PATHS.FETCH_PREVIEW,{_locale:r}),"POST",{data:{link:a}}).then((function(e){var t,n;d({url:a,image:(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.image)||(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.logo)})})).catch((function(){d(null)})),[2]):[2,d(null)]}))}))}),[a,o]);var m=(null==u?void 0:u.image)||o,p=(null==u?void 0:u.url)||a,v=t.useMemo((function(){return s.youtubeVidIdGetter(p)}),[p]),f=t.useMemo((function(){return s.facebookVidIdGetter(p)}),[p]),h=t.useRef(0),C=t.useRef(0),w=t.useState(!1),E=w[0],y=w[1];t.useEffect((function(){var e=function(){var e,t=null===(e=k.current)||void 0===e?void 0:e.getBoundingClientRect(),n=!1;t&&(!h.current||Math.abs((h.current-t.width)/(null==t?void 0:t.width))>.2)&&(h.current=Math.floor(t.width),n=!0),t&&(!C.current||Math.abs((C.current-t.height)/(null==t?void 0:t.height))>.2)&&(C.current=Math.floor(t.height),n=!0),n&&y((function(e){return!e}))};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var k=t.useRef(null),_=t.useRef(!1);return g.default.createElement(s.StyledSocialLinkPreview,{className:"".concat(i," no-replace-click"),style:l,ref:k},o||!v&&!f?g.default.createElement("a",{href:p,target:"_blank",rel:"noreferrer"},g.default.createElement("div",{className:"link-image-wrapper ".concat((null==u?void 0:u.isFetching)?"fetching":"")},(null==u?void 0:u.isFetching)?g.default.createElement(s.Loading,{className:"loading-spinner"}):g.default.createElement("img",{className:"link-image",src:m||s.DEFAULT_IMG,onError:function(e){_.current||(_.current=!0,e.currentTarget.src=s.DEFAULT_IMG)}}))):g.default.createElement("div",{className:"link-image-wrapper"},v?g.default.createElement("iframe",{width:"100%",height:"100%",src:"https://www.youtube.com/embed/".concat(v,"?&autoplay=1&mute=1"),frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,border:"none",overflow:"hidden"}}):f?g.default.createElement("iframe",{key:String(E),src:"https://www.facebook.com/plugins/video.php?href=".concat(encodeURIComponent(p),"&autoplay=1&show_text=false&t=0&width=").concat(h.current,"&height=").concat(C.current),style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:C.current,width:h.current,transform:"translate(-50%, -50%)"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"}):null))},te="data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M5 10C3.9 10 3 10.9 3 12C3 13.1 3.9 14 5 14C6.1 14 7 13.1 7 12C7 10.9 6.1 10 5 10Z' fill='%233E3F58'/%3e %3cpath d='M19 10C17.9 10 17 10.9 17 12C17 13.1 17.9 14 19 14C20.1 14 21 13.1 21 12C21 10.9 20.1 10 19 10Z' fill='%233E3F58'/%3e %3cpath d='M12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z' fill='%233E3F58'/%3e %3c/svg%3e",ne="data:image/svg+xml,%3csvg width='3' height='13' viewBox='0 0 3 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='1.58326' cy='6.41663' r='1.25' transform='rotate(89.9997 1.58326 6.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='1.41663' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 1.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='11.4166' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 11.4166)' fill='%23595959'/%3e%3c/svg%3e",ae="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2 4H3.33333H14' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33334 3.99992V2.66659C5.33334 2.31296 5.47382 1.97382 5.72387 1.72378C5.97392 1.47373 6.31305 1.33325 6.66668 1.33325H9.33334C9.68697 1.33325 10.0261 1.47373 10.2762 1.72378C10.5262 1.97382 10.6667 2.31296 10.6667 2.66659V3.99992M12.6667 3.99992V13.3333C12.6667 13.6869 12.5262 14.026 12.2762 14.2761C12.0261 14.5261 11.687 14.6666 11.3333 14.6666H4.66668C4.31305 14.6666 3.97392 14.5261 3.72387 14.2761C3.47382 14.026 3.33334 13.6869 3.33334 13.3333V3.99992H12.6667Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6.66666 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.33334 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",oe=function(n){var a=n.onDeleteComment,o=n.commentId,l=n.className,r=void 0===l?"":l,c=n.popoverClassName,u=void 0===c?"":c,d=t.useContext(s.TogetherComponentGlobalContext),m=d.data,p=m.env.isMarryBaby,v=m.locale,f=d.action.pushNotifications,h=i.useTranslations().t,C=t.useState(!1),w=C[0],E=C[1],y=s.useTogetherAuthRequiredAction().authActionWrapper;return g.default.createElement("div",{className:r,onClick:function(e){e.preventDefault(),e.stopPropagation()}},w&&g.default.createElement(O,{thumbnail:"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0)'%3e%3cpath d='M2 4.00781H3.33333H14' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33337 4.00846V2.67513C5.33337 2.32151 5.47385 1.98237 5.7239 1.73232C5.97395 1.48227 6.31309 1.3418 6.66671 1.3418H9.33337C9.687 1.3418 10.0261 1.48227 10.2762 1.73232C10.5262 1.98237 10.6667 2.32151 10.6667 2.67513V4.00846M12.6667 4.00846V13.3418C12.6667 13.6954 12.5262 14.0346 12.2762 14.2846C12.0261 14.5347 11.687 14.6751 11.3334 14.6751H4.66671C4.31309 14.6751 3.97395 14.5347 3.7239 14.2846C3.47385 14.0346 3.33337 13.6954 3.33337 13.3418V4.00846H12.6667Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6.66663 7.3418V11.3418' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.33337 7.3418V11.3418' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0'%3e%3crect width='16' height='16' fill='white' transform='translate(0 0.0078125)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",isThumbnailIcon:!0,title:h("popup.deleteComment.title"),description:h("popup.deleteComment.description"),acceptText:h("popup.deletePost.accept"),cancelText:h("popup.deletePost.cancel"),onAccept:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,n;return e.__generator(this,(function(e){switch(e.label){case 0:return o?[4,V({id:o,locale:v})]:[2];case 1:return 1===(null==(t=e.sent())?void 0:t.status)?(a&&a(),f({title:"",message:h("notification.success"),type:"success"})):f({title:"",message:(null===(n=null==t?void 0:t.messages)||void 0===n?void 0:n[0])||h("notification.failure"),type:"danger"}),[2]}}))}))},onClose:function(){return E(!1)}}),g.default.createElement(s.TreePopoverMenu,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:ae,label:h("actionPopover.delete"),onClick:function(){y((function(){E(!0)}))}}]},className:u,toggleButtonContent:g.default.createElement("img",{src:p?te:ne}),buttonProps:{}}))},ie=function(a){var l,c,u,d,m,p=a.className,v=a.style,f=a.comment,h=a.type,C=void 0===h?"comment":h,w=a.level,E=void 0===w?0:w,k=a.replyingId,_=a.onPostCommentSuccess,b=a.post,T=a.onDeleteComment,S=a.refetchComment,P=a.hasQuickBookingEnable,x=a.handleMakeAppointment,N=t.useContext(s.TogetherComponentGlobalContext).data,I=N.locale,A=N.userInfo,M=N.env.isMarryBaby,L=i.useTranslations().t,R=t.useState(f||null),B=R[0],j=R[1],F=B.id;B.countReplies;var D=B.countLikes,O=B.content,H=B.createdAt,W=B.replies,U=void 0===W?[]:W,V=B.images,Z=void 0===V?[]:V,q=B.author,K=B.liked,Q=B.link,X=B.mentionedUser,J=B.mentions,ee=function(e){try{var t=e.match(/\[@([^\]]+)\]/),n=t?t[0].replace("[@","").replace("]",""):"";return{text:e.replace(/\[@([^\]]+)\]/,"").trim(),replyingTo:n}}catch(e){}return{text:""}}(O),te=ee.text,ne=ee.replyingTo,ae=s.useTogetherAuthRequiredAction({_joinCommunityIds:[null===(l=null==b?void 0:b.community)||void 0===l?void 0:l.id],_joinTopicIds:null===(c=null==b?void 0:b.topics)||void 0===c?void 0:c.map((function(e){return e.id}))}).authActionWrapper,le=t.useState(4),re=le[0],se=le[1],ce=!!(null==A?void 0:A.id)&&(null==U?void 0:U.some((function(e){return e.author.id===A.id}))),ue=function(t){j((function(n){if(!n.replies.find((function(e){return e.id===t.id}))){n.replies.unshift(t);var a=e.__assign(e.__assign({},n),{replies:n.replies.slice(),countReplies:n.countReplies+1});return S&&S(a),a}return n}))},de=t.useState(!1),me=de[0],pe=de[1],ve=t.useMemo((function(){return"comment"===C&&U&&0!=U.length?U.sort((function(e,t){var n=new Date(e.createdAt).getTime(),a=new Date(t.createdAt).getTime();return n>a?-1:n<a?1:0})):U}),[C,U]),fe=(null==U?void 0:U.length)||0,ge=String(null==q?void 0:q.email)&&(null==A?void 0:A.email)&&String(null==q?void 0:q.email)===String(null==A?void 0:A.email),he=(null==q?void 0:q.name)||(null==q?void 0:q.username)||"",Ce=null==q?void 0:q.avatar,we=(null==q?void 0:q.username)||(null==q?void 0:q.name)||"",Ee=t.useState(null),ye=Ee[0],ke=Ee[1],_e=t.useState(null),be=_e[0],Te=_e[1];t.useEffect((function(){if(null==q?void 0:q.hospitalId){t=q.hospitalId,e.__awaiter(void 0,void 0,void 0,(function(){var n,a;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,s.callApi(s.getCarePath(s.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:r.domainLocales[I]}),"get")];case 1:return n=e.sent(),(null===(a=null==n?void 0:n._data)||void 0===a?void 0:a.branch)&&ke(null==n?void 0:n._data.branch),[2]}}))}))}var t,n;if(null==q?void 0:q.doctorId){n=q.doctorId,e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,s.callApi(s.getCarePath(s.CARE_PATHS.GET_DOCTOR_INFO,{doctorId:n,website_url:r.domainLocales[I]}),"get")];case 1:return t=e.sent(),(null===(a=null==t?void 0:t._data)||void 0===a?void 0:a.doctor)&&Te(null==t?void 0:t._data.doctor),[2]}}))}))}}),[q.hospitalId,q.doctorId]);var Se=(null==be?void 0:be.valid_outpatient)||(null==be?void 0:be.valid_telemedicine),Pe=((null==ye?void 0:ye.total_available_service)||(null==ye?void 0:ye.total_available_doctor))>0,xe=P&&(Se||Pe);return g.default.createElement(s.TogetherAuthConfigContextProvider,{defaultParams:{_joinCommunityIds:[null===(u=null==b?void 0:b.community)||void 0===u?void 0:u.id],_joinTopicIds:null===(d=null==b?void 0:b.topics)||void 0===d?void 0:d.map((function(e){return e.id}))}},g.default.createElement(s.StyledCardPost,{className:p,style:v,"data-is-reply":!!E,"data-is-marrybaby":M,"data-has-booking":xe},"reply"===C&&g.default.createElement(o.Divider,{className:"top-divider",type:"solid"}),g.default.createElement(s.CardAuthor,{avatar:Ce,name:he,username:we,email:null==q?void 0:q.email,time:H,className:"post-author ".concat(ge?"with-popover":""),type:C,userId:null==q?void 0:q.id,role:null==q?void 0:q.role,expertId:null==q?void 0:q.partnerId,title:null==q?void 0:q.title,doctorId:null==q?void 0:q.doctorId,hospitalId:null==q?void 0:q.hospitalId,hasQuickBooking:xe,handleMakeAppointment:x}),g.default.createElement($,{className:"post-content-wrapper",replyingTo:ne,mentionedUser:X,description:te,mentions:J}),g.default.createElement("span",null),g.default.createElement("span",null),Z&&Z.length>0?g.default.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},g.default.createElement(Y,{images:Z,authorName:null==q?void 0:q.username})):null,Z&&0!==Z.length||!Q?null:g.default.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},g.default.createElement(y,{url:Q})),"most-engaging"!==C?g.default.createElement(g.default.Fragment,null,g.default.createElement(s.CardReactions,{type:s.CardReactionType.reply,loveCount:D,replyCount:fe,className:"post-reaction",liked:K,isReplied:ce,hideCommentIcon:"reply"===C,onCommentClick:function(){return ae((function(){return pe((function(e){return!e}))}))},onCommentCountClick:function(){return ae((function(){pe(!0)}))},onLikeClick:function(){return ae((function(){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return F?[4,z({commentId:F,setLike:!K,locale:I})]:[3,2];case 1:1===t.sent().status&&j((function(t){return e.__assign(e.__assign({},t),{liked:!K,countLikes:t.countLikes+(K?-1:1)})})),t.label=2;case 2:return[2]}}))}))}))}}),me&&g.default.createElement(G,{replyingId:k||B.id,replyToName:q.name||q.username||"",isReply:!0,onClose:function(){return pe(!1)},onPostSuccess:function(e){"reply"===C?_&&_(e):ue(e)},post:b,replyingUser:q}),"comment"===C&&U&&U.length>0?g.default.createElement("div",{className:"comment-reply-wrapper"},null===(m=null==ve?void 0:ve.slice(0,re))||void 0===m?void 0:m.map((function(t){return g.default.createElement(ie,{key:t.id,comment:t,type:"reply",className:"comment-reply-item",level:E+1,replyingId:F,onPostCommentSuccess:ue,post:b,onDeleteComment:function(){j((function(n){return e.__assign(e.__assign({},n),{replies:n.replies.filter((function(e){return e.id!==t.id})),countReplies:n.countReplies-1})}))},handleMakeAppointment:x,hasQuickBookingEnable:P})})),fe>re&&g.default.createElement(g.default.Fragment,null,g.default.createElement(o.Divider,{className:"top-divider",type:"solid"}),g.default.createElement(n.Button,{className:"more-cmt",size:"lg",color:"ghost",onClick:function(){return se((function(e){return e+4}))}},L("comment.seeMoreReplies",{count:fe-re}),g.default.createElement("img",{className:"chevron-right",src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 12L10 8L6 4' stroke='%232D87F3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"})))):null):null,ge&&g.default.createElement(oe,{onDeleteComment:T,className:"popover",commentId:B.id})))},le="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='%23595959' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",re="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",se="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 5.33337C13.1046 5.33337 14 4.43794 14 3.33337C14 2.2288 13.1046 1.33337 12 1.33337C10.8954 1.33337 10 2.2288 10 3.33337C10 4.43794 10.8954 5.33337 12 5.33337Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4 10C5.10457 10 6 9.10457 6 8C6 6.89543 5.10457 6 4 6C2.89543 6 2 6.89543 2 8C2 9.10457 2.89543 10 4 10Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M12 14.6666C13.1046 14.6666 14 13.7712 14 12.6666C14 11.5621 13.1046 10.6666 12 10.6666C10.8954 10.6666 10 11.5621 10 12.6666C10 13.7712 10.8954 14.6666 12 14.6666Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.72668 9.00665L10.28 11.66' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M10.2734 4.33997L5.72668 6.9933' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",ce=function(n){var a=n.authorEmail,o=n.onDeletePost,l=n.shareUrl,r=n.post,c=n.className,u=void 0===c?"":c,d=n.popoverClassName,m=void 0===d?"":d,p=n.onBookmark,v=n.onRemoveBookmark,f=n.onEditPost,h=t.useContext(s.TogetherComponentGlobalContext),C=h.data,w=C.locale,E=C.userInfo,y=C.togetherUserId,k=C.env.isMarryBaby,_=h.action.pushNotifications,b=i.useTranslations().t,T=t.useState(!1),S=T[0],x=T[1],N=t.useState(!1),I=N[0],A=N[1],M=t.useState(!1),L=M[0],R=M[1],B=s.useTogetherAuthRequiredAction().authActionWrapper,j=a&&(null==E?void 0:E.email)&&a===String(null==E?void 0:E.email);return g.default.createElement("div",{className:u,onClick:function(e){e.preventDefault(),e.stopPropagation()}},L&&g.default.createElement(s.SharePopup,{url:l,text:null==r?void 0:r.title,onClose:function(){return R(!1)}}),I&&g.default.createElement(O,{thumbnail:"./svg/delete.svg",isThumbnailIcon:!0,title:b("popup.deletePost.title"),description:b("popup.deletePost.description"),acceptText:b("popup.deletePost.accept"),cancelText:b("popup.deletePost.cancel"),onAccept:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:if(!(null==r?void 0:r.id)||S)return[2];x(!0),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,P({id:r.id,locale:w})];case 2:return 1===(null==(t=e.sent())?void 0:t.status)&&(null==o||o()),[3,4];case 3:return e.sent(),[3,4];case 4:return x(!1),[2]}}))}))},onClose:function(){return A(!1)}}),g.default.createElement(s.TreePopoverMenu,{className:m,toggleButtonContent:g.default.createElement("img",{src:k?te:ne}),position:"bottom",align:"end",buttonProps:{isLoading:S},data:j?{isShowheader:!1,type:"list",list:[{icon:se,label:b("morePopover.share"),onClick:function(){return R(!0)}},{icon:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.16952 3.2356H2.99484C2.6785 3.2356 2.37512 3.36126 2.15143 3.58495C1.92774 3.80863 1.80208 4.11202 1.80208 4.42836V12.7777C1.80208 13.094 1.92774 13.3974 2.15143 13.6211C2.37512 13.8448 2.6785 13.9705 2.99484 13.9705H11.3442C11.6605 13.9705 11.9639 13.8448 12.1876 13.6211C12.4113 13.3974 12.537 13.094 12.537 12.7777V8.60303' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M11.6425 2.341C11.8798 2.10375 12.2016 1.97046 12.5371 1.97046C12.8726 1.97046 13.1944 2.10375 13.4317 2.341C13.6689 2.57826 13.8022 2.90005 13.8022 3.23558C13.8022 3.57111 13.6689 3.89289 13.4317 4.13015L7.76607 9.79578L5.38054 10.3922L5.97692 8.00663L11.6425 2.341Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",label:b("actionPopover.edit"),onClick:f},{icon:ae,label:b("actionPopover.delete"),onClick:function(){B((function(){return A(!0)}))}}]}:{isShowheader:!1,type:"list",list:[{icon:se,label:b("morePopover.share"),onClick:function(){return R(!0)}},{icon:(null==r?void 0:r.bookmarked)?le:re,label:(null==r?void 0:r.bookmarked)?b("morePopover.unsavePost"):b("morePopover.savePost"),onClick:function(){B((function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:return(null==E?void 0:E.id)&&(null==r?void 0:r.id)?(null==r?void 0:r.bookmarked)?[4,s.callApiWithAuth(s.getApiPath(s.PATHS.BOOKMARK.DELETE,{_locale:w}),"DELETE",{data:{post_id:String(r.id)}})]:[3,2]:[2];case 1:return 1===(null==(t=e.sent())?void 0:t.status)?(_({title:"",message:"Removed saved post",type:"success",displayIcon:re}),v&&v()):_({title:"",message:"Remove failed",type:"danger",displayIcon:re}),[3,4];case 2:return[4,s.callApiWithAuth(s.getApiPath(s.PATHS.BOOKMARK.CREATE,{_locale:w}),"POST",{data:{user_id:y||E.id,post_id:r.id}})];case 3:1===(null==(t=e.sent())?void 0:t.status)?(_({title:"",message:"Post saved",type:"success",displayIcon:le}),p&&p()):_({title:"",message:"Post saved failed",type:"danger",displayIcon:re}),e.label=4;case 4:return[2]}}))}))}))}},{icon:Z,label:b("morePopover.report"),subTree:{title:b("morePopover.report.title"),description:b("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(s.REPORT_REASON_MAP).map((function(e){return{label:s.REPORT_REASON_MAP[e].label,reason:s.REPORT_REASON_MAP[e].reportReasonText,reasonValue:e}})).map((function(e){return{label:b(e.label),subTree:{title:b("morePopover.reportSubmit.title"),description:b("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:function(t){return g.default.createElement(q,{reason:e.reasonValue,reasonText:b(e.reason),postId:null==r?void 0:r.id,onClose:function(){return t&&t(!1)}})}}}}))}}]}}))},ue=function(t,n){return e.__awaiter(void 0,void 0,void 0,(function(){var a,o,i,l;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,s.callApiWithOptionalAuth(s.getApiPath(s.PATHS.COMMENT.LIST,{postId:t,_locale:n,sort:"popularity",perPage:1,withoutReply:1}),"GET")];case 1:return a=e.sent(),[2,null===(l=null===(i=null===(o=null==a?void 0:a.data)||void 0===o?void 0:o.comments)||void 0===i?void 0:i.map(s.formatComment))||void 0===l?void 0:l[0]]}}))}))},de=Object.freeze({__proto__:null});exports.CardLink=y,exports.CardPost=function(a){var o=a.className,l=a.style,r=a.hideViewMoreComment,c=a.showMostEngaging,u=a.onCommentClick,d=a.onCommentCountClick,m=a.onMostEngagingCommentClick,p=a.onPostCommentSuccess,v=a.disableCardLink,f=a.disableShortenContent,C=a.onDeletePost,w=a.onEditPost,E=a.post,T=a.mostEngagingComment,P=a.onDeleteComment,x=a.showInputComment,N=a.InlineCommentsComponent,I=a.hasQuickBookingEnable,A=a.handleMakeAppointment,M=t.useState(E),L=M[0],R=M[1],B=t.useState(!1),j=B[0],F=B[1],D=t.useState(T),O=D[0],H=D[1],W=L.community,U=L.topics,z=L.author,V=L.slug,Z=L.isPin,q=L.liked,K=L.scheduleDateTime,Q=L.createdAt,X=L.photos,J=L.mentions,te=L.title,ne=L.description,ae=L.previewUrl,oe=L.likesCount,le=L.commentsCount,re=L.id,se=L.commented,de=t.useContext(s.TogetherComponentGlobalContext),me=de.data,pe=me.locale,ve=me.env,fe=ve.isMarryBaby,ge=ve.togetherBasePath,he=de.action.pushNotifications,Ce=i.useTranslations().t,we=t.useState(x),Ee=we[0],ye=we[1],ke="".concat(ge,"/").concat((null==W?void 0:W.slug)||"_","/").concat(V||""),_e="".concat(s.getCurrentBaseUrl(pe)).concat(ke),be=s.useTogetherAuthRequiredAction((null==W?void 0:W.slug)?{_joinCommunityIds:[W.id],_joinTopicIds:null==U?void 0:U.map((function(e){return e.id}))}:void 0).authActionWrapper,Te=t.useState(!1),Se=Te[0],Pe=Te[1];t.useEffect((function(){ye(x)}),[x]);var xe=(null==z?void 0:z.name)||(null==z?void 0:z.username)||"",Ne=(null==z?void 0:z.username)||(null==z?void 0:z.name)||"",Ie=null==z?void 0:z.avatar,Ae=t.useState(null),Me=Ae[0],Le=Ae[1],Re=t.useState(null),Be=Re[0],je=Re[1];t.useEffect((function(){if(null==z?void 0:z.hospitalId){t=z.hospitalId,e.__awaiter(void 0,void 0,void 0,(function(){var n,a;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,s.callApi(s.getCarePath(s.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:s.domainLocales[pe]}),"get")];case 1:return n=e.sent(),(null===(a=null==n?void 0:n._data)||void 0===a?void 0:a.branch)&&Le(null==n?void 0:n._data.branch),[2]}}))}))}var t,n;if(null==z?void 0:z.doctorId){n=z.doctorId,e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,s.callApi(s.getCarePath(s.CARE_PATHS.GET_DOCTOR_INFO,{doctorId:n,website_url:s.domainLocales[pe]}),"get")];case 1:return t=e.sent(),(null===(a=null==t?void 0:t._data)||void 0===a?void 0:a.doctor)&&je(null==t?void 0:t._data.doctor),[2]}}))}))}}),[z.hospitalId,z.doctorId]);var Fe=(null==Be?void 0:Be.valid_outpatient)||(null==Be?void 0:Be.valid_telemedicine),De=((null==Me?void 0:Me.total_available_service)||(null==Me?void 0:Me.total_available_doctor))>0,Oe=I&&(Fe||De);t.useEffect((function(){e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:return re&&le&&c&&!(null==T?void 0:T.id)?[4,ue(re,pe)]:[3,2];case 1:t=e.sent(),H(t),e.label=2;case 2:return[2]}}))}))}),[re,pe,le,c,null==T?void 0:T.id]),t.useEffect((function(){H(T)}),[null==T?void 0:T.id]);var He=function(t){return e.__awaiter(void 0,void 0,void 0,(function(){var n;return e.__generator(this,(function(a){switch(a.label){case 0:return le>1&&(null==O?void 0:O.id)&&(null==O?void 0:O.id)===(null==t?void 0:t.id)?[4,ue(re,pe)]:[3,2];case 1:n=a.sent(),H(n),a.label=2;case 2:return R((function(t){return e.__assign(e.__assign({},t),{commentsCount:t.commentsCount-1})})),P&&P(t),[2]}}))}))};return g.default.createElement(s.TogetherAuthConfigContextProvider,{defaultParams:(null==W?void 0:W.slug)?{_joinCommunityIds:[W.id],_joinTopicIds:null==U?void 0:U.map((function(e){return e.id}))}:void 0},j&&g.default.createElement(s.SharePopup,{url:_e,avatar:s.DEFAULT_IMG,text:te,onClose:function(){return F(!1)}}),g.default.createElement(s.StyledCardPost$1,{className:o,style:l,"data-is-marrybaby":fe},Z?g.default.createElement(_,{className:"post-pin"}):null,g.default.createElement("div",{style:{position:"relative"}},g.default.createElement(s.CardAuthor,{avatar:Ie,name:xe,username:Ne,url:v?void 0:ke,email:null==z?void 0:z.email,time:K||Q,community:W,className:"post-author",role:null==z?void 0:z.role,userId:null==z?void 0:z.id,expertId:null==z?void 0:z.partnerId,doctorId:null==z?void 0:z.doctorId,hospitalId:null==z?void 0:z.hospitalId,title:null==z?void 0:z.title,hasQuickBooking:Oe,handleMakeAppointment:A}),g.default.createElement(ce,{authorEmail:String(null==z?void 0:z.email),onDeletePost:C,shareUrl:_e,post:L,className:"popover",onEditPost:w})),g.default.createElement("a",{href:v?void 0:ke,className:"post-content-link-wrapper"},te&&g.default.createElement(n.Heading,{className:"post-content-title",as:"h1",tag:"h5",fontWeight:"bold"},h.default(te)),g.default.createElement($,{className:"post-content-wrapper",description:ne,disableShortenContent:f,mentions:J})),g.default.createElement("span",null),g.default.createElement("span",null),g.default.createElement("div",{key:"tag-topic"},U&&U.length>0?g.default.createElement(k,{topics:U,className:"post-topics"}):null),g.default.createElement("div",{key:"social-preview"},(null==L?void 0:L.introUrl)?g.default.createElement("div",{className:"social-preview-wrapper ".concat((null==X?void 0:X.length)?"has-image":"")},g.default.createElement(ee,{url:L.introUrl,image:L.bannerImage})):null),g.default.createElement("div",{key:"image-preview"},(null==X?void 0:X.length)?g.default.createElement("div",{className:"image-preview-wrapper"},g.default.createElement(Y,{images:X,authorName:null==z?void 0:z.name})):null),g.default.createElement("div",{key:"link-preview"},(null==L?void 0:L.introUrl)||(null==X?void 0:X.length)||!(null==ae?void 0:ae.url)?null:g.default.createElement("div",{className:"link-preview-wrapper"},g.default.createElement(y,{title:ae.title,url:ae.url,image:ae.image}))),g.default.createElement(s.CardReactions,{type:s.CardReactionType.post,loveCount:oe,replyCount:le,className:"post-reaction ".concat((null==X?void 0:X.length)||(null==ae?void 0:ae.url)?"hide-top-border":""),liked:Se?!q:q,isReplied:se,onCommentClick:function(){return be((function(){u?u():ye((function(e){return!e}))}))},onCommentCountClick:function(){be((function(){fe?ye(!0):d?d():!v&&(window.location.href=ke)}))},onShareClick:function(){F(!0)},onLikeClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(n){switch(n.label){case 0:if(!re||Se)return[2];Pe(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,S({id:re,locale:pe})];case 2:return 1!==(null==(t=n.sent())?void 0:t.status)?he(b(Ce)):R((function(t){return e.__assign(e.__assign({},t),{likesCount:(t.likesCount||0)+(t.liked?-1:1),liked:!t.liked})})),[3,4];case 3:return n.sent(),he(b(Ce)),[3,4];case 4:return Pe(!1),[2]}}))}))},showingMostEngaging:!(!c||!(null==O?void 0:O.id))}),Ee&&g.default.createElement(G,{isMainCmt:!x,onClose:function(){return ye(!1)},onPostSuccess:function(t){0!==le||(null==O?void 0:O.id)||H(t),R((function(t){return e.__assign(e.__assign({},t),{commentsCount:t.commentsCount+1,commented:!0})})),p&&p(t)},post:L}),c&&(null==O?void 0:O.id)?g.default.createElement("div",{className:"most-engaging-wrapper",onClick:function(e){m?(e.stopPropagation(),m()):window.location.href=ke}},g.default.createElement(ie,{hasQuickBookingEnable:I,handleMakeAppointment:A,comment:O,onDeleteComment:function(){He&&He(O)},className:"most-engaging-comment",type:"most-engaging",key:O.id}),le>1&&!r&&g.default.createElement(n.Button,{className:"see-more-comments",color:"ghost",size:"md"},Ce("comment.seeMoreComments",{count:le-1}))):null,N))},exports.CardPostPopoverMore=ce,exports.CardReply=ie,exports.CardReplyPopover=oe,exports.CreateNewPostContent=function(l){var c=l.className,u=l.style,d=l.onPostCreatedEdited,m=l.onClose,p=l.communities,v=void 0===p?[]:p,f=l.forceSelectCommunity,C=l.forceSelectTopics,w=l.articleId,E=l.optionalTopic,y=l.editPostData,k=l.defaultCommunity,_=l.defaultTopics,S=l.noFetchTopic,P=l.hideTopicList,A=!!(null==y?void 0:y.id),M=t.useContext(s.TogetherComponentGlobalContext),L=M.data,B=L.locale,D=L.env.isMarryBaby,O=M.action,H=O.pushNotifications,W=O.sanitizeFunction,U=i.useTranslations().t,z=t.useState(!1),V=z[0],G=z[1],Z=t.useState(""),q=Z[0],$=Z[1],K=t.useState(""),Q=K[0],X=K[1],J=t.useState(f?{label:f.name,value:"".concat(f.id||"","-").concat(f.mappedCategoryId||"")}:{label:U("community.choose"),value:""}),Y=J[0],ee=J[1],te=t.useState(e.__spreadArray([],C,!0)||[]),ne=te[0],ae=te[1],oe=t.useState([]),ie=oe[0],le=oe[1],re=t.useState([]),se=re[0],ce=re[1],ue=f||v.find((function(e){return"".concat(e.id||"","-").concat(e.mappedCategoryId||"")===Y.value})),de=f?[f]:v.filter((function(e){return e.isActive})).sort((function(e,t){return e.name>t.name?1:e.name<t.name?-1:0})),me=t.useState(null),pe=me[0],ve=me[1],fe=t.useState([]),ge=fe[0],he=fe[1],Ce=q&&h.default(Q)&&(E||!E&&ne.length>0)&&ue&&(!ie||ie.length<=s.MAX_IMAGE_UPLOADS)&&!(null==ge?void 0:ge.length)&&!V;t.useEffect((function(){if(y){var e=y;$(e.title||""),X(s.decodeMention(s.decodePostUrl(e.description||"","edit"),e.mentions)),ee({label:e.community.name,value:"".concat(e.community.id||"","-").concat(e.community.mappedCategoryId||"")}),ae(e.topics||[]),le(e.photos||[])}else k&&ee({label:k.name,value:"".concat(k.id||"","-").concat(k.mappedCategoryId||"")}),_&&ae(_)}),[]);var we=function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,n,a,o,i,l,r,c,u,p,v,f;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,x({title:q,description:Q,communityId:String((null==ue?void 0:ue.id)||""),imageFiles:ie,previewUrl:pe,topicIds:null==ne?void 0:ne.map((function(e){return String(e.id||"")})).filter(Boolean),locale:B,sanitizeFunction:W,categoryCommunityId:String((null==ue?void 0:ue.mappedCategoryId)||""),categoryTopicIds:null==ne?void 0:ne.map((function(e){return String(e.mappedCategoryId||"")})).filter(Boolean)})];case 1:return t=e.sent(),w&&t.append("article_id",w),A?(null==y?void 0:y.id)?[4,I({id:y.id,formData:t,locale:B})]:[3,3]:[3,4];case 2:n=e.sent(),e.label=3;case 3:return[3,6];case 4:return[4,N({formData:t,locale:B,isArticleComment:!(null==ue?void 0:ue.id)&&!!(null==ue?void 0:ue.mappedCategoryId)})];case 5:n=e.sent(),e.label=6;case 6:return(null==(a=null==n?void 0:n.data)?void 0:a.id)&&!(null===(i=null===(o=null==n?void 0:n.messages)||void 0===o?void 0:o.moderation)||void 0===i?void 0:i.type)?(H({message:U("createPost.popup.success"),type:"success"}),function(e){d&&d(s.formatPost(e),A),m&&m()}(a)):"banned"===(null===(r=null===(l=null==n?void 0:n.messages)||void 0===l?void 0:l.moderation)||void 0===r?void 0:r.type)?(H({title:U("notification.post.blocked.title"),message:U("notification.post.blocked.message"),type:"danger"}),n.messages.moderation.words&&ce(n.messages.moderation.words)):"suspect"===(null===(u=null===(c=null==n?void 0:n.messages)||void 0===c?void 0:c.moderation)||void 0===u?void 0:u.type)?(H({title:U("notification.post.suspect.title"),message:U("notification.post.suspect.message"),type:"warning"}),m&&m()):(null===(v=null===(p=null==n?void 0:n.messages)||void 0===p?void 0:p.find)||void 0===v?void 0:v.call(p,(function(e){var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(H({message:U("notification.suspend.message"),type:"danger"}),m&&m()):H({message:(null===(f=null==n?void 0:n.messages)||void 0===f?void 0:f[0])||U("notification.failure"),type:"danger"}),[2]}}))}))};return g.default.createElement(s.StyledCreateNewPost,{className:c,style:u},g.default.createElement("div",{className:"input-group-container"},g.default.createElement(j,{className:"input-group",bannedWords:se,value:q,onChange:$}),g.default.createElement(R,{className:"input-group",bannedWords:se,value:Q,onChange:X,onPreviewUrlChange:ve,onInvalidUrlsChange:he,onImageFilesChange:le,imageFiles:ie}),g.default.createElement("div",{className:"input-group"},g.default.createElement(a.Text,{size:"p4",className:"input-group-label"},U("admin.community")),g.default.createElement(o.Dropdown,{options:(null==de?void 0:de.map((function(e,t){return{label:e.name,value:"".concat(e.id||"","-").concat(e.mappedCategoryId||"")}})))||[],id:"community-picker",placeholder:U("community.choose"),value:Y,onChange:function(e){ee({label:e.label,value:String(e.value)}),ae([])},disabled:!!f}),g.default.createElement(a.Text,{size:"sm",className:"warning",color:r.theme.colors.gray400},"* ",U("commentPopup.warning.newPost"))),!P&&g.default.createElement("div",{className:"input-group"},g.default.createElement(a.Text,{size:"p4",className:"input-group-label"},U("tab.topic")),g.default.createElement("div",{className:"input-notification"},g.default.createElement("img",{src:ue?"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%232D87F3'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":T}),g.default.createElement(a.Text,{size:"base",color:r.theme.colors.gray500},U(ue?"createPost.popup.primary":"createPost.popup.warning"))),ue&&g.default.createElement(F,{className:"tag-list",communityId:ue.id,forceTopics:C,onChange:ae,selectedTopics:ne,noFetch:S}))),g.default.createElement(n.Button,{theme:D?"marryBaby":"helloSites",className:"submit-btn",size:"lg",onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:if(!Ce||V)return[3,5];G(!0),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,we()];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),console.error(t),H(b(U)),[3,4];case 4:G(!1),e.label=5;case 5:return[2]}}))}))},isDisabled:!Ce,isLoading:V},U("createPost.popup.submit")))},exports.CreatePostDescription=R,exports.CreatePostTitle=j,exports.ImagePreviewPopup=K,exports.InputCommentBar=G,exports.LabelPin=_,exports.PopupDanger=O,exports.PostContent=$,exports.PostImagePreview=Y,exports.PostSingleImageViewPopup=X,exports.SubmitReportForm=q,exports.TagTopic=k,exports.TopicSelectList=F,exports.types=de;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("./tslib.es6-f7929e76.js"),t=require("styled-components"),e=require("react"),r=require("./translationsContext-
|
|
1
|
+
"use strict";var n=require("./tslib.es6-f7929e76.js"),t=require("styled-components"),e=require("react"),r=require("./translationsContext-1968f8ef.js");function a(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var o,s,i,m,l,d,c,f,_,p=a(require("string-format")),u=function(n){var t=Object.keys(n);return t.length?"?"+t.map((function(t){return"".concat(t,"=").concat(n[t])})).join("&"):""},O={BREAK_POINT_SMALL_MOBILE:481,BREAK_POINT_MOBILE:768,BREAK_POINT_TABLET:1024,BREAK_POINT_PC:1200},T={smbDown:"@media (max-width: ".concat(O.BREAK_POINT_SMALL_MOBILE-1,"px)"),smbUp:"@media (min-width: ".concat(O.BREAK_POINT_SMALL_MOBILE,"px)"),mbDown:"@media (max-width: ".concat(O.BREAK_POINT_MOBILE-1,"px)"),mbOnly:"@media (min-width: ".concat(O.BREAK_POINT_SMALL_MOBILE,"px) and (max-width: ").concat(O.BREAK_POINT_MOBILE-1,"px)"),mbUp:"@media (min-width: ".concat(O.BREAK_POINT_MOBILE,"px)"),tdDown:"@media (max-width: ".concat(O.BREAK_POINT_TABLET-1,"px)"),tdOnly:"@media (min-width: ".concat(O.BREAK_POINT_MOBILE,"px) and (max-width: ").concat(O.BREAK_POINT_TABLET-1,"px)"),tdUp:"@media (min-width: ".concat(O.BREAK_POINT_TABLET,"px)"),pcUp:"@media (min-width: ".concat(O.BREAK_POINT_PC,"px)"),pcOnly:"@media (min-width: ".concat(O.BREAK_POINT_TABLET,"px) and (max-width: ").concat(O.BREAK_POINT_PC-1,"px)"),pcDown:"@media (max-width: ".concat(O.BREAK_POINT_PC-1,"px)")},E=t.keyframes(o||(o=n.__makeTemplateObject(["\nfrom {\n transform: translate3d(0, 100%, 0);\n visibility: visible;\n}\n\nto {\n transform: translate3d(0, 0, 0);\n}\n"],["\nfrom {\n transform: translate3d(0, 100%, 0);\n visibility: visible;\n}\n\nto {\n transform: translate3d(0, 0, 0);\n}\n"]))),B=t.keyframes(s||(s=n.__makeTemplateObject(["\nfrom {\n transform: translate3d(0, -100%, 0);\n visibility: visible;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n"],["\nfrom {\n transform: translate3d(0, -100%, 0);\n visibility: visible;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n"]))),I=t.keyframes(i||(i=n.__makeTemplateObject(["\n from {\n transform: translate3d(-100%, 0, 0);\n visibility: visible;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n"],["\n from {\n transform: translate3d(-100%, 0, 0);\n visibility: visible;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n"]))),b=t.keyframes(m||(m=n.__makeTemplateObject(["\n from {\n transform: translate3d(100%, 0, 0);\n visibility: visible;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n"],["\n from {\n transform: translate3d(100%, 0, 0);\n visibility: visible;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n"]))),A=t.keyframes(l||(l=n.__makeTemplateObject(["\nfrom {\n transform: translate3d(0, 0, 0);\n}\n\nto {\n visibility: hidden;\n transform: translate3d(0, 100%, 0);\n}\n"],["\nfrom {\n transform: translate3d(0, 0, 0);\n}\n\nto {\n visibility: hidden;\n transform: translate3d(0, 100%, 0);\n}\n"]))),y=t.keyframes(d||(d=n.__makeTemplateObject(["\nfrom {\n transform: translate3d(0, 0, 0);\n}\n\nto {\n visibility: hidden;\n transform: translate3d(-100%, 0, 0);\n}\n"],["\nfrom {\n transform: translate3d(0, 0, 0);\n}\n\nto {\n visibility: hidden;\n transform: translate3d(-100%, 0, 0);\n}\n"]))),P=t.keyframes(c||(c=n.__makeTemplateObject(["\nfrom {\n transform: translate3d(0, 0, 0);\n}\n\nto {\n visibility: hidden;\n transform: translate3d(100%, 0, 0);\n}\n"],["\nfrom {\n transform: translate3d(0, 0, 0);\n}\n\nto {\n visibility: hidden;\n transform: translate3d(100%, 0, 0);\n}\n"]))),L=t.keyframes(f||(f=n.__makeTemplateObject(["\n from {\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n transform: translate3d(0, -100%, 0);\n }\n"],["\n from {\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n transform: translate3d(0, -100%, 0);\n }\n"]))),x=t.keyframes(_||(_=n.__makeTemplateObject(["\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n"],["\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n"])));exports.Breakpoints=O,exports.MediaQueries=T,exports.fadeIn=x,exports.formatUrlWithPageParam=function(n,t,e){void 0===t&&(t=1),void 0===e&&(e="page");var r=n.split("?"),a=r[0],o=r[1],s=new URLSearchParams(o||""),i={};return s.forEach((function(n,t){n&&(i[t]=n)})),Number(t)>1?i[e]=String(t):delete i[e],a+u(i)},exports.getBoundariesFromMediaQueryKey=function(n){switch(n){case"smbDown":return[0,O.BREAK_POINT_SMALL_MOBILE-1];case"smbUp":return[O.BREAK_POINT_SMALL_MOBILE,0];case"mbDown":return[0,O.BREAK_POINT_MOBILE-1];case"mbOnly":return[O.BREAK_POINT_SMALL_MOBILE,O.BREAK_POINT_MOBILE-1];case"mbUp":return[O.BREAK_POINT_MOBILE,0];case"tdDown":return[0,O.BREAK_POINT_TABLET-1];case"tdOnly":return[O.BREAK_POINT_MOBILE,O.BREAK_POINT_TABLET-1];case"tdUp":return[O.BREAK_POINT_TABLET,0];case"pcUp":return[O.BREAK_POINT_PC,0];case"pcOnly":return[O.BREAK_POINT_TABLET,O.BREAK_POINT_PC-1];case"pcDown":return[0,O.BREAK_POINT_PC-1]}},exports.getPopupWrapperDom=function(){var n="hhg-comp-popup-wrapper";if(!document.querySelector("#"+n)){var t=document.createElement("div");t.id=n,document.body.appendChild(t)}return document.querySelector("#"+n)},exports.makeParams=u,exports.slideInDown=B,exports.slideInLeft=I,exports.slideInRight=b,exports.slideInUp=E,exports.slideOutDown=A,exports.slideOutLeft=y,exports.slideOutRight=P,exports.slideOutUp=L,exports.startCase=function(n){return n.replace(/\w\S*/g,(function(n){return n.charAt(0).toUpperCase()+n.substr(1).toLowerCase()}))},exports.toggleNoScroll=function(n){"undefined"!=typeof window&&(document.documentElement.style.overflow=n?"hidden":"")},exports.useTranslations=function(){var n=e.useContext(r.TranslationsContext)||{locale:"en-PH"},t=n.values,a=n.locale;return e.useMemo((function(){return{t:function(n,e){return t?t[n]?e?p.default(t[n]||n,e):t[n]||n:(console.warn("[useTranslations] Missing translation for key ".concat(n," and locale ").concat(a)),e?p.default(r.defaultTranslations[n]||n,e):r.defaultTranslations[n]||n):(console.error("[useTranslations] t method called before translation values are loaded"),n)},locale:a}}),[t,a])};
|
package/package.json
CHANGED
package/build/Locale-11b51016.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e,t,r,a,o;exports.Gender=void 0,(e=exports.Gender||(exports.Gender={})).Boy="boy",e.Girl="girl",exports.BabyGrowthChartType=void 0,(t=exports.BabyGrowthChartType||(exports.BabyGrowthChartType={}))[t.Weight=0]="Weight",t[t.Height=1]="Height",t[t.Head=2]="Head",t[t.BMI=3]="BMI",exports.BabyGrowthChartDuration=void 0,(r=exports.BabyGrowthChartDuration||(exports.BabyGrowthChartDuration={}))[r.Weekly=0]="Weekly",r[r.Monthly=1]="Monthly",r[r.Yearly=2]="Yearly",exports.BabyGrowthResultTab=void 0,(a=exports.BabyGrowthResultTab||(exports.BabyGrowthResultTab={}))[a.Weight=0]="Weight",a[a.Height=1]="Height",a[a.Head=2]="Head",a[a.BMI=3]="BMI",a[a.Record=4]="Record",exports.LOCALE=void 0,(o=exports.LOCALE||(exports.LOCALE={})).Vietnam="vi-VN",o.Indonesia="id-ID",o.Malaysia="ms-MY",o.Cambodia="km-KH",o.PhilippinesEnglish="en-PH",o.PhilippinesTagalog="tl-PH",o.Thailand="th-TH",o.Myanmar="my-MM",o.Taiwan="zh-TW",o.India="hi-IN";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./Locale-11b51016.js"),t=require("./tslib.es6-f7929e76.js"),r=require("react"),n=require("./cookieHelper-612b90fa.js"),i=require("date-fns"),o=Object.freeze({__proto__:null,get Gender(){return e.Gender},get BabyGrowthChartType(){return e.BabyGrowthChartType},get BabyGrowthChartDuration(){return e.BabyGrowthChartDuration},get BabyGrowthResultTab(){return e.BabyGrowthResultTab},get LOCALE(){return e.LOCALE}});function a(e){var t=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",t).then((function(e){return Array.from(new Uint8Array(e)).map((function(e){return e.toString(16).padStart(2,"0")})).join("")}))}exports.ageGenerate=function(e,t){void 0===t&&(t=new Date);var r=i.differenceInWeeks(t,e,{roundingMethod:"ceil"}),n=i.differenceInMonths(t,e);return{year:Math.floor(n/12),month:n%12,week:r}},exports.index=o,exports.useFbDataLayer=function(e){r.useEffect((function(){var r=null;return(null==e?void 0:e.id)&&t.__awaiter(void 0,void 0,void 0,(function(){var i,o,u,s,c,l,d,f;return t.__generator(this,(function(h){switch(h.label){case 0:return[4,fetch("https://api.ipify.org").then((function(e){return e.text()}))];case 1:return(i=h.sent())?[3,3]:[4,fetch("https://icanhazip.com").then((function(e){return e.text()}))];case 2:i=h.sent(),h.label=3;case 3:return[4,Promise.all([e.email?a(e.email):null,e.phone?a(e.phone):null,e.birthday?a(e.birthday.split("-").join("")):null,e.gender?a(e.gender?"m":"f"):null,e.city_name?a(e.city_name).then((function(e){return e.replace(/\s/g,"")})):null])];case 4:return o=h.sent(),u=o[0],s=o[1],c=o[2],l=o[3],d=o[4],f={fbc:n.getCookie("_fbc")||"",fbp:n.getCookie("_fbp")||"",client_ip_address:(null==i?void 0:i.replace("\n",""))||"",client_user_agent:navigator.userAgent||""},u&&(f.em=u),s&&(f.ph=s),c&&(f.db=c),l&&(f.ge=l),d&&(f.ct=d),window.dataLayer=window.dataLayer||[],window.dataLayer.push(t.__assign(t.__assign({},f),{event:"FB Conversion"})),function e(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(t){return window.fbq?window.fbq("trackCustom","FB Conversion",{action_source:"website",event_source_url:window.location.href,user_data:[f]}):r=setTimeout(e,2e3),[2]}))}))}(),[2]}}))})),function(){r&&clearTimeout(r)}}),[e])};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"tl-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"zh-TW":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}},o=Object.freeze({__proto__:null,basePath:"/care",LOCALE_COUNTRY:{"vi-VN":{id:1,name:"Vietnam"},"id-ID":{id:2,name:"Indonesia"},"ms-MY":{id:3,name:"Malaysia"},"km-KH":{id:4,name:"Cambodia"},"en-PH":{id:5,name:"Philippines"},"th-TH":{id:6,name:"Thai Lan"},"my-MM":{id:7,name:"Myanmar"},"zh-TW":{id:8,name:"Taiwan"},"hi-IN":{id:9,name:"India"}},LOCALIZED_SLUGS:e,ID_OPTION_CURRENT_LOCATION:-1});exports.CARE_PATHS={SPECIALTIES:"api/specialties?_ishome=1&site={domain}"},exports.DISCOVER_PATHS={SPOTLIGHTS:"spotlights?per_page={perPage}&order_by={orderBy}",HEALTH_TOOLS:"healthtools",HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",CATEGORIES:"categories?type=all",FOOTER:"footer"},exports.FAVICONS={"vi-VN":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"km-KH":[{type:"link",rel:"icon",href:"/by-locales/km-KH/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/km-KH/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/km-KH/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/km-KH/icon-270x270.png"}],"en-PH":[{type:"link",rel:"icon",href:"/by-locales/en-PH/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/en-PH/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon",href:"/by-locales/en-PH/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/en-PH/icon-270x270.png"}],"id-ID":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"ms-MY":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"th-TH":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"my-MM":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"zh-TW":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"hi-IN":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],marryBaby:[{type:"link",rel:"shortcut icon",href:"/favicons/favicon.ico"},{type:"link",rel:"icon",href:"/favicons/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/favicons/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/favicons/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/favicons/icon-180x180.png"}]},exports.ID_OPTION_CURRENT_LOCATION=-1,exports.LOCALE_SPECS={"vi-VN":{LOGO_TYPE:"hellobacsi",SITE_NAME:"HelloBacsi",SITE_NAME_FORMATTED:"Hello Bacsi",HOMEPAGE_IMAGE:"https://hellobacsi.com/images/country-thumbnails/VN.png",SITE_ID:"1",INSIDER_TAG:"//hellobacsivn.api.useinsider.com/ins.js?id=10003798",TOOLTIP_IMAGE:"/images/tooltips-vn.png",PREGNANCY_WEIGHT_GAIN:"cong-cu-tinh-can-nang-khi-mang-thai",BABY_POOP:"phan-tre-so-sinh-nhu-the-nao-la-tot",VACCINATION_TOOL:"lich-tiem-chung"},"en-PH":{LOGO_TYPE:"hellodoctor",SITE_NAME:"HelloDoctor",HOMEPAGE_IMAGE:"https://hellodoctor.com.ph/images/country-thumbnails/PH.png",SITE_NAME_FORMATTED:"Hello Doctor",SITE_ID:"9",CATEGORIES_TYPE:"short",INSIDER_TAG:"//hellodoctorph.api.useinsider.com/ins.js?id=10004527",TOOLTIP_IMAGE:"/images/tooltips-ph.png",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"a-visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool"},"th-TH":{LOGO_TYPE:"hellokhunmor",SITE_NAME:"HelloKhunmor",HOMEPAGE_IMAGE:"https://hellokhunmor.com/images/country-thumbnails/TH.png",SITE_NAME_FORMATTED:"Hello Khunmor",SITE_ID:"3",CATEGORIES_TYPE:"long",INSIDER_TAG:"//hellokhunmor.api.useinsider.com/ins.js?id=10004524",TOOLTIP_IMAGE:"/images/tooltips-th.png",PREGNANCY_WEIGHT_GAIN:"เครื่องคำนวณน้ำหนักตัว",BABY_POOP:"สีอุจจาระของลูก-บอกถึงส",VACCINATION_TOOL:"vaccination-tool"},"km-KH":{LOGO_TYPE:"hellokrupet",SITE_NAME:"HelloKrupet",HOMEPAGE_IMAGE:"https://hellokrupet.com/images/country-thumbnails/KH.JPG",SITE_NAME_FORMATTED:"Hello Krupet",SITE_ID:"4",CATEGORIES_TYPE:"long",INSIDER_TAG:"//hellokrupet.api.useinsider.com/ins.js?id=10004523",TOOLTIP_IMAGE:"/images/tooltips-kh.png",PREGNANCY_WEIGHT_GAIN:"រង្វាស់សុខភាព/គណនាទម្ងន់ស្ត្រីពពោះ",BABY_POOP:"រង្វាស់សុខភាព/អត្ថន័យពណ៌-និងរូបរាងលាម",VACCINATION_TOOL:"រង្វាស់សុខភាព/កាលវិភាគចាក់ថ្នាំបង្កា"},"my-MM":{LOGO_TYPE:"hellosayarwon",SITE_NAME:"HelloSayarwon",HOMEPAGE_IMAGE:"https://hellosayarwon.com/images/country-thumbnails/PH.png",SITE_NAME_FORMATTED:"Hello Sayarwon",SITE_ID:"7",INSIDER_TAG:"//hellosayarwon.api.useinsider.com/ins.js?id=10004522"},"zh-TW":{LOGO_TYPE:"helloyishi",SITE_NAME:"HelloYishi",HOMEPAGE_IMAGE:"https://helloyishi.com.tw/images/country-thumbnails/TW.png",SITE_NAME_FORMATTED:"Hello Yishi",SITE_ID:"6",INSIDER_TAG:"//helloyishi.api.useinsider.com/ins.js?id=10004526",TOOLTIP_IMAGE:"/images/tooltips-tw.png",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"how-does-babies-poop-look-like",VACCINATION_TOOL:"vaccination-tool"},"id-ID":{LOGO_TYPE:"hellosehat",SITE_NAME:"HelloSehat",HOMEPAGE_IMAGE:"https://hellosehat.com/images/country-thumbnails/ID.png",SITE_NAME_FORMATTED:"Hello Sehat",SITE_ID:"2",INSIDER_TAG:"//hellosehat.api.useinsider.com/ins.js?id=10003799",TOOLTIP_IMAGE:"/images/tooltips-id.png",PREGNANCY_WEIGHT_GAIN:"kalkulator-kenaikan-berat-badan-ibu-hamil",BABY_POOP:"warna-feses-bayi-normal",VACCINATION_TOOL:"jadwal-imunisasi"},"hi-IN":{LOGO_TYPE:"helloswasthya",SITE_NAME:"HelloSwasthya",HOMEPAGE_IMAGE:"https://helloswasthya.com/images/country-thumbnails/IN.png",SITE_NAME_FORMATTED:"हैलो स्वास्थ्य",SITE_ID:"8",CATEGORIES_TYPE:"long",INSIDER_TAG:"//helloswasthya.api.useinsider.com/ins.js?id=10004498",TOOLTIP_IMAGE:"/images/tooltips-in.png",PREGNANCY_WEIGHT_GAIN:"garbhavastha-weight-calculator",BABY_POOP:"visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool"},"ms-MY":{LOGO_TYPE:"hellodoktor",SITE_NAME:"HelloDoktor",HOMEPAGE_IMAGE:"https://hellodoktor.com/images/country-thumbnails/MY.png",SITE_NAME_FORMATTED:"Hello Doktor",SITE_ID:"5",INSIDER_TAG:"//hellodoktor.api.useinsider.com/ins.js?id=10004525",TOOLTIP_IMAGE:"/images/tooltips-my.png",PREGNANCY_WEIGHT_GAIN:"kalkulator-tambah-berat-badan-hamil",BABY_POOP:"kenali-najis-bayi-anda",VACCINATION_TOOL:"alat-kesihatan-vaksin"},"tl-PH":{LOGO_TYPE:"hellodoctor",SITE_NAME:"HelloDoctor",HOMEPAGE_IMAGE:"https://hellodoctor.com.ph/images/country-thumbnails/PH.png",SITE_NAME_FORMATTED:"Hello Doctor",SITE_ID:"9",CATEGORIES_TYPE:"short",INSIDER_TAG:"//hellodoctorph.api.useinsider.com/ins.js?id=10004527",TOOLTIP_IMAGE:"/fil/images/tooltips-ph.png",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"a-visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool",ABOUT_US_IMAGE:"/fil/images/aboutus/PH.png"}},exports.LOCALIZED_SLUGS=e,exports.MARRY_BABY_DEFAULT_FOOTER={SOCIAL_LINKS:{facebookLink:"https://www.facebook.com/marry.baby.vn",instagramLink:"https://www.instagram.com/marrybaby.vn",zaloLink:"http://zalo.me/806483414530291942",youtubeLink:"https://www.youtube.com/user/marrybabyvn"}},exports.MARRY_BABY_PATH={FOOTER:"menu/footer",HEALTH_TOOLS:"health-tools"},exports.SSO_PATHS={SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help"},exports.STATIC_PAGES={"vi-VN":{PRIVACY:"/privacy",TERM_OF_USE:"/dieu-khoan-su-dung",PRIVACY_POLICY:"/chinh-sach-quyen-rieng-tu",EDITORIAL_CORRECTIONS_POLICY:"/chinh-sach-bien-tap-chinh-sua",ADVERTISING_SPONSOR_POLICY:"/chinh-sach-quang-cao-tai-tro",POLICIES:"/chinh-sach",FAQS:"/thong-tin-quan-trong",SITEMAP:"/sitemap",ABOUT_US:"/about-us",ADVERTISEMENT:"/quang-cao-voi-chung-toi",CONTACT_US:"/lien-he",ABOUT_GO_CARE:"/about-go-care",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/hello-bacsi/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/tieu-chuan-cong-dong",TOGETHER:"/community"},"km-KH":{POLICIES:"/policies",TERM_OF_USE:"/ខនិងលក្ខខណ្ឌ",PRIVACY_POLICY:"/គោលការណ៍ឯកជនភាព",EDITORIAL_CORRECTIONS_POLICY:"/គោលការណ៍ខ្លឹមសារមាតិកា",ADVERTISING_SPONSOR_POLICY:"/គោលការណ៍ផ្សាយពាណិជ្ជកម",FAQS:"/faqs",SITEMAP:"/sitemap",ABOUT_US:"/about-us",ADVERTISEMENT:"/advertisement",CONTACT_US:"/contact-us",ABOUT_GO_CARE:"/about-go-care",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"/#",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/គោលការណ៍ណែនាំសហគមន៍",TOGETHER:"/community"},"en-PH":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/community-guidelines",TOGETHER:"/community"},"my-MM":{POLICIES:"/polisi-terma-syarat",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/pengiklanan",CONTACT_US:"/hubungi-kami",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:" https://hellohealthgroup.com/hello-doktor/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/panduan-komuniti",TOGETHER:"/community"},"zh-TW":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/advertising",CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,FACILITY:"/facility",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community"},"id-ID":{POLICIES_EN:"/policies",TERM_OF_USE:"/kebijakan-pengguna",PRIVACY_POLICY:"/kebijakan-privasi",EDITORIAL_CORRECTIONS_POLICY:"/kebijakan-editorial",ADVERTISING_SPONSOR_POLICY:"/kebijakan-iklan",POLICIES:"/kebijakan",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/kontak-kami",CONTACT_EN:"/contact",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/hello-sehat/",RECRUITMENT:"https://hellohealthgroup.com/careers/",EDITORIAL_POLICY:"/edit-id",EDITORIAL_POLICY_EN:"/edit-en",COMMUNITY_GUIDELINE:"/panduan-komunitas",TOGETHER:"/community"},"hi-IN":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community"},"ms-MY":{POLICIES:"/polisi-terma-syarat",TERM_OF_USE:"/terma-dan-syarat",PRIVACY_POLICY:"/polisi-privasi",EDITORIAL_CORRECTIONS_POLICY:"/polisi-editorial",ADVERTISING_SPONSOR_POLICY:"/polisi-pengiklanan",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/pengiklanan",CONTACT_US:"/hubungi-kami",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:" https://hellohealthgroup.com/hello-doktor/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/panduan-komuniti",TOGETHER:"/community"},"th-TH":{POLICIES_EN:"/policies",TERM_OF_USE:"/เงื่อนใขการใช้งาน",PRIVACY_POLICY:"/นโยบายความเป็นส่วนตัว",EDITORIAL_CORRECTIONS_POLICY:"/นโยบายบรรณธิการ",ADVERTISING_SPONSOR_POLICY:"/นโยบายการโฆษณาและผู้สนับสนุน",POLICIES:"/นโยบาย",FAQS:"/คำถามที่พบบ่อย",SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/ลงโฆษณากับเรา",CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community"},"tl-PH":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/community-guidelines",TOGETHER:"/community"}},exports.TOGETHER_PATHS={COMMUNITIES:"community?website_url={websiteUrl}",MENU_TOPIC:"topic?community_id={communityId}&website_url={websiteUrl}",GET_USER_POSTS:"profile/posts?website_url={websiteUrl}"},exports.Z_INDEX={adBlock:48,headerContainerHome:99,headerContainerPopup:300,headerContainerPopupSUbLevel:400,menuCategoryPopupWrapper:200,menuCategoryPopupContainer:210,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:300,homeSearchComponent:200},exports.constants=o,exports.domainLocales={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com","tl-PH":"hellodoctor.com.ph"};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i,a,e,n,t;!function(i){i.Boy="boy",i.Girl="girl"}(i||(i={})),function(i){i[i.Weight=0]="Weight",i[i.Height=1]="Height",i[i.Head=2]="Head",i[i.BMI=3]="BMI"}(a||(a={})),function(i){i[i.Weekly=0]="Weekly",i[i.Monthly=1]="Monthly",i[i.Yearly=2]="Yearly"}(e||(e={})),function(i){i[i.Weight=0]="Weight",i[i.Height=1]="Height",i[i.Head=2]="Head",i[i.BMI=3]="BMI",i[i.Record=4]="Record"}(n||(n={})),function(i){i.Vietnam="vi-VN",i.Indonesia="id-ID",i.Malaysia="ms-MY",i.Cambodia="km-KH",i.PhilippinesEnglish="en-PH",i.PhilippinesTagalog="tl-PH",i.Thailand="th-TH",i.Myanmar="my-MM",i.Taiwan="zh-TW",i.India="hi-IN"}(t||(t={}));export{a as B,i as G,t as L,e as a,n as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{G as e,B as t,a as n,b as r,L as o}from"./Locale-69030fff.js";import{_ as a,a as i,b as u}from"./tslib.es6-6ae0d506.js";import{useEffect as s}from"react";import{g as c}from"./cookieHelper-0e8521c3.js";import{differenceInWeeks as l,differenceInMonths as f}from"date-fns";var d=Object.freeze({__proto__:null,get Gender(){return e},get BabyGrowthChartType(){return t},get BabyGrowthChartDuration(){return n},get BabyGrowthResultTab(){return r},get LOCALE(){return o}});function h(e){var t=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",t).then((function(e){return Array.from(new Uint8Array(e)).map((function(e){return e.toString(16).padStart(2,"0")})).join("")}))}var p=function(e){s((function(){var t=null;return(null==e?void 0:e.id)&&a(void 0,void 0,void 0,(function(){var n,r,o,s,l,f,d,p;return i(this,(function(m){switch(m.label){case 0:return[4,fetch("https://api.ipify.org").then((function(e){return e.text()}))];case 1:return(n=m.sent())?[3,3]:[4,fetch("https://icanhazip.com").then((function(e){return e.text()}))];case 2:n=m.sent(),m.label=3;case 3:return[4,Promise.all([e.email?h(e.email):null,e.phone?h(e.phone):null,e.birthday?h(e.birthday.split("-").join("")):null,e.gender?h(e.gender?"m":"f"):null,e.city_name?h(e.city_name).then((function(e){return e.replace(/\s/g,"")})):null])];case 4:return r=m.sent(),o=r[0],s=r[1],l=r[2],f=r[3],d=r[4],p={fbc:c("_fbc")||"",fbp:c("_fbp")||"",client_ip_address:(null==n?void 0:n.replace("\n",""))||"",client_user_agent:navigator.userAgent||""},o&&(p.em=o),s&&(p.ph=s),l&&(p.db=l),f&&(p.ge=f),d&&(p.ct=d),window.dataLayer=window.dataLayer||[],window.dataLayer.push(u(u({},p),{event:"FB Conversion"})),function e(){return a(this,void 0,void 0,(function(){return i(this,(function(n){return window.fbq?window.fbq("trackCustom","FB Conversion",{action_source:"website",event_source_url:window.location.href,user_data:[p]}):t=setTimeout(e,2e3),[2]}))}))}(),[2]}}))})),function(){t&&clearTimeout(t)}}),[e])},m=function(e,t){void 0===t&&(t=new Date);var n=l(t,e,{roundingMethod:"ceil"}),r=f(t,e);return{year:Math.floor(r/12),month:r%12,week:n}};export{m as a,d as i,p as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com","tl-PH":"hellodoctor.com.ph"},o={"vi-VN":{LOGO_TYPE:"hellobacsi",SITE_NAME:"HelloBacsi",SITE_NAME_FORMATTED:"Hello Bacsi",HOMEPAGE_IMAGE:"https://hellobacsi.com/images/country-thumbnails/VN.png",SITE_ID:"1",INSIDER_TAG:"//hellobacsivn.api.useinsider.com/ins.js?id=10003798",TOOLTIP_IMAGE:"/images/tooltips-vn.png",PREGNANCY_WEIGHT_GAIN:"cong-cu-tinh-can-nang-khi-mang-thai",BABY_POOP:"phan-tre-so-sinh-nhu-the-nao-la-tot",VACCINATION_TOOL:"lich-tiem-chung"},"en-PH":{LOGO_TYPE:"hellodoctor",SITE_NAME:"HelloDoctor",HOMEPAGE_IMAGE:"https://hellodoctor.com.ph/images/country-thumbnails/PH.png",SITE_NAME_FORMATTED:"Hello Doctor",SITE_ID:"9",CATEGORIES_TYPE:"short",INSIDER_TAG:"//hellodoctorph.api.useinsider.com/ins.js?id=10004527",TOOLTIP_IMAGE:"/images/tooltips-ph.png",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"a-visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool"},"th-TH":{LOGO_TYPE:"hellokhunmor",SITE_NAME:"HelloKhunmor",HOMEPAGE_IMAGE:"https://hellokhunmor.com/images/country-thumbnails/TH.png",SITE_NAME_FORMATTED:"Hello Khunmor",SITE_ID:"3",CATEGORIES_TYPE:"long",INSIDER_TAG:"//hellokhunmor.api.useinsider.com/ins.js?id=10004524",TOOLTIP_IMAGE:"/images/tooltips-th.png",PREGNANCY_WEIGHT_GAIN:"เครื่องคำนวณน้ำหนักตัว",BABY_POOP:"สีอุจจาระของลูก-บอกถึงส",VACCINATION_TOOL:"vaccination-tool"},"km-KH":{LOGO_TYPE:"hellokrupet",SITE_NAME:"HelloKrupet",HOMEPAGE_IMAGE:"https://hellokrupet.com/images/country-thumbnails/KH.JPG",SITE_NAME_FORMATTED:"Hello Krupet",SITE_ID:"4",CATEGORIES_TYPE:"long",INSIDER_TAG:"//hellokrupet.api.useinsider.com/ins.js?id=10004523",TOOLTIP_IMAGE:"/images/tooltips-kh.png",PREGNANCY_WEIGHT_GAIN:"រង្វាស់សុខភាព/គណនាទម្ងន់ស្ត្រីពពោះ",BABY_POOP:"រង្វាស់សុខភាព/អត្ថន័យពណ៌-និងរូបរាងលាម",VACCINATION_TOOL:"រង្វាស់សុខភាព/កាលវិភាគចាក់ថ្នាំបង្កា"},"my-MM":{LOGO_TYPE:"hellosayarwon",SITE_NAME:"HelloSayarwon",HOMEPAGE_IMAGE:"https://hellosayarwon.com/images/country-thumbnails/PH.png",SITE_NAME_FORMATTED:"Hello Sayarwon",SITE_ID:"7",INSIDER_TAG:"//hellosayarwon.api.useinsider.com/ins.js?id=10004522"},"zh-TW":{LOGO_TYPE:"helloyishi",SITE_NAME:"HelloYishi",HOMEPAGE_IMAGE:"https://helloyishi.com.tw/images/country-thumbnails/TW.png",SITE_NAME_FORMATTED:"Hello Yishi",SITE_ID:"6",INSIDER_TAG:"//helloyishi.api.useinsider.com/ins.js?id=10004526",TOOLTIP_IMAGE:"/images/tooltips-tw.png",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"how-does-babies-poop-look-like",VACCINATION_TOOL:"vaccination-tool"},"id-ID":{LOGO_TYPE:"hellosehat",SITE_NAME:"HelloSehat",HOMEPAGE_IMAGE:"https://hellosehat.com/images/country-thumbnails/ID.png",SITE_NAME_FORMATTED:"Hello Sehat",SITE_ID:"2",INSIDER_TAG:"//hellosehat.api.useinsider.com/ins.js?id=10003799",TOOLTIP_IMAGE:"/images/tooltips-id.png",PREGNANCY_WEIGHT_GAIN:"kalkulator-kenaikan-berat-badan-ibu-hamil",BABY_POOP:"warna-feses-bayi-normal",VACCINATION_TOOL:"jadwal-imunisasi"},"hi-IN":{LOGO_TYPE:"helloswasthya",SITE_NAME:"HelloSwasthya",HOMEPAGE_IMAGE:"https://helloswasthya.com/images/country-thumbnails/IN.png",SITE_NAME_FORMATTED:"हैलो स्वास्थ्य",SITE_ID:"8",CATEGORIES_TYPE:"long",INSIDER_TAG:"//helloswasthya.api.useinsider.com/ins.js?id=10004498",TOOLTIP_IMAGE:"/images/tooltips-in.png",PREGNANCY_WEIGHT_GAIN:"garbhavastha-weight-calculator",BABY_POOP:"visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool"},"ms-MY":{LOGO_TYPE:"hellodoktor",SITE_NAME:"HelloDoktor",HOMEPAGE_IMAGE:"https://hellodoktor.com/images/country-thumbnails/MY.png",SITE_NAME_FORMATTED:"Hello Doktor",SITE_ID:"5",INSIDER_TAG:"//hellodoktor.api.useinsider.com/ins.js?id=10004525",TOOLTIP_IMAGE:"/images/tooltips-my.png",PREGNANCY_WEIGHT_GAIN:"kalkulator-tambah-berat-badan-hamil",BABY_POOP:"kenali-najis-bayi-anda",VACCINATION_TOOL:"alat-kesihatan-vaksin"},"tl-PH":{LOGO_TYPE:"hellodoctor",SITE_NAME:"HelloDoctor",HOMEPAGE_IMAGE:"https://hellodoctor.com.ph/images/country-thumbnails/PH.png",SITE_NAME_FORMATTED:"Hello Doctor",SITE_ID:"9",CATEGORIES_TYPE:"short",INSIDER_TAG:"//hellodoctorph.api.useinsider.com/ins.js?id=10004527",TOOLTIP_IMAGE:"/fil/images/tooltips-ph.png",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"a-visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool",ABOUT_US_IMAGE:"/fil/images/aboutus/PH.png"}},i={"vi-VN":{PRIVACY:"/privacy",TERM_OF_USE:"/dieu-khoan-su-dung",PRIVACY_POLICY:"/chinh-sach-quyen-rieng-tu",EDITORIAL_CORRECTIONS_POLICY:"/chinh-sach-bien-tap-chinh-sua",ADVERTISING_SPONSOR_POLICY:"/chinh-sach-quang-cao-tai-tro",POLICIES:"/chinh-sach",FAQS:"/thong-tin-quan-trong",SITEMAP:"/sitemap",ABOUT_US:"/about-us",ADVERTISEMENT:"/quang-cao-voi-chung-toi",CONTACT_US:"/lien-he",ABOUT_GO_CARE:"/about-go-care",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/hello-bacsi/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/tieu-chuan-cong-dong",TOGETHER:"/community"},"km-KH":{POLICIES:"/policies",TERM_OF_USE:"/ខនិងលក្ខខណ្ឌ",PRIVACY_POLICY:"/គោលការណ៍ឯកជនភាព",EDITORIAL_CORRECTIONS_POLICY:"/គោលការណ៍ខ្លឹមសារមាតិកា",ADVERTISING_SPONSOR_POLICY:"/គោលការណ៍ផ្សាយពាណិជ្ជកម",FAQS:"/faqs",SITEMAP:"/sitemap",ABOUT_US:"/about-us",ADVERTISEMENT:"/advertisement",CONTACT_US:"/contact-us",ABOUT_GO_CARE:"/about-go-care",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"/#",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/គោលការណ៍ណែនាំសហគមន៍",TOGETHER:"/community"},"en-PH":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/community-guidelines",TOGETHER:"/community"},"my-MM":{POLICIES:"/polisi-terma-syarat",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/pengiklanan",CONTACT_US:"/hubungi-kami",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:" https://hellohealthgroup.com/hello-doktor/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/panduan-komuniti",TOGETHER:"/community"},"zh-TW":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/advertising",CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,FACILITY:"/facility",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community"},"id-ID":{POLICIES_EN:"/policies",TERM_OF_USE:"/kebijakan-pengguna",PRIVACY_POLICY:"/kebijakan-privasi",EDITORIAL_CORRECTIONS_POLICY:"/kebijakan-editorial",ADVERTISING_SPONSOR_POLICY:"/kebijakan-iklan",POLICIES:"/kebijakan",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/kontak-kami",CONTACT_EN:"/contact",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/hello-sehat/",RECRUITMENT:"https://hellohealthgroup.com/careers/",EDITORIAL_POLICY:"/edit-id",EDITORIAL_POLICY_EN:"/edit-en",COMMUNITY_GUIDELINE:"/panduan-komunitas",TOGETHER:"/community"},"hi-IN":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community"},"ms-MY":{POLICIES:"/polisi-terma-syarat",TERM_OF_USE:"/terma-dan-syarat",PRIVACY_POLICY:"/polisi-privasi",EDITORIAL_CORRECTIONS_POLICY:"/polisi-editorial",ADVERTISING_SPONSOR_POLICY:"/polisi-pengiklanan",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/pengiklanan",CONTACT_US:"/hubungi-kami",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:" https://hellohealthgroup.com/hello-doktor/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/panduan-komuniti",TOGETHER:"/community"},"th-TH":{POLICIES_EN:"/policies",TERM_OF_USE:"/เงื่อนใขการใช้งาน",PRIVACY_POLICY:"/นโยบายความเป็นส่วนตัว",EDITORIAL_CORRECTIONS_POLICY:"/นโยบายบรรณธิการ",ADVERTISING_SPONSOR_POLICY:"/นโยบายการโฆษณาและผู้สนับสนุน",POLICIES:"/นโยบาย",FAQS:"/คำถามที่พบบ่อย",SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/ลงโฆษณากับเรา",CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community"},"tl-PH":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/community-guidelines",TOGETHER:"/community"}},l={"vi-VN":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"km-KH":[{type:"link",rel:"icon",href:"/by-locales/km-KH/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/km-KH/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/km-KH/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/km-KH/icon-270x270.png"}],"en-PH":[{type:"link",rel:"icon",href:"/by-locales/en-PH/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/en-PH/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon",href:"/by-locales/en-PH/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/en-PH/icon-270x270.png"}],"id-ID":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"ms-MY":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"th-TH":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"my-MM":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"zh-TW":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"hi-IN":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],marryBaby:[{type:"link",rel:"shortcut icon",href:"/favicons/favicon.ico"},{type:"link",rel:"icon",href:"/favicons/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/favicons/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/favicons/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/favicons/icon-180x180.png"}]},a={SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help"},n={COMMUNITIES:"community?website_url={websiteUrl}",MENU_TOPIC:"topic?community_id={communityId}&website_url={websiteUrl}",GET_USER_POSTS:"profile/posts?website_url={websiteUrl}"},t={SPOTLIGHTS:"spotlights?per_page={perPage}&order_by={orderBy}",HEALTH_TOOLS:"healthtools",HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",CATEGORIES:"categories?type=all",FOOTER:"footer"},s={SPECIALTIES:"api/specialties?_ishome=1&site={domain}"},c={FOOTER:"menu/footer",HEALTH_TOOLS:"health-tools"},E={adBlock:48,headerContainerHome:99,headerContainerPopup:300,headerContainerPopupSUbLevel:400,menuCategoryPopupWrapper:200,menuCategoryPopupContainer:210,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:300,homeSearchComponent:200},I={SOCIAL_LINKS:{facebookLink:"https://www.facebook.com/marry.baby.vn",instagramLink:"https://www.instagram.com/marrybaby.vn",zaloLink:"http://zalo.me/806483414530291942",youtubeLink:"https://www.youtube.com/user/marrybabyvn"}},T={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"tl-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"zh-TW":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}},O=-1,p=Object.freeze({__proto__:null,basePath:"/care",LOCALE_COUNTRY:{"vi-VN":{id:1,name:"Vietnam"},"id-ID":{id:2,name:"Indonesia"},"ms-MY":{id:3,name:"Malaysia"},"km-KH":{id:4,name:"Cambodia"},"en-PH":{id:5,name:"Philippines"},"th-TH":{id:6,name:"Thai Lan"},"my-MM":{id:7,name:"Myanmar"},"zh-TW":{id:8,name:"Taiwan"},"hi-IN":{id:9,name:"India"}},LOCALIZED_SLUGS:T,ID_OPTION_CURRENT_LOCATION:-1});export{s as C,t as D,l as F,O as I,o as L,I as M,a as S,n as T,E as Z,T as a,i as b,p as c,e as d,c as e};
|