@customize-agent/server 4.0.107 → 4.0.109

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.
Files changed (64) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +31 -33
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/chunks/1928.js +1 -1
  5. package/.next/server/chunks/1936.js +3 -3
  6. package/.next/server/chunks/8204.js +1 -1
  7. package/.next/server/chunks/9301.js +3 -3
  8. package/.next/server/middleware-build-manifest.js +1 -1
  9. package/.next/server/pages/404.html +1 -1
  10. package/.next/server/pages/500.html +1 -1
  11. package/.next/server/pages/_error.js +1 -1
  12. package/.next/server/pages/asset-library.html +1 -1
  13. package/.next/server/pages/document-roles.html +1 -1
  14. package/.next/server/pages/documents.html +1 -1
  15. package/.next/server/pages/guide.html +1 -1
  16. package/.next/server/pages/index.html +1 -1
  17. package/.next/server/pages/knowledge/file-detail.html +1 -1
  18. package/.next/server/pages/knowledge/files.html +1 -1
  19. package/.next/server/pages/knowledge/manage.html +1 -1
  20. package/.next/server/pages/knowledge.html +1 -1
  21. package/.next/server/pages/models.html +1 -1
  22. package/.next/server/pages/overview.html +1 -1
  23. package/.next/server/pages/prompt.html +1 -1
  24. package/.next/server/pages/settings.html +1 -1
  25. package/.next/server/pages/system/logs.html +1 -1
  26. package/.next/server/pages-manifest.json +24 -24
  27. package/.next/static/OeaS6h5VJsA7MHq1qOZN_/_buildManifest.js +1 -0
  28. package/.next/static/chunks/238-16333381c574f65b.js +1 -0
  29. package/.next/static/chunks/289-789ef042acd53608.js +78 -0
  30. package/.next/static/chunks/375-4a1c73eb22d653d2.js +1 -0
  31. package/.next/static/chunks/478-6a65262872ea0bbc.js +1 -0
  32. package/.next/static/chunks/788-7f7359a830e3f4fd.js +1 -0
  33. package/.next/static/chunks/795-e18d1f7843b8f683.js +1 -0
  34. package/.next/static/chunks/pages/{_app-d98d9d52c6257579.js → _app-b0159557c8407d35.js} +38 -38
  35. package/.next/static/chunks/pages/asset-library-6d9b11ae4af036cb.js +1 -0
  36. package/.next/static/chunks/pages/documents-e85faaadf4dc6777.js +1 -0
  37. package/.next/static/chunks/pages/knowledge/file-detail-1a82bb3c9b266edc.js +1 -0
  38. package/.next/static/chunks/pages/knowledge/files-8ca2d555a722d8f0.js +1 -0
  39. package/.next/static/chunks/pages/knowledge/manage-e7fbdb89f65913b2.js +1 -0
  40. package/.next/static/chunks/pages/models-2cc758fed54c92e2.js +1 -0
  41. package/.next/static/chunks/pages/prompt-5e681123122f38a9.js +1 -0
  42. package/.next/static/chunks/pages/system/logs-2126e5cbbce48e88.js +1 -0
  43. package/.next/static/css/029ff7574443cc55.css +1 -0
  44. package/messages/en-US.json +147 -3
  45. package/messages/zh-CN.json +150 -6
  46. package/package.json +3 -3
  47. package/.next/static/chunks/102-881dcc464f983c89.js +0 -41
  48. package/.next/static/chunks/289-0031e62ca424247b.js +0 -38
  49. package/.next/static/chunks/375-1e1be370b94c7512.js +0 -1
  50. package/.next/static/chunks/478-ac4777b05b3c42e8.js +0 -1
  51. package/.next/static/chunks/767-e97ea5dee1ab87b5.js +0 -1
  52. package/.next/static/chunks/788-72bd97a04f2aee27.js +0 -1
  53. package/.next/static/chunks/795-ed2375ec938022d8.js +0 -1
  54. package/.next/static/chunks/pages/asset-library-b76abaab31043cdb.js +0 -1
  55. package/.next/static/chunks/pages/documents-487ce1b434da9b82.js +0 -1
  56. package/.next/static/chunks/pages/knowledge/file-detail-8c37a455e6cc010f.js +0 -1
  57. package/.next/static/chunks/pages/knowledge/files-a4e5c4e1151fc40e.js +0 -1
  58. package/.next/static/chunks/pages/knowledge/manage-1363f53928abf98c.js +0 -1
  59. package/.next/static/chunks/pages/models-3371ebcdc9cb85fa.js +0 -1
  60. package/.next/static/chunks/pages/prompt-5adc3ca18a2764f4.js +0 -1
  61. package/.next/static/chunks/pages/system/logs-8c5d90301a273cd2.js +0 -1
  62. package/.next/static/css/f7490ae02e9f72c2.css +0 -1
  63. package/.next/static/jmjNyz47EnCu0Y_eZMyIl/_buildManifest.js +0 -1
  64. /package/.next/static/{jmjNyz47EnCu0Y_eZMyIl → OeaS6h5VJsA7MHq1qOZN_}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[478],{7225:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(97109),n=r(23830),i=r(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let l=a.forwardRef((e,t)=>a.createElement(i.A,o({},e,{ref:t,icon:n.A})))},7492:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(97109),n=r(33460),i=r(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let l=a.forwardRef((e,t)=>a.createElement(i.A,o({},e,{ref:t,icon:n.A})))},12887:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"}},17362:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"unordered-list",theme:"outlined"}},23830:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"}},24810:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(97109),n=r(31738),i=r(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let l=a.forwardRef((e,t)=>a.createElement(i.A,o({},e,{ref:t,icon:n.A})))},26631:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(97109),n=r(12887),i=r(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let l=a.forwardRef((e,t)=>a.createElement(i.A,o({},e,{ref:t,icon:n.A})))},28438:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"}},31738:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"}},33460:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"}},42758:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(97109),n=r(28438),i=r(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let l=a.forwardRef((e,t)=>a.createElement(i.A,o({},e,{ref:t,icon:n.A})))},46082:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(97109),n=r(17362),i=r(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let l=a.forwardRef((e,t)=>a.createElement(i.A,o({},e,{ref:t,icon:n.A})))},49292:(e,t,r)=>{r.d(t,{A:()=>B});var a=r(97109),n=r(64446),i=r(32565),o=r(91147),l=r(77611),c=r(3638),d=r(67189),s=r(73473);let h=(e,t)=>{if(!e)return null;let r={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},m=e=>void 0!==e?`${e}px`:void 0;function u(e){let{prefixCls:t,containerRef:r,value:n,getValueIndex:i,motionName:o,onMotionStart:u,onMotionEnd:g,direction:f,vertical:b=!1}=e,v=a.useRef(null),[p,$]=a.useState(n),w=e=>{let a=i(e),n=r.current?.querySelectorAll(`.${t}-item`)[a];return n?.offsetParent&&n},[z,A]=a.useState(null),[y,S]=a.useState(null);(0,s.A)(()=>{if(p!==n){let e=w(p),t=w(n),r=h(e,b),a=h(t,b);$(n),A(r),S(a),e&&t?u():g()}},[n]);let H=a.useMemo(()=>b?m(z?.top??0):"rtl"===f?m(-z?.right):m(z?.left),[b,f,z]),x=a.useMemo(()=>b?m(y?.top??0):"rtl"===f?m(-y?.right):m(y?.left),[b,f,y]);return z&&y?a.createElement(d.Ay,{visible:!0,motionName:o,motionAppear:!0,onAppearStart:()=>b?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"},onAppearActive:()=>b?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"},onVisibleChanged:()=>{A(null),S(null),g()}},({className:e,style:r},n)=>{let i={...r,"--thumb-start-left":H,"--thumb-start-width":m(z?.width),"--thumb-active-left":x,"--thumb-active-width":m(y?.width),"--thumb-start-top":H,"--thumb-start-height":m(z?.height),"--thumb-active-top":x,"--thumb-active-height":m(y?.height)},o={ref:(0,l.K4)(v,n),style:i,className:(0,c.$)(`${t}-thumb`,e)};return a.createElement("div",o)}):null}let g=({prefixCls:e,className:t,style:r,styles:n,classNames:i,data:o,disabled:l,checked:d,label:s,title:h,value:m,name:u,onChange:g,onFocus:f,onBlur:b,onKeyDown:v,onKeyUp:p,onMouseDown:$,itemRender:w=e=>e})=>w(a.createElement("label",{className:(0,c.$)(t,{[`${e}-item-disabled`]:l}),style:r,onMouseDown:$},a.createElement("input",{name:u,className:`${e}-item-input`,type:"radio",disabled:l,checked:d,onChange:e=>{l||g(e,m)},onFocus:f,onBlur:b,onKeyDown:v,onKeyUp:p}),a.createElement("div",{className:(0,c.$)(`${e}-item-label`,i?.label),title:h,style:n?.label},s)),{item:o}),f=a.forwardRef((e,t)=>{let{prefixCls:r="rc-segmented",direction:d,vertical:s,options:h=[],disabled:m,defaultValue:f,value:b,name:v,onChange:p,className:$="",style:w,styles:z,classNames:A,motionName:y="thumb-motion",itemRender:S,...H}=e,x=a.useRef(null),k=a.useMemo(()=>(0,l.K4)(x,t),[x,t]),M=a.useMemo(()=>h.map(e=>{if("object"==typeof e&&null!==e){let t=void 0!==e.title?e.title:"object"!=typeof e.label?e.label?.toString():void 0;return{...e,title:t}}return{label:e?.toString(),title:e?.toString(),value:e}}),[h]),[E,O]=(0,i.A)(f??M[0]?.value,b),[B,R]=a.useState(!1),j=(e,t)=>{O(t),p?.(t)},N=(0,o.A)(H,["children"]),[P,I]=a.useState(!1),[V,C]=a.useState(!1),L=()=>{C(!0)},q=()=>{C(!1)},T=()=>{I(!1)},W=e=>{"Tab"===e.key&&I(!0)},X=e=>{let t=M.findIndex(e=>e.value===E),r=M.length,a=M[(t+e+r)%r];a&&(O(a.value),p?.(a.value))},D=e=>{switch(e.key){case"ArrowLeft":case"ArrowUp":X(-1);break;case"ArrowRight":case"ArrowDown":X(1)}};return a.createElement("div",(0,n.A)({role:"radiogroup","aria-label":"segmented control",tabIndex:m?void 0:0,"aria-orientation":s?"vertical":"horizontal",style:w},N,{className:(0,c.$)(r,{[`${r}-rtl`]:"rtl"===d,[`${r}-disabled`]:m,[`${r}-vertical`]:s},$),ref:k}),a.createElement("div",{className:`${r}-group`},a.createElement(u,{vertical:s,prefixCls:r,value:E,containerRef:x,motionName:`${r}-${y}`,direction:d,getValueIndex:e=>M.findIndex(t=>t.value===e),onMotionStart:()=>{R(!0)},onMotionEnd:()=>{R(!1)}}),M.map(e=>{let{value:t,disabled:i}=e;return a.createElement(g,(0,n.A)({},e,{name:v,data:e,itemRender:S,key:t,prefixCls:r,className:(0,c.$)(e.className,`${r}-item`,A?.item,{[`${r}-item-selected`]:t===E&&!B,[`${r}-item-focused`]:V&&P&&t===E}),style:z?.item,classNames:A,styles:z,checked:t===E,onChange:j,onFocus:L,onBlur:q,onKeyDown:D,onKeyUp:W,onMouseDown:T,disabled:!!m||!!i}))})))});var b=r(42644),v=r(5045),p=r(92162),$=r(26047),w=r(74567),z=r(27273),A=r(14932),y=r(15561),S=r(7961),H=r(10540),x=r(28403);function k(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}let M=e=>({background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}),E={overflow:"hidden",...S.L9},O=(0,H.OF)("Segmented",e=>{let{lineWidth:t,calc:r}=e;return(e=>{let{componentCls:t,motionDurationSlow:r,motionEaseInOut:a,motionDurationMid:n}=e,i=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),o=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),l=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:{...(0,S.dF)(e),display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${n}`,...(0,S.K8)(e),[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${(0,y.zA)(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${n}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":{...M(e),color:e.itemSelectedColor},"&-focused":(0,S.jk)(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,pointerEvents:"none",transition:["opacity","background-color"].map(e=>`${e} ${n}`).join(", ")},[`&:not(${t}-item-selected):not(${t}-item-disabled)`]:{"&:hover, &:active":{color:e.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:e.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":{minHeight:i,lineHeight:(0,y.zA)(i),padding:`0 ${(0,y.zA)(e.segmentedPaddingHorizontal)}`,...E},"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:{...M(e),position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${(0,y.zA)(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}},[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:o,lineHeight:(0,y.zA)(o),padding:`0 ${(0,y.zA)(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:l,lineHeight:(0,y.zA)(l),padding:`0 ${(0,y.zA)(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}},...k(`&-disabled ${t}-item`,e),...k(`${t}-item-disabled`,e),[`${t}-thumb-motion-appear-active`]:{willChange:"transform, width",transition:["transform","width"].map(e=>`${e} ${r} ${a}`).join(", ")},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}}}})((0,x.oX)(e,{segmentedPaddingHorizontal:r(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:r(e.controlPaddingHorizontalSM).sub(t).equal()}))},e=>{let{colorTextLabel:t,colorText:r,colorFillSecondary:a,colorBgElevated:n,colorFill:i,lineWidthBold:o,colorBgLayout:l}=e;return{trackPadding:o,trackBg:l,itemColor:t,itemHoverColor:r,itemHoverBg:a,itemSelectedBg:n,itemActiveBg:i,itemSelectedColor:r}}),B=a.forwardRef((e,t)=>{let r=(0,b.Bi)(),{prefixCls:n,className:i,rootClassName:o,block:l,options:d=[],size:s,style:h,vertical:m,orientation:u,shape:g="default",name:y=r,styles:S,classNames:H,...x}=e,{getPrefixCls:k,direction:M,className:E,style:B,classNames:R,styles:j}=(0,w.TP)("segmented"),N={...e,options:d,size:s,shape:g},P=(0,p.XT)(B),I=(0,p.XT)(h),[V,C]=(0,p.AV)([R,H],[j,P,S,I],{props:N}),L=k("segmented",n),[q,T]=O(L),W=(0,z.A)(s),X=a.useMemo(()=>d.map(e=>{if(function(e){return(0,$.Qd)(e)&&!!e?.icon}(e)){let{icon:t,label:r,...n}=e;return{...n,label:a.createElement(a.Fragment,null,a.createElement("span",{className:(0,c.$)(`${L}-item-icon`,V.icon),style:C.icon},t),r&&a.createElement("span",null,r))}}return e}),[d,L,V.icon,C.icon]),[,D]=(0,v.M)(u,m),F=(0,c.$)(i,o,E,V.root,{[`${L}-block`]:l,[`${L}-sm`]:"small"===W,[`${L}-lg`]:"large"===W,[`${L}-vertical`]:D,[`${L}-shape-${g}`]:"round"===g},q,T);return a.createElement(f,{...x,name:y,className:F,style:C.root,classNames:V,styles:C,itemRender:(e,{item:t})=>{if(!t.tooltip)return e;let r=(0,$.Qd)(t.tooltip)?t.tooltip:{title:t.tooltip};return a.createElement(A.A,{...r},e)},options:X,ref:t,prefixCls:L,direction:M,vertical:D})})},53707:(e,t)=>{t.A={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"}},54746:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(97109),n=r(71242),i=r(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let l=a.forwardRef((e,t)=>a.createElement(i.A,o({},e,{ref:t,icon:n.A})))},55122:(e,t,r)=>{r.d(t,{A:()=>b});var a=r(97109),n=r(3638),i=r(5045),o=r(92162),l=r(26047),c=r(74567),d=r(27273),s=r(15561),h=r(7961),m=r(10540),u=r(28403);let g=(0,m.OF)("Divider",e=>{let t=(0,u.oX)(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:a,lineWidth:n,textPaddingInline:i,orientationMargin:o,verticalMarginInline:l}=e,c=`${t}-rail`;return{[t]:{...(0,h.dF)(e),borderBlockStart:`${(0,s.zA)(n)} solid ${a}`,[c]:{borderBlockStart:`${(0,s.zA)(n)} solid ${a}`},"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:l,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,s.zA)(n)} solid ${a}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,s.zA)(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,s.zA)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${a}`,[`${c}-start, ${c}-end`]:{width:"50%",borderBlockStartColor:"inherit",borderBlockEnd:0,content:"''"}},[`&-horizontal${t}-with-text-start`]:{[`${c}-start`]:{width:`calc(${o} * 100%)`},[`${c}-end`]:{width:`calc(100% - ${o} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${c}-start`]:{width:`calc(100% - ${o} * 100%)`},[`${c}-end`]:{width:`calc(${o} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:a,borderStyle:"dashed",borderWidth:`${(0,s.zA)(n)} 0 0`,[c]:{borderBlockStart:`${(0,s.zA)(n)} dashed ${a}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${c}-start, ${c}-end`]:{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:n,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:a,borderStyle:"dotted",borderWidth:`${(0,s.zA)(n)} 0 0`,[c]:{borderBlockStart:`${(0,s.zA)(n)} dotted ${a}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:n,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${c}-start`]:{width:0},[`${c}-end`]:{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${c}-start`]:{width:"100%"},[`${c}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}}}})(t),(e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}})(t)]},e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),f=["left","right","center","start","end"],b=e=>{let{getPrefixCls:t,direction:r,className:s,style:h,classNames:m,styles:u}=(0,c.TP)("divider"),{prefixCls:b,type:v,orientation:p,vertical:$,titlePlacement:w,orientationMargin:z,className:A,rootClassName:y,children:S,dashed:H,variant:x="solid",plain:k,style:M,size:E,classNames:O,styles:B,...R}=e,j=t("divider",b),N=`${j}-rail`,[P,I]=g(j),V=(0,d.A)(E),C=!!S,L=f.includes(p||""),q=a.useMemo(()=>{let e=w??(L?p:"center");return"left"===e?"rtl"===r?"end":"start":"right"===e?"rtl"===r?"start":"end":e},[r,p,w,L]),T="start"===q&&null!=z,W="end"===q&&null!=z,[X,D]=(0,i.M)(p,$,v),F={...e,orientation:X,titlePlacement:q,size:V},[G,K]=(0,o.AV)([m,O],[u,B],{props:F}),_=(0,n.$)(j,s,P,I,`${j}-${X}`,{[`${j}-with-text`]:C,[`${j}-with-text-${q}`]:C,[`${j}-dashed`]:!!H,[`${j}-${x}`]:"solid"!==x,[`${j}-plain`]:!!k,[`${j}-rtl`]:"rtl"===r,[`${j}-no-default-orientation-margin-start`]:T,[`${j}-no-default-orientation-margin-end`]:W,[`${j}-md`]:"medium"===V||"middle"===V,[`${j}-sm`]:"small"===V,[N]:!S,[G.rail]:G.rail&&!S},A,y,G.root),U=a.useMemo(()=>(0,l.Et)(z)?z:/^\d+$/.test(z)?Number(z):z,[z]);return a.createElement("div",{className:_,style:{...h,...K.root,...S?{}:K.rail,...M},...R,role:"separator"},S&&!D&&a.createElement(a.Fragment,null,a.createElement("div",{className:(0,n.$)(N,`${N}-start`,G.rail),style:K.rail}),a.createElement("span",{className:(0,n.$)(`${j}-inner-text`,G.content),style:{marginInlineStart:T?U:void 0,marginInlineEnd:W?U:void 0,...K.content}},S),a.createElement("div",{className:(0,n.$)(N,`${N}-end`,G.rail),style:K.rail})))}},71242:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"}},81668:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(97109),n=r(96724),i=r(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let l=a.forwardRef((e,t)=>a.createElement(i.A,o({},e,{ref:t,icon:n.A})))},96091:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(97109),n=r(53707),i=r(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let l=a.forwardRef((e,t)=>a.createElement(i.A,o({},e,{ref:t,icon:n.A})))},96724:(e,t)=>{t.A={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[767],{384:(e,t,r)=>{r.d(t,{A:()=>eC});var n=r(97109),o=r(32565),a=r(3638),i=r(67189),l=r(70126),c=r(42644),s=r(64213),u=r(73473),d=r(99452);let p=n.createContext(null);function m(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}var f=r(25846),g=r(49127);let v={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};var h=r(96546);function b(e,t,r,n){let o=t+r,a=(r-n)/2;if(r>n){if(t>0)return{[e]:a};if(t<0&&o<n)return{[e]:-a}}else if(t<0||o>n)return{[e]:t<0?a:-a};return{}}function y(e,t,r,n){let{width:o,height:a}=m(),i=null;return e<=o&&t<=a?i={x:0,y:0}:(e>o||t>a)&&(i={...b("x",r,e,o),...b("y",n,t,a)}),i}function w({src:e,isCustomPlaceholder:t,fallback:r}){let[o,a]=(0,n.useState)(t?"loading":"normal"),i=(0,n.useRef)(!1),l="error"===o;(0,n.useEffect)(()=>{let t=!0;return new Promise(t=>{if(!e)return void t(!1);let r=document.createElement("img");r.onerror=()=>t(!1),r.onload=()=>t(!0),r.src=e}).then(e=>{!e&&t&&a("error")}),()=>{t=!1}},[e]),(0,n.useEffect)(()=>{t&&!i.current?a("loading"):l&&a("normal")},[e]);let c=()=>{a("normal")};return[e=>{i.current=!1,"loading"===o&&e?.complete&&(e.naturalWidth||e.naturalHeight)&&(i.current=!0,c())},l&&r?{src:r}:{onLoad:c,src:e},o]}function $(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function A(e){let{prefixCls:t,icon:r,onClick:o,className:i,style:l}=e;return n.createElement("button",{className:(0,a.$)(`${t}-close`,i),style:l,onClick:o},r)}function E(e){let{prefixCls:t,showProgress:r,current:o,count:i,showSwitch:l,classNames:c,styles:s,icons:u,image:d,transform:p,countRender:m,actionsRender:f,scale:g,minScale:v,maxScale:h,onActive:b,onFlipY:y,onFlipX:w,onRotateLeft:$,onRotateRight:A,onZoomOut:E,onZoomIn:x,onClose:C,onReset:k}=e,{left:M,right:N,prev:I,next:O,flipY:j,flipX:z,rotateLeft:S,rotateRight:L,zoomOut:R,zoomIn:P}=u,D=r&&n.createElement("div",{className:`${t}-progress`},m?m(o+1,i):n.createElement("bdi",null,`${o+1} / ${i}`)),T=`${t}-actions-action`,Y=({type:e,disabled:t,onClick:r,icon:o})=>n.createElement("button",{type:"button",key:e,className:(0,a.$)(T,`${T}-${e}`,{[`${T}-disabled`]:!!t}),onClick:r,disabled:!!t,"aria-label":e},o),H=l?Y({icon:I??M,onClick:()=>b(-1),type:"prev",disabled:0===o}):void 0,X=l?Y({icon:O??N,onClick:()=>b(1),type:"next",disabled:o===i-1}):void 0,V=Y({icon:j,onClick:y,type:"flipY"}),B=Y({icon:z,onClick:w,type:"flipX"}),F=Y({icon:S,onClick:$,type:"rotateLeft"}),W=Y({icon:L,onClick:A,type:"rotateRight"}),Z=Y({icon:R,onClick:E,type:"zoomOut",disabled:g<=v}),_=Y({icon:P,onClick:x,type:"zoomIn",disabled:g===h}),G=n.createElement("div",{className:(0,a.$)(`${t}-actions`,c.actions),style:s.actions},V,B,F,W,Z,_);return n.createElement("div",{className:(0,a.$)(`${t}-footer`,c.footer),style:s.footer},D,f?f(G,{icons:{prevIcon:H,nextIcon:X,flipYIcon:V,flipXIcon:B,rotateLeftIcon:F,rotateRightIcon:W,zoomOutIcon:Z,zoomInIcon:_},actions:{onActive:b,onFlipY:y,onFlipX:w,onRotateLeft:$,onRotateRight:A,onZoomOut:E,onZoomIn:x,onReset:k,onClose:C},transform:p,current:o,total:i,image:d}):G)}function x(e){let{prefixCls:t,onActive:r,current:o,count:i,icons:{left:l,right:c,prev:s,next:u}}=e,d=`${t}-switch`,p=0===o,m=o===i-1;return n.createElement(n.Fragment,null,n.createElement("button",{className:(0,a.$)(d,`${d}-prev`,{[`${d}-disabled`]:p}),onClick:()=>r(-1),disabled:p},s??l),n.createElement("button",{type:"button",className:(0,a.$)(d,`${d}-next`,{[`${d}-disabled`]:m}),onClick:()=>r(1),disabled:m},u??c))}function C(){return(C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let k=({fallback:e,src:t,imgRef:r,...o})=>{let[a,i]=w({src:t,fallback:e});return n.createElement("img",C({ref:e=>{r.current=e,a(e)}},o,i))},M=e=>{let{prefixCls:t,rootClassName:r,src:o,alt:b,imageInfo:w,fallback:M,movable:N=!0,onClose:I,open:O,afterOpenChange:j,maskClosable:z=!0,icons:S={},closeIcon:L,getContainer:R,current:P=0,count:D=1,countRender:T,scaleStep:Y=.5,minScale:H=1,maxScale:X=50,motionName:V="fade",imageRender:B,imgCommonProps:F,actionsRender:W,onTransform:Z,onChange:_,classNames:G={},styles:Q={},mousePosition:U,zIndex:J,focusTrap:K=!0}=e,q=(0,n.useRef)(),ee=(0,n.useRef)(null),et=(0,n.useRef)(null),er=(0,n.useContext)(p),en=er&&D>1,eo=er&&D>=1,[ea,ei]=(0,n.useState)(!0),{transform:el,resetTransform:ec,updateTransform:es,dispatchZoomChange:eu}=function(e,t,r,o){let a=(0,n.useRef)(null),i=(0,n.useRef)([]),[l,c]=(0,n.useState)(v),s=(e,t)=>{null===a.current&&(i.current=[],a.current=(0,g.A)(()=>{c(e=>{let r=e;return i.current.forEach(e=>{r={...r,...e}}),a.current=null,o?.({transform:r,action:t}),r})})),i.current.push({...l,...e})};return{transform:l,resetTransform:e=>{c(v),(0,f.A)(v,l)||o?.({transform:v,action:e})},updateTransform:s,dispatchZoomChange:(n,o,a,i,c)=>{let{width:u,height:d,offsetWidth:p,offsetHeight:f,offsetLeft:g,offsetTop:v}=e.current,h=n,b=l.scale*n;b>r?(b=r,h=r/l.scale):b<t&&(h=(b=c?b:t)/l.scale);let y=i??innerHeight/2,w=h-1,$=w*((a??innerWidth/2)-l.x-g),A=w*(y-l.y-v),E=l.x-($-w*u*.5),x=l.y-(A-w*d*.5);if(n<1&&1===b){let e=p*b,t=f*b,{width:r,height:n}=m();e<=r&&t<=n&&(E=0,x=0)}s({x:E,y:x,scale:b},o)}}}(q,H,X,Z),{isMoving:ed,onMouseDown:ep,onWheel:em}=function(e,t,r,o,a,i,l){let{rotate:c,scale:s,x:u,y:d}=a,[p,m]=(0,n.useState)(!1),f=(0,n.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),g=e=>{r&&p&&i({x:e.pageX-f.current.diffX,y:e.pageY-f.current.diffY},"move")},v=()=>{if(r&&p){m(!1);let{transformX:t,transformY:r}=f.current;if(u===t||d===r)return;let n=e.current.offsetWidth*s,o=e.current.offsetHeight*s,{left:a,top:l}=e.current.getBoundingClientRect(),p=c%180!=0,g=y(p?o:n,p?n:o,a,l);g&&i({...g},"dragRebound")}};return(0,n.useEffect)(()=>{if(t){window.addEventListener("mouseup",v,!1),window.addEventListener("mousemove",g,!1);try{window.top!==window.self&&(window.top.addEventListener("mouseup",v,!1),window.top.addEventListener("mousemove",g,!1))}catch(e){(0,h.$e)(!1,`[rc-image] ${e}`)}}return()=>{window.removeEventListener("mouseup",v),window.removeEventListener("mousemove",g);try{window.top?.removeEventListener("mouseup",v),window.top?.removeEventListener("mousemove",g)}catch(e){}}},[r,p,u,d,c,t]),{isMoving:p,onMouseDown:e=>{t&&0===e.button&&(e.preventDefault(),e.stopPropagation(),f.current={diffX:e.pageX-u,diffY:e.pageY-d,transformX:u,transformY:d},m(!0))},onMouseMove:g,onMouseUp:v,onWheel:e=>{if(!r||0==e.deltaY)return;let t=1+Math.min(Math.abs(e.deltaY/100),1)*o;e.deltaY>0&&(t=1/t),l(t,"wheel",e.clientX,e.clientY)}}}(q,N,O,Y,el,es,eu),{isTouching:ef,onTouchStart:eg,onTouchMove:ev,onTouchEnd:eh}=function(e,t,r,o,a,i,l){let{rotate:c,scale:s,x:u,y:d}=a,[p,m]=(0,n.useState)(!1),f=(0,n.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),g=e=>{f.current={...f.current,...e}};return(0,n.useEffect)(()=>{let e=e=>{e.preventDefault()};return r&&t&&window.addEventListener("touchmove",e,{passive:!1}),()=>{window.removeEventListener("touchmove",e)}},[r,t]),{isTouching:p,onTouchStart:e=>{if(!t)return;e.stopPropagation(),m(!0);let{touches:r=[]}=e;r.length>1?g({point1:{x:r[0].clientX,y:r[0].clientY},point2:{x:r[1].clientX,y:r[1].clientY},eventType:"touchZoom"}):g({point1:{x:r[0].clientX-u,y:r[0].clientY-d},eventType:"move"})},onTouchMove:e=>{let{touches:t=[]}=e,{point1:r,point2:n,eventType:o}=f.current;if(t.length>1&&"touchZoom"===o){let e={x:t[0].clientX,y:t[0].clientY},o={x:t[1].clientX,y:t[1].clientY},[a,i]=function(e,t,r,n){let o=$(e,r),a=$(t,n);if(0===o&&0===a)return[e.x,e.y];let i=o/(o+a);return[e.x+i*(t.x-e.x),e.y+i*(t.y-e.y)]}(r,n,e,o);l($(e,o)/$(r,n),"touchZoom",a,i,!0),g({point1:e,point2:o,eventType:"touchZoom"})}else"move"===o&&(i({x:t[0].clientX-r.x,y:t[0].clientY-r.y},"move"),g({eventType:"move"}))},onTouchEnd:()=>{if(!r)return;if(p&&m(!1),g({eventType:"none"}),o>s)return i({x:0,y:0,scale:o},"touchZoom");let t=e.current.offsetWidth*s,n=e.current.offsetHeight*s,{left:a,top:l}=e.current.getBoundingClientRect(),u=c%180!=0,d=y(u?n:t,u?t:n,a,l);d&&i({...d},"dragRebound")}}}(q,N,O,H,el,es,eu),{rotate:eb,scale:ey}=el;(0,n.useEffect)(()=>{ea||ei(!0)},[ea]),(0,n.useEffect)(()=>{O||ec("close")},[O]);let ew=n.createElement(k,C({},F,{width:e.width,height:e.height,imgRef:q,className:`${t}-img`,alt:b,style:{transform:`translate3d(${el.x}px, ${el.y}px, 0) scale3d(${el.flipX?"-":""}${ey}, ${el.flipY?"-":""}${ey}, 1) rotate(${eb}deg)`,transitionDuration:(!ea||ef)&&"0s"},fallback:M,src:o,onWheel:em,onMouseDown:ep,onDoubleClick:e=>{O&&(1!==ey?es({x:0,y:0,scale:1},"doubleClick"):eu(1+Y,"doubleClick",e.clientX,e.clientY))},onTouchStart:eg,onTouchMove:ev,onTouchEnd:eh,onTouchCancel:eh})),e$={url:o,alt:b,...w},eA=()=>{eu(1+Y,"zoomIn")},eE=()=>{eu(1/(1+Y),"zoomOut")},ex=()=>{es({rotate:eb+90},"rotateRight")},eC=()=>{es({rotate:eb-90},"rotateLeft")},ek=()=>{es({flipX:!el.flipX},"flipX")},eM=()=>{es({flipY:!el.flipY},"flipY")},eN=()=>{ec("reset")},eI=e=>{let t=P+e;t>=0&&t<=D-1&&(ei(!1),ec(e<0?"prev":"next"),_?.(t,P))},eO=(0,c._q)(e=>{if(O){let{keyCode:t}=e;en&&(t===d.A.LEFT?eI(-1):t===d.A.RIGHT&&eI(1))}});(0,n.useEffect)(()=>{if(O)return window.addEventListener("keydown",eO),()=>{window.removeEventListener("keydown",eO)}},[O]);let[ej,ez]=(0,n.useState)(!1);n.useEffect(()=>{O&&ez(!0)},[O]);let[eS,eL]=(0,n.useState)(!1);(0,u.A)(()=>{O&&eL(!0)},[O]),(0,u.A)(()=>{O&&(et.current=document.activeElement)},[O]),(0,s.T$)(K&&O&&eS,()=>ee.current);let eR={...Q.body};return U&&(eR.transformOrigin=`${U.x}px ${U.y}px`),n.createElement(l.A,{open:eS&&O,autoDestroy:!1,getContainer:R,autoLock:ej,onEsc:({top:e})=>{e&&I?.()}},n.createElement(i.Ay,{motionName:V,visible:eS&&O,motionAppear:!0,motionEnter:!0,motionLeave:!0,onVisibleChanged:e=>{e||(ez(!1),et.current?.focus?.(),et.current=null),j?.(e)}},({className:e,style:o})=>{let i={...Q.root,...o};return J&&(i.zIndex=J),n.createElement("div",{ref:ee,className:(0,a.$)(t,r,G.root,e,{[`${t}-movable`]:N,[`${t}-moving`]:ed}),style:i,role:"dialog","aria-modal":"true","aria-label":b,tabIndex:-1},n.createElement("div",{className:(0,a.$)(`${t}-mask`,G.mask),style:Q.mask,onClick:z?I:void 0}),n.createElement("div",{className:(0,a.$)(`${t}-body`,G.body),style:eR},B?B(ew,{transform:el,image:e$,...er?{current:P}:{}}):ew),!1!==L&&null!==L&&n.createElement(A,{prefixCls:t,icon:!0===L?S.close:L||S.close,onClick:I,className:G.close,style:Q.close}),en&&n.createElement(x,{prefixCls:t,current:P,count:D,icons:S,onActive:eI}),n.createElement(E,{prefixCls:t,showProgress:eo,current:P,count:D,showSwitch:en,classNames:G,styles:Q,image:e$,transform:el,icons:S,countRender:T,actionsRender:W,scale:ey,minScale:H,maxScale:X,onActive:eI,onFlipY:eM,onFlipX:ek,onRotateLeft:eC,onRotateRight:ex,onZoomOut:eE,onZoomIn:eA,onClose:I,onReset:eN}))}))};var N=r(19750);let I=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt","fetchPriority"];function O(){return(O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let j=0;function z(){return(z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let S=e=>{let{prefixCls:t="rc-image",previewPrefixCls:r=`${t}-preview`,rootClassName:i,className:l,style:c,classNames:s={},styles:u={},width:d,height:m,src:f,alt:g,placeholder:v,fallback:h,preview:b=!0,onClick:y,onError:$,onKeyDown:A,...E}=e,x=(0,n.useContext)(p),C=!!b,{src:k,open:N,onOpenChange:O,cover:S,rootClassName:L,...R}=b&&"object"==typeof b?b:{},P="object"==typeof S&&S.placement&&S.placement||"center",D="object"==typeof S&&S.coverNode?S.coverNode:S,[T,Y]=(0,o.A)(!!N,N),[H,X]=(0,n.useState)(null),V=e=>{Y(e),O?.(e)},B=k??f,[F,W,Z]=w({src:f,isCustomPlaceholder:v&&!0!==v,fallback:h}),_=(0,n.useMemo)(()=>{let t={};return I.forEach(r=>{void 0!==e[r]&&(t[r]=e[r])}),t},I.map(t=>e[t])),G=function(e,t){let[r]=n.useState(()=>String(j+=1)),o=n.useContext(p),a={data:t,canPreview:e};return n.useEffect(()=>{if(o)return o.register(r,a)},[]),n.useEffect(()=>{o&&o.register(r,a)},[e,t]),r}(C,(0,n.useMemo)(()=>({..._,src:B}),[B,_]));return n.createElement(n.Fragment,null,n.createElement("div",z({},E,{className:(0,a.$)(t,i,s.root,{[`${t}-error`]:"error"===Z}),onClick:C?e=>{let t=e.target.getBoundingClientRect(),r=t.x+t.width/2,n=t.y+t.height/2;x?x.onPreview(G,B,r,n):(X({x:r,y:n}),V(!0)),y?.(e)}:y,role:C?"button":E.role,tabIndex:C&&null==E.tabIndex?0:E.tabIndex,"aria-label":C?E["aria-label"]??g:E["aria-label"],onKeyDown:e=>{if(A?.(e),C&&("Enter"===e.key||" "===e.key)){e.preventDefault();let t=e.target.getBoundingClientRect(),r=t.x+t.width/2,n=t.y+t.height/2;x?x.onPreview(G,B,r,n):(X({x:r,y:n}),V(!0))}},style:{width:d,height:m,...u.root}}),n.createElement("img",z({},_,{className:(0,a.$)(`${t}-img`,{[`${t}-img-placeholder`]:!0===v},s.image,l),style:{height:m,...u.image,...c},ref:F},W,{width:d,height:m,onError:$})),"loading"===Z&&n.createElement("div",{"aria-hidden":"true",className:`${t}-placeholder`},v),!1!==S&&C&&n.createElement("div",{className:(0,a.$)(`${t}-cover`,s.cover,`${t}-cover-${P}`),style:{display:c?.display==="none"?"none":void 0,...u.cover}},D)),!x&&C&&n.createElement(M,z({"aria-hidden":!T,open:T,prefixCls:r,onClose:()=>{V(!1)},mousePosition:H,src:B,alt:g,imageInfo:{width:d,height:m},fallback:h,imgCommonProps:_},R,{classNames:s?.popup,styles:u?.popup,rootClassName:(0,a.$)(L,i)})))};S.PreviewGroup=({previewPrefixCls:e="rc-image-preview",classNames:t,styles:r,children:a,icons:i={},items:l,preview:c,fallback:s})=>{let{open:u,onOpenChange:d,current:m,onChange:f,...g}=c&&"object"==typeof c?c:{},[v,h,b]=function(e){let[t,r]=n.useState({}),o=n.useCallback((e,t)=>(r(r=>({...r,[e]:t})),()=>{r(t=>{let r={...t};return delete r[e],r})}),[]);return[n.useMemo(()=>e?e.map(e=>{if("string"==typeof e)return{data:{src:e}};let t={};return Object.keys(e).forEach(r=>{["src",...I].includes(r)&&(t[r]=e[r])}),{data:t}}):Object.keys(t).reduce((e,r)=>{let{canPreview:n,data:o}=t[r];return n&&e.push({data:o,id:r}),e},[]),[e,t]),o,!!e]}(l),[y,w]=(0,o.A)(0,m),[$,A]=(0,n.useState)(!1),{src:E,...x}=v[y]?.data||{},[C,k]=(0,o.A)(!!u,u),j=(0,N.A)(e=>{k(e),e!==C&&d?.(e,{current:y})}),[z,S]=(0,n.useState)(null),L=n.useCallback((e,t,r,n)=>{let o=b?v.findIndex(e=>e.data.src===t):v.findIndex(t=>t.id===e);w(o<0?0:o),j(!0),S({x:r,y:n}),A(!0)},[v,b]);n.useEffect(()=>{C?$||w(0):A(!1)},[C]);let R=n.useMemo(()=>({register:h,onPreview:L}),[h,L]);return n.createElement(p.Provider,{value:R},a,n.createElement(M,O({"aria-hidden":!C,open:C,prefixCls:e,onClose:()=>{j(!1),S(null)},mousePosition:z,imgCommonProps:x,src:E,fallback:s,icons:i,current:y,count:v.length,onChange:(e,t)=>{w(e),f?.(e,t)}},g,{classNames:t?.popup,styles:r?.popup})))};var L=r(92162),R=r(74567),P=r(632),D=r(36319),T=r(48809),Y=r(84649);let H=(e,t,r,o,i,l,c)=>{let[s]=(0,D.YK)("ImagePreview",e?.zIndex),[u,d,p]=(0,T.u)(e?.mask,t?.mask,`${r}-preview`);return n.useMemo(()=>{if(!e)return e;let{cover:n,getContainer:m,closeIcon:f,rootClassName:g}=e,{closeIcon:v}=t??{};return{motionName:(0,Y.b)(`${r}-preview`,"fade"),...e,...c?{cover:n??c}:{},icons:l,getContainer:m??i,zIndex:s,closeIcon:f??v,rootClassName:(0,a.$)(o,g),mask:u,maskClosable:p,blurClassName:d.mask}},[e,t,r,o,i,c,l,s,u,p,d])};var X=r(26047);function V(e){return(0,X.Qd)(e)&&!(0,n.isValidElement)(e)}function B(e){let t=(0,n.useMemo)(()=>"boolean"==typeof e?e?{}:null:(0,X.Qd)(e)?e:{},[e]);return(0,n.useMemo)(()=>{let e;if(!t)return[t,"",""];let{open:r,onOpenChange:o,cover:a,actionsRender:i,visible:l,onVisibleChange:c,rootClassName:s,maskClassName:u,mask:d,forceRender:p,destroyOnClose:m,toolbarRender:f,...g}=t;o?e=o:c&&(e=(e,t)=>{let{current:r}=t||{};void 0!==r?c(e,!e,r):c(e,!e)});let[v,h]=(0,n.isValidElement)(d)?[d,void 0]:"boolean"==typeof d||(0,X.Qd)(d)?[void 0,d]:[void 0,void 0];return[{...g,open:r??l,onOpenChange:e,cover:a??v,mask:h,actionsRender:i??f},s,u]},[t])}var F=r(45042),W=r(50379),Z=r(52116),_=r(2520),G=r(88483);function Q(){return(Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let U=n.forwardRef((e,t)=>n.createElement(G.A,Q({},e,{ref:t,icon:_.A})));var J=r(60565);function K(){return(K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let q=n.forwardRef((e,t)=>n.createElement(G.A,K({},e,{ref:t,icon:J.A})));var ee=r(51497);function et(){return(et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let er=n.forwardRef((e,t)=>n.createElement(G.A,et({},e,{ref:t,icon:ee.A})));var en=r(6710);function eo(){return(eo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let ea=n.forwardRef((e,t)=>n.createElement(G.A,eo({},e,{ref:t,icon:en.A})));var ei=r(39415);function el(){return(el=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let ec=n.forwardRef((e,t)=>n.createElement(G.A,el({},e,{ref:t,icon:ei.A})));var es=r(15561),eu=r(47252),ed=r(10540),ep=r(28403),em=r(7961);let ef=new es.Mo("antImageProgressActive",{"0%":{backgroundPosition:"200% 0"},"100%":{backgroundPosition:"-200% 0"}}),eg=(e,t,r,n="translate(0%, 0%)",o=.8)=>new es.Mo(e,{"0%":{transform:n,opacity:o},"50%":{transform:t,opacity:r},"100%":{transform:n,opacity:o}}),ev=eg("antImageInkFlow1","translate(15%, -20%) scale(1.25)",.5),eh=eg("antImageInkFlow2","translate(-18%, 15%) scale(0.85)",.9,"translate(0%, 0%) scale(1.1)",.7),eb=eg("antImageInkFlow3","translate(8%, 10%) scale(1.15)",.8,"translate(0%, 0%) scale(0.85)",.65),ey=e=>({position:e||"absolute",inset:0}),ew=(0,ed.OF)("Image",e=>{let t=`${e.componentCls}-preview`,r=(0,ep.oX)(e,{previewCls:t,imagePreviewSwitchSize:e.controlHeightLG});return[(e=>{let{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",...(0,em.K8)(e),[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-placeholder`]:{...ey()}}}})(r),(e=>{let{componentCls:t,motionDurationSlow:r,colorTextLightSolid:n}=e;return{[t]:{[`${t}-cover`]:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:n,background:new eu.Y("#000").setA(.3).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${r}`},"&:hover, &:focus-visible":{[`${t}-cover`]:{opacity:1}},[`${t}-cover-top`]:{inset:"0 0 auto 0",justifyContent:"center"},[`${t}-cover-bottom`]:{inset:"auto 0 0 0",justifyContent:"center"}}}})(r),(e=>{let{componentCls:t,motionDurationMid:r,motionEaseInOut:n,progressAnimationDuration:o}=e,a={position:"absolute",width:"150%",height:"150%",left:"-25%",top:"-25%",animationTimingFunction:n,animationIterationCount:"infinite",pointerEvents:"none",willChange:"transform, opacity"};return{[`${t}-progress-wrapper`]:{position:"relative",display:"inline-block",overflow:"hidden",borderRadius:"inherit",backgroundColor:e.colorBgBase,backdropFilter:"blur(8px)",[`${t}-progress-ink-1`]:{...a,background:"radial-gradient(ellipse 65% 55% at 25% 30%, rgba(100, 180, 255, 0.98) 0%, transparent 55%)",animationName:ev,animationDuration:o,filter:"blur(40px)","&::before":{content:'""',...a,background:"radial-gradient(ellipse 60% 65% at 75% 45%, rgba(180, 140, 255, 0.95) 0%, transparent 50%)",animationName:eh,animationDuration:`calc(${o} + 2s)`,animationDelay:"-1s",filter:"blur(45px)"},"&::after":{content:'""',...a,background:"radial-gradient(ellipse 55% 50% at 50% 70%, rgba(100, 220, 220, 0.9) 0%, transparent 45%)",animationName:eb,animationDuration:`calc(${o} + 0.5s)`,animationDelay:"-2s",filter:"blur(38px)"}},[`${t}-progress-ink-2`]:{...a,background:"radial-gradient(ellipse 45% 40% at 60% 20%, rgba(255, 150, 200, 0.88) 0%, transparent 45%)",animationName:eb,animationDuration:`calc(${o} + 1.5s)`,animationDelay:"-3s",filter:"blur(42px)","&::before":{content:'""',...a,background:"radial-gradient(ellipse 50% 55% at 20% 75%, rgba(160, 190, 255, 0.88) 0%, transparent 50%)",animationName:ev,animationDuration:`calc(${o} + 2.5s)`,animationDelay:"-2.5s",filter:"blur(35px)"}},[`${t}-progress-content`]:{position:"absolute",top:"50%",left:0,transform:"translateY(-50%)",display:"flex",flexDirection:"column",alignItems:"center",width:"100%",paddingInline:e.paddingLG,textAlign:"center",fontSize:e.fontSize,color:e.colorTextSecondary,zIndex:1},[`${t}-progress-rail`]:{width:"100%",height:6,marginTop:e.marginSM,backgroundColor:"rgba(255, 255, 255, 0.5)",borderRadius:e.borderRadiusXS,overflow:"hidden",backdropFilter:"blur(4px)","&::before":{content:'""',display:"block",height:"100%",width:"var(--progress-percent, 0%)",background:"linear-gradient(90deg, rgba(120, 170, 255, 0.85) 0%, rgba(160, 150, 245, 0.85) 40%, rgba(130, 200, 220, 0.85) 60%, rgba(120, 170, 255, 0.85) 100%)",backgroundSize:"200% 100%",borderRadius:e.borderRadiusXS/2,transition:`width ${r} ease`,animationName:ef,animationDuration:o,animationTimingFunction:"linear",animationIterationCount:"infinite"}},[`${t}-progress-indicator`]:{marginTop:e.marginXS}}}})(r),(e=>{let{motionEaseOut:t,previewCls:r,motionDurationSlow:n,componentCls:o,colorBgMask:a,marginXL:i,marginSM:l,margin:c,colorTextLightSolid:s,paddingSM:u,paddingLG:d,previewOperationHoverColor:p,previewOperationColorDisabled:m,previewOperationSize:f,zIndexPopup:g}=e,v=new eu.Y(a).setA(.1),h=v.clone().setA(.2),b={position:"absolute",color:s,backgroundColor:v.toRgbString(),borderRadius:"50%",padding:u,outline:0,border:0,cursor:"pointer",transition:`all ${n}`,display:"flex",fontSize:f,"&:hover":{backgroundColor:h.toRgbString()},"&:active":{backgroundColor:v.toRgbString()},"&:focus-visible":(0,em.jk)(e)};return{[`${o}-preview`]:{textAlign:"center",inset:0,position:"fixed",userSelect:"none",zIndex:g,[`${r}-mask`]:{inset:0,position:"absolute",background:a,backdropFilter:"blur(0px)",transition:`backdrop-filter ${n}`,[`&${o}-preview-mask-blur`]:{backdropFilter:"blur(4px)"},[`&${o}-preview-mask-hidden`]:{display:"none"}},[`${r}-body`]:{...ey(),"pointer-events":"none",display:"flex",alignItems:"center",justifyContent:"center","> *":{pointerEvents:"auto"}},[`${r}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",transition:`transform ${n} ${t} 0s`},[`&-movable ${r}-img`]:{cursor:"grab"},[`&-moving ${r}-img`]:{cursor:"grabbing"},[`${r}-close`]:{...b,top:l,insetInlineEnd:l},[`${r}-switch`]:{...b,top:"50%",transform:"translateY(-50%)","&-disabled":{"&, &:hover, &:active":{color:m,background:"transparent",cursor:"not-allowed"}},"&-prev":{insetInlineStart:l},"&-next":{insetInlineEnd:l}},[`${r}-footer`]:{position:"absolute",bottom:i,left:{_skip_check_:!0,value:"50%"},display:"flex",flexDirection:"column",alignItems:"center",color:e.previewOperationColor,transform:"translateX(-50%)",gap:c},[`${r}-actions`]:{display:"flex",gap:u,padding:`0 ${(0,es.zA)(d)}`,backgroundColor:v.toRgbString(),borderRadius:100,fontSize:f,"&-action":{color:"inherit",background:"transparent",border:0,font:"inherit",padding:u,cursor:"pointer",transition:`all ${n}`,display:"flex",[`&:not(${r}-actions-action-disabled):hover`]:{color:p},"&:focus-visible":(0,em.jk)(e),"&-disabled":{color:m,cursor:"not-allowed"}}}}}})(r),(e=>{let{previewCls:t,motionDurationSlow:r}=e;return{[t]:{"&-fade":{transition:`opacity ${r}`,"&-enter, &-appear":{opacity:0,[`${t}-body`]:{transform:"scale(0)"},"&-active":{opacity:1,[`${t}-body`]:{transform:"scale(1)",transition:`transform ${r}`}}},"&-leave":{opacity:1,"&-active":{opacity:0,[`${t}-body`]:{transform:"scale(0)",transition:`transform ${r}`}}}}}}})(r)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new eu.Y(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new eu.Y(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new eu.Y(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:1.5*e.fontSizeIcon,progressAnimationDuration:"3s"})),e$={rotateLeft:n.createElement(U,null),rotateRight:n.createElement(q,null),zoomIn:n.createElement(ea,null),zoomOut:n.createElement(ec,null),close:n.createElement(F.A,null),left:n.createElement(W.A,null),right:n.createElement(Z.A,null),flipX:n.createElement(er,null),flipY:n.createElement(er,{rotate:90})},eA={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0},eE=e=>{let{prefixCls:t,percent:r,render:o,classNames:i,styles:l,rootClassName:c,rootStyle:s,width:u,height:d}=e,p=(0,X.Et)(r)&&Number.isFinite(r),m=p?Math.max(0,Math.min(100,Math.round(r))):0,f=p?{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m,"aria-label":`${m}%`}:{"aria-busy":!0},g=p?n.createElement("div",{className:(0,a.$)(`${t}-progress-rail`,i?.rail),style:{...l?.rail,"--progress-percent":`${m}%`}}):null,v=o?o(g,m):n.createElement(n.Fragment,null,g,p&&n.createElement("div",{className:(0,a.$)(`${t}-progress-indicator`,i?.indicator),style:l?.indicator},`${m}%`));return n.createElement("div",{className:(0,a.$)(t,`${t}-progress-wrapper`,i?.root,c),style:{width:u,height:d,...s,...l?.root},...f},!p&&n.createElement("span",{role:"status","aria-live":"polite",style:eA},"Loading"),n.createElement("div",{className:`${t}-progress-ink-1`}),n.createElement("div",{className:`${t}-progress-ink-2`}),n.createElement("div",{className:(0,a.$)(`${t}-progress-content`,i?.content),style:l?.content},v))},ex=e=>{let{prefixCls:t,preview:r,className:o,rootClassName:i,style:l,styles:c,classNames:s,wrapperStyle:u,fallback:d,placeholder:p,...m}=e,{getPrefixCls:f,getPopupContainer:g,className:v,style:h,preview:b,styles:y,classNames:w,fallback:$}=(0,R.TP)("image"),A=f("image",t),E=(0,P.A)(A),[x,C]=ew(A,E),k=(0,a.$)(i,x,C,E),M=(0,a.$)(o,x,v),[N,I,O]=B(r),[j,z,D]=B(b),T=H(N,j,A,k,g,e$,!0),Y={...e,preview:T},X=n.useMemo(()=>({cover:(0,a.$)(D,O),popup:{root:(0,a.$)(z,I)}}),[I,O,z,D]),{mask:F,blurClassName:W}=T??{},Z=n.useMemo(()=>({mask:(0,a.$)({[`${A}-preview-mask-hidden`]:!F},W)}),[F,A,W]),_=n.useMemo(()=>[w,s,X,{popup:Z}],[w,s,X,Z]),[G,Q]=(0,L.AV)(_,[y,{root:u},c],{props:Y},{popup:{_default:"root"},placeholder:{}}),U={...h,...l},{progressConfig:J}=function(e){return(0,n.useMemo)(()=>e&&V(e)?"boolean"==typeof e.progress?{progressConfig:e.progress?{}:void 0}:{progressConfig:e.progress}:{},[e])}(p),{percent:K,render:q}=J||{},ee=G?.placeholder?.progress,et=Q?.placeholder?.progress,{width:er,height:en,src:eo,...ea}=m,ei=V(p)?void 0:p,el=ei&&!eo,ec=el?e=>ei:q;return void 0!==J||el?n.createElement(eE,{prefixCls:A,percent:K,render:ec,classNames:ee,styles:et,rootClassName:(0,a.$)(k,M),rootStyle:{...U,...Q?.root},width:er,height:en}):n.createElement(S,{prefixCls:A,preview:T||!1,rootClassName:k,className:M,style:U,fallback:d??$,placeholder:ei,width:er,height:en,src:eo,...ea,classNames:G,styles:Q})};ex.PreviewGroup=({previewPrefixCls:e,preview:t,classNames:r,styles:o,...i})=>{let{getPrefixCls:l,getPopupContainer:c,direction:s,preview:u,classNames:d,styles:p}=(0,R.TP)("image"),m=l("image",e),f=`${m}-preview`,g=(0,P.A)(m),[v,h]=ew(m,g),b=(0,a.$)(v,h,g),[y,w,$]=B(t),[A,E,x]=B(u),C=n.useMemo(()=>({...e$,left:"rtl"===s?n.createElement(Z.A,null):n.createElement(W.A,null),right:"rtl"===s?n.createElement(W.A,null):n.createElement(Z.A,null)}),[s]),k=H(y,A,m,b,c,e$),{mask:M,blurClassName:N}=k??{},I={...i,classNames:r,styles:o},[O,j]=(0,L.AV)([d,r,{cover:(0,a.$)(x,$),popup:{root:(0,a.$)(E,w),mask:(0,a.$)({[`${m}-preview-mask-hidden`]:!M},N)}}],[p,o],{props:I},{popup:{_default:"root"}});return n.createElement(S.PreviewGroup,{preview:k,previewPrefixCls:f,icons:C,...i,classNames:O,styles:j})};let eC=ex},2256:(e,t,r)=>{r.d(t,{A:()=>n});let n=r(25341).A},2520:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"}},6710:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"}},15437:(e,t,r)=>{r.d(t,{A:()=>n});let n=e=>{let{componentCls:t,antCls:r,motionDurationMid:n,motionEaseInOut:o}=e;return{[t]:{[`${r}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(e=>`${e} ${n} ${o}`).join(", ")} !important`}},[`${r}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(e=>`${e} ${n} ${o}`).join(", ")} !important`}}}}},23793:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"}},25258:(e,t,r)=>{r.d(t,{A:()=>w});var n=r(51541),o=r(61848),a=r(5669),i=r(97109),l=r(72658),c=r(3638),s=r(92162),u=r(82725),d=r(74567),p=r(632),m=r(49517),f=r(79412),g=r(19527);let v=(0,u.U)(e=>{let{prefixCls:t,className:r,closeIcon:n,closable:o,type:a,title:u,children:v,footer:h,classNames:b,styles:y,...w}=e,{getPrefixCls:$}=i.useContext(d.QO),{className:A,style:E,classNames:x,styles:C}=(0,d.TP)("modal"),k=$(),M=t||$("modal"),N=(0,p.A)(k),[I,O]=(0,g.Ay)(M,N),[j,z]=(0,s.AV)([x,b],[C,y],{props:e}),S=`${M}-confirm`,L={};return L=a?{closable:o??!1,title:"",footer:"",children:i.createElement(m.k,{...e,prefixCls:M,confirmPrefixCls:S,rootPrefixCls:k,content:v})}:{closable:o??!0,title:u,footer:null!==h&&i.createElement(f.w,{...e}),children:v},i.createElement(l.Z,{prefixCls:M,className:(0,c.$)(I,`${M}-pure-panel`,a&&S,a&&`${S}-${a}`,r,A,O,N,j.root),style:{...E,...z.root},...w,closeIcon:(0,f.O)(M,n),closable:o,classNames:j,styles:z,...L})});var h=r(99739);function b(e){return(0,n.Ay)((0,n.fp)(e))}let y=a.A;y.useModal=h.A,y.info=function(e){return(0,n.Ay)((0,n.$D)(e))},y.success=function(e){return(0,n.Ay)((0,n.Ej)(e))},y.error=function(e){return(0,n.Ay)((0,n.jT)(e))},y.warning=b,y.warn=b,y.confirm=function(e){return(0,n.Ay)((0,n.lr)(e))},y.destroyAll=function(){for(;o.A.length;){let e=o.A.pop();e&&e()}},y.config=n.FB,y._InternalPanelDoNotUseOrYouWillBeFired=v;let w=y},30960:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"}},35311:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M456 231a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"more",theme:"outlined"}},38770:(e,t,r)=>{r.d(t,{A:()=>n});let n=r(51916).A},39415:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"}},51497:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"}},56768:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(97109),o=r(30960),a=r(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let l=n.forwardRef((e,t)=>n.createElement(a.A,i({},e,{ref:t,icon:o.A})))},58209:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(97109),o=r(23793),a=r(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let l=n.forwardRef((e,t)=>n.createElement(a.A,i({},e,{ref:t,icon:o.A})))},60565:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"}},64254:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(97109),o=r(79662),a=r(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let l=n.forwardRef((e,t)=>n.createElement(a.A,i({},e,{ref:t,icon:o.A})))},66284:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z"}}]},name:"picture",theme:"outlined"}},75548:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(97109),o=r(66284),a=r(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let l=n.forwardRef((e,t)=>n.createElement(a.A,i({},e,{ref:t,icon:o.A})))},79662:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"}},81668:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(97109),o=r(96724),a=r(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let l=n.forwardRef((e,t)=>n.createElement(a.A,i({},e,{ref:t,icon:o.A})))},85855:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(97109),o=r(35311),a=r(88483);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let l=n.forwardRef((e,t)=>n.createElement(a.A,i({},e,{ref:t,icon:o.A})))},96724:(e,t)=>{t.A={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[788],{1611:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"}},2256:(e,t,a)=>{a.d(t,{A:()=>n});let n=a(25341).A},7225:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(23830),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},11100:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M567.1 512l318.5-319.3c5-5 1.5-13.7-5.6-13.7h-90.5c-2.1 0-4.2.8-5.6 2.3l-273.3 274-90.2-90.5c12.5-22.1 19.7-47.6 19.7-74.8 0-83.9-68.1-152-152-152s-152 68.1-152 152 68.1 152 152 152c27.7 0 53.6-7.4 75.9-20.3l90 90.3-90.1 90.3A151.04 151.04 0 00288 582c-83.9 0-152 68.1-152 152s68.1 152 152 152 152-68.1 152-152c0-27.2-7.2-52.7-19.7-74.8l90.2-90.5 273.3 274c1.5 1.5 3.5 2.3 5.6 2.3H880c7.1 0 10.7-8.6 5.6-13.7L567.1 512zM288 370c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80zm0 444c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"}}]},name:"scissor",theme:"outlined"}},14995:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"}},21247:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482.2 508.4L331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"}}]},name:"merge-cells",theme:"outlined"}},23216:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(29664),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},23830:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"}},26619:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(1611),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},29664:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"}},30960:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"}},35459:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(98995),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},38770:(e,t,a)=>{a.d(t,{A:()=>n});let n=a(51916).A},49484:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(11100),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},53234:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM496 208H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 544h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm328 244a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"hdd",theme:"outlined"}},54849:(e,t,a)=>{a.d(t,{A:()=>w});var n=a(97109),r=a(42644),c=a(52690),l=a(3638),s=a(92162),o=a(26047),i=a(74567),f=a(88762);let v=e=>{let t,{value:a,formatter:r,precision:c,decimalSeparator:l,groupSeparator:s="",prefixCls:i,className:f,style:v}=e;if((0,o.Tn)(r))t=r(a);else{let e=String(a),r=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(r&&"-"!==e){let e=r[1],a=r[2]||"0",f=r[4]||"";a=a.replace(/\B(?=(\d{3})+(?!\d))/g,s),(0,o.Et)(c)&&(f=f.padEnd(c,"0").slice(0,c>0?c:0)),f&&(f=`${l}${f}`),t=[n.createElement("span",{key:"int",className:`${i}-content-value-int`},e,a),f&&n.createElement("span",{key:"decimal",className:`${i}-content-value-decimal`},f)]}else t=e}return n.createElement("span",{className:f,style:v},t)};var h=a(7961),d=a(10540),u=a(28403);let m=(0,d.OF)("Statistic",e=>(e=>{let{componentCls:t,marginXXS:a,padding:n,colorTextDescription:r,titleFontSize:c,colorTextHeading:l,contentFontSize:s,fontFamily:o}=e;return{[t]:{...(0,h.dF)(e),[`${t}-header`]:{paddingBottom:a,[`${t}-title`]:{color:r,fontSize:c}},[`${t}-skeleton`]:{paddingTop:n},[`${t}-content`]:{color:l,fontSize:s,fontFamily:o,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:a},[`${t}-content-suffix`]:{marginInlineStart:a}}}}})((0,u.oX)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:a}=e;return{titleFontSize:a,contentFontSize:t}}),p=n.forwardRef((e,t)=>{let{prefixCls:a,className:c,rootClassName:h,style:d,valueStyle:u,value:p=0,title:g,valueRender:b,prefix:A,suffix:H,loading:w=!1,formatter:y,precision:O,decimalSeparator:z=".",groupSeparator:V=",",onMouseEnter:E,onMouseLeave:$,styles:j,classNames:x,...M}=e,{getPrefixCls:N,direction:R,className:S,style:k,classNames:B,styles:P}=(0,i.TP)("statistic"),T=N("statistic",a),[C,I]=m(T),L={...e,decimalSeparator:z,groupSeparator:V,loading:w,value:p},D=(0,s.XT)(k),_=(0,s.XT)(d),[F,X]=(0,s.AV)([B,x],[P,D,j,_],{props:L}),q=(0,l.$)(T,{[`${T}-rtl`]:"rtl"===R},S,c,h,F.root,C,I),K=(0,l.$)(`${T}-header`,F.header),Y=(0,l.$)(`${T}-title`,F.title),G=(0,l.$)(`${T}-content`,F.content),J=(0,l.$)(`${T}-content-value`,F.value),Q=(0,l.$)(`${T}-content-prefix`,F.prefix),U=(0,l.$)(`${T}-content-suffix`,F.suffix),W=n.createElement(v,{decimalSeparator:z,groupSeparator:V,prefixCls:T,formatter:y,precision:O,value:p,className:J,style:X.value}),Z=n.useRef(null);n.useImperativeHandle(t,()=>({nativeElement:Z.current}));let ee=(0,r.KE)(M,{aria:!0,data:!0});return n.createElement("div",{...ee,className:q,style:X.root,ref:Z,onMouseEnter:E,onMouseLeave:$},g&&n.createElement("div",{className:K,style:X.header},n.createElement("div",{className:Y,style:X.title},g)),n.createElement(f.A,{paragraph:!1,loading:w,className:`${T}-skeleton`,active:!0},n.createElement("div",{className:G,style:{...u,...X.content}},A&&n.createElement("span",{className:Q,style:X.prefix},A),(0,o.Tn)(b)?b(W):W,H&&n.createElement("span",{className:U,style:X.suffix},H))))}),g=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],b=1e3/60,A=e=>{let{value:t,format:a="HH:mm:ss",onChange:l,onFinish:s,type:o,...i}=e,f="countdown"===o,[v,h]=n.useState(null),d=(0,r._q)(()=>{let e=Date.now(),a=new Date(t).getTime();h({});let n=f?a-e:e-a;return l?.(n),!f||!(a<e)||(s?.(),!1)});return n.useEffect(()=>{let e;return e=window.setInterval(()=>{d()||window.clearInterval(e)},b),()=>{window.clearInterval(e)}},[t,f]),n.useEffect(()=>{h({})},[]),n.createElement(p,{...i,value:t,valueRender:e=>(0,c.Ob)(e,{title:void 0}),formatter:(e,t)=>v?function(e,t,a){let{format:n=""}=t,r=new Date(e).getTime(),c=Date.now();return function(e,t){let a=e,n=/\[[^\]]*]/g,r=(t.match(n)||[]).map(e=>e.slice(1,-1)),c=t.replace(n,"[]"),l=g.reduce((e,[t,n])=>{if(e.includes(t)){let r=Math.floor(a/n);return a-=r*n,e.replace(RegExp(`${t}+`,"g"),e=>{let t=e.length;return r.toString().padStart(t,"0")})}return e},c),s=0;return l.replace(n,()=>{let e=r[s];return s+=1,e})}(a?Math.max(r-c,0):Math.max(c-r,0),n)}(e,{...t,format:a},f):"-"})},H=n.memo(e=>n.createElement(A,{...e,type:"countdown"}));p.Timer=A,p.Countdown=H;let w=p},56768:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(30960),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},63663:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(21247),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},93314:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(53234),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},98995:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"}},99811:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(14995),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[795],{5450:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"}},12887:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"}},13114:(e,t,a)=>{a.d(t,{A:()=>c});var s=a(97109),l=a(5450),r=a(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}let c=s.forwardRef((e,t)=>s.createElement(r.A,o({},e,{ref:t,icon:l.A})))},14995:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"}},24810:(e,t,a)=>{a.d(t,{A:()=>c});var s=a(97109),l=a(31738),r=a(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}let c=s.forwardRef((e,t)=>s.createElement(r.A,o({},e,{ref:t,icon:l.A})))},26631:(e,t,a)=>{a.d(t,{A:()=>c});var s=a(97109),l=a(12887),r=a(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}let c=s.forwardRef((e,t)=>s.createElement(r.A,o({},e,{ref:t,icon:l.A})))},27795:(e,t,a)=>{a.r(t),a.d(t,{default:()=>f});var s=a(65321),l=a(97109),r=a(48321),o=a(33442),c=a(85114),n=a(99605),i=a(99811),d=a(13114),v=a(29071),x=a(26631),u=a(84742),m=a(38762),h=a(24810),g=a(6578);function p(e){let{title:t,value:a,subtext:l,icon:r,colorClass:o,animationClass:c}=e;return(0,s.jsxs)("div",{className:"p-4 animateFadeIn flex flex-col justify-between border-l-2 border-transparent hover:border-[var(--colorBrand)] transition-colors ".concat(c||""),style:{opacity:0},children:[(0,s.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,s.jsx)("div",{className:"text-xs font-semibold text-[var(--colorTextSecondary)] tracking-wide uppercase",children:t}),r&&(0,s.jsx)("div",{className:o,style:{opacity:.7},children:r})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-3xl font-bold tracking-tight",children:a}),l&&(0,s.jsx)("div",{className:"text-xs mt-1 truncate font-medium",style:{color:"var(--colorTextTertiary)"},children:l})]})]})}function f(){var e,t,a,f,j,y,b,A,N,T,w,k,C,z,O,M,S,L,P,H;let B=(0,r.Vr)(),[E,D]=(0,l.useState)(null),[I,R]=(0,l.useState)(!0),[U,V]=(0,l.useState)(0),[F,_]=(0,l.useState)(0),[W,Z]=(0,l.useState)(0),[q,G]=(0,l.useState)(0),[J,K]=(0,l.useState)(null),Q=(0,l.useCallback)(async()=>{R(!0);try{let[e,t,a,s,l]=await Promise.all([(0,g.FC)(),(0,g.Z3)().catch(()=>[]),(0,g.lv)().catch(()=>({roles:[],configs:[]})),(0,g.Dl)().catch(()=>({templates:[]})),(0,g.II)().catch(()=>null)]);D(e),V(Array.isArray(t)?t.length:0);let r=Array.isArray(a.roles)?a.roles:[];_(r.filter(e=>"file"===e.type).length),Z(r.filter(e=>"prompt"===e.type).length),G(Array.isArray(s.templates)?s.templates.length:0),K(l)}catch(e){}finally{R(!1)}},[]);(0,l.useEffect)(()=>{Q();let e=setInterval(()=>{Q()},1e4);return()=>clearInterval(e)},[Q]);let X=(null==E?void 0:E.tasks.total)?Math.round(E.tasks.success/E.tasks.total*100):0,Y=null==E||null==(e=E.models)?void 0:e[0],$=(null==E?void 0:E.logs.latestAt)?new Date(E.logs.latestAt).toLocaleString():"暂无日志";return(0,s.jsxs)("div",{className:"space-y-12",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 pb-6 border-b border-[var(--borderColor)]",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2",children:B("overview.title")}),(0,s.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)]",children:B("overview.description")})]}),(0,s.jsxs)(o.A,{children:[(0,s.jsxs)("span",{className:"text-xs font-mono",style:{color:"var(--colorTextTertiary)"},children:["UPDATED: ",$]}),(0,s.jsx)(c.Ay,{type:"text",icon:(0,s.jsx)(i.A,{spin:I}),onClick:()=>{Q()}})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-8 divide-x border-b pb-8 border-[var(--borderColor)] divide-[var(--borderColor)] -mx-4 px-4",children:[(0,s.jsx)(p,{title:"运行时间",value:"".concat(E?Math.floor(E.uptime/3600):0,"h"),icon:(0,s.jsx)(d.A,{size:16}),colorClass:"text-[var(--colorBrand)]",animationClass:"stagger-1"}),(0,s.jsx)(p,{title:B("overview.tokensUsed"),value:(null!=(a=null==E?void 0:E.tokens.total)?a:0).toLocaleString(),subtext:"P ".concat(null!=(f=null==E?void 0:E.tokens.prompt)?f:0," / C ").concat(null!=(j=null==E?void 0:E.tokens.completion)?j:0),icon:(0,s.jsx)(v.A,{size:16}),colorClass:"text-[var(--colorWarn)]",animationClass:"stagger-2"}),(0,s.jsx)(p,{title:B("overview.tasksTotal"),value:(null!=(y=null==E?void 0:E.tasks.total)?y:0).toLocaleString(),subtext:"✓ ".concat(null!=(b=null==E?void 0:E.tasks.success)?b:0," | ✗ ").concat(null!=(A=null==E?void 0:E.tasks.failed)?A:0," | ↻ ").concat(null!=(N=null==E?void 0:E.tasks.running)?N:0),icon:(0,s.jsx)(x.A,{size:16}),colorClass:"text-[var(--colorInfo)]",animationClass:"stagger-3"}),(0,s.jsx)(p,{title:B("overview.successRate"),value:"".concat(X,"%"),icon:X>80?(0,s.jsx)(u.A,{size:16}):(0,s.jsx)(m.A,{size:16}),colorClass:X>80?"text-[var(--colorOk)]":"text-[var(--colorDanger)]",animationClass:"stagger-4"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold mb-6 uppercase tracking-wider text-[var(--colorTextSecondary)] animateFadeIn stagger-5",style:{opacity:0},children:"System Resources"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-y-8 gap-x-4",children:[(0,s.jsx)(p,{title:"文件角色",value:F,animationClass:"stagger-5"}),(0,s.jsx)(p,{title:"提示词角色",value:W,animationClass:"stagger-5"}),(0,s.jsx)(p,{title:"模板数量",value:q,animationClass:"stagger-5"}),(0,s.jsx)(p,{title:"语义模型",value:(null==J?void 0:J.provider)==="openai-compatible"?"External":J?"Local":"—",subtext:null!=(T=null==J?void 0:J.model)?T:"Not Configured",animationClass:"stagger-5"}),(0,s.jsx)(p,{title:"模型供应商",value:U,animationClass:"stagger-5"}),(0,s.jsx)(p,{title:"审计日志",value:null!=(w=null==E?void 0:E.logs.events)?w:0,animationClass:"stagger-5"})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 pt-8 border-t border-[var(--borderColor)] animateFadeIn stagger-5",style:{opacity:0},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-semibold mb-6 uppercase tracking-wider text-[var(--colorTextSecondary)]",children:"Hardware Usage"}),(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-6",children:[(0,s.jsx)(n.A,{type:"dashboard",percent:null!=(k=null==E?void 0:E.cpu.usagePercent)?k:0,size:64,strokeColor:(null!=(C=null==E?void 0:E.cpu.usagePercent)?C:0)>80?"var(--colorDanger)":"var(--colorText)",strokeWidth:10}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium text-[var(--colorTextSecondary)]",children:"CPU Usage"}),(0,s.jsxs)("div",{className:"text-xl font-bold",children:[null!=(z=null==E||null==(t=E.cpu.usagePercent)?void 0:t.toFixed(1))?z:"0.0","%"]}),(0,s.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:[null!=(O=null==E?void 0:E.cpu.cores)?O:0," ",B("overview.cores")]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-6",children:[(0,s.jsx)(n.A,{type:"dashboard",percent:null!=(M=null==E?void 0:E.memory.usagePercent)?M:0,size:64,strokeColor:(null!=(S=null==E?void 0:E.memory.usagePercent)?S:0)>80?"var(--colorDanger)":"var(--colorTextSecondary)",strokeWidth:10}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium text-[var(--colorTextSecondary)]",children:"Memory Usage"}),(0,s.jsxs)("div",{className:"text-xl font-bold",children:[null!=(L=null==E?void 0:E.memory.usagePercent)?L:0,"%"]}),(0,s.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:[null!=(P=null==E?void 0:E.memory.processMB)?P:0," MB / ",null!=(H=null==E?void 0:E.memory.totalMB)?H:0," MB"]})]})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-semibold mb-6 uppercase tracking-wider text-[var(--colorTextSecondary)]",children:"Activity Context"}),(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mb-1",children:"Top Model"}),Y?(0,s.jsxs)("div",{className:"font-semibold flex items-center gap-2",children:[(0,s.jsx)(h.A,{className:"text-[var(--colorTextSecondary)]"})," ",Y.model,(0,s.jsxs)("span",{className:"font-normal text-[var(--colorTextTertiary)] text-sm",children:["@",Y.provider]})]}):(0,s.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:"No data available"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mb-2",children:"Recent Task Types"}),(null==E?void 0:E.tasks.types)&&Object.keys(E.tasks.types).length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(E.tasks.types).sort((e,t)=>t[1]-e[1]).map(e=>{let[t,a]=e;return(0,s.jsxs)("div",{className:"px-2 py-1 rounded text-xs font-mono bg-[var(--colorBgHover)] text-[var(--colorTextSecondary)]",children:[t.slice(0,30)," ",(0,s.jsx)("span",{className:"ml-2 font-bold text-[var(--colorText)]",children:a})]},t)})}):(0,s.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:B("common.noData")})]})]})]})]})]})}},29071:(e,t,a)=>{a.d(t,{A:()=>c});var s=a(97109),l=a(78847),r=a(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}let c=s.forwardRef((e,t)=>s.createElement(r.A,o({},e,{ref:t,icon:l.A})))},31738:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"}},78847:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"}},99811:(e,t,a)=>{a.d(t,{A:()=>c});var s=a(97109),l=a(14995),r=a(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e}).apply(this,arguments)}let c=s.forwardRef((e,t)=>s.createElement(r.A,o({},e,{ref:t,icon:l.A})))}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[958],{63806:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>_});var n=i(65321),l=i(97109),o=i(17807),a=i(25258),r=i(88762),s=i(2256),c=i(38770),d=i(68787),p=i(33442),h=i(85114),x=i(84253),g=i(71102),y=i(384),f=i(11702),m=i(58209),u=i(93051),j=i(81668),v=i(64254),w=i(85855),A=i(75548),b=i(56768),k=i(48321),S=i(6578);let z={knowledge_base:"知识库",generated:"AI生成",uploaded:"上传",external_url:"外部URL"},C={cover:"magenta",reference:"blue",generated:"purple",attachment:"cyan",map:"orange",operator:"geekblue"};function _(){let e=(0,k.Vr)(),{message:t}=o.A.useApp(),[i,_]=(0,l.useState)([]),[I,R]=(0,l.useState)(new Set),[N,T]=(0,l.useState)(!0),[E,F]=(0,l.useState)(""),P=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E;try{_((await (0,S.f$)(e||void 0)).assets)}catch(e){_([])}};(0,l.useEffect)(()=>{let e=!1;return T(!0),(0,S.dx)().then(t=>{var i,n,l;if(e)return;let o=(null==(i=t.find(e=>e.selected))?void 0:i.projectRoot)||(null==(n=t.find(e=>e.isCurrent))?void 0:n.projectRoot)||(null==(l=t[0])?void 0:l.projectRoot)||"";return F(o),P(o)}).finally(()=>{e||T(!1)}),()=>{e=!0}},[]);let B=async e=>{var i;e&&(await (null==(i=navigator.clipboard)?void 0:i.writeText(e)),t.success("已复制路径"))},D=async(e,i)=>{try{"openFile"===i?await (0,S.oS)(e,"file",E||void 0):"openDirectory"===i?await (0,S.oS)(e,"directory",E||void 0):"delete"===i&&(_((await (0,S.JU)(e,E||void 0)).assets),R(t=>{let i=new Set(t);return i.delete(e),i}))}catch(e){t.error(e instanceof Error?e.message:"操作失败")}},W=n=>{let l="selected"===n?[...I]:i.map(e=>e.id);0!==l.length&&a.A.confirm({title:"all"===n?"删除全部资源?":"删除已选 ".concat(l.length," 个资源?"),content:"此操作不可撤销。",okText:e("common.confirm"),cancelText:e("common.cancel"),okButtonProps:{danger:!0},onOk:async()=>{T(!0);try{await Promise.all(l.map(e=>(0,S.JU)(e,E||void 0))),await P(),R(new Set),t.success("已删除 ".concat(l.length," 个资源"))}catch(e){t.error("批量删除失败")}finally{T(!1)}}})},O=e=>{R(t=>{let i=new Set(t);return i.has(e)?i.delete(e):i.add(e),i})};return N?(0,n.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,n.jsx)(r.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,n.jsx)(s.A,{gutter:[12,12],children:Array.from({length:6}).map((e,t)=>(0,n.jsx)(c.A,{xs:24,sm:12,md:8,xl:6,children:(0,n.jsx)(d.A,{size:"small",children:(0,n.jsx)(r.A,{active:!0,paragraph:{rows:3}})})},t))})]}):(0,n.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"pageTitle",children:e("nav.assetLibrary")}),(0,n.jsx)("p",{className:"pageDesc",children:"管理模板运行生成的文档、图片和附件。生成结果仅保存在生成资源中,不进入知识库。"})]}),(0,n.jsxs)(p.A,{size:8,children:[(0,n.jsxs)("span",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:["共 ",i.length," 个资源"]}),(0,n.jsxs)(h.Ay,{danger:!0,size:"small",disabled:0===I.size,icon:(0,n.jsx)(m.A,{}),onClick:()=>W("selected"),children:["删除已选 ",I.size||""]}),(0,n.jsx)(h.Ay,{danger:!0,size:"small",disabled:0===i.length,onClick:()=>W("all"),children:"删除全部"})]})]}),0===i.length?(0,n.jsx)(x.A,{description:"暂无生成资源"}):(0,n.jsx)(s.A,{gutter:[12,12],children:i.map((t,i)=>{let l="image"===t.type&&t.path?"/api/assets/generated/preview?id=".concat(encodeURIComponent(t.id)).concat(E?"&projectRoot=".concat(encodeURIComponent(E)):""):void 0,o=I.has(t.id),a=[...t.path?[{key:"copy",icon:(0,n.jsx)(u.A,{}),label:"复制路径",onClick:()=>{B(t.path)}}]:[],...t.path?[{key:"open",icon:(0,n.jsx)(j.A,{}),label:"打开文件",onClick:()=>{D(t.id,"openFile")}}]:[],...t.path?[{key:"folder",icon:(0,n.jsx)(v.A,{}),label:"打开目录",onClick:()=>{D(t.id,"openDirectory")}}]:[],{type:"divider"},{key:"delete",icon:(0,n.jsx)(m.A,{}),label:e("common.delete"),danger:!0,onClick:()=>{D(t.id,"delete")}}];return(0,n.jsx)(c.A,{xs:24,sm:12,md:8,xl:6,children:(0,n.jsxs)(d.A,{size:"small",hoverable:!0,styles:{body:{padding:12}},style:{border:o?"2px solid #1677ff":void 0,cursor:"pointer",position:"relative"},onClick:()=>O(t.id),children:[(0,n.jsx)("div",{onClick:e=>{e.stopPropagation(),O(t.id)},style:{position:"absolute",top:8,left:8,zIndex:2,width:22,height:22,borderRadius:5,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.15s",background:o?"#1677ff":"rgba(0,0,0,0.6)",color:"#fff",fontSize:12,fontWeight:700},children:o?"✓":""}),(0,n.jsx)(g.A,{menu:{items:a},trigger:["click"],placement:"bottomRight",children:(0,n.jsx)(h.Ay,{type:"text",size:"small",icon:(0,n.jsx)(w.A,{}),style:{position:"absolute",top:6,right:6,zIndex:2,width:24,height:24,padding:0,background:"var(--colorBgContainer)",borderRadius:6,boxShadow:"0 1px 3px rgba(0,0,0,0.08)"},onClick:e=>e.stopPropagation()})}),l&&(0,n.jsx)("div",{style:{margin:"-12px -12px 10px -12px",borderRadius:"10px 10px 0 0",overflow:"hidden",height:140,display:"flex",alignItems:"center",justifyContent:"center",background:"var(--colorFillAlter)"},children:(0,n.jsx)(y.A,{src:l,alt:t.name,style:{width:"100%",height:"100%",objectFit:"cover"},onClick:e=>e.stopPropagation()})}),(0,n.jsx)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:6},children:(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0,flex:1},children:[!l&&("image"===t.type?(0,n.jsx)(A.A,{style:{color:"var(--colorWarning)",fontSize:15,flexShrink:0}}):(0,n.jsx)(b.A,{style:{color:"var(--colorAccent)",fontSize:15,flexShrink:0}})),(0,n.jsx)("span",{style:{fontWeight:600,fontSize:13,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.name})]})}),(0,n.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:8},children:[(0,n.jsx)(f.A,{color:C[t.role]||"blue",style:{margin:0,fontSize:10,lineHeight:"16px"},children:t.role}),(0,n.jsx)(f.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:t.type})]}),(0,n.jsxs)("div",{style:{fontSize:12,color:"var(--colorTextSecondary)",lineHeight:1.5,marginBottom:6},children:[t.path&&(0,n.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"monospace",fontSize:11},children:t.path}),(0,n.jsxs)("div",{children:[z[t.source]||t.source," \xb7 ",t.usedByDocumentIds.length," 个文档 \xb7 ",new Date(t.updatedAt).toLocaleDateString()]})]})]})},t.id)})})]})}},85015:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/asset-library",function(){return i(63806)}])}},e=>{e.O(0,[433,787,102,767,636,593,792],()=>e(e.s=85015)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[298],{16403:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/documents",function(){return r(19562)}])},19562:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ed});var l=r(65321),s=r(97109),n=r(7576),a=r(35292),o=r(33442),i=r(11702),c=r(17807),d=r(63455),u=r(88762),p=r(85114),m=r(68787),h=r(84253),x=r(38332),g=r(26171),f=r(34052),v=r(42700),j=r(58569),y=r(2256),w=r(38770),A=r(76506),b=r(57271),S=r(49604),k=r(85493),I=r(23216),C=r(26619),T=r(8263),z=r(16285),R=r(8579),E=r(75548),B=r(7851),M=r(84742),N=r(29071),_=r(63552),F=r(26631),D=r(7225),P=r(83914),L=r(58209),W=r(54746),G=r(71330),O=r(64068),H=r(93051),q=r(38762),K=r(64629),V=r(67547),U=r(76830),X=r(1310),Q=r(6578),J=r(48321);let{TextArea:Y}=n.A,{Text:Z}=a.A;function $(e){let{type:t="info",title:r,children:s,style:n}=e,a="error"===t?"var(--colorError)":"warning"===t?"var(--colorWarning)":"success"===t?"var(--colorSuccess)":"var(--colorInfo)";return(0,l.jsxs)("div",{style:{border:"1px solid ".concat(a),background:"error"===t?"var(--colorErrorBg)":"warning"===t?"var(--colorWarningBg)":"success"===t?"var(--colorSuccessBg)":"var(--colorInfoBg)",borderRadius:8,padding:"9px 12px",...n},children:[(0,l.jsx)(Z,{strong:!0,style:{color:a},children:r}),s&&(0,l.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:s})]})}function ee(e){let{children:t,gap:r=12,style:s}=e;return(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:r,...s},children:t})}let et=null;function er(){null==et||et.listeners.forEach(e=>e())}let el={role_binding:(0,l.jsx)(I.A,{}),knowledge_retrieval:(0,l.jsx)(C.A,{}),file_understanding:(0,l.jsx)(T.A,{}),fact_extraction:(0,l.jsx)(z.A,{}),chapter_generation:(0,l.jsx)(R.A,{}),asset_generation:(0,l.jsx)(E.A,{}),validation:(0,l.jsx)(B.A,{}),formatting:(0,l.jsx)(M.A,{}),llm_review:(0,l.jsx)(N.A,{}),export_ready:(0,l.jsx)(_.A,{}),reference:(0,l.jsx)(E.A,{})},es={施工组织设计:(0,l.jsx)(B.A,{}),投标文件:(0,l.jsx)(_.A,{}),技术方案:(0,l.jsx)(z.A,{}),报告:(0,l.jsx)(F.A,{}),自定义:(0,l.jsx)(R.A,{})};function en(e){return[...new Set(e.map(e=>e.trim()).filter(Boolean))]}function ea(e){return e?e.split(/[\\/]/u).pop()||e:""}function eo(e){let t=[],r=e=>{for(let l of e)l.isFolder?l.children&&r(l.children):t.push(l.key)};return r(e),t}let ei={role_binding:"角色配置绑定",knowledge_retrieval:"知识库检索",file_understanding:"多模态文件理解",fact_extraction:"LLM 事实抽取",chapter_generation:"LLM 章节生成",asset_generation:"多模态资源生成",validation:"规则校验",formatting:"格式化排版",llm_review:"LLM 审查优化",export_ready:"导出就绪",reference:"参考资源处理"},ec={"knowledge-base":"知识库","document-readiness":"生成准备度检查","quality-repair":"质量补写","export-gate":"导出门禁","context-memory":"项目上下文","final-format":"正式排版","multimodal-files":"多模态文件理解",tender_announcement:"招标公告"};function ed(){var e,t,r,a,E;let ed=(0,J.Vr)(),{message:eu}=c.A.useApp(),[ep]=d.A.useForm(),em=(0,s.useRef)(null),[eh,ex]=(0,s.useState)([]),[eg,ef]=(0,s.useState)("construction-organization-design"),[ev,ej]=(0,s.useState)([]),[ey,ew]=(0,s.useState)([]),[eA,eb]=(0,s.useState)([]),[eS,ek]=(0,s.useState)([]),[eI,eC]=(0,s.useState)(!1),[eT,ez]=(0,s.useState)(""),[eR,eE]=(0,s.useState)(),[eB,eM]=(0,s.useState)([]),[eN,e_]=(0,s.useState)(!0),[eF,eD]=(0,s.useState)(!1),[eP,eL]=(0,s.useState)(null),[eW,eG]=(0,s.useState)(""),[eO,eH]=(0,s.useState)([]),[eq,eK]=(0,s.useState)(null),[eV,eU]=(0,s.useState)(null),[eX,eQ]=(0,s.useState)(""),[eJ,eY]=(0,s.useState)(!1),[eZ,e$]=(0,s.useState)("idle"),[e0,e1]=(0,s.useState)(null),[e2,e6]=(0,s.useState)(null),[e8,e4]=(0,s.useState)({start:0,end:0}),[e3,e5]=(0,s.useState)([]),[e7,e9]=(0,s.useState)(!1),[te,tt]=(0,s.useState)(!1),[tr,tl]=(0,s.useState)({}),ts=d.A.useWatch("projectRoleConfigId",ep),tn=(0,s.useMemo)(()=>ey.find(e=>e.id===ts),[ey,ts]),ta=(0,s.useMemo)(()=>new Set(((null==tn?void 0:tn.fileRoles)||[]).map(e=>e.roleId)),[tn]),to=(0,s.useMemo)(()=>ev.filter(e=>"file"===e.type&&(!ts||ta.has(e.id))).map(e=>({label:e.name,value:e.id})),[ev,ta,ts]),ti=(0,s.useMemo)(()=>to.find(e=>e.value===eR)||to[0],[eR,to]),tc=d.A.useWatch("fileBindingGroups",ep)||{},td=(0,s.useMemo)(()=>(function(e){let t={};for(let s of[...e].sort((e,t)=>e.relativePath.localeCompare(t.relativePath,"zh-CN"))){let e=s.relativePath.split("/").filter(Boolean),n="";for(let a=0;a<e.length;a++){let i=e[a],c=n;n=n?"".concat(n,"/").concat(i):i;let d=a===e.length-1;if(!t[n]){var r;t[n]={key:n,rawTitle:i,title:d?(0,l.jsx)("span",{title:s.relativePath,children:i}):(0,l.jsxs)(o.A,{size:4,children:[(0,l.jsx)(D.A,{style:{color:"#faad14"}}),(0,l.jsx)("span",{children:i})]}),isFolder:!d,fileCount:+!!d,...d?{}:{children:[]}},c&&(null==(r=t[c])?void 0:r.children)&&t[c].children.push(t[n])}d&&(t[n].fileCount=1)}}let s=e=>{for(let r of e){var t;(null==(t=r.children)?void 0:t.length)&&(s(r.children),r.fileCount=r.children.reduce((e,t)=>e+t.fileCount,0),r.title=(0,l.jsxs)(o.A,{size:4,children:[(0,l.jsx)(D.A,{style:{color:"#faad14"}}),(0,l.jsx)("span",{children:r.rawTitle}),(0,l.jsx)(i.A,{style:{margin:0},children:r.fileCount})]}))}},n=Object.values(t).filter(e=>!e.key.includes("/"));return s(n),n.filter(e=>!e.isFolder||e.fileCount>0)})(eS),[eS]),tu=(0,s.useMemo)(()=>(function e(t,r){let l=r.trim().toLowerCase();return l?t.flatMap(t=>{let r=t.children?e(t.children,l):void 0;return t.key.toLowerCase().includes(l)||t.rawTitle.toLowerCase().includes(l)||(null==r?void 0:r.length)?[{...t,children:r}]:[]}):t})(td,eT),[td,eT]),tp=(0,s.useMemo)(()=>eo(td),[td]),tm=(0,s.useMemo)(()=>{var e,t,r;return(null==(e=eA.find(e=>e.selected))?void 0:e.projectRoot)||(null==(t=eA.find(e=>e.isCurrent))?void 0:t.projectRoot)||(null==(r=eA[0])?void 0:r.projectRoot)||""},[eA]),th=(0,s.useMemo)(()=>{let e=[],t=r=>{for(let l of r)e.push(l.key),l.children&&t(l.children)};return t(td),e},[td]);(0,s.useEffect)(()=>{if(!te||!ts)return;let e=ep.getFieldValue("fileBindingGroups")||{},t=Object.fromEntries(Object.entries(e).filter(e=>{let[t]=e;return ta.has(t)}));Object.keys(t).length!==Object.keys(e).length&&ep.setFieldValue("fileBindingGroups",t)},[ep,ta,ts,te]),(0,s.useEffect)(()=>{if(te){if(0===to.length)return void eE(void 0);eR&&to.some(e=>e.value===eR)||eE(to[0].value)}},[eR,to,te]);let[tx,tg]=(0,s.useState)([]),[tf,tv]=(0,s.useState)(null),[tj,ty]=(0,s.useState)(null),[tw,tA]=(0,s.useState)("templates"),[tb,tS]=(0,s.useState)(!1),[tk,tI]=(0,s.useState)("workflow"),tC=(0,s.useRef)(null),tT=(0,s.useRef)(null),tz=(0,s.useRef)(0),tR=(0,s.useMemo)(()=>"activeGenDocId:".concat(tm||"default"),[tm]),tE=async()=>{try{eH((await (0,Q.cQ)(tm||void 0)).documents)}catch(e){eH([])}};(0,s.useEffect)(()=>{let e=()=>{et&&(tg(et.flowSteps),tv(et.activeFlowKey),eD(et.loading),et.documentId&&eK(et.documentId),et.draft&&eL(et.draft),void 0!==et.content&&eG(et.content))},t=et;return null==t||t.listeners.add(e),e(),()=>{null==t||t.listeners.delete(e)}},[]),(0,s.useEffect)(()=>{e_(!0),Promise.all([(0,Q.Dl)().then(e=>{var t,r;ex(e.templates),ef(null!=(r=null==(t=e.templates[0])?void 0:t.id)?r:"construction-organization-design")}),(0,Q.lv)().then(e=>{ej(e.roles),ew(e.configs)}),(0,Q.dx)().then(e=>eb(e))]).catch(()=>eu.error(ed("common.error"))).finally(()=>e_(!1))},[eu,ed]),(0,s.useEffect)(()=>{tm&&(localStorage.removeItem("activeGenDocId"),tE())},[tm]),(0,s.useEffect)(()=>{if(0===eO.length)return;let e=localStorage.getItem(tR);if(!e)return;if(!eO.find(t=>t.id===e&&"generating"===t.status))return void localStorage.removeItem(tR);let t=setInterval(()=>{(async()=>{try{let{document:r}=await (0,Q.v7)(e,!1,tm||void 0);await tE(),"generating"!==r.status&&(localStorage.removeItem(tR),clearInterval(t))}catch(e){clearInterval(t)}})()},3e3);return()=>clearInterval(t)},[eO]);let tB=(0,s.useMemo)(()=>eh.find(e=>e.id===eg),[eh,eg]),tM=ey.map(e=>({label:e.name,value:e.id})),tN=Math.max(0,tx.findIndex(e=>e.key===tf)),t_=e=>{var t;return e?(null==(t=ev.find(t=>t.id===e))?void 0:t.name)||ec[e]||"未知角色":""},tF=e=>e.subtitle||e.roleName||t_(e.roleId)||ei[e.type]||e.type,tD=e=>{var t,r,l;return e.promptName||((t=e.promptId)?(null==(r=eA.find(e=>e.id===t))?void 0:r.projectName)||(null==(l=ev.find(e=>e.id===t))?void 0:l.name)||ec[t]||"未知提示词":"")},tP=()=>{tz.current+=1,eQ(""),e1(null),e6(null),e5([]),e9(!1),eY(!1),e$("idle")},tL=e=>{ef(e),eK(null),eL(null),eG(""),tP(),tI("workflow"),tS(!0),tA("drafts")},tW=async e=>{eK(e.id),ef(e.templateId);let t=tG(e.status);if(t||"failed"===e.status||"aborted"===e.status){tP(),ty(e),eL(null),eG(""),eD(t),tI("workflow"),tS(!0);try{let{document:t}=await (0,Q.v7)(e.id,!1,e.projectRoot||tm||void 0);tq(t),tG(t.status)?tK(t.id,t.projectRoot||e.projectRoot||tm||void 0):await tE()}catch(t){tq(e)}return}tI("editor"),tg([]),tv(null),tP();try{let{document:t}=await (0,Q.v7)(e.id,!1,e.projectRoot||tm||void 0);eL(t.draft||null),eG(t.editedMarkdown||t.markdown)}catch(e){eu.error(ed("common.error"))}tS(!0)},tG=e=>"completed"!==e&&"warning"!==e&&"failed"!==e&&"aborted"!==e,tO=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eF;(null==et?void 0:et.loading)&&(et.flowSteps=e,et.activeFlowKey=t,et.loading=r,er())},tH=e=>{var t,r,s,n,a;let o=e.executionStages||(null==(t=e.draft)?void 0:t.executionStages)||[];if(o.length>0){let t=o.map((t,r)=>{var s;let n,a=("failed"===e.status||"aborted"===e.status)&&"running"===t.status||"failed"===(n=t.status)?"error":"running"===n?"process":"fallback"===n?"warning":"finish";return{key:"".concat(t.type,"-").concat(r),title:t.title||ei[t.type]||t.type,subtitle:tF(t),description:t.message||"",status:a,icon:"role_binding"===(s=t.type)?(0,l.jsx)(I.A,{}):"knowledge_retrieval"===s?(0,l.jsx)(C.A,{}):"file_understanding"===s?(0,l.jsx)(T.A,{}):"fact_extraction"===s?(0,l.jsx)(z.A,{}):"chapter_generation"===s?(0,l.jsx)(R.A,{}):"llm_review"===s?(0,l.jsx)(N.A,{}):"validation"===s?(0,l.jsx)(B.A,{}):"formatting"===s?(0,l.jsx)(M.A,{}):"export_ready"===s?(0,l.jsx)(_.A,{}):(0,l.jsx)(F.A,{}),subSteps:((e,t,r)=>{let l=Array.isArray(e.details)?e.details.filter(Boolean):[],s=e.progress?"".concat(e.progress.label||"进度",":").concat(e.progress.current,"/").concat(e.progress.total):"",n=[...s?[s]:[],...l];return 0===n.length?[{key:"stage-".concat(r),title:tD(e)?"提示词:".concat(tD(e)):tF(e),status:t}]:n.slice(0,8).map((e,l)=>({key:"stage-".concat(r,"-").concat(l),title:e,status:"process"===t&&0===l?"process":"error"===t&&0===l?"error":"warning"===t?"warning":"process"===t?"finish":t}))})(t,a,r)}});"generating"===e.status&&t.length>0&&(null==(r=t.at(-1))?void 0:r.status)==="finish"&&(t[t.length-1]={...t[t.length-1],status:"process"});let i="generating"===e.status?(null==(s=t.at(-1))?void 0:s.key)||"prepare":"failed"===e.status||"aborted"===e.status?(null==(n=t.find(e=>"error"===e.status))?void 0:n.key)||(null==(a=t.at(-1))?void 0:a.key)||"prepare":"done";return{steps:t,activeKey:i}}return{steps:[],activeKey:null}},tq=e=>{ty(e);let{steps:t,activeKey:r}=tH(e);tg(t),tv(r),eD(tG(e.status)),tO(t,r,tG(e.status)),("failed"===e.status||"aborted"===e.status)&&tI("workflow"),("completed"===e.status||"warning"===e.status)&&e.draft&&(eL(e.draft),eG(e.editedMarkdown||e.markdown),tI("editor"),tg([]),tv(null))},tK=(e,t)=>{tC.current&&clearInterval(tC.current),tC.current=setInterval(()=>{(async()=>{try{let{document:r}=await (0,Q.v7)(e,!0,t||tm||void 0);tq(r),await tE(),tG(r.status)||(tC.current&&clearInterval(tC.current),tC.current=null,localStorage.removeItem(tR))}catch(e){}})()},2e3)};(0,s.useEffect)(()=>()=>{tC.current&&(clearInterval(tC.current),tC.current=null),tT.current&&(clearTimeout(tT.current),tT.current=null)},[]),(0,s.useEffect)(()=>{if(!eF||!tf)return;let e=window.setInterval(()=>tg(e=>{let t=e.map(e=>{if(e.key!==tf||"process"!==e.status)return e;let t=e.subSteps.findIndex(e=>"process"===e.status),r=t<0?0:Math.min(t+1,e.subSteps.length-1);return{...e,subSteps:e.subSteps.map((e,t)=>t<r?{...e,status:"finish"}:t===r?{...e,status:"process"}:{...e,status:"wait"})}});return tO(t,tf),t}),1400);return()=>window.clearInterval(e)},[tf,eF]);let tV=async()=>{eC(!0);try{let e=await (0,Q.HT)({limit:5e3,projectRoot:tm||void 0});ek(e.files)}catch(e){eu.error("知识库文件加载失败")}finally{eC(!1)}},tU=e=>{var t,r,l;let s=null!=e?e:{id:"tpl-".concat(Date.now()),name:"",description:"",category:"自定义",outputTitle:"",projectRoleConfigId:void 0,chapters:[],fileBindings:[]};ep.resetFields(),ep.setFieldsValue({...s,fileBindingGroups:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce((e,t)=>(t.roleId&&t.filePath&&(e[t.roleId]=en([...e[t.roleId]||[],t.filePath])),e),{})}(s.fileBindings)}),eE(null==(l=ey.find(e=>e.id===s.projectRoleConfigId))||null==(r=l.fileRoles)||null==(t=r[0])?void 0:t.roleId),ez(""),tV(),tt(!0)},tX=(e,t)=>{let r=ep.getFieldValue("fileBindingGroups")||{};ep.setFieldValue("fileBindingGroups",{...r,[e]:en(t)})},tQ=async()=>{try{var e;await ep.validateFields();let t=ep.getFieldsValue(!0),r=new Set(((null==(e=ey.find(e=>e.id===t.projectRoleConfigId))?void 0:e.fileRoles)||[]).map(e=>e.roleId)),l=t.fileBindingGroups||{},s=Object.entries(l).filter(e=>{let[t]=e;return 0===r.size||r.has(t)}).flatMap(e=>{let[t,r]=e;return en(r||[]).map(e=>({roleId:t,filePath:e}))}),{fileBindingGroups:n,...a}=t,o={...a,chapters:[],fileBindings:s},i=await (0,Q.l2)(o);ex(i.templates),ef(i.template.id),tt(!1),await tE(),eu.success(ed("common.success"))}catch(e){e instanceof Error&&eu.error(e.message)}},tJ=async e=>{try{let t=await (0,Q.bV)(e);ex(t.templates),ef(t.template.id),eu.success(ed("common.success"))}catch(e){eu.error(ed("common.error"))}},tY=async e=>{try{var t,r;let l=await (0,Q.h0)(e);ex(l.templates),ef(null!=(r=null==(t=l.templates[0])?void 0:t.id)?r:""),eu.success(ed("common.success"))}catch(e){eu.error(ed("common.error"))}},tZ=async e=>{try{let{validation:t}=await (0,Q.SM)(e,tm||void 0);tl(r=>({...r,[e]:t}));let r=t.issues.filter(e=>"error"===e.level);if(ef(e),r.length>0)return void eu.warning("模板运行前检查未通过,请先处理阻断项");if(t.issues.length>0)return void eu.warning("模板存在警告,可在检查面板确认后继续运行");tL(e)}catch(e){eu.error(e instanceof Error?e.message:"模板运行前检查失败")}},t$=async e=>{try{await (0,Q.QG)(e.id,e.projectRoot||tm||void 0),eq===e.id&&(eK(null),eL(null),eG("")),await tE(),eu.success(ed("common.success"))}catch(e){eu.error(ed("common.error"))}},t0=async(e,t)=>{let r=Date.now(),l=0,s=Date.now();for(;;){let n;if(null==t?void 0:t.aborted)throw Error("用户中止");let a=new AbortController;t&&(t.pollController=a);try{({document:n}=await (0,Q.v7)(e,!0,tm||void 0,a.signal))}finally{(null==t?void 0:t.pollController)===a&&(t.pollController=void 0)}if(tq(n),n.updatedAt!==l&&(l=n.updatedAt,s=Date.now()),("completed"===n.status||"warning"===n.status)&&n.draft)return n;if("failed"===n.status||"aborted"===n.status)throw Error(n.error||("aborted"===n.status?"生成已中止":"生成失败"));if(Date.now()-r>75e5||Date.now()-s>96e4)throw Error("生成任务疑似卡住,请点击继续生成或重新生成");await new Promise(e=>window.setTimeout(e,1500))}},t1=async()=>{if(!eg)return;if((null==et?void 0:et.aborted)&&(et=null),null==et?void 0:et.loading){tg(et.flowSteps),tv(et.activeFlowKey),eD(!0);return}if(!tm)return void eu.error("未识别当前项目,请先选择或打开项目后再生成文件");eD(!0);let e=(0,Q.OX)({templateId:eg,projectRoot:tm});et={id:Date.now(),templateId:eg,loading:!0,flowSteps:[],activeFlowKey:null,promise:e,listeners:new Set},tg([]),tv(null);let t=[];try{let r=await e;r.documentId&&(localStorage.setItem(tR,r.documentId),eK(r.documentId),(null==et?void 0:et.promise)===e&&(et.documentId=r.documentId)),await tE();let l=r.documentId?await t0(r.documentId,(null==et?void 0:et.promise)===e?et:void 0):void 0,s=r.draft||(null==l?void 0:l.draft);if(!s)throw Error("生成结果为空");(r.documentId||(null==l?void 0:l.id))&&eK(r.documentId||l.id),t.forEach(e=>window.clearTimeout(e)),eL(s),eG((null==l?void 0:l.editedMarkdown)||(null==l?void 0:l.markdown)||s.markdown),(null==et?void 0:et.promise)===e&&(et.draft=s,et.content=(null==l?void 0:l.editedMarkdown)||(null==l?void 0:l.markdown)||s.markdown);let n=l||{id:r.documentId||"draft-".concat(Date.now()),templateId:eg,title:s.title,requirement:s.requirement,projectRoot:s.projectRoot||tm,projectId:s.projectId,markdown:s.markdown,status:s.validationIssues.some(e=>"error"===e.level||"warning"===e.level)||!s.exportGate.passed?"warning":"completed",draft:s,executionStages:s.executionStages,assets:s.assets||[],createdAt:s.generatedAt,updatedAt:Date.now()},{steps:a}=tH(n);tg(a),tO(a,"done",!1),tv("done"),(null==et?void 0:et.promise)===e&&(et.activeFlowKey="done",et.loading=!1,er(),et=null),localStorage.removeItem(tR),await tE(),eu.success(ed("common.success")),window.setTimeout(()=>{var e;return null==(e=em.current)?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},200)}catch(l){localStorage.removeItem(tR);let t=l instanceof Error?l.message:ed("common.error"),r=/用户中止|abort|aborted/i.test(t);r||tg(e=>{let r=e.map(e=>"process"===e.status?{...e,status:"error",description:t,subSteps:((e,t)=>{if("wait"===t)return e.subSteps.map(e=>({...e,status:"wait"}));if("finish"===t)return e.subSteps.map(e=>({...e,status:"finish"}));if("error"===t)return e.subSteps.map((e,t)=>({...e,status:0===t?"error":e.status}));let r=e.subSteps.findIndex(e=>"wait"===e.status);return e.subSteps.map((e,t)=>t<r||-1===r?{...e,status:"finish"}:t===r?{...e,status:"process"}:e)})(e,"error")}:e);return tO(r,tf,!1),r}),(null==et?void 0:et.promise)===e&&(et.loading=!1,et.error=t,er(),et=null),await tE().catch(()=>void 0),r||eu.error(t)}finally{t.forEach(e=>window.clearTimeout(e)),eD(!1),(null==et?void 0:et.promise)===e&&(et.loading=!1,er())}},t2=(0,s.useRef)(!1);(0,s.useEffect)(()=>(tT.current&&(clearTimeout(tT.current),tT.current=null),!tb||"workflow"!==tk||eq||t2.current||(null==et?void 0:et.loading)||null==tB||!tB.projectRoleConfigId||(t2.current=!0,tT.current=setTimeout(()=>{tT.current=null,tb&&"workflow"===tk&&!eq&&eg==eg&&t1()},300)),tb||(t2.current=!1),()=>{tT.current&&(clearTimeout(tT.current),tT.current=null)}),[tb,tk,eq,tB,eg]);let t6=async e=>{try{eK(e.id),ef(e.templateId),tI("workflow"),tS(!0),eD(!0);let t=await (0,Q.UQ)(e.id,e.projectRoot||tm||void 0);localStorage.setItem(tR,t.documentId),await tE();let r=await t0(t.documentId);r.draft&&(eL(r.draft),eG(r.editedMarkdown||r.markdown||r.draft.markdown),tI("editor")),localStorage.removeItem(tR),await tE(),eu.success("已继续生成并完成")}catch(e){eu.error(e instanceof Error?e.message:"继续生成失败")}finally{eD(!1)}},t8=async e=>{if((null==et?void 0:et.loading)&&et.documentId===e.id){var t;et.aborted=!0,null==(t=et.pollController)||t.abort(),et.loading=!1,et.error="用户中止",er(),et=null,eD(!1)}localStorage.removeItem(tR),tC.current&&(clearInterval(tC.current),tC.current=null);try{await (0,Q.r)(e.id,e.projectRoot||tm||void 0),eu.success("已中止生成任务")}catch(e){eu.info("任务已不在运行,已刷新状态")}finally{await tE(),eq===e.id&&(eK(null),ty(null),eL(null),eG(""))}},t4=async e=>{if(eP){eU(e);try{eP.exportGate.passed||eu.warning("导出门禁存在风险项,已允许导出,请下载后人工复核。");let t={documentId:eq||void 0,title:eP.title,markdown:eW,format:e,enforceGate:!1,exportGate:eP.exportGate,useClientMarkdown:!0,projectRoot:eP.projectRoot||tm||void 0},r=await (0,Q.UE)(t);((e,t,r)=>{let l=new Blob([e],{type:r}),s=URL.createObjectURL(l),n=document.createElement("a");n.href=s,n.download=t,n.target="_self",n.rel="noopener",n.style.display="none",document.body.appendChild(n),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),n.remove(),window.setTimeout(()=>URL.revokeObjectURL(s),1e3)})(r,"".concat(eP.title,".").concat("markdown"===e?"md":e),{markdown:"text/markdown;charset=utf-8",html:"text/html;charset=utf-8",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}[e])}catch(e){eu.error(e instanceof Error?e.message:ed("common.error"))}finally{eU(null)}}},t3=async()=>{if(eP)try{if(eq)await (0,Q.a6)(eq,{editedMarkdown:eW,markdown:eW},eP.projectRoot||tm||void 0);else{let e=await (0,Q.Af)({...eP,markdown:eW});eL(e.draft)}await tE(),eu.success(ed("common.success"))}catch(e){eu.error(ed("common.error"))}},t5=(e,t)=>{e5(r=>[{id:"".concat(Date.now()),content:e,prompt:t,createdAt:Date.now()},...r].slice(0,12))},t7=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&eQ(""),e1(null),e6(null),e4({start:0,end:0})},t9=(e,t)=>{var r,l;return{title:(null==eP?void 0:eP.title)||"未命名文档",markdown:t,instruction:e,facts:null==eP||null==(r=eP.structuredFacts)?void 0:r.map(e=>"".concat(e.key,": ").concat(e.value)),chapters:null==eP||null==(l=eP.chapters)?void 0:l.map(e=>e.title),...(()=>{let e=e8.start,t=e8.end;return t>e?{selection:{start:e,end:t,text:eW.slice(e,t)},cursorOffset:e}:{cursorOffset:e}})()}},re=async()=>{let e=eX.trim();if(!eP||!e||eJ)return;let t=tz.current+1;tz.current=t,eY(!0),e$("planning"),e6(null);try{let r=await (0,Q.Gi)({mode:"plan",...t9(e,eW)});if(tz.current!==t||eq!=eq)return;if(!r.plan)throw Error("AI 未返回修改计划");e1(r.plan)}catch(e){tz.current===t&&eu.error(e instanceof Error?e.message:ed("common.error"))}finally{tz.current===t&&(eY(!1),e$("idle"))}},rt=async e=>{let t=eX.trim();if(!eP||!t||eJ)return;let r=tz.current+1;tz.current=r,eY(!0),e$("applying");try{let l=await (0,Q.Gi)({mode:"apply",...t9(t,eW),plan:e});if(tz.current!==r||eq!=eq)return;if(!l.markdown)throw Error("AI 未返回修改结果");e6({plan:l.plan||e,markdown:l.markdown,beforeSnippet:l.beforeSnippet,afterSnippet:l.afterSnippet,summary:l.summary,changedChars:l.changedChars,prompt:t,before:eW})}catch(e){tz.current===r&&eu.error(e instanceof Error?e.message:ed("common.error"))}finally{tz.current===r&&(eY(!1),e$("idle"))}};if(eN)return(0,l.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,l.jsx)(u.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,l.jsx)(u.A,{active:!0,paragraph:{rows:2}}),(0,l.jsx)(u.A,{active:!0,paragraph:{rows:8}})]});let rr="workflow"===tk?"工作流:".concat((null==tB?void 0:tB.name)||"选择模板"):"编辑:".concat((null==eP?void 0:eP.title)||(null==tB?void 0:tB.outputTitle)||"文档");return(0,l.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"pageTitle",children:ed("documents.title")}),(0,l.jsx)("p",{className:"pageDesc",children:ed("documents.description")})]}),(0,l.jsx)(p.Ay,{type:"primary",icon:(0,l.jsx)(W.A,{}),onClick:()=>tU(),children:ed("documents.newTemplate")})]}),(0,l.jsx)(m.A,{size:"small",tabList:[{key:"templates",label:"模板库 (".concat(eh.length,")")},{key:"drafts",label:"生成记录 (".concat(eO.length,")")}],activeTabKey:tw,onTabChange:tA,children:"templates"===tw?0===eh.length?(0,l.jsx)(h.A,{description:ed("common.noData")}):(0,l.jsx)(x.A,{dataSource:eh,renderItem:e=>{var t,r;return(0,l.jsx)(x.A.Item,{style:{cursor:"pointer",padding:"10px 0"},actions:[(0,l.jsx)(p.Ay,{size:"small",icon:(0,l.jsx)(G.A,{}),onClick:t=>{t.stopPropagation(),tU(e)},children:"配置"},"cfg"),(0,l.jsx)(p.Ay,{size:"small",type:"primary",icon:(0,l.jsx)(O.A,{}),onClick:t=>{t.stopPropagation(),tZ(e.id)},children:"运行"},"run"),(0,l.jsx)(p.Ay,{size:"small",icon:(0,l.jsx)(H.A,{}),onClick:t=>{t.stopPropagation(),tJ(e.id)}},"copy"),(0,l.jsx)(g.A,{title:ed("documents.deleteTemplateConfirm"),onConfirm:t=>{null==t||t.stopPropagation(),tY(e.id)},children:(0,l.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,l.jsx)(L.A,{}),onClick:e=>e.stopPropagation()})},"del")],onClick:()=>ef(e.id),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,minWidth:0,flex:1},children:[function(e,t){let r=es[e]||(0,l.jsx)(F.A,{});return(0,l.jsx)("span",{style:{color:t?"var(--colorAccent)":"var(--colorTextSecondary)",fontSize:16,marginTop:2,flexShrink:0},children:r})}(e.category,eg===e.id),(0,l.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[(0,l.jsx)("span",{style:{fontWeight:eg===e.id?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),eg===e.id&&(0,l.jsx)(i.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:"当前"}),(0,l.jsx)(i.A,{style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:e.category}),tr[e.id]&&(0,l.jsxs)(i.A,{color:tr[e.id].issues.some(e=>"error"===e.level)?"error":tr[e.id].issues.length?"warning":"success",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:["检查 ",tr[e.id].fileDiagnostics.length," 文件 / ",tr[e.id].promptDiagnostics.length," 提示词"]})]}),e.description&&(0,l.jsx)(Z,{type:"secondary",style:{fontSize:12,lineHeight:"18px"},children:e.description}),tr[e.id]&&(0,l.jsx)("div",{onClick:e=>e.stopPropagation(),style:{marginTop:8,padding:10,border:"1px solid ".concat(tr[e.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBorder)":tr[e.id].issues.length?"var(--colorWarningBorder)":"var(--colorSuccessBorder)"),borderRadius:10,background:tr[e.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBg)":tr[e.id].issues.length?"var(--colorWarningBg)":"var(--colorSuccessBg)"},children:(0,l.jsxs)(ee,{gap:6,style:{width:"100%"},children:[(0,l.jsxs)(o.A,{wrap:!0,children:[(0,l.jsx)(Z,{strong:!0,children:tr[e.id].issues.some(e=>"error"===e.level)?"运行前检查未通过":tr[e.id].issues.length?"运行前检查存在警告":"运行前检查通过"}),(0,l.jsxs)(i.A,{color:"blue",children:["文件角色 ",tr[e.id].fileDiagnostics.length]}),(0,l.jsxs)(i.A,{color:"purple",children:["提示词角色 ",tr[e.id].promptDiagnostics.length]}),tr[e.id].readiness&&(0,l.jsxs)(i.A,{color:tr[e.id].readiness.ready?"green":"error",children:["资料覆盖 ",Math.round(100*tr[e.id].readiness.materialCoverageRate),"%"]}),tr[e.id].readiness&&(0,l.jsxs)(i.A,{color:"cyan",children:["角色满足 ",Math.round(100*tr[e.id].readiness.roleSatisfactionRate),"%"]}),tr[e.id].readiness&&(0,l.jsxs)(i.A,{color:"geekblue",children:["规范完整 ",Math.round(100*tr[e.id].readiness.specCompletenessRate),"%"]})]}),null==(r=tr[e.id].readiness)||null==(t=r.chapterDiagnostics)?void 0:t.filter(e=>e.readinessRate<.7||e.missingFacts.length>0).slice(0,5).map(e=>(0,l.jsx)($,{type:e.readinessRate<.5?"warning":"info",title:"章节预检:".concat(e.title," \xb7 覆盖 ").concat(Math.round(100*e.readinessRate),"% \xb7 证据 ").concat(e.evidenceCount," 条").concat(e.missingFacts.length?" \xb7 缺失 ".concat(e.missingFacts.slice(0,4).join("、")):"")},e.chapterId)),tr[e.id].issues.length>0?tr[e.id].issues.map(e=>(0,l.jsx)($,{type:"error"===e.level?"error":"warning",title:e.message},e.message)):(0,l.jsx)($,{type:"success",title:"文件角色、提示词角色和后台自动规范检查通过,可以运行。"}),!tr[e.id].issues.some(e=>"error"===e.level)&&tr[e.id].issues.length>0&&(0,l.jsx)("div",{children:(0,l.jsx)(p.Ay,{size:"small",type:"primary",icon:(0,l.jsx)(O.A,{}),onClick:()=>tL(e.id),children:"忽略警告并继续运行"})})]})})]})]})})}}):0===eO.length?(0,l.jsx)(h.A,{description:ed("common.noData")}):(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:eO.slice(0,15).map((e,t)=>{var r,s,n,a,c;let d,u;return(0,l.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"10px 12px",border:"1px solid var(--colorBorderSecondary)",borderRadius:10,cursor:"pointer",background:eq===e.id?"var(--colorFillAlter)":void 0,minWidth:0},onClick:()=>{tW(e)},children:["completed"===e.status?(0,l.jsx)(M.A,{style:{fontSize:18,color:"var(--colorOk)",flexShrink:0,marginTop:2}}):"failed"===e.status||"aborted"===e.status?(0,l.jsx)(q.A,{style:{fontSize:18,color:"var(--colorDanger)",flexShrink:0,marginTop:2}}):"warning"===e.status?(0,l.jsx)(B.A,{style:{fontSize:18,color:"var(--colorWarning)",flexShrink:0,marginTop:2}}):(0,l.jsx)(K.A,{spin:!0,style:{fontSize:18,color:"#1677ff",flexShrink:0,marginTop:2}}),(0,l.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,l.jsx)("div",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:3},children:e.title}),(0,l.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px 10px",color:"var(--colorTextSecondary)",fontSize:11},children:[(0,l.jsx)("span",{children:new Date(e.updatedAt).toLocaleString()}),(0,l.jsxs)("span",{children:["耗时 ",(e=>{let t=Math.max(0,Math.round(((e.completedAt||e.updatedAt)-e.createdAt)/1e3));if(t<60)return"".concat(t," 秒");let r=Math.floor(t/60),l=t%60;if(r<60)return l?"".concat(r," 分 ").concat(l," 秒"):"".concat(r," 分");let s=Math.floor(r/60),n=r%60;return n?"".concat(s," 小时 ").concat(n," 分"):"".concat(s," 小时")})(e)]})]}),e.partialChapters&&e.partialChapters.length>0&&(0,l.jsxs)("div",{style:{marginTop:3,fontSize:11,color:"var(--colorTextSecondary)"},children:["已完成章节 ",e.partialChapters.filter(e=>"completed"===e.status).length,"/",e.partialChapters.length," \xb7 ",e.partialChapters.reduce((e,t)=>e+t.chars,0).toLocaleString()," 字"]}),("warning"===e.status||"failed"===e.status||"aborted"===e.status)&&(0,l.jsx)("div",{style:{marginTop:3,color:"failed"===e.status||"aborted"===e.status?"var(--colorError)":"var(--colorWarning)",fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.error||(null==(r=e.warningIssues)?void 0:r[0])||(null==(n=e.draft)||null==(s=n.validationIssues.find(e=>"error"===e.level||"warning"===e.level))?void 0:s.message)||"需复核"})]}),(0,l.jsxs)(o.A,{size:4,align:"center",children:[(0,l.jsx)(i.A,{color:"completed"===(d=e.status)?"success":"warning"===d?"warning":"failed"===d?"error":"aborted"===d?"default":"processing",style:{margin:0,fontSize:10,lineHeight:"18px"},children:"completed"===(u=e.status)?"已完成":"warning"===u?"需复核":"failed"===u?"失败":"aborted"===u?"已中止":"生成中"}),(0,l.jsxs)(i.A,{style:{margin:0,fontSize:10,lineHeight:"18px"},children:["#",t+1]}),(0,l.jsx)(g.A,{title:"确认删除?",onConfirm:t=>{null==t||t.stopPropagation(),t$(e)},children:(0,l.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,l.jsx)(L.A,{}),onClick:e=>e.stopPropagation()})}),tG(e.status)&&(0,l.jsx)(g.A,{title:"确定中止此生成任务?",onConfirm:t=>{null==t||t.stopPropagation(),t8(e)},children:(0,l.jsx)(p.Ay,{size:"small",danger:!0,onClick:e=>e.stopPropagation(),children:"中止"})}),("failed"===e.status||"aborted"===e.status||"warning"===e.status&&!!(null==(a=e.checkpointChapters)?void 0:a.length)&&/继续生成|重新生成|中断|卡住|未完成/u.test(e.error||(null==(c=e.warningIssues)?void 0:c.join(";"))||""))&&(0,l.jsx)(p.Ay,{size:"small",onClick:t=>{t.stopPropagation(),t6(e)},children:"继续"}),(0,l.jsx)(p.Ay,{size:"small",type:"primary",icon:tG(e.status)?(0,l.jsx)(K.A,{spin:!0}):(0,l.jsx)(O.A,{}),onClick:t=>{t.stopPropagation(),tW(e)},children:"打开"})]})]},e.id)})})}),(0,l.jsx)(f.A,{title:rr,open:tb,onClose:()=>{tS(!1),tC.current&&(clearInterval(tC.current),tC.current=null)},size:800,mask:{closable:!1},style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:eP?(0,l.jsxs)(o.A,{wrap:!0,children:[(0,l.jsx)(p.Ay,{icon:(0,l.jsx)(V.A,{}),disabled:eJ,onClick:()=>{t3()},children:ed("documents.saveDraft")}),(0,l.jsx)(p.Ay,{icon:(0,l.jsx)(U.A,{}),disabled:eJ,loading:"markdown"===eV,onClick:()=>{t4("markdown")},children:"MD"}),(0,l.jsx)(p.Ay,{disabled:eJ,loading:"html"===eV,onClick:()=>{t4("html")},children:"HTML"}),(0,l.jsx)(p.Ay,{disabled:eJ,loading:"docx"===eV,onClick:()=>{t4("docx")},children:"DOCX"}),(0,l.jsx)(p.Ay,{type:"primary",disabled:eJ,loading:"pdf"===eV,onClick:()=>{t4("pdf")},children:"PDF"})]}):eF&&"workflow"===tk?(0,l.jsx)(p.Ay,{danger:!0,onClick:()=>{(async()=>{if(eq&&await (0,Q.r)(eq,tm||void 0).catch(()=>void 0),et){var e;et.aborted=!0,null==(e=et.pollController)||e.abort(),et.loading=!1,et.error="用户中止",er(),et=null}localStorage.removeItem(tR),tC.current&&(clearInterval(tC.current),tC.current=null),eD(!1),tg([]),tv(null),tS(!1),await tE(),eu.info("已中止生成任务")})()},children:"中止任务"}):void 0,children:(0,l.jsxs)(ee,{style:{width:"100%"},gap:16,children:["workflow"===tk&&tx.length>0&&(0,l.jsx)(ee,{gap:10,children:tx.map((e,t)=>{let r;return(0,l.jsxs)("div",{style:{display:"flex",gap:10,padding:10,border:"1px solid var(--colorBorderSecondary)",borderRadius:10,background:t===tN?"var(--colorFillAlter)":"var(--colorBgContainer)"},children:[(0,l.jsx)("span",{children:"process"===e.status?(0,l.jsx)(P.A,{}):"warning"===e.status?(0,l.jsx)(B.A,{style:{color:"var(--colorWarning)"}}):e.icon}),(0,l.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,l.jsxs)(o.A,{wrap:!0,children:[(0,l.jsx)(Z,{strong:!0,children:e.title}),(0,l.jsx)(i.A,{color:"finish"===e.status?"success":"error"===e.status?"error":"warning"===e.status?"warning":"process"===e.status?"processing":"default",children:"warning"===(r=e.status)?"finish":r})]}),(0,l.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12,whiteSpace:"pre-wrap"},children:(0,l.jsxs)("div",{children:[e.subtitle&&(0,l.jsx)("div",{style:{marginBottom:4},children:(0,l.jsx)(i.A,{children:e.subtitle})}),(0,l.jsx)("div",{children:e.description}),(0,l.jsx)("div",{style:{marginTop:4},children:e.subSteps.map(e=>{var t;return(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"process"===e.status?"var(--colorPrimary)":"var(--colorTextSecondary)"},children:["process"===(t=e.status)?(0,l.jsx)(P.A,{}):"finish"===t?(0,l.jsx)(M.A,{}):"warning"===t?(0,l.jsx)(B.A,{style:{color:"var(--colorWarning)"}}):"error"===t?(0,l.jsx)(L.A,{}):(0,l.jsx)("span",{style:{display:"inline-block",height:6,width:6,borderRadius:"50%",background:"var(--colorTextTertiary)"}}),(0,l.jsx)("span",{children:e.title})]},e.key)})})]})})]})]},e.key)})}),"workflow"===tk&&(null==tj?void 0:tj.partialChapters)&&tj.partialChapters.length>0&&(0,l.jsx)(m.A,{size:"small",title:"章节进度",extra:(0,l.jsxs)(i.A,{color:"blue",children:[tj.partialChapters.filter(e=>"completed"===e.status).length,"/",tj.partialChapters.length]}),children:(0,l.jsx)(ee,{gap:6,style:{width:"100%"},children:tj.partialChapters.map(e=>(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:8,fontSize:12},children:[(0,l.jsx)(Z,{ellipsis:!0,style:{maxWidth:480},children:e.title}),(0,l.jsxs)(o.A,{size:6,children:[(0,l.jsx)(i.A,{color:"failed"===e.status?"error":"success",children:"failed"===e.status?"失败":"完成"}),(0,l.jsxs)(Z,{type:"secondary",children:[e.chars.toLocaleString()," 字"]})]})]},e.id))})}),"workflow"===tk&&(null==tj||null==(e=tj.reviewMetadata)?void 0:e.diagnostics)&&(0,l.jsx)($,{type:"info",title:"后台自动优化",children:"策略:".concat(tj.reviewMetadata.diagnostics.strategy.mode,";LLM 调用 ").concat(tj.reviewMetadata.diagnostics.llm.calls," 次;噪声过滤 ").concat((null==(t=tj.reviewMetadata.diagnostics.evidence)?void 0:t.filteredNoise)||0," 条;质量门禁 阻断").concat((null==(r=tj.reviewMetadata.diagnostics.quality)?void 0:r.blockingCount)||0,"/重要").concat((null==(a=tj.reviewMetadata.diagnostics.quality)?void 0:a.importantCount)||0,"/轻微").concat((null==(E=tj.reviewMetadata.diagnostics.quality)?void 0:E.minorCount)||0,";自动限流调整 ").concat(tj.reviewMetadata.diagnostics.llm.limitAdjustments," 次。审查与诊断信息仅用于系统修复,不会写入正文或导出文件。")}),"workflow"===tk&&eF&&0===tx.length&&(0,l.jsxs)("div",{style:{textAlign:"center",padding:40},children:[(0,l.jsx)(v.A,{}),(0,l.jsx)("div",{style:{marginTop:12,color:"var(--colorTextSecondary)"},children:"正在准备生成…"})]}),eP&&(0,l.jsx)("div",{ref:em,children:(0,l.jsx)(j.A,{items:[{key:"edit",label:ed("documents.edit"),children:(0,l.jsxs)(ee,{gap:16,style:{width:"100%"},children:[(0,l.jsx)(Y,{rows:28,value:eW,disabled:eJ,onSelect:e=>{var t,r,l;return e4({start:null!=(t=e.currentTarget.selectionStart)?t:0,end:null!=(l=null!=(r=e.currentTarget.selectionEnd)?r:e.currentTarget.selectionStart)?l:0})},onChange:e=>{var t,r,l;eG(e.target.value),e1(null),e6(null),e4({start:null!=(t=e.target.selectionStart)?t:0,end:null!=(l=null!=(r=e.target.selectionEnd)?r:e.target.selectionStart)?l:0})}}),(0,l.jsx)(m.A,{size:"small",style:{borderRadius:12,background:"linear-gradient(135deg, var(--colorFillAlter), var(--colorBgContainer))"},children:(0,l.jsxs)(ee,{gap:16,style:{width:"100%"},children:[(0,l.jsxs)(o.A,{align:"start",style:{width:"100%",justifyContent:"space-between"},children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)(o.A,{size:6,children:[(0,l.jsx)(N.A,{style:{color:"var(--colorAccent)"}}),(0,l.jsx)(Z,{strong:!0,children:"精准修改"}),(0,l.jsx)(i.A,{color:"blue",children:"AI 辅助"})]}),(0,l.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:"针对当前编辑内容补充更具体的要求,AI 会保留文档结构并按你的提示细化修改。"})]}),(0,l.jsxs)(p.Ay,{size:"small",icon:(0,l.jsx)(X.A,{}),onClick:()=>e9(e=>!e),disabled:0===e3.length,children:["历史版本 ",e3.length>0?e3.length:""]})]}),(0,l.jsx)($,{type:"info",title:"系统只负责识别修改范围,不改写你的提示词;选中文字后优先只改选区,没有选区时按光标所在小节/章节定位。"}),(0,l.jsx)(Y,{rows:4,value:eX,disabled:eJ,onChange:e=>{eQ(e.target.value),e1(null),e6(null)},placeholder:"例如:写细一点;润色这段;第七章补充高处作业和临电安全措施;把安全检查频次改成每周一次。"}),(0,l.jsxs)(o.A,{wrap:!0,style:{width:"100%",justifyContent:"space-between"},children:[(0,l.jsx)(o.A,{wrap:!0,children:["写细一点","更专业","只润色选区","补充可执行措施"].map(e=>(0,l.jsx)(p.Ay,{size:"small",disabled:eJ,onClick:()=>eQ(t=>t?"".concat(t,";").concat(e):e),children:e},e))}),(0,l.jsx)(p.Ay,{type:"primary",icon:(0,l.jsx)(N.A,{}),loading:eJ&&"planning"===eZ,disabled:!eX.trim()||eJ,onClick:()=>{re()},children:"识别修改范围"})]}),e0&&!e2&&(0,l.jsx)(m.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorAccent)"},children:(0,l.jsxs)(ee,{gap:8,style:{width:"100%"},children:[(0,l.jsxs)(o.A,{wrap:!0,children:[(0,l.jsx)(i.A,{color:"purple",children:e0.scope}),(0,l.jsx)(i.A,{color:"blue",children:e0.action}),(0,l.jsxs)(i.A,{color:e0.confidence>=.8?"green":"orange",children:["置信度 ",Math.round(100*e0.confidence),"%"]}),e0.targetTitle&&(0,l.jsx)(Z,{strong:!0,children:e0.targetTitle})]}),(0,l.jsx)(Z,{children:e0.summary}),(0,l.jsx)(Z,{type:"secondary",style:{fontSize:12},children:"将按你的原始提示词执行,不添加额外编辑任务。"}),(0,l.jsxs)(o.A,{children:[(0,l.jsx)(p.Ay,{type:"primary",loading:eJ&&"applying"===eZ,onClick:()=>{rt(e0)},children:"执行并预览"}),(0,l.jsx)(p.Ay,{disabled:eJ,onClick:()=>e1(null),children:"取消"})]})]})}),e2&&(0,l.jsx)(m.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorSuccess)"},children:(0,l.jsxs)(ee,{gap:8,style:{width:"100%"},children:[(0,l.jsxs)(o.A,{wrap:!0,children:[(0,l.jsx)(i.A,{color:"green",children:"修改预览"}),(0,l.jsx)(Z,{children:e2.summary||e2.plan.summary}),(0,l.jsxs)(i.A,{children:[e2.changedChars&&e2.changedChars>0?"+".concat(e2.changedChars):e2.changedChars," 字符"]})]}),(0,l.jsxs)(y.A,{gutter:12,children:[(0,l.jsxs)(w.A,{span:12,children:[(0,l.jsx)(Z,{strong:!0,children:"修改前"}),(0,l.jsx)("div",{style:{marginTop:6,maxHeight:180,overflow:"auto",padding:10,borderRadius:8,background:"var(--colorFillAlter)",whiteSpace:"pre-wrap",fontSize:12},children:e2.beforeSnippet||"无片段预览"})]}),(0,l.jsxs)(w.A,{span:12,children:[(0,l.jsx)(Z,{strong:!0,children:"修改后"}),(0,l.jsx)("div",{style:{marginTop:6,maxHeight:180,overflow:"auto",padding:10,borderRadius:8,background:"var(--colorFillAlter)",whiteSpace:"pre-wrap",fontSize:12},children:e2.afterSnippet||"无片段预览"})]})]}),(0,l.jsxs)(o.A,{children:[(0,l.jsx)(p.Ay,{type:"primary",onClick:()=>{e2&&(t5(e2.before,e2.prompt),eG(e2.markdown),t7(!0),eu.success("已应用精准修改"))},children:"应用到文档"}),(0,l.jsx)(p.Ay,{onClick:()=>e6(null),children:"返回计划"}),(0,l.jsx)(p.Ay,{danger:!0,onClick:()=>{e1(null),e6(null)},children:"放弃"})]})]})}),e7&&(0,l.jsx)("div",{style:{borderTop:"1px solid var(--colorBorderSecondary)",paddingTop:12},children:(0,l.jsx)(x.A,{size:"small",dataSource:e3,locale:{emptyText:"暂无历史版本"},renderItem:e=>(0,l.jsx)(x.A.Item,{actions:[(0,l.jsx)(p.Ay,{size:"small",disabled:eJ,onClick:()=>{t5(eW,"恢复前版本"),eG(e.content),t7(!0),eu.success("已恢复历史版本")},children:"恢复"},"restore")],children:(0,l.jsx)(x.A.Item.Meta,{title:(0,l.jsxs)(o.A,{children:[(0,l.jsx)(Z,{children:new Date(e.createdAt).toLocaleString()}),(0,l.jsx)(i.A,{children:e.prompt})]}),description:(0,l.jsx)(Z,{type:"secondary",ellipsis:!0,children:e.content.replace(/\s+/gu," ").slice(0,120)})})})})})]})})]})},{key:"chapters-facts",label:"章节与事实",children:(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[eP.chapters.length>0&&(0,l.jsxs)("div",{children:[(0,l.jsxs)(Z,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["章节 (",eP.chapters.length,")"]}),(0,l.jsx)(x.A,{size:"small",dataSource:eP.chapters,renderItem:e=>(0,l.jsx)(x.A.Item,{children:(0,l.jsx)(x.A.Item.Meta,{title:e.title,description:"证据: ".concat(e.evidence.length," \xb7 缺失: ").concat(e.missingFacts.length)})})})]}),eP.structuredFacts.length>0&&(0,l.jsxs)("div",{children:[(0,l.jsxs)(Z,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["结构化事实 (",eP.structuredFacts.length,")"]}),(0,l.jsx)(A.A,{size:"small",column:1,bordered:!0,children:eP.structuredFacts.map((e,t)=>(0,l.jsxs)(A.A.Item,{label:e.key,children:[(0,l.jsx)("span",{children:e.value}),(0,l.jsx)(i.A,{style:{marginLeft:8},children:e.confidence.toFixed(2)}),(0,l.jsx)(Z,{type:"secondary",style:{fontSize:11,marginLeft:8},children:e.sourceFile})]},t))})]})]})},{key:"sources-missing",label:"来源与缺失",children:(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)(Z,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["引用来源 (",eP.sources.length,")"]}),0===eP.sources.length?(0,l.jsx)(h.A,{description:"暂无"}):(0,l.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:eP.sources.map(e=>(0,l.jsxs)(i.A,{color:"blue",children:[e.filePath," (",e.count,")"]},e.filePath))})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(Z,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["缺失项 (",eP.missingItems.length,")"]}),0===eP.missingItems.length?(0,l.jsx)(h.A,{description:"无缺失"}):(0,l.jsx)(x.A,{size:"small",dataSource:eP.missingItems,renderItem:e=>(0,l.jsx)(x.A.Item,{children:e})})]})]})},{key:"validation",label:"校验 (".concat(eP.validationIssues.length,")"),children:0===eP.validationIssues.length?(0,l.jsx)(h.A,{description:"校验通过"}):(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[eP.validationIssues.map(e=>(0,l.jsxs)("div",{style:{border:"1px solid var(--colorBorderSecondary)",borderRadius:8,padding:12},children:[(0,l.jsx)(i.A,{color:"error"===e.level?"error":"warning"===e.level?"warning":"blue",children:e.level}),(0,l.jsx)("div",{style:{marginTop:6,whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all",lineHeight:1.6},children:e.message}),e.suggestion&&(0,l.jsx)("div",{style:{marginTop:6,color:"var(--colorTextSecondary)",whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all"},children:e.suggestion})]},"".concat(e.level,"-").concat(e.message))),eP.exportGate.checklist.length>0&&(0,l.jsxs)("div",{style:{marginTop:8},children:[(0,l.jsx)(Z,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:"导出门禁"}),(0,l.jsx)(x.A,{size:"small",dataSource:eP.exportGate.checklist,renderItem:e=>(0,l.jsxs)(x.A.Item,{children:[(0,l.jsx)(Z,{style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:e.label}),(0,l.jsx)(i.A,{color:e.passed?"success":"error",children:e.passed?"PASS":"FAIL"})]})})]})]})},{key:"stages",label:"执行阶段 (".concat(eP.executionStages.length,")"),children:(0,l.jsx)(x.A,{size:"small",dataSource:eP.executionStages,renderItem:e=>(0,l.jsxs)(x.A.Item,{children:[(0,l.jsx)(x.A.Item.Meta,{avatar:el[e.type]||(0,l.jsx)(F.A,{}),title:(0,l.jsx)(Z,{title:e.roleId,style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:"".concat(ei[e.type]||e.type," \xb7 ").concat(e.roleName||t_(e.roleId))}),description:(0,l.jsx)(Z,{type:"secondary",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"},children:e.message})}),(0,l.jsx)(i.A,{color:"success"===e.status?"success":"failed"===e.status?"error":"skipped"===e.status?"default":"warning",children:e.status})]})})}]})})]})}),(0,l.jsx)(f.A,{title:ed("documents.templateEditor"),open:te,onClose:()=>tt(!1),size:860,mask:{closable:!1},styles:{body:{padding:20,overflow:"auto"},header:{borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,l.jsxs)(o.A,{children:[(0,l.jsx)(p.Ay,{onClick:()=>tt(!1),children:ed("common.cancel")}),(0,l.jsx)(p.Ay,{type:"primary",onClick:()=>{tQ()},children:ed("common.save")})]}),children:(0,l.jsxs)(d.A,{form:ep,layout:"vertical",requiredMark:"optional",children:[(0,l.jsxs)(y.A,{gutter:12,children:[(0,l.jsx)(d.A.Item,{name:"id",hidden:!0,children:(0,l.jsx)(n.A,{})}),(0,l.jsx)(w.A,{xs:24,md:8,children:(0,l.jsx)(d.A.Item,{name:"name",label:ed("documents.templateName"),rules:[{required:!0}],children:(0,l.jsx)(n.A,{})})}),(0,l.jsx)(w.A,{xs:24,md:8,children:(0,l.jsx)(d.A.Item,{name:"category",label:ed("documents.templateCategory"),children:(0,l.jsx)(n.A,{})})}),(0,l.jsx)(w.A,{xs:24,md:8,children:(0,l.jsx)(d.A.Item,{name:"outputTitle",label:ed("documents.outputTitle"),children:(0,l.jsx)(n.A,{})})}),(0,l.jsx)(w.A,{xs:24,md:12,children:(0,l.jsx)(d.A.Item,{name:"description",label:ed("documents.templateDescription"),children:(0,l.jsx)(n.A,{})})})]}),(0,l.jsx)(d.A.Item,{name:"projectRoleConfigId",label:ed("documents.projectRoleConfig"),rules:[{required:!0,message:ed("documents.projectRoleConfigRequired")}],children:(0,l.jsx)(b.A,{showSearch:!0,placeholder:ed("documents.projectRoleConfigRequired"),options:tM})}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(Z,{strong:!0,className:"text-base text-[var(--colorText)] block mb-1",children:"项目文件绑定"}),(0,l.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:"每个文件角色可直接勾选文件或文件夹;勾选文件夹会自动绑定该文件夹下所有文件。"})]}),(0,l.jsx)(i.A,{color:"blue",bordered:!1,children:"按文件角色多选"})]}),(0,l.jsx)(n.A.Search,{allowClear:!0,placeholder:"搜索文件或文件夹",value:eT,onChange:e=>ez(e.target.value),className:"mb-4"}),eI?(0,l.jsxs)("div",{className:"text-center py-8",children:[(0,l.jsx)(v.A,{}),(0,l.jsx)("div",{className:"mt-3 text-[var(--colorTextSecondary)] text-xs",children:"正在加载知识库文件…"})]}):0===to.length?(0,l.jsx)(h.A,{image:h.A.PRESENTED_IMAGE_SIMPLE,description:ts?"当前项目角色未配置文件角色":"请先选择项目角色"}):0===td.length?(0,l.jsx)(h.A,{image:h.A.PRESENTED_IMAGE_SIMPLE,description:"暂无知识库文件"}):(()=>{let e=null==ti?void 0:ti.value,t=e?en(tc[e]||[]).filter(e=>tp.includes(e)):[],r=new Set(eo(tu));return(0,l.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 border border-[var(--borderColor)] rounded-xl overflow-hidden bg-[var(--colorBg)]",children:[(0,l.jsxs)("div",{className:"w-full md:w-[240px] border-b md:border-b-0 md:border-r border-[var(--borderColor)] bg-[var(--colorBgHover)] flex flex-col",children:[(0,l.jsx)("div",{className:"p-3 border-b border-[var(--borderColor)] text-xs font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)]",children:"文件角色"}),(0,l.jsx)("div",{className:"flex-1 overflow-y-auto max-h-[200px] md:max-h-[400px] p-2 space-y-1",children:to.map(t=>{let r=en(tc[t.value]||[]).filter(e=>tp.includes(e)).length,s=t.value===e;return(0,l.jsxs)("div",{onClick:()=>eE(t.value),className:"flex items-center justify-between p-2 rounded-lg cursor-pointer transition-all duration-200 ".concat(s?"bg-[var(--colorBgSelected)] text-[var(--colorAccent)] font-medium shadow-sm":"text-[var(--colorText)] hover:bg-[var(--colorBgElevated)]"),children:[(0,l.jsx)("span",{className:"truncate flex-1 mr-2 text-sm",children:t.label}),(0,l.jsx)("span",{className:"text-[10px] px-2 py-0.5 rounded-full ".concat(s?"bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400":"bg-[var(--colorFillAlter)] text-[var(--colorTextTertiary)]"),children:r})]},t.value)})})]}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col bg-[var(--colorBgContainer)]",children:[(0,l.jsxs)("div",{className:"p-3 border-b border-[var(--borderColor)] flex items-center justify-between bg-[var(--colorBgHover)]",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"font-medium text-sm text-[var(--colorText)]",children:null==ti?void 0:ti.label}),(0,l.jsxs)(i.A,{color:"blue",bordered:!1,className:"m-0 text-[10px] leading-[18px]",children:["已选 ",t.length]})]}),(0,l.jsx)(p.Ay,{type:"text",size:"small",danger:!0,disabled:!e||0===t.length,onClick:()=>e&&tX(e,[]),children:"清空"})]}),e&&(0,l.jsx)(d.A.Item,{name:["fileBindingGroups",e],hidden:!0,children:(0,l.jsx)(n.A,{})}),(0,l.jsx)("div",{className:"px-4 py-2 border-b border-[var(--borderColor)] bg-blue-50/30 dark:bg-blue-900/10",children:(0,l.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] truncate",children:t.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"text-blue-500 mr-1",children:"●"})," ",t.slice(0,4).map(ea).join("、")," ",t.length>4?" 等 ".concat(t.length," 个文件"):""]}):(0,l.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"请在下方勾选要绑定的文件..."})})}),(0,l.jsx)("div",{className:"flex-1 p-3 overflow-y-auto max-h-[320px]",children:(0,l.jsx)(S.A,{checkable:!0,blockNode:!0,treeData:tu,checkedKeys:t,expandedKeys:eT.trim()?th:eB,onExpand:e=>eM(e),onCheck:(l,s)=>{if(!e)return;let n=new Set(t.filter(e=>!r.has(e)));for(let e of s.checkedNodes)e.isFolder?eo([e]).forEach(e=>n.add(e)):n.add(e.key);tX(e,Array.from(n))}})})]})]})})()]}),(0,l.jsx)(k.A,{type:"info",showIcon:!0,message:"文档规范由后台根据模板、提示词和角色绑定自动生成,无需手动维护规范包。",className:"mb-4 bg-[var(--colorBgHover)] border-0"})]})})]})}}},e=>{e.O(0,[433,576,787,195,375,455,506,651,636,593,792],()=>e(e.s=16403)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[309],{14569:e=>{e.exports={featureLabel:"style_featureLabel__XFSTX",featureValue:"style_featureValue__I_wMP",filterInput:"style_filterInput__4_Elu",filterSelect:"style_filterSelect__vUBJ9",statusCard:"style_statusCard__H7Mee",statusSummary:"style_statusSummary__7KavF",statusSummaryText:"style_statusSummaryText__Shw3j",statusClearBtn:"style_statusClearBtn__uJ9bE",statusExpandBtn:"style_statusExpandBtn__HhgIj",statusFilters:"style_statusFilters__g_LbG",filterPill:"style_filterPill__1pjFW",filterPillActive:"style_filterPillActive___UZVi",statusPanel:"style_statusPanel__9arTu",statusEmpty:"style_statusEmpty__8LWzH",timelineList:"style_timelineList__dqJrz",timelineItem:"style_timelineItem__dbuL_",timelineStatusIcon:"style_timelineStatusIcon__SkRwb",timelinePercent:"style_timelinePercent__pEyH4",timelineRow:"style_timelineRow__EDOVa",timelineTitle:"style_timelineTitle__Yujr8",timelineClose:"style_timelineClose__Byx_9",timelineDetail:"style_timelineDetail__nALei",timelineDesc:"style_timelineDesc__FMjWE",timelinePath:"style_timelinePath__C9VQI",timelineMeta:"style_timelineMeta__u_pCn",timelineMetaTag:"style_timelineMetaTag__G3jF1",timelineExpandArrow:"style_timelineExpandArrow__xIBdF",timelineExpandArrowOpen:"style_timelineExpandArrowOpen__TWWDC",fileNameCell:"style_fileNameCell__EHsnt",folderName:"style_folderName__VhLXP",folderRow:"style_folderRow__d7k9S",searchResultList:"style_searchResultList__cVKZg",searchResultItem:"style_searchResultItem__boj6D",searchResultHeader:"style_searchResultHeader__meVdJ",searchContent:"style_searchContent__XbUVk",pdfPreviewStrip:"style_pdfPreviewStrip__94_eG",drawingPreview:"style_drawingPreview__lkk_L"}},37690:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge/file-detail",function(){return l(48200)}])},45551:(e,t,l)=>{"use strict";function n(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024)),l=e/Math.pow(1024,t);return"".concat(l.toFixed(+(0!==t))," ").concat(["B","KB","MB","GB","TB"][t])}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";if(!e||e<=0)return"en-US"===t?"Never":"从未";let l=Math.floor(Math.floor((Date.now()-e)/1e3)/60),n=Math.floor(l/60),a=Math.floor(n/24);return a>30?new Date(e).toLocaleDateString(t):"en-US"===t?a>0?"".concat(a,"d ago"):n>0?"".concat(n,"h ago"):l>0?"".concat(l,"m ago"):"Just now":a>0?"".concat(a," 天前"):n>0?"".concat(n," 小时前"):l>0?"".concat(l," 分钟前"):"刚刚"}l.d(t,{Jm:()=>s,fw:()=>a,z3:()=>n});let r={document:"文档",spreadsheet:"表格",image:"图片",cad:"图纸",code:"代码",data:"数据",web:"网页",diagram:"图表",archive:"压缩包",other:"其他"},i={document:"Document",spreadsheet:"Spreadsheet",image:"Image",cad:"CAD",code:"Code",data:"Data",web:"Web",diagram:"Diagram",archive:"Archive",other:"Other"};function s(e){var t;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return null!=(t=("en-US"===l?i:r)[e])?t:e}},48200:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>M});var n=l(65321),a=l(97109),r=l(1873),i=l.n(r),s=l(86109),o=l(35292),c=l(76506),d=l(33442),u=l(11702),h=l(9137),m=l(21289),g=l(68787),p=l(56985),x=l(49604),y=l(88762),_=l(85493),f=l(84253),w=l(85114),j=l(58569),A=l(7576),k=l(47210),C=l(6578),v=l(48321),S=l(45551),P=l(14569),b=l.n(P);let{Paragraph:I}=o.A;function N(e){if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}function R(e){return Array.isArray(e)?e.filter(e=>"string"==typeof e).slice(0,30):[]}function z(e,t){let l=t.trim()?[t.trim(),...t.split(/[\s,,。;;::、]+/u)].filter(Boolean).sort((e,t)=>t.length-e.length):[];if(0===l.length)return e;let a=RegExp("(".concat(l.map(e=>e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")).join("|"),")"),"giu");return e.split(a).map((e,t)=>l.some(t=>t.toLowerCase()===e.toLowerCase())?(0,n.jsx)("mark",{children:e},t):e)}function D(e,t,l){return null==t||""===t||Array.isArray(t)&&0===t.length?null:(0,n.jsx)(c.A.Item,{label:e,children:Array.isArray(t)?(0,n.jsx)(d.A,{wrap:!0,children:t.map(e=>(0,n.jsx)(u.A,{className:"cursor-pointer",onClick:()=>null==l?void 0:l(String(e)),children:String(e)},String(e)))}):String(t)})}function O(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value";return e.map((e,l)=>({key:"".concat(t,"-").concat(l),name:e}))}function M(){var e,t,l,r,o;let P=(0,v.Vr)(),M=(0,s.useRouter)(),L="string"==typeof M.query.relativePath?M.query.relativePath:"",[T,E]=(0,a.useState)(),[F,B]=(0,a.useState)(!1),[J,K]=(0,a.useState)(""),[V,H]=(0,a.useState)(!1),[U,W]=(0,a.useState)(""),[X,G]=(0,a.useState)([]);(0,a.useEffect)(()=>{L&&(B(!0),K(""),(0,C.xC)(L).then(E).catch(e=>{E(void 0),K(e instanceof Error?e.message:"文件详情加载失败")}).finally(()=>B(!1)))},[L]);let $=(0,a.useMemo)(()=>(function(e){let t=N(null==e?void 0:e.file.metadataJson);return"object"==typeof t.extraction&&t.extraction?t.extraction:t})(T),[T]),q=R($.layerNames);(0,a.useEffect)(()=>{G(q)},[null==T?void 0:T.file.relativePath,q.join("|")]);let Z=U.trim().toLowerCase(),Q=(0,a.useMemo)(()=>{var e;return T&&Z?T.chunks.filter(e=>{let t=N(e.metadataJson);return[e.content,e.sectionTitle,t.rowRange,t.chunkKind,t.parentId,JSON.stringify(t)].some(e=>String(null!=e?e:"").toLowerCase().includes(Z))}):null!=(e=null==T?void 0:T.chunks)?e:[]},[T,Z]),Y=(0,a.useMemo)(()=>{var e;return T&&Z?T.parents.filter(e=>[e.content,e.sectionTitle,e.parentId,e.metadataJson].some(e=>String(null!=e?e:"").toLowerCase().includes(Z))):null!=(e=null==T?void 0:T.parents)?e:[]},[T,Z]),ee=async()=>{if(L){H(!0);try{let e=await (0,C.HC)(L);e.detail&&E(e.detail),h.Ay.success("文件索引已重建")}finally{H(!1)}}},et=async e=>{e&&(await navigator.clipboard.writeText(e),h.Ay.success("已复制"))},el=async e=>{L&&(await (0,C.tn)(L,e),h.Ay.success("file"===e?"已请求打开文件":"已请求打开目录"))},en=(0,a.useMemo)(()=>{var e,t,l,a,r,s;let o=[],h=R($.sheetNames),y=R($.columnNames),_=R($.layerNames),f=R($.blockNames),w=R($.entityTypes),j=R($.productNames),A=R($.materialNames),k=R($.entityNames),C=R($.dataPaths),v=h.length>0||y.length>0||null!=$.rowCount||null!=$.columnCount||null!=$.formulaCount||null!=$.mergeCount,S=O(y,"column"),P=(null!=(e=null==T?void 0:T.chunks)?e:[]).map(e=>N(e.metadataJson).rowRange).filter(e=>"string"==typeof e).map((e,t)=>({key:"row-".concat(t),name:e})),z=(null!=(t=null==T?void 0:T.chunks)?t:[]).flatMap(e=>e.content.split(/\r?\n/u)).map(e=>e.trim()).filter(e=>e.includes("|")).slice(0,80).map((e,t)=>({key:"grid-".concat(t),cells:e.split("|").map(e=>e.trim()).filter(Boolean)}));(v||S.length>0||P.length>0||z.length>0)&&o.push({key:"table",label:"表格",children:(0,n.jsxs)(d.A,{direction:"vertical",className:"w-full",children:[v&&(0,n.jsxs)(c.A,{size:"small",column:2,bordered:!0,children:[D("Sheet",h,W),D("表头",y,W),D("行数",$.rowCount),D("列数",$.columnCount),D("公式数",$.formulaCount),D("合并单元格",$.mergeCount)]}),S.length>0&&(0,n.jsx)(m.A,{size:"small",pagination:!1,rowKey:"key",dataSource:S,columns:[{title:"列名",dataIndex:"name",render:e=>(0,n.jsx)(u.A,{className:"cursor-pointer",onClick:()=>W(String(e)),children:String(e)})}]}),P.length>0&&(0,n.jsx)(m.A,{size:"small",pagination:!1,rowKey:"key",dataSource:P,columns:[{title:"行范围",dataIndex:"name",render:e=>(0,n.jsxs)(u.A,{color:"gold",className:"cursor-pointer",onClick:()=>W(String(e)),children:["行 ",String(e)]})}]}),z.length>0&&(0,n.jsx)(m.A,{size:"small",rowKey:"key",dataSource:z,pagination:{pageSize:10},columns:[{title:"表格网格预览",dataIndex:"cells",render:e=>(0,n.jsx)(d.A,{wrap:!0,children:e.map((e,t)=>(0,n.jsx)(u.A,{children:e},"".concat(e,"-").concat(t)))})}]})]})});let M=_.length>0||f.length>0||w.length>0||j.length>0||A.length>0||k.length>0,L=[...O(_,"layer").map(e=>({...e,type:"图层"})),...O(w,"entity").map(e=>({...e,type:"实体类型"})),...O(f,"block").map(e=>({...e,type:"块/符号"}))];(M||_.length>0||L.length>0)&&o.push({key:"drawing",label:"图纸",children:(0,n.jsxs)(d.A,{direction:"vertical",className:"w-full",children:[M&&(0,n.jsxs)(c.A,{size:"small",column:2,bordered:!0,children:[D("图层",_,W),D("块/符号",f,W),D("实体类型",w,W),D("产品/零件",j,W),D("材料",A,W),D("实体名称",k,W)]}),_.length>0&&(0,n.jsxs)(g.A,{size:"small",title:"图层开关 / 图纸预览",children:[(0,n.jsx)(p.A.Group,{value:X,options:_.map(e=>({label:e,value:e})),onChange:e=>G(e.map(String))}),(0,n.jsx)("div",{className:b().drawingPreview,children:X.map(e=>(0,n.jsx)(u.A,{color:"blue",children:e},e))})]}),L.length>0&&(0,n.jsx)(m.A,{size:"small",pagination:!1,rowKey:"key",dataSource:L,columns:[{title:"类型",dataIndex:"type",width:120},{title:"名称",dataIndex:"name",render:e=>(0,n.jsx)(u.A,{className:"cursor-pointer",onClick:()=>W(String(e)),children:String(e)})}]})]})});let E=(null!=(l=null==T?void 0:T.chunks)?l:[]).flatMap(e=>e.content.split(/\r?\n/u)).map(e=>e.trim()).filter(e=>/^[\w.[\]-]+\s*[:=]/u.test(e)).slice(0,200).map((e,t)=>{var l,n,a,r;let i=/^([^:=]+)\s*[:=]\s*(.*)$/u.exec(e);return{key:"data-".concat(t),path:null!=(a=null==i||null==(l=i[1])?void 0:l.trim())?a:e,value:null!=(r=null==i||null==(n=i[2])?void 0:n.trim())?r:""}});(C.length>0||E.length>0)&&o.push({key:"data",label:"数据路径",children:(0,n.jsxs)(d.A,{direction:"vertical",className:"w-full",children:[C.length>0&&(0,n.jsx)(x.A,{defaultExpandAll:!0,treeData:function(e){let t=new Map;for(let l of e){let e=t;for(let t of l.replace(/\[(\d+)\]/gu,".$1").split(".").filter(Boolean))e.has(t)||e.set(t,new Map),e=e.get(t)}let l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return[...e.entries()].map(e=>{let[n,a]=e;return{title:n,key:t?"".concat(t,".").concat(n):n,children:l(a,t?"".concat(t,".").concat(n):n)}})};return l(t)}(C),onSelect:e=>{var t;return W(String(null!=(t=e[0])?t:""))}}),E.length>0&&(0,n.jsx)(m.A,{size:"small",rowKey:"key",dataSource:E,pagination:{pageSize:20},columns:[{title:"Path",dataIndex:"path",width:260,render:e=>(0,n.jsx)(u.A,{className:"cursor-pointer",onClick:()=>W(String(e)),children:String(e)})},{title:"Value",dataIndex:"value",render:e=>(0,n.jsx)("span",{className:"break-all",children:String(e)})}]})]})});let F=[$.ocrRecommended,$.ocrReason,$.ocrProvider,$.ocrLanguages,$.ocrTextLength,$.pdfPageOcrSupported,$.ocrPageCount,$.pdfOcrPageLimit,$.pdfRenderer,$.pdfPageCount,$.textPages,$.ocrAugmented,$.ocrPages,$.failedPages,$.imagePreprocessor].some(e=>null!=e),B=(null!=(a=null==T?void 0:T.chunks)?a:[]).map(e=>e.content).join("\n\n").split(/PDF OCR 第\s*(\d+)\s*页[::]/u).slice(1).reduce((e,t,l,n)=>{var a,r,i;return l%2==0&&e.push({key:"page-".concat(t),page:t,text:null!=(i=null==(r=n[l+1])||null==(a=r.split(/PDF OCR 第\s*\d+\s*页[::]/u)[0])?void 0:a.trim())?i:""}),e},[]),J=(null==T?void 0:T.file.format)==="pdf";return(F||J||B.length>0)&&o.push({key:"ocr",label:"OCR/PDF",children:(0,n.jsxs)(d.A,{direction:"vertical",className:"w-full",children:[F&&(0,n.jsxs)(c.A,{size:"small",column:2,bordered:!0,children:[D("OCR 建议",$.ocrRecommended),D("OCR 原因",$.ocrReason),D("OCR 引擎",$.ocrProvider),D("OCR 语言",$.ocrLanguages),D("OCR 文本长度",$.ocrTextLength),D("PDF 总页数",$.pdfPageCount),D("PDF 文本页数",$.textPages),D("PDF 已 OCR 增强",$.ocrAugmented),D("PDF OCR 页码",Array.isArray($.ocrPages)?$.ocrPages.join(", "):$.ocrPages),D("PDF 失败页",Array.isArray($.failedPages)?$.failedPages.map(e=>JSON.stringify(e)).join("; "):$.failedPages),D("PDF 页面 OCR 支持",$.pdfPageOcrSupported),D("PDF OCR 页数",$.ocrPageCount),D("PDF OCR 页数上限",$.pdfOcrPageLimit),D("PDF 渲染器",$.pdfRenderer),D("图像预处理",$.imagePreprocessor)]}),J&&(0,n.jsx)("div",{className:b().pdfPreviewStrip,children:Array.from({length:Math.min(Number(null!=(s=null!=(r=$.pdfPageCount)?r:$.ocrPageCount)?s:1)||1,6)},(e,t)=>(0,n.jsx)(i(),{width:220,height:320,src:"/api/kb/files/preview-pdf-page?relativePath=".concat(encodeURIComponent(T.file.relativePath),"&page=").concat(t+1),alt:"PDF 第 ".concat(t+1," 页"),unoptimized:!0},t))}),B.length>0&&(0,n.jsx)(m.A,{size:"small",rowKey:"key",dataSource:B,pagination:{pageSize:10},columns:[{title:"页码",dataIndex:"page",width:90},{title:"OCR 文本",dataIndex:"text",render:e=>(0,n.jsx)(I,{ellipsis:{rows:4,expandable:!0,symbol:"展开"},children:String(e)})}]})]})}),o},[$,T,X]),ea=[{title:"序号",key:"index",width:70,render:(e,t,l)=>l+1},{title:P("knowledge.chunkIndex"),dataIndex:"chunkIndex",width:90,render:e=>String(e)},{title:P("knowledge.chunkType"),width:110,render:(e,t)=>{var l;return(0,n.jsx)(u.A,{children:String(null!=(l=N(t.metadataJson).chunkKind)?l:t.category)})}},{title:P("knowledge.sectionOrRange"),width:220,render:(e,t)=>{let l=N(t.metadataJson),a="string"==typeof l.rowRange?l.rowRange:void 0;return(0,n.jsxs)(d.A,{wrap:!0,children:[t.sectionTitle?(0,n.jsx)(u.A,{color:"cyan",children:t.sectionTitle}):null,a?(0,n.jsxs)(u.A,{color:"gold",children:["行 ",a]}):null]})}},{title:"Token",dataIndex:"tokenCount",width:90},{title:P("knowledge.chunkContent"),render:(e,t)=>(0,n.jsx)(I,{ellipsis:{rows:3,expandable:!0,symbol:"展开"},className:b().searchContent,children:z(t.content,U)})}],er=[{title:"序号",key:"index",width:70,render:(e,t,l)=>l+1},{title:P("knowledge.parentChunkId"),dataIndex:"parentId",width:260,render:e=>(0,n.jsx)("span",{className:"break-all",children:e})},{title:"切片数",dataIndex:"chunkCount",width:90},{title:"章节",dataIndex:"sectionTitle",width:220},{title:P("knowledge.chunkContent"),render:(e,t)=>(0,n.jsx)(I,{ellipsis:{rows:3,expandable:!0,symbol:"展开"},className:b().searchContent,children:z(t.content,U)})}];return F?(0,n.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,n.jsx)(y.A,{active:!0,paragraph:{rows:1}}),(0,n.jsx)(g.A,{size:"small",children:(0,n.jsx)(y.A,{active:!0,paragraph:{rows:6}})}),(0,n.jsx)(g.A,{size:"small",children:(0,n.jsx)(y.A,{active:!0,paragraph:{rows:4}})})]}):J?(0,n.jsx)(_.A,{type:"error",showIcon:!0,message:"文件详情加载失败",description:J}):T?(0,n.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(w.Ay,{icon:(0,n.jsx)(k.A,{}),href:"/knowledge/files",size:"small",style:{marginBottom:12},children:"返回文件列表"}),(0,n.jsxs)("div",{className:b().searchResultHeader,children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"pageTitle",children:"文件详情"}),(0,n.jsx)("p",{className:"pageDesc",children:"查看解析结果、图纸/表格/数据结构化字段、parent chunk 和 child chunk。"})]}),(0,n.jsxs)(d.A,{children:[(0,n.jsx)(w.Ay,{onClick:()=>{et(null==T?void 0:T.absolutePath)},children:"复制原文件路径"}),(0,n.jsx)(w.Ay,{onClick:()=>{et(null==T?void 0:T.directory)},children:"复制所在目录"}),(0,n.jsx)(w.Ay,{onClick:()=>{el("file")},children:"打开文件"}),(0,n.jsx)(w.Ay,{onClick:()=>{el("directory")},children:"打开目录"}),"pdf"===T.file.format?(0,n.jsx)(w.Ay,{loading:V,onClick:()=>{ee()},children:"重新 OCR"}):null,(0,n.jsx)(w.Ay,{type:"primary",loading:V,onClick:()=>{ee()},children:"重建该文件索引"})]})]})]}),(0,n.jsx)(g.A,{size:"small",title:"基础信息",children:(0,n.jsxs)(c.A,{size:"small",column:2,bordered:!0,children:[(0,n.jsx)(c.A.Item,{label:"路径",children:T.file.relativePath}),(0,n.jsx)(c.A.Item,{label:"原文件",children:null!=(e=T.absolutePath)?e:"-"}),(0,n.jsx)(c.A.Item,{label:"所在目录",children:null!=(t=T.directory)?t:"-"}),(0,n.jsxs)(c.A.Item,{label:"分类",children:[(0,n.jsx)(u.A,{children:(0,S.Jm)(T.file.category)})," ",(0,n.jsx)(u.A,{children:T.file.format})]}),(0,n.jsx)(c.A.Item,{label:"大小",children:(0,S.z3)(T.file.fileSize)}),(0,n.jsx)(c.A.Item,{label:"切片数",children:T.file.chunkCount}),(0,n.jsx)(c.A.Item,{label:"状态",children:T.file.status}),(0,n.jsx)(c.A.Item,{label:"解析模式",children:String(null!=(l=$.extractionMode)?l:"-")}),(0,n.jsx)(c.A.Item,{label:"覆盖范围",children:String(null!=(r=$.contentCoverage)?r:"-")}),(0,n.jsx)(c.A.Item,{label:"正文长度",children:String(null!=(o=$.textLength)?o:"-")})]})}),en.length>0&&(0,n.jsx)(g.A,{size:"small",title:"结构化信息",children:(0,n.jsx)(j.A,{items:en})}),(0,n.jsx)(g.A,{size:"small",title:"详情筛选",children:(0,n.jsxs)(d.A,{direction:"vertical",className:"w-full",children:[(0,n.jsx)(A.A,{allowClear:!0,value:U,onChange:e=>W(e.target.value),placeholder:"筛选 rowRange、图层、实体、data path、section、chunk 内容"}),U?(0,n.jsxs)(d.A,{wrap:!0,children:[(0,n.jsxs)(u.A,{color:"blue",children:[P("knowledge.parentMatches")," ",Y.length]}),(0,n.jsxs)(u.A,{color:"green",children:[P("knowledge.childMatches")," ",Q.length]}),(0,n.jsxs)(u.A,{color:"purple",children:[P("knowledge.filterTerm")," ",U]})]}):null]})}),(0,n.jsxs)(g.A,{size:"small",title:"".concat(P("knowledge.parentChunks")," (").concat(Y.length,"/").concat(T.parents.length,")"),children:[(0,n.jsx)(_.A,{type:"info",showIcon:!0,message:P("knowledge.parentChunkHint"),style:{marginBottom:12}}),(0,n.jsx)(m.A,{rowKey:"id",columns:er,dataSource:Y,pagination:{pageSize:10},size:"small"})]}),(0,n.jsx)(g.A,{size:"small",title:"".concat(P("knowledge.childChunks")," (").concat(Q.length,"/").concat(T.chunks.length,")"),children:(0,n.jsx)(m.A,{rowKey:"id",columns:ea,dataSource:Q,pagination:{pageSize:20},size:"small"})})]}):(0,n.jsx)(f.A,{description:"请选择文件"})}}},e=>{e.O(0,[433,576,787,985,375,102,289,506,850,636,593,792],()=>e(e.s=37690)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[28],{1611:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"}},12887:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"}},13067:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0010.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 00-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"}}]},name:"file-excel",theme:"outlined"}},14569:e=>{e.exports={featureLabel:"style_featureLabel__XFSTX",featureValue:"style_featureValue__I_wMP",filterInput:"style_filterInput__4_Elu",filterSelect:"style_filterSelect__vUBJ9",statusCard:"style_statusCard__H7Mee",statusSummary:"style_statusSummary__7KavF",statusSummaryText:"style_statusSummaryText__Shw3j",statusClearBtn:"style_statusClearBtn__uJ9bE",statusExpandBtn:"style_statusExpandBtn__HhgIj",statusFilters:"style_statusFilters__g_LbG",filterPill:"style_filterPill__1pjFW",filterPillActive:"style_filterPillActive___UZVi",statusPanel:"style_statusPanel__9arTu",statusEmpty:"style_statusEmpty__8LWzH",timelineList:"style_timelineList__dqJrz",timelineItem:"style_timelineItem__dbuL_",timelineStatusIcon:"style_timelineStatusIcon__SkRwb",timelinePercent:"style_timelinePercent__pEyH4",timelineRow:"style_timelineRow__EDOVa",timelineTitle:"style_timelineTitle__Yujr8",timelineClose:"style_timelineClose__Byx_9",timelineDetail:"style_timelineDetail__nALei",timelineDesc:"style_timelineDesc__FMjWE",timelinePath:"style_timelinePath__C9VQI",timelineMeta:"style_timelineMeta__u_pCn",timelineMetaTag:"style_timelineMetaTag__G3jF1",timelineExpandArrow:"style_timelineExpandArrow__xIBdF",timelineExpandArrowOpen:"style_timelineExpandArrowOpen__TWWDC",fileNameCell:"style_fileNameCell__EHsnt",folderName:"style_folderName__VhLXP",folderRow:"style_folderRow__d7k9S",searchResultList:"style_searchResultList__cVKZg",searchResultItem:"style_searchResultItem__boj6D",searchResultHeader:"style_searchResultHeader__meVdJ",searchContent:"style_searchContent__XbUVk",pdfPreviewStrip:"style_pdfPreviewStrip__94_eG",drawingPreview:"style_drawingPreview__lkk_L"}},23793:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"}},25258:(e,t,r)=>{"use strict";r.d(t,{A:()=>w});var a=r(51541),l=r(61848),s=r(5669),n=r(97109),i=r(72658),o=r(3638),c=r(92162),d=r(82725),u=r(74567),h=r(632),f=r(49517),m=r(79412),v=r(19527);let p=(0,d.U)(e=>{let{prefixCls:t,className:r,closeIcon:a,closable:l,type:s,title:d,children:p,footer:x,classNames:g,styles:y,...w}=e,{getPrefixCls:b}=n.useContext(u.QO),{className:j,style:_,classNames:A,styles:z}=(0,u.TP)("modal"),k=b(),C=t||b("modal"),S=(0,h.A)(k),[P,M]=(0,v.Ay)(C,S),[N,O]=(0,c.AV)([A,g],[z,y],{props:e}),T=`${C}-confirm`,H={};return H=s?{closable:l??!1,title:"",footer:"",children:n.createElement(f.k,{...e,prefixCls:C,confirmPrefixCls:T,rootPrefixCls:k,content:p})}:{closable:l??!0,title:d,footer:null!==x&&n.createElement(m.w,{...e}),children:p},n.createElement(i.Z,{prefixCls:C,className:(0,o.$)(P,`${C}-pure-panel`,s&&T,s&&`${T}-${s}`,r,j,M,S,N.root),style:{..._,...O.root},...w,closeIcon:(0,m.O)(C,a),closable:l,classNames:N,styles:O,...H})});var x=r(99739);function g(e){return(0,a.Ay)((0,a.fp)(e))}let y=s.A;y.useModal=x.A,y.info=function(e){return(0,a.Ay)((0,a.$D)(e))},y.success=function(e){return(0,a.Ay)((0,a.Ej)(e))},y.error=function(e){return(0,a.Ay)((0,a.jT)(e))},y.warning=g,y.warn=g,y.confirm=function(e){return(0,a.Ay)((0,a.lr)(e))},y.destroyAll=function(){for(;l.A.length;){let e=l.A.pop();e&&e()}},y.config=a.FB,y._InternalPanelDoNotUseOrYouWillBeFired=p;let w=y},26619:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(97109),l=r(1611),s=r(88483);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let i=a.forwardRef((e,t)=>a.createElement(s.A,n({},e,{ref:t,icon:l.A})))},26631:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(97109),l=r(12887),s=r(88483);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let i=a.forwardRef((e,t)=>a.createElement(s.A,n({},e,{ref:t,icon:l.A})))},30289:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"}},35311:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M456 231a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"more",theme:"outlined"}},45551:(e,t,r)=>{"use strict";function a(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024)),r=e/Math.pow(1024,t);return"".concat(r.toFixed(+(0!==t))," ").concat(["B","KB","MB","GB","TB"][t])}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";if(!e||e<=0)return"en-US"===t?"Never":"从未";let r=Math.floor(Math.floor((Date.now()-e)/1e3)/60),a=Math.floor(r/60),l=Math.floor(a/24);return l>30?new Date(e).toLocaleDateString(t):"en-US"===t?l>0?"".concat(l,"d ago"):a>0?"".concat(a,"h ago"):r>0?"".concat(r,"m ago"):"Just now":l>0?"".concat(l," 天前"):a>0?"".concat(a," 小时前"):r>0?"".concat(r," 分钟前"):"刚刚"}r.d(t,{Jm:()=>i,fw:()=>l,z3:()=>a});let s={document:"文档",spreadsheet:"表格",image:"图片",cad:"图纸",code:"代码",data:"数据",web:"网页",diagram:"图表",archive:"压缩包",other:"其他"},n={document:"Document",spreadsheet:"Spreadsheet",image:"Image",cad:"CAD",code:"Code",data:"Data",web:"Web",diagram:"Diagram",archive:"Archive",other:"Other"};function i(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return null!=(t=("en-US"===r?n:s)[e])?t:e}},48893:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-image",theme:"outlined"}},53234:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM496 208H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 544h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm328 244a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"hdd",theme:"outlined"}},54746:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(97109),l=r(71242),s=r(88483);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let i=a.forwardRef((e,t)=>a.createElement(s.A,n({},e,{ref:t,icon:l.A})))},58209:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(97109),l=r(23793),s=r(88483);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let i=a.forwardRef((e,t)=>a.createElement(s.A,n({},e,{ref:t,icon:l.A})))},58520:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM528.1 472h-32.2c-5.5 0-10.3 3.7-11.6 9.1L434.6 680l-46.1-198.7c-1.3-5.4-6.1-9.3-11.7-9.3h-35.4a12.02 12.02 0 00-11.6 15.1l74.2 276c1.4 5.2 6.2 8.9 11.6 8.9h32c5.4 0 10.2-3.6 11.6-8.9l52.8-197 52.8 197c1.4 5.2 6.2 8.9 11.6 8.9h31.8c5.4 0 10.2-3.6 11.6-8.9l74.4-276a12.04 12.04 0 00-11.6-15.1H647c-5.6 0-10.4 3.9-11.7 9.3l-45.8 199.1-49.8-199.3c-1.3-5.4-6.1-9.1-11.6-9.1z"}}]},name:"file-word",theme:"outlined"}},61825:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(97109),l=r(30289),s=r(88483);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let i=a.forwardRef((e,t)=>a.createElement(s.A,n({},e,{ref:t,icon:l.A})))},64207:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ee});var a=r(65321),l=r(97109),s=r(48321),n=r(43220),i=r.n(n),o=r(86109),c=r(17807),d=r(25258),u=r(11702),h=r(71102),f=r(85114),m=r(7576),v=r(57271),p=r(33442),x=r(21289),g=r(56768),y=r(48893),w=r(88483);function b(){return(b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let j=l.forwardRef((e,t)=>l.createElement(w.A,b({},e,{ref:t,icon:y.A})));var _=r(13067);function A(){return(A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let z=l.forwardRef((e,t)=>l.createElement(w.A,A({},e,{ref:t,icon:_.A})));var k=r(58520);function C(){return(C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let S=l.forwardRef((e,t)=>l.createElement(w.A,C({},e,{ref:t,icon:k.A})));var P=r(90939);function M(){return(M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let N=l.forwardRef((e,t)=>l.createElement(w.A,M({},e,{ref:t,icon:P.A})));var O=r(93314),T=r(61825),H=r(26619),E=r(7225),F=r(26631),V=r(64254),B=r(64629),I=r(58209),R=r(85855),D=r(30486),L=r(54746),q=r(84742),$=r(38762),J=r(39219),Q=r(22931),U=r(6578),W=r(45551),X=r(14569),G=r.n(X);let K=["document","spreadsheet","image","cad","code","data","web","diagram","other"],Z=/\.(zip|jar|war|apk|tar|gz|tgz|bz2|rar|7z)$/iu,Y=/(^|\/)\.DS_Store$|(^|\/)Thumbs\.db$|(^|\/)__MACOSX\/|\.bak$/iu;function ee(){let e=(0,s.Vr)("knowledge"),{locale:t}=(0,s.x_)(),{message:r}=c.A.useApp(),n=(0,o.useRouter)(),y="string"==typeof n.query.category?n.query.category:"",[w,b]=(0,l.useState)([]),[_,A]=(0,l.useState)(!1),[k,C]=(0,l.useState)(""),[P,M]=(0,l.useState)(""),[X,ee]=(0,l.useState)(y),[et,er]=(0,l.useState)(!1),[ea,el]=(0,l.useState)(!1),[es,en]=(0,l.useState)([]),[ei,eo]=(0,l.useState)([]),[ec,ed]=(0,l.useState)(new Set),[eu,eh]=(0,l.useState)("all"),[ef,em]=(0,l.useState)(!0),[ev,ep]=(0,l.useState)([]),[ex,eg]=(0,l.useState)(new Set),ey=(0,l.useRef)(X);(0,l.useEffect)(()=>{ey.current=X},[X]),(0,l.useEffect)(()=>{ee("string"==typeof n.query.category?n.query.category:"")},[n.query.category]);let ew=(0,l.useCallback)(async(e,t)=>{let r=null!=e?e:ey.current;(null==t?void 0:t.silent)||(A(!0),C(""));try{let e=await (0,U.HT)({category:r||void 0,limit:5e3});b(e.files||[]),e.initializing&&window.setTimeout(()=>{ew(r,{silent:!0})},3e3)}catch(e){(null==t?void 0:t.silent)||(b([]),C(e instanceof Error?e.message:"文件列表加载失败"))}finally{(null==t?void 0:t.silent)||A(!1)}},[]);(0,l.useEffect)(()=>{ew(X)},[X,ew]);let eb=e=>({id:e.id,type:e.type,title:e.title,description:e.message,status:e.status,percent:e.percent,filePath:e.filePath,chunkCount:e.chunkCount,textLength:e.textLength,extractionMode:e.extractionMode,error:e.error,createdAt:e.createdAt}),ej=(0,l.useCallback)(async()=>{try{let e=(await (0,U.Qx)()).operations.map(eb);en(t=>{let r=new Set(e.map(e=>e.id).filter(Boolean)),a=e.map(e=>{var r;let a=t.find(t=>t.id===e.id);return a?{...a,...e,createdAt:null!=(r=a.createdAt)?r:e.createdAt}:e}),l=t.filter(e=>e.id&&!r.has(e.id)&&"processing"===e.status);return[...a,...l].slice(0,50)})}catch(e){}},[]),e_=(0,l.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];en(r=>{let a=r.findIndex(r=>e.id&&r.id===e.id||t.includes(r.title));if(a>=0){var l;let t=[...r];return t[a]={...r[a],...e,createdAt:null!=(l=r[a].createdAt)?l:e.createdAt},t}return[e,...r].slice(0,50)})},[]);(0,l.useEffect)(()=>{ej()},[ej]);let eA=(0,l.useMemo)(()=>{let e=0,t=0,r=0;for(let a of es)"processing"===a.status?e++:"success"===a.status?t++:("error"===a.status||"warning"===a.status)&&r++;return{processing:e,success:t,error:r}},[es]);(0,l.useEffect)(()=>{eA.processing>0&&em(!1)},[eA.processing]),(0,l.useEffect)(()=>{if(0===eA.processing)return;let e=window.setInterval(()=>{ej()},2e3),t=window.setInterval(()=>{ew(void 0,{silent:!0})},8e3);return()=>{window.clearInterval(e),window.clearInterval(t)}},[ew,ej,eA.processing]),"all"===eu||es.filter(e=>"processing"===eu?"processing"===e.status:"success"===eu?"success"===e.status:"error"!==eu||"error"===e.status||"warning"===e.status);let ez=async e=>{let t=e.filter(e=>{let t=e.webkitRelativePath||e.name;return e.size>0&&!Z.test(e.name)&&!Y.test(t)}),a=e.length-t.length;if(a>0&&r.warning("已跳过 ".concat(a," 个空文件、系统文件、备份文件或压缩包")),0===t.length)return;let l=1===t.length?t[0].name:"".concat(t.length," 个文件");er(!0);let s="".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2));e_({id:s,type:"upload",title:"上传 ".concat(l),description:"等待上传、解析、切片和入库;同路径文件会更新,其他已有文件不会清除",status:"processing",percent:5});try{await (0,U.c1)(t,void 0,s,e=>{e_({id:s,type:"upload",title:"上传 ".concat(l),description:"正在上传文件:".concat(e.uploadedFiles,"/").concat(e.totalFiles,",批次 ").concat(e.batchIndex+1,"/").concat(e.totalBatches),status:"processing",percent:Math.min(5,Math.max(1,Math.round(e.uploadedFiles/Math.max(1,e.totalFiles)*5)))})}),r.info("文件已上传,正在后台解析、切片和入库;同路径文件会更新,其他已有文件不会清除,可在顶部“后台任务”查看进度"),M(""),ee(""),eo([]),ey.current="",await ej(),window.setTimeout(()=>{ew(void 0,{silent:!0})},2e3)}catch(t){let e=t instanceof Error?t.message:"请重试或检查文件格式";r.error(e||"上传失败"),e_({id:s,type:"error",title:"上传失败 ".concat(l),description:e,status:"error",percent:100})}finally{er(!1)}},ek=async()=>{el(!0);let e="reindex-ui-".concat(Date.now());e_({id:e,type:"reindex",title:"重新解析入库",description:"正在提交后台任务",status:"processing",percent:5});try{var t;let a=await (0,U.H1)(),l=a.operationId||e,s=a.job;r.info(a.alreadyRunning?"已有重新解析任务正在后台执行":"已提交重新解析入库任务,可在顶部“后台任务”查看进度"),e_({id:l,type:"reindex",title:(null==s?void 0:s.title)||"重新解析入库",description:(null==s?void 0:s.message)||"后台将重新扫描文件、解析、切片并重建索引",status:(null==s?void 0:s.status)||"processing",percent:null!=(t=null==s?void 0:s.percent)?t:10,error:null==s?void 0:s.error},["重新解析入库"]);for(let e=0;e<360;e++){let e=await (0,U.ax)(l).then(e=>e.job).catch(async()=>(await (0,U.Qx)()).operations.find(e=>e.id===l));if(e){let t="success"===e.status||"error"===e.status;if(e_({id:l,type:"error"===e.status?"error":"reindex",title:"success"===e.status?"重新解析入库完成":"error"===e.status?"重新解析入库失败":e.title,description:e.error||e.message,status:e.status,percent:e.percent,filePath:e.filePath,chunkCount:e.chunkCount,error:e.error}),t){"success"===e.status?r.success(e.message||"重新解析入库完成"):r.error(e.error||e.message||"重新解析入库失败");break}}await new Promise(e=>setTimeout(e,1e3))}await ew(),await ej()}catch(a){let t=a instanceof Error?a.message:"重新解析入库失败";r.error(t),e_({id:e,type:"error",title:"重新解析入库失败",description:t,status:"error",percent:100},["重新解析入库","重新解析入库完成","重新解析入库失败"])}finally{el(!1)}},eC=async e=>{let t="file-reindex-ui-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2));eg(t=>new Set(t).add(e.relativePath)),e_({id:t,type:"reindex",title:"重新解析 ".concat(e.relativePath),description:"正在提交单文件后台任务",status:"processing",percent:5,filePath:e.relativePath});try{var a;let l=await (0,U.HC)(e.relativePath),s=l.operationId||t,n=l.job;r.info(l.alreadyRunning?"已有知识库任务正在后台执行":"已提交单文件重新解析任务"),e_({id:s,type:"reindex",title:(null==n?void 0:n.title)||"重新解析 ".concat(e.relativePath),description:(null==n?void 0:n.message)||"后台将重新解析、分块并入库该文件",status:(null==n?void 0:n.status)||"processing",percent:null!=(a=null==n?void 0:n.percent)?a:10,filePath:(null==n?void 0:n.filePath)||e.relativePath,chunkCount:null==n?void 0:n.chunkCount,error:null==n?void 0:n.error},["重新解析 ".concat(e.relativePath)]);for(let t=0;t<240;t++){let t=await (0,U.ax)(s).then(e=>e.job).catch(async()=>(await (0,U.Qx)()).operations.find(e=>e.id===s));if(t){let a="success"===t.status||"error"===t.status;if(e_({id:s,type:"error"===t.status?"error":"reindex",title:"success"===t.status?"重新解析完成 ".concat(e.relativePath):"error"===t.status?"重新解析失败 ".concat(e.relativePath):t.title,description:t.error||t.message,status:t.status,percent:t.percent,filePath:t.filePath||e.relativePath,chunkCount:t.chunkCount,error:t.error}),await ew(),a){"success"===t.status?r.success(t.message||"单文件重新解析完成"):r.error(t.error||t.message||"单文件重新解析失败");break}}await new Promise(e=>setTimeout(e,1e3))}await ew(),await ej()}catch(l){let a=l instanceof Error?l.message:"单文件重新解析失败";r.error(a),e_({id:t,type:"error",title:"重新解析失败 ".concat(e.relativePath),description:a,status:"error",percent:100,filePath:e.relativePath},["重新解析 ".concat(e.relativePath)])}finally{eg(t=>{let r=new Set(t);return r.delete(e.relativePath),r})}},eS=t=>{let a="selected"===t?eF:"filtered"===t?eP.map(e=>e.relativePath):[],l=w.length;if("all"!==t&&0===a.length||"all"===t&&0===l)return void r.info("没有可删除的文件");let s="all"===t?"删除全部文件 ".concat(l," 个?"):"filtered"===t?"删除当前筛选结果中的文件 ".concat(a.length," 个?"):"删除已选文件 ".concat(a.length," 个?");d.A.confirm({title:s,content:"将同时删除文件、切片、索引和向量记录。此操作不可撤销。",okText:e("common.delete"),cancelText:e("common.cancel"),okButtonProps:{danger:!0},onOk:async()=>{en(e=>[{type:"delete",title:s,description:"正在批量删除文件和索引",status:"processing",percent:10},...e].slice(0,50));try{var e;let s=null!=(e=("all"===t?await (0,U.X8)():"selected"===t?await (0,U.tZ)(eE,eH):await (0,U.SJ)(a)).deleted)?e:"all"===t?l:a.length;r.success("已删除 ".concat(s," 个文件")),eo([]),en(e=>[{type:"delete",title:"批量删除完成",description:"已删除 ".concat(s," 个文件、切片和索引"),status:"success"},...e].slice(0,50)),await ew(),await ej()}catch(e){r.error("批量删除失败"),en(e=>[{type:"error",title:"批量删除失败",description:"请重试",status:"error"},...e].slice(0,50))}}})},eP=(0,l.useMemo)(()=>P?w.filter(e=>e.relativePath.toLowerCase().includes(P.toLowerCase())):w,[P,w]),eM=(0,l.useMemo)(()=>new Set(eP.map(e=>e.relativePath)),[eP]),eN=(0,l.useMemo)(()=>{let e={};for(let r of[...eP].sort((e,t)=>e.relativePath.localeCompare(t.relativePath))){let a=r.relativePath.split("/"),l="";for(let s=0;s<a.length;s++){let n=a[s],i=l;l=l?"".concat(l,"/").concat(n):n;let o=s===a.length-1;if(e[l])o||e[l].isFolder?o&&(e[l].isFolder=!1,e[l].file=r,e[l].fileCount=1,e[l].totalSize=r.fileSize,e[l].totalChunks=r.chunkCount):(e[l].isFolder=!0,e[l].children=[],e[l].fileCount=0,e[l].totalSize=0,e[l].totalChunks=0);else{var t;e[l]={key:l,name:n,isFolder:!o,...o?{file:r,fileCount:1,totalSize:r.fileSize,totalChunks:r.chunkCount}:{children:[],fileCount:0,totalSize:0,totalChunks:0}},i&&(null==(t=e[i])?void 0:t.children)&&e[i].children.push(e[l])}}}let r=e=>{for(let s of e)if(s.children){r(s.children);let e=0,n=0,i=0;for(let r of s.children){var t,a,l;e+=null!=(t=r.fileCount)?t:0,n+=null!=(a=r.totalSize)?a:0,i+=null!=(l=r.totalChunks)?l:0}s.fileCount=e,s.totalSize=n,s.totalChunks=i}},a=e=>e.map(e=>e.children?{...e,children:a(e.children)}:e).filter(e=>{var t,r,a;return!e.isFolder||(null!=(r=e.fileCount)?r:0)>0&&(null!=(a=null==(t=e.children)?void 0:t.length)?a:0)>0}),l=Object.values(e).filter(e=>!e.key.includes("/"));return r(l),a(l)},[eP]),eO=(0,l.useMemo)(()=>{let e=[],t=r=>{for(let a of r)e.push(a.key),a.children&&t(a.children)};return t(eN),e},[eN]),eT=(0,l.useMemo)(()=>new Set([...eM,...eO]),[eO,eM]),eH=(0,l.useMemo)(()=>ei.map(String).filter(e=>!eM.has(e)&&eO.includes(e)),[eO,ei,eM]),eE=(0,l.useMemo)(()=>ei.map(String).filter(e=>eM.has(e)),[ei,eM]),eF=(0,l.useMemo)(()=>{let e=new Set;for(let t of eE){let r=w.find(e=>e.relativePath===t);r&&e.add(r.relativePath)}for(let t of eH){let r="".concat(t,"/");for(let t of w)t.relativePath.startsWith(r)&&e.add(t.relativePath)}return Array.from(e)},[w,eE,eH]),eV=eF.length;(0,l.useEffect)(()=>{eo(e=>e.filter(e=>eT.has(String(e))))},[eT]);let eB=(0,l.useMemo)(()=>P?eO:[],[P,eO]);(0,l.useEffect)(()=>{ep(eB)},[eB]);let eI=(e,t)=>{ep(r=>e?[...r,t.key]:r.filter(e=>e!==t.key))},eR=[{title:e("fileName"),dataIndex:"name",key:"name",render:(e,t)=>(0,a.jsxs)("span",{className:G().fileNameCell,children:[t.isFolder?(0,a.jsx)("span",{style:{cursor:"pointer"},onClick:e=>{e.stopPropagation(),eI(!ev.includes(t.key),t)},children:(e=>{let t=e.children;return t&&0!==t.length?(0,a.jsx)(V.A,{style:{color:"#fa8c16",fontSize:15}}):(0,a.jsx)(E.A,{style:{color:"#fa8c16",fontSize:15}})})(t)}):(e=>{if(!e)return(0,a.jsx)(g.A,{style:{fontSize:15}});let t=e.category;return"image"===t?(0,a.jsx)(j,{style:{color:"#eb2f96",fontSize:15}}):"spreadsheet"===t?(0,a.jsx)(z,{style:{color:"#52c41a",fontSize:15}}):"document"===t?(0,a.jsx)(S,{style:{color:"#1677ff",fontSize:15}}):"code"===t?(0,a.jsx)(N,{style:{color:"#fa8c16",fontSize:15}}):"archive"===t?(0,a.jsx)(O.A,{style:{color:"#8c8c8c",fontSize:15}}):"web"===t?(0,a.jsx)(T.A,{style:{color:"#13c2c2",fontSize:15}}):"data"===t?(0,a.jsx)(H.A,{style:{color:"#722ed1",fontSize:15}}):"cad"===t?(0,a.jsx)(E.A,{style:{color:"#fa541c",fontSize:15}}):"diagram"===t?(0,a.jsx)(j,{style:{color:"#a0d911",fontSize:15}}):(0,a.jsx)(F.A,{style:{fontSize:15}})})(t.file),t.isFolder?(0,a.jsx)("span",{className:G().folderName,onClick:e=>{e.stopPropagation(),eI(!ev.includes(t.key),t)},children:t.name}):(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(i(),{className:"min-w-0 max-w-[520px] whitespace-normal break-words leading-relaxed",href:"/knowledge/file-detail?relativePath=".concat(encodeURIComponent(t.key)),children:t.name})})]})},{title:e("fileCategory"),dataIndex:"category",key:"cat",width:110,render:(e,r)=>{var l,s;return r.isFolder?(0,a.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"—"}):(0,a.jsx)(u.A,{children:(0,W.Jm)(null!=(s=null==(l=r.file)?void 0:l.category)?s:"",t)})}},{title:e("fileSize"),dataIndex:"fileSize",key:"size",width:90,render:(e,t)=>{var r,a,l;return(0,W.z3)(t.isFolder?null!=(a=t.totalSize)?a:0:null!=(l=null==(r=t.file)?void 0:r.fileSize)?l:0)}},{title:e("chunksCount"),dataIndex:"chunkCount",key:"chunks",width:80,render:(e,t)=>{var r,l,s;let n=t.isFolder?null!=(l=t.totalChunks)?l:0:null!=(s=null==(r=t.file)?void 0:r.chunkCount)?s:0;return(0,a.jsx)(u.A,{color:n>1?"green":"orange",children:n})}},{title:e("parsingStatus"),dataIndex:"status",key:"status",width:100,render:(e,t)=>{var r,l,s,n;return t.isFolder?(0,a.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"—"}):(0,a.jsx)(u.A,{color:"active"===(n=null==(r=t.file)?void 0:r.status)?"green":"processing"===n||"indexing"===n?"blue":"error"===n?"red":"orange",children:(null==(l=t.file)?void 0:l.errorMessage)||(null==(s=t.file)?void 0:s.status)||"—"})}},{title:e("fileDate"),dataIndex:"mtime",key:"date",width:130,render:(e,r)=>{var l;return r.isFolder?(0,a.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"—"}):(null==(l=r.file)?void 0:l.mtime)?new Date(r.file.mtime).toLocaleDateString(t):"—"}},{title:e("source"),key:"source",width:100,render:(t,r)=>r.isFolder?(0,a.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"—"}):(0,a.jsx)(u.A,{color:"cyan",children:e("fileSource")})},{title:"",key:"act",width:80,align:"center",render:(t,l)=>l.isFolder?null:(0,a.jsx)(h.A,{menu:{items:[{key:"reindex",label:e("reindex"),icon:(0,a.jsx)(B.A,{}),onClick:()=>{eC(l.file)}},{type:"divider"},{key:"delete",label:e("delete"),icon:(0,a.jsx)(I.A,{}),danger:!0,onClick:()=>{var t;return t=l.file,void d.A.confirm({title:e("delete"),content:e("deleteConfirm"),okText:e("common.confirm"),cancelText:e("common.cancel"),okButtonProps:{danger:!0},onOk:async()=>{en(e=>[{type:"delete",title:"删除 ".concat(t.relativePath),description:"正在删除文件记录",status:"processing"},...e].slice(0,50));try{await (0,U.xq)(t.relativePath),r.success("已删除"),en(e=>[{type:"delete",title:"删除完成 ".concat(t.relativePath),description:"文件和索引记录已移除",status:"success"},...e].slice(0,50)),eo(e=>e.filter(e=>e!==t.relativePath)),await ew(),await ej()}catch(e){r.error("删除失败"),en(e=>[{type:"error",title:"删除失败 ".concat(t.relativePath),description:"请重试",status:"error"},...e].slice(0,50))}}})}}]},trigger:["click"],children:(0,a.jsx)(f.Ay,{type:"text",size:"small",icon:(0,a.jsx)(R.A,{})})})}],eD=(0,a.jsxs)("div",{className:"flex flex-1 md:flex-none w-full md:w-auto items-center gap-3",children:[(0,a.jsx)(m.A,{placeholder:e("searchPlaceholder"),prefix:(0,a.jsx)(D.A,{className:"text-[var(--colorTextTertiary)]"}),value:P,onChange:e=>{M(e.target.value)},allowClear:!0,className:"max-w-[300px] flex-1 bg-transparent hover:bg-transparent focus:bg-transparent shadow-none",bordered:!1,style:{borderBottom:"1px solid var(--borderColor)",borderRadius:0,paddingLeft:0,paddingRight:0}}),(0,a.jsx)(v.A,{value:X||void 0,onChange:e=>{ee(e||"")},placeholder:e("filterCategory"),allowClear:!0,style:{width:140},variant:"borderless",options:[{label:e("allCategories"),value:""},...K.map(e=>({label:(0,W.Jm)(e,t),value:e}))]}),(0,a.jsx)("div",{className:"w-[1px] h-6 bg-[var(--borderColor)] mx-1"}),(0,a.jsx)(h.A,{menu:{items:[{key:"file",label:e("uploadFiles"),icon:(0,a.jsx)(g.A,{}),onClick:()=>{var e;return null==(e=document.getElementById("kb-file-upload-input"))?void 0:e.click()}},{key:"folder",label:e("uploadFolder"),icon:(0,a.jsx)(E.A,{}),onClick:()=>{var e;return null==(e=document.getElementById("kb-folder-upload-input"))?void 0:e.click()}},{type:"divider"},{key:"reindex",label:e("reindexAll"),icon:(0,a.jsx)(B.A,{}),onClick:()=>{ek()},danger:!0}]},trigger:["click"],children:(0,a.jsx)(f.Ay,{type:"primary",icon:(0,a.jsx)(L.A,{}),loading:et||ea,className:"shadow-none rounded-md px-4",children:e("new")})}),(0,a.jsx)("input",{id:"kb-file-upload-input",type:"file",multiple:!0,hidden:!0,accept:".pdf,.doc,.docx,.txt,.md,.csv,.tsv,.xls,.xlsx,.png,.jpg,.jpeg,.webp,.svg,.dwg,.dxf,.step,.stp,.iges,.igs,.js,.ts,.tsx,.jsx,.py,.go,.java,.cs,.cpp,.c,.h,.json,.jsonl,.yaml,.yml,.xml,.html,.htm,.drawio,.dio,.vsdx,.vdx,.puml,.plantuml,.mmd,.mermaid,.excalidraw",onChange:e=>{var t;let r=Array.from(null!=(t=e.target.files)?t:[]);e.target.value="",ez(r)}}),(0,a.jsx)("input",{id:"kb-folder-upload-input",type:"file",multiple:!0,hidden:!0,webkitdirectory:"",onChange:e=>{var t;let r=Array.from(null!=(t=e.target.files)?t:[]);e.target.value="",ez(r)}})]});return(0,a.jsxs)("div",{className:"h-[calc(100vh-140px)] flex flex-col",children:[(0,a.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4 pb-4 border-b border-[var(--borderColor)] shrink-0 animateFadeIn",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold tracking-tight text-[var(--colorText)] mb-1",children:e("files")}),(0,a.jsx)("p",{className:"text-xs text-[var(--colorTextSecondary)]",children:e("manageRawFiles")})]}),eD]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 py-4 shrink-0 animateFadeIn stagger-1 border-b border-[var(--borderColor)] mb-2",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 border-r border-[var(--borderColor)] pr-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-md bg-[var(--colorBgHover)] flex items-center justify-center text-[var(--colorTextTertiary)]",children:(0,a.jsx)(V.A,{})}),(0,a.jsx)("div",{className:"text-[10px] uppercase tracking-wider font-semibold text-[var(--colorTextTertiary)]",children:e("totalRootFolders")})]}),(0,a.jsx)("div",{className:"text-2xl font-bold text-[var(--colorText)]",children:eN.length}),(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:"目录层级"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 border-r border-[var(--borderColor)] px-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-md bg-[var(--colorBgHover)] flex items-center justify-center text-[var(--colorTextTertiary)]",children:(0,a.jsx)(F.A,{})}),(0,a.jsx)("div",{className:"text-[10px] uppercase tracking-wider font-semibold text-[var(--colorTextTertiary)]",children:e("totalFilesStats")})]}),(0,a.jsx)("div",{className:"text-2xl font-bold text-[var(--colorText)]",children:w.length}),(0,a.jsxs)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:["包含 ",w.filter(e=>"PDF"===e.category).length," 个 PDF"]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 border-r border-[var(--borderColor)] px-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-md bg-[var(--colorOk)]/10 flex items-center justify-center text-[var(--colorOk)]",children:(0,a.jsx)(q.A,{})}),(0,a.jsx)("div",{className:"text-[10px] uppercase tracking-wider font-semibold text-[var(--colorTextTertiary)]",children:e("successfullyParsed")})]}),(0,a.jsx)("div",{className:"text-2xl font-bold text-[var(--colorOk)]",children:w.filter(e=>"success"===e.status).length}),(0,a.jsxs)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:["总计切片: ",w.reduce((e,t)=>e+(t.chunkCount||0),0)]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pl-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-md bg-[var(--colorDanger)]/10 flex items-center justify-center text-[var(--colorDanger)]",children:(0,a.jsx)($.A,{})}),(0,a.jsx)("div",{className:"text-[10px] uppercase tracking-wider font-semibold text-[var(--colorTextTertiary)]",children:e("parsingErrors")})]}),(0,a.jsx)("div",{className:"text-2xl font-bold text-[var(--colorDanger)]",children:w.filter(e=>"error"===e.status).length}),(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:"需手动排查"})]})]}),k&&(0,a.jsx)("div",{className:"p-4 mt-2 bg-[var(--colorDanger)]/10 text-[var(--colorDanger)] rounded-md border border-[var(--colorDanger)]/20",children:k}),(0,a.jsxs)("div",{className:"flex justify-between items-center py-2 shrink-0 animateFadeIn stagger-2",style:{opacity:0},children:[(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] font-medium",children:e("showingMatchingFiles").replace("{count}",String(eP.length))}),(0,a.jsxs)(p.A,{size:8,children:[eV>0&&(0,a.jsxs)(f.Ay,{danger:!0,size:"small",type:"text",icon:(0,a.jsx)(I.A,{}),onClick:()=>eS("selected"),children:[e("deleteSelected")," (",eV,")"]}),(0,a.jsx)(f.Ay,{danger:!0,size:"small",type:"text",disabled:0===w.length,onClick:()=>eS("all"),children:e("deleteAll")})]})]}),(0,a.jsx)("div",{className:"flex-1 min-h-0 bg-[var(--colorBg)] rounded-lg animateFadeIn stagger-3",style:{opacity:0},children:(0,a.jsx)(x.A,{rowKey:"key",columns:eR,dataSource:eN,loading:_&&!et&&!ea,size:"middle",className:"h-full modern-table",scroll:{y:"calc(100vh - 280px)"},expandable:{expandedRowKeys:ev,onExpand:eI,expandIcon:e=>{let{expanded:t,onExpand:r,record:l}=e;return l.isFolder?(0,a.jsx)("button",{type:"button",onClick:e=>r(l,e),className:"w-6 h-6 mr-1 inline-flex items-center justify-center align-middle text-[var(--colorTextTertiary)] hover:text-[var(--colorText)] transition-colors bg-transparent border-0 p-0 leading-none",children:t?(0,a.jsx)(J.A,{size:16}):(0,a.jsx)(Q.A,{size:16})}):(0,a.jsx)("span",{className:"w-6 h-6 inline-flex"})}},locale:{emptyText:_?e("common.loading"):P?e("emptySearch"):e("noFiles")},pagination:!1,rowClassName:e=>"hover:bg-[var(--colorBgHover)] transition-colors ".concat(e.isFolder?"font-medium bg-[var(--colorBgSecondary)]/50":""),rowSelection:{selectedRowKeys:ei,onChange:eo,checkStrictly:!1,getCheckboxProps:e=>{var t;return{disabled:!!e.isFolder&&(null!=(t=e.fileCount)?t:0)===0}}}})})]})}},71242:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"}},85855:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(97109),l=r(35311),s=r(88483);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let i=a.forwardRef((e,t)=>a.createElement(s.A,n({},e,{ref:t,icon:l.A})))},90426:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge/files",function(){return r(64207)}])},90939:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"}},93314:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(97109),l=r(53234),s=r(88483);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let i=a.forwardRef((e,t)=>a.createElement(s.A,n({},e,{ref:t,icon:l.A})))}},e=>{e.O(0,[433,576,985,375,102,289,636,593,792],()=>e(e.s=90426)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[414],{45551:(e,l,t)=>{"use strict";function n(e){if(0===e)return"0 B";let l=Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,l);return"".concat(t.toFixed(+(0!==l))," ").concat(["B","KB","MB","GB","TB"][l])}function a(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";if(!e||e<=0)return"en-US"===l?"Never":"从未";let t=Math.floor(Math.floor((Date.now()-e)/1e3)/60),n=Math.floor(t/60),a=Math.floor(n/24);return a>30?new Date(e).toLocaleDateString(l):"en-US"===l?a>0?"".concat(a,"d ago"):n>0?"".concat(n,"h ago"):t>0?"".concat(t,"m ago"):"Just now":a>0?"".concat(a," 天前"):n>0?"".concat(n," 小时前"):t>0?"".concat(t," 分钟前"):"刚刚"}t.d(l,{Jm:()=>o,fw:()=>a,z3:()=>n});let r={document:"文档",spreadsheet:"表格",image:"图片",cad:"图纸",code:"代码",data:"数据",web:"网页",diagram:"图表",archive:"压缩包",other:"其他"},s={document:"Document",spreadsheet:"Spreadsheet",image:"Image",cad:"CAD",code:"Code",data:"Data",web:"Web",diagram:"Diagram",archive:"Archive",other:"Other"};function o(e){var l;let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return null!=(l=("en-US"===t?s:r)[e])?l:e}},50423:(e,l,t)=>{"use strict";t.r(l),t.d(l,{default:()=>E});var n=t(65321),a=t(97109),r=t(34986),s=t(48321),o=t(17807),c=t(33442),i=t(85114),d=t(2256),u=t(38770),h=t(68787),x=t(54849),g=t(57271),m=t(76506),j=t(11702),A=t(7225),f=t(30486),w=t(99811),v=t(56768),k=t(26619),p=t(93314),y=t(58740),b=t(35459),C=t(23216),S=t(63663),z=t(49484),D=t(6578),N=t(45551);let _=["document","spreadsheet","image","cad","code","data","web","diagram","archive","other"];function E(){var e,l,t,E;let I=(0,s.Vr)(),{locale:T}=(0,s.x_)(),M=(0,r.useRouter)(),{stats:B,loading:F,reload:R}=function(){let[e,l]=(0,a.useState)(null),[t,n]=(0,a.useState)(!1),r=(0,a.useCallback)(async()=>{n(!0);try{l(await (0,D.hc)())}catch(e){}finally{n(!1)}},[]);return(0,a.useEffect)(()=>{r()},[r]),{stats:e,loading:t,reload:r}}(),O=function(){let[e,l]=(0,a.useState)(null);return(0,a.useEffect)(()=>{(0,D.VW)().then(l).catch(()=>{})},[]),e}(),{reindexing:P,reindex:J}=function(){let[e,l]=(0,a.useState)(!1);return{reindexing:e,reindex:(0,a.useCallback)(async()=>{l(!0);try{return await (0,D.H1)(),!0}catch(e){return!1}finally{l(!1)}},[])}}(),[U,V]=(0,a.useState)("document"),[W,H]=(0,a.useState)({count:0,totalSize:0,totalChunks:0}),{message:X}=o.A.useApp(),G=(0,a.useCallback)(async e=>{try{let l=await (0,D.HT)({category:e,limit:1e4}),t=0,n=0;if(Array.isArray(l.files))for(let e of l.files)t+=e.fileSize||0,n+=e.chunkCount||0;H({count:l.total||0,totalSize:t,totalChunks:n})}catch(e){H({count:0,totalSize:0,totalChunks:0})}},[]);(0,a.useEffect)(()=>{G(U)},[U,G]);let K=async()=>{await J()?await Promise.all([R(),G(U)]):X.error(I("common.error"))};return(0,n.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"pageTitle",children:I("knowledge.manageTitle")}),(0,n.jsx)("p",{className:"pageDesc",children:I("knowledge.manageDesc")})]}),(0,n.jsxs)(c.A,{children:[(0,n.jsx)(i.Ay,{icon:(0,n.jsx)(A.A,{}),onClick:()=>M.push("/knowledge/files"),children:I("knowledge.files")}),(0,n.jsx)(i.Ay,{icon:(0,n.jsx)(f.A,{}),onClick:()=>M.push("/knowledge/search"),children:I("knowledge.search")}),(0,n.jsx)(i.Ay,{icon:(0,n.jsx)(w.A,{}),loading:P,onClick:()=>{K()},children:I("knowledge.reindex")})]})]}),(0,n.jsx)(d.A,{gutter:[16,16],children:[{icon:(0,n.jsx)(v.A,{}),label:I("knowledge.totalFiles"),value:null!=(l=null==B?void 0:B.fileCount)?l:0},{icon:(0,n.jsx)(k.A,{}),label:I("knowledge.totalChunks"),value:null!=(t=null==B?void 0:B.chunkCount)?t:0},{icon:(0,n.jsx)(p.A,{}),label:I("knowledge.totalSize"),value:(0,N.z3)(null!=(E=null==B?void 0:B.totalSizeBytes)?E:0)},{icon:(0,n.jsx)(y.A,{}),label:I("knowledge.lastIndexed"),value:(null==B?void 0:B.lastIndexedAt)?(0,N.fw)(B.lastIndexedAt,T):I("common.never")}].map((e,l)=>(0,n.jsx)(u.A,{xs:12,sm:6,children:(0,n.jsx)(h.A,{size:"small",loading:F&&!B,children:(0,n.jsx)(x.A,{title:e.label,value:e.value,prefix:e.icon})})},l))}),(0,n.jsxs)(h.A,{title:I("knowledge.categories"),size:"small",children:[(0,n.jsx)(g.A,{value:U,onChange:e=>V(e),options:_.map(e=>({label:(0,N.Jm)(e,T),value:e})),style:{width:160,marginBottom:16}}),(0,n.jsxs)(d.A,{gutter:[16,16],children:[(0,n.jsx)(u.A,{xs:12,sm:6,children:(0,n.jsx)(x.A,{title:I("knowledge.fileCount"),value:W.count,prefix:(0,n.jsx)(v.A,{style:{color:"var(--colorAccent)"}})})}),(0,n.jsx)(u.A,{xs:12,sm:6,children:(0,n.jsx)(x.A,{title:I("knowledge.totalSize"),value:(0,N.z3)(W.totalSize),prefix:(0,n.jsx)(p.A,{style:{color:"var(--colorWarning)"}})})}),(0,n.jsx)(u.A,{xs:12,sm:6,children:(0,n.jsx)(x.A,{title:"切片数",value:W.totalChunks,prefix:(0,n.jsx)(b.A,{style:{color:"var(--colorOk)"}})})}),(0,n.jsx)(u.A,{xs:12,sm:6,children:(0,n.jsx)(x.A,{title:"平均大小",value:W.count>0?(0,N.z3)(W.totalSize/W.count):"—",prefix:(0,n.jsx)(k.A,{style:{color:"var(--colorDanger)"}})})})]})]}),O&&(0,n.jsx)(h.A,{title:I("knowledge.features"),size:"small",children:(0,n.jsxs)(m.A,{size:"small",column:{xs:1,sm:2},bordered:!0,children:[(0,n.jsx)(m.A.Item,{label:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(C.A,{style:{marginRight:4}}),"Vector Store"]}),children:(0,n.jsx)(j.A,{color:"blue",children:O.vectorStore})}),(0,n.jsx)(m.A.Item,{label:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b.A,{style:{marginRight:4}}),"Embedding"]}),children:(0,n.jsx)(j.A,{color:"purple",children:O.embeddingProvider})}),(0,n.jsxs)(m.A.Item,{label:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S.A,{style:{marginRight:4}}),I("knowledge.featureDedup")]}),children:[(0,n.jsx)(j.A,{color:"green",children:O.dedupEngine}),(0,n.jsx)("div",{className:"text-xs",style:{color:"var(--colorTextSecondary)",marginTop:2},children:I("knowledge.featureDedupDesc")})]}),(0,n.jsxs)(m.A.Item,{label:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(z.A,{style:{marginRight:4}}),I("knowledge.featureChunker")]}),children:[(0,n.jsx)(j.A,{color:"orange",children:O.chunker}),(0,n.jsx)("div",{className:"text-xs",style:{color:"var(--colorTextSecondary)",marginTop:2},children:I("knowledge.featureChunkerDesc")})]}),(null==(e=O.builtinExtractors)?void 0:e.length)>0&&(0,n.jsx)(m.A.Item,{label:"内置提取器",span:2,children:(0,n.jsx)(c.A,{wrap:!0,children:O.builtinExtractors.map(e=>(0,n.jsx)(j.A,{color:"cyan",children:e},e))})})]})})]})}},54178:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge/manage",function(){return t(50423)}])}},e=>{e.O(0,[433,787,506,788,636,593,792],()=>e(e.s=54178)),_N_E=e.O()}]);