<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://shirunheavy.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://shirunheavy.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://shirunheavy.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://shirunheavy.com/wp-sitemap-posts-product-1.xml</loc></sitemap><sitemap><loc>https://shirunheavy.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://shirunheavy.com/wp-sitemap-taxonomies-equipment_type-1.xml</loc></sitemap><sitemap><loc>https://shirunheavy.com/wp-sitemap-taxonomies-brand-1.xml</loc></sitemap><sitemap><loc>https://shirunheavy.com/wp-sitemap-shirunnewproductlocales-1.xml</loc></sitemap><sitemap><loc>https://shirunheavy.com/wp-sitemap-archives-1.xml</loc></sitemap><sitemap><loc>https://shirunheavy.com/wp-sitemap-i18n-1.xml</loc></sitemap></sitemapindex>
<script id="srwa-enrich">(function(){try{
/* (vid,ft,fts) 是**三件套**原子组: 缺任一就整组轮换新 vid 重种(Codex delta 复核阻断-1:
只重置 (ft,fts) 不轮换 vid 的话, 服务端 7 天行为暂存 srwa_vid_<旧vid> 里的旧 ft 会把
新对拆散 — 旧点击号配新首触时间, 恰恰是整个方案要防的)。轮换=存量访客从此刻当新访客,
旧 vid 的暂存/档案与新 vid 无关联, 自然退场。

2.32.0 起三件装进**一个** cookie srwa_id=encodeURIComponent(JSON {v,f,t})。
2.31.0 是三次独立 document.cookie= 且没有回读, 中间那次被吞(cookie 配额/隐私扩展/ITP)
就留下"新 vid + 旧 ft + 新 fts": vid 内存里已是新值, 而 beacon 的 ft/fts 是从 cookie
**现读**的 — 于是同一页的信标就把旧点击号配到新 vid 上, 服务端直接据此建档。
不需要跨页、不需要 localStorage 不可用。单次写入 + 原串回读是唯一不依赖"清理成功"的解法
(能吞 setCookie 的环境同样能吞删除)。旧三个 cookie 一律**不迁移、不拼装、不删除** —
留着是给整套回滚当锚, 新代码只是不信任它们。 */
var SRWA_W=90*24*3600*1000;
var srwaProdOk=function(t){ /* 与 track.js 的 ftsFresh 同窗口: (now-90d+1h, now+5min] */
if(!/^\d{13}$/.test(String(t||"")))return false;
var n=Number(t),now=Date.now();return n<=now+300000&&n>now-(SRWA_W-3600000)};
var vid="",ft="",fts="",stable=false,rec=null;
var mm=document.cookie.match(/(?:^|; )srwa_id=([^;]+)/);
if(mm){try{rec=JSON.parse(decodeURIComponent(mm[1]))}catch(_){rec=null}}
if(rec&&typeof rec==="object"&&/^[a-z0-9]{6,12}$/.test(String(rec.v||""))
&&typeof rec.f==="string"&&rec.f!==""&&rec.f.length<=450&&srwaProdOk(rec.t)){
vid=String(rec.v);ft=rec.f;fts=String(rec.t);stable=true}
else{
/* 新 vid 也必须过同一把尺子(Codex 五审阻断-1): 原来只在**读**旧记录时校验, 新生成的
拿来就用。Math.random 在熵异常时可能给出空串或过短串, 于是 cookie 里躺着 v:"",
信标发 vid:"", 正文补出一个 "#V-" — 服务端会 400 拒掉, 认人链确定断掉且无人知道。
与 track.js 的 genVid() 同口径: 拿不到足够熵就保持不稳定, 什么都不写。 */
var nv="";for(var gi=0;gi<6&&nv.length<9;gi++){nv+=Math.random().toString(36).slice(2)}
nv=nv.replace(/[^a-z0-9]/g,"").slice(0,9);
/* ft 取**完整** href 再判长度, **不截短**(Codex 五审): 原来先 slice(0,450) 再判 3500,
等于"绝不截短"这句承诺是假的 — 450 这一刀本身就可能切在 gclid/gbraid/wbraid 中间,
留下形状还像点击号、实际匹配不上的残值。宁可整组不稳定, 也不发半截归因证据。 */
var nf=location.href;var nt=String(Date.now());
var enc=encodeURIComponent(JSON.stringify({v:nv,f:nf,t:nt}));
if(/^[a-z0-9]{6,12}$/.test(nv)&&nf.length<=450&&enc.length<=3500){
document.cookie="srwa_id="+enc+";path=/;max-age=7776000;SameSite=Lax";
var back=document.cookie.match(/(?:^|; )srwa_id=([^;]+)/);
/* 比**原始编码串**, 不比解码后的值: 解码相等掩盖不了存储层的改写 */
if(back&&back[1]===enc){vid=nv;ft=nf;fts=nt;stable=true}}}
var getSid=function(){try{return (JSON.parse(localStorage.getItem("srh20260720_chat_session_v1")||"null")||{}).public_id||""}catch(_){return ""}};
var sentSid=null;
/* "存得住"与"能对外暴露"是**两个**状态(Codex 五审阻断-2, track.js 早先修过同型):
cookie 写成功只说明身份存得住, 服务端有没有这个档案要看信标有没有真的送出去。
sendBeacon 返回 false = 没排进队列(队列满/体积超限), 不是"发出去了"。
不分家的话: 服务端没有这条 transient, 我们却照样把 #V-vid 写进 WA 正文,
还挡住了别处补一个查得到的 — 又是一条假认人链。 */
var exposed=false;
var beacon=function(){
/* ft/fts 一律取**内存里这一份**(与 vid 同一次写入), 不再从 cookie 现读 —
现读正是 2.31.0 把旧 ft 配到新 vid 上的那一步。stable=false 时什么都不发。 */
if(!stable)return;
var sid=getSid();
/* url 与 ft 同规则: **完整或空**, 不给半截(Codex 六审)。服务端用 url 判
自然→付费升级与二次点击冲突, 半截 gclid 在那里同样会误判。 */
var payload=JSON.stringify({vid:vid,sid:sid,url:(location.href.length<=450?location.href:""),ft:ft,fts:fts});
var queued=false;
if(navigator.sendBeacon){try{queued=navigator.sendBeacon("https://shirunheavy.com/wp-admin/admin-ajax.php?action=srwa_touch",new Blob([payload],{type:"application/json"}))===true}catch(_){queued=false}}
if(!queued&&typeof fetch==="function"){try{fetch("https://shirunheavy.com/wp-admin/admin-ajax.php?action=srwa_touch",{method:"POST",body:payload,keepalive:true})["catch"](function(){});queued=true}catch(_){queued=false}}
if(queued){sentSid=sid;exposed=true}
};
beacon();
/* 访客开聊发生在页面加载之后(单页不刷新): 监视 10 分钟, 会话号一出现就补报一次, 否则 sid↔vid↔IP 永远绑不上 */
var srwaN=0,srwaT=setInterval(function(){srwaN++;if(srwaN>30){clearInterval(srwaT);return}
var sid=getSid();if(sid&&sid!==sentSid){beacon()}
},20000);
document.addEventListener("click",function(e){
var a=e.target&&e.target.closest&&e.target.closest('a[href*="wa.me/"],a[href*="api.whatsapp.com/"]');
if(!a)return;
try{var u=new URL(a.href,location.href);var t=u.searchParams.get("text")||"";
/* 看 exposed 不看 stable: 存得住 ≠ 服务端有档案, 见上面 beacon 的注释 */
if(exposed&&t.indexOf("#V-")===-1){u.searchParams.set("text",(t?t+" ":"")+"#V-"+vid);a.href=u.toString()}}catch(_){}
},true);
}catch(_){}})();</script>
	