@hhgtech/hhg-components 1.24.10 → 1.24.12

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.
Files changed (139) hide show
  1. package/build/babyGrowth.js +2 -2
  2. package/build/cache.js +1 -1
  3. package/build/care.js +1 -1
  4. package/build/components.js +1 -1
  5. package/build/constants.js +1 -1
  6. package/build/core-f0beed32.js +1 -0
  7. package/build/{dataTransform-1e3262ec.js → dataTransform-5e93a88b.js} +1 -1
  8. package/build/esm/i18n.js +1 -1
  9. package/build/esm/{index-3da84662.js → index-03968b09.js} +6 -6
  10. package/build/esm/index.js +1 -1
  11. package/build/esm/lead.js +1 -1
  12. package/build/esm/onboarding.js +1 -1
  13. package/build/esm/together.js +1 -1
  14. package/build/esm/translationsProvider-c939c988.js +1 -0
  15. package/build/esm/{types-4475e3ee.js → types-15329057.js} +2 -2
  16. package/build/footer.js +1 -1
  17. package/build/gAssets.js +1 -1
  18. package/build/getDynamicHealthTool-f7d8807d.js +1 -0
  19. package/build/{getSocialList-bbc17870.js → getSocialList-5179ad28.js} +1 -1
  20. package/build/hooks.js +1 -1
  21. package/build/i18n.js +1 -1
  22. package/build/{index-66f3e939.js → index-049c0fd4.js} +1 -1
  23. package/build/{index-fa0629c2.js → index-049ec53f.js} +1 -1
  24. package/build/{index-a6125538.js → index-0a2055aa.js} +1 -1
  25. package/build/index-2a99b027.js +1 -0
  26. package/build/{index-5bccaa27.js → index-34d072f9.js} +1 -1
  27. package/build/{index-cd47613c.js → index-36341dd0.js} +1 -1
  28. package/build/{index-ef0867ca.js → index-3af62116.js} +1 -1
  29. package/build/{index-7133c0f1.js → index-407a0c87.js} +1 -1
  30. package/build/{index-fe2aba1c.js → index-6168f925.js} +1 -1
  31. package/build/{index-0bf8f64d.js → index-7bee7f0a.js} +1 -1
  32. package/build/{index-86f8f80d.js → index-82aa22e4.js} +1 -1
  33. package/build/{index-b2a30a08.js → index-83561b5a.js} +1 -1
  34. package/build/{index-4e7aa6d8.js → index-861f5c1d.js} +1 -1
  35. package/build/index-869cb2d7.js +1 -0
  36. package/build/{index-f2753ae4.js → index-8a58376a.js} +1 -1
  37. package/build/{index-bc92da84.js → index-8b174b6c.js} +1 -1
  38. package/build/{index-ec1f49d8.js → index-907f4a2d.js} +8 -8
  39. package/build/{index-79968f6a.js → index-cc505087.js} +1 -1
  40. package/build/{index-fc3795a1.js → index-cdc3f0fd.js} +1 -1
  41. package/build/{index-14228f4b.js → index-deea70ec.js} +1 -1
  42. package/build/{index-46b89101.js → index-e9366d92.js} +1 -1
  43. package/build/index.js +1 -1
  44. package/build/{index.styled-585e1c66.js → index.styled-225fb860.js} +1 -1
  45. package/build/{index.styled-5a5b4b43.js → index.styled-9c550ff9.js} +4 -4
  46. package/build/{index.styled-34bf89a0.js → index.styled-aa7385af.js} +1 -1
  47. package/build/{index.styled-abe112b4.js → index.styled-b57c0ecd.js} +1 -1
  48. package/build/{index.styled-94b5bfc8.js → index.styled-c20d674e.js} +1 -1
  49. package/build/{index.styled-e486e295.js → index.styled-d57fdc94.js} +4 -4
  50. package/build/lead.js +1 -1
  51. package/build/mantine.js +1 -1
  52. package/build/misc.js +1 -1
  53. package/build/navigation.js +1 -1
  54. package/build/onboarding.js +1 -1
  55. package/build/pwg.js +1 -1
  56. package/build/{routing-eedb1a7f.js → routing-e79abc64.js} +1 -1
  57. package/build/{screenSizeContext-fe44a0eb.js → screenSizeContext-865e182b.js} +10 -10
  58. package/build/together.js +1 -1
  59. package/build/translationsProvider-f0840c55.js +1 -0
  60. package/build/{types-b3d219b3.js → types-811c62bd.js} +3 -3
  61. package/build/{types-dcc8b19f.js → types-c64ed407.js} +1 -1
  62. package/build/types.js +1 -1
  63. package/build/useHealthToolCache-649d9aa8.js +1 -0
  64. package/build/{useRafState-5637380b.js → useRafState-93c27f8b.js} +1 -1
  65. package/build/useTranslations-dfde4b94.js +1 -0
  66. package/package.json +1 -1
  67. package/build/core-d2b63b41.js +0 -1
  68. package/build/esm/translationsProvider-4cff71c1.js +0 -1
  69. package/build/getDynamicHealthTool-062c94fa.js +0 -1
  70. package/build/index-2c6e214f.js +0 -1
  71. package/build/index-d71a2567.js +0 -1
  72. package/build/translationsProvider-779d512d.js +0 -1
  73. package/build/useHealthToolCache-b272adbc.js +0 -1
  74. package/build/useTranslations-c0af4129.js +0 -1
  75. /package/build/{BMI_BOYS.percentile.monthly-179bd49a.js → BMI_BOYS.percentile.monthly-7edb94fd.js} +0 -0
  76. /package/build/{BMI_BOYS.percentile.weekly-6aa91f7f.js → BMI_BOYS.percentile.weekly-be2e19e2.js} +0 -0
  77. /package/build/{BMI_BOYS.percentile.yearly-775a4501.js → BMI_BOYS.percentile.yearly-9aeb7f21.js} +0 -0
  78. /package/build/{BMI_BOYS.zscore.monthly-fa83d52f.js → BMI_BOYS.zscore.monthly-3e640e92.js} +0 -0
  79. /package/build/{BMI_BOYS.zscore.weekly-a6a12345.js → BMI_BOYS.zscore.weekly-d5c77485.js} +0 -0
  80. /package/build/{BMI_BOYS.zscore.yearly-079bbbb2.js → BMI_BOYS.zscore.yearly-724e1cd8.js} +0 -0
  81. /package/build/{BMI_GIRLS.percentile.monthly-7fcf0f5b.js → BMI_GIRLS.percentile.monthly-c619b1f4.js} +0 -0
  82. /package/build/{BMI_GIRLS.percentile.weekly-62fad4da.js → BMI_GIRLS.percentile.weekly-cb83f4c6.js} +0 -0
  83. /package/build/{BMI_GIRLS.percentile.yearly-b435c72d.js → BMI_GIRLS.percentile.yearly-5ccfbccd.js} +0 -0
  84. /package/build/{BMI_GIRLS.zscore.monthly-0842fc93.js → BMI_GIRLS.zscore.monthly-e116d4c2.js} +0 -0
  85. /package/build/{BMI_GIRLS.zscore.weekly-7e2e11d1.js → BMI_GIRLS.zscore.weekly-96e3d724.js} +0 -0
  86. /package/build/{BMI_GIRLS.zscore.yearly-4d403d05.js → BMI_GIRLS.zscore.yearly-a552085c.js} +0 -0
  87. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-c51a0508.js → HEAD CIRCUM_BOYS.percentile.monthly-35e16929.js} +0 -0
  88. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-40642ed9.js → HEAD CIRCUM_BOYS.percentile.weekly-0e3c35f2.js} +0 -0
  89. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-86eca678.js → HEAD CIRCUM_BOYS.percentile.yearly-31c26c52.js} +0 -0
  90. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-d61bee41.js → HEAD CIRCUM_BOYS.zscore.monthly-e80f7245.js} +0 -0
  91. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-485f2c02.js → HEAD CIRCUM_BOYS.zscore.weekly-a4bf464a.js} +0 -0
  92. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-b07d5c49.js → HEAD CIRCUM_BOYS.zscore.yearly-2cbf0c73.js} +0 -0
  93. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-f825c79d.js → HEAD CIRCUM_GIRLS.percentile.monthly-626b7940.js} +0 -0
  94. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-0f9a04f3.js → HEAD CIRCUM_GIRLS.percentile.weekly-1c2b6897.js} +0 -0
  95. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-6a70c07c.js → HEAD CIRCUM_GIRLS.percentile.yearly-166f018b.js} +0 -0
  96. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-9fb4d1ed.js → HEAD CIRCUM_GIRLS.zscore.monthly-8ee8035e.js} +0 -0
  97. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-bcdbb592.js → HEAD CIRCUM_GIRLS.zscore.weekly-47e296a5.js} +0 -0
  98. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-96a6f81d.js → HEAD CIRCUM_GIRLS.zscore.yearly-a7394a72.js} +0 -0
  99. /package/build/{HEIGHT_BOYS.percentile.monthly-35054639.js → HEIGHT_BOYS.percentile.monthly-1c4ccc31.js} +0 -0
  100. /package/build/{HEIGHT_BOYS.percentile.weekly-bc9c5f1f.js → HEIGHT_BOYS.percentile.weekly-07b68d42.js} +0 -0
  101. /package/build/{HEIGHT_BOYS.percentile.yearly-287846f3.js → HEIGHT_BOYS.percentile.yearly-35edd75f.js} +0 -0
  102. /package/build/{HEIGHT_BOYS.zscore.monthly-88710c09.js → HEIGHT_BOYS.zscore.monthly-a5b5143f.js} +0 -0
  103. /package/build/{HEIGHT_BOYS.zscore.weekly-cc72efcd.js → HEIGHT_BOYS.zscore.weekly-66665d78.js} +0 -0
  104. /package/build/{HEIGHT_BOYS.zscore.yearly-4cdce139.js → HEIGHT_BOYS.zscore.yearly-936212fd.js} +0 -0
  105. /package/build/{HEIGHT_GIRLS.percentile.monthly-0f7c9359.js → HEIGHT_GIRLS.percentile.monthly-9f4a01ba.js} +0 -0
  106. /package/build/{HEIGHT_GIRLS.percentile.weekly-01eddd98.js → HEIGHT_GIRLS.percentile.weekly-7717202f.js} +0 -0
  107. /package/build/{HEIGHT_GIRLS.percentile.yearly-900a107e.js → HEIGHT_GIRLS.percentile.yearly-914c5855.js} +0 -0
  108. /package/build/{HEIGHT_GIRLS.zscore.monthly-12c4d198.js → HEIGHT_GIRLS.zscore.monthly-57a65252.js} +0 -0
  109. /package/build/{HEIGHT_GIRLS.zscore.weekly-ee79ebba.js → HEIGHT_GIRLS.zscore.weekly-d6a0ac77.js} +0 -0
  110. /package/build/{HEIGHT_GIRLS.zscore.yearly-8d33b733.js → HEIGHT_GIRLS.zscore.yearly-86e191a9.js} +0 -0
  111. /package/build/{Locale-6c3499c4.js → Locale-f33dbe31.js} +0 -0
  112. /package/build/{Visible-91eb2cab.js → Visible-0a7d60a7.js} +0 -0
  113. /package/build/{WEIGHT_BOYS.percentile.monthly-125efd9e.js → WEIGHT_BOYS.percentile.monthly-28cee18c.js} +0 -0
  114. /package/build/{WEIGHT_BOYS.percentile.weekly-a99a66aa.js → WEIGHT_BOYS.percentile.weekly-51e993b6.js} +0 -0
  115. /package/build/{WEIGHT_BOYS.percentile.yearly-97e4b241.js → WEIGHT_BOYS.percentile.yearly-2746bbee.js} +0 -0
  116. /package/build/{WEIGHT_BOYS.zscore.monthly-f4c04ba9.js → WEIGHT_BOYS.zscore.monthly-6303ba33.js} +0 -0
  117. /package/build/{WEIGHT_BOYS.zscore.weekly-e8bb2d87.js → WEIGHT_BOYS.zscore.weekly-0412646c.js} +0 -0
  118. /package/build/{WEIGHT_BOYS.zscore.yearly-9f6ebb6e.js → WEIGHT_BOYS.zscore.yearly-b2210cb4.js} +0 -0
  119. /package/build/{WEIGHT_GIRLS.percentile.monthly-6309fdcc.js → WEIGHT_GIRLS.percentile.monthly-4d862445.js} +0 -0
  120. /package/build/{WEIGHT_GIRLS.percentile.weekly-5c04124d.js → WEIGHT_GIRLS.percentile.weekly-d0a045cd.js} +0 -0
  121. /package/build/{WEIGHT_GIRLS.percentile.yearly-69cc21f6.js → WEIGHT_GIRLS.percentile.yearly-7fee9000.js} +0 -0
  122. /package/build/{WEIGHT_GIRLS.zscore.monthly-5cf2c351.js → WEIGHT_GIRLS.zscore.monthly-42712c49.js} +0 -0
  123. /package/build/{WEIGHT_GIRLS.zscore.weekly-dabc012f.js → WEIGHT_GIRLS.zscore.weekly-ec2d6b4a.js} +0 -0
  124. /package/build/{WEIGHT_GIRLS.zscore.yearly-37cef5ca.js → WEIGHT_GIRLS.zscore.yearly-d89e1f54.js} +0 -0
  125. /package/build/{constants-15e20ec5.js → constants-a131c286.js} +0 -0
  126. /package/build/{cookieHelper-f5741971.js → cookieHelper-e8759e7f.js} +0 -0
  127. /package/build/{dataTransform-d1776096.js → dataTransform-78fe17a8.js} +0 -0
  128. /package/build/{index-9e06727f.js → index-d1b59934.js} +0 -0
  129. /package/build/{isProduction-c27d5525.js → isProduction-21eaac07.js} +0 -0
  130. /package/build/{localizeNumberFormat-5b4c3051.js → localizeNumberFormat-c86cc0a7.js} +0 -0
  131. /package/build/{normalizeLink-a6044692.js → normalizeLink-e0921597.js} +0 -0
  132. /package/build/{theme-337be52e.js → theme-04f525dc.js} +0 -0
  133. /package/build/{translationsContext-8c79a84e.js → translationsContext-289244e6.js} +0 -0
  134. /package/build/{tslib.es6-4f24f913.js → tslib.es6-2004f959.js} +0 -0
  135. /package/build/{useIsInit-32a02edb.js → useIsInit-571b6bb2.js} +0 -0
  136. /package/build/{useOutsideClick-1217da5e.js → useOutsideClick-da49bd59.js} +0 -0
  137. /package/build/{useScrollbarSize-2155b892.js → useScrollbarSize-f0d56cff.js} +0 -0
  138. /package/build/{useUniqueId-7dad4536.js → useUniqueId-60d652ec.js} +0 -0
  139. /package/build/{utils-edc25fdc.js → utils-06c11568.js} +0 -0
