@customize-agent/server 4.1.18 → 4.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +174 -18
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/_error.js +1 -1
  5. package/.next/server/chunks/1928.js +1 -1
  6. package/.next/server/chunks/582.js +223 -0
  7. package/.next/server/chunks/5840.js +1 -1
  8. package/.next/server/chunks/8661.js +2 -2
  9. package/.next/server/middleware-build-manifest.js +1 -40
  10. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  11. package/.next/server/next-font-manifest.js +1 -1
  12. package/.next/server/pages/404.html +1 -1
  13. package/.next/server/pages/500.html +1 -1
  14. package/.next/server/pages/api/assets/generated/preview.js +1 -1
  15. package/.next/server/pages/api/assets/generated/preview.js.nft.json +1 -1
  16. package/.next/server/pages/api/assets/generated.js +1 -1
  17. package/.next/server/pages/api/assets/generated.js.nft.json +1 -1
  18. package/.next/server/pages/api/config/providers.js +1 -1
  19. package/.next/server/pages/api/documents/chapter/regenerate.js +1 -1
  20. package/.next/server/pages/api/documents/chapter/regenerate.js.nft.json +1 -1
  21. package/.next/server/pages/api/documents/export.js +7 -7
  22. package/.next/server/pages/api/documents/export.js.nft.json +1 -1
  23. package/.next/server/pages/api/documents/generate.js +2 -2
  24. package/.next/server/pages/api/documents/generate.js.nft.json +1 -1
  25. package/.next/server/pages/api/documents/generated/[id].js +1 -1
  26. package/.next/server/pages/api/documents/generated/[id].js.nft.json +1 -1
  27. package/.next/server/pages/api/documents/generated.js +1 -1
  28. package/.next/server/pages/api/documents/generated.js.nft.json +1 -1
  29. package/.next/server/pages/api/documents/roles.js +1 -1
  30. package/.next/server/pages/api/documents/templates.js +1 -1
  31. package/.next/server/pages/api/documents/templates.js.nft.json +1 -1
  32. package/.next/server/pages/asset-library.html +1 -1
  33. package/.next/server/pages/document-roles.html +1 -1
  34. package/.next/server/pages/document-roles.js.nft.json +1 -1
  35. package/.next/server/pages/documents.html +1 -1
  36. package/.next/server/pages/guide.html +1 -1
  37. package/.next/server/pages/guide.js.nft.json +1 -1
  38. package/.next/server/pages/index.html +1 -1
  39. package/.next/server/pages/knowledge/file-detail.html +1 -1
  40. package/.next/server/pages/knowledge/files.html +1 -1
  41. package/.next/server/pages/knowledge/manage.html +1 -1
  42. package/.next/server/pages/knowledge.html +1 -1
  43. package/.next/server/pages/models.html +1 -1
  44. package/.next/server/pages/overview.html +1 -1
  45. package/.next/server/pages/prompt.html +1 -1
  46. package/.next/server/pages/settings.html +1 -1
  47. package/.next/server/pages/system/logs.html +1 -1
  48. package/.next/server/pages-manifest.json +60 -3
  49. package/.next/server/vendor-chunks/next@15.5.19_react-dom@19.2.7_react@19.2.7__react@19.2.7_sass@1.101.0.js +10 -10
  50. package/.next/static/Q_xFgspIZa7UtyNcbbeXp/_buildManifest.js +1 -0
  51. package/.next/static/chunks/44-d3545eedd5c75ef1.js +4 -0
  52. package/.next/static/chunks/563-b12f299d34bb9e44.js +1 -0
  53. package/.next/static/chunks/717-743b697a417dd5ee.js +4 -0
  54. package/.next/static/chunks/795-cd94e8d4e9768eb9.js +1 -0
  55. package/.next/static/chunks/827-a6dc09e42833e6a3.js +1 -0
  56. package/.next/static/chunks/883-506cbca959974997.js +16 -0
  57. package/.next/static/chunks/957-7c7f05f1c2ccfb96.js +8 -0
  58. package/.next/static/chunks/{238-16333381c574f65b.js → 994-241f87efc61005b8.js} +4 -1
  59. package/.next/static/chunks/fallback/amp.js +1015 -0
  60. package/.next/static/chunks/fallback/main.js +1616 -0
  61. package/.next/static/chunks/fallback/pages/_app.js +28 -0
  62. package/.next/static/chunks/fallback/pages/_error.js +28 -0
  63. package/.next/static/chunks/fallback/react-refresh.js +62 -0
  64. package/.next/static/chunks/fallback/webpack.js +1192 -0
  65. package/.next/static/chunks/pages/{asset-library-bedc7113dfc7ad6a.js → asset-library-a1047694e888e655.js} +1 -1
  66. package/.next/static/chunks/pages/document-roles-5620a98d6312f81c.js +1 -0
  67. package/.next/static/chunks/pages/documents-7550a1ef2e5f266c.js +1 -0
  68. package/.next/static/chunks/pages/guide-b847733a9a832c2c.js +1 -0
  69. package/.next/static/chunks/pages/knowledge/{file-detail-f70a35f5b24a5b61.js → file-detail-02cd5d87cd1d1c5d.js} +1 -1
  70. package/.next/static/chunks/pages/knowledge/{files-3b5d049efb076e4b.js → files-8503246ce2bc07c6.js} +1 -1
  71. package/.next/static/chunks/pages/knowledge/{manage-67b5c7fe257f37c5.js → manage-a00bb7fc6a76f820.js} +1 -1
  72. package/.next/static/chunks/pages/{models-89f9769a32da8e5f.js → models-aa250428e72433df.js} +1 -1
  73. package/.next/static/chunks/pages/{prompt-08ecf369f65abdfd.js → prompt-224af05519ef8304.js} +1 -1
  74. package/.next/static/chunks/pages/system/{logs-a76f9e3131e0cd79.js → logs-6f45ef8d862759a2.js} +1 -1
  75. package/.next/static/chunks/polyfills.js +1 -0
  76. package/.next/static/chunks/webpack.js +2 -2
  77. package/.next/static/css/3f9e41b5c0ba95f7.css +1 -0
  78. package/package.json +4 -4
  79. package/.next/server/chunks/1924.js +0 -215
  80. package/.next/static/VJfTgkSHEgD9CkDEznJbt/_buildManifest.js +0 -1
  81. package/.next/static/chunks/209-5117020514c2bd0c.js +0 -4
  82. package/.next/static/chunks/466-1cd359f130473697.js +0 -1
  83. package/.next/static/chunks/576-6699fed6c88502fe.js +0 -1
  84. package/.next/static/chunks/580-618d7d7e7b74daf6.js +0 -19
  85. package/.next/static/chunks/644-3299885a9dc1ef78.js +0 -11
  86. package/.next/static/chunks/649-06b72042a4de8074.js +0 -4
  87. package/.next/static/chunks/795-18a2b5f64892634d.js +0 -1
  88. package/.next/static/chunks/pages/document-roles-3d8c5440cc3f15fd.js +0 -1
  89. package/.next/static/chunks/pages/documents-b59eba36e96a5621.js +0 -1
  90. package/.next/static/chunks/pages/guide-9d7d88a25d972c06.js +0 -1
  91. package/.next/static/css/9daa4d0938f1a323.css +0 -1
  92. package/.next/static/development/_buildManifest.js +0 -1
  93. package/.next/static/development/_ssgManifest.js +0 -1
  94. package/.next/static/webpack/0dc2c45812c77911.webpack.hot-update.json +0 -1
  95. package/.next/static/webpack/7de8e01bd19935ee.webpack.hot-update.json +0 -1
  96. package/.next/static/webpack/webpack.0dc2c45812c77911.hot-update.js +0 -12
  97. package/.next/static/webpack/webpack.7de8e01bd19935ee.hot-update.js +0 -12
  98. /package/.next/static/{VJfTgkSHEgD9CkDEznJbt → Q_xFgspIZa7UtyNcbbeXp}/_ssgManifest.js +0 -0
