document.addEventListener("DOMContentLoaded", function () {
    var script = document.createElement("script");
    script.src = "https://widget.kapa.ai/kapa-widget.bundle.js";
    script.setAttribute("data-bot-protection-mechanism", "hcaptcha");
    script.setAttribute("data-website-id", "e569d308-b8f4-43d1-a0d2-bebc1ece63de");
    script.setAttribute("data-project-name", "ESP-IDF Programming Guide");
    script.setAttribute("data-project-color", "#C62817");
    script.setAttribute("data-project-logo", "https://dl.espressif.com/public/logo.png");
    script.setAttribute("data-button-image", "https://dl.espressif.com/chatbot/Chatbot.png");
    script.setAttribute("data-button-text-font-size", "0px");
    script.setAttribute("data-button-border-radius", "50%");
    script.setAttribute("data-button-bg-color", "#38393a");
    script.setAttribute("data-button-border", "#38393a");
    script.setAttribute("data-button-height", "45px");
    script.setAttribute("data-button-width", "45px");
    script.setAttribute("data-button-animation-enabled", "false");
    script.setAttribute("data-button-image-height", "100%");
    script.setAttribute("data-button-image-width", "100%");
    script.setAttribute("data-button-padding", "0");
    script.setAttribute("data-button-hover-animation-enabled", "false");
    script.setAttribute("data-button-position-top", "50px");
    script.setAttribute("data-button-position-left", "305px");
    script.setAttribute("data-button-box-shadow", "0px 6px 12px 1px rgba(0,0,0,0.16)");
    script.setAttribute("data-modal-override-open-class", "test-ai");
    script.setAttribute("data-user-analytics-fingerprint-enabled", "true");
    script.setAttribute("data-modal-disclaimer", "This custom large language model (LLM), trained on official documentation from espressif.com, is designed to provide technical support and answers related to Espressif’s products and services. Give it a try, share your thoughts, and let us know your feedback—we truly appreciate it! \n\n**Note**: AI-generated information may be incomplete or inaccurate. Always verify critical information with official sources.");
    script.setAttribute("data-modal-example-questions", "What is esp-idf?,How do I get started with esp-idf?");
    script.async = true;
    document.head.appendChild(script);
  });