package/build/esm/lead.js CHANGED
@@ -1 +1 @@
1
- import{_ as e,a as t}from"./tslib.es6-b1c5b9b7.js";import a,{createContext as l,useMemo as n,useRef as o,useState as i,useEffect as r,useContext as s}from"react";import d from"lodash/debounce";import{createPortal as c}from"react-dom";import{T as m}from"./translationsContext-4ed0d296.js";import{g as u,s as p}from"./cookieHelper-b1c13586.js";import{b as h,a as g}from"./utils-f6d61056.js";import{v1 as v}from"uuid";import{u as b}from"./useTranslations-34154db8.js";import{H as y}from"./index.styled-8029aeaf.js";import{B as f}from"./index-b5d8241a.js";import{CommonGAssets as k}from"./gAssets.js";import"./index.styled-437068ae.js";import"./index-5392909e.js";import"@mantine/core";import"./index.styled-200bbdd6.js";import"string-format";import"./index-87cc9b76.js";import"./index.styled-d89c8b2b.js";import"date-fns";import"react-day-picker/DayPickerInput";import"./index.styled-9c86dbd3.js";import"./index-3459c602.js";import"lodash/throttle";import"keen-slider/react";import"./index-06ba77a5.js";import _ from"dayjs";import"@mantine/hooks";import{I as E,N as w}from"./index-91cd07c6.js";import"react-hook-form";import"./isProduction-142cc526.js";import"./Locale-d143219c.js";import"./screenSizeContext-40c726af.js";import"styled-components";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-2896b218.js";import"@mantine/dates";import{R as C,j as N,D as S,e as T}from"./index-5ad7df44.js";import{S as x}from"./index-ba12eba6.js";import{M as O}from"./index-3da84662.js";import{createFormContext as P}from"@mantine/form";import"./index-81352e3c.js";import"yup";import{T as j}from"./index-d5660016.js";import{t as B}from"./theme-09a3980d.js";import"./index-91131e37.js";import"./index-9099c391.js";import"@hookform/resolvers/yup";import"./index-0f3c172b.js";import"./index-0d74f5c2.js";import"slugify";import"./routing-91938e59.js";import"dayjs/plugin/relativeTime";import"./useScrollbarSize-02e13656.js";import"./useUniqueId-7840efb0.js";import"@mantine/carousel";import"./Visible-8820bebe.js";const L={LINKS:1,TAGS:2};let I="https://dev.leadgen.hellobacsi.com/";const A={MOBILE:1,DESKTOP:2};let $="";I.includes("localhost")&&(I="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&($="pink");let U="https://"+location.hostname+location.pathname+location.search;U=U.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));const D={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},M=D[document.documentElement.lang]||D["vi-VN"];const H={1:"Asia/Ho_Chi_Minh",10:"Asia/Ho_Chi_Minh",11:"Asia/Ho_Chi_Minh",12:"Asia/Ho_Chi_Minh",2:"Asia/Jakarta",3:"Asia/Bangkok",4:"Asia/Phnom_Penh",5:"Asia/Kuala_Lumpur",6:"Asia/Taipei",7:"Asia/Yangon",8:"Asia/Kolkata",9:"Asia/Manila"};var R={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"};const F={"en-PH":R,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại","validator.emailUsed":"Email này đã được sử dụng cho chiến dịch.","validator.phoneUsed":"Số điện thoại này đã được sử dụng cho chiến dịch.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"km-KH":{"validator.required":"ព័ត៌មាន​ចាំបាច់​ដែល​ត្រូវ​បំពេញ","validator.email":"សូម​វាយ​អាសយដ្ឋាន​អ៊ីម៉ែល​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.number":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.digits":"វាយ​បញ្ចូល​បាន​តែ​លេខ​ប៉ុណ្ណោះ","validator.maxlength":"សូម​វាយ​បញ្ចូលកុំ​ឲ្យ​លើស {0} តួអក្សរ","validator.minlength":"សូម​វាយ​បញ្ចូល​តិច​បំផុត {0} តួអក្ស","validator.phone":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"tl-PH":R},W=e=>{const t=F[e];return t||F["en-PH"]},V=l({}),q=({onClose:e,containerClassName:t,svgClassName:l})=>a.createElement("button",{onClick:e,className:`le-newbuilder-close-button js-modal__close ${t||""}`},a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:l},a.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"white"}),a.createElement("path",{d:"M16 17.05L10.925 22.125C10.7917 22.2584 10.621 22.329 10.413 22.337C10.2044 22.3457 10.025 22.275 9.87502 22.125C9.72502 21.975 9.65002 21.8 9.65002 21.6C9.65002 21.4 9.72502 21.225 9.87502 21.075L14.95 16L9.87502 10.925C9.74169 10.7917 9.67102 10.6207 9.66302 10.412C9.65436 10.204 9.72502 10.025 9.87502 9.87502C10.025 9.72502 10.2 9.65002 10.4 9.65002C10.6 9.65002 10.775 9.72502 10.925 9.87502L16 14.95L21.075 9.87502C21.2084 9.74169 21.3794 9.67069 21.588 9.66202C21.796 9.65402 21.975 9.72502 22.125 9.87502C22.275 10.025 22.35 10.2 22.35 10.4C22.35 10.6 22.275 10.775 22.125 10.925L17.05 16L22.125 21.075C22.2584 21.2084 22.329 21.379 22.337 21.587C22.3457 21.7957 22.275 21.975 22.125 22.125C21.975 22.275 21.8 22.35 21.6 22.35C21.4 22.35 21.225 22.275 21.075 22.125L16 17.05Z",fill:"#595959"}))),Y=({popupId:e,url:t,newTab:l,imageDestkop:n,imageMobile:o,onClose:i,onOtherSubmit:r})=>a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},a.createElement("div",{className:"le-center-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{className:"js-popup-other-submit",href:t,target:l?"blank":"_parent",onClick:r},a.createElement("img",{className:"le-only-mobile",src:o}),a.createElement("img",{className:"le-only-desktop",src:n})),a.createElement(q,{onClose:i,containerClassName:"close-button-top-right"})))),J=({popupId:e,url:t,title:l,urlText:n,titleAlign:o,subtitle:i,subtitleAlign:r,newTab:s,imageDesktop:d,imageMobile:c,onClose:m,onOtherSubmit:u})=>a.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-floating-desktop"},a.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},d?a.createElement("div",null,a.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5},src:d})):null,a.createElement("div",{style:{padding:20}},a.createElement("div",{className:`le-floating-desktop-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-desktop-desc le-text-align-${r}`},i)),a.createElement("a",{target:s?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n)),a.createElement(q,{onClose:m,containerClassName:"close-button-top-right"})))),a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-floating-mobile"},a.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},a.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},a.createElement("div",null,a.createElement("div",{className:`le-floating-mobile-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-mobile-desc le-text-align-${r}`},i)),c?a.createElement("div",null,a.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100},src:c})):null),a.createElement("div",{style:{textAlign:"center",marginTop:10}},a.createElement("a",{target:s?"blank":"_parent",href:t,style:{textDecoration:"none"}},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n))),a.createElement(q,{onClose:m,containerClassName:"close-button-top-right"}))))),z=({title:e,titleAlign:t,subtitle:l,subtitleAlign:n,link:o,linkNewTab:i,linkText:r,image:s})=>a.createElement("div",{className:"lead-modal__thank-you"},a.createElement("div",{style:{width:"100%"}},a.createElement("img",{src:s,style:{maxHeight:162,objectFit:"cover"}}),e&&a.createElement("h1",{className:`le-thankyou-title le-text-align-${t}`},e),l&&a.createElement("p",{className:`le-thankyou-subtitle le-text-align-${n}`},l),r&&a.createElement("div",null,a.createElement("a",{href:o,target:i?"_blank":"parrent",rel:"noreferrer"},a.createElement("button",{className:`lead-modal__btn ${$}`},r)))));const K=new class{constructor(){this.apiLeadUrl="https://dev.leadgen.hellobacsi.com/",this.apiSubotUrl="https://staging-service-subot.hellohealthgroup.com/"}},G={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${K.apiLeadUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},Q={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${K.apiSubotUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},X=({bot_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),Q.call({url:"frontend/api/subot-campaign/check",method:"post",data:{bot_id:e,email:t,phone:l}})},Z=({campaign_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),G.call({url:"api/subot-campaign/check",method:"post",data:{campaign_id:e,email:t,phone:l}})},ee=({phone:e})=>G.call({url:"api/sms/otp",method:"post",data:{phone_number:e.replace("+","")}}),te=({phone:e,otp:t})=>G.call({url:"api/sms/verify",method:"post",data:{otp_code:t,phone_number:e.replace("+","")}}),ae={email:{},phone:{}},le=(e,a,l)=>t(void 0,void 0,void 0,(function*(){const n="email"in l?"email":"phone",o="email"in l?l.email:l.phone,i="email"in l?"validator.emailUsed":"validator.phoneUsed";if(ae[n][o]){if(ae[n][o].value)return i;if(!ae[n][o].value&&ae[n][o].expire>Date.now())return""}const r=yield((e,a,l)=>t(void 0,void 0,void 0,(function*(){const t="email"in l?"email":"phone",n="email"in l?l.email:l.phone,o="email"in l?"validator.emailUsed":"validator.phoneUsed",i=yield Z({campaign_id:[e],[t]:n});return"SubmitLeadWithBotId_ERR_001"===i._errorCode||"SubmitLeadWithBotId_ERR_002"===i._errorCode||a.length&&"CheckSuBotLeadTool_ERR_001"===(yield X({bot_id:a,[t]:n}))._errorCode?o:void 0})))(e,a,l);return ae[n][o]=r?{value:!0}:{value:!1,expire:Date.now()+6e4},r})),ne=({content:e,inlinePosition:t})=>{const a=n((()=>{if(!t)return null;const e=document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`),a=Array.from(e).reduce(((e,t)=>[...e,...Array.from(t.children)]),[]);if(null==a?void 0:a.length){const e=a.filter((e=>"P"===e.nodeName)),l=a.filter((e=>"H2"===e.nodeName));let n=null;switch(t){case"1th":n=e[0];break;case"2th":n=e[1];break;case"3th":n=e[2];break;case"4th":n=e[3];break;case"5th":n=e[4];break;case"6th":n=e[5];break;case"7th":n=e[6];break;case"8th":n=e[7];break;case"9th":n=e[8];break;case"10th":n=e[9];break;case"11th":n=e[10];break;case"12th":n=e[11];break;case"lastP":n=e[e.length-1];break;case"1thH2":n=l[0];break;case"2thH2":n=l[1];break;case"3thH2":n=l[2];break;case"4thH2":n=l[3];break;case"5thH2":n=l[4];break;case"6thH2":n=l[5];break;case"7thH2":n=l[6];break;case"8thH2":n=l[7];break;case"9thH2":n=l[8];break;case"10thH2":n=l[9];break;case"lastH2":n=l[l.length-1]}if(n){if(n.parentElement.querySelector(".inline-lead-wrapper"))return n.parentElement.querySelector(".inline-lead-wrapper");{const e=document.createElement("div");return e.classList.add("inline-lead-wrapper"),n.nextElementSibling?n.parentElement.insertBefore(e,n.nextElementSibling):n.parentElement.appendChild(e),e}}}}),[t]);return t&&a?c(e,a):null},oe=({content:e})=>{const t=n((()=>{const e=Array.from(document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar"));return e.forEach((e=>{if(e.querySelector(".sidebar-lead-modal-wrapper"))return;const t=document.createElement("div");t.classList.add("sidebar-lead-modal-wrapper"),e.prepend(t)})),e.map((e=>e.querySelector(".sidebar-lead-modal-wrapper")))}),[]);return a.createElement(a.Fragment,null,t.map((t=>c(e,h(t,"sidebar-lead-modal-wrapper")))))},[ie,re,se]=P(),de="undefined"==typeof window,ce={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},me=(e="",a="",l="",n=500)=>{const[o,s]=i([]),[d,c]=i(!1);return r((()=>{let i;return e?i=window.setTimeout((()=>t(void 0,void 0,void 0,(function*(){var n;if(e)try{c(!0);const o=yield((e="",a="",l="vi")=>t(void 0,void 0,void 0,(function*(){return new Promise(((t,n)=>{if(!e)return n("Need valid text input");if(de)return n("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:e},a?{componentRestrictions:{country:a}}:{}),{language:ce[l]}),t)}catch(e){n(e)}}))})))(e,a,l);s(!(n=o)||n.length<1?[]:n.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{c(!1)}else s([])}))),n):o.length&&s([]),()=>{window.clearTimeout(i)}}),[e,n,a]),{isLoading:d,predictions:o}},ue=["places"],pe=({name:e,placeholder:t,locale:l})=>{var s;const d=re(),[c,m]=i(""),[u,p]=i(""),{predictions:h}=me(c||"15 Lê","","tl-PH"===l?"en":null===(s=null==l?void 0:l.split("-"))||void 0===s?void 0:s[0]),[g,v]=i(null),[b,y]=i(!1),f=o(Math.random().toString(36).substring(7)),k=n((()=>{const e=h.map((e=>({value:e.description,label:e.description}))),t=e.find((e=>e.value===u));return!u||t?e:[{value:u,label:u}].concat(e)}),[h,u]);return r((()=>{var e,t,a;(null===(a=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.places)||void 0===a?void 0:a.AutocompleteService)?y(!0):import("@react-google-maps/api").then((e=>{v((()=>e.LoadScript)),setTimeout((()=>{y(!0)}),200)}))}),[]),b?a.createElement(a.Fragment,null,g&&a.createElement(g,{googleMapsApiKey:"AIzaSyB9QmhfEYcy2wj5X3Fl38aCD5UkET6n82M",libraries:ue,loadingElement:a.createElement(a.Fragment,null)}),a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":e,"data-control":"text"}),a.createElement(x,Object.assign({className:"lead-modal__form-control",label:t,placeholder:t,withAsterisk:!0,name:e,data:k,searchValue:c,onSearchChange:e=>{m(e)},filter:()=>!0,clearable:!0,searchable:!0,onChange:e=>p(e||""),icon:a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9.99999 9.79167C10.4028 9.79167 10.7467 9.64944 11.0317 9.365C11.3161 9.08 11.4583 8.73611 11.4583 8.33333C11.4583 7.93056 11.3161 7.58667 11.0317 7.30167C10.7467 7.01722 10.4028 6.875 9.99999 6.875C9.59721 6.875 9.25332 7.01722 8.96832 7.30167C8.68388 7.58667 8.54166 7.93056 8.54166 8.33333C8.54166 8.73611 8.68388 9.08 8.96832 9.365C9.25332 9.64944 9.59721 9.79167 9.99999 9.79167ZM9.99999 17.875C9.90277 17.875 9.80555 17.8611 9.70832 17.8333C9.6111 17.8056 9.52082 17.7569 9.43749 17.6875C7.46527 15.8958 5.98971 14.2361 5.01082 12.7083C4.03138 11.1806 3.54166 9.77778 3.54166 8.5C3.54166 6.48611 4.1911 4.87833 5.48999 3.67667C6.78832 2.47556 8.29166 1.875 9.99999 1.875C11.7083 1.875 13.2119 2.47556 14.5108 3.67667C15.8092 4.87833 16.4583 6.48611 16.4583 8.5C16.4583 9.77778 15.9689 11.1806 14.99 12.7083C14.0105 14.2361 12.5347 15.8958 10.5625 17.6875C10.4792 17.7569 10.3889 17.8056 10.2917 17.8333C10.1944 17.8611 10.0972 17.875 9.99999 17.875Z",fill:"#8C8C8C"})),autoComplete:"no-auto-complete-"+f.current,rightSection:a.createElement(a.Fragment,null)},d.getInputProps(e)))):a.createElement("div",{style:{height:73}})},he=({children:e,align:t})=>a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(t||"")} ${$}`},e),ge=({children:e,align:t})=>a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(t||"")} ${$}`},e),ve=({listBlockAdded:e,popupId:t,locale:l,onClose:n,onOtherSubmit:o})=>{const i=re();return a.createElement(a.Fragment,null,e.map(((e,r)=>{const{name:s="",data:d={}}=e||{},{placeholder:c,value:m,align:u,listQuestion:p,isSendMailChimp:h=!1,newtab:g,url:v}=d;switch(s){case"TitleBlock":return a.createElement(ge,{key:r,align:u},m);case"SubtitleBlock":return a.createElement(he,{key:r,align:u},m);case"TextBlock":return a.createElement(E,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"text",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"text",name:m},i.getInputProps(m)));case"NumberBlock":return a.createElement(w,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"number",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"number",name:m},i.getInputProps(m)));case"EmailBlock":return a.createElement(E,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"email",name:m},i.getInputProps(m)));case"PhoneOtpBlock":case"PhoneBlock":{const e=t+"-"+m+"-"+r;return a.createElement(E.Wrapper,Object.assign({size:"md",withAsterisk:!0,key:r,label:c,className:"lead-modal__form-control",labelProps:{htmlFor:e}},i.getInputProps(m)),a.createElement(T,{name:m,spellCheck:!1,type:"tel",placeholder:c,onChange:e=>{i.setFieldValue(m,e)},id:e,defaultCountry:l&&O[l]||"VN","data-control":"tel"}))}case"LocationBlock":return a.createElement(pe,{key:r,name:m,placeholder:c,locale:l});case"DateBlock":return a.createElement(S,Object.assign({withAsterisk:!0,key:r,type:"date",name:m,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"date"},i.getInputProps(m)));case"LinkButtonBlock":return a.createElement("div",{key:r},a.createElement("a",{target:g?"blank":"parrent",href:v,style:{textDecoration:"none"}},a.createElement(f,{type:"button",size:"md",className:`lead-modal__btn ${$}`,onClick:()=>{null==n||n(),null==o||o()}},m)));case"CheckboxBlock":return a.createElement(a.Fragment,null,h&&a.createElement("div",{style:{display:"none"},"data-name":m+"-mailchimp"}),a.createElement(N.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(N,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"checkbox"})))));case"RadioBlock":return a.createElement(a.Fragment,null,h&&a.createElement(E,{type:"hidden",name:m+"-mailchimp",value:h}),a.createElement(C.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(C,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"radio"})))));case"DropdownBlock":return a.createElement(a.Fragment,null,a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":m,"data-control":"dropdown"}),a.createElement(x,Object.assign({key:r,className:"lead-modal__form-control",label:c,withAsterisk:!0,name:m,data:p.map((e=>({value:e.value,label:e.placeholder})))},i.getInputProps(m))))}return null})))},be=({phone:e,onSuccess:l,autoSendWhenOpen:n})=>{const{t:s}=b(),[d,c]=i(""),[m,u]=i(!1),[p,h]=i(0),g=o(null),[v,k]=i(),[_,w]=i(""),C=o();r((()=>{t(void 0,void 0,void 0,(function*(){var t;if(!C.current){const e=yield import("react-phone-number-input");C.current=e.formatPhoneNumberIntl}w((null===(t=C.current)||void 0===t?void 0:t.call(C,e))||e)}))}),[e]);const N=()=>t(void 0,void 0,void 0,(function*(){var t;if(!e)return;const a=yield ee({phone:e}),n=null===(t=null==a?void 0:a._messages)||void 0===t?void 0:t[0];"Send sms successfully"===n?(h(60),setTimeout((()=>{g.current&&(g.current.focus(),g.current.scrollIntoView({block:"center"}))}),100)):"This phone number was verified"===n?l():k(n||"something Wrong")}));return r((()=>{setTimeout((()=>{p>0&&h((e=>e-1))}),1e3)}),[p]),r((()=>{n&&!p&&N()}),[]),a.createElement(a.Fragment,null,a.createElement("form",{onSubmit:a=>{a.preventDefault(),t(void 0,void 0,void 0,(function*(){if(!e||!d)return;const t=yield te({phone:e,otp:d}),a=null==t?void 0:t._messages[0];"Verify successfully"===a||"This phone number was verified"===a?l():k(a||"something Wrong")}))},className:"lead-phone-otp-form"},a.createElement(y,{tag:"h3",fontWeight:"bold",style:{marginBottom:4}},s("lead.otp.title")),a.createElement(j,{size:"p1",color:B.colors.gray600},s("lead.otp.desc",{phone:_})),a.createElement(E,{ref:g,name:"_"+name+"-otp",spellCheck:!1,type:"number",placeholder:"Enter OTP",className:"lead-modal__form-control",label:"Phone OTP","data-control":"otp",withAsterisk:!0,pattern:"[0-9]*",value:d,onChange:e=>{u(!0),c(e),k(m&&!e?"OTP is required":void 0)},error:m?v:void 0}),a.createElement(f,{size:"md",color:"primary",className:`lead-modal__btn ${$}`,disabled:!d},s("lead.otp.verify")),a.createElement(f,{type:"button",size:"md",color:"transparent",className:`lead-modal__btn lead-phone-otp-button ${$}`,onClick:()=>{N()},disabled:!!p},s("lead.otp.resend",{timer:p?` (${p}s)`:""}))))},ye=({popupId:e,extraFields:t,onClose:l,onOtherSubmit:s,imageMobile:d,imageDesktop:c,imageOverlayMobile:m,imageOverlayDesktop:u,imageBackground:p,currentLayout:h,title:g,onSubmit:v,showThankyou:y,campaignId:_,campaign_subot_id:E,locale:w})=>{var C,N,S;const T=JSON.parse(t.listBlockAdded),x=JSON.parse(t.actionBlocks),O=JSON.parse(t.textBlocks),P=x.submitBlock.data.url,j=x.submitBlock.data.text,B=x.submitBlock.data.text2,L=x.submitBlock.data.value,I=location.pathname,A=h.includes("Inline")||"Sidebar"===h,U="Slider"===h,[D,H]=i(!0),[R,F]=i(""),W=o(),V=()=>{R?F(""):null==l||l()};if(window.innerWidth<769&&["Fullscreen","Slider"].includes(h))return console.log("😎 Not show fullscreen, slider on mobile "),null;r((()=>{(h.includes("LightBox")||"Fullscreen"==h)&&document.body.classList.add("noscroll"),window.intlTelInputUtils||require("intl-tel-input/build/js/utils"),ae.email={},ae.phone={}}),[]);const Y=o(!1),J=o(!1),{form:K,validateObj:G}=(({listBlockAdded:e=[],validatingPhoneRef:t,validatingEmailRef:a,campaignId:l,campaign_subot_id:i=[]})=>{const{t:r}=b(),s=n((()=>{const n=["TextBlock","NumberBlock","EmailBlock","PhoneBlock","DateBlock","CheckboxBlock","RadioBlock","DropdownBlock","PhoneOtpBlock","LocationBlock"],o=(e,t)=>a=>{if(c.current.isTouched(e))return void 0===a||""===a||Array.isArray(a)&&0===a.length?r("validator.required"):null==t?void 0:t(a)};return e.filter((e=>n.includes(e.name))).reduce(((e,n)=>"NumberBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(isNaN(Number(e)))return r("validator.number")}))}):"EmailBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return r("validator.email");a.current=!0,setTimeout((()=>{c.current.setFieldError(n.data.value,"Validating..."),le(l,i,{email:e}).then((e=>{e?c.current.setFieldError(n.data.value,r(e)):c.current.clearFieldError(n.data.value),a.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(n.data.value,e.message||"Something went wrong"),a.current=!1}))}),200)}))}):"PhoneBlock"===n.name||"PhoneOtpBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(String(e),M.countryCode))return r("validator.phone");t.current=!0,setTimeout((()=>{c.current.setFieldError(n.data.value,"Validating..."),le(l,i,{phone:e}).then((e=>{e?c.current.setFieldError(n.data.value,r(e)):c.current.clearFieldError(n.data.value),t.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(n.data.value,e.message||"Something went wrong"),t.current=!1}))}),200)}))}):"DateBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(isNaN(Date.parse(e)))return r("validator.date")}))}):Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value)})),{})}),[e.map((e=>e.name)).join(",")]),d=se({validateInputOnChange:!0,clearInputErrorOnChange:!0,validate:s}),c=o(d);return c.current=d,{form:d,validateObj:s}})({listBlockAdded:T,validatingPhoneRef:Y,validatingEmailRef:J,campaignId:_,campaign_subot_id:E}),Q=a.createElement(a.Fragment,null,a.createElement("style",{dangerouslySetInnerHTML:{__html:`\n .le-newbuilder-overlay {\n background-repeat: no-repeat;\n background-size: cover;\n }\n ${m?`\n .le-newbuilder-overlay {\n background: url(${m}) ;\n }`:""}\n ${u?`\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(${u}) ;\n }\n }`:""}`}}),a.createElement("div",{id:e,"data-popup-url":I,"data-popup-type":"lightbox-inline",className:`lead-modal lead-modal-wrapper modal--animate-scale ${A?"le-buider-inline":""} ${U?"le-buider-slider":""}`},"Fullscreen"==h?a.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:p||""}):null,a.createElement("div",{className:`lead-modal__wrapper le-newbuilder-wrap-${h}`},a.createElement("div",{className:`lead-modal__content le-newbuilder-${h}`},y?a.createElement(z,{title:y.title,titleAlign:y.titleAlign,subtitle:y.subtitle,subtitleAlign:y.subtitleAlign,link:y.link,linkNewTab:y.linkNewTab,linkText:y.linkText,image:y.image}):a.createElement(a.Fragment,null,a.createElement("header",{className:"lead-modal__header"},R?a.createElement("img",{src:k.getAssetPath("lead-otp-thumb.png"),draggable:"false",alt:"",style:{width:"100%"}}):a.createElement(a.Fragment,null,["LightBoxA","InlineA","Sidebar","Slider"].includes(h)?d?a.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:d,alt:""}):null:a.createElement(a.Fragment,null,c?a.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{height:"100%",objectFit:"cover"},src:c,alt:""}):null,d?a.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:d,alt:""}):null))),R&&a.createElement(be,{phone:R,autoSendWhenOpen:!0,onSuccess:()=>{null==v||v(W.current,K.values)}}),a.createElement("div",{"data-hidden":!!R,className:"lead-modal__body le-newbuilder-overlay"},a.createElement(ie,{form:K},a.createElement("form",{ref:W,className:`lead-modal__form ${e}`,onSubmit:e=>{e.preventDefault(),K.setTouched(Object.keys(G).reduce(((e,t)=>(e[t]=!0,e)),{})),J.current||Y.current||setTimeout((()=>{K.onSubmit((e=>{var t,a,l;if(!Object.keys(K.errors).length){if(T.findIndex((e=>"PhoneOtpBlock"===e.name))>-1){const n=null===(a=null===(t=T.find((e=>"PhoneOtpBlock"===e.name)))||void 0===t?void 0:t.data)||void 0===a?void 0:a.value;if(null===(l=e[n])||void 0===l?void 0:l.startsWith("+84"))return void F(e[n])}null==v||v(W.current,e)}}))(e)}),100)}},a.createElement("div",{style:{marginBottom:20}},a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(null===(C=O.titleBlock.data)||void 0===C?void 0:C.align)} ${$}`},g),a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(null===(N=O.titleBlock.data)||void 0===N?void 0:N.align)} ${$}`},O.subtitleBlock.data.value)),a.createElement("div",{className:"lead-modal__form-control-wrapper"},a.createElement(ve,{listBlockAdded:T,popupId:e,locale:w,onClose:V,onOtherSubmit:s})),(null===(S=null==x?void 0:x.submitBlock)||void 0===S?void 0:S.isHide)?null:a.createElement(a.Fragment,null,a.createElement("div",{className:`lead-modal__checkbox-wrapper ${$}`},a.createElement("div",{className:"lead-modal__checkbox"},a.createElement("input",{id:"lead-term-checkbox",className:`lead-modal__checkbox__input ${$}`,type:"checkbox","aria-label":"Checkbox label",checked:D,onChange:e=>H(e.currentTarget.checked)}),a.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),a.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},j," ",a.createElement("span",{style:{fontWeight:"bold"}},a.createElement("a",{target:"blank",href:P||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},B)))),a.createElement(f,{size:"md",id:"lead-submit",type:"submit",className:`lead-modal__btn ${$}`,disabled:!D},L))))))),!h.includes("Inline")&&a.createElement(q,{onClose:V,containerClassName:"close-button-top-right"}))));return h.includes("LightBox")||"Fullscreen"==h||"Slider"==h?Q:"Sidebar"==h?a.createElement(oe,{content:Q}):h.includes("Inline")?a.createElement(ne,{content:Q,inlinePosition:t.popupInlinePosition}):null},fe=({popupId:e,link:t,linkText:l,linkNewTab:n,onClose:o,imageMobile:i,imageDesktop:r,currentLayout:s,onOtherSubmit:d})=>{const c=location.pathname;return a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":c,"data-popup-type":"skin_ab"},"SkinA"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-skin-a-desktop"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:r}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn js-popup-other-submit"},l)),a.createElement(q,{onClose:o,containerClassName:"close-button-top-right"})))):"SkinB"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:""},a.createElement("div",{style:{position:"relative",zIndex:1e4}},a.createElement("img",{src:r,style:{width:"100%"}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(q,{containerClassName:"close-button-top-right",onClose:o})))):null,a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-skin-mobile"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:i,style:{width:"100%"}}),a.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(q,{containerClassName:"close-button-top-right",svgClassName:"le-mobile-btn",onClose:o})))))},ke=({popupId:e,url:t,newTab:l,image:n,onClose:o,onOtherSubmit:i})=>a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},a.createElement("div",{className:"le-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{href:t,target:l?"blank":"_parent",onClick:i},a.createElement("img",{className:"js-popup-other-submit",src:n})),a.createElement(q,{onClose:o,containerClassName:"close-button-top-right"})))),_e=[],Ee=[],we=[];const Ce=e=>{const t=[...e];for(let e=t.length-1;e>0;e--){const a=Math.floor(Math.random()*(e+1)),l=t[e];t[e]=t[a],t[a]=l}return t},Ne=(e="UTC")=>{const t=new Date;return new Date(t.toLocaleString("en-US",{timeZone:e}))},Se=e=>{try{const[t,a]=e.split(" "),[l,n,o]=t.split("-").map(Number),[i,r,s]=a.split(":").map(Number);return new Date(l,n-1,o,i,r,s)}catch(e){return null}};const Te=e=>1===e.formatted_status?function(e){var t;if(1===e.forever)return!0;const a=e.started_at,l=e.ended_at,n=Se(a),o=Se(l);if(!n||!o)return!0;const i=(null===(t=e.site)||void 0===t?void 0:t.id)||1,r=H[i];return!(Ne(r).getTime()>o.getTime()&&(we.push(e),1))}(e):0===e.formatted_status&&(_e.push(e),(e=>{var t;const a=(null===(t=e.site)||void 0===t?void 0:t.id)||1,l=e.started_at,n=e.ended_at,o=Se(l),i=Se(n);if(!o||!i)return!1;const r=H[a],s=Ne(r).getTime();return s<=i.getTime()&&s>=o.getTime()&&(Ee.push(e),!0)})(e));let xe=null;function Oe({leadApi:e,leadSiteId:t,leadDomain:a,onShowPopup:l,DEBUG_URL:n}){const o=n||("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(e+"api/campaign/"+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:o,ga_client_id:u("_ga")||null})}).then((e=>e.json())).then((e=>{var t,n,i,r,s;if(Pe("List campagin: ",e),U="https://"+location.hostname+location.pathname+location.search,1==e._status){const d=(null===(n=null===(t=e._data)||void 0===t?void 0:t.campaigns)||void 0===n?void 0:n.filter(Te))||[];u("hhg-id")||(p("hhg-id",v(),{domain:"."+a,path:"/"}),Pe("😍 Set HHG ID cookie"));let c=[];c=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?d.filter((e=>e.device_types.some((e=>e.id==A.MOBILE)))):d.filter((e=>e.device_types.some((e=>e.id==A.DESKTOP)))),Pe("👓 campaignsDevice",c),Pe("--listCampaignScheduled",_e),Pe("--listCampaignScheduledToActivated",Ee),Pe("--listCampaignActiveButExpired",we);let m=c.map(((e,t)=>e.targets.filter((e=>e.type==L.LINKS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1);m=m.filter((e=>{const t=new URL(String(e.target).toLowerCase());if("exact_match"==e.option)return Boolean(o===t.href);if("start_with"==e.option){if(o.includes(String(e.target))){return!e.sub_target.filter((e=>"excluding"==e.option)).map((e=>e.value)).includes(o.split("?")[0])}return!1}}));const h=Array.from(document.getElementsByTagName("META")).filter((e=>"article:tag"==e.getAttribute("property"))).map((e=>e.content));let g=[],b=[];h&&h.length&&(g=c.map(((e,t)=>e.targets.filter((e=>e.type==L.TAGS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1),b=g.filter((e=>h.includes(e.target))));const y=[...m,...b],f=document.cookie.split("; ").map((e=>e.split("=")[0])),k=f.filter((e=>e.includes("lead_submited")));Pe("--listCampaignCodeSubmited",k);const _=f.filter((e=>e.includes("lead_closed")));Pe("--listCampaignCodeClosed",_);const E=[...k,..._],w=y.filter((e=>!E.some((t=>t.includes(c[e.campaignIndex].code))))),C=Ce(w);if(Pe("--listCampaignValid : ",C),C&&C.length){const e=c[C[0].campaignIndex];Pe("CAMPAIGN_SHOW",e);const{rules:t}=e,a=Number(null===(i=t.find((e=>"time"==e.rule)))||void 0===i?void 0:i.value);Pe("timeoutRule",a);const n=Number(null===(r=t.find((e=>"scroll"==e.rule)))||void 0===r?void 0:r.value);Pe("scrollRule",n);const o=Number(null===(s=t.find((e=>"exclude_sponsored"==e.rule)))||void 0===s?void 0:s.value);Pe("excludeSponsored",o);const d=Boolean(document.querySelector(".hhg-disclaimer-text"));if(Pe("💎 LEAD current page isSponsored",d),d&&o)return;let m="TIME";if(Number.isInteger(a)&&(m="TIME",Pe("✨ SHOW AWESOME POPUP AFTER: ",a," seconds"),xe&&clearTimeout(xe),xe=setTimeout((()=>{null==l||l(e,m)}),1e3*a)),Number.isInteger(n)){m="SCROLL",Pe("✨ SHOW AWESOME AFTER: SCROLL",n," %");const t=document.querySelector(`[data-url="${location.pathname}"]`)||document.querySelector("body"),a=t.getBoundingClientRect().top,o=t.offsetHeight;Pe("👓 Element check scroll: ",t);const i=function(){const t=window.pageYOffset||document.documentElement.scrollTop;let r=0;t>=a&&(r=Math.round((t-a)/(o-innerHeight)*100)),Pe("---Scroll",r,n),r>=n&&(window.removeEventListener("scroll",i),null==l||l(e,m))};window.addEventListener("scroll",i,{passive:!0})}}else Pe("🚧 No lead campaigns on current URL, tags")}})).catch((e=>{Pe("Lead error: ",e)}))}const Pe=(...e)=>{("production"!==process.env.NODE_ENV||process.env.NEXT_PUBLIC_DEPLOY_ENV&&"production"!==process.env.NEXT_PUBLIC_DEPLOY_ENV||"undefined"!=typeof localStorage&&"true"===localStorage.getItem("hhg_debug"))&&console.log(...e)};const je=({campaign:e,action:t,onSubmit:l,onClose:n,showThankyou:i,locale:d})=>{var c,m;b();const{apiUrl:h,siteDomain:g}=s(V);r((()=>{const e=u("_ga")||null;fetch(`${h}api/campaign/${_}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),ga_client_id:e})})}),[]);const{extra_fields:y,image:f,image_desktop:k,code:_,image_background:E,image_overlay_mobile:w,image_overlay_desktop:C}=e,{currentLayout:N}=y,S=y.imageBlocks?JSON.parse(y.imageBlocks):{},T=JSON.parse(y.actionBlocks),x=JSON.parse(y.textBlocks);let O=(null===(m=null===(c=null==x?void 0:x.titleBlock)||void 0===c?void 0:c.data)||void 0===m?void 0:m.value)||"";const P={1:{},2:{},3:{}},j=o("lead-modal-"+v()),B=function(e="Xin chao {{category_2}} extra"){if(e.includes("{{category_")){const t="{{category_".length,a=e.search("{{category_");return+e.charAt(t+a)}return null}(O);if(B){Pe("⚡️ Has categoryLevel",B);const e=Array.from(document.getElementsByTagName("META")),t=e.find((e=>e.name===`content_category_${B}`)),a=e.find((e=>e.name===`content_category_en_${B}`));if(!t||!a)return Pe("⚡️ No META TAG for categoryLevel, not show popup",B),null;P[B]={value:t.content,value_en:a.content},O=O.replace(`{{category_${B}}}`,t.content),Pe("⚡️ Set categoryData ",B)}else Pe("⚡️ No categoryLevel",B);const L=()=>{var t,a,l,o;if(Pe("👌 Other submit click"),document.body.classList.remove("noscroll"),N.includes("Skin")){const e=document.querySelector("#masthead");e&&(e.style.top="0px !important;")}const i=Number(null!==(a=null===(t=e.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value)&&void 0!==a?a:7),r=Number(null!==(o=null===(l=e.rules.find((e=>"show_again_after_submit"==e.rule)))||void 0===l?void 0:l.value)&&void 0!==o?o:0);0===r&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${_}`,`target_${y.popupVersion}`,{domain:"."+g,path:"/"})),1==r&&(Pe(`⌛ Popup will show again after ${i} days!`),p(`lead_submited_${_}`,`target_${y.popupVersion}`,{domain:"."+g,days:i,path:"/"}));const s=u("_ga")||null,d={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:u("hhg-id"),ga_client_id:s};B&&(d.category=P[B].value_en),fetch(`${h}api/campaign/${_}/lead`,{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then((e=>{"error"===e.status&&Pe(e)})).catch((e=>{Pe("Error:",e)})),null==n||n()};return"CenterTab"===N?a.createElement(Y,{popupId:j.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,imageMobile:f,imageDestkop:k,onClose:n,onOtherSubmit:L}):"Tab"===N?a.createElement(ke,{popupId:j.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,image:f,onClose:n,onOtherSubmit:L}):"Floating"===N?a.createElement(J,{popupId:j.current,title:O,titleAlign:x.titleBlock.data.align,subtitle:x.subtitleBlock.data.value,subtitleAlign:x.subtitleBlock.data.align,url:T.linkButtonBlock.data.url,urlText:T.linkButtonBlock.data.value,newTab:T.linkButtonBlock.data.newtab,imageMobile:f,imageDesktop:k,onClose:n,onOtherSubmit:L}):N.includes("LightBox")||N.includes("Inline")||"Fullscreen"==N||"Sidebar"==N||"Slider"==N?a.createElement(ye,{popupId:j.current,extraFields:y,onClose:n,onOtherSubmit:L,imageMobile:f,imageDesktop:k,imageBackground:E,currentLayout:N,title:O,onSubmit:(e,t)=>l(e,t,B,P),key:N,imageOverlayDesktop:C,imageOverlayMobile:w,showThankyou:i,campaignId:e.id,campaign_subot_id:e.bot_id||[],locale:d}):N.includes("Skin")?a.createElement(fe,{popupId:j.current,link:T.linkButtonBlock.data.url,linkNewTab:!!T.linkButtonBlock.data.newtab,linkText:T.linkButtonBlock.data.value,onClose:n,onOtherSubmit:L,imageMobile:f,imageDesktop:k,currentLayout:N}):null},Be=({apiUrl:e,siteDomain:l,siteId:s,locale:h,apiSubotUrl:v,DEBUG_URL:b})=>{var y;const f=o(),k=o(Date.now()),{apiUrl:E}=n((()=>{let t=e;return t.includes("localhost")&&(t="https://dev.leadgen.hellobacsi.com/"),{apiUrl:t}}),[e,l,s]),[w,C]=i(null),[N,S]=i(""),[T,x]=i(null);r((()=>{K.apiLeadUrl=E,K.apiSubotUrl=v}),[E,v]);const O=(e,t)=>{C(e),S(t)},P=()=>{var e,t;if(!w)return;Pe(`👋👋👋 CLOSE POPUP ${w.code} 👋👋👋`);const a=Number(null===(e=w.rules.find((e=>"show_again_after_exit"==e.rule)))||void 0===e?void 0:e.value),n=Number(null===(t=w.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value);0==a&&p(`lead_closed_${w.code}`,`target_${w.extra_fields.popupVersion}`,n?{domain:"."+l,days:n,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch(`${E}api/campaign/${w.code}/popup_exit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),duration:Math.ceil((Date.now()-k.current)/1e3)})}),C(null),x(null)};r((()=>{if(window.next){const e=d((e=>{Pe("--🌻 routeChangeComplete",e,Date.now());const t=location.pathname;P(),document.querySelectorAll(`[data-popup-url="${t}"]`).length?Pe("🔥 This URL page has show popup!"):(Pe("--Process checkShowPopup"),Oe({leadApi:E,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})),f.current&&window.removeEventListener("scroll",f.current)}),500);window.next.router.events.on("routeChangeComplete",e)}Oe({leadApi:E,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})}),[]);return r((()=>{w&&(k.current=Date.now())}),[w]),a.createElement(V.Provider,{value:{apiUrl:E,siteDomain:l,siteId:s,locale:h}},a.createElement(m.Provider,{value:{locale:h,values:W(h)}},c(a.createElement(a.Fragment,null,"2.1"===(null===(y=null==w?void 0:w.extra_fields)||void 0===y?void 0:y.popupVersion)&&a.createElement(je,{campaign:w,action:N,onSubmit:(e,a,n,o)=>t(void 0,void 0,void 0,(function*(){var t,i,r,s,d,c,m,h,g,v,b;if(!a)return;Pe("submitHandler",n,o);const y=Object.keys(a).map((e=>({name:e,value:String(a[e])}))),f=u("_ga")||null;window.intlTelInputUtils||(yield require("intl-tel-input/build/js/utils"));const k={url:location.href.toLowerCase(),title_article:document.title,meta:y.map((t=>{var a,l;const n=(null===(a=e.querySelector(`*[name="${t.name}"]`))||void 0===a?void 0:a.getAttribute("data-control"))||(null===(l=e.querySelector(`*[data-extra][data-name="${t.name}"]`))||void 0===l?void 0:l.getAttribute("data-control"))||"text",o="tel"===n?window.intlTelInputUtils.formatNumber(String(t.value),null==M?void 0:M.countryCodeNumber,2).replace(/\s+/g,""):"date"===n?_(t.value).format("YYYY-MM-DD"):t.value;return{key:t.name,value:o,control:n,is_sent_mailchimp:e.querySelector(`div[data-name="${t.name}-mailchimp"]`)?"true":"false"}})),cookie_id:u("hhg-id"),ga_client_id:f};n&&o[n].value_en&&(k.category=o[n].value_en);const C=Number((null===(i=null===(t=w.rules)||void 0===t?void 0:t.find((e=>"days_to_show_again"===e.rule)))||void 0===i?void 0:i.value)||7),N=Number((null===(s=null===(r=w.rules)||void 0===r?void 0:r.find((e=>"show_again_after_submit"===e.rule)))||void 0===s?void 0:s.value)||0);if(0==N&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${w.code}`,`target_${w.extra_fields.targetType}`,{domain:"."+l,path:"/"})),1==N&&(Pe(`⌛ Popup will show again after ${C} days!`),p(`lead_submited_${w.code}`,`target_${w.extra_fields.targetType}`,{domain:"."+l,days:C,path:"/"})),fetch(`${E}api/campaign/${w.code}/lead`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),"notshow"==w.extra_fields.popupShowThankYou)return P(),void document.body.classList.remove("noscroll");let S=!0;const T=w.thank_you_image||`${E}admin/img/thanksyou.png`;let O,j,B=w.extra_fields.popupThankyouTitle||"Thank you.",L=w.extra_fields.popupThankyouDesc||"We appreciate your time!",I="",A="",$="";if("2.1"==w.extra_fields.popupVersion){const e=w.extra_fields,t=JSON.parse(e.listBlockThankyou),a=t.find((e=>"TitleBlock"==e.name)),l=t.find((e=>"SubtitleBlock"==e.name)),n=t.find((e=>"LinkButtonBlock"==e.name));B=(null===(d=null==a?void 0:a.data)||void 0===d?void 0:d.value)||"",I=(null===(c=null==a?void 0:a.data)||void 0===c?void 0:c.align)||"",L=(null===(m=null==l?void 0:l.data)||void 0===m?void 0:m.value)||"",A=(null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.align)||"",O=(null===(g=null==n?void 0:n.data)||void 0===g?void 0:g.value)||"",j=(null===(v=null==n?void 0:n.data)||void 0===v?void 0:v.newtab)||!1,$=(null===(b=null==n?void 0:n.data)||void 0===b?void 0:b.url)||"";const o=w.extra_fields.currentLayout;["SkinA","SkinB","Floating","Tab","CenterTab"].includes(o)&&(S=!1)}x(S?{title:B,titleAlign:I,subtitle:L,subtitleAlign:A,link:$,linkNewTab:j,linkText:O,image:T}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},y.map((e=>{const t=e.name,a=e.value;"tel"==t?window.insider_object.user.phone_number=a:"email"==t&&(window.insider_object.user.email=a)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object))})),onClose:P,showThankyou:T,locale:h})),g())))};export{Be as LeadGen};
1
+ import{_ as e,a as t}from"./tslib.es6-b1c5b9b7.js";import a,{createContext as l,useMemo as n,useRef as o,useState as i,useEffect as r,useContext as s}from"react";import d from"lodash/debounce";import{createPortal as c}from"react-dom";import{T as m}from"./translationsContext-4ed0d296.js";import{g as u,s as p}from"./cookieHelper-b1c13586.js";import{b as h,a as g}from"./utils-f6d61056.js";import{v1 as v}from"uuid";import{u as b}from"./useTranslations-34154db8.js";import{H as y}from"./index.styled-8029aeaf.js";import{B as f}from"./index-b5d8241a.js";import{CommonGAssets as k}from"./gAssets.js";import"./index.styled-437068ae.js";import"./index-5392909e.js";import"@mantine/core";import"./index.styled-200bbdd6.js";import"string-format";import"./index-87cc9b76.js";import"./index.styled-d89c8b2b.js";import"date-fns";import"react-day-picker/DayPickerInput";import"./index.styled-9c86dbd3.js";import"./index-3459c602.js";import"lodash/throttle";import"keen-slider/react";import"./index-06ba77a5.js";import _ from"dayjs";import"@mantine/hooks";import{I as E,N as w}from"./index-91cd07c6.js";import"react-hook-form";import"./isProduction-142cc526.js";import"./Locale-d143219c.js";import"./screenSizeContext-40c726af.js";import"styled-components";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-2896b218.js";import"@mantine/dates";import{R as C,j as N,D as S,e as T}from"./index-5ad7df44.js";import{S as x}from"./index-ba12eba6.js";import{M as O}from"./index-03968b09.js";import{createFormContext as P}from"@mantine/form";import"./index-81352e3c.js";import"yup";import{T as j}from"./index-d5660016.js";import{t as B}from"./theme-09a3980d.js";import"./index-91131e37.js";import"./index-9099c391.js";import"@hookform/resolvers/yup";import"./index-0f3c172b.js";import"./index-0d74f5c2.js";import"slugify";import"./routing-91938e59.js";import"dayjs/plugin/relativeTime";import"./useScrollbarSize-02e13656.js";import"./useUniqueId-7840efb0.js";import"@mantine/carousel";import"./Visible-8820bebe.js";const L={LINKS:1,TAGS:2};let I="https://dev.leadgen.hellobacsi.com/";const A={MOBILE:1,DESKTOP:2};let $="";I.includes("localhost")&&(I="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&($="pink");let U="https://"+location.hostname+location.pathname+location.search;U=U.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));const D={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},M=D[document.documentElement.lang]||D["vi-VN"];const H={1:"Asia/Ho_Chi_Minh",10:"Asia/Ho_Chi_Minh",11:"Asia/Ho_Chi_Minh",12:"Asia/Ho_Chi_Minh",2:"Asia/Jakarta",3:"Asia/Bangkok",4:"Asia/Phnom_Penh",5:"Asia/Kuala_Lumpur",6:"Asia/Taipei",7:"Asia/Yangon",8:"Asia/Kolkata",9:"Asia/Manila"};var R={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"};const F={"en-PH":R,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại","validator.emailUsed":"Email này đã được sử dụng cho chiến dịch.","validator.phoneUsed":"Số điện thoại này đã được sử dụng cho chiến dịch.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"km-KH":{"validator.required":"ព័ត៌មាន​ចាំបាច់​ដែល​ត្រូវ​បំពេញ","validator.email":"សូម​វាយ​អាសយដ្ឋាន​អ៊ីម៉ែល​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.number":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.digits":"វាយ​បញ្ចូល​បាន​តែ​លេខ​ប៉ុណ្ណោះ","validator.maxlength":"សូម​វាយ​បញ្ចូលកុំ​ឲ្យ​លើស {0} តួអក្សរ","validator.minlength":"សូម​វាយ​បញ្ចូល​តិច​បំផុត {0} តួអក្ស","validator.phone":"សូម​វាយបញ្ចូល​លេខ​ឲ្យ​បាន​ត្រឹមត្រូវ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"tl-PH":R},W=e=>{const t=F[e];return t||F["en-PH"]},V=l({}),q=({onClose:e,containerClassName:t,svgClassName:l})=>a.createElement("button",{onClick:e,className:`le-newbuilder-close-button js-modal__close ${t||""}`},a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:l},a.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"white"}),a.createElement("path",{d:"M16 17.05L10.925 22.125C10.7917 22.2584 10.621 22.329 10.413 22.337C10.2044 22.3457 10.025 22.275 9.87502 22.125C9.72502 21.975 9.65002 21.8 9.65002 21.6C9.65002 21.4 9.72502 21.225 9.87502 21.075L14.95 16L9.87502 10.925C9.74169 10.7917 9.67102 10.6207 9.66302 10.412C9.65436 10.204 9.72502 10.025 9.87502 9.87502C10.025 9.72502 10.2 9.65002 10.4 9.65002C10.6 9.65002 10.775 9.72502 10.925 9.87502L16 14.95L21.075 9.87502C21.2084 9.74169 21.3794 9.67069 21.588 9.66202C21.796 9.65402 21.975 9.72502 22.125 9.87502C22.275 10.025 22.35 10.2 22.35 10.4C22.35 10.6 22.275 10.775 22.125 10.925L17.05 16L22.125 21.075C22.2584 21.2084 22.329 21.379 22.337 21.587C22.3457 21.7957 22.275 21.975 22.125 22.125C21.975 22.275 21.8 22.35 21.6 22.35C21.4 22.35 21.225 22.275 21.075 22.125L16 17.05Z",fill:"#595959"}))),Y=({popupId:e,url:t,newTab:l,imageDestkop:n,imageMobile:o,onClose:i,onOtherSubmit:r})=>a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},a.createElement("div",{className:"le-center-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{className:"js-popup-other-submit",href:t,target:l?"blank":"_parent",onClick:r},a.createElement("img",{className:"le-only-mobile",src:o}),a.createElement("img",{className:"le-only-desktop",src:n})),a.createElement(q,{onClose:i,containerClassName:"close-button-top-right"})))),J=({popupId:e,url:t,title:l,urlText:n,titleAlign:o,subtitle:i,subtitleAlign:r,newTab:s,imageDesktop:d,imageMobile:c,onClose:m,onOtherSubmit:u})=>a.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-floating-desktop"},a.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},d?a.createElement("div",null,a.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5},src:d})):null,a.createElement("div",{style:{padding:20}},a.createElement("div",{className:`le-floating-desktop-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-desktop-desc le-text-align-${r}`},i)),a.createElement("a",{target:s?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n)),a.createElement(q,{onClose:m,containerClassName:"close-button-top-right"})))),a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-floating-mobile"},a.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},a.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},a.createElement("div",null,a.createElement("div",{className:`le-floating-mobile-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-mobile-desc le-text-align-${r}`},i)),c?a.createElement("div",null,a.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100},src:c})):null),a.createElement("div",{style:{textAlign:"center",marginTop:10}},a.createElement("a",{target:s?"blank":"_parent",href:t,style:{textDecoration:"none"}},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n))),a.createElement(q,{onClose:m,containerClassName:"close-button-top-right"}))))),z=({title:e,titleAlign:t,subtitle:l,subtitleAlign:n,link:o,linkNewTab:i,linkText:r,image:s})=>a.createElement("div",{className:"lead-modal__thank-you"},a.createElement("div",{style:{width:"100%"}},a.createElement("img",{src:s,style:{maxHeight:162,objectFit:"cover"}}),e&&a.createElement("h1",{className:`le-thankyou-title le-text-align-${t}`},e),l&&a.createElement("p",{className:`le-thankyou-subtitle le-text-align-${n}`},l),r&&a.createElement("div",null,a.createElement("a",{href:o,target:i?"_blank":"parrent",rel:"noreferrer"},a.createElement("button",{className:`lead-modal__btn ${$}`},r)))));const K=new class{constructor(){this.apiLeadUrl="https://dev.leadgen.hellobacsi.com/",this.apiSubotUrl="https://staging-service-subot.hellohealthgroup.com/"}},G={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${K.apiLeadUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},Q={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${K.apiSubotUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},X=({bot_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),Q.call({url:"frontend/api/subot-campaign/check",method:"post",data:{bot_id:e,email:t,phone:l}})},Z=({campaign_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),G.call({url:"api/subot-campaign/check",method:"post",data:{campaign_id:e,email:t,phone:l}})},ee=({phone:e})=>G.call({url:"api/sms/otp",method:"post",data:{phone_number:e.replace("+","")}}),te=({phone:e,otp:t})=>G.call({url:"api/sms/verify",method:"post",data:{otp_code:t,phone_number:e.replace("+","")}}),ae={email:{},phone:{}},le=(e,a,l)=>t(void 0,void 0,void 0,(function*(){const n="email"in l?"email":"phone",o="email"in l?l.email:l.phone,i="email"in l?"validator.emailUsed":"validator.phoneUsed";if(ae[n][o]){if(ae[n][o].value)return i;if(!ae[n][o].value&&ae[n][o].expire>Date.now())return""}const r=yield((e,a,l)=>t(void 0,void 0,void 0,(function*(){const t="email"in l?"email":"phone",n="email"in l?l.email:l.phone,o="email"in l?"validator.emailUsed":"validator.phoneUsed",i=yield Z({campaign_id:[e],[t]:n});return"SubmitLeadWithBotId_ERR_001"===i._errorCode||"SubmitLeadWithBotId_ERR_002"===i._errorCode||a.length&&"CheckSuBotLeadTool_ERR_001"===(yield X({bot_id:a,[t]:n}))._errorCode?o:void 0})))(e,a,l);return ae[n][o]=r?{value:!0}:{value:!1,expire:Date.now()+6e4},r})),ne=({content:e,inlinePosition:t})=>{const a=n((()=>{if(!t)return null;const e=document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`),a=Array.from(e).reduce(((e,t)=>[...e,...Array.from(t.children)]),[]);if(null==a?void 0:a.length){const e=a.filter((e=>"P"===e.nodeName)),l=a.filter((e=>"H2"===e.nodeName));let n=null;switch(t){case"1th":n=e[0];break;case"2th":n=e[1];break;case"3th":n=e[2];break;case"4th":n=e[3];break;case"5th":n=e[4];break;case"6th":n=e[5];break;case"7th":n=e[6];break;case"8th":n=e[7];break;case"9th":n=e[8];break;case"10th":n=e[9];break;case"11th":n=e[10];break;case"12th":n=e[11];break;case"lastP":n=e[e.length-1];break;case"1thH2":n=l[0];break;case"2thH2":n=l[1];break;case"3thH2":n=l[2];break;case"4thH2":n=l[3];break;case"5thH2":n=l[4];break;case"6thH2":n=l[5];break;case"7thH2":n=l[6];break;case"8thH2":n=l[7];break;case"9thH2":n=l[8];break;case"10thH2":n=l[9];break;case"lastH2":n=l[l.length-1]}if(n){if(n.parentElement.querySelector(".inline-lead-wrapper"))return n.parentElement.querySelector(".inline-lead-wrapper");{const e=document.createElement("div");return e.classList.add("inline-lead-wrapper"),n.nextElementSibling?n.parentElement.insertBefore(e,n.nextElementSibling):n.parentElement.appendChild(e),e}}}}),[t]);return t&&a?c(e,a):null},oe=({content:e})=>{const t=n((()=>{const e=Array.from(document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar"));return e.forEach((e=>{if(e.querySelector(".sidebar-lead-modal-wrapper"))return;const t=document.createElement("div");t.classList.add("sidebar-lead-modal-wrapper"),e.prepend(t)})),e.map((e=>e.querySelector(".sidebar-lead-modal-wrapper")))}),[]);return a.createElement(a.Fragment,null,t.map((t=>c(e,h(t,"sidebar-lead-modal-wrapper")))))},[ie,re,se]=P(),de="undefined"==typeof window,ce={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},me=(e="",a="",l="",n=500)=>{const[o,s]=i([]),[d,c]=i(!1);return r((()=>{let i;return e?i=window.setTimeout((()=>t(void 0,void 0,void 0,(function*(){var n;if(e)try{c(!0);const o=yield((e="",a="",l="vi")=>t(void 0,void 0,void 0,(function*(){return new Promise(((t,n)=>{if(!e)return n("Need valid text input");if(de)return n("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:e},a?{componentRestrictions:{country:a}}:{}),{language:ce[l]}),t)}catch(e){n(e)}}))})))(e,a,l);s(!(n=o)||n.length<1?[]:n.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{c(!1)}else s([])}))),n):o.length&&s([]),()=>{window.clearTimeout(i)}}),[e,n,a]),{isLoading:d,predictions:o}},ue=["places"],pe=({name:e,placeholder:t,locale:l})=>{var s;const d=re(),[c,m]=i(""),[u,p]=i(""),{predictions:h}=me(c||"15 Lê","","tl-PH"===l?"en":null===(s=null==l?void 0:l.split("-"))||void 0===s?void 0:s[0]),[g,v]=i(null),[b,y]=i(!1),f=o(Math.random().toString(36).substring(7)),k=n((()=>{const e=h.map((e=>({value:e.description,label:e.description}))),t=e.find((e=>e.value===u));return!u||t?e:[{value:u,label:u}].concat(e)}),[h,u]);return r((()=>{var e,t,a;(null===(a=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.places)||void 0===a?void 0:a.AutocompleteService)?y(!0):import("@react-google-maps/api").then((e=>{v((()=>e.LoadScript)),setTimeout((()=>{y(!0)}),200)}))}),[]),b?a.createElement(a.Fragment,null,g&&a.createElement(g,{googleMapsApiKey:"AIzaSyB9QmhfEYcy2wj5X3Fl38aCD5UkET6n82M",libraries:ue,loadingElement:a.createElement(a.Fragment,null)}),a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":e,"data-control":"text"}),a.createElement(x,Object.assign({className:"lead-modal__form-control",label:t,placeholder:t,withAsterisk:!0,name:e,data:k,searchValue:c,onSearchChange:e=>{m(e)},filter:()=>!0,clearable:!0,searchable:!0,onChange:e=>p(e||""),icon:a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9.99999 9.79167C10.4028 9.79167 10.7467 9.64944 11.0317 9.365C11.3161 9.08 11.4583 8.73611 11.4583 8.33333C11.4583 7.93056 11.3161 7.58667 11.0317 7.30167C10.7467 7.01722 10.4028 6.875 9.99999 6.875C9.59721 6.875 9.25332 7.01722 8.96832 7.30167C8.68388 7.58667 8.54166 7.93056 8.54166 8.33333C8.54166 8.73611 8.68388 9.08 8.96832 9.365C9.25332 9.64944 9.59721 9.79167 9.99999 9.79167ZM9.99999 17.875C9.90277 17.875 9.80555 17.8611 9.70832 17.8333C9.6111 17.8056 9.52082 17.7569 9.43749 17.6875C7.46527 15.8958 5.98971 14.2361 5.01082 12.7083C4.03138 11.1806 3.54166 9.77778 3.54166 8.5C3.54166 6.48611 4.1911 4.87833 5.48999 3.67667C6.78832 2.47556 8.29166 1.875 9.99999 1.875C11.7083 1.875 13.2119 2.47556 14.5108 3.67667C15.8092 4.87833 16.4583 6.48611 16.4583 8.5C16.4583 9.77778 15.9689 11.1806 14.99 12.7083C14.0105 14.2361 12.5347 15.8958 10.5625 17.6875C10.4792 17.7569 10.3889 17.8056 10.2917 17.8333C10.1944 17.8611 10.0972 17.875 9.99999 17.875Z",fill:"#8C8C8C"})),autoComplete:"no-auto-complete-"+f.current,rightSection:a.createElement(a.Fragment,null)},d.getInputProps(e)))):a.createElement("div",{style:{height:73}})},he=({children:e,align:t})=>a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(t||"")} ${$}`},e),ge=({children:e,align:t})=>a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(t||"")} ${$}`},e),ve=({listBlockAdded:e,popupId:t,locale:l,onClose:n,onOtherSubmit:o})=>{const i=re();return a.createElement(a.Fragment,null,e.map(((e,r)=>{const{name:s="",data:d={}}=e||{},{placeholder:c,value:m,align:u,listQuestion:p,isSendMailChimp:h=!1,newtab:g,url:v}=d;switch(s){case"TitleBlock":return a.createElement(ge,{key:r,align:u},m);case"SubtitleBlock":return a.createElement(he,{key:r,align:u},m);case"TextBlock":return a.createElement(E,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"text",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"text",name:m},i.getInputProps(m)));case"NumberBlock":return a.createElement(w,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"number",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"number",name:m},i.getInputProps(m)));case"EmailBlock":return a.createElement(E,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"email",name:m},i.getInputProps(m)));case"PhoneOtpBlock":case"PhoneBlock":{const e=t+"-"+m+"-"+r;return a.createElement(E.Wrapper,Object.assign({size:"md",withAsterisk:!0,key:r,label:c,className:"lead-modal__form-control",labelProps:{htmlFor:e}},i.getInputProps(m)),a.createElement(T,{name:m,spellCheck:!1,type:"tel",placeholder:c,onChange:e=>{i.setFieldValue(m,e)},id:e,defaultCountry:l&&O[l]||"VN","data-control":"tel"}))}case"LocationBlock":return a.createElement(pe,{key:r,name:m,placeholder:c,locale:l});case"DateBlock":return a.createElement(S,Object.assign({withAsterisk:!0,key:r,type:"date",name:m,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"date"},i.getInputProps(m)));case"LinkButtonBlock":return a.createElement("div",{key:r},a.createElement("a",{target:g?"blank":"parrent",href:v,style:{textDecoration:"none"}},a.createElement(f,{type:"button",size:"md",className:`lead-modal__btn ${$}`,onClick:()=>{null==n||n(),null==o||o()}},m)));case"CheckboxBlock":return a.createElement(a.Fragment,null,h&&a.createElement("div",{style:{display:"none"},"data-name":m+"-mailchimp"}),a.createElement(N.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(N,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"checkbox"})))));case"RadioBlock":return a.createElement(a.Fragment,null,h&&a.createElement(E,{type:"hidden",name:m+"-mailchimp",value:h}),a.createElement(C.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(C,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"radio"})))));case"DropdownBlock":return a.createElement(a.Fragment,null,a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":m,"data-control":"dropdown"}),a.createElement(x,Object.assign({key:r,className:"lead-modal__form-control",label:c,withAsterisk:!0,name:m,data:p.map((e=>({value:e.value,label:e.placeholder})))},i.getInputProps(m))))}return null})))},be=({phone:e,onSuccess:l,autoSendWhenOpen:n})=>{const{t:s}=b(),[d,c]=i(""),[m,u]=i(!1),[p,h]=i(0),g=o(null),[v,k]=i(),[_,w]=i(""),C=o();r((()=>{t(void 0,void 0,void 0,(function*(){var t;if(!C.current){const e=yield import("react-phone-number-input");C.current=e.formatPhoneNumberIntl}w((null===(t=C.current)||void 0===t?void 0:t.call(C,e))||e)}))}),[e]);const N=()=>t(void 0,void 0,void 0,(function*(){var t;if(!e)return;const a=yield ee({phone:e}),n=null===(t=null==a?void 0:a._messages)||void 0===t?void 0:t[0];"Send sms successfully"===n?(h(60),setTimeout((()=>{g.current&&(g.current.focus(),g.current.scrollIntoView({block:"center"}))}),100)):"This phone number was verified"===n?l():k(n||"something Wrong")}));return r((()=>{setTimeout((()=>{p>0&&h((e=>e-1))}),1e3)}),[p]),r((()=>{n&&!p&&N()}),[]),a.createElement(a.Fragment,null,a.createElement("form",{onSubmit:a=>{a.preventDefault(),t(void 0,void 0,void 0,(function*(){if(!e||!d)return;const t=yield te({phone:e,otp:d}),a=null==t?void 0:t._messages[0];"Verify successfully"===a||"This phone number was verified"===a?l():k(a||"something Wrong")}))},className:"lead-phone-otp-form"},a.createElement(y,{tag:"h3",fontWeight:"bold",style:{marginBottom:4}},s("lead.otp.title")),a.createElement(j,{size:"p1",color:B.colors.gray600},s("lead.otp.desc",{phone:_})),a.createElement(E,{ref:g,name:"_"+name+"-otp",spellCheck:!1,type:"number",placeholder:"Enter OTP",className:"lead-modal__form-control",label:"Phone OTP","data-control":"otp",withAsterisk:!0,pattern:"[0-9]*",value:d,onChange:e=>{u(!0),c(e),k(m&&!e?"OTP is required":void 0)},error:m?v:void 0}),a.createElement(f,{size:"md",color:"primary",className:`lead-modal__btn ${$}`,disabled:!d},s("lead.otp.verify")),a.createElement(f,{type:"button",size:"md",color:"transparent",className:`lead-modal__btn lead-phone-otp-button ${$}`,onClick:()=>{N()},disabled:!!p},s("lead.otp.resend",{timer:p?` (${p}s)`:""}))))},ye=({popupId:e,extraFields:t,onClose:l,onOtherSubmit:s,imageMobile:d,imageDesktop:c,imageOverlayMobile:m,imageOverlayDesktop:u,imageBackground:p,currentLayout:h,title:g,onSubmit:v,showThankyou:y,campaignId:_,campaign_subot_id:E,locale:w})=>{var C,N,S;const T=JSON.parse(t.listBlockAdded),x=JSON.parse(t.actionBlocks),O=JSON.parse(t.textBlocks),P=x.submitBlock.data.url,j=x.submitBlock.data.text,B=x.submitBlock.data.text2,L=x.submitBlock.data.value,I=location.pathname,A=h.includes("Inline")||"Sidebar"===h,U="Slider"===h,[D,H]=i(!0),[R,F]=i(""),W=o(),V=()=>{R?F(""):null==l||l()};if(window.innerWidth<769&&["Fullscreen","Slider"].includes(h))return console.log("😎 Not show fullscreen, slider on mobile "),null;r((()=>{(h.includes("LightBox")||"Fullscreen"==h)&&document.body.classList.add("noscroll"),window.intlTelInputUtils||require("intl-tel-input/build/js/utils"),ae.email={},ae.phone={}}),[]);const Y=o(!1),J=o(!1),{form:K,validateObj:G}=(({listBlockAdded:e=[],validatingPhoneRef:t,validatingEmailRef:a,campaignId:l,campaign_subot_id:i=[]})=>{const{t:r}=b(),s=n((()=>{const n=["TextBlock","NumberBlock","EmailBlock","PhoneBlock","DateBlock","CheckboxBlock","RadioBlock","DropdownBlock","PhoneOtpBlock","LocationBlock"],o=(e,t)=>a=>{if(c.current.isTouched(e))return void 0===a||""===a||Array.isArray(a)&&0===a.length?r("validator.required"):null==t?void 0:t(a)};return e.filter((e=>n.includes(e.name))).reduce(((e,n)=>"NumberBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(isNaN(Number(e)))return r("validator.number")}))}):"EmailBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return r("validator.email");a.current=!0,setTimeout((()=>{c.current.setFieldError(n.data.value,"Validating..."),le(l,i,{email:e}).then((e=>{e?c.current.setFieldError(n.data.value,r(e)):c.current.clearFieldError(n.data.value),a.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(n.data.value,e.message||"Something went wrong"),a.current=!1}))}),200)}))}):"PhoneBlock"===n.name||"PhoneOtpBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(String(e),M.countryCode))return r("validator.phone");t.current=!0,setTimeout((()=>{c.current.setFieldError(n.data.value,"Validating..."),le(l,i,{phone:e}).then((e=>{e?c.current.setFieldError(n.data.value,r(e)):c.current.clearFieldError(n.data.value),t.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(n.data.value,e.message||"Something went wrong"),t.current=!1}))}),200)}))}):"DateBlock"===n.name?Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value,(e=>{if(isNaN(Date.parse(e)))return r("validator.date")}))}):Object.assign(Object.assign({},e),{[n.data.value]:o(n.data.value)})),{})}),[e.map((e=>e.name)).join(",")]),d=se({validateInputOnChange:!0,clearInputErrorOnChange:!0,validate:s}),c=o(d);return c.current=d,{form:d,validateObj:s}})({listBlockAdded:T,validatingPhoneRef:Y,validatingEmailRef:J,campaignId:_,campaign_subot_id:E}),Q=a.createElement(a.Fragment,null,a.createElement("style",{dangerouslySetInnerHTML:{__html:`\n .le-newbuilder-overlay {\n background-repeat: no-repeat;\n background-size: cover;\n }\n ${m?`\n .le-newbuilder-overlay {\n background: url(${m}) ;\n }`:""}\n ${u?`\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(${u}) ;\n }\n }`:""}`}}),a.createElement("div",{id:e,"data-popup-url":I,"data-popup-type":"lightbox-inline",className:`lead-modal lead-modal-wrapper modal--animate-scale ${A?"le-buider-inline":""} ${U?"le-buider-slider":""}`},"Fullscreen"==h?a.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:p||""}):null,a.createElement("div",{className:`lead-modal__wrapper le-newbuilder-wrap-${h}`},a.createElement("div",{className:`lead-modal__content le-newbuilder-${h}`},y?a.createElement(z,{title:y.title,titleAlign:y.titleAlign,subtitle:y.subtitle,subtitleAlign:y.subtitleAlign,link:y.link,linkNewTab:y.linkNewTab,linkText:y.linkText,image:y.image}):a.createElement(a.Fragment,null,a.createElement("header",{className:"lead-modal__header"},R?a.createElement("img",{src:k.getAssetPath("lead-otp-thumb.png"),draggable:"false",alt:"",style:{width:"100%"}}):a.createElement(a.Fragment,null,["LightBoxA","InlineA","Sidebar","Slider"].includes(h)?d?a.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:d,alt:""}):null:a.createElement(a.Fragment,null,c?a.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{height:"100%",objectFit:"cover"},src:c,alt:""}):null,d?a.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:d,alt:""}):null))),R&&a.createElement(be,{phone:R,autoSendWhenOpen:!0,onSuccess:()=>{null==v||v(W.current,K.values)}}),a.createElement("div",{"data-hidden":!!R,className:"lead-modal__body le-newbuilder-overlay"},a.createElement(ie,{form:K},a.createElement("form",{ref:W,className:`lead-modal__form ${e}`,onSubmit:e=>{e.preventDefault(),K.setTouched(Object.keys(G).reduce(((e,t)=>(e[t]=!0,e)),{})),J.current||Y.current||setTimeout((()=>{K.onSubmit((e=>{var t,a,l;if(!Object.keys(K.errors).length){if(T.findIndex((e=>"PhoneOtpBlock"===e.name))>-1){const n=null===(a=null===(t=T.find((e=>"PhoneOtpBlock"===e.name)))||void 0===t?void 0:t.data)||void 0===a?void 0:a.value;if(null===(l=e[n])||void 0===l?void 0:l.startsWith("+84"))return void F(e[n])}null==v||v(W.current,e)}}))(e)}),100)}},a.createElement("div",{style:{marginBottom:20}},a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(null===(C=O.titleBlock.data)||void 0===C?void 0:C.align)} ${$}`},g),a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(null===(N=O.titleBlock.data)||void 0===N?void 0:N.align)} ${$}`},O.subtitleBlock.data.value)),a.createElement("div",{className:"lead-modal__form-control-wrapper"},a.createElement(ve,{listBlockAdded:T,popupId:e,locale:w,onClose:V,onOtherSubmit:s})),(null===(S=null==x?void 0:x.submitBlock)||void 0===S?void 0:S.isHide)?null:a.createElement(a.Fragment,null,a.createElement("div",{className:`lead-modal__checkbox-wrapper ${$}`},a.createElement("div",{className:"lead-modal__checkbox"},a.createElement("input",{id:"lead-term-checkbox",className:`lead-modal__checkbox__input ${$}`,type:"checkbox","aria-label":"Checkbox label",checked:D,onChange:e=>H(e.currentTarget.checked)}),a.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),a.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},j," ",a.createElement("span",{style:{fontWeight:"bold"}},a.createElement("a",{target:"blank",href:P||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},B)))),a.createElement(f,{size:"md",id:"lead-submit",type:"submit",className:`lead-modal__btn ${$}`,disabled:!D},L))))))),!h.includes("Inline")&&a.createElement(q,{onClose:V,containerClassName:"close-button-top-right"}))));return h.includes("LightBox")||"Fullscreen"==h||"Slider"==h?Q:"Sidebar"==h?a.createElement(oe,{content:Q}):h.includes("Inline")?a.createElement(ne,{content:Q,inlinePosition:t.popupInlinePosition}):null},fe=({popupId:e,link:t,linkText:l,linkNewTab:n,onClose:o,imageMobile:i,imageDesktop:r,currentLayout:s,onOtherSubmit:d})=>{const c=location.pathname;return a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":c,"data-popup-type":"skin_ab"},"SkinA"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-skin-a-desktop"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:r}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn js-popup-other-submit"},l)),a.createElement(q,{onClose:o,containerClassName:"close-button-top-right"})))):"SkinB"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:""},a.createElement("div",{style:{position:"relative",zIndex:1e4}},a.createElement("img",{src:r,style:{width:"100%"}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(q,{containerClassName:"close-button-top-right",onClose:o})))):null,a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-skin-mobile"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:i,style:{width:"100%"}}),a.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(q,{containerClassName:"close-button-top-right",svgClassName:"le-mobile-btn",onClose:o})))))},ke=({popupId:e,url:t,newTab:l,image:n,onClose:o,onOtherSubmit:i})=>a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},a.createElement("div",{className:"le-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{href:t,target:l?"blank":"_parent",onClick:i},a.createElement("img",{className:"js-popup-other-submit",src:n})),a.createElement(q,{onClose:o,containerClassName:"close-button-top-right"})))),_e=[],Ee=[],we=[];const Ce=e=>{const t=[...e];for(let e=t.length-1;e>0;e--){const a=Math.floor(Math.random()*(e+1)),l=t[e];t[e]=t[a],t[a]=l}return t},Ne=(e="UTC")=>{const t=new Date;return new Date(t.toLocaleString("en-US",{timeZone:e}))},Se=e=>{try{const[t,a]=e.split(" "),[l,n,o]=t.split("-").map(Number),[i,r,s]=a.split(":").map(Number);return new Date(l,n-1,o,i,r,s)}catch(e){return null}};const Te=e=>1===e.formatted_status?function(e){var t;if(1===e.forever)return!0;const a=e.started_at,l=e.ended_at,n=Se(a),o=Se(l);if(!n||!o)return!0;const i=(null===(t=e.site)||void 0===t?void 0:t.id)||1,r=H[i];return!(Ne(r).getTime()>o.getTime()&&(we.push(e),1))}(e):0===e.formatted_status&&(_e.push(e),(e=>{var t;const a=(null===(t=e.site)||void 0===t?void 0:t.id)||1,l=e.started_at,n=e.ended_at,o=Se(l),i=Se(n);if(!o||!i)return!1;const r=H[a],s=Ne(r).getTime();return s<=i.getTime()&&s>=o.getTime()&&(Ee.push(e),!0)})(e));let xe=null;function Oe({leadApi:e,leadSiteId:t,leadDomain:a,onShowPopup:l,DEBUG_URL:n}){const o=n||("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(e+"api/campaign/"+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:o,ga_client_id:u("_ga")||null})}).then((e=>e.json())).then((e=>{var t,n,i,r,s;if(Pe("List campagin: ",e),U="https://"+location.hostname+location.pathname+location.search,1==e._status){const d=(null===(n=null===(t=e._data)||void 0===t?void 0:t.campaigns)||void 0===n?void 0:n.filter(Te))||[];u("hhg-id")||(p("hhg-id",v(),{domain:"."+a,path:"/"}),Pe("😍 Set HHG ID cookie"));let c=[];c=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?d.filter((e=>e.device_types.some((e=>e.id==A.MOBILE)))):d.filter((e=>e.device_types.some((e=>e.id==A.DESKTOP)))),Pe("👓 campaignsDevice",c),Pe("--listCampaignScheduled",_e),Pe("--listCampaignScheduledToActivated",Ee),Pe("--listCampaignActiveButExpired",we);let m=c.map(((e,t)=>e.targets.filter((e=>e.type==L.LINKS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1);m=m.filter((e=>{const t=new URL(String(e.target).toLowerCase());if("exact_match"==e.option)return Boolean(o===t.href);if("start_with"==e.option){if(o.includes(String(e.target))){return!e.sub_target.filter((e=>"excluding"==e.option)).map((e=>e.value)).includes(o.split("?")[0])}return!1}}));const h=Array.from(document.getElementsByTagName("META")).filter((e=>"article:tag"==e.getAttribute("property"))).map((e=>e.content));let g=[],b=[];h&&h.length&&(g=c.map(((e,t)=>e.targets.filter((e=>e.type==L.TAGS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1),b=g.filter((e=>h.includes(e.target))));const y=[...m,...b],f=document.cookie.split("; ").map((e=>e.split("=")[0])),k=f.filter((e=>e.includes("lead_submited")));Pe("--listCampaignCodeSubmited",k);const _=f.filter((e=>e.includes("lead_closed")));Pe("--listCampaignCodeClosed",_);const E=[...k,..._],w=y.filter((e=>!E.some((t=>t.includes(c[e.campaignIndex].code))))),C=Ce(w);if(Pe("--listCampaignValid : ",C),C&&C.length){const e=c[C[0].campaignIndex];Pe("CAMPAIGN_SHOW",e);const{rules:t}=e,a=Number(null===(i=t.find((e=>"time"==e.rule)))||void 0===i?void 0:i.value);Pe("timeoutRule",a);const n=Number(null===(r=t.find((e=>"scroll"==e.rule)))||void 0===r?void 0:r.value);Pe("scrollRule",n);const o=Number(null===(s=t.find((e=>"exclude_sponsored"==e.rule)))||void 0===s?void 0:s.value);Pe("excludeSponsored",o);const d=Boolean(document.querySelector(".hhg-disclaimer-text"));if(Pe("💎 LEAD current page isSponsored",d),d&&o)return;let m="TIME";if(Number.isInteger(a)&&(m="TIME",Pe("✨ SHOW AWESOME POPUP AFTER: ",a," seconds"),xe&&clearTimeout(xe),xe=setTimeout((()=>{null==l||l(e,m)}),1e3*a)),Number.isInteger(n)){m="SCROLL",Pe("✨ SHOW AWESOME AFTER: SCROLL",n," %");const t=document.querySelector(`[data-url="${location.pathname}"]`)||document.querySelector("body"),a=t.getBoundingClientRect().top,o=t.offsetHeight;Pe("👓 Element check scroll: ",t);const i=function(){const t=window.pageYOffset||document.documentElement.scrollTop;let r=0;t>=a&&(r=Math.round((t-a)/(o-innerHeight)*100)),Pe("---Scroll",r,n),r>=n&&(window.removeEventListener("scroll",i),null==l||l(e,m))};window.addEventListener("scroll",i,{passive:!0})}}else Pe("🚧 No lead campaigns on current URL, tags")}})).catch((e=>{Pe("Lead error: ",e)}))}const Pe=(...e)=>{("production"!==process.env.NODE_ENV||process.env.NEXT_PUBLIC_DEPLOY_ENV&&"production"!==process.env.NEXT_PUBLIC_DEPLOY_ENV||"undefined"!=typeof localStorage&&"true"===localStorage.getItem("hhg_debug"))&&console.log(...e)};const je=({campaign:e,action:t,onSubmit:l,onClose:n,showThankyou:i,locale:d})=>{var c,m;b();const{apiUrl:h,siteDomain:g}=s(V);r((()=>{const e=u("_ga")||null;fetch(`${h}api/campaign/${_}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),ga_client_id:e})})}),[]);const{extra_fields:y,image:f,image_desktop:k,code:_,image_background:E,image_overlay_mobile:w,image_overlay_desktop:C}=e,{currentLayout:N}=y,S=y.imageBlocks?JSON.parse(y.imageBlocks):{},T=JSON.parse(y.actionBlocks),x=JSON.parse(y.textBlocks);let O=(null===(m=null===(c=null==x?void 0:x.titleBlock)||void 0===c?void 0:c.data)||void 0===m?void 0:m.value)||"";const P={1:{},2:{},3:{}},j=o("lead-modal-"+v()),B=function(e="Xin chao {{category_2}} extra"){if(e.includes("{{category_")){const t="{{category_".length,a=e.search("{{category_");return+e.charAt(t+a)}return null}(O);if(B){Pe("⚡️ Has categoryLevel",B);const e=Array.from(document.getElementsByTagName("META")),t=e.find((e=>e.name===`content_category_${B}`)),a=e.find((e=>e.name===`content_category_en_${B}`));if(!t||!a)return Pe("⚡️ No META TAG for categoryLevel, not show popup",B),null;P[B]={value:t.content,value_en:a.content},O=O.replace(`{{category_${B}}}`,t.content),Pe("⚡️ Set categoryData ",B)}else Pe("⚡️ No categoryLevel",B);const L=()=>{var t,a,l,o;if(Pe("👌 Other submit click"),document.body.classList.remove("noscroll"),N.includes("Skin")){const e=document.querySelector("#masthead");e&&(e.style.top="0px !important;")}const i=Number(null!==(a=null===(t=e.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value)&&void 0!==a?a:7),r=Number(null!==(o=null===(l=e.rules.find((e=>"show_again_after_submit"==e.rule)))||void 0===l?void 0:l.value)&&void 0!==o?o:0);0===r&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${_}`,`target_${y.popupVersion}`,{domain:"."+g,path:"/"})),1==r&&(Pe(`⌛ Popup will show again after ${i} days!`),p(`lead_submited_${_}`,`target_${y.popupVersion}`,{domain:"."+g,days:i,path:"/"}));const s=u("_ga")||null,d={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:u("hhg-id"),ga_client_id:s};B&&(d.category=P[B].value_en),fetch(`${h}api/campaign/${_}/lead`,{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then((e=>{"error"===e.status&&Pe(e)})).catch((e=>{Pe("Error:",e)})),null==n||n()};return"CenterTab"===N?a.createElement(Y,{popupId:j.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,imageMobile:f,imageDestkop:k,onClose:n,onOtherSubmit:L}):"Tab"===N?a.createElement(ke,{popupId:j.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,image:f,onClose:n,onOtherSubmit:L}):"Floating"===N?a.createElement(J,{popupId:j.current,title:O,titleAlign:x.titleBlock.data.align,subtitle:x.subtitleBlock.data.value,subtitleAlign:x.subtitleBlock.data.align,url:T.linkButtonBlock.data.url,urlText:T.linkButtonBlock.data.value,newTab:T.linkButtonBlock.data.newtab,imageMobile:f,imageDesktop:k,onClose:n,onOtherSubmit:L}):N.includes("LightBox")||N.includes("Inline")||"Fullscreen"==N||"Sidebar"==N||"Slider"==N?a.createElement(ye,{popupId:j.current,extraFields:y,onClose:n,onOtherSubmit:L,imageMobile:f,imageDesktop:k,imageBackground:E,currentLayout:N,title:O,onSubmit:(e,t)=>l(e,t,B,P),key:N,imageOverlayDesktop:C,imageOverlayMobile:w,showThankyou:i,campaignId:e.id,campaign_subot_id:e.bot_id||[],locale:d}):N.includes("Skin")?a.createElement(fe,{popupId:j.current,link:T.linkButtonBlock.data.url,linkNewTab:!!T.linkButtonBlock.data.newtab,linkText:T.linkButtonBlock.data.value,onClose:n,onOtherSubmit:L,imageMobile:f,imageDesktop:k,currentLayout:N}):null},Be=({apiUrl:e,siteDomain:l,siteId:s,locale:h,apiSubotUrl:v,DEBUG_URL:b})=>{var y;const f=o(),k=o(Date.now()),{apiUrl:E}=n((()=>{let t=e;return t.includes("localhost")&&(t="https://dev.leadgen.hellobacsi.com/"),{apiUrl:t}}),[e,l,s]),[w,C]=i(null),[N,S]=i(""),[T,x]=i(null);r((()=>{K.apiLeadUrl=E,K.apiSubotUrl=v}),[E,v]);const O=(e,t)=>{C(e),S(t)},P=()=>{var e,t;if(!w)return;Pe(`👋👋👋 CLOSE POPUP ${w.code} 👋👋👋`);const a=Number(null===(e=w.rules.find((e=>"show_again_after_exit"==e.rule)))||void 0===e?void 0:e.value),n=Number(null===(t=w.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value);0==a&&p(`lead_closed_${w.code}`,`target_${w.extra_fields.popupVersion}`,n?{domain:"."+l,days:n,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch(`${E}api/campaign/${w.code}/popup_exit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),duration:Math.ceil((Date.now()-k.current)/1e3)})}),C(null),x(null)};r((()=>{if(window.next){const e=d((e=>{Pe("--🌻 routeChangeComplete",e,Date.now());const t=location.pathname;P(),document.querySelectorAll(`[data-popup-url="${t}"]`).length?Pe("🔥 This URL page has show popup!"):(Pe("--Process checkShowPopup"),Oe({leadApi:E,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})),f.current&&window.removeEventListener("scroll",f.current)}),500);window.next.router.events.on("routeChangeComplete",e)}Oe({leadApi:E,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})}),[]);return r((()=>{w&&(k.current=Date.now())}),[w]),a.createElement(V.Provider,{value:{apiUrl:E,siteDomain:l,siteId:s,locale:h}},a.createElement(m.Provider,{value:{locale:h,values:W(h)}},c(a.createElement(a.Fragment,null,"2.1"===(null===(y=null==w?void 0:w.extra_fields)||void 0===y?void 0:y.popupVersion)&&a.createElement(je,{campaign:w,action:N,onSubmit:(e,a,n,o)=>t(void 0,void 0,void 0,(function*(){var t,i,r,s,d,c,m,h,g,v,b;if(!a)return;Pe("submitHandler",n,o);const y=Object.keys(a).map((e=>({name:e,value:String(a[e])}))),f=u("_ga")||null;window.intlTelInputUtils||(yield require("intl-tel-input/build/js/utils"));const k={url:location.href.toLowerCase(),title_article:document.title,meta:y.map((t=>{var a,l;const n=(null===(a=e.querySelector(`*[name="${t.name}"]`))||void 0===a?void 0:a.getAttribute("data-control"))||(null===(l=e.querySelector(`*[data-extra][data-name="${t.name}"]`))||void 0===l?void 0:l.getAttribute("data-control"))||"text",o="tel"===n?window.intlTelInputUtils.formatNumber(String(t.value),null==M?void 0:M.countryCodeNumber,2).replace(/\s+/g,""):"date"===n?_(t.value).format("YYYY-MM-DD"):t.value;return{key:t.name,value:o,control:n,is_sent_mailchimp:e.querySelector(`div[data-name="${t.name}-mailchimp"]`)?"true":"false"}})),cookie_id:u("hhg-id"),ga_client_id:f};n&&o[n].value_en&&(k.category=o[n].value_en);const C=Number((null===(i=null===(t=w.rules)||void 0===t?void 0:t.find((e=>"days_to_show_again"===e.rule)))||void 0===i?void 0:i.value)||7),N=Number((null===(s=null===(r=w.rules)||void 0===r?void 0:r.find((e=>"show_again_after_submit"===e.rule)))||void 0===s?void 0:s.value)||0);if(0==N&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${w.code}`,`target_${w.extra_fields.targetType}`,{domain:"."+l,path:"/"})),1==N&&(Pe(`⌛ Popup will show again after ${C} days!`),p(`lead_submited_${w.code}`,`target_${w.extra_fields.targetType}`,{domain:"."+l,days:C,path:"/"})),fetch(`${E}api/campaign/${w.code}/lead`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),"notshow"==w.extra_fields.popupShowThankYou)return P(),void document.body.classList.remove("noscroll");let S=!0;const T=w.thank_you_image||`${E}admin/img/thanksyou.png`;let O,j,B=w.extra_fields.popupThankyouTitle||"Thank you.",L=w.extra_fields.popupThankyouDesc||"We appreciate your time!",I="",A="",$="";if("2.1"==w.extra_fields.popupVersion){const e=w.extra_fields,t=JSON.parse(e.listBlockThankyou),a=t.find((e=>"TitleBlock"==e.name)),l=t.find((e=>"SubtitleBlock"==e.name)),n=t.find((e=>"LinkButtonBlock"==e.name));B=(null===(d=null==a?void 0:a.data)||void 0===d?void 0:d.value)||"",I=(null===(c=null==a?void 0:a.data)||void 0===c?void 0:c.align)||"",L=(null===(m=null==l?void 0:l.data)||void 0===m?void 0:m.value)||"",A=(null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.align)||"",O=(null===(g=null==n?void 0:n.data)||void 0===g?void 0:g.value)||"",j=(null===(v=null==n?void 0:n.data)||void 0===v?void 0:v.newtab)||!1,$=(null===(b=null==n?void 0:n.data)||void 0===b?void 0:b.url)||"";const o=w.extra_fields.currentLayout;["SkinA","SkinB","Floating","Tab","CenterTab"].includes(o)&&(S=!1)}x(S?{title:B,titleAlign:I,subtitle:L,subtitleAlign:A,link:$,linkNewTab:j,linkText:O,image:T}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},y.map((e=>{const t=e.name,a=e.value;"tel"==t?window.insider_object.user.phone_number=a:"email"==t&&(window.insider_object.user.email=a)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object))})),onClose:P,showThankyou:T,locale:h})),g())))};export{Be as LeadGen};
@@ -1 +1 @@
1
- export{M as MAPPED_LOCALE,b as OnboardingForm,O as OnboardingModal,a as OnboardingStep,c as OtpForm}from"./index-3da84662.js";import"./tslib.es6-b1c5b9b7.js";import"react";import"@mantine/hooks";import"./index.styled-8029aeaf.js";import"styled-components";import"./theme-09a3980d.js";import"./utils-f6d61056.js";import"./index.styled-437068ae.js";import"./index-5392909e.js";import"./gAssets.js";import"./index-06ba77a5.js";import"./Locale-d143219c.js";import"./isProduction-142cc526.js";import"./index-d5660016.js";import"dayjs";import"./screenSizeContext-40c726af.js";import"lodash/throttle";import"./index-b5d8241a.js";import"@mantine/core";import"./index.styled-200bbdd6.js";import"./useTranslations-34154db8.js";import"./translationsContext-4ed0d296.js";import"string-format";import"./index-87cc9b76.js";import"lodash/debounce";import"@mantine/form";import"./index-5ad7df44.js";import"@mantine/dates";import"@mantine/carousel";import"./index-91cd07c6.js";import"yup";import"./index-81352e3c.js";import"date-fns";import"./Visible-8820bebe.js";
1
+ export{M as MAPPED_LOCALE,b as OnboardingForm,O as OnboardingModal,a as OnboardingStep,c as OtpForm}from"./index-03968b09.js";import"./tslib.es6-b1c5b9b7.js";import"react";import"@mantine/hooks";import"./index.styled-8029aeaf.js";import"styled-components";import"./theme-09a3980d.js";import"./utils-f6d61056.js";import"./index.styled-437068ae.js";import"./index-5392909e.js";import"./gAssets.js";import"./index-06ba77a5.js";import"./Locale-d143219c.js";import"./isProduction-142cc526.js";import"./index-d5660016.js";import"dayjs";import"./screenSizeContext-40c726af.js";import"lodash/throttle";import"./index-b5d8241a.js";import"@mantine/core";import"./index.styled-200bbdd6.js";import"./useTranslations-34154db8.js";import"./translationsContext-4ed0d296.js";import"string-format";import"./index-87cc9b76.js";import"lodash/debounce";import"@mantine/form";import"./index-5ad7df44.js";import"@mantine/dates";import"@mantine/carousel";import"./index-91cd07c6.js";import"yup";import"./index-81352e3c.js";import"date-fns";import"./Visible-8820bebe.js";
@@ -1 +1 @@
1
- export{g as CardAuthor,C as CardLink,D as CardPost,E as CardPostPopoverMore,b as CardReactions,F as CardReply,G as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,H as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,z as ProfileDetail,y as ProfileDetailModal,q as ShareBox,S as SharePopup,B as SkipQuestionOfExpertBtn,x as SocialLinkPreview,J as SourceList,p as SubmitReportForm,A as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-4475e3ee.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants,U as UserAvatar}from"./index.styled-9c86dbd3.js";export{d as TogetherDataTransforms}from"./dataTransform-50e1a316.js";import"./tslib.es6-b1c5b9b7.js";import"react";import"@mantine/core";import"./index-b5d8241a.js";import"./index-d5660016.js";import"./index.styled-d89c8b2b.js";import"styled-components";import"./utils-f6d61056.js";import"./index-91131e37.js";import"./gAssets.js";import"./index-06ba77a5.js";import"./Locale-d143219c.js";import"./isProduction-142cc526.js";import"./index-5392909e.js";import"./index.styled-8029aeaf.js";import"./theme-09a3980d.js";import"./index.styled-437068ae.js";import"dayjs";import"./screenSizeContext-40c726af.js";import"lodash/throttle";import"./index-9099c391.js";import"./index-91cd07c6.js";import"@mantine/hooks";import"@hookform/resolvers/yup";import"react-hook-form";import"./index-3459c602.js";import"./useScrollbarSize-02e13656.js";import"lodash/debounce";import"react-dom";import"./useTranslations-34154db8.js";import"./translationsContext-4ed0d296.js";import"string-format";import"./useUniqueId-7840efb0.js";import"./index-0f3c172b.js";import"./index.styled-200bbdd6.js";import"date-fns";import"./index-87cc9b76.js";import"./index-0d74f5c2.js";import"react-day-picker/DayPickerInput";import"innertext";import"./index-4d99a8eb.js";import"react-contenteditable";import"./cookieHelper-b1c13586.js";import"keen-slider/react";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-2896b218.js";import"./index-81352e3c.js";import"@mantine/carousel";import"@mantine/dates";import"dayjs/plugin/relativeTime";import"./index-5ad7df44.js";import"./index-1b48dde6.js";import"./routing-91938e59.js";import"slugify";
1
+ export{g as CardAuthor,C as CardLink,D as CardPost,E as CardPostPopoverMore,b as CardReactions,F as CardReply,G as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,H as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,z as ProfileDetail,y as ProfileDetailModal,q as ShareBox,S as SharePopup,B as SkipQuestionOfExpertBtn,x as SocialLinkPreview,J as SourceList,p as SubmitReportForm,A as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-15329057.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants,U as UserAvatar}from"./index.styled-9c86dbd3.js";export{d as TogetherDataTransforms}from"./dataTransform-50e1a316.js";import"./tslib.es6-b1c5b9b7.js";import"react";import"@mantine/core";import"./index-b5d8241a.js";import"./index-d5660016.js";import"./index.styled-d89c8b2b.js";import"styled-components";import"./utils-f6d61056.js";import"./index-91131e37.js";import"./gAssets.js";import"./index-06ba77a5.js";import"./Locale-d143219c.js";import"./isProduction-142cc526.js";import"./index-5392909e.js";import"./index.styled-8029aeaf.js";import"./theme-09a3980d.js";import"./index.styled-437068ae.js";import"dayjs";import"./screenSizeContext-40c726af.js";import"lodash/throttle";import"./index-9099c391.js";import"./index-91cd07c6.js";import"@mantine/hooks";import"@hookform/resolvers/yup";import"react-hook-form";import"./index-3459c602.js";import"./useScrollbarSize-02e13656.js";import"lodash/debounce";import"react-dom";import"./useTranslations-34154db8.js";import"./translationsContext-4ed0d296.js";import"string-format";import"./useUniqueId-7840efb0.js";import"./index-0f3c172b.js";import"./index.styled-200bbdd6.js";import"date-fns";import"./index-87cc9b76.js";import"./index-0d74f5c2.js";import"react-day-picker/DayPickerInput";import"innertext";import"./index-4d99a8eb.js";import"react-contenteditable";import"./cookieHelper-b1c13586.js";import"keen-slider/react";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-2896b218.js";import"./index-81352e3c.js";import"@mantine/carousel";import"@mantine/dates";import"dayjs/plugin/relativeTime";import"./index-5ad7df44.js";import"./index-1b48dde6.js";import"./routing-91938e59.js";import"slugify";