memory-eternal 0.30.4 → 0.30.5
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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/cursor-extension/package.json +1 -1
- package/dsh-tui-plugin/dsh-plugin.json +1 -1
- package/dsh-tui-plugin/package.json +1 -1
- package/index.js +17 -2
- package/lib/client.js +110 -19
- package/lib/web.js +2 -1
- package/orca-plugin/orca-plugin.json +1 -1
- package/package.json +2 -2
- package/web/app.js +110 -19
- package/web/index.html +2 -1
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 po=Object.create;var ba=Object.defineProperty;var mo=Object.getOwnPropertyDescriptor;var uo=Object.getOwnPropertyNames;var go=Object.getPrototypeOf,fo=Object.prototype.hasOwnProperty;var bo=(t,a)=>{for(var n in a)ba(t,n,{get:a[n],enumerable:!0})},un=(t,a,n,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of uo(a))!fo.call(t,s)&&s!==n&&ba(t,s,{get:()=>a[s],enumerable:!(i=mo(a,s))||i.enumerable});return t};var ho=(t,a,n)=>(n=t!=null?po(go(t)):{},un(a||!t||!t.__esModule?ba(n,"default",{value:t,enumerable:!0}):n,t)),yo=t=>un(ba({},"__esModule",{value:!0}),t);var
|
|
6
|
+
var po=Object.create;var ba=Object.defineProperty;var mo=Object.getOwnPropertyDescriptor;var uo=Object.getOwnPropertyNames;var go=Object.getPrototypeOf,fo=Object.prototype.hasOwnProperty;var bo=(t,a)=>{for(var n in a)ba(t,n,{get:a[n],enumerable:!0})},un=(t,a,n,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of uo(a))!fo.call(t,s)&&s!==n&&ba(t,s,{get:()=>a[s],enumerable:!(i=mo(a,s))||i.enumerable});return t};var ho=(t,a,n)=>(n=t!=null?po(go(t)):{},un(a||!t||!t.__esModule?ba(n,"default",{value:t,enumerable:!0}):n,t)),yo=t=>un(ba({},"__esModule",{value:!0}),t);var zr={};bo(zr,{EN:()=>Kn,MemoryLibrary:()=>Vo,ZH:()=>Gn,apply:()=>jo,inject:()=>Po});module.exports=yo(zr);var r=ho(require("react"),1),qn=require("react-dom");var xo={"&":"&","<":"<",">":">"},Ea=t=>String(t).replace(/[&<>]/g,a=>xo[a]),vo=[[/结论|总结|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"]],wo=["\u2728","info"],ko=[[/风险|注意|警告|禁止|坑|务必/i,"\u26A0\uFE0F","warn"],[/提示|建议|tip|best practice/i,"\u{1F4A1}","idea"],[/结论|总结/i,"\u2705","ok"],[/错误|失败|报错/i,"\u2757","bad"]],So=t=>{let a=String(t);for(let[n,i,s]of vo)if(n.test(a))return[i,s];return wo},No=t=>{let a=t.join(" ");for(let[n,i,s]of ko)if(n.test(a))return[i,s];return["\u{1F4CC}","info"]};function ta(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">'+Ea(n[1])+'</span><span class="md-v">'+ta(n[2])+"</span></span>";let i=Ea(a);return i=i.replace(/^\[([ xX])\](?=\s|$)\s*/,(s,m)=>'<span class="md-task">'+(m.toLowerCase()==="x"?"\u2611":"\u2610")+"</span> "),i=i.replace(/`([^`\n]+)`/g,'<code class="md-code">$1</code>'),i=i.replace(/\*\*([^*]+)\*\*/g,'<strong class="md-b">$1</strong>'),i=i.replace(/(^|[^*])\*([^*\n]+)\*/g,"$1<em>$2</em>"),i=i.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(s,m,b)=>/^(https?:|\/|#)/i.test(b)?'<a class="md-link" href="'+b+'" target="_blank" rel="noopener noreferrer">'+m+"</a>":m),i}function ha(t){let a=String(t||"").replace(/\r\n?/g,`
|
|
7
7
|
`),n=/^---\n([\s\S]*?)\n---\n?/.exec(a);if(!n)return{meta:[],body:a};let i=[];for(let s of n[1].split(`
|
|
8
|
-
`)){let
|
|
9
|
-
`)).body;if(!a.trim())return"";let n=[],i=a.replace(/```([\w+#.-]*)\n([\s\S]*?)```/g,(
|
|
10
|
-
`)){let
|
|
11
|
-
`)}var ya="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABccElEQVR4nO19B3hcxdX2e+buriR3cAndFIPtXbmq7cpFphhMTUiQvzTSCSEkBMiXAAFiTAgtDUghBL4vyUcC/BaEhGowxXLRSrJkY1taGzDVtLiAu6TdvXP+59xdOStZsnW3S7vv8zjE17szd2fec2bmzClAHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555NGfQJl+gTySi5erqhzO0LaxHFSczHbJpSnkHPXOqbW14WS2m0dm4chw/3kkGYM7ts9QCs9op05quwqAq2P7OQBqk9pwHhlFXgEMIDBAryg6vZ25iJK8uzMZXKjodAaWkdVVHgMBotj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C";function fn(t,a,n=48){if(!a||!t)return"";let i=String(t),s=i.toLowerCase(),d=String(a).toLowerCase();if(!d)return"";let g=s.indexOf(d);if(g<0)return"";let S=Math.max(0,g-n),f=Math.min(i.length,g+d.length+n),y=i.slice(S,f).replace(/\s+/g," ").trim();return(S>0?"\u2026":"")+y+(f<i.length?"\u2026":"")}function Ba(t,a){let n=String(a||"").trim().toLowerCase();if(!n)return!0;let i=t||{},s=Array.isArray(i.tags)?i.tags.map(g=>String(g)):[],d=[i.title,i.summary,i.reason,i.path,i.submittedBy,...s].map(g=>String(g||"")).join(`
|
|
12
|
-
`).toLowerCase();return n.split(/\s+/).filter(Boolean).every(
|
|
8
|
+
`)){let m=s.indexOf(":");if(m<=0)continue;let b=s.slice(0,m).trim(),k=s.slice(m+1).trim().replace(/^["']|["']$/g,"");b&&i.push([b,k])}return{meta:i,body:a.slice(n[0].length)}}function gn(t){let a=String(t||"").trim().replace(/^\[|\]$/g,"");return a?a.split(",").map(n=>n.trim().replace(/^["']|["']$/g,"")).filter(Boolean):[]}function la(t){let a=ha(String(t||"").replace(/\r\n?/g,`
|
|
9
|
+
`)).body;if(!a.trim())return"";let n=[],i=a.replace(/```([\w+#.-]*)\n([\s\S]*?)```/g,(z,$,j)=>(n.push('<pre class="md-pre"><code>'+Ea(j.replace(/\n$/,""))+"</code></pre>"),"\0F"+(n.length-1)+"\0")),s=[],m=0,b=[],k=null,f=null,y=()=>{b.length&&(s.push('<p class="md-p">'+b.join("<br/>")+"</p>"),b=[])},u=()=>{if(!k)return;let z=k.type;s.push("<"+z+' class="md-'+z+'">'+k.items.map($=>"<li>"+$+"</li>").join("")+"</"+z+">"),k=null},v=()=>{if(!f)return;let[z,$]=No(f);s.push('<div class="md-callout md-c-'+$+'"><span class="md-ico">'+z+"</span>"+f.join("<br/>")+"</div>"),f=null},N=()=>{y(),u(),v()};for(let z of i.split(`
|
|
10
|
+
`)){let $=z.trim();if(!$){N();continue}let j=/^\u0000F(\d+)\u0000$/.exec($);if(j){N(),s.push(n[Number(j[1])]);continue}let R;if(R=/^(#{1,6})\s+(.+)$/.exec($)){N();let[I,D]=So(R[2]);m++,s.push('<div id="md-h-'+m+'" class="md-h md-h-'+(R[1].length<=2?"h1":"h2")+" md-c-"+D+'"><span class="md-ico">'+I+'</span><span class="md-hx">'+ta(R[2])+"</span></div>");continue}if(/^(-{3,}|\*{3,}|_{3,})$/.test($)){N(),s.push('<hr class="md-hr"/>');continue}if(R=/^>\s?(.*)$/.exec($)){y(),u(),f=f||[],f.push(ta(R[1]));continue}if(R=/^[-*+]\s+(.+)$/.exec($)){y(),v(),(!k||k.type!=="ul")&&(u(),k={type:"ul",items:[]}),k.items.push(ta(R[1]));continue}if(R=/^\d+[.)]\s+(.+)$/.exec($)){y(),v(),(!k||k.type!=="ol")&&(u(),k={type:"ol",items:[]}),k.items.push(ta(R[1]));continue}u(),v(),b.push(ta($))}return N(),s.join(`
|
|
11
|
+
`)}var ya="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABccElEQVR4nO19B3hcxdX2e+buriR3cAndFIPtXbmq7cpFphhMTUiQvzTSCSEkBMiXAAFiTAgtDUghBL4vyUcC/BaEhGowxXLRSrJkY1taGzDVtLiAu6TdvXP+59xdOStZsnW3S7vv8zjE17szd2fec2bmzClAHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555NGfQJl+gTySi5erqhzO0LaxHFSczHbJpSnkHPXOqbW14WS2m0dm4chw/3kkGYM7ts9QCs9op05quwqAq2P7OQBqk9pwHhlFXgEMIDBAryg6vZ25iJK8uzMZXKjodAaWkdVVHgMBotjzGChYAApBVyVb+AXSprQtfSS77Twyh7wCGEBYunTKMK0xPVXtS9vSR6razyP9yCuAAYTC9o4yJgxOVfvStvSRqvbzSD/yCmAAwUnGrIHQRx7pQ14BDByQSfCl4vy/v4NoH/nr44GDvAIYIHjX6y0kQsq359KH9JXqfv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dUVaVwxTeByRTT7gFU/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 fn(t,a,n=48){if(!a||!t)return"";let i=String(t),s=i.toLowerCase(),m=String(a).toLowerCase();if(!m)return"";let b=s.indexOf(m);if(b<0)return"";let k=Math.max(0,b-n),f=Math.min(i.length,b+m.length+n),y=i.slice(k,f).replace(/\s+/g," ").trim();return(k>0?"\u2026":"")+y+(f<i.length?"\u2026":"")}function Ba(t,a){let n=String(a||"").trim().toLowerCase();if(!n)return!0;let i=t||{},s=Array.isArray(i.tags)?i.tags.map(b=>String(b)):[],m=[i.title,i.summary,i.reason,i.path,i.submittedBy,...s].map(b=>String(b||"")).join(`
|
|
12
|
+
`).toLowerCase();return n.split(/\s+/).filter(Boolean).every(b=>m.includes(b))}function bn({hasVersion:t=!1,hostVersion:a="",onDisk:n="",residentServed:i="",residentPresent:s=!1,residentManaged:m=null,residentManagedKnown:b=null,residentManagedBy:k="",replaceBlocked:f=null}={}){let y=String(n||""),u=String(a||""),v=String(i||""),N=!!(t&&s&&!v),z=!!(y&&v&&v!==y),$=m===!1&&b===!1,j=k==="host",R=m===!1&&!$&&!j,I=!!(u&&y&&u!==y),D=!!(f&&f.fresh),W=z||N||R||$,ge=null;I?ge="hostProcessStale":N?ge="residentDown":D?ge="residentReplaceBlocked":$?ge="residentLockUnknown":R&&(ge="residentUnmanaged");let oe;return N?oe="restartStart":z?oe="restartFixes":R||$?oe="restartRepair":I?oe="restartHostOnly":oe="restartAnyway",{showButton:!!t,emphasis:W,warn:ge,hint:oe,hostStale:I,residentDown:N,residentStale:z,residentUnmanaged:R,residentLockUnknown:$,residentHostManaged:j,needsRestart:W}}var Mo=/^\d{4}-\d{2}-\d{2}$/,xa=t=>String(t).padStart(2,"0");function ca(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(Mo.test(a)){let[i,s,m]=a.split("-").map(Number),b=new Date(i,s-1,m);return Number.isNaN(b.getTime())?null:b}let n=new Date(a);return Number.isNaN(n.getTime())?null:n}var hn=t=>`${t.getFullYear()}-${xa(t.getMonth()+1)}-${xa(t.getDate())}`,yn=t=>`${xa(t.getHours())}:${xa(t.getMinutes())}`;function va(t){let a=ca(t);return a?hn(a):""}function ja(t){let a=ca(t);return a?hn(a)+" "+yn(a):""}function xn(t){let a=ca(t);return a?yn(a):""}function vn(t={}){let a=t.repo||"EternalNight996/memory-eternal",n=String(t.title||"[Bug] ").slice(0,120),i=Array.isArray(t.labels)?t.labels:["bug"],s=Number(t.maxLength)>500?Number(t.maxLength):7e3,m=f=>{let y=new URLSearchParams;return y.set("title",n),y.set("body",f),i.length&&y.set("labels",i.join(",")),"https://github.com/"+a+"/issues/new?"+y.toString()},b=String(t.body||""),k=m(b);if(k.length>s){let f=`
|
|
13
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`,y=u=>
|
|
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`,y=u=>m(b.slice(0,u)+f);if(y(0).length>s)b=f;else{let u=0,v=b.length;for(;u<v;){let N=Math.ceil((u+v)/2);y(N).length<=s?u=N:v=N-1}b=b.slice(0,u)+f}k=m(b)}return k}function wn(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
15
|
`)}var Ha="https://github.com/EternalNight996/memory-eternal",To=["\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"+Ha,"","\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
|
-
`),
|
|
17
|
-
`);function kn(t={}){let a=t.lang==="en"?"en":"zh",n=a==="en"?Ao:To,i=t.repo||"EternalNight996/memory-eternal";return n=n.split(Ha).join("https://github.com/"+i),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 Sn({panX:t=0,panY:a=0,zoom:n=1,w:i=0,h:s=0,margin:d=60}={}){let g=n||1;return{x0:(0-t)/g-d,y0:(0-a)/g-d,x1:(i-t)/g+d,y1:(s-a)/g+d}}function wa(t,a,n,i){return i?t+n>=i.x0&&t-n<=i.x1&&a+n>=i.y0&&a-n<=i.y1:!0}function Nn(t,a=0){let n=Number(t)||0,i=Number(a)||0;if(n<=60)return 1/0;let s=n<=600?64:48;return i>=3?Math.min(s,32):s}function Cn(t,a={}){let n=Number.isFinite(a.limit)?a.limit:1/0,i=new Set,s=y=>{y&&i.size<n&&i.add(y)};if(s(a.focusId),s(a.hoverId),a.searchHits)for(let y of a.searchHits){if(i.size>=n)break;i.add(y)}let d=a.degree||{},g=y=>Number(d[y])||0,S=new Set;for(let y of Array.isArray(t)?t:[])y&&y.id&&S.add(y.id);let f=Array.isArray(a.order)&&a.order.length?a.order:(Array.isArray(t)?t:[]).slice().sort((y,u)=>g(u.id)-g(y.id)).map(y=>y.id);for(let y of f){if(i.size>=n)break;y&&S.has(y)&&!i.has(y)&&i.add(y)}return i}function Mn(t){let a=Math.floor(Number(t)||0);return a<=0?0:a>1200?48:a>700?60:a>300?110:200}function ka(t){let a=Math.floor(Number(t)||0),n=a>1e3?3e3:a>100?2e3:a>50?1200:800,i=a>100?.002:.005,s=a>1e3?.012:a>100?.005:.01,d=a>1e3?6:a>200?12:24;return{repulsion:n,attraction:i,centerGravity:s,velCap:d,theta:.8}}var Ro=.05,_a=30;function Oa(t,a,n,i){return(n>=t?1:0)+(i>=a?2:0)}var Wa=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,i){if(this.count>=this.cap)return-1;let s=this.count++;this.cx[s]=a,this.cy[s]=n,this.half[s]=i,this.mass[s]=0,this.mx[s]=0,this.my[s]=0,this.point[s]=-1;let d=s*4;return this.child[d]=-1,this.child[d+1]=-1,this.child[d+2]=-1,this.child[d+3]=-1,s}insert(a,n,i){let s=a[i];if(!s)return;let d=Number(s.x)||0,g=Number(s.y)||0;this.mass[n]+=1,this.mx[n]+=d,this.my[n]+=g;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]=i;return}let f=this.half[n]/2;if(f<.001||this.count+4>this.cap){this.point[n]=-2;return}let y=this.cx[n],u=this.cy[n];for(let v=0;v<4;v+=1)this.child[S+v]=this.newNode(y+(v&1?f:-f),u+(v&2?f:-f),f);let N=this.point[n];if(this.point[n]=-2,N>=0){let v=a[N];this.insert(a,this.child[S+Oa(y,u,Number(v.x)||0,Number(v.y)||0)],N)}this.insert(a,this.child[S+Oa(y,u,d,g)],i);return}this.insert(a,this.child[S+Oa(this.cx[n],this.cy[n],d,g)],i)}build(a){let n=a.length;if(this.count=0,this.lastVisits=0,n===0)return-1;let i=1/0,s=-1/0,d=1/0,g=-1/0;for(let N=0;N<n;N+=1){let v=Number(a[N].x)||0,M=Number(a[N].y)||0;v<i&&(i=v),v>s&&(s=v),M<d&&(d=M),M>g&&(g=M)}let S=(i+s)/2,f=(d+g)/2,y=Math.max(1,Math.max(s-i,g-d)/2)*1.001,u=this.newNode(S,f,y);if(u<0)return-1;for(let N=0;N<n;N+=1)this.insert(a,u,N);return u}accumulate(a,n,i,s,d,g){let S=this.mass[a];if(S<=0)return;let f=this.mx[a]/S,y=this.my[a]/S,u=i-f,N=s-y,v=u*u+N*N;if(v<1e-9)return;let M=this.child[a*4]===-1;if(M&&this.point[a]===n)return;let q=Math.sqrt(v);if(this.lastVisits+=1,M||2*this.half[a]/q<g){let R=d*S/v;this.fx[n]+=u/q*R,this.fy[n]+=N/q*R;return}let H=a*4;for(let R=0;R<4;R+=1){let J=this.child[H+R];J>=0&&this.accumulate(J,n,i,s,d,g)}}compute(a,n){let i=a.length;this.ensureCapacity(i);let s=this.fx,d=this.fy;s.fill(0),d.fill(0),this.lastVisits=0;let g=this.build(a);if(g<0)return{fx:s,fy:d,visits:0};let S=n.repulsion,f=n.theta===void 0?.8:n.theta,y=n.skipIndex===void 0?-1:n.skipIndex;for(let u=0;u<i;u+=1){if(u===y)continue;let N=a[u];this.accumulate(g,u,Number(N.x)||0,Number(N.y)||0,S,f)}return{fx:s,fy:d,visits:this.lastVisits}}};function Tn(t,a={}){let n=t.nodes,i=n.length,s=a.params||ka(i),d=a.theta===void 0?s.theta:a.theta;t.tickCount=(t.tickCount||0)+1;let g=a.settleTicks===void 0?460:a.settleTicks,S=a.alphaDecay===void 0?.08:a.alphaDecay;t.alpha===void 0&&(t.alpha=1),t.tickCount<=g?t.alpha=1:t.alpha+=((t.dragNode?.35:0)-t.alpha)*S,t.alpha<1e-4&&(t.alpha=0);let f=Math.max(0,Math.min(1,Number(a.alphaFloor)||0));t.alpha<f&&(t.alpha=f);let y=a.alpha===void 0?t.alpha:a.alpha,u=Math.min(.4,t.tickCount/1500),N=a.damping===void 0?.9-u:Math.max(.1,Math.min(.95,Number(a.damping)||.5)),v=t.dragNode?n.indexOf(t.dragNode):-1;(!t.forceEngine||t.forceEngine.capacity<i)&&(t.forceEngine=new Wa(i));let M=t.forceEngine.compute(n,{repulsion:s.repulsion*y,theta:d,skipIndex:v}),q=M.fx,H=M.fy;for(let U=0;U<i;U+=1){if(U===v)continue;let K=n[U],Y=q[U],_=H[U];if(Number.isFinite(Y)||(Y=0),Number.isFinite(_)||(_=0),t.clustered&&t.typeCenters&&t.typeCenters[K.type]){let fe=t.typeCenters[K.type];Y+=(fe.x-K.x)*.006*y,_+=(fe.y-K.y)*.006*y}else Y-=K.x*s.centerGravity*y,_-=K.y*s.centerGravity*y;let ae=((Number(K.vx)||0)+Y)*N,ue=((Number(K.vy)||0)+_)*N;ae>s.velCap?ae=s.velCap:ae<-s.velCap&&(ae=-s.velCap),ue>s.velCap?ue=s.velCap:ue<-s.velCap&&(ue=-s.velCap),K.vx=ae,K.vy=ue}let R=t.edges||[],J=t.edgePairs||null,F=t.nodeById||null,I=J?J.length/2:R.length;for(let U=0;U<I;U+=1){let K,Y;if(J)K=n[J[U*2]],Y=n[J[U*2+1]];else{let E=R[U];K=F?F.get(E.sourceNodeId):null,Y=F?F.get(E.targetNodeId):null}if(!K||!Y)continue;let _=Y.x-K.x,ae=Y.y-K.y,ue=Math.sqrt(_*_+ae*ae)||1,fe=(ue-100)*s.attraction*y,ge=_/ue*fe,Ae=ae/ue*fe;t.dragNode!==K&&(K.vx+=ge,K.vy+=Ae),t.dragNode!==Y&&(Y.vx-=ge,Y.vy-=Ae)}let pe=0;for(let U=0;U<i;U+=1){let K=n[U];U!==v&&(K.x+=K.vx,K.y+=K.vy,pe+=K.vx*K.vx+K.vy*K.vy)}let Z=i?Math.sqrt(pe/i):0;return Z<Ro&&t.tickCount>60&&!t.dragNode?t.quietTicks=(t.quietTicks|0)+1:t.quietTicks=0,{rms:Z,tickCount:t.tickCount,quietTicks:t.quietTicks,params:s,visits:M.visits,alpha:y}}function Xt(t){return(Array.isArray(t)?t:[]).filter(Boolean).join("/")}function An(t){return String(t??"").split("/").filter(Boolean)}function Rn(t,a,n={}){let i=Xt(a);return`${t}/graph/level?path=${encodeURIComponent(i)}${n.all?"&all=1":""}`}function zo(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 Do({kind:t="other",degree:a=0,maxDegree:n=1}={}){let i=Math.max(0,Number(a)||0),s=Math.max(1,Number(n)||1);return 9+Math.min(10,i/s*8)+(t==="core"?3:0)}function zn(t,a={}){let n=Math.max(0,Math.floor(Number(t)||0));if(n<1e4)return String(n);let i=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 i==="\u4E07"?Math.round(n/1e3)/10+"\u4E07":n>=1e6?Math.round(n/1e5)/10+"M":Math.round(n/100)/10+"K"}function Dn(t,a={}){let n=t||{},i=n.type==="planet",s=n.kind||"other",d=String(n.label||n.title||n.name||n.id||"");return{id:String(n.id||""),title:d,name:d,type:s,planet:i,count:i?Math.max(0,Math.floor(Number(n.count)||0)):0,tags:Array.isArray(n.tags)?n.tags.slice():[],updated:n.updated||"",r:i?zo(n.count):Do({kind:s,degree:a.degree,maxDegree:a.maxDegree})}}function Ln(t){return{...t||{},repulsion:1600,centerGravity:.004}}function Fn(t,a={}){let n=Math.max(1,Number(a.timeoutMs)||1600),i=Math.max(0,Number(a.elapsedMs)||0),s=String(t&&t.name||""),d=String(t&&t.message||t||""),S=s==="AbortError"||/abort/i.test(d)||i>=n;return{timeout:S,message:S?`\u5C42\u7EA7\u52A0\u8F7D\u8D85\u65F6\uFF08${n}ms\uFF09`:d||"\u672A\u77E5\u9519\u8BEF"}}function In(t=96){let a=Math.max(1,Math.floor(Number(t)||96)),n=new Map;return{get size(){return n.size},has(i){return n.has(i)},get(i){if(!n.has(i))return null;let s=n.get(i);return n.delete(i),n.set(i,s),s},set(i,s){for(n.has(i)&&n.delete(i),n.set(i,s);n.size>a;)n.delete(n.keys().next().value);return s},clear(){n.clear()},keys(){return[...n.keys()]}}}function Pn(t={}){let a=t.raf||(f=>requestAnimationFrame(f)),n=t.cancelRaf||(f=>cancelAnimationFrame(f)),i=t.setTimeout||((f,y)=>setTimeout(f,y)),s=t.clearTimeout||(f=>clearTimeout(f)),d=new Set,g=new Set,S=[];return{raf(f){let y=a(()=>{d.delete(y),f()});return d.add(y),y},cancelRaf(f){f!=null&&(d.delete(f),n(f))},setTimeout(f,y){let u=i(()=>{g.delete(u),f()},y);return g.add(u),u},clearTimeout(f){f!=null&&(g.delete(f),s(f))},listen(f,y,u,N){f.addEventListener(y,u,N),S.push({target:f,type:y,fn:u,opts:N})},snapshot(){return{rafs:d.size,timers:g.size,listeners:S.length}},releaseAll(){for(let f of[...d]){d.delete(f);try{n(f)}catch{}}for(let f of[...g]){g.delete(f);try{s(f)}catch{}}for(let f of S.splice(0))try{f.target.removeEventListener(f.type,f.fn,f.opts)}catch{}}}}function En(t,a={}){let n=Math.max(1,Number(a.maxItems)||1e3),i=Math.max(1,Number(a.payloadLimit)||1048576),s=t&&t.level&&Array.isArray(t.level.items)?t.level.items.length:0,d=Number(t&&t.stats&&t.stats.bytes)||0,g=[];return s>n&&g.push(`\u5355\u5C42\u56FE\u5143 ${s} > ${n}`),d>i&&g.push(`\u5C42 payload ${d} > ${i}`),{ok:g.length===0,items:s,bytes:d,problems:g}}function Lo(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 Bn(t,a){let n={...t||{}},i={};for(let[s,d]of Object.entries(a||{}))Lo(t?t[s]:void 0,d)||(n[s]=d,i[s]=d);return{values:n,overlay:i}}var e=require("react/jsx-runtime"),aa="memory-eternal",G="/memory-eternal/api",Sa=["\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"],jn="\u300A\u86CA\u771F\u4EBA\u300B\xB7 \u5927\u7231\u4ED9\u5C0A";async function Ca(t){try{let a=await fetch(`${G}/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 Io=100,Po=["slots","locale"],Gn={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",kindOther:"\u5176\u4ED6",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",graphLegendTitle:"\u5361\u7247\u5206\u5E03",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",graphToFlat:"\u5E73\u94FA\u5361\u7247\u56FE",graphToPlanet:"\u661F\u7403\u5206\u5C42\u89C6\u56FE",graphFlatAll:"\u663E\u793A\u5168\u90E8",graphFlatOnly:"\u53EA\u770B\u4E3B\u8981",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",workTitle:"\u672C\u4F1A\u8BDD\u5DE5\u4F5C\u533A",workHint:"\u4E34\u65F6\u8349\u7A3F \xB7 \u4E0D\u8FDB\u5165\u77E5\u8BC6\u5E93 \xB7 \u4E0D\u53C2\u4E0E\u53EC\u56DE",workLines:"\u884C",workExpand:"\u5C55\u5F00",workCollapse:"\u6536\u8D77",workPlaceholder:"\u8BB0\u4E0B\u8FD9\u4E2A\u4EFB\u52A1\u73B0\u5728\u505A\u5230\u54EA\u3001\u4E0B\u4E00\u6B65\u505A\u4EC0\u4E48\u2026\uFF08\u4F1A\u8BDD\u7ED3\u675F\u81EA\u52A8\u5F52\u6863\uFF09",workSave:"\u4FDD\u5B58\u8349\u7A3F",workPromote:"\u5B58\u4E3A\u5F85\u5BA1\u5361",workClear:"\u6E05\u7A7A",workClearConfirm:"\u6E05\u7A7A\u672C\u4F1A\u8BDD\u5DE5\u4F5C\u533A\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002",workSaved:"\u5DF2\u4FDD\u5B58\u4F1A\u8BDD\u5DE5\u4F5C\u533A",workCleared:"\u5DF2\u6E05\u7A7A\u4F1A\u8BDD\u5DE5\u4F5C\u533A",workPromoted:"\u5DF2\u63D0\u4EA4\u5BA1\u6838\uFF0C\u8BF7\u5728\u300C\u5F85\u5BA1\u300D\u91CC\u5904\u7406",workLimitHint:"\u4E0A\u9650 200 \u884C / 24KB\uFF0C\u8D85\u51FA\u622A\u65AD",workPromoteHint:"\u9009\u4E2D\u4E00\u6BB5\u65F6\u53EA\u664B\u5347\u9009\u4E2D\u90E8\u5206",workPromoteEmpty:"\u6CA1\u6709\u53EF\u664B\u5347\u7684\u5185\u5BB9",starAskTitle:"\u8BB0\u5FC6\u5DF2\u7ECF\u7528\u8D77\u6765\u4E86",starAskBody:"\u5DF2\u53EC\u56DE {recalls} \u6B21 \xB7 \u6C89\u6DC0 {cards} \u5F20\u5361\u3002\u5982\u679C\u5B83\u5E2E\u4F60\u7701\u8FC7\u65F6\u95F4\uFF0C\u7ED9\u4E2A Star \u4F1A\u8BA9\u66F4\u591A\u4EBA\u627E\u5230\u5B83\u3002",starAskGo:"\u53BB Star",starAskLater:"\u665A\u70B9\u518D\u8BF4",starAskNever:"\u4E0D\u518D\u63D0\u793A",tabConfig:"\u8BB0\u5FC6\u914D\u7F6E",configPageSub:"\u5199\u5165\u3001\u8DEF\u7531\u3001\u5BA1\u6838\u4E0E\u670D\u52A1\u7684\u672C\u5730\u914D\u7F6E",paneGeneral:"\u901A\u7528",paneMemory:"\u8BB0\u5FC6",paneAdvanced:"\u9AD8\u7EA7",paneService:"\u670D\u52A1",paneGeneralSub:"\u4E00\u952E\u65B9\u6848\u3001\u57FA\u7840\u5F00\u5173\u4E0E\u65E5\u5E38\u504F\u597D",paneMemorySub:"\u5E93\u76EE\u5F55\u3001\u53EC\u56DE\u4E0E\u6838\u5FC3\u8BB0\u5FC6",paneAdvancedSub:"\u6210\u672C\u63A7\u5236\u4E0E\u81EA\u52A8\u5BA1\u6838",paneServiceSub:"\u670D\u52A1\u5B88\u62A4\u3001\u7248\u672C\u4E0E MCP \u6302\u8F7D",basicSwitches:"\u57FA\u7840\u5F00\u5173",basicSwitchesHint:"\u8BB0\u5FC6\u6838\u5FC3\u7684\u603B\u5F00\u5173\u4E0E\u81EA\u52A8\u6C89\u6DC0 / \u53EC\u56DE",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",workingMemoryEnabled:"\u542F\u7528\u4F1A\u8BDD\u5DE5\u4F5C\u533A\uFF08\u8349\u7A3F\u672C\uFF09",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",supportAlipay:"\u652F\u4ED8\u5B9D",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]
|
|
16
|
+
`),zo=["I hit a problem while using memory-eternal (a DeepSeek Harness memory plugin). Please file it on GitHub for me.","","Repo: "+Ha,"","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 kn(t={}){let a=t.lang==="en"?"en":"zh",n=a==="en"?zo:To,i=t.repo||"EternalNight996/memory-eternal";return n=n.split(Ha).join("https://github.com/"+i),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 Sn({panX:t=0,panY:a=0,zoom:n=1,w:i=0,h:s=0,margin:m=60}={}){let b=n||1;return{x0:(0-t)/b-m,y0:(0-a)/b-m,x1:(i-t)/b+m,y1:(s-a)/b+m}}function wa(t,a,n,i){return i?t+n>=i.x0&&t-n<=i.x1&&a+n>=i.y0&&a-n<=i.y1:!0}function Nn(t,a=0){let n=Number(t)||0,i=Number(a)||0;if(n<=60)return 1/0;let s=n<=600?64:48;return i>=3?Math.min(s,32):s}function Cn(t,a={}){let n=Number.isFinite(a.limit)?a.limit:1/0,i=new Set,s=y=>{y&&i.size<n&&i.add(y)};if(s(a.focusId),s(a.hoverId),a.searchHits)for(let y of a.searchHits){if(i.size>=n)break;i.add(y)}let m=a.degree||{},b=y=>Number(m[y])||0,k=new Set;for(let y of Array.isArray(t)?t:[])y&&y.id&&k.add(y.id);let f=Array.isArray(a.order)&&a.order.length?a.order:(Array.isArray(t)?t:[]).slice().sort((y,u)=>b(u.id)-b(y.id)).map(y=>y.id);for(let y of f){if(i.size>=n)break;y&&k.has(y)&&!i.has(y)&&i.add(y)}return i}function Mn(t){let a=Math.floor(Number(t)||0);return a<=0?0:a>1200?48:a>700?60:a>300?110:200}function ka(t){let a=Math.floor(Number(t)||0),n=a>1e3?3e3:a>100?2e3:a>50?1200:800,i=a>100?.002:.005,s=a>1e3?.012:a>100?.005:.01,m=a>1e3?6:a>200?12:24;return{repulsion:n,attraction:i,centerGravity:s,velCap:m,theta:.8}}var Ao=.05,_a=30;function Oa(t,a,n,i){return(n>=t?1:0)+(i>=a?2:0)}var Wa=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,i){if(this.count>=this.cap)return-1;let s=this.count++;this.cx[s]=a,this.cy[s]=n,this.half[s]=i,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,i){let s=a[i];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 k=n*4;if(this.child[k]===-1&&this.child[k+1]===-1&&this.child[k+2]===-1&&this.child[k+3]===-1){if(this.point[n]===-1){this.point[n]=i;return}let f=this.half[n]/2;if(f<.001||this.count+4>this.cap){this.point[n]=-2;return}let y=this.cx[n],u=this.cy[n];for(let N=0;N<4;N+=1)this.child[k+N]=this.newNode(y+(N&1?f:-f),u+(N&2?f:-f),f);let v=this.point[n];if(this.point[n]=-2,v>=0){let N=a[v];this.insert(a,this.child[k+Oa(y,u,Number(N.x)||0,Number(N.y)||0)],v)}this.insert(a,this.child[k+Oa(y,u,m,b)],i);return}this.insert(a,this.child[k+Oa(this.cx[n],this.cy[n],m,b)],i)}build(a){let n=a.length;if(this.count=0,this.lastVisits=0,n===0)return-1;let i=1/0,s=-1/0,m=1/0,b=-1/0;for(let v=0;v<n;v+=1){let N=Number(a[v].x)||0,z=Number(a[v].y)||0;N<i&&(i=N),N>s&&(s=N),z<m&&(m=z),z>b&&(b=z)}let k=(i+s)/2,f=(m+b)/2,y=Math.max(1,Math.max(s-i,b-m)/2)*1.001,u=this.newNode(k,f,y);if(u<0)return-1;for(let v=0;v<n;v+=1)this.insert(a,u,v);return u}accumulate(a,n,i,s,m,b){let k=this.mass[a];if(k<=0)return;let f=this.mx[a]/k,y=this.my[a]/k,u=i-f,v=s-y,N=u*u+v*v;if(N<1e-9)return;let z=this.child[a*4]===-1;if(z&&this.point[a]===n)return;let $=Math.sqrt(N);if(this.lastVisits+=1,z||2*this.half[a]/$<b){let R=m*k/N;this.fx[n]+=u/$*R,this.fy[n]+=v/$*R;return}let j=a*4;for(let R=0;R<4;R+=1){let I=this.child[j+R];I>=0&&this.accumulate(I,n,i,s,m,b)}}compute(a,n){let i=a.length;this.ensureCapacity(i);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 k=n.repulsion,f=n.theta===void 0?.8:n.theta,y=n.skipIndex===void 0?-1:n.skipIndex;for(let u=0;u<i;u+=1){if(u===y)continue;let v=a[u];this.accumulate(b,u,Number(v.x)||0,Number(v.y)||0,k,f)}return{fx:s,fy:m,visits:this.lastVisits}}};function Tn(t,a={}){let n=t.nodes,i=n.length,s=a.params||ka(i),m=a.theta===void 0?s.theta:a.theta;t.tickCount=(t.tickCount||0)+1;let b=a.settleTicks===void 0?460:a.settleTicks,k=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)*k,t.alpha<1e-4&&(t.alpha=0);let f=Math.max(0,Math.min(1,Number(a.alphaFloor)||0));t.alpha<f&&(t.alpha=f);let y=a.alpha===void 0?t.alpha:a.alpha,u=Math.min(.4,t.tickCount/1500),v=a.damping===void 0?.9-u:Math.max(.1,Math.min(.95,Number(a.damping)||.5)),N=t.dragNode?n.indexOf(t.dragNode):-1;(!t.forceEngine||t.forceEngine.capacity<i)&&(t.forceEngine=new Wa(i));let z=t.forceEngine.compute(n,{repulsion:s.repulsion*y,theta:m,skipIndex:N}),$=z.fx,j=z.fy;for(let q=0;q<i;q+=1){if(q===N)continue;let _=n[q],Y=$[q],G=j[q];if(Number.isFinite(Y)||(Y=0),Number.isFinite(G)||(G=0),t.clustered&&t.typeCenters&&t.typeCenters[_.type]){let ue=t.typeCenters[_.type];Y+=(ue.x-_.x)*.006*y,G+=(ue.y-_.y)*.006*y}else Y-=_.x*s.centerGravity*y,G-=_.y*s.centerGravity*y;let Z=((Number(_.vx)||0)+Y)*v,fe=((Number(_.vy)||0)+G)*v;Z>s.velCap?Z=s.velCap:Z<-s.velCap&&(Z=-s.velCap),fe>s.velCap?fe=s.velCap:fe<-s.velCap&&(fe=-s.velCap),_.vx=Z,_.vy=fe}let R=t.edges||[],I=t.edgePairs||null,D=t.nodeById||null,W=I?I.length/2:R.length;for(let q=0;q<W;q+=1){let _,Y;if(I)_=n[I[q*2]],Y=n[I[q*2+1]];else{let P=R[q];_=D?D.get(P.sourceNodeId):null,Y=D?D.get(P.targetNodeId):null}if(!_||!Y)continue;let G=Y.x-_.x,Z=Y.y-_.y,fe=Math.sqrt(G*G+Z*Z)||1,ue=(fe-100)*s.attraction*y,de=G/fe*ue,Re=Z/fe*ue;t.dragNode!==_&&(_.vx+=de,_.vy+=Re),t.dragNode!==Y&&(Y.vx-=de,Y.vy-=Re)}let ge=0;for(let q=0;q<i;q+=1){let _=n[q];q!==N&&(_.x+=_.vx,_.y+=_.vy,ge+=_.vx*_.vx+_.vy*_.vy)}let oe=i?Math.sqrt(ge/i):0;return oe<Ao&&t.tickCount>60&&!t.dragNode?t.quietTicks=(t.quietTicks|0)+1:t.quietTicks=0,{rms:oe,tickCount:t.tickCount,quietTicks:t.quietTicks,params:s,visits:z.visits,alpha:y}}function Xt(t){return(Array.isArray(t)?t:[]).filter(Boolean).join("/")}function zn(t){return String(t??"").split("/").filter(Boolean)}function An(t,a,n={}){let i=Xt(a);return`${t}/graph/level?path=${encodeURIComponent(i)}${n.all?"&all=1":""}`}function Ro(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 Do({kind:t="other",degree:a=0,maxDegree:n=1}={}){let i=Math.max(0,Number(a)||0),s=Math.max(1,Number(n)||1);return 9+Math.min(10,i/s*8)+(t==="core"?3:0)}function Rn(t,a={}){let n=Math.max(0,Math.floor(Number(t)||0));if(n<1e4)return String(n);let i=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 i==="\u4E07"?Math.round(n/1e3)/10+"\u4E07":n>=1e6?Math.round(n/1e5)/10+"M":Math.round(n/100)/10+"K"}function Dn(t,a={}){let n=t||{},i=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:i,count:i?Math.max(0,Math.floor(Number(n.count)||0)):0,tags:Array.isArray(n.tags)?n.tags.slice():[],updated:n.updated||"",r:i?Ro(n.count):Do({kind:s,degree:a.degree,maxDegree:a.maxDegree})}}function Ln(t){return{...t||{},repulsion:1600,centerGravity:.004}}function Fn(t,a={}){let n=Math.max(1,Number(a.timeoutMs)||1600),i=Math.max(0,Number(a.elapsedMs)||0),s=String(t&&t.name||""),m=String(t&&t.message||t||""),k=s==="AbortError"||/abort/i.test(m)||i>=n;return{timeout:k,message:k?`\u5C42\u7EA7\u52A0\u8F7D\u8D85\u65F6\uFF08${n}ms\uFF09`:m||"\u672A\u77E5\u9519\u8BEF"}}function In(t=96){let a=Math.max(1,Math.floor(Number(t)||96)),n=new Map;return{get size(){return n.size},has(i){return n.has(i)},get(i){if(!n.has(i))return null;let s=n.get(i);return n.delete(i),n.set(i,s),s},set(i,s){for(n.has(i)&&n.delete(i),n.set(i,s);n.size>a;)n.delete(n.keys().next().value);return s},clear(){n.clear()},keys(){return[...n.keys()]}}}function Pn(t={}){let a=t.raf||(f=>requestAnimationFrame(f)),n=t.cancelRaf||(f=>cancelAnimationFrame(f)),i=t.setTimeout||((f,y)=>setTimeout(f,y)),s=t.clearTimeout||(f=>clearTimeout(f)),m=new Set,b=new Set,k=[];return{raf(f){let y=a(()=>{m.delete(y),f()});return m.add(y),y},cancelRaf(f){f!=null&&(m.delete(f),n(f))},setTimeout(f,y){let u=i(()=>{b.delete(u),f()},y);return b.add(u),u},clearTimeout(f){f!=null&&(b.delete(f),s(f))},listen(f,y,u,v){f.addEventListener(y,u,v),k.push({target:f,type:y,fn:u,opts:v})},snapshot(){return{rafs:m.size,timers:b.size,listeners:k.length}},releaseAll(){for(let f of[...m]){m.delete(f);try{n(f)}catch{}}for(let f of[...b]){b.delete(f);try{s(f)}catch{}}for(let f of k.splice(0))try{f.target.removeEventListener(f.type,f.fn,f.opts)}catch{}}}}function En(t,a={}){let n=Math.max(1,Number(a.maxItems)||1e3),i=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>i&&b.push(`\u5C42 payload ${m} > ${i}`),{ok:b.length===0,items:s,bytes:m,problems:b}}function Lo(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 Bn(t,a){let n={...t||{}},i={};for(let[s,m]of Object.entries(a||{}))Lo(t?t[s]:void 0,m)||(n[s]=m,i[s]=m);return{values:n,overlay:i}}var e=require("react/jsx-runtime"),aa="memory-eternal",K="/memory-eternal/api",Sa=["\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"],jn="\u300A\u86CA\u771F\u4EBA\u300B\xB7 \u5927\u7231\u4ED9\u5C0A";async function Ca(t){try{let a=await fetch(`${K}/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 Io=100,Po=["slots","locale"],Gn={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",kindOther:"\u5176\u4ED6",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",graphLegendTitle:"\u5361\u7247\u5206\u5E03",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",graphToFlat:"\u5E73\u94FA\u5361\u7247\u56FE",graphToPlanet:"\u661F\u7403\u5206\u5C42\u89C6\u56FE",graphFlatAll:"\u663E\u793A\u5168\u90E8",graphFlatOnly:"\u53EA\u770B\u4E3B\u8981",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",workTitle:"\u672C\u4F1A\u8BDD\u5DE5\u4F5C\u533A",workHint:"\u4E34\u65F6\u8349\u7A3F \xB7 \u4E0D\u8FDB\u5165\u77E5\u8BC6\u5E93 \xB7 \u4E0D\u53C2\u4E0E\u53EC\u56DE",workLines:"\u884C",workExpand:"\u5C55\u5F00",workCollapse:"\u6536\u8D77",workPlaceholder:"\u8BB0\u4E0B\u8FD9\u4E2A\u4EFB\u52A1\u73B0\u5728\u505A\u5230\u54EA\u3001\u4E0B\u4E00\u6B65\u505A\u4EC0\u4E48\u2026\uFF08\u4F1A\u8BDD\u7ED3\u675F\u81EA\u52A8\u5F52\u6863\uFF09",workSave:"\u4FDD\u5B58\u8349\u7A3F",workPromote:"\u5B58\u4E3A\u5F85\u5BA1\u5361",workClear:"\u6E05\u7A7A",workClearConfirm:"\u6E05\u7A7A\u672C\u4F1A\u8BDD\u5DE5\u4F5C\u533A\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002",workSaved:"\u5DF2\u4FDD\u5B58\u4F1A\u8BDD\u5DE5\u4F5C\u533A",workCleared:"\u5DF2\u6E05\u7A7A\u4F1A\u8BDD\u5DE5\u4F5C\u533A",workPromoted:"\u5DF2\u63D0\u4EA4\u5BA1\u6838\uFF0C\u8BF7\u5728\u300C\u5F85\u5BA1\u300D\u91CC\u5904\u7406",workLimitHint:"\u4E0A\u9650 200 \u884C / 24KB\uFF0C\u8D85\u51FA\u622A\u65AD",workPromoteHint:"\u9009\u4E2D\u4E00\u6BB5\u65F6\u53EA\u664B\u5347\u9009\u4E2D\u90E8\u5206",workPromoteEmpty:"\u6CA1\u6709\u53EF\u664B\u5347\u7684\u5185\u5BB9",starAskTitle:"\u8BB0\u5FC6\u5DF2\u7ECF\u7528\u8D77\u6765\u4E86",starAskBody:"\u5DF2\u53EC\u56DE {recalls} \u6B21 \xB7 \u6C89\u6DC0 {cards} \u5F20\u5361\u3002\u5982\u679C\u5B83\u5E2E\u4F60\u7701\u8FC7\u65F6\u95F4\uFF0C\u7ED9\u4E2A Star \u4F1A\u8BA9\u66F4\u591A\u4EBA\u627E\u5230\u5B83\u3002",starAskGo:"\u53BB Star",starAskLater:"\u665A\u70B9\u518D\u8BF4",starAskNever:"\u4E0D\u518D\u63D0\u793A",tabConfig:"\u8BB0\u5FC6\u914D\u7F6E",configPageSub:"\u5199\u5165\u3001\u8DEF\u7531\u3001\u5BA1\u6838\u4E0E\u670D\u52A1\u7684\u672C\u5730\u914D\u7F6E",paneGeneral:"\u901A\u7528",paneMemory:"\u8BB0\u5FC6",paneAdvanced:"\u9AD8\u7EA7",paneService:"\u670D\u52A1",paneGeneralSub:"\u4E00\u952E\u65B9\u6848\u3001\u57FA\u7840\u5F00\u5173\u4E0E\u65E5\u5E38\u504F\u597D",paneMemorySub:"\u5E93\u76EE\u5F55\u3001\u53EC\u56DE\u4E0E\u6838\u5FC3\u8BB0\u5FC6",paneAdvancedSub:"\u6210\u672C\u63A7\u5236\u4E0E\u81EA\u52A8\u5BA1\u6838",paneServiceSub:"\u670D\u52A1\u5B88\u62A4\u3001\u7248\u672C\u4E0E MCP \u6302\u8F7D",basicSwitches:"\u57FA\u7840\u5F00\u5173",basicSwitchesHint:"\u8BB0\u5FC6\u6838\u5FC3\u7684\u603B\u5F00\u5173\u4E0E\u81EA\u52A8\u6C89\u6DC0 / \u53EC\u56DE",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",workingMemoryEnabled:"\u542F\u7528\u4F1A\u8BDD\u5DE5\u4F5C\u533A\uFF08\u8349\u7A3F\u672C\uFF09",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",supportAlipay:"\u652F\u4ED8\u5B9D",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\uFF1BAUTH/401 \u7B49\u9274\u6743\u5931\u8D25 \u2192 \u66F4\u65B0\u5BF9\u5E94 provider \u7684 Key \u6216\u6362\u84B8\u998F\u6A21\u578B\uFF1B\u786E\u8BA4\u662F\u63A5\u53E3/\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u518D\u66F4\u65B0 memory-eternal\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 po=Object.create;var ba=Object.defineProperty;var mo=Object.getOwnPropertyDe
|
|
|
59
59
|
-
|
|
60
60
|
|
|
61
61
|
## \u98CE\u9669/\u963B\u585E
|
|
62
|
-
- `},Kn={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",kindOther:"Other",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.",graphLegendTitle:"Card types",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",graphToFlat:"Flat cards",graphToPlanet:"Planet layers",graphFlatAll:"Show all",graphFlatOnly:"Top only",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",workTitle:"This session's workspace",workHint:"scratch note \xB7 not knowledge \xB7 never recalled",workLines:"lines",workExpand:"Expand",workCollapse:"Collapse",workPlaceholder:"Where this task stands, what is next\u2026 (archived when the session ends)",workSave:"Save draft",workPromote:"Save as pending card",workClear:"Clear",workClearConfirm:"Clear this session workspace? This cannot be undone.",workSaved:"Session workspace saved",workCleared:"Session workspace cleared",workPromoted:"Submitted for review",workLimitHint:"capped at 200 lines / 24KB, truncated",workPromoteHint:"select a passage to promote only that",workPromoteEmpty:"Nothing to promote",starAskTitle:"Memory is being used",starAskBody:"Recalled {recalls} times \xB7 {cards} cards captured. If it saved you time, a Star helps others find it.",starAskGo:"Star on GitHub",starAskLater:"Later",starAskNever:"Don't ask again",tabConfig:"Memory Config",configPageSub:"Local write, routing, audit and service settings",paneGeneral:"General",paneMemory:"Memory",paneAdvanced:"Advanced",paneService:"Service",paneGeneralSub:"Presets, core switches and daily preferences",paneMemorySub:"Vault, recall and core memory",paneAdvancedSub:"Cost control and auto-audit",paneServiceSub:"Service watchdog, version and MCP status",basicSwitches:"Core switches",basicSwitchesHint:"Master switch plus auto-capture / auto-recall",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",workingMemoryEnabled:"Enable session workspace (scratchpad)",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.",supportAlipay:"Alipay",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]
|
|
62
|
+
- `},Kn={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",kindOther:"Other",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.",graphLegendTitle:"Card types",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",graphToFlat:"Flat cards",graphToPlanet:"Planet layers",graphFlatAll:"Show all",graphFlatOnly:"Top only",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",workTitle:"This session's workspace",workHint:"scratch note \xB7 not knowledge \xB7 never recalled",workLines:"lines",workExpand:"Expand",workCollapse:"Collapse",workPlaceholder:"Where this task stands, what is next\u2026 (archived when the session ends)",workSave:"Save draft",workPromote:"Save as pending card",workClear:"Clear",workClearConfirm:"Clear this session workspace? This cannot be undone.",workSaved:"Session workspace saved",workCleared:"Session workspace cleared",workPromoted:"Submitted for review",workLimitHint:"capped at 200 lines / 24KB, truncated",workPromoteHint:"select a passage to promote only that",workPromoteEmpty:"Nothing to promote",starAskTitle:"Memory is being used",starAskBody:"Recalled {recalls} times \xB7 {cards} cards captured. If it saved you time, a Star helps others find it.",starAskGo:"Star on GitHub",starAskLater:"Later",starAskNever:"Don't ask again",tabConfig:"Memory Config",configPageSub:"Local write, routing, audit and service settings",paneGeneral:"General",paneMemory:"Memory",paneAdvanced:"Advanced",paneService:"Service",paneGeneralSub:"Presets, core switches and daily preferences",paneMemorySub:"Vault, recall and core memory",paneAdvancedSub:"Cost control and auto-audit",paneServiceSub:"Service watchdog, version and MCP status",basicSwitches:"Core switches",basicSwitchesHint:"Master switch plus auto-capture / auto-recall",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",workingMemoryEnabled:"Enable session workspace (scratchpad)",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.",supportAlipay:"Alipay",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; on AUTH/401 (bad key) update that provider's key or switch the distillation model; only update memory-eternal on a confirmed API/version mismatch.`,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
|
-
- `},Ma=["all","core","project","knowledge","skill","content","prompt","business","tool","mistake"],Yn=Ma.filter(t=>t!=="all"&&t!=="core"),ft={core:"#FF7A45",skill:"#8B5CF6",project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},Ua=t=>Array.isArray(t&&t.tags)?t.tags:[],Gt={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}"},
|
|
107
|
+
- `},Ma=["all","core","project","knowledge","skill","content","prompt","business","tool","mistake"],Yn=Ma.filter(t=>t!=="all"&&t!=="core"),ft={core:"#FF7A45",skill:"#8B5CF6",project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},Ua=t=>Array.isArray(t&&t.tags)?t.tags:[],Gt={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:"kindOther"},ma="deepseek-harness",qt=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":ma:n==="deepseek harness"?ma:a.split(":")[0]||ma},Eo=[ma,"claude","codex","cursor","codex-desktop"],Vn=(t=[])=>[...new Set([...Eo,...(t||[]).map(qt)])],Bo={boot:["\u{1F680}","#8b5cf6"],listen:["\u{1F442}","inherit"],created:["\u2705","#10b981"],appended:["\u2795","#3b82f6"],skip:["\u23ED","#f59e0b"],warn:["\u26A0\uFE0F","#f59e0b"],fail:["\u274C","#ef4444"]},bt=`
|
|
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; }
|
|
@@ -276,6 +276,97 @@ Option A, because:
|
|
|
276
276
|
.mc-vault-head { display: none; }
|
|
277
277
|
.mc-vault-row { grid-template-columns: 1fr auto; }
|
|
278
278
|
}
|
|
279
|
+
/* ===== \u8BB0\u5FC6\u914D\u7F6E\uFF1AH5 / PC / DSH \u5F39\u7A97\u4E09\u7AEF\u54CD\u5E94\u5F0F\uFF08\u9875\u9762\u5BFC\u822A + \u5361\u7247 + \u7C98\u6027\u4FDD\u5B58\uFF09 ===== */
|
|
280
|
+
.mc-cfg-page { width: 100%; max-width: 820px; margin: 0 auto; padding: 4px 2px 0; box-sizing: border-box; }
|
|
281
|
+
.mc-cfg-layout { display: block; width: 100%; }
|
|
282
|
+
.mc-cfg-main { min-width: 0; }
|
|
283
|
+
.mc-pagenav { position: sticky; top: 0; z-index: 23; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 12px; border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); background: rgba(127,127,127,.06); }
|
|
284
|
+
.mc-pagebtn { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 8px 4px; border: 0; border-radius: 9px; background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; opacity: .66; white-space: nowrap; }
|
|
285
|
+
.mc-pagebtn:hover { opacity: 1; background: rgba(127,127,127,.10); }
|
|
286
|
+
.mc-pagebtn.on { opacity: 1; font-weight: 650; color: #fff; background: linear-gradient(135deg, #ff8a4d, #ff6a2b); box-shadow: 0 4px 14px rgba(255,106,43,.35); }
|
|
287
|
+
.mc-pagebtn.on:hover { background: linear-gradient(135deg, #ff8a4d, #ff6a2b); }
|
|
288
|
+
.mc-pagebtn:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary, #3b82f6); outline-offset: 1px; }
|
|
289
|
+
.mc-pagebtn-ico { font-size: 13px; flex: none; }
|
|
290
|
+
.mc-pagebtn-txt { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
|
|
291
|
+
.mc-pagebtn-sub { display: none; }
|
|
292
|
+
.mc-panehead { display: flex; align-items: center; gap: 12px; padding: 2px 4px 14px; }
|
|
293
|
+
.mc-panehead-ico { flex: none; width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: linear-gradient(135deg, rgba(255,122,69,.30), rgba(255,122,69,.07)); border: 1px solid rgba(255,122,69,.24); }
|
|
294
|
+
.mc-panehead-title { font-size: 15.5px; font-weight: 700; letter-spacing: .2px; }
|
|
295
|
+
.mc-panehead-sub { font-size: 11.5px; opacity: .55; margin-top: 3px; line-height: 1.5; }
|
|
296
|
+
.mc-cfg-sec { border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 14px; background: rgba(127,127,127,.045); padding: 14px 16px !important; margin: 0 0 12px !important; }
|
|
297
|
+
.me-v5 .mc-cfg-sec { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.09); }
|
|
298
|
+
.mc-cfg-sec-head { padding: 0; margin-bottom: 12px; }
|
|
299
|
+
.mc-cfg-sec-body { padding: 0; }
|
|
300
|
+
.mc-cfg-switches { grid-template-columns: minmax(0, 1fr); gap: 0; }
|
|
301
|
+
.mc-cfg-switches .mc-switch { flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid rgba(127,127,127,.10); border-radius: 0; background: transparent; padding: 10px 2px; }
|
|
302
|
+
.mc-cfg-switches .mc-switch:last-child { border-bottom: 0; }
|
|
303
|
+
.mc-cfg-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
|
|
304
|
+
.mc-env, .mc-env-fold { border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 14px; background: rgba(127,127,127,.045); padding: 12px 16px !important; margin-bottom: 12px !important; }
|
|
305
|
+
.mc-fold { border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 14px; background: rgba(127,127,127,.045); margin-bottom: 12px !important; }
|
|
306
|
+
.me-v5 .mc-env, .me-v5 .mc-env-fold, .me-v5 .mc-fold { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.09); }
|
|
307
|
+
.mc-fold > summary { padding: 13px 16px; }
|
|
308
|
+
.mc-fold-body { padding: 0 16px 14px; }
|
|
309
|
+
.mc-cfg-actions { position: sticky; bottom: 0; z-index: 24; margin: 2px 0 0; border-radius: 12px; }
|
|
310
|
+
.mc-plan-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
|
|
311
|
+
.mc-plan { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; }
|
|
312
|
+
.mc-plan b { flex: none; }
|
|
313
|
+
.mc-plan span { flex: 1; min-width: 0; text-align: left; }
|
|
314
|
+
/* PC\uFF1A\u5DE6\u4FA7\u9875\u9762\u5BFC\u822A + \u66F4\u5BBD\u5185\u5BB9 */
|
|
315
|
+
@media (min-width: 1100px) {
|
|
316
|
+
.mc-cfg-page { max-width: 1200px; padding-top: 6px; }
|
|
317
|
+
.mc-cfg-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 24px; align-items: start; }
|
|
318
|
+
.mc-pagenav { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 2px; padding: 8px; margin: 0; background: var(--dsw-alias-bg-layer-1, #fff); }
|
|
319
|
+
.me-v5 .mc-pagenav { background: #21252c; border-color: #333943; }
|
|
320
|
+
.mc-pagebtn { justify-content: flex-start; padding: 10px 12px; gap: 10px; text-align: left; }
|
|
321
|
+
.mc-pagebtn.on { background: rgba(255,122,69,.14); color: inherit; box-shadow: none; }
|
|
322
|
+
.me-v5 .mc-pagebtn.on { background: rgba(255,122,69,.18); }
|
|
323
|
+
.mc-pagebtn-txt { flex-direction: column; align-items: flex-start; gap: 2px; }
|
|
324
|
+
.mc-pagebtn-sub { display: block; font-size: 10.5px; opacity: .55; line-height: 1.4; white-space: normal; }
|
|
325
|
+
.mc-cfg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
326
|
+
.mc-cfg-actions { margin-top: 4px; }
|
|
327
|
+
}
|
|
328
|
+
/* H5\uFF1A\u7D27\u51D1\u5185\u8FB9\u8DDD + \u89E6\u63A7\u5C3A\u5BF8 + \u5E95\u90E8\u5B89\u5168\u533A */
|
|
329
|
+
@media (max-width: 720px) {
|
|
330
|
+
.mc-cfg-page { max-width: 100%; padding: 2px 2px 0; }
|
|
331
|
+
.mc-pagenav { margin-bottom: 10px; }
|
|
332
|
+
.mc-pagebtn { padding: 10px 2px; font-size: 12px; }
|
|
333
|
+
.mc-panehead { padding: 4px 2px 12px; }
|
|
334
|
+
.mc-panehead-ico { width: 38px; height: 38px; font-size: 18px; border-radius: 11px; }
|
|
335
|
+
.mc-panehead-title { font-size: 15px; }
|
|
336
|
+
.mc-cfg-sec { padding: 12px 12px !important; border-radius: 12px; margin-bottom: 10px !important; }
|
|
337
|
+
.mc-field input:not([type="checkbox"]):not([type="radio"]), .mc-field select { height: 42px; font-size: 13px; }
|
|
338
|
+
.mc-cfg-switches .mc-switch { padding: 12px 2px; font-size: 12.5px; }
|
|
339
|
+
.mc-cfg-switches .mc-switch input { width: 40px; height: 24px; }
|
|
340
|
+
.mc-cfg-switches .mc-switch input::after { width: 20px; height: 20px; }
|
|
341
|
+
.mc-cfg-switches .mc-switch input:checked::after { transform: translateX(16px); }
|
|
342
|
+
.mc-cfg-actions { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
|
|
343
|
+
.mc-cfg-actions { flex-wrap: wrap; row-gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
|
|
344
|
+
.mc-cfg-actions > .mc-cfg-clean, .mc-cfg-actions > .mc-cfg-dirty { flex: 0 1 auto; width: 100%; }
|
|
345
|
+
.mc-cfg-actions .mc-cfg-spacer { display: none; }
|
|
346
|
+
.mc-cfg-actions .mc-btn { flex: 1 1 0; justify-content: center; white-space: nowrap; padding: 9px 10px; }
|
|
347
|
+
.mc-cfg-actions > span { font-size: 11px; }
|
|
348
|
+
.mc-plan { padding: 11px 12px; }
|
|
349
|
+
.mc-vault-head { display: none; }
|
|
350
|
+
.mc-vault-row { grid-template-columns: 1fr auto; }
|
|
351
|
+
}
|
|
352
|
+
@media (max-width: 900px) {
|
|
353
|
+
.me-audit-main { flex-direction: column; }
|
|
354
|
+
.me-audit-preview:not(.drawer-open) { display: none; }
|
|
355
|
+
.me-audit-bulk { flex-wrap: wrap; }
|
|
356
|
+
}
|
|
357
|
+
@media (max-width: 520px) {
|
|
358
|
+
.mc-audit-batchcard { grid-template-columns: minmax(0, 1fr) !important; }
|
|
359
|
+
.mc-audit-batchcard > .mc-btn { width: 100%; }
|
|
360
|
+
}
|
|
361
|
+
@media (max-width: 720px) {
|
|
362
|
+
.me-v5 .mc-v5-pagehead { flex-wrap: wrap; align-items: flex-start; }
|
|
363
|
+
.me-health-row { flex-wrap: wrap; }
|
|
364
|
+
.me-health-row > b { min-width: 56px; }
|
|
365
|
+
.me-health-row > div:last-child, .me-health-row > span:last-of-type { flex: 0 1 auto; width: 100%; padding-left: 22px; }
|
|
366
|
+
.mc-term-grid { grid-template-columns: minmax(0, 1fr) !important; }
|
|
367
|
+
.mc-term-guide { padding: 14px 12px 24px !important; }
|
|
368
|
+
.me-v5 .mc-rail, .me-v5 .mc-rail.open { width: 50px; padding: 8px 5px; }
|
|
369
|
+
}
|
|
279
370
|
.mc-tabs { display: inline-flex; gap: 4px; padding: 3px; background: var(--dsw-alias-bg-base, #f3f4f6); border-radius: 999px; }
|
|
280
371
|
.mc-tab { border: 0; background: transparent; color: inherit; border-radius: 999px; padding: 5px 14px; font-size: 12px; cursor: pointer; opacity: 0.7; }
|
|
281
372
|
.mc-viewbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
|
|
@@ -1132,7 +1223,7 @@ Option A, because:
|
|
|
1132
1223
|
.mc-audit-batchcard > .mc-btn { width: 100%; }
|
|
1133
1224
|
.mc-audit-batchcard > div[style*="flex: 1"] { display: none; }
|
|
1134
1225
|
}
|
|
1135
|
-
`;function jo(t){t.effect(()=>t.locale.register(aa,{zh:Gn,en:Kn}),"memory-eternal: locale");let a=t.locale.bind(aa);t.effect(()=>t.slots.inject("settings.section",()=>t.slots.register({name:"settings.section",id:aa,order:25,label:()=>a("nav"),locale:aa,inject:()=>({})},()=>r.default.createElement(Oo,{t:a}))),"memory-eternal: settings section"),t.effect(()=>t.slots.inject("sidebar.footer.action",()=>t.slots.register({name:"sidebar.footer.action",id:`${aa}:footer`,order:100,label:()=>a("nav"),locale:aa,inject:()=>({})},n=>r.default.createElement(Wo,{t:a,locale:t.locale,wide:!(n&&n.wide===!1)}))),"memory-eternal: sidebar footer action")}function Ho(){let[t,a]=(0,r.useState)(
|
|
1226
|
+
`;function jo(t){t.effect(()=>t.locale.register(aa,{zh:Gn,en:Kn}),"memory-eternal: locale");let a=t.locale.bind(aa);t.effect(()=>t.slots.inject("settings.section",()=>t.slots.register({name:"settings.section",id:aa,order:25,label:()=>a("nav"),locale:aa,inject:()=>({})},()=>r.default.createElement(Oo,{t:a}))),"memory-eternal: settings section"),t.effect(()=>t.slots.inject("sidebar.footer.action",()=>t.slots.register({name:"sidebar.footer.action",id:`${aa}:footer`,order:100,label:()=>a("nav"),locale:aa,inject:()=>({})},n=>r.default.createElement(Wo,{t:a,locale:t.locale,wide:!(n&&n.wide===!1)}))),"memory-eternal: sidebar footer action")}function Ho(){let[t,a]=(0,r.useState)(K+"/ui/app");return(0,r.useEffect)(()=>{let n=!0,i=()=>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(K+"/ui/app",{method:"HEAD"}).then(s=>{if(n&&!s.ok)return i()}).catch(()=>n?i():void 0),()=>{n=!1}},[]),t}function Oo({t}){return(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[(0,e.jsx)("style",{children:bt}),(0,e.jsx)(Jn,{t,onReload:()=>{},version:0})]})}function Wo({t,locale:a,wide:n}){let[i,s]=(0,r.useState)(!1);return(0,e.jsxs)("div",{className:`me-footer${n?"":" rail"}`,children:[(0,e.jsx)("style",{children:bt}),(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)(Go,{})}),(0,e.jsx)("span",{className:"me-footer-label",children:t("nav")})]}),i&&(0,e.jsx)(qo,{t,locale:a,onClose:()=>s(!1)})]})}function _o(){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 Uo(){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 $o(){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 qo({t,locale:a,onClose:n,tab:i}){let[s,m]=(0,r.useState)(!1),[b,k]=(0,r.useState)(!1),f=(0,r.useRef)(null),y=Ho(),u=(0,r.useCallback)(I=>a&&typeof a.subscribe=="function"?a.subscribe(I):()=>{},[a]),v=(0,r.useCallback)(()=>a&&typeof a.getSnapshot=="function"?a.getSnapshot():null,[a]),N=(0,r.useSyncExternalStore)(u,v),z=N&&(N.active==="zh"||N.active==="en")?N.active:null,$=(0,r.useRef)(null);$.current===null&&z&&($.current=z);let j=(0,r.useMemo)(()=>{let I=$.current?`lang=${$.current}`:"";if(i==="config")return`${K}/ui/config?tab=config${I?`&${I}`:""}`;let D=y.replace(/\/$/,""),W=D.endsWith("/ui/app")?"?":"/?";return i?`${D}${W}tab=${i}${I?`&${I}`:""}`:I?`${D}${W}${I}`:y},[y,i]);(0,r.useEffect)(()=>{let I=f.current&&f.current.contentWindow;I&&z&&I.postMessage({source:"memory-eternal",type:"locale",lang:z},"*")},[z]),(0,r.useEffect)(()=>{let I=D=>{D.key==="Escape"&&n()};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[n]);let R=(0,e.jsxs)("div",{className:"me-overlay-top",onClick:n,children:[(0,e.jsx)("style",{children:bt}),(0,e.jsx)("div",{className:"me-modal"+(s?" me-modal-full":""),onClick:I=>I.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(I=>!I),"aria-label":t(s?"exitFullscreen":"enterFullscreen"),title:t(s?"exitFullscreen":"enterFullscreen"),children:s?(0,e.jsx)(Uo,{}):(0,e.jsx)(_o,{})}),(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)($o,{})})]}),(0,e.jsx)("iframe",{ref:f,src:j,title:"memory-eternal",allow:"clipboard-write; clipboard-read",onLoad:()=>k(!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)(ua,{}),(0,e.jsx)("span",{className:"me-loading-text",children:t("loading")})]})]})})]});return typeof document>"u"?R:(0,qn.createPortal)(R,document.body)}function Go(){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 na="0.30.5";function Ko({t}){let[a,n]=(0,r.useState)(""),i="dsh-memory tui",s="dsh-memory tui --write",m=async(y,u)=>{try{await navigator.clipboard.writeText(y),n(u),setTimeout(()=>n(""),1600)}catch{}},b={border:"1px solid #3a404a",borderRadius:14,background:"#22262d",padding:"16px 18px"},k={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"},f={marginTop:10,border:"1px solid #4a515c",background:"transparent",color:"#ffb08a",borderRadius:9,padding:"7px 12px",fontSize:12,cursor:"pointer"};return(0,e.jsxs)("div",{className:"mc-term-guide",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",{className:"mc-term-grid",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:k,children:i}),(0,e.jsx)("button",{type:"button",style:f,onClick:()=>m(i,"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:k,children:s}),(0,e.jsx)("button",{type:"button",style:f,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:{...k,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
|
|
1136
1227
|
\u2502 \u7C7B\u578B \u25CF \u5168\u90E8 7 \u25CB \u9879\u76EE 3 \u25CB \u77E5\u8BC6 1 \u25CB \u6559\u8BAD 1 \u2502
|
|
1137
1228
|
\u2502 \u2502
|
|
1138
1229
|
\u2502 \u25A3 \u5168\u9009 7 \u5DF2\u9009 3 s \u5168\u9009 \u2502
|
|
@@ -1141,17 +1232,17 @@ Option A, because:
|
|
|
1141
1232
|
\u2502 \u25C9 [\u6559\u8BAD] shj-web \u7AEF\u53E3\u83DC\u5355\u9519\u4F4D \u2502
|
|
1142
1233
|
\u2502 \u2502
|
|
1143
1234
|
\u2502 [a] \u6279\u51C6 3 [r] \u9A73\u56DE [s] \u53CD\u9009 [Esc] \u6E05\u7A7A \u2502
|
|
1144
|
-
\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 Ka=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 Yo({t,notify:a,onPromoted:n}){let[i,s]=(0,r.useState)(!1),[
|
|
1145
|
-
`).length:0;return(0,e.jsxs)("div",{className:"mc-card",style:{margin:"0 0 10px",padding:"10px 12px"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12.5},children:["\u{1F4DD} ",t("workTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:t("workHint")}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.5},children:[
|
|
1235
|
+
\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 Ka=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 Yo({t,notify:a,onPromoted:n}){let[i,s]=(0,r.useState)(!1),[m,b]=(0,r.useState)(""),[k,f]=(0,r.useState)(null),[y,u]=(0,r.useState)(""),v=(0,r.useRef)(null),N=(0,r.useCallback)(async()=>{try{let W=await(await fetch(`${K}/working`)).json().catch(()=>null);W&&W.ok&&(f(W),b(W.text||""))}catch{}},[]);(0,r.useEffect)(()=>{N()},[N]);let z=async(D,W)=>(await fetch(`${K}${D}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(W||{})})).json().catch(()=>null),$=async()=>{u("save");let D=await z("/working",{text:m,mode:"replace"});u(""),D&&D.ok?(a(!0,t("workSaved")),await N()):a(!1,D&&D.error||"save failed")},j=async()=>{if(!window.confirm(t("workClearConfirm")))return;u("clear");let D=await z("/working/clear",{});u(""),D&&D.ok?(b(""),a(!0,t("workCleared")),await N()):a(!1,D&&D.error||"clear failed")},R=async()=>{let D=v.current,W=D&&D.selectionEnd>D.selectionStart?D.value.slice(D.selectionStart,D.selectionEnd):m;if(!String(W||"").trim()){a(!1,t("workPromoteEmpty"));return}u("promote");let ge=await z("/working/promote",{text:W});u(""),ge&&ge.ok?(a(!0,t("workPromoted")),n&&n()):a(!1,ge&&ge.error||"promote failed")},I=m?m.split(`
|
|
1236
|
+
`).length:0;return(0,e.jsxs)("div",{className:"mc-card",style:{margin:"0 0 10px",padding:"10px 12px"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12.5},children:["\u{1F4DD} ",t("workTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:t("workHint")}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.5},children:[I," ",t("workLines")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>s(D=>!D),children:t(i?"workCollapse":"workExpand")})]}),i&&(0,e.jsxs)("div",{style:{marginTop:8},children:[(0,e.jsx)("textarea",{ref:v,value:m,onChange:D=>b(D.target.value),rows:7,placeholder:t("workPlaceholder"),style:{width:"100%",boxSizing:"border-box",borderRadius:8,padding:"8px 10px",fontSize:12.5,lineHeight:1.6,background:"rgba(0,0,0,0.18)",color:"inherit",border:"1px solid rgba(140,148,160,0.35)",resize:"vertical"}}),(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:8,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!y,onClick:$,children:y==="save"?"\u2026":t("workSave")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!y,onClick:R,children:y==="promote"?"\u2026":t("workPromote")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!y||!m.trim(),onClick:j,children:t("workClear")}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.55},children:[k&&k.maxLines?k.maxLines+" \u884C / "+Math.round((k.maxBytes||0)/1024)+"KB ":"",t("workLimitHint")," \xB7 ",t("workPromoteHint")]})]})]})]})}function Vo(t){return(0,e.jsx)(Ka,{children:(0,e.jsx)(Jo,{...t})})}function Jo({t,inModal:a,onClose:n}){let i=typeof window<"u"&&(!!window.__DSH_BOOT__||String(location.pathname||"").includes("/memory-eternal/api/ui/app")),[s,m]=(0,r.useState)(null),[b,k]=(0,r.useState)(()=>{try{let x=localStorage.getItem("me-ui-scale");return["compact","normal","large"].includes(x)?x:"normal"}catch{return"normal"}}),[f,y]=(0,r.useState)([]),[u,v]=(0,r.useState)(!0),[N,z]=(0,r.useState)(null),[$,j]=(0,r.useState)(""),[R,I]=(0,r.useState)("all"),[D,W]=(0,r.useState)(""),[ge,oe]=(0,r.useState)("all"),[q,_]=(0,r.useState)("all"),[Y,G]=(0,r.useState)(()=>{try{return new Set(JSON.parse(localStorage.getItem("me-pinned-v5")||"[]"))}catch{return new Set}}),[Z,fe]=(0,r.useState)(!1),ue=(0,r.useCallback)(x=>{G(B=>{let ae=new Set(B);ae.has(x)?ae.delete(x):ae.add(x);try{localStorage.setItem("me-pinned-v5",JSON.stringify([...ae]))}catch{}return ae})},[]),[de,Re]=(0,r.useState)(""),[P,be]=(0,r.useState)(()=>{try{let x=new URLSearchParams(typeof location<"u"?location.search:"").get("tab"),B={cards:"cards",graph:"graph",news:"news",usage:"stats",stats:"stats",audit:"audit",recycle:"optimize",optimize:"optimize",config:"config",terminal:"terminal"};if(x&&B[x])return B[x]}catch{}return"cards"}),[xe,Ue]=(0,r.useState)(()=>new Set([P])),ce=(0,r.useCallback)(x=>{Ue(B=>B.has(x)?B:new Set(B).add(x)),be(x)},[]),[Q,_e]=(0,r.useState)("recent"),[Fe,ee]=(0,r.useState)(null),[p,E]=(0,r.useState)(null),S=(0,r.useCallback)(x=>{E(null);try{fetch(`${K}/star/action`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:x})}).catch(()=>{})}catch{}},[]);(0,r.useEffect)(()=>{let x=!0;return fetch(`${K}/star/status`).then(B=>B.json()).then(B=>{!x||!B||!B.shouldAsk||(E(B),fetch(`${K}/star/action`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"shown"})}).catch(()=>{}))}).catch(()=>{}),()=>{x=!1}},[]);let O=(0,r.useRef)(null),pe=(0,r.useRef)(null),[Ae,ne]=(0,r.useState)(!1),[J,d]=(0,r.useState)(!1),[H,F]=(0,r.useState)(0),[ie,ze]=(0,r.useState)(null),[ke,le]=(0,r.useState)(!1),[C,se]=(0,r.useState)(!1),[te,Se]=(0,r.useState)(!1),[ot,st]=(0,r.useState)("group"),[yt,Rt]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let x=B=>{let ae=B&&B.detail;if(["compact","normal","large"].includes(ae)){k(ae);try{localStorage.setItem("me-ui-scale",ae)}catch{}}};return window.addEventListener("me-ui-scale",x),()=>window.removeEventListener("me-ui-scale",x)},[]);let Mt=(0,r.useCallback)(()=>{Rt(!1);try{localStorage.setItem("me-onboard-v2","1")}catch{}},[]),xt=(0,r.useCallback)((x="group")=>{st(x),Se(!0)},[]),je=(0,r.useRef)(!1),Dt=(0,r.useCallback)(async()=>{if(je.current)return;je.current=!0;let x=(B,ae=!0)=>{O.current&&clearTimeout(O.current),ee({ok:ae,msg:B}),O.current=setTimeout(()=>ee(null),3e3)};x(t("webOpening"));try{let B=await fetch(`${K}/open-web`,{method:"POST"}).then(ve=>ve.json()).catch(()=>null);if(B&&B.ok&&B.url){x(t("webOpened")+" \xB7 "+B.url);return}let ae=await fetch(`${K}/web-info`).then(ve=>ve.json()).catch(()=>null),Ce=ae&&ae.ok&&ae.url||"http://127.0.0.1:7999/",Me=window.open(Ce,"_blank","noopener,noreferrer");x(Me?t("webOpened")+" \xB7 "+Ce:t("webOpenFail")+" \xB7 "+Ce,!!Me)}catch{x(t("webOpenFail"),!1)}finally{je.current=!1}},[t]);(0,r.useEffect)(()=>{try{if(localStorage.getItem("me-onboard-v2")||P!=="cards")return;let x=setTimeout(()=>Rt(!0),900);return()=>clearTimeout(x)}catch{}},[P]);let[Ne,g]=(0,r.useState)(!0),[c,re]=(0,r.useState)(0),[Le,h]=(0,r.useState)(null),[M,He]=(0,r.useState)(0),$e=(0,r.useCallback)(()=>He(x=>x+1),[]),o=s?.quarantine?.pending??0,lt=(s?.quarantine?.deleted??0)+(s?.quarantine?.rejected??0),wt=(0,r.useRef)(null),[kt,pt]=(0,r.useState)(0),[ht,Bt]=(0,r.useState)(!1),Kt=(0,r.useRef)(null),Yt=(0,r.useRef)(null),vt=(0,r.useCallback)(async(x=R,B=D,ae=q,Ce={})=>{let Me=Ce.append===!0;try{Me?Bt(!0):(v(!0),j(""));let ve=new URLSearchParams;x&&x!=="all"&&ve.set("kind",x),B.trim()&&ve.set("q",B.trim());let Qe=Ce.tag!==void 0?Ce.tag:de;Qe&&ve.set("tag",Qe),ve.set("status",ae||"all"),ve.set("limit",String(Io)),ve.set("offset",String(Ce.offset||0)),Q==="title"&&ve.set("sort","title");let Tt=await(await fetch(`${K}/cards?${ve.toString()}`)).json();if(Tt.ok){let Ft=Tt.cards||[];y(zt=>Me?[...zt,...Ft.filter(za=>!zt.some(Aa=>Aa.path===za.path))]:Ft),pt(Number(Tt.total)||Ft.length)}}catch(ve){j(String(ve&&ve.message?ve.message:ve))}finally{Me?Bt(!1):v(!1)}},[R,D,q,Q,de]),qe=(0,r.useCallback)(async()=>{try{let[x,B,ae,Ce]=await Promise.all([fetch(`${K}/overview`).then(ve=>ve.json()),fetch(`${K}/capture-log`).then(ve=>ve.json()).catch(()=>null),fetch(`${K}/config`).then(ve=>ve.json()).catch(()=>null),fetch(`${K}/news?unread=1&limit=1`).then(ve=>ve.json()).catch(()=>null)]);x.ok&&m(x),Ce&&Ce.ok&&F(Number((Ce.counts||{}).unread)||0);let Me=ae&&ae.ok&&ae.config&&ae.config.uiScale;if(["compact","normal","large"].includes(Me)){k(Me);try{localStorage.setItem("me-ui-scale",Me)}catch{}}z(B&&B.ok&&B.available&&B.health||null)}catch(x){j(String(x&&x.message?x.message:x))}finally{v(!1)}},[]),Ot=async x=>{try{let ae=await(await fetch(`${K}/delete?path=${encodeURIComponent(x)}`)).json();ae.ok?(ee({ok:!0,msg:t("deleted")}),await qe(),$e()):ee({ok:!1,msg:ae.error||t("deleteFail")})}catch{ee({ok:!1,msg:t("deleteFail")})}O.current&&clearTimeout(O.current),O.current=setTimeout(()=>ee(null),2e3)};(0,r.useEffect)(()=>(qe(),()=>{wt.current&&clearTimeout(wt.current)}),[qe]);let oa=x=>{W(x),wt.current&&clearTimeout(wt.current),wt.current=setTimeout(()=>vt(R,x,q),280)},Lt=x=>{I(x),vt(x,D,q)},Wt=x=>{let B=String(x||"");Re(B),ze(null),vt(R,D,q,{tag:B})};(0,r.useEffect)(()=>{P==="cards"&&vt(R,D,q)},[q,P,M,Q,de]),(0,r.useEffect)(()=>{if(P!=="cards"||u||ht||f.length>=kt)return;let x=Kt.current,B=Yt.current;if(!x)return;let ae=new IntersectionObserver(Ce=>{Ce[0]&&Ce[0].isIntersecting&&vt(R,D,q,{append:!0,offset:f.length})},{root:B||null,rootMargin:"400px"});return ae.observe(x),()=>ae.disconnect()},[P,f,kt,u,ht,R,D,q,vt]);let l=async(x,B)=>{try{let ae=await fetch(`${K}/card-kind`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:x,kind:B})}).then(Ce=>Ce.json());!ae||!ae.ok?ee({ok:!1,msg:ae&&ae.error||t("coreSetFail")}):(ze(Ce=>Ce&&Ce.path===x?{...Ce,kind:ae.kind}:Ce),await qe(),$e(),ee({ok:!0,msg:t(B==="core"?"coreSetOk":"coreUnsetOk")}))}catch(ae){ee({ok:!1,msg:String(ae&&ae.message||ae)})}O.current&&clearTimeout(O.current),O.current=setTimeout(()=>ee(null),2e3)},X=async x=>{try{let B=x.status;if(!B&&x.path)try{let Qe=((await fetch(`${K}/cards?status=all&q=${encodeURIComponent(x.title||"")}&limit=50`).then(St=>St.json())).cards||[]).find(St=>St.path===x.path);Qe&&(B=Qe.status)}catch{}let ae=B&&B!=="approved"?`&status=${encodeURIComponent(B)}`:"",Ce=await fetch(`${K}/card?path=${encodeURIComponent(x.path||x.id)}${ae}`),Me=await Ce.json();Me.ok?ze({path:Me.path,title:x.title,text:Me.text,kind:x.kind||"knowledge",status:B||"approved"}):j(Me.error||`HTTP ${Ce.status}`)}catch(B){j(String(B&&B.message?B.message:B))}},me=async(x,B)=>{ne(!0);try{let ae=await fetch(`${K}/export`);if(!ae.ok)throw new Error("HTTP "+ae.status);let Ce=await ae.json();if(!Ce.ok)throw new Error(Ce.error||"export failed");let Me,ve,Qe;if(x==="json"){ve="memory-vault.json",Qe="application/json";let Ft=Ce.cards.map(zt=>({path:zt.path,title:zt.title,kind:zt.kind,status:zt.status,store:zt.store,text:zt.text}));Me=JSON.stringify({format:Ce.format||"memory-eternal-vault",formatVersion:Ce.formatVersion||1,exportedAt:Ce.exportedAt||new Date().toISOString(),count:Ft.length,cards:Ft},null,2)}else ve="memory-vault.md",Qe="text/markdown;charset=utf-8",Me=Ce.cards.map(Ft=>Ft.text.trim()).filter(Boolean).join(`
|
|
1146
1237
|
|
|
1147
1238
|
---
|
|
1148
1239
|
|
|
1149
|
-
`);let wt=new Blob([Me],{type:Ze}),Mt=await Tr(wt,ve,!1);if(!Mt.ok){te({ok:!1,msg:t("exportFail")}),re(!1);return}te({ok:!0,msg:t("exportedTo")+"\uFF1A"+t("defaultDownloads")+" \xB7 "+Mt.name})}catch(ne){te({ok:!1,msg:t("exportFail")+" \xB7 "+(ne.message||"")})}finally{re(!1)}O.current&&clearTimeout(O.current),O.current=setTimeout(()=>te(null),2600)},_t=async h=>{let j=h.target.files&&h.target.files[0];if(h.target.value="",!!j){try{let ne=await j.text(),Me=await(await fetch(`${G}/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:ne})).json();if(Me.ok){await Ge();let ve=Me.imported||0,Ze=t("importedVault")+"\uFF1A"+ve;Me.total&&(Ze+=t("importedTotal")+Me.total+t("importedTotalTail")),Me.quarantined&&(Ze+=t("importedQuarantine")+Me.quarantined+t("importedQuarantineTail")),Me.skipped&&(Ze+=t("importedSkipped")+Me.skipped+t("importedSkippedTail")),Me.warning&&(Ze+=" \xB7 "+Me.warning),te({ok:ve>0||!Me.total,msg:Ze})}else te({ok:!1,msg:Me.error||t("importFail")})}catch{te({ok:!1,msg:t("importFail")})}O.current&&clearTimeout(O.current),O.current=setTimeout(()=>te(null),2400)}},Zt=async()=>{if(!X){m(!0);try{let h=await fetch(`${G}/skills/sync`,{method:"POST"}).then(j=>j.json()).catch(()=>null);if(h&&h.ok){let j=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);te({ok:!0,msg:j}),await Ge(),He()}else te({ok:!1,msg:h&&h.error||t("skillsSyncFail")})}catch{te({ok:!1,msg:t("skillsSyncFail")})}finally{m(!1)}O.current&&clearTimeout(O.current),O.current=setTimeout(()=>te(null),3600)}},tt=(0,r.useMemo)(()=>{let h=f.slice();return pe!=="all"&&(h=h.filter(j=>qt(j.submittedBy)===pe)),U!=="all"&&(h=h.filter(j=>(j.status||"approved")===U)),ae&&(h=h.filter(j=>Y.has(j.path))),Q==="title"?h.sort((j,ne)=>String(j.title||"").localeCompare(String(ne.title||""))):Q==="hot"?h.sort((j,ne)=>(ne.weight||ne.links||0)-(j.weight||j.links||0)):h.sort((j,ne)=>new Date(ne.updated||0).getTime()-new Date(j.updated||0).getTime()),h},[f,Q,pe,U,ae,Y]),l=(0,r.useMemo)(()=>[...new Set(f.map(h=>qt(h.submittedBy)))],[f]),$=(0,r.useMemo)(()=>{let h={};for(let j of f){let ne=new Set(j.tags||[]),Ne=0;for(let Me of f)Me.path!==j.path&&(Me.tags||[]).some(ve=>ne.has(ve))&&Ne++;h[j.path]=Ne}return h},[f]),[ee,Be]=(0,r.useState)(null),he=(0,r.useMemo)(()=>{if(!tt.length)return null;let h=ee?tt.find(ne=>ne.path===ee):null;return h||tt.find(ne=>Date.now()-new Date(ne.updated||0).getTime()>21*864e5)||tt[0]},[tt,ee]),Re=()=>{if(!tt.length)return;let h=tt.findIndex(j=>j.path===(he&&he.path));Be(tt[(h+1+tt.length)%tt.length].path)},De=!F&&R==="all"&&!ge&&U==="all"&&!!he;return(0,e.jsxs)("div",{className:"memory-eternal-root me-v5","data-ui-scale":g,style:{height:"100%",width:"100%",zoom:g==="large"?1.15:g==="compact"?.92:1.06,overflow:"hidden",display:"flex",flexDirection:"column"},children:[(0,e.jsx)("style",{children:bt}),!a&&(0,e.jsxs)("div",{className:`mc-v5-top${i?" in-host":""}`,children:[(0,e.jsx)("img",{className:"mc-v5-logo",src:ya,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(E==="cards"?"cardsTab":E==="graph"?"graphTab":E==="news"?"newsTab":E==="stats"?"tabUsage":E==="audit"?"tabAudit":E==="optimize"?"tabRecycle":E==="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",na]}),(0,e.jsxs)("button",{type:"button",className:"mc-v5-star",onClick:()=>Ca("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:()=>ct("group"),title:t("supportTitle"),"aria-label":t("supportTitle"),children:"?"})]})]}),D&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,margin:"8px 14px 0",padding:"10px 14px",borderRadius:10,background:"linear-gradient(90deg, rgba(255,122,69,0.14), rgba(255,122,69,0.03))",border:"1px solid rgba(255,122,69,0.32)",color:"var(--dsw-alias-label-primary, #e5e7eb)",fontSize:12.5,lineHeight:1.55},children:[(0,e.jsx)("span",{style:{fontSize:15,color:"#FF7A45"},children:"\u2605"}),(0,e.jsxs)("span",{style:{flex:1},children:[(0,e.jsx)("b",{children:t("starAskTitle")}),(0,e.jsx)("span",{style:{opacity:.82,marginLeft:8},children:t("starAskBody").replace("{recalls}",String(D.evidence?.recalls??0)).replace("{cards}",String(D.evidence?.cards??0))})]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>{Ca("https://github.com/EternalNight996/memory-eternal"),c("never")},children:["\u2605 ",t("starAskGo")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>c("later"),children:t("starAskLater")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>c("never"),children:t("starAskNever")})]}),qe&&(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 "+(qe.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:qe.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:qe.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{children:qe.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:ya,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"})})})]}),v&&v.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:[v.reason,(0,e.jsx)("div",{style:{opacity:.68,fontSize:11.5,marginTop:2},children:t("captureAlertHint")})]}),(0,e.jsx)("span",{style:{opacity:.7},children:v.since?Wt(new Date(v.since).toISOString()):""})]}),(0,e.jsxs)("div",{className:"me-modal-body",children:[(0,e.jsxs)("div",{className:`mc-rail${Ce?" open":""}`,children:[(0,e.jsxs)("div",{className:"mc-v5-rail-top",children:[Ce&&(0,e.jsxs)("div",{className:"mc-v5-railbrand",children:[(0,e.jsx)("img",{className:"mark",src:ya,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:()=>x(h=>!h),"aria-label":t(Ce?"collapse":"expand"),title:t(Ce?"collapse":"expand"),children:Ce?"\xAB":"\xBB"})]}),Ce&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navWorkspace")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${E==="cards"?" active":""}`,onClick:()=>oe("cards"),title:t("cardsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E0}"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("cardsTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${E==="graph"?" active":""}`,onClick:()=>oe("graph"),title:t("graphTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F52E}"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("graphTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${E==="news"?" active":""}`,onClick:()=>oe("news"),title:t("newsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4F0}"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("newsTab")}),B>0&&(0,e.jsx)("span",{className:"mc-dot",children:B>99?"99+":B})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${E==="stats"?" active":""}`,onClick:()=>oe("stats"),title:t("tabUsage"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4C8}"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabUsage")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${E==="audit"?" active":""}`,onClick:()=>oe("audit"),title:t("tabAudit"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F50D}"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabAudit")}),o>0&&(0,e.jsx)("span",{className:"mc-dot",children:o>99?"99+":o})]}),Ce&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSystem")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${E==="optimize"?" active":""}`,onClick:()=>oe("optimize"),title:t("tabRecycle"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u267B\uFE0F"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabRecycle")}),ht>0&&(0,e.jsx)("span",{className:"mc-dot",style:{background:"#6b7280"},children:ht>99?"99+":ht})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${E==="terminal"?" active":""}`,onClick:()=>oe("terminal"),title:t("terminalTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u25B8_"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("terminalTab")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:Rt,title:t("webTab"),"aria-label":t("webTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F310}"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("webTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${E==="config"?" active":""}`,onClick:()=>oe("config"),title:t("tabConfig"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2699\uFE0F"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabConfig")})]}),Ce&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSupport")}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>ct("group"),title:t("supportGroup"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4AC}"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportGroup")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>ct("sponsor"),title:t("supportSponsor"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2615"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportSponsor")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>ct("legacy"),title:t("supportLegacy"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E9}"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportLegacy")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>le(!0),title:t("fbNav"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F41E}"}),Ce&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("fbNav")})]}),Ce&&(0,e.jsxs)("button",{type:"button",className:"mc-quote",onClick:()=>de(h=>(h+1)%Sa.length),title:`${Sa[p]}
|
|
1240
|
+
`);let St=new Blob([Me],{type:Qe}),Tt=await Tr(St,ve,!1);if(!Tt.ok){ee({ok:!1,msg:t("exportFail")}),ne(!1);return}ee({ok:!0,msg:t("exportedTo")+"\uFF1A"+t("defaultDownloads")+" \xB7 "+Tt.name})}catch(ae){ee({ok:!1,msg:t("exportFail")+" \xB7 "+(ae.message||"")})}finally{ne(!1)}O.current&&clearTimeout(O.current),O.current=setTimeout(()=>ee(null),2600)},Ee=async x=>{let B=x.target.files&&x.target.files[0];if(x.target.value="",!!B){try{let ae=await B.text(),Me=await(await fetch(`${K}/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:ae})).json();if(Me.ok){await qe();let ve=Me.imported||0,Qe=t("importedVault")+"\uFF1A"+ve;Me.total&&(Qe+=t("importedTotal")+Me.total+t("importedTotalTail")),Me.quarantined&&(Qe+=t("importedQuarantine")+Me.quarantined+t("importedQuarantineTail")),Me.skipped&&(Qe+=t("importedSkipped")+Me.skipped+t("importedSkippedTail")),Me.warning&&(Qe+=" \xB7 "+Me.warning),ee({ok:ve>0||!Me.total,msg:Qe})}else ee({ok:!1,msg:Me.error||t("importFail")})}catch{ee({ok:!1,msg:t("importFail")})}O.current&&clearTimeout(O.current),O.current=setTimeout(()=>ee(null),2400)}},Be=async()=>{if(!J){d(!0);try{let x=await fetch(`${K}/skills/sync`,{method:"POST"}).then(B=>B.json()).catch(()=>null);if(x&&x.ok){let B=t("skillsSyncDone")+" \xB7 "+t("skillsScanned")+" "+(x.total||0)+" \xB7 "+t("skillsCreated")+" "+(x.created||0)+" \xB7 "+t("skillsUpdated")+" "+(x.updated||0)+" \xB7 "+t("skillsPendingUpdates")+" "+(x.pendingUpdates||0);ee({ok:!0,msg:B}),await qe(),$e()}else ee({ok:!1,msg:x&&x.error||t("skillsSyncFail")})}catch{ee({ok:!1,msg:t("skillsSyncFail")})}finally{d(!1)}O.current&&clearTimeout(O.current),O.current=setTimeout(()=>ee(null),3600)}},he=(0,r.useMemo)(()=>{let x=f.slice();return ge!=="all"&&(x=x.filter(B=>qt(B.submittedBy)===ge)),q!=="all"&&(x=x.filter(B=>(B.status||"approved")===q)),Z&&(x=x.filter(B=>Y.has(B.path))),Q==="title"?x.sort((B,ae)=>String(B.title||"").localeCompare(String(ae.title||""))):Q==="hot"?x.sort((B,ae)=>(ae.weight||ae.links||0)-(B.weight||B.links||0)):x.sort((B,ae)=>new Date(ae.updated||0).getTime()-new Date(B.updated||0).getTime()),x},[f,Q,ge,q,Z,Y]),Ie=(0,r.useMemo)(()=>[...new Set(f.map(x=>qt(x.submittedBy)))],[f]),tt=(0,r.useMemo)(()=>{let x={};for(let B of f){let ae=new Set(B.tags||[]),Ce=0;for(let Me of f)Me.path!==B.path&&(Me.tags||[]).some(ve=>ae.has(ve))&&Ce++;x[B.path]=Ce}return x},[f]),[et,Vt]=(0,r.useState)(null),at=(0,r.useMemo)(()=>{if(!he.length)return null;let x=et?he.find(ae=>ae.path===et):null;return x||he.find(ae=>Date.now()-new Date(ae.updated||0).getTime()>21*864e5)||he[0]},[he,et]),_t=()=>{if(!he.length)return;let x=he.findIndex(B=>B.path===(at&&at.path));Vt(he[(x+1+he.length)%he.length].path)},ct=!D&&R==="all"&&!de&&q==="all"&&!!at;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:bt}),!a&&(0,e.jsxs)("div",{className:`mc-v5-top${i?" in-host":""}`,children:[(0,e.jsx)("img",{className:"mc-v5-logo",src:ya,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",na]}),(0,e.jsxs)("button",{type:"button",className:"mc-v5-star",onClick:()=>Ca("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:()=>xt("group"),title:t("supportTitle"),"aria-label":t("supportTitle"),children:"?"})]})]}),p&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,margin:"8px 14px 0",padding:"10px 14px",borderRadius:10,background:"linear-gradient(90deg, rgba(255,122,69,0.14), rgba(255,122,69,0.03))",border:"1px solid rgba(255,122,69,0.32)",color:"var(--dsw-alias-label-primary, #e5e7eb)",fontSize:12.5,lineHeight:1.55},children:[(0,e.jsx)("span",{style:{fontSize:15,color:"#FF7A45"},children:"\u2605"}),(0,e.jsxs)("span",{style:{flex:1},children:[(0,e.jsx)("b",{children:t("starAskTitle")}),(0,e.jsx)("span",{style:{opacity:.82,marginLeft:8},children:t("starAskBody").replace("{recalls}",String(p.evidence?.recalls??0)).replace("{cards}",String(p.evidence?.cards??0))})]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>{Ca("https://github.com/EternalNight996/memory-eternal"),S("never")},children:["\u2605 ",t("starAskGo")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>S("later"),children:t("starAskLater")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>S("never"),children:t("starAskNever")})]}),Fe&&(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 "+(Fe.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:Fe.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:Fe.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{children:Fe.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:ya,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"})})})]}),N&&N.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:[N.reason,(0,e.jsx)("div",{style:{opacity:.68,fontSize:11.5,marginTop:2},children:t("captureAlertHint")})]}),(0,e.jsx)("span",{style:{opacity:.7},children:N.since?Ht(new Date(N.since).toISOString()):""})]}),(0,e.jsxs)("div",{className:"me-modal-body",children:[(0,e.jsxs)("div",{className:`mc-rail${Ne?" open":""}`,children:[(0,e.jsxs)("div",{className:"mc-v5-rail-top",children:[Ne&&(0,e.jsxs)("div",{className:"mc-v5-railbrand",children:[(0,e.jsx)("img",{className:"mark",src:ya,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:()=>g(x=>!x),"aria-label":t(Ne?"collapse":"expand"),title:t(Ne?"collapse":"expand"),children:Ne?"\xAB":"\xBB"})]}),Ne&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navWorkspace")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="cards"?" active":""}`,onClick:()=>ce("cards"),title:t("cardsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E0}"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("cardsTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="graph"?" active":""}`,onClick:()=>ce("graph"),title:t("graphTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F52E}"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("graphTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="news"?" active":""}`,onClick:()=>ce("news"),title:t("newsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4F0}"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("newsTab")}),H>0&&(0,e.jsx)("span",{className:"mc-dot",children:H>99?"99+":H})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="stats"?" active":""}`,onClick:()=>ce("stats"),title:t("tabUsage"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4C8}"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabUsage")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="audit"?" active":""}`,onClick:()=>ce("audit"),title:t("tabAudit"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F50D}"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabAudit")}),o>0&&(0,e.jsx)("span",{className:"mc-dot",children:o>99?"99+":o})]}),Ne&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSystem")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="optimize"?" active":""}`,onClick:()=>ce("optimize"),title:t("tabRecycle"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u267B\uFE0F"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabRecycle")}),lt>0&&(0,e.jsx)("span",{className:"mc-dot",style:{background:"#6b7280"},children:lt>99?"99+":lt})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="terminal"?" active":""}`,onClick:()=>ce("terminal"),title:t("terminalTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u25B8_"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("terminalTab")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:Dt,title:t("webTab"),"aria-label":t("webTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F310}"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("webTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${P==="config"?" active":""}`,onClick:()=>ce("config"),title:t("tabConfig"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2699\uFE0F"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabConfig")})]}),Ne&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSupport")}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>xt("group"),title:t("supportGroup"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4AC}"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportGroup")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>xt("sponsor"),title:t("supportSponsor"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2615"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportSponsor")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>xt("legacy"),title:t("supportLegacy"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E9}"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportLegacy")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>se(!0),title:t("fbNav"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F41E}"}),Ne&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("fbNav")})]}),Ne&&(0,e.jsxs)("button",{type:"button",className:"mc-quote",onClick:()=>re(x=>(x+1)%Sa.length),title:`${Sa[c]}
|
|
1150
1241
|
${jn}
|
|
1151
|
-
${t("quoteHint")}`,children:[(0,e.jsxs)("span",{className:"mc-quote-tag",children:[t("navQuotes")," \xB7 ",p+1,"/",Sa.length]}),(0,e.jsx)("span",{className:"mc-quote-text",children:Sa[p]},p),(0,e.jsx)("span",{className:"mc-quote-src",children:jn})]})]}),(0,e.jsxs)("div",{className:"mc-main",ref:Yt,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,E==="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:[f.length," / ",vt]})]}),E==="cards"&&(0,e.jsx)(Yo,{t,notify:(h,j)=>te({ok:h,msg:j}),onPromoted:()=>{Ge(),He()}}),E==="cards"&&(0,e.jsxs)("div",{className:"mc-toolbar",children:[(0,e.jsx)("input",{type:"text",placeholder:t("searchPlaceholder"),value:F,onChange:h=>oa(h.target.value)}),ge&&(0,e.jsxs)("button",{type:"button",className:"mc-chip active",title:t("clearFilter"),onClick:()=>Lt(""),children:["\u{1F3F7} ",ge," ",(0,e.jsx)("span",{style:{opacity:.7},children:"\u2715"})]}),(0,e.jsx)("input",{ref:se,type:"file",accept:".json,application/json",style:{display:"none"},onChange:_t}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>se.current&&se.current.click(),children:t("importVault")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>b({kind:"knowledge",title:"",body:"",tags:"",template:""}),children:["+ ",t("newCard")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:X,onClick:Zt,title:t("skillCardsHint"),children:X?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:Ie,onClick:()=>Vt("md"),children:t(Ie?"exporting":"exportVault")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:Ie,onClick:()=>Vt("json"),children:t(Ie?"exporting":"exportJson")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Ge(),children:t("refresh")})]}),E==="cards"&&(0,e.jsxs)("div",{className:"mc-chips",children:[Ma.map(h=>(0,e.jsxs)("button",{type:"button",className:`mc-chip${R===h?" active":""}`,onClick:()=>Dt(h),children:[t(h==="all"?"all":rt[h]),(0,e.jsx)("span",{className:"mc-chip-n",children:h==="all"?s?.total??0:s?.byKind?.[h]??0})]},h)),(0,e.jsxs)("button",{type:"button",className:`mc-chip${ae?" active":""}`,onClick:()=>ue(h=>!h),children:["\u{1F4CC} ",t("pinnedOnly"),(0,e.jsx)("span",{className:"mc-chip-n",children:Y.size})]}),(0,e.jsxs)("select",{value:pe,onChange:h=>Z(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")]}),Vn(l).map(h=>(0,e.jsx)("option",{value:h,children:h},h))]}),(0,e.jsxs)("select",{value:U,onChange:h=>K(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${Q===h.key?" active":""}`,onClick:()=>$e(h.key),children:h.label},h.key))]}),q&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",q]}),(0,e.jsx)("div",{style:{display:E==="cards"?"contents":"none"},children:u?(0,e.jsx)(to,{text:t("loading")}):q?(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",q," ",(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Ge(),children:t("retry")})]}):f.length===0?(0,e.jsx)("div",{className:"mc-empty",children:t("empty")}):(0,e.jsxs)(e.Fragment,{children:[De&&(0,e.jsxs)("div",{className:"mc-v5-feature",onClick:()=>Ct(he),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:he.title}),(0,e.jsx)("p",{children:tn(he)}),(0,e.jsxs)("div",{className:"mc-v5-feature-meta",children:[(0,e.jsxs)("span",{children:[Gt[he.kind]||"\u{1F4CE}"," ",t(rt[he.kind]||"kindKnowledge")]}),(0,e.jsxs)("span",{children:["\u{1F552} ",Wt(he.updated)]}),(he.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)(eo,{n:$[he.path]||0,color:ft[he.kind]||ft.other,size:58}),(0,e.jsx)("b",{children:$[he.path]||0}),(0,e.jsx)("span",{children:t("links")}),(0,e.jsx)("button",{type:"button",className:"mc-v5-feature-shuffle",onClick:h=>{h.stopPropagation(),Re()},children:t("reshuffle")}),(0,e.jsx)("span",{className:"mc-v5-feature-open",children:t("openArrow")})]})]}),(0,e.jsx)("div",{className:"mc-grid",children:tt.filter(h=>!De||h.path!==he.path).map(h=>(0,e.jsx)(fr,{card:h,t,query:F.trim(),onOpen:Ct,onDelete:Ht,onTagClick:Lt,pinned:Y.has(h.path),onPin:fe,onCore:Ft,links:$[h.path]||0},h.path))}),f.length<vt&&(0,e.jsx)("div",{ref:Kt,style:{height:1}}),dt&&(0,e.jsxs)("div",{className:"mc-empty",style:{padding:"10px 0"},children:[t("loading"),"\uFF08",f.length," / ",vt,"\uFF09"]})]})}),(0,e.jsx)("div",{style:{display:E==="graph"?"flex":"none",flex:1,minHeight:0},children:ze.has("graph")&&(0,e.jsx)(kr,{t,onOpen:Ct,all:be,onAllChange:ce,onMutate:He,active:E==="graph",visible:E==="graph"})}),(0,e.jsx)("div",{style:{display:E==="news"?"contents":"none"},children:ze.has("news")&&(0,e.jsx)(pr,{t,version:k,onUnreadChange:P})}),(0,e.jsx)("div",{style:{display:E==="terminal"?"contents":"none"},children:ze.has("terminal")&&(0,e.jsx)(Ko,{t})}),(0,e.jsx)("div",{style:{display:E==="config"?"contents":"none"},children:ze.has("config")&&(0,e.jsx)(Jn,{t,onReload:()=>Ge(),version:k,embedded:typeof location<"u"&&new URLSearchParams(location.search).get("embed")==="1"})}),(0,e.jsx)("div",{style:{display:E==="stats"?"contents":"none"},children:ze.has("stats")&&(0,e.jsx)(br,{t,tab:"stats",onReload:()=>Ge(),version:k})}),(0,e.jsx)("div",{style:{display:E==="audit"?"contents":"none"},children:ze.has("audit")&&(0,e.jsx)(Qo,{t,onReload:()=>{Ge(),He()},version:k})}),(0,e.jsx)("div",{style:{display:E==="optimize"?"contents":"none"},children:ze.has("optimize")&&(0,e.jsx)(ur,{t,onReload:()=>{Ge(),He()},version:k})}),A&&(0,e.jsx)(yr,{t,onClose:()=>le(!1)}),ie&&(0,e.jsx)(xr,{t,tab:nt,onTab:Fe,onClose:()=>ke(!1),onFeedback:()=>{ke(!1),le(!0)},onReplay:()=>{ke(!1),lt(!0)}}),yt&&(0,e.jsx)(vr,{t,onDone:Nt}),me&&(0,e.jsx)(wr,{t,card:me,query:F.trim(),onNavigate:h=>{let j=tt.findIndex(Ne=>Ne.path===me.path),ne=tt[j+h];ne&&Ct(ne)},onTagClick:Lt,onClose:()=>ye(null),onDelete:h=>{ye(null),Ht(h)},onFeedback:h=>{let j=me.path;fetch(`${G}/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:F.trim(),path:j,useful:h})}).then(()=>te({ok:!0,msg:t(h?"fbUseful":"fbIrr")})).catch(()=>{}),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>te(null),2e3)},allCards:tt,onOpenRelated:h=>Ct(h),onKindChange:Ft,onSaved:async({path:h,status:j,title:ne})=>{try{let Ne=j&&j!=="approved"?`&status=${encodeURIComponent(j)}`:"",Me=await fetch(`${G}/card?path=${encodeURIComponent(h)}${Ne}`).then(ve=>ve.json());Me&&Me.ok&&ye(ve=>ve&&ve.path===h?{...ve,title:ne||Me.title||ve.title,text:Me.text}:ve)}catch{}await Ge(),He(),te({ok:!0,msg:t("editSaved")}),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>te(null),2e3)}}),(0,e.jsx)(hr,{t,newCard:Ee,setNewCard:b,onCreated:()=>{Ge(),He(),te({ok:!0,msg:t("created")}),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>te(null),2e3)}})]})]})]})}var Ta=({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 Qa=(0,r.createContext)({form:null,set:()=>{}}),Xo=new Set(["autoRestartOnDrift","coreMemoryEnabled","skillCardsAutoSync","workingMemoryEnabled"]);function Qe({k:t,label:a,hint:n,type:i="text",step:s,min:d,max:g,wide:S}){let{form:f,set:y}=(0,r.useContext)(Qa);return(0,e.jsxs)("label",{className:"mc-field"+(S?" mc-field-wide":""),children:[(0,e.jsx)("span",{className:"mc-field-label",children:a||t}),(0,e.jsx)("input",{type:i,step:s,min:d,max:g,value:f?f[t]??"":"",onChange:u=>{let N=u.target.value;y(t,i==="number"?N===""?"":Number(N):N)}}),n?(0,e.jsx)("span",{className:"mc-field-hint",children:n}):null]})}function mt({k:t,label:a}){let{form:n,set:i}=(0,r.useContext)(Qa),s=n?n[t]:void 0,d=s===void 0?Xo.has(t):!!s;return(0,e.jsxs)("label",{className:"mc-switch",children:[(0,e.jsx)("input",{type:"checkbox",checked:d,onChange:g=>i(t,g.target.checked)}),(0,e.jsx)("span",{children:a||t})]})}function At({icon:t,title:a,sub:n,id:i,children:s,hidden:d}){return(0,e.jsxs)("section",{className:"mc-card mc-cfg-sec",id:i,"data-cfg-sec":i||"",hidden:d||void 0,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",{className:"mc-cfg-sec-body",children:s})]})}function Jn({t,onReload:a,version:n,compact:i,embedded:s}){let d=s===!0,[g,S]=(0,r.useState)("general"),f={"sec-preset":"general","sec-basic":"general","sec-skills":"general","sec-digest":"general","sec-ui":"general","sec-memory":"memory","sec-core":"memory","sec-vault":"memory","sec-cost":"advanced","sec-audit":"advanced","sec-service":"service"},y=[["general",t("paneGeneral"),t("paneGeneralSub"),"\u2699\uFE0F"],["memory",t("paneMemory"),t("paneMemorySub"),"\u{1F9E0}"],["advanced",t("paneAdvanced"),t("paneAdvancedSub"),"\u2728"],["service",t("paneService"),t("paneServiceSub"),"\u{1F6E0}"]],u=y.find(l=>l[0]===g)||y[0],N=l=>{S(l),be.current&&(be.current.scrollTop=0);let $=typeof document<"u"?document.querySelector('.mc-pagebtn[data-page="'+l+'"]'):null;$&&$.scrollIntoView({inline:"center",block:"nearest"})},v=l=>d?{hidden:f[l]!==g}:{},[M,q]=(0,r.useState)(null),[H,R]=(0,r.useState)(0),[J,F]=(0,r.useState)(null),[I,pe]=(0,r.useState)(null),[Z,U]=(0,r.useState)(!1),[K,Y]=(0,r.useState)(!1),_=(0,r.useRef)(!1),ae=(0,r.useRef)(null),ue=(0,r.useRef)({}),[fe,ge]=(0,r.useState)(null),[Ae,E]=(0,r.useState)(null),[je,ze]=(0,r.useState)(""),[Se,oe]=(0,r.useState)(""),[Q,$e]=(0,r.useState)(""),[qe,te]=(0,r.useState)(null),[D,L]=(0,r.useState)(null),[c,O]=(0,r.useState)(null),se=(0,r.useCallback)(async(l,$=!1)=>{$||oe("version");try{let ee=await fetch(G+"/version-check"+(l?"?force=1":"")).then(Be=>Be.json());ee&&ee.ok?(O(ee),l&&Fe(ee.updateAvailable?t("vcLatest")+" v"+ee.latest:t("vcUpToDate"))):l&&Fe(t("vcCheckFail"),!1)}catch{l&&Fe(t("vcCheckFail"),!1)}finally{$||oe("")}},[t]);(0,r.useEffect)(()=>{se(!1);let l=setInterval(()=>{se(!1,!0)},6e4),$=()=>{typeof document<"u"&&!document.hidden&&se(!1,!0)};return document.addEventListener("visibilitychange",$),()=>{clearInterval(l),document.removeEventListener("visibilitychange",$)}},[n,se]);let[Ie,re]=(0,r.useState)(""),[X,m]=(0,r.useState)(null),[B,P]=(0,r.useState)(""),[me,ye]=(0,r.useState)(!1),be=(0,r.useRef)(null),ce=(0,r.useRef)(0),[A,le]=(0,r.useState)(""),ie=l=>{ce.current=l.currentTarget.scrollTop;let $=l.currentTarget,ee="";for(let Be of $.querySelectorAll("[data-cfg-sec]"))Be.offsetTop-$.offsetTop<=$.scrollTop+90&&(ee=Be.getAttribute("data-cfg-sec"));ee&&le(Be=>Be===ee?Be:ee)},ke=l=>{let $=be.current&&be.current.querySelector("#"+l);$&&$.scrollIntoView({behavior:"smooth",block:"start"})};(0,r.useLayoutEffect)(()=>{let l=be.current;l&&Math.abs(l.scrollTop-ce.current)>1&&(l.scrollTop=ce.current)});let nt=(0,r.useRef)(null),Fe=(l,$=!0)=>{nt.current&&clearTimeout(nt.current),m({msg:l,ok:$}),nt.current=setTimeout(()=>m(null),1900)},yt=async()=>{if(!Se){oe("restart");try{let l=await fetch(G+"/restart-self",{method:"POST"});if(l.status===404||l.status===405){Fe(k("vcRestartNoRoute",{cmd:c&&c.restartCommand||"dsh-memory restart --port 7999"}),!1);return}let $=await l.json().catch(()=>null);if(!$){Fe(t("vcRestartFail")+"\uFF08HTTP "+l.status+"\uFF09",!1);return}if(!$.ok){Fe($.error||t("vcRestartFail"),!1);return}if($.alreadyCurrent){Fe($.note||t("vcRestartCurrent"));return}Fe($.note||t("vcRestartSent")),$.alreadyRunning||setTimeout(()=>{se(!0)},6e3)}catch(l){Fe(t("vcRestartFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{oe("")}}},lt=c&&c.resident?String(c.resident.served||""):"",Nt=!!(c&&c.onDisk&<&<!==c.onDisk),ct=!!(c&&c.resident&&c.resident.managed===!1&&c.resident.managedKnown===!1),Ue=c&&c.resident&&c.resident.replaceBlocked&&c.resident.replaceBlocked.fresh||null,Rt=!!(c&&c.resident&&c.resident.managedBy==="host"),Ce=!!(c&&c.resident&&c.resident.managed===!1&&!ct&&!Rt),x=!!(c&&c.resident&&!lt),p=Nt||x||Ce||ct,de=bn({hasVersion:!!c,hostVersion:c?c.loaded:"",onDisk:c?c.onDisk:"",residentServed:c&&c.resident?c.resident.served:"",residentPresent:!!(c&&c.resident),residentManaged:c&&c.resident?c.resident.managed:null,residentManagedKnown:c&&c.resident?c.resident.managedKnown:null,residentManagedBy:c&&c.resident?c.resident.managedBy:"",replaceBlocked:c&&c.resident?c.resident.replaceBlocked:null}),Ee={hostProcessStale:()=>k("vcHostProcessStale",{disk:c.onDisk,loaded:c.loaded}),residentDown:()=>k("vcResidentDown",{port:c.resident&&c.resident.port||"",cmd:c.restartCommand||"dsh-memory restart --port 7999"}),residentReplaceBlocked:()=>k("vcResidentReplaceBlocked",{served:lt,err:Ue&&Ue.error||"",path:Ue&&Ue.lockPath||"",cmd:c.restartCommand||"dsh-memory restart --port "+(c.resident&&c.resident.port||7999)}),residentLockUnknown:()=>k("vcResidentLockUnknown",{served:lt,path:c.resident&&c.resident.lock&&c.resident.lock.path||"",err:c.resident&&c.resident.lock&&c.resident.lock.error||""}),residentUnmanaged:()=>k("vcResidentUnmanaged",{served:lt,cmd:c.restartCommand||"dsh-memory restart --port 7999"})},b={restartStart:()=>k("vcRestartStart",{disk:c&&c.onDisk||""}),restartRepair:()=>k("vcRestartRepair",{disk:c&&c.onDisk||""}),restartFixes:()=>k("vcRestartFixes",{served:lt||"",disk:c&&c.onDisk||""}),restartHostOnly:()=>k("vcRestartHostOnly",{loaded:c&&c.loaded||"",disk:c&&c.onDisk||""}),restartAnyway:()=>k("vcRestartAnyway",{ver:c&&c.onDisk||""})},k=(l,$)=>Object.keys($).reduce((ee,Be)=>ee.split("{"+Be+"}").join($[Be]),t(l)),Pe=(0,r.useCallback)(async()=>{try{let[l,$,ee,Be]=await Promise.all([fetch(`${G}/config`).then(he=>he.json()).catch(()=>null),fetch(`${G}/setup-status`).then(he=>he.json()).catch(()=>null),fetch(`${G}/budget`).then(he=>he.json()).catch(()=>null),fetch(`${G}/llm-routes`).then(he=>he.json()).catch(()=>null)]);if(Be&&Be.ok&&L(Be),l&&l.ok){q(l),R(l.revision??0),F(l.schema??null);let he=Bn(l.config??{},ue.current);ue.current=he.overlay,pe({...he.values}),ye(!1),ge(l.dsh??null),U(l.writable===!1),Y(l.viaPending===!0),ze(""),_.current=!1}else ee&&ee.ok?(pe({...ee}),ye(!1),U(!0),ze(t("configNeedsDsh"))):ze(t("adminLoadFail"));$&&$.ok&&E($),$e("")}catch{ze(t("adminLoadFail"))}},[t]);(0,r.useEffect)(()=>{Pe()},[n,Pe]);let He=(l,$)=>{_.current=!0,ye(!0),P(""),pe(ee=>({...ee??{},[l]:$}))};(0,r.useEffect)(()=>{ae.current=Pe},[Pe]),(0,r.useEffect)(()=>{if(typeof EventSource>"u")return;let l=null;try{l=new EventSource(G+"/events")}catch{return}let $=()=>{!_.current&&typeof ae.current=="function"&&ae.current()};try{l.addEventListener("config",$)}catch{}return()=>{try{l.close()}catch{}}},[]);let o=new Set(["dedupThreshold","captureMinChars","captureCooldownMs","maxCardsPerDay","captureMaxTokens","recallMinScore","recallLimit","recallSummaryLen","recycleRetentionDays","webPort","webCheckIntervalMs","webMaxRestart","sessionBudgetChars","coreMemoryLimit","coreMemoryMaxChars"]),ht=l=>({init:t("modeInit"),interval:t("modeInterval"),manual:t("modeManual")})[l]||l,xt=async()=>{if(!I)return;if(Z){Fe(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]},$=[];for(let[ee,[Be,he]]of Object.entries(l)){if(!(ee in I))continue;let Re=I[ee],De=typeof Re=="number"?Re:Number(Re);(Re===""||Re===null||Re===void 0||!Number.isFinite(De)||De<Be||De>he)&&$.push(t("invalidField",{field:ee,min:Be,max:he,value:String(Re===""?"\u7A7A":Re)}))}if($.length){let ee=t("saveInvalid")+"\uFF1A"+$.join("\uFF1B");ze(ee),Fe(ee,!1);return}oe("save");try{let ee={...I};for(let De of Object.keys(I))De in ee&&typeof ee[De]=="string"&&ee[De].trim()!==""&&o.has(De)&&(ee[De]=Number(ee[De]));Array.isArray(ee.vaultProfiles)&&(ee.vaultProfiles=ee.vaultProfiles.filter(De=>De&&(String(De.name||"").trim()||String(De.path||"").trim())));let Be=await fetch(`${G}/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:ee,expectedRevision:H})}),he=await Be.text(),Re=null;try{Re=he?JSON.parse(he):null}catch{Re=null}if(Re||(Re={error:"HTTP "+Be.status+(he?"\uFF1A"+he.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")}),Re&&Re.ok){let De=typeof Re.pendingOutcome=="string"?Re.pendingOutcome:"",ut,h=!0;if(De==="applied")ut=t("savedApplied")+(Array.isArray(Re.applied)&&Re.applied.length?" \xB7 "+Re.applied.join("\u3001"):"");else if(De==="queued")h=!1,ut=t("saveQueued");else if(De==="failed")h=!1,ut=t("saveFail")+" \xB7 "+(Re.hostGuard?t("saveHostGuard"):t("saveFailHint"));else if(De==="applied-direct")ut=t("savedOk")+" \xB7 "+t("savedDirect");else{let j=Array.isArray(Re.pending)&&Re.pending.length?" \xB7 "+t("savePending"):Re.note?" \xB7 "+t("restartHint"):"";ut=(Re.retried?"\u267B ":"")+t("savedOk")+j}ue.current={...ue.current,...ee},h?(P(""),ye(!1),$e(ut)):ze(ut),Fe(ut,h),await Pe()}else{let De=Be.status===409?t("conflictRefresh"):Re?.error||t("saveFail");ze(De),Fe(De,!1)}}catch{ze(t("saveFail")),Fe(t("saveFail"),!1)}finally{oe("")}},vt=()=>{ue.current={},pe({...M?.config??{}}),P(""),ye(!1),$e("")},zt={env:"vaultSrcEnv",profile:"vaultSrcProfile",workspace:"vaultSrcWorkspace",vaultDir:"vaultSrcVaultDir",default:"vaultSrcDefault"},dt=l=>Array.isArray(l?.vaultProfiles)?l.vaultProfiles:[],jt=(l,$,ee)=>{_.current=!0,ye(!0),pe(Be=>{let he=dt(Be).map(De=>({...De||{}})),Re={...he[l]||{}};return $==="match"?String(ee).trim()?Re.match={...Re.match||{},workspace:ee}:delete Re.match:Re[$]=ee,he[l]=Re,{...Be??{},vaultProfiles:he}})},Kt=()=>{_.current=!0,ye(!0),pe(l=>({...l??{},vaultProfiles:[...dt(l),{name:"",path:""}]}))},Yt=l=>{_.current=!0,ye(!0),pe($=>({...$??{},vaultProfiles:dt($).filter((ee,Be)=>Be!==l)}))},it={fontSize:11,padding:"2px 8px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:6},Ge={padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:12,minWidth:0},Ht={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}},oa=l=>{let $=Ht[l];$&&(pe(ee=>({...ee??{},...$})),_.current=!0,ye(!0),P(l),Fe(k("planApplied",{plan:$.label})))},Dt=async()=>{try{let l=await fetch(G+"/setup-status").then($=>$.json());l&&l.ok&&E(l)}catch{}},Lt=async(l,$)=>{oe(l+$);try{let Be=await(await fetch(`${G}/mcp/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:l,action:$})})).json();Be&&Be.ok?Fe(k($==="install"?"mcpInstalled":"mcpUninstalled",{agent:l})):Fe(k("mcpActionFail",{agent:l,error:Be?.error||""}),!1);try{let he=await fetch(`${G}/setup-status`).then(Re=>Re.json());he&&he.ok&&E(he)}catch{}}catch{Fe(t("mergeFail"),!1)}finally{oe("")}},Ft=Ae&&Array.isArray(Ae.agents)?Ae.agents:[],Ct=Ft.filter(l=>l.installed),Vt=[...new Set(Ct.flatMap(l=>Array.isArray(l.servers)?l.servers:[]))],_t=Ft.filter(l=>l.mcpConfigured&&!l.isDsh).length,Zt=Ft.some(l=>Array.isArray(l.servers)),tt=[["sec-preset","\u{1F3AF}",t("presetConfig")],["sec-memory","\u{1F9E0}",t("dshMemoryConfig")],["sec-core","\u2B50",t("coreMemory")],["sec-skills","\u{1F9E9}",t("skillCards")],["sec-digest","\u{1F4EC}",t("newsDigest")],["sec-ui","\u{1F520}",t("uiLayout")],["sec-vault","\u{1F5C2}\uFE0F",t("vaultMulti")],["sec-cost","\u{1F4B0}",t("costControl")],["sec-audit","\u{1F6E1}\uFE0F",t("auditConfig")],["sec-service","\u{1F6E0}",t("serviceConfig")]];return(0,e.jsx)(Qa.Provider,{value:{form:I,set:He},children:(0,e.jsxs)("div",{className:"mc-admin"+(d?" mc-embed":""),style:{display:"flex",flexDirection:"column",overflow:"hidden",flex:i?"0 0 auto":1,minHeight:0,maxHeight:i?"52vh":void 0},children:[(0,e.jsx)("style",{children:bt}),X&&(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 "+(X.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:X.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:X.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:X.msg})]}),(0,e.jsx)("div",{ref:be,onScroll:ie,style:{flex:1,minHeight:0,overflow:"auto",overscrollBehavior:"contain",scrollbarGutter:"stable",padding:4},children:(0,e.jsx)("div",{className:"mc-cfg-page",children:(0,e.jsxs)("div",{className:"mc-cfg-layout"+(i||d?" compact":""),children:[!i&&!d&&(0,e.jsxs)("aside",{className:"mc-cfg-toc","aria-label":t("tabConfig"),children:[(0,e.jsx)("div",{className:"mc-cfg-toc-title",children:t("tabConfig")}),tt.map(([l,$,ee])=>(0,e.jsxs)("button",{type:"button",className:A===l?"on":"",onClick:()=>ke(l),children:[(0,e.jsx)("span",{className:"mc-cfg-toc-ico",children:$}),(0,e.jsx)("span",{children:ee})]},l))]}),(0,e.jsxs)("div",{className:"mc-cfg-main",children:[d&&(0,e.jsx)("div",{className:"mc-pagenav",role:"tablist","aria-label":t("tabConfig"),children:y.map(([l,$,,ee])=>(0,e.jsxs)("button",{type:"button",role:"tab","data-page":l,"aria-selected":g===l,className:"mc-pagebtn"+(g===l?" on":""),onClick:()=>N(l),children:[(0,e.jsx)("span",{className:"mc-pagebtn-ico","aria-hidden":"true",children:ee}),(0,e.jsx)("span",{children:$})]},l))}),d&&(0,e.jsxs)("div",{className:"mc-panehead",children:[(0,e.jsx)("div",{className:"mc-panehead-ico","aria-hidden":"true",children:u[3]}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-panehead-title",children:u[1]}),(0,e.jsx)("div",{className:"mc-panehead-sub",children:u[2]})]})]}),!i&&!d&&(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")]})]}),je&&(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 ",je]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:Pe,children:["\u21BB ",t("retry")]})]}),K&&(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")]}),Z&&(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")]}),Q&&(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 ",Q]}),(!d||g==="service")&&M&&(M.version||M.dsh?.vaultDir)&&(0,e.jsxs)("details",{className:"mc-card mc-env mc-env-fold",open:!d,children:[(0,e.jsxs)("summary",{className:"mc-env-top",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")}),M.version&&(0,e.jsxs)("code",{style:it,children:[t("vcLoaded")," v",M.version]}),c&&c.resident&&c.resident.served&&c.resident.served!==M.version&&(0,e.jsxs)("code",{style:it,children:[t("vcResident")," v",c.resident.served]}),c&&c.resident&&!c.resident.served&&(0,e.jsxs)("code",{style:{...it,color:"#b45309",fontWeight:600},children:[t("vcResident")," ",t("vcResidentDownShort")]}),c&&c.resident&&c.resident.served&&c.resident.managed===!1&&(0,e.jsxs)("code",{style:{...it,color:"#b45309",fontWeight:600},children:[t("vcResident")," v",c.resident.served," \xB7 ",t(Ue?"vcResidentReplaceBlockedShort":Rt?"vcResidentHostManagedShort":ct?"vcResidentLockUnknownShort":"vcResidentUnmanagedShort")]}),na&&(0,e.jsxs)("code",{style:it,children:[t("vcPage")," v",na]}),c&&c.onDisk&&(0,e.jsxs)("code",{style:it,children:[t("vcOnDisk")," v",c.onDisk]}),c&&c.latest&&(0,e.jsxs)("code",{style:it,children:[t("vcLatest")," v",c.latest]}),M.dsh?.vaultDir&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.6},children:["\u{1F4C1} ",M.dsh.vaultDir]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("span",{className:"mc-fold-caret",children:"\u25BE"})]}),(0,e.jsxs)("div",{className:"mc-env-rest",children:[(0,e.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:8},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:Se==="version",onClick:()=>se(!0),children:Se==="version"?t("checking"):"\u{1F504} "+t("vcCheck")})}),c&&de.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 ",Ee[de.warn]?Ee[de.warn]():""]})}),de.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"+(de.emphasis?" me-on":""),disabled:!!Se,onClick:yt,children:Se==="restart"?"\u23F3 "+t("vcRestarting"):"\u{1F504} "+t("vcRestart")}),c.restartCommand&&(0,e.jsx)("code",{style:{fontSize:11,opacity:.75},children:c.restartCommand}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:b[de.hint]?b[de.hint]():""})]}),na&&c&&c.onDisk&&na!==c.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:na,disk:c.onDisk})}),c&&c.updateAvailable&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,opacity:.88},children:["\u2B06 ",t("vcOutdated")," \u2192 ",(0,e.jsx)("code",{children:c.updateCommand})]}),c&&c.checkError&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#b91c1c"},children:[t("vcCheckFail"),"\uFF1A",c.checkError]})]})]}),(!d||g==="service")&&Ae&&Ae.agents&&(0,e.jsxs)("details",{className:"mc-card mc-cfg-sec mc-fold",style:{marginBottom:10},children:[(0,e.jsxs)("summary",{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.jsxs)("div",{className:"mc-cfg-sec-sub",children:[Zt?k("mcpSummary",{agents:Ct.length,servers:Vt.length,mounted:_t})+" \xB7 ":"",t("mcpAutoHint")]})]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),(0,e.jsx)("span",{className:"mc-fold-caret",children:"\u25BE"})]}),(0,e.jsxs)("div",{className:"mc-fold-body",children:[(0,e.jsxs)("div",{className:"mc-cfg-tools",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",flex:"none"},onClick:Dt,children:t("mcpRefresh")}),Ie&&(0,e.jsx)("code",{style:{padding:"2px 6px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:4,fontSize:11},children:Ie})]}),Ft.map(l=>{let $=Array.isArray(l.servers),ee=$?l.servers:[],Be=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:Be}),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})]}),$?ee.length?(0,e.jsx)("div",{className:"mc-mcp-servers",children:ee.map(he=>(0,e.jsx)("code",{className:he==="memory"?"on":"",children:he},he))}):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:!!Se,onClick:()=>Lt(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:!!Se,onClick:()=>Lt(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:!!Se,onClick:()=>{window.confirm(t("uninstallConfirm"))&&Lt(l.name,"uninstall")},children:t("uninstallMcp")})]})]},l.name+(l.mcpPath||""))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55},children:t("mcpSetupHint")})]})]}),I?(0,e.jsxs)("div",{className:"mc-cfg",children:[(0,e.jsxs)(At,{...v("sec-preset"),id:"sec-preset",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"+(B===l?" on":""),"aria-pressed":B===l,onClick:()=>oa(l),disabled:!!Se,children:[(0,e.jsxs)("b",{children:[B===l?"\u2705 ":l==="A"?"\u{1F7E2} ":l==="B"?"\u{1F4B0} ":"\u2B50 ",Ht[l].label]}),(0,e.jsx)("span",{children:t("planDesc"+l)})]},l))}),B?(0,e.jsxs)("div",{style:{fontSize:11,color:"#10b981"},children:["\u2705 ",k("planApplied",{plan:Ht[B].label})]}):null]}),(0,e.jsx)(At,{...v("sec-basic"),id:"sec-basic",icon:"\u26A1",title:t("basicSwitches"),sub:t("basicSwitchesHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-switches",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.jsxs)(At,{...v("sec-memory"),id:"sec-memory",icon:"\u{1F9E0}",title:t("dshMemoryConfig"),sub:t("cfgSubCore"),children:[(0,e.jsx)("div",{className:"mc-cfg-switches is-single",children:(0,e.jsx)(mt,{k:"recallIncludeBody",label:t("recallBody")})}),(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Qe,{k:"vaultDir",label:t("vaultDirLabel"),wide:!0}),(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)(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:"secretHint",label:t("secretHint"),wide:!0}),(0,e.jsx)(Qe,{k:"recallEmbedding",label:t("recallEmbedding"),wide:!0})]})]}),(0,e.jsxs)(At,{...v("sec-core"),id:"sec-core",icon:"\u2B50",title:t("coreMemory"),sub:t("coreMemoryHint"),children:[(0,e.jsxs)("div",{className:"mc-cfg-switches",children:[(0,e.jsx)(mt,{k:"coreMemoryEnabled",label:t("coreMemoryEnabled")}),(0,e.jsx)(mt,{k:"workingMemoryEnabled",label:t("workingMemoryEnabled")})]}),(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(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)(At,{...v("sec-skills"),id:"sec-skills",icon:"\u{1F9E9}",title:t("skillCards"),sub:t("skillCardsHint"),children:[(0,e.jsx)("div",{className:"mc-cfg-switches is-single",children:(0,e.jsx)(mt,{k:"skillCardsAutoSync",label:t("skillAutoSync")})}),(0,e.jsx)("div",{className:"mc-cfg-tools",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!Se,onClick:async()=>{oe("skills");try{let l=await fetch(G+"/skills/sync",{method:"POST"}).then($=>$.json()).catch(()=>null);l&&l.ok?Fe(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)):Fe(l&&l.error||t("skillsSyncFail"),!1)}catch{Fe(t("skillsSyncFail"),!1)}finally{oe("")}},children:Se==="skills"?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")})})]}),(0,e.jsxs)(At,{...v("sec-digest"),id:"sec-digest",icon:"\u{1F4EC}",title:t("newsDigest"),sub:t("newsDigestHint"),children:[(0,e.jsx)("div",{className:"mc-cfg-switches is-single",children:(0,e.jsx)(mt,{k:"newsDigestEnabled",label:t("newsDigestEnabled")})}),(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Qe,{k:"newsDigestIntervalMinutes",label:t("newsDigestInterval"),type:"number"}),(0,e.jsx)(Qe,{k:"newsDigestMaxItems",label:t("newsDigestMaxItems"),type:"number"})]}),(0,e.jsxs)("div",{className:"mc-cfg-tools",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!Se,onClick:async()=>{oe("digest");try{let l=await fetch(G+"/news/digest",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}).then($=>$.json()).catch(()=>null);l&&l.ok?(te(l.text||""),Fe(l.digest&&l.digest.items&&l.digest.items.length?t("newsDigestDone"):t("newsDigestEmpty"),!0)):Fe(l&&l.error||t("newsDigestFail"),!1)}catch{Fe(t("newsDigestFail"),!1)}finally{oe("")}},children:Se==="digest"?"\u23F3 "+t("newsDigestBuilding"):"\u{1F4EC} "+t("newsDigestNow")}),(0,e.jsx)("span",{className:"mc-field-hint",children:t("newsDigestNowHint")})]}),qe!==null?(0,e.jsx)("pre",{className:"mc-digest-preview",children:qe||t("newsDigestEmpty")}):null]}),(0,e.jsx)(At,{...v("sec-ui"),id:"sec-ui",icon:"\u{1F520}",title:t("uiLayout"),sub:t("uiLayoutHint"),children:(0,e.jsx)("div",{className:"mc-field",children:(0,e.jsx)("div",{className:"mc-seg",children:[["compact",t("uiCompact")],["normal",t("uiNormal")],["large",t("uiLarge")]].map(([l,$])=>(0,e.jsx)("button",{type:"button",className:(I&&I.uiScale||"normal")===l?"on":"",onClick:()=>{He("uiScale",l);try{window.dispatchEvent(new CustomEvent("me-ui-scale",{detail:l}))}catch{}},children:$},l))})})}),(0,e.jsxs)(At,{...v("sec-vault"),id:"sec-vault",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:fe?.vaultDir||"\u2014"}),fe?.vaultName?`\uFF08${fe.vaultName}\uFF09`:""," \xB7 ",t("vaultSource"),"\uFF1A",t(zt[fe?.vaultSource]||"vaultSrcDefault"),fe?.workspace?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("br",{}),t("vaultWorkspace"),"\uFF1A",(0,e.jsx)("code",{children:fe.workspace})]}):null]}),dt(I).length?(0,e.jsxs)("div",{className:"mc-vault-head",children:[(0,e.jsx)("span",{children:t("vaultNamePh")}),(0,e.jsx)("span",{children:t("vaultPathPh")}),(0,e.jsx)("span",{children:t("vaultMatchPh")}),(0,e.jsx)("span",{})]}):null,dt(I).map((l,$)=>(0,e.jsxs)("div",{className:"mc-vault-row",children:[(0,e.jsx)("input",{value:l.name||"",placeholder:t("vaultNamePh"),onChange:ee=>jt($,"name",ee.target.value),style:Ge,disabled:Z}),(0,e.jsx)("input",{value:l.path||"",placeholder:t("vaultPathPh"),onChange:ee=>jt($,"path",ee.target.value),style:Ge,disabled:Z}),(0,e.jsx)("input",{value:l.match&&l.match.workspace||"",placeholder:t("vaultMatchPh"),onChange:ee=>jt($,"match",ee.target.value),style:Ge,disabled:Z}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Yt($),disabled:Z,title:t("delete"),children:"\u2715"})]},$)),(0,e.jsxs)("div",{className:"mc-cfg-tools",style:{marginTop:4},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:Kt,disabled:Z,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:I.activeVault||"",onChange:l=>He("activeVault",l.target.value),disabled:Z,style:Ge,children:[(0,e.jsx)("option",{value:"",children:t("vaultActiveNone")}),dt(I).filter(l=>l&&l.name).map(l=>(0,e.jsx)("option",{value:l.name,children:l.name},l.name))]})]})]})]}),(0,e.jsxs)(At,{...v("sec-cost"),id:"sec-cost",icon:"\u{1F4B0}",title:t("costControl"),sub:t("costHint"),children:[(0,e.jsxs)("div",{className:"mc-cfg-switches",children:[(0,e.jsx)(mt,{k:"distillEnabled",label:t("distillEnabled")}),(0,e.jsx)(mt,{k:"dedupByLLM",label:t("dedupByLLM")}),(0,e.jsx)(mt,{k:"captureFollowSession",label:t("captureFollowSession")}),(0,e.jsx)(mt,{k:"captureFirstOnly",label:t("captureFirstOnly")})]}),(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(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"}),D&&D.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 ",k("routeListFail",{err:D.error||"\u672A\u77E5\u539F\u56E0"})]}),D&&D.providers&&D.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:I.captureProvider||"",onChange:l=>{He("captureProvider",l.target.value),He("captureModel","")},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),D.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:I.captureModel||"",onChange:l=>He("captureModel",l.target.value),children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),((D.providers.find(l=>l.id===I.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)(Qe,{k:"sessionBudgetChars",label:t("sessionBudgetChars"),type:"number"})]}),(0,e.jsx)("div",{className:"mc-cfg-tools",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!Se,onClick:async()=>{oe("llmtest");try{let l=await fetch(G+"/llm-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:I.captureProvider||"",model:I.captureModel||"",firstOnly:I.captureFirstOnly===!0})}).then($=>$.json());l&&l.ok?Fe(t("llmTestOk")+"\uFF1A"+l.route.provider+(l.route.model?"/"+l.route.model:"")+" \xB7 "+l.ms+"ms \xB7 "+t("llmCandidates")+" "+l.candidates):Fe(t("llmTestFail")+"\uFF1A"+(l&&(l.failure?l.failure.code+" "+l.failure.message:l.error)||"?"),!1)}catch(l){Fe(t("llmTestFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{oe("")}},children:Se==="llmtest"?t("exporting"):"\u{1F50C} "+t("llmTest")})})]}),(0,e.jsx)(At,{...v("sec-audit"),id:"sec-audit",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:I.auditMode??"all",onChange:l=>He("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)($n,{label:t("auditExemptAgents"),value:I.auditExemptAgents||[],options:[{value:"__all__",label:t("allExempt")},...(Ae?.agents||[]).filter(l=>!l.isDsh).map(l=>({value:l.name,label:l.name}))],onChange:l=>He("auditExemptAgents",l)}),(0,e.jsx)($n,{label:t("auditExemptKinds"),value:I.auditExemptKinds||[],options:[{value:"__all__",label:t("allExempt")},...Ma.filter(l=>l!=="all"&&l!=="core"&&l!=="skill").map(l=>({value:l,label:t(rt[l])}))],onChange:l=>He("auditExemptKinds",l)}),(0,e.jsx)(Qe,{k:"recycleRetentionDays",label:t("recycleDays"),hint:t("unitDays"),type:"number"})]})}),(0,e.jsxs)(At,{...v("sec-service"),id:"sec-service",icon:"\u{1F6E0}",title:t("serviceConfig"),sub:t("cfgSubService"),children:[(0,e.jsxs)("div",{className:"mc-cfg-switches",children:[(0,e.jsx)(mt,{k:"autoWeb",label:t("autoWeb")}),(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-grid",children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("autoWebMode")}),(0,e.jsxs)("select",{value:I.autoWebMode??"init",onChange:l=>He("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.jsxs)("div",{className:"mc-cfg-actions",children:[me?(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"}),Se==="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,opacity:.75},children:["\u23F3 ",t("saving")]}),Q&&Se!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#10b981"},children:["\u2705 ",Q]}),je&&Se!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#b91c1c"},children:["\u26A0 ",je]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:vt,disabled:!!Se,children:t("reset")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:Z?()=>Fe(t("readonlyTitle")+"\uFF1A"+t("readonlyBody"),!1):xt,disabled:Se==="save",title:t(Z?"readonlyBody":"saveConfig"),children:Se==="save"?"\u23F3 "+t("saving"):Z?"\u{1F512} "+t("readonlyBtn"):"\u{1F4BE} "+t("saveConfig")})]})]}):(0,e.jsx)("div",{style:{fontSize:12,opacity:.6},children:t("loading")})]})]})})})]})})}function Qo({t,onReload:a,version:n}){let[i,s]=(0,r.useState)([]),[d,g]=(0,r.useState)([]),[S,f]=(0,r.useState)("all"),[y,u]=(0,r.useState)("all"),[N,v]=(0,r.useState)(""),[M,q]=(0,r.useState)(""),[H,R]=(0,r.useState)(new Set),[J,F]=(0,r.useState)(null),[I,pe]=(0,r.useState)(""),[Z,U]=(0,r.useState)(null),[K,Y]=(0,r.useState)("pending"),_=(c,O=!0)=>{U({msg:c,ok:O}),setTimeout(()=>U(null),3e3)},ae=[...new Set([...i,...d].map(c=>c.submittedBy).filter(Boolean))],ue=(0,r.useCallback)(async()=>{try{let c=await fetch(`${G}/audit/list`).then(O=>O.json());c.ok&&(s(c.pending||[]),g(c.rejected||[]),R(new Set),ze({}))}catch{}},[]);(0,r.useEffect)(()=>{ue()},[n,ue]);let fe=(K==="pending"?i:d).filter(c=>{if(!Ba(c,M)||S!=="all"&&c.kind!==S||y!=="all"&&qt(c.submittedBy)!==y)return!1;if(N){let O=va(c.created);if(O&&O!==N)return!1}return!0}),ge=(0,r.useMemo)(()=>{let c=K==="pending"?i:d,O={all:0};return c.forEach(se=>{if(Ba(se,M)&&!(y!=="all"&&qt(se.submittedBy)!==y)){if(N){let Ie=va(se.created);if(Ie&&Ie!==N)return}O.all++,O[se.kind||"other"]=(O[se.kind||"other"]||0)+1}}),O},[i,d,K,y,N,M]),Ae=c=>R(O=>{let se=new Set(O);return se.has(c)?se.delete(c):se.add(c),se}),E=async(c,O,se={})=>{let Ie=O||[...H];if(!Ie.length){_(t("noSelection"),!1);return}pe("apply");let re=c==="approved"?se.kind==="core"?t("approveCore"):t("toastApproved"):t(c==="rejected"?"toastRejected":"toastCardDeleted");try{let X=0;for(let m of Ie){let B=c==="approved"?"audit/approve":c==="rejected"?"audit/reject":"delete";try{let P=c==="approved"&&se.kind?{path:m,kind:se.kind}:null;(await fetch(G+"/"+B+(P?"":"?path="+encodeURIComponent(m)+(c==="delete"?"&permanent=0":"")),P?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(P)}:void 0)).ok||X++}catch{X++}}await ue(),a&&a(),X?_(t("toastFailed")+"\uFF08"+X+"/"+Ie.length+"\uFF09",!1):_(re+" "+Ie.length+" \u5F20")}catch(X){_(t("toastFailed")+": "+String(X&&X.message||X),!1)}finally{pe("")}},[je,ze]=(0,r.useState)({}),Se=c=>je[c]||{},oe=[...H],Q=fe.find(c=>c.path===J)||fe[0]||null,$e=Q?Se(Q.path):{};(0,r.useEffect)(()=>{let c=Q;if(!c||je[c.path])return;let O=!0,se=c.path;ze(re=>({...re,[se]:{loading:!0}}));let Ie=c.status||(K==="pending"?"pending":"rejected");return fetch(`${G}/card?path=${encodeURIComponent(se)}&status=${Ie}`).then(re=>re.json()).then(re=>{O&&(re&&re.ok?ze(X=>({...X,[se]:{text:re.text||""}})):ze(X=>({...X,[se]:{error:re&&re.error||"HTTP"}})))}).catch(re=>{O&&ze(X=>({...X,[se]:{error:String(re&&re.message||re)}}))}),()=>{O=!1}},[Q&&Q.path,K]);let qe=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")){pe("reclassify");try{let c=await fetch(G+"/reclassify").then(O=>O.json());c&&c.ok?_(t("reclassify")+"\uFF1A"+c.changed+" / "+c.scanned):_(t("toastFailed")+": "+(c&&c.error||"HTTP"),!1),await ue(),a&&a()}catch(c){_(t("toastFailed")+": "+String(c&&c.message||c),!1)}finally{pe("")}}},te=()=>R(new Set),D=c=>{Y(c),te()},L=["all",...Ma.filter(c=>c!=="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:bt}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(Ta,{toast:Z}),(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:[i.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:M,onChange:c=>{q(c.target.value),te(),F(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}}),M&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>{q(""),te(),F(null)},title:t("clearFilter"),children:"\u2715"}),(0,e.jsxs)("select",{value:y,onChange:c=>{u(c.target.value),te()},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")}),Vn(ae).map(c=>(0,e.jsx)("option",{value:c,children:c},c))]}),(0,e.jsx)("input",{type:"date",value:N,onChange:c=>{v(c.target.value),te()},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")}),L.map(c=>{let O=c==="all"?"var(--dsw-alias-label-secondary, #9ca3af)":ft[c]||"#6B7280";return(0,e.jsxs)("button",{type:"button",className:`me-audit-kind${S===c?" active":""}`,onClick:()=>{f(c),te()},children:[(0,e.jsx)("span",{className:"me-audit-kind-dot",style:{background:O}}),(0,e.jsx)("span",{className:"me-audit-kind-name",children:t(c==="all"?"all":rt[c])}),(0,e.jsx)("span",{className:"me-audit-kind-count",children:ge[c]||0})]},c)})]})]}),(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${K==="pending"?" me-on":""}`,onClick:()=>D("pending"),children:[t("pending"),"\uFF08",i.length,"\uFF09"]}),(0,e.jsxs)("button",{type:"button",className:`mc-btn${K==="rejected"?" me-on":""}`,onClick:()=>D("rejected"),children:[t("rejected"),"\uFF08",d.length,"\uFF09"]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("label",{style:{fontSize:12},children:[(0,e.jsx)("input",{type:"checkbox",checked:fe.length>0&&oe.length===fe.length,onChange:c=>{c.target.checked?R(new Set(fe.map(O=>O.path))):R(new Set)}})," ",t("selectAll"),"\uFF08",fe.length,"\uFF09"]}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.65},children:[t("auditSelected")," ",oe.length]}),K==="pending"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!I,onClick:qe,children:["\u{1F527} ",t("reclassify")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!oe.length||!!I,onClick:()=>E("approved"),children:["\u2713 ",t(K==="rejected"?"restore":"approve")]}),K==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!oe.length||!!I,onClick:()=>E("rejected"),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!oe.length||!!I,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&E("delete")},children:["\u{1F5D1} ",t("restoreDelete")]}),oe.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:te,children:t("auditClearSelection")})]}),fe.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:fe.map(c=>{let O=ft[c.kind]||"#6B7280";return(0,e.jsx)("div",{className:`me-audit-row${c.kind==="core"?" core":""}${Q&&Q.path===c.path?" active":""}`,children:(0,e.jsxs)("div",{className:"me-audit-row-main",onClick:()=>F(c.path),children:[(0,e.jsx)("input",{type:"checkbox",checked:H.has(c.path),onClick:se=>se.stopPropagation(),onChange:()=>Ae(c.path)}),(0,e.jsx)("span",{className:"me-audit-row-tile",style:{color:O,borderColor:O+"38",background:O+"18"},children:Gt[c.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${c.kind==="core"?" core":""}`,children:c.kind==="core"?"\u2B50 "+t("kindCore"):t(rt[c.kind]||"kindKnowledge")}),c.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 ${K==="pending"?"pending":"rejected"}`,children:K==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"me-audit-row-time",children:ja(c.created)||"-"})]}),(0,e.jsx)("button",{type:"button",className:"me-audit-row-title",title:c.title,onClick:()=>F(c.path),children:c.title}),c.revision&&(0,e.jsxs)("p",{className:"me-audit-row-reason",style:{color:"#a78bfa"},children:["\u270F\uFE0F ",t("auditRevisionFrom"),"\uFF1A",c.revision.targetTitle||c.revision.targetPath]}),(c.reason||c.summary)&&(0,e.jsx)("p",{className:"me-audit-row-reason",children:c.reason||c.summary}),(0,e.jsxs)("div",{className:"me-audit-row-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",qt(c.submittedBy)]}),(Array.isArray(c.tags)?c.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:K==="pending"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>E("approved",[c.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},onClick:()=>E("rejected",[c.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:()=>E("approved",[c.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"))&&E("delete",[c.path])},children:"\u{1F5D1}"})]})})]})},c.path)})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:20,textAlign:"center"},children:t(M?"auditNoMatch":"noAuditItems")})]}),(0,e.jsx)("aside",{className:"me-audit-preview",children:Q?(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:ft[Q.kind]||"#6B7280",borderColor:(ft[Q.kind]||"#6B7280")+"59",background:(ft[Q.kind]||"#6B7280")+"1a"},children:[Gt[Q.kind]||"\u{1F4CE}"," ",t(rt[Q.kind]||"kindKnowledge")]}),(0,e.jsx)("span",{className:`md-chip ${K==="pending"?"md-chip-st-warn":"md-chip-st-bad"}`,children:K==="pending"?Q.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:ja(Q.created)})]}),(0,e.jsx)("h3",{children:Q.title}),Q.revision&&(0,e.jsxs)("div",{className:"me-audit-preview-reason",style:{color:"#a78bfa",marginBottom:6},children:["\u270F\uFE0F ",t("auditRevisionFrom"),"\uFF1A",Q.revision.targetTitle||Q.revision.targetPath]}),(0,e.jsxs)("div",{className:"me-audit-preview-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",qt(Q.submittedBy)]}),!!Q.reason&&(0,e.jsxs)("span",{className:"me-audit-preview-reason",children:["\u2691 ",Q.reason]}),(Array.isArray(Q.tags)?Q.tags:[]).slice(0,5).map(c=>(0,e.jsxs)("span",{children:["#",c]},c))]})]}),(0,e.jsxs)("div",{className:"me-audit-preview-body",children:[$e.loading&&(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("loading")}),$e.error&&(0,e.jsxs)("div",{className:"me-audit-preview-empty",style:{color:"#f87171"},children:["\u26A0 ",t("auditBodyFail"),"\uFF1A",$e.error]}),$e.text!=null?(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:la(en(ha($e.text).body,Q.title))}}):!$e.loading&&(0,e.jsx)("p",{className:"me-audit-preview-summary",children:Q.summary||""})]}),(0,e.jsxs)("div",{className:"me-audit-preview-actions",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!!I,onClick:()=>E("approved",[Q.path]),children:["\u2713 ",K==="rejected"?t("restore"):Q.kind==="core"?t("approveCore"):t("approve")]}),K==="pending"&&Q.kind!=="core"&&!Q.revision&&(0,e.jsxs)("button",{type:"button",className:"mc-btn me-core-btn",disabled:!!I,onClick:()=>E("approved",[Q.path],{kind:"core"}),children:["\u2B50 ",t("approveAndCore")]}),K==="pending"&&Q.kind==="core"&&(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!I,onClick:()=>E("approved",[Q.path],{kind:"knowledge"}),children:t("approveAsNormal")}),K==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!I,onClick:()=>E("rejected",[Q.path]),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!I,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&E("delete",[Q.path])},children:["\u{1F5D1} ",t("restoreDelete")]})]})]}):(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t(M?"auditNoMatch":"noAuditItems")})})]})]})]})]})}var Zo={title:"",date:"",category:"",source:"",url:"",tags:"",pinned:!1,body:""};function Ya(){let t=new Date;return t.getFullYear()+"-"+String(t.getMonth()+1).padStart(2,"0")+"-"+String(t.getDate()).padStart(2,"0")}function Va(t){try{let a=new URL(String(t||""));return a.protocol==="http:"||a.protocol==="https:"?a.href:""}catch{return""}}function er(t,a){let n=String(t||"").slice(0,10);if(!n)return a("newsEarlier");if(n===Ya())return a("newsToday");let i=new Date;i.setDate(i.getDate()-1);let s=i.getFullYear()+"-"+String(i.getMonth()+1).padStart(2,"0")+"-"+String(i.getDate()).padStart(2,"0");return n===s?a("newsYesterday"):n}function Hn({item:t,t:a,active:n,onOpen:i,onEdit:s,onToggleRead:d,onDelete:g}){return(0,e.jsxs)("article",{className:"mc-news-card"+(t.pinned?" pinned":"")+(t.read?"":" unread")+(n?" active":""),onClick:()=>i(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:()=>d(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:()=>g(t),title:a("delete"),children:"\u2715"})]})]})]})}function tr(t,a){let n=Date.now()-Number(t||0);if(!Number.isFinite(n)||n<0)return"";let i=Math.floor(n/6e4);if(i<1)return a("newsJustNow");if(i<60)return i+" "+a("newsMinutesAgo");let s=Math.floor(i/60);if(s<24)return s+" "+a("newsHoursAgo");let d=Math.floor(s/24);return d<7?d+" "+a("newsDaysAgo"):new Date(Number(t)).toISOString().slice(0,10)}var Qt="me.news.lastQuery",pa="me.news.prefs",Xn="me.news.view",ar={model:"\u6A21",product:"\u54C1",research:"\u7814",opensource:"\u6E90",industry:"\u4E1A",policy:"\u7B56",other:"\u8BAF"},nr=new Set(["the","a","an","of","to","for","and","in","on","is","are","with","how","why","new","its","it","as","at","by","from"]);function Za(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 Ot(t,a){try{localStorage.setItem(t,JSON.stringify(a))}catch{}}function $a(t,a=""){let n=Za(t,a);return typeof n=="string"?n:a}function On(){let t=Za(Xn,null);return t&&typeof t=="object"?t:{}}function Ja(){return{types:{},sources:{},terms:{},opens:0,updatedAt:0}}function or(){let t=Za(pa,null);return!t||typeof t!="object"?Ja():{...Ja(),...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||nr.has(n)||a.push(n);return a}function Na(t,a,n){a&&(t[a]=Math.min(60,(Number(t[a])||0)+n))}function rr(t,a,n){let i={...n,types:{...n.types},sources:{...n.sources},terms:{...n.terms}};return t&&(Na(i.types,t.type,a),Na(i.sources,t.sourceId,a),Qn(t.title).slice(0,6).forEach(s=>Na(i.terms,s,1)),i.opens=(Number(n.opens)||0)+1),i.updatedAt=Date.now(),i}function Wn(t,a){let n={...t,terms:{...t.terms}};return Qn(a).forEach(i=>Na(n.terms,i,3)),n.updatedAt=Date.now(),n}function ir(t){let a=0;for(let n of String(t||""))a=(a*31+n.charCodeAt(0))%360;return a}function sr(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 lr=/(帮我|请|麻烦|推送|订阅|关注|跟踪|每天|每日|定时|最新|热门|看看|给我|关于|相关)/;function cr(t){let a=String(t||"").trim();return a?lr.test(a)||a.split(/\s+/).length>=4:!1}function _n(t,a,n){let i=Math.max(0,(Date.now()-Number(t.publishedAt||0))/36e5),s=100-Math.min(60,i*.28);s+=(Number(a.types[t.type])||0)*1.6,s+=(Number(a.sources[t.sourceId])||0)*1.1;let d=(t.title+" "+(t.summary||"")).toLowerCase();for(let[S,f]of Object.entries(a.terms))d.includes(S)&&(s+=Math.min(8,Number(f)||0)*.9);let g=String(n||"").trim().toLowerCase();if(g)for(let S of g.split(/\s+/).filter(Boolean))String(t.title||"").toLowerCase().includes(S)?s+=16:d.includes(S)&&(s+=8);return t.followId&&(s+=10),s}function dr({t,mode:a,version:n}){let[i,s]=(0,r.useState)([]),[d,g]=(0,r.useState)([]),[S,f]=(0,r.useState)(!0),[y,u]=(0,r.useState)(0),[N,v]=(0,r.useState)([]),[M,q]=(0,r.useState)(""),[H,R]=(0,r.useState)(null),[J,F]=(0,r.useState)(()=>$a(Qt)),[I,pe]=(0,r.useState)(()=>$a(Qt).trim()),[Z,U]=(0,r.useState)(""),[K,Y]=(0,r.useState)(()=>{let b=On();return typeof b.lang=="string"?b.lang:"zh"}),[_,ae]=(0,r.useState)(()=>On().sort==="time"?"time":"rec"),[ue,fe]=(0,r.useState)(or),[ge,Ae]=(0,r.useState)(!1),[E,je]=(0,r.useState)([]),[ze,Se]=(0,r.useState)([]),[oe,Q]=(0,r.useState)(null),[$e,qe]=(0,r.useState)(!1),[te,D]=(0,r.useState)(""),L=(b,k=!0)=>{R({msg:b,ok:k}),setTimeout(()=>R(null),3200)},c=(0,r.useRef)(!1),O=(0,r.useRef)($a(Qt).trim());(0,r.useEffect)(()=>{let b=setTimeout(()=>{let k=J.trim();pe(k),c.current&&(Ot(Qt,k),!(!k||k===O.current)&&(O.current=k,fe(Pe=>{let He=Wn(Pe,k);return Ot(pa,He),He})))},260);return()=>clearTimeout(b)},[J]),(0,r.useEffect)(()=>{Ot(Xn,{lang:K,sort:_})},[K,_]),(0,r.useEffect)(()=>{Ae(!0);let b=setTimeout(()=>Ae(!1),170);return()=>clearTimeout(b)},[Z,K,I,_]);let se=(0,r.useCallback)(async()=>{f(!0),q("");try{let b=new URLSearchParams({period:a==="month"?"month":"today",lang:"all"});b.set("follows","1");let k=await fetch(G+"/news/feed?"+b.toString()).then(Pe=>Pe.json());if(!k||!k.ok)throw new Error(k&&k.error||t("newsFeedError"));s(k.items||[]),Array.isArray(k.follows)&&je(k.follows),g(k.types||[]),u(Number(k.fetchedAt)||0),v(k.errors||[])}catch(b){let k=b&&b.message||t("newsFeedError");q(k),L(k,!1)}finally{f(!1)}},[a,t]);(0,r.useEffect)(()=>{se()},[n,se]);let Ie=(0,r.useCallback)(async()=>{try{let b=await fetch(G+"/news/follows").then(k=>k.json());b&&b.ok&&(je(b.follows||[]),Se(b.domains||[]))}catch{}},[]);(0,r.useEffect)(()=>{Ie()},[n,Ie]);let re=async()=>{f(!0);try{let b=await fetch(G+"/news/feed/refresh",{method:"POST"}).then(k=>k.json());if(!b||!b.ok)throw new Error(b&&b.error||t("newsFeedError"));await se(),L(t("newsUpdatedAt")+" "+new Date().toLocaleTimeString())}catch(b){let k=b&&b.message||t("newsFeedError");q(k),L(k,!1),f(!1)}},X=b=>(d.find(k=>k.id===b)||{}).label||t("all"),m=(i||[]).filter(b=>!K||b.lang===K||b.followId),B={};for(let b of m)B[b.type]=(B[b.type]||0)+1;let P=Z?m.filter(b=>b.type===Z):m,me=cr(I);if(I&&!me){let b=I.toLowerCase().split(/\s+/).filter(Boolean);P=P.filter(k=>{let Pe=[k.title,k.summary,k.source,X(k.type)].join(" ").toLowerCase();return b.every(He=>Pe.includes(He))})}te&&(P=P.filter(b=>b.followId===te));let ye=b=>(Number(b.points)||0)+(Number(b.comments)||0)*2,be=a==="month",ce=be?P.filter(b=>(b.points||0)>0):[],A=be&&ce.length>0,le=new Map;A&&ce.slice().sort((b,k)=>(k.points||0)-(b.points||0)||(k.comments||0)-(b.comments||0)).forEach((b,k)=>le.set(b.id||b.url||b.title,k+1)),P=P.slice().sort((b,k)=>_==="time"?(k.publishedAt||0)-(b.publishedAt||0):be&&A?(k.points||0)-(b.points||0)||(k.comments||0)-(b.comments||0)||(k.publishedAt||0)-(b.publishedAt||0):_n(k,ue,I)-_n(b,ue,I));let ie=Object.keys(ue.types||{}).sort((b,k)=>(ue.types[k]||0)-(ue.types[b]||0)).slice(0,3),ke=Object.keys(ue.terms||{}).sort((b,k)=>(ue.terms[k]||0)-(ue.terms[b]||0)).slice(0,4),nt=!!I||ie.length>0||ke.length>0,Fe=b=>{c.current=!0;let k=String(b??"").trim();pe(k),Ot(Qt,k),!(!k||k===O.current)&&(O.current=k,fe(Pe=>{let He=Wn(Pe,k);return Ot(pa,He),He}))},yt=()=>{c.current=!1,O.current="",U(""),Y(""),F(""),pe(""),Ot(Qt,"")},lt=b=>fe(k=>{let Pe=rr(b,4,k);return Ot(pa,Pe),Pe}),Nt=()=>{let b=Ja();Ot(pa,b),Ot(Qt,""),O.current="",c.current=!1,fe(b),F(""),pe("")},ct=async()=>{let b=J.trim();if(!b){L(t("newsFollowNoQuery"),!1);return}qe(!0);try{let k=await fetch(G+"/news/follows/preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:b})}).then(Pe=>Pe.json());if(!k||!k.ok)throw new Error(k&&k.error||t("newsFollowFail"));Se(k.domainsEnum||ze),Q({text:b,query:k.parsed.query,label:k.parsed.label,domains:k.parsed.domains,sourceIds:k.parsed.sourceIds||[],notes:k.parsed.notes||[]})}catch(k){L(String(k&&k.message||k),!1)}finally{qe(!1)}},Ue=(b,k)=>Q(Pe=>{if(!Pe)return Pe;let He=new Set(Pe.domains);return k?He.add(b):He.delete(b),{...Pe,domains:[...He]}}),Rt=async()=>{if(oe){qe(!0);try{let b=await fetch(G+"/news/follows",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:oe.query,domains:oe.domains,label:oe.label,sourceIds:oe.sourceIds||[]})}).then(Pe=>Pe.json());if(!b||!b.ok)throw new Error(b&&b.error||t("newsFollowFail"));let k=oe.label;Q(null),L((b.duplicate?t("newsFollowExists"):t("newsFollowAdded"))+"\uFF1A"+k),await Ie(),await se()}catch(b){L(String(b&&b.message||b),!1)}finally{qe(!1)}}},Ce=async b=>{try{let k=await fetch(G+"/news/follows?id="+encodeURIComponent(b),{method:"DELETE"}).then(Pe=>Pe.json());if(!k||!k.ok)throw new Error(k&&k.error||t("newsFollowFail"));te===b&&D(""),L(t("newsFollowRemoved")),await Ie(),await se()}catch(k){L(String(k&&k.message||k),!1)}},x=(b,k)=>{let Pe=Va(b.url),He=X(b.type),o=Va(b.image),ht=A&&le.get(b.id||b.url||b.title)||0,xt=A&&ht>0&&ht<=3;return(0,e.jsxs)("a",{className:"mc-news-tile",style:{"--i":Math.min(k,14)},href:Pe||void 0,target:Pe?"_blank":void 0,rel:"noopener noreferrer",onClick:()=>lt(b),children:[(0,e.jsxs)("span",{className:"mc-news-tile-cover",children:[o?(0,e.jsx)("img",{className:"mc-news-tile-img",src:o,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:vt=>{let zt=vt.currentTarget;zt.style.display="none",zt.nextElementSibling&&(zt.nextElementSibling.style.display="grid")}}):null,(0,e.jsxs)("span",{className:"mc-news-tile-gen",style:{"--hue":ir(b.title),display:o?"none":"grid"},children:[(0,e.jsx)("b",{children:ar[b.type]||"\u8BAF"}),(0,e.jsx)("small",{children:He}),(0,e.jsxs)("em",{children:[(0,e.jsx)("i",{children:sr(b.source)}),b.source]})]}),(0,e.jsx)("span",{className:"mc-news-tile-badge"+(xt?" hot":""),children:ht?"#"+ht:He}),(0,e.jsx)("span",{className:"mc-news-tile-time",children:tr(b.publishedAt,t)})]}),(0,e.jsxs)("span",{className:"mc-news-tile-body",children:[(0,e.jsx)("span",{className:"mc-news-tile-title",children:b.title}),b.summary?(0,e.jsx)("span",{className:"mc-news-tile-summary",children:b.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:b.source}),b.followLabel?(0,e.jsxs)("span",{className:"mc-news-tile-follow",children:["\u{1F514} ",b.followLabel]}):null,ht?(0,e.jsxs)("span",{children:["\xB7 \u{1F525} ",t("newsHeat")," ",ye(b)]}):null,(0,e.jsxs)("span",{className:"mc-news-tile-open",children:[t("newsOriginal")," \u2197"]})]})]})]},b.id||b.url||b.title)},p=P.filter(b=>b.followId),de=p.slice(0,4),Ee=te?P:de.length?P.filter(b=>!b.followId):P;return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(Ta,{toast:H}),(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:J,onChange:b=>{c.current=!0,F(b.target.value)},onKeyDown:b=>{b.key==="Enter"&&Fe(J)},placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),J?(0,e.jsx)("button",{type:"button",className:"mc-news-hero-clear",title:t("cancel"),onClick:()=>{F(""),Fe("")},children:"\u2715"}):null,(0,e.jsx)("button",{type:"button",className:"mc-news-hero-go",onClick:()=>Fe(J),children:t("newsSearchGo")}),J.trim()?(0,e.jsxs)("button",{type:"button",className:"mc-news-hero-follow",disabled:$e,onClick:ct,title:t("newsFollowPreview"),children:["\uFF0B ",t("newsFollow")]}):null]}),(0,e.jsx)("div",{className:"mc-news-hero-hint",children:t(me?"newsIntentHint":"newsHeroHint")})]}),oe?(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:oe.label}),oe.query?(0,e.jsxs)("span",{className:"draft-q",children:["\xB7 \u300C",oe.query,"\u300D"]}):null,(0,e.jsxs)("div",{className:"draft-doms",children:[(0,e.jsx)("span",{className:"draft-lbl",children:t("newsFollowDomains")}),ze.map(b=>(0,e.jsxs)("label",{className:"draft-opt",title:b.hint||"",children:[(0,e.jsx)("input",{type:"checkbox",checked:oe.domains.includes(b.id),onChange:k=>Ue(b.id,k.target.checked)}),(0,e.jsx)("span",{children:b.label})]},b.id))]}),oe.notes.map((b,k)=>(0,e.jsxs)("div",{className:"draft-note",children:["\xB7 ",b]},k))]}),(0,e.jsxs)("div",{className:"draft-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Q(null),children:t("cancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:$e||!oe.domains.length,onClick:Rt,children:t("newsFollowConfirm")})]})]}):null,E.length>0?(0,e.jsx)("div",{className:"mc-news-follows",children:E.map(b=>(0,e.jsxs)("span",{className:"mc-news-follow-chip"+(te===b.id?" on":""),children:[(0,e.jsxs)("button",{type:"button",className:"chip-main",onClick:()=>D(k=>k===b.id?"":b.id),title:(b.domains||[]).join(" / "),children:["\u{1F514} ",b.label,(0,e.jsx)("i",{children:b.count||0})]}),(0,e.jsx)("button",{type:"button",className:"chip-x",title:t("delete"),"aria-label":t("delete"),onClick:()=>Ce(b.id),children:"\u2715"})]},b.id))}):null,nt?(0,e.jsxs)("div",{className:"mc-news-pref",children:[(0,e.jsxs)("span",{children:["\u{1F3AF} ",t("newsPersonalized")]}),I?(0,e.jsxs)("span",{children:["\xB7 ",t("newsLastQuery")," ",(0,e.jsx)("b",{children:I})]}):null,ke.length>0?(0,e.jsxs)("span",{children:["\xB7 ",ke.join(" / ")]}):null,ie.length>0?(0,e.jsxs)("span",{children:["\xB7 ",ie.map(X).join(" / ")]}):null,(0,e.jsx)("span",{className:"mc-news-pref-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Nt,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"+(Z===""?" on":""),onClick:()=>U(""),children:[t("all"),(0,e.jsx)("span",{className:"mc-news-pill-count",children:m.length})]}),d.map(b=>B[b.id]?(0,e.jsxs)("button",{type:"button",className:"mc-news-pill"+(Z===b.id?" on":""),onClick:()=>U(Z===b.id?"":b.id),children:[b.label,(0,e.jsx)("span",{className:"mc-news-pill-count",children:B[b.id]})]},b.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"+(K==="zh"?" active":""),onClick:()=>Y("zh"),children:t("newsLangZh")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(K==="en"?" active":""),onClick:()=>Y("en"),children:t("newsLangEn")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(K===""?" active":""),onClick:()=>Y(""),children:t("newsLangAll")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(_==="rec"?" active":""),onClick:()=>ae("rec"),children:t("newsSortRec")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(_==="time"?" active":""),onClick:()=>ae("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:[y?t("newsUpdatedAt")+" "+new Date(y).toLocaleTimeString():"",S?"":" \xB7 "+P.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(A?"newsEnRanking":"newsZhArchive")}),M&&!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 ",M]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:re,children:t("newsRetry")})]}),N.length>0&&(0,e.jsxs)("div",{className:"mc-news-feed-warn",children:["\u26A0 ",t("newsPartialFail"),"\uFF1A",N.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)(ua,{}),(0,e.jsx)("span",{children:t("newsLoading")}),(0,e.jsx)("small",{children:t("newsLoadingHint")})]}):i.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")})]}):P.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:yt,children:t("newsClearFilters")})]}):(0,e.jsxs)(e.Fragment,{children:[!te&&de.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:p.length})]}),(0,e.jsx)("div",{className:"mc-news-grid"+(ge?" is-swapping":""),children:de.map((b,k)=>x(b,k))})]}):null,(0,e.jsx)("div",{className:"mc-news-grid"+(ge?" is-swapping":""),children:Ee.map((b,k)=>x(b,k))})]})]})}function pr({t,version:a,onUnreadChange:n}){let[i,s]=(0,r.useState)("daily"),d=i==="month"?"newsMonthlySub":i==="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(d)})]})}),(0,e.jsxs)("div",{className:"mc-news-modes",children:[(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(i==="daily"?" active":""),onClick:()=>s("daily"),children:t("newsDaily")}),(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(i==="month"?" active":""),onClick:()=>s("month"),children:t("newsMonthly")}),(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(i==="mine"?" active":""),onClick:()=>s("mine"),children:t("newsMine")})]}),i==="mine"?(0,e.jsx)(mr,{t,version:a,onUnreadChange:n}):(0,e.jsx)(dr,{t,mode:i,version:a})]})}function mr({t,version:a,onUnreadChange:n}){let[i,s]=(0,r.useState)([]),[d,g]=(0,r.useState)([]),[S,f]=(0,r.useState)({all:0,unread:0}),[y,u]=(0,r.useState)(""),[N,v]=(0,r.useState)(""),[M,q]=(0,r.useState)(""),[H,R]=(0,r.useState)(!1),[J,F]=(0,r.useState)(""),[I,pe]=(0,r.useState)(null),[Z,U]=(0,r.useState)(null),[K,Y]=(0,r.useState)(!1),[_,ae]=(0,r.useState)(""),[ue,fe]=(0,r.useState)(null),ge=(D,L=!0)=>{fe({msg:D,ok:L}),setTimeout(()=>fe(null),2600)};(0,r.useEffect)(()=>{let D=setTimeout(()=>v(y.trim()),220);return()=>clearTimeout(D)},[y]);let Ae=(0,r.useCallback)(async()=>{let D=new URLSearchParams;N&&D.set("q",N),M&&D.set("category",M),H&&D.set("unread","1");try{let L=await fetch(G+"/news?"+D.toString()).then(c=>c.json());if(!L||!L.ok)throw new Error(L&&L.error||"load failed");s(L.items||[]),g(L.categories||[]),f(L.counts||{all:0,unread:0}),n&&n(Number((L.counts||{}).unread)||0)}catch{ge(t("newsSaveFail"),!1)}},[N,M,H,n,t]);(0,r.useEffect)(()=>{Ae()},[a,Ae]);let E=async D=>{F(D.id);try{let L=await fetch(G+"/news/item?id="+encodeURIComponent(D.id)).then(c=>c.json());if(!L||!L.ok)throw new Error(L&&L.error||"load failed");pe(L.item),L.item.read||await je(D.id,!0)}catch{ge(t("newsSaveFail"),!1)}},je=async(D,L)=>{try{let c=await fetch(G+"/news/read",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:D,read:L})}).then(O=>O.json());if(!c||!c.ok)throw new Error(c&&c.error||"read failed");pe(O=>O&&O.id===D?{...O,read:!!L}:O),await Ae()}catch{ge(t("newsSaveFail"),!1)}},ze=async D=>{if(Y(!1),D){let L=D;if(!L.body)try{let c=await fetch(G+"/news/item?id="+encodeURIComponent(L.id)).then(O=>O.json());c&&c.ok&&(L=c.item)}catch{}U({id:L.id,title:L.title||"",date:L.date||Ya(),category:L.category||"",source:L.source||"",url:L.url||"",tags:(L.tags||[]).join(", "),pinned:!!L.pinned,body:L.body||"",created:L.created||""})}else U({...Zo,date:Ya()})},Se=async()=>{if(Z){if(!String(Z.title||"").trim()||!String(Z.body||"").trim()){ge(t("newsSaveFail"),!1);return}ae("save");try{let D={id:Z.id||void 0,title:Z.title,date:Z.date,category:Z.category,source:Z.source,url:Z.url,tags:String(Z.tags||"").split(",").map(c=>c.trim()).filter(Boolean),pinned:!!Z.pinned,body:Z.body,created:Z.created},L=await fetch(G+"/news/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)}).then(c=>c.json());if(!L||!L.ok)throw new Error(L&&L.error||"save failed");U(null),F(L.item.id),pe(L.item),await Ae(),ge(t("newsSaved"))}catch(D){ge(D&&D.message||t("newsSaveFail"),!1)}finally{ae("")}}},oe=async D=>{if(window.confirm(t("newsDeleteConfirm"))){ae("delete");try{let L=await fetch(G+"/news/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:D.id})}).then(c=>c.json());if(!L||!L.ok)throw new Error(L&&L.error||"delete failed");J===D.id&&(F(""),pe(null)),await Ae(),ge(t("newsDeleted"))}catch{ge(t("newsSaveFail"),!1)}finally{ae("")}}},Q=i.filter(D=>D.pinned),$e=i.filter(D=>!D.pinned),qe=I?Va(I.url):"",te="";return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(Ta,{toast:ue}),(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:()=>ze(null),children:["\uFF0B ",t("newsNew")]}),(0,e.jsx)("input",{className:"mc-news-search",type:"text",value:y,onChange:D=>u(D.target.value),placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(M===""?" active":""),onClick:()=>q(""),children:t("all")}),d.map(D=>(0,e.jsx)("button",{type:"button",className:"mc-chip"+(M===D?" active":""),onClick:()=>q(L=>L===D?"":D),children:D},D)),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(H?" active":""),onClick:()=>R(D=>!D),children:t("newsUnreadOnly")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Ae(),children:t("refresh")})]}),(0,e.jsxs)("div",{className:"mc-news-main",children:[(0,e.jsx)("div",{className:"mc-news-list",children:i.length===0?(0,e.jsxs)("div",{className:"mc-card mc-news-empty",children:[t(y||M||H?"newsNoMatch":"newsEmpty"),!y&&!M&&!H&&(0,e.jsx)("div",{style:{marginTop:10},children:(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>ze(null),children:["\uFF0B ",t("newsNew")]})})]}):(0,e.jsxs)(e.Fragment,{children:[Q.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")]}),Q.map(D=>(0,e.jsx)(Hn,{item:D,t,active:J===D.id,onOpen:E,onEdit:L=>ze(L),onToggleRead:L=>je(L.id,!L.read),onDelete:oe},D.id))]}),(0,e.jsx)("div",{className:"mc-news-group",children:$e.map(D=>{let L=er(D.date,t),c=L!==te;return te=L,(0,e.jsxs)(r.default.Fragment,{children:[c&&(0,e.jsx)("div",{className:"mc-news-group-label",children:L}),(0,e.jsx)(Hn,{item:D,t,active:J===D.id,onOpen:E,onEdit:O=>ze(O),onToggleRead:O=>je(O.id,!O.read),onDelete:oe})]},D.id)})})]})}),I&&(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:I.category||t("newsCategoryField")}),I.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:()=>{pe(null),F("")},title:t("close"),children:"\u2715"})]}),(0,e.jsx)("h2",{children:I.title}),(0,e.jsxs)("div",{className:"mc-news-reader-meta",children:[(0,e.jsx)("span",{children:I.date||""}),I.source&&(0,e.jsxs)("span",{children:["\xB7 ",I.source]}),(0,e.jsxs)("span",{children:["\xB7 ",I.read?t("newsRead"):t("newsUnread")]}),(I.tags||[]).map(D=>(0,e.jsxs)("span",{children:["#",D]},D))]}),qe&&(0,e.jsx)("div",{style:{marginTop:8},children:(0,e.jsxs)("a",{className:"mc-btn",style:{textDecoration:"none"},href:qe,target:"_blank",rel:"noopener noreferrer",children:["\u2197 ",t("newsOpenLink")]})}),(0,e.jsx)("div",{className:"md-doc",style:{marginTop:12},dangerouslySetInnerHTML:{__html:la(en(I.body||"",I.title))}}),(0,e.jsxs)("div",{className:"mc-news-reader-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>ze(I),children:t("newsEdit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>je(I.id,!I.read),children:I.read?t("newsMarkUnread"):t("newsMarkRead")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:_==="delete",onClick:()=>oe(I),children:t("delete")})]})]})]}),Z&&(0,e.jsx)("div",{className:"me-overlay",onClick:()=>U(null),children:(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:860,width:"94vw",maxHeight:"90vh"},onClick:D=>D.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:Z.id?t("newsEdit"):t("newsNew")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>U(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:Z.title,onChange:D=>U(L=>({...L,title:D.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:Z.date||"",onChange:D=>U(L=>({...L,date:D.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:Z.category||"",onChange:D=>U(L=>({...L,category:D.target.value}))})]}),(0,e.jsx)("datalist",{id:"me-news-categories",children:d.map(D=>(0,e.jsx)("option",{value:D},D))}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsSourceField")}),(0,e.jsx)("input",{className:"mc-news-input",value:Z.source||"",onChange:D=>U(L=>({...L,source:D.target.value}))})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsUrlField")}),(0,e.jsx)("input",{className:"mc-news-input",value:Z.url||"",onChange:D=>U(L=>({...L,url:D.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:Z.tags||"",onChange:D=>U(L=>({...L,tags:D.target.value}))})]}),(0,e.jsxs)("label",{style:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:18},children:[(0,e.jsx)("input",{type:"checkbox",checked:!!Z.pinned,onChange:D=>U(L=>({...L,pinned:D.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:Z.body||"",onChange:D=>U(L=>({...L,body:D.target.value})),placeholder:t("newsBodyPlaceholder")})]}),K&&(0,e.jsx)("div",{className:"full mc-news-preview",children:(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:la(Z.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:()=>Y(D=>!D),children:t(K?"newsEditBody":"newsPreview")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>U(null),children:t("cancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:_==="save",onClick:Se,children:t(_==="save"?"newsSaving":"newsSave")})]})]})]})})]})}function ur({t,onReload:a,version:n}){let[i,s]=(0,r.useState)([]),[d,g]=(0,r.useState)(""),[S,f]=(0,r.useState)(null),y=(v,M=!0)=>{f({msg:v,ok:M}),setTimeout(()=>f(null),3200)},u=(0,r.useCallback)(async()=>{try{let v=await fetch(`${G}/recycle/list`).then(M=>M.json());v.ok&&s(v.items||[])}catch{}},[]);(0,r.useEffect)(()=>{u()},[n,u]);let N=async(v,M)=>{let q=(i.find(H=>H.path===M)||{}).title||M;g(v+M);try{let R=await fetch(G+(v==="restore"?"/recycle/restore":"/recycle/purge")+"?path="+encodeURIComponent(M)),J=await R.json().catch(()=>null);await u(),a&&a(),R.ok&&(!J||J.ok!==!1)?y(t(v==="restore"?"toastRestored":"toastPurged")+"\uFF1A"+q):y(t("toastFailed")+"\uFF1A"+(J&&J.error||"HTTP "+R.status),!1)}catch(H){y(t("toastFailed")+"\uFF1A"+String(H&&H.message||H),!1)}finally{g("")}};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:bt}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(Ta,{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:i.length}),(0,e.jsxs)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!d||i.length===0,title:i.length?t("recyclePurgeAllConfirm").split("{n}").join(String(i.length)):t("emptyRecycle"),onClick:async()=>{if(i.length&&window.confirm(t("recyclePurgeAllConfirm").split("{n}").join(String(i.length)))){g("purgeAll");try{let v=await fetch(G+"/recycle/purge-all",{method:"POST"}),M=await v.json().catch(()=>null);await u(),a&&a(),v.ok&&(!M||M.ok!==!1)?y(t("toastPurgeAll").split("{n}").join(String(M&&M.purged!=null?M.purged:i.length)),!0):y(t("toastFailed")+"\uFF1A"+(M&&M.error||"HTTP "+v.status),!1)}catch(v){y(t("toastFailed")+"\uFF1A"+String(v&&v.message||v),!1)}finally{g("")}}},children:["\u{1F5D1} ",t("recyclePurgeAll"),i.length?"\uFF08"+i.length+"\uFF09":""]})]}),(0,e.jsx)("div",{className:"mc-v5-recycle-hint",children:t("recycleHint")}),i.length?(0,e.jsx)("div",{className:"mc-card mc-v5-recycle",children:i.map(v=>{let M=ft[v.kind]||"#6B7280";return(0,e.jsxs)("div",{className:"mc-v5-recycle-row",children:[(0,e.jsx)("span",{className:"mc-v5-recycle-tile",style:{color:M,background:M+"18",borderColor:M+"38"},children:Gt[v.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"mc-v5-recycle-copy",children:[(0,e.jsx)("b",{children:v.title}),(0,e.jsxs)("span",{children:[t(rt[v.kind]||"kindKnowledge")," \xB7 ",v.status==="rejected"?t("rejected"):t("bucketDeleted")," \xB7 ",va(v.deletedAt||v.updated)||"-"]})]}),(0,e.jsxs)("div",{className:"mc-v5-recycle-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!d,title:v.status==="rejected"?t("restoreToQueue"):t("restore"),onClick:()=>N("restore",v.path),children:v.status==="rejected"?t("restoreToQueue"):t("restore")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!d,onClick:()=>{window.confirm(t("purgeConfirm"))&&N("purge",v.path)},children:t("purge")})]})]},v.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 en=(t,a)=>{let n=String(t||"").split(/\r?\n/),i=d=>String(d||"").replace(/[#*_`]/g,"").replace(/[\s::\-–—·]/g,"").trim(),s=i(a);for(;;){let d=0;for(;d<n.length&&!n[d].trim();)d++;let g=/^#{1,2}\s+(.+?)\s*$/.exec(n[d]||"");if(!g||i(g[1])!==s)break;for(n.splice(d,1);d<n.length&&!n[d].trim();)n.splice(d,1)}return n.join(`
|
|
1152
|
-
`)},gr=t=>{let a=[],n=!1,i=0;for(let s of String(t||"").split(/\r?\n/)){let d=s.trim();if(/^```/.test(d)){n=!n;continue}if(n)continue;let g=/^(#{1,6})\s+(.+)$/.exec(d);if(!g)continue;i++;let S=g[1].length;S<=3&&a.push({id:"md-h-"+i,level:S,text:g[2].replace(/[#*_`>\[\]()]/g,"").replace(/\s+/g," ").trim()})}return a},tn=t=>{let a=String(t.summary||"").replace(/[#>*_`]/g," ").replace(/\s+/g," ").trim();return a.length>150?a.slice(0,148)+"\u2026":a},Zn=t=>{let a=String(t.summary||"").toLowerCase();return/决策|结论|决定|decision/.test(a)?"insightDecision":/根因|原因|root cause/.test(a)?"insightRoot":/教训|避免|lesson/.test(a)?"insightLesson":"insightSummary"},eo=({n:t=0,color:a="#ff9a72",size:n=30})=>{let i=Math.max(2,Math.min(6,Number(t)||2)),s=Array.from({length:i},(d,g)=>{let S=-Math.PI/2+g*Math.PI*2/i,f=g%2?13:16;return[20+Math.cos(S)*f,20+Math.sin(S)*f]});return(0,e.jsxs)("svg",{className:"mc-v5-mini",width:n,height:n,viewBox:"0 0 40 40","aria-hidden":"true",children:[s.map(([d,g],S)=>(0,e.jsx)("line",{x1:"20",y1:"20",x2:d,y2:g,stroke:a,strokeOpacity:".35"},"l"+S)),s.map(([d,g],S)=>(0,e.jsx)("circle",{cx:d,cy:g,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})]})},fr=({card:t,t:a,onOpen:n,query:i,onDelete:s,onTagClick:d,pinned:g,onPin:S,onCore:f,links:y})=>{let u=ft[t.kind]||ft.other,N=Number(y??t.links??t.weight??0),v=Ua(t);return(0,e.jsxs)("article",{className:`mc-cardrow mc-card mc-v5-card${g?" 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:u,background:u+"18",borderColor:u+"38"},children:Gt[t.kind]||"\u{1F4CE}"}),(0,e.jsx)("span",{className:"mc-v5-card-kind-name",children:t.kind==="core"?"\u2B50 "+a("kindCore"):a(rt[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:Wt(t.updated)}),f&&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:M=>{M.stopPropagation(),f(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${g?" on":""}`,title:a(g?"unpinCard":"pinCard"),"aria-label":a(g?"unpinCard":"pinCard"),onClick:M=>{M.stopPropagation(),S(t.path)},children:"\u{1F4CC}"})]}),(0,e.jsx)("h4",{className:"mc-v5-card-title",children:i?Ga(t.title,i):t.title}),(0,e.jsxs)("div",{className:"mc-v5-card-insight",children:[(0,e.jsx)("span",{className:"mc-v5-insight-k",children:a(Zn(t))}),(0,e.jsx)("span",{className:"mc-v5-card-lead",children:i?Ga(t.summary||"",i):tn(t)})]}),i&&(()=>{let M=fn(t.body||"",i);return M?(0,e.jsx)("p",{className:"mc-snippet",children:Ga(M,i)}):null})(),Ua(t).length>0&&(0,e.jsxs)("div",{className:"mc-tags mc-v5-card-tags",children:[Ua(t).slice(0,2).map(M=>(0,e.jsxs)("button",{type:"button",className:"mc-tag mc-tag-click",title:M,onClick:q=>{q.stopPropagation(),d&&d(M)},children:["#",M]},M)),v.length>2&&(0,e.jsxs)("span",{className:"mc-tag more",children:["+",v.length-2]})]}),(0,e.jsxs)("footer",{className:"mc-v5-card-foot",children:[N>0&&(0,e.jsxs)("span",{className:"mc-v5-conn",children:[(0,e.jsx)(eo,{n:N,color:u})," ",(0,e.jsx)("b",{children:N})," ",a("links")]}),(0,e.jsxs)("span",{className:"mc-v5-author",children:["\u{1F916} ",qt(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:M=>{M.stopPropagation(),window.confirm(a("deleteConfirm"))&&s&&s(t.path)},children:"\u{1F5D1}"})]})]})};function br({t,tab:a,onReload:n,version:i}){let[s,d]=(0,r.useState)(null),[g,S]=(0,r.useState)(""),[f,y]=(0,r.useState)(null),[u,N]=(0,r.useState)(null),[v,M]=(0,r.useState)(null),[q,H]=(0,r.useState)(null),[R,J]=(0,r.useState)(null),[F,I]=(0,r.useState)(null),pe=(0,r.useCallback)(async()=>{_("align");try{let m=await fetch(G+"/align").then(B=>B.json());m&&m.findings?I(m):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{_("")}},[t]),Z=async()=>{if(window.confirm(t("alignFixConfirm"))){_("alignfix");try{let m=await fetch(G+"/setup-run",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(B=>B.json());m&&m.ok?(notify(t("alignFixed")),await pe()):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{_("")}}},[U,K]=(0,r.useState)([]),[Y,_]=(0,r.useState)(""),[ae,ue]=(0,r.useState)(!1),fe=(0,r.useCallback)(async()=>{if(!(!f||!f.merge||!f.merge.length)&&window.confirm(t("mergeAllConfirm"))){_("merge");try{let m={},B=ce=>m[ce]===void 0?ce:m[ce]=B(m[ce]),P=(ce,A)=>{m[B(ce)]=B(A)},me=new Set;for(let ce of f.merge)me.add(ce.a.path),me.add(ce.b.path),P(ce.a.path,ce.b.path);let ye={};for(let ce of me){let A=B(ce);(ye[A]=ye[A]||[]).push(ce)}let be=0;for(let ce of Object.values(ye)){if(ce.length<2)continue;(await fetch(`${G}/merge?paths=${encodeURIComponent(ce.join(","))}`).then(le=>le.json())).ok&&be++}await ge(),n&&n()}catch{}_("")}},[f,ge,n,t]);async function ge(){try{let m=await Promise.all([fetch(`${G}/stats`),fetch(`${G}/budget`),fetch(`${G}/capture-log`),fetch(`${G}/cards?status=all&limit=30&agent=${ma}`),fetch(`${G}/overview`),fetch(`${G}/ledger?days=7`)]),[B,P,me,ye,be,ce]=await Promise.all(m.map(A=>A.json()));B&&B.ok&&d(B),P&&P.ok&&N(P),me&&me.ok&&M(me),ye&&ye.ok&&K(ye.cards||[]),be&&be.ok&&H({db:be.db,backups:be.backups,total:be.total,version:be.version,degraded:be.degraded===!0}),J(ce&&ce.ok?ce:{ok:!1,error:ce&&ce.error||""}),S(!B||!B.ok?t("adminLoadFail"):"")}catch{S(t("adminLoadFail"))}}let Ae=(0,r.useCallback)(async()=>{_("scan");try{let m=await fetch(`${G}/optimize`).then(B=>B.json());m.ok&&y(m)}catch{S(t("adminLoadFail"))}finally{_("")}},[t]),[E,je]=(0,r.useState)(null),ze=(0,r.useCallback)(async()=>{_("refine");try{let m=await fetch(`${G}/refine-scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:8})}).then(B=>B.json());m&&m.ok?je(m):notify(m&&m.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{_("")}},[t]),Se=async(m,B)=>{if(!(B==="merge"&&!window.confirm(t("mergeConfirm")))){_("refineapply");try{let P=await fetch(`${G}/refine-apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({a:m.a.path,b:m.b.path,action:B,relation:m.relation})}).then(me=>me.json());P&&P.ok?(notify(t("refineApplied")),je(me=>me&&{...me,findings:(me.findings||[]).filter(ye=>!(ye.a.path===m.a.path&&ye.b.path===m.b.path))}),await ge(),n&&n()):notify(P&&P.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{_("")}}},[oe,Q]=(0,r.useState)(null),$e=(0,r.useCallback)(async()=>{_("junk");try{let m=await fetch(`${G}/refine-junk`).then(B=>B.json());m&&m.ok?Q(m.items||[]):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{_("")}},[t]),qe=async m=>{if(m.length&&window.confirm(t("junkRecycleAllConfirm"))){_("junkpurge");try{let B=await fetch(`${G}/refine-junk-purge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:m})}).then(P=>P.json());B&&B.removed?(notify(t("junkDone")+"\uFF1A"+B.removed.length+(B.failed?.length?"\uFF08\u5931\u8D25 "+B.failed.length+"\uFF09":"")),Q(P=>P&&P.filter(me=>!B.removed.includes(me.path))),await ge(),n&&n()):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{_("")}}},[te,D]=(0,r.useState)(null),L=(0,r.useCallback)(async()=>{_("goals");try{let m=await fetch(G+"/refine-goals",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:30})}).then(B=>B.json());m&&m.ok?D(m):notify(m&&m.error||t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{_("")}},[t]),c=async m=>{_("goalskeep");try{let B=await fetch(G+"/refine-goals-keep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:m.members.map(P=>P.path)})}).then(P=>P.json());B&&B.ok?(notify(t("goalDone")),D(P=>P&&{...P,clusters:(P.clusters||[]).filter(me=>me.goal!==m.goal)})):notify(t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{_("")}},O=async m=>{if(window.confirm(t("mergeConfirm"))){_("goalsmerge");try{let B=await fetch(G+"/merge?paths="+encodeURIComponent(m.members.map(P=>P.path).join(","))).then(P=>P.json());B&&B.ok?(notify(t("goalMerged")),D(P=>P&&{...P,clusters:(P.clusters||[]).filter(me=>me.goal!==m.goal)}),await ge(),n&&n()):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{_("")}}};(0,r.useEffect)(()=>{ge()},[i]);let se=async(m,B)=>{if(window.confirm(t("mergeConfirm")))try{(await fetch(`${G}/merge?paths=${encodeURIComponent(m+","+B)}`).then(me=>me.json())).ok&&(await ge(),n&&n())}catch{}},Ie=async m=>{if(window.confirm(t("deleteConfirm")))try{(await fetch(`${G}/delete?path=${encodeURIComponent(m)}`).then(P=>P.json())).ok&&(await ge(),n&&n())}catch{}},re=Yn,X=({title:m,kind:B,updated:P,path:me})=>(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:St.colors[B]||"#666"}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:m}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:Wt(P)}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>Ie(me),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:bt}),(0,e.jsxs)("div",{style:{overflow:"auto"},children:[g&&(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 ",g]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:ge,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:q?`${q.total||0} ${t("cardsUnit")}`:""}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ge(),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:q?q.total||0:"\u2014"}),(0,e.jsx)("span",{children:t("dbTitle")}),(0,e.jsx)("small",{children:q?.db?.journalMode||q?.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:q?.backups?.count??"\u2014"}),(0,e.jsx)("span",{children:t("backupTitle")}),(0,e.jsx)("small",{children:q?.backups?.newestAt?`${Math.max(0,Math.floor((Date.now()-Number(q.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:v?.available?v.health?.ok?"\u6B63\u5E38":"\u5F02\u5E38":"\u2014"}),(0,e.jsx)("span",{children:t("captureTitle")}),(0,e.jsx)("small",{children:v?.health?.lastAt?Wt(new Date(v.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:q?.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:()=>ge(),children:["\u21BB ",t("refresh")]})]}),q?(()=>{let m=q.db||{},B=m.writable!==!1&&!m.corrupt,P=q.backups||{count:0,newestAt:0},me=P.newestAt?Math.floor((Date.now()-Number(P.newestAt))/864e5):-1,ye=P.count?me>7?"warn":"ok":"bad",be=v&&v.available?v.health:null,ce=be?be.ok?"ok":"warn":"none",A=F&&F.findings?F.onDisk&&F.residentServed===F.onDisk&&F.hostVersion===F.onDisk?"ok":"warn":"none",le={ok:["\u2705","#10b981"],warn:["\u26A0","#f59e0b"],bad:["\u2717","#ef4444"],none:["\u2022","inherit"]},ie=[{label:t("healthDb"),level:B?"ok":"bad",text:B?"journal="+(m.journalMode||"?")+(m.checkedAt?" \xB7 "+new Date(m.checkedAt).toLocaleString():""):(m.error||t("healthDbBad"))+" \u2192 dsh-memory doctor"},{label:t("healthBackups"),level:ye,text:P.count?(me<=0?t("healthBackupToday").replace("{n}",String(P.count)):t("healthBackupAge").replace("{n}",String(P.count)).replace("{d}",String(me)))+(P.files&&P.files.length?" \xB7 "+P.files[P.files.length-1]:""):t("healthNoBackups")},{label:t("healthCapture"),level:ce,text:be?be.ok?t("healthCapOk"):t("healthCapFail")+"\uFF1A"+(be.reason||""):t("healthNoRecords")},{label:t("healthVersion"),level:A,text:A==="none"?t("healthRunAlign"):t("vcOnDisk")+" v"+(F.onDisk||"?")+" \xB7 "+t("vcResident")+" v"+(F.residentServed||"?")+" \xB7 "+t("vcLoaded")+" v"+(F.hostVersion||"?"),action:A==="none"?{label:t("alignRun"),run:pe}:null}];return(0,e.jsx)("div",{style:{marginTop:6},children:ie.map(ke=>(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[ke.level][1]},children:le[ke.level][0]}),(0,e.jsx)("b",{style:{minWidth:62,flex:"0 0 auto",opacity:.85},children:ke.label}),(0,e.jsx)("span",{style:{opacity:.82,wordBreak:"break-word"},children:ke.text}),ke.action&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{marginLeft:6,padding:"0 6px",fontSize:11},disabled:!!Y,onClick:ke.action.run,children:ke.action.label})]},ke.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:()=>ge(),children:["\u21BB ",t("refresh")]})]}),R?R.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(R.error||""))?t("ledgerNeedRestart"):R.error||t("adminLoadFail")]}):R.totals.recalls+R.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(R.totals.recalls),s:t("ledgerInjected")+" "+Number(R.totals.injectedChars||0).toLocaleString()+" "+t("ledgerChars")},{k:t("ledgerCaptures"),v:String(R.totals.captures),s:t("ledgerLlmCalls")+" "+R.totals.llmCalls+(R.totals.captureFail?" \xB7 \u2717 "+R.totals.captureFail:"")},{k:t("ledgerEstimate"),v:"\u2248 "+Number(R.totals.estTokens||0).toLocaleString(),s:t("ledgerEstimateHint")},{k:t("ledgerUseful"),v:R.feedback.rate==null?"\u2014":Math.round(R.feedback.rate*100)+"%",s:t("ledgerUsefulHint")}].map(m=>(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:m.k}),(0,e.jsx)("div",{style:{fontSize:18,fontWeight:700,lineHeight:1.35},children:m.v}),(0,e.jsx)("div",{style:{fontSize:10.5,opacity:.55,lineHeight:1.5},children:m.s})]},m.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:!!Y,onClick:pe,children:t(Y==="align"?"exporting":"alignRun")}),F&&F.counts&&F.counts.fix>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!Y,onClick:Z,children:t(Y==="alignfix"?"exporting":"alignFix")}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("alignHint")})]}),F&&F.findings?(0,e.jsxs)("div",{style:{marginTop:6},children:[(0,e.jsxs)("div",{style:{fontSize:12,opacity:.75,marginBottom:4},children:[t("alignDisk")," v",F.onDisk||"?",F.residentServed?" \xB7 "+t("alignResident")+" v"+F.residentServed:"",F.hostVersion?" \xB7 "+t("alignHost")+" v"+F.hostVersion:""]}),(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:F.findings.map((m,B)=>(0,e.jsxs)("li",{style:{padding:"4px 2px",borderTop:B?"1px solid rgba(127,127,127,0.12)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:m.level==="fix"?"#ef4444":m.level==="warn"?"#f59e0b":"#10b981"},children:m.level==="fix"?"\u2717":m.level==="warn"?"\u26A0":"\u2713"})," ",(0,e.jsx)("span",{children:m.title}),m.detail?(0,e.jsx)("div",{style:{opacity:.75,marginLeft:14},children:m.detail}):null,m.command?(0,e.jsxs)("div",{style:{marginLeft:14,opacity:.9},children:["\u2192 ",(0,e.jsx)("code",{children:m.command})]}):null]},B))})]}):(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:()=>ge(),children:["\u21BB ",t("refresh")]})]}),v?v.available===!1?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogUnavailable")}):(v.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:(v.entries||[]).map((m,B)=>{let P=Bo[m.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:Wt(m.time?new Date(m.time).toISOString():"")}),(0,e.jsxs)("td",{style:{padding:"4px 6px",whiteSpace:"nowrap",color:P[1],fontWeight:600},children:[P[0]," ",m.action]}),(0,e.jsx)("td",{style:{padding:"4px 6px"},children:m.reason||""}),(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:m.preview||"",children:m.preview||""})]},B)})})})}):(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",U.length,"\uFF09"]}),U.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:U.map(m=>(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:ft[m.kind]||ft.other}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:m.title}),m.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:Wt(m.updated)})]},m.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 m=s.trend,B=Math.max(...m.map(be=>be.count),1),P=260,me=50,ye=P/m.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:P,height:me,style:{display:"block",width:"100%",height:50},children:m.map((be,ce)=>{let A=Math.round(be.count/B*(me-4));return(0,e.jsx)("rect",{x:ce*ye+1,y:me-A,width:Math.max(ye-2,2),height:A,rx:1.5,fill:be.count>0?"var(--dsw-alias-accent, #3b82f6)":"var(--dsw-alias-border-l1, #e5e7eb)",opacity:be.count>0?.85:.35},be.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:re.map(m=>(0,e.jsxs)("span",{style:{fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:St.colors[m]||"#666"}}),t(rt[m]),": ",s.byKind?.[m]||0]},m))})]}),u&&(u.budgetChars||u.recallLimit||u.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:u.budgetChars||8e4})," \xB7 ",t("recallLimitLabel")," ",(0,e.jsx)("b",{children:u.recallLimit||5})," \xB7 ",t("embeddingLabel")," ",u.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(m=>(0,e.jsx)(X,{title:m.title,kind:m.kind,updated:m.updated,path:m.path},m.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:!!Y,onClick:Ae,children:Y==="scan"?t("exporting"):"\u{1F50D} "+t("scanAndOrganize")}),f&&f.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!Y,onClick:async()=>{if(window.confirm(t("oneClickOptimizeConfirm"))){_("oneclick");try{let m=JSON.stringify({cleanupStale:ae}),P=await(await fetch(`${G}/optimize-execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:m})).json();P&&P.ok?(notify(`${t("oneClickOptimizeDone")}\uFF1A${P.plan.merged} ${t("optimizedMerged")}${ae?` \xB7 ${P.plan.staleDeleted} ${t("optimizedStaleDeleted")}`:""}`),await ge(),n&&n(),y(null)):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{_("")}}},children:Y==="oneclick"?t("exporting"):"\u26A1 "+t("oneClickOptimize")}),f&&f.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:ae,onChange:m=>ue(m.target.checked)}),t("oneClickAlsoStale")]})]}),!f&&(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:10},children:t("scanHint")}),f&&(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}}),f.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!Y,onClick:fe,children:t(Y==="merge"?"exporting":"batchMerge")})]}),(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("mergePairs")}),f.merge?.length?(0,e.jsx)("ul",{style:{margin:"0 0 12px",padding:0,listStyle:"none"},children:f.merge.map((m,B)=>(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:[m.a.title," \u21C4 ",m.b.title]}),(0,e.jsxs)("span",{style:{opacity:.6},children:[Math.round(m.sim*100),"%"]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>se(m.a.path,m.b.path),children:t("mergeNow")})]},B))}):(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",f.stale?.length||0,"\uFF09"]}),f.stale?.length>0&&(0,e.jsx)("div",{style:{marginBottom:6},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!Y,onClick:async()=>{if(!window.confirm(t("deleteConfirm")))return;_("clean");let m=0;for(let B of f.stale)try{await fetch(`${G}/delete?path=${encodeURIComponent(B.path)}`),m++}catch{}_(""),notify(`${m} ${t("deletedStale")}`),await ge(),n&&n()},children:t("cleanStale")})}),f.stale?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:f.stale.map(m=>(0,e.jsx)(X,{title:m.title,kind:"other",updated:m.updated,path:m.path},m.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:!!Y,onClick:ze,children:t(Y==="refine"?"exporting":"refineScan")}),(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("refineHint")})]}),E?.findings?.length?E.findings.map((m,B)=>(0,e.jsxs)("div",{style:{borderTop:B?"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:m.relation==="conflict"?"#ef4444":m.relation==="duplicate"?"#f59e0b":"#10b981"},children:t("refineRel_"+m.relation)}),(0,e.jsxs)("span",{style:{opacity:.55},children:[" \xB7 sim ",m.sim," \xB7 ",m.useModel||""]}),m.conflict?(0,e.jsx)("span",{style:{marginLeft:6},children:m.conflict}):null]}),(0,e.jsxs)("div",{style:{fontSize:12,opacity:.85,marginBottom:5},children:["A\uFF1A",m.a.title,(0,e.jsx)("br",{}),"B\uFF1A",m.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:!!Y,onClick:()=>Se(m,"keepA"),children:t("refineKeepA")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!Y,onClick:()=>Se(m,"keepB"),children:t("refineKeepB")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!Y,onClick:()=>Se(m,"keepBoth"),children:t("refineKeepBoth")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!Y,onClick:()=>Se(m,"merge"),children:t("refineMerge")})]})]},B)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(E?"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:!!Y,onClick:$e,children:t(Y==="junk"?"exporting":"junkScan")}),oe?.length?(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!Y,onClick:()=>qe(oe.map(m=>m.path)),children:t(Y==="junkpurge"?"exporting":"junkRecycleAll")}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("junkHint")})]}),oe?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:oe.map((m,B)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 2px",borderTop:B?"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:m.reasons.join("\uFF1B"),children:m.title||m.path}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:m.reasons[0]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!Y,onClick:()=>qe([m.path]),children:t("junkRecycle")})]},B))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(oe?"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:!!Y,onClick:L,children:t(Y==="goals"?"exporting":"goalScan")}),te?(0,e.jsxs)("span",{style:{opacity:.6,fontSize:11},children:[t("goalStats"),"\uFF1A",te.cached," / ",te.calls]}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("goalHint")})]}),te?.clusters?.length?te.clusters.map((m,B)=>(0,e.jsxs)("div",{style:{borderTop:B?"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:m.goal})," ",(0,e.jsxs)("span",{style:{opacity:.55},children:["\xB7 ",m.members.length," ",t("goalCards")]})]}),(0,e.jsx)("ul",{style:{margin:"0 0 5px",padding:"0 0 0 16px",fontSize:12,opacity:.85},children:m.members.map((P,me)=>(0,e.jsx)("li",{children:P.title},me))}),(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:!!Y,onClick:()=>c(m),children:t("goalKeep")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!Y,onClick:()=>O(m),children:t("goalMerge")})]})]},B)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(te?"goalNone":"goalIdle")})]})]})]})]})}var qa=[{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 hr({t,newCard:a,setNewCard:n,onCreated:i}){if(!a)return null;let s=qa.find(N=>N.key===a.template),d=a.body||(s?t(s.bodyKey):""),g=a.kind||(s?s.kind:"knowledge"),S=a.tags||(s?t(s.tagKey):""),f=a._creating,y=N=>{let v=qa.find(M=>M.key===N);n(M=>({...M,template:N,kind:v?v.kind:M.kind,body:v?t(v.bodyKey):M.body,tags:v?t(v.tagKey):M.tags}))},u=async()=>{if(!(!a.title&&!d)){n(N=>({...N,_creating:!0}));try{(await fetch(`${G}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a.title||t("untitled"),kind:g,tags:S.split(",").map(v=>v.trim()).filter(Boolean),body:d,source:"manual"})}).then(v=>v.json())).ok?(n(null),i&&i()):n(v=>({...v,_creating:!1}))}catch{n(v=>({...v,_creating:!1}))}}};return(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>n(null),children:[(0,e.jsx)("style",{children:bt}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:600,width:"92vw",maxHeight:"85vh"},onClick:N=>N.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:[qa.map(N=>(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===N.key?" me-on":""}`,onClick:()=>y(N.key),children:t(N.label)},N.key)),(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===""?" me-on":""}`,onClick:()=>n(N=>({...N,template:"",body:"",tags:"",kind:"knowledge"})),children:t("tplBlank")})]}),(0,e.jsx)("select",{className:"mc-btn",value:g,onChange:N=>n(v=>({...v,kind:N.target.value})),style:{maxWidth:180,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:Yn.map(N=>(0,e.jsx)("option",{value:N,style:{background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:t(rt[N])||N},N))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("cardTitle"),value:a.title||"",onChange:N=>n(v=>({...v,title:N.target.value}))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("tagsHint"),value:S,onChange:N=>n(v=>({...v,tags:N.target.value}))}),(0,e.jsx)("textarea",{className:"mc-btn",placeholder:t("cardBody"),value:d,onChange:N=>n(v=>({...v,body:N.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:f,onClick:u,children:t(f?"exporting":"createCard")})})]})]})]})}async function Xa(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 i=!!(document.execCommand&&document.execCommand("copy"));return document.body.removeChild(n),i}catch{return!1}}function yr({t,onClose:a}){let[n,i]=(0,r.useState)(""),[s,d]=(0,r.useState)(""),[g,S]=(0,r.useState)(""),[f,y]=(0,r.useState)(!0),[u,N]=(0,r.useState)(!1),[v,M]=(0,r.useState)(""),[q,H]=(0,r.useState)(""),R=(0,r.useRef)(null),J=(0,r.useRef)(null),F=()=>{let ae=R.current;if(ae)try{ae.focus(),ae.select()}catch{}},I=ae=>{M(ae),J.current&&clearTimeout(J.current),J.current=setTimeout(()=>M(""),2400)};(0,r.useEffect)(()=>{let ae=!0;return fetch(G+"/diagnostics").then(ue=>ue.json()).then(ue=>{ae&&(ue&&ue.ok?(d(String(ue.diagnostics||"")),S(String(ue.version||""))):N(!0))}).catch(()=>{ae&&N(!0)}).finally(()=>{ae&&y(!1)}),()=>{ae=!1}},[]),(0,r.useEffect)(()=>{let ae=ue=>{ue.key==="Escape"&&a()};return window.addEventListener("keydown",ae),()=>{window.removeEventListener("keydown",ae),J.current&&clearTimeout(J.current)}},[a]);let pe=(()=>{try{return String(navigator.language||"").toLowerCase().startsWith("en")?"en":"zh"}catch{return"zh"}})(),Z=()=>{let ae=n.trim().split(`
|
|
1153
|
-
`)[0]||"",ue=vn({title:"[Bug] "+(ae.slice(0,60)||"memory-eternal \u95EE\u9898"),body:wn({description:n,diagnostics:s,version:g})});try{window.open(ue,"_blank","noopener")}catch{I(t("fbCopyFail"))}},U=async()=>{await Xa(s)?(H(""),I(t("fbCopiedDiag"))):(H(s),I(t("fbCopyManual")))},K=async()=>{let ae=kn({lang:pe,description:n,diagnostics:s});await Xa(ae)?(H(""),I(t("fbCopiedPrompt"))):(H(ae),I(t("fbCopyManual")))},Y={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},_={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:bt}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:720},onClick:ae=>ae.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:ae=>i(ae.target.value),placeholder:t("fbDesc"),rows:5,style:Y}),(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:U,disabled:!s,children:t("fbCopyDiag")})]}),(0,e.jsx)("pre",{style:_,children:f?t("fbLoading"):u?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()){I(t("fbNeedDesc"));return}Z()},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:K,children:["\u{1F916} ",t("fbCopyPrompt")]})]}),v&&(0,e.jsx)("div",{style:{fontSize:12,color:"var(--dsw-alias-brand-primary, #3b82f6)"},children:v}),q&&(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:F,children:t("fbSelectAll")})]}),(0,e.jsx)("textarea",{ref:R,readOnly:!0,value:q,rows:7,style:Y})]})]})]})]})}function xr({t,tab:a,onTab:n,onClose:i,onFeedback:s,onReplay:d}){let[g,S]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!g)return;let N=v=>{v.key==="Escape"&&S(null)};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[g]);let f=[{id:"group",label:t("supportGroup")},{id:"sponsor",label:t("supportSponsor")},{id:"legacy",label:t("supportLegacy")}],y="https://github.com/EternalNight996/memory-eternal/blob/main/README.md",u=(N,v)=>(0,e.jsxs)("figure",{children:[(0,e.jsx)("img",{src:N,alt:v,loading:"lazy",title:t("clickToZoom"),onClick:M=>S(M.currentTarget.currentSrc||N),onError:M=>{let q=M.currentTarget;q.dataset.fb||(q.dataset.fb="1",q.src="https://raw.githubusercontent.com/EternalNight996/memory-eternal/main/assets/support/"+String(N).split("/").pop())}}),(0,e.jsx)("figcaption",{children:v})]});return(0,e.jsxs)("div",{className:"me-overlay",onClick:i,children:[(0,e.jsx)("style",{children:bt}),(0,e.jsxs)("div",{className:"me-dialog me-support",onClick:N=>N.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:i,children:t("close")})})]}),(0,e.jsx)("div",{className:"me-support-tabs",children:f.map(N=>(0,e.jsx)("button",{type:"button",className:`me-support-tab${a===N.id?" active":""}`,onClick:()=>n(N.id),children:N.label},N.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:[u("support/group-qr.jpg",t("supportGroupQQ")),u("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:y,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:[u("support/wechat-pay.jpg","\u5FAE\u4FE1\u6536\u6B3E\u7801"),u("support/wechat-reward.jpg","\u5FAE\u4FE1\u8D5E\u8D4F\u7801"),u("support/alipay.jpg",t("supportAlipay"))]}),(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:y,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:d,children:["\u2728 ",t("supportReplay")]})]})]}),g&&(0,e.jsxs)("div",{className:"me-lightbox",role:"dialog","aria-modal":"true","aria-label":t("close"),onClick:N=>{N.stopPropagation(),S(null)},children:[(0,e.jsx)("button",{type:"button",className:"me-lightbox-close",onClick:N=>{N.stopPropagation(),S(null)},"aria-label":t("close"),children:"\u2715"}),(0,e.jsx)("img",{src:g,alt:"",onClick:N=>N.stopPropagation()})]})]})}function vr({t,onDone:a}){let[n,i]=(0,r.useState)(0),s="https://github.com/EternalNight996/memory-eternal",d=[{title:t("onboardStep0Title"),body:t("onboardStep0Body")},{title:t("onboardStep1Title"),body:t("onboardStep1Body")},{title:t("onboardStep2Title"),body:t("onboardStep2Body")},{title:t("onboardStep3Title"),body:t("onboardStep3Body")}],g=n===d.length-1;return(0,r.useEffect)(()=>{let S=f=>{f.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:bt}),(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:d.map((S,f)=>(0,e.jsx)("span",{className:`me-guide-dot${f<=n?" on":""}`},f))}),(0,e.jsxs)("div",{className:"me-guide-body",children:[(0,e.jsx)("h3",{children:d[n].title}),(0,e.jsx)("p",{children:d[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:()=>Ca(s),children:["\u2605 ",t("onboardStar")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Ca(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:()=>i(S=>S-1),children:t("onboardBack")}),g?(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:()=>i(S=>S+1),children:t(n===0?"onboardStarred":"onboardNext")})]})]})]})}function wr({t,card:a,query:n,onClose:i,onDelete:s,onFeedback:d,onNavigate:g,onTagClick:S,allCards:f,onOpenRelated:y,onKindChange:u,onSaved:N}){let[v,M]=(0,r.useState)(0),[q,H]=(0,r.useState)(""),[R,J]=(0,r.useState)(()=>{try{let A=localStorage.getItem("me-read-width");return["narrow","mid","wide"].includes(A)?A:"mid"}catch{return"mid"}}),F={narrow:720,mid:900,wide:1180};(0,r.useEffect)(()=>{let A=le=>{if(le.key==="Escape"){i();return}let ie=String(le.target&&le.target.tagName||"").toLowerCase();ie==="input"||ie==="textarea"||ie==="select"||le.target&&le.target.isContentEditable||(le.key==="j"&&g?(le.preventDefault(),g(1)):le.key==="k"&&g&&(le.preventDefault(),g(-1)))};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[i,g]);let I=async(A,le)=>{let ie=await Xa(String(A||""));H(ie?t("copied")+" \xB7 "+le:t("copyFail")),setTimeout(()=>H(""),1500)},{meta:pe,body:Z}=(0,r.useMemo)(()=>ha(a.text||""),[a.text]),U=A=>{let le=pe.find(([ie])=>String(ie).toLowerCase()===A);return le?le[1]:""},K=gn(U("tags")),Y=a.kind||U("kind")||"knowledge",_=String(a.status||U("status")||"approved").toLowerCase(),ae=ft[Y]||"#6B7280",ue=(Z||"").length>460,fe=(0,r.useMemo)(()=>en(Z,a.title),[Z,a.title]),ge=(0,r.useMemo)(()=>{let A=tn(a);if(A)return A;let ie=(fe.split(/\r?\n/).map(ke=>ke.trim()).find(ke=>ke&&!/^#{1,2}\s/.test(ke))||"").replace(/[#>*_`]/g,"").replace(/\s+/g," ").trim();return ie.length>150?ie.slice(0,148)+"\u2026":ie},[a,fe]),Ae=(0,r.useMemo)(()=>gr(fe),[fe]),E=(0,r.useMemo)(()=>{let A=new Set(K);return(f||[]).filter(le=>le.path!==a.path&&(le.tags||[]).some(ie=>A.has(ie))).slice(0,3)},[f,a.path,K.join("|")]),je=()=>{D(String(a.title||"")),c((Array.isArray(K)?K:[]).join(", ")),se(String(Z||"")),m(""),qe(!0)},ze=()=>{qe(!1),m("")},Se=async()=>{let A=String(te||"").trim(),le=String(O||"").trim();if(!A){m(t("editTitleEmpty"));return}if(!le){m(t("editBodyEmpty"));return}let ie=String(L||"").split(/[,,\n]+/).map(ke=>ke.trim()).filter(Boolean);re(!0),m("");try{let ke=await fetch(`${G}/card/update`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:a.path,title:A,tags:ie,body:le})}).then(nt=>nt.json());if(!ke||!ke.ok){m(ke&&ke.error||t("editFail"));return}qe(!1),N&&await N({path:a.path,status:_,title:A})}catch(ke){m(String(ke&&ke.message||ke))}finally{re(!1)}},[oe,Q]=(0,r.useState)(!0),[$e,qe]=(0,r.useState)(!1),[te,D]=(0,r.useState)(""),[L,c]=(0,r.useState)(""),[O,se]=(0,r.useState)(""),[Ie,re]=(0,r.useState)(!1),[X,m]=(0,r.useState)(""),B=(0,r.useRef)(null),[P,me]=(0,r.useState)(""),ye=A=>{let le=B.current;if(!le)return;let ie=document.getElementById(A);if(!ie||!le.contains(ie))return;let ke=ie.getBoundingClientRect().top-le.getBoundingClientRect().top+le.scrollTop-12;le.scrollTo({top:Math.max(0,ke),behavior:"smooth"})},be=A=>{if(!oe){Q(!0),setTimeout(()=>ye(A),80);return}ye(A)},ce=A=>{let le=A.currentTarget,ie=le.scrollHeight-le.clientHeight;M(ie<=0?100:Math.min(100,Math.max(0,le.scrollTop/ie*100)));let ke=le.querySelectorAll(".md-doc .md-h"),nt="",Fe=le.getBoundingClientRect().top+28;for(let yt of ke)if(yt.getBoundingClientRect().top<=Fe)nt=yt.id;else break;me(nt)};return(0,e.jsxs)("div",{className:"me-overlay",onClick:i,children:[(0,e.jsx)("style",{children:bt}),(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:Gt[Y]||"\u{1F4CE}"}),a.title]}),(0,e.jsxs)("div",{className:"me-head-actions",children:[q&&(0,e.jsx)("span",{style:{fontSize:11.5,color:"#10b981",whiteSpace:"nowrap"},children:q}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyBody"),onClick:()=>I(Z,t("copyBody")),children:["\u{1F4CB} ",t("copyBody")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyPath"),onClick:()=>I(a.path,t("copyPath")),children:["\u{1F517} ",t("copyPath")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",title:t("editCard"),onClick:$e?ze:je,children:$e?"\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"],le=A[(A.indexOf(R)+1)%A.length];J(le);try{localStorage.setItem("me-read-width",le)}catch{}},children:[t("readWidth")," \xB7 ",t(R==="narrow"?"widthNarrow":R==="wide"?"widthWide":"widthMid")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>d&&d(!0),children:["\u{1F44D} ",t("fbUseful")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>d&&d(!1),children:["\u{1F44E} ",t("fbIrr")]}),ue&&(0,e.jsx)("button",{type:"button",className:"mc-btn","aria-expanded":oe,onClick:()=>Q(A=>!A),children:t(oe?"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")}),u&&_==="approved"&&(Y==="core"?(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>u(a.path,"knowledge"),children:t("unsetCore")}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>u(a.path,"core"),children:["\u2B50 ",t("setCore")]})),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:i,children:t("close")})]})]}),u&&(0,e.jsxs)("div",{className:"me-core-banner"+(Y==="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(Y==="core"?"coreActiveHint":"coreInactiveHint")}),_==="approved"?(0,e.jsx)("button",{type:"button",className:"mc-btn me-core-btn",onClick:()=>u(a.path,Y==="core"?"knowledge":"core"),children:Y==="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:ae,borderColor:ae+"59",background:ae+"1a"},children:[Gt[Y]||"\u{1F4CE}"," ",t(rt[Y]||"kindKnowledge")]}),(0,e.jsxs)("span",{className:"md-chip "+(_==="approved"?"md-chip-st-ok":_==="pending"?"md-chip-st-warn":"md-chip-st-bad"),children:[_==="approved"?"\u2705":_==="pending"?"\u23F3":"\u26D4"," ",t(_==="approved"?"statusApproved":_==="pending"?"statusPending":"statusRejected")]}),(Array.isArray(K)?K:[]).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)),!!U("updated")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F552} ",t("updated")," ",Wt(U("updated"))]}),!!U("source")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F4E5} ",U("source")]})]}),(0,e.jsx)("div",{className:"me-read-progress","aria-hidden":"true",children:(0,e.jsx)("i",{style:{width:v+"%"}})}),(0,e.jsxs)("div",{className:"me-reader-body",children:[(0,e.jsxs)("div",{className:"me-dialog-body me-reader-main",style:{maxWidth:F[R],margin:"0 auto",width:"100%",boxSizing:"border-box",...oe?{}:{maxHeight:300,overflow:"hidden"}},ref:B,onScroll:ce,onClick:oe?void 0:A=>{A.stopPropagation(),Q(!0)},children:[!$e&&!!ge&&(0,e.jsxs)("div",{className:"me-reader-callout",children:[(0,e.jsx)("span",{className:"me-reader-callout-k",children:t(Zn(a))}),(0,e.jsx)("p",{children:ge})]}),$e?(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:te,onChange:A=>D(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:L,onChange:A=>c(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:O,onChange:A=>se(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"}}),X&&(0,e.jsx)("div",{style:{color:"#f87171",fontSize:12},children:X}),(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:ze,disabled:Ie,children:t("editCancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Se,disabled:Ie,style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:t(Ie?"editSaving":"editSave")})]})]}):(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:la(fe)}})]}),(0,e.jsxs)("aside",{className:"me-reader-side",children:[Ae.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:Ae.map((A,le)=>(0,e.jsxs)("button",{type:"button",className:`lv${A.level}${P===A.id?" active":""}`,onClick:()=>be(A.id),children:[(0,e.jsx)("span",{children:String(le+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:U("source")||a.submittedBy||"\u2014"}),(0,e.jsx)("div",{className:"side-label",children:t("updated")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:Wt(U("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}),K.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:K.slice(0,8).map(A=>(0,e.jsxs)("button",{type:"button",className:"mc-chip",onClick:()=>S&&S(A),children:["#",A]},A))})]}),E.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:E.map(A=>(0,e.jsxs)("button",{type:"button",onClick:()=>y&&y(A),children:[(0,e.jsx)("span",{children:Gt[A.kind]||"\u{1F4CE}"}),(0,e.jsx)("b",{children:A.title})]},A.path))})]})]})]}),!oe&&(0,e.jsxs)("div",{className:"md-collapsed-hint",onClick:A=>{A.stopPropagation(),Q(!0)},children:[t("expand")," \u2304"]})]})]})}function kr({t,onOpen:a,all:n,onAllChange:i,onMutate:s,active:d,visible:g}){let[S,f]=(0,r.useState)([]),[y,u]=(0,r.useState)(null),[N,v]=(0,r.useState)(null),[M,q]=(0,r.useState)(!1),H=!0,[R,J]=(0,r.useState)(null),[F,I]=(0,r.useState)(!1),[pe,Z]=(0,r.useState)(!1),[U,K]=(0,r.useState)(null),Y=(0,r.useRef)(0),_=(0,r.useRef)(null);_.current||(_.current=In(96));let ae=(0,r.useRef)(0),ue=(0,r.useRef)(0),fe=(0,r.useRef)(S);fe.current=S;let ge=(0,r.useRef)(n),Ae=(0,r.useRef)({requests:0,cacheHits:0,errors:0,timeouts:0,lastMs:0,lastBytes:0}),E=(0,r.useCallback)(async(re,X={})=>{let m=Array.isArray(re)?re.filter(Boolean):[],B=(n?"all|":"")+Xt(m);if(!X.force){let ce=_.current.get(B);if(ce)return Ae.current.cacheHits+=1,u(ce),f(m),v(null),q(!1),ce}let P=++ae.current;q(!0),v(null);let me=new AbortController,ye=setTimeout(()=>{try{me.abort()}catch{}},1600),be=performance.now();Ae.current.requests+=1;try{let ce=await fetch(Rn(G,m,{all:n}),{signal:me.signal}),A=await ce.json().catch(()=>null);if(P!==ae.current)return null;if(!ce.ok||!A||!A.ok)throw new Error(A&&A.error||"HTTP "+ce.status);let le=En(A);if(!le.ok)try{console.warn("[memory-eternal] \u5206\u5C42\u54CD\u5E94\u8D8A\u754C\uFF1A"+le.problems.join("\uFF1B"))}catch{}return _.current.set(B,A),Ae.current.lastMs=Math.round(performance.now()-be),Ae.current.lastBytes=le.bytes,ue.current||(ue.current=Math.round(performance.now())),u(A),f(m),v(null),A}catch(ce){if(P!==ae.current)return null;let A=Fn(ce,{timeoutMs:1600,elapsedMs:performance.now()-be});A.timeout&&(Ae.current.timeouts+=1),Ae.current.errors+=1;try{console.warn("[memory-eternal] \u5C42\u7EA7\u52A0\u8F7D\u5931\u8D25 @ "+B+"\uFF1A"+A.message)}catch{}return v({...A,target:Xt(m),segments:m.slice()}),null}finally{clearTimeout(ye),P===ae.current&&q(!1)}},[n]);(0,r.useEffect)(()=>{ge.current!==n&&(ge.current=n,_.current.clear(),d&&E([],{force:!0}))},[n,d,E]),(0,r.useEffect)(()=>{!d||y||M||E([])},[d,y,M,E]),(0,r.useEffect)(()=>{g&&y&&Y.current++},[g,y]);let je=(0,r.useCallback)(re=>{let X=Array.isArray(re)?re:An(re&&re.path!==void 0?re.path:re);Xt(X)!==Xt(fe.current)&&E(X)},[E]),ze=(0,r.useCallback)(re=>{re&&E(fe.current.concat(String(re)))},[E]),Se=(0,r.useCallback)(()=>{_.current.clear();let re=N&&Array.isArray(N.segments)?N.segments:fe.current;E(re,{force:!0})},[E,N]),oe=(0,r.useCallback)(async()=>(_.current.clear(),E(fe.current,{force:!0})),[E]),Q=(0,r.useCallback)(async()=>{Z(!0),K(null);try{let re=await fetch(`${G}/graph?${n?"all=1&":""}limit=${F?0:800}`),X=await re.json().catch(()=>null);if(!re.ok||!X||!X.ok)throw new Error(X&&X.error||"HTTP "+re.status);let m=Array.isArray(X.nodes)?X.nodes:[],B=Array.isArray(X.edges)?X.edges:[],P=typeof X.shown=="number",me=new Map;for(let ie of B)me.set(ie.source,(me.get(ie.source)||0)+1),me.set(ie.target,(me.get(ie.target)||0)+1);let be=F||P?m:m.slice().sort((ie,ke)=>(me.get(ke.id)||0)-(me.get(ie.id)||0)).slice(0,800),ce=new Set(be.map(ie=>ie.id)),A=be.map(ie=>({id:ie.id,label:ie.label||ie.title||ie.id,kind:ie.kind||"other",tags:Array.isArray(ie.tags)?ie.tags:[],updated:ie.updated||ie.updated_at||"",count:0,type:"card"})),le=F?B:B.filter(ie=>ce.has(ie.source)&&ce.has(ie.target));J({id:"flat",mode:"flat",total:Number(X.total)||m.length,shown:Number(X.shown)||A.length,items:A,edges:le})}catch(re){K({message:String(re&&re.message||re)})}finally{Z(!1)}},[n,F]);(0,r.useEffect)(()=>{Q()},[Q]);let $e=(0,r.useCallback)(async re=>{try{let m=await(await fetch(`${G}/delete?path=${encodeURIComponent(re)}`)).json();return m&&m.ok?(await oe(),s&&s(),!0):!1}catch{return!1}},[oe,s]),qe=(0,r.useCallback)(async re=>{if(!re||re.length<2)return!1;try{let X=await fetch(`${G}/merge?paths=${encodeURIComponent(re.join(","))}`).then(m=>m.json());return X&&X.ok?(await oe(),s&&s(),!0):!1}catch{return!1}},[oe,s]);(0,r.useEffect)(()=>{let re=()=>{let X=typeof globalThis.__meGraphRuntime=="function"?globalThis.__meGraphRuntime():null;return{path:Xt(fe.current),crumbs:y&&Array.isArray(y.crumbs)?y.crumbs.map(m=>({path:m.path,label:m.label,labelKey:m.labelKey,count:m.count})):[],level:y&&y.level?{mode:y.level.mode,total:y.level.total,items:y.level.items.length,edges:y.level.edges.length}:null,loading:!!M,error:N?{timeout:!!N.timeout,message:N.message,target:N.target||""}:null,requests:Ae.current.requests,cacheHits:Ae.current.cacheHits,errors:Ae.current.errors,timeouts:Ae.current.timeouts,lastMs:Ae.current.lastMs,lastBytes:Ae.current.lastBytes,firstLevelMs:ue.current,cacheSize:_.current.size,timeoutMs:1600,runtime:X}};return globalThis.__meGraphProbe=re,()=>{if(globalThis.__meGraphProbe===re)try{delete globalThis.__meGraphProbe}catch{globalThis.__meGraphProbe=void 0}}},[y,M,N]);let te=H?R:y&&y.level?y.level:null,D=te?te.items.length:0,L=te?te.total:0,c=te?te.edges.length:0,O=H?pe:!y&&!N,se=H?U:!y&&N,Ie=H?U:y?N:null;return(0,e.jsxs)("div",{className:"me-graph me-v5-graph",children:[(0,e.jsx)("style",{children:bt}),(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.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>I(re=>!re),children:t(F?"graphFlatOnly":"graphFlatAll")}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:(H?R:y)?`${D} ${t("graphItems")} \xB7 ${L} ${t("graphCardsUnit")} \xB7 ${c} ${t("edges")}`:""})]})]}),O&&(0,e.jsx)(to,{text:t("loadingGraph")}),se&&(0,e.jsxs)("div",{className:"mc-empty",style:{display:"flex",flexDirection:"column",gap:10,alignItems:"center"},children:[(0,e.jsxs)("span",{children:[Ie&&Ie.timeout?t("graphLevelTimeout").replace("{ms}",String(1600)):t("graphLevelError"),"\uFF1A",Ie&&Ie.message]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:H?Q:Se,children:t("graphRetry")})]}),(H?R:y)&&D===0&&(0,e.jsx)("div",{className:"mc-empty",children:t("graphEmptyLevel")}),te&&D>0&&(0,e.jsx)(Nr,{level:te,crumbs:H?[]:y&&y.crumbs?y.crumbs:[],onOpen:a,onDelete:$e,onMerge:qe,onDrill:H?()=>{}:ze,onNavigate:je,onRetry:H?Q:Se,error:Ie,loading:H?pe:M,t,all:n,onAllChange:i,fitTrigger:Y.current})]})}var St={colors:{core:"#FF7A45",skill:"#A78BFA",project:"#60A5FA",knowledge:"#34D399",content:"#FBBF24",prompt:"#C084FC",business:"#F472B6",tool:"#22B8CF",mistake:"#FB7185",other:"#8CA0B3"},deep:{core:"#E8590C",skill:"#7C3AED",project:"#2563EB",knowledge:"#059669",content:"#D97706",prompt:"#9333EA",business:"#DB2777",tool:"#0891B2",mistake:"#E11D48",other:"#64748B"},shapes:{core:"diamond",skill:"hexagon",project:"circle",knowledge:"circle",content:"rect",prompt:"diamond",business:"hexagon",tool:"circle",mistake:"diamond",other:"circle"}};function $t(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 ua({value:t,small:a}){let n=typeof t=="number"&&Number.isFinite(t),i=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(i):void 0,"aria-label":"\u52A0\u8F7D\u8FDB\u5EA6",children:(0,e.jsx)("span",{className:"me-progress-fill",style:n?{width:Math.max(3,i)+"%"}:void 0})})}function to({text:t,value:a}){return(0,e.jsxs)("div",{className:"me-loading",role:"status","aria-live":"polite",children:[(0,e.jsx)(ua,{value:a}),(0,e.jsx)("span",{className:"me-loading-text",children:t})]})}var Un=[];function Sr({crumbs:t,t:a,onPick:n,busy:i}){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((d,g)=>{let S=d.labelKey?a(d.labelKey):"",f=S&&S!==d.labelKey?S:d.label||d.path||"\u2014",y=g===s.length-1;return(0,e.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:2},children:[g>0&&(0,e.jsx)("span",{className:"sep","aria-hidden":"true",children:"\u203A"}),(0,e.jsx)("button",{type:"button",className:(g===0?"home":"")+(y?" current":""),"aria-current":y?"page":void 0,title:f,disabled:y||i,onClick:()=>{y||n(d)},children:f})]},d.path||"root")})})}function Nr({level:t,crumbs:a,onOpen:n,onDelete:i,onMerge:s,onDrill:d,onNavigate:g,onRetry:S,error:f,loading:y,t:u,all:N,onAllChange:v,fitTrigger:M}){let q=(0,r.useRef)(null),H=(0,r.useRef)(null),R=(0,r.useRef)(null),J=(0,r.useRef)(null),F=(0,r.useRef)(null),I=t&&Array.isArray(t.items)?t.items:Un,pe=t&&Array.isArray(t.edges)?t.edges:Un,Z=t&&t.id||"",U=(0,r.useMemo)(()=>I.map(x=>({id:x.id,title:x.label||x.id,name:x.label||x.id,kind:x.kind||"other",tags:Array.isArray(x.tags)?x.tags:[],updated:x.updated||"",count:Number(x.count)||0,type:x.type||"card"})),[I]),K=(0,r.useMemo)(()=>pe.map(x=>({source:x.source,target:x.target,type:x.type||"tag",weight:Number(x.weight)||1})),[pe]),Y=(0,r.useRef)(u);Y.current=u;let _=(0,r.useRef)(n);(0,r.useEffect)(()=>{_.current=n},[n]);let ae=(0,r.useRef)(i);(0,r.useEffect)(()=>{ae.current=i},[i]);let ue=(0,r.useRef)(s);(0,r.useEffect)(()=>{ue.current=s},[s]);let fe=(0,r.useRef)(d);(0,r.useEffect)(()=>{fe.current=d},[d]);let[ge,Ae]=(0,r.useState)(""),[E,je]=(0,r.useState)(null),[ze,Se]=(0,r.useState)(null),oe=(0,r.useRef)("");(0,r.useEffect)(()=>{oe.current=ge.trim().toLowerCase()},[ge]),(0,r.useEffect)(()=>{let x=R.current;if(!x)return;let p=ge.trim().toLowerCase();if(!p)return;let de=x.nodes.find(Ee=>(Ee.name||"").toLowerCase().includes(p));if(de){R.current.selectedId=de.id,je(de.id),x.panX=x.w/2-de.x*x.zoom,x.panY=x.h/2-de.y*x.zoom;try{x.render&&x.render()}catch(Ee){$t(Ee,"search-center")}}},[ge]);let[Q,$e]=(0,r.useState)("all"),[qe,te]=(0,r.useState)(!1),D=(0,r.useRef)("all"),[L,c]=(0,r.useState)(""),O=(0,r.useRef)(""),[se,Ie]=(0,r.useState)(!1),re=(0,r.useRef)(!1),[X,m]=(0,r.useState)(null);(0,r.useEffect)(()=>{D.current=Q},[Q]),(0,r.useEffect)(()=>{O.current=L},[L]),(0,r.useEffect)(()=>{re.current=se},[se]);let B=(0,r.useMemo)(()=>{let x=new Map;for(let p of U)for(let de of p.tags||[]){let Ee=String(de).trim();Ee&&x.set(Ee,(x.get(Ee)||0)+1)}return[...x.entries()].sort((p,de)=>de[1]-p[1]).slice(0,24).map(([p,de])=>({tag:p,n:de}))},[U]),P=(0,r.useMemo)(()=>{let x={};for(let p of U)x[p.kind||"other"]=(x[p.kind||"other"]||0)+(p.type==="planet"?Math.max(1,p.count||0):1);return x},[U]),me=(()=>{let x=ge.trim().toLowerCase();return!!x&&!U.some(p=>(p.title||p.name||"").toLowerCase().includes(x)||String(p.kind||"").toLowerCase().includes(x)||String(rt[p.kind]||"").toLowerCase().includes(x))})();(0,r.useEffect)(()=>{let x=R.current;x&&x.requestRender&&x.requestRender()},[ge]),(0,r.useEffect)(()=>{let x=R.current;if(!(!x||!x.render))try{x.render()}catch(p){$t(p,"filter/timeDim")}},[Q,L,se]);let ye=(0,r.useRef)(null),[be,ce]=(0,r.useState)([]),[A,le]=(0,r.useState)(null),[ie,ke]=(0,r.useState)(!1),[nt,Fe]=(0,r.useState)(null),[yt,lt]=(0,r.useState)(""),Nt=(0,r.useRef)(null),ct=(0,r.useRef)(null),Ue=(x,p=!0)=>{Nt.current&&clearTimeout(Nt.current),Fe({msg:x,ok:p}),Nt.current=setTimeout(()=>Fe(null),1900)},Rt=x=>{lt(x),ct.current&&clearTimeout(ct.current),ct.current=setTimeout(()=>lt(""),1600)};(0,r.useEffect)(()=>()=>{Nt.current&&clearTimeout(Nt.current),ct.current&&clearTimeout(ct.current)},[]);let Ce=(0,r.useMemo)(()=>U.reduce((x,p)=>(x[p.id]=p,x),{}),[U]);return(0,r.useEffect)(()=>{let x=q.current;if(!x||U.length===0)return;let p=x.getContext("2d");if(!p)return;let de=Math.min(1.5,Math.max(1,window.devicePixelRatio||1)),Ee={};K.forEach(w=>{Ee[w.source]=(Ee[w.source]||0)+1,Ee[w.target]=(Ee[w.target]||0)+1});let b=Math.max(1,...Object.values(Ee)),k=Pn(),Pe=I.some(w=>w&&w.type==="planet"),o={nodes:I.filter(w=>w&&w.type!=="planet").concat(I.filter(w=>w&&w.type==="planet")).map(w=>Dn(w,{degree:Ee[w.id]||0,maxDegree:b})),edges:K.map(w=>({sourceNodeId:w.source,targetNodeId:w.target,weight:Math.max(1,Number(w.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:de,ctx:p,multi:[],marquee:null,planetLayer:Pe,levelId:Z};o.domain=U,o.domainById=U.reduce((w,z)=>(w[z.id]=z,w),{}),o.nodeById=new Map(o.nodes.map(w=>[w.id,w])),o.edgePairs=(()=>{let w=new Map(o.nodes.map((T,V)=>[T.id,V])),z=new Int32Array(o.edges.length*2),W=0;for(let T of o.edges){let V=w.get(T.sourceNodeId),xe=w.get(T.targetNodeId);V===void 0||xe===void 0||(z[W]=V,z[W+1]=xe,W+=2)}return z.subarray(0,W)})(),o.alpha=1,o.forceParams=Pe?Ln(ka(o.nodes.length)):ka(o.nodes.length),o.lastTickMs=0,o.lastRenderMs=0,o.nodes.forEach((w,z)=>{let W=z*2.399963229728653,T=12*Math.sqrt(z);w.x=Math.cos(W)*T,w.y=Math.sin(W)*T});let ht=[...new Set(o.nodes.map(w=>w.type))];o.clustered=!Pe&&ht.length>1,o.typeCenters=o.typeCenters||{};let xt=Pe?0:160;ht.forEach((w,z)=>{if(o.typeCenters[w])return;let W=z/ht.length*Math.PI*2-Math.PI/2;o.typeCenters[w]={x:Math.cos(W)*xt,y:Math.sin(W)*xt}}),R.current=o;let vt=0,zt=0,dt=null,jt="",Kt=()=>{let w=x.clientWidth,z=x.clientHeight;o.w=w,o.h=z,x.width=w*de,x.height=z*de,p.setTransform(de,0,0,de,0,0),(vt===0||zt===0)&&w>0&&z>0&&o.tickCount>0&&k.raf(()=>l()),vt=w,zt=z};Kt();let Yt=new ResizeObserver(Kt);Yt.observe(x.parentElement);let it=(w,z)=>w&&w.length>z?w.slice(0,z)+"\u2026":w,Ge=(w,z,W,T)=>{if(p.beginPath(),T==="rect")p.rect(w-W,z-W*.75,W*2,W*1.5);else if(T==="diamond")p.moveTo(w,z-W),p.lineTo(w+W,z),p.lineTo(w,z+W),p.lineTo(w-W,z),p.closePath();else if(T==="hexagon"){for(let V=0;V<6;V++){let xe=Math.PI/3*V-Math.PI/2,Le=w+W*Math.cos(xe),Oe=z+W*Math.sin(xe);V===0?p.moveTo(Le,Oe):p.lineTo(Le,Oe)}p.closePath()}else p.arc(w,z,W,0,Math.PI*2)},Ht=new Map,oa=(w,z)=>{let W=w+"|"+Math.round(z),T=Ht.get(W);return T||(T=p.createRadialGradient(-z*.32,-z*.38,0,0,0,z*1.15),T.addColorStop(0,Lt(w,"#ffffff",.2)),T.addColorStop(.62,w),T.addColorStop(1,Lt(w,"#000000",.22)),Ht.set(W,T)),T},Dt=(w,z)=>{let W=parseInt(w.slice(1,3),16),T=parseInt(w.slice(3,5),16),V=parseInt(w.slice(5,7),16);return"rgba("+W+","+T+","+V+","+z+")"},Lt=(w,z,W)=>{let T=Oe=>[parseInt(Oe.slice(1,3),16),parseInt(Oe.slice(3,5),16),parseInt(Oe.slice(5,7),16)],V=T(w),xe=T(z),Le=Math.max(0,Math.min(1,Number(W)||0));return"rgb("+V.map((Oe,Ke)=>Math.round(Oe+(xe[Ke]-Oe)*Le)).join(",")+")"},Ft=new Map,Ct=new Map,Vt=(w,z,W,T)=>{let V=Ke=>[parseInt(Ke.slice(1,3),16),parseInt(Ke.slice(3,5),16),parseInt(Ke.slice(5,7),16)],xe=V(w),Le=V(z),Oe=Math.max(0,Math.min(1,Number(W)||0));return"rgba("+xe.map((Ke,Ye)=>Math.round(Ke+(Le[Ye]-Ke)*Oe)).join(",")+","+T+")"},_t=1.1,Zt=.3,tt=3,l=()=>{if(!o.nodes.length)return;let w=1/0,z=-1/0,W=1/0,T=-1/0;o.nodes.forEach(Je=>{let ot=Number(Je.r)||0,Ve=Je.planet?ot*1.32:ot;Je.x-Ve<w&&(w=Je.x-Ve),Je.x+Ve>z&&(z=Je.x+Ve),Je.y-Ve<W&&(W=Je.y-Ve),Je.y+Ve>T&&(T=Je.y+Ve)});let V=28,xe=z-w+V*2,Le=T-W+V*2,Oe=Math.min(o.w/xe,o.h/Le),Ke=Math.pow(1/_t,tt);o.zoom=Math.max(.35,Math.min(1.8,Oe*Ke));let Ye=!(Array.isArray(a)&&a.length>1);o.planetLayer&&Ye?o.zoom=Math.max(.12,Math.min(Zt,Oe)):o.planetLayer&&(o.zoom=Math.max(.12,Oe*Math.pow(1/_t,tt-2))),o.panX=o.w/2-(w+z)/2*o.zoom,o.panY=o.h/2-(W+T)/2*o.zoom};J.current=l;let $=()=>{o.renderFrames=(o.renderFrames|0)+1;let w=o.zoom>=1.2?"in":"out";H.current&&H.current.dataset.zoom!==w&&(H.current.dataset.zoom=w),p.clearRect(0,0,o.w,o.h),o.searchTerm=oe.current,o.kindFilter=D.current,o.timeMode=re.current,o.tagFilter=O.current;let z=o.tagFilter,W=o.kindFilter,T=C=>String(C||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");p.save();let V=o.w+"x"+o.h;if(!dt||jt!==V){dt=new Path2D;let C=26;for(let Te=C/2;Te<o.w;Te+=C)for(let We=C/2;We<o.h;We+=C)dt.moveTo(Te+1,We),dt.arc(Te,We,1,0,Math.PI*2);jt=V}p.fillStyle="rgba(255,255,255,0.055)",p.fill(dt),p.restore(),p.save(),p.translate(o.panX,o.panY),p.scale(o.zoom,o.zoom);let xe={};o.nodes.forEach(C=>xe[C.id]=C);let Le=performance.now()<(o.motionUntil||0),Oe=o.nodes.length>40,Ke=Oe?1.5:.55,Ye=o.selectedId||o.hoverId,Je=Sn({panX:o.panX,panY:o.panY,zoom:o.zoom,w:o.w,h:o.h,margin:80}),ot=(()=>{let C=(o.searchTerm||"").toLowerCase();if(!C)return null;let Te=[];for(let We of o.nodes){let _e=(o.domainById[We.id]||{}).kind||"other";if(((We.name||"").toLowerCase().includes(C)||String(rt[_e]||"").toLowerCase().includes(C)||String(_e).toLowerCase().includes(C))&&Te.push(We.id),Te.length>200)break}return Te})(),Ve=o.quality|0;(!o.labelOrder||o.labelOrder.src!==o.nodes)&&(o.labelOrder={src:o.nodes,ids:o.nodes.slice().sort((C,Te)=>(Number(Ee[Te.id])||0)-(Number(Ee[C.id])||0)).map(C=>C.id)});let Pt=Cn(o.nodes,{limit:Nn(o.nodes.length,Ve),focusId:Ye,hoverId:o.hoverId,searchHits:ot,degree:Ee,order:o.labelOrder.ids}),Ut=o.zoom<=Ke?new Set((o.labelOrder&&o.labelOrder.ids?o.labelOrder.ids:[]).slice(0,12)):null,kt=new Map,ga=(C,Te)=>{let We=C+"|"+Te,we=kt.get(We);return we===void 0&&(p.font=C,we=p.measureText(Te).width,kt.set(We,we)),we},fa=o.nodes.length<=250,La=new Map,io=o.nodes.length>1200&&o.zoom<.3,an=o.zoom>=.6,Fa=Ve>=3,nn=Ve<=0?1:Ve===1?2:Ve===2?4:8;o.edges.forEach((C,Te)=>{if(io)return;let We=Ye&&(C.sourceNodeId===Ye||C.targetNodeId===Ye);if(Ye){if(!We)return}else if(nn>1&&Te%nn!==0)return;let we=xe[C.sourceNodeId],_e=xe[C.targetNodeId];if(!we||!_e||!wa(we.x,we.y,10,Je)&&!wa(_e.x,_e.y,10,Je))return;if(W!=="all"){let Ia=o.domainById[C.sourceNodeId]&&o.domainById[C.sourceNodeId].kind,Pa=o.domainById[C.targetNodeId]&&o.domainById[C.targetNodeId].kind;if(Ia!==W&&Pa!==W)return}if(z){let Ia=o.domainById[C.sourceNodeId]&&(o.domainById[C.sourceNodeId].tags||[]).includes(z),Pa=o.domainById[C.targetNodeId]&&(o.domainById[C.targetNodeId].tags||[]).includes(z);if(!Ia&&!Pa)return}let at=_e.x-we.x,Xe=_e.y-we.y,et=Math.sqrt(at*at+Xe*Xe)||1,gt=Le||an||Ve>=2?0:Oe?10:16,pt=-Xe/et*gt,st=at/et*gt,Jt=(we.x+_e.x)/2+pt,Et=(we.y+_e.y)/2+st,Bt=St.colors[o.domainById[we.id]&&o.domainById[we.id].kind||"other"]||St.colors.other,ea=Ye?We?.72:.06:o.planetLayer?.22:Oe?.16:.2,sn=parseInt(Bt.slice(1,3),16),ln=parseInt(Bt.slice(3,5),16),cn=parseInt(Bt.slice(5,7),16),dn=Math.max(1,Number(C.weight)||1),co=We?1.6+Math.min(3.2,dn*.8):.7+Math.min(2.4,(dn-1)*.35),pn=Math.min(an||Ve>=1?1.2:1/0,Math.round(co*2)/2),mn=sn+","+ln+","+cn+","+ea+","+pn,sa=La.get(mn);sa||(sa={path:new Path2D,stroke:"rgba("+sn+","+ln+","+cn+","+ea+")",width:pn},La.set(mn,sa)),sa.path.moveTo(we.x,we.y),sa.path.quadraticCurveTo(Jt,Et,_e.x,_e.y)}),La.forEach(C=>{p.strokeStyle=C.stroke,p.lineWidth=C.width,p.stroke(C.path)});let ia=null;Ye&&(ia=new Set,o.edges.forEach(C=>{C.sourceNodeId===Ye?ia.add(C.targetNodeId):C.targetNodeId===Ye&&ia.add(C.sourceNodeId)}));let so=(C,Te={})=>{let We=it(C.name,Te.maxChars||16),we=1/o.zoom,_e="500 "+(11.5*we).toFixed(1)+"px -apple-system,Segoe UI,sans-serif";p.font=_e;let Xe=ga(_e,We)+14*we,et=17*we,gt=C.y+C.r+(Te.gap===void 0?8:Te.gap)*we,pt=!0;for(let st of on)if(C.x-Xe/2<st.x+st.w&&C.x+Xe/2>st.x&><st.y+st.h&>+et>st.y){pt=!1;break}return!pt&&!Te.force?!1:(on.push({x:C.x-Xe/2,y:gt,w:Xe,h:et}),p.fillStyle="rgba(20,24,30,0.78)",p.beginPath(),p.roundRect?p.roundRect(C.x-Xe/2,gt,Xe,et,4*we):p.rect(C.x-Xe/2,gt,Xe,et),p.fill(),p.strokeStyle="rgba(255,255,255,0.07)",p.lineWidth=1*we,p.stroke(),p.fillStyle=Te.strong?"#f2f5f8":"#aeb6c2",p.textAlign="center",p.textBaseline="top",p.fillText(We,C.x,gt+4.6*we),!0)},lo=(C,Te,We)=>{let we=1/o.zoom,{isSel:_e,isHov:at,dimmed:Xe}=We,et=C.r*o.zoom;p.save(),p.globalAlpha=Xe?.16:1;let gt="g|"+Te+"|"+Math.round(C.r),pt=Ft.get(gt);pt||(pt=p.createRadialGradient(0,0,C.r*.8,0,0,C.r*1.24),pt.addColorStop(0,Dt(Te,.18)),pt.addColorStop(.58,Dt(Te,.06)),pt.addColorStop(1,Dt(Te,0)),Ft.set(gt,pt)),p.save(),p.translate(C.x,C.y),!Fa&&(o.quality|0)<2&&(p.fillStyle=pt,p.beginPath(),p.arc(0,0,C.r*1.24,0,Math.PI*2),p.fill());let st=o.timeMode?Te:St.deep[C.type]||Te,Jt="b|"+st+"|"+Math.round(C.r),Et=Ct.get(Jt);if(Et||(Et=p.createRadialGradient(-C.r*.26,-C.r*.32,C.r*.12,0,0,C.r*1.1),Et.addColorStop(0,Vt(st,"#ffffff",.24,.9)),Et.addColorStop(.58,Dt(st,.86)),Et.addColorStop(1,Vt(st,"#000000",.34,.9)),Ct.set(Jt,Et)),p.beginPath(),p.arc(0,0,C.r,0,Math.PI*2),p.fillStyle="rgba(13,16,21,0.92)",p.fill(),p.beginPath(),p.arc(0,0,C.r,0,Math.PI*2),p.fillStyle=Et,p.fill(),p.beginPath(),p.arc(0,0,C.r-Math.max(.6,1.1*we),Math.PI*1.06,Math.PI*1.94),p.strokeStyle="rgba(255,255,255,0.14)",p.lineWidth=Math.max(.7,1.2*we),p.stroke(),p.beginPath(),p.arc(0,0,C.r,0,Math.PI*2),p.strokeStyle=Dt(Te,_e||at?.95:.58),p.lineWidth=Math.max(.8,1.1*we),p.stroke(),p.restore(),(_e||at)&&(p.save(),p.beginPath(),p.arc(C.x,C.y,C.r+(_e?7:5)*we,0,Math.PI*2),p.strokeStyle=_e?"rgba(255,122,69,0.9)":Dt(Te,.7),p.lineWidth=Math.max(1,1.2*we),_e&&p.setLineDash([5*we,4*we]),p.stroke(),p.restore()),p.restore(),_e||at||et>=11){let Bt=Math.max(9,Math.min(21,et*.42))*we,ea=et>=30;p.save(),p.textAlign="center",p.textBaseline="middle",p.shadowColor="rgba(0,0,0,0.5)",p.shadowBlur=(o.quality|0)>=2?0:5*we,ea&&(p.font="600 "+(Bt*.48).toFixed(1)+"px -apple-system,Segoe UI,sans-serif",p.fillStyle="rgba(255,255,255,0.72)",p.fillText(it(C.name,12),C.x,C.y-Bt*1.02)),p.font="700 "+Bt.toFixed(1)+"px -apple-system,Segoe UI,sans-serif",p.fillStyle="rgba(255,255,255,0.96)",p.fillText(zn(C.count,{unit:Y.current("graphCountWan"),locale:Y.current("graphCountLocale")}),C.x,C.y+(ea?Bt*.06:0)),ea&&(p.font="500 "+(Bt*.38).toFixed(1)+"px -apple-system,Segoe UI,sans-serif",p.fillStyle="rgba(255,255,255,0.5)",p.fillText(Y.current("graphCardsUnit"),C.x,C.y+Bt*.92)),p.restore()}},on=[],rn=[];if(o.nodes.forEach(C=>{if(!wa(C.x,C.y,C.r+2,Je))return;let Te=o.domainById[C.id]||{},We=Te.kind||"other",we=o.timeMode&&Te.updated?Cr(Te.updated):St.colors[We]||St.colors.other,_e=St.shapes[We]||"circle",at=o.selectedId===C.id,Xe=o.hoverId===C.id,et=o.searchTerm||"",gt=!et||(C.name||"").toLowerCase().includes(et)||String(rt[We]||"").toLowerCase().includes(et)||String(We).toLowerCase().includes(et),pt=W==="all"||We===W,st=!z||(Te.tags||[]).includes(z),Jt=Ye&&C.id!==Ye&&!(ia&&ia.has(C.id))||et&&!gt||!pt||!st;if(C.planet){rn.push({n:C,color:we,isSel:at,isHov:Xe,dimmed:Jt,ok:pt&&st});return}p.save(),p.globalAlpha=Jt?.08:1,(at||Xe)&&fa&&(p.shadowColor=we,p.shadowBlur=at?16:11),p.translate(C.x,C.y),Ge(0,0,C.r,_e),p.fillStyle=Fa?we:oa(we,C.r),p.fill(),(!Fa||at||Xe)&&(p.strokeStyle="rgba(255,255,255,0.16)",p.lineWidth=Math.max(.6,.8*(1/o.zoom)),p.stroke()),We==="core"&&(p.fillStyle="#1b120e",p.font="700 "+Math.max(10,Math.round(C.r*.95))+"px sans-serif",p.textAlign="center",p.textBaseline="middle",p.fillText("\u2605",0,0)),p.restore(),at?(p.save(),Ge(C.x,C.y,C.r+3,_e),p.strokeStyle=we,p.lineWidth=3,p.shadowColor=we,p.shadowBlur=12,p.stroke(),p.restore()):Xe?(p.save(),Ge(C.x,C.y,C.r+2,_e),p.strokeStyle=we,p.lineWidth=2,p.stroke(),p.restore()):et&>?(p.save(),Ge(C.x,C.y,C.r+2,_e),p.strokeStyle="#ffa06b",p.lineWidth=2,p.stroke(),p.restore()):o.multi.indexOf(C.id)>=0&&(p.save(),Ge(C.x,C.y,C.r+2,_e),p.strokeStyle="#60a5fa",p.lineWidth=2,p.shadowColor="#60a5fa",p.shadowBlur=8,p.stroke(),p.restore()),(at||Xe||!Le&&(Pt.has(C.id)&&o.zoom>Ke||!Oe&&o.zoom>.6||Ut&&Ut.has(C.id)))&&pt&&st&&so(C,{force:at||Xe})}),rn.forEach(C=>lo(C.n,C.color,C)),p.restore(),o.marquee){let C=o.marquee,Te=Math.min(C.sx,C.ex),We=Math.min(C.sy,C.ey),we=Math.abs(C.ex-C.sx),_e=Math.abs(C.ey-C.sy);p.save(),p.setLineDash([4,4]),p.strokeStyle="rgba(96,165,250,0.9)",p.lineWidth=1,p.fillStyle="rgba(96,165,250,0.12)",p.fillRect(Te,We,we,_e),p.strokeRect(Te,We,we,_e),p.restore()}if(o.hoverId&&ye.current){let C=o.domainById[o.hoverId],Te=o.nodes.find(function(We){return We.id===o.hoverId});if(C&&Te){let We=o.edges.filter(function(et){return et.sourceNodeId===C.id||et.targetNodeId===C.id}).length,we=Te.x*o.zoom+o.panX,_e=Te.y*o.zoom+o.panY;ye.current.style.display="block",ye.current.style.left=we+14+"px",ye.current.style.top=_e-6+"px";let at=Te.planet?Y.current("graphPlanetCards").replace("{n}",String(Te.count))+" \xB7 "+Y.current("graphEnter"):Y.current("connCount").replace("{n}",We),Xe=Y.current(rt[C.kind]||"kindKnowledge");ye.current.innerHTML="<b>"+T(C.title||C.name||"")+'</b><br/><span style="opacity:.8">'+T(Xe)+" \xB7 "+T(at)+"</span>"}}else ye.current&&(ye.current.style.display="none")},ee=0,Be=0,he=0,Re=()=>{o.lastInputAt=performance.now(),o.motionUntil=performance.now()+140,he&&k.clearTimeout(he),he=k.setTimeout(()=>{he=0,De()},160)},De=()=>{Be||(Be=k.raf(()=>{Be=0;let w=performance.now();try{$()}catch(z){$t(z,"render")}o.lastRenderMs=performance.now()-w}))};o.requestRender=De;let ut=()=>{ee>0||(o.alpha=Math.max(o.alpha||0,.35),o.running=!0,o.raf||(o.raf=k.raf(ne)))};o.wake=ut,o.render=$;let h=()=>{if(!Pe)return;o.planetsSrc!==o.nodes&&(o.planets=o.nodes.filter(z=>z.planet),o.planetsSrc=o.nodes);let w=o.planets;if(!(!w||!w.length)){for(let z=0;z<w.length;z++)for(let W=z+1;W<w.length;W++){let T=w[z],V=w[W],xe=V.x-T.x,Le=V.y-T.y,Oe=Math.sqrt(xe*xe+Le*Le)||1,Ke=24+Math.min(T.r,V.r)*.18,Ye=T.r+V.r+Ke;if(Oe>=Ye)continue;let Je=Ye-Oe,ot=xe/Oe,Ve=Le/Oe,Pt=T.r*T.r,Ut=V.r*V.r,kt=Pt+Ut,ga=Je*(Ut/kt),fa=Je*(Pt/kt);T.x-=ot*ga,T.y-=Ve*ga,V.x+=ot*fa,V.y+=Ve*fa,T.vx*=.55,T.vy*=.55,V.vx*=.55,V.vy*=.55}for(let z of w)for(let T of o.nodes){if(T.planet||T===o.dragNode)continue;let V=T.x-z.x,xe=T.y-z.y,Le=Math.sqrt(V*V+xe*xe)||1,Oe=V/Le,Ke=xe/Le,Ye=z.r+T.r+30,Je=Ye+12;if(Le>=Je)continue;let ot=Le;if(Le<Ye){T.x=z.x+Oe*Ye,T.y=z.y+Ke*Ye;let kt=T.vx*Oe+T.vy*Ke;kt<0&&(T.vx-=Oe*kt,T.vy-=Ke*kt),ot=Ye}let Ve=Math.min(1,(Je-ot)/12),Pt=(.28+z.r*.009)*Ve*Ve,Ut=T.vx*Oe+T.vy*Ke;if(Ut<Pt){let kt=(Pt-Ut)*.5;T.vx+=Oe*kt,T.vy+=Ke*kt}}}},j=()=>{let w=performance.now(),z=Tn(o,{params:o.forceParams,alphaFloor:o.drift?1:0,damping:o.drift?.8:void 0});h(),o.lastTickMs=performance.now()-w,o.lastRms=z.rms,o.autoFitPending&&o.tickCount>45&&(o.autoFitPending=!1,l())},ne=()=>{if(!o.running)return;let w=performance.now(),z=0;o.lastStepAt&&w-o.lastStepAt>0&&w-o.lastStepAt<120&&(z=w-o.lastStepAt,o.frameEma=o.frameEma?o.frameEma*.8+z*.2:z),o.lastStepAt=w,o.tickCount>30&&z>0&&(o.frameEma>17.8?o.perfBad=(o.perfBad||0)+z:o.perfBad=Math.max(0,(o.perfBad||0)-z*.5),o.perfBad>500&&(o.quality|0)<3&&(o.quality=(o.quality|0)+1,o.perfBad=0,o.frameEma=16.7),o.frameEma&&o.frameEma<13.5?o.goodMs=(o.goodMs||0)+z:o.goodMs=0,(o.goodMs||0)>4e3&&(o.quality|0)>0&&(o.quality=(o.quality|0)-1,o.goodMs=0));let W=performance.now()-(o.lastInputAt||0);if(o.drift&&(W>4e3||(o.quality|0)>=1&&W>1200)){o.drift=!1,o.running=!1,o.raf=0;return}!o.drift&&(o.quietTicks>_a||o.alpha===0&&o.tickCount>120)&&(o.quietTicks=0,o.drift=!0,o.alpha=Math.max(o.alpha||0,1),o.motionUntil=0,o.userTouched||l());try{let T=performance.now(),V=o.dragNode||o.drift?1:6,xe=0;do j(),xe+=1;while(!o.dragNode&&!o.drift&&xe<V&&performance.now()-T<18&&o.quietTicks<=_a);o.drift||(o.motionUntil=performance.now()+60);let Le=performance.now();$(),o.lastRenderMs=performance.now()-Le}catch(T){$t(T,"step")}o.raf=k.raf(ne)},Ne=()=>({nodes:o.nodes.length,edges:o.edges.length,planets:o.nodes.filter(w=>w.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,frames:o.renderFrames|0,quality:o.quality|0,frameEma:Math.round((o.frameEma||0)*10)/10});o.stats=Ne,globalThis.__meGraphStats=Ne;let Me=()=>{let w=x.getBoundingClientRect(),z=w.width?x.clientWidth/w.width:1,W=w.height?x.clientHeight/w.height:1;return{level:o.levelId||"",planetLayer:!!o.planetLayer,nodes:o.nodes.length,planets:o.nodes.filter(T=>T.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,drift:!!o.drift,frames:o.renderFrames|0,resources:k.snapshot(),screen:o.nodes.map(T=>({id:T.id,label:T.name,planet:!!T.planet,count:T.count||0,dir:T.orbitDir||0,scale:T.orbitScale?Math.round(T.orbitScale*100)/100:0,x:w.left+(T.x*o.zoom+o.panX)/z,y:w.top+(T.y*o.zoom+o.panY)/W,r:Math.max(4,T.r*o.zoom/z)}))}};o.runtime=Me,globalThis.__meGraphRuntime=Me;let ve=(w,z)=>{let W=x.getBoundingClientRect(),T=W.width?x.clientWidth/W.width:1,V=W.height?x.clientHeight/W.height:1;return{x:(w-W.left)*T,y:(z-W.top)*V}},Ze=(w,z)=>{let W=ve(w,z);return{x:(W.x-o.panX)/o.zoom,y:(W.y-o.panY)/o.zoom}},wt=w=>{let z=o.domainById[w];return!(!z||D.current!=="all"&&z.kind!==D.current||O.current&&!(z.tags||[]).includes(O.current))},Mt=(w,z,W)=>Math.max(z,Math.min(W,w)),It=w=>{o.mouseX=w.clientX,o.mouseY=w.clientY;let z=Ze(w.clientX,w.clientY),W=null;for(let T=o.nodes.length-1;T>=0;T--){let V=o.nodes[T];if(!wt(V.id))continue;let xe=V.x-z.x,Le=V.y-z.y;if(xe*xe+Le*Le<V.r*V.r+36){W=V.id;break}}W!==o.hoverId&&(o.hoverId=W,o.motionUntil=performance.now()+140,De())},Tt=w=>{if(w.button!==0)return;let z=Ze(w.clientX,w.clientY),W=null;for(let T=o.nodes.length-1;T>=0;T--){let V=o.nodes[T];if(!wt(V.id))continue;let xe=V.x-z.x,Le=V.y-z.y;if(xe*xe+Le*Le<V.r*V.r+25){W=V;break}}if(w.shiftKey){if(W){o.shiftClick=W.id;return}o.marquee={sx:w.clientX,sy:w.clientY,ex:w.clientX,ey:w.clientY};return}o.userTouched=!0,o.dragStart={x:w.clientX,y:w.clientY,px:o.panX,py:o.panY},o.dragging=!1,o.dragNode=W||null,W&&(o.dragOffset={dx:W.x-z.x,dy:W.y-z.y})},Aa=w=>{if(o.marquee){o.marquee.ex=w.clientX,o.marquee.ey=w.clientY,Re(),De();return}if(!o.dragStart)return;let z=w.clientX-o.dragStart.x,W=w.clientY-o.dragStart.y;if(Math.abs(z)+Math.abs(W)>3&&!o.dragging&&(o.dragging=!0,o.dragNode&&(o.alpha=Math.max(o.alpha||0,.35))),o.dragNode){let T=Ze(w.clientX,w.clientY);o.dragNode.x=T.x+o.dragOffset.dx,o.dragNode.y=T.y+o.dragOffset.dy,Re(),ut()}else o.dragging&&(o.panX=Mt(o.dragStart.px+z,-1e5,1e5),o.panY=Mt(o.dragStart.py+W,-1e5,1e5),Re(),De())},Ra=w=>{if(o.marquee){let T=o.marquee;o.marquee=null;let V=ve(T.sx,T.sy),xe=ve(T.ex,T.ey),Le=Math.min(V.x,xe.x),Oe=Math.max(V.x,xe.x),Ke=Math.min(V.y,xe.y),Ye=Math.max(V.y,xe.y),Je=o.nodes.filter(ot=>!ot.planet&&wt(ot.id)).filter(ot=>{let Ve=ot.x*o.zoom+o.panX,Pt=ot.y*o.zoom+o.panY;return Ve>=Le&&Ve<=Oe&&Pt>=Ke&&Pt<=Ye}).map(ot=>ot.id);o.multi=Je,ce(Je),Re(),De();return}let z=o.dragStart&&!o.dragging,W=!!o.dragNode&&!!o.dragging;if(o.shiftClick){let T=o.shiftClick;o.shiftClick=null;let V=o.nodeById.get(T);if(V&&V.planet){o.selectedId=T,je(T),De();return}let xe=Array.isArray(o.multi)?o.multi.slice():[];xe.includes(T)||xe.push(T),o.multi=xe,ce(xe),De();return}if(z){let T=Ze(w.clientX,w.clientY),V=null;for(let xe=o.nodes.length-1;xe>=0;xe--){let Le=o.nodes[xe];if(!wt(Le.id))continue;let Oe=Le.x-T.x,Ke=Le.y-T.y;if(Oe*Oe+Ke*Ke<Le.r*Le.r+20){V=Le;break}}if(V&&V.planet){o.selectedId=null,je(null),De(),o.dragStart=null,o.dragging=!1,o.dragNode=null,fe.current&&fe.current(V.id);return}V?o.selectedId===V.id?(o.selectedId=null,je(null),De()):(o.selectedId=V.id,je(V.id),De()):(o.selectedId=null,o.hoverId=null,w.shiftKey||(o.multi=[],ce([])),je(null),De())}o.dragStart=null,o.dragging=!1,o.dragNode=null,W&&ut()},ao=w=>{w.preventDefault();let z=Ze(w.clientX,w.clientY),W=null;for(let T=o.nodes.length-1;T>=0;T--){let V=o.nodes[T];if(!wt(V.id))continue;let xe=V.x-z.x,Le=V.y-z.y;if(xe*xe+Le*Le<V.r*V.r+25){W=V;break}}if(W){let T=o.domainById[W.id];T&&m({x:w.clientX,y:w.clientY,id:W.id,path:T.id,title:T.title,planet:!!W.planet,count:W.count||0})}else m(null)},no=w=>{w.preventDefault();let z=ve(w.clientX,w.clientY),W=(z.x-o.panX)/o.zoom,T=(z.y-o.panY)/o.zoom,V=Math.max(Zt,Math.min(3,o.zoom*(w.deltaY<0?_t:1/_t)));o.panX=Mt(o.panX+W*(o.zoom-V),-1e5,1e5),o.panY=Mt(o.panY+T*(o.zoom-V),-1e5,1e5),o.zoom=V,o.userTouched=!0,Re(),De()};k.listen(x,"mousemove",It),k.listen(x,"mousedown",Tt),k.listen(window,"mousemove",Aa),k.listen(window,"mouseup",Ra),k.listen(x,"wheel",no,{passive:!1}),k.listen(x,"contextmenu",ao),F.current=()=>{o.selectedId=null,o.hoverId=null,o.multi=[],ce([]),o.userTouched=!1,l(),Re(),De()},ee=Mn(o.nodes.length);let ra=ee,oo=()=>ra>0?Math.round((ra-ee)/ra*100):100;ee>0&&Se(0);let za=ra>0?[.75,.5,.25].map(w=>Math.round(ra*w)):[],Da=()=>{if(!o.running)return;let w=performance.now();for(;ee>0&&performance.now()-w<12;)j(),ee--;if(Se(ee>0?Math.min(99,oo()):100),za.length&&ee<=za[0]){za.shift(),o.userTouched||l();try{$()}catch(z){$t(z,"warm-frame")}}if(ee>0){o.userTouched||l(),o.warmRaf=k.raf(Da);return}o.warmRaf=0,o.userTouched||l();try{$()}catch(z){$t(z,"warm-final")}Se(null),ut()};o.warmStep=Da,l();try{$()}catch(w){$t(w,"first-frame")}ee>0?o.warmRaf=k.raf(Da):(Se(0),ut());let ro=()=>te(!1);return k.listen(window,"mousedown",ro),()=>{if(o.running=!1,k.releaseAll(),globalThis.__meGraphStats===Ne)try{delete globalThis.__meGraphStats}catch{globalThis.__meGraphStats=void 0}if(globalThis.__meGraphRuntime===Me)try{delete globalThis.__meGraphRuntime}catch{globalThis.__meGraphRuntime=void 0}try{Yt.disconnect()}catch{}}},[I,K,Z]),(0,r.useEffect)(()=>{je(null),ce([]),m(null);let x=R.current;x&&(x.selectedId=null,x.multi=[])},[Z]),(0,r.useEffect)(()=>{M!==void 0&&J.current&&requestAnimationFrame(()=>{try{J.current()}catch(x){$t(x,"fit")}})},[M]),(0,e.jsxs)("div",{className:"me-graph",ref:H,children:[(0,e.jsxs)("div",{className:"me-graph-toolbar",children:[(0,e.jsxs)("label",{className:"me-graph-search",children:[(0,e.jsxs)("svg",{className:"ico",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6","aria-hidden":"true",children:[(0,e.jsx)("circle",{cx:"7",cy:"7",r:"4.4"}),(0,e.jsx)("path",{d:"m10.4 10.4 3.2 3.2",strokeLinecap:"round"})]}),(0,e.jsx)("input",{type:"text",placeholder:u("search"),value:ge,onChange:x=>Ae(x.target.value),"aria-label":u("search")})]}),(0,e.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,e.jsxs)("button",{type:"button",className:"me-gtool"+(Q!=="all"||se||L?" on":""),onClick:()=>te(x=>!x),"aria-expanded":qe,title:u("filterLabel"),children:[u("filterLabel"),Q!=="all"||se||L?(0,e.jsx)("span",{className:"badge","aria-hidden":"true"}):(0,e.jsx)("span",{className:"caret","aria-hidden":"true",children:"\u25BE"})]}),qe&&(0,e.jsx)("div",{className:"me-graph-legend-pop",onMouseDown:x=>x.stopPropagation(),style:{position:"absolute",top:"calc(100% + 8px)",left:0,zIndex:50,background:"rgba(24,28,34,0.97)",backdropFilter:"blur(16px)",WebkitBackdropFilter:"blur(16px)",color:"#e5e9ef",border:"1px solid rgba(255,255,255,0.08)",borderRadius:11,padding:8,minWidth:236,boxShadow:"0 18px 44px rgba(0,0,0,.5)"},children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[(0,e.jsx)("button",{type:"button",className:`lg${Q==="all"&&!se?" active":""}`,onClick:()=>{$e("all"),Ie(!1)},children:u("all")}),Object.keys(ft).map(x=>(0,e.jsxs)("button",{type:"button",className:`lg${Q===x?" active":""}`,onClick:()=>$e(p=>p===x?"all":x),children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:St.colors[x]||ft[x]}}),u(rt[x])]},x)),(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.07)",margin:"5px 0"}}),(0,e.jsxs)("button",{type:"button",className:`lg${se?" active":""}`,onClick:()=>Ie(x=>!x),children:["\u23F1 ",u("timeDim")]}),B.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.07)",margin:"5px 0"}}),(0,e.jsx)("div",{style:{maxHeight:130,overflow:"auto",display:"flex",flexWrap:"wrap",gap:4,padding:"1px 1px 2px"},children:B.map(x=>(0,e.jsxs)("button",{type:"button",className:`lg${L===x.tag?" active":""}`,style:{width:"auto",color:"#b9c0ca",padding:"2px 7px",fontSize:10.5,border:"1px solid rgba(255,255,255,.07)"},onClick:()=>c(p=>p===x.tag?"":x.tag),title:x.tag,children:["#",x.tag," ",(0,e.jsx)("span",{style:{opacity:.55},children:x.n})]},x.tag))})]}),(Q!=="all"||se||L)&&(0,e.jsxs)("button",{type:"button",className:"lg lg-clear",style:{color:"#f87171"},onClick:()=>{$e("all"),Ie(!1),c("")},children:[u("clearFilter")," \u2715"]})]})})]}),(0,e.jsxs)("label",{className:"me-gswitch"+(N?" on":""),title:u("crossVault"),children:[(0,e.jsx)("input",{type:"checkbox",checked:!!N,onChange:x=>v&&v(x.target.checked)}),(0,e.jsx)("span",{className:"track","aria-hidden":"true"}),(0,e.jsx)("span",{children:u("crossVault")})]}),(0,e.jsx)("button",{type:"button",className:"me-gtool"+(se?" on":""),"aria-pressed":se,onClick:()=>Ie(x=>!x),children:u("timeDim")}),(0,e.jsx)("span",{className:"me-gdiv","aria-hidden":"true"}),(0,e.jsx)("button",{type:"button",className:"me-gtool",onClick:()=>{let x=q.current;if(x)try{x.toBlob(p=>{p&&le({url:URL.createObjectURL(p),blob:p})},"image/png")}catch{}},children:u("exportGraph")}),(0,e.jsx)("button",{type:"button",className:"me-gtool",onClick:()=>J.current&&J.current(),children:u("fit")}),(0,e.jsx)("button",{type:"button",className:"me-gtool",onClick:()=>{je(null),$e("all"),F.current&&F.current()},children:u("reset")})]}),(0,e.jsxs)("div",{className:"me-graph-canvas",style:{position:"relative",overflow:"hidden"},children:[(0,e.jsx)("canvas",{ref:q,style:{width:"100%",height:"100%",display:"block",cursor:"grab"}}),(0,e.jsx)(Sr,{crumbs:a,t:u,onPick:g,busy:y}),f&&(0,e.jsxs)("div",{className:"me-graph-levelerr",role:"alert",children:[(0,e.jsx)("span",{style:{flex:"none",fontWeight:800},children:f.timeout?"\u23F1":"\u2715"}),(0,e.jsx)("span",{className:"msg",children:(f.timeout?u("graphLevelTimeout").replace("{ms}",String(1600)):u("graphLevelError"))+"\uFF1A"+f.message}),(0,e.jsx)("button",{type:"button",onClick:()=>S&&S(),children:u("graphRetry")})]}),!f&&y&&(0,e.jsxs)("div",{className:"me-graph-levelbusy",role:"status","aria-live":"polite",children:[(0,e.jsx)(ua,{small:!0}),u("graphLevelLoading")]}),ze!==null&&(0,e.jsxs)("div",{role:"status","aria-live":"polite",style:{position:"absolute",left:"50%",top:14,transform:"translateX(-50%)",zIndex:3,display:"flex",alignItems:"center",gap:9,padding:"6px 12px",borderRadius:999,background:"rgba(23,27,33,0.9)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",color:"#e8ebf0",fontSize:11,fontWeight:500,letterSpacing:".01em",pointerEvents:"none",border:"1px solid rgba(255,255,255,0.07)",boxShadow:"0 10px 26px rgba(0,0,0,.3)"},children:[(0,e.jsx)(ua,{value:ze,small:!0}),(0,e.jsxs)("span",{children:[u("graphWarming").replace("{n}",U.length)," \xB7 ",Math.round(ze),"%"]})]}),(0,e.jsxs)("div",{className:"mc-v5-graph-legend",children:[(0,e.jsx)("div",{className:"mc-v5-graph-legend-title",children:u("graphLegendTitle")}),Object.keys(St.colors).filter(x=>P[x]).map(x=>(0,e.jsxs)("div",{className:"mc-v5-graph-legend-row",children:[(0,e.jsx)("i",{style:{background:St.colors[x],boxShadow:"0 0 0 3px "+St.colors[x]+"24"}}),(0,e.jsx)("span",{children:u(rt[x]||"kindKnowledge")}),(0,e.jsx)("b",{children:P[x]})]},x))]}),(0,e.jsx)("div",{className:"me-graph-tooltip",ref:ye,style:{display:"none",position:"absolute",zIndex:4,pointerEvents:"none",background:"rgba(24,28,34,0.94)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",color:"#e6eaf0",border:"1px solid rgba(255,255,255,0.08)",borderRadius:9,padding:"8px 10px",fontSize:11.5,maxWidth:220,boxShadow:"0 12px 30px rgba(0,0,0,.34)"}}),me&&(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:u("noMatch")}),X&&(0,e.jsx)("div",{className:"me-graph-ctx-back",style:{position:"fixed",inset:0,zIndex:30},onMouseDown:()=>m(null)}),X&&(0,e.jsxs)("div",{className:"me-graph-ctxmenu",style:{position:"fixed",left:X.x,top:X.y,zIndex:31},onMouseDown:x=>x.stopPropagation(),children:[X.planet&&(0,e.jsxs)("button",{type:"button",onClick:()=>{let x=X.id;m(null),fe.current&&fe.current(x)},children:[u("graphEnter")," \u203A"]}),X.planet&&(0,e.jsx)("div",{style:{padding:"4px 10px 6px",fontSize:11,opacity:.7},children:u("graphPlanetCards").replace("{n}",String(X.count||0))}),!X.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{_.current({path:X.path,title:X.title}),m(null)},children:u("openCard")}),!X.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{X.id&&(R.current.selectedId=X.id,je(X.id)),m(null);let x=R.current;x&&x.requestRender&&x.requestRender()},children:u("focusNeighbors")}),(0,e.jsx)("button",{type:"button",onClick:()=>{try{navigator.clipboard&&navigator.clipboard.writeText(X.title||"")}catch{}m(null),Ue(u("copied"))},children:u("copyName")}),!X.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{let x=R.current,p=x&&Array.isArray(x.multi)?x.multi.slice():[],de=X.id;if(de&&!p.includes(de)&&p.push(de),m(null),p.length<2){Ue(u("mergeNeed"),!1);return}if(!window.confirm(u("mergeConfirm")))return;let Ee=ue.current&&ue.current(p);Ee&&Ee.then?Ee.then(b=>b?Ue(u("merged")):Ue(u("mergeFail"),!1)).catch(()=>Ue(u("mergeFail"),!1)):Ee&&Ue(u("merged"))},children:u("merge")}),!X.planet&&(0,e.jsx)("button",{type:"button",style:{color:"#f87171"},onClick:()=>{let x=X.path;m(null),window.confirm(u("deleteConfirm"))&&(async()=>{try{(ae.current?await ae.current(x):!1)?Ue(u("deleted")):Ue(u("deleteFail"),!1)}catch{Ue(u("deleteFail"),!1)}})()},children:u("delete")})]}),be.length>0&&(0,e.jsxs)("div",{style:{position:"absolute",left:"50%",bottom:52,transform:"translateX(-50%)",zIndex:3,display:"flex",gap:8,alignItems:"center",background:"rgba(24,28,34,0.94)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",color:"#e6eaf0",border:"1px solid rgba(255,255,255,0.08)",borderRadius:11,padding:"7px 11px",fontSize:11.5,boxShadow:"0 14px 34px rgba(0,0,0,.4)"},children:[(0,e.jsxs)("span",{style:{fontWeight:700},children:[be.length," ",u("nodes")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let p=be.map(k=>Ce[k]).filter(Boolean).map(k=>k.title||k.name).join(`
|
|
1154
|
-
`),
|
|
1242
|
+
${t("quoteHint")}`,children:[(0,e.jsxs)("span",{className:"mc-quote-tag",children:[t("navQuotes")," \xB7 ",c+1,"/",Sa.length]}),(0,e.jsx)("span",{className:"mc-quote-text",children:Sa[c]},c),(0,e.jsx)("span",{className:"mc-quote-src",children:jn})]})]}),(0,e.jsxs)("div",{className:"mc-main",ref:Yt,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:[f.length," / ",kt]})]}),P==="cards"&&(0,e.jsx)(Yo,{t,notify:(x,B)=>ee({ok:x,msg:B}),onPromoted:()=>{qe(),$e()}}),P==="cards"&&(0,e.jsxs)("div",{className:"mc-toolbar",children:[(0,e.jsx)("input",{type:"text",placeholder:t("searchPlaceholder"),value:D,onChange:x=>oa(x.target.value)}),de&&(0,e.jsxs)("button",{type:"button",className:"mc-chip active",title:t("clearFilter"),onClick:()=>Wt(""),children:["\u{1F3F7} ",de," ",(0,e.jsx)("span",{style:{opacity:.7},children:"\u2715"})]}),(0,e.jsx)("input",{ref:pe,type:"file",accept:".json,application/json",style:{display:"none"},onChange:Ee}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>pe.current&&pe.current.click(),children:t("importVault")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>h({kind:"knowledge",title:"",body:"",tags:"",template:""}),children:["+ ",t("newCard")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:J,onClick:Be,title:t("skillCardsHint"),children:J?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:Ae,onClick:()=>me("md"),children:t(Ae?"exporting":"exportVault")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:Ae,onClick:()=>me("json"),children:t(Ae?"exporting":"exportJson")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>qe(),children:t("refresh")})]}),P==="cards"&&(0,e.jsxs)("div",{className:"mc-chips",children:[Ma.map(x=>(0,e.jsxs)("button",{type:"button",className:`mc-chip${R===x?" active":""}`,onClick:()=>Lt(x),children:[t(x==="all"?"all":it[x]),(0,e.jsx)("span",{className:"mc-chip-n",children:x==="all"?s?.total??0:s?.byKind?.[x]??0})]},x)),(0,e.jsxs)("button",{type:"button",className:`mc-chip${Z?" active":""}`,onClick:()=>fe(x=>!x),children:["\u{1F4CC} ",t("pinnedOnly"),(0,e.jsx)("span",{className:"mc-chip-n",children:Y.size})]}),(0,e.jsxs)("select",{value:ge,onChange:x=>oe(x.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")]}),Vn(Ie).map(x=>(0,e.jsx)("option",{value:x,children:x},x))]}),(0,e.jsxs)("select",{value:q,onChange:x=>_(x.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(x=>(0,e.jsx)("button",{type:"button",className:`mc-chip${Q===x.key?" active":""}`,onClick:()=>_e(x.key),children:x.label},x.key))]}),$&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",$]}),(0,e.jsx)("div",{style:{display:P==="cards"?"contents":"none"},children:u?(0,e.jsx)(to,{text:t("loading")}):$?(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",$," ",(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>qe(),children:t("retry")})]}):f.length===0?(0,e.jsx)("div",{className:"mc-empty",children:t("empty")}):(0,e.jsxs)(e.Fragment,{children:[ct&&(0,e.jsxs)("div",{className:"mc-v5-feature",onClick:()=>X(at),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:at.title}),(0,e.jsx)("p",{children:tn(at)}),(0,e.jsxs)("div",{className:"mc-v5-feature-meta",children:[(0,e.jsxs)("span",{children:[Gt[at.kind]||"\u{1F4CE}"," ",t(it[at.kind]||"kindKnowledge")]}),(0,e.jsxs)("span",{children:["\u{1F552} ",Ht(at.updated)]}),(at.tags||[]).slice(0,3).map(x=>(0,e.jsxs)("span",{children:["#",x]},x))]})]}),(0,e.jsxs)("div",{className:"mc-v5-feature-side",children:[(0,e.jsx)(eo,{n:tt[at.path]||0,color:ft[at.kind]||ft.other,size:58}),(0,e.jsx)("b",{children:tt[at.path]||0}),(0,e.jsx)("span",{children:t("links")}),(0,e.jsx)("button",{type:"button",className:"mc-v5-feature-shuffle",onClick:x=>{x.stopPropagation(),_t()},children:t("reshuffle")}),(0,e.jsx)("span",{className:"mc-v5-feature-open",children:t("openArrow")})]})]}),(0,e.jsx)("div",{className:"mc-grid",children:he.filter(x=>!ct||x.path!==at.path).map(x=>(0,e.jsx)(fr,{card:x,t,query:D.trim(),onOpen:X,onDelete:Ot,onTagClick:Wt,pinned:Y.has(x.path),onPin:ue,onCore:l,links:tt[x.path]||0},x.path))}),f.length<kt&&(0,e.jsx)("div",{ref:Kt,style:{height:1}}),ht&&(0,e.jsxs)("div",{className:"mc-empty",style:{padding:"10px 0"},children:[t("loading"),"\uFF08",f.length," / ",kt,"\uFF09"]})]})}),(0,e.jsx)("div",{style:{display:P==="graph"?"flex":"none",flex:1,minHeight:0},children:xe.has("graph")&&(0,e.jsx)(kr,{t,onOpen:X,all:ke,onAllChange:le,onMutate:$e,active:P==="graph",visible:P==="graph"})}),(0,e.jsx)("div",{style:{display:P==="news"?"contents":"none"},children:xe.has("news")&&(0,e.jsx)(pr,{t,version:M,onUnreadChange:F})}),(0,e.jsx)("div",{style:{display:P==="terminal"?"contents":"none"},children:xe.has("terminal")&&(0,e.jsx)(Ko,{t})}),(0,e.jsx)("div",{style:{display:P==="config"?"contents":"none"},children:xe.has("config")&&(0,e.jsx)(Jn,{t,onReload:()=>qe(),version:M})}),(0,e.jsx)("div",{style:{display:P==="stats"?"contents":"none"},children:xe.has("stats")&&(0,e.jsx)(br,{t,tab:"stats",onReload:()=>qe(),version:M})}),(0,e.jsx)("div",{style:{display:P==="audit"?"contents":"none"},children:xe.has("audit")&&(0,e.jsx)(Qo,{t,onReload:()=>{qe(),$e()},version:M})}),(0,e.jsx)("div",{style:{display:P==="optimize"?"contents":"none"},children:xe.has("optimize")&&(0,e.jsx)(ur,{t,onReload:()=>{qe(),$e()},version:M})}),C&&(0,e.jsx)(yr,{t,onClose:()=>se(!1)}),te&&(0,e.jsx)(xr,{t,tab:ot,onTab:st,onClose:()=>Se(!1),onFeedback:()=>{Se(!1),se(!0)},onReplay:()=>{Se(!1),Rt(!0)}}),yt&&(0,e.jsx)(vr,{t,onDone:Mt}),ie&&(0,e.jsx)(wr,{t,card:ie,query:D.trim(),onNavigate:x=>{let B=he.findIndex(Ce=>Ce.path===ie.path),ae=he[B+x];ae&&X(ae)},onTagClick:Wt,onClose:()=>ze(null),onDelete:x=>{ze(null),Ot(x)},onFeedback:x=>{let B=ie.path;fetch(`${K}/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:D.trim(),path:B,useful:x})}).then(()=>ee({ok:!0,msg:t(x?"fbUseful":"fbIrr")})).catch(()=>{}),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>ee(null),2e3)},allCards:he,onOpenRelated:x=>X(x),onKindChange:l,onSaved:async({path:x,status:B,title:ae})=>{try{let Ce=B&&B!=="approved"?`&status=${encodeURIComponent(B)}`:"",Me=await fetch(`${K}/card?path=${encodeURIComponent(x)}${Ce}`).then(ve=>ve.json());Me&&Me.ok&&ze(ve=>ve&&ve.path===x?{...ve,title:ae||Me.title||ve.title,text:Me.text}:ve)}catch{}await qe(),$e(),ee({ok:!0,msg:t("editSaved")}),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>ee(null),2e3)}}),(0,e.jsx)(hr,{t,newCard:Le,setNewCard:h,onCreated:()=>{qe(),$e(),ee({ok:!0,msg:t("created")}),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>ee(null),2e3)}})]})]})]})}var Ta=({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 Qa=(0,r.createContext)({form:null,set:()=>{}}),Xo=new Set(["autoRestartOnDrift","coreMemoryEnabled","skillCardsAutoSync","workingMemoryEnabled"]);function Xe({k:t,label:a,hint:n,type:i="text",step:s,min:m,max:b,wide:k}){let{form:f,set:y}=(0,r.useContext)(Qa);return(0,e.jsxs)("label",{className:"mc-field"+(k?" mc-field-wide":""),children:[(0,e.jsx)("span",{className:"mc-field-label",children:a||t}),(0,e.jsx)("input",{type:i,step:s,min:m,max:b,value:f?f[t]??"":"",onChange:u=>{let v=u.target.value;y(t,i==="number"?v===""?"":Number(v):v)}}),n?(0,e.jsx)("span",{className:"mc-field-hint",children:n}):null]})}function ut({k:t,label:a}){let{form:n,set:i}=(0,r.useContext)(Qa),s=n?n[t]:void 0,m=s===void 0?Xo.has(t):!!s;return(0,e.jsxs)("label",{className:"mc-switch",children:[(0,e.jsx)("input",{type:"checkbox",checked:m,onChange:b=>i(t,b.target.checked)}),(0,e.jsx)("span",{children:a||t})]})}function At({icon:t,title:a,sub:n,id:i,children:s,hidden:m}){return(0,e.jsxs)("section",{className:"mc-card mc-cfg-sec",id:i,"data-cfg-sec":i||"",hidden:m||void 0,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",{className:"mc-cfg-sec-body",children:s})]})}function Jn({t,onReload:a,version:n,compact:i}){let[s,m]=(0,r.useState)("general"),b={"sec-preset":"general","sec-basic":"general","sec-skills":"general","sec-digest":"general","sec-ui":"general","sec-memory":"memory","sec-core":"memory","sec-vault":"memory","sec-cost":"advanced","sec-audit":"advanced","sec-service":"service"},k=[["general",t("paneGeneral"),t("paneGeneralSub"),"\u2699\uFE0F"],["memory",t("paneMemory"),t("paneMemorySub"),"\u{1F9E0}"],["advanced",t("paneAdvanced"),t("paneAdvancedSub"),"\u2728"],["service",t("paneService"),t("paneServiceSub"),"\u{1F6E0}"]],f=k.find(l=>l[0]===s)||k[0],y=l=>{m(l),ie.current&&(ie.current.scrollTop=0);let X=typeof document<"u"?document.querySelector('.mc-pagebtn[data-page="'+l+'"]'):null;X&&X.scrollIntoView({inline:"center",block:"nearest"})},u=l=>({hidden:b[l]!==s}),[v,N]=(0,r.useState)(null),[z,$]=(0,r.useState)(0),[j,R]=(0,r.useState)(null),[I,D]=(0,r.useState)(null),[W,ge]=(0,r.useState)(!1),[oe,q]=(0,r.useState)(!1),_=(0,r.useRef)(!1),Y=(0,r.useRef)(null),G=(0,r.useRef)({}),[Z,fe]=(0,r.useState)(null),[ue,de]=(0,r.useState)(null),[Re,P]=(0,r.useState)(""),[be,xe]=(0,r.useState)(""),[Ue,ce]=(0,r.useState)(""),[Q,_e]=(0,r.useState)(null),[Fe,ee]=(0,r.useState)(null),[p,E]=(0,r.useState)(null),S=(0,r.useCallback)(async(l,X=!1)=>{X||xe("version");try{let me=await fetch(K+"/version-check"+(l?"?force=1":"")).then(Ee=>Ee.json());me&&me.ok?(E(me),l&&C(me.updateAvailable?t("vcLatest")+" v"+me.latest:t("vcUpToDate"))):l&&C(t("vcCheckFail"),!1)}catch{l&&C(t("vcCheckFail"),!1)}finally{X||xe("")}},[t]);(0,r.useEffect)(()=>{S(!1);let l=setInterval(()=>{S(!1,!0)},6e4),X=()=>{typeof document<"u"&&!document.hidden&&S(!1,!0)};return document.addEventListener("visibilitychange",X),()=>{clearInterval(l),document.removeEventListener("visibilitychange",X)}},[n,S]);let[O,pe]=(0,r.useState)(""),[Ae,ne]=(0,r.useState)(null),[J,d]=(0,r.useState)(""),[H,F]=(0,r.useState)(!1),ie=(0,r.useRef)(null),ze=(0,r.useRef)(0),ke=l=>{ze.current=l.currentTarget.scrollTop};(0,r.useLayoutEffect)(()=>{let l=ie.current;l&&Math.abs(l.scrollTop-ze.current)>1&&(l.scrollTop=ze.current)});let le=(0,r.useRef)(null),C=(l,X=!0)=>{le.current&&clearTimeout(le.current),ne({msg:l,ok:X}),le.current=setTimeout(()=>ne(null),1900)},se=async()=>{if(!be){xe("restart");try{let l=await fetch(K+"/restart-self",{method:"POST"});if(l.status===404||l.status===405){C(g("vcRestartNoRoute",{cmd:p&&p.restartCommand||"dsh-memory restart --port 7999"}),!1);return}let X=await l.json().catch(()=>null);if(!X){C(t("vcRestartFail")+"\uFF08HTTP "+l.status+"\uFF09",!1);return}if(!X.ok){C(X.error||t("vcRestartFail"),!1);return}if(X.alreadyCurrent){C(X.note||t("vcRestartCurrent"));return}C(X.note||t("vcRestartSent")),X.alreadyRunning||setTimeout(()=>{S(!0)},6e3)}catch(l){C(t("vcRestartFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{xe("")}}},te=p&&p.resident?String(p.resident.served||""):"",Se=!!(p&&p.onDisk&&te&&te!==p.onDisk),ot=!!(p&&p.resident&&p.resident.managed===!1&&p.resident.managedKnown===!1),st=p&&p.resident&&p.resident.replaceBlocked&&p.resident.replaceBlocked.fresh||null,yt=!!(p&&p.resident&&p.resident.managedBy==="host"),Rt=!!(p&&p.resident&&p.resident.managed===!1&&!ot&&!yt),Mt=!!(p&&p.resident&&!te),xt=Se||Mt||Rt||ot,je=bn({hasVersion:!!p,hostVersion:p?p.loaded:"",onDisk:p?p.onDisk:"",residentServed:p&&p.resident?p.resident.served:"",residentPresent:!!(p&&p.resident),residentManaged:p&&p.resident?p.resident.managed:null,residentManagedKnown:p&&p.resident?p.resident.managedKnown:null,residentManagedBy:p&&p.resident?p.resident.managedBy:"",replaceBlocked:p&&p.resident?p.resident.replaceBlocked:null}),Dt={hostProcessStale:()=>g("vcHostProcessStale",{disk:p.onDisk,loaded:p.loaded}),residentDown:()=>g("vcResidentDown",{port:p.resident&&p.resident.port||"",cmd:p.restartCommand||"dsh-memory restart --port 7999"}),residentReplaceBlocked:()=>g("vcResidentReplaceBlocked",{served:te,err:st&&st.error||"",path:st&&st.lockPath||"",cmd:p.restartCommand||"dsh-memory restart --port "+(p.resident&&p.resident.port||7999)}),residentLockUnknown:()=>g("vcResidentLockUnknown",{served:te,path:p.resident&&p.resident.lock&&p.resident.lock.path||"",err:p.resident&&p.resident.lock&&p.resident.lock.error||""}),residentUnmanaged:()=>g("vcResidentUnmanaged",{served:te,cmd:p.restartCommand||"dsh-memory restart --port 7999"})},Ne={restartStart:()=>g("vcRestartStart",{disk:p&&p.onDisk||""}),restartRepair:()=>g("vcRestartRepair",{disk:p&&p.onDisk||""}),restartFixes:()=>g("vcRestartFixes",{served:te||"",disk:p&&p.onDisk||""}),restartHostOnly:()=>g("vcRestartHostOnly",{loaded:p&&p.loaded||"",disk:p&&p.onDisk||""}),restartAnyway:()=>g("vcRestartAnyway",{ver:p&&p.onDisk||""})},g=(l,X)=>Object.keys(X).reduce((me,Ee)=>me.split("{"+Ee+"}").join(X[Ee]),t(l)),c=(0,r.useCallback)(async()=>{try{let[l,X,me,Ee]=await Promise.all([fetch(`${K}/config`).then(Be=>Be.json()).catch(()=>null),fetch(`${K}/setup-status`).then(Be=>Be.json()).catch(()=>null),fetch(`${K}/budget`).then(Be=>Be.json()).catch(()=>null),fetch(`${K}/llm-routes`).then(Be=>Be.json()).catch(()=>null)]);if(Ee&&Ee.ok&&ee(Ee),l&&l.ok){N(l),$(l.revision??0),R(l.schema??null);let Be=Bn(l.config??{},G.current);G.current=Be.overlay,D({...Be.values}),F(!1),fe(l.dsh??null),ge(l.writable===!1),q(l.viaPending===!0),P(""),_.current=!1}else me&&me.ok?(D({...me}),F(!1),ge(!0),P(t("configNeedsDsh"))):P(t("adminLoadFail"));X&&X.ok&&de(X),ce("")}catch{P(t("adminLoadFail"))}},[t]);(0,r.useEffect)(()=>{c()},[n,c]);let re=(l,X)=>{_.current=!0,F(!0),d(""),D(me=>({...me??{},[l]:X}))};(0,r.useEffect)(()=>{Y.current=c},[c]),(0,r.useEffect)(()=>{if(typeof EventSource>"u")return;let l=null;try{l=new EventSource(K+"/events")}catch{return}let X=()=>{!_.current&&typeof Y.current=="function"&&Y.current()};try{l.addEventListener("config",X)}catch{}return()=>{try{l.close()}catch{}}},[]);let Le=new Set(["dedupThreshold","captureMinChars","captureCooldownMs","maxCardsPerDay","captureMaxTokens","recallMinScore","recallLimit","recallSummaryLen","recycleRetentionDays","webPort","webCheckIntervalMs","webMaxRestart","sessionBudgetChars","coreMemoryLimit","coreMemoryMaxChars"]),h=l=>({init:t("modeInit"),interval:t("modeInterval"),manual:t("modeManual")})[l]||l,M=async()=>{if(!I)return;if(W){C(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]},X=[];for(let[me,[Ee,Be]]of Object.entries(l)){if(!(me in I))continue;let he=I[me],Ie=typeof he=="number"?he:Number(he);(he===""||he===null||he===void 0||!Number.isFinite(Ie)||Ie<Ee||Ie>Be)&&X.push(t("invalidField",{field:me,min:Ee,max:Be,value:String(he===""?"\u7A7A":he)}))}if(X.length){let me=t("saveInvalid")+"\uFF1A"+X.join("\uFF1B");P(me),C(me,!1);return}xe("save");try{let me={...I};for(let Ie of Object.keys(I))Ie in me&&typeof me[Ie]=="string"&&me[Ie].trim()!==""&&Le.has(Ie)&&(me[Ie]=Number(me[Ie]));Array.isArray(me.vaultProfiles)&&(me.vaultProfiles=me.vaultProfiles.filter(Ie=>Ie&&(String(Ie.name||"").trim()||String(Ie.path||"").trim())));let Ee=await fetch(`${K}/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:me,expectedRevision:z})}),Be=await Ee.text(),he=null;try{he=Be?JSON.parse(Be):null}catch{he=null}if(he||(he={error:"HTTP "+Ee.status+(Be?"\uFF1A"+Be.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")}),he&&he.ok){let Ie=typeof he.pendingOutcome=="string"?he.pendingOutcome:"",tt,et=!0;if(Ie==="applied")tt=t("savedApplied")+(Array.isArray(he.applied)&&he.applied.length?" \xB7 "+he.applied.join("\u3001"):"");else if(Ie==="queued")et=!1,tt=t("saveQueued");else if(Ie==="failed")et=!1,tt=t("saveFail")+" \xB7 "+(he.hostGuard?t("saveHostGuard"):t("saveFailHint"));else if(Ie==="applied-direct")tt=t("savedOk")+" \xB7 "+t("savedDirect");else{let Vt=Array.isArray(he.pending)&&he.pending.length?" \xB7 "+t("savePending"):he.note?" \xB7 "+t("restartHint"):"";tt=(he.retried?"\u267B ":"")+t("savedOk")+Vt}G.current={...G.current,...me},et?(d(""),F(!1),ce(tt)):P(tt),C(tt,et),await c()}else{let Ie=Ee.status===409?t("conflictRefresh"):he?.error||t("saveFail");P(Ie),C(Ie,!1)}}catch{P(t("saveFail")),C(t("saveFail"),!1)}finally{xe("")}},He=()=>{G.current={},D({...v?.config??{}}),d(""),F(!1),ce("")},$e={env:"vaultSrcEnv",profile:"vaultSrcProfile",workspace:"vaultSrcWorkspace",vaultDir:"vaultSrcVaultDir",default:"vaultSrcDefault"},o=l=>Array.isArray(l?.vaultProfiles)?l.vaultProfiles:[],lt=(l,X,me)=>{_.current=!0,F(!0),D(Ee=>{let Be=o(Ee).map(Ie=>({...Ie||{}})),he={...Be[l]||{}};return X==="match"?String(me).trim()?he.match={...he.match||{},workspace:me}:delete he.match:he[X]=me,Be[l]=he,{...Ee??{},vaultProfiles:Be}})},wt=()=>{_.current=!0,F(!0),D(l=>({...l??{},vaultProfiles:[...o(l),{name:"",path:""}]}))},kt=l=>{_.current=!0,F(!0),D(X=>({...X??{},vaultProfiles:o(X).filter((me,Ee)=>Ee!==l)}))},pt={fontSize:11,padding:"2px 8px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:6},ht={padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:12,minWidth:0},Bt={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}},Kt=l=>{let X=Bt[l];X&&(D(me=>({...me??{},...X})),_.current=!0,F(!0),d(l),C(g("planApplied",{plan:X.label})))},Yt=async()=>{try{let l=await fetch(K+"/setup-status").then(X=>X.json());l&&l.ok&&de(l)}catch{}},vt=async(l,X)=>{xe(l+X);try{let Ee=await(await fetch(`${K}/mcp/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:l,action:X})})).json();Ee&&Ee.ok?C(g(X==="install"?"mcpInstalled":"mcpUninstalled",{agent:l})):C(g("mcpActionFail",{agent:l,error:Ee?.error||""}),!1);try{let Be=await fetch(`${K}/setup-status`).then(he=>he.json());Be&&Be.ok&&de(Be)}catch{}}catch{C(t("mergeFail"),!1)}finally{xe("")}},qe=ue&&Array.isArray(ue.agents)?ue.agents:[],Ot=qe.filter(l=>l.installed),oa=[...new Set(Ot.flatMap(l=>Array.isArray(l.servers)?l.servers:[]))],Lt=qe.filter(l=>l.mcpConfigured&&!l.isDsh).length,Wt=qe.some(l=>Array.isArray(l.servers));return(0,e.jsx)(Qa.Provider,{value:{form:I,set:re},children:(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"hidden",flex:i?"0 0 auto":1,minHeight:0,maxHeight:i?"52vh":void 0},children:[(0,e.jsx)("style",{children:bt}),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.jsx)("div",{ref:ie,onScroll:ke,style:{flex:1,minHeight:0,overflow:"auto",overscrollBehavior:"contain",scrollbarGutter:"stable",padding:4},children:(0,e.jsx)("div",{className:"mc-cfg-page",children:(0,e.jsxs)("div",{className:"mc-cfg-layout"+(i?" compact":""),children:[(0,e.jsx)("nav",{className:"mc-pagenav",role:"tablist","aria-label":t("tabConfig"),children:k.map(([l,X,me,Ee])=>(0,e.jsxs)("button",{type:"button",role:"tab","data-page":l,"aria-selected":s===l,className:"mc-pagebtn"+(s===l?" on":""),onClick:()=>y(l),children:[(0,e.jsx)("span",{className:"mc-pagebtn-ico","aria-hidden":"true",children:Ee}),(0,e.jsxs)("span",{className:"mc-pagebtn-txt",children:[(0,e.jsx)("span",{children:X}),(0,e.jsx)("span",{className:"mc-pagebtn-sub",children:me})]})]},l))}),(0,e.jsxs)("div",{className:"mc-cfg-main",children:[(0,e.jsxs)("div",{className:"mc-panehead",children:[(0,e.jsx)("div",{className:"mc-panehead-ico","aria-hidden":"true",children:f[3]}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-panehead-title",children:f[1]}),(0,e.jsx)("div",{className:"mc-panehead-sub",children:f[2]})]})]}),Re&&(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 ",Re]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:c,children:["\u21BB ",t("retry")]})]}),W&&(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")]}),Ue&&(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 ",Ue]}),s==="service"&&v&&(v.version||v.dsh?.vaultDir)&&(0,e.jsxs)("details",{className:"mc-card mc-env mc-env-fold",open:!sheet,children:[(0,e.jsxs)("summary",{className:"mc-env-top",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")}),v.version&&(0,e.jsxs)("code",{style:pt,children:[t("vcLoaded")," v",v.version]}),p&&p.resident&&p.resident.served&&p.resident.served!==v.version&&(0,e.jsxs)("code",{style:pt,children:[t("vcResident")," v",p.resident.served]}),p&&p.resident&&!p.resident.served&&(0,e.jsxs)("code",{style:{...pt,color:"#b45309",fontWeight:600},children:[t("vcResident")," ",t("vcResidentDownShort")]}),p&&p.resident&&p.resident.served&&p.resident.managed===!1&&(0,e.jsxs)("code",{style:{...pt,color:"#b45309",fontWeight:600},children:[t("vcResident")," v",p.resident.served," \xB7 ",t(st?"vcResidentReplaceBlockedShort":yt?"vcResidentHostManagedShort":ot?"vcResidentLockUnknownShort":"vcResidentUnmanagedShort")]}),na&&(0,e.jsxs)("code",{style:pt,children:[t("vcPage")," v",na]}),p&&p.onDisk&&(0,e.jsxs)("code",{style:pt,children:[t("vcOnDisk")," v",p.onDisk]}),p&&p.latest&&(0,e.jsxs)("code",{style:pt,children:[t("vcLatest")," v",p.latest]}),v.dsh?.vaultDir&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.6},children:["\u{1F4C1} ",v.dsh.vaultDir]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("span",{className:"mc-fold-caret",children:"\u25BE"})]}),(0,e.jsxs)("div",{className:"mc-env-rest",children:[(0,e.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:8},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:be==="version",onClick:()=>S(!0),children:be==="version"?t("checking"):"\u{1F504} "+t("vcCheck")})}),p&&je.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 ",Dt[je.warn]?Dt[je.warn]():""]})}),je.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"+(je.emphasis?" me-on":""),disabled:!!be,onClick:se,children:be==="restart"?"\u23F3 "+t("vcRestarting"):"\u{1F504} "+t("vcRestart")}),p.restartCommand&&(0,e.jsx)("code",{style:{fontSize:11,opacity:.75},children:p.restartCommand}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:Ne[je.hint]?Ne[je.hint]():""})]}),na&&p&&p.onDisk&&na!==p.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:na,disk:p.onDisk})}),p&&p.updateAvailable&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,opacity:.88},children:["\u2B06 ",t("vcOutdated")," \u2192 ",(0,e.jsx)("code",{children:p.updateCommand})]}),p&&p.checkError&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#b91c1c"},children:[t("vcCheckFail"),"\uFF1A",p.checkError]})]})]}),s==="service"&&ue&&ue.agents&&(0,e.jsxs)("details",{className:"mc-card mc-cfg-sec mc-fold",style:{marginBottom:10},children:[(0,e.jsxs)("summary",{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.jsxs)("div",{className:"mc-cfg-sec-sub",children:[Wt?g("mcpSummary",{agents:Ot.length,servers:oa.length,mounted:Lt})+" \xB7 ":"",t("mcpAutoHint")]})]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),(0,e.jsx)("span",{className:"mc-fold-caret",children:"\u25BE"})]}),(0,e.jsxs)("div",{className:"mc-fold-body",children:[(0,e.jsxs)("div",{className:"mc-cfg-tools",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",flex:"none"},onClick:Yt,children:t("mcpRefresh")}),O&&(0,e.jsx)("code",{style:{padding:"2px 6px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:4,fontSize:11},children:O})]}),qe.map(l=>{let X=Array.isArray(l.servers),me=X?l.servers:[],Ee=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:Ee}),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})]}),X?me.length?(0,e.jsx)("div",{className:"mc-mcp-servers",children:me.map(Be=>(0,e.jsx)("code",{className:Be==="memory"?"on":"",children:Be},Be))}):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:!!be,onClick:()=>vt(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:!!be,onClick:()=>vt(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:!!be,onClick:()=>{window.confirm(t("uninstallConfirm"))&&vt(l.name,"uninstall")},children:t("uninstallMcp")})]})]},l.name+(l.mcpPath||""))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55},children:t("mcpSetupHint")})]})]}),I?(0,e.jsxs)("div",{className:"mc-cfg",children:[(0,e.jsxs)(At,{...u("sec-preset"),id:"sec-preset",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"+(J===l?" on":""),"aria-pressed":J===l,onClick:()=>Kt(l),disabled:!!be,children:[(0,e.jsxs)("b",{children:[J===l?"\u2705 ":l==="A"?"\u{1F7E2} ":l==="B"?"\u{1F4B0} ":"\u2B50 ",Bt[l].label]}),(0,e.jsx)("span",{children:t("planDesc"+l)})]},l))}),J?(0,e.jsxs)("div",{style:{fontSize:11,color:"#10b981"},children:["\u2705 ",g("planApplied",{plan:Bt[J].label})]}):null]}),(0,e.jsx)(At,{...u("sec-basic"),id:"sec-basic",icon:"\u26A1",title:t("basicSwitches"),sub:t("basicSwitchesHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-switches",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.jsxs)(At,{...u("sec-memory"),id:"sec-memory",icon:"\u{1F9E0}",title:t("dshMemoryConfig"),sub:t("cfgSubCore"),children:[(0,e.jsx)("div",{className:"mc-cfg-switches is-single",children:(0,e.jsx)(ut,{k:"recallIncludeBody",label:t("recallBody")})}),(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Xe,{k:"vaultDir",label:t("vaultDirLabel"),wide:!0}),(0,e.jsx)(Xe,{k:"recallLimit",label:t("recallLimit"),type:"number"}),(0,e.jsx)(Xe,{k:"recallSummaryLen",label:t("recallSummaryLen"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(Xe,{k:"captureMinChars",label:t("captureMinChars"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(Xe,{k:"maxCardsPerDay",label:t("maxCardsPerDay"),hint:t("unitPerDay"),type:"number"}),(0,e.jsx)(Xe,{k:"dedupThreshold",label:t("dedupThreshold"),type:"number",step:"0.01",min:"0",max:"1"}),(0,e.jsx)(Xe,{k:"secretHint",label:t("secretHint"),wide:!0}),(0,e.jsx)(Xe,{k:"recallEmbedding",label:t("recallEmbedding"),wide:!0})]})]}),(0,e.jsxs)(At,{...u("sec-core"),id:"sec-core",icon:"\u2B50",title:t("coreMemory"),sub:t("coreMemoryHint"),children:[(0,e.jsxs)("div",{className:"mc-cfg-switches",children:[(0,e.jsx)(ut,{k:"coreMemoryEnabled",label:t("coreMemoryEnabled")}),(0,e.jsx)(ut,{k:"workingMemoryEnabled",label:t("workingMemoryEnabled")})]}),(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Xe,{k:"coreMemoryLimit",label:t("coreMemoryLimit"),type:"number"}),(0,e.jsx)(Xe,{k:"coreMemoryMaxChars",label:t("coreMemoryMaxChars"),type:"number"})]})]}),(0,e.jsxs)(At,{...u("sec-skills"),id:"sec-skills",icon:"\u{1F9E9}",title:t("skillCards"),sub:t("skillCardsHint"),children:[(0,e.jsx)("div",{className:"mc-cfg-switches is-single",children:(0,e.jsx)(ut,{k:"skillCardsAutoSync",label:t("skillAutoSync")})}),(0,e.jsx)("div",{className:"mc-cfg-tools",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!be,onClick:async()=>{xe("skills");try{let l=await fetch(K+"/skills/sync",{method:"POST"}).then(X=>X.json()).catch(()=>null);l&&l.ok?C(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)):C(l&&l.error||t("skillsSyncFail"),!1)}catch{C(t("skillsSyncFail"),!1)}finally{xe("")}},children:be==="skills"?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")})})]}),(0,e.jsxs)(At,{...u("sec-digest"),id:"sec-digest",icon:"\u{1F4EC}",title:t("newsDigest"),sub:t("newsDigestHint"),children:[(0,e.jsx)("div",{className:"mc-cfg-switches is-single",children:(0,e.jsx)(ut,{k:"newsDigestEnabled",label:t("newsDigestEnabled")})}),(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Xe,{k:"newsDigestIntervalMinutes",label:t("newsDigestInterval"),type:"number"}),(0,e.jsx)(Xe,{k:"newsDigestMaxItems",label:t("newsDigestMaxItems"),type:"number"})]}),(0,e.jsxs)("div",{className:"mc-cfg-tools",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!be,onClick:async()=>{xe("digest");try{let l=await fetch(K+"/news/digest",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}).then(X=>X.json()).catch(()=>null);l&&l.ok?(_e(l.text||""),C(l.digest&&l.digest.items&&l.digest.items.length?t("newsDigestDone"):t("newsDigestEmpty"),!0)):C(l&&l.error||t("newsDigestFail"),!1)}catch{C(t("newsDigestFail"),!1)}finally{xe("")}},children:be==="digest"?"\u23F3 "+t("newsDigestBuilding"):"\u{1F4EC} "+t("newsDigestNow")}),(0,e.jsx)("span",{className:"mc-field-hint",children:t("newsDigestNowHint")})]}),Q!==null?(0,e.jsx)("pre",{className:"mc-digest-preview",children:Q||t("newsDigestEmpty")}):null]}),(0,e.jsx)(At,{...u("sec-ui"),id:"sec-ui",icon:"\u{1F520}",title:t("uiLayout"),sub:t("uiLayoutHint"),children:(0,e.jsx)("div",{className:"mc-field",children:(0,e.jsx)("div",{className:"mc-seg",children:[["compact",t("uiCompact")],["normal",t("uiNormal")],["large",t("uiLarge")]].map(([l,X])=>(0,e.jsx)("button",{type:"button",className:(I&&I.uiScale||"normal")===l?"on":"",onClick:()=>{re("uiScale",l);try{window.dispatchEvent(new CustomEvent("me-ui-scale",{detail:l}))}catch{}},children:X},l))})})}),(0,e.jsxs)(At,{...u("sec-vault"),id:"sec-vault",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:Z?.vaultDir||"\u2014"}),Z?.vaultName?`\uFF08${Z.vaultName}\uFF09`:""," \xB7 ",t("vaultSource"),"\uFF1A",t($e[Z?.vaultSource]||"vaultSrcDefault"),Z?.workspace?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("br",{}),t("vaultWorkspace"),"\uFF1A",(0,e.jsx)("code",{children:Z.workspace})]}):null]}),o(I).length?(0,e.jsxs)("div",{className:"mc-vault-head",children:[(0,e.jsx)("span",{children:t("vaultNamePh")}),(0,e.jsx)("span",{children:t("vaultPathPh")}),(0,e.jsx)("span",{children:t("vaultMatchPh")}),(0,e.jsx)("span",{})]}):null,o(I).map((l,X)=>(0,e.jsxs)("div",{className:"mc-vault-row",children:[(0,e.jsx)("input",{value:l.name||"",placeholder:t("vaultNamePh"),onChange:me=>lt(X,"name",me.target.value),style:ht,disabled:W}),(0,e.jsx)("input",{value:l.path||"",placeholder:t("vaultPathPh"),onChange:me=>lt(X,"path",me.target.value),style:ht,disabled:W}),(0,e.jsx)("input",{value:l.match&&l.match.workspace||"",placeholder:t("vaultMatchPh"),onChange:me=>lt(X,"match",me.target.value),style:ht,disabled:W}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>kt(X),disabled:W,title:t("delete"),children:"\u2715"})]},X)),(0,e.jsxs)("div",{className:"mc-cfg-tools",style:{marginTop:4},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:wt,disabled:W,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:I.activeVault||"",onChange:l=>re("activeVault",l.target.value),disabled:W,style:ht,children:[(0,e.jsx)("option",{value:"",children:t("vaultActiveNone")}),o(I).filter(l=>l&&l.name).map(l=>(0,e.jsx)("option",{value:l.name,children:l.name},l.name))]})]})]})]}),(0,e.jsxs)(At,{...u("sec-cost"),id:"sec-cost",icon:"\u{1F4B0}",title:t("costControl"),sub:t("costHint"),children:[(0,e.jsxs)("div",{className:"mc-cfg-switches",children:[(0,e.jsx)(ut,{k:"distillEnabled",label:t("distillEnabled")}),(0,e.jsx)(ut,{k:"dedupByLLM",label:t("dedupByLLM")}),(0,e.jsx)(ut,{k:"captureFollowSession",label:t("captureFollowSession")}),(0,e.jsx)(ut,{k:"captureFirstOnly",label:t("captureFirstOnly")})]}),(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Xe,{k:"captureMaxTokens",label:t("captureMaxTokens"),type:"number"}),(0,e.jsx)(Xe,{k:"captureTimeoutMs",label:t("captureTimeoutMs"),type:"number"}),(0,e.jsx)(Xe,{k:"recallMinScore",label:t("recallMinScore"),type:"number"}),(0,e.jsx)(Xe,{k:"captureCooldownMs",label:t("captureCooldownMs"),type:"number"}),Fe&&Fe.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 ",g("routeListFail",{err:Fe.error||"\u672A\u77E5\u539F\u56E0"})]}),Fe&&Fe.providers&&Fe.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:I.captureProvider||"",onChange:l=>{re("captureProvider",l.target.value),re("captureModel","")},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),Fe.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:I.captureModel||"",onChange:l=>re("captureModel",l.target.value),children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),((Fe.providers.find(l=>l.id===I.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)(Xe,{k:"captureProvider",label:t("captureProvider")}),(0,e.jsx)(Xe,{k:"captureModel",label:t("captureModel")})]}),(0,e.jsx)(Xe,{k:"sessionBudgetChars",label:t("sessionBudgetChars"),type:"number"})]}),(0,e.jsx)("div",{className:"mc-cfg-tools",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!be,onClick:async()=>{xe("llmtest");try{let l=await fetch(K+"/llm-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:I.captureProvider||"",model:I.captureModel||"",firstOnly:I.captureFirstOnly===!0})}).then(X=>X.json());l&&l.ok?C(t("llmTestOk")+"\uFF1A"+l.route.provider+(l.route.model?"/"+l.route.model:"")+" \xB7 "+l.ms+"ms \xB7 "+t("llmCandidates")+" "+l.candidates):C(t("llmTestFail")+"\uFF1A"+(l&&(l.failure?l.failure.code+" "+l.failure.message:l.error)||"?"),!1)}catch(l){C(t("llmTestFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{xe("")}},children:be==="llmtest"?t("exporting"):"\u{1F50C} "+t("llmTest")})})]}),(0,e.jsx)(At,{...u("sec-audit"),id:"sec-audit",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:I.auditMode??"all",onChange:l=>re("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)($n,{label:t("auditExemptAgents"),value:I.auditExemptAgents||[],options:[{value:"__all__",label:t("allExempt")},...(ue?.agents||[]).filter(l=>!l.isDsh).map(l=>({value:l.name,label:l.name}))],onChange:l=>re("auditExemptAgents",l)}),(0,e.jsx)($n,{label:t("auditExemptKinds"),value:I.auditExemptKinds||[],options:[{value:"__all__",label:t("allExempt")},...Ma.filter(l=>l!=="all"&&l!=="core"&&l!=="skill").map(l=>({value:l,label:t(it[l])}))],onChange:l=>re("auditExemptKinds",l)}),(0,e.jsx)(Xe,{k:"recycleRetentionDays",label:t("recycleDays"),hint:t("unitDays"),type:"number"})]})}),(0,e.jsxs)(At,{...u("sec-service"),id:"sec-service",icon:"\u{1F6E0}",title:t("serviceConfig"),sub:t("cfgSubService"),children:[(0,e.jsxs)("div",{className:"mc-cfg-switches",children:[(0,e.jsx)(ut,{k:"autoWeb",label:t("autoWeb")}),(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-grid",children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("autoWebMode")}),(0,e.jsxs)("select",{value:I.autoWebMode??"init",onChange:l=>re("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)(Xe,{k:"webPort",label:t("webPort"),type:"number"}),(0,e.jsx)(Xe,{k:"webCheckIntervalMs",label:t("webCheckIntervalMs"),type:"number"}),(0,e.jsx)(Xe,{k:"webMaxRestart",label:t("webMaxRestart"),hint:t("unitTimes"),type:"number"})]})]}),(0,e.jsxs)("div",{className:"mc-cfg-actions",children:[H?(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"}),be==="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,opacity:.75},children:["\u23F3 ",t("saving")]}),Ue&&be!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#10b981"},children:["\u2705 ",Ue]}),Re&&be!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#b91c1c"},children:["\u26A0 ",Re]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:He,disabled:!!be,children:t("reset")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:W?()=>C(t("readonlyTitle")+"\uFF1A"+t("readonlyBody"),!1):M,disabled:be==="save",title:t(W?"readonlyBody":"saveConfig"),children:be==="save"?"\u23F3 "+t("saving"):W?"\u{1F512} "+t("readonlyBtn"):"\u{1F4BE} "+t("saveConfig")})]})]}):(0,e.jsx)("div",{style:{fontSize:12,opacity:.6},children:t("loading")})]})]})})})]})})}function Qo({t,onReload:a,version:n}){let[i,s]=(0,r.useState)([]),[m,b]=(0,r.useState)([]),[k,f]=(0,r.useState)("all"),[y,u]=(0,r.useState)("all"),[v,N]=(0,r.useState)(""),[z,$]=(0,r.useState)(""),[j,R]=(0,r.useState)(new Set),[I,D]=(0,r.useState)(null),[W,ge]=(0,r.useState)(""),[oe,q]=(0,r.useState)(null),[_,Y]=(0,r.useState)("pending"),G=(S,O=!0)=>{q({msg:S,ok:O}),setTimeout(()=>q(null),3e3)},Z=[...new Set([...i,...m].map(S=>S.submittedBy).filter(Boolean))],fe=(0,r.useCallback)(async()=>{try{let S=await fetch(`${K}/audit/list`).then(O=>O.json());S.ok&&(s(S.pending||[]),b(S.rejected||[]),R(new Set),xe({}))}catch{}},[]);(0,r.useEffect)(()=>{fe()},[n,fe]);let ue=(_==="pending"?i:m).filter(S=>{if(!Ba(S,z)||k!=="all"&&S.kind!==k||y!=="all"&&qt(S.submittedBy)!==y)return!1;if(v){let O=va(S.created);if(O&&O!==v)return!1}return!0}),de=(0,r.useMemo)(()=>{let S=_==="pending"?i:m,O={all:0};return S.forEach(pe=>{if(Ba(pe,z)&&!(y!=="all"&&qt(pe.submittedBy)!==y)){if(v){let Ae=va(pe.created);if(Ae&&Ae!==v)return}O.all++,O[pe.kind||"other"]=(O[pe.kind||"other"]||0)+1}}),O},[i,m,_,y,v,z]),Re=S=>R(O=>{let pe=new Set(O);return pe.has(S)?pe.delete(S):pe.add(S),pe}),P=async(S,O,pe={})=>{let Ae=O||[...j];if(!Ae.length){G(t("noSelection"),!1);return}ge("apply");let ne=S==="approved"?pe.kind==="core"?t("approveCore"):t("toastApproved"):t(S==="rejected"?"toastRejected":"toastCardDeleted");try{let J=0;for(let d of Ae){let H=S==="approved"?"audit/approve":S==="rejected"?"audit/reject":"delete";try{let F=S==="approved"&&pe.kind?{path:d,kind:pe.kind}:null;(await fetch(K+"/"+H+(F?"":"?path="+encodeURIComponent(d)+(S==="delete"?"&permanent=0":"")),F?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}:void 0)).ok||J++}catch{J++}}await fe(),a&&a(),J?G(t("toastFailed")+"\uFF08"+J+"/"+Ae.length+"\uFF09",!1):G(ne+" "+Ae.length+" \u5F20")}catch(J){G(t("toastFailed")+": "+String(J&&J.message||J),!1)}finally{ge("")}},[be,xe]=(0,r.useState)({}),Ue=S=>be[S]||{},ce=[...j],Q=ue.find(S=>S.path===I)||ue[0]||null,_e=Q?Ue(Q.path):{};(0,r.useEffect)(()=>{let S=Q;if(!S||be[S.path])return;let O=!0,pe=S.path;xe(ne=>({...ne,[pe]:{loading:!0}}));let Ae=S.status||(_==="pending"?"pending":"rejected");return fetch(`${K}/card?path=${encodeURIComponent(pe)}&status=${Ae}`).then(ne=>ne.json()).then(ne=>{O&&(ne&&ne.ok?xe(J=>({...J,[pe]:{text:ne.text||""}})):xe(J=>({...J,[pe]:{error:ne&&ne.error||"HTTP"}})))}).catch(ne=>{O&&xe(J=>({...J,[pe]:{error:String(ne&&ne.message||ne)}}))}),()=>{O=!1}},[Q&&Q.path,_]);let Fe=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")){ge("reclassify");try{let S=await fetch(K+"/reclassify").then(O=>O.json());S&&S.ok?G(t("reclassify")+"\uFF1A"+S.changed+" / "+S.scanned):G(t("toastFailed")+": "+(S&&S.error||"HTTP"),!1),await fe(),a&&a()}catch(S){G(t("toastFailed")+": "+String(S&&S.message||S),!1)}finally{ge("")}}},ee=()=>R(new Set),p=S=>{Y(S),ee()},E=["all",...Ma.filter(S=>S!=="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:bt}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(Ta,{toast:oe}),(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:[i.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:z,onChange:S=>{$(S.target.value),ee(),D(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}}),z&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>{$(""),ee(),D(null)},title:t("clearFilter"),children:"\u2715"}),(0,e.jsxs)("select",{value:y,onChange:S=>{u(S.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")}),Vn(Z).map(S=>(0,e.jsx)("option",{value:S,children:S},S))]}),(0,e.jsx)("input",{type:"date",value:v,onChange:S=>{N(S.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")}),E.map(S=>{let O=S==="all"?"var(--dsw-alias-label-secondary, #9ca3af)":ft[S]||"#6B7280";return(0,e.jsxs)("button",{type:"button",className:`me-audit-kind${k===S?" active":""}`,onClick:()=>{f(S),ee()},children:[(0,e.jsx)("span",{className:"me-audit-kind-dot",style:{background:O}}),(0,e.jsx)("span",{className:"me-audit-kind-name",children:t(S==="all"?"all":it[S])}),(0,e.jsx)("span",{className:"me-audit-kind-count",children:de[S]||0})]},S)})]})]}),(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${_==="pending"?" me-on":""}`,onClick:()=>p("pending"),children:[t("pending"),"\uFF08",i.length,"\uFF09"]}),(0,e.jsxs)("button",{type:"button",className:`mc-btn${_==="rejected"?" me-on":""}`,onClick:()=>p("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:ue.length>0&&ce.length===ue.length,onChange:S=>{S.target.checked?R(new Set(ue.map(O=>O.path))):R(new Set)}})," ",t("selectAll"),"\uFF08",ue.length,"\uFF09"]}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.65},children:[t("auditSelected")," ",ce.length]}),_==="pending"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!W,onClick:Fe,children:["\u{1F527} ",t("reclassify")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!ce.length||!!W,onClick:()=>P("approved"),children:["\u2713 ",t(_==="rejected"?"restore":"approve")]}),_==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!ce.length||!!W,onClick:()=>P("rejected"),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!ce.length||!!W,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&P("delete")},children:["\u{1F5D1} ",t("restoreDelete")]}),ce.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ee,children:t("auditClearSelection")})]}),ue.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:ue.map(S=>{let O=ft[S.kind]||"#6B7280";return(0,e.jsx)("div",{className:`me-audit-row${S.kind==="core"?" core":""}${Q&&Q.path===S.path?" active":""}`,children:(0,e.jsxs)("div",{className:"me-audit-row-main",onClick:()=>D(S.path),children:[(0,e.jsx)("input",{type:"checkbox",checked:j.has(S.path),onClick:pe=>pe.stopPropagation(),onChange:()=>Re(S.path)}),(0,e.jsx)("span",{className:"me-audit-row-tile",style:{color:O,borderColor:O+"38",background:O+"18"},children:Gt[S.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${S.kind==="core"?" core":""}`,children:S.kind==="core"?"\u2B50 "+t("kindCore"):t(it[S.kind]||"kindKnowledge")}),S.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 ${_==="pending"?"pending":"rejected"}`,children:_==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"me-audit-row-time",children:ja(S.created)||"-"})]}),(0,e.jsx)("button",{type:"button",className:"me-audit-row-title",title:S.title,onClick:()=>D(S.path),children:S.title}),S.revision&&(0,e.jsxs)("p",{className:"me-audit-row-reason",style:{color:"#a78bfa"},children:["\u270F\uFE0F ",t("auditRevisionFrom"),"\uFF1A",S.revision.targetTitle||S.revision.targetPath]}),(S.reason||S.summary)&&(0,e.jsx)("p",{className:"me-audit-row-reason",children:S.reason||S.summary}),(0,e.jsxs)("div",{className:"me-audit-row-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",qt(S.submittedBy)]}),(Array.isArray(S.tags)?S.tags:[]).slice(0,3).map(pe=>(0,e.jsxs)("span",{children:["#",pe]},pe))]})]}),(0,e.jsx)("div",{className:"me-audit-row-actions",onClick:pe=>pe.stopPropagation(),children:_==="pending"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>P("approved",[S.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},onClick:()=>P("rejected",[S.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",[S.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",[S.path])},children:"\u{1F5D1}"})]})})]})},S.path)})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:20,textAlign:"center"},children:t(z?"auditNoMatch":"noAuditItems")})]}),(0,e.jsx)("aside",{className:"me-audit-preview",children:Q?(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:ft[Q.kind]||"#6B7280",borderColor:(ft[Q.kind]||"#6B7280")+"59",background:(ft[Q.kind]||"#6B7280")+"1a"},children:[Gt[Q.kind]||"\u{1F4CE}"," ",t(it[Q.kind]||"kindKnowledge")]}),(0,e.jsx)("span",{className:`md-chip ${_==="pending"?"md-chip-st-warn":"md-chip-st-bad"}`,children:_==="pending"?Q.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:ja(Q.created)})]}),(0,e.jsx)("h3",{children:Q.title}),Q.revision&&(0,e.jsxs)("div",{className:"me-audit-preview-reason",style:{color:"#a78bfa",marginBottom:6},children:["\u270F\uFE0F ",t("auditRevisionFrom"),"\uFF1A",Q.revision.targetTitle||Q.revision.targetPath]}),(0,e.jsxs)("div",{className:"me-audit-preview-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",qt(Q.submittedBy)]}),!!Q.reason&&(0,e.jsxs)("span",{className:"me-audit-preview-reason",children:["\u2691 ",Q.reason]}),(Array.isArray(Q.tags)?Q.tags:[]).slice(0,5).map(S=>(0,e.jsxs)("span",{children:["#",S]},S))]})]}),(0,e.jsxs)("div",{className:"me-audit-preview-body",children:[_e.loading&&(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("loading")}),_e.error&&(0,e.jsxs)("div",{className:"me-audit-preview-empty",style:{color:"#f87171"},children:["\u26A0 ",t("auditBodyFail"),"\uFF1A",_e.error]}),_e.text!=null?(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:la(en(ha(_e.text).body,Q.title))}}):!_e.loading&&(0,e.jsx)("p",{className:"me-audit-preview-summary",children:Q.summary||""})]}),(0,e.jsxs)("div",{className:"me-audit-preview-actions",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!!W,onClick:()=>P("approved",[Q.path]),children:["\u2713 ",_==="rejected"?t("restore"):Q.kind==="core"?t("approveCore"):t("approve")]}),_==="pending"&&Q.kind!=="core"&&!Q.revision&&(0,e.jsxs)("button",{type:"button",className:"mc-btn me-core-btn",disabled:!!W,onClick:()=>P("approved",[Q.path],{kind:"core"}),children:["\u2B50 ",t("approveAndCore")]}),_==="pending"&&Q.kind==="core"&&(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!W,onClick:()=>P("approved",[Q.path],{kind:"knowledge"}),children:t("approveAsNormal")}),_==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!W,onClick:()=>P("rejected",[Q.path]),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!W,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&P("delete",[Q.path])},children:["\u{1F5D1} ",t("restoreDelete")]})]})]}):(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t(z?"auditNoMatch":"noAuditItems")})})]})]})]})]})}var Zo={title:"",date:"",category:"",source:"",url:"",tags:"",pinned:!1,body:""};function Ya(){let t=new Date;return t.getFullYear()+"-"+String(t.getMonth()+1).padStart(2,"0")+"-"+String(t.getDate()).padStart(2,"0")}function Va(t){try{let a=new URL(String(t||""));return a.protocol==="http:"||a.protocol==="https:"?a.href:""}catch{return""}}function er(t,a){let n=String(t||"").slice(0,10);if(!n)return a("newsEarlier");if(n===Ya())return a("newsToday");let i=new Date;i.setDate(i.getDate()-1);let s=i.getFullYear()+"-"+String(i.getMonth()+1).padStart(2,"0")+"-"+String(i.getDate()).padStart(2,"0");return n===s?a("newsYesterday"):n}function Hn({item:t,t:a,active:n,onOpen:i,onEdit:s,onToggleRead:m,onDelete:b}){return(0,e.jsxs)("article",{className:"mc-news-card"+(t.pinned?" pinned":"")+(t.read?"":" unread")+(n?" active":""),onClick:()=>i(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(k=>(0,e.jsxs)("span",{children:["#",k]},k)),(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:k=>k.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 tr(t,a){let n=Date.now()-Number(t||0);if(!Number.isFinite(n)||n<0)return"";let i=Math.floor(n/6e4);if(i<1)return a("newsJustNow");if(i<60)return i+" "+a("newsMinutesAgo");let s=Math.floor(i/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 Qt="me.news.lastQuery",pa="me.news.prefs",Xn="me.news.view",ar={model:"\u6A21",product:"\u54C1",research:"\u7814",opensource:"\u6E90",industry:"\u4E1A",policy:"\u7B56",other:"\u8BAF"},nr=new Set(["the","a","an","of","to","for","and","in","on","is","are","with","how","why","new","its","it","as","at","by","from"]);function Za(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 jt(t,a){try{localStorage.setItem(t,JSON.stringify(a))}catch{}}function $a(t,a=""){let n=Za(t,a);return typeof n=="string"?n:a}function On(){let t=Za(Xn,null);return t&&typeof t=="object"?t:{}}function Ja(){return{types:{},sources:{},terms:{},opens:0,updatedAt:0}}function or(){let t=Za(pa,null);return!t||typeof t!="object"?Ja():{...Ja(),...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||nr.has(n)||a.push(n);return a}function Na(t,a,n){a&&(t[a]=Math.min(60,(Number(t[a])||0)+n))}function rr(t,a,n){let i={...n,types:{...n.types},sources:{...n.sources},terms:{...n.terms}};return t&&(Na(i.types,t.type,a),Na(i.sources,t.sourceId,a),Qn(t.title).slice(0,6).forEach(s=>Na(i.terms,s,1)),i.opens=(Number(n.opens)||0)+1),i.updatedAt=Date.now(),i}function Wn(t,a){let n={...t,terms:{...t.terms}};return Qn(a).forEach(i=>Na(n.terms,i,3)),n.updatedAt=Date.now(),n}function ir(t){let a=0;for(let n of String(t||""))a=(a*31+n.charCodeAt(0))%360;return a}function sr(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 lr=/(帮我|请|麻烦|推送|订阅|关注|跟踪|每天|每日|定时|最新|热门|看看|给我|关于|相关)/;function cr(t){let a=String(t||"").trim();return a?lr.test(a)||a.split(/\s+/).length>=4:!1}function _n(t,a,n){let i=Math.max(0,(Date.now()-Number(t.publishedAt||0))/36e5),s=100-Math.min(60,i*.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[k,f]of Object.entries(a.terms))m.includes(k)&&(s+=Math.min(8,Number(f)||0)*.9);let b=String(n||"").trim().toLowerCase();if(b)for(let k of b.split(/\s+/).filter(Boolean))String(t.title||"").toLowerCase().includes(k)?s+=16:m.includes(k)&&(s+=8);return t.followId&&(s+=10),s}function dr({t,mode:a,version:n}){let[i,s]=(0,r.useState)([]),[m,b]=(0,r.useState)([]),[k,f]=(0,r.useState)(!0),[y,u]=(0,r.useState)(0),[v,N]=(0,r.useState)([]),[z,$]=(0,r.useState)(""),[j,R]=(0,r.useState)(null),[I,D]=(0,r.useState)(()=>$a(Qt)),[W,ge]=(0,r.useState)(()=>$a(Qt).trim()),[oe,q]=(0,r.useState)(""),[_,Y]=(0,r.useState)(()=>{let h=On();return typeof h.lang=="string"?h.lang:"zh"}),[G,Z]=(0,r.useState)(()=>On().sort==="time"?"time":"rec"),[fe,ue]=(0,r.useState)(or),[de,Re]=(0,r.useState)(!1),[P,be]=(0,r.useState)([]),[xe,Ue]=(0,r.useState)([]),[ce,Q]=(0,r.useState)(null),[_e,Fe]=(0,r.useState)(!1),[ee,p]=(0,r.useState)(""),E=(h,M=!0)=>{R({msg:h,ok:M}),setTimeout(()=>R(null),3200)},S=(0,r.useRef)(!1),O=(0,r.useRef)($a(Qt).trim());(0,r.useEffect)(()=>{let h=setTimeout(()=>{let M=I.trim();ge(M),S.current&&(jt(Qt,M),!(!M||M===O.current)&&(O.current=M,ue(He=>{let $e=Wn(He,M);return jt(pa,$e),$e})))},260);return()=>clearTimeout(h)},[I]),(0,r.useEffect)(()=>{jt(Xn,{lang:_,sort:G})},[_,G]),(0,r.useEffect)(()=>{Re(!0);let h=setTimeout(()=>Re(!1),170);return()=>clearTimeout(h)},[oe,_,W,G]);let pe=(0,r.useCallback)(async()=>{f(!0),$("");try{let h=new URLSearchParams({period:a==="month"?"month":"today",lang:"all"});h.set("follows","1");let M=await fetch(K+"/news/feed?"+h.toString()).then(He=>He.json());if(!M||!M.ok)throw new Error(M&&M.error||t("newsFeedError"));s(M.items||[]),Array.isArray(M.follows)&&be(M.follows),b(M.types||[]),u(Number(M.fetchedAt)||0),N(M.errors||[])}catch(h){let M=h&&h.message||t("newsFeedError");$(M),E(M,!1)}finally{f(!1)}},[a,t]);(0,r.useEffect)(()=>{pe()},[n,pe]);let Ae=(0,r.useCallback)(async()=>{try{let h=await fetch(K+"/news/follows").then(M=>M.json());h&&h.ok&&(be(h.follows||[]),Ue(h.domains||[]))}catch{}},[]);(0,r.useEffect)(()=>{Ae()},[n,Ae]);let ne=async()=>{f(!0);try{let h=await fetch(K+"/news/feed/refresh",{method:"POST"}).then(M=>M.json());if(!h||!h.ok)throw new Error(h&&h.error||t("newsFeedError"));await pe(),E(t("newsUpdatedAt")+" "+new Date().toLocaleTimeString())}catch(h){let M=h&&h.message||t("newsFeedError");$(M),E(M,!1),f(!1)}},J=h=>(m.find(M=>M.id===h)||{}).label||t("all"),d=(i||[]).filter(h=>!_||h.lang===_||h.followId),H={};for(let h of d)H[h.type]=(H[h.type]||0)+1;let F=oe?d.filter(h=>h.type===oe):d,ie=cr(W);if(W&&!ie){let h=W.toLowerCase().split(/\s+/).filter(Boolean);F=F.filter(M=>{let He=[M.title,M.summary,M.source,J(M.type)].join(" ").toLowerCase();return h.every($e=>He.includes($e))})}ee&&(F=F.filter(h=>h.followId===ee));let ze=h=>(Number(h.points)||0)+(Number(h.comments)||0)*2,ke=a==="month",le=ke?F.filter(h=>(h.points||0)>0):[],C=ke&&le.length>0,se=new Map;C&&le.slice().sort((h,M)=>(M.points||0)-(h.points||0)||(M.comments||0)-(h.comments||0)).forEach((h,M)=>se.set(h.id||h.url||h.title,M+1)),F=F.slice().sort((h,M)=>G==="time"?(M.publishedAt||0)-(h.publishedAt||0):ke&&C?(M.points||0)-(h.points||0)||(M.comments||0)-(h.comments||0)||(M.publishedAt||0)-(h.publishedAt||0):_n(M,fe,W)-_n(h,fe,W));let te=Object.keys(fe.types||{}).sort((h,M)=>(fe.types[M]||0)-(fe.types[h]||0)).slice(0,3),Se=Object.keys(fe.terms||{}).sort((h,M)=>(fe.terms[M]||0)-(fe.terms[h]||0)).slice(0,4),ot=!!W||te.length>0||Se.length>0,st=h=>{S.current=!0;let M=String(h??"").trim();ge(M),jt(Qt,M),!(!M||M===O.current)&&(O.current=M,ue(He=>{let $e=Wn(He,M);return jt(pa,$e),$e}))},yt=()=>{S.current=!1,O.current="",q(""),Y(""),D(""),ge(""),jt(Qt,"")},Rt=h=>ue(M=>{let He=rr(h,4,M);return jt(pa,He),He}),Mt=()=>{let h=Ja();jt(pa,h),jt(Qt,""),O.current="",S.current=!1,ue(h),D(""),ge("")},xt=async()=>{let h=I.trim();if(!h){E(t("newsFollowNoQuery"),!1);return}Fe(!0);try{let M=await fetch(K+"/news/follows/preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:h})}).then(He=>He.json());if(!M||!M.ok)throw new Error(M&&M.error||t("newsFollowFail"));Ue(M.domainsEnum||xe),Q({text:h,query:M.parsed.query,label:M.parsed.label,domains:M.parsed.domains,sourceIds:M.parsed.sourceIds||[],notes:M.parsed.notes||[]})}catch(M){E(String(M&&M.message||M),!1)}finally{Fe(!1)}},je=(h,M)=>Q(He=>{if(!He)return He;let $e=new Set(He.domains);return M?$e.add(h):$e.delete(h),{...He,domains:[...$e]}}),Dt=async()=>{if(ce){Fe(!0);try{let h=await fetch(K+"/news/follows",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:ce.query,domains:ce.domains,label:ce.label,sourceIds:ce.sourceIds||[]})}).then(He=>He.json());if(!h||!h.ok)throw new Error(h&&h.error||t("newsFollowFail"));let M=ce.label;Q(null),E((h.duplicate?t("newsFollowExists"):t("newsFollowAdded"))+"\uFF1A"+M),await Ae(),await pe()}catch(h){E(String(h&&h.message||h),!1)}finally{Fe(!1)}}},Ne=async h=>{try{let M=await fetch(K+"/news/follows?id="+encodeURIComponent(h),{method:"DELETE"}).then(He=>He.json());if(!M||!M.ok)throw new Error(M&&M.error||t("newsFollowFail"));ee===h&&p(""),E(t("newsFollowRemoved")),await Ae(),await pe()}catch(M){E(String(M&&M.message||M),!1)}},g=(h,M)=>{let He=Va(h.url),$e=J(h.type),o=Va(h.image),lt=C&&se.get(h.id||h.url||h.title)||0,wt=C&<>0&<<=3;return(0,e.jsxs)("a",{className:"mc-news-tile",style:{"--i":Math.min(M,14)},href:He||void 0,target:He?"_blank":void 0,rel:"noopener noreferrer",onClick:()=>Rt(h),children:[(0,e.jsxs)("span",{className:"mc-news-tile-cover",children:[o?(0,e.jsx)("img",{className:"mc-news-tile-img",src:o,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:kt=>{let pt=kt.currentTarget;pt.style.display="none",pt.nextElementSibling&&(pt.nextElementSibling.style.display="grid")}}):null,(0,e.jsxs)("span",{className:"mc-news-tile-gen",style:{"--hue":ir(h.title),display:o?"none":"grid"},children:[(0,e.jsx)("b",{children:ar[h.type]||"\u8BAF"}),(0,e.jsx)("small",{children:$e}),(0,e.jsxs)("em",{children:[(0,e.jsx)("i",{children:sr(h.source)}),h.source]})]}),(0,e.jsx)("span",{className:"mc-news-tile-badge"+(wt?" hot":""),children:lt?"#"+lt:$e}),(0,e.jsx)("span",{className:"mc-news-tile-time",children:tr(h.publishedAt,t)})]}),(0,e.jsxs)("span",{className:"mc-news-tile-body",children:[(0,e.jsx)("span",{className:"mc-news-tile-title",children:h.title}),h.summary?(0,e.jsx)("span",{className:"mc-news-tile-summary",children:h.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:h.source}),h.followLabel?(0,e.jsxs)("span",{className:"mc-news-tile-follow",children:["\u{1F514} ",h.followLabel]}):null,lt?(0,e.jsxs)("span",{children:["\xB7 \u{1F525} ",t("newsHeat")," ",ze(h)]}):null,(0,e.jsxs)("span",{className:"mc-news-tile-open",children:[t("newsOriginal")," \u2197"]})]})]})]},h.id||h.url||h.title)},c=F.filter(h=>h.followId),re=c.slice(0,4),Le=ee?F:re.length?F.filter(h=>!h.followId):F;return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(Ta,{toast:j}),(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:I,onChange:h=>{S.current=!0,D(h.target.value)},onKeyDown:h=>{h.key==="Enter"&&st(I)},placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),I?(0,e.jsx)("button",{type:"button",className:"mc-news-hero-clear",title:t("cancel"),onClick:()=>{D(""),st("")},children:"\u2715"}):null,(0,e.jsx)("button",{type:"button",className:"mc-news-hero-go",onClick:()=>st(I),children:t("newsSearchGo")}),I.trim()?(0,e.jsxs)("button",{type:"button",className:"mc-news-hero-follow",disabled:_e,onClick:xt,title:t("newsFollowPreview"),children:["\uFF0B ",t("newsFollow")]}):null]}),(0,e.jsx)("div",{className:"mc-news-hero-hint",children:t(ie?"newsIntentHint":"newsHeroHint")})]}),ce?(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:ce.label}),ce.query?(0,e.jsxs)("span",{className:"draft-q",children:["\xB7 \u300C",ce.query,"\u300D"]}):null,(0,e.jsxs)("div",{className:"draft-doms",children:[(0,e.jsx)("span",{className:"draft-lbl",children:t("newsFollowDomains")}),xe.map(h=>(0,e.jsxs)("label",{className:"draft-opt",title:h.hint||"",children:[(0,e.jsx)("input",{type:"checkbox",checked:ce.domains.includes(h.id),onChange:M=>je(h.id,M.target.checked)}),(0,e.jsx)("span",{children:h.label})]},h.id))]}),ce.notes.map((h,M)=>(0,e.jsxs)("div",{className:"draft-note",children:["\xB7 ",h]},M))]}),(0,e.jsxs)("div",{className:"draft-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Q(null),children:t("cancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:_e||!ce.domains.length,onClick:Dt,children:t("newsFollowConfirm")})]})]}):null,P.length>0?(0,e.jsx)("div",{className:"mc-news-follows",children:P.map(h=>(0,e.jsxs)("span",{className:"mc-news-follow-chip"+(ee===h.id?" on":""),children:[(0,e.jsxs)("button",{type:"button",className:"chip-main",onClick:()=>p(M=>M===h.id?"":h.id),title:(h.domains||[]).join(" / "),children:["\u{1F514} ",h.label,(0,e.jsx)("i",{children:h.count||0})]}),(0,e.jsx)("button",{type:"button",className:"chip-x",title:t("delete"),"aria-label":t("delete"),onClick:()=>Ne(h.id),children:"\u2715"})]},h.id))}):null,ot?(0,e.jsxs)("div",{className:"mc-news-pref",children:[(0,e.jsxs)("span",{children:["\u{1F3AF} ",t("newsPersonalized")]}),W?(0,e.jsxs)("span",{children:["\xB7 ",t("newsLastQuery")," ",(0,e.jsx)("b",{children:W})]}):null,Se.length>0?(0,e.jsxs)("span",{children:["\xB7 ",Se.join(" / ")]}):null,te.length>0?(0,e.jsxs)("span",{children:["\xB7 ",te.map(J).join(" / ")]}):null,(0,e.jsx)("span",{className:"mc-news-pref-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Mt,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"+(oe===""?" on":""),onClick:()=>q(""),children:[t("all"),(0,e.jsx)("span",{className:"mc-news-pill-count",children:d.length})]}),m.map(h=>H[h.id]?(0,e.jsxs)("button",{type:"button",className:"mc-news-pill"+(oe===h.id?" on":""),onClick:()=>q(oe===h.id?"":h.id),children:[h.label,(0,e.jsx)("span",{className:"mc-news-pill-count",children:H[h.id]})]},h.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"+(_==="zh"?" active":""),onClick:()=>Y("zh"),children:t("newsLangZh")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(_==="en"?" active":""),onClick:()=>Y("en"),children:t("newsLangEn")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(_===""?" active":""),onClick:()=>Y(""),children:t("newsLangAll")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(G==="rec"?" active":""),onClick:()=>Z("rec"),children:t("newsSortRec")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(G==="time"?" active":""),onClick:()=>Z("time"),children:t("newsSortTime")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:k,onClick:ne,children:t(k?"newsLoading":"newsFeedRefresh")})]})]}),(0,e.jsxs)("div",{className:"mc-news-feed-meta",style:{margin:"0 0 8px"},children:[y?t("newsUpdatedAt")+" "+new Date(y).toLocaleTimeString():"",k?"":" \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(C?"newsEnRanking":"newsZhArchive")}),z&&!k&&(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 ",z]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ne,children:t("newsRetry")})]}),v.length>0&&(0,e.jsxs)("div",{className:"mc-news-feed-warn",children:["\u26A0 ",t("newsPartialFail"),"\uFF1A",v.slice(0,2).join("\uFF1B")]}),k?(0,e.jsxs)("div",{className:"mc-card mc-news-feed-empty mc-news-loading-card",role:"status","aria-live":"polite",children:[(0,e.jsx)(ua,{}),(0,e.jsx)("span",{children:t("newsLoading")}),(0,e.jsx)("small",{children:t("newsLoadingHint")})]}):i.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:ne,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:yt,children:t("newsClearFilters")})]}):(0,e.jsxs)(e.Fragment,{children:[!ee&&re.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"+(de?" is-swapping":""),children:re.map((h,M)=>g(h,M))})]}):null,(0,e.jsx)("div",{className:"mc-news-grid"+(de?" is-swapping":""),children:Le.map((h,M)=>g(h,M))})]})]})}function pr({t,version:a,onUnreadChange:n}){let[i,s]=(0,r.useState)("daily"),m=i==="month"?"newsMonthlySub":i==="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"+(i==="daily"?" active":""),onClick:()=>s("daily"),children:t("newsDaily")}),(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(i==="month"?" active":""),onClick:()=>s("month"),children:t("newsMonthly")}),(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(i==="mine"?" active":""),onClick:()=>s("mine"),children:t("newsMine")})]}),i==="mine"?(0,e.jsx)(mr,{t,version:a,onUnreadChange:n}):(0,e.jsx)(dr,{t,mode:i,version:a})]})}function mr({t,version:a,onUnreadChange:n}){let[i,s]=(0,r.useState)([]),[m,b]=(0,r.useState)([]),[k,f]=(0,r.useState)({all:0,unread:0}),[y,u]=(0,r.useState)(""),[v,N]=(0,r.useState)(""),[z,$]=(0,r.useState)(""),[j,R]=(0,r.useState)(!1),[I,D]=(0,r.useState)(""),[W,ge]=(0,r.useState)(null),[oe,q]=(0,r.useState)(null),[_,Y]=(0,r.useState)(!1),[G,Z]=(0,r.useState)(""),[fe,ue]=(0,r.useState)(null),de=(p,E=!0)=>{ue({msg:p,ok:E}),setTimeout(()=>ue(null),2600)};(0,r.useEffect)(()=>{let p=setTimeout(()=>N(y.trim()),220);return()=>clearTimeout(p)},[y]);let Re=(0,r.useCallback)(async()=>{let p=new URLSearchParams;v&&p.set("q",v),z&&p.set("category",z),j&&p.set("unread","1");try{let E=await fetch(K+"/news?"+p.toString()).then(S=>S.json());if(!E||!E.ok)throw new Error(E&&E.error||"load failed");s(E.items||[]),b(E.categories||[]),f(E.counts||{all:0,unread:0}),n&&n(Number((E.counts||{}).unread)||0)}catch{de(t("newsSaveFail"),!1)}},[v,z,j,n,t]);(0,r.useEffect)(()=>{Re()},[a,Re]);let P=async p=>{D(p.id);try{let E=await fetch(K+"/news/item?id="+encodeURIComponent(p.id)).then(S=>S.json());if(!E||!E.ok)throw new Error(E&&E.error||"load failed");ge(E.item),E.item.read||await be(p.id,!0)}catch{de(t("newsSaveFail"),!1)}},be=async(p,E)=>{try{let S=await fetch(K+"/news/read",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:p,read:E})}).then(O=>O.json());if(!S||!S.ok)throw new Error(S&&S.error||"read failed");ge(O=>O&&O.id===p?{...O,read:!!E}:O),await Re()}catch{de(t("newsSaveFail"),!1)}},xe=async p=>{if(Y(!1),p){let E=p;if(!E.body)try{let S=await fetch(K+"/news/item?id="+encodeURIComponent(E.id)).then(O=>O.json());S&&S.ok&&(E=S.item)}catch{}q({id:E.id,title:E.title||"",date:E.date||Ya(),category:E.category||"",source:E.source||"",url:E.url||"",tags:(E.tags||[]).join(", "),pinned:!!E.pinned,body:E.body||"",created:E.created||""})}else q({...Zo,date:Ya()})},Ue=async()=>{if(oe){if(!String(oe.title||"").trim()||!String(oe.body||"").trim()){de(t("newsSaveFail"),!1);return}Z("save");try{let p={id:oe.id||void 0,title:oe.title,date:oe.date,category:oe.category,source:oe.source,url:oe.url,tags:String(oe.tags||"").split(",").map(S=>S.trim()).filter(Boolean),pinned:!!oe.pinned,body:oe.body,created:oe.created},E=await fetch(K+"/news/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}).then(S=>S.json());if(!E||!E.ok)throw new Error(E&&E.error||"save failed");q(null),D(E.item.id),ge(E.item),await Re(),de(t("newsSaved"))}catch(p){de(p&&p.message||t("newsSaveFail"),!1)}finally{Z("")}}},ce=async p=>{if(window.confirm(t("newsDeleteConfirm"))){Z("delete");try{let E=await fetch(K+"/news/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:p.id})}).then(S=>S.json());if(!E||!E.ok)throw new Error(E&&E.error||"delete failed");I===p.id&&(D(""),ge(null)),await Re(),de(t("newsDeleted"))}catch{de(t("newsSaveFail"),!1)}finally{Z("")}}},Q=i.filter(p=>p.pinned),_e=i.filter(p=>!p.pinned),Fe=W?Va(W.url):"",ee="";return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(Ta,{toast:fe}),(0,e.jsxs)("div",{className:"mc-news-toolbar",children:[(0,e.jsxs)("span",{className:"mc-news-feed-meta",style:{marginLeft:0},children:[k.all," ",t("newsCountUnit")," \xB7 ",k.unread," ",t("newsUnread")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>xe(null),children:["\uFF0B ",t("newsNew")]}),(0,e.jsx)("input",{className:"mc-news-search",type:"text",value:y,onChange:p=>u(p.target.value),placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(z===""?" active":""),onClick:()=>$(""),children:t("all")}),m.map(p=>(0,e.jsx)("button",{type:"button",className:"mc-chip"+(z===p?" active":""),onClick:()=>$(E=>E===p?"":p),children:p},p)),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(j?" active":""),onClick:()=>R(p=>!p),children:t("newsUnreadOnly")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Re(),children:t("refresh")})]}),(0,e.jsxs)("div",{className:"mc-news-main",children:[(0,e.jsx)("div",{className:"mc-news-list",children:i.length===0?(0,e.jsxs)("div",{className:"mc-card mc-news-empty",children:[t(y||z||j?"newsNoMatch":"newsEmpty"),!y&&!z&&!j&&(0,e.jsx)("div",{style:{marginTop:10},children:(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>xe(null),children:["\uFF0B ",t("newsNew")]})})]}):(0,e.jsxs)(e.Fragment,{children:[Q.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")]}),Q.map(p=>(0,e.jsx)(Hn,{item:p,t,active:I===p.id,onOpen:P,onEdit:E=>xe(E),onToggleRead:E=>be(E.id,!E.read),onDelete:ce},p.id))]}),(0,e.jsx)("div",{className:"mc-news-group",children:_e.map(p=>{let E=er(p.date,t),S=E!==ee;return ee=E,(0,e.jsxs)(r.default.Fragment,{children:[S&&(0,e.jsx)("div",{className:"mc-news-group-label",children:E}),(0,e.jsx)(Hn,{item:p,t,active:I===p.id,onOpen:P,onEdit:O=>xe(O),onToggleRead:O=>be(O.id,!O.read),onDelete:ce})]},p.id)})})]})}),W&&(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:W.category||t("newsCategoryField")}),W.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:()=>{ge(null),D("")},title:t("close"),children:"\u2715"})]}),(0,e.jsx)("h2",{children:W.title}),(0,e.jsxs)("div",{className:"mc-news-reader-meta",children:[(0,e.jsx)("span",{children:W.date||""}),W.source&&(0,e.jsxs)("span",{children:["\xB7 ",W.source]}),(0,e.jsxs)("span",{children:["\xB7 ",W.read?t("newsRead"):t("newsUnread")]}),(W.tags||[]).map(p=>(0,e.jsxs)("span",{children:["#",p]},p))]}),Fe&&(0,e.jsx)("div",{style:{marginTop:8},children:(0,e.jsxs)("a",{className:"mc-btn",style:{textDecoration:"none"},href:Fe,target:"_blank",rel:"noopener noreferrer",children:["\u2197 ",t("newsOpenLink")]})}),(0,e.jsx)("div",{className:"md-doc",style:{marginTop:12},dangerouslySetInnerHTML:{__html:la(en(W.body||"",W.title))}}),(0,e.jsxs)("div",{className:"mc-news-reader-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>xe(W),children:t("newsEdit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>be(W.id,!W.read),children:W.read?t("newsMarkUnread"):t("newsMarkRead")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:G==="delete",onClick:()=>ce(W),children:t("delete")})]})]})]}),oe&&(0,e.jsx)("div",{className:"me-overlay",onClick:()=>q(null),children:(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:860,width:"94vw",maxHeight:"90vh"},onClick:p=>p.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:oe.id?t("newsEdit"):t("newsNew")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>q(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:oe.title,onChange:p=>q(E=>({...E,title:p.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:oe.date||"",onChange:p=>q(E=>({...E,date:p.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:oe.category||"",onChange:p=>q(E=>({...E,category:p.target.value}))})]}),(0,e.jsx)("datalist",{id:"me-news-categories",children:m.map(p=>(0,e.jsx)("option",{value:p},p))}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsSourceField")}),(0,e.jsx)("input",{className:"mc-news-input",value:oe.source||"",onChange:p=>q(E=>({...E,source:p.target.value}))})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsUrlField")}),(0,e.jsx)("input",{className:"mc-news-input",value:oe.url||"",onChange:p=>q(E=>({...E,url:p.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:oe.tags||"",onChange:p=>q(E=>({...E,tags:p.target.value}))})]}),(0,e.jsxs)("label",{style:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:18},children:[(0,e.jsx)("input",{type:"checkbox",checked:!!oe.pinned,onChange:p=>q(E=>({...E,pinned:p.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:oe.body||"",onChange:p=>q(E=>({...E,body:p.target.value})),placeholder:t("newsBodyPlaceholder")})]}),_&&(0,e.jsx)("div",{className:"full mc-news-preview",children:(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:la(oe.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:()=>Y(p=>!p),children:t(_?"newsEditBody":"newsPreview")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>q(null),children:t("cancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:G==="save",onClick:Ue,children:t(G==="save"?"newsSaving":"newsSave")})]})]})]})})]})}function ur({t,onReload:a,version:n}){let[i,s]=(0,r.useState)([]),[m,b]=(0,r.useState)(""),[k,f]=(0,r.useState)(null),y=(N,z=!0)=>{f({msg:N,ok:z}),setTimeout(()=>f(null),3200)},u=(0,r.useCallback)(async()=>{try{let N=await fetch(`${K}/recycle/list`).then(z=>z.json());N.ok&&s(N.items||[])}catch{}},[]);(0,r.useEffect)(()=>{u()},[n,u]);let v=async(N,z)=>{let $=(i.find(j=>j.path===z)||{}).title||z;b(N+z);try{let R=await fetch(K+(N==="restore"?"/recycle/restore":"/recycle/purge")+"?path="+encodeURIComponent(z)),I=await R.json().catch(()=>null);await u(),a&&a(),R.ok&&(!I||I.ok!==!1)?y(t(N==="restore"?"toastRestored":"toastPurged")+"\uFF1A"+$):y(t("toastFailed")+"\uFF1A"+(I&&I.error||"HTTP "+R.status),!1)}catch(j){y(t("toastFailed")+"\uFF1A"+String(j&&j.message||j),!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:bt}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(Ta,{toast:k}),(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:i.length}),(0,e.jsxs)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!m||i.length===0,title:i.length?t("recyclePurgeAllConfirm").split("{n}").join(String(i.length)):t("emptyRecycle"),onClick:async()=>{if(i.length&&window.confirm(t("recyclePurgeAllConfirm").split("{n}").join(String(i.length)))){b("purgeAll");try{let N=await fetch(K+"/recycle/purge-all",{method:"POST"}),z=await N.json().catch(()=>null);await u(),a&&a(),N.ok&&(!z||z.ok!==!1)?y(t("toastPurgeAll").split("{n}").join(String(z&&z.purged!=null?z.purged:i.length)),!0):y(t("toastFailed")+"\uFF1A"+(z&&z.error||"HTTP "+N.status),!1)}catch(N){y(t("toastFailed")+"\uFF1A"+String(N&&N.message||N),!1)}finally{b("")}}},children:["\u{1F5D1} ",t("recyclePurgeAll"),i.length?"\uFF08"+i.length+"\uFF09":""]})]}),(0,e.jsx)("div",{className:"mc-v5-recycle-hint",children:t("recycleHint")}),i.length?(0,e.jsx)("div",{className:"mc-card mc-v5-recycle",children:i.map(N=>{let z=ft[N.kind]||"#6B7280";return(0,e.jsxs)("div",{className:"mc-v5-recycle-row",children:[(0,e.jsx)("span",{className:"mc-v5-recycle-tile",style:{color:z,background:z+"18",borderColor:z+"38"},children:Gt[N.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"mc-v5-recycle-copy",children:[(0,e.jsx)("b",{children:N.title}),(0,e.jsxs)("span",{children:[t(it[N.kind]||"kindKnowledge")," \xB7 ",N.status==="rejected"?t("rejected"):t("bucketDeleted")," \xB7 ",va(N.deletedAt||N.updated)||"-"]})]}),(0,e.jsxs)("div",{className:"mc-v5-recycle-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!m,title:N.status==="rejected"?t("restoreToQueue"):t("restore"),onClick:()=>v("restore",N.path),children:N.status==="rejected"?t("restoreToQueue"):t("restore")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!m,onClick:()=>{window.confirm(t("purgeConfirm"))&&v("purge",N.path)},children:t("purge")})]})]},N.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 en=(t,a)=>{let n=String(t||"").split(/\r?\n/),i=m=>String(m||"").replace(/[#*_`]/g,"").replace(/[\s::\-–—·]/g,"").trim(),s=i(a);for(;;){let m=0;for(;m<n.length&&!n[m].trim();)m++;let b=/^#{1,2}\s+(.+?)\s*$/.exec(n[m]||"");if(!b||i(b[1])!==s)break;for(n.splice(m,1);m<n.length&&!n[m].trim();)n.splice(m,1)}return n.join(`
|
|
1243
|
+
`)},gr=t=>{let a=[],n=!1,i=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;i++;let k=b[1].length;k<=3&&a.push({id:"md-h-"+i,level:k,text:b[2].replace(/[#*_`>\[\]()]/g,"").replace(/\s+/g," ").trim()})}return a},tn=t=>{let a=String(t.summary||"").replace(/[#>*_`]/g," ").replace(/\s+/g," ").trim();return a.length>150?a.slice(0,148)+"\u2026":a},Zn=t=>{let a=String(t.summary||"").toLowerCase();return/决策|结论|决定|decision/.test(a)?"insightDecision":/根因|原因|root cause/.test(a)?"insightRoot":/教训|避免|lesson/.test(a)?"insightLesson":"insightSummary"},eo=({n:t=0,color:a="#ff9a72",size:n=30})=>{let i=Math.max(2,Math.min(6,Number(t)||2)),s=Array.from({length:i},(m,b)=>{let k=-Math.PI/2+b*Math.PI*2/i,f=b%2?13:16;return[20+Math.cos(k)*f,20+Math.sin(k)*f]});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],k)=>(0,e.jsx)("line",{x1:"20",y1:"20",x2:m,y2:b,stroke:a,strokeOpacity:".35"},"l"+k)),s.map(([m,b],k)=>(0,e.jsx)("circle",{cx:m,cy:b,r:k%2?2.2:1.8,fill:a,fillOpacity:k%2?.8:.55},"c"+k)),(0,e.jsx)("circle",{cx:"20",cy:"20",r:"2.6",fill:a})]})},fr=({card:t,t:a,onOpen:n,query:i,onDelete:s,onTagClick:m,pinned:b,onPin:k,onCore:f,links:y})=>{let u=ft[t.kind]||ft.other,v=Number(y??t.links??t.weight??0),N=Ua(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:u,background:u+"18",borderColor:u+"38"},children:Gt[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:Ht(t.updated)}),f&&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:z=>{z.stopPropagation(),f(t.path,t.kind==="core"?"knowledge":"core")},children:t.kind==="core"?"\u2B50 "+a("coreShort"):"\u2606 "+a("setCoreShort")}),k&&(0,e.jsx)("button",{type:"button",className:`mc-v5-pin${b?" on":""}`,title:a(b?"unpinCard":"pinCard"),"aria-label":a(b?"unpinCard":"pinCard"),onClick:z=>{z.stopPropagation(),k(t.path)},children:"\u{1F4CC}"})]}),(0,e.jsx)("h4",{className:"mc-v5-card-title",children:i?Ga(t.title,i):t.title}),(0,e.jsxs)("div",{className:"mc-v5-card-insight",children:[(0,e.jsx)("span",{className:"mc-v5-insight-k",children:a(Zn(t))}),(0,e.jsx)("span",{className:"mc-v5-card-lead",children:i?Ga(t.summary||"",i):tn(t)})]}),i&&(()=>{let z=fn(t.body||"",i);return z?(0,e.jsx)("p",{className:"mc-snippet",children:Ga(z,i)}):null})(),Ua(t).length>0&&(0,e.jsxs)("div",{className:"mc-tags mc-v5-card-tags",children:[Ua(t).slice(0,2).map(z=>(0,e.jsxs)("button",{type:"button",className:"mc-tag mc-tag-click",title:z,onClick:$=>{$.stopPropagation(),m&&m(z)},children:["#",z]},z)),N.length>2&&(0,e.jsxs)("span",{className:"mc-tag more",children:["+",N.length-2]})]}),(0,e.jsxs)("footer",{className:"mc-v5-card-foot",children:[v>0&&(0,e.jsxs)("span",{className:"mc-v5-conn",children:[(0,e.jsx)(eo,{n:v,color:u})," ",(0,e.jsx)("b",{children:v})," ",a("links")]}),(0,e.jsxs)("span",{className:"mc-v5-author",children:["\u{1F916} ",qt(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:z=>{z.stopPropagation(),window.confirm(a("deleteConfirm"))&&s&&s(t.path)},children:"\u{1F5D1}"})]})]})};function br({t,tab:a,onReload:n,version:i}){let[s,m]=(0,r.useState)(null),[b,k]=(0,r.useState)(""),[f,y]=(0,r.useState)(null),[u,v]=(0,r.useState)(null),[N,z]=(0,r.useState)(null),[$,j]=(0,r.useState)(null),[R,I]=(0,r.useState)(null),[D,W]=(0,r.useState)(null),ge=(0,r.useCallback)(async()=>{G("align");try{let d=await fetch(K+"/align").then(H=>H.json());d&&d.findings?W(d):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{G("")}},[t]),oe=async()=>{if(window.confirm(t("alignFixConfirm"))){G("alignfix");try{let d=await fetch(K+"/setup-run",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(H=>H.json());d&&d.ok?(notify(t("alignFixed")),await ge()):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{G("")}}},[q,_]=(0,r.useState)([]),[Y,G]=(0,r.useState)(""),[Z,fe]=(0,r.useState)(!1),ue=(0,r.useCallback)(async()=>{if(!(!f||!f.merge||!f.merge.length)&&window.confirm(t("mergeAllConfirm"))){G("merge");try{let d={},H=le=>d[le]===void 0?le:d[le]=H(d[le]),F=(le,C)=>{d[H(le)]=H(C)},ie=new Set;for(let le of f.merge)ie.add(le.a.path),ie.add(le.b.path),F(le.a.path,le.b.path);let ze={};for(let le of ie){let C=H(le);(ze[C]=ze[C]||[]).push(le)}let ke=0;for(let le of Object.values(ze)){if(le.length<2)continue;(await fetch(`${K}/merge?paths=${encodeURIComponent(le.join(","))}`).then(se=>se.json())).ok&&ke++}await de(),n&&n()}catch{}G("")}},[f,de,n,t]);async function de(){try{let d=await Promise.all([fetch(`${K}/stats`),fetch(`${K}/budget`),fetch(`${K}/capture-log`),fetch(`${K}/cards?status=all&limit=30&agent=${ma}`),fetch(`${K}/overview`),fetch(`${K}/ledger?days=7`)]),[H,F,ie,ze,ke,le]=await Promise.all(d.map(C=>C.json()));H&&H.ok&&m(H),F&&F.ok&&v(F),ie&&ie.ok&&z(ie),ze&&ze.ok&&_(ze.cards||[]),ke&&ke.ok&&j({db:ke.db,backups:ke.backups,total:ke.total,version:ke.version,degraded:ke.degraded===!0}),I(le&&le.ok?le:{ok:!1,error:le&&le.error||""}),k(!H||!H.ok?t("adminLoadFail"):"")}catch{k(t("adminLoadFail"))}}let Re=(0,r.useCallback)(async()=>{G("scan");try{let d=await fetch(`${K}/optimize`).then(H=>H.json());d.ok&&y(d)}catch{k(t("adminLoadFail"))}finally{G("")}},[t]),[P,be]=(0,r.useState)(null),xe=(0,r.useCallback)(async()=>{G("refine");try{let d=await fetch(`${K}/refine-scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:8})}).then(H=>H.json());d&&d.ok?be(d):notify(d&&d.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{G("")}},[t]),Ue=async(d,H)=>{if(!(H==="merge"&&!window.confirm(t("mergeConfirm")))){G("refineapply");try{let F=await fetch(`${K}/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(ie=>ie.json());F&&F.ok?(notify(t("refineApplied")),be(ie=>ie&&{...ie,findings:(ie.findings||[]).filter(ze=>!(ze.a.path===d.a.path&&ze.b.path===d.b.path))}),await de(),n&&n()):notify(F&&F.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{G("")}}},[ce,Q]=(0,r.useState)(null),_e=(0,r.useCallback)(async()=>{G("junk");try{let d=await fetch(`${K}/refine-junk`).then(H=>H.json());d&&d.ok?Q(d.items||[]):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{G("")}},[t]),Fe=async d=>{if(d.length&&window.confirm(t("junkRecycleAllConfirm"))){G("junkpurge");try{let H=await fetch(`${K}/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":"")),Q(F=>F&&F.filter(ie=>!H.removed.includes(ie.path))),await de(),n&&n()):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{G("")}}},[ee,p]=(0,r.useState)(null),E=(0,r.useCallback)(async()=>{G("goals");try{let d=await fetch(K+"/refine-goals",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:30})}).then(H=>H.json());d&&d.ok?p(d):notify(d&&d.error||t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{G("")}},[t]),S=async d=>{G("goalskeep");try{let H=await fetch(K+"/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")),p(F=>F&&{...F,clusters:(F.clusters||[]).filter(ie=>ie.goal!==d.goal)})):notify(t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{G("")}},O=async d=>{if(window.confirm(t("mergeConfirm"))){G("goalsmerge");try{let H=await fetch(K+"/merge?paths="+encodeURIComponent(d.members.map(F=>F.path).join(","))).then(F=>F.json());H&&H.ok?(notify(t("goalMerged")),p(F=>F&&{...F,clusters:(F.clusters||[]).filter(ie=>ie.goal!==d.goal)}),await de(),n&&n()):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{G("")}}};(0,r.useEffect)(()=>{de()},[i]);let pe=async(d,H)=>{if(window.confirm(t("mergeConfirm")))try{(await fetch(`${K}/merge?paths=${encodeURIComponent(d+","+H)}`).then(ie=>ie.json())).ok&&(await de(),n&&n())}catch{}},Ae=async d=>{if(window.confirm(t("deleteConfirm")))try{(await fetch(`${K}/delete?path=${encodeURIComponent(d)}`).then(F=>F.json())).ok&&(await de(),n&&n())}catch{}},ne=Yn,J=({title:d,kind:H,updated:F,path:ie})=>(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:Ct.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:Ht(F)}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>Ae(ie),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:bt}),(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:de,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:()=>de(),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:N?.available?N.health?.ok?"\u6B63\u5E38":"\u5F02\u5E38":"\u2014"}),(0,e.jsx)("span",{children:t("captureTitle")}),(0,e.jsx)("small",{children:N?.health?.lastAt?Ht(new Date(N.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:()=>de(),children:["\u21BB ",t("refresh")]})]}),$?(()=>{let d=$.db||{},H=d.writable!==!1&&!d.corrupt,F=$.backups||{count:0,newestAt:0},ie=F.newestAt?Math.floor((Date.now()-Number(F.newestAt))/864e5):-1,ze=F.count?ie>7?"warn":"ok":"bad",ke=N&&N.available?N.health:null,le=ke?ke.ok?"ok":"warn":"none",C=D&&D.findings?D.onDisk&&D.residentServed===D.onDisk&&D.hostVersion===D.onDisk?"ok":"warn":"none",se={ok:["\u2705","#10b981"],warn:["\u26A0","#f59e0b"],bad:["\u2717","#ef4444"],none:["\u2022","inherit"]},te=[{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:ze,text:F.count?(ie<=0?t("healthBackupToday").replace("{n}",String(F.count)):t("healthBackupAge").replace("{n}",String(F.count)).replace("{d}",String(ie)))+(F.files&&F.files.length?" \xB7 "+F.files[F.files.length-1]:""):t("healthNoBackups")},{label:t("healthCapture"),level:le,text:ke?ke.ok?t("healthCapOk"):t("healthCapFail")+"\uFF1A"+(ke.reason||""):t("healthNoRecords")},{label:t("healthVersion"),level:C,text:C==="none"?t("healthRunAlign"):t("vcOnDisk")+" v"+(D.onDisk||"?")+" \xB7 "+t("vcResident")+" v"+(D.residentServed||"?")+" \xB7 "+t("vcLoaded")+" v"+(D.hostVersion||"?"),action:C==="none"?{label:t("alignRun"),run:ge}:null}];return(0,e.jsx)("div",{style:{marginTop:6},children:te.map(Se=>(0,e.jsxs)("div",{className:"me-health-row",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:se[Se.level][1]},children:se[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:!!Y,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:()=>de(),children:["\u21BB ",t("refresh")]})]}),R?R.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(R.error||""))?t("ledgerNeedRestart"):R.error||t("adminLoadFail")]}):R.totals.recalls+R.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(R.totals.recalls),s:t("ledgerInjected")+" "+Number(R.totals.injectedChars||0).toLocaleString()+" "+t("ledgerChars")},{k:t("ledgerCaptures"),v:String(R.totals.captures),s:t("ledgerLlmCalls")+" "+R.totals.llmCalls+(R.totals.captureFail?" \xB7 \u2717 "+R.totals.captureFail:"")},{k:t("ledgerEstimate"),v:"\u2248 "+Number(R.totals.estTokens||0).toLocaleString(),s:t("ledgerEstimateHint")},{k:t("ledgerUseful"),v:R.feedback.rate==null?"\u2014":Math.round(R.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:!!Y,onClick:ge,children:t(Y==="align"?"exporting":"alignRun")}),D&&D.counts&&D.counts.fix>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!Y,onClick:oe,children:t(Y==="alignfix"?"exporting":"alignFix")}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("alignHint")})]}),D&&D.findings?(0,e.jsxs)("div",{style:{marginTop:6},children:[(0,e.jsxs)("div",{style:{fontSize:12,opacity:.75,marginBottom:4},children:[t("alignDisk")," v",D.onDisk||"?",D.residentServed?" \xB7 "+t("alignResident")+" v"+D.residentServed:"",D.hostVersion?" \xB7 "+t("alignHost")+" v"+D.hostVersion:""]}),(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:D.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:()=>de(),children:["\u21BB ",t("refresh")]})]}),N?N.available===!1?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogUnavailable")}):(N.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:(N.entries||[]).map((d,H)=>{let F=Bo[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:Ht(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",q.length,"\uFF09"]}),q.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:q.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:ft[d.kind]||ft.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:Ht(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(ke=>ke.count),1),F=260,ie=50,ze=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:ie,style:{display:"block",width:"100%",height:50},children:d.map((ke,le)=>{let C=Math.round(ke.count/H*(ie-4));return(0,e.jsx)("rect",{x:le*ze+1,y:ie-C,width:Math.max(ze-2,2),height:C,rx:1.5,fill:ke.count>0?"var(--dsw-alias-accent, #3b82f6)":"var(--dsw-alias-border-l1, #e5e7eb)",opacity:ke.count>0?.85:.35},ke.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:ne.map(d=>(0,e.jsxs)("span",{style:{fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:Ct.colors[d]||"#666"}}),t(it[d]),": ",s.byKind?.[d]||0]},d))})]}),u&&(u.budgetChars||u.recallLimit||u.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:u.budgetChars||8e4})," \xB7 ",t("recallLimitLabel")," ",(0,e.jsx)("b",{children:u.recallLimit||5})," \xB7 ",t("embeddingLabel")," ",u.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)(J,{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:!!Y,onClick:Re,children:Y==="scan"?t("exporting"):"\u{1F50D} "+t("scanAndOrganize")}),f&&f.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!Y,onClick:async()=>{if(window.confirm(t("oneClickOptimizeConfirm"))){G("oneclick");try{let d=JSON.stringify({cleanupStale:Z}),F=await(await fetch(`${K}/optimize-execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:d})).json();F&&F.ok?(notify(`${t("oneClickOptimizeDone")}\uFF1A${F.plan.merged} ${t("optimizedMerged")}${Z?` \xB7 ${F.plan.staleDeleted} ${t("optimizedStaleDeleted")}`:""}`),await de(),n&&n(),y(null)):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{G("")}}},children:Y==="oneclick"?t("exporting"):"\u26A1 "+t("oneClickOptimize")}),f&&f.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:Z,onChange:d=>fe(d.target.checked)}),t("oneClickAlsoStale")]})]}),!f&&(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:10},children:t("scanHint")}),f&&(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}}),f.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!Y,onClick:ue,children:t(Y==="merge"?"exporting":"batchMerge")})]}),(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("mergePairs")}),f.merge?.length?(0,e.jsx)("ul",{style:{margin:"0 0 12px",padding:0,listStyle:"none"},children:f.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:()=>pe(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",f.stale?.length||0,"\uFF09"]}),f.stale?.length>0&&(0,e.jsx)("div",{style:{marginBottom:6},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!Y,onClick:async()=>{if(!window.confirm(t("deleteConfirm")))return;G("clean");let d=0;for(let H of f.stale)try{await fetch(`${K}/delete?path=${encodeURIComponent(H.path)}`),d++}catch{}G(""),notify(`${d} ${t("deletedStale")}`),await de(),n&&n()},children:t("cleanStale")})}),f.stale?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:f.stale.map(d=>(0,e.jsx)(J,{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:!!Y,onClick:xe,children:t(Y==="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:!!Y,onClick:()=>Ue(d,"keepA"),children:t("refineKeepA")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!Y,onClick:()=>Ue(d,"keepB"),children:t("refineKeepB")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!Y,onClick:()=>Ue(d,"keepBoth"),children:t("refineKeepBoth")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!Y,onClick:()=>Ue(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:!!Y,onClick:_e,children:t(Y==="junk"?"exporting":"junkScan")}),ce?.length?(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!Y,onClick:()=>Fe(ce.map(d=>d.path)),children:t(Y==="junkpurge"?"exporting":"junkRecycleAll")}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("junkHint")})]}),ce?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:ce.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:!!Y,onClick:()=>Fe([d.path]),children:t("junkRecycle")})]},H))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(ce?"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:!!Y,onClick:E,children:t(Y==="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((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,ie)=>(0,e.jsx)("li",{children:F.title},ie))}),(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:!!Y,onClick:()=>S(d),children:t("goalKeep")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!Y,onClick:()=>O(d),children:t("goalMerge")})]})]},H)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(ee?"goalNone":"goalIdle")})]})]})]})]})}var qa=[{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 hr({t,newCard:a,setNewCard:n,onCreated:i}){if(!a)return null;let s=qa.find(v=>v.key===a.template),m=a.body||(s?t(s.bodyKey):""),b=a.kind||(s?s.kind:"knowledge"),k=a.tags||(s?t(s.tagKey):""),f=a._creating,y=v=>{let N=qa.find(z=>z.key===v);n(z=>({...z,template:v,kind:N?N.kind:z.kind,body:N?t(N.bodyKey):z.body,tags:N?t(N.tagKey):z.tags}))},u=async()=>{if(!(!a.title&&!m)){n(v=>({...v,_creating:!0}));try{(await fetch(`${K}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a.title||t("untitled"),kind:b,tags:k.split(",").map(N=>N.trim()).filter(Boolean),body:m,source:"manual"})}).then(N=>N.json())).ok?(n(null),i&&i()):n(N=>({...N,_creating:!1}))}catch{n(N=>({...N,_creating:!1}))}}};return(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>n(null),children:[(0,e.jsx)("style",{children:bt}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:600,width:"92vw",maxHeight:"85vh"},onClick:v=>v.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:[qa.map(v=>(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===v.key?" me-on":""}`,onClick:()=>y(v.key),children:t(v.label)},v.key)),(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===""?" me-on":""}`,onClick:()=>n(v=>({...v,template:"",body:"",tags:"",kind:"knowledge"})),children:t("tplBlank")})]}),(0,e.jsx)("select",{className:"mc-btn",value:b,onChange:v=>n(N=>({...N,kind:v.target.value})),style:{maxWidth:180,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:Yn.map(v=>(0,e.jsx)("option",{value:v,style:{background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:t(it[v])||v},v))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("cardTitle"),value:a.title||"",onChange:v=>n(N=>({...N,title:v.target.value}))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("tagsHint"),value:k,onChange:v=>n(N=>({...N,tags:v.target.value}))}),(0,e.jsx)("textarea",{className:"mc-btn",placeholder:t("cardBody"),value:m,onChange:v=>n(N=>({...N,body:v.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:f,onClick:u,children:t(f?"exporting":"createCard")})})]})]})]})}async function Xa(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 i=!!(document.execCommand&&document.execCommand("copy"));return document.body.removeChild(n),i}catch{return!1}}function yr({t,onClose:a}){let[n,i]=(0,r.useState)(""),[s,m]=(0,r.useState)(""),[b,k]=(0,r.useState)(""),[f,y]=(0,r.useState)(!0),[u,v]=(0,r.useState)(!1),[N,z]=(0,r.useState)(""),[$,j]=(0,r.useState)(""),R=(0,r.useRef)(null),I=(0,r.useRef)(null),D=()=>{let Z=R.current;if(Z)try{Z.focus(),Z.select()}catch{}},W=Z=>{z(Z),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>z(""),2400)};(0,r.useEffect)(()=>{let Z=!0;return fetch(K+"/diagnostics").then(fe=>fe.json()).then(fe=>{Z&&(fe&&fe.ok?(m(String(fe.diagnostics||"")),k(String(fe.version||""))):v(!0))}).catch(()=>{Z&&v(!0)}).finally(()=>{Z&&y(!1)}),()=>{Z=!1}},[]),(0,r.useEffect)(()=>{let Z=fe=>{fe.key==="Escape"&&a()};return window.addEventListener("keydown",Z),()=>{window.removeEventListener("keydown",Z),I.current&&clearTimeout(I.current)}},[a]);let ge=(()=>{try{return String(navigator.language||"").toLowerCase().startsWith("en")?"en":"zh"}catch{return"zh"}})(),oe=()=>{let Z=n.trim().split(`
|
|
1244
|
+
`)[0]||"",fe=vn({title:"[Bug] "+(Z.slice(0,60)||"memory-eternal \u95EE\u9898"),body:wn({description:n,diagnostics:s,version:b})});try{window.open(fe,"_blank","noopener")}catch{W(t("fbCopyFail"))}},q=async()=>{await Xa(s)?(j(""),W(t("fbCopiedDiag"))):(j(s),W(t("fbCopyManual")))},_=async()=>{let Z=kn({lang:ge,description:n,diagnostics:s});await Xa(Z)?(j(""),W(t("fbCopiedPrompt"))):(j(Z),W(t("fbCopyManual")))},Y={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},G={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:bt}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:720},onClick:Z=>Z.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:Z=>i(Z.target.value),placeholder:t("fbDesc"),rows:5,style:Y}),(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:q,disabled:!s,children:t("fbCopyDiag")})]}),(0,e.jsx)("pre",{style:G,children:f?t("fbLoading"):u?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()){W(t("fbNeedDesc"));return}oe()},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:_,children:["\u{1F916} ",t("fbCopyPrompt")]})]}),N&&(0,e.jsx)("div",{style:{fontSize:12,color:"var(--dsw-alias-brand-primary, #3b82f6)"},children:N}),$&&(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:D,children:t("fbSelectAll")})]}),(0,e.jsx)("textarea",{ref:R,readOnly:!0,value:$,rows:7,style:Y})]})]})]})]})}function xr({t,tab:a,onTab:n,onClose:i,onFeedback:s,onReplay:m}){let[b,k]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!b)return;let v=N=>{N.key==="Escape"&&k(null)};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[b]);let f=[{id:"group",label:t("supportGroup")},{id:"sponsor",label:t("supportSponsor")},{id:"legacy",label:t("supportLegacy")}],y="https://github.com/EternalNight996/memory-eternal/blob/main/README.md",u=(v,N)=>(0,e.jsxs)("figure",{children:[(0,e.jsx)("img",{src:v,alt:N,loading:"lazy",title:t("clickToZoom"),onClick:z=>k(z.currentTarget.currentSrc||v),onError:z=>{let $=z.currentTarget;$.dataset.fb||($.dataset.fb="1",$.src="https://raw.githubusercontent.com/EternalNight996/memory-eternal/main/assets/support/"+String(v).split("/").pop())}}),(0,e.jsx)("figcaption",{children:N})]});return(0,e.jsxs)("div",{className:"me-overlay",onClick:i,children:[(0,e.jsx)("style",{children:bt}),(0,e.jsxs)("div",{className:"me-dialog me-support",onClick:v=>v.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:i,children:t("close")})})]}),(0,e.jsx)("div",{className:"me-support-tabs",children:f.map(v=>(0,e.jsx)("button",{type:"button",className:`me-support-tab${a===v.id?" active":""}`,onClick:()=>n(v.id),children:v.label},v.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:[u("support/group-qr.jpg",t("supportGroupQQ")),u("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:y,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:[u("support/wechat-pay.jpg","\u5FAE\u4FE1\u6536\u6B3E\u7801"),u("support/wechat-reward.jpg","\u5FAE\u4FE1\u8D5E\u8D4F\u7801"),u("support/alipay.jpg",t("supportAlipay"))]}),(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:y,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:v=>{v.stopPropagation(),k(null)},children:[(0,e.jsx)("button",{type:"button",className:"me-lightbox-close",onClick:v=>{v.stopPropagation(),k(null)},"aria-label":t("close"),children:"\u2715"}),(0,e.jsx)("img",{src:b,alt:"",onClick:v=>v.stopPropagation()})]})]})}function vr({t,onDone:a}){let[n,i]=(0,r.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,r.useEffect)(()=>{let k=f=>{f.key==="Escape"&&a()};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[a]),(0,e.jsxs)("div",{className:"me-overlay",style:{zIndex:1006},children:[(0,e.jsx)("style",{children:bt}),(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((k,f)=>(0,e.jsx)("span",{className:`me-guide-dot${f<=n?" on":""}`},f))}),(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:()=>Ca(s),children:["\u2605 ",t("onboardStar")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Ca(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:()=>i(k=>k-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:()=>i(k=>k+1),children:t(n===0?"onboardStarred":"onboardNext")})]})]})]})}function wr({t,card:a,query:n,onClose:i,onDelete:s,onFeedback:m,onNavigate:b,onTagClick:k,allCards:f,onOpenRelated:y,onKindChange:u,onSaved:v}){let[N,z]=(0,r.useState)(0),[$,j]=(0,r.useState)(""),[R,I]=(0,r.useState)(()=>{try{let C=localStorage.getItem("me-read-width");return["narrow","mid","wide"].includes(C)?C:"mid"}catch{return"mid"}}),D={narrow:720,mid:900,wide:1180};(0,r.useEffect)(()=>{let C=se=>{if(se.key==="Escape"){i();return}let te=String(se.target&&se.target.tagName||"").toLowerCase();te==="input"||te==="textarea"||te==="select"||se.target&&se.target.isContentEditable||(se.key==="j"&&b?(se.preventDefault(),b(1)):se.key==="k"&&b&&(se.preventDefault(),b(-1)))};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[i,b]);let W=async(C,se)=>{let te=await Xa(String(C||""));j(te?t("copied")+" \xB7 "+se:t("copyFail")),setTimeout(()=>j(""),1500)},{meta:ge,body:oe}=(0,r.useMemo)(()=>ha(a.text||""),[a.text]),q=C=>{let se=ge.find(([te])=>String(te).toLowerCase()===C);return se?se[1]:""},_=gn(q("tags")),Y=a.kind||q("kind")||"knowledge",G=String(a.status||q("status")||"approved").toLowerCase(),Z=ft[Y]||"#6B7280",fe=(oe||"").length>460,ue=(0,r.useMemo)(()=>en(oe,a.title),[oe,a.title]),de=(0,r.useMemo)(()=>{let C=tn(a);if(C)return C;let te=(ue.split(/\r?\n/).map(Se=>Se.trim()).find(Se=>Se&&!/^#{1,2}\s/.test(Se))||"").replace(/[#>*_`]/g,"").replace(/\s+/g," ").trim();return te.length>150?te.slice(0,148)+"\u2026":te},[a,ue]),Re=(0,r.useMemo)(()=>gr(ue),[ue]),P=(0,r.useMemo)(()=>{let C=new Set(_);return(f||[]).filter(se=>se.path!==a.path&&(se.tags||[]).some(te=>C.has(te))).slice(0,3)},[f,a.path,_.join("|")]),be=()=>{p(String(a.title||"")),S((Array.isArray(_)?_:[]).join(", ")),pe(String(oe||"")),d(""),Fe(!0)},xe=()=>{Fe(!1),d("")},Ue=async()=>{let C=String(ee||"").trim(),se=String(O||"").trim();if(!C){d(t("editTitleEmpty"));return}if(!se){d(t("editBodyEmpty"));return}let te=String(E||"").split(/[,,\n]+/).map(Se=>Se.trim()).filter(Boolean);ne(!0),d("");try{let Se=await fetch(`${K}/card/update`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:a.path,title:C,tags:te,body:se})}).then(ot=>ot.json());if(!Se||!Se.ok){d(Se&&Se.error||t("editFail"));return}Fe(!1),v&&await v({path:a.path,status:G,title:C})}catch(Se){d(String(Se&&Se.message||Se))}finally{ne(!1)}},[ce,Q]=(0,r.useState)(!0),[_e,Fe]=(0,r.useState)(!1),[ee,p]=(0,r.useState)(""),[E,S]=(0,r.useState)(""),[O,pe]=(0,r.useState)(""),[Ae,ne]=(0,r.useState)(!1),[J,d]=(0,r.useState)(""),H=(0,r.useRef)(null),[F,ie]=(0,r.useState)(""),ze=C=>{let se=H.current;if(!se)return;let te=document.getElementById(C);if(!te||!se.contains(te))return;let Se=te.getBoundingClientRect().top-se.getBoundingClientRect().top+se.scrollTop-12;se.scrollTo({top:Math.max(0,Se),behavior:"smooth"})},ke=C=>{if(!ce){Q(!0),setTimeout(()=>ze(C),80);return}ze(C)},le=C=>{let se=C.currentTarget,te=se.scrollHeight-se.clientHeight;z(te<=0?100:Math.min(100,Math.max(0,se.scrollTop/te*100)));let Se=se.querySelectorAll(".md-doc .md-h"),ot="",st=se.getBoundingClientRect().top+28;for(let yt of Se)if(yt.getBoundingClientRect().top<=st)ot=yt.id;else break;ie(ot)};return(0,e.jsxs)("div",{className:"me-overlay",onClick:i,children:[(0,e.jsx)("style",{children:bt}),(0,e.jsxs)("div",{className:"me-dialog me-reader-dialog",onClick:C=>C.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:Gt[Y]||"\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:()=>W(oe,t("copyBody")),children:["\u{1F4CB} ",t("copyBody")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyPath"),onClick:()=>W(a.path,t("copyPath")),children:["\u{1F517} ",t("copyPath")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",title:t("editCard"),onClick:_e?xe:be,children:_e?"\u2716 "+t("editCancel"):"\u270F\uFE0F "+t("editCard")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("readWidth"),onClick:()=>{let C=["narrow","mid","wide"],se=C[(C.indexOf(R)+1)%C.length];I(se);try{localStorage.setItem("me-read-width",se)}catch{}},children:[t("readWidth")," \xB7 ",t(R==="narrow"?"widthNarrow":R==="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")]}),fe&&(0,e.jsx)("button",{type:"button",className:"mc-btn","aria-expanded":ce,onClick:()=>Q(C=>!C),children:t(ce?"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")}),u&&G==="approved"&&(Y==="core"?(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>u(a.path,"knowledge"),children:t("unsetCore")}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>u(a.path,"core"),children:["\u2B50 ",t("setCore")]})),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:i,children:t("close")})]})]}),u&&(0,e.jsxs)("div",{className:"me-core-banner"+(Y==="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(Y==="core"?"coreActiveHint":"coreInactiveHint")}),G==="approved"?(0,e.jsx)("button",{type:"button",className:"mc-btn me-core-btn",onClick:()=>u(a.path,Y==="core"?"knowledge":"core"),children:Y==="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:Z,borderColor:Z+"59",background:Z+"1a"},children:[Gt[Y]||"\u{1F4CE}"," ",t(it[Y]||"kindKnowledge")]}),(0,e.jsxs)("span",{className:"md-chip "+(G==="approved"?"md-chip-st-ok":G==="pending"?"md-chip-st-warn":"md-chip-st-bad"),children:[G==="approved"?"\u2705":G==="pending"?"\u23F3":"\u26D4"," ",t(G==="approved"?"statusApproved":G==="pending"?"statusPending":"statusRejected")]}),(Array.isArray(_)?_:[]).slice(0,8).map(C=>(0,e.jsxs)("button",{type:"button",className:"md-chip md-chip-tag mc-tag-click",title:C,onClick:()=>k&&k(C),children:["\u{1F3F7} ",C]},C)),!!q("updated")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F552} ",t("updated")," ",Ht(q("updated"))]}),!!q("source")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F4E5} ",q("source")]})]}),(0,e.jsx)("div",{className:"me-read-progress","aria-hidden":"true",children:(0,e.jsx)("i",{style:{width:N+"%"}})}),(0,e.jsxs)("div",{className:"me-reader-body",children:[(0,e.jsxs)("div",{className:"me-dialog-body me-reader-main",style:{maxWidth:D[R],margin:"0 auto",width:"100%",boxSizing:"border-box",...ce?{}:{maxHeight:300,overflow:"hidden"}},ref:H,onScroll:le,onClick:ce?void 0:C=>{C.stopPropagation(),Q(!0)},children:[!_e&&!!de&&(0,e.jsxs)("div",{className:"me-reader-callout",children:[(0,e.jsx)("span",{className:"me-reader-callout-k",children:t(Zn(a))}),(0,e.jsx)("p",{children:de})]}),_e?(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:C=>p(C.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:E,onChange:C=>S(C.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:O,onChange:C=>pe(C.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"}}),J&&(0,e.jsx)("div",{style:{color:"#f87171",fontSize:12},children:J}),(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:xe,disabled:Ae,children:t("editCancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Ue,disabled:Ae,style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:t(Ae?"editSaving":"editSave")})]})]}):(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:la(ue)}})]}),(0,e.jsxs)("aside",{className:"me-reader-side",children:[Re.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:Re.map((C,se)=>(0,e.jsxs)("button",{type:"button",className:`lv${C.level}${F===C.id?" active":""}`,onClick:()=>ke(C.id),children:[(0,e.jsx)("span",{children:String(se+1).padStart(2,"0")}),C.text]},C.id))})]}),(0,e.jsx)("div",{className:"side-label",children:t("source")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:q("source")||a.submittedBy||"\u2014"}),(0,e.jsx)("div",{className:"side-label",children:t("updated")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:Ht(q("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}),_.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:_.slice(0,8).map(C=>(0,e.jsxs)("button",{type:"button",className:"mc-chip",onClick:()=>k&&k(C),children:["#",C]},C))})]}),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(C=>(0,e.jsxs)("button",{type:"button",onClick:()=>y&&y(C),children:[(0,e.jsx)("span",{children:Gt[C.kind]||"\u{1F4CE}"}),(0,e.jsx)("b",{children:C.title})]},C.path))})]})]})]}),!ce&&(0,e.jsxs)("div",{className:"md-collapsed-hint",onClick:C=>{C.stopPropagation(),Q(!0)},children:[t("expand")," \u2304"]})]})]})}function kr({t,onOpen:a,all:n,onAllChange:i,onMutate:s,active:m,visible:b}){let[k,f]=(0,r.useState)([]),[y,u]=(0,r.useState)(null),[v,N]=(0,r.useState)(null),[z,$]=(0,r.useState)(!1),j=!0,[R,I]=(0,r.useState)(null),[D,W]=(0,r.useState)(!1),[ge,oe]=(0,r.useState)(!1),[q,_]=(0,r.useState)(null),Y=(0,r.useRef)(0),G=(0,r.useRef)(null);G.current||(G.current=In(96));let Z=(0,r.useRef)(0),fe=(0,r.useRef)(0),ue=(0,r.useRef)(k);ue.current=k;let de=(0,r.useRef)(n),Re=(0,r.useRef)({requests:0,cacheHits:0,errors:0,timeouts:0,lastMs:0,lastBytes:0}),P=(0,r.useCallback)(async(ne,J={})=>{let d=Array.isArray(ne)?ne.filter(Boolean):[],H=(n?"all|":"")+Xt(d);if(!J.force){let le=G.current.get(H);if(le)return Re.current.cacheHits+=1,u(le),f(d),N(null),$(!1),le}let F=++Z.current;$(!0),N(null);let ie=new AbortController,ze=setTimeout(()=>{try{ie.abort()}catch{}},1600),ke=performance.now();Re.current.requests+=1;try{let le=await fetch(An(K,d,{all:n}),{signal:ie.signal}),C=await le.json().catch(()=>null);if(F!==Z.current)return null;if(!le.ok||!C||!C.ok)throw new Error(C&&C.error||"HTTP "+le.status);let se=En(C);if(!se.ok)try{console.warn("[memory-eternal] \u5206\u5C42\u54CD\u5E94\u8D8A\u754C\uFF1A"+se.problems.join("\uFF1B"))}catch{}return G.current.set(H,C),Re.current.lastMs=Math.round(performance.now()-ke),Re.current.lastBytes=se.bytes,fe.current||(fe.current=Math.round(performance.now())),u(C),f(d),N(null),C}catch(le){if(F!==Z.current)return null;let C=Fn(le,{timeoutMs:1600,elapsedMs:performance.now()-ke});C.timeout&&(Re.current.timeouts+=1),Re.current.errors+=1;try{console.warn("[memory-eternal] \u5C42\u7EA7\u52A0\u8F7D\u5931\u8D25 @ "+H+"\uFF1A"+C.message)}catch{}return N({...C,target:Xt(d),segments:d.slice()}),null}finally{clearTimeout(ze),F===Z.current&&$(!1)}},[n]);(0,r.useEffect)(()=>{de.current!==n&&(de.current=n,G.current.clear(),m&&P([],{force:!0}))},[n,m,P]),(0,r.useEffect)(()=>{!m||y||z||P([])},[m,y,z,P]),(0,r.useEffect)(()=>{b&&y&&Y.current++},[b,y]);let be=(0,r.useCallback)(ne=>{let J=Array.isArray(ne)?ne:zn(ne&&ne.path!==void 0?ne.path:ne);Xt(J)!==Xt(ue.current)&&P(J)},[P]),xe=(0,r.useCallback)(ne=>{ne&&P(ue.current.concat(String(ne)))},[P]),Ue=(0,r.useCallback)(()=>{G.current.clear();let ne=v&&Array.isArray(v.segments)?v.segments:ue.current;P(ne,{force:!0})},[P,v]),ce=(0,r.useCallback)(async()=>(G.current.clear(),P(ue.current,{force:!0})),[P]),Q=(0,r.useCallback)(async()=>{oe(!0),_(null);try{let ne=await fetch(`${K}/graph?${n?"all=1&":""}limit=${D?0:800}`),J=await ne.json().catch(()=>null);if(!ne.ok||!J||!J.ok)throw new Error(J&&J.error||"HTTP "+ne.status);let d=Array.isArray(J.nodes)?J.nodes:[],H=Array.isArray(J.edges)?J.edges:[],F=typeof J.shown=="number",ie=new Map;for(let te of H)ie.set(te.source,(ie.get(te.source)||0)+1),ie.set(te.target,(ie.get(te.target)||0)+1);let ke=D||F?d:d.slice().sort((te,Se)=>(ie.get(Se.id)||0)-(ie.get(te.id)||0)).slice(0,800),le=new Set(ke.map(te=>te.id)),C=ke.map(te=>({id:te.id,label:te.label||te.title||te.id,kind:te.kind||"other",tags:Array.isArray(te.tags)?te.tags:[],updated:te.updated||te.updated_at||"",count:0,type:"card"})),se=D?H:H.filter(te=>le.has(te.source)&&le.has(te.target));I({id:"flat",mode:"flat",total:Number(J.total)||d.length,shown:Number(J.shown)||C.length,items:C,edges:se})}catch(ne){_({message:String(ne&&ne.message||ne)})}finally{oe(!1)}},[n,D]);(0,r.useEffect)(()=>{Q()},[Q]);let _e=(0,r.useCallback)(async ne=>{try{let d=await(await fetch(`${K}/delete?path=${encodeURIComponent(ne)}`)).json();return d&&d.ok?(await ce(),s&&s(),!0):!1}catch{return!1}},[ce,s]),Fe=(0,r.useCallback)(async ne=>{if(!ne||ne.length<2)return!1;try{let J=await fetch(`${K}/merge?paths=${encodeURIComponent(ne.join(","))}`).then(d=>d.json());return J&&J.ok?(await ce(),s&&s(),!0):!1}catch{return!1}},[ce,s]);(0,r.useEffect)(()=>{let ne=()=>{let J=typeof globalThis.__meGraphRuntime=="function"?globalThis.__meGraphRuntime():null;return{path:Xt(ue.current),crumbs:y&&Array.isArray(y.crumbs)?y.crumbs.map(d=>({path:d.path,label:d.label,labelKey:d.labelKey,count:d.count})):[],level:y&&y.level?{mode:y.level.mode,total:y.level.total,items:y.level.items.length,edges:y.level.edges.length}:null,loading:!!z,error:v?{timeout:!!v.timeout,message:v.message,target:v.target||""}:null,requests:Re.current.requests,cacheHits:Re.current.cacheHits,errors:Re.current.errors,timeouts:Re.current.timeouts,lastMs:Re.current.lastMs,lastBytes:Re.current.lastBytes,firstLevelMs:fe.current,cacheSize:G.current.size,timeoutMs:1600,runtime:J}};return globalThis.__meGraphProbe=ne,()=>{if(globalThis.__meGraphProbe===ne)try{delete globalThis.__meGraphProbe}catch{globalThis.__meGraphProbe=void 0}}},[y,z,v]);let ee=j?R:y&&y.level?y.level:null,p=ee?ee.items.length:0,E=ee?ee.total:0,S=ee?ee.edges.length:0,O=j?ge:!y&&!v,pe=j?q:!y&&v,Ae=j?q:y?v:null;return(0,e.jsxs)("div",{className:"me-graph me-v5-graph",children:[(0,e.jsx)("style",{children:bt}),(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.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>W(ne=>!ne),children:t(D?"graphFlatOnly":"graphFlatAll")}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:(j?R:y)?`${p} ${t("graphItems")} \xB7 ${E} ${t("graphCardsUnit")} \xB7 ${S} ${t("edges")}`:""})]})]}),O&&(0,e.jsx)(to,{text:t("loadingGraph")}),pe&&(0,e.jsxs)("div",{className:"mc-empty",style:{display:"flex",flexDirection:"column",gap:10,alignItems:"center"},children:[(0,e.jsxs)("span",{children:[Ae&&Ae.timeout?t("graphLevelTimeout").replace("{ms}",String(1600)):t("graphLevelError"),"\uFF1A",Ae&&Ae.message]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:j?Q:Ue,children:t("graphRetry")})]}),(j?R:y)&&p===0&&(0,e.jsx)("div",{className:"mc-empty",children:t("graphEmptyLevel")}),ee&&p>0&&(0,e.jsx)(Nr,{level:ee,crumbs:j?[]:y&&y.crumbs?y.crumbs:[],onOpen:a,onDelete:_e,onMerge:Fe,onDrill:j?()=>{}:xe,onNavigate:be,onRetry:j?Q:Ue,error:Ae,loading:j?ge:z,t,all:n,onAllChange:i,fitTrigger:Y.current})]})}var Ct={colors:{core:"#FF7A45",skill:"#A78BFA",project:"#60A5FA",knowledge:"#34D399",content:"#FBBF24",prompt:"#C084FC",business:"#F472B6",tool:"#22B8CF",mistake:"#FB7185",other:"#8CA0B3"},deep:{core:"#E8590C",skill:"#7C3AED",project:"#2563EB",knowledge:"#059669",content:"#D97706",prompt:"#9333EA",business:"#DB2777",tool:"#0891B2",mistake:"#E11D48",other:"#64748B"},shapes:{core:"diamond",skill:"hexagon",project:"circle",knowledge:"circle",content:"rect",prompt:"diamond",business:"hexagon",tool:"circle",mistake:"diamond",other:"circle"}};function $t(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 ua({value:t,small:a}){let n=typeof t=="number"&&Number.isFinite(t),i=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(i):void 0,"aria-label":"\u52A0\u8F7D\u8FDB\u5EA6",children:(0,e.jsx)("span",{className:"me-progress-fill",style:n?{width:Math.max(3,i)+"%"}:void 0})})}function to({text:t,value:a}){return(0,e.jsxs)("div",{className:"me-loading",role:"status","aria-live":"polite",children:[(0,e.jsx)(ua,{value:a}),(0,e.jsx)("span",{className:"me-loading-text",children:t})]})}var Un=[];function Sr({crumbs:t,t:a,onPick:n,busy:i}){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 k=m.labelKey?a(m.labelKey):"",f=k&&k!==m.labelKey?k:m.label||m.path||"\u2014",y=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":"")+(y?" current":""),"aria-current":y?"page":void 0,title:f,disabled:y||i,onClick:()=>{y||n(m)},children:f})]},m.path||"root")})})}function Nr({level:t,crumbs:a,onOpen:n,onDelete:i,onMerge:s,onDrill:m,onNavigate:b,onRetry:k,error:f,loading:y,t:u,all:v,onAllChange:N,fitTrigger:z}){let $=(0,r.useRef)(null),j=(0,r.useRef)(null),R=(0,r.useRef)(null),I=(0,r.useRef)(null),D=(0,r.useRef)(null),W=t&&Array.isArray(t.items)?t.items:Un,ge=t&&Array.isArray(t.edges)?t.edges:Un,oe=t&&t.id||"",q=(0,r.useMemo)(()=>W.map(g=>({id:g.id,title:g.label||g.id,name:g.label||g.id,kind:g.kind||"other",tags:Array.isArray(g.tags)?g.tags:[],updated:g.updated||"",count:Number(g.count)||0,type:g.type||"card"})),[W]),_=(0,r.useMemo)(()=>ge.map(g=>({source:g.source,target:g.target,type:g.type||"tag",weight:Number(g.weight)||1})),[ge]),Y=(0,r.useRef)(u);Y.current=u;let G=(0,r.useRef)(n);(0,r.useEffect)(()=>{G.current=n},[n]);let Z=(0,r.useRef)(i);(0,r.useEffect)(()=>{Z.current=i},[i]);let fe=(0,r.useRef)(s);(0,r.useEffect)(()=>{fe.current=s},[s]);let ue=(0,r.useRef)(m);(0,r.useEffect)(()=>{ue.current=m},[m]);let[de,Re]=(0,r.useState)(""),[P,be]=(0,r.useState)(null),[xe,Ue]=(0,r.useState)(null),ce=(0,r.useRef)("");(0,r.useEffect)(()=>{ce.current=de.trim().toLowerCase()},[de]),(0,r.useEffect)(()=>{let g=R.current;if(!g)return;let c=de.trim().toLowerCase();if(!c)return;let re=g.nodes.find(Le=>(Le.name||"").toLowerCase().includes(c));if(re){R.current.selectedId=re.id,be(re.id),g.panX=g.w/2-re.x*g.zoom,g.panY=g.h/2-re.y*g.zoom;try{g.render&&g.render()}catch(Le){$t(Le,"search-center")}}},[de]);let[Q,_e]=(0,r.useState)("all"),[Fe,ee]=(0,r.useState)(!1),p=(0,r.useRef)("all"),[E,S]=(0,r.useState)(""),O=(0,r.useRef)(""),[pe,Ae]=(0,r.useState)(!1),ne=(0,r.useRef)(!1),[J,d]=(0,r.useState)(null);(0,r.useEffect)(()=>{p.current=Q},[Q]),(0,r.useEffect)(()=>{O.current=E},[E]),(0,r.useEffect)(()=>{ne.current=pe},[pe]);let H=(0,r.useMemo)(()=>{let g=new Map;for(let c of q)for(let re of c.tags||[]){let Le=String(re).trim();Le&&g.set(Le,(g.get(Le)||0)+1)}return[...g.entries()].sort((c,re)=>re[1]-c[1]).slice(0,24).map(([c,re])=>({tag:c,n:re}))},[q]),F=(0,r.useMemo)(()=>{let g={};for(let c of q)g[c.kind||"other"]=(g[c.kind||"other"]||0)+(c.type==="planet"?Math.max(1,c.count||0):1);return g},[q]),ie=(()=>{let g=de.trim().toLowerCase();return!!g&&!q.some(c=>(c.title||c.name||"").toLowerCase().includes(g)||String(c.kind||"").toLowerCase().includes(g)||String(it[c.kind]||"").toLowerCase().includes(g))})();(0,r.useEffect)(()=>{let g=R.current;g&&g.requestRender&&g.requestRender()},[de]),(0,r.useEffect)(()=>{let g=R.current;if(!(!g||!g.render))try{g.render()}catch(c){$t(c,"filter/timeDim")}},[Q,E,pe]);let ze=(0,r.useRef)(null),[ke,le]=(0,r.useState)([]),[C,se]=(0,r.useState)(null),[te,Se]=(0,r.useState)(!1),[ot,st]=(0,r.useState)(null),[yt,Rt]=(0,r.useState)(""),Mt=(0,r.useRef)(null),xt=(0,r.useRef)(null),je=(g,c=!0)=>{Mt.current&&clearTimeout(Mt.current),st({msg:g,ok:c}),Mt.current=setTimeout(()=>st(null),1900)},Dt=g=>{Rt(g),xt.current&&clearTimeout(xt.current),xt.current=setTimeout(()=>Rt(""),1600)};(0,r.useEffect)(()=>()=>{Mt.current&&clearTimeout(Mt.current),xt.current&&clearTimeout(xt.current)},[]);let Ne=(0,r.useMemo)(()=>q.reduce((g,c)=>(g[c.id]=c,g),{}),[q]);return(0,r.useEffect)(()=>{let g=$.current;if(!g||q.length===0)return;let c=g.getContext("2d");if(!c)return;let re=Math.min(1.5,Math.max(1,window.devicePixelRatio||1)),Le={};_.forEach(w=>{Le[w.source]=(Le[w.source]||0)+1,Le[w.target]=(Le[w.target]||0)+1});let h=Math.max(1,...Object.values(Le)),M=Pn(),He=W.some(w=>w&&w.type==="planet"),o={nodes:W.filter(w=>w&&w.type!=="planet").concat(W.filter(w=>w&&w.type==="planet")).map(w=>Dn(w,{degree:Le[w.id]||0,maxDegree:h})),edges:_.map(w=>({sourceNodeId:w.source,targetNodeId:w.target,weight:Math.max(1,Number(w.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:re,ctx:c,multi:[],marquee:null,planetLayer:He,levelId:oe};o.domain=q,o.domainById=q.reduce((w,L)=>(w[L.id]=L,w),{}),o.nodeById=new Map(o.nodes.map(w=>[w.id,w])),o.edgePairs=(()=>{let w=new Map(o.nodes.map((A,V)=>[A.id,V])),L=new Int32Array(o.edges.length*2),U=0;for(let A of o.edges){let V=w.get(A.sourceNodeId),ye=w.get(A.targetNodeId);V===void 0||ye===void 0||(L[U]=V,L[U+1]=ye,U+=2)}return L.subarray(0,U)})(),o.alpha=1,o.forceParams=He?Ln(ka(o.nodes.length)):ka(o.nodes.length),o.lastTickMs=0,o.lastRenderMs=0,o.nodes.forEach((w,L)=>{let U=L*2.399963229728653,A=12*Math.sqrt(L);w.x=Math.cos(U)*A,w.y=Math.sin(U)*A});let lt=[...new Set(o.nodes.map(w=>w.type))];o.clustered=!He&<.length>1,o.typeCenters=o.typeCenters||{};let wt=He?0:160;lt.forEach((w,L)=>{if(o.typeCenters[w])return;let U=L/lt.length*Math.PI*2-Math.PI/2;o.typeCenters[w]={x:Math.cos(U)*wt,y:Math.sin(U)*wt}}),R.current=o;let kt=0,pt=0,ht=null,Bt="",Kt=()=>{let w=g.clientWidth,L=g.clientHeight;o.w=w,o.h=L,g.width=w*re,g.height=L*re,c.setTransform(re,0,0,re,0,0),(kt===0||pt===0)&&w>0&&L>0&&o.tickCount>0&&M.raf(()=>Ie()),kt=w,pt=L};Kt();let Yt=new ResizeObserver(Kt);Yt.observe(g.parentElement);let vt=(w,L)=>w&&w.length>L?w.slice(0,L)+"\u2026":w,qe=(w,L,U,A)=>{if(c.beginPath(),A==="rect")c.rect(w-U,L-U*.75,U*2,U*1.5);else if(A==="diamond")c.moveTo(w,L-U),c.lineTo(w+U,L),c.lineTo(w,L+U),c.lineTo(w-U,L),c.closePath();else if(A==="hexagon"){for(let V=0;V<6;V++){let ye=Math.PI/3*V-Math.PI/2,De=w+U*Math.cos(ye),Pe=L+U*Math.sin(ye);V===0?c.moveTo(De,Pe):c.lineTo(De,Pe)}c.closePath()}else c.arc(w,L,U,0,Math.PI*2)},Ot=new Map,oa=(w,L)=>{let U=w+"|"+Math.round(L),A=Ot.get(U);return A||(A=c.createRadialGradient(-L*.32,-L*.38,0,0,0,L*1.15),A.addColorStop(0,Wt(w,"#ffffff",.2)),A.addColorStop(.62,w),A.addColorStop(1,Wt(w,"#000000",.22)),Ot.set(U,A)),A},Lt=(w,L)=>{let U=parseInt(w.slice(1,3),16),A=parseInt(w.slice(3,5),16),V=parseInt(w.slice(5,7),16);return"rgba("+U+","+A+","+V+","+L+")"},Wt=(w,L,U)=>{let A=Pe=>[parseInt(Pe.slice(1,3),16),parseInt(Pe.slice(3,5),16),parseInt(Pe.slice(5,7),16)],V=A(w),ye=A(L),De=Math.max(0,Math.min(1,Number(U)||0));return"rgb("+V.map((Pe,Ge)=>Math.round(Pe+(ye[Ge]-Pe)*De)).join(",")+")"},l=new Map,X=new Map,me=(w,L,U,A)=>{let V=Ge=>[parseInt(Ge.slice(1,3),16),parseInt(Ge.slice(3,5),16),parseInt(Ge.slice(5,7),16)],ye=V(w),De=V(L),Pe=Math.max(0,Math.min(1,Number(U)||0));return"rgba("+ye.map((Ge,Ke)=>Math.round(Ge+(De[Ke]-Ge)*Pe)).join(",")+","+A+")"},Ee=1.1,Be=.3,he=3,Ie=()=>{if(!o.nodes.length)return;let w=1/0,L=-1/0,U=1/0,A=-1/0;o.nodes.forEach(Ve=>{let rt=Number(Ve.r)||0,Ye=Ve.planet?rt*1.32:rt;Ve.x-Ye<w&&(w=Ve.x-Ye),Ve.x+Ye>L&&(L=Ve.x+Ye),Ve.y-Ye<U&&(U=Ve.y-Ye),Ve.y+Ye>A&&(A=Ve.y+Ye)});let V=28,ye=L-w+V*2,De=A-U+V*2,Pe=Math.min(o.w/ye,o.h/De),Ge=Math.pow(1/Ee,he);o.zoom=Math.max(.35,Math.min(1.8,Pe*Ge));let Ke=!(Array.isArray(a)&&a.length>1);o.planetLayer&&Ke?o.zoom=Math.max(.12,Math.min(Be,Pe)):o.planetLayer&&(o.zoom=Math.max(.12,Pe*Math.pow(1/Ee,he-2))),o.panX=o.w/2-(w+L)/2*o.zoom,o.panY=o.h/2-(U+A)/2*o.zoom};I.current=Ie;let tt=()=>{o.renderFrames=(o.renderFrames|0)+1;let w=o.zoom>=1.2?"in":"out";j.current&&j.current.dataset.zoom!==w&&(j.current.dataset.zoom=w),c.clearRect(0,0,o.w,o.h),o.searchTerm=ce.current,o.kindFilter=p.current,o.timeMode=ne.current,o.tagFilter=O.current;let L=o.tagFilter,U=o.kindFilter,A=T=>String(T||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");c.save();let V=o.w+"x"+o.h;if(!ht||Bt!==V){ht=new Path2D;let T=26;for(let Te=T/2;Te<o.w;Te+=T)for(let Oe=T/2;Oe<o.h;Oe+=T)ht.moveTo(Te+1,Oe),ht.arc(Te,Oe,1,0,Math.PI*2);Bt=V}c.fillStyle="rgba(255,255,255,0.055)",c.fill(ht),c.restore(),c.save(),c.translate(o.panX,o.panY),c.scale(o.zoom,o.zoom);let ye={};o.nodes.forEach(T=>ye[T.id]=T);let De=performance.now()<(o.motionUntil||0),Pe=o.nodes.length>40,Ge=Pe?1.5:.55,Ke=o.selectedId||o.hoverId,Ve=Sn({panX:o.panX,panY:o.panY,zoom:o.zoom,w:o.w,h:o.h,margin:80}),rt=(()=>{let T=(o.searchTerm||"").toLowerCase();if(!T)return null;let Te=[];for(let Oe of o.nodes){let We=(o.domainById[Oe.id]||{}).kind||"other";if(((Oe.name||"").toLowerCase().includes(T)||String(it[We]||"").toLowerCase().includes(T)||String(We).toLowerCase().includes(T))&&Te.push(Oe.id),Te.length>200)break}return Te})(),Ye=o.quality|0;(!o.labelOrder||o.labelOrder.src!==o.nodes)&&(o.labelOrder={src:o.nodes,ids:o.nodes.slice().sort((T,Te)=>(Number(Le[Te.id])||0)-(Number(Le[T.id])||0)).map(T=>T.id)});let It=Cn(o.nodes,{limit:Nn(o.nodes.length,Ye),focusId:Ke,hoverId:o.hoverId,searchHits:rt,degree:Le,order:o.labelOrder.ids}),Ut=o.zoom<=Ge?new Set((o.labelOrder&&o.labelOrder.ids?o.labelOrder.ids:[]).slice(0,12)):null,Nt=new Map,ga=(T,Te)=>{let Oe=T+"|"+Te,we=Nt.get(Oe);return we===void 0&&(c.font=T,we=c.measureText(Te).width,Nt.set(Oe,we)),we},fa=o.nodes.length<=250,La=new Map,io=o.nodes.length>1200&&o.zoom<.3,an=o.zoom>=.6,Fa=Ye>=3,nn=Ye<=0?1:Ye===1?2:Ye===2?4:8;o.edges.forEach((T,Te)=>{if(io)return;let Oe=Ke&&(T.sourceNodeId===Ke||T.targetNodeId===Ke);if(Ke){if(!Oe)return}else if(nn>1&&Te%nn!==0)return;let we=ye[T.sourceNodeId],We=ye[T.targetNodeId];if(!we||!We||!wa(we.x,we.y,10,Ve)&&!wa(We.x,We.y,10,Ve))return;if(U!=="all"){let Ia=o.domainById[T.sourceNodeId]&&o.domainById[T.sourceNodeId].kind,Pa=o.domainById[T.targetNodeId]&&o.domainById[T.targetNodeId].kind;if(Ia!==U&&Pa!==U)return}if(L){let Ia=o.domainById[T.sourceNodeId]&&(o.domainById[T.sourceNodeId].tags||[]).includes(L),Pa=o.domainById[T.targetNodeId]&&(o.domainById[T.targetNodeId].tags||[]).includes(L);if(!Ia&&!Pa)return}let nt=We.x-we.x,Je=We.y-we.y,Ze=Math.sqrt(nt*nt+Je*Je)||1,gt=De||an||Ye>=2?0:Pe?10:16,mt=-Je/Ze*gt,dt=nt/Ze*gt,Jt=(we.x+We.x)/2+mt,Pt=(we.y+We.y)/2+dt,Et=Ct.colors[o.domainById[we.id]&&o.domainById[we.id].kind||"other"]||Ct.colors.other,ea=Ke?Oe?.72:.06:o.planetLayer?.22:Pe?.16:.2,sn=parseInt(Et.slice(1,3),16),ln=parseInt(Et.slice(3,5),16),cn=parseInt(Et.slice(5,7),16),dn=Math.max(1,Number(T.weight)||1),co=Oe?1.6+Math.min(3.2,dn*.8):.7+Math.min(2.4,(dn-1)*.35),pn=Math.min(an||Ye>=1?1.2:1/0,Math.round(co*2)/2),mn=sn+","+ln+","+cn+","+ea+","+pn,sa=La.get(mn);sa||(sa={path:new Path2D,stroke:"rgba("+sn+","+ln+","+cn+","+ea+")",width:pn},La.set(mn,sa)),sa.path.moveTo(we.x,we.y),sa.path.quadraticCurveTo(Jt,Pt,We.x,We.y)}),La.forEach(T=>{c.strokeStyle=T.stroke,c.lineWidth=T.width,c.stroke(T.path)});let ia=null;Ke&&(ia=new Set,o.edges.forEach(T=>{T.sourceNodeId===Ke?ia.add(T.targetNodeId):T.targetNodeId===Ke&&ia.add(T.sourceNodeId)}));let so=(T,Te={})=>{let Oe=vt(T.name,Te.maxChars||16),we=1/o.zoom,We="500 "+(11.5*we).toFixed(1)+"px -apple-system,Segoe UI,sans-serif";c.font=We;let Je=ga(We,Oe)+14*we,Ze=17*we,gt=T.y+T.r+(Te.gap===void 0?8:Te.gap)*we,mt=!0;for(let dt of on)if(T.x-Je/2<dt.x+dt.w&&T.x+Je/2>dt.x&><dt.y+dt.h&>+Ze>dt.y){mt=!1;break}return!mt&&!Te.force?!1:(on.push({x:T.x-Je/2,y:gt,w:Je,h:Ze}),c.fillStyle="rgba(20,24,30,0.78)",c.beginPath(),c.roundRect?c.roundRect(T.x-Je/2,gt,Je,Ze,4*we):c.rect(T.x-Je/2,gt,Je,Ze),c.fill(),c.strokeStyle="rgba(255,255,255,0.07)",c.lineWidth=1*we,c.stroke(),c.fillStyle=Te.strong?"#f2f5f8":"#aeb6c2",c.textAlign="center",c.textBaseline="top",c.fillText(Oe,T.x,gt+4.6*we),!0)},lo=(T,Te,Oe)=>{let we=1/o.zoom,{isSel:We,isHov:nt,dimmed:Je}=Oe,Ze=T.r*o.zoom;c.save(),c.globalAlpha=Je?.16:1;let gt="g|"+Te+"|"+Math.round(T.r),mt=l.get(gt);mt||(mt=c.createRadialGradient(0,0,T.r*.8,0,0,T.r*1.24),mt.addColorStop(0,Lt(Te,.18)),mt.addColorStop(.58,Lt(Te,.06)),mt.addColorStop(1,Lt(Te,0)),l.set(gt,mt)),c.save(),c.translate(T.x,T.y),!Fa&&(o.quality|0)<2&&(c.fillStyle=mt,c.beginPath(),c.arc(0,0,T.r*1.24,0,Math.PI*2),c.fill());let dt=o.timeMode?Te:Ct.deep[T.type]||Te,Jt="b|"+dt+"|"+Math.round(T.r),Pt=X.get(Jt);if(Pt||(Pt=c.createRadialGradient(-T.r*.26,-T.r*.32,T.r*.12,0,0,T.r*1.1),Pt.addColorStop(0,me(dt,"#ffffff",.24,.9)),Pt.addColorStop(.58,Lt(dt,.86)),Pt.addColorStop(1,me(dt,"#000000",.34,.9)),X.set(Jt,Pt)),c.beginPath(),c.arc(0,0,T.r,0,Math.PI*2),c.fillStyle="rgba(13,16,21,0.92)",c.fill(),c.beginPath(),c.arc(0,0,T.r,0,Math.PI*2),c.fillStyle=Pt,c.fill(),c.beginPath(),c.arc(0,0,T.r-Math.max(.6,1.1*we),Math.PI*1.06,Math.PI*1.94),c.strokeStyle="rgba(255,255,255,0.14)",c.lineWidth=Math.max(.7,1.2*we),c.stroke(),c.beginPath(),c.arc(0,0,T.r,0,Math.PI*2),c.strokeStyle=Lt(Te,We||nt?.95:.58),c.lineWidth=Math.max(.8,1.1*we),c.stroke(),c.restore(),(We||nt)&&(c.save(),c.beginPath(),c.arc(T.x,T.y,T.r+(We?7:5)*we,0,Math.PI*2),c.strokeStyle=We?"rgba(255,122,69,0.9)":Lt(Te,.7),c.lineWidth=Math.max(1,1.2*we),We&&c.setLineDash([5*we,4*we]),c.stroke(),c.restore()),c.restore(),We||nt||Ze>=11){let Et=Math.max(9,Math.min(21,Ze*.42))*we,ea=Ze>=30;c.save(),c.textAlign="center",c.textBaseline="middle",c.shadowColor="rgba(0,0,0,0.5)",c.shadowBlur=(o.quality|0)>=2?0:5*we,ea&&(c.font="600 "+(Et*.48).toFixed(1)+"px -apple-system,Segoe UI,sans-serif",c.fillStyle="rgba(255,255,255,0.72)",c.fillText(vt(T.name,12),T.x,T.y-Et*1.02)),c.font="700 "+Et.toFixed(1)+"px -apple-system,Segoe UI,sans-serif",c.fillStyle="rgba(255,255,255,0.96)",c.fillText(Rn(T.count,{unit:Y.current("graphCountWan"),locale:Y.current("graphCountLocale")}),T.x,T.y+(ea?Et*.06:0)),ea&&(c.font="500 "+(Et*.38).toFixed(1)+"px -apple-system,Segoe UI,sans-serif",c.fillStyle="rgba(255,255,255,0.5)",c.fillText(Y.current("graphCardsUnit"),T.x,T.y+Et*.92)),c.restore()}},on=[],rn=[];if(o.nodes.forEach(T=>{if(!wa(T.x,T.y,T.r+2,Ve))return;let Te=o.domainById[T.id]||{},Oe=Te.kind||"other",we=o.timeMode&&Te.updated?Cr(Te.updated):Ct.colors[Oe]||Ct.colors.other,We=Ct.shapes[Oe]||"circle",nt=o.selectedId===T.id,Je=o.hoverId===T.id,Ze=o.searchTerm||"",gt=!Ze||(T.name||"").toLowerCase().includes(Ze)||String(it[Oe]||"").toLowerCase().includes(Ze)||String(Oe).toLowerCase().includes(Ze),mt=U==="all"||Oe===U,dt=!L||(Te.tags||[]).includes(L),Jt=Ke&&T.id!==Ke&&!(ia&&ia.has(T.id))||Ze&&!gt||!mt||!dt;if(T.planet){rn.push({n:T,color:we,isSel:nt,isHov:Je,dimmed:Jt,ok:mt&&dt});return}c.save(),c.globalAlpha=Jt?.08:1,(nt||Je)&&fa&&(c.shadowColor=we,c.shadowBlur=nt?16:11),c.translate(T.x,T.y),qe(0,0,T.r,We),c.fillStyle=Fa?we:oa(we,T.r),c.fill(),(!Fa||nt||Je)&&(c.strokeStyle="rgba(255,255,255,0.16)",c.lineWidth=Math.max(.6,.8*(1/o.zoom)),c.stroke()),Oe==="core"&&(c.fillStyle="#1b120e",c.font="700 "+Math.max(10,Math.round(T.r*.95))+"px sans-serif",c.textAlign="center",c.textBaseline="middle",c.fillText("\u2605",0,0)),c.restore(),nt?(c.save(),qe(T.x,T.y,T.r+3,We),c.strokeStyle=we,c.lineWidth=3,c.shadowColor=we,c.shadowBlur=12,c.stroke(),c.restore()):Je?(c.save(),qe(T.x,T.y,T.r+2,We),c.strokeStyle=we,c.lineWidth=2,c.stroke(),c.restore()):Ze&>?(c.save(),qe(T.x,T.y,T.r+2,We),c.strokeStyle="#ffa06b",c.lineWidth=2,c.stroke(),c.restore()):o.multi.indexOf(T.id)>=0&&(c.save(),qe(T.x,T.y,T.r+2,We),c.strokeStyle="#60a5fa",c.lineWidth=2,c.shadowColor="#60a5fa",c.shadowBlur=8,c.stroke(),c.restore()),(nt||Je||!De&&(It.has(T.id)&&o.zoom>Ge||!Pe&&o.zoom>.6||Ut&&Ut.has(T.id)))&&mt&&dt&&so(T,{force:nt||Je})}),rn.forEach(T=>lo(T.n,T.color,T)),c.restore(),o.marquee){let T=o.marquee,Te=Math.min(T.sx,T.ex),Oe=Math.min(T.sy,T.ey),we=Math.abs(T.ex-T.sx),We=Math.abs(T.ey-T.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(Te,Oe,we,We),c.strokeRect(Te,Oe,we,We),c.restore()}if(o.hoverId&&ze.current){let T=o.domainById[o.hoverId],Te=o.nodes.find(function(Oe){return Oe.id===o.hoverId});if(T&&Te){let Oe=o.edges.filter(function(Ze){return Ze.sourceNodeId===T.id||Ze.targetNodeId===T.id}).length,we=Te.x*o.zoom+o.panX,We=Te.y*o.zoom+o.panY;ze.current.style.display="block",ze.current.style.left=we+14+"px",ze.current.style.top=We-6+"px";let nt=Te.planet?Y.current("graphPlanetCards").replace("{n}",String(Te.count))+" \xB7 "+Y.current("graphEnter"):Y.current("connCount").replace("{n}",Oe),Je=Y.current(it[T.kind]||"kindKnowledge");ze.current.innerHTML="<b>"+A(T.title||T.name||"")+'</b><br/><span style="opacity:.8">'+A(Je)+" \xB7 "+A(nt)+"</span>"}}else ze.current&&(ze.current.style.display="none")},et=0,Vt=0,at=0,_t=()=>{o.lastInputAt=performance.now(),o.motionUntil=performance.now()+140,at&&M.clearTimeout(at),at=M.setTimeout(()=>{at=0,ct()},160)},ct=()=>{Vt||(Vt=M.raf(()=>{Vt=0;let w=performance.now();try{tt()}catch(L){$t(L,"render")}o.lastRenderMs=performance.now()-w}))};o.requestRender=ct;let Zt=()=>{et>0||(o.alpha=Math.max(o.alpha||0,.35),o.running=!0,o.raf||(o.raf=M.raf(ae)))};o.wake=Zt,o.render=tt;let x=()=>{if(!He)return;o.planetsSrc!==o.nodes&&(o.planets=o.nodes.filter(L=>L.planet),o.planetsSrc=o.nodes);let w=o.planets;if(!(!w||!w.length)){for(let L=0;L<w.length;L++)for(let U=L+1;U<w.length;U++){let A=w[L],V=w[U],ye=V.x-A.x,De=V.y-A.y,Pe=Math.sqrt(ye*ye+De*De)||1,Ge=24+Math.min(A.r,V.r)*.18,Ke=A.r+V.r+Ge;if(Pe>=Ke)continue;let Ve=Ke-Pe,rt=ye/Pe,Ye=De/Pe,It=A.r*A.r,Ut=V.r*V.r,Nt=It+Ut,ga=Ve*(Ut/Nt),fa=Ve*(It/Nt);A.x-=rt*ga,A.y-=Ye*ga,V.x+=rt*fa,V.y+=Ye*fa,A.vx*=.55,A.vy*=.55,V.vx*=.55,V.vy*=.55}for(let L of w)for(let A of o.nodes){if(A.planet||A===o.dragNode)continue;let V=A.x-L.x,ye=A.y-L.y,De=Math.sqrt(V*V+ye*ye)||1,Pe=V/De,Ge=ye/De,Ke=L.r+A.r+30,Ve=Ke+12;if(De>=Ve)continue;let rt=De;if(De<Ke){A.x=L.x+Pe*Ke,A.y=L.y+Ge*Ke;let Nt=A.vx*Pe+A.vy*Ge;Nt<0&&(A.vx-=Pe*Nt,A.vy-=Ge*Nt),rt=Ke}let Ye=Math.min(1,(Ve-rt)/12),It=(.28+L.r*.009)*Ye*Ye,Ut=A.vx*Pe+A.vy*Ge;if(Ut<It){let Nt=(It-Ut)*.5;A.vx+=Pe*Nt,A.vy+=Ge*Nt}}}},B=()=>{let w=performance.now(),L=Tn(o,{params:o.forceParams,alphaFloor:o.drift?1:0,damping:o.drift?.8:void 0});x(),o.lastTickMs=performance.now()-w,o.lastRms=L.rms,o.autoFitPending&&o.tickCount>45&&(o.autoFitPending=!1,Ie())},ae=()=>{if(!o.running)return;let w=performance.now(),L=0;o.lastStepAt&&w-o.lastStepAt>0&&w-o.lastStepAt<120&&(L=w-o.lastStepAt,o.frameEma=o.frameEma?o.frameEma*.8+L*.2:L),o.lastStepAt=w,o.tickCount>30&&L>0&&(o.frameEma>17.8?o.perfBad=(o.perfBad||0)+L:o.perfBad=Math.max(0,(o.perfBad||0)-L*.5),o.perfBad>500&&(o.quality|0)<3&&(o.quality=(o.quality|0)+1,o.perfBad=0,o.frameEma=16.7),o.frameEma&&o.frameEma<13.5?o.goodMs=(o.goodMs||0)+L:o.goodMs=0,(o.goodMs||0)>4e3&&(o.quality|0)>0&&(o.quality=(o.quality|0)-1,o.goodMs=0));let U=performance.now()-(o.lastInputAt||0);if(o.drift&&(U>4e3||(o.quality|0)>=1&&U>1200)){o.drift=!1,o.running=!1,o.raf=0;return}!o.drift&&(o.quietTicks>_a||o.alpha===0&&o.tickCount>120)&&(o.quietTicks=0,o.drift=!0,o.alpha=Math.max(o.alpha||0,1),o.motionUntil=0,o.userTouched||Ie());try{let A=performance.now(),V=o.dragNode||o.drift?1:6,ye=0;do B(),ye+=1;while(!o.dragNode&&!o.drift&&ye<V&&performance.now()-A<18&&o.quietTicks<=_a);o.drift||(o.motionUntil=performance.now()+60);let De=performance.now();tt(),o.lastRenderMs=performance.now()-De}catch(A){$t(A,"step")}o.raf=M.raf(ae)},Ce=()=>({nodes:o.nodes.length,edges:o.edges.length,planets:o.nodes.filter(w=>w.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,frames:o.renderFrames|0,quality:o.quality|0,frameEma:Math.round((o.frameEma||0)*10)/10});o.stats=Ce,globalThis.__meGraphStats=Ce;let Me=()=>{let w=g.getBoundingClientRect(),L=w.width?g.clientWidth/w.width:1,U=w.height?g.clientHeight/w.height:1;return{level:o.levelId||"",planetLayer:!!o.planetLayer,nodes:o.nodes.length,planets:o.nodes.filter(A=>A.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,drift:!!o.drift,frames:o.renderFrames|0,resources:M.snapshot(),screen:o.nodes.map(A=>({id:A.id,label:A.name,planet:!!A.planet,count:A.count||0,dir:A.orbitDir||0,scale:A.orbitScale?Math.round(A.orbitScale*100)/100:0,x:w.left+(A.x*o.zoom+o.panX)/L,y:w.top+(A.y*o.zoom+o.panY)/U,r:Math.max(4,A.r*o.zoom/L)}))}};o.runtime=Me,globalThis.__meGraphRuntime=Me;let ve=(w,L)=>{let U=g.getBoundingClientRect(),A=U.width?g.clientWidth/U.width:1,V=U.height?g.clientHeight/U.height:1;return{x:(w-U.left)*A,y:(L-U.top)*V}},Qe=(w,L)=>{let U=ve(w,L);return{x:(U.x-o.panX)/o.zoom,y:(U.y-o.panY)/o.zoom}},St=w=>{let L=o.domainById[w];return!(!L||p.current!=="all"&&L.kind!==p.current||O.current&&!(L.tags||[]).includes(O.current))},Tt=(w,L,U)=>Math.max(L,Math.min(U,w)),Ft=w=>{o.mouseX=w.clientX,o.mouseY=w.clientY;let L=Qe(w.clientX,w.clientY),U=null;for(let A=o.nodes.length-1;A>=0;A--){let V=o.nodes[A];if(!St(V.id))continue;let ye=V.x-L.x,De=V.y-L.y;if(ye*ye+De*De<V.r*V.r+36){U=V.id;break}}U!==o.hoverId&&(o.hoverId=U,o.motionUntil=performance.now()+140,ct())},zt=w=>{if(w.button!==0)return;let L=Qe(w.clientX,w.clientY),U=null;for(let A=o.nodes.length-1;A>=0;A--){let V=o.nodes[A];if(!St(V.id))continue;let ye=V.x-L.x,De=V.y-L.y;if(ye*ye+De*De<V.r*V.r+25){U=V;break}}if(w.shiftKey){if(U){o.shiftClick=U.id;return}o.marquee={sx:w.clientX,sy:w.clientY,ex:w.clientX,ey:w.clientY};return}o.userTouched=!0,o.dragStart={x:w.clientX,y:w.clientY,px:o.panX,py:o.panY},o.dragging=!1,o.dragNode=U||null,U&&(o.dragOffset={dx:U.x-L.x,dy:U.y-L.y})},za=w=>{if(o.marquee){o.marquee.ex=w.clientX,o.marquee.ey=w.clientY,_t(),ct();return}if(!o.dragStart)return;let L=w.clientX-o.dragStart.x,U=w.clientY-o.dragStart.y;if(Math.abs(L)+Math.abs(U)>3&&!o.dragging&&(o.dragging=!0,o.dragNode&&(o.alpha=Math.max(o.alpha||0,.35))),o.dragNode){let A=Qe(w.clientX,w.clientY);o.dragNode.x=A.x+o.dragOffset.dx,o.dragNode.y=A.y+o.dragOffset.dy,_t(),Zt()}else o.dragging&&(o.panX=Tt(o.dragStart.px+L,-1e5,1e5),o.panY=Tt(o.dragStart.py+U,-1e5,1e5),_t(),ct())},Aa=w=>{if(o.marquee){let A=o.marquee;o.marquee=null;let V=ve(A.sx,A.sy),ye=ve(A.ex,A.ey),De=Math.min(V.x,ye.x),Pe=Math.max(V.x,ye.x),Ge=Math.min(V.y,ye.y),Ke=Math.max(V.y,ye.y),Ve=o.nodes.filter(rt=>!rt.planet&&St(rt.id)).filter(rt=>{let Ye=rt.x*o.zoom+o.panX,It=rt.y*o.zoom+o.panY;return Ye>=De&&Ye<=Pe&&It>=Ge&&It<=Ke}).map(rt=>rt.id);o.multi=Ve,le(Ve),_t(),ct();return}let L=o.dragStart&&!o.dragging,U=!!o.dragNode&&!!o.dragging;if(o.shiftClick){let A=o.shiftClick;o.shiftClick=null;let V=o.nodeById.get(A);if(V&&V.planet){o.selectedId=A,be(A),ct();return}let ye=Array.isArray(o.multi)?o.multi.slice():[];ye.includes(A)||ye.push(A),o.multi=ye,le(ye),ct();return}if(L){let A=Qe(w.clientX,w.clientY),V=null;for(let ye=o.nodes.length-1;ye>=0;ye--){let De=o.nodes[ye];if(!St(De.id))continue;let Pe=De.x-A.x,Ge=De.y-A.y;if(Pe*Pe+Ge*Ge<De.r*De.r+20){V=De;break}}if(V&&V.planet){o.selectedId=null,be(null),ct(),o.dragStart=null,o.dragging=!1,o.dragNode=null,ue.current&&ue.current(V.id);return}V?o.selectedId===V.id?(o.selectedId=null,be(null),ct()):(o.selectedId=V.id,be(V.id),ct()):(o.selectedId=null,o.hoverId=null,w.shiftKey||(o.multi=[],le([])),be(null),ct())}o.dragStart=null,o.dragging=!1,o.dragNode=null,U&&Zt()},ao=w=>{w.preventDefault();let L=Qe(w.clientX,w.clientY),U=null;for(let A=o.nodes.length-1;A>=0;A--){let V=o.nodes[A];if(!St(V.id))continue;let ye=V.x-L.x,De=V.y-L.y;if(ye*ye+De*De<V.r*V.r+25){U=V;break}}if(U){let A=o.domainById[U.id];A&&d({x:w.clientX,y:w.clientY,id:U.id,path:A.id,title:A.title,planet:!!U.planet,count:U.count||0})}else d(null)},no=w=>{w.preventDefault();let L=ve(w.clientX,w.clientY),U=(L.x-o.panX)/o.zoom,A=(L.y-o.panY)/o.zoom,V=Math.max(Be,Math.min(3,o.zoom*(w.deltaY<0?Ee:1/Ee)));o.panX=Tt(o.panX+U*(o.zoom-V),-1e5,1e5),o.panY=Tt(o.panY+A*(o.zoom-V),-1e5,1e5),o.zoom=V,o.userTouched=!0,_t(),ct()};M.listen(g,"mousemove",Ft),M.listen(g,"mousedown",zt),M.listen(window,"mousemove",za),M.listen(window,"mouseup",Aa),M.listen(g,"wheel",no,{passive:!1}),M.listen(g,"contextmenu",ao),D.current=()=>{o.selectedId=null,o.hoverId=null,o.multi=[],le([]),o.userTouched=!1,Ie(),_t(),ct()},et=Mn(o.nodes.length);let ra=et,oo=()=>ra>0?Math.round((ra-et)/ra*100):100;et>0&&Ue(0);let Ra=ra>0?[.75,.5,.25].map(w=>Math.round(ra*w)):[],Da=()=>{if(!o.running)return;let w=performance.now();for(;et>0&&performance.now()-w<12;)B(),et--;if(Ue(et>0?Math.min(99,oo()):100),Ra.length&&et<=Ra[0]){Ra.shift(),o.userTouched||Ie();try{tt()}catch(L){$t(L,"warm-frame")}}if(et>0){o.userTouched||Ie(),o.warmRaf=M.raf(Da);return}o.warmRaf=0,o.userTouched||Ie();try{tt()}catch(L){$t(L,"warm-final")}Ue(null),Zt()};o.warmStep=Da,Ie();try{tt()}catch(w){$t(w,"first-frame")}et>0?o.warmRaf=M.raf(Da):(Ue(0),Zt());let ro=()=>ee(!1);return M.listen(window,"mousedown",ro),()=>{if(o.running=!1,M.releaseAll(),globalThis.__meGraphStats===Ce)try{delete globalThis.__meGraphStats}catch{globalThis.__meGraphStats=void 0}if(globalThis.__meGraphRuntime===Me)try{delete globalThis.__meGraphRuntime}catch{globalThis.__meGraphRuntime=void 0}try{Yt.disconnect()}catch{}}},[W,_,oe]),(0,r.useEffect)(()=>{be(null),le([]),d(null);let g=R.current;g&&(g.selectedId=null,g.multi=[])},[oe]),(0,r.useEffect)(()=>{z!==void 0&&I.current&&requestAnimationFrame(()=>{try{I.current()}catch(g){$t(g,"fit")}})},[z]),(0,e.jsxs)("div",{className:"me-graph",ref:j,children:[(0,e.jsxs)("div",{className:"me-graph-toolbar",children:[(0,e.jsxs)("label",{className:"me-graph-search",children:[(0,e.jsxs)("svg",{className:"ico",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6","aria-hidden":"true",children:[(0,e.jsx)("circle",{cx:"7",cy:"7",r:"4.4"}),(0,e.jsx)("path",{d:"m10.4 10.4 3.2 3.2",strokeLinecap:"round"})]}),(0,e.jsx)("input",{type:"text",placeholder:u("search"),value:de,onChange:g=>Re(g.target.value),"aria-label":u("search")})]}),(0,e.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,e.jsxs)("button",{type:"button",className:"me-gtool"+(Q!=="all"||pe||E?" on":""),onClick:()=>ee(g=>!g),"aria-expanded":Fe,title:u("filterLabel"),children:[u("filterLabel"),Q!=="all"||pe||E?(0,e.jsx)("span",{className:"badge","aria-hidden":"true"}):(0,e.jsx)("span",{className:"caret","aria-hidden":"true",children:"\u25BE"})]}),Fe&&(0,e.jsx)("div",{className:"me-graph-legend-pop",onMouseDown:g=>g.stopPropagation(),style:{position:"absolute",top:"calc(100% + 8px)",left:0,zIndex:50,background:"rgba(24,28,34,0.97)",backdropFilter:"blur(16px)",WebkitBackdropFilter:"blur(16px)",color:"#e5e9ef",border:"1px solid rgba(255,255,255,0.08)",borderRadius:11,padding:8,minWidth:236,boxShadow:"0 18px 44px rgba(0,0,0,.5)"},children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[(0,e.jsx)("button",{type:"button",className:`lg${Q==="all"&&!pe?" active":""}`,onClick:()=>{_e("all"),Ae(!1)},children:u("all")}),Object.keys(ft).map(g=>(0,e.jsxs)("button",{type:"button",className:`lg${Q===g?" active":""}`,onClick:()=>_e(c=>c===g?"all":g),children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:Ct.colors[g]||ft[g]}}),u(it[g])]},g)),(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.07)",margin:"5px 0"}}),(0,e.jsxs)("button",{type:"button",className:`lg${pe?" active":""}`,onClick:()=>Ae(g=>!g),children:["\u23F1 ",u("timeDim")]}),H.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.07)",margin:"5px 0"}}),(0,e.jsx)("div",{style:{maxHeight:130,overflow:"auto",display:"flex",flexWrap:"wrap",gap:4,padding:"1px 1px 2px"},children:H.map(g=>(0,e.jsxs)("button",{type:"button",className:`lg${E===g.tag?" active":""}`,style:{width:"auto",color:"#b9c0ca",padding:"2px 7px",fontSize:10.5,border:"1px solid rgba(255,255,255,.07)"},onClick:()=>S(c=>c===g.tag?"":g.tag),title:g.tag,children:["#",g.tag," ",(0,e.jsx)("span",{style:{opacity:.55},children:g.n})]},g.tag))})]}),(Q!=="all"||pe||E)&&(0,e.jsxs)("button",{type:"button",className:"lg lg-clear",style:{color:"#f87171"},onClick:()=>{_e("all"),Ae(!1),S("")},children:[u("clearFilter")," \u2715"]})]})})]}),(0,e.jsxs)("label",{className:"me-gswitch"+(v?" on":""),title:u("crossVault"),children:[(0,e.jsx)("input",{type:"checkbox",checked:!!v,onChange:g=>N&&N(g.target.checked)}),(0,e.jsx)("span",{className:"track","aria-hidden":"true"}),(0,e.jsx)("span",{children:u("crossVault")})]}),(0,e.jsx)("button",{type:"button",className:"me-gtool"+(pe?" on":""),"aria-pressed":pe,onClick:()=>Ae(g=>!g),children:u("timeDim")}),(0,e.jsx)("span",{className:"me-gdiv","aria-hidden":"true"}),(0,e.jsx)("button",{type:"button",className:"me-gtool",onClick:()=>{let g=$.current;if(g)try{g.toBlob(c=>{c&&se({url:URL.createObjectURL(c),blob:c})},"image/png")}catch{}},children:u("exportGraph")}),(0,e.jsx)("button",{type:"button",className:"me-gtool",onClick:()=>I.current&&I.current(),children:u("fit")}),(0,e.jsx)("button",{type:"button",className:"me-gtool",onClick:()=>{be(null),_e("all"),D.current&&D.current()},children:u("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)(Sr,{crumbs:a,t:u,onPick:b,busy:y}),f&&(0,e.jsxs)("div",{className:"me-graph-levelerr",role:"alert",children:[(0,e.jsx)("span",{style:{flex:"none",fontWeight:800},children:f.timeout?"\u23F1":"\u2715"}),(0,e.jsx)("span",{className:"msg",children:(f.timeout?u("graphLevelTimeout").replace("{ms}",String(1600)):u("graphLevelError"))+"\uFF1A"+f.message}),(0,e.jsx)("button",{type:"button",onClick:()=>k&&k(),children:u("graphRetry")})]}),!f&&y&&(0,e.jsxs)("div",{className:"me-graph-levelbusy",role:"status","aria-live":"polite",children:[(0,e.jsx)(ua,{small:!0}),u("graphLevelLoading")]}),xe!==null&&(0,e.jsxs)("div",{role:"status","aria-live":"polite",style:{position:"absolute",left:"50%",top:14,transform:"translateX(-50%)",zIndex:3,display:"flex",alignItems:"center",gap:9,padding:"6px 12px",borderRadius:999,background:"rgba(23,27,33,0.9)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",color:"#e8ebf0",fontSize:11,fontWeight:500,letterSpacing:".01em",pointerEvents:"none",border:"1px solid rgba(255,255,255,0.07)",boxShadow:"0 10px 26px rgba(0,0,0,.3)"},children:[(0,e.jsx)(ua,{value:xe,small:!0}),(0,e.jsxs)("span",{children:[u("graphWarming").replace("{n}",q.length)," \xB7 ",Math.round(xe),"%"]})]}),(0,e.jsxs)("div",{className:"mc-v5-graph-legend",children:[(0,e.jsx)("div",{className:"mc-v5-graph-legend-title",children:u("graphLegendTitle")}),Object.keys(Ct.colors).filter(g=>F[g]).map(g=>(0,e.jsxs)("div",{className:"mc-v5-graph-legend-row",children:[(0,e.jsx)("i",{style:{background:Ct.colors[g],boxShadow:"0 0 0 3px "+Ct.colors[g]+"24"}}),(0,e.jsx)("span",{children:u(it[g]||"kindKnowledge")}),(0,e.jsx)("b",{children:F[g]})]},g))]}),(0,e.jsx)("div",{className:"me-graph-tooltip",ref:ze,style:{display:"none",position:"absolute",zIndex:4,pointerEvents:"none",background:"rgba(24,28,34,0.94)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",color:"#e6eaf0",border:"1px solid rgba(255,255,255,0.08)",borderRadius:9,padding:"8px 10px",fontSize:11.5,maxWidth:220,boxShadow:"0 12px 30px rgba(0,0,0,.34)"}}),ie&&(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:u("noMatch")}),J&&(0,e.jsx)("div",{className:"me-graph-ctx-back",style:{position:"fixed",inset:0,zIndex:30},onMouseDown:()=>d(null)}),J&&(0,e.jsxs)("div",{className:"me-graph-ctxmenu",style:{position:"fixed",left:J.x,top:J.y,zIndex:31},onMouseDown:g=>g.stopPropagation(),children:[J.planet&&(0,e.jsxs)("button",{type:"button",onClick:()=>{let g=J.id;d(null),ue.current&&ue.current(g)},children:[u("graphEnter")," \u203A"]}),J.planet&&(0,e.jsx)("div",{style:{padding:"4px 10px 6px",fontSize:11,opacity:.7},children:u("graphPlanetCards").replace("{n}",String(J.count||0))}),!J.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{G.current({path:J.path,title:J.title}),d(null)},children:u("openCard")}),!J.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{J.id&&(R.current.selectedId=J.id,be(J.id)),d(null);let g=R.current;g&&g.requestRender&&g.requestRender()},children:u("focusNeighbors")}),(0,e.jsx)("button",{type:"button",onClick:()=>{try{navigator.clipboard&&navigator.clipboard.writeText(J.title||"")}catch{}d(null),je(u("copied"))},children:u("copyName")}),!J.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{let g=R.current,c=g&&Array.isArray(g.multi)?g.multi.slice():[],re=J.id;if(re&&!c.includes(re)&&c.push(re),d(null),c.length<2){je(u("mergeNeed"),!1);return}if(!window.confirm(u("mergeConfirm")))return;let Le=fe.current&&fe.current(c);Le&&Le.then?Le.then(h=>h?je(u("merged")):je(u("mergeFail"),!1)).catch(()=>je(u("mergeFail"),!1)):Le&&je(u("merged"))},children:u("merge")}),!J.planet&&(0,e.jsx)("button",{type:"button",style:{color:"#f87171"},onClick:()=>{let g=J.path;d(null),window.confirm(u("deleteConfirm"))&&(async()=>{try{(Z.current?await Z.current(g):!1)?je(u("deleted")):je(u("deleteFail"),!1)}catch{je(u("deleteFail"),!1)}})()},children:u("delete")})]}),ke.length>0&&(0,e.jsxs)("div",{style:{position:"absolute",left:"50%",bottom:52,transform:"translateX(-50%)",zIndex:3,display:"flex",gap:8,alignItems:"center",background:"rgba(24,28,34,0.94)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",color:"#e6eaf0",border:"1px solid rgba(255,255,255,0.08)",borderRadius:11,padding:"7px 11px",fontSize:11.5,boxShadow:"0 14px 34px rgba(0,0,0,.4)"},children:[(0,e.jsxs)("span",{style:{fontWeight:700},children:[ke.length," ",u("nodes")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let c=ke.map(M=>Ne[M]).filter(Boolean).map(M=>M.title||M.name).join(`
|
|
1245
|
+
`),re=new Blob([c],{type:"text/plain;charset=utf-8"}),Le=URL.createObjectURL(re),h=document.createElement("a");h.href=Le,h.download="memory-selected.txt",document.body.appendChild(h),h.click(),document.body.removeChild(h),setTimeout(()=>URL.revokeObjectURL(Le),1e3),je(ke.length+u("exportedSel"))},children:u("exportSel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{if(ke.length<2){je(u("mergeNeed"),!1);return}let g=ke.map(re=>Ne[re]?Ne[re].id:re);if(!window.confirm(u("mergeConfirm")))return;le([]);let c=R.current;c&&(c.multi=[]),fetch(`${K}/merge?paths=${encodeURIComponent(g.join(","))}`).then(re=>re.json()).then(re=>{re&&re.ok?je(u("merged")):je(u("mergeFail"),!1)}).catch(()=>je(u("mergeFail"),!1))},children:u("merge")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{if(!window.confirm(u("deleteConfirm")))return;let g=ke.map(re=>Ne[re]?Ne[re].id:re);le([]);let c=R.current;c&&(c.multi=[]),(async()=>{let re=0;for(let Le of g)try{(Z.current?await Z.current(Le):!1)&&re++}catch{}je(re+u("deletedSelected"),re>0)})()},children:u("deleteSelected")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let g=R.current;g&&(g.multi=[]),le([]);let c=R.current;c&&c.render&&c.render()},children:u("clearSelection")})]}),P&&Ne[P]&&(0,e.jsxs)("div",{className:"me-graph-sidebar",style:{position:"absolute",right:14,top:14,zIndex:3,maxWidth:248,background:"rgba(24,28,34,0.94)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",color:"#e6eaf0",border:"1px solid rgba(255,255,255,0.08)",borderRadius:11,padding:13,fontSize:11.5,boxShadow:"0 14px 34px rgba(0,0,0,.38)"},children:[(0,e.jsx)("div",{style:{fontWeight:700,fontSize:13,marginBottom:4},children:Ne[P]?Ne[P].title||Ne[P].name:P}),(0,e.jsxs)("div",{style:{opacity:.8,marginBottom:8},children:[Ne[P]?u(it[Ne[P].kind]||"kindKnowledge"):"\u2014",Ne[P]&&Ne[P].type==="planet"?" \xB7 "+u("graphPlanetCards").replace("{n}",String(Ne[P].count||0)):""]}),Ne[P]&&Ne[P].type==="planet"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{width:"100%",marginBottom:8},onClick:()=>{let g=P;be(null),ue.current&&ue.current(g)},children:[u("graphEnter")," \u203A"]}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.65,letterSpacing:".04em",marginBottom:6},children:u("graphLevelHint")}),(_.filter(g=>g.source===P||g.target===P)||[]).slice(0,8).map((g,c)=>{let re=g.source===P?g.target:g.source,Le=Ne[re];return(0,e.jsx)("div",{style:{padding:"4px 6px",cursor:"pointer",borderRadius:6},onMouseDown:h=>{h.preventDefault();let M=R.current;M&&(M.selectedId=re,M.hoverId=re,M.requestRender&&M.requestRender()),be(re)},children:Le?(Le.title||Le.name).slice(0,28):re},c)})]})]}),(0,e.jsx)("div",{className:"me-graph-tip",children:u("graphTip")}),ot&&(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 "+(ot.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:ot.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:ot.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:ot.msg})]}),C&&(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>{C.url&&URL.revokeObjectURL(C.url),se(null),Se(!1)},children:[(0,e.jsx)("style",{children:bt}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:te?"100vw":900,width:te?"100vw":"92vw",maxHeight:te?"100%":"90vh",height:te?"100%":void 0,borderRadius:te?0:14},onClick:g=>g.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:u("exportGraph")}),(0,e.jsxs)("div",{className:"me-head-actions",children:[(0,e.jsx)("a",{className:"mc-btn",href:C.url,download:"memory-graph.png",onClick:()=>{Dt("download"),je(u("downloaded")+" \xB7 "+u("defaultDownloads"))},style:{textDecoration:"none",display:"inline-flex",alignItems:"center"},children:u(yt==="download"?"done":"download")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{Dt("full"),Se(g=>!g),je(u("fullscreen"))},children:u(yt==="full"?"done":te?"exitFull":"fullscreen")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let g=C.blob;g&&window.ClipboardItem&&navigator.clipboard?navigator.clipboard.write([new window.ClipboardItem({"image/png":g})]).then(()=>{Dt("copy"),je(u("copied"))}).catch(()=>{je(u("copyFail"),!1)}):je(u("copyFail"),!1)},children:u(yt==="copy"?"done":"copyImage")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{C.url&&URL.revokeObjectURL(C.url),se(null),Se(!1)},children:u("close")})]})]}),(0,e.jsx)("div",{className:"me-dialog-body",style:{display:"flex",justifyContent:"center",background:te?"var(--dsw-alias-bg-base, #0b0d10)":"var(--dsw-alias-bg-base, #f3f4f6)"},children:(0,e.jsx)("img",{src:C.url,alt:u("exportGraph"),style:{maxWidth:"100%",maxHeight:te?"calc(100% - 64px)":"70vh",borderRadius:te?0:8,cursor:"zoom-in"},onClick:()=>Se(g=>!g)})})]})]})]})}function Cr(t){let a=new Date(t||0).getTime();if(!a)return"#94a3b8";let n=(Date.now()-a)/864e5;return n<3?"#34D399":n<14?"#FBBF24":n<30?"#FF7A45":"#8CA0B3"}function $n({label:t,value:a=[],options:n,onChange:i,placeholder:s,z:m=20}){let[b,k]=(0,r.useState)(!1),f=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!b)return;let j=R=>{f.current&&!f.current.contains(R.target)&&k(!1)};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[b]);let y=Array.isArray(a)?a:[],u=y.includes("__all__"),v=u?n.find(j=>j.value==="__all__")?.label||"":y.length?y.map(j=>n.find(R=>R.value===j)?.label||j).join("\u3001"):"",N=(j,R)=>{if(j.value==="__all__"){i(R?["__all__"]:[]);return}let I=new Set(y);I.has("__all__")&&I.delete("__all__"),R?I.add(j.value):I.delete(j.value),i([...I])},z=n.find(j=>j.value==="__all__"),$=n.filter(j=>j.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:f,style:{position:"relative",minWidth:0},children:[(0,e.jsxs)("button",{type:"button",onClick:()=>k(j=>!j),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:v||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:[z&&(0,e.jsxs)("label",{onClick:j=>j.stopPropagation(),className:"mc-dd-opt",style:{borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("input",{type:"checkbox",checked:u,onChange:j=>N(z,j.target.checked)}),(0,e.jsx)("span",{children:z.label})]}),$.map(j=>(0,e.jsxs)("label",{onClick:R=>R.stopPropagation(),className:"mc-dd-opt",children:[(0,e.jsx)("input",{type:"checkbox",checked:y.includes(j.value),onChange:R=>N(j,R.target.checked)}),(0,e.jsx)("span",{children:j.label})]},j.value))]})]})]})}function Mr(t){let a=new Date(t||0).getTime();return!!a&&(Date.now()-a)/864e5<3}async function Tr(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 i=URL.createObjectURL(t),s=document.createElement("a");return s.href=i,s.download=a,document.body.appendChild(s),s.click(),document.body.removeChild(s),setTimeout(()=>URL.revokeObjectURL(i),1e3),{ok:!0,picked:!1,name:a}}function Ga(t,a){if(!a||!t)return t;let n=t.toLowerCase(),i=a.toLowerCase(),s=[],m=0;for(;m<t.length;){let b=n.indexOf(i,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+i.length)},b)),m=b+i.length}return s}function Ht(t){let a=ca(t);if(!a)return"";let n=a.toDateString()===new Date().toDateString(),i=xn(a);return n?i:`${a.getMonth()+1}-${a.getDate()} ${i}`}
|
|
1155
1246
|
|
|
1156
1247
|
return module.exports;
|
|
1157
1248
|
},
|