
       var o = window.lpmir = {
          //url: "http://127.0.0.1:8000/record/",
          url: "https://mir.longpean.com/record/",
          gc:function(){
            var keyValue = document.cookie.match('(^|;) ?_gentukey=([^;]*)(;|$)');
            var re= keyValue ? keyValue[2] : "";
            return re;
          },
          sc:function(expiresDays = null, path = '/', domain = '', secure = false){
            var cookieString = `_gentukey=${Math.floor(Math.random()*10000000000000000)}`;
            if (expiresDays) {
              const date = new Date();
              date.setTime(date.getTime() + (expiresDays * 24 * 60 * 60 * 1000)); // 计算过期时间（以天数为单位）
              cookieString += `; expires=${date.toUTCString()}`;
            }
            cookieString += `; path=${path}`;
            if (domain) {
              cookieString += `; domain=${domain}`;
            }
            if (secure) {
              cookieString += '; Secure'; // 如果是https网站，可以添加Secure属性以使cookie只能通过安全连接传输
            }
            document.cookie = cookieString;
          },
          send:function(ev){
            var code = btoa(JSON.stringify(ev))
            code = encodeURIComponent(code)
            var ajax = new XMLHttpRequest();
            ajax.open('get',`${this.url}?${code}`);
            ajax.send();            
          },
          init(){
            this.send({
                uid: this.gc('PHPSESSID') , 
                ip: "3.22.42.99",
                clt: "pc",
                ua:"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)",
                tg: "",
                ss: "8tu7ulvj9ik5cjuv1roaefkdjr3qe44f",
                spid: String(this.gc('_gentukey')),
                st: document.domain,
                pg: window.location.pathname,
                e: 'load-page', 
                url: window.location.href, 
                cls: '', 
                c: "v", 
                t: Date.parse(new Date()), 
                x: '', 
                y: ''
            })
          }
        };
        var _gentukey = window.lpmir.gc();
        if(!_gentukey){window.lpmir.sc()}
        o.init();
        console.log("loadjs...ok")
    