{"id":18289,"date":"2025-06-04T11:32:36","date_gmt":"2025-06-04T03:32:36","guid":{"rendered":"https:\/\/www.humansahealth.com\/?page_id=18289"},"modified":"2025-12-18T15:53:59","modified_gmt":"2025-12-18T07:53:59","slug":"book-an-appointment","status":"publish","type":"page","link":"https:\/\/www.humansahealth.com\/zh\/book-an-appointment\/","title":{"rendered":"\u7acb\u5373\u9810\u7d04"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"18289\" class=\"elementor elementor-18289\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-83f2eb9 e-con-full e-flex e-con e-parent\" data-id=\"83f2eb9\" data-element_type=\"container\" data-settings=\"{&quot;ekit_has_onepagescroll_dot&quot;:&quot;yes&quot;}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5b148ed elementor-widget elementor-widget-html\" data-id=\"5b148ed\" data-element_type=\"widget\" data-settings=\"{&quot;ekit_we_effect_on&quot;:&quot;none&quot;}\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n  <meta charset=\"UTF-8\" \/>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/>\n  <title>Book an appoinment<\/title>\n  <link rel=\"stylesheet\" href=\"https:\/\/www.humansahealth.com\/wp-content\/uploads\/website_footer.css\">\n  <link rel=\"stylesheet\" href=\"https:\/\/www.humansahealth.com\/wp-content\/uploads\/global_font_style.css\">\n  <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/crypto-js\/4.1.1\/crypto-js.min.js\"><\/script>\n  <!-- <link rel=\"stylesheet\" href=\".\/BookAnAppoinment-style.css\"> -->\n  <!-- NOTE: need remove on prod -->\n\n  <!-- Mobile Style -->\n  <style>\n    \/* Checkbox error state *\/\n    \/* .radio-option.field-error {\n      border: 1px solid #ff4d4f;\n      padding: 8px;\n      border-radius: 4px;\n      margin-bottom: 8px;\n    } *\/\n\n    \/* .radio-option.field-error label {\n      color: #ff4d4f;\n    } *\/\n    .policy-link {\n      text-decoration: underline !important;\n    }\n\n    .error-message {\n      color: #ff4d4f;\n      font-size: 14px;\n      margin-top: 4px;\n    }\n\n    #countryCode-style {\n      position: relative;\n    }\n\n    #agreeLabel {\n      width: 90%;\n    }\n\n    .country-code-dropdown {\n      position: absolute;\n      top: 100%;\n      left: 0;\n      width: 100%;\n      max-height: 300px;\n      overflow-y: auto;\n      background: white;\n      border: 1px solid #ccc;\n      border-radius: 4px;\n      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);\n      z-index: 1000;\n      display: none;\n    }\n\n    .country-code-dropdown.show {\n      display: block;\n    }\n\n    .country-code-item {\n      padding: 8px 10px;\n      cursor: pointer;\n      display: flex;\n      justify-content: space-between;\n    }\n\n    .country-code-item:hover {\n      background-color: #f5f5f5;\n    }\n\n    .country-code-item span:last-child {\n      color: #666;\n    }\n\n    .highlight {\n      background-color: yellow;\n    }\n\n    @media (max-width: 768px) {\n      .page_title_background {\n        height: 100.2vw;\n        background-position: 60% 0%;\n      }\n\n      .background_big_title {\n        width: 80%;\n        font-size: 10.37vw;\n        line-height: 10vw;\n      }\n\n      .BannerTitle_LTitle {\n        font-size: 5.4vw !important;\n      }\n\n      .black_link_style {\n        width: 39.4vw;\n        height: 9.76vw;\n        border-radius: 8vw;\n        font-size: 3.72vw;\n        margin: 4vw 0 0 0;\n      }\n\n      .form_container {\n        width: 100%;\n        margin: 0;\n        padding: 30px 20px;\n      }\n\n      .form_layout {\n        display: flex;\n        flex-direction: column;\n      }\n\n      .white_link_style {\n        width: 36.7vw;\n        height: 8.37vw;\n        font-size: 3.72vw;\n        border-radius: 10vw;\n      }\n\n      .form-row {\n        flex-direction: column;\n      }\n\n      \/* REVIEW:footer *\/\n      .footer-appointment-container {\n        height: 116.2vw;\n        flex-direction: column;\n        justify-content: center;\n      }\n\n      .appointment-title h1 {\n        font-size: 8.37vw;\n        line-height: 10vw;\n      }\n\n      .appointment-title p {\n        text-align: center;\n        font-size: 4.65vw;\n        margin: 5vw 0;\n      }\n\n      .contact-icon-container {\n        \/* width: 100%; *\/\n        flex-direction: column;\n        align-items: center;\n      }\n\n      .default-icon,\n      .long-icon {\n        width: 10vw;\n        height: 10vw !important;\n      }\n\n      .contact-icon-box {\n        width: 100%;\n      }\n\n      .contact-icon-link {\n        width: 10vw;\n        height: 10vw !important;\n      }\n\n      .contact-icon-box {\n        gap: 5vw;\n      }\n\n      .contactus-btn {\n        width: 36.7vw;\n        height: 8.37vw !important;\n        font-size: 3.72vw;\n        border-radius: 10vw;\n        margin: 5vw auto;\n      }\n\n      .page-footer {\n        height: 110vw;\n        justify-content: flex-start;\n        padding: 10vw 0;\n      }\n\n      .footer-container {\n        flex-direction: column-reverse;\n        height: 100%;\n        gap: 5vw;\n      }\n\n      .download-app-title,\n      .footer-logo-title {\n        font-size: 3.72vw;\n      }\n\n      .footer-icon-style {\n        width: 8.37vw;\n        height: 8.37vw !important;\n      }\n\n      .download-icon-layout {\n        justify-content: flex-end;\n      }\n\n      .download-icon-style {\n        width: 32.55vw;\n        height: 10.4vw !important;\n      }\n\n      .footer-title-box {\n        flex-direction: column;\n        gap: 0;\n      }\n\n      .footer-title p {\n        font-size: 3.25vw;\n      }\n\n      .footer-copyright p {\n        font-size: 3.25vw;\n      }\n    }\n  <\/style>\n  <!-- Loading Circle -->\n  <style>\n    .load-container {\n      display: flex;\n      justify-content: center;\n      align-items: center;\n      margin: 20% auto;\n    }\n\n    #load {\n      width: 175px;\n      animation: loading 3s linear infinite;\n    }\n\n    #load #loading-inner {\n      stroke-dashoffset: 0;\n      stroke-dasharray: 300;\n      width: 10px;\n      stroke-width: 10px;\n      \/* \u8c03\u6574\u7ebf\u6761\u5bbd\u5ea6 *\/\n      miterlimit: 10;\n      stroke-linecap: round;\n      animation: loading-circle 2s linear infinite;\n      stroke: #00adb5;\n      fill: transparent;\n    }\n\n    @keyframes loading {\n      0% {\n        transform: rotate(0);\n      }\n\n      100% {\n        transform: rotate(360deg);\n      }\n    }\n\n    @keyframes loading-circle {\n      0% {\n        stroke-dashoffset: 0;\n      }\n\n      100% {\n        stroke-dashoffset: -600;\n      }\n    }\n  <\/style>\n<\/head>\n\n\n<body>\n  <div id=\"page-container\">\n    <div class=\"page_title_background\">\n      <div class=\"background_context\">\n        <p class=\"background_big_title\">\u67e5\u8a62\u53ca\u9810\u7d04<\/p>\n        <!-- <a href=\"https:\/\/api.whatsapp.com\/send?phone=85259112803&text=Hi%2C%20I%20get%20the%20information%20about%20Humansa%20Brain%20Health%20Program%20from%20your%20official%20website.%20I%27m%20interested%20to%20learn%20more.%20%0A%E4%BD%A0%E5%A5%BD%EF%BC%8C%E5%89%9B%E5%89%9B%E8%A8%AA%E5%95%8F%E4%BA%86%E4%BD%A0%E5%80%91%E7%9A%84%E5%AE%98%E6%96%B9%E7%B6%B2%E7%AB%99%EF%BC%8C%E6%88%91%E6%9C%89%E8%88%88%E8%B6%A3%E4%BA%86%E8%A7%A3%E6%9B%B4%E5%A4%9A%E9%97%9C%E6%96%BC%E3%80%8CHumansa%E8%85%A6%E9%83%A8%E5%81%A5%E5%BA%B7%E8%A8%88%E5%8A%83%E3%80%8D%E7%9A%84%E7%9B%B8%E9%97%9C%E8%B3%87%E8%A8%8A\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"black_link_style\">Explore more<\/a> -->\n      <\/div>\n    <\/div>\n\n    <div class=\"form_container\" id=\"form-container\">\n      <!-- Personal Data Section -->\n      <div class=\"form_layout\" id=\"form-layout\">\n        <div class=\"title\">\u8acb\u8f38\u5165\u60a8\u7684\u8cc7\u6599\u4ee5\u5b89\u6392\u9810\u7d04<\/div>\n        <div class=\"form-group\">\n          <label>\u7a31\u8b02<\/label>\n          <div class=\"salutation-options\">\n            <div class=\"option-card\" data-value=\"Mr.\">\u5148\u751f<\/div>\n            <div class=\"option-card\" data-value=\"Ms.\">\u592a\u592a<\/div>\n            <div class=\"option-card\" data-value=\"Miss\">\u5c0f\u59d0<\/div>\n            <div class=\"option-card\" data-value=\"Dr.\">\u535a\u58eb<\/div>\n            <div class=\"option-card\" data-value=\"Prof.\">\u6559\u6388<\/div>\n          <\/div>\n        <\/div>\n\n        <div class=\"form-group\">\n          <div class=\"form-row\">\n            <div class=\"form-col\">\n              <label>\u540d\u5b57*<\/label>\n              <input type=\"text\" id=\"firstName\" required>\n            <\/div>\n            <div class=\"form-col\">\n              <label>\u59d3\u6c0f\u00a0*<\/label>\n              <input type=\"text\" id=\"lastName\" required>\n            <\/div>\n          <\/div>\n        <\/div>\n\n        <div class=\"form-group\">\n          <label>\u73fe\u6709\u5ba2\u6236*<\/label>\n          <div class=\"salutation-options\" id=\"existing-patient-options\">\n            <div class=\"option-card\" data-value=\"Yes\">\u662f<\/div>\n            <div class=\"option-card\" data-value=\"No\">\u5426<\/div>\n          <\/div>\n        <\/div>\n\n        <!-- Contact Information Section -->\n        <div class=\"title\">\u806f\u7d61\u8cc7\u8a0a<\/div>\n        <div class=\"form-group\">\n          <div class=\"form-row\">\n            <div class=\"form-col\" id=\"countryCode-style\">\n              <label>\u570b\u5bb6\/\u5730\u5340\u865f\u78bc*<\/label>\n              <input type=\"text\" id=\"phoneNumArea\" placeholder=\"+852\" required>\n              <div class=\"country-code-dropdown\" id=\"countryCodeDropdown\">\n                <!-- \u4e0b\u62c9\u5185\u5bb9\u5c06\u901a\u8fc7JavaScript\u52a8\u6001\u751f\u6210 -->\n              <\/div>\n            <\/div>\n            <div class=\"form-col\">\n              <label>\u96fb\u8a71\u865f\u78bc*<\/label>\n              <input type=\"text\" id=\"phoneNum\" required>\n            <\/div>\n          <\/div>\n        <\/div>\n\n        <div class=\"form-group\">\n          <label>\u96fb\u90f5\u5730\u5740<\/label>\n          <input type=\"email\" id=\"email\" placeholder=\"@email.com\">\n        <\/div>\n\n        <!-- Appointment Section -->\n        <div class=\"title\">\u9810\u7d04<\/div>\n        <!-- Service Category Dropdown -->\n        <div class=\"form-group\">\n          <label>\u670d\u52d9\u985e\u5225*<\/label>\n          <div class=\"custom-dropdown\" id=\"service-dropdown\">\n            <div class=\"dropdown-header\">\n              <span class=\"dropdown-selected\">\u8acb\u9078\u64c7<\/span>\n              <i class=\"fas fa-chevron-down\"><\/i>\n            <\/div>\n            <div class=\"dropdown-options\">\n            <\/div>\n            <input type=\"hidden\" id=\"service\" required>\n          <\/div>\n        <\/div>\n\n        <!-- Location Dropdown -->\n        <div class=\"form-group\">\n          <label>\u9580\u5e97\u5730\u5740*<\/label>\n          <div class=\"custom-dropdown\" id=\"location-dropdown\">\n            <div class=\"dropdown-header\">\n              <span class=\"dropdown-selected\">\u8acb\u9078\u64c7<\/span>\n              <i class=\"fas fa-chevron-down\"><\/i>\n            <\/div>\n            <div class=\"dropdown-options\">\n            <\/div>\n            <input type=\"hidden\" id=\"location\" required>\n          <\/div>\n        <\/div>\n\n        <!-- Date and Time Section -->\n        <div class=\"title\">\u65e5\u671f\u548c\u6642\u9593<\/div>\n        <div class=\"form-group\">\n          <label>\u53ef\u5230\u8a3a\u65e5\u5b50*<\/label>\n          <div class=\"day-options\">\n            <div class=\"checkbox-option\">\n              <input type=\"checkbox\" id=\"Monday\">\n              <span class=\"checkmark\"><\/span>\n              <span class=\"day-label\">\u661f\u671f\u4e00<\/span>\n            <\/div>\n            <div class=\"checkbox-option\">\n              <input type=\"checkbox\" id=\"Tuesday\">\n              <span class=\"checkmark\"><\/span>\n              <span class=\"day-label\">\u661f\u671f\u4e8c<\/span>\n            <\/div>\n            <div class=\"checkbox-option\">\n              <input type=\"checkbox\" id=\"Wednesday\">\n              <span class=\"checkmark\"><\/span>\n              <span class=\"day-label\">\u661f\u671f\u4e09<\/span>\n            <\/div>\n            <div class=\"checkbox-option\">\n              <input type=\"checkbox\" id=\"Thursday\">\n              <span class=\"checkmark\"><\/span>\n              <span class=\"day-label\">\u661f\u671f\u56db<\/span>\n            <\/div>\n            <div class=\"checkbox-option\">\n              <input type=\"checkbox\" id=\"Friday\">\n              <span class=\"checkmark\"><\/span>\n              <span class=\"day-label\">\u661f\u671f\u4e94<\/span>\n            <\/div>\n            <div class=\"checkbox-option\">\n              <input type=\"checkbox\" id=\"Saturday\">\n              <span class=\"checkmark\"><\/span>\n              <span class=\"day-label\">\u661f\u671f\u516d<\/span>\n            <\/div>\n          <\/div>\n        <\/div>\n\n        <div class=\"form-group\">\n          <label>\u6700\u4f73\u6642\u9593*<\/label>\n          <div class=\"time-options\">\n            <div class=\"option-card\" data-value=\"Morning\">\u4e0a\u5348<\/div>\n            <div class=\"option-card\" data-value=\"Afternoon\">\u4e0b\u5348<\/div>\n            <!-- <div class=\"option-card\" data-value=\"Evening\">Evening<\/div> -->\n            <div class=\"option-card\" data-value=\"Any\">\u4efb\u4f55\u6642\u9593<\/div>\n          <\/div>\n        <\/div>\n\n        <!-- Country\/Region Dropdown -->\n        <div class=\"form-group\">\n          <label>\u5c45\u4f4f\u570b\u5bb6\/\u5730\u5340<\/label>\n          <div class=\"custom-dropdown\" id=\"country-dropdown\">\n            <div class=\"dropdown-header\">\n              <span class=\"dropdown-selected\">\u8acb\u9078\u64c7<\/span>\n              <i class=\"fas fa-chevron-down\"><\/i>\n            <\/div>\n            <div class=\"dropdown-options\">\n              <div class=\"dropdown-option\" data-value=\"China\">\u4e2d\u570b\u5167\u5730 \/ Mainland, China<\/div>\n              <div class=\"dropdown-option\" data-value=\"Hong Kong\">\u4e2d\u570b\u9999\u6e2f\u7279\u5225\u884c\u653f\u5340\/ HKSAR, China<\/div>\n              <div class=\"dropdown-option\" data-value=\"Macau\">\u4e2d\u570b\u6fb3\u9580\u7279\u5225\u884c\u653f\u5340 \/ Macau SAR, China<\/div>\n              <div class=\"dropdown-option\" data-value=\"Taiwan\">\u4e2d\u570b\u53f0\u7063 \/ Taiwan, China\u200b<\/div>\n              <div class=\"dropdown-option\" data-value=\"United States\">\u7f8e\u570b \/ United States<\/div>\n              <div class=\"dropdown-option\" data-value=\"United Kingdom\">\u82f1\u570b \/ United Kingdom<\/div>\n              <div class=\"dropdown-option\" data-value=\"Japan\">\u65e5\u672c \/ Japan<\/div>\n              <div class=\"dropdown-option\" data-value=\"South Korea\">\u97d3\u570b \/ Korea<\/div>\n              <div class=\"dropdown-option\" data-value=\"Singapore\">\u65b0\u52a0\u5761 \/ Singapore<\/div>\n              <div class=\"dropdown-option\" data-value=\"Malaysia\">\u99ac\u4f86\u897f\u4e9e \/ Malaysia<\/div>\n            <\/div>\n            <input type=\"hidden\" id=\"country\">\n          <\/div>\n        <\/div>\n        <!-- Terms Section -->\n        <div class=\"terms-container\">\n          <div class=\"checkbox-option\">\n            <input type=\"checkbox\" id=\"agree1\" name=\"1\" value=\"1\" required>\n            <span class=\"checkmark\"><\/span>\n            <label for=\"agree1\" id=\"agreeLabel\">*\u672c\u4eba\u5df2\u7d93\u95b1\u8b80\u4e26\u540c\u610f <a href=\"https:\/\/www.humansahealth.com\/zh\/policy\/\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"policy-link\">\u79c1\u96b1\u653f\u7b56<\/a><\/label>\n          <\/div>\n          <div class=\"checkbox-option\">\n            <input type=\"checkbox\" id=\"agree2\" name=\"2\" value=\"2\">\n            <span class=\"checkmark\"><\/span>\n            <label for=\"agree2\" id=\"agreeLabel\">\u6211\u540c\u610f\u63a5\u6536\u4f86\u81ea\u4ec1\u5c71\u512a\u793e\u53ca\/ \u6216\u76f8\u95dc\u4ec1\u5c71\u91ab\u7642\u5065\u5eb7\u670d\u52d9\u4f9b\u61c9\u5546\u7684\u6700\u65b0\u8cc7\u8a0a\u53ca\u512a\u60e0\u8a0a\u606f <\/label>\n          <\/div>\n        <\/div>\n\n        <!-- Submit Button -->\n        <button class=\"submit-btn\" id=\"submitBtn\">\u63d0\u4ea4<\/button>\n      <\/div>\n\n      <div class=\"success-message\" id=\"successMessage\">\n        <img decoding=\"async\" src=\"https:\/\/www.humansahealth.com\/wp-content\/uploads\/submit-success-icon.jpg\" alt=\"\" class=\"success-submit-icon\">\n        <p class=\"thankyou\">\u611f\u8b1d\u60a8\u7684\u67e5\u8a62\uff01\u00a0<\/p>\n        <p class=\"success-descript translation-block\">\u6211\u5011\u5df2\u6536\u5230\u60a8\u7684\u8a0a\u606f\uff0c\u5c07\u65bc\u8fa6\u516c\u6642\u9593\u5118\u5feb\u8207\u60a8\u806f\u7e6b\u3002<\/p>\n      <\/div>\n    <\/div>\n\n    <div class=\"page-footer\">\n      <div class=\"footer-layout\">\n        <div class=\"footer-container\">\n          <div class=\"footer-title-box\">\n            <div class=\"footer-title\">\n              <a href=\"https:\/\/www.humansahealth.com\/zh\/about\/\">\n                <p class=\"BeausiteClassic_Light_24px\">\u95dc\u65bc Humansa<\/p>\n              <\/a>\n              <a href=\"https:\/\/www.humansahealth.com\/zh\/contact\/\">\n                <p class=\"BeausiteClassic_Light_24px\">\u806f\u7d61\u6211\u5011<\/p>\n              <\/a>\n              <a href=\"https:\/\/www.humansahealth.com\/zh\/humansa-membership-programme\/\">\n                <p class=\"BeausiteClassic_Light_24px\">\u6703\u54e1\u8a08\u5283<\/p>\n              <\/a>\n            <\/div>\n            <div class=\"footer-title\">\n              <a href=\"https:\/\/www.humansahealth.com\/zh\/terms\/\">\n                <p class=\"BeausiteClassic_Light_24px\">\u4f7f\u7528\u689d\u6b3e<\/p>\n              <\/a>\n              <a href=\"https:\/\/www.humansahealth.com\/zh\/policy\/\">\n                <p class=\"BeausiteClassic_Light_24px\">\u96b1\u79c1\u653f\u7b56<\/p>\n              <\/a>\n            <\/div>\n          <\/div>\n          <div class=\"footer-logo-container\">\n            <div class=\"Follow-us-layout\">\n              <p class=\"footer-logo-title BeausiteClassic_Light_24px\">Follow us on<\/p>\n              <div class=\"footer-logo-box\">\n                <a href=\"https:\/\/www.facebook.com\/HKHumansa\/\">\n                  <img decoding=\"async\" class=\"footer-icon-style\" src=\"https:\/\/www.humansahealth.com\/wp-content\/uploads\/2024\/12\/facebook-v2.png\" alt=\"\">\n                <\/a>\n                <a href=\"https:\/\/www.instagram.com\/humansa\/\">\n                  <img decoding=\"async\" class=\"footer-icon-style\" src=\"https:\/\/www.humansahealth.com\/wp-content\/uploads\/2024\/12\/ins-v2.png\" alt=\"\">\n                <\/a>\n                <a href=\"https:\/\/hk.linkedin.com\/company\/humansa\">\n                  <img decoding=\"async\" class=\"footer-icon-style\" src=\"https:\/\/www.humansahealth.com\/wp-content\/uploads\/2024\/12\/in-v2.png\" alt=\"\">\n                <\/a>\n              <\/div>\n            <\/div>\n            <div class=\"download-app-container\">\n              <p class=\"download-app-title BeausiteClassic_Light_24px\">\u4e0b\u8f09Humansa\u00a0App\u624b\u6a5f\u61c9\u7528\u7a0b\u5f0f<\/p>\n              <div class=\"download-icon-layout\">\n                <a href=\"https:\/\/apps.apple.com\/hk\/app\/humansa\/id1626452088\">\n                  <img decoding=\"async\" src=\"https:\/\/www.humansahealth.com\/wp-content\/uploads\/2024\/12\/AppStore-v2.png\" alt=\"AppStore\" class=\"download-icon-style\">\n                <\/a>\n                <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=hk.com.humansa.prod&hl=en_US&gl=US\">\n                  <img decoding=\"async\" src=\"https:\/\/www.humansahealth.com\/wp-content\/uploads\/2024\/12\/GooglePlay-v2.png\" alt=\"GooglePlay\" class=\"download-icon-style\">\n                <\/a>\n              <\/div>\n            <\/div>\n          <\/div>\n        <\/div>\n        <div class=\"footer-copyright BeausiteClassic_Light_24px\">\n          <p>\u00a9 2025 Humansa. All rights reserved.<\/p>\n        <\/div>\n      <\/div>\n    <\/div>\n\n  <\/div>\n  <!-- <script src=\".\/BookAnAppoinment-scripts.js\"><\/script> -->\n  <script>\n    document.addEventListener(\"DOMContentLoaded\", function () {\n      \/\/ const APIURL = 'https:\/\/fduo3gs5ij.execute-api.ap-southeast-1.amazonaws.com\/dev\/api'\n      const APIURL = 'https:\/\/ddrkwepz6i.execute-api.ap-southeast-1.amazonaws.com\/prod\/api'\n\n      const isZh = window.location.href.includes(\"\/zh\/\");\n\n      \/\/ \u5de5\u5177\u51fd\u6570\n      function pxToRem(px, rootFontSize = 16) {\n        return px \/ rootFontSize;\n      }\n      function pxToVw(px, deviceWidth = 1920) {\n        \/\/ console.log(\"deviceWidth:\", deviceWidth);\n        return (px \/ deviceWidth) * 100;\n      }\n\n\n      function isMobile() {\n        const userAgent = navigator.userAgent || navigator.vendor || window.opera;\n        return \/android\/i.test(userAgent) || \/iPhone|iPad|iPod\/i.test(userAgent);\n      }\n\n      \/\/ \u8bed\u8a00\u5207\u6362\u529f\u80fd\n      const enButton = document.getElementById(\"en-language\");\n      const zhButton = document.getElementById(\"zh-language\");\n\n      if (enButton && zhButton) {\n        enButton.addEventListener(\"click\", function () {\n          updateLanguagePrefix(\"\");\n        });\n\n        zhButton.addEventListener(\"click\", function () {\n          updateLanguagePrefix(\"zh\");\n        });\n      }\n\n      function updateLanguagePrefix(languagePrefix) {\n        const currentUrl = window.location.href;\n        if (languagePrefix && !currentUrl.includes(\"\/zh\/\")) {\n          const newUrl = currentUrl.replace(\n            \/^https:\\\/\\\/www\\.humansahealth\\.com(\\\/.*)?$\/,\n            `https:\/\/www.humansahealth.com\/${languagePrefix}$1`\n          );\n          window.location.href = newUrl;\n        } else if (!languagePrefix && currentUrl.includes(\"\/zh\/\")) {\n          const newUrl = currentUrl.replace(\n            \/(^https:\\\/\\\/www\\.humansahealth\\.com)\\\/zh(\\\/.*)?$\/,\n            \"$1$2\"\n          );\n          window.location.href = newUrl;\n        }\n      }\n\n      \/\/ \u52a0\u5bc6\u51fd\u6570\n      function base64Encrypt(str) {\n        return btoa(unescape(encodeURIComponent(str)));\n      }\n\n      function md5Encrypt(str) {\n        try {\n          return CryptoJS.MD5(str).toString();\n        } catch (error) {\n          console.error('MD5 encryption failed:', error);\n          return 'md5-encryption-failed';\n        }\n      }\n\n      \/\/ \u56fd\u9645\u533a\u53f7\u6570\u636e\n      const countryCodes = [\n        { code: \"+852\", name: \"Hong Kong\" },\n        { code: \"+853\", name: \"Macau\" },\n        { code: \"+86\", name: \"China\" },\n        { code: \"Others\", name: \"Others\" }\n        \/\/ \u53ef\u4ee5\u7ee7\u7eed\u6dfb\u52a0\u66f4\u591a\u56fd\u5bb6\u533a\u53f7\n      ];\n\n      const phoneNumAreaInput = document.getElementById('phoneNumArea');\n      const countryCodeDropdown = document.getElementById('countryCodeDropdown');\n      let isDropdownOpen = false;\n\n      \/\/ \u6e32\u67d3\u4e0b\u62c9\u5217\u8868\n      function renderDropdown(filter = '') {\n        countryCodeDropdown.innerHTML = '';\n\n        const filteredCodes = countryCodes.filter(item =>\n          item.code.toLowerCase().includes(filter.toLowerCase()) ||\n          item.name.toLowerCase().includes(filter.toLowerCase())\n        );\n\n        if (filteredCodes.length === 0) {\n          const noResultItem = document.createElement('div');\n          noResultItem.className = 'country-code-item';\n          noResultItem.textContent = 'No results found';\n          countryCodeDropdown.appendChild(noResultItem);\n          return;\n        }\n\n        filteredCodes.forEach(item => {\n          const itemElement = document.createElement('div');\n          itemElement.className = 'country-code-item';\n          itemElement.innerHTML = `\n          <span>${highlightMatch(item.code, filter)}<\/span>\n          <span>${highlightMatch(item.name, filter)}<\/span>\n        `;\n          itemElement.addEventListener('click', () => {\n            phoneNumAreaInput.value = item.code;\n            closeDropdown();\n          });\n          countryCodeDropdown.appendChild(itemElement);\n        });\n      }\n\n      \/\/ \u9ad8\u4eae\u5339\u914d\u6587\u672c\n      function highlightMatch(text, filter) {\n        if (!filter) return text;\n\n        const lowerText = text.toLowerCase();\n        const lowerFilter = filter.toLowerCase();\n        const startIndex = lowerText.indexOf(lowerFilter);\n\n        if (startIndex === -1) return text;\n\n        const endIndex = startIndex + filter.length;\n        return `\n        ${text.substring(0, startIndex)}\n        <span class=\"highlight\">${text.substring(startIndex, endIndex)}<\/span>\n        ${text.substring(endIndex)}\n      `;\n      }\n\n      \/\/ \u6253\u5f00\u4e0b\u62c9\u5217\u8868\n      function openDropdown() {\n        countryCodeDropdown.classList.add('show');\n        isDropdownOpen = true;\n        renderDropdown();\n      }\n\n      \/\/ \u5173\u95ed\u4e0b\u62c9\u5217\u8868\n      function closeDropdown() {\n        countryCodeDropdown.classList.remove('show');\n        isDropdownOpen = false;\n      }\n\n      \/\/ \u8f93\u5165\u6846\u4e8b\u4ef6\u76d1\u542c\n      phoneNumAreaInput.addEventListener('focus', () => {\n        openDropdown();\n      });\n\n      phoneNumAreaInput.addEventListener('input', (e) => {\n        renderDropdown(e.target.value);\n      });\n\n      \/\/ \u70b9\u51fb\u6587\u6863\u5176\u4ed6\u5730\u65b9\u5173\u95ed\u4e0b\u62c9\n      document.addEventListener('click', (e) => {\n        if (!phoneNumAreaInput.contains(e.target) && !countryCodeDropdown.contains(e.target)) {\n          closeDropdown();\n        }\n      });\n\n\n\n      async function sha512Encrypt(str) {\n        try {\n          const msgBuffer = new TextEncoder().encode(str);\n          const hashBuffer = await crypto.subtle.digest('SHA-512', msgBuffer);\n          const hashArray = Array.from(new Uint8Array(hashBuffer));\n          return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');\n        } catch (error) {\n          console.error('SHA-512 encryption failed:', error);\n          return 'sha512-encryption-failed';\n        }\n      }\n\n      function generateRandomString(length) {\n        const characters = 'abcdefghijklmnopqrstuvwxyz0123456789';\n        let result = '';\n        const charactersLength = characters.length;\n        for (let i = 0; i < length; i++) {\n          result += characters.charAt(Math.floor(Math.random() * charactersLength));\n        }\n        return result;\n      }\n      \/\/ Location\u9009\u9879\u70b9\u51fb\u5904\u7406\u51fd\u6570\n      function handleLocationOptionClick(event) {\n        const option = event.target.closest('.dropdown-option');\n        if (!option) return;\n\n        event.stopPropagation();\n\n        const dropdown = option.closest('.custom-dropdown');\n        if (!dropdown) {\n          console.warn('Dropdown container not found for option:', option);\n          return;\n        }\n\n        const header = dropdown.querySelector('.dropdown-header');\n        const selectedSpan = header ? header.querySelector('.dropdown-selected') : null;\n        const hiddenInput = dropdown.querySelector('input[type=\"hidden\"]');\n\n        \/\/ \u66f4\u65b0\u9009\u62e9\u7684\u6587\u672c\n        if (selectedSpan) {\n          selectedSpan.textContent = option.textContent;\n          selectedSpan.classList.remove('placeholder'); \/\/ \u79fb\u9664placeholder\u6837\u5f0f\n        }\n\n        \/\/ \u66f4\u65b0\u9690\u85cf\u8f93\u5165\u503c\n        if (hiddenInput) {\n          hiddenInput.value = option.dataset.value || option.textContent;\n        }\n\n        \/\/ \u5173\u95ed\u4e0b\u62c9\u6846\n        if (header) {\n          header.classList.remove('open');\n        }\n\n        const optionsContainer = option.closest('.dropdown-options');\n        if (optionsContainer) {\n          optionsContainer.classList.remove('open');\n        }\n\n        \/\/ \u6dfb\u52a0\u9009\u62e9\u72b6\u6001\n        dropdown.querySelectorAll('.dropdown-option').forEach(opt => {\n          opt.classList.remove('selected');\n        });\n        option.classList.add('selected');\n\n        \/\/ \u89e6\u53d1\u9a8c\u8bc1\uff08\u5982\u679c\u5b58\u5728\u9a8c\u8bc1\u51fd\u6570\uff09\n        if (hiddenInput && hiddenInput.required && typeof validateField === 'function') {\n          const error = validateField(hiddenInput.id, hiddenInput.value);\n          if (error) {\n            if (typeof showError === 'function') {\n              showError(dropdown, error);\n            }\n          } else {\n            if (typeof clearError === 'function') {\n              clearError(dropdown);\n            }\n          }\n        }\n\n        \/\/ console.log('Location selected:', option.textContent, 'Value:', option.dataset.value);\n      }\n\n      function renderLocationOptions(locations) {\n        const locationDropdown = document.getElementById('location-dropdown');\n        const locationOptions = locationDropdown.querySelector('.dropdown-options');\n        const currentSelected = locationDropdown.querySelector('.dropdown-selected');\n        const hiddenInput = locationDropdown.querySelector('input[type=\"hidden\"]');\n\n        \/\/ \u6e05\u7a7a\u73b0\u6709\u9009\u9879\n        locationOptions.innerHTML = '';\n\n        \/\/ \u79fb\u9664\u4e4b\u524d\u7684\u4e8b\u4ef6\u76d1\u542c\u5668\n        locationOptions.removeEventListener('click', handleLocationOptionClick);\n\n        if (isZh) {\n          \/\/ \u6dfb\u52a0\u65b0\u9009\u9879\n          console.log('isZh');\n          console.log('locations', locations);\n\n\n          locations.forEach(location => {\n            const option = document.createElement('div');\n            option.className = 'dropdown-option';\n            option.setAttribute('data-value', location.value);\n            option.textContent = location.cn;\n            locationOptions.appendChild(option);\n          });\n        } else {\n          \/\/ \u6dfb\u52a0\u65b0\u9009\u9879\n          locations.forEach(location => {\n            const option = document.createElement('div');\n            option.className = 'dropdown-option';\n            option.setAttribute('data-value', location.value);\n            option.textContent = location.en;\n            locationOptions.appendChild(option);\n          });\n        }\n\n\n        \/\/ \u91cd\u65b0\u7ed1\u5b9a\u4e8b\u4ef6\u76d1\u542c\u5668\uff08\u4f7f\u7528\u4e8b\u4ef6\u59d4\u6258\uff09\n        locationOptions.addEventListener('click', handleLocationOptionClick);\n\n        \/\/ \u91cd\u7f6e\u9009\u62e9\u72b6\u6001\n        currentSelected.textContent = 'Please select';\n        currentSelected.classList.add('placeholder');\n        hiddenInput.value = '';\n\n        \/\/ console.log('Location options rendered and events bound:', locations.length, 'options');\n      }\n\n      async function filterLocationOptions(selectedService) {\n        try {\n          const LocationApiUrl = `${APIURL}\/web\/getLocationByService`;\n\n          let key = await getKeyFn();\n          const params = { key: key, service: selectedService };\n          const bodyParams = JSON.stringify(params);\n          const encodedText = base64Encrypt(bodyParams);\n\n          const response = await fetch(LocationApiUrl, {\n            method: 'POST',\n            body: encodedText,\n          });\n          if (!response.ok) {\n            throw new Error(`HTTP error! status: ${response.status}`);\n          }\n\n          const res = await response.json();\n          const { code, data } = res;\n          if (code === 200 && data && Array.isArray(data) && data.length > 0) {\n            \/\/ \u6e32\u67d3\u4f4d\u7f6e\u9009\u9879\n            renderLocationOptions(data);\n          }\n        } catch (error) {\n          console.error('Error fetching locations:', error);\n        }\n      }\n\n      \/\/ \u4fee\u590d\u540e\u7684Service Category\u4e8b\u4ef6\u5904\u7406\n      function setupServiceCategoryEvents() {\n        const serviceDropdown = document.getElementById('service-dropdown');\n        if (!serviceDropdown) {\n          console.warn('Service dropdown not found');\n          return;\n        }\n\n        \/\/ \u4e3a\u670d\u52a1\u9009\u9879\u6dfb\u52a0\u70b9\u51fb\u4e8b\u4ef6\uff08\u4f7f\u7528\u4e8b\u4ef6\u59d4\u6258\uff09\n        const serviceOptionsContainer = serviceDropdown.querySelector('.dropdown-options');\n        if (!serviceOptionsContainer) {\n          console.warn('Service options container not found');\n          return;\n        }\n\n        \/\/ \u79fb\u9664\u4e4b\u524d\u7684\u4e8b\u4ef6\u76d1\u542c\u5668\uff08\u5982\u679c\u5b58\u5728\uff09\n        serviceOptionsContainer.removeEventListener('click', handleServiceOptionClick);\n\n        \/\/ \u4f7f\u7528\u4e8b\u4ef6\u59d4\u6258\u5904\u7406\u9009\u9879\u70b9\u51fb\n        serviceOptionsContainer.addEventListener('click', handleServiceOptionClick);\n\n        \/\/ \u670d\u52a1\u9009\u9879\u70b9\u51fb\u5904\u7406\u51fd\u6570\n        function handleServiceOptionClick(event) {\n          \/\/ \u786e\u4fdd\u70b9\u51fb\u7684\u662fdropdown-option\u5143\u7d20\n          const option = event.target.closest('.dropdown-option');\n          if (!option) return;\n\n          event.stopPropagation();\n\n          const dropdown = option.closest('.custom-dropdown');\n          if (!dropdown) {\n            console.warn('Dropdown container not found for option:', option);\n            return;\n          }\n\n          const header = dropdown.querySelector('.dropdown-header');\n          const selectedSpan = header ? header.querySelector('.dropdown-selected') : null;\n          const hiddenInput = dropdown.querySelector('input[type=\"hidden\"]');\n\n          \/\/ \u66f4\u65b0\u9009\u62e9\u7684\u6587\u672c\n          if (selectedSpan) {\n            selectedSpan.textContent = option.textContent;\n          }\n\n          \/\/ \u66f4\u65b0\u9690\u85cf\u8f93\u5165\u503c\n          if (hiddenInput) {\n            hiddenInput.value = option.dataset.value || option.textContent;\n          }\n\n          \/\/ \u5173\u95ed\u4e0b\u62c9\u6846\n          if (header) {\n            header.classList.remove('open');\n          }\n\n          const optionsContainer = option.closest('.dropdown-options');\n          if (optionsContainer) {\n            optionsContainer.classList.remove('open');\n          }\n\n          \/\/ \u6dfb\u52a0\u9009\u62e9\u72b6\u6001\n          dropdown.querySelectorAll('.dropdown-option').forEach(opt => {\n            opt.classList.remove('selected');\n          });\n          option.classList.add('selected');\n\n          \/\/ \u89e6\u53d1\u9a8c\u8bc1\uff08\u5982\u679c\u5b58\u5728\u9a8c\u8bc1\u51fd\u6570\uff09\n          if (hiddenInput && hiddenInput.required && typeof validateField === 'function') {\n            const error = validateField(hiddenInput.id, hiddenInput.value);\n            if (error) {\n              if (typeof showError === 'function') {\n                showError(dropdown, error);\n              }\n            } else {\n              if (typeof clearError === 'function') {\n                clearError(dropdown);\n              }\n            }\n          }\n\n          const selectedService = option.dataset.value || option.textContent;\n          \/\/ console.log('Service selected:', selectedService);\n\n          \/\/ \u5ef6\u8fdf\u6267\u884c\u4ee5\u786e\u4fdd\u72b6\u6001\u5df2\u66f4\u65b0\n          setTimeout(() => {\n            filterLocationOptions(selectedService);\n          }, 50);\n        }\n\n        \/\/ console.log('Service category events setup completed');\n      }\n\n      async function getKeyFn() {\n        const webkey = 'webPersonData';\n        const generatedString = generateRandomString(8);\n        const webkeyString = webkey + generatedString;\n        const base64Key = base64Encrypt(webkeyString);\n        const md5Key = await md5Encrypt(base64Key);\n        const finalKey = await sha512Encrypt(md5Key);\n        const key = generatedString + finalKey;\n        return key;\n      }\n\n      \/\/ API\u8c03\u7528\u83b7\u53d6\u670d\u52a1\u9009\u9879\n      async function getServices() {\n        const ServicesApiUrl = `${APIURL}\/web\/getService`;\n\n        try {\n          let key = await getKeyFn();\n          const params = { key: key };\n          const bodyParams = JSON.stringify(params);\n          const encodedText = base64Encrypt(bodyParams);\n\n          const response = await fetch(ServicesApiUrl, {\n            method: 'POST',\n            body: encodedText,\n          });\n\n          if (!response.ok) {\n            throw new Error(`HTTP error! status: ${response.status}`);\n          }\n\n          const res = await response.json();\n          const { code, data } = res;\n\n          if (code === 200 && Array.isArray(data)) {\n            \/\/ console.log('Services loaded successfully:', data);\n\n            \/\/ \u83b7\u53d6dropdown\u5bb9\u5668\n            const serviceDropdownOptions = document.querySelector('#service-dropdown .dropdown-options');\n\n            if (!serviceDropdownOptions) {\n              console.error('Service dropdown options container not found');\n              return;\n            }\n\n            \/\/ \u6e05\u9664\u73b0\u6709\u9009\u9879\n            serviceDropdownOptions.innerHTML = '';\n\n            if (isZh) {\n              \/\/ console.log('is zh');\n\n              \/\/ \u6dfb\u52a0\u65b0\u9009\u9879\n              data.forEach(item => {\n                const option = document.createElement('div');\n                option.className = 'dropdown-option';\n                option.dataset.value = item.value;\n                option.textContent = item.cn;\n                serviceDropdownOptions.appendChild(option);\n              });\n            } else {\n              \/\/ console.log('is en');\n              \/\/ \u6dfb\u52a0\u65b0\u9009\u9879\n              data.forEach(item => {\n                const option = document.createElement('div');\n                option.className = 'dropdown-option';\n                option.dataset.value = item.value;\n                option.textContent = item.en;\n                serviceDropdownOptions.appendChild(option);\n              });\n            }\n\n\n            \/\/ \u91cd\u65b0\u8bbe\u7f6eService Category\u4e8b\u4ef6\u76d1\u542c\u5668\n            setupServiceCategoryEvents();\n\n            \/\/ console.log('Service options updated and events rebound');\n          } else {\n            console.error('Invalid API response:', res);\n          }\n        } catch (error) {\n          console.error('Error fetching services:', error);\n\n          \/\/ \u5982\u679cAPI\u8c03\u7528\u5931\u8d25\uff0c\u4ecd\u7136\u8bbe\u7f6e\u57fa\u672c\u7684\u76d1\u542c\u5668\n          setupServiceCategoryEvents();\n        }\n      }\n\n      \/\/ \u8868\u5355\u9a8c\u8bc1\u914d\u7f6e\n      const requiredFields = {\n        'firstName': {\n          validate: (value) => value.trim().length >= 2,\n          message: isZh ? '\u540d\u5b57\u5fc5\u9808\u81f3\u5c11\u6709\u5169\u500b\u5b57\u7b26\u3002' : 'First name must be at least 2 characters'\n        },\n        'lastName': {\n          validate: (value) => value.trim().length >= 2,\n          message: isZh ? '\u59d3\u6c0f\u5fc5\u9808\u81f3\u5c11\u6709\u5169\u500b\u5b57\u7b26\u3002' : 'Last name must be at least 2 characters'\n        },\n        'email': {\n          validate: (value) => {\n            \/\/ Only validate if there's a value\n            if (value.trim() === '') return true;\n            return \/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\/.test(value.trim());\n          },\n          message: isZh ? '\u8acb\u586b\u5beb\u6b63\u78ba\u6709\u6548\u7684\u96fb\u90f5\u5730\u5740\u3002\u200b' : 'Please enter a valid email address'\n        },\n        'phoneNumArea': {\n          message: isZh ? '\u8acb\u9078\u64c7\u60a8\u7684\u5340\u865f\u3002' : 'Please select a Country code',\n          validate: (value) => ['+852', '+853', '+86', 'Others'].includes(value),\n        },\n        'phoneNum': {\n          validate: (value, formData) => {\n            const phoneNum = value.trim().replace(\/\\s\/g, '');\n            const areaCode = formData?.phoneNumArea;\n\n            \/\/ First check if it's empty\n            if (!phoneNum) {\n              return false;\n            }\n\n            \/\/ Then apply specific validation based on area code\n            switch (areaCode) {\n              case '+852': \/\/ Hong Kong\n                return \/^[569]\\d{7}$\/.test(phoneNum);\n              case '+853': \/\/ Macau\n                return \/^6\\d{7}$\/.test(phoneNum);\n              case '+86': \/\/ Mainland China\n                return \/^1[3-9]\\d{9}$\/.test(phoneNum);\n              case 'Others': \/\/ Other regions\n                return \/^\\d{7,50}$\/.test(phoneNum);\n              default:\n                return false;\n            }\n          },\n          message: (value, formData) => {\n            const phoneNum = value.trim();\n            const areaCode = formData?.phoneNumArea;\n\n            \/\/ First check if it's empty\n            if (!phoneNum) {\n              return isZh ? '\u96fb\u8a71\u865f\u78bc\u5fc5\u586b\u3002' : 'Phone number is required';\n            }\n\n            \/\/ Then provide specific messages based on area code\n            switch (areaCode) {\n              case '+852':\n                return isZh ? '\u9999\u6e2f\u7684\u6578\u5b57\u5fc5\u9808\u70ba8\u4f4d\uff0c\u5f9e5,6\u62169\u958b\u982d' : 'Hong Kong number must be 8 digits starting with 5,6 or 9';\n              case '+853':\n                return isZh ? '\u6fb3\u9580\u865f\u78bc\u5fc5\u9808\u662f8\u4f4d\u6578\uff0c\u4e26\u4ee56\u958b\u982d\u3002' : 'Macau number must be 8 digits starting with 6';\n              case '+86':\n                return isZh ? '\u4e2d\u570b\u5927\u9678\u865f\u78bc\u5fc5\u9808\u662f11\u4f4d\u6578\uff0c\u4e26\u4ee51\u958b\u982d\u3002' : 'Mainland China number must be 11 digits starting with 1';\n              case 'Others':\n                return isZh ? '\u96fb\u8a71\u865f\u78bc\u5fc5\u9808\u662f7\u81f350\u4f4d\u6578\u5b57\u3002' : 'Phone number must be 7-50 digits';\n              default:\n                return isZh ? '\u8acb\u586b\u5beb\u6b63\u78ba\u6709\u6548\u7684\u96fb\u8a71\u865f\u78bc\u3002' : 'Please enter a valid phone number';\n            }\n          }\n        },\n        'service': {\n          validate: (value) => value !== '',\n          message: isZh ? '\u8acb\u9078\u64c7\u60a8\u7684\u670d\u52d9\u3002' : 'Please select a service category'\n        },\n        'agree1': {\n          validate: (value) => value === '1',\n          message: isZh ? '\u60a8\u5fc5\u9808\u540c\u610f\u96b1\u79c1\u653f\u7b56\u3002' : 'You must agree to the privacy policy.'\n        },\n      };\n\n      \/\/ \u81ea\u5b9a\u4e49\u9a8c\u8bc1\u51fd\u6570\n      const customValidations = {\n        existingPatient: () => {\n          const selected = document.querySelector('#existing-patient-options .option-card.selected');\n          return selected !== null;\n        },\n        daySelection: () => {\n          const checked = document.querySelectorAll('.day-options input[type=\"checkbox\"]:checked');\n          return checked.length > 0;\n        },\n        timeSelection: () => {\n          const selected = document.querySelectorAll('.time-options .option-card.selected');\n          return selected.length > 0;\n        },\n        agreement: () => {\n          const agree1Checked = document.getElementById('agree1');\n          return agree1Checked ? agree1Checked.checked : false;\n        },\n        agreement2: () => {\n          const agree2Checked = document.getElementById('agree2');\n          return agree2Checked ? agree2Checked.checked : false;\n        }\n      };\n\n      \/\/ \u66f4\u65b0showError\u548cclearError\u51fd\u6570\u4ee5\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u5143\u7d20\n      function showError(element, message) {\n        let container = element;\n\n        \/\/ \u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u5143\u7d20\u5bb9\u5668\n        if (element.classList.contains('option-card') ||\n          element.classList.contains('checkbox-option') ||\n          element.classList.contains('day-options') ||\n          element.classList.contains('time-options')) {\n          container = element.parentNode;\n        } else if (element.type === 'checkbox') {\n          container = element.closest('.checkbox-option');\n        } else if (element.classList.contains('custom-dropdown')) {\n          \/\/ \u4e0b\u62c9\u6846\u5df2\u7ecf\u662f\u4e00\u4e2a\u5bb9\u5668\n        } else {\n          container = element.parentNode;\n        }\n\n        \/\/ \u6e05\u9664\u73b0\u6709\u9519\u8bef\n        clearError(element);\n\n        \/\/ \u6dfb\u52a0\u9519\u8bef\u6837\u5f0f\n        \/\/ container.classList.add('field-error');\n\n        \/\/ \u521b\u5efa\u6216\u66f4\u65b0\u9519\u8bef\u6d88\u606f\n        let errorDiv = container.querySelector('.error-message');\n        if (!errorDiv) {\n          errorDiv = document.createElement('div');\n          errorDiv.className = 'error-message';\n          container.appendChild(errorDiv);\n        }\n        errorDiv.textContent = message;\n      }\n      function clearError(element) {\n        let container = element;\n\n        \/\/ \u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u5143\u7d20\u5bb9\u5668\n        if (element.classList.contains('option-card') ||\n          element.classList.contains('checkbox-option') ||\n          element.classList.contains('day-options') ||\n          element.classList.contains('time-options')) {\n          container = element.parentNode;\n        } else if (element.type === 'checkbox') {\n          container = element.closest('.checkbox-option');\n        } else if (element.classList.contains('custom-dropdown')) {\n          \/\/ \u4e0b\u62c9\u6846\u5df2\u7ecf\u662f\u4e00\u4e2a\u5bb9\u5668\n        } else {\n          container = element.parentNode;\n        }\n\n        \/\/ \u79fb\u9664\u9519\u8bef\u6837\u5f0f\n        \/\/ container.classList.remove('field-error');\n\n        \/\/ \u79fb\u9664\u9519\u8bef\u6d88\u606f\n        const errorDiv = container.querySelector('.error-message');\n        if (errorDiv) {\n          errorDiv.remove();\n        }\n      }\n\n      function clearAllErrors() {\n        document.querySelectorAll('.error-message').forEach(el => {\n          el.remove();\n        });\n      }\n\n      function validateField(fieldId, value) {\n        const field = requiredFields[fieldId];\n\n        \/\/ Skip validation for empty email\n        if (fieldId === 'email' && value.trim() === '') {\n          return null;\n        }\n\n        if (field && !field.validate(value)) {\n          return field.message;\n        }\n        return null;\n      }\n      \/\/ \u901a\u7528\u9a8c\u8bc1\u548c\u663e\u793a\u9519\u8bef\u51fd\u6570\n      function validateAndShowError(element, fieldId, value) {\n        const fieldConfig = requiredFields[fieldId];\n        if (!fieldConfig) return;\n        \/\/ Skip validation for empty email\n        if (fieldId === 'email' && value.trim() === '') {\n          clearError(element);\n          return;\n        }\n        \/\/ \u7279\u6b8a\u5904\u7406\u8868\u5355\u6570\u636e\u4f9d\u8d56\u7684\u60c5\u51b5\n        let formData = null;\n        if (fieldId === 'phoneNum') {\n          formData = {\n            phoneNumArea: document.getElementById('phoneNumArea')?.value || ''\n          };\n        }\n\n        const error = fieldConfig.validate\n          ? (typeof fieldConfig.validate === 'function'\n            ? !fieldConfig.validate(value, formData || {})\n            : !fieldConfig.validate)\n          : false;\n\n        if (error) {\n          const errorMessage = typeof fieldConfig.message === 'function'\n            ? fieldConfig.message(value, formData || {})\n            : fieldConfig.message;\n          showError(element, errorMessage);\n        } else {\n          clearError(element);\n        }\n      }\n      \/\/ \u66f4\u65b0\u5b9e\u65f6\u9a8c\u8bc1\u8bbe\u7f6e\u51fd\u6570\n      function setupRealTimeValidation() {\n        \/\/ \u6587\u672c\u8f93\u5165\u6846 - \u8f93\u5165\u65f6\u5b9e\u65f6\u9a8c\u8bc1\n        ['firstName', 'lastName', 'email', 'phoneNum'].forEach(fieldId => {\n          const element = document.getElementById(fieldId);\n          if (element) {\n            element.addEventListener('input', function () {\n              validateAndShowError(this, fieldId, this.value);\n            });\n          }\n        });\n\n        \/\/ \u7535\u8bdd\u533a\u53f7 - \u7279\u6b8a\u5904\u7406\n        const phoneNumAreaInput = document.getElementById('phoneNumArea');\n        if (phoneNumAreaInput) {\n          phoneNumAreaInput.addEventListener('change', function () {\n            validateAndShowError(this, 'phoneNumArea', this.value);\n            \/\/ \u540c\u65f6\u9a8c\u8bc1\u7535\u8bdd\u53f7\u7801\uff0c\u56e0\u4e3a\u9a8c\u8bc1\u89c4\u5219\u4f9d\u8d56\u4e8e\u533a\u53f7\n            const phoneNumInput = document.getElementById('phoneNum');\n            if (phoneNumInput && phoneNumInput.value) {\n              validateAndShowError(phoneNumInput, 'phoneNum', phoneNumInput.value);\n            }\n          });\n        }\n\n        \/\/ \u670d\u52a1\u7c7b\u522b\u548c\u4f4d\u7f6e\u4e0b\u62c9\u6846\n        ['service', 'location'].forEach(fieldId => {\n          const dropdown = document.getElementById(`${fieldId}-dropdown`);\n          if (dropdown) {\n            const hiddenInput = dropdown.querySelector('input[type=\"hidden\"]');\n            if (hiddenInput) {\n              \/\/ \u76d1\u542c\u81ea\u5b9a\u4e49\u4e8b\u4ef6\u6216\u76f4\u63a5\u89c2\u5bdf\u503c\u53d8\u5316\n              hiddenInput.addEventListener('change', function () {\n                validateAndShowError(dropdown, fieldId, this.value);\n              });\n            }\n          }\n        });\n\n        \/\/ \u5355\u9009\u6309\u94ae\u7ec4\n        document.querySelectorAll('.salutation-options .option-card').forEach(card => {\n          card.addEventListener('click', function () {\n            const selected = this.parentNode.querySelector('.option-card.selected');\n            if (selected) {\n              validateAndShowError(this.parentNode, 'salutation', selected.dataset.value);\n            }\n          });\n        });\n\n        \/\/ \u73b0\u6709\u60a3\u8005\u9009\u62e9\n        document.querySelectorAll('#existing-patient-options .option-card').forEach(card => {\n          card.addEventListener('click', function () {\n            const selected = this.parentNode.querySelector('.option-card.selected');\n            if (selected) {\n              validateAndShowError(this.parentNode, 'existingPatient', selected.dataset.value);\n            }\n          });\n        });\n\n        \/\/ \u65f6\u95f4\u9009\u62e9\n        document.querySelectorAll('.time-options .option-card').forEach(card => {\n          card.addEventListener('click', function () {\n            const selected = this.parentNode.querySelector('.option-card.selected');\n            if (selected) {\n              validateAndShowError(this.parentNode, 'timeOfDay', selected.dataset.value);\n            }\n          });\n        });\n\n        \/\/ \u65e5\u671f\u9009\u62e9\n        document.querySelectorAll('.day-options input[type=\"checkbox\"]').forEach(checkbox => {\n          checkbox.addEventListener('change', function () {\n            const checked = Array.from(document.querySelectorAll('.day-options input[type=\"checkbox\"]:checked')).length > 0;\n            validateAndShowError(this.closest('.day-options'), 'daysOfWeek', checked ? 'selected' : '');\n          });\n        });\n\n        \/\/ \u9690\u79c1\u653f\u7b56\u590d\u9009\u6846\n        const agreeCheckbox = document.getElementById('agree1');\n        if (agreeCheckbox) {\n          agreeCheckbox.addEventListener('change', function () {\n            validateAndShowError(this, 'agree1', this.checked ? this.value : '');\n          });\n        }\n\n        \/\/ \u9690\u79c1\u653f\u7b56\u590d\u9009\u68462\n        const agreeCheckbox2 = document.getElementById('agree2');\n        if (agreeCheckbox2) {\n          agreeCheckbox2.addEventListener('change', function () {\n            validateAndShowError(this, 'agree2', this.checked ? this.value : '');\n          });\n        }\n      }\n\n      \/\/ \u8868\u5355\u9a8c\u8bc1\n      function validateForm() {\n        let isValid = true;\n        clearAllErrors();\n\n        \/\/ \u9a8c\u8bc1\u5b57\u6bb5\n        Object.keys(requiredFields).forEach(fieldId => {\n          const element = document.getElementById(fieldId);\n          if (element) {\n            const value = element.type === 'checkbox' ? (element.checked ? element.value : '') : element.value;\n\n            \/\/ Special handling for phoneNum to include phoneNumArea in validation\n            if (fieldId === 'phoneNum') {\n              const formData = {\n                phoneNumArea: document.getElementById('phoneNumArea')?.value || ''\n              };\n              const error = requiredFields[fieldId].validate(value, formData)\n                ? null\n                : typeof requiredFields[fieldId].message === 'function'\n                  ? requiredFields[fieldId].message(value, formData)\n                  : requiredFields[fieldId].message;\n\n              if (error) {\n                showError(element, error);\n                isValid = false;\n              }\n            } else {\n              \/\/ Normal field validation\n              const error = validateField(fieldId, value);\n              if (error) {\n                showError(element, error);\n                isValid = false;\n              }\n            }\n          }\n        });\n\n        \/\/ \u9a8c\u8bc1\u81ea\u5b9a\u4e49\u5b57\u6bb5\n        if (!customValidations.existingPatient()) {\n          const container = document.querySelector('#existing-patient-options');\n          if (container) {\n            const errorDiv = document.createElement('div');\n            errorDiv.className = 'error-message';\n            errorDiv.textContent = isZh ? '\u8acb\u9078\u64c7\u60a8\u662f\u5426\u70ba\u73fe\u6709\u5ba2\u6236' : 'Please select whether you are an existing patient';\n            container.parentNode.appendChild(errorDiv);\n            isValid = false;\n          }\n        }\n\n        if (!customValidations.daySelection()) {\n          const container = document.querySelector('.day-options');\n          if (container) {\n            const errorDiv = document.createElement('div');\n            errorDiv.className = 'error-message';\n            errorDiv.textContent = isZh ? '\u8acb\u9078\u64c7\u60a8\u7684\u9810\u7d04\u65e5\u671f\u3002' : 'Please select at least one available day';\n            container.parentNode.appendChild(errorDiv);\n            isValid = false;\n          }\n        }\n\n        if (!customValidations.timeSelection()) {\n          const container = document.querySelector('.time-options');\n          if (container) {\n            const errorDiv = document.createElement('div');\n            errorDiv.className = 'error-message';\n            errorDiv.textContent = isZh ? '\u8acb\u9078\u64c7\u60a8\u7684\u9810\u7d04\u6642\u9593\u3002' : 'Please select your preferred time of day';\n            container.parentNode.appendChild(errorDiv);\n            isValid = false;\n          }\n        }\n\n        return isValid;\n      }\n      function getCookie(cookieName) {\n        var name = cookieName + \"=\";\n        var decodedCookie = decodeURIComponent(document.cookie);\n        var cookieArray = decodedCookie.split(';');\n\n        for (var i = 0; i < cookieArray.length; i++) {\n          var cookie = cookieArray[i];\n          while (cookie.charAt(0) == ' ') {\n            cookie = cookie.substring(1);\n          }\n          if (cookie.indexOf(name) == 0) {\n            return cookie.substring(name.length, cookie.length);\n          }\n        }\n        return \"\"; \/\/ \u5982\u679c\u672a\u627e\u5230\u8be5cookie\uff0c\u8fd4\u56de\u7a7a\u5b57\u7b26\u4e32\n      }\n\n      \/\/ \u83b7\u53d6\u8868\u5355\u6570\u636e\n      async function getFormData() {\n        const data = {};\n        const webKey = 'webPersonData';\n        const phoneNumArea = document.getElementById('phoneNumArea')?.value.replace(\/^\\+\/, '') || '';\n        const phoneNum = document.getElementById('phoneNum')?.value || '';\n\n        \/\/ \u4ece cookie \u4e2d\u83b7\u53d6 source \u548c url\n        data.source = getCookie('traffic_source') || '';\n        data.url = window.location.href;\n        try {\n          if (window.crypto && crypto.subtle) {\n            const rawKey = webKey + phoneNumArea + phoneNum;\n            const base64Key = base64Encrypt(rawKey);\n            const md5Key = await md5Encrypt(base64Key);\n            const finalKey = await sha512Encrypt(md5Key);\n            data.key = finalKey;\n          } else {\n            data.key = 'encryption-not-available';\n          }\n\n          \/\/ \u6536\u96c6\u8868\u5355\u6570\u636e\n          document.querySelectorAll('input[type=\"text\"], input[type=\"email\"]').forEach(input => {\n            if (input.id === 'phoneNumArea') {\n              data[input.id] = input.value.replace(\/^\\+\/, '').trim();\n            } else {\n              data[input.id] = input.value.trim();\n            }\n          });\n\n          \/\/ \u83b7\u53d6\u4e0b\u62c9\u6846\u503c\n          const serviceDropdown = document.getElementById('service-dropdown');\n          if (serviceDropdown) {\n            const serviceInput = serviceDropdown.querySelector('input[type=\"hidden\"]');\n            data.service = serviceInput ? serviceInput.value : '';\n          }\n\n          const locationDropdown = document.getElementById('location-dropdown');\n          if (locationDropdown) {\n            const locationInput = locationDropdown.querySelector('input[type=\"hidden\"]');\n            data.location = locationInput ? locationInput.value : '';\n          }\n\n          const countryDropdown = document.getElementById('country-dropdown');\n          if (countryDropdown) {\n            const countryInput = countryDropdown.querySelector('input[type=\"hidden\"]');\n            data.country = countryInput ? countryInput.value : '';\n          }\n\n          \/\/ \u83b7\u53d6\u5176\u4ed6\u9009\u62e9\n          const salutation = document.querySelector('.salutation-options .option-card.selected');\n          data.salutation = salutation ? salutation.dataset.value : '';\n\n          const existingPatient = document.querySelector('#existing-patient-options .option-card.selected');\n          data.existingPatient = existingPatient ? existingPatient.dataset.value : '';\n\n          \/\/ \u83b7\u53d6\u4e0b\u62c9\u9009\u62e9\n          document.querySelectorAll('select').forEach(select => {\n            if (select.value) {\n              data[select.id] = select.value;\n            }\n          });\n\n          \/\/ \u53ef\u7528\u5929\u6570\n          data.daysOfWeek = Array.from(document.querySelectorAll('.day-options input[type=\"checkbox\"]:checked'))\n            .map(cb => cb.id)\n            .join(',');\n\n          \/\/ \u65f6\u95f4\u504f\u597d\n          data.timeOfDay = Array.from(document.querySelectorAll('.time-options .option-card.selected'))\n            .map(card => card.dataset.value)\n            .join(',');\n\n          \/\/ \u534f\u8bae\n          \/\/ data.communications = document.getElementById('agree1').checked ? '1' : '0';\n          data.communications = Array.from(document.querySelectorAll('.terms-container input[type=\"checkbox\"]:checked'))\n            .map(cb => cb.value)\n            .join(',');\n          data.language = isZh ? 'ZH-hk' : 'en';\n          console.log('From data', data);\n\n          return data;\n        } catch (error) {\n          console.error('Encryption error:', error);\n          data.key = 'encryption-failed';\n          return data;\n        }\n      }\n\n      \/\/ \u63d0\u4ea4\u8868\u5355\n      async function submitForm() {\n        const submitBtn = document.getElementById('submitBtn');\n        const successMessage = document.getElementById('successMessage');\n        const FormLayout = document.getElementById('form-layout');\n\n        if (!validateForm()) {\n          const firstError = document.querySelector('.error-message');\n          if (firstError) {\n            firstError.scrollIntoView({ behavior: 'smooth', block: 'center' });\n          }\n          return;\n        }\n\n        FormLayout.style.display = 'none';\n        successMessage.style.display = 'block';\n        if (submitBtn) {\n          submitBtn.disabled = true;\n          submitBtn.textContent = 'Submitting...';\n        }\n\n        try {\n          const formData = await getFormData();\n          const bodyParams = JSON.stringify(formData);\n          const encodedText = base64Encrypt(bodyParams);\n\n          const ApiUrl = `${APIURL}\/web\/savePersonData`;\n\n          const response = await fetch(ApiUrl, {\n            method: 'POST',\n            body: encodedText,\n          });\n\n          if (!response.ok) {\n            throw new Error(`HTTP error! status: ${response.status}`);\n          }\n\n          const result = await response.json();\n          const { code } = result;\n\n          if (code === 200) {\n            if (submitBtn) {\n              submitBtn.style.display = 'none';\n            }\n            if (successMessage) {\n              FormLayout.style.display = 'none';\n              successMessage.style.display = 'flex';\n            }\n          } else {\n            throw new Error(result.message || 'Unknown error occurred');\n          }\n        } catch (error) {\n          console.error('Form submission error:', error);\n\n\n          if (submitBtn) {\n            submitBtn.disabled = false;\n            submitBtn.textContent = 'Submit';\n          }\n          alert('There was an error submitting your form. Please try again.');\n        }\n      }\n\n      \/\/ \u4e8b\u4ef6\u76d1\u542c\u5668\u8bbe\u7f6e\n      function setupEventListeners() {\n        \/\/ \u79f0\u547c\u9009\u62e9\u5361\u7247\n        document.querySelectorAll('.salutation-options .option-card').forEach(card => {\n          card.addEventListener('click', function () {\n            const parent = this.parentNode;\n            parent.querySelectorAll('.option-card').forEach(c => c.classList.remove('selected'));\n            this.classList.add('selected');\n          });\n        });\n\n        \/\/ \u73b0\u6709\u60a3\u8005\u9009\u62e9\n        document.querySelectorAll('#existing-patient-options .option-card').forEach(card => {\n          card.addEventListener('click', function () {\n            const parent = this.parentNode;\n            parent.querySelectorAll('.option-card').forEach(c => c.classList.remove('selected'));\n            this.classList.add('selected');\n          });\n        });\n\n        \/\/ \u65f6\u95f4\u9009\u9879\uff08\u5355\u9009\uff09\n        document.querySelectorAll('.time-options .option-card').forEach(card => {\n          card.addEventListener('click', function () {\n            const parent = this.parentNode;\n            parent.querySelectorAll('.option-card').forEach(c => c.classList.remove('selected'));\n            this.classList.add('selected');\n          });\n        });\n\n        \/\/ \u590d\u9009\u6846\u9009\u9879\n        document.querySelectorAll('.checkbox-option').forEach(option => {\n          const checkbox = option.querySelector('input[type=\"checkbox\"]');\n          if (checkbox) {\n            option.addEventListener('click', function (e) {\n              if (e.target.type !== 'checkbox') {\n                checkbox.checked = !checkbox.checked;\n              }\n              this.classList.toggle('selected', checkbox.checked);\n            });\n\n            checkbox.addEventListener('change', function () {\n              option.classList.toggle('selected', this.checked);\n            });\n          }\n        });\n\n        \/\/ \u63d0\u4ea4\u6309\u94ae\n        const submitBtn = document.getElementById('submitBtn');\n        if (submitBtn) {\n          submitBtn.addEventListener('click', function (e) {\n            e.preventDefault();\n            submitForm();\n          });\n        }\n\n        \/\/ \u56de\u8f66\u952e\u63d0\u4ea4\n        document.addEventListener('keypress', function (e) {\n          if (e.key === 'Enter' && !e.shiftKey) {\n            const activeElement = document.activeElement;\n            if (activeElement.tagName !== 'TEXTAREA') {\n              e.preventDefault();\n              submitForm();\n            }\n          }\n        });\n      }\n\n      \/\/ \u7535\u8bdd\u53f7\u7801\u683c\u5f0f\u5316\n      function formatPhoneNumber() {\n        const phoneInput = document.getElementById('phoneNum');\n        if (phoneInput) {\n          phoneInput.addEventListener('input', function () {\n            let value = this.value.replace(\/\\D\/g, '');\n            if (value.length > 15) {\n              value = value.slice(0, 15);\n            }\n            this.value = value;\n          });\n        }\n      }\n\n      \/\/ \u56fd\u5bb6\u4ee3\u7801\u683c\u5f0f\u5316\n      function formatCountryCode() {\n        const codeInput = document.getElementById('phoneNumArea');\n        if (codeInput) {\n          codeInput.addEventListener('input', function () {\n            let value = this.value;\n            if (!value.startsWith('+')) {\n              value = '+' + value.replace(\/^\\+*\/, '');\n            }\n            value = '+' + value.slice(1).replace(\/\\D\/g, '');\n            if (value.length > 5) {\n              value = value.slice(0, 5);\n            }\n            this.value = value;\n          });\n        }\n      }\n\n      function setupDropdowns() {\n        \/\/ \u83b7\u53d6\u6240\u6709\u4e0b\u62c9\u6846\u5934\u90e8\n        const dropdownHeaders = document.querySelectorAll('.dropdown-header');\n\n        if (dropdownHeaders.length === 0) {\n          console.warn('No dropdown headers found');\n          return;\n        }\n\n        dropdownHeaders.forEach(header => {\n          \/\/ \u9a8c\u8bc1\u5fc5\u8981\u7684\u5143\u7d20\u662f\u5426\u5b58\u5728\n          const dropdown = header.closest('.custom-dropdown');\n          if (!dropdown) {\n            console.warn('Dropdown container not found for header:', header);\n            return;\n          }\n\n          const options = dropdown.querySelector('.dropdown-options');\n          if (!options) {\n            console.warn('Dropdown options container not found for dropdown:', dropdown.id);\n            return;\n          }\n\n          \/\/ \u6dfb\u52a0\u70b9\u51fb\u4e8b\u4ef6\u76d1\u542c\u5668\n          header.addEventListener('click', function (e) {\n            e.stopPropagation();\n\n            const dropdownId = dropdown.id;\n            \/\/ console.log('Dropdown clicked:', dropdownId);\n\n            \/\/ \u5173\u95ed\u5176\u4ed6\u4e0b\u62c9\u6846\n            document.querySelectorAll('.custom-dropdown').forEach(dd => {\n              if (dd.id !== dropdownId) {\n                const otherHeader = dd.querySelector('.dropdown-header');\n                const otherOptions = dd.querySelector('.dropdown-options');\n\n                if (otherHeader) {\n                  otherHeader.classList.remove('open');\n                }\n                if (otherOptions) {\n                  otherOptions.classList.remove('open');\n                }\n              }\n            });\n\n            \/\/ \u5207\u6362\u5f53\u524d\u4e0b\u62c9\u6846\n            header.classList.toggle('open');\n            options.classList.toggle('open');\n          });\n        });\n\n        \/\/ \u5904\u7406\u5176\u4ed6\u4e0b\u62c9\u6846\u7684\u9009\u9879\u9009\u62e9\uff08\u6392\u9664service-dropdown\uff0c\u56e0\u4e3a\u5b83\u6709\u7279\u6b8a\u5904\u7406\uff09\n        const dropdownOptions = document.querySelectorAll('.dropdown-option');\n\n        dropdownOptions.forEach(option => {\n          const dropdown = option.closest('.custom-dropdown');\n\n          \/\/ \u8df3\u8fc7service-dropdown\uff0c\u56e0\u4e3a\u5b83\u4f7f\u7528\u4e8b\u4ef6\u59d4\u6258\u5904\u7406\n          if (dropdown && dropdown.id === 'service-dropdown') {\n            return;\n          }\n\n          option.addEventListener('click', function (e) {\n            e.stopPropagation();\n\n            const dropdown = this.closest('.custom-dropdown');\n            if (!dropdown) {\n              console.warn('Dropdown container not found for option:', this);\n              return;\n            }\n\n            const header = dropdown.querySelector('.dropdown-header');\n            const selectedSpan = header ? header.querySelector('.dropdown-selected') : null;\n            const hiddenInput = dropdown.querySelector('input[type=\"hidden\"]');\n\n            \/\/ \u66f4\u65b0\u9009\u62e9\u7684\u6587\u672c\n            if (selectedSpan) {\n              selectedSpan.textContent = this.textContent;\n            }\n\n            \/\/ \u66f4\u65b0\u9690\u85cf\u8f93\u5165\u503c\n            if (hiddenInput) {\n              hiddenInput.value = this.dataset.value || this.textContent;\n            }\n\n            \/\/ \u5173\u95ed\u4e0b\u62c9\u6846\n            if (header) {\n              header.classList.remove('open');\n            }\n\n            const optionsContainer = this.closest('.dropdown-options');\n            if (optionsContainer) {\n              optionsContainer.classList.remove('open');\n            }\n\n            \/\/ \u6dfb\u52a0\u9009\u62e9\u72b6\u6001\n            dropdown.querySelectorAll('.dropdown-option').forEach(opt => {\n              opt.classList.remove('selected');\n            });\n            this.classList.add('selected');\n\n            \/\/ \u89e6\u53d1\u9a8c\u8bc1\uff08\u5982\u679c\u5b58\u5728\u9a8c\u8bc1\u51fd\u6570\uff09\n            if (hiddenInput && hiddenInput.required && typeof validateField === 'function') {\n              const error = validateField(hiddenInput.id, hiddenInput.value);\n              if (error) {\n                if (typeof showError === 'function') {\n                  showError(dropdown, error);\n                }\n              } else {\n                if (typeof clearError === 'function') {\n                  clearError(dropdown);\n                }\n              }\n            }\n\n            \/\/ console.log('Option selected:', this.textContent, 'Value:', this.dataset.value);\n          });\n        });\n\n        \/\/ \u70b9\u51fb\u5916\u90e8\u5173\u95ed\u4e0b\u62c9\u6846\n        document.addEventListener('click', function (e) {\n          \/\/ \u68c0\u67e5\u70b9\u51fb\u662f\u5426\u5728\u4e0b\u62c9\u6846\u5185\u90e8\n          if (!e.target.closest('.custom-dropdown')) {\n            document.querySelectorAll('.custom-dropdown').forEach(dropdown => {\n              const header = dropdown.querySelector('.dropdown-header');\n              const options = dropdown.querySelector('.dropdown-options');\n\n              if (header) {\n                header.classList.remove('open');\n              }\n              if (options) {\n                options.classList.remove('open');\n              }\n            });\n          }\n        });\n\n        \/\/ console.log('Dropdowns setup completed');\n      }\n\n      \/\/ \u521d\u59cb\u5316\u52a0\u8f7d\u5bb9\u5668\u4e3a\u9690\u85cf\u72b6\u6001\n      const loadContainer = document.querySelector('.load-container');\n      if (loadContainer) {\n        loadContainer.style.display = 'none';\n      }\n      function disableSubmitButtonFn() {\n        const submitBtn = document.getElementById('submitBtn');\n        submitBtn.disabled = true;\n        submitBtn.style.backgroundColor = '#dcdcdc';\n        submitBtn.style.color = 'gray';\n      }\n\n      function enableSubmitButtonFn() {\n        const submitBtn = document.getElementById('submitBtn');\n        submitBtn.disabled = false;\n        submitBtn.style.backgroundColor = '#83965A';\n      }\n      \/\/ \u521d\u59cb\u5316\u6240\u6709\u529f\u80fd\n      function initialize() {\n        \/\/ console.log('Initializing application...');\n        \/\/ getApiKeyFn();\n\n        \/\/ \u57fa\u7840\u529f\u80fd\u521d\u59cb\u5316\n        setupDropdowns();\n        setupEventListeners();\n        setupRealTimeValidation();\n        formatPhoneNumber();\n        formatCountryCode();\n        \/\/ \u521d\u59cb\u6e32\u67d3\n        renderDropdown();\n        \/\/ \u670d\u52a1\u7c7b\u522b\u529f\u80fd\u521d\u59cb\u5316\uff08\u5305\u542bAPI\u8c03\u7528\uff09\n        getServices();\n\n        \/\/ console.log('Application initialized successfully');\n      }\n\n      \/\/ \u542f\u52a8\u521d\u59cb\u5316\n      initialize();\n    });\n  <\/script>\n<\/body>\n\n<\/html>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Book an appoinment Inquiry and Appointment Enter your details to schedule your appointment Salutation Mr. Ms. Miss Dr. Prof. First name* Last Name* Existing Client* Yes No Contact Information Country\/Region Code* Phone Number* Email Address Appointment Service Category* Please select Location* Please select Date and Time Days of week you are available for the appointment*&hellip;&nbsp;<a href=\"https:\/\/www.humansahealth.com\/zh\/book-an-appointment\/\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">\u7acb\u5373\u9810\u7d04<\/span><\/a><\/p>","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"inline_featured_image":false,"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[],"tags":[],"class_list":["post-18289","page","type-page","status-publish","hentry"],"acf":[],"aioseo_notices":[],"jetpack_sharing_enabled":true,"amp_enabled":false,"_links":{"self":[{"href":"https:\/\/www.humansahealth.com\/zh\/wp-json\/wp\/v2\/pages\/18289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.humansahealth.com\/zh\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.humansahealth.com\/zh\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.humansahealth.com\/zh\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.humansahealth.com\/zh\/wp-json\/wp\/v2\/comments?post=18289"}],"version-history":[{"count":248,"href":"https:\/\/www.humansahealth.com\/zh\/wp-json\/wp\/v2\/pages\/18289\/revisions"}],"predecessor-version":[{"id":20796,"href":"https:\/\/www.humansahealth.com\/zh\/wp-json\/wp\/v2\/pages\/18289\/revisions\/20796"}],"wp:attachment":[{"href":"https:\/\/www.humansahealth.com\/zh\/wp-json\/wp\/v2\/media?parent=18289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.humansahealth.com\/zh\/wp-json\/wp\/v2\/categories?post=18289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.humansahealth.com\/zh\/wp-json\/wp\/v2\/tags?post=18289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}