HEX
Server: LiteSpeed
System: Linux linux31.centraldnserver.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: salamatk (1501)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open
Upload Files
File: //proc/thread-self/cwd/wp-content/plugins/luman-plus/assets/js/lottie-ai.js
// این فایل فقط منطق باز/بستن پنل و لود لوتی را مدیریت کند

document.addEventListener("DOMContentLoaded", function () {
  var wrapper = document.getElementById("ai-float-btn-panel");
  var aiPanel = document.getElementById("ai-float-panel");
  if (!wrapper || !aiPanel) return;
  // لوتی دکمه
  var lottieSrc = document
    .getElementById("lottie-ai-animation")
    ?.getAttribute("data-lottie-src");
  if (lottieSrc) {
    var lottieBtn = document.createElement("lottie-player");
    lottieBtn.setAttribute("src", lottieSrc);
    lottieBtn.setAttribute("background", "transparent");
    lottieBtn.setAttribute("speed", "1");
    lottieBtn.setAttribute("loop", "");
    lottieBtn.setAttribute("autoplay", "");
    lottieBtn.style.width = "100%";
    lottieBtn.style.height = "100%";
    var lottieContainer = document.getElementById("lottie-ai-animation");
    if (lottieContainer) lottieContainer.appendChild(lottieBtn);
  }
  // باز و بسته کردن پنل
  wrapper.style.cursor = "pointer";
  wrapper.addEventListener("click", function () {
    wrapper.style.display = "none";
    aiPanel.style.display = "flex";
  });
  var closeBtn = aiPanel.querySelector(".ai-panel-close-btn");
  if (closeBtn) {
    closeBtn.addEventListener("click", function (e) {
      e.stopPropagation();
      aiPanel.style.display = "none";
      wrapper.style.display = "flex";
    });
  }
});