@@ -1,4 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[649],{69:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L255.8 713.6l-62.3-62.3a8.19 8.19 0 00-11.4 0l-39.8 39.8a8.19 8.19 0 000 11.4l62.3 62.3-44.9 44.9-62.3-62.3a8.19 8.19 0 00-11.4 0l-39.8 39.8a8.19 8.19 0 000 11.4l110.3 111.2c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6A304.1 304.1 0 00608 720c167.9 0 304-136.1 304-304S775.9 112 608 112m161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2"}}]},name:"key",theme:"outlined"}},5450:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"}},10218:(e,t,n)=>{n.d(t,{A:()=>m,H:()=>p});var r=n(97109),i=n(4932),a=n(42644);let l=e=>"object"==typeof e&&null!=e&&1===e.nodeType,o=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,c=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return o(n.overflowY,t)||o(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},s=(e,t,n,r,i,a,l,o)=>a<e&&l>t||a>e&&l<t?0:a<=e&&o<=n||l>=t&&o>=n?a-e-r:l>t&&o<n||a<e&&o>n?l-t+i:0,u=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},d=(e,t)=>{var n,r,i,a;if("undefined"==typeof document)return[];let{scrollMode:o,block:d,inline:h,boundary:f,skipOverflowHiddenElements:p}=t,g="function"==typeof f?f:e=>e!==f;if(!l(e))throw TypeError("Invalid target");let m=document.scrollingElement||document.documentElement,b=[],v=e;for(;l(v)&&g(v);){if((v=u(v))===m){b.push(v);break}null!=v&&v===document.body&&c(v)&&!c(document.documentElement)||null!=v&&c(v,p)&&b.push(v)}let $=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,y=null!=(a=null==(i=window.visualViewport)?void 0:i.height)?a:innerHeight,{scrollX:w,scrollY:S}=window,{height:E,width:k,top:A,right:N,bottom:I,left:x}=e.getBoundingClientRect(),{top:M,right:C,bottom:z,left:R}=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e),O="start"===d||"nearest"===d?A-M:"end"===d?I+z:A+E/2-M+z,B="center"===h?x+k/2-R+C:"end"===h?N+C:x-R,H=[];for(let e=0;e<b.length;e++){let t=b[e],{height:n,width:r,top:i,right:a,bottom:l,left:u}=t.getBoundingClientRect();if("if-needed"===o&&A>=0&&x>=0&&I<=y&&N<=$&&(t===m&&!c(t)||A>=i&&I<=l&&x>=u&&N<=a))break;let f=getComputedStyle(t),p=parseInt(f.borderLeftWidth,10),g=parseInt(f.borderTopWidth,10),v=parseInt(f.borderRightWidth,10),M=parseInt(f.borderBottomWidth,10),C=0,z=0,R="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-v:0,T="offsetHeight"in t?t.offsetHeight-t.clientHeight-g-M:0,q="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,F="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(m===t)C="start"===d?O:"end"===d?O-y:"nearest"===d?s(S,S+y,y,g,M,S+O,S+O+E,E):O-y/2,z="start"===h?B:"center"===h?B-$/2:"end"===h?B-$:s(w,w+$,$,p,v,w+B,w+B+k,k),C=Math.max(0,C+S),z=Math.max(0,z+w);else{C="start"===d?O-i-g:"end"===d?O-l+M+T:"nearest"===d?s(i,l,n,g,M+T,O,O+E,E):O-(i+n/2)+T/2,z="start"===h?B-u-p:"center"===h?B-(u+r/2)+R/2:"end"===h?B-a+v+R:s(u,a,r,p,v+R,B,B+k,k);let{scrollLeft:e,scrollTop:o}=t;C=0===F?0:Math.max(0,Math.min(o+C/F,t.scrollHeight-n/F+T)),z=0===q?0:Math.max(0,Math.min(e+z/q,t.scrollWidth-r/q+R)),O+=o-C,B+=e-z}H.push({el:t,top:C,left:z})}return H};var h=n(26047),f=n(44624);function p(e){return(0,f.$r)(e).join("_")}function g(e,t){let n=t.getFieldInstance(e),r=(0,a.rb)(n);if(r)return r;let i=(0,f.kV)((0,f.$r)(e),t.__INTERNAL__.name);if(i)return document.getElementById(i)}function m(e){let[t]=(0,i.mN)(),n=r.useRef({}),a=r.useMemo(()=>e??{...t,__INTERNAL__:{itemRef:e=>t=>{let r=p(e);t?n.current[r]=t:delete n.current[r]}},scrollToField:(e,t={})=>{let{focus:n,...r}=t,i=g(e,a);i&&(!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let n=(e=>{let t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(d(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:i,top:a,left:l}of d(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){let e=a-n.top+n.bottom,t=l-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}}(i,{scrollMode:"if-needed",block:"nearest",...r}),n&&a.focusField(e))},focusField:e=>{let t=a.getFieldInstance(e);(0,h.Tn)(t?.focus)?t.focus():g(e,a)?.focus?.()},getFieldInstance:e=>{let t=p(e);return n.current[t]}},[e,t]);return[a]}},13114:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(97109),i=n(5450),a=n(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(a.A,l({},e,{ref:t,icon:i.A})))},15437:(e,t,n)=>{n.d(t,{A:()=>r});let r=e=>{let{componentCls:t,antCls:n,motionDurationMid:r,motionEaseInOut:i}=e;return{[t]:{[`${n}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(e=>`${e} ${r} ${i}`).join(", ")} !important`}},[`${n}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(e=>`${e} ${r} ${i}`).join(", ")} !important`}}}}},19013:(e,t,n)=>{n.d(t,{C:()=>i});var r=n(97109);let i=()=>r.useReducer(e=>e+1,0)},19135:(e,t,n)=>{n.d(t,{Ay:()=>s,Gl:()=>o,ko:()=>c,ye:()=>l});var r=n(97109),i=n(7709),a=n(26047);let l=["xxxl","xxl","xl","lg","md","sm","xs"],o=[].concat(l).reverse(),c=(e,t)=>{if(t){for(let n of l)if(e[n]&&t?.[n]!==void 0)return t[n]}},s=()=>{let[,e]=(0,i.Ay)(),t=(e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}))((e=>{let t=[].concat(l).reverse();return t.forEach((n,r)=>{let i=n.toUpperCase(),a=`screen${i}Min`,l=`screen${i}`;if(!(e[a]<=e[l]))throw Error(`${a}<=${l} fails : !(${e[a]}<=${e[l]})`);if(r<t.length-1){let n=`screen${i}Max`;if(!(e[l]<=e[n]))throw Error(`${l}<=${n} fails : !(${e[l]}<=${e[n]})`);let a=t[r+1].toUpperCase(),o=`screen${a}Min`;if(!(e[n]<=e[o]))throw Error(`${n}<=${o} fails : !(${e[n]}<=${e[o]})`)}}),e})(e));return r.useMemo(()=>{let e=new Map,n=-1,r={};return{responsiveMap:t,matchHandlers:{},dispatch:t=>(r=t,e.forEach(e=>{e(r)}),e.size>=1),subscribe(t){return e.size||this.register(),n+=1,e.set(n,t),t(r),n},unsubscribe(t){e.delete(t),e.size||this.unregister()},register(){Object.entries(t).forEach(([e,t])=>{let n=({matches:t})=>{this.dispatch({...r,[e]:t})},i=window.matchMedia(t);(0,a.Tn)(i.addEventListener)&&i.addEventListener("change",n),this.matchHandlers[t]={mql:i,listener:n},n(i)})},unregister(){Object.values(t).forEach(e=>{let t=this.matchHandlers[e];(0,a.Tn)(t?.mql.removeEventListener)&&t.mql.removeEventListener("change",t?.listener)}),e.clear()}}},[t])}},29071:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(97109),i=n(78847),a=n(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(a.A,l({},e,{ref:t,icon:i.A})))},30289:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"}},41169:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(97109),i=n(42644);function a(e){let t=r.useRef(null),n=()=>{i.er.cancel(t.current),t.current=null};return[()=>{n(),t.current=(0,i.er)(()=>{t.current=null})},r=>{t.current&&(r.stopPropagation(),n()),e?.(r)}]}},44534:(e,t,n)=>{n.d(t,{A:()=>k});var r=n(97109),i=n(83914),a=n(3638),l=n(32565),o=n(99452);function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let s=r.forwardRef(({prefixCls:e="rc-switch",className:t,checked:n,defaultChecked:i,disabled:s,loadingIcon:u,checkedChildren:d,unCheckedChildren:h,onClick:f,onChange:p,onKeyDown:g,styles:m,classNames:b,...v},$)=>{let[y,w]=(0,l.A)(i??!1,n);function S(e,t){let n=y;return s||(w(n=e),p?.(n,t)),n}let E=(0,a.$)(e,t,{[`${e}-checked`]:y,[`${e}-disabled`]:s});return r.createElement("button",c({},v,{type:"button",role:"switch","aria-checked":y,disabled:s,className:E,ref:$,onKeyDown:function(e){e.which===o.A.LEFT?S(!1,e):e.which===o.A.RIGHT&&S(!0,e),g?.(e)},onClick:function(e){let t=S(!y,e);f?.(t,e)}}),u,r.createElement("span",{className:`${e}-inner`},r.createElement("span",{className:(0,a.$)(`${e}-inner-checked`,b?.content),style:m?.content},d),r.createElement("span",{className:(0,a.$)(`${e}-inner-unchecked`,b?.content),style:m?.content},h)))});s.displayName="Switch";var u=n(42644),d=n(92162),h=n(38862),f=n(74567),p=n(6831),g=n(27273),m=n(15561),b=n(47252),v=n(7961),$=n(16666),y=n(10540),w=n(28403);let S=(0,y.OF)("Switch",e=>{let t=(0,w.oX)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[(e=>{let{componentCls:t,trackHeight:n,trackMinWidth:r}=e;return{[t]:{...(0,v.dF)(e),position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:(0,m.zA)(n),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",...(0,$.V)(),[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary},...(0,v.K8)(e),[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}}}})(t),(e=>{let{componentCls:t,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:a,handleSize:l,switchDuration:o,calc:c}=e,s=`${t}-inner`,u=(0,m.zA)(c(l).add(c(r).mul(2)).equal()),d=(0,m.zA)(c(a).mul(2).equal());return{[t]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:a,paddingInlineEnd:i,transition:["padding-inline-start","padding-inline-end"].map(e=>`${e} ${o} ease-in-out`).join(", "),...(0,$.V)(),[`${s}-checked, ${s}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,pointerEvents:"none",minHeight:n,transition:["margin-inline-start","margin-inline-end"].map(e=>`${e} ${o} ease-in-out`).join(", "),...(0,$.V)()},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${s}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${s}`]:{paddingInlineStart:i,paddingInlineEnd:a,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:c(r).mul(2).equal(),marginInlineEnd:c(r).mul(-1).mul(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:c(r).mul(-1).mul(2).equal(),marginInlineEnd:c(r).mul(2).equal()}}}}}})(t),(e=>{let{componentCls:t,trackPadding:n,handleBg:r,handleShadow:i,handleSize:a,calc:l}=e,o=`${t}-handle`;return{[t]:{[o]:{position:"absolute",top:n,insetInlineStart:n,width:a,height:a,transition:`all ${e.switchDuration} ease-in-out`,...(0,$.V)(),"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:l(a).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""',...(0,$.V)()}},[`&${t}-checked ${o}`]:{insetInlineStart:`calc(100% - ${(0,m.zA)(l(a).add(n).equal())})`},[`&:not(${t}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}})(t),(e=>{let{componentCls:t,handleSize:n,calc:r}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:r(r(n).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}})(t),(e=>{let{componentCls:t,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:a,innerMaxMarginSM:l,handleSizeSM:o,calc:c}=e,s=`${t}-inner`,u=(0,m.zA)(c(o).add(c(r).mul(2)).equal()),d=(0,m.zA)(c(l).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:n,lineHeight:(0,m.zA)(n),[`${t}-inner`]:{paddingInlineStart:l,paddingInlineEnd:a,[`${s}-checked, ${s}-unchecked`]:{minHeight:n},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${s}-unchecked`]:{marginTop:c(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:o,height:o},[`${t}-loading-icon`]:{top:c(c(o).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:l,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${(0,m.zA)(c(o).add(r).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:c(e.marginXXS).div(2).equal(),marginInlineEnd:c(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:c(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:c(e.marginXXS).div(2).equal()}}}}}}})(t)]},e=>{let{fontSize:t,lineHeight:n,controlHeight:r,colorWhite:i}=e,a=t*n,l=r/2,o=a-4,c=l-4;return{trackHeight:a,trackHeightSM:l,trackMinWidth:2*o+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:i,handleSize:o,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new b.Y("#00230b").setA(.2).toRgbString()}`,innerMinMargin:o/2,innerMaxMargin:o+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}}),E=r.forwardRef((e,t)=>{let{prefixCls:n,size:l,disabled:o,loading:c,className:m,rootClassName:b,style:v,checked:$,value:y,defaultChecked:w,defaultValue:E,onChange:k,styles:A,classNames:N,...I}=e,[x,M]=(0,u.PW)(w??E??!1,$??y),{getPrefixCls:C,direction:z,className:R,style:O,classNames:B,styles:H}=(0,f.TP)("switch"),T=r.useContext(p.A),q=(o??T)||c,F=C("switch",n),[_,L]=S(F),j=(0,g.A)(l),D={...e,size:j,disabled:q},W=(0,d.XT)(O),P=(0,d.XT)(v),[X,V]=(0,d.AV)([B,N],[H,W,A,P],{props:D}),G=r.createElement("div",{className:(0,a.$)(`${F}-handle`,X.indicator),style:V.indicator},c&&r.createElement(i.A,{className:`${F}-loading-icon`})),U=(0,a.$)(R,{[`${F}-small`]:"small"===j,[`${F}-loading`]:c,[`${F}-rtl`]:"rtl"===z},m,b,X.root,_,L);return r.createElement(h.A,{component:"Switch",disabled:q},r.createElement(s,{...I,classNames:X,styles:V,checked:x,onChange:(...e)=>{M(e[0]),k?.(...e)},prefixCls:F,className:U,style:V.root,disabled:q,ref:t,loadingIcon:G}))});E.__ANT_SWITCH=!0;let k=E},44624:(e,t,n)=>{n.d(t,{$r:()=>i,BS:()=>l,kV:()=>a});let r=["parentNode"];function i(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function a(e,t){if(!e.length)return;let n=e.join("_");return t?`${t}_${n}`:r.includes(n)?`form_item_${n}`:n}function l(e,t,n,r,i,a){let l=r;return void 0!==a?l=a:n.validating?l="validating":e.length?l="error":t.length?l="warning":(n.touched||i&&n.validated)&&(l="success"),l}},46066:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(32565),i=n(3638),a=n(97109);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let o=(0,a.forwardRef)((e,t)=>{let{prefixCls:n="rc-checkbox",className:o,style:c,checked:s,disabled:u,defaultChecked:d=!1,type:h="checkbox",title:f,onChange:p,...g}=e,m=(0,a.useRef)(null),b=(0,a.useRef)(null),[v,$]=(0,r.A)(d,s);(0,a.useImperativeHandle)(t,()=>({focus:e=>{m.current?.focus(e)},blur:()=>{m.current?.blur()},input:m.current,nativeElement:b.current}));let y=(0,i.$)(n,o,{[`${n}-checked`]:v,[`${n}-disabled`]:u});return a.createElement("span",{className:y,title:f,style:c,ref:b},a.createElement("input",l({},g,{className:`${n}-input`,ref:m,onChange:t=>{u||("checked"in e||$(t.target.checked),p?.({target:{...e,type:h,checked:t.target.checked},stopPropagation(){t.stopPropagation()},preventDefault(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:u,checked:!!v,type:h})))})},48318:(e,t,n)=>{n.d(t,{A:()=>ed});var r=n(97109),i=n(60470),a=n(63890),l=n(88483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let c=r.forwardRef((e,t)=>r.createElement(l.A,o({},e,{ref:t,icon:a.A})));var s=n(54746),u=n(96651),d=n(41113),h=n(49939),f=n(70895),p=n(8572);function g(){return"function"==typeof BigInt}function m(e){return!e&&0!==e&&!Number.isNaN(e)||!String(e).trim()}function b(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),(t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,"")).startsWith(".")&&(t="0".concat(t));var r=t||"0",i=r.split("."),a=i[0]||"0",l=i[1]||"0";"0"===a&&"0"===l&&(n=!1);var o=n?"-":"";return{negative:n,negativeStr:o,trimStr:r,integerStr:a,decimalStr:l,fullStr:"".concat(o).concat(r)}}function v(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function $(e){var t=e.toLowerCase().split("e"),n=(0,p.A)(t,2),r=n[0],i=n[1],a=r.startsWith("-"),l=(a?r.slice(1):r).split("."),o=(0,p.A)(l,2),c=o[0],s=void 0===c?"0":c,u=o[1],d=void 0===u?"":u,h="".concat(s).concat(d).replace(/^0+/,"")||"0";return{decimal:d,digits:h,exponent:Number(void 0===i?"0":i),integer:s,negative:a}}function y(e){return e.exponent>=0?Math.max(0,e.decimal.length-e.exponent):Math.abs(e.exponent)+e.decimal.length}function w(e){var t=String(e);return v(e)?y($(t)):t.includes(".")&&E(t)?t.length-t.indexOf(".")-1:0}function S(e){var t=String(e);if(v(e)){if(e>Number.MAX_SAFE_INTEGER)return String(g()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(g()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);var n=$(t),r=y(n);t=r>100?function(e){var t=e.decimal,n=e.digits,r=e.exponent,i=e.integer,a=e.negative;if("0"===n)return"0";var l=i.replace(/^0+/,"").length,o=(t.match(/^0*/)||[""])[0].length,c=(l||-o)+r,s="";return s=c<=0?"0.".concat("0".repeat(-c)).concat(n):c>=n.length?"".concat(n).concat("0".repeat(c-n.length)):"".concat(n.slice(0,c),".").concat(n.slice(c)),"".concat(a?"-":"").concat(s)}(n):e.toFixed(r)}return b(t).fullStr}function E(e){return"number"==typeof e?!Number.isNaN(e):!!e&&(/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e))}var k=function(){function e(t){if((0,d.A)(this,e),(0,f.A)(this,"origin",""),(0,f.A)(this,"negative",void 0),(0,f.A)(this,"integer",void 0),(0,f.A)(this,"decimal",void 0),(0,f.A)(this,"decimalLen",void 0),(0,f.A)(this,"empty",void 0),(0,f.A)(this,"nan",void 0),m(t)){this.empty=!0;return}if(this.origin=String(t),"-"===t||Number.isNaN(t)){this.nan=!0;return}var n=t;if(v(n)&&(n=Number(n)),E(n="string"==typeof n?n:S(n))){var r=b(n);this.negative=r.negative;var i=r.trimStr.split(".");this.integer=BigInt(i[0]);var a=i[1]||"0";this.decimal=BigInt(a),this.decimalLen=a.length}else this.nan=!0}return(0,h.A)(e,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(e){return BigInt("".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(e,"0")))}},{key:"negate",value:function(){var t=new e(this.toString());return t.negative=!t.negative,t}},{key:"cal",value:function(t,n,r){var i=Math.max(this.getDecimalStr().length,t.getDecimalStr().length),a=n(this.alignDecimal(i),t.alignDecimal(i)).toString(),l=r(i),o=b(a),c=o.negativeStr,s=o.trimStr,u="".concat(c).concat(s.padStart(l+1,"0"));return new e("".concat(u.slice(0,-l),".").concat(u.slice(-l)))}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=new e(t);return n.isInvalidate()?this:this.cal(n,function(e,t){return e+t},function(e){return e})}},{key:"multi",value:function(t){var n=new e(t);return this.isInvalidate()||n.isInvalidate()?new e(NaN):this.cal(n,function(e,t){return e*t},function(e){return 2*e})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(e){return this.toString()===(null==e?void 0:e.toString())}},{key:"lessEquals",value:function(e){return 0>=this.add(e.negate().toString()).toNumber()}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return e?this.isInvalidate()?"":b("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e}(),A=function(){function e(t){if((0,d.A)(this,e),(0,f.A)(this,"origin",""),(0,f.A)(this,"number",void 0),(0,f.A)(this,"empty",void 0),m(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return(0,h.A)(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(r<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var i=Math.max(w(this.number),w(n));return new e(r.toFixed(i))}},{key:"multi",value:function(t){var n=Number(t);if(this.isInvalidate()||Number.isNaN(n))return new e(NaN);var r=this.number*n;if(r>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(r<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var i=Math.max(w(this.number),w(n));return new e(r.toFixed(i))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(e){return this.toNumber()===(null==e?void 0:e.toNumber())}},{key:"lessEquals",value:function(e){return 0>=this.add(e.negate().toString()).toNumber()}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return e?this.isInvalidate()?"":v(this.number)&&w(this.number)>100?String(this.number):S(this.number):this.origin}}]),e}();function N(e){return g()?new k(e):new A(e)}function I(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(""===e)return"";var i=b(e),a=i.negativeStr,l=i.integerStr,o=i.decimalStr,c="".concat(t).concat(o),s="".concat(a).concat(l);if(n>=0){var u=Number(o[n]);return u>=5&&!r?I(N(e).add("".concat(a,"0.").concat("0".repeat(n)).concat(10-u)).toString(),t,n,r):0===n?s:"".concat(s).concat(t).concat(o.padEnd(n,"0").slice(0,n))}return".0"===c?s:"".concat(s).concat(c)}var x=n(73473),M=n(3638),C=n(96546),z=n(49127);function R({prefixCls:e,action:t,children:n,disabled:i,className:a,style:l,onStep:o}){let c="up"===t,s=r.useRef(),u=r.useRef([]),d=()=>{clearTimeout(s.current)};r.useEffect(()=>()=>{d(),u.current.forEach(e=>{z.A.cancel(e)})},[]);let h=`${e}-action`,f=(0,M.$)(h,`${h}-${t}`,{[`${h}-${t}-disabled`]:i},a),p=()=>u.current.push((0,z.A)(d));return r.createElement("span",{unselectable:"on",role:"button",onMouseUp:p,onMouseLeave:p,onMouseDown:e=>{e.preventDefault(),d(),o(c,"handler"),s.current=setTimeout(function e(){o(c,"handler"),s.current=setTimeout(e,200)},600)},"aria-label":c?"Increase Value":"Decrease Value","aria-disabled":i,className:f,style:l},n||r.createElement("span",{unselectable:"on",className:`${e}-action-${t}-inner`}))}function O(e){let t="number"==typeof e?S(e):b(e).fullStr;return t.includes(".")?b(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}var B=n(42644),H=n(64213);function T(){return(T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let q=(e,t)=>e||t.isEmpty()?t.toString():t.toNumber(),F=e=>{let t=N(e);return t.isInvalidate()?null:t},_=r.forwardRef((e,t)=>{let{mode:n="input",prefixCls:i="rc-input-number",className:a,style:l,classNames:o,styles:c,min:s,max:u,step:d=1,defaultValue:h,value:f,disabled:p,readOnly:g,upHandler:m,downHandler:b,keyboard:v,changeOnWheel:$=!1,controls:y=!0,prefix:k,suffix:A,stringMode:_,parser:L,formatter:j,precision:D,decimalSeparator:W,onChange:P,onInput:X,onPressEnter:V,onStep:G,onMouseDown:U,onClick:K,onMouseUp:Y,onMouseLeave:Q,onMouseMove:J,onMouseEnter:Z,onMouseOut:ee,changeOnBlur:et=!0,...en}=e,[er,ei]=r.useState(!1),ea=r.useRef(!1),el=r.useRef(!1),eo=r.useRef(!1),ec=r.useRef(null),es=r.useRef(null);r.useImperativeHandle(t,()=>(function(e,t){return"undefined"!=typeof Proxy&&e?new Proxy(e,{get(e,n){if(t[n])return t[n];let r=e[n];return"function"==typeof r?r.bind(e):r}}):e})(es.current,{focus:e=>{(0,H.F4)(es.current,e)},blur:()=>{es.current?.blur()},nativeElement:ec.current}));let[eu,ed]=r.useState(()=>N(f??h)),eh=r.useCallback((e,t)=>{if(!t)return D>=0?D:Math.max(w(e),w(d))},[D,d]),ef=r.useCallback(e=>{let t=String(e);if(L)return L(t);let n=t;return W&&(n=n.replace(W,".")),n.replace(/[^\w.-]+/g,"")},[L,W]),ep=r.useRef(""),eg=r.useCallback((e,t)=>{if(j)return j(e,{userTyping:t,input:String(ep.current)});let n="number"==typeof e?S(e):e;if(!t){let e=eh(n,t);E(n)&&(W||e>=0)&&(n=I(n,W||".",e))}return n},[j,eh,W]),[em,eb]=r.useState(()=>{let e=h??f;return eu.isInvalidate()&&["string","number"].includes(typeof e)?Number.isNaN(e)?"":e:eg(eu.toString(),!1)});function ev(e,t){eb(eg(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}ep.current=em;let e$=r.useMemo(()=>F(u),[u,D]),ey=r.useMemo(()=>F(s),[s,D]),ew=r.useMemo(()=>!(!e$||!eu||eu.isInvalidate())&&e$.lessEquals(eu),[e$,eu]),eS=r.useMemo(()=>!(!ey||!eu||eu.isInvalidate())&&eu.lessEquals(ey),[ey,eu]),[eE,ek]=function(e,t){let n=(0,r.useRef)(null);return[function(){try{let{selectionStart:t,selectionEnd:r,value:i}=e,a=i.substring(0,t),l=i.substring(r);n.current={start:t,end:r,value:i,beforeTxt:a,afterTxt:l}}catch(e){}},function(){if(e&&n.current&&t)try{let{value:t}=e,{beforeTxt:r,afterTxt:i,start:a}=n.current,l=t.length;if(t.startsWith(r))l=r.length;else if(t.endsWith(i))l=t.length-n.current.afterTxt.length;else{let e=r[a-1],n=t.indexOf(e,a-1);-1!==n&&(l=n+1)}e.setSelectionRange(l,l)}catch(e){(0,C.Ay)(!1,`Something warning of cursor restore. Please fire issue about this: ${e.message}`)}}]}(es.current,er),eA=e=>e$&&!e.lessEquals(e$)?e$:ey&&!ey.lessEquals(e)?ey:null,eN=e=>!eA(e),eI=(e,t)=>{let n=e,r=eN(n)||n.isEmpty();if(n.isEmpty()||t||(n=eA(n)||n,r=!0),!g&&!p&&r){let e=n.toString(),r=eh(e,t);if(r>=0&&(eN(n=N(I(e,".",r)))||(n=N(I(e,".",r,!0)))),!n.equals(eu)){var i;i=n,void 0===f&&ed(i),P?.(n.isEmpty()?null:q(_,n)),void 0===f&&ev(n,t)}return n}return eu},ex=(()=>{let e=(0,r.useRef)(0),t=()=>{z.A.cancel(e.current)};return(0,r.useEffect)(()=>t,[]),n=>{t(),e.current=(0,z.A)(()=>{n()})}})(),eM=e=>{if(eE(),ep.current=e,eb(e),!el.current){let t=N(ef(e));t.isNaN()||eI(t,!0)}X?.(e),ex(()=>{let t=e;L||(t=e.replace(/。/g,".")),t!==e&&eM(t)})},eC=(0,B._q)((e,t)=>{if(e&&ew||!e&&eS)return;ea.current=!1;let n=N(eo.current?O(d):d);e||(n=n.negate());let r=eI((eu||N(0)).add(n.toString()),!1);G?.(q(_,r),{offset:eo.current?O(d):d,type:e?"up":"down",emitter:t}),es.current?.focus()}),ez=e=>{let t,n=N(ef(em));t=n.isNaN()?eI(eu,e):eI(n,e),void 0!==f?ev(eu,!1):t.isNaN()||ev(t,!1)};r.useEffect(()=>{if($&&er){let e=e=>{eC(e.deltaY<0,"wheel"),e.preventDefault()},t=es.current;if(t)return t.addEventListener("wheel",e,{passive:!1}),()=>t.removeEventListener("wheel",e)}}),(0,x.o)(()=>{eu.isInvalidate()||ev(eu,!1)},[D,j]),(0,x.o)(()=>{let e=N(f);ed(e);let t=N(ef(em));e.equals(t)&&ea.current&&!j||ev(e,ea.current)},[f]),(0,x.o)(()=>{j&&ek()},[em]);let eR={prefixCls:i,onStep:eC,className:o?.action,style:c?.action},eO=r.createElement(R,T({},eR,{action:"up",disabled:ew}),m),eB=r.createElement(R,T({},eR,{action:"down",disabled:eS}),b);return r.createElement("div",{ref:ec,className:(0,M.$)(i,`${i}-mode-${n}`,a,o?.root,{[`${i}-focused`]:er,[`${i}-disabled`]:p,[`${i}-readonly`]:g,[`${i}-not-a-number`]:eu.isNaN(),[`${i}-out-of-range`]:!eu.isInvalidate()&&!eN(eu)}),style:{...c?.root,...l},onMouseDown:e=>{es.current&&e.target!==es.current&&(es.current.focus(),e.preventDefault()),U?.(e)},onMouseUp:Y,onMouseLeave:Q,onMouseMove:J,onMouseEnter:Z,onMouseOut:ee,onClick:K,onFocus:()=>{ei(!0)},onBlur:()=>{et&&ez(!1),ei(!1),ea.current=!1},onKeyDown:e=>{let{key:t,shiftKey:n}=e;ea.current=!0,eo.current=n,"Enter"===t&&(el.current||(ea.current=!1),ez(!1),V?.(e)),!1!==v&&!el.current&&["Up","ArrowUp","Down","ArrowDown"].includes(t)&&(eC("Up"===t||"ArrowUp"===t,"keyboard"),e.preventDefault())},onKeyUp:()=>{ea.current=!1,eo.current=!1},onCompositionStart:()=>{el.current=!0},onCompositionEnd:()=>{el.current=!1,eM(es.current.value)},onBeforeInput:()=>{ea.current=!0}},"spinner"===n&&y&&eB,void 0!==k&&r.createElement("div",{className:(0,M.$)(`${i}-prefix`,o?.prefix),style:c?.prefix},k),r.createElement("input",T({autoComplete:"off",role:"spinbutton","aria-valuemin":s,"aria-valuemax":u,"aria-valuenow":eu.isInvalidate()?null:eu.toString(),step:d,ref:es,className:(0,M.$)(`${i}-input`,o?.input),style:c?.input,value:em,onChange:e=>{eM(e.target.value)},disabled:p,readOnly:g},en)),void 0!==A&&r.createElement("div",{className:(0,M.$)(`${i}-suffix`,o?.suffix),style:c?.suffix},A),"spinner"===n&&y&&eO,"input"===n&&y&&r.createElement("div",{className:(0,M.$)(`${i}-actions`,o?.actions),style:c?.actions},eO,eB))});var L=n(44137),j=n(92162),D=n(26047),W=n(4034),P=n(48921),X=n(74567),V=n(6831),G=n(632),U=n(27273),K=n(55359),Y=n(73134),Q=n(24716),J=n(49644),Z=n(15561),ee=n(44390),et=n(84767),en=n(90560),er=n(7961),ei=n(77032),ea=n(10540),el=n(28403),eo=n(47252);let ec=(0,ea.OF)("InputNumber",e=>{let t=(0,el.oX)(e,(0,et.C)(e));return[(e=>{let{componentCls:t,lineWidth:n,lineType:r,borderRadius:i,inputFontSizeSM:a,inputFontSizeLG:l,colorError:o,paddingInlineSM:c,paddingBlockSM:s,paddingBlockLG:u,paddingInlineLG:d,colorIcon:h,colorTextDisabled:f,motionDurationMid:p,handleHoverColor:g,handleOpacity:m,paddingInline:b,paddingBlock:v,handleBg:$,handleActiveBg:y,inputAffixPadding:w,borderRadiusSM:S,controlWidth:E,handleBorderColor:k,filledHandleBg:A,lineHeightLG:N,antCls:I}=e,x=`${(0,Z.zA)(n)} ${r} ${k}`,[M,C]=(0,ea.PN)(I,"input-number");return[{[t]:{...(0,er.dF)(e),...(0,ee.wj)(e),[M("input-padding-block")]:(0,Z.zA)(v),[M("input-padding-inline")]:(0,Z.zA)(b),display:"inline-flex",width:E,margin:0,paddingBlock:0,borderRadius:i,...(0,en.Eb)(e,{[`${t}-actions`]:{background:$,[`${t}-action-down`]:{borderBlockStart:x}}}),...(0,en.sA)(e,{[`${t}-actions`]:{background:A,[`${t}-action-down`]:{borderBlockStart:x}},"&:focus-within":{[`${t}-actions`]:{background:$}}}),...(0,en.aP)(e,{[`${t}-actions`]:{background:$,[`${t}-action-down`]:{borderBlockStart:x}}}),...(0,en.lB)(e),[`&${t}-borderless`]:{paddingBlock:0,[M("input-padding-block")]:(0,Z.zA)(e.calc(v).add(n).equal())},[`&${t}-borderless${t}-sm`]:{paddingBlock:0,[M("input-padding-block")]:(0,Z.zA)(e.calc(s).add(n).equal())},[`&${t}-borderless${t}-lg`]:{paddingBlock:0,[M("input-padding-block")]:(0,Z.zA)(e.calc(u).add(n).equal())},"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:o}},[`${t}-input`]:{...(0,er.dF)(e),width:"100%",paddingBlock:C("input-padding-block"),textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:0,outline:0,transition:`all ${p} linear`,appearance:"textfield",fontSize:"inherit",lineHeight:"inherit",...(0,ee.j_)(e.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&-disabled ${t}-input`]:{cursor:"not-allowed",color:e.colorTextDisabled}}},{[t]:{[`${t}-action`]:{...(0,er.Nk)(),userSelect:"none",overflow:"hidden",fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",transition:`all ${p} linear`,[`&:active:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{background:y},[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{color:g},[`&${t}-action-up-disabled, &${t}-action-down-disabled`]:{cursor:"not-allowed",color:f}},"&-mode-input":{overflow:"hidden",[`${t}-actions`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:m,height:"100%",borderRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${p}`,overflow:"hidden",[`${t}-action`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",marginInlineEnd:0,fontSize:e.handleFontSize}},[`&:hover ${t}-actions, &-focused ${t}-actions`]:{width:e.handleWidth,opacity:1},[`${t}-action`]:{color:h,height:"50%",borderInlineStart:x,[`&:hover:not(${t}-action-up-disabled):not(${t}-action-down-disabled)`]:{height:"60%"}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:"none"}}},[`&${t}-mode-spinner`]:{padding:0,width:"auto",[`${t}-action`]:{flex:"none",paddingInline:C("input-padding-inline"),"&-up":{borderInlineStart:x},"&-down":{borderInlineEnd:x}},[`${t}-input`]:{textAlign:"center",paddingInline:C("input-padding-inline")}}}},{[t]:{"&-lg":{[M("input-padding-block")]:(0,Z.zA)(u),[M("input-padding-inline")]:(0,Z.zA)(d),paddingBlock:0,fontSize:l,lineHeight:N},"&-sm":{[M("input-padding-block")]:(0,Z.zA)(s),[M("input-padding-inline")]:(0,Z.zA)(c),paddingBlock:0,fontSize:a,borderRadius:S}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:"flex",flex:"none",alignItems:"center",alignSelf:"center",pointerEvents:"none"},[`${t}-prefix`]:{marginInlineEnd:w},[`${t}-suffix`]:{height:"100%",marginInlineStart:w,transition:`margin ${p}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]})(t),(e=>{let{componentCls:t,antCls:n}=e;return{[`${t}-addon`]:{[`&:has(${n}-select)`]:{border:0,padding:0}}}})(t),(0,ei.G)(t)]},e=>{let t=e.handleVisible??"auto",n=e.controlHeightSM-2*e.lineWidth;return{...(0,et.b)(e),controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new eo.Y(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:+(!0===t),handleVisibleWidth:!0===t?n:0}},{unitless:{handleOpacity:!0},resetFont:!1}),es=r.forwardRef((e,t)=>{let n=r.useRef(null);r.useImperativeHandle(t,()=>n.current);let{rootClassName:a,size:l,disabled:o,prefixCls:d,addonBefore:h,addonAfter:f,prefix:p,suffix:g,bordered:m,readOnly:b,status:v,controls:$=!0,variant:y,className:w,style:S,classNames:E,styles:k,mode:A,...N}=e,{direction:I,className:x,style:C,styles:z,classNames:R}=(0,X.TP)("inputNumber"),O=r.useContext(V.A),B=o??O,H=r.useMemo(()=>!!$&&!B&&!b&&$,[$,B,b]),{compactSize:T,compactItemClassnames:q}=(0,J.RQ)(d,I),F="spinner"===A?r.createElement(s.A,null):r.createElement(u.A,null),L="spinner"===A?r.createElement(c,null):r.createElement(i.A,null),P="boolean"==typeof H?H:void 0;(0,D.Qd)(H)&&(F=H.upIcon||F,L=H.downIcon||L);let{hasFeedback:G,isFormItemInput:Q,feedbackIcon:Z}=r.useContext(K.$W),ee=(0,U.A)(e=>l??T??e),[et,en]=(0,Y.A)("inputNumber",y,m),er=G&&r.createElement(r.Fragment,null,Z),ei={...e,size:ee,disabled:B,controls:H},ea=(0,j.XT)(C),el=(0,j.XT)(S),[eo,ec]=(0,j.AV)([R,E],[z,ea,k,el],{props:ei});return r.createElement(_,{ref:n,mode:A,disabled:B,className:(0,M.$)(w,a,eo.root,x,q,(0,W.L)(d,v,G),{[`${d}-${et}`]:en,[`${d}-lg`]:"large"===ee,[`${d}-sm`]:"small"===ee,[`${d}-rtl`]:"rtl"===I,[`${d}-in-form-item`]:Q,[`${d}-without-controls`]:!H}),style:ec.root,upHandler:F,downHandler:L,prefixCls:d,readOnly:b,controls:P,prefix:p,suffix:er||g,classNames:eo,styles:ec,...N})}),eu=r.forwardRef((e,t)=>{let{addonBefore:n,addonAfter:i,prefixCls:a,className:l,status:o,rootClassName:c,...s}=e,{getPrefixCls:u}=(0,X.TP)("inputNumber"),d=u("input-number",a),{status:h}=r.useContext(K.$W),f=(0,W.v)(h,o),p=(0,G.A)(d),[g,m]=ec(d,p),b=n||i,v=r.createElement(es,{ref:t,...s,prefixCls:d,status:f,className:(0,M.$)(m,p,g,l),rootClassName:b?void 0:c});if(b){let t=t=>t?r.createElement(Q.A,{className:(0,M.$)(`${d}-addon`,m,g),variant:e.variant,disabled:e.disabled,status:f},r.createElement(L.A,{form:!0},t)):null,a=t(n),l=t(i);return r.createElement(J.Ay,{rootClassName:c},a,v,l)}return v});eu._InternalPanelDoNotUseOrYouWillBeFired=e=>r.createElement(P.Ay,{theme:{components:{InputNumber:{handleVisible:!0}}}},r.createElement(eu,{...e}));let ed=eu},54746:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(97109),i=n(71242),a=n(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(a.A,l({},e,{ref:t,icon:i.A})))},56985:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(97109),i=n(46066),a=n(42644),l=n(3638),o=n(92162),c=n(26047),s=n(38862),u=n(35622),d=n(74567),h=n(6831),f=n(632),p=n(55359);let g=r.createContext(null);var m=n(96285),b=n(41169);let v=r.forwardRef((e,t)=>{let{prefixCls:n,children:v,indeterminate:$=!1,onMouseEnter:y,onMouseLeave:w,skipGroup:S=!1,disabled:E,rootClassName:k,className:A,style:N,classNames:I,styles:x,name:M,value:C,checked:z,defaultChecked:R,onChange:O,...B}=e,{getPrefixCls:H,direction:T,className:q,style:F,classNames:_,styles:L}=(0,d.TP)("checkbox"),j=r.useContext(g),{isFormItemInput:D}=r.useContext(p.$W),W=r.useContext(h.A),P=(j?.disabled||E)??W,[X,V]=(0,a.PW)(R,z),G=X,U=(0,a._q)(e=>{V(e.target.checked),O?.(e),!S&&j?.toggleOption&&j.toggleOption({label:v,value:C})});j&&!S&&(G=j.value.includes(C));let K=r.useRef(null),Y=(0,a.xK)(t,K);r.useEffect(()=>{if(!S&&j)return j.registerValue(C),()=>{j.cancelValue(C)}},[C,S]),r.useEffect(()=>{K.current?.input&&(K.current.input.indeterminate=$)},[$]);let Q=H("checkbox",n),J=(0,f.A)(Q),[Z,ee]=(0,m.Ay)(Q,J),et={...B},en={...e,indeterminate:$,disabled:P,checked:G},er=(0,o.XT)(F),ei=(0,o.XT)(N),[ea,el]=(0,o.AV)([_,I],[L,er,x,ei],{props:en}),eo=(0,l.$)(`${Q}-wrapper`,{[`${Q}-rtl`]:"rtl"===T,[`${Q}-wrapper-checked`]:G,[`${Q}-wrapper-disabled`]:P,[`${Q}-wrapper-in-form-item`]:D},q,A,ea.root,k,ee,J,Z),ec=(0,l.$)(ea.icon,{[`${Q}-indeterminate`]:$},u.D,Z),[es,eu]=(0,b.A)(et.onClick);return r.createElement(s.A,{component:"Checkbox",disabled:P},r.createElement("label",{className:eo,style:el.root,onMouseEnter:y,onMouseLeave:w,onClick:es},r.createElement(i.A,{...et,name:!S&&j?j.name:M,checked:G,onClick:eu,onChange:U,prefixCls:Q,className:ec,style:el.icon,disabled:P,ref:Y,value:C}),(0,c.AZ)(v)&&r.createElement("span",{className:(0,l.$)(`${Q}-label`,ea.label),style:el.label},v)))});var $=n(9750);let y=r.forwardRef((e,t)=>{let{defaultValue:n,children:i,options:o=[],prefixCls:s,className:u,rootClassName:h,style:p,onChange:b,role:y="group",...w}=e,{getPrefixCls:S,direction:E}=r.useContext(d.QO),[k,A]=r.useState(w.value||n||[]),[N,I]=r.useState([]);r.useEffect(()=>{"value"in w&&A(w.value||[])},[w.value]);let x=r.useMemo(()=>o.map(e=>"string"==typeof e||(0,c.Et)(e)?{label:e,value:e}:e),[o]),M=e=>{I(t=>t.filter(t=>t!==e))},C=e=>{I(t=>[].concat((0,$.A)(t),[e]))},z=e=>{let t=k.indexOf(e.value),n=(0,$.A)(k);-1===t?n.push(e.value):n.splice(t,1),"value"in w||A(n),b?.(n.filter(e=>N.includes(e)).sort((e,t)=>x.findIndex(t=>t.value===e)-x.findIndex(e=>e.value===t)))},R=S("checkbox",s),O=`${R}-group`,B=(0,f.A)(R),[H,T]=(0,m.Ay)(R,B),q=(0,a.cJ)(w,["value","disabled"]),F=o.length?x.map(e=>r.createElement(v,{prefixCls:R,key:e.value.toString(),disabled:"disabled"in e?e.disabled:w.disabled,value:e.value,checked:k.includes(e.value),onChange:e.onChange,className:(0,l.$)(`${O}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):i,_=r.useMemo(()=>({toggleOption:z,value:k,disabled:w.disabled,name:w.name,registerValue:C,cancelValue:M}),[z,k,w.disabled,w.name,C,M]),L=(0,l.$)(O,{[`${O}-rtl`]:"rtl"===E},u,h,T,B,H);return r.createElement("div",{className:L,style:p,role:y,...q,ref:t},r.createElement(g.Provider,{value:_},F))});v.Group=y,v.__ANT_CHECKBOX=!0;let w=v},59609:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(97109),i=n(42644),a=n(19013),l=n(19135);let o=function(e=!0,t={}){let n=(0,r.useRef)(t),[,o]=(0,a.C)(),c=(0,l.Ay)();return(0,i.Nf)(()=>{let t=c.subscribe(t=>{n.current=t,e&&o()});return()=>c.unsubscribe(t)},[]),n.current}},61825:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(97109),i=n(30289),a=n(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(a.A,l({},e,{ref:t,icon:i.A})))},63890:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"}},71242:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"}},76981:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(97109),i=n(69),a=n(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(a.A,l({},e,{ref:t,icon:i.A})))},78847:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"}},92123:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"}},96285:(e,t,n)=>{n.d(t,{Ay:()=>c,gd:()=>o});var r=n(15561),i=n(7961),a=n(16666),l=n(28403);function o(e,t){var n=(0,l.oX)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});let{checkboxCls:o,checkboxSize:c,lineWidth:s}=n,u=`${o}-wrapper`,d="@media (hover: hover) and (pointer: fine)";return[{[`${o}-group`]:{...(0,i.dF)(n),display:"inline-flex",flexWrap:"wrap",columnGap:n.marginXS,[`> ${n.antCls}-row`]:{flex:1}},[u]:{...(0,i.dF)(n),display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${u}`]:{marginInlineStart:0}},[o]:{...(0,i.dF)(n),position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",boxSizing:"border-box",display:"block",width:c,height:c,direction:"ltr",backgroundColor:n.colorBgContainer,border:`${(0,r.zA)(s)} ${n.lineType} ${n.colorBorder}`,borderRadius:n.borderRadiusSM,borderCollapse:"separate",transition:`all ${n.motionDurationSlow}`,flex:"none",...(0,a.V)(),"&:after":{boxSizing:"border-box",position:"absolute",top:`calc(${c} / 2 - ${s})`,insetInlineStart:`calc(${c} / 4 - ${s})`,display:"table",width:n.calc(c).div(14).mul(5).equal(),height:n.calc(c).div(14).mul(8).equal(),border:`${(0,r.zA)(n.lineWidthBold)} solid ${n.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${n.motionDurationFast} ${n.motionEaseInBack}, opacity ${n.motionDurationFast}`,...(0,a.V)()},[`${o}-input`]:{position:"absolute",inset:`calc(-1 * (${s}))`,zIndex:1,cursor:"pointer",opacity:0,margin:0},[`&:has(${o}-input:focus-visible)`]:(0,i.jk)(n),"& + span":{paddingInlineStart:n.paddingXS,paddingInlineEnd:n.paddingXS}}},{[d]:{[`
2
- ${u}:not(${u}-disabled),
3
- ${o}:not(${o}-disabled)
4
- `]:{[`&:hover ${o}`]:{borderColor:n.colorPrimary}},[`${u}:not(${u}-disabled)`]:{[`&:hover ${o}-checked:not(${o}-disabled)`]:{backgroundColor:n.colorPrimaryHover,borderColor:"transparent"}}}},{[`${o}-checked`]:{backgroundColor:n.colorPrimary,borderColor:n.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${n.motionDurationMid} ${n.motionEaseOutBack} ${n.motionDurationFast}`,...(0,a.V)()},[d]:{[`&:not(${o}-disabled):hover`]:{backgroundColor:n.colorPrimaryHover,borderColor:"transparent"}}}},{[o]:{"&-indeterminate":{backgroundColor:n.colorBgContainer,borderColor:n.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:n.calc(n.fontSizeLG).div(2).equal(),height:n.calc(n.fontSizeLG).div(2).equal(),backgroundColor:n.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'},[d]:{[`&:not(${o}-disabled):hover`]:{backgroundColor:n.colorBgContainer,borderColor:n.colorPrimary}}}}},{[`${u}-disabled`]:{cursor:"not-allowed"},[`${o}-disabled`]:{[`&, ${o}-input`]:{cursor:"not-allowed",pointerEvents:"none"},background:n.colorBgContainerDisabled,borderColor:n.colorBorder,"&:after":{borderColor:n.colorTextDisabled},"& + span":{color:n.colorTextDisabled},[`&${o}-indeterminate::after`]:{background:n.colorTextDisabled}}}]}let c=(0,n(10540).OF)("Checkbox",(e,{prefixCls:t})=>[o(t,e)])},96651:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(97109),i=n(92123),a=n(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(a.A,l({},e,{ref:t,icon:i.A})))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[795],{27795:(e,t,s)=>{s.r(t),s.d(t,{default:()=>j});var l=s(65321),r=s(97109),a=s(48321),o=s(33442),i=s(85114),n=s(99605),c=s(99811),d=s(13114),v=s(29071),x=s(26631),m=s(84742),u=s(38762),g=s(24810),p=s(6578);function h(e){let{title:t,value:s,subtext:r,icon:a,colorClass:o,animationClass:i}=e;return(0,l.jsxs)("div",{className:"p-4 animateFadeIn flex flex-col justify-between border-l-2 border-transparent hover:border-[var(--colorBrand)] transition-colors ".concat(i||""),style:{opacity:0},children:[(0,l.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,l.jsx)("div",{className:"text-xs font-semibold text-[var(--colorTextSecondary)] tracking-wide uppercase",children:t}),a&&(0,l.jsx)("div",{className:o,style:{opacity:.7},children:a})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-3xl font-bold tracking-tight",children:s}),r&&(0,l.jsx)("div",{className:"text-xs mt-1 truncate font-medium",style:{color:"var(--colorTextTertiary)"},children:r})]})]})}function j(){var e,t,s,j,y,b,f,w,N,k,T,C,A,S,P,I,M,z,B,D;let F=(0,a.Vr)(),[L,R]=(0,r.useState)(null),[U,_]=(0,r.useState)(!0),[E,O]=(0,r.useState)(0),[W,H]=(0,r.useState)(0),[V,Z]=(0,r.useState)(0),[q,G]=(0,r.useState)(0),[J,K]=(0,r.useState)(null),Q=(0,r.useCallback)(async()=>{_(!0);try{let[e,t,s,l,r]=await Promise.all([(0,p.FC)(),(0,p.Z3)().catch(()=>[]),(0,p.lv)().catch(()=>({roles:[],configs:[]})),(0,p.Dl)().catch(()=>({templates:[]})),(0,p.II)().catch(()=>null)]);R(e),O(Array.isArray(t)?t.length:0);let a=Array.isArray(s.roles)?s.roles:[];H(a.filter(e=>"file"===e.type).length),Z(a.filter(e=>"prompt"===e.type).length),G(Array.isArray(l.templates)?l.templates.length:0),K(r)}catch(e){}finally{_(!1)}},[]);(0,r.useEffect)(()=>{Q();let e=setInterval(()=>{Q()},1e4);return()=>clearInterval(e)},[Q]);let X=(null==L?void 0:L.tasks.total)?Math.round(L.tasks.success/L.tasks.total*100):0,Y=null==L||null==(e=L.models)?void 0:e[0],$=(null==L?void 0:L.logs.latestAt)?new Date(L.logs.latestAt).toLocaleString():F("overview.noLogs");return(0,l.jsxs)("div",{className:"space-y-12",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 pb-6 border-b border-[var(--borderColor)]",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2",children:F("overview.title")}),(0,l.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)]",children:F("overview.description")})]}),(0,l.jsxs)(o.A,{children:[(0,l.jsxs)("span",{className:"text-xs font-mono",style:{color:"var(--colorTextTertiary)"},children:[F("overview.updated"),": ",$]}),(0,l.jsx)(i.Ay,{type:"text",icon:(0,l.jsx)(c.A,{spin:U}),onClick:()=>{Q()}})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-8 divide-x border-b pb-8 border-[var(--borderColor)] divide-[var(--borderColor)] -mx-4 px-4",children:[(0,l.jsx)(h,{title:F("overview.uptime"),value:"".concat(L?Math.floor(L.uptime/3600):0,"h"),icon:(0,l.jsx)(d.A,{size:16}),colorClass:"text-[var(--colorBrand)]",animationClass:"stagger-1"}),(0,l.jsx)(h,{title:F("overview.tokensUsed"),value:(null!=(s=null==L?void 0:L.tokens.total)?s:0).toLocaleString(),subtext:"P ".concat(null!=(j=null==L?void 0:L.tokens.prompt)?j:0," / C ").concat(null!=(y=null==L?void 0:L.tokens.completion)?y:0),icon:(0,l.jsx)(v.A,{size:16}),colorClass:"text-[var(--colorWarn)]",animationClass:"stagger-2"}),(0,l.jsx)(h,{title:F("overview.tasksTotal"),value:(null!=(b=null==L?void 0:L.tasks.total)?b:0).toLocaleString(),subtext:"✓ ".concat(null!=(f=null==L?void 0:L.tasks.success)?f:0," | ✗ ").concat(null!=(w=null==L?void 0:L.tasks.failed)?w:0," | ↻ ").concat(null!=(N=null==L?void 0:L.tasks.running)?N:0),icon:(0,l.jsx)(x.A,{size:16}),colorClass:"text-[var(--colorInfo)]",animationClass:"stagger-3"}),(0,l.jsx)(h,{title:F("overview.successRate"),value:"".concat(X,"%"),icon:X>80?(0,l.jsx)(m.A,{size:16}):(0,l.jsx)(u.A,{size:16}),colorClass:X>80?"text-[var(--colorOk)]":"text-[var(--colorDanger)]",animationClass:"stagger-4"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-sm font-semibold mb-6 uppercase tracking-wider text-[var(--colorTextSecondary)] animateFadeIn stagger-5",style:{opacity:0},children:F("overview.systemResources")}),(0,l.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-y-8 gap-x-4",children:[(0,l.jsx)(h,{title:F("overview.fileRoles"),value:W,animationClass:"stagger-5"}),(0,l.jsx)(h,{title:F("overview.promptRoles"),value:V,animationClass:"stagger-5"}),(0,l.jsx)(h,{title:F("overview.templateCount"),value:q,animationClass:"stagger-5"}),(0,l.jsx)(h,{title:F("overview.semanticModel"),value:(null==J?void 0:J.provider)==="openai-compatible"?F("overview.external"):J?F("overview.local"):"—",subtext:null!=(k=null==J?void 0:J.model)?k:F("overview.notConfigured"),animationClass:"stagger-5"}),(0,l.jsx)(h,{title:F("overview.modelProviders"),value:E,animationClass:"stagger-5"}),(0,l.jsx)(h,{title:F("overview.auditLogs"),value:null!=(T=null==L?void 0:L.logs.events)?T:0,animationClass:"stagger-5"})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 pt-8 border-t border-[var(--borderColor)] animateFadeIn stagger-5",style:{opacity:0},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-semibold mb-6 uppercase tracking-wider text-[var(--colorTextSecondary)]",children:F("overview.hardwareUsage")}),(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsxs)("div",{className:"flex items-center gap-6",children:[(0,l.jsx)(n.A,{type:"dashboard",percent:null!=(C=null==L?void 0:L.cpu.usagePercent)?C:0,size:64,strokeColor:(null!=(A=null==L?void 0:L.cpu.usagePercent)?A:0)>80?"var(--colorDanger)":"var(--colorText)",strokeWidth:10}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium text-[var(--colorTextSecondary)]",children:F("overview.cpuUsage")}),(0,l.jsxs)("div",{className:"text-xl font-bold",children:[null!=(S=null==L||null==(t=L.cpu.usagePercent)?void 0:t.toFixed(1))?S:"0.0","%"]}),(0,l.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:[null!=(P=null==L?void 0:L.cpu.cores)?P:0," ",F("overview.cores")]})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-6",children:[(0,l.jsx)(n.A,{type:"dashboard",percent:null!=(I=null==L?void 0:L.memory.usagePercent)?I:0,size:64,strokeColor:(null!=(M=null==L?void 0:L.memory.usagePercent)?M:0)>80?"var(--colorDanger)":"var(--colorTextSecondary)",strokeWidth:10}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium text-[var(--colorTextSecondary)]",children:F("overview.memoryUsage")}),(0,l.jsxs)("div",{className:"text-xl font-bold",children:[null!=(z=null==L?void 0:L.memory.usagePercent)?z:0,"%"]}),(0,l.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:[null!=(B=null==L?void 0:L.memory.processMB)?B:0," MB / ",null!=(D=null==L?void 0:L.memory.totalMB)?D:0," MB"]})]})]})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-semibold mb-6 uppercase tracking-wider text-[var(--colorTextSecondary)]",children:F("overview.activityContext")}),(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mb-1",children:F("overview.topModel")}),Y?(0,l.jsxs)("div",{className:"font-semibold flex items-center gap-2",children:[(0,l.jsx)(g.A,{className:"text-[var(--colorTextSecondary)]"})," ",Y.model,(0,l.jsxs)("span",{className:"font-normal text-[var(--colorTextTertiary)] text-sm",children:["@",Y.provider]})]}):(0,l.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:F("overview.noDataAvailable")})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mb-3",children:F("overview.recentTaskTypes")}),(null==L?void 0:L.tasks.types)&&Object.keys(L.tasks.types).length>0?(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.entries(L.tasks.types).sort((e,t)=>t[1]-e[1]).map(e=>{let[t,s]=e;return(0,l.jsxs)("div",{className:"px-2 py-1 rounded text-xs font-mono bg-[var(--colorBgHover)] text-[var(--colorTextSecondary)]",children:[t.slice(0,30)," ",(0,l.jsx)("span",{className:"ml-2 font-bold text-[var(--colorText)]",children:s})]},t)})}):(0,l.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:F("common.noData")})]})]})]})]})]})}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[623],{23507:(e,l,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/document-roles",function(){return r(59889)}])},59889:(e,l,r)=>{"use strict";r.r(l),r.d(l,{default:()=>Q});var s=r(65321),o=r(97109),t=r(35292),n=r(17807),i=r(63455),a=r(11702),c=r(84253),d=r(85114),p=r(26171),x=r(33442),m=r(50883),u=r(85493),h=r(58569),g=r(34052),f=r(7576),j=r(2256),y=r(38770),v=r(68787),b=r(25345),A=r(80042),N=r(75548),w=r(26631),I=r(84662),S=r(30486),T=r(99650),C=r(8263),R=r(84742),k=r(43094),z=r(8579),B=r(81668),_=r(58209),F=r(96091),E=r(54746),O=r(96651),D=r(60470),P=r(6578),H=r(48321);let{Paragraph:U}=t.A,q={rule:(0,s.jsx)(b.A,{}),table:(0,s.jsx)(A.A,{}),drawing:(0,s.jsx)(N.A,{}),specification:(0,s.jsx)(w.A,{}),reference:(0,s.jsx)(I.A,{})},L={fact_extraction:(0,s.jsx)(S.A,{}),chapter_generation:(0,s.jsx)(T.A,{}),llm_review:(0,s.jsx)(C.A,{}),validation:(0,s.jsx)(R.A,{}),formatting:(0,s.jsx)(k.A,{}),reference:(0,s.jsx)(I.A,{})},V={rule:"#fa8c16",table:"#52c41a",drawing:"#722ed1",specification:"#eb2f96",reference:"#13c2c2"},W={fact_extraction:"#fa8c16",chapter_generation:"#1677ff",llm_review:"#722ed1",validation:"#52c41a",formatting:"#eb2f96",reference:"#13c2c2"},G={rule:"roles.ruleFile",table:"roles.tableFile",drawing:"roles.drawingFile",specification:"roles.specificationFile",reference:"roles.reference"},J={fact_extraction:"roles.factExtraction",chapter_generation:"roles.chapterGeneration",llm_review:"roles.llmReview",validation:"roles.validation",formatting:"roles.formatting",reference:"roles.reference"};function M(e,l){let r=new Blob([JSON.stringify(l,null,2)],{type:"application/json;charset=utf-8"}),s=URL.createObjectURL(r),o=document.createElement("a");o.href=s,o.download=e,o.click(),URL.revokeObjectURL(s)}function X(e){return e.trim().replace(/[\\/:*?"<>|]/g,"-").slice(0,80)||"untitled"}function K(e,l){return{type:"customize-agent.documentRoles",version:1,exportedAt:new Date().toISOString(),roles:e,configs:l}}function Q(){let e,l,r=(0,H.Vr)(),{message:t}=n.A.useApp(),[b]=i.A.useForm(),[A]=i.A.useForm(),[N,I]=(0,o.useState)([]),[S,C]=(0,o.useState)([]),[R,k]=(0,o.useState)([]),[Q,Y]=(0,o.useState)(!1),[Z,$]=(0,o.useState)(!1),[ee,el]=(0,o.useState)(!1),[er,es]=(0,o.useState)("file"),[eo,et]=(0,o.useState)("custom"),[en,ei]=(0,o.useState)(!1),ea=(0,o.useRef)(null),ec=async()=>{let[e,l]=await Promise.all([(0,P.lv)(),(0,P.dx)()]);I(e.roles),C(e.configs),k(l)};(0,o.useEffect)(()=>{ec().catch(()=>t.error(r("common.error")))},[t,r]);let ed=()=>"all"===eo||"custom"===eo,ep=N.filter(ed),ex=S.filter(ed),em=ep.filter(e=>"file"===e.type),eu=ep.filter(e=>"prompt"===e.type),eh=N.filter(e=>"file"===e.type),eg=N.filter(e=>"prompt"===e.type),ef=async()=>{try{let e=await b.validateFields(),l="file"===e.type?{...e,resourceId:void 0,resourceIds:[]}:e,s=await (0,P.dg)(l);I(s.roles),C(s.configs),Y(!1),t.success(r("common.success"))}catch(e){t.error(r("common.error"))}},ej=async()=>{try{let e=await A.validateFields(),l=e=>(null!=e?e:[]).map((e,l)=>{var r;return{roleId:e.roleId,order:Number(null!=(r=e.order)?r:l)}}),s=await (0,P.NR)({...e,fileRoles:l(e.fileRoles),promptRoles:l(e.promptRoles)});I(s.roles),C(s.configs),$(!1),t.success(r("common.success"))}catch(e){t.error(r("common.error"))}},ey=async e=>{try{let l=await (0,P.FV)(e.type,e.id);I(l.roles),C(l.configs),t.success("角色已删除")}catch(e){t.error(e instanceof Error?e.message:"角色删除失败")}},ev=async e=>{try{let l=await (0,P.dw)(e);I(l.roles),C(l.configs),t.success("项目角色配置已删除")}catch(e){t.error(e instanceof Error?e.message:"项目角色配置删除失败")}},eb=async e=>{if(e){ei(!0);try{let l=JSON.parse(await e.text()),r=await fetch("/api/documents/roles?mode=import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!r.ok)throw Error(await r.text());let s=await r.json();I(s.roles),C(s.configs),t.success("已导入 ".concat(s.importedRoles," 个角色、").concat(s.importedConfigs," 个配置"))}catch(e){t.error("导入失败,请确认 JSON 文件格式正确")}finally{ei(!1),ea.current&&(ea.current.value="")}}},eA=function(e){var l;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"file";b.setFieldsValue(e?{...e,resourceIds:(null==(l=e.resourceIds)?void 0:l.length)?e.resourceIds:e.resourceId?[e.resourceId]:[]}:{id:"role-".concat(Date.now()),name:"",description:"",type:r,resourceIds:[],executionType:"prompt"===r?"reference":void 0,processingType:"file"===r?"reference":void 0}),Y(!0)},eN=e=>{A.setFieldsValue(null!=e?e:{id:"config-".concat(Date.now()),name:"",description:"",fileRoles:[],promptRoles:[],builtIn:!1}),$(!0)},ew=e=>N.find(l=>l.id===e),eI=e=>{var l;return(null==e?void 0:e.type)==="prompt"?(null==(l=e.resourceIds)?void 0:l.length)?e.resourceIds:e.resourceId?[e.resourceId]:[]:[]},eS=e=>{var l;return(null==(l=R.find(l=>l.id===e))?void 0:l.projectName)||e},eT=e=>(0,s.jsx)(a.A,{closable:e.closable,onClose:e.onClose,color:"purple",title:e.value,style:{margin:"1px 2px",fontSize:11,lineHeight:"18px"},children:eS(e.value)}),eC=(e,l)=>{let o="file"===l?"blue":"purple",t="file"===l?G:J,n=[...e].sort((e,l)=>{var r,s;return Number(null!=(r=e.order)?r:0)-Number(null!=(s=l.order)?s:0)}).map(e=>ew(e.roleId)).filter(e=>!!e);return 0===n.length?(0,s.jsx)(c.A,{image:c.A.PRESENTED_IMAGE_SIMPLE,description:"file"===l?r("roles.noFileRoleSelected"):r("roles.noPromptRoleSelected")}):(0,s.jsx)("div",{className:"flex flex-col gap-2",children:n.map((e,l)=>{var n,i;let c=eI(e),d="file"===e.type?null!=(n=e.processingType)?n:"":null!=(i=e.executionType)?i:"";return(0,s.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-lg bg-[var(--colorBgContainer)] border border-[var(--borderColor)]",children:[(0,s.jsxs)(a.A,{color:o,className:"m-0",children:["#",l+1]}),(0,s.jsx)("span",{className:"font-semibold flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e.name}),(0,s.jsx)(a.A,{className:"m-0",children:r(t[d]||"roles.reference")}),"prompt"===e.type&&(0,s.jsx)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:r("roles.bindPromptCount").replace("{count}",String(c.length))})]},e.id)})})},eR=e=>{if(!e)return null;let l=eI(e);return(0,s.jsxs)("div",{style:{marginTop:8,padding:8,borderRadius:8,background:"var(--colorFillQuaternary)",fontSize:12,color:"var(--colorTextSecondary)"},children:[e.description&&(0,s.jsx)("div",{style:{marginBottom:4*("prompt"===e.type)},children:e.description}),"prompt"===e.type&&(0,s.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[l.slice(0,4).map(e=>(0,s.jsx)(a.A,{title:e,style:{margin:0,fontSize:10,lineHeight:"16px",maxWidth:180,overflow:"hidden",textOverflow:"ellipsis"},children:eS(e)},e)),l.length>4&&(0,s.jsxs)(a.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:["+",l.length-4]}),0===l.length&&(0,s.jsx)("span",{children:"未绑定提示词"})]})]})};return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"pageTitle",children:r("roles.title")}),(0,s.jsx)("p",{className:"pageDesc",children:r("roles.description")})]}),(0,s.jsxs)(x.A,{children:[(0,s.jsx)(m.A,{value:eo,onChange:et,style:{width:170},options:[{label:"我的配置 (".concat(N.length+S.length,")"),value:"custom"},{label:"全部来源 (".concat(N.length+S.length,")"),value:"all"}]}),(0,s.jsx)("input",{ref:ea,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:e=>{var l;eb(null==(l=e.target.files)?void 0:l[0])}}),(0,s.jsx)(d.Ay,{icon:(0,s.jsx)(F.A,{}),loading:en,onClick:()=>{var e;return null==(e=ea.current)?void 0:e.click()},children:"导入"}),(0,s.jsx)(d.Ay,{icon:(0,s.jsx)(B.A,{}),disabled:N.length+S.length===0,onClick:()=>{M("customize-document-roles-".concat(new Date().toISOString().slice(0,10),".json"),K(N,S)),t.success("已导出 ".concat(N.length," 个角色、").concat(S.length," 个配置"))},children:"导出全部"}),(0,s.jsx)(d.Ay,{icon:(0,s.jsx)(E.A,{}),onClick:()=>eA(void 0,"file"),children:r("roles.newFileRole")}),(0,s.jsx)(d.Ay,{icon:(0,s.jsx)(E.A,{}),onClick:()=>eA(void 0,"prompt"),children:r("roles.newPromptRole")}),(0,s.jsx)(d.Ay,{type:"primary",icon:(0,s.jsx)(E.A,{}),onClick:()=>eN(),children:r("roles.newConfig")})]})]}),(0,s.jsx)(u.A,{type:"info",showIcon:!0,message:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,s.jsx)("span",{children:r("roles.plainGuideTitle")}),(0,s.jsx)(d.Ay,{type:"link",size:"small",icon:ee?(0,s.jsx)(O.A,{}):(0,s.jsx)(D.A,{}),onClick:()=>el(!ee),style:{padding:"0 4px"},children:ee?"收起说明":"展开说明"})]}),description:ee?r("roles.plainGuideDesc"):void 0}),(0,s.jsxs)("div",{className:"bg-[var(--colorBg)] rounded-xl border border-[var(--borderColor)] mt-4",children:[(0,s.jsx)(h.A,{className:"px-6 pt-2 custom-tabs",items:[{key:"file",label:"文件角色 (".concat(em.length,")")},{key:"prompt",label:"提示词角色 (".concat(eu.length,")")},{key:"configs",label:"项目角色配置 (".concat(ex.length,")")}],activeKey:er,onChange:es}),(0,s.jsx)("div",{className:"p-6 pt-2",children:"configs"===er?0===ex.length?(0,s.jsx)(c.A,{description:r("common.noData")}):(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:ex.map(e=>{let l=e.fileRoles.map(e=>({...e,role:ew(e.roleId)})).filter(e=>e.role),o=e.promptRoles.map(e=>({...e,role:ew(e.roleId)})).filter(e=>e.role);return(0,s.jsxs)("div",{className:"group p-5 rounded-xl border border-transparent hover:border-[var(--borderColorStrong)] bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] hover:shadow-sm flex flex-col transition-all duration-300 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-4 min-w-0",children:[(0,s.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate flex-1",children:e.name}),(0,s.jsx)("div",{className:"flex gap-2 flex-shrink-0",children:(0,s.jsx)(a.A,{color:"cyan",bordered:!1,className:"m-0 text-[10px] leading-[18px]",children:"我的配置"})})]}),e.description&&(0,s.jsx)(U,{ellipsis:{rows:2},className:"text-xs text-[var(--colorTextSecondary)] mb-4",children:e.description}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 mt-auto pt-4 border-t border-[var(--borderColor)]",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:["文件角色 (",e.fileRoles.length,")"]}),l.length>0?(0,s.jsxs)("div",{className:"flex flex-wrap gap-1 mt-1",children:[l.slice(0,4).map(e=>(0,s.jsx)(a.A,{color:"blue",bordered:!1,className:"m-0 text-[10px] leading-[18px]",children:e.role.name},e.roleId)),l.length>4&&(0,s.jsxs)(a.A,{bordered:!1,className:"m-0 text-[10px] leading-[18px]",children:["+",l.length-4]})]}):(0,s.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:"无"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:["提示词角色 (",e.promptRoles.length,")"]}),o.length>0?(0,s.jsxs)("div",{className:"flex flex-wrap gap-1 mt-1",children:[o.slice(0,4).map(e=>(0,s.jsx)(a.A,{color:"purple",bordered:!1,className:"m-0 text-[10px] leading-[18px]",children:e.role.name},e.roleId)),o.length>4&&(0,s.jsxs)(a.A,{bordered:!1,className:"m-0 text-[10px] leading-[18px]",children:["+",o.length-4]})]}):(0,s.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:"无"})]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-1 opacity-0 group-hover:opacity-100 transition-opacity mt-4",children:[(0,s.jsx)(d.Ay,{type:"text",size:"small",icon:(0,s.jsx)(T.A,{className:"text-[var(--colorTextSecondary)]"}),onClick:()=>eN(e)}),!e.builtIn&&(0,s.jsx)(d.Ay,{type:"text",size:"small",icon:(0,s.jsx)(B.A,{className:"text-[var(--colorTextSecondary)]"}),onClick:()=>(e=>{let l=new Set([...e.fileRoles.map(e=>e.roleId),...e.promptRoles.map(e=>e.roleId)]);M("customize-role-config-".concat(X(e.name),"-").concat(new Date().toISOString().slice(0,10),".json"),K(N.filter(e=>l.has(e.id)&&!e.builtIn),[e])),t.success("已导出 1 个配置")})(e)}),(0,s.jsx)(p.A,{title:r("common.confirm"),onConfirm:()=>{ev(e.id)},children:(0,s.jsx)(d.Ay,{type:"text",size:"small",danger:!0,icon:(0,s.jsx)(_.A,{})})})]})]},e.id)})}):(e="file"===er?em:eu,l=r,0===e.length?(0,s.jsx)(c.A,{description:r("common.noData")}):(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:e.map(e=>{var o,n,i,c,x,m,u,h,g;let f="prompt"===e.type?(null==(o=e.resourceIds)?void 0:o.length)?e.resourceIds:e.resourceId?[e.resourceId]:[]:[],j=f.slice(0,3),y=f.length-j.length,v="file"===e.type?null!=(i=q[null!=(n=e.processingType)?n:""])?i:(0,s.jsx)(w.A,{}):null!=(x=L[null!=(c=e.executionType)?c:""])?x:(0,s.jsx)(z.A,{}),b="file"===e.type?null!=(u=V[null!=(m=e.processingType)?m:""])?u:"var(--colorAccent)":null!=(g=W[null!=(h=e.executionType)?h:""])?g:"var(--colorWarning)";return(0,s.jsxs)("div",{className:"group p-5 rounded-xl border border-transparent hover:border-[var(--borderColorStrong)] bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] hover:shadow-sm flex flex-col transition-all duration-300 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-4 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[(0,s.jsx)("span",{style:{color:b,fontSize:20,flexShrink:0,lineHeight:1},children:v}),(0,s.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate mb-1",children:e.name})]}),(0,s.jsx)("div",{className:"flex gap-2 flex-shrink-0",children:(0,s.jsx)(a.A,{color:"cyan",bordered:!1,className:"m-0 text-[10px] leading-[18px]",children:"我的角色"})})]}),e.description&&(0,s.jsx)(U,{ellipsis:{rows:2},className:"text-xs text-[var(--colorTextSecondary)] mb-4",children:e.description}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 mt-auto pt-4 border-t border-[var(--borderColor)]",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)(a.A,{color:"file"===e.type?"blue":"purple",bordered:!1,className:"m-0",children:function(e,l){var r,s,o;let t="file"===e.type?G[null!=(r=e.processingType)?r:""]:J[null!=(s=e.executionType)?s:""];return t?l(t):null!=(o="file"===e.type?e.processingType:e.executionType)?o:""}(e,l)}),f.length>0&&(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextSecondary)]",children:["绑定 ",f.length," 个提示词"]})]}),j.length>0&&(0,s.jsxs)("div",{className:"flex flex-wrap gap-1 mt-1",children:[j.map(e=>(0,s.jsx)(a.A,{color:"purple",bordered:!1,title:e,className:"m-0 text-[10px] leading-[18px] max-w-[140px] truncate",children:eS(e)},e)),y>0&&(0,s.jsxs)(a.A,{bordered:!1,className:"m-0 text-[10px] leading-[18px]",children:["+",y]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-1 opacity-0 group-hover:opacity-100 transition-opacity mt-2",children:[(0,s.jsx)(d.Ay,{type:"text",size:"small",icon:(0,s.jsx)(T.A,{className:"text-[var(--colorTextSecondary)]"}),onClick:()=>eA(e)}),!e.builtIn&&(0,s.jsx)(d.Ay,{type:"text",size:"small",icon:(0,s.jsx)(B.A,{className:"text-[var(--colorTextSecondary)]"}),onClick:()=>{M("customize-role-".concat(X(e.name),"-").concat(new Date().toISOString().slice(0,10),".json"),K([e],[])),t.success("已导出 1 个角色")}}),(0,s.jsx)(p.A,{title:r("common.confirm"),onConfirm:()=>{ey(e)},children:(0,s.jsx)(d.Ay,{type:"text",size:"small",danger:!0,icon:(0,s.jsx)(_.A,{})})})]})]})]},e.id)})}))})]}),(0,s.jsx)(g.A,{title:r("roles.roleEditor"),open:Q,onClose:()=>Y(!1),size:"large",maskClosable:!1,styles:{body:{padding:"24px 32px"},header:{padding:"16px 32px",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,s.jsx)(d.Ay,{type:"primary",onClick:()=>{ef()},children:r("common.save")}),children:(0,s.jsxs)(i.A,{form:b,layout:"vertical",children:[(0,s.jsx)(i.A.Item,{name:"id",hidden:!0,children:(0,s.jsx)(f.A,{})}),(0,s.jsxs)(j.A,{gutter:16,children:[(0,s.jsx)(y.A,{span:12,children:(0,s.jsx)(i.A.Item,{name:"type",label:r("roles.roleType"),rules:[{required:!0}],children:(0,s.jsx)(m.A,{options:[{label:r("roles.fileRole"),value:"file"},{label:r("roles.promptRole"),value:"prompt"}]})})}),(0,s.jsx)(y.A,{span:12,children:(0,s.jsx)(i.A.Item,{name:"name",label:r("roles.roleName"),rules:[{required:!0}],children:(0,s.jsx)(f.A,{})})})]}),(0,s.jsx)(i.A.Item,{name:"description",label:r("roles.roleDescription"),children:(0,s.jsx)(f.A.TextArea,{rows:2})}),(0,s.jsx)(i.A.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.type!==l.type,children:e=>{let{getFieldValue:l}=e,o="prompt"===l("type");return(0,s.jsx)(v.A,{size:"small",title:o?"提示词角色配置":"文件角色配置",style:{border:"1px solid var(--colorBorderSecondary)"},children:o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A.Item,{name:"executionType",label:r("roles.executionType"),rules:[{required:!0}],style:{marginBottom:12},children:(0,s.jsx)(m.A,{options:[{label:r("roles.factExtraction"),value:"fact_extraction"},{label:r("roles.chapterGeneration"),value:"chapter_generation"},{label:r("roles.validation"),value:"validation"},{label:r("roles.formatting"),value:"formatting"},{label:r("roles.reference"),value:"reference"}]})}),(0,s.jsx)(i.A.Item,{name:"resourceIds",label:r("roles.bindPrompt"),style:{marginBottom:0},help:(0,s.jsx)("span",{style:{fontSize:11,color:"var(--colorTextSecondary)"},children:r("roles.multiBindPromptHelp")}),children:(0,s.jsx)(m.A,{mode:"multiple",showSearch:!0,tagRender:eT,placeholder:"选择提示词",options:R.filter(e=>e.hasFile).map(e=>({label:e.projectName,value:e.id}))})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A.Item,{name:"processingType",label:r("roles.processingType"),rules:[{required:!0}],style:{marginBottom:12},children:(0,s.jsx)(m.A,{options:[{label:r("roles.ruleFile"),value:"rule"},{label:r("roles.tableFile"),value:"table"},{label:r("roles.drawingFile"),value:"drawing"},{label:r("roles.specificationFile"),value:"specification"},{label:r("roles.reference"),value:"reference"}]})}),(0,s.jsx)(u.A,{type:"info",showIcon:!0,message:"文件角色只定义处理类型",description:"具体项目文件由生成流程自动识别,或在模板的高级固定绑定资料中手动覆盖;这里不再绑定知识库文件,避免角色复用时混入其他项目资料。"})]})})}})]})}),(0,s.jsx)(g.A,{title:r("roles.configEditor"),open:Z,onClose:()=>$(!1),size:"large",maskClosable:!1,styles:{body:{padding:"24px 32px"},header:{padding:"16px 32px",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,s.jsx)(d.Ay,{type:"primary",onClick:()=>{ej()},children:r("common.save")}),children:(0,s.jsxs)(i.A,{form:A,layout:"vertical",children:[(0,s.jsx)(i.A.Item,{name:"id",hidden:!0,children:(0,s.jsx)(f.A,{})}),(0,s.jsxs)(j.A,{gutter:16,children:[(0,s.jsx)(y.A,{span:12,children:(0,s.jsx)(i.A.Item,{name:"name",label:r("roles.configName"),rules:[{required:!0}],children:(0,s.jsx)(f.A,{})})}),(0,s.jsx)(y.A,{span:12,children:(0,s.jsx)(i.A.Item,{name:"description",label:r("roles.configDescription"),children:(0,s.jsx)(f.A,{})})})]}),(0,s.jsx)(i.A.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.fileRoles!==l.fileRoles||e.promptRoles!==l.promptRoles,children:e=>{let{getFieldValue:l}=e,o=l("fileRoles")||[],t=l("promptRoles")||[];return(0,s.jsx)(h.A,{destroyInactiveTabPane:!1,items:[{key:"file",label:"文件角色 (".concat(o.length,"/").concat(eh.length,")"),children:(0,s.jsx)(i.A.List,{name:"fileRoles",children:(e,l)=>{let{add:t,remove:n}=l;return(0,s.jsxs)("div",{className:"flex flex-col gap-6 pt-4",children:[(0,s.jsx)(v.A,{size:"small",title:"已选文件角色",className:"bg-[var(--colorBgHover)] border-[var(--borderColorStrong)]",styles:{header:{borderBottom:"1px solid var(--borderColorStrong)"}},children:eC(o,"file")}),0===e.length&&(0,s.jsx)(c.A,{description:"暂未添加文件角色"}),e.map((e,l)=>(0,s.jsxs)(v.A,{size:"small",style:{border:"1px solid var(--colorBorderSecondary)",position:"relative"},children:[(0,s.jsxs)("div",{style:{position:"absolute",top:-10,left:12,background:"#1677ff",color:"#fff",fontSize:11,fontWeight:700,padding:"1px 8px",borderRadius:10},children:["#",l+1]}),(0,s.jsx)(d.Ay,{danger:!0,size:"small",icon:(0,s.jsx)(_.A,{}),onClick:()=>n(e.name),style:{position:"absolute",top:8,right:8,zIndex:1}}),(0,s.jsxs)(j.A,{gutter:[16,8],align:"middle",style:{marginTop:4},children:[(0,s.jsxs)(y.A,{flex:"auto",children:[(0,s.jsx)(i.A.Item,{name:[e.name,"roleId"],label:"文件角色",rules:[{required:!0}],style:{marginBottom:0},children:(0,s.jsx)(m.A,{placeholder:"选择文件角色",size:"small",options:eh.map(e=>{var l;return{label:"".concat(e.name," (").concat(r(G[null!=(l=e.processingType)?l:""]||"roles.reference"),")"),value:e.id}})})}),(0,s.jsx)(i.A.Item,{noStyle:!0,shouldUpdate:!0,children:l=>{let{getFieldValue:r}=l;return eR(ew(r(["fileRoles",e.name,"roleId"])))}})]}),(0,s.jsx)(y.A,{style:{width:90},children:(0,s.jsx)(i.A.Item,{name:[e.name,"order"],label:"排序",initialValue:l,style:{marginBottom:0},children:(0,s.jsx)(f.A,{type:"number",size:"small"})})})]})]},e.key)),(0,s.jsx)(d.Ay,{icon:(0,s.jsx)(E.A,{}),onClick:()=>t({order:e.length}),children:r("roles.addRole")})]})}})},{key:"prompt",label:"提示词角色 (".concat(t.length,"/").concat(eg.length,")"),children:(0,s.jsx)(i.A.List,{name:"promptRoles",children:(e,l)=>{let{add:o,remove:n}=l;return(0,s.jsxs)("div",{className:"flex flex-col gap-6 pt-4",children:[(0,s.jsx)(v.A,{size:"small",title:"已选提示词角色",className:"bg-[var(--colorBgHover)] border-[var(--borderColorStrong)]",styles:{header:{borderBottom:"1px solid var(--borderColorStrong)"}},children:eC(t,"prompt")}),0===e.length&&(0,s.jsx)(c.A,{description:"暂未添加提示词角色"}),e.map((e,l)=>(0,s.jsxs)(v.A,{size:"small",style:{border:"1px solid var(--colorBorderSecondary)",position:"relative"},children:[(0,s.jsxs)("div",{style:{position:"absolute",top:-10,left:12,background:"#722ed1",color:"#fff",fontSize:11,fontWeight:700,padding:"1px 8px",borderRadius:10},children:["#",l+1]}),(0,s.jsx)(d.Ay,{danger:!0,size:"small",icon:(0,s.jsx)(_.A,{}),onClick:()=>n(e.name),style:{position:"absolute",top:8,right:8,zIndex:1}}),(0,s.jsxs)(j.A,{gutter:[16,8],align:"middle",style:{marginTop:4},children:[(0,s.jsxs)(y.A,{flex:"auto",children:[(0,s.jsx)(i.A.Item,{name:[e.name,"roleId"],label:"提示词角色",rules:[{required:!0}],style:{marginBottom:0},children:(0,s.jsx)(m.A,{placeholder:"选择提示词角色",size:"small",options:eg.map(e=>{var l;return{label:"".concat(e.name," (").concat(r(J[null!=(l=e.executionType)?l:""]||"roles.reference"),")"),value:e.id}})})}),(0,s.jsx)(i.A.Item,{noStyle:!0,shouldUpdate:!0,children:l=>{let{getFieldValue:r}=l;return eR(ew(r(["promptRoles",e.name,"roleId"])))}})]}),(0,s.jsx)(y.A,{style:{width:90},children:(0,s.jsx)(i.A.Item,{name:[e.name,"order"],label:"排序",initialValue:l,style:{marginBottom:0},children:(0,s.jsx)(f.A,{type:"number",size:"small"})})})]})]},e.key)),(0,s.jsx)(d.Ay,{icon:(0,s.jsx)(E.A,{}),onClick:()=>o({order:e.length}),children:r("roles.addRole")})]})}})}]})}})]})})]})}}},e=>{e.O(0,[580,665,576,787,195,455,466,636,593,792],()=>e(e.s=23507)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[298],{16403:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/documents",function(){return r(19562)}])},19562:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ei});var s=r(65321),l=r(97109),a=r(26171),n=r(7576),o=r(35292),i=r(33442),c=r(17807),d=r(63455),u=r(11702),p=r(88762),m=r(85114),x=r(58569),h=r(84253),g=r(34052),f=r(68787),v=r(42700),j=r(2256),y=r(38770),w=r(38332),b=r(76506),A=r(50883),k=r(23718),S=r(23216),I=r(26619),C=r(8263),N=r(16285),T=r(8579),R=r(75548),E=r(7851),B=r(84742),z=r(29071),M=r(63552),F=r(26631),_=r(7225),D=r(83914),P=r(58209),G=r(38762),L=r(54746),W=r(93051),O=r(64068),q=r(64629),H=r(1310),V=r(67547),K=r(76830),U=r(6578),Q=r(48321);let{TextArea:X}=n.A,{Text:J}=o.A,Y=a.A;function Z(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)(J,{strong:!0,style:{color:n},children:r}),l&&(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:l})]})}function $(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 ee=null;function et(){null==ee||ee.listeners.forEach(e=>e())}let er={role_binding:(0,s.jsx)(S.A,{}),knowledge_retrieval:(0,s.jsx)(I.A,{}),file_understanding:(0,s.jsx)(C.A,{}),fact_extraction:(0,s.jsx)(N.A,{}),chapter_generation:(0,s.jsx)(T.A,{}),asset_generation:(0,s.jsx)(R.A,{}),validation:(0,s.jsx)(E.A,{}),formatting:(0,s.jsx)(B.A,{}),llm_review:(0,s.jsx)(z.A,{}),export_ready:(0,s.jsx)(M.A,{}),reference:(0,s.jsx)(R.A,{})},es={施工组织设计:(0,s.jsx)(E.A,{}),投标文件:(0,s.jsx)(M.A,{}),技术方案:(0,s.jsx)(N.A,{}),报告:(0,s.jsx)(F.A,{}),自定义:(0,s.jsx)(T.A,{})};function el(e){return[...new Set(e.map(e=>e.trim()).filter(Boolean))]}function ea(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)(i.A,{size:4,children:[(0,s.jsx)(_.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 en={role_binding:"角色配置绑定",knowledge_retrieval:"知识库检索",file_understanding:"多模态文件理解",fact_extraction:"LLM 事实抽取",chapter_generation:"LLM 章节生成",asset_generation:"多模态资源生成",validation:"规则校验",formatting:"格式化排版",llm_review:"LLM 审查优化",export_ready:"导出就绪",reference:"参考资源处理"},eo={"knowledge-base":"知识库","document-readiness":"生成准备度检查","quality-repair":"质量补写","export-gate":"导出门禁","context-memory":"项目上下文","final-format":"正式排版","multimodal-files":"多模态文件理解",tender_announcement:"招标公告"};function ei(){var e,t,r,a,o,R,_,ei;let ec=(0,Q.Vr)(),{message:ed}=c.A.useApp(),[eu]=d.A.useForm(),ep=(0,l.useRef)(null),[em,ex]=(0,l.useState)([]),[eh,eg]=(0,l.useState)("construction-organization-design"),[ef,ev]=(0,l.useState)([]),[ej,ey]=(0,l.useState)([]),[ew,eb]=(0,l.useState)([]),[eA,ek]=(0,l.useState)([]),[eS,eI]=(0,l.useState)(!1),[eC,eN]=(0,l.useState)(),[eT,eR]=(0,l.useState)(!0),[eE,eB]=(0,l.useState)(!1),[ez,eM]=(0,l.useState)(null),[eF,e_]=(0,l.useState)(""),[eD,eP]=(0,l.useState)([]),[eG,eL]=(0,l.useState)(null),[eW,eO]=(0,l.useState)(null),[eq,eH]=(0,l.useState)(""),[eV,eK]=(0,l.useState)(!1),[eU,eQ]=(0,l.useState)("idle"),[eX,eJ]=(0,l.useState)(null),[eY,eZ]=(0,l.useState)(null),[e$,e0]=(0,l.useState)({start:0,end:0}),[e1,e2]=(0,l.useState)([]),[e6,e5]=(0,l.useState)(!1),[e8,e3]=(0,l.useState)(!1),[e4,e7]=(0,l.useState)({}),e9=d.A.useWatch("projectRoleConfigId",eu),te=(0,l.useMemo)(()=>ej.find(e=>e.id===e9),[ej,e9]),tt=(0,l.useMemo)(()=>new Set(((null==te?void 0:te.fileRoles)||[]).map(e=>e.roleId)),[te]),tr=(0,l.useMemo)(()=>ef.filter(e=>"file"===e.type&&(!e9||tt.has(e.id))).map(e=>({label:e.name,value:e.id})),[ef,tt,e9]),ts=d.A.useWatch("fileBindingGroups",eu)||{},tl=(0,l.useMemo)(()=>{var e,t,r;return(null==(e=ew.find(e=>e.selected))?void 0:e.projectRoot)||(null==(t=ew.find(e=>e.isCurrent))?void 0:t.projectRoot)||(null==(r=ew[0])?void 0:r.projectRoot)||""},[ew]);(0,l.useEffect)(()=>{if(!e8||!e9)return;let e=eu.getFieldValue("fileBindingGroups")||{},t=Object.fromEntries(Object.entries(e).filter(e=>{let[t]=e;return tt.has(t)}));Object.keys(t).length!==Object.keys(e).length&&eu.setFieldValue("fileBindingGroups",t)},[eu,tt,e9,e8]),(0,l.useEffect)(()=>{if(e8){if(0===tr.length)return void eN(void 0);eC&&tr.some(e=>e.value===eC)||eN(tr[0].value)}},[eC,tr,e8]);let[ta,tn]=(0,l.useState)([]),[to,ti]=(0,l.useState)(null),[tc,td]=(0,l.useState)(null),[tu,tp]=(0,l.useState)("templates"),[tm,tx]=(0,l.useState)(!1),[th,tg]=(0,l.useState)("workflow"),[tf,tv]=(0,l.useState)(null),tj=(0,l.useRef)(null),ty=(0,l.useRef)(null),tw=(0,l.useRef)(0),tb=(0,l.useMemo)(()=>"activeGenDocId:".concat(tl||"default"),[tl]),tA=async()=>{try{eP((await (0,U.cQ)(tl||void 0)).documents)}catch(e){eP([])}};(0,l.useEffect)(()=>{let e=()=>{ee&&(tn(ee.flowSteps),ti(ee.activeFlowKey),eB(ee.loading),ee.documentId&&eL(ee.documentId),ee.draft&&eM(ee.draft),void 0!==ee.content&&e_(ee.content))},t=ee;return null==t||t.listeners.add(e),e(),()=>{null==t||t.listeners.delete(e)}},[]),(0,l.useEffect)(()=>{eR(!0),Promise.all([(0,U.Dl)().then(e=>{var t,r;ex(e.templates),eg(null!=(r=null==(t=e.templates[0])?void 0:t.id)?r:"construction-organization-design")}),(0,U.lv)().then(e=>{ev(e.roles),ey(e.configs)}),(0,U.dx)().then(e=>eb(e))]).catch(()=>ed.error(ec("common.error"))).finally(()=>eR(!1))},[ed,ec]),(0,l.useEffect)(()=>{tl&&(localStorage.removeItem("activeGenDocId"),tA())},[tl]),(0,l.useEffect)(()=>{if(0===eD.length)return;let e=localStorage.getItem(tb);if(!e)return;if(!eD.find(t=>t.id===e&&"generating"===t.status))return void localStorage.removeItem(tb);let t=setInterval(()=>{(async()=>{try{let{document:r}=await (0,U.v7)(e,!1,tl||void 0);await tA(),"generating"!==r.status&&(localStorage.removeItem(tb),clearInterval(t))}catch(e){clearInterval(t)}})()},3e3);return()=>clearInterval(t)},[eD]);let tk=(0,l.useMemo)(()=>em.find(e=>e.id===eh),[em,eh]),tS=ej.map(e=>({label:e.name,value:e.id})),tI=Math.max(0,ta.findIndex(e=>e.key===to)),tC=e=>{var t;return e?(null==(t=ef.find(t=>t.id===e))?void 0:t.name)||eo[e]||"未知角色":""},tN=e=>e.subtitle||e.roleName||tC(e.roleId)||en[e.type]||e.type,tT=e=>{var t,r,s;return e.promptName||((t=e.promptId)?(null==(r=ew.find(e=>e.id===t))?void 0:r.projectName)||(null==(s=ef.find(e=>e.id===t))?void 0:s.name)||eo[t]||"未知提示词":"")},tR=()=>{tw.current+=1,eH(""),eJ(null),eZ(null),e2([]),e5(!1),eK(!1),eQ("idle")},tE=async e=>{eL(e.id),eg(e.templateId);let t=tB(e.status);if(t||"failed"===e.status||"aborted"===e.status){tR(),td(e),eM(null),e_(""),eB(t),tg("workflow"),tx(!0);try{let{document:t}=await (0,U.v7)(e.id,!1,e.projectRoot||tl||void 0);tF(t),tB(t.status)?t_(t.id,t.projectRoot||e.projectRoot||tl||void 0):await tA()}catch(t){tF(e)}return}tg("editor"),tn([]),ti(null),tR();try{let{document:t}=await (0,U.v7)(e.id,!1,e.projectRoot||tl||void 0);eM(t.draft||null),e_(t.editedMarkdown||t.markdown)}catch(e){ed.error(ec("common.error"))}tx(!0)},tB=e=>"completed"!==e&&"warning"!==e&&"failed"!==e&&"aborted"!==e,tz=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eE;(null==ee?void 0:ee.loading)&&(ee.flowSteps=e,ee.activeFlowKey=t,ee.loading=r,et())},tM=e=>{var t,r,l,a,n;let o=e.executionStages||(null==(t=e.draft)?void 0:t.executionStages)||[];if(o.length>0){let t=o.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":"fallback"===a?"warning":"finish";return{key:"".concat(t.type,"-").concat(r),title:t.title||en[t.type]||t.type,subtitle:tN(t),description:t.message||"",status:n,icon:"role_binding"===(l=t.type)?(0,s.jsx)(S.A,{}):"knowledge_retrieval"===l?(0,s.jsx)(I.A,{}):"file_understanding"===l?(0,s.jsx)(C.A,{}):"fact_extraction"===l?(0,s.jsx)(N.A,{}):"chapter_generation"===l?(0,s.jsx)(T.A,{}):"llm_review"===l?(0,s.jsx)(z.A,{}):"validation"===l?(0,s.jsx)(E.A,{}):"formatting"===l?(0,s.jsx)(B.A,{}):"export_ready"===l?(0,s.jsx)(M.A,{}):(0,s.jsx)(F.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:tT(e)?"提示词:".concat(tT(e)):tN(e),status:t}]:a.slice(0,8).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&&t.length>0&&(null==(r=t.at(-1))?void 0:r.status)==="finish"&&(t[t.length-1]={...t[t.length-1],status:"process"});let i="generating"===e.status?(null==(l=t.at(-1))?void 0:l.key)||"prepare":"failed"===e.status||"aborted"===e.status?(null==(a=t.find(e=>"error"===e.status))?void 0:a.key)||(null==(n=t.at(-1))?void 0:n.key)||"prepare":"done";return{steps:t,activeKey:i}}return{steps:[],activeKey:null}},tF=e=>{td(e);let{steps:t,activeKey:r}=tM(e);tn(t),ti(r),eB(tB(e.status)),tz(t,r,tB(e.status)),("failed"===e.status||"aborted"===e.status)&&tg("workflow"),("completed"===e.status||"warning"===e.status)&&e.draft&&(eM(e.draft),e_(e.editedMarkdown||e.markdown),tg("editor"),tn([]),ti(null))},t_=(e,t)=>{tj.current&&clearInterval(tj.current),tj.current=setInterval(()=>{(async()=>{try{let{document:r}=await (0,U.v7)(e,!0,t||tl||void 0);tF(r),await tA(),tB(r.status)||(tj.current&&clearInterval(tj.current),tj.current=null,localStorage.removeItem(tb))}catch(e){}})()},2e3)};(0,l.useEffect)(()=>()=>{tj.current&&(clearInterval(tj.current),tj.current=null),ty.current&&(clearTimeout(ty.current),ty.current=null)},[]),(0,l.useEffect)(()=>{if(!eE||!to)return;let e=window.setInterval(()=>tn(e=>{let t=e.map(e=>{if(e.key!==to||"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,to),t}),1400);return()=>window.clearInterval(e)},[to,eE]);let tD=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";eI(!0);try{let t=await (0,U.Fi)(e,tl||void 0);ek(ea(t.nodes))}catch(e){ed.error("知识库文件加载失败")}finally{eI(!1)}},tP=async e=>{var t;let r=String(null!=(t=e.key)?t:"");if(r)try{let e=await (0,U.Fi)(r,tl||void 0),t=ea(e.nodes),s=e=>e.map(e=>e.key===r?{...e,children:t}:e.children?{...e,children:s(e.children)}:e);ek(e=>s(e))}catch(e){ed.error("加载子文件夹失败")}},tG=e=>{var t,r,s;let l=null!=e?e:{id:"tpl-".concat(Date.now()),name:"",description:"",category:"自定义",outputTitle:"",projectRoleConfigId:void 0,chapters:[],fileBindings:[]};eu.resetFields(),eu.setFieldsValue({...l,fileBindingGroups:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce((e,t)=>(t.roleId&&t.filePath&&(e[t.roleId]=el([...e[t.roleId]||[],t.filePath])),e),{})}(l.fileBindings)}),eN(null==(s=ej.find(e=>e.id===l.projectRoleConfigId))||null==(r=s.fileRoles)||null==(t=r[0])?void 0:t.roleId),tD(),e3(!0)},tL=(e,t)=>{let r=eu.getFieldValue("fileBindingGroups")||{};eu.setFieldValue("fileBindingGroups",{...r,[e]:el(t)})},tW=async()=>{try{var e;await eu.validateFields();let t=eu.getFieldsValue(!0),r=new Set(((null==(e=ej.find(e=>e.id===t.projectRoleConfigId))?void 0:e.fileRoles)||[]).map(e=>e.roleId)),s=t.fileBindingGroups||{},l=Object.entries(s).filter(e=>{let[t]=e;return 0===r.size||r.has(t)}).flatMap(e=>{let[t,r]=e;return el(r||[]).map(e=>({roleId:t,filePath:e}))}),{fileBindingGroups:a,...n}=t,o={...n,chapters:[],fileBindings:l},i=await (0,U.l2)(o);ex(i.templates),eg(i.template.id),e3(!1),await tA(),ed.success(ec("common.success"))}catch(e){e instanceof Error&&ed.error(e.message)}},tO=async e=>{try{let t=await (0,U.bV)(e);ex(t.templates),eg(t.template.id),ed.success(ec("common.success"))}catch(e){ed.error(ec("common.error"))}},tq=async e=>{try{var t,r;let s=await (0,U.h0)(e);ex(s.templates),eg(null!=(r=null==(t=s.templates[0])?void 0:t.id)?r:""),ed.success(ec("common.success"))}catch(e){ed.error(ec("common.error"))}},tH=async e=>{tv(e),eg(e),eL(null),eM(null),e_(""),tR(),tg("workflow"),tx(!0),tp("drafts"),eB(!0),ti("prepare"),tn([{key:"prepare",title:"正在准备运行模板",description:"正在校验模板绑定的文件角色、提示词角色和资料索引,校验通过后会自动开始生成。",status:"process",icon:(0,s.jsx)(D.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"process"},{key:"start",title:"准备生成任务",status:"wait"}]}]);try{let{validation:t}=await (0,U.SM)(e,tl||void 0);e7(r=>({...r,[e]:t}));let r=t.issues.filter(e=>"error"===e.level);if(r.length>0){eB(!1),ti("prepare"),tn([{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"}]}]),ed.warning("模板运行前检查未通过,请先处理阻断项");return}t.issues.length>0&&ed.warning("模板存在非阻断警告,已继续运行"),tn([{key:"prepare",title:"模板检查通过,正在创建生成任务",description:"已确认模板绑定资源可用,正在启动后台生成任务。",status:"process",icon:(0,s.jsx)(D.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"finish"},{key:"start",title:"准备生成任务",status:"process"}]}]),await tU(e)}catch(t){let e=t instanceof Error?t.message:"模板运行前检查失败";eB(!1),tn([{key:"prepare",title:"模板运行准备失败",description:e,status:"error",icon:(0,s.jsx)(G.A,{}),subSteps:[{key:"validate",title:"模板运行前检查",status:"error"},{key:"start",title:"准备生成任务",status:"wait"}]}]),ed.error(e)}finally{tv(t=>t===e?null:t)}},tV=async e=>{try{await (0,U.QG)(e.id,e.projectRoot||tl||void 0),eG===e.id&&(eL(null),eM(null),e_("")),await tA(),ed.success(ec("common.success"))}catch(e){ed.error(ec("common.error"))}},tK=async(e,t)=>{let r=Date.now(),s=0,l=Date.now();for(;;){let a;if(null==t?void 0:t.aborted)throw Error("用户中止");let n=new AbortController;t&&(t.pollController=n);try{({document:a}=await (0,U.v7)(e,!0,tl||void 0,n.signal))}finally{(null==t?void 0:t.pollController)===n&&(t.pollController=void 0)}if(tF(a),a.updatedAt!==s&&(s=a.updatedAt,l=Date.now()),("completed"===a.status||"warning"===a.status)&&a.draft)return a;if("failed"===a.status||"aborted"===a.status)throw Error(a.error||("aborted"===a.status?"生成已中止":"生成失败"));if(Date.now()-r>75e5||Date.now()-l>96e4)throw Error("生成任务疑似卡住,请点击继续生成或重新生成");await new Promise(e=>window.setTimeout(e,1500))}},tU=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eh;if(!e)return;if((null==ee?void 0:ee.aborted)&&(ee=null),null==ee?void 0:ee.loading){tn(ee.flowSteps),ti(ee.activeFlowKey),eB(!0);return}if(!tl)return void ed.error("未识别当前项目,请先选择或打开项目后再生成文件");eB(!0);let t=ta.length>0?ta:[{key:"prepare",title:"正在创建生成任务",description:"系统正在创建后台生成任务,请稍候。",status:"process",icon:(0,s.jsx)(D.A,{}),subSteps:[{key:"start",title:"准备生成任务",status:"process"}]}],r=to||"prepare";tn(t),ti(r);let l=(0,U.OX)({templateId:e,projectRoot:tl});ee={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(tb,e.documentId),eL(e.documentId),(null==ee?void 0:ee.promise)===l&&(ee.documentId=e.documentId)),await tA();let t=e.documentId?await tK(e.documentId,(null==ee?void 0:ee.promise)===l?ee: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))&&eL(e.documentId||t.id),a.forEach(e=>window.clearTimeout(e)),eM(r),e_((null==t?void 0:t.editedMarkdown)||(null==t?void 0:t.markdown)||r.markdown),(null==ee?void 0:ee.promise)===l&&(ee.draft=r,ee.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:eh,title:r.title,requirement:r.requirement,projectRoot:r.projectRoot||tl,projectId:r.projectId,markdown:r.markdown,status:r.validationIssues.some(e=>"error"===e.level||"warning"===e.level)||!r.exportGate.passed?"warning":"completed",draft:r,executionStages:r.executionStages,assets:r.assets||[],createdAt:r.generatedAt,updatedAt:Date.now()},{steps:n}=tM(s);tn(n),tz(n,"done",!1),ti("done"),(null==ee?void 0:ee.promise)===l&&(ee.activeFlowKey="done",ee.loading=!1,et(),ee=null),localStorage.removeItem(tb),await tA(),ed.success(ec("common.success")),window.setTimeout(()=>{var e;return null==(e=ep.current)?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},200)}catch(r){localStorage.removeItem(tb);let e=r instanceof Error?r.message:ec("common.error"),t=/用户中止|abort|aborted/i.test(e);t||tn(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,to,!1),r}),(null==ee?void 0:ee.promise)===l&&(ee.loading=!1,ee.error=e,et(),ee=null),await tA().catch(()=>void 0),t||ed.error(e)}finally{a.forEach(e=>window.clearTimeout(e)),eB(!1),(null==ee?void 0:ee.promise)===l&&(ee.loading=!1,et())}},tQ=(0,l.useRef)(!1);(0,l.useEffect)(()=>(ty.current&&(clearTimeout(ty.current),ty.current=null),!tm||"workflow"!==th||tf||eG||tQ.current||(null==ee?void 0:ee.loading)||null==tk||!tk.projectRoleConfigId||(tQ.current=!0,ty.current=setTimeout(()=>{ty.current=null,tm&&"workflow"===th&&!eG&&eh==eh&&tU()},300)),tm||(tQ.current=!1),()=>{ty.current&&(clearTimeout(ty.current),ty.current=null)}),[tm,th,tf,eG,tk,eh]);let tX=async e=>{try{eL(e.id),eg(e.templateId),tg("workflow"),tx(!0),eB(!0);let t=await (0,U.UQ)(e.id,e.projectRoot||tl||void 0);localStorage.setItem(tb,t.documentId),await tA();let r=await tK(t.documentId);r.draft&&(eM(r.draft),e_(r.editedMarkdown||r.markdown||r.draft.markdown),tg("editor")),localStorage.removeItem(tb),await tA(),ed.success("已继续生成并完成")}catch(e){ed.error(e instanceof Error?e.message:"继续生成失败")}finally{eB(!1)}},tJ=async e=>{if((null==ee?void 0:ee.loading)&&ee.documentId===e.id){var t;ee.aborted=!0,null==(t=ee.pollController)||t.abort(),ee.loading=!1,ee.error="用户中止",et(),ee=null,eB(!1)}localStorage.removeItem(tb),tj.current&&(clearInterval(tj.current),tj.current=null);try{await (0,U.r)(e.id,e.projectRoot||tl||void 0),ed.success("已中止生成任务")}catch(e){ed.info("任务已不在运行,已刷新状态")}finally{await tA(),eG===e.id&&(eL(null),td(null),eM(null),e_(""))}},tY=async e=>{if(ez){eO(e);try{ez.exportGate.passed||ed.warning("导出门禁存在风险项,已允许导出,请下载后人工复核。");let t={documentId:eG||void 0,title:ez.title,markdown:eF,format:e,enforceGate:!1,exportGate:ez.exportGate,useClientMarkdown:!0,projectRoot:ez.projectRoot||tl||void 0},r=await (0,U.UE)(t);((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)})(r,"".concat(ez.title,".").concat("markdown"===e?"md":e),{markdown:"text/markdown;charset=utf-8",html:"text/html;charset=utf-8",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}[e])}catch(e){ed.error(e instanceof Error?e.message:ec("common.error"))}finally{eO(null)}}},tZ=async()=>{if(ez)try{if(eG)await (0,U.a6)(eG,{editedMarkdown:eF,markdown:eF},ez.projectRoot||tl||void 0);else{let e=await (0,U.Af)({...ez,markdown:eF});eM(e.draft)}await tA(),ed.success(ec("common.success"))}catch(e){ed.error(ec("common.error"))}},t$=(e,t)=>{e2(r=>[{id:"".concat(Date.now()),content:e,prompt:t,createdAt:Date.now()},...r].slice(0,12))},t0=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&eH(""),eJ(null),eZ(null),e0({start:0,end:0})},t1=(e,t)=>{var r,s;return{title:(null==ez?void 0:ez.title)||"未命名文档",markdown:t,instruction:e,facts:null==ez||null==(r=ez.structuredFacts)?void 0:r.map(e=>"".concat(e.key,": ").concat(e.value)),chapters:null==ez||null==(s=ez.chapters)?void 0:s.map(e=>e.title),...(()=>{let e=e$.start,t=e$.end;return t>e?{selection:{start:e,end:t,text:eF.slice(e,t)},cursorOffset:e}:{cursorOffset:e}})()}},t2=async()=>{let e=eq.trim();if(!ez||!e||eV)return;let t=tw.current+1;tw.current=t,eK(!0),eQ("planning"),eZ(null);try{let r=await (0,U.Gi)({mode:"plan",...t1(e,eF)});if(tw.current!==t||eG!=eG)return;if(!r.plan)throw Error("AI 未返回修改计划");eJ(r.plan)}catch(e){tw.current===t&&ed.error(e instanceof Error?e.message:ec("common.error"))}finally{tw.current===t&&(eK(!1),eQ("idle"))}},t6=async e=>{let t=eq.trim();if(!ez||!t||eV)return;let r=tw.current+1;tw.current=r,eK(!0),eQ("applying");try{let s=await (0,U.Gi)({mode:"apply",...t1(t,eF),plan:e});if(tw.current!==r||eG!=eG)return;if(!s.markdown)throw Error("AI 未返回修改结果");eZ({plan:s.plan||e,markdown:s.markdown,beforeSnippet:s.beforeSnippet,afterSnippet:s.afterSnippet,summary:s.summary,changedChars:s.changedChars,prompt:t,before:eF})}catch(e){tw.current===r&&ed.error(e instanceof Error?e.message:ec("common.error"))}finally{tw.current===r&&(eK(!1),eQ("idle"))}};if(eT)return(0,s.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,s.jsx)(p.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,s.jsx)(p.A,{active:!0,paragraph:{rows:2}}),(0,s.jsx)(p.A,{active:!0,paragraph:{rows:8}})]});let t5="workflow"===th?"工作流:".concat((null==tk?void 0:tk.name)||"选择模板"):"编辑:".concat((null==ez?void 0:ez.title)||(null==tk?void 0:tk.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)(S.A,{className:"text-[var(--colorAccent)]"}),ec("documents.title")]}),(0,s.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)]",children:ec("documents.description")})]}),(0,s.jsx)(m.Ay,{type:"primary",icon:(0,s.jsx)(L.A,{}),onClick:()=>tG(),className:"shadow-none rounded-lg",children:ec("documents.newTemplate")})]}),(0,s.jsxs)("div",{className:"bg-[var(--colorBgContainer)] rounded-2xl shadow-sm overflow-hidden",children:[(0,s.jsx)(x.A,{items:[{key:"templates",label:(0,s.jsxs)("span",{className:"px-4",children:["模板库 ",(0,s.jsx)(u.A,{className:"ml-2 border-0 bg-[var(--colorFillAlter)]",children:em.length})]})},{key:"drafts",label:(0,s.jsxs)("span",{className:"px-4",children:["生成记录 ",(0,s.jsx)(u.A,{className:"ml-2 border-0 bg-[var(--colorFillAlter)]",children:eD.length})]})}],activeKey:tu,onChange:tp,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"===tu?0===em.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)(h.A,{description:(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:ec("common.noData")})})}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4",children:em.map(e=>(0,s.jsxs)("div",{className:"group flex items-center p-4 rounded-2xl transition-all cursor-pointer ".concat(eh===e.id?"bg-[var(--colorBgSelected)] shadow-md":"bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] shadow-sm hover:shadow-md"),onClick:()=>eg(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=es[e]||(0,s.jsx)(F.A,{});return(0,s.jsx)("span",{style:{color:t?"var(--colorAccent)":"var(--colorTextSecondary)",fontSize:16,marginTop:2,flexShrink:0},children:r})}(e.category,eh===e.id),(0,s.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate",children:e.name}),eh===e.id&&(0,s.jsx)(u.A,{color:"blue",className:"border-0 m-0 shrink-0",children:"当前选中"}),(0,s.jsx)(u.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}),e4[e.id]&&(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"flex flex-col items-start gap-2",children:[(0,s.jsxs)("div",{className:"inline-flex items-center gap-2 p-1.5 px-3 rounded-lg border text-xs ".concat(e4[e.id].issues.some(e=>"error"===e.level)?"border-red-200 bg-red-50/50":e4[e.id].issues.length?"border-yellow-200 bg-yellow-50/50":"border-green-200 bg-green-50/50"),children:[(0,s.jsx)("span",{className:"font-medium",children:e4[e.id].issues.some(e=>"error"===e.level)?"检查未通过":e4[e.id].issues.length?"存在警告":"检查通过"}),(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"|"}),(0,s.jsxs)("span",{children:["文件角色 ",e4[e.id].fileDiagnostics.length]}),(0,s.jsxs)("span",{children:["提示词 ",e4[e.id].promptDiagnostics.length]}),!e4[e.id].issues.some(e=>"error"===e.level)&&e4[e.id].issues.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:()=>{tH(e.id)},children:"忽略警告并运行"})]})]}),e4[e.id].promptDiagnostics.length>0&&(0,s.jsxs)("div",{className:"flex max-w-full flex-col gap-1 rounded-lg border border-[var(--borderColor)] bg-[var(--colorFillQuaternary)] px-3 py-2 text-xs text-[var(--colorTextSecondary)]",children:[(0,s.jsx)("span",{className:"font-medium text-[var(--colorText)]",children:"实际提示词绑定"}),e4[e.id].promptDiagnostics.slice(0,3).map(e=>(0,s.jsxs)("div",{className:"max-w-full truncate",title:"".concat(e.roleName||e.roleId," -> ").concat(e.promptId,"\n").concat(e.contentPreview||""),children:[e.roleName||e.roleId," → ",e.promptId," \xb7 ",e.promptTitle||"未命名提示词"," \xb7 ",e.contentLength," 字符",e.contentHash?" \xb7 ".concat(e.contentHash):""]},"".concat(e.roleId,"-").concat(e.promptId))),e4[e.id].promptDiagnostics.length>3&&(0,s.jsxs)("span",{children:["另有 ",e4[e.id].promptDiagnostics.length-3," 个提示词绑定"]})]})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-nowrap items-center gap-2 whitespace-nowrap transition-opacity ".concat(eh===e.id?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(m.Ay,{size:"small",onClick:t=>{t.stopPropagation(),tG(e)},className:"rounded-md",children:"配置"}),(0,s.jsx)(m.Ay,{size:"small",icon:(0,s.jsx)(W.A,{}),onClick:t=>{t.stopPropagation(),tO(e.id)},className:"rounded-md"}),(0,s.jsx)(Y,{title:ec("documents.deleteTemplateConfirm"),onConfirm:t=>{null==t||t.stopPropagation(),tq(e.id)},children:(0,s.jsx)(m.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(P.A,{}),onClick:e=>e.stopPropagation(),className:"rounded-md"})}),(0,s.jsx)(m.Ay,{size:"small",type:"primary",icon:tf===e.id?(0,s.jsx)(D.A,{}):(0,s.jsx)(O.A,{}),loading:tf===e.id,disabled:!!tf&&tf!==e.id,onClick:t=>{t.stopPropagation(),tH(e.id)},className:"min-w-[72px] rounded-md justify-center",children:tf===e.id?"准备中":"运行"})]})]},e.id))}):0===eD.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)(h.A,{description:(0,s.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:ec("common.noData")})})}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4",children:eD.slice(0,15).map((e,t)=>{var r,l,a,n,o,i,c,d,p,x;let h,g;return(0,s.jsxs)("div",{className:"group flex items-center gap-4 p-4 rounded-2xl transition-all cursor-pointer ".concat(eG===e.id?"bg-[var(--colorBgSelected)] shadow-md":"bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] shadow-sm hover:shadow-md"),onClick:()=>{tE(e)},children:[(0,s.jsx)("div",{className:"mt-1",children:"completed"===e.status?(0,s.jsx)(B.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?(0,s.jsx)(E.A,{className:"text-xl text-[var(--colorWarning)]"}):(0,s.jsx)(q.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)(u.A,{className:"border-0 bg-[var(--colorFillSecondary)] m-0 shrink-0",children:["#",t+1]}),(0,s.jsx)(u.A,{color:"completed"===(h=e.status)?"success":"warning"===h?"warning":"failed"===h?"error":"aborted"===h?"default":"processing",className:"border-0 m-0 shrink-0",children:"completed"===(g=e.status)?"已完成":"warning"===g?"需复核":"failed"===g?"失败":"aborted"===g?"已中止":"生成中"})]}),(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)(H.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)&&(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(eG===e.id?"opacity-100":"opacity-0 group-hover:opacity-100"),onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(m.Ay,{size:"small",type:"primary",icon:tB(e.status)?(0,s.jsx)(q.A,{spin:!0}):(0,s.jsx)(O.A,{}),onClick:t=>{t.stopPropagation(),tE(e)},className:"min-w-[72px] rounded-md justify-center",children:"打开"}),tB(e.status)&&(0,s.jsx)(Y,{title:"确定中止此生成任务?",onConfirm:t=>{null==t||t.stopPropagation(),tJ(e)},children:(0,s.jsx)(m.Ay,{size:"small",danger:!0,onClick:e=>e.stopPropagation(),className:"rounded-md",children:"中止"})}),("failed"===e.status||"aborted"===e.status||"warning"===e.status&&!!(null==(p=e.checkpointChapters)?void 0:p.length)&&/继续生成|重新生成|中断|卡住|未完成/u.test(e.error||(null==(x=e.warningIssues)?void 0:x.join(";"))||""))&&(0,s.jsx)(m.Ay,{size:"small",onClick:t=>{t.stopPropagation(),tX(e)},className:"rounded-md",children:"继续"}),(0,s.jsx)(Y,{title:"确认删除?",onConfirm:t=>{null==t||t.stopPropagation(),tV(e)},children:(0,s.jsx)(m.Ay,{size:"small",danger:!0,icon:(0,s.jsx)(P.A,{}),onClick:e=>e.stopPropagation(),className:"rounded-md"})})]})]},e.id)})})})]}),(0,s.jsx)(g.A,{title:t5,open:tm,onClose:()=>{tx(!1),tj.current&&(clearInterval(tj.current),tj.current=null)},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:ez?(0,s.jsxs)(i.A,{wrap:!0,children:[(0,s.jsx)(m.Ay,{icon:(0,s.jsx)(V.A,{}),disabled:eV,onClick:()=>{tZ()},children:ec("documents.saveDraft")}),(0,s.jsx)(m.Ay,{icon:(0,s.jsx)(K.A,{}),disabled:eV,loading:"markdown"===eW,onClick:()=>{tY("markdown")},children:"MD"}),(0,s.jsx)(m.Ay,{disabled:eV,loading:"html"===eW,onClick:()=>{tY("html")},children:"HTML"}),(0,s.jsx)(m.Ay,{disabled:eV,loading:"docx"===eW,onClick:()=>{tY("docx")},children:"DOCX"}),(0,s.jsx)(m.Ay,{type:"primary",disabled:eV,loading:"pdf"===eW,onClick:()=>{tY("pdf")},children:"PDF"})]}):eE&&"workflow"===th?(0,s.jsx)(m.Ay,{danger:!0,onClick:()=>{(async()=>{if(eG&&await (0,U.r)(eG,tl||void 0).catch(()=>void 0),ee){var e;ee.aborted=!0,null==(e=ee.pollController)||e.abort(),ee.loading=!1,ee.error="用户中止",et(),ee=null}localStorage.removeItem(tb),tj.current&&(clearInterval(tj.current),tj.current=null),eB(!1),tn([]),ti(null),tx(!1),await tA(),ed.info("已中止生成任务")})()},children:"中止任务"}):void 0,children:(0,s.jsxs)($,{style:{width:"100%"},gap:16,children:["workflow"===th&&ta.length>0&&(0,s.jsx)($,{gap:10,children:ta.map((e,t)=>{let r;return(0,s.jsxs)("div",{style:{display:"flex",gap:10,padding:10,border:"1px solid var(--colorBorderSecondary)",borderRadius:10,background:t===tI?"var(--colorFillAlter)":"var(--colorBgContainer)"},children:[(0,s.jsx)("span",{children:"process"===e.status?(0,s.jsx)(D.A,{}):"warning"===e.status?(0,s.jsx)(E.A,{style:{color:"var(--colorWarning)"}}):e.icon}),(0,s.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,s.jsxs)(i.A,{wrap:!0,children:[(0,s.jsx)(J,{strong:!0,children:e.title}),(0,s.jsx)(u.A,{color:"finish"===e.status?"success":"error"===e.status?"error":"warning"===e.status?"warning":"process"===e.status?"processing":"default",children:"warning"===(r=e.status)?"finish":r})]}),(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12,whiteSpace:"pre-wrap"},children:(0,s.jsxs)("div",{children:[e.subtitle&&(0,s.jsx)("div",{style:{marginBottom:4},children:(0,s.jsx)(u.A,{children:e.subtitle})}),(0,s.jsx)("div",{children:e.description}),(0,s.jsx)("div",{style:{marginTop:4},children:e.subSteps.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)(D.A,{}):"finish"===t?(0,s.jsx)(B.A,{}):"warning"===t?(0,s.jsx)(E.A,{style:{color:"var(--colorWarning)"}}):"error"===t?(0,s.jsx)(P.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.key)})}),"workflow"===th&&(null==tc?void 0:tc.partialChapters)&&tc.partialChapters.length>0&&(0,s.jsx)(f.A,{size:"small",title:"章节进度",extra:(0,s.jsxs)(u.A,{color:"blue",children:[tc.partialChapters.filter(e=>"completed"===e.status).length,"/",tc.partialChapters.length]}),children:(0,s.jsx)($,{gap:6,style:{width:"100%"},children:tc.partialChapters.map(e=>(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:8,fontSize:12},children:[(0,s.jsx)(J,{ellipsis:!0,style:{maxWidth:480},children:e.title}),(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(u.A,{color:"failed"===e.status?"error":"success",children:"failed"===e.status?"失败":"完成"}),(0,s.jsxs)(J,{type:"secondary",children:[e.chars.toLocaleString()," 字"]})]})]},e.id))})}),"workflow"===th&&(null==tc||null==(t=tc.draft)||null==(e=t.exportGate)?void 0:e.passed)===!1&&(0,s.jsx)(Z,{type:"error",title:"生成已完成,但导出门禁未通过",children:"阻断项:".concat((null==(r=tc.draft.exportGate.blockingIssues)?void 0:r.slice(0,6).map(e=>e.message).join(";"))||tc.draft.exportGate.checklist.filter(e=>!e.passed).map(e=>e.label).join(";")||"存在阻断级校验错误","。可点击继续生成触发自动修复,或在“校验”页查看完整问题。")}),"workflow"===th&&(null==tc||null==(a=tc.reviewMetadata)?void 0:a.diagnostics)&&(0,s.jsx)(Z,{type:"info",title:"后台自动优化",children:"策略:".concat(tc.reviewMetadata.diagnostics.strategy.mode,";LLM 调用 ").concat(tc.reviewMetadata.diagnostics.llm.calls," 次;噪声过滤 ").concat((null==(o=tc.reviewMetadata.diagnostics.evidence)?void 0:o.filteredNoise)||0," 条;质量门禁 阻断").concat((null==(R=tc.reviewMetadata.diagnostics.quality)?void 0:R.blockingCount)||0,"/重要").concat((null==(_=tc.reviewMetadata.diagnostics.quality)?void 0:_.importantCount)||0,"/轻微").concat((null==(ei=tc.reviewMetadata.diagnostics.quality)?void 0:ei.minorCount)||0,";自动限流调整 ").concat(tc.reviewMetadata.diagnostics.llm.limitAdjustments," 次。审查与诊断信息仅用于系统修复,不会写入正文或导出文件。")}),"workflow"===th&&eE&&0===ta.length&&(0,s.jsxs)("div",{style:{textAlign:"center",padding:40},children:[(0,s.jsx)(v.A,{}),(0,s.jsx)("div",{style:{marginTop:12,color:"var(--colorTextSecondary)"},children:"正在准备生成…"})]}),ez&&(0,s.jsx)("div",{ref:ep,children:(0,s.jsx)(x.A,{items:[{key:"edit",label:ec("documents.edit"),children:(0,s.jsxs)($,{gap:16,style:{width:"100%"},children:[(0,s.jsx)(X,{rows:28,value:eF,disabled:eV,onSelect:e=>{var t,r,s;return e0({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;e_(e.target.value),eJ(null),eZ(null),e0({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)($,{gap:16,style:{width:"100%"},children:[(0,s.jsxs)(i.A,{align:"start",style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(i.A,{size:6,children:[(0,s.jsx)(z.A,{style:{color:"var(--colorAccent)"}}),(0,s.jsx)(J,{strong:!0,children:"精准修改"}),(0,s.jsx)(u.A,{color:"blue",children:"AI 辅助"})]}),(0,s.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:"针对当前编辑内容补充更具体的要求,AI 会保留文档结构并按你的提示细化修改。"})]}),(0,s.jsxs)(m.Ay,{size:"small",icon:(0,s.jsx)(H.A,{}),onClick:()=>e5(e=>!e),disabled:0===e1.length,children:["历史版本 ",e1.length>0?e1.length:""]})]}),(0,s.jsx)(Z,{type:"info",title:"系统只负责识别修改范围,不改写你的提示词;选中文字后优先只改选区,没有选区时按光标所在小节/章节定位。"}),(0,s.jsx)(X,{rows:4,value:eq,disabled:eV,onChange:e=>{eH(e.target.value),eJ(null),eZ(null)},placeholder:"例如:写细一点;润色这段;第七章补充高处作业和临电安全措施;把安全检查频次改成每周一次。"}),(0,s.jsxs)(i.A,{wrap:!0,style:{width:"100%",justifyContent:"space-between"},children:[(0,s.jsx)(i.A,{wrap:!0,children:["写细一点","更专业","只润色选区","补充可执行措施"].map(e=>(0,s.jsx)(m.Ay,{size:"small",disabled:eV,onClick:()=>eH(t=>t?"".concat(t,";").concat(e):e),children:e},e))}),(0,s.jsx)(m.Ay,{type:"primary",icon:(0,s.jsx)(z.A,{}),loading:eV&&"planning"===eU,disabled:!eq.trim()||eV,onClick:()=>{t2()},children:"识别修改范围"})]}),eX&&!eY&&(0,s.jsx)(f.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorAccent)"},children:(0,s.jsxs)($,{gap:8,style:{width:"100%"},children:[(0,s.jsxs)(i.A,{wrap:!0,children:[(0,s.jsx)(u.A,{color:"purple",children:eX.scope}),(0,s.jsx)(u.A,{color:"blue",children:eX.action}),(0,s.jsxs)(u.A,{color:eX.confidence>=.8?"green":"orange",children:["置信度 ",Math.round(100*eX.confidence),"%"]}),eX.targetTitle&&(0,s.jsx)(J,{strong:!0,children:eX.targetTitle})]}),(0,s.jsx)(J,{children:eX.summary}),(0,s.jsx)(J,{type:"secondary",style:{fontSize:12},children:"将按你的原始提示词执行,不添加额外编辑任务。"}),(0,s.jsxs)(i.A,{children:[(0,s.jsx)(m.Ay,{type:"primary",loading:eV&&"applying"===eU,onClick:()=>{t6(eX)},children:"执行并预览"}),(0,s.jsx)(m.Ay,{disabled:eV,onClick:()=>eJ(null),children:"取消"})]})]})}),eY&&(0,s.jsx)(f.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorSuccess)"},children:(0,s.jsxs)($,{gap:8,style:{width:"100%"},children:[(0,s.jsxs)(i.A,{wrap:!0,children:[(0,s.jsx)(u.A,{color:"green",children:"修改预览"}),(0,s.jsx)(J,{children:eY.summary||eY.plan.summary}),(0,s.jsxs)(u.A,{children:[eY.changedChars&&eY.changedChars>0?"+".concat(eY.changedChars):eY.changedChars," 字符"]})]}),(0,s.jsxs)(j.A,{gutter:12,children:[(0,s.jsxs)(y.A,{span:12,children:[(0,s.jsx)(J,{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:eY.beforeSnippet||"无片段预览"})]}),(0,s.jsxs)(y.A,{span:12,children:[(0,s.jsx)(J,{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:eY.afterSnippet||"无片段预览"})]})]}),(0,s.jsxs)(i.A,{children:[(0,s.jsx)(m.Ay,{type:"primary",onClick:()=>{eY&&(t$(eY.before,eY.prompt),e_(eY.markdown),t0(!0),ed.success("已应用精准修改"))},children:"应用到文档"}),(0,s.jsx)(m.Ay,{onClick:()=>eZ(null),children:"返回计划"}),(0,s.jsx)(m.Ay,{danger:!0,onClick:()=>{eJ(null),eZ(null)},children:"放弃"})]})]})}),e6&&(0,s.jsx)("div",{style:{borderTop:"1px solid var(--colorBorderSecondary)",paddingTop:12},children:(0,s.jsx)(w.A,{size:"small",dataSource:e1,locale:{emptyText:"暂无历史版本"},renderItem:e=>(0,s.jsx)(w.A.Item,{actions:[(0,s.jsx)(m.Ay,{size:"small",disabled:eV,onClick:()=>{t$(eF,"恢复前版本"),e_(e.content),t0(!0),ed.success("已恢复历史版本")},children:"恢复"},"restore")],children:(0,s.jsx)(w.A.Item.Meta,{title:(0,s.jsxs)(i.A,{children:[(0,s.jsx)(J,{children:new Date(e.createdAt).toLocaleString()}),(0,s.jsx)(u.A,{children:e.prompt})]}),description:(0,s.jsx)(J,{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:[ez.chapters.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(J,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["章节 (",ez.chapters.length,")"]}),(0,s.jsx)(w.A,{size:"small",dataSource:ez.chapters,renderItem:e=>(0,s.jsx)(w.A.Item,{children:(0,s.jsx)(w.A.Item.Meta,{title:e.title,description:"证据: ".concat(e.evidence.length," \xb7 缺失: ").concat(e.missingFacts.length)})})})]}),ez.structuredFacts.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(J,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["结构化事实 (",ez.structuredFacts.length,")"]}),(0,s.jsx)(b.A,{size:"small",column:1,bordered:!0,children:ez.structuredFacts.map((e,t)=>(0,s.jsxs)(b.A.Item,{label:e.key,children:[(0,s.jsx)("span",{children:e.value}),(0,s.jsx)(u.A,{style:{marginLeft:8},children:e.confidence.toFixed(2)}),(0,s.jsx)(J,{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)(J,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["引用来源 (",ez.sources.length,")"]}),0===ez.sources.length?(0,s.jsx)(h.A,{description:"暂无"}):(0,s.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:ez.sources.map(e=>(0,s.jsxs)(u.A,{color:"blue",children:[e.filePath," (",e.count,")"]},e.filePath))})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(J,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["缺失项 (",ez.missingItems.length,")"]}),0===ez.missingItems.length?(0,s.jsx)(h.A,{description:"无缺失"}):(0,s.jsx)(w.A,{size:"small",dataSource:ez.missingItems,renderItem:e=>(0,s.jsx)(w.A.Item,{children:e})})]})]})},{key:"validation",label:"校验 (".concat(ez.validationIssues.length,")"),children:0===ez.validationIssues.length?(0,s.jsx)(h.A,{description:"校验通过"}):(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[ez.validationIssues.map(e=>(0,s.jsxs)("div",{style:{border:"1px solid var(--colorBorderSecondary)",borderRadius:8,padding:12},children:[(0,s.jsx)(u.A,{color:"error"===e.level?"error":"warning"===e.level?"warning":"blue",children: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))),ez.exportGate.checklist.length>0&&(0,s.jsxs)("div",{style:{marginTop:8},children:[(0,s.jsx)(J,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:"导出门禁"}),(0,s.jsx)(w.A,{size:"small",dataSource:ez.exportGate.checklist,renderItem:e=>(0,s.jsxs)(w.A.Item,{children:[(0,s.jsx)(J,{style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:e.label}),(0,s.jsx)(u.A,{color:e.passed?"success":"error",children:e.passed?"PASS":"FAIL"})]})})]})]})},{key:"stages",label:"执行阶段 (".concat(ez.executionStages.length,")"),children:(0,s.jsx)(w.A,{size:"small",dataSource:ez.executionStages,renderItem:e=>(0,s.jsxs)(w.A.Item,{children:[(0,s.jsx)(w.A.Item.Meta,{avatar:er[e.type]||(0,s.jsx)(F.A,{}),title:(0,s.jsx)(J,{title:e.roleId,style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:"".concat(en[e.type]||e.type," \xb7 ").concat(e.roleName||tC(e.roleId))}),description:(0,s.jsx)(J,{type:"secondary",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"},children:e.message})}),(0,s.jsx)(u.A,{color:"success"===e.status?"success":"failed"===e.status?"error":"skipped"===e.status?"default":"warning",children:e.status})]})})}]})})]})}),(0,s.jsx)(g.A,{title:ec("documents.templateEditor"),open:e8,onClose:()=>e3(!1),size:"large",mask:{closable:!1},styles:{body:{padding:20,overflow:"auto"},header:{borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,s.jsxs)(i.A,{children:[(0,s.jsx)(m.Ay,{onClick:()=>e3(!1),children:ec("common.cancel")}),(0,s.jsx)(m.Ay,{type:"primary",onClick:()=>{tW()},children:ec("common.save")})]}),children:(0,s.jsxs)(d.A,{form:eu,layout:"vertical",requiredMark:"optional",children:[(0,s.jsxs)(j.A,{gutter:12,children:[(0,s.jsx)(d.A.Item,{name:"id",hidden:!0,children:(0,s.jsx)(n.A,{})}),(0,s.jsx)(y.A,{xs:24,md:8,children:(0,s.jsx)(d.A.Item,{name:"name",label:ec("documents.templateName"),rules:[{required:!0}],children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(y.A,{xs:24,md:8,children:(0,s.jsx)(d.A.Item,{name:"category",label:ec("documents.templateCategory"),children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(y.A,{xs:24,md:8,children:(0,s.jsx)(d.A.Item,{name:"outputTitle",label:ec("documents.outputTitle"),children:(0,s.jsx)(n.A,{})})}),(0,s.jsx)(y.A,{xs:24,md:12,children:(0,s.jsx)(d.A.Item,{name:"description",label:ec("documents.templateDescription"),children:(0,s.jsx)(n.A,{})})})]}),(0,s.jsx)(d.A.Item,{name:"projectRoleConfigId",label:ec("documents.projectRoleConfig"),rules:[{required:!0,message:ec("documents.projectRoleConfigRequired")}],children:(0,s.jsx)(A.A,{showSearch:!0,placeholder:ec("documents.projectRoleConfigRequired"),options:tS})}),(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)(J,{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)(u.A,{color:"blue",className:"border-0",children:"按文件角色多选"})]}),eS?(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)(v.A,{}),(0,s.jsx)("div",{className:"mt-3 text-[var(--colorTextSecondary)] text-xs",children:"正在加载知识库文件…"})]}):0===tr.length?(0,s.jsx)(h.A,{image:h.A.PRESENTED_IMAGE_SIMPLE,description:e9?"当前项目角色未配置文件角色":"请先选择项目角色"}):0===eA.length?(0,s.jsx)(h.A,{image:h.A.PRESENTED_IMAGE_SIMPLE,description:"暂无知识库文件"}):(0,s.jsx)("div",{className:"flex flex-col gap-4",children:tr.map(e=>{let t=e.value,r=t?el(ts[t]||[]):[];return(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"font-medium text-sm text-[var(--colorText)]",children:e.label}),(0,s.jsx)(m.Ay,{type:"link",size:"small",danger:!0,disabled:0===r.length,onClick:()=>tL(t,[]),className:"p-0 h-auto",children:"清空"})]}),(0,s.jsx)(d.A.Item,{name:["fileBindingGroups",t],hidden:!0,children:(0,s.jsx)(n.A,{})}),(0,s.jsx)(k.A,{treeData:eA,loadData:tP,fieldNames:{label:"rawTitle",value:"value",children:"children"},value:r,onChange:e=>{tL(t,e.map(e=>String(e)))},treeCheckable:!0,showCheckedStrategy:k.A.SHOW_PARENT,placeholder:"点击这里搜索或选择文件...",style:{width:"100%"},listHeight:300,showSearch:!0,maxTagCount:"responsive",size:"large"})]},e.value)})})]})]})})]})}}},e=>{e.O(0,[580,665,576,209,7,787,195,455,506,230,636,593,792],()=>e(e.s=16403)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[920],{2548:(e,s,l)=>{"use strict";l.r(s),l.d(s,{default:()=>w});var i=l(65321),r=l(35292),c=l(68787),n=l(2256),d=l(38770),t=l(11702),x=l(80300),h=l(55122),j=l(15622),a=l(71330),m=l(8579),A=l(66926),o=l(7851),g=l(84742),p=l(48321);let{Paragraph:u,Title:z,Text:N}=r.A,k=[{icon:(0,i.jsx)(a.A,{}),title:"准备阶段",color:"blue",items:["配置模型","上传知识库资料","创建提示词"]},{icon:(0,i.jsx)(m.A,{}),title:"编排阶段",color:"purple",items:["创建文件角色","创建提示词角色","创建项目角色配置并排序"]},{icon:(0,i.jsx)(A.A,{}),title:"生成阶段",color:"processing",items:["创建模板","知识库证据增强","动态执行状态"]},{icon:(0,i.jsx)(o.A,{}),title:"交付阶段",color:"green",items:["检查事实和来源","检查导出门禁","导出正式文件"]}],y=[{title:"第一步:配置模型",goal:"让系统具备 LLM JSON 事实抽取、章节生成、自动规则检查和修复能力。",path:"左侧菜单 → 模型配置",steps:["点击新增供应商,选择 OpenAI、DeepSeek、OpenRouter、Ollama 或其他兼容 OpenAI 协议的服务。","填写 Base URL、API Key、供应商名称并保存。","添加模型名称,建议至少准备一个用于生成和推理的模型。","把模型设置为当前启用模型。","执行健康检查,确认模型可调用。"],checks:["模型健康检查通过","至少有一个启用模型","API Key 和 Base URL 正确"],tips:"如果模型不可用,系统会回退到本地确定性抽取,但事实抽取质量会下降。"},{title:"第二步:上传知识库资料",goal:"把项目资料放入系统,让后续文件角色可以绑定。",path:"左侧菜单 → 知识库 → 文件管理 / 管理",steps:["上传招标文件、工程概况、合同条件、技术要求等项目事实资料。","上传工程量清单、劳动力计划、机械设备计划、材料计划等表格资料。","上传图纸目录、图纸说明、设计说明等图纸类资料。","上传规范、规程、企业标准、评分办法、编制要求等规则类资料。","等待索引完成,并在知识库文件列表中确认文件可见。"],checks:["文件上传成功","索引完成","文件能在文件角色绑定下拉框中看到"],tips:"表格资料最好有清晰表头;图纸资料最好附带目录或文字说明。"},{title:"第三步:创建提示词",goal:"定义每个执行阶段的模型行为,并写清系统需要自动抽取的检查规则。",path:"左侧菜单 → 提示词管理",steps:["创建事实抽取提示词:要求只抽取资料中明确出现的事实,返回结构化 JSON,不允许编造。","创建章节生成提示词:定义文档类型、专业语气、章节风格、引用事实和禁止事项。","在总控、章节生成或角色提示词中写清工程名称、工期、质量目标、数字、表格引用、章节完整性等约束,系统运行时会自动抽取为检查规则。","创建格式化提示词:定义编号、表格、分页和正式输出样式。","保存后确认提示词能在提示词角色绑定下拉框中看到。"],checks:["事实抽取提示词已创建","章节生成提示词已创建","格式化提示词或角色约束已创建"],tips:"提示词越明确,生成结果越稳定。系统会自动抽取规则用于生成、检查和修复,建议明确写上“没有来源的数据不要写”。"},{title:"第四步:创建文件角色",goal:"告诉系统每个文件在生成流程中的用途。",path:"左侧菜单 → 角色配置 → 新建文件角色",steps:["填写角色名称,例如“招标文件事实源”“工程量清单表格”“图纸说明文件”。","选择处理类型:规则文件、项目事实文件、表格数据、图纸文件、规范文件或参考资料。","绑定对应知识库文件。","保存角色。","按文件用途创建多个文件角色,不建议把不同用途资料混在一个角色里。"],checks:["文件角色有名称","已选择处理类型","具体项目文件由生成流程自动识别"],tips:"处理类型很重要:系统会根据它决定是否进行表格解析、事实抽取、规则引用或来源追踪。"},{title:"第五步:创建提示词角色",goal:"告诉系统每条提示词在哪个执行阶段使用,并让系统从提示词中自动抽取检查规则。",path:"左侧菜单 → 角色配置 → 新建提示词角色",steps:["填写角色名称,例如“施工组织设计事实抽取”“章节生成规则”“格式与交付规则”。","选择执行类型:事实抽取、章节生成、格式化或参考;需要检查的要求直接写进对应提示词,系统运行时会自动抽取规则。","绑定对应提示词。","保存角色。","一个执行阶段可以有多个提示词角色,后续在项目角色配置中排序。"],checks:["提示词角色有名称","已选择执行类型","已绑定提示词"],tips:"不需要单独维护检查类提示词;系统会从已绑定提示词中抽取禁止项、章节规则、事实规则、字数要求和导出检查规则。"},{title:"第六步:创建项目角色配置并排序",goal:"把文件角色和提示词角色组合成一个可复用的项目生成方案。",path:"左侧菜单 → 角色配置 → 新建项目配置",steps:["填写配置名称,例如“某项目施工组织设计配置”。","添加文件角色,并设置顺序。推荐:规则文件 → 项目事实文件 → 表格数据 → 图纸文件 → 规范文件 → 参考资料。","添加提示词角色,并设置顺序。推荐:事实抽取 → 章节生成 → 格式化 → 参考;检查规则会从已绑定提示词中自动抽取。","保存项目角色配置。","后续模板只绑定项目角色配置,不再重复绑定文件和提示词。"],checks:["至少包含一个文件角色","至少包含一个提示词角色","顺序符合业务流程"],tips:"排序决定系统读取资料和应用提示词的优先级,是生产级生成稳定性的关键。"},{title:"第七步:创建模板并绑定项目配置",goal:"定义要生成哪种文档,以及使用哪套项目角色配置。",path:"左侧菜单 → 生成编辑 → 新建模板",steps:["填写模板 ID。ID 由系统生成或保持唯一,不建议手动频繁修改。","填写模板名称,例如“施工组织设计”“技术标文件”“专项施工方案”。","填写分类、输出标题和模板说明。","选择第六步创建的项目角色配置。","为章节填写查询词和必需事实;系统会自动按章节检索知识库证据。","高级优先证据通常无需填写;只有必须指定某份官方资料、图纸或表格时才使用。","保存模板。"],checks:["模板名称清晰","输出标题正确","已绑定项目角色配置"],tips:"模板负责文档入口;项目角色配置负责资料、提示词和顺序。两者分离后更容易复用。"},{title:"第八步:执行生成并查看状态",goal:"让用户明确知道生成流程进行到哪一步。",path:"左侧菜单 → 生成编辑 → 选择模板 → 点击生成",steps:["点击生成按钮后,页面会出现“执行状态”卡片。","系统会先绑定文件角色和提示词角色,再按章节自动检索知识库证据;只有在必须指定官方资料、图纸或表格时,才需要使用高级优先证据。","执行状态会根据当前模板、后台自动规范、文件角色、提示词角色、运行时规则、证据增强和章节自动生成,不是固定工程流程。","当前执行节点会高亮显示,子状态会展示正在处理的章节、事实字段、文件角色、运行时规则、增强贡献或门禁规则。","生成任务在后台运行,页面通过 documentId 轮询;切换页面后回到生成编辑仍可恢复状态。","生成完成后,系统会用后端真实 executionStages 回填最终状态。","如果导出门禁存在风险,生成完成节点会提示需要查看规则检查结果。"],checks:["执行状态 Card 出现","当前节点有高亮","生成完成后有执行阶段结果"],tips:"如果长时间停留在某一步,优先检查模型配置、知识库索引和文件角色绑定。"},{title:"第九步:审查结果并导出",goal:"确保文档可追溯、可检查、可交付,同时能区分高风险问题和可复核 warning。",path:"生成编辑 → 编辑器下方 Tabs → 导出按钮 / 草稿历史",steps:["查看“结构化事实”,确认事实字段是否按后台自动规范动态 schema 抽取,并检查冲突提示。","查看“来源”,确认事实来自后台自动规范要求的文件角色和绑定资料。","查看“缺失项”,补齐缺失资料或调整角色配置。","查看“规则检查”,优先处理 error;warning 表示可导出但建议复核。","查看“导出门禁”,真实 blockingIssues 会作为风险提示保留,但不阻断用户导出。","在草稿历史中确认生成状态、warning 原因、整体生成耗时,并可删除不需要的记录。","可以先导出 HTML 预览排版,再导出 DOCX/PDF。"],checks:["无真实阻断问题","关键事实有来源","章节有证据","warning 原因已复核","导出文件可打开"],tips:"导出不是简单放行:真实阻断仍会拦截;生成完成但存在可复核问题时显示 warning,用户可以继续导出并按原因优化资料。"}];function w(){let e=(0,p.Vr)();return(0,i.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,i.jsxs)(c.A,{className:"cardGlass",styles:{body:{padding:24}},children:[(0,i.jsx)(z,{level:2,className:"mb-2",children:e("guide.title")}),(0,i.jsx)(u,{className:"pageDesc mb-0",children:e("guide.description")})]}),(0,i.jsx)(n.A,{gutter:[16,16],children:k.map(e=>(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{className:"h-full",title:(0,i.jsxs)("span",{className:"flex items-center gap-2",children:[e.icon,e.title]}),children:(0,i.jsx)("div",{className:"space-y-2",children:e.items.map(s=>(0,i.jsx)("div",{children:(0,i.jsx)(t.A,{color:e.color,children:s})},s))})})},e.title))}),(0,i.jsx)(c.A,{title:e("guide.fullFlow"),children:(0,i.jsx)(n.A,{gutter:[12,12],children:y.map((e,s)=>(0,i.jsx)(d.A,{xs:24,sm:12,lg:8,xl:6,children:(0,i.jsx)(c.A,{size:"small",className:"h-full",children:(0,i.jsxs)("div",{className:"flex items-start gap-3",children:[(0,i.jsx)(t.A,{color:"blue",className:"mt-1",children:s+1}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)(N,{strong:!0,children:e.title.replace(/^第.+?:/u,"")}),(0,i.jsx)(u,{className:"mb-1 text-xs",ellipsis:{rows:2,tooltip:e.goal},children:e.goal}),(0,i.jsx)(N,{type:"secondary",className:"text-xs break-words",children:e.path})]})]})})},e.title))})}),(0,i.jsx)(c.A,{title:"详细步骤说明:照着做即可跑通",children:(0,i.jsx)(x.A,{mode:"left",items:y.map(e=>({dot:(0,i.jsx)(g.A,{}),children:(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)(z,{level:4,className:"mb-0",children:e.title}),(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"目标:"}),e.goal]}),(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"入口:"}),e.path]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(N,{strong:!0,children:"操作步骤:"}),(0,i.jsx)("ol",{className:"list-decimal pl-6 mt-2 space-y-1",children:e.steps.map(e=>(0,i.jsx)("li",{children:e},e))})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(N,{strong:!0,children:"完成检查:"}),(0,i.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:e.checks.map(e=>(0,i.jsx)(t.A,{color:"success",children:e},e))})]}),(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"提示:"}),e.tips]}),(0,i.jsx)(h.A,{})]})}))})}),(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{title:e("guide.roleDesign"),children:[(0,i.jsx)(u,{children:e("guide.roleDesignDesc")}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(t.A,{color:"blue",children:"file"}),(0,i.jsx)(N,{strong:!0,children:e("guide.fileRole")}),(0,i.jsx)(u,{children:e("guide.fileRoleDesc")})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(t.A,{color:"purple",children:"prompt"}),(0,i.jsx)(N,{strong:!0,children:e("guide.promptRole")}),(0,i.jsx)(u,{children:e("guide.promptRoleDesc")})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(t.A,{color:"processing",children:"config"}),(0,i.jsx)(N,{strong:!0,children:e("guide.projectConfig")}),(0,i.jsx)(u,{children:e("guide.projectConfigDesc")})]})]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{title:e("guide.generationEngine"),children:[(0,i.jsx)(u,{children:e("guide.generationEngineDesc")}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(t.A,{children:e("roles.factExtraction")}),(0,i.jsx)(t.A,{children:e("roles.chapterGeneration")}),(0,i.jsx)(t.A,{children:"自动规则检查"}),(0,i.jsx)(t.A,{children:e("roles.formatting")}),(0,i.jsx)(t.A,{children:e("documents.exportGate")})]})]})})]}),(0,i.jsx)(c.A,{title:"文件角色和提示词角色案例:它们在模板生成中到底起什么作用",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{size:"small",title:"案例 A:创建文件角色“招标文件事实源”",children:[(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"怎么创建:"}),"类型选择 file,处理类型选择“项目事实文件”,绑定招标文件、合同摘要或项目概况。"]}),(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"生成时的作用:"}),"系统会从这个角色绑定的文件里抽取工程名称、建设地点、工期、质量目标、范围边界等事实,并把来源带入结构化事实和章节证据。"]}),(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"带来的提升:"}),"模型不再凭空补项目事实;章节生成和导出校验都会追踪“这句话来自哪个文件角色、哪个文件”。"]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{size:"small",title:"案例 B:创建文件角色“工程量清单表格”",children:[(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"怎么创建:"}),"类型选择 file,处理类型选择“表格数据”,绑定 Excel、CSV、清单表或计划表。"]}),(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"生成时的作用:"}),"系统会读取 Sheet、表头、行列和来源范围,把表格数据转换成可引用的结构化资源证据。"]}),(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"带来的提升:"}),"章节中涉及数量、清单、计划、资源配置时,优先引用表格来源,减少数字编造和漏项。"]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{size:"small",title:"案例 C:创建提示词角色“章节生成规则”",children:[(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"怎么创建:"}),"先在提示词管理中写好生成规则,例如“必须引用来源、不要写无来源数据、输出正式报告语气”;再创建 prompt 角色,执行类型选择“章节生成”。"]}),(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"生成时的作用:"}),"系统生成每个章节时会把这个提示词加入 LLM 上下文,用它约束语气、结构、引用方式和禁止事项。"]}),(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"带来的提升:"}),"同一套资料可以生成更稳定的文档风格;不同模板只需替换提示词角色,就能调整写法而不改知识库文件。"]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{size:"small",title:"案例 D:在提示词中写入交付检查要求",children:[(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"怎么创建:"}),"提示词内容写清楚必须检查的交付要求,例如“不能出现资料未提供、图片引用必须可访问、关键事实必须有来源”;执行类型选择章节生成、格式化或参考即可。"]}),(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"生成时的作用:"}),"系统会在运行时自动抽取这些要求,结合证据来源、事实落位和导出门禁检查文档是否可交付。"]}),(0,i.jsxs)(u,{children:[(0,i.jsx)(N,{strong:!0,children:"带来的提升:"}),"不需要维护单独检查类提示词,也能把人工审稿经验前置到生成流程,降低导出后才发现缺来源、缺图片、格式不合格的概率。"]})]})})]})}),(0,i.jsx)(c.A,{title:"运行时规则自动抽取说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"用户只维护业务提示词",children:(0,i.jsx)(u,{children:"系统不要求用户单独创建检查类提示词。用户只需要在总控、章节生成、格式化或参考提示词中写清“必须怎么写、不能写什么、字数和章节要求”。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"运行时自动抽取规则",children:(0,i.jsx)(u,{children:"生成开始时,系统会从已绑定提示词中抽取禁止词、章节规则、主体表达、商务敏感项、事实真实性、字数要求和角色关注点,并统一用于生成、检查和修复。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"执行状态可追踪",children:(0,i.jsx)(u,{children:"生成状态会展示提示词规则执行摘要,方便确认用户写入的约束是否被识别并参与本次生成流程。"})})})]})}),(0,i.jsx)(c.A,{title:"联网增强说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"默认关闭",children:(0,i.jsx)(u,{children:"联网增强在模型配置页手动开启。开启后,系统会受控检索公开规范、政策和通用技术资料,用于增强措施准确性。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"不覆盖项目事实",children:(0,i.jsx)(u,{children:"联网资料不会用于生成或修改项目名称、地点、规模、工期、质量标准、工程量、材料规格、商务数据等项目事实。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"有报告和门禁",children:(0,i.jsx)(u,{children:"生成状态会展示联网增强报告;导出前会检查并清理联网过程性话术,避免正式正文出现搜索过程描述。"})})})]})}),(0,i.jsx)(c.A,{title:"我的数据和门禁规则说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"使用自己的数据",children:(0,i.jsx)(u,{children:"文件、提示词、角色配置和规范包都来自用户自己创建或上传的内容,生成流程会按当前项目配置读取,并自动抽取检查规则参与生成和导出门禁。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"自定义门禁类型会执行",children:(0,i.jsx)(u,{children:"门禁规则由后台根据模板、提示词和角色绑定自动形成,并与系统门禁一起参与规则检查,不需要用户手动维护单独检查类提示词。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"上传后关注索引状态",children:(0,i.jsx)(u,{children:"文件上传完成后,知识库索引会继续在后台写入。请在文件管理页查看状态,如果失败,页面会展示原因,方便重新配置模型或重试。"})})})]})}),(0,i.jsx)(c.A,{title:"知识库证据和增强贡献说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"自动检索为主",children:(0,i.jsx)(u,{children:"模板章节的查询词、章节目的和必需事实会驱动系统自动检索知识库证据。高级优先证据只是兜底能力,用于必须指定官方资料、图纸或表格的场景,不是日常必填项。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"增强贡献可追踪",children:(0,i.jsx)(u,{children:"生成流程会展示知识库证据、人工确认/固定证据和自动检索证据的数量,帮助判断本次增强是否真的参与生成,而不是增加用户维护成本。"})})})]})}),(0,i.jsx)(c.A,{title:"动态 schema、证据和执行状态说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"动态事实 schema",children:(0,i.jsx)(u,{children:"系统不会写死工程字段。后台自动规范会结合模板章节 requiredFacts、角色绑定和提示词形成抽取 schema,并驱动事实抽取、冲突检测、规则检查和导出门禁。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"结构化资源证据",children:(0,i.jsx)(u,{children:"文本、PDF/Word、Excel/CSV、图片、地图图纸和其他附件都会被整理成资源证据,包含文件角色、处理类型、正文用途、关联事实和证据片段,模型据此理解资料关系。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"动态执行状态",children:(0,i.jsx)(u,{children:"生成编辑页的执行节点会随模板、规范包、文件角色、提示词角色、章节和门禁规则变化;用户生成不同项目文件时看到的是对应项目的流程,而不是固定示例流程。"})})})]})}),(0,i.jsx)(c.A,{title:"生成记录、warning 和导出门禁怎么理解",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,lg:8,children:(0,i.jsxs)(c.A,{size:"small",title:"草稿历史记录",children:[(0,i.jsxs)(u,{children:["每次后台生成都会写入全局项目目录 ",(0,i.jsxs)(N,{code:!0,children:["~/.customize-agent/projects/","{projectId}","/generatedDocuments"]}),"。记录会保存标题、模板、状态、创建时间、完成时间、生成耗时、正文、结构化结果和资源引用。"]}),(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"completed:生成完成且无需要关注的问题。"}),(0,i.jsx)("li",{children:"warning:生成完成,但存在可复核问题。"}),(0,i.jsx)("li",{children:"failed:生成失败,需要查看错误原因。"}),(0,i.jsx)("li",{children:"generating:后台任务仍在执行,可轮询恢复。"})]})]})}),(0,i.jsx)(d.A,{xs:24,lg:8,children:(0,i.jsxs)(c.A,{size:"small",title:"warning 不是失败",children:[(0,i.jsx)(u,{children:"warning 用于提醒用户“文档已经生成,但建议复核”。例如必需事实没有在最佳来源角色中抽到、部分来源需要人工确认、格式或内容有优化建议。warning 会显示在草稿历史和校验详情中,并保留导出能力。"}),(0,i.jsx)(u,{children:"如果存在明确风险问题,例如正文包含临时图片生成 URL、出现“资料未提供”占位、真实 blockingIssues 未解决,导出门禁会提示风险,但仍保留 DOCX/PDF 导出能力。"})]})}),(0,i.jsx)(d.A,{xs:24,lg:8,children:(0,i.jsxs)(c.A,{size:"small",title:"导出门禁规则",children:[(0,i.jsx)(u,{children:"门禁分为“高风险提示”和“复核建议”。系统不会禁止导出,但会在出现高风险问题时提醒用户复核交付质量。"}),(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"Markdown/HTML 更适合快速预览和人工调整。"}),(0,i.jsx)("li",{children:"DOCX/PDF 会启用真实门禁检查。"}),(0,i.jsx)("li",{children:"草稿历史可保留多个版本,便于对比和再次导出。"})]})]})})]})}),(0,i.jsx)(c.A,{title:"生成资源和知识库的关系",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsxs)(c.A,{size:"small",title:"生成资源不进入知识库",children:[(0,i.jsx)(u,{children:"模板运行生成的文档、图片、封面或后处理资源只会登记到生成资源管理页,不会写入 knowledgeBase,也不会建立知识库索引。"}),(0,i.jsx)(u,{children:"这样可以避免模型产物污染事实来源;需要作为资料复用时,应由用户明确上传到知识库。"})]})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsxs)(c.A,{size:"small",title:"资源预览和坏图处理",children:[(0,i.jsx)(u,{children:"资源预览会从全局 generatedDocuments 目录解析文件,不依赖当前页面临时路径。图片下载会识别“image is generating”等占位响应,并校验 PNG/JPEG/WebP 字节,避免把占位文本当成图片保存。"}),(0,i.jsx)(u,{children:"如果预览失败,优先查看资源管理页中的文件路径、资源状态和原始生成记录。"})]})})]})}),(0,i.jsx)(c.A,{title:"文件角色处理类型大白话说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"规则文件",children:(0,i.jsx)(u,{children:"用来告诉系统“必须怎么写、不能怎么写、按什么标准判断”。适合放评分办法、甲方编制要求、攻略写作要求、输出格式要求。生成时会优先作为约束使用。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"项目事实文件",children:(0,i.jsx)(u,{children:"用来告诉系统“真实情况是什么”。适合放项目概况、合同摘要、招标文件关键信息、游戏角色资料、产品资料。事实字段通常从这里抽取。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"表格数据",children:(0,i.jsx)(u,{children:"用来解析结构化数据。适合放 Excel、CSV、清单、计划表、评分表、推荐指数表。系统会读取 Sheet、表头、行列和来源范围。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"图纸文件",children:(0,i.jsx)(u,{children:"用来表达空间关系、路线、结构、站位或设计说明。可以是图纸目录、设计说明、路线示意、阵型图说明。没有 CAD 时也可以用文字图纸说明。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"规范文件",children:(0,i.jsx)(u,{children:"用来作为专业依据。适合放国家规范、行业标准、企业标准、攻略结构规范、质量标准。生成、规则检查和导出门禁会把它当成依据。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"参考资料",children:(0,i.jsx)(u,{children:"只作为辅助阅读材料,不建议放关键事实。适合放图片来源、公开网页链接、背景资料、案例资料。系统可以参考,但不应把它当成强事实。"})})})]})}),(0,i.jsx)(c.A,{title:"推荐资料清单",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"必备资料",children:(0,i.jsxs)("ul",{className:"list-disc pl-5",children:[(0,i.jsx)("li",{children:"项目事实文件"}),(0,i.jsx)("li",{children:"招标或编制规则"}),(0,i.jsx)("li",{children:"章节生成提示词"})]})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"强烈建议",children:(0,i.jsxs)("ul",{className:"list-disc pl-5",children:[(0,i.jsx)("li",{children:"表格数据"}),(0,i.jsx)("li",{children:"图纸说明"}),(0,i.jsx)("li",{children:"规范或企业标准"})]})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"导出前确认",children:(0,i.jsxs)("ul",{className:"list-disc pl-5",children:[(0,i.jsx)("li",{children:"无 error 校验"}),(0,i.jsx)("li",{children:"事实有来源"}),(0,i.jsx)("li",{children:"导出门禁通过"})]})})})]})}),(0,i.jsx)(c.A,{title:"生产级生成前检查清单",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{size:"small",title:"资料完整性",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"事实源、规则源、表格源、图片/图纸源分开绑定。"}),(0,i.jsx)("li",{children:"关键事实在知识库检索中可以搜索到。"}),(0,i.jsx)("li",{children:"表格有清晰表头,图片和图纸有说明文字。"}),(0,i.jsx)("li",{children:"只有必须指定资料时才维护高级优先证据。"})]})})}),(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{size:"small",title:"角色配置",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"文件角色处理类型选对。"}),(0,i.jsx)("li",{children:"提示词角色执行类型选对。"}),(0,i.jsx)("li",{children:"项目角色配置排序符合生成流程。"}),(0,i.jsx)("li",{children:"生成后查看增强贡献,确认上下文和证据是否真实参与。"})]})})}),(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{size:"small",title:"规范包",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"required fact 不要过度配置。"}),(0,i.jsx)("li",{children:"sourceRoleIds 只绑定真正应该提供该事实的角色。"}),(0,i.jsx)("li",{children:"gateRules 区分 error 和 warning。"})]})})}),(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{size:"small",title:"交付检查",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"草稿历史记录状态合理。"}),(0,i.jsx)("li",{children:"warning 原因已经阅读。"}),(0,i.jsx)("li",{children:"导出文件打开正常,图片和表格可读。"})]})})})]})}),(0,i.jsx)(c.A,{title:"常见问题和处理建议",children:(0,i.jsx)(j.A,{items:[{key:"warning-export",label:"为什么生成完成后显示 warning,但仍然可以导出?",children:(0,i.jsx)(u,{children:"warning 表示文档已生成,但存在建议复核的问题,例如来源角色不完全匹配、某些事实需要人工确认或格式可优化。它不是失败,也不会阻断导出;真实 blockingIssues 或 error 级门禁问题会作为高风险提示展示,导出后请人工复核。"})},{key:"missing-facts",label:"为什么提示必需事实缺失?",children:(0,i.jsx)(u,{children:"优先检查后台自动规范生成的事实字段、模板章节 requiredFacts 和文件角色绑定。很多情况下不是模型失败,而是资料没有被绑定到正确角色,或字段要求比资料实际内容更严格。"})},{key:"draft-duration",label:"草稿历史里的耗时怎么计算?",children:(0,i.jsx)(u,{children:"耗时使用生成记录的 createdAt 到 completedAt 计算;旧记录或未完成记录会使用 updatedAt 兜底。它用于判断本次生成链路整体成本,包括知识库检索、事实抽取、章节生成、资源处理、校验和格式化。"})},{key:"asset-index",label:"生成资源会如何进入知识库?",children:(0,i.jsx)(u,{children:"生成资源不会自动或手动写入知识库,也不会建立知识库索引,避免生成内容再次被当作事实证据召回。确需复用时,请由用户明确上传到知识库。"})},{key:"priority-evidence",label:"什么时候需要维护高级优先证据?",children:(0,i.jsx)(u,{children:"日常不需要维护。只有当某章必须引用指定官方资料、图纸、表格,或自动检索结果不稳定时,才从知识库搜索页复制文件路径并填入章节高级优先证据。"})}]})}),(0,i.jsx)(j.A,{items:[{key:"prepare",label:e("guide.prepareTitle"),children:(0,i.jsx)(u,{children:e("guide.prepareContent")})},{key:"roles",label:e("guide.rolesTitle"),children:(0,i.jsx)(u,{children:e("guide.rolesContent")})},{key:"template",label:e("guide.templateTitle"),children:(0,i.jsx)(u,{children:e("guide.templateContent")})},{key:"generate",label:e("guide.generateTitle"),children:(0,i.jsx)(u,{children:e("guide.generateContent")})},{key:"qa",label:e("guide.qaTitle"),children:(0,i.jsx)(u,{children:e("guide.qaContent")})}]})]})}},34899:(e,s,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/guide",function(){return l(2548)}])}},e=>{e.O(0,[665,787,644,636,593,792],()=>e(e.s=34899)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- /*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-900:oklch(39.6% .141 25.723);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-200:oklch(94.5% .129 101.54);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-900:oklch(39.3% .095 152.535);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.m-0{margin:0}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mx-1{margin-inline:var(--spacing)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-auto{margin-top:auto}.-mr-2{margin-right:calc(var(--spacing) * -2)}.mr-1{margin-right:var(--spacing)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mb-0{margin-bottom:0}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2}.line-clamp-2,.line-clamp-3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-\[calc\(100vh-140px\)\]{height:calc(100vh - 140px)}.h-auto{height:auto}.h-full{height:100%}.max-h-52{max-height:calc(var(--spacing) * 52)}.min-h-0{min-height:0}.min-h-\[500px\]{min-height:500px}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-\[1px\]{width:1px}.w-\[260px\]{width:260px}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[120px\]{max-width:120px}.max-w-\[140px\]{max-width:140px}.max-w-\[300px\]{max-width:300px}.max-w-\[400px\]{max-width:400px}.max-w-\[520px\]{max-width:520px}.max-w-full{max-width:100%}.min-w-0{min-width:0}.min-w-\[72px\]{min-width:72px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[28px_1fr_auto\]{grid-template-columns:28px 1fr auto}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-12>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 12) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 12) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-12{column-gap:calc(var(--spacing) * 12)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.gap-y-8{row-gap:calc(var(--spacing) * 8)}.gap-y-16{row-gap:calc(var(--spacing) * 16)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-\[var\(--borderColor\)\]>:not(:last-child)){border-color:var(--borderColor)}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[var\(--borderColor\)\]{border-color:var(--borderColor)}.border-\[var\(--borderColorStrong\)\]{border-color:var(--borderColorStrong)}.border-\[var\(--colorBorderSecondary\)\]{border-color:var(--colorBorderSecondary)}.border-\[var\(--colorDanger\)\]\/20{border-color:var(--colorDanger)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--colorDanger\)\]\/20{border-color:color-mix(in oklab,var(--colorDanger) 20%,transparent)}}.border-blue-200{border-color:var(--color-blue-200)}.border-green-200{border-color:var(--color-green-200)}.border-red-200{border-color:var(--color-red-200)}.border-slate-100{border-color:var(--color-slate-100)}.border-transparent{border-color:#0000}.border-yellow-200{border-color:var(--color-yellow-200)}.bg-\[\#1e1e1e\]{background-color:#1e1e1e}.bg-\[var\(--borderColor\)\]{background-color:var(--borderColor)}.bg-\[var\(--borderColorStrong\)\]{background-color:var(--borderColorStrong)}.bg-\[var\(--colorBg\)\]{background-color:var(--colorBg)}.bg-\[var\(--colorBgContainer\)\]{background-color:var(--colorBgContainer)}.bg-\[var\(--colorBgElevated\)\]{background-color:var(--colorBgElevated)}.bg-\[var\(--colorBgHover\)\],.bg-\[var\(--colorBgHover\)\]\/50{background-color:var(--colorBgHover)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorBgHover\)\]\/50{background-color:color-mix(in oklab,var(--colorBgHover) 50%,transparent)}}.bg-\[var\(--colorBgSecondary\)\]\/30{background-color:var(--colorBgSecondary)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorBgSecondary\)\]\/30{background-color:color-mix(in oklab,var(--colorBgSecondary) 30%,transparent)}}.bg-\[var\(--colorBgSelected\)\]{background-color:var(--colorBgSelected)}.bg-\[var\(--colorBorderSecondary\)\]{background-color:var(--colorBorderSecondary)}.bg-\[var\(--colorBrand\)\]\/5{background-color:var(--colorBrand)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorBrand\)\]\/5{background-color:color-mix(in oklab,var(--colorBrand) 5%,transparent)}}.bg-\[var\(--colorDanger\)\]\/10{background-color:var(--colorDanger)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorDanger\)\]\/10{background-color:color-mix(in oklab,var(--colorDanger) 10%,transparent)}}.bg-\[var\(--colorFillAlter\)\]{background-color:var(--colorFillAlter)}.bg-\[var\(--colorFillQuaternary\)\]{background-color:var(--colorFillQuaternary)}.bg-\[var\(--colorFillSecondary\)\]{background-color:var(--colorFillSecondary)}.bg-\[var\(--colorText\)\]{background-color:var(--colorText)}.bg-black{background-color:var(--color-black)}.bg-blue-50\/50{background-color:#eff6ff80}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\/50{background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}.bg-green-50{background-color:var(--color-green-50)}.bg-green-50\/50{background-color:#f0fdf480}@supports (color:color-mix(in lab,red,red)){.bg-green-50\/50{background-color:color-mix(in oklab,var(--color-green-50) 50%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/50{background-color:#fef2f280}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/50{background-color:color-mix(in oklab,var(--color-red-50) 50%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-transparent{background-color:#0000}.bg-yellow-50\/50{background-color:#fefce880}@supports (color:color-mix(in lab,red,red)){.bg-yellow-50\/50{background-color:color-mix(in oklab,var(--color-yellow-50) 50%,transparent)}}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:var(--spacing)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.py-32{padding-block:calc(var(--spacing) * 32)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pt-16{padding-top:calc(var(--spacing) * 16)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-1{padding-bottom:var(--spacing)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[18px\]{--tw-leading:18px;line-height:18px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#d4d4d4\]{color:#d4d4d4}.text-\[var\(--colorAccent\)\]{color:var(--colorAccent)}.text-\[var\(--colorBg\)\]{color:var(--colorBg)}.text-\[var\(--colorBorderSecondary\)\]{color:var(--colorBorderSecondary)}.text-\[var\(--colorBrand\)\]{color:var(--colorBrand)}.text-\[var\(--colorDanger\)\]{color:var(--colorDanger)}.text-\[var\(--colorInfo\)\]{color:var(--colorInfo)}.text-\[var\(--colorOk\)\]{color:var(--colorOk)}.text-\[var\(--colorText\)\]{color:var(--colorText)}.text-\[var\(--colorTextQuaternary\)\]{color:var(--colorTextQuaternary)}.text-\[var\(--colorTextSecondary\)\]{color:var(--colorTextSecondary)}.text-\[var\(--colorTextTertiary\)\]{color:var(--colorTextTertiary)}.text-\[var\(--colorWarn\)\]{color:var(--colorWarn)}.text-\[var\(--colorWarning\)\]{color:var(--colorWarning)}.text-blue-500{color:var(--color-blue-500)}.text-green-600{color:var(--color-green-600)}.text-red-600{color:var(--color-red-600)}.text-slate-500{color:var(--color-slate-500)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.shadow-md,.shadow-none{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\:border-\[var\(--borderColorStrong\)\]:hover{border-color:var(--borderColorStrong)}.hover\:border-\[var\(--colorBrand\)\]:hover{border-color:var(--colorBrand)}.hover\:border-\[var\(--colorTextTertiary\)\]:hover{border-color:var(--colorTextTertiary)}.hover\:bg-\[var\(--colorBgContainer\)\]:hover{background-color:var(--colorBgContainer)}.hover\:bg-\[var\(--colorBgHover\)\]:hover{background-color:var(--colorBgHover)}.hover\:bg-\[var\(--colorFillAlter\)\]:hover{background-color:var(--colorFillAlter)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-\[var\(--colorText\)\]:hover{color:var(--colorText)}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.hover\:shadow-md:hover,.hover\:shadow-sm:hover{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)}}.focus\:bg-\[var\(--colorBgContainer\)\]:focus{background-color:var(--colorBgContainer)}.focus\:bg-\[var\(--colorBgElevated\)\]:focus{background-color:var(--colorBgElevated)}.focus\:bg-transparent:focus{background-color:#0000}@media (min-width:40rem){.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}.sm\:pb-0{padding-bottom:0}}@media (min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:w-auto{width:auto}.md\:flex-none{flex:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media (min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media (min-width:80rem){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (prefers-color-scheme:dark){.dark\:bg-green-900\/20{background-color:#0d542b33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-green-900\/20{background-color:color-mix(in oklab,var(--color-green-900) 20%,transparent)}}.dark\:bg-red-900\/20{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-900\/20{background-color:color-mix(in oklab,var(--color-red-900) 20%,transparent)}}.dark\:bg-white{background-color:var(--color-white)}.dark\:text-black{color:var(--color-black)}.dark\:text-green-500{color:var(--color-green-500)}.dark\:text-red-500{color:var(--color-red-500)}}}:root{--colorBg:#fff;--colorBgElevated:#fff;--colorBgSecondary:#fafafa;--colorBgHover:#f5f5f5;--colorBgSelected:#eff6ff;--colorText:#171717;--colorTextSecondary:#737373;--colorTextTertiary:#a3a3a3;--colorBrand:#06c;--colorBrandHover:#0052a3;--colorBrand2:#171717;--colorDanger:#e11d48;--colorOk:#16a34a;--colorWarn:#f59e0b;--colorInfo:#2563eb;--glassBg:#ffffffd9;--glassBlur:saturate(180%) blur(16px);--borderColor:#00000014;--borderColorStrong:#00000026;--borderColorSelected:#3b82f6;--shadowSoft:0 4px 12px #0000000d,0 1px 2px #00000005;--shadowCard:0 0 0 1px #00000008,0 2px 12px #0000000a;--shadowButton:0 1px 2px #0000000d;--radiusSm:6px;--radiusMd:10px;--radiusLg:14px;--radiusPill:9999px;--sidebarWidth:260px;--fontSans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}.dark{--colorBg:#000;--colorBgElevated:#0a0a0a;--colorBgSecondary:#121212;--colorBgHover:#1a1a1a;--colorBgSelected:#3b82f626;--colorText:#ededed;--colorTextSecondary:#a3a3a3;--colorTextTertiary:#737373;--colorBrand:#3b82f6;--colorBrandHover:#60a5fa;--colorBrand2:#d4d4d4;--colorDanger:#f43f5e;--colorOk:#22c55e;--colorWarn:#fbbf24;--colorInfo:#3b82f6;--glassBg:#000000d9;--borderColor:#ffffff1f;--borderColorStrong:#fff3;--borderColorSelected:#60a5fa;--shadowSoft:0 4px 12px #00000080,0 1px 2px #0003;--shadowCard:0 0 0 1px #ffffff14,0 4px 16px #0006;--shadowButton:0 1px 2px #0000004d}*,:after,:before{box-sizing:border-box}html{font-family:var(--fontSans);background:var(--colorBg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.appShellPlaceholder,body{background:var(--colorBg);min-height:100vh}body{font-family:var(--fontSans);color:var(--colorText);margin:0}a{color:inherit;text-decoration:none}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--borderColorStrong);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--colorTextTertiary)}@keyframes fadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.animateFadeIn{animation:fadeIn .4s cubic-bezier(.2,.8,.2,1) forwards}.stagger-1{animation-delay:50ms}.stagger-2{animation-delay:.1s}.stagger-3{animation-delay:.15s}.stagger-4{animation-delay:.2s}.stagger-5{animation-delay:.25s}.space-y-8>*+*{margin-top:32px}.space-y-6>*+*{margin-top:24px}.space-y-5>*+*{margin-top:20px}.space-y-4>*+*{margin-top:16px}.space-y-3>*+*{margin-top:12px}.space-y-2>*+*{margin-top:8px}.space-x-8>*+*{margin-left:32px}.space-x-6>*+*{margin-left:24px}.space-x-4>*+*{margin-left:16px}.space-x-2>*+*{margin-left:8px}.routeProgress{top:0;left:var(--sidebarWidth);z-index:1000;background:linear-gradient(90deg,var(--colorPrimary),var(--colorAccent));height:3px;animation:routeProgress .9s ease-in-out infinite;position:fixed;right:0}#nprogress{pointer-events:none}#nprogress .bar{background:var(--colorBrand);z-index:1031;width:100%;height:3px;position:fixed;top:0;left:0}#nprogress .peg{width:100px;height:100%;box-shadow:0 0 10px var(--colorBrand),0 0 5px var(--colorBrand);opacity:1;display:block;position:absolute;right:0;transform:rotate(3deg)translateY(-4px)}.routeLoadingCard{border:1px solid var(--borderSoft);color:var(--textSecondary);background:var(--surfaceElevated);border-radius:16px;margin-bottom:16px;padding:14px 16px}@keyframes routeProgress{0%{transform-origin:0;opacity:.65;transform:scaleX(.15)}50%{transform-origin:0;opacity:1;transform:scaleX(.7)}to{transform-origin:0;opacity:.35;transform:scaleX(1)}}@media (max-width:1024px){:root{--sidebarWidth:200px}}@media (max-width:860px){:root{--sidebarWidth:72px}.sidebarLogo{justify-content:center;padding:16px}.sidebarFooter,.sidebarItem span:not(.sidebarChevron),.sidebarLogoSub,.sidebarLogoTitle{display:none}.sidebarItem{justify-content:center;padding:11px}.sidebarSubmenu{padding-left:0}.sidebarSubItem{padding-left:11px}.mainInner{padding:20px 20px calc(20px + env(safe-area-inset-bottom,0px))}.topbar{margin:10px 12px 0;padding:10px 16px}}@media (max-width:640px){.sidebar{top:6px;left:6px;bottom:calc(6px + env(safe-area-inset-bottom,0px))}.mainContent{margin-left:72px}.mainInner{padding:12px 12px calc(12px + env(safe-area-inset-bottom,0px))}.topbar{border-radius:16px;margin:8px 8px 0;padding:8px 12px}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}.sidebar{position:fixed;left:0;top:0;bottom:0;width:var(--sidebarWidth);display:flex;flex-direction:column;z-index:20;background:var(--colorBgSecondary);border-right:none;box-shadow:2px 0 8px rgba(0,0,0,.02);overflow:hidden;transition:width .3s cubic-bezier(.2,.8,.2,1),transform .3s ease}.sidebarCollapsedSelf{width:72px}.sidebarLogo{display:flex;align-items:center;gap:12px;padding:24px 20px 20px;height:68px;overflow:hidden}.sidebarCollapsedSelf .sidebarLogo{justify-content:center;padding:24px 0 20px}.sidebarCollapsedSelf .sidebarChevron,.sidebarCollapsedSelf .sidebarLabel,.sidebarCollapsedSelf .sidebarLogoTitle{display:none}.sidebarCollapsedSelf .sidebarItem{justify-content:center;padding:10px}.sidebarCollapsedSelf .sidebarCollapseWrapper{padding:12px}.sidebarLogoTitle{font-size:16px;font-weight:600;letter-spacing:-.01em;white-space:nowrap;opacity:1;transition:opacity .2s ease;color:var(--colorText)}.sidebarNav{flex:1;overflow-y:auto;overflow-x:hidden;flex-direction:column;gap:2px}.sidebarItem,.sidebarNav{padding:8px 12px;display:flex}.sidebarItem{align-items:center;gap:10px;border-radius:var(--radiusSm);font-size:13.5px;font-weight:500;color:var(--colorTextSecondary);transition:all .15s ease;cursor:pointer;white-space:nowrap}.sidebarLabel{transition:opacity .2s ease}.sidebarItem:hover{background:var(--colorBgHover);color:var(--colorText)}.sidebarItemActive,.sidebarItemActive:hover{background:var(--colorBgElevated);color:var(--colorText);box-shadow:none}.dark .sidebarItemActive,.dark .sidebarItemActive:hover{box-shadow:none}.sidebarCollapseWrapper{padding:12px;border-top:1px solid var(--borderColor);display:flex;justify-content:center}.sidebarCollapseBtn{width:100%;height:32px;border-radius:var(--radiusSm);border:1px solid transparent;background:transparent;color:var(--colorTextSecondary);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease}.sidebarCollapseBtn:hover{background:var(--colorBgHover);color:var(--colorText)}.topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:16px 32px;background:var(--glassBg);backdrop-filter:var(--glassBlur);-webkit-backdrop-filter:var(--glassBlur);border-bottom:none;box-shadow:0 1px 3px rgba(0,0,0,.02)}.topbarBtn{display:inline-flex;align-items:center;gap:8px;padding:6px;border-radius:var(--radiusSm);border:1px solid transparent;background:transparent;color:var(--colorTextSecondary);font-size:13px;font-weight:500;cursor:pointer;transition:all .15s ease;outline:none}.topbarBtn:hover{background:var(--colorBgHover);color:var(--colorText)}.mainContent{margin-left:var(--sidebarWidth);flex:1;display:flex;flex-direction:column;min-height:100vh;background:var(--colorBg);transition:margin-left .3s cubic-bezier(.2,.8,.2,1)}.sidebarCollapsed .mainContent{margin-left:68px}.mainInner{flex:1;padding:32px clamp(24px,4vw,48px) calc(32px + env(safe-area-inset-bottom, 0px));width:100%;min-width:0;overflow-x:hidden;transition:opacity .2s ease}.mainInner.pageTransitioning{opacity:.5;pointer-events:none}.pageTitle{font-size:24px;font-weight:700;letter-spacing:-.01em;color:var(--colorText);margin:0}.pageDesc{margin-top:6px;font-size:14px;color:var(--colorTextSecondary)}.ant-card{background:transparent!important;border:none!important;border-radius:0!important;box-shadow:none!important;margin-bottom:0!important}.ant-card-head{border-bottom:none!important;padding:0!important;min-height:auto!important;margin-bottom:16px}.ant-card-head-title{font-size:16px!important;font-weight:600!important;padding:0!important}.ant-card-body{padding:0!important}.ant-modal-content{background:var(--colorBgElevated)!important;border:1px solid var(--borderColor)!important;border-radius:var(--radiusLg)!important;box-shadow:var(--shadowCard)!important;padding:24px!important}.ant-modal-header{background:transparent!important;margin-bottom:24px!important}.ant-input,.ant-input-number,.ant-input-password,.ant-select-selector{border:1px solid transparent!important;background:var(--colorBgHover)!important;border-radius:var(--radiusSm)!important;box-shadow:none!important;transition:all .2s ease!important}.ant-input-focused,.ant-input-number-focused,.ant-input-number:focus,.ant-input-number:hover,.ant-input-password:focus,.ant-input-password:hover,.ant-input:focus,.ant-input:hover,.ant-select-focused .ant-select-selector,.ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-color:var(--borderColorStrong)!important;background:transparent!important;box-shadow:none!important}.ant-input-affix-wrapper-outlined:focus,.ant-input-affix-wrapper-outlined:focus-within,.ant-input-number-outlined:focus,.ant-input-number-outlined:focus-within,.ant-input-outlined:focus,.ant-input-outlined:focus-within,.ant-select-outlined.ant-select-focused .ant-select-selector{box-shadow:none!important;outline:none!important;border-color:var(--borderColorStrong)!important}.modern-table .ant-table{background:transparent!important;border:none!important;border-radius:0!important}.modern-table .ant-table-container{border:none!important}.modern-table .ant-table-thead>tr>th{background:var(--colorBgSecondary)!important;border:none!important;font-size:11px!important;font-weight:600!important;color:var(--colorTextSecondary)!important;text-transform:uppercase;letter-spacing:.05em;padding:14px 16px!important}.modern-table .ant-table-thead>tr>th:first-child{border-top-left-radius:var(--radiusMd)!important;border-bottom-left-radius:var(--radiusMd)!important}.modern-table .ant-table-thead>tr>th:last-child{border-top-right-radius:var(--radiusMd)!important;border-bottom-right-radius:var(--radiusMd)!important}.modern-table .ant-table-thead>tr>th:before{display:none!important}.modern-table .ant-table-tbody>tr>td{border:none!important;background:transparent!important;padding:18px 16px!important;font-size:14px}.modern-table .ant-table-tbody>tr:last-child>td{border-bottom:none!important}.modern-table .ant-table-tbody>tr:hover>td{background:var(--colorBgHover)!important}.modern-table .ant-table-tbody>tr.ant-table-row-selected>td{background:var(--colorBgSelected)!important;border:0!important;box-shadow:none!important;outline:0!important}.ant-btn-default{border-color:var(--borderColor)!important;background:transparent!important;box-shadow:none!important}.ant-btn-default:hover{background:var(--colorBgHover)!important;border-color:var(--borderColorStrong)!important;color:var(--colorText)!important}.ant-btn-primary{background:var(--colorText)!important;color:var(--colorBg)!important;box-shadow:none!important;border:none!important}.ant-btn-primary:hover{background:var(--colorTextSecondary)!important;color:var(--colorBg)!important}.ant-row{row-gap:24px}.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-input-password,.ant-input-search .ant-input,.ant-input-search .ant-input-group-addon .ant-btn,.ant-mentions,.ant-picker,.ant-select-selector{min-height:34px;border:1px solid var(--borderColor)!important;background:var(--colorBgSecondary)!important;border-radius:var(--radiusSm)!important;box-shadow:none!important;outline:none!important}.ant-input-affix-wrapper>input.ant-input,.ant-input-affix-wrapper>textarea.ant-input,.ant-input-number .ant-input-number-input,.ant-input-password>input.ant-input,.ant-input-search .ant-input-affix-wrapper>input.ant-input{min-height:auto;border:0!important;background:transparent!important;border-radius:0!important;box-shadow:none!important;outline:none!important}.ant-input-affix-wrapper-focused,.ant-input-affix-wrapper:focus,.ant-input-affix-wrapper:hover,.ant-input-focused,.ant-input-number-focused,.ant-input-number:hover,.ant-input-password:hover,.ant-input:focus,.ant-input:hover,.ant-picker-focused,.ant-picker:hover,.ant-select-focused .ant-select-selector,.ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-color:var(--colorBrand)!important;background:var(--colorBgElevated)!important;box-shadow:none!important;outline:none!important}.ant-btn:focus-visible,.ant-input-affix-wrapper:focus-visible,.ant-input:focus-visible,.ant-picker:focus-visible,.ant-select-selector:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:none!important;box-shadow:none!important}.ant-input-group-wrapper .ant-input-wrapper,.ant-input-search .ant-input-group{display:flex;align-items:stretch}.ant-input-search .ant-input,.ant-input-search .ant-input-affix-wrapper{border-start-end-radius:0!important;border-end-end-radius:0!important}.ant-input-search .ant-input-group-addon .ant-btn{border-start-start-radius:0!important;border-end-start-radius:0!important;border-left:0!important}.ant-input-affix-wrapper{padding-inline-start:11px!important;padding-inline-end:11px!important}.ant-input-affix-wrapper .ant-input-prefix{margin-inline-end:8px!important;color:var(--colorTextTertiary)!important}.ant-input-affix-wrapper .ant-input-suffix{margin-inline-start:8px!important}.ant-input-affix-wrapper>input.ant-input{padding-inline-start:0!important}.ant-table-wrapper,.ant-table-wrapper .ant-spin-container,.ant-table-wrapper .ant-spin-nested-loading,.ant-table-wrapper .ant-table,.ant-table-wrapper .ant-table-body,.ant-table-wrapper .ant-table-container,.ant-table-wrapper .ant-table-content{background:transparent!important;border:0!important;box-shadow:none!important}.ant-table-wrapper .ant-table-cell:before,.ant-table-wrapper .ant-table-container:after,.ant-table-wrapper .ant-table-container:before{display:none!important}.ant-table-wrapper .ant-table-thead>tr>th{height:auto!important;padding:10px 12px!important;border:0!important;background:var(--colorBgSecondary)!important;color:var(--colorTextSecondary)!important;font-size:12px!important;font-weight:600!important;line-height:1.45!important;vertical-align:middle!important}.ant-table-wrapper .ant-table-tbody>tr>td{height:auto!important;min-height:0!important;padding:11px 12px!important;border:0!important;background:transparent!important;color:var(--colorText)!important;line-height:1.5!important;vertical-align:middle!important;overflow:visible!important;white-space:normal;word-break:break-word}.ant-table-wrapper .ant-table-tbody>tr.ant-table-row:hover>td,.ant-table-wrapper .ant-table-tbody>tr:hover>td{background:var(--colorBgHover)!important}.ant-table-wrapper .ant-table-tbody>tr.ant-table-row-selected>td{background:var(--colorBgSelected)!important}.ant-table-wrapper .ant-table-expanded-row>td,.ant-table-wrapper .ant-table-placeholder>td{background:transparent!important}.ant-table-wrapper .ant-table-cell .ant-btn,.ant-table-wrapper .ant-table-cell .ant-space,.ant-table-wrapper .ant-table-cell .ant-tag{vertical-align:middle}.ant-table-wrapper .ant-table-cell .ant-typography,.ant-table-wrapper .ant-table-cell div,.ant-table-wrapper .ant-table-cell p,.ant-table-wrapper .ant-table-cell span{max-height:none;line-height:inherit}.ant-table-wrapper .ant-table-cell-ellipsis{white-space:normal!important}.ant-table-wrapper .ant-table-cell-ellipsis .ant-table-cell-content{display:block;overflow:visible;text-overflow:clip;white-space:normal}.ant-alert-description,.ant-alert-message,.ant-breadcrumb-link,.ant-btn,.ant-dropdown-menu-title-content,.ant-menu-title-content,.ant-select-selection-item,.ant-tabs-tab-btn,.ant-tag{display:inline-flex;align-items:center;gap:6px;min-width:0}.ant-btn{justify-content:center;line-height:1.2!important}.ant-btn .anticon,.ant-btn svg,.ant-menu-item svg,.ant-menu-item-icon,.ant-tabs-tab .anticon,.ant-tabs-tab svg,.ant-tag .anticon,.ant-tag svg,.anticon,.sidebarItem svg,.topbarBtn svg{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1;vertical-align:-.125em}.ant-space{align-items:center}.ant-alert+.ant-card,.ant-card+.ant-alert,.ant-card+.ant-card,.cardGlass+.cardGlass{margin-top:16px!important}.ant-card-head{margin-bottom:14px!important}.ant-card .ant-typography,.ant-card ol,.ant-card p,.ant-card ul{line-height:1.65}.ant-card .ant-typography:last-child,.ant-card ol:last-child,.ant-card p:last-child,.ant-card ul:last-child{margin-bottom:0!important}.ant-tabs>.ant-tabs-nav,.ant-tabs>div>.ant-tabs-nav{margin:0 0 18px!important;padding:0 2px!important}.ant-tabs .ant-tabs-tab{padding:10px 12px!important;margin:0 4px 0 0!important}.ant-tabs .ant-tabs-content-holder{padding-top:2px}.ant-tabs-card>.ant-tabs-nav .ant-tabs-tab{border-radius:var(--radiusSm) var(--radiusSm) 0 0!important}.ant-form-item{margin-bottom:18px!important}.ant-form-item-label>label{align-items:center;height:auto!important;color:var(--colorText)!important;font-weight:500}.ant-form-item-explain,.ant-form-item-extra{margin-top:6px;font-size:12px}.ant-collapse-header,.ant-descriptions-item,.ant-list-item{align-items:center!important}.ant-table-wrapper.modern-table,.ant-table-wrapper.modern-table *,.modern-table.ant-table-wrapper,.modern-table.ant-table-wrapper *{border-color:transparent!important}.modern-table .ant-table,.modern-table .ant-table-body,.modern-table .ant-table-container,.modern-table .ant-table-content,.modern-table .ant-table-header,.modern-table .ant-table-tbody,.modern-table .ant-table-thead,.modern-table table{border:0!important;box-shadow:none!important;outline:0!important}.modern-table .ant-table-expanded-row>td,.modern-table .ant-table-selection-column,.modern-table .ant-table-tbody>tr>td,.modern-table .ant-table-thead>tr>th{height:auto!important;min-height:0!important;border:0!important;border-inline-end:0!important;border-bottom:0!important;box-shadow:none!important;outline:0!important;line-height:1.55!important;vertical-align:middle!important}.modern-table .ant-table-tbody>tr>td{padding:10px 12px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}.modern-table .ant-table-thead>tr>th{padding:9px 12px!important;border-radius:0!important}.modern-table .ant-table-cell-ellipsis,.modern-table .truncate{overflow:visible!important;text-overflow:clip!important;white-space:normal!important;max-height:none!important}.modern-table .ant-table-row-expand-icon-cell,.modern-table .ant-table-selection-column{text-align:center!important;vertical-align:middle!important;white-space:nowrap!important}.modern-table .ant-table-cell .anticon,.modern-table .ant-table-cell svg,.modern-table .ant-table-row-expand-icon{display:inline-flex!important;align-items:center!important;justify-content:center!important;vertical-align:middle!important}.modern-table .ant-table-expanded-row-fixed,.modern-table .ant-table-expanded-row>td>div{border:0!important}.modern-table .ant-table-tbody>tr{height:auto!important;min-height:44px!important}.modern-table .ant-table-cell{height:auto!important;max-height:none!important;overflow:visible!important}.modern-table .ant-table-cell .ant-tag,.modern-table .ant-table-cell .ant-typography,.modern-table .ant-table-cell a,.modern-table .ant-table-cell button,.modern-table .ant-table-cell>*{max-height:none!important;overflow:visible!important;line-height:1.45!important}.modern-table .ant-table-body{overflow-y:auto!important;overflow-x:hidden!important}.ant-card,.cardGlass,[class*=Card],[class*=card]{box-shadow:none!important}.ant-card:hover,.cardGlass:hover,.group:hover,.hover\:border-\[var\(--borderColorStrong\)\]:hover,.hover\:border-\[var\(--colorBrand\)\]:hover{border-color:transparent!important;box-shadow:none!important}.active,.ant-card.ant-card-bordered:hover,.ant-list-item-selected,.ant-list-item.active,.ant-menu-item-selected,.ant-menu-submenu-selected>.ant-menu-submenu-title,.ant-segmented-item-selected,.ant-select-item-option-selected,.ant-table-row-selected>td,.ant-tabs-tab-active,.ant-tabs-tab.ant-tabs-tab-active,.ant-tree-node-selected,.selected,[aria-selected=true],[data-selected=true]{border-color:transparent!important;box-shadow:none!important;outline:0!important}
@@ -1 +0,0 @@
1
- self.__BUILD_MANIFEST = (function(a){return {__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:a,__routerFilterDynamic:a,"/_error":["static\u002Fchunks\u002Fpages\u002F_error.js"],"/documents":["static\u002Fchunks\u002Fpages\u002Fdocuments.js"],"/knowledge/files":["static\u002Fchunks\u002Fpages\u002Fknowledge\u002Ffiles.js"],sortedPages:["\u002F_app","\u002F_error","\u002Fdocuments","\u002Fknowledge\u002Ffiles"]}}(void 0));self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()
@@ -1 +0,0 @@
1
- self.__SSG_MANIFEST=new Set;self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()