@customize-agent/server 4.54.0 → 4.55.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +22 -22
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/chunks/208.js +22 -22
- package/.next/server/chunks/5547.js +256 -0
- package/.next/server/chunks/5840.js +1 -1
- package/.next/server/chunks/8204.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/api/assets/generated/preview.js +1 -1
- package/.next/server/pages/api/assets/generated/preview.js.nft.json +1 -1
- package/.next/server/pages/api/assets/generated.js +1 -1
- package/.next/server/pages/api/assets/generated.js.nft.json +1 -1
- package/.next/server/pages/api/config/embedding/healthCheck.js.nft.json +1 -1
- package/.next/server/pages/api/documents/export.js +2 -2
- package/.next/server/pages/api/documents/export.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generate.js +2 -2
- package/.next/server/pages/api/documents/generate.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id].js +1 -1
- package/.next/server/pages/api/documents/generated/[id].js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated.js +1 -1
- package/.next/server/pages/api/documents/generated.js.nft.json +1 -1
- package/.next/server/pages/api/documents/templates.js +1 -1
- package/.next/server/pages/api/documents/templates.js.nft.json +1 -1
- package/.next/server/pages/api/jobs/[id].js.nft.json +1 -1
- package/.next/server/pages/api/jobs.js.nft.json +1 -1
- package/.next/server/pages/api/kb/categories.js.nft.json +1 -1
- package/.next/server/pages/api/kb/duplicates.js.nft.json +1 -1
- package/.next/server/pages/api/kb/evaluate.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/detail.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/export.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/open.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/preview-pdf-page.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/reindex.js +1 -1
- package/.next/server/pages/api/kb/files/reindex.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/search.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/tree.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files.js.nft.json +1 -1
- package/.next/server/pages/api/kb/ignore.js.nft.json +1 -1
- package/.next/server/pages/api/kb/intelligence.js +1 -1
- package/.next/server/pages/api/kb/intelligence.js.nft.json +1 -1
- package/.next/server/pages/api/kb/operations.js.nft.json +1 -1
- package/.next/server/pages/api/kb/reindex.js +1 -1
- package/.next/server/pages/api/kb/reindex.js.nft.json +1 -1
- package/.next/server/pages/api/kb/search.js.nft.json +1 -1
- package/.next/server/pages/api/kb/stats.js.nft.json +1 -1
- package/.next/server/pages/api/kb/tags.js.nft.json +1 -1
- package/.next/server/pages/api/kb/upload/complete.js +1 -1
- package/.next/server/pages/api/kb/upload/complete.js.nft.json +1 -1
- package/.next/server/pages/api/kb/upload/progress.js.nft.json +1 -1
- package/.next/server/pages/api/kb/upload.js +1 -1
- package/.next/server/pages/api/kb/upload.js.nft.json +1 -1
- package/.next/server/pages/api/prompt.js.nft.json +1 -1
- package/.next/server/pages/asset-library.html +1 -1
- package/.next/server/pages/document-roles.html +1 -1
- package/.next/server/pages/documents.html +1 -1
- package/.next/server/pages/guide.html +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/knowledge/file-detail.html +1 -1
- package/.next/server/pages/knowledge/files.html +1 -1
- package/.next/server/pages/knowledge/manage.html +1 -1
- package/.next/server/pages/knowledge.html +1 -1
- package/.next/server/pages/models.html +1 -1
- package/.next/server/pages/overview.html +1 -1
- package/.next/server/pages/prompt.html +1 -1
- package/.next/server/pages/settings.html +1 -1
- package/.next/server/pages/system/logs.html +1 -1
- package/.next/server/pages-manifest.json +28 -28
- package/.next/static/chunks/{289-35ac595388bbd018.js → 289-12dfcb3abec1c4b4.js} +1 -1
- package/.next/static/chunks/563-2b116a2500a97dba.js +1 -0
- package/.next/static/chunks/760-f8bb8e969c5e0d57.js +1 -0
- package/.next/static/chunks/788-961761f5858f9189.js +1 -0
- package/.next/static/chunks/pages/{_app-a762db84bfbda479.js → _app-7322818342a3e68f.js} +1 -1
- package/.next/static/chunks/pages/documents-8f11998e3b73d6fa.js +1 -0
- package/.next/static/chunks/pages/knowledge/files-7b78e962e432d199.js +1 -0
- package/.next/static/chunks/pages/knowledge/manage-7535b873ab505397.js +1 -0
- package/.next/static/chunks/pages/prompt-2c242e541f2e77a9.js +1 -0
- package/.next/static/chunks/pages/system/logs-c5a8920c6506a7e8.js +1 -0
- package/.next/static/vHA7SiVNhLW8GvsGxTUrP/_buildManifest.js +1 -0
- package/package.json +2 -2
- package/.next/server/chunks/3145.js +0 -254
- package/.next/static/chunks/563-b12f299d34bb9e44.js +0 -1
- package/.next/static/chunks/65-572a80c5a7c83064.js +0 -1
- package/.next/static/chunks/788-3afeb069ed706ac0.js +0 -1
- package/.next/static/chunks/pages/documents-3051aa127e3020b4.js +0 -1
- package/.next/static/chunks/pages/knowledge/files-8e25066889a85834.js +0 -1
- package/.next/static/chunks/pages/knowledge/manage-d0d0e0716e9d705b.js +0 -1
- package/.next/static/chunks/pages/prompt-5e1fb81efc656866.js +0 -1
- package/.next/static/chunks/pages/system/logs-6f45ef8d862759a2.js +0 -1
- package/.next/static/oMOZp607IVbUKFbFHCjA1/_buildManifest.js +0 -1
- /package/.next/static/{oMOZp607IVbUKFbFHCjA1 → vHA7SiVNhLW8GvsGxTUrP}/_ssgManifest.js +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
`]:{...n(o),animationPlayState:"paused"},[`${i}${e}-leave`]:{...n(o),animationPlayState:"paused"},[`
|
|
8
8
|
${i}${e}-enter${e}-enter-active,
|
|
9
9
|
${i}${e}-appear${e}-appear-active
|
|
10
|
-
`]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}}},5741:(e,t,r)=>{"use strict";function n(e,t){return{motionName:t??`${e}-fade`}}function o(e){let t,r=new Promise(r=>{t=e(()=>{r(!0)})}),n=()=>{t?.()};return n.then=(e,t)=>r.then(e,t),n.promise=r,n}r.d(t,{E:()=>o,V:()=>n})},6551:(e,t,r)=>{"use strict";function n(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{A:()=>n})},6578:(e,t,r)=>{"use strict";r.d(t,{Af:()=>V,Bh:()=>ei,Dl:()=>R,FC:()=>en,FV:()=>S,Fi:()=>l,G8:()=>v,Gi:()=>q,H1:()=>x,HC:()=>c,HT:()=>i,II:()=>Z,JU:()=>H,NH:()=>u,NR:()=>A,OX:()=>N,QG:()=>D,Qx:()=>f,SJ:()=>b,SM:()=>M,UE:()=>U,UQ:()=>L,VW:()=>w,X8:()=>$,Z3:()=>X,_m:()=>K,a6:()=>z,aP:()=>Y,ax:()=>h,bV:()=>F,bZ:()=>et,c1:()=>p,cQ:()=>j,dd:()=>J,dg:()=>k,dw:()=>P,dx:()=>C,f$:()=>_,h0:()=>O,h1:()=>G,hH:()=>ea,hc:()=>a,l2:()=>T,le:()=>er,lv:()=>E,oH:()=>eo,oS:()=>W,r:()=>B,tZ:()=>y,tn:()=>d,u6:()=>ee,v7:()=>I,xC:()=>s,xq:()=>g,zA:()=>m,zr:()=>Q});var n=r(23727);async function o(e,t){let r=await fetch(e,t);if(!r.ok){let e=await r.text(),t=e||"HTTP ".concat(r.status);try{let r=JSON.parse(e);t=r.error||r.message||t}catch(i){var n,o;let a=null==(n=e.match(/<script id="__NEXT_DATA__" type="application\/json">([\s\S]*?)<\/script>/u))?void 0:n[1];if(a)try{t=(null==(o=JSON.parse(a.replace(/"/gu,'"')).err)?void 0:o.message)||"HTTP ".concat(r.status)}catch(e){t="HTTP ".concat(r.status)}}throw Error(t)}return r.json()}async function a(e){let t=e?"?projectRoot=".concat(encodeURIComponent(e)):"";return o("/api/kb/stats".concat(t))}async function i(e){var t,r;let n=new URLSearchParams;return(null==e?void 0:e.projectRoot)&&n.set("projectRoot",e.projectRoot),(null==e?void 0:e.category)&&n.set("category",e.category),(null==e?void 0:e.page)&&n.set("page",String(null!=(t=e.page)?t:1)),(null==e?void 0:e.limit)&&n.set("limit",String(null!=(r=e.limit)?r:50)),o("/api/kb/files?".concat(n))}async function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,r=new URLSearchParams;return t&&r.set("projectRoot",t),e&&r.set("parentPath",e),o("/api/kb/files/tree?".concat(r))}async function s(e,t){let r=new URLSearchParams({relativePath:e});return t&&r.set("projectRoot",t),o("/api/kb/files/detail?".concat(r))}async function c(e,t){return o("/api/kb/files/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:t})})}async function d(e,t,r){return o("/api/kb/files/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,target:t,projectRoot:r})})}class u extends Error{constructor(e){super("上传部分成功:".concat(e.succeededBatches,"/").concat(e.totalBatches," 个批次已上传,").concat(e.failedBatches," 个批次失败")),this.name="PartialUploadError",this.succeededBatches=e.succeededBatches,this.failedBatches=e.failedBatches,this.totalBatches=e.totalBatches,this.failures=e.failures}}async function p(e,t,r,a){var i,l;let s=Number(n.env.NEXT_PUBLIC_CUSTOMIZE_KB_UPLOAD_BATCH_FILES||500),c=Number(n.env.NEXT_PUBLIC_CUSTOMIZE_KB_UPLOAD_BATCH_BYTES||0x8000000),d=Math.max(1,Math.min(4,Number(n.env.NEXT_PUBLIC_CUSTOMIZE_KB_UPLOAD_CONCURRENCY||2))),p=[],f=[],m=0,h=0,g=0;for(let t of e)f.length>0&&(f.length>=s||m+t.size>c)&&(p.push({files:f,offset:h}),f=[],m=0,h=g),f.push(t),m+=t.size,g+=1;f.length>0&&p.push({files:f,offset:h});let b=[],y=[],v=0,$=0;async function x(n){let i,l=p[n],s=new URLSearchParams({batchIndex:String(n),totalBatches:String(p.length)});r&&s.set("uploadId",r);for(let c=0;c<2;c++)try{let i=await o("/api/kb/upload?".concat(s),{method:"POST",body:function(e,t){var r;let n=new FormData;for(let o of(t.projectRoot&&n.append("projectRoot",t.projectRoot),t.uploadId&&n.append("uploadId",t.uploadId),n.append("batchIndex",String(t.batchIndex)),n.append("totalBatches",String(t.totalBatches)),n.append("fileOffset",String(t.fileOffset)),n.append("startIndex",t.startIndex?"1":"0"),n.append("uploadComplete",(null!=(r=t.uploadComplete)?r:t.batchIndex===t.totalBatches-1)?"1":"0"),e))n.append("files",o,o.name),n.append("relativePaths",o.webkitRelativePath||o.name);return n}(l.files,{projectRoot:t,uploadId:r,batchIndex:n,totalBatches:p.length,fileOffset:l.offset,startIndex:0===n,uploadComplete:1===p.length})});b[n]=i,v+=l.files.length,null==a||a({uploadedFiles:v,totalFiles:e.length,batchIndex:n,totalBatches:p.length});return}catch(e){i=e instanceof Error?e:Error(String(e))}y.push({batchIndex:n,files:l.files.slice(0,5).map(e=>e.name),message:(null==i?void 0:i.message)||"上传失败"}),null==a||a({uploadedFiles:v,totalFiles:e.length,batchIndex:n,totalBatches:p.length})}let w=Array.from({length:Math.min(d,p.length)},async()=>{for(;$<p.length;){let e=$++;await x(e)}});await Promise.all(w);let C=p.length-y.length;if(y.length>0&&0===C)throw Error((null==(i=y[0])?void 0:i.message)||"上传失败");if(p.length>1&&C>0){let e=await o("/api/kb/upload/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectRoot:t,uploadId:r})});b.push(e)}if(y.length>0)throw new u({succeededBatches:C,failedBatches:y.length,totalBatches:p.length,failures:y});return null!=(l=b.filter(Boolean).at(-1))?l:{success:!0}}async function f(e){let t=new URLSearchParams({limit:"50"});return e&&t.set("projectRoot",e),o("/api/kb/operations?".concat(t))}async function m(e){var t;let r=new URLSearchParams({limit:String(null!=(t=null==e?void 0:e.limit)?t:50)});return(null==e?void 0:e.projectRoot)&&r.set("projectRoot",e.projectRoot),(null==e?void 0:e.active)&&r.set("active","1"),o("/api/jobs?".concat(r))}async function h(e,t){let r=new URLSearchParams;return t&&r.set("projectRoot",t),o("/api/jobs/".concat(encodeURIComponent(e),"?").concat(r))}async function g(e,t){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:t})})}async function b(e,t){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePaths:e,projectRoot:t})})}async function y(e,t,r){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePaths:e,folderPaths:t,projectRoot:r})})}async function v(e){let t=await fetch("/api/kb/files/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let e="导出失败 (".concat(t.status,")");try{let r=await t.json();(null==r?void 0:r.error)&&(e=r.error)}catch(e){}throw Error(e)}let r=await t.blob(),n=t.headers.get("content-disposition")||"",o=/filename\*=(?:UTF-8'')?([^;]+)/iu.exec(n);return{blob:r,fileName:(null==o?void 0:o[1])?decodeURIComponent(o[1]):"kb-export.txt",exported:Number(t.headers.get("x-export-count")||0),skipped:Number(t.headers.get("x-export-skipped")||0)}}async function $(e){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({all:!0,projectRoot:e})})}async function x(e){return o("/api/kb/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectRoot:e})})}async function w(){return o("/api/kb/features")}async function C(){return o("/api/prompt")}async function E(e){return o("/api/documents/roles".concat(e?"?type=".concat(e):""))}async function k(e){return o("/api/documents/roles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function S(e,t){return o("/api/documents/roles?type=".concat(e,"&id=").concat(encodeURIComponent(t)),{method:"DELETE"})}async function A(e){return o("/api/documents/roles?mode=config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function P(e){return o("/api/documents/roles?mode=config&id=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function R(){return o("/api/documents/templates")}async function M(e,t){let r=t?"&projectRoot=".concat(encodeURIComponent(t)):"";return o("/api/documents/templates?validate=".concat(encodeURIComponent(e)).concat(r))}async function T(e){return o("/api/documents/templates",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function O(e){return o("/api/documents/templates?templateId=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function F(e){return o("/api/documents/templates",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:e})})}async function N(e){return o("/api/documents/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function j(e){let t=e?"?projectRoot=".concat(encodeURIComponent(e)):"";return o("/api/documents/generated".concat(t))}async function I(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,i=new URLSearchParams;t&&i.set("lite","1"),r&&i.set("projectRoot",r),void 0!==a&&Number.isFinite(a)&&i.set("ifUpdatedSince",String(a));let l=i.toString()?"?".concat(i.toString()):"";return o("/api/documents/generated/".concat(encodeURIComponent(e)).concat(l),{signal:n})}async function z(e,t,r){let n=r?"?projectRoot=".concat(encodeURIComponent(r)):"";return o("/api/documents/generated/".concat(encodeURIComponent(e)).concat(n),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function D(e,t){let r=t?"?projectRoot=".concat(encodeURIComponent(t)):"";return o("/api/documents/generated/".concat(encodeURIComponent(e)).concat(r),{method:"DELETE"})}async function B(e,t){return o("/api/documents/generated",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"abort",documentId:e,projectRoot:t})})}async function L(e,t){return o("/api/documents/generated",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"resume",documentId:e,projectRoot:t})})}async function _(e){let t=e?"?projectRoot=".concat(encodeURIComponent(e)):"";return o("/api/assets/generated".concat(t))}async function H(e,t){let r=t?"&projectRoot=".concat(encodeURIComponent(t)):"";return o("/api/assets/generated?id=".concat(encodeURIComponent(e)).concat(r),{method:"DELETE"})}async function W(e,t,r){return o("/api/assets/generated",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,action:"open",target:t,projectRoot:r})})}async function q(e){return o("/api/documents/refine",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function V(e,t){return o("/api/documents/drafts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({draft:e,id:t})})}async function U(e){let t=await fetch("/api/documents/export",{method:"POST",headers:{"Content-Type":"application/json",Accept:"pdf"===e.format?"application/pdf":"*/*"},body:JSON.stringify(e)}),r=t.headers.get("content-type")||"",n=async()=>{let e=await t.text(),r=e||"导出失败";try{var n;let t=JSON.parse(e),o=null==(n=t.issues)?void 0:n.map(e=>e.message).filter(Boolean).slice(0,3).join(";");r=o?"".concat(t.error||"导出失败",":").concat(o):t.message||t.error||r}catch(e){}throw Error(r.length>300?"".concat(r.slice(0,300),"..."):r)};return t.ok||await n(),"pdf"!==e.format||r.includes("application/pdf")||await n(),"docx"!==e.format||r.includes("officedocument.wordprocessingml.document")||await n(),t.blob()}async function X(){return o("/api/config/providers")}async function K(e,t){return o("/api/config/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,...t})})}async function G(e){return o("/api/config/providers/".concat(encodeURIComponent(e)),{method:"DELETE"})}async function Q(){return o("/api/config/models")}async function Y(e){return o("/api/config/models",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function Z(){return o("/api/config/embedding")}async function J(e){return o("/api/config/embedding",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function ee(){return o("/api/config/embedding/healthCheck",{method:"POST"})}async function et(e){return o("/api/config/healthCheck",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})})}async function er(){return o("/api/health")}async function en(){return o("/api/system/stats")}async function eo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return o("/api/system/logs?limit=".concat(e))}async function ea(){return o("/api/system/logs",{method:"DELETE"})}async function ei(e){return o("/api/config/providers/".concat(encodeURIComponent(e)))}},6831:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,X:()=>a});var n=r(97109);let o=n.createContext(!1),a=({children:e,disabled:t})=>{let r=n.useContext(o);return n.createElement(o.Provider,{value:t??r},e)},i=o},7709:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>m,Is:()=>d});var n=r(97109),o=r(15561),a=r(74567),i=r(12754),l=r(18625),s=r(9311),c=r(44444);let d={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},u={motionBase:!0,motionUnit:!0},p={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0,screenXXLMax:!0,screenXXXL:!0,screenXXXLMin:!0},f=(e,t,r)=>{let n=r.getDerivativeToken(e),{override:o,...a}=t,i={...n,override:o};return i=(0,c.A)(i),a&&Object.entries(a).forEach(([e,t])=>{let{theme:r,...n}=t,o=n;r&&(o=f({...i,...n},{override:n},r)),i[e]=o}),i};function m(){let{token:e,hashed:t,theme:r,override:c,cssVar:m,zeroRuntime:h}=n.useContext(i.vG),{csp:g,getPrefixCls:b}=n.useContext(a.QO),y={prefix:m?.prefix??b(),key:m?.key??"css-var-root"},v=`6.5.0-${t||""}`,$=r||l.A,[x,w,C]=(0,o.hV)($,[s.A,e],{salt:v,override:c,getComputedToken:f,cssVar:{...y,unitless:d,ignore:u,preserve:p},nonce:g?.nonce});return[$,C,t?w:"",x,y,!!h]}},7961:(e,t,r)=>{"use strict";r.d(t,{K8:()=>d,L9:()=>o,Nk:()=>i,Y1:()=>m,av:()=>u,dF:()=>a,jk:()=>c,jz:()=>f,t6:()=>s,vj:()=>p});var n=r(15561);let o={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},a=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),i=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),l=new n.Mo("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),s=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),c=(e,t)=>({outline:`${(0,n.zA)(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:["outline-offset","outline"].map(e=>`${e} 0s`).join(", ")}),d=(e,t)=>({"&:focus-visible":c(e,t)}),u=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},...d(e),"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),p=(e,t,r,n)=>{let o=`[class^="${t}"], [class*=" ${t}"]`,a=r?`.${r}`:o,i={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}},l={};return!1!==n&&(l={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[a]:{...l,...i,[o]:i}}},f=e=>({[`.${e}`]:{...i(),[`.${e} .${e}-icon`]:{display:"block"}},[`.${e}-spin`]:{animationName:l,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),m=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...d(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}})},8572:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(90892);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,l=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||(0,n.A)(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},8627:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(13911),o=r(26047);let a={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},i={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},l=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function s(e){let{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:s,offset:c,borderRadius:d,visibleFirst:u}=e,p=t/2,f={},m=(0,n.Ke)({contentRadius:d,limitVerticalRadius:!0});return Object.keys(a).forEach(e=>{let n={...s&&i[e]||a[e],offset:[0,0],dynamicInset:!0};switch(f[e]=n,l.has(e)&&(n.autoArrow=!1),e){case"top":case"topLeft":case"topRight":n.offset[1]=-p-c;break;case"bottom":case"bottomLeft":case"bottomRight":n.offset[1]=p+c;break;case"left":case"leftTop":case"leftBottom":n.offset[0]=-p-c;break;case"right":case"rightTop":case"rightBottom":n.offset[0]=p+c}if(s)switch(e){case"topLeft":case"bottomLeft":n.offset[0]=-m.arrowOffsetHorizontal-p;break;case"topRight":case"bottomRight":n.offset[0]=m.arrowOffsetHorizontal+p;break;case"leftTop":case"rightTop":n.offset[1]=-(2*m.arrowOffsetHorizontal)+p;break;case"leftBottom":case"rightBottom":n.offset[1]=2*m.arrowOffsetHorizontal-p}n.overflow=function(e,t,r,n){if(!1===n)return{adjustX:!1,adjustY:!1};let a=(0,o.Qd)(n)?n:{},i={};switch(e){case"top":case"bottom":i.shiftX=2*t.arrowOffsetHorizontal+r,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=2*t.arrowOffsetVertical+r,i.shiftX=!0,i.adjustX=!0}let l={...i,...a};return l.shiftX||(l.adjustX=!0),l.shiftY||(l.adjustY=!0),l}(e,m,t,r),u&&(n.htmlRegion="visibleFirst")}),f}},9290:(e,t,r)=>{"use strict";r.d(t,{A:()=>H});var n=r(97109),o=r(42644),a=r(3638),i=r(92162),l=r(26047),s=r(38862),c=r(74567),d=r(6831),u=r(27273),p=r(49644),f=r(7709);let m=n.createContext(void 0);var h=r(86099),g=r(83914),b=r(67189);let y=(0,n.forwardRef)((e,t)=>{let{className:r,style:o,children:i,prefixCls:l}=e,s=(0,a.$)(`${l}-icon`,r);return n.createElement("span",{ref:t,className:s,style:o},i)}),v=(0,n.forwardRef)((e,t)=>{let{prefixCls:r,className:o,style:i,iconClassName:l}=e,s=(0,a.$)(`${r}-loading-icon`,o);return n.createElement(y,{prefixCls:r,className:s,style:i,ref:t},n.createElement(g.A,{className:l}))}),$=()=>({width:0,opacity:0,transform:"scale(0)"}),x=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),w=e=>{let{prefixCls:t,loading:r,existIcon:o,className:i,style:l,mount:s}=e;return o?n.createElement(v,{prefixCls:t,className:i,style:l}):n.createElement(b.Ay,{visible:!!r,motionName:`${t}-loading-icon-motion`,motionAppear:!s,motionEnter:!s,motionLeave:!s,removeOnLeave:!0,onAppearStart:$,onAppearActive:x,onEnterStart:$,onEnterActive:x,onLeaveStart:x,onLeaveActive:$},({className:e,style:r},o)=>{let s={...l,...r};return n.createElement(v,{prefixCls:t,className:(0,a.$)(i,e),style:s,ref:o})})};var C=r(15561),E=r(7961),k=r(16666),S=r(28403),A=r(10540);let P=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}});var R=r(38697),M=r(32154),T=r(78012),O=r(44539),F=r(32279);let N=e=>{let{paddingInline:t,onlyIconSize:r,borderColorDisabled:n}=e;return(0,S.oX)(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r,colorBorderDisabled:n})},j=e=>{let t=e.contentFontSize??e.fontSize,r=e.contentFontSizeSM??e.fontSize,n=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??(0,O.k)(t),a=e.contentLineHeightSM??(0,O.k)(r),i=e.contentLineHeightLG??(0,O.k)(n),l=(0,M.z)(new R.kf(e.colorBgSolid),"#fff")?"#000":"#fff",s=T.s.reduce((t,r)=>({...t,[`${r}ShadowColor`]:`0 ${(0,C.zA)(e.controlOutlineWidth)} 0 ${(0,F.A)(e[`${r}1`],e.colorBgContainer)}`}),{}),c=e.colorBgContainerDisabled,d=e.colorBgContainerDisabled;return{...s,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:l,contentFontSize:t,contentFontSizeSM:r,contentFontSizeLG:n,contentLineHeight:o,contentLineHeightSM:a,contentLineHeightLG:i,paddingBlock:Math.max((e.controlHeight-t*o)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-r*a)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-n*i)/2-e.lineWidth,0),defaultBgDisabled:c,dashedBgDisabled:d}},I=(e,t="")=>{let{componentCls:r,controlHeight:n,fontSize:o,borderRadius:a,buttonPaddingHorizontal:i,iconCls:l,buttonPaddingVertical:s,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:o,height:n,padding:`${(0,C.zA)(s)} ${(0,C.zA)(i)}`,borderRadius:a,[`&${r}-icon-only`]:{width:n,[l]:{fontSize:c}}}},{[`${r}${r}-circle${t}`]:{minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}},{[`${r}${r}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${r}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},z=(0,A.OF)("Button",e=>{let t=N(e);return[(e=>{let{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:o,motionDurationSlow:a,motionEaseInOut:i,iconGap:l,calc:s}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:l,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",...(0,k.V)(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:(0,E.Nk)(),"> a":{color:"currentColor"},"&:not(:disabled)":(0,E.K8)(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(e=>`${e} ${a} ${i}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:s(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:s(l).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:s(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:s(l).mul(-1).equal()}}}}}})(t),(e=>I((0,S.oX)(e,{fontSize:e.contentFontSize}),e.componentCls))(t),(e=>I((0,S.oX)(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),`${e.componentCls}-sm`))(t),(e=>I((0,S.oX)(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),`${e.componentCls}-lg`))(t),(e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}})(t),(e=>{let{componentCls:t,antCls:r,lineWidth:n}=e,[o,a]=(0,A.PN)(r,"btn");return{[t]:[{[o("border-width")]:n,[o("border-color")]:"#000",[o("border-color-hover")]:a("border-color"),[o("border-color-active")]:a("border-color"),[o("border-color-disabled")]:a("border-color"),[o("border-style")]:"solid",[o("text-color")]:"#000",[o("text-color-hover")]:a("text-color"),[o("text-color-active")]:a("text-color"),[o("text-color-disabled")]:a("text-color"),[o("bg-color")]:"#ddd",[o("bg-color-hover")]:a("bg-color"),[o("bg-color-active")]:a("bg-color"),[o("bg-color-disabled")]:e.colorBgContainerDisabled,[o("bg-color-container")]:e.colorBgContainer,[o("shadow")]:"none"},{border:[a("border-width"),a("border-style"),a("border-color")].join(" "),color:a("text-color"),backgroundColor:a("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[a("border-width"),a("border-style"),a("border-color-hover")].join(" "),color:a("text-color-hover"),backgroundColor:a("bg-color-hover")},"&:active":{border:[a("border-width"),a("border-style"),a("border-color-active")].join(" "),color:a("text-color-active"),backgroundColor:a("bg-color-active")}}},{[`&${t}-variant-solid`]:{[o("solid-bg-color")]:a("color-base"),[o("solid-bg-color-hover")]:a("color-hover"),[o("solid-bg-color-active")]:a("color-active"),[o("border-color")]:"transparent",[o("text-color")]:e.colorTextLightSolid,[o("bg-color")]:a("solid-bg-color"),[o("bg-color-hover")]:a("solid-bg-color-hover"),[o("bg-color-active")]:a("solid-bg-color-active"),boxShadow:a("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("border-color")]:a("color-base"),[o("border-color-hover")]:a("color-hover"),[o("border-color-active")]:a("color-active"),[o("bg-color")]:a("bg-color-container"),[o("text-color")]:a("color-base"),[o("text-color-hover")]:a("color-hover"),[o("text-color-active")]:a("color-active"),boxShadow:a("shadow")},[`&${t}-variant-dashed`]:{[o("border-style")]:"dashed",[o("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[o("border-color")]:"transparent",[o("text-color")]:a("color-base"),[o("bg-color")]:a("color-light"),[o("bg-color-hover")]:a("color-light-hover"),[o("bg-color-active")]:a("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[o("border-color")]:"transparent",[o("text-color")]:a("color-base"),[o("text-color-hover")]:a("color-hover"),[o("text-color-active")]:a("color-active"),[o("bg-color")]:"transparent",[o("bg-color-hover")]:"transparent",[o("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[o("bg-color-hover")]:a("color-light"),[o("bg-color-active")]:a("color-light-active")}},{[`&${t}-variant-link`]:{[o("color-base")]:e.colorLink,[o("color-hover")]:e.colorLinkHover,[o("color-active")]:e.colorLinkActive,[o("bg-color-hover")]:e.linkHoverBg},[`&${t}-color-primary`]:{[o("color-base")]:e.colorPrimary,[o("color-hover")]:e.colorPrimaryHover,[o("color-active")]:e.colorPrimaryActive,[o("color-light")]:e.colorPrimaryBg,[o("color-light-hover")]:e.colorPrimaryBgHover,[o("color-light-active")]:e.colorPrimaryBorder,[o("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.primaryColor,[o("text-color-hover")]:a("text-color"),[o("text-color-active")]:a("text-color")}},[`&${t}-color-dangerous`]:{[o("color-base")]:e.colorError,[o("color-hover")]:e.colorErrorHover,[o("color-active")]:e.colorErrorActive,[o("color-light")]:e.colorErrorBg,[o("color-light-hover")]:e.colorErrorBgFilledHover,[o("color-light-active")]:e.colorErrorBgActive,[o("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.dangerColor,[o("text-color-hover")]:a("text-color"),[o("text-color-active")]:a("text-color")}},[`&${t}-color-default`]:{[o("solid-bg-color")]:e.colorBgSolid,[o("solid-bg-color-hover")]:e.colorBgSolidHover,[o("solid-bg-color-active")]:e.colorBgSolidActive,[o("color-base")]:e.defaultBorderColor,[o("color-hover")]:e.defaultHoverBorderColor,[o("color-active")]:e.defaultActiveBorderColor,[o("color-light")]:e.colorFillTertiary,[o("color-light-hover")]:e.colorFillSecondary,[o("color-light-active")]:e.colorFill,[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("shadow")]:e.defaultShadow,[`&${t}-variant-outlined`]:{[o("bg-color-disabled")]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[o("text-color")]:e.solidTextColor,[o("text-color-hover")]:a("text-color"),[o("text-color-active")]:a("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[o("text-color-hover")]:a("text-color"),[o("text-color-active")]:a("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("bg-color-container")]:e.defaultBg,[o("bg-color-hover")]:e.defaultHoverBg,[o("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[o("text-color")]:e.textTextColor,[o("text-color-hover")]:e.textTextHoverColor,[o("text-color-active")]:e.textTextActiveColor,[o("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultGhostColor,[o("border-color")]:e.defaultGhostBorderColor}}}},T.s.map(r=>{let n=e[`${r}6`],a=e[`${r}1`],i=e[`${r}Hover`],l=e[`${r}2`],s=e[`${r}3`],c=e[`${r}Active`],d=e[`${r}ShadowColor`];return{[`&${t}-color-${r}`]:{[o("color-base")]:n,[o("color-hover")]:i,[o("color-active")]:c,[o("color-light")]:a,[o("color-light-hover")]:l,[o("color-light-active")]:s,[o("shadow")]:d}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:a("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[o("bg-color")]:e.ghostBg,[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg,[o("shadow")]:"none",[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg}}}]}})(t),(e=>{let{componentCls:t,fontSize:r,lineWidth:n,groupBorderColor:o,colorErrorHover:a}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(n).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},P(`${t}-primary`,o),P(`${t}-danger`,a)]}})(t)]},j,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});var D=r(77032);let B=(0,A.bf)(["Button","compact"],e=>{let t=N(e);return[(0,D.G)(t),function(e){var t,r;let n=`${e.componentCls}-compact-vertical`;return{[n]:{...(t=e.componentCls,{[`&-item:not(${n}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${t}-status-success)`]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}),...(r=e.componentCls,{[`&-item:not(${n}-first-item):not(${n}-last-item)`]:{borderRadius:0},[`&-item${n}-first-item:not(${n}-last-item)`]:{[`&, &${r}-sm, &${r}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${n}-last-item:not(${n}-first-item)`]:{[`&, &${r}-sm, &${r}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}})}}}(t),(e=>{let{antCls:t,componentCls:r,lineWidth:n,calc:o,colorBgContainer:a}=e,i=`${r}-variant-solid:not([disabled])`,l=o(n).mul(-1).equal(),[s,c]=(0,A.PN)(t,"btn"),d=e=>({[`${r}-compact${e?"-vertical":""}-item`]:{[s("compact-connect-border-color")]:c("bg-color-hover"),[`&${i}`]:{transition:"none",[`& + ${i}:before`]:[{position:"absolute",backgroundColor:c("compact-connect-border-color"),content:'""'},e?{top:l,insetInline:l,height:n}:{insetBlock:l,insetInlineStart:l,width:n}],"&:hover:before":{display:"none"}}}});return[d(),d(!0),{[`${i}${r}-color-default`]:{[s("compact-connect-border-color")]:`color-mix(in srgb, ${c("bg-color-hover")} 75%, ${a})`}}]})(t)]},j),L={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},_=n.forwardRef((e,t)=>{let r,{_skipSemantic:f,loading:g=!1,prefixCls:b,color:v,variant:$,type:x,danger:C=!1,shape:E,size:k,disabled:S,className:A,rootClassName:P,children:R,icon:M,iconPosition:T,iconPlacement:O,ghost:F=!1,block:N=!1,htmlType:j="button",classNames:I,styles:D,style:_,autoInsertSpace:H,autoFocus:W,...q}=e,V=(0,o.$r)(R),U=x||"default",{getPrefixCls:X,direction:K,autoInsertSpace:G,className:Q,style:Y,classNames:Z,styles:J,loadingIcon:ee,shape:et,color:er,variant:en}=(0,c.TP)("button"),eo=E||et||"default",[ea,ei]=(0,n.useMemo)(()=>{if(v&&$)return[v,$];if(x||C){let e=L[U]||[];return C?["danger",e[1]]:e}return"solid"===$?["primary",$]:er&&en?[er,en]:"solid"===en?["primary",en]:["default","outlined"]},[v,$,x,C,er,en,U]),[el,es]=(0,n.useMemo)(()=>F&&"solid"===ei?[ea,"outlined"]:[ea,ei],[ea,ei,F]),ec="danger"===el,ed=ec?"dangerous":el,eu=H??G??!0,ep=X("btn",b),[ef,em]=z(ep),eh=(0,n.useContext)(d.A),eg=S??eh,eb=(0,n.useContext)(m),ey=(0,n.useMemo)(()=>(function(e){if((0,l.Qd)(e)){let t=e?.delay;return{loading:(t=(0,l.Et)(t)?t:0)<=0,delay:t}}return{loading:!!e,delay:0}})(g),[g]),[ev,e$]=(0,n.useState)(ey.loading),[ex,ew]=(0,n.useState)(!1),eC=(0,n.useRef)(null),eE=(0,o.xK)(t,eC),ek=1===V.length&&!M&&!(0,h.u1)(es),eS=(0,n.useRef)(!0);n.useEffect(()=>(eS.current=!1,()=>{eS.current=!0}),[]),(0,o.Nf)(()=>{let e=null;return ey.delay>0?e=setTimeout(()=>{e=null,e$(!0)},ey.delay):e$(ey.loading),function(){e&&(clearTimeout(e),e=null)}},[ey.delay,ey.loading]),(0,n.useEffect)(()=>{if(!eC.current||!eu)return;let e=eC.current.textContent||"";ek&&(0,h.Ap)(e)?ex||ew(!0):ex&&ew(!1)}),(0,n.useEffect)(()=>{W&&eC.current&&eC.current.focus()},[]);let eA=n.useCallback(t=>{if(ev||eg)return void t.preventDefault();e.onClick?.(("href"in e,t))},[e.onClick,ev,eg]),{compactSize:eP,compactItemClassnames:eR}=(0,p.RQ)(ep,K),eM=(0,u.A)(e=>k??eP??eb??e),eT=ev?"loading":M,eO=O??T??"start",eF=(0,o.cJ)(q,["navigate"]),eN={...e,type:U,color:el,variant:es,danger:ec,shape:eo,size:eM,disabled:eg,loading:ev,iconPlacement:eO},ej=(0,i.XT)(Y),eI=(0,i.XT)(_),[ez,eD]=(0,i.AV)([f?void 0:Z,I],[f?void 0:J,ej,D,eI],{props:eN}),eB=(0,a.$)(ep,ef,em,{[`${ep}-${eo}`]:"default"!==eo&&"square"!==eo&&eo,[`${ep}-${U}`]:U,[`${ep}-dangerous`]:C,[`${ep}-color-${ed}`]:ed,[`${ep}-variant-${es}`]:es,[`${ep}-lg`]:"large"===eM,[`${ep}-sm`]:"small"===eM,[`${ep}-icon-only`]:!R&&0!==R&&!!eT,[`${ep}-background-ghost`]:F&&!(0,h.u1)(es),[`${ep}-loading`]:ev,[`${ep}-two-chinese-chars`]:ex&&eu&&!ev,[`${ep}-block`]:N,[`${ep}-rtl`]:"rtl"===K,[`${ep}-icon-end`]:"end"===eO},eR,A,P,Q,ez.root),eL={className:ez.icon,style:eD.icon},e_=e=>n.createElement(y,{prefixCls:ep,...eL},e),eH=n.createElement(w,{existIcon:!!M,prefixCls:ep,loading:ev,mount:eS.current,...eL}),eW=(0,l.Qd)(g)&&g.icon||ee;r=M&&!ev?e_(M):g&&eW?e_(eW):eH;let eq=(0,l.AZ)(R)?(0,h.uR)(R,ek&&eu,eD.content,ez.content):null;if(void 0!==eF.href)return n.createElement("a",{...eF,className:(0,a.$)(eB,{[`${ep}-disabled`]:eg}),href:eg?void 0:eF.href,style:eD.root,onClick:eA,ref:eE,tabIndex:eg?-1:0,"aria-disabled":eg},r,eq);let eV=n.createElement("button",{...q,type:j,className:eB,style:eD.root,onClick:eA,disabled:eg,ref:eE},r,eq,eR&&n.createElement(B,{prefixCls:ep}));return(0,h.u1)(es)||(eV=n.createElement(s.A,{component:"Button",disabled:ev},eV)),eV});_.Group=e=>{let{getPrefixCls:t,direction:r}=n.useContext(c.QO),{prefixCls:o,size:i,className:l,...s}=e,d=t("btn-group",o),[,,u]=(0,f.Ay)(),p=n.useMemo(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]),h=(0,a.$)(d,{[`${d}-${p}`]:p,[`${d}-rtl`]:"rtl"===r},l,u);return n.createElement(m.Provider,{value:i},n.createElement("div",{...s,className:h}))},_.__ANT_BUTTON=!0;let H=_},9311:(e,t,r)=>{"use strict";r.d(t,{A:()=>o,r:()=>n});let n={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},o={...n,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
10
|
+
`]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}}},5741:(e,t,r)=>{"use strict";function n(e,t){return{motionName:t??`${e}-fade`}}function o(e){let t,r=new Promise(r=>{t=e(()=>{r(!0)})}),n=()=>{t?.()};return n.then=(e,t)=>r.then(e,t),n.promise=r,n}r.d(t,{E:()=>o,V:()=>n})},6551:(e,t,r)=>{"use strict";function n(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{A:()=>n})},6578:(e,t,r)=>{"use strict";r.d(t,{Af:()=>V,Bh:()=>ei,Dl:()=>R,FC:()=>en,FV:()=>S,Fi:()=>l,G8:()=>v,Gi:()=>q,H1:()=>x,HC:()=>c,HT:()=>i,II:()=>Z,JU:()=>H,NH:()=>u,NR:()=>A,OX:()=>N,QG:()=>D,Qx:()=>f,SJ:()=>b,SM:()=>M,UE:()=>U,UQ:()=>L,VW:()=>w,X8:()=>$,Z3:()=>X,_m:()=>K,a6:()=>z,aP:()=>Y,ax:()=>h,bV:()=>F,bZ:()=>et,c1:()=>p,cQ:()=>j,dd:()=>J,dg:()=>k,dw:()=>P,dx:()=>C,f$:()=>_,h0:()=>O,h1:()=>G,hH:()=>ea,hc:()=>a,l2:()=>T,le:()=>er,lv:()=>E,oH:()=>eo,oS:()=>W,r:()=>B,tZ:()=>y,tn:()=>d,u6:()=>ee,v7:()=>I,xC:()=>s,xq:()=>g,zA:()=>m,zr:()=>Q});var n=r(23727);async function o(e,t){let r=await fetch(e,t);if(!r.ok){let e=await r.text(),t=e||"HTTP ".concat(r.status);try{let r=JSON.parse(e);t=r.error||r.message||t}catch(i){var n,o;let a=null==(n=e.match(/<script id="__NEXT_DATA__" type="application\/json">([\s\S]*?)<\/script>/u))?void 0:n[1];if(a)try{t=(null==(o=JSON.parse(a.replace(/"/gu,'"')).err)?void 0:o.message)||"HTTP ".concat(r.status)}catch(e){t="HTTP ".concat(r.status)}}throw Error(t)}return r.json()}async function a(e){let t=e?"?projectRoot=".concat(encodeURIComponent(e)):"";return o("/api/kb/stats".concat(t))}async function i(e){var t,r;let n=new URLSearchParams;return(null==e?void 0:e.projectRoot)&&n.set("projectRoot",e.projectRoot),(null==e?void 0:e.category)&&n.set("category",e.category),(null==e?void 0:e.page)&&n.set("page",String(null!=(t=e.page)?t:1)),(null==e?void 0:e.limit)&&n.set("limit",String(null!=(r=e.limit)?r:50)),o("/api/kb/files?".concat(n))}async function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,r=new URLSearchParams;return t&&r.set("projectRoot",t),e&&r.set("parentPath",e),o("/api/kb/files/tree?".concat(r))}async function s(e,t){let r=new URLSearchParams({relativePath:e});return t&&r.set("projectRoot",t),o("/api/kb/files/detail?".concat(r))}async function c(e,t){return o("/api/kb/files/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:t})})}async function d(e,t,r){return o("/api/kb/files/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,target:t,projectRoot:r})})}class u extends Error{constructor(e){super("上传部分成功:".concat(e.succeededBatches,"/").concat(e.totalBatches," 个批次已上传,").concat(e.failedBatches," 个批次失败")),this.name="PartialUploadError",this.succeededBatches=e.succeededBatches,this.failedBatches=e.failedBatches,this.totalBatches=e.totalBatches,this.failures=e.failures}}async function p(e,t,r,a){var i,l;let s=Number(n.env.NEXT_PUBLIC_CUSTOMIZE_KB_UPLOAD_BATCH_FILES||500),c=Number(n.env.NEXT_PUBLIC_CUSTOMIZE_KB_UPLOAD_BATCH_BYTES||0x8000000),d=Math.max(1,Math.min(4,Number(n.env.NEXT_PUBLIC_CUSTOMIZE_KB_UPLOAD_CONCURRENCY||2))),p=[],f=[],m=0,h=0,g=0;for(let t of e)f.length>0&&(f.length>=s||m+t.size>c)&&(p.push({files:f,offset:h}),f=[],m=0,h=g),f.push(t),m+=t.size,g+=1;f.length>0&&p.push({files:f,offset:h});let b=[],y=[],v=0,$=0;async function x(n){let i,l=p[n],s=new URLSearchParams({batchIndex:String(n),totalBatches:String(p.length)});r&&s.set("uploadId",r);for(let c=0;c<2;c++)try{let i=await o("/api/kb/upload?".concat(s),{method:"POST",body:function(e,t){var r;let n=new FormData;for(let o of(t.projectRoot&&n.append("projectRoot",t.projectRoot),t.uploadId&&n.append("uploadId",t.uploadId),n.append("batchIndex",String(t.batchIndex)),n.append("totalBatches",String(t.totalBatches)),n.append("fileOffset",String(t.fileOffset)),n.append("startIndex",t.startIndex?"1":"0"),n.append("uploadComplete",(null!=(r=t.uploadComplete)?r:t.batchIndex===t.totalBatches-1)?"1":"0"),e))n.append("files",o,o.name),n.append("relativePaths",o.webkitRelativePath||o.name);return n}(l.files,{projectRoot:t,uploadId:r,batchIndex:n,totalBatches:p.length,fileOffset:l.offset,startIndex:0===n,uploadComplete:1===p.length})});b[n]=i,v+=l.files.length,null==a||a({uploadedFiles:v,totalFiles:e.length,batchIndex:n,totalBatches:p.length});return}catch(e){i=e instanceof Error?e:Error(String(e))}y.push({batchIndex:n,files:l.files.slice(0,5).map(e=>e.name),message:(null==i?void 0:i.message)||"上传失败"}),null==a||a({uploadedFiles:v,totalFiles:e.length,batchIndex:n,totalBatches:p.length})}let w=Array.from({length:Math.min(d,p.length)},async()=>{for(;$<p.length;){let e=$++;await x(e)}});await Promise.all(w);let C=p.length-y.length;if(y.length>0&&0===C)throw Error((null==(i=y[0])?void 0:i.message)||"上传失败");if(p.length>1&&C>0){let e=await o("/api/kb/upload/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectRoot:t,uploadId:r})});b.push(e)}if(y.length>0)throw new u({succeededBatches:C,failedBatches:y.length,totalBatches:p.length,failures:y});return null!=(l=b.filter(Boolean).at(-1))?l:{success:!0}}async function f(e){let t=new URLSearchParams({limit:"50"});return e&&t.set("projectRoot",e),o("/api/kb/operations?".concat(t))}async function m(e){var t;let r=new URLSearchParams({limit:String(null!=(t=null==e?void 0:e.limit)?t:50)});return(null==e?void 0:e.projectRoot)&&r.set("projectRoot",e.projectRoot),(null==e?void 0:e.active)&&r.set("active","1"),o("/api/jobs?".concat(r))}async function h(e,t){let r=new URLSearchParams;return t&&r.set("projectRoot",t),o("/api/jobs/".concat(encodeURIComponent(e),"?").concat(r))}async function g(e,t){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:t})})}async function b(e,t){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePaths:e,projectRoot:t})})}async function y(e,t,r){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePaths:e,folderPaths:t,projectRoot:r})})}async function v(e){let t=await fetch("/api/kb/files/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let e="导出失败 (".concat(t.status,")");try{let r=await t.json();(null==r?void 0:r.error)&&(e=r.error)}catch(e){}throw Error(e)}let r=await t.blob(),n=t.headers.get("content-disposition")||"",o=/filename\*=(?:UTF-8'')?([^;]+)/iu.exec(n);return{blob:r,fileName:(null==o?void 0:o[1])?decodeURIComponent(o[1]):"kb-export.txt",exported:Number(t.headers.get("x-export-count")||0),skipped:Number(t.headers.get("x-export-skipped")||0)}}async function $(e){return o("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({all:!0,projectRoot:e})})}async function x(e){return o("/api/kb/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectRoot:e})})}async function w(){return o("/api/kb/features")}async function C(){return o("/api/prompt")}async function E(e){return o("/api/documents/roles".concat(e?"?type=".concat(e):""))}async function k(e){return o("/api/documents/roles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function S(e,t){return o("/api/documents/roles?type=".concat(e,"&id=").concat(encodeURIComponent(t)),{method:"DELETE"})}async function A(e){return o("/api/documents/roles?mode=config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function P(e){return o("/api/documents/roles?mode=config&id=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function R(){return o("/api/documents/templates")}async function M(e,t){let r=t?"&projectRoot=".concat(encodeURIComponent(t)):"";return o("/api/documents/templates?validate=".concat(encodeURIComponent(e)).concat(r))}async function T(e){return o("/api/documents/templates",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function O(e){return o("/api/documents/templates?templateId=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function F(e){return o("/api/documents/templates",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:e})})}async function N(e){return o("/api/documents/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function j(e){let t=e?"?projectRoot=".concat(encodeURIComponent(e)):"";return o("/api/documents/generated".concat(t))}async function I(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,i=new URLSearchParams;t&&i.set("lite","1"),r&&i.set("projectRoot",r),void 0!==a&&Number.isFinite(a)&&i.set("ifUpdatedSince",String(a));let l=i.toString()?"?".concat(i.toString()):"";return o("/api/documents/generated/".concat(encodeURIComponent(e)).concat(l),{signal:n})}async function z(e,t,r){let n=r?"?projectRoot=".concat(encodeURIComponent(r)):"";return o("/api/documents/generated/".concat(encodeURIComponent(e)).concat(n),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function D(e,t){let r=t?"?projectRoot=".concat(encodeURIComponent(t)):"";return o("/api/documents/generated/".concat(encodeURIComponent(e)).concat(r),{method:"DELETE"})}async function B(e,t){return o("/api/documents/generated",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"abort",documentId:e,projectRoot:t})})}async function L(e,t){return o("/api/documents/generated",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"resume",documentId:e,projectRoot:t})})}async function _(e){let t=e?"?projectRoot=".concat(encodeURIComponent(e)):"";return o("/api/assets/generated".concat(t))}async function H(e,t){let r=t?"&projectRoot=".concat(encodeURIComponent(t)):"";return o("/api/assets/generated?id=".concat(encodeURIComponent(e)).concat(r),{method:"DELETE"})}async function W(e,t,r){return o("/api/assets/generated",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,action:"open",target:t,projectRoot:r})})}async function q(e){return o("/api/documents/refine",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function V(e,t){return o("/api/documents/drafts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({draft:e,id:t})})}async function U(e){let t=await fetch("/api/documents/export",{method:"POST",headers:{"Content-Type":"application/json",Accept:"pdf"===e.format?"application/pdf":"*/*"},body:JSON.stringify(e)}),r=t.headers.get("content-type")||"",n=async()=>{let e=await t.text(),r=e||"导出失败";try{var n;let t=JSON.parse(e),o=null==(n=t.issues)?void 0:n.map(e=>e.message).filter(Boolean).slice(0,3).join(";");r=t.message||(o?"".concat(t.error||"导出失败",":").concat(o):t.error||r)}catch(e){}throw Error(r.length>300?"".concat(r.slice(0,300),"..."):r)};return t.ok||await n(),"pdf"!==e.format||r.includes("application/pdf")||await n(),"docx"!==e.format||r.includes("officedocument.wordprocessingml.document")||await n(),t.blob()}async function X(){return o("/api/config/providers")}async function K(e,t){return o("/api/config/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,...t})})}async function G(e){return o("/api/config/providers/".concat(encodeURIComponent(e)),{method:"DELETE"})}async function Q(){return o("/api/config/models")}async function Y(e){return o("/api/config/models",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function Z(){return o("/api/config/embedding")}async function J(e){return o("/api/config/embedding",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function ee(){return o("/api/config/embedding/healthCheck",{method:"POST"})}async function et(e){return o("/api/config/healthCheck",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})})}async function er(){return o("/api/health")}async function en(){return o("/api/system/stats")}async function eo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return o("/api/system/logs?limit=".concat(e))}async function ea(){return o("/api/system/logs",{method:"DELETE"})}async function ei(e){return o("/api/config/providers/".concat(encodeURIComponent(e)))}},6831:(e,t,r)=>{"use strict";r.d(t,{A:()=>i,X:()=>a});var n=r(97109);let o=n.createContext(!1),a=({children:e,disabled:t})=>{let r=n.useContext(o);return n.createElement(o.Provider,{value:t??r},e)},i=o},7709:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>m,Is:()=>d});var n=r(97109),o=r(15561),a=r(74567),i=r(12754),l=r(18625),s=r(9311),c=r(44444);let d={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},u={motionBase:!0,motionUnit:!0},p={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0,screenXXLMax:!0,screenXXXL:!0,screenXXXLMin:!0},f=(e,t,r)=>{let n=r.getDerivativeToken(e),{override:o,...a}=t,i={...n,override:o};return i=(0,c.A)(i),a&&Object.entries(a).forEach(([e,t])=>{let{theme:r,...n}=t,o=n;r&&(o=f({...i,...n},{override:n},r)),i[e]=o}),i};function m(){let{token:e,hashed:t,theme:r,override:c,cssVar:m,zeroRuntime:h}=n.useContext(i.vG),{csp:g,getPrefixCls:b}=n.useContext(a.QO),y={prefix:m?.prefix??b(),key:m?.key??"css-var-root"},v=`6.5.0-${t||""}`,$=r||l.A,[x,w,C]=(0,o.hV)($,[s.A,e],{salt:v,override:c,getComputedToken:f,cssVar:{...y,unitless:d,ignore:u,preserve:p},nonce:g?.nonce});return[$,C,t?w:"",x,y,!!h]}},7961:(e,t,r)=>{"use strict";r.d(t,{K8:()=>d,L9:()=>o,Nk:()=>i,Y1:()=>m,av:()=>u,dF:()=>a,jk:()=>c,jz:()=>f,t6:()=>s,vj:()=>p});var n=r(15561);let o={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},a=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),i=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),l=new n.Mo("loadingCircle",{"100%":{transform:"rotate(360deg)"}}),s=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),c=(e,t)=>({outline:`${(0,n.zA)(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:["outline-offset","outline"].map(e=>`${e} 0s`).join(", ")}),d=(e,t)=>({"&:focus-visible":c(e,t)}),u=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},...d(e),"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),p=(e,t,r,n)=>{let o=`[class^="${t}"], [class*=" ${t}"]`,a=r?`.${r}`:o,i={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}},l={};return!1!==n&&(l={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[a]:{...l,...i,[o]:i}}},f=e=>({[`.${e}`]:{...i(),[`.${e} .${e}-icon`]:{display:"block"}},[`.${e}-spin`]:{animationName:l,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}}),m=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...d(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}})},8572:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(90892);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,l=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||(0,n.A)(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},8627:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(13911),o=r(26047);let a={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},i={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},l=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function s(e){let{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:s,offset:c,borderRadius:d,visibleFirst:u}=e,p=t/2,f={},m=(0,n.Ke)({contentRadius:d,limitVerticalRadius:!0});return Object.keys(a).forEach(e=>{let n={...s&&i[e]||a[e],offset:[0,0],dynamicInset:!0};switch(f[e]=n,l.has(e)&&(n.autoArrow=!1),e){case"top":case"topLeft":case"topRight":n.offset[1]=-p-c;break;case"bottom":case"bottomLeft":case"bottomRight":n.offset[1]=p+c;break;case"left":case"leftTop":case"leftBottom":n.offset[0]=-p-c;break;case"right":case"rightTop":case"rightBottom":n.offset[0]=p+c}if(s)switch(e){case"topLeft":case"bottomLeft":n.offset[0]=-m.arrowOffsetHorizontal-p;break;case"topRight":case"bottomRight":n.offset[0]=m.arrowOffsetHorizontal+p;break;case"leftTop":case"rightTop":n.offset[1]=-(2*m.arrowOffsetHorizontal)+p;break;case"leftBottom":case"rightBottom":n.offset[1]=2*m.arrowOffsetHorizontal-p}n.overflow=function(e,t,r,n){if(!1===n)return{adjustX:!1,adjustY:!1};let a=(0,o.Qd)(n)?n:{},i={};switch(e){case"top":case"bottom":i.shiftX=2*t.arrowOffsetHorizontal+r,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=2*t.arrowOffsetVertical+r,i.shiftX=!0,i.adjustX=!0}let l={...i,...a};return l.shiftX||(l.adjustX=!0),l.shiftY||(l.adjustY=!0),l}(e,m,t,r),u&&(n.htmlRegion="visibleFirst")}),f}},9290:(e,t,r)=>{"use strict";r.d(t,{A:()=>H});var n=r(97109),o=r(42644),a=r(3638),i=r(92162),l=r(26047),s=r(38862),c=r(74567),d=r(6831),u=r(27273),p=r(49644),f=r(7709);let m=n.createContext(void 0);var h=r(86099),g=r(83914),b=r(67189);let y=(0,n.forwardRef)((e,t)=>{let{className:r,style:o,children:i,prefixCls:l}=e,s=(0,a.$)(`${l}-icon`,r);return n.createElement("span",{ref:t,className:s,style:o},i)}),v=(0,n.forwardRef)((e,t)=>{let{prefixCls:r,className:o,style:i,iconClassName:l}=e,s=(0,a.$)(`${r}-loading-icon`,o);return n.createElement(y,{prefixCls:r,className:s,style:i,ref:t},n.createElement(g.A,{className:l}))}),$=()=>({width:0,opacity:0,transform:"scale(0)"}),x=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),w=e=>{let{prefixCls:t,loading:r,existIcon:o,className:i,style:l,mount:s}=e;return o?n.createElement(v,{prefixCls:t,className:i,style:l}):n.createElement(b.Ay,{visible:!!r,motionName:`${t}-loading-icon-motion`,motionAppear:!s,motionEnter:!s,motionLeave:!s,removeOnLeave:!0,onAppearStart:$,onAppearActive:x,onEnterStart:$,onEnterActive:x,onLeaveStart:x,onLeaveActive:$},({className:e,style:r},o)=>{let s={...l,...r};return n.createElement(v,{prefixCls:t,className:(0,a.$)(i,e),style:s,ref:o})})};var C=r(15561),E=r(7961),k=r(16666),S=r(28403),A=r(10540);let P=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}});var R=r(38697),M=r(32154),T=r(78012),O=r(44539),F=r(32279);let N=e=>{let{paddingInline:t,onlyIconSize:r,borderColorDisabled:n}=e;return(0,S.oX)(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r,colorBorderDisabled:n})},j=e=>{let t=e.contentFontSize??e.fontSize,r=e.contentFontSizeSM??e.fontSize,n=e.contentFontSizeLG??e.fontSizeLG,o=e.contentLineHeight??(0,O.k)(t),a=e.contentLineHeightSM??(0,O.k)(r),i=e.contentLineHeightLG??(0,O.k)(n),l=(0,M.z)(new R.kf(e.colorBgSolid),"#fff")?"#000":"#fff",s=T.s.reduce((t,r)=>({...t,[`${r}ShadowColor`]:`0 ${(0,C.zA)(e.controlOutlineWidth)} 0 ${(0,F.A)(e[`${r}1`],e.colorBgContainer)}`}),{}),c=e.colorBgContainerDisabled,d=e.colorBgContainerDisabled;return{...s,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:l,contentFontSize:t,contentFontSizeSM:r,contentFontSizeLG:n,contentLineHeight:o,contentLineHeightSM:a,contentLineHeightLG:i,paddingBlock:Math.max((e.controlHeight-t*o)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-r*a)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-n*i)/2-e.lineWidth,0),defaultBgDisabled:c,dashedBgDisabled:d}},I=(e,t="")=>{let{componentCls:r,controlHeight:n,fontSize:o,borderRadius:a,buttonPaddingHorizontal:i,iconCls:l,buttonPaddingVertical:s,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:o,height:n,padding:`${(0,C.zA)(s)} ${(0,C.zA)(i)}`,borderRadius:a,[`&${r}-icon-only`]:{width:n,[l]:{fontSize:c}}}},{[`${r}${r}-circle${t}`]:{minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}},{[`${r}${r}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${r}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},z=(0,A.OF)("Button",e=>{let t=N(e);return[(e=>{let{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:o,motionDurationSlow:a,motionEaseInOut:i,iconGap:l,calc:s}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:l,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",...(0,k.V)(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:(0,E.Nk)(),"> a":{color:"currentColor"},"&:not(:disabled)":(0,E.K8)(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(e=>`${e} ${a} ${i}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:s(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:s(l).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:s(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:s(l).mul(-1).equal()}}}}}})(t),(e=>I((0,S.oX)(e,{fontSize:e.contentFontSize}),e.componentCls))(t),(e=>I((0,S.oX)(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM}),`${e.componentCls}-sm`))(t),(e=>I((0,S.oX)(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG}),`${e.componentCls}-lg`))(t),(e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}})(t),(e=>{let{componentCls:t,antCls:r,lineWidth:n}=e,[o,a]=(0,A.PN)(r,"btn");return{[t]:[{[o("border-width")]:n,[o("border-color")]:"#000",[o("border-color-hover")]:a("border-color"),[o("border-color-active")]:a("border-color"),[o("border-color-disabled")]:a("border-color"),[o("border-style")]:"solid",[o("text-color")]:"#000",[o("text-color-hover")]:a("text-color"),[o("text-color-active")]:a("text-color"),[o("text-color-disabled")]:a("text-color"),[o("bg-color")]:"#ddd",[o("bg-color-hover")]:a("bg-color"),[o("bg-color-active")]:a("bg-color"),[o("bg-color-disabled")]:e.colorBgContainerDisabled,[o("bg-color-container")]:e.colorBgContainer,[o("shadow")]:"none"},{border:[a("border-width"),a("border-style"),a("border-color")].join(" "),color:a("text-color"),backgroundColor:a("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[a("border-width"),a("border-style"),a("border-color-hover")].join(" "),color:a("text-color-hover"),backgroundColor:a("bg-color-hover")},"&:active":{border:[a("border-width"),a("border-style"),a("border-color-active")].join(" "),color:a("text-color-active"),backgroundColor:a("bg-color-active")}}},{[`&${t}-variant-solid`]:{[o("solid-bg-color")]:a("color-base"),[o("solid-bg-color-hover")]:a("color-hover"),[o("solid-bg-color-active")]:a("color-active"),[o("border-color")]:"transparent",[o("text-color")]:e.colorTextLightSolid,[o("bg-color")]:a("solid-bg-color"),[o("bg-color-hover")]:a("solid-bg-color-hover"),[o("bg-color-active")]:a("solid-bg-color-active"),boxShadow:a("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("border-color")]:a("color-base"),[o("border-color-hover")]:a("color-hover"),[o("border-color-active")]:a("color-active"),[o("bg-color")]:a("bg-color-container"),[o("text-color")]:a("color-base"),[o("text-color-hover")]:a("color-hover"),[o("text-color-active")]:a("color-active"),boxShadow:a("shadow")},[`&${t}-variant-dashed`]:{[o("border-style")]:"dashed",[o("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[o("border-color")]:"transparent",[o("text-color")]:a("color-base"),[o("bg-color")]:a("color-light"),[o("bg-color-hover")]:a("color-light-hover"),[o("bg-color-active")]:a("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[o("border-color")]:"transparent",[o("text-color")]:a("color-base"),[o("text-color-hover")]:a("color-hover"),[o("text-color-active")]:a("color-active"),[o("bg-color")]:"transparent",[o("bg-color-hover")]:"transparent",[o("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[o("bg-color-hover")]:a("color-light"),[o("bg-color-active")]:a("color-light-active")}},{[`&${t}-variant-link`]:{[o("color-base")]:e.colorLink,[o("color-hover")]:e.colorLinkHover,[o("color-active")]:e.colorLinkActive,[o("bg-color-hover")]:e.linkHoverBg},[`&${t}-color-primary`]:{[o("color-base")]:e.colorPrimary,[o("color-hover")]:e.colorPrimaryHover,[o("color-active")]:e.colorPrimaryActive,[o("color-light")]:e.colorPrimaryBg,[o("color-light-hover")]:e.colorPrimaryBgHover,[o("color-light-active")]:e.colorPrimaryBorder,[o("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.primaryColor,[o("text-color-hover")]:a("text-color"),[o("text-color-active")]:a("text-color")}},[`&${t}-color-dangerous`]:{[o("color-base")]:e.colorError,[o("color-hover")]:e.colorErrorHover,[o("color-active")]:e.colorErrorActive,[o("color-light")]:e.colorErrorBg,[o("color-light-hover")]:e.colorErrorBgFilledHover,[o("color-light-active")]:e.colorErrorBgActive,[o("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[o("text-color")]:e.dangerColor,[o("text-color-hover")]:a("text-color"),[o("text-color-active")]:a("text-color")}},[`&${t}-color-default`]:{[o("solid-bg-color")]:e.colorBgSolid,[o("solid-bg-color-hover")]:e.colorBgSolidHover,[o("solid-bg-color-active")]:e.colorBgSolidActive,[o("color-base")]:e.defaultBorderColor,[o("color-hover")]:e.defaultHoverBorderColor,[o("color-active")]:e.defaultActiveBorderColor,[o("color-light")]:e.colorFillTertiary,[o("color-light-hover")]:e.colorFillSecondary,[o("color-light-active")]:e.colorFill,[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("shadow")]:e.defaultShadow,[`&${t}-variant-outlined`]:{[o("bg-color-disabled")]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[o("text-color")]:e.solidTextColor,[o("text-color-hover")]:a("text-color"),[o("text-color-active")]:a("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[o("text-color-hover")]:a("text-color"),[o("text-color-active")]:a("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultColor,[o("text-color-hover")]:e.defaultHoverColor,[o("text-color-active")]:e.defaultActiveColor,[o("bg-color-container")]:e.defaultBg,[o("bg-color-hover")]:e.defaultHoverBg,[o("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[o("text-color")]:e.textTextColor,[o("text-color-hover")]:e.textTextHoverColor,[o("text-color-active")]:e.textTextActiveColor,[o("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("text-color")]:e.defaultGhostColor,[o("border-color")]:e.defaultGhostBorderColor}}}},T.s.map(r=>{let n=e[`${r}6`],a=e[`${r}1`],i=e[`${r}Hover`],l=e[`${r}2`],s=e[`${r}3`],c=e[`${r}Active`],d=e[`${r}ShadowColor`];return{[`&${t}-color-${r}`]:{[o("color-base")]:n,[o("color-hover")]:i,[o("color-active")]:c,[o("color-light")]:a,[o("color-light-hover")]:l,[o("color-light-active")]:s,[o("shadow")]:d}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:a("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[o("bg-color")]:e.ghostBg,[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg,[o("shadow")]:"none",[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[o("bg-color-hover")]:e.ghostBg,[o("bg-color-active")]:e.ghostBg}}}]}})(t),(e=>{let{componentCls:t,fontSize:r,lineWidth:n,groupBorderColor:o,colorErrorHover:a}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(n).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},P(`${t}-primary`,o),P(`${t}-danger`,a)]}})(t)]},j,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});var D=r(77032);let B=(0,A.bf)(["Button","compact"],e=>{let t=N(e);return[(0,D.G)(t),function(e){var t,r;let n=`${e.componentCls}-compact-vertical`;return{[n]:{...(t=e.componentCls,{[`&-item:not(${n}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${t}-status-success)`]:{zIndex:2},"&-item":{"&:focus,&:active":{zIndex:3},"&:hover":{zIndex:4},"&[disabled]":{zIndex:0}}}),...(r=e.componentCls,{[`&-item:not(${n}-first-item):not(${n}-last-item)`]:{borderRadius:0},[`&-item${n}-first-item:not(${n}-last-item)`]:{[`&, &${r}-sm, &${r}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${n}-last-item:not(${n}-first-item)`]:{[`&, &${r}-sm, &${r}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}})}}}(t),(e=>{let{antCls:t,componentCls:r,lineWidth:n,calc:o,colorBgContainer:a}=e,i=`${r}-variant-solid:not([disabled])`,l=o(n).mul(-1).equal(),[s,c]=(0,A.PN)(t,"btn"),d=e=>({[`${r}-compact${e?"-vertical":""}-item`]:{[s("compact-connect-border-color")]:c("bg-color-hover"),[`&${i}`]:{transition:"none",[`& + ${i}:before`]:[{position:"absolute",backgroundColor:c("compact-connect-border-color"),content:'""'},e?{top:l,insetInline:l,height:n}:{insetBlock:l,insetInlineStart:l,width:n}],"&:hover:before":{display:"none"}}}});return[d(),d(!0),{[`${i}${r}-color-default`]:{[s("compact-connect-border-color")]:`color-mix(in srgb, ${c("bg-color-hover")} 75%, ${a})`}}]})(t)]},j),L={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},_=n.forwardRef((e,t)=>{let r,{_skipSemantic:f,loading:g=!1,prefixCls:b,color:v,variant:$,type:x,danger:C=!1,shape:E,size:k,disabled:S,className:A,rootClassName:P,children:R,icon:M,iconPosition:T,iconPlacement:O,ghost:F=!1,block:N=!1,htmlType:j="button",classNames:I,styles:D,style:_,autoInsertSpace:H,autoFocus:W,...q}=e,V=(0,o.$r)(R),U=x||"default",{getPrefixCls:X,direction:K,autoInsertSpace:G,className:Q,style:Y,classNames:Z,styles:J,loadingIcon:ee,shape:et,color:er,variant:en}=(0,c.TP)("button"),eo=E||et||"default",[ea,ei]=(0,n.useMemo)(()=>{if(v&&$)return[v,$];if(x||C){let e=L[U]||[];return C?["danger",e[1]]:e}return"solid"===$?["primary",$]:er&&en?[er,en]:"solid"===en?["primary",en]:["default","outlined"]},[v,$,x,C,er,en,U]),[el,es]=(0,n.useMemo)(()=>F&&"solid"===ei?[ea,"outlined"]:[ea,ei],[ea,ei,F]),ec="danger"===el,ed=ec?"dangerous":el,eu=H??G??!0,ep=X("btn",b),[ef,em]=z(ep),eh=(0,n.useContext)(d.A),eg=S??eh,eb=(0,n.useContext)(m),ey=(0,n.useMemo)(()=>(function(e){if((0,l.Qd)(e)){let t=e?.delay;return{loading:(t=(0,l.Et)(t)?t:0)<=0,delay:t}}return{loading:!!e,delay:0}})(g),[g]),[ev,e$]=(0,n.useState)(ey.loading),[ex,ew]=(0,n.useState)(!1),eC=(0,n.useRef)(null),eE=(0,o.xK)(t,eC),ek=1===V.length&&!M&&!(0,h.u1)(es),eS=(0,n.useRef)(!0);n.useEffect(()=>(eS.current=!1,()=>{eS.current=!0}),[]),(0,o.Nf)(()=>{let e=null;return ey.delay>0?e=setTimeout(()=>{e=null,e$(!0)},ey.delay):e$(ey.loading),function(){e&&(clearTimeout(e),e=null)}},[ey.delay,ey.loading]),(0,n.useEffect)(()=>{if(!eC.current||!eu)return;let e=eC.current.textContent||"";ek&&(0,h.Ap)(e)?ex||ew(!0):ex&&ew(!1)}),(0,n.useEffect)(()=>{W&&eC.current&&eC.current.focus()},[]);let eA=n.useCallback(t=>{if(ev||eg)return void t.preventDefault();e.onClick?.(("href"in e,t))},[e.onClick,ev,eg]),{compactSize:eP,compactItemClassnames:eR}=(0,p.RQ)(ep,K),eM=(0,u.A)(e=>k??eP??eb??e),eT=ev?"loading":M,eO=O??T??"start",eF=(0,o.cJ)(q,["navigate"]),eN={...e,type:U,color:el,variant:es,danger:ec,shape:eo,size:eM,disabled:eg,loading:ev,iconPlacement:eO},ej=(0,i.XT)(Y),eI=(0,i.XT)(_),[ez,eD]=(0,i.AV)([f?void 0:Z,I],[f?void 0:J,ej,D,eI],{props:eN}),eB=(0,a.$)(ep,ef,em,{[`${ep}-${eo}`]:"default"!==eo&&"square"!==eo&&eo,[`${ep}-${U}`]:U,[`${ep}-dangerous`]:C,[`${ep}-color-${ed}`]:ed,[`${ep}-variant-${es}`]:es,[`${ep}-lg`]:"large"===eM,[`${ep}-sm`]:"small"===eM,[`${ep}-icon-only`]:!R&&0!==R&&!!eT,[`${ep}-background-ghost`]:F&&!(0,h.u1)(es),[`${ep}-loading`]:ev,[`${ep}-two-chinese-chars`]:ex&&eu&&!ev,[`${ep}-block`]:N,[`${ep}-rtl`]:"rtl"===K,[`${ep}-icon-end`]:"end"===eO},eR,A,P,Q,ez.root),eL={className:ez.icon,style:eD.icon},e_=e=>n.createElement(y,{prefixCls:ep,...eL},e),eH=n.createElement(w,{existIcon:!!M,prefixCls:ep,loading:ev,mount:eS.current,...eL}),eW=(0,l.Qd)(g)&&g.icon||ee;r=M&&!ev?e_(M):g&&eW?e_(eW):eH;let eq=(0,l.AZ)(R)?(0,h.uR)(R,ek&&eu,eD.content,ez.content):null;if(void 0!==eF.href)return n.createElement("a",{...eF,className:(0,a.$)(eB,{[`${ep}-disabled`]:eg}),href:eg?void 0:eF.href,style:eD.root,onClick:eA,ref:eE,tabIndex:eg?-1:0,"aria-disabled":eg},r,eq);let eV=n.createElement("button",{...q,type:j,className:eB,style:eD.root,onClick:eA,disabled:eg,ref:eE},r,eq,eR&&n.createElement(B,{prefixCls:ep}));return(0,h.u1)(es)||(eV=n.createElement(s.A,{component:"Button",disabled:ev},eV)),eV});_.Group=e=>{let{getPrefixCls:t,direction:r}=n.useContext(c.QO),{prefixCls:o,size:i,className:l,...s}=e,d=t("btn-group",o),[,,u]=(0,f.Ay)(),p=n.useMemo(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]),h=(0,a.$)(d,{[`${d}-${p}`]:p,[`${d}-rtl`]:"rtl"===r},l,u);return n.createElement(m.Provider,{value:i},n.createElement("div",{...s,className:h}))},_.__ANT_BUTTON=!0;let H=_},9311:(e,t,r)=>{"use strict";r.d(t,{A:()=>o,r:()=>n});let n={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},o={...n,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
11
11
|
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
12
12
|
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}},9750:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(88797),o=r(90892);function a(e){return function(e){if(Array.isArray(e))return(0,n.A)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,o.A)(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},10090:()=>{},10252:(e,t,r)=>{"use strict";r.d(t,{A:()=>a,B:()=>o});var n=r(97109);let o=n.createContext({}),a=n.createContext({message:{},notification:{},modal:{}})},10540:(e,t,r)=>{"use strict";r.d(t,{OF:()=>s,Or:()=>c,PN:()=>u,bf:()=>d});var n=r(97109),o=r(28403),a=r(74567),i=r(7961),l=r(7709);let{genStyleHooks:s,genComponentStyleHook:c,genSubStyleComponent:d}=(0,o.L_)({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,n.useContext)(a.QO);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{let[e,t,r,n,o,a]=(0,l.Ay)();return{theme:e,realToken:t,hashId:r,token:n,cssVar:o,zeroRuntime:a}},useCSP:()=>{let{csp:e}=(0,n.useContext)(a.QO);return e??{}},getResetStyles:(e,t)=>{let r=(0,i.av)(e);return[r,{"&":r},(0,i.jz)(t?.prefix.iconPrefixCls??a.pM)]},getCommonStyle:i.vj,getCompUnitless:()=>l.Is}),u=(e,t)=>{let r=`--${e.replace(/\./g,"")}-${t}-`;return[e=>`${r}${e}`,(e,t)=>t?`var(${r}${e}, ${t})`:`var(${r}${e})`]}},10709:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"}},10740:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(44539);let o=e=>{let t=(0,n.A)(e),r=t.map(e=>e.size),o=t.map(e=>e.lineHeight),a=r[1],i=r[0],l=r[2],s=o[1],c=o[0],d=o[2];return{fontSizeSM:i,fontSize:a,fontSizeLG:l,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:s,lineHeightLG:d,lineHeightSM:c,fontHeight:Math.round(s*a),fontHeightLG:Math.round(d*l),fontHeightSM:Math.round(c*i),lineHeightHeading1:o[6],lineHeightHeading2:o[5],lineHeightHeading3:o[4],lineHeightHeading4:o[3],lineHeightHeading5:o[2]}}},11702:(e,t,r)=>{"use strict";r.d(t,{A:()=>F});var n=r(97109),o=r(42644),a=r(3638),i=r(77960),l=r(92162),s=r(26047),c=r(52690),d=r(38862),u=r(74567),p=r(6831),f=r(15561),m=r(47252),h=r(38697),g=r(32154),b=r(7961),y=r(28403),v=r(10540);let $=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,o=e.fontSizeSM;return(0,y.oX)(e,{tagFontSize:o,tagLineHeight:(0,f.zA)(n(e.lineHeightSM).mul(o).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},x=e=>{let t=(0,g.z)(new h.kf(e.colorBgSolid),"#fff")?"#000":"#fff";return{defaultBg:new m.Y(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},w=(0,v.OF)("Tag",e=>(e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:o,calc:a}=e,i=a(n).sub(r).equal(),l=a(t).sub(r).equal();return{[o]:{...(0,b.dF)(e),display:"inline-block",height:"auto",paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",backgroundColor:e.defaultBg,border:`${(0,f.zA)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:l,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive},"&-disabled":{cursor:"not-allowed",[`&:not(${o}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:"transparent"}},[`&${o}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${o}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:"flex",flexWrap:"wrap",gap:e.paddingXS}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}},[`&${e.componentCls}-solid`]:{borderColor:"transparent",color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${o}-default`]:{color:e.solidTextColor}},[`${o}-filled`]:{borderColor:"transparent",backgroundColor:e.tagBorderlessBg},[`&${o}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",backgroundColor:e.colorBgContainerDisabled,a:{cursor:"not-allowed",pointerEvents:"none",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${o}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${o}-solid, &${o}-filled`]:{color:e.colorTextDisabled,[`${o}-close-icon`]:{color:e.colorTextDisabled}},[`${o}-close-icon`]:{cursor:"not-allowed",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}})($(e)),x),C=n.forwardRef((e,t)=>{let{prefixCls:r,style:o,className:i,checked:l,children:s,icon:c,onChange:d,onClick:f,onKeyDown:m,disabled:h,...g}=e,{getPrefixCls:b,tag:y}=n.useContext(u.QO),v=n.useContext(p.A),$=h??v,x=b("tag",r),[C,E]=w(x),k=(0,a.$)(x,`${x}-checkable`,{[`${x}-checkable-checked`]:l,[`${x}-checkable-disabled`]:$},y?.className,i,C,E);return n.createElement("span",{...g,ref:t,role:"checkbox","aria-checked":l,"aria-disabled":$||void 0,tabIndex:$?-1:0,style:{...o,...y?.style},className:k,onClick:e=>{$||(d?.(!l),f?.(e))},onKeyDown:e=>{m?.(e),e.defaultPrevented||$||" "===e.key&&(e.preventDefault(),d?.(!l))}},c,n.createElement("span",null,s))});var E=r(9750),k=r(632);let S=n.forwardRef((e,t)=>{let{id:r,prefixCls:i,rootClassName:c,className:d,style:p,classNames:f,styles:m,disabled:h,options:g,value:b,defaultValue:y,onChange:v,multiple:$,...x}=e,{getPrefixCls:S,direction:A,className:P,style:R,classNames:M,styles:T}=(0,u.TP)("tag"),O=S("tag",i),F=`${O}-checkable-group`,N=(0,k.A)(O),[j,I]=w(O,N),z=(0,l.XT)(R),D=(0,l.XT)(p),[B,L]=(0,l.AV)([M,f],[T,z,m,D],{props:e}),_=(0,n.useMemo)(()=>Array.isArray(g)?g.map(e=>(0,s.Qd)(e)?e:{value:e,label:e}):[],[g]),[H,W]=(0,o.PW)(y,b),q=n.useRef(null);(0,n.useImperativeHandle)(t,()=>({nativeElement:q.current}));let V=(0,o.KE)(x,{aria:!0,data:!0});return n.createElement("div",{...V,className:(0,a.$)(F,P,c,{[`${F}-disabled`]:h,[`${F}-rtl`]:"rtl"===A},j,I,d,B.root),style:L.root,id:r,ref:q},_.map(e=>n.createElement(C,{key:e.value,className:(0,a.$)(`${F}-item`,B.item,e.className),style:{...L.item,...e.style},checked:$?(H||[]).includes(e.value):H===e.value,onChange:t=>((e,t)=>{let r=null;if($){let n=H||[];r=e?[].concat((0,E.A)(n),[t.value]):n.filter(e=>e!==t.value)}else r=e?t.value:null;W(r),v?.(r)})(t,e),disabled:h},e.label)))});var A=r(95347),P=r(16924);let R=(0,v.bf)(["Tag","preset"],e=>(e=>(0,P.A)(e,(t,{textColor:r,lightBorderColor:n,lightColor:o,darkColor:a})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:o,borderColor:n,color:r},[`&${e.componentCls}-solid`]:{backgroundColor:a,borderColor:a,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:o,color:r}}})))($(e)),x),M=(e,t,r)=>{let n=function(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}(r);return{[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${n}Bg`],borderColor:e[`color${n}Border`],color:e[`color${r}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${r}`],borderColor:e[`color${r}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${n}Bg`],color:e[`color${r}`]}}}},T=(0,v.bf)(["Tag","status"],e=>{let t=$(e);return[M(t,"success","Success"),M(t,"processing","Info"),M(t,"error","Error"),M(t,"warning","Warning")]},x),O=n.forwardRef((e,t)=>{let{prefixCls:r,className:f,rootClassName:h,style:g,children:b,icon:y,color:v,variant:$,onClose:x,bordered:C,disabled:E,href:k,target:S,styles:P,classNames:M,...O}=e,{getPrefixCls:F,direction:N,className:j,variant:I,style:z,classNames:D,styles:B}=(0,u.TP)("tag"),[L,_,H,W,q]=function(e,t){let{color:r,variant:o,bordered:a}=e;return n.useMemo(()=>{let e,n=r?.endsWith("-inverse");e=o||(n?"solid":!1===a?"filled":t||"filled");let i=n?r?.replace("-inverse",""):r;void 0===i&&"solid"===e&&(i="default");let l=(0,A.nP)(i),s=(0,A.ZZ)(i),c={};if(!l&&!s&&i)if("solid"===e)c.backgroundColor=r;else{let t=new m.Y(i).toHsl();t.l=.95,c.backgroundColor=new m.Y(t).toHexString(),c.color=r,"outlined"===e&&(c.borderColor=r)}return[e,i,l,s,c]},[r,o,a,t])}(e,I),V=H||W,U=n.useContext(p.A),X=E??U,{tag:K}=n.useContext(u.QO),[G,Q]=n.useState(!0),Y=(0,o.cJ)(O,["closeIcon","closable"]),Z={...e,color:_,variant:L,disabled:X},[J,ee]=(0,l.AV)([D,M],[B,P],{props:Z}),et=n.useMemo(()=>{let e={...ee.root,...z,...g};return X||(e={...q,...e}),e},[ee.root,z,g,q,X]),er=F("tag",r),[en,eo]=w(er),ea=(0,a.$)(er,j,J.root,`${er}-${L}`,{[`${er}-${_}`]:V,[`${er}-hidden`]:!G,[`${er}-rtl`]:"rtl"===N,[`${er}-disabled`]:X},f,h,en,eo),ei=e=>{!X&&(e.stopPropagation(),x?.(e),e.defaultPrevented||Q(!1))},el=e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.currentTarget.click())},[,es]=(0,i.$Z)((0,i.dG)(e),(0,i.dG)(K),{closable:!1,closeIconRender:e=>{let t=n.createElement("span",{role:"button",tabIndex:X?-1:0,"aria-disabled":X||void 0,className:(0,a.$)(`${er}-close-icon`,J.close),onClick:ei,onKeyDown:el,style:ee.close},e);return(0,c.fx)(e,t,e=>({onClick:t=>{e?.onClick?.(t),ei(t)},onKeyDown:t=>{e?.onKeyDown?.(t),t.defaultPrevented||el(t)},role:"button",tabIndex:X?-1:0,"aria-disabled":X||void 0,className:(0,a.$)(e?.className,`${er}-close-icon`,J.close),style:{...ee.close,...e?.style}}))}}),ec=(0,s.Tn)(O.onClick)||b&&"a"===b.type,ed=(0,c.Ob)(y,{className:(0,a.$)(n.isValidElement(y)?y.props?.className:void 0,J.icon),style:ee.icon}),eu=ed?n.createElement(n.Fragment,null,ed,b&&n.createElement("span",{className:J.content,style:ee.content},b)):b,ep=n.createElement(k?"a":"span",{...Y,ref:t,className:ea,style:et,href:X?void 0:k,target:S,onClick:X?void 0:Y.onClick,...k&&X?{"aria-disabled":!0}:{}},eu,es,H&&n.createElement(R,{key:"preset",prefixCls:er}),W&&n.createElement(T,{key:"status",prefixCls:er}));return ec?n.createElement(d.A,{component:"Tag"},ep):ep});O.CheckableTag=C,O.CheckableTagGroup=S;let F=O},12754:(e,t,r)=>{"use strict";r.d(t,{sb:()=>a,vG:()=>i});var n=r(97109),o=r(9311);let a={token:o.A,override:{override:o.A},hashed:!0},i=n.createContext(a)},13018:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"}},13076:(e,t,r)=>{"use strict";function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(n=function(){return!!e})()}r.d(t,{A:()=>n})},13500:(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{A:()=>n})},13865:(e,t,r)=>{"use strict";r.d(t,{z:()=>a,A:()=>f});var n=r(3638),o=r(97109);let a=e=>{let{children:t,prefixCls:r,id:a,classNames:i,styles:l,className:s,style:c}=e;return o.createElement("div",{id:a,className:(0,n.$)(`${r}-container`,i?.container,s),style:{...l?.container,...c},role:"tooltip"},"function"==typeof t?t():t)};var i=r(82865),l=r(2819);let s={shiftX:64,adjustY:1},c={adjustX:1,shiftY:!0},d=[0,0],u={left:{points:["cr","cl"],overflow:c,offset:[-4,0],targetOffset:d},right:{points:["cl","cr"],overflow:c,offset:[4,0],targetOffset:d},top:{points:["bc","tc"],overflow:s,offset:[0,-4],targetOffset:d},bottom:{points:["tc","bc"],overflow:s,offset:[0,4],targetOffset:d},topLeft:{points:["bl","tl"],overflow:s,offset:[0,-4],targetOffset:d},leftTop:{points:["tr","tl"],overflow:c,offset:[-4,0],targetOffset:d},topRight:{points:["br","tr"],overflow:s,offset:[0,-4],targetOffset:d},rightTop:{points:["tl","tr"],overflow:c,offset:[4,0],targetOffset:d},bottomRight:{points:["tr","br"],overflow:s,offset:[0,4],targetOffset:d},rightBottom:{points:["bl","br"],overflow:c,offset:[4,0],targetOffset:d},bottomLeft:{points:["tl","bl"],overflow:s,offset:[0,4],targetOffset:d},leftBottom:{points:["br","bl"],overflow:c,offset:[-4,0],targetOffset:d}};function p(){return(p=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 f=o.forwardRef((e,t)=>{let{trigger:r=["hover"],mouseEnterDelay:s=0,mouseLeaveDelay:c=.1,prefixCls:d="rc-tooltip",children:f,onVisibleChange:m,afterVisibleChange:h,motion:g,placement:b="right",align:y={},destroyOnHidden:v=!1,defaultVisible:$,getTooltipContainer:x,arrowContent:w,overlay:C,id:E,showArrow:k=!0,classNames:S,styles:A,...P}=e,R=(0,l.Ay)(E),M=(0,o.useRef)(null);(0,o.useImperativeHandle)(t,()=>M.current);let T={...P};"visible"in e&&(T.popupVisible=e.visible);let O=o.useMemo(()=>{if(!k)return!1;let e=!0===k?{}:k;return{...e,className:(0,n.$)(e.className,S?.arrow),style:{...e.style,...A?.arrow},content:e.content??w}},[k,S?.arrow,A?.arrow,w]);return o.createElement(i.Ay,p({popupClassName:S?.root,prefixCls:d,popup:o.createElement(a,{key:"content",prefixCls:d,id:R,classNames:S,styles:A},C),action:r,builtinPlacements:u,popupPlacement:b,ref:M,popupAlign:y,getPopupContainer:x,onOpenChange:m,afterOpenChange:h,popupMotion:g,defaultPopupVisible:$,autoDestroy:v,mouseLeaveDelay:c,popupStyle:A?.root,mouseEnterDelay:s,arrow:O,uniqueContainerClassName:S?.uniqueContainer,uniqueContainerStyle:A?.uniqueContainer},T),({open:e})=>{let t=o.Children.only(f);return o.cloneElement(t,{"aria-describedby":C&&e?R:void 0})})})},13911:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>s,Ke:()=>l,Zs:()=>i});var n=r(15561),o=r(10540),a=r(21701);let i=8;function l(e){let{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?i:n}}let s=(e,t,r)=>{let{componentCls:i,boxShadowPopoverArrow:l,arrowOffsetVertical:s,arrowOffsetHorizontal:c,antCls:d}=e,[u]=(0,o.PN)(d,"tooltip"),{arrowDistance:p=0,arrowShadow:f=!0}=r||{};return{[i]:{[`${i}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...(0,a.j)(e,t,!!f&&l),"&:before":{background:t}}],[`&-placement-top > ${i}-arrow,&-placement-topLeft > ${i}-arrow,&-placement-topRight > ${i}-arrow`]:{bottom:p,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${i}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[u("arrow-offset-x")]:c,[`> ${i}-arrow`]:{left:{_skip_check_:!0,value:c}}},"&-placement-topRight":{[u("arrow-offset-x")]:`calc(100% - ${(0,n.zA)(c)})`,[`> ${i}-arrow`]:{right:{_skip_check_:!0,value:c}}},[`&-placement-bottom > ${i}-arrow,&-placement-bottomLeft > ${i}-arrow,&-placement-bottomRight > ${i}-arrow`]:{top:p,transform:"translateY(-100%)"},[`&-placement-bottom > ${i}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[u("arrow-offset-x")]:c,[`> ${i}-arrow`]:{left:{_skip_check_:!0,value:c}}},"&-placement-bottomRight":{[u("arrow-offset-x")]:`calc(100% - ${(0,n.zA)(c)})`,[`> ${i}-arrow`]:{right:{_skip_check_:!0,value:c}}},[`&-placement-left > ${i}-arrow,&-placement-leftTop > ${i}-arrow,&-placement-leftBottom > ${i}-arrow`]:{right:{_skip_check_:!0,value:p},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${i}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${i}-arrow`]:{top:s},[`&-placement-leftBottom > ${i}-arrow`]:{bottom:s},[`&-placement-right > ${i}-arrow,&-placement-rightTop > ${i}-arrow,&-placement-rightBottom > ${i}-arrow`]:{left:{_skip_check_:!0,value:p},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${i}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${i}-arrow`]:{top:s},[`&-placement-rightBottom > ${i}-arrow`]:{bottom:s}}}}},14450:(e,t,r)=>{"use strict";function n(){return!!("undefined"!=typeof window&&window.document&&window.document.createElement)}r.d(t,{A:()=>n})},14489:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(97109),o=r(26047);let a=(e,t)=>n.useMemo(()=>{let r=e??t;return!!r&&{...(0,o.Qd)(t)?t:{},...(0,o.Qd)(r)?r:{}}},[e,t])},14932:(e,t,r)=>{"use strict";r.d(t,{A:()=>z});var n=r(97109),o=r(13865),a=r(42644),i=r(3638),l=r(44137),s=r(36319),c=r(92162),d=r(26047),u=r(84649),p=r(8627),f=r(52690),m=r(29633),h=r(58860),g=r(74567),b=r(632),y=r(60367),v=r(7709),$=r(21207),x=r(15561),w=r(7961),C=r(72668),E=r(49345),k=r(13911),S=r(21701),A=r(16924),P=r(28403),R=r(10540);let M=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...(0,k.Ke)({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...(0,S.n)((0,P.oX)(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),T=(e,t,r=!0)=>(0,R.OF)("Tooltip",e=>{let{borderRadius:t,colorTextLightSolid:r,colorBgSpotlight:n,maxWidth:o}=e;return[(e=>{let{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:o,tooltipBg:a,tooltipBorderRadius:i,zIndexPopup:l,controlHeight:s,dropShadowPopover:c,paddingSM:d,paddingXS:u,arrowOffsetHorizontal:p,sizePopupArrow:f,antCls:m}=e,[h,g]=(0,R.PN)(m,"tooltip"),b=t(i).add(f).add(p).equal(),y={minWidth:t(i).mul(2).add(f).equal(),minHeight:s,padding:`${(0,x.zA)(e.calc(d).div(2).equal())} ${(0,x.zA)(u)}`,color:g("overlay-color",o),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:a,borderRadius:i,boxSizing:"border-box"},v={[h("valid-offset-x")]:g("arrow-offset-x","var(--arrow-x)"),transformOrigin:[g("valid-offset-x","50%"),"var(--arrow-y, 50%)"].join(" ")};return[{[r]:{...(0,w.dF)(e),position:"absolute",zIndex:l,display:"block",width:"max-content",maxWidth:n,visibility:"visible",filter:c,...v,"&-hidden":{display:"none"},[h("arrow-background-color")]:a,[`${r}-container`]:[y,(0,C.p9)(e,!0)],[`&:has(~ ${r}-unique-container)`]:{[`${r}-container`]:{border:"none",background:"transparent"}},"&-placement-topLeft,&-placement-topRight,&-placement-bottomLeft,&-placement-bottomRight":{minWidth:b},"&-placement-left,&-placement-leftTop,&-placement-leftBottom,&-placement-right,&-placement-rightTop,&-placement-rightBottom":{[`${r}-inner`]:{borderRadius:e.min(i,k.Zs)}},[`${r}-content`]:{position:"relative"},...(0,A.A)(e,(e,{darkColor:t})=>({[`&${r}-${e}`]:{[`${r}-container`]:{backgroundColor:t},[`${r}-arrow`]:{[h("arrow-background-color")]:t}}})),"&-rtl":{direction:"rtl"}}},(0,k.Ay)(e,g("arrow-background-color"),{arrowShadow:!1}),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${r}-unique-container`]:{...y,...v,position:"absolute",zIndex:t(l).sub(1).equal(),filter:c,"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]})((0,P.oX)(e,{tooltipMaxWidth:o,tooltipColor:r,tooltipBorderRadius:t,tooltipBg:n})),(0,E.aB)(e,"zoom-big-fast")]},M,{resetStyle:!1,injectStyle:r})(e,t);var O=r(95347);r(58018);var F=r(38697);let N=(e,t,r)=>{let n=(0,O.nP)(r),[o]=(0,R.PN)(e,"tooltip"),a=(0,i.$)({[`${t}-${r}`]:r&&n}),l={},s={},c=(e=>e instanceof F.kf?e:new F.kf(e))(r).toRgb(),d=(.299*c.r+.587*c.g+.114*c.b)/255;return r&&!n&&(l.background=r,l[o("overlay-color")]=d<.5?"#FFF":"#000",s[o("arrow-background-color")]=r),{className:a,overlayStyle:l,arrowStyle:s}};var j=r(47188);let I=n.forwardRef((e,t)=>{let{prefixCls:r,openClassName:x,getTooltipContainer:w,color:C,children:E,afterOpenChange:k,arrow:S,destroyTooltipOnHide:A,destroyOnHidden:P,title:R,overlay:M,trigger:O,builtinPlacements:F,autoAdjustOverflow:j=!0,motion:I,getPopupContainer:z,placement:D="top",mouseEnterDelay:B=.1,mouseLeaveDelay:L=.1,rootClassName:_,styles:H,classNames:W,onOpenChange:q,overlayInnerStyle:V,overlayStyle:U,overlayClassName:X,...K}=e,[,G]=(0,v.Ay)(),Q=e["data-popover-inject"],{getPopupContainer:Y,getPrefixCls:Z,direction:J,...ee}=(0,g.TP)("tooltip"),{className:et,style:er,classNames:en,styles:eo,arrow:ea,trigger:ei}=Q?{}:ee,el=(0,$.A)(S,ea),es=el.show,ec=O||ei||"hover",ed=z||Y,eu=P??!!A,ep=n.useContext(y.A);(0,m.rJ)("Tooltip");let ef=n.useRef(null),em=()=>{ef.current?.forceAlign()};n.useImperativeHandle(t,()=>({forceAlign:em,nativeElement:ef.current?.nativeElement,popupElement:ef.current?.popupElement}));let[eh,eg]=(0,a.PW)(e.defaultOpen??!1,e.open),eb=!R&&!M&&0!==R,ey=n.useMemo(()=>F||(0,p.A)({arrowPointAtCenter:el?.pointAtCenter??!1,autoAdjustOverflow:j,arrowWidth:es?G.sizePopupArrow:0,borderRadius:G.borderRadius,offset:G.marginXXS,visibleFirst:!0}),[el,F,G,es,j]),ev=n.useMemo(()=>0===R?R:M||R||"",[M,R]),e$=n.createElement(l.A,{space:!0,form:!0},(0,d.Tn)(ev)?ev():ev),ex={...e,trigger:ec,builtinPlacements:ey,getPopupContainer:ed,destroyOnHidden:eu},[ew,eC]=(0,c.AV)([en,W],[eo,H],{props:ex}),eE=Z("tooltip",r),ek=Z(),eS=eh;("open"in e||!eb)&&!ep||(eS=!1);let eA=n.isValidElement(E)&&!(0,f.zv)(E)?E:n.createElement("span",null,E),eP=eA.props,eR=eP.className&&"string"!=typeof eP.className?eP.className:(0,i.$)(eP.className,x||`${eE}-open`),eM=(0,b.A)(eE),[eT,eO]=T(eE,eM,!Q),eF=N(ek,eE,C),eN=eF.arrowStyle,ej=(0,i.$)(eM,eT,eO),eI=(0,i.$)(X,{[`${eE}-rtl`]:"rtl"===J},eF.className,_,ej,et,ew.root),[ez,eD]=(0,s.YK)("Tooltip",K.zIndex),eB={...eC.container,...V,...eF.overlayStyle},eL=n.createElement(o.A,{unique:!0,...K,zIndex:ez,showArrow:es,placement:D,mouseEnterDelay:B,mouseLeaveDelay:L,prefixCls:eE,classNames:{root:eI,container:ew.container,arrow:ew.arrow,uniqueContainer:(0,i.$)(ej,ew.container)},styles:{root:{...eN,...eC.root,...er,...U},container:eB,uniqueContainer:eB,arrow:eC.arrow},ref:ef,overlay:e$,visible:eS,onVisibleChange:e=>{eg(!eb&&e),!eb&&q&&q(e)},afterVisibleChange:k,arrowContent:n.createElement("span",{className:`${eE}-arrow-content`}),motion:{motionName:(0,u.b)(ek,"zoom-big-fast","string"==typeof I?.motionName?I?.motionName:void 0),motionDeadline:1e3},trigger:ec,builtinPlacements:ey,getTooltipContainer:ed,destroyOnHidden:eu},eS?(0,f.Ob)(eA,{className:eR}):eA);return n.createElement(h.A.Provider,{value:eD},eL)});I._InternalPanelDoNotUseOrYouWillBeFired=e=>{let{prefixCls:t,className:r,placement:a="top",title:l,color:s,overlayInnerStyle:d,classNames:u,styles:p}=e,{getPrefixCls:f}=n.useContext(g.QO),m=f("tooltip",t),h=f(),y=(0,b.A)(m),[v,$]=T(m,y),x=N(h,m,s),w=x.arrowStyle,C=n.useMemo(()=>({container:{...d,...x.overlayStyle}}),[d,x.overlayStyle]),E={...e,placement:a},[k,S]=(0,c.AV)([u],[C,p],{props:E}),A=(0,i.$)(y,v,$,m,`${m}-pure`,`${m}-placement-${a}`,r,x.className);return n.createElement("div",{className:A,style:w},n.createElement("div",{className:`${m}-arrow`}),n.createElement(o.z,{...e,className:v,prefixCls:m,classNames:k,styles:S},l))},I.UniqueProvider=j.A;let z=I},15472:(e,t,r)=>{"use strict";function n(e,t){return(n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n(e,t)}r.d(t,{A:()=>o})},15561:(e,t,r)=>{"use strict";let n;r.d(t,{Mo:()=>eO,J:()=>f,an:()=>$,lO:()=>j,Ki:()=>R,zA:()=>S,RC:()=>eM,hV:()=>I,IV:()=>eR});let o=function(e){for(var t,r=0,n=0,o=e.length;o>=4;++n,o-=4)t=(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))*0x5bd1e995+((t>>>16)*59797<<16),t^=t>>>24,r=(65535&t)*0x5bd1e995+((t>>>16)*59797<<16)^(65535&r)*0x5bd1e995+((r>>>16)*59797<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r^=255&e.charCodeAt(n),r=(65535&r)*0x5bd1e995+((r>>>16)*59797<<16)}return r^=r>>>13,(((r=(65535&r)*0x5bd1e995+((r>>>16)*59797<<16))^r>>>15)>>>0).toString(36)};var a=r(63255),i=r(97109);function l(e){return e.join("%")}r(87248),r(25846);let s=0;class c{instanceId;constructor(e){this.instanceId=e}cache=new Map;updateTimes=new Map;extracted=new Set;get(e){return this.opGet(l(e))}opGet(e){return this.cache.get(e)||null}update(e,t){return this.opUpdate(l(e),t)}opUpdate(e,t){let r=t(this.cache.get(e));null===r?(this.cache.delete(e),this.updateTimes.delete(e)):(this.cache.set(e,r),this.updateTimes.set(e,s),s+=1)}}let d="data-token-hash",u="data-css-hash",p="__cssinjs_instance__",f=i.createContext({hashPriority:"low",cache:function(){let e=Math.random().toString(12).slice(2);if("undefined"!=typeof document&&document.head&&document.body){let t=document.body.querySelectorAll(`style[${u}]`)||[],{firstChild:r}=document.head;Array.from(t).forEach(t=>{t[p]||=e,t[p]===e&&document.head.insertBefore(t,r)});let n={};Array.from(document.querySelectorAll(`style[${u}]`)).forEach(t=>{let r=t.getAttribute(u);n[r]?t[p]===e&&t.parentNode?.removeChild(t):n[r]=!0})}return new c(e)}(),defaultCache:!0,autoPrefix:!1});var m=r(14450);class h{static MAX_CACHE_SIZE=20;static MAX_CACHE_OFFSET=5;cache;keys;cacheCallTimes;constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(e,t=!1){let r={map:this.cache};return e.forEach(e=>{r=r?r?.map?.get(e):void 0}),r?.value&&t&&(r.value[1]=this.cacheCallTimes++),r?.value}get(e){return this.internalGet(e,!0)?.[0]}has(e){return!!this.internalGet(e)}set(e,t){if(!this.has(e)){if(this.size()+1>h.MAX_CACHE_SIZE+h.MAX_CACHE_OFFSET){let[e]=this.keys.reduce((e,t)=>{let[,r]=e;return this.internalGet(t)[1]<r?[t,this.internalGet(t)[1]]:e},[this.keys[0],this.cacheCallTimes]);this.delete(e)}this.keys.push(e)}let r=this.cache;e.forEach((n,o)=>{if(o===e.length-1)r.set(n,{value:[t,this.cacheCallTimes++]});else{let e=r.get(n);e?e.map||(e.map=new Map):r.set(n,{map:new Map}),r=r.get(n).map}})}deleteByPath(e,t){let r=e.get(t[0]);if(1===t.length)return r.map?e.set(t[0],{map:r.map}):e.delete(t[0]),r.value?.[0];let n=this.deleteByPath(r.map,t.slice(1));return r.map&&0!==r.map.size||r.value||e.delete(t[0]),n}delete(e){if(this.has(e))return this.keys=this.keys.filter(t=>!function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(t,e)),this.deleteByPath(this.cache,e)}}var g=r(96546);let b=0;class y{derivatives;id;constructor(e){this.derivatives=Array.isArray(e)?e:[e],this.id=b,0===e.length&&(0,g.$e)(e.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),b+=1}getDerivativeToken(e){return this.derivatives.reduce((t,r)=>r(e,t),void 0)}}let v=new h;function $(e){let t=Array.isArray(e)?e:[e];return v.has(t)||v.set(t,new y(t)),v.get(t)}let x=new WeakMap,w={},C=new WeakMap;function E(e){let t=C.get(e)||"";return t||(Object.keys(e).forEach(r=>{let n=e[r];t+=r,n instanceof y?t+=n.id:n&&"object"==typeof n?t+=E(n):t+=n}),t=o(t),C.set(e,t)),t}`random-${Date.now()}-${Math.random()}`.replace(/\./g,"");let k=(0,m.A)();function S(e){return"number"==typeof e?`${e}px`:e}function A(e){let{hashCls:t,hashPriority:r="low"}=e||{};if(!t)return"";let n=`.${t}`;return"low"===r?`:where(${n})`:n}function P(e,t){let r="function"==typeof t?t():t;return r?{...e,csp:{...e.csp,nonce:r}}:e}let R=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),M=(e,t,r)=>{let{hashCls:n,hashPriority:o="low",prefix:a,unitless:i,ignore:l,preserve:s}=r||{},c={},d={};return Object.entries(e).forEach(([e,t])=>{if(s?.[e])d[e]=t;else if(("string"==typeof t||"number"==typeof t)&&!l?.[e]){let r=R(e,a);c[r]="number"!=typeof t||i?.[e]?String(t):`${t}px`,d[e]=`var(${r})`}}),[d,((e,t,r)=>{let{hashCls:n,hashPriority:o="low",scope:a}=r||{};if(!Object.keys(e).length)return"";let i=`${A({hashCls:n,hashPriority:o})}.${t}`,l=[a].flat().filter(Boolean),s=l.length?l.map(e=>`${i}.${e}`).join(", "):i;return`${s}{${Object.entries(e).map(([e,t])=>`${e}:${t};`).join("")}}`})(c,t,{scope:r?.scope,hashCls:n,hashPriority:o})]},T=new Map;function O(e,t,r,n,o){let{cache:a}=i.useContext(f),s=l([e,...t]),c=e=>{a.opUpdate(s,t=>{let[n=0,o]=t||[void 0,void 0],a=[n,o||r()];return e?e(a):a})};i.useMemo(()=>{c()},[s]);let d=a.opGet(s)[1];return(0,i.useInsertionEffect)(()=>(c(([e,t])=>[e+1,t]),T.has(s)||(o?.(d),T.set(s,!0),Promise.resolve().then(()=>{T.delete(s)})),()=>{a.opUpdate(s,e=>{let[t=0,r]=e||[];return 0==t-1?(n?.(r,!1),T.delete(s),null):[t-1,r]})}),[s]),d}let F={},N=new Map,j=(e,t,r,n)=>{let o={...r.getDerivativeToken(e),...t};return n&&(o=n(o)),o};function I(e,t,r){let{cache:{instanceId:n},container:l,hashPriority:s}=(0,i.useContext)(f),{salt:c="",override:m=F,formatToken:h,getComputedToken:g,cssVar:b,nonce:y}=r,v=function(e,t){let r=x;for(let e=0;e<t.length;e+=1){let n=t[e];r.has(n)||r.set(n,new WeakMap),r=r.get(n)}return r.has(w)||r.set(w,e()),r.get(w)}(()=>Object.assign({},...t),t),$=E(v),C=E(m),k=E(b);return O("token",[c,e.id,$,C,k],()=>{var t;let r=g?g(v,m,e):j(v,m,e,h),n={...r},a=`${c}_${b.prefix}`,i=o(a),l=`css-${i}`;n._tokenKey=o(`${a}_${E(n)}`);let[d,u]=M(r,b.key,{prefix:b.prefix,ignore:b.ignore,unitless:b.unitless,preserve:b.preserve,hashPriority:s,hashCls:b.hashed?l:void 0});return d._hashId=i,t=b.key,N.set(t,(N.get(t)||0)+1),[d,l,n,u,b.key]},([,,,,e])=>{N.set(e,(N.get(e)||0)-1);let t=new Set;N.forEach((e,r)=>{e<=0&&t.add(r)}),N.size-t.size>-1&&t.forEach(e=>{"undefined"!=typeof document&&document.querySelectorAll(`style[${d}="${e}"]`).forEach(e=>{e[p]===n&&e.parentNode?.removeChild(e)}),N.delete(e)})},([,,,e,t])=>{if(!e)return;let r={mark:u,prepend:"queue",attachTo:l,priority:-999};r=P(r,y);let i=(0,a.BD)(e,o(`css-var-${t}`),r);i[p]=n,i.setAttribute(d,t)})}let z={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var D="-ms-",B="-moz-",L="-webkit-",_="comm",H="rule",W="decl",q="@keyframes",V=Math.abs,U=String.fromCharCode,X=Object.assign;function K(e,t){return(e=t.exec(e))?e[0]:e}function G(e,t,r){return e.replace(t,r)}function Q(e,t){return e.indexOf(t)}function Y(e,t){return 0|e.charCodeAt(t)}function Z(e,t,r){return e.slice(t,r)}function J(e){return e.length}function ee(e,t){return t.push(e),e}function et(e,t){return e.filter(function(e){return!K(e,t)})}function er(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function en(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case W:return e.return=e.return||e.value;case _:return"";case q:return e.return=e.value+"{"+er(e.children,n)+"}";case H:if(!J(e.value=e.props.join(",")))return""}return J(r=er(e.children,n))?e.return=e.value+"{"+r+"}":""}var eo=1,ea=1,ei=0,el=0,es=0,ec="";function ed(e,t,r,n,o,a,i,l){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:eo,column:ea,length:i,return:"",siblings:l}}function eu(e,t){return X(ed("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function ep(e){for(;e.root;)e=eu(e.root,{children:[e]});ee(e,e.siblings)}function ef(){return es=el<ei?Y(ec,el++):0,ea++,10===es&&(ea=1,eo++),es}function em(){return Y(ec,el)}function eh(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function eg(e){var t,r;return(t=el-1,r=function e(t){for(;ef();)switch(es){case t:return el;case 34:case 39:34!==t&&39!==t&&e(es);break;case 40:41===t&&e(t);break;case 92:ef()}return el}(91===e?e+2:40===e?e+1:e),Z(ec,t,r)).trim()}function eb(e){var t,r;return r=function e(t,r,n,o,a,i,l,s,c){for(var d,u,p,f,m=0,h=0,g=l,b=0,y=0,v=0,$=1,x=1,w=1,C=0,E=0,k="",S=a,A=i,P=o,R=k;x;)switch(v=E,E=ef()){case 40:108!=v&&58==Y(R,g-1)?(C++,R+="("):R+=eg(E);break;case 41:C--,R+=")";break;case 34:case 39:case 91:R+=eg(E);break;case 9:case 10:case 13:case 32:if(C>0){R+=U(E);break}R+=function(e){for(;es=em();)if(es<33)ef();else break;return eh(e)>2||eh(es)>3?"":" "}(v);break;case 92:R+=function(e,t){for(var r;--t&&ef()&&!(es<48)&&!(es>102)&&(!(es>57)||!(es<65))&&(!(es>70)||!(es<97)););return r=el+(t<6&&32==em()&&32==ef()),Z(ec,e,r)}(el-1,7);continue;case 47:switch(em()){case 42:case 47:ee((d=function(e,t){for(;ef();)if(e+es===57)break;else if(e+es===84&&47===em())break;return"/*"+Z(ec,t,el-1)+"*"+U(47===e?e:ef())}(ef(),el),u=r,p=n,f=c,ed(d,u,p,_,U(es),Z(d,2,-2),0,f)),c),(5==eh(v||1)||5==eh(em()||1))&&J(R)&&" "!==Z(R,-1,void 0)&&(R+=" ");break;default:R+="/"}break;case 123*$:s[m++]=J(R)*w;case 125*$:case 59:case 0:if(C>0&&E){R+=U(E);break}switch(E){case 0:case 125:x=0;case 59+h:-1==w&&(R=G(R,/\f/g,"")),y>0&&(J(R)-g||0===$)&&ee(y>32?ev(R+";",o,n,g-1,c):ev(G(R," ","")+";",o,n,g-2,c),c);break;case 59:R+=";";default:if(ee(P=ey(R,r,n,m,h,a,s,k,S=[],A=[],g,i),i),123===E)if(0===h)e(R,r,P,P,S,i,g,s,A);else{switch(b){case 99:if(110===Y(R,3))break;case 108:if(97===Y(R,2))break;default:h=0;case 100:case 109:case 115:}h?e(t,P,P,o&&ee(ey(t,P,P,0,0,a,s,k,a,S=[],g,A),A),a,A,g,s,o?S:A):e(R,P,P,P,[""],A,0,s,A)}}m=h=y=0,$=w=1,k=R="",g=l;break;case 58:g=1+J(R),y=v;default:if($<1){if(123==E)--$;else if(125==E&&0==$++&&125==(es=el>0?Y(ec,--el):0,ea--,10===es&&(ea=1,eo--),es))continue}switch(R+=U(E),E*$){case 38:w=h>0?1:(R+="\f",-1);break;case 44:if(C>0)break;s[m++]=(J(R)-1)*w,w=1;break;case 64:45===em()&&(R+=eg(ef())),b=em(),h=g=J(k=R+=function(e){for(;!eh(em());)ef();return Z(ec,e,el)}(el)),E++;break;case 45:45===v&&2==J(R)&&($=0)}}return i}("",null,null,null,[""],(t=e,eo=ea=1,ei=J(ec=t),el=0,e=[]),0,[0],e),ec="",r}function ey(e,t,r,n,o,a,i,l,s,c,d,u){for(var p=o-1,f=0===o?a:[""],m=f.length,h=0,g=0,b=0;h<n;++h)for(var y=0,v=Z(e,p+1,p=V(g=i[h])),$=e;y<m;++y)($=(g>0?f[y]+" "+v:G(v,/&\f/g,f[y])).trim())&&(s[b++]=$);return ed(e,t,r,0===o?H:l,s,c,d,u)}function ev(e,t,r,n,o){return ed(e,t,r,W,Z(e,0,n),Z(e,n+1,-1),n,o)}function e$(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case W:e.return=function e(t,r,n){var o;switch(o=r,45^Y(t,0)?(((o<<2^Y(t,0))<<2^Y(t,1))<<2^Y(t,2))<<2^Y(t,3):0){case 5103:return L+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return L+t+t;case 4855:return L+t.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+t;case 4789:return B+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return L+t+B+t+D+t+t;case 5936:switch(Y(t,r+11)){case 114:return L+t+D+G(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return L+t+D+G(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return L+t+D+G(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return L+t+D+t+t;case 6165:return L+t+D+"flex-"+t+t;case 5187:return L+t+G(t,/(\w+).+(:[^]+)/,L+"box-$1$2"+D+"flex-$1$2")+t;case 5443:return L+t+D+"flex-item-"+G(t,/flex-|-self/g,"")+(K(t,/flex-|baseline/)?"":D+"grid-row-"+G(t,/flex-|-self/g,""))+t;case 4675:return L+t+D+"flex-line-pack"+G(t,/align-content|flex-|-self/g,"")+t;case 5548:return L+t+D+G(t,"shrink","negative")+t;case 5292:return L+t+D+G(t,"basis","preferred-size")+t;case 6060:return L+"box-"+G(t,"-grow","")+L+t+D+G(t,"grow","positive")+t;case 4554:return L+G(t,/([^-])(transform)/g,"$1"+L+"$2")+t;case 6187:return G(G(G(t,/(zoom-|grab)/,L+"$1"),/(image-set)/,L+"$1"),t,"")+t;case 5495:case 3959:return G(t,/(image-set\([^]*)/,L+"$1$`$1");case 4968:return G(G(t,/(.+:)(flex-)?(.*)/,L+"box-pack:$3"+D+"flex-pack:$3"),/space-between/,"justify")+L+t+t;case 4200:if(!K(t,/flex-|baseline/))return D+"grid-column-align"+Z(t,r)+t;break;case 2592:case 3360:return D+G(t,"template-","")+t;case 4384:case 3616:if(n&&n.some(function(e,t){return r=t,K(e.props,/grid-\w+-end/)}))return~Q(t+(n=n[r].value),"span")?t:D+G(t,"-start","")+t+D+"grid-row-span:"+(~Q(n,"span")?K(n,/\d+/):K(n,/\d+/)-K(t,/\d+/))+";";return D+G(t,"-start","")+t;case 4896:case 4128:return n&&n.some(function(e){return K(e.props,/grid-\w+-start/)})?t:D+G(G(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return G(t,/(.+)-inline(.+)/,L+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(J(t)-1-r>6)switch(Y(t,r+1)){case 109:if(45!==Y(t,r+4))break;case 102:return G(t,/(.+:)(.+)-([^]+)/,"$1"+L+"$2-$3$1"+B+(108==Y(t,r+3)?"$3":"$2-$3"))+t;case 115:return~Q(t,"stretch")?e(G(t,"stretch","fill-available"),r,n)+t:t}break;case 5152:case 5920:return G(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(e,r,n,o,a,i,l){return D+r+":"+n+l+(o?D+r+"-span:"+(a?i:i-n)+l:"")+t});case 4949:if(121===Y(t,r+6))return G(t,":",":"+L)+t;break;case 6444:switch(Y(t,45===Y(t,14)?18:11)){case 120:return G(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+L+(45===Y(t,14)?"inline-":"")+"box$3$1"+L+"$2$3$1"+D+"$2box$3")+t;case 100:return G(t,":",":"+D)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return G(t,"scroll-","scroll-snap-")+t}return t}(e.value,e.length,r);return;case q:return er([eu(e,{value:G(e.value,"@","@"+L)})],n);case H:if(e.length){var o,a;return o=r=e.props,a=function(t){switch(K(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":ep(eu(e,{props:[G(t,/:(read-\w+)/,":"+B+"$1")]})),ep(eu(e,{props:[t]})),X(e,{props:et(r,n)});break;case"::placeholder":ep(eu(e,{props:[G(t,/:(plac\w+)/,":"+L+"input-$1")]})),ep(eu(e,{props:[G(t,/:(plac\w+)/,":"+B+"$1")]})),ep(eu(e,{props:[G(t,/:(plac\w+)/,D+"input-$1")]})),ep(eu(e,{props:[t]})),X(e,{props:et(r,n)})}return""},o.map(a).join("")}}}let ex="data-ant-cssinjs-cache-path",ew="_FILE_STYLE__",eC=!0,eE="_multi_value_";function ek(e,t){var r,n;return(t?er(eb(e),(n=(r=[e$,en]).length,function(e,t,o,a){for(var i="",l=0;l<n;l++)i+=r[l](e,t,o,a)||"";return i})):er(eb(e),en)).replace(/\{%%%\:[^;];}/g,";")}function eS(e,t,r="high"){if(!t)return e;let n=A({hashCls:t,hashPriority:r});return e.split(",").map(e=>{let t=e.trim().split(/\s+/),r=t[0]||"",o=r.match(/^\w+/)?.[0]||"";return[r=`${o}${n}${r.slice(o.length)}`,...t.slice(1)].join(" ")}).join(",")}let eA=(e,t={},{root:r,injectHash:n,parentSelectors:o}={root:!0,parentSelectors:[]})=>{let{hashId:a,layer:i,path:l,hashPriority:s,transformers:c=[],linters:d=[]}=t,u="",p={};function f(e){let r=e.getName(a);if(!p[r]){let[n]=eA(e.style,t,{root:!1,parentSelectors:o});p[r]=`@keyframes ${e.getName(a)}${n}`}}return(function e(t,r=[]){return t.forEach(t=>{Array.isArray(t)?e(t,r):t&&r.push(t)}),r})(Array.isArray(e)?e:[e]).forEach(e=>{let i="string"!=typeof e||r?e:{};if("string"==typeof i)u+=`${i}
|
|
13
13
|
`;else if(i._keyframe)f(i);else{let e=c.reduce((e,t)=>t?.visit?.(e)||e,i);Object.keys(e).forEach(i=>{let l=e[i];if("object"==typeof l&&l&&("animationName"!==i||!l._keyframe)&&!function(e){return"object"==typeof e&&e&&("_skip_check_"in e||eE in e)}(l)){let e=!1,c=i.trim(),d=!1;(r||n)&&a?c.startsWith("@")?e=!0:c="&"===c?eS("",a,s):eS(i,a,s):r&&!a&&("&"===c||""===c)&&(c="",d=!0);let[f,m]=eA(l,t,{root:d,injectHash:e,parentSelectors:[...o,c]});p={...p,...m},u+=`${c}${f}`}else{function c(e,t){let r=e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),n=t;z[e]||"number"!=typeof n||0===n||(n=`${n}px`),"animationName"===e&&t?._keyframe&&(f(t),n=t.getName(a)),u+=`${r}:${n};`}let e=l?.value??l;"object"==typeof l&&l?.[eE]&&Array.isArray(e)?e.forEach(e=>{c(i,e)}):null!=e&&c(i,e)}})}}),r?i&&(u&&(u=`@layer ${i.name} {${u}}`),i.dependencies&&(p[`@layer ${i.name}`]=i.dependencies.map(e=>`@layer ${e}, ${i.name};`).join("\n"))):u=`{${u}}`,[u,p]};function eP(e,t){return o(`${e.join("%")}${t}`)}function eR(e,t){let{path:r,hashId:o,layer:l,nonce:s,clientOnly:c,order:d=0}=e,{mock:h,hashPriority:g,container:b,transformers:y,linters:v,cache:$,layer:x,autoPrefix:w}=i.useContext(f),C=[o||""];x&&C.push("layer"),C.push(...r),O("style",C,()=>{let e=C.join("|");if(function(e){if(!n&&(n={},(0,m.A)())){let e=document.createElement("div");e.className=ex,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let t=getComputedStyle(e).content||"";(t=t.replace(/^"/,"").replace(/"$/,"")).split(";").forEach(e=>{let[t,r]=e.split(":");n[t]=r});let r=document.querySelector(`style[${ex}]`);r&&(eC=!1,r.parentNode?.removeChild(r)),document.body.removeChild(e)}return!!n[e]}(e)){let[t,r]=function(e){let t=n[e],r=null;if(t&&(0,m.A)())if(eC)r=ew;else{let t=document.querySelector(`style[${u}="${n[e]}"]`);t?r=t.innerHTML:delete n[e]}return[r,t]}(e);if(t)return[t,r,{},c,d]}let[a,i]=eA(t(),{hashId:o,hashPriority:g,layer:x?l:void 0,path:r.join("-"),transformers:y,linters:v}),s=ek(a,w||!1),p=eP(C,s);return[s,p,i,c,d]},(e,t)=>{let[,r]=e;t&&k&&(0,a.m6)(r,{mark:u,attachTo:b})},e=>{let[t,r,n,,o]=e;if(k&&t!==ew){let e={mark:u,prepend:!x&&"queue",attachTo:b,priority:o};e=P(e,s);let i=[],l=[];Object.keys(n).forEach(e=>{e.startsWith("@layer")?i.push(e):l.push(e)}),i.forEach(t=>{(0,a.BD)(ek(n[t],w||!1),`_layer-${t}`,{...e,prepend:!0})}),(0,a.BD)(t,r,e)[p]=$.instanceId,l.forEach(t=>{(0,a.BD)(ek(n[t],w||!1),`_effect-${t}`,e)})}})}let eM=(e,t)=>{let{key:r,prefix:n,unitless:o,ignore:l,token:s,hashId:c,scope:m,nonce:h}=e,{cache:{instanceId:g},container:b,hashPriority:y}=(0,i.useContext)(f),{_tokenKey:v}=s,$=Array.isArray(m)?m.join("@@"):m,x=[...e.path,r,$,v];return O("cssVar",x,()=>{let[e,a]=M(t(),r,{prefix:n,unitless:o,ignore:l,scope:m,hashPriority:y,hashCls:c}),i=eP(x,a);return[e,a,i,r]},([,,e])=>{k&&(0,a.m6)(e,{mark:u,attachTo:b})},([,e,t])=>{if(!e)return;let n={mark:u,prepend:"queue",attachTo:b,priority:-999};n=P(n,h);let o=(0,a.BD)(e,t,n);o[p]=g,o.setAttribute(d,r)})};class eT{name;style;constructor(e,t){this.name=e,this.style=t}getName(e=""){return e?`${e}-${this.name}`:this.name}_keyframe=!0}let eO=eT;function eF(e){return e.notSplit=!0,e}eF(["borderTop","borderBottom"]),eF(["borderTop"]),eF(["borderBottom"]),eF(["borderLeft","borderRight"]),eF(["borderLeft"]),eF(["borderRight"])},15648:(e,t,r)=>{"use strict";r.d(t,{A:()=>function e(t,r={}){let a=[];return o.Children.forEach(t,t=>{(null!=t||r.keepEmpty)&&(Array.isArray(t)?a=a.concat(e(t)):(0,n.A)(t)&&t.props?a=a.concat(e(t.props.children,r)):a.push(t))}),a}});var n=r(5406),o=r(97109)},16666:(e,t,r)=>{"use strict";r.d(t,{V:()=>n});let n=()=>({"@media (prefers-reduced-motion: reduce)":{transition:"none",animation:"none"}})},16924:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(78012);function o(e,t){return n.s.reduce((r,n)=>{let o=e[`${n}1`],a=e[`${n}3`],i=e[`${n}6`],l=e[`${n}7`];return{...r,...t(n,{lightColor:o,lightBorderColor:a,darkColor:i,textColor:l})}},{})}},17597:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});let n=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
@@ -0,0 +1 @@
|
|
|
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(81865)}])},81865:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ef});var s=r(65321),l=r(97109),a=r(26171),n=r(25258),o=r(7576),i=r(35292),c=r(33442),d=r(17807),u=r(63455),p=r(11702),m=r(88762),x=r(85114),h=r(58569),g=r(84253),v=r(34052),f=r(68787),j=r(55122),y=r(42700),w=r(2256),b=r(38770),A=r(38332),k=r(76506),S=r(50883),C=r(23718),N=r(23216),I=r(26619),T=r(8263),R=r(16285),E=r(8579),M=r(7851),z=r(29071),_=r(75548),F=r(63552),D=r(26631),B=r(29606),P=r(83914),q=r(84742),L=r(58209),G=r(38762),W=r(8470),O=r(92783),H=r(54746),U=r(93051),K=r(82930),V=r(64068),X=r(64629),Q=r(1310),J=r(67547),Y=r(76830),Z=r(6578),$=r(48321);let ee={"fact-landing-round":"未覆盖重要事实落地","table-repair-round":"表格缺失或格式错误","semantic-choice-conflict":"语义矛盾数值冲突","deterministic-stage5":"确定性缺陷(来源罗列/内部术语/编造日期)","formal-source-clean":"资料来源罗列话术","planned-section-final":"规划小节内容缺失","commercial-strip":"商务数据泄漏","table-deterministic-repair":"表格数据不一致","post-review-surface":"评审后兜底缺陷","terminology-strip":"内部术语泄漏","toc-consistency":"目录与正文不一致"},{TextArea:et}=o.A,{Text:er}=i.A,es=a.A;function el(e){let{type:t="info",title:r,children:l,style:a}=e,n="error"===t?"var(--colorError)":"warning"===t?"var(--colorWarning)":"success"===t?"var(--colorSuccess)":"var(--colorInfo)";return(0,s.jsxs)("div",{style:{border:"1px solid ".concat(n),background:"error"===t?"var(--colorErrorBg)":"warning"===t?"var(--colorWarningBg)":"success"===t?"var(--colorSuccessBg)":"var(--colorInfoBg)",borderRadius:8,padding:"9px 12px",...a},children:[(0,s.jsx)(er,{strong:!0,style:{color:n},children:r}),l&&(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:l})]})}function ea(e){let{children:t,gap:r=12,style:l}=e;return(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:r,...l},children:t})}let en=null,eo=!1;function ei(){null==en||en.listeners.forEach(e=>e())}let ec={role_binding:(0,s.jsx)(N.A,{}),knowledge_retrieval:(0,s.jsx)(I.A,{}),file_understanding:(0,s.jsx)(T.A,{}),fact_extraction:(0,s.jsx)(R.A,{}),chapter_generation:(0,s.jsx)(E.A,{}),validation:(0,s.jsx)(M.A,{}),llm_review:(0,s.jsx)(z.A,{}),reference:(0,s.jsx)(_.A,{})},ed={施工组织设计:(0,s.jsx)(M.A,{}),投标文件:(0,s.jsx)(F.A,{}),技术方案:(0,s.jsx)(R.A,{}),报告:(0,s.jsx)(D.A,{}),自定义:(0,s.jsx)(E.A,{})};function eu(e){return[...new Set(e.map(e=>e.trim()).filter(Boolean))]}function ep(e){return e.map(e=>({key:e.key,value:e.key,rawTitle:e.title,title:e.isFolder?(0,s.jsxs)("div",{className:"flex items-center justify-between w-full pr-4",children:[(0,s.jsxs)(c.A,{size:4,children:[(0,s.jsx)(B.A,{style:{color:"#faad14"}}),(0,s.jsx)("span",{children:e.title})]}),(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:[e.fileCount||0," 项"]})]}):(0,s.jsx)("span",{title:e.key,children:e.title}),isFolder:e.isFolder,fileCount:e.fileCount||+!e.isFolder,isLeaf:e.isLeaf}))}let em={role_binding:"角色配置绑定",knowledge_retrieval:"知识库检索",file_understanding:"多模态文件理解",fact_extraction:"LLM 事实抽取",chapter_generation:"LLM 章节生成",validation:"规则校验",llm_review:"LLM 审查优化",reference:"参考资源处理"},ex={"knowledge-base":"知识库","document-readiness":"生成准备度检查"},eh={wait:"common.statusWaiting",process:"common.statusRunning",finish:"common.statusCompleted",warning:"common.statusReview",error:"common.statusAbnormal"},eg={running:"common.statusRunning",success:"common.statusCompleted",skipped:"common.statusSkipped",failed:"common.statusFailed"},ev={error:"common.levelError",warning:"common.levelWarning",info:"common.levelInfo"};function ef(){var e,t,r,a,i,_,F,B;let ef=(0,$.Vr)(),{message:ej}=d.A.useApp(),[ey]=u.A.useForm(),ew=(0,l.useRef)(null),[eb,eA]=(0,l.useState)([]),[ek,eS]=(0,l.useState)("construction-organization-design"),[eC,eN]=(0,l.useState)([]),[eI,eT]=(0,l.useState)([]),[eR,eE]=(0,l.useState)([]),[eM,ez]=(0,l.useState)([]),[e_,eF]=(0,l.useState)(!1),[eD,eB]=(0,l.useState)(!0),[eP,eq]=(0,l.useState)(!1),[eL,eG]=(0,l.useState)(null),[eW,eO]=(0,l.useState)(""),[eH,eU]=(0,l.useState)([]),[eK,eV]=(0,l.useState)(null),[eX,eQ]=(0,l.useState)(null),[eJ,eY]=(0,l.useState)(""),[eZ,e$]=(0,l.useState)(!1),[e0,e1]=(0,l.useState)("idle"),[e2,e6]=(0,l.useState)(null),[e5,e8]=(0,l.useState)(null),[e3,e4]=(0,l.useState)({start:0,end:0}),[e7,e9]=(0,l.useState)([]),[te,tt]=(0,l.useState)(!1),[tr,ts]=(0,l.useState)(!1),[tl,ta]=(0,l.useState)({}),[tn,to]=(0,l.useState)(null),ti=(0,l.useRef)({}),tc=(0,l.useRef)(new Map),[td,tu]=(0,l.useState)(0),[tp,tm]=(0,l.useState)([]),tx=(0,l.useMemo)(()=>{var e,t,r;return(null==(e=eR.find(e=>e.selected))?void 0:e.projectRoot)||(null==(t=eR.find(e=>e.isCurrent))?void 0:t.projectRoot)||(null==(r=eR[0])?void 0:r.projectRoot)||""},[eR]),[th,tg]=(0,l.useState)([]),[tv,tf]=(0,l.useState)(null),[tj,ty]=(0,l.useState)(null),[tw,tb]=(0,l.useState)("templates"),[tA,tk]=(0,l.useState)(!1),[tS,tC]=(0,l.useState)("workflow"),[tN,tI]=(0,l.useState)(new Set),[tT,tR]=(0,l.useState)(!1),[tE,tM]=(0,l.useState)(!1),[tz,t_]=(0,l.useState)(null),tF=(0,l.useRef)(new Map),tD=(0,l.useRef)(!1),tB=(0,l.useRef)(""),tP=(0,l.useRef)(null),tq=(0,l.useRef)(0),tL=(0,l.useMemo)(()=>"activeGenDocId:".concat(tx||"default"),[tx]),tG=async()=>{try{eU((await (0,Z.cQ)(tx||void 0)).documents)}catch(e){eU([])}};(0,l.useEffect)(()=>{let e=()=>{en&&(tg(en.flowSteps),tf(en.activeFlowKey),eq(en.loading),en.documentId&&eV(en.documentId),en.draft&&eG(en.draft),void 0!==en.content&&eO(en.content))},t=en;return null==t||t.listeners.add(e),e(),()=>{null==t||t.listeners.delete(e)}},[]),(0,l.useEffect)(()=>{eB(!0),Promise.all([(0,Z.Dl)().then(e=>{var t,r;eA(e.templates),eS(null!=(r=null==(t=e.templates[0])?void 0:t.id)?r:"construction-organization-design")}),(0,Z.lv)().then(e=>{eN(e.roles),eT(e.configs)}),(0,Z.dx)().then(e=>eE(e))]).catch(()=>ej.error(ef("common.error"))).finally(()=>eB(!1))},[ej,ef]),(0,l.useEffect)(()=>{if(0===eb.length||!tx)return;let e=!1;return(async()=>{let t=await Promise.all(eb.map(async e=>{try{let{validation:t}=await (0,Z.SM)(e.id,tx);return[e.id,t]}catch(e){return null}}));if(e)return;let r={};for(let e of t)e&&(r[e[0]]=e[1]);ta(r)})(),()=>{e=!0}},[eb,tx]),(0,l.useEffect)(()=>{tx&&(localStorage.removeItem("activeGenDocId"),tG())},[tx]),(0,l.useEffect)(()=>{if(0===eH.length)return;let e=localStorage.getItem(tL);if(!e)return;if(!eH.find(t=>t.id===e&&("generating"===t.status||"queued"===t.status)))return void localStorage.removeItem(tL);let t=setInterval(()=>{(async()=>{try{let{document:r}=await (0,Z.v7)(e,!1,tx||void 0);if(!r)return;await tG(),"generating"!==r.status&&"queued"!==r.status&&(localStorage.removeItem(tL),clearInterval(t))}catch(e){clearInterval(t)}})()},3e3);return()=>clearInterval(t)},[eH]);let tW=(0,l.useMemo)(()=>eb.find(e=>e.id===ek),[eb,ek]),tO=eI.map(e=>({label:e.name,value:e.id})),tH=Math.max(0,th.findIndex(e=>e.key===tv)),tU=e=>{var t;return e?(null==(t=eC.find(t=>t.id===e))?void 0:t.name)||ex[e]||"未知角色":""},tK=e=>e.subtitle||e.roleName||tU(e.roleId)||em[e.type]||e.type,tV=e=>{var t,r,s;return e.promptName||((t=e.promptId)?(null==(r=eR.find(e=>e.id===t))?void 0:r.projectName)||(null==(s=eC.find(e=>e.id===t))?void 0:s.name)||ex[t]||"未知提示词":"")},tX=()=>{tq.current+=1,eY(""),e6(null),e8(null),e9([]),tt(!1),e$(!1),e1("idle")},tQ=async e=>{eV(e.id),eS(e.templateId);let t=tJ(e.status);if(t||"failed"===e.status||"aborted"===e.status){tX(),ty(e),eG(null),eO(""),eq(t),tC("workflow"),tk(!0);try{let{document:t}=await (0,Z.v7)(e.id,!1,e.projectRoot||tx||void 0);if(!t)throw Error("文档记录不存在");t0(t),tJ(t.status)?t5(t.id,t.projectRoot||e.projectRoot||tx||void 0):await tG()}catch(t){t0(e)}return}tC("editor"),tg([]),tf(null),tX();try{let{document:t}=await (0,Z.v7)(e.id,!1,e.projectRoot||tx||void 0);if(!t)throw Error("文档记录不存在");eG(t.draft||null),eO(t.editedMarkdown||t.markdown),tm(t.exportReports||[])}catch(e){ej.error(ef("common.error"))}tk(!0)},tJ=e=>"completed"!==e&&"completed_with_issues"!==e&&"warning"!==e&&"failed"!==e&&"aborted"!==e,tY=e=>{var t,r,s,l,a,n;return!!e&&("failed"===e.status||"aborted"===e.status||"completed_with_issues"===e.status||"warning"===e.status&&!!(null==(t=e.checkpointChapters)?void 0:t.length)&&/继续生成|重新生成|中断|卡住|未完成|门禁|阻断/u.test(e.error||(null==(r=e.warningIssues)?void 0:r.join(";"))||(null==(a=e.draft)||null==(l=a.exportGate)||null==(s=l.blockingIssues)?void 0:s.map(e=>e.message).join(";"))||"")||!!((null==(n=e.draft)?void 0:n.exportGate)&&!1===e.draft.exportGate.passed))},tZ=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eP;(null==en?void 0:en.loading)&&(en.flowSteps=e,en.activeFlowKey=t,en.loading=r,ei())},t$=e=>{var t,r,l,a;let n=e.executionStages||(null==(t=e.draft)?void 0:t.executionStages)||[];if(n.length>0){let t=n.map((t,r)=>{var l;let a,n=("failed"===e.status||"aborted"===e.status)&&"running"===t.status||"failed"===(a=t.status)?"error":"running"===a?"process":"finish";return{key:"".concat(t.type,"-").concat(r),title:t.title||em[t.type]||t.type,subtitle:tK(t),description:t.message||"",status:n,icon:"role_binding"===(l=t.type)?(0,s.jsx)(N.A,{}):"knowledge_retrieval"===l?(0,s.jsx)(I.A,{}):"file_understanding"===l?(0,s.jsx)(T.A,{}):"fact_extraction"===l?(0,s.jsx)(R.A,{}):"chapter_generation"===l?(0,s.jsx)(E.A,{}):"llm_review"===l?(0,s.jsx)(z.A,{}):"validation"===l?(0,s.jsx)(M.A,{}):(0,s.jsx)(D.A,{}),subSteps:((e,t,r)=>{let s=Array.isArray(e.details)?e.details.filter(Boolean):[],l=e.progress?"".concat(e.progress.label||"进度",":").concat(e.progress.current,"/").concat(e.progress.total):"",a=[...l?[l]:[],...s];return 0===a.length?[{key:"stage-".concat(r),title:tV(e)?"提示词:".concat(tV(e)):tK(e),status:t}]:a.map((e,s)=>({key:"stage-".concat(r,"-").concat(s),title:e,status:"process"===t&&0===s?"process":"error"===t&&0===s?"error":"warning"===t?"warning":"process"===t?"finish":t}))})(t,n,r)}});("generating"===e.status||"queued"===e.status)&&t.length>0&&t.every(e=>"process"!==e.status)&&t.push({key:"finishing-".concat(t.length),title:"生成收尾中",subtitle:"",description:"章节已全部生成,正在执行全局一致性审查与质量校验。",status:"process",icon:(0,s.jsx)(P.A,{}),subSteps:[]});let o="generating"===e.status||"queued"===e.status?(null==(r=t.at(-1))?void 0:r.key)||"prepare":"failed"===e.status||"aborted"===e.status?(null==(l=t.find(e=>"error"===e.status))?void 0:l.key)||(null==(a=t.at(-1))?void 0:a.key)||"prepare":"done";return{steps:t,activeKey:o}}return{steps:[],activeKey:null}},t0=e=>{let t=e.executionStages||[],r="".concat(e.id,"|").concat(e.updatedAt,"|").concat(e.status,"|").concat(e.error||"","|").concat(t.length,"|").concat(t.map(e=>{var t,r,s,l;return"".concat(e.status,":").concat(null!=(s=null==(t=e.progress)?void 0:t.current)?s:0,"/").concat(null!=(l=null==(r=e.progress)?void 0:r.total)?l:0)}).join(","));if(tB.current===r)return;tB.current=r,ty(e);let{steps:s,activeKey:l}=t$(e);t1(s),tg(s),tf(l),eq(tJ(e.status)),tZ(s,l,tJ(e.status)),("failed"===e.status||"aborted"===e.status)&&tC("workflow"),("completed"===e.status||"completed_with_issues"===e.status||"warning"===e.status)&&e.draft&&(eG(e.draft),eO(e.editedMarkdown||e.markdown),tC("editor"),tg([]),tf(null),tm(e.exportReports||[]))},t1=e=>{let t=Date.now();for(let r of e){let e=tc.current.get(r.key);"process"!==r.status||e?("finish"===r.status||"error"===r.status||"warning"===r.status)&&e&&!e.endedAt&&tc.current.set(r.key,{...e,endedAt:t}):tc.current.set(r.key,{startedAt:t})}},t2=e=>{let t=Math.max(0,Math.round(e/1e3));if(t<60)return"".concat(t," 秒");let r=Math.floor(t/60);return r<60?"".concat(r," 分 ").concat(t%60," 秒"):"".concat(Math.floor(r/60)," 小时 ").concat(r%60," 分")},t6=e=>{let t=tF.current.get(e);t&&(clearInterval(t),tF.current.delete(e))},t5=(e,t)=>{t6(e);let r=setInterval(()=>{(async()=>{try{let{document:r}=await (0,Z.v7)(e,!0,t||tx||void 0);if(!r)return;t0(r),await tG(),tJ(r.status)||(t6(e),localStorage.removeItem(tL))}catch(e){}})()},2e3);tF.current.set(e,r)};(0,l.useEffect)(()=>()=>{for(let e of tF.current.values())clearInterval(e);tF.current.clear(),tP.current&&(clearTimeout(tP.current),tP.current=null)},[]),(0,l.useEffect)(()=>{if(!eP||!tv)return;let e=window.setInterval(()=>tg(e=>{let t=e.map(e=>{if(e.key!==tv||"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 tZ(t,tv),t}),1400);return()=>window.clearInterval(e)},[tv,eP]),(0,l.useEffect)(()=>{if(!eP)return;let e=window.setInterval(()=>tu(e=>e+1),1e3);return()=>window.clearInterval(e)},[eP]);let t8=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";eF(!0);try{let t=await (0,Z.Fi)(e,tx||void 0);ez(ep(t.nodes))}catch(e){ej.error("知识库文件加载失败")}finally{eF(!1)}},t3=async e=>{var t;let r=String(null!=(t=e.key)?t:"");if(r)try{let e=await (0,Z.Fi)(r,tx||void 0),t=ep(e.nodes),s=e=>e.map(e=>e.key===r?{...e,children:t}:e.children?{...e,children:s(e.children)}:e);ez(e=>s(e))}catch(e){ej.error("加载子文件夹失败")}},t4=e=>{let t=null!=e?e:{id:"tpl-".concat(Date.now()),name:"",description:"",category:"自定义",outputTitle:"",projectRoleConfigId:void 0,chapters:[],projectBindings:[]};ey.resetFields(),ey.setFieldsValue({...t,projectMaterialRoots:eu((t.projectBindings||[]).map(e=>e.materialRootPath).filter(Boolean))}),t8(),ts(!0)},t7=async()=>{try{await ey.validateFields();let e=ey.getFieldsValue(!0),t=eu(e.projectMaterialRoots||[]).map(e=>({materialRootPath:e})),{projectMaterialRoots:r,...s}=e,l={...s,chapters:[],projectBindings:t},a=await (0,Z.l2)(l);eA(a.templates),eS(a.template.id),ts(!1),await tG(),ej.success(ef("common.success"))}catch(e){e instanceof Error&&ej.error(e.message)}},t9=async e=>{try{let t=await (0,Z.bV)(e);eA(t.templates),eS(t.template.id),ej.success(ef("common.success"))}catch(e){ej.error(ef("common.error"))}},re=async e=>{try{var t,r;let s=await (0,Z.h0)(e);eA(s.templates),eS(null!=(r=null==(t=s.templates[0])?void 0:t.id)?r:""),ej.success(ef("common.success"))}catch(e){ej.error(ef("common.error"))}},rt=async e=>{t_(e),eS(e),eV(null),eG(null),eO(""),tX(),tC("workflow"),tk(!0),tb("drafts"),eq(!0),tf("prepare"),tg([{key:"prepare",title:"正在准备运行模板",description:"正在校验模板绑定的项目资料包、提示词配置和资料索引,校验通过后会自动开始生成。",status:"process",icon:(0,s.jsx)(P.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"process"},{key:"start",title:"准备生成任务",status:"wait"}]}]);try{let{validation:t}=await (0,Z.SM)(e,tx||void 0);ta(r=>({...r,[e]:t}));let r=t.issues.filter(e=>"error"===e.level);if(r.length>0){ra.current=!0,eq(!1),tf("prepare"),tg([{key:"prepare",title:"模板运行前检查未通过",description:r.map(e=>e.message).join("\n"),status:"error",icon:(0,s.jsx)(G.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"error"},{key:"start",title:"准备生成任务",status:"wait"}]}]),ej.warning("模板运行前检查未通过,请先处理阻断项");return}t.issues.length>0&&ej.warning("模板存在非阻断警告,已继续运行"),tg([{key:"prepare",title:"模板检查通过,正在创建生成任务",description:"已确认模板绑定资源可用,正在启动后台生成任务。",status:"process",icon:(0,s.jsx)(P.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"finish"},{key:"start",title:"准备生成任务",status:"process"}]}]),await rl(e)}catch(t){ra.current=!0;let e=t instanceof Error?t.message:"模板运行前检查失败";eq(!1),tg([{key:"prepare",title:"模板运行准备失败",description:e,status:"error",icon:(0,s.jsx)(G.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"error"},{key:"start",title:"准备生成任务",status:"wait"}]}]),ej.error(e)}finally{t_(t=>t===e?null:t)}},rr=async e=>{try{await (0,Z.QG)(e.id,e.projectRoot||tx||void 0),eK===e.id&&(eV(null),eG(null),eO("")),await tG(),ej.success(ef("common.success"))}catch(e){ej.error(ef("common.error"))}},rs=async(e,t)=>{let r=Date.now(),s=0,l=Date.now(),a=null,n=0;for(;;){let o,i;if(null==t?void 0:t.aborted)throw Error("用户中止");let c=new AbortController;t&&(t.pollController=c);try{let t=await (0,Z.v7)(e,!0,tx||void 0,c.signal,s||void 0);o=t.document,i=t.status,n=0}catch(e){if((null==t?void 0:t.aborted)||e instanceof DOMException&&"AbortError"===e.name)throw Error("用户中止",{cause:e});if((n+=1)>=3)throw e instanceof Error?e:Error("生成进度获取失败");await new Promise(e=>window.setTimeout(e,2e3*n));continue}finally{(null==t?void 0:t.pollController)===c&&(t.pollController=void 0)}let d=o?"queued"===o.status:"queued"===i;if(d&&(l=Date.now(),Date.now()-r>216e5))throw Error("排队等待超时,请稍后刷新列表查看或取消后重新发起");if(!o){if(!d&&(Date.now()-(null!=a?a:r)>75e5||Date.now()-l>96e4))throw Error("生成任务疑似卡住,请点击继续生成或重新生成(后台任务可能仍在运行,稍后刷新可查看)");await new Promise(e=>window.setTimeout(e,1500));continue}if(t0(o),"generating"===o.status&&null===a&&(a=Date.now()),o.updatedAt!==s&&(s=o.updatedAt,l=Date.now()),("completed"===o.status||"completed_with_issues"===o.status||"warning"===o.status)&&o.draft)return o;if("warning"===o.status&&o.error&&/已中断/u.test(o.error))throw Error(o.error);if("failed"===o.status||"aborted"===o.status)throw Error(o.error||("aborted"===o.status?"生成已中止":"生成失败"));if(!d&&(Date.now()-(null!=a?a:r)>75e5||Date.now()-l>96e4))throw Error("生成任务疑似卡住,请点击继续生成或重新生成(后台任务可能仍在运行,稍后刷新可查看)");await new Promise(e=>window.setTimeout(e,1500))}},rl=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ek;if(!e)return;if((null==en?void 0:en.aborted)&&(en=null),null==en?void 0:en.loading){if(tD.current)return;if(!tx)return void ej.error("未识别当前项目,请先选择或打开项目后再生成文件");tD.current=!0;try{let t=await (0,Z.OX)({templateId:e,projectRoot:tx});await tG(),ej.info(t.queuePosition?"已加入生成队列(第 ".concat(t.queuePosition," 位):前面任务完成后将自动开始"):"生成任务已创建")}catch(e){ej.error(e instanceof Error?e.message:"创建生成任务失败")}finally{tD.current=!1}return}if(!tx)return void ej.error("未识别当前项目,请先选择或打开项目后再生成文件");eq(!0);let t=th.length>0?th:[{key:"prepare",title:"正在创建生成任务",description:"系统正在创建后台生成任务,请稍候。",status:"process",icon:(0,s.jsx)(P.A,{}),subSteps:[{key:"start",title:"准备生成任务",status:"process"}]}],r=tv||"prepare";tg(t),tf(r);let l=(0,Z.OX)({templateId:e,projectRoot:tx});en={id:Date.now(),templateId:e,loading:!0,flowSteps:t,activeFlowKey:r,promise:l,listeners:new Set};let a=[];try{let e=await l;e.documentId&&(localStorage.setItem(tL,e.documentId),eV(e.documentId),(null==en?void 0:en.promise)===l&&(en.documentId=e.documentId)),await tG(),e.queuePosition&&ej.info("已加入生成队列(第 ".concat(e.queuePosition," 位):前面任务完成后将自动开始"));let t=e.documentId?await rs(e.documentId,(null==en?void 0:en.promise)===l?en:void 0):void 0,r=e.draft||(null==t?void 0:t.draft);if(!r)throw Error("生成结果为空");(e.documentId||(null==t?void 0:t.id))&&eV(e.documentId||t.id),a.forEach(e=>window.clearTimeout(e)),eG(r),eO((null==t?void 0:t.editedMarkdown)||(null==t?void 0:t.markdown)||r.markdown),(null==en?void 0:en.promise)===l&&(en.draft=r,en.content=(null==t?void 0:t.editedMarkdown)||(null==t?void 0:t.markdown)||r.markdown);let s=t||{id:e.documentId||"draft-".concat(Date.now()),templateId:ek,title:r.title,requirement:r.requirement,projectRoot:r.projectRoot||tx,projectId:r.projectId,markdown:r.markdown,status:r.validationIssues.some(e=>"error"===e.level||"warning"===e.level)||!r.exportGate.passed?"completed_with_issues":"completed",draft:r,executionStages:r.executionStages,assets:r.assets||[],createdAt:r.generatedAt,updatedAt:Date.now()},{steps:n}=t$(s);tg(n),tZ(n,"done",!1),tf("done"),(null==en?void 0:en.promise)===l&&(en.activeFlowKey="done",en.loading=!1,ei(),en=null),localStorage.removeItem(tL),await tG(),ej.success(ef("common.success")),window.setTimeout(()=>{var e;return null==(e=ew.current)?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},200)}catch(s){localStorage.removeItem(tL);let e=s instanceof Error?s.message:ef("common.error"),t=eo;eo=!1;let r=!t&&"用户中止"===e;t||tg(t=>{let r=t.map(t=>"process"===t.status?{...t,status:"error",description:e,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)})(t,"error")}:t);return tZ(r,tv,!1),r}),(null==en?void 0:en.promise)===l&&(en.loading=!1,en.error=e,ei(),en=null),await tG().catch(()=>void 0),r?ej.warning("生成任务已被中止(可能来自其他窗口):可在列表中点击「继续生成」恢复"):t||ej.error(e)}finally{a.forEach(e=>window.clearTimeout(e)),eq(!1),eo=!1,(null==en?void 0:en.promise)===l&&(en.loading=!1,ei())}},ra=(0,l.useRef)(!1);(0,l.useEffect)(()=>(tP.current&&(clearTimeout(tP.current),tP.current=null),!tA||"workflow"!==tS||tz||eK||ra.current||(null==en?void 0:en.loading)||null==tW||!tW.projectRoleConfigId||(ra.current=!0,tP.current=setTimeout(()=>{tP.current=null,tA&&"workflow"===tS&&!eK&&ek==ek&&rl()},300)),tA||(ra.current=!1),()=>{tP.current&&(clearTimeout(tP.current),tP.current=null)}),[tA,tS,tz,eK,tW,ek]);let rn=async e=>{try{eV(e.id),eS(e.templateId),tC("workflow"),tk(!0),eq(!0);let t=await (0,Z.UQ)(e.id,e.projectRoot||tx||void 0);localStorage.setItem(tL,t.documentId),await tG();let r=await rs(t.documentId);r.draft&&(eG(r.draft),eO(r.editedMarkdown||r.markdown||r.draft.markdown),tC("editor")),localStorage.removeItem(tL),await tG(),ej.success("已继续生成并完成")}catch(e){ej.error(e instanceof Error?e.message:"继续生成失败")}finally{eq(!1)}},ro=async e=>{if((null==en?void 0:en.loading)&&en.documentId===e.id){var t;eo=!0,en.aborted=!0,null==(t=en.pollController)||t.abort(),en.loading=!1,en.error="用户中止",ei(),en=null,eq(!1)}localStorage.removeItem(tL),t6(e.id);try{await (0,Z.r)(e.id,e.projectRoot||tx||void 0),ej.success("queued"===e.status?"已取消排队任务":"已中止生成任务")}catch(e){ej.info("任务已不在运行,已刷新状态")}finally{await tG(),eK===e.id&&(eV(null),ty(null),eG(null),eO(""))}},ri=(e,t,r)=>{let s=new Blob([e],{type:r}),l=URL.createObjectURL(s),a=document.createElement("a");a.href=l,a.download=t,a.target="_self",a.rel="noopener",a.style.display="none",document.body.appendChild(a),a.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),a.remove(),window.setTimeout(()=>URL.revokeObjectURL(l),1e3)},rc=async(e,t)=>{let r=e instanceof Error?e.message:ef("common.error");if(!/导出门禁未通过|EXPORT_GATE_BLOCKED/u.test(r))return void ej.error(r);if(await new Promise(e=>{n.A.confirm({title:"导出门禁未通过",content:"".concat(r,"\n\n继续导出得到的文件为「非交付物」,不得直接作为正式成果提交。"),okText:"仍要导出(非交付物)",okButtonProps:{danger:!0},cancelText:"取消",onOk:()=>e(!0),onCancel:()=>e(!1)})}))try{await t()}catch(e){ej.error(e instanceof Error?e.message:ef("common.error"))}},rd=async e=>{if(!eL)return;eQ(e);let t={markdown:"text/markdown;charset=utf-8",html:"text/html;charset=utf-8",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},r="markdown"===e?"md":e,s={documentId:eK||void 0,title:eL.title,markdown:eW,format:e,exportGate:eL.exportGate,useClientMarkdown:!0,projectRoot:eL.projectRoot||tx||void 0};try{let l=await (0,Z.UE)(s);if(ri(l,"".concat(eL.title,".").concat(r),t[e]),eK)try{let{document:e}=await (0,Z.v7)(eK,!1,eL.projectRoot||tx||void 0);e&&tm(e.exportReports||[])}catch(e){}}catch(l){await rc(l,async()=>{ri(await (0,Z.UE)({...s,enforceGate:!1}),"".concat(eL.title,".").concat(r),t[e])})}finally{eQ(null)}},ru=()=>{var e;return!!((null==tj?void 0:tj.editedMarkdown)||(null==tj?void 0:tj.markdown)||(null==tj||null==(e=tj.draft)?void 0:e.markdown)||"").trim()},rp=async e=>{var t;if(!tj)return;let r=tj.editedMarkdown||tj.markdown||(null==(t=tj.draft)?void 0:t.markdown)||"";if(!r.trim())return void ej.warning("该记录暂无可导出的正文内容");eQ(e);try{let t={markdown:"text/markdown;charset=utf-8",html:"text/html;charset=utf-8",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},s="markdown"===e?"md":e,l={documentId:tj.id,title:tj.title,markdown:r,format:e,useClientMarkdown:!0,projectRoot:tj.projectRoot||tx||void 0};try{ri(await (0,Z.UE)(l),"".concat(tj.title,".").concat(s),t[e])}catch(r){await rc(r,async()=>{ri(await (0,Z.UE)({...l,enforceGate:!1}),"".concat(tj.title,".").concat(s),t[e])})}}finally{eQ(null)}},rm=async()=>{if(eL)try{if(eK)await (0,Z.a6)(eK,{editedMarkdown:eW,markdown:eW},eL.projectRoot||tx||void 0);else{let e=await (0,Z.Af)({...eL,markdown:eW});eG(e.draft)}await tG(),ej.success(ef("common.success"))}catch(e){ej.error(ef("common.error"))}},rx=(e,t)=>{e9(r=>[{id:"".concat(Date.now()),content:e,prompt:t,createdAt:Date.now()},...r].slice(0,12))},rh=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&eY(""),e6(null),e8(null),e4({start:0,end:0})},rg=(e,t)=>{var r,s;return{title:(null==eL?void 0:eL.title)||"未命名文档",markdown:t,instruction:e,facts:null==eL||null==(r=eL.structuredFacts)?void 0:r.map(e=>"".concat(e.key,": ").concat(e.value)),chapters:null==eL||null==(s=eL.chapters)?void 0:s.map(e=>e.title),...(()=>{let e=e3.start,t=e3.end;return t>e?{selection:{start:e,end:t,text:eW.slice(e,t)},cursorOffset:e}:{cursorOffset:e}})()}},rv=async()=>{let e=eJ.trim();if(!eL||!e||eZ)return;let t=tq.current+1;tq.current=t,e$(!0),e1("planning"),e8(null);try{let r=await (0,Z.Gi)({mode:"plan",...rg(e,eW)});if(tq.current!==t||eK!=eK)return;if(!r.plan)throw Error("AI 未返回修改计划");e6(r.plan)}catch(e){tq.current===t&&ej.error(e instanceof Error?e.message:ef("common.error"))}finally{tq.current===t&&(e$(!1),e1("idle"))}},rf=async e=>{let t=eJ.trim();if(!eL||!t||eZ)return;let r=tq.current+1;tq.current=r,e$(!0),e1("applying");try{let s=await (0,Z.Gi)({mode:"apply",...rg(t,eW),plan:e});if(tq.current!==r||eK!=eK)return;if(!s.markdown)throw Error("AI 未返回修改结果");e8({plan:s.plan||e,markdown:s.markdown,beforeSnippet:s.beforeSnippet,afterSnippet:s.afterSnippet,summary:s.summary,changedChars:s.changedChars,prompt:t,before:eW})}catch(e){tq.current===r&&ej.error(e instanceof Error?e.message:ef("common.error"))}finally{tq.current===r&&(e$(!1),e1("idle"))}};if(eD)return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsx)(m.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,s.jsx)(m.A,{active:!0,paragraph:{rows:2}}),(0,s.jsx)(m.A,{active:!0,paragraph:{rows:8}})]});let rj="workflow"===tS?"工作流:".concat((null==tW?void 0:tW.name)||"选择模板"):"编辑:".concat((null==eL?void 0:eL.title)||(null==tW?void 0:tW.outputTitle)||"文档");return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 pb-6 mb-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2.5 flex items-center gap-2",children:[(0,s.jsx)(N.A,{className:"text-[var(--colorAccent)]"}),ef("documents.title")]}),(0,s.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)]",children:ef("documents.description")})]}),(0,s.jsx)(x.Ay,{type:"primary",icon:(0,s.jsx)(H.A,{}),onClick:()=>t4(),className:"shadow-none rounded-lg",children:ef("documents.newTemplate")})]}),(0,s.jsxs)("div",{className:"bg-[var(--colorBgContainer)] rounded-2xl shadow-sm overflow-hidden",children:[(0,s.jsx)(h.A,{items:[{key:"templates",label:(0,s.jsxs)("span",{className:"px-4",children:["模板库 ",(0,s.jsx)(p.A,{className:"ml-2 border-0 bg-[var(--colorFillAlter)]",children:eb.length})]})},{key:"drafts",label:(0,s.jsxs)("span",{className:"px-4",children:["生成记录 ",(0,s.jsx)(p.A,{className:"ml-2 border-0 bg-[var(--colorFillAlter)]",children:eH.length})]})}],activeKey:tw,onChange:tb,className:"documents-tabs",size:"large",tabBarStyle:{margin:0,padding:"0 16px",background:"var(--colorBgHover)",borderBottom:"1px solid var(--borderColor)"}}),(0,s.jsx)("div",{className:"p-4 bg-[var(--colorFillAlter)] min-h-[500px]",children:"templates"===tw?0===eb.length?(0,s.jsx)("div",{className:"py-32 text-center border border-dashed border-[var(--borderColor)] rounded-2xl bg-[var(--colorBgContainer)]",children:(0,s.jsx)(g.A,{description:(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:ef("common.noData")})})}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4",children:eb.map(e=>(0,s.jsxs)("div",{ref:t=>{ti.current[e.id]=t},className:"group flex items-center p-4 rounded-2xl transition-all cursor-pointer ".concat(ek===e.id?"bg-[var(--colorBgSelected)] shadow-md":"bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] shadow-sm hover:shadow-md"),onClick:()=>eS(e.id),children:[(0,s.jsxs)("div",{className:"flex-1 min-w-0 pr-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-2 min-w-0",children:[function(e,t){let r=ed[e]||(0,s.jsx)(D.A,{});return(0,s.jsx)("span",{style:{color:t?"var(--colorAccent)":"var(--colorTextSecondary)",fontSize:16,marginTop:2,flexShrink:0},children:r})}(e.category,ek===e.id),(0,s.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate",children:e.name}),ek===e.id&&(0,s.jsx)(p.A,{color:"blue",className:"border-0 m-0 shrink-0",children:"当前选中"}),(0,s.jsx)(p.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0 shrink-0",children:e.category})]}),e.description&&(0,s.jsx)("div",{className:"text-sm text-[var(--colorTextSecondary)] line-clamp-2 leading-relaxed mb-3",children:e.description}),(e=>{let t=tl[e.id];if(!t)return null;let r=t.issues.filter(e=>"error"===e.level),l=t.issues.filter(e=>"warning"===e.level),a=tn===e.id,n=t.roleDiagnostics||[],o=new Map;for(let e of t.promptDiagnostics){let t=o.get(e.roleId)||[];t.push(e),o.set(e.roleId,t)}let i=t.strategyPreview,c=(null==i?void 0:i.mode)==="strict"?"error":(null==i?void 0:i.mode)==="fast"?"blue":(null==i?void 0:i.mode)==="longform"?"purple":"green";return(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"flex flex-col items-start gap-2 w-full",children:[(0,s.jsxs)("div",{className:"inline-flex items-center gap-2 p-1.5 px-3 rounded-lg border text-xs ".concat(r.length?"border-red-200 bg-red-50/50":l.length?"border-yellow-200 bg-yellow-50/50":"border-green-200 bg-green-50/50"),children:[(0,s.jsx)("span",{className:"font-medium",children:r.length?"检查未通过(".concat(r.length," 项阻断)"):l.length?"存在警告(".concat(l.length," 项)"):"检查通过"}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)("span",{children:["项目资料 ",t.fileDiagnostics.length]}),(0,s.jsxs)("span",{children:["提示词 ",t.promptDiagnostics.length]}),(0,s.jsxs)("span",{children:["角色链路 ",n.length]}),i&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)(p.A,{color:c,className:"border-0 m-0",children:[i.mode," 策略预估"]})]}),!r.length&&l.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsx)("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:()=>{rt(e.id)},children:"忽略警告并运行"})]}),(0,s.jsxs)("span",{className:"text-blue-500 cursor-pointer hover:underline",onClick:()=>to(a?null:e.id),children:[a?(0,s.jsx)(W.A,{}):(0,s.jsx)(O.A,{}),a?"收起体检":"体检报告"]})]}),a&&(0,s.jsxs)("div",{className:"w-full flex flex-col gap-3 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] p-3",children:[r.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"text-xs font-bold text-[var(--colorError)]",children:["阻断项(",r.length,")— 必须修复后才能运行"]}),r.map(t=>{var r;let l=(r=t.message,/资料包|项目资料|知识库|索引/u.test(r)?{label:"配置模板",onClick:()=>t4(e)}:/提示词|绑定/u.test(r)?{label:"提示词库",href:"/prompt"}:/项目角色配置/u.test(r)?{label:"角色配置",href:"/document-roles"}:void 0);return(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2 rounded-lg border border-red-200 bg-red-50/40 px-2.5 py-1.5 text-xs",children:[(0,s.jsx)("span",{className:"text-[var(--colorText)]",children:t.message}),l&&(l.href?(0,s.jsxs)("a",{className:"shrink-0 text-red-500 hover:underline",href:l.href,children:[l.label," ›"]}):(0,s.jsxs)("span",{className:"shrink-0 text-red-500 cursor-pointer hover:underline",onClick:l.onClick,children:[l.label," ›"]}))]},t.message)})]}),l.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"text-xs font-bold text-[var(--colorWarning)]",children:["警告项(",l.length,")— 可忽略并继续运行"]}),l.map(e=>(0,s.jsx)("div",{className:"rounded-lg border border-yellow-200 bg-yellow-50/40 px-2.5 py-1.5 text-xs text-[var(--colorTextSecondary)]",children:e.message},e.message))]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"text-xs font-bold text-[var(--colorText)]",children:["绑定链路(",t.configName||"未绑定角色配置",")"]}),0===n.length?(0,s.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:"未配置提示词角色链路"}):(0,s.jsx)("div",{className:"flex flex-col gap-1.5",children:n.map(r=>{let l=o.get(r.roleId)||[];return(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs flex-wrap rounded-lg border border-[var(--borderColor)] bg-[var(--colorFillQuaternary)] px-2 py-1",children:[(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:e.name}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"→"}),(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:t.configName||"角色配置"}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"→"}),(0,s.jsx)("span",{className:"ok"===r.status?"text-[var(--colorText)]":"text-[var(--colorError)] font-medium",children:r.roleName||r.roleId}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"→"}),0===l.length?(0,s.jsx)(p.A,{color:"error",className:"border-0 m-0",children:"missing_resource"===r.status?"角色未绑定资源":"role_missing"===r.status?"角色不存在":"未绑定提示词"}):(0,s.jsx)("span",{className:"flex items-center gap-1 flex-wrap",children:l.map(e=>(0,s.jsx)(p.A,{color:e.exists&&e.contentLength>0?"success":e.exists?"warning":"error",className:"border-0 m-0",title:e.contentPreview||e.promptId,children:e.exists?"".concat(e.promptTitle||e.promptId," ").concat(e.contentLength,"字符"):"".concat(e.promptId," 已删除")},e.promptId))})]},r.roleId)})})]}),i&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 rounded-lg border border-blue-200 bg-blue-50/40 px-2.5 py-2 text-xs",children:[(0,s.jsx)("span",{className:"font-bold text-[var(--colorText)]",children:"生成策略预估(生成前体检)"}),(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["约 ",i.chapterCount," 章 / 目标 ",i.targetWords>=1e4?"".concat((i.targetWords/1e4).toFixed(1)," 万字"):"".concat(i.targetWords," 字"),";全章节并行(",i.chapterConcurrency," 章同批);审查流水线 ",i.reviewConcurrency," 路;每章证据预算 ",Math.round(i.evidenceFloorChars/1e3),"k-",Math.round(i.evidenceCeilingChars/1e3),"k 字符;修复轮次预算 ",i.repairRoundBudget," 轮",i.globalReviewSamplingRate<1?";全局审查抽检 ".concat(Math.round(100*i.globalReviewSamplingRate),"%"):""]}),i.triggers.map(e=>(0,s.jsxs)("span",{className:"text-[var(--colorTextTertiary)]",children:["\xb7 ",e]},e))]})]})]})})(e)]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-nowrap items-center gap-2 whitespace-nowrap transition-opacity ".concat(ek===e.id?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(x.Ay,{size:"small",onClick:t=>{t.stopPropagation(),t4(e)},className:"rounded-md",children:"配置"}),(0,s.jsx)(x.Ay,{size:"small",icon:(0,s.jsx)(U.A,{}),onClick:t=>{t.stopPropagation(),t9(e.id)},className:"rounded-md"}),(0,s.jsx)(es,{title:ef("documents.deleteTemplateConfirm"),onConfirm:t=>{null==t||t.stopPropagation(),re(e.id)},children:(0,s.jsx)(x.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(L.A,{}),onClick:e=>e.stopPropagation(),className:"rounded-md"})}),(()=>{var t;let r=tl[e.id],l=null!=(t=null==r?void 0:r.issues.filter(e=>"error"===e.level).length)?t:0;return l>0?(0,s.jsxs)(x.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(K.A,{}),disabled:!!tz&&tz!==e.id,onClick:t=>{var r;t.stopPropagation(),eS(r=e.id),to(r),window.setTimeout(()=>{var e;return null==(e=ti.current[r])?void 0:e.scrollIntoView({behavior:"smooth",block:"center"})},50)},className:"min-w-[108px] rounded-md justify-center",children:["先修复 ",l," 个问题"]}):(0,s.jsx)(x.Ay,{size:"small",type:"primary",icon:tz===e.id?(0,s.jsx)(P.A,{}):(0,s.jsx)(V.A,{}),loading:tz===e.id,disabled:!!tz&&tz!==e.id,onClick:t=>{t.stopPropagation(),rt(e.id)},className:"min-w-[72px] rounded-md justify-center",children:tz===e.id?"准备中":"运行"})})()]})]},e.id))}):0===eH.length?(0,s.jsx)("div",{className:"py-32 text-center border border-dashed border-[var(--borderColor)] rounded-2xl bg-[var(--colorBgContainer)]",children:(0,s.jsx)(g.A,{description:(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:ef("common.noData")})})}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4",children:eH.slice(0,15).map((e,t)=>{var r,l,a,n,o,i,c,d,u,m;let h,g;return(0,s.jsxs)("div",{className:"group flex items-center gap-4 p-4 rounded-2xl transition-all cursor-pointer ".concat(eK===e.id?"bg-[var(--colorBgSelected)] shadow-md":"bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] shadow-sm hover:shadow-md"),onClick:()=>{tQ(e)},children:[(0,s.jsx)("div",{className:"mt-1",children:"completed"===e.status?(0,s.jsx)(q.A,{className:"text-xl text-[var(--colorOk)]"}):"failed"===e.status||"aborted"===e.status?(0,s.jsx)(G.A,{className:"text-xl text-[var(--colorDanger)]"}):"warning"===e.status||"completed_with_issues"===e.status?(0,s.jsx)(M.A,{className:"text-xl text-[var(--colorWarning)]"}):(0,s.jsx)(X.A,{spin:!0,className:"text-xl text-blue-500"})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0 pr-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,s.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate",children:e.title}),(0,s.jsxs)(p.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0 shrink-0",children:["#",t+1]}),(0,s.jsxs)(p.A,{color:"completed"===(h=e.status)?"success":"completed_with_issues"===h?"error":"warning"===h?"warning":"failed"===h?"error":"aborted"===h||"queued"===h?"default":"processing",className:"border-0 m-0 shrink-0",children:["completed"===(g=e.status)?"已完成":"completed_with_issues"===g?"已产出\xb7未达交付标准":"warning"===g?"需复核":"failed"===g?"失败":"aborted"===g?"已中止":"queued"===g?"排队中":"生成中","queued"===e.status&&e.queuePosition?"(第 ".concat(e.queuePosition," 位)"):""]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-x-4 gap-y-2 text-xs text-[var(--colorTextSecondary)] mb-3",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(Q.A,{})," ",new Date(e.updatedAt).toLocaleString()]}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.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),s=t%60;if(r<60)return s?"".concat(r," 分 ").concat(s," 秒"):"".concat(r," 分");let l=Math.floor(r/60),a=r%60;return a?"".concat(l," 小时 ").concat(a," 分"):"".concat(l," 小时")})(e)]}),e.partialChapters&&e.partialChapters.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)("span",{children:["进度 ",e.partialChapters.filter(e=>"completed"===e.status).length,"/",e.partialChapters.length," 章"]}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)("span",{children:["共 ",e.partialChapters.reduce((e,t)=>e+t.chars,0).toLocaleString()," 字"]})]})]}),("warning"===e.status||"failed"===e.status||"aborted"===e.status||"completed_with_issues"===e.status)&&(0,s.jsxs)("div",{className:"inline-flex items-center gap-2 p-1.5 px-3 rounded-lg border text-xs ".concat("failed"===e.status||"aborted"===e.status?"border-red-200 bg-red-50/50":"border-yellow-200 bg-yellow-50/50"),children:[(0,s.jsx)("span",{className:"font-medium",children:"failed"===e.status?(null==(l=e.draft)||null==(r=l.exportGate)?void 0:r.passed)===!1?"门禁未通过":"生成失败":"aborted"===e.status?"已中止":"需复核"}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsx)("span",{className:"truncate max-w-[400px]",children:e.error||(null==(a=e.warningIssues)?void 0:a[0])||(null==(o=e.draft)||null==(n=o.validationIssues.find(e=>"error"===e.level||"warning"===e.level))?void 0:n.message)||(null==(d=e.draft)||null==(c=d.exportGate)||null==(i=c.checklist.find(e=>!e.passed))?void 0:i.label)||"需复核"})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-nowrap items-center gap-2 whitespace-nowrap transition-opacity ".concat(eK===e.id?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(x.Ay,{size:"small",type:"primary",icon:tJ(e.status)?(0,s.jsx)(X.A,{spin:!0}):(0,s.jsx)(V.A,{}),onClick:t=>{t.stopPropagation(),tQ(e)},className:"min-w-[72px] rounded-md justify-center",children:"打开"}),tJ(e.status)&&(0,s.jsx)(es,{title:"queued"===e.status?"确定取消此排队任务?":"确定中止此生成任务?",onConfirm:t=>{null==t||t.stopPropagation(),ro(e)},children:(0,s.jsx)(x.Ay,{size:"small",danger:!0,onClick:e=>e.stopPropagation(),className:"rounded-md",children:"queued"===e.status?"取消":"中止"})}),("failed"===e.status||"aborted"===e.status||"warning"===e.status&&!!(null==(u=e.checkpointChapters)?void 0:u.length)&&/继续生成|重新生成|中断|卡住|未完成/u.test(e.error||(null==(m=e.warningIssues)?void 0:m.join(";"))||""))&&(0,s.jsx)(x.Ay,{size:"small",onClick:t=>{t.stopPropagation(),rn(e)},className:"rounded-md",children:"继续"}),(0,s.jsx)(es,{title:"确认删除?",onConfirm:t=>{null==t||t.stopPropagation(),rr(e)},children:(0,s.jsx)(x.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(L.A,{}),onClick:e=>e.stopPropagation(),className:"rounded-md"})})]})]},e.id)})})})]}),(0,s.jsx)(v.A,{title:rj,open:tA,onClose:()=>{for(let e of(tk(!1),tF.current.values()))clearInterval(e);tF.current.clear()},size:"large",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:eL?(0,s.jsxs)(c.A,{wrap:!0,children:[tY(tj)&&(0,s.jsx)(x.Ay,{icon:(0,s.jsx)(V.A,{}),disabled:eZ||eP,onClick:()=>{tj&&rn(tj)},children:"继续生成"}),(0,s.jsx)(x.Ay,{icon:(0,s.jsx)(J.A,{}),disabled:eZ,onClick:()=>{rm()},children:ef("documents.saveDraft")}),(0,s.jsx)(x.Ay,{icon:(0,s.jsx)(Y.A,{}),disabled:eZ,loading:"markdown"===eX,onClick:()=>{rd("markdown")},children:"MD"}),(0,s.jsx)(x.Ay,{disabled:eZ,loading:"html"===eX,onClick:()=>{rd("html")},children:"HTML"}),(0,s.jsx)(x.Ay,{disabled:eZ,loading:"docx"===eX,onClick:()=>{rd("docx")},children:"DOCX"}),(0,s.jsx)(x.Ay,{type:"primary",disabled:eZ,loading:"pdf"===eX,onClick:()=>{rd("pdf")},children:"PDF"})]}):tY(tj)||ru()||eP&&"workflow"===tS?(0,s.jsxs)(c.A,{wrap:!0,children:[tY(tj)&&(0,s.jsx)(x.Ay,{type:"primary",icon:(0,s.jsx)(V.A,{}),loading:eP,onClick:()=>{tj&&rn(tj)},children:"继续生成"}),ru()&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.Ay,{icon:(0,s.jsx)(Y.A,{}),loading:"markdown"===eX,onClick:()=>{rp("markdown")},children:"MD"}),(0,s.jsx)(x.Ay,{loading:"html"===eX,onClick:()=>{rp("html")},children:"HTML"}),(0,s.jsx)(x.Ay,{loading:"docx"===eX,onClick:()=>{rp("docx")},children:"DOCX"}),(0,s.jsx)(x.Ay,{type:"primary",loading:"pdf"===eX,onClick:()=>{rp("pdf")},children:"PDF"})]}),eP&&"workflow"===tS&&(0,s.jsx)(x.Ay,{danger:!0,onClick:()=>{(async()=>{if(en&&(eo=!0),eK&&await (0,Z.r)(eK,tx||void 0).catch(()=>void 0),en){var e;en.aborted=!0,null==(e=en.pollController)||e.abort(),en.loading=!1,en.error="用户中止",ei(),en=null}for(let e of(localStorage.removeItem(tL),tF.current.values()))clearInterval(e);tF.current.clear(),eq(!1),tg([]),tf(null),tk(!1),await tG(),ej.info("已中止生成任务")})()},children:"中止任务"})]}):void 0,children:(0,s.jsxs)(ea,{style:{width:"100%"},gap:16,children:["workflow"===tS&&th.length>0&&(0,s.jsx)(ea,{gap:10,children:th.map((e,t)=>{let r=tN.has(e.key),l=e.subSteps.length>8||e.description.length>240;return(0,s.jsxs)("div",{style:{display:"flex",gap:10,padding:10,border:"1px solid var(--colorBorderSecondary)",borderRadius:10,background:t===tH?"var(--colorFillAlter)":"var(--colorBgContainer)"},children:[(0,s.jsx)("span",{children:"process"===e.status?(0,s.jsx)(P.A,{}):"warning"===e.status?(0,s.jsx)(M.A,{style:{color:"var(--colorWarning)"}}):e.icon}),(0,s.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,s.jsxs)(c.A,{wrap:!0,children:[(0,s.jsx)(er,{strong:!0,children:e.title}),(0,s.jsx)(p.A,{color:"finish"===e.status?"success":"error"===e.status?"error":"warning"===e.status?"warning":"process"===e.status?"processing":"default",children:ef(eh[e.status])}),(e=>{var t;let r=tc.current.get(e.key);if(!r)return null;let l=t2((null!=(t=r.endedAt)?t:Date.now())-r.startedAt);return(0,s.jsx)(p.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0",children:r.endedAt?l:"".concat(l,"(运行中)")})})(e)]}),(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12,whiteSpace:"pre-wrap"},children:((e,t)=>{let r=e.description.length>240,l=t?e.subSteps:e.subSteps.slice(0,8);return(0,s.jsxs)("div",{children:[e.subtitle&&(0,s.jsx)("div",{style:{marginBottom:4},children:(0,s.jsx)(p.A,{children:e.subtitle})}),(0,s.jsx)("div",{style:!t&&r?{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"}:void 0,children:e.description}),(0,s.jsx)("div",{style:{marginTop:4},children:l.map(e=>{var t;return(0,s.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,s.jsx)(P.A,{}):"finish"===t?(0,s.jsx)(q.A,{}):"warning"===t?(0,s.jsx)(M.A,{style:{color:"var(--colorWarning)"}}):"error"===t?(0,s.jsx)(L.A,{}):(0,s.jsx)("span",{style:{display:"inline-block",height:6,width:6,borderRadius:"50%",background:"var(--colorTextTertiary)"}}),(0,s.jsx)("span",{children:e.title})]},e.key)})})]})})(e,r)}),l&&(0,s.jsx)(x.Ay,{size:"small",type:"link",style:{padding:0,height:"auto",marginTop:6},onClick:()=>{var t;return t=e.key,void tI(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r})},children:r?"收起":e.subSteps.length>8?"更多(".concat(e.subSteps.length," 条详情)"):"更多"})]})]},e.key)})}),"workflow"===tS&&(null==tj?void 0:tj.partialChapters)&&tj.partialChapters.length>0&&(0,s.jsx)(f.A,{size:"small",title:"章节进度",extra:(0,s.jsxs)(p.A,{color:"blue",children:[tj.partialChapters.filter(e=>"completed"===e.status).length,"/",tj.partialChapters.length]}),children:(0,s.jsx)(ea,{gap:6,style:{width:"100%"},children:tj.partialChapters.map(e=>(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:8,fontSize:12},children:[(0,s.jsx)(er,{ellipsis:!0,style:{maxWidth:480},children:e.title}),(0,s.jsxs)(c.A,{size:6,children:[(0,s.jsx)(p.A,{color:"failed"===e.status?"error":"success",children:"failed"===e.status?"失败":"完成"}),(0,s.jsxs)(er,{type:"secondary",children:[e.chars.toLocaleString()," 字"]})]})]},e.id))})}),"workflow"===tS&&(null==tj||null==(t=tj.draft)||null==(e=t.exportGate)?void 0:e.passed)===!1&&(()=>{var e;let t=(null==(e=tj.draft.exportGate.blockingIssues)?void 0:e.map(e=>e.message))||tj.draft.exportGate.checklist.filter(e=>!e.passed).map(e=>e.label)||["存在阻断级校验错误"],r=tT?t:t.slice(0,6);return(0,s.jsx)(el,{type:"error",title:"生成已完成,但导出门禁未通过",children:(0,s.jsxs)(c.A,{direction:"vertical",size:8,style:{width:"100%"},children:[(0,s.jsx)("span",{children:"阻断项:".concat(r.join(";")).concat(t.length>6&&!tT?"…(共 ".concat(t.length," 项)"):"","。可点击继续生成触发自动修复,或在“校验”页查看完整问题。")}),t.length>6&&(0,s.jsx)(x.Ay,{size:"small",type:"link",style:{padding:0,height:"auto",alignSelf:"flex-start"},onClick:()=>tR(e=>!e),children:tT?"收起":"查看全部 ".concat(t.length," 项")}),tY(tj)&&(0,s.jsx)(x.Ay,{type:"primary",size:"small",icon:(0,s.jsx)(V.A,{}),loading:eP,onClick:()=>{rn(tj)},children:"继续生成 / 自动修复"})]})})})(),"workflow"===tS&&(null==tj||null==(r=tj.reviewMetadata)?void 0:r.diagnostics)&&(0,s.jsx)(el,{type:"info",title:"后台自动优化",children:"策略:".concat(tj.reviewMetadata.diagnostics.strategy.mode,";LLM 调用 ").concat(tj.reviewMetadata.diagnostics.llm.calls," 次;噪声过滤 ").concat((null==(a=tj.reviewMetadata.diagnostics.evidence)?void 0:a.filteredNoise)||0," 条;质量门禁 阻断").concat((null==(i=tj.reviewMetadata.diagnostics.quality)?void 0:i.blockingCount)||0,"/重要").concat((null==(_=tj.reviewMetadata.diagnostics.quality)?void 0:_.importantCount)||0,"/轻微").concat((null==(F=tj.reviewMetadata.diagnostics.quality)?void 0:F.minorCount)||0,";自动限流调整 ").concat(tj.reviewMetadata.diagnostics.llm.limitAdjustments," 次。审查与诊断信息仅用于系统修复,不会写入正文或导出文件。")}),"workflow"===tS&&(null==tj||null==(B=tj.draft)?void 0:B.promptRules)&&(()=>{let e=tj.draft.promptRules,t=e.executionSummary||[],r=Object.entries(e.ruleSources||{}).filter(e=>{let[,t]=e;return t.length>0}),l=r.length>0,a=tE?r:r.slice(0,3);return(0,s.jsx)(f.A,{size:"small",title:(0,s.jsxs)(c.A,{size:6,children:[(0,s.jsx)(M.A,{style:{color:"var(--colorAccent)"}}),"提示词规则生效报告",t.length>0&&(0,s.jsxs)(p.A,{style:{margin:0},children:[t.length," 条"]})]}),styles:{body:{padding:12}},children:(0,s.jsxs)(ea,{gap:6,children:[t.length>0&&t.map((e,t)=>(0,s.jsxs)("div",{style:{display:"flex",gap:6,fontSize:12,color:"var(--colorText)",lineHeight:1.6},children:[(0,s.jsx)(q.A,{style:{color:"var(--colorSuccess)",marginTop:4}}),(0,s.jsx)("span",{children:e})]},t)),l&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j.A,{style:{margin:"4px 0"}}),(0,s.jsx)(er,{type:"secondary",style:{fontSize:12},children:"规则溯源(自动从以下提示词中抽取):"}),a.map(e=>{let[t,r]=e;return(0,s.jsxs)("div",{style:{fontSize:12,color:"var(--colorTextSecondary)",lineHeight:1.6},children:[(0,s.jsx)(er,{strong:!0,style:{fontSize:12},children:t}),":",r.map(e=>"".concat(e.roleId,"「").concat(e.matchedText.length>24?"".concat(e.matchedText.slice(0,24),"…"):e.matchedText,"」")).join("、")]},t)}),r.length>3&&(0,s.jsx)(x.Ay,{size:"small",type:"link",style:{padding:0,height:"auto",alignSelf:"flex-start"},onClick:()=>tM(e=>!e),children:tE?"收起溯源":"查看全部溯源(".concat(r.length," 类)")})]}),!l&&0===t.length&&(0,s.jsx)(er,{type:"secondary",style:{fontSize:12},children:"未从提示词中识别到额外硬规则,使用系统默认质量规则。"})]})})})(),"workflow"===tS&&eP&&0===th.length&&(0,s.jsxs)("div",{style:{textAlign:"center",padding:40},children:[(0,s.jsx)(y.A,{}),(0,s.jsx)("div",{style:{marginTop:12,color:"var(--colorTextSecondary)"},children:"正在准备生成…"})]}),"editor"===tS&&(null==eL?void 0:eL.reviewMetadata)&&(()=>{var e;let t=null==(e=eL.reviewMetadata.diagnostics)?void 0:e.quality,r=(eL.executionStages||[]).filter(e=>"llm_review"===e.type).flatMap(e=>(e.details||[]).filter(e=>/修复|补写|补齐|改进|调整/u.test(e))).slice(0,8);return t||0!==r.length?(0,s.jsx)(f.A,{size:"small",title:(0,s.jsxs)(c.A,{size:6,children:[(0,s.jsx)(q.A,{style:{color:"var(--colorSuccess)"}}),"运行质量报告"]}),styles:{body:{padding:12}},children:(0,s.jsxs)(ea,{gap:8,children:[t&&(0,s.jsx)(c.A,{wrap:!0,size:6,children:(0,s.jsxs)(p.A,{color:t.blockingCount>0?"error":"success",className:"border-0 m-0",children:["审查修复 ",t.repairedCount," 项 / 问题 ",t.blockingCount+t.importantCount+t.minorCount," 项"]})}),r.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 rounded-lg border border-[var(--borderColor)] bg-[var(--colorFillQuaternary)] px-3 py-2",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-[var(--colorText)]",children:"修复记录(审查阶段自动修复的内容)"}),r.map((e,t)=>(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:["\xb7 ",e]},t))]})]})}):null})(),"editor"===tS&&tp.length>0&&(0,s.jsx)(f.A,{size:"small",title:(0,s.jsxs)(c.A,{size:6,children:[(0,s.jsx)(Y.A,{}),"导出闭环报告",(0,s.jsx)(p.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0",children:tp.length})]}),styles:{body:{padding:12}},children:(0,s.jsxs)(ea,{gap:6,children:[[...tp].reverse().map((e,t)=>(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 rounded-lg border border-[var(--borderColor)] bg-[var(--colorFillQuaternary)] px-3 py-2 text-xs",children:[(0,s.jsx)(er,{strong:!0,children:e.format.toUpperCase()}),(0,s.jsx)(p.A,{color:"blue",className:"border-0 m-0",children:new Date(e.exportedAt).toLocaleString()}),void 0!==e.durationMs&&(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["总用时 ",t2(e.durationMs)]}),void 0!==e.repairedCount&&(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["修复 ",e.repairedCount," 项",void 0!==e.blockingCount?"(阻断 ".concat(e.blockingCount,")"):""]}),e.ruleSummary&&e.ruleSummary.length>0&&(0,s.jsxs)("span",{className:"text-[var(--colorTextSecondary)]",children:["规则 ",e.ruleSummary.length," 条"]}),!1===e.gatePassed&&(0,s.jsx)(p.A,{color:"error",className:"border-0 m-0",children:"门禁未过"}),e.healthAlerts&&e.healthAlerts.length>0&&(0,s.jsxs)(p.A,{color:"warning",className:"border-0 m-0",children:["健康告警 ",e.healthAlerts.length]})]},"".concat(e.exportedAt,"-").concat(t))),(()=>{let e=function(e){let t=[],r=[];if(e.length<3)return{retireCandidates:t,constraintSuggestions:r};let s=[...e].sort((e,t)=>e.exportedAt-t.exportedAt),l=s.slice(-3),a=s.slice(0,-3),n=new Set;for(let e of[...a,...l])for(let t of Object.keys(e.repairHeat||{}))n.add(t);for(let e of n){let s=l.map(t=>{var r;return null==(r=t.repairHeat)?void 0:r[e]});if(a.some(t=>{var r,s,l;return(null!=(l=null==(s=t.repairHeat)||null==(r=s[e])?void 0:r.hits)?l:0)>0})&&s.every(e=>void 0!==e&&0===e.hits)&&t.push(e),s.every(e=>void 0!==e&&e.hits>0&&e.failed/e.hits>=.5)){let t=s.reduce((e,t)=>e+(t?t.failed/t.hits:0),0)/s.length;r.push("".concat(e,"|").concat((100*t).toFixed(0),"%|连续").concat(3,"次"))}}return{retireCandidates:t,constraintSuggestions:r}}(tp);return 0===e.retireCandidates.length&&0===e.constraintSuggestions.length?null:(0,s.jsxs)(el,{type:"info",title:"跨文档缺陷热力图",children:[e.retireCandidates.length>0&&(0,s.jsxs)("div",{children:["候选退役(连续 3 次零命中,可评估停用):",e.retireCandidates.map(e=>{let t=e.split("|")[0];return ee[t]?"".concat(ee[t],"(").concat(e,")"):e}).join("、")]}),e.constraintSuggestions.length>0&&(0,s.jsxs)("div",{children:["建议加入写作硬约束(高命中且修复失败率高):",e.constraintSuggestions.map(e=>{let t=e.split("|")[0];return ee[t]?"".concat(ee[t],"(").concat(e,")"):e}).join("、")]})]})})()]})}),eL&&(0,s.jsx)("div",{ref:ew,children:(0,s.jsx)(h.A,{items:[{key:"edit",label:ef("documents.edit"),children:(0,s.jsxs)(ea,{gap:16,style:{width:"100%"},children:[(0,s.jsx)(et,{rows:28,value:eW,disabled:eZ,onSelect:e=>{var t,r,s;return e4({start:null!=(t=e.currentTarget.selectionStart)?t:0,end:null!=(s=null!=(r=e.currentTarget.selectionEnd)?r:e.currentTarget.selectionStart)?s:0})},onChange:e=>{var t,r,s;eO(e.target.value),e6(null),e8(null),e4({start:null!=(t=e.target.selectionStart)?t:0,end:null!=(s=null!=(r=e.target.selectionEnd)?r:e.target.selectionStart)?s:0})}}),(0,s.jsx)(f.A,{size:"small",style:{borderRadius:12,background:"linear-gradient(135deg, var(--colorFillAlter), var(--colorBgContainer))"},children:(0,s.jsxs)(ea,{gap:16,style:{width:"100%"},children:[(0,s.jsxs)(c.A,{align:"start",style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(c.A,{size:6,children:[(0,s.jsx)(z.A,{style:{color:"var(--colorAccent)"}}),(0,s.jsx)(er,{strong:!0,children:"精准修改"}),(0,s.jsx)(p.A,{color:"blue",children:"AI 辅助"})]}),(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:"针对当前编辑内容补充更具体的要求,AI 会保留文档结构并按你的提示细化修改。"})]}),(0,s.jsxs)(x.Ay,{size:"small",icon:(0,s.jsx)(Q.A,{}),onClick:()=>tt(e=>!e),disabled:0===e7.length,children:["历史版本 ",e7.length>0?e7.length:""]})]}),(0,s.jsx)(el,{type:"info",title:"系统只负责识别修改范围,不改写你的提示词;选中文字后优先只改选区,没有选区时按光标所在小节/章节定位。"}),(0,s.jsx)(et,{rows:4,value:eJ,disabled:eZ,onChange:e=>{eY(e.target.value),e6(null),e8(null)},placeholder:"例如:写细一点;润色这段;第七章补充高处作业和临电安全措施;把安全检查频次改成每周一次。"}),(0,s.jsxs)(c.A,{wrap:!0,style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsx)(c.A,{wrap:!0,children:["写细一点","更专业","只润色选区","补充可执行措施"].map(e=>(0,s.jsx)(x.Ay,{size:"small",disabled:eZ,onClick:()=>eY(t=>t?"".concat(t,";").concat(e):e),children:e},e))}),(0,s.jsx)(x.Ay,{type:"primary",icon:(0,s.jsx)(z.A,{}),loading:eZ&&"planning"===e0,disabled:!eJ.trim()||eZ,onClick:()=>{rv()},children:"识别修改范围"})]}),e2&&!e5&&(0,s.jsx)(f.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorAccent)"},children:(0,s.jsxs)(ea,{gap:8,style:{width:"100%"},children:[(0,s.jsxs)(c.A,{wrap:!0,children:[(0,s.jsx)(p.A,{color:"purple",children:e2.scope}),(0,s.jsx)(p.A,{color:"blue",children:e2.action}),(0,s.jsxs)(p.A,{color:e2.confidence>=.8?"green":"orange",children:["置信度 ",Math.round(100*e2.confidence),"%"]}),e2.targetTitle&&(0,s.jsx)(er,{strong:!0,children:e2.targetTitle})]}),(0,s.jsx)(er,{children:e2.summary}),(0,s.jsx)(er,{type:"secondary",style:{fontSize:12},children:"将按你的原始提示词执行,不添加额外编辑任务。"}),(0,s.jsxs)(c.A,{children:[(0,s.jsx)(x.Ay,{type:"primary",loading:eZ&&"applying"===e0,onClick:()=>{rf(e2)},children:"执行并预览"}),(0,s.jsx)(x.Ay,{disabled:eZ,onClick:()=>e6(null),children:"取消"})]})]})}),e5&&(0,s.jsx)(f.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorSuccess)"},children:(0,s.jsxs)(ea,{gap:8,style:{width:"100%"},children:[(0,s.jsxs)(c.A,{wrap:!0,children:[(0,s.jsx)(p.A,{color:"green",children:"修改预览"}),(0,s.jsx)(er,{children:e5.summary||e5.plan.summary}),(0,s.jsxs)(p.A,{children:[e5.changedChars&&e5.changedChars>0?"+".concat(e5.changedChars):e5.changedChars," 字符"]})]}),(0,s.jsxs)(w.A,{gutter:12,children:[(0,s.jsxs)(b.A,{span:12,children:[(0,s.jsx)(er,{strong:!0,children:"修改前"}),(0,s.jsx)("div",{style:{marginTop:6,maxHeight:180,overflow:"auto",padding:10,borderRadius:8,background:"var(--colorFillAlter)",whiteSpace:"pre-wrap",fontSize:12},children:e5.beforeSnippet||"无片段预览"})]}),(0,s.jsxs)(b.A,{span:12,children:[(0,s.jsx)(er,{strong:!0,children:"修改后"}),(0,s.jsx)("div",{style:{marginTop:6,maxHeight:180,overflow:"auto",padding:10,borderRadius:8,background:"var(--colorFillAlter)",whiteSpace:"pre-wrap",fontSize:12},children:e5.afterSnippet||"无片段预览"})]})]}),(0,s.jsxs)(c.A,{children:[(0,s.jsx)(x.Ay,{type:"primary",onClick:()=>{e5&&(rx(e5.before,e5.prompt),eO(e5.markdown),rh(!0),ej.success("已应用精准修改"))},children:"应用到文档"}),(0,s.jsx)(x.Ay,{onClick:()=>e8(null),children:"返回计划"}),(0,s.jsx)(x.Ay,{danger:!0,onClick:()=>{e6(null),e8(null)},children:"放弃"})]})]})}),te&&(0,s.jsx)("div",{style:{borderTop:"1px solid var(--colorBorderSecondary)",paddingTop:12},children:(0,s.jsx)(A.A,{size:"small",dataSource:e7,locale:{emptyText:"暂无历史版本"},renderItem:e=>(0,s.jsx)(A.A.Item,{actions:[(0,s.jsx)(x.Ay,{size:"small",disabled:eZ,onClick:()=>{rx(eW,"恢复前版本"),eO(e.content),rh(!0),ej.success("已恢复历史版本")},children:"恢复"},"restore")],children:(0,s.jsx)(A.A.Item.Meta,{title:(0,s.jsxs)(c.A,{children:[(0,s.jsx)(er,{children:new Date(e.createdAt).toLocaleString()}),(0,s.jsx)(p.A,{children:e.prompt})]}),description:(0,s.jsx)(er,{type:"secondary",ellipsis:!0,children:e.content.replace(/\s+/gu," ").slice(0,120)})})})})})]})})]})},{key:"chapters-facts",label:"章节与事实",children:(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[eL.chapters.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(er,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["章节 (",eL.chapters.length,")"]}),(0,s.jsx)(A.A,{size:"small",dataSource:eL.chapters,renderItem:e=>(0,s.jsx)(A.A.Item,{children:(0,s.jsx)(A.A.Item.Meta,{title:e.title,description:"证据: ".concat(e.evidence.length," \xb7 缺失: ").concat(e.missingFacts.length)})})})]}),eL.structuredFacts.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(er,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["结构化事实 (",eL.structuredFacts.length,")"]}),(0,s.jsx)(k.A,{size:"small",column:1,bordered:!0,children:eL.structuredFacts.map((e,t)=>(0,s.jsxs)(k.A.Item,{label:e.key,children:[(0,s.jsx)("span",{children:e.value}),(0,s.jsx)(p.A,{style:{marginLeft:8},children:e.confidence.toFixed(2)}),(0,s.jsx)(er,{type:"secondary",style:{fontSize:11,marginLeft:8},children:e.sourceFile})]},t))})]})]})},{key:"sources-missing",label:"来源与缺失",children:(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(er,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["引用来源 (",eL.sources.length,")"]}),0===eL.sources.length?(0,s.jsx)(g.A,{description:"暂无"}):(0,s.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:eL.sources.map(e=>(0,s.jsxs)(p.A,{color:"blue",children:[e.filePath," (",e.count,")"]},e.filePath))})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(er,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["缺失项 (",eL.missingItems.length,")"]}),0===eL.missingItems.length?(0,s.jsx)(g.A,{description:"无缺失"}):(0,s.jsx)(A.A,{size:"small",dataSource:eL.missingItems,renderItem:e=>(0,s.jsx)(A.A.Item,{children:e})})]})]})},{key:"validation",label:"校验 (".concat(eL.validationIssues.length,")"),children:0===eL.validationIssues.length?(0,s.jsx)(g.A,{description:"校验通过"}):(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[eL.validationIssues.map(e=>(0,s.jsxs)("div",{style:{border:"1px solid var(--colorBorderSecondary)",borderRadius:8,padding:12},children:[(0,s.jsx)(p.A,{color:"error"===e.level?"error":"warning"===e.level?"warning":"blue",children:ef(ev[e.level])}),(0,s.jsx)("div",{style:{marginTop:6,whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all",lineHeight:1.6},children:e.message}),e.suggestion&&(0,s.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))),eL.exportGate.checklist.length>0&&(0,s.jsxs)("div",{style:{marginTop:8},children:[(0,s.jsx)(er,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:"导出门禁"}),(0,s.jsx)(A.A,{size:"small",dataSource:eL.exportGate.checklist,renderItem:e=>(0,s.jsxs)(A.A.Item,{children:[(0,s.jsx)(er,{style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:e.label}),(0,s.jsx)(p.A,{color:e.passed?"success":"error",children:e.passed?"PASS":"FAIL"})]})})]})]})},{key:"stages",label:"执行阶段 (".concat(eL.executionStages.length,")"),children:(0,s.jsx)(A.A,{size:"small",dataSource:eL.executionStages,renderItem:e=>(0,s.jsxs)(A.A.Item,{children:[(0,s.jsx)(A.A.Item.Meta,{avatar:ec[e.type]||(0,s.jsx)(D.A,{}),title:(0,s.jsx)(er,{title:e.roleId,style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:"".concat(e.title||em[e.type]||e.type," \xb7 ").concat(e.roleName||e.subtitle||tU(e.roleId))}),description:(0,s.jsx)(er,{type:"secondary",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"},children:e.message})}),(0,s.jsx)(p.A,{color:"success"===e.status?"success":"failed"===e.status?"error":"skipped"===e.status?"default":"warning",children:ef(eg[e.status])})]})})}]})})]})}),(0,s.jsx)(v.A,{title:ef("documents.templateEditor"),open:tr,onClose:()=>ts(!1),size:"large",mask:{closable:!1},styles:{body:{padding:20,overflow:"auto"},header:{borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,s.jsxs)(c.A,{children:[(0,s.jsx)(x.Ay,{onClick:()=>ts(!1),children:ef("common.cancel")}),(0,s.jsx)(x.Ay,{type:"primary",onClick:()=>{t7()},children:ef("common.save")})]}),children:(0,s.jsxs)(u.A,{form:ey,layout:"vertical",requiredMark:"optional",children:[(0,s.jsxs)(w.A,{gutter:12,children:[(0,s.jsx)(u.A.Item,{name:"id",hidden:!0,children:(0,s.jsx)(o.A,{})}),(0,s.jsx)(b.A,{xs:24,md:8,children:(0,s.jsx)(u.A.Item,{name:"name",label:ef("documents.templateName"),rules:[{required:!0}],children:(0,s.jsx)(o.A,{})})}),(0,s.jsx)(b.A,{xs:24,md:8,children:(0,s.jsx)(u.A.Item,{name:"category",label:ef("documents.templateCategory"),children:(0,s.jsx)(o.A,{})})}),(0,s.jsx)(b.A,{xs:24,md:8,children:(0,s.jsx)(u.A.Item,{name:"outputTitle",label:ef("documents.outputTitle"),children:(0,s.jsx)(o.A,{})})}),(0,s.jsx)(b.A,{xs:24,md:12,children:(0,s.jsx)(u.A.Item,{name:"description",label:ef("documents.templateDescription"),children:(0,s.jsx)(o.A,{})})})]}),(0,s.jsx)(u.A.Item,{name:"projectRoleConfigId",label:ef("documents.projectRoleConfig"),rules:[{required:!0,message:ef("documents.projectRoleConfigRequired")}],children:(0,s.jsx)(S.A,{showSearch:!0,placeholder:ef("documents.projectRoleConfigRequired"),options:tO})}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(er,{strong:!0,className:"text-base text-[var(--colorText)] block mb-1",children:"项目资料包绑定"}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:"直接选择整个项目文件夹,系统会自动识别招标正文、清单、图纸、补疑等资料类型。"})]}),(0,s.jsx)(p.A,{color:"blue",className:"border-0",children:"按项目资料包"})]}),e_?(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)(y.A,{}),(0,s.jsx)("div",{className:"mt-3 text-[var(--colorTextSecondary)] text-xs",children:"正在加载知识库文件…"})]}):0===eM.length?(0,s.jsx)(g.A,{image:g.A.PRESENTED_IMAGE_SIMPLE,description:"暂无知识库文件"}):(0,s.jsx)(u.A.Item,{name:"projectMaterialRoots",rules:[{required:!0,message:"请选择项目资料包"}],children:(0,s.jsx)(C.A,{treeData:eM,loadData:t3,fieldNames:{label:"rawTitle",value:"value",children:"children"},onChange:e=>{var t;return t=e.map(e=>String(e)),void ey.setFieldValue("projectMaterialRoots",eu(t))},treeCheckable:!0,showCheckedStrategy:C.A.SHOW_PARENT,placeholder:"点击这里选择项目文件夹...",style:{width:"100%"},listHeight:360,showSearch:!0,maxTagCount:"responsive",size:"large"})})]})]})})]})}}},e=>{e.O(0,[717,883,665,44,563,7,787,195,455,506,760,636,593,792],()=>e(e.s=16403)),_N_E=e.O()}]);
|