memory-eternal 0.22.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -3,18 +3,18 @@ window.__ModuleLoader__.load({
3
3
  factory: (require) => {
4
4
  var module = { exports: {} };
5
5
  var exports = module.exports;
6
- var Zn=Object.create;var la=Object.defineProperty;var eo=Object.getOwnPropertyDescriptor;var to=Object.getOwnPropertyNames;var ao=Object.getPrototypeOf,no=Object.prototype.hasOwnProperty;var oo=(t,a)=>{for(var n in a)la(t,n,{get:a[n],enumerable:!0})},an=(t,a,n,s)=>{if(a&&typeof a=="object"||typeof a=="function")for(let i of to(a))!no.call(t,i)&&i!==n&&la(t,i,{get:()=>a[i],enumerable:!(s=eo(a,i))||s.enumerable});return t};var ro=(t,a,n)=>(n=t!=null?Zn(ao(t)):{},an(a||!t||!t.__esModule?la(n,"default",{value:t,enumerable:!0}):n,t)),io=t=>an(la({},"__esModule",{value:!0}),t);var gr={};oo(gr,{EN:()=>En,MemoryLibrary:()=>Bo,ZH:()=>Fn,apply:()=>To,inject:()=>Co});module.exports=io(gr);var r=ro(require("react"),1),Pn=require("react-dom");var so={"&":"&amp;","<":"&lt;",">":"&gt;"},Ma=t=>String(t).replace(/[&<>]/g,a=>so[a]),lo=[[/结论|总结|tl;?dr|summary|takeaway/i,"\u2705","ok"],[/风险|注意|警告|禁止|坑|踩坑|务必/i,"\u26A0\uFE0F","warn"],[/根因|原因|为什么|定位|复现/i,"\u{1F50D}","info"],[/修复|解决|变更|fix/i,"\u{1F527}","ok"],[/验证|测试|实测|回归/i,"\u{1F9EA}","ok"],[/方案|做法|实现|设计|思路|架构/i,"\u{1F6E0}\uFE0F","plan"],[/步骤|流程|操作|用法|命令/i,"\u{1F9E9}","plan"],[/背景|由来|context/i,"\u{1F9ED}","info"],[/目标|需求|要解决/i,"\u{1F3AF}","plan"],[/环境|依赖|前置|安装/i,"\u{1F4E6}","info"],[/收益|效果|性能|指标|数据|统计/i,"\u{1F4C8}","ok"],[/示例|例子|样例|demo/i,"\u{1F4A1}","idea"],[/参考|链接|相关/i,"\u{1F517}","info"]],co=["\u2728","info"],po=[[/风险|注意|警告|禁止|坑|务必/i,"\u26A0\uFE0F","warn"],[/提示|建议|tip|best practice/i,"\u{1F4A1}","idea"],[/结论|总结/i,"\u2705","ok"],[/错误|失败|报错/i,"\u2757","bad"]],mo=t=>{let a=String(t);for(let[n,s,i]of lo)if(n.test(a))return[s,i];return co},uo=t=>{let a=t.join(" ");for(let[n,s,i]of po)if(n.test(a))return[s,i];return["\u{1F4CC}","info"]};function Gt(t){let a=String(t),n=/^([^::\s]{1,8})[::]\s*(.+)$/.exec(a);if(n&&!/[是为有了吗呢着过把被和与或于]/.test(n[1]))return'<span class="md-kv"><span class="md-k">'+Ma(n[1])+'</span><span class="md-v">'+Gt(n[2])+"</span></span>";let s=Ma(a);return s=s.replace(/^\[([ xX])\](?=\s|$)\s*/,(i,p)=>'<span class="md-task">'+(p.toLowerCase()==="x"?"\u2611":"\u2610")+"</span> "),s=s.replace(/`([^`\n]+)`/g,'<code class="md-code">$1</code>'),s=s.replace(/\*\*([^*]+)\*\*/g,'<strong class="md-b">$1</strong>'),s=s.replace(/(^|[^*])\*([^*\n]+)\*/g,"$1<em>$2</em>"),s=s.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(i,p,y)=>/^(https?:|\/|#)/i.test(y)?'<a class="md-link" href="'+y+'" target="_blank" rel="noopener noreferrer">'+p+"</a>":p),s}function ca(t){let a=String(t||"").replace(/\r\n?/g,`
7
- `),n=/^---\n([\s\S]*?)\n---\n?/.exec(a);if(!n)return{meta:[],body:a};let s=[];for(let i of n[1].split(`
8
- `)){let p=i.indexOf(":");if(p<=0)continue;let y=i.slice(0,p).trim(),S=i.slice(p+1).trim().replace(/^["']|["']$/g,"");y&&s.push([y,S])}return{meta:s,body:a.slice(n[0].length)}}function nn(t){let a=String(t||"").trim().replace(/^\[|\]$/g,"");return a?a.split(",").map(n=>n.trim().replace(/^["']|["']$/g,"")).filter(Boolean):[]}function Zt(t){let a=ca(String(t||"").replace(/\r\n?/g,`
9
- `)).body;if(!a.trim())return"";let n=[],s=a.replace(/```([\w+#.-]*)\n([\s\S]*?)```/g,(R,W,U)=>(n.push('<pre class="md-pre"><code>'+Ma(U.replace(/\n$/,""))+"</code></pre>"),"\0F"+(n.length-1)+"\0")),i=[],p=0,y=[],S=null,g=null,C=()=>{y.length&&(i.push('<p class="md-p">'+y.join("<br/>")+"</p>"),y=[])},d=()=>{if(!S)return;let R=S.type;i.push("<"+R+' class="md-'+R+'">'+S.items.map(W=>"<li>"+W+"</li>").join("")+"</"+R+">"),S=null},w=()=>{if(!g)return;let[R,W]=uo(g);i.push('<div class="md-callout md-c-'+W+'"><span class="md-ico">'+R+"</span>"+g.join("<br/>")+"</div>"),g=null},k=()=>{C(),d(),w()};for(let R of s.split(`
10
- `)){let W=R.trim();if(!W){k();continue}let U=/^\u0000F(\d+)\u0000$/.exec(W);if(U){k(),i.push(n[Number(U[1])]);continue}let T;if(T=/^(#{1,6})\s+(.+)$/.exec(W)){k();let[_,$]=mo(T[2]);p++,i.push('<div id="md-h-'+p+'" class="md-h md-h-'+(T[1].length<=2?"h1":"h2")+" md-c-"+$+'"><span class="md-ico">'+_+'</span><span class="md-hx">'+Gt(T[2])+"</span></div>");continue}if(/^(-{3,}|\*{3,}|_{3,})$/.test(W)){k(),i.push('<hr class="md-hr"/>');continue}if(T=/^>\s?(.*)$/.exec(W)){C(),d(),g=g||[],g.push(Gt(T[1]));continue}if(T=/^[-*+]\s+(.+)$/.exec(W)){C(),w(),(!S||S.type!=="ul")&&(d(),S={type:"ul",items:[]}),S.items.push(Gt(T[1]));continue}if(T=/^\d+[.)]\s+(.+)$/.exec(W)){C(),w(),(!S||S.type!=="ol")&&(d(),S={type:"ol",items:[]}),S.items.push(Gt(T[1]));continue}d(),w(),y.push(Gt(W))}return k(),i.join(`
11
- `)}var da="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KDBN/F0hlqShjllgp5b4d+QcSWQR+LI7wAGCI7k4XWKsCvV/Ugf0leq+8kjPcgrgAECq6gpY1Wq+5E+pK9U95NHepBXAAMHbDD8qUxCapVMY/izqCRZHgkirwAGEEJsLh8IfeSRPuQVwABCe2HBKmLsTVX70rb0kar280g/8gpgAGHOnLW7lMLqVLUvbUsfqWo/j/QjrwAGEhaCnVC1qbADSJvStvSR7LbzyBzy0YADCOIM06j5RafCDxOsenQAFAEhzS/mHW4GFvIKYIBhb8HIlc7QtskcUklVAeTSFCoY+U4y28wjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgDtvD/AXvCXhuljgbyAAAAAElFTkSuQmCC";function on(t,a,n=48){if(!a||!t)return"";let s=String(t),i=s.toLowerCase(),p=String(a).toLowerCase();if(!p)return"";let y=i.indexOf(p);if(y<0)return"";let S=Math.max(0,y-n),g=Math.min(s.length,y+p.length+n),C=s.slice(S,g).replace(/\s+/g," ").trim();return(S>0?"\u2026":"")+C+(g<s.length?"\u2026":"")}function Ta(t,a){let n=String(a||"").trim().toLowerCase();if(!n)return!0;let s=t||{},i=Array.isArray(s.tags)?s.tags.map(y=>String(y)):[],p=[s.title,s.summary,s.reason,s.path,s.submittedBy,...i].map(y=>String(y||"")).join(`
12
- `).toLowerCase();return n.split(/\s+/).filter(Boolean).every(y=>p.includes(y))}function rn({hasVersion:t=!1,hostVersion:a="",onDisk:n="",residentServed:s="",residentPresent:i=!1,residentManaged:p=null,residentManagedKnown:y=null,residentManagedBy:S="",replaceBlocked:g=null}={}){let C=String(n||""),d=String(a||""),w=String(s||""),k=!!(t&&i&&!w),R=!!(C&&w&&w!==C),W=p===!1&&y===!1,U=S==="host",T=p===!1&&!W&&!U,_=!!(d&&C&&d!==C),$=!!(g&&g.fresh),K=R||k||T||W,he=null;_?he="hostProcessStale":k?he="residentDown":$?he="residentReplaceBlocked":W?he="residentLockUnknown":T&&(he="residentUnmanaged");let q;return k?q="restartStart":R?q="restartFixes":T||W?q="restartRepair":_?q="restartHostOnly":q="restartAnyway",{showButton:!!t,emphasis:K,warn:he,hint:q,hostStale:_,residentDown:k,residentStale:R,residentUnmanaged:T,residentLockUnknown:W,residentHostManaged:U,needsRestart:K}}var fo=/^\d{4}-\d{2}-\d{2}$/,pa=t=>String(t).padStart(2,"0");function ea(t){if(t==null||t==="")return null;if(t instanceof Date)return Number.isNaN(t.getTime())?null:t;let a=String(t).trim();if(!a)return null;if(fo.test(a)){let[s,i,p]=a.split("-").map(Number),y=new Date(s,i-1,p);return Number.isNaN(y.getTime())?null:y}let n=new Date(a);return Number.isNaN(n.getTime())?null:n}var sn=t=>`${t.getFullYear()}-${pa(t.getMonth()+1)}-${pa(t.getDate())}`,ln=t=>`${pa(t.getHours())}:${pa(t.getMinutes())}`;function ma(t){let a=ea(t);return a?sn(a):""}function Ra(t){let a=ea(t);return a?sn(a)+" "+ln(a):""}function cn(t){let a=ea(t);return a?ln(a):""}function dn(t={}){let a=t.repo||"EternalNight996/memory-eternal",n=String(t.title||"[Bug] ").slice(0,120),s=Array.isArray(t.labels)?t.labels:["bug"],i=Number(t.maxLength)>500?Number(t.maxLength):7e3,p=g=>{let C=new URLSearchParams;return C.set("title",n),C.set("body",g),s.length&&C.set("labels",s.join(",")),"https://github.com/"+a+"/issues/new?"+C.toString()},y=String(t.body||""),S=p(y);if(S.length>i){let g=`
13
-
14
- > \u5185\u5BB9\u8FC7\u957F\u5DF2\u622A\u65AD\uFF1A\u5B8C\u6574\u8BCA\u65AD\u8BF7\u5728\u63D2\u4EF6\u91CC\u70B9\u300C\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\u300D\uFF0C\u518D\u8865\u5230 issue \u8BC4\u8BBA\u91CC\u3002`,C=d=>p(y.slice(0,d)+g);if(C(0).length>i)y=g;else{let d=0,w=y.length;for(;d<w;){let k=Math.ceil((d+w)/2);C(k).length<=i?d=k:w=k-1}y=y.slice(0,d)+g}S=p(y)}return S}function pn(t={}){return["## \u73B0\u8C61",String(t.description||"").trim()||"\uFF08\u8BF7\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF09","","## \u590D\u73B0\u6B65\u9AA4","1. ","2. ","","## \u671F\u671B\u884C\u4E3A","","## \u5B9E\u9645\u884C\u4E3A","","## \u73AF\u5883","- \u63D2\u4EF6\u7248\u672C: "+(t.version||"\uFF08\u89C1\u8BCA\u65AD\u4FE1\u606F\uFF09"),"",t.diagnostics||"","","---","> \u7531 memory-eternal \u63D2\u4EF6\u5185\u300C\u53CD\u9988\u5F02\u5E38\u300D\u751F\u6210\uFF08\u8BCA\u65AD\u4FE1\u606F\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E\u5404\u7C7B key/token \u5DF2\u66FF\u6362\uFF09\u3002"].join(`
15
- `)}var za="https://github.com/EternalNight996/memory-eternal",bo=["\u6211\u5728\u4F7F\u7528 memory-eternal\uFF08DeepSeek Harness \u7684\u8BB0\u5FC6\u63D2\u4EF6\uFF09\u65F6\u9047\u5230\u4E86\u95EE\u9898\uFF0C\u8BF7\u4F60\u5E2E\u6211\u628A\u8FD9\u4E2A\u95EE\u9898\u63D0\u4EA4\u5230 GitHub\u3002","","\u4ED3\u5E93\uFF1A"+za,"","\u8BF7\u6309\u8FD9\u4E2A\u6D41\u7A0B\u505A\uFF1A","","1. \u5148\u8DD1 `gh issue list --repo EternalNight996/memory-eternal --state open --limit 50`\uFF0C\u770B\u662F\u5426\u5DF2\u6709\u76F8\u540C\u95EE\u9898\uFF1A"," - \u5DF2\u6709 \u2192 \u7528 `gh issue comment <\u7F16\u53F7> --body-file <\u6587\u4EF6>` \u8865\u5145\u73B0\u8C61\uFF0C\u4E0D\u8981\u91CD\u590D\u5F00\u65B0 issue\uFF1B"," - \u6CA1\u6709 \u2192 \u7EE7\u7EED\u7B2C 2 \u6B65\u3002",'2. \u628A\u6B63\u6587\u5199\u6210\u6587\u4EF6\uFF0C\u7136\u540E `gh issue create --repo EternalNight996/memory-eternal --title "[Bug] <\u4E00\u53E5\u8BDD\u6982\u62EC>" --body-file <\u6587\u4EF6>`\uFF1B\u6B63\u6587\u7528\u8FD9\u4E2A\u7ED3\u6784\uFF1A'," \u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A / \u5B9E\u9645\u884C\u4E3A / \u73AF\u5883\uFF08\u63D2\u4EF6\u7248\u672C / DSH \u7248\u672C / \u64CD\u4F5C\u7CFB\u7EDF / Node\uFF09/ \u8BCA\u65AD\u4FE1\u606F\u3002","3. \u5982\u679C `gh` \u6CA1\u767B\u5F55\u6216\u4E0D\u53EF\u7528\uFF0C\u4E0D\u8981\u5C1D\u8BD5\u63D0\u4EA4\uFF0C\u6539\u4E3A\u8F93\u51FA\u4E00\u6761\u300C\u6807\u9898\u4E0E\u6B63\u6587\u90FD\u5DF2\u9884\u586B\u300D\u7684 GitHub \u65B0\u5EFA issue \u94FE\u63A5\u7ED9\u6211\uFF0C\u6211\u81EA\u5DF1\u70B9\u63D0\u4EA4\u3002","4. \u63D0\u4EA4\u6210\u529F\u540E\uFF0C\u628A issue \u94FE\u63A5\u53D1\u7ED9\u6211\u3002","","\u6CE8\u610F\uFF1A\u6211\u7684\u95EE\u9898\u63CF\u8FF0\u8BF7\u539F\u6837\u7167\u5F55\uFF0C\u4E0D\u8981\u66FF\u6211\u7F8E\u5316\u6216\u7701\u7565\u7EC6\u8282\uFF1B\u8BCA\u65AD\u4FE1\u606F\u539F\u6837\u653E\u8FDB\u300C\u8BCA\u65AD\u4FE1\u606F\u300D\u4E00\u8282\u3002","","\u6211\u7684\u95EE\u9898\u63CF\u8FF0\uFF1A","<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>","","\u8BCA\u65AD\u4FE1\u606F\uFF1A","<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>"].join(`
16
- `),ho=["I hit a problem while using memory-eternal (a DeepSeek Harness memory plugin). Please file it on GitHub for me.","","Repo: "+za,"","Workflow:","","1. Run `gh issue list --repo EternalNight996/memory-eternal --state open --limit 50` first: if a matching issue exists, add a comment with `gh issue comment <n> --body-file <file>` instead of opening a duplicate.",'2. Otherwise create it with `gh issue create --repo EternalNight996/memory-eternal --title "[Bug] <one-line summary>" --body-file <file>`, using sections: Symptoms / Steps to reproduce / Expected / Actual / Environment (plugin, DSH, OS, Node) / Diagnostics.',"3. If `gh` is not authenticated or unavailable, do NOT try to submit: output a GitHub new-issue link with the title and body pre-filled instead, and I will click submit myself.","4. Report the resulting issue URL back to me.","","Keep my description verbatim - do not rewrite or summarise it. Put the diagnostics under the Diagnostics section as-is.","","My description:","<write your problem here>","","Diagnostics:","<paste the diagnostics copied from the in-app Report-a-bug dialog>"].join(`
17
- `);function mn(t={}){let a=t.lang==="en"?"en":"zh",n=a==="en"?ho:bo,s=t.repo||"EternalNight996/memory-eternal";return n=n.split(za).join("https://github.com/"+s),t.description&&(n=n.replace(a==="en"?"<write your problem here>":"<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>",String(t.description).trim())),t.diagnostics&&(n=n.replace(a==="en"?"<paste the diagnostics copied from the in-app Report-a-bug dialog>":"<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>",String(t.diagnostics).trim())),n}function un({panX:t=0,panY:a=0,zoom:n=1,w:s=0,h:i=0,margin:p=60}={}){let y=n||1;return{x0:(0-t)/y-p,y0:(0-a)/y-p,x1:(s-t)/y+p,y1:(i-a)/y+p}}function ua(t,a,n,s){return s?t+n>=s.x0&&t-n<=s.x1&&a+n>=s.y0&&a-n<=s.y1:!0}function gn(t){let a=Number(t)||0;return a<=120?1/0:a<=300?160:a<=600?90:60}function fn(t,a={}){let n=Number.isFinite(a.limit)?a.limit:1/0,s=new Set,i=g=>{g&&s.size<n&&s.add(g)};if(i(a.focusId),i(a.hoverId),a.searchHits)for(let g of a.searchHits){if(s.size>=n)break;s.add(g)}let p=a.degree||{},y=g=>Number(p[g])||0,S=[];for(let g of Array.isArray(t)?t:[])g&&g.id&&!s.has(g.id)&&S.push(g);S.sort((g,C)=>y(C.id)-y(g.id));for(let g of S){if(s.size>=n)break;s.add(g.id)}return s}function bn(t){let a=Math.floor(Number(t)||0);return a<=0?0:a>1200?48:a>700?60:a>300?110:200}function ga(t){let a=Math.floor(Number(t)||0),n=a>1e3?3e3:a>100?2e3:a>50?1200:800,s=a>100?.002:.005,i=a>1e3?.012:a>100?.005:.01,p=a>1e3?6:a>200?12:24;return{repulsion:n,attraction:s,centerGravity:i,velCap:p,theta:.8}}var yo=.05,Da=30;function Aa(t,a,n,s){return(n>=t?1:0)+(s>=a?2:0)}var La=class t{constructor(a){let n=Math.max(16,Math.floor(Number(a)||0)*6+16);this.capacity=Math.max(0,Math.floor(Number(a)||0)),this.cap=n,this.cx=new Float64Array(n),this.cy=new Float64Array(n),this.half=new Float64Array(n),this.mass=new Float64Array(n),this.mx=new Float64Array(n),this.my=new Float64Array(n),this.child=new Int32Array(n*4),this.point=new Int32Array(n),this.fx=new Float64Array(this.capacity),this.fy=new Float64Array(this.capacity),this.count=0,this.lastVisits=0}ensureCapacity(a){if(a<=this.capacity)return;let n=new t(a);this.capacity=n.capacity,this.cap=n.cap,this.cx=n.cx,this.cy=n.cy,this.half=n.half,this.mass=n.mass,this.mx=n.mx,this.my=n.my,this.child=n.child,this.point=n.point,this.fx=n.fx,this.fy=n.fy,this.count=0}newNode(a,n,s){if(this.count>=this.cap)return-1;let i=this.count++;this.cx[i]=a,this.cy[i]=n,this.half[i]=s,this.mass[i]=0,this.mx[i]=0,this.my[i]=0,this.point[i]=-1;let p=i*4;return this.child[p]=-1,this.child[p+1]=-1,this.child[p+2]=-1,this.child[p+3]=-1,i}insert(a,n,s){let i=a[s];if(!i)return;let p=Number(i.x)||0,y=Number(i.y)||0;this.mass[n]+=1,this.mx[n]+=p,this.my[n]+=y;let S=n*4;if(this.child[S]===-1&&this.child[S+1]===-1&&this.child[S+2]===-1&&this.child[S+3]===-1){if(this.point[n]===-1){this.point[n]=s;return}let g=this.half[n]/2;if(g<.001||this.count+4>this.cap){this.point[n]=-2;return}let C=this.cx[n],d=this.cy[n];for(let k=0;k<4;k+=1)this.child[S+k]=this.newNode(C+(k&1?g:-g),d+(k&2?g:-g),g);let w=this.point[n];if(this.point[n]=-2,w>=0){let k=a[w];this.insert(a,this.child[S+Aa(C,d,Number(k.x)||0,Number(k.y)||0)],w)}this.insert(a,this.child[S+Aa(C,d,p,y)],s);return}this.insert(a,this.child[S+Aa(this.cx[n],this.cy[n],p,y)],s)}build(a){let n=a.length;if(this.count=0,this.lastVisits=0,n===0)return-1;let s=1/0,i=-1/0,p=1/0,y=-1/0;for(let w=0;w<n;w+=1){let k=Number(a[w].x)||0,R=Number(a[w].y)||0;k<s&&(s=k),k>i&&(i=k),R<p&&(p=R),R>y&&(y=R)}let S=(s+i)/2,g=(p+y)/2,C=Math.max(1,Math.max(i-s,y-p)/2)*1.001,d=this.newNode(S,g,C);if(d<0)return-1;for(let w=0;w<n;w+=1)this.insert(a,d,w);return d}accumulate(a,n,s,i,p,y){let S=this.mass[a];if(S<=0)return;let g=this.mx[a]/S,C=this.my[a]/S,d=s-g,w=i-C,k=d*d+w*w;if(k<1e-9)return;let R=this.child[a*4]===-1;if(R&&this.point[a]===n)return;let W=Math.sqrt(k);if(this.lastVisits+=1,R||2*this.half[a]/W<y){let T=p*S/k;this.fx[n]+=d/W*T,this.fy[n]+=w/W*T;return}let U=a*4;for(let T=0;T<4;T+=1){let _=this.child[U+T];_>=0&&this.accumulate(_,n,s,i,p,y)}}compute(a,n){let s=a.length;this.ensureCapacity(s);let i=this.fx,p=this.fy;i.fill(0),p.fill(0),this.lastVisits=0;let y=this.build(a);if(y<0)return{fx:i,fy:p,visits:0};let S=n.repulsion,g=n.theta===void 0?.8:n.theta,C=n.skipIndex===void 0?-1:n.skipIndex;for(let d=0;d<s;d+=1){if(d===C)continue;let w=a[d];this.accumulate(y,d,Number(w.x)||0,Number(w.y)||0,S,g)}return{fx:i,fy:p,visits:this.lastVisits}}};function hn(t,a={}){let n=t.nodes,s=n.length,i=a.params||ga(s),p=a.theta===void 0?i.theta:a.theta;t.tickCount=(t.tickCount||0)+1;let y=a.settleTicks===void 0?460:a.settleTicks,S=a.alphaDecay===void 0?.08:a.alphaDecay;t.alpha===void 0&&(t.alpha=1),t.tickCount<=y?t.alpha=1:t.alpha+=((t.dragNode?.35:0)-t.alpha)*S,t.alpha<1e-4&&(t.alpha=0);let g=Math.max(0,Math.min(1,Number(a.alphaFloor)||0));t.alpha<g&&(t.alpha=g);let C=a.alpha===void 0?t.alpha:a.alpha,d=Math.min(.4,t.tickCount/1500),w=a.damping===void 0?.9-d:Math.max(.1,Math.min(.95,Number(a.damping)||.5)),k=t.dragNode?n.indexOf(t.dragNode):-1;(!t.forceEngine||t.forceEngine.capacity<s)&&(t.forceEngine=new La(s));let R=t.forceEngine.compute(n,{repulsion:i.repulsion*C,theta:p,skipIndex:k}),W=R.fx,U=R.fy;for(let L=0;L<s;L+=1){if(L===k)continue;let j=n[L],H=W[L],I=U[L];if(Number.isFinite(H)||(H=0),Number.isFinite(I)||(I=0),t.clustered&&t.typeCenters&&t.typeCenters[j.type]){let ye=t.typeCenters[j.type];H+=(ye.x-j.x)*.006*C,I+=(ye.y-j.y)*.006*C}else H-=j.x*i.centerGravity*C,I-=j.y*i.centerGravity*C;let Y=((Number(j.vx)||0)+H)*w,ce=((Number(j.vy)||0)+I)*w;Y>i.velCap?Y=i.velCap:Y<-i.velCap&&(Y=-i.velCap),ce>i.velCap?ce=i.velCap:ce<-i.velCap&&(ce=-i.velCap),j.vx=Y,j.vy=ce}let T=t.edges||[],_=t.edgePairs||null,$=t.nodeById||null,K=_?_.length/2:T.length;for(let L=0;L<K;L+=1){let j,H;if(_)j=n[_[L*2]],H=n[_[L*2+1]];else{let m=T[L];j=$?$.get(m.sourceNodeId):null,H=$?$.get(m.targetNodeId):null}if(!j||!H)continue;let I=H.x-j.x,Y=H.y-j.y,ce=Math.sqrt(I*I+Y*Y)||1,ye=(ce-100)*i.attraction*C,ae=I/ce*ye,Be=Y/ce*ye;t.dragNode!==j&&(j.vx+=ae,j.vy+=Be),t.dragNode!==H&&(H.vx-=ae,H.vy-=Be)}let he=0;for(let L=0;L<s;L+=1){let j=n[L];L!==k&&(j.x+=j.vx,j.y+=j.vy,he+=j.vx*j.vx+j.vy*j.vy)}let q=s?Math.sqrt(he/s):0;return q<yo&&t.tickCount>60&&!t.dragNode?t.quietTicks=(t.quietTicks|0)+1:t.quietTicks=0,{rms:q,tickCount:t.tickCount,quietTicks:t.quietTicks,params:i,visits:R.visits,alpha:C}}function Ot(t){return(Array.isArray(t)?t:[]).filter(Boolean).join("/")}function yn(t){return String(t??"").split("/").filter(Boolean)}function vn(t,a,n={}){let s=Ot(a);return`${t}/graph/level?path=${encodeURIComponent(s)}${n.all?"&all=1":""}`}function vo(t){let a=Math.max(0,Math.floor(Number(t)||0)),n=24+38*Math.log10(Math.max(1,a));return Math.max(34,Math.min(240,Math.round(n)))}function xo({kind:t="other",degree:a=0,maxDegree:n=1}={}){let s=Math.max(0,Number(a)||0),i=Math.max(1,Number(n)||1);return 9+Math.min(10,s/i*8)+(t==="core"?3:0)}function xn(t,a={}){let n=Math.max(0,Math.floor(Number(t)||0));if(n<1e4)return String(n);let s=a.unit||"\u4E07",i=a.locale||"zh-CN";if(a.intl!==!1)try{return new Intl.NumberFormat(i,{notation:"compact",maximumFractionDigits:1}).format(n)}catch{}return s==="\u4E07"?Math.round(n/1e3)/10+"\u4E07":n>=1e6?Math.round(n/1e5)/10+"M":Math.round(n/100)/10+"K"}function wn(t,a={}){let n=t||{},s=n.type==="planet",i=n.kind||"other",p=String(n.label||n.title||n.name||n.id||"");return{id:String(n.id||""),title:p,name:p,type:i,planet:s,count:s?Math.max(0,Math.floor(Number(n.count)||0)):0,tags:Array.isArray(n.tags)?n.tags.slice():[],updated:n.updated||"",r:s?vo(n.count):xo({kind:i,degree:a.degree,maxDegree:a.maxDegree})}}function kn(t){return{...t||{},repulsion:1600,centerGravity:.004}}function Sn(t,a={}){let n=Math.max(1,Number(a.timeoutMs)||1600),s=Math.max(0,Number(a.elapsedMs)||0),i=String(t&&t.name||""),p=String(t&&t.message||t||""),S=i==="AbortError"||/abort/i.test(p)||s>=n;return{timeout:S,message:S?`\u5C42\u7EA7\u52A0\u8F7D\u8D85\u65F6\uFF08${n}ms\uFF09`:p||"\u672A\u77E5\u9519\u8BEF"}}function Cn(t=96){let a=Math.max(1,Math.floor(Number(t)||96)),n=new Map;return{get size(){return n.size},has(s){return n.has(s)},get(s){if(!n.has(s))return null;let i=n.get(s);return n.delete(s),n.set(s,i),i},set(s,i){for(n.has(s)&&n.delete(s),n.set(s,i);n.size>a;)n.delete(n.keys().next().value);return i},clear(){n.clear()},keys(){return[...n.keys()]}}}function Nn(t={}){let a=t.raf||(g=>requestAnimationFrame(g)),n=t.cancelRaf||(g=>cancelAnimationFrame(g)),s=t.setTimeout||((g,C)=>setTimeout(g,C)),i=t.clearTimeout||(g=>clearTimeout(g)),p=new Set,y=new Set,S=[];return{raf(g){let C=a(()=>{p.delete(C),g()});return p.add(C),C},cancelRaf(g){g!=null&&(p.delete(g),n(g))},setTimeout(g,C){let d=s(()=>{y.delete(d),g()},C);return y.add(d),d},clearTimeout(g){g!=null&&(y.delete(g),i(g))},listen(g,C,d,w){g.addEventListener(C,d,w),S.push({target:g,type:C,fn:d,opts:w})},snapshot(){return{rafs:p.size,timers:y.size,listeners:S.length}},releaseAll(){for(let g of[...p]){p.delete(g);try{n(g)}catch{}}for(let g of[...y]){y.delete(g);try{i(g)}catch{}}for(let g of S.splice(0))try{g.target.removeEventListener(g.type,g.fn,g.opts)}catch{}}}}function Mn(t,a={}){let n=Math.max(1,Number(a.maxItems)||1e3),s=Math.max(1,Number(a.payloadLimit)||1048576),i=t&&t.level&&Array.isArray(t.level.items)?t.level.items.length:0,p=Number(t&&t.stats&&t.stats.bytes)||0,y=[];return i>n&&y.push(`\u5355\u5C42\u56FE\u5143 ${i} > ${n}`),p>s&&y.push(`\u5C42 payload ${p} > ${s}`),{ok:y.length===0,items:i,bytes:p,problems:y}}function wo(t,a){if(t===a)return!0;if(t===null||a===null||t===void 0||a===void 0||typeof t!="object"&&typeof a!="object")return t===a;try{return JSON.stringify(t)===JSON.stringify(a)}catch{return!1}}function Tn(t,a){let n={...t||{}},s={};for(let[i,p]of Object.entries(a||{}))wo(t?t[i]:void 0,p)||(n[i]=p,s[i]=p);return{values:n,overlay:s}}var e=require("react/jsx-runtime"),Kt="memory-eternal",X="/memory-eternal/api";async function Ba(t){try{let a=await fetch(`${X}/open-external?url=${encodeURIComponent(t)}`,{method:"POST"}),n=await a.json().catch(()=>null);if(a.ok&&n&&n.ok)return!0}catch{}try{if(window.open(t,"_blank","noopener,noreferrer"))return!0}catch{}try{let a=document.createElement("a");return a.href=t,a.target="_blank",a.rel="noopener noreferrer",a.click(),!0}catch{}return!1}var So=100,Co=["slots","locale"],Fn={nav:"\u8BB0\u5FC6",loading:"\u52A0\u8F7D\u4E2D\u2026",loadingGraph:"\u6B63\u5728\u52A0\u8F7D\u77E5\u8BC6\u661F\u56FE\u2026",refresh:"\u5237\u65B0",overview:"\u8BB0\u5FC6\u5E93\u6982\u89C8",total:"\u77E5\u8BC6\u5361",recent:"\u8FD1 7 \u5929\u65B0\u589E",tags:"\u6807\u7B7E",searchPlaceholder:"\u641C\u7D22\u8BB0\u5FC6\uFF08\u652F\u6301\u4E2D\u6587\u7247\u6BB5\uFF09\u2026",search:"\u641C\u7D22",all:"\u5168\u90E8",kindProject:"\u9879\u76EE",kindKnowledge:"\u77E5\u8BC6",kindContent:"\u5185\u5BB9",kindPrompt:"\u63D0\u793A\u8BCD",kindBusiness:"\u4E1A\u52A1",kindTool:"\u5DE5\u5177",kindMistake:"\u6559\u8BAD",kindCore:"\u6838\u5FC3\u8BB0\u5FC6",kindSkill:"\u6280\u80FD",newsTab:"\u65B0\u95FB",newsTitle:"\u65B0\u95FB",newsHint:"\u6BCF\u65E5 AI \u65B0\u95FB\u3001\u672C\u6708\u699C\u5355\uFF0C\u4EE5\u53CA\u4F60\u81EA\u5DF1\u7684\u53D1\u5E03\u3002",newsNew:"\u5199\u4E00\u6761",newsSearch:"\u641C\u7D22\u6807\u9898 / \u6B63\u6587 / \u6807\u7B7E\u2026",newsUnreadOnly:"\u53EA\u770B\u672A\u8BFB",newsEmpty:"\u8FD8\u6CA1\u6709\u65B0\u95FB\u3002\u5199\u7B2C\u4E00\u6761\u53D1\u5E03\u3001\u51B3\u7B56\u6216\u56E2\u961F\u7B80\u62A5\u3002",newsNoMatch:"\u6CA1\u6709\u5339\u914D\u7684\u65B0\u95FB",newsPinned:"\u7F6E\u9876",newsRead:"\u5DF2\u8BFB",newsUnread:"\u672A\u8BFB",newsMarkRead:"\u6807\u8BB0\u5DF2\u8BFB",newsMarkUnread:"\u6807\u8BB0\u672A\u8BFB",newsEdit:"\u7F16\u8F91",newsDeleteConfirm:"\u5220\u9664\u8FD9\u6761\u65B0\u95FB\uFF1F",newsDeleted:"\u5DF2\u5220\u9664",newsSave:"\u4FDD\u5B58",newsSaving:"\u4FDD\u5B58\u4E2D\u2026",newsSaved:"\u5DF2\u4FDD\u5B58",newsSaveFail:"\u4FDD\u5B58\u5931\u8D25",newsTitleField:"\u6807\u9898",newsBodyField:"\u6B63\u6587\uFF08Markdown\uFF09",newsCategoryField:"\u5206\u7C7B",newsSourceField:"\u6765\u6E90",newsUrlField:"\u94FE\u63A5",newsTagsField:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",newsDateField:"\u65E5\u671F",newsPinField:"\u7F6E\u9876",newsPreview:"\u9884\u89C8",newsEditBody:"\u7F16\u8F91\u6B63\u6587",newsOpenLink:"\u6253\u5F00\u94FE\u63A5",newsToday:"\u4ECA\u5929",newsYesterday:"\u6628\u5929",newsEarlier:"\u66F4\u65E9",newsTitlePlaceholder:"\u4F8B\u5982\uFF1Av0.20.0 \u53D1\u5E03\u8BF4\u660E",newsBodyPlaceholder:"\u5199\u70B9\u503C\u5F97\u7559\u4E0B\u7684\u5185\u5BB9\u2026\u652F\u6301 Markdown",newsCountUnit:"\u6761",cancel:"\u53D6\u6D88",newsDaily:"\u4ECA\u65E5\u65B0\u95FB",newsMonthly:"\u672C\u6708",newsMine:"\u6211\u7684\u65B0\u95FB",newsDailySub:"\u6BCF\u65E5\u6700\u65B0\u7684 AI \u65B0\u95FB\uFF0C\u4E2D\u6587\u4F18\u5148",newsMonthlySub:"\u672C\u6708 AI \u65B0\u95FB\uFF1A\u4E2D\u6587\u6309\u65F6\u95F4\u5F52\u6863\uFF0C\u82F1\u6587\u6309 Hacker News \u70ED\u5EA6",newsMineSub:"\u4F60\u81EA\u5B9A\u4E49\u7684\u53D1\u5E03\u3001\u51B3\u7B56\u548C\u56E2\u961F\u7B80\u62A5",newsLoading:"\u6B63\u5728\u62C9\u53D6\u8D44\u8BAF\u2026",newsFeedError:"\u8D44\u8BAF\u6E90\u6682\u65F6\u4E0D\u53EF\u7528",newsHeat:"\u70ED\u5EA6",newsComments:"\u8BC4\u8BBA",newsOriginal:"\u9605\u8BFB\u539F\u6587",newsUpdatedAt:"\u66F4\u65B0\u4E8E",newsPartialFail:"\u90E8\u5206\u6765\u6E90\u5931\u8D25",newsFeedEmpty:"\u4ECA\u5929\u8FD8\u6CA1\u6709\u6293\u5230\u8D44\u8BAF\uFF0C\u70B9\u5237\u65B0\u518D\u8BD5\u3002",newsFeedRefresh:"\u5237\u65B0\u8D44\u8BAF",newsLoadingHint:"\u9996\u6B21\u52A0\u8F7D\u4F1A\u6293\u53D6\u591A\u4E2A\u4E2D\u6587\u8D44\u8BAF\u6E90\uFF0C\u53EF\u80FD\u9700\u8981\u51E0\u79D2\u2026",newsRetry:"\u91CD\u8BD5",newsSearchGo:"\u641C\u7D22",newsSortRec:"\u4E3A\u4F60\u63A8\u8350",newsSortTime:"\u6700\u65B0",newsPersonalized:"\u5DF2\u6309\u4F60\u7684\u559C\u7231\u5B9A\u5236\u6392\u5E8F",newsLastQuery:"\u4E0A\u6B21\u641C\u7D22",newsResetPrefs:"\u91CD\u7F6E\u504F\u597D",newsHeroEye:"NEWSROOM \xB7 AI \u60C5\u62A5\u7AD9",newsHeroHint:"\u641C\u7D22\u4E00\u6B21\u5C31\u4F1A\u88AB\u8BB0\u4F4F\uFF0C\u4E0B\u6B21\u6253\u5F00\u81EA\u52A8\u6309\u4F60\u7684\u53E3\u5473\u6392\u5E8F\uFF1B\u53EA\u5728\u672C\u9875\u9996\u6B21\u6253\u5F00\u65F6\u62C9\u53D6\u4E00\u6B21\u6570\u636E\u3002",newsMatched:"\u6761\u547D\u4E2D",newsNoMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8D44\u8BAF",newsNoMatchHint:"\u8FD9\u6279\u6570\u636E\u91CC\u6CA1\u6709\u547D\u4E2D\u5F53\u524D\u5173\u952E\u8BCD + \u5206\u7C7B + \u8BED\u8A00\u7684\u6761\u76EE\uFF0C\u6E05\u9664\u7B5B\u9009\u5C31\u80FD\u770B\u56DE\u5168\u90E8\u3002",newsClearFilters:"\u6E05\u9664\u7B5B\u9009",newsJustNow:"\u521A\u521A",newsMinutesAgo:"\u5206\u949F\u524D",newsHoursAgo:"\u5C0F\u65F6\u524D",newsDaysAgo:"\u5929\u524D",newsLangZh:"\u4E2D\u6587",newsLangEn:"\u82F1\u6587",newsLangAll:"\u4E0D\u9650",newsZhArchive:"\u4E2D\u6587\u6708\u699C\u6309\u65F6\u95F4\u5F52\u6863\uFF08\u4E2D\u6587\u6E90\u6682\u65E0\u516C\u5F00\u70ED\u5EA6\u5206\u6570\uFF09",newsEnRanking:"\u82F1\u6587\u6708\u699C\u6309 Hacker News \u5206\u6570\u6392\u540D",skillCards:"\u6280\u80FD\u5361",skillCardsHint:"\u4ECE\u672C\u673A\u5B9E\u9645\u5B89\u88C5/\u53EF\u7528\u7684\u6280\u80FD\u751F\u6210\u5361\u7247\uFF0C\u5F3A\u5236\u8FDB\u5165\u5BA1\u6838\uFF1B\u4E0D\u7531 Agent \u5BF9\u8BDD\u6C89\u6DC0\u3002",skillAutoSync:"\u81EA\u52A8\u540C\u6B65\u6280\u80FD\u5361",syncSkills:"\u540C\u6B65\u6280\u80FD",syncingSkills:"\u6B63\u5728\u540C\u6B65\u6280\u80FD\u2026",skillsSyncDone:"\u6280\u80FD\u5361\u540C\u6B65\u5B8C\u6210",skillsScanned:"\u626B\u63CF",skillsCreated:"\u65B0\u589E",skillsUpdated:"\u66F4\u65B0",skillsPendingUpdates:"\u5F85\u5BA1\u66F4\u65B0",skillsSyncFail:"\u6280\u80FD\u5361\u540C\u6B65\u5931\u8D25",cardsTab:"\u77E5\u8BC6\u5361",webTab:"Web \u7248",webOpening:"\u6B63\u5728\u7528\u9ED8\u8BA4\u6D4F\u89C8\u5668\u6253\u5F00 Web \u7248\u2026",webOpened:"\u5DF2\u7528\u9ED8\u8BA4\u6D4F\u89C8\u5668\u6253\u5F00 Web \u7248",webOpenFail:"\u6253\u5F00\u6D4F\u89C8\u5668\u5931\u8D25\uFF0C\u53EF\u624B\u52A8\u8BBF\u95EE",terminalTab:"\u7EC8\u7AEF\u7248",terminalTitle:"\u7EC8\u7AEF\u5B8C\u6574\u7248",terminalIntro:"Web UI \u4E0D\u6E32\u67D3\u7EC8\u7AEF\u539F\u751F TUI\u3002\u8981\u5B8C\u6574\u6279\u5361\u3001\u957F\u6587\u6EDA\u52A8\u548C\u5168\u9009\uFF0C\u8BF7\u6253\u5F00\u672C\u673A\u7EC8\u7AEF\uFF1B\u6216\u8005\u76F4\u63A5\u5728 dsh-tui \u91CC\u7528 /audit\u3002",terminalRun:"\u53EA\u8BFB\u4F53\u9A8C\uFF08\u771F\u5B9E\u961F\u5217\uFF09",terminalTui:"\u5199\u5165\u6A21\u5F0F\uFF08\u771F\u5B9E\u6279\u9A73\uFF09",terminalWhy:"\u4E3A\u4EC0\u4E48\u4E0D\u76F4\u63A5\u5D4C\u8FDB\u7F51\u9875",terminalWhyBody:"\u7EC8\u7AEF TUI \u4F9D\u8D56 alternate screen\u3001\u539F\u59CB\u952E\u76D8\u4E8B\u4EF6\u548C\u5B57\u7B26\u7F51\u683C\uFF0C\u65E0\u6CD5\u7528 iframe \u5FE0\u5B9E\u5D4C\u5165\u3002\u8FD9\u91CC\u7ED9\u51FA\u771F\u5B9E\u547D\u4EE4\uFF0C\u6253\u5F00\u540E\u5C31\u662F\u540C\u4E00\u5957\u754C\u9762\u3002",terminalCopy:"\u590D\u5236\u547D\u4EE4",terminalCopied:"\u5DF2\u590D\u5236",terminalPreview:"\u7EC8\u7AEF\u9884\u89C8",graphTab:"\u77E5\u8BC6\u661F\u56FE",graph:"\u77E5\u8BC6\u56FE\u8C31",graphHint:"\u8282\u70B9=\u77E5\u8BC6\u5361\uFF1B\u8FDE\u7EBF=[[\u94FE\u63A5]] \u6216\u5171\u4EAB\u6807\u7B7E\u3002\u70B9\u51FB\u8282\u70B9\u9605\u8BFB\u5361\u7247\u3002",graphTip:"\u5DE6\u952E\u51F8\u663E \xB7 Shift+\u62D6\u62FD\u6846\u9009 \xB7 \u53F3\u952E\u83DC\u5355 \xB7 \u6EDA\u8F6E\u7F29\u653E \xB7 \u62D6\u62FD\u5E73\u79FB",rebuild:"\u91CD\u5EFA",reset:"\u91CD\u7F6E",expandAll:"\u5168\u90E8\u5C55\u5F00",capped:"\u5DF2\u5C55\u793A\u6700\u6838\u5FC3\u7684",clearFocus:"\u53D6\u6D88\u9AD8\u4EAE",empty:"\u8BB0\u5FC6\u5E93\u8FD8\u662F\u7A7A\u7684\u3002\u591A\u804A\u51E0\u8F6E\u540E\uFF0C\u503C\u5F97\u4FDD\u5B58\u7684\u5185\u5BB9\u4F1A\u81EA\u52A8\u6C89\u6DC0\u6210\u77E5\u8BC6\u5361\u3002",emptyGraph:"\u56FE\u8C31\u6682\u65E0\u6570\u636E\u3002",open:"\u9605\u8BFB",updated:"\u66F4\u65B0\u4E8E",created:"\u521B\u5EFA\u4E8E",source:"\u6765\u6E90",contents:"\u76EE\u5F55",related:"\u76F8\u5173\u8BB0\u5FC6",file:"\u6587\u4EF6",close:"\u5173\u95ED",vaultDir:"\u8BB0\u5FC6\u5E93\u76EE\u5F55",capture:"\u81EA\u52A8\u6C89\u6DC0",recall:"\u81EA\u52A8\u53EC\u56DE",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",error:"\u52A0\u8F7D\u5931\u8D25",back:"\u8FD4\u56DE\u5217\u8868",cardCount:"\u5F20\u5361",nodes:"\u8282\u70B9",edges:"\u8FDE\u7EBF",memoryTitle:"\u8BB0\u5FC6\u5E93",memoryHint:"\u4F60\u7684\u672C\u5730\u7B2C\u4E8C\u5927\u8111",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",fit:"\u9002\u5E94",enterFullscreen:"\u5168\u5C4F",exitFullscreen:"\u9000\u51FA\u5168\u5C4F",exportGraph:"\u5BFC\u51FA",openCard:"\u6253\u5F00\u5361\u7247",focusNeighbors:"\u51F8\u663E\u5173\u8054",copyName:"\u590D\u5236\u540D\u79F0",noMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6",clearFilter:"\u6E05\u9664\u8FC7\u6EE4",filterLabel:"\u7B5B\u9009",sortRecent:"\u6700\u8FD1",sortTitle:"\u6807\u9898",sortHot:"\u70ED\u70B9",exportSel:"\u5BFC\u51FA\u9009\u4E2D",clearSelection:"\u6E05\u7A7A\u9009\u62E9",download:"\u4E0B\u8F7D",openNewTab:"\u65B0\u6807\u7B7E\u6253\u5F00",copyImage:"\u590D\u5236\u56FE\u7247",done:"\u5B8C\u6210",downloaded:"\u5DF2\u5F00\u59CB\u4E0B\u8F7D",openedTab:"\u5DF2\u5728\u65B0\u6807\u7B7E\u6253\u5F00",copied:"\u5DF2\u590D\u5236",exportedSel:"\u4E2A\u8282\u70B9\u5DF2\u5BFC\u51FA",fullscreen:"\u5168\u5C4F",exitFull:"\u9000\u51FA\u5168\u5C4F",copyFail:"\u590D\u5236\u5931\u8D25",timeDim:"\u65F6\u95F4\u7EF4",graphWarming:"\u6B63\u5728\u5E03\u5C40 {n} \u4E2A\u8282\u70B9\u2026",graphAllCrumb:"\u5168\u90E8",graphOther:"\u5176\u4ED6",graphItems:"\u56FE\u5143",graphCardsUnit:"\u5361",graphPlanetCards:"{n} \u5F20\u5361",graphEnter:"\u8FDB\u5165\u8BE5\u5C42",graphLevelLoading:"\u6B63\u5728\u52A0\u8F7D\u5C42\u7EA7\u2026",graphLevelTimeout:"\u5C42\u52A0\u8F7D\u8D85\u65F6\uFF08{ms}ms\uFF09\xB7 \u5DF2\u4FDD\u7559\u5F53\u524D\u5C42",graphLevelError:"\u5C42\u52A0\u8F7D\u5931\u8D25 \xB7 \u5DF2\u4FDD\u7559\u5F53\u524D\u5C42",graphRetry:"\u91CD\u8BD5",graphEmptyLevel:"\u8FD9\u4E00\u5C42\u6CA1\u6709\u5361\u7247\u3002",graphLevelHint:"\u70B9\u5927\u661F\u7403\u8FDB\u5165\u8BE5\u5C42 \xB7 Shift+\u70B9\u51FB\u9009\u4E2D \xB7 \u62D6\u62FD\u79FB\u52A8 \xB7 \u6EDA\u8F6E\u7F29\u653E",graphBreadcrumbAria:"\u5C42\u7EA7\u9762\u5305\u5C51",graphCountWan:"\u4E07",graphCountLocale:"zh-CN",timeNew:"3 \u5929\u5185",timeRecent:"2 \u5468\u5185",timeMonth:"1 \u6708\u5185",timeOld:"\u66F4\u65E9",newBadge:"\u65B0",expand:"\u5C55\u5F00\u5168\u90E8",collapse:"\u6536\u8D77",copyBody:"\u590D\u5236\u6B63\u6587",clearFilter:"\u6E05\u9664\u6807\u7B7E\u7B5B\u9009",copyPath:"\u590D\u5236\u8DEF\u5F84",copied:"\u5DF2\u590D\u5236",copyFail:"\u590D\u5236\u5931\u8D25",readWidth:"\u9605\u8BFB\u5BBD\u5EA6",widthNarrow:"\u7A84",widthMid:"\u4E2D",widthWide:"\u5BBD",exportVault:"\u5BFC\u51FAMD",exportJson:"\u5BFC\u51FAJSON",exporting:"\u5BFC\u51FA\u4E2D\u2026",exportedVault:"\u8BB0\u5FC6\u5E93\u5DF2\u5BFC\u51FA",exportFail:"\u5BFC\u51FA\u5931\u8D25",importVault:"\u5BFC\u5165",importedVault:"\u5BFC\u5165\u5B8C\u6210",importedTotal:" \u5F20 / \u6587\u4EF6\u5171 ",importedTotalTail:" \u5F20",importedQuarantine:" \xB7 \u5F85\u5BA1\u6838 ",importedQuarantineTail:" \u5F20\uFF08\u9694\u79BB\u533A\uFF0C\u6279\u51C6\u540E\u624D\u53C2\u4E0E\u53EC\u56DE\uFF09",importedSkipped:" \xB7 \u8DF3\u8FC7 ",importedSkippedTail:" \u5F20\uFF08\u91CD\u590D\u6216\u7A7A\uFF09",importFail:"\u5BFC\u5165\u5931\u8D25",location:"\u81EA\u9009\u4F4D\u7F6E",saveAs:"\u53E6\u5B58\u4E3A",saveAsUnsupported:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u9009\u62E9\u4FDD\u5B58\u4F4D\u7F6E",exportedTo:"\u5DF2\u5BFC\u51FA\u5230",defaultDownloads:"\u9ED8\u8BA4\u4E0B\u8F7D\u6587\u4EF6\u5939",exportCancel:"\u5DF2\u53D6\u6D88\u5BFC\u51FA",manage:"\u7BA1\u7406",tabUsage:"\u8FD0\u884C\u72B6\u6001",tabOptimize:"\u6574\u7406\u5EFA\u8BAE",adminLoadFail:"\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF1A\u8BF7\u5F7B\u5E95\u91CD\u542F dsh-desktop\uFF08host \u9700\u52A0\u8F7D\u65B0\u7248 /memory-eternal \u8DEF\u7531\uFF09",retry:"\u91CD\u8BD5",mergeSimilar:"\u4E00\u952E\u5408\u5E76\u76F8\u4F3C",trendLabel:"\u8FD1 30 \u5929\u8D8B\u52BF",cleanStale:"\u{1F5D1}\uFE0F \u4E00\u952E\u6E05\u7406\u9648\u65E7",deletedStale:"\u4E2A\u9648\u65E7\u5361\u5DF2\u6E05\u7406",newCard:"\u65B0\u5EFA",tplDecision:"\u{1F4DD} \u6280\u672F\u51B3\u7B56",tplBug:"\u{1F41B} \u8E29\u5751",tplMeeting:"\u{1F4CB} \u4F1A\u8BAE\u7EAA\u8981",tplWeekly:"\u{1F4CA} \u5468\u62A5",createCard:"\u521B\u5EFA",cardTitle:"\u6807\u9898",cardBody:"\u6B63\u6587",fbUseful:"\u6709\u7528",fbIrr:"\u65E0\u5173",todayAdd:"\u4ECA\u65E5\u65B0\u589E",weekAdd:"\u8FD1 7 \u5929",byKind:"\u5206\u7C7B\u7EDF\u8BA1",todayList:"\u4ECA\u65E5\u6C89\u6DC0",budgetLabel:"\u4F1A\u8BDD\u9884\u7B97",budgetChars:"\u9884\u7B97\u5B57\u7B26",recallLimitLabel:"\u53EC\u56DE\u6761\u6570",embeddingLabel:"\u8BED\u4E49\u53EC\u56DE",mergePairs:"\u76F8\u4F3C\u5361\u5BF9\uFF08\u53EF\u5408\u5E76\uFF09",staleCards:"\u9648\u65E7\u5361\uFF08>90 \u5929\u672A\u66F4\u65B0\uFF09",noOptimize:"\u6682\u65E0\u53EF\u6574\u7406\u9879\uFF0C\u5F88\u5065\u5EB7 \u{1F389}",refineTitle:"\u77DB\u76FE\u626B\u63CF",refineScan:"\u5F00\u59CB\u626B\u63CF",refineHint:"\u76F8\u4F3C\u53EF\u4EE5\u5408\u5E76\uFF0C\u77DB\u76FE\u5FC5\u987B\u4EBA\u5224\u65AD \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u9009\u62E9\u540E\u624D\u52A8\u6570\u636E\uFF08\u4FDD\u7559\u4E00\u5F20\u4F1A\u628A\u53E6\u4E00\u5F20\u653E\u8FDB\u56DE\u6536\u7AD9\uFF0C\u53EF\u8FD8\u539F\uFF09",refineIdle:"\u70B9\u300C\u5F00\u59CB\u626B\u63CF\u300D\uFF1A\u5148\u5BBD\u53EC\u56DE\u53EF\u80FD\u6709\u5173\u7CFB\u7684\u5361\u7247\u5BF9\uFF0C\u518D\u8BA9\u6A21\u578B\u5224\u65AD\u662F\u91CD\u590D / \u8865\u5145 / \u77DB\u76FE / \u65E0\u5173",refineNone:"\u8FD9\u4E00\u8F6E\u6CA1\u6709\u53D1\u73B0\u9700\u8981\u4F60\u88C1\u51B3\u7684\u5361\u7247\u5BF9 \u{1F389}",refineFail:"\u77DB\u76FE\u626B\u63CF\u5931\u8D25",refineApplied:"\u5DF2\u8BB0\u5F55\u4F60\u7684\u88C1\u51B3\uFF08\u4E0D\u4F1A\u91CD\u590D\u6253\u6270\uFF09",refineRel_duplicate:"\u91CD\u590D\uFF08\u53EF\u5408\u5E76\uFF09",refineRel_complement:"\u8865\u5145\uFF08\u90FD\u7559\u7740\uFF09",refineRel_conflict:"\u77DB\u76FE\uFF08\u9700\u4F60\u88C1\u51B3\uFF09",refineRel_unrelated:"\u65E0\u5173",refineKeepA:"\u4FDD\u7559 A",refineKeepB:"\u4FDD\u7559 B",refineKeepBoth:"\u90FD\u4FDD\u7559",refineMerge:"\u5408\u5E76",junkTitle:"\u6CE8\u5165\u5783\u573E\u5361",junkScan:"\u626B\u63CF\u5B58\u91CF",junkHint:"\u6000\u7591\u662F\u8FD0\u884C\u65F6\u6CE8\u5165\u6587\u672C\uFF08\u6280\u80FD\u76EE\u5F55 / system-reminder\uFF09\u6C89\u6DC0\u6210\u7684\u5361 \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u56DE\u6536\u8D70\u56DE\u6536\u7AD9\u53EF\u8FD8\u539F",junkIdle:"\u70B9\u300C\u626B\u63CF\u5B58\u91CF\u300D\uFF1A\u627E\u51FA\u6B63\u6587\u5176\u5B9E\u662F\u88AB\u6CE8\u5165\u7684\u8FD0\u884C\u65F6\u6587\u672C\u3001\u5265\u6389\u540E\u51E0\u4E4E\u4E0D\u5269\u4EBA\u8BDD\u7684\u5361",junkNone:"\u6CA1\u53D1\u73B0\u8FD9\u7C7B\u5361 \u{1F389}",junkRecycle:"\u56DE\u6536",junkRecycleAll:"\u5168\u90E8\u56DE\u6536",junkRecycleAllConfirm:"\u786E\u8BA4\u628A\u8FD9\u4E9B\u5361\u9001\u8FDB\u56DE\u6536\u7AD9\uFF1F\uFF08\u4E0D\u662F\u6C38\u4E45\u5220\u9664\uFF0C\u53EF\u5728\u56DE\u6536\u4E2D\u5FC3\u8FD8\u539F\uFF09",junkDone:"\u5DF2\u9001\u56DE\u6536\u7AD9",junkFail:"\u626B\u63CF / \u56DE\u6536\u5931\u8D25",dbReadonlyTitle:"\u8BB0\u5FC6\u5E93\u5F53\u524D\u4E0D\u53EF\u5199",dbReadonlyBody:"\u5361\u7247\u8BFB\u5199 / \u5BA1\u6838 / \u56FE\u8C31\u4F1A\u5931\u8D25\uFF0C\u4F46**\u914D\u7F6E\u4ECD\u53EF\u4FDD\u5B58**\uFF08\u914D\u7F6E\u4E0D\u7ECF\u8FC7\u6570\u636E\u5E93\uFF09",dbReadonlyFix:"\u6392\u67E5\uFF1Adsh-memory doctor\uFF08\u770B journal \u6A21\u5F0F\u3001\u5199\u63A2\u9488\u3001\u5907\u4EFD\u6E05\u5355\u4E0E\u6062\u590D\u6B65\u9AA4\uFF09",goalTitle:"\u540C\u76EE\u6807\u4E0D\u540C\u505A\u6CD5",goalScan:"\u626B\u63CF\u76EE\u6807",goalHint:"\u6309\u300C\u8FD9\u5F20\u5361\u89E3\u51B3\u4EC0\u4E48\u95EE\u9898\u300D\u805A\u7C7B \u2014\u2014 \u6B63\u6587\u76F8\u4F3C\u5EA6\u6293\u4E0D\u5230\u7684\u505A\u6CD5\u5DEE\u5F02\uFF087z \u538B\u7F29 / tar \u5206\u53D1 / npm \u7626\u8EAB\uFF09\u4E5F\u80FD\u5F52\u5230\u4E00\u8D77",goalIdle:"\u70B9\u300C\u626B\u63CF\u76EE\u6807\u300D\uFF1A\u6A21\u578B\u5148\u7ED9\u6BCF\u5F20\u5361\u62BD\u4E00\u53E5\u76EE\u6807\uFF08\u9996\u6B21\u4F1A\u8C03\u6A21\u578B\uFF0C\u4E4B\u540E\u8D70\u7F13\u5B58\uFF09\uFF0C\u518D\u6309\u76EE\u6807\u805A\u7C7B",goalNone:"\u6CA1\u6709\u53D1\u73B0\u300C\u540C\u4E00\u76EE\u6807\u3001\u591A\u5F20\u5361\u300D\u7684\u7C07 \u{1F389}",goalStats:"\u5DF2\u7D22\u5F15 / \u672C\u6B21\u8C03\u7528",goalCards:"\u5F20\u5361",goalKeep:"\u90FD\u4FDD\u7559",goalMerge:"\u5408\u5E76\u8FD9\u4E00\u7EC4",goalMerged:"\u5DF2\u63D0\u4EA4\u5408\u5E76\uFF08\u65B0\u5361\u8FDB\u5BA1\u6838\u961F\u5217\uFF09",goalDone:"\u5DF2\u8BB0\u5F55\u300C\u90FD\u4FDD\u7559\u300D",goalFail:"\u76EE\u6807\u805A\u7C7B\u5931\u8D25",oneClickOptimize:"\u4E00\u952E\u4F18\u5316",oneClickOptimizeConfirm:"\u786E\u8BA4\u4E00\u952E\u4F18\u5316\uFF1F\u5C06\u5408\u5E76\u6240\u6709\u76F8\u4F3C\u5361\u5BF9\uFF08\u9ED8\u8BA4\u4E0D\u6E05\u7406\u9648\u65E7\u5361\uFF09\u3002",oneClickAlsoStale:"\u540C\u65F6\u6E05\u7406\u9648\u65E7\u5361",oneClickOptimizeDone:"\u4E00\u952E\u4F18\u5316\u5B8C\u6210",optimizedMerged:"\u5BF9\u5DF2\u5408\u5E76",optimizedStaleDeleted:"\u5F20\u9648\u65E7\u5361\u5DF2\u6E05\u7406",mcpSetupStatus:"Agent MCP \u6302\u8F7D\u72B6\u6001",rerunSetup:"\u8865\u5168 MCP",notInstalled:"\u672A\u5B89\u88C5",noMcpEntry:"\u914D\u7F6E\u7F3A\u5931",nodePathMismatch:"node \u8DEF\u5F84\u4E0D\u4E00\u81F4\uFF0C\u5EFA\u8BAE\u91CD\u8DD1 setup",nodePathNote:"node \u73AF\u5883\u4E0D\u540C\uFF08\u53EF\u7528\uFF09",mcpNeedsRepair:"\u26A0 \u9700\u4FEE\u590D\uFF08\u65E7\u914D\u7F6E\u4F1A\u62C9\u8D77 GUI\uFF09",repairMcp:"\u4FEE\u590D\u914D\u7F6E",healthy:"\u914D\u7F6E\u6B63\u5E38",mcpSetupHint:"\u300C\u81EA\u52A8\u6302\u8F7D MCP\u300D= \u8BA9 Claude Code / Codex / Cursor \u8FD9\u4E9B\u5DE5\u5177\u80FD\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002\u5F00\u542F\u540E\u81EA\u52A8\u628A\u5B83\u4EEC\u914D\u7F6E\u597D\uFF1B\u5173\u6389\u5C31\u4E0D\u52A8\u4F60\u7535\u8111\u4E0A\u4EFB\u4F55\u914D\u7F6E\u6587\u4EF6\uFF0C\u9700\u8981\u65F6\u624B\u52A8\u8DD1 dsh-memory setup\u3002",mcpManageHint:"\u6BCF\u4E2A agent \u7528\u4E0B\u65B9\u6309\u94AE\u5355\u72EC\u5B89\u88C5/\u5378\u8F7D MCP",tabConfig:"\u8BB0\u5FC6\u914D\u7F6E",configPageSub:"\u5199\u5165\u3001\u8DEF\u7531\u3001\u5BA1\u6838\u4E0E\u670D\u52A1\u7684\u672C\u5730\u914D\u7F6E",tabAudit:"\u5F85\u5BA1",statusApproved:"\u5DF2\u5BA1\u6838",statusPending:"\u5F85\u5BA1\u6838",statusRejected:"\u5DF2\u9A73\u56DE",allStatus:"\u5168\u90E8\u72B6\u6001",tabRecycle:"\u56DE\u6536\u4E2D\u5FC3",recyclePageSub:"\u5DF2\u5220\u9664\u7684\u5361\u4FDD\u7559 30 \u5929\uFF0C\u53EF\u6062\u590D\u6216\u6C38\u4E45\u5220\u9664",pending:"\u5F85\u5BA1\u6838",rejected:"\u5DF2\u9A73\u56DE",selectAll:"\u5168\u9009",approve:"\u6279\u51C6",approveAndCore:"\u6279\u51C6\u5E76\u8BBE\u4E3A\u6838\u5FC3",approveCore:"\u6279\u51C6\u4E3A\u6838\u5FC3\u8BB0\u5FC6",approveAsNormal:"\u6279\u51C6\u4E3A\u666E\u901A\u5361",coreSuggested:"\u6838\u5FC3\u8BB0\u5FC6\uFF08\u5F85\u5BA1\u6838\uFF09",reclassify:"\u91CD\u65B0\u8BC6\u522B\u7C7B\u578B",reject:"\u9A73\u56DE",allAgents:"\u5168\u90E8\u667A\u80FD\u4F53",noAuditItems:"\u6682\u65E0\u5BA1\u6838\u9879\u76EE",auditBodyFail:"\u6B63\u6587\u8BFB\u53D6\u5931\u8D25",deletedAt:"\u5220\u9664\u4E8E",restore:"\u6062\u590D",restoreDelete:"\u5220\u9664\u8FDB\u56DE\u6536\u7AD9",purge:"\u6C38\u4E45\u5220\u9664",emptyRecycle:"\u56DE\u6536\u7AD9\u4E3A\u7A7A",recycleHint:"\u5220\u9664\u7684\u5361\u7247\u5148\u8FDB\u56DE\u6536\u7AD9\uFF0C30 \u5929\u5185\u53EF\u6062\u590D\uFF0C\u8D85\u671F\u81EA\u52A8\u6C38\u4E45\u5220\u9664",purgeConfirm:"\u786E\u5B9A\u6C38\u4E45\u5220\u9664\uFF1F\u4E0D\u53EF\u6062\u590D\u3002",recycleDeleteConfirm:"\u786E\u5B9A\u5220\u9664\u8FDB\u56DE\u6536\u7AD9\uFF1F30 \u5929\u5185\u53EF\u6062\u590D\u3002",modeInit:"\u542F\u52A8\u65F6\u62C9\u4E00\u6B21",modeInterval:"\u5468\u671F\u4FDD\u6D3B",modeManual:"\u4EC5\u624B\u52A8",serviceConfig:"\u670D\u52A1\u81EA\u7BA1\u7406\u914D\u7F6E",auditConfig:"\u81EA\u52A8\u5BA1\u6838\u914D\u7F6E",auditHint:"\u547D\u4E2D\u514D\u5BA1\u7684\u65B0\u5361\u76F4\u63A5\u5165\u5E93\uFF0C\u5176\u4F59\u8FDB\u5F85\u5BA1\u6838",auditMode:"\u5BA1\u6838\u6A21\u5F0F",auditAll:"\u5168\u90E8\u8981\u5BA1\u6838",auditNone:"\u5168\u90E8\u514D\u5BA1",auditExemptAgents:"\u514D\u5BA1\u667A\u80FD\u4F53",auditExemptKinds:"\u514D\u5BA1\u7C7B\u578B",allExempt:"\u5168\u90E8\u514D\u5BA1",recycleDays:"\u56DE\u6536\u4FDD\u7559\u5929\u6570",editInSetting:"\u7F16\u8F91\u8BF7\u5230 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6",pendingSyncNote:"\u6B64\u9875\u662F\u72EC\u7ACB Web \u9875\uFF1A\u4FDD\u5B58\u540E\u7531 DSH \u5BBF\u4E3B\u5E94\u7528\uFF08\u65B0\u7248\u5BBF\u4E3B\u4F1A\u88AB\u76F4\u63A5\u53EB\u9192\u3001\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF0C\u70B9\u4FDD\u5B58\u5373\u751F\u6548\uFF09\uFF1B\u82E5\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5219\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\u3001\u7ACB\u5373\u751F\u6548\u3002\u53EA\u6709\u5728\u5BF9\u63A5\u65E7\u7248\u5BBF\u4E3B\u65F6\u624D\u4F1A\u9000\u56DE\u300C\u6392\u961F\u7B49\u5B83\u81EA\u5DF1\u540C\u6B65\u300D\uFF0C\u90A3\u65F6\u53EF\u5728 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u91CC\u6539\u540C\u4E00\u9879\u3002",readonlyTitle:"\u5F53\u524D\u9875\u9762\u53EA\u8BFB\uFF0C\u65E0\u6CD5\u4FDD\u5B58\u914D\u7F6E",readonlyBody:"\u8FD9\u4E2A\u8FDB\u7A0B\u6CA1\u6709 DSH \u7684\u8BBE\u7F6E\u670D\u52A1\uFF08settings.update \u4E0D\u5B58\u5728\uFF09\uFF0C\u914D\u7F6E\u53EA\u80FD\u5728\u672C\u673A DSH \u91CC\u4FEE\u6539\uFF1A\u684C\u9762\u7248 \u2192 \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u3002",readonlyBtn:"\u53EA\u8BFB",setupRunInTerminal:"\u8BF7\u590D\u5236\u4EE5\u4E0B\u547D\u4EE4\u5230\u7EC8\u7AEF\u6267\u884C\uFF1A",dshMemoryConfig:"DSH \u8BB0\u5FC6\u914D\u7F6E",coreMemory:"\u6838\u5FC3\u8BB0\u5FC6\uFF08\u524D\u7F6E\u5F3A\u5236\uFF09",coreMemoryHint:"\u6BCF\u6B21\u4F1A\u8BDD\u81EA\u52A8\u6CE8\u5165\uFF0C\u4E0D\u4F9D\u8D56\u6A21\u578B\u4E3B\u52A8\u53EC\u56DE\uFF1B\u53EA\u8BFB\u53D6\u5DF2\u6279\u51C6\u7684\u6838\u5FC3\u5361",coreMemoryEnabled:"\u542F\u7528\u6838\u5FC3\u8BB0\u5FC6\u6CE8\u5165",coreMemoryLimit:"\u6838\u5FC3\u8BB0\u5FC6\u4E0A\u9650\uFF08\u5F20\uFF09",coreMemoryMaxChars:"\u6838\u5FC3\u8BB0\u5FC6\u603B\u5B57\u7B26\u4E0A\u9650",setCore:"\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6",unsetCore:"\u53D6\u6D88\u6838\u5FC3\u8BB0\u5FC6",coreSetOk:"\u5DF2\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6",coreUnsetOk:"\u5DF2\u53D6\u6D88\u6838\u5FC3\u8BB0\u5FC6",coreSetFail:"\u8BBE\u7F6E\u5931\u8D25",coreActiveHint:"\u8FD9\u5F20\u5361\u6BCF\u6B21\u4F1A\u8BDD\u90FD\u4F1A\u5F3A\u5236\u6CE8\u5165\uFF1B\u4E0E\u666E\u901A\u8BB0\u5FC6\u51B2\u7A81\u65F6\u4EE5\u5B83\u4E3A\u51C6\u3002",coreInactiveHint:"\u666E\u901A\u77E5\u8BC6\u5361\u53EF\u4EE5\u63D0\u5347\u4E3A\u6838\u5FC3\u8BB0\u5FC6\uFF1B\u63D0\u5347\u540E\u6BCF\u6B21\u4F1A\u8BDD\u81EA\u52A8\u751F\u6548\u3002",coreNeedApproval:"\u5148\u6279\u51C6\u8FD9\u5F20\u5361\uFF0C\u624D\u80FD\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6\u3002",coreShort:"\u6838\u5FC3",setCoreShort:"\u8BBE\u6838\u5FC3",uiLayout:"\u5E03\u5C40\u5927\u5C0F",uiLayoutHint:"\u8C03\u6574\u8BB0\u5FC6\u754C\u9762\u6574\u4F53\u5927\u5C0F\uFF08\u53EA\u5F71\u54CD\u663E\u793A\uFF0C\u4E0D\u5F71\u54CD\u8BB0\u5FC6\u6570\u636E\uFF09",uiCompact:"\u7D27\u51D1",uiNormal:"\u6807\u51C6",uiLarge:"\u5927",autoCapture:"\u81EA\u52A8\u6C89\u6DC0",autoRecall:"\u81EA\u52A8\u53EC\u56DE",captureMinChars:"\u6355\u83B7\u6700\u5C0F\u957F\u5EA6",maxCardsPerDay:"\u65E5\u914D\u989D",dedupThreshold:"\u53BB\u91CD\u9608\u503C",recallLimit:"\u53EC\u56DE\u6761\u6570",vaultMulti:"\u591A\u5E93\uFF08\u6309\u9879\u76EE\u9694\u79BB\uFF09",vaultMultiHint:"\u7559\u7A7A\u5373\u5355\u5E93\uFF0C\u8001\u914D\u7F6E\u4E0D\u53D7\u5F71\u54CD",vaultNow:"\u5F53\u524D\u751F\u6548",vaultSource:"\u6765\u6E90",vaultWorkspace:"\u5F53\u524D workspace",vaultNamePh:"\u5E93\u540D\uFF0C\u5982 work",vaultPathPh:"\u76EE\u5F55\uFF0C\u5982 D:/vaults/work",vaultMatchPh:"\u9879\u76EE\u76EE\u5F55\uFF08\u53EF\u9009\uFF0C\u6309 workspace \u81EA\u52A8\u9009\u5E93\uFF09",vaultAdd:"\u6DFB\u52A0\u4E00\u4E2A\u5E93",vaultActive:"\u6FC0\u6D3B\u5E93",vaultActiveNone:"\u9ED8\u8BA4\u5E93\uFF08\u4E0D\u6307\u5B9A\uFF09",vaultSrcEnv:"\u73AF\u5883\u53D8\u91CF MEMORY_VAULT_DIR",vaultSrcProfile:"\u6FC0\u6D3B\u5E93\u914D\u7F6E",vaultSrcWorkspace:"\u6309\u9879\u76EE\u76EE\u5F55\u81EA\u52A8\u547D\u4E2D",vaultSrcVaultDir:"\u5355\u5E93\u914D\u7F6E vaultDir",vaultSrcDefault:"\u9ED8\u8BA4\u76EE\u5F55",fbNav:"\u53CD\u9988\u5F02\u5E38",fbTitle:"\u53CD\u9988\u5F02\u5E38\uFF08\u63D0\u4EA4\u5230 GitHub\uFF09",fbDesc:"\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF08\u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A\uFF09",fbDiag:"\u8BCA\u65AD\u4FE1\u606F\uFF08\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E key/token \u5DF2\u66FF\u6362\uFF09",fbCopyDiag:"\u590D\u5236\u8BCA\u65AD\u4FE1\u606F",fbOpenIssue:"\u5728 GitHub \u63D0\u4EA4\uFF08\u5DF2\u9884\u586B\uFF09",fbCopyPrompt:"\u590D\u5236\u7ED9 AI \u7684\u63D0\u793A\u8BCD",fbCopiedDiag:"\u8BCA\u65AD\u4FE1\u606F\u5DF2\u590D\u5236",fbCopiedPrompt:"\u63D0\u793A\u8BCD\u5DF2\u590D\u5236\uFF0C\u7C98\u8FDB AI \u5BF9\u8BDD\u6846\u5373\u53EF",fbCopyFail:"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u9009\u4E2D\u590D\u5236",fbWhy:"GitHub \u4E0D\u5141\u8BB8\u533F\u540D\u521B\u5EFA issue\uFF0C\u63D2\u4EF6\u91CC\u4E5F\u4E0D\u5E94\u5185\u7F6E token\uFF1A\u6240\u4EE5\u8FD9\u91CC\u628A\u6807\u9898 / \u6B63\u6587 / \u8BCA\u65AD\u90FD\u9884\u586B\u597D\uFF0C\u4F60\u53EA\u9700\u518D\u70B9\u4E00\u6B21 Submit\u3002",fbNeedDesc:"\u8BF7\u5148\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898",fbLoading:"\u6B63\u5728\u6536\u96C6\u8BCA\u65AD\u4FE1\u606F\u2026",fbDiagFail:"\u8BCA\u65AD\u63A5\u53E3\u4E0D\u53EF\u7528\uFF08\u72EC\u7ACB web \u6216\u65E7\u7248\u5BBF\u4E3B\uFF09\uFF0C\u8BF7\u624B\u52A8\u8865\u5145\u73AF\u5883\u4FE1\u606F",fbOr:"\u6216\u8005",fbSelectAll:"\u5168\u9009",auditTypeLabel:"\u7C7B\u578B",auditInboxSub:"\u81EA\u52A8\u6C89\u6DC0\u7684\u5361\u5148\u5230\u8FD9\u91CC \xB7 \u6279\u51C6\u540E\u8FDB\u5165\u8BB0\u5FC6\u5E93",auditSearchPlaceholder:"\u641C\u7D22\u6807\u9898 / \u6807\u7B7E / \u8DEF\u5F84\u2026",auditNoMatch:"\u6CA1\u6709\u5339\u914D\u7684\u5BA1\u6838\u5361",auditUndo:"\u6279\u51C6\u4E0E\u9A73\u56DE\u90FD\u53EF\u64A4\u9500",auditSelected:"\u5DF2\u9009",auditRevision:"\u4FEE\u6539",auditRevisionFrom:"\u4FEE\u6539\u539F\u5361",auditClearSelection:"\u6E05\u7A7A",preview:"\u9884\u89C8",supportGroup:"\u4EA4\u6D41\u7FA4",supportGroupQQ:"QQ \u4EA4\u6D41\u7FA4",supportGroupWechat:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",supportSponsor:"\u8D5E\u52A9",supportLegacy:"\u65E7\u7A0B\u5E8F",supportTitle:"\u652F\u6301\u4E0E\u4EA4\u6D41",clickToZoom:"\u70B9\u51FB\u653E\u5927",supportGroupHint:"\u626B\u7801\u8FDB\u4EA4\u6D41\u7FA4\uFF08QQ / \u5FAE\u4FE1\uFF09\uFF0C\u9047\u5230\u95EE\u9898\u53EF\u4EE5\u76F4\u63A5\u95EE\u3002",supportSponsorHint:"\u5982\u679C\u8FD9\u4E2A\u63D2\u4EF6\u5E2E\u4F60\u7701\u4E86\u65F6\u95F4\uFF0C\u53EF\u4EE5\u8BF7\u4F5C\u8005\u559D\u676F\u5496\u5561\u3002\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\u3002",supportLegacyTitle:"\u65E7\u7A0B\u5E8F\uFF08dsh-desktop\uFF09\u5DF2\u505C\u6B62\u7EF4\u62A4",supportLegacyBody:"\u4F5C\u8005\u81EA\u7814\u7684 dsh-desktop \u5DF2\u505C\u6B62\u7EF4\u62A4\uFF0C\u5B98\u65B9 DeepSeek Harness \u684C\u9762\u7248\u5DF2\u8986\u76D6\u540C\u6837\u80FD\u529B\uFF0C\u5EFA\u8BAE\u8FC1\u79FB\u3002\u65E7 profile \u91CC\u5982\u679C\u8FD8\u9489\u7740\u5DF2\u64A4\u4E0B\u7684 dsh-desktop-shell@0.3.0\uFF0C\u5148\u5220\u6389\u90A3\u5957\u4F9D\u8D56\uFF0C\u5426\u5219 pnpm install \u4F1A\u5931\u8D25\u3002",supportReadme:"\u6253\u5F00 README",supportReleases:"\u5386\u53F2\u7248\u672C",supportFeedback:"\u5F02\u5E38\u53CD\u9988",supportReplay:"\u91CD\u65B0\u67E5\u770B\u5F15\u5BFC",onboardTitle:"30 \u79D2\u8BA4\u8BC6\u8BB0\u5FC6\u6838\u5FC3",onboardSub:"\u4F60\u7684 AI \u4F1A\u5728\u6BCF\u8F6E\u5BF9\u8BDD\u540E\u81EA\u52A8\u6C89\u6DC0\u77E5\u8BC6\u5361\uFF0C\u5148\u5BA1\u540E\u5165\u3002",onboardSkip:"\u8DF3\u8FC7",onboardBack:"\u4E0A\u4E00\u6B65",onboardNext:"\u4E0B\u4E00\u6B65",onboardStart:"\u5F00\u59CB\u4F7F\u7528",onboardStep0Title:"\u5148\u53BB GitHub \u70B9\u4E2A Star",onboardStep0Body:"Star \u662F\u4F5C\u8005\u7EE7\u7EED\u7EF4\u62A4\u6700\u76F4\u63A5\u7684\u53CD\u9988\uFF1B\u60F3\u81EA\u5DF1\u6539\u4EE3\u7801\u6216\u90E8\u7F72\uFF0C\u5C31\u987A\u624B Fork \u4E00\u4EFD\u3002",onboardStar:"Star / \u70B9\u8D5E",onboardFork:"Fork",onboardStarred:"\u5DF2 Star\uFF0C\u7EE7\u7EED",onboardStarHint:"\u4E4B\u540E\u53EF\u4EE5\u968F\u65F6\u70B9\u9876\u680F\u7684 \u2605 Star \u56DE\u6765\u3002",onboardStep1Title:"\u81EA\u52A8\u6C89\u6DC0\uFF0C\u4E0D\u7528\u624B\u52A8\u8BB0",onboardStep1Body:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\uFF0C\u503C\u5F97\u7559\u4E0B\u7684\u51B3\u7B56\u3001\u6839\u56E0\u548C\u6559\u8BAD\u4F1A\u88AB\u5199\u6210\u4E00\u5F20\u5361\u3002\u5148\u751F\u6210\uFF0C\u518D\u5BA1\u6838\u3002",onboardStep2Title:"\u8BFB\u5230\u6709\u7528\u7684\u5361\uFF0C\u70B9\u4E2A \u{1F44D}",onboardStep2Body:"\u6253\u5F00\u4EFB\u610F\u5361\u7247\uFF0C\u70B9 \u{1F44D} \u6709\u7528 / \u{1F44E} \u6CA1\u7528\u3002\u4E0D\u7528\u5148\u641C\u7D22\uFF0C\u6309\u94AE\u73B0\u5728\u4E00\u76F4\u90FD\u5728\u3002\u5B83\u4F1A\u5E2E\u52A9\u53EC\u56DE\u6392\u5E8F\u3002",onboardStep3Title:"\u5DE6\u4FA7\u65B0\u589E\u652F\u6301\u5165\u53E3",onboardStep3Body:"\u4EA4\u6D41\u7FA4\u3001\u8D5E\u52A9\u3001\u65E7\u7A0B\u5E8F\u3001\u5F02\u5E38\u53CD\u9988\u90FD\u5728\u5DE6\u680F\u5E95\u90E8\uFF1B\u9700\u8981\u5E2E\u52A9\u65F6\u4E0D\u7528\u7FFB README\u3002",onboardTip:"\u63D0\u793A\uFF1A\u8FD9\u4E2A\u5F15\u5BFC\u53EF\u4EE5\u5728\u300C\u652F\u6301\u4E0E\u4EA4\u6D41\u300D\u91CC\u91CD\u65B0\u6253\u5F00\u3002",navWorkspace:"\u5DE5\u4F5C\u533A",navSystem:"\u7CFB\u7EDF",navSupport:"\u652F\u6301",v5Local:"\u672C\u5730\u8FD0\u884C",v5Star:"\u53BB GitHub \u70B9 Star",runtimeTitle:"\u8FD0\u884C\u72B6\u6001",runtimeSub:"\u77E5\u8BC6\u5E93\u3001\u5907\u4EFD\u3001\u81EA\u52A8\u6C89\u6DC0\u4E0E\u7248\u672C",dbTitle:"\u77E5\u8BC6\u5E93",backupTitle:"\u5907\u4EFD",captureTitle:"\u81EA\u52A8\u6C89\u6DC0",versionTitle:"\u7248\u672C",cardsUnit:"\u5F20\u5361",links:"\u8FDE\u63A5",todayReview:"\u4ECA\u65E5\u56DE\u770B",openArrow:"\u6253\u5F00 \u2192",reshuffle:"\u6362\u4E00\u5F20",insightDecision:"\u51B3\u7B56",insightRoot:"\u6839\u56E0",insightLesson:"\u6559\u8BAD",insightSummary:"\u6458\u8981",pinCard:"\u56FA\u5B9A\u8FD9\u5F20\u5361",unpinCard:"\u53D6\u6D88\u56FA\u5B9A",pinnedOnly:"\u5DF2\u56FA\u5B9A",toastApproved:"\u5DF2\u6279\u51C6",toastRejected:"\u5DF2\u9A73\u56DE",toastCardDeleted:"\u5DF2\u5220\u9664",toastRestored:"\u5DF2\u6062\u590D",toastPurged:"\u5DF2\u5F7B\u5E95\u5220\u9664",toastPurgedExpired:"\u5DF2\u6E05\u7406\u8FC7\u671F\u56DE\u6536\u7AD9",toastFailed:"\u64CD\u4F5C\u5931\u8D25",noSelection:"\u8BF7\u5148\u9009\u62E9\u8981\u5904\u7406\u7684\u5361\u7247",enabledLabel:"\u542F\u7528\u8BB0\u5FC6\u6838\u5FC3",vaultDirLabel:"\u8BB0\u5FC6\u5E93\u76EE\u5F55\uFF08\u5355\u5E93\uFF09",captureCooldownMs:"\u6C89\u6DC0\u51B7\u5374 (ms)",captureProvider:"\u84B8\u998F provider\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",routeAuto:"\u81EA\u52A8\uFF08\u6309\u6CE8\u518C\u987A\u5E8F\uFF09",routeListFail:"\u53D6\u4E0D\u5230\u6A21\u578B\u5217\u8868\uFF08{err}\uFF09\u2192 \u4E0B\u9762\u53EF\u76F4\u63A5\u624B\u586B provider / model\uFF1B\u684C\u9762\u7248\u5F39\u7A97\u4F1A\u81EA\u52A8\u5411\u5BBF\u4E3B\u4EE3\u7406\uFF0C\u82E5\u4ECD\u5931\u8D25\u8BF7\u4ECE DSH \u8BBE\u7F6E\u9875\u6253\u5F00",captureFollowSession:"\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\uFF08\u84B8\u998F\u7528\u4F1A\u8BDD\u7684 provider/model\uFF09",captureFirstOnly:"\u4EC5\u8BD5\u9996\u9009\uFF08\u5931\u8D25\u5373\u505C\uFF0C\u4E0D\u8F6E\u6362\u515C\u5E95\uFF09",llmTest:"\u6D4B\u8BD5\u84B8\u998F\u8DEF\u7531",llmTestOk:"\u2713 \u8C03\u7528\u6210\u529F",llmTestFail:"\u2717 \u8C03\u7528\u5931\u8D25",llmCandidates:"\u5019\u9009\u6570",captureModel:"\u84B8\u998F model\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",recallEmbedding:"\u8BED\u4E49\u53EC\u56DE provider\uFF08\u53EF\u9009\uFF09",sessionBudgetChars:"\u4F1A\u8BDD\u9884\u7B97 (\u5B57\u7B26)",saving:"\u4FDD\u5B58\u4E2D\u2026",savePending:"\u5DF2\u5199\u5165\u914D\u7F6E\u6587\u4EF6\uFF1B\u5BBF\u4E3B\u4ECD\u662F\u65E7\u7248\uFF0C\u91CD\u542F DSH \u540E\u5373\u4EE5\u65B0\u503C\u4E3A\u51C6\uFF08\u672C\u9762\u677F\u5DF2\u751F\u6548\uFF09",actionRunning:"\u5904\u7406\u4E2D\u2026",recycleEmptyHint:"\u56DE\u6536\u7AD9\u4E3A\u7A7A\uFF1A\u5220\u6389\u7684\u5361\u7247\u4F1A\u5148\u653E\u5230\u8FD9\u91CC\uFF0C\u4FDD\u7559 {days} \u5929\u540E\u81EA\u52A8\u6E05\u7406\u3002",recyclePurgeAll:"\u6E05\u7A7A\u56DE\u6536\u7AD9",fbCopyManual:"\u81EA\u52A8\u590D\u5236\u88AB\u6D4F\u89C8\u5668\u62E6\u622A\uFF0C\u5DF2\u628A\u5185\u5BB9\u653E\u5728\u4E0B\u9762\uFF1A\u70B9\u300C\u5168\u9009\u300D\u518D\u6309 Ctrl+C",vcPage:"\u9875\u9762\u811A\u672C",vcPageStale:"\u26A0 \u5F53\u524D\u9875\u9762\u4ECD\u5728\u8FD0\u884C\u65E7\u7248\u811A\u672C\uFF08\u9875\u9762 v{page} / \u78C1\u76D8 v{disk}\uFF09\uFF1A\u6309 Ctrl+F5 \u5237\u65B0\u9875\u9762\u5373\u751F\u6548\uFF1B\u82E5\u300C\u8FD0\u884C\u4E2D\u300D\u4ECD\u662F\u65E7\u7248\u53F7\uFF0C\u5219\u8FD8\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcLoaded:"\u8FD0\u884C\u4E2D\uFF08\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF09",vcResident:"\u5E38\u9A7B\u5B9E\u4F8B",vcOnDisk:"\u78C1\u76D8\u5B89\u88C5",vcLatest:"npm \u6700\u65B0",vcStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\u4ECD\u52A0\u8F7D v{loaded} \u2014\u2014 \u70B9\u300C\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u300D\u5373\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u542F\u5B83\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestart:"\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",vcRestarting:"\u91CD\u542F\u4E2D\u2026",vcRestartSent:"\u5DF2\u8C03\u5EA6\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\uFF1A\u7EA6 3-8 \u79D2\u540E\u65B0\u8FDB\u7A0B\u63A5\u7BA1\uFF0C\u8BF7\u7A0D\u7B49\u518D\u5237\u65B0\u9875\u9762\uFF08Ctrl+F5\uFF09",vcRestartCurrent:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u7ECF\u662F\u6700\u65B0\u7248\uFF0C\u65E0\u9700\u91CD\u542F",vcRestartAnyway:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{ver}\uFF1B\u901A\u5E38\u65E0\u9700\u91CD\u542F\uFF0C\u5361\u4F4F/\u884C\u4E3A\u5F02\u5E38\u65F6\u53EF\u5F3A\u5236\u91CD\u542F",vcHostProcessStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46**\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B**\uFF08DSH \u5BBF\u4E3B\uFF09\u52A0\u8F7D\u7684\u4ECD\u662F v{loaded} \u2014\u2014 \u5B83\u6765\u81EA\u5BBF\u4E3B\u542F\u52A8\u65F6\u7684\u90A3\u4EFD\u4EE3\u7801\uFF1A**\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u4F1A\u6539\u53D8\u672C\u9875**\uFF0C\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH\u3002",vcRestartFixes:"\u70B9\u51FB\u4F1A\u628A\u5E38\u9A7B\u5B9E\u4F8B\uFF08\u7AEF\u53E3\u4E0A\u90A3\u4E2A\uFF09\u6362\u6210 v{disk}\uFF08\u5F53\u524D v{served}\uFF09\uFF0C\u4E0D\u7528\u91CD\u542F DSH",vcRestartStart:"\u70B9\u51FB\u4F1A\u7528\u5F53\u524D\u78C1\u76D8\u7248\u672C v{disk} \u628A\u5E38\u9A7B\u5B9E\u4F8B\u62C9\u8D77\u6765\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartRepair:"\u70B9\u51FB\u4F1A\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\u5E76\u4FDD\u6D3B\uFF08\u7248\u672C\u5DF2\u662F v{disk}\uFF0C\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartHostOnly:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{disk}\uFF1B\u672C\u9875\u663E\u793A v{loaded} \u6765\u81EA DSH \u5BBF\u4E3B \u2014\u2014 \u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u5F71\u54CD\u672C\u9875\uFF0C\u8BF7\u91CD\u542F DSH",vcRestartFail:"\u91CD\u542F\u8BF7\u6C42\u5931\u8D25",vcRestartNoRoute:"\u5F53\u524D\u9875\u9762\u5BF9\u63A5\u7684\u8FDB\u7A0B\u8FD8\u662F\u65E7\u7248\uFF08\u6CA1\u6709\u8FD9\u4E2A\u63A5\u53E3\uFF09\uFF1A\u8BF7\u91CD\u542F\u684C\u9762\u7248 / DSH \u540E\u518D\u8BD5\uFF0C\u6216\u6267\u884C {cmd}",vcHostStale:"\u4E0A\u65B9\u7684\u300C\u8FD0\u884C\u4E2D\u300D\u6765\u81EA\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF1B\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F\u65B0\u7248 \u2014\u2014 \u8981\u8BA9\u5B83\u4E5F\u53D8\u6210\u65B0\u7248\u53F7\uFF0C\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcResidentDownShort:"\u672A\u8FD0\u884C",vcResidentDown:"\u5E38\u9A7B\u5B9E\u4F8B\u6CA1\u5728\u8FD0\u884C\uFF08\u7AEF\u53E3 {port} \u65E0\u54CD\u5E94\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u7528\u65B0\u4EE3\u7801\u628A\u5B83\u62C9\u8D77\u6765\uFF1B\u62C9\u4E0D\u8D77\u6765\u65F6\u6267\u884C {cmd}\uFF0C\u5E76\u8D34\u4E00\u4E0B dsh-memory status \u7684\u8F93\u51FA",vcResidentUnmanagedShort:"\u672A\u6258\u7BA1",vcResidentUnmanaged:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u6CA1\u6709\u770B\u95E8\u72D7\u4FDD\u6D3B**\uFF08\u505C\u6B62 / \u786C\u6740\u540E\u6B8B\u7559\u7684\u5B64\u513F\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\uFF08\u91CD\u65B0\u62C9\u4E00\u4E2A\u770B\u95E8\u72D7 + \u65B0\u5B9E\u4F8B\uFF09\uFF1B\u4E5F\u53EF\u4EE5\u6267\u884C {cmd}",vcResidentLockUnknownShort:"\u6258\u7BA1\u72B6\u6001\u672A\u77E5",vcResidentReplaceBlockedShort:"\u4E0D\u53EF\u66FF\u6362",vcResidentHostManagedShort:"\u5BBF\u4E3B\u6258\u7BA1",vcResidentReplaceBlocked:"\u5E38\u9A7B\u5B9E\u4F8B**\u4E0D\u53EF\u66FF\u6362**\uFF08\u73AF\u5883\u9650\u5236\uFF09\uFF1A\u770B\u95E8\u72D7\u9501\u76EE\u5F55\u4E0D\u53EF\u5199\uFF08{err}\uFF1B{path}\uFF09\u2192 \u7AEF\u53E3\u4E0A\u4F1A**\u957F\u671F**\u505C\u5728 v{served}\u3002\u8FD9\u4E0D\u662F\u300C\u6682\u65F6\u843D\u540E\u300D\uFF1A\u81EA\u52A8\u66FF\u6362\u88AB\u6B63\u786E\u5730\u62D2\u7EDD\uFF08\u907F\u514D\u7559\u4E0B\u5B64\u513F\uFF09\u3002\u51FA\u8DEF\uFF1A\u4FEE\u590D\u8BE5\u76EE\u5F55\u6743\u9650\u540E\u6267\u884C {cmd}\uFF0C\u6216\u524D\u53F0\u89C2\u5BDF dsh-memory watchdog --port 7999",vcResidentLockUnknown:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u770B\u95E8\u72D7\u9501\u6587\u4EF6\u5199\u4E0D\u8FDB\u53BB**\uFF08\u53D7\u9650\u73AF\u5883\uFF1A\u6C99\u7BB1\u7981\u5199 / ACL / \u975E\u7CFB\u7EDF\u76D8\uFF09\u2192 \u65E0\u6CD5\u5224\u65AD\u5B83\u6709\u6CA1\u6709\u88AB\u6258\u7BA1\uFF08\u4E0D\u662F\u300C\u672A\u6258\u7BA1\u300D\uFF09\u3002\u539F\u56E0\uFF1A{err}\uFF08{path}\uFF09\u3002\u4FDD\u6D3B\u901A\u5E38\u4ECD\u7136\u6709\u6548\uFF1B\u70B9\u4E0B\u9762\u7684\u6309\u94AE\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u65B0\u6258\u7BA1\u4E00\u6B21\u3002",vcOutdated:"\u6709\u65B0\u7248\u672C",vcUpToDate:"\u5DF2\u662F\u6700\u65B0",vcCheck:"\u68C0\u67E5\u66F4\u65B0",checking:"\u68C0\u67E5\u4E2D\u2026",vcCheckFail:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25",recallSummaryLen:"\u53EC\u56DE\u6458\u8981\u957F\u5EA6",recallBody:"\u53EC\u56DE\u542B\u6B63\u6587",secretHint:"\u51ED\u8BC1\u53D6\u7528\u63D0\u793A\uFF08\u6CE8\u5165\u6BCF\u4E2A\u4F1A\u8BDD\uFF09",autoWeb:"Web server",autoWebMode:"\u4FDD\u6D3B\u6A21\u5F0F",webPort:"Web \u7AEF\u53E3",webCheckIntervalMs:"\u63A2\u6D3B\u95F4\u9694(ms)",webMaxRestart:"\u6700\u5927\u91CD\u542F\u6B21\u6570",watchdogAutoSpawn:"\u770B\u95E8\u72D7\u8FDB\u7A0B",autoRestartOnDrift:"\u7248\u672C\u6F02\u79FB\u81EA\u52A8\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",autoMcpSetup:"\u81EA\u52A8\u6302\u8F7D MCP",saveConfig:"\u4FDD\u5B58\u914D\u7F6E",saveFail:"\u4FDD\u5B58\u5931\u8D25",savedOk:"\u5DF2\u4FDD\u5B58",savedDirect:"\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5DF2\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\uFF08hooks / MCP / \u72EC\u7ACB\u9875\u7ACB\u5373\u751F\u6548\uFF09",savedApplied:"\u5DF2\u4FDD\u5B58\u5E76\u751F\u6548\uFF08\u5BBF\u4E3B\u5DF2\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF09",saveQueued:"\u5DF2\u4EA4\u7ED9 DSH \u5BBF\u4E3B\u540C\u6B65\uFF0C\u5C1A\u672A\u786E\u8BA4\u751F\u6548",saveHostGuard:"\u8BE5\u5BBF\u4E3B\u4E0D\u5141\u8BB8\u63D2\u4EF6\u4ECE\u81EA\u5DF1\u7684\u56DE\u8C03\u4E0A\u4E0B\u6587\u91CC\u5199\u914D\u7F6E\uFF1B\u8BF7\u5728\u300CDSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u300D\u91CC\u6539\u540C\u4E00\u9879\uFF0C\u6216\u7F16\u8F91 profile \u7684\u914D\u7F6E\u8865\u4E01\u5C42",saveFailHint:"\u5BBF\u4E3B\u4FA7\u672A\u5E94\u7528\uFF0C\u8BE6\u89C1\u300C\u53CD\u9988\u5F02\u5E38\u300D\u91CC\u7684\u8BCA\u65AD\u4FE1\u606F",recallTool:"recall \u5DE5\u5177",costControl:"\u6210\u672C\u63A7\u5236",costHint:"\u7701 token\u3001\u63A7 LLM \u6D88\u8017",distillEnabled:"\u84B8\u998F\u77E5\u8BC6\u5361(\u5F00=LLM \u538B\u7F29, \u5173=\u539F\u6587\u5361\u96F6 LLM)",dedupByLLM:"\u8BED\u4E49\u53BB\u91CD\u5582 LLM(\u5173=\u7EAF\u8BCD\u6CD5\u66F4\u7701)",captureMaxTokens:"\u84B8\u998F\u8F93\u51FA\u4E0A\u9650(token)",captureTimeoutMs:"\u84B8\u998F\u8D85\u65F6(\u6BEB\u79D2\uFF1B\u672C\u5730\u5927\u6A21\u578B\u51B7\u542F\u52A8\u5EFA\u8BAE 120000+)",recallMinScore:"\u53EC\u56DE\u76F8\u5173\u6027\u9608\u503C(\u8D8A\u9AD8\u8D8A\u7701)",configNeedsDsh:"\u914D\u7F6E\u7F16\u8F91\u9700\u5728 DSH \u5185\u6253\u5F00\uFF08\u672C\u9875\u53EF\u80FD\u53EA\u8BFB\u6216\u6709\u90E8\u5206\u7F3A\u5931\uFF09",installMcp:"\u5B89\u88C5 MCP",uninstallMcp:"\u5378\u8F7D MCP",uninstallConfirm:"\u786E\u8BA4\u5378\u8F7D\u8BE5\u667A\u80FD\u4F53\u7684 MCP\uFF1FClaude Code/Codex \u5C06\u65E0\u6CD5\u518D\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002",presetConfig:"\u4E00\u952E\u63A8\u8350\u914D\u7F6E",presetHint:"\u70B9\u51FB\u586B\u5145\u5BF9\u5E94\u65B9\u6848\uFF0C\u70B9\u4FDD\u5B58\u751F\u6548",planApplied:"\u5DF2\u586B\u5165\u300C{plan}\u300D\xB7 \u70B9\u300C\u4FDD\u5B58\u914D\u7F6E\u300D\u751F\u6548",planDescA:"\u4E2A\u4EBA\u5F00\u53D1\u63A8\u8350 \xB7 \u84B8\u998F 4000 \xB7 \u5173\u770B\u95E8\u72D7",planDescB:"\u9884\u7B97\u654F\u611F \xB7 \u5173\u84B8\u998F \xB7 \u8FD1 0 \u6210\u672C",planDescC:"\u957F\u9879\u76EE \xB7 \u5F00\u770B\u95E8\u72D7 \xB7 \u9AD8\u8D28\u91CF",cfgSubCore:"\u81EA\u52A8\u6C89\u6DC0 / \u53EC\u56DE / \u5E93\u76EE\u5F55\u4E0E\u53BB\u91CD\u7B56\u7565",cfgSubMulti:"\u6309\u9879\u76EE\u9694\u79BB\u8BB0\u5FC6\u5E93\uFF0C\u5207\u6362\u540E CLI / MCP / hooks \u540C\u6B65\u751F\u6548",cfgSubCost:"\u63A7\u5236 LLM \u8C03\u7528\u4E0E\u53EC\u56DE\u89C4\u6A21\uFF0C\u76F4\u63A5\u51B3\u5B9A\u82B1\u591A\u5C11\u94B1",cfgSubAudit:"\u4EC0\u4E48\u5185\u5BB9\u9700\u8981\u4F60\u4EBA\u5DE5\u786E\u8BA4\u540E\u624D\u8FDB\u4E3B\u5E93",cfgSubService:"\u4FDD\u6D3B\u3001\u770B\u95E8\u72D7\u4E0E\u7248\u672C\u81EA\u6108\uFF0C\u4E00\u822C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF",cfgDirty:"\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539",cfgClean:"\u5DF2\u540C\u6B65",unitChars:"\u5B57",unitPerDay:"\u5F20 / \u5929",unitTokens:"tokens",unitMs:"\u6BEB\u79D2",unitTimes:"\u6B21",unitDays:"\u5929",mcpAutoHint:"\u81EA\u52A8\u8BC6\u522B\u5DF2\u5B89\u88C5\u7684 Agent \u4E0E\u5176 MCP \u914D\u7F6E\uFF08\u53EA\u8BFB\u63A2\u6D4B\uFF0C\u4E0D\u6539\u4EFB\u4F55\u6587\u4EF6\uFF09",mcpRefresh:"\u91CD\u65B0\u68C0\u6D4B",mcpSummary:"\u8BC6\u522B\u5230 {agents} \u4E2A Agent \xB7 {servers} \u4E2A MCP \xB7 {mounted} \u4E2A\u5DF2\u6302\u8F7D\u672C\u63D2\u4EF6",mcpNoServers:"\u672A\u914D\u7F6E MCP",mcpDetectedOnly:"\u4EC5\u8BC6\u522B",planA:"A \u8F7B\u91CF\u7701\u5FC3",planB:"B \u6781\u81F4\u7701\u94B1",planC:"C \u9AD8\u8D28\u91CF",pluginInfo:"\u63D2\u4EF6\u4FE1\u606F",organizeTitle:"\u6574\u7406\u5EFA\u8BAE",scanAndOrganize:"\u4E00\u952E\u641C\u7D22\u548C\u6574\u7406",scanHint:"\u70B9\u300C\u{1F50D} \u4E00\u952E\u641C\u7D22\u548C\u6574\u7406\u300D\u626B\u63CF\u76F8\u4F3C\u5361/\u9648\u65E7\u5361\uFF0C\u518D\u7528\u300C\u26A1 \u4E00\u952E\u4F18\u5316\u300D\u6267\u884C\u3002",mergeNow:"\u5408\u5E76",delete:"\u5220\u9664",captureAlert:"\u81EA\u52A8\u6C89\u6DC0\u5F02\u5E38",captureAlertHint:"\u6253\u5F00\u5DE6\u680F\u300C\u7528\u91CF/\u4ECA\u65E5\u300D\u770B\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7\uFF1B\u82E5\u662F\u63A5\u53E3/\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u9700\u66F4\u65B0 memory-eternal \u63D2\u4EF6\u3002",captureLog:"\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7",captureLogHint:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\u540E\u81EA\u52A8\u8DD1\uFF1A\u76D1\u542C \u2192 \u5224\u5B9A \u2192 \u5199\u5361\u3002\u8FD9\u91CC\u663E\u793A\u6700\u8FD1 100 \u6761\uFF0C\u7528\u6765\u6392\u67E5\u300C\u4E3A\u4EC0\u4E48\u6CA1\u5199\u5361\u300D\u3002",captureLogEmpty:"\u8FD8\u6CA1\u6709\u8BB0\u5F55\u3002\u8DDF Agent \u804A\u4E00\u8F6E\uFF08> \u6355\u83B7\u6700\u5C0F\u957F\u5EA6\uFF09\u540E\u518D\u56DE\u6765\u770B\u3002",healthTitle:"\u5065\u5EB7\u6982\u89C8",healthHint:"\u5E93 / \u5907\u4EFD / \u6C89\u6DC0 / \u7248\u672C \u2014\u2014 \u4E00\u773C\u770B\u6E05\u6709\u6CA1\u6709\u9759\u9ED8\u574F\u6389\u7684\u4E1C\u897F",healthDb:"\u77E5\u8BC6\u5E93",healthDbBad:"\u5E93\u4E0D\u53EF\u5199\u6216\u635F\u574F",healthBackups:"\u5907\u4EFD",healthNoBackups:"\u6CA1\u6709\u5907\u4EFD\uFF08\u6267\u884C dsh-memory doctor \u53EF\u5EFA\uFF0C\u5BBF\u4E3B\u4E5F\u4F1A\u6BCF\u65E5\u5907\u4EFD\uFF09",healthBackupAge:"{n} \u4E2A \xB7 \u6700\u8FD1 {d} \u5929\u524D",healthBackupToday:"{n} \u4E2A \xB7 \u4ECA\u5929",healthCapture:"\u81EA\u52A8\u6C89\u6DC0",healthNoRecords:"\u6682\u65E0\u8BB0\u5F55\uFF08\u8FD8\u6CA1\u89E6\u53D1\u8FC7\u6C89\u6DC0\uFF09",healthCapOk:"\u6700\u8FD1\u4E00\u6B21\u6210\u529F\u5199\u5361",healthCapFail:"\u6700\u8FD1\u4E00\u6B21\u5931\u8D25",healthRunAlign:"\u8FD0\u884C\u300C\u7248\u672C\u5BF9\u9F50\u68C0\u67E5\u300D\u540E\u663E\u793A",healthVersion:"\u7248\u672C",ledgerTitle:"\u8BB0\u5FC6\u8D26\u672C\uFF08\u8FD1 7 \u5929\uFF09",ledgerHint:"\u53EC\u56DE\u6CE8\u5165\u4E86\u591A\u5C11\u3001\u84B8\u998F\u8C03\u7528\u4E86\u591A\u5C11\u6B21 \u2014\u2014 \u5224\u65AD\u300C\u5230\u5E95\u7701\u4E0D\u7701 token\u300D\u7684\u7B2C\u4E00\u5757\u6570\u636E",ledgerRecalls:"\u53EC\u56DE\u6B21\u6570",ledgerInjected:"\u6CE8\u5165",ledgerChars:"\u5B57\u7B26",ledgerCaptures:"\u6C89\u6DC0\u6B21\u6570",ledgerLlmCalls:"LLM \u8C03\u7528",ledgerEstimate:"\u4F30\u7B97 token",ledgerEstimateHint:"\u6309\u7EA6 2 \u5B57\u7B26 \u2248 1 token \u7C97\u4F30\uFF0C\u53EA\u770B\u91CF\u7EA7",ledgerUseful:"\u53EC\u56DE\u6709\u7528\u7387",ledgerUsefulHint:"\u6765\u81EA\u300C\u6709\u7528 / \u6CA1\u7528\u300D\u53CD\u9988\uFF1B\u4F4E\u4E8E 60% \u8BF4\u660E\u6CE8\u5165\u53EF\u80FD\u51C0\u4E8F",ledgerFormula:"\u51C0\u6536\u76CA \u2248 \u88AB\u907F\u514D\u7684\u4E0A\u4E0B\u6587\u5F00\u9500 \u2212\uFF08\u6CE8\u5165\u5B57\u7B26 + \u84B8\u998F\u8C03\u7528 \xD7 \u5355\u4EF7\uFF09\u3002\u8D26\u672C\u53EA\u8BB0\u300C\u82B1\u4E86\u591A\u5C11\u300D\uFF0C\u6536\u76CA\u4FA7\u8BF7\u7ED3\u5408\u4F60\u5B9E\u9645\u7701\u4E0B\u7684\u91CD\u8BFB / \u8FD4\u5DE5\u6765\u5224\u65AD\u3002",ledgerNoData:"\u8FD1 7 \u5929\u8FD8\u6CA1\u6709\u8BB0\u5F55\uFF1A\u804A\u51E0\u8F6E\u6216\u8BA9 agent recall \u4E00\u6B21\u540E\u518D\u770B\u3002",ledgerNeedRestart:"\u5BBF\u4E3B\u4ECD\u5728\u8DD1\u65E7\u7248 API\uFF08/ledger \u4E0D\u5B58\u5728\uFF09\uFF1A\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH \u540E\uFF0C\u8D26\u672C\u624D\u4F1A\u5F00\u59CB\u8BB0\u5F55\u3002",alignTitle:"\u7248\u672C\u5BF9\u9F50\u68C0\u67E5",alignRun:"\u5F00\u59CB\u68C0\u67E5",alignFix:"\u91CD\u5199\u63A5\u7EBF",alignFixConfirm:"\u91CD\u5199 MCP / hooks \u63A5\u7EBF\uFF1F\uFF08\u53EA\u78B0\u63D2\u4EF6\u81EA\u5DF1\u7684\u952E\uFF0C\u4E0D\u52A8\u4F60\u7684\u6570\u636E\u4E0E\u914D\u7F6E\uFF09",alignFixed:"\u63A5\u7EBF\u5DF2\u91CD\u5199\uFF1B\u82E5\u4E0A\u9762\u63D0\u793A\u300C\u5BBF\u4E3B\u8FDB\u7A0B\u65E7\u300D\uFF0C\u4ECD\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH",alignFail:"\u5BF9\u9F50\u68C0\u67E5\u5931\u8D25",alignHint:"\u63D2\u4EF6\u5347\u7EA7\u53EA\u6362\u78C1\u76D8\u6587\u4EF6 \u2014\u2014 \u5BBF\u4E3B\u5185\u5B58\u91CC\u7684\u4E8B\u4EF6\u8BA2\u9605\u4E0E MCP / hooks \u91CC\u7684\u65E7\u8DEF\u5F84\u4E0D\u4F1A\u81EA\u5DF1\u66F4\u65B0\uFF0C\u8FD9\u91CC\u4E00\u6B21\u67E5\u6E05",alignIdle:"\u70B9\u300C\u5F00\u59CB\u68C0\u67E5\u300D\uFF1A\u5BF9\u6BD4\u5BBF\u4E3B / \u5E38\u9A7B\u5B9E\u4F8B / npm \u7684\u7248\u672C\uFF0C\u5E76\u68C0\u67E5 MCP\u3001hooks \u91CC\u662F\u5426\u6709\u65E7\u8DEF\u5F84\u4E0E\u65E7\u53C2\u6570",alignDisk:"\u78C1\u76D8",alignResident:"\u5E38\u9A7B\u5B9E\u4F8B",alignHost:"\u5BBF\u4E3B\u8FDB\u7A0B",captureLogUnavailable:"\u65E5\u5FD7\u4EC5\u5728 DSH \u5BBF\u4E3B\u5185\u53EF\u7528\uFF08\u72EC\u7ACB Web \u9875\u6CA1\u6709 host \u8FD0\u884C\u65F6\uFF09\u3002",captureAgentCards:"Agent \u81EA\u52A8\u6C89\u6DC0\u7684\u5361",noCards:"\u6682\u65E0",loadMore:"\u52A0\u8F7D\u66F4\u591A",batchMerge:"\u4E00\u952E\u667A\u80FD\u5408\u5E76",mergeAllConfirm:"\u5C06\u6309\u76F8\u4F3C\u5EA6\u5206\u7EC4\u7684\u5361\u7247\u5404\u5408\u5E76\u4E3A\u4E00\u5F20\uFF08\u4FDD\u7559\u5404\u81EA kind\uFF09\uFF0C\u539F\u5361\u5220\u9664\uFF1F",crossVault:"\u8DE8\u5E93\u805A\u5408",deleteConfirm:"\u786E\u5B9A\u5220\u9664\u8BE5\u8BB0\u5FC6\u5361\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",editCard:"\u7F16\u8F91",editHint:"\u53EA\u6539\u6807\u9898 / \u6807\u7B7E / \u6B63\u6587\uFF1B\u72B6\u6001\u4E0E\u7C7B\u578B\u4ECD\u7531\u5BA1\u6838\u4E0E\u7CFB\u7EDF\u6D41\u8F6C\u51B3\u5B9A\uFF0C\u624B\u52A8\u7F16\u8F91\u4E0D\u4F1A\u7ED5\u8FC7\u5BA1\u6838\u3002",editTitle:"\u6807\u9898",editTags:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",editTagsHint:"\u4F8B\u5982\uFF1A\u8BB0\u5FC6, \u68C0\u7D22, \u6027\u80FD",editBody:"\u6B63\u6587\uFF08Markdown\uFF09",editSave:"\u4FDD\u5B58",editSaving:"\u4FDD\u5B58\u4E2D\u2026",editCancel:"\u53D6\u6D88",editSaved:"\u5DF2\u4FDD\u5B58",editFail:"\u4FDD\u5B58\u5931\u8D25",editTitleEmpty:"\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A",editBodyEmpty:"\u6B63\u6587\u4E0D\u80FD\u4E3A\u7A7A",deleted:"\u5DF2\u5220\u9664",deleteFail:"\u5220\u9664\u5931\u8D25",deleteSelected:"\u5220\u9664\u9009\u4E2D",deletedSelected:"\u5F20\u5361\u5DF2\u5220\u9664",merge:"\u5408\u5E76",mergeNeed:"\u81F3\u5C11\u9009 2 \u5F20\u5361",mergeConfirm:"\u5C06\u6240\u9009\u5361\u7247\u5408\u5E76\u4E3A\u4E00\u5F20\u5E76\u5220\u9664\u539F\u5361\uFF1F",merged:"\u5DF2\u5408\u5E76",mergeFail:"\u5408\u5E76\u5931\u8D25",mcpInstalled:"\u2705 {agent} MCP \u5DF2\u5B89\u88C5",mcpUninstalled:"\u2705 {agent} MCP \u5DF2\u5378\u8F7D",mcpActionFail:"\u274C {agent} MCP \u64CD\u4F5C\u5931\u8D25\uFF1A{error}",dshHostLabel:"DeepSeek Harness\uFF08\u5F53\u524D\u5BBF\u4E3B\uFF09",restartHint:"\u5DF2\u4FDD\u5B58\u3002autoWebMode/watchdogAutoSpawn \u7B49\u9700\u91CD\u542F DSH \u751F\u6548\uFF1B\u5DF2\u6709\u5E38\u9A7B watchdog \u4E0D\u4F1A\u88AB\u81EA\u52A8\u505C\u6389\uFF0C\u9700 dsh-memory stop / restart\uFF08#19\uFF09",conflictRefresh:"\u914D\u7F6E\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5",untitled:"\u65E0\u6807\u9898",tplBlank:"\u{1F4C4} \u7A7A\u767D",tagsHint:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",connCount:"{n} \u8FDE\u63A5",tplDecisionTags:"\u51B3\u7B56, \u65B9\u6848",tplBugTags:"\u8E29\u5751, \u6559\u8BAD",tplMeetingTags:"\u4F1A\u8BAE, \u7EAA\u8981",tplWeeklyTags:"\u5468\u62A5",tplDecisionBody:`# \u6280\u672F\u51B3\u7B56\uFF1A[\u6807\u9898]
6
+ var to=Object.create;var da=Object.defineProperty;var ao=Object.getOwnPropertyDescriptor;var no=Object.getOwnPropertyNames;var oo=Object.getPrototypeOf,io=Object.prototype.hasOwnProperty;var ro=(t,a)=>{for(var n in a)da(t,n,{get:a[n],enumerable:!0})},rn=(t,a,n,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of no(a))!io.call(t,s)&&s!==n&&da(t,s,{get:()=>a[s],enumerable:!(r=ao(a,s))||r.enumerable});return t};var so=(t,a,n)=>(n=t!=null?to(oo(t)):{},rn(a||!t||!t.__esModule?da(n,"default",{value:t,enumerable:!0}):n,t)),lo=t=>rn(da({},"__esModule",{value:!0}),t);var yi={};ro(yi,{EN:()=>On,MemoryLibrary:()=>Ho,ZH:()=>Hn,apply:()=>Do,inject:()=>Mo});module.exports=lo(yi);var o=so(require("react"),1),jn=require("react-dom");var co={"&":"&amp;","<":"&lt;",">":"&gt;"},Da=t=>String(t).replace(/[&<>]/g,a=>co[a]),po=[[/结论|总结|tl;?dr|summary|takeaway/i,"\u2705","ok"],[/风险|注意|警告|禁止|坑|踩坑|务必/i,"\u26A0\uFE0F","warn"],[/根因|原因|为什么|定位|复现/i,"\u{1F50D}","info"],[/修复|解决|变更|fix/i,"\u{1F527}","ok"],[/验证|测试|实测|回归/i,"\u{1F9EA}","ok"],[/方案|做法|实现|设计|思路|架构/i,"\u{1F6E0}\uFE0F","plan"],[/步骤|流程|操作|用法|命令/i,"\u{1F9E9}","plan"],[/背景|由来|context/i,"\u{1F9ED}","info"],[/目标|需求|要解决/i,"\u{1F3AF}","plan"],[/环境|依赖|前置|安装/i,"\u{1F4E6}","info"],[/收益|效果|性能|指标|数据|统计/i,"\u{1F4C8}","ok"],[/示例|例子|样例|demo/i,"\u{1F4A1}","idea"],[/参考|链接|相关/i,"\u{1F517}","info"]],mo=["\u2728","info"],uo=[[/风险|注意|警告|禁止|坑|务必/i,"\u26A0\uFE0F","warn"],[/提示|建议|tip|best practice/i,"\u{1F4A1}","idea"],[/结论|总结/i,"\u2705","ok"],[/错误|失败|报错/i,"\u2757","bad"]],go=t=>{let a=String(t);for(let[n,r,s]of po)if(n.test(a))return[r,s];return mo},fo=t=>{let a=t.join(" ");for(let[n,r,s]of uo)if(n.test(a))return[r,s];return["\u{1F4CC}","info"]};function Kt(t){let a=String(t),n=/^([^::\s]{1,8})[::]\s*(.+)$/.exec(a);if(n&&!/[是为有了吗呢着过把被和与或于]/.test(n[1]))return'<span class="md-kv"><span class="md-k">'+Da(n[1])+'</span><span class="md-v">'+Kt(n[2])+"</span></span>";let r=Da(a);return r=r.replace(/^\[([ xX])\](?=\s|$)\s*/,(s,m)=>'<span class="md-task">'+(m.toLowerCase()==="x"?"\u2611":"\u2610")+"</span> "),r=r.replace(/`([^`\n]+)`/g,'<code class="md-code">$1</code>'),r=r.replace(/\*\*([^*]+)\*\*/g,'<strong class="md-b">$1</strong>'),r=r.replace(/(^|[^*])\*([^*\n]+)\*/g,"$1<em>$2</em>"),r=r.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(s,m,b)=>/^(https?:|\/|#)/i.test(b)?'<a class="md-link" href="'+b+'" target="_blank" rel="noopener noreferrer">'+m+"</a>":m),r}function pa(t){let a=String(t||"").replace(/\r\n?/g,`
7
+ `),n=/^---\n([\s\S]*?)\n---\n?/.exec(a);if(!n)return{meta:[],body:a};let r=[];for(let s of n[1].split(`
8
+ `)){let m=s.indexOf(":");if(m<=0)continue;let b=s.slice(0,m).trim(),N=s.slice(m+1).trim().replace(/^["']|["']$/g,"");b&&r.push([b,N])}return{meta:r,body:a.slice(n[0].length)}}function sn(t){let a=String(t||"").trim().replace(/^\[|\]$/g,"");return a?a.split(",").map(n=>n.trim().replace(/^["']|["']$/g,"")).filter(Boolean):[]}function ta(t){let a=pa(String(t||"").replace(/\r\n?/g,`
9
+ `)).body;if(!a.trim())return"";let n=[],r=a.replace(/```([\w+#.-]*)\n([\s\S]*?)```/g,(R,$,q)=>(n.push('<pre class="md-pre"><code>'+Da(q.replace(/\n$/,""))+"</code></pre>"),"\0F"+(n.length-1)+"\0")),s=[],m=0,b=[],N=null,g=null,C=()=>{b.length&&(s.push('<p class="md-p">'+b.join("<br/>")+"</p>"),b=[])},p=()=>{if(!N)return;let R=N.type;s.push("<"+R+' class="md-'+R+'">'+N.items.map($=>"<li>"+$+"</li>").join("")+"</"+R+">"),N=null},S=()=>{if(!g)return;let[R,$]=fo(g);s.push('<div class="md-callout md-c-'+$+'"><span class="md-ico">'+R+"</span>"+g.join("<br/>")+"</div>"),g=null},k=()=>{C(),p(),S()};for(let R of r.split(`
10
+ `)){let $=R.trim();if(!$){k();continue}let q=/^\u0000F(\d+)\u0000$/.exec($);if(q){k(),s.push(n[Number(q[1])]);continue}let D;if(D=/^(#{1,6})\s+(.+)$/.exec($)){k();let[U,G]=go(D[2]);m++,s.push('<div id="md-h-'+m+'" class="md-h md-h-'+(D[1].length<=2?"h1":"h2")+" md-c-"+G+'"><span class="md-ico">'+U+'</span><span class="md-hx">'+Kt(D[2])+"</span></div>");continue}if(/^(-{3,}|\*{3,}|_{3,})$/.test($)){k(),s.push('<hr class="md-hr"/>');continue}if(D=/^>\s?(.*)$/.exec($)){C(),p(),g=g||[],g.push(Kt(D[1]));continue}if(D=/^[-*+]\s+(.+)$/.exec($)){C(),S(),(!N||N.type!=="ul")&&(p(),N={type:"ul",items:[]}),N.items.push(Kt(D[1]));continue}if(D=/^\d+[.)]\s+(.+)$/.exec($)){C(),S(),(!N||N.type!=="ol")&&(p(),N={type:"ol",items:[]}),N.items.push(Kt(D[1]));continue}p(),S(),b.push(Kt($))}return k(),s.join(`
11
+ `)}var ma="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABccElEQVR4nO19B3hcxdX2e+buriR3cAndFIPtXbmq7cpFphhMTUiQvzTSCSEkBMiXAAFiTAgtDUghBL4vyUcC/BaEhGowxXLRSrJkY1taGzDVtLiAu6TdvXP+59xdOStZsnW3S7vv8zjE17szd2fec2bmzClAHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555NGfQJl+gTySi5erqhzO0LaxHFSczHbJpSnkHPXOqbW14WS2m0dm4chw/3kkGYM7ts9QCs9op05quwqAq2P7OQBqk9pwHhlFXgEMIDBAryg6vZ25iJK8uzMZXKjodAaWkdVVHgMBotjzGChYAApBVyVb+AXSprQtfSS77Twyh7wCGEBYunTKMK0xPVXtS9vSR6razyP9yCuAAYTC9o4yJgxOVfvStvSRqvbzSD/yCmAAwUnGrIHQRx7pQ14B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T3dpTafFcR7aEsGYVhCgMXFk/s/h/jDD/WhNO6yPx2CD621s79dUVaVwxTeByRTT7gFU/RRChN8HLADyWrv4W7eKrTxihxPj55b7OhWK8ZBp0tXdF6/pcPucfDDkZANEXCGF8K1rWqVDh2UrjIoDeOIQV3xL+oqP1t+anudQUg5Z1uhen44/0JX2m8zfKmMrYyhgfah5krmTOZO5kDvPC3zvyCuAQEDfe8obWx8MUmqYINxBY8uBzjyv/Dv2t4pr015nT0Msk+Ue6+oskGtFpVQACGVsZ456UQOQ6kvfKHMlcyZzJ3KX7Hfsb8kZAG4jWrDvBFdYLGfx5RDPMEvDs9q0dF8Z6+aUTdV734QbRG6nOWhybdddkPqmyPmClLk83xFtw5OiCxxk423rAci1JjwQdasHMHL/Ws4u8AogDUV/1WQb4zjDpHUOcuKi4NrAHGULUe26lBvnS0Z8C+8v8gRmZFLSWKveQPSE86mA1wgT9uNy/fnle8O0jfwSIA0K0Cv/6Zbtdu+ds6Sj6bCaFP+alXhyQffUCGXMZe5kDmYu88MeH/A5ggKDBN/F0hlqShjllgp5b4d+QcSWQR+LI7wAGCI7k4XWKsCvV/Ugf0leq+8kjPcgrgAECq6gpY1Wq+5E+pK9U95NHepBXAAMHbDD8qUxCapVMY/izqCRZHgkirwAGEEJsLh8IfeSRPuQVwABCe2HBKmLsTVX70rb0kar280g/8gpgAGHOnLW7lMLqVLUvbUsfqWo/j/QjrwAGEhaCnVC1qbADSJvStvSR7LbzyBzy0YADCOIM06j5RafCDxOsenQAFAEhzS/mHW4GFvIKYIBhb8HIlc7QtskcUklVAeTSFCoY+U4y28wjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgDtvD/AXvCXhuljgbyAAAAAElFTkSuQmCC";function ln(t,a,n=48){if(!a||!t)return"";let r=String(t),s=r.toLowerCase(),m=String(a).toLowerCase();if(!m)return"";let b=s.indexOf(m);if(b<0)return"";let N=Math.max(0,b-n),g=Math.min(r.length,b+m.length+n),C=r.slice(N,g).replace(/\s+/g," ").trim();return(N>0?"\u2026":"")+C+(g<r.length?"\u2026":"")}function za(t,a){let n=String(a||"").trim().toLowerCase();if(!n)return!0;let r=t||{},s=Array.isArray(r.tags)?r.tags.map(b=>String(b)):[],m=[r.title,r.summary,r.reason,r.path,r.submittedBy,...s].map(b=>String(b||"")).join(`
12
+ `).toLowerCase();return n.split(/\s+/).filter(Boolean).every(b=>m.includes(b))}function cn({hasVersion:t=!1,hostVersion:a="",onDisk:n="",residentServed:r="",residentPresent:s=!1,residentManaged:m=null,residentManagedKnown:b=null,residentManagedBy:N="",replaceBlocked:g=null}={}){let C=String(n||""),p=String(a||""),S=String(r||""),k=!!(t&&s&&!S),R=!!(C&&S&&S!==C),$=m===!1&&b===!1,q=N==="host",D=m===!1&&!$&&!q,U=!!(p&&C&&p!==C),G=!!(g&&g.fresh),K=R||k||D||$,be=null;U?be="hostProcessStale":k?be="residentDown":G?be="residentReplaceBlocked":$?be="residentLockUnknown":D&&(be="residentUnmanaged");let J;return k?J="restartStart":R?J="restartFixes":D||$?J="restartRepair":U?J="restartHostOnly":J="restartAnyway",{showButton:!!t,emphasis:K,warn:be,hint:J,hostStale:U,residentDown:k,residentStale:R,residentUnmanaged:D,residentLockUnknown:$,residentHostManaged:q,needsRestart:K}}var ho=/^\d{4}-\d{2}-\d{2}$/,ua=t=>String(t).padStart(2,"0");function aa(t){if(t==null||t==="")return null;if(t instanceof Date)return Number.isNaN(t.getTime())?null:t;let a=String(t).trim();if(!a)return null;if(ho.test(a)){let[r,s,m]=a.split("-").map(Number),b=new Date(r,s-1,m);return Number.isNaN(b.getTime())?null:b}let n=new Date(a);return Number.isNaN(n.getTime())?null:n}var dn=t=>`${t.getFullYear()}-${ua(t.getMonth()+1)}-${ua(t.getDate())}`,pn=t=>`${ua(t.getHours())}:${ua(t.getMinutes())}`;function ga(t){let a=aa(t);return a?dn(a):""}function Aa(t){let a=aa(t);return a?dn(a)+" "+pn(a):""}function mn(t){let a=aa(t);return a?pn(a):""}function un(t={}){let a=t.repo||"EternalNight996/memory-eternal",n=String(t.title||"[Bug] ").slice(0,120),r=Array.isArray(t.labels)?t.labels:["bug"],s=Number(t.maxLength)>500?Number(t.maxLength):7e3,m=g=>{let C=new URLSearchParams;return C.set("title",n),C.set("body",g),r.length&&C.set("labels",r.join(",")),"https://github.com/"+a+"/issues/new?"+C.toString()},b=String(t.body||""),N=m(b);if(N.length>s){let g=`
13
+
14
+ > \u5185\u5BB9\u8FC7\u957F\u5DF2\u622A\u65AD\uFF1A\u5B8C\u6574\u8BCA\u65AD\u8BF7\u5728\u63D2\u4EF6\u91CC\u70B9\u300C\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\u300D\uFF0C\u518D\u8865\u5230 issue \u8BC4\u8BBA\u91CC\u3002`,C=p=>m(b.slice(0,p)+g);if(C(0).length>s)b=g;else{let p=0,S=b.length;for(;p<S;){let k=Math.ceil((p+S)/2);C(k).length<=s?p=k:S=k-1}b=b.slice(0,p)+g}N=m(b)}return N}function gn(t={}){return["## \u73B0\u8C61",String(t.description||"").trim()||"\uFF08\u8BF7\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF09","","## \u590D\u73B0\u6B65\u9AA4","1. ","2. ","","## \u671F\u671B\u884C\u4E3A","","## \u5B9E\u9645\u884C\u4E3A","","## \u73AF\u5883","- \u63D2\u4EF6\u7248\u672C: "+(t.version||"\uFF08\u89C1\u8BCA\u65AD\u4FE1\u606F\uFF09"),"",t.diagnostics||"","","---","> \u7531 memory-eternal \u63D2\u4EF6\u5185\u300C\u53CD\u9988\u5F02\u5E38\u300D\u751F\u6210\uFF08\u8BCA\u65AD\u4FE1\u606F\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E\u5404\u7C7B key/token \u5DF2\u66FF\u6362\uFF09\u3002"].join(`
15
+ `)}var La="https://github.com/EternalNight996/memory-eternal",yo=["\u6211\u5728\u4F7F\u7528 memory-eternal\uFF08DeepSeek Harness \u7684\u8BB0\u5FC6\u63D2\u4EF6\uFF09\u65F6\u9047\u5230\u4E86\u95EE\u9898\uFF0C\u8BF7\u4F60\u5E2E\u6211\u628A\u8FD9\u4E2A\u95EE\u9898\u63D0\u4EA4\u5230 GitHub\u3002","","\u4ED3\u5E93\uFF1A"+La,"","\u8BF7\u6309\u8FD9\u4E2A\u6D41\u7A0B\u505A\uFF1A","","1. \u5148\u8DD1 `gh issue list --repo EternalNight996/memory-eternal --state open --limit 50`\uFF0C\u770B\u662F\u5426\u5DF2\u6709\u76F8\u540C\u95EE\u9898\uFF1A"," - \u5DF2\u6709 \u2192 \u7528 `gh issue comment <\u7F16\u53F7> --body-file <\u6587\u4EF6>` \u8865\u5145\u73B0\u8C61\uFF0C\u4E0D\u8981\u91CD\u590D\u5F00\u65B0 issue\uFF1B"," - \u6CA1\u6709 \u2192 \u7EE7\u7EED\u7B2C 2 \u6B65\u3002",'2. \u628A\u6B63\u6587\u5199\u6210\u6587\u4EF6\uFF0C\u7136\u540E `gh issue create --repo EternalNight996/memory-eternal --title "[Bug] <\u4E00\u53E5\u8BDD\u6982\u62EC>" --body-file <\u6587\u4EF6>`\uFF1B\u6B63\u6587\u7528\u8FD9\u4E2A\u7ED3\u6784\uFF1A'," \u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A / \u5B9E\u9645\u884C\u4E3A / \u73AF\u5883\uFF08\u63D2\u4EF6\u7248\u672C / DSH \u7248\u672C / \u64CD\u4F5C\u7CFB\u7EDF / Node\uFF09/ \u8BCA\u65AD\u4FE1\u606F\u3002","3. \u5982\u679C `gh` \u6CA1\u767B\u5F55\u6216\u4E0D\u53EF\u7528\uFF0C\u4E0D\u8981\u5C1D\u8BD5\u63D0\u4EA4\uFF0C\u6539\u4E3A\u8F93\u51FA\u4E00\u6761\u300C\u6807\u9898\u4E0E\u6B63\u6587\u90FD\u5DF2\u9884\u586B\u300D\u7684 GitHub \u65B0\u5EFA issue \u94FE\u63A5\u7ED9\u6211\uFF0C\u6211\u81EA\u5DF1\u70B9\u63D0\u4EA4\u3002","4. \u63D0\u4EA4\u6210\u529F\u540E\uFF0C\u628A issue \u94FE\u63A5\u53D1\u7ED9\u6211\u3002","","\u6CE8\u610F\uFF1A\u6211\u7684\u95EE\u9898\u63CF\u8FF0\u8BF7\u539F\u6837\u7167\u5F55\uFF0C\u4E0D\u8981\u66FF\u6211\u7F8E\u5316\u6216\u7701\u7565\u7EC6\u8282\uFF1B\u8BCA\u65AD\u4FE1\u606F\u539F\u6837\u653E\u8FDB\u300C\u8BCA\u65AD\u4FE1\u606F\u300D\u4E00\u8282\u3002","","\u6211\u7684\u95EE\u9898\u63CF\u8FF0\uFF1A","<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>","","\u8BCA\u65AD\u4FE1\u606F\uFF1A","<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>"].join(`
16
+ `),vo=["I hit a problem while using memory-eternal (a DeepSeek Harness memory plugin). Please file it on GitHub for me.","","Repo: "+La,"","Workflow:","","1. Run `gh issue list --repo EternalNight996/memory-eternal --state open --limit 50` first: if a matching issue exists, add a comment with `gh issue comment <n> --body-file <file>` instead of opening a duplicate.",'2. Otherwise create it with `gh issue create --repo EternalNight996/memory-eternal --title "[Bug] <one-line summary>" --body-file <file>`, using sections: Symptoms / Steps to reproduce / Expected / Actual / Environment (plugin, DSH, OS, Node) / Diagnostics.',"3. If `gh` is not authenticated or unavailable, do NOT try to submit: output a GitHub new-issue link with the title and body pre-filled instead, and I will click submit myself.","4. Report the resulting issue URL back to me.","","Keep my description verbatim - do not rewrite or summarise it. Put the diagnostics under the Diagnostics section as-is.","","My description:","<write your problem here>","","Diagnostics:","<paste the diagnostics copied from the in-app Report-a-bug dialog>"].join(`
17
+ `);function fn(t={}){let a=t.lang==="en"?"en":"zh",n=a==="en"?vo:yo,r=t.repo||"EternalNight996/memory-eternal";return n=n.split(La).join("https://github.com/"+r),t.description&&(n=n.replace(a==="en"?"<write your problem here>":"<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>",String(t.description).trim())),t.diagnostics&&(n=n.replace(a==="en"?"<paste the diagnostics copied from the in-app Report-a-bug dialog>":"<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>",String(t.diagnostics).trim())),n}function bn({panX:t=0,panY:a=0,zoom:n=1,w:r=0,h:s=0,margin:m=60}={}){let b=n||1;return{x0:(0-t)/b-m,y0:(0-a)/b-m,x1:(r-t)/b+m,y1:(s-a)/b+m}}function fa(t,a,n,r){return r?t+n>=r.x0&&t-n<=r.x1&&a+n>=r.y0&&a-n<=r.y1:!0}function hn(t){let a=Number(t)||0;return a<=120?1/0:a<=300?160:a<=600?90:60}function yn(t,a={}){let n=Number.isFinite(a.limit)?a.limit:1/0,r=new Set,s=g=>{g&&r.size<n&&r.add(g)};if(s(a.focusId),s(a.hoverId),a.searchHits)for(let g of a.searchHits){if(r.size>=n)break;r.add(g)}let m=a.degree||{},b=g=>Number(m[g])||0,N=[];for(let g of Array.isArray(t)?t:[])g&&g.id&&!r.has(g.id)&&N.push(g);N.sort((g,C)=>b(C.id)-b(g.id));for(let g of N){if(r.size>=n)break;r.add(g.id)}return r}function vn(t){let a=Math.floor(Number(t)||0);return a<=0?0:a>1200?48:a>700?60:a>300?110:200}function ba(t){let a=Math.floor(Number(t)||0),n=a>1e3?3e3:a>100?2e3:a>50?1200:800,r=a>100?.002:.005,s=a>1e3?.012:a>100?.005:.01,m=a>1e3?6:a>200?12:24;return{repulsion:n,attraction:r,centerGravity:s,velCap:m,theta:.8}}var xo=.05,Pa=30;function Fa(t,a,n,r){return(n>=t?1:0)+(r>=a?2:0)}var Ia=class t{constructor(a){let n=Math.max(16,Math.floor(Number(a)||0)*6+16);this.capacity=Math.max(0,Math.floor(Number(a)||0)),this.cap=n,this.cx=new Float64Array(n),this.cy=new Float64Array(n),this.half=new Float64Array(n),this.mass=new Float64Array(n),this.mx=new Float64Array(n),this.my=new Float64Array(n),this.child=new Int32Array(n*4),this.point=new Int32Array(n),this.fx=new Float64Array(this.capacity),this.fy=new Float64Array(this.capacity),this.count=0,this.lastVisits=0}ensureCapacity(a){if(a<=this.capacity)return;let n=new t(a);this.capacity=n.capacity,this.cap=n.cap,this.cx=n.cx,this.cy=n.cy,this.half=n.half,this.mass=n.mass,this.mx=n.mx,this.my=n.my,this.child=n.child,this.point=n.point,this.fx=n.fx,this.fy=n.fy,this.count=0}newNode(a,n,r){if(this.count>=this.cap)return-1;let s=this.count++;this.cx[s]=a,this.cy[s]=n,this.half[s]=r,this.mass[s]=0,this.mx[s]=0,this.my[s]=0,this.point[s]=-1;let m=s*4;return this.child[m]=-1,this.child[m+1]=-1,this.child[m+2]=-1,this.child[m+3]=-1,s}insert(a,n,r){let s=a[r];if(!s)return;let m=Number(s.x)||0,b=Number(s.y)||0;this.mass[n]+=1,this.mx[n]+=m,this.my[n]+=b;let N=n*4;if(this.child[N]===-1&&this.child[N+1]===-1&&this.child[N+2]===-1&&this.child[N+3]===-1){if(this.point[n]===-1){this.point[n]=r;return}let g=this.half[n]/2;if(g<.001||this.count+4>this.cap){this.point[n]=-2;return}let C=this.cx[n],p=this.cy[n];for(let k=0;k<4;k+=1)this.child[N+k]=this.newNode(C+(k&1?g:-g),p+(k&2?g:-g),g);let S=this.point[n];if(this.point[n]=-2,S>=0){let k=a[S];this.insert(a,this.child[N+Fa(C,p,Number(k.x)||0,Number(k.y)||0)],S)}this.insert(a,this.child[N+Fa(C,p,m,b)],r);return}this.insert(a,this.child[N+Fa(this.cx[n],this.cy[n],m,b)],r)}build(a){let n=a.length;if(this.count=0,this.lastVisits=0,n===0)return-1;let r=1/0,s=-1/0,m=1/0,b=-1/0;for(let S=0;S<n;S+=1){let k=Number(a[S].x)||0,R=Number(a[S].y)||0;k<r&&(r=k),k>s&&(s=k),R<m&&(m=R),R>b&&(b=R)}let N=(r+s)/2,g=(m+b)/2,C=Math.max(1,Math.max(s-r,b-m)/2)*1.001,p=this.newNode(N,g,C);if(p<0)return-1;for(let S=0;S<n;S+=1)this.insert(a,p,S);return p}accumulate(a,n,r,s,m,b){let N=this.mass[a];if(N<=0)return;let g=this.mx[a]/N,C=this.my[a]/N,p=r-g,S=s-C,k=p*p+S*S;if(k<1e-9)return;let R=this.child[a*4]===-1;if(R&&this.point[a]===n)return;let $=Math.sqrt(k);if(this.lastVisits+=1,R||2*this.half[a]/$<b){let D=m*N/k;this.fx[n]+=p/$*D,this.fy[n]+=S/$*D;return}let q=a*4;for(let D=0;D<4;D+=1){let U=this.child[q+D];U>=0&&this.accumulate(U,n,r,s,m,b)}}compute(a,n){let r=a.length;this.ensureCapacity(r);let s=this.fx,m=this.fy;s.fill(0),m.fill(0),this.lastVisits=0;let b=this.build(a);if(b<0)return{fx:s,fy:m,visits:0};let N=n.repulsion,g=n.theta===void 0?.8:n.theta,C=n.skipIndex===void 0?-1:n.skipIndex;for(let p=0;p<r;p+=1){if(p===C)continue;let S=a[p];this.accumulate(b,p,Number(S.x)||0,Number(S.y)||0,N,g)}return{fx:s,fy:m,visits:this.lastVisits}}};function xn(t,a={}){let n=t.nodes,r=n.length,s=a.params||ba(r),m=a.theta===void 0?s.theta:a.theta;t.tickCount=(t.tickCount||0)+1;let b=a.settleTicks===void 0?460:a.settleTicks,N=a.alphaDecay===void 0?.08:a.alphaDecay;t.alpha===void 0&&(t.alpha=1),t.tickCount<=b?t.alpha=1:t.alpha+=((t.dragNode?.35:0)-t.alpha)*N,t.alpha<1e-4&&(t.alpha=0);let g=Math.max(0,Math.min(1,Number(a.alphaFloor)||0));t.alpha<g&&(t.alpha=g);let C=a.alpha===void 0?t.alpha:a.alpha,p=Math.min(.4,t.tickCount/1500),S=a.damping===void 0?.9-p:Math.max(.1,Math.min(.95,Number(a.damping)||.5)),k=t.dragNode?n.indexOf(t.dragNode):-1;(!t.forceEngine||t.forceEngine.capacity<r)&&(t.forceEngine=new Ia(r));let R=t.forceEngine.compute(n,{repulsion:s.repulsion*C,theta:m,skipIndex:k}),$=R.fx,q=R.fy;for(let A=0;A<r;A+=1){if(A===k)continue;let O=n[A],W=$[A],I=q[A];if(Number.isFinite(W)||(W=0),Number.isFinite(I)||(I=0),t.clustered&&t.typeCenters&&t.typeCenters[O.type]){let he=t.typeCenters[O.type];W+=(he.x-O.x)*.006*C,I+=(he.y-O.y)*.006*C}else W-=O.x*s.centerGravity*C,I-=O.y*s.centerGravity*C;let Y=((Number(O.vx)||0)+W)*S,re=((Number(O.vy)||0)+I)*S;Y>s.velCap?Y=s.velCap:Y<-s.velCap&&(Y=-s.velCap),re>s.velCap?re=s.velCap:re<-s.velCap&&(re=-s.velCap),O.vx=Y,O.vy=re}let D=t.edges||[],U=t.edgePairs||null,G=t.nodeById||null,K=U?U.length/2:D.length;for(let A=0;A<K;A+=1){let O,W;if(U)O=n[U[A*2]],W=n[U[A*2+1]];else{let P=D[A];O=G?G.get(P.sourceNodeId):null,W=G?G.get(P.targetNodeId):null}if(!O||!W)continue;let I=W.x-O.x,Y=W.y-O.y,re=Math.sqrt(I*I+Y*Y)||1,he=(re-100)*s.attraction*C,oe=I/re*he,_e=Y/re*he;t.dragNode!==O&&(O.vx+=oe,O.vy+=_e),t.dragNode!==W&&(W.vx-=oe,W.vy-=_e)}let be=0;for(let A=0;A<r;A+=1){let O=n[A];A!==k&&(O.x+=O.vx,O.y+=O.vy,be+=O.vx*O.vx+O.vy*O.vy)}let J=r?Math.sqrt(be/r):0;return J<xo&&t.tickCount>60&&!t.dragNode?t.quietTicks=(t.quietTicks|0)+1:t.quietTicks=0,{rms:J,tickCount:t.tickCount,quietTicks:t.quietTicks,params:s,visits:R.visits,alpha:C}}function Ut(t){return(Array.isArray(t)?t:[]).filter(Boolean).join("/")}function wn(t){return String(t??"").split("/").filter(Boolean)}function kn(t,a,n={}){let r=Ut(a);return`${t}/graph/level?path=${encodeURIComponent(r)}${n.all?"&all=1":""}`}function wo(t){let a=Math.max(0,Math.floor(Number(t)||0)),n=24+38*Math.log10(Math.max(1,a));return Math.max(34,Math.min(240,Math.round(n)))}function ko({kind:t="other",degree:a=0,maxDegree:n=1}={}){let r=Math.max(0,Number(a)||0),s=Math.max(1,Number(n)||1);return 9+Math.min(10,r/s*8)+(t==="core"?3:0)}function Sn(t,a={}){let n=Math.max(0,Math.floor(Number(t)||0));if(n<1e4)return String(n);let r=a.unit||"\u4E07",s=a.locale||"zh-CN";if(a.intl!==!1)try{return new Intl.NumberFormat(s,{notation:"compact",maximumFractionDigits:1}).format(n)}catch{}return r==="\u4E07"?Math.round(n/1e3)/10+"\u4E07":n>=1e6?Math.round(n/1e5)/10+"M":Math.round(n/100)/10+"K"}function Nn(t,a={}){let n=t||{},r=n.type==="planet",s=n.kind||"other",m=String(n.label||n.title||n.name||n.id||"");return{id:String(n.id||""),title:m,name:m,type:s,planet:r,count:r?Math.max(0,Math.floor(Number(n.count)||0)):0,tags:Array.isArray(n.tags)?n.tags.slice():[],updated:n.updated||"",r:r?wo(n.count):ko({kind:s,degree:a.degree,maxDegree:a.maxDegree})}}function Cn(t){return{...t||{},repulsion:1600,centerGravity:.004}}function Mn(t,a={}){let n=Math.max(1,Number(a.timeoutMs)||1600),r=Math.max(0,Number(a.elapsedMs)||0),s=String(t&&t.name||""),m=String(t&&t.message||t||""),N=s==="AbortError"||/abort/i.test(m)||r>=n;return{timeout:N,message:N?`\u5C42\u7EA7\u52A0\u8F7D\u8D85\u65F6\uFF08${n}ms\uFF09`:m||"\u672A\u77E5\u9519\u8BEF"}}function Tn(t=96){let a=Math.max(1,Math.floor(Number(t)||96)),n=new Map;return{get size(){return n.size},has(r){return n.has(r)},get(r){if(!n.has(r))return null;let s=n.get(r);return n.delete(r),n.set(r,s),s},set(r,s){for(n.has(r)&&n.delete(r),n.set(r,s);n.size>a;)n.delete(n.keys().next().value);return s},clear(){n.clear()},keys(){return[...n.keys()]}}}function Rn(t={}){let a=t.raf||(g=>requestAnimationFrame(g)),n=t.cancelRaf||(g=>cancelAnimationFrame(g)),r=t.setTimeout||((g,C)=>setTimeout(g,C)),s=t.clearTimeout||(g=>clearTimeout(g)),m=new Set,b=new Set,N=[];return{raf(g){let C=a(()=>{m.delete(C),g()});return m.add(C),C},cancelRaf(g){g!=null&&(m.delete(g),n(g))},setTimeout(g,C){let p=r(()=>{b.delete(p),g()},C);return b.add(p),p},clearTimeout(g){g!=null&&(b.delete(g),s(g))},listen(g,C,p,S){g.addEventListener(C,p,S),N.push({target:g,type:C,fn:p,opts:S})},snapshot(){return{rafs:m.size,timers:b.size,listeners:N.length}},releaseAll(){for(let g of[...m]){m.delete(g);try{n(g)}catch{}}for(let g of[...b]){b.delete(g);try{s(g)}catch{}}for(let g of N.splice(0))try{g.target.removeEventListener(g.type,g.fn,g.opts)}catch{}}}}function Dn(t,a={}){let n=Math.max(1,Number(a.maxItems)||1e3),r=Math.max(1,Number(a.payloadLimit)||1048576),s=t&&t.level&&Array.isArray(t.level.items)?t.level.items.length:0,m=Number(t&&t.stats&&t.stats.bytes)||0,b=[];return s>n&&b.push(`\u5355\u5C42\u56FE\u5143 ${s} > ${n}`),m>r&&b.push(`\u5C42 payload ${m} > ${r}`),{ok:b.length===0,items:s,bytes:m,problems:b}}function So(t,a){if(t===a)return!0;if(t===null||a===null||t===void 0||a===void 0||typeof t!="object"&&typeof a!="object")return t===a;try{return JSON.stringify(t)===JSON.stringify(a)}catch{return!1}}function zn(t,a){let n={...t||{}},r={};for(let[s,m]of Object.entries(a||{}))So(t?t[s]:void 0,m)||(n[s]=m,r[s]=m);return{values:n,overlay:r}}var e=require("react/jsx-runtime"),Yt="memory-eternal",V="/memory-eternal/api",ha=["\u843D\u9B44\u8C37\u4E2D\u5BD2\u98CE\u5439\uFF0C\u6625\u79CB\u8749\u9E23\u5C11\u5E74\u5F52\u3002\u8361\u9B42\u5C71\u5904\u77F3\u4EBA\u6CEA\uFF0C\u5B9A\u4ED9\u6E38\u8D70\u9B54\u5411\u5317\u3002\u9006\u6D41\u6CB3\u4E0A\u4E07\u4ED9\u9000\uFF0C\u7231\u60C5\u4E0D\u654C\u575A\u6301\u6CEA\u3002\u5BBF\u547D\u5929\u6210\u547D\u4E2D\u8D25\uFF0C\u4ED9\u5C0A\u6094\u800C\u6211\u4E0D\u6094\u3002","\u65E9\u5C81\u5DF2\u77E5\u4E16\u4E8B\u8270\uFF0C\u4ECD\u8BB8\u98DE\u9E3F\u8361\u4E91\u95F4\u3002","\u7537\u513F\u4E0D\u5C55\u51CC\u4E91\u5FD7\uFF0C\u7A7A\u8D1F\u5929\u751F\u516B\u5C3A\u8EAF\u3002","\u5343\u53E4\u5730\u4ED9\u968F\u98CE\u901D\uFF0C\u6614\u65E5\u4E09\u738B\u5F52\u9752\u51A2\u3002\u9633\u83BD\u608D\u9668\u8C01\u65E0\u8D25\uFF1F\u5377\u571F\u91CD\u6765\u518D\u79F0\u738B\u3002","\u5929\u6CB3\u4E00\u6302\u6DD8\u9F99\u9C7C\uFF0C\u9006\u5929\u72EC\u884C\u987E\u516B\u8352\u3002\u4ECA\u671D\u6682\u4E14\u5C55\u7FFC\u53BB\uFF0C\u660E\u671D\u98DE\u4ED9\u7B1E\u51E4\u51F0\uFF01","\u72EC\u5E1C\u5165\u6E0A\u6DF1\u672A\u77E5\uFF0C\u8EAB\u4F3C\u6D6E\u840D\u547D\u96BE\u6301\u3002\u5343\u821F\u7686\u671D\u5F52\u6D77\u5904\uFF0C\u4E00\u82C7\u9752\u62E8\u620F\u6D6A\u5DC5\u3002\u60CA\u9E3F\u56DB\u6563\u9C7C\u9003\u5C3D\uFF0C\u552F\u6709\u6B8B\u5E06\u50B2\u6B64\u95F4\u3002\u5F85\u5230\u5929\u5F00\u4E91\u96FE\u6563\uFF0C\u8D1F\u624B\u76F4\u671B\u7B11\u82CD\u5929\u3002"],An="\u300A\u86CA\u771F\u4EBA\u300B\xB7 \u5927\u7231\u4ED9\u5C0A";async function Oa(t){try{let a=await fetch(`${V}/open-external?url=${encodeURIComponent(t)}`,{method:"POST"}),n=await a.json().catch(()=>null);if(a.ok&&n&&n.ok)return!0}catch{}try{if(window.open(t,"_blank","noopener,noreferrer"))return!0}catch{}try{let a=document.createElement("a");return a.href=t,a.target="_blank",a.rel="noopener noreferrer",a.click(),!0}catch{}return!1}var Co=100,Mo=["slots","locale"],Hn={nav:"\u8BB0\u5FC6",loading:"\u52A0\u8F7D\u4E2D\u2026",loadingGraph:"\u6B63\u5728\u52A0\u8F7D\u77E5\u8BC6\u661F\u56FE\u2026",refresh:"\u5237\u65B0",overview:"\u8BB0\u5FC6\u5E93\u6982\u89C8",total:"\u77E5\u8BC6\u5361",recent:"\u8FD1 7 \u5929\u65B0\u589E",tags:"\u6807\u7B7E",searchPlaceholder:"\u641C\u7D22\u8BB0\u5FC6\uFF08\u652F\u6301\u4E2D\u6587\u7247\u6BB5\uFF09\u2026",search:"\u641C\u7D22",all:"\u5168\u90E8",kindProject:"\u9879\u76EE",kindKnowledge:"\u77E5\u8BC6",kindContent:"\u5185\u5BB9",kindPrompt:"\u63D0\u793A\u8BCD",kindBusiness:"\u4E1A\u52A1",kindTool:"\u5DE5\u5177",kindMistake:"\u6559\u8BAD",kindCore:"\u6838\u5FC3\u8BB0\u5FC6",kindSkill:"\u6280\u80FD",newsTab:"\u65B0\u95FB",newsTitle:"\u65B0\u95FB",newsHint:"\u6BCF\u65E5 AI \u65B0\u95FB\u3001\u672C\u6708\u699C\u5355\uFF0C\u4EE5\u53CA\u4F60\u81EA\u5DF1\u7684\u53D1\u5E03\u3002",newsNew:"\u5199\u4E00\u6761",newsSearch:"\u641C\u7D22\u6807\u9898 / \u6B63\u6587 / \u6807\u7B7E\u2026",newsUnreadOnly:"\u53EA\u770B\u672A\u8BFB",newsEmpty:"\u8FD8\u6CA1\u6709\u65B0\u95FB\u3002\u5199\u7B2C\u4E00\u6761\u53D1\u5E03\u3001\u51B3\u7B56\u6216\u56E2\u961F\u7B80\u62A5\u3002",newsNoMatch:"\u6CA1\u6709\u5339\u914D\u7684\u65B0\u95FB",newsPinned:"\u7F6E\u9876",newsRead:"\u5DF2\u8BFB",newsUnread:"\u672A\u8BFB",newsMarkRead:"\u6807\u8BB0\u5DF2\u8BFB",newsMarkUnread:"\u6807\u8BB0\u672A\u8BFB",newsEdit:"\u7F16\u8F91",newsDeleteConfirm:"\u5220\u9664\u8FD9\u6761\u65B0\u95FB\uFF1F",newsDeleted:"\u5DF2\u5220\u9664",newsSave:"\u4FDD\u5B58",newsSaving:"\u4FDD\u5B58\u4E2D\u2026",newsSaved:"\u5DF2\u4FDD\u5B58",newsSaveFail:"\u4FDD\u5B58\u5931\u8D25",newsTitleField:"\u6807\u9898",newsBodyField:"\u6B63\u6587\uFF08Markdown\uFF09",newsCategoryField:"\u5206\u7C7B",newsSourceField:"\u6765\u6E90",newsUrlField:"\u94FE\u63A5",newsTagsField:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",newsDateField:"\u65E5\u671F",newsPinField:"\u7F6E\u9876",newsPreview:"\u9884\u89C8",newsEditBody:"\u7F16\u8F91\u6B63\u6587",newsOpenLink:"\u6253\u5F00\u94FE\u63A5",newsToday:"\u4ECA\u5929",newsYesterday:"\u6628\u5929",newsEarlier:"\u66F4\u65E9",newsTitlePlaceholder:"\u4F8B\u5982\uFF1Av0.20.0 \u53D1\u5E03\u8BF4\u660E",newsBodyPlaceholder:"\u5199\u70B9\u503C\u5F97\u7559\u4E0B\u7684\u5185\u5BB9\u2026\u652F\u6301 Markdown",newsCountUnit:"\u6761",cancel:"\u53D6\u6D88",newsDaily:"\u4ECA\u65E5\u65B0\u95FB",newsMonthly:"\u672C\u6708",newsMine:"\u6211\u7684\u65B0\u95FB",newsDailySub:"\u6BCF\u65E5\u6700\u65B0\u7684 AI \u65B0\u95FB\uFF0C\u4E2D\u6587\u4F18\u5148",newsMonthlySub:"\u672C\u6708 AI \u65B0\u95FB\uFF1A\u4E2D\u6587\u6309\u65F6\u95F4\u5F52\u6863\uFF0C\u82F1\u6587\u6309 Hacker News \u70ED\u5EA6",newsMineSub:"\u4F60\u81EA\u5B9A\u4E49\u7684\u53D1\u5E03\u3001\u51B3\u7B56\u548C\u56E2\u961F\u7B80\u62A5",newsLoading:"\u6B63\u5728\u62C9\u53D6\u8D44\u8BAF\u2026",newsFeedError:"\u8D44\u8BAF\u6E90\u6682\u65F6\u4E0D\u53EF\u7528",newsHeat:"\u70ED\u5EA6",newsComments:"\u8BC4\u8BBA",newsOriginal:"\u9605\u8BFB\u539F\u6587",newsUpdatedAt:"\u66F4\u65B0\u4E8E",newsPartialFail:"\u90E8\u5206\u6765\u6E90\u5931\u8D25",newsFeedEmpty:"\u4ECA\u5929\u8FD8\u6CA1\u6709\u6293\u5230\u8D44\u8BAF\uFF0C\u70B9\u5237\u65B0\u518D\u8BD5\u3002",newsFeedRefresh:"\u5237\u65B0\u8D44\u8BAF",newsLoadingHint:"\u9996\u6B21\u52A0\u8F7D\u4F1A\u6293\u53D6\u591A\u4E2A\u4E2D\u6587\u8D44\u8BAF\u6E90\uFF0C\u53EF\u80FD\u9700\u8981\u51E0\u79D2\u2026",newsRetry:"\u91CD\u8BD5",newsSearchGo:"\u641C\u7D22",newsFollow:"\u5173\u6CE8",newsFollowPreview:"\u6211\u8FD9\u6837\u7406\u89E3\uFF0C\u8981\u5173\u6CE8\u5417\uFF1F",newsFollowConfirm:"\u5F00\u59CB\u5173\u6CE8",newsFollowAdded:"\u5DF2\u5173\u6CE8",newsFollowExists:"\u5DF2\u7ECF\u5728\u5173\u6CE8\u4E86",newsFollowRemoved:"\u5DF2\u53D6\u6D88\u5173\u6CE8",newsFollowFail:"\u5173\u6CE8\u5931\u8D25",newsFollowNoQuery:"\u5148\u8F93\u5165\u4E00\u4E2A\u4E3B\u9898\u8BCD",newsFollowDomains:"\u5728\u8FD9\u4E9B\u6765\u6E90\u91CC\u627E",newsFollowEmpty:"\u8FD8\u6CA1\u6709\u5173\u6CE8\u4EFB\u4F55\u4E3B\u9898\u3002\u641C\u4E00\u4E2A\u8BCD\u540E\u70B9\u300C\u5173\u6CE8\u300D\uFF0C\u4EE5\u540E\u5B83\u81EA\u5DF1\u4F1A\u66F4\u65B0\u3002",newsIntentHint:"\u8FD9\u770B\u8D77\u6765\u662F\u4E00\u53E5\u6307\u4EE4 \u2014\u2014 \u70B9\u300C\uFF0B \u5173\u6CE8\u300D\u8BA9\u5B83\u6301\u7EED\u53BB\u5BF9\u5E94\u6765\u6E90\u91CC\u627E\uFF1B\u4E0B\u9762\u7684\u5217\u8868\u4E0D\u518D\u6309\u5B57\u9762\u8FC7\u6EE4\u3002",newsFollowing:"\u5173\u6CE8\u52A8\u6001",newsDigest:"\u5173\u6CE8\u6458\u8981\u63A8\u9001",newsDigestHint:"\u5F00\u542F\u540E\uFF0C\u5BBF\u4E3B\u6309\u95F4\u9694\u6293\u53D6\u300C\u65B0\u95FB\u5173\u6CE8\u300D\uFF0C\u53EA\u6709\u51FA\u73B0\u300C\u65B0\u300D\u5185\u5BB9\u65F6\u624D\u4F1A\u8BA9 Agent \u5728\u4E0B\u4E00\u8F6E\u63D0\u4E00\u53E5\u3002\u9ED8\u8BA4\u5173\u95ED\uFF1B\u5173\u6389\u5C31\u4E0D\u6253\u6270\u3002",newsDigestEnabled:"\u542F\u7528\u63A8\u9001",newsDigestInterval:"\u6293\u53D6\u95F4\u9694\uFF08\u5206\u949F\uFF09",newsDigestMaxItems:"\u6BCF\u6761\u6458\u8981\u6700\u591A\u51E0\u6761",newsDigestNow:"\u7ACB\u5373\u751F\u6210\u5E76\u9884\u89C8",newsDigestNowHint:"\u5F00\u542F\u524D\u53EF\u4EE5\u5148\u70B9\u5B83\uFF0C\u770B\u770B\u5230\u5E95\u4F1A\u63A8\u9001\u4EC0\u4E48\u3002",newsDigestBuilding:"\u751F\u6210\u4E2D\u2026",newsDigestDone:"\u6458\u8981\u5DF2\u751F\u6210",newsDigestEmpty:"\u5F53\u524D\u6CA1\u6709\u65B0\u7684\u5173\u6CE8\u5185\u5BB9",newsDigestFail:"\u751F\u6210\u6458\u8981\u5931\u8D25",newsSortRec:"\u4E3A\u4F60\u63A8\u8350",newsSortTime:"\u6700\u65B0",newsPersonalized:"\u5DF2\u6309\u4F60\u7684\u559C\u7231\u5B9A\u5236\u6392\u5E8F",newsLastQuery:"\u4E0A\u6B21\u641C\u7D22",newsResetPrefs:"\u91CD\u7F6E\u504F\u597D",newsHeroEye:"NEWSROOM \xB7 AI \u60C5\u62A5\u7AD9",newsHeroHint:"\u641C\u7D22\u4E00\u6B21\u5C31\u4F1A\u88AB\u8BB0\u4F4F\uFF0C\u4E0B\u6B21\u6253\u5F00\u81EA\u52A8\u6309\u4F60\u7684\u53E3\u5473\u6392\u5E8F\uFF1B\u53EA\u5728\u672C\u9875\u9996\u6B21\u6253\u5F00\u65F6\u62C9\u53D6\u4E00\u6B21\u6570\u636E\u3002",newsMatched:"\u6761\u547D\u4E2D",newsNoMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8D44\u8BAF",newsNoMatchHint:"\u8FD9\u6279\u6570\u636E\u91CC\u6CA1\u6709\u547D\u4E2D\u5F53\u524D\u5173\u952E\u8BCD + \u5206\u7C7B + \u8BED\u8A00\u7684\u6761\u76EE\uFF0C\u6E05\u9664\u7B5B\u9009\u5C31\u80FD\u770B\u56DE\u5168\u90E8\u3002",newsClearFilters:"\u6E05\u9664\u7B5B\u9009",newsJustNow:"\u521A\u521A",newsMinutesAgo:"\u5206\u949F\u524D",newsHoursAgo:"\u5C0F\u65F6\u524D",newsDaysAgo:"\u5929\u524D",newsLangZh:"\u4E2D\u6587",newsLangEn:"\u82F1\u6587",newsLangAll:"\u4E0D\u9650",newsZhArchive:"\u4E2D\u6587\u6708\u699C\u6309\u65F6\u95F4\u5F52\u6863\uFF08\u4E2D\u6587\u6E90\u6682\u65E0\u516C\u5F00\u70ED\u5EA6\u5206\u6570\uFF09",newsEnRanking:"\u82F1\u6587\u6708\u699C\u6309 Hacker News \u5206\u6570\u6392\u540D",skillCards:"\u6280\u80FD\u5361",skillCardsHint:"\u4ECE\u672C\u673A\u5B9E\u9645\u5B89\u88C5/\u53EF\u7528\u7684\u6280\u80FD\u751F\u6210\u5361\u7247\uFF0C\u5F3A\u5236\u8FDB\u5165\u5BA1\u6838\uFF1B\u4E0D\u7531 Agent \u5BF9\u8BDD\u6C89\u6DC0\u3002",skillAutoSync:"\u81EA\u52A8\u540C\u6B65\u6280\u80FD\u5361",syncSkills:"\u540C\u6B65\u6280\u80FD",syncingSkills:"\u6B63\u5728\u540C\u6B65\u6280\u80FD\u2026",skillsSyncDone:"\u6280\u80FD\u5361\u540C\u6B65\u5B8C\u6210",skillsScanned:"\u626B\u63CF",skillsCreated:"\u65B0\u589E",skillsUpdated:"\u66F4\u65B0",skillsPendingUpdates:"\u5F85\u5BA1\u66F4\u65B0",skillsSyncFail:"\u6280\u80FD\u5361\u540C\u6B65\u5931\u8D25",cardsTab:"\u77E5\u8BC6\u5361",webTab:"Web \u7248",webOpening:"\u6B63\u5728\u7528\u9ED8\u8BA4\u6D4F\u89C8\u5668\u6253\u5F00 Web \u7248\u2026",webOpened:"\u5DF2\u7528\u9ED8\u8BA4\u6D4F\u89C8\u5668\u6253\u5F00 Web \u7248",webOpenFail:"\u6253\u5F00\u6D4F\u89C8\u5668\u5931\u8D25\uFF0C\u53EF\u624B\u52A8\u8BBF\u95EE",terminalTab:"\u7EC8\u7AEF\u7248",terminalTitle:"\u7EC8\u7AEF\u5B8C\u6574\u7248",terminalIntro:"Web UI \u4E0D\u6E32\u67D3\u7EC8\u7AEF\u539F\u751F TUI\u3002\u8981\u5B8C\u6574\u6279\u5361\u3001\u957F\u6587\u6EDA\u52A8\u548C\u5168\u9009\uFF0C\u8BF7\u6253\u5F00\u672C\u673A\u7EC8\u7AEF\uFF1B\u6216\u8005\u76F4\u63A5\u5728 dsh-tui \u91CC\u7528 /audit\u3002",terminalRun:"\u53EA\u8BFB\u4F53\u9A8C\uFF08\u771F\u5B9E\u961F\u5217\uFF09",terminalTui:"\u5199\u5165\u6A21\u5F0F\uFF08\u771F\u5B9E\u6279\u9A73\uFF09",terminalWhy:"\u4E3A\u4EC0\u4E48\u4E0D\u76F4\u63A5\u5D4C\u8FDB\u7F51\u9875",terminalWhyBody:"\u7EC8\u7AEF TUI \u4F9D\u8D56 alternate screen\u3001\u539F\u59CB\u952E\u76D8\u4E8B\u4EF6\u548C\u5B57\u7B26\u7F51\u683C\uFF0C\u65E0\u6CD5\u7528 iframe \u5FE0\u5B9E\u5D4C\u5165\u3002\u8FD9\u91CC\u7ED9\u51FA\u771F\u5B9E\u547D\u4EE4\uFF0C\u6253\u5F00\u540E\u5C31\u662F\u540C\u4E00\u5957\u754C\u9762\u3002",terminalCopy:"\u590D\u5236\u547D\u4EE4",terminalCopied:"\u5DF2\u590D\u5236",terminalPreview:"\u7EC8\u7AEF\u9884\u89C8",graphTab:"\u77E5\u8BC6\u661F\u56FE",graph:"\u77E5\u8BC6\u56FE\u8C31",graphHint:"\u8282\u70B9=\u77E5\u8BC6\u5361\uFF1B\u8FDE\u7EBF=[[\u94FE\u63A5]] \u6216\u5171\u4EAB\u6807\u7B7E\u3002\u70B9\u51FB\u8282\u70B9\u9605\u8BFB\u5361\u7247\u3002",graphTip:"\u5DE6\u952E\u51F8\u663E \xB7 Shift+\u62D6\u62FD\u6846\u9009 \xB7 \u53F3\u952E\u83DC\u5355 \xB7 \u6EDA\u8F6E\u7F29\u653E \xB7 \u62D6\u62FD\u5E73\u79FB",rebuild:"\u91CD\u5EFA",reset:"\u91CD\u7F6E",expandAll:"\u5168\u90E8\u5C55\u5F00",capped:"\u5DF2\u5C55\u793A\u6700\u6838\u5FC3\u7684",clearFocus:"\u53D6\u6D88\u9AD8\u4EAE",empty:"\u8BB0\u5FC6\u5E93\u8FD8\u662F\u7A7A\u7684\u3002\u591A\u804A\u51E0\u8F6E\u540E\uFF0C\u503C\u5F97\u4FDD\u5B58\u7684\u5185\u5BB9\u4F1A\u81EA\u52A8\u6C89\u6DC0\u6210\u77E5\u8BC6\u5361\u3002",emptyGraph:"\u56FE\u8C31\u6682\u65E0\u6570\u636E\u3002",open:"\u9605\u8BFB",updated:"\u66F4\u65B0\u4E8E",created:"\u521B\u5EFA\u4E8E",source:"\u6765\u6E90",contents:"\u76EE\u5F55",related:"\u76F8\u5173\u8BB0\u5FC6",file:"\u6587\u4EF6",close:"\u5173\u95ED",vaultDir:"\u8BB0\u5FC6\u5E93\u76EE\u5F55",capture:"\u81EA\u52A8\u6C89\u6DC0",recall:"\u81EA\u52A8\u53EC\u56DE",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",error:"\u52A0\u8F7D\u5931\u8D25",back:"\u8FD4\u56DE\u5217\u8868",cardCount:"\u5F20\u5361",nodes:"\u8282\u70B9",edges:"\u8FDE\u7EBF",memoryTitle:"\u8BB0\u5FC6\u5E93",memoryHint:"\u4F60\u7684\u672C\u5730\u7B2C\u4E8C\u5927\u8111",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",fit:"\u9002\u5E94",enterFullscreen:"\u5168\u5C4F",exitFullscreen:"\u9000\u51FA\u5168\u5C4F",exportGraph:"\u5BFC\u51FA",openCard:"\u6253\u5F00\u5361\u7247",focusNeighbors:"\u51F8\u663E\u5173\u8054",copyName:"\u590D\u5236\u540D\u79F0",noMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6",clearFilter:"\u6E05\u9664\u8FC7\u6EE4",filterLabel:"\u7B5B\u9009",sortRecent:"\u6700\u8FD1",sortTitle:"\u6807\u9898",sortHot:"\u70ED\u70B9",exportSel:"\u5BFC\u51FA\u9009\u4E2D",clearSelection:"\u6E05\u7A7A\u9009\u62E9",download:"\u4E0B\u8F7D",openNewTab:"\u65B0\u6807\u7B7E\u6253\u5F00",copyImage:"\u590D\u5236\u56FE\u7247",done:"\u5B8C\u6210",downloaded:"\u5DF2\u5F00\u59CB\u4E0B\u8F7D",openedTab:"\u5DF2\u5728\u65B0\u6807\u7B7E\u6253\u5F00",copied:"\u5DF2\u590D\u5236",exportedSel:"\u4E2A\u8282\u70B9\u5DF2\u5BFC\u51FA",fullscreen:"\u5168\u5C4F",exitFull:"\u9000\u51FA\u5168\u5C4F",copyFail:"\u590D\u5236\u5931\u8D25",timeDim:"\u65F6\u95F4\u7EF4",graphWarming:"\u6B63\u5728\u5E03\u5C40 {n} \u4E2A\u8282\u70B9\u2026",graphAllCrumb:"\u5168\u90E8",graphOther:"\u5176\u4ED6",graphItems:"\u56FE\u5143",graphCardsUnit:"\u5361",graphPlanetCards:"{n} \u5F20\u5361",graphEnter:"\u8FDB\u5165\u8BE5\u5C42",graphLevelLoading:"\u6B63\u5728\u52A0\u8F7D\u5C42\u7EA7\u2026",graphLevelTimeout:"\u5C42\u52A0\u8F7D\u8D85\u65F6\uFF08{ms}ms\uFF09\xB7 \u5DF2\u4FDD\u7559\u5F53\u524D\u5C42",graphLevelError:"\u5C42\u52A0\u8F7D\u5931\u8D25 \xB7 \u5DF2\u4FDD\u7559\u5F53\u524D\u5C42",graphRetry:"\u91CD\u8BD5",graphEmptyLevel:"\u8FD9\u4E00\u5C42\u6CA1\u6709\u5361\u7247\u3002",graphLevelHint:"\u70B9\u5927\u661F\u7403\u8FDB\u5165\u8BE5\u5C42 \xB7 Shift+\u70B9\u51FB\u9009\u4E2D \xB7 \u62D6\u62FD\u79FB\u52A8 \xB7 \u6EDA\u8F6E\u7F29\u653E",graphBreadcrumbAria:"\u5C42\u7EA7\u9762\u5305\u5C51",graphCountWan:"\u4E07",graphCountLocale:"zh-CN",timeNew:"3 \u5929\u5185",timeRecent:"2 \u5468\u5185",timeMonth:"1 \u6708\u5185",timeOld:"\u66F4\u65E9",newBadge:"\u65B0",expand:"\u5C55\u5F00\u5168\u90E8",collapse:"\u6536\u8D77",copyBody:"\u590D\u5236\u6B63\u6587",clearFilter:"\u6E05\u9664\u6807\u7B7E\u7B5B\u9009",copyPath:"\u590D\u5236\u8DEF\u5F84",copied:"\u5DF2\u590D\u5236",copyFail:"\u590D\u5236\u5931\u8D25",readWidth:"\u9605\u8BFB\u5BBD\u5EA6",widthNarrow:"\u7A84",widthMid:"\u4E2D",widthWide:"\u5BBD",exportVault:"\u5BFC\u51FAMD",exportJson:"\u5BFC\u51FAJSON",exporting:"\u5BFC\u51FA\u4E2D\u2026",exportedVault:"\u8BB0\u5FC6\u5E93\u5DF2\u5BFC\u51FA",exportFail:"\u5BFC\u51FA\u5931\u8D25",importVault:"\u5BFC\u5165",importedVault:"\u5BFC\u5165\u5B8C\u6210",importedTotal:" \u5F20 / \u6587\u4EF6\u5171 ",importedTotalTail:" \u5F20",importedQuarantine:" \xB7 \u5F85\u5BA1\u6838 ",importedQuarantineTail:" \u5F20\uFF08\u9694\u79BB\u533A\uFF0C\u6279\u51C6\u540E\u624D\u53C2\u4E0E\u53EC\u56DE\uFF09",importedSkipped:" \xB7 \u8DF3\u8FC7 ",importedSkippedTail:" \u5F20\uFF08\u91CD\u590D\u6216\u7A7A\uFF09",importFail:"\u5BFC\u5165\u5931\u8D25",location:"\u81EA\u9009\u4F4D\u7F6E",saveAs:"\u53E6\u5B58\u4E3A",saveAsUnsupported:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u9009\u62E9\u4FDD\u5B58\u4F4D\u7F6E",exportedTo:"\u5DF2\u5BFC\u51FA\u5230",defaultDownloads:"\u9ED8\u8BA4\u4E0B\u8F7D\u6587\u4EF6\u5939",exportCancel:"\u5DF2\u53D6\u6D88\u5BFC\u51FA",manage:"\u7BA1\u7406",tabUsage:"\u8FD0\u884C\u72B6\u6001",tabOptimize:"\u6574\u7406\u5EFA\u8BAE",adminLoadFail:"\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF1A\u8BF7\u5F7B\u5E95\u91CD\u542F dsh-desktop\uFF08host \u9700\u52A0\u8F7D\u65B0\u7248 /memory-eternal \u8DEF\u7531\uFF09",retry:"\u91CD\u8BD5",mergeSimilar:"\u4E00\u952E\u5408\u5E76\u76F8\u4F3C",trendLabel:"\u8FD1 30 \u5929\u8D8B\u52BF",cleanStale:"\u{1F5D1}\uFE0F \u4E00\u952E\u6E05\u7406\u9648\u65E7",deletedStale:"\u4E2A\u9648\u65E7\u5361\u5DF2\u6E05\u7406",newCard:"\u65B0\u5EFA",tplDecision:"\u{1F4DD} \u6280\u672F\u51B3\u7B56",tplBug:"\u{1F41B} \u8E29\u5751",tplMeeting:"\u{1F4CB} \u4F1A\u8BAE\u7EAA\u8981",tplWeekly:"\u{1F4CA} \u5468\u62A5",createCard:"\u521B\u5EFA",cardTitle:"\u6807\u9898",cardBody:"\u6B63\u6587",fbUseful:"\u6709\u7528",fbIrr:"\u65E0\u5173",todayAdd:"\u4ECA\u65E5\u65B0\u589E",weekAdd:"\u8FD1 7 \u5929",byKind:"\u5206\u7C7B\u7EDF\u8BA1",todayList:"\u4ECA\u65E5\u6C89\u6DC0",budgetLabel:"\u4F1A\u8BDD\u9884\u7B97",budgetChars:"\u9884\u7B97\u5B57\u7B26",recallLimitLabel:"\u53EC\u56DE\u6761\u6570",embeddingLabel:"\u8BED\u4E49\u53EC\u56DE",mergePairs:"\u76F8\u4F3C\u5361\u5BF9\uFF08\u53EF\u5408\u5E76\uFF09",staleCards:"\u9648\u65E7\u5361\uFF08>90 \u5929\u672A\u66F4\u65B0\uFF09",noOptimize:"\u6682\u65E0\u53EF\u6574\u7406\u9879\uFF0C\u5F88\u5065\u5EB7 \u{1F389}",refineTitle:"\u77DB\u76FE\u626B\u63CF",refineScan:"\u5F00\u59CB\u626B\u63CF",refineHint:"\u76F8\u4F3C\u53EF\u4EE5\u5408\u5E76\uFF0C\u77DB\u76FE\u5FC5\u987B\u4EBA\u5224\u65AD \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u9009\u62E9\u540E\u624D\u52A8\u6570\u636E\uFF08\u4FDD\u7559\u4E00\u5F20\u4F1A\u628A\u53E6\u4E00\u5F20\u653E\u8FDB\u56DE\u6536\u7AD9\uFF0C\u53EF\u8FD8\u539F\uFF09",refineIdle:"\u70B9\u300C\u5F00\u59CB\u626B\u63CF\u300D\uFF1A\u5148\u5BBD\u53EC\u56DE\u53EF\u80FD\u6709\u5173\u7CFB\u7684\u5361\u7247\u5BF9\uFF0C\u518D\u8BA9\u6A21\u578B\u5224\u65AD\u662F\u91CD\u590D / \u8865\u5145 / \u77DB\u76FE / \u65E0\u5173",refineNone:"\u8FD9\u4E00\u8F6E\u6CA1\u6709\u53D1\u73B0\u9700\u8981\u4F60\u88C1\u51B3\u7684\u5361\u7247\u5BF9 \u{1F389}",refineFail:"\u77DB\u76FE\u626B\u63CF\u5931\u8D25",refineApplied:"\u5DF2\u8BB0\u5F55\u4F60\u7684\u88C1\u51B3\uFF08\u4E0D\u4F1A\u91CD\u590D\u6253\u6270\uFF09",refineRel_duplicate:"\u91CD\u590D\uFF08\u53EF\u5408\u5E76\uFF09",refineRel_complement:"\u8865\u5145\uFF08\u90FD\u7559\u7740\uFF09",refineRel_conflict:"\u77DB\u76FE\uFF08\u9700\u4F60\u88C1\u51B3\uFF09",refineRel_unrelated:"\u65E0\u5173",refineKeepA:"\u4FDD\u7559 A",refineKeepB:"\u4FDD\u7559 B",refineKeepBoth:"\u90FD\u4FDD\u7559",refineMerge:"\u5408\u5E76",junkTitle:"\u6CE8\u5165\u5783\u573E\u5361",junkScan:"\u626B\u63CF\u5B58\u91CF",junkHint:"\u6000\u7591\u662F\u8FD0\u884C\u65F6\u6CE8\u5165\u6587\u672C\uFF08\u6280\u80FD\u76EE\u5F55 / system-reminder\uFF09\u6C89\u6DC0\u6210\u7684\u5361 \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u56DE\u6536\u8D70\u56DE\u6536\u7AD9\u53EF\u8FD8\u539F",junkIdle:"\u70B9\u300C\u626B\u63CF\u5B58\u91CF\u300D\uFF1A\u627E\u51FA\u6B63\u6587\u5176\u5B9E\u662F\u88AB\u6CE8\u5165\u7684\u8FD0\u884C\u65F6\u6587\u672C\u3001\u5265\u6389\u540E\u51E0\u4E4E\u4E0D\u5269\u4EBA\u8BDD\u7684\u5361",junkNone:"\u6CA1\u53D1\u73B0\u8FD9\u7C7B\u5361 \u{1F389}",junkRecycle:"\u56DE\u6536",junkRecycleAll:"\u5168\u90E8\u56DE\u6536",junkRecycleAllConfirm:"\u786E\u8BA4\u628A\u8FD9\u4E9B\u5361\u9001\u8FDB\u56DE\u6536\u7AD9\uFF1F\uFF08\u4E0D\u662F\u6C38\u4E45\u5220\u9664\uFF0C\u53EF\u5728\u56DE\u6536\u4E2D\u5FC3\u8FD8\u539F\uFF09",junkDone:"\u5DF2\u9001\u56DE\u6536\u7AD9",junkFail:"\u626B\u63CF / \u56DE\u6536\u5931\u8D25",dbReadonlyTitle:"\u8BB0\u5FC6\u5E93\u5F53\u524D\u4E0D\u53EF\u5199",dbReadonlyBody:"\u5361\u7247\u8BFB\u5199 / \u5BA1\u6838 / \u56FE\u8C31\u4F1A\u5931\u8D25\uFF0C\u4F46**\u914D\u7F6E\u4ECD\u53EF\u4FDD\u5B58**\uFF08\u914D\u7F6E\u4E0D\u7ECF\u8FC7\u6570\u636E\u5E93\uFF09",dbReadonlyFix:"\u6392\u67E5\uFF1Adsh-memory doctor\uFF08\u770B journal \u6A21\u5F0F\u3001\u5199\u63A2\u9488\u3001\u5907\u4EFD\u6E05\u5355\u4E0E\u6062\u590D\u6B65\u9AA4\uFF09",goalTitle:"\u540C\u76EE\u6807\u4E0D\u540C\u505A\u6CD5",goalScan:"\u626B\u63CF\u76EE\u6807",goalHint:"\u6309\u300C\u8FD9\u5F20\u5361\u89E3\u51B3\u4EC0\u4E48\u95EE\u9898\u300D\u805A\u7C7B \u2014\u2014 \u6B63\u6587\u76F8\u4F3C\u5EA6\u6293\u4E0D\u5230\u7684\u505A\u6CD5\u5DEE\u5F02\uFF087z \u538B\u7F29 / tar \u5206\u53D1 / npm \u7626\u8EAB\uFF09\u4E5F\u80FD\u5F52\u5230\u4E00\u8D77",goalIdle:"\u70B9\u300C\u626B\u63CF\u76EE\u6807\u300D\uFF1A\u6A21\u578B\u5148\u7ED9\u6BCF\u5F20\u5361\u62BD\u4E00\u53E5\u76EE\u6807\uFF08\u9996\u6B21\u4F1A\u8C03\u6A21\u578B\uFF0C\u4E4B\u540E\u8D70\u7F13\u5B58\uFF09\uFF0C\u518D\u6309\u76EE\u6807\u805A\u7C7B",goalNone:"\u6CA1\u6709\u53D1\u73B0\u300C\u540C\u4E00\u76EE\u6807\u3001\u591A\u5F20\u5361\u300D\u7684\u7C07 \u{1F389}",goalStats:"\u5DF2\u7D22\u5F15 / \u672C\u6B21\u8C03\u7528",goalCards:"\u5F20\u5361",goalKeep:"\u90FD\u4FDD\u7559",goalMerge:"\u5408\u5E76\u8FD9\u4E00\u7EC4",goalMerged:"\u5DF2\u63D0\u4EA4\u5408\u5E76\uFF08\u65B0\u5361\u8FDB\u5BA1\u6838\u961F\u5217\uFF09",goalDone:"\u5DF2\u8BB0\u5F55\u300C\u90FD\u4FDD\u7559\u300D",goalFail:"\u76EE\u6807\u805A\u7C7B\u5931\u8D25",oneClickOptimize:"\u4E00\u952E\u4F18\u5316",oneClickOptimizeConfirm:"\u786E\u8BA4\u4E00\u952E\u4F18\u5316\uFF1F\u5C06\u5408\u5E76\u6240\u6709\u76F8\u4F3C\u5361\u5BF9\uFF08\u9ED8\u8BA4\u4E0D\u6E05\u7406\u9648\u65E7\u5361\uFF09\u3002",oneClickAlsoStale:"\u540C\u65F6\u6E05\u7406\u9648\u65E7\u5361",oneClickOptimizeDone:"\u4E00\u952E\u4F18\u5316\u5B8C\u6210",optimizedMerged:"\u5BF9\u5DF2\u5408\u5E76",optimizedStaleDeleted:"\u5F20\u9648\u65E7\u5361\u5DF2\u6E05\u7406",mcpSetupStatus:"Agent MCP \u6302\u8F7D\u72B6\u6001",rerunSetup:"\u8865\u5168 MCP",notInstalled:"\u672A\u5B89\u88C5",noMcpEntry:"\u914D\u7F6E\u7F3A\u5931",nodePathMismatch:"node \u8DEF\u5F84\u4E0D\u4E00\u81F4\uFF0C\u5EFA\u8BAE\u91CD\u8DD1 setup",nodePathNote:"node \u73AF\u5883\u4E0D\u540C\uFF08\u53EF\u7528\uFF09",mcpNeedsRepair:"\u26A0 \u9700\u4FEE\u590D\uFF08\u65E7\u914D\u7F6E\u4F1A\u62C9\u8D77 GUI\uFF09",repairMcp:"\u4FEE\u590D\u914D\u7F6E",healthy:"\u914D\u7F6E\u6B63\u5E38",mcpSetupHint:"\u300C\u81EA\u52A8\u6302\u8F7D MCP\u300D= \u8BA9 Claude Code / Codex / Cursor \u8FD9\u4E9B\u5DE5\u5177\u80FD\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002\u5F00\u542F\u540E\u81EA\u52A8\u628A\u5B83\u4EEC\u914D\u7F6E\u597D\uFF1B\u5173\u6389\u5C31\u4E0D\u52A8\u4F60\u7535\u8111\u4E0A\u4EFB\u4F55\u914D\u7F6E\u6587\u4EF6\uFF0C\u9700\u8981\u65F6\u624B\u52A8\u8DD1 dsh-memory setup\u3002",mcpManageHint:"\u6BCF\u4E2A agent \u7528\u4E0B\u65B9\u6309\u94AE\u5355\u72EC\u5B89\u88C5/\u5378\u8F7D MCP",tabConfig:"\u8BB0\u5FC6\u914D\u7F6E",configPageSub:"\u5199\u5165\u3001\u8DEF\u7531\u3001\u5BA1\u6838\u4E0E\u670D\u52A1\u7684\u672C\u5730\u914D\u7F6E",tabAudit:"\u5F85\u5BA1",statusApproved:"\u5DF2\u5BA1\u6838",statusPending:"\u5F85\u5BA1\u6838",statusRejected:"\u5DF2\u9A73\u56DE",allStatus:"\u5168\u90E8\u72B6\u6001",tabRecycle:"\u56DE\u6536\u4E2D\u5FC3",recyclePageSub:"\u5DF2\u5220\u9664\u7684\u5361\u4FDD\u7559 30 \u5929\uFF0C\u53EF\u6062\u590D\u6216\u6C38\u4E45\u5220\u9664",pending:"\u5F85\u5BA1\u6838",rejected:"\u5DF2\u9A73\u56DE",selectAll:"\u5168\u9009",approve:"\u6279\u51C6",approveAndCore:"\u6279\u51C6\u5E76\u8BBE\u4E3A\u6838\u5FC3",approveCore:"\u6279\u51C6\u4E3A\u6838\u5FC3\u8BB0\u5FC6",approveAsNormal:"\u6279\u51C6\u4E3A\u666E\u901A\u5361",coreSuggested:"\u6838\u5FC3\u8BB0\u5FC6\uFF08\u5F85\u5BA1\u6838\uFF09",reclassify:"\u91CD\u65B0\u8BC6\u522B\u7C7B\u578B",reject:"\u9A73\u56DE",allAgents:"\u5168\u90E8\u667A\u80FD\u4F53",noAuditItems:"\u6682\u65E0\u5BA1\u6838\u9879\u76EE",auditBodyFail:"\u6B63\u6587\u8BFB\u53D6\u5931\u8D25",deletedAt:"\u5220\u9664\u4E8E",restore:"\u6062\u590D",restoreDelete:"\u5220\u9664\u8FDB\u56DE\u6536\u7AD9",purge:"\u6C38\u4E45\u5220\u9664",emptyRecycle:"\u56DE\u6536\u7AD9\u4E3A\u7A7A",recycleHint:"\u5220\u9664\u7684\u5361\u7247\u5148\u8FDB\u56DE\u6536\u7AD9\uFF0C30 \u5929\u5185\u53EF\u6062\u590D\uFF0C\u8D85\u671F\u81EA\u52A8\u6C38\u4E45\u5220\u9664",purgeConfirm:"\u786E\u5B9A\u6C38\u4E45\u5220\u9664\uFF1F\u4E0D\u53EF\u6062\u590D\u3002",recycleDeleteConfirm:"\u786E\u5B9A\u5220\u9664\u8FDB\u56DE\u6536\u7AD9\uFF1F30 \u5929\u5185\u53EF\u6062\u590D\u3002",modeInit:"\u542F\u52A8\u65F6\u62C9\u4E00\u6B21",modeInterval:"\u5468\u671F\u4FDD\u6D3B",modeManual:"\u4EC5\u624B\u52A8",serviceConfig:"\u670D\u52A1\u81EA\u7BA1\u7406\u914D\u7F6E",auditConfig:"\u81EA\u52A8\u5BA1\u6838\u914D\u7F6E",auditHint:"\u547D\u4E2D\u514D\u5BA1\u7684\u65B0\u5361\u76F4\u63A5\u5165\u5E93\uFF0C\u5176\u4F59\u8FDB\u5F85\u5BA1\u6838",auditMode:"\u5BA1\u6838\u6A21\u5F0F",auditAll:"\u5168\u90E8\u8981\u5BA1\u6838",auditNone:"\u5168\u90E8\u514D\u5BA1",auditExemptAgents:"\u514D\u5BA1\u667A\u80FD\u4F53",auditExemptKinds:"\u514D\u5BA1\u7C7B\u578B",allExempt:"\u5168\u90E8\u514D\u5BA1",recycleDays:"\u56DE\u6536\u4FDD\u7559\u5929\u6570",editInSetting:"\u7F16\u8F91\u8BF7\u5230 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6",pendingSyncNote:"\u6B64\u9875\u662F\u72EC\u7ACB Web \u9875\uFF1A\u4FDD\u5B58\u540E\u7531 DSH \u5BBF\u4E3B\u5E94\u7528\uFF08\u65B0\u7248\u5BBF\u4E3B\u4F1A\u88AB\u76F4\u63A5\u53EB\u9192\u3001\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF0C\u70B9\u4FDD\u5B58\u5373\u751F\u6548\uFF09\uFF1B\u82E5\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5219\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\u3001\u7ACB\u5373\u751F\u6548\u3002\u53EA\u6709\u5728\u5BF9\u63A5\u65E7\u7248\u5BBF\u4E3B\u65F6\u624D\u4F1A\u9000\u56DE\u300C\u6392\u961F\u7B49\u5B83\u81EA\u5DF1\u540C\u6B65\u300D\uFF0C\u90A3\u65F6\u53EF\u5728 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u91CC\u6539\u540C\u4E00\u9879\u3002",readonlyTitle:"\u5F53\u524D\u9875\u9762\u53EA\u8BFB\uFF0C\u65E0\u6CD5\u4FDD\u5B58\u914D\u7F6E",readonlyBody:"\u8FD9\u4E2A\u8FDB\u7A0B\u6CA1\u6709 DSH \u7684\u8BBE\u7F6E\u670D\u52A1\uFF08settings.update \u4E0D\u5B58\u5728\uFF09\uFF0C\u914D\u7F6E\u53EA\u80FD\u5728\u672C\u673A DSH \u91CC\u4FEE\u6539\uFF1A\u684C\u9762\u7248 \u2192 \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u3002",readonlyBtn:"\u53EA\u8BFB",setupRunInTerminal:"\u8BF7\u590D\u5236\u4EE5\u4E0B\u547D\u4EE4\u5230\u7EC8\u7AEF\u6267\u884C\uFF1A",dshMemoryConfig:"DSH \u8BB0\u5FC6\u914D\u7F6E",coreMemory:"\u6838\u5FC3\u8BB0\u5FC6\uFF08\u524D\u7F6E\u5F3A\u5236\uFF09",coreMemoryHint:"\u6BCF\u6B21\u4F1A\u8BDD\u81EA\u52A8\u6CE8\u5165\uFF0C\u4E0D\u4F9D\u8D56\u6A21\u578B\u4E3B\u52A8\u53EC\u56DE\uFF1B\u53EA\u8BFB\u53D6\u5DF2\u6279\u51C6\u7684\u6838\u5FC3\u5361",coreMemoryEnabled:"\u542F\u7528\u6838\u5FC3\u8BB0\u5FC6\u6CE8\u5165",coreMemoryLimit:"\u6838\u5FC3\u8BB0\u5FC6\u4E0A\u9650\uFF08\u5F20\uFF09",coreMemoryMaxChars:"\u6838\u5FC3\u8BB0\u5FC6\u603B\u5B57\u7B26\u4E0A\u9650",setCore:"\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6",unsetCore:"\u53D6\u6D88\u6838\u5FC3\u8BB0\u5FC6",coreSetOk:"\u5DF2\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6",coreUnsetOk:"\u5DF2\u53D6\u6D88\u6838\u5FC3\u8BB0\u5FC6",coreSetFail:"\u8BBE\u7F6E\u5931\u8D25",coreActiveHint:"\u8FD9\u5F20\u5361\u6BCF\u6B21\u4F1A\u8BDD\u90FD\u4F1A\u5F3A\u5236\u6CE8\u5165\uFF1B\u4E0E\u666E\u901A\u8BB0\u5FC6\u51B2\u7A81\u65F6\u4EE5\u5B83\u4E3A\u51C6\u3002",coreInactiveHint:"\u666E\u901A\u77E5\u8BC6\u5361\u53EF\u4EE5\u63D0\u5347\u4E3A\u6838\u5FC3\u8BB0\u5FC6\uFF1B\u63D0\u5347\u540E\u6BCF\u6B21\u4F1A\u8BDD\u81EA\u52A8\u751F\u6548\u3002",coreNeedApproval:"\u5148\u6279\u51C6\u8FD9\u5F20\u5361\uFF0C\u624D\u80FD\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6\u3002",coreShort:"\u6838\u5FC3",setCoreShort:"\u8BBE\u6838\u5FC3",uiLayout:"\u5E03\u5C40\u5927\u5C0F",uiLayoutHint:"\u8C03\u6574\u8BB0\u5FC6\u754C\u9762\u6574\u4F53\u5927\u5C0F\uFF08\u53EA\u5F71\u54CD\u663E\u793A\uFF0C\u4E0D\u5F71\u54CD\u8BB0\u5FC6\u6570\u636E\uFF09",uiCompact:"\u7D27\u51D1",uiNormal:"\u6807\u51C6",uiLarge:"\u5927",autoCapture:"\u81EA\u52A8\u6C89\u6DC0",autoRecall:"\u81EA\u52A8\u53EC\u56DE",captureMinChars:"\u6355\u83B7\u6700\u5C0F\u957F\u5EA6",maxCardsPerDay:"\u65E5\u914D\u989D",dedupThreshold:"\u53BB\u91CD\u9608\u503C",recallLimit:"\u53EC\u56DE\u6761\u6570",vaultMulti:"\u591A\u5E93\uFF08\u6309\u9879\u76EE\u9694\u79BB\uFF09",vaultMultiHint:"\u7559\u7A7A\u5373\u5355\u5E93\uFF0C\u8001\u914D\u7F6E\u4E0D\u53D7\u5F71\u54CD",vaultNow:"\u5F53\u524D\u751F\u6548",vaultSource:"\u6765\u6E90",vaultWorkspace:"\u5F53\u524D workspace",vaultNamePh:"\u5E93\u540D\uFF0C\u5982 work",vaultPathPh:"\u76EE\u5F55\uFF0C\u5982 D:/vaults/work",vaultMatchPh:"\u9879\u76EE\u76EE\u5F55\uFF08\u53EF\u9009\uFF0C\u6309 workspace \u81EA\u52A8\u9009\u5E93\uFF09",vaultAdd:"\u6DFB\u52A0\u4E00\u4E2A\u5E93",vaultActive:"\u6FC0\u6D3B\u5E93",vaultActiveNone:"\u9ED8\u8BA4\u5E93\uFF08\u4E0D\u6307\u5B9A\uFF09",vaultSrcEnv:"\u73AF\u5883\u53D8\u91CF MEMORY_VAULT_DIR",vaultSrcProfile:"\u6FC0\u6D3B\u5E93\u914D\u7F6E",vaultSrcWorkspace:"\u6309\u9879\u76EE\u76EE\u5F55\u81EA\u52A8\u547D\u4E2D",vaultSrcVaultDir:"\u5355\u5E93\u914D\u7F6E vaultDir",vaultSrcDefault:"\u9ED8\u8BA4\u76EE\u5F55",fbNav:"\u53CD\u9988\u5F02\u5E38",fbTitle:"\u53CD\u9988\u5F02\u5E38\uFF08\u63D0\u4EA4\u5230 GitHub\uFF09",fbDesc:"\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF08\u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A\uFF09",fbDiag:"\u8BCA\u65AD\u4FE1\u606F\uFF08\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E key/token \u5DF2\u66FF\u6362\uFF09",fbCopyDiag:"\u590D\u5236\u8BCA\u65AD\u4FE1\u606F",fbOpenIssue:"\u5728 GitHub \u63D0\u4EA4\uFF08\u5DF2\u9884\u586B\uFF09",fbCopyPrompt:"\u590D\u5236\u7ED9 AI \u7684\u63D0\u793A\u8BCD",fbCopiedDiag:"\u8BCA\u65AD\u4FE1\u606F\u5DF2\u590D\u5236",fbCopiedPrompt:"\u63D0\u793A\u8BCD\u5DF2\u590D\u5236\uFF0C\u7C98\u8FDB AI \u5BF9\u8BDD\u6846\u5373\u53EF",fbCopyFail:"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u9009\u4E2D\u590D\u5236",fbWhy:"GitHub \u4E0D\u5141\u8BB8\u533F\u540D\u521B\u5EFA issue\uFF0C\u63D2\u4EF6\u91CC\u4E5F\u4E0D\u5E94\u5185\u7F6E token\uFF1A\u6240\u4EE5\u8FD9\u91CC\u628A\u6807\u9898 / \u6B63\u6587 / \u8BCA\u65AD\u90FD\u9884\u586B\u597D\uFF0C\u4F60\u53EA\u9700\u518D\u70B9\u4E00\u6B21 Submit\u3002",fbNeedDesc:"\u8BF7\u5148\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898",fbLoading:"\u6B63\u5728\u6536\u96C6\u8BCA\u65AD\u4FE1\u606F\u2026",fbDiagFail:"\u8BCA\u65AD\u63A5\u53E3\u4E0D\u53EF\u7528\uFF08\u72EC\u7ACB web \u6216\u65E7\u7248\u5BBF\u4E3B\uFF09\uFF0C\u8BF7\u624B\u52A8\u8865\u5145\u73AF\u5883\u4FE1\u606F",fbOr:"\u6216\u8005",fbSelectAll:"\u5168\u9009",auditTypeLabel:"\u7C7B\u578B",auditInboxSub:"\u81EA\u52A8\u6C89\u6DC0\u7684\u5361\u5148\u5230\u8FD9\u91CC \xB7 \u6279\u51C6\u540E\u8FDB\u5165\u8BB0\u5FC6\u5E93",auditSearchPlaceholder:"\u641C\u7D22\u6807\u9898 / \u6807\u7B7E / \u8DEF\u5F84\u2026",auditNoMatch:"\u6CA1\u6709\u5339\u914D\u7684\u5BA1\u6838\u5361",auditUndo:"\u6279\u51C6\u4E0E\u9A73\u56DE\u90FD\u53EF\u64A4\u9500",auditSelected:"\u5DF2\u9009",auditRevision:"\u4FEE\u6539",auditRevisionFrom:"\u4FEE\u6539\u539F\u5361",auditClearSelection:"\u6E05\u7A7A",preview:"\u9884\u89C8",supportGroup:"\u4EA4\u6D41\u7FA4",supportGroupQQ:"QQ \u4EA4\u6D41\u7FA4",supportGroupWechat:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",supportSponsor:"\u8D5E\u52A9",supportLegacy:"\u65E7\u7A0B\u5E8F",supportTitle:"\u652F\u6301\u4E0E\u4EA4\u6D41",clickToZoom:"\u70B9\u51FB\u653E\u5927",supportGroupHint:"\u626B\u7801\u8FDB\u4EA4\u6D41\u7FA4\uFF08QQ / \u5FAE\u4FE1\uFF09\uFF0C\u9047\u5230\u95EE\u9898\u53EF\u4EE5\u76F4\u63A5\u95EE\u3002",supportSponsorHint:"\u5982\u679C\u8FD9\u4E2A\u63D2\u4EF6\u5E2E\u4F60\u7701\u4E86\u65F6\u95F4\uFF0C\u53EF\u4EE5\u8BF7\u4F5C\u8005\u559D\u676F\u5496\u5561\u3002\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\u3002",supportLegacyTitle:"\u65E7\u7A0B\u5E8F\uFF08dsh-desktop\uFF09\u5DF2\u505C\u6B62\u7EF4\u62A4",supportLegacyBody:"\u4F5C\u8005\u81EA\u7814\u7684 dsh-desktop \u5DF2\u505C\u6B62\u7EF4\u62A4\uFF0C\u5B98\u65B9 DeepSeek Harness \u684C\u9762\u7248\u5DF2\u8986\u76D6\u540C\u6837\u80FD\u529B\uFF0C\u5EFA\u8BAE\u8FC1\u79FB\u3002\u65E7 profile \u91CC\u5982\u679C\u8FD8\u9489\u7740\u5DF2\u64A4\u4E0B\u7684 dsh-desktop-shell@0.3.0\uFF0C\u5148\u5220\u6389\u90A3\u5957\u4F9D\u8D56\uFF0C\u5426\u5219 pnpm install \u4F1A\u5931\u8D25\u3002",supportReadme:"\u6253\u5F00 README",supportReleases:"\u5386\u53F2\u7248\u672C",supportFeedback:"\u5F02\u5E38\u53CD\u9988",supportReplay:"\u91CD\u65B0\u67E5\u770B\u5F15\u5BFC",onboardTitle:"30 \u79D2\u8BA4\u8BC6\u8BB0\u5FC6\u6838\u5FC3",onboardSub:"\u4F60\u7684 AI \u4F1A\u5728\u6BCF\u8F6E\u5BF9\u8BDD\u540E\u81EA\u52A8\u6C89\u6DC0\u77E5\u8BC6\u5361\uFF0C\u5148\u5BA1\u540E\u5165\u3002",onboardSkip:"\u8DF3\u8FC7",onboardBack:"\u4E0A\u4E00\u6B65",onboardNext:"\u4E0B\u4E00\u6B65",onboardStart:"\u5F00\u59CB\u4F7F\u7528",onboardStep0Title:"\u5148\u53BB GitHub \u70B9\u4E2A Star",onboardStep0Body:"Star \u662F\u4F5C\u8005\u7EE7\u7EED\u7EF4\u62A4\u6700\u76F4\u63A5\u7684\u53CD\u9988\uFF1B\u60F3\u81EA\u5DF1\u6539\u4EE3\u7801\u6216\u90E8\u7F72\uFF0C\u5C31\u987A\u624B Fork \u4E00\u4EFD\u3002",onboardStar:"Star / \u70B9\u8D5E",onboardFork:"Fork",onboardStarred:"\u5DF2 Star\uFF0C\u7EE7\u7EED",onboardStarHint:"\u4E4B\u540E\u53EF\u4EE5\u968F\u65F6\u70B9\u9876\u680F\u7684 \u2605 Star \u56DE\u6765\u3002",onboardStep1Title:"\u81EA\u52A8\u6C89\u6DC0\uFF0C\u4E0D\u7528\u624B\u52A8\u8BB0",onboardStep1Body:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\uFF0C\u503C\u5F97\u7559\u4E0B\u7684\u51B3\u7B56\u3001\u6839\u56E0\u548C\u6559\u8BAD\u4F1A\u88AB\u5199\u6210\u4E00\u5F20\u5361\u3002\u5148\u751F\u6210\uFF0C\u518D\u5BA1\u6838\u3002",onboardStep2Title:"\u8BFB\u5230\u6709\u7528\u7684\u5361\uFF0C\u70B9\u4E2A \u{1F44D}",onboardStep2Body:"\u6253\u5F00\u4EFB\u610F\u5361\u7247\uFF0C\u70B9 \u{1F44D} \u6709\u7528 / \u{1F44E} \u6CA1\u7528\u3002\u4E0D\u7528\u5148\u641C\u7D22\uFF0C\u6309\u94AE\u73B0\u5728\u4E00\u76F4\u90FD\u5728\u3002\u5B83\u4F1A\u5E2E\u52A9\u53EC\u56DE\u6392\u5E8F\u3002",onboardStep3Title:"\u5DE6\u4FA7\u65B0\u589E\u652F\u6301\u5165\u53E3",onboardStep3Body:"\u4EA4\u6D41\u7FA4\u3001\u8D5E\u52A9\u3001\u65E7\u7A0B\u5E8F\u3001\u5F02\u5E38\u53CD\u9988\u90FD\u5728\u5DE6\u680F\u5E95\u90E8\uFF1B\u9700\u8981\u5E2E\u52A9\u65F6\u4E0D\u7528\u7FFB README\u3002",onboardTip:"\u63D0\u793A\uFF1A\u8FD9\u4E2A\u5F15\u5BFC\u53EF\u4EE5\u5728\u300C\u652F\u6301\u4E0E\u4EA4\u6D41\u300D\u91CC\u91CD\u65B0\u6253\u5F00\u3002",navWorkspace:"\u5DE5\u4F5C\u533A",navSystem:"\u7CFB\u7EDF",navSupport:"\u652F\u6301",navQuotes:"\u4F5C\u8005\u8BED\u5F55",quoteHint:"\u70B9\u51FB\u6362\u4E00\u53E5",v5Local:"\u672C\u5730\u8FD0\u884C",v5Star:"\u53BB GitHub \u70B9 Star",runtimeTitle:"\u8FD0\u884C\u72B6\u6001",runtimeSub:"\u77E5\u8BC6\u5E93\u3001\u5907\u4EFD\u3001\u81EA\u52A8\u6C89\u6DC0\u4E0E\u7248\u672C",dbTitle:"\u77E5\u8BC6\u5E93",backupTitle:"\u5907\u4EFD",captureTitle:"\u81EA\u52A8\u6C89\u6DC0",versionTitle:"\u7248\u672C",cardsUnit:"\u5F20\u5361",links:"\u8FDE\u63A5",todayReview:"\u4ECA\u65E5\u56DE\u770B",openArrow:"\u6253\u5F00 \u2192",reshuffle:"\u6362\u4E00\u5F20",insightDecision:"\u51B3\u7B56",insightRoot:"\u6839\u56E0",insightLesson:"\u6559\u8BAD",insightSummary:"\u6458\u8981",pinCard:"\u56FA\u5B9A\u8FD9\u5F20\u5361",unpinCard:"\u53D6\u6D88\u56FA\u5B9A",pinnedOnly:"\u5DF2\u56FA\u5B9A",toastApproved:"\u5DF2\u6279\u51C6",toastRejected:"\u5DF2\u9A73\u56DE",toastCardDeleted:"\u5DF2\u5220\u9664",toastRestored:"\u5DF2\u6062\u590D",toastPurged:"\u5DF2\u5F7B\u5E95\u5220\u9664",toastPurgedExpired:"\u5DF2\u6E05\u7406\u8FC7\u671F\u56DE\u6536\u7AD9",toastFailed:"\u64CD\u4F5C\u5931\u8D25",noSelection:"\u8BF7\u5148\u9009\u62E9\u8981\u5904\u7406\u7684\u5361\u7247",enabledLabel:"\u542F\u7528\u8BB0\u5FC6\u6838\u5FC3",vaultDirLabel:"\u8BB0\u5FC6\u5E93\u76EE\u5F55\uFF08\u5355\u5E93\uFF09",captureCooldownMs:"\u6C89\u6DC0\u51B7\u5374 (ms)",captureProvider:"\u84B8\u998F provider\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",routeAuto:"\u81EA\u52A8\uFF08\u6309\u6CE8\u518C\u987A\u5E8F\uFF09",routeListFail:"\u53D6\u4E0D\u5230\u6A21\u578B\u5217\u8868\uFF08{err}\uFF09\u2192 \u4E0B\u9762\u53EF\u76F4\u63A5\u624B\u586B provider / model\uFF1B\u684C\u9762\u7248\u5F39\u7A97\u4F1A\u81EA\u52A8\u5411\u5BBF\u4E3B\u4EE3\u7406\uFF0C\u82E5\u4ECD\u5931\u8D25\u8BF7\u4ECE DSH \u8BBE\u7F6E\u9875\u6253\u5F00",captureFollowSession:"\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\uFF08\u84B8\u998F\u7528\u4F1A\u8BDD\u7684 provider/model\uFF09",captureFirstOnly:"\u4EC5\u8BD5\u9996\u9009\uFF08\u5931\u8D25\u5373\u505C\uFF0C\u4E0D\u8F6E\u6362\u515C\u5E95\uFF09",llmTest:"\u6D4B\u8BD5\u84B8\u998F\u8DEF\u7531",llmTestOk:"\u2713 \u8C03\u7528\u6210\u529F",llmTestFail:"\u2717 \u8C03\u7528\u5931\u8D25",llmCandidates:"\u5019\u9009\u6570",captureModel:"\u84B8\u998F model\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",recallEmbedding:"\u8BED\u4E49\u53EC\u56DE provider\uFF08\u53EF\u9009\uFF09",sessionBudgetChars:"\u4F1A\u8BDD\u9884\u7B97 (\u5B57\u7B26)",saving:"\u4FDD\u5B58\u4E2D\u2026",savePending:"\u5DF2\u5199\u5165\u914D\u7F6E\u6587\u4EF6\uFF1B\u5BBF\u4E3B\u4ECD\u662F\u65E7\u7248\uFF0C\u91CD\u542F DSH \u540E\u5373\u4EE5\u65B0\u503C\u4E3A\u51C6\uFF08\u672C\u9762\u677F\u5DF2\u751F\u6548\uFF09",actionRunning:"\u5904\u7406\u4E2D\u2026",recycleEmptyHint:"\u56DE\u6536\u7AD9\u4E3A\u7A7A\uFF1A\u5220\u6389\u7684\u5361\u7247\u4F1A\u5148\u653E\u5230\u8FD9\u91CC\uFF0C\u4FDD\u7559 {days} \u5929\u540E\u81EA\u52A8\u6E05\u7406\u3002",recyclePurgeAll:"\u6E05\u7A7A\u56DE\u6536\u7AD9",recyclePurgeAllConfirm:"\u6C38\u4E45\u5220\u9664\u56DE\u6536\u7AD9\u91CC\u7684\u5168\u90E8 {n} \u5F20\u5361\u7247\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002",toastPurgeAll:"\u5DF2\u6C38\u4E45\u5220\u9664 {n} \u5F20",bucketDeleted:"\u5DF2\u5220\u9664",restoreToQueue:"\u9000\u56DE\u5BA1\u6838",fbCopyManual:"\u81EA\u52A8\u590D\u5236\u88AB\u6D4F\u89C8\u5668\u62E6\u622A\uFF0C\u5DF2\u628A\u5185\u5BB9\u653E\u5728\u4E0B\u9762\uFF1A\u70B9\u300C\u5168\u9009\u300D\u518D\u6309 Ctrl+C",vcPage:"\u9875\u9762\u811A\u672C",vcPageStale:"\u26A0 \u5F53\u524D\u9875\u9762\u4ECD\u5728\u8FD0\u884C\u65E7\u7248\u811A\u672C\uFF08\u9875\u9762 v{page} / \u78C1\u76D8 v{disk}\uFF09\uFF1A\u6309 Ctrl+F5 \u5237\u65B0\u9875\u9762\u5373\u751F\u6548\uFF1B\u82E5\u300C\u8FD0\u884C\u4E2D\u300D\u4ECD\u662F\u65E7\u7248\u53F7\uFF0C\u5219\u8FD8\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcLoaded:"\u8FD0\u884C\u4E2D\uFF08\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF09",vcResident:"\u5E38\u9A7B\u5B9E\u4F8B",vcOnDisk:"\u78C1\u76D8\u5B89\u88C5",vcLatest:"npm \u6700\u65B0",vcStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\u4ECD\u52A0\u8F7D v{loaded} \u2014\u2014 \u70B9\u300C\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u300D\u5373\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u542F\u5B83\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestart:"\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",vcRestarting:"\u91CD\u542F\u4E2D\u2026",vcRestartSent:"\u5DF2\u8C03\u5EA6\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\uFF1A\u7EA6 3-8 \u79D2\u540E\u65B0\u8FDB\u7A0B\u63A5\u7BA1\uFF0C\u8BF7\u7A0D\u7B49\u518D\u5237\u65B0\u9875\u9762\uFF08Ctrl+F5\uFF09",vcRestartCurrent:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u7ECF\u662F\u6700\u65B0\u7248\uFF0C\u65E0\u9700\u91CD\u542F",vcRestartAnyway:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{ver}\uFF1B\u901A\u5E38\u65E0\u9700\u91CD\u542F\uFF0C\u5361\u4F4F/\u884C\u4E3A\u5F02\u5E38\u65F6\u53EF\u5F3A\u5236\u91CD\u542F",vcHostProcessStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46**\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B**\uFF08DSH \u5BBF\u4E3B\uFF09\u52A0\u8F7D\u7684\u4ECD\u662F v{loaded} \u2014\u2014 \u5B83\u6765\u81EA\u5BBF\u4E3B\u542F\u52A8\u65F6\u7684\u90A3\u4EFD\u4EE3\u7801\uFF1A**\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u4F1A\u6539\u53D8\u672C\u9875**\uFF0C\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH\u3002",vcRestartFixes:"\u70B9\u51FB\u4F1A\u628A\u5E38\u9A7B\u5B9E\u4F8B\uFF08\u7AEF\u53E3\u4E0A\u90A3\u4E2A\uFF09\u6362\u6210 v{disk}\uFF08\u5F53\u524D v{served}\uFF09\uFF0C\u4E0D\u7528\u91CD\u542F DSH",vcRestartStart:"\u70B9\u51FB\u4F1A\u7528\u5F53\u524D\u78C1\u76D8\u7248\u672C v{disk} \u628A\u5E38\u9A7B\u5B9E\u4F8B\u62C9\u8D77\u6765\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartRepair:"\u70B9\u51FB\u4F1A\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\u5E76\u4FDD\u6D3B\uFF08\u7248\u672C\u5DF2\u662F v{disk}\uFF0C\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartHostOnly:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{disk}\uFF1B\u672C\u9875\u663E\u793A v{loaded} \u6765\u81EA DSH \u5BBF\u4E3B \u2014\u2014 \u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u5F71\u54CD\u672C\u9875\uFF0C\u8BF7\u91CD\u542F DSH",vcRestartFail:"\u91CD\u542F\u8BF7\u6C42\u5931\u8D25",vcRestartNoRoute:"\u5F53\u524D\u9875\u9762\u5BF9\u63A5\u7684\u8FDB\u7A0B\u8FD8\u662F\u65E7\u7248\uFF08\u6CA1\u6709\u8FD9\u4E2A\u63A5\u53E3\uFF09\uFF1A\u8BF7\u91CD\u542F\u684C\u9762\u7248 / DSH \u540E\u518D\u8BD5\uFF0C\u6216\u6267\u884C {cmd}",vcHostStale:"\u4E0A\u65B9\u7684\u300C\u8FD0\u884C\u4E2D\u300D\u6765\u81EA\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF1B\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F\u65B0\u7248 \u2014\u2014 \u8981\u8BA9\u5B83\u4E5F\u53D8\u6210\u65B0\u7248\u53F7\uFF0C\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcResidentDownShort:"\u672A\u8FD0\u884C",vcResidentDown:"\u5E38\u9A7B\u5B9E\u4F8B\u6CA1\u5728\u8FD0\u884C\uFF08\u7AEF\u53E3 {port} \u65E0\u54CD\u5E94\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u7528\u65B0\u4EE3\u7801\u628A\u5B83\u62C9\u8D77\u6765\uFF1B\u62C9\u4E0D\u8D77\u6765\u65F6\u6267\u884C {cmd}\uFF0C\u5E76\u8D34\u4E00\u4E0B dsh-memory status \u7684\u8F93\u51FA",vcResidentUnmanagedShort:"\u672A\u6258\u7BA1",vcResidentUnmanaged:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u6CA1\u6709\u770B\u95E8\u72D7\u4FDD\u6D3B**\uFF08\u505C\u6B62 / \u786C\u6740\u540E\u6B8B\u7559\u7684\u5B64\u513F\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\uFF08\u91CD\u65B0\u62C9\u4E00\u4E2A\u770B\u95E8\u72D7 + \u65B0\u5B9E\u4F8B\uFF09\uFF1B\u4E5F\u53EF\u4EE5\u6267\u884C {cmd}",vcResidentLockUnknownShort:"\u6258\u7BA1\u72B6\u6001\u672A\u77E5",vcResidentReplaceBlockedShort:"\u4E0D\u53EF\u66FF\u6362",vcResidentHostManagedShort:"\u5BBF\u4E3B\u6258\u7BA1",vcResidentReplaceBlocked:"\u5E38\u9A7B\u5B9E\u4F8B**\u4E0D\u53EF\u66FF\u6362**\uFF08\u73AF\u5883\u9650\u5236\uFF09\uFF1A\u770B\u95E8\u72D7\u9501\u76EE\u5F55\u4E0D\u53EF\u5199\uFF08{err}\uFF1B{path}\uFF09\u2192 \u7AEF\u53E3\u4E0A\u4F1A**\u957F\u671F**\u505C\u5728 v{served}\u3002\u8FD9\u4E0D\u662F\u300C\u6682\u65F6\u843D\u540E\u300D\uFF1A\u81EA\u52A8\u66FF\u6362\u88AB\u6B63\u786E\u5730\u62D2\u7EDD\uFF08\u907F\u514D\u7559\u4E0B\u5B64\u513F\uFF09\u3002\u51FA\u8DEF\uFF1A\u4FEE\u590D\u8BE5\u76EE\u5F55\u6743\u9650\u540E\u6267\u884C {cmd}\uFF0C\u6216\u524D\u53F0\u89C2\u5BDF dsh-memory watchdog --port 7999",vcResidentLockUnknown:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u770B\u95E8\u72D7\u9501\u6587\u4EF6\u5199\u4E0D\u8FDB\u53BB**\uFF08\u53D7\u9650\u73AF\u5883\uFF1A\u6C99\u7BB1\u7981\u5199 / ACL / \u975E\u7CFB\u7EDF\u76D8\uFF09\u2192 \u65E0\u6CD5\u5224\u65AD\u5B83\u6709\u6CA1\u6709\u88AB\u6258\u7BA1\uFF08\u4E0D\u662F\u300C\u672A\u6258\u7BA1\u300D\uFF09\u3002\u539F\u56E0\uFF1A{err}\uFF08{path}\uFF09\u3002\u4FDD\u6D3B\u901A\u5E38\u4ECD\u7136\u6709\u6548\uFF1B\u70B9\u4E0B\u9762\u7684\u6309\u94AE\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u65B0\u6258\u7BA1\u4E00\u6B21\u3002",vcOutdated:"\u6709\u65B0\u7248\u672C",vcUpToDate:"\u5DF2\u662F\u6700\u65B0",vcCheck:"\u68C0\u67E5\u66F4\u65B0",checking:"\u68C0\u67E5\u4E2D\u2026",vcCheckFail:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25",recallSummaryLen:"\u53EC\u56DE\u6458\u8981\u957F\u5EA6",recallBody:"\u53EC\u56DE\u542B\u6B63\u6587",secretHint:"\u51ED\u8BC1\u53D6\u7528\u63D0\u793A\uFF08\u6CE8\u5165\u6BCF\u4E2A\u4F1A\u8BDD\uFF09",autoWeb:"Web server",autoWebMode:"\u4FDD\u6D3B\u6A21\u5F0F",webPort:"Web \u7AEF\u53E3",webCheckIntervalMs:"\u63A2\u6D3B\u95F4\u9694(ms)",webMaxRestart:"\u6700\u5927\u91CD\u542F\u6B21\u6570",watchdogAutoSpawn:"\u770B\u95E8\u72D7\u8FDB\u7A0B",autoRestartOnDrift:"\u7248\u672C\u6F02\u79FB\u81EA\u52A8\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",autoMcpSetup:"\u81EA\u52A8\u6302\u8F7D MCP",saveConfig:"\u4FDD\u5B58\u914D\u7F6E",saveFail:"\u4FDD\u5B58\u5931\u8D25",savedOk:"\u5DF2\u4FDD\u5B58",savedDirect:"\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5DF2\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\uFF08hooks / MCP / \u72EC\u7ACB\u9875\u7ACB\u5373\u751F\u6548\uFF09",savedApplied:"\u5DF2\u4FDD\u5B58\u5E76\u751F\u6548\uFF08\u5BBF\u4E3B\u5DF2\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF09",saveQueued:"\u5DF2\u4EA4\u7ED9 DSH \u5BBF\u4E3B\u540C\u6B65\uFF0C\u5C1A\u672A\u786E\u8BA4\u751F\u6548",saveHostGuard:"\u8BE5\u5BBF\u4E3B\u4E0D\u5141\u8BB8\u63D2\u4EF6\u4ECE\u81EA\u5DF1\u7684\u56DE\u8C03\u4E0A\u4E0B\u6587\u91CC\u5199\u914D\u7F6E\uFF1B\u8BF7\u5728\u300CDSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u300D\u91CC\u6539\u540C\u4E00\u9879\uFF0C\u6216\u7F16\u8F91 profile \u7684\u914D\u7F6E\u8865\u4E01\u5C42",saveFailHint:"\u5BBF\u4E3B\u4FA7\u672A\u5E94\u7528\uFF0C\u8BE6\u89C1\u300C\u53CD\u9988\u5F02\u5E38\u300D\u91CC\u7684\u8BCA\u65AD\u4FE1\u606F",recallTool:"recall \u5DE5\u5177",costControl:"\u6210\u672C\u63A7\u5236",costHint:"\u7701 token\u3001\u63A7 LLM \u6D88\u8017",distillEnabled:"\u84B8\u998F\u77E5\u8BC6\u5361(\u5F00=LLM \u538B\u7F29, \u5173=\u539F\u6587\u5361\u96F6 LLM)",dedupByLLM:"\u8BED\u4E49\u53BB\u91CD\u5582 LLM(\u5173=\u7EAF\u8BCD\u6CD5\u66F4\u7701)",captureMaxTokens:"\u84B8\u998F\u8F93\u51FA\u4E0A\u9650(token)",captureTimeoutMs:"\u84B8\u998F\u8D85\u65F6(\u6BEB\u79D2\uFF1B\u672C\u5730\u5927\u6A21\u578B\u51B7\u542F\u52A8\u5EFA\u8BAE 120000+)",recallMinScore:"\u53EC\u56DE\u76F8\u5173\u6027\u9608\u503C(\u8D8A\u9AD8\u8D8A\u7701)",configNeedsDsh:"\u914D\u7F6E\u7F16\u8F91\u9700\u5728 DSH \u5185\u6253\u5F00\uFF08\u672C\u9875\u53EF\u80FD\u53EA\u8BFB\u6216\u6709\u90E8\u5206\u7F3A\u5931\uFF09",installMcp:"\u5B89\u88C5 MCP",uninstallMcp:"\u5378\u8F7D MCP",uninstallConfirm:"\u786E\u8BA4\u5378\u8F7D\u8BE5\u667A\u80FD\u4F53\u7684 MCP\uFF1FClaude Code/Codex \u5C06\u65E0\u6CD5\u518D\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002",presetConfig:"\u4E00\u952E\u63A8\u8350\u914D\u7F6E",presetHint:"\u70B9\u51FB\u586B\u5145\u5BF9\u5E94\u65B9\u6848\uFF0C\u70B9\u4FDD\u5B58\u751F\u6548",planApplied:"\u5DF2\u586B\u5165\u300C{plan}\u300D\xB7 \u70B9\u300C\u4FDD\u5B58\u914D\u7F6E\u300D\u751F\u6548",planDescA:"\u4E2A\u4EBA\u5F00\u53D1\u63A8\u8350 \xB7 \u84B8\u998F 4000 \xB7 \u5173\u770B\u95E8\u72D7",planDescB:"\u9884\u7B97\u654F\u611F \xB7 \u5173\u84B8\u998F \xB7 \u8FD1 0 \u6210\u672C",planDescC:"\u957F\u9879\u76EE \xB7 \u5F00\u770B\u95E8\u72D7 \xB7 \u9AD8\u8D28\u91CF",cfgSubCore:"\u81EA\u52A8\u6C89\u6DC0 / \u53EC\u56DE / \u5E93\u76EE\u5F55\u4E0E\u53BB\u91CD\u7B56\u7565",cfgSubMulti:"\u6309\u9879\u76EE\u9694\u79BB\u8BB0\u5FC6\u5E93\uFF0C\u5207\u6362\u540E CLI / MCP / hooks \u540C\u6B65\u751F\u6548",cfgSubCost:"\u63A7\u5236 LLM \u8C03\u7528\u4E0E\u53EC\u56DE\u89C4\u6A21\uFF0C\u76F4\u63A5\u51B3\u5B9A\u82B1\u591A\u5C11\u94B1",cfgSubAudit:"\u4EC0\u4E48\u5185\u5BB9\u9700\u8981\u4F60\u4EBA\u5DE5\u786E\u8BA4\u540E\u624D\u8FDB\u4E3B\u5E93",cfgSubService:"\u4FDD\u6D3B\u3001\u770B\u95E8\u72D7\u4E0E\u7248\u672C\u81EA\u6108\uFF0C\u4E00\u822C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF",cfgDirty:"\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539",cfgClean:"\u5DF2\u540C\u6B65",unitChars:"\u5B57",unitPerDay:"\u5F20 / \u5929",unitTokens:"tokens",unitMs:"\u6BEB\u79D2",unitTimes:"\u6B21",unitDays:"\u5929",mcpAutoHint:"\u81EA\u52A8\u8BC6\u522B\u5DF2\u5B89\u88C5\u7684 Agent \u4E0E\u5176 MCP \u914D\u7F6E\uFF08\u53EA\u8BFB\u63A2\u6D4B\uFF0C\u4E0D\u6539\u4EFB\u4F55\u6587\u4EF6\uFF09",mcpRefresh:"\u91CD\u65B0\u68C0\u6D4B",mcpSummary:"\u8BC6\u522B\u5230 {agents} \u4E2A Agent \xB7 {servers} \u4E2A MCP \xB7 {mounted} \u4E2A\u5DF2\u6302\u8F7D\u672C\u63D2\u4EF6",mcpNoServers:"\u672A\u914D\u7F6E MCP",mcpDetectedOnly:"\u4EC5\u8BC6\u522B",planA:"A \u8F7B\u91CF\u7701\u5FC3",planB:"B \u6781\u81F4\u7701\u94B1",planC:"C \u9AD8\u8D28\u91CF",pluginInfo:"\u63D2\u4EF6\u4FE1\u606F",organizeTitle:"\u6574\u7406\u5EFA\u8BAE",scanAndOrganize:"\u4E00\u952E\u641C\u7D22\u548C\u6574\u7406",scanHint:"\u70B9\u300C\u{1F50D} \u4E00\u952E\u641C\u7D22\u548C\u6574\u7406\u300D\u626B\u63CF\u76F8\u4F3C\u5361/\u9648\u65E7\u5361\uFF0C\u518D\u7528\u300C\u26A1 \u4E00\u952E\u4F18\u5316\u300D\u6267\u884C\u3002",mergeNow:"\u5408\u5E76",delete:"\u5220\u9664",captureAlert:"\u81EA\u52A8\u6C89\u6DC0\u5F02\u5E38",captureAlertHint:"\u6253\u5F00\u5DE6\u680F\u300C\u7528\u91CF/\u4ECA\u65E5\u300D\u770B\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7\uFF1B\u82E5\u662F\u63A5\u53E3/\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u9700\u66F4\u65B0 memory-eternal \u63D2\u4EF6\u3002",captureLog:"\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7",captureLogHint:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\u540E\u81EA\u52A8\u8DD1\uFF1A\u76D1\u542C \u2192 \u5224\u5B9A \u2192 \u5199\u5361\u3002\u8FD9\u91CC\u663E\u793A\u6700\u8FD1 100 \u6761\uFF0C\u7528\u6765\u6392\u67E5\u300C\u4E3A\u4EC0\u4E48\u6CA1\u5199\u5361\u300D\u3002",captureLogEmpty:"\u8FD8\u6CA1\u6709\u8BB0\u5F55\u3002\u8DDF Agent \u804A\u4E00\u8F6E\uFF08> \u6355\u83B7\u6700\u5C0F\u957F\u5EA6\uFF09\u540E\u518D\u56DE\u6765\u770B\u3002",healthTitle:"\u5065\u5EB7\u6982\u89C8",healthHint:"\u5E93 / \u5907\u4EFD / \u6C89\u6DC0 / \u7248\u672C \u2014\u2014 \u4E00\u773C\u770B\u6E05\u6709\u6CA1\u6709\u9759\u9ED8\u574F\u6389\u7684\u4E1C\u897F",healthDb:"\u77E5\u8BC6\u5E93",healthDbBad:"\u5E93\u4E0D\u53EF\u5199\u6216\u635F\u574F",healthBackups:"\u5907\u4EFD",healthNoBackups:"\u6CA1\u6709\u5907\u4EFD\uFF08\u6267\u884C dsh-memory doctor \u53EF\u5EFA\uFF0C\u5BBF\u4E3B\u4E5F\u4F1A\u6BCF\u65E5\u5907\u4EFD\uFF09",healthBackupAge:"{n} \u4E2A \xB7 \u6700\u8FD1 {d} \u5929\u524D",healthBackupToday:"{n} \u4E2A \xB7 \u4ECA\u5929",healthCapture:"\u81EA\u52A8\u6C89\u6DC0",healthNoRecords:"\u6682\u65E0\u8BB0\u5F55\uFF08\u8FD8\u6CA1\u89E6\u53D1\u8FC7\u6C89\u6DC0\uFF09",healthCapOk:"\u6700\u8FD1\u4E00\u6B21\u6210\u529F\u5199\u5361",healthCapFail:"\u6700\u8FD1\u4E00\u6B21\u5931\u8D25",healthRunAlign:"\u8FD0\u884C\u300C\u7248\u672C\u5BF9\u9F50\u68C0\u67E5\u300D\u540E\u663E\u793A",healthVersion:"\u7248\u672C",ledgerTitle:"\u8BB0\u5FC6\u8D26\u672C\uFF08\u8FD1 7 \u5929\uFF09",ledgerHint:"\u53EC\u56DE\u6CE8\u5165\u4E86\u591A\u5C11\u3001\u84B8\u998F\u8C03\u7528\u4E86\u591A\u5C11\u6B21 \u2014\u2014 \u5224\u65AD\u300C\u5230\u5E95\u7701\u4E0D\u7701 token\u300D\u7684\u7B2C\u4E00\u5757\u6570\u636E",ledgerRecalls:"\u53EC\u56DE\u6B21\u6570",ledgerInjected:"\u6CE8\u5165",ledgerChars:"\u5B57\u7B26",ledgerCaptures:"\u6C89\u6DC0\u6B21\u6570",ledgerLlmCalls:"LLM \u8C03\u7528",ledgerEstimate:"\u4F30\u7B97 token",ledgerEstimateHint:"\u6309\u7EA6 2 \u5B57\u7B26 \u2248 1 token \u7C97\u4F30\uFF0C\u53EA\u770B\u91CF\u7EA7",ledgerUseful:"\u53EC\u56DE\u6709\u7528\u7387",ledgerUsefulHint:"\u6765\u81EA\u300C\u6709\u7528 / \u6CA1\u7528\u300D\u53CD\u9988\uFF1B\u4F4E\u4E8E 60% \u8BF4\u660E\u6CE8\u5165\u53EF\u80FD\u51C0\u4E8F",ledgerFormula:"\u51C0\u6536\u76CA \u2248 \u88AB\u907F\u514D\u7684\u4E0A\u4E0B\u6587\u5F00\u9500 \u2212\uFF08\u6CE8\u5165\u5B57\u7B26 + \u84B8\u998F\u8C03\u7528 \xD7 \u5355\u4EF7\uFF09\u3002\u8D26\u672C\u53EA\u8BB0\u300C\u82B1\u4E86\u591A\u5C11\u300D\uFF0C\u6536\u76CA\u4FA7\u8BF7\u7ED3\u5408\u4F60\u5B9E\u9645\u7701\u4E0B\u7684\u91CD\u8BFB / \u8FD4\u5DE5\u6765\u5224\u65AD\u3002",ledgerNoData:"\u8FD1 7 \u5929\u8FD8\u6CA1\u6709\u8BB0\u5F55\uFF1A\u804A\u51E0\u8F6E\u6216\u8BA9 agent recall \u4E00\u6B21\u540E\u518D\u770B\u3002",ledgerNeedRestart:"\u5BBF\u4E3B\u4ECD\u5728\u8DD1\u65E7\u7248 API\uFF08/ledger \u4E0D\u5B58\u5728\uFF09\uFF1A\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH \u540E\uFF0C\u8D26\u672C\u624D\u4F1A\u5F00\u59CB\u8BB0\u5F55\u3002",alignTitle:"\u7248\u672C\u5BF9\u9F50\u68C0\u67E5",alignRun:"\u5F00\u59CB\u68C0\u67E5",alignFix:"\u91CD\u5199\u63A5\u7EBF",alignFixConfirm:"\u91CD\u5199 MCP / hooks \u63A5\u7EBF\uFF1F\uFF08\u53EA\u78B0\u63D2\u4EF6\u81EA\u5DF1\u7684\u952E\uFF0C\u4E0D\u52A8\u4F60\u7684\u6570\u636E\u4E0E\u914D\u7F6E\uFF09",alignFixed:"\u63A5\u7EBF\u5DF2\u91CD\u5199\uFF1B\u82E5\u4E0A\u9762\u63D0\u793A\u300C\u5BBF\u4E3B\u8FDB\u7A0B\u65E7\u300D\uFF0C\u4ECD\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH",alignFail:"\u5BF9\u9F50\u68C0\u67E5\u5931\u8D25",alignHint:"\u63D2\u4EF6\u5347\u7EA7\u53EA\u6362\u78C1\u76D8\u6587\u4EF6 \u2014\u2014 \u5BBF\u4E3B\u5185\u5B58\u91CC\u7684\u4E8B\u4EF6\u8BA2\u9605\u4E0E MCP / hooks \u91CC\u7684\u65E7\u8DEF\u5F84\u4E0D\u4F1A\u81EA\u5DF1\u66F4\u65B0\uFF0C\u8FD9\u91CC\u4E00\u6B21\u67E5\u6E05",alignIdle:"\u70B9\u300C\u5F00\u59CB\u68C0\u67E5\u300D\uFF1A\u5BF9\u6BD4\u5BBF\u4E3B / \u5E38\u9A7B\u5B9E\u4F8B / npm \u7684\u7248\u672C\uFF0C\u5E76\u68C0\u67E5 MCP\u3001hooks \u91CC\u662F\u5426\u6709\u65E7\u8DEF\u5F84\u4E0E\u65E7\u53C2\u6570",alignDisk:"\u78C1\u76D8",alignResident:"\u5E38\u9A7B\u5B9E\u4F8B",alignHost:"\u5BBF\u4E3B\u8FDB\u7A0B",captureLogUnavailable:"\u65E5\u5FD7\u4EC5\u5728 DSH \u5BBF\u4E3B\u5185\u53EF\u7528\uFF08\u72EC\u7ACB Web \u9875\u6CA1\u6709 host \u8FD0\u884C\u65F6\uFF09\u3002",captureAgentCards:"Agent \u81EA\u52A8\u6C89\u6DC0\u7684\u5361",noCards:"\u6682\u65E0",loadMore:"\u52A0\u8F7D\u66F4\u591A",batchMerge:"\u4E00\u952E\u667A\u80FD\u5408\u5E76",mergeAllConfirm:"\u5C06\u6309\u76F8\u4F3C\u5EA6\u5206\u7EC4\u7684\u5361\u7247\u5404\u5408\u5E76\u4E3A\u4E00\u5F20\uFF08\u4FDD\u7559\u5404\u81EA kind\uFF09\uFF0C\u539F\u5361\u5220\u9664\uFF1F",crossVault:"\u8DE8\u5E93\u805A\u5408",deleteConfirm:"\u786E\u5B9A\u5220\u9664\u8BE5\u8BB0\u5FC6\u5361\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",editCard:"\u7F16\u8F91",editHint:"\u53EA\u6539\u6807\u9898 / \u6807\u7B7E / \u6B63\u6587\uFF1B\u72B6\u6001\u4E0E\u7C7B\u578B\u4ECD\u7531\u5BA1\u6838\u4E0E\u7CFB\u7EDF\u6D41\u8F6C\u51B3\u5B9A\uFF0C\u624B\u52A8\u7F16\u8F91\u4E0D\u4F1A\u7ED5\u8FC7\u5BA1\u6838\u3002",editTitle:"\u6807\u9898",editTags:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",editTagsHint:"\u4F8B\u5982\uFF1A\u8BB0\u5FC6, \u68C0\u7D22, \u6027\u80FD",editBody:"\u6B63\u6587\uFF08Markdown\uFF09",editSave:"\u4FDD\u5B58",editSaving:"\u4FDD\u5B58\u4E2D\u2026",editCancel:"\u53D6\u6D88",editSaved:"\u5DF2\u4FDD\u5B58",editFail:"\u4FDD\u5B58\u5931\u8D25",editTitleEmpty:"\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A",editBodyEmpty:"\u6B63\u6587\u4E0D\u80FD\u4E3A\u7A7A",deleted:"\u5DF2\u5220\u9664",deleteFail:"\u5220\u9664\u5931\u8D25",deleteSelected:"\u5220\u9664\u9009\u4E2D",deletedSelected:"\u5F20\u5361\u5DF2\u5220\u9664",merge:"\u5408\u5E76",mergeNeed:"\u81F3\u5C11\u9009 2 \u5F20\u5361",mergeConfirm:"\u5C06\u6240\u9009\u5361\u7247\u5408\u5E76\u4E3A\u4E00\u5F20\u5E76\u5220\u9664\u539F\u5361\uFF1F",merged:"\u5DF2\u5408\u5E76",mergeFail:"\u5408\u5E76\u5931\u8D25",mcpInstalled:"\u2705 {agent} MCP \u5DF2\u5B89\u88C5",mcpUninstalled:"\u2705 {agent} MCP \u5DF2\u5378\u8F7D",mcpActionFail:"\u274C {agent} MCP \u64CD\u4F5C\u5931\u8D25\uFF1A{error}",dshHostLabel:"DeepSeek Harness\uFF08\u5F53\u524D\u5BBF\u4E3B\uFF09",restartHint:"\u5DF2\u4FDD\u5B58\u3002autoWebMode/watchdogAutoSpawn \u7B49\u9700\u91CD\u542F DSH \u751F\u6548\uFF1B\u5DF2\u6709\u5E38\u9A7B watchdog \u4E0D\u4F1A\u88AB\u81EA\u52A8\u505C\u6389\uFF0C\u9700 dsh-memory stop / restart\uFF08#19\uFF09",conflictRefresh:"\u914D\u7F6E\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5",untitled:"\u65E0\u6807\u9898",tplBlank:"\u{1F4C4} \u7A7A\u767D",tagsHint:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",connCount:"{n} \u8FDE\u63A5",tplDecisionTags:"\u51B3\u7B56, \u65B9\u6848",tplBugTags:"\u8E29\u5751, \u6559\u8BAD",tplMeetingTags:"\u4F1A\u8BAE, \u7EAA\u8981",tplWeeklyTags:"\u5468\u62A5",tplDecisionBody:`# \u6280\u672F\u51B3\u7B56\uFF1A[\u6807\u9898]
18
18
 
19
19
  ## \u80CC\u666F
20
20
  - \u95EE\u9898\u63CF\u8FF0
@@ -59,7 +59,7 @@ var Zn=Object.create;var la=Object.defineProperty;var eo=Object.getOwnPropertyDe
59
59
  -
60
60
 
61
61
  ## \u98CE\u9669/\u963B\u585E
62
- - `},En={nav:"Memory",loading:"Loading\u2026",loadingGraph:"Loading knowledge graph\u2026",refresh:"Refresh",overview:"Memory Overview",total:"Cards",recent:"Added (7d)",tags:"Tags",searchPlaceholder:"Search memory\u2026",search:"Search",all:"All",kindProject:"Projects",kindKnowledge:"Knowledge",kindContent:"Content",kindPrompt:"Prompts",kindBusiness:"Business",kindTool:"Tools",kindMistake:"Mistakes",kindCore:"Core memory",kindSkill:"Skills",newsTab:"News",newsTitle:"News",newsHint:"Your own updates, decisions and team briefs, kept separate from memory cards.",newsNew:"Write one",newsSearch:"Search title / body / tags\u2026",newsUnreadOnly:"Unread only",newsEmpty:"No news yet. Write the first update, decision or team brief here.",newsNoMatch:"No matching news",newsPinned:"Pinned",newsRead:"Read",newsUnread:"Unread",newsMarkRead:"Mark read",newsMarkUnread:"Mark unread",newsEdit:"Edit",newsDeleteConfirm:"Delete this news item?",newsDeleted:"Deleted",newsSave:"Save",newsSaving:"Saving\u2026",newsSaved:"Saved",newsSaveFail:"Save failed",newsTitleField:"Title",newsBodyField:"Body (Markdown)",newsCategoryField:"Category",newsSourceField:"Source",newsUrlField:"URL",newsTagsField:"Tags (comma separated)",newsDateField:"Date",newsPinField:"Pin to top",newsPreview:"Preview",newsEditBody:"Edit body",newsOpenLink:"Open link",newsToday:"Today",newsYesterday:"Yesterday",newsEarlier:"Earlier",newsTitlePlaceholder:"e.g. v0.20.0 release notes",newsBodyPlaceholder:"Write something worth keeping\u2026 Markdown supported",newsCountUnit:"items",cancel:"Cancel",newsDaily:"Daily AI",newsMonthly:"Monthly top",newsMine:"My updates",newsDailySub:"Latest AI news, aggregated by source",newsMonthlySub:"This month's AI discussion ranking (Hacker News points)",newsMineSub:"Your own releases, decisions and team briefs",newsLoading:"Fetching news\u2026",newsFeedError:"News sources are unavailable",newsHeat:"heat",newsComments:"comments",newsOriginal:"Read original",newsUpdatedAt:"Updated",newsPartialFail:"Some sources failed",newsFeedEmpty:"No news fetched today. Try refresh.",newsFeedRefresh:"Refresh news",newsLoadingHint:"First load fetches several Chinese sources; this can take a few seconds.",newsRetry:"Retry",newsSearchGo:"Search",newsSortRec:"For you",newsSortTime:"Latest",newsPersonalized:"Ordered by your taste",newsLastQuery:"Last search",newsResetPrefs:"Reset taste",newsHeroEye:"NEWSROOM \xB7 AI FEED",newsHeroHint:"One search is remembered \u2014 the next visit is ordered by your taste. Data is fetched once per page open.",newsMatched:"hits",newsNoMatch:"No matching news",newsNoMatchHint:"Nothing in this dataset matches the current keyword, category and language. Clear the filters to see everything.",newsClearFilters:"Clear filters",newsJustNow:"just now",newsMinutesAgo:"min ago",newsHoursAgo:"h ago",newsDaysAgo:"d ago",newsLangZh:"\u4E2D\u6587",newsLangEn:"English",newsLangAll:"All",newsZhArchive:"Chinese monthly archive by date (no public heat score)",newsEnRanking:"English monthly ranking by Hacker News points",skillCards:"Skill cards",skillCardsHint:"Generated from the skills actually installed/available on this machine; always reviewed. Never deposited by agent chat.",skillAutoSync:"Auto-sync skill cards",syncSkills:"Sync skills",syncingSkills:"Syncing skills\u2026",skillsSyncDone:"Skill cards synced",skillsScanned:"scanned",skillsCreated:"created",skillsUpdated:"updated",skillsPendingUpdates:"pending updates",skillsSyncFail:"Skill sync failed",cardsTab:"Cards",webTab:"Web version",webOpening:"Opening the web version in your browser\u2026",webOpened:"Opened the web version in your browser",webOpenFail:"Could not open a browser; visit this URL manually",terminalTab:"Terminal",terminalTitle:"Full terminal UI",terminalIntro:"The Web UI does not render the native terminal TUI. For select-all, batch review and long-form scrolling, open a local terminal or use /audit inside dsh-tui.",terminalRun:"Read-only live queue",terminalTui:"Write mode (real review)",terminalWhy:"Why not embed it in the page",terminalWhyBody:"The terminal TUI relies on the alternate screen, raw key events and a character grid; an iframe cannot reproduce it faithfully. These are the real commands.",terminalCopy:"Copy command",terminalCopied:"Copied",terminalPreview:"Terminal preview",graphTab:"Star map",graph:"Knowledge Graph",graphHint:"Nodes = cards; edges = [[links]] or shared tags. Click a node to read.",graphTip:"Left-click highlights \xB7 Shift+drag box-select \xB7 right-click menu \xB7 scroll zoom \xB7 drag to pan",graphWarming:"Laying out {n} nodes\u2026",graphAllCrumb:"All",graphOther:"Other",graphItems:"items",graphCardsUnit:"cards",graphPlanetCards:"{n} cards",graphEnter:"Open this level",graphLevelLoading:"Loading level\u2026",graphLevelTimeout:"Level load timed out ({ms}ms) \xB7 current level kept",graphLevelError:"Level load failed \xB7 current level kept",graphRetry:"Retry",graphEmptyLevel:"No cards in this level.",graphLevelHint:"Click a planet to enter \xB7 Shift+click to select \xB7 drag to move \xB7 scroll to zoom",graphBreadcrumbAria:"Level breadcrumb",graphCountWan:"K",graphCountLocale:"en-US",rebuild:"Rebuild",reset:"Reset",expandAll:"Expand all",capped:"Showing the",clearFocus:"Clear highlight",empty:"Memory is empty. After a few conversations, valuable content is auto-captured.",emptyGraph:"No graph data yet.",open:"Read",updated:"Updated",created:"Created",source:"Source",contents:"Contents",related:"Related",file:"File",close:"Close",vaultDir:"Vault directory",capture:"Auto capture",recall:"Auto recall",enabled:"on",disabled:"off",error:"Load failed",back:"Back to list",cardCount:"cards",nodes:"nodes",edges:"edges",memoryTitle:"Memory Library",memoryHint:"Your local second brain",zoomIn:"Zoom in",zoomOut:"Zoom out",fit:"Fit",enterFullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",exportGraph:"Export",openCard:"Open card",focusNeighbors:"Highlight links",copyName:"Copy name",noMatch:"No matching memory",clearFilter:"Clear filter",filterLabel:"Filter",sortRecent:"Recent",sortTitle:"Title",sortHot:"Hot",exportSel:"Export selected",clearSelection:"Clear selection",download:"Download",openNewTab:"Open in new tab",copyImage:"Copy image",done:"Done",downloaded:"Download started",openedTab:"Opened in new tab",copied:"Copied",exportedSel:" nodes exported",fullscreen:"Fullscreen",exitFull:"Exit fullscreen",copyFail:"Copy failed",timeDim:"Time",timeNew:"\u22643 days",timeRecent:"\u22642 weeks",timeMonth:"\u22641 month",timeOld:"Older",newBadge:"NEW",expand:"Expand",collapse:"Collapse",copyBody:"Copy body",clearFilter:"Clear tag filter",copyPath:"Copy path",copied:"Copied",copyFail:"Copy failed",readWidth:"Reading width",widthNarrow:"Narrow",widthMid:"Medium",widthWide:"Wide",exportVault:"Export MD",exportJson:"Export JSON",exporting:"Exporting\u2026",exportedVault:"Vault exported",exportFail:"Export failed",importVault:"Import",importedVault:"Import complete",importedTotal:" / of ",importedTotalTail:"",importedQuarantine:" \xB7 pending review ",importedQuarantineTail:" (quarantined until approved)",importedSkipped:" \xB7 skipped ",importedSkippedTail:" (duplicate or empty)",importFail:"Import failed",location:"Choose location",saveAs:"Save as",saveAsUnsupported:"Choose-save-location not supported here",exportedTo:"Exported to",defaultDownloads:"default Downloads folder",exportCancel:"Export cancelled",manage:"Manage",tabUsage:"Runtime",tabOptimize:"Optimize",adminLoadFail:"Load failed: fully restart dsh-desktop so the host picks up the new /memory-eternal routes",retry:"Retry",mergeSimilar:"Merge similar",trendLabel:"Last 30 days trend",cleanStale:"\u{1F5D1}\uFE0F Clean stale",deletedStale:" stale cards cleaned",newCard:"New",tplDecision:"\u{1F4DD} Decision",tplBug:"\u{1F41B} Bug",tplMeeting:"\u{1F4CB} Meeting",tplWeekly:"\u{1F4CA} Weekly",createCard:"Create",cardTitle:"Title",cardBody:"Body",fbUseful:"Useful",fbIrr:"Irrelevant",todayAdd:"Added today",weekAdd:"Last 7d",byKind:"By kind",todayList:"Captured today",budgetLabel:"Session budget",budgetChars:"Budget chars",recallLimitLabel:"Recall limit",embeddingLabel:"Semantic recall",mergePairs:"Similar pairs (mergeable)",staleCards:"Stale (>90d)",noOptimize:"Nothing to organize, healthy \u{1F389}",refineTitle:"Conflict scan",refineScan:"Scan now",refineHint:"Similar cards can be merged; conflicts must be judged by a human \u2014 the scan is read-only, and data only moves after you choose (keeping one moves the other to the recycle bin, recoverable)",refineIdle:'Hit "Scan now": recall possibly-related card pairs, then let the model classify each as duplicate / complement / conflict / unrelated',refineNone:"No card pairs need your ruling this round \u{1F389}",refineFail:"Conflict scan failed",refineApplied:"Your ruling was recorded (it will not ask again)",refineRel_duplicate:"Duplicate (mergeable)",refineRel_complement:"Complement (keep both)",refineRel_conflict:"Conflict (needs your ruling)",refineRel_unrelated:"Unrelated",refineKeepA:"Keep A",refineKeepB:"Keep B",refineKeepBoth:"Keep both",refineMerge:"Merge",junkTitle:"Injected junk cards",junkScan:"Scan existing",junkHint:"Cards suspected to be captured runtime injections (skill catalogs / system-reminders) \u2014 the scan is read-only and recycling goes to the recycle bin (recoverable)",junkIdle:'Hit "Scan existing": find cards whose body is really injected runtime text with almost no human content left after stripping',junkNone:"No such cards found \u{1F389}",junkRecycle:"Recycle",junkRecycleAll:"Recycle all",junkRecycleAllConfirm:"Send these cards to the recycle bin? (Not a permanent delete \u2014 recoverable from the recycle center)",junkDone:"Sent to recycle bin",junkFail:"Scan / recycle failed",dbReadonlyTitle:"The memory database is currently not writable",dbReadonlyBody:"Card reads/writes, auditing and the graph will fail, but **settings can still be saved** (they do not go through the database)",dbReadonlyFix:"Diagnose with: dsh-memory doctor (journal mode, write probe, backups and recovery steps)",goalTitle:"Same goal, different approach",goalScan:"Scan goals",goalHint:'Clusters by "what problem does this card solve" \u2014 approaches that differ in wording (7z vs tar vs npm slimming) still land together',goalIdle:'Hit "Scan goals": the model first writes a one-line goal per card (first run calls the model, later runs use the cache), then clusters by goal',goalNone:'No clusters of "one goal, several cards" found \u{1F389}',goalStats:"indexed / calls this run",goalCards:"cards",goalKeep:"Keep all",goalMerge:"Merge this group",goalMerged:"Merge submitted (the new card goes to the audit queue)",goalDone:'Recorded as "keep all"',goalFail:"Goal clustering failed",oneClickOptimize:"One-click optimize",oneClickOptimizeConfirm:"Confirm one-click optimize? This will merge all similar pairs (stale cards are NOT deleted by default).",oneClickAlsoStale:"Also clean stale cards",oneClickOptimizeDone:"One-click optimize done",optimizedMerged:"pairs merged",optimizedStaleDeleted:"stale cards cleaned",mcpSetupStatus:"Agent MCP mount status",rerunSetup:"Re-run setup",notInstalled:"not installed",noMcpEntry:"no MCP entry",nodePathMismatch:"node path mismatch, consider re-running setup",nodePathNote:"different node env (usable)",mcpNeedsRepair:"\u26A0 Needs repair (old config launches GUI)",repairMcp:"Repair",healthy:"healthy",mcpSetupHint:'"Auto-mount MCP" = lets Claude Code / Codex / Cursor use the memory vault. On = auto-configures them; Off = never touches your machine config, run dsh-memory setup manually when needed.',mcpManageHint:"Use each agent row to install/uninstall MCP individually",tabConfig:"Memory Config",configPageSub:"Local write, routing, audit and service settings",tabAudit:"Review",statusApproved:"Approved",statusPending:"Pending",statusRejected:"Rejected",allStatus:"All statuses",tabRecycle:"Recycle Bin",recyclePageSub:"Deleted cards stay for 30 days; restore or purge",pending:"Pending",rejected:"Rejected",selectAll:"Select all",approve:"Approve",approveAndCore:"Approve as core",approveCore:"Approve as core memory",approveAsNormal:"Approve as normal card",coreSuggested:"Core memory (pending review)",reclassify:"Reclassify types",reject:"Reject",allAgents:"All agents",noAuditItems:"No items to review",auditBodyFail:"Failed to load the card body",deletedAt:"deleted",restore:"Restore",restoreDelete:"Delete to recycle",purge:"Purge",emptyRecycle:"Recycle bin is empty",recycleHint:"Deleted cards go to the recycle bin \u2014 recover within 30 days, else auto-purged",purgeConfirm:"Permanently delete? This cannot be undone.",recycleDeleteConfirm:"Delete to recycle? Recoverable within 30 days.",modeInit:"Init once",modeInterval:"Interval keep-alive",modeManual:"Manual only",serviceConfig:"Service self-hosting config",auditConfig:"Auto-audit config",auditHint:"Cards matching an exemption go straight in; others await audit",auditMode:"Audit mode",auditAll:"Audit all",auditNone:"Skip all",auditExemptAgents:"Exempt agents",auditExemptKinds:"Exempt kinds",allExempt:"Exempt all",recycleDays:"Recycle retention days",editInSetting:"Edit in DSH Settings \u2192 Memory",pendingSyncNote:'This is the standalone web page: the DSH host applies a save (a current host is woken up and applies it in a request context, so saving takes effect immediately); when no DSH host is running here the change goes straight into the shared config. Only an older host falls back to "queued until it syncs on its own" \u2014 in that case change the same option under DSH Settings \u2192 Memory.',readonlyTitle:"This page is read-only; config cannot be saved here",readonlyBody:"This process has no DSH settings service (settings.update is unavailable). Edit the config in DSH: desktop app \u2192 Settings \u2192 Memory.",readonlyBtn:"Read-only",setupRunInTerminal:"Copy this command to your terminal:",dshMemoryConfig:"DSH Memory Config",coreMemory:"Core memory (always-on)",coreMemoryHint:"Injected into every session; only approved core cards are used",coreMemoryEnabled:"Enable core-memory injection",coreMemoryLimit:"Core-memory limit (cards)",coreMemoryMaxChars:"Core-memory total character limit",setCore:"Set as core memory",unsetCore:"Remove from core memory",coreSetOk:"Set as core memory",coreUnsetOk:"Removed from core memory",coreSetFail:"Failed to update",coreActiveHint:"This card is injected into every session; it wins conflicts with normal memory.",coreInactiveHint:"Any approved knowledge card can be promoted to core memory and applies to every session.",coreNeedApproval:"Approve this card before making it core memory.",coreShort:"Core",setCoreShort:"Set core",uiLayout:"Layout size",uiLayoutHint:"Scale the memory UI only; memory data is unchanged",uiCompact:"Compact",uiNormal:"Normal",uiLarge:"Large",autoCapture:"Auto capture",autoRecall:"Auto recall",captureMinChars:"Min capture chars",maxCardsPerDay:"Daily quota",dedupThreshold:"Dedup threshold",recallLimit:"Recall limit",vaultMulti:"Multiple vaults (per project)",vaultMultiHint:"Empty = single vault; existing setups unaffected",vaultNow:"Active now",vaultSource:"Source",vaultWorkspace:"Current workspace",vaultNamePh:"Name, e.g. work",vaultPathPh:"Directory, e.g. D:/vaults/work",vaultMatchPh:"Project dir (optional, auto-select by workspace)",vaultAdd:"Add a vault",vaultActive:"Active vault",vaultActiveNone:"Default vault (unset)",vaultSrcEnv:"env MEMORY_VAULT_DIR",vaultSrcProfile:"activeVault profile",vaultSrcWorkspace:"matched by project dir",vaultSrcVaultDir:"vaultDir setting",vaultSrcDefault:"default directory",fbNav:"Report a bug",fbTitle:"Report a bug (files on GitHub)",fbDesc:"Describe the problem (symptoms / steps / expected)",fbDiag:"Diagnostics (auto-redacted: home dir and keys/tokens replaced)",fbCopyDiag:"Copy diagnostics",fbOpenIssue:"Open prefilled issue on GitHub",fbCopyPrompt:"Copy AI prompt",fbCopiedDiag:"Diagnostics copied",fbCopiedPrompt:"Prompt copied \u2014 paste it into your AI chat",fbCopyFail:"Copy failed; please select and copy manually",fbWhy:"GitHub does not allow anonymous issue creation and the plugin must not ship a token: so the title, body and diagnostics are pre-filled \u2014 you just click Submit.",fbNeedDesc:"Please describe the problem first",fbLoading:"Collecting diagnostics\u2026",fbDiagFail:"Diagnostics endpoint unavailable (standalone web or older host); please add environment info manually",fbOr:"or",fbSelectAll:"Select all",auditTypeLabel:"Type",auditInboxSub:"Captured cards land here \xB7 approve to publish",auditSearchPlaceholder:"Search title, tag or path\u2026",auditNoMatch:"No matching review cards",auditUndo:"Approve and reject are both undoable",auditSelected:"Selected",auditRevision:"Revision",auditRevisionFrom:"Revises",auditClearSelection:"Clear",preview:"Preview",supportGroup:"Community",supportGroupQQ:"QQ group",supportGroupWechat:"WeChat group",supportSponsor:"Sponsor",supportLegacy:"Legacy app",supportTitle:"Support & community",clickToZoom:"Click to enlarge",supportGroupHint:"Scan to join the QQ or WeChat community; ask questions directly.",supportSponsorHint:"If this plugin saved you time, you can buy the author a coffee. Completely optional.",supportLegacyTitle:"Legacy app (dsh-desktop) is discontinued",supportLegacyBody:"The author\u2019s dsh-desktop is discontinued; the official DeepSeek Harness desktop build covers the same capabilities. If an old profile still pins the withdrawn dsh-desktop-shell@0.3.0, remove that dependency or pnpm install will fail.",supportReadme:"Open README",supportReleases:"Releases",supportFeedback:"Report a bug",supportReplay:"Replay onboarding",onboardTitle:"30 seconds with memory-eternal",onboardSub:"After every conversation, the AI distills knowledge cards. Review first, keep the good ones.",onboardSkip:"Skip",onboardBack:"Back",onboardNext:"Next",onboardStart:"Start using",onboardStep0Title:"Star the project on GitHub first",onboardStep0Body:"A Star is the most direct signal to keep maintaining it; Fork it if you want to modify or self-host.",onboardStar:"Star",onboardFork:"Fork",onboardStarred:"Starred, continue",onboardStarHint:"You can always come back via \u2605 Star in the top bar.",onboardStep1Title:"Auto-capture, no manual notes",onboardStep1Body:"When a session ends, decisions, root causes and lessons become a card. Capture first, review second.",onboardStep2Title:"Found a useful card? Tap \u{1F44D}",onboardStep2Body:"Open any card and tap \u{1F44D} useful / \u{1F44E} not useful. No search needed: the buttons are always there. It helps recall ranking.",onboardStep3Title:"New support entries",onboardStep3Body:"Community, sponsor, legacy app and bug report live at the bottom of the left rail. No need to dig through the README.",onboardTip:"Tip: reopen this guide from Support & community.",navWorkspace:"Workspace",navSystem:"System",navSupport:"Support",v5Local:"Local",v5Star:"Star on GitHub",runtimeTitle:"Runtime status",runtimeSub:"Vault, backups, capture and version",dbTitle:"Vault",backupTitle:"Backups",captureTitle:"Auto capture",versionTitle:"Version",cardsUnit:"cards",links:"links",todayReview:"Today's resurface",openArrow:"Open \u2192",reshuffle:"Another",insightDecision:"Decision",insightRoot:"Root cause",insightLesson:"Lesson",insightSummary:"Summary",pinCard:"Pin this card",unpinCard:"Unpin",pinnedOnly:"Pinned",toastApproved:"approved",toastRejected:"rejected",toastCardDeleted:"deleted",toastRestored:"restored",toastPurged:"permanently deleted",toastPurgedExpired:"expired recycle entries purged",toastFailed:"Action failed",noSelection:"Select the cards to act on first",enabledLabel:"Enable memory core",vaultDirLabel:"Vault directory (single)",captureCooldownMs:"Capture cooldown (ms)",captureProvider:"Distill provider (auto if empty)",routeAuto:"Auto (registration order)",routeListFail:"Could not load the model list ({err}) \u2014 you can type provider / model below; the desktop popup proxies this to the host, so if it still fails open the settings from DSH",captureFollowSession:"Follow current session (distill with the session provider/model)",captureFirstOnly:"First candidate only (stop on failure, no fallback)",llmTest:"Test distill route",llmTestOk:"\u2713 Call succeeded",llmTestFail:"\u2717 Call failed",llmCandidates:"candidates",captureModel:"Distill model (auto if empty)",recallEmbedding:"Semantic recall provider (optional)",sessionBudgetChars:"Session budget (chars)",saving:"Saving\u2026",savePending:"Saved to the config file; the host half is still the old build, so restart DSH to make it effective (already applied in this panel)",saveInvalid:"Some field values are invalid; nothing was submitted",invalidField:'"{field}" must be a number between {min} and {max} (now: {value})',actionRunning:"Working\u2026",recycleEmptyHint:"Recycle bin is empty: deleted cards land here first and are purged automatically after {days} days.",recyclePurgeAll:"Empty recycle bin",fbCopyManual:"Auto-copy was blocked by the browser \u2014 the text is below: click Select all, then Ctrl+C",vcLoaded:"running (process serving this page)",vcResident:"resident instance",vcOnDisk:"on disk",vcLatest:"npm latest",vcStale:'v{disk} is installed on disk but the process serving this page still has v{loaded} loaded \u2014 click "Restart resident instance" to restart it on the new code (no DSH restart needed)',vcRestart:"Restart resident instance",vcRestarting:"Restarting\u2026",vcRestartSent:"Resident restart scheduled: the new process takes over in ~3-8s \u2014 refresh the page (Ctrl+F5) shortly",vcRestartCurrent:"The resident instance is already up to date \u2014 no restart needed",vcRestartAnyway:"Resident is already v{ver}; usually no restart needed \u2014 use this if it looks stuck",vcHostProcessStale:"Disk has v{disk}, but **the process serving this page** (the DSH host) still loads v{loaded} \u2014 that code was loaded when the host started, so **restarting the resident instance does not change this page**: fully quit and reopen DSH.",vcRestartFixes:"Restarts the resident instance (the process on the port) onto v{disk} (currently v{served}) without restarting DSH",vcRestartStart:"Starts the resident instance on the current disk version v{disk} (no DSH restart needed)",vcRestartRepair:"Re-registers it under a watchdog and keeps it alive (already v{disk}; no DSH restart needed)",vcRestartHostOnly:"The resident instance is already v{disk}; this page shows v{loaded} from the DSH host \u2014 restarting the resident does not affect it, please restart DSH",vcRestartFail:"Restart request failed",vcRestartNoRoute:"The process serving this page is still the old build (no such endpoint): restart the desktop app / DSH and retry, or run {cmd}",vcHostStale:'The "running" chip above comes from the process serving this page; the resident instance is already current \u2014 restart the desktop app / DSH to refresh that chip',vcResidentDownShort:"not running",vcResidentDown:"The resident instance is not running (no response on port {port}) \u2014 use the button below to bring it up on the new code; if that fails run {cmd} and share the output of dsh-memory status",vcResidentUnmanagedShort:"unmanaged",vcResidentUnmanaged:"The resident instance serves v{served} but has **no watchdog keeping it alive** (an orphan left by a stop or a hard kill) \u2014 use the button below to put it back under management (a fresh watchdog plus a new instance), or run {cmd}",vcResidentLockUnknownShort:"management unknown",vcResidentReplaceBlockedShort:"cannot replace",vcResidentHostManagedShort:"host-managed",vcResidentReplaceBlocked:'The resident instance **cannot be replaced** (environment limit): the watchdog lock directory is not writable ({err}; {path}) \u2192 the port will stay on v{served} **long-term**. This is not "temporarily behind": automatic replacement is refused on purpose to avoid leaving an orphan. Way out: fix that directory permissions and run {cmd}, or run dsh-memory watchdog --port 7999 in the foreground',vcResidentLockUnknown:'The resident instance serves v{served}, but the **watchdog lock file cannot be written** (restricted environment: sandbox, ACLs, non-system drive) \u2192 whether it is managed cannot be determined (this is not "unmanaged"). Cause: {err} ({path}). Keep-alive usually still works; the button below can put it back under management on the new code.',vcPage:"Page script",vcPageStale:"\u26A0 This page is still running an older script (page v{page} / disk v{disk}): press Ctrl+F5 to refresh. If the running version is still old, restart the desktop app / DSH as well",vcOutdated:"update available",vcUpToDate:"up to date",vcCheck:"Check for updates",checking:"Checking\u2026",vcCheckFail:"Update check failed",recallSummaryLen:"Recall summary len",recallBody:"Recall with body",secretHint:"Credential hint (injected into every session)",autoWeb:"Web server",autoWebMode:"Keep-alive mode",webPort:"Web port",webCheckIntervalMs:"Probe interval (ms)",webMaxRestart:"Max restart",watchdogAutoSpawn:"Watchdog process",autoRestartOnDrift:"Auto-restart resident on version drift",autoMcpSetup:"Auto-mount MCP",saveConfig:"Save config",saveFail:"Save failed",savedOk:"Saved",savedDirect:"No DSH host is running here, so the change went straight into the shared config (hooks / MCP / the standalone page pick it up immediately)",savedApplied:"Saved and applied (the host applied it in a request context)",saveQueued:"Handed to the DSH host for sync \u2014 not confirmed applied yet",saveHostGuard:"This host does not let a plugin write config from its own callback context; change the same option under DSH Settings \u2192 Memory, or edit the profile patch layer",saveFailHint:"the host did not apply it \u2014 see Diagnostics under Report a bug",recallTool:"recall tool",costControl:"Cost control",costHint:"save tokens, control LLM usage",distillEnabled:"Distill cards (on=LLM compress, off=raw cards zero LLM)",dedupByLLM:"Dedup feeds LLM (off=pure lexical, cheaper)",captureMaxTokens:"Distill output cap (tokens)",captureTimeoutMs:"Distill timeout (ms; use 120000+ for cold local models)",recallMinScore:"Recall min score (higher = cheaper)",configNeedsDsh:"Edit config inside DSH (this page may be read-only or partially missing)",installMcp:"Install MCP",uninstallMcp:"Uninstall MCP",uninstallConfirm:"Confirm uninstall MCP for this agent? Claude Code/Codex will lose access to the memory vault.",presetConfig:"One-click preset config",presetHint:"Click to fill a plan, then hit Save",planApplied:'Filled "{plan}" \u2014 hit "Save config" to apply',planDescA:"Personal dev \xB7 distill 4000 \xB7 watchdog off",planDescB:"Budget \xB7 no distill \xB7 ~zero cost",planDescC:"Long projects \xB7 watchdog on \xB7 high quality",cfgSubCore:"Capture / recall / vault dir and dedup strategy",cfgSubMulti:"Per-project vaults; CLI / MCP / hooks follow the active one",cfgSubCost:"Control LLM calls and recall size \u2014 this is your bill",cfgSubAudit:"What must be reviewed before entering the main vault",cfgSubService:"Keep-alive, watchdog and version self-heal \u2014 defaults are fine",cfgDirty:"Unsaved changes",cfgClean:"Synced",unitChars:"chars",unitPerDay:"cards / day",unitTokens:"tokens",unitMs:"ms",unitTimes:"times",unitDays:"days",mcpAutoHint:"Auto-detects installed agents and their MCP configs (read-only probe)",mcpRefresh:"Re-scan",mcpSummary:"{agents} agents \xB7 {servers} MCP servers \xB7 {mounted} mounting this plugin",mcpNoServers:"No MCP configured",mcpDetectedOnly:"detected only",planA:"A Light",planB:"B Budget",planC:"C Premium",pluginInfo:"Plugin info",organizeTitle:"Organize",scanAndOrganize:"Scan & organize",scanHint:'Click "\u{1F50D} Scan & organize" to find similar/stale cards, then "\u26A1 One-click optimize" to run.',mergeNow:"Merge",delete:"Delete",captureAlert:"Auto-capture failed",captureAlertHint:'Open "Usage / Today" for the capture log; if the cause is an API/version mismatch, update the memory-eternal plugin.',captureLog:"Auto-capture log",captureLogHint:"Runs after every turn: listen \u2192 judge \u2192 write. Last 100 entries, so you can see why a card was not written.",captureLogEmpty:"No entries yet. Chat one turn (> min capture chars) and come back.",healthTitle:"Health",healthHint:"Database / backups / capture / versions \u2014 spot anything that broke silently",healthDb:"Database",healthDbBad:"database is unwritable or corrupt",healthBackups:"Backups",healthNoBackups:"no backups yet (run dsh-memory doctor; the host also backs up daily)",healthBackupAge:"{n} files \xB7 newest {d} day(s) ago",healthBackupToday:"{n} files \xB7 newest today",healthCapture:"Auto capture",healthNoRecords:"no records yet (capture has not run)",healthCapOk:"last capture wrote a card",healthCapFail:"last capture failed",healthRunAlign:"run Version alignment check to show",healthVersion:"Versions",ledgerTitle:"Memory ledger (last 7 days)",ledgerHint:'How much recall injected and how many distillation calls ran \u2014 the first data point for the "does it save tokens?" question',ledgerRecalls:"Recalls",ledgerInjected:"injected",ledgerChars:"chars",ledgerCaptures:"Captures",ledgerLlmCalls:"LLM calls",ledgerEstimate:"Est. tokens",ledgerEstimateHint:"rough estimate at ~2 chars per token; order of magnitude only",ledgerUseful:"Recall usefulness",ledgerUsefulHint:"from useful / not-useful feedback; below 60% means injection may cost more than it saves",ledgerFormula:"Net benefit \u2248 avoided context cost \u2212 (injected chars + distillation calls \xD7 price). The ledger only records what we spent; weigh it against the re-reads and rework you actually avoided.",ledgerNoData:"No entries in the last 7 days: chat a few turns or let the agent recall once, then come back.",ledgerNeedRestart:"The host is still running the old API (/ledger missing): fully quit and reopen DSH to start recording.",alignTitle:"Version alignment check",alignRun:"Check now",alignFix:"Rewrite wiring",alignFixConfirm:"Rewrite the MCP / hooks wiring? (Only the plugin's own keys are touched; your data and config stay as they are)",alignFixed:"Wiring rewritten; if it still reports an old host process, you must fully quit and reopen DSH",alignFail:"Alignment check failed",alignHint:"Upgrading the plugin only replaces files on disk \u2014 the host's in-memory event subscriptions and stale paths inside MCP / hooks do not update themselves; this checks all of it at once",alignIdle:'Hit "Check now": compare the host / resident / npm versions and look for stale paths and arguments in MCP and hooks',alignDisk:"disk",alignResident:"resident",alignHost:"host process",captureLogUnavailable:"Log is available only inside the DSH host (the standalone web page has no host runtime).",captureAgentCards:"Cards auto-captured by the agent",noCards:"none",loadMore:"Load more",batchMerge:"Smart batch merge",mergeAllConfirm:"Merge similar-grouped cards into one each (keep kind), delete originals?",crossVault:"All vaults",deleteConfirm:"Delete this memory card? This cannot be undone.",editCard:"Edit",editHint:"Only title / tags / body are editable. Status and kind still flow through audit and system rules \u2014 manual edits never bypass review.",editTitle:"Title",editTags:"Tags (comma separated)",editTagsHint:"e.g. memory, recall, performance",editBody:"Body (Markdown)",editSave:"Save",editSaving:"Saving\u2026",editCancel:"Cancel",editSaved:"Saved",editFail:"Save failed",editTitleEmpty:"Title cannot be empty",editBodyEmpty:"Body cannot be empty",deleted:"Deleted",deleteFail:"Delete failed",deleteSelected:"Delete selected",deletedSelected:" cards deleted",merge:"Merge",mergeNeed:"Select at least 2 cards",mergeConfirm:"Merge the selected cards into one and delete the originals?",merged:"Merged",mergeFail:"Merge failed",mcpInstalled:"\u2705 {agent} MCP installed",mcpUninstalled:"\u2705 {agent} MCP uninstalled",mcpActionFail:"\u274C {agent} MCP action failed: {error}",dshHostLabel:"DeepSeek Harness (current host)",restartHint:"Saved. autoWebMode/watchdogAutoSpawn take effect after restarting DSH; a resident watchdog is never stopped automatically \u2014 use dsh-memory stop / restart (#19)",conflictRefresh:"Config changed elsewhere \u2014 refresh and retry",untitled:"Untitled",tplBlank:"\u{1F4C4} Blank",tagsHint:"Tags (comma-separated)",connCount:"{n} connections",tplDecisionTags:"decision, plan",tplBugTags:"pitfall, lesson",tplMeetingTags:"meeting, minutes",tplWeeklyTags:"weekly report",tplDecisionBody:`# Tech decision: [title]
62
+ - `},On={nav:"Memory",loading:"Loading\u2026",loadingGraph:"Loading knowledge graph\u2026",refresh:"Refresh",overview:"Memory Overview",total:"Cards",recent:"Added (7d)",tags:"Tags",searchPlaceholder:"Search memory\u2026",search:"Search",all:"All",kindProject:"Projects",kindKnowledge:"Knowledge",kindContent:"Content",kindPrompt:"Prompts",kindBusiness:"Business",kindTool:"Tools",kindMistake:"Mistakes",kindCore:"Core memory",kindSkill:"Skills",newsTab:"News",newsTitle:"News",newsHint:"Your own updates, decisions and team briefs, kept separate from memory cards.",newsNew:"Write one",newsSearch:"Search title / body / tags\u2026",newsUnreadOnly:"Unread only",newsEmpty:"No news yet. Write the first update, decision or team brief here.",newsNoMatch:"No matching news",newsPinned:"Pinned",newsRead:"Read",newsUnread:"Unread",newsMarkRead:"Mark read",newsMarkUnread:"Mark unread",newsEdit:"Edit",newsDeleteConfirm:"Delete this news item?",newsDeleted:"Deleted",newsSave:"Save",newsSaving:"Saving\u2026",newsSaved:"Saved",newsSaveFail:"Save failed",newsTitleField:"Title",newsBodyField:"Body (Markdown)",newsCategoryField:"Category",newsSourceField:"Source",newsUrlField:"URL",newsTagsField:"Tags (comma separated)",newsDateField:"Date",newsPinField:"Pin to top",newsPreview:"Preview",newsEditBody:"Edit body",newsOpenLink:"Open link",newsToday:"Today",newsYesterday:"Yesterday",newsEarlier:"Earlier",newsTitlePlaceholder:"e.g. v0.20.0 release notes",newsBodyPlaceholder:"Write something worth keeping\u2026 Markdown supported",newsCountUnit:"items",cancel:"Cancel",newsDaily:"Daily AI",newsMonthly:"Monthly top",newsMine:"My updates",newsDailySub:"Latest AI news, aggregated by source",newsMonthlySub:"This month's AI discussion ranking (Hacker News points)",newsMineSub:"Your own releases, decisions and team briefs",newsLoading:"Fetching news\u2026",newsFeedError:"News sources are unavailable",newsHeat:"heat",newsComments:"comments",newsOriginal:"Read original",newsUpdatedAt:"Updated",newsPartialFail:"Some sources failed",newsFeedEmpty:"No news fetched today. Try refresh.",newsFeedRefresh:"Refresh news",newsLoadingHint:"First load fetches several Chinese sources; this can take a few seconds.",newsRetry:"Retry",newsSearchGo:"Search",newsFollow:"Follow",newsFollowPreview:"Here is what I understood \u2014 follow it?",newsFollowConfirm:"Start following",newsFollowAdded:"Following",newsFollowExists:"Already following",newsFollowRemoved:"Unfollowed",newsFollowFail:"Follow failed",newsFollowNoQuery:"Type a topic first",newsFollowDomains:"Search in these sources",newsFollowEmpty:'No topics followed yet. Search for something, then hit "Follow".',newsIntentHint:'That looks like an instruction \u2014 hit "\uFF0B Follow" to keep pulling it from the right sources; the list below is no longer filtered literally.',newsFollowing:"From your follows",newsDigest:"Follow digest push",newsDigestHint:"When on, the host refreshes your news follows on an interval and lets the agent surface NEW items on the next turn. Off by default.",newsDigestEnabled:"Enable push",newsDigestInterval:"Interval (minutes)",newsDigestMaxItems:"Max items per digest",newsDigestNow:"Generate & preview now",newsDigestNowHint:"Try it before enabling \u2014 see exactly what would be pushed.",newsDigestBuilding:"Generating\u2026",newsDigestDone:"Digest generated",newsDigestEmpty:"No new items from your follows",newsDigestFail:"Failed to generate digest",newsSortRec:"For you",newsSortTime:"Latest",newsPersonalized:"Ordered by your taste",newsLastQuery:"Last search",newsResetPrefs:"Reset taste",newsHeroEye:"NEWSROOM \xB7 AI FEED",newsHeroHint:"One search is remembered \u2014 the next visit is ordered by your taste. Data is fetched once per page open.",newsMatched:"hits",newsNoMatch:"No matching news",newsNoMatchHint:"Nothing in this dataset matches the current keyword, category and language. Clear the filters to see everything.",newsClearFilters:"Clear filters",newsJustNow:"just now",newsMinutesAgo:"min ago",newsHoursAgo:"h ago",newsDaysAgo:"d ago",newsLangZh:"\u4E2D\u6587",newsLangEn:"English",newsLangAll:"All",newsZhArchive:"Chinese monthly archive by date (no public heat score)",newsEnRanking:"English monthly ranking by Hacker News points",skillCards:"Skill cards",skillCardsHint:"Generated from the skills actually installed/available on this machine; always reviewed. Never deposited by agent chat.",skillAutoSync:"Auto-sync skill cards",syncSkills:"Sync skills",syncingSkills:"Syncing skills\u2026",skillsSyncDone:"Skill cards synced",skillsScanned:"scanned",skillsCreated:"created",skillsUpdated:"updated",skillsPendingUpdates:"pending updates",skillsSyncFail:"Skill sync failed",cardsTab:"Cards",webTab:"Web version",webOpening:"Opening the web version in your browser\u2026",webOpened:"Opened the web version in your browser",webOpenFail:"Could not open a browser; visit this URL manually",terminalTab:"Terminal",terminalTitle:"Full terminal UI",terminalIntro:"The Web UI does not render the native terminal TUI. For select-all, batch review and long-form scrolling, open a local terminal or use /audit inside dsh-tui.",terminalRun:"Read-only live queue",terminalTui:"Write mode (real review)",terminalWhy:"Why not embed it in the page",terminalWhyBody:"The terminal TUI relies on the alternate screen, raw key events and a character grid; an iframe cannot reproduce it faithfully. These are the real commands.",terminalCopy:"Copy command",terminalCopied:"Copied",terminalPreview:"Terminal preview",graphTab:"Star map",graph:"Knowledge Graph",graphHint:"Nodes = cards; edges = [[links]] or shared tags. Click a node to read.",graphTip:"Left-click highlights \xB7 Shift+drag box-select \xB7 right-click menu \xB7 scroll zoom \xB7 drag to pan",graphWarming:"Laying out {n} nodes\u2026",graphAllCrumb:"All",graphOther:"Other",graphItems:"items",graphCardsUnit:"cards",graphPlanetCards:"{n} cards",graphEnter:"Open this level",graphLevelLoading:"Loading level\u2026",graphLevelTimeout:"Level load timed out ({ms}ms) \xB7 current level kept",graphLevelError:"Level load failed \xB7 current level kept",graphRetry:"Retry",graphEmptyLevel:"No cards in this level.",graphLevelHint:"Click a planet to enter \xB7 Shift+click to select \xB7 drag to move \xB7 scroll to zoom",graphBreadcrumbAria:"Level breadcrumb",graphCountWan:"K",graphCountLocale:"en-US",rebuild:"Rebuild",reset:"Reset",expandAll:"Expand all",capped:"Showing the",clearFocus:"Clear highlight",empty:"Memory is empty. After a few conversations, valuable content is auto-captured.",emptyGraph:"No graph data yet.",open:"Read",updated:"Updated",created:"Created",source:"Source",contents:"Contents",related:"Related",file:"File",close:"Close",vaultDir:"Vault directory",capture:"Auto capture",recall:"Auto recall",enabled:"on",disabled:"off",error:"Load failed",back:"Back to list",cardCount:"cards",nodes:"nodes",edges:"edges",memoryTitle:"Memory Library",memoryHint:"Your local second brain",zoomIn:"Zoom in",zoomOut:"Zoom out",fit:"Fit",enterFullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",exportGraph:"Export",openCard:"Open card",focusNeighbors:"Highlight links",copyName:"Copy name",noMatch:"No matching memory",clearFilter:"Clear filter",filterLabel:"Filter",sortRecent:"Recent",sortTitle:"Title",sortHot:"Hot",exportSel:"Export selected",clearSelection:"Clear selection",download:"Download",openNewTab:"Open in new tab",copyImage:"Copy image",done:"Done",downloaded:"Download started",openedTab:"Opened in new tab",copied:"Copied",exportedSel:" nodes exported",fullscreen:"Fullscreen",exitFull:"Exit fullscreen",copyFail:"Copy failed",timeDim:"Time",timeNew:"\u22643 days",timeRecent:"\u22642 weeks",timeMonth:"\u22641 month",timeOld:"Older",newBadge:"NEW",expand:"Expand",collapse:"Collapse",copyBody:"Copy body",clearFilter:"Clear tag filter",copyPath:"Copy path",copied:"Copied",copyFail:"Copy failed",readWidth:"Reading width",widthNarrow:"Narrow",widthMid:"Medium",widthWide:"Wide",exportVault:"Export MD",exportJson:"Export JSON",exporting:"Exporting\u2026",exportedVault:"Vault exported",exportFail:"Export failed",importVault:"Import",importedVault:"Import complete",importedTotal:" / of ",importedTotalTail:"",importedQuarantine:" \xB7 pending review ",importedQuarantineTail:" (quarantined until approved)",importedSkipped:" \xB7 skipped ",importedSkippedTail:" (duplicate or empty)",importFail:"Import failed",location:"Choose location",saveAs:"Save as",saveAsUnsupported:"Choose-save-location not supported here",exportedTo:"Exported to",defaultDownloads:"default Downloads folder",exportCancel:"Export cancelled",manage:"Manage",tabUsage:"Runtime",tabOptimize:"Optimize",adminLoadFail:"Load failed: fully restart dsh-desktop so the host picks up the new /memory-eternal routes",retry:"Retry",mergeSimilar:"Merge similar",trendLabel:"Last 30 days trend",cleanStale:"\u{1F5D1}\uFE0F Clean stale",deletedStale:" stale cards cleaned",newCard:"New",tplDecision:"\u{1F4DD} Decision",tplBug:"\u{1F41B} Bug",tplMeeting:"\u{1F4CB} Meeting",tplWeekly:"\u{1F4CA} Weekly",createCard:"Create",cardTitle:"Title",cardBody:"Body",fbUseful:"Useful",fbIrr:"Irrelevant",todayAdd:"Added today",weekAdd:"Last 7d",byKind:"By kind",todayList:"Captured today",budgetLabel:"Session budget",budgetChars:"Budget chars",recallLimitLabel:"Recall limit",embeddingLabel:"Semantic recall",mergePairs:"Similar pairs (mergeable)",staleCards:"Stale (>90d)",noOptimize:"Nothing to organize, healthy \u{1F389}",refineTitle:"Conflict scan",refineScan:"Scan now",refineHint:"Similar cards can be merged; conflicts must be judged by a human \u2014 the scan is read-only, and data only moves after you choose (keeping one moves the other to the recycle bin, recoverable)",refineIdle:'Hit "Scan now": recall possibly-related card pairs, then let the model classify each as duplicate / complement / conflict / unrelated',refineNone:"No card pairs need your ruling this round \u{1F389}",refineFail:"Conflict scan failed",refineApplied:"Your ruling was recorded (it will not ask again)",refineRel_duplicate:"Duplicate (mergeable)",refineRel_complement:"Complement (keep both)",refineRel_conflict:"Conflict (needs your ruling)",refineRel_unrelated:"Unrelated",refineKeepA:"Keep A",refineKeepB:"Keep B",refineKeepBoth:"Keep both",refineMerge:"Merge",junkTitle:"Injected junk cards",junkScan:"Scan existing",junkHint:"Cards suspected to be captured runtime injections (skill catalogs / system-reminders) \u2014 the scan is read-only and recycling goes to the recycle bin (recoverable)",junkIdle:'Hit "Scan existing": find cards whose body is really injected runtime text with almost no human content left after stripping',junkNone:"No such cards found \u{1F389}",junkRecycle:"Recycle",junkRecycleAll:"Recycle all",junkRecycleAllConfirm:"Send these cards to the recycle bin? (Not a permanent delete \u2014 recoverable from the recycle center)",junkDone:"Sent to recycle bin",junkFail:"Scan / recycle failed",dbReadonlyTitle:"The memory database is currently not writable",dbReadonlyBody:"Card reads/writes, auditing and the graph will fail, but **settings can still be saved** (they do not go through the database)",dbReadonlyFix:"Diagnose with: dsh-memory doctor (journal mode, write probe, backups and recovery steps)",goalTitle:"Same goal, different approach",goalScan:"Scan goals",goalHint:'Clusters by "what problem does this card solve" \u2014 approaches that differ in wording (7z vs tar vs npm slimming) still land together',goalIdle:'Hit "Scan goals": the model first writes a one-line goal per card (first run calls the model, later runs use the cache), then clusters by goal',goalNone:'No clusters of "one goal, several cards" found \u{1F389}',goalStats:"indexed / calls this run",goalCards:"cards",goalKeep:"Keep all",goalMerge:"Merge this group",goalMerged:"Merge submitted (the new card goes to the audit queue)",goalDone:'Recorded as "keep all"',goalFail:"Goal clustering failed",oneClickOptimize:"One-click optimize",oneClickOptimizeConfirm:"Confirm one-click optimize? This will merge all similar pairs (stale cards are NOT deleted by default).",oneClickAlsoStale:"Also clean stale cards",oneClickOptimizeDone:"One-click optimize done",optimizedMerged:"pairs merged",optimizedStaleDeleted:"stale cards cleaned",mcpSetupStatus:"Agent MCP mount status",rerunSetup:"Re-run setup",notInstalled:"not installed",noMcpEntry:"no MCP entry",nodePathMismatch:"node path mismatch, consider re-running setup",nodePathNote:"different node env (usable)",mcpNeedsRepair:"\u26A0 Needs repair (old config launches GUI)",repairMcp:"Repair",healthy:"healthy",mcpSetupHint:'"Auto-mount MCP" = lets Claude Code / Codex / Cursor use the memory vault. On = auto-configures them; Off = never touches your machine config, run dsh-memory setup manually when needed.',mcpManageHint:"Use each agent row to install/uninstall MCP individually",tabConfig:"Memory Config",configPageSub:"Local write, routing, audit and service settings",tabAudit:"Review",statusApproved:"Approved",statusPending:"Pending",statusRejected:"Rejected",allStatus:"All statuses",tabRecycle:"Recycle Bin",recyclePageSub:"Deleted cards stay for 30 days; restore or purge",pending:"Pending",rejected:"Rejected",selectAll:"Select all",approve:"Approve",approveAndCore:"Approve as core",approveCore:"Approve as core memory",approveAsNormal:"Approve as normal card",coreSuggested:"Core memory (pending review)",reclassify:"Reclassify types",reject:"Reject",allAgents:"All agents",noAuditItems:"No items to review",auditBodyFail:"Failed to load the card body",deletedAt:"deleted",restore:"Restore",restoreDelete:"Delete to recycle",purge:"Purge",emptyRecycle:"Recycle bin is empty",recycleHint:"Deleted cards go to the recycle bin \u2014 recover within 30 days, else auto-purged",purgeConfirm:"Permanently delete? This cannot be undone.",recycleDeleteConfirm:"Delete to recycle? Recoverable within 30 days.",modeInit:"Init once",modeInterval:"Interval keep-alive",modeManual:"Manual only",serviceConfig:"Service self-hosting config",auditConfig:"Auto-audit config",auditHint:"Cards matching an exemption go straight in; others await audit",auditMode:"Audit mode",auditAll:"Audit all",auditNone:"Skip all",auditExemptAgents:"Exempt agents",auditExemptKinds:"Exempt kinds",allExempt:"Exempt all",recycleDays:"Recycle retention days",editInSetting:"Edit in DSH Settings \u2192 Memory",pendingSyncNote:'This is the standalone web page: the DSH host applies a save (a current host is woken up and applies it in a request context, so saving takes effect immediately); when no DSH host is running here the change goes straight into the shared config. Only an older host falls back to "queued until it syncs on its own" \u2014 in that case change the same option under DSH Settings \u2192 Memory.',readonlyTitle:"This page is read-only; config cannot be saved here",readonlyBody:"This process has no DSH settings service (settings.update is unavailable). Edit the config in DSH: desktop app \u2192 Settings \u2192 Memory.",readonlyBtn:"Read-only",setupRunInTerminal:"Copy this command to your terminal:",dshMemoryConfig:"DSH Memory Config",coreMemory:"Core memory (always-on)",coreMemoryHint:"Injected into every session; only approved core cards are used",coreMemoryEnabled:"Enable core-memory injection",coreMemoryLimit:"Core-memory limit (cards)",coreMemoryMaxChars:"Core-memory total character limit",setCore:"Set as core memory",unsetCore:"Remove from core memory",coreSetOk:"Set as core memory",coreUnsetOk:"Removed from core memory",coreSetFail:"Failed to update",coreActiveHint:"This card is injected into every session; it wins conflicts with normal memory.",coreInactiveHint:"Any approved knowledge card can be promoted to core memory and applies to every session.",coreNeedApproval:"Approve this card before making it core memory.",coreShort:"Core",setCoreShort:"Set core",uiLayout:"Layout size",uiLayoutHint:"Scale the memory UI only; memory data is unchanged",uiCompact:"Compact",uiNormal:"Normal",uiLarge:"Large",autoCapture:"Auto capture",autoRecall:"Auto recall",captureMinChars:"Min capture chars",maxCardsPerDay:"Daily quota",dedupThreshold:"Dedup threshold",recallLimit:"Recall limit",vaultMulti:"Multiple vaults (per project)",vaultMultiHint:"Empty = single vault; existing setups unaffected",vaultNow:"Active now",vaultSource:"Source",vaultWorkspace:"Current workspace",vaultNamePh:"Name, e.g. work",vaultPathPh:"Directory, e.g. D:/vaults/work",vaultMatchPh:"Project dir (optional, auto-select by workspace)",vaultAdd:"Add a vault",vaultActive:"Active vault",vaultActiveNone:"Default vault (unset)",vaultSrcEnv:"env MEMORY_VAULT_DIR",vaultSrcProfile:"activeVault profile",vaultSrcWorkspace:"matched by project dir",vaultSrcVaultDir:"vaultDir setting",vaultSrcDefault:"default directory",fbNav:"Report a bug",fbTitle:"Report a bug (files on GitHub)",fbDesc:"Describe the problem (symptoms / steps / expected)",fbDiag:"Diagnostics (auto-redacted: home dir and keys/tokens replaced)",fbCopyDiag:"Copy diagnostics",fbOpenIssue:"Open prefilled issue on GitHub",fbCopyPrompt:"Copy AI prompt",fbCopiedDiag:"Diagnostics copied",fbCopiedPrompt:"Prompt copied \u2014 paste it into your AI chat",fbCopyFail:"Copy failed; please select and copy manually",fbWhy:"GitHub does not allow anonymous issue creation and the plugin must not ship a token: so the title, body and diagnostics are pre-filled \u2014 you just click Submit.",fbNeedDesc:"Please describe the problem first",fbLoading:"Collecting diagnostics\u2026",fbDiagFail:"Diagnostics endpoint unavailable (standalone web or older host); please add environment info manually",fbOr:"or",fbSelectAll:"Select all",auditTypeLabel:"Type",auditInboxSub:"Captured cards land here \xB7 approve to publish",auditSearchPlaceholder:"Search title, tag or path\u2026",auditNoMatch:"No matching review cards",auditUndo:"Approve and reject are both undoable",auditSelected:"Selected",auditRevision:"Revision",auditRevisionFrom:"Revises",auditClearSelection:"Clear",preview:"Preview",supportGroup:"Community",supportGroupQQ:"QQ group",supportGroupWechat:"WeChat group",supportSponsor:"Sponsor",supportLegacy:"Legacy app",supportTitle:"Support & community",clickToZoom:"Click to enlarge",supportGroupHint:"Scan to join the QQ or WeChat community; ask questions directly.",supportSponsorHint:"If this plugin saved you time, you can buy the author a coffee. Completely optional.",supportLegacyTitle:"Legacy app (dsh-desktop) is discontinued",supportLegacyBody:"The author\u2019s dsh-desktop is discontinued; the official DeepSeek Harness desktop build covers the same capabilities. If an old profile still pins the withdrawn dsh-desktop-shell@0.3.0, remove that dependency or pnpm install will fail.",supportReadme:"Open README",supportReleases:"Releases",supportFeedback:"Report a bug",supportReplay:"Replay onboarding",onboardTitle:"30 seconds with memory-eternal",onboardSub:"After every conversation, the AI distills knowledge cards. Review first, keep the good ones.",onboardSkip:"Skip",onboardBack:"Back",onboardNext:"Next",onboardStart:"Start using",onboardStep0Title:"Star the project on GitHub first",onboardStep0Body:"A Star is the most direct signal to keep maintaining it; Fork it if you want to modify or self-host.",onboardStar:"Star",onboardFork:"Fork",onboardStarred:"Starred, continue",onboardStarHint:"You can always come back via \u2605 Star in the top bar.",onboardStep1Title:"Auto-capture, no manual notes",onboardStep1Body:"When a session ends, decisions, root causes and lessons become a card. Capture first, review second.",onboardStep2Title:"Found a useful card? Tap \u{1F44D}",onboardStep2Body:"Open any card and tap \u{1F44D} useful / \u{1F44E} not useful. No search needed: the buttons are always there. It helps recall ranking.",onboardStep3Title:"New support entries",onboardStep3Body:"Community, sponsor, legacy app and bug report live at the bottom of the left rail. No need to dig through the README.",onboardTip:"Tip: reopen this guide from Support & community.",navWorkspace:"Workspace",navSystem:"System",navSupport:"Support",navQuotes:"Author's Quotes",quoteHint:"Click for the next verse",v5Local:"Local",v5Star:"Star on GitHub",runtimeTitle:"Runtime status",runtimeSub:"Vault, backups, capture and version",dbTitle:"Vault",backupTitle:"Backups",captureTitle:"Auto capture",versionTitle:"Version",cardsUnit:"cards",links:"links",todayReview:"Today's resurface",openArrow:"Open \u2192",reshuffle:"Another",insightDecision:"Decision",insightRoot:"Root cause",insightLesson:"Lesson",insightSummary:"Summary",pinCard:"Pin this card",unpinCard:"Unpin",pinnedOnly:"Pinned",toastApproved:"approved",toastRejected:"rejected",toastCardDeleted:"deleted",toastRestored:"restored",toastPurged:"permanently deleted",toastPurgedExpired:"expired recycle entries purged",toastFailed:"Action failed",noSelection:"Select the cards to act on first",enabledLabel:"Enable memory core",vaultDirLabel:"Vault directory (single)",captureCooldownMs:"Capture cooldown (ms)",captureProvider:"Distill provider (auto if empty)",routeAuto:"Auto (registration order)",routeListFail:"Could not load the model list ({err}) \u2014 you can type provider / model below; the desktop popup proxies this to the host, so if it still fails open the settings from DSH",captureFollowSession:"Follow current session (distill with the session provider/model)",captureFirstOnly:"First candidate only (stop on failure, no fallback)",llmTest:"Test distill route",llmTestOk:"\u2713 Call succeeded",llmTestFail:"\u2717 Call failed",llmCandidates:"candidates",captureModel:"Distill model (auto if empty)",recallEmbedding:"Semantic recall provider (optional)",sessionBudgetChars:"Session budget (chars)",saving:"Saving\u2026",savePending:"Saved to the config file; the host half is still the old build, so restart DSH to make it effective (already applied in this panel)",saveInvalid:"Some field values are invalid; nothing was submitted",invalidField:'"{field}" must be a number between {min} and {max} (now: {value})',actionRunning:"Working\u2026",recycleEmptyHint:"Recycle bin is empty: deleted cards land here first and are purged automatically after {days} days.",recyclePurgeAll:"Empty recycle bin",recyclePurgeAllConfirm:"Permanently delete all {n} cards in the recycle bin? This cannot be undone.",toastPurgeAll:"Permanently deleted {n}",bucketDeleted:"Deleted",restoreToQueue:"Back to review",fbCopyManual:"Auto-copy was blocked by the browser \u2014 the text is below: click Select all, then Ctrl+C",vcLoaded:"running (process serving this page)",vcResident:"resident instance",vcOnDisk:"on disk",vcLatest:"npm latest",vcStale:'v{disk} is installed on disk but the process serving this page still has v{loaded} loaded \u2014 click "Restart resident instance" to restart it on the new code (no DSH restart needed)',vcRestart:"Restart resident instance",vcRestarting:"Restarting\u2026",vcRestartSent:"Resident restart scheduled: the new process takes over in ~3-8s \u2014 refresh the page (Ctrl+F5) shortly",vcRestartCurrent:"The resident instance is already up to date \u2014 no restart needed",vcRestartAnyway:"Resident is already v{ver}; usually no restart needed \u2014 use this if it looks stuck",vcHostProcessStale:"Disk has v{disk}, but **the process serving this page** (the DSH host) still loads v{loaded} \u2014 that code was loaded when the host started, so **restarting the resident instance does not change this page**: fully quit and reopen DSH.",vcRestartFixes:"Restarts the resident instance (the process on the port) onto v{disk} (currently v{served}) without restarting DSH",vcRestartStart:"Starts the resident instance on the current disk version v{disk} (no DSH restart needed)",vcRestartRepair:"Re-registers it under a watchdog and keeps it alive (already v{disk}; no DSH restart needed)",vcRestartHostOnly:"The resident instance is already v{disk}; this page shows v{loaded} from the DSH host \u2014 restarting the resident does not affect it, please restart DSH",vcRestartFail:"Restart request failed",vcRestartNoRoute:"The process serving this page is still the old build (no such endpoint): restart the desktop app / DSH and retry, or run {cmd}",vcHostStale:'The "running" chip above comes from the process serving this page; the resident instance is already current \u2014 restart the desktop app / DSH to refresh that chip',vcResidentDownShort:"not running",vcResidentDown:"The resident instance is not running (no response on port {port}) \u2014 use the button below to bring it up on the new code; if that fails run {cmd} and share the output of dsh-memory status",vcResidentUnmanagedShort:"unmanaged",vcResidentUnmanaged:"The resident instance serves v{served} but has **no watchdog keeping it alive** (an orphan left by a stop or a hard kill) \u2014 use the button below to put it back under management (a fresh watchdog plus a new instance), or run {cmd}",vcResidentLockUnknownShort:"management unknown",vcResidentReplaceBlockedShort:"cannot replace",vcResidentHostManagedShort:"host-managed",vcResidentReplaceBlocked:'The resident instance **cannot be replaced** (environment limit): the watchdog lock directory is not writable ({err}; {path}) \u2192 the port will stay on v{served} **long-term**. This is not "temporarily behind": automatic replacement is refused on purpose to avoid leaving an orphan. Way out: fix that directory permissions and run {cmd}, or run dsh-memory watchdog --port 7999 in the foreground',vcResidentLockUnknown:'The resident instance serves v{served}, but the **watchdog lock file cannot be written** (restricted environment: sandbox, ACLs, non-system drive) \u2192 whether it is managed cannot be determined (this is not "unmanaged"). Cause: {err} ({path}). Keep-alive usually still works; the button below can put it back under management on the new code.',vcPage:"Page script",vcPageStale:"\u26A0 This page is still running an older script (page v{page} / disk v{disk}): press Ctrl+F5 to refresh. If the running version is still old, restart the desktop app / DSH as well",vcOutdated:"update available",vcUpToDate:"up to date",vcCheck:"Check for updates",checking:"Checking\u2026",vcCheckFail:"Update check failed",recallSummaryLen:"Recall summary len",recallBody:"Recall with body",secretHint:"Credential hint (injected into every session)",autoWeb:"Web server",autoWebMode:"Keep-alive mode",webPort:"Web port",webCheckIntervalMs:"Probe interval (ms)",webMaxRestart:"Max restart",watchdogAutoSpawn:"Watchdog process",autoRestartOnDrift:"Auto-restart resident on version drift",autoMcpSetup:"Auto-mount MCP",saveConfig:"Save config",saveFail:"Save failed",savedOk:"Saved",savedDirect:"No DSH host is running here, so the change went straight into the shared config (hooks / MCP / the standalone page pick it up immediately)",savedApplied:"Saved and applied (the host applied it in a request context)",saveQueued:"Handed to the DSH host for sync \u2014 not confirmed applied yet",saveHostGuard:"This host does not let a plugin write config from its own callback context; change the same option under DSH Settings \u2192 Memory, or edit the profile patch layer",saveFailHint:"the host did not apply it \u2014 see Diagnostics under Report a bug",recallTool:"recall tool",costControl:"Cost control",costHint:"save tokens, control LLM usage",distillEnabled:"Distill cards (on=LLM compress, off=raw cards zero LLM)",dedupByLLM:"Dedup feeds LLM (off=pure lexical, cheaper)",captureMaxTokens:"Distill output cap (tokens)",captureTimeoutMs:"Distill timeout (ms; use 120000+ for cold local models)",recallMinScore:"Recall min score (higher = cheaper)",configNeedsDsh:"Edit config inside DSH (this page may be read-only or partially missing)",installMcp:"Install MCP",uninstallMcp:"Uninstall MCP",uninstallConfirm:"Confirm uninstall MCP for this agent? Claude Code/Codex will lose access to the memory vault.",presetConfig:"One-click preset config",presetHint:"Click to fill a plan, then hit Save",planApplied:'Filled "{plan}" \u2014 hit "Save config" to apply',planDescA:"Personal dev \xB7 distill 4000 \xB7 watchdog off",planDescB:"Budget \xB7 no distill \xB7 ~zero cost",planDescC:"Long projects \xB7 watchdog on \xB7 high quality",cfgSubCore:"Capture / recall / vault dir and dedup strategy",cfgSubMulti:"Per-project vaults; CLI / MCP / hooks follow the active one",cfgSubCost:"Control LLM calls and recall size \u2014 this is your bill",cfgSubAudit:"What must be reviewed before entering the main vault",cfgSubService:"Keep-alive, watchdog and version self-heal \u2014 defaults are fine",cfgDirty:"Unsaved changes",cfgClean:"Synced",unitChars:"chars",unitPerDay:"cards / day",unitTokens:"tokens",unitMs:"ms",unitTimes:"times",unitDays:"days",mcpAutoHint:"Auto-detects installed agents and their MCP configs (read-only probe)",mcpRefresh:"Re-scan",mcpSummary:"{agents} agents \xB7 {servers} MCP servers \xB7 {mounted} mounting this plugin",mcpNoServers:"No MCP configured",mcpDetectedOnly:"detected only",planA:"A Light",planB:"B Budget",planC:"C Premium",pluginInfo:"Plugin info",organizeTitle:"Organize",scanAndOrganize:"Scan & organize",scanHint:'Click "\u{1F50D} Scan & organize" to find similar/stale cards, then "\u26A1 One-click optimize" to run.',mergeNow:"Merge",delete:"Delete",captureAlert:"Auto-capture failed",captureAlertHint:'Open "Usage / Today" for the capture log; if the cause is an API/version mismatch, update the memory-eternal plugin.',captureLog:"Auto-capture log",captureLogHint:"Runs after every turn: listen \u2192 judge \u2192 write. Last 100 entries, so you can see why a card was not written.",captureLogEmpty:"No entries yet. Chat one turn (> min capture chars) and come back.",healthTitle:"Health",healthHint:"Database / backups / capture / versions \u2014 spot anything that broke silently",healthDb:"Database",healthDbBad:"database is unwritable or corrupt",healthBackups:"Backups",healthNoBackups:"no backups yet (run dsh-memory doctor; the host also backs up daily)",healthBackupAge:"{n} files \xB7 newest {d} day(s) ago",healthBackupToday:"{n} files \xB7 newest today",healthCapture:"Auto capture",healthNoRecords:"no records yet (capture has not run)",healthCapOk:"last capture wrote a card",healthCapFail:"last capture failed",healthRunAlign:"run Version alignment check to show",healthVersion:"Versions",ledgerTitle:"Memory ledger (last 7 days)",ledgerHint:'How much recall injected and how many distillation calls ran \u2014 the first data point for the "does it save tokens?" question',ledgerRecalls:"Recalls",ledgerInjected:"injected",ledgerChars:"chars",ledgerCaptures:"Captures",ledgerLlmCalls:"LLM calls",ledgerEstimate:"Est. tokens",ledgerEstimateHint:"rough estimate at ~2 chars per token; order of magnitude only",ledgerUseful:"Recall usefulness",ledgerUsefulHint:"from useful / not-useful feedback; below 60% means injection may cost more than it saves",ledgerFormula:"Net benefit \u2248 avoided context cost \u2212 (injected chars + distillation calls \xD7 price). The ledger only records what we spent; weigh it against the re-reads and rework you actually avoided.",ledgerNoData:"No entries in the last 7 days: chat a few turns or let the agent recall once, then come back.",ledgerNeedRestart:"The host is still running the old API (/ledger missing): fully quit and reopen DSH to start recording.",alignTitle:"Version alignment check",alignRun:"Check now",alignFix:"Rewrite wiring",alignFixConfirm:"Rewrite the MCP / hooks wiring? (Only the plugin's own keys are touched; your data and config stay as they are)",alignFixed:"Wiring rewritten; if it still reports an old host process, you must fully quit and reopen DSH",alignFail:"Alignment check failed",alignHint:"Upgrading the plugin only replaces files on disk \u2014 the host's in-memory event subscriptions and stale paths inside MCP / hooks do not update themselves; this checks all of it at once",alignIdle:'Hit "Check now": compare the host / resident / npm versions and look for stale paths and arguments in MCP and hooks',alignDisk:"disk",alignResident:"resident",alignHost:"host process",captureLogUnavailable:"Log is available only inside the DSH host (the standalone web page has no host runtime).",captureAgentCards:"Cards auto-captured by the agent",noCards:"none",loadMore:"Load more",batchMerge:"Smart batch merge",mergeAllConfirm:"Merge similar-grouped cards into one each (keep kind), delete originals?",crossVault:"All vaults",deleteConfirm:"Delete this memory card? This cannot be undone.",editCard:"Edit",editHint:"Only title / tags / body are editable. Status and kind still flow through audit and system rules \u2014 manual edits never bypass review.",editTitle:"Title",editTags:"Tags (comma separated)",editTagsHint:"e.g. memory, recall, performance",editBody:"Body (Markdown)",editSave:"Save",editSaving:"Saving\u2026",editCancel:"Cancel",editSaved:"Saved",editFail:"Save failed",editTitleEmpty:"Title cannot be empty",editBodyEmpty:"Body cannot be empty",deleted:"Deleted",deleteFail:"Delete failed",deleteSelected:"Delete selected",deletedSelected:" cards deleted",merge:"Merge",mergeNeed:"Select at least 2 cards",mergeConfirm:"Merge the selected cards into one and delete the originals?",merged:"Merged",mergeFail:"Merge failed",mcpInstalled:"\u2705 {agent} MCP installed",mcpUninstalled:"\u2705 {agent} MCP uninstalled",mcpActionFail:"\u274C {agent} MCP action failed: {error}",dshHostLabel:"DeepSeek Harness (current host)",restartHint:"Saved. autoWebMode/watchdogAutoSpawn take effect after restarting DSH; a resident watchdog is never stopped automatically \u2014 use dsh-memory stop / restart (#19)",conflictRefresh:"Config changed elsewhere \u2014 refresh and retry",untitled:"Untitled",tplBlank:"\u{1F4C4} Blank",tagsHint:"Tags (comma-separated)",connCount:"{n} connections",tplDecisionTags:"decision, plan",tplBugTags:"pitfall, lesson",tplMeetingTags:"meeting, minutes",tplWeeklyTags:"weekly report",tplDecisionBody:`# Tech decision: [title]
63
63
 
64
64
  ## Background
65
65
  - Problem
@@ -104,7 +104,7 @@ Option A, because:
104
104
  -
105
105
 
106
106
  ## Risks/blockers
107
- - `},ba=["all","core","project","knowledge","skill","content","prompt","business","tool","mistake"],Bn=ba.filter(t=>t!=="all"&&t!=="core"),lt={core:"#FF7A45",skill:"#8B5CF6",project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},Ia=t=>Array.isArray(t&&t.tags)?t.tags:[],Ft={core:"\u2B50",skill:"\u{1F9E9}",project:"\u{1F4C1}",knowledge:"\u{1F4DA}",content:"\u{1F4DD}",prompt:"\u{1F4AC}",business:"\u{1F4BC}",tool:"\u{1F527}",mistake:"\u26A0\uFE0F",other:"\u{1F4CE}"},it={core:"kindCore",skill:"kindSkill",project:"kindProject",knowledge:"kindKnowledge",content:"kindContent",prompt:"kindPrompt",business:"kindBusiness",tool:"kindTool",mistake:"kindMistake",other:"kindKnowledge"},na="deepseek-harness",Pt=t=>{let a=String(t||""),n=a.toLowerCase();return!a||a==="agent"||a==="unknown"||a.startsWith("session:")||n.startsWith("claude-code")?n.startsWith("claude-code")?"claude":na:n==="deepseek harness"?na:a.split(":")[0]||na},No=[na,"claude","codex","cursor","codex-desktop"],jn=(t=[])=>[...new Set([...No,...(t||[]).map(Pt)])],Mo={boot:["\u{1F680}","#8b5cf6"],listen:["\u{1F442}","inherit"],created:["\u2705","#10b981"],appended:["\u2795","#3b82f6"],skip:["\u23ED","#f59e0b"],warn:["\u26A0\uFE0F","#f59e0b"],fail:["\u274C","#ef4444"]},ct=`
107
+ - `},va=["all","core","project","knowledge","skill","content","prompt","business","tool","mistake"],Wn=va.filter(t=>t!=="all"&&t!=="core"),gt={core:"#FF7A45",skill:"#8B5CF6",project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},Ea=t=>Array.isArray(t&&t.tags)?t.tags:[],Wt={core:"\u2B50",skill:"\u{1F9E9}",project:"\u{1F4C1}",knowledge:"\u{1F4DA}",content:"\u{1F4DD}",prompt:"\u{1F4AC}",business:"\u{1F4BC}",tool:"\u{1F527}",mistake:"\u26A0\uFE0F",other:"\u{1F4CE}"},lt={core:"kindCore",skill:"kindSkill",project:"kindProject",knowledge:"kindKnowledge",content:"kindContent",prompt:"kindPrompt",business:"kindBusiness",tool:"kindTool",mistake:"kindMistake",other:"kindKnowledge"},ia="deepseek-harness",Ot=t=>{let a=String(t||""),n=a.toLowerCase();return!a||a==="agent"||a==="unknown"||a.startsWith("session:")||n.startsWith("claude-code")?n.startsWith("claude-code")?"claude":ia:n==="deepseek harness"?ia:a.split(":")[0]||ia},To=[ia,"claude","codex","cursor","codex-desktop"],_n=(t=[])=>[...new Set([...To,...(t||[]).map(Ot)])],Ro={boot:["\u{1F680}","#8b5cf6"],listen:["\u{1F442}","inherit"],created:["\u2705","#10b981"],appended:["\u2795","#3b82f6"],skip:["\u23ED","#f59e0b"],warn:["\u26A0\uFE0F","#f59e0b"],fail:["\u274C","#ef4444"]},ft=`
108
108
  .memory-eternal-root { font-family: inherit; color: var(--dsw-alias-label-primary, #1f2937); }
109
109
  .mc-card { background: var(--dsw-alias-bg-layer-1, #fff); border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 12px; padding: 14px 16px; }
110
110
  .mc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
@@ -131,9 +131,19 @@ Option A, because:
131
131
  .mc-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 12px; }
132
132
  .mc-field-label { font-size: 11.5px; opacity: .62; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
133
133
  .mc-field-hint { font-size: 10.5px; opacity: .45; line-height: 1.4; }
134
- .mc-field input, .mc-field select { width: 100%; box-sizing: border-box; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--dsw-alias-border-l2, #d1d5db); background: var(--dsw-alias-bg-layer-1, #fff); color: inherit; font-size: 12px; transition: border-color .15s, box-shadow .15s; }
135
- .mc-field input:focus, .mc-field select:focus { outline: none; border-color: var(--dsw-alias-brand-primary, #3b82f6); box-shadow: 0 0 0 3px rgba(59,130,246,.14); }
136
- .mc-field input:disabled, .mc-field select:disabled { opacity: .55; cursor: not-allowed; }
134
+ /* \u53EA\u6709\u300C\u771F\u6B63\u586B\u5185\u5BB9\u300D\u7684\u63A7\u4EF6\u624D\u5360\u6EE1\u4E00\u884C\u3002\u591A\u9009\u4E0B\u62C9\u91CC\u7684 checkbox \u4E00\u65E6\u88AB\u8FD9\u6761\u547D\u4E2D\uFF0C
135
+ \u4F1A\u88AB\u6491\u6210\u6574\u884C\u5BBD \u2014\u2014 \u9009\u9879\u6587\u5B57\u88AB\u6324\u5230\u6700\u53F3\u7F18\u3001\u9010\u5B57\u6362\u884C\uFF08\u7528\u6237\u622A\u56FE\u91CC\u7684\u4E0B\u62C9\u6846 BUG\uFF09\u3002 */
136
+ .mc-field input:not([type="checkbox"]):not([type="radio"]), .mc-field select { width: 100%; box-sizing: border-box; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--dsw-alias-border-l2, #d1d5db); background: var(--dsw-alias-bg-layer-1, #fff); color: inherit; font-size: 12px; transition: border-color .15s, box-shadow .15s; }
137
+ .mc-field input:not([type="checkbox"]):not([type="radio"]):focus, .mc-field select:focus { outline: none; border-color: var(--dsw-alias-brand-primary, #3b82f6); box-shadow: 0 0 0 3px rgba(59,130,246,.14); }
138
+ .mc-field input:not([type="checkbox"]):not([type="radio"]):disabled, .mc-field select:disabled { opacity: .55; cursor: not-allowed; }
139
+ /* \u590D\u9009\u6846\uFF1A\u56FA\u5B9A\u5C3A\u5BF8\u3001\u4E0D\u53C2\u4E0E\u62C9\u4F38\uFF0C\u5E76\u8DDF\u968F\u4E3B\u9898\u5F3A\u8C03\u8272 */
140
+ .mc-field input[type="checkbox"], .mc-field input[type="radio"] { width: 15px; height: 15px; flex: none; margin: 0; padding: 0; accent-color: #ff7a45; cursor: pointer; }
141
+ /* \u591A\u9009\u4E0B\u62C9\u7684\u9009\u9879\u884C\uFF1A\u4E00\u884C\u4E00\u4E2A\uFF0C\u4E0D\u6362\u884C\uFF0Chover \u6709\u53CD\u9988 */
142
+ .mc-dd-opt { display: flex; align-items: center; gap: 8px; padding: 7px 9px; cursor: pointer; white-space: nowrap; min-width: 0; }
143
+ .mc-dd-opt:hover { background: rgba(127,127,127,.10); }
144
+ .mc-dd-opt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
145
+ /* \u6DF1\u8272\u4E3B\u9898\u4E0B\u8BA9\u539F\u751F\u590D\u9009\u6846\u8D70\u6DF1\u8272\u6E32\u67D3\uFF08\u9ED8\u8BA4\u662F\u767D\u5E95\u65B9\u5757\uFF0C\u5728\u9ED1\u5361\u4E0A\u975E\u5E38\u523A\u773C\uFF09 */
146
+ .me-v5 .mc-dd-opt input[type="checkbox"] { color-scheme: dark; }
137
147
  .mc-switch { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 12px; line-height: 1.5; min-width: 0; }
138
148
  .mc-switch input { appearance: none; -webkit-appearance: none; flex: none; width: 34px; height: 20px; margin: 1px 0 0; border-radius: 999px; background: var(--dsw-alias-border-l2, #cbd5e1); position: relative; cursor: pointer; transition: background .16s; }
139
149
  .mc-switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.28); transition: transform .16s; }
@@ -181,6 +191,35 @@ Option A, because:
181
191
  .mc-rail:not(.open) .mc-railbtn .mc-rail-label, .mc-rail:not(.open) .mc-rail-collapse { position: relative; }
182
192
  .mc-railbtn:hover { border-color: var(--dsw-alias-brand-primary, #3b82f6); color: var(--dsw-alias-label-primary, #111); background: var(--dsw-alias-bg-layer-1, #fff); }
183
193
  .mc-railbtn.active { background: #3b82f6; border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(59,130,246,0.35); }
194
+ /* ---- \u4F5C\u8005\u8BED\u5F55\uFF08\u5DE6\u4FA7\u680F\u5E95\u90E8\uFF0Cmargin-top:auto \u8D34\u5E95\uFF09----
195
+ \u6309\u94AE\u8BED\u4E49\uFF1A\u6574\u5757\u53EF\u70B9\uFF0C\u70B9\u4E00\u6B21\u6362\u4E0B\u4E00\u53E5\uFF1B\u6298\u53E0\u6001\u4E0E\u7A84\u5C4F\u9690\u85CF\uFF0C\u907F\u514D\u6324\u574F\u56FE\u6807\u680F\u3002 */
196
+ /* \u4F5C\u8005\u8BED\u5F55\uFF1A\u505A\u6210\u4E00\u5F20\u300C\u9898\u8BCD\u5361\u300D\uFF0C\u4E0D\u662F\u53C8\u4E00\u5757 UI \u9762\u677F\u3002
197
+ \u4E09\u6761\u8BBE\u8BA1\u7406\u7531\uFF1A
198
+ \u2460 \u8BD7\u53E5\u7528\u886C\u7EBF\uFF08\u5B8B\u4F53\u65CF\uFF09\u2014\u2014\u9ED1\u4F53\u8BFB\u8BD7\u50CF\u516C\u544A\u680F\uFF0C\u6A2A\u7EC6\u7AD6\u7C97\u624D\u6709\u53E4\u610F\uFF1B
199
+ \u2461 \u7EB8\u611F\u6696\u767D + \u53F3\u4E0B\u89D2 13% \u900F\u660E\u5EA6\u7684\u5F15\u53F7\u6C34\u5370 \u2014\u2014 \u5361\u7247\u53EA\u6709 ~200px \u5BBD\uFF0C\u7EAF\u6587\u5B57\u5BB9\u6613\u7CCA\u6210\u4E00\u5757\uFF0C
200
+ \u4E00\u4E2A\u6C34\u5370 + \u4E00\u70B9\u7559\u767D\u5C31\u80FD\u628A\u5B83\u538B\u6210"\u9898\u8BCD"\u800C\u4E0D\u662F"\u5361\u7247"\uFF1B
201
+ \u2462 \u5C42\u6B21\u9760\u989C\u8272\u533A\u5206\u800C\u4E0D\u662F\u5B57\u53F7\u5806\u53E0\uFF1A\u7709\u6807\u7528\u7425\u73C0\u8272\u3001\u8BD7\u53E5\u7528\u58A8\u8272\u3001\u51FA\u5904\u7528\u892A\u8272\u7684\u8910\u3002 */
202
+ .mc-quote { position: relative; margin-top: auto; flex: none; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 7px; padding: 12px 13px 11px; text-align: left; font: inherit; cursor: pointer; overflow: hidden; border: 1px solid rgba(120, 105, 85, .16); border-radius: 13px; background: linear-gradient(158deg, #fffdf9 0%, #f6f1e7 100%); color: #4a443c; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease; }
203
+ .mc-quote::before { content: '\u275D'; position: absolute; top: 3px; right: 8px; font-family: Georgia, 'Times New Roman', serif; font-size: 30px; line-height: 1; color: rgba(180, 83, 9, .13); pointer-events: none; }
204
+ .mc-quote:hover { border-color: rgba(180, 83, 9, .42); background: linear-gradient(158deg, #fffefb 0%, #f8f2e6 100%); box-shadow: 0 6px 18px rgba(120, 90, 50, .10); transform: translateY(-1px); }
205
+ .mc-quote-tag { position: relative; font-size: 9px; font-weight: 700; letter-spacing: .16em; color: #b45309; opacity: .9; }
206
+ .mc-quote-text { position: relative; font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif; font-size: 12px; line-height: 1.95; letter-spacing: .015em; color: #3f3a33; word-break: break-word; }
207
+ .mc-quote-src { position: relative; align-self: flex-end; font-size: 9.5px; letter-spacing: .04em; color: #a08b6b; }
208
+ .mc-quote-src::before { content: '\u2014 '; opacity: .7; }
209
+ @keyframes me-quote-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
210
+ .mc-quote-text { animation: me-quote-in .26s ease both; }
211
+ .mc-rail:not(.open) .mc-quote { display: none; }
212
+ @media (max-width: 720px) { .mc-quote { display: none; } }
213
+ /* \u6DF1\u8272\u4E3B\u9898\uFF1A\u6696\u58A8\u5E95 + \u7425\u73C0\u8272\u63CF\u8FB9\u3002\u8BD7\u53E5\u7528 #ece6dc \u800C\u4E0D\u662F\u7EE7\u627F\u7684 #b0b7c1 \u2014\u2014
214
+ \u540E\u8005\u662F"\u8BF4\u660E\u6587\u5B57"\u7684\u7070\u5EA6\uFF0C\u8BFB\u8BD7\u4F1A\u663E\u5F97\u810F\u4E14\u53D1\u9752\u3002 */
215
+ .me-v5 .mc-quote { border-color: rgba(255, 122, 69, .16); background: linear-gradient(158deg, #262a31 0%, #1d2127 100%); color: #b0b7c1; }
216
+ .me-v5 .mc-quote::before { color: rgba(255, 122, 69, .14); }
217
+ .me-v5 .mc-quote:hover { border-color: rgba(255, 122, 69, .45); background: linear-gradient(158deg, #2b3038 0%, #22262d 100%); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
218
+ .me-v5 .mc-quote-tag { color: #ff9d6e; }
219
+ .me-v5 .mc-quote-text { color: #ece6dc; }
220
+ .me-v5 .mc-quote-src { color: rgba(255, 157, 110, .62); }
221
+ @media (max-width: 1100px) { .me-v5 .mc-quote { display: none; } }
222
+ @container (max-width: 1100px) { .me-v5 .mc-quote { display: none; } }
184
223
  .mc-main { flex: 1; min-width: 0; overflow: auto; display: flex; flex-direction: column; }
185
224
  .mc-tab.active { background: var(--dsw-alias-bg-layer-1, #fff); opacity: 1; font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
186
225
  .mc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
@@ -366,6 +405,35 @@ Option A, because:
366
405
  .mc-news-hero-go { flex: none; padding: 9px 18px; border: 0; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 650; color: #04101f; background: linear-gradient(120deg, #67e8f9, #38bdf8 45%, #a78bfa); box-shadow: 0 8px 20px -10px rgba(56,189,248,.9); transition: transform .18s ease, filter .2s ease; }
367
406
  .mc-news-hero-go:hover { transform: translateY(-1px); filter: brightness(1.06); }
368
407
  .mc-news-hero-go:active { transform: scale(.98); }
408
+ /* ---- \u5173\u6CE8\uFF08Follow\uFF09\uFF1Ahero \u91CC\u7684\u8BA2\u9605\u5165\u53E3 + \u9884\u89C8\u5361 + \u5173\u6CE8 chips ---- */
409
+ .mc-news-hero-follow { flex: none; padding: 9px 15px; border: 1px solid var(--dsw-alias-border-l2, #d1d5db); border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 650; color: inherit; background: var(--dsw-alias-bg-layer-1, #fff); transition: all .16s ease; }
410
+ .mc-news-hero-follow:hover { border-color: var(--dsw-alias-brand-primary, #3b82f6); color: var(--dsw-alias-brand-primary, #3b82f6); transform: translateY(-1px); }
411
+ .mc-news-hero-follow:disabled { opacity: .55; cursor: not-allowed; transform: none; }
412
+ /* \u9884\u89C8\u5361\uFF1A\u843D\u5E93\u524D\u7684\u300C\u6211\u7406\u89E3\u5BF9\u4E86\u5417\u300D\u3002\u7559\u767D\u5927\u4E00\u70B9\uFF0C\u8BA9\u4EBA\u771F\u7684\u8BFB\u4E00\u904D\u518D\u70B9\u786E\u8BA4\u3002 */
413
+ .mc-news-follow-draft { margin: 0 0 12px; padding: 12px 13px; border-radius: 12px; border: 1px solid rgba(59,130,246,.35); background: rgba(59,130,246,.06); font-size: 12px; display: flex; flex-direction: column; gap: 9px; }
414
+ .mc-news-follow-draft .draft-head { font-size: 11px; font-weight: 700; letter-spacing: .04em; opacity: .8; }
415
+ .mc-news-follow-draft .draft-q { opacity: .75; margin-left: 4px; }
416
+ .mc-news-follow-draft .draft-doms { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
417
+ .mc-news-follow-draft .draft-lbl { font-size: 10.5px; opacity: .6; }
418
+ .mc-news-follow-draft .draft-opt { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 11.5px; white-space: nowrap; }
419
+ .mc-news-follow-draft .draft-opt input { width: 14px; height: 14px; margin: 0; accent-color: #3b82f6; }
420
+ .mc-news-follow-draft .draft-note { font-size: 10.5px; line-height: 1.7; opacity: .68; }
421
+ .mc-news-follow-draft .draft-actions { display: flex; gap: 8px; justify-content: flex-end; }
422
+ /* \u5173\u6CE8 chips\uFF1A\u70B9\u4E3B\u4F53 = \u53EA\u770B\u8FD9\u4E2A\u4E3B\u9898\uFF1B\u70B9 \u2715 = \u53D6\u6D88\u5173\u6CE8 */
423
+ .mc-news-follows { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 0 0 10px; }
424
+ .mc-news-follow-chip { display: inline-flex; align-items: center; border: 1px solid var(--dsw-alias-border-l2, #d1d5db); border-radius: 999px; overflow: hidden; font-size: 11.5px; background: var(--dsw-alias-bg-layer-1, #fff); }
425
+ .mc-news-follow-chip.on { border-color: #3b82f6; color: #3b82f6; background: rgba(59,130,246,.10); }
426
+ .mc-news-follow-chip .chip-main { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 5px 9px; font-family: inherit; font-size: inherit; }
427
+ .mc-news-follow-chip .chip-main i { font-style: normal; opacity: .55; margin-left: 5px; }
428
+ .mc-news-follow-chip .chip-x { border: 0; border-left: 1px solid var(--dsw-alias-border-l1, #e5e7eb); background: transparent; color: inherit; cursor: pointer; padding: 5px 8px; font-size: 10px; opacity: .5; }
429
+ .mc-news-follow-chip .chip-x:hover { opacity: 1; color: #ef4444; }
430
+ .mc-news-tile-follow { font-size: 9.5px; padding: 1px 6px; border-radius: 999px; background: rgba(59,130,246,.12); color: #3b82f6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
431
+ /* \u5173\u6CE8\u4E13\u533A\uFF1A\u5355\u72EC\u4E00\u680F\uFF0C\u4E0D\u548C\u65B0\u95FB\u62A2\u65B0\u9C9C\u5EA6\u6392\u5E8F */
432
+ .mc-news-follow-sec { margin: 0 0 14px; padding: 10px 11px 12px; border-radius: 13px; border: 1px solid rgba(59,130,246,.22); background: rgba(59,130,246,.045); }
433
+ .mc-news-follow-sec-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 9px; font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--dsw-alias-brand-primary, #3b82f6); }
434
+ .mc-news-follow-sec-head em { font-style: normal; font-size: 10px; padding: 1px 7px; border-radius: 999px; background: rgba(59,130,246,.14); }
435
+ /* \u6458\u8981\u9884\u89C8\uFF1A\u8BA9\u7528\u6237\u5728\u5F00\u542F\u63A8\u9001\u524D\u5148\u770B\u6E05\u300C\u4F1A\u63A8\u4EC0\u4E48\u300D */
436
+ .mc-digest-preview { margin: 0; padding: 10px 12px; border-radius: 9px; background: var(--dsw-alias-bg-base, #f3f4f6); color: inherit; font-size: 11.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
369
437
  .mc-news-hero-clear { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); background: rgba(127,127,127,.08); color: var(--dsw-alias-label-secondary, #6b7280); font-size: 11px; line-height: 1; cursor: pointer; transition: all .2s ease; }
370
438
  .mc-news-hero-clear:hover { color: var(--dsw-alias-label-primary, #111827); border-color: var(--dsw-alias-border-l2, #d1d5db); }
371
439
  .mc-news-hero-hint { margin-top: 8px; font-size: 10.5px; line-height: 1.6; color: var(--dsw-alias-label-secondary, #6b7280); }
@@ -947,7 +1015,7 @@ Option A, because:
947
1015
  .mc-audit-batchcard > .mc-btn { width: 100%; }
948
1016
  .mc-audit-batchcard > div[style*="flex: 1"] { display: none; }
949
1017
  }
950
- `;function To(t){t.effect(()=>t.locale.register(Kt,{zh:Fn,en:En}),"memory-eternal: locale");let a=t.locale.bind(Kt);t.effect(()=>t.slots.inject("settings.section",()=>t.slots.register({name:"settings.section",id:Kt,order:25,label:()=>a("nav"),locale:Kt,inject:()=>({})},()=>r.default.createElement(zo,{t:a}))),"memory-eternal: settings section"),t.effect(()=>t.slots.inject("sidebar.footer.action",()=>t.slots.register({name:"sidebar.footer.action",id:`${Kt}:footer`,order:100,label:()=>a("nav"),locale:Kt,inject:()=>({})},n=>r.default.createElement(Ao,{t:a,locale:t.locale,wide:!(n&&n.wide===!1)}))),"memory-eternal: sidebar footer action")}function Ro(){let[t,a]=(0,r.useState)(X+"/ui/app");return(0,r.useEffect)(()=>{let n=!0,s=()=>fetch("/memory-eternal/api/web-info").then(i=>i.json()).then(i=>{n&&i&&i.ok&&i.alive!==!1&&i.url&&a(i.url.endsWith("/")?i.url:i.url+"/")}).catch(()=>{});return fetch(X+"/ui/app",{method:"HEAD"}).then(i=>{if(n&&!i.ok)return s()}).catch(()=>n?s():void 0),()=>{n=!1}},[]),t}function zo({t}){return(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[(0,e.jsx)("style",{children:ct}),(0,e.jsx)(Hn,{t,onReload:()=>{},version:0})]})}function Ao({t,locale:a,wide:n}){let[s,i]=(0,r.useState)(!1);return(0,e.jsxs)("div",{className:`me-footer${n?"":" rail"}`,children:[(0,e.jsx)("style",{children:ct}),(0,e.jsxs)("button",{type:"button",className:"me-footer-btn",onClick:()=>i(!0),"aria-label":t("nav"),title:t("nav"),children:[(0,e.jsx)("span",{className:"me-footer-ico","aria-hidden":"true",children:(0,e.jsx)(Fo,{})}),(0,e.jsx)("span",{className:"me-footer-label",children:t("nav")})]}),s&&(0,e.jsx)(Po,{t,locale:a,onClose:()=>i(!1)})]})}function Lo(){return(0,e.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4","aria-hidden":"true",children:(0,e.jsx)("rect",{x:"2.9",y:"2.9",width:"10.2",height:"10.2",rx:"1.7"})})}function Do(){return(0,e.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4","aria-hidden":"true",children:[(0,e.jsx)("rect",{x:"2.6",y:"5.4",width:"8",height:"8",rx:"1.5"}),(0,e.jsx)("path",{d:"M5.6 5.4V4.1c0-.9.7-1.6 1.6-1.6h4.7c.9 0 1.6.7 1.6 1.6v4.7c0 .9-.7 1.6-1.6 1.6h-1.3"})]})}function Io(){return(0,e.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M3.9 3.9l8.2 8.2M12.1 3.9l-8.2 8.2"})})}function Po({t,locale:a,onClose:n,tab:s}){let[i,p]=(0,r.useState)(!1),[y,S]=(0,r.useState)(!1),g=(0,r.useRef)(null),C=Ro(),d=(0,r.useCallback)(_=>a&&typeof a.subscribe=="function"?a.subscribe(_):()=>{},[a]),w=(0,r.useCallback)(()=>a&&typeof a.getSnapshot=="function"?a.getSnapshot():null,[a]),k=(0,r.useSyncExternalStore)(d,w),R=k&&(k.active==="zh"||k.active==="en")?k.active:null,W=(0,r.useRef)(null);W.current===null&&R&&(W.current=R);let U=(0,r.useMemo)(()=>{let _=W.current?`lang=${W.current}`:"";if(s==="config")return`${X}/ui/config?tab=config${_?`&${_}`:""}`;let $=C.replace(/\/$/,""),K=$.endsWith("/ui/app")?"?":"/?";return s?`${$}${K}tab=${s}${_?`&${_}`:""}`:_?`${$}${K}${_}`:C},[C,s]);(0,r.useEffect)(()=>{let _=g.current&&g.current.contentWindow;_&&R&&_.postMessage({source:"memory-eternal",type:"locale",lang:R},"*")},[R]),(0,r.useEffect)(()=>{let _=$=>{$.key==="Escape"&&n()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[n]);let T=(0,e.jsxs)("div",{className:"me-overlay-top",onClick:n,children:[(0,e.jsx)("style",{children:ct}),(0,e.jsx)("div",{className:"me-modal"+(i?" me-modal-full":""),onClick:_=>_.stopPropagation(),children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,position:"relative"},children:[(0,e.jsxs)("div",{className:"me-wctl",children:[(0,e.jsx)("button",{type:"button",className:"me-wctl-btn","data-me-wctl":i?"restore":"full","aria-pressed":i,onClick:()=>p(_=>!_),"aria-label":t(i?"exitFullscreen":"enterFullscreen"),title:t(i?"exitFullscreen":"enterFullscreen"),children:i?(0,e.jsx)(Do,{}):(0,e.jsx)(Lo,{})}),(0,e.jsx)("button",{type:"button",className:"me-wctl-btn me-wctl-close","data-me-wctl":"close",onClick:n,"aria-label":t("close"),title:t("close"),children:(0,e.jsx)(Io,{})})]}),(0,e.jsx)("iframe",{ref:g,src:U,title:"memory-eternal",allow:"clipboard-write; clipboard-read",onLoad:()=>S(!0),style:{width:"100%",flex:1,border:0,borderRadius:"inherit",background:"transparent"}}),!y&&(0,e.jsxs)("div",{className:"me-frame-boot",role:"status","aria-live":"polite",children:[(0,e.jsx)(oa,{}),(0,e.jsx)("span",{className:"me-loading-text",children:t("loading")})]})]})})]});return typeof document>"u"?T:(0,Pn.createPortal)(T,document.body)}function Fo(){return(0,e.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,e.jsx)("defs",{children:(0,e.jsxs)("linearGradient",{id:"mg-brain",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,e.jsx)("stop",{offset:"0%",stopColor:"#FFC46B"}),(0,e.jsx)("stop",{offset:"50%",stopColor:"#F97316"}),(0,e.jsx)("stop",{offset:"100%",stopColor:"#EA580C"})]})}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 0-6.4.1 4.1 4.1 0 0 0-2.7 5.9 4.1 4.1 0 0 0 .6 6.7A4.2 4.2 0 0 0 12 18.2Z"}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 1 6.4.1 4.1 4.1 0 0 1 2.7 5.9 4.1 4.1 0 0 1-.6 6.7A4.2 4.2 0 0 1 12 18.2Z"}),(0,e.jsx)("path",{d:"M12 9.2c-.8-1.4-1.7-2-3.1-2.2M12 9.2c.8-1.4 1.7-2 3.1-2.2M12 12.4c-1.2 1-3.2 1.6-5 1.4M12 12.4c1.2 1 3.2 1.6 5 1.4M12 13.2v4",fill:"none",stroke:"rgba(255,255,255,0.62)",strokeWidth:"1",strokeLinecap:"round"}),(0,e.jsx)("circle",{cx:"12",cy:"8.6",r:"1.1",fill:"rgba(255,255,255,0.85)"})]})}var qt="0.22.0";function Eo({t}){let[a,n]=(0,r.useState)(""),s="dsh-memory tui",i="dsh-memory tui --write",p=async(C,d)=>{try{await navigator.clipboard.writeText(C),n(d),setTimeout(()=>n(""),1600)}catch{}},y={border:"1px solid #3a404a",borderRadius:14,background:"#22262d",padding:"16px 18px"},S={margin:"10px 0 0",padding:"12px 14px",borderRadius:10,background:"#171a1f",border:"1px solid #333943",color:"#f3f5f8",fontSize:12.5,lineHeight:1.7,overflowX:"auto",fontFamily:"ui-monospace, Consolas, monospace"},g={marginTop:10,border:"1px solid #4a515c",background:"transparent",color:"#ffb08a",borderRadius:9,padding:"7px 12px",fontSize:12,cursor:"pointer"};return(0,e.jsxs)("div",{style:{padding:"22px 26px 34px",maxWidth:1040,color:"#f3f5f8"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:12,flexWrap:"wrap"},children:[(0,e.jsx)("h2",{style:{margin:0,fontSize:24,letterSpacing:"-.02em"},children:t("terminalTitle")}),(0,e.jsx)("span",{style:{color:"#99a1ac",fontSize:12},children:"TUI \xB7 LIVE \xB7 dsh-tui"})]}),(0,e.jsx)("p",{style:{margin:"9px 0 20px",color:"#aeb5bf",fontSize:13.5,lineHeight:1.8},children:t("terminalIntro")}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1.1fr) minmax(0, .9fr)",gap:14},children:[(0,e.jsxs)("div",{style:y,children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalRun")]}),(0,e.jsx)("pre",{style:S,children:s}),(0,e.jsx)("button",{type:"button",style:g,onClick:()=>p(s,"run"),children:a==="run"?"\u2713 "+t("terminalCopied"):"\u29C9 "+t("terminalCopy")}),(0,e.jsxs)("div",{style:{marginTop:12,color:"#99a1ac",fontSize:12,lineHeight:1.7},children:["\u9ED8\u8BA4\u8BFB\u53D6\u771F\u5B9E\u8BB0\u5FC6\u5E93\u4E0E\u5F85\u5BA1\u961F\u5217\uFF1B\u53EA\u8BFB\uFF0C\u786E\u8BA4\u540E\u624D\u7528 `--write`\u3002\u793A\u4F8B\u6570\u636E\u7528 `--demo`\u3002",(0,e.jsx)("br",{}),"\u6CA1\u6709 `dsh-memory` \u547D\u4EE4\u65F6\uFF1A`npx -p memory-eternal dsh-memory tui`"]})]}),(0,e.jsxs)("div",{style:y,children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalTui")]}),(0,e.jsx)("pre",{style:S,children:i}),(0,e.jsx)("button",{type:"button",style:g,onClick:()=>p(i,"tui"),children:a==="tui"?"\u2713 "+t("terminalCopied"):"\u29C9 "+t("terminalCopy")}),(0,e.jsx)("div",{style:{marginTop:12,color:"#99a1ac",fontSize:12,lineHeight:1.7},children:"\u771F\u5B9E\u6279\u51C6/\u9A73\u56DE\uFF1B\u4E0D\u786E\u5B9A\u65F6\u5148\u7528\u53EA\u8BFB\u6A21\u5F0F\u3002"})]})]}),(0,e.jsxs)("div",{style:{...y,marginTop:14},children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalPreview")]}),(0,e.jsx)("pre",{style:{...S,marginTop:10,color:"#d7dce3",fontSize:12,lineHeight:1.5},children:`\u256D\u2500 MEMORY ATLAS / \u5F85\u5BA1 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E
1018
+ `;function Do(t){t.effect(()=>t.locale.register(Yt,{zh:Hn,en:On}),"memory-eternal: locale");let a=t.locale.bind(Yt);t.effect(()=>t.slots.inject("settings.section",()=>t.slots.register({name:"settings.section",id:Yt,order:25,label:()=>a("nav"),locale:Yt,inject:()=>({})},()=>o.default.createElement(Ao,{t:a}))),"memory-eternal: settings section"),t.effect(()=>t.slots.inject("sidebar.footer.action",()=>t.slots.register({name:"sidebar.footer.action",id:`${Yt}:footer`,order:100,label:()=>a("nav"),locale:Yt,inject:()=>({})},n=>o.default.createElement(Lo,{t:a,locale:t.locale,wide:!(n&&n.wide===!1)}))),"memory-eternal: sidebar footer action")}function zo(){let[t,a]=(0,o.useState)(V+"/ui/app");return(0,o.useEffect)(()=>{let n=!0,r=()=>fetch("/memory-eternal/api/web-info").then(s=>s.json()).then(s=>{n&&s&&s.ok&&s.alive!==!1&&s.url&&a(s.url.endsWith("/")?s.url:s.url+"/")}).catch(()=>{});return fetch(V+"/ui/app",{method:"HEAD"}).then(s=>{if(n&&!s.ok)return r()}).catch(()=>n?r():void 0),()=>{n=!1}},[]),t}function Ao({t}){return(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[(0,e.jsx)("style",{children:ft}),(0,e.jsx)(Un,{t,onReload:()=>{},version:0})]})}function Lo({t,locale:a,wide:n}){let[r,s]=(0,o.useState)(!1);return(0,e.jsxs)("div",{className:`me-footer${n?"":" rail"}`,children:[(0,e.jsx)("style",{children:ft}),(0,e.jsxs)("button",{type:"button",className:"me-footer-btn",onClick:()=>s(!0),"aria-label":t("nav"),title:t("nav"),children:[(0,e.jsx)("span",{className:"me-footer-ico","aria-hidden":"true",children:(0,e.jsx)(Bo,{})}),(0,e.jsx)("span",{className:"me-footer-label",children:t("nav")})]}),r&&(0,e.jsx)(Eo,{t,locale:a,onClose:()=>s(!1)})]})}function Fo(){return(0,e.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4","aria-hidden":"true",children:(0,e.jsx)("rect",{x:"2.9",y:"2.9",width:"10.2",height:"10.2",rx:"1.7"})})}function Io(){return(0,e.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4","aria-hidden":"true",children:[(0,e.jsx)("rect",{x:"2.6",y:"5.4",width:"8",height:"8",rx:"1.5"}),(0,e.jsx)("path",{d:"M5.6 5.4V4.1c0-.9.7-1.6 1.6-1.6h4.7c.9 0 1.6.7 1.6 1.6v4.7c0 .9-.7 1.6-1.6 1.6h-1.3"})]})}function Po(){return(0,e.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M3.9 3.9l8.2 8.2M12.1 3.9l-8.2 8.2"})})}function Eo({t,locale:a,onClose:n,tab:r}){let[s,m]=(0,o.useState)(!1),[b,N]=(0,o.useState)(!1),g=(0,o.useRef)(null),C=zo(),p=(0,o.useCallback)(U=>a&&typeof a.subscribe=="function"?a.subscribe(U):()=>{},[a]),S=(0,o.useCallback)(()=>a&&typeof a.getSnapshot=="function"?a.getSnapshot():null,[a]),k=(0,o.useSyncExternalStore)(p,S),R=k&&(k.active==="zh"||k.active==="en")?k.active:null,$=(0,o.useRef)(null);$.current===null&&R&&($.current=R);let q=(0,o.useMemo)(()=>{let U=$.current?`lang=${$.current}`:"";if(r==="config")return`${V}/ui/config?tab=config${U?`&${U}`:""}`;let G=C.replace(/\/$/,""),K=G.endsWith("/ui/app")?"?":"/?";return r?`${G}${K}tab=${r}${U?`&${U}`:""}`:U?`${G}${K}${U}`:C},[C,r]);(0,o.useEffect)(()=>{let U=g.current&&g.current.contentWindow;U&&R&&U.postMessage({source:"memory-eternal",type:"locale",lang:R},"*")},[R]),(0,o.useEffect)(()=>{let U=G=>{G.key==="Escape"&&n()};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[n]);let D=(0,e.jsxs)("div",{className:"me-overlay-top",onClick:n,children:[(0,e.jsx)("style",{children:ft}),(0,e.jsx)("div",{className:"me-modal"+(s?" me-modal-full":""),onClick:U=>U.stopPropagation(),children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,position:"relative"},children:[(0,e.jsxs)("div",{className:"me-wctl",children:[(0,e.jsx)("button",{type:"button",className:"me-wctl-btn","data-me-wctl":s?"restore":"full","aria-pressed":s,onClick:()=>m(U=>!U),"aria-label":t(s?"exitFullscreen":"enterFullscreen"),title:t(s?"exitFullscreen":"enterFullscreen"),children:s?(0,e.jsx)(Io,{}):(0,e.jsx)(Fo,{})}),(0,e.jsx)("button",{type:"button",className:"me-wctl-btn me-wctl-close","data-me-wctl":"close",onClick:n,"aria-label":t("close"),title:t("close"),children:(0,e.jsx)(Po,{})})]}),(0,e.jsx)("iframe",{ref:g,src:q,title:"memory-eternal",allow:"clipboard-write; clipboard-read",onLoad:()=>N(!0),style:{width:"100%",flex:1,border:0,borderRadius:"inherit",background:"transparent"}}),!b&&(0,e.jsxs)("div",{className:"me-frame-boot",role:"status","aria-live":"polite",children:[(0,e.jsx)(ra,{}),(0,e.jsx)("span",{className:"me-loading-text",children:t("loading")})]})]})})]});return typeof document>"u"?D:(0,jn.createPortal)(D,document.body)}function Bo(){return(0,e.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,e.jsx)("defs",{children:(0,e.jsxs)("linearGradient",{id:"mg-brain",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,e.jsx)("stop",{offset:"0%",stopColor:"#FFC46B"}),(0,e.jsx)("stop",{offset:"50%",stopColor:"#F97316"}),(0,e.jsx)("stop",{offset:"100%",stopColor:"#EA580C"})]})}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 0-6.4.1 4.1 4.1 0 0 0-2.7 5.9 4.1 4.1 0 0 0 .6 6.7A4.2 4.2 0 0 0 12 18.2Z"}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 1 6.4.1 4.1 4.1 0 0 1 2.7 5.9 4.1 4.1 0 0 1-.6 6.7A4.2 4.2 0 0 1 12 18.2Z"}),(0,e.jsx)("path",{d:"M12 9.2c-.8-1.4-1.7-2-3.1-2.2M12 9.2c.8-1.4 1.7-2 3.1-2.2M12 12.4c-1.2 1-3.2 1.6-5 1.4M12 12.4c1.2 1 3.2 1.6 5 1.4M12 13.2v4",fill:"none",stroke:"rgba(255,255,255,0.62)",strokeWidth:"1",strokeLinecap:"round"}),(0,e.jsx)("circle",{cx:"12",cy:"8.6",r:"1.1",fill:"rgba(255,255,255,0.85)"})]})}var Vt="0.24.0";function jo({t}){let[a,n]=(0,o.useState)(""),r="dsh-memory tui",s="dsh-memory tui --write",m=async(C,p)=>{try{await navigator.clipboard.writeText(C),n(p),setTimeout(()=>n(""),1600)}catch{}},b={border:"1px solid #3a404a",borderRadius:14,background:"#22262d",padding:"16px 18px"},N={margin:"10px 0 0",padding:"12px 14px",borderRadius:10,background:"#171a1f",border:"1px solid #333943",color:"#f3f5f8",fontSize:12.5,lineHeight:1.7,overflowX:"auto",fontFamily:"ui-monospace, Consolas, monospace"},g={marginTop:10,border:"1px solid #4a515c",background:"transparent",color:"#ffb08a",borderRadius:9,padding:"7px 12px",fontSize:12,cursor:"pointer"};return(0,e.jsxs)("div",{style:{padding:"22px 26px 34px",maxWidth:1040,color:"#f3f5f8"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:12,flexWrap:"wrap"},children:[(0,e.jsx)("h2",{style:{margin:0,fontSize:24,letterSpacing:"-.02em"},children:t("terminalTitle")}),(0,e.jsx)("span",{style:{color:"#99a1ac",fontSize:12},children:"TUI \xB7 LIVE \xB7 dsh-tui"})]}),(0,e.jsx)("p",{style:{margin:"9px 0 20px",color:"#aeb5bf",fontSize:13.5,lineHeight:1.8},children:t("terminalIntro")}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1.1fr) minmax(0, .9fr)",gap:14},children:[(0,e.jsxs)("div",{style:b,children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalRun")]}),(0,e.jsx)("pre",{style:N,children:r}),(0,e.jsx)("button",{type:"button",style:g,onClick:()=>m(r,"run"),children:a==="run"?"\u2713 "+t("terminalCopied"):"\u29C9 "+t("terminalCopy")}),(0,e.jsxs)("div",{style:{marginTop:12,color:"#99a1ac",fontSize:12,lineHeight:1.7},children:["\u9ED8\u8BA4\u8BFB\u53D6\u771F\u5B9E\u8BB0\u5FC6\u5E93\u4E0E\u5F85\u5BA1\u961F\u5217\uFF1B\u53EA\u8BFB\uFF0C\u786E\u8BA4\u540E\u624D\u7528 `--write`\u3002\u793A\u4F8B\u6570\u636E\u7528 `--demo`\u3002",(0,e.jsx)("br",{}),"\u6CA1\u6709 `dsh-memory` \u547D\u4EE4\u65F6\uFF1A`npx -p memory-eternal dsh-memory tui`"]})]}),(0,e.jsxs)("div",{style:b,children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalTui")]}),(0,e.jsx)("pre",{style:N,children:s}),(0,e.jsx)("button",{type:"button",style:g,onClick:()=>m(s,"tui"),children:a==="tui"?"\u2713 "+t("terminalCopied"):"\u29C9 "+t("terminalCopy")}),(0,e.jsx)("div",{style:{marginTop:12,color:"#99a1ac",fontSize:12,lineHeight:1.7},children:"\u771F\u5B9E\u6279\u51C6/\u9A73\u56DE\uFF1B\u4E0D\u786E\u5B9A\u65F6\u5148\u7528\u53EA\u8BFB\u6A21\u5F0F\u3002"})]})]}),(0,e.jsxs)("div",{style:{...b,marginTop:14},children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalPreview")]}),(0,e.jsx)("pre",{style:{...N,marginTop:10,color:"#d7dce3",fontSize:12,lineHeight:1.5},children:`\u256D\u2500 MEMORY ATLAS / \u5F85\u5BA1 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E
951
1019
  \u2502 \u7C7B\u578B \u25CF \u5168\u90E8 7 \u25CB \u9879\u76EE 3 \u25CB \u77E5\u8BC6 1 \u25CB \u6559\u8BAD 1 \u2502
952
1020
  \u2502 \u2502
953
1021
  \u2502 \u25A3 \u5168\u9009 7 \u5DF2\u9009 3 s \u5168\u9009 \u2502
@@ -956,14 +1024,16 @@ Option A, because:
956
1024
  \u2502 \u25C9 [\u6559\u8BAD] shj-web \u7AEF\u53E3\u83DC\u5355\u9519\u4F4D \u2502
957
1025
  \u2502 \u2502
958
1026
  \u2502 [a] \u6279\u51C6 3 [r] \u9A73\u56DE [s] \u53CD\u9009 [Esc] \u6E05\u7A7A \u2502
959
- \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F`})]}),(0,e.jsxs)("div",{style:{marginTop:16,color:"#99a1ac",fontSize:12.5,lineHeight:1.8},children:[(0,e.jsx)("b",{style:{color:"#f3f5f8"},children:t("terminalWhy")}),(0,e.jsx)("br",{}),t("terminalWhyBody")]})]})}var ja=class extends r.default.Component{constructor(a){super(a),this.state={error:null}}static getDerivedStateFromError(a){return{error:a||new Error("unknown")}}componentDidCatch(a,n){try{console.warn("[memory-eternal] \u8BB0\u5FC6\u9762\u677F\u6E32\u67D3\u5F02\u5E38\uFF08\u5DF2\u515C\u5E95\uFF0C\u4E0D\u518D\u6574\u9875\u767D\u5C4F\uFF09",a,n&&n.componentStack)}catch{}}render(){if(!this.state.error)return this.props.children;let a=String(this.state.error&&this.state.error.message||this.state.error||"unknown");return(0,e.jsxs)("div",{style:{padding:"22px 24px",fontFamily:'system-ui, "Segoe UI", "Microsoft YaHei", sans-serif',color:"var(--dsw-alias-label-primary, #1f2937)"},children:[(0,e.jsx)("div",{style:{fontSize:15,fontWeight:700,marginBottom:6},children:"\u8BB0\u5FC6\u9762\u677F\u6E32\u67D3\u51FA\u9519"}),(0,e.jsx)("div",{style:{fontSize:12.5,opacity:.75,lineHeight:1.7,marginBottom:14,wordBreak:"break-all"},children:a}),(0,e.jsx)("div",{style:{fontSize:12,opacity:.6,marginBottom:14,lineHeight:1.7},children:"\u5DF2\u7ECF\u515C\u5E95\u4F4F\uFF0C\u4E0D\u4F1A\u518D\u6574\u9875\u767D\u5C4F\u3002\u70B9\u300C\u91CD\u65B0\u52A0\u8F7D\u300D\u53EF\u6062\u590D\uFF1B\u53CD\u590D\u51FA\u73B0\u8BF7\u7528\u5DE6\u680F\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5E26\u4E0A\u8FD9\u6BB5\u62A5\u9519\u3002"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{try{window.location.reload()}catch{}},children:"\u91CD\u65B0\u52A0\u8F7D"})]})}};function Bo(t){return(0,e.jsx)(ja,{children:(0,e.jsx)(jo,{...t})})}function jo({t,inModal:a,onClose:n}){let s=typeof window<"u"&&(!!window.__DSH_BOOT__||String(location.pathname||"").includes("/memory-eternal/api/ui/app")),[i,p]=(0,r.useState)(null),[y,S]=(0,r.useState)(()=>{try{let h=localStorage.getItem("me-ui-scale");return["compact","normal","large"].includes(h)?h:"normal"}catch{return"normal"}}),[g,C]=(0,r.useState)([]),[d,w]=(0,r.useState)(!0),[k,R]=(0,r.useState)(null),[W,U]=(0,r.useState)(""),[T,_]=(0,r.useState)("all"),[$,K]=(0,r.useState)(""),[he,q]=(0,r.useState)("all"),[L,j]=(0,r.useState)("all"),[H,I]=(0,r.useState)(()=>{try{return new Set(JSON.parse(localStorage.getItem("me-pinned-v5")||"[]"))}catch{return new Set}}),[Y,ce]=(0,r.useState)(!1),ye=(0,r.useCallback)(h=>{I(E=>{let Z=new Set(E);Z.has(h)?Z.delete(h):Z.add(h);try{localStorage.setItem("me-pinned-v5",JSON.stringify([...Z]))}catch{}return Z})},[]),[ae,Be]=(0,r.useState)(""),[m,Te]=(0,r.useState)(()=>{try{let h=new URLSearchParams(typeof location<"u"?location.search:"").get("tab"),E={cards:"cards",graph:"graph",news:"news",usage:"stats",stats:"stats",audit:"audit",recycle:"optimize",optimize:"optimize",config:"config",terminal:"terminal"};if(h&&E[h])return E[h]}catch{}return"cards"}),[ne,Me]=(0,r.useState)(()=>new Set([m])),re=(0,r.useCallback)(h=>{Me(E=>E.has(h)?E:new Set(E).add(h)),Te(h)},[]),[J,Ae]=(0,r.useState)("recent"),[Le,ee]=(0,r.useState)(null),M=(0,r.useRef)(null),z=(0,r.useRef)(null),[x,Q]=(0,r.useState)(!1),[me,Fe]=(0,r.useState)(!1),[ie,fe]=(0,r.useState)(0),[u,O]=(0,r.useState)(null),[G,ue]=(0,r.useState)(!1),[N,D]=(0,r.useState)(!1),[se,A]=(0,r.useState)(!1),[oe,ve]=(0,r.useState)("group"),[Se,De]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let h=E=>{let Z=E&&E.detail;if(["compact","normal","large"].includes(Z)){S(Z);try{localStorage.setItem("me-ui-scale",Z)}catch{}}};return window.addEventListener("me-ui-scale",h),()=>window.removeEventListener("me-ui-scale",h)},[]);let nt=(0,r.useCallback)(()=>{De(!1);try{localStorage.setItem("me-onboard-v2","1")}catch{}},[]),qe=(0,r.useCallback)((h="group")=>{ve(h),A(!0)},[]),Rt=(0,r.useRef)(!1),zt=(0,r.useCallback)(async()=>{if(Rt.current)return;Rt.current=!0;let h=(E,Z=!0)=>{M.current&&clearTimeout(M.current),ee({ok:Z,msg:E}),M.current=setTimeout(()=>ee(null),3e3)};h(t("webOpening"));try{let E=await fetch(`${X}/open-web`,{method:"POST"}).then(be=>be.json()).catch(()=>null);if(E&&E.ok&&E.url){h(t("webOpened")+" \xB7 "+E.url);return}let Z=await fetch(`${X}/web-info`).then(be=>be.json()).catch(()=>null),we=Z&&Z.ok&&Z.url||"http://127.0.0.1:7999/",ke=window.open(we,"_blank","noopener,noreferrer");h(ke?t("webOpened")+" \xB7 "+we:t("webOpenFail")+" \xB7 "+we,!!ke)}catch{h(t("webOpenFail"),!1)}finally{Rt.current=!1}},[t]);(0,r.useEffect)(()=>{try{if(localStorage.getItem("me-onboard-v2")||m!=="cards")return;let h=setTimeout(()=>De(!0),900);return()=>clearTimeout(h)}catch{}},[m]);let[je,Ke]=(0,r.useState)(!0),[Et,_e]=(0,r.useState)(null),[b,c]=(0,r.useState)(0),le=(0,r.useCallback)(()=>c(h=>h+1),[]),Ne=i?.quarantine?.pending??0,He=i?.quarantine?.deleted??0,Ye=(0,r.useRef)(null),[Ue,St]=(0,r.useState)(0),[At,o]=(0,r.useState)(!1),Ct=(0,r.useRef)(null),Bt=(0,r.useRef)(null),vt=(0,r.useCallback)(async(h=T,E=$,Z=L,we={})=>{let ke=we.append===!0;try{ke?o(!0):(w(!0),U(""));let be=new URLSearchParams;h&&h!=="all"&&be.set("kind",h),E.trim()&&be.set("q",E.trim());let tt=we.tag!==void 0?we.tag:ae;tt&&be.set("tag",tt),be.set("status",Z||"all"),be.set("limit",String(So)),be.set("offset",String(we.offset||0)),J==="title"&&be.set("sort","title");let ht=await(await fetch(`${X}/cards?${be.toString()}`)).json();if(ht.ok){let dt=ht.cards||[];C(pt=>ke?[...pt,...dt.filter(ya=>!pt.some(va=>va.path===ya.path))]:dt),St(Number(ht.total)||dt.length)}}catch(be){U(String(be&&be.message?be.message:be))}finally{ke?o(!1):w(!1)}},[T,$,L,J,ae]),Ze=(0,r.useCallback)(async()=>{try{let[h,E,Z,we]=await Promise.all([fetch(`${X}/overview`).then(be=>be.json()),fetch(`${X}/capture-log`).then(be=>be.json()).catch(()=>null),fetch(`${X}/config`).then(be=>be.json()).catch(()=>null),fetch(`${X}/news?unread=1&limit=1`).then(be=>be.json()).catch(()=>null)]);h.ok&&p(h),we&&we.ok&&fe(Number((we.counts||{}).unread)||0);let ke=Z&&Z.ok&&Z.config&&Z.config.uiScale;if(["compact","normal","large"].includes(ke)){S(ke);try{localStorage.setItem("me-ui-scale",ke)}catch{}}R(E&&E.ok&&E.available&&E.health||null)}catch(h){U(String(h&&h.message?h.message:h))}finally{w(!1)}},[]),l=async h=>{try{let Z=await(await fetch(`${X}/delete?path=${encodeURIComponent(h)}`)).json();Z.ok?(ee({ok:!0,msg:t("deleted")}),await Ze(),le()):ee({ok:!1,msg:Z.error||t("deleteFail")})}catch{ee({ok:!1,msg:t("deleteFail")})}M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ee(null),2e3)};(0,r.useEffect)(()=>(Ze(),()=>{Ye.current&&clearTimeout(Ye.current)}),[Ze]);let te=h=>{K(h),Ye.current&&clearTimeout(Ye.current),Ye.current=setTimeout(()=>vt(T,h,L),280)},de=h=>{_(h),vt(h,$,L)},Pe=h=>{let E=String(h||"");Be(E),O(null),vt(T,$,L,{tag:E})};(0,r.useEffect)(()=>{m==="cards"&&vt(T,$,L)},[L,m,b,J,ae]),(0,r.useEffect)(()=>{if(m!=="cards"||d||At||g.length>=Ue)return;let h=Ct.current,E=Bt.current;if(!h)return;let Z=new IntersectionObserver(we=>{we[0]&&we[0].isIntersecting&&vt(T,$,L,{append:!0,offset:g.length})},{root:E||null,rootMargin:"400px"});return Z.observe(h),()=>Z.disconnect()},[m,g,Ue,d,At,T,$,L,vt]);let Re=async(h,E)=>{try{let Z=await fetch(`${X}/card-kind`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:h,kind:E})}).then(we=>we.json());!Z||!Z.ok?ee({ok:!1,msg:Z&&Z.error||t("coreSetFail")}):(O(we=>we&&we.path===h?{...we,kind:Z.kind}:we),await Ze(),le(),ee({ok:!0,msg:t(E==="core"?"coreSetOk":"coreUnsetOk")}))}catch(Z){ee({ok:!1,msg:String(Z&&Z.message||Z)})}M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ee(null),2e3)},xe=async h=>{try{let E=h.status;if(!E&&h.path)try{let tt=((await fetch(`${X}/cards?status=all&q=${encodeURIComponent(h.title||"")}&limit=50`).then(xt=>xt.json())).cards||[]).find(xt=>xt.path===h.path);tt&&(E=tt.status)}catch{}let Z=E&&E!=="approved"?`&status=${encodeURIComponent(E)}`:"",we=await fetch(`${X}/card?path=${encodeURIComponent(h.path||h.id)}${Z}`),ke=await we.json();ke.ok?O({path:ke.path,title:h.title,text:ke.text,kind:h.kind||"knowledge",status:E||"approved"}):U(ke.error||`HTTP ${we.status}`)}catch(E){U(String(E&&E.message?E.message:E))}},Ee=async(h,E)=>{Q(!0);try{let Z=await fetch(`${X}/export`);if(!Z.ok)throw new Error("HTTP "+Z.status);let we=await Z.json();if(!we.ok)throw new Error(we.error||"export failed");let ke,be,tt;if(h==="json"){be="memory-vault.json",tt="application/json";let dt=we.cards.map(pt=>({path:pt.path,title:pt.title,kind:pt.kind,status:pt.status,store:pt.store,text:pt.text}));ke=JSON.stringify({format:we.format||"memory-eternal-vault",formatVersion:we.formatVersion||1,exportedAt:we.exportedAt||new Date().toISOString(),count:dt.length,cards:dt},null,2)}else be="memory-vault.md",tt="text/markdown;charset=utf-8",ke=we.cards.map(dt=>dt.text.trim()).filter(Boolean).join(`
1027
+ \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F`})]}),(0,e.jsxs)("div",{style:{marginTop:16,color:"#99a1ac",fontSize:12.5,lineHeight:1.8},children:[(0,e.jsx)("b",{style:{color:"#f3f5f8"},children:t("terminalWhy")}),(0,e.jsx)("br",{}),t("terminalWhyBody")]})]})}var Wa=class extends o.default.Component{constructor(a){super(a),this.state={error:null}}static getDerivedStateFromError(a){return{error:a||new Error("unknown")}}componentDidCatch(a,n){try{console.warn("[memory-eternal] \u8BB0\u5FC6\u9762\u677F\u6E32\u67D3\u5F02\u5E38\uFF08\u5DF2\u515C\u5E95\uFF0C\u4E0D\u518D\u6574\u9875\u767D\u5C4F\uFF09",a,n&&n.componentStack)}catch{}}render(){if(!this.state.error)return this.props.children;let a=String(this.state.error&&this.state.error.message||this.state.error||"unknown");return(0,e.jsxs)("div",{style:{padding:"22px 24px",fontFamily:'system-ui, "Segoe UI", "Microsoft YaHei", sans-serif',color:"var(--dsw-alias-label-primary, #1f2937)"},children:[(0,e.jsx)("div",{style:{fontSize:15,fontWeight:700,marginBottom:6},children:"\u8BB0\u5FC6\u9762\u677F\u6E32\u67D3\u51FA\u9519"}),(0,e.jsx)("div",{style:{fontSize:12.5,opacity:.75,lineHeight:1.7,marginBottom:14,wordBreak:"break-all"},children:a}),(0,e.jsx)("div",{style:{fontSize:12,opacity:.6,marginBottom:14,lineHeight:1.7},children:"\u5DF2\u7ECF\u515C\u5E95\u4F4F\uFF0C\u4E0D\u4F1A\u518D\u6574\u9875\u767D\u5C4F\u3002\u70B9\u300C\u91CD\u65B0\u52A0\u8F7D\u300D\u53EF\u6062\u590D\uFF1B\u53CD\u590D\u51FA\u73B0\u8BF7\u7528\u5DE6\u680F\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5E26\u4E0A\u8FD9\u6BB5\u62A5\u9519\u3002"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{try{window.location.reload()}catch{}},children:"\u91CD\u65B0\u52A0\u8F7D"})]})}};function Ho(t){return(0,e.jsx)(Wa,{children:(0,e.jsx)(Oo,{...t})})}function Oo({t,inModal:a,onClose:n}){let r=typeof window<"u"&&(!!window.__DSH_BOOT__||String(location.pathname||"").includes("/memory-eternal/api/ui/app")),[s,m]=(0,o.useState)(null),[b,N]=(0,o.useState)(()=>{try{let w=localStorage.getItem("me-ui-scale");return["compact","normal","large"].includes(w)?w:"normal"}catch{return"normal"}}),[g,C]=(0,o.useState)([]),[p,S]=(0,o.useState)(!0),[k,R]=(0,o.useState)(null),[$,q]=(0,o.useState)(""),[D,U]=(0,o.useState)("all"),[G,K]=(0,o.useState)(""),[be,J]=(0,o.useState)("all"),[A,O]=(0,o.useState)("all"),[W,I]=(0,o.useState)(()=>{try{return new Set(JSON.parse(localStorage.getItem("me-pinned-v5")||"[]"))}catch{return new Set}}),[Y,re]=(0,o.useState)(!1),he=(0,o.useCallback)(w=>{I(_=>{let te=new Set(_);te.has(w)?te.delete(w):te.add(w);try{localStorage.setItem("me-pinned-v5",JSON.stringify([...te]))}catch{}return te})},[]),[oe,_e]=(0,o.useState)(""),[P,Ie]=(0,o.useState)(()=>{try{let w=new URLSearchParams(typeof location<"u"?location.search:"").get("tab"),_={cards:"cards",graph:"graph",news:"news",usage:"stats",stats:"stats",audit:"audit",recycle:"optimize",optimize:"optimize",config:"config",terminal:"terminal"};if(w&&_[w])return _[w]}catch{}return"cards"}),[y,Re]=(0,o.useState)(()=>new Set([P])),ee=(0,o.useCallback)(w=>{Re(_=>_.has(w)?_:new Set(_).add(w)),Ie(w)},[]),[Z,Oe]=(0,o.useState)("recent"),[Ae,ne]=(0,o.useState)(null),M=(0,o.useRef)(null),z=(0,o.useRef)(null),[v,X]=(0,o.useState)(!1),[se,Ee]=(0,o.useState)(!1),[Pe,ce]=(0,o.useState)(0),[d,H]=(0,o.useState)(null),[F,ye]=(0,o.useState)(!1),[De,ve]=(0,o.useState)(!1),[xe,L]=(0,o.useState)(!1),[le,Se]=(0,o.useState)("group"),[fe,et]=(0,o.useState)(!1);(0,o.useEffect)(()=>{let w=_=>{let te=_&&_.detail;if(["compact","normal","large"].includes(te)){N(te);try{localStorage.setItem("me-ui-scale",te)}catch{}}};return window.addEventListener("me-ui-scale",w),()=>window.removeEventListener("me-ui-scale",w)},[]);let bt=(0,o.useCallback)(()=>{et(!1);try{localStorage.setItem("me-onboard-v2","1")}catch{}},[]),He=(0,o.useCallback)((w="group")=>{Se(w),L(!0)},[]),pt=(0,o.useRef)(!1),Ze=(0,o.useCallback)(async()=>{if(pt.current)return;pt.current=!0;let w=(_,te=!0)=>{M.current&&clearTimeout(M.current),ne({ok:te,msg:_}),M.current=setTimeout(()=>ne(null),3e3)};w(t("webOpening"));try{let _=await fetch(`${V}/open-web`,{method:"POST"}).then(ge=>ge.json()).catch(()=>null);if(_&&_.ok&&_.url){w(t("webOpened")+" \xB7 "+_.url);return}let te=await fetch(`${V}/web-info`).then(ge=>ge.json()).catch(()=>null),we=te&&te.ok&&te.url||"http://127.0.0.1:7999/",ke=window.open(we,"_blank","noopener,noreferrer");w(ke?t("webOpened")+" \xB7 "+we:t("webOpenFail")+" \xB7 "+we,!!ke)}catch{w(t("webOpenFail"),!1)}finally{pt.current=!1}},[t]);(0,o.useEffect)(()=>{try{if(localStorage.getItem("me-onboard-v2")||P!=="cards")return;let w=setTimeout(()=>et(!0),900);return()=>clearTimeout(w)}catch{}},[P]);let[Be,Ge]=(0,o.useState)(!0),[xt,Ke]=(0,o.useState)(0),[h,c]=(0,o.useState)(null),[ie,je]=(0,o.useState)(0),u=(0,o.useCallback)(()=>je(w=>w+1),[]),T=s?.quarantine?.pending??0,de=(s?.quarantine?.deleted??0)+(s?.quarantine?.rejected??0),We=(0,o.useRef)(null),[wt,i]=(0,o.useState)(0),[ht,kt]=(0,o.useState)(!1),St=(0,o.useRef)(null),_t=(0,o.useRef)(null),ct=(0,o.useCallback)(async(w=D,_=G,te=A,we={})=>{let ke=we.append===!0;try{ke?kt(!0):(S(!0),q(""));let ge=new URLSearchParams;w&&w!=="all"&&ge.set("kind",w),_.trim()&&ge.set("q",_.trim());let Xe=we.tag!==void 0?we.tag:oe;Xe&&ge.set("tag",Xe),ge.set("status",te||"all"),ge.set("limit",String(Co)),ge.set("offset",String(we.offset||0)),Z==="title"&&ge.set("sort","title");let Rt=await(await fetch(`${V}/cards?${ge.toString()}`)).json();if(Rt.ok){let Lt=Rt.cards||[];C(Dt=>ke?[...Dt,...Lt.filter(wa=>!Dt.some(ka=>ka.path===wa.path))]:Lt),i(Number(Rt.total)||Lt.length)}}catch(ge){q(String(ge&&ge.message?ge.message:ge))}finally{ke?kt(!1):S(!1)}},[D,G,A,Z,oe]),tt=(0,o.useCallback)(async()=>{try{let[w,_,te,we]=await Promise.all([fetch(`${V}/overview`).then(ge=>ge.json()),fetch(`${V}/capture-log`).then(ge=>ge.json()).catch(()=>null),fetch(`${V}/config`).then(ge=>ge.json()).catch(()=>null),fetch(`${V}/news?unread=1&limit=1`).then(ge=>ge.json()).catch(()=>null)]);w.ok&&m(w),we&&we.ok&&ce(Number((we.counts||{}).unread)||0);let ke=te&&te.ok&&te.config&&te.config.uiScale;if(["compact","normal","large"].includes(ke)){N(ke);try{localStorage.setItem("me-ui-scale",ke)}catch{}}R(_&&_.ok&&_.available&&_.health||null)}catch(w){q(String(w&&w.message?w.message:w))}finally{S(!1)}},[]),l=async w=>{try{let te=await(await fetch(`${V}/delete?path=${encodeURIComponent(w)}`)).json();te.ok?(ne({ok:!0,msg:t("deleted")}),await tt(),u()):ne({ok:!1,msg:te.error||t("deleteFail")})}catch{ne({ok:!1,msg:t("deleteFail")})}M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ne(null),2e3)};(0,o.useEffect)(()=>(tt(),()=>{We.current&&clearTimeout(We.current)}),[tt]);let ae=w=>{K(w),We.current&&clearTimeout(We.current),We.current=setTimeout(()=>ct(D,w,A),280)},pe=w=>{U(w),ct(w,G,A)},Me=w=>{let _=String(w||"");_e(_),H(null),ct(D,G,A,{tag:_})};(0,o.useEffect)(()=>{P==="cards"&&ct(D,G,A)},[A,P,ie,Z,oe]),(0,o.useEffect)(()=>{if(P!=="cards"||p||ht||g.length>=wt)return;let w=St.current,_=_t.current;if(!w)return;let te=new IntersectionObserver(we=>{we[0]&&we[0].isIntersecting&&ct(D,G,A,{append:!0,offset:g.length})},{root:_||null,rootMargin:"400px"});return te.observe(w),()=>te.disconnect()},[P,g,wt,p,ht,D,G,A,ct]);let Te=async(w,_)=>{try{let te=await fetch(`${V}/card-kind`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:w,kind:_})}).then(we=>we.json());!te||!te.ok?ne({ok:!1,msg:te&&te.error||t("coreSetFail")}):(H(we=>we&&we.path===w?{...we,kind:te.kind}:we),await tt(),u(),ne({ok:!0,msg:t(_==="core"?"coreSetOk":"coreUnsetOk")}))}catch(te){ne({ok:!1,msg:String(te&&te.message||te)})}M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ne(null),2e3)},Ne=async w=>{try{let _=w.status;if(!_&&w.path)try{let Xe=((await fetch(`${V}/cards?status=all&q=${encodeURIComponent(w.title||"")}&limit=50`).then(Nt=>Nt.json())).cards||[]).find(Nt=>Nt.path===w.path);Xe&&(_=Xe.status)}catch{}let te=_&&_!=="approved"?`&status=${encodeURIComponent(_)}`:"",we=await fetch(`${V}/card?path=${encodeURIComponent(w.path||w.id)}${te}`),ke=await we.json();ke.ok?H({path:ke.path,title:w.title,text:ke.text,kind:w.kind||"knowledge",status:_||"approved"}):q(ke.error||`HTTP ${we.status}`)}catch(_){q(String(_&&_.message?_.message:_))}},Le=async(w,_)=>{X(!0);try{let te=await fetch(`${V}/export`);if(!te.ok)throw new Error("HTTP "+te.status);let we=await te.json();if(!we.ok)throw new Error(we.error||"export failed");let ke,ge,Xe;if(w==="json"){ge="memory-vault.json",Xe="application/json";let Lt=we.cards.map(Dt=>({path:Dt.path,title:Dt.title,kind:Dt.kind,status:Dt.status,store:Dt.store,text:Dt.text}));ke=JSON.stringify({format:we.format||"memory-eternal-vault",formatVersion:we.formatVersion||1,exportedAt:we.exportedAt||new Date().toISOString(),count:Lt.length,cards:Lt},null,2)}else ge="memory-vault.md",Xe="text/markdown;charset=utf-8",ke=we.cards.map(Lt=>Lt.text.trim()).filter(Boolean).join(`
960
1028
 
961
1029
  ---
962
1030
 
963
- `);let xt=new Blob([ke],{type:tt}),ht=await ur(xt,be,!1);if(!ht.ok){ee({ok:!1,msg:t("exportFail")}),Q(!1);return}ee({ok:!0,msg:t("exportedTo")+"\uFF1A"+t("defaultDownloads")+" \xB7 "+ht.name})}catch(Z){ee({ok:!1,msg:t("exportFail")+" \xB7 "+(Z.message||"")})}finally{Q(!1)}M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ee(null),2600)},bt=async h=>{let E=h.target.files&&h.target.files[0];if(h.target.value="",!!E){try{let Z=await E.text(),ke=await(await fetch(`${X}/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:Z})).json();if(ke.ok){await Ze();let be=ke.imported||0,tt=t("importedVault")+"\uFF1A"+be;ke.total&&(tt+=t("importedTotal")+ke.total+t("importedTotalTail")),ke.quarantined&&(tt+=t("importedQuarantine")+ke.quarantined+t("importedQuarantineTail")),ke.skipped&&(tt+=t("importedSkipped")+ke.skipped+t("importedSkippedTail")),ke.warning&&(tt+=" \xB7 "+ke.warning),ee({ok:be>0||!ke.total,msg:tt})}else ee({ok:!1,msg:ke.error||t("importFail")})}catch{ee({ok:!1,msg:t("importFail")})}M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ee(null),2400)}},ut=async()=>{if(!me){Fe(!0);try{let h=await fetch(`${X}/skills/sync`,{method:"POST"}).then(E=>E.json()).catch(()=>null);if(h&&h.ok){let E=t("skillsSyncDone")+" \xB7 "+t("skillsScanned")+" "+(h.total||0)+" \xB7 "+t("skillsCreated")+" "+(h.created||0)+" \xB7 "+t("skillsUpdated")+" "+(h.updated||0)+" \xB7 "+t("skillsPendingUpdates")+" "+(h.pendingUpdates||0);ee({ok:!0,msg:E}),await Ze(),le()}else ee({ok:!1,msg:h&&h.error||t("skillsSyncFail")})}catch{ee({ok:!1,msg:t("skillsSyncFail")})}finally{Fe(!1)}M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ee(null),3600)}},et=(0,r.useMemo)(()=>{let h=g.slice();return he!=="all"&&(h=h.filter(E=>Pt(E.submittedBy)===he)),L!=="all"&&(h=h.filter(E=>(E.status||"approved")===L)),Y&&(h=h.filter(E=>H.has(E.path))),J==="title"?h.sort((E,Z)=>String(E.title||"").localeCompare(String(Z.title||""))):J==="hot"?h.sort((E,Z)=>(Z.weight||Z.links||0)-(E.weight||E.links||0)):h.sort((E,Z)=>new Date(Z.updated||0).getTime()-new Date(E.updated||0).getTime()),h},[g,J,he,L,Y,H]),_t=(0,r.useMemo)(()=>[...new Set(g.map(h=>Pt(h.submittedBy)))],[g]),Ut=(0,r.useMemo)(()=>{let h={};for(let E of g){let Z=new Set(E.tags||[]),we=0;for(let ke of g)ke.path!==E.path&&(ke.tags||[]).some(be=>Z.has(be))&&we++;h[E.path]=we}return h},[g]),[gt,Lt]=(0,r.useState)(null),$e=(0,r.useMemo)(()=>{if(!et.length)return null;let h=gt?et.find(Z=>Z.path===gt):null;return h||et.find(Z=>Date.now()-new Date(Z.updated||0).getTime()>21*864e5)||et[0]},[et,gt]),Yt=()=>{if(!et.length)return;let h=et.findIndex(E=>E.path===($e&&$e.path));Lt(et[(h+1+et.length)%et.length].path)},jt=!$&&T==="all"&&!ae&&L==="all"&&!!$e;return(0,e.jsxs)("div",{className:"memory-eternal-root me-v5","data-ui-scale":y,style:{height:"100%",width:"100%",zoom:y==="large"?1.15:y==="compact"?.92:1.06,overflow:"hidden",display:"flex",flexDirection:"column"},children:[(0,e.jsx)("style",{children:ct}),!a&&(0,e.jsxs)("div",{className:`mc-v5-top${s?" in-host":""}`,children:[(0,e.jsx)("img",{className:"mc-v5-logo",src:da,alt:""}),(0,e.jsxs)("span",{className:"mc-v5-crumb",children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("i",{children:"/"}),(0,e.jsx)("span",{children:t(m==="cards"?"cardsTab":m==="graph"?"graphTab":m==="news"?"newsTab":m==="stats"?"tabUsage":m==="audit"?"tabAudit":m==="optimize"?"tabRecycle":m==="terminal"?"terminalTab":"tabConfig")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsxs)("div",{className:"mc-v5-top-actions",children:[(0,e.jsxs)("span",{className:"mc-v5-sys",children:[(0,e.jsx)("i",{}),t("v5Local")]}),(0,e.jsxs)("span",{className:"mc-v5-ver",children:["v",qt]}),(0,e.jsxs)("button",{type:"button",className:"mc-v5-star",onClick:()=>Ba("https://github.com/EternalNight996/memory-eternal"),title:t("v5Star"),children:["\u2605 ",(0,e.jsx)("span",{className:"mc-v5-star-label",children:"Star"})]}),(0,e.jsx)("button",{type:"button",className:"mc-v5-help",onClick:()=>qe("group"),title:t("supportTitle"),"aria-label":t("supportTitle"),children:"?"})]})]}),Le&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(Le.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:Le.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:Le.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{children:Le.msg})]}),a&&(0,e.jsxs)("div",{className:"me-modal-head",children:[(0,e.jsxs)("div",{className:"me-modal-title",children:[(0,e.jsx)("span",{className:"me-wicon",children:(0,e.jsx)("img",{src:da,alt:""})}),(0,e.jsx)("h2",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:t("memoryHint")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("button",{type:"button",className:"me-modal-close me-modal-x",onClick:n,"aria-label":t("close"),title:t("close"),children:(0,e.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})})})]}),k&&k.ok===!1&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,margin:"0 0 8px",padding:"9px 14px",borderRadius:10,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.45)",borderLeft:"4px solid #ef4444",color:"var(--dsw-alias-label-primary, #e5e7eb)",fontSize:12.5,lineHeight:1.6},children:[(0,e.jsxs)("span",{style:{fontWeight:800},children:["\u26A0 ",t("captureAlert")]}),(0,e.jsxs)("span",{style:{flex:1},children:[k.reason,(0,e.jsx)("div",{style:{opacity:.68,fontSize:11.5,marginTop:2},children:t("captureAlertHint")})]}),(0,e.jsx)("span",{style:{opacity:.7},children:k.since?Tt(new Date(k.since).toISOString()):""})]}),(0,e.jsxs)("div",{className:"me-modal-body",children:[(0,e.jsxs)("div",{className:`mc-rail${je?" open":""}`,children:[(0,e.jsxs)("div",{className:"mc-v5-rail-top",children:[je&&(0,e.jsxs)("div",{className:"mc-v5-railbrand",children:[(0,e.jsx)("img",{className:"mark",src:da,alt:""}),(0,e.jsxs)("div",{children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:"MEMORY ATLAS"})]})]}),(0,e.jsx)("button",{type:"button",className:"mc-rail-collapse",onClick:()=>Ke(h=>!h),"aria-label":t(je?"collapse":"expand"),title:t(je?"collapse":"expand"),children:je?"\xAB":"\xBB"})]}),je&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navWorkspace")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="cards"?" active":""}`,onClick:()=>re("cards"),title:t("cardsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E0}"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("cardsTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="graph"?" active":""}`,onClick:()=>re("graph"),title:t("graphTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F52E}"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("graphTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="news"?" active":""}`,onClick:()=>re("news"),title:t("newsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4F0}"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("newsTab")}),ie>0&&(0,e.jsx)("span",{className:"mc-dot",children:ie>99?"99+":ie})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="stats"?" active":""}`,onClick:()=>re("stats"),title:t("tabUsage"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4C8}"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabUsage")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="audit"?" active":""}`,onClick:()=>re("audit"),title:t("tabAudit"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F50D}"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabAudit")}),Ne>0&&(0,e.jsx)("span",{className:"mc-dot",children:Ne>99?"99+":Ne})]}),je&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSystem")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="optimize"?" active":""}`,onClick:()=>re("optimize"),title:t("tabRecycle"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u267B\uFE0F"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabRecycle")}),He>0&&(0,e.jsx)("span",{className:"mc-dot",style:{background:"#6b7280"},children:He>99?"99+":He})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="terminal"?" active":""}`,onClick:()=>re("terminal"),title:t("terminalTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u25B8_"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("terminalTab")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:zt,title:t("webTab"),"aria-label":t("webTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F310}"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("webTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="config"?" active":""}`,onClick:()=>re("config"),title:t("tabConfig"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2699\uFE0F"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabConfig")})]}),je&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSupport")}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>qe("group"),title:t("supportGroup"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4AC}"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportGroup")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>qe("sponsor"),title:t("supportSponsor"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2615"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportSponsor")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>qe("legacy"),title:t("supportLegacy"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E9}"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportLegacy")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>D(!0),title:t("fbNav"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F41E}"}),je&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("fbNav")})]})]}),(0,e.jsxs)("div",{className:"mc-main",ref:Bt,children:[i&&i.db&&i.db.writable===!1?(0,e.jsxs)("div",{style:{margin:"8px 10px 0",padding:"8px 12px",borderRadius:8,fontSize:12,lineHeight:1.7,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.35)",color:"#b91c1c"},children:["\u26A0\uFE0F ",t("dbReadonlyTitle"),"\uFF1A",i.db.error||"\u2014"," \u2014\u2014 ",t("dbReadonlyBody"),(0,e.jsx)("div",{style:{opacity:.85,marginTop:2},children:t("dbReadonlyFix")})]}):null,m==="cards"&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY LIBRARY"}),(0,e.jsx)("h1",{children:t("memoryTitle")}),(0,e.jsx)("p",{children:t("memoryHint")}),(0,e.jsxs)("div",{className:"mc-v5-pagehead-stats",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:i?.total??"\u2014"})," ",t("cardsUnit")]}),(0,e.jsxs)("span",{children:[t("recent")," +",i?.recent??0]}),(0,e.jsxs)("span",{children:[t("pending")," ",i?.quarantine?.pending??i?.status?.pending??0]}),(0,e.jsxs)("span",{children:[t("rejected")," ",i?.quarantine?.rejected??i?.status?.rejected??0]})]})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[g.length," / ",Ue]})]}),m==="cards"&&(0,e.jsxs)("div",{className:"mc-toolbar",children:[(0,e.jsx)("input",{type:"text",placeholder:t("searchPlaceholder"),value:$,onChange:h=>te(h.target.value)}),ae&&(0,e.jsxs)("button",{type:"button",className:"mc-chip active",title:t("clearFilter"),onClick:()=>Pe(""),children:["\u{1F3F7} ",ae," ",(0,e.jsx)("span",{style:{opacity:.7},children:"\u2715"})]}),(0,e.jsx)("input",{ref:z,type:"file",accept:".json,application/json",style:{display:"none"},onChange:bt}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>z.current&&z.current.click(),children:t("importVault")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>_e({kind:"knowledge",title:"",body:"",tags:"",template:""}),children:["+ ",t("newCard")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:me,onClick:ut,title:t("skillCardsHint"),children:me?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:x,onClick:()=>Ee("md"),children:t(x?"exporting":"exportVault")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:x,onClick:()=>Ee("json"),children:t(x?"exporting":"exportJson")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Ze(),children:t("refresh")})]}),m==="cards"&&(0,e.jsxs)("div",{className:"mc-chips",children:[ba.map(h=>(0,e.jsxs)("button",{type:"button",className:`mc-chip${T===h?" active":""}`,onClick:()=>de(h),children:[t(h==="all"?"all":it[h]),(0,e.jsx)("span",{className:"mc-chip-n",children:h==="all"?i?.total??0:i?.byKind?.[h]??0})]},h)),(0,e.jsxs)("button",{type:"button",className:`mc-chip${Y?" active":""}`,onClick:()=>ce(h=>!h),children:["\u{1F4CC} ",t("pinnedOnly"),(0,e.jsx)("span",{className:"mc-chip-n",children:H.size})]}),(0,e.jsxs)("select",{value:he,onChange:h=>q(h.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsxs)("option",{value:"all",children:["\u{1F916} ",t("allAgents")]}),jn(_t).map(h=>(0,e.jsx)("option",{value:h,children:h},h))]}),(0,e.jsxs)("select",{value:L,onChange:h=>j(h.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allStatus")}),(0,e.jsx)("option",{value:"approved",children:t("statusApproved")}),(0,e.jsx)("option",{value:"pending",children:t("statusPending")}),(0,e.jsx)("option",{value:"rejected",children:t("statusRejected")})]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),[{key:"recent",label:t("sortRecent")},{key:"title",label:t("sortTitle")},{key:"hot",label:t("sortHot")}].map(h=>(0,e.jsx)("button",{type:"button",className:`mc-chip${J===h.key?" active":""}`,onClick:()=>Ae(h.key),children:h.label},h.key))]}),W&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",W]}),(0,e.jsx)("div",{style:{display:m==="cards"?"contents":"none"},children:d?(0,e.jsx)($n,{text:t("loading")}):W?(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",W," ",(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Ze(),children:t("retry")})]}):g.length===0?(0,e.jsx)("div",{className:"mc-empty",children:t("empty")}):(0,e.jsxs)(e.Fragment,{children:[jt&&(0,e.jsxs)("div",{className:"mc-v5-feature",onClick:()=>xe($e),children:[(0,e.jsxs)("div",{className:"mc-v5-feature-copy",children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:t("todayReview")}),(0,e.jsx)("h3",{children:$e.title}),(0,e.jsx)("p",{children:Ka($e)}),(0,e.jsxs)("div",{className:"mc-v5-feature-meta",children:[(0,e.jsxs)("span",{children:[Ft[$e.kind]||"\u{1F4CE}"," ",t(it[$e.kind]||"kindKnowledge")]}),(0,e.jsxs)("span",{children:["\u{1F552} ",Tt($e.updated)]}),($e.tags||[]).slice(0,3).map(h=>(0,e.jsxs)("span",{children:["#",h]},h))]})]}),(0,e.jsxs)("div",{className:"mc-v5-feature-side",children:[(0,e.jsx)(Un,{n:Ut[$e.path]||0,color:lt[$e.kind]||lt.other,size:58}),(0,e.jsx)("b",{children:Ut[$e.path]||0}),(0,e.jsx)("span",{children:t("links")}),(0,e.jsx)("button",{type:"button",className:"mc-v5-feature-shuffle",onClick:h=>{h.stopPropagation(),Yt()},children:t("reshuffle")}),(0,e.jsx)("span",{className:"mc-v5-feature-open",children:t("openArrow")})]})]}),(0,e.jsx)("div",{className:"mc-grid",children:et.filter(h=>!jt||h.path!==$e.path).map(h=>(0,e.jsx)(tr,{card:h,t,query:$.trim(),onOpen:xe,onDelete:l,onTagClick:Pe,pinned:H.has(h.path),onPin:ye,onCore:Re,links:Ut[h.path]||0},h.path))}),g.length<Ue&&(0,e.jsx)("div",{ref:Ct,style:{height:1}}),At&&(0,e.jsxs)("div",{className:"mc-empty",style:{padding:"10px 0"},children:[t("loading"),"\uFF08",g.length," / ",Ue,"\uFF09"]})]})}),(0,e.jsx)("div",{style:{display:m==="graph"?"flex":"none",flex:1,minHeight:0},children:ne.has("graph")&&(0,e.jsx)(lr,{t,onOpen:xe,all:G,onAllChange:ue,onMutate:le,active:m==="graph",visible:m==="graph"})}),(0,e.jsx)("div",{style:{display:m==="news"?"contents":"none"},children:ne.has("news")&&(0,e.jsx)(Xo,{t,version:b,onUnreadChange:fe})}),(0,e.jsx)("div",{style:{display:m==="terminal"?"contents":"none"},children:ne.has("terminal")&&(0,e.jsx)(Eo,{t})}),(0,e.jsx)("div",{style:{display:m==="config"?"contents":"none"},children:ne.has("config")&&(0,e.jsx)(Hn,{t,onReload:()=>Ze(),version:b})}),(0,e.jsx)("div",{style:{display:m==="stats"?"contents":"none"},children:ne.has("stats")&&(0,e.jsx)(ar,{t,tab:"stats",onReload:()=>Ze(),version:b})}),(0,e.jsx)("div",{style:{display:m==="audit"?"contents":"none"},children:ne.has("audit")&&(0,e.jsx)(Oo,{t,onReload:()=>Ze(),version:b})}),(0,e.jsx)("div",{style:{display:m==="optimize"?"contents":"none"},children:ne.has("optimize")&&(0,e.jsx)(Zo,{t,onReload:()=>Ze(),version:b})}),N&&(0,e.jsx)(or,{t,onClose:()=>D(!1)}),se&&(0,e.jsx)(rr,{t,tab:oe,onTab:ve,onClose:()=>A(!1),onFeedback:()=>{A(!1),D(!0)},onReplay:()=>{A(!1),De(!0)}}),Se&&(0,e.jsx)(ir,{t,onDone:nt}),u&&(0,e.jsx)(sr,{t,card:u,query:$.trim(),onNavigate:h=>{let E=et.findIndex(we=>we.path===u.path),Z=et[E+h];Z&&xe(Z)},onTagClick:Pe,onClose:()=>O(null),onDelete:h=>{O(null),l(h)},onFeedback:h=>{let E=u.path;fetch(`${X}/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:$.trim(),path:E,useful:h})}).then(()=>ee({ok:!0,msg:t(h?"fbUseful":"fbIrr")})).catch(()=>{}),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ee(null),2e3)},allCards:et,onOpenRelated:h=>xe(h),onKindChange:Re,onSaved:async({path:h,status:E,title:Z})=>{try{let we=E&&E!=="approved"?`&status=${encodeURIComponent(E)}`:"",ke=await fetch(`${X}/card?path=${encodeURIComponent(h)}${we}`).then(be=>be.json());ke&&ke.ok&&O(be=>be&&be.path===h?{...be,title:Z||ke.title||be.title,text:ke.text}:be)}catch{}await Ze(),le(),ee({ok:!0,msg:t("editSaved")}),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ee(null),2e3)}}),(0,e.jsx)(nr,{t,newCard:Et,setNewCard:_e,onCreated:()=>{Ze(),le(),ee({ok:!0,msg:t("created")}),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ee(null),2e3)}})]})]})]})}var ha=({toast:t})=>t?(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"8px 12px",fontSize:12,borderLeft:"4px solid "+(t.ok?"#10b981":"#ef4444"),background:t.ok?"rgba(16,185,129,0.08)":"rgba(239,68,68,0.08)"},children:[t.ok?"\u2705":"\u26A0"," ",t.msg]}):null;var Ua=(0,r.createContext)({form:null,set:()=>{}}),Ho=new Set(["autoRestartOnDrift","coreMemoryEnabled","skillCardsAutoSync"]);function Qe({k:t,label:a,hint:n,type:s="text",step:i,min:p,max:y}){let{form:S,set:g}=(0,r.useContext)(Ua);return(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:a||t}),(0,e.jsx)("input",{type:s,step:i,min:p,max:y,value:S?S[t]??"":"",onChange:C=>{let d=C.target.value;g(t,s==="number"?d===""?"":Number(d):d)}}),n?(0,e.jsx)("span",{className:"mc-field-hint",children:n}):null]})}function mt({k:t,label:a}){let{form:n,set:s}=(0,r.useContext)(Ua),i=n?n[t]:void 0,p=i===void 0?Ho.has(t):!!i;return(0,e.jsxs)("label",{className:"mc-switch",children:[(0,e.jsx)("input",{type:"checkbox",checked:p,onChange:y=>s(t,y.target.checked)}),(0,e.jsx)("span",{children:a||t})]})}function Nt({icon:t,title:a,sub:n,children:s}){return(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:t}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:a}),n?(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:n}):null]})]}),(0,e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:13},children:s})]})}function Hn({t,onReload:a,version:n,compact:s}){let[i,p]=(0,r.useState)(null),[y,S]=(0,r.useState)(0),[g,C]=(0,r.useState)(null),[d,w]=(0,r.useState)(null),[k,R]=(0,r.useState)(!1),[W,U]=(0,r.useState)(!1),T=(0,r.useRef)(!1),_=(0,r.useRef)(null),$=(0,r.useRef)({}),[K,he]=(0,r.useState)(null),[q,L]=(0,r.useState)(null),[j,H]=(0,r.useState)(""),[I,Y]=(0,r.useState)(""),[ce,ye]=(0,r.useState)(""),[ae,Be]=(0,r.useState)(null),[m,Te]=(0,r.useState)(null),ne=(0,r.useCallback)(async(l,te=!1)=>{te||Y("version");try{let de=await fetch(X+"/version-check"+(l?"?force=1":"")).then(Pe=>Pe.json());de&&de.ok?(Te(de),l&&ie(de.updateAvailable?t("vcLatest")+" v"+de.latest:t("vcUpToDate"))):l&&ie(t("vcCheckFail"),!1)}catch{l&&ie(t("vcCheckFail"),!1)}finally{te||Y("")}},[t]);(0,r.useEffect)(()=>{ne(!1);let l=setInterval(()=>{ne(!1,!0)},6e4),te=()=>{typeof document<"u"&&!document.hidden&&ne(!1,!0)};return document.addEventListener("visibilitychange",te),()=>{clearInterval(l),document.removeEventListener("visibilitychange",te)}},[n,ne]);let[Me,re]=(0,r.useState)(""),[J,Ae]=(0,r.useState)(null),[Le,ee]=(0,r.useState)(""),[M,z]=(0,r.useState)(!1),x=(0,r.useRef)(null),Q=(0,r.useRef)(0),me=l=>{Q.current=l.currentTarget.scrollTop};(0,r.useLayoutEffect)(()=>{let l=x.current;l&&Math.abs(l.scrollTop-Q.current)>1&&(l.scrollTop=Q.current)});let Fe=(0,r.useRef)(null),ie=(l,te=!0)=>{Fe.current&&clearTimeout(Fe.current),Ae({msg:l,ok:te}),Fe.current=setTimeout(()=>Ae(null),1900)},fe=async()=>{if(!I){Y("restart");try{let l=await fetch(X+"/restart-self",{method:"POST"});if(l.status===404||l.status===405){ie(De("vcRestartNoRoute",{cmd:m&&m.restartCommand||"dsh-memory restart --port 7999"}),!1);return}let te=await l.json().catch(()=>null);if(!te){ie(t("vcRestartFail")+"\uFF08HTTP "+l.status+"\uFF09",!1);return}if(!te.ok){ie(te.error||t("vcRestartFail"),!1);return}if(te.alreadyCurrent){ie(te.note||t("vcRestartCurrent"));return}ie(te.note||t("vcRestartSent")),te.alreadyRunning||setTimeout(()=>{ne(!0)},6e3)}catch(l){ie(t("vcRestartFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{Y("")}}},u=m&&m.resident?String(m.resident.served||""):"",O=!!(m&&m.onDisk&&u&&u!==m.onDisk),G=!!(m&&m.resident&&m.resident.managed===!1&&m.resident.managedKnown===!1),ue=m&&m.resident&&m.resident.replaceBlocked&&m.resident.replaceBlocked.fresh||null,N=!!(m&&m.resident&&m.resident.managedBy==="host"),D=!!(m&&m.resident&&m.resident.managed===!1&&!G&&!N),se=!!(m&&m.resident&&!u),A=O||se||D||G,oe=rn({hasVersion:!!m,hostVersion:m?m.loaded:"",onDisk:m?m.onDisk:"",residentServed:m&&m.resident?m.resident.served:"",residentPresent:!!(m&&m.resident),residentManaged:m&&m.resident?m.resident.managed:null,residentManagedKnown:m&&m.resident?m.resident.managedKnown:null,residentManagedBy:m&&m.resident?m.resident.managedBy:"",replaceBlocked:m&&m.resident?m.resident.replaceBlocked:null}),ve={hostProcessStale:()=>De("vcHostProcessStale",{disk:m.onDisk,loaded:m.loaded}),residentDown:()=>De("vcResidentDown",{port:m.resident&&m.resident.port||"",cmd:m.restartCommand||"dsh-memory restart --port 7999"}),residentReplaceBlocked:()=>De("vcResidentReplaceBlocked",{served:u,err:ue&&ue.error||"",path:ue&&ue.lockPath||"",cmd:m.restartCommand||"dsh-memory restart --port "+(m.resident&&m.resident.port||7999)}),residentLockUnknown:()=>De("vcResidentLockUnknown",{served:u,path:m.resident&&m.resident.lock&&m.resident.lock.path||"",err:m.resident&&m.resident.lock&&m.resident.lock.error||""}),residentUnmanaged:()=>De("vcResidentUnmanaged",{served:u,cmd:m.restartCommand||"dsh-memory restart --port 7999"})},Se={restartStart:()=>De("vcRestartStart",{disk:m&&m.onDisk||""}),restartRepair:()=>De("vcRestartRepair",{disk:m&&m.onDisk||""}),restartFixes:()=>De("vcRestartFixes",{served:u||"",disk:m&&m.onDisk||""}),restartHostOnly:()=>De("vcRestartHostOnly",{loaded:m&&m.loaded||"",disk:m&&m.onDisk||""}),restartAnyway:()=>De("vcRestartAnyway",{ver:m&&m.onDisk||""})},De=(l,te)=>Object.keys(te).reduce((de,Pe)=>de.split("{"+Pe+"}").join(te[Pe]),t(l)),nt=(0,r.useCallback)(async()=>{try{let[l,te,de,Pe]=await Promise.all([fetch(`${X}/config`).then(Re=>Re.json()).catch(()=>null),fetch(`${X}/setup-status`).then(Re=>Re.json()).catch(()=>null),fetch(`${X}/budget`).then(Re=>Re.json()).catch(()=>null),fetch(`${X}/llm-routes`).then(Re=>Re.json()).catch(()=>null)]);if(Pe&&Pe.ok&&Be(Pe),l&&l.ok){p(l),S(l.revision??0),C(l.schema??null);let Re=Tn(l.config??{},$.current);$.current=Re.overlay,w({...Re.values}),z(!1),he(l.dsh??null),R(l.writable===!1),U(l.viaPending===!0),H(""),T.current=!1}else de&&de.ok?(w({...de}),z(!1),R(!0),H(t("configNeedsDsh"))):H(t("adminLoadFail"));te&&te.ok&&L(te),ye("")}catch{H(t("adminLoadFail"))}},[t]);(0,r.useEffect)(()=>{nt()},[n,nt]);let qe=(l,te)=>{T.current=!0,z(!0),ee(""),w(de=>({...de??{},[l]:te}))};(0,r.useEffect)(()=>{_.current=nt},[nt]),(0,r.useEffect)(()=>{if(typeof EventSource>"u")return;let l=null;try{l=new EventSource(X+"/events")}catch{return}let te=()=>{!T.current&&typeof _.current=="function"&&_.current()};try{l.addEventListener("config",te)}catch{}return()=>{try{l.close()}catch{}}},[]);let Rt=new Set(["dedupThreshold","captureMinChars","captureCooldownMs","maxCardsPerDay","captureMaxTokens","recallMinScore","recallLimit","recallSummaryLen","recycleRetentionDays","webPort","webCheckIntervalMs","webMaxRestart","sessionBudgetChars","coreMemoryLimit","coreMemoryMaxChars"]),zt=l=>({init:t("modeInit"),interval:t("modeInterval"),manual:t("modeManual")})[l]||l,je=async()=>{if(!d)return;if(k){ie(t("editInSetting"),!1);return}let l={dedupThreshold:[0,1],captureMinChars:[0,1e6],captureCooldownMs:[0,1e9],maxCardsPerDay:[0,1e6],captureMaxTokens:[100,4e3],recallMinScore:[0,50],recallLimit:[1,20],recallSummaryLen:[40,400],recycleRetentionDays:[1,3650],webPort:[1,65535],webCheckIntervalMs:[1e3,6e5],webMaxRestart:[1,1e3],sessionBudgetChars:[0,1e9],coreMemoryLimit:[1,20],coreMemoryMaxChars:[200,1e4]},te=[];for(let[de,[Pe,Re]]of Object.entries(l)){if(!(de in d))continue;let xe=d[de],Ee=typeof xe=="number"?xe:Number(xe);(xe===""||xe===null||xe===void 0||!Number.isFinite(Ee)||Ee<Pe||Ee>Re)&&te.push(t("invalidField",{field:de,min:Pe,max:Re,value:String(xe===""?"\u7A7A":xe)}))}if(te.length){let de=t("saveInvalid")+"\uFF1A"+te.join("\uFF1B");H(de),ie(de,!1);return}Y("save");try{let de={...d};for(let Ee of Object.keys(d))Ee in de&&typeof de[Ee]=="string"&&de[Ee].trim()!==""&&Rt.has(Ee)&&(de[Ee]=Number(de[Ee]));Array.isArray(de.vaultProfiles)&&(de.vaultProfiles=de.vaultProfiles.filter(Ee=>Ee&&(String(Ee.name||"").trim()||String(Ee.path||"").trim())));let Pe=await fetch(`${X}/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:de,expectedRevision:y})}),Re=await Pe.text(),xe=null;try{xe=Re?JSON.parse(Re):null}catch{xe=null}if(xe||(xe={error:"HTTP "+Pe.status+(Re?"\uFF1A"+Re.slice(0,200):"\uFF08\u5BBF\u4E3B\u672A\u8FD4\u56DE\u539F\u56E0\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u6709\u6570\u5B57\u5B57\u6BB5\u4E3A\u7A7A\u6216\u8D85\u51FA\u8303\u56F4\uFF09")}),xe&&xe.ok){let Ee=typeof xe.pendingOutcome=="string"?xe.pendingOutcome:"",bt,ut=!0;if(Ee==="applied")bt=t("savedApplied")+(Array.isArray(xe.applied)&&xe.applied.length?" \xB7 "+xe.applied.join("\u3001"):"");else if(Ee==="queued")ut=!1,bt=t("saveQueued");else if(Ee==="failed")ut=!1,bt=t("saveFail")+" \xB7 "+(xe.hostGuard?t("saveHostGuard"):t("saveFailHint"));else if(Ee==="applied-direct")bt=t("savedOk")+" \xB7 "+t("savedDirect");else{let et=Array.isArray(xe.pending)&&xe.pending.length?" \xB7 "+t("savePending"):xe.note?" \xB7 "+t("restartHint"):"";bt=(xe.retried?"\u267B ":"")+t("savedOk")+et}$.current={...$.current,...de},ut?(ee(""),z(!1),ye(bt)):H(bt),ie(bt,ut),await nt()}else{let Ee=Pe.status===409?t("conflictRefresh"):xe?.error||t("saveFail");H(Ee),ie(Ee,!1)}}catch{H(t("saveFail")),ie(t("saveFail"),!1)}finally{Y("")}},Ke=()=>{$.current={},w({...i?.config??{}}),ee(""),z(!1),ye("")},Et={env:"vaultSrcEnv",profile:"vaultSrcProfile",workspace:"vaultSrcWorkspace",vaultDir:"vaultSrcVaultDir",default:"vaultSrcDefault"},_e=l=>Array.isArray(l?.vaultProfiles)?l.vaultProfiles:[],b=(l,te,de)=>{T.current=!0,z(!0),w(Pe=>{let Re=_e(Pe).map(Ee=>({...Ee||{}})),xe={...Re[l]||{}};return te==="match"?String(de).trim()?xe.match={...xe.match||{},workspace:de}:delete xe.match:xe[te]=de,Re[l]=xe,{...Pe??{},vaultProfiles:Re}})},c=()=>{T.current=!0,z(!0),w(l=>({...l??{},vaultProfiles:[..._e(l),{name:"",path:""}]}))},le=l=>{T.current=!0,z(!0),w(te=>({...te??{},vaultProfiles:_e(te).filter((de,Pe)=>Pe!==l)}))},Ne={fontSize:11,padding:"2px 8px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:6},He={padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:12,minWidth:0},Ye={A:{label:t("planA"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:4e3,recallMinScore:2,recallLimit:5,recallSummaryLen:130,recallIncludeBody:!1,captureCooldownMs:3e5},B:{label:t("planB"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!1,dedupByLLM:!1,captureMaxTokens:500,recallMinScore:3,recallLimit:3,recallSummaryLen:80,recallIncludeBody:!1,captureMinChars:300,maxCardsPerDay:40,captureCooldownMs:3e5},C:{label:t("planC"),autoWebMode:"interval",watchdogAutoSpawn:!0,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:1200,recallMinScore:1,recallLimit:8,recallSummaryLen:200,recallIncludeBody:!0,captureCooldownMs:12e4}},Ue=l=>{let te=Ye[l];te&&(w(de=>({...de??{},...te})),T.current=!0,z(!0),ee(l),ie(De("planApplied",{plan:te.label})))},St=async()=>{try{let l=await fetch(X+"/setup-status").then(te=>te.json());l&&l.ok&&L(l)}catch{}},At=async(l,te)=>{Y(l+te);try{let Pe=await(await fetch(`${X}/mcp/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:l,action:te})})).json();Pe&&Pe.ok?ie(De(te==="install"?"mcpInstalled":"mcpUninstalled",{agent:l})):ie(De("mcpActionFail",{agent:l,error:Pe?.error||""}),!1);try{let Re=await fetch(`${X}/setup-status`).then(xe=>xe.json());Re&&Re.ok&&L(Re)}catch{}}catch{ie(t("mergeFail"),!1)}finally{Y("")}},o=q&&Array.isArray(q.agents)?q.agents:[],Ct=o.filter(l=>l.installed),Bt=[...new Set(Ct.flatMap(l=>Array.isArray(l.servers)?l.servers:[]))],vt=o.filter(l=>l.mcpConfigured&&!l.isDsh).length,Ze=o.some(l=>Array.isArray(l.servers));return(0,e.jsx)(Ua.Provider,{value:{form:d,set:qe},children:(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"hidden",flex:s?"0 0 auto":1,minHeight:0,maxHeight:s?"52vh":void 0},children:[(0,e.jsx)("style",{children:ct}),J&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(J.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:J.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:J.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:J.msg})]}),(0,e.jsxs)("div",{ref:x,onScroll:me,style:{flex:1,minHeight:0,overflow:"auto",overscrollBehavior:"contain",scrollbarGutter:"stable",padding:4},children:[!s&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY CONFIG"}),(0,e.jsx)("h1",{children:t("tabConfig")}),(0,e.jsx)("p",{children:t("configPageSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("v5Local")]})]}),j&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",j]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:nt,children:["\u21BB ",t("retry")]})]}),W&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #3b82f6",background:"rgba(59,130,246,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#1d4ed8",lineHeight:1.7},children:["\u2139 ",t("pendingSyncNote")]}),k&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #f59e0b",background:"rgba(245,158,11,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#b45309"},children:["\u2139\uFE0F ",t("configNeedsDsh")," \u2014\u2014 ",t("editInSetting")]}),ce&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #10b981",background:"rgba(16,185,129,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#059669"},children:["\u2713 ",ce]}),i&&(i.version||i.dsh?.vaultDir)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F4E6} ",t("pluginInfo")]}),(0,e.jsx)("span",{style:{fontSize:12,opacity:.7},children:t("dshHostLabel")}),i.version&&(0,e.jsxs)("code",{style:Ne,children:[t("vcLoaded")," v",i.version]}),m&&m.resident&&m.resident.served&&m.resident.served!==i.version&&(0,e.jsxs)("code",{style:Ne,children:[t("vcResident")," v",m.resident.served]}),m&&m.resident&&!m.resident.served&&(0,e.jsxs)("code",{style:{...Ne,color:"#b45309",fontWeight:600},children:[t("vcResident")," ",t("vcResidentDownShort")]}),m&&m.resident&&m.resident.served&&m.resident.managed===!1&&(0,e.jsxs)("code",{style:{...Ne,color:"#b45309",fontWeight:600},children:[t("vcResident")," v",m.resident.served," \xB7 ",t(ue?"vcResidentReplaceBlockedShort":N?"vcResidentHostManagedShort":G?"vcResidentLockUnknownShort":"vcResidentUnmanagedShort")]}),qt&&(0,e.jsxs)("code",{style:Ne,children:[t("vcPage")," v",qt]}),m&&m.onDisk&&(0,e.jsxs)("code",{style:Ne,children:[t("vcOnDisk")," v",m.onDisk]}),m&&m.latest&&(0,e.jsxs)("code",{style:Ne,children:[t("vcLatest")," v",m.latest]}),i.dsh?.vaultDir&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.6},children:["\u{1F4C1} ",i.dsh.vaultDir]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:I==="version",onClick:()=>ne(!0),children:I==="version"?t("checking"):"\u{1F504} "+t("vcCheck")})]}),m&&oe.warn&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px"},children:(0,e.jsxs)("div",{children:["\u26A0\uFE0F ",ve[oe.warn]?ve[oe.warn]():""]})}),oe.showButton&&(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn"+(oe.emphasis?" me-on":""),disabled:!!I,onClick:fe,children:I==="restart"?"\u23F3 "+t("vcRestarting"):"\u{1F504} "+t("vcRestart")}),m.restartCommand&&(0,e.jsx)("code",{style:{fontSize:11,opacity:.75},children:m.restartCommand}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:Se[oe.hint]?Se[oe.hint]():""})]}),qt&&m&&m.onDisk&&qt!==m.onDisk&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.7},children:t("vcPageStale",{page:qt,disk:m.onDisk})}),m&&m.updateAvailable&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,opacity:.88},children:["\u2B06 ",t("vcOutdated")," \u2192 ",(0,e.jsx)("code",{children:m.updateCommand})]}),m&&m.checkError&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#b91c1c"},children:[t("vcCheckFail"),"\uFF1A",m.checkError]})]}),q&&q.agents&&(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:"\u{1F50C}"}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:t("mcpSetupStatus")}),(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:t("mcpAutoHint")})]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",flex:"none"},onClick:St,children:t("mcpRefresh")})]}),Ze?(0,e.jsx)("div",{className:"mc-mcp-summary",children:De("mcpSummary",{agents:Ct.length,servers:Bt.length,mounted:vt})}):null,o.map(l=>{let te=Array.isArray(l.servers),de=te?l.servers:[],Pe=l.isDsh?t("dshHostLabel"):l.label||l.name;return(0,e.jsxs)("div",{className:"mc-mcp-row",style:{opacity:l.installed?1:.55},children:[(0,e.jsxs)("div",{className:"mc-mcp-main",children:[(0,e.jsxs)("div",{className:"mc-mcp-title",children:[(0,e.jsx)("b",{children:Pe}),l.isDsh&&l.version&&(0,e.jsxs)("span",{className:"mc-mcp-badge",children:["v",l.version]}),!l.installed&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("notInstalled")}),l.installed&&l.mcpConfigured===!1&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:t("noMcpEntry")}),l.mcpConfigured===!0&&(0,e.jsxs)("span",{className:"mc-mcp-badge",style:{color:"#10b981"},children:["\u2713 ",t("healthy")]}),l.mcpConfigured===!0&&l.mcpMatchesCurrentNode===!1&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("nodePathNote")}),(l.needsRepair||l.mcpNeedsRepair)&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:t("mcpNeedsRepair")}),l.isDsh&&(0,e.jsxs)("span",{className:"mc-mcp-badge",children:[t("recallTool"),": ",l.recallTool?t("enabled"):t("disabled")]}),l.detectedOnly&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("mcpDetectedOnly")}),l.reason&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:l.reason})]}),te?de.length?(0,e.jsx)("div",{className:"mc-mcp-servers",children:de.map(Re=>(0,e.jsx)("code",{className:Re==="memory"?"on":"",children:Re},Re))}):l.installed?(0,e.jsx)("div",{className:"mc-mcp-servers",children:(0,e.jsx)("span",{style:{fontSize:10.5,opacity:.45},children:t("mcpNoServers")})}):null:null,l.mcpPath&&(0,e.jsx)("div",{className:"mc-mcp-path",title:l.mcpPath,children:l.mcpPath})]}),(0,e.jsxs)("div",{className:"mc-mcp-actions",children:[l.hook&&(0,e.jsxs)("span",{style:{fontSize:10.5,opacity:.55},children:["hook: ",l.hook]}),!l.isDsh&&!l.detectedOnly&&l.installed&&l.mcpConfigured===!1&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!I,onClick:()=>At(l.name,"install"),children:t("installMcp")}),!l.isDsh&&!l.detectedOnly&&l.installed&&(l.needsRepair||l.mcpNeedsRepair||l.mcpMatchesCurrentNode===!1)&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",style:{padding:"2px 8px"},disabled:!!I,onClick:()=>At(l.name,"install"),children:t("repairMcp")}),!l.isDsh&&!l.detectedOnly&&l.installed&&l.mcpConfigured===!0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},disabled:!!I,onClick:()=>{window.confirm(t("uninstallConfirm"))&&At(l.name,"uninstall")},children:t("uninstallMcp")})]})]},l.name+(l.mcpPath||""))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:6},children:t("mcpSetupHint")}),Me&&(0,e.jsx)("div",{style:{fontSize:11,marginTop:6},children:(0,e.jsx)("code",{style:{padding:"2px 6px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:4},children:Me})})]}),d?(0,e.jsxs)("div",{className:"mc-cfg",children:[(0,e.jsxs)(Nt,{icon:"\u{1F3AF}",title:t("presetConfig"),sub:t("presetHint"),children:[(0,e.jsx)("div",{className:"mc-plan-grid",children:["A","B","C"].map(l=>(0,e.jsxs)("button",{type:"button",className:"mc-plan"+(Le===l?" on":""),"aria-pressed":Le===l,onClick:()=>Ue(l),disabled:!!I,children:[(0,e.jsxs)("b",{children:[Le===l?"\u2705 ":l==="A"?"\u{1F7E2} ":l==="B"?"\u{1F4B0} ":"\u2B50 ",Ye[l].label]}),(0,e.jsx)("span",{children:t("planDesc"+l)})]},l))}),Le?(0,e.jsxs)("div",{style:{fontSize:11,color:"#10b981"},children:["\u2705 ",De("planApplied",{plan:Ye[Le].label})]}):null]}),(0,e.jsx)(Nt,{icon:"\u{1F9E0}",title:t("dshMemoryConfig"),sub:t("cfgSubCore"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(mt,{k:"enabled",label:t("enabledLabel")}),(0,e.jsx)(mt,{k:"autoCapture",label:t("autoCapture")}),(0,e.jsx)(mt,{k:"autoRecall",label:t("autoRecall")}),(0,e.jsx)(Qe,{k:"vaultDir",label:t("vaultDirLabel")}),(0,e.jsx)(Qe,{k:"captureMinChars",label:t("captureMinChars"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(Qe,{k:"maxCardsPerDay",label:t("maxCardsPerDay"),hint:t("unitPerDay"),type:"number"}),(0,e.jsx)(Qe,{k:"dedupThreshold",label:t("dedupThreshold"),type:"number",step:"0.01",min:"0",max:"1"}),(0,e.jsx)(Qe,{k:"recallLimit",label:t("recallLimit"),type:"number"}),(0,e.jsx)(Qe,{k:"recallSummaryLen",label:t("recallSummaryLen"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(mt,{k:"recallIncludeBody",label:t("recallBody")}),(0,e.jsx)(Qe,{k:"secretHint",label:t("secretHint")}),(0,e.jsx)(Qe,{k:"recallEmbedding",label:t("recallEmbedding")})]})}),(0,e.jsx)(Nt,{icon:"\u2B50",title:t("coreMemory"),sub:t("coreMemoryHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(mt,{k:"coreMemoryEnabled",label:t("coreMemoryEnabled")}),(0,e.jsx)(Qe,{k:"coreMemoryLimit",label:t("coreMemoryLimit"),type:"number"}),(0,e.jsx)(Qe,{k:"coreMemoryMaxChars",label:t("coreMemoryMaxChars"),type:"number"})]})}),(0,e.jsxs)(Nt,{icon:"\u{1F9E9}",title:t("skillCards"),sub:t("skillCardsHint"),children:[(0,e.jsx)("div",{className:"mc-cfg-grid",children:(0,e.jsx)(mt,{k:"skillCardsAutoSync",label:t("skillAutoSync")})}),(0,e.jsx)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!I,onClick:async()=>{Y("skills");try{let l=await fetch(X+"/skills/sync",{method:"POST"}).then(te=>te.json()).catch(()=>null);l&&l.ok?ie(t("skillsSyncDone")+"\uFF1A"+t("skillsScanned")+" "+(l.total||0)+" \xB7 "+t("skillsCreated")+" "+(l.created||0)+" \xB7 "+t("skillsUpdated")+" "+(l.updated||0)+" \xB7 "+t("skillsPendingUpdates")+" "+(l.pendingUpdates||0)):ie(l&&l.error||t("skillsSyncFail"),!1)}catch{ie(t("skillsSyncFail"),!1)}finally{Y("")}},children:I==="skills"?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")})})]}),(0,e.jsx)(Nt,{icon:"\u{1F520}",title:t("uiLayout"),sub:t("uiLayoutHint"),children:(0,e.jsx)("div",{className:"mc-cfg-grid",children:(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("uiLayout")}),(0,e.jsxs)("select",{value:d&&d.uiScale||"normal",onChange:l=>{let te=l.target.value;qe("uiScale",te);try{window.dispatchEvent(new CustomEvent("me-ui-scale",{detail:te}))}catch{}},children:[(0,e.jsx)("option",{value:"compact",children:t("uiCompact")}),(0,e.jsx)("option",{value:"normal",children:t("uiNormal")}),(0,e.jsx)("option",{value:"large",children:t("uiLarge")})]})]})})}),(0,e.jsxs)(Nt,{icon:"\u{1F5C2}\uFE0F",title:t("vaultMulti"),sub:t("cfgSubMulti"),children:[(0,e.jsxs)("div",{style:{fontSize:11.5,opacity:.85,marginBottom:8,lineHeight:1.7},children:[t("vaultNow"),"\uFF1A",(0,e.jsx)("code",{children:K?.vaultDir||"\u2014"}),K?.vaultName?`\uFF08${K.vaultName}\uFF09`:""," \xB7 ",t("vaultSource"),"\uFF1A",t(Et[K?.vaultSource]||"vaultSrcDefault"),K?.workspace?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("br",{}),t("vaultWorkspace"),"\uFF1A",(0,e.jsx)("code",{children:K.workspace})]}):null]}),_e(d).map((l,te)=>(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1.6fr 1.5fr auto",gap:6,marginBottom:6},children:[(0,e.jsx)("input",{value:l.name||"",placeholder:t("vaultNamePh"),onChange:de=>b(te,"name",de.target.value),style:He,disabled:k}),(0,e.jsx)("input",{value:l.path||"",placeholder:t("vaultPathPh"),onChange:de=>b(te,"path",de.target.value),style:He,disabled:k}),(0,e.jsx)("input",{value:l.match&&l.match.workspace||"",placeholder:t("vaultMatchPh"),onChange:de=>b(te,"match",de.target.value),style:He,disabled:k}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>le(te),disabled:k,title:t("delete"),children:"\u2715"})]},te)),(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginTop:4},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:c,disabled:k,children:["\uFF0B ",t("vaultAdd")]}),(0,e.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("vaultActive")}),(0,e.jsxs)("select",{value:d.activeVault||"",onChange:l=>qe("activeVault",l.target.value),disabled:k,style:He,children:[(0,e.jsx)("option",{value:"",children:t("vaultActiveNone")}),_e(d).filter(l=>l&&l.name).map(l=>(0,e.jsx)("option",{value:l.name,children:l.name},l.name))]})]})]})]}),(0,e.jsx)(Nt,{icon:"\u{1F4B0}",title:t("costControl"),sub:t("costHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(mt,{k:"distillEnabled",label:t("distillEnabled")}),(0,e.jsx)(mt,{k:"dedupByLLM",label:t("dedupByLLM")}),(0,e.jsx)(Qe,{k:"captureMaxTokens",label:t("captureMaxTokens"),type:"number"}),(0,e.jsx)(Qe,{k:"captureTimeoutMs",label:t("captureTimeoutMs"),type:"number"}),(0,e.jsx)(Qe,{k:"recallMinScore",label:t("recallMinScore"),type:"number"}),(0,e.jsx)(Qe,{k:"captureCooldownMs",label:t("captureCooldownMs"),type:"number"}),ae&&ae.ok===!1&&(0,e.jsxs)("div",{style:{gridColumn:"1 / -1",fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.6},children:["\u26A0 ",De("routeListFail",{err:ae.error||"\u672A\u77E5\u539F\u56E0"})]}),ae&&ae.providers&&ae.providers.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureProvider")}),(0,e.jsxs)("select",{value:d.captureProvider||"",onChange:l=>{qe("captureProvider",l.target.value),qe("captureModel","")},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),ae.providers.map(l=>(0,e.jsx)("option",{value:l.id,children:l.label},l.id))]})]}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureModel")}),(0,e.jsxs)("select",{value:d.captureModel||"",onChange:l=>qe("captureModel",l.target.value),children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),((ae.providers.find(l=>l.id===d.captureProvider)||{}).models||[]).map(l=>(0,e.jsx)("option",{value:l.id,children:l.label||l.id},l.id))]})]})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Qe,{k:"captureProvider",label:t("captureProvider")}),(0,e.jsx)(Qe,{k:"captureModel",label:t("captureModel")})]}),(0,e.jsx)(mt,{k:"captureFollowSession",label:t("captureFollowSession")}),(0,e.jsx)(mt,{k:"captureFirstOnly",label:t("captureFirstOnly")}),(0,e.jsx)(Qe,{k:"sessionBudgetChars",label:t("sessionBudgetChars"),type:"number"}),(0,e.jsx)("div",{style:{display:"flex",alignItems:"flex-end"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!I,onClick:async()=>{Y("llmtest");try{let l=await fetch(X+"/llm-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:d.captureProvider||"",model:d.captureModel||"",firstOnly:d.captureFirstOnly===!0})}).then(te=>te.json());l&&l.ok?ie(t("llmTestOk")+"\uFF1A"+l.route.provider+(l.route.model?"/"+l.route.model:"")+" \xB7 "+l.ms+"ms \xB7 "+t("llmCandidates")+" "+l.candidates):ie(t("llmTestFail")+"\uFF1A"+(l&&(l.failure?l.failure.code+" "+l.failure.message:l.error)||"?"),!1)}catch(l){ie(t("llmTestFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{Y("")}},children:I==="llmtest"?t("exporting"):"\u{1F50C} "+t("llmTest")})})]})}),(0,e.jsx)(Nt,{icon:"\u{1F6E1}\uFE0F",title:t("auditConfig"),sub:t("auditHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("auditMode")}),(0,e.jsxs)("select",{value:d.auditMode??"all",onChange:l=>qe("auditMode",l.target.value),children:[(0,e.jsx)("option",{value:"all",children:t("auditAll")}),(0,e.jsx)("option",{value:"none",children:t("auditNone")})]})]}),(0,e.jsx)(In,{label:t("auditExemptAgents"),value:d.auditExemptAgents||[],options:[{value:"__all__",label:t("allExempt")},...(q?.agents||[]).filter(l=>!l.isDsh).map(l=>({value:l.name,label:l.name}))],onChange:l=>qe("auditExemptAgents",l)}),(0,e.jsx)(In,{label:t("auditExemptKinds"),value:d.auditExemptKinds||[],options:[{value:"__all__",label:t("allExempt")},...ba.filter(l=>l!=="all"&&l!=="core"&&l!=="skill").map(l=>({value:l,label:t(it[l])}))],onChange:l=>qe("auditExemptKinds",l)}),(0,e.jsx)(Qe,{k:"recycleRetentionDays",label:t("recycleDays"),hint:t("unitDays"),type:"number"})]})}),(0,e.jsx)(Nt,{icon:"\u{1F6E0}",title:t("serviceConfig"),sub:t("cfgSubService"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(mt,{k:"autoWeb",label:t("autoWeb")}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("autoWebMode")}),(0,e.jsxs)("select",{value:d.autoWebMode??"init",onChange:l=>qe("autoWebMode",l.target.value),children:[(0,e.jsx)("option",{value:"init",children:t("modeInit")}),(0,e.jsx)("option",{value:"interval",children:t("modeInterval")}),(0,e.jsx)("option",{value:"manual",children:t("modeManual")})]})]}),(0,e.jsx)(Qe,{k:"webPort",label:t("webPort"),type:"number"}),(0,e.jsx)(Qe,{k:"webCheckIntervalMs",label:t("webCheckIntervalMs"),type:"number"}),(0,e.jsx)(Qe,{k:"webMaxRestart",label:t("webMaxRestart"),hint:t("unitTimes"),type:"number"}),(0,e.jsx)(mt,{k:"watchdogAutoSpawn",label:t("watchdogAutoSpawn")}),(0,e.jsx)(mt,{k:"autoRestartOnDrift",label:t("autoRestartOnDrift")}),(0,e.jsx)(mt,{k:"autoMcpSetup",label:t("autoMcpSetup")})]})}),(0,e.jsxs)("div",{className:"mc-cfg-actions",children:[M?(0,e.jsx)("span",{className:"mc-cfg-dirty",children:t("cfgDirty")}):(0,e.jsxs)("span",{className:"mc-cfg-clean",children:["\u2713 ",t("cfgClean")]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),I==="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,opacity:.75},children:["\u23F3 ",t("saving")]}),ce&&I!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#10b981"},children:["\u2705 ",ce]}),j&&I!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#b91c1c"},children:["\u26A0 ",j]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Ke,disabled:!!I,children:t("reset")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:k?()=>ie(t("readonlyTitle")+"\uFF1A"+t("readonlyBody"),!1):je,disabled:I==="save",title:t(k?"readonlyBody":"saveConfig"),children:I==="save"?"\u23F3 "+t("saving"):k?"\u{1F512} "+t("readonlyBtn"):"\u{1F4BE} "+t("saveConfig")})]})]}):(0,e.jsx)("div",{style:{fontSize:12,opacity:.6},children:t("loading")})]})]})})}function Oo({t,onReload:a,version:n}){let[s,i]=(0,r.useState)([]),[p,y]=(0,r.useState)([]),[S,g]=(0,r.useState)("all"),[C,d]=(0,r.useState)("all"),[w,k]=(0,r.useState)(""),[R,W]=(0,r.useState)(""),[U,T]=(0,r.useState)(new Set),[_,$]=(0,r.useState)(null),[K,he]=(0,r.useState)(""),[q,L]=(0,r.useState)(null),[j,H]=(0,r.useState)("pending"),I=(x,Q=!0)=>{L({msg:x,ok:Q}),setTimeout(()=>L(null),3e3)},Y=[...new Set([...s,...p].map(x=>x.submittedBy).filter(Boolean))],ce=(0,r.useCallback)(async()=>{try{let x=await fetch(`${X}/audit/list`).then(Q=>Q.json());x.ok&&(i(x.pending||[]),y(x.rejected||[]),T(new Set),ne({}))}catch{}},[]);(0,r.useEffect)(()=>{ce()},[n,ce]);let ye=(j==="pending"?s:p).filter(x=>{if(!Ta(x,R)||S!=="all"&&x.kind!==S||C!=="all"&&Pt(x.submittedBy)!==C)return!1;if(w){let Q=ma(x.created);if(Q&&Q!==w)return!1}return!0}),ae=(0,r.useMemo)(()=>{let x=j==="pending"?s:p,Q={all:0};return x.forEach(me=>{if(Ta(me,R)&&!(C!=="all"&&Pt(me.submittedBy)!==C)){if(w){let Fe=ma(me.created);if(Fe&&Fe!==w)return}Q.all++,Q[me.kind||"other"]=(Q[me.kind||"other"]||0)+1}}),Q},[s,p,j,C,w,R]),Be=x=>T(Q=>{let me=new Set(Q);return me.has(x)?me.delete(x):me.add(x),me}),m=async(x,Q,me={})=>{let Fe=Q||[...U];if(!Fe.length){I(t("noSelection"),!1);return}he("apply");let ie=x==="approved"?me.kind==="core"?t("approveCore"):t("toastApproved"):t(x==="rejected"?"toastRejected":"toastCardDeleted");try{let fe=0;for(let u of Fe){let O=x==="approved"?"audit/approve":x==="rejected"?"audit/reject":"delete";try{let G=x==="approved"&&me.kind?{path:u,kind:me.kind}:null;(await fetch(X+"/"+O+(G?"":"?path="+encodeURIComponent(u)+(x==="delete"?"&permanent=0":"")),G?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(G)}:void 0)).ok||fe++}catch{fe++}}await ce(),a&&a(),fe?I(t("toastFailed")+"\uFF08"+fe+"/"+Fe.length+"\uFF09",!1):I(ie+" "+Fe.length+" \u5F20")}catch(fe){I(t("toastFailed")+": "+String(fe&&fe.message||fe),!1)}finally{he("")}},[Te,ne]=(0,r.useState)({}),Me=x=>Te[x]||{},re=[...U],J=ye.find(x=>x.path===_)||ye[0]||null,Ae=J?Me(J.path):{};(0,r.useEffect)(()=>{let x=J;if(!x||Te[x.path])return;let Q=!0,me=x.path;ne(ie=>({...ie,[me]:{loading:!0}}));let Fe=x.status||(j==="pending"?"pending":"rejected");return fetch(`${X}/card?path=${encodeURIComponent(me)}&status=${Fe}`).then(ie=>ie.json()).then(ie=>{Q&&(ie&&ie.ok?ne(fe=>({...fe,[me]:{text:ie.text||""}})):ne(fe=>({...fe,[me]:{error:ie&&ie.error||"HTTP"}})))}).catch(ie=>{Q&&ne(fe=>({...fe,[me]:{error:String(ie&&ie.message||ie)}}))}),()=>{Q=!1}},[J&&J.path,j]);let Le=async()=>{if(window.confirm(t("reclassify")+"\uFF1F\u53EA\u5904\u7406\u81EA\u52A8\u6C89\u6DC0\u7684\u5F85\u5BA1\u539F\u6587\u5361\uFF0C\u4E0D\u6539\u4EBA\u5DE5\u5361\u3002")){he("reclassify");try{let x=await fetch(X+"/reclassify").then(Q=>Q.json());x&&x.ok?I(t("reclassify")+"\uFF1A"+x.changed+" / "+x.scanned):I(t("toastFailed")+": "+(x&&x.error||"HTTP"),!1),await ce(),a&&a()}catch(x){I(t("toastFailed")+": "+String(x&&x.message||x),!1)}finally{he("")}}},ee=()=>T(new Set),M=x=>{H(x),ee()},z=["all",...ba.filter(x=>x!=="all")];return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:ct}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(ha,{toast:q}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-audithead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"REVIEW INBOX"}),(0,e.jsx)("h1",{children:t("tabAudit")}),(0,e.jsx)("p",{children:t("auditInboxSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[s.length," \u5F20"]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("auditUndo")]})]}),(0,e.jsxs)("div",{className:"me-audit",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-filtercard",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{className:"me-audit-filter-row",children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F6E1}\uFE0F ",t("tabAudit")]}),(0,e.jsx)("input",{type:"text",value:R,onChange:x=>{W(x.target.value),ee(),$(null)},placeholder:t("auditSearchPlaceholder"),"aria-label":t("auditSearchPlaceholder"),style:{flex:"1 1 220px",minWidth:160,padding:"5px 9px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",fontSize:12}}),R&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>{W(""),ee(),$(null)},title:t("clearFilter"),children:"\u2715"}),(0,e.jsxs)("select",{value:C,onChange:x=>{d(x.target.value),ee()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allAgents")}),jn(Y).map(x=>(0,e.jsx)("option",{value:x,children:x},x))]}),(0,e.jsx)("input",{type:"date",value:w,onChange:x=>{k(x.target.value),ee()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"}})]}),(0,e.jsxs)("div",{className:"me-audit-types-top",children:[(0,e.jsx)("span",{className:"me-audit-types-label",children:t("auditTypeLabel")}),z.map(x=>{let Q=x==="all"?"var(--dsw-alias-label-secondary, #9ca3af)":lt[x]||"#6B7280";return(0,e.jsxs)("button",{type:"button",className:`me-audit-kind${S===x?" active":""}`,onClick:()=>{g(x),ee()},children:[(0,e.jsx)("span",{className:"me-audit-kind-dot",style:{background:Q}}),(0,e.jsx)("span",{className:"me-audit-kind-name",children:t(x==="all"?"all":it[x])}),(0,e.jsx)("span",{className:"me-audit-kind-count",children:ae[x]||0})]},x)})]})]}),(0,e.jsxs)("div",{className:"me-audit-main",children:[(0,e.jsxs)("div",{className:"me-audit-queue",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("button",{type:"button",className:`mc-btn${j==="pending"?" me-on":""}`,onClick:()=>M("pending"),children:[t("pending"),"\uFF08",s.length,"\uFF09"]}),(0,e.jsxs)("button",{type:"button",className:`mc-btn${j==="rejected"?" me-on":""}`,onClick:()=>M("rejected"),children:[t("rejected"),"\uFF08",p.length,"\uFF09"]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("label",{style:{fontSize:12},children:[(0,e.jsx)("input",{type:"checkbox",checked:ye.length>0&&re.length===ye.length,onChange:x=>{x.target.checked?T(new Set(ye.map(Q=>Q.path))):T(new Set)}})," ",t("selectAll"),"\uFF08",ye.length,"\uFF09"]}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.65},children:[t("auditSelected")," ",re.length]}),j==="pending"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!K,onClick:Le,children:["\u{1F527} ",t("reclassify")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!re.length||!!K,onClick:()=>m("approved"),children:["\u2713 ",t(j==="rejected"?"restore":"approve")]}),j==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!re.length||!!K,onClick:()=>m("rejected"),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!re.length||!!K,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&m("delete")},children:["\u{1F5D1} ",t("restoreDelete")]}),re.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ee,children:t("auditClearSelection")})]}),ye.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:ye.map(x=>{let Q=lt[x.kind]||"#6B7280";return(0,e.jsx)("div",{className:`me-audit-row${x.kind==="core"?" core":""}${J&&J.path===x.path?" active":""}`,children:(0,e.jsxs)("div",{className:"me-audit-row-main",onClick:()=>$(x.path),children:[(0,e.jsx)("input",{type:"checkbox",checked:U.has(x.path),onClick:me=>me.stopPropagation(),onChange:()=>Be(x.path)}),(0,e.jsx)("span",{className:"me-audit-row-tile",style:{color:Q,borderColor:Q+"38",background:Q+"18"},children:Ft[x.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"me-audit-row-copy",children:[(0,e.jsxs)("div",{className:"me-audit-row-top",children:[(0,e.jsx)("span",{className:`me-audit-row-kind${x.kind==="core"?" core":""}`,children:x.kind==="core"?"\u2B50 "+t("kindCore"):t(it[x.kind]||"kindKnowledge")}),x.revision&&(0,e.jsxs)("span",{className:"me-audit-row-state",style:{color:"#a78bfa",filter:"saturate(1.2)"},children:["\u270F\uFE0F ",t("auditRevision")]}),(0,e.jsx)("span",{className:`me-audit-row-state ${j==="pending"?"pending":"rejected"}`,children:j==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"me-audit-row-time",children:Ra(x.created)||"-"})]}),(0,e.jsx)("button",{type:"button",className:"me-audit-row-title",title:x.title,onClick:()=>$(x.path),children:x.title}),x.revision&&(0,e.jsxs)("p",{className:"me-audit-row-reason",style:{color:"#a78bfa"},children:["\u270F\uFE0F ",t("auditRevisionFrom"),"\uFF1A",x.revision.targetTitle||x.revision.targetPath]}),(x.reason||x.summary)&&(0,e.jsx)("p",{className:"me-audit-row-reason",children:x.reason||x.summary}),(0,e.jsxs)("div",{className:"me-audit-row-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Pt(x.submittedBy)]}),(Array.isArray(x.tags)?x.tags:[]).slice(0,3).map(me=>(0,e.jsxs)("span",{children:["#",me]},me))]})]}),(0,e.jsx)("div",{className:"me-audit-row-actions",onClick:me=>me.stopPropagation(),children:j==="pending"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>m("approved",[x.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},onClick:()=>m("rejected",[x.path]),children:"\u2715"})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},title:t("restore"),onClick:()=>m("approved",[x.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},title:t("restoreDelete"),onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&m("delete",[x.path])},children:"\u{1F5D1}"})]})})]})},x.path)})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:20,textAlign:"center"},children:t(R?"auditNoMatch":"noAuditItems")})]}),(0,e.jsx)("aside",{className:"me-audit-preview",children:J?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"me-audit-preview-head",children:[(0,e.jsxs)("div",{className:"me-audit-preview-top",children:[(0,e.jsxs)("span",{className:"me-audit-kind-badge",style:{color:lt[J.kind]||"#6B7280",borderColor:(lt[J.kind]||"#6B7280")+"59",background:(lt[J.kind]||"#6B7280")+"1a"},children:[Ft[J.kind]||"\u{1F4CE}"," ",t(it[J.kind]||"kindKnowledge")]}),(0,e.jsx)("span",{className:`md-chip ${j==="pending"?"md-chip-st-warn":"md-chip-st-bad"}`,children:j==="pending"?J.kind==="core"?"\u2B50 "+t("coreSuggested"):"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.55},children:Ra(J.created)})]}),(0,e.jsx)("h3",{children:J.title}),J.revision&&(0,e.jsxs)("div",{className:"me-audit-preview-reason",style:{color:"#a78bfa",marginBottom:6},children:["\u270F\uFE0F ",t("auditRevisionFrom"),"\uFF1A",J.revision.targetTitle||J.revision.targetPath]}),(0,e.jsxs)("div",{className:"me-audit-preview-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Pt(J.submittedBy)]}),!!J.reason&&(0,e.jsxs)("span",{className:"me-audit-preview-reason",children:["\u2691 ",J.reason]}),(Array.isArray(J.tags)?J.tags:[]).slice(0,5).map(x=>(0,e.jsxs)("span",{children:["#",x]},x))]})]}),(0,e.jsxs)("div",{className:"me-audit-preview-body",children:[Ae.loading&&(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("loading")}),Ae.error&&(0,e.jsxs)("div",{className:"me-audit-preview-empty",style:{color:"#f87171"},children:["\u26A0 ",t("auditBodyFail"),"\uFF1A",Ae.error]}),Ae.text!=null?(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:Zt(Ga(ca(Ae.text).body,J.title))}}):!Ae.loading&&(0,e.jsx)("p",{className:"me-audit-preview-summary",children:J.summary||""})]}),(0,e.jsxs)("div",{className:"me-audit-preview-actions",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!!K,onClick:()=>m("approved",[J.path]),children:["\u2713 ",j==="rejected"?t("restore"):J.kind==="core"?t("approveCore"):t("approve")]}),j==="pending"&&J.kind!=="core"&&!J.revision&&(0,e.jsxs)("button",{type:"button",className:"mc-btn me-core-btn",disabled:!!K,onClick:()=>m("approved",[J.path],{kind:"core"}),children:["\u2B50 ",t("approveAndCore")]}),j==="pending"&&J.kind==="core"&&(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!K,onClick:()=>m("approved",[J.path],{kind:"knowledge"}),children:t("approveAsNormal")}),j==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!K,onClick:()=>m("rejected",[J.path]),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!K,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&m("delete",[J.path])},children:["\u{1F5D1} ",t("restoreDelete")]})]})]}):(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t(R?"auditNoMatch":"noAuditItems")})})]})]})]})]})}var Wo={title:"",date:"",category:"",source:"",url:"",tags:"",pinned:!1,body:""};function Ha(){let t=new Date;return t.getFullYear()+"-"+String(t.getMonth()+1).padStart(2,"0")+"-"+String(t.getDate()).padStart(2,"0")}function Oa(t){try{let a=new URL(String(t||""));return a.protocol==="http:"||a.protocol==="https:"?a.href:""}catch{return""}}function _o(t,a){let n=String(t||"").slice(0,10);if(!n)return a("newsEarlier");if(n===Ha())return a("newsToday");let s=new Date;s.setDate(s.getDate()-1);let i=s.getFullYear()+"-"+String(s.getMonth()+1).padStart(2,"0")+"-"+String(s.getDate()).padStart(2,"0");return n===i?a("newsYesterday"):n}function Rn({item:t,t:a,active:n,onOpen:s,onEdit:i,onToggleRead:p,onDelete:y}){return(0,e.jsxs)("article",{className:"mc-news-card"+(t.pinned?" pinned":"")+(t.read?"":" unread")+(n?" active":""),onClick:()=>s(t),children:[(0,e.jsxs)("div",{className:"mc-news-top",children:[!t.read&&(0,e.jsx)("span",{className:"mc-news-dot",title:a("newsUnread")}),(0,e.jsx)("span",{className:"mc-news-cat",children:t.category||a("newsCategoryField")}),t.pinned&&(0,e.jsxs)("span",{className:"mc-news-pin",children:["\u{1F4CC} ",a("newsPinned")]}),(0,e.jsx)("span",{className:"mc-news-time",children:t.date||(t.updated||"").slice(0,10)})]}),(0,e.jsx)("h3",{className:"mc-news-title",children:t.title}),t.excerpt&&(0,e.jsx)("p",{className:"mc-news-excerpt",children:t.excerpt}),(0,e.jsxs)("div",{className:"mc-news-meta",children:[t.source&&(0,e.jsx)("span",{children:t.source}),(t.tags||[]).slice(0,3).map(S=>(0,e.jsxs)("span",{children:["#",S]},S)),(0,e.jsx)("span",{style:{marginLeft:"auto",opacity:.72},children:t.read?a("newsRead"):a("newsUnread")}),(0,e.jsxs)("span",{className:"mc-news-actions",onClick:S=>S.stopPropagation(),children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>p(t),children:t.read?a("newsMarkUnread"):a("newsMarkRead")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>i(t),children:a("newsEdit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>y(t),title:a("delete"),children:"\u2715"})]})]})]})}function Uo(t,a){let n=Date.now()-Number(t||0);if(!Number.isFinite(n)||n<0)return"";let s=Math.floor(n/6e4);if(s<1)return a("newsJustNow");if(s<60)return s+" "+a("newsMinutesAgo");let i=Math.floor(s/60);if(i<24)return i+" "+a("newsHoursAgo");let p=Math.floor(i/24);return p<7?p+" "+a("newsDaysAgo"):new Date(Number(t)).toISOString().slice(0,10)}var Wt="me.news.lastQuery",aa="me.news.prefs",On="me.news.view",$o={model:"\u6A21",product:"\u54C1",research:"\u7814",opensource:"\u6E90",industry:"\u4E1A",policy:"\u7B56",other:"\u8BAF"},Go=new Set(["the","a","an","of","to","for","and","in","on","is","are","with","how","why","new","its","it","as","at","by","from"]);function $a(t,a){try{let n=localStorage.getItem(t);if(n===null)return a;try{return JSON.parse(n)}catch{return n}}catch{return a}}function Mt(t,a){try{localStorage.setItem(t,JSON.stringify(a))}catch{}}function Pa(t,a=""){let n=$a(t,a);return typeof n=="string"?n:a}function zn(){let t=$a(On,null);return t&&typeof t=="object"?t:{}}function Wa(){return{types:{},sources:{},terms:{},opens:0,updatedAt:0}}function Ko(){let t=$a(aa,null);return!t||typeof t!="object"?Wa():{...Wa(),...t,types:t.types||{},sources:t.sources||{},terms:t.terms||{}}}function Wn(t){let a=[];for(let n of String(t||"").toLowerCase().split(/[^0-9a-z\u4e00-\u9fff]+/))!n||n.length<2||Go.has(n)||a.push(n);return a}function fa(t,a,n){a&&(t[a]=Math.min(60,(Number(t[a])||0)+n))}function qo(t,a,n){let s={...n,types:{...n.types},sources:{...n.sources},terms:{...n.terms}};return t&&(fa(s.types,t.type,a),fa(s.sources,t.sourceId,a),Wn(t.title).slice(0,6).forEach(i=>fa(s.terms,i,1)),s.opens=(Number(n.opens)||0)+1),s.updatedAt=Date.now(),s}function An(t,a){let n={...t,terms:{...t.terms}};return Wn(a).forEach(s=>fa(n.terms,s,3)),n.updatedAt=Date.now(),n}function Yo(t){let a=0;for(let n of String(t||""))a=(a*31+n.charCodeAt(0))%360;return a}function Vo(t){let a=String(t||"\u65B0\u95FB");if(/^[A-Za-z]/.test(a)){let n=a.split(/\s+/);return(n.length>1?n[0][0]+n[1][0]:a.slice(0,2)).toUpperCase()}return a.slice(0,1)}function Ln(t,a,n){let s=Math.max(0,(Date.now()-Number(t.publishedAt||0))/36e5),i=100-Math.min(60,s*.28);i+=(Number(a.types[t.type])||0)*1.6,i+=(Number(a.sources[t.sourceId])||0)*1.1;let p=(t.title+" "+(t.summary||"")).toLowerCase();for(let[S,g]of Object.entries(a.terms))p.includes(S)&&(i+=Math.min(8,Number(g)||0)*.9);let y=String(n||"").trim().toLowerCase();if(y)for(let S of y.split(/\s+/).filter(Boolean))String(t.title||"").toLowerCase().includes(S)?i+=16:p.includes(S)&&(i+=8);return i}function Jo({t,mode:a,version:n}){let[s,i]=(0,r.useState)([]),[p,y]=(0,r.useState)([]),[S,g]=(0,r.useState)(!0),[C,d]=(0,r.useState)(0),[w,k]=(0,r.useState)([]),[R,W]=(0,r.useState)(""),[U,T]=(0,r.useState)(null),[_,$]=(0,r.useState)(()=>Pa(Wt)),[K,he]=(0,r.useState)(()=>Pa(Wt).trim()),[q,L]=(0,r.useState)(""),[j,H]=(0,r.useState)(()=>{let N=zn();return typeof N.lang=="string"?N.lang:"zh"}),[I,Y]=(0,r.useState)(()=>zn().sort==="time"?"time":"rec"),[ce,ye]=(0,r.useState)(Ko),[ae,Be]=(0,r.useState)(!1),m=(N,D=!0)=>{T({msg:N,ok:D}),setTimeout(()=>T(null),3200)},Te=(0,r.useRef)(!1),ne=(0,r.useRef)(Pa(Wt).trim());(0,r.useEffect)(()=>{let N=setTimeout(()=>{let D=_.trim();he(D),Te.current&&(Mt(Wt,D),!(!D||D===ne.current)&&(ne.current=D,ye(se=>{let A=An(se,D);return Mt(aa,A),A})))},260);return()=>clearTimeout(N)},[_]),(0,r.useEffect)(()=>{Mt(On,{lang:j,sort:I})},[j,I]),(0,r.useEffect)(()=>{Be(!0);let N=setTimeout(()=>Be(!1),170);return()=>clearTimeout(N)},[q,j,K,I]);let Me=(0,r.useCallback)(async()=>{g(!0),W("");try{let N=new URLSearchParams({period:a==="month"?"month":"today",lang:"all"}),D=await fetch(X+"/news/feed?"+N.toString()).then(se=>se.json());if(!D||!D.ok)throw new Error(D&&D.error||t("newsFeedError"));i(D.items||[]),y(D.types||[]),d(Number(D.fetchedAt)||0),k(D.errors||[])}catch(N){let D=N&&N.message||t("newsFeedError");W(D),m(D,!1)}finally{g(!1)}},[a,t]);(0,r.useEffect)(()=>{Me()},[n,Me]);let re=async()=>{g(!0);try{let N=await fetch(X+"/news/feed/refresh",{method:"POST"}).then(D=>D.json());if(!N||!N.ok)throw new Error(N&&N.error||t("newsFeedError"));await Me(),m(t("newsUpdatedAt")+" "+new Date().toLocaleTimeString())}catch(N){let D=N&&N.message||t("newsFeedError");W(D),m(D,!1),g(!1)}},J=N=>(p.find(D=>D.id===N)||{}).label||t("all"),Ae=(s||[]).filter(N=>!j||N.lang===j),Le={};for(let N of Ae)Le[N.type]=(Le[N.type]||0)+1;let ee=q?Ae.filter(N=>N.type===q):Ae;if(K){let N=K.toLowerCase().split(/\s+/).filter(Boolean);ee=ee.filter(D=>{let se=[D.title,D.summary,D.source,J(D.type)].join(" ").toLowerCase();return N.every(A=>se.includes(A))})}let M=N=>(Number(N.points)||0)+(Number(N.comments)||0)*2,z=a==="month",x=z?ee.filter(N=>(N.points||0)>0):[],Q=z&&x.length>0,me=new Map;Q&&x.slice().sort((N,D)=>(D.points||0)-(N.points||0)||(D.comments||0)-(N.comments||0)).forEach((N,D)=>me.set(N.id||N.url||N.title,D+1)),ee=ee.slice().sort((N,D)=>I==="time"?(D.publishedAt||0)-(N.publishedAt||0):z&&Q?(D.points||0)-(N.points||0)||(D.comments||0)-(N.comments||0)||(D.publishedAt||0)-(N.publishedAt||0):Ln(D,ce,K)-Ln(N,ce,K));let Fe=Object.keys(ce.types||{}).sort((N,D)=>(ce.types[D]||0)-(ce.types[N]||0)).slice(0,3),ie=Object.keys(ce.terms||{}).sort((N,D)=>(ce.terms[D]||0)-(ce.terms[N]||0)).slice(0,4),fe=!!K||Fe.length>0||ie.length>0,u=N=>{Te.current=!0;let D=String(N??"").trim();he(D),Mt(Wt,D),!(!D||D===ne.current)&&(ne.current=D,ye(se=>{let A=An(se,D);return Mt(aa,A),A}))},O=()=>{Te.current=!1,ne.current="",L(""),H(""),$(""),he(""),Mt(Wt,"")},G=N=>ye(D=>{let se=qo(N,4,D);return Mt(aa,se),se}),ue=()=>{let N=Wa();Mt(aa,N),Mt(Wt,""),ne.current="",Te.current=!1,ye(N),$(""),he("")};return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(ha,{toast:U}),(0,e.jsxs)("div",{className:"mc-news-hero",children:[(0,e.jsx)("div",{className:"mc-news-hero-eye",children:t("newsHeroEye")}),(0,e.jsxs)("div",{className:"mc-news-hero-search",children:[(0,e.jsx)("span",{"aria-hidden":"true",style:{fontSize:15,opacity:.75},children:"\u{1F50E}"}),(0,e.jsx)("input",{type:"text",value:_,onChange:N=>{Te.current=!0,$(N.target.value)},onKeyDown:N=>{N.key==="Enter"&&u(_)},placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),_?(0,e.jsx)("button",{type:"button",className:"mc-news-hero-clear",title:t("cancel"),onClick:()=>{$(""),u("")},children:"\u2715"}):null,(0,e.jsx)("button",{type:"button",className:"mc-news-hero-go",onClick:()=>u(_),children:t("newsSearchGo")})]}),(0,e.jsx)("div",{className:"mc-news-hero-hint",children:t("newsHeroHint")})]}),fe?(0,e.jsxs)("div",{className:"mc-news-pref",children:[(0,e.jsxs)("span",{children:["\u{1F3AF} ",t("newsPersonalized")]}),K?(0,e.jsxs)("span",{children:["\xB7 ",t("newsLastQuery")," ",(0,e.jsx)("b",{children:K})]}):null,ie.length>0?(0,e.jsxs)("span",{children:["\xB7 ",ie.join(" / ")]}):null,Fe.length>0?(0,e.jsxs)("span",{children:["\xB7 ",Fe.map(J).join(" / ")]}):null,(0,e.jsx)("span",{className:"mc-news-pref-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ue,children:t("newsResetPrefs")})})]}):null,(0,e.jsxs)("div",{className:"mc-news-feed-toolbar",children:[(0,e.jsxs)("div",{className:"mc-news-pills",children:[(0,e.jsxs)("button",{type:"button",className:"mc-news-pill"+(q===""?" on":""),onClick:()=>L(""),children:[t("all"),(0,e.jsx)("span",{className:"mc-news-pill-count",children:Ae.length})]}),p.map(N=>Le[N.id]?(0,e.jsxs)("button",{type:"button",className:"mc-news-pill"+(q===N.id?" on":""),onClick:()=>L(q===N.id?"":N.id),children:[N.label,(0,e.jsx)("span",{className:"mc-news-pill-count",children:Le[N.id]})]},N.id):null)]}),(0,e.jsxs)("span",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-chip"+(j==="zh"?" active":""),onClick:()=>H("zh"),children:t("newsLangZh")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(j==="en"?" active":""),onClick:()=>H("en"),children:t("newsLangEn")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(j===""?" active":""),onClick:()=>H(""),children:t("newsLangAll")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(I==="rec"?" active":""),onClick:()=>Y("rec"),children:t("newsSortRec")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(I==="time"?" active":""),onClick:()=>Y("time"),children:t("newsSortTime")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:S,onClick:re,children:t(S?"newsLoading":"newsFeedRefresh")})]})]}),(0,e.jsxs)("div",{className:"mc-news-feed-meta",style:{margin:"0 0 8px"},children:[C?t("newsUpdatedAt")+" "+new Date(C).toLocaleTimeString():"",S?"":" \xB7 "+ee.length+" "+t("newsMatched")]}),a==="month"&&(0,e.jsx)("div",{className:"mc-news-feed-warn",style:{color:"var(--dsw-alias-label-secondary, #6b7280)",background:"transparent",borderColor:"var(--dsw-alias-border-l1, #e5e7eb)"},children:t(Q?"newsEnRanking":"newsZhArchive")}),R&&!S&&(0,e.jsxs)("div",{className:"mc-news-feed-warn",style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[(0,e.jsxs)("span",{children:["\u26A0 ",R]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:re,children:t("newsRetry")})]}),w.length>0&&(0,e.jsxs)("div",{className:"mc-news-feed-warn",children:["\u26A0 ",t("newsPartialFail"),"\uFF1A",w.slice(0,2).join("\uFF1B")]}),S?(0,e.jsxs)("div",{className:"mc-card mc-news-feed-empty mc-news-loading-card",role:"status","aria-live":"polite",children:[(0,e.jsx)(oa,{}),(0,e.jsx)("span",{children:t("newsLoading")}),(0,e.jsx)("small",{children:t("newsLoadingHint")})]}):s.length===0?(0,e.jsxs)("div",{className:"mc-card mc-news-feed-empty",children:[(0,e.jsx)("div",{children:t("newsFeedEmpty")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",style:{marginTop:10},onClick:re,children:t("newsFeedRefresh")})]}):ee.length===0?(0,e.jsxs)("div",{className:"mc-card mc-news-feed-empty mc-news-nomatch",children:[(0,e.jsx)("div",{children:t("newsNoMatch")}),(0,e.jsx)("p",{style:{margin:"6px 0 0",fontSize:11.5,lineHeight:1.6,opacity:.75},children:t("newsNoMatchHint")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",style:{marginTop:10},onClick:O,children:t("newsClearFilters")})]}):(0,e.jsx)("div",{className:"mc-news-grid"+(ae?" is-swapping":""),children:ee.map((N,D)=>{let se=Oa(N.url),A=J(N.type),oe=Oa(N.image),ve=Q&&me.get(N.id||N.url||N.title)||0,Se=Q&&ve>0&&ve<=3;return(0,e.jsxs)("a",{className:"mc-news-tile",style:{"--i":Math.min(D,14)},href:se||void 0,target:se?"_blank":void 0,rel:"noopener noreferrer",onClick:()=>G(N),children:[(0,e.jsxs)("span",{className:"mc-news-tile-cover",children:[oe?(0,e.jsx)("img",{className:"mc-news-tile-img",src:oe,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:De=>{let nt=De.currentTarget;nt.style.display="none",nt.nextElementSibling&&(nt.nextElementSibling.style.display="grid")}}):null,(0,e.jsxs)("span",{className:"mc-news-tile-gen",style:{"--hue":Yo(N.title),display:oe?"none":"grid"},children:[(0,e.jsx)("b",{children:$o[N.type]||"\u8BAF"}),(0,e.jsx)("small",{children:A}),(0,e.jsxs)("em",{children:[(0,e.jsx)("i",{children:Vo(N.source)}),N.source]})]}),(0,e.jsx)("span",{className:"mc-news-tile-badge"+(Se?" hot":""),children:ve?"#"+ve:A}),(0,e.jsx)("span",{className:"mc-news-tile-time",children:Uo(N.publishedAt,t)})]}),(0,e.jsxs)("span",{className:"mc-news-tile-body",children:[(0,e.jsx)("span",{className:"mc-news-tile-title",children:N.title}),N.summary?(0,e.jsx)("span",{className:"mc-news-tile-summary",children:N.summary}):null,(0,e.jsxs)("span",{className:"mc-news-tile-foot",children:[(0,e.jsx)("i",{className:"mc-news-tile-dot"}),(0,e.jsx)("span",{children:N.source}),ve?(0,e.jsxs)("span",{children:["\xB7 \u{1F525} ",t("newsHeat")," ",M(N)]}):null,(0,e.jsxs)("span",{className:"mc-news-tile-open",children:[t("newsOriginal")," \u2197"]})]})]})]},N.id||N.url||N.title)})})]})}function Xo({t,version:a,onUnreadChange:n}){let[s,i]=(0,r.useState)("daily"),p=s==="month"?"newsMonthlySub":s==="mine"?"newsMineSub":"newsDailySub";return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)("div",{className:"mc-v5-pagehead",children:(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"NEWSROOM"}),(0,e.jsx)("h1",{children:t("newsTitle")}),(0,e.jsx)("p",{children:t(p)})]})}),(0,e.jsxs)("div",{className:"mc-news-modes",children:[(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(s==="daily"?" active":""),onClick:()=>i("daily"),children:t("newsDaily")}),(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(s==="month"?" active":""),onClick:()=>i("month"),children:t("newsMonthly")}),(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(s==="mine"?" active":""),onClick:()=>i("mine"),children:t("newsMine")})]}),s==="mine"?(0,e.jsx)(Qo,{t,version:a,onUnreadChange:n}):(0,e.jsx)(Jo,{t,mode:s,version:a})]})}function Qo({t,version:a,onUnreadChange:n}){let[s,i]=(0,r.useState)([]),[p,y]=(0,r.useState)([]),[S,g]=(0,r.useState)({all:0,unread:0}),[C,d]=(0,r.useState)(""),[w,k]=(0,r.useState)(""),[R,W]=(0,r.useState)(""),[U,T]=(0,r.useState)(!1),[_,$]=(0,r.useState)(""),[K,he]=(0,r.useState)(null),[q,L]=(0,r.useState)(null),[j,H]=(0,r.useState)(!1),[I,Y]=(0,r.useState)(""),[ce,ye]=(0,r.useState)(null),ae=(M,z=!0)=>{ye({msg:M,ok:z}),setTimeout(()=>ye(null),2600)};(0,r.useEffect)(()=>{let M=setTimeout(()=>k(C.trim()),220);return()=>clearTimeout(M)},[C]);let Be=(0,r.useCallback)(async()=>{let M=new URLSearchParams;w&&M.set("q",w),R&&M.set("category",R),U&&M.set("unread","1");try{let z=await fetch(X+"/news?"+M.toString()).then(x=>x.json());if(!z||!z.ok)throw new Error(z&&z.error||"load failed");i(z.items||[]),y(z.categories||[]),g(z.counts||{all:0,unread:0}),n&&n(Number((z.counts||{}).unread)||0)}catch{ae(t("newsSaveFail"),!1)}},[w,R,U,n,t]);(0,r.useEffect)(()=>{Be()},[a,Be]);let m=async M=>{$(M.id);try{let z=await fetch(X+"/news/item?id="+encodeURIComponent(M.id)).then(x=>x.json());if(!z||!z.ok)throw new Error(z&&z.error||"load failed");he(z.item),z.item.read||await Te(M.id,!0)}catch{ae(t("newsSaveFail"),!1)}},Te=async(M,z)=>{try{let x=await fetch(X+"/news/read",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:M,read:z})}).then(Q=>Q.json());if(!x||!x.ok)throw new Error(x&&x.error||"read failed");he(Q=>Q&&Q.id===M?{...Q,read:!!z}:Q),await Be()}catch{ae(t("newsSaveFail"),!1)}},ne=async M=>{if(H(!1),M){let z=M;if(!z.body)try{let x=await fetch(X+"/news/item?id="+encodeURIComponent(z.id)).then(Q=>Q.json());x&&x.ok&&(z=x.item)}catch{}L({id:z.id,title:z.title||"",date:z.date||Ha(),category:z.category||"",source:z.source||"",url:z.url||"",tags:(z.tags||[]).join(", "),pinned:!!z.pinned,body:z.body||"",created:z.created||""})}else L({...Wo,date:Ha()})},Me=async()=>{if(q){if(!String(q.title||"").trim()||!String(q.body||"").trim()){ae(t("newsSaveFail"),!1);return}Y("save");try{let M={id:q.id||void 0,title:q.title,date:q.date,category:q.category,source:q.source,url:q.url,tags:String(q.tags||"").split(",").map(x=>x.trim()).filter(Boolean),pinned:!!q.pinned,body:q.body,created:q.created},z=await fetch(X+"/news/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M)}).then(x=>x.json());if(!z||!z.ok)throw new Error(z&&z.error||"save failed");L(null),$(z.item.id),he(z.item),await Be(),ae(t("newsSaved"))}catch(M){ae(M&&M.message||t("newsSaveFail"),!1)}finally{Y("")}}},re=async M=>{if(window.confirm(t("newsDeleteConfirm"))){Y("delete");try{let z=await fetch(X+"/news/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:M.id})}).then(x=>x.json());if(!z||!z.ok)throw new Error(z&&z.error||"delete failed");_===M.id&&($(""),he(null)),await Be(),ae(t("newsDeleted"))}catch{ae(t("newsSaveFail"),!1)}finally{Y("")}}},J=s.filter(M=>M.pinned),Ae=s.filter(M=>!M.pinned),Le=K?Oa(K.url):"",ee="";return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(ha,{toast:ce}),(0,e.jsxs)("div",{className:"mc-news-toolbar",children:[(0,e.jsxs)("span",{className:"mc-news-feed-meta",style:{marginLeft:0},children:[S.all," ",t("newsCountUnit")," \xB7 ",S.unread," ",t("newsUnread")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>ne(null),children:["\uFF0B ",t("newsNew")]}),(0,e.jsx)("input",{className:"mc-news-search",type:"text",value:C,onChange:M=>d(M.target.value),placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(R===""?" active":""),onClick:()=>W(""),children:t("all")}),p.map(M=>(0,e.jsx)("button",{type:"button",className:"mc-chip"+(R===M?" active":""),onClick:()=>W(z=>z===M?"":M),children:M},M)),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(U?" active":""),onClick:()=>T(M=>!M),children:t("newsUnreadOnly")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Be(),children:t("refresh")})]}),(0,e.jsxs)("div",{className:"mc-news-main",children:[(0,e.jsx)("div",{className:"mc-news-list",children:s.length===0?(0,e.jsxs)("div",{className:"mc-card mc-news-empty",children:[t(C||R||U?"newsNoMatch":"newsEmpty"),!C&&!R&&!U&&(0,e.jsx)("div",{style:{marginTop:10},children:(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>ne(null),children:["\uFF0B ",t("newsNew")]})})]}):(0,e.jsxs)(e.Fragment,{children:[J.length>0&&(0,e.jsxs)("div",{className:"mc-news-group",children:[(0,e.jsxs)("div",{className:"mc-news-group-label",children:["\u{1F4CC} ",t("newsPinned")]}),J.map(M=>(0,e.jsx)(Rn,{item:M,t,active:_===M.id,onOpen:m,onEdit:z=>ne(z),onToggleRead:z=>Te(z.id,!z.read),onDelete:re},M.id))]}),(0,e.jsx)("div",{className:"mc-news-group",children:Ae.map(M=>{let z=_o(M.date,t),x=z!==ee;return ee=z,(0,e.jsxs)(r.default.Fragment,{children:[x&&(0,e.jsx)("div",{className:"mc-news-group-label",children:z}),(0,e.jsx)(Rn,{item:M,t,active:_===M.id,onOpen:m,onEdit:Q=>ne(Q),onToggleRead:Q=>Te(Q.id,!Q.read),onDelete:re})]},M.id)})})]})}),K&&(0,e.jsxs)("aside",{className:"mc-news-reader",children:[(0,e.jsxs)("div",{className:"mc-news-reader-head",children:[(0,e.jsx)("span",{className:"mc-news-cat",children:K.category||t("newsCategoryField")}),K.pinned&&(0,e.jsxs)("span",{className:"mc-news-pin",children:["\u{1F4CC} ",t("newsPinned")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>{he(null),$("")},title:t("close"),children:"\u2715"})]}),(0,e.jsx)("h2",{children:K.title}),(0,e.jsxs)("div",{className:"mc-news-reader-meta",children:[(0,e.jsx)("span",{children:K.date||""}),K.source&&(0,e.jsxs)("span",{children:["\xB7 ",K.source]}),(0,e.jsxs)("span",{children:["\xB7 ",K.read?t("newsRead"):t("newsUnread")]}),(K.tags||[]).map(M=>(0,e.jsxs)("span",{children:["#",M]},M))]}),Le&&(0,e.jsx)("div",{style:{marginTop:8},children:(0,e.jsxs)("a",{className:"mc-btn",style:{textDecoration:"none"},href:Le,target:"_blank",rel:"noopener noreferrer",children:["\u2197 ",t("newsOpenLink")]})}),(0,e.jsx)("div",{className:"md-doc",style:{marginTop:12},dangerouslySetInnerHTML:{__html:Zt(Ga(K.body||"",K.title))}}),(0,e.jsxs)("div",{className:"mc-news-reader-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>ne(K),children:t("newsEdit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Te(K.id,!K.read),children:K.read?t("newsMarkUnread"):t("newsMarkRead")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:I==="delete",onClick:()=>re(K),children:t("delete")})]})]})]}),q&&(0,e.jsx)("div",{className:"me-overlay",onClick:()=>L(null),children:(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:860,width:"94vw",maxHeight:"90vh"},onClick:M=>M.stopPropagation(),children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--dsw-alias-border-l1, #e5e7eb)"},children:[(0,e.jsx)("b",{children:q.id?t("newsEdit"):t("newsNew")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>L(null),children:t("close")})]}),(0,e.jsxs)("div",{style:{padding:16,overflow:"auto",maxHeight:"calc(90vh - 60px)"},children:[(0,e.jsxs)("div",{className:"mc-news-form",children:[(0,e.jsxs)("label",{className:"full",children:[(0,e.jsx)("span",{children:t("newsTitleField")}),(0,e.jsx)("input",{className:"mc-news-input",value:q.title,onChange:M=>L(z=>({...z,title:M.target.value})),placeholder:t("newsTitlePlaceholder")})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsDateField")}),(0,e.jsx)("input",{className:"mc-news-input",type:"date",value:q.date||"",onChange:M=>L(z=>({...z,date:M.target.value}))})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsCategoryField")}),(0,e.jsx)("input",{className:"mc-news-input",list:"me-news-categories",value:q.category||"",onChange:M=>L(z=>({...z,category:M.target.value}))})]}),(0,e.jsx)("datalist",{id:"me-news-categories",children:p.map(M=>(0,e.jsx)("option",{value:M},M))}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsSourceField")}),(0,e.jsx)("input",{className:"mc-news-input",value:q.source||"",onChange:M=>L(z=>({...z,source:M.target.value}))})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsUrlField")}),(0,e.jsx)("input",{className:"mc-news-input",value:q.url||"",onChange:M=>L(z=>({...z,url:M.target.value})),placeholder:"https://\u2026"})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsTagsField")}),(0,e.jsx)("input",{className:"mc-news-input",value:q.tags||"",onChange:M=>L(z=>({...z,tags:M.target.value}))})]}),(0,e.jsxs)("label",{style:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:18},children:[(0,e.jsx)("input",{type:"checkbox",checked:!!q.pinned,onChange:M=>L(z=>({...z,pinned:M.target.checked}))}),(0,e.jsx)("span",{children:t("newsPinField")})]}),(0,e.jsxs)("label",{className:"full",children:[(0,e.jsx)("span",{children:t("newsBodyField")}),(0,e.jsx)("textarea",{className:"mc-news-textarea",value:q.body||"",onChange:M=>L(z=>({...z,body:M.target.value})),placeholder:t("newsBodyPlaceholder")})]}),j&&(0,e.jsx)("div",{className:"full mc-news-preview",children:(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:Zt(q.body||"")}})})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",marginTop:14},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>H(M=>!M),children:t(j?"newsEditBody":"newsPreview")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>L(null),children:t("cancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:I==="save",onClick:Me,children:t(I==="save"?"newsSaving":"newsSave")})]})]})]})})]})}function Zo({t,onReload:a,version:n}){let[s,i]=(0,r.useState)([]),[p,y]=(0,r.useState)(""),[S,g]=(0,r.useState)(null),C=(k,R=!0)=>{g({msg:k,ok:R}),setTimeout(()=>g(null),3200)},d=(0,r.useCallback)(async()=>{try{let k=await fetch(`${X}/recycle/list`).then(R=>R.json());k.ok&&i(k.items||[])}catch{}},[]);(0,r.useEffect)(()=>{d()},[n,d]);let w=async(k,R)=>{let W=(s.find(U=>U.path===R)||{}).title||R;y(k+R);try{let T=await fetch(X+(k==="restore"?"/recycle/restore":"/recycle/purge")+"?path="+encodeURIComponent(R)),_=await T.json().catch(()=>null);await d(),a&&a(),T.ok&&(!_||_.ok!==!1)?C(t(k==="restore"?"toastRestored":"toastPurged")+"\uFF1A"+W):C(t("toastFailed")+"\uFF1A"+(_&&_.error||"HTTP "+T.status),!1)}catch(U){C(t("toastFailed")+"\uFF1A"+String(U&&U.message||U),!1)}finally{y("")}};return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:ct}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(ha,{toast:S}),(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"RECYCLE CENTER"}),(0,e.jsx)("h1",{children:t("tabRecycle")}),(0,e.jsx)("p",{children:t("recyclePageSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:s.length}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!p||s.length===0,title:s.length?"":t("emptyRecycle"),onClick:async()=>{y("purgeAll");try{let k=await fetch(X+"/recycle/purge-expired?days=0"),R=await k.json().catch(()=>null);await d(),C(k.ok?t("toastPurgedExpired")+(R&&R.purged!=null?"\uFF08"+R.purged+"\uFF09":""):t("toastFailed"),k.ok)}catch(k){C(t("toastFailed")+"\uFF1A"+String(k&&k.message||k),!1)}finally{y("")}},children:["\u{1F5D1} ",t("emptyRecycle")]})]}),(0,e.jsx)("div",{className:"mc-v5-recycle-hint",children:t("recycleHint")}),s.length?(0,e.jsx)("div",{className:"mc-card mc-v5-recycle",children:s.map(k=>{let R=lt[k.kind]||"#6B7280";return(0,e.jsxs)("div",{className:"mc-v5-recycle-row",children:[(0,e.jsx)("span",{className:"mc-v5-recycle-tile",style:{color:R,background:R+"18",borderColor:R+"38"},children:Ft[k.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"mc-v5-recycle-copy",children:[(0,e.jsx)("b",{children:k.title}),(0,e.jsxs)("span",{children:[t(it[k.kind]||"kindKnowledge")," \xB7 ",t("deletedAt")," ",ma(k.deletedAt)||"-"]})]}),(0,e.jsxs)("div",{className:"mc-v5-recycle-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!p,onClick:()=>w("restore",k.path),children:t("restore")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!p,onClick:()=>{window.confirm(t("purgeConfirm"))&&w("purge",k.path)},children:t("purge")})]})]},k.path)})}):(0,e.jsxs)("div",{className:"mc-card mc-v5-empty-state",children:["\u{1F5D1}\uFE0F ",(0,e.jsx)("b",{children:t("emptyRecycle")}),(0,e.jsx)("span",{children:t("recycleEmptyHint").split("{days}").join("30")})]})]})]})}var Ga=(t,a)=>{let n=String(t||"").split(/\r?\n/),s=p=>String(p||"").replace(/[#*_`]/g,"").replace(/[\s::\-–—·]/g,"").trim(),i=s(a);for(;;){let p=0;for(;p<n.length&&!n[p].trim();)p++;let y=/^#{1,2}\s+(.+?)\s*$/.exec(n[p]||"");if(!y||s(y[1])!==i)break;for(n.splice(p,1);p<n.length&&!n[p].trim();)n.splice(p,1)}return n.join(`
964
- `)},er=t=>{let a=[],n=!1,s=0;for(let i of String(t||"").split(/\r?\n/)){let p=i.trim();if(/^```/.test(p)){n=!n;continue}if(n)continue;let y=/^(#{1,6})\s+(.+)$/.exec(p);if(!y)continue;s++;let S=y[1].length;S<=3&&a.push({id:"md-h-"+s,level:S,text:y[2].replace(/[#*_`>\[\]()]/g,"").replace(/\s+/g," ").trim()})}return a},Ka=t=>{let a=String(t.summary||"").replace(/[#>*_`]/g," ").replace(/\s+/g," ").trim();return a.length>150?a.slice(0,148)+"\u2026":a},_n=t=>{let a=String(t.summary||"").toLowerCase();return/决策|结论|决定|decision/.test(a)?"insightDecision":/根因|原因|root cause/.test(a)?"insightRoot":/教训|避免|lesson/.test(a)?"insightLesson":"insightSummary"},Un=({n:t=0,color:a="#ff9a72",size:n=30})=>{let s=Math.max(2,Math.min(6,Number(t)||2)),i=Array.from({length:s},(p,y)=>{let S=-Math.PI/2+y*Math.PI*2/s,g=y%2?13:16;return[20+Math.cos(S)*g,20+Math.sin(S)*g]});return(0,e.jsxs)("svg",{className:"mc-v5-mini",width:n,height:n,viewBox:"0 0 40 40","aria-hidden":"true",children:[i.map(([p,y],S)=>(0,e.jsx)("line",{x1:"20",y1:"20",x2:p,y2:y,stroke:a,strokeOpacity:".35"},"l"+S)),i.map(([p,y],S)=>(0,e.jsx)("circle",{cx:p,cy:y,r:S%2?2.2:1.8,fill:a,fillOpacity:S%2?.8:.55},"c"+S)),(0,e.jsx)("circle",{cx:"20",cy:"20",r:"2.6",fill:a})]})},tr=({card:t,t:a,onOpen:n,query:s,onDelete:i,onTagClick:p,pinned:y,onPin:S,onCore:g,links:C})=>{let d=lt[t.kind]||lt.other,w=Number(C??t.links??t.weight??0),k=Ia(t);return(0,e.jsxs)("article",{className:`mc-cardrow mc-card mc-v5-card${y?" pinned":""}${t.kind==="core"?" core":""}`,onClick:()=>n(t),children:[(0,e.jsxs)("div",{className:"mc-v5-card-top",children:[(0,e.jsx)("span",{className:"mc-v5-card-tile",style:{color:d,background:d+"18",borderColor:d+"38"},children:Ft[t.kind]||"\u{1F4CE}"}),(0,e.jsx)("span",{className:"mc-v5-card-kind-name",children:t.kind==="core"?"\u2B50 "+a("kindCore"):a(it[t.kind]||"kindKnowledge")}),t.kind==="core"&&(0,e.jsxs)("span",{className:"mc-v5-core-badge",children:["\u2B50 ",a("kindCore")]}),t.status==="pending"&&(0,e.jsxs)("span",{className:"mc-v5-card-status pending",children:["\u23F3 ",a("statusPending")]}),t.status==="rejected"&&(0,e.jsxs)("span",{className:"mc-v5-card-status rejected",children:["\u26D4 ",a("statusRejected")]}),mr(t.updated)&&(0,e.jsx)("span",{className:"mc-new",children:a("newBadge")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{className:"mc-v5-card-time",children:Tt(t.updated)}),g&&t.status!=="pending"&&t.status!=="rejected"&&(0,e.jsx)("button",{type:"button",className:`mc-v5-core${t.kind==="core"?" on":""}`,title:a(t.kind==="core"?"unsetCore":"setCore"),onClick:R=>{R.stopPropagation(),g(t.path,t.kind==="core"?"knowledge":"core")},children:t.kind==="core"?"\u2B50 "+a("coreShort"):"\u2606 "+a("setCoreShort")}),S&&(0,e.jsx)("button",{type:"button",className:`mc-v5-pin${y?" on":""}`,title:a(y?"unpinCard":"pinCard"),"aria-label":a(y?"unpinCard":"pinCard"),onClick:R=>{R.stopPropagation(),S(t.path)},children:"\u{1F4CC}"})]}),(0,e.jsx)("h4",{className:"mc-v5-card-title",children:s?Ea(t.title,s):t.title}),(0,e.jsxs)("div",{className:"mc-v5-card-insight",children:[(0,e.jsx)("span",{className:"mc-v5-insight-k",children:a(_n(t))}),(0,e.jsx)("span",{className:"mc-v5-card-lead",children:s?Ea(t.summary||"",s):Ka(t)})]}),s&&(()=>{let R=on(t.body||"",s);return R?(0,e.jsx)("p",{className:"mc-snippet",children:Ea(R,s)}):null})(),Ia(t).length>0&&(0,e.jsxs)("div",{className:"mc-tags mc-v5-card-tags",children:[Ia(t).slice(0,2).map(R=>(0,e.jsxs)("button",{type:"button",className:"mc-tag mc-tag-click",title:R,onClick:W=>{W.stopPropagation(),p&&p(R)},children:["#",R]},R)),k.length>2&&(0,e.jsxs)("span",{className:"mc-tag more",children:["+",k.length-2]})]}),(0,e.jsxs)("footer",{className:"mc-v5-card-foot",children:[w>0&&(0,e.jsxs)("span",{className:"mc-v5-conn",children:[(0,e.jsx)(Un,{n:w,color:d})," ",(0,e.jsx)("b",{children:w})," ",a("links")]}),(0,e.jsxs)("span",{className:"mc-v5-author",children:["\u{1F916} ",Pt(t.submittedBy)]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-card-del",title:a("delete"),onClick:R=>{R.stopPropagation(),window.confirm(a("deleteConfirm"))&&i&&i(t.path)},children:"\u{1F5D1}"})]})]})};function ar({t,tab:a,onReload:n,version:s}){let[i,p]=(0,r.useState)(null),[y,S]=(0,r.useState)(""),[g,C]=(0,r.useState)(null),[d,w]=(0,r.useState)(null),[k,R]=(0,r.useState)(null),[W,U]=(0,r.useState)(null),[T,_]=(0,r.useState)(null),[$,K]=(0,r.useState)(null),he=(0,r.useCallback)(async()=>{I("align");try{let u=await fetch(X+"/align").then(O=>O.json());u&&u.findings?K(u):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{I("")}},[t]),q=async()=>{if(window.confirm(t("alignFixConfirm"))){I("alignfix");try{let u=await fetch(X+"/setup-run",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(O=>O.json());u&&u.ok?(notify(t("alignFixed")),await he()):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{I("")}}},[L,j]=(0,r.useState)([]),[H,I]=(0,r.useState)(""),[Y,ce]=(0,r.useState)(!1),ye=(0,r.useCallback)(async()=>{if(!(!g||!g.merge||!g.merge.length)&&window.confirm(t("mergeAllConfirm"))){I("merge");try{let u={},O=se=>u[se]===void 0?se:u[se]=O(u[se]),G=(se,A)=>{u[O(se)]=O(A)},ue=new Set;for(let se of g.merge)ue.add(se.a.path),ue.add(se.b.path),G(se.a.path,se.b.path);let N={};for(let se of ue){let A=O(se);(N[A]=N[A]||[]).push(se)}let D=0;for(let se of Object.values(N)){if(se.length<2)continue;(await fetch(`${X}/merge?paths=${encodeURIComponent(se.join(","))}`).then(oe=>oe.json())).ok&&D++}await ae(),n&&n()}catch{}I("")}},[g,ae,n,t]);async function ae(){try{let u=await Promise.all([fetch(`${X}/stats`),fetch(`${X}/budget`),fetch(`${X}/capture-log`),fetch(`${X}/cards?status=all&limit=30&agent=${na}`),fetch(`${X}/overview`),fetch(`${X}/ledger?days=7`)]),[O,G,ue,N,D,se]=await Promise.all(u.map(A=>A.json()));O&&O.ok&&p(O),G&&G.ok&&w(G),ue&&ue.ok&&R(ue),N&&N.ok&&j(N.cards||[]),D&&D.ok&&U({db:D.db,backups:D.backups,total:D.total,version:D.version,degraded:D.degraded===!0}),_(se&&se.ok?se:{ok:!1,error:se&&se.error||""}),S(!O||!O.ok?t("adminLoadFail"):"")}catch{S(t("adminLoadFail"))}}let Be=(0,r.useCallback)(async()=>{I("scan");try{let u=await fetch(`${X}/optimize`).then(O=>O.json());u.ok&&C(u)}catch{S(t("adminLoadFail"))}finally{I("")}},[t]),[m,Te]=(0,r.useState)(null),ne=(0,r.useCallback)(async()=>{I("refine");try{let u=await fetch(`${X}/refine-scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:8})}).then(O=>O.json());u&&u.ok?Te(u):notify(u&&u.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{I("")}},[t]),Me=async(u,O)=>{if(!(O==="merge"&&!window.confirm(t("mergeConfirm")))){I("refineapply");try{let G=await fetch(`${X}/refine-apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({a:u.a.path,b:u.b.path,action:O,relation:u.relation})}).then(ue=>ue.json());G&&G.ok?(notify(t("refineApplied")),Te(ue=>ue&&{...ue,findings:(ue.findings||[]).filter(N=>!(N.a.path===u.a.path&&N.b.path===u.b.path))}),await ae(),n&&n()):notify(G&&G.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{I("")}}},[re,J]=(0,r.useState)(null),Ae=(0,r.useCallback)(async()=>{I("junk");try{let u=await fetch(`${X}/refine-junk`).then(O=>O.json());u&&u.ok?J(u.items||[]):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{I("")}},[t]),Le=async u=>{if(u.length&&window.confirm(t("junkRecycleAllConfirm"))){I("junkpurge");try{let O=await fetch(`${X}/refine-junk-purge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:u})}).then(G=>G.json());O&&O.removed?(notify(t("junkDone")+"\uFF1A"+O.removed.length+(O.failed?.length?"\uFF08\u5931\u8D25 "+O.failed.length+"\uFF09":"")),J(G=>G&&G.filter(ue=>!O.removed.includes(ue.path))),await ae(),n&&n()):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{I("")}}},[ee,M]=(0,r.useState)(null),z=(0,r.useCallback)(async()=>{I("goals");try{let u=await fetch(X+"/refine-goals",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:30})}).then(O=>O.json());u&&u.ok?M(u):notify(u&&u.error||t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{I("")}},[t]),x=async u=>{I("goalskeep");try{let O=await fetch(X+"/refine-goals-keep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:u.members.map(G=>G.path)})}).then(G=>G.json());O&&O.ok?(notify(t("goalDone")),M(G=>G&&{...G,clusters:(G.clusters||[]).filter(ue=>ue.goal!==u.goal)})):notify(t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{I("")}},Q=async u=>{if(window.confirm(t("mergeConfirm"))){I("goalsmerge");try{let O=await fetch(X+"/merge?paths="+encodeURIComponent(u.members.map(G=>G.path).join(","))).then(G=>G.json());O&&O.ok?(notify(t("goalMerged")),M(G=>G&&{...G,clusters:(G.clusters||[]).filter(ue=>ue.goal!==u.goal)}),await ae(),n&&n()):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{I("")}}};(0,r.useEffect)(()=>{ae()},[s]);let me=async(u,O)=>{if(window.confirm(t("mergeConfirm")))try{(await fetch(`${X}/merge?paths=${encodeURIComponent(u+","+O)}`).then(ue=>ue.json())).ok&&(await ae(),n&&n())}catch{}},Fe=async u=>{if(window.confirm(t("deleteConfirm")))try{(await fetch(`${X}/delete?path=${encodeURIComponent(u)}`).then(G=>G.json())).ok&&(await ae(),n&&n())}catch{}},ie=Bn,fe=({title:u,kind:O,updated:G,path:ue})=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:kt.colors[O]||"#666"}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:Tt(G)}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>Fe(ue),children:[t("delete")," \u2715"]})]});return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:ct}),(0,e.jsxs)("div",{style:{overflow:"auto"},children:[y&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",y]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:ae,children:["\u21BB ",t("retry")]})]}),a==="stats"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"SYSTEM STATUS"}),(0,e.jsx)("h1",{children:t("runtimeTitle")}),(0,e.jsx)("p",{children:t("runtimeSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:W?`${W.total||0} ${t("cardsUnit")}`:""}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ae(),children:["\u21BB ",t("refresh")]})]}),(0,e.jsxs)("div",{className:"mc-v5-statusgrid",children:[(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F5C4}\uFE0F"}),(0,e.jsx)("b",{children:W?W.total||0:"\u2014"}),(0,e.jsx)("span",{children:t("dbTitle")}),(0,e.jsx)("small",{children:W?.db?.journalMode||W?.db?.journal_mode||"SQLite"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F4BE}"}),(0,e.jsx)("b",{children:W?.backups?.count??"\u2014"}),(0,e.jsx)("span",{children:t("backupTitle")}),(0,e.jsx)("small",{children:W?.backups?.newestAt?`${Math.max(0,Math.floor((Date.now()-Number(W.backups.newestAt))/864e5))} \u5929\u524D`:"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u2728"}),(0,e.jsx)("b",{children:k?.available?k.health?.ok?"\u6B63\u5E38":"\u5F02\u5E38":"\u2014"}),(0,e.jsx)("span",{children:t("captureTitle")}),(0,e.jsx)("small",{children:k?.health?.lastAt?Tt(new Date(k.health.lastAt).toISOString()):"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F3F7}\uFE0F"}),(0,e.jsx)("b",{children:W?.version||"\u2014"}),(0,e.jsx)("span",{children:t("versionTitle")}),(0,e.jsx)("small",{children:t("v5Local")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FA7A} ",t("healthTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("healthHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ae(),children:["\u21BB ",t("refresh")]})]}),W?(()=>{let u=W.db||{},O=u.writable!==!1&&!u.corrupt,G=W.backups||{count:0,newestAt:0},ue=G.newestAt?Math.floor((Date.now()-Number(G.newestAt))/864e5):-1,N=G.count?ue>7?"warn":"ok":"bad",D=k&&k.available?k.health:null,se=D?D.ok?"ok":"warn":"none",A=$&&$.findings?$.onDisk&&$.residentServed===$.onDisk&&$.hostVersion===$.onDisk?"ok":"warn":"none",oe={ok:["\u2705","#10b981"],warn:["\u26A0","#f59e0b"],bad:["\u2717","#ef4444"],none:["\u2022","inherit"]},ve=[{label:t("healthDb"),level:O?"ok":"bad",text:O?"journal="+(u.journalMode||"?")+(u.checkedAt?" \xB7 "+new Date(u.checkedAt).toLocaleString():""):(u.error||t("healthDbBad"))+" \u2192 dsh-memory doctor"},{label:t("healthBackups"),level:N,text:G.count?(ue<=0?t("healthBackupToday").replace("{n}",String(G.count)):t("healthBackupAge").replace("{n}",String(G.count)).replace("{d}",String(ue)))+(G.files&&G.files.length?" \xB7 "+G.files[G.files.length-1]:""):t("healthNoBackups")},{label:t("healthCapture"),level:se,text:D?D.ok?t("healthCapOk"):t("healthCapFail")+"\uFF1A"+(D.reason||""):t("healthNoRecords")},{label:t("healthVersion"),level:A,text:A==="none"?t("healthRunAlign"):t("vcOnDisk")+" v"+($.onDisk||"?")+" \xB7 "+t("vcResident")+" v"+($.residentServed||"?")+" \xB7 "+t("vcLoaded")+" v"+($.hostVersion||"?"),action:A==="none"?{label:t("alignRun"),run:he}:null}];return(0,e.jsx)("div",{style:{marginTop:6},children:ve.map(Se=>(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontSize:12,padding:"3px 0",borderTop:"1px solid rgba(127,127,127,0.10)"},children:[(0,e.jsx)("span",{style:{width:14,flex:"0 0 auto",color:oe[Se.level][1]},children:oe[Se.level][0]}),(0,e.jsx)("b",{style:{minWidth:62,flex:"0 0 auto",opacity:.85},children:Se.label}),(0,e.jsx)("span",{style:{opacity:.82,wordBreak:"break-word"},children:Se.text}),Se.action&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{marginLeft:6,padding:"0 6px",fontSize:11},disabled:!!H,onClick:Se.action.run,children:Se.action.label})]},Se.label))})})():(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9FE} ",t("ledgerTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("ledgerHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ae(),children:["\u21BB ",t("refresh")]})]}),T?T.ok===!1?(0,e.jsxs)("div",{style:{color:"#f59e0b",fontSize:12,padding:"8px 0",lineHeight:1.7},children:["\u26A0 ",/未知接口|404|not found/i.test(String(T.error||""))?t("ledgerNeedRestart"):T.error||t("adminLoadFail")]}):T.totals.recalls+T.totals.captures===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("ledgerNoData")}):(0,e.jsxs)("div",{style:{marginTop:8},children:[(0,e.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:8},children:[{k:t("ledgerRecalls"),v:String(T.totals.recalls),s:t("ledgerInjected")+" "+Number(T.totals.injectedChars||0).toLocaleString()+" "+t("ledgerChars")},{k:t("ledgerCaptures"),v:String(T.totals.captures),s:t("ledgerLlmCalls")+" "+T.totals.llmCalls+(T.totals.captureFail?" \xB7 \u2717 "+T.totals.captureFail:"")},{k:t("ledgerEstimate"),v:"\u2248 "+Number(T.totals.estTokens||0).toLocaleString(),s:t("ledgerEstimateHint")},{k:t("ledgerUseful"),v:T.feedback.rate==null?"\u2014":Math.round(T.feedback.rate*100)+"%",s:t("ledgerUsefulHint")}].map(u=>(0,e.jsxs)("div",{style:{border:"1px solid rgba(127,127,127,.16)",borderRadius:10,padding:"8px 10px"},children:[(0,e.jsx)("div",{style:{fontSize:11,opacity:.6},children:u.k}),(0,e.jsx)("div",{style:{fontSize:18,fontWeight:700,lineHeight:1.35},children:u.v}),(0,e.jsx)("div",{style:{fontSize:10.5,opacity:.55,lineHeight:1.5},children:u.s})]},u.k))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:8,lineHeight:1.7},children:t("ledgerFormula")})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F527} ",t("alignTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!H,onClick:he,children:t(H==="align"?"exporting":"alignRun")}),$&&$.counts&&$.counts.fix>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!H,onClick:q,children:t(H==="alignfix"?"exporting":"alignFix")}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("alignHint")})]}),$&&$.findings?(0,e.jsxs)("div",{style:{marginTop:6},children:[(0,e.jsxs)("div",{style:{fontSize:12,opacity:.75,marginBottom:4},children:[t("alignDisk")," v",$.onDisk||"?",$.residentServed?" \xB7 "+t("alignResident")+" v"+$.residentServed:"",$.hostVersion?" \xB7 "+t("alignHost")+" v"+$.hostVersion:""]}),(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:$.findings.map((u,O)=>(0,e.jsxs)("li",{style:{padding:"4px 2px",borderTop:O?"1px solid rgba(127,127,127,0.12)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:u.level==="fix"?"#ef4444":u.level==="warn"?"#f59e0b":"#10b981"},children:u.level==="fix"?"\u2717":u.level==="warn"?"\u26A0":"\u2713"})," ",(0,e.jsx)("span",{children:u.title}),u.detail?(0,e.jsx)("div",{style:{opacity:.75,marginLeft:14},children:u.detail}):null,u.command?(0,e.jsxs)("div",{style:{marginLeft:14,opacity:.9},children:["\u2192 ",(0,e.jsx)("code",{children:u.command})]}):null]},O))})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginTop:4},children:t("alignIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FAB5} ",t("captureLog")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("captureLogHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ae(),children:["\u21BB ",t("refresh")]})]}),k?k.available===!1?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogUnavailable")}):(k.entries||[]).length===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogEmpty")}):(0,e.jsx)("div",{style:{maxHeight:260,overflow:"auto",marginTop:8},children:(0,e.jsx)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:(0,e.jsx)("tbody",{children:(k.entries||[]).map((u,O)=>{let G=Mo[u.action]||["\u2022","inherit"];return(0,e.jsxs)("tr",{style:{borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:Tt(u.time?new Date(u.time).toISOString():"")}),(0,e.jsxs)("td",{style:{padding:"4px 6px",whiteSpace:"nowrap",color:G[1],fontWeight:600},children:[G[0]," ",u.action]}),(0,e.jsx)("td",{style:{padding:"4px 6px"},children:u.reason||""}),(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:u.preview||"",children:u.preview||""})]},O)})})})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:["\u{1F916} ",t("captureAgentCards"),"\uFF08",L.length,"\uFF09"]}),L.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:L.map(u=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:lt[u.kind]||lt.other}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.title}),u.status==="pending"&&(0,e.jsxs)("span",{className:"mc-status",style:{background:"#f59e0b"},children:["\u23F3 ",t("statusPending")]}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:Tt(u.updated)})]},u.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noCards")})]}),i&&(0,e.jsxs)(e.Fragment,{children:[i.trend&&i.trend.length>0&&(()=>{let u=i.trend,O=Math.max(...u.map(D=>D.count),1),G=260,ue=50,N=G/u.length;return(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{fontSize:11,opacity:.6,marginBottom:4},children:["\u{1F4C8} ",t("trendLabel")]}),(0,e.jsx)("svg",{width:G,height:ue,style:{display:"block",width:"100%",height:50},children:u.map((D,se)=>{let A=Math.round(D.count/O*(ue-4));return(0,e.jsx)("rect",{x:se*N+1,y:ue-A,width:Math.max(N-2,2),height:A,rx:1.5,fill:D.count>0?"var(--dsw-alias-accent, #3b82f6)":"var(--dsw-alias-border-l1, #e5e7eb)",opacity:D.count>0?.85:.35},D.date)})})]})})(),(0,e.jsxs)("div",{className:"mc-stats",children:[(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:i.total}),(0,e.jsx)("span",{children:t("total")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:i.today}),(0,e.jsx)("span",{children:t("todayAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:i.week}),(0,e.jsx)("span",{children:t("weekAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:i.tags}),(0,e.jsx)("span",{children:t("tags")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("byKind")}),(0,e.jsx)("div",{style:{display:"flex",gap:10,flexWrap:"wrap"},children:ie.map(u=>(0,e.jsxs)("span",{style:{fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:kt.colors[u]||"#666"}}),t(it[u]),": ",i.byKind?.[u]||0]},u))})]}),d&&(d.budgetChars||d.recallLimit||d.embedding)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,fontSize:12},children:[(0,e.jsx)("b",{children:t("budgetLabel")}),"\uFF1A",t("budgetChars")," ",(0,e.jsx)("b",{children:d.budgetChars||8e4})," \xB7 ",t("recallLimitLabel")," ",(0,e.jsx)("b",{children:d.recallLimit||5})," \xB7 ",t("embeddingLabel")," ",d.embedding?"ON":"OFF"]}),(0,e.jsxs)("div",{className:"mc-card",children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("todayList"),"\uFF08",i.todayCards?.length||0,"\uFF09"]}),i.todayCards?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:i.todayCards.map(u=>(0,e.jsx)(fe,{title:u.title,kind:u.kind,updated:u.updated,path:u.path},u.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})]})]}),a==="optimize"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("organizeTitle")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!H,onClick:Be,children:H==="scan"?t("exporting"):"\u{1F50D} "+t("scanAndOrganize")}),g&&g.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!H,onClick:async()=>{if(window.confirm(t("oneClickOptimizeConfirm"))){I("oneclick");try{let u=JSON.stringify({cleanupStale:Y}),G=await(await fetch(`${X}/optimize-execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:u})).json();G&&G.ok?(notify(`${t("oneClickOptimizeDone")}\uFF1A${G.plan.merged} ${t("optimizedMerged")}${Y?` \xB7 ${G.plan.staleDeleted} ${t("optimizedStaleDeleted")}`:""}`),await ae(),n&&n(),C(null)):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{I("")}}},children:H==="oneclick"?t("exporting"):"\u26A1 "+t("oneClickOptimize")}),g&&g.merge?.length>0&&(0,e.jsxs)("label",{style:{fontSize:11,opacity:.7,display:"flex",alignItems:"center",gap:4},children:[(0,e.jsx)("input",{type:"checkbox",checked:Y,onChange:u=>ce(u.target.checked)}),t("oneClickAlsoStale")]})]}),!g&&(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:10},children:t("scanHint")}),g&&(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("mergePairs")}),(0,e.jsx)("div",{className:"spacer",style:{flex:1}}),g.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!H,onClick:ye,children:t(H==="merge"?"exporting":"batchMerge")})]}),(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("mergePairs")}),g.merge?.length?(0,e.jsx)("ul",{style:{margin:"0 0 12px",padding:0,listStyle:"none"},children:g.merge.map((u,O)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsxs)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[u.a.title," \u21C4 ",u.b.title]}),(0,e.jsxs)("span",{style:{opacity:.6},children:[Math.round(u.sim*100),"%"]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>me(u.a.path,u.b.path),children:t("mergeNow")})]},O))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:12},children:t("noOptimize")}),(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("staleCards"),"\uFF08",g.stale?.length||0,"\uFF09"]}),g.stale?.length>0&&(0,e.jsx)("div",{style:{marginBottom:6},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!H,onClick:async()=>{if(!window.confirm(t("deleteConfirm")))return;I("clean");let u=0;for(let O of g.stale)try{await fetch(`${X}/delete?path=${encodeURIComponent(O.path)}`),u++}catch{}I(""),notify(`${u} ${t("deletedStale")}`),await ae(),n&&n()},children:t("cleanStale")})}),g.stale?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:g.stale.map(u=>(0,e.jsx)(fe,{title:u.title,kind:"other",updated:u.updated,path:u.path},u.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9ED} ",t("refineTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!H,onClick:ne,children:t(H==="refine"?"exporting":"refineScan")}),(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("refineHint")})]}),m?.findings?.length?m.findings.map((u,O)=>(0,e.jsxs)("div",{style:{borderTop:O?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:3},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:u.relation==="conflict"?"#ef4444":u.relation==="duplicate"?"#f59e0b":"#10b981"},children:t("refineRel_"+u.relation)}),(0,e.jsxs)("span",{style:{opacity:.55},children:[" \xB7 sim ",u.sim," \xB7 ",u.useModel||""]}),u.conflict?(0,e.jsx)("span",{style:{marginLeft:6},children:u.conflict}):null]}),(0,e.jsxs)("div",{style:{fontSize:12,opacity:.85,marginBottom:5},children:["A\uFF1A",u.a.title,(0,e.jsx)("br",{}),"B\uFF1A",u.b.title]}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!H,onClick:()=>Me(u,"keepA"),children:t("refineKeepA")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!H,onClick:()=>Me(u,"keepB"),children:t("refineKeepB")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!H,onClick:()=>Me(u,"keepBoth"),children:t("refineKeepBoth")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!H,onClick:()=>Me(u,"merge"),children:t("refineMerge")})]})]},O)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(m?"refineNone":"refineIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9F9} ",t("junkTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!H,onClick:Ae,children:t(H==="junk"?"exporting":"junkScan")}),re?.length?(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!H,onClick:()=>Le(re.map(u=>u.path)),children:t(H==="junkpurge"?"exporting":"junkRecycleAll")}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("junkHint")})]}),re?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:re.map((u,O)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 2px",borderTop:O?"1px solid rgba(127,127,127,0.14)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:u.reasons.join("\uFF1B"),children:u.title||u.path}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:u.reasons[0]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!H,onClick:()=>Le([u.path]),children:t("junkRecycle")})]},O))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(re?"junkNone":"junkIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F3AF} ",t("goalTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!H,onClick:z,children:t(H==="goals"?"exporting":"goalScan")}),ee?(0,e.jsxs)("span",{style:{opacity:.6,fontSize:11},children:[t("goalStats"),"\uFF1A",ee.cached," / ",ee.calls]}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("goalHint")})]}),ee?.clusters?.length?ee.clusters.map((u,O)=>(0,e.jsxs)("div",{style:{borderTop:O?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:4},children:[(0,e.jsx)("b",{children:u.goal})," ",(0,e.jsxs)("span",{style:{opacity:.55},children:["\xB7 ",u.members.length," ",t("goalCards")]})]}),(0,e.jsx)("ul",{style:{margin:"0 0 5px",padding:"0 0 0 16px",fontSize:12,opacity:.85},children:u.members.map((G,ue)=>(0,e.jsx)("li",{children:G.title},ue))}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!H,onClick:()=>x(u),children:t("goalKeep")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!H,onClick:()=>Q(u),children:t("goalMerge")})]})]},O)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(ee?"goalNone":"goalIdle")})]})]})]})]})}var Fa=[{key:"decision",label:"tplDecision",kind:"knowledge",tagKey:"tplDecisionTags",bodyKey:"tplDecisionBody"},{key:"bug",label:"tplBug",kind:"mistake",tagKey:"tplBugTags",bodyKey:"tplBugBody"},{key:"meeting",label:"tplMeeting",kind:"content",tagKey:"tplMeetingTags",bodyKey:"tplMeetingBody"},{key:"weekly",label:"tplWeekly",kind:"content",tagKey:"tplWeeklyTags",bodyKey:"tplWeeklyBody"}];function nr({t,newCard:a,setNewCard:n,onCreated:s}){if(!a)return null;let i=Fa.find(w=>w.key===a.template),p=a.body||(i?t(i.bodyKey):""),y=a.kind||(i?i.kind:"knowledge"),S=a.tags||(i?t(i.tagKey):""),g=a._creating,C=w=>{let k=Fa.find(R=>R.key===w);n(R=>({...R,template:w,kind:k?k.kind:R.kind,body:k?t(k.bodyKey):R.body,tags:k?t(k.tagKey):R.tags}))},d=async()=>{if(!(!a.title&&!p)){n(w=>({...w,_creating:!0}));try{(await fetch(`${X}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a.title||t("untitled"),kind:y,tags:S.split(",").map(k=>k.trim()).filter(Boolean),body:p,source:"manual"})}).then(k=>k.json())).ok?(n(null),s&&s()):n(k=>({...k,_creating:!1}))}catch{n(k=>({...k,_creating:!1}))}}};return(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>n(null),children:[(0,e.jsx)("style",{children:ct}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:600,width:"92vw",maxHeight:"85vh"},onClick:w=>w.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:t("newCard")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>n(null),children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10,overflow:"auto"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[Fa.map(w=>(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===w.key?" me-on":""}`,onClick:()=>C(w.key),children:t(w.label)},w.key)),(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===""?" me-on":""}`,onClick:()=>n(w=>({...w,template:"",body:"",tags:"",kind:"knowledge"})),children:t("tplBlank")})]}),(0,e.jsx)("select",{className:"mc-btn",value:y,onChange:w=>n(k=>({...k,kind:w.target.value})),style:{maxWidth:180,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:Bn.map(w=>(0,e.jsx)("option",{value:w,style:{background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:t(it[w])||w},w))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("cardTitle"),value:a.title||"",onChange:w=>n(k=>({...k,title:w.target.value}))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("tagsHint"),value:S,onChange:w=>n(k=>({...k,tags:w.target.value}))}),(0,e.jsx)("textarea",{className:"mc-btn",placeholder:t("cardBody"),value:p,onChange:w=>n(k=>({...k,body:w.target.value})),style:{minHeight:180,resize:"vertical",fontFamily:"inherit"}}),(0,e.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:g,onClick:d,children:t(g?"exporting":"createCard")})})]})]})]})}async function _a(t){let a=String(t||"");if(!a)return!1;try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(a),!0}catch{}try{let n=document.createElement("textarea");n.value=a,n.setAttribute("readonly",""),n.style.position="fixed",n.style.left="-9999px",n.style.top="0",document.body.appendChild(n),n.focus(),n.select();let s=!!(document.execCommand&&document.execCommand("copy"));return document.body.removeChild(n),s}catch{return!1}}function or({t,onClose:a}){let[n,s]=(0,r.useState)(""),[i,p]=(0,r.useState)(""),[y,S]=(0,r.useState)(""),[g,C]=(0,r.useState)(!0),[d,w]=(0,r.useState)(!1),[k,R]=(0,r.useState)(""),[W,U]=(0,r.useState)(""),T=(0,r.useRef)(null),_=(0,r.useRef)(null),$=()=>{let Y=T.current;if(Y)try{Y.focus(),Y.select()}catch{}},K=Y=>{R(Y),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>R(""),2400)};(0,r.useEffect)(()=>{let Y=!0;return fetch(X+"/diagnostics").then(ce=>ce.json()).then(ce=>{Y&&(ce&&ce.ok?(p(String(ce.diagnostics||"")),S(String(ce.version||""))):w(!0))}).catch(()=>{Y&&w(!0)}).finally(()=>{Y&&C(!1)}),()=>{Y=!1}},[]),(0,r.useEffect)(()=>{let Y=ce=>{ce.key==="Escape"&&a()};return window.addEventListener("keydown",Y),()=>{window.removeEventListener("keydown",Y),_.current&&clearTimeout(_.current)}},[a]);let he=(()=>{try{return String(navigator.language||"").toLowerCase().startsWith("en")?"en":"zh"}catch{return"zh"}})(),q=()=>{let Y=n.trim().split(`
965
- `)[0]||"",ce=dn({title:"[Bug] "+(Y.slice(0,60)||"memory-eternal \u95EE\u9898"),body:pn({description:n,diagnostics:i,version:y})});try{window.open(ce,"_blank","noopener")}catch{K(t("fbCopyFail"))}},L=async()=>{await _a(i)?(U(""),K(t("fbCopiedDiag"))):(U(i),K(t("fbCopyManual")))},j=async()=>{let Y=mn({lang:he,description:n,diagnostics:i});await _a(Y)?(U(""),K(t("fbCopiedPrompt"))):(U(Y),K(t("fbCopyManual")))},H={width:"100%",resize:"vertical",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13},I={margin:0,maxHeight:170,overflow:"auto",fontSize:11.5,lineHeight:1.55,padding:"8px 10px",borderRadius:10,background:"var(--dsw-alias-bg-layer-1, rgba(127,127,127,0.08))",whiteSpace:"pre-wrap",wordBreak:"break-word",overflowX:"hidden"};return(0,e.jsxs)("div",{className:"me-overlay",onClick:a,children:[(0,e.jsx)("style",{children:ct}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:720},onClick:Y=>Y.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F41E} ",t("fbTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10},children:[(0,e.jsx)("div",{style:{fontSize:12,opacity:.72,lineHeight:1.6},children:t("fbWhy")}),(0,e.jsx)("textarea",{value:n,onChange:Y=>s(Y.target.value),placeholder:t("fbDesc"),rows:5,style:H}),(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("fbDiag")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:L,disabled:!i,children:t("fbCopyDiag")})]}),(0,e.jsx)("pre",{style:I,children:g?t("fbLoading"):d?t("fbDiagFail"):i})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>{if(!n.trim()){K(t("fbNeedDesc"));return}q()},style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:["\u{1F680} ",t("fbOpenIssue")]}),(0,e.jsx)("span",{style:{opacity:.5,fontSize:12},children:t("fbOr")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:j,children:["\u{1F916} ",t("fbCopyPrompt")]})]}),k&&(0,e.jsx)("div",{style:{fontSize:12,color:"var(--dsw-alias-brand-primary, #3b82f6)"},children:k}),W&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsxs)("b",{style:{fontSize:12,color:"#b45309"},children:["\u26A0 ",t("fbCopyFail")]}),(0,e.jsx)("span",{style:{fontSize:11.5,opacity:.75},children:t("fbCopyManual")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:$,children:t("fbSelectAll")})]}),(0,e.jsx)("textarea",{ref:T,readOnly:!0,value:W,rows:7,style:H})]})]})]})]})}function rr({t,tab:a,onTab:n,onClose:s,onFeedback:i,onReplay:p}){let[y,S]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!y)return;let w=k=>{k.key==="Escape"&&S(null)};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[y]);let g=[{id:"group",label:t("supportGroup")},{id:"sponsor",label:t("supportSponsor")},{id:"legacy",label:t("supportLegacy")}],C="https://github.com/EternalNight996/memory-eternal/blob/main/README.md",d=(w,k)=>(0,e.jsxs)("figure",{children:[(0,e.jsx)("img",{src:w,alt:k,loading:"lazy",title:t("clickToZoom"),onClick:R=>S(R.currentTarget.currentSrc||w),onError:R=>{let W=R.currentTarget;W.dataset.fb||(W.dataset.fb="1",W.src="https://raw.githubusercontent.com/EternalNight996/memory-eternal/main/assets/support/"+String(w).split("/").pop())}}),(0,e.jsx)("figcaption",{children:k})]});return(0,e.jsxs)("div",{className:"me-overlay",onClick:s,children:[(0,e.jsx)("style",{children:ct}),(0,e.jsxs)("div",{className:"me-dialog me-support",onClick:w=>w.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F4AC} ",t("supportTitle")]}),(0,e.jsx)("div",{className:"me-head-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:s,children:t("close")})})]}),(0,e.jsx)("div",{className:"me-support-tabs",children:g.map(w=>(0,e.jsx)("button",{type:"button",className:`me-support-tab${a===w.id?" active":""}`,onClick:()=>n(w.id),children:w.label},w.id))}),(0,e.jsxs)("div",{className:"me-support-body",children:[a==="group"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportGroupHint")}),(0,e.jsxs)("div",{className:"me-support-qr",children:[d("support/group-qr.jpg",t("supportGroupQQ")),d("support/group-wechat.jpg",t("supportGroupWechat"))]}),(0,e.jsx)("p",{className:"me-support-note",style:{marginTop:12},children:(0,e.jsxs)("a",{className:"me-support-link",href:C,target:"_blank",rel:"noreferrer",children:[t("supportReadme")," \u2197"]})})]}),a==="sponsor"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportSponsorHint")}),(0,e.jsxs)("div",{className:"me-support-qr",children:[d("support/wechat-pay.jpg","\u5FAE\u4FE1\u6536\u6B3E\u7801"),d("support/wechat-reward.jpg","\u5FAE\u4FE1\u8D5E\u8D4F\u7801")]}),(0,e.jsxs)("p",{className:"me-support-note",style:{marginTop:12},children:["\u6253\u8D4F\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\uFF1B\u63D2\u4EF6\u672C\u4F53\u59CB\u7EC8\u5F00\u6E90\u514D\u8D39\uFF08MIT\uFF09\u3002",(0,e.jsx)("br",{}),(0,e.jsx)("a",{className:"me-support-link",href:"https://github.com/EternalNight996/memory-eternal/blob/main/SPONSOR.md",target:"_blank",rel:"noreferrer",children:"SPONSOR.md \u2197"})]})]}),a==="legacy"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{style:{margin:"0 0 8px",fontSize:14},children:t("supportLegacyTitle")}),(0,e.jsx)("p",{className:"me-support-note",children:t("supportLegacyBody")}),(0,e.jsxs)("div",{className:"me-support-actions",children:[(0,e.jsxs)("a",{className:"mc-btn",href:C,target:"_blank",rel:"noreferrer",children:["\u{1F4D6} ",t("supportReadme")," \u2197"]}),(0,e.jsxs)("a",{className:"mc-btn",href:"https://github.com/EternalNight996/memory-eternal/releases",target:"_blank",rel:"noreferrer",children:["\u{1F3F7} ",t("supportReleases")," \u2197"]})]})]})]}),(0,e.jsxs)("div",{className:"me-support-actions",style:{padding:"0 18px 16px",marginTop:0},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:i,children:["\u{1F41E} ",t("supportFeedback")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:p,children:["\u2728 ",t("supportReplay")]})]})]}),y&&(0,e.jsxs)("div",{className:"me-lightbox",role:"dialog","aria-modal":"true","aria-label":t("close"),onClick:w=>{w.stopPropagation(),S(null)},children:[(0,e.jsx)("button",{type:"button",className:"me-lightbox-close",onClick:w=>{w.stopPropagation(),S(null)},"aria-label":t("close"),children:"\u2715"}),(0,e.jsx)("img",{src:y,alt:"",onClick:w=>w.stopPropagation()})]})]})}function ir({t,onDone:a}){let[n,s]=(0,r.useState)(0),i="https://github.com/EternalNight996/memory-eternal",p=[{title:t("onboardStep0Title"),body:t("onboardStep0Body")},{title:t("onboardStep1Title"),body:t("onboardStep1Body")},{title:t("onboardStep2Title"),body:t("onboardStep2Body")},{title:t("onboardStep3Title"),body:t("onboardStep3Body")}],y=n===p.length-1;return(0,r.useEffect)(()=>{let S=g=>{g.key==="Escape"&&a()};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[a]),(0,e.jsxs)("div",{className:"me-overlay",style:{zIndex:1006},children:[(0,e.jsx)("style",{children:ct}),(0,e.jsxs)("div",{className:"me-dialog me-guide",children:[(0,e.jsxs)("div",{className:"me-guide-head",children:[(0,e.jsxs)("b",{children:["\u2728 ",t("onboardTitle")]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.55},children:t("onboardSub")})]}),(0,e.jsx)("div",{className:"me-guide-dots",children:p.map((S,g)=>(0,e.jsx)("span",{className:`me-guide-dot${g<=n?" on":""}`},g))}),(0,e.jsxs)("div",{className:"me-guide-body",children:[(0,e.jsx)("h3",{children:p[n].title}),(0,e.jsx)("p",{children:p[n].body}),n===0&&(0,e.jsxs)("div",{className:"me-guide-github",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>Ba(i),children:["\u2605 ",t("onboardStar")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Ba(i+"/fork"),children:["\u2442 ",t("onboardFork")]}),(0,e.jsx)("span",{className:"me-guide-github-hint",children:t("onboardStarHint")})]}),n===1&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsx)("span",{children:"\u81EA\u52A8\u6C89\u6DC0"}),(0,e.jsx)("span",{children:"\u5148\u5BA1\u540E\u5165"}),(0,e.jsx)("span",{children:"\u53EA\u53EC\u56DE\u76F8\u5173\u5C0F\u5757"})]}),n===2&&(0,e.jsxs)("div",{className:"me-guide-like",children:[(0,e.jsx)("span",{className:"me-guide-thumb",children:"\u{1F44D}"})," \u6709\u7528"]}),n===3&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsxs)("span",{children:["\u{1F4AC} ",t("supportGroup")]}),(0,e.jsxs)("span",{children:["\u2615 ",t("supportSponsor")]}),(0,e.jsxs)("span",{children:["\u{1F9E9} ",t("supportLegacy")]}),(0,e.jsxs)("span",{children:["\u{1F41E} ",t("supportFeedback")]})]})]}),(0,e.jsxs)("div",{className:"me-guide-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("onboardSkip")}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{className:"me-guide-tip",children:t("onboardTip")}),n>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>s(S=>S-1),children:t("onboardBack")}),y?(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:a,children:t("onboardStart")}):(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:()=>s(S=>S+1),children:t(n===0?"onboardStarred":"onboardNext")})]})]})]})}function sr({t,card:a,query:n,onClose:s,onDelete:i,onFeedback:p,onNavigate:y,onTagClick:S,allCards:g,onOpenRelated:C,onKindChange:d,onSaved:w}){let[k,R]=(0,r.useState)(0),[W,U]=(0,r.useState)(""),[T,_]=(0,r.useState)(()=>{try{let A=localStorage.getItem("me-read-width");return["narrow","mid","wide"].includes(A)?A:"mid"}catch{return"mid"}}),$={narrow:720,mid:900,wide:1180};(0,r.useEffect)(()=>{let A=oe=>{if(oe.key==="Escape"){s();return}let ve=String(oe.target&&oe.target.tagName||"").toLowerCase();ve==="input"||ve==="textarea"||ve==="select"||oe.target&&oe.target.isContentEditable||(oe.key==="j"&&y?(oe.preventDefault(),y(1)):oe.key==="k"&&y&&(oe.preventDefault(),y(-1)))};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[s,y]);let K=async(A,oe)=>{let ve=await _a(String(A||""));U(ve?t("copied")+" \xB7 "+oe:t("copyFail")),setTimeout(()=>U(""),1500)},{meta:he,body:q}=(0,r.useMemo)(()=>ca(a.text||""),[a.text]),L=A=>{let oe=he.find(([ve])=>String(ve).toLowerCase()===A);return oe?oe[1]:""},j=nn(L("tags")),H=a.kind||L("kind")||"knowledge",I=String(a.status||L("status")||"approved").toLowerCase(),Y=lt[H]||"#6B7280",ce=(q||"").length>460,ye=(0,r.useMemo)(()=>Ga(q,a.title),[q,a.title]),ae=(0,r.useMemo)(()=>{let A=Ka(a);if(A)return A;let ve=(ye.split(/\r?\n/).map(Se=>Se.trim()).find(Se=>Se&&!/^#{1,2}\s/.test(Se))||"").replace(/[#>*_`]/g,"").replace(/\s+/g," ").trim();return ve.length>150?ve.slice(0,148)+"\u2026":ve},[a,ye]),Be=(0,r.useMemo)(()=>er(ye),[ye]),m=(0,r.useMemo)(()=>{let A=new Set(j);return(g||[]).filter(oe=>oe.path!==a.path&&(oe.tags||[]).some(ve=>A.has(ve))).slice(0,3)},[g,a.path,j.join("|")]),Te=()=>{M(String(a.title||"")),x((Array.isArray(j)?j:[]).join(", ")),me(String(q||"")),u(""),Le(!0)},ne=()=>{Le(!1),u("")},Me=async()=>{let A=String(ee||"").trim(),oe=String(Q||"").trim();if(!A){u(t("editTitleEmpty"));return}if(!oe){u(t("editBodyEmpty"));return}let ve=String(z||"").split(/[,,\n]+/).map(Se=>Se.trim()).filter(Boolean);ie(!0),u("");try{let Se=await fetch(`${X}/card/update`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:a.path,title:A,tags:ve,body:oe})}).then(De=>De.json());if(!Se||!Se.ok){u(Se&&Se.error||t("editFail"));return}Le(!1),w&&await w({path:a.path,status:I,title:A})}catch(Se){u(String(Se&&Se.message||Se))}finally{ie(!1)}},[re,J]=(0,r.useState)(!0),[Ae,Le]=(0,r.useState)(!1),[ee,M]=(0,r.useState)(""),[z,x]=(0,r.useState)(""),[Q,me]=(0,r.useState)(""),[Fe,ie]=(0,r.useState)(!1),[fe,u]=(0,r.useState)(""),O=(0,r.useRef)(null),[G,ue]=(0,r.useState)(""),N=A=>{let oe=O.current;if(!oe)return;let ve=document.getElementById(A);if(!ve||!oe.contains(ve))return;let Se=ve.getBoundingClientRect().top-oe.getBoundingClientRect().top+oe.scrollTop-12;oe.scrollTo({top:Math.max(0,Se),behavior:"smooth"})},D=A=>{if(!re){J(!0),setTimeout(()=>N(A),80);return}N(A)},se=A=>{let oe=A.currentTarget,ve=oe.scrollHeight-oe.clientHeight;R(ve<=0?100:Math.min(100,Math.max(0,oe.scrollTop/ve*100)));let Se=oe.querySelectorAll(".md-doc .md-h"),De="",nt=oe.getBoundingClientRect().top+28;for(let qe of Se)if(qe.getBoundingClientRect().top<=nt)De=qe.id;else break;ue(De)};return(0,e.jsxs)("div",{className:"me-overlay",onClick:s,children:[(0,e.jsx)("style",{children:ct}),(0,e.jsxs)("div",{className:"me-dialog me-reader-dialog",onClick:A=>A.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{title:a.title,children:[(0,e.jsx)("span",{style:{marginRight:6,flex:"none"},children:Ft[H]||"\u{1F4CE}"}),a.title]}),(0,e.jsxs)("div",{className:"me-head-actions",children:[W&&(0,e.jsx)("span",{style:{fontSize:11.5,color:"#10b981",whiteSpace:"nowrap"},children:W}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyBody"),onClick:()=>K(q,t("copyBody")),children:["\u{1F4CB} ",t("copyBody")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyPath"),onClick:()=>K(a.path,t("copyPath")),children:["\u{1F517} ",t("copyPath")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",title:t("editCard"),onClick:Ae?ne:Te,children:Ae?"\u2716 "+t("editCancel"):"\u270F\uFE0F "+t("editCard")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("readWidth"),onClick:()=>{let A=["narrow","mid","wide"],oe=A[(A.indexOf(T)+1)%A.length];_(oe);try{localStorage.setItem("me-read-width",oe)}catch{}},children:[t("readWidth")," \xB7 ",t(T==="narrow"?"widthNarrow":T==="wide"?"widthWide":"widthMid")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>p&&p(!0),children:["\u{1F44D} ",t("fbUseful")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>p&&p(!1),children:["\u{1F44E} ",t("fbIrr")]}),ce&&(0,e.jsx)("button",{type:"button",className:"mc-btn","aria-expanded":re,onClick:()=>J(A=>!A),children:t(re?"collapse":"expand")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{window.confirm(t("deleteConfirm"))&&i&&i(a.path)},children:t("delete")}),d&&I==="approved"&&(H==="core"?(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>d(a.path,"knowledge"),children:t("unsetCore")}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>d(a.path,"core"),children:["\u2B50 ",t("setCore")]})),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:s,children:t("close")})]})]}),d&&(0,e.jsxs)("div",{className:"me-core-banner"+(H==="core"?" on":""),children:[(0,e.jsxs)("div",{className:"me-core-banner-k",children:["\u2B50 ",t("kindCore")]}),(0,e.jsx)("div",{className:"me-core-banner-desc",children:t(H==="core"?"coreActiveHint":"coreInactiveHint")}),I==="approved"?(0,e.jsx)("button",{type:"button",className:"mc-btn me-core-btn",onClick:()=>d(a.path,H==="core"?"knowledge":"core"),children:H==="core"?t("unsetCore"):"\u2B50 "+t("setCore")}):(0,e.jsx)("span",{className:"me-core-banner-desc",style:{flex:"none",opacity:.6},children:t("coreNeedApproval")})]}),(0,e.jsxs)("div",{className:"md-meta",children:[(0,e.jsxs)("span",{className:"md-chip md-chip-kind",style:{color:Y,borderColor:Y+"59",background:Y+"1a"},children:[Ft[H]||"\u{1F4CE}"," ",t(it[H]||"kindKnowledge")]}),(0,e.jsxs)("span",{className:"md-chip "+(I==="approved"?"md-chip-st-ok":I==="pending"?"md-chip-st-warn":"md-chip-st-bad"),children:[I==="approved"?"\u2705":I==="pending"?"\u23F3":"\u26D4"," ",t(I==="approved"?"statusApproved":I==="pending"?"statusPending":"statusRejected")]}),(Array.isArray(j)?j:[]).slice(0,8).map(A=>(0,e.jsxs)("button",{type:"button",className:"md-chip md-chip-tag mc-tag-click",title:A,onClick:()=>S&&S(A),children:["\u{1F3F7} ",A]},A)),!!L("updated")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F552} ",t("updated")," ",Tt(L("updated"))]}),!!L("source")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F4E5} ",L("source")]})]}),(0,e.jsx)("div",{className:"me-read-progress","aria-hidden":"true",children:(0,e.jsx)("i",{style:{width:k+"%"}})}),(0,e.jsxs)("div",{className:"me-reader-body",children:[(0,e.jsxs)("div",{className:"me-dialog-body me-reader-main",style:{maxWidth:$[T],margin:"0 auto",width:"100%",boxSizing:"border-box",...re?{}:{maxHeight:300,overflow:"hidden"}},ref:O,onScroll:se,onClick:re?void 0:A=>{A.stopPropagation(),J(!0)},children:[!Ae&&!!ae&&(0,e.jsxs)("div",{className:"me-reader-callout",children:[(0,e.jsx)("span",{className:"me-reader-callout-k",children:t(_n(a))}),(0,e.jsx)("p",{children:ae})]}),Ae?(0,e.jsxs)("div",{className:"me-edit-form",style:{display:"flex",flexDirection:"column",gap:8,padding:"2px 0 14px"},children:[(0,e.jsx)("div",{style:{fontSize:11.5,opacity:.62,lineHeight:1.6},children:t("editHint")}),(0,e.jsx)("label",{style:{fontSize:12,fontWeight:600,opacity:.8},htmlFor:"me-edit-title",children:t("editTitle")}),(0,e.jsx)("input",{id:"me-edit-title",value:ee,onChange:A=>M(A.target.value),maxLength:200,style:{width:"100%",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13,boxSizing:"border-box"}}),(0,e.jsx)("label",{style:{fontSize:12,fontWeight:600,opacity:.8},htmlFor:"me-edit-tags",children:t("editTags")}),(0,e.jsx)("input",{id:"me-edit-tags",value:z,onChange:A=>x(A.target.value),placeholder:t("editTagsHint"),style:{width:"100%",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13,boxSizing:"border-box"}}),(0,e.jsx)("label",{style:{fontSize:12,fontWeight:600,opacity:.8},htmlFor:"me-edit-body",children:t("editBody")}),(0,e.jsx)("textarea",{id:"me-edit-body",value:Q,onChange:A=>me(A.target.value),spellCheck:!1,rows:18,style:{width:"100%",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13,boxSizing:"border-box",resize:"vertical",minHeight:260,lineHeight:1.7,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"}}),fe&&(0,e.jsx)("div",{style:{color:"#f87171",fontSize:12},children:fe}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",alignItems:"center"},children:[(0,e.jsx)("span",{style:{marginRight:"auto",fontSize:11.5,opacity:.55},children:a.path}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ne,disabled:Fe,children:t("editCancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Me,disabled:Fe,style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:t(Fe?"editSaving":"editSave")})]})]}):(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:Zt(ye)}})]}),(0,e.jsxs)("aside",{className:"me-reader-side",children:[Be.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("contents")}),(0,e.jsx)("div",{className:"me-reader-toc",children:Be.map((A,oe)=>(0,e.jsxs)("button",{type:"button",className:`lv${A.level}${G===A.id?" active":""}`,onClick:()=>D(A.id),children:[(0,e.jsx)("span",{children:String(oe+1).padStart(2,"0")}),A.text]},A.id))})]}),(0,e.jsx)("div",{className:"side-label",children:t("source")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:L("source")||a.submittedBy||"\u2014"}),(0,e.jsx)("div",{className:"side-label",children:t("updated")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:Tt(L("updated")||a.updated)}),(0,e.jsx)("div",{className:"side-label",children:t("file")}),(0,e.jsx)("div",{className:"me-reader-side-val mono",children:a.path}),j.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("tags")}),(0,e.jsx)("div",{className:"me-reader-tags",children:j.slice(0,8).map(A=>(0,e.jsxs)("button",{type:"button",className:"mc-chip",onClick:()=>S&&S(A),children:["#",A]},A))})]}),m.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("related")}),(0,e.jsx)("div",{className:"me-reader-related",children:m.map(A=>(0,e.jsxs)("button",{type:"button",onClick:()=>C&&C(A),children:[(0,e.jsx)("span",{children:Ft[A.kind]||"\u{1F4CE}"}),(0,e.jsx)("b",{children:A.title})]},A.path))})]})]})]}),!re&&(0,e.jsxs)("div",{className:"md-collapsed-hint",onClick:A=>{A.stopPropagation(),J(!0)},children:[t("expand")," \u2304"]})]})]})}function lr({t,onOpen:a,all:n,onAllChange:s,onMutate:i,active:p,visible:y}){let[S,g]=(0,r.useState)([]),[C,d]=(0,r.useState)(null),[w,k]=(0,r.useState)(null),[R,W]=(0,r.useState)(!1),U=(0,r.useRef)(0),T=(0,r.useRef)(null);T.current||(T.current=Cn(96));let _=(0,r.useRef)(0),$=(0,r.useRef)(0),K=(0,r.useRef)(S);K.current=S;let he=(0,r.useRef)(n),q=(0,r.useRef)({requests:0,cacheHits:0,errors:0,timeouts:0,lastMs:0,lastBytes:0}),L=(0,r.useCallback)(async(ne,Me={})=>{let re=Array.isArray(ne)?ne.filter(Boolean):[],J=(n?"all|":"")+Ot(re);if(!Me.force){let z=T.current.get(J);if(z)return q.current.cacheHits+=1,d(z),g(re),k(null),W(!1),z}let Ae=++_.current;W(!0),k(null);let Le=new AbortController,ee=setTimeout(()=>{try{Le.abort()}catch{}},1600),M=performance.now();q.current.requests+=1;try{let z=await fetch(vn(X,re,{all:n}),{signal:Le.signal}),x=await z.json().catch(()=>null);if(Ae!==_.current)return null;if(!z.ok||!x||!x.ok)throw new Error(x&&x.error||"HTTP "+z.status);let Q=Mn(x);if(!Q.ok)try{console.warn("[memory-eternal] \u5206\u5C42\u54CD\u5E94\u8D8A\u754C\uFF1A"+Q.problems.join("\uFF1B"))}catch{}return T.current.set(J,x),q.current.lastMs=Math.round(performance.now()-M),q.current.lastBytes=Q.bytes,$.current||($.current=Math.round(performance.now())),d(x),g(re),k(null),x}catch(z){if(Ae!==_.current)return null;let x=Sn(z,{timeoutMs:1600,elapsedMs:performance.now()-M});x.timeout&&(q.current.timeouts+=1),q.current.errors+=1;try{console.warn("[memory-eternal] \u5C42\u7EA7\u52A0\u8F7D\u5931\u8D25 @ "+J+"\uFF1A"+x.message)}catch{}return k({...x,target:Ot(re),segments:re.slice()}),null}finally{clearTimeout(ee),Ae===_.current&&W(!1)}},[n]);(0,r.useEffect)(()=>{he.current!==n&&(he.current=n,T.current.clear(),p&&L([],{force:!0}))},[n,p,L]),(0,r.useEffect)(()=>{!p||C||R||L([])},[p,C,R,L]),(0,r.useEffect)(()=>{y&&C&&U.current++},[y,C]);let j=(0,r.useCallback)(ne=>{let Me=Array.isArray(ne)?ne:yn(ne&&ne.path!==void 0?ne.path:ne);Ot(Me)!==Ot(K.current)&&L(Me)},[L]),H=(0,r.useCallback)(ne=>{ne&&L(K.current.concat(String(ne)))},[L]),I=(0,r.useCallback)(()=>{T.current.clear();let ne=w&&Array.isArray(w.segments)?w.segments:K.current;L(ne,{force:!0})},[L,w]),Y=(0,r.useCallback)(async()=>(T.current.clear(),L(K.current,{force:!0})),[L]),ce=(0,r.useCallback)(async ne=>{try{let re=await(await fetch(`${X}/delete?path=${encodeURIComponent(ne)}`)).json();return re&&re.ok?(await Y(),i&&i(),!0):!1}catch{return!1}},[Y,i]),ye=(0,r.useCallback)(async ne=>{if(!ne||ne.length<2)return!1;try{let Me=await fetch(`${X}/merge?paths=${encodeURIComponent(ne.join(","))}`).then(re=>re.json());return Me&&Me.ok?(await Y(),i&&i(),!0):!1}catch{return!1}},[Y,i]);(0,r.useEffect)(()=>{let ne=()=>{let Me=typeof globalThis.__meGraphRuntime=="function"?globalThis.__meGraphRuntime():null;return{path:Ot(K.current),crumbs:C&&Array.isArray(C.crumbs)?C.crumbs.map(re=>({path:re.path,label:re.label,labelKey:re.labelKey,count:re.count})):[],level:C&&C.level?{mode:C.level.mode,total:C.level.total,items:C.level.items.length,edges:C.level.edges.length}:null,loading:!!R,error:w?{timeout:!!w.timeout,message:w.message,target:w.target||""}:null,requests:q.current.requests,cacheHits:q.current.cacheHits,errors:q.current.errors,timeouts:q.current.timeouts,lastMs:q.current.lastMs,lastBytes:q.current.lastBytes,firstLevelMs:$.current,cacheSize:T.current.size,timeoutMs:1600,runtime:Me}};return globalThis.__meGraphProbe=ne,()=>{if(globalThis.__meGraphProbe===ne)try{delete globalThis.__meGraphProbe}catch{globalThis.__meGraphProbe=void 0}}},[C,R,w]);let ae=C&&C.level?C.level:null,Be=ae?ae.items.length:0,m=ae?ae.total:0,Te=ae?ae.edges.length:0;return(0,e.jsxs)("div",{className:"me-graph me-v5-graph",children:[(0,e.jsx)("style",{children:ct}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-graphhead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"KNOWLEDGE GRAPH"}),(0,e.jsx)("h1",{children:t("graphTab")}),(0,e.jsx)("p",{children:t("graphHint")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:C?`${Be} ${t("graphItems")} \xB7 ${m} ${t("graphCardsUnit")} \xB7 ${Te} ${t("edges")}`:""})]}),!C&&!w&&(0,e.jsx)($n,{text:t("loadingGraph")}),!C&&w&&(0,e.jsxs)("div",{className:"mc-empty",style:{display:"flex",flexDirection:"column",gap:10,alignItems:"center"},children:[(0,e.jsxs)("span",{children:[w.timeout?t("graphLevelTimeout").replace("{ms}",String(1600)):t("graphLevelError"),"\uFF1A",w.message]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:I,children:t("graphRetry")})]}),C&&Be===0&&(0,e.jsx)("div",{className:"mc-empty",children:t("graphEmptyLevel")}),C&&Be>0&&(0,e.jsx)(dr,{level:ae,crumbs:C.crumbs||[],onOpen:a,onDelete:ce,onMerge:ye,onDrill:H,onNavigate:j,onRetry:I,error:C?w:null,loading:R,t,all:n,onAllChange:s,fitTrigger:U.current})]})}var kt={colors:{core:"#FF7A45",skill:"#8B5CF6",project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},shapes:{core:"diamond",skill:"hexagon",project:"circle",knowledge:"circle",content:"rect",prompt:"diamond",business:"hexagon",tool:"circle",mistake:"diamond",other:"circle"}};function It(t,a){try{let n=globalThis;if(n.__meGraphDrawWarned)return;n.__meGraphDrawWarned=!0,console.warn("[memory-eternal] \u77E5\u8BC6\u56FE\u8C31\u7ED8\u5236\u5F02\u5E38\uFF08\u5DF2\u515C\u5E95\uFF0C\u4E0D\u518D\u6574\u9875\u767D\u5C4F\uFF09"+(a?" @ "+a:""),t)}catch{}}function oa({value:t,small:a}){let n=typeof t=="number"&&Number.isFinite(t),s=n?Math.max(0,Math.min(100,t)):0;return(0,e.jsx)("div",{className:"me-progress"+(a?" me-progress-sm":"")+(n?" is-determinate":""),role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n?Math.round(s):void 0,"aria-label":"\u52A0\u8F7D\u8FDB\u5EA6",children:(0,e.jsx)("span",{className:"me-progress-fill",style:n?{width:Math.max(3,s)+"%"}:void 0})})}function $n({text:t,value:a}){return(0,e.jsxs)("div",{className:"me-loading",role:"status","aria-live":"polite",children:[(0,e.jsx)(oa,{value:a}),(0,e.jsx)("span",{className:"me-loading-text",children:t})]})}var Dn=[];function cr({crumbs:t,t:a,onPick:n,busy:s}){let i=Array.isArray(t)&&t.length?t:[{path:"",labelKey:"graphAllCrumb",label:"\u5168\u90E8"}];return(0,e.jsx)("nav",{className:"me-graph-crumbs","aria-label":a("graphBreadcrumbAria"),"data-level-depth":i.length,children:i.map((p,y)=>{let S=p.labelKey?a(p.labelKey):"",g=S&&S!==p.labelKey?S:p.label||p.path||"\u2014",C=y===i.length-1;return(0,e.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:2},children:[y>0&&(0,e.jsx)("span",{className:"sep","aria-hidden":"true",children:"\u203A"}),(0,e.jsx)("button",{type:"button",className:(y===0?"home":"")+(C?" current":""),"aria-current":C?"page":void 0,title:g,disabled:C||s,onClick:()=>{C||n(p)},children:g})]},p.path||"root")})})}function dr({level:t,crumbs:a,onOpen:n,onDelete:s,onMerge:i,onDrill:p,onNavigate:y,onRetry:S,error:g,loading:C,t:d,all:w,onAllChange:k,fitTrigger:R}){let W=(0,r.useRef)(null),U=(0,r.useRef)(null),T=(0,r.useRef)(null),_=(0,r.useRef)(null),$=(0,r.useRef)(null),K=t&&Array.isArray(t.items)?t.items:Dn,he=t&&Array.isArray(t.edges)?t.edges:Dn,q=t&&t.id||"",L=(0,r.useMemo)(()=>K.map(b=>({id:b.id,title:b.label||b.id,name:b.label||b.id,kind:b.kind||"other",tags:Array.isArray(b.tags)?b.tags:[],updated:b.updated||"",count:Number(b.count)||0,type:b.type||"card"})),[K]),j=(0,r.useMemo)(()=>he.map(b=>({source:b.source,target:b.target,type:b.type||"tag",weight:Number(b.weight)||1})),[he]),H=(0,r.useRef)(d);H.current=d;let I=(0,r.useRef)(n);(0,r.useEffect)(()=>{I.current=n},[n]);let Y=(0,r.useRef)(s);(0,r.useEffect)(()=>{Y.current=s},[s]);let ce=(0,r.useRef)(i);(0,r.useEffect)(()=>{ce.current=i},[i]);let ye=(0,r.useRef)(p);(0,r.useEffect)(()=>{ye.current=p},[p]);let[ae,Be]=(0,r.useState)(""),[m,Te]=(0,r.useState)(null),[ne,Me]=(0,r.useState)(null),re=(0,r.useRef)("");(0,r.useEffect)(()=>{re.current=ae.trim().toLowerCase()},[ae]),(0,r.useEffect)(()=>{let b=T.current;if(!b)return;let c=ae.trim().toLowerCase();if(!c)return;let le=b.nodes.find(Ne=>(Ne.name||"").toLowerCase().includes(c));if(le){T.current.selectedId=le.id,Te(le.id),b.panX=b.w/2-le.x*b.zoom,b.panY=b.h/2-le.y*b.zoom;try{b.render&&b.render()}catch(Ne){It(Ne,"search-center")}}},[ae]);let[J,Ae]=(0,r.useState)("all"),[Le,ee]=(0,r.useState)(!1),M=(0,r.useRef)("all"),[z,x]=(0,r.useState)(""),Q=(0,r.useRef)(""),[me,Fe]=(0,r.useState)(!1),ie=(0,r.useRef)(!1),[fe,u]=(0,r.useState)(null);(0,r.useEffect)(()=>{M.current=J},[J]),(0,r.useEffect)(()=>{Q.current=z},[z]),(0,r.useEffect)(()=>{ie.current=me},[me]);let O=(0,r.useMemo)(()=>{let b=new Map;for(let c of L)for(let le of c.tags||[]){let Ne=String(le).trim();Ne&&b.set(Ne,(b.get(Ne)||0)+1)}return[...b.entries()].sort((c,le)=>le[1]-c[1]).slice(0,24).map(([c,le])=>({tag:c,n:le}))},[L]),G=(0,r.useMemo)(()=>{let b={};for(let c of L)b[c.kind||"other"]=(b[c.kind||"other"]||0)+(c.type==="planet"?Math.max(1,c.count||0):1);return b},[L]),ue=(()=>{let b=ae.trim().toLowerCase();return!!b&&!L.some(c=>(c.title||c.name||"").toLowerCase().includes(b)||String(c.kind||"").toLowerCase().includes(b)||String(it[c.kind]||"").toLowerCase().includes(b))})();(0,r.useEffect)(()=>{let b=T.current;b&&b.requestRender&&b.requestRender()},[ae]),(0,r.useEffect)(()=>{let b=T.current;if(!(!b||!b.render))try{b.render()}catch(c){It(c,"filter/timeDim")}},[J,z,me]);let N=(0,r.useRef)(null),[D,se]=(0,r.useState)([]),[A,oe]=(0,r.useState)(null),[ve,Se]=(0,r.useState)(!1),[De,nt]=(0,r.useState)(null),[qe,Rt]=(0,r.useState)(""),zt=(0,r.useRef)(null),je=(0,r.useRef)(null),Ke=(b,c=!0)=>{zt.current&&clearTimeout(zt.current),nt({msg:b,ok:c}),zt.current=setTimeout(()=>nt(null),1900)},Et=b=>{Rt(b),je.current&&clearTimeout(je.current),je.current=setTimeout(()=>Rt(""),1600)};(0,r.useEffect)(()=>()=>{zt.current&&clearTimeout(zt.current),je.current&&clearTimeout(je.current)},[]);let _e=(0,r.useMemo)(()=>L.reduce((b,c)=>(b[c.id]=c,b),{}),[L]);return(0,r.useEffect)(()=>{let b=W.current;if(!b||L.length===0)return;let c=b.getContext("2d");if(!c)return;let le=Math.min(1.5,Math.max(1,window.devicePixelRatio||1)),Ne=()=>{let v=document.documentElement.getAttribute("data-theme");if(v)return v==="dark";try{return typeof window<"u"&&!!window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}catch{return!1}},He={};j.forEach(v=>{He[v.source]=(He[v.source]||0)+1,He[v.target]=(He[v.target]||0)+1});let Ye=Math.max(1,...Object.values(He)),Ue=Nn(),St=K.some(v=>v&&v.type==="planet"),o={nodes:K.filter(v=>v&&v.type!=="planet").concat(K.filter(v=>v&&v.type==="planet")).map(v=>wn(v,{degree:He[v.id]||0,maxDegree:Ye})),edges:j.map(v=>({sourceNodeId:v.source,targetNodeId:v.target,weight:Math.max(1,Number(v.weight)||1)})),panX:0,panY:0,zoom:1,running:!0,raf:0,tickCount:0,quietTicks:0,dragNode:null,selectedId:null,mouseX:0,mouseY:0,w:0,h:0,dpr:le,ctx:c,multi:[],marquee:null,planetLayer:St,levelId:q};o.domain=L,o.domainById=L.reduce((v,B)=>(v[B.id]=B,v),{}),o.nodeById=new Map(o.nodes.map(v=>[v.id,v])),o.edgePairs=(()=>{let v=new Map(o.nodes.map((P,V)=>[P.id,V])),B=new Int32Array(o.edges.length*2),F=0;for(let P of o.edges){let V=v.get(P.sourceNodeId),ge=v.get(P.targetNodeId);V===void 0||ge===void 0||(B[F]=V,B[F+1]=ge,F+=2)}return B.subarray(0,F)})(),o.alpha=1,o.forceParams=St?kn(ga(o.nodes.length)):ga(o.nodes.length),o.lastTickMs=0,o.lastRenderMs=0,o.nodes.forEach((v,B)=>{let F=B*2.399963229728653,P=12*Math.sqrt(B);v.x=Math.cos(F)*P,v.y=Math.sin(F)*P});let Ct=[...new Set(o.nodes.map(v=>v.type))];o.clustered=!St&&Ct.length>1,o.typeCenters=o.typeCenters||{};let Bt=St?0:160;Ct.forEach((v,B)=>{if(o.typeCenters[v])return;let F=B/Ct.length*Math.PI*2-Math.PI/2;o.typeCenters[v]={x:Math.cos(F)*Bt,y:Math.sin(F)*Bt}}),T.current=o;let vt=0,Ze=0,l=null,te="",de=()=>{let v=b.clientWidth,B=b.clientHeight;o.w=v,o.h=B,b.width=v*le,b.height=B*le,c.setTransform(le,0,0,le,0,0),(vt===0||Ze===0)&&v>0&&B>0&&o.tickCount>0&&Ue.raf(()=>gt()),vt=v,Ze=B};de();let Pe=new ResizeObserver(de);Pe.observe(b.parentElement);let Re=(v,B)=>v&&v.length>B?v.slice(0,B)+"\u2026":v,xe=(v,B,F,P)=>{if(c.beginPath(),P==="rect")c.rect(v-F,B-F*.75,F*2,F*1.5);else if(P==="diamond")c.moveTo(v,B-F),c.lineTo(v+F,B),c.lineTo(v,B+F),c.lineTo(v-F,B),c.closePath();else if(P==="hexagon"){for(let V=0;V<6;V++){let ge=Math.PI/3*V-Math.PI/2,Ce=v+F*Math.cos(ge),Ge=B+F*Math.sin(ge);V===0?c.moveTo(Ce,Ge):c.lineTo(Ce,Ge)}c.closePath()}else c.arc(v,B,F,0,Math.PI*2)},Ee=new Map,bt=(v,B)=>{let F=v+"|"+Math.round(B),P=Ee.get(F);if(!P){let V=parseInt(v.slice(1,3),16),ge=parseInt(v.slice(3,5),16),Ce=parseInt(v.slice(5,7),16);P=c.createRadialGradient(-B*.3,-B*.3,0,0,0,B*1.2),P.addColorStop(0,"rgba("+Math.min(255,V+70)+","+Math.min(255,ge+70)+","+Math.min(255,Ce+70)+",0.95)"),P.addColorStop(1,v),Ee.set(F,P)}return P},ut=(v,B)=>{let F=parseInt(v.slice(1,3),16),P=parseInt(v.slice(3,5),16),V=parseInt(v.slice(5,7),16);return"rgba("+F+","+P+","+V+","+B+")"},et=(v,B,F)=>{let P=Ge=>[parseInt(Ge.slice(1,3),16),parseInt(Ge.slice(3,5),16),parseInt(Ge.slice(5,7),16)],V=P(v),ge=P(B),Ce=Math.max(0,Math.min(1,Number(F)||0));return"rgb("+V.map((Ge,Oe)=>Math.round(Ge+(ge[Oe]-Ge)*Ce)).join(",")+")"},_t=1.1,Ut=3,gt=()=>{if(!o.nodes.length)return;let v=1/0,B=-1/0,F=1/0,P=-1/0;o.nodes.forEach(Ve=>{let yt=Number(Ve.r)||0,Xe=Ve.planet?yt*1.75:yt;Ve.x-Xe<v&&(v=Ve.x-Xe),Ve.x+Xe>B&&(B=Ve.x+Xe),Ve.y-Xe<F&&(F=Ve.y-Xe),Ve.y+Xe>P&&(P=Ve.y+Xe)});let V=20,ge=B-v+V*2,Ce=P-F+V*2,Ge=Math.min(o.w/ge,o.h/Ce),Oe=Math.pow(1/_t,Ut);if(o.zoom=Math.max(.35,Math.min(1.8,Ge*Oe)),o.planetLayer){let Ve=Ge*Math.pow(1/_t,Ut);Ve<o.zoom&&(o.zoom=Math.max(.12,Ve))}o.panX=o.w/2-(v+B)/2*o.zoom,o.panY=o.h/2-(F+P)/2*o.zoom};_.current=gt;let Lt=()=>{c.clearRect(0,0,o.w,o.h),o.searchTerm=re.current,o.kindFilter=M.current,o.timeMode=ie.current,o.tagFilter=Q.current;let v=o.tagFilter,B=o.kindFilter,F=f=>String(f||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");c.save();let P=o.w+"x"+o.h;if(!l||te!==P){l=new Path2D;for(let f=0;f<o.w;f+=24)l.moveTo(f,0),l.lineTo(f,o.h);for(let f=0;f<o.h;f+=24)l.moveTo(0,f),l.lineTo(o.w,f);te=P}c.strokeStyle=Ne()?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)",c.lineWidth=.5,c.stroke(l),c.restore(),c.save(),c.translate(o.panX,o.panY),c.scale(o.zoom,o.zoom);let V={};o.nodes.forEach(f=>V[f.id]=f);let ge=performance.now()<(o.motionUntil||0),Ce=o.nodes.length>40,Ge=Ce?1.5:.55,Oe=o.selectedId||o.hoverId,Ve=un({panX:o.panX,panY:o.panY,zoom:o.zoom,w:o.w,h:o.h,margin:80}),yt=(()=>{let f=(o.searchTerm||"").toLowerCase();if(!f)return null;let pe=[];for(let ze of o.nodes){let We=(o.domainById[ze.id]||{}).kind||"other";if(((ze.name||"").toLowerCase().includes(f)||String(it[We]||"").toLowerCase().includes(f)||String(We).toLowerCase().includes(f))&&pe.push(ze.id),pe.length>200)break}return pe})(),Xe=fn(o.nodes,{limit:gn(o.nodes.length),focusId:Oe,hoverId:o.hoverId,searchHits:yt,degree:He}),Dt=new Map,ra=(f,pe)=>{let ze=f+"|"+pe,Ie=Dt.get(ze);return Ie===void 0&&(c.font=f,Ie=c.measureText(pe).width,Dt.set(ze,Ie)),Ie},ka=o.nodes.length<=250,Sa=new Map,Xn=o.nodes.length>1200&&o.zoom<.3;o.edges.forEach(f=>{if(Xn)return;let pe=V[f.sourceNodeId],ze=V[f.targetNodeId];if(!pe||!ze||!ua(pe.x,pe.y,10,Ve)&&!ua(ze.x,ze.y,10,Ve))return;if(B!=="all"){let Ca=o.domainById[f.sourceNodeId]&&o.domainById[f.sourceNodeId].kind,Na=o.domainById[f.targetNodeId]&&o.domainById[f.targetNodeId].kind;if(Ca!==B&&Na!==B)return}if(v){let Ca=o.domainById[f.sourceNodeId]&&(o.domainById[f.sourceNodeId].tags||[]).includes(v),Na=o.domainById[f.targetNodeId]&&(o.domainById[f.targetNodeId].tags||[]).includes(v);if(!Ca&&!Na)return}let Ie=ze.x-pe.x,We=ze.y-pe.y,ot=Math.sqrt(Ie*Ie+We*We)||1,Je=ge?0:Ce?12:18,at=-We/ot*Je,st=Ie/ot*Je,ft=(pe.x+ze.x)/2+at,rt=(pe.y+ze.y)/2+st,wt=kt.colors[o.domainById[pe.id]&&o.domainById[pe.id].kind||"other"]||kt.colors.other,Xt=Oe&&(f.sourceNodeId===Oe||f.targetNodeId===Oe),Va=Oe?Xt?.62:.09:o.planetLayer?.32:Ce?.18:.26,Ja=parseInt(wt.slice(1,3),16),Xa=parseInt(wt.slice(3,5),16),Qa=parseInt(wt.slice(5,7),16),Za=Math.max(1,Number(f.weight)||1),en=Xt?1.8+Math.min(4,Za):.9+Math.min(3,Za-1)*.45,tn=Ja+","+Xa+","+Qa+","+Va+","+en,Qt=Sa.get(tn);Qt||(Qt={path:new Path2D,stroke:"rgba("+Ja+","+Xa+","+Qa+","+Va+")",width:en},Sa.set(tn,Qt)),Qt.path.moveTo(pe.x,pe.y),Qt.path.quadraticCurveTo(ft,rt,ze.x,ze.y)}),Sa.forEach(f=>{c.strokeStyle=f.stroke,c.lineWidth=f.width,c.stroke(f.path)});let Jt=null;Oe&&(Jt=new Set,o.edges.forEach(f=>{f.sourceNodeId===Oe?Jt.add(f.targetNodeId):f.targetNodeId===Oe&&Jt.add(f.sourceNodeId)}));let ia=(f,pe={})=>{let ze=Re(f.name,pe.maxChars||16),Ie=1/o.zoom,We="500 "+(12*Ie).toFixed(1)+"px -apple-system,Segoe UI,sans-serif";c.font=We;let Je=ra(We,ze)+16*Ie,at=18*Ie,st=f.y+f.r+(pe.gap===void 0?8:pe.gap)*Ie,ft=!0;for(let rt of qa)if(f.x-Je/2<rt.x+rt.w&&f.x+Je/2>rt.x&&st<rt.y+rt.h&&st+at>rt.y){ft=!1;break}return!ft&&!pe.force?!1:(qa.push({x:f.x-Je/2,y:st,w:Je,h:at}),c.fillStyle=Ne()?"rgba(30,30,35,0.92)":"rgba(255,255,255,0.92)",c.beginPath(),c.roundRect?c.roundRect(f.x-Je/2,st,Je,at,4*Ie):c.rect(f.x-Je/2,st,Je,at),c.fill(),c.strokeStyle=Ne()?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)",c.lineWidth=1*Ie,c.stroke(),c.fillStyle=Ne()?pe.strong?"#eee":"#bbb":pe.strong?"#111":"#444",c.textAlign="center",c.fillText(ze,f.x,st+13*Ie),!0)},Qn=(f,pe,ze)=>{let Ie=1/o.zoom,{isSel:We,isHov:ot,dimmed:Je}=ze;c.save(),c.globalAlpha=Je?.12:1;let at=c.createRadialGradient(f.x,f.y,f.r*.7,f.x,f.y,f.r*1.9);at.addColorStop(0,ut(pe,.34)),at.addColorStop(.5,ut(pe,.12)),at.addColorStop(1,ut(pe,0)),c.fillStyle=at,c.beginPath(),c.arc(f.x,f.y,f.r*1.9,0,Math.PI*2),c.fill(),c.save(),c.translate(f.x,f.y),c.rotate(-.34),c.strokeStyle=ut(pe,We||ot?.8:.32),c.lineWidth=Math.max(.8,1.1*Ie),c.beginPath(),c.ellipse(0,0,f.r*1.5,f.r*.3,0,0,Math.PI*2),c.stroke(),c.restore(),c.save(),c.translate(f.x,f.y),c.save(),c.beginPath(),c.arc(0,0,f.r,0,Math.PI*2),c.clip();let st=c.createRadialGradient(-f.r*.34,-f.r*.38,f.r*.08,0,0,f.r*1.08);st.addColorStop(0,et(pe,"#ffffff",.46)),st.addColorStop(.52,pe),st.addColorStop(1,et(pe,"#000000",.44)),ka&&(c.shadowColor=ut(pe,.45),c.shadowBlur=We?26:14),c.fillStyle=st,c.beginPath(),c.arc(0,0,f.r,0,Math.PI*2),c.fill(),c.shadowBlur=0;let ft=c.createLinearGradient(-f.r,-f.r,f.r,f.r);ft.addColorStop(0,"rgba(255,255,255,0.10)"),ft.addColorStop(.52,"rgba(0,0,0,0)"),ft.addColorStop(1,"rgba(0,0,0,0.30)"),c.fillStyle=ft,c.fillRect(-f.r,-f.r,f.r*2,f.r*2),c.beginPath(),c.arc(-f.r*.36,-f.r*.4,f.r*.3,0,Math.PI*2),c.fillStyle="rgba(255,255,255,0.14)",c.fill(),c.restore(),c.beginPath(),c.arc(0,0,f.r-Math.max(.5,1*Ie)*.5,Math.PI*1.05,Math.PI*1.95),c.strokeStyle="rgba(255,255,255,0.34)",c.lineWidth=Math.max(.8,1.4*Ie),c.stroke(),c.restore(),(We||ot)&&(c.save(),c.beginPath(),c.arc(f.x,f.y,f.r+5,0,Math.PI*2),c.strokeStyle=We?"#ffffff":ut(pe,.9),c.lineWidth=We?2.4:1.6,ka&&(c.shadowColor=pe,c.shadowBlur=12),c.stroke(),c.restore()),c.restore();let rt=f.r*o.zoom;if(We||ot||rt>=11){let wt=Math.max(8,Math.min(22,rt*.46))*Ie;if(c.save(),c.textAlign="center",c.textBaseline="middle",c.font="800 "+wt.toFixed(1)+"px -apple-system,Segoe UI,sans-serif",c.fillStyle="rgba(255,255,255,0.97)",c.fillText(xn(f.count,{unit:H.current("graphCountWan"),locale:H.current("graphCountLocale")}),f.x,f.y-(rt>=24?wt*.28:0)),rt>=24){let Xt=H.current("graphCardsUnit");c.font="600 "+(wt*.46).toFixed(1)+"px -apple-system,Segoe UI,sans-serif",c.fillStyle="rgba(255,255,255,0.72)",c.fillText(Xt,f.x,f.y+wt*.82)}c.restore()}},qa=[],$t=[];o.nodes.forEach(f=>{if(!ua(f.x,f.y,f.r+2,Ve))return;let pe=o.domainById[f.id]||{},ze=pe.kind||"other",Ie=o.timeMode?pr(pe.updated):kt.colors[ze]||kt.colors.other,We=kt.shapes[ze]||"circle",ot=o.selectedId===f.id,Je=o.hoverId===f.id,at=o.searchTerm||"",st=!at||(f.name||"").toLowerCase().includes(at)||String(it[ze]||"").toLowerCase().includes(at)||String(ze).toLowerCase().includes(at),ft=B==="all"||ze===B,rt=!v||(pe.tags||[]).includes(v),wt=Oe&&f.id!==Oe&&!(Jt&&Jt.has(f.id))||at&&!st||!ft||!rt;if(f.planet){$t.push({n:f,color:Ie,isSel:ot,isHov:Je,dimmed:wt,ok:ft&&rt});return}c.save(),c.globalAlpha=wt?.08:1,(ot||Je)&&ka&&(c.shadowColor=Ie,c.shadowBlur=ot?20:14),c.translate(f.x,f.y),xe(0,0,f.r,We),c.fillStyle=bt(Ie,f.r),c.fill(),ze==="core"&&(c.fillStyle="#1b120e",c.font="700 "+Math.max(10,Math.round(f.r*.95))+"px sans-serif",c.textAlign="center",c.textBaseline="middle",c.fillText("\u2605",0,0)),c.restore(),ot?(c.save(),xe(f.x,f.y,f.r+3,We),c.strokeStyle=Ie,c.lineWidth=3,c.shadowColor=Ie,c.shadowBlur=12,c.stroke(),c.restore()):Je?(c.save(),xe(f.x,f.y,f.r+2,We),c.strokeStyle=Ie,c.lineWidth=2,c.stroke(),c.restore()):at&&st?(c.save(),xe(f.x,f.y,f.r+2,We),c.strokeStyle="#e11d48",c.lineWidth=2,c.stroke(),c.restore()):o.multi.indexOf(f.id)>=0&&(c.save(),xe(f.x,f.y,f.r+2,We),c.strokeStyle="#60a5fa",c.lineWidth=2,c.shadowColor="#60a5fa",c.shadowBlur=8,c.stroke(),c.restore()),(ot||Je||!ge&&(Xe.has(f.id)&&o.zoom>Ge||!Ce&&o.zoom>.6))&&ft&&rt&&ia(f,{force:ot||Je})}),$t.forEach(f=>Qn(f.n,f.color,f));let Ya=$t.length<=12?1/0:8,sa=new Set;if(Number.isFinite(Ya)?($t.filter(f=>(f.isSel||f.isHov)&&f.ok).forEach(f=>{sa.add(f.n.id),ia(f.n,{gap:8,force:!0,maxChars:20})}),$t.filter(f=>f.ok&&!sa.has(f.n.id)).sort((f,pe)=>(pe.n.count||0)-(f.n.count||0)).slice(0,Ya).forEach(f=>{sa.has(f.n.id)||(sa.add(f.n.id),ia(f.n,{gap:8,maxChars:20}))})):$t.forEach(f=>{f.ok&&ia(f.n,{gap:8,force:f.isSel||f.isHov,maxChars:20})}),c.restore(),o.marquee){let f=o.marquee,pe=Math.min(f.sx,f.ex),ze=Math.min(f.sy,f.ey),Ie=Math.abs(f.ex-f.sx),We=Math.abs(f.ey-f.sy);c.save(),c.setLineDash([4,4]),c.strokeStyle="rgba(96,165,250,0.9)",c.lineWidth=1,c.fillStyle="rgba(96,165,250,0.12)",c.fillRect(pe,ze,Ie,We),c.strokeRect(pe,ze,Ie,We),c.restore()}if(o.hoverId&&N.current){let f=o.domainById[o.hoverId],pe=o.nodes.find(function(ze){return ze.id===o.hoverId});if(f&&pe){let ze=o.edges.filter(function(Je){return Je.sourceNodeId===f.id||Je.targetNodeId===f.id}).length,Ie=pe.x*o.zoom+o.panX,We=pe.y*o.zoom+o.panY;N.current.style.display="block",N.current.style.left=Ie+14+"px",N.current.style.top=We-6+"px";let ot=pe.planet?H.current("graphPlanetCards").replace("{n}",String(pe.count))+" \xB7 "+H.current("graphEnter"):H.current("connCount").replace("{n}",ze);N.current.innerHTML="<b>"+F(f.title||f.name||"")+'</b><br/><span style="opacity:.8">'+F(f.kind||"")+" \xB7 "+F(ot)+"</span>"}}else N.current&&(N.current.style.display="none")},$e=0,Yt=0,jt=0,Ht=()=>{o.motionUntil=performance.now()+140,jt&&Ue.clearTimeout(jt),jt=Ue.setTimeout(()=>{jt=0,h()},160)},h=()=>{Yt||(Yt=Ue.raf(()=>{Yt=0;let v=performance.now();try{Lt()}catch(B){It(B,"render")}o.lastRenderMs=performance.now()-v}))};o.requestRender=h;let E=()=>{$e>0||(o.alpha=Math.max(o.alpha||0,.35),o.running=!0,o.raf||(o.raf=Ue.raf(ke)))};o.wake=E,o.render=Lt;let Z=()=>{if(!St)return;let v=o.nodes.filter(F=>F.planet);if(!v.length)return;let B=12;for(let F=0;F<v.length;F++)for(let P=F+1;P<v.length;P++){let V=v[F],ge=v[P],Ce=ge.x-V.x,Ge=ge.y-V.y,Oe=Math.sqrt(Ce*Ce+Ge*Ge)||1,Ve=V.r+ge.r+B;if(Oe>=Ve)continue;let yt=(Ve-Oe)*.5,Xe=Ce/Oe,Dt=Ge/Oe;V.x-=Xe*yt,V.y-=Dt*yt,ge.x+=Xe*yt,ge.y+=Dt*yt,V.vx*=.4,V.vy*=.4,ge.vx*=.4,ge.vy*=.4}for(let F of v)for(let P of o.nodes){if(P.planet)continue;let V=P.x-F.x,ge=P.y-F.y,Ce=Math.sqrt(V*V+ge*ge)||1,Ge=F.r+P.r+8;if(Ce>=Ge)continue;let Oe=Ge-Ce;P.x+=V/Ce*Oe,P.y+=ge/Ce*Oe,P.vx*=.5,P.vy*=.5}},we=()=>{let v=performance.now(),B=hn(o,{params:o.forceParams,alphaFloor:o.drift?1:0,damping:o.drift?.8:void 0});Z(),o.lastTickMs=performance.now()-v,o.lastRms=B.rms,o.autoFitPending&&o.tickCount>45&&(o.autoFitPending=!1,gt())},ke=()=>{if(o.running){if(o.quietTicks>Da&&(o.quietTicks=0,o.drift||(o.drift=!0,o.alpha=Math.max(o.alpha||0,1),o.motionUntil=0,o.userTouched||gt())),o.drift&&!o.dragNode&&(o.driftFrame=(o.driftFrame|0)+1,o.driftFrame%2)){o.raf=Ue.raf(ke);return}try{let v=performance.now(),B=o.dragNode||o.drift?1:6,F=0;do we(),F+=1;while(!o.dragNode&&!o.drift&&F<B&&performance.now()-v<18&&o.quietTicks<=Da);o.drift||(o.motionUntil=performance.now()+60);let P=performance.now();Lt(),o.lastRenderMs=performance.now()-P}catch(v){It(v,"step")}o.raf=Ue.raf(ke)}},be=()=>({nodes:o.nodes.length,edges:o.edges.length,planets:o.nodes.filter(v=>v.planet).length,level:o.levelId||"",tickCount:o.tickCount,quietTicks:o.quietTicks,running:!!o.running,dragging:!!o.dragNode,lastTickMs:Math.round((o.lastTickMs||0)*100)/100,lastRenderMs:Math.round((o.lastRenderMs||0)*100)/100,rms:Math.round((o.lastRms||0)*1e3)/1e3,alpha:Math.round((o.alpha||0)*1e3)/1e3,drift:!!o.drift});o.stats=be,globalThis.__meGraphStats=be;let tt=()=>{let v=b.getBoundingClientRect(),B=v.width?b.clientWidth/v.width:1,F=v.height?b.clientHeight/v.height:1;return{level:o.levelId||"",planetLayer:!!o.planetLayer,nodes:o.nodes.length,planets:o.nodes.filter(P=>P.planet).length,edges:o.edges.length,running:!!o.running,quietTicks:o.quietTicks,zoom:Math.round(o.zoom*1e3)/1e3,panX:Math.round(o.panX),panY:Math.round(o.panY),selected:o.selectedId||null,multi:Array.isArray(o.multi)?o.multi.length:0,resources:Ue.snapshot(),screen:o.nodes.map(P=>({id:P.id,label:P.name,planet:!!P.planet,count:P.count||0,x:v.left+(P.x*o.zoom+o.panX)/B,y:v.top+(P.y*o.zoom+o.panY)/F,r:Math.max(4,P.r*o.zoom/B)}))}};o.runtime=tt,globalThis.__meGraphRuntime=tt;let xt=(v,B)=>{let F=b.getBoundingClientRect(),P=F.width?b.clientWidth/F.width:1,V=F.height?b.clientHeight/F.height:1;return{x:(v-F.left)*P,y:(B-F.top)*V}},ht=(v,B)=>{let F=xt(v,B);return{x:(F.x-o.panX)/o.zoom,y:(F.y-o.panY)/o.zoom}},dt=v=>{let B=o.domainById[v];return!(!B||M.current!=="all"&&B.kind!==M.current||Q.current&&!(B.tags||[]).includes(Q.current))},pt=(v,B,F)=>Math.max(B,Math.min(F,v)),ya=v=>{o.mouseX=v.clientX,o.mouseY=v.clientY;let B=ht(v.clientX,v.clientY),F=null;for(let P=o.nodes.length-1;P>=0;P--){let V=o.nodes[P];if(!dt(V.id))continue;let ge=V.x-B.x,Ce=V.y-B.y;if(ge*ge+Ce*Ce<V.r*V.r+36){F=V.id;break}}F!==o.hoverId&&(o.hoverId=F,o.motionUntil=performance.now()+140,h())},va=v=>{if(v.button!==0)return;let B=ht(v.clientX,v.clientY),F=null;for(let P=o.nodes.length-1;P>=0;P--){let V=o.nodes[P];if(!dt(V.id))continue;let ge=V.x-B.x,Ce=V.y-B.y;if(ge*ge+Ce*Ce<V.r*V.r+25){F=V;break}}if(v.shiftKey){if(F){o.shiftClick=F.id;return}o.marquee={sx:v.clientX,sy:v.clientY,ex:v.clientX,ey:v.clientY};return}o.userTouched=!0,o.dragStart={x:v.clientX,y:v.clientY,px:o.panX,py:o.panY},o.dragging=!1,o.dragNode=F||null,F&&(o.dragOffset={dx:F.x-B.x,dy:F.y-B.y})},Gn=v=>{if(o.marquee){o.marquee.ex=v.clientX,o.marquee.ey=v.clientY,Ht(),h();return}if(!o.dragStart)return;let B=v.clientX-o.dragStart.x,F=v.clientY-o.dragStart.y;if(Math.abs(B)+Math.abs(F)>3&&!o.dragging&&(o.dragging=!0,o.dragNode&&(o.alpha=Math.max(o.alpha||0,.35))),o.dragNode){let P=ht(v.clientX,v.clientY);o.dragNode.x=P.x+o.dragOffset.dx,o.dragNode.y=P.y+o.dragOffset.dy,Ht(),E()}else o.dragging&&(o.panX=pt(o.dragStart.px+B,-1e5,1e5),o.panY=pt(o.dragStart.py+F,-1e5,1e5),Ht(),h())},Kn=v=>{if(o.marquee){let P=o.marquee;o.marquee=null;let V=xt(P.sx,P.sy),ge=xt(P.ex,P.ey),Ce=Math.min(V.x,ge.x),Ge=Math.max(V.x,ge.x),Oe=Math.min(V.y,ge.y),Ve=Math.max(V.y,ge.y),yt=o.nodes.filter(Xe=>!Xe.planet&&dt(Xe.id)).filter(Xe=>{let Dt=Xe.x*o.zoom+o.panX,ra=Xe.y*o.zoom+o.panY;return Dt>=Ce&&Dt<=Ge&&ra>=Oe&&ra<=Ve}).map(Xe=>Xe.id);o.multi=yt,se(yt),Ht(),h();return}let B=o.dragStart&&!o.dragging,F=!!o.dragNode&&!!o.dragging;if(o.shiftClick){let P=o.shiftClick;o.shiftClick=null;let V=o.nodeById.get(P);if(V&&V.planet){o.selectedId=P,Te(P),h();return}let ge=Array.isArray(o.multi)?o.multi.slice():[];ge.includes(P)||ge.push(P),o.multi=ge,se(ge),h();return}if(B){let P=ht(v.clientX,v.clientY),V=null;for(let ge=o.nodes.length-1;ge>=0;ge--){let Ce=o.nodes[ge];if(!dt(Ce.id))continue;let Ge=Ce.x-P.x,Oe=Ce.y-P.y;if(Ge*Ge+Oe*Oe<Ce.r*Ce.r+20){V=Ce;break}}if(V&&V.planet){o.selectedId=null,Te(null),h(),o.dragStart=null,o.dragging=!1,o.dragNode=null,ye.current&&ye.current(V.id);return}V?o.selectedId===V.id?(o.selectedId=null,Te(null),h()):(o.selectedId=V.id,Te(V.id),h()):(o.selectedId=null,o.hoverId=null,v.shiftKey||(o.multi=[],se([])),Te(null),h())}o.dragStart=null,o.dragging=!1,o.dragNode=null,F&&E()},qn=v=>{v.preventDefault();let B=ht(v.clientX,v.clientY),F=null;for(let P=o.nodes.length-1;P>=0;P--){let V=o.nodes[P];if(!dt(V.id))continue;let ge=V.x-B.x,Ce=V.y-B.y;if(ge*ge+Ce*Ce<V.r*V.r+25){F=V;break}}if(F){let P=o.domainById[F.id];P&&u({x:v.clientX,y:v.clientY,id:F.id,path:P.id,title:P.title,planet:!!F.planet,count:F.count||0})}else u(null)},Yn=v=>{v.preventDefault();let B=xt(v.clientX,v.clientY),F=(B.x-o.panX)/o.zoom,P=(B.y-o.panY)/o.zoom,V=Math.max(.3,Math.min(3,o.zoom*(v.deltaY<0?_t:1/_t)));o.panX=pt(o.panX+F*(o.zoom-V),-1e5,1e5),o.panY=pt(o.panY+P*(o.zoom-V),-1e5,1e5),o.zoom=V,o.userTouched=!0,Ht(),h()};Ue.listen(b,"mousemove",ya),Ue.listen(b,"mousedown",va),Ue.listen(window,"mousemove",Gn),Ue.listen(window,"mouseup",Kn),Ue.listen(b,"wheel",Yn,{passive:!1}),Ue.listen(b,"contextmenu",qn),$.current=()=>{o.selectedId=null,o.hoverId=null,o.multi=[],se([]),o.userTouched=!1,gt(),Ht(),h()},$e=bn(o.nodes.length);let Vt=$e,Vn=()=>Vt>0?Math.round((Vt-$e)/Vt*100):100;$e>0&&Me(0);let xa=Vt>0?[.75,.5,.25].map(v=>Math.round(Vt*v)):[],wa=()=>{if(!o.running)return;let v=performance.now();for(;$e>0&&performance.now()-v<12;)we(),$e--;if(Me($e>0?Math.min(99,Vn()):100),xa.length&&$e<=xa[0]){xa.shift(),o.userTouched||gt();try{Lt()}catch(B){It(B,"warm-frame")}}if($e>0){o.userTouched||gt(),o.warmRaf=Ue.raf(wa);return}o.warmRaf=0,o.userTouched||gt();try{Lt()}catch(B){It(B,"warm-final")}Me(null),E()};o.warmStep=wa,gt();try{Lt()}catch(v){It(v,"first-frame")}$e>0?o.warmRaf=Ue.raf(wa):(Me(0),E());let Jn=()=>ee(!1);return Ue.listen(window,"mousedown",Jn),()=>{if(o.running=!1,Ue.releaseAll(),globalThis.__meGraphStats===be)try{delete globalThis.__meGraphStats}catch{globalThis.__meGraphStats=void 0}if(globalThis.__meGraphRuntime===tt)try{delete globalThis.__meGraphRuntime}catch{globalThis.__meGraphRuntime=void 0}try{Pe.disconnect()}catch{}}},[K,j,q]),(0,r.useEffect)(()=>{Te(null),se([]),u(null);let b=T.current;b&&(b.selectedId=null,b.multi=[])},[q]),(0,r.useEffect)(()=>{R!==void 0&&_.current&&requestAnimationFrame(()=>{try{_.current()}catch(b){It(b,"fit")}})},[R]),(0,e.jsxs)("div",{className:"me-graph",ref:U,children:[(0,e.jsxs)("div",{className:"me-graph-toolbar",children:[(0,e.jsxs)("span",{className:"me-graph-count",children:[L.length," ",d("graphItems")," \xB7 ",t&&t.total," ",d("graphCardsUnit")," \xB7 ",j.length," ",d("edges")]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("input",{type:"text",placeholder:d("search"),value:ae,onChange:b=>Be(b.target.value)}),(0,e.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ee(b=>!b),"aria-expanded":Le,title:d("filterLabel"),style:{borderRadius:8},children:["\u{1F50D} ",d("filterLabel")," ",J!=="all"||me||z?"\u25CF":"\u25BE"]}),Le&&(0,e.jsx)("div",{className:"me-graph-legend-pop",onMouseDown:b=>b.stopPropagation(),style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:50,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",border:"1px solid rgba(255,255,255,0.1)",borderRadius:10,padding:8,minWidth:240,boxShadow:"0 12px 34px rgba(0,0,0,.35)"},children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,e.jsx)("button",{type:"button",className:`lg${J==="all"&&!me?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>{Ae("all"),Fe(!1)},children:d("all")}),Object.keys(lt).map(b=>(0,e.jsxs)("button",{type:"button",className:`lg${J===b?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>Ae(c=>c===b?"all":b),children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:kt.colors[b]||lt[b]}}),d(it[b])]},b)),(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsxs)("button",{type:"button",className:`lg${me?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>Fe(b=>!b),children:["\u23F1 ",d("timeDim")]}),O.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsx)("div",{style:{maxHeight:130,overflow:"auto",display:"flex",flexWrap:"wrap",gap:4},children:O.map(b=>(0,e.jsxs)("button",{type:"button",className:`lg${z===b.tag?" active":""}`,style:{color:"#ddd",padding:"2px 7px",fontSize:11},onClick:()=>x(c=>c===b.tag?"":b.tag),title:b.tag,children:["#",b.tag," ",(0,e.jsx)("span",{style:{opacity:.55},children:b.n})]},b.tag))})]}),(J!=="all"||me||z)&&(0,e.jsxs)("button",{type:"button",className:"lg lg-clear",style:{justifyContent:"flex-start",color:"#f87171"},onClick:()=>{Ae("all"),Fe(!1),x("")},children:[d("clearFilter")," \u2715"]})]})})]}),(0,e.jsxs)("label",{className:"mc-btn",style:{display:"inline-flex",alignItems:"center",gap:5,cursor:"pointer"},title:d("crossVault"),children:[(0,e.jsx)("input",{type:"checkbox",checked:!!w,onChange:b=>k&&k(b.target.checked)}),d("crossVault")]}),(0,e.jsx)("button",{type:"button",className:`mc-btn${me?" me-on":""}`,onClick:()=>Fe(b=>!b),children:d("timeDim")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let b=W.current;if(b)try{b.toBlob(c=>{c&&oe({url:URL.createObjectURL(c),blob:c})},"image/png")}catch{}},children:d("exportGraph")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>_.current&&_.current(),children:d("fit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{Te(null),Ae("all"),$.current&&$.current()},children:d("reset")})]}),(0,e.jsxs)("div",{className:"me-graph-canvas",style:{position:"relative",overflow:"hidden"},children:[(0,e.jsx)("canvas",{ref:W,style:{width:"100%",height:"100%",display:"block",cursor:"grab"}}),(0,e.jsx)(cr,{crumbs:a,t:d,onPick:y,busy:C}),(0,e.jsxs)("div",{className:"me-graph-levelchip",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:L.length})," ",d("graphItems")]}),(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:t&&t.total})," ",d("graphCardsUnit")]}),(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:j.length})," ",d("edges")]})]}),g&&(0,e.jsxs)("div",{className:"me-graph-levelerr",role:"alert",children:[(0,e.jsx)("span",{style:{flex:"none",fontWeight:800},children:g.timeout?"\u23F1":"\u2715"}),(0,e.jsx)("span",{className:"msg",children:(g.timeout?d("graphLevelTimeout").replace("{ms}",String(1600)):d("graphLevelError"))+"\uFF1A"+g.message}),(0,e.jsx)("button",{type:"button",onClick:()=>S&&S(),children:d("graphRetry")})]}),!g&&C&&(0,e.jsxs)("div",{className:"me-graph-levelbusy",role:"status","aria-live":"polite",children:[(0,e.jsx)(oa,{small:!0}),d("graphLevelLoading")]}),ne!==null&&(0,e.jsxs)("div",{role:"status","aria-live":"polite",style:{position:"absolute",left:"50%",top:10,transform:"translateX(-50%)",zIndex:3,display:"flex",alignItems:"center",gap:9,padding:"6px 12px",borderRadius:999,background:"rgba(28,28,32,0.86)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",color:"#eee",fontSize:11.5,fontWeight:600,letterSpacing:".02em",pointerEvents:"none",boxShadow:"0 6px 18px rgba(0,0,0,.22)"},children:[(0,e.jsx)(oa,{value:ne,small:!0}),(0,e.jsxs)("span",{children:[d("graphWarming").replace("{n}",L.length)," \xB7 ",Math.round(ne),"%"]})]}),(0,e.jsxs)("div",{className:"mc-v5-graph-legend",children:[(0,e.jsx)("div",{className:"mc-v5-graph-legend-title",children:"\u8FDE\u63A5\u7C07"}),Object.keys(kt.colors).filter(b=>G[b]).map(b=>(0,e.jsxs)("div",{className:"mc-v5-graph-legend-row",children:[(0,e.jsx)("i",{style:{background:kt.colors[b]}}),(0,e.jsx)("span",{children:d(it[b]||"kindKnowledge")}),(0,e.jsx)("b",{children:G[b]})]},b))]}),(0,e.jsx)("div",{className:"me-graph-tooltip",ref:N,style:{display:"none",position:"absolute",zIndex:4,pointerEvents:"none",background:"rgba(28,28,32,0.88)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:8,padding:"7px 10px",fontSize:12,maxWidth:220,boxShadow:"0 8px 24px rgba(0,0,0,.2)"}}),ue&&(0,e.jsx)("div",{className:"mc-empty",style:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)"},children:d("noMatch")}),fe&&(0,e.jsx)("div",{className:"me-graph-ctx-back",style:{position:"fixed",inset:0,zIndex:30},onMouseDown:()=>u(null)}),fe&&(0,e.jsxs)("div",{className:"me-graph-ctxmenu",style:{position:"fixed",left:fe.x,top:fe.y,zIndex:31},onMouseDown:b=>b.stopPropagation(),children:[fe.planet&&(0,e.jsxs)("button",{type:"button",onClick:()=>{let b=fe.id;u(null),ye.current&&ye.current(b)},children:[d("graphEnter")," \u203A"]}),fe.planet&&(0,e.jsx)("div",{style:{padding:"4px 10px 6px",fontSize:11,opacity:.7},children:d("graphPlanetCards").replace("{n}",String(fe.count||0))}),!fe.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{I.current({path:fe.path,title:fe.title}),u(null)},children:d("openCard")}),!fe.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{fe.id&&(T.current.selectedId=fe.id,Te(fe.id)),u(null);let b=T.current;b&&b.requestRender&&b.requestRender()},children:d("focusNeighbors")}),(0,e.jsx)("button",{type:"button",onClick:()=>{try{navigator.clipboard&&navigator.clipboard.writeText(fe.title||"")}catch{}u(null),Ke(d("copied"))},children:d("copyName")}),!fe.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{let b=T.current,c=b&&Array.isArray(b.multi)?b.multi.slice():[],le=fe.id;if(le&&!c.includes(le)&&c.push(le),u(null),c.length<2){Ke(d("mergeNeed"),!1);return}if(!window.confirm(d("mergeConfirm")))return;let Ne=ce.current&&ce.current(c);Ne&&Ne.then?Ne.then(He=>He?Ke(d("merged")):Ke(d("mergeFail"),!1)).catch(()=>Ke(d("mergeFail"),!1)):Ne&&Ke(d("merged"))},children:d("merge")}),!fe.planet&&(0,e.jsx)("button",{type:"button",style:{color:"#f87171"},onClick:()=>{let b=fe.path;u(null),window.confirm(d("deleteConfirm"))&&(async()=>{try{(Y.current?await Y.current(b):!1)?Ke(d("deleted")):Ke(d("deleteFail"),!1)}catch{Ke(d("deleteFail"),!1)}})()},children:d("delete")})]}),D.length>0&&(0,e.jsxs)("div",{style:{position:"absolute",left:10,top:10,zIndex:3,display:"flex",gap:8,alignItems:"center",background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:"6px 10px",fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsxs)("span",{style:{fontWeight:700},children:[D.length," ",d("nodes")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let c=D.map(Ye=>_e[Ye]).filter(Boolean).map(Ye=>Ye.title||Ye.name).join(`
966
- `),le=new Blob([c],{type:"text/plain;charset=utf-8"}),Ne=URL.createObjectURL(le),He=document.createElement("a");He.href=Ne,He.download="memory-selected.txt",document.body.appendChild(He),He.click(),document.body.removeChild(He),setTimeout(()=>URL.revokeObjectURL(Ne),1e3),Ke(D.length+d("exportedSel"))},children:d("exportSel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{if(D.length<2){Ke(d("mergeNeed"),!1);return}let b=D.map(le=>_e[le]?_e[le].id:le);if(!window.confirm(d("mergeConfirm")))return;se([]);let c=T.current;c&&(c.multi=[]),fetch(`${X}/merge?paths=${encodeURIComponent(b.join(","))}`).then(le=>le.json()).then(le=>{le&&le.ok?Ke(d("merged")):Ke(d("mergeFail"),!1)}).catch(()=>Ke(d("mergeFail"),!1))},children:d("merge")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{if(!window.confirm(d("deleteConfirm")))return;let b=D.map(le=>_e[le]?_e[le].id:le);se([]);let c=T.current;c&&(c.multi=[]),(async()=>{let le=0;for(let Ne of b)try{(Y.current?await Y.current(Ne):!1)&&le++}catch{}Ke(le+d("deletedSelected"),le>0)})()},children:d("deleteSelected")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let b=T.current;b&&(b.multi=[]),se([]);let c=T.current;c&&c.render&&c.render()},children:d("clearSelection")})]}),m&&_e[m]&&(0,e.jsxs)("div",{className:"me-graph-sidebar",style:{position:"absolute",right:10,top:10,zIndex:3,maxWidth:240,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:12,fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsx)("div",{style:{fontWeight:700,fontSize:13,marginBottom:4},children:_e[m]?_e[m].title||_e[m].name:m}),(0,e.jsxs)("div",{style:{opacity:.8,marginBottom:8},children:[_e[m]?d(it[_e[m].kind]||"kindKnowledge"):"\u2014",_e[m]&&_e[m].type==="planet"?" \xB7 "+d("graphPlanetCards").replace("{n}",String(_e[m].count||0)):""]}),_e[m]&&_e[m].type==="planet"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{width:"100%",marginBottom:8},onClick:()=>{let b=m;Te(null),ye.current&&ye.current(b)},children:[d("graphEnter")," \u203A"]}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.65,letterSpacing:".04em",marginBottom:6},children:d("graphLevelHint")}),(j.filter(b=>b.source===m||b.target===m)||[]).slice(0,8).map((b,c)=>{let le=b.source===m?b.target:b.source,Ne=_e[le];return(0,e.jsx)("div",{style:{padding:"4px 6px",cursor:"pointer",borderRadius:6},onMouseDown:He=>{He.preventDefault();let Ye=T.current;Ye&&(Ye.selectedId=le,Ye.hoverId=le,Ye.requestRender&&Ye.requestRender()),Te(le)},children:Ne?(Ne.title||Ne.name).slice(0,28):le},c)})]})]}),(0,e.jsx)("div",{className:"me-graph-tip",children:d("graphTip")}),De&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(De.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:De.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:De.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:De.msg})]}),A&&(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>{A.url&&URL.revokeObjectURL(A.url),oe(null),Se(!1)},children:[(0,e.jsx)("style",{children:ct}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:ve?"100vw":900,width:ve?"100vw":"92vw",maxHeight:ve?"100%":"90vh",height:ve?"100%":void 0,borderRadius:ve?0:14},onClick:b=>b.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:d("exportGraph")}),(0,e.jsxs)("div",{className:"me-head-actions",children:[(0,e.jsx)("a",{className:"mc-btn",href:A.url,download:"memory-graph.png",onClick:()=>{Et("download"),Ke(d("downloaded")+" \xB7 "+d("defaultDownloads"))},style:{textDecoration:"none",display:"inline-flex",alignItems:"center"},children:d(qe==="download"?"done":"download")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{Et("full"),Se(b=>!b),Ke(d("fullscreen"))},children:d(qe==="full"?"done":ve?"exitFull":"fullscreen")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let b=A.blob;b&&window.ClipboardItem&&navigator.clipboard?navigator.clipboard.write([new window.ClipboardItem({"image/png":b})]).then(()=>{Et("copy"),Ke(d("copied"))}).catch(()=>{Ke(d("copyFail"),!1)}):Ke(d("copyFail"),!1)},children:d(qe==="copy"?"done":"copyImage")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{A.url&&URL.revokeObjectURL(A.url),oe(null),Se(!1)},children:d("close")})]})]}),(0,e.jsx)("div",{className:"me-dialog-body",style:{display:"flex",justifyContent:"center",background:ve?"var(--dsw-alias-bg-base, #0b0d10)":"var(--dsw-alias-bg-base, #f3f4f6)"},children:(0,e.jsx)("img",{src:A.url,alt:d("exportGraph"),style:{maxWidth:"100%",maxHeight:ve?"calc(100% - 64px)":"70vh",borderRadius:ve?0:8,cursor:"zoom-in"},onClick:()=>Se(b=>!b)})})]})]})]})}function pr(t){let a=new Date(t||0).getTime();if(!a)return"#94a3b8";let n=(Date.now()-a)/864e5;return n<3?"#10b981":n<14?"#f59e0b":n<30?"#f97316":"#94a3b8"}function In({label:t,value:a=[],options:n,onChange:s,placeholder:i,z:p=20}){let[y,S]=(0,r.useState)(!1),g=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!y)return;let U=T=>{g.current&&!g.current.contains(T.target)&&S(!1)};return document.addEventListener("mousedown",U),()=>document.removeEventListener("mousedown",U)},[y]);let C=Array.isArray(a)?a:[],d=C.includes("__all__"),w=d?n.find(U=>U.value==="__all__")?.label||"":C.length?C.map(U=>n.find(T=>T.value===U)?.label||U).join("\u3001"):"",k=(U,T)=>{if(U.value==="__all__"){s(T?["__all__"]:[]);return}let _=new Set(C);_.has("__all__")&&_.delete("__all__"),T?_.add(U.value):_.delete(U.value),s([..._])},R=n.find(U=>U.value==="__all__"),W=n.filter(U=>U.value!=="__all__");return(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t}),(0,e.jsxs)("div",{ref:g,style:{position:"relative",minWidth:0},children:[(0,e.jsxs)("button",{type:"button",onClick:()=>S(U=>!U),style:{width:"100%",textAlign:"left",padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",gap:6},children:[(0,e.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w||i||"\u2014"}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.7},children:"\u25BE"})]}),y&&(0,e.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:p,marginTop:2,borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",boxShadow:"0 6px 20px rgba(0,0,0,0.14)",maxHeight:180,overflow:"auto"},children:[R&&(0,e.jsxs)("label",{onClick:U=>U.stopPropagation(),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",cursor:"pointer",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("input",{type:"checkbox",checked:d,onChange:U=>k(R,U.target.checked)}),(0,e.jsx)("span",{children:R.label})]}),W.map(U=>(0,e.jsxs)("label",{onClick:T=>T.stopPropagation(),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",cursor:"pointer"},children:[(0,e.jsx)("input",{type:"checkbox",checked:C.includes(U.value),onChange:T=>k(U,T.target.checked)}),(0,e.jsx)("span",{children:U.label})]},U.value))]})]})]})}function mr(t){let a=new Date(t||0).getTime();return!!a&&(Date.now()-a)/864e5<3}async function ur(t,a,n){if(n&&typeof window.showSaveFilePicker=="function")try{let p=await window.showSaveFilePicker({suggestedName:a}),y=await p.createWritable();return await y.write(t),await y.close(),{ok:!0,picked:!0,name:p.name}}catch(p){return p&&p.name==="AbortError"?{ok:!1,aborted:!0}:{ok:!1,err:String(p.message||p)}}let s=URL.createObjectURL(t),i=document.createElement("a");return i.href=s,i.download=a,document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout(()=>URL.revokeObjectURL(s),1e3),{ok:!0,picked:!1,name:a}}function Ea(t,a){if(!a||!t)return t;let n=t.toLowerCase(),s=a.toLowerCase(),i=[],p=0;for(;p<t.length;){let y=n.indexOf(s,p);if(y<0){i.push(t.slice(p));break}y>p&&i.push(t.slice(p,y)),i.push((0,e.jsx)("mark",{className:"mc-hl",children:t.slice(y,y+s.length)},y)),p=y+s.length}return i}function Tt(t){let a=ea(t);if(!a)return"";let n=a.toDateString()===new Date().toDateString(),s=cn(a);return n?s:`${a.getMonth()+1}-${a.getDate()} ${s}`}
1031
+ `);let Nt=new Blob([ke],{type:Xe}),Rt=await hi(Nt,ge,!1);if(!Rt.ok){ne({ok:!1,msg:t("exportFail")}),X(!1);return}ne({ok:!0,msg:t("exportedTo")+"\uFF1A"+t("defaultDownloads")+" \xB7 "+Rt.name})}catch(te){ne({ok:!1,msg:t("exportFail")+" \xB7 "+(te.message||"")})}finally{X(!1)}M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ne(null),2600)},yt=async w=>{let _=w.target.files&&w.target.files[0];if(w.target.value="",!!_){try{let te=await _.text(),ke=await(await fetch(`${V}/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:te})).json();if(ke.ok){await tt();let ge=ke.imported||0,Xe=t("importedVault")+"\uFF1A"+ge;ke.total&&(Xe+=t("importedTotal")+ke.total+t("importedTotalTail")),ke.quarantined&&(Xe+=t("importedQuarantine")+ke.quarantined+t("importedQuarantineTail")),ke.skipped&&(Xe+=t("importedSkipped")+ke.skipped+t("importedSkippedTail")),ke.warning&&(Xe+=" \xB7 "+ke.warning),ne({ok:ge>0||!ke.total,msg:Xe})}else ne({ok:!1,msg:ke.error||t("importFail")})}catch{ne({ok:!1,msg:t("importFail")})}M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ne(null),2400)}},Mt=async()=>{if(!se){Ee(!0);try{let w=await fetch(`${V}/skills/sync`,{method:"POST"}).then(_=>_.json()).catch(()=>null);if(w&&w.ok){let _=t("skillsSyncDone")+" \xB7 "+t("skillsScanned")+" "+(w.total||0)+" \xB7 "+t("skillsCreated")+" "+(w.created||0)+" \xB7 "+t("skillsUpdated")+" "+(w.updated||0)+" \xB7 "+t("skillsPendingUpdates")+" "+(w.pendingUpdates||0);ne({ok:!0,msg:_}),await tt(),u()}else ne({ok:!1,msg:w&&w.error||t("skillsSyncFail")})}catch{ne({ok:!1,msg:t("skillsSyncFail")})}finally{Ee(!1)}M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ne(null),3600)}},at=(0,o.useMemo)(()=>{let w=g.slice();return be!=="all"&&(w=w.filter(_=>Ot(_.submittedBy)===be)),A!=="all"&&(w=w.filter(_=>(_.status||"approved")===A)),Y&&(w=w.filter(_=>W.has(_.path))),Z==="title"?w.sort((_,te)=>String(_.title||"").localeCompare(String(te.title||""))):Z==="hot"?w.sort((_,te)=>(te.weight||te.links||0)-(_.weight||_.links||0)):w.sort((_,te)=>new Date(te.updated||0).getTime()-new Date(_.updated||0).getTime()),w},[g,Z,be,A,Y,W]),Tt=(0,o.useMemo)(()=>[...new Set(g.map(w=>Ot(w.submittedBy)))],[g]),At=(0,o.useMemo)(()=>{let w={};for(let _ of g){let te=new Set(_.tags||[]),we=0;for(let ke of g)ke.path!==_.path&&(ke.tags||[]).some(ge=>te.has(ge))&&we++;w[_.path]=we}return w},[g]),[mt,Jt]=(0,o.useState)(null),nt=(0,o.useMemo)(()=>{if(!at.length)return null;let w=mt?at.find(te=>te.path===mt):null;return w||at.find(te=>Date.now()-new Date(te.updated||0).getTime()>21*864e5)||at[0]},[at,mt]),Bt=()=>{if(!at.length)return;let w=at.findIndex(_=>_.path===(nt&&nt.path));Jt(at[(w+1+at.length)%at.length].path)},it=!G&&D==="all"&&!oe&&A==="all"&&!!nt;return(0,e.jsxs)("div",{className:"memory-eternal-root me-v5","data-ui-scale":b,style:{height:"100%",width:"100%",zoom:b==="large"?1.15:b==="compact"?.92:1.06,overflow:"hidden",display:"flex",flexDirection:"column"},children:[(0,e.jsx)("style",{children:ft}),!a&&(0,e.jsxs)("div",{className:`mc-v5-top${r?" in-host":""}`,children:[(0,e.jsx)("img",{className:"mc-v5-logo",src:ma,alt:""}),(0,e.jsxs)("span",{className:"mc-v5-crumb",children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("i",{children:"/"}),(0,e.jsx)("span",{children:t(P==="cards"?"cardsTab":P==="graph"?"graphTab":P==="news"?"newsTab":P==="stats"?"tabUsage":P==="audit"?"tabAudit":P==="optimize"?"tabRecycle":P==="terminal"?"terminalTab":"tabConfig")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsxs)("div",{className:"mc-v5-top-actions",children:[(0,e.jsxs)("span",{className:"mc-v5-sys",children:[(0,e.jsx)("i",{}),t("v5Local")]}),(0,e.jsxs)("span",{className:"mc-v5-ver",children:["v",Vt]}),(0,e.jsxs)("button",{type:"button",className:"mc-v5-star",onClick:()=>Oa("https://github.com/EternalNight996/memory-eternal"),title:t("v5Star"),children:["\u2605 ",(0,e.jsx)("span",{className:"mc-v5-star-label",children:"Star"})]}),(0,e.jsx)("button",{type:"button",className:"mc-v5-help",onClick:()=>He("group"),title:t("supportTitle"),"aria-label":t("supportTitle"),children:"?"})]})]}),Ae&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(Ae.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:Ae.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:Ae.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{children:Ae.msg})]}),a&&(0,e.jsxs)("div",{className:"me-modal-head",children:[(0,e.jsxs)("div",{className:"me-modal-title",children:[(0,e.jsx)("span",{className:"me-wicon",children:(0,e.jsx)("img",{src:ma,alt:""})}),(0,e.jsx)("h2",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:t("memoryHint")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("button",{type:"button",className:"me-modal-close me-modal-x",onClick:n,"aria-label":t("close"),title:t("close"),children:(0,e.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})})})]}),k&&k.ok===!1&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,margin:"0 0 8px",padding:"9px 14px",borderRadius:10,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.45)",borderLeft:"4px solid #ef4444",color:"var(--dsw-alias-label-primary, #e5e7eb)",fontSize:12.5,lineHeight:1.6},children:[(0,e.jsxs)("span",{style:{fontWeight:800},children:["\u26A0 ",t("captureAlert")]}),(0,e.jsxs)("span",{style:{flex:1},children:[k.reason,(0,e.jsx)("div",{style:{opacity:.68,fontSize:11.5,marginTop:2},children:t("captureAlertHint")})]}),(0,e.jsx)("span",{style:{opacity:.7},children:k.since?Et(new Date(k.since).toISOString()):""})]}),(0,e.jsxs)("div",{className:"me-modal-body",children:[(0,e.jsxs)("div",{className:`mc-rail${Be?" open":""}`,children:[(0,e.jsxs)("div",{className:"mc-v5-rail-top",children:[Be&&(0,e.jsxs)("div",{className:"mc-v5-railbrand",children:[(0,e.jsx)("img",{className:"mark",src:ma,alt:""}),(0,e.jsxs)("div",{children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:"MEMORY ATLAS"})]})]}),(0,e.jsx)("button",{type:"button",className:"mc-rail-collapse",onClick:()=>Ge(w=>!w),"aria-label":t(Be?"collapse":"expand"),title:t(Be?"collapse":"expand"),children:Be?"\xAB":"\xBB"})]}),Be&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navWorkspace")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="cards"?" active":""}`,onClick:()=>ee("cards"),title:t("cardsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E0}"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("cardsTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="graph"?" active":""}`,onClick:()=>ee("graph"),title:t("graphTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F52E}"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("graphTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="news"?" active":""}`,onClick:()=>ee("news"),title:t("newsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4F0}"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("newsTab")}),Pe>0&&(0,e.jsx)("span",{className:"mc-dot",children:Pe>99?"99+":Pe})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="stats"?" active":""}`,onClick:()=>ee("stats"),title:t("tabUsage"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4C8}"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabUsage")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="audit"?" active":""}`,onClick:()=>ee("audit"),title:t("tabAudit"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F50D}"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabAudit")}),T>0&&(0,e.jsx)("span",{className:"mc-dot",children:T>99?"99+":T})]}),Be&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSystem")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="optimize"?" active":""}`,onClick:()=>ee("optimize"),title:t("tabRecycle"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u267B\uFE0F"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabRecycle")}),de>0&&(0,e.jsx)("span",{className:"mc-dot",style:{background:"#6b7280"},children:de>99?"99+":de})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="terminal"?" active":""}`,onClick:()=>ee("terminal"),title:t("terminalTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u25B8_"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("terminalTab")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:Ze,title:t("webTab"),"aria-label":t("webTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F310}"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("webTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="config"?" active":""}`,onClick:()=>ee("config"),title:t("tabConfig"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2699\uFE0F"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabConfig")})]}),Be&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSupport")}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>He("group"),title:t("supportGroup"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4AC}"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportGroup")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>He("sponsor"),title:t("supportSponsor"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2615"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportSponsor")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>He("legacy"),title:t("supportLegacy"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E9}"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportLegacy")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>ve(!0),title:t("fbNav"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F41E}"}),Be&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("fbNav")})]}),Be&&(0,e.jsxs)("button",{type:"button",className:"mc-quote",onClick:()=>Ke(w=>(w+1)%ha.length),title:`${ha[xt]}
1032
+ ${An}
1033
+ ${t("quoteHint")}`,children:[(0,e.jsxs)("span",{className:"mc-quote-tag",children:[t("navQuotes")," \xB7 ",xt+1,"/",ha.length]}),(0,e.jsx)("span",{className:"mc-quote-text",children:ha[xt]},xt),(0,e.jsx)("span",{className:"mc-quote-src",children:An})]})]}),(0,e.jsxs)("div",{className:"mc-main",ref:_t,children:[s&&s.db&&s.db.writable===!1?(0,e.jsxs)("div",{style:{margin:"8px 10px 0",padding:"8px 12px",borderRadius:8,fontSize:12,lineHeight:1.7,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.35)",color:"#b91c1c"},children:["\u26A0\uFE0F ",t("dbReadonlyTitle"),"\uFF1A",s.db.error||"\u2014"," \u2014\u2014 ",t("dbReadonlyBody"),(0,e.jsx)("div",{style:{opacity:.85,marginTop:2},children:t("dbReadonlyFix")})]}):null,P==="cards"&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY LIBRARY"}),(0,e.jsx)("h1",{children:t("memoryTitle")}),(0,e.jsx)("p",{children:t("memoryHint")}),(0,e.jsxs)("div",{className:"mc-v5-pagehead-stats",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:s?.total??"\u2014"})," ",t("cardsUnit")]}),(0,e.jsxs)("span",{children:[t("recent")," +",s?.recent??0]}),(0,e.jsxs)("span",{children:[t("pending")," ",s?.quarantine?.pending??s?.status?.pending??0]}),(0,e.jsxs)("span",{children:[t("rejected")," ",s?.quarantine?.rejected??s?.status?.rejected??0]})]})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[g.length," / ",wt]})]}),P==="cards"&&(0,e.jsxs)("div",{className:"mc-toolbar",children:[(0,e.jsx)("input",{type:"text",placeholder:t("searchPlaceholder"),value:G,onChange:w=>ae(w.target.value)}),oe&&(0,e.jsxs)("button",{type:"button",className:"mc-chip active",title:t("clearFilter"),onClick:()=>Me(""),children:["\u{1F3F7} ",oe," ",(0,e.jsx)("span",{style:{opacity:.7},children:"\u2715"})]}),(0,e.jsx)("input",{ref:z,type:"file",accept:".json,application/json",style:{display:"none"},onChange:yt}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>z.current&&z.current.click(),children:t("importVault")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>c({kind:"knowledge",title:"",body:"",tags:"",template:""}),children:["+ ",t("newCard")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:se,onClick:Mt,title:t("skillCardsHint"),children:se?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:v,onClick:()=>Le("md"),children:t(v?"exporting":"exportVault")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:v,onClick:()=>Le("json"),children:t(v?"exporting":"exportJson")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>tt(),children:t("refresh")})]}),P==="cards"&&(0,e.jsxs)("div",{className:"mc-chips",children:[va.map(w=>(0,e.jsxs)("button",{type:"button",className:`mc-chip${D===w?" active":""}`,onClick:()=>pe(w),children:[t(w==="all"?"all":lt[w]),(0,e.jsx)("span",{className:"mc-chip-n",children:w==="all"?s?.total??0:s?.byKind?.[w]??0})]},w)),(0,e.jsxs)("button",{type:"button",className:`mc-chip${Y?" active":""}`,onClick:()=>re(w=>!w),children:["\u{1F4CC} ",t("pinnedOnly"),(0,e.jsx)("span",{className:"mc-chip-n",children:W.size})]}),(0,e.jsxs)("select",{value:be,onChange:w=>J(w.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsxs)("option",{value:"all",children:["\u{1F916} ",t("allAgents")]}),_n(Tt).map(w=>(0,e.jsx)("option",{value:w,children:w},w))]}),(0,e.jsxs)("select",{value:A,onChange:w=>O(w.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allStatus")}),(0,e.jsx)("option",{value:"approved",children:t("statusApproved")}),(0,e.jsx)("option",{value:"pending",children:t("statusPending")}),(0,e.jsx)("option",{value:"rejected",children:t("statusRejected")})]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),[{key:"recent",label:t("sortRecent")},{key:"title",label:t("sortTitle")},{key:"hot",label:t("sortHot")}].map(w=>(0,e.jsx)("button",{type:"button",className:`mc-chip${Z===w.key?" active":""}`,onClick:()=>Oe(w.key),children:w.label},w.key))]}),$&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",$]}),(0,e.jsx)("div",{style:{display:P==="cards"?"contents":"none"},children:p?(0,e.jsx)(Yn,{text:t("loading")}):$?(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",$," ",(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>tt(),children:t("retry")})]}):g.length===0?(0,e.jsx)("div",{className:"mc-empty",children:t("empty")}):(0,e.jsxs)(e.Fragment,{children:[it&&(0,e.jsxs)("div",{className:"mc-v5-feature",onClick:()=>Ne(nt),children:[(0,e.jsxs)("div",{className:"mc-v5-feature-copy",children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:t("todayReview")}),(0,e.jsx)("h3",{children:nt.title}),(0,e.jsx)("p",{children:Va(nt)}),(0,e.jsxs)("div",{className:"mc-v5-feature-meta",children:[(0,e.jsxs)("span",{children:[Wt[nt.kind]||"\u{1F4CE}"," ",t(lt[nt.kind]||"kindKnowledge")]}),(0,e.jsxs)("span",{children:["\u{1F552} ",Et(nt.updated)]}),(nt.tags||[]).slice(0,3).map(w=>(0,e.jsxs)("span",{children:["#",w]},w))]})]}),(0,e.jsxs)("div",{className:"mc-v5-feature-side",children:[(0,e.jsx)(Kn,{n:At[nt.path]||0,color:gt[nt.kind]||gt.other,size:58}),(0,e.jsx)("b",{children:At[nt.path]||0}),(0,e.jsx)("span",{children:t("links")}),(0,e.jsx)("button",{type:"button",className:"mc-v5-feature-shuffle",onClick:w=>{w.stopPropagation(),Bt()},children:t("reshuffle")}),(0,e.jsx)("span",{className:"mc-v5-feature-open",children:t("openArrow")})]})]}),(0,e.jsx)("div",{className:"mc-grid",children:at.filter(w=>!it||w.path!==nt.path).map(w=>(0,e.jsx)(ii,{card:w,t,query:G.trim(),onOpen:Ne,onDelete:l,onTagClick:Me,pinned:W.has(w.path),onPin:he,onCore:Te,links:At[w.path]||0},w.path))}),g.length<wt&&(0,e.jsx)("div",{ref:St,style:{height:1}}),ht&&(0,e.jsxs)("div",{className:"mc-empty",style:{padding:"10px 0"},children:[t("loading"),"\uFF08",g.length," / ",wt,"\uFF09"]})]})}),(0,e.jsx)("div",{style:{display:P==="graph"?"flex":"none",flex:1,minHeight:0},children:y.has("graph")&&(0,e.jsx)(mi,{t,onOpen:Ne,all:F,onAllChange:ye,onMutate:u,active:P==="graph",visible:P==="graph"})}),(0,e.jsx)("div",{style:{display:P==="news"?"contents":"none"},children:y.has("news")&&(0,e.jsx)(ti,{t,version:ie,onUnreadChange:ce})}),(0,e.jsx)("div",{style:{display:P==="terminal"?"contents":"none"},children:y.has("terminal")&&(0,e.jsx)(jo,{t})}),(0,e.jsx)("div",{style:{display:P==="config"?"contents":"none"},children:y.has("config")&&(0,e.jsx)(Un,{t,onReload:()=>tt(),version:ie})}),(0,e.jsx)("div",{style:{display:P==="stats"?"contents":"none"},children:y.has("stats")&&(0,e.jsx)(ri,{t,tab:"stats",onReload:()=>tt(),version:ie})}),(0,e.jsx)("div",{style:{display:P==="audit"?"contents":"none"},children:y.has("audit")&&(0,e.jsx)(_o,{t,onReload:()=>{tt(),u()},version:ie})}),(0,e.jsx)("div",{style:{display:P==="optimize"?"contents":"none"},children:y.has("optimize")&&(0,e.jsx)(ni,{t,onReload:()=>{tt(),u()},version:ie})}),De&&(0,e.jsx)(li,{t,onClose:()=>ve(!1)}),xe&&(0,e.jsx)(ci,{t,tab:le,onTab:Se,onClose:()=>L(!1),onFeedback:()=>{L(!1),ve(!0)},onReplay:()=>{L(!1),et(!0)}}),fe&&(0,e.jsx)(di,{t,onDone:bt}),d&&(0,e.jsx)(pi,{t,card:d,query:G.trim(),onNavigate:w=>{let _=at.findIndex(we=>we.path===d.path),te=at[_+w];te&&Ne(te)},onTagClick:Me,onClose:()=>H(null),onDelete:w=>{H(null),l(w)},onFeedback:w=>{let _=d.path;fetch(`${V}/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:G.trim(),path:_,useful:w})}).then(()=>ne({ok:!0,msg:t(w?"fbUseful":"fbIrr")})).catch(()=>{}),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ne(null),2e3)},allCards:at,onOpenRelated:w=>Ne(w),onKindChange:Te,onSaved:async({path:w,status:_,title:te})=>{try{let we=_&&_!=="approved"?`&status=${encodeURIComponent(_)}`:"",ke=await fetch(`${V}/card?path=${encodeURIComponent(w)}${we}`).then(ge=>ge.json());ke&&ke.ok&&H(ge=>ge&&ge.path===w?{...ge,title:te||ke.title||ge.title,text:ke.text}:ge)}catch{}await tt(),u(),ne({ok:!0,msg:t("editSaved")}),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ne(null),2e3)}}),(0,e.jsx)(si,{t,newCard:h,setNewCard:c,onCreated:()=>{tt(),u(),ne({ok:!0,msg:t("created")}),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>ne(null),2e3)}})]})]})]})}var xa=({toast:t})=>t?(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"8px 12px",fontSize:12,borderLeft:"4px solid "+(t.ok?"#10b981":"#ef4444"),background:t.ok?"rgba(16,185,129,0.08)":"rgba(239,68,68,0.08)"},children:[t.ok?"\u2705":"\u26A0"," ",t.msg]}):null;var Ga=(0,o.createContext)({form:null,set:()=>{}}),Wo=new Set(["autoRestartOnDrift","coreMemoryEnabled","skillCardsAutoSync"]);function Ye({k:t,label:a,hint:n,type:r="text",step:s,min:m,max:b}){let{form:N,set:g}=(0,o.useContext)(Ga);return(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:a||t}),(0,e.jsx)("input",{type:r,step:s,min:m,max:b,value:N?N[t]??"":"",onChange:C=>{let p=C.target.value;g(t,r==="number"?p===""?"":Number(p):p)}}),n?(0,e.jsx)("span",{className:"mc-field-hint",children:n}):null]})}function ut({k:t,label:a}){let{form:n,set:r}=(0,o.useContext)(Ga),s=n?n[t]:void 0,m=s===void 0?Wo.has(t):!!s;return(0,e.jsxs)("label",{className:"mc-switch",children:[(0,e.jsx)("input",{type:"checkbox",checked:m,onChange:b=>r(t,b.target.checked)}),(0,e.jsx)("span",{children:a||t})]})}function Ft({icon:t,title:a,sub:n,children:r}){return(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:t}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:a}),n?(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:n}):null]})]}),(0,e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:13},children:r})]})}function Un({t,onReload:a,version:n,compact:r}){let[s,m]=(0,o.useState)(null),[b,N]=(0,o.useState)(0),[g,C]=(0,o.useState)(null),[p,S]=(0,o.useState)(null),[k,R]=(0,o.useState)(!1),[$,q]=(0,o.useState)(!1),D=(0,o.useRef)(!1),U=(0,o.useRef)(null),G=(0,o.useRef)({}),[K,be]=(0,o.useState)(null),[J,A]=(0,o.useState)(null),[O,W]=(0,o.useState)(""),[I,Y]=(0,o.useState)(""),[re,he]=(0,o.useState)(""),[oe,_e]=(0,o.useState)(null),[P,Ie]=(0,o.useState)(null),[y,Re]=(0,o.useState)(null),ee=(0,o.useCallback)(async(l,ae=!1)=>{ae||Y("version");try{let pe=await fetch(V+"/version-check"+(l?"?force=1":"")).then(Me=>Me.json());pe&&pe.ok?(Re(pe),l&&d(pe.updateAvailable?t("vcLatest")+" v"+pe.latest:t("vcUpToDate"))):l&&d(t("vcCheckFail"),!1)}catch{l&&d(t("vcCheckFail"),!1)}finally{ae||Y("")}},[t]);(0,o.useEffect)(()=>{ee(!1);let l=setInterval(()=>{ee(!1,!0)},6e4),ae=()=>{typeof document<"u"&&!document.hidden&&ee(!1,!0)};return document.addEventListener("visibilitychange",ae),()=>{clearInterval(l),document.removeEventListener("visibilitychange",ae)}},[n,ee]);let[Z,Oe]=(0,o.useState)(""),[Ae,ne]=(0,o.useState)(null),[M,z]=(0,o.useState)(""),[v,X]=(0,o.useState)(!1),se=(0,o.useRef)(null),Ee=(0,o.useRef)(0),Pe=l=>{Ee.current=l.currentTarget.scrollTop};(0,o.useLayoutEffect)(()=>{let l=se.current;l&&Math.abs(l.scrollTop-Ee.current)>1&&(l.scrollTop=Ee.current)});let ce=(0,o.useRef)(null),d=(l,ae=!0)=>{ce.current&&clearTimeout(ce.current),ne({msg:l,ok:ae}),ce.current=setTimeout(()=>ne(null),1900)},H=async()=>{if(!I){Y("restart");try{let l=await fetch(V+"/restart-self",{method:"POST"});if(l.status===404||l.status===405){d(He("vcRestartNoRoute",{cmd:y&&y.restartCommand||"dsh-memory restart --port 7999"}),!1);return}let ae=await l.json().catch(()=>null);if(!ae){d(t("vcRestartFail")+"\uFF08HTTP "+l.status+"\uFF09",!1);return}if(!ae.ok){d(ae.error||t("vcRestartFail"),!1);return}if(ae.alreadyCurrent){d(ae.note||t("vcRestartCurrent"));return}d(ae.note||t("vcRestartSent")),ae.alreadyRunning||setTimeout(()=>{ee(!0)},6e3)}catch(l){d(t("vcRestartFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{Y("")}}},F=y&&y.resident?String(y.resident.served||""):"",ye=!!(y&&y.onDisk&&F&&F!==y.onDisk),De=!!(y&&y.resident&&y.resident.managed===!1&&y.resident.managedKnown===!1),ve=y&&y.resident&&y.resident.replaceBlocked&&y.resident.replaceBlocked.fresh||null,xe=!!(y&&y.resident&&y.resident.managedBy==="host"),L=!!(y&&y.resident&&y.resident.managed===!1&&!De&&!xe),le=!!(y&&y.resident&&!F),Se=ye||le||L||De,fe=cn({hasVersion:!!y,hostVersion:y?y.loaded:"",onDisk:y?y.onDisk:"",residentServed:y&&y.resident?y.resident.served:"",residentPresent:!!(y&&y.resident),residentManaged:y&&y.resident?y.resident.managed:null,residentManagedKnown:y&&y.resident?y.resident.managedKnown:null,residentManagedBy:y&&y.resident?y.resident.managedBy:"",replaceBlocked:y&&y.resident?y.resident.replaceBlocked:null}),et={hostProcessStale:()=>He("vcHostProcessStale",{disk:y.onDisk,loaded:y.loaded}),residentDown:()=>He("vcResidentDown",{port:y.resident&&y.resident.port||"",cmd:y.restartCommand||"dsh-memory restart --port 7999"}),residentReplaceBlocked:()=>He("vcResidentReplaceBlocked",{served:F,err:ve&&ve.error||"",path:ve&&ve.lockPath||"",cmd:y.restartCommand||"dsh-memory restart --port "+(y.resident&&y.resident.port||7999)}),residentLockUnknown:()=>He("vcResidentLockUnknown",{served:F,path:y.resident&&y.resident.lock&&y.resident.lock.path||"",err:y.resident&&y.resident.lock&&y.resident.lock.error||""}),residentUnmanaged:()=>He("vcResidentUnmanaged",{served:F,cmd:y.restartCommand||"dsh-memory restart --port 7999"})},bt={restartStart:()=>He("vcRestartStart",{disk:y&&y.onDisk||""}),restartRepair:()=>He("vcRestartRepair",{disk:y&&y.onDisk||""}),restartFixes:()=>He("vcRestartFixes",{served:F||"",disk:y&&y.onDisk||""}),restartHostOnly:()=>He("vcRestartHostOnly",{loaded:y&&y.loaded||"",disk:y&&y.onDisk||""}),restartAnyway:()=>He("vcRestartAnyway",{ver:y&&y.onDisk||""})},He=(l,ae)=>Object.keys(ae).reduce((pe,Me)=>pe.split("{"+Me+"}").join(ae[Me]),t(l)),pt=(0,o.useCallback)(async()=>{try{let[l,ae,pe,Me]=await Promise.all([fetch(`${V}/config`).then(Te=>Te.json()).catch(()=>null),fetch(`${V}/setup-status`).then(Te=>Te.json()).catch(()=>null),fetch(`${V}/budget`).then(Te=>Te.json()).catch(()=>null),fetch(`${V}/llm-routes`).then(Te=>Te.json()).catch(()=>null)]);if(Me&&Me.ok&&Ie(Me),l&&l.ok){m(l),N(l.revision??0),C(l.schema??null);let Te=zn(l.config??{},G.current);G.current=Te.overlay,S({...Te.values}),X(!1),be(l.dsh??null),R(l.writable===!1),q(l.viaPending===!0),W(""),D.current=!1}else pe&&pe.ok?(S({...pe}),X(!1),R(!0),W(t("configNeedsDsh"))):W(t("adminLoadFail"));ae&&ae.ok&&A(ae),he("")}catch{W(t("adminLoadFail"))}},[t]);(0,o.useEffect)(()=>{pt()},[n,pt]);let Ze=(l,ae)=>{D.current=!0,X(!0),z(""),S(pe=>({...pe??{},[l]:ae}))};(0,o.useEffect)(()=>{U.current=pt},[pt]),(0,o.useEffect)(()=>{if(typeof EventSource>"u")return;let l=null;try{l=new EventSource(V+"/events")}catch{return}let ae=()=>{!D.current&&typeof U.current=="function"&&U.current()};try{l.addEventListener("config",ae)}catch{}return()=>{try{l.close()}catch{}}},[]);let Be=new Set(["dedupThreshold","captureMinChars","captureCooldownMs","maxCardsPerDay","captureMaxTokens","recallMinScore","recallLimit","recallSummaryLen","recycleRetentionDays","webPort","webCheckIntervalMs","webMaxRestart","sessionBudgetChars","coreMemoryLimit","coreMemoryMaxChars"]),Ge=l=>({init:t("modeInit"),interval:t("modeInterval"),manual:t("modeManual")})[l]||l,xt=async()=>{if(!p)return;if(k){d(t("editInSetting"),!1);return}let l={dedupThreshold:[0,1],captureMinChars:[0,1e6],captureCooldownMs:[0,1e9],maxCardsPerDay:[0,1e6],captureMaxTokens:[100,4e3],recallMinScore:[0,50],recallLimit:[1,20],recallSummaryLen:[40,400],recycleRetentionDays:[1,3650],webPort:[1,65535],webCheckIntervalMs:[1e3,6e5],webMaxRestart:[1,1e3],sessionBudgetChars:[0,1e9],coreMemoryLimit:[1,20],coreMemoryMaxChars:[200,1e4]},ae=[];for(let[pe,[Me,Te]]of Object.entries(l)){if(!(pe in p))continue;let Ne=p[pe],Le=typeof Ne=="number"?Ne:Number(Ne);(Ne===""||Ne===null||Ne===void 0||!Number.isFinite(Le)||Le<Me||Le>Te)&&ae.push(t("invalidField",{field:pe,min:Me,max:Te,value:String(Ne===""?"\u7A7A":Ne)}))}if(ae.length){let pe=t("saveInvalid")+"\uFF1A"+ae.join("\uFF1B");W(pe),d(pe,!1);return}Y("save");try{let pe={...p};for(let Le of Object.keys(p))Le in pe&&typeof pe[Le]=="string"&&pe[Le].trim()!==""&&Be.has(Le)&&(pe[Le]=Number(pe[Le]));Array.isArray(pe.vaultProfiles)&&(pe.vaultProfiles=pe.vaultProfiles.filter(Le=>Le&&(String(Le.name||"").trim()||String(Le.path||"").trim())));let Me=await fetch(`${V}/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:pe,expectedRevision:b})}),Te=await Me.text(),Ne=null;try{Ne=Te?JSON.parse(Te):null}catch{Ne=null}if(Ne||(Ne={error:"HTTP "+Me.status+(Te?"\uFF1A"+Te.slice(0,200):"\uFF08\u5BBF\u4E3B\u672A\u8FD4\u56DE\u539F\u56E0\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u6709\u6570\u5B57\u5B57\u6BB5\u4E3A\u7A7A\u6216\u8D85\u51FA\u8303\u56F4\uFF09")}),Ne&&Ne.ok){let Le=typeof Ne.pendingOutcome=="string"?Ne.pendingOutcome:"",yt,Mt=!0;if(Le==="applied")yt=t("savedApplied")+(Array.isArray(Ne.applied)&&Ne.applied.length?" \xB7 "+Ne.applied.join("\u3001"):"");else if(Le==="queued")Mt=!1,yt=t("saveQueued");else if(Le==="failed")Mt=!1,yt=t("saveFail")+" \xB7 "+(Ne.hostGuard?t("saveHostGuard"):t("saveFailHint"));else if(Le==="applied-direct")yt=t("savedOk")+" \xB7 "+t("savedDirect");else{let at=Array.isArray(Ne.pending)&&Ne.pending.length?" \xB7 "+t("savePending"):Ne.note?" \xB7 "+t("restartHint"):"";yt=(Ne.retried?"\u267B ":"")+t("savedOk")+at}G.current={...G.current,...pe},Mt?(z(""),X(!1),he(yt)):W(yt),d(yt,Mt),await pt()}else{let Le=Me.status===409?t("conflictRefresh"):Ne?.error||t("saveFail");W(Le),d(Le,!1)}}catch{W(t("saveFail")),d(t("saveFail"),!1)}finally{Y("")}},Ke=()=>{G.current={},S({...s?.config??{}}),z(""),X(!1),he("")},h={env:"vaultSrcEnv",profile:"vaultSrcProfile",workspace:"vaultSrcWorkspace",vaultDir:"vaultSrcVaultDir",default:"vaultSrcDefault"},c=l=>Array.isArray(l?.vaultProfiles)?l.vaultProfiles:[],ie=(l,ae,pe)=>{D.current=!0,X(!0),S(Me=>{let Te=c(Me).map(Le=>({...Le||{}})),Ne={...Te[l]||{}};return ae==="match"?String(pe).trim()?Ne.match={...Ne.match||{},workspace:pe}:delete Ne.match:Ne[ae]=pe,Te[l]=Ne,{...Me??{},vaultProfiles:Te}})},je=()=>{D.current=!0,X(!0),S(l=>({...l??{},vaultProfiles:[...c(l),{name:"",path:""}]}))},u=l=>{D.current=!0,X(!0),S(ae=>({...ae??{},vaultProfiles:c(ae).filter((pe,Me)=>Me!==l)}))},T={fontSize:11,padding:"2px 8px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:6},de={padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:12,minWidth:0},We={A:{label:t("planA"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:4e3,recallMinScore:2,recallLimit:5,recallSummaryLen:130,recallIncludeBody:!1,captureCooldownMs:3e5},B:{label:t("planB"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!1,dedupByLLM:!1,captureMaxTokens:500,recallMinScore:3,recallLimit:3,recallSummaryLen:80,recallIncludeBody:!1,captureMinChars:300,maxCardsPerDay:40,captureCooldownMs:3e5},C:{label:t("planC"),autoWebMode:"interval",watchdogAutoSpawn:!0,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:1200,recallMinScore:1,recallLimit:8,recallSummaryLen:200,recallIncludeBody:!0,captureCooldownMs:12e4}},wt=l=>{let ae=We[l];ae&&(S(pe=>({...pe??{},...ae})),D.current=!0,X(!0),z(l),d(He("planApplied",{plan:ae.label})))},i=async()=>{try{let l=await fetch(V+"/setup-status").then(ae=>ae.json());l&&l.ok&&A(l)}catch{}},ht=async(l,ae)=>{Y(l+ae);try{let Me=await(await fetch(`${V}/mcp/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:l,action:ae})})).json();Me&&Me.ok?d(He(ae==="install"?"mcpInstalled":"mcpUninstalled",{agent:l})):d(He("mcpActionFail",{agent:l,error:Me?.error||""}),!1);try{let Te=await fetch(`${V}/setup-status`).then(Ne=>Ne.json());Te&&Te.ok&&A(Te)}catch{}}catch{d(t("mergeFail"),!1)}finally{Y("")}},kt=J&&Array.isArray(J.agents)?J.agents:[],St=kt.filter(l=>l.installed),_t=[...new Set(St.flatMap(l=>Array.isArray(l.servers)?l.servers:[]))],ct=kt.filter(l=>l.mcpConfigured&&!l.isDsh).length,tt=kt.some(l=>Array.isArray(l.servers));return(0,e.jsx)(Ga.Provider,{value:{form:p,set:Ze},children:(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"hidden",flex:r?"0 0 auto":1,minHeight:0,maxHeight:r?"52vh":void 0},children:[(0,e.jsx)("style",{children:ft}),Ae&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(Ae.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:Ae.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:Ae.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:Ae.msg})]}),(0,e.jsxs)("div",{ref:se,onScroll:Pe,style:{flex:1,minHeight:0,overflow:"auto",overscrollBehavior:"contain",scrollbarGutter:"stable",padding:4},children:[!r&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY CONFIG"}),(0,e.jsx)("h1",{children:t("tabConfig")}),(0,e.jsx)("p",{children:t("configPageSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("v5Local")]})]}),O&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",O]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:pt,children:["\u21BB ",t("retry")]})]}),$&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #3b82f6",background:"rgba(59,130,246,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#1d4ed8",lineHeight:1.7},children:["\u2139 ",t("pendingSyncNote")]}),k&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #f59e0b",background:"rgba(245,158,11,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#b45309"},children:["\u2139\uFE0F ",t("configNeedsDsh")," \u2014\u2014 ",t("editInSetting")]}),re&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #10b981",background:"rgba(16,185,129,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#059669"},children:["\u2713 ",re]}),s&&(s.version||s.dsh?.vaultDir)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F4E6} ",t("pluginInfo")]}),(0,e.jsx)("span",{style:{fontSize:12,opacity:.7},children:t("dshHostLabel")}),s.version&&(0,e.jsxs)("code",{style:T,children:[t("vcLoaded")," v",s.version]}),y&&y.resident&&y.resident.served&&y.resident.served!==s.version&&(0,e.jsxs)("code",{style:T,children:[t("vcResident")," v",y.resident.served]}),y&&y.resident&&!y.resident.served&&(0,e.jsxs)("code",{style:{...T,color:"#b45309",fontWeight:600},children:[t("vcResident")," ",t("vcResidentDownShort")]}),y&&y.resident&&y.resident.served&&y.resident.managed===!1&&(0,e.jsxs)("code",{style:{...T,color:"#b45309",fontWeight:600},children:[t("vcResident")," v",y.resident.served," \xB7 ",t(ve?"vcResidentReplaceBlockedShort":xe?"vcResidentHostManagedShort":De?"vcResidentLockUnknownShort":"vcResidentUnmanagedShort")]}),Vt&&(0,e.jsxs)("code",{style:T,children:[t("vcPage")," v",Vt]}),y&&y.onDisk&&(0,e.jsxs)("code",{style:T,children:[t("vcOnDisk")," v",y.onDisk]}),y&&y.latest&&(0,e.jsxs)("code",{style:T,children:[t("vcLatest")," v",y.latest]}),s.dsh?.vaultDir&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.6},children:["\u{1F4C1} ",s.dsh.vaultDir]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:I==="version",onClick:()=>ee(!0),children:I==="version"?t("checking"):"\u{1F504} "+t("vcCheck")})]}),y&&fe.warn&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px"},children:(0,e.jsxs)("div",{children:["\u26A0\uFE0F ",et[fe.warn]?et[fe.warn]():""]})}),fe.showButton&&(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn"+(fe.emphasis?" me-on":""),disabled:!!I,onClick:H,children:I==="restart"?"\u23F3 "+t("vcRestarting"):"\u{1F504} "+t("vcRestart")}),y.restartCommand&&(0,e.jsx)("code",{style:{fontSize:11,opacity:.75},children:y.restartCommand}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:bt[fe.hint]?bt[fe.hint]():""})]}),Vt&&y&&y.onDisk&&Vt!==y.onDisk&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.7},children:t("vcPageStale",{page:Vt,disk:y.onDisk})}),y&&y.updateAvailable&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,opacity:.88},children:["\u2B06 ",t("vcOutdated")," \u2192 ",(0,e.jsx)("code",{children:y.updateCommand})]}),y&&y.checkError&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#b91c1c"},children:[t("vcCheckFail"),"\uFF1A",y.checkError]})]}),J&&J.agents&&(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:"\u{1F50C}"}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:t("mcpSetupStatus")}),(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:t("mcpAutoHint")})]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",flex:"none"},onClick:i,children:t("mcpRefresh")})]}),tt?(0,e.jsx)("div",{className:"mc-mcp-summary",children:He("mcpSummary",{agents:St.length,servers:_t.length,mounted:ct})}):null,kt.map(l=>{let ae=Array.isArray(l.servers),pe=ae?l.servers:[],Me=l.isDsh?t("dshHostLabel"):l.label||l.name;return(0,e.jsxs)("div",{className:"mc-mcp-row",style:{opacity:l.installed?1:.55},children:[(0,e.jsxs)("div",{className:"mc-mcp-main",children:[(0,e.jsxs)("div",{className:"mc-mcp-title",children:[(0,e.jsx)("b",{children:Me}),l.isDsh&&l.version&&(0,e.jsxs)("span",{className:"mc-mcp-badge",children:["v",l.version]}),!l.installed&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("notInstalled")}),l.installed&&l.mcpConfigured===!1&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:t("noMcpEntry")}),l.mcpConfigured===!0&&(0,e.jsxs)("span",{className:"mc-mcp-badge",style:{color:"#10b981"},children:["\u2713 ",t("healthy")]}),l.mcpConfigured===!0&&l.mcpMatchesCurrentNode===!1&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("nodePathNote")}),(l.needsRepair||l.mcpNeedsRepair)&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:t("mcpNeedsRepair")}),l.isDsh&&(0,e.jsxs)("span",{className:"mc-mcp-badge",children:[t("recallTool"),": ",l.recallTool?t("enabled"):t("disabled")]}),l.detectedOnly&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("mcpDetectedOnly")}),l.reason&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:l.reason})]}),ae?pe.length?(0,e.jsx)("div",{className:"mc-mcp-servers",children:pe.map(Te=>(0,e.jsx)("code",{className:Te==="memory"?"on":"",children:Te},Te))}):l.installed?(0,e.jsx)("div",{className:"mc-mcp-servers",children:(0,e.jsx)("span",{style:{fontSize:10.5,opacity:.45},children:t("mcpNoServers")})}):null:null,l.mcpPath&&(0,e.jsx)("div",{className:"mc-mcp-path",title:l.mcpPath,children:l.mcpPath})]}),(0,e.jsxs)("div",{className:"mc-mcp-actions",children:[l.hook&&(0,e.jsxs)("span",{style:{fontSize:10.5,opacity:.55},children:["hook: ",l.hook]}),!l.isDsh&&!l.detectedOnly&&l.installed&&l.mcpConfigured===!1&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!I,onClick:()=>ht(l.name,"install"),children:t("installMcp")}),!l.isDsh&&!l.detectedOnly&&l.installed&&(l.needsRepair||l.mcpNeedsRepair||l.mcpMatchesCurrentNode===!1)&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",style:{padding:"2px 8px"},disabled:!!I,onClick:()=>ht(l.name,"install"),children:t("repairMcp")}),!l.isDsh&&!l.detectedOnly&&l.installed&&l.mcpConfigured===!0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},disabled:!!I,onClick:()=>{window.confirm(t("uninstallConfirm"))&&ht(l.name,"uninstall")},children:t("uninstallMcp")})]})]},l.name+(l.mcpPath||""))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:6},children:t("mcpSetupHint")}),Z&&(0,e.jsx)("div",{style:{fontSize:11,marginTop:6},children:(0,e.jsx)("code",{style:{padding:"2px 6px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:4},children:Z})})]}),p?(0,e.jsxs)("div",{className:"mc-cfg",children:[(0,e.jsxs)(Ft,{icon:"\u{1F3AF}",title:t("presetConfig"),sub:t("presetHint"),children:[(0,e.jsx)("div",{className:"mc-plan-grid",children:["A","B","C"].map(l=>(0,e.jsxs)("button",{type:"button",className:"mc-plan"+(M===l?" on":""),"aria-pressed":M===l,onClick:()=>wt(l),disabled:!!I,children:[(0,e.jsxs)("b",{children:[M===l?"\u2705 ":l==="A"?"\u{1F7E2} ":l==="B"?"\u{1F4B0} ":"\u2B50 ",We[l].label]}),(0,e.jsx)("span",{children:t("planDesc"+l)})]},l))}),M?(0,e.jsxs)("div",{style:{fontSize:11,color:"#10b981"},children:["\u2705 ",He("planApplied",{plan:We[M].label})]}):null]}),(0,e.jsx)(Ft,{icon:"\u{1F9E0}",title:t("dshMemoryConfig"),sub:t("cfgSubCore"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(ut,{k:"enabled",label:t("enabledLabel")}),(0,e.jsx)(ut,{k:"autoCapture",label:t("autoCapture")}),(0,e.jsx)(ut,{k:"autoRecall",label:t("autoRecall")}),(0,e.jsx)(Ye,{k:"vaultDir",label:t("vaultDirLabel")}),(0,e.jsx)(Ye,{k:"captureMinChars",label:t("captureMinChars"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(Ye,{k:"maxCardsPerDay",label:t("maxCardsPerDay"),hint:t("unitPerDay"),type:"number"}),(0,e.jsx)(Ye,{k:"dedupThreshold",label:t("dedupThreshold"),type:"number",step:"0.01",min:"0",max:"1"}),(0,e.jsx)(Ye,{k:"recallLimit",label:t("recallLimit"),type:"number"}),(0,e.jsx)(Ye,{k:"recallSummaryLen",label:t("recallSummaryLen"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(ut,{k:"recallIncludeBody",label:t("recallBody")}),(0,e.jsx)(Ye,{k:"secretHint",label:t("secretHint")}),(0,e.jsx)(Ye,{k:"recallEmbedding",label:t("recallEmbedding")})]})}),(0,e.jsx)(Ft,{icon:"\u2B50",title:t("coreMemory"),sub:t("coreMemoryHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(ut,{k:"coreMemoryEnabled",label:t("coreMemoryEnabled")}),(0,e.jsx)(Ye,{k:"coreMemoryLimit",label:t("coreMemoryLimit"),type:"number"}),(0,e.jsx)(Ye,{k:"coreMemoryMaxChars",label:t("coreMemoryMaxChars"),type:"number"})]})}),(0,e.jsxs)(Ft,{icon:"\u{1F9E9}",title:t("skillCards"),sub:t("skillCardsHint"),children:[(0,e.jsx)("div",{className:"mc-cfg-grid",children:(0,e.jsx)(ut,{k:"skillCardsAutoSync",label:t("skillAutoSync")})}),(0,e.jsx)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!I,onClick:async()=>{Y("skills");try{let l=await fetch(V+"/skills/sync",{method:"POST"}).then(ae=>ae.json()).catch(()=>null);l&&l.ok?d(t("skillsSyncDone")+"\uFF1A"+t("skillsScanned")+" "+(l.total||0)+" \xB7 "+t("skillsCreated")+" "+(l.created||0)+" \xB7 "+t("skillsUpdated")+" "+(l.updated||0)+" \xB7 "+t("skillsPendingUpdates")+" "+(l.pendingUpdates||0)):d(l&&l.error||t("skillsSyncFail"),!1)}catch{d(t("skillsSyncFail"),!1)}finally{Y("")}},children:I==="skills"?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")})})]}),(0,e.jsxs)(Ft,{icon:"\u{1F4EC}",title:t("newsDigest"),sub:t("newsDigestHint"),children:[(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(ut,{k:"newsDigestEnabled",label:t("newsDigestEnabled")}),(0,e.jsx)(Ye,{k:"newsDigestIntervalMinutes",label:t("newsDigestInterval"),type:"number"}),(0,e.jsx)(Ye,{k:"newsDigestMaxItems",label:t("newsDigestMaxItems"),type:"number"})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!I,onClick:async()=>{Y("digest");try{let l=await fetch(V+"/news/digest",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}).then(ae=>ae.json()).catch(()=>null);l&&l.ok?(_e(l.text||""),d(l.digest&&l.digest.items&&l.digest.items.length?t("newsDigestDone"):t("newsDigestEmpty"),!0)):d(l&&l.error||t("newsDigestFail"),!1)}catch{d(t("newsDigestFail"),!1)}finally{Y("")}},children:I==="digest"?"\u23F3 "+t("newsDigestBuilding"):"\u{1F4EC} "+t("newsDigestNow")}),(0,e.jsx)("span",{className:"mc-field-hint",children:t("newsDigestNowHint")})]}),oe!==null?(0,e.jsx)("pre",{className:"mc-digest-preview",children:oe||t("newsDigestEmpty")}):null]}),(0,e.jsx)(Ft,{icon:"\u{1F520}",title:t("uiLayout"),sub:t("uiLayoutHint"),children:(0,e.jsx)("div",{className:"mc-cfg-grid",children:(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("uiLayout")}),(0,e.jsxs)("select",{value:p&&p.uiScale||"normal",onChange:l=>{let ae=l.target.value;Ze("uiScale",ae);try{window.dispatchEvent(new CustomEvent("me-ui-scale",{detail:ae}))}catch{}},children:[(0,e.jsx)("option",{value:"compact",children:t("uiCompact")}),(0,e.jsx)("option",{value:"normal",children:t("uiNormal")}),(0,e.jsx)("option",{value:"large",children:t("uiLarge")})]})]})})}),(0,e.jsxs)(Ft,{icon:"\u{1F5C2}\uFE0F",title:t("vaultMulti"),sub:t("cfgSubMulti"),children:[(0,e.jsxs)("div",{style:{fontSize:11.5,opacity:.85,marginBottom:8,lineHeight:1.7},children:[t("vaultNow"),"\uFF1A",(0,e.jsx)("code",{children:K?.vaultDir||"\u2014"}),K?.vaultName?`\uFF08${K.vaultName}\uFF09`:""," \xB7 ",t("vaultSource"),"\uFF1A",t(h[K?.vaultSource]||"vaultSrcDefault"),K?.workspace?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("br",{}),t("vaultWorkspace"),"\uFF1A",(0,e.jsx)("code",{children:K.workspace})]}):null]}),c(p).map((l,ae)=>(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1.6fr 1.5fr auto",gap:6,marginBottom:6},children:[(0,e.jsx)("input",{value:l.name||"",placeholder:t("vaultNamePh"),onChange:pe=>ie(ae,"name",pe.target.value),style:de,disabled:k}),(0,e.jsx)("input",{value:l.path||"",placeholder:t("vaultPathPh"),onChange:pe=>ie(ae,"path",pe.target.value),style:de,disabled:k}),(0,e.jsx)("input",{value:l.match&&l.match.workspace||"",placeholder:t("vaultMatchPh"),onChange:pe=>ie(ae,"match",pe.target.value),style:de,disabled:k}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>u(ae),disabled:k,title:t("delete"),children:"\u2715"})]},ae)),(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginTop:4},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:je,disabled:k,children:["\uFF0B ",t("vaultAdd")]}),(0,e.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("vaultActive")}),(0,e.jsxs)("select",{value:p.activeVault||"",onChange:l=>Ze("activeVault",l.target.value),disabled:k,style:de,children:[(0,e.jsx)("option",{value:"",children:t("vaultActiveNone")}),c(p).filter(l=>l&&l.name).map(l=>(0,e.jsx)("option",{value:l.name,children:l.name},l.name))]})]})]})]}),(0,e.jsx)(Ft,{icon:"\u{1F4B0}",title:t("costControl"),sub:t("costHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(ut,{k:"distillEnabled",label:t("distillEnabled")}),(0,e.jsx)(ut,{k:"dedupByLLM",label:t("dedupByLLM")}),(0,e.jsx)(Ye,{k:"captureMaxTokens",label:t("captureMaxTokens"),type:"number"}),(0,e.jsx)(Ye,{k:"captureTimeoutMs",label:t("captureTimeoutMs"),type:"number"}),(0,e.jsx)(Ye,{k:"recallMinScore",label:t("recallMinScore"),type:"number"}),(0,e.jsx)(Ye,{k:"captureCooldownMs",label:t("captureCooldownMs"),type:"number"}),P&&P.ok===!1&&(0,e.jsxs)("div",{style:{gridColumn:"1 / -1",fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.6},children:["\u26A0 ",He("routeListFail",{err:P.error||"\u672A\u77E5\u539F\u56E0"})]}),P&&P.providers&&P.providers.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureProvider")}),(0,e.jsxs)("select",{value:p.captureProvider||"",onChange:l=>{Ze("captureProvider",l.target.value),Ze("captureModel","")},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),P.providers.map(l=>(0,e.jsx)("option",{value:l.id,children:l.label},l.id))]})]}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureModel")}),(0,e.jsxs)("select",{value:p.captureModel||"",onChange:l=>Ze("captureModel",l.target.value),children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),((P.providers.find(l=>l.id===p.captureProvider)||{}).models||[]).map(l=>(0,e.jsx)("option",{value:l.id,children:l.label||l.id},l.id))]})]})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Ye,{k:"captureProvider",label:t("captureProvider")}),(0,e.jsx)(Ye,{k:"captureModel",label:t("captureModel")})]}),(0,e.jsx)(ut,{k:"captureFollowSession",label:t("captureFollowSession")}),(0,e.jsx)(ut,{k:"captureFirstOnly",label:t("captureFirstOnly")}),(0,e.jsx)(Ye,{k:"sessionBudgetChars",label:t("sessionBudgetChars"),type:"number"}),(0,e.jsx)("div",{style:{display:"flex",alignItems:"flex-end"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!I,onClick:async()=>{Y("llmtest");try{let l=await fetch(V+"/llm-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:p.captureProvider||"",model:p.captureModel||"",firstOnly:p.captureFirstOnly===!0})}).then(ae=>ae.json());l&&l.ok?d(t("llmTestOk")+"\uFF1A"+l.route.provider+(l.route.model?"/"+l.route.model:"")+" \xB7 "+l.ms+"ms \xB7 "+t("llmCandidates")+" "+l.candidates):d(t("llmTestFail")+"\uFF1A"+(l&&(l.failure?l.failure.code+" "+l.failure.message:l.error)||"?"),!1)}catch(l){d(t("llmTestFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{Y("")}},children:I==="llmtest"?t("exporting"):"\u{1F50C} "+t("llmTest")})})]})}),(0,e.jsx)(Ft,{icon:"\u{1F6E1}\uFE0F",title:t("auditConfig"),sub:t("auditHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("auditMode")}),(0,e.jsxs)("select",{value:p.auditMode??"all",onChange:l=>Ze("auditMode",l.target.value),children:[(0,e.jsx)("option",{value:"all",children:t("auditAll")}),(0,e.jsx)("option",{value:"none",children:t("auditNone")})]})]}),(0,e.jsx)(Bn,{label:t("auditExemptAgents"),value:p.auditExemptAgents||[],options:[{value:"__all__",label:t("allExempt")},...(J?.agents||[]).filter(l=>!l.isDsh).map(l=>({value:l.name,label:l.name}))],onChange:l=>Ze("auditExemptAgents",l)}),(0,e.jsx)(Bn,{label:t("auditExemptKinds"),value:p.auditExemptKinds||[],options:[{value:"__all__",label:t("allExempt")},...va.filter(l=>l!=="all"&&l!=="core"&&l!=="skill").map(l=>({value:l,label:t(lt[l])}))],onChange:l=>Ze("auditExemptKinds",l)}),(0,e.jsx)(Ye,{k:"recycleRetentionDays",label:t("recycleDays"),hint:t("unitDays"),type:"number"})]})}),(0,e.jsx)(Ft,{icon:"\u{1F6E0}",title:t("serviceConfig"),sub:t("cfgSubService"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(ut,{k:"autoWeb",label:t("autoWeb")}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("autoWebMode")}),(0,e.jsxs)("select",{value:p.autoWebMode??"init",onChange:l=>Ze("autoWebMode",l.target.value),children:[(0,e.jsx)("option",{value:"init",children:t("modeInit")}),(0,e.jsx)("option",{value:"interval",children:t("modeInterval")}),(0,e.jsx)("option",{value:"manual",children:t("modeManual")})]})]}),(0,e.jsx)(Ye,{k:"webPort",label:t("webPort"),type:"number"}),(0,e.jsx)(Ye,{k:"webCheckIntervalMs",label:t("webCheckIntervalMs"),type:"number"}),(0,e.jsx)(Ye,{k:"webMaxRestart",label:t("webMaxRestart"),hint:t("unitTimes"),type:"number"}),(0,e.jsx)(ut,{k:"watchdogAutoSpawn",label:t("watchdogAutoSpawn")}),(0,e.jsx)(ut,{k:"autoRestartOnDrift",label:t("autoRestartOnDrift")}),(0,e.jsx)(ut,{k:"autoMcpSetup",label:t("autoMcpSetup")})]})}),(0,e.jsxs)("div",{className:"mc-cfg-actions",children:[v?(0,e.jsx)("span",{className:"mc-cfg-dirty",children:t("cfgDirty")}):(0,e.jsxs)("span",{className:"mc-cfg-clean",children:["\u2713 ",t("cfgClean")]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),I==="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,opacity:.75},children:["\u23F3 ",t("saving")]}),re&&I!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#10b981"},children:["\u2705 ",re]}),O&&I!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#b91c1c"},children:["\u26A0 ",O]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Ke,disabled:!!I,children:t("reset")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:k?()=>d(t("readonlyTitle")+"\uFF1A"+t("readonlyBody"),!1):xt,disabled:I==="save",title:t(k?"readonlyBody":"saveConfig"),children:I==="save"?"\u23F3 "+t("saving"):k?"\u{1F512} "+t("readonlyBtn"):"\u{1F4BE} "+t("saveConfig")})]})]}):(0,e.jsx)("div",{style:{fontSize:12,opacity:.6},children:t("loading")})]})]})})}function _o({t,onReload:a,version:n}){let[r,s]=(0,o.useState)([]),[m,b]=(0,o.useState)([]),[N,g]=(0,o.useState)("all"),[C,p]=(0,o.useState)("all"),[S,k]=(0,o.useState)(""),[R,$]=(0,o.useState)(""),[q,D]=(0,o.useState)(new Set),[U,G]=(0,o.useState)(null),[K,be]=(0,o.useState)(""),[J,A]=(0,o.useState)(null),[O,W]=(0,o.useState)("pending"),I=(v,X=!0)=>{A({msg:v,ok:X}),setTimeout(()=>A(null),3e3)},Y=[...new Set([...r,...m].map(v=>v.submittedBy).filter(Boolean))],re=(0,o.useCallback)(async()=>{try{let v=await fetch(`${V}/audit/list`).then(X=>X.json());v.ok&&(s(v.pending||[]),b(v.rejected||[]),D(new Set),y({}))}catch{}},[]);(0,o.useEffect)(()=>{re()},[n,re]);let he=(O==="pending"?r:m).filter(v=>{if(!za(v,R)||N!=="all"&&v.kind!==N||C!=="all"&&Ot(v.submittedBy)!==C)return!1;if(S){let X=ga(v.created);if(X&&X!==S)return!1}return!0}),oe=(0,o.useMemo)(()=>{let v=O==="pending"?r:m,X={all:0};return v.forEach(se=>{if(za(se,R)&&!(C!=="all"&&Ot(se.submittedBy)!==C)){if(S){let Ee=ga(se.created);if(Ee&&Ee!==S)return}X.all++,X[se.kind||"other"]=(X[se.kind||"other"]||0)+1}}),X},[r,m,O,C,S,R]),_e=v=>D(X=>{let se=new Set(X);return se.has(v)?se.delete(v):se.add(v),se}),P=async(v,X,se={})=>{let Ee=X||[...q];if(!Ee.length){I(t("noSelection"),!1);return}be("apply");let Pe=v==="approved"?se.kind==="core"?t("approveCore"):t("toastApproved"):t(v==="rejected"?"toastRejected":"toastCardDeleted");try{let ce=0;for(let d of Ee){let H=v==="approved"?"audit/approve":v==="rejected"?"audit/reject":"delete";try{let F=v==="approved"&&se.kind?{path:d,kind:se.kind}:null;(await fetch(V+"/"+H+(F?"":"?path="+encodeURIComponent(d)+(v==="delete"?"&permanent=0":"")),F?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}:void 0)).ok||ce++}catch{ce++}}await re(),a&&a(),ce?I(t("toastFailed")+"\uFF08"+ce+"/"+Ee.length+"\uFF09",!1):I(Pe+" "+Ee.length+" \u5F20")}catch(ce){I(t("toastFailed")+": "+String(ce&&ce.message||ce),!1)}finally{be("")}},[Ie,y]=(0,o.useState)({}),Re=v=>Ie[v]||{},ee=[...q],Z=he.find(v=>v.path===U)||he[0]||null,Oe=Z?Re(Z.path):{};(0,o.useEffect)(()=>{let v=Z;if(!v||Ie[v.path])return;let X=!0,se=v.path;y(Pe=>({...Pe,[se]:{loading:!0}}));let Ee=v.status||(O==="pending"?"pending":"rejected");return fetch(`${V}/card?path=${encodeURIComponent(se)}&status=${Ee}`).then(Pe=>Pe.json()).then(Pe=>{X&&(Pe&&Pe.ok?y(ce=>({...ce,[se]:{text:Pe.text||""}})):y(ce=>({...ce,[se]:{error:Pe&&Pe.error||"HTTP"}})))}).catch(Pe=>{X&&y(ce=>({...ce,[se]:{error:String(Pe&&Pe.message||Pe)}}))}),()=>{X=!1}},[Z&&Z.path,O]);let Ae=async()=>{if(window.confirm(t("reclassify")+"\uFF1F\u53EA\u5904\u7406\u81EA\u52A8\u6C89\u6DC0\u7684\u5F85\u5BA1\u539F\u6587\u5361\uFF0C\u4E0D\u6539\u4EBA\u5DE5\u5361\u3002")){be("reclassify");try{let v=await fetch(V+"/reclassify").then(X=>X.json());v&&v.ok?I(t("reclassify")+"\uFF1A"+v.changed+" / "+v.scanned):I(t("toastFailed")+": "+(v&&v.error||"HTTP"),!1),await re(),a&&a()}catch(v){I(t("toastFailed")+": "+String(v&&v.message||v),!1)}finally{be("")}}},ne=()=>D(new Set),M=v=>{W(v),ne()},z=["all",...va.filter(v=>v!=="all")];return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:ft}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(xa,{toast:J}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-audithead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"REVIEW INBOX"}),(0,e.jsx)("h1",{children:t("tabAudit")}),(0,e.jsx)("p",{children:t("auditInboxSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[r.length," \u5F20"]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("auditUndo")]})]}),(0,e.jsxs)("div",{className:"me-audit",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-filtercard",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{className:"me-audit-filter-row",children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F6E1}\uFE0F ",t("tabAudit")]}),(0,e.jsx)("input",{type:"text",value:R,onChange:v=>{$(v.target.value),ne(),G(null)},placeholder:t("auditSearchPlaceholder"),"aria-label":t("auditSearchPlaceholder"),style:{flex:"1 1 220px",minWidth:160,padding:"5px 9px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",fontSize:12}}),R&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>{$(""),ne(),G(null)},title:t("clearFilter"),children:"\u2715"}),(0,e.jsxs)("select",{value:C,onChange:v=>{p(v.target.value),ne()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allAgents")}),_n(Y).map(v=>(0,e.jsx)("option",{value:v,children:v},v))]}),(0,e.jsx)("input",{type:"date",value:S,onChange:v=>{k(v.target.value),ne()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"}})]}),(0,e.jsxs)("div",{className:"me-audit-types-top",children:[(0,e.jsx)("span",{className:"me-audit-types-label",children:t("auditTypeLabel")}),z.map(v=>{let X=v==="all"?"var(--dsw-alias-label-secondary, #9ca3af)":gt[v]||"#6B7280";return(0,e.jsxs)("button",{type:"button",className:`me-audit-kind${N===v?" active":""}`,onClick:()=>{g(v),ne()},children:[(0,e.jsx)("span",{className:"me-audit-kind-dot",style:{background:X}}),(0,e.jsx)("span",{className:"me-audit-kind-name",children:t(v==="all"?"all":lt[v])}),(0,e.jsx)("span",{className:"me-audit-kind-count",children:oe[v]||0})]},v)})]})]}),(0,e.jsxs)("div",{className:"me-audit-main",children:[(0,e.jsxs)("div",{className:"me-audit-queue",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("button",{type:"button",className:`mc-btn${O==="pending"?" me-on":""}`,onClick:()=>M("pending"),children:[t("pending"),"\uFF08",r.length,"\uFF09"]}),(0,e.jsxs)("button",{type:"button",className:`mc-btn${O==="rejected"?" me-on":""}`,onClick:()=>M("rejected"),children:[t("rejected"),"\uFF08",m.length,"\uFF09"]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("label",{style:{fontSize:12},children:[(0,e.jsx)("input",{type:"checkbox",checked:he.length>0&&ee.length===he.length,onChange:v=>{v.target.checked?D(new Set(he.map(X=>X.path))):D(new Set)}})," ",t("selectAll"),"\uFF08",he.length,"\uFF09"]}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.65},children:[t("auditSelected")," ",ee.length]}),O==="pending"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!K,onClick:Ae,children:["\u{1F527} ",t("reclassify")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!ee.length||!!K,onClick:()=>P("approved"),children:["\u2713 ",t(O==="rejected"?"restore":"approve")]}),O==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!ee.length||!!K,onClick:()=>P("rejected"),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!ee.length||!!K,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&P("delete")},children:["\u{1F5D1} ",t("restoreDelete")]}),ee.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ne,children:t("auditClearSelection")})]}),he.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:he.map(v=>{let X=gt[v.kind]||"#6B7280";return(0,e.jsx)("div",{className:`me-audit-row${v.kind==="core"?" core":""}${Z&&Z.path===v.path?" active":""}`,children:(0,e.jsxs)("div",{className:"me-audit-row-main",onClick:()=>G(v.path),children:[(0,e.jsx)("input",{type:"checkbox",checked:q.has(v.path),onClick:se=>se.stopPropagation(),onChange:()=>_e(v.path)}),(0,e.jsx)("span",{className:"me-audit-row-tile",style:{color:X,borderColor:X+"38",background:X+"18"},children:Wt[v.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"me-audit-row-copy",children:[(0,e.jsxs)("div",{className:"me-audit-row-top",children:[(0,e.jsx)("span",{className:`me-audit-row-kind${v.kind==="core"?" core":""}`,children:v.kind==="core"?"\u2B50 "+t("kindCore"):t(lt[v.kind]||"kindKnowledge")}),v.revision&&(0,e.jsxs)("span",{className:"me-audit-row-state",style:{color:"#a78bfa",filter:"saturate(1.2)"},children:["\u270F\uFE0F ",t("auditRevision")]}),(0,e.jsx)("span",{className:`me-audit-row-state ${O==="pending"?"pending":"rejected"}`,children:O==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"me-audit-row-time",children:Aa(v.created)||"-"})]}),(0,e.jsx)("button",{type:"button",className:"me-audit-row-title",title:v.title,onClick:()=>G(v.path),children:v.title}),v.revision&&(0,e.jsxs)("p",{className:"me-audit-row-reason",style:{color:"#a78bfa"},children:["\u270F\uFE0F ",t("auditRevisionFrom"),"\uFF1A",v.revision.targetTitle||v.revision.targetPath]}),(v.reason||v.summary)&&(0,e.jsx)("p",{className:"me-audit-row-reason",children:v.reason||v.summary}),(0,e.jsxs)("div",{className:"me-audit-row-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Ot(v.submittedBy)]}),(Array.isArray(v.tags)?v.tags:[]).slice(0,3).map(se=>(0,e.jsxs)("span",{children:["#",se]},se))]})]}),(0,e.jsx)("div",{className:"me-audit-row-actions",onClick:se=>se.stopPropagation(),children:O==="pending"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>P("approved",[v.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},onClick:()=>P("rejected",[v.path]),children:"\u2715"})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},title:t("restore"),onClick:()=>P("approved",[v.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},title:t("restoreDelete"),onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&P("delete",[v.path])},children:"\u{1F5D1}"})]})})]})},v.path)})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:20,textAlign:"center"},children:t(R?"auditNoMatch":"noAuditItems")})]}),(0,e.jsx)("aside",{className:"me-audit-preview",children:Z?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"me-audit-preview-head",children:[(0,e.jsxs)("div",{className:"me-audit-preview-top",children:[(0,e.jsxs)("span",{className:"me-audit-kind-badge",style:{color:gt[Z.kind]||"#6B7280",borderColor:(gt[Z.kind]||"#6B7280")+"59",background:(gt[Z.kind]||"#6B7280")+"1a"},children:[Wt[Z.kind]||"\u{1F4CE}"," ",t(lt[Z.kind]||"kindKnowledge")]}),(0,e.jsx)("span",{className:`md-chip ${O==="pending"?"md-chip-st-warn":"md-chip-st-bad"}`,children:O==="pending"?Z.kind==="core"?"\u2B50 "+t("coreSuggested"):"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.55},children:Aa(Z.created)})]}),(0,e.jsx)("h3",{children:Z.title}),Z.revision&&(0,e.jsxs)("div",{className:"me-audit-preview-reason",style:{color:"#a78bfa",marginBottom:6},children:["\u270F\uFE0F ",t("auditRevisionFrom"),"\uFF1A",Z.revision.targetTitle||Z.revision.targetPath]}),(0,e.jsxs)("div",{className:"me-audit-preview-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Ot(Z.submittedBy)]}),!!Z.reason&&(0,e.jsxs)("span",{className:"me-audit-preview-reason",children:["\u2691 ",Z.reason]}),(Array.isArray(Z.tags)?Z.tags:[]).slice(0,5).map(v=>(0,e.jsxs)("span",{children:["#",v]},v))]})]}),(0,e.jsxs)("div",{className:"me-audit-preview-body",children:[Oe.loading&&(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("loading")}),Oe.error&&(0,e.jsxs)("div",{className:"me-audit-preview-empty",style:{color:"#f87171"},children:["\u26A0 ",t("auditBodyFail"),"\uFF1A",Oe.error]}),Oe.text!=null?(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:ta(Ya(pa(Oe.text).body,Z.title))}}):!Oe.loading&&(0,e.jsx)("p",{className:"me-audit-preview-summary",children:Z.summary||""})]}),(0,e.jsxs)("div",{className:"me-audit-preview-actions",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!!K,onClick:()=>P("approved",[Z.path]),children:["\u2713 ",O==="rejected"?t("restore"):Z.kind==="core"?t("approveCore"):t("approve")]}),O==="pending"&&Z.kind!=="core"&&!Z.revision&&(0,e.jsxs)("button",{type:"button",className:"mc-btn me-core-btn",disabled:!!K,onClick:()=>P("approved",[Z.path],{kind:"core"}),children:["\u2B50 ",t("approveAndCore")]}),O==="pending"&&Z.kind==="core"&&(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!K,onClick:()=>P("approved",[Z.path],{kind:"knowledge"}),children:t("approveAsNormal")}),O==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!K,onClick:()=>P("rejected",[Z.path]),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!K,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&P("delete",[Z.path])},children:["\u{1F5D1} ",t("restoreDelete")]})]})]}):(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t(R?"auditNoMatch":"noAuditItems")})})]})]})]})]})}var Uo={title:"",date:"",category:"",source:"",url:"",tags:"",pinned:!1,body:""};function _a(){let t=new Date;return t.getFullYear()+"-"+String(t.getMonth()+1).padStart(2,"0")+"-"+String(t.getDate()).padStart(2,"0")}function Ua(t){try{let a=new URL(String(t||""));return a.protocol==="http:"||a.protocol==="https:"?a.href:""}catch{return""}}function $o(t,a){let n=String(t||"").slice(0,10);if(!n)return a("newsEarlier");if(n===_a())return a("newsToday");let r=new Date;r.setDate(r.getDate()-1);let s=r.getFullYear()+"-"+String(r.getMonth()+1).padStart(2,"0")+"-"+String(r.getDate()).padStart(2,"0");return n===s?a("newsYesterday"):n}function Ln({item:t,t:a,active:n,onOpen:r,onEdit:s,onToggleRead:m,onDelete:b}){return(0,e.jsxs)("article",{className:"mc-news-card"+(t.pinned?" pinned":"")+(t.read?"":" unread")+(n?" active":""),onClick:()=>r(t),children:[(0,e.jsxs)("div",{className:"mc-news-top",children:[!t.read&&(0,e.jsx)("span",{className:"mc-news-dot",title:a("newsUnread")}),(0,e.jsx)("span",{className:"mc-news-cat",children:t.category||a("newsCategoryField")}),t.pinned&&(0,e.jsxs)("span",{className:"mc-news-pin",children:["\u{1F4CC} ",a("newsPinned")]}),(0,e.jsx)("span",{className:"mc-news-time",children:t.date||(t.updated||"").slice(0,10)})]}),(0,e.jsx)("h3",{className:"mc-news-title",children:t.title}),t.excerpt&&(0,e.jsx)("p",{className:"mc-news-excerpt",children:t.excerpt}),(0,e.jsxs)("div",{className:"mc-news-meta",children:[t.source&&(0,e.jsx)("span",{children:t.source}),(t.tags||[]).slice(0,3).map(N=>(0,e.jsxs)("span",{children:["#",N]},N)),(0,e.jsx)("span",{style:{marginLeft:"auto",opacity:.72},children:t.read?a("newsRead"):a("newsUnread")}),(0,e.jsxs)("span",{className:"mc-news-actions",onClick:N=>N.stopPropagation(),children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>m(t),children:t.read?a("newsMarkUnread"):a("newsMarkRead")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>s(t),children:a("newsEdit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>b(t),title:a("delete"),children:"\u2715"})]})]})]})}function qo(t,a){let n=Date.now()-Number(t||0);if(!Number.isFinite(n)||n<0)return"";let r=Math.floor(n/6e4);if(r<1)return a("newsJustNow");if(r<60)return r+" "+a("newsMinutesAgo");let s=Math.floor(r/60);if(s<24)return s+" "+a("newsHoursAgo");let m=Math.floor(s/24);return m<7?m+" "+a("newsDaysAgo"):new Date(Number(t)).toISOString().slice(0,10)}var $t="me.news.lastQuery",oa="me.news.prefs",$n="me.news.view",Go={model:"\u6A21",product:"\u54C1",research:"\u7814",opensource:"\u6E90",industry:"\u4E1A",policy:"\u7B56",other:"\u8BAF"},Ko=new Set(["the","a","an","of","to","for","and","in","on","is","are","with","how","why","new","its","it","as","at","by","from"]);function Ka(t,a){try{let n=localStorage.getItem(t);if(n===null)return a;try{return JSON.parse(n)}catch{return n}}catch{return a}}function Pt(t,a){try{localStorage.setItem(t,JSON.stringify(a))}catch{}}function Ba(t,a=""){let n=Ka(t,a);return typeof n=="string"?n:a}function Fn(){let t=Ka($n,null);return t&&typeof t=="object"?t:{}}function $a(){return{types:{},sources:{},terms:{},opens:0,updatedAt:0}}function Yo(){let t=Ka(oa,null);return!t||typeof t!="object"?$a():{...$a(),...t,types:t.types||{},sources:t.sources||{},terms:t.terms||{}}}function qn(t){let a=[];for(let n of String(t||"").toLowerCase().split(/[^0-9a-z\u4e00-\u9fff]+/))!n||n.length<2||Ko.has(n)||a.push(n);return a}function ya(t,a,n){a&&(t[a]=Math.min(60,(Number(t[a])||0)+n))}function Vo(t,a,n){let r={...n,types:{...n.types},sources:{...n.sources},terms:{...n.terms}};return t&&(ya(r.types,t.type,a),ya(r.sources,t.sourceId,a),qn(t.title).slice(0,6).forEach(s=>ya(r.terms,s,1)),r.opens=(Number(n.opens)||0)+1),r.updatedAt=Date.now(),r}function In(t,a){let n={...t,terms:{...t.terms}};return qn(a).forEach(r=>ya(n.terms,r,3)),n.updatedAt=Date.now(),n}function Jo(t){let a=0;for(let n of String(t||""))a=(a*31+n.charCodeAt(0))%360;return a}function Xo(t){let a=String(t||"\u65B0\u95FB");if(/^[A-Za-z]/.test(a)){let n=a.split(/\s+/);return(n.length>1?n[0][0]+n[1][0]:a.slice(0,2)).toUpperCase()}return a.slice(0,1)}var Qo=/(帮我|请|麻烦|推送|订阅|关注|跟踪|每天|每日|定时|最新|热门|看看|给我|关于|相关)/;function Zo(t){let a=String(t||"").trim();return a?Qo.test(a)||a.split(/\s+/).length>=4:!1}function Pn(t,a,n){let r=Math.max(0,(Date.now()-Number(t.publishedAt||0))/36e5),s=100-Math.min(60,r*.28);s+=(Number(a.types[t.type])||0)*1.6,s+=(Number(a.sources[t.sourceId])||0)*1.1;let m=(t.title+" "+(t.summary||"")).toLowerCase();for(let[N,g]of Object.entries(a.terms))m.includes(N)&&(s+=Math.min(8,Number(g)||0)*.9);let b=String(n||"").trim().toLowerCase();if(b)for(let N of b.split(/\s+/).filter(Boolean))String(t.title||"").toLowerCase().includes(N)?s+=16:m.includes(N)&&(s+=8);return t.followId&&(s+=10),s}function ei({t,mode:a,version:n}){let[r,s]=(0,o.useState)([]),[m,b]=(0,o.useState)([]),[N,g]=(0,o.useState)(!0),[C,p]=(0,o.useState)(0),[S,k]=(0,o.useState)([]),[R,$]=(0,o.useState)(""),[q,D]=(0,o.useState)(null),[U,G]=(0,o.useState)(()=>Ba($t)),[K,be]=(0,o.useState)(()=>Ba($t).trim()),[J,A]=(0,o.useState)(""),[O,W]=(0,o.useState)(()=>{let u=Fn();return typeof u.lang=="string"?u.lang:"zh"}),[I,Y]=(0,o.useState)(()=>Fn().sort==="time"?"time":"rec"),[re,he]=(0,o.useState)(Yo),[oe,_e]=(0,o.useState)(!1),[P,Ie]=(0,o.useState)([]),[y,Re]=(0,o.useState)([]),[ee,Z]=(0,o.useState)(null),[Oe,Ae]=(0,o.useState)(!1),[ne,M]=(0,o.useState)(""),z=(u,T=!0)=>{D({msg:u,ok:T}),setTimeout(()=>D(null),3200)},v=(0,o.useRef)(!1),X=(0,o.useRef)(Ba($t).trim());(0,o.useEffect)(()=>{let u=setTimeout(()=>{let T=U.trim();be(T),v.current&&(Pt($t,T),!(!T||T===X.current)&&(X.current=T,he(de=>{let We=In(de,T);return Pt(oa,We),We})))},260);return()=>clearTimeout(u)},[U]),(0,o.useEffect)(()=>{Pt($n,{lang:O,sort:I})},[O,I]),(0,o.useEffect)(()=>{_e(!0);let u=setTimeout(()=>_e(!1),170);return()=>clearTimeout(u)},[J,O,K,I]);let se=(0,o.useCallback)(async()=>{g(!0),$("");try{let u=new URLSearchParams({period:a==="month"?"month":"today",lang:"all"});u.set("follows","1");let T=await fetch(V+"/news/feed?"+u.toString()).then(de=>de.json());if(!T||!T.ok)throw new Error(T&&T.error||t("newsFeedError"));s(T.items||[]),Array.isArray(T.follows)&&Ie(T.follows),b(T.types||[]),p(Number(T.fetchedAt)||0),k(T.errors||[])}catch(u){let T=u&&u.message||t("newsFeedError");$(T),z(T,!1)}finally{g(!1)}},[a,t]);(0,o.useEffect)(()=>{se()},[n,se]);let Ee=(0,o.useCallback)(async()=>{try{let u=await fetch(V+"/news/follows").then(T=>T.json());u&&u.ok&&(Ie(u.follows||[]),Re(u.domains||[]))}catch{}},[]);(0,o.useEffect)(()=>{Ee()},[n,Ee]);let Pe=async()=>{g(!0);try{let u=await fetch(V+"/news/feed/refresh",{method:"POST"}).then(T=>T.json());if(!u||!u.ok)throw new Error(u&&u.error||t("newsFeedError"));await se(),z(t("newsUpdatedAt")+" "+new Date().toLocaleTimeString())}catch(u){let T=u&&u.message||t("newsFeedError");$(T),z(T,!1),g(!1)}},ce=u=>(m.find(T=>T.id===u)||{}).label||t("all"),d=(r||[]).filter(u=>!O||u.lang===O||u.followId),H={};for(let u of d)H[u.type]=(H[u.type]||0)+1;let F=J?d.filter(u=>u.type===J):d,ye=Zo(K);if(K&&!ye){let u=K.toLowerCase().split(/\s+/).filter(Boolean);F=F.filter(T=>{let de=[T.title,T.summary,T.source,ce(T.type)].join(" ").toLowerCase();return u.every(We=>de.includes(We))})}ne&&(F=F.filter(u=>u.followId===ne));let De=u=>(Number(u.points)||0)+(Number(u.comments)||0)*2,ve=a==="month",xe=ve?F.filter(u=>(u.points||0)>0):[],L=ve&&xe.length>0,le=new Map;L&&xe.slice().sort((u,T)=>(T.points||0)-(u.points||0)||(T.comments||0)-(u.comments||0)).forEach((u,T)=>le.set(u.id||u.url||u.title,T+1)),F=F.slice().sort((u,T)=>I==="time"?(T.publishedAt||0)-(u.publishedAt||0):ve&&L?(T.points||0)-(u.points||0)||(T.comments||0)-(u.comments||0)||(T.publishedAt||0)-(u.publishedAt||0):Pn(T,re,K)-Pn(u,re,K));let Se=Object.keys(re.types||{}).sort((u,T)=>(re.types[T]||0)-(re.types[u]||0)).slice(0,3),fe=Object.keys(re.terms||{}).sort((u,T)=>(re.terms[T]||0)-(re.terms[u]||0)).slice(0,4),et=!!K||Se.length>0||fe.length>0,bt=u=>{v.current=!0;let T=String(u??"").trim();be(T),Pt($t,T),!(!T||T===X.current)&&(X.current=T,he(de=>{let We=In(de,T);return Pt(oa,We),We}))},He=()=>{v.current=!1,X.current="",A(""),W(""),G(""),be(""),Pt($t,"")},pt=u=>he(T=>{let de=Vo(u,4,T);return Pt(oa,de),de}),Ze=()=>{let u=$a();Pt(oa,u),Pt($t,""),X.current="",v.current=!1,he(u),G(""),be("")},Be=async()=>{let u=U.trim();if(!u){z(t("newsFollowNoQuery"),!1);return}Ae(!0);try{let T=await fetch(V+"/news/follows/preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:u})}).then(de=>de.json());if(!T||!T.ok)throw new Error(T&&T.error||t("newsFollowFail"));Re(T.domainsEnum||y),Z({text:u,query:T.parsed.query,label:T.parsed.label,domains:T.parsed.domains,sourceIds:T.parsed.sourceIds||[],notes:T.parsed.notes||[]})}catch(T){z(String(T&&T.message||T),!1)}finally{Ae(!1)}},Ge=(u,T)=>Z(de=>{if(!de)return de;let We=new Set(de.domains);return T?We.add(u):We.delete(u),{...de,domains:[...We]}}),xt=async()=>{if(ee){Ae(!0);try{let u=await fetch(V+"/news/follows",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:ee.query,domains:ee.domains,label:ee.label,sourceIds:ee.sourceIds||[]})}).then(de=>de.json());if(!u||!u.ok)throw new Error(u&&u.error||t("newsFollowFail"));let T=ee.label;Z(null),z((u.duplicate?t("newsFollowExists"):t("newsFollowAdded"))+"\uFF1A"+T),await Ee(),await se()}catch(u){z(String(u&&u.message||u),!1)}finally{Ae(!1)}}},Ke=async u=>{try{let T=await fetch(V+"/news/follows?id="+encodeURIComponent(u),{method:"DELETE"}).then(de=>de.json());if(!T||!T.ok)throw new Error(T&&T.error||t("newsFollowFail"));ne===u&&M(""),z(t("newsFollowRemoved")),await Ee(),await se()}catch(T){z(String(T&&T.message||T),!1)}},h=(u,T)=>{let de=Ua(u.url),We=ce(u.type),wt=Ua(u.image),i=L&&le.get(u.id||u.url||u.title)||0,ht=L&&i>0&&i<=3;return(0,e.jsxs)("a",{className:"mc-news-tile",style:{"--i":Math.min(T,14)},href:de||void 0,target:de?"_blank":void 0,rel:"noopener noreferrer",onClick:()=>pt(u),children:[(0,e.jsxs)("span",{className:"mc-news-tile-cover",children:[wt?(0,e.jsx)("img",{className:"mc-news-tile-img",src:wt,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:kt=>{let St=kt.currentTarget;St.style.display="none",St.nextElementSibling&&(St.nextElementSibling.style.display="grid")}}):null,(0,e.jsxs)("span",{className:"mc-news-tile-gen",style:{"--hue":Jo(u.title),display:wt?"none":"grid"},children:[(0,e.jsx)("b",{children:Go[u.type]||"\u8BAF"}),(0,e.jsx)("small",{children:We}),(0,e.jsxs)("em",{children:[(0,e.jsx)("i",{children:Xo(u.source)}),u.source]})]}),(0,e.jsx)("span",{className:"mc-news-tile-badge"+(ht?" hot":""),children:i?"#"+i:We}),(0,e.jsx)("span",{className:"mc-news-tile-time",children:qo(u.publishedAt,t)})]}),(0,e.jsxs)("span",{className:"mc-news-tile-body",children:[(0,e.jsx)("span",{className:"mc-news-tile-title",children:u.title}),u.summary?(0,e.jsx)("span",{className:"mc-news-tile-summary",children:u.summary}):null,(0,e.jsxs)("span",{className:"mc-news-tile-foot",children:[(0,e.jsx)("i",{className:"mc-news-tile-dot"}),(0,e.jsx)("span",{children:u.source}),u.followLabel?(0,e.jsxs)("span",{className:"mc-news-tile-follow",children:["\u{1F514} ",u.followLabel]}):null,i?(0,e.jsxs)("span",{children:["\xB7 \u{1F525} ",t("newsHeat")," ",De(u)]}):null,(0,e.jsxs)("span",{className:"mc-news-tile-open",children:[t("newsOriginal")," \u2197"]})]})]})]},u.id||u.url||u.title)},c=F.filter(u=>u.followId),ie=c.slice(0,4),je=ne?F:ie.length?F.filter(u=>!u.followId):F;return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(xa,{toast:q}),(0,e.jsxs)("div",{className:"mc-news-hero",children:[(0,e.jsx)("div",{className:"mc-news-hero-eye",children:t("newsHeroEye")}),(0,e.jsxs)("div",{className:"mc-news-hero-search",children:[(0,e.jsx)("span",{"aria-hidden":"true",style:{fontSize:15,opacity:.75},children:"\u{1F50E}"}),(0,e.jsx)("input",{type:"text",value:U,onChange:u=>{v.current=!0,G(u.target.value)},onKeyDown:u=>{u.key==="Enter"&&bt(U)},placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),U?(0,e.jsx)("button",{type:"button",className:"mc-news-hero-clear",title:t("cancel"),onClick:()=>{G(""),bt("")},children:"\u2715"}):null,(0,e.jsx)("button",{type:"button",className:"mc-news-hero-go",onClick:()=>bt(U),children:t("newsSearchGo")}),U.trim()?(0,e.jsxs)("button",{type:"button",className:"mc-news-hero-follow",disabled:Oe,onClick:Be,title:t("newsFollowPreview"),children:["\uFF0B ",t("newsFollow")]}):null]}),(0,e.jsx)("div",{className:"mc-news-hero-hint",children:t(ye?"newsIntentHint":"newsHeroHint")})]}),ee?(0,e.jsxs)("div",{className:"mc-news-follow-draft",children:[(0,e.jsxs)("div",{className:"draft-head",children:["\u{1F514} ",t("newsFollowPreview")]}),(0,e.jsxs)("div",{className:"draft-body",children:[(0,e.jsx)("b",{children:ee.label}),ee.query?(0,e.jsxs)("span",{className:"draft-q",children:["\xB7 \u300C",ee.query,"\u300D"]}):null,(0,e.jsxs)("div",{className:"draft-doms",children:[(0,e.jsx)("span",{className:"draft-lbl",children:t("newsFollowDomains")}),y.map(u=>(0,e.jsxs)("label",{className:"draft-opt",title:u.hint||"",children:[(0,e.jsx)("input",{type:"checkbox",checked:ee.domains.includes(u.id),onChange:T=>Ge(u.id,T.target.checked)}),(0,e.jsx)("span",{children:u.label})]},u.id))]}),ee.notes.map((u,T)=>(0,e.jsxs)("div",{className:"draft-note",children:["\xB7 ",u]},T))]}),(0,e.jsxs)("div",{className:"draft-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Z(null),children:t("cancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:Oe||!ee.domains.length,onClick:xt,children:t("newsFollowConfirm")})]})]}):null,P.length>0?(0,e.jsx)("div",{className:"mc-news-follows",children:P.map(u=>(0,e.jsxs)("span",{className:"mc-news-follow-chip"+(ne===u.id?" on":""),children:[(0,e.jsxs)("button",{type:"button",className:"chip-main",onClick:()=>M(T=>T===u.id?"":u.id),title:(u.domains||[]).join(" / "),children:["\u{1F514} ",u.label,(0,e.jsx)("i",{children:u.count||0})]}),(0,e.jsx)("button",{type:"button",className:"chip-x",title:t("delete"),"aria-label":t("delete"),onClick:()=>Ke(u.id),children:"\u2715"})]},u.id))}):null,et?(0,e.jsxs)("div",{className:"mc-news-pref",children:[(0,e.jsxs)("span",{children:["\u{1F3AF} ",t("newsPersonalized")]}),K?(0,e.jsxs)("span",{children:["\xB7 ",t("newsLastQuery")," ",(0,e.jsx)("b",{children:K})]}):null,fe.length>0?(0,e.jsxs)("span",{children:["\xB7 ",fe.join(" / ")]}):null,Se.length>0?(0,e.jsxs)("span",{children:["\xB7 ",Se.map(ce).join(" / ")]}):null,(0,e.jsx)("span",{className:"mc-news-pref-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Ze,children:t("newsResetPrefs")})})]}):null,(0,e.jsxs)("div",{className:"mc-news-feed-toolbar",children:[(0,e.jsxs)("div",{className:"mc-news-pills",children:[(0,e.jsxs)("button",{type:"button",className:"mc-news-pill"+(J===""?" on":""),onClick:()=>A(""),children:[t("all"),(0,e.jsx)("span",{className:"mc-news-pill-count",children:d.length})]}),m.map(u=>H[u.id]?(0,e.jsxs)("button",{type:"button",className:"mc-news-pill"+(J===u.id?" on":""),onClick:()=>A(J===u.id?"":u.id),children:[u.label,(0,e.jsx)("span",{className:"mc-news-pill-count",children:H[u.id]})]},u.id):null)]}),(0,e.jsxs)("span",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-chip"+(O==="zh"?" active":""),onClick:()=>W("zh"),children:t("newsLangZh")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(O==="en"?" active":""),onClick:()=>W("en"),children:t("newsLangEn")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(O===""?" active":""),onClick:()=>W(""),children:t("newsLangAll")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(I==="rec"?" active":""),onClick:()=>Y("rec"),children:t("newsSortRec")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(I==="time"?" active":""),onClick:()=>Y("time"),children:t("newsSortTime")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:N,onClick:Pe,children:t(N?"newsLoading":"newsFeedRefresh")})]})]}),(0,e.jsxs)("div",{className:"mc-news-feed-meta",style:{margin:"0 0 8px"},children:[C?t("newsUpdatedAt")+" "+new Date(C).toLocaleTimeString():"",N?"":" \xB7 "+F.length+" "+t("newsMatched")]}),a==="month"&&(0,e.jsx)("div",{className:"mc-news-feed-warn",style:{color:"var(--dsw-alias-label-secondary, #6b7280)",background:"transparent",borderColor:"var(--dsw-alias-border-l1, #e5e7eb)"},children:t(L?"newsEnRanking":"newsZhArchive")}),R&&!N&&(0,e.jsxs)("div",{className:"mc-news-feed-warn",style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[(0,e.jsxs)("span",{children:["\u26A0 ",R]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Pe,children:t("newsRetry")})]}),S.length>0&&(0,e.jsxs)("div",{className:"mc-news-feed-warn",children:["\u26A0 ",t("newsPartialFail"),"\uFF1A",S.slice(0,2).join("\uFF1B")]}),N?(0,e.jsxs)("div",{className:"mc-card mc-news-feed-empty mc-news-loading-card",role:"status","aria-live":"polite",children:[(0,e.jsx)(ra,{}),(0,e.jsx)("span",{children:t("newsLoading")}),(0,e.jsx)("small",{children:t("newsLoadingHint")})]}):r.length===0?(0,e.jsxs)("div",{className:"mc-card mc-news-feed-empty",children:[(0,e.jsx)("div",{children:t("newsFeedEmpty")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",style:{marginTop:10},onClick:Pe,children:t("newsFeedRefresh")})]}):F.length===0?(0,e.jsxs)("div",{className:"mc-card mc-news-feed-empty mc-news-nomatch",children:[(0,e.jsx)("div",{children:t("newsNoMatch")}),(0,e.jsx)("p",{style:{margin:"6px 0 0",fontSize:11.5,lineHeight:1.6,opacity:.75},children:t("newsNoMatchHint")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",style:{marginTop:10},onClick:He,children:t("newsClearFilters")})]}):(0,e.jsxs)(e.Fragment,{children:[!ne&&ie.length>0?(0,e.jsxs)("div",{className:"mc-news-follow-sec",children:[(0,e.jsxs)("div",{className:"mc-news-follow-sec-head",children:[(0,e.jsxs)("span",{children:["\u{1F514} ",t("newsFollowing")]}),(0,e.jsx)("em",{children:c.length})]}),(0,e.jsx)("div",{className:"mc-news-grid"+(oe?" is-swapping":""),children:ie.map((u,T)=>h(u,T))})]}):null,(0,e.jsx)("div",{className:"mc-news-grid"+(oe?" is-swapping":""),children:je.map((u,T)=>h(u,T))})]})]})}function ti({t,version:a,onUnreadChange:n}){let[r,s]=(0,o.useState)("daily"),m=r==="month"?"newsMonthlySub":r==="mine"?"newsMineSub":"newsDailySub";return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)("div",{className:"mc-v5-pagehead",children:(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"NEWSROOM"}),(0,e.jsx)("h1",{children:t("newsTitle")}),(0,e.jsx)("p",{children:t(m)})]})}),(0,e.jsxs)("div",{className:"mc-news-modes",children:[(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(r==="daily"?" active":""),onClick:()=>s("daily"),children:t("newsDaily")}),(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(r==="month"?" active":""),onClick:()=>s("month"),children:t("newsMonthly")}),(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(r==="mine"?" active":""),onClick:()=>s("mine"),children:t("newsMine")})]}),r==="mine"?(0,e.jsx)(ai,{t,version:a,onUnreadChange:n}):(0,e.jsx)(ei,{t,mode:r,version:a})]})}function ai({t,version:a,onUnreadChange:n}){let[r,s]=(0,o.useState)([]),[m,b]=(0,o.useState)([]),[N,g]=(0,o.useState)({all:0,unread:0}),[C,p]=(0,o.useState)(""),[S,k]=(0,o.useState)(""),[R,$]=(0,o.useState)(""),[q,D]=(0,o.useState)(!1),[U,G]=(0,o.useState)(""),[K,be]=(0,o.useState)(null),[J,A]=(0,o.useState)(null),[O,W]=(0,o.useState)(!1),[I,Y]=(0,o.useState)(""),[re,he]=(0,o.useState)(null),oe=(M,z=!0)=>{he({msg:M,ok:z}),setTimeout(()=>he(null),2600)};(0,o.useEffect)(()=>{let M=setTimeout(()=>k(C.trim()),220);return()=>clearTimeout(M)},[C]);let _e=(0,o.useCallback)(async()=>{let M=new URLSearchParams;S&&M.set("q",S),R&&M.set("category",R),q&&M.set("unread","1");try{let z=await fetch(V+"/news?"+M.toString()).then(v=>v.json());if(!z||!z.ok)throw new Error(z&&z.error||"load failed");s(z.items||[]),b(z.categories||[]),g(z.counts||{all:0,unread:0}),n&&n(Number((z.counts||{}).unread)||0)}catch{oe(t("newsSaveFail"),!1)}},[S,R,q,n,t]);(0,o.useEffect)(()=>{_e()},[a,_e]);let P=async M=>{G(M.id);try{let z=await fetch(V+"/news/item?id="+encodeURIComponent(M.id)).then(v=>v.json());if(!z||!z.ok)throw new Error(z&&z.error||"load failed");be(z.item),z.item.read||await Ie(M.id,!0)}catch{oe(t("newsSaveFail"),!1)}},Ie=async(M,z)=>{try{let v=await fetch(V+"/news/read",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:M,read:z})}).then(X=>X.json());if(!v||!v.ok)throw new Error(v&&v.error||"read failed");be(X=>X&&X.id===M?{...X,read:!!z}:X),await _e()}catch{oe(t("newsSaveFail"),!1)}},y=async M=>{if(W(!1),M){let z=M;if(!z.body)try{let v=await fetch(V+"/news/item?id="+encodeURIComponent(z.id)).then(X=>X.json());v&&v.ok&&(z=v.item)}catch{}A({id:z.id,title:z.title||"",date:z.date||_a(),category:z.category||"",source:z.source||"",url:z.url||"",tags:(z.tags||[]).join(", "),pinned:!!z.pinned,body:z.body||"",created:z.created||""})}else A({...Uo,date:_a()})},Re=async()=>{if(J){if(!String(J.title||"").trim()||!String(J.body||"").trim()){oe(t("newsSaveFail"),!1);return}Y("save");try{let M={id:J.id||void 0,title:J.title,date:J.date,category:J.category,source:J.source,url:J.url,tags:String(J.tags||"").split(",").map(v=>v.trim()).filter(Boolean),pinned:!!J.pinned,body:J.body,created:J.created},z=await fetch(V+"/news/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(M)}).then(v=>v.json());if(!z||!z.ok)throw new Error(z&&z.error||"save failed");A(null),G(z.item.id),be(z.item),await _e(),oe(t("newsSaved"))}catch(M){oe(M&&M.message||t("newsSaveFail"),!1)}finally{Y("")}}},ee=async M=>{if(window.confirm(t("newsDeleteConfirm"))){Y("delete");try{let z=await fetch(V+"/news/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:M.id})}).then(v=>v.json());if(!z||!z.ok)throw new Error(z&&z.error||"delete failed");U===M.id&&(G(""),be(null)),await _e(),oe(t("newsDeleted"))}catch{oe(t("newsSaveFail"),!1)}finally{Y("")}}},Z=r.filter(M=>M.pinned),Oe=r.filter(M=>!M.pinned),Ae=K?Ua(K.url):"",ne="";return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(xa,{toast:re}),(0,e.jsxs)("div",{className:"mc-news-toolbar",children:[(0,e.jsxs)("span",{className:"mc-news-feed-meta",style:{marginLeft:0},children:[N.all," ",t("newsCountUnit")," \xB7 ",N.unread," ",t("newsUnread")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>y(null),children:["\uFF0B ",t("newsNew")]}),(0,e.jsx)("input",{className:"mc-news-search",type:"text",value:C,onChange:M=>p(M.target.value),placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(R===""?" active":""),onClick:()=>$(""),children:t("all")}),m.map(M=>(0,e.jsx)("button",{type:"button",className:"mc-chip"+(R===M?" active":""),onClick:()=>$(z=>z===M?"":M),children:M},M)),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(q?" active":""),onClick:()=>D(M=>!M),children:t("newsUnreadOnly")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>_e(),children:t("refresh")})]}),(0,e.jsxs)("div",{className:"mc-news-main",children:[(0,e.jsx)("div",{className:"mc-news-list",children:r.length===0?(0,e.jsxs)("div",{className:"mc-card mc-news-empty",children:[t(C||R||q?"newsNoMatch":"newsEmpty"),!C&&!R&&!q&&(0,e.jsx)("div",{style:{marginTop:10},children:(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>y(null),children:["\uFF0B ",t("newsNew")]})})]}):(0,e.jsxs)(e.Fragment,{children:[Z.length>0&&(0,e.jsxs)("div",{className:"mc-news-group",children:[(0,e.jsxs)("div",{className:"mc-news-group-label",children:["\u{1F4CC} ",t("newsPinned")]}),Z.map(M=>(0,e.jsx)(Ln,{item:M,t,active:U===M.id,onOpen:P,onEdit:z=>y(z),onToggleRead:z=>Ie(z.id,!z.read),onDelete:ee},M.id))]}),(0,e.jsx)("div",{className:"mc-news-group",children:Oe.map(M=>{let z=$o(M.date,t),v=z!==ne;return ne=z,(0,e.jsxs)(o.default.Fragment,{children:[v&&(0,e.jsx)("div",{className:"mc-news-group-label",children:z}),(0,e.jsx)(Ln,{item:M,t,active:U===M.id,onOpen:P,onEdit:X=>y(X),onToggleRead:X=>Ie(X.id,!X.read),onDelete:ee})]},M.id)})})]})}),K&&(0,e.jsxs)("aside",{className:"mc-news-reader",children:[(0,e.jsxs)("div",{className:"mc-news-reader-head",children:[(0,e.jsx)("span",{className:"mc-news-cat",children:K.category||t("newsCategoryField")}),K.pinned&&(0,e.jsxs)("span",{className:"mc-news-pin",children:["\u{1F4CC} ",t("newsPinned")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>{be(null),G("")},title:t("close"),children:"\u2715"})]}),(0,e.jsx)("h2",{children:K.title}),(0,e.jsxs)("div",{className:"mc-news-reader-meta",children:[(0,e.jsx)("span",{children:K.date||""}),K.source&&(0,e.jsxs)("span",{children:["\xB7 ",K.source]}),(0,e.jsxs)("span",{children:["\xB7 ",K.read?t("newsRead"):t("newsUnread")]}),(K.tags||[]).map(M=>(0,e.jsxs)("span",{children:["#",M]},M))]}),Ae&&(0,e.jsx)("div",{style:{marginTop:8},children:(0,e.jsxs)("a",{className:"mc-btn",style:{textDecoration:"none"},href:Ae,target:"_blank",rel:"noopener noreferrer",children:["\u2197 ",t("newsOpenLink")]})}),(0,e.jsx)("div",{className:"md-doc",style:{marginTop:12},dangerouslySetInnerHTML:{__html:ta(Ya(K.body||"",K.title))}}),(0,e.jsxs)("div",{className:"mc-news-reader-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>y(K),children:t("newsEdit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Ie(K.id,!K.read),children:K.read?t("newsMarkUnread"):t("newsMarkRead")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:I==="delete",onClick:()=>ee(K),children:t("delete")})]})]})]}),J&&(0,e.jsx)("div",{className:"me-overlay",onClick:()=>A(null),children:(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:860,width:"94vw",maxHeight:"90vh"},onClick:M=>M.stopPropagation(),children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--dsw-alias-border-l1, #e5e7eb)"},children:[(0,e.jsx)("b",{children:J.id?t("newsEdit"):t("newsNew")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>A(null),children:t("close")})]}),(0,e.jsxs)("div",{style:{padding:16,overflow:"auto",maxHeight:"calc(90vh - 60px)"},children:[(0,e.jsxs)("div",{className:"mc-news-form",children:[(0,e.jsxs)("label",{className:"full",children:[(0,e.jsx)("span",{children:t("newsTitleField")}),(0,e.jsx)("input",{className:"mc-news-input",value:J.title,onChange:M=>A(z=>({...z,title:M.target.value})),placeholder:t("newsTitlePlaceholder")})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsDateField")}),(0,e.jsx)("input",{className:"mc-news-input",type:"date",value:J.date||"",onChange:M=>A(z=>({...z,date:M.target.value}))})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsCategoryField")}),(0,e.jsx)("input",{className:"mc-news-input",list:"me-news-categories",value:J.category||"",onChange:M=>A(z=>({...z,category:M.target.value}))})]}),(0,e.jsx)("datalist",{id:"me-news-categories",children:m.map(M=>(0,e.jsx)("option",{value:M},M))}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsSourceField")}),(0,e.jsx)("input",{className:"mc-news-input",value:J.source||"",onChange:M=>A(z=>({...z,source:M.target.value}))})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsUrlField")}),(0,e.jsx)("input",{className:"mc-news-input",value:J.url||"",onChange:M=>A(z=>({...z,url:M.target.value})),placeholder:"https://\u2026"})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsTagsField")}),(0,e.jsx)("input",{className:"mc-news-input",value:J.tags||"",onChange:M=>A(z=>({...z,tags:M.target.value}))})]}),(0,e.jsxs)("label",{style:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:18},children:[(0,e.jsx)("input",{type:"checkbox",checked:!!J.pinned,onChange:M=>A(z=>({...z,pinned:M.target.checked}))}),(0,e.jsx)("span",{children:t("newsPinField")})]}),(0,e.jsxs)("label",{className:"full",children:[(0,e.jsx)("span",{children:t("newsBodyField")}),(0,e.jsx)("textarea",{className:"mc-news-textarea",value:J.body||"",onChange:M=>A(z=>({...z,body:M.target.value})),placeholder:t("newsBodyPlaceholder")})]}),O&&(0,e.jsx)("div",{className:"full mc-news-preview",children:(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:ta(J.body||"")}})})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",marginTop:14},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>W(M=>!M),children:t(O?"newsEditBody":"newsPreview")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>A(null),children:t("cancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:I==="save",onClick:Re,children:t(I==="save"?"newsSaving":"newsSave")})]})]})]})})]})}function ni({t,onReload:a,version:n}){let[r,s]=(0,o.useState)([]),[m,b]=(0,o.useState)(""),[N,g]=(0,o.useState)(null),C=(k,R=!0)=>{g({msg:k,ok:R}),setTimeout(()=>g(null),3200)},p=(0,o.useCallback)(async()=>{try{let k=await fetch(`${V}/recycle/list`).then(R=>R.json());k.ok&&s(k.items||[])}catch{}},[]);(0,o.useEffect)(()=>{p()},[n,p]);let S=async(k,R)=>{let $=(r.find(q=>q.path===R)||{}).title||R;b(k+R);try{let D=await fetch(V+(k==="restore"?"/recycle/restore":"/recycle/purge")+"?path="+encodeURIComponent(R)),U=await D.json().catch(()=>null);await p(),a&&a(),D.ok&&(!U||U.ok!==!1)?C(t(k==="restore"?"toastRestored":"toastPurged")+"\uFF1A"+$):C(t("toastFailed")+"\uFF1A"+(U&&U.error||"HTTP "+D.status),!1)}catch(q){C(t("toastFailed")+"\uFF1A"+String(q&&q.message||q),!1)}finally{b("")}};return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:ft}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(xa,{toast:N}),(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"RECYCLE CENTER"}),(0,e.jsx)("h1",{children:t("tabRecycle")}),(0,e.jsx)("p",{children:t("recyclePageSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:r.length}),(0,e.jsxs)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!m||r.length===0,title:r.length?t("recyclePurgeAllConfirm").split("{n}").join(String(r.length)):t("emptyRecycle"),onClick:async()=>{if(r.length&&window.confirm(t("recyclePurgeAllConfirm").split("{n}").join(String(r.length)))){b("purgeAll");try{let k=await fetch(V+"/recycle/purge-all",{method:"POST"}),R=await k.json().catch(()=>null);await p(),a&&a(),k.ok&&(!R||R.ok!==!1)?C(t("toastPurgeAll").split("{n}").join(String(R&&R.purged!=null?R.purged:r.length)),!0):C(t("toastFailed")+"\uFF1A"+(R&&R.error||"HTTP "+k.status),!1)}catch(k){C(t("toastFailed")+"\uFF1A"+String(k&&k.message||k),!1)}finally{b("")}}},children:["\u{1F5D1} ",t("recyclePurgeAll"),r.length?"\uFF08"+r.length+"\uFF09":""]})]}),(0,e.jsx)("div",{className:"mc-v5-recycle-hint",children:t("recycleHint")}),r.length?(0,e.jsx)("div",{className:"mc-card mc-v5-recycle",children:r.map(k=>{let R=gt[k.kind]||"#6B7280";return(0,e.jsxs)("div",{className:"mc-v5-recycle-row",children:[(0,e.jsx)("span",{className:"mc-v5-recycle-tile",style:{color:R,background:R+"18",borderColor:R+"38"},children:Wt[k.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"mc-v5-recycle-copy",children:[(0,e.jsx)("b",{children:k.title}),(0,e.jsxs)("span",{children:[t(lt[k.kind]||"kindKnowledge")," \xB7 ",k.status==="rejected"?t("rejected"):t("bucketDeleted")," \xB7 ",ga(k.deletedAt||k.updated)||"-"]})]}),(0,e.jsxs)("div",{className:"mc-v5-recycle-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!m,title:k.status==="rejected"?t("restoreToQueue"):t("restore"),onClick:()=>S("restore",k.path),children:k.status==="rejected"?t("restoreToQueue"):t("restore")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!m,onClick:()=>{window.confirm(t("purgeConfirm"))&&S("purge",k.path)},children:t("purge")})]})]},k.path)})}):(0,e.jsxs)("div",{className:"mc-card mc-v5-empty-state",children:["\u{1F5D1}\uFE0F ",(0,e.jsx)("b",{children:t("emptyRecycle")}),(0,e.jsx)("span",{children:t("recycleEmptyHint").split("{days}").join("30")})]})]})]})}var Ya=(t,a)=>{let n=String(t||"").split(/\r?\n/),r=m=>String(m||"").replace(/[#*_`]/g,"").replace(/[\s::\-–—·]/g,"").trim(),s=r(a);for(;;){let m=0;for(;m<n.length&&!n[m].trim();)m++;let b=/^#{1,2}\s+(.+?)\s*$/.exec(n[m]||"");if(!b||r(b[1])!==s)break;for(n.splice(m,1);m<n.length&&!n[m].trim();)n.splice(m,1)}return n.join(`
1034
+ `)},oi=t=>{let a=[],n=!1,r=0;for(let s of String(t||"").split(/\r?\n/)){let m=s.trim();if(/^```/.test(m)){n=!n;continue}if(n)continue;let b=/^(#{1,6})\s+(.+)$/.exec(m);if(!b)continue;r++;let N=b[1].length;N<=3&&a.push({id:"md-h-"+r,level:N,text:b[2].replace(/[#*_`>\[\]()]/g,"").replace(/\s+/g," ").trim()})}return a},Va=t=>{let a=String(t.summary||"").replace(/[#>*_`]/g," ").replace(/\s+/g," ").trim();return a.length>150?a.slice(0,148)+"\u2026":a},Gn=t=>{let a=String(t.summary||"").toLowerCase();return/决策|结论|决定|decision/.test(a)?"insightDecision":/根因|原因|root cause/.test(a)?"insightRoot":/教训|避免|lesson/.test(a)?"insightLesson":"insightSummary"},Kn=({n:t=0,color:a="#ff9a72",size:n=30})=>{let r=Math.max(2,Math.min(6,Number(t)||2)),s=Array.from({length:r},(m,b)=>{let N=-Math.PI/2+b*Math.PI*2/r,g=b%2?13:16;return[20+Math.cos(N)*g,20+Math.sin(N)*g]});return(0,e.jsxs)("svg",{className:"mc-v5-mini",width:n,height:n,viewBox:"0 0 40 40","aria-hidden":"true",children:[s.map(([m,b],N)=>(0,e.jsx)("line",{x1:"20",y1:"20",x2:m,y2:b,stroke:a,strokeOpacity:".35"},"l"+N)),s.map(([m,b],N)=>(0,e.jsx)("circle",{cx:m,cy:b,r:N%2?2.2:1.8,fill:a,fillOpacity:N%2?.8:.55},"c"+N)),(0,e.jsx)("circle",{cx:"20",cy:"20",r:"2.6",fill:a})]})},ii=({card:t,t:a,onOpen:n,query:r,onDelete:s,onTagClick:m,pinned:b,onPin:N,onCore:g,links:C})=>{let p=gt[t.kind]||gt.other,S=Number(C??t.links??t.weight??0),k=Ea(t);return(0,e.jsxs)("article",{className:`mc-cardrow mc-card mc-v5-card${b?" pinned":""}${t.kind==="core"?" core":""}`,onClick:()=>n(t),children:[(0,e.jsxs)("div",{className:"mc-v5-card-top",children:[(0,e.jsx)("span",{className:"mc-v5-card-tile",style:{color:p,background:p+"18",borderColor:p+"38"},children:Wt[t.kind]||"\u{1F4CE}"}),(0,e.jsx)("span",{className:"mc-v5-card-kind-name",children:t.kind==="core"?"\u2B50 "+a("kindCore"):a(lt[t.kind]||"kindKnowledge")}),t.kind==="core"&&(0,e.jsxs)("span",{className:"mc-v5-core-badge",children:["\u2B50 ",a("kindCore")]}),t.status==="pending"&&(0,e.jsxs)("span",{className:"mc-v5-card-status pending",children:["\u23F3 ",a("statusPending")]}),t.status==="rejected"&&(0,e.jsxs)("span",{className:"mc-v5-card-status rejected",children:["\u26D4 ",a("statusRejected")]}),bi(t.updated)&&(0,e.jsx)("span",{className:"mc-new",children:a("newBadge")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{className:"mc-v5-card-time",children:Et(t.updated)}),g&&t.status!=="pending"&&t.status!=="rejected"&&(0,e.jsx)("button",{type:"button",className:`mc-v5-core${t.kind==="core"?" on":""}`,title:a(t.kind==="core"?"unsetCore":"setCore"),onClick:R=>{R.stopPropagation(),g(t.path,t.kind==="core"?"knowledge":"core")},children:t.kind==="core"?"\u2B50 "+a("coreShort"):"\u2606 "+a("setCoreShort")}),N&&(0,e.jsx)("button",{type:"button",className:`mc-v5-pin${b?" on":""}`,title:a(b?"unpinCard":"pinCard"),"aria-label":a(b?"unpinCard":"pinCard"),onClick:R=>{R.stopPropagation(),N(t.path)},children:"\u{1F4CC}"})]}),(0,e.jsx)("h4",{className:"mc-v5-card-title",children:r?Ha(t.title,r):t.title}),(0,e.jsxs)("div",{className:"mc-v5-card-insight",children:[(0,e.jsx)("span",{className:"mc-v5-insight-k",children:a(Gn(t))}),(0,e.jsx)("span",{className:"mc-v5-card-lead",children:r?Ha(t.summary||"",r):Va(t)})]}),r&&(()=>{let R=ln(t.body||"",r);return R?(0,e.jsx)("p",{className:"mc-snippet",children:Ha(R,r)}):null})(),Ea(t).length>0&&(0,e.jsxs)("div",{className:"mc-tags mc-v5-card-tags",children:[Ea(t).slice(0,2).map(R=>(0,e.jsxs)("button",{type:"button",className:"mc-tag mc-tag-click",title:R,onClick:$=>{$.stopPropagation(),m&&m(R)},children:["#",R]},R)),k.length>2&&(0,e.jsxs)("span",{className:"mc-tag more",children:["+",k.length-2]})]}),(0,e.jsxs)("footer",{className:"mc-v5-card-foot",children:[S>0&&(0,e.jsxs)("span",{className:"mc-v5-conn",children:[(0,e.jsx)(Kn,{n:S,color:p})," ",(0,e.jsx)("b",{children:S})," ",a("links")]}),(0,e.jsxs)("span",{className:"mc-v5-author",children:["\u{1F916} ",Ot(t.submittedBy)]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-card-del",title:a("delete"),onClick:R=>{R.stopPropagation(),window.confirm(a("deleteConfirm"))&&s&&s(t.path)},children:"\u{1F5D1}"})]})]})};function ri({t,tab:a,onReload:n,version:r}){let[s,m]=(0,o.useState)(null),[b,N]=(0,o.useState)(""),[g,C]=(0,o.useState)(null),[p,S]=(0,o.useState)(null),[k,R]=(0,o.useState)(null),[$,q]=(0,o.useState)(null),[D,U]=(0,o.useState)(null),[G,K]=(0,o.useState)(null),be=(0,o.useCallback)(async()=>{I("align");try{let d=await fetch(V+"/align").then(H=>H.json());d&&d.findings?K(d):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{I("")}},[t]),J=async()=>{if(window.confirm(t("alignFixConfirm"))){I("alignfix");try{let d=await fetch(V+"/setup-run",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(H=>H.json());d&&d.ok?(notify(t("alignFixed")),await be()):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{I("")}}},[A,O]=(0,o.useState)([]),[W,I]=(0,o.useState)(""),[Y,re]=(0,o.useState)(!1),he=(0,o.useCallback)(async()=>{if(!(!g||!g.merge||!g.merge.length)&&window.confirm(t("mergeAllConfirm"))){I("merge");try{let d={},H=xe=>d[xe]===void 0?xe:d[xe]=H(d[xe]),F=(xe,L)=>{d[H(xe)]=H(L)},ye=new Set;for(let xe of g.merge)ye.add(xe.a.path),ye.add(xe.b.path),F(xe.a.path,xe.b.path);let De={};for(let xe of ye){let L=H(xe);(De[L]=De[L]||[]).push(xe)}let ve=0;for(let xe of Object.values(De)){if(xe.length<2)continue;(await fetch(`${V}/merge?paths=${encodeURIComponent(xe.join(","))}`).then(le=>le.json())).ok&&ve++}await oe(),n&&n()}catch{}I("")}},[g,oe,n,t]);async function oe(){try{let d=await Promise.all([fetch(`${V}/stats`),fetch(`${V}/budget`),fetch(`${V}/capture-log`),fetch(`${V}/cards?status=all&limit=30&agent=${ia}`),fetch(`${V}/overview`),fetch(`${V}/ledger?days=7`)]),[H,F,ye,De,ve,xe]=await Promise.all(d.map(L=>L.json()));H&&H.ok&&m(H),F&&F.ok&&S(F),ye&&ye.ok&&R(ye),De&&De.ok&&O(De.cards||[]),ve&&ve.ok&&q({db:ve.db,backups:ve.backups,total:ve.total,version:ve.version,degraded:ve.degraded===!0}),U(xe&&xe.ok?xe:{ok:!1,error:xe&&xe.error||""}),N(!H||!H.ok?t("adminLoadFail"):"")}catch{N(t("adminLoadFail"))}}let _e=(0,o.useCallback)(async()=>{I("scan");try{let d=await fetch(`${V}/optimize`).then(H=>H.json());d.ok&&C(d)}catch{N(t("adminLoadFail"))}finally{I("")}},[t]),[P,Ie]=(0,o.useState)(null),y=(0,o.useCallback)(async()=>{I("refine");try{let d=await fetch(`${V}/refine-scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:8})}).then(H=>H.json());d&&d.ok?Ie(d):notify(d&&d.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{I("")}},[t]),Re=async(d,H)=>{if(!(H==="merge"&&!window.confirm(t("mergeConfirm")))){I("refineapply");try{let F=await fetch(`${V}/refine-apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({a:d.a.path,b:d.b.path,action:H,relation:d.relation})}).then(ye=>ye.json());F&&F.ok?(notify(t("refineApplied")),Ie(ye=>ye&&{...ye,findings:(ye.findings||[]).filter(De=>!(De.a.path===d.a.path&&De.b.path===d.b.path))}),await oe(),n&&n()):notify(F&&F.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{I("")}}},[ee,Z]=(0,o.useState)(null),Oe=(0,o.useCallback)(async()=>{I("junk");try{let d=await fetch(`${V}/refine-junk`).then(H=>H.json());d&&d.ok?Z(d.items||[]):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{I("")}},[t]),Ae=async d=>{if(d.length&&window.confirm(t("junkRecycleAllConfirm"))){I("junkpurge");try{let H=await fetch(`${V}/refine-junk-purge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:d})}).then(F=>F.json());H&&H.removed?(notify(t("junkDone")+"\uFF1A"+H.removed.length+(H.failed?.length?"\uFF08\u5931\u8D25 "+H.failed.length+"\uFF09":"")),Z(F=>F&&F.filter(ye=>!H.removed.includes(ye.path))),await oe(),n&&n()):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{I("")}}},[ne,M]=(0,o.useState)(null),z=(0,o.useCallback)(async()=>{I("goals");try{let d=await fetch(V+"/refine-goals",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:30})}).then(H=>H.json());d&&d.ok?M(d):notify(d&&d.error||t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{I("")}},[t]),v=async d=>{I("goalskeep");try{let H=await fetch(V+"/refine-goals-keep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:d.members.map(F=>F.path)})}).then(F=>F.json());H&&H.ok?(notify(t("goalDone")),M(F=>F&&{...F,clusters:(F.clusters||[]).filter(ye=>ye.goal!==d.goal)})):notify(t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{I("")}},X=async d=>{if(window.confirm(t("mergeConfirm"))){I("goalsmerge");try{let H=await fetch(V+"/merge?paths="+encodeURIComponent(d.members.map(F=>F.path).join(","))).then(F=>F.json());H&&H.ok?(notify(t("goalMerged")),M(F=>F&&{...F,clusters:(F.clusters||[]).filter(ye=>ye.goal!==d.goal)}),await oe(),n&&n()):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{I("")}}};(0,o.useEffect)(()=>{oe()},[r]);let se=async(d,H)=>{if(window.confirm(t("mergeConfirm")))try{(await fetch(`${V}/merge?paths=${encodeURIComponent(d+","+H)}`).then(ye=>ye.json())).ok&&(await oe(),n&&n())}catch{}},Ee=async d=>{if(window.confirm(t("deleteConfirm")))try{(await fetch(`${V}/delete?path=${encodeURIComponent(d)}`).then(F=>F.json())).ok&&(await oe(),n&&n())}catch{}},Pe=Wn,ce=({title:d,kind:H,updated:F,path:ye})=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:It.colors[H]||"#666"}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:Et(F)}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>Ee(ye),children:[t("delete")," \u2715"]})]});return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:ft}),(0,e.jsxs)("div",{style:{overflow:"auto"},children:[b&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",b]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:oe,children:["\u21BB ",t("retry")]})]}),a==="stats"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"SYSTEM STATUS"}),(0,e.jsx)("h1",{children:t("runtimeTitle")}),(0,e.jsx)("p",{children:t("runtimeSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:$?`${$.total||0} ${t("cardsUnit")}`:""}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>oe(),children:["\u21BB ",t("refresh")]})]}),(0,e.jsxs)("div",{className:"mc-v5-statusgrid",children:[(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F5C4}\uFE0F"}),(0,e.jsx)("b",{children:$?$.total||0:"\u2014"}),(0,e.jsx)("span",{children:t("dbTitle")}),(0,e.jsx)("small",{children:$?.db?.journalMode||$?.db?.journal_mode||"SQLite"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F4BE}"}),(0,e.jsx)("b",{children:$?.backups?.count??"\u2014"}),(0,e.jsx)("span",{children:t("backupTitle")}),(0,e.jsx)("small",{children:$?.backups?.newestAt?`${Math.max(0,Math.floor((Date.now()-Number($.backups.newestAt))/864e5))} \u5929\u524D`:"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u2728"}),(0,e.jsx)("b",{children:k?.available?k.health?.ok?"\u6B63\u5E38":"\u5F02\u5E38":"\u2014"}),(0,e.jsx)("span",{children:t("captureTitle")}),(0,e.jsx)("small",{children:k?.health?.lastAt?Et(new Date(k.health.lastAt).toISOString()):"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F3F7}\uFE0F"}),(0,e.jsx)("b",{children:$?.version||"\u2014"}),(0,e.jsx)("span",{children:t("versionTitle")}),(0,e.jsx)("small",{children:t("v5Local")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FA7A} ",t("healthTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("healthHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>oe(),children:["\u21BB ",t("refresh")]})]}),$?(()=>{let d=$.db||{},H=d.writable!==!1&&!d.corrupt,F=$.backups||{count:0,newestAt:0},ye=F.newestAt?Math.floor((Date.now()-Number(F.newestAt))/864e5):-1,De=F.count?ye>7?"warn":"ok":"bad",ve=k&&k.available?k.health:null,xe=ve?ve.ok?"ok":"warn":"none",L=G&&G.findings?G.onDisk&&G.residentServed===G.onDisk&&G.hostVersion===G.onDisk?"ok":"warn":"none",le={ok:["\u2705","#10b981"],warn:["\u26A0","#f59e0b"],bad:["\u2717","#ef4444"],none:["\u2022","inherit"]},Se=[{label:t("healthDb"),level:H?"ok":"bad",text:H?"journal="+(d.journalMode||"?")+(d.checkedAt?" \xB7 "+new Date(d.checkedAt).toLocaleString():""):(d.error||t("healthDbBad"))+" \u2192 dsh-memory doctor"},{label:t("healthBackups"),level:De,text:F.count?(ye<=0?t("healthBackupToday").replace("{n}",String(F.count)):t("healthBackupAge").replace("{n}",String(F.count)).replace("{d}",String(ye)))+(F.files&&F.files.length?" \xB7 "+F.files[F.files.length-1]:""):t("healthNoBackups")},{label:t("healthCapture"),level:xe,text:ve?ve.ok?t("healthCapOk"):t("healthCapFail")+"\uFF1A"+(ve.reason||""):t("healthNoRecords")},{label:t("healthVersion"),level:L,text:L==="none"?t("healthRunAlign"):t("vcOnDisk")+" v"+(G.onDisk||"?")+" \xB7 "+t("vcResident")+" v"+(G.residentServed||"?")+" \xB7 "+t("vcLoaded")+" v"+(G.hostVersion||"?"),action:L==="none"?{label:t("alignRun"),run:be}:null}];return(0,e.jsx)("div",{style:{marginTop:6},children:Se.map(fe=>(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontSize:12,padding:"3px 0",borderTop:"1px solid rgba(127,127,127,0.10)"},children:[(0,e.jsx)("span",{style:{width:14,flex:"0 0 auto",color:le[fe.level][1]},children:le[fe.level][0]}),(0,e.jsx)("b",{style:{minWidth:62,flex:"0 0 auto",opacity:.85},children:fe.label}),(0,e.jsx)("span",{style:{opacity:.82,wordBreak:"break-word"},children:fe.text}),fe.action&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{marginLeft:6,padding:"0 6px",fontSize:11},disabled:!!W,onClick:fe.action.run,children:fe.action.label})]},fe.label))})})():(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9FE} ",t("ledgerTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("ledgerHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>oe(),children:["\u21BB ",t("refresh")]})]}),D?D.ok===!1?(0,e.jsxs)("div",{style:{color:"#f59e0b",fontSize:12,padding:"8px 0",lineHeight:1.7},children:["\u26A0 ",/未知接口|404|not found/i.test(String(D.error||""))?t("ledgerNeedRestart"):D.error||t("adminLoadFail")]}):D.totals.recalls+D.totals.captures===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("ledgerNoData")}):(0,e.jsxs)("div",{style:{marginTop:8},children:[(0,e.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:8},children:[{k:t("ledgerRecalls"),v:String(D.totals.recalls),s:t("ledgerInjected")+" "+Number(D.totals.injectedChars||0).toLocaleString()+" "+t("ledgerChars")},{k:t("ledgerCaptures"),v:String(D.totals.captures),s:t("ledgerLlmCalls")+" "+D.totals.llmCalls+(D.totals.captureFail?" \xB7 \u2717 "+D.totals.captureFail:"")},{k:t("ledgerEstimate"),v:"\u2248 "+Number(D.totals.estTokens||0).toLocaleString(),s:t("ledgerEstimateHint")},{k:t("ledgerUseful"),v:D.feedback.rate==null?"\u2014":Math.round(D.feedback.rate*100)+"%",s:t("ledgerUsefulHint")}].map(d=>(0,e.jsxs)("div",{style:{border:"1px solid rgba(127,127,127,.16)",borderRadius:10,padding:"8px 10px"},children:[(0,e.jsx)("div",{style:{fontSize:11,opacity:.6},children:d.k}),(0,e.jsx)("div",{style:{fontSize:18,fontWeight:700,lineHeight:1.35},children:d.v}),(0,e.jsx)("div",{style:{fontSize:10.5,opacity:.55,lineHeight:1.5},children:d.s})]},d.k))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:8,lineHeight:1.7},children:t("ledgerFormula")})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F527} ",t("alignTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!W,onClick:be,children:t(W==="align"?"exporting":"alignRun")}),G&&G.counts&&G.counts.fix>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!W,onClick:J,children:t(W==="alignfix"?"exporting":"alignFix")}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("alignHint")})]}),G&&G.findings?(0,e.jsxs)("div",{style:{marginTop:6},children:[(0,e.jsxs)("div",{style:{fontSize:12,opacity:.75,marginBottom:4},children:[t("alignDisk")," v",G.onDisk||"?",G.residentServed?" \xB7 "+t("alignResident")+" v"+G.residentServed:"",G.hostVersion?" \xB7 "+t("alignHost")+" v"+G.hostVersion:""]}),(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:G.findings.map((d,H)=>(0,e.jsxs)("li",{style:{padding:"4px 2px",borderTop:H?"1px solid rgba(127,127,127,0.12)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:d.level==="fix"?"#ef4444":d.level==="warn"?"#f59e0b":"#10b981"},children:d.level==="fix"?"\u2717":d.level==="warn"?"\u26A0":"\u2713"})," ",(0,e.jsx)("span",{children:d.title}),d.detail?(0,e.jsx)("div",{style:{opacity:.75,marginLeft:14},children:d.detail}):null,d.command?(0,e.jsxs)("div",{style:{marginLeft:14,opacity:.9},children:["\u2192 ",(0,e.jsx)("code",{children:d.command})]}):null]},H))})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginTop:4},children:t("alignIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FAB5} ",t("captureLog")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("captureLogHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>oe(),children:["\u21BB ",t("refresh")]})]}),k?k.available===!1?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogUnavailable")}):(k.entries||[]).length===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogEmpty")}):(0,e.jsx)("div",{style:{maxHeight:260,overflow:"auto",marginTop:8},children:(0,e.jsx)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:(0,e.jsx)("tbody",{children:(k.entries||[]).map((d,H)=>{let F=Ro[d.action]||["\u2022","inherit"];return(0,e.jsxs)("tr",{style:{borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:Et(d.time?new Date(d.time).toISOString():"")}),(0,e.jsxs)("td",{style:{padding:"4px 6px",whiteSpace:"nowrap",color:F[1],fontWeight:600},children:[F[0]," ",d.action]}),(0,e.jsx)("td",{style:{padding:"4px 6px"},children:d.reason||""}),(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:d.preview||"",children:d.preview||""})]},H)})})})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:["\u{1F916} ",t("captureAgentCards"),"\uFF08",A.length,"\uFF09"]}),A.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:A.map(d=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:gt[d.kind]||gt.other}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.title}),d.status==="pending"&&(0,e.jsxs)("span",{className:"mc-status",style:{background:"#f59e0b"},children:["\u23F3 ",t("statusPending")]}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:Et(d.updated)})]},d.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noCards")})]}),s&&(0,e.jsxs)(e.Fragment,{children:[s.trend&&s.trend.length>0&&(()=>{let d=s.trend,H=Math.max(...d.map(ve=>ve.count),1),F=260,ye=50,De=F/d.length;return(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{fontSize:11,opacity:.6,marginBottom:4},children:["\u{1F4C8} ",t("trendLabel")]}),(0,e.jsx)("svg",{width:F,height:ye,style:{display:"block",width:"100%",height:50},children:d.map((ve,xe)=>{let L=Math.round(ve.count/H*(ye-4));return(0,e.jsx)("rect",{x:xe*De+1,y:ye-L,width:Math.max(De-2,2),height:L,rx:1.5,fill:ve.count>0?"var(--dsw-alias-accent, #3b82f6)":"var(--dsw-alias-border-l1, #e5e7eb)",opacity:ve.count>0?.85:.35},ve.date)})})]})})(),(0,e.jsxs)("div",{className:"mc-stats",children:[(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:s.total}),(0,e.jsx)("span",{children:t("total")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:s.today}),(0,e.jsx)("span",{children:t("todayAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:s.week}),(0,e.jsx)("span",{children:t("weekAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:s.tags}),(0,e.jsx)("span",{children:t("tags")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("byKind")}),(0,e.jsx)("div",{style:{display:"flex",gap:10,flexWrap:"wrap"},children:Pe.map(d=>(0,e.jsxs)("span",{style:{fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:It.colors[d]||"#666"}}),t(lt[d]),": ",s.byKind?.[d]||0]},d))})]}),p&&(p.budgetChars||p.recallLimit||p.embedding)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,fontSize:12},children:[(0,e.jsx)("b",{children:t("budgetLabel")}),"\uFF1A",t("budgetChars")," ",(0,e.jsx)("b",{children:p.budgetChars||8e4})," \xB7 ",t("recallLimitLabel")," ",(0,e.jsx)("b",{children:p.recallLimit||5})," \xB7 ",t("embeddingLabel")," ",p.embedding?"ON":"OFF"]}),(0,e.jsxs)("div",{className:"mc-card",children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("todayList"),"\uFF08",s.todayCards?.length||0,"\uFF09"]}),s.todayCards?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:s.todayCards.map(d=>(0,e.jsx)(ce,{title:d.title,kind:d.kind,updated:d.updated,path:d.path},d.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})]})]}),a==="optimize"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("organizeTitle")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!W,onClick:_e,children:W==="scan"?t("exporting"):"\u{1F50D} "+t("scanAndOrganize")}),g&&g.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!W,onClick:async()=>{if(window.confirm(t("oneClickOptimizeConfirm"))){I("oneclick");try{let d=JSON.stringify({cleanupStale:Y}),F=await(await fetch(`${V}/optimize-execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:d})).json();F&&F.ok?(notify(`${t("oneClickOptimizeDone")}\uFF1A${F.plan.merged} ${t("optimizedMerged")}${Y?` \xB7 ${F.plan.staleDeleted} ${t("optimizedStaleDeleted")}`:""}`),await oe(),n&&n(),C(null)):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{I("")}}},children:W==="oneclick"?t("exporting"):"\u26A1 "+t("oneClickOptimize")}),g&&g.merge?.length>0&&(0,e.jsxs)("label",{style:{fontSize:11,opacity:.7,display:"flex",alignItems:"center",gap:4},children:[(0,e.jsx)("input",{type:"checkbox",checked:Y,onChange:d=>re(d.target.checked)}),t("oneClickAlsoStale")]})]}),!g&&(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:10},children:t("scanHint")}),g&&(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("mergePairs")}),(0,e.jsx)("div",{className:"spacer",style:{flex:1}}),g.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!W,onClick:he,children:t(W==="merge"?"exporting":"batchMerge")})]}),(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("mergePairs")}),g.merge?.length?(0,e.jsx)("ul",{style:{margin:"0 0 12px",padding:0,listStyle:"none"},children:g.merge.map((d,H)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsxs)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[d.a.title," \u21C4 ",d.b.title]}),(0,e.jsxs)("span",{style:{opacity:.6},children:[Math.round(d.sim*100),"%"]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>se(d.a.path,d.b.path),children:t("mergeNow")})]},H))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:12},children:t("noOptimize")}),(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("staleCards"),"\uFF08",g.stale?.length||0,"\uFF09"]}),g.stale?.length>0&&(0,e.jsx)("div",{style:{marginBottom:6},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!W,onClick:async()=>{if(!window.confirm(t("deleteConfirm")))return;I("clean");let d=0;for(let H of g.stale)try{await fetch(`${V}/delete?path=${encodeURIComponent(H.path)}`),d++}catch{}I(""),notify(`${d} ${t("deletedStale")}`),await oe(),n&&n()},children:t("cleanStale")})}),g.stale?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:g.stale.map(d=>(0,e.jsx)(ce,{title:d.title,kind:"other",updated:d.updated,path:d.path},d.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9ED} ",t("refineTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!W,onClick:y,children:t(W==="refine"?"exporting":"refineScan")}),(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("refineHint")})]}),P?.findings?.length?P.findings.map((d,H)=>(0,e.jsxs)("div",{style:{borderTop:H?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:3},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:d.relation==="conflict"?"#ef4444":d.relation==="duplicate"?"#f59e0b":"#10b981"},children:t("refineRel_"+d.relation)}),(0,e.jsxs)("span",{style:{opacity:.55},children:[" \xB7 sim ",d.sim," \xB7 ",d.useModel||""]}),d.conflict?(0,e.jsx)("span",{style:{marginLeft:6},children:d.conflict}):null]}),(0,e.jsxs)("div",{style:{fontSize:12,opacity:.85,marginBottom:5},children:["A\uFF1A",d.a.title,(0,e.jsx)("br",{}),"B\uFF1A",d.b.title]}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!W,onClick:()=>Re(d,"keepA"),children:t("refineKeepA")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!W,onClick:()=>Re(d,"keepB"),children:t("refineKeepB")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!W,onClick:()=>Re(d,"keepBoth"),children:t("refineKeepBoth")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!W,onClick:()=>Re(d,"merge"),children:t("refineMerge")})]})]},H)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(P?"refineNone":"refineIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9F9} ",t("junkTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!W,onClick:Oe,children:t(W==="junk"?"exporting":"junkScan")}),ee?.length?(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!W,onClick:()=>Ae(ee.map(d=>d.path)),children:t(W==="junkpurge"?"exporting":"junkRecycleAll")}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("junkHint")})]}),ee?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:ee.map((d,H)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 2px",borderTop:H?"1px solid rgba(127,127,127,0.14)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:d.reasons.join("\uFF1B"),children:d.title||d.path}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:d.reasons[0]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!W,onClick:()=>Ae([d.path]),children:t("junkRecycle")})]},H))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(ee?"junkNone":"junkIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F3AF} ",t("goalTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!W,onClick:z,children:t(W==="goals"?"exporting":"goalScan")}),ne?(0,e.jsxs)("span",{style:{opacity:.6,fontSize:11},children:[t("goalStats"),"\uFF1A",ne.cached," / ",ne.calls]}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("goalHint")})]}),ne?.clusters?.length?ne.clusters.map((d,H)=>(0,e.jsxs)("div",{style:{borderTop:H?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:4},children:[(0,e.jsx)("b",{children:d.goal})," ",(0,e.jsxs)("span",{style:{opacity:.55},children:["\xB7 ",d.members.length," ",t("goalCards")]})]}),(0,e.jsx)("ul",{style:{margin:"0 0 5px",padding:"0 0 0 16px",fontSize:12,opacity:.85},children:d.members.map((F,ye)=>(0,e.jsx)("li",{children:F.title},ye))}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!W,onClick:()=>v(d),children:t("goalKeep")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!W,onClick:()=>X(d),children:t("goalMerge")})]})]},H)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(ne?"goalNone":"goalIdle")})]})]})]})]})}var ja=[{key:"decision",label:"tplDecision",kind:"knowledge",tagKey:"tplDecisionTags",bodyKey:"tplDecisionBody"},{key:"bug",label:"tplBug",kind:"mistake",tagKey:"tplBugTags",bodyKey:"tplBugBody"},{key:"meeting",label:"tplMeeting",kind:"content",tagKey:"tplMeetingTags",bodyKey:"tplMeetingBody"},{key:"weekly",label:"tplWeekly",kind:"content",tagKey:"tplWeeklyTags",bodyKey:"tplWeeklyBody"}];function si({t,newCard:a,setNewCard:n,onCreated:r}){if(!a)return null;let s=ja.find(S=>S.key===a.template),m=a.body||(s?t(s.bodyKey):""),b=a.kind||(s?s.kind:"knowledge"),N=a.tags||(s?t(s.tagKey):""),g=a._creating,C=S=>{let k=ja.find(R=>R.key===S);n(R=>({...R,template:S,kind:k?k.kind:R.kind,body:k?t(k.bodyKey):R.body,tags:k?t(k.tagKey):R.tags}))},p=async()=>{if(!(!a.title&&!m)){n(S=>({...S,_creating:!0}));try{(await fetch(`${V}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a.title||t("untitled"),kind:b,tags:N.split(",").map(k=>k.trim()).filter(Boolean),body:m,source:"manual"})}).then(k=>k.json())).ok?(n(null),r&&r()):n(k=>({...k,_creating:!1}))}catch{n(k=>({...k,_creating:!1}))}}};return(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>n(null),children:[(0,e.jsx)("style",{children:ft}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:600,width:"92vw",maxHeight:"85vh"},onClick:S=>S.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:t("newCard")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>n(null),children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10,overflow:"auto"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[ja.map(S=>(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===S.key?" me-on":""}`,onClick:()=>C(S.key),children:t(S.label)},S.key)),(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===""?" me-on":""}`,onClick:()=>n(S=>({...S,template:"",body:"",tags:"",kind:"knowledge"})),children:t("tplBlank")})]}),(0,e.jsx)("select",{className:"mc-btn",value:b,onChange:S=>n(k=>({...k,kind:S.target.value})),style:{maxWidth:180,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:Wn.map(S=>(0,e.jsx)("option",{value:S,style:{background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:t(lt[S])||S},S))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("cardTitle"),value:a.title||"",onChange:S=>n(k=>({...k,title:S.target.value}))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("tagsHint"),value:N,onChange:S=>n(k=>({...k,tags:S.target.value}))}),(0,e.jsx)("textarea",{className:"mc-btn",placeholder:t("cardBody"),value:m,onChange:S=>n(k=>({...k,body:S.target.value})),style:{minHeight:180,resize:"vertical",fontFamily:"inherit"}}),(0,e.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:g,onClick:p,children:t(g?"exporting":"createCard")})})]})]})]})}async function qa(t){let a=String(t||"");if(!a)return!1;try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(a),!0}catch{}try{let n=document.createElement("textarea");n.value=a,n.setAttribute("readonly",""),n.style.position="fixed",n.style.left="-9999px",n.style.top="0",document.body.appendChild(n),n.focus(),n.select();let r=!!(document.execCommand&&document.execCommand("copy"));return document.body.removeChild(n),r}catch{return!1}}function li({t,onClose:a}){let[n,r]=(0,o.useState)(""),[s,m]=(0,o.useState)(""),[b,N]=(0,o.useState)(""),[g,C]=(0,o.useState)(!0),[p,S]=(0,o.useState)(!1),[k,R]=(0,o.useState)(""),[$,q]=(0,o.useState)(""),D=(0,o.useRef)(null),U=(0,o.useRef)(null),G=()=>{let Y=D.current;if(Y)try{Y.focus(),Y.select()}catch{}},K=Y=>{R(Y),U.current&&clearTimeout(U.current),U.current=setTimeout(()=>R(""),2400)};(0,o.useEffect)(()=>{let Y=!0;return fetch(V+"/diagnostics").then(re=>re.json()).then(re=>{Y&&(re&&re.ok?(m(String(re.diagnostics||"")),N(String(re.version||""))):S(!0))}).catch(()=>{Y&&S(!0)}).finally(()=>{Y&&C(!1)}),()=>{Y=!1}},[]),(0,o.useEffect)(()=>{let Y=re=>{re.key==="Escape"&&a()};return window.addEventListener("keydown",Y),()=>{window.removeEventListener("keydown",Y),U.current&&clearTimeout(U.current)}},[a]);let be=(()=>{try{return String(navigator.language||"").toLowerCase().startsWith("en")?"en":"zh"}catch{return"zh"}})(),J=()=>{let Y=n.trim().split(`
1035
+ `)[0]||"",re=un({title:"[Bug] "+(Y.slice(0,60)||"memory-eternal \u95EE\u9898"),body:gn({description:n,diagnostics:s,version:b})});try{window.open(re,"_blank","noopener")}catch{K(t("fbCopyFail"))}},A=async()=>{await qa(s)?(q(""),K(t("fbCopiedDiag"))):(q(s),K(t("fbCopyManual")))},O=async()=>{let Y=fn({lang:be,description:n,diagnostics:s});await qa(Y)?(q(""),K(t("fbCopiedPrompt"))):(q(Y),K(t("fbCopyManual")))},W={width:"100%",resize:"vertical",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13},I={margin:0,maxHeight:170,overflow:"auto",fontSize:11.5,lineHeight:1.55,padding:"8px 10px",borderRadius:10,background:"var(--dsw-alias-bg-layer-1, rgba(127,127,127,0.08))",whiteSpace:"pre-wrap",wordBreak:"break-word",overflowX:"hidden"};return(0,e.jsxs)("div",{className:"me-overlay",onClick:a,children:[(0,e.jsx)("style",{children:ft}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:720},onClick:Y=>Y.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F41E} ",t("fbTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10},children:[(0,e.jsx)("div",{style:{fontSize:12,opacity:.72,lineHeight:1.6},children:t("fbWhy")}),(0,e.jsx)("textarea",{value:n,onChange:Y=>r(Y.target.value),placeholder:t("fbDesc"),rows:5,style:W}),(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("fbDiag")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:A,disabled:!s,children:t("fbCopyDiag")})]}),(0,e.jsx)("pre",{style:I,children:g?t("fbLoading"):p?t("fbDiagFail"):s})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>{if(!n.trim()){K(t("fbNeedDesc"));return}J()},style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:["\u{1F680} ",t("fbOpenIssue")]}),(0,e.jsx)("span",{style:{opacity:.5,fontSize:12},children:t("fbOr")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:O,children:["\u{1F916} ",t("fbCopyPrompt")]})]}),k&&(0,e.jsx)("div",{style:{fontSize:12,color:"var(--dsw-alias-brand-primary, #3b82f6)"},children:k}),$&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsxs)("b",{style:{fontSize:12,color:"#b45309"},children:["\u26A0 ",t("fbCopyFail")]}),(0,e.jsx)("span",{style:{fontSize:11.5,opacity:.75},children:t("fbCopyManual")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:G,children:t("fbSelectAll")})]}),(0,e.jsx)("textarea",{ref:D,readOnly:!0,value:$,rows:7,style:W})]})]})]})]})}function ci({t,tab:a,onTab:n,onClose:r,onFeedback:s,onReplay:m}){let[b,N]=(0,o.useState)(null);(0,o.useEffect)(()=>{if(!b)return;let S=k=>{k.key==="Escape"&&N(null)};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[b]);let g=[{id:"group",label:t("supportGroup")},{id:"sponsor",label:t("supportSponsor")},{id:"legacy",label:t("supportLegacy")}],C="https://github.com/EternalNight996/memory-eternal/blob/main/README.md",p=(S,k)=>(0,e.jsxs)("figure",{children:[(0,e.jsx)("img",{src:S,alt:k,loading:"lazy",title:t("clickToZoom"),onClick:R=>N(R.currentTarget.currentSrc||S),onError:R=>{let $=R.currentTarget;$.dataset.fb||($.dataset.fb="1",$.src="https://raw.githubusercontent.com/EternalNight996/memory-eternal/main/assets/support/"+String(S).split("/").pop())}}),(0,e.jsx)("figcaption",{children:k})]});return(0,e.jsxs)("div",{className:"me-overlay",onClick:r,children:[(0,e.jsx)("style",{children:ft}),(0,e.jsxs)("div",{className:"me-dialog me-support",onClick:S=>S.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F4AC} ",t("supportTitle")]}),(0,e.jsx)("div",{className:"me-head-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:r,children:t("close")})})]}),(0,e.jsx)("div",{className:"me-support-tabs",children:g.map(S=>(0,e.jsx)("button",{type:"button",className:`me-support-tab${a===S.id?" active":""}`,onClick:()=>n(S.id),children:S.label},S.id))}),(0,e.jsxs)("div",{className:"me-support-body",children:[a==="group"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportGroupHint")}),(0,e.jsxs)("div",{className:"me-support-qr",children:[p("support/group-qr.jpg",t("supportGroupQQ")),p("support/group-wechat.jpg",t("supportGroupWechat"))]}),(0,e.jsx)("p",{className:"me-support-note",style:{marginTop:12},children:(0,e.jsxs)("a",{className:"me-support-link",href:C,target:"_blank",rel:"noreferrer",children:[t("supportReadme")," \u2197"]})})]}),a==="sponsor"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportSponsorHint")}),(0,e.jsxs)("div",{className:"me-support-qr",children:[p("support/wechat-pay.jpg","\u5FAE\u4FE1\u6536\u6B3E\u7801"),p("support/wechat-reward.jpg","\u5FAE\u4FE1\u8D5E\u8D4F\u7801")]}),(0,e.jsxs)("p",{className:"me-support-note",style:{marginTop:12},children:["\u6253\u8D4F\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\uFF1B\u63D2\u4EF6\u672C\u4F53\u59CB\u7EC8\u5F00\u6E90\u514D\u8D39\uFF08MIT\uFF09\u3002",(0,e.jsx)("br",{}),(0,e.jsx)("a",{className:"me-support-link",href:"https://github.com/EternalNight996/memory-eternal/blob/main/SPONSOR.md",target:"_blank",rel:"noreferrer",children:"SPONSOR.md \u2197"})]})]}),a==="legacy"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{style:{margin:"0 0 8px",fontSize:14},children:t("supportLegacyTitle")}),(0,e.jsx)("p",{className:"me-support-note",children:t("supportLegacyBody")}),(0,e.jsxs)("div",{className:"me-support-actions",children:[(0,e.jsxs)("a",{className:"mc-btn",href:C,target:"_blank",rel:"noreferrer",children:["\u{1F4D6} ",t("supportReadme")," \u2197"]}),(0,e.jsxs)("a",{className:"mc-btn",href:"https://github.com/EternalNight996/memory-eternal/releases",target:"_blank",rel:"noreferrer",children:["\u{1F3F7} ",t("supportReleases")," \u2197"]})]})]})]}),(0,e.jsxs)("div",{className:"me-support-actions",style:{padding:"0 18px 16px",marginTop:0},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:s,children:["\u{1F41E} ",t("supportFeedback")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:m,children:["\u2728 ",t("supportReplay")]})]})]}),b&&(0,e.jsxs)("div",{className:"me-lightbox",role:"dialog","aria-modal":"true","aria-label":t("close"),onClick:S=>{S.stopPropagation(),N(null)},children:[(0,e.jsx)("button",{type:"button",className:"me-lightbox-close",onClick:S=>{S.stopPropagation(),N(null)},"aria-label":t("close"),children:"\u2715"}),(0,e.jsx)("img",{src:b,alt:"",onClick:S=>S.stopPropagation()})]})]})}function di({t,onDone:a}){let[n,r]=(0,o.useState)(0),s="https://github.com/EternalNight996/memory-eternal",m=[{title:t("onboardStep0Title"),body:t("onboardStep0Body")},{title:t("onboardStep1Title"),body:t("onboardStep1Body")},{title:t("onboardStep2Title"),body:t("onboardStep2Body")},{title:t("onboardStep3Title"),body:t("onboardStep3Body")}],b=n===m.length-1;return(0,o.useEffect)(()=>{let N=g=>{g.key==="Escape"&&a()};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[a]),(0,e.jsxs)("div",{className:"me-overlay",style:{zIndex:1006},children:[(0,e.jsx)("style",{children:ft}),(0,e.jsxs)("div",{className:"me-dialog me-guide",children:[(0,e.jsxs)("div",{className:"me-guide-head",children:[(0,e.jsxs)("b",{children:["\u2728 ",t("onboardTitle")]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.55},children:t("onboardSub")})]}),(0,e.jsx)("div",{className:"me-guide-dots",children:m.map((N,g)=>(0,e.jsx)("span",{className:`me-guide-dot${g<=n?" on":""}`},g))}),(0,e.jsxs)("div",{className:"me-guide-body",children:[(0,e.jsx)("h3",{children:m[n].title}),(0,e.jsx)("p",{children:m[n].body}),n===0&&(0,e.jsxs)("div",{className:"me-guide-github",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>Oa(s),children:["\u2605 ",t("onboardStar")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Oa(s+"/fork"),children:["\u2442 ",t("onboardFork")]}),(0,e.jsx)("span",{className:"me-guide-github-hint",children:t("onboardStarHint")})]}),n===1&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsx)("span",{children:"\u81EA\u52A8\u6C89\u6DC0"}),(0,e.jsx)("span",{children:"\u5148\u5BA1\u540E\u5165"}),(0,e.jsx)("span",{children:"\u53EA\u53EC\u56DE\u76F8\u5173\u5C0F\u5757"})]}),n===2&&(0,e.jsxs)("div",{className:"me-guide-like",children:[(0,e.jsx)("span",{className:"me-guide-thumb",children:"\u{1F44D}"})," \u6709\u7528"]}),n===3&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsxs)("span",{children:["\u{1F4AC} ",t("supportGroup")]}),(0,e.jsxs)("span",{children:["\u2615 ",t("supportSponsor")]}),(0,e.jsxs)("span",{children:["\u{1F9E9} ",t("supportLegacy")]}),(0,e.jsxs)("span",{children:["\u{1F41E} ",t("supportFeedback")]})]})]}),(0,e.jsxs)("div",{className:"me-guide-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("onboardSkip")}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{className:"me-guide-tip",children:t("onboardTip")}),n>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>r(N=>N-1),children:t("onboardBack")}),b?(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:a,children:t("onboardStart")}):(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:()=>r(N=>N+1),children:t(n===0?"onboardStarred":"onboardNext")})]})]})]})}function pi({t,card:a,query:n,onClose:r,onDelete:s,onFeedback:m,onNavigate:b,onTagClick:N,allCards:g,onOpenRelated:C,onKindChange:p,onSaved:S}){let[k,R]=(0,o.useState)(0),[$,q]=(0,o.useState)(""),[D,U]=(0,o.useState)(()=>{try{let L=localStorage.getItem("me-read-width");return["narrow","mid","wide"].includes(L)?L:"mid"}catch{return"mid"}}),G={narrow:720,mid:900,wide:1180};(0,o.useEffect)(()=>{let L=le=>{if(le.key==="Escape"){r();return}let Se=String(le.target&&le.target.tagName||"").toLowerCase();Se==="input"||Se==="textarea"||Se==="select"||le.target&&le.target.isContentEditable||(le.key==="j"&&b?(le.preventDefault(),b(1)):le.key==="k"&&b&&(le.preventDefault(),b(-1)))};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[r,b]);let K=async(L,le)=>{let Se=await qa(String(L||""));q(Se?t("copied")+" \xB7 "+le:t("copyFail")),setTimeout(()=>q(""),1500)},{meta:be,body:J}=(0,o.useMemo)(()=>pa(a.text||""),[a.text]),A=L=>{let le=be.find(([Se])=>String(Se).toLowerCase()===L);return le?le[1]:""},O=sn(A("tags")),W=a.kind||A("kind")||"knowledge",I=String(a.status||A("status")||"approved").toLowerCase(),Y=gt[W]||"#6B7280",re=(J||"").length>460,he=(0,o.useMemo)(()=>Ya(J,a.title),[J,a.title]),oe=(0,o.useMemo)(()=>{let L=Va(a);if(L)return L;let Se=(he.split(/\r?\n/).map(fe=>fe.trim()).find(fe=>fe&&!/^#{1,2}\s/.test(fe))||"").replace(/[#>*_`]/g,"").replace(/\s+/g," ").trim();return Se.length>150?Se.slice(0,148)+"\u2026":Se},[a,he]),_e=(0,o.useMemo)(()=>oi(he),[he]),P=(0,o.useMemo)(()=>{let L=new Set(O);return(g||[]).filter(le=>le.path!==a.path&&(le.tags||[]).some(Se=>L.has(Se))).slice(0,3)},[g,a.path,O.join("|")]),Ie=()=>{M(String(a.title||"")),v((Array.isArray(O)?O:[]).join(", ")),se(String(J||"")),d(""),Ae(!0)},y=()=>{Ae(!1),d("")},Re=async()=>{let L=String(ne||"").trim(),le=String(X||"").trim();if(!L){d(t("editTitleEmpty"));return}if(!le){d(t("editBodyEmpty"));return}let Se=String(z||"").split(/[,,\n]+/).map(fe=>fe.trim()).filter(Boolean);Pe(!0),d("");try{let fe=await fetch(`${V}/card/update`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:a.path,title:L,tags:Se,body:le})}).then(et=>et.json());if(!fe||!fe.ok){d(fe&&fe.error||t("editFail"));return}Ae(!1),S&&await S({path:a.path,status:I,title:L})}catch(fe){d(String(fe&&fe.message||fe))}finally{Pe(!1)}},[ee,Z]=(0,o.useState)(!0),[Oe,Ae]=(0,o.useState)(!1),[ne,M]=(0,o.useState)(""),[z,v]=(0,o.useState)(""),[X,se]=(0,o.useState)(""),[Ee,Pe]=(0,o.useState)(!1),[ce,d]=(0,o.useState)(""),H=(0,o.useRef)(null),[F,ye]=(0,o.useState)(""),De=L=>{let le=H.current;if(!le)return;let Se=document.getElementById(L);if(!Se||!le.contains(Se))return;let fe=Se.getBoundingClientRect().top-le.getBoundingClientRect().top+le.scrollTop-12;le.scrollTo({top:Math.max(0,fe),behavior:"smooth"})},ve=L=>{if(!ee){Z(!0),setTimeout(()=>De(L),80);return}De(L)},xe=L=>{let le=L.currentTarget,Se=le.scrollHeight-le.clientHeight;R(Se<=0?100:Math.min(100,Math.max(0,le.scrollTop/Se*100)));let fe=le.querySelectorAll(".md-doc .md-h"),et="",bt=le.getBoundingClientRect().top+28;for(let He of fe)if(He.getBoundingClientRect().top<=bt)et=He.id;else break;ye(et)};return(0,e.jsxs)("div",{className:"me-overlay",onClick:r,children:[(0,e.jsx)("style",{children:ft}),(0,e.jsxs)("div",{className:"me-dialog me-reader-dialog",onClick:L=>L.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{title:a.title,children:[(0,e.jsx)("span",{style:{marginRight:6,flex:"none"},children:Wt[W]||"\u{1F4CE}"}),a.title]}),(0,e.jsxs)("div",{className:"me-head-actions",children:[$&&(0,e.jsx)("span",{style:{fontSize:11.5,color:"#10b981",whiteSpace:"nowrap"},children:$}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyBody"),onClick:()=>K(J,t("copyBody")),children:["\u{1F4CB} ",t("copyBody")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyPath"),onClick:()=>K(a.path,t("copyPath")),children:["\u{1F517} ",t("copyPath")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",title:t("editCard"),onClick:Oe?y:Ie,children:Oe?"\u2716 "+t("editCancel"):"\u270F\uFE0F "+t("editCard")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("readWidth"),onClick:()=>{let L=["narrow","mid","wide"],le=L[(L.indexOf(D)+1)%L.length];U(le);try{localStorage.setItem("me-read-width",le)}catch{}},children:[t("readWidth")," \xB7 ",t(D==="narrow"?"widthNarrow":D==="wide"?"widthWide":"widthMid")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>m&&m(!0),children:["\u{1F44D} ",t("fbUseful")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>m&&m(!1),children:["\u{1F44E} ",t("fbIrr")]}),re&&(0,e.jsx)("button",{type:"button",className:"mc-btn","aria-expanded":ee,onClick:()=>Z(L=>!L),children:t(ee?"collapse":"expand")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{window.confirm(t("deleteConfirm"))&&s&&s(a.path)},children:t("delete")}),p&&I==="approved"&&(W==="core"?(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>p(a.path,"knowledge"),children:t("unsetCore")}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>p(a.path,"core"),children:["\u2B50 ",t("setCore")]})),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:r,children:t("close")})]})]}),p&&(0,e.jsxs)("div",{className:"me-core-banner"+(W==="core"?" on":""),children:[(0,e.jsxs)("div",{className:"me-core-banner-k",children:["\u2B50 ",t("kindCore")]}),(0,e.jsx)("div",{className:"me-core-banner-desc",children:t(W==="core"?"coreActiveHint":"coreInactiveHint")}),I==="approved"?(0,e.jsx)("button",{type:"button",className:"mc-btn me-core-btn",onClick:()=>p(a.path,W==="core"?"knowledge":"core"),children:W==="core"?t("unsetCore"):"\u2B50 "+t("setCore")}):(0,e.jsx)("span",{className:"me-core-banner-desc",style:{flex:"none",opacity:.6},children:t("coreNeedApproval")})]}),(0,e.jsxs)("div",{className:"md-meta",children:[(0,e.jsxs)("span",{className:"md-chip md-chip-kind",style:{color:Y,borderColor:Y+"59",background:Y+"1a"},children:[Wt[W]||"\u{1F4CE}"," ",t(lt[W]||"kindKnowledge")]}),(0,e.jsxs)("span",{className:"md-chip "+(I==="approved"?"md-chip-st-ok":I==="pending"?"md-chip-st-warn":"md-chip-st-bad"),children:[I==="approved"?"\u2705":I==="pending"?"\u23F3":"\u26D4"," ",t(I==="approved"?"statusApproved":I==="pending"?"statusPending":"statusRejected")]}),(Array.isArray(O)?O:[]).slice(0,8).map(L=>(0,e.jsxs)("button",{type:"button",className:"md-chip md-chip-tag mc-tag-click",title:L,onClick:()=>N&&N(L),children:["\u{1F3F7} ",L]},L)),!!A("updated")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F552} ",t("updated")," ",Et(A("updated"))]}),!!A("source")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F4E5} ",A("source")]})]}),(0,e.jsx)("div",{className:"me-read-progress","aria-hidden":"true",children:(0,e.jsx)("i",{style:{width:k+"%"}})}),(0,e.jsxs)("div",{className:"me-reader-body",children:[(0,e.jsxs)("div",{className:"me-dialog-body me-reader-main",style:{maxWidth:G[D],margin:"0 auto",width:"100%",boxSizing:"border-box",...ee?{}:{maxHeight:300,overflow:"hidden"}},ref:H,onScroll:xe,onClick:ee?void 0:L=>{L.stopPropagation(),Z(!0)},children:[!Oe&&!!oe&&(0,e.jsxs)("div",{className:"me-reader-callout",children:[(0,e.jsx)("span",{className:"me-reader-callout-k",children:t(Gn(a))}),(0,e.jsx)("p",{children:oe})]}),Oe?(0,e.jsxs)("div",{className:"me-edit-form",style:{display:"flex",flexDirection:"column",gap:8,padding:"2px 0 14px"},children:[(0,e.jsx)("div",{style:{fontSize:11.5,opacity:.62,lineHeight:1.6},children:t("editHint")}),(0,e.jsx)("label",{style:{fontSize:12,fontWeight:600,opacity:.8},htmlFor:"me-edit-title",children:t("editTitle")}),(0,e.jsx)("input",{id:"me-edit-title",value:ne,onChange:L=>M(L.target.value),maxLength:200,style:{width:"100%",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13,boxSizing:"border-box"}}),(0,e.jsx)("label",{style:{fontSize:12,fontWeight:600,opacity:.8},htmlFor:"me-edit-tags",children:t("editTags")}),(0,e.jsx)("input",{id:"me-edit-tags",value:z,onChange:L=>v(L.target.value),placeholder:t("editTagsHint"),style:{width:"100%",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13,boxSizing:"border-box"}}),(0,e.jsx)("label",{style:{fontSize:12,fontWeight:600,opacity:.8},htmlFor:"me-edit-body",children:t("editBody")}),(0,e.jsx)("textarea",{id:"me-edit-body",value:X,onChange:L=>se(L.target.value),spellCheck:!1,rows:18,style:{width:"100%",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13,boxSizing:"border-box",resize:"vertical",minHeight:260,lineHeight:1.7,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"}}),ce&&(0,e.jsx)("div",{style:{color:"#f87171",fontSize:12},children:ce}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",alignItems:"center"},children:[(0,e.jsx)("span",{style:{marginRight:"auto",fontSize:11.5,opacity:.55},children:a.path}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:y,disabled:Ee,children:t("editCancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Re,disabled:Ee,style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:t(Ee?"editSaving":"editSave")})]})]}):(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:ta(he)}})]}),(0,e.jsxs)("aside",{className:"me-reader-side",children:[_e.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("contents")}),(0,e.jsx)("div",{className:"me-reader-toc",children:_e.map((L,le)=>(0,e.jsxs)("button",{type:"button",className:`lv${L.level}${F===L.id?" active":""}`,onClick:()=>ve(L.id),children:[(0,e.jsx)("span",{children:String(le+1).padStart(2,"0")}),L.text]},L.id))})]}),(0,e.jsx)("div",{className:"side-label",children:t("source")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:A("source")||a.submittedBy||"\u2014"}),(0,e.jsx)("div",{className:"side-label",children:t("updated")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:Et(A("updated")||a.updated)}),(0,e.jsx)("div",{className:"side-label",children:t("file")}),(0,e.jsx)("div",{className:"me-reader-side-val mono",children:a.path}),O.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("tags")}),(0,e.jsx)("div",{className:"me-reader-tags",children:O.slice(0,8).map(L=>(0,e.jsxs)("button",{type:"button",className:"mc-chip",onClick:()=>N&&N(L),children:["#",L]},L))})]}),P.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("related")}),(0,e.jsx)("div",{className:"me-reader-related",children:P.map(L=>(0,e.jsxs)("button",{type:"button",onClick:()=>C&&C(L),children:[(0,e.jsx)("span",{children:Wt[L.kind]||"\u{1F4CE}"}),(0,e.jsx)("b",{children:L.title})]},L.path))})]})]})]}),!ee&&(0,e.jsxs)("div",{className:"md-collapsed-hint",onClick:L=>{L.stopPropagation(),Z(!0)},children:[t("expand")," \u2304"]})]})]})}function mi({t,onOpen:a,all:n,onAllChange:r,onMutate:s,active:m,visible:b}){let[N,g]=(0,o.useState)([]),[C,p]=(0,o.useState)(null),[S,k]=(0,o.useState)(null),[R,$]=(0,o.useState)(!1),q=(0,o.useRef)(0),D=(0,o.useRef)(null);D.current||(D.current=Tn(96));let U=(0,o.useRef)(0),G=(0,o.useRef)(0),K=(0,o.useRef)(N);K.current=N;let be=(0,o.useRef)(n),J=(0,o.useRef)({requests:0,cacheHits:0,errors:0,timeouts:0,lastMs:0,lastBytes:0}),A=(0,o.useCallback)(async(y,Re={})=>{let ee=Array.isArray(y)?y.filter(Boolean):[],Z=(n?"all|":"")+Ut(ee);if(!Re.force){let z=D.current.get(Z);if(z)return J.current.cacheHits+=1,p(z),g(ee),k(null),$(!1),z}let Oe=++U.current;$(!0),k(null);let Ae=new AbortController,ne=setTimeout(()=>{try{Ae.abort()}catch{}},1600),M=performance.now();J.current.requests+=1;try{let z=await fetch(kn(V,ee,{all:n}),{signal:Ae.signal}),v=await z.json().catch(()=>null);if(Oe!==U.current)return null;if(!z.ok||!v||!v.ok)throw new Error(v&&v.error||"HTTP "+z.status);let X=Dn(v);if(!X.ok)try{console.warn("[memory-eternal] \u5206\u5C42\u54CD\u5E94\u8D8A\u754C\uFF1A"+X.problems.join("\uFF1B"))}catch{}return D.current.set(Z,v),J.current.lastMs=Math.round(performance.now()-M),J.current.lastBytes=X.bytes,G.current||(G.current=Math.round(performance.now())),p(v),g(ee),k(null),v}catch(z){if(Oe!==U.current)return null;let v=Mn(z,{timeoutMs:1600,elapsedMs:performance.now()-M});v.timeout&&(J.current.timeouts+=1),J.current.errors+=1;try{console.warn("[memory-eternal] \u5C42\u7EA7\u52A0\u8F7D\u5931\u8D25 @ "+Z+"\uFF1A"+v.message)}catch{}return k({...v,target:Ut(ee),segments:ee.slice()}),null}finally{clearTimeout(ne),Oe===U.current&&$(!1)}},[n]);(0,o.useEffect)(()=>{be.current!==n&&(be.current=n,D.current.clear(),m&&A([],{force:!0}))},[n,m,A]),(0,o.useEffect)(()=>{!m||C||R||A([])},[m,C,R,A]),(0,o.useEffect)(()=>{b&&C&&q.current++},[b,C]);let O=(0,o.useCallback)(y=>{let Re=Array.isArray(y)?y:wn(y&&y.path!==void 0?y.path:y);Ut(Re)!==Ut(K.current)&&A(Re)},[A]),W=(0,o.useCallback)(y=>{y&&A(K.current.concat(String(y)))},[A]),I=(0,o.useCallback)(()=>{D.current.clear();let y=S&&Array.isArray(S.segments)?S.segments:K.current;A(y,{force:!0})},[A,S]),Y=(0,o.useCallback)(async()=>(D.current.clear(),A(K.current,{force:!0})),[A]),re=(0,o.useCallback)(async y=>{try{let ee=await(await fetch(`${V}/delete?path=${encodeURIComponent(y)}`)).json();return ee&&ee.ok?(await Y(),s&&s(),!0):!1}catch{return!1}},[Y,s]),he=(0,o.useCallback)(async y=>{if(!y||y.length<2)return!1;try{let Re=await fetch(`${V}/merge?paths=${encodeURIComponent(y.join(","))}`).then(ee=>ee.json());return Re&&Re.ok?(await Y(),s&&s(),!0):!1}catch{return!1}},[Y,s]);(0,o.useEffect)(()=>{let y=()=>{let Re=typeof globalThis.__meGraphRuntime=="function"?globalThis.__meGraphRuntime():null;return{path:Ut(K.current),crumbs:C&&Array.isArray(C.crumbs)?C.crumbs.map(ee=>({path:ee.path,label:ee.label,labelKey:ee.labelKey,count:ee.count})):[],level:C&&C.level?{mode:C.level.mode,total:C.level.total,items:C.level.items.length,edges:C.level.edges.length}:null,loading:!!R,error:S?{timeout:!!S.timeout,message:S.message,target:S.target||""}:null,requests:J.current.requests,cacheHits:J.current.cacheHits,errors:J.current.errors,timeouts:J.current.timeouts,lastMs:J.current.lastMs,lastBytes:J.current.lastBytes,firstLevelMs:G.current,cacheSize:D.current.size,timeoutMs:1600,runtime:Re}};return globalThis.__meGraphProbe=y,()=>{if(globalThis.__meGraphProbe===y)try{delete globalThis.__meGraphProbe}catch{globalThis.__meGraphProbe=void 0}}},[C,R,S]);let oe=C&&C.level?C.level:null,_e=oe?oe.items.length:0,P=oe?oe.total:0,Ie=oe?oe.edges.length:0;return(0,e.jsxs)("div",{className:"me-graph me-v5-graph",children:[(0,e.jsx)("style",{children:ft}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-graphhead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"KNOWLEDGE GRAPH"}),(0,e.jsx)("h1",{children:t("graphTab")}),(0,e.jsx)("p",{children:t("graphHint")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:C?`${_e} ${t("graphItems")} \xB7 ${P} ${t("graphCardsUnit")} \xB7 ${Ie} ${t("edges")}`:""})]}),!C&&!S&&(0,e.jsx)(Yn,{text:t("loadingGraph")}),!C&&S&&(0,e.jsxs)("div",{className:"mc-empty",style:{display:"flex",flexDirection:"column",gap:10,alignItems:"center"},children:[(0,e.jsxs)("span",{children:[S.timeout?t("graphLevelTimeout").replace("{ms}",String(1600)):t("graphLevelError"),"\uFF1A",S.message]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:I,children:t("graphRetry")})]}),C&&_e===0&&(0,e.jsx)("div",{className:"mc-empty",children:t("graphEmptyLevel")}),C&&_e>0&&(0,e.jsx)(gi,{level:oe,crumbs:C.crumbs||[],onOpen:a,onDelete:re,onMerge:he,onDrill:W,onNavigate:O,onRetry:I,error:C?S:null,loading:R,t,all:n,onAllChange:r,fitTrigger:q.current})]})}var It={colors:{core:"#FF7A45",skill:"#8B5CF6",project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},shapes:{core:"diamond",skill:"hexagon",project:"circle",knowledge:"circle",content:"rect",prompt:"diamond",business:"hexagon",tool:"circle",mistake:"diamond",other:"circle"}};function Ht(t,a){try{let n=globalThis;if(n.__meGraphDrawWarned)return;n.__meGraphDrawWarned=!0,console.warn("[memory-eternal] \u77E5\u8BC6\u56FE\u8C31\u7ED8\u5236\u5F02\u5E38\uFF08\u5DF2\u515C\u5E95\uFF0C\u4E0D\u518D\u6574\u9875\u767D\u5C4F\uFF09"+(a?" @ "+a:""),t)}catch{}}function ra({value:t,small:a}){let n=typeof t=="number"&&Number.isFinite(t),r=n?Math.max(0,Math.min(100,t)):0;return(0,e.jsx)("div",{className:"me-progress"+(a?" me-progress-sm":"")+(n?" is-determinate":""),role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n?Math.round(r):void 0,"aria-label":"\u52A0\u8F7D\u8FDB\u5EA6",children:(0,e.jsx)("span",{className:"me-progress-fill",style:n?{width:Math.max(3,r)+"%"}:void 0})})}function Yn({text:t,value:a}){return(0,e.jsxs)("div",{className:"me-loading",role:"status","aria-live":"polite",children:[(0,e.jsx)(ra,{value:a}),(0,e.jsx)("span",{className:"me-loading-text",children:t})]})}var En=[];function ui({crumbs:t,t:a,onPick:n,busy:r}){let s=Array.isArray(t)&&t.length?t:[{path:"",labelKey:"graphAllCrumb",label:"\u5168\u90E8"}];return(0,e.jsx)("nav",{className:"me-graph-crumbs","aria-label":a("graphBreadcrumbAria"),"data-level-depth":s.length,children:s.map((m,b)=>{let N=m.labelKey?a(m.labelKey):"",g=N&&N!==m.labelKey?N:m.label||m.path||"\u2014",C=b===s.length-1;return(0,e.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:2},children:[b>0&&(0,e.jsx)("span",{className:"sep","aria-hidden":"true",children:"\u203A"}),(0,e.jsx)("button",{type:"button",className:(b===0?"home":"")+(C?" current":""),"aria-current":C?"page":void 0,title:g,disabled:C||r,onClick:()=>{C||n(m)},children:g})]},m.path||"root")})})}function gi({level:t,crumbs:a,onOpen:n,onDelete:r,onMerge:s,onDrill:m,onNavigate:b,onRetry:N,error:g,loading:C,t:p,all:S,onAllChange:k,fitTrigger:R}){let $=(0,o.useRef)(null),q=(0,o.useRef)(null),D=(0,o.useRef)(null),U=(0,o.useRef)(null),G=(0,o.useRef)(null),K=t&&Array.isArray(t.items)?t.items:En,be=t&&Array.isArray(t.edges)?t.edges:En,J=t&&t.id||"",A=(0,o.useMemo)(()=>K.map(h=>({id:h.id,title:h.label||h.id,name:h.label||h.id,kind:h.kind||"other",tags:Array.isArray(h.tags)?h.tags:[],updated:h.updated||"",count:Number(h.count)||0,type:h.type||"card"})),[K]),O=(0,o.useMemo)(()=>be.map(h=>({source:h.source,target:h.target,type:h.type||"tag",weight:Number(h.weight)||1})),[be]),W=(0,o.useRef)(p);W.current=p;let I=(0,o.useRef)(n);(0,o.useEffect)(()=>{I.current=n},[n]);let Y=(0,o.useRef)(r);(0,o.useEffect)(()=>{Y.current=r},[r]);let re=(0,o.useRef)(s);(0,o.useEffect)(()=>{re.current=s},[s]);let he=(0,o.useRef)(m);(0,o.useEffect)(()=>{he.current=m},[m]);let[oe,_e]=(0,o.useState)(""),[P,Ie]=(0,o.useState)(null),[y,Re]=(0,o.useState)(null),ee=(0,o.useRef)("");(0,o.useEffect)(()=>{ee.current=oe.trim().toLowerCase()},[oe]),(0,o.useEffect)(()=>{let h=D.current;if(!h)return;let c=oe.trim().toLowerCase();if(!c)return;let ie=h.nodes.find(je=>(je.name||"").toLowerCase().includes(c));if(ie){D.current.selectedId=ie.id,Ie(ie.id),h.panX=h.w/2-ie.x*h.zoom,h.panY=h.h/2-ie.y*h.zoom;try{h.render&&h.render()}catch(je){Ht(je,"search-center")}}},[oe]);let[Z,Oe]=(0,o.useState)("all"),[Ae,ne]=(0,o.useState)(!1),M=(0,o.useRef)("all"),[z,v]=(0,o.useState)(""),X=(0,o.useRef)(""),[se,Ee]=(0,o.useState)(!1),Pe=(0,o.useRef)(!1),[ce,d]=(0,o.useState)(null);(0,o.useEffect)(()=>{M.current=Z},[Z]),(0,o.useEffect)(()=>{X.current=z},[z]),(0,o.useEffect)(()=>{Pe.current=se},[se]);let H=(0,o.useMemo)(()=>{let h=new Map;for(let c of A)for(let ie of c.tags||[]){let je=String(ie).trim();je&&h.set(je,(h.get(je)||0)+1)}return[...h.entries()].sort((c,ie)=>ie[1]-c[1]).slice(0,24).map(([c,ie])=>({tag:c,n:ie}))},[A]),F=(0,o.useMemo)(()=>{let h={};for(let c of A)h[c.kind||"other"]=(h[c.kind||"other"]||0)+(c.type==="planet"?Math.max(1,c.count||0):1);return h},[A]),ye=(()=>{let h=oe.trim().toLowerCase();return!!h&&!A.some(c=>(c.title||c.name||"").toLowerCase().includes(h)||String(c.kind||"").toLowerCase().includes(h)||String(lt[c.kind]||"").toLowerCase().includes(h))})();(0,o.useEffect)(()=>{let h=D.current;h&&h.requestRender&&h.requestRender()},[oe]),(0,o.useEffect)(()=>{let h=D.current;if(!(!h||!h.render))try{h.render()}catch(c){Ht(c,"filter/timeDim")}},[Z,z,se]);let De=(0,o.useRef)(null),[ve,xe]=(0,o.useState)([]),[L,le]=(0,o.useState)(null),[Se,fe]=(0,o.useState)(!1),[et,bt]=(0,o.useState)(null),[He,pt]=(0,o.useState)(""),Ze=(0,o.useRef)(null),Be=(0,o.useRef)(null),Ge=(h,c=!0)=>{Ze.current&&clearTimeout(Ze.current),bt({msg:h,ok:c}),Ze.current=setTimeout(()=>bt(null),1900)},xt=h=>{pt(h),Be.current&&clearTimeout(Be.current),Be.current=setTimeout(()=>pt(""),1600)};(0,o.useEffect)(()=>()=>{Ze.current&&clearTimeout(Ze.current),Be.current&&clearTimeout(Be.current)},[]);let Ke=(0,o.useMemo)(()=>A.reduce((h,c)=>(h[c.id]=c,h),{}),[A]);return(0,o.useEffect)(()=>{let h=$.current;if(!h||A.length===0)return;let c=h.getContext("2d");if(!c)return;let ie=Math.min(1.5,Math.max(1,window.devicePixelRatio||1)),je=()=>{let x=document.documentElement.getAttribute("data-theme");if(x)return x==="dark";try{return typeof window<"u"&&!!window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}catch{return!1}},u={};O.forEach(x=>{u[x.source]=(u[x.source]||0)+1,u[x.target]=(u[x.target]||0)+1});let T=Math.max(1,...Object.values(u)),de=Rn(),We=K.some(x=>x&&x.type==="planet"),i={nodes:K.filter(x=>x&&x.type!=="planet").concat(K.filter(x=>x&&x.type==="planet")).map(x=>Nn(x,{degree:u[x.id]||0,maxDegree:T})),edges:O.map(x=>({sourceNodeId:x.source,targetNodeId:x.target,weight:Math.max(1,Number(x.weight)||1)})),panX:0,panY:0,zoom:1,running:!0,raf:0,tickCount:0,quietTicks:0,dragNode:null,selectedId:null,mouseX:0,mouseY:0,w:0,h:0,dpr:ie,ctx:c,multi:[],marquee:null,planetLayer:We,levelId:J};i.domain=A,i.domainById=A.reduce((x,j)=>(x[j.id]=j,x),{}),i.nodeById=new Map(i.nodes.map(x=>[x.id,x])),i.edgePairs=(()=>{let x=new Map(i.nodes.map((E,Q)=>[E.id,Q])),j=new Int32Array(i.edges.length*2),B=0;for(let E of i.edges){let Q=x.get(E.sourceNodeId),ue=x.get(E.targetNodeId);Q===void 0||ue===void 0||(j[B]=Q,j[B+1]=ue,B+=2)}return j.subarray(0,B)})(),i.alpha=1,i.forceParams=We?Cn(ba(i.nodes.length)):ba(i.nodes.length),i.lastTickMs=0,i.lastRenderMs=0,i.nodes.forEach((x,j)=>{let B=j*2.399963229728653,E=12*Math.sqrt(j);x.x=Math.cos(B)*E,x.y=Math.sin(B)*E});let ht=[...new Set(i.nodes.map(x=>x.type))];i.clustered=!We&&ht.length>1,i.typeCenters=i.typeCenters||{};let kt=We?0:160;ht.forEach((x,j)=>{if(i.typeCenters[x])return;let B=j/ht.length*Math.PI*2-Math.PI/2;i.typeCenters[x]={x:Math.cos(B)*kt,y:Math.sin(B)*kt}}),D.current=i;let St=0,_t=0,ct=null,tt="",l=()=>{let x=h.clientWidth,j=h.clientHeight;i.w=x,i.h=j,h.width=x*ie,h.height=j*ie,c.setTransform(ie,0,0,ie,0,0),(St===0||_t===0)&&x>0&&j>0&&i.tickCount>0&&de.raf(()=>Tt()),St=x,_t=j};l();let ae=new ResizeObserver(l);ae.observe(h.parentElement);let pe=(x,j)=>x&&x.length>j?x.slice(0,j)+"\u2026":x,Me=(x,j,B,E)=>{if(c.beginPath(),E==="rect")c.rect(x-B,j-B*.75,B*2,B*1.5);else if(E==="diamond")c.moveTo(x,j-B),c.lineTo(x+B,j),c.lineTo(x,j+B),c.lineTo(x-B,j),c.closePath();else if(E==="hexagon"){for(let Q=0;Q<6;Q++){let ue=Math.PI/3*Q-Math.PI/2,Ce=x+B*Math.cos(ue),qe=j+B*Math.sin(ue);Q===0?c.moveTo(Ce,qe):c.lineTo(Ce,qe)}c.closePath()}else c.arc(x,j,B,0,Math.PI*2)},Te=new Map,Ne=(x,j)=>{let B=x+"|"+Math.round(j),E=Te.get(B);if(!E){let Q=parseInt(x.slice(1,3),16),ue=parseInt(x.slice(3,5),16),Ce=parseInt(x.slice(5,7),16);E=c.createRadialGradient(-j*.3,-j*.3,0,0,0,j*1.2),E.addColorStop(0,"rgba("+Math.min(255,Q+70)+","+Math.min(255,ue+70)+","+Math.min(255,Ce+70)+",0.95)"),E.addColorStop(1,x),Te.set(B,E)}return E},Le=(x,j)=>{let B=parseInt(x.slice(1,3),16),E=parseInt(x.slice(3,5),16),Q=parseInt(x.slice(5,7),16);return"rgba("+B+","+E+","+Q+","+j+")"},yt=(x,j,B)=>{let E=qe=>[parseInt(qe.slice(1,3),16),parseInt(qe.slice(3,5),16),parseInt(qe.slice(5,7),16)],Q=E(x),ue=E(j),Ce=Math.max(0,Math.min(1,Number(B)||0));return"rgb("+Q.map((qe,Ue)=>Math.round(qe+(ue[Ue]-qe)*Ce)).join(",")+")"},Mt=1.1,at=3,Tt=()=>{if(!i.nodes.length)return;let x=1/0,j=-1/0,B=1/0,E=-1/0;i.nodes.forEach(Ve=>{let Ct=Number(Ve.r)||0,Qe=Ve.planet?Ct*1.75:Ct;Ve.x-Qe<x&&(x=Ve.x-Qe),Ve.x+Qe>j&&(j=Ve.x+Qe),Ve.y-Qe<B&&(B=Ve.y-Qe),Ve.y+Qe>E&&(E=Ve.y+Qe)});let Q=20,ue=j-x+Q*2,Ce=E-B+Q*2,qe=Math.min(i.w/ue,i.h/Ce),Ue=Math.pow(1/Mt,at);if(i.zoom=Math.max(.35,Math.min(1.8,qe*Ue)),i.planetLayer){let Ve=qe*Math.pow(1/Mt,at);Ve<i.zoom&&(i.zoom=Math.max(.12,Ve))}i.panX=i.w/2-(x+j)/2*i.zoom,i.panY=i.h/2-(B+E)/2*i.zoom};U.current=Tt;let At=()=>{c.clearRect(0,0,i.w,i.h),i.searchTerm=ee.current,i.kindFilter=M.current,i.timeMode=Pe.current,i.tagFilter=X.current;let x=i.tagFilter,j=i.kindFilter,B=f=>String(f||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");c.save();let E=i.w+"x"+i.h;if(!ct||tt!==E){ct=new Path2D;for(let f=0;f<i.w;f+=24)ct.moveTo(f,0),ct.lineTo(f,i.h);for(let f=0;f<i.h;f+=24)ct.moveTo(0,f),ct.lineTo(i.w,f);tt=E}c.strokeStyle=je()?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)",c.lineWidth=.5,c.stroke(ct),c.restore(),c.save(),c.translate(i.panX,i.panY),c.scale(i.zoom,i.zoom);let Q={};i.nodes.forEach(f=>Q[f.id]=f);let ue=performance.now()<(i.motionUntil||0),Ce=i.nodes.length>40,qe=Ce?1.5:.55,Ue=i.selectedId||i.hoverId,Ve=bn({panX:i.panX,panY:i.panY,zoom:i.zoom,w:i.w,h:i.h,margin:80}),Ct=(()=>{let f=(i.searchTerm||"").toLowerCase();if(!f)return null;let me=[];for(let ze of i.nodes){let $e=(i.domainById[ze.id]||{}).kind||"other";if(((ze.name||"").toLowerCase().includes(f)||String(lt[$e]||"").toLowerCase().includes(f)||String($e).toLowerCase().includes(f))&&me.push(ze.id),me.length>200)break}return me})(),Qe=yn(i.nodes,{limit:hn(i.nodes.length),focusId:Ue,hoverId:i.hoverId,searchHits:Ct,degree:u}),jt=new Map,sa=(f,me)=>{let ze=f+"|"+me,Fe=jt.get(ze);return Fe===void 0&&(c.font=f,Fe=c.measureText(me).width,jt.set(ze,Fe)),Fe},Ca=i.nodes.length<=250,Ma=new Map,Zn=i.nodes.length>1200&&i.zoom<.3;i.edges.forEach(f=>{if(Zn)return;let me=Q[f.sourceNodeId],ze=Q[f.targetNodeId];if(!me||!ze||!fa(me.x,me.y,10,Ve)&&!fa(ze.x,ze.y,10,Ve))return;if(j!=="all"){let Ta=i.domainById[f.sourceNodeId]&&i.domainById[f.sourceNodeId].kind,Ra=i.domainById[f.targetNodeId]&&i.domainById[f.targetNodeId].kind;if(Ta!==j&&Ra!==j)return}if(x){let Ta=i.domainById[f.sourceNodeId]&&(i.domainById[f.sourceNodeId].tags||[]).includes(x),Ra=i.domainById[f.targetNodeId]&&(i.domainById[f.targetNodeId].tags||[]).includes(x);if(!Ta&&!Ra)return}let Fe=ze.x-me.x,$e=ze.y-me.y,rt=Math.sqrt(Fe*Fe+$e*$e)||1,Je=ue?0:Ce?12:18,ot=-$e/rt*Je,dt=Fe/rt*Je,vt=(me.x+ze.x)/2+ot,st=(me.y+ze.y)/2+dt,zt=It.colors[i.domainById[me.id]&&i.domainById[me.id].kind||"other"]||It.colors.other,Zt=Ue&&(f.sourceNodeId===Ue||f.targetNodeId===Ue),Qa=Ue?Zt?.62:.09:i.planetLayer?.32:Ce?.18:.26,Za=parseInt(zt.slice(1,3),16),en=parseInt(zt.slice(3,5),16),tn=parseInt(zt.slice(5,7),16),an=Math.max(1,Number(f.weight)||1),nn=Zt?1.8+Math.min(4,an):.9+Math.min(3,an-1)*.45,on=Za+","+en+","+tn+","+Qa+","+nn,ea=Ma.get(on);ea||(ea={path:new Path2D,stroke:"rgba("+Za+","+en+","+tn+","+Qa+")",width:nn},Ma.set(on,ea)),ea.path.moveTo(me.x,me.y),ea.path.quadraticCurveTo(vt,st,ze.x,ze.y)}),Ma.forEach(f=>{c.strokeStyle=f.stroke,c.lineWidth=f.width,c.stroke(f.path)});let Qt=null;Ue&&(Qt=new Set,i.edges.forEach(f=>{f.sourceNodeId===Ue?Qt.add(f.targetNodeId):f.targetNodeId===Ue&&Qt.add(f.sourceNodeId)}));let la=(f,me={})=>{let ze=pe(f.name,me.maxChars||16),Fe=1/i.zoom,$e="500 "+(12*Fe).toFixed(1)+"px -apple-system,Segoe UI,sans-serif";c.font=$e;let Je=sa($e,ze)+16*Fe,ot=18*Fe,dt=f.y+f.r+(me.gap===void 0?8:me.gap)*Fe,vt=!0;for(let st of Ja)if(f.x-Je/2<st.x+st.w&&f.x+Je/2>st.x&&dt<st.y+st.h&&dt+ot>st.y){vt=!1;break}return!vt&&!me.force?!1:(Ja.push({x:f.x-Je/2,y:dt,w:Je,h:ot}),c.fillStyle=je()?"rgba(30,30,35,0.92)":"rgba(255,255,255,0.92)",c.beginPath(),c.roundRect?c.roundRect(f.x-Je/2,dt,Je,ot,4*Fe):c.rect(f.x-Je/2,dt,Je,ot),c.fill(),c.strokeStyle=je()?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)",c.lineWidth=1*Fe,c.stroke(),c.fillStyle=je()?me.strong?"#eee":"#bbb":me.strong?"#111":"#444",c.textAlign="center",c.fillText(ze,f.x,dt+13*Fe),!0)},eo=(f,me,ze)=>{let Fe=1/i.zoom,{isSel:$e,isHov:rt,dimmed:Je}=ze;c.save(),c.globalAlpha=Je?.12:1;let ot=c.createRadialGradient(f.x,f.y,f.r*.7,f.x,f.y,f.r*1.9);ot.addColorStop(0,Le(me,.34)),ot.addColorStop(.5,Le(me,.12)),ot.addColorStop(1,Le(me,0)),c.fillStyle=ot,c.beginPath(),c.arc(f.x,f.y,f.r*1.9,0,Math.PI*2),c.fill(),c.save(),c.translate(f.x,f.y),c.rotate(-.34),c.strokeStyle=Le(me,$e||rt?.8:.32),c.lineWidth=Math.max(.8,1.1*Fe),c.beginPath(),c.ellipse(0,0,f.r*1.5,f.r*.3,0,0,Math.PI*2),c.stroke(),c.restore(),c.save(),c.translate(f.x,f.y),c.save(),c.beginPath(),c.arc(0,0,f.r,0,Math.PI*2),c.clip();let dt=c.createRadialGradient(-f.r*.34,-f.r*.38,f.r*.08,0,0,f.r*1.08);dt.addColorStop(0,yt(me,"#ffffff",.46)),dt.addColorStop(.52,me),dt.addColorStop(1,yt(me,"#000000",.44)),Ca&&(c.shadowColor=Le(me,.45),c.shadowBlur=$e?26:14),c.fillStyle=dt,c.beginPath(),c.arc(0,0,f.r,0,Math.PI*2),c.fill(),c.shadowBlur=0;let vt=c.createLinearGradient(-f.r,-f.r,f.r,f.r);vt.addColorStop(0,"rgba(255,255,255,0.10)"),vt.addColorStop(.52,"rgba(0,0,0,0)"),vt.addColorStop(1,"rgba(0,0,0,0.30)"),c.fillStyle=vt,c.fillRect(-f.r,-f.r,f.r*2,f.r*2),c.beginPath(),c.arc(-f.r*.36,-f.r*.4,f.r*.3,0,Math.PI*2),c.fillStyle="rgba(255,255,255,0.14)",c.fill(),c.restore(),c.beginPath(),c.arc(0,0,f.r-Math.max(.5,1*Fe)*.5,Math.PI*1.05,Math.PI*1.95),c.strokeStyle="rgba(255,255,255,0.34)",c.lineWidth=Math.max(.8,1.4*Fe),c.stroke(),c.restore(),($e||rt)&&(c.save(),c.beginPath(),c.arc(f.x,f.y,f.r+5,0,Math.PI*2),c.strokeStyle=$e?"#ffffff":Le(me,.9),c.lineWidth=$e?2.4:1.6,Ca&&(c.shadowColor=me,c.shadowBlur=12),c.stroke(),c.restore()),c.restore();let st=f.r*i.zoom;if($e||rt||st>=11){let zt=Math.max(8,Math.min(22,st*.46))*Fe;if(c.save(),c.textAlign="center",c.textBaseline="middle",c.font="800 "+zt.toFixed(1)+"px -apple-system,Segoe UI,sans-serif",c.fillStyle="rgba(255,255,255,0.97)",c.fillText(Sn(f.count,{unit:W.current("graphCountWan"),locale:W.current("graphCountLocale")}),f.x,f.y-(st>=24?zt*.28:0)),st>=24){let Zt=W.current("graphCardsUnit");c.font="600 "+(zt*.46).toFixed(1)+"px -apple-system,Segoe UI,sans-serif",c.fillStyle="rgba(255,255,255,0.72)",c.fillText(Zt,f.x,f.y+zt*.82)}c.restore()}},Ja=[],Gt=[];i.nodes.forEach(f=>{if(!fa(f.x,f.y,f.r+2,Ve))return;let me=i.domainById[f.id]||{},ze=me.kind||"other",Fe=i.timeMode?fi(me.updated):It.colors[ze]||It.colors.other,$e=It.shapes[ze]||"circle",rt=i.selectedId===f.id,Je=i.hoverId===f.id,ot=i.searchTerm||"",dt=!ot||(f.name||"").toLowerCase().includes(ot)||String(lt[ze]||"").toLowerCase().includes(ot)||String(ze).toLowerCase().includes(ot),vt=j==="all"||ze===j,st=!x||(me.tags||[]).includes(x),zt=Ue&&f.id!==Ue&&!(Qt&&Qt.has(f.id))||ot&&!dt||!vt||!st;if(f.planet){Gt.push({n:f,color:Fe,isSel:rt,isHov:Je,dimmed:zt,ok:vt&&st});return}c.save(),c.globalAlpha=zt?.08:1,(rt||Je)&&Ca&&(c.shadowColor=Fe,c.shadowBlur=rt?20:14),c.translate(f.x,f.y),Me(0,0,f.r,$e),c.fillStyle=Ne(Fe,f.r),c.fill(),ze==="core"&&(c.fillStyle="#1b120e",c.font="700 "+Math.max(10,Math.round(f.r*.95))+"px sans-serif",c.textAlign="center",c.textBaseline="middle",c.fillText("\u2605",0,0)),c.restore(),rt?(c.save(),Me(f.x,f.y,f.r+3,$e),c.strokeStyle=Fe,c.lineWidth=3,c.shadowColor=Fe,c.shadowBlur=12,c.stroke(),c.restore()):Je?(c.save(),Me(f.x,f.y,f.r+2,$e),c.strokeStyle=Fe,c.lineWidth=2,c.stroke(),c.restore()):ot&&dt?(c.save(),Me(f.x,f.y,f.r+2,$e),c.strokeStyle="#e11d48",c.lineWidth=2,c.stroke(),c.restore()):i.multi.indexOf(f.id)>=0&&(c.save(),Me(f.x,f.y,f.r+2,$e),c.strokeStyle="#60a5fa",c.lineWidth=2,c.shadowColor="#60a5fa",c.shadowBlur=8,c.stroke(),c.restore()),(rt||Je||!ue&&(Qe.has(f.id)&&i.zoom>qe||!Ce&&i.zoom>.6))&&vt&&st&&la(f,{force:rt||Je})}),Gt.forEach(f=>eo(f.n,f.color,f));let Xa=Gt.length<=12?1/0:8,ca=new Set;if(Number.isFinite(Xa)?(Gt.filter(f=>(f.isSel||f.isHov)&&f.ok).forEach(f=>{ca.add(f.n.id),la(f.n,{gap:8,force:!0,maxChars:20})}),Gt.filter(f=>f.ok&&!ca.has(f.n.id)).sort((f,me)=>(me.n.count||0)-(f.n.count||0)).slice(0,Xa).forEach(f=>{ca.has(f.n.id)||(ca.add(f.n.id),la(f.n,{gap:8,maxChars:20}))})):Gt.forEach(f=>{f.ok&&la(f.n,{gap:8,force:f.isSel||f.isHov,maxChars:20})}),c.restore(),i.marquee){let f=i.marquee,me=Math.min(f.sx,f.ex),ze=Math.min(f.sy,f.ey),Fe=Math.abs(f.ex-f.sx),$e=Math.abs(f.ey-f.sy);c.save(),c.setLineDash([4,4]),c.strokeStyle="rgba(96,165,250,0.9)",c.lineWidth=1,c.fillStyle="rgba(96,165,250,0.12)",c.fillRect(me,ze,Fe,$e),c.strokeRect(me,ze,Fe,$e),c.restore()}if(i.hoverId&&De.current){let f=i.domainById[i.hoverId],me=i.nodes.find(function(ze){return ze.id===i.hoverId});if(f&&me){let ze=i.edges.filter(function(Je){return Je.sourceNodeId===f.id||Je.targetNodeId===f.id}).length,Fe=me.x*i.zoom+i.panX,$e=me.y*i.zoom+i.panY;De.current.style.display="block",De.current.style.left=Fe+14+"px",De.current.style.top=$e-6+"px";let rt=me.planet?W.current("graphPlanetCards").replace("{n}",String(me.count))+" \xB7 "+W.current("graphEnter"):W.current("connCount").replace("{n}",ze);De.current.innerHTML="<b>"+B(f.title||f.name||"")+'</b><br/><span style="opacity:.8">'+B(f.kind||"")+" \xB7 "+B(rt)+"</span>"}}else De.current&&(De.current.style.display="none")},mt=0,Jt=0,nt=0,Bt=()=>{i.motionUntil=performance.now()+140,nt&&de.clearTimeout(nt),nt=de.setTimeout(()=>{nt=0,it()},160)},it=()=>{Jt||(Jt=de.raf(()=>{Jt=0;let x=performance.now();try{At()}catch(j){Ht(j,"render")}i.lastRenderMs=performance.now()-x}))};i.requestRender=it;let qt=()=>{mt>0||(i.alpha=Math.max(i.alpha||0,.35),i.running=!0,i.raf||(i.raf=de.raf(te)))};i.wake=qt,i.render=At;let w=()=>{if(!We)return;let x=i.nodes.filter(B=>B.planet);if(!x.length)return;let j=12;for(let B=0;B<x.length;B++)for(let E=B+1;E<x.length;E++){let Q=x[B],ue=x[E],Ce=ue.x-Q.x,qe=ue.y-Q.y,Ue=Math.sqrt(Ce*Ce+qe*qe)||1,Ve=Q.r+ue.r+j;if(Ue>=Ve)continue;let Ct=(Ve-Ue)*.5,Qe=Ce/Ue,jt=qe/Ue;Q.x-=Qe*Ct,Q.y-=jt*Ct,ue.x+=Qe*Ct,ue.y+=jt*Ct,Q.vx*=.4,Q.vy*=.4,ue.vx*=.4,ue.vy*=.4}for(let B of x)for(let E of i.nodes){if(E.planet)continue;let Q=E.x-B.x,ue=E.y-B.y,Ce=Math.sqrt(Q*Q+ue*ue)||1,qe=B.r+E.r+8;if(Ce>=qe)continue;let Ue=qe-Ce;E.x+=Q/Ce*Ue,E.y+=ue/Ce*Ue,E.vx*=.5,E.vy*=.5}},_=()=>{let x=performance.now(),j=xn(i,{params:i.forceParams,alphaFloor:i.drift?1:0,damping:i.drift?.8:void 0});w(),i.lastTickMs=performance.now()-x,i.lastRms=j.rms,i.autoFitPending&&i.tickCount>45&&(i.autoFitPending=!1,Tt())},te=()=>{if(i.running){if(i.quietTicks>Pa&&(i.quietTicks=0,i.drift||(i.drift=!0,i.alpha=Math.max(i.alpha||0,1),i.motionUntil=0,i.userTouched||Tt())),i.drift&&!i.dragNode&&(i.driftFrame=(i.driftFrame|0)+1,i.driftFrame%2)){i.raf=de.raf(te);return}try{let x=performance.now(),j=i.dragNode||i.drift?1:6,B=0;do _(),B+=1;while(!i.dragNode&&!i.drift&&B<j&&performance.now()-x<18&&i.quietTicks<=Pa);i.drift||(i.motionUntil=performance.now()+60);let E=performance.now();At(),i.lastRenderMs=performance.now()-E}catch(x){Ht(x,"step")}i.raf=de.raf(te)}},we=()=>({nodes:i.nodes.length,edges:i.edges.length,planets:i.nodes.filter(x=>x.planet).length,level:i.levelId||"",tickCount:i.tickCount,quietTicks:i.quietTicks,running:!!i.running,dragging:!!i.dragNode,lastTickMs:Math.round((i.lastTickMs||0)*100)/100,lastRenderMs:Math.round((i.lastRenderMs||0)*100)/100,rms:Math.round((i.lastRms||0)*1e3)/1e3,alpha:Math.round((i.alpha||0)*1e3)/1e3,drift:!!i.drift});i.stats=we,globalThis.__meGraphStats=we;let ke=()=>{let x=h.getBoundingClientRect(),j=x.width?h.clientWidth/x.width:1,B=x.height?h.clientHeight/x.height:1;return{level:i.levelId||"",planetLayer:!!i.planetLayer,nodes:i.nodes.length,planets:i.nodes.filter(E=>E.planet).length,edges:i.edges.length,running:!!i.running,quietTicks:i.quietTicks,zoom:Math.round(i.zoom*1e3)/1e3,panX:Math.round(i.panX),panY:Math.round(i.panY),selected:i.selectedId||null,multi:Array.isArray(i.multi)?i.multi.length:0,resources:de.snapshot(),screen:i.nodes.map(E=>({id:E.id,label:E.name,planet:!!E.planet,count:E.count||0,x:x.left+(E.x*i.zoom+i.panX)/j,y:x.top+(E.y*i.zoom+i.panY)/B,r:Math.max(4,E.r*i.zoom/j)}))}};i.runtime=ke,globalThis.__meGraphRuntime=ke;let ge=(x,j)=>{let B=h.getBoundingClientRect(),E=B.width?h.clientWidth/B.width:1,Q=B.height?h.clientHeight/B.height:1;return{x:(x-B.left)*E,y:(j-B.top)*Q}},Xe=(x,j)=>{let B=ge(x,j);return{x:(B.x-i.panX)/i.zoom,y:(B.y-i.panY)/i.zoom}},Nt=x=>{let j=i.domainById[x];return!(!j||M.current!=="all"&&j.kind!==M.current||X.current&&!(j.tags||[]).includes(X.current))},Rt=(x,j,B)=>Math.max(j,Math.min(B,x)),Lt=x=>{i.mouseX=x.clientX,i.mouseY=x.clientY;let j=Xe(x.clientX,x.clientY),B=null;for(let E=i.nodes.length-1;E>=0;E--){let Q=i.nodes[E];if(!Nt(Q.id))continue;let ue=Q.x-j.x,Ce=Q.y-j.y;if(ue*ue+Ce*Ce<Q.r*Q.r+36){B=Q.id;break}}B!==i.hoverId&&(i.hoverId=B,i.motionUntil=performance.now()+140,it())},Dt=x=>{if(x.button!==0)return;let j=Xe(x.clientX,x.clientY),B=null;for(let E=i.nodes.length-1;E>=0;E--){let Q=i.nodes[E];if(!Nt(Q.id))continue;let ue=Q.x-j.x,Ce=Q.y-j.y;if(ue*ue+Ce*Ce<Q.r*Q.r+25){B=Q;break}}if(x.shiftKey){if(B){i.shiftClick=B.id;return}i.marquee={sx:x.clientX,sy:x.clientY,ex:x.clientX,ey:x.clientY};return}i.userTouched=!0,i.dragStart={x:x.clientX,y:x.clientY,px:i.panX,py:i.panY},i.dragging=!1,i.dragNode=B||null,B&&(i.dragOffset={dx:B.x-j.x,dy:B.y-j.y})},wa=x=>{if(i.marquee){i.marquee.ex=x.clientX,i.marquee.ey=x.clientY,Bt(),it();return}if(!i.dragStart)return;let j=x.clientX-i.dragStart.x,B=x.clientY-i.dragStart.y;if(Math.abs(j)+Math.abs(B)>3&&!i.dragging&&(i.dragging=!0,i.dragNode&&(i.alpha=Math.max(i.alpha||0,.35))),i.dragNode){let E=Xe(x.clientX,x.clientY);i.dragNode.x=E.x+i.dragOffset.dx,i.dragNode.y=E.y+i.dragOffset.dy,Bt(),qt()}else i.dragging&&(i.panX=Rt(i.dragStart.px+j,-1e5,1e5),i.panY=Rt(i.dragStart.py+B,-1e5,1e5),Bt(),it())},ka=x=>{if(i.marquee){let E=i.marquee;i.marquee=null;let Q=ge(E.sx,E.sy),ue=ge(E.ex,E.ey),Ce=Math.min(Q.x,ue.x),qe=Math.max(Q.x,ue.x),Ue=Math.min(Q.y,ue.y),Ve=Math.max(Q.y,ue.y),Ct=i.nodes.filter(Qe=>!Qe.planet&&Nt(Qe.id)).filter(Qe=>{let jt=Qe.x*i.zoom+i.panX,sa=Qe.y*i.zoom+i.panY;return jt>=Ce&&jt<=qe&&sa>=Ue&&sa<=Ve}).map(Qe=>Qe.id);i.multi=Ct,xe(Ct),Bt(),it();return}let j=i.dragStart&&!i.dragging,B=!!i.dragNode&&!!i.dragging;if(i.shiftClick){let E=i.shiftClick;i.shiftClick=null;let Q=i.nodeById.get(E);if(Q&&Q.planet){i.selectedId=E,Ie(E),it();return}let ue=Array.isArray(i.multi)?i.multi.slice():[];ue.includes(E)||ue.push(E),i.multi=ue,xe(ue),it();return}if(j){let E=Xe(x.clientX,x.clientY),Q=null;for(let ue=i.nodes.length-1;ue>=0;ue--){let Ce=i.nodes[ue];if(!Nt(Ce.id))continue;let qe=Ce.x-E.x,Ue=Ce.y-E.y;if(qe*qe+Ue*Ue<Ce.r*Ce.r+20){Q=Ce;break}}if(Q&&Q.planet){i.selectedId=null,Ie(null),it(),i.dragStart=null,i.dragging=!1,i.dragNode=null,he.current&&he.current(Q.id);return}Q?i.selectedId===Q.id?(i.selectedId=null,Ie(null),it()):(i.selectedId=Q.id,Ie(Q.id),it()):(i.selectedId=null,i.hoverId=null,x.shiftKey||(i.multi=[],xe([])),Ie(null),it())}i.dragStart=null,i.dragging=!1,i.dragNode=null,B&&qt()},Vn=x=>{x.preventDefault();let j=Xe(x.clientX,x.clientY),B=null;for(let E=i.nodes.length-1;E>=0;E--){let Q=i.nodes[E];if(!Nt(Q.id))continue;let ue=Q.x-j.x,Ce=Q.y-j.y;if(ue*ue+Ce*Ce<Q.r*Q.r+25){B=Q;break}}if(B){let E=i.domainById[B.id];E&&d({x:x.clientX,y:x.clientY,id:B.id,path:E.id,title:E.title,planet:!!B.planet,count:B.count||0})}else d(null)},Jn=x=>{x.preventDefault();let j=ge(x.clientX,x.clientY),B=(j.x-i.panX)/i.zoom,E=(j.y-i.panY)/i.zoom,Q=Math.max(.3,Math.min(3,i.zoom*(x.deltaY<0?Mt:1/Mt)));i.panX=Rt(i.panX+B*(i.zoom-Q),-1e5,1e5),i.panY=Rt(i.panY+E*(i.zoom-Q),-1e5,1e5),i.zoom=Q,i.userTouched=!0,Bt(),it()};de.listen(h,"mousemove",Lt),de.listen(h,"mousedown",Dt),de.listen(window,"mousemove",wa),de.listen(window,"mouseup",ka),de.listen(h,"wheel",Jn,{passive:!1}),de.listen(h,"contextmenu",Vn),G.current=()=>{i.selectedId=null,i.hoverId=null,i.multi=[],xe([]),i.userTouched=!1,Tt(),Bt(),it()},mt=vn(i.nodes.length);let Xt=mt,Xn=()=>Xt>0?Math.round((Xt-mt)/Xt*100):100;mt>0&&Re(0);let Sa=Xt>0?[.75,.5,.25].map(x=>Math.round(Xt*x)):[],Na=()=>{if(!i.running)return;let x=performance.now();for(;mt>0&&performance.now()-x<12;)_(),mt--;if(Re(mt>0?Math.min(99,Xn()):100),Sa.length&&mt<=Sa[0]){Sa.shift(),i.userTouched||Tt();try{At()}catch(j){Ht(j,"warm-frame")}}if(mt>0){i.userTouched||Tt(),i.warmRaf=de.raf(Na);return}i.warmRaf=0,i.userTouched||Tt();try{At()}catch(j){Ht(j,"warm-final")}Re(null),qt()};i.warmStep=Na,Tt();try{At()}catch(x){Ht(x,"first-frame")}mt>0?i.warmRaf=de.raf(Na):(Re(0),qt());let Qn=()=>ne(!1);return de.listen(window,"mousedown",Qn),()=>{if(i.running=!1,de.releaseAll(),globalThis.__meGraphStats===we)try{delete globalThis.__meGraphStats}catch{globalThis.__meGraphStats=void 0}if(globalThis.__meGraphRuntime===ke)try{delete globalThis.__meGraphRuntime}catch{globalThis.__meGraphRuntime=void 0}try{ae.disconnect()}catch{}}},[K,O,J]),(0,o.useEffect)(()=>{Ie(null),xe([]),d(null);let h=D.current;h&&(h.selectedId=null,h.multi=[])},[J]),(0,o.useEffect)(()=>{R!==void 0&&U.current&&requestAnimationFrame(()=>{try{U.current()}catch(h){Ht(h,"fit")}})},[R]),(0,e.jsxs)("div",{className:"me-graph",ref:q,children:[(0,e.jsxs)("div",{className:"me-graph-toolbar",children:[(0,e.jsxs)("span",{className:"me-graph-count",children:[A.length," ",p("graphItems")," \xB7 ",t&&t.total," ",p("graphCardsUnit")," \xB7 ",O.length," ",p("edges")]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("input",{type:"text",placeholder:p("search"),value:oe,onChange:h=>_e(h.target.value)}),(0,e.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ne(h=>!h),"aria-expanded":Ae,title:p("filterLabel"),style:{borderRadius:8},children:["\u{1F50D} ",p("filterLabel")," ",Z!=="all"||se||z?"\u25CF":"\u25BE"]}),Ae&&(0,e.jsx)("div",{className:"me-graph-legend-pop",onMouseDown:h=>h.stopPropagation(),style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:50,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",border:"1px solid rgba(255,255,255,0.1)",borderRadius:10,padding:8,minWidth:240,boxShadow:"0 12px 34px rgba(0,0,0,.35)"},children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,e.jsx)("button",{type:"button",className:`lg${Z==="all"&&!se?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>{Oe("all"),Ee(!1)},children:p("all")}),Object.keys(gt).map(h=>(0,e.jsxs)("button",{type:"button",className:`lg${Z===h?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>Oe(c=>c===h?"all":h),children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:It.colors[h]||gt[h]}}),p(lt[h])]},h)),(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsxs)("button",{type:"button",className:`lg${se?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>Ee(h=>!h),children:["\u23F1 ",p("timeDim")]}),H.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsx)("div",{style:{maxHeight:130,overflow:"auto",display:"flex",flexWrap:"wrap",gap:4},children:H.map(h=>(0,e.jsxs)("button",{type:"button",className:`lg${z===h.tag?" active":""}`,style:{color:"#ddd",padding:"2px 7px",fontSize:11},onClick:()=>v(c=>c===h.tag?"":h.tag),title:h.tag,children:["#",h.tag," ",(0,e.jsx)("span",{style:{opacity:.55},children:h.n})]},h.tag))})]}),(Z!=="all"||se||z)&&(0,e.jsxs)("button",{type:"button",className:"lg lg-clear",style:{justifyContent:"flex-start",color:"#f87171"},onClick:()=>{Oe("all"),Ee(!1),v("")},children:[p("clearFilter")," \u2715"]})]})})]}),(0,e.jsxs)("label",{className:"mc-btn",style:{display:"inline-flex",alignItems:"center",gap:5,cursor:"pointer"},title:p("crossVault"),children:[(0,e.jsx)("input",{type:"checkbox",checked:!!S,onChange:h=>k&&k(h.target.checked)}),p("crossVault")]}),(0,e.jsx)("button",{type:"button",className:`mc-btn${se?" me-on":""}`,onClick:()=>Ee(h=>!h),children:p("timeDim")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let h=$.current;if(h)try{h.toBlob(c=>{c&&le({url:URL.createObjectURL(c),blob:c})},"image/png")}catch{}},children:p("exportGraph")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>U.current&&U.current(),children:p("fit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{Ie(null),Oe("all"),G.current&&G.current()},children:p("reset")})]}),(0,e.jsxs)("div",{className:"me-graph-canvas",style:{position:"relative",overflow:"hidden"},children:[(0,e.jsx)("canvas",{ref:$,style:{width:"100%",height:"100%",display:"block",cursor:"grab"}}),(0,e.jsx)(ui,{crumbs:a,t:p,onPick:b,busy:C}),(0,e.jsxs)("div",{className:"me-graph-levelchip",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:A.length})," ",p("graphItems")]}),(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:t&&t.total})," ",p("graphCardsUnit")]}),(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:O.length})," ",p("edges")]})]}),g&&(0,e.jsxs)("div",{className:"me-graph-levelerr",role:"alert",children:[(0,e.jsx)("span",{style:{flex:"none",fontWeight:800},children:g.timeout?"\u23F1":"\u2715"}),(0,e.jsx)("span",{className:"msg",children:(g.timeout?p("graphLevelTimeout").replace("{ms}",String(1600)):p("graphLevelError"))+"\uFF1A"+g.message}),(0,e.jsx)("button",{type:"button",onClick:()=>N&&N(),children:p("graphRetry")})]}),!g&&C&&(0,e.jsxs)("div",{className:"me-graph-levelbusy",role:"status","aria-live":"polite",children:[(0,e.jsx)(ra,{small:!0}),p("graphLevelLoading")]}),y!==null&&(0,e.jsxs)("div",{role:"status","aria-live":"polite",style:{position:"absolute",left:"50%",top:10,transform:"translateX(-50%)",zIndex:3,display:"flex",alignItems:"center",gap:9,padding:"6px 12px",borderRadius:999,background:"rgba(28,28,32,0.86)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",color:"#eee",fontSize:11.5,fontWeight:600,letterSpacing:".02em",pointerEvents:"none",boxShadow:"0 6px 18px rgba(0,0,0,.22)"},children:[(0,e.jsx)(ra,{value:y,small:!0}),(0,e.jsxs)("span",{children:[p("graphWarming").replace("{n}",A.length)," \xB7 ",Math.round(y),"%"]})]}),(0,e.jsxs)("div",{className:"mc-v5-graph-legend",children:[(0,e.jsx)("div",{className:"mc-v5-graph-legend-title",children:"\u8FDE\u63A5\u7C07"}),Object.keys(It.colors).filter(h=>F[h]).map(h=>(0,e.jsxs)("div",{className:"mc-v5-graph-legend-row",children:[(0,e.jsx)("i",{style:{background:It.colors[h]}}),(0,e.jsx)("span",{children:p(lt[h]||"kindKnowledge")}),(0,e.jsx)("b",{children:F[h]})]},h))]}),(0,e.jsx)("div",{className:"me-graph-tooltip",ref:De,style:{display:"none",position:"absolute",zIndex:4,pointerEvents:"none",background:"rgba(28,28,32,0.88)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:8,padding:"7px 10px",fontSize:12,maxWidth:220,boxShadow:"0 8px 24px rgba(0,0,0,.2)"}}),ye&&(0,e.jsx)("div",{className:"mc-empty",style:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)"},children:p("noMatch")}),ce&&(0,e.jsx)("div",{className:"me-graph-ctx-back",style:{position:"fixed",inset:0,zIndex:30},onMouseDown:()=>d(null)}),ce&&(0,e.jsxs)("div",{className:"me-graph-ctxmenu",style:{position:"fixed",left:ce.x,top:ce.y,zIndex:31},onMouseDown:h=>h.stopPropagation(),children:[ce.planet&&(0,e.jsxs)("button",{type:"button",onClick:()=>{let h=ce.id;d(null),he.current&&he.current(h)},children:[p("graphEnter")," \u203A"]}),ce.planet&&(0,e.jsx)("div",{style:{padding:"4px 10px 6px",fontSize:11,opacity:.7},children:p("graphPlanetCards").replace("{n}",String(ce.count||0))}),!ce.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{I.current({path:ce.path,title:ce.title}),d(null)},children:p("openCard")}),!ce.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{ce.id&&(D.current.selectedId=ce.id,Ie(ce.id)),d(null);let h=D.current;h&&h.requestRender&&h.requestRender()},children:p("focusNeighbors")}),(0,e.jsx)("button",{type:"button",onClick:()=>{try{navigator.clipboard&&navigator.clipboard.writeText(ce.title||"")}catch{}d(null),Ge(p("copied"))},children:p("copyName")}),!ce.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{let h=D.current,c=h&&Array.isArray(h.multi)?h.multi.slice():[],ie=ce.id;if(ie&&!c.includes(ie)&&c.push(ie),d(null),c.length<2){Ge(p("mergeNeed"),!1);return}if(!window.confirm(p("mergeConfirm")))return;let je=re.current&&re.current(c);je&&je.then?je.then(u=>u?Ge(p("merged")):Ge(p("mergeFail"),!1)).catch(()=>Ge(p("mergeFail"),!1)):je&&Ge(p("merged"))},children:p("merge")}),!ce.planet&&(0,e.jsx)("button",{type:"button",style:{color:"#f87171"},onClick:()=>{let h=ce.path;d(null),window.confirm(p("deleteConfirm"))&&(async()=>{try{(Y.current?await Y.current(h):!1)?Ge(p("deleted")):Ge(p("deleteFail"),!1)}catch{Ge(p("deleteFail"),!1)}})()},children:p("delete")})]}),ve.length>0&&(0,e.jsxs)("div",{style:{position:"absolute",left:10,top:10,zIndex:3,display:"flex",gap:8,alignItems:"center",background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:"6px 10px",fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsxs)("span",{style:{fontWeight:700},children:[ve.length," ",p("nodes")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let c=ve.map(T=>Ke[T]).filter(Boolean).map(T=>T.title||T.name).join(`
1036
+ `),ie=new Blob([c],{type:"text/plain;charset=utf-8"}),je=URL.createObjectURL(ie),u=document.createElement("a");u.href=je,u.download="memory-selected.txt",document.body.appendChild(u),u.click(),document.body.removeChild(u),setTimeout(()=>URL.revokeObjectURL(je),1e3),Ge(ve.length+p("exportedSel"))},children:p("exportSel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{if(ve.length<2){Ge(p("mergeNeed"),!1);return}let h=ve.map(ie=>Ke[ie]?Ke[ie].id:ie);if(!window.confirm(p("mergeConfirm")))return;xe([]);let c=D.current;c&&(c.multi=[]),fetch(`${V}/merge?paths=${encodeURIComponent(h.join(","))}`).then(ie=>ie.json()).then(ie=>{ie&&ie.ok?Ge(p("merged")):Ge(p("mergeFail"),!1)}).catch(()=>Ge(p("mergeFail"),!1))},children:p("merge")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{if(!window.confirm(p("deleteConfirm")))return;let h=ve.map(ie=>Ke[ie]?Ke[ie].id:ie);xe([]);let c=D.current;c&&(c.multi=[]),(async()=>{let ie=0;for(let je of h)try{(Y.current?await Y.current(je):!1)&&ie++}catch{}Ge(ie+p("deletedSelected"),ie>0)})()},children:p("deleteSelected")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let h=D.current;h&&(h.multi=[]),xe([]);let c=D.current;c&&c.render&&c.render()},children:p("clearSelection")})]}),P&&Ke[P]&&(0,e.jsxs)("div",{className:"me-graph-sidebar",style:{position:"absolute",right:10,top:10,zIndex:3,maxWidth:240,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:12,fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsx)("div",{style:{fontWeight:700,fontSize:13,marginBottom:4},children:Ke[P]?Ke[P].title||Ke[P].name:P}),(0,e.jsxs)("div",{style:{opacity:.8,marginBottom:8},children:[Ke[P]?p(lt[Ke[P].kind]||"kindKnowledge"):"\u2014",Ke[P]&&Ke[P].type==="planet"?" \xB7 "+p("graphPlanetCards").replace("{n}",String(Ke[P].count||0)):""]}),Ke[P]&&Ke[P].type==="planet"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{width:"100%",marginBottom:8},onClick:()=>{let h=P;Ie(null),he.current&&he.current(h)},children:[p("graphEnter")," \u203A"]}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.65,letterSpacing:".04em",marginBottom:6},children:p("graphLevelHint")}),(O.filter(h=>h.source===P||h.target===P)||[]).slice(0,8).map((h,c)=>{let ie=h.source===P?h.target:h.source,je=Ke[ie];return(0,e.jsx)("div",{style:{padding:"4px 6px",cursor:"pointer",borderRadius:6},onMouseDown:u=>{u.preventDefault();let T=D.current;T&&(T.selectedId=ie,T.hoverId=ie,T.requestRender&&T.requestRender()),Ie(ie)},children:je?(je.title||je.name).slice(0,28):ie},c)})]})]}),(0,e.jsx)("div",{className:"me-graph-tip",children:p("graphTip")}),et&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(et.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:et.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:et.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:et.msg})]}),L&&(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>{L.url&&URL.revokeObjectURL(L.url),le(null),fe(!1)},children:[(0,e.jsx)("style",{children:ft}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:Se?"100vw":900,width:Se?"100vw":"92vw",maxHeight:Se?"100%":"90vh",height:Se?"100%":void 0,borderRadius:Se?0:14},onClick:h=>h.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:p("exportGraph")}),(0,e.jsxs)("div",{className:"me-head-actions",children:[(0,e.jsx)("a",{className:"mc-btn",href:L.url,download:"memory-graph.png",onClick:()=>{xt("download"),Ge(p("downloaded")+" \xB7 "+p("defaultDownloads"))},style:{textDecoration:"none",display:"inline-flex",alignItems:"center"},children:p(He==="download"?"done":"download")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{xt("full"),fe(h=>!h),Ge(p("fullscreen"))},children:p(He==="full"?"done":Se?"exitFull":"fullscreen")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let h=L.blob;h&&window.ClipboardItem&&navigator.clipboard?navigator.clipboard.write([new window.ClipboardItem({"image/png":h})]).then(()=>{xt("copy"),Ge(p("copied"))}).catch(()=>{Ge(p("copyFail"),!1)}):Ge(p("copyFail"),!1)},children:p(He==="copy"?"done":"copyImage")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{L.url&&URL.revokeObjectURL(L.url),le(null),fe(!1)},children:p("close")})]})]}),(0,e.jsx)("div",{className:"me-dialog-body",style:{display:"flex",justifyContent:"center",background:Se?"var(--dsw-alias-bg-base, #0b0d10)":"var(--dsw-alias-bg-base, #f3f4f6)"},children:(0,e.jsx)("img",{src:L.url,alt:p("exportGraph"),style:{maxWidth:"100%",maxHeight:Se?"calc(100% - 64px)":"70vh",borderRadius:Se?0:8,cursor:"zoom-in"},onClick:()=>fe(h=>!h)})})]})]})]})}function fi(t){let a=new Date(t||0).getTime();if(!a)return"#94a3b8";let n=(Date.now()-a)/864e5;return n<3?"#10b981":n<14?"#f59e0b":n<30?"#f97316":"#94a3b8"}function Bn({label:t,value:a=[],options:n,onChange:r,placeholder:s,z:m=20}){let[b,N]=(0,o.useState)(!1),g=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(!b)return;let q=D=>{g.current&&!g.current.contains(D.target)&&N(!1)};return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[b]);let C=Array.isArray(a)?a:[],p=C.includes("__all__"),S=p?n.find(q=>q.value==="__all__")?.label||"":C.length?C.map(q=>n.find(D=>D.value===q)?.label||q).join("\u3001"):"",k=(q,D)=>{if(q.value==="__all__"){r(D?["__all__"]:[]);return}let U=new Set(C);U.has("__all__")&&U.delete("__all__"),D?U.add(q.value):U.delete(q.value),r([...U])},R=n.find(q=>q.value==="__all__"),$=n.filter(q=>q.value!=="__all__");return(0,e.jsxs)("div",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t}),(0,e.jsxs)("div",{ref:g,style:{position:"relative",minWidth:0},children:[(0,e.jsxs)("button",{type:"button",onClick:()=>N(q=>!q),style:{width:"100%",textAlign:"left",padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",gap:6},children:[(0,e.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S||s||"\u2014"}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.7},children:"\u25BE"})]}),b&&(0,e.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:m,marginTop:2,borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",boxShadow:"0 6px 20px rgba(0,0,0,0.14)",maxHeight:180,overflow:"auto"},children:[R&&(0,e.jsxs)("label",{onClick:q=>q.stopPropagation(),className:"mc-dd-opt",style:{borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("input",{type:"checkbox",checked:p,onChange:q=>k(R,q.target.checked)}),(0,e.jsx)("span",{children:R.label})]}),$.map(q=>(0,e.jsxs)("label",{onClick:D=>D.stopPropagation(),className:"mc-dd-opt",children:[(0,e.jsx)("input",{type:"checkbox",checked:C.includes(q.value),onChange:D=>k(q,D.target.checked)}),(0,e.jsx)("span",{children:q.label})]},q.value))]})]})]})}function bi(t){let a=new Date(t||0).getTime();return!!a&&(Date.now()-a)/864e5<3}async function hi(t,a,n){if(n&&typeof window.showSaveFilePicker=="function")try{let m=await window.showSaveFilePicker({suggestedName:a}),b=await m.createWritable();return await b.write(t),await b.close(),{ok:!0,picked:!0,name:m.name}}catch(m){return m&&m.name==="AbortError"?{ok:!1,aborted:!0}:{ok:!1,err:String(m.message||m)}}let r=URL.createObjectURL(t),s=document.createElement("a");return s.href=r,s.download=a,document.body.appendChild(s),s.click(),document.body.removeChild(s),setTimeout(()=>URL.revokeObjectURL(r),1e3),{ok:!0,picked:!1,name:a}}function Ha(t,a){if(!a||!t)return t;let n=t.toLowerCase(),r=a.toLowerCase(),s=[],m=0;for(;m<t.length;){let b=n.indexOf(r,m);if(b<0){s.push(t.slice(m));break}b>m&&s.push(t.slice(m,b)),s.push((0,e.jsx)("mark",{className:"mc-hl",children:t.slice(b,b+r.length)},b)),m=b+r.length}return s}function Et(t){let a=aa(t);if(!a)return"";let n=a.toDateString()===new Date().toDateString(),r=mn(a);return n?r:`${a.getMonth()+1}-${a.getDate()} ${r}`}
967
1037
 
968
1038
  return module.exports;
969
1039
  },