<!DOCTYPE html>
      <html>
      <head>
          <meta charset="UTF-8">
          <meta name="viewport" content="width=device-width, initial-scale=1.0">
          <title>QMMSoft</title>
          <style>
              html, body {
                  margin: 0;
                  padding: 0;
                  width: 100%;
                  height: 100%;
                  overflow: hidden;
              }
      
              iframe {
                  width: 100%;
                  height: 100%;
                  border: 0;
                  display: block;
              }
          </style>
      </head>
      <body>
          
          <iframe id="siteFrame"></iframe>

        <script>
        
        const currentPath = window.location.pathname;
        const currentSearch = window.location.search;
        console.log("running4")
        const qmmPath =
            currentPath === "/"
                ? "/1752/"
                : "/1752" + currentPath;
        
        const iframe = document.getElementById("siteFrame");
        
        iframe.src =
            "https://qmmsoft.com" +
            qmmPath +
            currentSearch;
        
        
        window.addEventListener("message", function(event) {

        
            if (event.origin !== "https://qmmsoft.com") {
                return;
            }
        
            if (event.data?.type !== "ROUTE_CHANGE") {
                return;
            }
        
            const path = event.data.path || "/";
            const search = event.data.search || "";
            const hash = event.data.hash || "";
        
            history.pushState(
                {},
                "",
                path + search + hash
            );
        
        });
        
        window.addEventListener("click", function(event) {
          console.log(event)
        
        });
        
         console.log("running1")
        window.addEventListener("popstate", function() {
          console.log("running")
            const path = window.location.pathname;
        
            const qmmPath =
                path === "/"
                    ? "/1752/"
                    : "/1752" + path;
        
            iframe.src =
                "https://qmmsoft.com" +
                qmmPath +
                window.location.search;
        
        });
        
        </script>
      </body>
      </html>