yle.display === "none";
          if (wasHidden) {
            this.style.display = "";
          }
          const popoverRect = this.getBoundingClientRect();
          if (wasHidden) {
            this.style.display = "none";
          }

          const viewportWidth = window.innerWidth;
          const viewportHeight = window.innerHeight;
          const scrollX = window.scrollX;
          const scrollY = window.scrollY;

          this.style.position = "absolute";
          this.style.inset = "auto";
 