From a1dd6437ef4bc50e4097486984cedf86b005cb24 Mon Sep 17 00:00:00 2001 From: yangdx Date: Wed, 26 Mar 2025 19:00:19 +0800 Subject: [PATCH] Update webui assets --- .../assets/{index-CXCx2b5K.js => index-BX3dHkLt.js} | 10 +++++----- lightrag/api/webui/index.html | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) rename lightrag/api/webui/assets/{index-CXCx2b5K.js => index-BX3dHkLt.js} (99%) diff --git a/lightrag/api/webui/assets/index-CXCx2b5K.js b/lightrag/api/webui/assets/index-BX3dHkLt.js similarity index 99% rename from lightrag/api/webui/assets/index-CXCx2b5K.js rename to lightrag/api/webui/assets/index-BX3dHkLt.js index f121e1f6..9a451ee3 100644 --- a/lightrag/api/webui/assets/index-CXCx2b5K.js +++ b/lightrag/api/webui/assets/index-BX3dHkLt.js @@ -1093,7 +1093,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho - \`null\` or \`undefined\` if the progress is indeterminate. Defaulting to \`null\`.`}var Z5=W5,Sie=K5;const Q5=w.forwardRef(({className:e,value:t,...n},r)=>E.jsx(Z5,{ref:r,className:Me("bg-secondary relative h-4 w-full overflow-hidden rounded-full",e),...n,children:E.jsx(Sie,{className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Q5.displayName=Z5.displayName;function Eie(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var BT="ScrollArea",[J5,cke]=wr(BT),[wie,Tr]=J5(BT),eG=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...s}=e,[u,c]=w.useState(null),[d,p]=w.useState(null),[g,m]=w.useState(null),[b,y]=w.useState(null),[v,k]=w.useState(null),[A,x]=w.useState(0),[R,O]=w.useState(0),[_,C]=w.useState(!1),[N,M]=w.useState(!1),I=mt(t,H=>c(H)),D=pp(a);return E.jsx(wie,{scope:n,type:r,dir:D,scrollHideDelay:o,scrollArea:u,viewport:d,onViewportChange:p,content:g,onContentChange:m,scrollbarX:b,onScrollbarXChange:y,scrollbarXEnabled:_,onScrollbarXEnabledChange:C,scrollbarY:v,onScrollbarYChange:k,scrollbarYEnabled:N,onScrollbarYEnabledChange:M,onCornerWidthChange:x,onCornerHeightChange:O,children:E.jsx(Ze.div,{dir:D,...s,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":R+"px",...e.style}})})});eG.displayName=BT;var tG="ScrollAreaViewport",nG=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,s=Tr(tG,n),u=w.useRef(null),c=mt(t,u,s.onViewportChange);return E.jsxs(E.Fragment,{children:[E.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),E.jsx(Ze.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:E.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});nG.displayName=tG;var ca="ScrollAreaScrollbar",UT=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Tr(ca,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=a,u=e.orientation==="horizontal";return w.useEffect(()=>(u?o(!0):s(!0),()=>{u?o(!1):s(!1)}),[u,o,s]),a.type==="hover"?E.jsx(xie,{...r,ref:t,forceMount:n}):a.type==="scroll"?E.jsx(kie,{...r,ref:t,forceMount:n}):a.type==="auto"?E.jsx(rG,{...r,ref:t,forceMount:n}):a.type==="always"?E.jsx(jT,{...r,ref:t}):null});UT.displayName=ca;var xie=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Tr(ca,e.__scopeScrollArea),[o,s]=w.useState(!1);return w.useEffect(()=>{const u=a.scrollArea;let c=0;if(u){const d=()=>{window.clearTimeout(c),s(!0)},p=()=>{c=window.setTimeout(()=>s(!1),a.scrollHideDelay)};return u.addEventListener("pointerenter",d),u.addEventListener("pointerleave",p),()=>{window.clearTimeout(c),u.removeEventListener("pointerenter",d),u.removeEventListener("pointerleave",p)}}},[a.scrollArea,a.scrollHideDelay]),E.jsx(xr,{present:n||o,children:E.jsx(rG,{"data-state":o?"visible":"hidden",...r,ref:t})})}),kie=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Tr(ca,e.__scopeScrollArea),o=e.orientation==="horizontal",s=Np(()=>c("SCROLL_END"),100),[u,c]=Eie("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(u==="idle"){const d=window.setTimeout(()=>c("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(d)}},[u,a.scrollHideDelay,c]),w.useEffect(()=>{const d=a.viewport,p=o?"scrollLeft":"scrollTop";if(d){let g=d[p];const m=()=>{const b=d[p];g!==b&&(c("SCROLL"),s()),g=b};return d.addEventListener("scroll",m),()=>d.removeEventListener("scroll",m)}},[a.viewport,o,c,s]),E.jsx(xr,{present:n||u!=="hidden",children:E.jsx(jT,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ke(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Ke(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),rG=w.forwardRef((e,t)=>{const n=Tr(ca,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,s]=w.useState(!1),u=e.orientation==="horizontal",c=Np(()=>{if(n.viewport){const d=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,a=Tr(ca,e.__scopeScrollArea),o=w.useRef(null),s=w.useRef(0),[u,c]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=lG(u.viewport,u.content),p={...r,sizes:u,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:m=>o.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function g(m,b){return Nie(m,s.current,u,b)}return n==="horizontal"?E.jsx(Tie,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const m=a.viewport.scrollLeft,b=ZO(m,u,a.dir);o.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:m=>{a.viewport&&(a.viewport.scrollLeft=m)},onDragScroll:m=>{a.viewport&&(a.viewport.scrollLeft=g(m,a.dir))}}):n==="vertical"?E.jsx(Aie,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const m=a.viewport.scrollTop,b=ZO(m,u);o.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:m=>{a.viewport&&(a.viewport.scrollTop=m)},onDragScroll:m=>{a.viewport&&(a.viewport.scrollTop=g(m))}}):null}),Tie=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=Tr(ca,e.__scopeScrollArea),[s,u]=w.useState(),c=w.useRef(null),d=mt(t,c,o.onScrollbarXChange);return w.useEffect(()=>{c.current&&u(getComputedStyle(c.current))},[c]),E.jsx(oG,{"data-orientation":"horizontal",...a,ref:d,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":_p(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,g)=>{if(o.viewport){const m=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(m),cG(m,g)&&p.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Mf(s.paddingLeft),paddingEnd:Mf(s.paddingRight)}})}})}),Aie=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=Tr(ca,e.__scopeScrollArea),[s,u]=w.useState(),c=w.useRef(null),d=mt(t,c,o.onScrollbarYChange);return w.useEffect(()=>{c.current&&u(getComputedStyle(c.current))},[c]),E.jsx(oG,{"data-orientation":"vertical",...a,ref:d,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":_p(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,g)=>{if(o.viewport){const m=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(m),cG(m,g)&&p.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Mf(s.paddingTop),paddingEnd:Mf(s.paddingBottom)}})}})}),[Rie,aG]=J5(ca),oG=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:u,onThumbPositionChange:c,onDragScroll:d,onWheelScroll:p,onResize:g,...m}=e,b=Tr(ca,n),[y,v]=w.useState(null),k=mt(t,I=>v(I)),A=w.useRef(null),x=w.useRef(""),R=b.viewport,O=r.content-r.viewport,_=yn(p),C=yn(c),N=Np(g,10);function M(I){if(A.current){const D=I.clientX-A.current.left,H=I.clientY-A.current.top;d({x:D,y:H})}}return w.useEffect(()=>{const I=D=>{const H=D.target;(y==null?void 0:y.contains(H))&&_(D,O)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[R,y,O,_]),w.useEffect(C,[r,C]),zs(y,N),zs(b.content,N),E.jsx(Rie,{scope:n,scrollbar:y,hasThumb:a,onThumbChange:yn(o),onThumbPointerUp:yn(s),onThumbPositionChange:C,onThumbPointerDown:yn(u),children:E.jsx(Ze.div,{...m,ref:k,style:{position:"absolute",...m.style},onPointerDown:Ke(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),A.current=y.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),M(I))}),onPointerMove:Ke(e.onPointerMove,M),onPointerUp:Ke(e.onPointerUp,I=>{const D=I.target;D.hasPointerCapture(I.pointerId)&&D.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=x.current,b.viewport&&(b.viewport.style.scrollBehavior=""),A.current=null})})})}),Lf="ScrollAreaThumb",iG=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=aG(Lf,e.__scopeScrollArea);return E.jsx(xr,{present:n||a.hasThumb,children:E.jsx(Cie,{ref:t,...r})})}),Cie=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=Tr(Lf,n),s=aG(Lf,n),{onThumbPositionChange:u}=s,c=mt(t,g=>s.onThumbChange(g)),d=w.useRef(void 0),p=Np(()=>{d.current&&(d.current(),d.current=void 0)},100);return w.useEffect(()=>{const g=o.viewport;if(g){const m=()=>{if(p(),!d.current){const b=Oie(g,u);d.current=b,u()}};return u(),g.addEventListener("scroll",m),()=>g.removeEventListener("scroll",m)}},[o.viewport,p,u]),E.jsx(Ze.div,{"data-state":s.hasThumb?"visible":"hidden",...a,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ke(e.onPointerDownCapture,g=>{const b=g.target.getBoundingClientRect(),y=g.clientX-b.left,v=g.clientY-b.top;s.onThumbPointerDown({x:y,y:v})}),onPointerUp:Ke(e.onPointerUp,s.onThumbPointerUp)})});iG.displayName=Lf;var GT="ScrollAreaCorner",sG=w.forwardRef((e,t)=>{const n=Tr(GT,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?E.jsx(_ie,{...e,ref:t}):null});sG.displayName=GT;var _ie=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=Tr(GT,n),[o,s]=w.useState(0),[u,c]=w.useState(0),d=!!(o&&u);return zs(a.scrollbarX,()=>{var g;const p=((g=a.scrollbarX)==null?void 0:g.offsetHeight)||0;a.onCornerHeightChange(p),c(p)}),zs(a.scrollbarY,()=>{var g;const p=((g=a.scrollbarY)==null?void 0:g.offsetWidth)||0;a.onCornerWidthChange(p),s(p)}),d?E.jsx(Ze.div,{...r,ref:t,style:{width:o,height:u,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Mf(e){return e?parseInt(e,10):0}function lG(e,t){const n=e/t;return isNaN(n)?0:n}function _p(e){const t=lG(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Nie(e,t,n,r="ltr"){const a=_p(n),o=a/2,s=t||o,u=a-s,c=n.scrollbar.paddingStart+s,d=n.scrollbar.size-n.scrollbar.paddingEnd-u,p=n.content-n.viewport,g=r==="ltr"?[0,p]:[p*-1,0];return uG([c,d],g)(e)}function ZO(e,t,n="ltr"){const r=_p(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,s=t.content-t.viewport,u=o-r,c=n==="ltr"?[0,s]:[s*-1,0],d=Ik(e,c);return uG([0,s],[0,u])(d)}function uG(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function cG(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},s=n.left!==o.left,u=n.top!==o.top;(s||u)&&t(),n=o,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function Np(e,t){const n=yn(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function zs(e,t){const n=yn(t);Rn(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}var dG=eG,Iie=nG,Die=sG;const fG=w.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(dG,{ref:r,className:Me("relative overflow-hidden",e),...n,children:[E.jsx(Iie,{className:"h-full w-full rounded-[inherit]",children:t}),E.jsx(pG,{}),E.jsx(Die,{})]}));fG.displayName=dG.displayName;const pG=w.forwardRef(({className:e,orientation:t="vertical",...n},r)=>E.jsx(UT,{ref:r,orientation:t,className:Me("flex touch-none transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:E.jsx(iG,{className:"bg-border relative flex-1 rounded-full"})}));pG.displayName=UT.displayName;function l0(e,t={}){const{decimals:n=0,sizeType:r="normal"}=t,a=["Bytes","KB","MB","GB","TB"],o=["Bytes","KiB","MiB","GiB","TiB"];if(e===0)return"0 Byte";const s=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,s)).toFixed(n)} ${r==="accurate"?o[s]??"Bytes":a[s]??"Bytes"}`}function Lie(e){const{value:t,onValueChange:n,onUpload:r,progresses:a,accept:o=mV,maxSize:s=1024*1024*200,maxFileCount:u=1,multiple:c=!1,disabled:d=!1,description:p,className:g,...m}=e,[b,y]=Ba({prop:t,onChange:n}),v=w.useCallback((x,R)=>{if(!c&&u===1&&x.length>1){Ft.error("Cannot upload more than 1 file at a time");return}if(((b==null?void 0:b.length)??0)+x.length>u){Ft.error(`Cannot upload more than ${u} files`);return}const O=x.map(C=>Object.assign(C,{preview:URL.createObjectURL(C)})),_=b?[...b,...O]:O;if(y(_),R.length>0&&R.forEach(({file:C})=>{Ft.error(`File ${C.name} was rejected`)}),r&&_.length>0&&_.length<=u){const C=_.length>0?`${_.length} files`:"file";Ft.promise(r(_),{loading:`Uploading ${C}...`,success:()=>(y([]),`${C} uploaded`),error:`Failed to upload ${C}`})}},[b,u,c,r,y]);function k(x){if(!b)return;const R=b.filter((O,_)=>_!==x);y(R),n==null||n(R)}w.useEffect(()=>()=>{b&&b.forEach(x=>{gG(x)&&URL.revokeObjectURL(x.preview)})},[]);const A=d||((b==null?void 0:b.length)??0)>=u;return E.jsxs("div",{className:"relative flex flex-col gap-6 overflow-hidden",children:[E.jsx(Cp,{onDrop:v,accept:o,maxSize:s,maxFiles:u,multiple:u>1||c,disabled:A,children:({getRootProps:x,getInputProps:R,isDragActive:O})=>E.jsxs("div",{...x(),className:Me("group border-muted-foreground/25 hover:bg-muted/25 relative grid h-52 w-full cursor-pointer place-items-center rounded-lg border-2 border-dashed px-5 py-2.5 text-center transition","ring-offset-background focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",O&&"border-muted-foreground/50",A&&"pointer-events-none opacity-60",g),...m,children:[E.jsx("input",{...R()}),O?E.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 sm:px-5",children:[E.jsx("div",{className:"rounded-full border border-dashed p-3",children:E.jsx(zk,{className:"text-muted-foreground size-7","aria-hidden":"true"})}),E.jsx("p",{className:"text-muted-foreground font-medium",children:"Drop the files here"})]}):E.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 sm:px-5",children:[E.jsx("div",{className:"rounded-full border border-dashed p-3",children:E.jsx(zk,{className:"text-muted-foreground size-7","aria-hidden":"true"})}),E.jsxs("div",{className:"flex flex-col gap-px",children:[E.jsx("p",{className:"text-muted-foreground font-medium",children:"Drag and drop files here, or click to select files"}),p?E.jsx("p",{className:"text-muted-foreground/70 text-sm",children:p}):E.jsxs("p",{className:"text-muted-foreground/70 text-sm",children:["You can upload",u>1?` ${u===1/0?"multiple":u} - files (up to ${l0(s)} each)`:` a file with ${l0(s)}`,"Supported formats: TXT, MD, DOCX, PDF, PPTX, RTF, ODT, EPUB, HTML, HTM, TEX, JSON, XML, YAML, YML, CSV, LOG, CONF, INI, PROPERTIES, SQL, BAT, SH, C, CPP, PY, JAVA, JS, TS, SWIFT, GO, RB, PHP, CSS, SCSS, LESS"]})]})]})]})}),b!=null&&b.length?E.jsx(fG,{className:"h-fit w-full px-3",children:E.jsx("div",{className:"flex max-h-48 flex-col gap-4",children:b==null?void 0:b.map((x,R)=>E.jsx(Mie,{file:x,onRemove:()=>k(R),progress:a==null?void 0:a[x.name]},R))})}):null]})}function Mie({file:e,progress:t,onRemove:n}){return E.jsxs("div",{className:"relative flex items-center gap-2.5",children:[E.jsxs("div",{className:"flex flex-1 gap-2.5",children:[gG(e)?E.jsx(Pie,{file:e}):null,E.jsxs("div",{className:"flex w-full flex-col gap-2",children:[E.jsxs("div",{className:"flex flex-col gap-px",children:[E.jsx("p",{className:"text-foreground/80 line-clamp-1 text-sm font-medium",children:e.name}),E.jsx("p",{className:"text-muted-foreground text-xs",children:l0(e.size)})]}),t?E.jsx(Q5,{value:t}):null]})]}),E.jsx("div",{className:"flex items-center gap-2",children:E.jsxs(pt,{type:"button",variant:"outline",size:"icon",className:"size-7",onClick:n,children:[E.jsx(N3,{className:"size-4","aria-hidden":"true"}),E.jsx("span",{className:"sr-only",children:"Remove file"})]})})]})}function gG(e){return"preview"in e&&typeof e.preview=="string"}function Pie({file:e}){return e.type.startsWith("image/")?E.jsx("div",{className:"aspect-square shrink-0 rounded-md object-cover"}):E.jsx(KZ,{className:"text-muted-foreground size-10","aria-hidden":"true"})}function Fie(){const{t:e}=Dt(),[t,n]=w.useState(!1),[r,a]=w.useState(!1),[o,s]=w.useState({}),u=w.useCallback(async c=>{a(!0);try{await Promise.all(c.map(async d=>{try{const p=await IV(d,g=>{console.debug(e("documentPanel.uploadDocuments.uploading",{name:d.name,percent:g})),s(m=>({...m,[d.name]:g}))});p.status==="success"?Ft.success(e("documentPanel.uploadDocuments.success",{name:d.name})):Ft.error(e("documentPanel.uploadDocuments.failed",{name:d.name,message:p.message}))}catch(p){Ft.error(e("documentPanel.uploadDocuments.error",{name:d.name,error:tr(p)}))}}))}catch(d){Ft.error(e("documentPanel.uploadDocuments.generalError",{error:tr(d)}))}finally{a(!1)}},[a,s]);return E.jsxs(NT,{open:t,onOpenChange:c=>{r&&!c||n(c)},children:[E.jsx(b5,{asChild:!0,children:E.jsxs(pt,{variant:"default",side:"bottom",tooltip:e("documentPanel.uploadDocuments.tooltip"),size:"sm",children:[E.jsx(zk,{})," ",e("documentPanel.uploadDocuments.button")]})}),E.jsxs(Ep,{className:"sm:max-w-xl",onCloseAutoFocus:c=>c.preventDefault(),children:[E.jsxs(wp,{children:[E.jsx(xp,{children:e("documentPanel.uploadDocuments.title")}),E.jsx(kp,{children:e("documentPanel.uploadDocuments.description")})]}),E.jsx(Lie,{maxFileCount:1/0,maxSize:200*1024*1024,description:e("documentPanel.uploadDocuments.fileTypes"),onUpload:u,progresses:o,disabled:r})]})]})}function zie(){const{t:e}=Dt(),[t,n]=w.useState(!1),r=w.useCallback(async()=>{try{const a=await DV();a.status==="success"?(Ft.success(e("documentPanel.clearDocuments.success")),n(!1)):Ft.error(e("documentPanel.clearDocuments.failed",{message:a.message}))}catch(a){Ft.error(e("documentPanel.clearDocuments.error",{error:tr(a)}))}},[n,e]);return E.jsxs(NT,{open:t,onOpenChange:n,children:[E.jsx(b5,{asChild:!0,children:E.jsxs(pt,{variant:"outline",side:"bottom",tooltip:e("documentPanel.clearDocuments.tooltip"),size:"sm",children:[E.jsx(R3,{})," ",e("documentPanel.clearDocuments.button")]})}),E.jsxs(Ep,{className:"sm:max-w-xl",onCloseAutoFocus:a=>a.preventDefault(),children:[E.jsxs(wp,{children:[E.jsx(xp,{children:e("documentPanel.clearDocuments.title")}),E.jsx(kp,{children:e("documentPanel.clearDocuments.confirm")})]}),E.jsx(pt,{variant:"destructive",onClick:r,children:e("documentPanel.clearDocuments.confirmButton")})]})]})}function Bie({open:e,onOpenChange:t}){var g;const{t:n}=Dt(),[r,a]=w.useState(null),[o,s]=w.useState("center"),[u,c]=w.useState(!1),d=w.useRef(null);w.useEffect(()=>{e&&(s("center"),c(!1))},[e]),w.useEffect(()=>{const m=d.current;!m||u||(m.scrollTop=m.scrollHeight)},[r==null?void 0:r.history_messages,u]);const p=()=>{const m=d.current;if(!m)return;const b=Math.abs(m.scrollHeight-m.scrollTop-m.clientHeight)<1;c(!b)};return w.useEffect(()=>{if(!e)return;const m=async()=>{try{const y=await LV();a(y)}catch(y){Ft.error(n("documentPanel.pipelineStatus.errors.fetchFailed",{error:tr(y)}))}};m();const b=setInterval(m,2e3);return()=>clearInterval(b)},[e,n]),E.jsx(NT,{open:e,onOpenChange:t,children:E.jsxs(Ep,{className:Me("sm:max-w-[600px] transition-all duration-200 fixed",o==="left"&&"!left-[25%] !translate-x-[-50%] !mx-4",o==="center"&&"!left-1/2 !-translate-x-1/2",o==="right"&&"!left-[75%] !translate-x-[-50%] !mx-4"),children:[E.jsx(kp,{className:"sr-only",children:r!=null&&r.job_name?`${n("documentPanel.pipelineStatus.jobName")}: ${r.job_name}, ${n("documentPanel.pipelineStatus.progress")}: ${r.cur_batch}/${r.batchs}`:n("documentPanel.pipelineStatus.noActiveJob")}),E.jsxs(wp,{className:"flex flex-row items-center",children:[E.jsx(xp,{className:"flex-1",children:n("documentPanel.pipelineStatus.title")}),E.jsxs("div",{className:"flex items-center gap-2 mr-8",children:[E.jsx(pt,{variant:"ghost",size:"icon",className:Me("h-6 w-6",o==="left"&&"bg-zinc-200 text-zinc-800 hover:bg-zinc-300 dark:bg-zinc-700 dark:text-zinc-200 dark:hover:bg-zinc-600"),onClick:()=>s("left"),children:E.jsx(FZ,{className:"h-4 w-4"})}),E.jsx(pt,{variant:"ghost",size:"icon",className:Me("h-6 w-6",o==="center"&&"bg-zinc-200 text-zinc-800 hover:bg-zinc-300 dark:bg-zinc-700 dark:text-zinc-200 dark:hover:bg-zinc-600"),onClick:()=>s("center"),children:E.jsx(MZ,{className:"h-4 w-4"})}),E.jsx(pt,{variant:"ghost",size:"icon",className:Me("h-6 w-6",o==="right"&&"bg-zinc-200 text-zinc-800 hover:bg-zinc-300 dark:bg-zinc-700 dark:text-zinc-200 dark:hover:bg-zinc-600"),onClick:()=>s("right"),children:E.jsx(BZ,{className:"h-4 w-4"})})]})]}),E.jsxs("div",{className:"space-y-4 pt-4",children:[E.jsxs("div",{className:"flex items-center gap-4",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsxs("div",{className:"text-sm font-medium",children:[n("documentPanel.pipelineStatus.busy"),":"]}),E.jsx("div",{className:`h-2 w-2 rounded-full ${r!=null&&r.busy?"bg-green-500":"bg-gray-300"}`})]}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsxs("div",{className:"text-sm font-medium",children:[n("documentPanel.pipelineStatus.requestPending"),":"]}),E.jsx("div",{className:`h-2 w-2 rounded-full ${r!=null&&r.request_pending?"bg-green-500":"bg-gray-300"}`})]})]}),E.jsxs("div",{className:"rounded-md border p-3 space-y-2",children:[E.jsxs("div",{children:[n("documentPanel.pipelineStatus.jobName"),": ",(r==null?void 0:r.job_name)||"-"]}),E.jsxs("div",{className:"flex justify-between",children:[E.jsxs("span",{children:[n("documentPanel.pipelineStatus.startTime"),": ",r!=null&&r.job_start?new Date(r.job_start).toLocaleString():"-"]}),E.jsxs("span",{children:[n("documentPanel.pipelineStatus.progress"),": ",r?`${r.cur_batch}/${r.batchs}`:"-"]})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsxs("div",{className:"text-sm font-medium",children:[n("documentPanel.pipelineStatus.latestMessage"),":"]}),E.jsx("div",{className:"font-mono text-sm rounded-md bg-zinc-800 text-zinc-100 p-3",children:(r==null?void 0:r.latest_message)||"-"})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsxs("div",{className:"text-sm font-medium",children:[n("documentPanel.pipelineStatus.historyMessages"),":"]}),E.jsx("div",{ref:d,onScroll:p,className:"font-mono text-sm rounded-md bg-zinc-800 text-zinc-100 p-3 overflow-y-auto min-h-[7.5em] max-h-[40vh]",children:(g=r==null?void 0:r.history_messages)!=null&&g.length?r.history_messages.map((m,b)=>E.jsx("div",{children:m},b)):"-"})]})]})]})})}const Uie=(e,t=20)=>{if(!e.file_path||typeof e.file_path!="string"||e.file_path.trim()==="")return e.id;const n=e.file_path.split("/"),r=n[n.length-1];return!r||r.trim()===""?e.id:r.length>t?r.slice(0,t)+"...":r},jie=` + files (up to ${l0(s)} each)`:` a file with ${l0(s)}`,"Supported formats: TXT, MD, DOCX, PDF, PPTX, RTF, ODT, EPUB, HTML, HTM, TEX, JSON, XML, YAML, YML, CSV, LOG, CONF, INI, PROPERTIES, SQL, BAT, SH, C, CPP, PY, JAVA, JS, TS, SWIFT, GO, RB, PHP, CSS, SCSS, LESS"]})]})]})]})}),b!=null&&b.length?E.jsx(fG,{className:"h-fit w-full px-3",children:E.jsx("div",{className:"flex max-h-48 flex-col gap-4",children:b==null?void 0:b.map((x,R)=>E.jsx(Mie,{file:x,onRemove:()=>k(R),progress:a==null?void 0:a[x.name]},R))})}):null]})}function Mie({file:e,progress:t,onRemove:n}){return E.jsxs("div",{className:"relative flex items-center gap-2.5",children:[E.jsxs("div",{className:"flex flex-1 gap-2.5",children:[gG(e)?E.jsx(Pie,{file:e}):null,E.jsxs("div",{className:"flex w-full flex-col gap-2",children:[E.jsxs("div",{className:"flex flex-col gap-px",children:[E.jsx("p",{className:"text-foreground/80 line-clamp-1 text-sm font-medium",children:e.name}),E.jsx("p",{className:"text-muted-foreground text-xs",children:l0(e.size)})]}),t?E.jsx(Q5,{value:t}):null]})]}),E.jsx("div",{className:"flex items-center gap-2",children:E.jsxs(pt,{type:"button",variant:"outline",size:"icon",className:"size-7",onClick:n,children:[E.jsx(N3,{className:"size-4","aria-hidden":"true"}),E.jsx("span",{className:"sr-only",children:"Remove file"})]})})]})}function gG(e){return"preview"in e&&typeof e.preview=="string"}function Pie({file:e}){return e.type.startsWith("image/")?E.jsx("div",{className:"aspect-square shrink-0 rounded-md object-cover"}):E.jsx(KZ,{className:"text-muted-foreground size-10","aria-hidden":"true"})}function Fie(){const{t:e}=Dt(),[t,n]=w.useState(!1),[r,a]=w.useState(!1),[o,s]=w.useState({}),u=w.useCallback(async c=>{a(!0);try{await Promise.all(c.map(async d=>{try{const p=await IV(d,g=>{console.debug(e("documentPanel.uploadDocuments.uploading",{name:d.name,percent:g})),s(m=>({...m,[d.name]:g}))});p.status==="success"?Ft.success(e("documentPanel.uploadDocuments.success",{name:d.name})):Ft.error(e("documentPanel.uploadDocuments.failed",{name:d.name,message:p.message}))}catch(p){Ft.error(e("documentPanel.uploadDocuments.error",{name:d.name,error:tr(p)}))}}))}catch(d){Ft.error(e("documentPanel.uploadDocuments.generalError",{error:tr(d)}))}finally{a(!1)}},[a,s]);return E.jsxs(NT,{open:t,onOpenChange:c=>{r&&!c||n(c)},children:[E.jsx(b5,{asChild:!0,children:E.jsxs(pt,{variant:"default",side:"bottom",tooltip:e("documentPanel.uploadDocuments.tooltip"),size:"sm",children:[E.jsx(zk,{})," ",e("documentPanel.uploadDocuments.button")]})}),E.jsxs(Ep,{className:"sm:max-w-xl",onCloseAutoFocus:c=>c.preventDefault(),children:[E.jsxs(wp,{children:[E.jsx(xp,{children:e("documentPanel.uploadDocuments.title")}),E.jsx(kp,{children:e("documentPanel.uploadDocuments.description")})]}),E.jsx(Lie,{maxFileCount:1/0,maxSize:200*1024*1024,description:e("documentPanel.uploadDocuments.fileTypes"),onUpload:u,progresses:o,disabled:r})]})]})}function zie(){const{t:e}=Dt(),[t,n]=w.useState(!1),r=w.useCallback(async()=>{try{const a=await DV();a.status==="success"?(Ft.success(e("documentPanel.clearDocuments.success")),n(!1)):Ft.error(e("documentPanel.clearDocuments.failed",{message:a.message}))}catch(a){Ft.error(e("documentPanel.clearDocuments.error",{error:tr(a)}))}},[n,e]);return E.jsxs(NT,{open:t,onOpenChange:n,children:[E.jsx(b5,{asChild:!0,children:E.jsxs(pt,{variant:"outline",side:"bottom",tooltip:e("documentPanel.clearDocuments.tooltip"),size:"sm",children:[E.jsx(R3,{})," ",e("documentPanel.clearDocuments.button")]})}),E.jsxs(Ep,{className:"sm:max-w-xl",onCloseAutoFocus:a=>a.preventDefault(),children:[E.jsxs(wp,{children:[E.jsx(xp,{children:e("documentPanel.clearDocuments.title")}),E.jsx(kp,{children:e("documentPanel.clearDocuments.confirm")})]}),E.jsx(pt,{variant:"destructive",onClick:r,children:e("documentPanel.clearDocuments.confirmButton")})]})]})}function Bie({open:e,onOpenChange:t}){var g;const{t:n}=Dt(),[r,a]=w.useState(null),[o,s]=w.useState("center"),[u,c]=w.useState(!1),d=w.useRef(null);w.useEffect(()=>{e&&(s("center"),c(!1))},[e]),w.useEffect(()=>{const m=d.current;!m||u||(m.scrollTop=m.scrollHeight)},[r==null?void 0:r.history_messages,u]);const p=()=>{const m=d.current;if(!m)return;const b=Math.abs(m.scrollHeight-m.scrollTop-m.clientHeight)<1;c(!b)};return w.useEffect(()=>{if(!e)return;const m=async()=>{try{const y=await LV();a(y)}catch(y){Ft.error(n("documentPanel.pipelineStatus.errors.fetchFailed",{error:tr(y)}))}};m();const b=setInterval(m,2e3);return()=>clearInterval(b)},[e,n]),E.jsx(NT,{open:e,onOpenChange:t,children:E.jsxs(Ep,{className:Me("sm:max-w-[600px] transition-all duration-200 fixed",o==="left"&&"!left-[25%] !translate-x-[-50%] !mx-4",o==="center"&&"!left-1/2 !-translate-x-1/2",o==="right"&&"!left-[75%] !translate-x-[-50%] !mx-4"),children:[E.jsx(kp,{className:"sr-only",children:r!=null&&r.job_name?`${n("documentPanel.pipelineStatus.jobName")}: ${r.job_name}, ${n("documentPanel.pipelineStatus.progress")}: ${r.cur_batch}/${r.batchs}`:n("documentPanel.pipelineStatus.noActiveJob")}),E.jsxs(wp,{className:"flex flex-row items-center",children:[E.jsx(xp,{className:"flex-1",children:n("documentPanel.pipelineStatus.title")}),E.jsxs("div",{className:"flex items-center gap-2 mr-8",children:[E.jsx(pt,{variant:"ghost",size:"icon",className:Me("h-6 w-6",o==="left"&&"bg-zinc-200 text-zinc-800 hover:bg-zinc-300 dark:bg-zinc-700 dark:text-zinc-200 dark:hover:bg-zinc-600"),onClick:()=>s("left"),children:E.jsx(FZ,{className:"h-4 w-4"})}),E.jsx(pt,{variant:"ghost",size:"icon",className:Me("h-6 w-6",o==="center"&&"bg-zinc-200 text-zinc-800 hover:bg-zinc-300 dark:bg-zinc-700 dark:text-zinc-200 dark:hover:bg-zinc-600"),onClick:()=>s("center"),children:E.jsx(MZ,{className:"h-4 w-4"})}),E.jsx(pt,{variant:"ghost",size:"icon",className:Me("h-6 w-6",o==="right"&&"bg-zinc-200 text-zinc-800 hover:bg-zinc-300 dark:bg-zinc-700 dark:text-zinc-200 dark:hover:bg-zinc-600"),onClick:()=>s("right"),children:E.jsx(BZ,{className:"h-4 w-4"})})]})]}),E.jsxs("div",{className:"space-y-4 pt-4",children:[E.jsxs("div",{className:"flex items-center gap-4",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsxs("div",{className:"text-sm font-medium",children:[n("documentPanel.pipelineStatus.busy"),":"]}),E.jsx("div",{className:`h-2 w-2 rounded-full ${r!=null&&r.busy?"bg-green-500":"bg-gray-300"}`})]}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsxs("div",{className:"text-sm font-medium",children:[n("documentPanel.pipelineStatus.requestPending"),":"]}),E.jsx("div",{className:`h-2 w-2 rounded-full ${r!=null&&r.request_pending?"bg-green-500":"bg-gray-300"}`})]})]}),E.jsxs("div",{className:"rounded-md border p-3 space-y-2",children:[E.jsxs("div",{children:[n("documentPanel.pipelineStatus.jobName"),": ",(r==null?void 0:r.job_name)||"-"]}),E.jsxs("div",{className:"flex justify-between",children:[E.jsxs("span",{children:[n("documentPanel.pipelineStatus.startTime"),": ",r!=null&&r.job_start?new Date(r.job_start).toLocaleString():"-"]}),E.jsxs("span",{children:[n("documentPanel.pipelineStatus.progress"),": ",r?`${r.cur_batch}/${r.batchs} ${n("documentPanel.pipelineStatus.unit")}`:"-"]})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsxs("div",{className:"text-sm font-medium",children:[n("documentPanel.pipelineStatus.latestMessage"),":"]}),E.jsx("div",{className:"font-mono text-sm rounded-md bg-zinc-800 text-zinc-100 p-3",children:(r==null?void 0:r.latest_message)||"-"})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsxs("div",{className:"text-sm font-medium",children:[n("documentPanel.pipelineStatus.historyMessages"),":"]}),E.jsx("div",{ref:d,onScroll:p,className:"font-mono text-sm rounded-md bg-zinc-800 text-zinc-100 p-3 overflow-y-auto min-h-[7.5em] max-h-[40vh]",children:(g=r==null?void 0:r.history_messages)!=null&&g.length?r.history_messages.map((m,b)=>E.jsx("div",{children:m},b)):"-"})]})]})]})})}const Uie=(e,t=20)=>{if(!e.file_path||typeof e.file_path!="string"||e.file_path.trim()==="")return e.id;const n=e.file_path.split("/"),r=n[n.length-1];return!r||r.trim()===""?e.id:r.length>t?r.slice(0,t)+"...":r},jie=` @keyframes pulse { 0% { background-color: rgb(255 0 0 / 0.1); @@ -1202,7 +1202,7 @@ ${tr(R)}`,!0)}finally{s(!1),Le.getState().setRetrievalHistory([...v,b,y])}},[r,o {{error}}`,fileTypes:"Supported types: TXT, MD, DOCX, PDF, PPTX, RTF, ODT, EPUB, HTML, HTM, TEX, JSON, XML, YAML, YML, CSV, LOG, CONF, INI, PROPERTIES, SQL, BAT, SH, C, CPP, PY, JAVA, JS, TS, SWIFT, GO, RB, PHP, CSS, SCSS, LESS"},documentManager:{title:"Document Management",scanButton:"Scan",scanTooltip:"Scan documents",pipelineStatusButton:"Pipeline Status",pipelineStatusTooltip:"View pipeline status",uploadedTitle:"Uploaded Documents",uploadedDescription:"List of uploaded documents and their statuses.",emptyTitle:"No Documents",emptyDescription:"There are no uploaded documents yet.",columns:{id:"ID",summary:"Summary",status:"Status",length:"Length",chunks:"Chunks",created:"Created",updated:"Updated",metadata:"Metadata"},status:{completed:"Completed",processing:"Processing",pending:"Pending",failed:"Failed"},errors:{loadFailed:`Failed to load documents {{error}}`,scanFailed:`Failed to scan documents {{error}}`,scanProgressFailed:`Failed to get scan progress -{{error}}`},fileNameLabel:"File Name",showButton:"Show",hideButton:"Hide",showFileNameTooltip:"Show file name",hideFileNameTooltip:"Hide file name"},pipelineStatus:{title:"Pipeline Status",busy:"Pipeline Busy",requestPending:"Reques Pending",jobName:"Job Name",startTime:"Start Time",progress:"Progress",latestMessage:"Latest Message",historyMessages:"History Message",errors:{fetchFailed:`Fail to get pipeline status +{{error}}`},fileNameLabel:"File Name",showButton:"Show",hideButton:"Hide",showFileNameTooltip:"Show file name",hideFileNameTooltip:"Hide file name"},pipelineStatus:{title:"Pipeline Status",busy:"Pipeline Busy",requestPending:"Reques Pending",jobName:"Job Name",startTime:"Start Time",progress:"Progress",unit:"batch",latestMessage:"Latest Message",historyMessages:"History Message",errors:{fetchFailed:`Fail to get pipeline status {{error}}`}}},rxe={sideBar:{settings:{settings:"Settings",healthCheck:"Health Check",showPropertyPanel:"Show Property Panel",showSearchBar:"Show Search Bar",showNodeLabel:"Show Node Label",nodeDraggable:"Node Draggable",showEdgeLabel:"Show Edge Label",hideUnselectedEdges:"Hide Unselected Edges",edgeEvents:"Edge Events",maxQueryDepth:"Max Query Depth",minDegree:"Minimum Degree",maxLayoutIterations:"Max Layout Iterations",depth:"Depth",degree:"Degree",apiKey:"API Key",enterYourAPIkey:"Enter your API key",save:"Save",refreshLayout:"Refresh Layout"},zoomControl:{zoomIn:"Zoom In",zoomOut:"Zoom Out",resetZoom:"Reset Zoom",rotateCamera:"Clockwise Rotate",rotateCameraCounterClockwise:"Counter-Clockwise Rotate"},layoutsControl:{startAnimation:"Continue layout animation",stopAnimation:"Stop layout animation",layoutGraph:"Layout Graph",layouts:{Circular:"Circular",Circlepack:"Circlepack",Random:"Random",Noverlaps:"Noverlaps","Force Directed":"Force Directed","Force Atlas":"Force Atlas"}},fullScreenControl:{fullScreen:"Full Screen",windowed:"Windowed"}},statusIndicator:{connected:"Connected",disconnected:"Disconnected"},statusCard:{unavailable:"Status information unavailable",storageInfo:"Storage Info",workingDirectory:"Working Directory",inputDirectory:"Input Directory",llmConfig:"LLM Configuration",llmBinding:"LLM Binding",llmBindingHost:"LLM Binding Host",llmModel:"LLM Model",maxTokens:"Max Tokens",embeddingConfig:"Embedding Configuration",embeddingBinding:"Embedding Binding",embeddingBindingHost:"Embedding Binding Host",embeddingModel:"Embedding Model",storageConfig:"Storage Configuration",kvStorage:"KV Storage",docStatusStorage:"Doc Status Storage",graphStorage:"Graph Storage",vectorStorage:"Vector Storage"},propertiesView:{node:{title:"Node",id:"ID",labels:"Labels",degree:"Degree",properties:"Properties",relationships:"Relations(within subgraph)",expandNode:"Expand Node",pruneNode:"Prune Node",deleteAllNodesError:"Refuse to delete all nodes in the graph",nodesRemoved:"{{count}} nodes removed, including orphan nodes",noNewNodes:"No expandable nodes found",propertyNames:{description:"Description",entity_id:"Name",entity_type:"Type",source_id:"SrcID",Neighbour:"Neigh"}},edge:{title:"Relationship",id:"ID",type:"Type",source:"Source",target:"Target",properties:"Properties"}},search:{placeholder:"Search nodes...",message:"And {count} others"},graphLabels:{selectTooltip:"Select query label",noLabels:"No labels found",label:"Label",placeholder:"Search labels...",andOthers:"And {count} others",refreshTooltip:"Reload graph data"},emptyGraph:"Graph Is Empty"},axe={chatMessage:{copyTooltip:"Copy to clipboard",copyError:"Failed to copy text to clipboard"},retrieval:{startPrompt:"Start a retrieval by typing your query below",clear:"Clear",send:"Send",placeholder:"Type your query...",error:"Error: Failed to get response"},querySettings:{parametersTitle:"Parameters",parametersDescription:"Configure your query parameters",queryMode:"Query Mode",queryModeTooltip:`Select the retrieval strategy: • Naive: Basic search without advanced techniques • Local: Context-dependent information retrieval @@ -1222,7 +1222,7 @@ ${tr(R)}`,!0)}finally{s(!1),Le.getState().setRetrievalHistory([...v,b,y])}},[r,o {{error}}`,fileTypes:"支持的文件类型:TXT, MD, DOCX, PDF, PPTX, RTF, ODT, EPUB, HTML, HTM, TEX, JSON, XML, YAML, YML, CSV, LOG, CONF, INI, PROPERTIES, SQL, BAT, SH, C, CPP, PY, JAVA, JS, TS, SWIFT, GO, RB, PHP, CSS, SCSS, LESS"},documentManager:{title:"文档管理",scanButton:"扫描",scanTooltip:"扫描文档",pipelineStatusButton:"流水线状态",pipelineStatusTooltip:"查看流水线状态",uploadedTitle:"已上传文档",uploadedDescription:"已上传文档列表及其状态",emptyTitle:"无文档",emptyDescription:"还没有上传任何文档",columns:{id:"ID",summary:"摘要",status:"状态",length:"长度",chunks:"分块",created:"创建时间",updated:"更新时间",metadata:"元数据"},status:{completed:"已完成",processing:"处理中",pending:"等待中",failed:"失败"},errors:{loadFailed:`加载文档失败 {{error}}`,scanFailed:`扫描文档失败 {{error}}`,scanProgressFailed:`获取扫描进度失败 -{{error}}`},fileNameLabel:"文件名",showButton:"显示",hideButton:"隐藏",showFileNameTooltip:"显示文件名",hideFileNameTooltip:"隐藏文件名"},pipelineStatus:{title:"流水线状态",busy:"流水线忙碌",requestPending:"待处理请求",jobName:"作业名称",startTime:"开始时间",progress:"进度",latestMessage:"最新消息",historyMessages:"历史消息",errors:{fetchFailed:`获取流水线状态失败 +{{error}}`},fileNameLabel:"文件名",showButton:"显示",hideButton:"隐藏",showFileNameTooltip:"显示文件名",hideFileNameTooltip:"隐藏文件名"},pipelineStatus:{title:"流水线状态",busy:"流水线忙碌",requestPending:"待处理请求",jobName:"作业名称",startTime:"开始时间",progress:"进度",unit:"批",latestMessage:"最新消息",historyMessages:"历史消息",errors:{fetchFailed:`获取流水线状态失败 {{error}}`}}},fxe={sideBar:{settings:{settings:"设置",healthCheck:"健康检查",showPropertyPanel:"显示属性面板",showSearchBar:"显示搜索栏",showNodeLabel:"显示节点标签",nodeDraggable:"节点可拖动",showEdgeLabel:"显示边标签",hideUnselectedEdges:"隐藏未选中的边",edgeEvents:"边事件",maxQueryDepth:"最大查询深度",minDegree:"最小邻边数",maxLayoutIterations:"最大布局迭代次数",depth:"深度",degree:"邻边",apiKey:"API密钥",enterYourAPIkey:"输入您的API密钥",save:"保存",refreshLayout:"刷新布局"},zoomControl:{zoomIn:"放大",zoomOut:"缩小",resetZoom:"重置缩放",rotateCamera:"顺时针旋转图形",rotateCameraCounterClockwise:"逆时针旋转图形"},layoutsControl:{startAnimation:"继续布局动画",stopAnimation:"停止布局动画",layoutGraph:"图布局",layouts:{Circular:"环形",Circlepack:"圆形打包",Random:"随机",Noverlaps:"无重叠","Force Directed":"力导向","Force Atlas":"力地图"}},fullScreenControl:{fullScreen:"全屏",windowed:"窗口"}},statusIndicator:{connected:"已连接",disconnected:"未连接"},statusCard:{unavailable:"状态信息不可用",storageInfo:"存储信息",workingDirectory:"工作目录",inputDirectory:"输入目录",llmConfig:"LLM配置",llmBinding:"LLM绑定",llmBindingHost:"LLM绑定主机",llmModel:"LLM模型",maxTokens:"最大令牌数",embeddingConfig:"嵌入配置",embeddingBinding:"嵌入绑定",embeddingBindingHost:"嵌入绑定主机",embeddingModel:"嵌入模型",storageConfig:"存储配置",kvStorage:"KV存储",docStatusStorage:"文档状态存储",graphStorage:"图存储",vectorStorage:"向量存储"},propertiesView:{node:{title:"节点",id:"ID",labels:"标签",degree:"度数",properties:"属性",relationships:"关系(子图内)",expandNode:"扩展节点",pruneNode:"修剪节点",deleteAllNodesError:"拒绝删除图中的所有节点",nodesRemoved:"已删除 {{count}} 个节点,包括孤立节点",noNewNodes:"没有发现可以扩展的节点",propertyNames:{description:"描述",entity_id:"名称",entity_type:"类型",source_id:"信源ID",Neighbour:"邻接"}},edge:{title:"关系",id:"ID",type:"类型",source:"源节点",target:"目标节点",properties:"属性"}},search:{placeholder:"搜索节点...",message:"还有 {count} 个"},graphLabels:{selectTooltip:"选择查询标签",noLabels:"未找到标签",label:"标签",placeholder:"搜索标签...",andOthers:"还有 {count} 个",refreshTooltip:"重新加载图形数据"},emptyGraph:"图谱数据为空"},pxe={chatMessage:{copyTooltip:"复制到剪贴板",copyError:"复制文本到剪贴板失败"},retrieval:{startPrompt:"输入查询开始检索",clear:"清空",send:"发送",placeholder:"输入查询...",error:"错误:获取响应失败"},querySettings:{parametersTitle:"参数",parametersDescription:"配置查询参数",queryMode:"查询模式",queryModeTooltip:`选择检索策略: • Naive:基础搜索,无高级技术 • Local:上下文相关信息检索 @@ -1242,7 +1242,7 @@ ${tr(R)}`,!0)}finally{s(!1),Le.getState().setRetrievalHistory([...v,b,y])}},[r,o {{error}}`,fileTypes:"Types pris en charge : TXT, MD, DOCX, PDF, PPTX, RTF, ODT, EPUB, HTML, HTM, TEX, JSON, XML, YAML, YML, CSV, LOG, CONF, INI, PROPERTIES, SQL, BAT, SH, C, CPP, PY, JAVA, JS, TS, SWIFT, GO, RB, PHP, CSS, SCSS, LESS"},documentManager:{title:"Gestion des documents",scanButton:"Scanner",scanTooltip:"Scanner les documents",pipelineStatusButton:"État du Pipeline",pipelineStatusTooltip:"Voir l'état du pipeline",uploadedTitle:"Documents téléchargés",uploadedDescription:"Liste des documents téléchargés et leurs statuts.",emptyTitle:"Aucun document",emptyDescription:"Il n'y a pas encore de documents téléchargés.",columns:{id:"ID",summary:"Résumé",status:"Statut",length:"Longueur",chunks:"Fragments",created:"Créé",updated:"Mis à jour",metadata:"Métadonnées"},status:{completed:"Terminé",processing:"En traitement",pending:"En attente",failed:"Échoué"},errors:{loadFailed:`Échec du chargement des documents {{error}}`,scanFailed:`Échec de la numérisation des documents {{error}}`,scanProgressFailed:`Échec de l'obtention de la progression de la numérisation -{{error}}`},fileNameLabel:"Nom du fichier",showButton:"Afficher",hideButton:"Masquer",showFileNameTooltip:"Afficher le nom du fichier",hideFileNameTooltip:"Masquer le nom du fichier"},pipelineStatus:{title:"État du Pipeline",busy:"Pipeline occupé",requestPending:"Requête en attente",jobName:"Nom du travail",startTime:"Heure de début",progress:"Progression",latestMessage:"Dernier message",historyMessages:"Historique des messages",errors:{fetchFailed:`Échec de la récupération de l'état du pipeline +{{error}}`},fileNameLabel:"Nom du fichier",showButton:"Afficher",hideButton:"Masquer",showFileNameTooltip:"Afficher le nom du fichier",hideFileNameTooltip:"Masquer le nom du fichier"},pipelineStatus:{title:"État du Pipeline",busy:"Pipeline occupé",requestPending:"Requête en attente",jobName:"Nom du travail",startTime:"Heure de début",progress:"Progression",unit:"lot",latestMessage:"Dernier message",historyMessages:"Historique des messages",errors:{fetchFailed:`Échec de la récupération de l'état du pipeline {{error}}`}}},Exe={sideBar:{settings:{settings:"Paramètres",healthCheck:"Vérification de l'état",showPropertyPanel:"Afficher le panneau des propriétés",showSearchBar:"Afficher la barre de recherche",showNodeLabel:"Afficher l'étiquette du nœud",nodeDraggable:"Nœud déplaçable",showEdgeLabel:"Afficher l'étiquette de l'arête",hideUnselectedEdges:"Masquer les arêtes non sélectionnées",edgeEvents:"Événements des arêtes",maxQueryDepth:"Profondeur maximale de la requête",minDegree:"Degré minimum",maxLayoutIterations:"Itérations maximales de mise en page",depth:"Profondeur",degree:"Degré",apiKey:"Clé API",enterYourAPIkey:"Entrez votre clé API",save:"Sauvegarder",refreshLayout:"Actualiser la mise en page"},zoomControl:{zoomIn:"Zoom avant",zoomOut:"Zoom arrière",resetZoom:"Réinitialiser le zoom",rotateCamera:"Rotation horaire",rotateCameraCounterClockwise:"Rotation antihoraire"},layoutsControl:{startAnimation:"Démarrer l'animation de mise en page",stopAnimation:"Arrêter l'animation de mise en page",layoutGraph:"Mettre en page le graphe",layouts:{Circular:"Circulaire",Circlepack:"Paquet circulaire",Random:"Aléatoire",Noverlaps:"Sans chevauchement","Force Directed":"Dirigé par la force","Force Atlas":"Atlas de force"}},fullScreenControl:{fullScreen:"Plein écran",windowed:"Fenêtré"}},statusIndicator:{connected:"Connecté",disconnected:"Déconnecté"},statusCard:{unavailable:"Informations sur l'état indisponibles",storageInfo:"Informations de stockage",workingDirectory:"Répertoire de travail",inputDirectory:"Répertoire d'entrée",llmConfig:"Configuration du modèle de langage",llmBinding:"Liaison du modèle de langage",llmBindingHost:"Hôte de liaison du modèle de langage",llmModel:"Modèle de langage",maxTokens:"Nombre maximum de jetons",embeddingConfig:"Configuration d'incorporation",embeddingBinding:"Liaison d'incorporation",embeddingBindingHost:"Hôte de liaison d'incorporation",embeddingModel:"Modèle d'incorporation",storageConfig:"Configuration de stockage",kvStorage:"Stockage clé-valeur",docStatusStorage:"Stockage de l'état des documents",graphStorage:"Stockage du graphe",vectorStorage:"Stockage vectoriel"},propertiesView:{node:{title:"Nœud",id:"ID",labels:"Étiquettes",degree:"Degré",properties:"Propriétés",relationships:"Relations(dans le sous-graphe)",expandNode:"Développer le nœud",pruneNode:"Élaguer le nœud",deleteAllNodesError:"Refus de supprimer tous les nœuds du graphe",nodesRemoved:"{{count}} nœuds supprimés, y compris les nœuds orphelins",noNewNodes:"Aucun nœud développable trouvé",propertyNames:{description:"Description",entity_id:"Nom",entity_type:"Type",source_id:"ID source",Neighbour:"Voisin"}},edge:{title:"Relation",id:"ID",type:"Type",source:"Source",target:"Cible",properties:"Propriétés"}},search:{placeholder:"Rechercher des nœuds...",message:"Et {{count}} autres"},graphLabels:{selectTooltip:"Sélectionner l'étiquette de la requête",noLabels:"Aucune étiquette trouvée",label:"Étiquette",placeholder:"Rechercher des étiquettes...",andOthers:"Et {{count}} autres",refreshTooltip:"Recharger les données du graphe"},emptyGraph:"Le graphe est vide"},wxe={chatMessage:{copyTooltip:"Copier dans le presse-papiers",copyError:"Échec de la copie du texte dans le presse-papiers"},retrieval:{startPrompt:"Démarrez une récupération en tapant votre requête ci-dessous",clear:"Effacer",send:"Envoyer",placeholder:"Tapez votre requête...",error:"Erreur : Échec de l'obtention de la réponse"},querySettings:{parametersTitle:"Paramètres",parametersDescription:"Configurez vos paramètres de requête",queryMode:"Mode de requête",queryModeTooltip:`Sélectionnez la stratégie de récupération : • Naïf : Recherche de base sans techniques avancées • Local : Récupération d'informations dépendante du contexte @@ -1262,7 +1262,7 @@ ${tr(R)}`,!0)}finally{s(!1),Le.getState().setRetrievalHistory([...v,b,y])}},[r,o {{error}}`,fileTypes:"الأنواع المدعومة: TXT، MD، DOCX، PDF، PPTX، RTF، ODT، EPUB، HTML، HTM، TEX، JSON، XML، YAML، YML، CSV، LOG، CONF، INI، PROPERTIES، SQL، BAT، SH، C، CPP، PY، JAVA، JS، TS، SWIFT، GO، RB، PHP، CSS، SCSS، LESS"},documentManager:{title:"إدارة المستندات",scanButton:"مسح ضوئي",scanTooltip:"مسح المستندات ضوئيًا",pipelineStatusButton:"حالة خط المعالجة",pipelineStatusTooltip:"عرض حالة خط المعالجة",uploadedTitle:"المستندات المرفوعة",uploadedDescription:"قائمة المستندات المرفوعة وحالاتها.",emptyTitle:"لا توجد مستندات",emptyDescription:"لا توجد مستندات مرفوعة بعد.",columns:{id:"المعرف",summary:"الملخص",status:"الحالة",length:"الطول",chunks:"الأجزاء",created:"تم الإنشاء",updated:"تم التحديث",metadata:"البيانات الوصفية"},status:{completed:"مكتمل",processing:"قيد المعالجة",pending:"معلق",failed:"فشل"},errors:{loadFailed:`فشل تحميل المستندات {{error}}`,scanFailed:`فشل مسح المستندات {{error}}`,scanProgressFailed:`فشل الحصول على تقدم المسح -{{error}}`},fileNameLabel:"اسم الملف",showButton:"عرض",hideButton:"إخفاء",showFileNameTooltip:"عرض اسم الملف",hideFileNameTooltip:"إخفاء اسم الملف"},pipelineStatus:{title:"حالة خط المعالجة",busy:"خط المعالجة مشغول",requestPending:"الطلب معلق",jobName:"اسم المهمة",startTime:"وقت البدء",progress:"التقدم",latestMessage:"آخر رسالة",historyMessages:"سجل الرسائل",errors:{fetchFailed:`فشل في جلب حالة خط المعالجة +{{error}}`},fileNameLabel:"اسم الملف",showButton:"عرض",hideButton:"إخفاء",showFileNameTooltip:"عرض اسم الملف",hideFileNameTooltip:"إخفاء اسم الملف"},pipelineStatus:{title:"حالة خط المعالجة",busy:"خط المعالجة مشغول",requestPending:"الطلب معلق",jobName:"اسم المهمة",startTime:"وقت البدء",progress:"التقدم",unit:"دفعة",latestMessage:"آخر رسالة",historyMessages:"سجل الرسائل",errors:{fetchFailed:`فشل في جلب حالة خط المعالجة {{error}}`}}},Nxe={sideBar:{settings:{settings:"الإعدادات",healthCheck:"فحص الحالة",showPropertyPanel:"إظهار لوحة الخصائص",showSearchBar:"إظهار شريط البحث",showNodeLabel:"إظهار تسمية العقدة",nodeDraggable:"العقدة قابلة للسحب",showEdgeLabel:"إظهار تسمية الحافة",hideUnselectedEdges:"إخفاء الحواف غير المحددة",edgeEvents:"أحداث الحافة",maxQueryDepth:"أقصى عمق للاستعلام",minDegree:"الدرجة الدنيا",maxLayoutIterations:"أقصى تكرارات التخطيط",depth:"العمق",degree:"الدرجة",apiKey:"مفتاح واجهة برمجة التطبيقات",enterYourAPIkey:"أدخل مفتاح واجهة برمجة التطبيقات الخاص بك",save:"حفظ",refreshLayout:"تحديث التخطيط"},zoomControl:{zoomIn:"تكبير",zoomOut:"تصغير",resetZoom:"إعادة تعيين التكبير",rotateCamera:"تدوير في اتجاه عقارب الساعة",rotateCameraCounterClockwise:"تدوير عكس اتجاه عقارب الساعة"},layoutsControl:{startAnimation:"بدء حركة التخطيط",stopAnimation:"إيقاف حركة التخطيط",layoutGraph:"تخطيط الرسم البياني",layouts:{Circular:"دائري",Circlepack:"حزمة دائرية",Random:"عشوائي",Noverlaps:"بدون تداخل","Force Directed":"موجه بالقوة","Force Atlas":"أطلس القوة"}},fullScreenControl:{fullScreen:"شاشة كاملة",windowed:"نوافذ"}},statusIndicator:{connected:"متصل",disconnected:"غير متصل"},statusCard:{unavailable:"معلومات الحالة غير متوفرة",storageInfo:"معلومات التخزين",workingDirectory:"دليل العمل",inputDirectory:"دليل الإدخال",llmConfig:"تكوين نموذج اللغة الكبير",llmBinding:"ربط نموذج اللغة الكبير",llmBindingHost:"مضيف ربط نموذج اللغة الكبير",llmModel:"نموذج اللغة الكبير",maxTokens:"أقصى عدد من الرموز",embeddingConfig:"تكوين التضمين",embeddingBinding:"ربط التضمين",embeddingBindingHost:"مضيف ربط التضمين",embeddingModel:"نموذج التضمين",storageConfig:"تكوين التخزين",kvStorage:"تخزين المفتاح-القيمة",docStatusStorage:"تخزين حالة المستند",graphStorage:"تخزين الرسم البياني",vectorStorage:"تخزين المتجهات"},propertiesView:{node:{title:"عقدة",id:"المعرف",labels:"التسميات",degree:"الدرجة",properties:"الخصائص",relationships:"العلاقات (داخل الرسم الفرعي)",expandNode:"توسيع العقدة",pruneNode:"تقليم العقدة",deleteAllNodesError:"رفض حذف جميع العقد في الرسم البياني",nodesRemoved:"تم إزالة {{count}} عقدة، بما في ذلك العقد اليتيمة",noNewNodes:"لم يتم العثور على عقد قابلة للتوسيع",propertyNames:{description:"الوصف",entity_id:"الاسم",entity_type:"النوع",source_id:"معرف المصدر",Neighbour:"الجار"}},edge:{title:"علاقة",id:"المعرف",type:"النوع",source:"المصدر",target:"الهدف",properties:"الخصائص"}},search:{placeholder:"ابحث في العقد...",message:"و {{count}} آخرون"},graphLabels:{selectTooltip:"حدد تسمية الاستعلام",noLabels:"لم يتم العثور على تسميات",label:"التسمية",placeholder:"ابحث في التسميات...",andOthers:"و {{count}} آخرون",refreshTooltip:"إعادة تحميل بيانات الرسم البياني"},emptyGraph:"الرسم البياني فارغ"},Oxe={chatMessage:{copyTooltip:"نسخ إلى الحافظة",copyError:"فشل نسخ النص إلى الحافظة"},retrieval:{startPrompt:"ابدأ الاسترجاع بكتابة استفسارك أدناه",clear:"مسح",send:"إرسال",placeholder:"اكتب استفسارك...",error:"خطأ: فشل الحصول على الرد"},querySettings:{parametersTitle:"المعلمات",parametersDescription:"تكوين معلمات الاستعلام الخاص بك",queryMode:"وضع الاستعلام",queryModeTooltip:`حدد استراتيجية الاسترجاع: • ساذج: بحث أساسي بدون تقنيات متقدمة • محلي: استرجاع معلومات يعتمد على السياق diff --git a/lightrag/api/webui/index.html b/lightrag/api/webui/index.html index c6c44d13..a5a93a46 100644 --- a/lightrag/api/webui/index.html +++ b/lightrag/api/webui/index.html @@ -8,7 +8,7 @@ Lightrag - +