memory-eternal 0.26.0 → 0.27.1
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 +14 -1
- package/lib/client.js +21 -21
- package/lib/working-memory.js +17 -0
- package/orca-plugin/orca-plugin.json +1 -1
- package/package.json +2 -2
- package/web/app.js +25 -25
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
|
|
6
|
+
var co=Object.create;var ba=Object.defineProperty;var po=Object.getOwnPropertyDescriptor;var mo=Object.getOwnPropertyNames;var uo=Object.getPrototypeOf,go=Object.prototype.hasOwnProperty;var fo=(t,a)=>{for(var n in a)ba(t,n,{get:a[n],enumerable:!0})},mn=(t,a,n,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of mo(a))!go.call(t,s)&&s!==n&&ba(t,s,{get:()=>a[s],enumerable:!(i=po(a,s))||i.enumerable});return t};var bo=(t,a,n)=>(n=t!=null?co(uo(t)):{},mn(a||!t||!t.__esModule?ba(n,"default",{value:t,enumerable:!0}):n,t)),ho=t=>mn(ba({},"__esModule",{value:!0}),t);var Tr={};fo(Tr,{EN:()=>Gn,MemoryLibrary:()=>Yo,ZH:()=>qn,apply:()=>Bo,inject:()=>Io});module.exports=ho(Tr);var r=bo(require("react"),1),$n=require("react-dom");var yo={"&":"&","<":"<",">":">"},Pa=t=>String(t).replace(/[&<>]/g,a=>yo[a]),xo=[[/结论|总结|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"]],vo=["\u2728","info"],wo=[[/风险|注意|警告|禁止|坑|务必/i,"\u26A0\uFE0F","warn"],[/提示|建议|tip|best practice/i,"\u{1F4A1}","idea"],[/结论|总结/i,"\u2705","ok"],[/错误|失败|报错/i,"\u2757","bad"]],ko=t=>{let a=String(t);for(let[n,i,s]of xo)if(n.test(a))return[i,s];return vo},So=t=>{let a=t.join(" ");for(let[n,i,s]of wo)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">'+Pa(n[1])+'</span><span class="md-v">'+ta(n[2])+"</span></span>";let i=Pa(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,g)=>/^(https?:|\/|#)/i.test(g)?'<a class="md-link" href="'+g+'" 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,(T,
|
|
10
|
-
`)){let
|
|
11
|
-
`)}var ha="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABccElEQVR4nO19B3hcxdX2e+buriR3cAndFIPtXbmq7cpFphhMTUiQvzTSCSEkBMiXAAFiTAgtDUghBL4vyUcC/BaEhGowxXLRSrJkY1taGzDVtLiAu6TdvXP+59xdOStZsnW3S7vv8zjE17szd2fec2bmzClAHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555NGfQJl+gTySi5erqhzO0LaxHFSczHbJpSnkHPXOqbW14WS2m0dm4chw/3kkGYM7ts9QCs9op05quwqAq2P7OQBqk9pwHhlFXgEMIDBAryg6vZ25iJK8uzMZXKjodAaWkdVVHgMBotjzGChYAApBVyVb+AXSprQtfSS77Twyh7wCGEBYunTKMK0xPVXtS9vSR6razyP9yCuAAYTC9o4yJgxOVfvStvSRqvbzSD/yCmAAwUnGrIHQRx7pQ14BDByQSfCl4vy/v4NoH/nr44GDvAIYIHjX6y0kQsq359KH9JXqfvJID/IKYIDgQ9pZqRkpN9BJH9JXqvvJIz3IK4AE8HLV2MInSkoGIQvu/4loTpq25lZfnJ6+DgoZe5mDTL9Hf0ZeAcQBIX+Db9LsocGhS8cUtP2jpco9JAte6vQB2VcvkDGXsZc5kLnIBoXUH5EfNBsQkq2YOekEV1gvZPDnQWR5UhLw7PatHRees2lTBzKAOq/7cIPoDQZGp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T0Msk+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(),d=String(a).toLowerCase();if(!d)return"";let g=s.indexOf(d);if(g<0)return"";let w=Math.max(0,g-n),u=Math.min(i.length,g+d.length+n),k=i.slice(w,u).replace(/\s+/g," ").trim();return(w>0?"\u2026":"")+k+(u<i.length?"\u2026":"")}function Pa(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(g=>
|
|
8
|
+
`)){let m=s.indexOf(":");if(m<=0)continue;let g=s.slice(0,m).trim(),S=s.slice(m+1).trim().replace(/^["']|["']$/g,"");g&&i.push([g,S])}return{meta:i,body:a.slice(n[0].length)}}function un(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,(T,q,G)=>(n.push('<pre class="md-pre"><code>'+Pa(G.replace(/\n$/,""))+"</code></pre>"),"\0F"+(n.length-1)+"\0")),s=[],m=0,g=[],S=null,u=null,N=()=>{g.length&&(s.push('<p class="md-p">'+g.join("<br/>")+"</p>"),g=[])},p=()=>{if(!S)return;let T=S.type;s.push("<"+T+' class="md-'+T+'">'+S.items.map(q=>"<li>"+q+"</li>").join("")+"</"+T+">"),S=null},w=()=>{if(!u)return;let[T,q]=So(u);s.push('<div class="md-callout md-c-'+q+'"><span class="md-ico">'+T+"</span>"+u.join("<br/>")+"</div>"),u=null},x=()=>{N(),p(),w()};for(let T of i.split(`
|
|
10
|
+
`)){let q=T.trim();if(!q){x();continue}let G=/^\u0000F(\d+)\u0000$/.exec(q);if(G){x(),s.push(n[Number(G[1])]);continue}let R;if(R=/^(#{1,6})\s+(.+)$/.exec(q)){x();let[$,L]=ko(R[2]);m++,s.push('<div id="md-h-'+m+'" class="md-h md-h-'+(R[1].length<=2?"h1":"h2")+" md-c-"+L+'"><span class="md-ico">'+$+'</span><span class="md-hx">'+ta(R[2])+"</span></div>");continue}if(/^(-{3,}|\*{3,}|_{3,})$/.test(q)){x(),s.push('<hr class="md-hr"/>');continue}if(R=/^>\s?(.*)$/.exec(q)){N(),p(),u=u||[],u.push(ta(R[1]));continue}if(R=/^[-*+]\s+(.+)$/.exec(q)){N(),w(),(!S||S.type!=="ul")&&(p(),S={type:"ul",items:[]}),S.items.push(ta(R[1]));continue}if(R=/^\d+[.)]\s+(.+)$/.exec(q)){N(),w(),(!S||S.type!=="ol")&&(p(),S={type:"ol",items:[]}),S.items.push(ta(R[1]));continue}p(),w(),g.push(ta(q))}return x(),s.join(`
|
|
11
|
+
`)}var ya="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABccElEQVR4nO19B3hcxdX2e+buriR3cAndFIPtXbmq7cpFphhMTUiQvzTSCSEkBMiXAAFiTAgtDUghBL4vyUcC/BaEhGowxXLRSrJkY1taGzDVtLiAu6TdvXP+59xdOStZsnW3S7vv8zjE17szd2fec2bmzClAHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555NGfQJl+gTySi5erqhzO0LaxHFSczHbJpSnkHPXOqbW14WS2m0dm4chw/3kkGYM7ts9QCs9op05quwqAq2P7OQBqk9pwHhlFXgEMIDBAryg6vZ25iJK8uzMZXKjodAaWkdVVHgMBotjzGChYAApBVyVb+AXSprQtfSS77Twyh7wCGEBYunTKMK0xPVXtS9vSR6razyP9yCuAAYTC9o4yJgxOVfvStvSRqvbzSD/yCmAAwUnGrIHQRx7pQ14BDByQSfCl4vy/v4NoH/nr44GDvAIYIHjX6y0kQsq359KH9JXqfvJID/IKYIDgQ9pZqRkpN9BJH9JXqvvJIz3IK4AE8HLV2MInSkoGIQvu/4loTpq25lZfnJ6+DgoZe5mDTL9Hf0ZeAcQBIX+Db9LsocGhS8cUtP2jpco9JAte6vQB2VcvkDGXsZc5kLnIBoXUH5EfNBsQkq2YOekEV1gvZPDnQWR5UhLw7PatHRees2lTBzKAOq/7cIPoDQZGpKM/AnaYzCdV1gc+RgbwzLhxBSNHFzzOwNnWA+YwgR4JOtSCmSvWv5X3VOw78juAvoFWVI4fuqrSc53LNNdpwpc6hV/AwLzRYwrvX+R2u5ABpcTE04DUn/9jMEz6zMSqK2MsYy1jvv8hkUPmRO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QdasHMHL/Ws4u8AogDUV/1WQb4zjDpHUOcuKi4NrAHGULUe26lBvnS0Z8C+8v8gRmZFLSWKveQPSE86mA1wgT9uNy/fnle8O0jfwSIA0K0Cv/6Zbtdu+ds6Sj6bCaFP+alXhyQffUCGXMZe5kDmYu88MeH/A5ggKDBN/F0hlqShjllgp5b4d+QcSWQR+LI7wAGCI7k4XWKsCvV/Ugf0leq+8kjPcgrgAECq6gpY1Wq+5E+pK9U95NHepBXAAMHbDD8qUxCapVMY/izqCRZHgkirwAGEEJsLh8IfeSRPuQVwABCe2HBKmLsTVX70rb0kar280g/8gpgAGHOnLW7lMLqVLUvbUsfqWo/j/QjrwAGEhaCnVC1qbADSJvStvSR7LbzyBzy0YADCOIM06j5RafCDxOsenQAFAEhzS/mHW4GFvIKYIBhb8HIlc7QtskcUklVAeTSFCoY+U4y28wjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgDtvD/AXvCXhuljgbyAAAAAElFTkSuQmCC";function gn(t,a,n=48){if(!a||!t)return"";let i=String(t),s=i.toLowerCase(),m=String(a).toLowerCase();if(!m)return"";let g=s.indexOf(m);if(g<0)return"";let S=Math.max(0,g-n),u=Math.min(i.length,g+m.length+n),N=i.slice(S,u).replace(/\s+/g," ").trim();return(S>0?"\u2026":"")+N+(u<i.length?"\u2026":"")}function Ea(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)):[],m=[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(g=>m.includes(g))}function fn({hasVersion:t=!1,hostVersion:a="",onDisk:n="",residentServed:i="",residentPresent:s=!1,residentManaged:m=null,residentManagedKnown:g=null,residentManagedBy:S="",replaceBlocked:u=null}={}){let N=String(n||""),p=String(a||""),w=String(i||""),x=!!(t&&s&&!w),T=!!(N&&w&&w!==N),q=m===!1&&g===!1,G=S==="host",R=m===!1&&!q&&!G,$=!!(p&&N&&p!==N),L=!!(u&&u.fresh),W=T||x||R||q,pe=null;$?pe="hostProcessStale":x?pe="residentDown":L?pe="residentReplaceBlocked":q?pe="residentLockUnknown":R&&(pe="residentUnmanaged");let Q;return x?Q="restartStart":T?Q="restartFixes":R||q?Q="restartRepair":$?Q="restartHostOnly":Q="restartAnyway",{showButton:!!t,emphasis:W,warn:pe,hint:Q,hostStale:$,residentDown:x,residentStale:T,residentUnmanaged:R,residentLockUnknown:q,residentHostManaged:G,needsRestart:W}}var Co=/^\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(Co.test(a)){let[i,s,m]=a.split("-").map(Number),g=new Date(i,s-1,m);return Number.isNaN(g.getTime())?null:g}let n=new Date(a);return Number.isNaN(n.getTime())?null:n}var bn=t=>`${t.getFullYear()}-${xa(t.getMonth()+1)}-${xa(t.getDate())}`,hn=t=>`${xa(t.getHours())}:${xa(t.getMinutes())}`;function va(t){let a=ca(t);return a?bn(a):""}function Ba(t){let a=ca(t);return a?bn(a)+" "+hn(a):""}function yn(t){let a=ca(t);return a?hn(a):""}function xn(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=u=>{let N=new URLSearchParams;return N.set("title",n),N.set("body",u),i.length&&N.set("labels",i.join(",")),"https://github.com/"+a+"/issues/new?"+N.toString()},g=String(t.body||""),S=m(g);if(S.length>s){let u=`
|
|
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`,
|
|
15
|
-
`)}var
|
|
16
|
-
`),
|
|
17
|
-
`);function kn(t={}){let a=t.lang==="en"?"en":"zh",n=a==="en"?Do:zo,i=t.repo||"EternalNight996/memory-eternal";return n=n.split(Ba).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 va(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=u=>{u&&i.size<n&&i.add(u)};if(s(a.focusId),s(a.hoverId),a.searchHits)for(let u of a.searchHits){if(i.size>=n)break;i.add(u)}let d=a.degree||{},g=u=>Number(d[u])||0,w=[];for(let u of Array.isArray(t)?t:[])u&&u.id&&!i.has(u.id)&&w.push(u);w.sort((u,k)=>g(k.id)-g(u.id));for(let u of w){if(i.size>=n)break;i.add(u.id)}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 wa(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 Ao=.05,Oa=30;function ja(t,a,n,i){return(n>=t?1:0)+(i>=a?2:0)}var Ha=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 w=n*4;if(this.child[w]===-1&&this.child[w+1]===-1&&this.child[w+2]===-1&&this.child[w+3]===-1){if(this.point[n]===-1){this.point[n]=i;return}let u=this.half[n]/2;if(u<.001||this.count+4>this.cap){this.point[n]=-2;return}let k=this.cx[n],c=this.cy[n];for(let x=0;x<4;x+=1)this.child[w+x]=this.newNode(k+(x&1?u:-u),c+(x&2?u:-u),u);let y=this.point[n];if(this.point[n]=-2,y>=0){let x=a[y];this.insert(a,this.child[w+ja(k,c,Number(x.x)||0,Number(x.y)||0)],y)}this.insert(a,this.child[w+ja(k,c,d,g)],i);return}this.insert(a,this.child[w+ja(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 y=0;y<n;y+=1){let x=Number(a[y].x)||0,T=Number(a[y].y)||0;x<i&&(i=x),x>s&&(s=x),T<d&&(d=T),T>g&&(g=T)}let w=(i+s)/2,u=(d+g)/2,k=Math.max(1,Math.max(s-i,g-d)/2)*1.001,c=this.newNode(w,u,k);if(c<0)return-1;for(let y=0;y<n;y+=1)this.insert(a,c,y);return c}accumulate(a,n,i,s,d,g){let w=this.mass[a];if(w<=0)return;let u=this.mx[a]/w,k=this.my[a]/w,c=i-u,y=s-k,x=c*c+y*y;if(x<1e-9)return;let T=this.child[a*4]===-1;if(T&&this.point[a]===n)return;let _=Math.sqrt(x);if(this.lastVisits+=1,T||2*this.half[a]/_<g){let R=d*w/x;this.fx[n]+=c/_*R,this.fy[n]+=y/_*R;return}let q=a*4;for(let R=0;R<4;R+=1){let L=this.child[q+R];L>=0&&this.accumulate(L,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 w=n.repulsion,u=n.theta===void 0?.8:n.theta,k=n.skipIndex===void 0?-1:n.skipIndex;for(let c=0;c<i;c+=1){if(c===k)continue;let y=a[c];this.accumulate(g,c,Number(y.x)||0,Number(y.y)||0,w,u)}return{fx:s,fy:d,visits:this.lastVisits}}};function Tn(t,a={}){let n=t.nodes,i=n.length,s=a.params||wa(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,w=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)*w,t.alpha<1e-4&&(t.alpha=0);let u=Math.max(0,Math.min(1,Number(a.alphaFloor)||0));t.alpha<u&&(t.alpha=u);let k=a.alpha===void 0?t.alpha:a.alpha,c=Math.min(.4,t.tickCount/1500),y=a.damping===void 0?.9-c:Math.max(.1,Math.min(.95,Number(a.damping)||.5)),x=t.dragNode?n.indexOf(t.dragNode):-1;(!t.forceEngine||t.forceEngine.capacity<i)&&(t.forceEngine=new Ha(i));let T=t.forceEngine.compute(n,{repulsion:s.repulsion*k,theta:d,skipIndex:x}),_=T.fx,q=T.fy;for(let P=0;P<i;P+=1){if(P===x)continue;let G=n[P],$=_[P],B=q[P];if(Number.isFinite($)||($=0),Number.isFinite(B)||(B=0),t.clustered&&t.typeCenters&&t.typeCenters[G.type]){let he=t.typeCenters[G.type];$+=(he.x-G.x)*.006*k,B+=(he.y-G.y)*.006*k}else $-=G.x*s.centerGravity*k,B-=G.y*s.centerGravity*k;let X=((Number(G.vx)||0)+$)*y,ce=((Number(G.vy)||0)+B)*y;X>s.velCap?X=s.velCap:X<-s.velCap&&(X=-s.velCap),ce>s.velCap?ce=s.velCap:ce<-s.velCap&&(ce=-s.velCap),G.vx=X,G.vy=ce}let R=t.edges||[],L=t.edgePairs||null,U=t.nodeById||null,V=L?L.length/2:R.length;for(let P=0;P<V;P+=1){let G,$;if(L)G=n[L[P*2]],$=n[L[P*2+1]];else{let W=R[P];G=U?U.get(W.sourceNodeId):null,$=U?U.get(W.targetNodeId):null}if(!G||!$)continue;let B=$.x-G.x,X=$.y-G.y,ce=Math.sqrt(B*B+X*X)||1,he=(ce-100)*s.attraction*k,re=B/ce*he,Ue=X/ce*he;t.dragNode!==G&&(G.vx+=re,G.vy+=Ue),t.dragNode!==$&&($.vx-=re,$.vy-=Ue)}let me=0;for(let P=0;P<i;P+=1){let G=n[P];P!==x&&(G.x+=G.vx,G.y+=G.vy,me+=G.vx*G.vx+G.vy*G.vy)}let Q=i?Math.sqrt(me/i):0;return Q<Ao&&t.tickCount>60&&!t.dragNode?t.quietTicks=(t.quietTicks|0)+1:t.quietTicks=0,{rms:Q,tickCount:t.tickCount,quietTicks:t.quietTicks,params:s,visits:T.visits,alpha:k}}function Vt(t){return(Array.isArray(t)?t:[]).filter(Boolean).join("/")}function Rn(t){return String(t??"").split("/").filter(Boolean)}function zn(t,a,n={}){let i=Vt(a);return`${t}/graph/level?path=${encodeURIComponent(i)}${n.all?"&all=1":""}`}function Lo(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 Fo({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 Dn(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 An(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?Lo(n.count):Fo({kind:s,degree:a.degree,maxDegree:a.maxDegree})}}function Ln(t){return{...t||{},repulsion:1600,centerGravity:.004}}function Fn(t){return 12+Math.max(0,Number(t)||0)*.25}var Wa=t=>{let a=String(t??""),n=2166136261;for(let i=0;i<a.length;i+=1)n^=a.charCodeAt(i),n=Math.imul(n,16777619);return n^=n>>>16,n=Math.imul(n,2246822507),n^=n>>>13,n=Math.imul(n,3266489909),n^=n>>>16,(n>>>0)/4294967296};function In(t,a=Math.random){let n=(Array.isArray(t)?t:[]).filter(d=>d&&d.planet),i=n.length;if(!i)return n;let s=n.map((d,g)=>g%2?1:-1);for(let d=i-1;d>0;d-=1){let g=Math.floor(Math.max(0,Math.min(.999999,Number(a())||0))*(d+1)),w=s[d];s[d]=s[g],s[g]=w}return n.forEach((d,g)=>{d.orbitDir=s[g],d.orbitScale=.55+Math.max(0,Math.min(.999999,Number(a())||0))*1.1,d.orbitPhase=Math.max(0,Math.min(.999999,Number(a())||0))*Math.PI*2}),n}function Pn(t,a={}){let n=(Array.isArray(t)?t:[]).filter(k=>k&&k.planet&&Number.isFinite(k.x)&&Number.isFinite(k.y));if(!n.length)return null;let i=0,s=0;for(let k of n)i+=k.x,s+=k.y;if(i/=n.length,s/=n.length,n.length<2)return{cx:i,cy:s};let d=a.speed===void 0?.0028:Math.max(0,Number(a.speed)||0);if(!d)return{cx:i,cy:s};let g=typeof a.skip=="function"?a.skip:null,w=a.random!==!1,u=Number.isFinite(a.tick)?a.tick:0;for(let k=0;k<n.length;k+=1){let c=n[k];if(g&&g(c))continue;let y=c.x-i,x=c.y-s,T=Math.sqrt(y*y+x*x);if(T<.001)continue;let _=c.id==null?"planet-"+k:String(c.id),q=c.orbitDir===1||c.orbitDir===-1?c.orbitDir:w&&Wa(_)<.5?-1:1,R=Number.isFinite(c.orbitScale)?Math.max(.2,Math.min(2,c.orbitScale)):w?.55+Wa(_+"#s")*1.1:1,L=Number.isFinite(c.orbitPhase)?c.orbitPhase:Wa(_+"#w")*Math.PI*2,U=w?1+Math.sin(u*.009+L)*.35:1,V=d*q*R*U*Math.sqrt(120/Math.max(40,Number(c.r)||120)),me=Math.atan2(x,y)+V;c.x=i+Math.cos(me)*T,c.y=s+Math.sin(me)*T}return{cx:i,cy:s}}function En(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||""),w=s==="AbortError"||/abort/i.test(d)||i>=n;return{timeout:w,message:w?`\u5C42\u7EA7\u52A0\u8F7D\u8D85\u65F6\uFF08${n}ms\uFF09`:d||"\u672A\u77E5\u9519\u8BEF"}}function Bn(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 jn(t={}){let a=t.raf||(u=>requestAnimationFrame(u)),n=t.cancelRaf||(u=>cancelAnimationFrame(u)),i=t.setTimeout||((u,k)=>setTimeout(u,k)),s=t.clearTimeout||(u=>clearTimeout(u)),d=new Set,g=new Set,w=[];return{raf(u){let k=a(()=>{d.delete(k),u()});return d.add(k),k},cancelRaf(u){u!=null&&(d.delete(u),n(u))},setTimeout(u,k){let c=i(()=>{g.delete(c),u()},k);return g.add(c),c},clearTimeout(u){u!=null&&(g.delete(u),s(u))},listen(u,k,c,y){u.addEventListener(k,c,y),w.push({target:u,type:k,fn:c,opts:y})},snapshot(){return{rafs:d.size,timers:g.size,listeners:w.length}},releaseAll(){for(let u of[...d]){d.delete(u);try{n(u)}catch{}}for(let u of[...g]){g.delete(u);try{s(u)}catch{}}for(let u of w.splice(0))try{u.target.removeEventListener(u.type,u.fn,u.opts)}catch{}}}}function Hn(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 Io(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 On(t,a){let n={...t||{}},i={};for(let[s,d]of Object.entries(a||{}))Io(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",Y="/memory-eternal/api",ka=["\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"],Wn="\u300A\u86CA\u771F\u4EBA\u300B\xB7 \u5927\u7231\u4ED9\u5C0A";async function Na(t){try{let a=await fetch(`${Y}/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 Eo=100,Bo=["slots","locale"],Vn={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",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",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",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",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]
|
|
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`,N=p=>m(g.slice(0,p)+u);if(N(0).length>s)g=u;else{let p=0,w=g.length;for(;p<w;){let x=Math.ceil((p+w)/2);N(x).length<=s?p=x:w=x-1}g=g.slice(0,p)+u}S=m(g)}return S}function vn(t={}){return["## \u73B0\u8C61",String(t.description||"").trim()||"\uFF08\u8BF7\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF09","","## \u590D\u73B0\u6B65\u9AA4","1. ","2. ","","## \u671F\u671B\u884C\u4E3A","","## \u5B9E\u9645\u884C\u4E3A","","## \u73AF\u5883","- \u63D2\u4EF6\u7248\u672C: "+(t.version||"\uFF08\u89C1\u8BCA\u65AD\u4FE1\u606F\uFF09"),"",t.diagnostics||"","","---","> \u7531 memory-eternal \u63D2\u4EF6\u5185\u300C\u53CD\u9988\u5F02\u5E38\u300D\u751F\u6210\uFF08\u8BCA\u65AD\u4FE1\u606F\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E\u5404\u7C7B key/token \u5DF2\u66FF\u6362\uFF09\u3002"].join(`
|
|
15
|
+
`)}var Ha="https://github.com/EternalNight996/memory-eternal",Mo=["\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
|
+
`),To=["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 wn(t={}){let a=t.lang==="en"?"en":"zh",n=a==="en"?To:Mo,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 kn({panX:t=0,panY:a=0,zoom:n=1,w:i=0,h:s=0,margin:m=60}={}){let g=n||1;return{x0:(0-t)/g-m,y0:(0-a)/g-m,x1:(i-t)/g+m,y1:(s-a)/g+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 Sn(t){let a=Number(t)||0;return a<=120?1/0:a<=300?160:a<=600?90:60}function Nn(t,a={}){let n=Number.isFinite(a.limit)?a.limit:1/0,i=new Set,s=u=>{u&&i.size<n&&i.add(u)};if(s(a.focusId),s(a.hoverId),a.searchHits)for(let u of a.searchHits){if(i.size>=n)break;i.add(u)}let m=a.degree||{},g=u=>Number(m[u])||0,S=[];for(let u of Array.isArray(t)?t:[])u&&u.id&&!i.has(u.id)&&S.push(u);S.sort((u,N)=>g(N.id)-g(u.id));for(let u of S){if(i.size>=n)break;i.add(u.id)}return i}function Cn(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 Ro=.05,Wa=30;function ja(t,a,n,i){return(n>=t?1:0)+(i>=a?2:0)}var Oa=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,g=Number(s.y)||0;this.mass[n]+=1,this.mx[n]+=m,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 u=this.half[n]/2;if(u<.001||this.count+4>this.cap){this.point[n]=-2;return}let N=this.cx[n],p=this.cy[n];for(let x=0;x<4;x+=1)this.child[S+x]=this.newNode(N+(x&1?u:-u),p+(x&2?u:-u),u);let w=this.point[n];if(this.point[n]=-2,w>=0){let x=a[w];this.insert(a,this.child[S+ja(N,p,Number(x.x)||0,Number(x.y)||0)],w)}this.insert(a,this.child[S+ja(N,p,m,g)],i);return}this.insert(a,this.child[S+ja(this.cx[n],this.cy[n],m,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,m=1/0,g=-1/0;for(let w=0;w<n;w+=1){let x=Number(a[w].x)||0,T=Number(a[w].y)||0;x<i&&(i=x),x>s&&(s=x),T<m&&(m=T),T>g&&(g=T)}let S=(i+s)/2,u=(m+g)/2,N=Math.max(1,Math.max(s-i,g-m)/2)*1.001,p=this.newNode(S,u,N);if(p<0)return-1;for(let w=0;w<n;w+=1)this.insert(a,p,w);return p}accumulate(a,n,i,s,m,g){let S=this.mass[a];if(S<=0)return;let u=this.mx[a]/S,N=this.my[a]/S,p=i-u,w=s-N,x=p*p+w*w;if(x<1e-9)return;let T=this.child[a*4]===-1;if(T&&this.point[a]===n)return;let q=Math.sqrt(x);if(this.lastVisits+=1,T||2*this.half[a]/q<g){let R=m*S/x;this.fx[n]+=p/q*R,this.fy[n]+=w/q*R;return}let G=a*4;for(let R=0;R<4;R+=1){let $=this.child[G+R];$>=0&&this.accumulate($,n,i,s,m,g)}}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 g=this.build(a);if(g<0)return{fx:s,fy:m,visits:0};let S=n.repulsion,u=n.theta===void 0?.8:n.theta,N=n.skipIndex===void 0?-1:n.skipIndex;for(let p=0;p<i;p+=1){if(p===N)continue;let w=a[p];this.accumulate(g,p,Number(w.x)||0,Number(w.y)||0,S,u)}return{fx:s,fy:m,visits:this.lastVisits}}};function Mn(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 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 u=Math.max(0,Math.min(1,Number(a.alphaFloor)||0));t.alpha<u&&(t.alpha=u);let N=a.alpha===void 0?t.alpha:a.alpha,p=Math.min(.4,t.tickCount/1500),w=a.damping===void 0?.9-p:Math.max(.1,Math.min(.95,Number(a.damping)||.5)),x=t.dragNode?n.indexOf(t.dragNode):-1;(!t.forceEngine||t.forceEngine.capacity<i)&&(t.forceEngine=new Oa(i));let T=t.forceEngine.compute(n,{repulsion:s.repulsion*N,theta:m,skipIndex:x}),q=T.fx,G=T.fy;for(let P=0;P<i;P+=1){if(P===x)continue;let K=n[P],U=q[P],B=G[P];if(Number.isFinite(U)||(U=0),Number.isFinite(B)||(B=0),t.clustered&&t.typeCenters&&t.typeCenters[K.type]){let he=t.typeCenters[K.type];U+=(he.x-K.x)*.006*N,B+=(he.y-K.y)*.006*N}else U-=K.x*s.centerGravity*N,B-=K.y*s.centerGravity*N;let X=((Number(K.vx)||0)+U)*w,ce=((Number(K.vy)||0)+B)*w;X>s.velCap?X=s.velCap:X<-s.velCap&&(X=-s.velCap),ce>s.velCap?ce=s.velCap:ce<-s.velCap&&(ce=-s.velCap),K.vx=X,K.vy=ce}let R=t.edges||[],$=t.edgePairs||null,L=t.nodeById||null,W=$?$.length/2:R.length;for(let P=0;P<W;P+=1){let K,U;if($)K=n[$[P*2]],U=n[$[P*2+1]];else{let O=R[P];K=L?L.get(O.sourceNodeId):null,U=L?L.get(O.targetNodeId):null}if(!K||!U)continue;let B=U.x-K.x,X=U.y-K.y,ce=Math.sqrt(B*B+X*X)||1,he=(ce-100)*s.attraction*N,re=B/ce*he,_e=X/ce*he;t.dragNode!==K&&(K.vx+=re,K.vy+=_e),t.dragNode!==U&&(U.vx-=re,U.vy-=_e)}let pe=0;for(let P=0;P<i;P+=1){let K=n[P];P!==x&&(K.x+=K.vx,K.y+=K.vy,pe+=K.vx*K.vx+K.vy*K.vy)}let Q=i?Math.sqrt(pe/i):0;return Q<Ro&&t.tickCount>60&&!t.dragNode?t.quietTicks=(t.quietTicks|0)+1:t.quietTicks=0,{rms:Q,tickCount:t.tickCount,quietTicks:t.quietTicks,params:s,visits:T.visits,alpha:N}}function Vt(t){return(Array.isArray(t)?t:[]).filter(Boolean).join("/")}function Tn(t){return String(t??"").split("/").filter(Boolean)}function Rn(t,a,n={}){let i=Vt(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",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?zo(n.count):Do({kind:s,degree:a.degree,maxDegree:a.maxDegree})}}function An(t){return{...t||{},repulsion:1600,centerGravity:.004}}function Ln(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||""),S=s==="AbortError"||/abort/i.test(m)||i>=n;return{timeout:S,message:S?`\u5C42\u7EA7\u52A0\u8F7D\u8D85\u65F6\uFF08${n}ms\uFF09`:m||"\u672A\u77E5\u9519\u8BEF"}}function Fn(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 In(t={}){let a=t.raf||(u=>requestAnimationFrame(u)),n=t.cancelRaf||(u=>cancelAnimationFrame(u)),i=t.setTimeout||((u,N)=>setTimeout(u,N)),s=t.clearTimeout||(u=>clearTimeout(u)),m=new Set,g=new Set,S=[];return{raf(u){let N=a(()=>{m.delete(N),u()});return m.add(N),N},cancelRaf(u){u!=null&&(m.delete(u),n(u))},setTimeout(u,N){let p=i(()=>{g.delete(p),u()},N);return g.add(p),p},clearTimeout(u){u!=null&&(g.delete(u),s(u))},listen(u,N,p,w){u.addEventListener(N,p,w),S.push({target:u,type:N,fn:p,opts:w})},snapshot(){return{rafs:m.size,timers:g.size,listeners:S.length}},releaseAll(){for(let u of[...m]){m.delete(u);try{n(u)}catch{}}for(let u of[...g]){g.delete(u);try{s(u)}catch{}}for(let u of S.splice(0))try{u.target.removeEventListener(u.type,u.fn,u.opts)}catch{}}}}function Pn(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,g=[];return s>n&&g.push(`\u5355\u5C42\u56FE\u5143 ${s} > ${n}`),m>i&&g.push(`\u5C42 payload ${m} > ${i}`),{ok:g.length===0,items:s,bytes:m,problems:g}}function Ao(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 En(t,a){let n={...t||{}},i={};for(let[s,m]of Object.entries(a||{}))Ao(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",V="/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"],Bn="\u300A\u86CA\u771F\u4EBA\u300B\xB7 \u5927\u7231\u4ED9\u5C0A";async function Ca(t){try{let a=await fetch(`${V}/open-external?url=${encodeURIComponent(t)}`,{method:"POST"}),n=await a.json().catch(()=>null);if(a.ok&&n&&n.ok)return!0}catch{}try{if(window.open(t,"_blank","noopener,noreferrer"))return!0}catch{}try{let a=document.createElement("a");return a.href=t,a.target="_blank",a.rel="noopener noreferrer",a.click(),!0}catch{}return!1}var Fo=100,Io=["slots","locale"],qn={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",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",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",supportLegacyTitle:"\u65E7\u7A0B\u5E8F\uFF08dsh-desktop\uFF09\u5DF2\u505C\u6B62\u7EF4\u62A4",supportLegacyBody:"\u4F5C\u8005\u81EA\u7814\u7684 dsh-desktop \u5DF2\u505C\u6B62\u7EF4\u62A4\uFF0C\u5B98\u65B9 DeepSeek Harness \u684C\u9762\u7248\u5DF2\u8986\u76D6\u540C\u6837\u80FD\u529B\uFF0C\u5EFA\u8BAE\u8FC1\u79FB\u3002\u65E7 profile \u91CC\u5982\u679C\u8FD8\u9489\u7740\u5DF2\u64A4\u4E0B\u7684 dsh-desktop-shell@0.3.0\uFF0C\u5148\u5220\u6389\u90A3\u5957\u4F9D\u8D56\uFF0C\u5426\u5219 pnpm install \u4F1A\u5931\u8D25\u3002",supportReadme:"\u6253\u5F00 README",supportReleases:"\u5386\u53F2\u7248\u672C",supportFeedback:"\u5F02\u5E38\u53CD\u9988",supportReplay:"\u91CD\u65B0\u67E5\u770B\u5F15\u5BFC",onboardTitle:"30 \u79D2\u8BA4\u8BC6\u8BB0\u5FC6\u6838\u5FC3",onboardSub:"\u4F60\u7684 AI \u4F1A\u5728\u6BCF\u8F6E\u5BF9\u8BDD\u540E\u81EA\u52A8\u6C89\u6DC0\u77E5\u8BC6\u5361\uFF0C\u5148\u5BA1\u540E\u5165\u3002",onboardSkip:"\u8DF3\u8FC7",onboardBack:"\u4E0A\u4E00\u6B65",onboardNext:"\u4E0B\u4E00\u6B65",onboardStart:"\u5F00\u59CB\u4F7F\u7528",onboardStep0Title:"\u5148\u53BB GitHub \u70B9\u4E2A Star",onboardStep0Body:"Star \u662F\u4F5C\u8005\u7EE7\u7EED\u7EF4\u62A4\u6700\u76F4\u63A5\u7684\u53CD\u9988\uFF1B\u60F3\u81EA\u5DF1\u6539\u4EE3\u7801\u6216\u90E8\u7F72\uFF0C\u5C31\u987A\u624B Fork \u4E00\u4EFD\u3002",onboardStar:"Star / \u70B9\u8D5E",onboardFork:"Fork",onboardStarred:"\u5DF2 Star\uFF0C\u7EE7\u7EED",onboardStarHint:"\u4E4B\u540E\u53EF\u4EE5\u968F\u65F6\u70B9\u9876\u680F\u7684 \u2605 Star \u56DE\u6765\u3002",onboardStep1Title:"\u81EA\u52A8\u6C89\u6DC0\uFF0C\u4E0D\u7528\u624B\u52A8\u8BB0",onboardStep1Body:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\uFF0C\u503C\u5F97\u7559\u4E0B\u7684\u51B3\u7B56\u3001\u6839\u56E0\u548C\u6559\u8BAD\u4F1A\u88AB\u5199\u6210\u4E00\u5F20\u5361\u3002\u5148\u751F\u6210\uFF0C\u518D\u5BA1\u6838\u3002",onboardStep2Title:"\u8BFB\u5230\u6709\u7528\u7684\u5361\uFF0C\u70B9\u4E2A \u{1F44D}",onboardStep2Body:"\u6253\u5F00\u4EFB\u610F\u5361\u7247\uFF0C\u70B9 \u{1F44D} \u6709\u7528 / \u{1F44E} \u6CA1\u7528\u3002\u4E0D\u7528\u5148\u641C\u7D22\uFF0C\u6309\u94AE\u73B0\u5728\u4E00\u76F4\u90FD\u5728\u3002\u5B83\u4F1A\u5E2E\u52A9\u53EC\u56DE\u6392\u5E8F\u3002",onboardStep3Title:"\u5DE6\u4FA7\u65B0\u589E\u652F\u6301\u5165\u53E3",onboardStep3Body:"\u4EA4\u6D41\u7FA4\u3001\u8D5E\u52A9\u3001\u65E7\u7A0B\u5E8F\u3001\u5F02\u5E38\u53CD\u9988\u90FD\u5728\u5DE6\u680F\u5E95\u90E8\uFF1B\u9700\u8981\u5E2E\u52A9\u65F6\u4E0D\u7528\u7FFB README\u3002",onboardTip:"\u63D0\u793A\uFF1A\u8FD9\u4E2A\u5F15\u5BFC\u53EF\u4EE5\u5728\u300C\u652F\u6301\u4E0E\u4EA4\u6D41\u300D\u91CC\u91CD\u65B0\u6253\u5F00\u3002",navWorkspace:"\u5DE5\u4F5C\u533A",navSystem:"\u7CFB\u7EDF",navSupport:"\u652F\u6301",navQuotes:"\u4F5C\u8005\u8BED\u5F55",quoteHint:"\u70B9\u51FB\u6362\u4E00\u53E5",v5Local:"\u672C\u5730\u8FD0\u884C",v5Star:"\u53BB GitHub \u70B9 Star",runtimeTitle:"\u8FD0\u884C\u72B6\u6001",runtimeSub:"\u77E5\u8BC6\u5E93\u3001\u5907\u4EFD\u3001\u81EA\u52A8\u6C89\u6DC0\u4E0E\u7248\u672C",dbTitle:"\u77E5\u8BC6\u5E93",backupTitle:"\u5907\u4EFD",captureTitle:"\u81EA\u52A8\u6C89\u6DC0",versionTitle:"\u7248\u672C",cardsUnit:"\u5F20\u5361",links:"\u8FDE\u63A5",todayReview:"\u4ECA\u65E5\u56DE\u770B",openArrow:"\u6253\u5F00 \u2192",reshuffle:"\u6362\u4E00\u5F20",insightDecision:"\u51B3\u7B56",insightRoot:"\u6839\u56E0",insightLesson:"\u6559\u8BAD",insightSummary:"\u6458\u8981",pinCard:"\u56FA\u5B9A\u8FD9\u5F20\u5361",unpinCard:"\u53D6\u6D88\u56FA\u5B9A",pinnedOnly:"\u5DF2\u56FA\u5B9A",toastApproved:"\u5DF2\u6279\u51C6",toastRejected:"\u5DF2\u9A73\u56DE",toastCardDeleted:"\u5DF2\u5220\u9664",toastRestored:"\u5DF2\u6062\u590D",toastPurged:"\u5DF2\u5F7B\u5E95\u5220\u9664",toastPurgedExpired:"\u5DF2\u6E05\u7406\u8FC7\u671F\u56DE\u6536\u7AD9",toastFailed:"\u64CD\u4F5C\u5931\u8D25",noSelection:"\u8BF7\u5148\u9009\u62E9\u8981\u5904\u7406\u7684\u5361\u7247",enabledLabel:"\u542F\u7528\u8BB0\u5FC6\u6838\u5FC3",vaultDirLabel:"\u8BB0\u5FC6\u5E93\u76EE\u5F55\uFF08\u5355\u5E93\uFF09",captureCooldownMs:"\u6C89\u6DC0\u51B7\u5374 (ms)",captureProvider:"\u84B8\u998F provider\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",routeAuto:"\u81EA\u52A8\uFF08\u6309\u6CE8\u518C\u987A\u5E8F\uFF09",routeListFail:"\u53D6\u4E0D\u5230\u6A21\u578B\u5217\u8868\uFF08{err}\uFF09\u2192 \u4E0B\u9762\u53EF\u76F4\u63A5\u624B\u586B provider / model\uFF1B\u684C\u9762\u7248\u5F39\u7A97\u4F1A\u81EA\u52A8\u5411\u5BBF\u4E3B\u4EE3\u7406\uFF0C\u82E5\u4ECD\u5931\u8D25\u8BF7\u4ECE DSH \u8BBE\u7F6E\u9875\u6253\u5F00",captureFollowSession:"\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\uFF08\u84B8\u998F\u7528\u4F1A\u8BDD\u7684 provider/model\uFF09",captureFirstOnly:"\u4EC5\u8BD5\u9996\u9009\uFF08\u5931\u8D25\u5373\u505C\uFF0C\u4E0D\u8F6E\u6362\u515C\u5E95\uFF09",llmTest:"\u6D4B\u8BD5\u84B8\u998F\u8DEF\u7531",llmTestOk:"\u2713 \u8C03\u7528\u6210\u529F",llmTestFail:"\u2717 \u8C03\u7528\u5931\u8D25",llmCandidates:"\u5019\u9009\u6570",captureModel:"\u84B8\u998F model\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",recallEmbedding:"\u8BED\u4E49\u53EC\u56DE provider\uFF08\u53EF\u9009\uFF09",sessionBudgetChars:"\u4F1A\u8BDD\u9884\u7B97 (\u5B57\u7B26)",saving:"\u4FDD\u5B58\u4E2D\u2026",savePending:"\u5DF2\u5199\u5165\u914D\u7F6E\u6587\u4EF6\uFF1B\u5BBF\u4E3B\u4ECD\u662F\u65E7\u7248\uFF0C\u91CD\u542F DSH \u540E\u5373\u4EE5\u65B0\u503C\u4E3A\u51C6\uFF08\u672C\u9762\u677F\u5DF2\u751F\u6548\uFF09",actionRunning:"\u5904\u7406\u4E2D\u2026",recycleEmptyHint:"\u56DE\u6536\u7AD9\u4E3A\u7A7A\uFF1A\u5220\u6389\u7684\u5361\u7247\u4F1A\u5148\u653E\u5230\u8FD9\u91CC\uFF0C\u4FDD\u7559 {days} \u5929\u540E\u81EA\u52A8\u6E05\u7406\u3002",recyclePurgeAll:"\u6E05\u7A7A\u56DE\u6536\u7AD9",recyclePurgeAllConfirm:"\u6C38\u4E45\u5220\u9664\u56DE\u6536\u7AD9\u91CC\u7684\u5168\u90E8 {n} \u5F20\u5361\u7247\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\u3002",toastPurgeAll:"\u5DF2\u6C38\u4E45\u5220\u9664 {n} \u5F20",bucketDeleted:"\u5DF2\u5220\u9664",restoreToQueue:"\u9000\u56DE\u5BA1\u6838",fbCopyManual:"\u81EA\u52A8\u590D\u5236\u88AB\u6D4F\u89C8\u5668\u62E6\u622A\uFF0C\u5DF2\u628A\u5185\u5BB9\u653E\u5728\u4E0B\u9762\uFF1A\u70B9\u300C\u5168\u9009\u300D\u518D\u6309 Ctrl+C",vcPage:"\u9875\u9762\u811A\u672C",vcPageStale:"\u26A0 \u5F53\u524D\u9875\u9762\u4ECD\u5728\u8FD0\u884C\u65E7\u7248\u811A\u672C\uFF08\u9875\u9762 v{page} / \u78C1\u76D8 v{disk}\uFF09\uFF1A\u6309 Ctrl+F5 \u5237\u65B0\u9875\u9762\u5373\u751F\u6548\uFF1B\u82E5\u300C\u8FD0\u884C\u4E2D\u300D\u4ECD\u662F\u65E7\u7248\u53F7\uFF0C\u5219\u8FD8\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcLoaded:"\u8FD0\u884C\u4E2D\uFF08\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF09",vcResident:"\u5E38\u9A7B\u5B9E\u4F8B",vcOnDisk:"\u78C1\u76D8\u5B89\u88C5",vcLatest:"npm \u6700\u65B0",vcStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\u4ECD\u52A0\u8F7D v{loaded} \u2014\u2014 \u70B9\u300C\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u300D\u5373\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u542F\u5B83\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestart:"\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",vcRestarting:"\u91CD\u542F\u4E2D\u2026",vcRestartSent:"\u5DF2\u8C03\u5EA6\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\uFF1A\u7EA6 3-8 \u79D2\u540E\u65B0\u8FDB\u7A0B\u63A5\u7BA1\uFF0C\u8BF7\u7A0D\u7B49\u518D\u5237\u65B0\u9875\u9762\uFF08Ctrl+F5\uFF09",vcRestartCurrent:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u7ECF\u662F\u6700\u65B0\u7248\uFF0C\u65E0\u9700\u91CD\u542F",vcRestartAnyway:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{ver}\uFF1B\u901A\u5E38\u65E0\u9700\u91CD\u542F\uFF0C\u5361\u4F4F/\u884C\u4E3A\u5F02\u5E38\u65F6\u53EF\u5F3A\u5236\u91CD\u542F",vcHostProcessStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46**\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B**\uFF08DSH \u5BBF\u4E3B\uFF09\u52A0\u8F7D\u7684\u4ECD\u662F v{loaded} \u2014\u2014 \u5B83\u6765\u81EA\u5BBF\u4E3B\u542F\u52A8\u65F6\u7684\u90A3\u4EFD\u4EE3\u7801\uFF1A**\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u4F1A\u6539\u53D8\u672C\u9875**\uFF0C\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH\u3002",vcRestartFixes:"\u70B9\u51FB\u4F1A\u628A\u5E38\u9A7B\u5B9E\u4F8B\uFF08\u7AEF\u53E3\u4E0A\u90A3\u4E2A\uFF09\u6362\u6210 v{disk}\uFF08\u5F53\u524D v{served}\uFF09\uFF0C\u4E0D\u7528\u91CD\u542F DSH",vcRestartStart:"\u70B9\u51FB\u4F1A\u7528\u5F53\u524D\u78C1\u76D8\u7248\u672C v{disk} \u628A\u5E38\u9A7B\u5B9E\u4F8B\u62C9\u8D77\u6765\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartRepair:"\u70B9\u51FB\u4F1A\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\u5E76\u4FDD\u6D3B\uFF08\u7248\u672C\u5DF2\u662F v{disk}\uFF0C\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartHostOnly:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{disk}\uFF1B\u672C\u9875\u663E\u793A v{loaded} \u6765\u81EA DSH \u5BBF\u4E3B \u2014\u2014 \u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u5F71\u54CD\u672C\u9875\uFF0C\u8BF7\u91CD\u542F DSH",vcRestartFail:"\u91CD\u542F\u8BF7\u6C42\u5931\u8D25",vcRestartNoRoute:"\u5F53\u524D\u9875\u9762\u5BF9\u63A5\u7684\u8FDB\u7A0B\u8FD8\u662F\u65E7\u7248\uFF08\u6CA1\u6709\u8FD9\u4E2A\u63A5\u53E3\uFF09\uFF1A\u8BF7\u91CD\u542F\u684C\u9762\u7248 / DSH \u540E\u518D\u8BD5\uFF0C\u6216\u6267\u884C {cmd}",vcHostStale:"\u4E0A\u65B9\u7684\u300C\u8FD0\u884C\u4E2D\u300D\u6765\u81EA\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF1B\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F\u65B0\u7248 \u2014\u2014 \u8981\u8BA9\u5B83\u4E5F\u53D8\u6210\u65B0\u7248\u53F7\uFF0C\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcResidentDownShort:"\u672A\u8FD0\u884C",vcResidentDown:"\u5E38\u9A7B\u5B9E\u4F8B\u6CA1\u5728\u8FD0\u884C\uFF08\u7AEF\u53E3 {port} \u65E0\u54CD\u5E94\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u7528\u65B0\u4EE3\u7801\u628A\u5B83\u62C9\u8D77\u6765\uFF1B\u62C9\u4E0D\u8D77\u6765\u65F6\u6267\u884C {cmd}\uFF0C\u5E76\u8D34\u4E00\u4E0B dsh-memory status \u7684\u8F93\u51FA",vcResidentUnmanagedShort:"\u672A\u6258\u7BA1",vcResidentUnmanaged:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u6CA1\u6709\u770B\u95E8\u72D7\u4FDD\u6D3B**\uFF08\u505C\u6B62 / \u786C\u6740\u540E\u6B8B\u7559\u7684\u5B64\u513F\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\uFF08\u91CD\u65B0\u62C9\u4E00\u4E2A\u770B\u95E8\u72D7 + \u65B0\u5B9E\u4F8B\uFF09\uFF1B\u4E5F\u53EF\u4EE5\u6267\u884C {cmd}",vcResidentLockUnknownShort:"\u6258\u7BA1\u72B6\u6001\u672A\u77E5",vcResidentReplaceBlockedShort:"\u4E0D\u53EF\u66FF\u6362",vcResidentHostManagedShort:"\u5BBF\u4E3B\u6258\u7BA1",vcResidentReplaceBlocked:"\u5E38\u9A7B\u5B9E\u4F8B**\u4E0D\u53EF\u66FF\u6362**\uFF08\u73AF\u5883\u9650\u5236\uFF09\uFF1A\u770B\u95E8\u72D7\u9501\u76EE\u5F55\u4E0D\u53EF\u5199\uFF08{err}\uFF1B{path}\uFF09\u2192 \u7AEF\u53E3\u4E0A\u4F1A**\u957F\u671F**\u505C\u5728 v{served}\u3002\u8FD9\u4E0D\u662F\u300C\u6682\u65F6\u843D\u540E\u300D\uFF1A\u81EA\u52A8\u66FF\u6362\u88AB\u6B63\u786E\u5730\u62D2\u7EDD\uFF08\u907F\u514D\u7559\u4E0B\u5B64\u513F\uFF09\u3002\u51FA\u8DEF\uFF1A\u4FEE\u590D\u8BE5\u76EE\u5F55\u6743\u9650\u540E\u6267\u884C {cmd}\uFF0C\u6216\u524D\u53F0\u89C2\u5BDF dsh-memory watchdog --port 7999",vcResidentLockUnknown:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u770B\u95E8\u72D7\u9501\u6587\u4EF6\u5199\u4E0D\u8FDB\u53BB**\uFF08\u53D7\u9650\u73AF\u5883\uFF1A\u6C99\u7BB1\u7981\u5199 / ACL / \u975E\u7CFB\u7EDF\u76D8\uFF09\u2192 \u65E0\u6CD5\u5224\u65AD\u5B83\u6709\u6CA1\u6709\u88AB\u6258\u7BA1\uFF08\u4E0D\u662F\u300C\u672A\u6258\u7BA1\u300D\uFF09\u3002\u539F\u56E0\uFF1A{err}\uFF08{path}\uFF09\u3002\u4FDD\u6D3B\u901A\u5E38\u4ECD\u7136\u6709\u6548\uFF1B\u70B9\u4E0B\u9762\u7684\u6309\u94AE\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u65B0\u6258\u7BA1\u4E00\u6B21\u3002",vcOutdated:"\u6709\u65B0\u7248\u672C",vcUpToDate:"\u5DF2\u662F\u6700\u65B0",vcCheck:"\u68C0\u67E5\u66F4\u65B0",checking:"\u68C0\u67E5\u4E2D\u2026",vcCheckFail:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25",recallSummaryLen:"\u53EC\u56DE\u6458\u8981\u957F\u5EA6",recallBody:"\u53EC\u56DE\u542B\u6B63\u6587",secretHint:"\u51ED\u8BC1\u53D6\u7528\u63D0\u793A\uFF08\u6CE8\u5165\u6BCF\u4E2A\u4F1A\u8BDD\uFF09",autoWeb:"Web server",autoWebMode:"\u4FDD\u6D3B\u6A21\u5F0F",webPort:"Web \u7AEF\u53E3",webCheckIntervalMs:"\u63A2\u6D3B\u95F4\u9694(ms)",webMaxRestart:"\u6700\u5927\u91CD\u542F\u6B21\u6570",watchdogAutoSpawn:"\u770B\u95E8\u72D7\u8FDB\u7A0B",autoRestartOnDrift:"\u7248\u672C\u6F02\u79FB\u81EA\u52A8\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",autoMcpSetup:"\u81EA\u52A8\u6302\u8F7D MCP",saveConfig:"\u4FDD\u5B58\u914D\u7F6E",saveFail:"\u4FDD\u5B58\u5931\u8D25",savedOk:"\u5DF2\u4FDD\u5B58",savedDirect:"\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5DF2\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\uFF08hooks / MCP / \u72EC\u7ACB\u9875\u7ACB\u5373\u751F\u6548\uFF09",savedApplied:"\u5DF2\u4FDD\u5B58\u5E76\u751F\u6548\uFF08\u5BBF\u4E3B\u5DF2\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF09",saveQueued:"\u5DF2\u4EA4\u7ED9 DSH \u5BBF\u4E3B\u540C\u6B65\uFF0C\u5C1A\u672A\u786E\u8BA4\u751F\u6548",saveHostGuard:"\u8BE5\u5BBF\u4E3B\u4E0D\u5141\u8BB8\u63D2\u4EF6\u4ECE\u81EA\u5DF1\u7684\u56DE\u8C03\u4E0A\u4E0B\u6587\u91CC\u5199\u914D\u7F6E\uFF1B\u8BF7\u5728\u300CDSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u300D\u91CC\u6539\u540C\u4E00\u9879\uFF0C\u6216\u7F16\u8F91 profile \u7684\u914D\u7F6E\u8865\u4E01\u5C42",saveFailHint:"\u5BBF\u4E3B\u4FA7\u672A\u5E94\u7528\uFF0C\u8BE6\u89C1\u300C\u53CD\u9988\u5F02\u5E38\u300D\u91CC\u7684\u8BCA\u65AD\u4FE1\u606F",recallTool:"recall \u5DE5\u5177",costControl:"\u6210\u672C\u63A7\u5236",costHint:"\u7701 token\u3001\u63A7 LLM \u6D88\u8017",distillEnabled:"\u84B8\u998F\u77E5\u8BC6\u5361(\u5F00=LLM \u538B\u7F29, \u5173=\u539F\u6587\u5361\u96F6 LLM)",dedupByLLM:"\u8BED\u4E49\u53BB\u91CD\u5582 LLM(\u5173=\u7EAF\u8BCD\u6CD5\u66F4\u7701)",captureMaxTokens:"\u84B8\u998F\u8F93\u51FA\u4E0A\u9650(token)",captureTimeoutMs:"\u84B8\u998F\u8D85\u65F6(\u6BEB\u79D2\uFF1B\u672C\u5730\u5927\u6A21\u578B\u51B7\u542F\u52A8\u5EFA\u8BAE 120000+)",recallMinScore:"\u53EC\u56DE\u76F8\u5173\u6027\u9608\u503C(\u8D8A\u9AD8\u8D8A\u7701)",configNeedsDsh:"\u914D\u7F6E\u7F16\u8F91\u9700\u5728 DSH \u5185\u6253\u5F00\uFF08\u672C\u9875\u53EF\u80FD\u53EA\u8BFB\u6216\u6709\u90E8\u5206\u7F3A\u5931\uFF09",installMcp:"\u5B89\u88C5 MCP",uninstallMcp:"\u5378\u8F7D MCP",uninstallConfirm:"\u786E\u8BA4\u5378\u8F7D\u8BE5\u667A\u80FD\u4F53\u7684 MCP\uFF1FClaude Code/Codex \u5C06\u65E0\u6CD5\u518D\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002",presetConfig:"\u4E00\u952E\u63A8\u8350\u914D\u7F6E",presetHint:"\u70B9\u51FB\u586B\u5145\u5BF9\u5E94\u65B9\u6848\uFF0C\u70B9\u4FDD\u5B58\u751F\u6548",planApplied:"\u5DF2\u586B\u5165\u300C{plan}\u300D\xB7 \u70B9\u300C\u4FDD\u5B58\u914D\u7F6E\u300D\u751F\u6548",planDescA:"\u4E2A\u4EBA\u5F00\u53D1\u63A8\u8350 \xB7 \u84B8\u998F 4000 \xB7 \u5173\u770B\u95E8\u72D7",planDescB:"\u9884\u7B97\u654F\u611F \xB7 \u5173\u84B8\u998F \xB7 \u8FD1 0 \u6210\u672C",planDescC:"\u957F\u9879\u76EE \xB7 \u5F00\u770B\u95E8\u72D7 \xB7 \u9AD8\u8D28\u91CF",cfgSubCore:"\u81EA\u52A8\u6C89\u6DC0 / \u53EC\u56DE / \u5E93\u76EE\u5F55\u4E0E\u53BB\u91CD\u7B56\u7565",cfgSubMulti:"\u6309\u9879\u76EE\u9694\u79BB\u8BB0\u5FC6\u5E93\uFF0C\u5207\u6362\u540E CLI / MCP / hooks \u540C\u6B65\u751F\u6548",cfgSubCost:"\u63A7\u5236 LLM \u8C03\u7528\u4E0E\u53EC\u56DE\u89C4\u6A21\uFF0C\u76F4\u63A5\u51B3\u5B9A\u82B1\u591A\u5C11\u94B1",cfgSubAudit:"\u4EC0\u4E48\u5185\u5BB9\u9700\u8981\u4F60\u4EBA\u5DE5\u786E\u8BA4\u540E\u624D\u8FDB\u4E3B\u5E93",cfgSubService:"\u4FDD\u6D3B\u3001\u770B\u95E8\u72D7\u4E0E\u7248\u672C\u81EA\u6108\uFF0C\u4E00\u822C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF",cfgDirty:"\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539",cfgClean:"\u5DF2\u540C\u6B65",unitChars:"\u5B57",unitPerDay:"\u5F20 / \u5929",unitTokens:"tokens",unitMs:"\u6BEB\u79D2",unitTimes:"\u6B21",unitDays:"\u5929",mcpAutoHint:"\u81EA\u52A8\u8BC6\u522B\u5DF2\u5B89\u88C5\u7684 Agent \u4E0E\u5176 MCP \u914D\u7F6E\uFF08\u53EA\u8BFB\u63A2\u6D4B\uFF0C\u4E0D\u6539\u4EFB\u4F55\u6587\u4EF6\uFF09",mcpRefresh:"\u91CD\u65B0\u68C0\u6D4B",mcpSummary:"\u8BC6\u522B\u5230 {agents} \u4E2A Agent \xB7 {servers} \u4E2A MCP \xB7 {mounted} \u4E2A\u5DF2\u6302\u8F7D\u672C\u63D2\u4EF6",mcpNoServers:"\u672A\u914D\u7F6E MCP",mcpDetectedOnly:"\u4EC5\u8BC6\u522B",planA:"A \u8F7B\u91CF\u7701\u5FC3",planB:"B \u6781\u81F4\u7701\u94B1",planC:"C \u9AD8\u8D28\u91CF",pluginInfo:"\u63D2\u4EF6\u4FE1\u606F",organizeTitle:"\u6574\u7406\u5EFA\u8BAE",scanAndOrganize:"\u4E00\u952E\u641C\u7D22\u548C\u6574\u7406",scanHint:"\u70B9\u300C\u{1F50D} \u4E00\u952E\u641C\u7D22\u548C\u6574\u7406\u300D\u626B\u63CF\u76F8\u4F3C\u5361/\u9648\u65E7\u5361\uFF0C\u518D\u7528\u300C\u26A1 \u4E00\u952E\u4F18\u5316\u300D\u6267\u884C\u3002",mergeNow:"\u5408\u5E76",delete:"\u5220\u9664",captureAlert:"\u81EA\u52A8\u6C89\u6DC0\u5F02\u5E38",captureAlertHint:"\u6253\u5F00\u5DE6\u680F\u300C\u7528\u91CF/\u4ECA\u65E5\u300D\u770B\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7\uFF1B\u82E5\u662F\u63A5\u53E3/\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u9700\u66F4\u65B0 memory-eternal \u63D2\u4EF6\u3002",captureLog:"\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7",captureLogHint:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\u540E\u81EA\u52A8\u8DD1\uFF1A\u76D1\u542C \u2192 \u5224\u5B9A \u2192 \u5199\u5361\u3002\u8FD9\u91CC\u663E\u793A\u6700\u8FD1 100 \u6761\uFF0C\u7528\u6765\u6392\u67E5\u300C\u4E3A\u4EC0\u4E48\u6CA1\u5199\u5361\u300D\u3002",captureLogEmpty:"\u8FD8\u6CA1\u6709\u8BB0\u5F55\u3002\u8DDF Agent \u804A\u4E00\u8F6E\uFF08> \u6355\u83B7\u6700\u5C0F\u957F\u5EA6\uFF09\u540E\u518D\u56DE\u6765\u770B\u3002",healthTitle:"\u5065\u5EB7\u6982\u89C8",healthHint:"\u5E93 / \u5907\u4EFD / \u6C89\u6DC0 / \u7248\u672C \u2014\u2014 \u4E00\u773C\u770B\u6E05\u6709\u6CA1\u6709\u9759\u9ED8\u574F\u6389\u7684\u4E1C\u897F",healthDb:"\u77E5\u8BC6\u5E93",healthDbBad:"\u5E93\u4E0D\u53EF\u5199\u6216\u635F\u574F",healthBackups:"\u5907\u4EFD",healthNoBackups:"\u6CA1\u6709\u5907\u4EFD\uFF08\u6267\u884C dsh-memory doctor \u53EF\u5EFA\uFF0C\u5BBF\u4E3B\u4E5F\u4F1A\u6BCF\u65E5\u5907\u4EFD\uFF09",healthBackupAge:"{n} \u4E2A \xB7 \u6700\u8FD1 {d} \u5929\u524D",healthBackupToday:"{n} \u4E2A \xB7 \u4ECA\u5929",healthCapture:"\u81EA\u52A8\u6C89\u6DC0",healthNoRecords:"\u6682\u65E0\u8BB0\u5F55\uFF08\u8FD8\u6CA1\u89E6\u53D1\u8FC7\u6C89\u6DC0\uFF09",healthCapOk:"\u6700\u8FD1\u4E00\u6B21\u6210\u529F\u5199\u5361",healthCapFail:"\u6700\u8FD1\u4E00\u6B21\u5931\u8D25",healthRunAlign:"\u8FD0\u884C\u300C\u7248\u672C\u5BF9\u9F50\u68C0\u67E5\u300D\u540E\u663E\u793A",healthVersion:"\u7248\u672C",ledgerTitle:"\u8BB0\u5FC6\u8D26\u672C\uFF08\u8FD1 7 \u5929\uFF09",ledgerHint:"\u53EC\u56DE\u6CE8\u5165\u4E86\u591A\u5C11\u3001\u84B8\u998F\u8C03\u7528\u4E86\u591A\u5C11\u6B21 \u2014\u2014 \u5224\u65AD\u300C\u5230\u5E95\u7701\u4E0D\u7701 token\u300D\u7684\u7B2C\u4E00\u5757\u6570\u636E",ledgerRecalls:"\u53EC\u56DE\u6B21\u6570",ledgerInjected:"\u6CE8\u5165",ledgerChars:"\u5B57\u7B26",ledgerCaptures:"\u6C89\u6DC0\u6B21\u6570",ledgerLlmCalls:"LLM \u8C03\u7528",ledgerEstimate:"\u4F30\u7B97 token",ledgerEstimateHint:"\u6309\u7EA6 2 \u5B57\u7B26 \u2248 1 token \u7C97\u4F30\uFF0C\u53EA\u770B\u91CF\u7EA7",ledgerUseful:"\u53EC\u56DE\u6709\u7528\u7387",ledgerUsefulHint:"\u6765\u81EA\u300C\u6709\u7528 / \u6CA1\u7528\u300D\u53CD\u9988\uFF1B\u4F4E\u4E8E 60% \u8BF4\u660E\u6CE8\u5165\u53EF\u80FD\u51C0\u4E8F",ledgerFormula:"\u51C0\u6536\u76CA \u2248 \u88AB\u907F\u514D\u7684\u4E0A\u4E0B\u6587\u5F00\u9500 \u2212\uFF08\u6CE8\u5165\u5B57\u7B26 + \u84B8\u998F\u8C03\u7528 \xD7 \u5355\u4EF7\uFF09\u3002\u8D26\u672C\u53EA\u8BB0\u300C\u82B1\u4E86\u591A\u5C11\u300D\uFF0C\u6536\u76CA\u4FA7\u8BF7\u7ED3\u5408\u4F60\u5B9E\u9645\u7701\u4E0B\u7684\u91CD\u8BFB / \u8FD4\u5DE5\u6765\u5224\u65AD\u3002",ledgerNoData:"\u8FD1 7 \u5929\u8FD8\u6CA1\u6709\u8BB0\u5F55\uFF1A\u804A\u51E0\u8F6E\u6216\u8BA9 agent recall \u4E00\u6B21\u540E\u518D\u770B\u3002",ledgerNeedRestart:"\u5BBF\u4E3B\u4ECD\u5728\u8DD1\u65E7\u7248 API\uFF08/ledger \u4E0D\u5B58\u5728\uFF09\uFF1A\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH \u540E\uFF0C\u8D26\u672C\u624D\u4F1A\u5F00\u59CB\u8BB0\u5F55\u3002",alignTitle:"\u7248\u672C\u5BF9\u9F50\u68C0\u67E5",alignRun:"\u5F00\u59CB\u68C0\u67E5",alignFix:"\u91CD\u5199\u63A5\u7EBF",alignFixConfirm:"\u91CD\u5199 MCP / hooks \u63A5\u7EBF\uFF1F\uFF08\u53EA\u78B0\u63D2\u4EF6\u81EA\u5DF1\u7684\u952E\uFF0C\u4E0D\u52A8\u4F60\u7684\u6570\u636E\u4E0E\u914D\u7F6E\uFF09",alignFixed:"\u63A5\u7EBF\u5DF2\u91CD\u5199\uFF1B\u82E5\u4E0A\u9762\u63D0\u793A\u300C\u5BBF\u4E3B\u8FDB\u7A0B\u65E7\u300D\uFF0C\u4ECD\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH",alignFail:"\u5BF9\u9F50\u68C0\u67E5\u5931\u8D25",alignHint:"\u63D2\u4EF6\u5347\u7EA7\u53EA\u6362\u78C1\u76D8\u6587\u4EF6 \u2014\u2014 \u5BBF\u4E3B\u5185\u5B58\u91CC\u7684\u4E8B\u4EF6\u8BA2\u9605\u4E0E MCP / hooks \u91CC\u7684\u65E7\u8DEF\u5F84\u4E0D\u4F1A\u81EA\u5DF1\u66F4\u65B0\uFF0C\u8FD9\u91CC\u4E00\u6B21\u67E5\u6E05",alignIdle:"\u70B9\u300C\u5F00\u59CB\u68C0\u67E5\u300D\uFF1A\u5BF9\u6BD4\u5BBF\u4E3B / \u5E38\u9A7B\u5B9E\u4F8B / npm \u7684\u7248\u672C\uFF0C\u5E76\u68C0\u67E5 MCP\u3001hooks \u91CC\u662F\u5426\u6709\u65E7\u8DEF\u5F84\u4E0E\u65E7\u53C2\u6570",alignDisk:"\u78C1\u76D8",alignResident:"\u5E38\u9A7B\u5B9E\u4F8B",alignHost:"\u5BBF\u4E3B\u8FDB\u7A0B",captureLogUnavailable:"\u65E5\u5FD7\u4EC5\u5728 DSH \u5BBF\u4E3B\u5185\u53EF\u7528\uFF08\u72EC\u7ACB Web \u9875\u6CA1\u6709 host \u8FD0\u884C\u65F6\uFF09\u3002",captureAgentCards:"Agent \u81EA\u52A8\u6C89\u6DC0\u7684\u5361",noCards:"\u6682\u65E0",loadMore:"\u52A0\u8F7D\u66F4\u591A",batchMerge:"\u4E00\u952E\u667A\u80FD\u5408\u5E76",mergeAllConfirm:"\u5C06\u6309\u76F8\u4F3C\u5EA6\u5206\u7EC4\u7684\u5361\u7247\u5404\u5408\u5E76\u4E3A\u4E00\u5F20\uFF08\u4FDD\u7559\u5404\u81EA kind\uFF09\uFF0C\u539F\u5361\u5220\u9664\uFF1F",crossVault:"\u8DE8\u5E93\u805A\u5408",deleteConfirm:"\u786E\u5B9A\u5220\u9664\u8BE5\u8BB0\u5FC6\u5361\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",editCard:"\u7F16\u8F91",editHint:"\u53EA\u6539\u6807\u9898 / \u6807\u7B7E / \u6B63\u6587\uFF1B\u72B6\u6001\u4E0E\u7C7B\u578B\u4ECD\u7531\u5BA1\u6838\u4E0E\u7CFB\u7EDF\u6D41\u8F6C\u51B3\u5B9A\uFF0C\u624B\u52A8\u7F16\u8F91\u4E0D\u4F1A\u7ED5\u8FC7\u5BA1\u6838\u3002",editTitle:"\u6807\u9898",editTags:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",editTagsHint:"\u4F8B\u5982\uFF1A\u8BB0\u5FC6, \u68C0\u7D22, \u6027\u80FD",editBody:"\u6B63\u6587\uFF08Markdown\uFF09",editSave:"\u4FDD\u5B58",editSaving:"\u4FDD\u5B58\u4E2D\u2026",editCancel:"\u53D6\u6D88",editSaved:"\u5DF2\u4FDD\u5B58",editFail:"\u4FDD\u5B58\u5931\u8D25",editTitleEmpty:"\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A",editBodyEmpty:"\u6B63\u6587\u4E0D\u80FD\u4E3A\u7A7A",deleted:"\u5DF2\u5220\u9664",deleteFail:"\u5220\u9664\u5931\u8D25",deleteSelected:"\u5220\u9664\u9009\u4E2D",deletedSelected:"\u5F20\u5361\u5DF2\u5220\u9664",merge:"\u5408\u5E76",mergeNeed:"\u81F3\u5C11\u9009 2 \u5F20\u5361",mergeConfirm:"\u5C06\u6240\u9009\u5361\u7247\u5408\u5E76\u4E3A\u4E00\u5F20\u5E76\u5220\u9664\u539F\u5361\uFF1F",merged:"\u5DF2\u5408\u5E76",mergeFail:"\u5408\u5E76\u5931\u8D25",mcpInstalled:"\u2705 {agent} MCP \u5DF2\u5B89\u88C5",mcpUninstalled:"\u2705 {agent} MCP \u5DF2\u5378\u8F7D",mcpActionFail:"\u274C {agent} MCP \u64CD\u4F5C\u5931\u8D25\uFF1A{error}",dshHostLabel:"DeepSeek Harness\uFF08\u5F53\u524D\u5BBF\u4E3B\uFF09",restartHint:"\u5DF2\u4FDD\u5B58\u3002autoWebMode/watchdogAutoSpawn \u7B49\u9700\u91CD\u542F DSH \u751F\u6548\uFF1B\u5DF2\u6709\u5E38\u9A7B watchdog \u4E0D\u4F1A\u88AB\u81EA\u52A8\u505C\u6389\uFF0C\u9700 dsh-memory stop / restart\uFF08#19\uFF09",conflictRefresh:"\u914D\u7F6E\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5",untitled:"\u65E0\u6807\u9898",tplBlank:"\u{1F4C4} \u7A7A\u767D",tagsHint:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",connCount:"{n} \u8FDE\u63A5",tplDecisionTags:"\u51B3\u7B56, \u65B9\u6848",tplBugTags:"\u8E29\u5751, \u6559\u8BAD",tplMeetingTags:"\u4F1A\u8BAE, \u7EAA\u8981",tplWeeklyTags:"\u5468\u62A5",tplDecisionBody:`# \u6280\u672F\u51B3\u7B56\uFF1A[\u6807\u9898]
|
|
18
18
|
|
|
19
19
|
## \u80CC\u666F
|
|
20
20
|
- \u95EE\u9898\u63CF\u8FF0
|
|
@@ -59,7 +59,7 @@ var uo=Object.create;var fa=Object.defineProperty;var go=Object.getOwnPropertyDe
|
|
|
59
59
|
-
|
|
60
60
|
|
|
61
61
|
## \u98CE\u9669/\u963B\u585E
|
|
62
|
-
- `},Jn={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",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",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",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.",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
|
+
- `},Gn={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",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",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.",supportLegacyTitle:"Legacy app (dsh-desktop) is discontinued",supportLegacyBody:"The author\u2019s dsh-desktop is discontinued; the official DeepSeek Harness desktop build covers the same capabilities. If an old profile still pins the withdrawn dsh-desktop-shell@0.3.0, remove that dependency or pnpm install will fail.",supportReadme:"Open README",supportReleases:"Releases",supportFeedback:"Report a bug",supportReplay:"Replay onboarding",onboardTitle:"30 seconds with memory-eternal",onboardSub:"After every conversation, the AI distills knowledge cards. Review first, keep the good ones.",onboardSkip:"Skip",onboardBack:"Back",onboardNext:"Next",onboardStart:"Start using",onboardStep0Title:"Star the project on GitHub first",onboardStep0Body:"A Star is the most direct signal to keep maintaining it; Fork it if you want to modify or self-host.",onboardStar:"Star",onboardFork:"Fork",onboardStarred:"Starred, continue",onboardStarHint:"You can always come back via \u2605 Star in the top bar.",onboardStep1Title:"Auto-capture, no manual notes",onboardStep1Body:"When a session ends, decisions, root causes and lessons become a card. Capture first, review second.",onboardStep2Title:"Found a useful card? Tap \u{1F44D}",onboardStep2Body:"Open any card and tap \u{1F44D} useful / \u{1F44E} not useful. No search needed: the buttons are always there. It helps recall ranking.",onboardStep3Title:"New support entries",onboardStep3Body:"Community, sponsor, legacy app and bug report live at the bottom of the left rail. No need to dig through the README.",onboardTip:"Tip: reopen this guide from Support & community.",navWorkspace:"Workspace",navSystem:"System",navSupport:"Support",navQuotes:"Author's Quotes",quoteHint:"Click for the next verse",v5Local:"Local",v5Star:"Star on GitHub",runtimeTitle:"Runtime status",runtimeSub:"Vault, backups, capture and version",dbTitle:"Vault",backupTitle:"Backups",captureTitle:"Auto capture",versionTitle:"Version",cardsUnit:"cards",links:"links",todayReview:"Today's resurface",openArrow:"Open \u2192",reshuffle:"Another",insightDecision:"Decision",insightRoot:"Root cause",insightLesson:"Lesson",insightSummary:"Summary",pinCard:"Pin this card",unpinCard:"Unpin",pinnedOnly:"Pinned",toastApproved:"approved",toastRejected:"rejected",toastCardDeleted:"deleted",toastRestored:"restored",toastPurged:"permanently deleted",toastPurgedExpired:"expired recycle entries purged",toastFailed:"Action failed",noSelection:"Select the cards to act on first",enabledLabel:"Enable memory core",vaultDirLabel:"Vault directory (single)",captureCooldownMs:"Capture cooldown (ms)",captureProvider:"Distill provider (auto if empty)",routeAuto:"Auto (registration order)",routeListFail:"Could not load the model list ({err}) \u2014 you can type provider / model below; the desktop popup proxies this to the host, so if it still fails open the settings from DSH",captureFollowSession:"Follow current session (distill with the session provider/model)",captureFirstOnly:"First candidate only (stop on failure, no fallback)",llmTest:"Test distill route",llmTestOk:"\u2713 Call succeeded",llmTestFail:"\u2717 Call failed",llmCandidates:"candidates",captureModel:"Distill model (auto if empty)",recallEmbedding:"Semantic recall provider (optional)",sessionBudgetChars:"Session budget (chars)",saving:"Saving\u2026",savePending:"Saved to the config file; the host half is still the old build, so restart DSH to make it effective (already applied in this panel)",saveInvalid:"Some field values are invalid; nothing was submitted",invalidField:'"{field}" must be a number between {min} and {max} (now: {value})',actionRunning:"Working\u2026",recycleEmptyHint:"Recycle bin is empty: deleted cards land here first and are purged automatically after {days} days.",recyclePurgeAll:"Empty recycle bin",recyclePurgeAllConfirm:"Permanently delete all {n} cards in the recycle bin? This cannot be undone.",toastPurgeAll:"Permanently deleted {n}",bucketDeleted:"Deleted",restoreToQueue:"Back to review",fbCopyManual:"Auto-copy was blocked by the browser \u2014 the text is below: click Select all, then Ctrl+C",vcLoaded:"running (process serving this page)",vcResident:"resident instance",vcOnDisk:"on disk",vcLatest:"npm latest",vcStale:'v{disk} is installed on disk but the process serving this page still has v{loaded} loaded \u2014 click "Restart resident instance" to restart it on the new code (no DSH restart needed)',vcRestart:"Restart resident instance",vcRestarting:"Restarting\u2026",vcRestartSent:"Resident restart scheduled: the new process takes over in ~3-8s \u2014 refresh the page (Ctrl+F5) shortly",vcRestartCurrent:"The resident instance is already up to date \u2014 no restart needed",vcRestartAnyway:"Resident is already v{ver}; usually no restart needed \u2014 use this if it looks stuck",vcHostProcessStale:"Disk has v{disk}, but **the process serving this page** (the DSH host) still loads v{loaded} \u2014 that code was loaded when the host started, so **restarting the resident instance does not change this page**: fully quit and reopen DSH.",vcRestartFixes:"Restarts the resident instance (the process on the port) onto v{disk} (currently v{served}) without restarting DSH",vcRestartStart:"Starts the resident instance on the current disk version v{disk} (no DSH restart needed)",vcRestartRepair:"Re-registers it under a watchdog and keeps it alive (already v{disk}; no DSH restart needed)",vcRestartHostOnly:"The resident instance is already v{disk}; this page shows v{loaded} from the DSH host \u2014 restarting the resident does not affect it, please restart DSH",vcRestartFail:"Restart request failed",vcRestartNoRoute:"The process serving this page is still the old build (no such endpoint): restart the desktop app / DSH and retry, or run {cmd}",vcHostStale:'The "running" chip above comes from the process serving this page; the resident instance is already current \u2014 restart the desktop app / DSH to refresh that chip',vcResidentDownShort:"not running",vcResidentDown:"The resident instance is not running (no response on port {port}) \u2014 use the button below to bring it up on the new code; if that fails run {cmd} and share the output of dsh-memory status",vcResidentUnmanagedShort:"unmanaged",vcResidentUnmanaged:"The resident instance serves v{served} but has **no watchdog keeping it alive** (an orphan left by a stop or a hard kill) \u2014 use the button below to put it back under management (a fresh watchdog plus a new instance), or run {cmd}",vcResidentLockUnknownShort:"management unknown",vcResidentReplaceBlockedShort:"cannot replace",vcResidentHostManagedShort:"host-managed",vcResidentReplaceBlocked:'The resident instance **cannot be replaced** (environment limit): the watchdog lock directory is not writable ({err}; {path}) \u2192 the port will stay on v{served} **long-term**. This is not "temporarily behind": automatic replacement is refused on purpose to avoid leaving an orphan. Way out: fix that directory permissions and run {cmd}, or run dsh-memory watchdog --port 7999 in the foreground',vcResidentLockUnknown:'The resident instance serves v{served}, but the **watchdog lock file cannot be written** (restricted environment: sandbox, ACLs, non-system drive) \u2192 whether it is managed cannot be determined (this is not "unmanaged"). Cause: {err} ({path}). Keep-alive usually still works; the button below can put it back under management on the new code.',vcPage:"Page script",vcPageStale:"\u26A0 This page is still running an older script (page v{page} / disk v{disk}): press Ctrl+F5 to refresh. If the running version is still old, restart the desktop app / DSH as well",vcOutdated:"update available",vcUpToDate:"up to date",vcCheck:"Check for updates",checking:"Checking\u2026",vcCheckFail:"Update check failed",recallSummaryLen:"Recall summary len",recallBody:"Recall with body",secretHint:"Credential hint (injected into every session)",autoWeb:"Web server",autoWebMode:"Keep-alive mode",webPort:"Web port",webCheckIntervalMs:"Probe interval (ms)",webMaxRestart:"Max restart",watchdogAutoSpawn:"Watchdog process",autoRestartOnDrift:"Auto-restart resident on version drift",autoMcpSetup:"Auto-mount MCP",saveConfig:"Save config",saveFail:"Save failed",savedOk:"Saved",savedDirect:"No DSH host is running here, so the change went straight into the shared config (hooks / MCP / the standalone page pick it up immediately)",savedApplied:"Saved and applied (the host applied it in a request context)",saveQueued:"Handed to the DSH host for sync \u2014 not confirmed applied yet",saveHostGuard:"This host does not let a plugin write config from its own callback context; change the same option under DSH Settings \u2192 Memory, or edit the profile patch layer",saveFailHint:"the host did not apply it \u2014 see Diagnostics under Report a bug",recallTool:"recall tool",costControl:"Cost control",costHint:"save tokens, control LLM usage",distillEnabled:"Distill cards (on=LLM compress, off=raw cards zero LLM)",dedupByLLM:"Dedup feeds LLM (off=pure lexical, cheaper)",captureMaxTokens:"Distill output cap (tokens)",captureTimeoutMs:"Distill timeout (ms; use 120000+ for cold local models)",recallMinScore:"Recall min score (higher = cheaper)",configNeedsDsh:"Edit config inside DSH (this page may be read-only or partially missing)",installMcp:"Install MCP",uninstallMcp:"Uninstall MCP",uninstallConfirm:"Confirm uninstall MCP for this agent? Claude Code/Codex will lose access to the memory vault.",presetConfig:"One-click preset config",presetHint:"Click to fill a plan, then hit Save",planApplied:'Filled "{plan}" \u2014 hit "Save config" to apply',planDescA:"Personal dev \xB7 distill 4000 \xB7 watchdog off",planDescB:"Budget \xB7 no distill \xB7 ~zero cost",planDescC:"Long projects \xB7 watchdog on \xB7 high quality",cfgSubCore:"Capture / recall / vault dir and dedup strategy",cfgSubMulti:"Per-project vaults; CLI / MCP / hooks follow the active one",cfgSubCost:"Control LLM calls and recall size \u2014 this is your bill",cfgSubAudit:"What must be reviewed before entering the main vault",cfgSubService:"Keep-alive, watchdog and version self-heal \u2014 defaults are fine",cfgDirty:"Unsaved changes",cfgClean:"Synced",unitChars:"chars",unitPerDay:"cards / day",unitTokens:"tokens",unitMs:"ms",unitTimes:"times",unitDays:"days",mcpAutoHint:"Auto-detects installed agents and their MCP configs (read-only probe)",mcpRefresh:"Re-scan",mcpSummary:"{agents} agents \xB7 {servers} MCP servers \xB7 {mounted} mounting this plugin",mcpNoServers:"No MCP configured",mcpDetectedOnly:"detected only",planA:"A Light",planB:"B Budget",planC:"C Premium",pluginInfo:"Plugin info",organizeTitle:"Organize",scanAndOrganize:"Scan & organize",scanHint:'Click "\u{1F50D} Scan & organize" to find similar/stale cards, then "\u26A1 One-click optimize" to run.',mergeNow:"Merge",delete:"Delete",captureAlert:"Auto-capture failed",captureAlertHint:'Open "Usage / Today" for the capture log; if the cause is an API/version mismatch, update the memory-eternal plugin.',captureLog:"Auto-capture log",captureLogHint:"Runs after every turn: listen \u2192 judge \u2192 write. Last 100 entries, so you can see why a card was not written.",captureLogEmpty:"No entries yet. Chat one turn (> min capture chars) and come back.",healthTitle:"Health",healthHint:"Database / backups / capture / versions \u2014 spot anything that broke silently",healthDb:"Database",healthDbBad:"database is unwritable or corrupt",healthBackups:"Backups",healthNoBackups:"no backups yet (run dsh-memory doctor; the host also backs up daily)",healthBackupAge:"{n} files \xB7 newest {d} day(s) ago",healthBackupToday:"{n} files \xB7 newest today",healthCapture:"Auto capture",healthNoRecords:"no records yet (capture has not run)",healthCapOk:"last capture wrote a card",healthCapFail:"last capture failed",healthRunAlign:"run Version alignment check to show",healthVersion:"Versions",ledgerTitle:"Memory ledger (last 7 days)",ledgerHint:'How much recall injected and how many distillation calls ran \u2014 the first data point for the "does it save tokens?" question',ledgerRecalls:"Recalls",ledgerInjected:"injected",ledgerChars:"chars",ledgerCaptures:"Captures",ledgerLlmCalls:"LLM calls",ledgerEstimate:"Est. tokens",ledgerEstimateHint:"rough estimate at ~2 chars per token; order of magnitude only",ledgerUseful:"Recall usefulness",ledgerUsefulHint:"from useful / not-useful feedback; below 60% means injection may cost more than it saves",ledgerFormula:"Net benefit \u2248 avoided context cost \u2212 (injected chars + distillation calls \xD7 price). The ledger only records what we spent; weigh it against the re-reads and rework you actually avoided.",ledgerNoData:"No entries in the last 7 days: chat a few turns or let the agent recall once, then come back.",ledgerNeedRestart:"The host is still running the old API (/ledger missing): fully quit and reopen DSH to start recording.",alignTitle:"Version alignment check",alignRun:"Check now",alignFix:"Rewrite wiring",alignFixConfirm:"Rewrite the MCP / hooks wiring? (Only the plugin's own keys are touched; your data and config stay as they are)",alignFixed:"Wiring rewritten; if it still reports an old host process, you must fully quit and reopen DSH",alignFail:"Alignment check failed",alignHint:"Upgrading the plugin only replaces files on disk \u2014 the host's in-memory event subscriptions and stale paths inside MCP / hooks do not update themselves; this checks all of it at once",alignIdle:'Hit "Check now": compare the host / resident / npm versions and look for stale paths and arguments in MCP and hooks',alignDisk:"disk",alignResident:"resident",alignHost:"host process",captureLogUnavailable:"Log is available only inside the DSH host (the standalone web page has no host runtime).",captureAgentCards:"Cards auto-captured by the agent",noCards:"none",loadMore:"Load more",batchMerge:"Smart batch merge",mergeAllConfirm:"Merge similar-grouped cards into one each (keep kind), delete originals?",crossVault:"All vaults",deleteConfirm:"Delete this memory card? This cannot be undone.",editCard:"Edit",editHint:"Only title / tags / body are editable. Status and kind still flow through audit and system rules \u2014 manual edits never bypass review.",editTitle:"Title",editTags:"Tags (comma separated)",editTagsHint:"e.g. memory, recall, performance",editBody:"Body (Markdown)",editSave:"Save",editSaving:"Saving\u2026",editCancel:"Cancel",editSaved:"Saved",editFail:"Save failed",editTitleEmpty:"Title cannot be empty",editBodyEmpty:"Body cannot be empty",deleted:"Deleted",deleteFail:"Delete failed",deleteSelected:"Delete selected",deletedSelected:" cards deleted",merge:"Merge",mergeNeed:"Select at least 2 cards",mergeConfirm:"Merge the selected cards into one and delete the originals?",merged:"Merged",mergeFail:"Merge failed",mcpInstalled:"\u2705 {agent} MCP installed",mcpUninstalled:"\u2705 {agent} MCP uninstalled",mcpActionFail:"\u274C {agent} MCP action failed: {error}",dshHostLabel:"DeepSeek Harness (current host)",restartHint:"Saved. autoWebMode/watchdogAutoSpawn take effect after restarting DSH; a resident watchdog is never stopped automatically \u2014 use dsh-memory stop / restart (#19)",conflictRefresh:"Config changed elsewhere \u2014 refresh and retry",untitled:"Untitled",tplBlank:"\u{1F4C4} Blank",tagsHint:"Tags (comma-separated)",connCount:"{n} connections",tplDecisionTags:"decision, plan",tplBugTags:"pitfall, lesson",tplMeetingTags:"meeting, minutes",tplWeeklyTags:"weekly report",tplDecisionBody:`# Tech decision: [title]
|
|
63
63
|
|
|
64
64
|
## Background
|
|
65
65
|
- Problem
|
|
@@ -104,7 +104,7 @@ Option A, because:
|
|
|
104
104
|
-
|
|
105
105
|
|
|
106
106
|
## Risks/blockers
|
|
107
|
-
- `},
|
|
107
|
+
- `},Ma=["all","core","project","knowledge","skill","content","prompt","business","tool","mistake"],Kn=Ma.filter(t=>t!=="all"&&t!=="core"),bt={core:"#FF7A45",skill:"#8B5CF6",project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},_a=t=>Array.isArray(t&&t.tags)?t.tags:[],$t={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}"},ot={core:"kindCore",skill:"kindSkill",project:"kindProject",knowledge:"kindKnowledge",content:"kindContent",prompt:"kindPrompt",business:"kindBusiness",tool:"kindTool",mistake:"kindMistake",other:"kindOther"},ma="deepseek-harness",Ut=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},Po=[ma,"claude","codex","cursor","codex-desktop"],Yn=(t=[])=>[...new Set([...Po,...(t||[]).map(Ut)])],Eo={boot:["\u{1F680}","#8b5cf6"],listen:["\u{1F442}","inherit"],created:["\u2705","#10b981"],appended:["\u2795","#3b82f6"],skip:["\u23ED","#f59e0b"],warn:["\u26A0\uFE0F","#f59e0b"],fail:["\u274C","#ef4444"]},ht=`
|
|
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; }
|
|
@@ -1033,7 +1033,7 @@ Option A, because:
|
|
|
1033
1033
|
.mc-audit-batchcard > .mc-btn { width: 100%; }
|
|
1034
1034
|
.mc-audit-batchcard > div[style*="flex: 1"] { display: none; }
|
|
1035
1035
|
}
|
|
1036
|
-
`;function
|
|
1036
|
+
`;function Bo(t){t.effect(()=>t.locale.register(aa,{zh:qn,en:Gn}),"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(jo,{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(Oo,{t:a,locale:t.locale,wide:!(n&&n.wide===!1)}))),"memory-eternal: sidebar footer action")}function Ho(){let[t,a]=(0,r.useState)(V+"/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(V+"/ui/app",{method:"HEAD"}).then(s=>{if(n&&!s.ok)return i()}).catch(()=>n?i():void 0),()=>{n=!1}},[]),t}function jo({t}){return(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[(0,e.jsx)("style",{children:ht}),(0,e.jsx)(Vn,{t,onReload:()=>{},version:0})]})}function Oo({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:ht}),(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)(qo,{})}),(0,e.jsx)("span",{className:"me-footer-label",children:t("nav")})]}),i&&(0,e.jsx)($o,{t,locale:a,onClose:()=>s(!1)})]})}function Wo(){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 _o(){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 Uo(){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 $o({t,locale:a,onClose:n,tab:i}){let[s,m]=(0,r.useState)(!1),[g,S]=(0,r.useState)(!1),u=(0,r.useRef)(null),N=Ho(),p=(0,r.useCallback)($=>a&&typeof a.subscribe=="function"?a.subscribe($):()=>{},[a]),w=(0,r.useCallback)(()=>a&&typeof a.getSnapshot=="function"?a.getSnapshot():null,[a]),x=(0,r.useSyncExternalStore)(p,w),T=x&&(x.active==="zh"||x.active==="en")?x.active:null,q=(0,r.useRef)(null);q.current===null&&T&&(q.current=T);let G=(0,r.useMemo)(()=>{let $=q.current?`lang=${q.current}`:"";if(i==="config")return`${V}/ui/config?tab=config${$?`&${$}`:""}`;let L=N.replace(/\/$/,""),W=L.endsWith("/ui/app")?"?":"/?";return i?`${L}${W}tab=${i}${$?`&${$}`:""}`:$?`${L}${W}${$}`:N},[N,i]);(0,r.useEffect)(()=>{let $=u.current&&u.current.contentWindow;$&&T&&$.postMessage({source:"memory-eternal",type:"locale",lang:T},"*")},[T]),(0,r.useEffect)(()=>{let $=L=>{L.key==="Escape"&&n()};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[n]);let R=(0,e.jsxs)("div",{className:"me-overlay-top",onClick:n,children:[(0,e.jsx)("style",{children:ht}),(0,e.jsx)("div",{className:"me-modal"+(s?" me-modal-full":""),onClick:$=>$.stopPropagation(),children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,position:"relative"},children:[(0,e.jsxs)("div",{className:"me-wctl",children:[(0,e.jsx)("button",{type:"button",className:"me-wctl-btn","data-me-wctl":s?"restore":"full","aria-pressed":s,onClick:()=>m($=>!$),"aria-label":t(s?"exitFullscreen":"enterFullscreen"),title:t(s?"exitFullscreen":"enterFullscreen"),children:s?(0,e.jsx)(_o,{}):(0,e.jsx)(Wo,{})}),(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)(Uo,{})})]}),(0,e.jsx)("iframe",{ref:u,src:G,title:"memory-eternal",allow:"clipboard-write; clipboard-read",onLoad:()=>S(!0),style:{width:"100%",flex:1,border:0,borderRadius:"inherit",background:"transparent"}}),!g&&(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,$n.createPortal)(R,document.body)}function qo(){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.27.1";function Go({t}){let[a,n]=(0,r.useState)(""),i="dsh-memory tui",s="dsh-memory tui --write",m=async(N,p)=>{try{await navigator.clipboard.writeText(N),n(p),setTimeout(()=>n(""),1600)}catch{}},g={border:"1px solid #3a404a",borderRadius:14,background:"#22262d",padding:"16px 18px"},S={margin:"10px 0 0",padding:"12px 14px",borderRadius:10,background:"#171a1f",border:"1px solid #333943",color:"#f3f5f8",fontSize:12.5,lineHeight:1.7,overflowX:"auto",fontFamily:"ui-monospace, Consolas, monospace"},u={marginTop:10,border:"1px solid #4a515c",background:"transparent",color:"#ffb08a",borderRadius:9,padding:"7px 12px",fontSize:12,cursor:"pointer"};return(0,e.jsxs)("div",{style:{padding:"22px 26px 34px",maxWidth:1040,color:"#f3f5f8"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:12,flexWrap:"wrap"},children:[(0,e.jsx)("h2",{style:{margin:0,fontSize:24,letterSpacing:"-.02em"},children:t("terminalTitle")}),(0,e.jsx)("span",{style:{color:"#99a1ac",fontSize:12},children:"TUI \xB7 LIVE \xB7 dsh-tui"})]}),(0,e.jsx)("p",{style:{margin:"9px 0 20px",color:"#aeb5bf",fontSize:13.5,lineHeight:1.8},children:t("terminalIntro")}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1.1fr) minmax(0, .9fr)",gap:14},children:[(0,e.jsxs)("div",{style:g,children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalRun")]}),(0,e.jsx)("pre",{style:S,children:i}),(0,e.jsx)("button",{type:"button",style:u,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:g,children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalTui")]}),(0,e.jsx)("pre",{style:S,children:s}),(0,e.jsx)("button",{type:"button",style:u,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:{...g,marginTop:14},children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalPreview")]}),(0,e.jsx)("pre",{style:{...S,marginTop:10,color:"#d7dce3",fontSize:12,lineHeight:1.5},children:`\u256D\u2500 MEMORY ATLAS / \u5F85\u5BA1 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E
|
|
1037
1037
|
\u2502 \u7C7B\u578B \u25CF \u5168\u90E8 7 \u25CB \u9879\u76EE 3 \u25CB \u77E5\u8BC6 1 \u25CB \u6559\u8BAD 1 \u2502
|
|
1038
1038
|
\u2502 \u2502
|
|
1039
1039
|
\u2502 \u25A3 \u5168\u9009 7 \u5DF2\u9009 3 s \u5168\u9009 \u2502
|
|
@@ -1042,17 +1042,17 @@ Option A, because:
|
|
|
1042
1042
|
\u2502 \u25C9 [\u6559\u8BAD] shj-web \u7AEF\u53E3\u83DC\u5355\u9519\u4F4D \u2502
|
|
1043
1043
|
\u2502 \u2502
|
|
1044
1044
|
\u2502 [a] \u6279\u51C6 3 [r] \u9A73\u56DE [s] \u53CD\u9009 [Esc] \u6E05\u7A7A \u2502
|
|
1045
|
-
\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 Ga=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
|
|
1046
|
-
`).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:[
|
|
1045
|
+
\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 Ga=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 Ko({t,notify:a,onPromoted:n}){let[i,s]=(0,r.useState)(!1),[m,g]=(0,r.useState)(""),[S,u]=(0,r.useState)(null),[N,p]=(0,r.useState)(""),w=(0,r.useRef)(null),x=(0,r.useCallback)(async()=>{try{let W=await(await fetch(`${V}/working`)).json().catch(()=>null);W&&W.ok&&(u(W),g(W.text||""))}catch{}},[]);(0,r.useEffect)(()=>{x()},[x]);let T=async(L,W)=>(await fetch(`${V}${L}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(W||{})})).json().catch(()=>null),q=async()=>{p("save");let L=await T("/working",{text:m,mode:"replace"});p(""),L&&L.ok?(a(!0,t("workSaved")),await x()):a(!1,L&&L.error||"save failed")},G=async()=>{if(!window.confirm(t("workClearConfirm")))return;p("clear");let L=await T("/working/clear",{});p(""),L&&L.ok?(g(""),a(!0,t("workCleared")),await x()):a(!1,L&&L.error||"clear failed")},R=async()=>{let L=w.current,W=L&&L.selectionEnd>L.selectionStart?L.value.slice(L.selectionStart,L.selectionEnd):m;if(!String(W||"").trim()){a(!1,t("workPromoteEmpty"));return}p("promote");let pe=await T("/working/promote",{text:W});p(""),pe&&pe.ok?(a(!0,t("workPromoted")),n&&n()):a(!1,pe&&pe.error||"promote failed")},$=m?m.split(`
|
|
1046
|
+
`).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:[$," ",t("workLines")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>s(L=>!L),children:t(i?"workCollapse":"workExpand")})]}),i&&(0,e.jsxs)("div",{style:{marginTop:8},children:[(0,e.jsx)("textarea",{ref:w,value:m,onChange:L=>g(L.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:!!N,onClick:q,children:N==="save"?"\u2026":t("workSave")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!N,onClick:R,children:N==="promote"?"\u2026":t("workPromote")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!N||!m.trim(),onClick:G,children:t("workClear")}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.55},children:[S&&S.maxLines?S.maxLines+" \u884C / "+Math.round((S.maxBytes||0)/1024)+"KB ":"",t("workLimitHint")," \xB7 ",t("workPromoteHint")]})]})]})]})}function Yo(t){return(0,e.jsx)(Ga,{children:(0,e.jsx)(Vo,{...t})})}function Vo({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),[g,S]=(0,r.useState)(()=>{try{let h=localStorage.getItem("me-ui-scale");return["compact","normal","large"].includes(h)?h:"normal"}catch{return"normal"}}),[u,N]=(0,r.useState)([]),[p,w]=(0,r.useState)(!0),[x,T]=(0,r.useState)(null),[q,G]=(0,r.useState)(""),[R,$]=(0,r.useState)("all"),[L,W]=(0,r.useState)(""),[pe,Q]=(0,r.useState)("all"),[P,K]=(0,r.useState)("all"),[U,B]=(0,r.useState)(()=>{try{return new Set(JSON.parse(localStorage.getItem("me-pinned-v5")||"[]"))}catch{return new Set}}),[X,ce]=(0,r.useState)(!1),he=(0,r.useCallback)(h=>{B(j=>{let ne=new Set(j);ne.has(h)?ne.delete(h):ne.add(h);try{localStorage.setItem("me-pinned-v5",JSON.stringify([...ne]))}catch{}return ne})},[]),[re,_e]=(0,r.useState)(""),[O,Ee]=(0,r.useState)(()=>{try{let h=new URLSearchParams(typeof location<"u"?location.search:"").get("tab"),j={cards:"cards",graph:"graph",news:"news",usage:"stats",stats:"stats",audit:"audit",recycle:"optimize",optimize:"optimize",config:"config",terminal:"terminal"};if(h&&j[h])return j[h]}catch{}return"cards"}),[y,De]=(0,r.useState)(()=>new Set([O])),te=(0,r.useCallback)(h=>{De(j=>j.has(h)?j:new Set(j).add(h)),Ee(h)},[]),[Z,We]=(0,r.useState)("recent"),[Le,oe]=(0,r.useState)(null),[F,z]=(0,r.useState)(null),v=(0,r.useCallback)(h=>{z(null);try{fetch(`${V}/star/action`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:h})}).catch(()=>{})}catch{}},[]);(0,r.useEffect)(()=>{let h=!0;return fetch(`${V}/star/status`).then(j=>j.json()).then(j=>{!h||!j||!j.shouldAsk||(z(j),fetch(`${V}/star/action`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"shown"})}).catch(()=>{}))}).catch(()=>{}),()=>{h=!1}},[]);let I=(0,r.useRef)(null),ie=(0,r.useRef)(null),[Fe,Be]=(0,r.useState)(!1),[de,d]=(0,r.useState)(!1),[Y,E]=(0,r.useState)(0),[ue,Me]=(0,r.useState)(null),[ve,ye]=(0,r.useState)(!1),[H,se]=(0,r.useState)(!1),[Ce,me]=(0,r.useState)(!1),[rt,yt]=(0,r.useState)("group"),[$e,pt]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let h=j=>{let ne=j&&j.detail;if(["compact","normal","large"].includes(ne)){S(ne);try{localStorage.setItem("me-ui-scale",ne)}catch{}}};return window.addEventListener("me-ui-scale",h),()=>window.removeEventListener("me-ui-scale",h)},[]);let et=(0,r.useCallback)(()=>{pt(!1);try{localStorage.setItem("me-onboard-v2","1")}catch{}},[]),xt=(0,r.useCallback)((h="group")=>{yt(h),me(!0)},[]),qe=(0,r.useRef)(!1),Bt=(0,r.useCallback)(async()=>{if(qe.current)return;qe.current=!0;let h=(j,ne=!0)=>{I.current&&clearTimeout(I.current),oe({ok:ne,msg:j}),I.current=setTimeout(()=>oe(null),3e3)};h(t("webOpening"));try{let j=await fetch(`${V}/open-web`,{method:"POST"}).then(ge=>ge.json()).catch(()=>null);if(j&&j.ok&&j.url){h(t("webOpened")+" \xB7 "+j.url);return}let ne=await fetch(`${V}/web-info`).then(ge=>ge.json()).catch(()=>null),xe=ne&&ne.ok&&ne.url||"http://127.0.0.1:7999/",ke=window.open(xe,"_blank","noopener,noreferrer");h(ke?t("webOpened")+" \xB7 "+xe:t("webOpenFail")+" \xB7 "+xe,!!ke)}catch{h(t("webOpenFail"),!1)}finally{qe.current=!1}},[t]);(0,r.useEffect)(()=>{try{if(localStorage.getItem("me-onboard-v2")||O!=="cards")return;let h=setTimeout(()=>pt(!0),900);return()=>clearTimeout(h)}catch{}},[O]);let[we,b]=(0,r.useState)(!0),[c,le]=(0,r.useState)(0),[Ae,f]=(0,r.useState)(null),[C,Re]=(0,r.useState)(0),Ue=(0,r.useCallback)(()=>Re(h=>h+1),[]),o=s?.quarantine?.pending??0,mt=(s?.quarantine?.deleted??0)+(s?.quarantine?.rejected??0),vt=(0,r.useRef)(null),[ut,Ct]=(0,r.useState)(0),[Mt,qt]=(0,r.useState)(!1),Gt=(0,r.useRef)(null),l=(0,r.useRef)(null),ee=(0,r.useCallback)(async(h=R,j=L,ne=P,xe={})=>{let ke=xe.append===!0;try{ke?qt(!0):(w(!0),G(""));let ge=new URLSearchParams;h&&h!=="all"&&ge.set("kind",h),j.trim()&&ge.set("q",j.trim());let Qe=xe.tag!==void 0?xe.tag:re;Qe&&ge.set("tag",Qe),ge.set("status",ne||"all"),ge.set("limit",String(Fo)),ge.set("offset",String(xe.offset||0)),Z==="title"&&ge.set("sort","title");let Rt=await(await fetch(`${V}/cards?${ge.toString()}`)).json();if(Rt.ok){let Lt=Rt.cards||[];N(zt=>ke?[...zt,...Lt.filter(Ra=>!zt.some(za=>za.path===Ra.path))]:Lt),Ct(Number(Rt.total)||Lt.length)}}catch(ge){G(String(ge&&ge.message?ge.message:ge))}finally{ke?qt(!1):w(!1)}},[R,L,P,Z,re]),ae=(0,r.useCallback)(async()=>{try{let[h,j,ne,xe]=await Promise.all([fetch(`${V}/overview`).then(ge=>ge.json()),fetch(`${V}/capture-log`).then(ge=>ge.json()).catch(()=>null),fetch(`${V}/config`).then(ge=>ge.json()).catch(()=>null),fetch(`${V}/news?unread=1&limit=1`).then(ge=>ge.json()).catch(()=>null)]);h.ok&&m(h),xe&&xe.ok&&E(Number((xe.counts||{}).unread)||0);let ke=ne&&ne.ok&&ne.config&&ne.config.uiScale;if(["compact","normal","large"].includes(ke)){S(ke);try{localStorage.setItem("me-ui-scale",ke)}catch{}}T(j&&j.ok&&j.available&&j.health||null)}catch(h){G(String(h&&h.message?h.message:h))}finally{w(!1)}},[]),je=async h=>{try{let ne=await(await fetch(`${V}/delete?path=${encodeURIComponent(h)}`)).json();ne.ok?(oe({ok:!0,msg:t("deleted")}),await ae(),Ue()):oe({ok:!1,msg:ne.error||t("deleteFail")})}catch{oe({ok:!1,msg:t("deleteFail")})}I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),2e3)};(0,r.useEffect)(()=>(ae(),()=>{vt.current&&clearTimeout(vt.current)}),[ae]);let Ie=h=>{W(h),vt.current&&clearTimeout(vt.current),vt.current=setTimeout(()=>ee(R,h,P),280)},Se=h=>{$(h),ee(h,L,P)},Oe=h=>{let j=String(h||"");_e(j),Me(null),ee(R,L,P,{tag:j})};(0,r.useEffect)(()=>{O==="cards"&&ee(R,L,P)},[P,O,C,Z,re]),(0,r.useEffect)(()=>{if(O!=="cards"||p||Mt||u.length>=ut)return;let h=Gt.current,j=l.current;if(!h)return;let ne=new IntersectionObserver(xe=>{xe[0]&&xe[0].isIntersecting&&ee(R,L,P,{append:!0,offset:u.length})},{root:j||null,rootMargin:"400px"});return ne.observe(h),()=>ne.disconnect()},[O,u,ut,p,Mt,R,L,P,ee]);let wt=async(h,j)=>{try{let ne=await fetch(`${V}/card-kind`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:h,kind:j})}).then(xe=>xe.json());!ne||!ne.ok?oe({ok:!1,msg:ne&&ne.error||t("coreSetFail")}):(Me(xe=>xe&&xe.path===h?{...xe,kind:ne.kind}:xe),await ae(),Ue(),oe({ok:!0,msg:t(j==="core"?"coreSetOk":"coreUnsetOk")}))}catch(ne){oe({ok:!1,msg:String(ne&&ne.message||ne)})}I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),2e3)},kt=async h=>{try{let j=h.status;if(!j&&h.path)try{let Qe=((await fetch(`${V}/cards?status=all&q=${encodeURIComponent(h.title||"")}&limit=50`).then(St=>St.json())).cards||[]).find(St=>St.path===h.path);Qe&&(j=Qe.status)}catch{}let ne=j&&j!=="approved"?`&status=${encodeURIComponent(j)}`:"",xe=await fetch(`${V}/card?path=${encodeURIComponent(h.path||h.id)}${ne}`),ke=await xe.json();ke.ok?Me({path:ke.path,title:h.title,text:ke.text,kind:h.kind||"knowledge",status:j||"approved"}):G(ke.error||`HTTP ${xe.status}`)}catch(j){G(String(j&&j.message?j.message:j))}},Kt=async(h,j)=>{Be(!0);try{let ne=await fetch(`${V}/export`);if(!ne.ok)throw new Error("HTTP "+ne.status);let xe=await ne.json();if(!xe.ok)throw new Error(xe.error||"export failed");let ke,ge,Qe;if(h==="json"){ge="memory-vault.json",Qe="application/json";let Lt=xe.cards.map(zt=>({path:zt.path,title:zt.title,kind:zt.kind,status:zt.status,store:zt.store,text:zt.text}));ke=JSON.stringify({format:xe.format||"memory-eternal-vault",formatVersion:xe.formatVersion||1,exportedAt:xe.exportedAt||new Date().toISOString(),count:Lt.length,cards:Lt},null,2)}else ge="memory-vault.md",Qe="text/markdown;charset=utf-8",ke=xe.cards.map(Lt=>Lt.text.trim()).filter(Boolean).join(`
|
|
1047
1047
|
|
|
1048
1048
|
---
|
|
1049
1049
|
|
|
1050
|
-
`);let Mt=new Blob([ve],{type:Ze}),Ht=await zr(Mt,ge,!1);if(!Ht.ok){oe({ok:!1,msg:t("exportFail")}),je(!1);return}oe({ok:!0,msg:t("exportedTo")+"\uFF1A"+t("defaultDownloads")+" \xB7 "+Ht.name})}catch(ae){oe({ok:!1,msg:t("exportFail")+" \xB7 "+(ae.message||"")})}finally{je(!1)}I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),2600)},Xt=async h=>{let H=h.target.files&&h.target.files[0];if(h.target.value="",!!H){try{let ae=await H.text(),ve=await(await fetch(`${Y}/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:ae})).json();if(ve.ok){await ne();let ge=ve.imported||0,Ze=t("importedVault")+"\uFF1A"+ge;ve.total&&(Ze+=t("importedTotal")+ve.total+t("importedTotalTail")),ve.quarantined&&(Ze+=t("importedQuarantine")+ve.quarantined+t("importedQuarantineTail")),ve.skipped&&(Ze+=t("importedSkipped")+ve.skipped+t("importedSkippedTail")),ve.warning&&(Ze+=" \xB7 "+ve.warning),oe({ok:ge>0||!ve.total,msg:Ze})}else oe({ok:!1,msg:ve.error||t("importFail")})}catch{oe({ok:!1,msg:t("importFail")})}I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),2400)}},ua=async()=>{if(!de){m(!0);try{let h=await fetch(`${Y}/skills/sync`,{method:"POST"}).then(H=>H.json()).catch(()=>null);if(h&&h.ok){let H=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);oe({ok:!0,msg:H}),await ne(),$e()}else oe({ok:!1,msg:h&&h.error||t("skillsSyncFail")})}catch{oe({ok:!1,msg:t("skillsSyncFail")})}finally{m(!1)}I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),3600)}},Ye=(0,r.useMemo)(()=>{let h=u.slice();return me!=="all"&&(h=h.filter(H=>_t(H.submittedBy)===me)),P!=="all"&&(h=h.filter(H=>(H.status||"approved")===P)),X&&(h=h.filter(H=>$.has(H.path))),Z==="title"?h.sort((H,ae)=>String(H.title||"").localeCompare(String(ae.title||""))):Z==="hot"?h.sort((H,ae)=>(ae.weight||ae.links||0)-(H.weight||H.links||0)):h.sort((H,ae)=>new Date(ae.updated||0).getTime()-new Date(H.updated||0).getTime()),h},[u,Z,me,P,X,$]),Bt=(0,r.useMemo)(()=>[...new Set(u.map(h=>_t(h.submittedBy)))],[u]),mt=(0,r.useMemo)(()=>{let h={};for(let H of u){let ae=new Set(H.tags||[]),xe=0;for(let ve of u)ve.path!==H.path&&(ve.tags||[]).some(ge=>ae.has(ge))&&xe++;h[H.path]=xe}return h},[u]),[Kt,Qt]=(0,r.useState)(null),Qe=(0,r.useMemo)(()=>{if(!Ye.length)return null;let h=Kt?Ye.find(ae=>ae.path===Kt):null;return h||Ye.find(ae=>Date.now()-new Date(ae.updated||0).getTime()>21*864e5)||Ye[0]},[Ye,Kt]),it=()=>{if(!Ye.length)return;let h=Ye.findIndex(H=>H.path===(Qe&&Qe.path));Qt(Ye[(h+1+Ye.length)%Ye.length].path)},jt=!U&&R==="all"&&!re&&P==="all"&&!!Qe;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:ha,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(W==="cards"?"cardsTab":W==="graph"?"graphTab":W==="news"?"newsTab":W==="stats"?"tabUsage":W==="audit"?"tabAudit":W==="optimize"?"tabRecycle":W==="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:()=>Na("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:()=>yt("group"),title:t("supportTitle"),"aria-label":t("supportTitle"),children:"?"})]})]}),F&&(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(F.evidence?.recalls??0)).replace("{cards}",String(F.evidence?.cards??0))})]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>{Na("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:ha,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"})})})]}),x&&x.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:[x.reason,(0,e.jsx)("div",{style:{opacity:.68,fontSize:11.5,marginTop:2},children:t("captureAlertHint")})]}),(0,e.jsx)("span",{style:{opacity:.7},children:x.since?Et(new Date(x.since).toISOString()):""})]}),(0,e.jsxs)("div",{className:"me-modal-body",children:[(0,e.jsxs)("div",{className:`mc-rail${ke?" open":""}`,children:[(0,e.jsxs)("div",{className:"mc-v5-rail-top",children:[ke&&(0,e.jsxs)("div",{className:"mc-v5-railbrand",children:[(0,e.jsx)("img",{className:"mark",src:ha,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:()=>b(h=>!h),"aria-label":t(ke?"collapse":"expand"),title:t(ke?"collapse":"expand"),children:ke?"\xAB":"\xBB"})]}),ke&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navWorkspace")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${W==="cards"?" active":""}`,onClick:()=>te("cards"),title:t("cardsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E0}"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("cardsTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${W==="graph"?" active":""}`,onClick:()=>te("graph"),title:t("graphTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F52E}"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("graphTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${W==="news"?" active":""}`,onClick:()=>te("news"),title:t("newsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4F0}"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("newsTab")}),K>0&&(0,e.jsx)("span",{className:"mc-dot",children:K>99?"99+":K})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${W==="stats"?" active":""}`,onClick:()=>te("stats"),title:t("tabUsage"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4C8}"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabUsage")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${W==="audit"?" active":""}`,onClick:()=>te("audit"),title:t("tabAudit"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F50D}"}),ke&&(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})]}),ke&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSystem")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${W==="optimize"?" active":""}`,onClick:()=>te("optimize"),title:t("tabRecycle"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u267B\uFE0F"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabRecycle")}),dt>0&&(0,e.jsx)("span",{className:"mc-dot",style:{background:"#6b7280"},children:dt>99?"99+":dt})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${W==="terminal"?" active":""}`,onClick:()=>te("terminal"),title:t("terminalTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u25B8_"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("terminalTab")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:It,title:t("webTab"),"aria-label":t("webTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F310}"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("webTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${W==="config"?" active":""}`,onClick:()=>te("config"),title:t("tabConfig"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2699\uFE0F"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabConfig")})]}),ke&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSupport")}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>yt("group"),title:t("supportGroup"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4AC}"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportGroup")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>yt("sponsor"),title:t("supportSponsor"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2615"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportSponsor")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>yt("legacy"),title:t("supportLegacy"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E9}"}),ke&&(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}"}),ke&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("fbNav")})]}),ke&&(0,e.jsxs)("button",{type:"button",className:"mc-quote",onClick:()=>le(h=>(h+1)%ka.length),title:`${ka[p]}
|
|
1051
|
-
${
|
|
1052
|
-
${t("quoteHint")}`,children:[(0,e.jsxs)("span",{className:"mc-quote-tag",children:[t("navQuotes")," \xB7 ",p+1,"/",ka.length]}),(0,e.jsx)("span",{className:"mc-quote-text",children:ka[p]},p),(0,e.jsx)("span",{className:"mc-quote-src",children:Wn})]})]}),(0,e.jsxs)("div",{className:"mc-main",ref:l,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,W==="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:[u.length," / ",pt]})]}),W==="cards"&&(0,e.jsx)(Jo,{t,notify:(h,H)=>oe({ok:h,msg:H}),onPromoted:()=>{ne(),$e()}}),W==="cards"&&(0,e.jsxs)("div",{className:"mc-toolbar",children:[(0,e.jsx)("input",{type:"text",placeholder:t("searchPlaceholder"),value:U,onChange:h=>Pe(h.target.value)}),re&&(0,e.jsxs)("button",{type:"button",className:"mc-chip active",title:t("clearFilter"),onClick:()=>We(""),children:["\u{1F3F7} ",re," ",(0,e.jsx)("span",{style:{opacity:.7},children:"\u2715"})]}),(0,e.jsx)("input",{ref:ie,type:"file",accept:".json,application/json",style:{display:"none"},onChange:Xt}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>ie.current&&ie.current.click(),children:t("importVault")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>f({kind:"knowledge",title:"",body:"",tags:"",template:""}),children:["+ ",t("newCard")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:de,onClick:ua,title:t("skillCardsHint"),children:de?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:Ie,onClick:()=>Gt("md"),children:t(Ie?"exporting":"exportVault")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:Ie,onClick:()=>Gt("json"),children:t(Ie?"exporting":"exportJson")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>ne(),children:t("refresh")})]}),W==="cards"&&(0,e.jsxs)("div",{className:"mc-chips",children:[Ca.map(h=>(0,e.jsxs)("button",{type:"button",className:`mc-chip${R===h?" active":""}`,onClick:()=>Se(h),children:[t(h==="all"?"all":nt[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${X?" active":""}`,onClick:()=>ce(h=>!h),children:["\u{1F4CC} ",t("pinnedOnly"),(0,e.jsx)("span",{className:"mc-chip-n",children:$.size})]}),(0,e.jsxs)("select",{value:me,onChange:h=>Q(h.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsxs)("option",{value:"all",children:["\u{1F916} ",t("allAgents")]}),Qn(Bt).map(h=>(0,e.jsx)("option",{value:h,children:h},h))]}),(0,e.jsxs)("select",{value:P,onChange:h=>G(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${Z===h.key?" active":""}`,onClick:()=>_e(h.key),children:h.label},h.key))]}),_&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",_]}),(0,e.jsx)("div",{style:{display:W==="cards"?"contents":"none"},children:c?(0,e.jsx)(oo,{text:t("loading")}):_?(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",_," ",(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>ne(),children:t("retry")})]}):u.length===0?(0,e.jsx)("div",{className:"mc-empty",children:t("empty")}):(0,e.jsxs)(e.Fragment,{children:[jt&&(0,e.jsxs)("div",{className:"mc-v5-feature",onClick:()=>kt(Qe),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:Qe.title}),(0,e.jsx)("p",{children:en(Qe)}),(0,e.jsxs)("div",{className:"mc-v5-feature-meta",children:[(0,e.jsxs)("span",{children:[Ut[Qe.kind]||"\u{1F4CE}"," ",t(nt[Qe.kind]||"kindKnowledge")]}),(0,e.jsxs)("span",{children:["\u{1F552} ",Et(Qe.updated)]}),(Qe.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)(no,{n:mt[Qe.path]||0,color:ft[Qe.kind]||ft.other,size:58}),(0,e.jsx)("b",{children:mt[Qe.path]||0}),(0,e.jsx)("span",{children:t("links")}),(0,e.jsx)("button",{type:"button",className:"mc-v5-feature-shuffle",onClick:h=>{h.stopPropagation(),it()},children:t("reshuffle")}),(0,e.jsx)("span",{className:"mc-v5-feature-open",children:t("openArrow")})]})]}),(0,e.jsx)("div",{className:"mc-grid",children:Ye.filter(h=>!jt||h.path!==Qe.path).map(h=>(0,e.jsx)(hr,{card:h,t,query:U.trim(),onOpen:kt,onDelete:Oe,onTagClick:We,pinned:$.has(h.path),onPin:he,onCore:vt,links:mt[h.path]||0},h.path))}),u.length<pt&&(0,e.jsx)("div",{ref:qt,style:{height:1}}),Ct&&(0,e.jsxs)("div",{className:"mc-empty",style:{padding:"10px 0"},children:[t("loading"),"\uFF08",u.length," / ",pt,"\uFF09"]})]})}),(0,e.jsx)("div",{style:{display:W==="graph"?"flex":"none",flex:1,minHeight:0},children:v.has("graph")&&(0,e.jsx)(Nr,{t,onOpen:kt,all:we,onAllChange:ye,onMutate:$e,active:W==="graph",visible:W==="graph"})}),(0,e.jsx)("div",{style:{display:W==="news"?"contents":"none"},children:v.has("news")&&(0,e.jsx)(ur,{t,version:C,onUnreadChange:E})}),(0,e.jsx)("div",{style:{display:W==="terminal"?"contents":"none"},children:v.has("terminal")&&(0,e.jsx)(Vo,{t})}),(0,e.jsx)("div",{style:{display:W==="config"?"contents":"none"},children:v.has("config")&&(0,e.jsx)(Zn,{t,onReload:()=>ne(),version:C})}),(0,e.jsx)("div",{style:{display:W==="stats"?"contents":"none"},children:v.has("stats")&&(0,e.jsx)(yr,{t,tab:"stats",onReload:()=>ne(),version:C})}),(0,e.jsx)("div",{style:{display:W==="audit"?"contents":"none"},children:v.has("audit")&&(0,e.jsx)(er,{t,onReload:()=>{ne(),$e()},version:C})}),(0,e.jsx)("div",{style:{display:W==="optimize"?"contents":"none"},children:v.has("optimize")&&(0,e.jsx)(fr,{t,onReload:()=>{ne(),$e()},version:C})}),j&&(0,e.jsx)(vr,{t,onClose:()=>se(!1)}),Ce&&(0,e.jsx)(wr,{t,tab:ot,onTab:ht,onClose:()=>pe(!1),onFeedback:()=>{pe(!1),se(!0)},onReplay:()=>{pe(!1),ct(!0)}}),qe&&(0,e.jsx)(kr,{t,onDone:tt}),ue&&(0,e.jsx)(Sr,{t,card:ue,query:U.trim(),onNavigate:h=>{let H=Ye.findIndex(xe=>xe.path===ue.path),ae=Ye[H+h];ae&&kt(ae)},onTagClick:We,onClose:()=>Me(null),onDelete:h=>{Me(null),Oe(h)},onFeedback:h=>{let H=ue.path;fetch(`${Y}/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:U.trim(),path:H,useful:h})}).then(()=>oe({ok:!0,msg:t(h?"fbUseful":"fbIrr")})).catch(()=>{}),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),2e3)},allCards:Ye,onOpenRelated:h=>kt(h),onKindChange:vt,onSaved:async({path:h,status:H,title:ae})=>{try{let xe=H&&H!=="approved"?`&status=${encodeURIComponent(H)}`:"",ve=await fetch(`${Y}/card?path=${encodeURIComponent(h)}${xe}`).then(ge=>ge.json());ve&&ve.ok&&Me(ge=>ge&&ge.path===h?{...ge,title:ae||ve.title||ge.title,text:ve.text}:ge)}catch{}await ne(),$e(),oe({ok:!0,msg:t("editSaved")}),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),2e3)}}),(0,e.jsx)(xr,{t,newCard:De,setNewCard:f,onCreated:()=>{ne(),$e(),oe({ok:!0,msg:t("created")}),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),2e3)}})]})]})]})}var Ma=({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 Xa=(0,r.createContext)({form:null,set:()=>{}}),Zo=new Set(["autoRestartOnDrift","coreMemoryEnabled","skillCardsAutoSync","workingMemoryEnabled"]);function Xe({k:t,label:a,hint:n,type:i="text",step:s,min:d,max:g}){let{form:w,set:u}=(0,r.useContext)(Xa);return(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:a||t}),(0,e.jsx)("input",{type:i,step:s,min:d,max:g,value:w?w[t]??"":"",onChange:k=>{let c=k.target.value;u(t,i==="number"?c===""?"":Number(c):c)}}),n?(0,e.jsx)("span",{className:"mc-field-hint",children:n}):null]})}function lt({k:t,label:a}){let{form:n,set:i}=(0,r.useContext)(Xa),s=n?n[t]:void 0,d=s===void 0?Zo.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 Ft({icon:t,title:a,sub:n,children:i}){return(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:t}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:a}),n?(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:n}):null]})]}),(0,e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:13},children:i})]})}function Zn({t,onReload:a,version:n,compact:i}){let[s,d]=(0,r.useState)(null),[g,w]=(0,r.useState)(0),[u,k]=(0,r.useState)(null),[c,y]=(0,r.useState)(null),[x,T]=(0,r.useState)(!1),[_,q]=(0,r.useState)(!1),R=(0,r.useRef)(!1),L=(0,r.useRef)(null),U=(0,r.useRef)({}),[V,me]=(0,r.useState)(null),[Q,P]=(0,r.useState)(null),[G,$]=(0,r.useState)(""),[B,X]=(0,r.useState)(""),[ce,he]=(0,r.useState)(""),[re,Ue]=(0,r.useState)(null),[W,Be]=(0,r.useState)(null),[v,ze]=(0,r.useState)(null),te=(0,r.useCallback)(async(l,ee=!1)=>{ee||X("version");try{let ne=await fetch(Y+"/version-check"+(l?"?force=1":"")).then(Oe=>Oe.json());ne&&ne.ok?(ze(ne),l&&m(ne.updateAvailable?t("vcLatest")+" v"+ne.latest:t("vcUpToDate"))):l&&m(t("vcCheckFail"),!1)}catch{l&&m(t("vcCheckFail"),!1)}finally{ee||X("")}},[t]);(0,r.useEffect)(()=>{te(!1);let l=setInterval(()=>{te(!1,!0)},6e4),ee=()=>{typeof document<"u"&&!document.hidden&&te(!1,!0)};return document.addEventListener("visibilitychange",ee),()=>{clearInterval(l),document.removeEventListener("visibilitychange",ee)}},[n,te]);let[Z,_e]=(0,r.useState)(""),[Fe,oe]=(0,r.useState)(null),[F,z]=(0,r.useState)(""),[S,I]=(0,r.useState)(!1),ie=(0,r.useRef)(null),Ie=(0,r.useRef)(0),je=l=>{Ie.current=l.currentTarget.scrollTop};(0,r.useLayoutEffect)(()=>{let l=ie.current;l&&Math.abs(l.scrollTop-Ie.current)>1&&(l.scrollTop=Ie.current)});let de=(0,r.useRef)(null),m=(l,ee=!0)=>{de.current&&clearTimeout(de.current),oe({msg:l,ok:ee}),de.current=setTimeout(()=>oe(null),1900)},K=async()=>{if(!B){X("restart");try{let l=await fetch(Y+"/restart-self",{method:"POST"});if(l.status===404||l.status===405){m(qe("vcRestartNoRoute",{cmd:v&&v.restartCommand||"dsh-memory restart --port 7999"}),!1);return}let ee=await l.json().catch(()=>null);if(!ee){m(t("vcRestartFail")+"\uFF08HTTP "+l.status+"\uFF09",!1);return}if(!ee.ok){m(ee.error||t("vcRestartFail"),!1);return}if(ee.alreadyCurrent){m(ee.note||t("vcRestartCurrent"));return}m(ee.note||t("vcRestartSent")),ee.alreadyRunning||setTimeout(()=>{te(!0)},6e3)}catch(l){m(t("vcRestartFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{X("")}}},E=v&&v.resident?String(v.resident.served||""):"",ue=!!(v&&v.onDisk&&E&&E!==v.onDisk),Me=!!(v&&v.resident&&v.resident.managed===!1&&v.resident.managedKnown===!1),we=v&&v.resident&&v.resident.replaceBlocked&&v.resident.replaceBlocked.fresh||null,ye=!!(v&&v.resident&&v.resident.managedBy==="host"),j=!!(v&&v.resident&&v.resident.managed===!1&&!Me&&!ye),se=!!(v&&v.resident&&!E),Ce=ue||se||j||Me,pe=bn({hasVersion:!!v,hostVersion:v?v.loaded:"",onDisk:v?v.onDisk:"",residentServed:v&&v.resident?v.resident.served:"",residentPresent:!!(v&&v.resident),residentManaged:v&&v.resident?v.resident.managed:null,residentManagedKnown:v&&v.resident?v.resident.managedKnown:null,residentManagedBy:v&&v.resident?v.resident.managedBy:"",replaceBlocked:v&&v.resident?v.resident.replaceBlocked:null}),ot={hostProcessStale:()=>qe("vcHostProcessStale",{disk:v.onDisk,loaded:v.loaded}),residentDown:()=>qe("vcResidentDown",{port:v.resident&&v.resident.port||"",cmd:v.restartCommand||"dsh-memory restart --port 7999"}),residentReplaceBlocked:()=>qe("vcResidentReplaceBlocked",{served:E,err:we&&we.error||"",path:we&&we.lockPath||"",cmd:v.restartCommand||"dsh-memory restart --port "+(v.resident&&v.resident.port||7999)}),residentLockUnknown:()=>qe("vcResidentLockUnknown",{served:E,path:v.resident&&v.resident.lock&&v.resident.lock.path||"",err:v.resident&&v.resident.lock&&v.resident.lock.error||""}),residentUnmanaged:()=>qe("vcResidentUnmanaged",{served:E,cmd:v.restartCommand||"dsh-memory restart --port 7999"})},ht={restartStart:()=>qe("vcRestartStart",{disk:v&&v.onDisk||""}),restartRepair:()=>qe("vcRestartRepair",{disk:v&&v.onDisk||""}),restartFixes:()=>qe("vcRestartFixes",{served:E||"",disk:v&&v.onDisk||""}),restartHostOnly:()=>qe("vcRestartHostOnly",{loaded:v&&v.loaded||"",disk:v&&v.onDisk||""}),restartAnyway:()=>qe("vcRestartAnyway",{ver:v&&v.onDisk||""})},qe=(l,ee)=>Object.keys(ee).reduce((ne,Oe)=>ne.split("{"+Oe+"}").join(ee[Oe]),t(l)),ct=(0,r.useCallback)(async()=>{try{let[l,ee,ne,Oe]=await Promise.all([fetch(`${Y}/config`).then(Pe=>Pe.json()).catch(()=>null),fetch(`${Y}/setup-status`).then(Pe=>Pe.json()).catch(()=>null),fetch(`${Y}/budget`).then(Pe=>Pe.json()).catch(()=>null),fetch(`${Y}/llm-routes`).then(Pe=>Pe.json()).catch(()=>null)]);if(Oe&&Oe.ok&&Be(Oe),l&&l.ok){d(l),w(l.revision??0),k(l.schema??null);let Pe=On(l.config??{},U.current);U.current=Pe.overlay,y({...Pe.values}),I(!1),me(l.dsh??null),T(l.writable===!1),q(l.viaPending===!0),$(""),R.current=!1}else ne&&ne.ok?(y({...ne}),I(!1),T(!0),$(t("configNeedsDsh"))):$(t("adminLoadFail"));ee&&ee.ok&&P(ee),he("")}catch{$(t("adminLoadFail"))}},[t]);(0,r.useEffect)(()=>{ct()},[n,ct]);let tt=(l,ee)=>{R.current=!0,I(!0),z(""),y(ne=>({...ne??{},[l]:ee}))};(0,r.useEffect)(()=>{L.current=ct},[ct]),(0,r.useEffect)(()=>{if(typeof EventSource>"u")return;let l=null;try{l=new EventSource(Y+"/events")}catch{return}let ee=()=>{!R.current&&typeof L.current=="function"&&L.current()};try{l.addEventListener("config",ee)}catch{}return()=>{try{l.close()}catch{}}},[]);let yt=new Set(["dedupThreshold","captureMinChars","captureCooldownMs","maxCardsPerDay","captureMaxTokens","recallMinScore","recallLimit","recallSummaryLen","recycleRetentionDays","webPort","webCheckIntervalMs","webMaxRestart","sessionBudgetChars","coreMemoryLimit","coreMemoryMaxChars"]),Ge=l=>({init:t("modeInit"),interval:t("modeInterval"),manual:t("modeManual")})[l]||l,It=async()=>{if(!c)return;if(x){m(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]},ee=[];for(let[ne,[Oe,Pe]]of Object.entries(l)){if(!(ne in c))continue;let Se=c[ne],We=typeof Se=="number"?Se:Number(Se);(Se===""||Se===null||Se===void 0||!Number.isFinite(We)||We<Oe||We>Pe)&&ee.push(t("invalidField",{field:ne,min:Oe,max:Pe,value:String(Se===""?"\u7A7A":Se)}))}if(ee.length){let ne=t("saveInvalid")+"\uFF1A"+ee.join("\uFF1B");$(ne),m(ne,!1);return}X("save");try{let ne={...c};for(let We of Object.keys(c))We in ne&&typeof ne[We]=="string"&&ne[We].trim()!==""&&yt.has(We)&&(ne[We]=Number(ne[We]));Array.isArray(ne.vaultProfiles)&&(ne.vaultProfiles=ne.vaultProfiles.filter(We=>We&&(String(We.name||"").trim()||String(We.path||"").trim())));let Oe=await fetch(`${Y}/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:ne,expectedRevision:g})}),Pe=await Oe.text(),Se=null;try{Se=Pe?JSON.parse(Pe):null}catch{Se=null}if(Se||(Se={error:"HTTP "+Oe.status+(Pe?"\uFF1A"+Pe.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")}),Se&&Se.ok){let We=typeof Se.pendingOutcome=="string"?Se.pendingOutcome:"",vt,kt=!0;if(We==="applied")vt=t("savedApplied")+(Array.isArray(Se.applied)&&Se.applied.length?" \xB7 "+Se.applied.join("\u3001"):"");else if(We==="queued")kt=!1,vt=t("saveQueued");else if(We==="failed")kt=!1,vt=t("saveFail")+" \xB7 "+(Se.hostGuard?t("saveHostGuard"):t("saveFailHint"));else if(We==="applied-direct")vt=t("savedOk")+" \xB7 "+t("savedDirect");else{let Gt=Array.isArray(Se.pending)&&Se.pending.length?" \xB7 "+t("savePending"):Se.note?" \xB7 "+t("restartHint"):"";vt=(Se.retried?"\u267B ":"")+t("savedOk")+Gt}U.current={...U.current,...ne},kt?(z(""),I(!1),he(vt)):$(vt),m(vt,kt),await ct()}else{let We=Oe.status===409?t("conflictRefresh"):Se?.error||t("saveFail");$(We),m(We,!1)}}catch{$(t("saveFail")),m(t("saveFail"),!1)}finally{X("")}},ke=()=>{U.current={},y({...s?.config??{}}),z(""),I(!1),he("")},b={env:"vaultSrcEnv",profile:"vaultSrcProfile",workspace:"vaultSrcWorkspace",vaultDir:"vaultSrcVaultDir",default:"vaultSrcDefault"},p=l=>Array.isArray(l?.vaultProfiles)?l.vaultProfiles:[],le=(l,ee,ne)=>{R.current=!0,I(!0),y(Oe=>{let Pe=p(Oe).map(We=>({...We||{}})),Se={...Pe[l]||{}};return ee==="match"?String(ne).trim()?Se.match={...Se.match||{},workspace:ne}:delete Se.match:Se[ee]=ne,Pe[l]=Se,{...Oe??{},vaultProfiles:Pe}})},De=()=>{R.current=!0,I(!0),y(l=>({...l??{},vaultProfiles:[...p(l),{name:"",path:""}]}))},f=l=>{R.current=!0,I(!0),y(ee=>({...ee??{},vaultProfiles:p(ee).filter((ne,Oe)=>Oe!==l)}))},C={fontSize:11,padding:"2px 8px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:6},Te={padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:12,minWidth:0},$e={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}},o=l=>{let ee=$e[l];ee&&(y(ne=>({...ne??{},...ee})),R.current=!0,I(!0),z(l),m(qe("planApplied",{plan:ee.label})))},dt=async()=>{try{let l=await fetch(Y+"/setup-status").then(ee=>ee.json());l&&l.ok&&P(l)}catch{}},xt=async(l,ee)=>{X(l+ee);try{let Oe=await(await fetch(`${Y}/mcp/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:l,action:ee})})).json();Oe&&Oe.ok?m(qe(ee==="install"?"mcpInstalled":"mcpUninstalled",{agent:l})):m(qe("mcpActionFail",{agent:l,error:Oe?.error||""}),!1);try{let Pe=await fetch(`${Y}/setup-status`).then(Se=>Se.json());Pe&&Pe.ok&&P(Pe)}catch{}}catch{m(t("mergeFail"),!1)}finally{X("")}},pt=Q&&Array.isArray(Q.agents)?Q.agents:[],Nt=pt.filter(l=>l.installed),Ct=[...new Set(Nt.flatMap(l=>Array.isArray(l.servers)?l.servers:[]))],$t=pt.filter(l=>l.mcpConfigured&&!l.isDsh).length,qt=pt.some(l=>Array.isArray(l.servers));return(0,e.jsx)(Xa.Provider,{value:{form:c,set:tt},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}),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",{style:{wordBreak:"break-all"},children:Fe.msg})]}),(0,e.jsxs)("div",{ref:ie,onScroll:je,style:{flex:1,minHeight:0,overflow:"auto",overscrollBehavior:"contain",scrollbarGutter:"stable",padding:4},children:[!i&&(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")]})]}),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:ct,children:["\u21BB ",t("retry")]})]}),_&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #3b82f6",background:"rgba(59,130,246,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#1d4ed8",lineHeight:1.7},children:["\u2139 ",t("pendingSyncNote")]}),x&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #f59e0b",background:"rgba(245,158,11,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#b45309"},children:["\u2139\uFE0F ",t("configNeedsDsh")," \u2014\u2014 ",t("editInSetting")]}),ce&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #10b981",background:"rgba(16,185,129,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#059669"},children:["\u2713 ",ce]}),s&&(s.version||s.dsh?.vaultDir)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F4E6} ",t("pluginInfo")]}),(0,e.jsx)("span",{style:{fontSize:12,opacity:.7},children:t("dshHostLabel")}),s.version&&(0,e.jsxs)("code",{style:C,children:[t("vcLoaded")," v",s.version]}),v&&v.resident&&v.resident.served&&v.resident.served!==s.version&&(0,e.jsxs)("code",{style:C,children:[t("vcResident")," v",v.resident.served]}),v&&v.resident&&!v.resident.served&&(0,e.jsxs)("code",{style:{...C,color:"#b45309",fontWeight:600},children:[t("vcResident")," ",t("vcResidentDownShort")]}),v&&v.resident&&v.resident.served&&v.resident.managed===!1&&(0,e.jsxs)("code",{style:{...C,color:"#b45309",fontWeight:600},children:[t("vcResident")," v",v.resident.served," \xB7 ",t(we?"vcResidentReplaceBlockedShort":ye?"vcResidentHostManagedShort":Me?"vcResidentLockUnknownShort":"vcResidentUnmanagedShort")]}),na&&(0,e.jsxs)("code",{style:C,children:[t("vcPage")," v",na]}),v&&v.onDisk&&(0,e.jsxs)("code",{style:C,children:[t("vcOnDisk")," v",v.onDisk]}),v&&v.latest&&(0,e.jsxs)("code",{style:C,children:[t("vcLatest")," v",v.latest]}),s.dsh?.vaultDir&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.6},children:["\u{1F4C1} ",s.dsh.vaultDir]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:B==="version",onClick:()=>te(!0),children:B==="version"?t("checking"):"\u{1F504} "+t("vcCheck")})]}),v&&pe.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 ",ot[pe.warn]?ot[pe.warn]():""]})}),pe.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"+(pe.emphasis?" me-on":""),disabled:!!B,onClick:K,children:B==="restart"?"\u23F3 "+t("vcRestarting"):"\u{1F504} "+t("vcRestart")}),v.restartCommand&&(0,e.jsx)("code",{style:{fontSize:11,opacity:.75},children:v.restartCommand}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:ht[pe.hint]?ht[pe.hint]():""})]}),na&&v&&v.onDisk&&na!==v.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:v.onDisk})}),v&&v.updateAvailable&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,opacity:.88},children:["\u2B06 ",t("vcOutdated")," \u2192 ",(0,e.jsx)("code",{children:v.updateCommand})]}),v&&v.checkError&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#b91c1c"},children:[t("vcCheckFail"),"\uFF1A",v.checkError]})]}),Q&&Q.agents&&(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:"\u{1F50C}"}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:t("mcpSetupStatus")}),(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:t("mcpAutoHint")})]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",flex:"none"},onClick:dt,children:t("mcpRefresh")})]}),qt?(0,e.jsx)("div",{className:"mc-mcp-summary",children:qe("mcpSummary",{agents:Nt.length,servers:Ct.length,mounted:$t})}):null,pt.map(l=>{let ee=Array.isArray(l.servers),ne=ee?l.servers:[],Oe=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:Oe}),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?ne.length?(0,e.jsx)("div",{className:"mc-mcp-servers",children:ne.map(Pe=>(0,e.jsx)("code",{className:Pe==="memory"?"on":"",children:Pe},Pe))}):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:!!B,onClick:()=>xt(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:!!B,onClick:()=>xt(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:!!B,onClick:()=>{window.confirm(t("uninstallConfirm"))&&xt(l.name,"uninstall")},children:t("uninstallMcp")})]})]},l.name+(l.mcpPath||""))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:6},children:t("mcpSetupHint")}),Z&&(0,e.jsx)("div",{style:{fontSize:11,marginTop:6},children:(0,e.jsx)("code",{style:{padding:"2px 6px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:4},children:Z})})]}),c?(0,e.jsxs)("div",{className:"mc-cfg",children:[(0,e.jsxs)(Ft,{icon:"\u{1F3AF}",title:t("presetConfig"),sub:t("presetHint"),children:[(0,e.jsx)("div",{className:"mc-plan-grid",children:["A","B","C"].map(l=>(0,e.jsxs)("button",{type:"button",className:"mc-plan"+(F===l?" on":""),"aria-pressed":F===l,onClick:()=>o(l),disabled:!!B,children:[(0,e.jsxs)("b",{children:[F===l?"\u2705 ":l==="A"?"\u{1F7E2} ":l==="B"?"\u{1F4B0} ":"\u2B50 ",$e[l].label]}),(0,e.jsx)("span",{children:t("planDesc"+l)})]},l))}),F?(0,e.jsxs)("div",{style:{fontSize:11,color:"#10b981"},children:["\u2705 ",qe("planApplied",{plan:$e[F].label})]}):null]}),(0,e.jsx)(Ft,{icon:"\u{1F9E0}",title:t("dshMemoryConfig"),sub:t("cfgSubCore"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(lt,{k:"enabled",label:t("enabledLabel")}),(0,e.jsx)(lt,{k:"autoCapture",label:t("autoCapture")}),(0,e.jsx)(lt,{k:"autoRecall",label:t("autoRecall")}),(0,e.jsx)(Xe,{k:"vaultDir",label:t("vaultDirLabel")}),(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:"recallLimit",label:t("recallLimit"),type:"number"}),(0,e.jsx)(Xe,{k:"recallSummaryLen",label:t("recallSummaryLen"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(lt,{k:"recallIncludeBody",label:t("recallBody")}),(0,e.jsx)(Xe,{k:"secretHint",label:t("secretHint")}),(0,e.jsx)(Xe,{k:"recallEmbedding",label:t("recallEmbedding")})]})}),(0,e.jsx)(Ft,{icon:"\u2B50",title:t("coreMemory"),sub:t("coreMemoryHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(lt,{k:"coreMemoryEnabled",label:t("coreMemoryEnabled")}),(0,e.jsx)(lt,{k:"workingMemoryEnabled",label:t("workingMemoryEnabled")}),(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)(Ft,{icon:"\u{1F9E9}",title:t("skillCards"),sub:t("skillCardsHint"),children:[(0,e.jsx)("div",{className:"mc-cfg-grid",children:(0,e.jsx)(lt,{k:"skillCardsAutoSync",label:t("skillAutoSync")})}),(0,e.jsx)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!B,onClick:async()=>{X("skills");try{let l=await fetch(Y+"/skills/sync",{method:"POST"}).then(ee=>ee.json()).catch(()=>null);l&&l.ok?m(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)):m(l&&l.error||t("skillsSyncFail"),!1)}catch{m(t("skillsSyncFail"),!1)}finally{X("")}},children:B==="skills"?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")})})]}),(0,e.jsxs)(Ft,{icon:"\u{1F4EC}",title:t("newsDigest"),sub:t("newsDigestHint"),children:[(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(lt,{k:"newsDigestEnabled",label:t("newsDigestEnabled")}),(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",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!B,onClick:async()=>{X("digest");try{let l=await fetch(Y+"/news/digest",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}).then(ee=>ee.json()).catch(()=>null);l&&l.ok?(Ue(l.text||""),m(l.digest&&l.digest.items&&l.digest.items.length?t("newsDigestDone"):t("newsDigestEmpty"),!0)):m(l&&l.error||t("newsDigestFail"),!1)}catch{m(t("newsDigestFail"),!1)}finally{X("")}},children:B==="digest"?"\u23F3 "+t("newsDigestBuilding"):"\u{1F4EC} "+t("newsDigestNow")}),(0,e.jsx)("span",{className:"mc-field-hint",children:t("newsDigestNowHint")})]}),re!==null?(0,e.jsx)("pre",{className:"mc-digest-preview",children:re||t("newsDigestEmpty")}):null]}),(0,e.jsx)(Ft,{icon:"\u{1F520}",title:t("uiLayout"),sub:t("uiLayoutHint"),children:(0,e.jsx)("div",{className:"mc-cfg-grid",children:(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("uiLayout")}),(0,e.jsxs)("select",{value:c&&c.uiScale||"normal",onChange:l=>{let ee=l.target.value;tt("uiScale",ee);try{window.dispatchEvent(new CustomEvent("me-ui-scale",{detail:ee}))}catch{}},children:[(0,e.jsx)("option",{value:"compact",children:t("uiCompact")}),(0,e.jsx)("option",{value:"normal",children:t("uiNormal")}),(0,e.jsx)("option",{value:"large",children:t("uiLarge")})]})]})})}),(0,e.jsxs)(Ft,{icon:"\u{1F5C2}\uFE0F",title:t("vaultMulti"),sub:t("cfgSubMulti"),children:[(0,e.jsxs)("div",{style:{fontSize:11.5,opacity:.85,marginBottom:8,lineHeight:1.7},children:[t("vaultNow"),"\uFF1A",(0,e.jsx)("code",{children:V?.vaultDir||"\u2014"}),V?.vaultName?`\uFF08${V.vaultName}\uFF09`:""," \xB7 ",t("vaultSource"),"\uFF1A",t(b[V?.vaultSource]||"vaultSrcDefault"),V?.workspace?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("br",{}),t("vaultWorkspace"),"\uFF1A",(0,e.jsx)("code",{children:V.workspace})]}):null]}),p(c).map((l,ee)=>(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1.6fr 1.5fr auto",gap:6,marginBottom:6},children:[(0,e.jsx)("input",{value:l.name||"",placeholder:t("vaultNamePh"),onChange:ne=>le(ee,"name",ne.target.value),style:Te,disabled:x}),(0,e.jsx)("input",{value:l.path||"",placeholder:t("vaultPathPh"),onChange:ne=>le(ee,"path",ne.target.value),style:Te,disabled:x}),(0,e.jsx)("input",{value:l.match&&l.match.workspace||"",placeholder:t("vaultMatchPh"),onChange:ne=>le(ee,"match",ne.target.value),style:Te,disabled:x}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>f(ee),disabled:x,title:t("delete"),children:"\u2715"})]},ee)),(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginTop:4},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:De,disabled:x,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:c.activeVault||"",onChange:l=>tt("activeVault",l.target.value),disabled:x,style:Te,children:[(0,e.jsx)("option",{value:"",children:t("vaultActiveNone")}),p(c).filter(l=>l&&l.name).map(l=>(0,e.jsx)("option",{value:l.name,children:l.name},l.name))]})]})]})]}),(0,e.jsx)(Ft,{icon:"\u{1F4B0}",title:t("costControl"),sub:t("costHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(lt,{k:"distillEnabled",label:t("distillEnabled")}),(0,e.jsx)(lt,{k:"dedupByLLM",label:t("dedupByLLM")}),(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"}),W&&W.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 ",qe("routeListFail",{err:W.error||"\u672A\u77E5\u539F\u56E0"})]}),W&&W.providers&&W.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:c.captureProvider||"",onChange:l=>{tt("captureProvider",l.target.value),tt("captureModel","")},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),W.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:c.captureModel||"",onChange:l=>tt("captureModel",l.target.value),children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),((W.providers.find(l=>l.id===c.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)(lt,{k:"captureFollowSession",label:t("captureFollowSession")}),(0,e.jsx)(lt,{k:"captureFirstOnly",label:t("captureFirstOnly")}),(0,e.jsx)(Xe,{k:"sessionBudgetChars",label:t("sessionBudgetChars"),type:"number"}),(0,e.jsx)("div",{style:{display:"flex",alignItems:"flex-end"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!B,onClick:async()=>{X("llmtest");try{let l=await fetch(Y+"/llm-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:c.captureProvider||"",model:c.captureModel||"",firstOnly:c.captureFirstOnly===!0})}).then(ee=>ee.json());l&&l.ok?m(t("llmTestOk")+"\uFF1A"+l.route.provider+(l.route.model?"/"+l.route.model:"")+" \xB7 "+l.ms+"ms \xB7 "+t("llmCandidates")+" "+l.candidates):m(t("llmTestFail")+"\uFF1A"+(l&&(l.failure?l.failure.code+" "+l.failure.message:l.error)||"?"),!1)}catch(l){m(t("llmTestFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{X("")}},children:B==="llmtest"?t("exporting"):"\u{1F50C} "+t("llmTest")})})]})}),(0,e.jsx)(Ft,{icon:"\u{1F6E1}\uFE0F",title:t("auditConfig"),sub:t("auditHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("auditMode")}),(0,e.jsxs)("select",{value:c.auditMode??"all",onChange:l=>tt("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)(Kn,{label:t("auditExemptAgents"),value:c.auditExemptAgents||[],options:[{value:"__all__",label:t("allExempt")},...(Q?.agents||[]).filter(l=>!l.isDsh).map(l=>({value:l.name,label:l.name}))],onChange:l=>tt("auditExemptAgents",l)}),(0,e.jsx)(Kn,{label:t("auditExemptKinds"),value:c.auditExemptKinds||[],options:[{value:"__all__",label:t("allExempt")},...Ca.filter(l=>l!=="all"&&l!=="core"&&l!=="skill").map(l=>({value:l,label:t(nt[l])}))],onChange:l=>tt("auditExemptKinds",l)}),(0,e.jsx)(Xe,{k:"recycleRetentionDays",label:t("recycleDays"),hint:t("unitDays"),type:"number"})]})}),(0,e.jsx)(Ft,{icon:"\u{1F6E0}",title:t("serviceConfig"),sub:t("cfgSubService"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(lt,{k:"autoWeb",label:t("autoWeb")}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("autoWebMode")}),(0,e.jsxs)("select",{value:c.autoWebMode??"init",onChange:l=>tt("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.jsx)(lt,{k:"watchdogAutoSpawn",label:t("watchdogAutoSpawn")}),(0,e.jsx)(lt,{k:"autoRestartOnDrift",label:t("autoRestartOnDrift")}),(0,e.jsx)(lt,{k:"autoMcpSetup",label:t("autoMcpSetup")})]})}),(0,e.jsxs)("div",{className:"mc-cfg-actions",children:[S?(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"}),B==="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,opacity:.75},children:["\u23F3 ",t("saving")]}),ce&&B!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#10b981"},children:["\u2705 ",ce]}),G&&B!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#b91c1c"},children:["\u26A0 ",G]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ke,disabled:!!B,children:t("reset")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:x?()=>m(t("readonlyTitle")+"\uFF1A"+t("readonlyBody"),!1):It,disabled:B==="save",title:t(x?"readonlyBody":"saveConfig"),children:B==="save"?"\u23F3 "+t("saving"):x?"\u{1F512} "+t("readonlyBtn"):"\u{1F4BE} "+t("saveConfig")})]})]}):(0,e.jsx)("div",{style:{fontSize:12,opacity:.6},children:t("loading")})]})]})})}function er({t,onReload:a,version:n}){let[i,s]=(0,r.useState)([]),[d,g]=(0,r.useState)([]),[w,u]=(0,r.useState)("all"),[k,c]=(0,r.useState)("all"),[y,x]=(0,r.useState)(""),[T,_]=(0,r.useState)(""),[q,R]=(0,r.useState)(new Set),[L,U]=(0,r.useState)(null),[V,me]=(0,r.useState)(""),[Q,P]=(0,r.useState)(null),[G,$]=(0,r.useState)("pending"),B=(S,I=!0)=>{P({msg:S,ok:I}),setTimeout(()=>P(null),3e3)},X=[...new Set([...i,...d].map(S=>S.submittedBy).filter(Boolean))],ce=(0,r.useCallback)(async()=>{try{let S=await fetch(`${Y}/audit/list`).then(I=>I.json());S.ok&&(s(S.pending||[]),g(S.rejected||[]),R(new Set),v({}))}catch{}},[]);(0,r.useEffect)(()=>{ce()},[n,ce]);let he=(G==="pending"?i:d).filter(S=>{if(!Pa(S,T)||w!=="all"&&S.kind!==w||k!=="all"&&_t(S.submittedBy)!==k)return!1;if(y){let I=xa(S.created);if(I&&I!==y)return!1}return!0}),re=(0,r.useMemo)(()=>{let S=G==="pending"?i:d,I={all:0};return S.forEach(ie=>{if(Pa(ie,T)&&!(k!=="all"&&_t(ie.submittedBy)!==k)){if(y){let Ie=xa(ie.created);if(Ie&&Ie!==y)return}I.all++,I[ie.kind||"other"]=(I[ie.kind||"other"]||0)+1}}),I},[i,d,G,k,y,T]),Ue=S=>R(I=>{let ie=new Set(I);return ie.has(S)?ie.delete(S):ie.add(S),ie}),W=async(S,I,ie={})=>{let Ie=I||[...q];if(!Ie.length){B(t("noSelection"),!1);return}me("apply");let je=S==="approved"?ie.kind==="core"?t("approveCore"):t("toastApproved"):t(S==="rejected"?"toastRejected":"toastCardDeleted");try{let de=0;for(let m of Ie){let K=S==="approved"?"audit/approve":S==="rejected"?"audit/reject":"delete";try{let E=S==="approved"&&ie.kind?{path:m,kind:ie.kind}:null;(await fetch(Y+"/"+K+(E?"":"?path="+encodeURIComponent(m)+(S==="delete"?"&permanent=0":"")),E?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)}:void 0)).ok||de++}catch{de++}}await ce(),a&&a(),de?B(t("toastFailed")+"\uFF08"+de+"/"+Ie.length+"\uFF09",!1):B(je+" "+Ie.length+" \u5F20")}catch(de){B(t("toastFailed")+": "+String(de&&de.message||de),!1)}finally{me("")}},[Be,v]=(0,r.useState)({}),ze=S=>Be[S]||{},te=[...q],Z=he.find(S=>S.path===L)||he[0]||null,_e=Z?ze(Z.path):{};(0,r.useEffect)(()=>{let S=Z;if(!S||Be[S.path])return;let I=!0,ie=S.path;v(je=>({...je,[ie]:{loading:!0}}));let Ie=S.status||(G==="pending"?"pending":"rejected");return fetch(`${Y}/card?path=${encodeURIComponent(ie)}&status=${Ie}`).then(je=>je.json()).then(je=>{I&&(je&&je.ok?v(de=>({...de,[ie]:{text:je.text||""}})):v(de=>({...de,[ie]:{error:je&&je.error||"HTTP"}})))}).catch(je=>{I&&v(de=>({...de,[ie]:{error:String(je&&je.message||je)}}))}),()=>{I=!1}},[Z&&Z.path,G]);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")){me("reclassify");try{let S=await fetch(Y+"/reclassify").then(I=>I.json());S&&S.ok?B(t("reclassify")+"\uFF1A"+S.changed+" / "+S.scanned):B(t("toastFailed")+": "+(S&&S.error||"HTTP"),!1),await ce(),a&&a()}catch(S){B(t("toastFailed")+": "+String(S&&S.message||S),!1)}finally{me("")}}},oe=()=>R(new Set),F=S=>{$(S),oe()},z=["all",...Ca.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)(Ma,{toast:Q}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-audithead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"REVIEW INBOX"}),(0,e.jsx)("h1",{children:t("tabAudit")}),(0,e.jsx)("p",{children:t("auditInboxSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[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:T,onChange:S=>{_(S.target.value),oe(),U(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}}),T&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>{_(""),oe(),U(null)},title:t("clearFilter"),children:"\u2715"}),(0,e.jsxs)("select",{value:k,onChange:S=>{c(S.target.value),oe()},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")}),Qn(X).map(S=>(0,e.jsx)("option",{value:S,children:S},S))]}),(0,e.jsx)("input",{type:"date",value:y,onChange:S=>{x(S.target.value),oe()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"}})]}),(0,e.jsxs)("div",{className:"me-audit-types-top",children:[(0,e.jsx)("span",{className:"me-audit-types-label",children:t("auditTypeLabel")}),z.map(S=>{let I=S==="all"?"var(--dsw-alias-label-secondary, #9ca3af)":ft[S]||"#6B7280";return(0,e.jsxs)("button",{type:"button",className:`me-audit-kind${w===S?" active":""}`,onClick:()=>{u(S),oe()},children:[(0,e.jsx)("span",{className:"me-audit-kind-dot",style:{background:I}}),(0,e.jsx)("span",{className:"me-audit-kind-name",children:t(S==="all"?"all":nt[S])}),(0,e.jsx)("span",{className:"me-audit-kind-count",children:re[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${G==="pending"?" me-on":""}`,onClick:()=>F("pending"),children:[t("pending"),"\uFF08",i.length,"\uFF09"]}),(0,e.jsxs)("button",{type:"button",className:`mc-btn${G==="rejected"?" me-on":""}`,onClick:()=>F("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:he.length>0&&te.length===he.length,onChange:S=>{S.target.checked?R(new Set(he.map(I=>I.path))):R(new Set)}})," ",t("selectAll"),"\uFF08",he.length,"\uFF09"]}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.65},children:[t("auditSelected")," ",te.length]}),G==="pending"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!V,onClick:Fe,children:["\u{1F527} ",t("reclassify")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!te.length||!!V,onClick:()=>W("approved"),children:["\u2713 ",t(G==="rejected"?"restore":"approve")]}),G==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!te.length||!!V,onClick:()=>W("rejected"),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!te.length||!!V,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&W("delete")},children:["\u{1F5D1} ",t("restoreDelete")]}),te.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:oe,children:t("auditClearSelection")})]}),he.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:he.map(S=>{let I=ft[S.kind]||"#6B7280";return(0,e.jsx)("div",{className:`me-audit-row${S.kind==="core"?" core":""}${Z&&Z.path===S.path?" active":""}`,children:(0,e.jsxs)("div",{className:"me-audit-row-main",onClick:()=>U(S.path),children:[(0,e.jsx)("input",{type:"checkbox",checked:q.has(S.path),onClick:ie=>ie.stopPropagation(),onChange:()=>Ue(S.path)}),(0,e.jsx)("span",{className:"me-audit-row-tile",style:{color:I,borderColor:I+"38",background:I+"18"},children:Ut[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(nt[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 ${G==="pending"?"pending":"rejected"}`,children:G==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"me-audit-row-time",children:Ea(S.created)||"-"})]}),(0,e.jsx)("button",{type:"button",className:"me-audit-row-title",title:S.title,onClick:()=>U(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} ",_t(S.submittedBy)]}),(Array.isArray(S.tags)?S.tags:[]).slice(0,3).map(ie=>(0,e.jsxs)("span",{children:["#",ie]},ie))]})]}),(0,e.jsx)("div",{className:"me-audit-row-actions",onClick:ie=>ie.stopPropagation(),children:G==="pending"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>W("approved",[S.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},onClick:()=>W("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:()=>W("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"))&&W("delete",[S.path])},children:"\u{1F5D1}"})]})})]})},S.path)})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:20,textAlign:"center"},children:t(T?"auditNoMatch":"noAuditItems")})]}),(0,e.jsx)("aside",{className:"me-audit-preview",children:Z?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"me-audit-preview-head",children:[(0,e.jsxs)("div",{className:"me-audit-preview-top",children:[(0,e.jsxs)("span",{className:"me-audit-kind-badge",style:{color:ft[Z.kind]||"#6B7280",borderColor:(ft[Z.kind]||"#6B7280")+"59",background:(ft[Z.kind]||"#6B7280")+"1a"},children:[Ut[Z.kind]||"\u{1F4CE}"," ",t(nt[Z.kind]||"kindKnowledge")]}),(0,e.jsx)("span",{className:`md-chip ${G==="pending"?"md-chip-st-warn":"md-chip-st-bad"}`,children:G==="pending"?Z.kind==="core"?"\u2B50 "+t("coreSuggested"):"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.55},children:Ea(Z.created)})]}),(0,e.jsx)("h3",{children:Z.title}),Z.revision&&(0,e.jsxs)("div",{className:"me-audit-preview-reason",style:{color:"#a78bfa",marginBottom:6},children:["\u270F\uFE0F ",t("auditRevisionFrom"),"\uFF1A",Z.revision.targetTitle||Z.revision.targetPath]}),(0,e.jsxs)("div",{className:"me-audit-preview-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",_t(Z.submittedBy)]}),!!Z.reason&&(0,e.jsxs)("span",{className:"me-audit-preview-reason",children:["\u2691 ",Z.reason]}),(Array.isArray(Z.tags)?Z.tags:[]).slice(0,5).map(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:sa(Za(ba(_e.text).body,Z.title))}}):!_e.loading&&(0,e.jsx)("p",{className:"me-audit-preview-summary",children:Z.summary||""})]}),(0,e.jsxs)("div",{className:"me-audit-preview-actions",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!!V,onClick:()=>W("approved",[Z.path]),children:["\u2713 ",G==="rejected"?t("restore"):Z.kind==="core"?t("approveCore"):t("approve")]}),G==="pending"&&Z.kind!=="core"&&!Z.revision&&(0,e.jsxs)("button",{type:"button",className:"mc-btn me-core-btn",disabled:!!V,onClick:()=>W("approved",[Z.path],{kind:"core"}),children:["\u2B50 ",t("approveAndCore")]}),G==="pending"&&Z.kind==="core"&&(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!V,onClick:()=>W("approved",[Z.path],{kind:"knowledge"}),children:t("approveAsNormal")}),G==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!V,onClick:()=>W("rejected",[Z.path]),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!V,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&W("delete",[Z.path])},children:["\u{1F5D1} ",t("restoreDelete")]})]})]}):(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t(T?"auditNoMatch":"noAuditItems")})})]})]})]})]})}var tr={title:"",date:"",category:"",source:"",url:"",tags:"",pinned:!1,body:""};function Ka(){let t=new Date;return t.getFullYear()+"-"+String(t.getMonth()+1).padStart(2,"0")+"-"+String(t.getDate()).padStart(2,"0")}function Ya(t){try{let a=new URL(String(t||""));return a.protocol==="http:"||a.protocol==="https:"?a.href:""}catch{return""}}function ar(t,a){let n=String(t||"").slice(0,10);if(!n)return a("newsEarlier");if(n===Ka())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 _n({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(w=>(0,e.jsxs)("span",{children:["#",w]},w)),(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:w=>w.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 nr(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 Jt="me.news.lastQuery",da="me.news.prefs",eo="me.news.view",or={model:"\u6A21",product:"\u54C1",research:"\u7814",opensource:"\u6E90",industry:"\u4E1A",policy:"\u7B56",other:"\u8BAF"},rr=new Set(["the","a","an","of","to","for","and","in","on","is","are","with","how","why","new","its","it","as","at","by","from"]);function Qa(t,a){try{let n=localStorage.getItem(t);if(n===null)return a;try{return JSON.parse(n)}catch{return n}}catch{return a}}function Pt(t,a){try{localStorage.setItem(t,JSON.stringify(a))}catch{}}function Ua(t,a=""){let n=Qa(t,a);return typeof n=="string"?n:a}function Un(){let t=Qa(eo,null);return t&&typeof t=="object"?t:{}}function Va(){return{types:{},sources:{},terms:{},opens:0,updatedAt:0}}function ir(){let t=Qa(da,null);return!t||typeof t!="object"?Va():{...Va(),...t,types:t.types||{},sources:t.sources||{},terms:t.terms||{}}}function to(t){let a=[];for(let n of String(t||"").toLowerCase().split(/[^0-9a-z\u4e00-\u9fff]+/))!n||n.length<2||rr.has(n)||a.push(n);return a}function Sa(t,a,n){a&&(t[a]=Math.min(60,(Number(t[a])||0)+n))}function sr(t,a,n){let i={...n,types:{...n.types},sources:{...n.sources},terms:{...n.terms}};return t&&(Sa(i.types,t.type,a),Sa(i.sources,t.sourceId,a),to(t.title).slice(0,6).forEach(s=>Sa(i.terms,s,1)),i.opens=(Number(n.opens)||0)+1),i.updatedAt=Date.now(),i}function $n(t,a){let n={...t,terms:{...t.terms}};return to(a).forEach(i=>Sa(n.terms,i,3)),n.updatedAt=Date.now(),n}function lr(t){let a=0;for(let n of String(t||""))a=(a*31+n.charCodeAt(0))%360;return a}function cr(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 dr=/(帮我|请|麻烦|推送|订阅|关注|跟踪|每天|每日|定时|最新|热门|看看|给我|关于|相关)/;function pr(t){let a=String(t||"").trim();return a?dr.test(a)||a.split(/\s+/).length>=4:!1}function qn(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[w,u]of Object.entries(a.terms))d.includes(w)&&(s+=Math.min(8,Number(u)||0)*.9);let g=String(n||"").trim().toLowerCase();if(g)for(let w of g.split(/\s+/).filter(Boolean))String(t.title||"").toLowerCase().includes(w)?s+=16:d.includes(w)&&(s+=8);return t.followId&&(s+=10),s}function mr({t,mode:a,version:n}){let[i,s]=(0,r.useState)([]),[d,g]=(0,r.useState)([]),[w,u]=(0,r.useState)(!0),[k,c]=(0,r.useState)(0),[y,x]=(0,r.useState)([]),[T,_]=(0,r.useState)(""),[q,R]=(0,r.useState)(null),[L,U]=(0,r.useState)(()=>Ua(Jt)),[V,me]=(0,r.useState)(()=>Ua(Jt).trim()),[Q,P]=(0,r.useState)(""),[G,$]=(0,r.useState)(()=>{let f=Un();return typeof f.lang=="string"?f.lang:"zh"}),[B,X]=(0,r.useState)(()=>Un().sort==="time"?"time":"rec"),[ce,he]=(0,r.useState)(ir),[re,Ue]=(0,r.useState)(!1),[W,Be]=(0,r.useState)([]),[v,ze]=(0,r.useState)([]),[te,Z]=(0,r.useState)(null),[_e,Fe]=(0,r.useState)(!1),[oe,F]=(0,r.useState)(""),z=(f,C=!0)=>{R({msg:f,ok:C}),setTimeout(()=>R(null),3200)},S=(0,r.useRef)(!1),I=(0,r.useRef)(Ua(Jt).trim());(0,r.useEffect)(()=>{let f=setTimeout(()=>{let C=L.trim();me(C),S.current&&(Pt(Jt,C),!(!C||C===I.current)&&(I.current=C,he(Te=>{let $e=$n(Te,C);return Pt(da,$e),$e})))},260);return()=>clearTimeout(f)},[L]),(0,r.useEffect)(()=>{Pt(eo,{lang:G,sort:B})},[G,B]),(0,r.useEffect)(()=>{Ue(!0);let f=setTimeout(()=>Ue(!1),170);return()=>clearTimeout(f)},[Q,G,V,B]);let ie=(0,r.useCallback)(async()=>{u(!0),_("");try{let f=new URLSearchParams({period:a==="month"?"month":"today",lang:"all"});f.set("follows","1");let C=await fetch(Y+"/news/feed?"+f.toString()).then(Te=>Te.json());if(!C||!C.ok)throw new Error(C&&C.error||t("newsFeedError"));s(C.items||[]),Array.isArray(C.follows)&&Be(C.follows),g(C.types||[]),c(Number(C.fetchedAt)||0),x(C.errors||[])}catch(f){let C=f&&f.message||t("newsFeedError");_(C),z(C,!1)}finally{u(!1)}},[a,t]);(0,r.useEffect)(()=>{ie()},[n,ie]);let Ie=(0,r.useCallback)(async()=>{try{let f=await fetch(Y+"/news/follows").then(C=>C.json());f&&f.ok&&(Be(f.follows||[]),ze(f.domains||[]))}catch{}},[]);(0,r.useEffect)(()=>{Ie()},[n,Ie]);let je=async()=>{u(!0);try{let f=await fetch(Y+"/news/feed/refresh",{method:"POST"}).then(C=>C.json());if(!f||!f.ok)throw new Error(f&&f.error||t("newsFeedError"));await ie(),z(t("newsUpdatedAt")+" "+new Date().toLocaleTimeString())}catch(f){let C=f&&f.message||t("newsFeedError");_(C),z(C,!1),u(!1)}},de=f=>(d.find(C=>C.id===f)||{}).label||t("all"),m=(i||[]).filter(f=>!G||f.lang===G||f.followId),K={};for(let f of m)K[f.type]=(K[f.type]||0)+1;let E=Q?m.filter(f=>f.type===Q):m,ue=pr(V);if(V&&!ue){let f=V.toLowerCase().split(/\s+/).filter(Boolean);E=E.filter(C=>{let Te=[C.title,C.summary,C.source,de(C.type)].join(" ").toLowerCase();return f.every($e=>Te.includes($e))})}oe&&(E=E.filter(f=>f.followId===oe));let Me=f=>(Number(f.points)||0)+(Number(f.comments)||0)*2,we=a==="month",ye=we?E.filter(f=>(f.points||0)>0):[],j=we&&ye.length>0,se=new Map;j&&ye.slice().sort((f,C)=>(C.points||0)-(f.points||0)||(C.comments||0)-(f.comments||0)).forEach((f,C)=>se.set(f.id||f.url||f.title,C+1)),E=E.slice().sort((f,C)=>B==="time"?(C.publishedAt||0)-(f.publishedAt||0):we&&j?(C.points||0)-(f.points||0)||(C.comments||0)-(f.comments||0)||(C.publishedAt||0)-(f.publishedAt||0):qn(C,ce,V)-qn(f,ce,V));let Ce=Object.keys(ce.types||{}).sort((f,C)=>(ce.types[C]||0)-(ce.types[f]||0)).slice(0,3),pe=Object.keys(ce.terms||{}).sort((f,C)=>(ce.terms[C]||0)-(ce.terms[f]||0)).slice(0,4),ot=!!V||Ce.length>0||pe.length>0,ht=f=>{S.current=!0;let C=String(f??"").trim();me(C),Pt(Jt,C),!(!C||C===I.current)&&(I.current=C,he(Te=>{let $e=$n(Te,C);return Pt(da,$e),$e}))},qe=()=>{S.current=!1,I.current="",P(""),$(""),U(""),me(""),Pt(Jt,"")},ct=f=>he(C=>{let Te=sr(f,4,C);return Pt(da,Te),Te}),tt=()=>{let f=Va();Pt(da,f),Pt(Jt,""),I.current="",S.current=!1,he(f),U(""),me("")},yt=async()=>{let f=L.trim();if(!f){z(t("newsFollowNoQuery"),!1);return}Fe(!0);try{let C=await fetch(Y+"/news/follows/preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:f})}).then(Te=>Te.json());if(!C||!C.ok)throw new Error(C&&C.error||t("newsFollowFail"));ze(C.domainsEnum||v),Z({text:f,query:C.parsed.query,label:C.parsed.label,domains:C.parsed.domains,sourceIds:C.parsed.sourceIds||[],notes:C.parsed.notes||[]})}catch(C){z(String(C&&C.message||C),!1)}finally{Fe(!1)}},Ge=(f,C)=>Z(Te=>{if(!Te)return Te;let $e=new Set(Te.domains);return C?$e.add(f):$e.delete(f),{...Te,domains:[...$e]}}),It=async()=>{if(te){Fe(!0);try{let f=await fetch(Y+"/news/follows",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:te.query,domains:te.domains,label:te.label,sourceIds:te.sourceIds||[]})}).then(Te=>Te.json());if(!f||!f.ok)throw new Error(f&&f.error||t("newsFollowFail"));let C=te.label;Z(null),z((f.duplicate?t("newsFollowExists"):t("newsFollowAdded"))+"\uFF1A"+C),await Ie(),await ie()}catch(f){z(String(f&&f.message||f),!1)}finally{Fe(!1)}}},ke=async f=>{try{let C=await fetch(Y+"/news/follows?id="+encodeURIComponent(f),{method:"DELETE"}).then(Te=>Te.json());if(!C||!C.ok)throw new Error(C&&C.error||t("newsFollowFail"));oe===f&&F(""),z(t("newsFollowRemoved")),await Ie(),await ie()}catch(C){z(String(C&&C.message||C),!1)}},b=(f,C)=>{let Te=Ya(f.url),$e=de(f.type),o=Ya(f.image),dt=j&&se.get(f.id||f.url||f.title)||0,xt=j&&dt>0&&dt<=3;return(0,e.jsxs)("a",{className:"mc-news-tile",style:{"--i":Math.min(C,14)},href:Te||void 0,target:Te?"_blank":void 0,rel:"noopener noreferrer",onClick:()=>ct(f),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:pt=>{let Nt=pt.currentTarget;Nt.style.display="none",Nt.nextElementSibling&&(Nt.nextElementSibling.style.display="grid")}}):null,(0,e.jsxs)("span",{className:"mc-news-tile-gen",style:{"--hue":lr(f.title),display:o?"none":"grid"},children:[(0,e.jsx)("b",{children:or[f.type]||"\u8BAF"}),(0,e.jsx)("small",{children:$e}),(0,e.jsxs)("em",{children:[(0,e.jsx)("i",{children:cr(f.source)}),f.source]})]}),(0,e.jsx)("span",{className:"mc-news-tile-badge"+(xt?" hot":""),children:dt?"#"+dt:$e}),(0,e.jsx)("span",{className:"mc-news-tile-time",children:nr(f.publishedAt,t)})]}),(0,e.jsxs)("span",{className:"mc-news-tile-body",children:[(0,e.jsx)("span",{className:"mc-news-tile-title",children:f.title}),f.summary?(0,e.jsx)("span",{className:"mc-news-tile-summary",children:f.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:f.source}),f.followLabel?(0,e.jsxs)("span",{className:"mc-news-tile-follow",children:["\u{1F514} ",f.followLabel]}):null,dt?(0,e.jsxs)("span",{children:["\xB7 \u{1F525} ",t("newsHeat")," ",Me(f)]}):null,(0,e.jsxs)("span",{className:"mc-news-tile-open",children:[t("newsOriginal")," \u2197"]})]})]})]},f.id||f.url||f.title)},p=E.filter(f=>f.followId),le=p.slice(0,4),De=oe?E:le.length?E.filter(f=>!f.followId):E;return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(Ma,{toast:q}),(0,e.jsxs)("div",{className:"mc-news-hero",children:[(0,e.jsx)("div",{className:"mc-news-hero-eye",children:t("newsHeroEye")}),(0,e.jsxs)("div",{className:"mc-news-hero-search",children:[(0,e.jsx)("span",{"aria-hidden":"true",style:{fontSize:15,opacity:.75},children:"\u{1F50E}"}),(0,e.jsx)("input",{type:"text",value:L,onChange:f=>{S.current=!0,U(f.target.value)},onKeyDown:f=>{f.key==="Enter"&&ht(L)},placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),L?(0,e.jsx)("button",{type:"button",className:"mc-news-hero-clear",title:t("cancel"),onClick:()=>{U(""),ht("")},children:"\u2715"}):null,(0,e.jsx)("button",{type:"button",className:"mc-news-hero-go",onClick:()=>ht(L),children:t("newsSearchGo")}),L.trim()?(0,e.jsxs)("button",{type:"button",className:"mc-news-hero-follow",disabled:_e,onClick:yt,title:t("newsFollowPreview"),children:["\uFF0B ",t("newsFollow")]}):null]}),(0,e.jsx)("div",{className:"mc-news-hero-hint",children:t(ue?"newsIntentHint":"newsHeroHint")})]}),te?(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:te.label}),te.query?(0,e.jsxs)("span",{className:"draft-q",children:["\xB7 \u300C",te.query,"\u300D"]}):null,(0,e.jsxs)("div",{className:"draft-doms",children:[(0,e.jsx)("span",{className:"draft-lbl",children:t("newsFollowDomains")}),v.map(f=>(0,e.jsxs)("label",{className:"draft-opt",title:f.hint||"",children:[(0,e.jsx)("input",{type:"checkbox",checked:te.domains.includes(f.id),onChange:C=>Ge(f.id,C.target.checked)}),(0,e.jsx)("span",{children:f.label})]},f.id))]}),te.notes.map((f,C)=>(0,e.jsxs)("div",{className:"draft-note",children:["\xB7 ",f]},C))]}),(0,e.jsxs)("div",{className:"draft-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Z(null),children:t("cancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:_e||!te.domains.length,onClick:It,children:t("newsFollowConfirm")})]})]}):null,W.length>0?(0,e.jsx)("div",{className:"mc-news-follows",children:W.map(f=>(0,e.jsxs)("span",{className:"mc-news-follow-chip"+(oe===f.id?" on":""),children:[(0,e.jsxs)("button",{type:"button",className:"chip-main",onClick:()=>F(C=>C===f.id?"":f.id),title:(f.domains||[]).join(" / "),children:["\u{1F514} ",f.label,(0,e.jsx)("i",{children:f.count||0})]}),(0,e.jsx)("button",{type:"button",className:"chip-x",title:t("delete"),"aria-label":t("delete"),onClick:()=>ke(f.id),children:"\u2715"})]},f.id))}):null,ot?(0,e.jsxs)("div",{className:"mc-news-pref",children:[(0,e.jsxs)("span",{children:["\u{1F3AF} ",t("newsPersonalized")]}),V?(0,e.jsxs)("span",{children:["\xB7 ",t("newsLastQuery")," ",(0,e.jsx)("b",{children:V})]}):null,pe.length>0?(0,e.jsxs)("span",{children:["\xB7 ",pe.join(" / ")]}):null,Ce.length>0?(0,e.jsxs)("span",{children:["\xB7 ",Ce.map(de).join(" / ")]}):null,(0,e.jsx)("span",{className:"mc-news-pref-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:tt,children:t("newsResetPrefs")})})]}):null,(0,e.jsxs)("div",{className:"mc-news-feed-toolbar",children:[(0,e.jsxs)("div",{className:"mc-news-pills",children:[(0,e.jsxs)("button",{type:"button",className:"mc-news-pill"+(Q===""?" on":""),onClick:()=>P(""),children:[t("all"),(0,e.jsx)("span",{className:"mc-news-pill-count",children:m.length})]}),d.map(f=>K[f.id]?(0,e.jsxs)("button",{type:"button",className:"mc-news-pill"+(Q===f.id?" on":""),onClick:()=>P(Q===f.id?"":f.id),children:[f.label,(0,e.jsx)("span",{className:"mc-news-pill-count",children:K[f.id]})]},f.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"+(G==="zh"?" active":""),onClick:()=>$("zh"),children:t("newsLangZh")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(G==="en"?" active":""),onClick:()=>$("en"),children:t("newsLangEn")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(G===""?" active":""),onClick:()=>$(""),children:t("newsLangAll")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(B==="rec"?" active":""),onClick:()=>X("rec"),children:t("newsSortRec")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(B==="time"?" active":""),onClick:()=>X("time"),children:t("newsSortTime")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:w,onClick:je,children:t(w?"newsLoading":"newsFeedRefresh")})]})]}),(0,e.jsxs)("div",{className:"mc-news-feed-meta",style:{margin:"0 0 8px"},children:[k?t("newsUpdatedAt")+" "+new Date(k).toLocaleTimeString():"",w?"":" \xB7 "+E.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(j?"newsEnRanking":"newsZhArchive")}),T&&!w&&(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 ",T]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:je,children:t("newsRetry")})]}),y.length>0&&(0,e.jsxs)("div",{className:"mc-news-feed-warn",children:["\u26A0 ",t("newsPartialFail"),"\uFF1A",y.slice(0,2).join("\uFF1B")]}),w?(0,e.jsxs)("div",{className:"mc-card mc-news-feed-empty mc-news-loading-card",role:"status","aria-live":"polite",children:[(0,e.jsx)(ma,{}),(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:je,children:t("newsFeedRefresh")})]}):E.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:qe,children:t("newsClearFilters")})]}):(0,e.jsxs)(e.Fragment,{children:[!oe&&le.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"+(re?" is-swapping":""),children:le.map((f,C)=>b(f,C))})]}):null,(0,e.jsx)("div",{className:"mc-news-grid"+(re?" is-swapping":""),children:De.map((f,C)=>b(f,C))})]})]})}function ur({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)(gr,{t,version:a,onUnreadChange:n}):(0,e.jsx)(mr,{t,mode:i,version:a})]})}function gr({t,version:a,onUnreadChange:n}){let[i,s]=(0,r.useState)([]),[d,g]=(0,r.useState)([]),[w,u]=(0,r.useState)({all:0,unread:0}),[k,c]=(0,r.useState)(""),[y,x]=(0,r.useState)(""),[T,_]=(0,r.useState)(""),[q,R]=(0,r.useState)(!1),[L,U]=(0,r.useState)(""),[V,me]=(0,r.useState)(null),[Q,P]=(0,r.useState)(null),[G,$]=(0,r.useState)(!1),[B,X]=(0,r.useState)(""),[ce,he]=(0,r.useState)(null),re=(F,z=!0)=>{he({msg:F,ok:z}),setTimeout(()=>he(null),2600)};(0,r.useEffect)(()=>{let F=setTimeout(()=>x(k.trim()),220);return()=>clearTimeout(F)},[k]);let Ue=(0,r.useCallback)(async()=>{let F=new URLSearchParams;y&&F.set("q",y),T&&F.set("category",T),q&&F.set("unread","1");try{let z=await fetch(Y+"/news?"+F.toString()).then(S=>S.json());if(!z||!z.ok)throw new Error(z&&z.error||"load failed");s(z.items||[]),g(z.categories||[]),u(z.counts||{all:0,unread:0}),n&&n(Number((z.counts||{}).unread)||0)}catch{re(t("newsSaveFail"),!1)}},[y,T,q,n,t]);(0,r.useEffect)(()=>{Ue()},[a,Ue]);let W=async F=>{U(F.id);try{let z=await fetch(Y+"/news/item?id="+encodeURIComponent(F.id)).then(S=>S.json());if(!z||!z.ok)throw new Error(z&&z.error||"load failed");me(z.item),z.item.read||await Be(F.id,!0)}catch{re(t("newsSaveFail"),!1)}},Be=async(F,z)=>{try{let S=await fetch(Y+"/news/read",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:F,read:z})}).then(I=>I.json());if(!S||!S.ok)throw new Error(S&&S.error||"read failed");me(I=>I&&I.id===F?{...I,read:!!z}:I),await Ue()}catch{re(t("newsSaveFail"),!1)}},v=async F=>{if($(!1),F){let z=F;if(!z.body)try{let S=await fetch(Y+"/news/item?id="+encodeURIComponent(z.id)).then(I=>I.json());S&&S.ok&&(z=S.item)}catch{}P({id:z.id,title:z.title||"",date:z.date||Ka(),category:z.category||"",source:z.source||"",url:z.url||"",tags:(z.tags||[]).join(", "),pinned:!!z.pinned,body:z.body||"",created:z.created||""})}else P({...tr,date:Ka()})},ze=async()=>{if(Q){if(!String(Q.title||"").trim()||!String(Q.body||"").trim()){re(t("newsSaveFail"),!1);return}X("save");try{let F={id:Q.id||void 0,title:Q.title,date:Q.date,category:Q.category,source:Q.source,url:Q.url,tags:String(Q.tags||"").split(",").map(S=>S.trim()).filter(Boolean),pinned:!!Q.pinned,body:Q.body,created:Q.created},z=await fetch(Y+"/news/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}).then(S=>S.json());if(!z||!z.ok)throw new Error(z&&z.error||"save failed");P(null),U(z.item.id),me(z.item),await Ue(),re(t("newsSaved"))}catch(F){re(F&&F.message||t("newsSaveFail"),!1)}finally{X("")}}},te=async F=>{if(window.confirm(t("newsDeleteConfirm"))){X("delete");try{let z=await fetch(Y+"/news/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:F.id})}).then(S=>S.json());if(!z||!z.ok)throw new Error(z&&z.error||"delete failed");L===F.id&&(U(""),me(null)),await Ue(),re(t("newsDeleted"))}catch{re(t("newsSaveFail"),!1)}finally{X("")}}},Z=i.filter(F=>F.pinned),_e=i.filter(F=>!F.pinned),Fe=V?Ya(V.url):"",oe="";return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(Ma,{toast:ce}),(0,e.jsxs)("div",{className:"mc-news-toolbar",children:[(0,e.jsxs)("span",{className:"mc-news-feed-meta",style:{marginLeft:0},children:[w.all," ",t("newsCountUnit")," \xB7 ",w.unread," ",t("newsUnread")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>v(null),children:["\uFF0B ",t("newsNew")]}),(0,e.jsx)("input",{className:"mc-news-search",type:"text",value:k,onChange:F=>c(F.target.value),placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(T===""?" active":""),onClick:()=>_(""),children:t("all")}),d.map(F=>(0,e.jsx)("button",{type:"button",className:"mc-chip"+(T===F?" active":""),onClick:()=>_(z=>z===F?"":F),children:F},F)),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(q?" active":""),onClick:()=>R(F=>!F),children:t("newsUnreadOnly")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Ue(),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(k||T||q?"newsNoMatch":"newsEmpty"),!k&&!T&&!q&&(0,e.jsx)("div",{style:{marginTop:10},children:(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>v(null),children:["\uFF0B ",t("newsNew")]})})]}):(0,e.jsxs)(e.Fragment,{children:[Z.length>0&&(0,e.jsxs)("div",{className:"mc-news-group",children:[(0,e.jsxs)("div",{className:"mc-news-group-label",children:["\u{1F4CC} ",t("newsPinned")]}),Z.map(F=>(0,e.jsx)(_n,{item:F,t,active:L===F.id,onOpen:W,onEdit:z=>v(z),onToggleRead:z=>Be(z.id,!z.read),onDelete:te},F.id))]}),(0,e.jsx)("div",{className:"mc-news-group",children:_e.map(F=>{let z=ar(F.date,t),S=z!==oe;return oe=z,(0,e.jsxs)(r.default.Fragment,{children:[S&&(0,e.jsx)("div",{className:"mc-news-group-label",children:z}),(0,e.jsx)(_n,{item:F,t,active:L===F.id,onOpen:W,onEdit:I=>v(I),onToggleRead:I=>Be(I.id,!I.read),onDelete:te})]},F.id)})})]})}),V&&(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:V.category||t("newsCategoryField")}),V.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:()=>{me(null),U("")},title:t("close"),children:"\u2715"})]}),(0,e.jsx)("h2",{children:V.title}),(0,e.jsxs)("div",{className:"mc-news-reader-meta",children:[(0,e.jsx)("span",{children:V.date||""}),V.source&&(0,e.jsxs)("span",{children:["\xB7 ",V.source]}),(0,e.jsxs)("span",{children:["\xB7 ",V.read?t("newsRead"):t("newsUnread")]}),(V.tags||[]).map(F=>(0,e.jsxs)("span",{children:["#",F]},F))]}),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:sa(Za(V.body||"",V.title))}}),(0,e.jsxs)("div",{className:"mc-news-reader-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>v(V),children:t("newsEdit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Be(V.id,!V.read),children:V.read?t("newsMarkUnread"):t("newsMarkRead")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:B==="delete",onClick:()=>te(V),children:t("delete")})]})]})]}),Q&&(0,e.jsx)("div",{className:"me-overlay",onClick:()=>P(null),children:(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:860,width:"94vw",maxHeight:"90vh"},onClick:F=>F.stopPropagation(),children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--dsw-alias-border-l1, #e5e7eb)"},children:[(0,e.jsx)("b",{children:Q.id?t("newsEdit"):t("newsNew")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>P(null),children:t("close")})]}),(0,e.jsxs)("div",{style:{padding:16,overflow:"auto",maxHeight:"calc(90vh - 60px)"},children:[(0,e.jsxs)("div",{className:"mc-news-form",children:[(0,e.jsxs)("label",{className:"full",children:[(0,e.jsx)("span",{children:t("newsTitleField")}),(0,e.jsx)("input",{className:"mc-news-input",value:Q.title,onChange:F=>P(z=>({...z,title:F.target.value})),placeholder:t("newsTitlePlaceholder")})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsDateField")}),(0,e.jsx)("input",{className:"mc-news-input",type:"date",value:Q.date||"",onChange:F=>P(z=>({...z,date:F.target.value}))})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsCategoryField")}),(0,e.jsx)("input",{className:"mc-news-input",list:"me-news-categories",value:Q.category||"",onChange:F=>P(z=>({...z,category:F.target.value}))})]}),(0,e.jsx)("datalist",{id:"me-news-categories",children:d.map(F=>(0,e.jsx)("option",{value:F},F))}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsSourceField")}),(0,e.jsx)("input",{className:"mc-news-input",value:Q.source||"",onChange:F=>P(z=>({...z,source:F.target.value}))})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsUrlField")}),(0,e.jsx)("input",{className:"mc-news-input",value:Q.url||"",onChange:F=>P(z=>({...z,url:F.target.value})),placeholder:"https://\u2026"})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsTagsField")}),(0,e.jsx)("input",{className:"mc-news-input",value:Q.tags||"",onChange:F=>P(z=>({...z,tags:F.target.value}))})]}),(0,e.jsxs)("label",{style:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:18},children:[(0,e.jsx)("input",{type:"checkbox",checked:!!Q.pinned,onChange:F=>P(z=>({...z,pinned:F.target.checked}))}),(0,e.jsx)("span",{children:t("newsPinField")})]}),(0,e.jsxs)("label",{className:"full",children:[(0,e.jsx)("span",{children:t("newsBodyField")}),(0,e.jsx)("textarea",{className:"mc-news-textarea",value:Q.body||"",onChange:F=>P(z=>({...z,body:F.target.value})),placeholder:t("newsBodyPlaceholder")})]}),G&&(0,e.jsx)("div",{className:"full mc-news-preview",children:(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:sa(Q.body||"")}})})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",marginTop:14},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>$(F=>!F),children:t(G?"newsEditBody":"newsPreview")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>P(null),children:t("cancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:B==="save",onClick:ze,children:t(B==="save"?"newsSaving":"newsSave")})]})]})]})})]})}function fr({t,onReload:a,version:n}){let[i,s]=(0,r.useState)([]),[d,g]=(0,r.useState)(""),[w,u]=(0,r.useState)(null),k=(x,T=!0)=>{u({msg:x,ok:T}),setTimeout(()=>u(null),3200)},c=(0,r.useCallback)(async()=>{try{let x=await fetch(`${Y}/recycle/list`).then(T=>T.json());x.ok&&s(x.items||[])}catch{}},[]);(0,r.useEffect)(()=>{c()},[n,c]);let y=async(x,T)=>{let _=(i.find(q=>q.path===T)||{}).title||T;g(x+T);try{let R=await fetch(Y+(x==="restore"?"/recycle/restore":"/recycle/purge")+"?path="+encodeURIComponent(T)),L=await R.json().catch(()=>null);await c(),a&&a(),R.ok&&(!L||L.ok!==!1)?k(t(x==="restore"?"toastRestored":"toastPurged")+"\uFF1A"+_):k(t("toastFailed")+"\uFF1A"+(L&&L.error||"HTTP "+R.status),!1)}catch(q){k(t("toastFailed")+"\uFF1A"+String(q&&q.message||q),!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)(Ma,{toast:w}),(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 x=await fetch(Y+"/recycle/purge-all",{method:"POST"}),T=await x.json().catch(()=>null);await c(),a&&a(),x.ok&&(!T||T.ok!==!1)?k(t("toastPurgeAll").split("{n}").join(String(T&&T.purged!=null?T.purged:i.length)),!0):k(t("toastFailed")+"\uFF1A"+(T&&T.error||"HTTP "+x.status),!1)}catch(x){k(t("toastFailed")+"\uFF1A"+String(x&&x.message||x),!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(x=>{let T=ft[x.kind]||"#6B7280";return(0,e.jsxs)("div",{className:"mc-v5-recycle-row",children:[(0,e.jsx)("span",{className:"mc-v5-recycle-tile",style:{color:T,background:T+"18",borderColor:T+"38"},children:Ut[x.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"mc-v5-recycle-copy",children:[(0,e.jsx)("b",{children:x.title}),(0,e.jsxs)("span",{children:[t(nt[x.kind]||"kindKnowledge")," \xB7 ",x.status==="rejected"?t("rejected"):t("bucketDeleted")," \xB7 ",xa(x.deletedAt||x.updated)||"-"]})]}),(0,e.jsxs)("div",{className:"mc-v5-recycle-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!d,title:x.status==="rejected"?t("restoreToQueue"):t("restore"),onClick:()=>y("restore",x.path),children:x.status==="rejected"?t("restoreToQueue"):t("restore")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!d,onClick:()=>{window.confirm(t("purgeConfirm"))&&y("purge",x.path)},children:t("purge")})]})]},x.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 Za=(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(`
|
|
1053
|
-
`)},br=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 w=g[1].length;w<=3&&a.push({id:"md-h-"+i,level:w,text:g[2].replace(/[#*_`>\[\]()]/g,"").replace(/\s+/g," ").trim()})}return a},en=t=>{let a=String(t.summary||"").replace(/[#>*_`]/g," ").replace(/\s+/g," ").trim();return a.length>150?a.slice(0,148)+"\u2026":a},ao=t=>{let a=String(t.summary||"").toLowerCase();return/决策|结论|决定|decision/.test(a)?"insightDecision":/根因|原因|root cause/.test(a)?"insightRoot":/教训|避免|lesson/.test(a)?"insightLesson":"insightSummary"},no=({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 w=-Math.PI/2+g*Math.PI*2/i,u=g%2?13:16;return[20+Math.cos(w)*u,20+Math.sin(w)*u]});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],w)=>(0,e.jsx)("line",{x1:"20",y1:"20",x2:d,y2:g,stroke:a,strokeOpacity:".35"},"l"+w)),s.map(([d,g],w)=>(0,e.jsx)("circle",{cx:d,cy:g,r:w%2?2.2:1.8,fill:a,fillOpacity:w%2?.8:.55},"c"+w)),(0,e.jsx)("circle",{cx:"20",cy:"20",r:"2.6",fill:a})]})},hr=({card:t,t:a,onOpen:n,query:i,onDelete:s,onTagClick:d,pinned:g,onPin:w,onCore:u,links:k})=>{let c=ft[t.kind]||ft.other,y=Number(k??t.links??t.weight??0),x=_a(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:c,background:c+"18",borderColor:c+"38"},children:Ut[t.kind]||"\u{1F4CE}"}),(0,e.jsx)("span",{className:"mc-v5-card-kind-name",children:t.kind==="core"?"\u2B50 "+a("kindCore"):a(nt[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")]}),Rr(t.updated)&&(0,e.jsx)("span",{className:"mc-new",children:a("newBadge")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{className:"mc-v5-card-time",children:Et(t.updated)}),u&&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:T=>{T.stopPropagation(),u(t.path,t.kind==="core"?"knowledge":"core")},children:t.kind==="core"?"\u2B50 "+a("coreShort"):"\u2606 "+a("setCoreShort")}),w&&(0,e.jsx)("button",{type:"button",className:`mc-v5-pin${g?" on":""}`,title:a(g?"unpinCard":"pinCard"),"aria-label":a(g?"unpinCard":"pinCard"),onClick:T=>{T.stopPropagation(),w(t.path)},children:"\u{1F4CC}"})]}),(0,e.jsx)("h4",{className:"mc-v5-card-title",children:i?qa(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(ao(t))}),(0,e.jsx)("span",{className:"mc-v5-card-lead",children:i?qa(t.summary||"",i):en(t)})]}),i&&(()=>{let T=fn(t.body||"",i);return T?(0,e.jsx)("p",{className:"mc-snippet",children:qa(T,i)}):null})(),_a(t).length>0&&(0,e.jsxs)("div",{className:"mc-tags mc-v5-card-tags",children:[_a(t).slice(0,2).map(T=>(0,e.jsxs)("button",{type:"button",className:"mc-tag mc-tag-click",title:T,onClick:_=>{_.stopPropagation(),d&&d(T)},children:["#",T]},T)),x.length>2&&(0,e.jsxs)("span",{className:"mc-tag more",children:["+",x.length-2]})]}),(0,e.jsxs)("footer",{className:"mc-v5-card-foot",children:[y>0&&(0,e.jsxs)("span",{className:"mc-v5-conn",children:[(0,e.jsx)(no,{n:y,color:c})," ",(0,e.jsx)("b",{children:y})," ",a("links")]}),(0,e.jsxs)("span",{className:"mc-v5-author",children:["\u{1F916} ",_t(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:T=>{T.stopPropagation(),window.confirm(a("deleteConfirm"))&&s&&s(t.path)},children:"\u{1F5D1}"})]})]})};function yr({t,tab:a,onReload:n,version:i}){let[s,d]=(0,r.useState)(null),[g,w]=(0,r.useState)(""),[u,k]=(0,r.useState)(null),[c,y]=(0,r.useState)(null),[x,T]=(0,r.useState)(null),[_,q]=(0,r.useState)(null),[R,L]=(0,r.useState)(null),[U,V]=(0,r.useState)(null),me=(0,r.useCallback)(async()=>{B("align");try{let m=await fetch(Y+"/align").then(K=>K.json());m&&m.findings?V(m):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{B("")}},[t]),Q=async()=>{if(window.confirm(t("alignFixConfirm"))){B("alignfix");try{let m=await fetch(Y+"/setup-run",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(K=>K.json());m&&m.ok?(notify(t("alignFixed")),await me()):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{B("")}}},[P,G]=(0,r.useState)([]),[$,B]=(0,r.useState)(""),[X,ce]=(0,r.useState)(!1),he=(0,r.useCallback)(async()=>{if(!(!u||!u.merge||!u.merge.length)&&window.confirm(t("mergeAllConfirm"))){B("merge");try{let m={},K=ye=>m[ye]===void 0?ye:m[ye]=K(m[ye]),E=(ye,j)=>{m[K(ye)]=K(j)},ue=new Set;for(let ye of u.merge)ue.add(ye.a.path),ue.add(ye.b.path),E(ye.a.path,ye.b.path);let Me={};for(let ye of ue){let j=K(ye);(Me[j]=Me[j]||[]).push(ye)}let we=0;for(let ye of Object.values(Me)){if(ye.length<2)continue;(await fetch(`${Y}/merge?paths=${encodeURIComponent(ye.join(","))}`).then(se=>se.json())).ok&&we++}await re(),n&&n()}catch{}B("")}},[u,re,n,t]);async function re(){try{let m=await Promise.all([fetch(`${Y}/stats`),fetch(`${Y}/budget`),fetch(`${Y}/capture-log`),fetch(`${Y}/cards?status=all&limit=30&agent=${pa}`),fetch(`${Y}/overview`),fetch(`${Y}/ledger?days=7`)]),[K,E,ue,Me,we,ye]=await Promise.all(m.map(j=>j.json()));K&&K.ok&&d(K),E&&E.ok&&y(E),ue&&ue.ok&&T(ue),Me&&Me.ok&&G(Me.cards||[]),we&&we.ok&&q({db:we.db,backups:we.backups,total:we.total,version:we.version,degraded:we.degraded===!0}),L(ye&&ye.ok?ye:{ok:!1,error:ye&&ye.error||""}),w(!K||!K.ok?t("adminLoadFail"):"")}catch{w(t("adminLoadFail"))}}let Ue=(0,r.useCallback)(async()=>{B("scan");try{let m=await fetch(`${Y}/optimize`).then(K=>K.json());m.ok&&k(m)}catch{w(t("adminLoadFail"))}finally{B("")}},[t]),[W,Be]=(0,r.useState)(null),v=(0,r.useCallback)(async()=>{B("refine");try{let m=await fetch(`${Y}/refine-scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:8})}).then(K=>K.json());m&&m.ok?Be(m):notify(m&&m.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{B("")}},[t]),ze=async(m,K)=>{if(!(K==="merge"&&!window.confirm(t("mergeConfirm")))){B("refineapply");try{let E=await fetch(`${Y}/refine-apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({a:m.a.path,b:m.b.path,action:K,relation:m.relation})}).then(ue=>ue.json());E&&E.ok?(notify(t("refineApplied")),Be(ue=>ue&&{...ue,findings:(ue.findings||[]).filter(Me=>!(Me.a.path===m.a.path&&Me.b.path===m.b.path))}),await re(),n&&n()):notify(E&&E.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{B("")}}},[te,Z]=(0,r.useState)(null),_e=(0,r.useCallback)(async()=>{B("junk");try{let m=await fetch(`${Y}/refine-junk`).then(K=>K.json());m&&m.ok?Z(m.items||[]):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{B("")}},[t]),Fe=async m=>{if(m.length&&window.confirm(t("junkRecycleAllConfirm"))){B("junkpurge");try{let K=await fetch(`${Y}/refine-junk-purge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:m})}).then(E=>E.json());K&&K.removed?(notify(t("junkDone")+"\uFF1A"+K.removed.length+(K.failed?.length?"\uFF08\u5931\u8D25 "+K.failed.length+"\uFF09":"")),Z(E=>E&&E.filter(ue=>!K.removed.includes(ue.path))),await re(),n&&n()):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{B("")}}},[oe,F]=(0,r.useState)(null),z=(0,r.useCallback)(async()=>{B("goals");try{let m=await fetch(Y+"/refine-goals",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:30})}).then(K=>K.json());m&&m.ok?F(m):notify(m&&m.error||t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{B("")}},[t]),S=async m=>{B("goalskeep");try{let K=await fetch(Y+"/refine-goals-keep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:m.members.map(E=>E.path)})}).then(E=>E.json());K&&K.ok?(notify(t("goalDone")),F(E=>E&&{...E,clusters:(E.clusters||[]).filter(ue=>ue.goal!==m.goal)})):notify(t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{B("")}},I=async m=>{if(window.confirm(t("mergeConfirm"))){B("goalsmerge");try{let K=await fetch(Y+"/merge?paths="+encodeURIComponent(m.members.map(E=>E.path).join(","))).then(E=>E.json());K&&K.ok?(notify(t("goalMerged")),F(E=>E&&{...E,clusters:(E.clusters||[]).filter(ue=>ue.goal!==m.goal)}),await re(),n&&n()):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{B("")}}};(0,r.useEffect)(()=>{re()},[i]);let ie=async(m,K)=>{if(window.confirm(t("mergeConfirm")))try{(await fetch(`${Y}/merge?paths=${encodeURIComponent(m+","+K)}`).then(ue=>ue.json())).ok&&(await re(),n&&n())}catch{}},Ie=async m=>{if(window.confirm(t("deleteConfirm")))try{(await fetch(`${Y}/delete?path=${encodeURIComponent(m)}`).then(E=>E.json())).ok&&(await re(),n&&n())}catch{}},je=Xn,de=({title:m,kind:K,updated:E,path:ue})=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:St.colors[K]||"#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:Et(E)}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>Ie(ue),children:[t("delete")," \u2715"]})]});return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children: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:re,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:()=>re(),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:x?.available?x.health?.ok?"\u6B63\u5E38":"\u5F02\u5E38":"\u2014"}),(0,e.jsx)("span",{children:t("captureTitle")}),(0,e.jsx)("small",{children:x?.health?.lastAt?Et(new Date(x.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:()=>re(),children:["\u21BB ",t("refresh")]})]}),_?(()=>{let m=_.db||{},K=m.writable!==!1&&!m.corrupt,E=_.backups||{count:0,newestAt:0},ue=E.newestAt?Math.floor((Date.now()-Number(E.newestAt))/864e5):-1,Me=E.count?ue>7?"warn":"ok":"bad",we=x&&x.available?x.health:null,ye=we?we.ok?"ok":"warn":"none",j=U&&U.findings?U.onDisk&&U.residentServed===U.onDisk&&U.hostVersion===U.onDisk?"ok":"warn":"none",se={ok:["\u2705","#10b981"],warn:["\u26A0","#f59e0b"],bad:["\u2717","#ef4444"],none:["\u2022","inherit"]},Ce=[{label:t("healthDb"),level:K?"ok":"bad",text:K?"journal="+(m.journalMode||"?")+(m.checkedAt?" \xB7 "+new Date(m.checkedAt).toLocaleString():""):(m.error||t("healthDbBad"))+" \u2192 dsh-memory doctor"},{label:t("healthBackups"),level:Me,text:E.count?(ue<=0?t("healthBackupToday").replace("{n}",String(E.count)):t("healthBackupAge").replace("{n}",String(E.count)).replace("{d}",String(ue)))+(E.files&&E.files.length?" \xB7 "+E.files[E.files.length-1]:""):t("healthNoBackups")},{label:t("healthCapture"),level:ye,text:we?we.ok?t("healthCapOk"):t("healthCapFail")+"\uFF1A"+(we.reason||""):t("healthNoRecords")},{label:t("healthVersion"),level:j,text:j==="none"?t("healthRunAlign"):t("vcOnDisk")+" v"+(U.onDisk||"?")+" \xB7 "+t("vcResident")+" v"+(U.residentServed||"?")+" \xB7 "+t("vcLoaded")+" v"+(U.hostVersion||"?"),action:j==="none"?{label:t("alignRun"),run:me}:null}];return(0,e.jsx)("div",{style:{marginTop:6},children:Ce.map(pe=>(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:se[pe.level][1]},children:se[pe.level][0]}),(0,e.jsx)("b",{style:{minWidth:62,flex:"0 0 auto",opacity:.85},children:pe.label}),(0,e.jsx)("span",{style:{opacity:.82,wordBreak:"break-word"},children:pe.text}),pe.action&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{marginLeft:6,padding:"0 6px",fontSize:11},disabled:!!$,onClick:pe.action.run,children:pe.action.label})]},pe.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:()=>re(),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:!!$,onClick:me,children:t($==="align"?"exporting":"alignRun")}),U&&U.counts&&U.counts.fix>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!$,onClick:Q,children:t($==="alignfix"?"exporting":"alignFix")}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("alignHint")})]}),U&&U.findings?(0,e.jsxs)("div",{style:{marginTop:6},children:[(0,e.jsxs)("div",{style:{fontSize:12,opacity:.75,marginBottom:4},children:[t("alignDisk")," v",U.onDisk||"?",U.residentServed?" \xB7 "+t("alignResident")+" v"+U.residentServed:"",U.hostVersion?" \xB7 "+t("alignHost")+" v"+U.hostVersion:""]}),(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:U.findings.map((m,K)=>(0,e.jsxs)("li",{style:{padding:"4px 2px",borderTop:K?"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]},K))})]}):(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:()=>re(),children:["\u21BB ",t("refresh")]})]}),x?x.available===!1?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogUnavailable")}):(x.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:(x.entries||[]).map((m,K)=>{let E=Ho[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:Et(m.time?new Date(m.time).toISOString():"")}),(0,e.jsxs)("td",{style:{padding:"4px 6px",whiteSpace:"nowrap",color:E[1],fontWeight:600},children:[E[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||""})]},K)})})})}):(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",P.length,"\uFF09"]}),P.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:P.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:Et(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,K=Math.max(...m.map(we=>we.count),1),E=260,ue=50,Me=E/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:E,height:ue,style:{display:"block",width:"100%",height:50},children:m.map((we,ye)=>{let j=Math.round(we.count/K*(ue-4));return(0,e.jsx)("rect",{x:ye*Me+1,y:ue-j,width:Math.max(Me-2,2),height:j,rx:1.5,fill:we.count>0?"var(--dsw-alias-accent, #3b82f6)":"var(--dsw-alias-border-l1, #e5e7eb)",opacity:we.count>0?.85:.35},we.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:je.map(m=>(0,e.jsxs)("span",{style:{fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:St.colors[m]||"#666"}}),t(nt[m]),": ",s.byKind?.[m]||0]},m))})]}),c&&(c.budgetChars||c.recallLimit||c.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:c.budgetChars||8e4})," \xB7 ",t("recallLimitLabel")," ",(0,e.jsx)("b",{children:c.recallLimit||5})," \xB7 ",t("embeddingLabel")," ",c.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)(de,{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:!!$,onClick:Ue,children:$==="scan"?t("exporting"):"\u{1F50D} "+t("scanAndOrganize")}),u&&u.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!$,onClick:async()=>{if(window.confirm(t("oneClickOptimizeConfirm"))){B("oneclick");try{let m=JSON.stringify({cleanupStale:X}),E=await(await fetch(`${Y}/optimize-execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:m})).json();E&&E.ok?(notify(`${t("oneClickOptimizeDone")}\uFF1A${E.plan.merged} ${t("optimizedMerged")}${X?` \xB7 ${E.plan.staleDeleted} ${t("optimizedStaleDeleted")}`:""}`),await re(),n&&n(),k(null)):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{B("")}}},children:$==="oneclick"?t("exporting"):"\u26A1 "+t("oneClickOptimize")}),u&&u.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:X,onChange:m=>ce(m.target.checked)}),t("oneClickAlsoStale")]})]}),!u&&(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:10},children:t("scanHint")}),u&&(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}}),u.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!$,onClick:he,children:t($==="merge"?"exporting":"batchMerge")})]}),(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("mergePairs")}),u.merge?.length?(0,e.jsx)("ul",{style:{margin:"0 0 12px",padding:0,listStyle:"none"},children:u.merge.map((m,K)=>(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:()=>ie(m.a.path,m.b.path),children:t("mergeNow")})]},K))}):(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",u.stale?.length||0,"\uFF09"]}),u.stale?.length>0&&(0,e.jsx)("div",{style:{marginBottom:6},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!$,onClick:async()=>{if(!window.confirm(t("deleteConfirm")))return;B("clean");let m=0;for(let K of u.stale)try{await fetch(`${Y}/delete?path=${encodeURIComponent(K.path)}`),m++}catch{}B(""),notify(`${m} ${t("deletedStale")}`),await re(),n&&n()},children:t("cleanStale")})}),u.stale?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:u.stale.map(m=>(0,e.jsx)(de,{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:!!$,onClick:v,children:t($==="refine"?"exporting":"refineScan")}),(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("refineHint")})]}),W?.findings?.length?W.findings.map((m,K)=>(0,e.jsxs)("div",{style:{borderTop:K?"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:!!$,onClick:()=>ze(m,"keepA"),children:t("refineKeepA")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!$,onClick:()=>ze(m,"keepB"),children:t("refineKeepB")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!$,onClick:()=>ze(m,"keepBoth"),children:t("refineKeepBoth")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!$,onClick:()=>ze(m,"merge"),children:t("refineMerge")})]})]},K)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(W?"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:!!$,onClick:_e,children:t($==="junk"?"exporting":"junkScan")}),te?.length?(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!$,onClick:()=>Fe(te.map(m=>m.path)),children:t($==="junkpurge"?"exporting":"junkRecycleAll")}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("junkHint")})]}),te?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:te.map((m,K)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 2px",borderTop:K?"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:!!$,onClick:()=>Fe([m.path]),children:t("junkRecycle")})]},K))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(te?"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:!!$,onClick:z,children:t($==="goals"?"exporting":"goalScan")}),oe?(0,e.jsxs)("span",{style:{opacity:.6,fontSize:11},children:[t("goalStats"),"\uFF1A",oe.cached," / ",oe.calls]}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("goalHint")})]}),oe?.clusters?.length?oe.clusters.map((m,K)=>(0,e.jsxs)("div",{style:{borderTop:K?"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((E,ue)=>(0,e.jsx)("li",{children:E.title},ue))}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!$,onClick:()=>S(m),children:t("goalKeep")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!$,onClick:()=>I(m),children:t("goalMerge")})]})]},K)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(oe?"goalNone":"goalIdle")})]})]})]})]})}var $a=[{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 xr({t,newCard:a,setNewCard:n,onCreated:i}){if(!a)return null;let s=$a.find(y=>y.key===a.template),d=a.body||(s?t(s.bodyKey):""),g=a.kind||(s?s.kind:"knowledge"),w=a.tags||(s?t(s.tagKey):""),u=a._creating,k=y=>{let x=$a.find(T=>T.key===y);n(T=>({...T,template:y,kind:x?x.kind:T.kind,body:x?t(x.bodyKey):T.body,tags:x?t(x.tagKey):T.tags}))},c=async()=>{if(!(!a.title&&!d)){n(y=>({...y,_creating:!0}));try{(await fetch(`${Y}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a.title||t("untitled"),kind:g,tags:w.split(",").map(x=>x.trim()).filter(Boolean),body:d,source:"manual"})}).then(x=>x.json())).ok?(n(null),i&&i()):n(x=>({...x,_creating:!1}))}catch{n(x=>({...x,_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:y=>y.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:[$a.map(y=>(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===y.key?" me-on":""}`,onClick:()=>k(y.key),children:t(y.label)},y.key)),(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===""?" me-on":""}`,onClick:()=>n(y=>({...y,template:"",body:"",tags:"",kind:"knowledge"})),children:t("tplBlank")})]}),(0,e.jsx)("select",{className:"mc-btn",value:g,onChange:y=>n(x=>({...x,kind:y.target.value})),style:{maxWidth:180,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:Xn.map(y=>(0,e.jsx)("option",{value:y,style:{background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:t(nt[y])||y},y))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("cardTitle"),value:a.title||"",onChange:y=>n(x=>({...x,title:y.target.value}))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("tagsHint"),value:w,onChange:y=>n(x=>({...x,tags:y.target.value}))}),(0,e.jsx)("textarea",{className:"mc-btn",placeholder:t("cardBody"),value:d,onChange:y=>n(x=>({...x,body:y.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:u,onClick:c,children:t(u?"exporting":"createCard")})})]})]})]})}async function Ja(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 vr({t,onClose:a}){let[n,i]=(0,r.useState)(""),[s,d]=(0,r.useState)(""),[g,w]=(0,r.useState)(""),[u,k]=(0,r.useState)(!0),[c,y]=(0,r.useState)(!1),[x,T]=(0,r.useState)(""),[_,q]=(0,r.useState)(""),R=(0,r.useRef)(null),L=(0,r.useRef)(null),U=()=>{let X=R.current;if(X)try{X.focus(),X.select()}catch{}},V=X=>{T(X),L.current&&clearTimeout(L.current),L.current=setTimeout(()=>T(""),2400)};(0,r.useEffect)(()=>{let X=!0;return fetch(Y+"/diagnostics").then(ce=>ce.json()).then(ce=>{X&&(ce&&ce.ok?(d(String(ce.diagnostics||"")),w(String(ce.version||""))):y(!0))}).catch(()=>{X&&y(!0)}).finally(()=>{X&&k(!1)}),()=>{X=!1}},[]),(0,r.useEffect)(()=>{let X=ce=>{ce.key==="Escape"&&a()};return window.addEventListener("keydown",X),()=>{window.removeEventListener("keydown",X),L.current&&clearTimeout(L.current)}},[a]);let me=(()=>{try{return String(navigator.language||"").toLowerCase().startsWith("en")?"en":"zh"}catch{return"zh"}})(),Q=()=>{let X=n.trim().split(`
|
|
1054
|
-
`)[0]||"",ce=vn({title:"[Bug] "+(X.slice(0,60)||"memory-eternal \u95EE\u9898"),body:wn({description:n,diagnostics:s,version:g})});try{window.open(ce,"_blank","noopener")}catch{V(t("fbCopyFail"))}},P=async()=>{await Ja(s)?(q(""),V(t("fbCopiedDiag"))):(q(s),V(t("fbCopyManual")))},G=async()=>{let X=kn({lang:me,description:n,diagnostics:s});await Ja(X)?(q(""),V(t("fbCopiedPrompt"))):(q(X),V(t("fbCopyManual")))},$={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},B={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:X=>X.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:X=>i(X.target.value),placeholder:t("fbDesc"),rows:5,style:$}),(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:P,disabled:!s,children:t("fbCopyDiag")})]}),(0,e.jsx)("pre",{style:B,children:u?t("fbLoading"):c?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()){V(t("fbNeedDesc"));return}Q()},style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:["\u{1F680} ",t("fbOpenIssue")]}),(0,e.jsx)("span",{style:{opacity:.5,fontSize:12},children:t("fbOr")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:G,children:["\u{1F916} ",t("fbCopyPrompt")]})]}),x&&(0,e.jsx)("div",{style:{fontSize:12,color:"var(--dsw-alias-brand-primary, #3b82f6)"},children:x}),_&&(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:U,children:t("fbSelectAll")})]}),(0,e.jsx)("textarea",{ref:R,readOnly:!0,value:_,rows:7,style:$})]})]})]})]})}function wr({t,tab:a,onTab:n,onClose:i,onFeedback:s,onReplay:d}){let[g,w]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!g)return;let y=x=>{x.key==="Escape"&&w(null)};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[g]);let u=[{id:"group",label:t("supportGroup")},{id:"sponsor",label:t("supportSponsor")},{id:"legacy",label:t("supportLegacy")}],k="https://github.com/EternalNight996/memory-eternal/blob/main/README.md",c=(y,x)=>(0,e.jsxs)("figure",{children:[(0,e.jsx)("img",{src:y,alt:x,loading:"lazy",title:t("clickToZoom"),onClick:T=>w(T.currentTarget.currentSrc||y),onError:T=>{let _=T.currentTarget;_.dataset.fb||(_.dataset.fb="1",_.src="https://raw.githubusercontent.com/EternalNight996/memory-eternal/main/assets/support/"+String(y).split("/").pop())}}),(0,e.jsx)("figcaption",{children:x})]});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:y=>y.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:u.map(y=>(0,e.jsx)("button",{type:"button",className:`me-support-tab${a===y.id?" active":""}`,onClick:()=>n(y.id),children:y.label},y.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:[c("support/group-qr.jpg",t("supportGroupQQ")),c("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:k,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:[c("support/wechat-pay.jpg","\u5FAE\u4FE1\u6536\u6B3E\u7801"),c("support/wechat-reward.jpg","\u5FAE\u4FE1\u8D5E\u8D4F\u7801")]}),(0,e.jsxs)("p",{className:"me-support-note",style:{marginTop:12},children:["\u6253\u8D4F\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\uFF1B\u63D2\u4EF6\u672C\u4F53\u59CB\u7EC8\u5F00\u6E90\u514D\u8D39\uFF08MIT\uFF09\u3002",(0,e.jsx)("br",{}),(0,e.jsx)("a",{className:"me-support-link",href:"https://github.com/EternalNight996/memory-eternal/blob/main/SPONSOR.md",target:"_blank",rel:"noreferrer",children:"SPONSOR.md \u2197"})]})]}),a==="legacy"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{style:{margin:"0 0 8px",fontSize:14},children:t("supportLegacyTitle")}),(0,e.jsx)("p",{className:"me-support-note",children:t("supportLegacyBody")}),(0,e.jsxs)("div",{className:"me-support-actions",children:[(0,e.jsxs)("a",{className:"mc-btn",href:k,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:y=>{y.stopPropagation(),w(null)},children:[(0,e.jsx)("button",{type:"button",className:"me-lightbox-close",onClick:y=>{y.stopPropagation(),w(null)},"aria-label":t("close"),children:"\u2715"}),(0,e.jsx)("img",{src:g,alt:"",onClick:y=>y.stopPropagation()})]})]})}function kr({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 w=u=>{u.key==="Escape"&&a()};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[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((w,u)=>(0,e.jsx)("span",{className:`me-guide-dot${u<=n?" on":""}`},u))}),(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:()=>Na(s),children:["\u2605 ",t("onboardStar")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Na(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(w=>w-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(w=>w+1),children:t(n===0?"onboardStarred":"onboardNext")})]})]})]})}function Sr({t,card:a,query:n,onClose:i,onDelete:s,onFeedback:d,onNavigate:g,onTagClick:w,allCards:u,onOpenRelated:k,onKindChange:c,onSaved:y}){let[x,T]=(0,r.useState)(0),[_,q]=(0,r.useState)(""),[R,L]=(0,r.useState)(()=>{try{let j=localStorage.getItem("me-read-width");return["narrow","mid","wide"].includes(j)?j:"mid"}catch{return"mid"}}),U={narrow:720,mid:900,wide:1180};(0,r.useEffect)(()=>{let j=se=>{if(se.key==="Escape"){i();return}let Ce=String(se.target&&se.target.tagName||"").toLowerCase();Ce==="input"||Ce==="textarea"||Ce==="select"||se.target&&se.target.isContentEditable||(se.key==="j"&&g?(se.preventDefault(),g(1)):se.key==="k"&&g&&(se.preventDefault(),g(-1)))};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[i,g]);let V=async(j,se)=>{let Ce=await Ja(String(j||""));q(Ce?t("copied")+" \xB7 "+se:t("copyFail")),setTimeout(()=>q(""),1500)},{meta:me,body:Q}=(0,r.useMemo)(()=>ba(a.text||""),[a.text]),P=j=>{let se=me.find(([Ce])=>String(Ce).toLowerCase()===j);return se?se[1]:""},G=gn(P("tags")),$=a.kind||P("kind")||"knowledge",B=String(a.status||P("status")||"approved").toLowerCase(),X=ft[$]||"#6B7280",ce=(Q||"").length>460,he=(0,r.useMemo)(()=>Za(Q,a.title),[Q,a.title]),re=(0,r.useMemo)(()=>{let j=en(a);if(j)return j;let Ce=(he.split(/\r?\n/).map(pe=>pe.trim()).find(pe=>pe&&!/^#{1,2}\s/.test(pe))||"").replace(/[#>*_`]/g,"").replace(/\s+/g," ").trim();return Ce.length>150?Ce.slice(0,148)+"\u2026":Ce},[a,he]),Ue=(0,r.useMemo)(()=>br(he),[he]),W=(0,r.useMemo)(()=>{let j=new Set(G);return(u||[]).filter(se=>se.path!==a.path&&(se.tags||[]).some(Ce=>j.has(Ce))).slice(0,3)},[u,a.path,G.join("|")]),Be=()=>{F(String(a.title||"")),S((Array.isArray(G)?G:[]).join(", ")),ie(String(Q||"")),m(""),Fe(!0)},v=()=>{Fe(!1),m("")},ze=async()=>{let j=String(oe||"").trim(),se=String(I||"").trim();if(!j){m(t("editTitleEmpty"));return}if(!se){m(t("editBodyEmpty"));return}let Ce=String(z||"").split(/[,,\n]+/).map(pe=>pe.trim()).filter(Boolean);je(!0),m("");try{let pe=await fetch(`${Y}/card/update`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:a.path,title:j,tags:Ce,body:se})}).then(ot=>ot.json());if(!pe||!pe.ok){m(pe&&pe.error||t("editFail"));return}Fe(!1),y&&await y({path:a.path,status:B,title:j})}catch(pe){m(String(pe&&pe.message||pe))}finally{je(!1)}},[te,Z]=(0,r.useState)(!0),[_e,Fe]=(0,r.useState)(!1),[oe,F]=(0,r.useState)(""),[z,S]=(0,r.useState)(""),[I,ie]=(0,r.useState)(""),[Ie,je]=(0,r.useState)(!1),[de,m]=(0,r.useState)(""),K=(0,r.useRef)(null),[E,ue]=(0,r.useState)(""),Me=j=>{let se=K.current;if(!se)return;let Ce=document.getElementById(j);if(!Ce||!se.contains(Ce))return;let pe=Ce.getBoundingClientRect().top-se.getBoundingClientRect().top+se.scrollTop-12;se.scrollTo({top:Math.max(0,pe),behavior:"smooth"})},we=j=>{if(!te){Z(!0),setTimeout(()=>Me(j),80);return}Me(j)},ye=j=>{let se=j.currentTarget,Ce=se.scrollHeight-se.clientHeight;T(Ce<=0?100:Math.min(100,Math.max(0,se.scrollTop/Ce*100)));let pe=se.querySelectorAll(".md-doc .md-h"),ot="",ht=se.getBoundingClientRect().top+28;for(let qe of pe)if(qe.getBoundingClientRect().top<=ht)ot=qe.id;else break;ue(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:j=>j.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:Ut[$]||"\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:()=>V(Q,t("copyBody")),children:["\u{1F4CB} ",t("copyBody")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyPath"),onClick:()=>V(a.path,t("copyPath")),children:["\u{1F517} ",t("copyPath")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",title:t("editCard"),onClick:_e?v:Be,children:_e?"\u2716 "+t("editCancel"):"\u270F\uFE0F "+t("editCard")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("readWidth"),onClick:()=>{let j=["narrow","mid","wide"],se=j[(j.indexOf(R)+1)%j.length];L(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:()=>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")]}),ce&&(0,e.jsx)("button",{type:"button",className:"mc-btn","aria-expanded":te,onClick:()=>Z(j=>!j),children:t(te?"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")}),c&&B==="approved"&&($==="core"?(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>c(a.path,"knowledge"),children:t("unsetCore")}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>c(a.path,"core"),children:["\u2B50 ",t("setCore")]})),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:i,children:t("close")})]})]}),c&&(0,e.jsxs)("div",{className:"me-core-banner"+($==="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($==="core"?"coreActiveHint":"coreInactiveHint")}),B==="approved"?(0,e.jsx)("button",{type:"button",className:"mc-btn me-core-btn",onClick:()=>c(a.path,$==="core"?"knowledge":"core"),children:$==="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:X,borderColor:X+"59",background:X+"1a"},children:[Ut[$]||"\u{1F4CE}"," ",t(nt[$]||"kindKnowledge")]}),(0,e.jsxs)("span",{className:"md-chip "+(B==="approved"?"md-chip-st-ok":B==="pending"?"md-chip-st-warn":"md-chip-st-bad"),children:[B==="approved"?"\u2705":B==="pending"?"\u23F3":"\u26D4"," ",t(B==="approved"?"statusApproved":B==="pending"?"statusPending":"statusRejected")]}),(Array.isArray(G)?G:[]).slice(0,8).map(j=>(0,e.jsxs)("button",{type:"button",className:"md-chip md-chip-tag mc-tag-click",title:j,onClick:()=>w&&w(j),children:["\u{1F3F7} ",j]},j)),!!P("updated")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F552} ",t("updated")," ",Et(P("updated"))]}),!!P("source")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F4E5} ",P("source")]})]}),(0,e.jsx)("div",{className:"me-read-progress","aria-hidden":"true",children:(0,e.jsx)("i",{style:{width:x+"%"}})}),(0,e.jsxs)("div",{className:"me-reader-body",children:[(0,e.jsxs)("div",{className:"me-dialog-body me-reader-main",style:{maxWidth:U[R],margin:"0 auto",width:"100%",boxSizing:"border-box",...te?{}:{maxHeight:300,overflow:"hidden"}},ref:K,onScroll:ye,onClick:te?void 0:j=>{j.stopPropagation(),Z(!0)},children:[!_e&&!!re&&(0,e.jsxs)("div",{className:"me-reader-callout",children:[(0,e.jsx)("span",{className:"me-reader-callout-k",children:t(ao(a))}),(0,e.jsx)("p",{children:re})]}),_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:oe,onChange:j=>F(j.target.value),maxLength:200,style:{width:"100%",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13,boxSizing:"border-box"}}),(0,e.jsx)("label",{style:{fontSize:12,fontWeight:600,opacity:.8},htmlFor:"me-edit-tags",children:t("editTags")}),(0,e.jsx)("input",{id:"me-edit-tags",value:z,onChange:j=>S(j.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:I,onChange:j=>ie(j.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"}}),de&&(0,e.jsx)("div",{style:{color:"#f87171",fontSize:12},children:de}),(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:v,disabled:Ie,children:t("editCancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ze,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:sa(he)}})]}),(0,e.jsxs)("aside",{className:"me-reader-side",children:[Ue.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:Ue.map((j,se)=>(0,e.jsxs)("button",{type:"button",className:`lv${j.level}${E===j.id?" active":""}`,onClick:()=>we(j.id),children:[(0,e.jsx)("span",{children:String(se+1).padStart(2,"0")}),j.text]},j.id))})]}),(0,e.jsx)("div",{className:"side-label",children:t("source")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:P("source")||a.submittedBy||"\u2014"}),(0,e.jsx)("div",{className:"side-label",children:t("updated")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:Et(P("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}),G.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:G.slice(0,8).map(j=>(0,e.jsxs)("button",{type:"button",className:"mc-chip",onClick:()=>w&&w(j),children:["#",j]},j))})]}),W.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:W.map(j=>(0,e.jsxs)("button",{type:"button",onClick:()=>k&&k(j),children:[(0,e.jsx)("span",{children:Ut[j.kind]||"\u{1F4CE}"}),(0,e.jsx)("b",{children:j.title})]},j.path))})]})]})]}),!te&&(0,e.jsxs)("div",{className:"md-collapsed-hint",onClick:j=>{j.stopPropagation(),Z(!0)},children:[t("expand")," \u2304"]})]})]})}function Nr({t,onOpen:a,all:n,onAllChange:i,onMutate:s,active:d,visible:g}){let[w,u]=(0,r.useState)([]),[k,c]=(0,r.useState)(null),[y,x]=(0,r.useState)(null),[T,_]=(0,r.useState)(!1),q=(0,r.useRef)(0),R=(0,r.useRef)(null);R.current||(R.current=Bn(96));let L=(0,r.useRef)(0),U=(0,r.useRef)(0),V=(0,r.useRef)(w);V.current=w;let me=(0,r.useRef)(n),Q=(0,r.useRef)({requests:0,cacheHits:0,errors:0,timeouts:0,lastMs:0,lastBytes:0}),P=(0,r.useCallback)(async(v,ze={})=>{let te=Array.isArray(v)?v.filter(Boolean):[],Z=(n?"all|":"")+Vt(te);if(!ze.force){let z=R.current.get(Z);if(z)return Q.current.cacheHits+=1,c(z),u(te),x(null),_(!1),z}let _e=++L.current;_(!0),x(null);let Fe=new AbortController,oe=setTimeout(()=>{try{Fe.abort()}catch{}},1600),F=performance.now();Q.current.requests+=1;try{let z=await fetch(zn(Y,te,{all:n}),{signal:Fe.signal}),S=await z.json().catch(()=>null);if(_e!==L.current)return null;if(!z.ok||!S||!S.ok)throw new Error(S&&S.error||"HTTP "+z.status);let I=Hn(S);if(!I.ok)try{console.warn("[memory-eternal] \u5206\u5C42\u54CD\u5E94\u8D8A\u754C\uFF1A"+I.problems.join("\uFF1B"))}catch{}return R.current.set(Z,S),Q.current.lastMs=Math.round(performance.now()-F),Q.current.lastBytes=I.bytes,U.current||(U.current=Math.round(performance.now())),c(S),u(te),x(null),S}catch(z){if(_e!==L.current)return null;let S=En(z,{timeoutMs:1600,elapsedMs:performance.now()-F});S.timeout&&(Q.current.timeouts+=1),Q.current.errors+=1;try{console.warn("[memory-eternal] \u5C42\u7EA7\u52A0\u8F7D\u5931\u8D25 @ "+Z+"\uFF1A"+S.message)}catch{}return x({...S,target:Vt(te),segments:te.slice()}),null}finally{clearTimeout(oe),_e===L.current&&_(!1)}},[n]);(0,r.useEffect)(()=>{me.current!==n&&(me.current=n,R.current.clear(),d&&P([],{force:!0}))},[n,d,P]),(0,r.useEffect)(()=>{!d||k||T||P([])},[d,k,T,P]),(0,r.useEffect)(()=>{g&&k&&q.current++},[g,k]);let G=(0,r.useCallback)(v=>{let ze=Array.isArray(v)?v:Rn(v&&v.path!==void 0?v.path:v);Vt(ze)!==Vt(V.current)&&P(ze)},[P]),$=(0,r.useCallback)(v=>{v&&P(V.current.concat(String(v)))},[P]),B=(0,r.useCallback)(()=>{R.current.clear();let v=y&&Array.isArray(y.segments)?y.segments:V.current;P(v,{force:!0})},[P,y]),X=(0,r.useCallback)(async()=>(R.current.clear(),P(V.current,{force:!0})),[P]),ce=(0,r.useCallback)(async v=>{try{let te=await(await fetch(`${Y}/delete?path=${encodeURIComponent(v)}`)).json();return te&&te.ok?(await X(),s&&s(),!0):!1}catch{return!1}},[X,s]),he=(0,r.useCallback)(async v=>{if(!v||v.length<2)return!1;try{let ze=await fetch(`${Y}/merge?paths=${encodeURIComponent(v.join(","))}`).then(te=>te.json());return ze&&ze.ok?(await X(),s&&s(),!0):!1}catch{return!1}},[X,s]);(0,r.useEffect)(()=>{let v=()=>{let ze=typeof globalThis.__meGraphRuntime=="function"?globalThis.__meGraphRuntime():null;return{path:Vt(V.current),crumbs:k&&Array.isArray(k.crumbs)?k.crumbs.map(te=>({path:te.path,label:te.label,labelKey:te.labelKey,count:te.count})):[],level:k&&k.level?{mode:k.level.mode,total:k.level.total,items:k.level.items.length,edges:k.level.edges.length}:null,loading:!!T,error:y?{timeout:!!y.timeout,message:y.message,target:y.target||""}:null,requests:Q.current.requests,cacheHits:Q.current.cacheHits,errors:Q.current.errors,timeouts:Q.current.timeouts,lastMs:Q.current.lastMs,lastBytes:Q.current.lastBytes,firstLevelMs:U.current,cacheSize:R.current.size,timeoutMs:1600,runtime:ze}};return globalThis.__meGraphProbe=v,()=>{if(globalThis.__meGraphProbe===v)try{delete globalThis.__meGraphProbe}catch{globalThis.__meGraphProbe=void 0}}},[k,T,y]);let re=k&&k.level?k.level:null,Ue=re?re.items.length:0,W=re?re.total:0,Be=re?re.edges.length:0;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.jsx)("span",{className:"mc-v5-pagecount",children:k?`${Ue} ${t("graphItems")} \xB7 ${W} ${t("graphCardsUnit")} \xB7 ${Be} ${t("edges")}`:""})]}),!k&&!y&&(0,e.jsx)(oo,{text:t("loadingGraph")}),!k&&y&&(0,e.jsxs)("div",{className:"mc-empty",style:{display:"flex",flexDirection:"column",gap:10,alignItems:"center"},children:[(0,e.jsxs)("span",{children:[y.timeout?t("graphLevelTimeout").replace("{ms}",String(1600)):t("graphLevelError"),"\uFF1A",y.message]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:B,children:t("graphRetry")})]}),k&&Ue===0&&(0,e.jsx)("div",{className:"mc-empty",children:t("graphEmptyLevel")}),k&&Ue>0&&(0,e.jsx)(Mr,{level:re,crumbs:k.crumbs||[],onOpen:a,onDelete:ce,onMerge:he,onDrill:$,onNavigate:G,onRetry:B,error:k?y:null,loading:T,t,all:n,onAllChange:i,fitTrigger:q.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 Wt(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 ma({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 oo({text:t,value:a}){return(0,e.jsxs)("div",{className:"me-loading",role:"status","aria-live":"polite",children:[(0,e.jsx)(ma,{value:a}),(0,e.jsx)("span",{className:"me-loading-text",children:t})]})}var Gn=[];function Cr({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 w=d.labelKey?a(d.labelKey):"",u=w&&w!==d.labelKey?w:d.label||d.path||"\u2014",k=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":"")+(k?" current":""),"aria-current":k?"page":void 0,title:u,disabled:k||i,onClick:()=>{k||n(d)},children:u})]},d.path||"root")})})}function Mr({level:t,crumbs:a,onOpen:n,onDelete:i,onMerge:s,onDrill:d,onNavigate:g,onRetry:w,error:u,loading:k,t:c,all:y,onAllChange:x,fitTrigger:T}){let _=(0,r.useRef)(null),q=(0,r.useRef)(null),R=(0,r.useRef)(null),L=(0,r.useRef)(null),U=(0,r.useRef)(null),V=t&&Array.isArray(t.items)?t.items:Gn,me=t&&Array.isArray(t.edges)?t.edges:Gn,Q=t&&t.id||"",P=(0,r.useMemo)(()=>V.map(b=>({id:b.id,title:b.label||b.id,name:b.label||b.id,kind:b.kind||"other",tags:Array.isArray(b.tags)?b.tags:[],updated:b.updated||"",count:Number(b.count)||0,type:b.type||"card"})),[V]),G=(0,r.useMemo)(()=>me.map(b=>({source:b.source,target:b.target,type:b.type||"tag",weight:Number(b.weight)||1})),[me]),$=(0,r.useRef)(c);$.current=c;let B=(0,r.useRef)(n);(0,r.useEffect)(()=>{B.current=n},[n]);let X=(0,r.useRef)(i);(0,r.useEffect)(()=>{X.current=i},[i]);let ce=(0,r.useRef)(s);(0,r.useEffect)(()=>{ce.current=s},[s]);let he=(0,r.useRef)(d);(0,r.useEffect)(()=>{he.current=d},[d]);let[re,Ue]=(0,r.useState)(""),[W,Be]=(0,r.useState)(null),[v,ze]=(0,r.useState)(null),te=(0,r.useRef)("");(0,r.useEffect)(()=>{te.current=re.trim().toLowerCase()},[re]),(0,r.useEffect)(()=>{let b=R.current;if(!b)return;let p=re.trim().toLowerCase();if(!p)return;let le=b.nodes.find(De=>(De.name||"").toLowerCase().includes(p));if(le){R.current.selectedId=le.id,Be(le.id),b.panX=b.w/2-le.x*b.zoom,b.panY=b.h/2-le.y*b.zoom;try{b.render&&b.render()}catch(De){Wt(De,"search-center")}}},[re]);let[Z,_e]=(0,r.useState)("all"),[Fe,oe]=(0,r.useState)(!1),F=(0,r.useRef)("all"),[z,S]=(0,r.useState)(""),I=(0,r.useRef)(""),[ie,Ie]=(0,r.useState)(!1),je=(0,r.useRef)(!1),[de,m]=(0,r.useState)(null);(0,r.useEffect)(()=>{F.current=Z},[Z]),(0,r.useEffect)(()=>{I.current=z},[z]),(0,r.useEffect)(()=>{je.current=ie},[ie]);let K=(0,r.useMemo)(()=>{let b=new Map;for(let p of P)for(let le of p.tags||[]){let De=String(le).trim();De&&b.set(De,(b.get(De)||0)+1)}return[...b.entries()].sort((p,le)=>le[1]-p[1]).slice(0,24).map(([p,le])=>({tag:p,n:le}))},[P]),E=(0,r.useMemo)(()=>{let b={};for(let p of P)b[p.kind||"other"]=(b[p.kind||"other"]||0)+(p.type==="planet"?Math.max(1,p.count||0):1);return b},[P]),ue=(()=>{let b=re.trim().toLowerCase();return!!b&&!P.some(p=>(p.title||p.name||"").toLowerCase().includes(b)||String(p.kind||"").toLowerCase().includes(b)||String(nt[p.kind]||"").toLowerCase().includes(b))})();(0,r.useEffect)(()=>{let b=R.current;b&&b.requestRender&&b.requestRender()},[re]),(0,r.useEffect)(()=>{let b=R.current;if(!(!b||!b.render))try{b.render()}catch(p){Wt(p,"filter/timeDim")}},[Z,z,ie]);let Me=(0,r.useRef)(null),[we,ye]=(0,r.useState)([]),[j,se]=(0,r.useState)(null),[Ce,pe]=(0,r.useState)(!1),[ot,ht]=(0,r.useState)(null),[qe,ct]=(0,r.useState)(""),tt=(0,r.useRef)(null),yt=(0,r.useRef)(null),Ge=(b,p=!0)=>{tt.current&&clearTimeout(tt.current),ht({msg:b,ok:p}),tt.current=setTimeout(()=>ht(null),1900)},It=b=>{ct(b),yt.current&&clearTimeout(yt.current),yt.current=setTimeout(()=>ct(""),1600)};(0,r.useEffect)(()=>()=>{tt.current&&clearTimeout(tt.current),yt.current&&clearTimeout(yt.current)},[]);let ke=(0,r.useMemo)(()=>P.reduce((b,p)=>(b[p.id]=p,b),{}),[P]);return(0,r.useEffect)(()=>{let b=_.current;if(!b||P.length===0)return;let p=b.getContext("2d");if(!p)return;let le=Math.min(1.5,Math.max(1,window.devicePixelRatio||1)),De={};G.forEach(N=>{De[N.source]=(De[N.source]||0)+1,De[N.target]=(De[N.target]||0)+1});let f=Math.max(1,...Object.values(De)),C=jn(),Te=V.some(N=>N&&N.type==="planet"),o={nodes:V.filter(N=>N&&N.type!=="planet").concat(V.filter(N=>N&&N.type==="planet")).map(N=>An(N,{degree:De[N.id]||0,maxDegree:f})),edges:G.map(N=>({sourceNodeId:N.source,targetNodeId:N.target,weight:Math.max(1,Number(N.weight)||1)})),panX:0,panY:0,zoom:1,running:!0,raf:0,tickCount:0,quietTicks:0,dragNode:null,selectedId:null,mouseX:0,mouseY:0,w:0,h:0,dpr:le,ctx:p,multi:[],marquee:null,planetLayer:Te,levelId:Q};Te&&In(o.nodes.filter(N=>N.planet)),o.domain=P,o.domainById=P.reduce((N,A)=>(N[A.id]=A,N),{}),o.nodeById=new Map(o.nodes.map(N=>[N.id,N])),o.edgePairs=(()=>{let N=new Map(o.nodes.map((D,J)=>[D.id,J])),A=new Int32Array(o.edges.length*2),O=0;for(let D of o.edges){let J=N.get(D.sourceNodeId),fe=N.get(D.targetNodeId);J===void 0||fe===void 0||(A[O]=J,A[O+1]=fe,O+=2)}return A.subarray(0,O)})(),o.alpha=1,o.forceParams=Te?Ln(wa(o.nodes.length)):wa(o.nodes.length),o.lastTickMs=0,o.lastRenderMs=0,o.nodes.forEach((N,A)=>{let O=A*2.399963229728653,D=12*Math.sqrt(A);N.x=Math.cos(O)*D,N.y=Math.sin(O)*D});let dt=[...new Set(o.nodes.map(N=>N.type))];o.clustered=!Te&&dt.length>1,o.typeCenters=o.typeCenters||{};let xt=Te?0:160;dt.forEach((N,A)=>{if(o.typeCenters[N])return;let O=A/dt.length*Math.PI*2-Math.PI/2;o.typeCenters[N]={x:Math.cos(O)*xt,y:Math.sin(O)*xt}}),R.current=o;let pt=0,Nt=0,Ct=null,$t="",qt=()=>{let N=b.clientWidth,A=b.clientHeight;o.w=N,o.h=A,b.width=N*le,b.height=A*le,p.setTransform(le,0,0,le,0,0),(pt===0||Nt===0)&&N>0&&A>0&&o.tickCount>0&&C.raf(()=>Ye()),pt=N,Nt=A};qt();let l=new ResizeObserver(qt);l.observe(b.parentElement);let ee=(N,A)=>N&&N.length>A?N.slice(0,A)+"\u2026":N,ne=(N,A,O,D)=>{if(p.beginPath(),D==="rect")p.rect(N-O,A-O*.75,O*2,O*1.5);else if(D==="diamond")p.moveTo(N,A-O),p.lineTo(N+O,A),p.lineTo(N,A+O),p.lineTo(N-O,A),p.closePath();else if(D==="hexagon"){for(let J=0;J<6;J++){let fe=Math.PI/3*J-Math.PI/2,Re=N+O*Math.cos(fe),Ae=A+O*Math.sin(fe);J===0?p.moveTo(Re,Ae):p.lineTo(Re,Ae)}p.closePath()}else p.arc(N,A,O,0,Math.PI*2)},Oe=new Map,Pe=(N,A)=>{let O=N+"|"+Math.round(A),D=Oe.get(O);return D||(D=p.createRadialGradient(-A*.32,-A*.38,0,0,0,A*1.15),D.addColorStop(0,We(N,"#ffffff",.2)),D.addColorStop(.62,N),D.addColorStop(1,We(N,"#000000",.22)),Oe.set(O,D)),D},Se=(N,A)=>{let O=parseInt(N.slice(1,3),16),D=parseInt(N.slice(3,5),16),J=parseInt(N.slice(5,7),16);return"rgba("+O+","+D+","+J+","+A+")"},We=(N,A,O)=>{let D=Ae=>[parseInt(Ae.slice(1,3),16),parseInt(Ae.slice(3,5),16),parseInt(Ae.slice(5,7),16)],J=D(N),fe=D(A),Re=Math.max(0,Math.min(1,Number(O)||0));return"rgb("+J.map((Ae,Ke)=>Math.round(Ae+(fe[Ke]-Ae)*Re)).join(",")+")"},vt=new Map,kt=new Map,Gt=(N,A,O,D)=>{let J=Ke=>[parseInt(Ke.slice(1,3),16),parseInt(Ke.slice(3,5),16),parseInt(Ke.slice(5,7),16)],fe=J(N),Re=J(A),Ae=Math.max(0,Math.min(1,Number(O)||0));return"rgba("+fe.map((Ke,Le)=>Math.round(Ke+(Re[Le]-Ke)*Ae)).join(",")+","+D+")"},Xt=1.1,ua=3,Ye=()=>{if(!o.nodes.length)return;let N=1/0,A=-1/0,O=1/0,D=-1/0;o.nodes.forEach(Le=>{let ut=Number(Le.r)||0,Ve=Le.planet?ut*1.32:ut;Le.x-Ve<N&&(N=Le.x-Ve),Le.x+Ve>A&&(A=Le.x+Ve),Le.y-Ve<O&&(O=Le.y-Ve),Le.y+Ve>D&&(D=Le.y+Ve)});let J=28,fe=A-N+J*2,Re=D-O+J*2,Ae=Math.min(o.w/fe,o.h/Re),Ke=Math.pow(1/Xt,ua);o.zoom=Math.max(.35,Math.min(1.8,Ae*Ke)),o.planetLayer&&(o.zoom=Math.max(.12,Ae*Math.pow(1/Xt,ua-2))),o.panX=o.w/2-(N+A)/2*o.zoom,o.panY=o.h/2-(O+D)/2*o.zoom};L.current=Ye;let Bt=()=>{o.renderFrames=(o.renderFrames|0)+1;let N=o.zoom>=1.2?"in":"out";q.current&&q.current.dataset.zoom!==N&&(q.current.dataset.zoom=N),p.clearRect(0,0,o.w,o.h),o.searchTerm=te.current,o.kindFilter=F.current,o.timeMode=je.current,o.tagFilter=I.current;let A=o.tagFilter,O=o.kindFilter,D=M=>String(M||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");p.save();let J=o.w+"x"+o.h;if(!Ct||$t!==J){Ct=new Path2D;let M=26;for(let Ne=M/2;Ne<o.w;Ne+=M)for(let Ee=M/2;Ee<o.h;Ee+=M)Ct.moveTo(Ne+1,Ee),Ct.arc(Ne,Ee,1,0,Math.PI*2);$t=J}p.fillStyle="rgba(255,255,255,0.055)",p.fill(Ct),p.restore(),p.save(),p.translate(o.panX,o.panY),p.scale(o.zoom,o.zoom);let fe={};o.nodes.forEach(M=>fe[M.id]=M);let Re=performance.now()<(o.motionUntil||0),Ae=o.nodes.length>40,Ke=Ae?1.5:.55,Le=o.selectedId||o.hoverId,ut=Sn({panX:o.panX,panY:o.panY,zoom:o.zoom,w:o.w,h:o.h,margin:80}),Ve=(()=>{let M=(o.searchTerm||"").toLowerCase();if(!M)return null;let Ne=[];for(let Ee of o.nodes){let He=(o.domainById[Ee.id]||{}).kind||"other";if(((Ee.name||"").toLowerCase().includes(M)||String(nt[He]||"").toLowerCase().includes(M)||String(He).toLowerCase().includes(M))&&Ne.push(Ee.id),Ne.length>200)break}return Ne})(),wt=o.quality|0,Dt=Cn(o.nodes,{limit:Nn(o.nodes.length,wt),focusId:Le,hoverId:o.hoverId,searchHits:Ve,degree:De}),Ot=new Map,Rt=(M,Ne)=>{let Ee=M+"|"+Ne,be=Ot.get(Ee);return be===void 0&&(p.font=M,be=p.measureText(Ne).width,Ot.set(Ee,be)),be},ga=o.nodes.length<=250,Zt=new Map,lo=o.nodes.length>1200&&o.zoom<.3,an=o.zoom>=.6,Aa=wt>=3,nn=an?wt<=0?1:wt===1?2:wt===2?4:8:1;o.edges.forEach((M,Ne)=>{if(lo)return;let Ee=Le&&(M.sourceNodeId===Le||M.targetNodeId===Le);if(Le){if(!Ee)return}else if(nn>1&&Ne%nn!==0)return;let be=fe[M.sourceNodeId],He=fe[M.targetNodeId];if(!be||!He||!va(be.x,be.y,10,ut)&&!va(He.x,He.y,10,ut))return;if(O!=="all"){let La=o.domainById[M.sourceNodeId]&&o.domainById[M.sourceNodeId].kind,Fa=o.domainById[M.targetNodeId]&&o.domainById[M.targetNodeId].kind;if(La!==O&&Fa!==O)return}if(A){let La=o.domainById[M.sourceNodeId]&&(o.domainById[M.sourceNodeId].tags||[]).includes(A),Fa=o.domainById[M.targetNodeId]&&(o.domainById[M.targetNodeId].tags||[]).includes(A);if(!La&&!Fa)return}let at=He.x-be.x,Je=He.y-be.y,et=Math.sqrt(at*at+Je*Je)||1,gt=Re||o.zoom>=.6?0:Ae?10:16,st=-Je/et*gt,rt=at/et*gt,Yt=(be.x+He.x)/2+st,At=(be.y+He.y)/2+rt,Lt=St.colors[o.domainById[be.id]&&o.domainById[be.id].kind||"other"]||St.colors.other,ea=Le?Ee?.72:.06:o.planetLayer?.22:Ae?.12:.17,sn=parseInt(Lt.slice(1,3),16),ln=parseInt(Lt.slice(3,5),16),cn=parseInt(Lt.slice(5,7),16),dn=Math.max(1,Number(M.weight)||1),mo=Ee?1.6+Math.min(3.2,dn*.8):.7+Math.min(2.4,(dn-1)*.35),pn=Math.min(an?1.2:1/0,Math.round(mo*2)/2),mn=sn+","+ln+","+cn+","+ea+","+pn,ia=Zt.get(mn);ia||(ia={path:new Path2D,stroke:"rgba("+sn+","+ln+","+cn+","+ea+")",width:pn},Zt.set(mn,ia)),ia.path.moveTo(be.x,be.y),ia.path.quadraticCurveTo(Yt,At,He.x,He.y)}),Zt.forEach(M=>{p.strokeStyle=M.stroke,p.lineWidth=M.width,p.stroke(M.path)});let ra=null;Le&&(ra=new Set,o.edges.forEach(M=>{M.sourceNodeId===Le?ra.add(M.targetNodeId):M.targetNodeId===Le&&ra.add(M.sourceNodeId)}));let co=(M,Ne={})=>{let Ee=ee(M.name,Ne.maxChars||16),be=1/o.zoom,He="500 "+(11.5*be).toFixed(1)+"px -apple-system,Segoe UI,sans-serif";p.font=He;let Je=Rt(He,Ee)+14*be,et=17*be,gt=M.y+M.r+(Ne.gap===void 0?8:Ne.gap)*be,st=!0;for(let rt of on)if(M.x-Je/2<rt.x+rt.w&&M.x+Je/2>rt.x&><rt.y+rt.h&>+et>rt.y){st=!1;break}return!st&&!Ne.force?!1:(on.push({x:M.x-Je/2,y:gt,w:Je,h:et}),p.fillStyle="rgba(20,24,30,0.78)",p.beginPath(),p.roundRect?p.roundRect(M.x-Je/2,gt,Je,et,4*be):p.rect(M.x-Je/2,gt,Je,et),p.fill(),p.strokeStyle="rgba(255,255,255,0.07)",p.lineWidth=1*be,p.stroke(),p.fillStyle=Ne.strong?"#f2f5f8":"#aeb6c2",p.textAlign="center",p.textBaseline="top",p.fillText(Ee,M.x,gt+4.6*be),!0)},po=(M,Ne,Ee)=>{let be=1/o.zoom,{isSel:He,isHov:at,dimmed:Je}=Ee,et=M.r*o.zoom;p.save(),p.globalAlpha=Je?.16:1;let gt="g|"+Ne+"|"+Math.round(M.r),st=vt.get(gt);st||(st=p.createRadialGradient(0,0,M.r*.8,0,0,M.r*1.24),st.addColorStop(0,Se(Ne,.18)),st.addColorStop(.58,Se(Ne,.06)),st.addColorStop(1,Se(Ne,0)),vt.set(gt,st)),p.save(),p.translate(M.x,M.y),Aa||(p.fillStyle=st,p.beginPath(),p.arc(0,0,M.r*1.24,0,Math.PI*2),p.fill());let rt=o.timeMode?Ne:St.deep[M.type]||Ne,Yt="b|"+rt+"|"+Math.round(M.r),At=kt.get(Yt);if(At||(At=p.createRadialGradient(-M.r*.26,-M.r*.32,M.r*.12,0,0,M.r*1.1),At.addColorStop(0,Gt(rt,"#ffffff",.24,.9)),At.addColorStop(.58,Se(rt,.86)),At.addColorStop(1,Gt(rt,"#000000",.34,.9)),kt.set(Yt,At)),p.beginPath(),p.arc(0,0,M.r,0,Math.PI*2),p.fillStyle="rgba(13,16,21,0.92)",p.fill(),p.beginPath(),p.arc(0,0,M.r,0,Math.PI*2),p.fillStyle=At,p.fill(),p.beginPath(),p.arc(0,0,M.r-Math.max(.6,1.1*be),Math.PI*1.06,Math.PI*1.94),p.strokeStyle="rgba(255,255,255,0.14)",p.lineWidth=Math.max(.7,1.2*be),p.stroke(),p.beginPath(),p.arc(0,0,M.r,0,Math.PI*2),p.strokeStyle=Se(Ne,He||at?.95:.58),p.lineWidth=Math.max(.8,1.1*be),p.stroke(),p.restore(),(He||at)&&(p.save(),p.beginPath(),p.arc(M.x,M.y,M.r+(He?7:5)*be,0,Math.PI*2),p.strokeStyle=He?"rgba(255,122,69,0.9)":Se(Ne,.7),p.lineWidth=Math.max(1,1.2*be),He&&p.setLineDash([5*be,4*be]),p.stroke(),p.restore()),p.restore(),He||at||et>=11){let Lt=Math.max(9,Math.min(21,et*.42))*be,ea=et>=30;p.save(),p.textAlign="center",p.textBaseline="middle",p.shadowColor="rgba(0,0,0,0.5)",p.shadowBlur=5*be,ea&&(p.font="600 "+(Lt*.48).toFixed(1)+"px -apple-system,Segoe UI,sans-serif",p.fillStyle="rgba(255,255,255,0.72)",p.fillText(ee(M.name,12),M.x,M.y-Lt*1.02)),p.font="700 "+Lt.toFixed(1)+"px -apple-system,Segoe UI,sans-serif",p.fillStyle="rgba(255,255,255,0.96)",p.fillText(Dn(M.count,{unit:$.current("graphCountWan"),locale:$.current("graphCountLocale")}),M.x,M.y+(ea?Lt*.06:0)),ea&&(p.font="500 "+(Lt*.38).toFixed(1)+"px -apple-system,Segoe UI,sans-serif",p.fillStyle="rgba(255,255,255,0.5)",p.fillText($.current("graphCardsUnit"),M.x,M.y+Lt*.92)),p.restore()}},on=[],rn=[];if(o.nodes.forEach(M=>{if(!va(M.x,M.y,M.r+2,ut))return;let Ne=o.domainById[M.id]||{},Ee=Ne.kind||"other",be=o.timeMode&&Ne.updated?Tr(Ne.updated):St.colors[Ee]||St.colors.other,He=St.shapes[Ee]||"circle",at=o.selectedId===M.id,Je=o.hoverId===M.id,et=o.searchTerm||"",gt=!et||(M.name||"").toLowerCase().includes(et)||String(nt[Ee]||"").toLowerCase().includes(et)||String(Ee).toLowerCase().includes(et),st=O==="all"||Ee===O,rt=!A||(Ne.tags||[]).includes(A),Yt=Le&&M.id!==Le&&!(ra&&ra.has(M.id))||et&&!gt||!st||!rt;if(M.planet){rn.push({n:M,color:be,isSel:at,isHov:Je,dimmed:Yt,ok:st&&rt});return}p.save(),p.globalAlpha=Yt?.08:1,(at||Je)&&ga&&(p.shadowColor=be,p.shadowBlur=at?16:11),p.translate(M.x,M.y),ne(0,0,M.r,He),p.fillStyle=Aa?be:Pe(be,M.r),p.fill(),(!Aa||at||Je)&&(p.strokeStyle="rgba(255,255,255,0.16)",p.lineWidth=Math.max(.6,.8*(1/o.zoom)),p.stroke()),Ee==="core"&&(p.fillStyle="#1b120e",p.font="700 "+Math.max(10,Math.round(M.r*.95))+"px sans-serif",p.textAlign="center",p.textBaseline="middle",p.fillText("\u2605",0,0)),p.restore(),at?(p.save(),ne(M.x,M.y,M.r+3,He),p.strokeStyle=be,p.lineWidth=3,p.shadowColor=be,p.shadowBlur=12,p.stroke(),p.restore()):Je?(p.save(),ne(M.x,M.y,M.r+2,He),p.strokeStyle=be,p.lineWidth=2,p.stroke(),p.restore()):et&>?(p.save(),ne(M.x,M.y,M.r+2,He),p.strokeStyle="#ffa06b",p.lineWidth=2,p.stroke(),p.restore()):o.multi.indexOf(M.id)>=0&&(p.save(),ne(M.x,M.y,M.r+2,He),p.strokeStyle="#60a5fa",p.lineWidth=2,p.shadowColor="#60a5fa",p.shadowBlur=8,p.stroke(),p.restore()),(at||Je||!Re&&(Dt.has(M.id)&&o.zoom>Ke||!Ae&&o.zoom>.6))&&st&&rt&&co(M,{force:at||Je})}),rn.forEach(M=>po(M.n,M.color,M)),p.restore(),o.marquee){let M=o.marquee,Ne=Math.min(M.sx,M.ex),Ee=Math.min(M.sy,M.ey),be=Math.abs(M.ex-M.sx),He=Math.abs(M.ey-M.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(Ne,Ee,be,He),p.strokeRect(Ne,Ee,be,He),p.restore()}if(o.hoverId&&Me.current){let M=o.domainById[o.hoverId],Ne=o.nodes.find(function(Ee){return Ee.id===o.hoverId});if(M&&Ne){let Ee=o.edges.filter(function(et){return et.sourceNodeId===M.id||et.targetNodeId===M.id}).length,be=Ne.x*o.zoom+o.panX,He=Ne.y*o.zoom+o.panY;Me.current.style.display="block",Me.current.style.left=be+14+"px",Me.current.style.top=He-6+"px";let at=Ne.planet?$.current("graphPlanetCards").replace("{n}",String(Ne.count))+" \xB7 "+$.current("graphEnter"):$.current("connCount").replace("{n}",Ee),Je=$.current(nt[M.kind]||"kindKnowledge");Me.current.innerHTML="<b>"+D(M.title||M.name||"")+'</b><br/><span style="opacity:.8">'+D(Je)+" \xB7 "+D(at)+"</span>"}}else Me.current&&(Me.current.style.display="none")},mt=0,Kt=0,Qt=0,Qe=()=>{o.motionUntil=performance.now()+140,Qt&&C.clearTimeout(Qt),Qt=C.setTimeout(()=>{Qt=0,it()},160)},it=()=>{Kt||(Kt=C.raf(()=>{Kt=0;let N=performance.now();try{Bt()}catch(A){Wt(A,"render")}o.lastRenderMs=performance.now()-N}))};o.requestRender=it;let jt=()=>{mt>0||(o.alpha=Math.max(o.alpha||0,.35),o.running=!0,o.raf||(o.raf=C.raf(H)))};o.wake=jt,o.render=Bt;let tn=()=>{if(!Te)return;let N=o.nodes.filter(A=>A.planet);if(N.length){for(let A=0;A<N.length;A++)for(let O=A+1;O<N.length;O++){let D=N[A],J=N[O],fe=J.x-D.x,Re=J.y-D.y,Ae=Math.sqrt(fe*fe+Re*Re)||1,Ke=24+Math.min(D.r,J.r)*.18,Le=D.r+J.r+Ke;if(Ae>=Le)continue;let ut=Le-Ae,Ve=fe/Ae,wt=Re/Ae,Dt=D.r*D.r,Ot=J.r*J.r,Rt=Dt+Ot,ga=ut*(Ot/Rt),Zt=ut*(Dt/Rt);D.x-=Ve*ga,D.y-=wt*ga,J.x+=Ve*Zt,J.y+=wt*Zt,D.vx*=.55,D.vy*=.55,J.vx*=.55,J.vy*=.55}for(let A of N){let O=Fn(A.r);for(let D of o.nodes){if(D.planet||D===o.dragNode)continue;let J=D.x-A.x,fe=D.y-A.y,Re=Math.sqrt(J*J+fe*fe)||1,Ae=J/Re,Ke=fe/Re,Le=A.r+D.r+30,ut=Le+O;if(Re>=ut)continue;let Ve=Re;if(Re<Le){D.x=A.x+Ae*Le,D.y=A.y+Ke*Le;let Rt=D.vx*Ae+D.vy*Ke;Rt<0&&(D.vx-=Ae*Rt,D.vy-=Ke*Rt),Ve=Le}let wt=Math.min(1,(ut-Ve)/O),Dt=(.28+A.r*.009)*wt*wt,Ot=D.vx*Ae+D.vy*Ke;if(Ot<Dt){let Rt=(Dt-Ot)*.5;D.vx+=Ae*Rt,D.vy+=Ke*Rt}}}}},h=()=>{let N=performance.now(),A=Tn(o,{params:o.forceParams,alphaFloor:o.drift?1:0,damping:o.drift?.8:void 0});Te&&o.orbitOn&&(Pn(o.nodes,{speed:.0024,tick:o.tickCount,skip:O=>o.dragNode===O}),o.orbitTicks=(o.orbitTicks|0)+1),tn(),o.lastTickMs=performance.now()-N,o.lastRms=A.rms,o.autoFitPending&&o.tickCount>45&&(o.autoFitPending=!1,Ye())},H=()=>{if(!o.running)return;let N=performance.now(),A=0;if(o.lastStepAt&&N-o.lastStepAt>0&&N-o.lastStepAt<120&&(A=N-o.lastStepAt,o.frameEma=o.frameEma?o.frameEma*.8+A*.2:A),o.lastStepAt=N,o.zoom<.6?(o.quality&&(o.quality=0),o.frameEma=16.7,o.perfBad=0):o.tickCount>30&&A>0&&(o.frameEma>17.8?o.perfBad=(o.perfBad||0)+A:o.perfBad=Math.max(0,(o.perfBad||0)-A*.5),o.perfBad>500&&(o.quality|0)<3&&(o.quality=(o.quality|0)+1,o.perfBad=0,o.frameEma=16.7)),!o.drift&&(o.quietTicks>Oa||o.alpha===0&&o.tickCount>120)&&(o.quietTicks=0,o.drift=!0,o.alpha=Math.max(o.alpha||0,1),o.orbitOn=!0,o.motionUntil=0,o.userTouched||Ye()),o.drift&&!o.dragNode){let O=o.zoom<.6;if(o.driftFrame=(o.driftFrame|0)+1,O&&o.driftFrame%2){o.raf=C.raf(H);return}}try{let O=performance.now(),D=o.dragNode||o.drift?1:6,J=0;do h(),J+=1;while(!o.dragNode&&!o.drift&&J<D&&performance.now()-O<18&&o.quietTicks<=Oa);o.drift||(o.motionUntil=performance.now()+60);let fe=performance.now();Bt(),o.lastRenderMs=performance.now()-fe}catch(O){Wt(O,"step")}o.raf=C.raf(H)},ae=()=>({nodes:o.nodes.length,edges:o.edges.length,planets:o.nodes.filter(N=>N.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,orbitTicks:o.orbitTicks|0,frames:o.renderFrames|0,quality:o.quality|0,frameEma:Math.round((o.frameEma||0)*10)/10});o.stats=ae,globalThis.__meGraphStats=ae;let xe=()=>{let N=b.getBoundingClientRect(),A=N.width?b.clientWidth/N.width:1,O=N.height?b.clientHeight/N.height:1;return{level:o.levelId||"",planetLayer:!!o.planetLayer,nodes:o.nodes.length,planets:o.nodes.filter(D=>D.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,orbitTicks:o.orbitTicks|0,frames:o.renderFrames|0,resources:C.snapshot(),screen:o.nodes.map(D=>({id:D.id,label:D.name,planet:!!D.planet,count:D.count||0,dir:D.orbitDir||0,scale:D.orbitScale?Math.round(D.orbitScale*100)/100:0,x:N.left+(D.x*o.zoom+o.panX)/A,y:N.top+(D.y*o.zoom+o.panY)/O,r:Math.max(4,D.r*o.zoom/A)}))}};o.runtime=xe,globalThis.__meGraphRuntime=xe;let ve=(N,A)=>{let O=b.getBoundingClientRect(),D=O.width?b.clientWidth/O.width:1,J=O.height?b.clientHeight/O.height:1;return{x:(N-O.left)*D,y:(A-O.top)*J}},ge=(N,A)=>{let O=ve(N,A);return{x:(O.x-o.panX)/o.zoom,y:(O.y-o.panY)/o.zoom}},Ze=N=>{let A=o.domainById[N];return!(!A||F.current!=="all"&&A.kind!==F.current||I.current&&!(A.tags||[]).includes(I.current))},Mt=(N,A,O)=>Math.max(A,Math.min(O,N)),Ht=N=>{o.mouseX=N.clientX,o.mouseY=N.clientY;let A=ge(N.clientX,N.clientY),O=null;for(let D=o.nodes.length-1;D>=0;D--){let J=o.nodes[D];if(!Ze(J.id))continue;let fe=J.x-A.x,Re=J.y-A.y;if(fe*fe+Re*Re<J.r*J.r+36){O=J.id;break}}O!==o.hoverId&&(o.hoverId=O,o.motionUntil=performance.now()+140,it())},zt=N=>{if(N.button!==0)return;let A=ge(N.clientX,N.clientY),O=null;for(let D=o.nodes.length-1;D>=0;D--){let J=o.nodes[D];if(!Ze(J.id))continue;let fe=J.x-A.x,Re=J.y-A.y;if(fe*fe+Re*Re<J.r*J.r+25){O=J;break}}if(N.shiftKey){if(O){o.shiftClick=O.id;return}o.marquee={sx:N.clientX,sy:N.clientY,ex:N.clientX,ey:N.clientY};return}o.userTouched=!0,o.dragStart={x:N.clientX,y:N.clientY,px:o.panX,py:o.panY},o.dragging=!1,o.dragNode=O||null,O&&(o.dragOffset={dx:O.x-A.x,dy:O.y-A.y})},Tt=N=>{if(o.marquee){o.marquee.ex=N.clientX,o.marquee.ey=N.clientY,Qe(),it();return}if(!o.dragStart)return;let A=N.clientX-o.dragStart.x,O=N.clientY-o.dragStart.y;if(Math.abs(A)+Math.abs(O)>3&&!o.dragging&&(o.dragging=!0,o.dragNode&&(o.alpha=Math.max(o.alpha||0,.35))),o.dragNode){let D=ge(N.clientX,N.clientY);o.dragNode.x=D.x+o.dragOffset.dx,o.dragNode.y=D.y+o.dragOffset.dy,Qe(),jt()}else o.dragging&&(o.panX=Mt(o.dragStart.px+A,-1e5,1e5),o.panY=Mt(o.dragStart.py+O,-1e5,1e5),Qe(),it())},Ta=N=>{if(o.marquee){let D=o.marquee;o.marquee=null;let J=ve(D.sx,D.sy),fe=ve(D.ex,D.ey),Re=Math.min(J.x,fe.x),Ae=Math.max(J.x,fe.x),Ke=Math.min(J.y,fe.y),Le=Math.max(J.y,fe.y),ut=o.nodes.filter(Ve=>!Ve.planet&&Ze(Ve.id)).filter(Ve=>{let wt=Ve.x*o.zoom+o.panX,Dt=Ve.y*o.zoom+o.panY;return wt>=Re&&wt<=Ae&&Dt>=Ke&&Dt<=Le}).map(Ve=>Ve.id);o.multi=ut,ye(ut),Qe(),it();return}let A=o.dragStart&&!o.dragging,O=!!o.dragNode&&!!o.dragging;if(o.shiftClick){let D=o.shiftClick;o.shiftClick=null;let J=o.nodeById.get(D);if(J&&J.planet){o.selectedId=D,Be(D),it();return}let fe=Array.isArray(o.multi)?o.multi.slice():[];fe.includes(D)||fe.push(D),o.multi=fe,ye(fe),it();return}if(A){let D=ge(N.clientX,N.clientY),J=null;for(let fe=o.nodes.length-1;fe>=0;fe--){let Re=o.nodes[fe];if(!Ze(Re.id))continue;let Ae=Re.x-D.x,Ke=Re.y-D.y;if(Ae*Ae+Ke*Ke<Re.r*Re.r+20){J=Re;break}}if(J&&J.planet){o.selectedId=null,Be(null),it(),o.dragStart=null,o.dragging=!1,o.dragNode=null,he.current&&he.current(J.id);return}J?o.selectedId===J.id?(o.selectedId=null,Be(null),it()):(o.selectedId=J.id,Be(J.id),it()):(o.selectedId=null,o.hoverId=null,N.shiftKey||(o.multi=[],ye([])),Be(null),it())}o.dragStart=null,o.dragging=!1,o.dragNode=null,O&&jt()},Ra=N=>{N.preventDefault();let A=ge(N.clientX,N.clientY),O=null;for(let D=o.nodes.length-1;D>=0;D--){let J=o.nodes[D];if(!Ze(J.id))continue;let fe=J.x-A.x,Re=J.y-A.y;if(fe*fe+Re*Re<J.r*J.r+25){O=J;break}}if(O){let D=o.domainById[O.id];D&&m({x:N.clientX,y:N.clientY,id:O.id,path:D.id,title:D.title,planet:!!O.planet,count:O.count||0})}else m(null)},ro=N=>{N.preventDefault();let A=ve(N.clientX,N.clientY),O=(A.x-o.panX)/o.zoom,D=(A.y-o.panY)/o.zoom,J=Math.max(.3,Math.min(3,o.zoom*(N.deltaY<0?Xt:1/Xt)));o.panX=Mt(o.panX+O*(o.zoom-J),-1e5,1e5),o.panY=Mt(o.panY+D*(o.zoom-J),-1e5,1e5),o.zoom=J,o.userTouched=!0,o.quality=0,o.perfBad=0,o.frameEma=16.7,Qe(),it()};C.listen(b,"mousemove",Ht),C.listen(b,"mousedown",zt),C.listen(window,"mousemove",Tt),C.listen(window,"mouseup",Ta),C.listen(b,"wheel",ro,{passive:!1}),C.listen(b,"contextmenu",Ra),U.current=()=>{o.selectedId=null,o.hoverId=null,o.multi=[],ye([]),o.userTouched=!1,Ye(),Qe(),it()},mt=Mn(o.nodes.length);let oa=mt,io=()=>oa>0?Math.round((oa-mt)/oa*100):100;mt>0&&ze(0);let za=oa>0?[.75,.5,.25].map(N=>Math.round(oa*N)):[],Da=()=>{if(!o.running)return;let N=performance.now();for(;mt>0&&performance.now()-N<12;)h(),mt--;if(ze(mt>0?Math.min(99,io()):100),za.length&&mt<=za[0]){za.shift(),o.userTouched||Ye();try{Bt()}catch(A){Wt(A,"warm-frame")}}if(mt>0){o.userTouched||Ye(),o.warmRaf=C.raf(Da);return}o.warmRaf=0,o.userTouched||Ye(),o.orbitOn=!0;try{Bt()}catch(A){Wt(A,"warm-final")}ze(null),jt()};o.warmStep=Da,Ye();try{Bt()}catch(N){Wt(N,"first-frame")}mt>0?o.warmRaf=C.raf(Da):(o.orbitOn=!0,ze(0),jt());let so=()=>oe(!1);return C.listen(window,"mousedown",so),()=>{if(o.running=!1,C.releaseAll(),globalThis.__meGraphStats===ae)try{delete globalThis.__meGraphStats}catch{globalThis.__meGraphStats=void 0}if(globalThis.__meGraphRuntime===xe)try{delete globalThis.__meGraphRuntime}catch{globalThis.__meGraphRuntime=void 0}try{l.disconnect()}catch{}}},[V,G,Q]),(0,r.useEffect)(()=>{Be(null),ye([]),m(null);let b=R.current;b&&(b.selectedId=null,b.multi=[])},[Q]),(0,r.useEffect)(()=>{T!==void 0&&L.current&&requestAnimationFrame(()=>{try{L.current()}catch(b){Wt(b,"fit")}})},[T]),(0,e.jsxs)("div",{className:"me-graph",ref:q,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:c("search"),value:re,onChange:b=>Ue(b.target.value),"aria-label":c("search")})]}),(0,e.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,e.jsxs)("button",{type:"button",className:"me-gtool"+(Z!=="all"||ie||z?" on":""),onClick:()=>oe(b=>!b),"aria-expanded":Fe,title:c("filterLabel"),children:[c("filterLabel"),Z!=="all"||ie||z?(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:b=>b.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${Z==="all"&&!ie?" active":""}`,onClick:()=>{_e("all"),Ie(!1)},children:c("all")}),Object.keys(ft).map(b=>(0,e.jsxs)("button",{type:"button",className:`lg${Z===b?" active":""}`,onClick:()=>_e(p=>p===b?"all":b),children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:St.colors[b]||ft[b]}}),c(nt[b])]},b)),(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${ie?" active":""}`,onClick:()=>Ie(b=>!b),children:["\u23F1 ",c("timeDim")]}),K.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:K.map(b=>(0,e.jsxs)("button",{type:"button",className:`lg${z===b.tag?" active":""}`,style:{width:"auto",color:"#b9c0ca",padding:"2px 7px",fontSize:10.5,border:"1px solid rgba(255,255,255,.07)"},onClick:()=>S(p=>p===b.tag?"":b.tag),title:b.tag,children:["#",b.tag," ",(0,e.jsx)("span",{style:{opacity:.55},children:b.n})]},b.tag))})]}),(Z!=="all"||ie||z)&&(0,e.jsxs)("button",{type:"button",className:"lg lg-clear",style:{color:"#f87171"},onClick:()=>{_e("all"),Ie(!1),S("")},children:[c("clearFilter")," \u2715"]})]})})]}),(0,e.jsxs)("label",{className:"me-gswitch"+(y?" on":""),title:c("crossVault"),children:[(0,e.jsx)("input",{type:"checkbox",checked:!!y,onChange:b=>x&&x(b.target.checked)}),(0,e.jsx)("span",{className:"track","aria-hidden":"true"}),(0,e.jsx)("span",{children:c("crossVault")})]}),(0,e.jsx)("button",{type:"button",className:"me-gtool"+(ie?" on":""),"aria-pressed":ie,onClick:()=>Ie(b=>!b),children:c("timeDim")}),(0,e.jsx)("span",{className:"me-gdiv","aria-hidden":"true"}),(0,e.jsx)("button",{type:"button",className:"me-gtool",onClick:()=>{let b=_.current;if(b)try{b.toBlob(p=>{p&&se({url:URL.createObjectURL(p),blob:p})},"image/png")}catch{}},children:c("exportGraph")}),(0,e.jsx)("button",{type:"button",className:"me-gtool",onClick:()=>L.current&&L.current(),children:c("fit")}),(0,e.jsx)("button",{type:"button",className:"me-gtool",onClick:()=>{Be(null),_e("all"),U.current&&U.current()},children:c("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)(Cr,{crumbs:a,t:c,onPick:g,busy:k}),u&&(0,e.jsxs)("div",{className:"me-graph-levelerr",role:"alert",children:[(0,e.jsx)("span",{style:{flex:"none",fontWeight:800},children:u.timeout?"\u23F1":"\u2715"}),(0,e.jsx)("span",{className:"msg",children:(u.timeout?c("graphLevelTimeout").replace("{ms}",String(1600)):c("graphLevelError"))+"\uFF1A"+u.message}),(0,e.jsx)("button",{type:"button",onClick:()=>w&&w(),children:c("graphRetry")})]}),!u&&k&&(0,e.jsxs)("div",{className:"me-graph-levelbusy",role:"status","aria-live":"polite",children:[(0,e.jsx)(ma,{small:!0}),c("graphLevelLoading")]}),v!==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)(ma,{value:v,small:!0}),(0,e.jsxs)("span",{children:[c("graphWarming").replace("{n}",P.length)," \xB7 ",Math.round(v),"%"]})]}),(0,e.jsxs)("div",{className:"mc-v5-graph-legend",children:[(0,e.jsx)("div",{className:"mc-v5-graph-legend-title",children:c("graphLegendTitle")}),Object.keys(St.colors).filter(b=>E[b]).map(b=>(0,e.jsxs)("div",{className:"mc-v5-graph-legend-row",children:[(0,e.jsx)("i",{style:{background:St.colors[b],boxShadow:"0 0 0 3px "+St.colors[b]+"24"}}),(0,e.jsx)("span",{children:c(nt[b]||"kindKnowledge")}),(0,e.jsx)("b",{children:E[b]})]},b))]}),(0,e.jsx)("div",{className:"me-graph-tooltip",ref:Me,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)"}}),ue&&(0,e.jsx)("div",{className:"mc-empty",style:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)"},children:c("noMatch")}),de&&(0,e.jsx)("div",{className:"me-graph-ctx-back",style:{position:"fixed",inset:0,zIndex:30},onMouseDown:()=>m(null)}),de&&(0,e.jsxs)("div",{className:"me-graph-ctxmenu",style:{position:"fixed",left:de.x,top:de.y,zIndex:31},onMouseDown:b=>b.stopPropagation(),children:[de.planet&&(0,e.jsxs)("button",{type:"button",onClick:()=>{let b=de.id;m(null),he.current&&he.current(b)},children:[c("graphEnter")," \u203A"]}),de.planet&&(0,e.jsx)("div",{style:{padding:"4px 10px 6px",fontSize:11,opacity:.7},children:c("graphPlanetCards").replace("{n}",String(de.count||0))}),!de.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{B.current({path:de.path,title:de.title}),m(null)},children:c("openCard")}),!de.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{de.id&&(R.current.selectedId=de.id,Be(de.id)),m(null);let b=R.current;b&&b.requestRender&&b.requestRender()},children:c("focusNeighbors")}),(0,e.jsx)("button",{type:"button",onClick:()=>{try{navigator.clipboard&&navigator.clipboard.writeText(de.title||"")}catch{}m(null),Ge(c("copied"))},children:c("copyName")}),!de.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{let b=R.current,p=b&&Array.isArray(b.multi)?b.multi.slice():[],le=de.id;if(le&&!p.includes(le)&&p.push(le),m(null),p.length<2){Ge(c("mergeNeed"),!1);return}if(!window.confirm(c("mergeConfirm")))return;let De=ce.current&&ce.current(p);De&&De.then?De.then(f=>f?Ge(c("merged")):Ge(c("mergeFail"),!1)).catch(()=>Ge(c("mergeFail"),!1)):De&&Ge(c("merged"))},children:c("merge")}),!de.planet&&(0,e.jsx)("button",{type:"button",style:{color:"#f87171"},onClick:()=>{let b=de.path;m(null),window.confirm(c("deleteConfirm"))&&(async()=>{try{(X.current?await X.current(b):!1)?Ge(c("deleted")):Ge(c("deleteFail"),!1)}catch{Ge(c("deleteFail"),!1)}})()},children:c("delete")})]}),we.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:[we.length," ",c("nodes")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let p=we.map(C=>ke[C]).filter(Boolean).map(C=>C.title||C.name).join(`
|
|
1055
|
-
`),le=new Blob([
|
|
1050
|
+
`);let St=new Blob([ke],{type:Qe}),Rt=await Mr(St,ge,!1);if(!Rt.ok){oe({ok:!1,msg:t("exportFail")}),Be(!1);return}oe({ok:!0,msg:t("exportedTo")+"\uFF1A"+t("defaultDownloads")+" \xB7 "+Rt.name})}catch(ne){oe({ok:!1,msg:t("exportFail")+" \xB7 "+(ne.message||"")})}finally{Be(!1)}I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),2600)},Xt=async h=>{let j=h.target.files&&h.target.files[0];if(h.target.value="",!!j){try{let ne=await j.text(),ke=await(await fetch(`${V}/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:ne})).json();if(ke.ok){await ae();let ge=ke.imported||0,Qe=t("importedVault")+"\uFF1A"+ge;ke.total&&(Qe+=t("importedTotal")+ke.total+t("importedTotalTail")),ke.quarantined&&(Qe+=t("importedQuarantine")+ke.quarantined+t("importedQuarantineTail")),ke.skipped&&(Qe+=t("importedSkipped")+ke.skipped+t("importedSkippedTail")),ke.warning&&(Qe+=" \xB7 "+ke.warning),oe({ok:ge>0||!ke.total,msg:Qe})}else oe({ok:!1,msg:ke.error||t("importFail")})}catch{oe({ok:!1,msg:t("importFail")})}I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),2400)}},ga=async()=>{if(!de){d(!0);try{let h=await fetch(`${V}/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);oe({ok:!0,msg:j}),await ae(),Ue()}else oe({ok:!1,msg:h&&h.error||t("skillsSyncFail")})}catch{oe({ok:!1,msg:t("skillsSyncFail")})}finally{d(!1)}I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),3600)}},it=(0,r.useMemo)(()=>{let h=u.slice();return pe!=="all"&&(h=h.filter(j=>Ut(j.submittedBy)===pe)),P!=="all"&&(h=h.filter(j=>(j.status||"approved")===P)),X&&(h=h.filter(j=>U.has(j.path))),Z==="title"?h.sort((j,ne)=>String(j.title||"").localeCompare(String(ne.title||""))):Z==="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},[u,Z,pe,P,X,U]),Tt=(0,r.useMemo)(()=>[...new Set(u.map(h=>Ut(h.submittedBy)))],[u]),At=(0,r.useMemo)(()=>{let h={};for(let j of u){let ne=new Set(j.tags||[]),xe=0;for(let ke of u)ke.path!==j.path&&(ke.tags||[]).some(ge=>ne.has(ge))&&xe++;h[j.path]=xe}return h},[u]),[gt,oa]=(0,r.useState)(null),tt=(0,r.useMemo)(()=>{if(!it.length)return null;let h=gt?it.find(ne=>ne.path===gt):null;return h||it.find(ne=>Date.now()-new Date(ne.updated||0).getTime()>21*864e5)||it[0]},[it,gt]),Ot=()=>{if(!it.length)return;let h=it.findIndex(j=>j.path===(tt&&tt.path));oa(it[(h+1+it.length)%it.length].path)},st=!L&&R==="all"&&!re&&P==="all"&&!!tt;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:ht}),!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(O==="cards"?"cardsTab":O==="graph"?"graphTab":O==="news"?"newsTab":O==="stats"?"tabUsage":O==="audit"?"tabAudit":O==="optimize"?"tabRecycle":O==="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:"?"})]})]}),F&&(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(F.evidence?.recalls??0)).replace("{cards}",String(F.evidence?.cards??0))})]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>{Ca("https://github.com/EternalNight996/memory-eternal"),v("never")},children:["\u2605 ",t("starAskGo")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>v("later"),children:t("starAskLater")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>v("never"),children:t("starAskNever")})]}),Le&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(Le.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:Le.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:Le.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{children:Le.msg})]}),a&&(0,e.jsxs)("div",{className:"me-modal-head",children:[(0,e.jsxs)("div",{className:"me-modal-title",children:[(0,e.jsx)("span",{className:"me-wicon",children:(0,e.jsx)("img",{src: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"})})})]}),x&&x.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:[x.reason,(0,e.jsx)("div",{style:{opacity:.68,fontSize:11.5,marginTop:2},children:t("captureAlertHint")})]}),(0,e.jsx)("span",{style:{opacity:.7},children:x.since?jt(new Date(x.since).toISOString()):""})]}),(0,e.jsxs)("div",{className:"me-modal-body",children:[(0,e.jsxs)("div",{className:`mc-rail${we?" open":""}`,children:[(0,e.jsxs)("div",{className:"mc-v5-rail-top",children:[we&&(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:()=>b(h=>!h),"aria-label":t(we?"collapse":"expand"),title:t(we?"collapse":"expand"),children:we?"\xAB":"\xBB"})]}),we&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navWorkspace")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="cards"?" active":""}`,onClick:()=>te("cards"),title:t("cardsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E0}"}),we&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("cardsTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="graph"?" active":""}`,onClick:()=>te("graph"),title:t("graphTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F52E}"}),we&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("graphTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="news"?" active":""}`,onClick:()=>te("news"),title:t("newsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4F0}"}),we&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("newsTab")}),Y>0&&(0,e.jsx)("span",{className:"mc-dot",children:Y>99?"99+":Y})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="stats"?" active":""}`,onClick:()=>te("stats"),title:t("tabUsage"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4C8}"}),we&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabUsage")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="audit"?" active":""}`,onClick:()=>te("audit"),title:t("tabAudit"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F50D}"}),we&&(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})]}),we&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSystem")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="optimize"?" active":""}`,onClick:()=>te("optimize"),title:t("tabRecycle"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u267B\uFE0F"}),we&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabRecycle")}),mt>0&&(0,e.jsx)("span",{className:"mc-dot",style:{background:"#6b7280"},children:mt>99?"99+":mt})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="terminal"?" active":""}`,onClick:()=>te("terminal"),title:t("terminalTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u25B8_"}),we&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("terminalTab")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:Bt,title:t("webTab"),"aria-label":t("webTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F310}"}),we&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("webTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${O==="config"?" active":""}`,onClick:()=>te("config"),title:t("tabConfig"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2699\uFE0F"}),we&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabConfig")})]}),we&&(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}"}),we&&(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"}),we&&(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}"}),we&&(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}"}),we&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("fbNav")})]}),we&&(0,e.jsxs)("button",{type:"button",className:"mc-quote",onClick:()=>le(h=>(h+1)%Sa.length),title:`${Sa[c]}
|
|
1051
|
+
${Bn}
|
|
1052
|
+
${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:Bn})]})]}),(0,e.jsxs)("div",{className:"mc-main",ref:l,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,O==="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:[u.length," / ",ut]})]}),O==="cards"&&(0,e.jsx)(Ko,{t,notify:(h,j)=>oe({ok:h,msg:j}),onPromoted:()=>{ae(),Ue()}}),O==="cards"&&(0,e.jsxs)("div",{className:"mc-toolbar",children:[(0,e.jsx)("input",{type:"text",placeholder:t("searchPlaceholder"),value:L,onChange:h=>Ie(h.target.value)}),re&&(0,e.jsxs)("button",{type:"button",className:"mc-chip active",title:t("clearFilter"),onClick:()=>Oe(""),children:["\u{1F3F7} ",re," ",(0,e.jsx)("span",{style:{opacity:.7},children:"\u2715"})]}),(0,e.jsx)("input",{ref:ie,type:"file",accept:".json,application/json",style:{display:"none"},onChange:Xt}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>ie.current&&ie.current.click(),children:t("importVault")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>f({kind:"knowledge",title:"",body:"",tags:"",template:""}),children:["+ ",t("newCard")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:de,onClick:ga,title:t("skillCardsHint"),children:de?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:Fe,onClick:()=>Kt("md"),children:t(Fe?"exporting":"exportVault")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:Fe,onClick:()=>Kt("json"),children:t(Fe?"exporting":"exportJson")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>ae(),children:t("refresh")})]}),O==="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:()=>Se(h),children:[t(h==="all"?"all":ot[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${X?" active":""}`,onClick:()=>ce(h=>!h),children:["\u{1F4CC} ",t("pinnedOnly"),(0,e.jsx)("span",{className:"mc-chip-n",children:U.size})]}),(0,e.jsxs)("select",{value:pe,onChange:h=>Q(h.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsxs)("option",{value:"all",children:["\u{1F916} ",t("allAgents")]}),Yn(Tt).map(h=>(0,e.jsx)("option",{value:h,children:h},h))]}),(0,e.jsxs)("select",{value:P,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${Z===h.key?" active":""}`,onClick:()=>We(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:O==="cards"?"contents":"none"},children:p?(0,e.jsx)(eo,{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:()=>ae(),children:t("retry")})]}):u.length===0?(0,e.jsx)("div",{className:"mc-empty",children:t("empty")}):(0,e.jsxs)(e.Fragment,{children:[st&&(0,e.jsxs)("div",{className:"mc-v5-feature",onClick:()=>kt(tt),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:tt.title}),(0,e.jsx)("p",{children:en(tt)}),(0,e.jsxs)("div",{className:"mc-v5-feature-meta",children:[(0,e.jsxs)("span",{children:[$t[tt.kind]||"\u{1F4CE}"," ",t(ot[tt.kind]||"kindKnowledge")]}),(0,e.jsxs)("span",{children:["\u{1F552} ",jt(tt.updated)]}),(tt.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)(Zn,{n:At[tt.path]||0,color:bt[tt.kind]||bt.other,size:58}),(0,e.jsx)("b",{children:At[tt.path]||0}),(0,e.jsx)("span",{children:t("links")}),(0,e.jsx)("button",{type:"button",className:"mc-v5-feature-shuffle",onClick:h=>{h.stopPropagation(),Ot()},children:t("reshuffle")}),(0,e.jsx)("span",{className:"mc-v5-feature-open",children:t("openArrow")})]})]}),(0,e.jsx)("div",{className:"mc-grid",children:it.filter(h=>!st||h.path!==tt.path).map(h=>(0,e.jsx)(gr,{card:h,t,query:L.trim(),onOpen:kt,onDelete:je,onTagClick:Oe,pinned:U.has(h.path),onPin:he,onCore:wt,links:At[h.path]||0},h.path))}),u.length<ut&&(0,e.jsx)("div",{ref:Gt,style:{height:1}}),Mt&&(0,e.jsxs)("div",{className:"mc-empty",style:{padding:"10px 0"},children:[t("loading"),"\uFF08",u.length," / ",ut,"\uFF09"]})]})}),(0,e.jsx)("div",{style:{display:O==="graph"?"flex":"none",flex:1,minHeight:0},children:y.has("graph")&&(0,e.jsx)(wr,{t,onOpen:kt,all:ve,onAllChange:ye,onMutate:Ue,active:O==="graph",visible:O==="graph"})}),(0,e.jsx)("div",{style:{display:O==="news"?"contents":"none"},children:y.has("news")&&(0,e.jsx)(dr,{t,version:C,onUnreadChange:E})}),(0,e.jsx)("div",{style:{display:O==="terminal"?"contents":"none"},children:y.has("terminal")&&(0,e.jsx)(Go,{t})}),(0,e.jsx)("div",{style:{display:O==="config"?"contents":"none"},children:y.has("config")&&(0,e.jsx)(Vn,{t,onReload:()=>ae(),version:C})}),(0,e.jsx)("div",{style:{display:O==="stats"?"contents":"none"},children:y.has("stats")&&(0,e.jsx)(fr,{t,tab:"stats",onReload:()=>ae(),version:C})}),(0,e.jsx)("div",{style:{display:O==="audit"?"contents":"none"},children:y.has("audit")&&(0,e.jsx)(Xo,{t,onReload:()=>{ae(),Ue()},version:C})}),(0,e.jsx)("div",{style:{display:O==="optimize"?"contents":"none"},children:y.has("optimize")&&(0,e.jsx)(mr,{t,onReload:()=>{ae(),Ue()},version:C})}),H&&(0,e.jsx)(hr,{t,onClose:()=>se(!1)}),Ce&&(0,e.jsx)(yr,{t,tab:rt,onTab:yt,onClose:()=>me(!1),onFeedback:()=>{me(!1),se(!0)},onReplay:()=>{me(!1),pt(!0)}}),$e&&(0,e.jsx)(xr,{t,onDone:et}),ue&&(0,e.jsx)(vr,{t,card:ue,query:L.trim(),onNavigate:h=>{let j=it.findIndex(xe=>xe.path===ue.path),ne=it[j+h];ne&&kt(ne)},onTagClick:Oe,onClose:()=>Me(null),onDelete:h=>{Me(null),je(h)},onFeedback:h=>{let j=ue.path;fetch(`${V}/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:L.trim(),path:j,useful:h})}).then(()=>oe({ok:!0,msg:t(h?"fbUseful":"fbIrr")})).catch(()=>{}),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),2e3)},allCards:it,onOpenRelated:h=>kt(h),onKindChange:wt,onSaved:async({path:h,status:j,title:ne})=>{try{let xe=j&&j!=="approved"?`&status=${encodeURIComponent(j)}`:"",ke=await fetch(`${V}/card?path=${encodeURIComponent(h)}${xe}`).then(ge=>ge.json());ke&&ke.ok&&Me(ge=>ge&&ge.path===h?{...ge,title:ne||ke.title||ge.title,text:ke.text}:ge)}catch{}await ae(),Ue(),oe({ok:!0,msg:t("editSaved")}),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(null),2e3)}}),(0,e.jsx)(br,{t,newCard:Ae,setNewCard:f,onCreated:()=>{ae(),Ue(),oe({ok:!0,msg:t("created")}),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>oe(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 Xa=(0,r.createContext)({form:null,set:()=>{}}),Jo=new Set(["autoRestartOnDrift","coreMemoryEnabled","skillCardsAutoSync","workingMemoryEnabled"]);function Xe({k:t,label:a,hint:n,type:i="text",step:s,min:m,max:g}){let{form:S,set:u}=(0,r.useContext)(Xa);return(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:a||t}),(0,e.jsx)("input",{type:i,step:s,min:m,max:g,value:S?S[t]??"":"",onChange:N=>{let p=N.target.value;u(t,i==="number"?p===""?"":Number(p):p)}}),n?(0,e.jsx)("span",{className:"mc-field-hint",children:n}):null]})}function dt({k:t,label:a}){let{form:n,set:i}=(0,r.useContext)(Xa),s=n?n[t]:void 0,m=s===void 0?Jo.has(t):!!s;return(0,e.jsxs)("label",{className:"mc-switch",children:[(0,e.jsx)("input",{type:"checkbox",checked:m,onChange:g=>i(t,g.target.checked)}),(0,e.jsx)("span",{children:a||t})]})}function Et({icon:t,title:a,sub:n,children:i}){return(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:t}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:a}),n?(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:n}):null]})]}),(0,e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:13},children:i})]})}function Vn({t,onReload:a,version:n,compact:i}){let[s,m]=(0,r.useState)(null),[g,S]=(0,r.useState)(0),[u,N]=(0,r.useState)(null),[p,w]=(0,r.useState)(null),[x,T]=(0,r.useState)(!1),[q,G]=(0,r.useState)(!1),R=(0,r.useRef)(!1),$=(0,r.useRef)(null),L=(0,r.useRef)({}),[W,pe]=(0,r.useState)(null),[Q,P]=(0,r.useState)(null),[K,U]=(0,r.useState)(""),[B,X]=(0,r.useState)(""),[ce,he]=(0,r.useState)(""),[re,_e]=(0,r.useState)(null),[O,Ee]=(0,r.useState)(null),[y,De]=(0,r.useState)(null),te=(0,r.useCallback)(async(l,ee=!1)=>{ee||X("version");try{let ae=await fetch(V+"/version-check"+(l?"?force=1":"")).then(je=>je.json());ae&&ae.ok?(De(ae),l&&d(ae.updateAvailable?t("vcLatest")+" v"+ae.latest:t("vcUpToDate"))):l&&d(t("vcCheckFail"),!1)}catch{l&&d(t("vcCheckFail"),!1)}finally{ee||X("")}},[t]);(0,r.useEffect)(()=>{te(!1);let l=setInterval(()=>{te(!1,!0)},6e4),ee=()=>{typeof document<"u"&&!document.hidden&&te(!1,!0)};return document.addEventListener("visibilitychange",ee),()=>{clearInterval(l),document.removeEventListener("visibilitychange",ee)}},[n,te]);let[Z,We]=(0,r.useState)(""),[Le,oe]=(0,r.useState)(null),[F,z]=(0,r.useState)(""),[v,I]=(0,r.useState)(!1),ie=(0,r.useRef)(null),Fe=(0,r.useRef)(0),Be=l=>{Fe.current=l.currentTarget.scrollTop};(0,r.useLayoutEffect)(()=>{let l=ie.current;l&&Math.abs(l.scrollTop-Fe.current)>1&&(l.scrollTop=Fe.current)});let de=(0,r.useRef)(null),d=(l,ee=!0)=>{de.current&&clearTimeout(de.current),oe({msg:l,ok:ee}),de.current=setTimeout(()=>oe(null),1900)},Y=async()=>{if(!B){X("restart");try{let l=await fetch(V+"/restart-self",{method:"POST"});if(l.status===404||l.status===405){d($e("vcRestartNoRoute",{cmd:y&&y.restartCommand||"dsh-memory restart --port 7999"}),!1);return}let ee=await l.json().catch(()=>null);if(!ee){d(t("vcRestartFail")+"\uFF08HTTP "+l.status+"\uFF09",!1);return}if(!ee.ok){d(ee.error||t("vcRestartFail"),!1);return}if(ee.alreadyCurrent){d(ee.note||t("vcRestartCurrent"));return}d(ee.note||t("vcRestartSent")),ee.alreadyRunning||setTimeout(()=>{te(!0)},6e3)}catch(l){d(t("vcRestartFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{X("")}}},E=y&&y.resident?String(y.resident.served||""):"",ue=!!(y&&y.onDisk&&E&&E!==y.onDisk),Me=!!(y&&y.resident&&y.resident.managed===!1&&y.resident.managedKnown===!1),ve=y&&y.resident&&y.resident.replaceBlocked&&y.resident.replaceBlocked.fresh||null,ye=!!(y&&y.resident&&y.resident.managedBy==="host"),H=!!(y&&y.resident&&y.resident.managed===!1&&!Me&&!ye),se=!!(y&&y.resident&&!E),Ce=ue||se||H||Me,me=fn({hasVersion:!!y,hostVersion:y?y.loaded:"",onDisk:y?y.onDisk:"",residentServed:y&&y.resident?y.resident.served:"",residentPresent:!!(y&&y.resident),residentManaged:y&&y.resident?y.resident.managed:null,residentManagedKnown:y&&y.resident?y.resident.managedKnown:null,residentManagedBy:y&&y.resident?y.resident.managedBy:"",replaceBlocked:y&&y.resident?y.resident.replaceBlocked:null}),rt={hostProcessStale:()=>$e("vcHostProcessStale",{disk:y.onDisk,loaded:y.loaded}),residentDown:()=>$e("vcResidentDown",{port:y.resident&&y.resident.port||"",cmd:y.restartCommand||"dsh-memory restart --port 7999"}),residentReplaceBlocked:()=>$e("vcResidentReplaceBlocked",{served:E,err:ve&&ve.error||"",path:ve&&ve.lockPath||"",cmd:y.restartCommand||"dsh-memory restart --port "+(y.resident&&y.resident.port||7999)}),residentLockUnknown:()=>$e("vcResidentLockUnknown",{served:E,path:y.resident&&y.resident.lock&&y.resident.lock.path||"",err:y.resident&&y.resident.lock&&y.resident.lock.error||""}),residentUnmanaged:()=>$e("vcResidentUnmanaged",{served:E,cmd:y.restartCommand||"dsh-memory restart --port 7999"})},yt={restartStart:()=>$e("vcRestartStart",{disk:y&&y.onDisk||""}),restartRepair:()=>$e("vcRestartRepair",{disk:y&&y.onDisk||""}),restartFixes:()=>$e("vcRestartFixes",{served:E||"",disk:y&&y.onDisk||""}),restartHostOnly:()=>$e("vcRestartHostOnly",{loaded:y&&y.loaded||"",disk:y&&y.onDisk||""}),restartAnyway:()=>$e("vcRestartAnyway",{ver:y&&y.onDisk||""})},$e=(l,ee)=>Object.keys(ee).reduce((ae,je)=>ae.split("{"+je+"}").join(ee[je]),t(l)),pt=(0,r.useCallback)(async()=>{try{let[l,ee,ae,je]=await Promise.all([fetch(`${V}/config`).then(Ie=>Ie.json()).catch(()=>null),fetch(`${V}/setup-status`).then(Ie=>Ie.json()).catch(()=>null),fetch(`${V}/budget`).then(Ie=>Ie.json()).catch(()=>null),fetch(`${V}/llm-routes`).then(Ie=>Ie.json()).catch(()=>null)]);if(je&&je.ok&&Ee(je),l&&l.ok){m(l),S(l.revision??0),N(l.schema??null);let Ie=En(l.config??{},L.current);L.current=Ie.overlay,w({...Ie.values}),I(!1),pe(l.dsh??null),T(l.writable===!1),G(l.viaPending===!0),U(""),R.current=!1}else ae&&ae.ok?(w({...ae}),I(!1),T(!0),U(t("configNeedsDsh"))):U(t("adminLoadFail"));ee&&ee.ok&&P(ee),he("")}catch{U(t("adminLoadFail"))}},[t]);(0,r.useEffect)(()=>{pt()},[n,pt]);let et=(l,ee)=>{R.current=!0,I(!0),z(""),w(ae=>({...ae??{},[l]:ee}))};(0,r.useEffect)(()=>{$.current=pt},[pt]),(0,r.useEffect)(()=>{if(typeof EventSource>"u")return;let l=null;try{l=new EventSource(V+"/events")}catch{return}let ee=()=>{!R.current&&typeof $.current=="function"&&$.current()};try{l.addEventListener("config",ee)}catch{}return()=>{try{l.close()}catch{}}},[]);let xt=new Set(["dedupThreshold","captureMinChars","captureCooldownMs","maxCardsPerDay","captureMaxTokens","recallMinScore","recallLimit","recallSummaryLen","recycleRetentionDays","webPort","webCheckIntervalMs","webMaxRestart","sessionBudgetChars","coreMemoryLimit","coreMemoryMaxChars"]),qe=l=>({init:t("modeInit"),interval:t("modeInterval"),manual:t("modeManual")})[l]||l,Bt=async()=>{if(!p)return;if(x){d(t("editInSetting"),!1);return}let l={dedupThreshold:[0,1],captureMinChars:[0,1e6],captureCooldownMs:[0,1e9],maxCardsPerDay:[0,1e6],captureMaxTokens:[100,4e3],recallMinScore:[0,50],recallLimit:[1,20],recallSummaryLen:[40,400],recycleRetentionDays:[1,3650],webPort:[1,65535],webCheckIntervalMs:[1e3,6e5],webMaxRestart:[1,1e3],sessionBudgetChars:[0,1e9],coreMemoryLimit:[1,20],coreMemoryMaxChars:[200,1e4]},ee=[];for(let[ae,[je,Ie]]of Object.entries(l)){if(!(ae in p))continue;let Se=p[ae],Oe=typeof Se=="number"?Se:Number(Se);(Se===""||Se===null||Se===void 0||!Number.isFinite(Oe)||Oe<je||Oe>Ie)&&ee.push(t("invalidField",{field:ae,min:je,max:Ie,value:String(Se===""?"\u7A7A":Se)}))}if(ee.length){let ae=t("saveInvalid")+"\uFF1A"+ee.join("\uFF1B");U(ae),d(ae,!1);return}X("save");try{let ae={...p};for(let Oe of Object.keys(p))Oe in ae&&typeof ae[Oe]=="string"&&ae[Oe].trim()!==""&&xt.has(Oe)&&(ae[Oe]=Number(ae[Oe]));Array.isArray(ae.vaultProfiles)&&(ae.vaultProfiles=ae.vaultProfiles.filter(Oe=>Oe&&(String(Oe.name||"").trim()||String(Oe.path||"").trim())));let je=await fetch(`${V}/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:ae,expectedRevision:g})}),Ie=await je.text(),Se=null;try{Se=Ie?JSON.parse(Ie):null}catch{Se=null}if(Se||(Se={error:"HTTP "+je.status+(Ie?"\uFF1A"+Ie.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")}),Se&&Se.ok){let Oe=typeof Se.pendingOutcome=="string"?Se.pendingOutcome:"",wt,kt=!0;if(Oe==="applied")wt=t("savedApplied")+(Array.isArray(Se.applied)&&Se.applied.length?" \xB7 "+Se.applied.join("\u3001"):"");else if(Oe==="queued")kt=!1,wt=t("saveQueued");else if(Oe==="failed")kt=!1,wt=t("saveFail")+" \xB7 "+(Se.hostGuard?t("saveHostGuard"):t("saveFailHint"));else if(Oe==="applied-direct")wt=t("savedOk")+" \xB7 "+t("savedDirect");else{let Kt=Array.isArray(Se.pending)&&Se.pending.length?" \xB7 "+t("savePending"):Se.note?" \xB7 "+t("restartHint"):"";wt=(Se.retried?"\u267B ":"")+t("savedOk")+Kt}L.current={...L.current,...ae},kt?(z(""),I(!1),he(wt)):U(wt),d(wt,kt),await pt()}else{let Oe=je.status===409?t("conflictRefresh"):Se?.error||t("saveFail");U(Oe),d(Oe,!1)}}catch{U(t("saveFail")),d(t("saveFail"),!1)}finally{X("")}},we=()=>{L.current={},w({...s?.config??{}}),z(""),I(!1),he("")},b={env:"vaultSrcEnv",profile:"vaultSrcProfile",workspace:"vaultSrcWorkspace",vaultDir:"vaultSrcVaultDir",default:"vaultSrcDefault"},c=l=>Array.isArray(l?.vaultProfiles)?l.vaultProfiles:[],le=(l,ee,ae)=>{R.current=!0,I(!0),w(je=>{let Ie=c(je).map(Oe=>({...Oe||{}})),Se={...Ie[l]||{}};return ee==="match"?String(ae).trim()?Se.match={...Se.match||{},workspace:ae}:delete Se.match:Se[ee]=ae,Ie[l]=Se,{...je??{},vaultProfiles:Ie}})},Ae=()=>{R.current=!0,I(!0),w(l=>({...l??{},vaultProfiles:[...c(l),{name:"",path:""}]}))},f=l=>{R.current=!0,I(!0),w(ee=>({...ee??{},vaultProfiles:c(ee).filter((ae,je)=>je!==l)}))},C={fontSize:11,padding:"2px 8px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:6},Re={padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:12,minWidth:0},Ue={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}},o=l=>{let ee=Ue[l];ee&&(w(ae=>({...ae??{},...ee})),R.current=!0,I(!0),z(l),d($e("planApplied",{plan:ee.label})))},mt=async()=>{try{let l=await fetch(V+"/setup-status").then(ee=>ee.json());l&&l.ok&&P(l)}catch{}},vt=async(l,ee)=>{X(l+ee);try{let je=await(await fetch(`${V}/mcp/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:l,action:ee})})).json();je&&je.ok?d($e(ee==="install"?"mcpInstalled":"mcpUninstalled",{agent:l})):d($e("mcpActionFail",{agent:l,error:je?.error||""}),!1);try{let Ie=await fetch(`${V}/setup-status`).then(Se=>Se.json());Ie&&Ie.ok&&P(Ie)}catch{}}catch{d(t("mergeFail"),!1)}finally{X("")}},ut=Q&&Array.isArray(Q.agents)?Q.agents:[],Ct=ut.filter(l=>l.installed),Mt=[...new Set(Ct.flatMap(l=>Array.isArray(l.servers)?l.servers:[]))],qt=ut.filter(l=>l.mcpConfigured&&!l.isDsh).length,Gt=ut.some(l=>Array.isArray(l.servers));return(0,e.jsx)(Xa.Provider,{value:{form:p,set:et},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:ht}),Le&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(Le.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:Le.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:Le.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:Le.msg})]}),(0,e.jsxs)("div",{ref:ie,onScroll:Be,style:{flex:1,minHeight:0,overflow:"auto",overscrollBehavior:"contain",scrollbarGutter:"stable",padding:4},children:[!i&&(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")]})]}),K&&(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 ",K]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:pt,children:["\u21BB ",t("retry")]})]}),q&&(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")]}),x&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #f59e0b",background:"rgba(245,158,11,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#b45309"},children:["\u2139\uFE0F ",t("configNeedsDsh")," \u2014\u2014 ",t("editInSetting")]}),ce&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #10b981",background:"rgba(16,185,129,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#059669"},children:["\u2713 ",ce]}),s&&(s.version||s.dsh?.vaultDir)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F4E6} ",t("pluginInfo")]}),(0,e.jsx)("span",{style:{fontSize:12,opacity:.7},children:t("dshHostLabel")}),s.version&&(0,e.jsxs)("code",{style:C,children:[t("vcLoaded")," v",s.version]}),y&&y.resident&&y.resident.served&&y.resident.served!==s.version&&(0,e.jsxs)("code",{style:C,children:[t("vcResident")," v",y.resident.served]}),y&&y.resident&&!y.resident.served&&(0,e.jsxs)("code",{style:{...C,color:"#b45309",fontWeight:600},children:[t("vcResident")," ",t("vcResidentDownShort")]}),y&&y.resident&&y.resident.served&&y.resident.managed===!1&&(0,e.jsxs)("code",{style:{...C,color:"#b45309",fontWeight:600},children:[t("vcResident")," v",y.resident.served," \xB7 ",t(ve?"vcResidentReplaceBlockedShort":ye?"vcResidentHostManagedShort":Me?"vcResidentLockUnknownShort":"vcResidentUnmanagedShort")]}),na&&(0,e.jsxs)("code",{style:C,children:[t("vcPage")," v",na]}),y&&y.onDisk&&(0,e.jsxs)("code",{style:C,children:[t("vcOnDisk")," v",y.onDisk]}),y&&y.latest&&(0,e.jsxs)("code",{style:C,children:[t("vcLatest")," v",y.latest]}),s.dsh?.vaultDir&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.6},children:["\u{1F4C1} ",s.dsh.vaultDir]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:B==="version",onClick:()=>te(!0),children:B==="version"?t("checking"):"\u{1F504} "+t("vcCheck")})]}),y&&me.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 ",rt[me.warn]?rt[me.warn]():""]})}),me.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"+(me.emphasis?" me-on":""),disabled:!!B,onClick:Y,children:B==="restart"?"\u23F3 "+t("vcRestarting"):"\u{1F504} "+t("vcRestart")}),y.restartCommand&&(0,e.jsx)("code",{style:{fontSize:11,opacity:.75},children:y.restartCommand}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:yt[me.hint]?yt[me.hint]():""})]}),na&&y&&y.onDisk&&na!==y.onDisk&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.7},children:t("vcPageStale",{page:na,disk:y.onDisk})}),y&&y.updateAvailable&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,opacity:.88},children:["\u2B06 ",t("vcOutdated")," \u2192 ",(0,e.jsx)("code",{children:y.updateCommand})]}),y&&y.checkError&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#b91c1c"},children:[t("vcCheckFail"),"\uFF1A",y.checkError]})]}),Q&&Q.agents&&(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:"\u{1F50C}"}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:t("mcpSetupStatus")}),(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:t("mcpAutoHint")})]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",flex:"none"},onClick:mt,children:t("mcpRefresh")})]}),Gt?(0,e.jsx)("div",{className:"mc-mcp-summary",children:$e("mcpSummary",{agents:Ct.length,servers:Mt.length,mounted:qt})}):null,ut.map(l=>{let ee=Array.isArray(l.servers),ae=ee?l.servers:[],je=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:je}),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?ae.length?(0,e.jsx)("div",{className:"mc-mcp-servers",children:ae.map(Ie=>(0,e.jsx)("code",{className:Ie==="memory"?"on":"",children:Ie},Ie))}):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:!!B,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:!!B,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:!!B,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,marginTop:6},children:t("mcpSetupHint")}),Z&&(0,e.jsx)("div",{style:{fontSize:11,marginTop:6},children:(0,e.jsx)("code",{style:{padding:"2px 6px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:4},children:Z})})]}),p?(0,e.jsxs)("div",{className:"mc-cfg",children:[(0,e.jsxs)(Et,{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"+(F===l?" on":""),"aria-pressed":F===l,onClick:()=>o(l),disabled:!!B,children:[(0,e.jsxs)("b",{children:[F===l?"\u2705 ":l==="A"?"\u{1F7E2} ":l==="B"?"\u{1F4B0} ":"\u2B50 ",Ue[l].label]}),(0,e.jsx)("span",{children:t("planDesc"+l)})]},l))}),F?(0,e.jsxs)("div",{style:{fontSize:11,color:"#10b981"},children:["\u2705 ",$e("planApplied",{plan:Ue[F].label})]}):null]}),(0,e.jsx)(Et,{icon:"\u{1F9E0}",title:t("dshMemoryConfig"),sub:t("cfgSubCore"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(dt,{k:"enabled",label:t("enabledLabel")}),(0,e.jsx)(dt,{k:"autoCapture",label:t("autoCapture")}),(0,e.jsx)(dt,{k:"autoRecall",label:t("autoRecall")}),(0,e.jsx)(Xe,{k:"vaultDir",label:t("vaultDirLabel")}),(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:"recallLimit",label:t("recallLimit"),type:"number"}),(0,e.jsx)(Xe,{k:"recallSummaryLen",label:t("recallSummaryLen"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(dt,{k:"recallIncludeBody",label:t("recallBody")}),(0,e.jsx)(Xe,{k:"secretHint",label:t("secretHint")}),(0,e.jsx)(Xe,{k:"recallEmbedding",label:t("recallEmbedding")})]})}),(0,e.jsx)(Et,{icon:"\u2B50",title:t("coreMemory"),sub:t("coreMemoryHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(dt,{k:"coreMemoryEnabled",label:t("coreMemoryEnabled")}),(0,e.jsx)(dt,{k:"workingMemoryEnabled",label:t("workingMemoryEnabled")}),(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)(Et,{icon:"\u{1F9E9}",title:t("skillCards"),sub:t("skillCardsHint"),children:[(0,e.jsx)("div",{className:"mc-cfg-grid",children:(0,e.jsx)(dt,{k:"skillCardsAutoSync",label:t("skillAutoSync")})}),(0,e.jsx)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!B,onClick:async()=>{X("skills");try{let l=await fetch(V+"/skills/sync",{method:"POST"}).then(ee=>ee.json()).catch(()=>null);l&&l.ok?d(t("skillsSyncDone")+"\uFF1A"+t("skillsScanned")+" "+(l.total||0)+" \xB7 "+t("skillsCreated")+" "+(l.created||0)+" \xB7 "+t("skillsUpdated")+" "+(l.updated||0)+" \xB7 "+t("skillsPendingUpdates")+" "+(l.pendingUpdates||0)):d(l&&l.error||t("skillsSyncFail"),!1)}catch{d(t("skillsSyncFail"),!1)}finally{X("")}},children:B==="skills"?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")})})]}),(0,e.jsxs)(Et,{icon:"\u{1F4EC}",title:t("newsDigest"),sub:t("newsDigestHint"),children:[(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(dt,{k:"newsDigestEnabled",label:t("newsDigestEnabled")}),(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",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!B,onClick:async()=>{X("digest");try{let l=await fetch(V+"/news/digest",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}).then(ee=>ee.json()).catch(()=>null);l&&l.ok?(_e(l.text||""),d(l.digest&&l.digest.items&&l.digest.items.length?t("newsDigestDone"):t("newsDigestEmpty"),!0)):d(l&&l.error||t("newsDigestFail"),!1)}catch{d(t("newsDigestFail"),!1)}finally{X("")}},children:B==="digest"?"\u23F3 "+t("newsDigestBuilding"):"\u{1F4EC} "+t("newsDigestNow")}),(0,e.jsx)("span",{className:"mc-field-hint",children:t("newsDigestNowHint")})]}),re!==null?(0,e.jsx)("pre",{className:"mc-digest-preview",children:re||t("newsDigestEmpty")}):null]}),(0,e.jsx)(Et,{icon:"\u{1F520}",title:t("uiLayout"),sub:t("uiLayoutHint"),children:(0,e.jsx)("div",{className:"mc-cfg-grid",children:(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("uiLayout")}),(0,e.jsxs)("select",{value:p&&p.uiScale||"normal",onChange:l=>{let ee=l.target.value;et("uiScale",ee);try{window.dispatchEvent(new CustomEvent("me-ui-scale",{detail:ee}))}catch{}},children:[(0,e.jsx)("option",{value:"compact",children:t("uiCompact")}),(0,e.jsx)("option",{value:"normal",children:t("uiNormal")}),(0,e.jsx)("option",{value:"large",children:t("uiLarge")})]})]})})}),(0,e.jsxs)(Et,{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:W?.vaultDir||"\u2014"}),W?.vaultName?`\uFF08${W.vaultName}\uFF09`:""," \xB7 ",t("vaultSource"),"\uFF1A",t(b[W?.vaultSource]||"vaultSrcDefault"),W?.workspace?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("br",{}),t("vaultWorkspace"),"\uFF1A",(0,e.jsx)("code",{children:W.workspace})]}):null]}),c(p).map((l,ee)=>(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1.6fr 1.5fr auto",gap:6,marginBottom:6},children:[(0,e.jsx)("input",{value:l.name||"",placeholder:t("vaultNamePh"),onChange:ae=>le(ee,"name",ae.target.value),style:Re,disabled:x}),(0,e.jsx)("input",{value:l.path||"",placeholder:t("vaultPathPh"),onChange:ae=>le(ee,"path",ae.target.value),style:Re,disabled:x}),(0,e.jsx)("input",{value:l.match&&l.match.workspace||"",placeholder:t("vaultMatchPh"),onChange:ae=>le(ee,"match",ae.target.value),style:Re,disabled:x}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>f(ee),disabled:x,title:t("delete"),children:"\u2715"})]},ee)),(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginTop:4},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:Ae,disabled:x,children:["\uFF0B ",t("vaultAdd")]}),(0,e.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("vaultActive")}),(0,e.jsxs)("select",{value:p.activeVault||"",onChange:l=>et("activeVault",l.target.value),disabled:x,style:Re,children:[(0,e.jsx)("option",{value:"",children:t("vaultActiveNone")}),c(p).filter(l=>l&&l.name).map(l=>(0,e.jsx)("option",{value:l.name,children:l.name},l.name))]})]})]})]}),(0,e.jsx)(Et,{icon:"\u{1F4B0}",title:t("costControl"),sub:t("costHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(dt,{k:"distillEnabled",label:t("distillEnabled")}),(0,e.jsx)(dt,{k:"dedupByLLM",label:t("dedupByLLM")}),(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"}),O&&O.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 ",$e("routeListFail",{err:O.error||"\u672A\u77E5\u539F\u56E0"})]}),O&&O.providers&&O.providers.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureProvider")}),(0,e.jsxs)("select",{value:p.captureProvider||"",onChange:l=>{et("captureProvider",l.target.value),et("captureModel","")},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),O.providers.map(l=>(0,e.jsx)("option",{value:l.id,children:l.label},l.id))]})]}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureModel")}),(0,e.jsxs)("select",{value:p.captureModel||"",onChange:l=>et("captureModel",l.target.value),children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),((O.providers.find(l=>l.id===p.captureProvider)||{}).models||[]).map(l=>(0,e.jsx)("option",{value:l.id,children:l.label||l.id},l.id))]})]})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Xe,{k:"captureProvider",label:t("captureProvider")}),(0,e.jsx)(Xe,{k:"captureModel",label:t("captureModel")})]}),(0,e.jsx)(dt,{k:"captureFollowSession",label:t("captureFollowSession")}),(0,e.jsx)(dt,{k:"captureFirstOnly",label:t("captureFirstOnly")}),(0,e.jsx)(Xe,{k:"sessionBudgetChars",label:t("sessionBudgetChars"),type:"number"}),(0,e.jsx)("div",{style:{display:"flex",alignItems:"flex-end"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!B,onClick:async()=>{X("llmtest");try{let l=await fetch(V+"/llm-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:p.captureProvider||"",model:p.captureModel||"",firstOnly:p.captureFirstOnly===!0})}).then(ee=>ee.json());l&&l.ok?d(t("llmTestOk")+"\uFF1A"+l.route.provider+(l.route.model?"/"+l.route.model:"")+" \xB7 "+l.ms+"ms \xB7 "+t("llmCandidates")+" "+l.candidates):d(t("llmTestFail")+"\uFF1A"+(l&&(l.failure?l.failure.code+" "+l.failure.message:l.error)||"?"),!1)}catch(l){d(t("llmTestFail")+"\uFF1A"+String(l&&l.message||l),!1)}finally{X("")}},children:B==="llmtest"?t("exporting"):"\u{1F50C} "+t("llmTest")})})]})}),(0,e.jsx)(Et,{icon:"\u{1F6E1}\uFE0F",title:t("auditConfig"),sub:t("auditHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("auditMode")}),(0,e.jsxs)("select",{value:p.auditMode??"all",onChange:l=>et("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)(Un,{label:t("auditExemptAgents"),value:p.auditExemptAgents||[],options:[{value:"__all__",label:t("allExempt")},...(Q?.agents||[]).filter(l=>!l.isDsh).map(l=>({value:l.name,label:l.name}))],onChange:l=>et("auditExemptAgents",l)}),(0,e.jsx)(Un,{label:t("auditExemptKinds"),value:p.auditExemptKinds||[],options:[{value:"__all__",label:t("allExempt")},...Ma.filter(l=>l!=="all"&&l!=="core"&&l!=="skill").map(l=>({value:l,label:t(ot[l])}))],onChange:l=>et("auditExemptKinds",l)}),(0,e.jsx)(Xe,{k:"recycleRetentionDays",label:t("recycleDays"),hint:t("unitDays"),type:"number"})]})}),(0,e.jsx)(Et,{icon:"\u{1F6E0}",title:t("serviceConfig"),sub:t("cfgSubService"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(dt,{k:"autoWeb",label:t("autoWeb")}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("autoWebMode")}),(0,e.jsxs)("select",{value:p.autoWebMode??"init",onChange:l=>et("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.jsx)(dt,{k:"watchdogAutoSpawn",label:t("watchdogAutoSpawn")}),(0,e.jsx)(dt,{k:"autoRestartOnDrift",label:t("autoRestartOnDrift")}),(0,e.jsx)(dt,{k:"autoMcpSetup",label:t("autoMcpSetup")})]})}),(0,e.jsxs)("div",{className:"mc-cfg-actions",children:[v?(0,e.jsx)("span",{className:"mc-cfg-dirty",children:t("cfgDirty")}):(0,e.jsxs)("span",{className:"mc-cfg-clean",children:["\u2713 ",t("cfgClean")]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),B==="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,opacity:.75},children:["\u23F3 ",t("saving")]}),ce&&B!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#10b981"},children:["\u2705 ",ce]}),K&&B!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#b91c1c"},children:["\u26A0 ",K]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:we,disabled:!!B,children:t("reset")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:x?()=>d(t("readonlyTitle")+"\uFF1A"+t("readonlyBody"),!1):Bt,disabled:B==="save",title:t(x?"readonlyBody":"saveConfig"),children:B==="save"?"\u23F3 "+t("saving"):x?"\u{1F512} "+t("readonlyBtn"):"\u{1F4BE} "+t("saveConfig")})]})]}):(0,e.jsx)("div",{style:{fontSize:12,opacity:.6},children:t("loading")})]})]})})}function Xo({t,onReload:a,version:n}){let[i,s]=(0,r.useState)([]),[m,g]=(0,r.useState)([]),[S,u]=(0,r.useState)("all"),[N,p]=(0,r.useState)("all"),[w,x]=(0,r.useState)(""),[T,q]=(0,r.useState)(""),[G,R]=(0,r.useState)(new Set),[$,L]=(0,r.useState)(null),[W,pe]=(0,r.useState)(""),[Q,P]=(0,r.useState)(null),[K,U]=(0,r.useState)("pending"),B=(v,I=!0)=>{P({msg:v,ok:I}),setTimeout(()=>P(null),3e3)},X=[...new Set([...i,...m].map(v=>v.submittedBy).filter(Boolean))],ce=(0,r.useCallback)(async()=>{try{let v=await fetch(`${V}/audit/list`).then(I=>I.json());v.ok&&(s(v.pending||[]),g(v.rejected||[]),R(new Set),y({}))}catch{}},[]);(0,r.useEffect)(()=>{ce()},[n,ce]);let he=(K==="pending"?i:m).filter(v=>{if(!Ea(v,T)||S!=="all"&&v.kind!==S||N!=="all"&&Ut(v.submittedBy)!==N)return!1;if(w){let I=va(v.created);if(I&&I!==w)return!1}return!0}),re=(0,r.useMemo)(()=>{let v=K==="pending"?i:m,I={all:0};return v.forEach(ie=>{if(Ea(ie,T)&&!(N!=="all"&&Ut(ie.submittedBy)!==N)){if(w){let Fe=va(ie.created);if(Fe&&Fe!==w)return}I.all++,I[ie.kind||"other"]=(I[ie.kind||"other"]||0)+1}}),I},[i,m,K,N,w,T]),_e=v=>R(I=>{let ie=new Set(I);return ie.has(v)?ie.delete(v):ie.add(v),ie}),O=async(v,I,ie={})=>{let Fe=I||[...G];if(!Fe.length){B(t("noSelection"),!1);return}pe("apply");let Be=v==="approved"?ie.kind==="core"?t("approveCore"):t("toastApproved"):t(v==="rejected"?"toastRejected":"toastCardDeleted");try{let de=0;for(let d of Fe){let Y=v==="approved"?"audit/approve":v==="rejected"?"audit/reject":"delete";try{let E=v==="approved"&&ie.kind?{path:d,kind:ie.kind}:null;(await fetch(V+"/"+Y+(E?"":"?path="+encodeURIComponent(d)+(v==="delete"?"&permanent=0":"")),E?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)}:void 0)).ok||de++}catch{de++}}await ce(),a&&a(),de?B(t("toastFailed")+"\uFF08"+de+"/"+Fe.length+"\uFF09",!1):B(Be+" "+Fe.length+" \u5F20")}catch(de){B(t("toastFailed")+": "+String(de&&de.message||de),!1)}finally{pe("")}},[Ee,y]=(0,r.useState)({}),De=v=>Ee[v]||{},te=[...G],Z=he.find(v=>v.path===$)||he[0]||null,We=Z?De(Z.path):{};(0,r.useEffect)(()=>{let v=Z;if(!v||Ee[v.path])return;let I=!0,ie=v.path;y(Be=>({...Be,[ie]:{loading:!0}}));let Fe=v.status||(K==="pending"?"pending":"rejected");return fetch(`${V}/card?path=${encodeURIComponent(ie)}&status=${Fe}`).then(Be=>Be.json()).then(Be=>{I&&(Be&&Be.ok?y(de=>({...de,[ie]:{text:Be.text||""}})):y(de=>({...de,[ie]:{error:Be&&Be.error||"HTTP"}})))}).catch(Be=>{I&&y(de=>({...de,[ie]:{error:String(Be&&Be.message||Be)}}))}),()=>{I=!1}},[Z&&Z.path,K]);let Le=async()=>{if(window.confirm(t("reclassify")+"\uFF1F\u53EA\u5904\u7406\u81EA\u52A8\u6C89\u6DC0\u7684\u5F85\u5BA1\u539F\u6587\u5361\uFF0C\u4E0D\u6539\u4EBA\u5DE5\u5361\u3002")){pe("reclassify");try{let v=await fetch(V+"/reclassify").then(I=>I.json());v&&v.ok?B(t("reclassify")+"\uFF1A"+v.changed+" / "+v.scanned):B(t("toastFailed")+": "+(v&&v.error||"HTTP"),!1),await ce(),a&&a()}catch(v){B(t("toastFailed")+": "+String(v&&v.message||v),!1)}finally{pe("")}}},oe=()=>R(new Set),F=v=>{U(v),oe()},z=["all",...Ma.filter(v=>v!=="all")];return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:ht}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(Ta,{toast:Q}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-audithead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"REVIEW INBOX"}),(0,e.jsx)("h1",{children:t("tabAudit")}),(0,e.jsx)("p",{children:t("auditInboxSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[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:T,onChange:v=>{q(v.target.value),oe(),L(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}}),T&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>{q(""),oe(),L(null)},title:t("clearFilter"),children:"\u2715"}),(0,e.jsxs)("select",{value:N,onChange:v=>{p(v.target.value),oe()},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")}),Yn(X).map(v=>(0,e.jsx)("option",{value:v,children:v},v))]}),(0,e.jsx)("input",{type:"date",value:w,onChange:v=>{x(v.target.value),oe()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"}})]}),(0,e.jsxs)("div",{className:"me-audit-types-top",children:[(0,e.jsx)("span",{className:"me-audit-types-label",children:t("auditTypeLabel")}),z.map(v=>{let I=v==="all"?"var(--dsw-alias-label-secondary, #9ca3af)":bt[v]||"#6B7280";return(0,e.jsxs)("button",{type:"button",className:`me-audit-kind${S===v?" active":""}`,onClick:()=>{u(v),oe()},children:[(0,e.jsx)("span",{className:"me-audit-kind-dot",style:{background:I}}),(0,e.jsx)("span",{className:"me-audit-kind-name",children:t(v==="all"?"all":ot[v])}),(0,e.jsx)("span",{className:"me-audit-kind-count",children:re[v]||0})]},v)})]})]}),(0,e.jsxs)("div",{className:"me-audit-main",children:[(0,e.jsxs)("div",{className:"me-audit-queue",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("button",{type:"button",className:`mc-btn${K==="pending"?" me-on":""}`,onClick:()=>F("pending"),children:[t("pending"),"\uFF08",i.length,"\uFF09"]}),(0,e.jsxs)("button",{type:"button",className:`mc-btn${K==="rejected"?" me-on":""}`,onClick:()=>F("rejected"),children:[t("rejected"),"\uFF08",m.length,"\uFF09"]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("label",{style:{fontSize:12},children:[(0,e.jsx)("input",{type:"checkbox",checked:he.length>0&&te.length===he.length,onChange:v=>{v.target.checked?R(new Set(he.map(I=>I.path))):R(new Set)}})," ",t("selectAll"),"\uFF08",he.length,"\uFF09"]}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.65},children:[t("auditSelected")," ",te.length]}),K==="pending"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!W,onClick:Le,children:["\u{1F527} ",t("reclassify")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!te.length||!!W,onClick:()=>O("approved"),children:["\u2713 ",t(K==="rejected"?"restore":"approve")]}),K==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!te.length||!!W,onClick:()=>O("rejected"),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!te.length||!!W,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&O("delete")},children:["\u{1F5D1} ",t("restoreDelete")]}),te.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:oe,children:t("auditClearSelection")})]}),he.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:he.map(v=>{let I=bt[v.kind]||"#6B7280";return(0,e.jsx)("div",{className:`me-audit-row${v.kind==="core"?" core":""}${Z&&Z.path===v.path?" active":""}`,children:(0,e.jsxs)("div",{className:"me-audit-row-main",onClick:()=>L(v.path),children:[(0,e.jsx)("input",{type:"checkbox",checked:G.has(v.path),onClick:ie=>ie.stopPropagation(),onChange:()=>_e(v.path)}),(0,e.jsx)("span",{className:"me-audit-row-tile",style:{color:I,borderColor:I+"38",background:I+"18"},children:$t[v.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"me-audit-row-copy",children:[(0,e.jsxs)("div",{className:"me-audit-row-top",children:[(0,e.jsx)("span",{className:`me-audit-row-kind${v.kind==="core"?" core":""}`,children:v.kind==="core"?"\u2B50 "+t("kindCore"):t(ot[v.kind]||"kindKnowledge")}),v.revision&&(0,e.jsxs)("span",{className:"me-audit-row-state",style:{color:"#a78bfa",filter:"saturate(1.2)"},children:["\u270F\uFE0F ",t("auditRevision")]}),(0,e.jsx)("span",{className:`me-audit-row-state ${K==="pending"?"pending":"rejected"}`,children:K==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"me-audit-row-time",children:Ba(v.created)||"-"})]}),(0,e.jsx)("button",{type:"button",className:"me-audit-row-title",title:v.title,onClick:()=>L(v.path),children:v.title}),v.revision&&(0,e.jsxs)("p",{className:"me-audit-row-reason",style:{color:"#a78bfa"},children:["\u270F\uFE0F ",t("auditRevisionFrom"),"\uFF1A",v.revision.targetTitle||v.revision.targetPath]}),(v.reason||v.summary)&&(0,e.jsx)("p",{className:"me-audit-row-reason",children:v.reason||v.summary}),(0,e.jsxs)("div",{className:"me-audit-row-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Ut(v.submittedBy)]}),(Array.isArray(v.tags)?v.tags:[]).slice(0,3).map(ie=>(0,e.jsxs)("span",{children:["#",ie]},ie))]})]}),(0,e.jsx)("div",{className:"me-audit-row-actions",onClick:ie=>ie.stopPropagation(),children:K==="pending"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>O("approved",[v.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},onClick:()=>O("rejected",[v.path]),children:"\u2715"})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},title:t("restore"),onClick:()=>O("approved",[v.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},title:t("restoreDelete"),onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&O("delete",[v.path])},children:"\u{1F5D1}"})]})})]})},v.path)})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:20,textAlign:"center"},children:t(T?"auditNoMatch":"noAuditItems")})]}),(0,e.jsx)("aside",{className:"me-audit-preview",children:Z?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"me-audit-preview-head",children:[(0,e.jsxs)("div",{className:"me-audit-preview-top",children:[(0,e.jsxs)("span",{className:"me-audit-kind-badge",style:{color:bt[Z.kind]||"#6B7280",borderColor:(bt[Z.kind]||"#6B7280")+"59",background:(bt[Z.kind]||"#6B7280")+"1a"},children:[$t[Z.kind]||"\u{1F4CE}"," ",t(ot[Z.kind]||"kindKnowledge")]}),(0,e.jsx)("span",{className:`md-chip ${K==="pending"?"md-chip-st-warn":"md-chip-st-bad"}`,children:K==="pending"?Z.kind==="core"?"\u2B50 "+t("coreSuggested"):"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.55},children:Ba(Z.created)})]}),(0,e.jsx)("h3",{children:Z.title}),Z.revision&&(0,e.jsxs)("div",{className:"me-audit-preview-reason",style:{color:"#a78bfa",marginBottom:6},children:["\u270F\uFE0F ",t("auditRevisionFrom"),"\uFF1A",Z.revision.targetTitle||Z.revision.targetPath]}),(0,e.jsxs)("div",{className:"me-audit-preview-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Ut(Z.submittedBy)]}),!!Z.reason&&(0,e.jsxs)("span",{className:"me-audit-preview-reason",children:["\u2691 ",Z.reason]}),(Array.isArray(Z.tags)?Z.tags:[]).slice(0,5).map(v=>(0,e.jsxs)("span",{children:["#",v]},v))]})]}),(0,e.jsxs)("div",{className:"me-audit-preview-body",children:[We.loading&&(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("loading")}),We.error&&(0,e.jsxs)("div",{className:"me-audit-preview-empty",style:{color:"#f87171"},children:["\u26A0 ",t("auditBodyFail"),"\uFF1A",We.error]}),We.text!=null?(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:la(Za(ha(We.text).body,Z.title))}}):!We.loading&&(0,e.jsx)("p",{className:"me-audit-preview-summary",children:Z.summary||""})]}),(0,e.jsxs)("div",{className:"me-audit-preview-actions",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!!W,onClick:()=>O("approved",[Z.path]),children:["\u2713 ",K==="rejected"?t("restore"):Z.kind==="core"?t("approveCore"):t("approve")]}),K==="pending"&&Z.kind!=="core"&&!Z.revision&&(0,e.jsxs)("button",{type:"button",className:"mc-btn me-core-btn",disabled:!!W,onClick:()=>O("approved",[Z.path],{kind:"core"}),children:["\u2B50 ",t("approveAndCore")]}),K==="pending"&&Z.kind==="core"&&(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!W,onClick:()=>O("approved",[Z.path],{kind:"knowledge"}),children:t("approveAsNormal")}),K==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!W,onClick:()=>O("rejected",[Z.path]),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!W,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&O("delete",[Z.path])},children:["\u{1F5D1} ",t("restoreDelete")]})]})]}):(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t(T?"auditNoMatch":"noAuditItems")})})]})]})]})]})}var Qo={title:"",date:"",category:"",source:"",url:"",tags:"",pinned:!1,body:""};function Ka(){let t=new Date;return t.getFullYear()+"-"+String(t.getMonth()+1).padStart(2,"0")+"-"+String(t.getDate()).padStart(2,"0")}function Ya(t){try{let a=new URL(String(t||""));return a.protocol==="http:"||a.protocol==="https:"?a.href:""}catch{return""}}function Zo(t,a){let n=String(t||"").slice(0,10);if(!n)return a("newsEarlier");if(n===Ka())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: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:()=>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:()=>g(t),title:a("delete"),children:"\u2715"})]})]})]})}function er(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 Jt="me.news.lastQuery",pa="me.news.prefs",Jn="me.news.view",tr={model:"\u6A21",product:"\u54C1",research:"\u7814",opensource:"\u6E90",industry:"\u4E1A",policy:"\u7B56",other:"\u8BAF"},ar=new Set(["the","a","an","of","to","for","and","in","on","is","are","with","how","why","new","its","it","as","at","by","from"]);function Qa(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 Ht(t,a){try{localStorage.setItem(t,JSON.stringify(a))}catch{}}function Ua(t,a=""){let n=Qa(t,a);return typeof n=="string"?n:a}function jn(){let t=Qa(Jn,null);return t&&typeof t=="object"?t:{}}function Va(){return{types:{},sources:{},terms:{},opens:0,updatedAt:0}}function nr(){let t=Qa(pa,null);return!t||typeof t!="object"?Va():{...Va(),...t,types:t.types||{},sources:t.sources||{},terms:t.terms||{}}}function Xn(t){let a=[];for(let n of String(t||"").toLowerCase().split(/[^0-9a-z\u4e00-\u9fff]+/))!n||n.length<2||ar.has(n)||a.push(n);return a}function Na(t,a,n){a&&(t[a]=Math.min(60,(Number(t[a])||0)+n))}function or(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),Xn(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 On(t,a){let n={...t,terms:{...t.terms}};return Xn(a).forEach(i=>Na(n.terms,i,3)),n.updatedAt=Date.now(),n}function rr(t){let a=0;for(let n of String(t||""))a=(a*31+n.charCodeAt(0))%360;return a}function ir(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 sr=/(帮我|请|麻烦|推送|订阅|关注|跟踪|每天|每日|定时|最新|热门|看看|给我|关于|相关)/;function lr(t){let a=String(t||"").trim();return a?sr.test(a)||a.split(/\s+/).length>=4:!1}function Wn(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[S,u]of Object.entries(a.terms))m.includes(S)&&(s+=Math.min(8,Number(u)||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:m.includes(S)&&(s+=8);return t.followId&&(s+=10),s}function cr({t,mode:a,version:n}){let[i,s]=(0,r.useState)([]),[m,g]=(0,r.useState)([]),[S,u]=(0,r.useState)(!0),[N,p]=(0,r.useState)(0),[w,x]=(0,r.useState)([]),[T,q]=(0,r.useState)(""),[G,R]=(0,r.useState)(null),[$,L]=(0,r.useState)(()=>Ua(Jt)),[W,pe]=(0,r.useState)(()=>Ua(Jt).trim()),[Q,P]=(0,r.useState)(""),[K,U]=(0,r.useState)(()=>{let f=jn();return typeof f.lang=="string"?f.lang:"zh"}),[B,X]=(0,r.useState)(()=>jn().sort==="time"?"time":"rec"),[ce,he]=(0,r.useState)(nr),[re,_e]=(0,r.useState)(!1),[O,Ee]=(0,r.useState)([]),[y,De]=(0,r.useState)([]),[te,Z]=(0,r.useState)(null),[We,Le]=(0,r.useState)(!1),[oe,F]=(0,r.useState)(""),z=(f,C=!0)=>{R({msg:f,ok:C}),setTimeout(()=>R(null),3200)},v=(0,r.useRef)(!1),I=(0,r.useRef)(Ua(Jt).trim());(0,r.useEffect)(()=>{let f=setTimeout(()=>{let C=$.trim();pe(C),v.current&&(Ht(Jt,C),!(!C||C===I.current)&&(I.current=C,he(Re=>{let Ue=On(Re,C);return Ht(pa,Ue),Ue})))},260);return()=>clearTimeout(f)},[$]),(0,r.useEffect)(()=>{Ht(Jn,{lang:K,sort:B})},[K,B]),(0,r.useEffect)(()=>{_e(!0);let f=setTimeout(()=>_e(!1),170);return()=>clearTimeout(f)},[Q,K,W,B]);let ie=(0,r.useCallback)(async()=>{u(!0),q("");try{let f=new URLSearchParams({period:a==="month"?"month":"today",lang:"all"});f.set("follows","1");let C=await fetch(V+"/news/feed?"+f.toString()).then(Re=>Re.json());if(!C||!C.ok)throw new Error(C&&C.error||t("newsFeedError"));s(C.items||[]),Array.isArray(C.follows)&&Ee(C.follows),g(C.types||[]),p(Number(C.fetchedAt)||0),x(C.errors||[])}catch(f){let C=f&&f.message||t("newsFeedError");q(C),z(C,!1)}finally{u(!1)}},[a,t]);(0,r.useEffect)(()=>{ie()},[n,ie]);let Fe=(0,r.useCallback)(async()=>{try{let f=await fetch(V+"/news/follows").then(C=>C.json());f&&f.ok&&(Ee(f.follows||[]),De(f.domains||[]))}catch{}},[]);(0,r.useEffect)(()=>{Fe()},[n,Fe]);let Be=async()=>{u(!0);try{let f=await fetch(V+"/news/feed/refresh",{method:"POST"}).then(C=>C.json());if(!f||!f.ok)throw new Error(f&&f.error||t("newsFeedError"));await ie(),z(t("newsUpdatedAt")+" "+new Date().toLocaleTimeString())}catch(f){let C=f&&f.message||t("newsFeedError");q(C),z(C,!1),u(!1)}},de=f=>(m.find(C=>C.id===f)||{}).label||t("all"),d=(i||[]).filter(f=>!K||f.lang===K||f.followId),Y={};for(let f of d)Y[f.type]=(Y[f.type]||0)+1;let E=Q?d.filter(f=>f.type===Q):d,ue=lr(W);if(W&&!ue){let f=W.toLowerCase().split(/\s+/).filter(Boolean);E=E.filter(C=>{let Re=[C.title,C.summary,C.source,de(C.type)].join(" ").toLowerCase();return f.every(Ue=>Re.includes(Ue))})}oe&&(E=E.filter(f=>f.followId===oe));let Me=f=>(Number(f.points)||0)+(Number(f.comments)||0)*2,ve=a==="month",ye=ve?E.filter(f=>(f.points||0)>0):[],H=ve&&ye.length>0,se=new Map;H&&ye.slice().sort((f,C)=>(C.points||0)-(f.points||0)||(C.comments||0)-(f.comments||0)).forEach((f,C)=>se.set(f.id||f.url||f.title,C+1)),E=E.slice().sort((f,C)=>B==="time"?(C.publishedAt||0)-(f.publishedAt||0):ve&&H?(C.points||0)-(f.points||0)||(C.comments||0)-(f.comments||0)||(C.publishedAt||0)-(f.publishedAt||0):Wn(C,ce,W)-Wn(f,ce,W));let Ce=Object.keys(ce.types||{}).sort((f,C)=>(ce.types[C]||0)-(ce.types[f]||0)).slice(0,3),me=Object.keys(ce.terms||{}).sort((f,C)=>(ce.terms[C]||0)-(ce.terms[f]||0)).slice(0,4),rt=!!W||Ce.length>0||me.length>0,yt=f=>{v.current=!0;let C=String(f??"").trim();pe(C),Ht(Jt,C),!(!C||C===I.current)&&(I.current=C,he(Re=>{let Ue=On(Re,C);return Ht(pa,Ue),Ue}))},$e=()=>{v.current=!1,I.current="",P(""),U(""),L(""),pe(""),Ht(Jt,"")},pt=f=>he(C=>{let Re=or(f,4,C);return Ht(pa,Re),Re}),et=()=>{let f=Va();Ht(pa,f),Ht(Jt,""),I.current="",v.current=!1,he(f),L(""),pe("")},xt=async()=>{let f=$.trim();if(!f){z(t("newsFollowNoQuery"),!1);return}Le(!0);try{let C=await fetch(V+"/news/follows/preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:f})}).then(Re=>Re.json());if(!C||!C.ok)throw new Error(C&&C.error||t("newsFollowFail"));De(C.domainsEnum||y),Z({text:f,query:C.parsed.query,label:C.parsed.label,domains:C.parsed.domains,sourceIds:C.parsed.sourceIds||[],notes:C.parsed.notes||[]})}catch(C){z(String(C&&C.message||C),!1)}finally{Le(!1)}},qe=(f,C)=>Z(Re=>{if(!Re)return Re;let Ue=new Set(Re.domains);return C?Ue.add(f):Ue.delete(f),{...Re,domains:[...Ue]}}),Bt=async()=>{if(te){Le(!0);try{let f=await fetch(V+"/news/follows",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:te.query,domains:te.domains,label:te.label,sourceIds:te.sourceIds||[]})}).then(Re=>Re.json());if(!f||!f.ok)throw new Error(f&&f.error||t("newsFollowFail"));let C=te.label;Z(null),z((f.duplicate?t("newsFollowExists"):t("newsFollowAdded"))+"\uFF1A"+C),await Fe(),await ie()}catch(f){z(String(f&&f.message||f),!1)}finally{Le(!1)}}},we=async f=>{try{let C=await fetch(V+"/news/follows?id="+encodeURIComponent(f),{method:"DELETE"}).then(Re=>Re.json());if(!C||!C.ok)throw new Error(C&&C.error||t("newsFollowFail"));oe===f&&F(""),z(t("newsFollowRemoved")),await Fe(),await ie()}catch(C){z(String(C&&C.message||C),!1)}},b=(f,C)=>{let Re=Ya(f.url),Ue=de(f.type),o=Ya(f.image),mt=H&&se.get(f.id||f.url||f.title)||0,vt=H&&mt>0&&mt<=3;return(0,e.jsxs)("a",{className:"mc-news-tile",style:{"--i":Math.min(C,14)},href:Re||void 0,target:Re?"_blank":void 0,rel:"noopener noreferrer",onClick:()=>pt(f),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:ut=>{let Ct=ut.currentTarget;Ct.style.display="none",Ct.nextElementSibling&&(Ct.nextElementSibling.style.display="grid")}}):null,(0,e.jsxs)("span",{className:"mc-news-tile-gen",style:{"--hue":rr(f.title),display:o?"none":"grid"},children:[(0,e.jsx)("b",{children:tr[f.type]||"\u8BAF"}),(0,e.jsx)("small",{children:Ue}),(0,e.jsxs)("em",{children:[(0,e.jsx)("i",{children:ir(f.source)}),f.source]})]}),(0,e.jsx)("span",{className:"mc-news-tile-badge"+(vt?" hot":""),children:mt?"#"+mt:Ue}),(0,e.jsx)("span",{className:"mc-news-tile-time",children:er(f.publishedAt,t)})]}),(0,e.jsxs)("span",{className:"mc-news-tile-body",children:[(0,e.jsx)("span",{className:"mc-news-tile-title",children:f.title}),f.summary?(0,e.jsx)("span",{className:"mc-news-tile-summary",children:f.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:f.source}),f.followLabel?(0,e.jsxs)("span",{className:"mc-news-tile-follow",children:["\u{1F514} ",f.followLabel]}):null,mt?(0,e.jsxs)("span",{children:["\xB7 \u{1F525} ",t("newsHeat")," ",Me(f)]}):null,(0,e.jsxs)("span",{className:"mc-news-tile-open",children:[t("newsOriginal")," \u2197"]})]})]})]},f.id||f.url||f.title)},c=E.filter(f=>f.followId),le=c.slice(0,4),Ae=oe?E:le.length?E.filter(f=>!f.followId):E;return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(Ta,{toast:G}),(0,e.jsxs)("div",{className:"mc-news-hero",children:[(0,e.jsx)("div",{className:"mc-news-hero-eye",children:t("newsHeroEye")}),(0,e.jsxs)("div",{className:"mc-news-hero-search",children:[(0,e.jsx)("span",{"aria-hidden":"true",style:{fontSize:15,opacity:.75},children:"\u{1F50E}"}),(0,e.jsx)("input",{type:"text",value:$,onChange:f=>{v.current=!0,L(f.target.value)},onKeyDown:f=>{f.key==="Enter"&&yt($)},placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),$?(0,e.jsx)("button",{type:"button",className:"mc-news-hero-clear",title:t("cancel"),onClick:()=>{L(""),yt("")},children:"\u2715"}):null,(0,e.jsx)("button",{type:"button",className:"mc-news-hero-go",onClick:()=>yt($),children:t("newsSearchGo")}),$.trim()?(0,e.jsxs)("button",{type:"button",className:"mc-news-hero-follow",disabled:We,onClick:xt,title:t("newsFollowPreview"),children:["\uFF0B ",t("newsFollow")]}):null]}),(0,e.jsx)("div",{className:"mc-news-hero-hint",children:t(ue?"newsIntentHint":"newsHeroHint")})]}),te?(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:te.label}),te.query?(0,e.jsxs)("span",{className:"draft-q",children:["\xB7 \u300C",te.query,"\u300D"]}):null,(0,e.jsxs)("div",{className:"draft-doms",children:[(0,e.jsx)("span",{className:"draft-lbl",children:t("newsFollowDomains")}),y.map(f=>(0,e.jsxs)("label",{className:"draft-opt",title:f.hint||"",children:[(0,e.jsx)("input",{type:"checkbox",checked:te.domains.includes(f.id),onChange:C=>qe(f.id,C.target.checked)}),(0,e.jsx)("span",{children:f.label})]},f.id))]}),te.notes.map((f,C)=>(0,e.jsxs)("div",{className:"draft-note",children:["\xB7 ",f]},C))]}),(0,e.jsxs)("div",{className:"draft-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Z(null),children:t("cancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:We||!te.domains.length,onClick:Bt,children:t("newsFollowConfirm")})]})]}):null,O.length>0?(0,e.jsx)("div",{className:"mc-news-follows",children:O.map(f=>(0,e.jsxs)("span",{className:"mc-news-follow-chip"+(oe===f.id?" on":""),children:[(0,e.jsxs)("button",{type:"button",className:"chip-main",onClick:()=>F(C=>C===f.id?"":f.id),title:(f.domains||[]).join(" / "),children:["\u{1F514} ",f.label,(0,e.jsx)("i",{children:f.count||0})]}),(0,e.jsx)("button",{type:"button",className:"chip-x",title:t("delete"),"aria-label":t("delete"),onClick:()=>we(f.id),children:"\u2715"})]},f.id))}):null,rt?(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,me.length>0?(0,e.jsxs)("span",{children:["\xB7 ",me.join(" / ")]}):null,Ce.length>0?(0,e.jsxs)("span",{children:["\xB7 ",Ce.map(de).join(" / ")]}):null,(0,e.jsx)("span",{className:"mc-news-pref-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:et,children:t("newsResetPrefs")})})]}):null,(0,e.jsxs)("div",{className:"mc-news-feed-toolbar",children:[(0,e.jsxs)("div",{className:"mc-news-pills",children:[(0,e.jsxs)("button",{type:"button",className:"mc-news-pill"+(Q===""?" on":""),onClick:()=>P(""),children:[t("all"),(0,e.jsx)("span",{className:"mc-news-pill-count",children:d.length})]}),m.map(f=>Y[f.id]?(0,e.jsxs)("button",{type:"button",className:"mc-news-pill"+(Q===f.id?" on":""),onClick:()=>P(Q===f.id?"":f.id),children:[f.label,(0,e.jsx)("span",{className:"mc-news-pill-count",children:Y[f.id]})]},f.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:()=>U("zh"),children:t("newsLangZh")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(K==="en"?" active":""),onClick:()=>U("en"),children:t("newsLangEn")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(K===""?" active":""),onClick:()=>U(""),children:t("newsLangAll")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(B==="rec"?" active":""),onClick:()=>X("rec"),children:t("newsSortRec")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(B==="time"?" active":""),onClick:()=>X("time"),children:t("newsSortTime")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:S,onClick:Be,children:t(S?"newsLoading":"newsFeedRefresh")})]})]}),(0,e.jsxs)("div",{className:"mc-news-feed-meta",style:{margin:"0 0 8px"},children:[N?t("newsUpdatedAt")+" "+new Date(N).toLocaleTimeString():"",S?"":" \xB7 "+E.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(H?"newsEnRanking":"newsZhArchive")}),T&&!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 ",T]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Be,children:t("newsRetry")})]}),w.length>0&&(0,e.jsxs)("div",{className:"mc-news-feed-warn",children:["\u26A0 ",t("newsPartialFail"),"\uFF1A",w.slice(0,2).join("\uFF1B")]}),S?(0,e.jsxs)("div",{className:"mc-card mc-news-feed-empty mc-news-loading-card",role:"status","aria-live":"polite",children:[(0,e.jsx)(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:Be,children:t("newsFeedRefresh")})]}):E.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:$e,children:t("newsClearFilters")})]}):(0,e.jsxs)(e.Fragment,{children:[!oe&&le.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"+(re?" is-swapping":""),children:le.map((f,C)=>b(f,C))})]}):null,(0,e.jsx)("div",{className:"mc-news-grid"+(re?" is-swapping":""),children:Ae.map((f,C)=>b(f,C))})]})]})}function dr({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)(pr,{t,version:a,onUnreadChange:n}):(0,e.jsx)(cr,{t,mode:i,version:a})]})}function pr({t,version:a,onUnreadChange:n}){let[i,s]=(0,r.useState)([]),[m,g]=(0,r.useState)([]),[S,u]=(0,r.useState)({all:0,unread:0}),[N,p]=(0,r.useState)(""),[w,x]=(0,r.useState)(""),[T,q]=(0,r.useState)(""),[G,R]=(0,r.useState)(!1),[$,L]=(0,r.useState)(""),[W,pe]=(0,r.useState)(null),[Q,P]=(0,r.useState)(null),[K,U]=(0,r.useState)(!1),[B,X]=(0,r.useState)(""),[ce,he]=(0,r.useState)(null),re=(F,z=!0)=>{he({msg:F,ok:z}),setTimeout(()=>he(null),2600)};(0,r.useEffect)(()=>{let F=setTimeout(()=>x(N.trim()),220);return()=>clearTimeout(F)},[N]);let _e=(0,r.useCallback)(async()=>{let F=new URLSearchParams;w&&F.set("q",w),T&&F.set("category",T),G&&F.set("unread","1");try{let z=await fetch(V+"/news?"+F.toString()).then(v=>v.json());if(!z||!z.ok)throw new Error(z&&z.error||"load failed");s(z.items||[]),g(z.categories||[]),u(z.counts||{all:0,unread:0}),n&&n(Number((z.counts||{}).unread)||0)}catch{re(t("newsSaveFail"),!1)}},[w,T,G,n,t]);(0,r.useEffect)(()=>{_e()},[a,_e]);let O=async F=>{L(F.id);try{let z=await fetch(V+"/news/item?id="+encodeURIComponent(F.id)).then(v=>v.json());if(!z||!z.ok)throw new Error(z&&z.error||"load failed");pe(z.item),z.item.read||await Ee(F.id,!0)}catch{re(t("newsSaveFail"),!1)}},Ee=async(F,z)=>{try{let v=await fetch(V+"/news/read",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:F,read:z})}).then(I=>I.json());if(!v||!v.ok)throw new Error(v&&v.error||"read failed");pe(I=>I&&I.id===F?{...I,read:!!z}:I),await _e()}catch{re(t("newsSaveFail"),!1)}},y=async F=>{if(U(!1),F){let z=F;if(!z.body)try{let v=await fetch(V+"/news/item?id="+encodeURIComponent(z.id)).then(I=>I.json());v&&v.ok&&(z=v.item)}catch{}P({id:z.id,title:z.title||"",date:z.date||Ka(),category:z.category||"",source:z.source||"",url:z.url||"",tags:(z.tags||[]).join(", "),pinned:!!z.pinned,body:z.body||"",created:z.created||""})}else P({...Qo,date:Ka()})},De=async()=>{if(Q){if(!String(Q.title||"").trim()||!String(Q.body||"").trim()){re(t("newsSaveFail"),!1);return}X("save");try{let F={id:Q.id||void 0,title:Q.title,date:Q.date,category:Q.category,source:Q.source,url:Q.url,tags:String(Q.tags||"").split(",").map(v=>v.trim()).filter(Boolean),pinned:!!Q.pinned,body:Q.body,created:Q.created},z=await fetch(V+"/news/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}).then(v=>v.json());if(!z||!z.ok)throw new Error(z&&z.error||"save failed");P(null),L(z.item.id),pe(z.item),await _e(),re(t("newsSaved"))}catch(F){re(F&&F.message||t("newsSaveFail"),!1)}finally{X("")}}},te=async F=>{if(window.confirm(t("newsDeleteConfirm"))){X("delete");try{let z=await fetch(V+"/news/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:F.id})}).then(v=>v.json());if(!z||!z.ok)throw new Error(z&&z.error||"delete failed");$===F.id&&(L(""),pe(null)),await _e(),re(t("newsDeleted"))}catch{re(t("newsSaveFail"),!1)}finally{X("")}}},Z=i.filter(F=>F.pinned),We=i.filter(F=>!F.pinned),Le=W?Ya(W.url):"",oe="";return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(Ta,{toast:ce}),(0,e.jsxs)("div",{className:"mc-news-toolbar",children:[(0,e.jsxs)("span",{className:"mc-news-feed-meta",style:{marginLeft:0},children:[S.all," ",t("newsCountUnit")," \xB7 ",S.unread," ",t("newsUnread")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>y(null),children:["\uFF0B ",t("newsNew")]}),(0,e.jsx)("input",{className:"mc-news-search",type:"text",value:N,onChange:F=>p(F.target.value),placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(T===""?" active":""),onClick:()=>q(""),children:t("all")}),m.map(F=>(0,e.jsx)("button",{type:"button",className:"mc-chip"+(T===F?" active":""),onClick:()=>q(z=>z===F?"":F),children:F},F)),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(G?" active":""),onClick:()=>R(F=>!F),children:t("newsUnreadOnly")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>_e(),children:t("refresh")})]}),(0,e.jsxs)("div",{className:"mc-news-main",children:[(0,e.jsx)("div",{className:"mc-news-list",children:i.length===0?(0,e.jsxs)("div",{className:"mc-card mc-news-empty",children:[t(N||T||G?"newsNoMatch":"newsEmpty"),!N&&!T&&!G&&(0,e.jsx)("div",{style:{marginTop:10},children:(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>y(null),children:["\uFF0B ",t("newsNew")]})})]}):(0,e.jsxs)(e.Fragment,{children:[Z.length>0&&(0,e.jsxs)("div",{className:"mc-news-group",children:[(0,e.jsxs)("div",{className:"mc-news-group-label",children:["\u{1F4CC} ",t("newsPinned")]}),Z.map(F=>(0,e.jsx)(Hn,{item:F,t,active:$===F.id,onOpen:O,onEdit:z=>y(z),onToggleRead:z=>Ee(z.id,!z.read),onDelete:te},F.id))]}),(0,e.jsx)("div",{className:"mc-news-group",children:We.map(F=>{let z=Zo(F.date,t),v=z!==oe;return oe=z,(0,e.jsxs)(r.default.Fragment,{children:[v&&(0,e.jsx)("div",{className:"mc-news-group-label",children:z}),(0,e.jsx)(Hn,{item:F,t,active:$===F.id,onOpen:O,onEdit:I=>y(I),onToggleRead:I=>Ee(I.id,!I.read),onDelete:te})]},F.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:()=>{pe(null),L("")},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(F=>(0,e.jsxs)("span",{children:["#",F]},F))]}),Le&&(0,e.jsx)("div",{style:{marginTop:8},children:(0,e.jsxs)("a",{className:"mc-btn",style:{textDecoration:"none"},href:Le,target:"_blank",rel:"noopener noreferrer",children:["\u2197 ",t("newsOpenLink")]})}),(0,e.jsx)("div",{className:"md-doc",style:{marginTop:12},dangerouslySetInnerHTML:{__html:la(Za(W.body||"",W.title))}}),(0,e.jsxs)("div",{className:"mc-news-reader-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>y(W),children:t("newsEdit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Ee(W.id,!W.read),children:W.read?t("newsMarkUnread"):t("newsMarkRead")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:B==="delete",onClick:()=>te(W),children:t("delete")})]})]})]}),Q&&(0,e.jsx)("div",{className:"me-overlay",onClick:()=>P(null),children:(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:860,width:"94vw",maxHeight:"90vh"},onClick:F=>F.stopPropagation(),children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--dsw-alias-border-l1, #e5e7eb)"},children:[(0,e.jsx)("b",{children:Q.id?t("newsEdit"):t("newsNew")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>P(null),children:t("close")})]}),(0,e.jsxs)("div",{style:{padding:16,overflow:"auto",maxHeight:"calc(90vh - 60px)"},children:[(0,e.jsxs)("div",{className:"mc-news-form",children:[(0,e.jsxs)("label",{className:"full",children:[(0,e.jsx)("span",{children:t("newsTitleField")}),(0,e.jsx)("input",{className:"mc-news-input",value:Q.title,onChange:F=>P(z=>({...z,title:F.target.value})),placeholder:t("newsTitlePlaceholder")})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsDateField")}),(0,e.jsx)("input",{className:"mc-news-input",type:"date",value:Q.date||"",onChange:F=>P(z=>({...z,date:F.target.value}))})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsCategoryField")}),(0,e.jsx)("input",{className:"mc-news-input",list:"me-news-categories",value:Q.category||"",onChange:F=>P(z=>({...z,category:F.target.value}))})]}),(0,e.jsx)("datalist",{id:"me-news-categories",children:m.map(F=>(0,e.jsx)("option",{value:F},F))}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsSourceField")}),(0,e.jsx)("input",{className:"mc-news-input",value:Q.source||"",onChange:F=>P(z=>({...z,source:F.target.value}))})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsUrlField")}),(0,e.jsx)("input",{className:"mc-news-input",value:Q.url||"",onChange:F=>P(z=>({...z,url:F.target.value})),placeholder:"https://\u2026"})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsTagsField")}),(0,e.jsx)("input",{className:"mc-news-input",value:Q.tags||"",onChange:F=>P(z=>({...z,tags:F.target.value}))})]}),(0,e.jsxs)("label",{style:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:18},children:[(0,e.jsx)("input",{type:"checkbox",checked:!!Q.pinned,onChange:F=>P(z=>({...z,pinned:F.target.checked}))}),(0,e.jsx)("span",{children:t("newsPinField")})]}),(0,e.jsxs)("label",{className:"full",children:[(0,e.jsx)("span",{children:t("newsBodyField")}),(0,e.jsx)("textarea",{className:"mc-news-textarea",value:Q.body||"",onChange:F=>P(z=>({...z,body:F.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(Q.body||"")}})})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",marginTop:14},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>U(F=>!F),children:t(K?"newsEditBody":"newsPreview")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>P(null),children:t("cancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:B==="save",onClick:De,children:t(B==="save"?"newsSaving":"newsSave")})]})]})]})})]})}function mr({t,onReload:a,version:n}){let[i,s]=(0,r.useState)([]),[m,g]=(0,r.useState)(""),[S,u]=(0,r.useState)(null),N=(x,T=!0)=>{u({msg:x,ok:T}),setTimeout(()=>u(null),3200)},p=(0,r.useCallback)(async()=>{try{let x=await fetch(`${V}/recycle/list`).then(T=>T.json());x.ok&&s(x.items||[])}catch{}},[]);(0,r.useEffect)(()=>{p()},[n,p]);let w=async(x,T)=>{let q=(i.find(G=>G.path===T)||{}).title||T;g(x+T);try{let R=await fetch(V+(x==="restore"?"/recycle/restore":"/recycle/purge")+"?path="+encodeURIComponent(T)),$=await R.json().catch(()=>null);await p(),a&&a(),R.ok&&(!$||$.ok!==!1)?N(t(x==="restore"?"toastRestored":"toastPurged")+"\uFF1A"+q):N(t("toastFailed")+"\uFF1A"+($&&$.error||"HTTP "+R.status),!1)}catch(G){N(t("toastFailed")+"\uFF1A"+String(G&&G.message||G),!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:ht}),(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:!!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)))){g("purgeAll");try{let x=await fetch(V+"/recycle/purge-all",{method:"POST"}),T=await x.json().catch(()=>null);await p(),a&&a(),x.ok&&(!T||T.ok!==!1)?N(t("toastPurgeAll").split("{n}").join(String(T&&T.purged!=null?T.purged:i.length)),!0):N(t("toastFailed")+"\uFF1A"+(T&&T.error||"HTTP "+x.status),!1)}catch(x){N(t("toastFailed")+"\uFF1A"+String(x&&x.message||x),!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(x=>{let T=bt[x.kind]||"#6B7280";return(0,e.jsxs)("div",{className:"mc-v5-recycle-row",children:[(0,e.jsx)("span",{className:"mc-v5-recycle-tile",style:{color:T,background:T+"18",borderColor:T+"38"},children:$t[x.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"mc-v5-recycle-copy",children:[(0,e.jsx)("b",{children:x.title}),(0,e.jsxs)("span",{children:[t(ot[x.kind]||"kindKnowledge")," \xB7 ",x.status==="rejected"?t("rejected"):t("bucketDeleted")," \xB7 ",va(x.deletedAt||x.updated)||"-"]})]}),(0,e.jsxs)("div",{className:"mc-v5-recycle-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!m,title:x.status==="rejected"?t("restoreToQueue"):t("restore"),onClick:()=>w("restore",x.path),children:x.status==="rejected"?t("restoreToQueue"):t("restore")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!m,onClick:()=>{window.confirm(t("purgeConfirm"))&&w("purge",x.path)},children:t("purge")})]})]},x.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 Za=(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 g=/^#{1,2}\s+(.+?)\s*$/.exec(n[m]||"");if(!g||i(g[1])!==s)break;for(n.splice(m,1);m<n.length&&!n[m].trim();)n.splice(m,1)}return n.join(`
|
|
1053
|
+
`)},ur=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 g=/^(#{1,6})\s+(.+)$/.exec(m);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},en=t=>{let a=String(t.summary||"").replace(/[#>*_`]/g," ").replace(/\s+/g," ").trim();return a.length>150?a.slice(0,148)+"\u2026":a},Qn=t=>{let a=String(t.summary||"").toLowerCase();return/决策|结论|决定|decision/.test(a)?"insightDecision":/根因|原因|root cause/.test(a)?"insightRoot":/教训|避免|lesson/.test(a)?"insightLesson":"insightSummary"},Zn=({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,g)=>{let S=-Math.PI/2+g*Math.PI*2/i,u=g%2?13:16;return[20+Math.cos(S)*u,20+Math.sin(S)*u]});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,g],S)=>(0,e.jsx)("line",{x1:"20",y1:"20",x2:m,y2:g,stroke:a,strokeOpacity:".35"},"l"+S)),s.map(([m,g],S)=>(0,e.jsx)("circle",{cx:m,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})]})},gr=({card:t,t:a,onOpen:n,query:i,onDelete:s,onTagClick:m,pinned:g,onPin:S,onCore:u,links:N})=>{let p=bt[t.kind]||bt.other,w=Number(N??t.links??t.weight??0),x=_a(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:p,background:p+"18",borderColor:p+"38"},children:$t[t.kind]||"\u{1F4CE}"}),(0,e.jsx)("span",{className:"mc-v5-card-kind-name",children:t.kind==="core"?"\u2B50 "+a("kindCore"):a(ot[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")]}),Cr(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:jt(t.updated)}),u&&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:T=>{T.stopPropagation(),u(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:T=>{T.stopPropagation(),S(t.path)},children:"\u{1F4CC}"})]}),(0,e.jsx)("h4",{className:"mc-v5-card-title",children:i?qa(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(Qn(t))}),(0,e.jsx)("span",{className:"mc-v5-card-lead",children:i?qa(t.summary||"",i):en(t)})]}),i&&(()=>{let T=gn(t.body||"",i);return T?(0,e.jsx)("p",{className:"mc-snippet",children:qa(T,i)}):null})(),_a(t).length>0&&(0,e.jsxs)("div",{className:"mc-tags mc-v5-card-tags",children:[_a(t).slice(0,2).map(T=>(0,e.jsxs)("button",{type:"button",className:"mc-tag mc-tag-click",title:T,onClick:q=>{q.stopPropagation(),m&&m(T)},children:["#",T]},T)),x.length>2&&(0,e.jsxs)("span",{className:"mc-tag more",children:["+",x.length-2]})]}),(0,e.jsxs)("footer",{className:"mc-v5-card-foot",children:[w>0&&(0,e.jsxs)("span",{className:"mc-v5-conn",children:[(0,e.jsx)(Zn,{n:w,color:p})," ",(0,e.jsx)("b",{children:w})," ",a("links")]}),(0,e.jsxs)("span",{className:"mc-v5-author",children:["\u{1F916} ",Ut(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:T=>{T.stopPropagation(),window.confirm(a("deleteConfirm"))&&s&&s(t.path)},children:"\u{1F5D1}"})]})]})};function fr({t,tab:a,onReload:n,version:i}){let[s,m]=(0,r.useState)(null),[g,S]=(0,r.useState)(""),[u,N]=(0,r.useState)(null),[p,w]=(0,r.useState)(null),[x,T]=(0,r.useState)(null),[q,G]=(0,r.useState)(null),[R,$]=(0,r.useState)(null),[L,W]=(0,r.useState)(null),pe=(0,r.useCallback)(async()=>{B("align");try{let d=await fetch(V+"/align").then(Y=>Y.json());d&&d.findings?W(d):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{B("")}},[t]),Q=async()=>{if(window.confirm(t("alignFixConfirm"))){B("alignfix");try{let d=await fetch(V+"/setup-run",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(Y=>Y.json());d&&d.ok?(notify(t("alignFixed")),await pe()):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{B("")}}},[P,K]=(0,r.useState)([]),[U,B]=(0,r.useState)(""),[X,ce]=(0,r.useState)(!1),he=(0,r.useCallback)(async()=>{if(!(!u||!u.merge||!u.merge.length)&&window.confirm(t("mergeAllConfirm"))){B("merge");try{let d={},Y=ye=>d[ye]===void 0?ye:d[ye]=Y(d[ye]),E=(ye,H)=>{d[Y(ye)]=Y(H)},ue=new Set;for(let ye of u.merge)ue.add(ye.a.path),ue.add(ye.b.path),E(ye.a.path,ye.b.path);let Me={};for(let ye of ue){let H=Y(ye);(Me[H]=Me[H]||[]).push(ye)}let ve=0;for(let ye of Object.values(Me)){if(ye.length<2)continue;(await fetch(`${V}/merge?paths=${encodeURIComponent(ye.join(","))}`).then(se=>se.json())).ok&&ve++}await re(),n&&n()}catch{}B("")}},[u,re,n,t]);async function re(){try{let d=await Promise.all([fetch(`${V}/stats`),fetch(`${V}/budget`),fetch(`${V}/capture-log`),fetch(`${V}/cards?status=all&limit=30&agent=${ma}`),fetch(`${V}/overview`),fetch(`${V}/ledger?days=7`)]),[Y,E,ue,Me,ve,ye]=await Promise.all(d.map(H=>H.json()));Y&&Y.ok&&m(Y),E&&E.ok&&w(E),ue&&ue.ok&&T(ue),Me&&Me.ok&&K(Me.cards||[]),ve&&ve.ok&&G({db:ve.db,backups:ve.backups,total:ve.total,version:ve.version,degraded:ve.degraded===!0}),$(ye&&ye.ok?ye:{ok:!1,error:ye&&ye.error||""}),S(!Y||!Y.ok?t("adminLoadFail"):"")}catch{S(t("adminLoadFail"))}}let _e=(0,r.useCallback)(async()=>{B("scan");try{let d=await fetch(`${V}/optimize`).then(Y=>Y.json());d.ok&&N(d)}catch{S(t("adminLoadFail"))}finally{B("")}},[t]),[O,Ee]=(0,r.useState)(null),y=(0,r.useCallback)(async()=>{B("refine");try{let d=await fetch(`${V}/refine-scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:8})}).then(Y=>Y.json());d&&d.ok?Ee(d):notify(d&&d.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{B("")}},[t]),De=async(d,Y)=>{if(!(Y==="merge"&&!window.confirm(t("mergeConfirm")))){B("refineapply");try{let E=await fetch(`${V}/refine-apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({a:d.a.path,b:d.b.path,action:Y,relation:d.relation})}).then(ue=>ue.json());E&&E.ok?(notify(t("refineApplied")),Ee(ue=>ue&&{...ue,findings:(ue.findings||[]).filter(Me=>!(Me.a.path===d.a.path&&Me.b.path===d.b.path))}),await re(),n&&n()):notify(E&&E.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{B("")}}},[te,Z]=(0,r.useState)(null),We=(0,r.useCallback)(async()=>{B("junk");try{let d=await fetch(`${V}/refine-junk`).then(Y=>Y.json());d&&d.ok?Z(d.items||[]):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{B("")}},[t]),Le=async d=>{if(d.length&&window.confirm(t("junkRecycleAllConfirm"))){B("junkpurge");try{let Y=await fetch(`${V}/refine-junk-purge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:d})}).then(E=>E.json());Y&&Y.removed?(notify(t("junkDone")+"\uFF1A"+Y.removed.length+(Y.failed?.length?"\uFF08\u5931\u8D25 "+Y.failed.length+"\uFF09":"")),Z(E=>E&&E.filter(ue=>!Y.removed.includes(ue.path))),await re(),n&&n()):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{B("")}}},[oe,F]=(0,r.useState)(null),z=(0,r.useCallback)(async()=>{B("goals");try{let d=await fetch(V+"/refine-goals",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:30})}).then(Y=>Y.json());d&&d.ok?F(d):notify(d&&d.error||t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{B("")}},[t]),v=async d=>{B("goalskeep");try{let Y=await fetch(V+"/refine-goals-keep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:d.members.map(E=>E.path)})}).then(E=>E.json());Y&&Y.ok?(notify(t("goalDone")),F(E=>E&&{...E,clusters:(E.clusters||[]).filter(ue=>ue.goal!==d.goal)})):notify(t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{B("")}},I=async d=>{if(window.confirm(t("mergeConfirm"))){B("goalsmerge");try{let Y=await fetch(V+"/merge?paths="+encodeURIComponent(d.members.map(E=>E.path).join(","))).then(E=>E.json());Y&&Y.ok?(notify(t("goalMerged")),F(E=>E&&{...E,clusters:(E.clusters||[]).filter(ue=>ue.goal!==d.goal)}),await re(),n&&n()):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{B("")}}};(0,r.useEffect)(()=>{re()},[i]);let ie=async(d,Y)=>{if(window.confirm(t("mergeConfirm")))try{(await fetch(`${V}/merge?paths=${encodeURIComponent(d+","+Y)}`).then(ue=>ue.json())).ok&&(await re(),n&&n())}catch{}},Fe=async d=>{if(window.confirm(t("deleteConfirm")))try{(await fetch(`${V}/delete?path=${encodeURIComponent(d)}`).then(E=>E.json())).ok&&(await re(),n&&n())}catch{}},Be=Kn,de=({title:d,kind:Y,updated:E,path:ue})=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:Nt.colors[Y]||"#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:jt(E)}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>Fe(ue),children:[t("delete")," \u2715"]})]});return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:ht}),(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:re,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:()=>re(),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:x?.available?x.health?.ok?"\u6B63\u5E38":"\u5F02\u5E38":"\u2014"}),(0,e.jsx)("span",{children:t("captureTitle")}),(0,e.jsx)("small",{children:x?.health?.lastAt?jt(new Date(x.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:()=>re(),children:["\u21BB ",t("refresh")]})]}),q?(()=>{let d=q.db||{},Y=d.writable!==!1&&!d.corrupt,E=q.backups||{count:0,newestAt:0},ue=E.newestAt?Math.floor((Date.now()-Number(E.newestAt))/864e5):-1,Me=E.count?ue>7?"warn":"ok":"bad",ve=x&&x.available?x.health:null,ye=ve?ve.ok?"ok":"warn":"none",H=L&&L.findings?L.onDisk&&L.residentServed===L.onDisk&&L.hostVersion===L.onDisk?"ok":"warn":"none",se={ok:["\u2705","#10b981"],warn:["\u26A0","#f59e0b"],bad:["\u2717","#ef4444"],none:["\u2022","inherit"]},Ce=[{label:t("healthDb"),level:Y?"ok":"bad",text:Y?"journal="+(d.journalMode||"?")+(d.checkedAt?" \xB7 "+new Date(d.checkedAt).toLocaleString():""):(d.error||t("healthDbBad"))+" \u2192 dsh-memory doctor"},{label:t("healthBackups"),level:Me,text:E.count?(ue<=0?t("healthBackupToday").replace("{n}",String(E.count)):t("healthBackupAge").replace("{n}",String(E.count)).replace("{d}",String(ue)))+(E.files&&E.files.length?" \xB7 "+E.files[E.files.length-1]:""):t("healthNoBackups")},{label:t("healthCapture"),level:ye,text:ve?ve.ok?t("healthCapOk"):t("healthCapFail")+"\uFF1A"+(ve.reason||""):t("healthNoRecords")},{label:t("healthVersion"),level:H,text:H==="none"?t("healthRunAlign"):t("vcOnDisk")+" v"+(L.onDisk||"?")+" \xB7 "+t("vcResident")+" v"+(L.residentServed||"?")+" \xB7 "+t("vcLoaded")+" v"+(L.hostVersion||"?"),action:H==="none"?{label:t("alignRun"),run:pe}:null}];return(0,e.jsx)("div",{style:{marginTop:6},children:Ce.map(me=>(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:se[me.level][1]},children:se[me.level][0]}),(0,e.jsx)("b",{style:{minWidth:62,flex:"0 0 auto",opacity:.85},children:me.label}),(0,e.jsx)("span",{style:{opacity:.82,wordBreak:"break-word"},children:me.text}),me.action&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{marginLeft:6,padding:"0 6px",fontSize:11},disabled:!!U,onClick:me.action.run,children:me.action.label})]},me.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:()=>re(),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:!!U,onClick:pe,children:t(U==="align"?"exporting":"alignRun")}),L&&L.counts&&L.counts.fix>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!U,onClick:Q,children:t(U==="alignfix"?"exporting":"alignFix")}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("alignHint")})]}),L&&L.findings?(0,e.jsxs)("div",{style:{marginTop:6},children:[(0,e.jsxs)("div",{style:{fontSize:12,opacity:.75,marginBottom:4},children:[t("alignDisk")," v",L.onDisk||"?",L.residentServed?" \xB7 "+t("alignResident")+" v"+L.residentServed:"",L.hostVersion?" \xB7 "+t("alignHost")+" v"+L.hostVersion:""]}),(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:L.findings.map((d,Y)=>(0,e.jsxs)("li",{style:{padding:"4px 2px",borderTop:Y?"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]},Y))})]}):(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:()=>re(),children:["\u21BB ",t("refresh")]})]}),x?x.available===!1?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogUnavailable")}):(x.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:(x.entries||[]).map((d,Y)=>{let E=Eo[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:jt(d.time?new Date(d.time).toISOString():"")}),(0,e.jsxs)("td",{style:{padding:"4px 6px",whiteSpace:"nowrap",color:E[1],fontWeight:600},children:[E[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||""})]},Y)})})})}):(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",P.length,"\uFF09"]}),P.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:P.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:bt[d.kind]||bt.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:jt(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,Y=Math.max(...d.map(ve=>ve.count),1),E=260,ue=50,Me=E/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:E,height:ue,style:{display:"block",width:"100%",height:50},children:d.map((ve,ye)=>{let H=Math.round(ve.count/Y*(ue-4));return(0,e.jsx)("rect",{x:ye*Me+1,y:ue-H,width:Math.max(Me-2,2),height:H,rx:1.5,fill:ve.count>0?"var(--dsw-alias-accent, #3b82f6)":"var(--dsw-alias-border-l1, #e5e7eb)",opacity:ve.count>0?.85:.35},ve.date)})})]})})(),(0,e.jsxs)("div",{className:"mc-stats",children:[(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:s.total}),(0,e.jsx)("span",{children:t("total")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:s.today}),(0,e.jsx)("span",{children:t("todayAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:s.week}),(0,e.jsx)("span",{children:t("weekAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:s.tags}),(0,e.jsx)("span",{children:t("tags")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("byKind")}),(0,e.jsx)("div",{style:{display:"flex",gap:10,flexWrap:"wrap"},children:Be.map(d=>(0,e.jsxs)("span",{style:{fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:Nt.colors[d]||"#666"}}),t(ot[d]),": ",s.byKind?.[d]||0]},d))})]}),p&&(p.budgetChars||p.recallLimit||p.embedding)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,fontSize:12},children:[(0,e.jsx)("b",{children:t("budgetLabel")}),"\uFF1A",t("budgetChars")," ",(0,e.jsx)("b",{children:p.budgetChars||8e4})," \xB7 ",t("recallLimitLabel")," ",(0,e.jsx)("b",{children:p.recallLimit||5})," \xB7 ",t("embeddingLabel")," ",p.embedding?"ON":"OFF"]}),(0,e.jsxs)("div",{className:"mc-card",children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("todayList"),"\uFF08",s.todayCards?.length||0,"\uFF09"]}),s.todayCards?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:s.todayCards.map(d=>(0,e.jsx)(de,{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:!!U,onClick:_e,children:U==="scan"?t("exporting"):"\u{1F50D} "+t("scanAndOrganize")}),u&&u.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!U,onClick:async()=>{if(window.confirm(t("oneClickOptimizeConfirm"))){B("oneclick");try{let d=JSON.stringify({cleanupStale:X}),E=await(await fetch(`${V}/optimize-execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:d})).json();E&&E.ok?(notify(`${t("oneClickOptimizeDone")}\uFF1A${E.plan.merged} ${t("optimizedMerged")}${X?` \xB7 ${E.plan.staleDeleted} ${t("optimizedStaleDeleted")}`:""}`),await re(),n&&n(),N(null)):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{B("")}}},children:U==="oneclick"?t("exporting"):"\u26A1 "+t("oneClickOptimize")}),u&&u.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:X,onChange:d=>ce(d.target.checked)}),t("oneClickAlsoStale")]})]}),!u&&(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:10},children:t("scanHint")}),u&&(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}}),u.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!U,onClick:he,children:t(U==="merge"?"exporting":"batchMerge")})]}),(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("mergePairs")}),u.merge?.length?(0,e.jsx)("ul",{style:{margin:"0 0 12px",padding:0,listStyle:"none"},children:u.merge.map((d,Y)=>(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:()=>ie(d.a.path,d.b.path),children:t("mergeNow")})]},Y))}):(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",u.stale?.length||0,"\uFF09"]}),u.stale?.length>0&&(0,e.jsx)("div",{style:{marginBottom:6},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!U,onClick:async()=>{if(!window.confirm(t("deleteConfirm")))return;B("clean");let d=0;for(let Y of u.stale)try{await fetch(`${V}/delete?path=${encodeURIComponent(Y.path)}`),d++}catch{}B(""),notify(`${d} ${t("deletedStale")}`),await re(),n&&n()},children:t("cleanStale")})}),u.stale?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:u.stale.map(d=>(0,e.jsx)(de,{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:!!U,onClick:y,children:t(U==="refine"?"exporting":"refineScan")}),(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("refineHint")})]}),O?.findings?.length?O.findings.map((d,Y)=>(0,e.jsxs)("div",{style:{borderTop:Y?"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:!!U,onClick:()=>De(d,"keepA"),children:t("refineKeepA")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>De(d,"keepB"),children:t("refineKeepB")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>De(d,"keepBoth"),children:t("refineKeepBoth")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>De(d,"merge"),children:t("refineMerge")})]})]},Y)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(O?"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:!!U,onClick:We,children:t(U==="junk"?"exporting":"junkScan")}),te?.length?(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:()=>Le(te.map(d=>d.path)),children:t(U==="junkpurge"?"exporting":"junkRecycleAll")}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("junkHint")})]}),te?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:te.map((d,Y)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 2px",borderTop:Y?"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:!!U,onClick:()=>Le([d.path]),children:t("junkRecycle")})]},Y))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(te?"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:!!U,onClick:z,children:t(U==="goals"?"exporting":"goalScan")}),oe?(0,e.jsxs)("span",{style:{opacity:.6,fontSize:11},children:[t("goalStats"),"\uFF1A",oe.cached," / ",oe.calls]}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("goalHint")})]}),oe?.clusters?.length?oe.clusters.map((d,Y)=>(0,e.jsxs)("div",{style:{borderTop:Y?"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((E,ue)=>(0,e.jsx)("li",{children:E.title},ue))}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>v(d),children:t("goalKeep")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>I(d),children:t("goalMerge")})]})]},Y)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(oe?"goalNone":"goalIdle")})]})]})]})]})}var $a=[{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 br({t,newCard:a,setNewCard:n,onCreated:i}){if(!a)return null;let s=$a.find(w=>w.key===a.template),m=a.body||(s?t(s.bodyKey):""),g=a.kind||(s?s.kind:"knowledge"),S=a.tags||(s?t(s.tagKey):""),u=a._creating,N=w=>{let x=$a.find(T=>T.key===w);n(T=>({...T,template:w,kind:x?x.kind:T.kind,body:x?t(x.bodyKey):T.body,tags:x?t(x.tagKey):T.tags}))},p=async()=>{if(!(!a.title&&!m)){n(w=>({...w,_creating:!0}));try{(await fetch(`${V}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a.title||t("untitled"),kind:g,tags:S.split(",").map(x=>x.trim()).filter(Boolean),body:m,source:"manual"})}).then(x=>x.json())).ok?(n(null),i&&i()):n(x=>({...x,_creating:!1}))}catch{n(x=>({...x,_creating:!1}))}}};return(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>n(null),children:[(0,e.jsx)("style",{children:ht}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:600,width:"92vw",maxHeight:"85vh"},onClick:w=>w.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:t("newCard")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>n(null),children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10,overflow:"auto"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[$a.map(w=>(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===w.key?" me-on":""}`,onClick:()=>N(w.key),children:t(w.label)},w.key)),(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===""?" me-on":""}`,onClick:()=>n(w=>({...w,template:"",body:"",tags:"",kind:"knowledge"})),children:t("tplBlank")})]}),(0,e.jsx)("select",{className:"mc-btn",value:g,onChange:w=>n(x=>({...x,kind:w.target.value})),style:{maxWidth:180,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:Kn.map(w=>(0,e.jsx)("option",{value:w,style:{background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:t(ot[w])||w},w))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("cardTitle"),value:a.title||"",onChange:w=>n(x=>({...x,title:w.target.value}))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("tagsHint"),value:S,onChange:w=>n(x=>({...x,tags:w.target.value}))}),(0,e.jsx)("textarea",{className:"mc-btn",placeholder:t("cardBody"),value:m,onChange:w=>n(x=>({...x,body:w.target.value})),style:{minHeight:180,resize:"vertical",fontFamily:"inherit"}}),(0,e.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:u,onClick:p,children:t(u?"exporting":"createCard")})})]})]})]})}async function Ja(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 hr({t,onClose:a}){let[n,i]=(0,r.useState)(""),[s,m]=(0,r.useState)(""),[g,S]=(0,r.useState)(""),[u,N]=(0,r.useState)(!0),[p,w]=(0,r.useState)(!1),[x,T]=(0,r.useState)(""),[q,G]=(0,r.useState)(""),R=(0,r.useRef)(null),$=(0,r.useRef)(null),L=()=>{let X=R.current;if(X)try{X.focus(),X.select()}catch{}},W=X=>{T(X),$.current&&clearTimeout($.current),$.current=setTimeout(()=>T(""),2400)};(0,r.useEffect)(()=>{let X=!0;return fetch(V+"/diagnostics").then(ce=>ce.json()).then(ce=>{X&&(ce&&ce.ok?(m(String(ce.diagnostics||"")),S(String(ce.version||""))):w(!0))}).catch(()=>{X&&w(!0)}).finally(()=>{X&&N(!1)}),()=>{X=!1}},[]),(0,r.useEffect)(()=>{let X=ce=>{ce.key==="Escape"&&a()};return window.addEventListener("keydown",X),()=>{window.removeEventListener("keydown",X),$.current&&clearTimeout($.current)}},[a]);let pe=(()=>{try{return String(navigator.language||"").toLowerCase().startsWith("en")?"en":"zh"}catch{return"zh"}})(),Q=()=>{let X=n.trim().split(`
|
|
1054
|
+
`)[0]||"",ce=xn({title:"[Bug] "+(X.slice(0,60)||"memory-eternal \u95EE\u9898"),body:vn({description:n,diagnostics:s,version:g})});try{window.open(ce,"_blank","noopener")}catch{W(t("fbCopyFail"))}},P=async()=>{await Ja(s)?(G(""),W(t("fbCopiedDiag"))):(G(s),W(t("fbCopyManual")))},K=async()=>{let X=wn({lang:pe,description:n,diagnostics:s});await Ja(X)?(G(""),W(t("fbCopiedPrompt"))):(G(X),W(t("fbCopyManual")))},U={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},B={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:ht}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:720},onClick:X=>X.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:X=>i(X.target.value),placeholder:t("fbDesc"),rows:5,style:U}),(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:P,disabled:!s,children:t("fbCopyDiag")})]}),(0,e.jsx)("pre",{style:B,children:u?t("fbLoading"):p?t("fbDiagFail"):s})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>{if(!n.trim()){W(t("fbNeedDesc"));return}Q()},style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:["\u{1F680} ",t("fbOpenIssue")]}),(0,e.jsx)("span",{style:{opacity:.5,fontSize:12},children:t("fbOr")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:K,children:["\u{1F916} ",t("fbCopyPrompt")]})]}),x&&(0,e.jsx)("div",{style:{fontSize:12,color:"var(--dsw-alias-brand-primary, #3b82f6)"},children:x}),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:L,children:t("fbSelectAll")})]}),(0,e.jsx)("textarea",{ref:R,readOnly:!0,value:q,rows:7,style:U})]})]})]})]})}function yr({t,tab:a,onTab:n,onClose:i,onFeedback:s,onReplay:m}){let[g,S]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!g)return;let w=x=>{x.key==="Escape"&&S(null)};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[g]);let u=[{id:"group",label:t("supportGroup")},{id:"sponsor",label:t("supportSponsor")},{id:"legacy",label:t("supportLegacy")}],N="https://github.com/EternalNight996/memory-eternal/blob/main/README.md",p=(w,x)=>(0,e.jsxs)("figure",{children:[(0,e.jsx)("img",{src:w,alt:x,loading:"lazy",title:t("clickToZoom"),onClick:T=>S(T.currentTarget.currentSrc||w),onError:T=>{let q=T.currentTarget;q.dataset.fb||(q.dataset.fb="1",q.src="https://raw.githubusercontent.com/EternalNight996/memory-eternal/main/assets/support/"+String(w).split("/").pop())}}),(0,e.jsx)("figcaption",{children:x})]});return(0,e.jsxs)("div",{className:"me-overlay",onClick:i,children:[(0,e.jsx)("style",{children:ht}),(0,e.jsxs)("div",{className:"me-dialog me-support",onClick:w=>w.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F4AC} ",t("supportTitle")]}),(0,e.jsx)("div",{className:"me-head-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:i,children:t("close")})})]}),(0,e.jsx)("div",{className:"me-support-tabs",children:u.map(w=>(0,e.jsx)("button",{type:"button",className:`me-support-tab${a===w.id?" active":""}`,onClick:()=>n(w.id),children:w.label},w.id))}),(0,e.jsxs)("div",{className:"me-support-body",children:[a==="group"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportGroupHint")}),(0,e.jsxs)("div",{className:"me-support-qr",children:[p("support/group-qr.jpg",t("supportGroupQQ")),p("support/group-wechat.jpg",t("supportGroupWechat"))]}),(0,e.jsx)("p",{className:"me-support-note",style:{marginTop:12},children:(0,e.jsxs)("a",{className:"me-support-link",href:N,target:"_blank",rel:"noreferrer",children:[t("supportReadme")," \u2197"]})})]}),a==="sponsor"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportSponsorHint")}),(0,e.jsxs)("div",{className:"me-support-qr",children:[p("support/wechat-pay.jpg","\u5FAE\u4FE1\u6536\u6B3E\u7801"),p("support/wechat-reward.jpg","\u5FAE\u4FE1\u8D5E\u8D4F\u7801")]}),(0,e.jsxs)("p",{className:"me-support-note",style:{marginTop:12},children:["\u6253\u8D4F\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\uFF1B\u63D2\u4EF6\u672C\u4F53\u59CB\u7EC8\u5F00\u6E90\u514D\u8D39\uFF08MIT\uFF09\u3002",(0,e.jsx)("br",{}),(0,e.jsx)("a",{className:"me-support-link",href:"https://github.com/EternalNight996/memory-eternal/blob/main/SPONSOR.md",target:"_blank",rel:"noreferrer",children:"SPONSOR.md \u2197"})]})]}),a==="legacy"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{style:{margin:"0 0 8px",fontSize:14},children:t("supportLegacyTitle")}),(0,e.jsx)("p",{className:"me-support-note",children:t("supportLegacyBody")}),(0,e.jsxs)("div",{className:"me-support-actions",children:[(0,e.jsxs)("a",{className:"mc-btn",href:N,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")]})]})]}),g&&(0,e.jsxs)("div",{className:"me-lightbox",role:"dialog","aria-modal":"true","aria-label":t("close"),onClick:w=>{w.stopPropagation(),S(null)},children:[(0,e.jsx)("button",{type:"button",className:"me-lightbox-close",onClick:w=>{w.stopPropagation(),S(null)},"aria-label":t("close"),children:"\u2715"}),(0,e.jsx)("img",{src:g,alt:"",onClick:w=>w.stopPropagation()})]})]})}function xr({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")}],g=n===m.length-1;return(0,r.useEffect)(()=>{let S=u=>{u.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:ht}),(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((S,u)=>(0,e.jsx)("span",{className:`me-guide-dot${u<=n?" on":""}`},u))}),(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(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 vr({t,card:a,query:n,onClose:i,onDelete:s,onFeedback:m,onNavigate:g,onTagClick:S,allCards:u,onOpenRelated:N,onKindChange:p,onSaved:w}){let[x,T]=(0,r.useState)(0),[q,G]=(0,r.useState)(""),[R,$]=(0,r.useState)(()=>{try{let H=localStorage.getItem("me-read-width");return["narrow","mid","wide"].includes(H)?H:"mid"}catch{return"mid"}}),L={narrow:720,mid:900,wide:1180};(0,r.useEffect)(()=>{let H=se=>{if(se.key==="Escape"){i();return}let Ce=String(se.target&&se.target.tagName||"").toLowerCase();Ce==="input"||Ce==="textarea"||Ce==="select"||se.target&&se.target.isContentEditable||(se.key==="j"&&g?(se.preventDefault(),g(1)):se.key==="k"&&g&&(se.preventDefault(),g(-1)))};return window.addEventListener("keydown",H),()=>window.removeEventListener("keydown",H)},[i,g]);let W=async(H,se)=>{let Ce=await Ja(String(H||""));G(Ce?t("copied")+" \xB7 "+se:t("copyFail")),setTimeout(()=>G(""),1500)},{meta:pe,body:Q}=(0,r.useMemo)(()=>ha(a.text||""),[a.text]),P=H=>{let se=pe.find(([Ce])=>String(Ce).toLowerCase()===H);return se?se[1]:""},K=un(P("tags")),U=a.kind||P("kind")||"knowledge",B=String(a.status||P("status")||"approved").toLowerCase(),X=bt[U]||"#6B7280",ce=(Q||"").length>460,he=(0,r.useMemo)(()=>Za(Q,a.title),[Q,a.title]),re=(0,r.useMemo)(()=>{let H=en(a);if(H)return H;let Ce=(he.split(/\r?\n/).map(me=>me.trim()).find(me=>me&&!/^#{1,2}\s/.test(me))||"").replace(/[#>*_`]/g,"").replace(/\s+/g," ").trim();return Ce.length>150?Ce.slice(0,148)+"\u2026":Ce},[a,he]),_e=(0,r.useMemo)(()=>ur(he),[he]),O=(0,r.useMemo)(()=>{let H=new Set(K);return(u||[]).filter(se=>se.path!==a.path&&(se.tags||[]).some(Ce=>H.has(Ce))).slice(0,3)},[u,a.path,K.join("|")]),Ee=()=>{F(String(a.title||"")),v((Array.isArray(K)?K:[]).join(", ")),ie(String(Q||"")),d(""),Le(!0)},y=()=>{Le(!1),d("")},De=async()=>{let H=String(oe||"").trim(),se=String(I||"").trim();if(!H){d(t("editTitleEmpty"));return}if(!se){d(t("editBodyEmpty"));return}let Ce=String(z||"").split(/[,,\n]+/).map(me=>me.trim()).filter(Boolean);Be(!0),d("");try{let me=await fetch(`${V}/card/update`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:a.path,title:H,tags:Ce,body:se})}).then(rt=>rt.json());if(!me||!me.ok){d(me&&me.error||t("editFail"));return}Le(!1),w&&await w({path:a.path,status:B,title:H})}catch(me){d(String(me&&me.message||me))}finally{Be(!1)}},[te,Z]=(0,r.useState)(!0),[We,Le]=(0,r.useState)(!1),[oe,F]=(0,r.useState)(""),[z,v]=(0,r.useState)(""),[I,ie]=(0,r.useState)(""),[Fe,Be]=(0,r.useState)(!1),[de,d]=(0,r.useState)(""),Y=(0,r.useRef)(null),[E,ue]=(0,r.useState)(""),Me=H=>{let se=Y.current;if(!se)return;let Ce=document.getElementById(H);if(!Ce||!se.contains(Ce))return;let me=Ce.getBoundingClientRect().top-se.getBoundingClientRect().top+se.scrollTop-12;se.scrollTo({top:Math.max(0,me),behavior:"smooth"})},ve=H=>{if(!te){Z(!0),setTimeout(()=>Me(H),80);return}Me(H)},ye=H=>{let se=H.currentTarget,Ce=se.scrollHeight-se.clientHeight;T(Ce<=0?100:Math.min(100,Math.max(0,se.scrollTop/Ce*100)));let me=se.querySelectorAll(".md-doc .md-h"),rt="",yt=se.getBoundingClientRect().top+28;for(let $e of me)if($e.getBoundingClientRect().top<=yt)rt=$e.id;else break;ue(rt)};return(0,e.jsxs)("div",{className:"me-overlay",onClick:i,children:[(0,e.jsx)("style",{children:ht}),(0,e.jsxs)("div",{className:"me-dialog me-reader-dialog",onClick:H=>H.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:$t[U]||"\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:()=>W(Q,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:We?y:Ee,children:We?"\u2716 "+t("editCancel"):"\u270F\uFE0F "+t("editCard")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("readWidth"),onClick:()=>{let H=["narrow","mid","wide"],se=H[(H.indexOf(R)+1)%H.length];$(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")]}),ce&&(0,e.jsx)("button",{type:"button",className:"mc-btn","aria-expanded":te,onClick:()=>Z(H=>!H),children:t(te?"collapse":"expand")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{window.confirm(t("deleteConfirm"))&&s&&s(a.path)},children:t("delete")}),p&&B==="approved"&&(U==="core"?(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>p(a.path,"knowledge"),children:t("unsetCore")}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>p(a.path,"core"),children:["\u2B50 ",t("setCore")]})),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:i,children:t("close")})]})]}),p&&(0,e.jsxs)("div",{className:"me-core-banner"+(U==="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(U==="core"?"coreActiveHint":"coreInactiveHint")}),B==="approved"?(0,e.jsx)("button",{type:"button",className:"mc-btn me-core-btn",onClick:()=>p(a.path,U==="core"?"knowledge":"core"),children:U==="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:X,borderColor:X+"59",background:X+"1a"},children:[$t[U]||"\u{1F4CE}"," ",t(ot[U]||"kindKnowledge")]}),(0,e.jsxs)("span",{className:"md-chip "+(B==="approved"?"md-chip-st-ok":B==="pending"?"md-chip-st-warn":"md-chip-st-bad"),children:[B==="approved"?"\u2705":B==="pending"?"\u23F3":"\u26D4"," ",t(B==="approved"?"statusApproved":B==="pending"?"statusPending":"statusRejected")]}),(Array.isArray(K)?K:[]).slice(0,8).map(H=>(0,e.jsxs)("button",{type:"button",className:"md-chip md-chip-tag mc-tag-click",title:H,onClick:()=>S&&S(H),children:["\u{1F3F7} ",H]},H)),!!P("updated")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F552} ",t("updated")," ",jt(P("updated"))]}),!!P("source")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F4E5} ",P("source")]})]}),(0,e.jsx)("div",{className:"me-read-progress","aria-hidden":"true",children:(0,e.jsx)("i",{style:{width:x+"%"}})}),(0,e.jsxs)("div",{className:"me-reader-body",children:[(0,e.jsxs)("div",{className:"me-dialog-body me-reader-main",style:{maxWidth:L[R],margin:"0 auto",width:"100%",boxSizing:"border-box",...te?{}:{maxHeight:300,overflow:"hidden"}},ref:Y,onScroll:ye,onClick:te?void 0:H=>{H.stopPropagation(),Z(!0)},children:[!We&&!!re&&(0,e.jsxs)("div",{className:"me-reader-callout",children:[(0,e.jsx)("span",{className:"me-reader-callout-k",children:t(Qn(a))}),(0,e.jsx)("p",{children:re})]}),We?(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:oe,onChange:H=>F(H.target.value),maxLength:200,style:{width:"100%",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13,boxSizing:"border-box"}}),(0,e.jsx)("label",{style:{fontSize:12,fontWeight:600,opacity:.8},htmlFor:"me-edit-tags",children:t("editTags")}),(0,e.jsx)("input",{id:"me-edit-tags",value:z,onChange:H=>v(H.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:I,onChange:H=>ie(H.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"}}),de&&(0,e.jsx)("div",{style:{color:"#f87171",fontSize:12},children:de}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",alignItems:"center"},children:[(0,e.jsx)("span",{style:{marginRight:"auto",fontSize:11.5,opacity:.55},children:a.path}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:y,disabled:Fe,children:t("editCancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:De,disabled:Fe,style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:t(Fe?"editSaving":"editSave")})]})]}):(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:la(he)}})]}),(0,e.jsxs)("aside",{className:"me-reader-side",children:[_e.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("contents")}),(0,e.jsx)("div",{className:"me-reader-toc",children:_e.map((H,se)=>(0,e.jsxs)("button",{type:"button",className:`lv${H.level}${E===H.id?" active":""}`,onClick:()=>ve(H.id),children:[(0,e.jsx)("span",{children:String(se+1).padStart(2,"0")}),H.text]},H.id))})]}),(0,e.jsx)("div",{className:"side-label",children:t("source")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:P("source")||a.submittedBy||"\u2014"}),(0,e.jsx)("div",{className:"side-label",children:t("updated")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:jt(P("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(H=>(0,e.jsxs)("button",{type:"button",className:"mc-chip",onClick:()=>S&&S(H),children:["#",H]},H))})]}),O.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:O.map(H=>(0,e.jsxs)("button",{type:"button",onClick:()=>N&&N(H),children:[(0,e.jsx)("span",{children:$t[H.kind]||"\u{1F4CE}"}),(0,e.jsx)("b",{children:H.title})]},H.path))})]})]})]}),!te&&(0,e.jsxs)("div",{className:"md-collapsed-hint",onClick:H=>{H.stopPropagation(),Z(!0)},children:[t("expand")," \u2304"]})]})]})}function wr({t,onOpen:a,all:n,onAllChange:i,onMutate:s,active:m,visible:g}){let[S,u]=(0,r.useState)([]),[N,p]=(0,r.useState)(null),[w,x]=(0,r.useState)(null),[T,q]=(0,r.useState)(!1),G=(0,r.useRef)(0),R=(0,r.useRef)(null);R.current||(R.current=Fn(96));let $=(0,r.useRef)(0),L=(0,r.useRef)(0),W=(0,r.useRef)(S);W.current=S;let pe=(0,r.useRef)(n),Q=(0,r.useRef)({requests:0,cacheHits:0,errors:0,timeouts:0,lastMs:0,lastBytes:0}),P=(0,r.useCallback)(async(y,De={})=>{let te=Array.isArray(y)?y.filter(Boolean):[],Z=(n?"all|":"")+Vt(te);if(!De.force){let z=R.current.get(Z);if(z)return Q.current.cacheHits+=1,p(z),u(te),x(null),q(!1),z}let We=++$.current;q(!0),x(null);let Le=new AbortController,oe=setTimeout(()=>{try{Le.abort()}catch{}},1600),F=performance.now();Q.current.requests+=1;try{let z=await fetch(Rn(V,te,{all:n}),{signal:Le.signal}),v=await z.json().catch(()=>null);if(We!==$.current)return null;if(!z.ok||!v||!v.ok)throw new Error(v&&v.error||"HTTP "+z.status);let I=Pn(v);if(!I.ok)try{console.warn("[memory-eternal] \u5206\u5C42\u54CD\u5E94\u8D8A\u754C\uFF1A"+I.problems.join("\uFF1B"))}catch{}return R.current.set(Z,v),Q.current.lastMs=Math.round(performance.now()-F),Q.current.lastBytes=I.bytes,L.current||(L.current=Math.round(performance.now())),p(v),u(te),x(null),v}catch(z){if(We!==$.current)return null;let v=Ln(z,{timeoutMs:1600,elapsedMs:performance.now()-F});v.timeout&&(Q.current.timeouts+=1),Q.current.errors+=1;try{console.warn("[memory-eternal] \u5C42\u7EA7\u52A0\u8F7D\u5931\u8D25 @ "+Z+"\uFF1A"+v.message)}catch{}return x({...v,target:Vt(te),segments:te.slice()}),null}finally{clearTimeout(oe),We===$.current&&q(!1)}},[n]);(0,r.useEffect)(()=>{pe.current!==n&&(pe.current=n,R.current.clear(),m&&P([],{force:!0}))},[n,m,P]),(0,r.useEffect)(()=>{!m||N||T||P([])},[m,N,T,P]),(0,r.useEffect)(()=>{g&&N&&G.current++},[g,N]);let K=(0,r.useCallback)(y=>{let De=Array.isArray(y)?y:Tn(y&&y.path!==void 0?y.path:y);Vt(De)!==Vt(W.current)&&P(De)},[P]),U=(0,r.useCallback)(y=>{y&&P(W.current.concat(String(y)))},[P]),B=(0,r.useCallback)(()=>{R.current.clear();let y=w&&Array.isArray(w.segments)?w.segments:W.current;P(y,{force:!0})},[P,w]),X=(0,r.useCallback)(async()=>(R.current.clear(),P(W.current,{force:!0})),[P]),ce=(0,r.useCallback)(async y=>{try{let te=await(await fetch(`${V}/delete?path=${encodeURIComponent(y)}`)).json();return te&&te.ok?(await X(),s&&s(),!0):!1}catch{return!1}},[X,s]),he=(0,r.useCallback)(async y=>{if(!y||y.length<2)return!1;try{let De=await fetch(`${V}/merge?paths=${encodeURIComponent(y.join(","))}`).then(te=>te.json());return De&&De.ok?(await X(),s&&s(),!0):!1}catch{return!1}},[X,s]);(0,r.useEffect)(()=>{let y=()=>{let De=typeof globalThis.__meGraphRuntime=="function"?globalThis.__meGraphRuntime():null;return{path:Vt(W.current),crumbs:N&&Array.isArray(N.crumbs)?N.crumbs.map(te=>({path:te.path,label:te.label,labelKey:te.labelKey,count:te.count})):[],level:N&&N.level?{mode:N.level.mode,total:N.level.total,items:N.level.items.length,edges:N.level.edges.length}:null,loading:!!T,error:w?{timeout:!!w.timeout,message:w.message,target:w.target||""}:null,requests:Q.current.requests,cacheHits:Q.current.cacheHits,errors:Q.current.errors,timeouts:Q.current.timeouts,lastMs:Q.current.lastMs,lastBytes:Q.current.lastBytes,firstLevelMs:L.current,cacheSize:R.current.size,timeoutMs:1600,runtime:De}};return globalThis.__meGraphProbe=y,()=>{if(globalThis.__meGraphProbe===y)try{delete globalThis.__meGraphProbe}catch{globalThis.__meGraphProbe=void 0}}},[N,T,w]);let re=N&&N.level?N.level:null,_e=re?re.items.length:0,O=re?re.total:0,Ee=re?re.edges.length:0;return(0,e.jsxs)("div",{className:"me-graph me-v5-graph",children:[(0,e.jsx)("style",{children:ht}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-graphhead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"KNOWLEDGE GRAPH"}),(0,e.jsx)("h1",{children:t("graphTab")}),(0,e.jsx)("p",{children:t("graphHint")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:N?`${_e} ${t("graphItems")} \xB7 ${O} ${t("graphCardsUnit")} \xB7 ${Ee} ${t("edges")}`:""})]}),!N&&!w&&(0,e.jsx)(eo,{text:t("loadingGraph")}),!N&&w&&(0,e.jsxs)("div",{className:"mc-empty",style:{display:"flex",flexDirection:"column",gap:10,alignItems:"center"},children:[(0,e.jsxs)("span",{children:[w.timeout?t("graphLevelTimeout").replace("{ms}",String(1600)):t("graphLevelError"),"\uFF1A",w.message]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:B,children:t("graphRetry")})]}),N&&_e===0&&(0,e.jsx)("div",{className:"mc-empty",children:t("graphEmptyLevel")}),N&&_e>0&&(0,e.jsx)(Sr,{level:re,crumbs:N.crumbs||[],onOpen:a,onDelete:ce,onMerge:he,onDrill:U,onNavigate:K,onRetry:B,error:N?w:null,loading:T,t,all:n,onAllChange:i,fitTrigger:G.current})]})}var Nt={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 eo({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 _n=[];function kr({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,g)=>{let S=m.labelKey?a(m.labelKey):"",u=S&&S!==m.labelKey?S:m.label||m.path||"\u2014",N=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":"")+(N?" current":""),"aria-current":N?"page":void 0,title:u,disabled:N||i,onClick:()=>{N||n(m)},children:u})]},m.path||"root")})})}function Sr({level:t,crumbs:a,onOpen:n,onDelete:i,onMerge:s,onDrill:m,onNavigate:g,onRetry:S,error:u,loading:N,t:p,all:w,onAllChange:x,fitTrigger:T}){let q=(0,r.useRef)(null),G=(0,r.useRef)(null),R=(0,r.useRef)(null),$=(0,r.useRef)(null),L=(0,r.useRef)(null),W=t&&Array.isArray(t.items)?t.items:_n,pe=t&&Array.isArray(t.edges)?t.edges:_n,Q=t&&t.id||"",P=(0,r.useMemo)(()=>W.map(b=>({id:b.id,title:b.label||b.id,name:b.label||b.id,kind:b.kind||"other",tags:Array.isArray(b.tags)?b.tags:[],updated:b.updated||"",count:Number(b.count)||0,type:b.type||"card"})),[W]),K=(0,r.useMemo)(()=>pe.map(b=>({source:b.source,target:b.target,type:b.type||"tag",weight:Number(b.weight)||1})),[pe]),U=(0,r.useRef)(p);U.current=p;let B=(0,r.useRef)(n);(0,r.useEffect)(()=>{B.current=n},[n]);let X=(0,r.useRef)(i);(0,r.useEffect)(()=>{X.current=i},[i]);let ce=(0,r.useRef)(s);(0,r.useEffect)(()=>{ce.current=s},[s]);let he=(0,r.useRef)(m);(0,r.useEffect)(()=>{he.current=m},[m]);let[re,_e]=(0,r.useState)(""),[O,Ee]=(0,r.useState)(null),[y,De]=(0,r.useState)(null),te=(0,r.useRef)("");(0,r.useEffect)(()=>{te.current=re.trim().toLowerCase()},[re]),(0,r.useEffect)(()=>{let b=R.current;if(!b)return;let c=re.trim().toLowerCase();if(!c)return;let le=b.nodes.find(Ae=>(Ae.name||"").toLowerCase().includes(c));if(le){R.current.selectedId=le.id,Ee(le.id),b.panX=b.w/2-le.x*b.zoom,b.panY=b.h/2-le.y*b.zoom;try{b.render&&b.render()}catch(Ae){_t(Ae,"search-center")}}},[re]);let[Z,We]=(0,r.useState)("all"),[Le,oe]=(0,r.useState)(!1),F=(0,r.useRef)("all"),[z,v]=(0,r.useState)(""),I=(0,r.useRef)(""),[ie,Fe]=(0,r.useState)(!1),Be=(0,r.useRef)(!1),[de,d]=(0,r.useState)(null);(0,r.useEffect)(()=>{F.current=Z},[Z]),(0,r.useEffect)(()=>{I.current=z},[z]),(0,r.useEffect)(()=>{Be.current=ie},[ie]);let Y=(0,r.useMemo)(()=>{let b=new Map;for(let c of P)for(let le of c.tags||[]){let Ae=String(le).trim();Ae&&b.set(Ae,(b.get(Ae)||0)+1)}return[...b.entries()].sort((c,le)=>le[1]-c[1]).slice(0,24).map(([c,le])=>({tag:c,n:le}))},[P]),E=(0,r.useMemo)(()=>{let b={};for(let c of P)b[c.kind||"other"]=(b[c.kind||"other"]||0)+(c.type==="planet"?Math.max(1,c.count||0):1);return b},[P]),ue=(()=>{let b=re.trim().toLowerCase();return!!b&&!P.some(c=>(c.title||c.name||"").toLowerCase().includes(b)||String(c.kind||"").toLowerCase().includes(b)||String(ot[c.kind]||"").toLowerCase().includes(b))})();(0,r.useEffect)(()=>{let b=R.current;b&&b.requestRender&&b.requestRender()},[re]),(0,r.useEffect)(()=>{let b=R.current;if(!(!b||!b.render))try{b.render()}catch(c){_t(c,"filter/timeDim")}},[Z,z,ie]);let Me=(0,r.useRef)(null),[ve,ye]=(0,r.useState)([]),[H,se]=(0,r.useState)(null),[Ce,me]=(0,r.useState)(!1),[rt,yt]=(0,r.useState)(null),[$e,pt]=(0,r.useState)(""),et=(0,r.useRef)(null),xt=(0,r.useRef)(null),qe=(b,c=!0)=>{et.current&&clearTimeout(et.current),yt({msg:b,ok:c}),et.current=setTimeout(()=>yt(null),1900)},Bt=b=>{pt(b),xt.current&&clearTimeout(xt.current),xt.current=setTimeout(()=>pt(""),1600)};(0,r.useEffect)(()=>()=>{et.current&&clearTimeout(et.current),xt.current&&clearTimeout(xt.current)},[]);let we=(0,r.useMemo)(()=>P.reduce((b,c)=>(b[c.id]=c,b),{}),[P]);return(0,r.useEffect)(()=>{let b=q.current;if(!b||P.length===0)return;let c=b.getContext("2d");if(!c)return;let le=Math.min(1.5,Math.max(1,window.devicePixelRatio||1)),Ae={};K.forEach(k=>{Ae[k.source]=(Ae[k.source]||0)+1,Ae[k.target]=(Ae[k.target]||0)+1});let f=Math.max(1,...Object.values(Ae)),C=In(),Re=W.some(k=>k&&k.type==="planet"),o={nodes:W.filter(k=>k&&k.type!=="planet").concat(W.filter(k=>k&&k.type==="planet")).map(k=>Dn(k,{degree:Ae[k.id]||0,maxDegree:f})),edges:K.map(k=>({sourceNodeId:k.source,targetNodeId:k.target,weight:Math.max(1,Number(k.weight)||1)})),panX:0,panY:0,zoom:1,running:!0,raf:0,tickCount:0,quietTicks:0,dragNode:null,selectedId:null,mouseX:0,mouseY:0,w:0,h:0,dpr:le,ctx:c,multi:[],marquee:null,planetLayer:Re,levelId:Q};o.domain=P,o.domainById=P.reduce((k,A)=>(k[A.id]=A,k),{}),o.nodeById=new Map(o.nodes.map(k=>[k.id,k])),o.edgePairs=(()=>{let k=new Map(o.nodes.map((D,J)=>[D.id,J])),A=new Int32Array(o.edges.length*2),_=0;for(let D of o.edges){let J=k.get(D.sourceNodeId),fe=k.get(D.targetNodeId);J===void 0||fe===void 0||(A[_]=J,A[_+1]=fe,_+=2)}return A.subarray(0,_)})(),o.alpha=1,o.forceParams=Re?An(ka(o.nodes.length)):ka(o.nodes.length),o.lastTickMs=0,o.lastRenderMs=0,o.nodes.forEach((k,A)=>{let _=A*2.399963229728653,D=12*Math.sqrt(A);k.x=Math.cos(_)*D,k.y=Math.sin(_)*D});let mt=[...new Set(o.nodes.map(k=>k.type))];o.clustered=!Re&&mt.length>1,o.typeCenters=o.typeCenters||{};let vt=Re?0:160;mt.forEach((k,A)=>{if(o.typeCenters[k])return;let _=A/mt.length*Math.PI*2-Math.PI/2;o.typeCenters[k]={x:Math.cos(_)*vt,y:Math.sin(_)*vt}}),R.current=o;let ut=0,Ct=0,Mt=null,qt="",Gt=()=>{let k=b.clientWidth,A=b.clientHeight;o.w=k,o.h=A,b.width=k*le,b.height=A*le,c.setTransform(le,0,0,le,0,0),(ut===0||Ct===0)&&k>0&&A>0&&o.tickCount>0&&C.raf(()=>Tt()),ut=k,Ct=A};Gt();let l=new ResizeObserver(Gt);l.observe(b.parentElement);let ee=(k,A)=>k&&k.length>A?k.slice(0,A)+"\u2026":k,ae=(k,A,_,D)=>{if(c.beginPath(),D==="rect")c.rect(k-_,A-_*.75,_*2,_*1.5);else if(D==="diamond")c.moveTo(k,A-_),c.lineTo(k+_,A),c.lineTo(k,A+_),c.lineTo(k-_,A),c.closePath();else if(D==="hexagon"){for(let J=0;J<6;J++){let fe=Math.PI/3*J-Math.PI/2,Te=k+_*Math.cos(fe),ze=A+_*Math.sin(fe);J===0?c.moveTo(Te,ze):c.lineTo(Te,ze)}c.closePath()}else c.arc(k,A,_,0,Math.PI*2)},je=new Map,Ie=(k,A)=>{let _=k+"|"+Math.round(A),D=je.get(_);return D||(D=c.createRadialGradient(-A*.32,-A*.38,0,0,0,A*1.15),D.addColorStop(0,Oe(k,"#ffffff",.2)),D.addColorStop(.62,k),D.addColorStop(1,Oe(k,"#000000",.22)),je.set(_,D)),D},Se=(k,A)=>{let _=parseInt(k.slice(1,3),16),D=parseInt(k.slice(3,5),16),J=parseInt(k.slice(5,7),16);return"rgba("+_+","+D+","+J+","+A+")"},Oe=(k,A,_)=>{let D=ze=>[parseInt(ze.slice(1,3),16),parseInt(ze.slice(3,5),16),parseInt(ze.slice(5,7),16)],J=D(k),fe=D(A),Te=Math.max(0,Math.min(1,Number(_)||0));return"rgb("+J.map((ze,Ke)=>Math.round(ze+(fe[Ke]-ze)*Te)).join(",")+")"},wt=new Map,kt=new Map,Kt=(k,A,_,D)=>{let J=Ke=>[parseInt(Ke.slice(1,3),16),parseInt(Ke.slice(3,5),16),parseInt(Ke.slice(5,7),16)],fe=J(k),Te=J(A),ze=Math.max(0,Math.min(1,Number(_)||0));return"rgba("+fe.map((Ke,Ge)=>Math.round(Ke+(Te[Ge]-Ke)*ze)).join(",")+","+D+")"},Xt=1.1,ga=.3,it=3,Tt=()=>{if(!o.nodes.length)return;let k=1/0,A=-1/0,_=1/0,D=-1/0;o.nodes.forEach(Ve=>{let nt=Number(Ve.r)||0,Ye=Ve.planet?nt*1.32:nt;Ve.x-Ye<k&&(k=Ve.x-Ye),Ve.x+Ye>A&&(A=Ve.x+Ye),Ve.y-Ye<_&&(_=Ve.y-Ye),Ve.y+Ye>D&&(D=Ve.y+Ye)});let J=28,fe=A-k+J*2,Te=D-_+J*2,ze=Math.min(o.w/fe,o.h/Te),Ke=Math.pow(1/Xt,it);o.zoom=Math.max(.35,Math.min(1.8,ze*Ke));let Ge=!(Array.isArray(a)&&a.length>1);o.planetLayer&&Ge?o.zoom=Math.max(.12,Math.min(ga,ze)):o.planetLayer&&(o.zoom=Math.max(.12,ze*Math.pow(1/Xt,it-2))),o.panX=o.w/2-(k+A)/2*o.zoom,o.panY=o.h/2-(_+D)/2*o.zoom};$.current=Tt;let At=()=>{o.renderFrames=(o.renderFrames|0)+1;let k=o.zoom>=1.2?"in":"out";G.current&&G.current.dataset.zoom!==k&&(G.current.dataset.zoom=k),c.clearRect(0,0,o.w,o.h),o.searchTerm=te.current,o.kindFilter=F.current,o.timeMode=Be.current,o.tagFilter=I.current;let A=o.tagFilter,_=o.kindFilter,D=M=>String(M||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");c.save();let J=o.w+"x"+o.h;if(!Mt||qt!==J){Mt=new Path2D;let M=26;for(let Ne=M/2;Ne<o.w;Ne+=M)for(let Pe=M/2;Pe<o.h;Pe+=M)Mt.moveTo(Ne+1,Pe),Mt.arc(Ne,Pe,1,0,Math.PI*2);qt=J}c.fillStyle="rgba(255,255,255,0.055)",c.fill(Mt),c.restore(),c.save(),c.translate(o.panX,o.panY),c.scale(o.zoom,o.zoom);let fe={};o.nodes.forEach(M=>fe[M.id]=M);let Te=performance.now()<(o.motionUntil||0),ze=o.nodes.length>40,Ke=ze?1.5:.55,Ge=o.selectedId||o.hoverId,Ve=kn({panX:o.panX,panY:o.panY,zoom:o.zoom,w:o.w,h:o.h,margin:80}),nt=(()=>{let M=(o.searchTerm||"").toLowerCase();if(!M)return null;let Ne=[];for(let Pe of o.nodes){let He=(o.domainById[Pe.id]||{}).kind||"other";if(((Pe.name||"").toLowerCase().includes(M)||String(ot[He]||"").toLowerCase().includes(M)||String(He).toLowerCase().includes(M))&&Ne.push(Pe.id),Ne.length>200)break}return Ne})(),Ye=o.quality|0,Ft=Nn(o.nodes,{limit:Sn(o.nodes.length,Ye),focusId:Ge,hoverId:o.hoverId,searchHits:nt,degree:Ae}),Wt=new Map,Dt=(M,Ne)=>{let Pe=M+"|"+Ne,be=Wt.get(Pe);return be===void 0&&(c.font=M,be=c.measureText(Ne).width,Wt.set(Pe,be)),be},fa=o.nodes.length<=250,Zt=new Map,ro=o.nodes.length>1200&&o.zoom<.3,tn=o.zoom>=.6,La=Ye>=3,an=Ye<=0?1:Ye===1?2:Ye===2?4:8;o.edges.forEach((M,Ne)=>{if(ro)return;let Pe=Ge&&(M.sourceNodeId===Ge||M.targetNodeId===Ge);if(Ge){if(!Pe)return}else if(an>1&&Ne%an!==0)return;let be=fe[M.sourceNodeId],He=fe[M.targetNodeId];if(!be||!He||!wa(be.x,be.y,10,Ve)&&!wa(He.x,He.y,10,Ve))return;if(_!=="all"){let Fa=o.domainById[M.sourceNodeId]&&o.domainById[M.sourceNodeId].kind,Ia=o.domainById[M.targetNodeId]&&o.domainById[M.targetNodeId].kind;if(Fa!==_&&Ia!==_)return}if(A){let Fa=o.domainById[M.sourceNodeId]&&(o.domainById[M.sourceNodeId].tags||[]).includes(A),Ia=o.domainById[M.targetNodeId]&&(o.domainById[M.targetNodeId].tags||[]).includes(A);if(!Fa&&!Ia)return}let at=He.x-be.x,Je=He.y-be.y,Ze=Math.sqrt(at*at+Je*Je)||1,ft=Te||tn||Ye>=2?0:ze?10:16,ct=-Je/Ze*ft,lt=at/Ze*ft,Yt=(be.x+He.x)/2+ct,It=(be.y+He.y)/2+lt,Pt=Nt.colors[o.domainById[be.id]&&o.domainById[be.id].kind||"other"]||Nt.colors.other,ea=Ge?Pe?.72:.06:o.planetLayer?.22:ze?.12:.17,rn=parseInt(Pt.slice(1,3),16),sn=parseInt(Pt.slice(3,5),16),ln=parseInt(Pt.slice(5,7),16),cn=Math.max(1,Number(M.weight)||1),lo=Pe?1.6+Math.min(3.2,cn*.8):.7+Math.min(2.4,(cn-1)*.35),dn=Math.min(tn||Ye>=1?1.2:1/0,Math.round(lo*2)/2),pn=rn+","+sn+","+ln+","+ea+","+dn,sa=Zt.get(pn);sa||(sa={path:new Path2D,stroke:"rgba("+rn+","+sn+","+ln+","+ea+")",width:dn},Zt.set(pn,sa)),sa.path.moveTo(be.x,be.y),sa.path.quadraticCurveTo(Yt,It,He.x,He.y)}),Zt.forEach(M=>{c.strokeStyle=M.stroke,c.lineWidth=M.width,c.stroke(M.path)});let ia=null;Ge&&(ia=new Set,o.edges.forEach(M=>{M.sourceNodeId===Ge?ia.add(M.targetNodeId):M.targetNodeId===Ge&&ia.add(M.sourceNodeId)}));let io=(M,Ne={})=>{let Pe=ee(M.name,Ne.maxChars||16),be=1/o.zoom,He="500 "+(11.5*be).toFixed(1)+"px -apple-system,Segoe UI,sans-serif";c.font=He;let Je=Dt(He,Pe)+14*be,Ze=17*be,ft=M.y+M.r+(Ne.gap===void 0?8:Ne.gap)*be,ct=!0;for(let lt of nn)if(M.x-Je/2<lt.x+lt.w&&M.x+Je/2>lt.x&&ft<lt.y+lt.h&&ft+Ze>lt.y){ct=!1;break}return!ct&&!Ne.force?!1:(nn.push({x:M.x-Je/2,y:ft,w:Je,h:Ze}),c.fillStyle="rgba(20,24,30,0.78)",c.beginPath(),c.roundRect?c.roundRect(M.x-Je/2,ft,Je,Ze,4*be):c.rect(M.x-Je/2,ft,Je,Ze),c.fill(),c.strokeStyle="rgba(255,255,255,0.07)",c.lineWidth=1*be,c.stroke(),c.fillStyle=Ne.strong?"#f2f5f8":"#aeb6c2",c.textAlign="center",c.textBaseline="top",c.fillText(Pe,M.x,ft+4.6*be),!0)},so=(M,Ne,Pe)=>{let be=1/o.zoom,{isSel:He,isHov:at,dimmed:Je}=Pe,Ze=M.r*o.zoom;c.save(),c.globalAlpha=Je?.16:1;let ft="g|"+Ne+"|"+Math.round(M.r),ct=wt.get(ft);ct||(ct=c.createRadialGradient(0,0,M.r*.8,0,0,M.r*1.24),ct.addColorStop(0,Se(Ne,.18)),ct.addColorStop(.58,Se(Ne,.06)),ct.addColorStop(1,Se(Ne,0)),wt.set(ft,ct)),c.save(),c.translate(M.x,M.y),La||(c.fillStyle=ct,c.beginPath(),c.arc(0,0,M.r*1.24,0,Math.PI*2),c.fill());let lt=o.timeMode?Ne:Nt.deep[M.type]||Ne,Yt="b|"+lt+"|"+Math.round(M.r),It=kt.get(Yt);if(It||(It=c.createRadialGradient(-M.r*.26,-M.r*.32,M.r*.12,0,0,M.r*1.1),It.addColorStop(0,Kt(lt,"#ffffff",.24,.9)),It.addColorStop(.58,Se(lt,.86)),It.addColorStop(1,Kt(lt,"#000000",.34,.9)),kt.set(Yt,It)),c.beginPath(),c.arc(0,0,M.r,0,Math.PI*2),c.fillStyle="rgba(13,16,21,0.92)",c.fill(),c.beginPath(),c.arc(0,0,M.r,0,Math.PI*2),c.fillStyle=It,c.fill(),c.beginPath(),c.arc(0,0,M.r-Math.max(.6,1.1*be),Math.PI*1.06,Math.PI*1.94),c.strokeStyle="rgba(255,255,255,0.14)",c.lineWidth=Math.max(.7,1.2*be),c.stroke(),c.beginPath(),c.arc(0,0,M.r,0,Math.PI*2),c.strokeStyle=Se(Ne,He||at?.95:.58),c.lineWidth=Math.max(.8,1.1*be),c.stroke(),c.restore(),(He||at)&&(c.save(),c.beginPath(),c.arc(M.x,M.y,M.r+(He?7:5)*be,0,Math.PI*2),c.strokeStyle=He?"rgba(255,122,69,0.9)":Se(Ne,.7),c.lineWidth=Math.max(1,1.2*be),He&&c.setLineDash([5*be,4*be]),c.stroke(),c.restore()),c.restore(),He||at||Ze>=11){let Pt=Math.max(9,Math.min(21,Ze*.42))*be,ea=Ze>=30;c.save(),c.textAlign="center",c.textBaseline="middle",c.shadowColor="rgba(0,0,0,0.5)",c.shadowBlur=5*be,ea&&(c.font="600 "+(Pt*.48).toFixed(1)+"px -apple-system,Segoe UI,sans-serif",c.fillStyle="rgba(255,255,255,0.72)",c.fillText(ee(M.name,12),M.x,M.y-Pt*1.02)),c.font="700 "+Pt.toFixed(1)+"px -apple-system,Segoe UI,sans-serif",c.fillStyle="rgba(255,255,255,0.96)",c.fillText(zn(M.count,{unit:U.current("graphCountWan"),locale:U.current("graphCountLocale")}),M.x,M.y+(ea?Pt*.06:0)),ea&&(c.font="500 "+(Pt*.38).toFixed(1)+"px -apple-system,Segoe UI,sans-serif",c.fillStyle="rgba(255,255,255,0.5)",c.fillText(U.current("graphCardsUnit"),M.x,M.y+Pt*.92)),c.restore()}},nn=[],on=[];if(o.nodes.forEach(M=>{if(!wa(M.x,M.y,M.r+2,Ve))return;let Ne=o.domainById[M.id]||{},Pe=Ne.kind||"other",be=o.timeMode&&Ne.updated?Nr(Ne.updated):Nt.colors[Pe]||Nt.colors.other,He=Nt.shapes[Pe]||"circle",at=o.selectedId===M.id,Je=o.hoverId===M.id,Ze=o.searchTerm||"",ft=!Ze||(M.name||"").toLowerCase().includes(Ze)||String(ot[Pe]||"").toLowerCase().includes(Ze)||String(Pe).toLowerCase().includes(Ze),ct=_==="all"||Pe===_,lt=!A||(Ne.tags||[]).includes(A),Yt=Ge&&M.id!==Ge&&!(ia&&ia.has(M.id))||Ze&&!ft||!ct||!lt;if(M.planet){on.push({n:M,color:be,isSel:at,isHov:Je,dimmed:Yt,ok:ct&<});return}c.save(),c.globalAlpha=Yt?.08:1,(at||Je)&&fa&&(c.shadowColor=be,c.shadowBlur=at?16:11),c.translate(M.x,M.y),ae(0,0,M.r,He),c.fillStyle=La?be:Ie(be,M.r),c.fill(),(!La||at||Je)&&(c.strokeStyle="rgba(255,255,255,0.16)",c.lineWidth=Math.max(.6,.8*(1/o.zoom)),c.stroke()),Pe==="core"&&(c.fillStyle="#1b120e",c.font="700 "+Math.max(10,Math.round(M.r*.95))+"px sans-serif",c.textAlign="center",c.textBaseline="middle",c.fillText("\u2605",0,0)),c.restore(),at?(c.save(),ae(M.x,M.y,M.r+3,He),c.strokeStyle=be,c.lineWidth=3,c.shadowColor=be,c.shadowBlur=12,c.stroke(),c.restore()):Je?(c.save(),ae(M.x,M.y,M.r+2,He),c.strokeStyle=be,c.lineWidth=2,c.stroke(),c.restore()):Ze&&ft?(c.save(),ae(M.x,M.y,M.r+2,He),c.strokeStyle="#ffa06b",c.lineWidth=2,c.stroke(),c.restore()):o.multi.indexOf(M.id)>=0&&(c.save(),ae(M.x,M.y,M.r+2,He),c.strokeStyle="#60a5fa",c.lineWidth=2,c.shadowColor="#60a5fa",c.shadowBlur=8,c.stroke(),c.restore()),(at||Je||!Te&&(Ft.has(M.id)&&o.zoom>Ke||!ze&&o.zoom>.6))&&ct&<&&io(M,{force:at||Je})}),on.forEach(M=>so(M.n,M.color,M)),c.restore(),o.marquee){let M=o.marquee,Ne=Math.min(M.sx,M.ex),Pe=Math.min(M.sy,M.ey),be=Math.abs(M.ex-M.sx),He=Math.abs(M.ey-M.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(Ne,Pe,be,He),c.strokeRect(Ne,Pe,be,He),c.restore()}if(o.hoverId&&Me.current){let M=o.domainById[o.hoverId],Ne=o.nodes.find(function(Pe){return Pe.id===o.hoverId});if(M&&Ne){let Pe=o.edges.filter(function(Ze){return Ze.sourceNodeId===M.id||Ze.targetNodeId===M.id}).length,be=Ne.x*o.zoom+o.panX,He=Ne.y*o.zoom+o.panY;Me.current.style.display="block",Me.current.style.left=be+14+"px",Me.current.style.top=He-6+"px";let at=Ne.planet?U.current("graphPlanetCards").replace("{n}",String(Ne.count))+" \xB7 "+U.current("graphEnter"):U.current("connCount").replace("{n}",Pe),Je=U.current(ot[M.kind]||"kindKnowledge");Me.current.innerHTML="<b>"+D(M.title||M.name||"")+'</b><br/><span style="opacity:.8">'+D(Je)+" \xB7 "+D(at)+"</span>"}}else Me.current&&(Me.current.style.display="none")},gt=0,oa=0,tt=0,Ot=()=>{o.motionUntil=performance.now()+140,tt&&C.clearTimeout(tt),tt=C.setTimeout(()=>{tt=0,st()},160)},st=()=>{oa||(oa=C.raf(()=>{oa=0;let k=performance.now();try{At()}catch(A){_t(A,"render")}o.lastRenderMs=performance.now()-k}))};o.requestRender=st;let Qt=()=>{gt>0||(o.alpha=Math.max(o.alpha||0,.35),o.running=!0,o.raf||(o.raf=C.raf(ne)))};o.wake=Qt,o.render=At;let h=()=>{if(!Re)return;let k=o.nodes.filter(A=>A.planet);if(k.length){for(let A=0;A<k.length;A++)for(let _=A+1;_<k.length;_++){let D=k[A],J=k[_],fe=J.x-D.x,Te=J.y-D.y,ze=Math.sqrt(fe*fe+Te*Te)||1,Ke=24+Math.min(D.r,J.r)*.18,Ge=D.r+J.r+Ke;if(ze>=Ge)continue;let Ve=Ge-ze,nt=fe/ze,Ye=Te/ze,Ft=D.r*D.r,Wt=J.r*J.r,Dt=Ft+Wt,fa=Ve*(Wt/Dt),Zt=Ve*(Ft/Dt);D.x-=nt*fa,D.y-=Ye*fa,J.x+=nt*Zt,J.y+=Ye*Zt,D.vx*=.55,D.vy*=.55,J.vx*=.55,J.vy*=.55}for(let A of k)for(let D of o.nodes){if(D.planet||D===o.dragNode)continue;let J=D.x-A.x,fe=D.y-A.y,Te=Math.sqrt(J*J+fe*fe)||1,ze=J/Te,Ke=fe/Te,Ge=A.r+D.r+30,Ve=Ge+12;if(Te>=Ve)continue;let nt=Te;if(Te<Ge){D.x=A.x+ze*Ge,D.y=A.y+Ke*Ge;let Dt=D.vx*ze+D.vy*Ke;Dt<0&&(D.vx-=ze*Dt,D.vy-=Ke*Dt),nt=Ge}let Ye=Math.min(1,(Ve-nt)/12),Ft=(.28+A.r*.009)*Ye*Ye,Wt=D.vx*ze+D.vy*Ke;if(Wt<Ft){let Dt=(Ft-Wt)*.5;D.vx+=ze*Dt,D.vy+=Ke*Dt}}}},j=()=>{let k=performance.now(),A=Mn(o,{params:o.forceParams,alphaFloor:o.drift?1:0,damping:o.drift?.8:void 0});h(),o.lastTickMs=performance.now()-k,o.lastRms=A.rms,o.autoFitPending&&o.tickCount>45&&(o.autoFitPending=!1,Tt())},ne=()=>{if(!o.running)return;let k=performance.now(),A=0;o.lastStepAt&&k-o.lastStepAt>0&&k-o.lastStepAt<120&&(A=k-o.lastStepAt,o.frameEma=o.frameEma?o.frameEma*.8+A*.2:A),o.lastStepAt=k,o.tickCount>30&&A>0&&(o.frameEma>17.8?o.perfBad=(o.perfBad||0)+A:o.perfBad=Math.max(0,(o.perfBad||0)-A*.5),o.perfBad>500&&(o.quality|0)<3&&(o.quality=(o.quality|0)+1,o.perfBad=0,o.frameEma=16.7)),!o.drift&&(o.quietTicks>Wa||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||Tt());try{let _=performance.now(),D=o.dragNode||o.drift?1:6,J=0;do j(),J+=1;while(!o.dragNode&&!o.drift&&J<D&&performance.now()-_<18&&o.quietTicks<=Wa);o.drift||(o.motionUntil=performance.now()+60);let fe=performance.now();At(),o.lastRenderMs=performance.now()-fe}catch(_){_t(_,"step")}o.raf=C.raf(ne)},xe=()=>({nodes:o.nodes.length,edges:o.edges.length,planets:o.nodes.filter(k=>k.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=xe,globalThis.__meGraphStats=xe;let ke=()=>{let k=b.getBoundingClientRect(),A=k.width?b.clientWidth/k.width:1,_=k.height?b.clientHeight/k.height:1;return{level:o.levelId||"",planetLayer:!!o.planetLayer,nodes:o.nodes.length,planets:o.nodes.filter(D=>D.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:C.snapshot(),screen:o.nodes.map(D=>({id:D.id,label:D.name,planet:!!D.planet,count:D.count||0,dir:D.orbitDir||0,scale:D.orbitScale?Math.round(D.orbitScale*100)/100:0,x:k.left+(D.x*o.zoom+o.panX)/A,y:k.top+(D.y*o.zoom+o.panY)/_,r:Math.max(4,D.r*o.zoom/A)}))}};o.runtime=ke,globalThis.__meGraphRuntime=ke;let ge=(k,A)=>{let _=b.getBoundingClientRect(),D=_.width?b.clientWidth/_.width:1,J=_.height?b.clientHeight/_.height:1;return{x:(k-_.left)*D,y:(A-_.top)*J}},Qe=(k,A)=>{let _=ge(k,A);return{x:(_.x-o.panX)/o.zoom,y:(_.y-o.panY)/o.zoom}},St=k=>{let A=o.domainById[k];return!(!A||F.current!=="all"&&A.kind!==F.current||I.current&&!(A.tags||[]).includes(I.current))},Rt=(k,A,_)=>Math.max(A,Math.min(_,k)),Lt=k=>{o.mouseX=k.clientX,o.mouseY=k.clientY;let A=Qe(k.clientX,k.clientY),_=null;for(let D=o.nodes.length-1;D>=0;D--){let J=o.nodes[D];if(!St(J.id))continue;let fe=J.x-A.x,Te=J.y-A.y;if(fe*fe+Te*Te<J.r*J.r+36){_=J.id;break}}_!==o.hoverId&&(o.hoverId=_,o.motionUntil=performance.now()+140,st())},zt=k=>{if(k.button!==0)return;let A=Qe(k.clientX,k.clientY),_=null;for(let D=o.nodes.length-1;D>=0;D--){let J=o.nodes[D];if(!St(J.id))continue;let fe=J.x-A.x,Te=J.y-A.y;if(fe*fe+Te*Te<J.r*J.r+25){_=J;break}}if(k.shiftKey){if(_){o.shiftClick=_.id;return}o.marquee={sx:k.clientX,sy:k.clientY,ex:k.clientX,ey:k.clientY};return}o.userTouched=!0,o.dragStart={x:k.clientX,y:k.clientY,px:o.panX,py:o.panY},o.dragging=!1,o.dragNode=_||null,_&&(o.dragOffset={dx:_.x-A.x,dy:_.y-A.y})},Ra=k=>{if(o.marquee){o.marquee.ex=k.clientX,o.marquee.ey=k.clientY,Ot(),st();return}if(!o.dragStart)return;let A=k.clientX-o.dragStart.x,_=k.clientY-o.dragStart.y;if(Math.abs(A)+Math.abs(_)>3&&!o.dragging&&(o.dragging=!0,o.dragNode&&(o.alpha=Math.max(o.alpha||0,.35))),o.dragNode){let D=Qe(k.clientX,k.clientY);o.dragNode.x=D.x+o.dragOffset.dx,o.dragNode.y=D.y+o.dragOffset.dy,Ot(),Qt()}else o.dragging&&(o.panX=Rt(o.dragStart.px+A,-1e5,1e5),o.panY=Rt(o.dragStart.py+_,-1e5,1e5),Ot(),st())},za=k=>{if(o.marquee){let D=o.marquee;o.marquee=null;let J=ge(D.sx,D.sy),fe=ge(D.ex,D.ey),Te=Math.min(J.x,fe.x),ze=Math.max(J.x,fe.x),Ke=Math.min(J.y,fe.y),Ge=Math.max(J.y,fe.y),Ve=o.nodes.filter(nt=>!nt.planet&&St(nt.id)).filter(nt=>{let Ye=nt.x*o.zoom+o.panX,Ft=nt.y*o.zoom+o.panY;return Ye>=Te&&Ye<=ze&&Ft>=Ke&&Ft<=Ge}).map(nt=>nt.id);o.multi=Ve,ye(Ve),Ot(),st();return}let A=o.dragStart&&!o.dragging,_=!!o.dragNode&&!!o.dragging;if(o.shiftClick){let D=o.shiftClick;o.shiftClick=null;let J=o.nodeById.get(D);if(J&&J.planet){o.selectedId=D,Ee(D),st();return}let fe=Array.isArray(o.multi)?o.multi.slice():[];fe.includes(D)||fe.push(D),o.multi=fe,ye(fe),st();return}if(A){let D=Qe(k.clientX,k.clientY),J=null;for(let fe=o.nodes.length-1;fe>=0;fe--){let Te=o.nodes[fe];if(!St(Te.id))continue;let ze=Te.x-D.x,Ke=Te.y-D.y;if(ze*ze+Ke*Ke<Te.r*Te.r+20){J=Te;break}}if(J&&J.planet){o.selectedId=null,Ee(null),st(),o.dragStart=null,o.dragging=!1,o.dragNode=null,he.current&&he.current(J.id);return}J?o.selectedId===J.id?(o.selectedId=null,Ee(null),st()):(o.selectedId=J.id,Ee(J.id),st()):(o.selectedId=null,o.hoverId=null,k.shiftKey||(o.multi=[],ye([])),Ee(null),st())}o.dragStart=null,o.dragging=!1,o.dragNode=null,_&&Qt()},to=k=>{k.preventDefault();let A=Qe(k.clientX,k.clientY),_=null;for(let D=o.nodes.length-1;D>=0;D--){let J=o.nodes[D];if(!St(J.id))continue;let fe=J.x-A.x,Te=J.y-A.y;if(fe*fe+Te*Te<J.r*J.r+25){_=J;break}}if(_){let D=o.domainById[_.id];D&&d({x:k.clientX,y:k.clientY,id:_.id,path:D.id,title:D.title,planet:!!_.planet,count:_.count||0})}else d(null)},ao=k=>{k.preventDefault();let A=ge(k.clientX,k.clientY),_=(A.x-o.panX)/o.zoom,D=(A.y-o.panY)/o.zoom,J=Math.max(ga,Math.min(3,o.zoom*(k.deltaY<0?Xt:1/Xt)));o.panX=Rt(o.panX+_*(o.zoom-J),-1e5,1e5),o.panY=Rt(o.panY+D*(o.zoom-J),-1e5,1e5),o.zoom=J,o.userTouched=!0,o.quality=0,o.perfBad=0,o.frameEma=16.7,Ot(),st()};C.listen(b,"mousemove",Lt),C.listen(b,"mousedown",zt),C.listen(window,"mousemove",Ra),C.listen(window,"mouseup",za),C.listen(b,"wheel",ao,{passive:!1}),C.listen(b,"contextmenu",to),L.current=()=>{o.selectedId=null,o.hoverId=null,o.multi=[],ye([]),o.userTouched=!1,Tt(),Ot(),st()},gt=Cn(o.nodes.length);let ra=gt,no=()=>ra>0?Math.round((ra-gt)/ra*100):100;gt>0&&De(0);let Da=ra>0?[.75,.5,.25].map(k=>Math.round(ra*k)):[],Aa=()=>{if(!o.running)return;let k=performance.now();for(;gt>0&&performance.now()-k<12;)j(),gt--;if(De(gt>0?Math.min(99,no()):100),Da.length&><=Da[0]){Da.shift(),o.userTouched||Tt();try{At()}catch(A){_t(A,"warm-frame")}}if(gt>0){o.userTouched||Tt(),o.warmRaf=C.raf(Aa);return}o.warmRaf=0,o.userTouched||Tt();try{At()}catch(A){_t(A,"warm-final")}De(null),Qt()};o.warmStep=Aa,Tt();try{At()}catch(k){_t(k,"first-frame")}gt>0?o.warmRaf=C.raf(Aa):(De(0),Qt());let oo=()=>oe(!1);return C.listen(window,"mousedown",oo),()=>{if(o.running=!1,C.releaseAll(),globalThis.__meGraphStats===xe)try{delete globalThis.__meGraphStats}catch{globalThis.__meGraphStats=void 0}if(globalThis.__meGraphRuntime===ke)try{delete globalThis.__meGraphRuntime}catch{globalThis.__meGraphRuntime=void 0}try{l.disconnect()}catch{}}},[W,K,Q]),(0,r.useEffect)(()=>{Ee(null),ye([]),d(null);let b=R.current;b&&(b.selectedId=null,b.multi=[])},[Q]),(0,r.useEffect)(()=>{T!==void 0&&$.current&&requestAnimationFrame(()=>{try{$.current()}catch(b){_t(b,"fit")}})},[T]),(0,e.jsxs)("div",{className:"me-graph",ref:G,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:p("search"),value:re,onChange:b=>_e(b.target.value),"aria-label":p("search")})]}),(0,e.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,e.jsxs)("button",{type:"button",className:"me-gtool"+(Z!=="all"||ie||z?" on":""),onClick:()=>oe(b=>!b),"aria-expanded":Le,title:p("filterLabel"),children:[p("filterLabel"),Z!=="all"||ie||z?(0,e.jsx)("span",{className:"badge","aria-hidden":"true"}):(0,e.jsx)("span",{className:"caret","aria-hidden":"true",children:"\u25BE"})]}),Le&&(0,e.jsx)("div",{className:"me-graph-legend-pop",onMouseDown:b=>b.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${Z==="all"&&!ie?" active":""}`,onClick:()=>{We("all"),Fe(!1)},children:p("all")}),Object.keys(bt).map(b=>(0,e.jsxs)("button",{type:"button",className:`lg${Z===b?" active":""}`,onClick:()=>We(c=>c===b?"all":b),children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:Nt.colors[b]||bt[b]}}),p(ot[b])]},b)),(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${ie?" active":""}`,onClick:()=>Fe(b=>!b),children:["\u23F1 ",p("timeDim")]}),Y.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:Y.map(b=>(0,e.jsxs)("button",{type:"button",className:`lg${z===b.tag?" active":""}`,style:{width:"auto",color:"#b9c0ca",padding:"2px 7px",fontSize:10.5,border:"1px solid rgba(255,255,255,.07)"},onClick:()=>v(c=>c===b.tag?"":b.tag),title:b.tag,children:["#",b.tag," ",(0,e.jsx)("span",{style:{opacity:.55},children:b.n})]},b.tag))})]}),(Z!=="all"||ie||z)&&(0,e.jsxs)("button",{type:"button",className:"lg lg-clear",style:{color:"#f87171"},onClick:()=>{We("all"),Fe(!1),v("")},children:[p("clearFilter")," \u2715"]})]})})]}),(0,e.jsxs)("label",{className:"me-gswitch"+(w?" on":""),title:p("crossVault"),children:[(0,e.jsx)("input",{type:"checkbox",checked:!!w,onChange:b=>x&&x(b.target.checked)}),(0,e.jsx)("span",{className:"track","aria-hidden":"true"}),(0,e.jsx)("span",{children:p("crossVault")})]}),(0,e.jsx)("button",{type:"button",className:"me-gtool"+(ie?" on":""),"aria-pressed":ie,onClick:()=>Fe(b=>!b),children:p("timeDim")}),(0,e.jsx)("span",{className:"me-gdiv","aria-hidden":"true"}),(0,e.jsx)("button",{type:"button",className:"me-gtool",onClick:()=>{let b=q.current;if(b)try{b.toBlob(c=>{c&&se({url:URL.createObjectURL(c),blob:c})},"image/png")}catch{}},children:p("exportGraph")}),(0,e.jsx)("button",{type:"button",className:"me-gtool",onClick:()=>$.current&&$.current(),children:p("fit")}),(0,e.jsx)("button",{type:"button",className:"me-gtool",onClick:()=>{Ee(null),We("all"),L.current&&L.current()},children:p("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)(kr,{crumbs:a,t:p,onPick:g,busy:N}),u&&(0,e.jsxs)("div",{className:"me-graph-levelerr",role:"alert",children:[(0,e.jsx)("span",{style:{flex:"none",fontWeight:800},children:u.timeout?"\u23F1":"\u2715"}),(0,e.jsx)("span",{className:"msg",children:(u.timeout?p("graphLevelTimeout").replace("{ms}",String(1600)):p("graphLevelError"))+"\uFF1A"+u.message}),(0,e.jsx)("button",{type:"button",onClick:()=>S&&S(),children:p("graphRetry")})]}),!u&&N&&(0,e.jsxs)("div",{className:"me-graph-levelbusy",role:"status","aria-live":"polite",children:[(0,e.jsx)(ua,{small:!0}),p("graphLevelLoading")]}),y!==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:y,small:!0}),(0,e.jsxs)("span",{children:[p("graphWarming").replace("{n}",P.length)," \xB7 ",Math.round(y),"%"]})]}),(0,e.jsxs)("div",{className:"mc-v5-graph-legend",children:[(0,e.jsx)("div",{className:"mc-v5-graph-legend-title",children:p("graphLegendTitle")}),Object.keys(Nt.colors).filter(b=>E[b]).map(b=>(0,e.jsxs)("div",{className:"mc-v5-graph-legend-row",children:[(0,e.jsx)("i",{style:{background:Nt.colors[b],boxShadow:"0 0 0 3px "+Nt.colors[b]+"24"}}),(0,e.jsx)("span",{children:p(ot[b]||"kindKnowledge")}),(0,e.jsx)("b",{children:E[b]})]},b))]}),(0,e.jsx)("div",{className:"me-graph-tooltip",ref:Me,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)"}}),ue&&(0,e.jsx)("div",{className:"mc-empty",style:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)"},children:p("noMatch")}),de&&(0,e.jsx)("div",{className:"me-graph-ctx-back",style:{position:"fixed",inset:0,zIndex:30},onMouseDown:()=>d(null)}),de&&(0,e.jsxs)("div",{className:"me-graph-ctxmenu",style:{position:"fixed",left:de.x,top:de.y,zIndex:31},onMouseDown:b=>b.stopPropagation(),children:[de.planet&&(0,e.jsxs)("button",{type:"button",onClick:()=>{let b=de.id;d(null),he.current&&he.current(b)},children:[p("graphEnter")," \u203A"]}),de.planet&&(0,e.jsx)("div",{style:{padding:"4px 10px 6px",fontSize:11,opacity:.7},children:p("graphPlanetCards").replace("{n}",String(de.count||0))}),!de.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{B.current({path:de.path,title:de.title}),d(null)},children:p("openCard")}),!de.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{de.id&&(R.current.selectedId=de.id,Ee(de.id)),d(null);let b=R.current;b&&b.requestRender&&b.requestRender()},children:p("focusNeighbors")}),(0,e.jsx)("button",{type:"button",onClick:()=>{try{navigator.clipboard&&navigator.clipboard.writeText(de.title||"")}catch{}d(null),qe(p("copied"))},children:p("copyName")}),!de.planet&&(0,e.jsx)("button",{type:"button",onClick:()=>{let b=R.current,c=b&&Array.isArray(b.multi)?b.multi.slice():[],le=de.id;if(le&&!c.includes(le)&&c.push(le),d(null),c.length<2){qe(p("mergeNeed"),!1);return}if(!window.confirm(p("mergeConfirm")))return;let Ae=ce.current&&ce.current(c);Ae&&Ae.then?Ae.then(f=>f?qe(p("merged")):qe(p("mergeFail"),!1)).catch(()=>qe(p("mergeFail"),!1)):Ae&&qe(p("merged"))},children:p("merge")}),!de.planet&&(0,e.jsx)("button",{type:"button",style:{color:"#f87171"},onClick:()=>{let b=de.path;d(null),window.confirm(p("deleteConfirm"))&&(async()=>{try{(X.current?await X.current(b):!1)?qe(p("deleted")):qe(p("deleteFail"),!1)}catch{qe(p("deleteFail"),!1)}})()},children:p("delete")})]}),ve.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:[ve.length," ",p("nodes")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let c=ve.map(C=>we[C]).filter(Boolean).map(C=>C.title||C.name).join(`
|
|
1055
|
+
`),le=new Blob([c],{type:"text/plain;charset=utf-8"}),Ae=URL.createObjectURL(le),f=document.createElement("a");f.href=Ae,f.download="memory-selected.txt",document.body.appendChild(f),f.click(),document.body.removeChild(f),setTimeout(()=>URL.revokeObjectURL(Ae),1e3),qe(ve.length+p("exportedSel"))},children:p("exportSel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{if(ve.length<2){qe(p("mergeNeed"),!1);return}let b=ve.map(le=>we[le]?we[le].id:le);if(!window.confirm(p("mergeConfirm")))return;ye([]);let c=R.current;c&&(c.multi=[]),fetch(`${V}/merge?paths=${encodeURIComponent(b.join(","))}`).then(le=>le.json()).then(le=>{le&&le.ok?qe(p("merged")):qe(p("mergeFail"),!1)}).catch(()=>qe(p("mergeFail"),!1))},children:p("merge")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{if(!window.confirm(p("deleteConfirm")))return;let b=ve.map(le=>we[le]?we[le].id:le);ye([]);let c=R.current;c&&(c.multi=[]),(async()=>{let le=0;for(let Ae of b)try{(X.current?await X.current(Ae):!1)&&le++}catch{}qe(le+p("deletedSelected"),le>0)})()},children:p("deleteSelected")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let b=R.current;b&&(b.multi=[]),ye([]);let c=R.current;c&&c.render&&c.render()},children:p("clearSelection")})]}),O&&we[O]&&(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:we[O]?we[O].title||we[O].name:O}),(0,e.jsxs)("div",{style:{opacity:.8,marginBottom:8},children:[we[O]?p(ot[we[O].kind]||"kindKnowledge"):"\u2014",we[O]&&we[O].type==="planet"?" \xB7 "+p("graphPlanetCards").replace("{n}",String(we[O].count||0)):""]}),we[O]&&we[O].type==="planet"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{width:"100%",marginBottom:8},onClick:()=>{let b=O;Ee(null),he.current&&he.current(b)},children:[p("graphEnter")," \u203A"]}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.65,letterSpacing:".04em",marginBottom:6},children:p("graphLevelHint")}),(K.filter(b=>b.source===O||b.target===O)||[]).slice(0,8).map((b,c)=>{let le=b.source===O?b.target:b.source,Ae=we[le];return(0,e.jsx)("div",{style:{padding:"4px 6px",cursor:"pointer",borderRadius:6},onMouseDown:f=>{f.preventDefault();let C=R.current;C&&(C.selectedId=le,C.hoverId=le,C.requestRender&&C.requestRender()),Ee(le)},children:Ae?(Ae.title||Ae.name).slice(0,28):le},c)})]})]}),(0,e.jsx)("div",{className:"me-graph-tip",children:p("graphTip")}),rt&&(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 "+(rt.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:rt.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:rt.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:rt.msg})]}),H&&(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>{H.url&&URL.revokeObjectURL(H.url),se(null),me(!1)},children:[(0,e.jsx)("style",{children:ht}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:Ce?"100vw":900,width:Ce?"100vw":"92vw",maxHeight:Ce?"100%":"90vh",height:Ce?"100%":void 0,borderRadius:Ce?0:14},onClick:b=>b.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:p("exportGraph")}),(0,e.jsxs)("div",{className:"me-head-actions",children:[(0,e.jsx)("a",{className:"mc-btn",href:H.url,download:"memory-graph.png",onClick:()=>{Bt("download"),qe(p("downloaded")+" \xB7 "+p("defaultDownloads"))},style:{textDecoration:"none",display:"inline-flex",alignItems:"center"},children:p($e==="download"?"done":"download")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{Bt("full"),me(b=>!b),qe(p("fullscreen"))},children:p($e==="full"?"done":Ce?"exitFull":"fullscreen")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let b=H.blob;b&&window.ClipboardItem&&navigator.clipboard?navigator.clipboard.write([new window.ClipboardItem({"image/png":b})]).then(()=>{Bt("copy"),qe(p("copied"))}).catch(()=>{qe(p("copyFail"),!1)}):qe(p("copyFail"),!1)},children:p($e==="copy"?"done":"copyImage")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{H.url&&URL.revokeObjectURL(H.url),se(null),me(!1)},children:p("close")})]})]}),(0,e.jsx)("div",{className:"me-dialog-body",style:{display:"flex",justifyContent:"center",background:Ce?"var(--dsw-alias-bg-base, #0b0d10)":"var(--dsw-alias-bg-base, #f3f4f6)"},children:(0,e.jsx)("img",{src:H.url,alt:p("exportGraph"),style:{maxWidth:"100%",maxHeight:Ce?"calc(100% - 64px)":"70vh",borderRadius:Ce?0:8,cursor:"zoom-in"},onClick:()=>me(b=>!b)})})]})]})]})}function Nr(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 Un({label:t,value:a=[],options:n,onChange:i,placeholder:s,z:m=20}){let[g,S]=(0,r.useState)(!1),u=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!g)return;let G=R=>{u.current&&!u.current.contains(R.target)&&S(!1)};return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[g]);let N=Array.isArray(a)?a:[],p=N.includes("__all__"),w=p?n.find(G=>G.value==="__all__")?.label||"":N.length?N.map(G=>n.find(R=>R.value===G)?.label||G).join("\u3001"):"",x=(G,R)=>{if(G.value==="__all__"){i(R?["__all__"]:[]);return}let $=new Set(N);$.has("__all__")&&$.delete("__all__"),R?$.add(G.value):$.delete(G.value),i([...$])},T=n.find(G=>G.value==="__all__"),q=n.filter(G=>G.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:u,style:{position:"relative",minWidth:0},children:[(0,e.jsxs)("button",{type:"button",onClick:()=>S(G=>!G),style:{width:"100%",textAlign:"left",padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",gap:6},children:[(0,e.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w||s||"\u2014"}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.7},children:"\u25BE"})]}),g&&(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:[T&&(0,e.jsxs)("label",{onClick:G=>G.stopPropagation(),className:"mc-dd-opt",style:{borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("input",{type:"checkbox",checked:p,onChange:G=>x(T,G.target.checked)}),(0,e.jsx)("span",{children:T.label})]}),q.map(G=>(0,e.jsxs)("label",{onClick:R=>R.stopPropagation(),className:"mc-dd-opt",children:[(0,e.jsx)("input",{type:"checkbox",checked:N.includes(G.value),onChange:R=>x(G,R.target.checked)}),(0,e.jsx)("span",{children:G.label})]},G.value))]})]})]})}function Cr(t){let a=new Date(t||0).getTime();return!!a&&(Date.now()-a)/864e5<3}async function Mr(t,a,n){if(n&&typeof window.showSaveFilePicker=="function")try{let m=await window.showSaveFilePicker({suggestedName:a}),g=await m.createWritable();return await g.write(t),await g.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 qa(t,a){if(!a||!t)return t;let n=t.toLowerCase(),i=a.toLowerCase(),s=[],m=0;for(;m<t.length;){let g=n.indexOf(i,m);if(g<0){s.push(t.slice(m));break}g>m&&s.push(t.slice(m,g)),s.push((0,e.jsx)("mark",{className:"mc-hl",children:t.slice(g,g+i.length)},g)),m=g+i.length}return s}function jt(t){let a=ca(t);if(!a)return"";let n=a.toDateString()===new Date().toDateString(),i=yn(a);return n?i:`${a.getMonth()+1}-${a.getDate()} ${i}`}
|
|
1056
1056
|
|
|
1057
1057
|
return module.exports;
|
|
1058
1058
|
},
|