@customize-agent/server 4.60.30 → 4.60.32

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 (175) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +285 -193
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/required-server-files.json +1 -1
  5. package/.next/routes-manifest.json +6 -0
  6. package/.next/server/chunks/1243.js +1 -1
  7. package/.next/server/chunks/6321.js +1 -1
  8. package/.next/server/chunks/6822.js +1 -1
  9. package/.next/server/chunks/{4722.js → 7848.js} +14 -14
  10. package/.next/server/chunks/8204.js +1 -1
  11. package/.next/server/chunks/9666.js +43 -42
  12. package/.next/server/instrumentation.js +1 -1
  13. package/.next/server/instrumentation.js.nft.json +1 -1
  14. package/.next/server/middleware-build-manifest.js +1 -1
  15. package/.next/server/pages/404.html +1 -1
  16. package/.next/server/pages/500.html +1 -1
  17. package/.next/server/pages/api/config/embedding/healthCheck.js +2 -1
  18. package/.next/server/pages/api/config/embedding.js +2 -1
  19. package/.next/server/pages/api/config/healthCheck.js +2 -1
  20. package/.next/server/pages/api/config/models.js +2 -1
  21. package/.next/server/pages/api/config/providers/[provider].js +2 -1
  22. package/.next/server/pages/api/config/providers.js +2 -1
  23. package/.next/server/pages/api/config/reset.js +3 -0
  24. package/.next/server/pages/api/config/reset.js.nft.json +1 -0
  25. package/.next/server/pages/api/config/web-access.js +2 -1
  26. package/.next/server/pages/api/documents/export.js +1 -1
  27. package/.next/server/pages/api/documents/generate/preview.js +1 -1
  28. package/.next/server/pages/api/documents/generate.js +1 -1
  29. package/.next/server/pages/api/health.js +1 -1
  30. package/.next/server/pages/api/kb/features.js +2 -1
  31. package/.next/server/pages/api/prompt/chat.js +3 -2
  32. package/.next/server/pages/api/system/reset.js +1 -1
  33. package/.next/server/pages/canvas/[id].html +1 -1
  34. package/.next/server/pages/canvas.html +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/index.html +1 -1
  38. package/.next/server/pages/jobs.html +1 -0
  39. package/.next/server/pages/jobs.js.nft.json +1 -0
  40. package/.next/server/pages/knowledge/file-detail.html +1 -1
  41. package/.next/server/pages/knowledge/files.html +1 -1
  42. package/.next/server/pages/knowledge/manage.html +1 -1
  43. package/.next/server/pages/knowledge/source-preview.html +1 -1
  44. package/.next/server/pages/knowledge.html +1 -1
  45. package/.next/server/pages/models.html +1 -1
  46. package/.next/server/pages/overview.html +1 -1
  47. package/.next/server/pages/prompt.html +1 -1
  48. package/.next/server/pages/settings.html +1 -1
  49. package/.next/server/pages/skills/[id]/edit.html +1 -1
  50. package/.next/server/pages/skills/[id]/edit.js.nft.json +1 -1
  51. package/.next/server/pages/skills/[id].html +1 -1
  52. package/.next/server/pages/skills/[id].js.nft.json +1 -1
  53. package/.next/server/pages/skills/new.html +1 -1
  54. package/.next/server/pages/skills/new.js.nft.json +1 -1
  55. package/.next/server/pages/skills.html +1 -1
  56. package/.next/server/pages/system/logs.html +1 -1
  57. package/.next/server/pages-manifest.json +39 -37
  58. package/.next/static/279fd5e41d98af82751903f8ea0267af84a75c794a35915a6e294777024190f8/_buildManifest.js +1 -0
  59. package/.next/static/chunks/1141-d420a7685bc3623c.js +1 -0
  60. package/.next/static/chunks/1210-703ad87eaeee1e4e.js +15 -0
  61. package/.next/static/chunks/1499-ff8f02f6bb6f3d45.js +10 -0
  62. package/.next/static/chunks/1702-f5e99af7aface475.js +1 -0
  63. package/.next/static/chunks/2864-b040f2bffa08c139.js +6 -0
  64. package/.next/static/chunks/3456-70bb03a39473f693.js +1 -0
  65. package/.next/static/chunks/3980-73841c40d55ddfa1.js +1 -0
  66. package/.next/static/chunks/4052-199e61ca9e6a33e7.js +1 -0
  67. package/.next/static/chunks/4337-a670a1a94ab505d9.js +1 -0
  68. package/.next/static/chunks/4530-e73bdd645bb7a953.js +1 -0
  69. package/.next/static/chunks/4565-3c5ff667062ccec9.js +21 -0
  70. package/.next/static/chunks/4665-1984a3d8b0573fa1.js +1 -0
  71. package/.next/static/chunks/5061-80765d4a612286e0.js +1 -0
  72. package/.next/static/chunks/5544-d77b8289662b4c28.js +4 -0
  73. package/.next/static/chunks/5760-f4191aac081b12d4.js +11 -0
  74. package/.next/static/chunks/6409-5a3bb0fbad4f64b1.js +14 -0
  75. package/.next/static/chunks/6506-ac0ba7338cc84b7d.js +1 -0
  76. package/.next/static/chunks/6748-07b0b05bf03c72f0.js +1 -0
  77. package/.next/static/chunks/7217-416b8488e0d2d498.js +1 -0
  78. package/.next/static/chunks/7576-ba6fc03060415b0e.js +1 -0
  79. package/.next/static/chunks/7646-159733564c7eb8dc.js +1 -0
  80. package/.next/static/chunks/7795-c11ff1a81c67c5aa.js +1 -0
  81. package/.next/static/chunks/8318-cb3a94de1617f983.js +1 -0
  82. package/.next/static/chunks/8338-b2ea00050048ba9f.js +4 -0
  83. package/.next/static/chunks/8399-a001bb2a0cb1640b.js +16 -0
  84. package/.next/static/chunks/8564-ac3e2f1bf87765b3.js +1 -0
  85. package/.next/static/chunks/8569-1d5c61a3f4fa0e26.js +16 -0
  86. package/.next/static/chunks/8715-ee013bd7f5ba38e8.js +1 -0
  87. package/.next/static/chunks/8750-a3c55a576effb3a6.js +1 -0
  88. package/.next/static/chunks/{787-207289f4bb577708.js → 8787-49b1f35eb4acfac9.js} +1 -1
  89. package/.next/static/chunks/{964-82cc4701f08f7351.js → 8964-e959915ecfae86b2.js} +1 -1
  90. package/.next/static/chunks/9551-f4b09bf2213ad571.js +16 -0
  91. package/.next/static/chunks/9605-3dee531f8a7ecbe0.js +4 -0
  92. package/.next/static/chunks/9937-e4b2deadd24e3962.js +1 -0
  93. package/.next/static/chunks/framework-9cde5013cd555765.js +1 -0
  94. package/.next/static/chunks/main-b313efde54fa6d2e.js +1 -0
  95. package/.next/static/chunks/pages/_app-646f249ed0cc363f.js +140 -0
  96. package/.next/static/chunks/pages/_error-c01b6fb772028676.js +1 -0
  97. package/.next/static/chunks/pages/canvas/[id]-18865f1b7e3a4696.js +1 -0
  98. package/.next/static/chunks/pages/canvas-47a86f1679c159af.js +1 -0
  99. package/.next/static/chunks/pages/documents-a1af5c6be26daed2.js +1 -0
  100. package/.next/static/chunks/pages/guide-fdf0822dc1d28813.js +1 -0
  101. package/.next/static/chunks/pages/index-c572e9caa60cb278.js +1 -0
  102. package/.next/static/chunks/pages/jobs-ebd1877dbf788a83.js +1 -0
  103. package/.next/static/chunks/pages/knowledge/file-detail-3d1ffd43f4f0e47b.js +1 -0
  104. package/.next/static/chunks/pages/knowledge/files-b796702bb5f8ac50.js +1 -0
  105. package/.next/static/chunks/pages/knowledge/manage-6d7b21cdca1255f2.js +1 -0
  106. package/.next/static/chunks/pages/knowledge/{source-preview-814c683fc3723177.js → source-preview-24936b9a746ed07f.js} +1 -1
  107. package/.next/static/chunks/pages/knowledge-2a776c1740386874.js +1 -0
  108. package/.next/static/chunks/pages/models-e679c45d71631078.js +1 -0
  109. package/.next/static/chunks/pages/overview-7e8018014009682e.js +1 -0
  110. package/.next/static/chunks/pages/prompt-11f87694feb6514c.js +1 -0
  111. package/.next/static/chunks/pages/settings-e8dcaba1551a0b2b.js +1 -0
  112. package/.next/static/chunks/pages/skills/[id]/edit-99e616d5019e80b1.js +1 -0
  113. package/.next/static/chunks/pages/skills/[id]-71f696be252bbf0d.js +1 -0
  114. package/.next/static/chunks/pages/skills/new-00886ea4c676f927.js +1 -0
  115. package/.next/static/chunks/pages/skills-8ad2577b4aa17f3b.js +1 -0
  116. package/.next/static/chunks/pages/system/logs-0856f7c65432befb.js +1 -0
  117. package/.next/static/chunks/{webpack-6224d37324e372cb.js → webpack-2da1769ff35eb1ed.js} +1 -1
  118. package/.next/static/css/808682ca3875966b.css +1 -0
  119. package/messages/en-US.json +35 -1
  120. package/messages/zh-CN.json +35 -1
  121. package/package.json +3 -3
  122. package/scripts/brand-moon-fit.cjs +0 -47
  123. package/scripts/generate-brand-assets.cjs +0 -41
  124. package/scripts/half-built-scan.allow.json +16 -6
  125. package/scripts/half-built-scan.baseline.json +2 -17
  126. package/scripts/half-built-scan.mjs +1 -84
  127. package/.next/server/chunks/6021.js +0 -1
  128. package/.next/static/chunks/127-7d37d37dab02bd10.js +0 -1
  129. package/.next/static/chunks/162-36b2a3e6ee7d9717.js +0 -8
  130. package/.next/static/chunks/257-879f095890deadad.js +0 -1
  131. package/.next/static/chunks/313-4b3ff7075e0ff3c3.js +0 -1
  132. package/.next/static/chunks/318-ca122b774ea4ee84.js +0 -1
  133. package/.next/static/chunks/338-19ccbaec57a7bf9c.js +0 -4
  134. package/.next/static/chunks/499-2233cadc6d4da647.js +0 -10
  135. package/.next/static/chunks/530-98c3b3fbf3fcd8e3.js +0 -1
  136. package/.next/static/chunks/551-446a9d48add4944f.js +0 -16
  137. package/.next/static/chunks/569-2bfdde9e402af5b2.js +0 -16
  138. package/.next/static/chunks/576-6699fed6c88502fe.js +0 -1
  139. package/.next/static/chunks/579-fc0a2eb64aedb001.js +0 -1
  140. package/.next/static/chunks/665-0634aa49137defc4.js +0 -1
  141. package/.next/static/chunks/711-40c1a2dbd15c2807.js +0 -21
  142. package/.next/static/chunks/715-6285c5942e5ec5ea.js +0 -1
  143. package/.next/static/chunks/717-743b697a417dd5ee.js +0 -4
  144. package/.next/static/chunks/748-e13db510f76568b1.js +0 -1
  145. package/.next/static/chunks/795-3edd02531a6d39ae.js +0 -1
  146. package/.next/static/chunks/808-0506edc7454b5c0e.js +0 -1
  147. package/.next/static/chunks/864-b06700e1a4e573f2.js +0 -6
  148. package/.next/static/chunks/880-64d8a15c524106d2.js +0 -1
  149. package/.next/static/chunks/955-f0542d4dea118b62.js +0 -1
  150. package/.next/static/chunks/framework-4b565b3ddc94cdac.js +0 -1
  151. package/.next/static/chunks/main-0c91f573696223ca.js +0 -1
  152. package/.next/static/chunks/pages/_app-5f5b2094ef219088.js +0 -185
  153. package/.next/static/chunks/pages/_error-282257fbdcc167b4.js +0 -1
  154. package/.next/static/chunks/pages/canvas/[id]-792d02e3874c19c0.js +0 -1
  155. package/.next/static/chunks/pages/canvas-e011bb88585d3441.js +0 -1
  156. package/.next/static/chunks/pages/documents-e6a80f2de39c6fd2.js +0 -1
  157. package/.next/static/chunks/pages/guide-3185f12fbcb5a6af.js +0 -1
  158. package/.next/static/chunks/pages/index-cb27bfa36c212ab5.js +0 -1
  159. package/.next/static/chunks/pages/knowledge/file-detail-c34e1f995fb8316f.js +0 -1
  160. package/.next/static/chunks/pages/knowledge/files-b3ef5324e4b74c4a.js +0 -1
  161. package/.next/static/chunks/pages/knowledge/manage-d9eaebf3a8307953.js +0 -1
  162. package/.next/static/chunks/pages/knowledge-3afd4bc337d44550.js +0 -1
  163. package/.next/static/chunks/pages/models-e07b2e29595effd7.js +0 -1
  164. package/.next/static/chunks/pages/overview-8713b5d37af0eeb3.js +0 -1
  165. package/.next/static/chunks/pages/prompt-47a1ac955831dedb.js +0 -1
  166. package/.next/static/chunks/pages/settings-8879d8c90bee2025.js +0 -1
  167. package/.next/static/chunks/pages/skills/[id]/edit-88e2490a4190467b.js +0 -1
  168. package/.next/static/chunks/pages/skills/[id]-4700cd743c5efe05.js +0 -1
  169. package/.next/static/chunks/pages/skills/new-b2204742b055565a.js +0 -1
  170. package/.next/static/chunks/pages/skills-1f6bcb42cd90abeb.js +0 -1
  171. package/.next/static/chunks/pages/system/logs-8c5dd4d06fa9d8c9.js +0 -1
  172. package/.next/static/css/cb79b8022e718258.css +0 -1
  173. package/.next/static/e20217fc48f7d7bdc8b62a7ec3647e78e1695668d237c7e44f973da8621a5ece/_buildManifest.js +0 -1
  174. package/scripts/capture-baseline.mjs +0 -353
  175. /package/.next/static/{e20217fc48f7d7bdc8b62a7ec3647e78e1695668d237c7e44f973da8621a5ece → 279fd5e41d98af82751903f8ea0267af84a75c794a35915a6e294777024190f8}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6012],{1611:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"}},12887:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"}},13018:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"}},13067:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0010.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 00-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"}}]},name:"file-excel",theme:"outlined"}},14569:e=>{e.exports={featureLabel:"style_featureLabel__XFSTX",featureValue:"style_featureValue__I_wMP",filterInput:"style_filterInput__4_Elu",filterSelect:"style_filterSelect__vUBJ9",statusCard:"style_statusCard__H7Mee",statusSummary:"style_statusSummary__7KavF",statusSummaryText:"style_statusSummaryText__Shw3j",statusClearBtn:"style_statusClearBtn__uJ9bE",statusExpandBtn:"style_statusExpandBtn__HhgIj",statusFilters:"style_statusFilters__g_LbG",filterPill:"style_filterPill__1pjFW",filterPillActive:"style_filterPillActive___UZVi",statusPanel:"style_statusPanel__9arTu",statusEmpty:"style_statusEmpty__8LWzH",timelineList:"style_timelineList__dqJrz",timelineItem:"style_timelineItem__dbuL_",timelineStatusIcon:"style_timelineStatusIcon__SkRwb",timelinePercent:"style_timelinePercent__pEyH4",timelineRow:"style_timelineRow__EDOVa",timelineTitle:"style_timelineTitle__Yujr8",timelineClose:"style_timelineClose__Byx_9",timelineDetail:"style_timelineDetail__nALei",timelineDesc:"style_timelineDesc__FMjWE",timelinePath:"style_timelinePath__C9VQI",timelineMeta:"style_timelineMeta__u_pCn",timelineMetaTag:"style_timelineMetaTag__G3jF1",timelineExpandArrow:"style_timelineExpandArrow__xIBdF",timelineExpandArrowOpen:"style_timelineExpandArrowOpen__TWWDC",fileNameCell:"style_fileNameCell__EHsnt",folderName:"style_folderName__VhLXP",folderRow:"style_folderRow__d7k9S",searchResultList:"style_searchResultList__cVKZg",searchResultItem:"style_searchResultItem__boj6D",searchResultHeader:"style_searchResultHeader__meVdJ",searchContent:"style_searchContent__XbUVk",pdfPreviewStrip:"style_pdfPreviewStrip__94_eG"}},23793:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"}},25258:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var a=r(51541),l=r(61848),n=r(5669),s=r(97109),o=r(72658),i=r(3638),c=r(92162),d=r(82725),u=r(74567),f=r(632),h=r(49517),m=r(79412),p=r(19527);let g=(0,d.U)(e=>{let{prefixCls:t,className:r,closeIcon:a,closable:l,type:n,title:d,children:g,footer:v,classNames:x,styles:y,...b}=e,{getPrefixCls:w}=s.useContext(u.QO),{className:j,style:A,classNames:_,styles:z}=(0,u.TP)("modal"),C=w(),k=t||w("modal"),S=(0,f.A)(C),[M,P]=(0,p.Ay)(k,S),[O,N]=(0,c.AV)([_,x],[z,y],{props:e}),E=`${k}-confirm`,H={};return H=n?{closable:l??!1,title:"",footer:"",children:s.createElement(h.k,{...e,prefixCls:k,confirmPrefixCls:E,rootPrefixCls:C,content:g})}:{closable:l??!0,title:d,footer:null!==v&&s.createElement(m.w,{...e}),children:g},s.createElement(o.Z,{prefixCls:k,className:(0,i.$)(M,`${k}-pure-panel`,n&&E,n&&`${E}-${n}`,r,j,P,S,O.root),style:{...A,...N.root},...b,closeIcon:(0,m.O)(k,a),closable:l,classNames:O,styles:N,...H})});var v=r(99739);function x(e){return(0,a.Ay)((0,a.fp)(e))}let y=n.A;y.useModal=v.A,y.info=function(e){return(0,a.Ay)((0,a.$D)(e))},y.success=function(e){return(0,a.Ay)((0,a.Ej)(e))},y.error=function(e){return(0,a.Ay)((0,a.jT)(e))},y.warning=x,y.warn=x,y.confirm=function(e){return(0,a.Ay)((0,a.lr)(e))},y.destroyAll=function(){for(;l.A.length;){let e=l.A.pop();e&&e()}},y.config=a.FB,y._InternalPanelDoNotUseOrYouWillBeFired=g;let b=y},26619:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(97109),l=r(1611),n=r(88483);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let o=a.forwardRef((e,t)=>a.createElement(n.A,s({},e,{ref:t,icon:l.A})))},26631:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(97109),l=r(12887),n=r(88483);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let o=a.forwardRef((e,t)=>a.createElement(n.A,s({},e,{ref:t,icon:l.A})))},30289:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"}},35311:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M456 231a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0zm0 280a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"more",theme:"outlined"}},38762:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(97109),l=r(13018),n=r(88483);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let o=a.forwardRef((e,t)=>a.createElement(n.A,s({},e,{ref:t,icon:l.A})))},45551:(e,t,r)=>{"use strict";r.d(t,{Jm:()=>i,fw:()=>n,je:()=>a.j,mc:()=>c,z3:()=>l});var a=r(96538);function l(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024)),r=e/Math.pow(1024,t);return"".concat(r.toFixed(+(0!==t))," ").concat(["B","KB","MB","GB","TB"][t])}function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";if(!e||e<=0)return"en-US"===t?"Never":"从未";let r=Math.floor(Math.floor((Date.now()-e)/1e3)/60),a=Math.floor(r/60),l=Math.floor(a/24);return l>30?new Date(e).toLocaleDateString(t):"en-US"===t?l>0?"".concat(l,"d ago"):a>0?"".concat(a,"h ago"):r>0?"".concat(r,"m ago"):"Just now":l>0?"".concat(l," 天前"):a>0?"".concat(a," 小时前"):r>0?"".concat(r," 分钟前"):"刚刚"}let s={document:"文档",spreadsheet:"表格",image:"图片",cad:"图纸",code:"代码",data:"数据",web:"网页",diagram:"图表",archive:"压缩包",other:"其他"},o={document:"Document",spreadsheet:"Spreadsheet",image:"Image",cad:"CAD",code:"Code",data:"Data",web:"Web",diagram:"Diagram",archive:"Archive",other:"Other"};function i(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return null!=(t=("en-US"===r?o:s)[e])?t:e}let c={active:"common.statusIndexed",outdated:"common.statusOutdated",error:"common.statusAbnormal",deleted:"common.statusDeleted",disk:"common.statusNotIndexed"}},48893:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M553.1 509.1l-77.8 99.2-41.1-52.4a8 8 0 00-12.6 0l-99.8 127.2a7.98 7.98 0 006.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 00-12.7 0zM360 442a40 40 0 1080 0 40 40 0 10-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file-image",theme:"outlined"}},53234:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM496 208H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 544h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm328 244a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"hdd",theme:"outlined"}},54746:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(97109),l=r(71242),n=r(88483);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let o=a.forwardRef((e,t)=>a.createElement(n.A,s({},e,{ref:t,icon:l.A})))},56398:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"}},58209:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(97109),l=r(23793),n=r(88483);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let o=a.forwardRef((e,t)=>a.createElement(n.A,s({},e,{ref:t,icon:l.A})))},58520:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM528.1 472h-32.2c-5.5 0-10.3 3.7-11.6 9.1L434.6 680l-46.1-198.7c-1.3-5.4-6.1-9.3-11.7-9.3h-35.4a12.02 12.02 0 00-11.6 15.1l74.2 276c1.4 5.2 6.2 8.9 11.6 8.9h32c5.4 0 10.2-3.6 11.6-8.9l52.8-197 52.8 197c1.4 5.2 6.2 8.9 11.6 8.9h31.8c5.4 0 10.2-3.6 11.6-8.9l74.4-276a12.04 12.04 0 00-11.6-15.1H647c-5.6 0-10.4 3.9-11.7 9.3l-45.8 199.1-49.8-199.3c-1.3-5.4-6.1-9.1-11.6-9.1z"}}]},name:"file-word",theme:"outlined"}},58690:(e,t,r)=>{"use strict";function a(e){var t,r,a;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{defaultPageSize:null!=(t=l.pageSize)?t:10,pageSizeOptions:null!=(r=l.pageSizeOptions)?r:[10,20,50,100],showSizeChanger:!0,showTotal:t=>{var r,a;return e(null!=(r=l.totalLabelKey)?r:"common.totalRows",null!=(a=l.totalLabelFallback)?a:"共 {count} 条").replace("{count}",String(t))},hideOnSinglePage:null!=(a=l.hideOnSinglePage)&&a,showQuickJumper:!1}}r.d(t,{B:()=>a})},61825:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(97109),l=r(30289),n=r(88483);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let o=a.forwardRef((e,t)=>a.createElement(n.A,s({},e,{ref:t,icon:l.A})))},71242:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"}},74183:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge",function(){return r(84607)}])},76830:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(97109),l=r(56398),n=r(88483);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let o=a.forwardRef((e,t)=>a.createElement(n.A,s({},e,{ref:t,icon:l.A})))},84607:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>eo});var a=r(65321),l=r(97109),n=r(39507),s=r(43220),o=r.n(s),i=r(86109),c=r(17807),d=r(25258),u=r(11702),f=r(71102),h=r(85114),m=r(7576),p=r(57271),g=r(33442),v=r(38964),x=r(56768),y=r(48893),b=r(88483);function w(){return(w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let j=l.forwardRef((e,t)=>l.createElement(b.A,w({},e,{ref:t,icon:y.A})));var A=r(13067);function _(){return(_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let z=l.forwardRef((e,t)=>l.createElement(b.A,_({},e,{ref:t,icon:A.A})));var C=r(58520);function k(){return(k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let S=l.forwardRef((e,t)=>l.createElement(b.A,k({},e,{ref:t,icon:C.A})));var M=r(90939);function P(){return(P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let O=l.forwardRef((e,t)=>l.createElement(b.A,P({},e,{ref:t,icon:M.A})));var N=r(53234);function E(){return(E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let H=l.forwardRef((e,t)=>l.createElement(b.A,E({},e,{ref:t,icon:N.A})));var R=r(61825),F=r(26619),B=r(29606),L=r(26631),T=r(64254),V=r(64629),I=r(58209),D=r(35311);function q(){return(q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let U=l.forwardRef((e,t)=>l.createElement(b.A,q({},e,{ref:t,icon:D.A})));var J=r(30486),Q=r(54746),$=r(58740),W=r(38762),X=r(76830),K=r(39219),G=r(22931),Z=r(6578),Y=r(45551),ee=r(14569),et=r.n(ee),er=r(58690),ea=r(93360);let el=["document","spreadsheet","image","cad","code","data","web","diagram","archive","other"],en=/\.(zip|jar|war|apk|tar|gz|tgz|bz2|rar|7z)$/iu,es=/(^|\/)\.DS_Store$|(^|\/)Thumbs\.db$|(^|\/)__MACOSX\/|\.bak$/iu;function eo(){let e=(0,n.Vr)("knowledge"),{locale:t}=(0,n.x_)(),{message:r}=c.A.useApp(),[s,y]=(0,l.useState)(!1),[b,w]=(0,l.useState)([]),[A,_]=(0,l.useState)(""),[C,k]=(0,l.useState)(!1),M=(0,l.useCallback)(async()=>{try{w(await (0,Z.Ls)())}catch(t){r.error(e("ignoreRulesLoadFailed"))}},[e]),P=(0,l.useCallback)(()=>{y(!0),_(""),M()},[M]),N=(0,l.useCallback)(async()=>{let t=A.trim();if(t){k(!0);try{await (0,Z.YO)([t]),_(""),await M(),r.success(e("ignoreRulesAdded"))}catch(t){r.error(e("ignoreRulesSaveFailed"))}finally{k(!1)}}},[A,M,e]),E=(0,l.useCallback)(async t=>{k(!0);try{await (0,Z.Pw)(t),await M(),r.success(e("ignoreRulesDeleted"))}catch(t){r.error(e("ignoreRulesSaveFailed"))}finally{k(!1)}},[M,e]),D=(0,i.useRouter)(),q="string"==typeof D.query.category?D.query.category:"",{stats:ee,reload:eo}=function(){let[e,t]=(0,l.useState)(null),[r,a]=(0,l.useState)(!1),n=(0,l.useCallback)(async()=>{a(!0);try{t(await (0,Z.hc)())}catch(e){}finally{a(!1)}},[]);return(0,l.useEffect)(()=>{n()},[n]),{stats:e,loading:r,reload:n}}(),[ei,ec]=(0,l.useState)([]),[ed,eu]=(0,l.useState)(!1),[ef,eh]=(0,l.useState)(""),[em,ep]=(0,l.useState)(""),[eg,ev]=(0,l.useState)(q),[ex,ey]=(0,l.useState)(!1),[eb,ew]=(0,l.useState)(!1),[ej,eA]=(0,l.useState)([]),[e_,ez]=(0,l.useState)([]),[eC,ek]=(0,l.useState)([]),[eS,eM]=(0,l.useState)({}),eP=(0,l.useRef)(eg),eO=(0,l.useRef)(new Set),eN=(0,l.useRef)(new Map);(0,l.useEffect)(()=>{eP.current=eg},[eg]),(0,l.useEffect)(()=>{ev("string"==typeof D.query.category?D.query.category:"")},[D.query.category]);let eE=(0,l.useCallback)(async()=>{try{let e=await (0,Z.BO)(),t={};for(let r of e)t[r.category]=r.fileCount;eM(t)}catch(e){}},[]);(0,l.useEffect)(()=>{eE()},[eE]);let eH=(0,l.useCallback)(async(e,t)=>{let r=null!=e?e:eP.current;(null==t?void 0:t.silent)||(eu(!0),eh(""));try{let e=await (0,Z.HT)({category:r||void 0,limit:5e3});ec(e.files||[]),e.initializing&&window.setTimeout(()=>{eH(r,{silent:!0})},3e3)}catch(e){(null==t?void 0:t.silent)||(ec([]),eh(e instanceof Error?e.message:"文件列表加载失败"))}finally{(null==t?void 0:t.silent)||eu(!1)}},[]);(0,l.useEffect)(()=>{eH(eg)},[eg,eH]);let eR=(0,l.useCallback)(async e=>{await eH(void 0,e),eo(),eE()},[eE,eH,eo]),eF=e=>"document"===e.type?null:{id:e.id,type:e.type,title:e.title,description:e.message,status:e.status,percent:e.percent,filePath:e.filePath,chunkCount:e.chunkCount,textLength:e.textLength,extractionMode:e.extractionMode,error:e.error,createdAt:e.createdAt},eB=(0,l.useCallback)(async()=>{try{let t=await (0,Z.Qx)(),r=t.operations.map(eF).filter(e=>!!e);for(let r of[...eO.current]){var e;let a=t.operations.find(e=>e.id===r);if(!a)continue;let l="".concat(a.status,":").concat(a.stage),n=null!=(e=eN.current.get(r))?e:"";"success"===a.status||"error"===a.status?(eO.current.delete(r),eN.current.delete(r),eR({silent:!0})):l!==n&&(eN.current.set(r,l),eR({silent:!0}))}eA(e=>{let t=new Set(r.map(e=>e.id).filter(Boolean)),a=r.map(t=>{var r;let a=e.find(e=>e.id===t.id);return a?{...a,...t,createdAt:null!=(r=a.createdAt)?r:t.createdAt}:t}),l=e.filter(e=>e.id&&!t.has(e.id)&&"processing"===e.status);return[...a,...l].slice(0,50)})}catch(e){}},[eR]),eL=(0,l.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];eA(r=>{let a=r.findIndex(r=>e.id&&r.id===e.id||t.includes(r.title));if(a>=0){var l;let t=[...r];return t[a]={...r[a],...e,createdAt:null!=(l=r[a].createdAt)?l:e.createdAt},t}return[e,...r].slice(0,50)})},[]);(0,l.useEffect)(()=>{eB()},[eB]);let eT=(0,l.useMemo)(()=>{let e=0,t=0,r=0;for(let a of ej)"processing"===a.status?e++:"success"===a.status?t++:("error"===a.status||"warning"===a.status)&&r++;return{processing:e,success:t,error:r}},[ej]);(0,l.useEffect)(()=>{if(0===eT.processing)return;let e=window.setInterval(()=>{eB()},2e3),t=window.setInterval(()=>{eR({silent:!0})},8e3);return()=>{window.clearInterval(e),window.clearInterval(t)}},[eB,eR,eT.processing]);let eV=async e=>{let t=e.filter(e=>{let t=e.webkitRelativePath||e.name;return e.size>0&&!en.test(e.name)&&!es.test(t)}),a=e.length-t.length;if(a>0&&r.warning("已跳过 ".concat(a," 个空文件、系统文件、备份文件或压缩包")),0===t.length)return;let l=1===t.length?t[0].name:"".concat(t.length," 个文件");ey(!0);let n="".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2));eO.current.add(n),eN.current.set(n,""),eL({id:n,type:"upload",title:"上传 ".concat(l),description:"等待上传、解析、切片和入库;同路径文件会更新,其他已有文件不会清除",status:"processing",percent:5});try{await (0,Z.c1)(t,void 0,n,e=>{eL({id:n,type:"upload",title:"上传 ".concat(l),description:"正在上传文件:".concat(e.uploadedFiles,"/").concat(e.totalFiles,",批次 ").concat(e.batchIndex+1,"/").concat(e.totalBatches),status:"processing",percent:Math.min(5,Math.max(1,Math.round(e.uploadedFiles/Math.max(1,e.totalFiles)*5)))})});let e=em||eg?"当前筛选(".concat([em?"搜索「".concat(em,"」"):"",eg?"分类「".concat(eg,"」"):""].filter(Boolean).join(" + "),")不会自动清空——新文件若未出现在列表里,调整筛选即可看到"):"新文件会随解析进度出现在列表里";r.info("文件已上传,正在后台解析、切片和入库;同路径文件会更新,其他已有文件不会清除,可在顶部“后台任务”查看进度。".concat(e)),await eB()}catch(e){if(e instanceof Z.NH){let t=e.failures.slice(0,3).map(e=>"批次 ".concat(e.batchIndex+1,"(").concat(e.files.join("、")).concat(e.files.length<5?"":" 等","):").concat(e.message)).join(";");r.warning("".concat(e.message,",失败文件可重新选择上传")),eL({id:n,type:"upload",title:"部分文件上传失败 ".concat(l),description:t||e.message,status:"warning",percent:100,error:t||e.message})}else{eO.current.delete(n),eN.current.delete(n);let t=e instanceof Error?e.message:"请重试或检查文件格式";r.error(t||"上传失败"),eL({id:n,type:"error",title:"上传失败 ".concat(l),description:t,status:"error",percent:100})}}finally{ey(!1),eR({silent:!0})}},eI=async()=>{ew(!0);let e="reindex-ui-".concat(Date.now());eL({id:e,type:"reindex",title:"重新解析入库",description:"正在提交后台任务",status:"processing",percent:5});try{var t;let a=await (0,Z.H1)(),l=a.operationId||e,n=a.job;r.info(a.alreadyRunning?"已有重新解析任务正在后台执行":"已提交重新解析入库任务,可在顶部“后台任务”查看进度"),eL({id:l,type:"reindex",title:(null==n?void 0:n.title)||"重新解析入库",description:(null==n?void 0:n.message)||"后台将重新扫描文件、解析、切片并重建索引",status:(null==n?void 0:n.status)||"processing",percent:null!=(t=null==n?void 0:n.percent)?t:10,error:null==n?void 0:n.error},["重新解析入库"]);for(let e=0;e<360;e++){let e=await (0,Z.ax)(l).then(e=>e.job).catch(async()=>(await (0,Z.Qx)()).operations.find(e=>e.id===l));if(e){let t="success"===e.status||"error"===e.status;if(eL({id:l,type:"error"===e.status?"error":"reindex",title:"success"===e.status?"重新解析入库完成":"error"===e.status?"重新解析入库失败":e.title,description:e.error||e.message,status:e.status,percent:e.percent,filePath:e.filePath,chunkCount:e.chunkCount,error:e.error}),t){"success"===e.status?r.success(e.message||"重新解析入库完成"):r.error(e.error||e.message||"重新解析入库失败");break}}await new Promise(e=>setTimeout(e,1e3))}await eR(),await eB()}catch(a){let t=a instanceof Error?a.message:"重新解析入库失败";r.error(t),eL({id:e,type:"error",title:"重新解析入库失败",description:t,status:"error",percent:100},["重新解析入库","重新解析入库完成","重新解析入库失败"])}finally{ew(!1)}},eD=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a="file-reindex-ui-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2));eL({id:a,type:"reindex",title:"".concat(t?"重新解析文件夹":"重新解析"," ").concat(e),description:t?"正在提交文件夹后台任务":"正在提交单文件后台任务",status:"processing",percent:5,filePath:e});try{var l;let t=await (0,Z.HC)(e),n=t.operationId||a,s=t.job;r.info(t.alreadyRunning?"已有知识库任务正在后台执行":"已提交单文件重新解析任务"),eL({id:n,type:"reindex",title:(null==s?void 0:s.title)||"重新解析 ".concat(e),description:(null==s?void 0:s.message)||"后台将重新解析、分块并入库该文件",status:(null==s?void 0:s.status)||"processing",percent:null!=(l=null==s?void 0:s.percent)?l:10,filePath:(null==s?void 0:s.filePath)||e,chunkCount:null==s?void 0:s.chunkCount,error:null==s?void 0:s.error},["重新解析 ".concat(e)]);for(let t=0;t<240;t++){let t=await (0,Z.ax)(n).then(e=>e.job).catch(async()=>(await (0,Z.Qx)()).operations.find(e=>e.id===n));if(t){let a="success"===t.status||"error"===t.status;if(eL({id:n,type:"error"===t.status?"error":"reindex",title:"success"===t.status?"重新解析完成 ".concat(e):"error"===t.status?"重新解析失败 ".concat(e):t.title,description:t.error||t.message,status:t.status,percent:t.percent,filePath:t.filePath||e,chunkCount:t.chunkCount,error:t.error}),await eH(),a){"success"===t.status?r.success(t.message||"单文件重新解析完成"):r.error(t.error||t.message||"单文件重新解析失败");break}}await new Promise(e=>setTimeout(e,1e3))}await eR(),await eB()}catch(l){let t=l instanceof Error?l.message:"单文件重新解析失败";r.error(t),eL({id:a,type:"error",title:"重新解析失败 ".concat(e),description:t,status:"error",percent:100,filePath:e},["重新解析 ".concat(e)])}},eq=t=>{let a="selected"===t?e0:"filtered"===t?eJ.map(e=>e.relativePath):[],l=ei.length;if("all"!==t&&0===a.length||"all"===t&&0===l)return void r.info("没有可删除的文件");let n="all"===t?"删除全部文件 ".concat(l," 个?"):"filtered"===t?"删除当前筛选结果中的文件 ".concat(a.length," 个?"):"删除已选文件 ".concat(a.length," 个?");d.A.confirm({title:n,content:"将同时删除文件、切片、索引和向量记录。此操作不可撤销。",okText:e("common.delete"),cancelText:e("common.cancel"),okButtonProps:{danger:!0},onOk:async()=>{eA(e=>[{type:"delete",title:n,description:"正在批量删除文件和索引",status:"processing",percent:10},...e].slice(0,50));try{var e;let n=null!=(e=("all"===t?await (0,Z.X8)():"selected"===t?await (0,Z.tZ)(eY,eZ):await (0,Z.SJ)(a)).deleted)?e:"all"===t?l:a.length;r.success("已删除 ".concat(n," 个文件")),ez([]),eA(e=>[{type:"delete",title:"批量删除完成",description:"已删除 ".concat(n," 个文件、切片和索引"),status:"success"},...e].slice(0,50)),await eR(),await eB()}catch(t){let e=t instanceof Error&&t.message?t.message:"批量删除失败";r.error(e),eA(t=>[{type:"error",title:"批量删除失败",description:e,status:"error"},...t].slice(0,50))}}})},eU=async()=>{if(0===eY.length&&0===eZ.length)return;let t=r.loading(e("exporting"),0);try{let{blob:t,fileName:a,exported:l,skipped:n}=await (0,Z.G8)({relativePaths:eY,folderPaths:eZ}),s=URL.createObjectURL(t),o=document.createElement("a");o.href=s,o.download=a,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(s),n>0?r.warning(e("exportParsedSkipped").replace("{count}",String(n))):r.success(e("exportParsedSuccess").replace("{count}",String(l)))}catch(t){r.error(t instanceof Error&&t.message?t.message:e("exportParsedFailed"))}finally{t()}},eJ=(0,l.useMemo)(()=>em?ei.filter(e=>e.relativePath.toLowerCase().includes(em.toLowerCase())):ei,[em,ei]),eQ=(0,l.useMemo)(()=>new Set(eJ.map(e=>e.relativePath)),[eJ]),e$=(0,l.useMemo)(()=>ei.filter(e=>"error"===e.status).length,[ei]),eW=(0,l.useMemo)(()=>{let r=el.filter(e=>"other"!==e),a=Object.keys(eS).filter(e=>!r.includes(e)&&"other"!==e);return[{label:e("allCategories"),value:""},...[...r,...a,"other"].map(e=>{var r;let a=null!=(r=eS[e])?r:0,l=(0,Y.Jm)(e,t);return{label:a>0?"".concat(l," (").concat(a,")"):l,value:e}})]},[eS,t,e]),eX=(0,l.useMemo)(()=>{let e={};for(let r of[...eJ].sort((e,t)=>e.relativePath.localeCompare(t.relativePath))){let a=r.relativePath.split("/"),l="";for(let n=0;n<a.length;n++){let s=a[n],o=l;l=l?"".concat(l,"/").concat(s):s;let i=n===a.length-1;if(e[l])i||e[l].isFolder?i&&(e[l].isFolder=!1,e[l].file=r,e[l].fileCount=1,e[l].totalSize=r.fileSize,e[l].totalChunks=r.chunkCount):(e[l].isFolder=!0,e[l].children=[],e[l].fileCount=0,e[l].totalSize=0,e[l].totalChunks=0);else{var t;e[l]={key:l,name:s,isFolder:!i,...i?{file:r,fileCount:1,totalSize:r.fileSize,totalChunks:r.chunkCount}:{children:[],fileCount:0,totalSize:0,totalChunks:0}},o&&(null==(t=e[o])?void 0:t.children)&&e[o].children.push(e[l])}}}let r=e=>{for(let n of e)if(n.children){r(n.children);let e=0,s=0,o=0;for(let r of n.children){var t,a,l;e+=null!=(t=r.fileCount)?t:0,s+=null!=(a=r.totalSize)?a:0,o+=null!=(l=r.totalChunks)?l:0}n.fileCount=e,n.totalSize=s,n.totalChunks=o}},a=e=>e.map(e=>e.children?{...e,children:a(e.children)}:e).filter(e=>{var t,r,a;return!e.isFolder||(null!=(r=e.fileCount)?r:0)>0&&(null!=(a=null==(t=e.children)?void 0:t.length)?a:0)>0}),l=Object.values(e).filter(e=>!e.key.includes("/"));return r(l),a(l)},[eJ]),eK=(0,l.useMemo)(()=>{let e=[],t=r=>{for(let a of r)e.push(a.key),a.children&&t(a.children)};return t(eX),e},[eX]),eG=(0,l.useMemo)(()=>new Set([...eQ,...eK]),[eK,eQ]),eZ=(0,l.useMemo)(()=>e_.map(String).filter(e=>!eQ.has(e)&&eK.includes(e)),[eK,e_,eQ]),eY=(0,l.useMemo)(()=>e_.map(String).filter(e=>eQ.has(e)),[e_,eQ]),e0=(0,l.useMemo)(()=>{let e=new Set;for(let t of eY){let r=ei.find(e=>e.relativePath===t);r&&e.add(r.relativePath)}for(let t of eZ){let r="".concat(t,"/");for(let t of ei)t.relativePath.startsWith(r)&&e.add(t.relativePath)}return Array.from(e)},[ei,eY,eZ]),e1=e0.length;(0,l.useEffect)(()=>{ez(e=>e.filter(e=>eG.has(String(e))))},[eG]);let e2=(0,l.useRef)(em);(0,l.useEffect)(()=>{e2.current!==em&&(e2.current=em,ek(em?eK:[]))},[em,eK]);let e4=(e,t)=>{ek(r=>e?[...r,t.key]:r.filter(e=>e!==t.key))},e3=[{title:e("fileName"),dataIndex:"name",key:"name",render:(e,t)=>(0,a.jsxs)("span",{className:et().fileNameCell,children:[t.isFolder?(0,a.jsx)("span",{style:{cursor:"pointer"},onClick:e=>{e.stopPropagation(),e4(!eC.includes(t.key),t)},children:(e=>{let t=e.children;return t&&0!==t.length?(0,a.jsx)(T.A,{style:{color:"#fa8c16",fontSize:15}}):(0,a.jsx)(B.A,{style:{color:"#fa8c16",fontSize:15}})})(t)}):(e=>{if(!e)return(0,a.jsx)(x.A,{style:{fontSize:15}});let t=e.category;return"image"===t?(0,a.jsx)(j,{style:{color:"#eb2f96",fontSize:15}}):"spreadsheet"===t?(0,a.jsx)(z,{style:{color:"#52c41a",fontSize:15}}):"document"===t?(0,a.jsx)(S,{style:{color:"#1677ff",fontSize:15}}):"code"===t?(0,a.jsx)(O,{style:{color:"#fa8c16",fontSize:15}}):"archive"===t?(0,a.jsx)(H,{style:{color:"#8c8c8c",fontSize:15}}):"web"===t?(0,a.jsx)(R.A,{style:{color:"#13c2c2",fontSize:15}}):"data"===t?(0,a.jsx)(F.A,{style:{color:"#722ed1",fontSize:15}}):"cad"===t?(0,a.jsx)(B.A,{style:{color:"#fa541c",fontSize:15}}):"diagram"===t?(0,a.jsx)(j,{style:{color:"#a0d911",fontSize:15}}):(0,a.jsx)(L.A,{style:{fontSize:15}})})(t.file),t.isFolder?(0,a.jsx)("span",{className:et().folderName,onClick:e=>{e.stopPropagation(),e4(!eC.includes(t.key),t)},children:t.name}):(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(o(),{className:"min-w-0 max-w-[520px] whitespace-normal break-words leading-relaxed",href:"/knowledge/file-detail?relativePath=".concat(encodeURIComponent(t.key)),children:t.name})})]})},{title:e("fileCategory"),dataIndex:"category",key:"cat",width:110,render:(e,r)=>{var l,n;return r.isFolder?(0,a.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"—"}):(0,a.jsx)(u.A,{children:(0,Y.Jm)(null!=(n=null==(l=r.file)?void 0:l.category)?n:"",t)})}},{title:e("fileSize"),dataIndex:"fileSize",key:"size",width:90,render:(e,t)=>{var r,a,l;return(0,Y.z3)(t.isFolder?null!=(a=t.totalSize)?a:0:null!=(l=null==(r=t.file)?void 0:r.fileSize)?l:0)}},{title:e("chunksCount"),dataIndex:"chunkCount",key:"chunks",width:80,render:(e,t)=>{var r,l,n;let s=t.isFolder?null!=(l=t.totalChunks)?l:0:null!=(n=null==(r=t.file)?void 0:r.chunkCount)?n:0;return(0,a.jsx)(u.A,{color:s>1?"green":"orange",children:s})}},{title:e("parsingStatus"),dataIndex:"status",key:"status",width:100,render:(e,t)=>{var r,l,n,s;return t.isFolder?(0,a.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"—"}):(0,a.jsx)(u.A,{color:"active"===(s=null==(r=t.file)?void 0:r.status)?"green":"processing"===s||"indexing"===s?"blue":"error"===s?"red":"orange",children:(null==(l=t.file)?void 0:l.errorMessage)||(null==(n=t.file)?void 0:n.status)||"—"})}},{title:e("fileDate"),dataIndex:"mtime",key:"date",width:130,render:(e,r)=>{var l;return r.isFolder?(0,a.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"—"}):(null==(l=r.file)?void 0:l.mtime)?new Date(r.file.mtime).toLocaleDateString(t):"—"}},{title:e("source"),key:"source",width:100,render:(t,r)=>r.isFolder?(0,a.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"—"}):(0,a.jsx)(u.A,{color:"cyan",children:e("fileSource")})},{title:"",key:"act",width:80,align:"center",render:(t,l)=>{var n;return(0,a.jsx)(f.A,{menu:{items:l.isFolder?[{key:"reindex-folder",label:"重新索引文件夹",icon:(0,a.jsx)(V.A,{}),disabled:(null!=(n=l.fileCount)?n:0)===0,onClick:()=>{eD(l.key,!0)}}]:[{key:"reindex",label:e("reindex"),icon:(0,a.jsx)(V.A,{}),onClick:()=>{eD(l.file.relativePath)}},{type:"divider"},{key:"delete",label:e("delete"),icon:(0,a.jsx)(I.A,{}),danger:!0,onClick:()=>{var t;return t=l.file,void d.A.confirm({title:e("delete"),content:e("deleteConfirm"),okText:e("common.confirm"),cancelText:e("common.cancel"),okButtonProps:{danger:!0},onOk:async()=>{eA(e=>[{type:"delete",title:"删除 ".concat(t.relativePath),description:"正在删除文件记录",status:"processing"},...e].slice(0,50));try{await (0,Z.xq)(t.relativePath),r.success("已删除"),eA(e=>[{type:"delete",title:"删除完成 ".concat(t.relativePath),description:"文件和索引记录已移除",status:"success"},...e].slice(0,50)),ez([]),await eR(),await eB()}catch(a){let e=a instanceof Error&&a.message?a.message:"删除失败";r.error(e),eA(r=>[{type:"error",title:"删除失败 ".concat(t.relativePath),description:e,status:"error"},...r].slice(0,50))}}})}}]},trigger:["click"],children:(0,a.jsx)(h.Ay,{type:"text",size:"small",icon:(0,a.jsx)(U,{})})})}}],e6=(0,a.jsxs)("div",{className:"flex flex-1 md:flex-none w-full md:w-auto items-center gap-3",children:[(0,a.jsx)(m.A,{placeholder:e("searchPlaceholder"),prefix:(0,a.jsx)(J.A,{className:"text-[var(--colorTextTertiary)]"}),value:em,onChange:e=>{ep(e.target.value)},allowClear:!0,variant:"borderless",className:"max-w-[420px] flex-1 bg-transparent hover:bg-transparent focus:bg-transparent",style:{borderBottom:"1px solid var(--borderColor)",borderRadius:0,paddingLeft:0,paddingRight:0}}),(0,a.jsx)(p.A,{value:eg||void 0,onChange:e=>{ev(e||"")},placeholder:e("filterCategory"),allowClear:!0,style:{width:170},variant:"borderless",options:eW}),(0,a.jsx)("div",{className:"w-[1px] h-6 bg-[var(--borderColor)] mx-1"}),(0,a.jsx)(f.A,{menu:{items:[{key:"file",label:e("uploadFiles"),icon:(0,a.jsx)(x.A,{}),onClick:()=>{var e;return null==(e=document.getElementById("kb-file-upload-input"))?void 0:e.click()}},{key:"folder",label:e("uploadFolder"),icon:(0,a.jsx)(B.A,{}),onClick:()=>{var e;return null==(e=document.getElementById("kb-folder-upload-input"))?void 0:e.click()}},{type:"divider"},{key:"reindex",label:e("reindexAll"),icon:(0,a.jsx)(V.A,{}),onClick:()=>{eI()},danger:!0}]},trigger:["click"],children:(0,a.jsx)(h.Ay,{type:"primary",icon:(0,a.jsx)(Q.A,{}),loading:ex||eb,className:"rounded-md px-4",children:e("new")})}),(0,a.jsx)("input",{id:"kb-file-upload-input",type:"file",multiple:!0,hidden:!0,accept:".pdf,.doc,.docx,.txt,.md,.csv,.tsv,.xls,.xlsx,.png,.jpg,.jpeg,.webp,.svg,.dwg,.dxf,.step,.stp,.iges,.igs,.js,.ts,.tsx,.jsx,.py,.go,.java,.cs,.cpp,.c,.h,.json,.jsonl,.yaml,.yml,.xml,.html,.htm,.drawio,.dio,.vsdx,.vdx,.puml,.plantuml,.mmd,.mermaid,.excalidraw",onChange:e=>{var t;let r=Array.from(null!=(t=e.target.files)?t:[]);e.target.value="",eV(r)}}),(0,a.jsx)("input",{id:"kb-folder-upload-input",type:"file",multiple:!0,hidden:!0,webkitdirectory:"",onChange:e=>{var t;let r=Array.from(null!=(t=e.target.files)?t:[]);e.target.value="",eV(r)}})]}),e8=[{icon:(0,a.jsx)(x.A,{}),label:e("totalFiles"),value:ee?String(ee.fileCount):"—"},{icon:(0,a.jsx)(F.A,{}),label:e("totalChunks"),value:ee?String(ee.chunkCount):"—"},{icon:(0,a.jsx)(H,{}),label:e("totalSize"),value:ee?(0,Y.z3)(ee.totalSizeBytes):"—"},{icon:(0,a.jsx)($.A,{}),label:e("lastIndexed"),value:ee?ee.lastIndexedAt?(0,Y.fw)(ee.lastIndexedAt,t):e("common.never"):"—"}];return(0,a.jsxs)("div",{className:"h-[calc(100vh_-_240px)] flex flex-col",children:[(0,a.jsx)(ea.z,{title:e("title"),description:e("description"),extra:e6}),(0,a.jsx)("div",{className:"bg-[var(--colorBgContainer)] rounded-2xl border border-[var(--borderColor)] px-6 py-5 mb-4 shrink-0 animateFadeIn",children:(0,a.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 stagger-1",children:e8.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-xl bg-[var(--colorBgHover)] flex items-center justify-center text-xl text-[var(--colorTextSecondary)]",children:e.icon}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-[11px] font-semibold text-[var(--colorTextTertiary)] uppercase tracking-wider mb-1",children:e.label}),(0,a.jsx)("div",{className:"text-xl font-bold text-[var(--colorText)] leading-none truncate",children:e.value})]})]},e.label))})}),ef&&(0,a.jsx)("div",{role:"alert",className:"p-4 mb-4 bg-[var(--colorDanger)]/10 text-[var(--colorDanger)] rounded-xl border border-[var(--colorDanger)]/20",children:ef}),(0,a.jsxs)("div",{className:"flex-1 min-h-0 bg-[var(--colorBgContainer)] rounded-2xl border border-[var(--borderColor)] overflow-hidden flex flex-col animateFadeIn stagger-3",style:{opacity:0},children:[(0,a.jsxs)("div",{className:"flex flex-wrap justify-between items-center gap-3 p-4 bg-[var(--colorBgHover)] border-b border-[var(--borderColor)] shrink-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs text-[var(--colorTextSecondary)] font-medium",children:[(0,a.jsx)("span",{children:e("showingMatchingFiles").replace("{count}",String(eJ.length))}),e$>0&&(0,a.jsxs)(u.A,{color:"red",icon:(0,a.jsx)(W.A,{}),className:"m-0 border-0",children:[e("parsingErrors")," ",e$]})]}),(0,a.jsxs)(g.A,{size:8,children:[e1>0&&(0,a.jsxs)(h.Ay,{size:"small",icon:(0,a.jsx)(X.A,{}),onClick:()=>void eU(),className:"rounded-lg",children:[e("exportParsed")," (",e1,")"]}),e1>0&&(0,a.jsxs)(h.Ay,{danger:!0,size:"small",icon:(0,a.jsx)(I.A,{}),onClick:()=>eq("selected"),className:"rounded-lg",children:[e("deleteSelected")," (",e1,")"]}),(0,a.jsx)(h.Ay,{danger:!0,size:"small",disabled:0===ei.length,onClick:()=>eq("all"),className:"rounded-lg",children:e("deleteAll")}),(0,a.jsx)(h.Ay,{size:"small",onClick:P,className:"rounded-lg",children:e("ignoreRules")})]})]}),(0,a.jsx)(v.A,{rowKey:"key",columns:e3,dataSource:eX,loading:ed&&!ex&&!eb,size:"middle",className:"flex-1 border-0 tableFillHeight",expandable:{expandedRowKeys:eC,onExpand:e4,expandIcon:e=>{let{expanded:t,onExpand:r,record:l}=e;return l.isFolder?(0,a.jsx)("button",{type:"button",onClick:e=>r(l,e),className:"w-6 h-6 mr-1 inline-flex items-center justify-center align-middle text-[var(--colorTextTertiary)] hover:text-[var(--colorText)] transition-colors bg-transparent border-0 p-0 leading-none",children:t?(0,a.jsx)(K.A,{size:16}):(0,a.jsx)(G.A,{size:16})}):null}},locale:{emptyText:ef?"—":ed?e("common.loading"):em?e("emptySearch"):e("noFiles")},pagination:(0,er.B)(e,{totalLabelKey:"knowledge.topLevelCount",totalLabelFallback:"共 {count} 个顶层项目"}),rowClassName:e=>"hover:bg-[var(--colorBgHover)] transition-colors ".concat(e.isFolder?"font-medium bg-[var(--colorBgSecondary)]/30":""),rowSelection:{selectedRowKeys:e_,onChange:ez,checkStrictly:!1,getCheckboxProps:e=>{var t;return{disabled:!!e.isFolder&&(null!=(t=e.fileCount)?t:0)===0}}}})]}),(0,a.jsxs)(d.A,{title:e("ignoreRules"),open:s,onCancel:()=>y(!1),footer:null,width:560,children:[(0,a.jsx)("p",{className:"text-xs text-[var(--colorTextSecondary)] m-0 mb-3",children:e("ignoreRulesHint")}),(0,a.jsxs)(g.A.Compact,{style:{width:"100%"},className:"mb-3",children:[(0,a.jsx)(m.A,{value:A,onChange:e=>_(e.target.value),onPressEnter:()=>void N(),placeholder:e("ignoreRulesPlaceholder"),"aria-label":e("ignoreRulesAdd")}),(0,a.jsx)(h.Ay,{type:"primary",loading:C,onClick:()=>void N(),children:e("ignoreRulesAdd")})]}),0===b.length?(0,a.jsx)("p",{className:"text-xs text-[var(--colorTextTertiary)] m-0",children:e("ignoreRulesEmpty")}):(0,a.jsx)("ul",{className:"m-0 p-0 list-none flex flex-col gap-2",children:b.map(t=>(0,a.jsxs)("li",{className:"flex items-center justify-between gap-3 rounded-lg border border-[var(--borderColor)] px-3 py-2",children:[(0,a.jsx)("code",{className:"text-xs break-all",children:t}),(0,a.jsx)(h.Ay,{size:"small",danger:!0,type:"text",disabled:C,onClick:()=>void E(t),children:e("ignoreRulesDelete")})]},t))})]})]})}},90939:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"}},93360:(e,t,r)=>{"use strict";r.d(t,{z:()=>n});var a=r(65321);r(97109);var l=r(33442);function n(e){let{title:t,description:r,extra:n,bottomContent:s}=e;return(0,a.jsxs)("div",{className:"animateFadeIn",children:[(0,a.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,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2",children:t}),r&&(0,a.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)] m-0",children:r})]}),n&&(0,a.jsx)(l.A,{className:"w-full sm:w-auto overflow-x-auto pb-1 sm:pb-0 shrink-0",size:"middle",wrap:!1,children:n})]}),s&&(0,a.jsx)("div",{className:"mt-6",children:s})]})}},96538:(e,t,r)=>{"use strict";r.d(t,{a:()=>l,j:()=>n});let a={coarse:function(e,t){let r=Math.floor(e/1e3),a=Math.floor(r/86400),l=Math.floor(r%86400/3600),n=Math.floor(r%3600/60),s="en-US"===t;return a>0?s?"".concat(a,"d ").concat(l,"h"):"".concat(a," 天 ").concat(l," 小时"):l>0?s?"".concat(l,"h ").concat(n,"m"):"".concat(l," 小时 ").concat(n," 分"):n>0?s?"".concat(n,"m"):"".concat(n," 分"):s?"Just now":"刚刚"},fine:function(e){let t=Math.round(e/1e3);if(t<60)return"".concat(t," 秒");let r=Math.floor(t/60);return r<60?"".concat(r," 分 ").concat(t%60," 秒"):"".concat(Math.floor(r/60)," 小时 ").concat(r%60," 分")},"fine-decimal":function(e){return e>=6e4?"".concat(Math.floor(e/6e4)," 分 ").concat(Math.round(e%6e4/1e3)," 秒"):"".concat((e/1e3).toFixed(1)," 秒")},metric:function(e){return e<1e3?"".concat(Math.round(e),"ms"):e<6e4?"".concat((e/1e3).toFixed(1),"s"):"".concat((e/6e4).toFixed(1),"min")}};function l(e,t){var r;return a[t.style](function(e,t){let r="s"===t?1e3*e:e;return Number.isFinite(r)&&r>0?r:0}(e,t.unit),null!=(r=t.locale)?r:"zh-CN")}function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return l(e,{unit:"s",style:"coarse",locale:t})}}},e=>{e.O(0,[6409,1210,1702,5544,9551,4665,7576,1499,8338,8964,636,6593,8792],()=>e(e.s=74183)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4046],{22708:(e,a,l)=>{"use strict";l.r(a),l.d(a,{default:()=>R});var s=l(65321),r=l(97109),o=l(39507),t=l(93360),n=l(17807),i=l(88762),d=l(85493),c=l(85114),m=l(25258),x=l(56985),p=l(84253),h=l(88278),v=l(33442),u=l(32965),g=l(11702),b=l(57271),j=l(7576),y=l(48318),f=l(34052),A=l(63455),N=l(44534),w=l(8383),C=l(54746),k=l(29071),S=l(59188),T=l(4216),B=l(13114),E=l(99650),P=l(58209),K=l(76981),I=l(61825),U=l(6578),H=l(85310),_=l(82238);let z=[{labelKey:"models.openAICompatible",value:"openai"},{labelKey:"models.anthropic",value:"anthropic"},{labelKey:"models.google",value:"google"},{labelKey:"models.ollama",value:"ollama"},{labelKey:"models.openRouter",value:"openrouter"}],D=[{key:"imageGeneration",labelKey:"models.imageGeneration"},{key:"imageUnderstanding",labelKey:"models.imageUnderstanding"},{key:"fileUnderstanding",labelKey:"models.fileUnderstanding"},{key:"audio",labelKey:"models.audioCapability"},{key:"video",labelKey:"models.videoCapability"}],F="••••••••",O=e=>e.includes("•");function R(){let e=(0,o.Vr)(),{message:a}=n.A.useApp(),[l,R]=(0,r.useState)(!0),[Z,G]=(0,r.useState)([]),[L,X]=(0,r.useState)(null),[q,M]=(0,r.useState)(!1),[V,J]=(0,r.useState)(null),[Q,W]=(0,r.useState)(!1),[Y,$]=(0,r.useState)(!1),[ee,ea]=(0,r.useState)(null),[el,es]=(0,r.useState)(null),[er,eo]=(0,r.useState)({}),[et,en]=(0,r.useState)(!1),[ei,ed]=(0,r.useState)(!1),[ec,em]=(0,r.useState)(""),[ex,ep]=(0,r.useState)(""),[eh,ev]=(0,r.useState)(""),[eu,eg]=(0,r.useState)(""),[eb,ej]=(0,r.useState)(""),[ey,ef]=(0,r.useState)("openai"),[eA,eN]=(0,r.useState)(!1),[ew,eC]=(0,r.useState)({}),[ek,eS]=(0,r.useState)(!1),[eT,eB]=(0,r.useState)(!1),[eE,eP]=(0,r.useState)(!1),[eK,eI]=(0,r.useState)(!1),[eU,eH]=(0,r.useState)(!1),[e_,ez]=(0,r.useState)([]),eD=async()=>{R(!0);try{let e=[],a=(a,l,s)=>l.catch(()=>(e.push(a),s)),[l,s,r]=await Promise.all([a("模型供应商",(0,U.Z3)(),null),a("生成模型",(0,U.zr)(),null),a("嵌入配置",(0,U.II)(),null)]);ez(e),l&&G(l),s&&X(s),r&&J(r)}catch(l){a.error(e("common.error"))}finally{R(!1)}};(0,r.useEffect)(()=>{eD()},[]);let eF=async()=>{eH(!0);try{let l=await (0,U.jU)(eK?"all":"models");eP(!1),eI(!1),a.success(e("models.resetConfigDone")),l.backupPath&&a.info(e("models.resetConfigBackup").replace("{path}",l.backupPath),8),"models"===l.mode&&a.info(e("models.resetConfigKeptProviders"),8),await eD()}catch(l){a.error(l instanceof Error?l.message:e("models.resetConfigFailed"))}finally{eH(!1)}},eO=e_.includes("模型供应商"),eR=e_.includes("生成模型"),eZ=async e=>{var a,l,s,r;ed(!0),em(e.name),ep(e.name),ev(null!=(s=null==L||null==(a=L.list.find(a=>a.provider===e.name))?void 0:a.name)?s:e.name),eg(""),ej(e.baseUrl||""),eN(!0===e.directEndpoint),ef(e.protocol||e.detectedProtocol||"openai"),eC(e.capabilities||{}),eS(!!(null==(l=e.capabilities)?void 0:l.webSearch));try{let a=await (0,U.Bh)(e.name);eg(a.apiKey?F:""),ej(a.baseUrl||""),eC(a.capabilities||{}),eN(!0===a.directEndpoint),eS(!!(null==(r=a.capabilities)?void 0:r.webSearch))}catch(e){}en(!0)},eG=async()=>{if(ex.trim()){eB(!0);try{let l=ei&&O(eu)?void 0:eu||void 0,s={...ew,webSearch:ek};await (0,U._m)(ex.trim(),{modelName:eh.trim()||ex.trim(),oldName:ei?ec:void 0,apiKey:l,baseUrl:eb||void 0,protocol:ey,directEndpoint:eA,capabilities:s}),en(!1),await eD(),a.success(e("common.success"))}catch(l){a.error(e("common.error"))}finally{eB(!1)}}},eL=async l=>{try{await (0,U.h1)(l),await eD(),a.success(e("common.success"))}catch(l){a.error(e("common.error"))}},eX=async l=>{es(l);try{let s=await (0,U.bZ)(l);eo(e=>({...e,[l]:s.success}));let r=s.success?e("models.connected"):"".concat(e("models.connectionFailed")).concat(s.message?":".concat(s.message):"").concat(s.requestId?" (".concat(s.requestId,")"):"");a[s.success?"success":"error"](r)}catch(s){eo(e=>({...e,[l]:!1})),a.error(s instanceof Error?s.message:e("models.connectionFailed"))}finally{es(null)}},eq=async l=>{if(q)return!1;M(!0);try{let e=await (0,U.aP)(l);return X(e.models),!0}catch(l){return a.error(l instanceof Error?l.message:e("common.error")),!1}finally{M(!1)}},eM=async e=>{if(!L)return;let a=L.list.find(a=>a.provider===e),l=null!=a?a:{provider:e,name:e};await eq({active:{provider:l.provider,name:l.name},list:a?L.list:[...L.list,l]})},eV=async()=>{if(V){W(!0);try{let l=await (0,U.dd)(V);J(l),ea(null),a.success(e("common.success"))}catch(l){a.error(e("common.error"))}finally{W(!1)}}},eJ=async()=>{$(!0);try{let l=await (0,U.u6)();ea(l.success),a[l.success?"success":"error"](l.message||(l.success?e("models.connected"):e("models.connectionFailed")))}catch(e){ea(!1)}finally{$(!1)}};return l?(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(i.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,s.jsx)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-xl border border-[var(--borderColor)]",children:(0,s.jsx)(i.A,{active:!0,paragraph:{rows:6}})}),(0,s.jsx)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-xl border border-[var(--borderColor)]",children:(0,s.jsx)(i.A,{active:!0,paragraph:{rows:4}})}),(0,s.jsx)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-xl border border-[var(--borderColor)]",children:(0,s.jsx)(i.A,{active:!0,paragraph:{rows:3}})})]}):(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(_.X,{failures:e_}),e_.length>0&&(0,s.jsx)(d.A,{type:"error",showIcon:!0,message:e("models.configBrokenTitle"),description:(0,s.jsxs)("div",{className:"text-xs",children:[(0,s.jsx)("div",{children:e("models.configBrokenBody")}),(0,s.jsx)(c.Ay,{className:"mt-2",size:"small",danger:!0,icon:(0,s.jsx)(w.A,{}),onClick:()=>eP(!0),children:e("models.resetConfig")})]})}),(0,s.jsx)(t.z,{title:e("models.title"),description:e("models.description"),extra:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Ay,{danger:!0,icon:(0,s.jsx)(w.A,{}),onClick:()=>eP(!0),children:e("models.resetConfig")}),(0,s.jsx)(c.Ay,{type:"primary",icon:(0,s.jsx)(C.A,{}),onClick:()=>{ed(!1),em(""),ep(""),ev(""),eg(""),ej(""),ef("openai"),eN(!1),eC({}),eS(!1),en(!0)},children:e("models.addProvider")})]})}),(0,s.jsx)(m.A,{open:eE,title:e("models.resetConfigTitle"),okText:e("models.resetConfig"),cancelText:e("common.cancel"),okButtonProps:{danger:!0,loading:eU},onOk:()=>void eF(),onCancel:()=>{eP(!1),eI(!1)},children:(0,s.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,s.jsx)("div",{children:e("models.resetConfigBody")}),(0,s.jsx)(x.A,{checked:eK,onChange:e=>eI(e.target.checked),children:e("models.resetConfigIncludeAll")}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)]",children:e("models.resetConfigBackupNote")})]})}),(0,s.jsx)(H.Zk,{title:e("models.modelList"),count:eO?void 0:Z.length,description:e("models.modelListDesc"),children:eO?(0,s.jsx)("div",{className:"py-10 rounded-xl border border-dashed border-[var(--borderColorStrong)] bg-[var(--colorBgHover)] text-center",children:(0,s.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:"—"})}):0===Z.length?(0,s.jsx)("div",{className:"py-10 rounded-xl border border-dashed border-[var(--borderColorStrong)] bg-[var(--colorBgHover)]",children:(0,s.jsx)(p.A,{image:p.A.PRESENTED_IMAGE_SIMPLE,description:(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)] text-sm",children:e("models.noProviders")})})}):(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:Z.map(a=>{var l,r,o;let t=null==L?void 0:L.list.find(e=>e.provider===a.name),n=null!=(o=null==t?void 0:t.name)?o:a.name,i=(null==L||null==(l=L.active)?void 0:l.provider)===a.name&&L.active.name===n;return(0,s.jsxs)("div",{role:"group","aria-label":a.name,className:"group p-5 ".concat(H.wD," flex flex-col"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-4 min-w-0",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)(h.Ay,{name:"generation-model-service",checked:i,disabled:eR||!L||q,onChange:()=>{eM(a.name)},children:(0,s.jsx)("span",{className:"font-bold text-base text-[var(--colorText)]",children:a.name})}),n!==a.name&&(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1 break-all",children:n}),(0,s.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)] flex items-center gap-1 uppercase tracking-wider font-semibold",children:[(0,s.jsx)(k.A,{})," ",a.protocol||a.detectedProtocol||"openai"]})]}),(0,s.jsxs)(v.A,{size:0,className:"-mr-2 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity",children:[(0,s.jsx)(c.Ay,{type:"text",size:"small",loading:el===a.name,title:e("models.testConnection"),"aria-label":e("models.testConnection"),onClick:e=>{e.stopPropagation(),eX(a.name)},icon:!0===er[a.name]?(0,s.jsx)(S.A,{className:"text-[var(--colorOk)]"}):!1===er[a.name]?(0,s.jsx)(T.A,{className:"text-[var(--colorDanger)]"}):(0,s.jsx)(B.A,{className:"text-[var(--colorTextSecondary)]"})}),(0,s.jsx)(c.Ay,{type:"text",size:"small",title:e("common.edit"),icon:(0,s.jsx)(E.A,{className:"text-[var(--colorTextSecondary)]"}),onClick:e=>{e.stopPropagation(),eZ(a)}}),(0,s.jsx)(u.A,{title:e("models.deleteProviderConfirm"),onConfirm:e=>{null==e||e.stopPropagation(),eL(a.name)},onCancel:e=>null==e?void 0:e.stopPropagation(),children:(0,s.jsx)(c.Ay,{type:"text",size:"small",danger:!0,title:e("common.delete"),icon:(0,s.jsx)(P.A,{}),onClick:e=>e.stopPropagation()})})]})]}),(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 justify-between text-xs text-[var(--colorTextSecondary)]",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(K.A,{})," ",e("models.apiKey")]}),(0,s.jsx)("span",{className:"font-mono text-[var(--colorTextTertiary)]",children:a.hasApiKey?F:e("models.none")})]}),a.baseUrl&&(0,s.jsxs)("div",{className:"flex items-center justify-between text-xs text-[var(--colorTextSecondary)]",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(I.A,{})," URL"]}),(0,s.jsx)("span",{className:"truncate max-w-[120px] font-mono text-[var(--colorTextTertiary)]",title:a.baseUrl,children:a.baseUrl.replace(/^https?:\/\//,"")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1 mt-2",children:[D.filter(e=>{var l;return null==(l=a.capabilities)?void 0:l[e.key]}).map(a=>(0,s.jsx)(g.A,{color:"blue",bordered:!1,className:"m-0 text-[10px] bg-[var(--colorBrand)]/5 text-[var(--colorBrand)] leading-[18px]",children:e(a.labelKey)},a.key)),(null==(r=a.capabilities)?void 0:r.webSearch)&&(0,s.jsx)(g.A,{color:"green",bordered:!1,className:"m-0 text-[10px] leading-[18px]",children:e("models.webEnhancement")})]})]})]},a.name)})})}),(0,s.jsx)(H.Zk,{title:e("models.embeddingConfig"),description:e("models.embeddingConfigDesc"),extra:(0,s.jsxs)(v.A,{size:6,children:[V?(0,s.jsx)(g.A,{color:"blue",bordered:!1,className:"m-0",children:"transformers-local"===V.provider?e("models.localEmbedding"):e("models.openAICompatible")}):(0,s.jsx)(g.A,{bordered:!1,className:"m-0",children:"—"}),!0===ee&&(0,s.jsx)(g.A,{color:"success",bordered:!1,className:"m-0",icon:(0,s.jsx)(S.A,{}),children:e("models.connected")}),!1===ee&&(0,s.jsx)(g.A,{color:"error",bordered:!1,className:"m-0",icon:(0,s.jsx)(T.A,{}),children:e("models.connectionFailed")})]}),children:V?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(H.dh,{children:e("models.embeddingProvider")}),(0,s.jsx)(b.A,{value:V.provider,className:"w-full h-10",variant:"borderless",style:{background:"var(--colorBgHover)",borderRadius:"8px"},options:[{label:e("models.localRecommended"),value:"transformers-local"},{label:e("models.externalAdvanced"),value:"openai-compatible"}],onChange:e=>J(a=>a?{...a,provider:e,model:"transformers-local"===e?a.model||"BAAI/bge-small-zh-v1.5":a.model,dimensions:"transformers-local"===e?512:a.dimensions||1024}:a)})]}),"openai-compatible"===V.provider&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(H.dh,{children:e("models.baseUrl")}),(0,s.jsx)(j.A,{className:"h-10 px-4 bg-[var(--colorBgHover)]",value:V.baseUrl,onChange:e=>J(a=>a?{...a,baseUrl:e.target.value}:a),placeholder:"http://localhost:11434/v1"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(H.dh,{children:e("models.model")}),(0,s.jsx)(j.A,{className:"h-10 px-4 bg-[var(--colorBgHover)]",value:V.model,onChange:e=>J(a=>a?{...a,model:e.target.value}:a),placeholder:"bge-m3"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(H.dh,{children:e("models.apiKey")}),(0,s.jsx)(j.A.Password,{className:"h-10 px-4 bg-[var(--colorBgHover)]",value:V.apiKey,onFocus:()=>{V.apiKey&&O(V.apiKey)&&J(e=>e?{...e,apiKey:""}:e)},onChange:e=>J(a=>a?{...a,apiKey:e.target.value}:a),placeholder:e("models.optional")})]})]}),"transformers-local"===V.provider&&(0,s.jsxs)("div",{children:[(0,s.jsx)(H.dh,{children:e("models.model")}),(0,s.jsx)(j.A,{className:"h-10 px-4 bg-[var(--colorBgHover)]",disabled:!0,value:V.model,placeholder:"BAAI/bge-small-zh-v1.5"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(H.dh,{children:e("models.dimensions")}),(0,s.jsx)(y.A,{className:"w-full h-10 px-2 bg-[var(--colorBgHover)] border-transparent flex items-center",min:1,value:V.dimensions,onChange:e=>J(a=>a?{...a,dimensions:Number(e||("transformers-local"===a.provider?512:1024))}:a)})]})]}),(0,s.jsxs)("div",{className:"mt-6 flex flex-wrap gap-3",children:[(0,s.jsx)(c.Ay,{type:"primary",className:"h-10 px-6 font-medium shadow-none",loading:Q,onClick:()=>{eV()},children:e("models.saveEmbedding")}),(0,s.jsx)(c.Ay,{className:"h-10 px-6 font-medium shadow-none bg-[var(--colorBgHover)] border-transparent hover:border-[var(--borderColorStrong)]",loading:Y,onClick:()=>{eJ()},children:e("models.testEmbedding")})]})]}):(0,s.jsx)("div",{className:"text-sm text-[var(--colorTextTertiary)]",children:"—"})}),(0,s.jsx)(f.A,{title:ei?e("models.editProvider"):e("models.addProvider"),open:et,onClose:()=>en(!1),size:"large",styles:{body:{padding:"24px 32px"},header:{padding:"16px 32px",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,s.jsx)(v.A,{children:(0,s.jsx)(c.Ay,{type:"primary",loading:eT,onClick:()=>{eG()},children:e("common.save")})}),children:(0,s.jsxs)(A.A,{layout:"vertical",children:[(0,s.jsx)(A.A.Item,{label:e("models.providerName"),children:(0,s.jsx)(j.A,{value:ex,onChange:e=>ep(e.target.value),placeholder:e("models.providerNamePlaceholder")})}),(0,s.jsx)(A.A.Item,{label:e("models.modelIdentifier"),help:e("models.modelIdentifierHint"),children:(0,s.jsx)(j.A,{value:eh,onChange:e=>ev(e.target.value),placeholder:ex||e("models.modelIdentifierPlaceholder")})}),(0,s.jsx)(A.A.Item,{label:e("models.apiKey"),help:ei?e("models.apiKeyEditHint"):void 0,children:(0,s.jsx)(j.A.Password,{value:eu,onFocus:()=>{ei&&O(eu)&&eg("")},onChange:e=>eg(e.target.value),placeholder:ei?e("models.apiKeyEditPlaceholder"):"sk-..."})}),(0,s.jsx)(A.A.Item,{label:e("models.baseUrl"),children:(0,s.jsx)(j.A,{value:eb,onChange:e=>ej(e.target.value),placeholder:"https://api.openai.com/v1"})}),(0,s.jsx)(A.A.Item,{label:e("models.protocol"),children:(0,s.jsx)(b.A,{value:ey,onChange:ef,options:z.map(a=>({label:e(a.labelKey),value:a.value}))})}),(0,s.jsx)(A.A.Item,{label:e("models.directEndpoint"),children:(0,s.jsx)(x.A,{checked:eA,onChange:e=>eN(e.target.checked),children:e("models.directEndpointDesc")})}),(0,s.jsxs)(A.A.Item,{label:e("models.webEnhancement"),children:[(0,s.jsx)(N.A,{checked:ek,onChange:eS}),(0,s.jsx)("span",{className:"ml-3 text-xs text-[var(--colorTextSecondary)]",children:e("models.webEnhancementDesc")})]}),(0,s.jsx)(A.A.Item,{label:e("models.capabilities"),children:(0,s.jsx)(x.A.Group,{value:D.filter(e=>ew[e.key]).map(e=>e.key),options:D.map(a=>({label:e(a.labelKey),value:a.key})),onChange:e=>eC(Object.fromEntries(D.map(a=>[a.key,e.includes(a.key)])))})})]})})]})}},77305:(e,a,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/models",function(){return l(22708)}])},82238:(e,a,l)=>{"use strict";l.d(a,{X:()=>r});var s=l(65321);function r(e){let{failures:a,note:l}=e;return 0===a.length?null:(0,s.jsxs)("div",{role:"alert",className:"rounded-xl border border-[var(--colorDanger)]/30 bg-[var(--colorDanger)]/10 px-4 py-3 text-sm text-[var(--colorDanger)]",children:["".concat(a.length," 项数据读取失败:").concat(a.join("、"),"——相关读数显示为「—」(未知),**不代表 0**;请稍后重试或查看服务端日志。"),l?(0,s.jsx)("div",{className:"mt-1 text-xs opacity-90",children:l}):null]})}},85310:(e,a,l)=>{"use strict";l.d(a,{Zk:()=>o,dh:()=>t,wD:()=>r});var s=l(65321);l(97109);let r="rounded-xl bg-[var(--colorBgContainer)] shadow-[var(--shadowSurface)] hover:shadow-[var(--shadowSurfaceHover)] transition-shadow";function o(e){let{title:a,count:l,description:r,extra:o,className:t,children:n}=e;return(0,s.jsxs)("section",{className:"rounded-2xl bg-[var(--colorBgContainer)] shadow-[var(--shadowSurface)] p-6 animateFadeIn ".concat(null!=t?t:""),children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start justify-between gap-3 mb-5",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("h2",{className:"text-base font-semibold text-[var(--colorText)] tracking-wide flex items-center gap-2 m-0",children:[a,void 0!==l&&(0,s.jsx)("span",{className:"text-[var(--colorTextTertiary)] font-normal text-sm",children:l})]}),r&&(0,s.jsx)("p",{className:"text-xs text-[var(--colorTextTertiary)] mt-1.5 mb-0 leading-relaxed max-w-3xl",children:r})]}),o]}),n]})}function t(e){let{children:a}=e;return(0,s.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:a})}},93360:(e,a,l)=>{"use strict";l.d(a,{z:()=>o});var s=l(65321);l(97109);var r=l(33442);function o(e){let{title:a,description:l,extra:o,bottomContent:t}=e;return(0,s.jsxs)("div",{className:"animateFadeIn",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 pb-6 border-b border-[var(--borderColor)]",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2",children:a}),l&&(0,s.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)] m-0",children:l})]}),o&&(0,s.jsx)(r.A,{className:"w-full sm:w-auto overflow-x-auto pb-1 sm:pb-0 shrink-0",size:"middle",wrap:!1,children:o})]}),t&&(0,s.jsx)("div",{className:"mt-6",children:t})]})}}},e=>{e.O(0,[6409,1210,1702,5544,9551,7576,8338,5061,3980,2864,4052,8318,4337,636,6593,8792],()=>e(e.s=77305)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5449],{53139:(_,e,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/overview",function(){return n(27795)}])}},_=>{_.O(0,[6409,1210,1702,8399,9605,8564,7795,636,6593,8792],()=>_(_.s=53139)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1026],{27549:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/prompt",function(){return r(69583)}])},45551:(e,t,r)=>{"use strict";r.d(t,{Jm:()=>c,fw:()=>l,je:()=>a.j,mc:()=>i,z3:()=>o});var a=r(96538);function o(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024)),r=e/Math.pow(1024,t);return"".concat(r.toFixed(+(0!==t))," ").concat(["B","KB","MB","GB","TB"][t])}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";if(!e||e<=0)return"en-US"===t?"Never":"从未";let r=Math.floor(Math.floor((Date.now()-e)/1e3)/60),a=Math.floor(r/60),o=Math.floor(a/24);return o>30?new Date(e).toLocaleDateString(t):"en-US"===t?o>0?"".concat(o,"d ago"):a>0?"".concat(a,"h ago"):r>0?"".concat(r,"m ago"):"Just now":o>0?"".concat(o," 天前"):a>0?"".concat(a," 小时前"):r>0?"".concat(r," 分钟前"):"刚刚"}let s={document:"文档",spreadsheet:"表格",image:"图片",cad:"图纸",code:"代码",data:"数据",web:"网页",diagram:"图表",archive:"压缩包",other:"其他"},n={document:"Document",spreadsheet:"Spreadsheet",image:"Image",cad:"CAD",code:"Code",data:"Data",web:"Web",diagram:"Diagram",archive:"Archive",other:"Other"};function c(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return null!=(t=("en-US"===r?n:s)[e])?t:e}let i={active:"common.statusIndexed",outdated:"common.statusOutdated",error:"common.statusAbnormal",deleted:"common.statusDeleted",disk:"common.statusNotIndexed"}},58690:(e,t,r)=>{"use strict";function a(e){var t,r,a;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{defaultPageSize:null!=(t=o.pageSize)?t:10,pageSizeOptions:null!=(r=o.pageSizeOptions)?r:[10,20,50,100],showSizeChanger:!0,showTotal:t=>{var r,a;return e(null!=(r=o.totalLabelKey)?r:"common.totalRows",null!=(a=o.totalLabelFallback)?a:"共 {count} 条").replace("{count}",String(t))},hideOnSinglePage:null!=(a=o.hideOnSinglePage)&&a,showQuickJumper:!1}}r.d(t,{B:()=>a})},69583:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>eo});var a=r(65321),o=r(97109),l=r(39507),s=r(45551),n=r(58690),c=r(6578),i=r(17807),d=r(33442),m=r(11702),p=r(85114),x=r(32965),u=r(56985),h=r(88762),g=r(45759),f=r(7576),v=r(57271),j=r(49292),y=r(84253),w=r(38964),b=r(34052),N=r(42700),S=r(55122),A=r(93360),C=r(82238);function T(e){let{idPrefix:t="prompt-writing-guide"}=e,r=(0,l.Vr)();return(0,a.jsxs)("aside",{"aria-labelledby":"".concat(t,"-title"),className:"mb-3 shrink-0 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgHover)] px-3 py-2.5 text-xs leading-relaxed",children:[(0,a.jsx)("div",{id:"".concat(t,"-title"),className:"font-semibold text-[var(--colorText)]",children:r("prompt.writingGuideTitle")}),(0,a.jsx)("p",{id:"".concat(t,"-intro"),className:"mt-1 text-[var(--colorTextSecondary)]",children:r("prompt.writingGuideIntro")}),(0,a.jsx)("p",{className:"mt-1 text-[var(--colorTextSecondary)]",children:r("prompt.writingGuideParameters")}),(0,a.jsxs)("details",{className:"mt-2",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-[var(--colorAccent)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",children:r("prompt.writingGuideDetails")}),(0,a.jsxs)("div",{className:"mt-3 max-h-[320px] overflow-y-auto pr-1 text-[var(--colorTextSecondary)]",children:[(0,a.jsx)("div",{className:"font-semibold text-[var(--colorText)]",children:r("prompt.writingGuideNeedsTitle")}),(0,a.jsxs)("ul",{className:"mt-1 list-disc space-y-1 pl-4",children:[(0,a.jsx)("li",{children:r("prompt.writingGuidePurpose")}),(0,a.jsx)("li",{children:r("prompt.writingGuideStructure")}),(0,a.jsx)("li",{children:r("prompt.writingGuideEngineering")}),(0,a.jsx)("li",{children:r("prompt.writingGuideStyle")})]}),(0,a.jsx)("div",{className:"mt-3 font-semibold text-[var(--colorText)]",children:r("prompt.writingGuideManagedTitle")}),(0,a.jsx)("p",{className:"mt-1",children:r("prompt.writingGuideManaged")}),(0,a.jsx)("p",{className:"mt-1",children:r("prompt.writingGuideAvoid")}),(0,a.jsx)("div",{className:"mt-3 font-semibold text-[var(--colorText)]",children:r("prompt.writingGuideExampleTitle")}),(0,a.jsx)("p",{className:"mt-1",children:r("prompt.writingGuideExampleHint")}),(0,a.jsx)("pre",{className:"mt-2 whitespace-pre-wrap break-words rounded-lg border border-[var(--borderColor)] bg-[var(--colorBgContainer)] p-2.5 font-mono text-[11px] text-[var(--colorText)]",children:r("prompt.writingGuideExample")}),(0,a.jsx)("p",{className:"mt-2",children:r("prompt.writingGuideOneOutline")})]})]})]})}var z=r(99650),F=r(81668),k=r(58209),E=r(26631),P=r(29606),O=r(96091),B=r(54746),M=r(30486),D=r(46082),I=r(42758),G=r(7851),R=r(84742),_=r(24810),J=r(7492);async function L(){let e=await fetch("/api/prompt");if(!e.ok)throw Error("Failed");return e.json()}async function U(e,t,r){let a=await fetch("/api/prompt",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:e,content:t,name:r})});if(!a.ok)throw Error("Failed");return a.json()}async function K(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"previewRules",content:e})});return t.ok&&(await t.json()).preview||null}async function H(e,t){let r=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"createCustom",name:e,content:t})});if(!r.ok)throw Error("Failed");return r.json()}async function X(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"select",selectedIds:e})});if(!t.ok)throw Error("Failed");return t.json()}async function $(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"import",...e&&"object"==typeof e?e:{prompts:[]}})});if(!t.ok)throw Error(await t.text());return t.json()}async function q(){return Q("",!1,60)}async function V(e){let t=await fetch("/api/kb/files/detail?relativePath=".concat(encodeURIComponent(e)));if(!t.ok)throw Error("Failed");return((await t.json()).chunks||[]).map(e=>e.content||"").filter(Boolean).join("\n\n").slice(0,12e3)}async function Q(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30;return(await (0,c.nU)({limit:r,...e.trim()?{query:e.trim()}:{},...t?{}:{includeContent:!1}})).files||[]}async function W(e,t){let r=await fetch("/api/prompt/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!r.ok){let e=await r.text();try{let r=JSON.parse(e);throw Error(r.error||r.message||e||t)}catch(r){throw Error(e||t)}}return r.json()}function Y(e,t){let r=new Blob([JSON.stringify(t,null,2)],{type:"application/json;charset=utf-8"}),a=URL.createObjectURL(r),o=document.createElement("a");o.href=a,o.download=e,o.click(),URL.revokeObjectURL(a)}function Z(e,t,r){return e?"customize-agent:prompt-chat:".concat(e.id,":").concat(e.customizePath||e.projectName):"customize-agent:prompt-chat:draft:".concat(r||t||"new")}function ee(e){let t=Date.parse(e);return Number.isNaN(t)?"-":new Date(t).toLocaleString()}function et(e){return{type:"customize-agent.prompts",version:1,exportedAt:new Date().toISOString(),prompts:e.map(e=>({name:e.projectName,content:e.content||"",selected:e.selected,source:"custom"}))}}function er(e){return e.trim().replace(/[\\/:*?"<>|]/g,"-").slice(0,80)||"untitled"}function ea(e){let t=e.match(/(^|\s)@([^\s@]*)$/);return t?t[2]:null}function eo(){let e=(0,l.Vr)(),{message:t}=i.A.useApp(),[r,c]=(0,o.useState)(!0),[eo,el]=(0,o.useState)([]),[es,en]=(0,o.useState)(!1),[ec,ei]=(0,o.useState)(null),[ed,em]=(0,o.useState)(""),[ep,ex]=(0,o.useState)(""),[eu,eh]=(0,o.useState)(!1),[eg,ef]=(0,o.useState)(!1),[ev,ej]=(0,o.useState)("all"),[ey,ew]=(0,o.useState)("mtime"),[eb,eN]=(0,o.useState)("list"),[eS,eA]=(0,o.useState)(""),[eC,eT]=(0,o.useState)(!1),[ez,eF]=(0,o.useState)([]),[ek,eE]=(0,o.useState)(""),[eP,eO]=(0,o.useState)(""),[eB,eM]=(0,o.useState)(!1),[eD,eI]=(0,o.useState)([]),[eG,eR]=(0,o.useState)([]),[e_,eJ]=(0,o.useState)([]),[eL,eU]=(0,o.useState)(!1),[eK,eH]=(0,o.useState)(!1),[eX,e$]=(0,o.useState)(!1),[eq,eV]=(0,o.useState)(null),[eQ,eW]=(0,o.useState)(!1),[eY,eZ]=(0,o.useState)([]),[e0,e1]=(0,o.useState)(!1),[e2,e3]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(!es||!ed.trim()){eV(null),eW(!1);return}eW(!0);let e=setTimeout(()=>{K(ed).then(e=>{eV(e),eW(!1)})},500);return()=>clearTimeout(e)},[ed,es]);let e5=(0,o.useRef)(null),e6=ea(eP),e4=async()=>{c(!0);try{let e,t=[],r=await (e=L(),e.catch(()=>(t.push("提示词列表"),null)));eZ(t),r&&el(r)}catch(r){t.error(e("common.error"))}finally{c(!1)}};(0,o.useEffect)(()=>{e4()},[]),(0,o.useEffect)(()=>{let e=window.localStorage.getItem("customize-agent:prompt-view-mode");("list"===e||"card"===e)&&eN(e)},[]),(0,o.useEffect)(()=>{window.localStorage.setItem("customize-agent:prompt-view-mode",eb)},[eb]),(0,o.useEffect)(()=>{let e=e5.current;e&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),ek&&window.localStorage.setItem(ek,JSON.stringify(ez.slice(-30)))},[ez,eB,ek]),(0,o.useEffect)(()=>{es||e1(!1)},[es]),(0,o.useEffect)(()=>{!es||eD.length>0||eL||e0||(eU(!0),q().then(e=>{eI(e),e1(!1)}).catch(()=>e1(!0)).finally(()=>eU(!1)))},[es,eD.length,eL,e0]),(0,o.useEffect)(()=>{let e=null==e6?void 0:e6.trim();if(!es||!e){eR([]),eH(!1),e3(!1);return}let t=!1;eH(!0);let r=window.setTimeout(()=>{Q(e).then(e=>{t||(eR(e),e3(!1))}).catch(()=>{t||(eR([]),e3(!0))}).finally(()=>{t||eH(!1)})},250);return()=>{t=!0,window.clearTimeout(r)}},[es,e6]);let e9=eY.includes("提示词列表"),e8=e=>e9?"—":String(e),e7={selected:eo.filter(e=>e.selected).length,unselected:eo.filter(e=>!e.selected).length,hasFile:eo.filter(e=>e.hasFile).length,missingFile:eo.filter(e=>!e.hasFile).length},te=eo.filter(e=>{var t;return("selected"!==ev||!!e.selected)&&("unselected"!==ev||!e.selected)&&("hasFile"!==ev||!!e.hasFile)&&("missingFile"!==ev||!e.hasFile)&&(!eS.trim()||(t=eS.trim(),!!"".concat(e.projectName,"\n").concat(e.projectRoot||"","\n").concat(e.customizePath||"","\n").concat(e.content||"").toLowerCase().includes(t.toLowerCase())))}).sort((e,t)=>"name"===ey?e.projectName.localeCompare(t.projectName):"selected"===ey&&Number(t.selected)-Number(e.selected)||Date.parse(t.mtime||"")-Date.parse(e.mtime||"")),tt=te.filter(e=>e.selected).length,tr=te.length>0&&te.every(e=>e.selected),ta=(null==e6?void 0:e6.trim())?eG:eD,to=(e,t,r)=>{let a=Z(e,t,r);eE(a),eF(function(e){try{let t=JSON.parse(window.localStorage.getItem(e)||"[]");return Array.isArray(t)?t.filter(e=>("user"===e.role||"assistant"===e.role)&&"string"==typeof e.content).slice(-30):[]}catch(e){return[]}}(a)),eO(""),eM(!1),eJ([]),e$(!1)},tl=async()=>{if(!ep.trim())return void t.error(e("prompt.nameRequired"));eh(!0);try{if(ec)await U(ec.customizePath,ed,ep.trim()),t.success(e("common.success"));else{let r=await H(ep.trim(),ed||"# ".concat(ep.trim(),"\n"));!function(e,t){if(!e||!t||e===t)return;let r=window.localStorage.getItem(e);r&&!window.localStorage.getItem(t)&&window.localStorage.setItem(t,r)}(ek,Z({id:r.id,projectId:r.id,projectName:ep.trim(),customizePath:r.id,content:ed,mtime:"",hasFile:!0,isCurrent:!1,selected:!1,source:"custom"},ep.trim())),t.success(e("common.success"))}en(!1),await e4()}catch(r){t.error(e("common.error"))}finally{eh(!1)}},ts=async e=>{let t=Array.from(new Set([...e_,...eD.filter(t=>e.includes("@".concat(t.relativePath))).map(e=>e.relativePath)])).slice(0,3),r=[];for(let e of t){let t=await V(e);t&&r.push({relativePath:e,content:t})}return r},tn=async()=>{let r=eP.trim();if(!r||eB)return;let a=[...ez,{role:"user",content:r}];eF(a),eO(""),e$(!1),eM(!0);try{let t=await ts(r),o=await W({name:ep||(null==ec?void 0:ec.projectName)||e("prompt.untitled"),content:ed,message:r,history:ez,references:t},e("prompt.chatFailed"));eF([...a,{role:"assistant",content:o.content||e("prompt.chatEmptyReply")}])}catch(r){t.error(r instanceof Error?r.message:e("prompt.chatFailed")),eF(a)}finally{eM(!1)}},tc=async(r,a)=>{let o=a?Array.from(new Set([...eo.filter(e=>e.selected).map(e=>e.id),r.id])):eo.filter(e=>e.selected&&e.id!==r.id).map(e=>e.id);try{await X(o),el(e=>e.map(e=>({...e,selected:o.includes(e.id)})))}catch(r){t.error(e("common.error"))}},ti=async r=>{let a=eo.filter(e=>e.selected).map(e=>e.id),o=te.map(e=>e.id),l=r?Array.from(new Set([...a,...o])):a.filter(e=>!o.includes(e));try{await X(l),el(e=>e.map(e=>({...e,selected:l.includes(e.id)}))),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},td=async r=>{try{if(!(await fetch("/api/prompt",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:r.customizePath})})).ok)throw Error("Failed");t.success(e("common.success")),await e4()}catch(r){t.error(e("common.error"))}},tm=async r=>{if(r){eT(!0);try{let a=await r.text(),o=JSON.parse(a),l=await $(o);t.success(e("prompt.importedCount").replace("{count}",String(l.imported))),await e4()}catch(r){t.error(e("prompt.importFailed"))}finally{eT(!1)}}},tp=t=>(0,a.jsx)(d.A,{size:4,wrap:!0,children:!t.hasFile&&(0,a.jsx)(m.A,{style:{margin:0},children:e("prompt.missingFileStatus")})}),tx=r=>(0,a.jsxs)(d.A,{size:0,onClick:e=>e.stopPropagation(),children:[(0,a.jsx)(p.Ay,{size:"small",type:"text",icon:(0,a.jsx)(z.A,{}),title:e("common.edit"),onClick:()=>{ei(r),ef(!1),ex(r.projectName),em(r.content||""),to(r,r.projectName),en(!0)}}),(0,a.jsx)(p.Ay,{size:"small",type:"text",icon:(0,a.jsx)(F.A,{}),title:e("prompt.exportOne"),onClick:()=>{Y("customize-prompt-".concat(er(r.projectName),"-").concat(new Date().toISOString().slice(0,10),".json"),et([r])),t.success(e("prompt.exportedCount").replace("{count}","1"))}}),(0,a.jsx)(x.A,{title:e("prompt.deleteCustomConfirm"),onConfirm:()=>{td(r)},children:(0,a.jsx)(p.Ay,{size:"small",type:"text",danger:!0,icon:(0,a.jsx)(k.A,{}),title:e("common.delete")})})]}),tu=[{title:e("prompt.promptName"),dataIndex:"projectName",render:(e,t)=>(0,a.jsxs)(d.A,{size:8,className:"min-w-0",children:[(0,a.jsx)(E.A,{className:t.isCurrent?"text-[var(--colorOk)] text-lg":"text-[var(--colorTextSecondary)] text-lg"}),(0,a.jsx)("span",{className:"font-semibold text-[var(--colorText)]",children:e}),tp(t)]})},{title:e("prompt.columnSource"),width:170,render:()=>(0,a.jsxs)("span",{className:"text-xs text-[var(--colorTextTertiary)] inline-flex items-center gap-1.5",children:[(0,a.jsx)(P.A,{}),e("prompt.localPrompt")]})},{title:e("prompt.columnMtime"),width:210,render:(e,t)=>(0,a.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:ee(t.mtime)})},{title:e("prompt.columnActions"),width:140,render:(e,t)=>(0,a.jsx)("div",{onClick:e=>e.stopPropagation(),children:tx(t)})}];return r?(0,a.jsxs)("div",{className:"space-y-12",children:[(0,a.jsx)(h.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:4}).map((e,t)=>(0,a.jsx)("div",{className:"p-4 border border-[var(--borderColor)]",children:(0,a.jsx)(h.A,{active:!0,paragraph:{rows:4}})},t))})]}):(0,a.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,a.jsx)(C.X,{failures:eY}),(0,a.jsx)(A.z,{title:e("nav.promptManagement"),description:e("prompt.description"),extra:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{accept:"application/json,.json",showUploadList:!1,beforeUpload:e=>(tm(e),!1),children:(0,a.jsx)(p.Ay,{icon:(0,a.jsx)(O.A,{}),loading:eC,className:"rounded-lg",children:e("prompt.import")})}),(0,a.jsx)(p.Ay,{icon:(0,a.jsx)(F.A,{}),disabled:0===eo.length,onClick:()=>(()=>{let r=eo.filter(e=>e.selected);if(0===r.length)return void t.warning(e("prompt.exportNoneSelected"));let a=new Date().toISOString().slice(0,10);r.forEach((e,t)=>{window.setTimeout(()=>{Y("customize-prompt-".concat(er(e.projectName),"-").concat(a,".json"),et([e]))},250*t)}),t.success(e("prompt.exportedCount").replace("{count}",String(r.length)))})(),className:"rounded-lg",children:e("prompt.exportOne")}),(0,a.jsx)(p.Ay,{type:"primary",icon:(0,a.jsx)(B.A,{}),onClick:()=>(()=>{let e="new:".concat(Date.now());ei(null),ef(!0),ex(""),em(""),to(null,"new",e),en(!0)})(),className:"shadow-none rounded-lg",children:e("prompt.createPrompt")})]})}),(0,a.jsx)(T,{idPrefix:"prompt-page-guide"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 bg-[var(--colorBgContainer)] border border-[var(--borderColor)] p-3 rounded-2xl",children:[(0,a.jsx)(f.A,{prefix:(0,a.jsx)(M.A,{className:"text-[var(--colorTextTertiary)]"}),allowClear:!0,placeholder:e("prompt.searchPrompt"),value:eS,onChange:e=>eA(e.target.value),style:{width:260},className:"rounded-lg"}),(0,a.jsx)("div",{className:"h-6 w-[1px] bg-[var(--borderColor)] mx-1","aria-hidden":!0}),(0,a.jsx)(v.A,{value:ev,onChange:ej,style:{width:130},className:"rounded-lg",options:[{label:e("prompt.promptStatus"),value:"all"},{label:"".concat(e("prompt.selected")," (").concat(e8(e7.selected),")"),value:"selected"},{label:"".concat(e("prompt.unselected")," (").concat(e8(e7.unselected),")"),value:"unselected"},{label:"".concat(e("prompt.hasFileStatus")," (").concat(e8(e7.hasFile),")"),value:"hasFile"},{label:"".concat(e("prompt.missingFileStatus")," (").concat(e8(e7.missingFile),")"),value:"missingFile"}]}),(0,a.jsx)(v.A,{value:ey,onChange:ew,style:{width:140},className:"rounded-lg",options:[{label:e("prompt.sortByMtime"),value:"mtime"},{label:e("prompt.sortByName"),value:"name"},{label:e("prompt.sortBySelected"),value:"selected"}]}),(0,a.jsx)("div",{className:"flex-1 min-w-4"}),(0,a.jsx)(j.A,{value:eb,onChange:e=>eN(e),options:[{label:(0,a.jsx)(D.A,{}),value:"list"},{label:(0,a.jsx)(I.A,{}),value:"card"}],className:"bg-[var(--colorBgHover)] p-1 rounded-lg"})]}),(0,a.jsxs)("div",{className:"min-w-0 rounded-2xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap px-4 py-3 border-b border-[var(--borderColor)]",children:[(0,a.jsx)("span",{className:"text-sm text-[var(--colorTextSecondary)]",children:e("prompt.shownCount").replace("{count}",e8(te.length))}),(0,a.jsx)("div",{className:"h-4 w-[1px] bg-[var(--borderColor)] mx-1","aria-hidden":!0}),(0,a.jsx)("span",{className:"font-semibold text-sm",children:e("prompt.selectedCount").replace("{count}",String(tt))}),(0,a.jsx)("div",{className:"flex-1 min-w-4"}),(0,a.jsx)(p.Ay,{size:"small",disabled:0===te.length,onClick:()=>{ti(!tr)},children:tr?e("prompt.cancelSelectAll"):e("prompt.selectAll")})]}),0===te.length?(0,a.jsx)("div",{className:"py-24 text-center",children:e9?(0,a.jsx)("span",{className:"text-[var(--colorTextTertiary)]",children:"—"}):(0,a.jsx)(y.A,{image:y.A.PRESENTED_IMAGE_SIMPLE,description:(0,a.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:eS||"all"!==ev?e("prompt.noMatchDesc"):e("prompt.noPromptInGroup")})})}):"list"===eb?(0,a.jsx)(w.A,{rowKey:"id",dataSource:te,columns:tu,pagination:(0,n.B)(e),rowSelection:{selectedRowKeys:eo.filter(e=>e.selected).map(e=>e.id),onSelect:(e,t)=>{tc(e,t)},onSelectAll:e=>{ti(e)}},className:"custom-table"}):(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 p-4",children:te.map(t=>(0,a.jsxs)("div",{className:"flex flex-col p-5 rounded-2xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] hover:shadow-md transition-all",children:[(0,a.jsx)("div",{className:"flex items-start justify-between gap-3 mb-4 min-w-0",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[(0,a.jsx)(u.A,{checked:t.selected,onChange:e=>{tc(t,e.target.checked)}}),(0,a.jsx)(E.A,{className:t.isCurrent?"text-[var(--colorOk)] text-lg":"text-[var(--colorTextSecondary)] text-lg"}),(0,a.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate mb-1",children:t.projectName})]})}),(0,a.jsx)("div",{className:"mb-3",children:tp(t)}),(0,a.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)] truncate flex items-center gap-1.5 mb-4 bg-[var(--colorFillAlter)] p-1.5 rounded inline-flex self-start",children:[(0,a.jsx)(P.A,{}),e("prompt.localPrompt")]}),(0,a.jsxs)("div",{className:"mt-auto pt-4 flex justify-between items-center",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-[var(--colorTextTertiary)] bg-[var(--colorFillSecondary)] px-2 py-1 rounded",children:ee(t.mtime)}),tx(t)]})]},t.id))})]}),(0,a.jsxs)(b.A,{title:(0,a.jsx)("span",{className:"truncate",children:eg?e("prompt.createPrompt"):e("prompt.customPrompt")}),open:es,onClose:()=>en(!1),styles:{body:{padding:"24px 32px",display:"grid",gridTemplateRows:"minmax(320px, 1fr) 420px",gap:24,height:"100%"},header:{borderBottom:"1px solid var(--colorBorderSecondary)",padding:"16px 32px"}},extra:(0,a.jsx)(d.A,{children:(0,a.jsx)(p.Ay,{type:"primary",loading:eu,onClick:()=>{tl()},children:e("common.save")})}),children:[(0,a.jsxs)("div",{className:"min-h-0 flex flex-col overflow-y-auto",children:[eg||null!==ec?(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mb-1.5",children:e("prompt.promptName")}),(0,a.jsx)(f.A,{size:"large",placeholder:e("prompt.promptName"),value:ep,onChange:e=>ex(e.target.value),className:"font-medium"})]}):null,(0,a.jsx)(f.A.TextArea,{"aria-describedby":"prompt-page-guide-intro",value:ed,onChange:e=>em(e.target.value),className:"flex-1 shrink-0 min-h-[140px] resize-none font-mono text-[13px]"}),(0,a.jsxs)("div",{className:"mt-3 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] px-4 py-3 max-h-[190px] overflow-y-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,a.jsxs)(d.A,{size:6,children:[(0,a.jsx)(G.A,{className:"text-[var(--colorAccent)]"}),(0,a.jsx)("span",{className:"font-semibold text-xs",children:e("prompt.rulePreviewTitle")})]}),eQ&&(0,a.jsx)(N.A,{size:"small"})]}),eq?eq.recognized?(0,a.jsx)("div",{className:"flex flex-col gap-1",children:eq.summary.map((e,t)=>(0,a.jsxs)("div",{className:"text-xs text-[var(--colorText)] flex gap-1.5 leading-relaxed",children:[(0,a.jsx)(R.A,{className:"text-[var(--colorSuccess)] mt-1"}),(0,a.jsx)("span",{children:e})]},t))}):(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:e("prompt.rulePreviewNone")}):(0,a.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:ed.trim()?e("prompt.rulePreviewAnalyzing"):e("prompt.rulePreviewHint")})]})]}),(0,a.jsxs)("div",{className:"min-h-0 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgContainer)] flex flex-col overflow-hidden",children:[(0,a.jsxs)("div",{className:"px-3 py-2.5 border-b border-[var(--borderColor)] flex items-center justify-between gap-2",children:[(0,a.jsxs)(d.A,{size:6,children:[(0,a.jsx)(_.A,{className:"text-[var(--colorAccent)]"}),(0,a.jsx)("span",{className:"font-semibold",children:e("prompt.aiPromptAssistant")})]}),(0,a.jsxs)(d.A,{size:6,children:[ez.length>0&&(0,a.jsx)(p.Ay,{size:"small",onClick:()=>eF([]),children:e("prompt.clearHistory")}),eB?(0,a.jsx)(m.A,{color:"processing",className:"m-0",children:e("prompt.generating")}):(0,a.jsx)(m.A,{color:"blue",className:"m-0",children:e("prompt.canConverse")})]})]}),(0,a.jsx)("div",{ref:e5,className:"flex-1 min-h-0 overflow-y-auto p-3.5 bg-[var(--colorFillAlter)]",children:0!==ez.length||eB?(0,a.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[ez.map((r,o)=>{let l="user"===r.role;return(0,a.jsx)("div",{className:"flex ".concat(l?"justify-end":"justify-start"),children:(0,a.jsxs)("div",{className:"max-w-[78%] px-3 py-2.5 rounded-xl border border-[var(--borderColor)] whitespace-pre-wrap leading-relaxed text-[13px] transition-colors ".concat(l?"bg-[var(--colorFillSecondary)]":"bg-[var(--colorBgContainer)]"),children:[r.content,!l&&(0,a.jsx)("div",{className:"flex justify-end mt-2",children:(0,a.jsx)(p.Ay,{size:"small",type:"primary",onClick:()=>{em(r.content),t.success(e("prompt.appliedToEditor"))},children:e("prompt.apply")})})]})},"".concat(r.role,"-").concat(o))}),eB&&(0,a.jsx)("div",{className:"flex justify-start",children:(0,a.jsxs)("div",{className:"px-3 py-2.5 rounded-xl bg-[var(--colorBgContainer)] border border-[var(--borderColor)] text-[var(--colorTextSecondary)] text-[13px]",children:[(0,a.jsx)(N.A,{size:"small",className:"mr-2"}),e("prompt.aiAnalyzing")]})})]}):(0,a.jsx)(y.A,{image:y.A.PRESENTED_IMAGE_SIMPLE,description:e("prompt.mentionRecallHint")})}),(0,a.jsx)(S.A,{className:"!m-0"}),(0,a.jsxs)("div",{className:"p-3",children:[e_.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-1 mb-2",children:e_.map(e=>(0,a.jsxs)(m.A,{closable:!0,onClose:()=>eJ(t=>t.filter(t=>t!==e)),className:"m-0 max-w-[360px] overflow-hidden text-ellipsis",children:["@",e]},e))}),eX&&(0,a.jsxs)("div",{className:"max-h-[260px] overflow-y-auto mb-2 rounded-xl border border-[var(--borderColor)] bg-[var(--colorBgElevated)] shadow-lg",children:[(0,a.jsxs)("div",{className:"sticky top-0 z-[1] px-3 py-2.5 border-b border-[var(--borderColor)] bg-[var(--colorBgElevated)] flex justify-between gap-3 items-center",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[var(--colorText)] text-[13px] font-bold",children:e("prompt.recallKbFiles")}),(0,a.jsx)("div",{className:"text-[var(--colorTextSecondary)] text-[11px]",children:e("prompt.recallLimitHint")})]}),(0,a.jsx)(m.A,{color:e6?"blue":"default",className:"m-0 max-w-[240px] overflow-hidden text-ellipsis",children:e6?"@".concat(e6):e("prompt.inputAtKeyword")})]}),(e0||e2)&&(0,a.jsx)("div",{className:"p-2.5",children:(0,a.jsx)(C.X,{failures:[...e0?["知识库文件清单"]:[],...e2?["知识库检索"]:[]]})}),e0?null:eL?(0,a.jsxs)("div",{className:"p-3.5 text-[var(--colorTextSecondary)] text-xs",children:[(0,a.jsx)(N.A,{size:"small",className:"mr-2"}),e("prompt.loadingKbFiles")]}):0===eD.length?(0,a.jsx)("div",{className:"p-3.5 text-[var(--colorTextSecondary)] text-xs",children:e("prompt.noRecallableKbFiles")}):0===ta.length?(0,a.jsx)("div",{className:"p-3.5 text-[var(--colorTextSecondary)] text-xs",children:eK?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N.A,{size:"small",className:"mr-2"}),e("prompt.searchingKbContent")]}):e2?null:e("prompt.noMatchingKbFiles")}):(0,a.jsxs)(a.Fragment,{children:[eK&&(0,a.jsxs)("div",{className:"px-3 py-2 text-[var(--colorTextSecondary)] text-xs border-b border-[var(--borderColor)]",children:[(0,a.jsx)(N.A,{size:"small",className:"mr-2"}),e("prompt.continueSearchingKb")]}),ta.slice(0,30).map(t=>(0,a.jsxs)("div",{onMouseDown:e=>{var r;e.preventDefault(),r=t.relativePath,eJ(e=>e.includes(r)?e:[...e,r]),eO(e=>e.replace(/(^|\s)@([^\s@]*)$/,"$1@".concat(r," "))),e$(!1)},className:"px-3 py-2.5 cursor-pointer border-b border-[var(--borderColor)] text-xs grid grid-cols-[22px_minmax(0,1fr)_auto] gap-2.5 items-center hover:bg-[var(--colorBgHover)] transition-colors",children:[(0,a.jsx)("div",{className:"w-[22px] h-[22px] rounded-lg bg-[var(--colorFillSecondary)] flex items-center justify-center",children:(0,a.jsx)(E.A,{className:"text-[var(--colorAccent)]"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-[var(--colorText)] truncate font-bold",children:t.relativePath}),(0,a.jsxs)("div",{className:"text-[var(--colorTextSecondary)] text-[11px] truncate",children:[t.category||e("prompt.unclassified")," \xb7 ",t.format||e("prompt.unknownFormat"),"number"==typeof t.score?" \xb7 score ".concat(t.score.toFixed(2)):""]})]}),(0,a.jsxs)(d.A,{size:4,children:[(0,a.jsx)(m.A,{color:"content"===t.matchedBy?"purple":"disk"===t.matchedBy?"orange":"blue",className:"m-0",children:"content"===t.matchedBy?e("prompt.contentMatch"):"disk"===t.matchedBy?e("prompt.diskFile"):e("prompt.fileMatch")}),(0,a.jsx)(m.A,{className:"m-0",children:e(s.mc[t.status]||"common.unknown")})]})]},t.relativePath))]})]}),(0,a.jsxs)("div",{className:"flex gap-2 items-end",children:[(0,a.jsx)(f.A.TextArea,{value:eP,onChange:e=>{let t=e.target.value;eO(t),e$(null!==ea(t))},onFocus:()=>e$(null!==ea(eP)),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),tn())},disabled:eB,placeholder:e("prompt.mentionRecallPlaceholder"),autoSize:{minRows:1,maxRows:5},className:"flex-1 min-w-0 text-[13px] leading-relaxed"}),(0,a.jsx)(p.Ay,{type:"primary",icon:(0,a.jsx)(J.A,{}),loading:eB,disabled:!eP.trim(),onClick:()=>{tn()},className:"shrink-0",children:e("prompt.send")})]})]})]})]})]})}},82238:(e,t,r)=>{"use strict";r.d(t,{X:()=>o});var a=r(65321);function o(e){let{failures:t,note:r}=e;return 0===t.length?null:(0,a.jsxs)("div",{role:"alert",className:"rounded-xl border border-[var(--colorDanger)]/30 bg-[var(--colorDanger)]/10 px-4 py-3 text-sm text-[var(--colorDanger)]",children:["".concat(t.length," 项数据读取失败:").concat(t.join("、"),"——相关读数显示为「—」(未知),**不代表 0**;请稍后重试或查看服务端日志。"),r?(0,a.jsx)("div",{className:"mt-1 text-xs opacity-90",children:r}):null]})}},93360:(e,t,r)=>{"use strict";r.d(t,{z:()=>l});var a=r(65321);r(97109);var o=r(33442);function l(e){let{title:t,description:r,extra:l,bottomContent:s}=e;return(0,a.jsxs)("div",{className:"animateFadeIn",children:[(0,a.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,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2",children:t}),r&&(0,a.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)] m-0",children:r})]}),l&&(0,a.jsx)(o.A,{className:"w-full sm:w-auto overflow-x-auto pb-1 sm:pb-0 shrink-0",size:"middle",wrap:!1,children:l})]}),s&&(0,a.jsx)("div",{className:"mt-6",children:s})]})}},96538:(e,t,r)=>{"use strict";r.d(t,{a:()=>o,j:()=>l});let a={coarse:function(e,t){let r=Math.floor(e/1e3),a=Math.floor(r/86400),o=Math.floor(r%86400/3600),l=Math.floor(r%3600/60),s="en-US"===t;return a>0?s?"".concat(a,"d ").concat(o,"h"):"".concat(a," 天 ").concat(o," 小时"):o>0?s?"".concat(o,"h ").concat(l,"m"):"".concat(o," 小时 ").concat(l," 分"):l>0?s?"".concat(l,"m"):"".concat(l," 分"):s?"Just now":"刚刚"},fine:function(e){let t=Math.round(e/1e3);if(t<60)return"".concat(t," 秒");let r=Math.floor(t/60);return r<60?"".concat(r," 分 ").concat(t%60," 秒"):"".concat(Math.floor(r/60)," 小时 ").concat(r%60," 分")},"fine-decimal":function(e){return e>=6e4?"".concat(Math.floor(e/6e4)," 分 ").concat(Math.round(e%6e4/1e3)," 秒"):"".concat((e/1e3).toFixed(1)," 秒")},metric:function(e){return e<1e3?"".concat(Math.round(e),"ms"):e<6e4?"".concat((e/1e3).toFixed(1),"s"):"".concat((e/6e4).toFixed(1),"min")}};function o(e,t){var r;return a[t.style](function(e,t){let r="s"===t?1e3*e:e;return Number.isFinite(r)&&r>0?r:0}(e,t.unit),null!=(r=t.locale)?r:"zh-CN")}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return o(e,{unit:"s",style:"coarse",locale:t})}}},e=>{e.O(0,[6409,1210,1702,5544,9551,4665,7576,1499,8338,5061,8964,9605,4052,7217,4565,636,6593,8792],()=>e(e.s=27549)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[199],{49877:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>D});var r=t(65321),a=t(97109),l=t(43220),o=t.n(l),c=t(39507),n=t(49759),i=t(17807),d=t(88762),x=t(99605),m=t(85114),v=t(25258),u=t(73340),h=t(1253),g=t(56733),j=t(38300),p=t(43746),N=t(87824),f=t(48785),b=t(56014),y=t(6578),w=t(85310),T=t(93360),k=t(82238);function D(){var e,s,t,l;let D=(0,c.Vr)("settings"),{theme:A,resolvedTheme:S,setTheme:C}=(0,n.D)(),{locale:z,setLocale:_}=(0,c.x_)(),{message:F}=i.A.useApp(),[B,P]=(0,a.useState)(null),[I,E]=(0,a.useState)(null),[M,Z]=(0,a.useState)(null),[O,X]=(0,a.useState)(!0),[K,L]=(0,a.useState)(!1),[U,V]=(0,a.useState)(!1),[W,H]=(0,a.useState)([]);(0,a.useEffect)(()=>{X(!0);let e=[],s=(s,t,r)=>t.catch(()=>(e.push(s),r));Promise.all([s("系统统计",(0,y.FC)(),null),s("服务健康",(0,y.le)(),null),s("嵌入配置",(0,y.II)(),null)]).then(s=>{let[t,r,a]=s;H(e),t&&P(t),r&&E(r),a&&Z(a)}).finally(()=>X(!1))},[]);let q=async()=>{V(!0);try{await (0,y.NI)(),F.success("已清除全部数据,即将刷新"),window.setTimeout(()=>window.location.reload(),800)}catch(e){F.error(e instanceof Error?e.message:"清除失败,请重试")}finally{V(!1),L(!1)}},G="system"===A?"system":S,J=e=>"flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-xl border transition-colors ".concat(e?"bg-[var(--colorText)] text-[var(--colorBg)] border-transparent":"bg-transparent text-[var(--colorTextSecondary)] border-[var(--borderColor)] hover:border-[var(--colorTextTertiary)]"),Q=e=>{let{label:s,value:t,mono:a,tone:l}=e;return(0,r.jsxs)("div",{className:"p-4 ".concat(w.wD),children:[(0,r.jsx)("div",{className:"text-[10px] text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:s}),(0,r.jsx)("div",{className:"text-sm ".concat(a?"font-mono":"font-semibold"," ").concat(null!=l?l:"text-[var(--colorText)]"," truncate"),title:"string"==typeof t?t:void 0,children:t})]})};return O?(0,r.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,r.jsx)(d.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,r.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:Array.from({length:4}).map((e,s)=>(0,r.jsx)("div",{className:"p-6 rounded-2xl bg-[var(--colorBgContainer)] shadow-[var(--shadowSurface)]",children:(0,r.jsx)(d.A,{active:!0,paragraph:{rows:4}})},s))})]}):(0,r.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,r.jsx)(k.X,{failures:W}),(0,r.jsx)(T.z,{title:D("title"),description:D("description")}),(0,r.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,r.jsx)(w.Zk,{title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.A,{size:18,className:"text-[var(--colorTextTertiary)]"}),D("language")]}),description:D("languageDesc"),children:(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)("button",{className:J("zh-CN"===z),onClick:()=>_("zh-CN"),children:"中文"}),(0,r.jsx)("button",{className:J("en-US"===z),onClick:()=>_("en-US"),children:"English"})]})}),(0,r.jsx)(w.Zk,{title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.A,{size:18,className:"text-[var(--colorTextTertiary)]"}),D("theme")]}),description:D("themeDesc"),children:(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsxs)("button",{className:J("light"===G),onClick:()=>C("light"),children:[(0,r.jsx)(g.A,{size:14}),D("light")]}),(0,r.jsxs)("button",{className:J("dark"===G),onClick:()=>C("dark"),children:[(0,r.jsx)(j.A,{size:14}),D("dark")]}),(0,r.jsxs)("button",{className:J("system"===G),onClick:()=>C("system"),children:[(0,r.jsx)(h.A,{size:14}),D("system")]})]})}),(0,r.jsx)(w.Zk,{title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.A,{size:18,className:"text-[var(--colorTextTertiary)]"}),D("serverStatus")]}),description:D("serverStatusDesc"),children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsx)(Q,{label:D("status"),value:I?"ok"===I.status?D("healthy"):D("unknown"):"—",tone:I?"ok"===I.status?"text-[var(--colorOk)]":"text-[var(--colorDanger)]":void 0}),(0,r.jsx)(Q,{label:D("uptime"),value:I?(e=>{let s=Math.floor(e/86400),t=Math.floor(e%86400/3600),r=Math.floor(e%3600/60);return s>0?"".concat(s," ").concat(D("days")," ").concat(t," ").concat(D("hours")):t>0?"".concat(t," ").concat(D("hours")," ").concat(r," ").concat(D("minutes")):"".concat(r," ").concat(D("minutes"))})(I.uptime):"—"}),(0,r.jsxs)("div",{className:"col-span-2 p-4 ".concat(w.wD," flex items-center gap-5"),children:[(0,r.jsx)(x.A,{type:"dashboard",percent:null!=(e=null==B?void 0:B.cpu.usagePercent)?e:0,size:48,strokeColor:(null!=(s=null==B?void 0:B.cpu.usagePercent)?s:0)>80?"var(--colorDanger)":"var(--colorText)",strokeWidth:12,showInfo:!1}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-[10px] text-[var(--colorTextTertiary)] uppercase tracking-wider mb-1",children:D("cpu")}),(0,r.jsxs)("div",{className:"font-mono text-[var(--colorText)]",children:[B?"".concat(B.cpu.usagePercent.toFixed(1),"%"):"—"," ",(0,r.jsxs)("span",{className:"text-xs text-[var(--colorTextTertiary)] ml-1",children:["(",B?B.cpu.cores:"—"," ",D("cores"),")"]})]})]})]}),(0,r.jsxs)("div",{className:"col-span-2 p-4 ".concat(w.wD," flex items-center gap-5"),children:[(0,r.jsx)(x.A,{type:"dashboard",percent:null!=(t=null==B?void 0:B.memory.usagePercent)?t:0,size:48,strokeColor:(null!=(l=null==B?void 0:B.memory.usagePercent)?l:0)>80?"var(--colorDanger)":"var(--colorTextSecondary)",strokeWidth:12,showInfo:!1}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-[10px] text-[var(--colorTextTertiary)] uppercase tracking-wider mb-1",children:D("memory")}),(0,r.jsxs)("div",{className:"font-mono text-[var(--colorText)]",children:[B?"".concat(B.memory.usedMB," MB"):"—"," ",(0,r.jsxs)("span",{className:"text-xs text-[var(--colorTextTertiary)] ml-1",children:["/ ",B?B.memory.totalMB:"—"," MB"]})]})]})]})]})}),(0,r.jsx)(w.Zk,{title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(N.A,{size:18,className:"text-[var(--colorTextTertiary)]"}),D("embeddingConfig")]}),description:D("embeddingConfigDesc"),children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsx)("div",{className:"col-span-2",children:(0,r.jsx)(Q,{label:D("provider"),value:(null==M?void 0:M.provider)||"—",mono:!0})}),(0,r.jsx)("div",{className:"col-span-2",children:(0,r.jsx)(Q,{label:D("model"),value:(null==M?void 0:M.model)||"—",mono:!0})}),(0,r.jsx)(Q,{label:D("apiKey"),value:M?M.hasApiKey?D("configured"):D("none"):"—",tone:(null==M?void 0:M.hasApiKey)?"text-[var(--colorOk)]":"text-[var(--colorTextSecondary)]"}),(0,r.jsx)(Q,{label:D("dimensions"),value:(null==M?void 0:M.dimensions)?"".concat(M.dimensions):"—",mono:!0})]})})]}),(0,r.jsxs)(w.Zk,{title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.A,{size:18,className:"text-[var(--colorTextTertiary)]"}),D("localData")]}),description:D("localDataDesc"),children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[(0,r.jsx)(Q,{label:D("directory"),value:"~/.customize-agent/",mono:!0}),(0,r.jsx)(Q,{label:D("knowledgeBase"),value:D("localVectors")}),(0,r.jsx)(Q,{label:D("tasks"),value:B?B.tasks.total.toLocaleString():"—",mono:!0}),(0,r.jsx)(Q,{label:D("tokens"),value:B?B.tokens.total.toLocaleString():"—",mono:!0})]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl bg-[var(--colorFillAlter)] px-4 py-3",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-sm font-medium text-[var(--colorText)]",children:D("diagnostics")}),(0,r.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mt-0.5",children:D("diagnosticsDesc")})]}),(0,r.jsxs)(o(),{href:"/system/logs",className:"shrink-0 text-sm font-medium text-[var(--colorPrimary)] hover:underline",children:[D("openDiagnostics")," ›"]})]}),(0,r.jsxs)("div",{className:"mt-3 flex flex-col sm:flex-row sm:items-center justify-between gap-3 rounded-xl border border-[var(--colorDanger)]/30 bg-[var(--colorDanger)]/5 px-4 py-3",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"text-sm font-medium text-[var(--colorDanger)]",children:"清除全部数据"}),(0,r.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mt-0.5",children:"删除知识库上传文件、生成记录、提示词、配置、状态与日志,不可恢复"})]}),(0,r.jsx)(m.Ay,{danger:!0,size:"small",icon:(0,r.jsx)(b.A,{size:14}),onClick:()=>L(!0),children:"清除全部数据"})]})]}),(0,r.jsx)(v.A,{title:"清除全部数据",open:K,onCancel:()=>L(!1),okText:U?"清除中…":"确认清除",cancelText:"取消",okButtonProps:{danger:!0,disabled:U},onOk:()=>{q()},children:(0,r.jsxs)("div",{className:"text-sm text-[var(--colorTextSecondary)]",children:[(0,r.jsxs)("div",{children:["将删除存储根 ",(0,r.jsx)("code",{children:"~/.customize-agent"})," 下的全部内容:知识库上传文件、生成记录、提示词、模型/嵌入配置、状态与日志。"]}),(0,r.jsx)("div",{className:"mt-2 text-[var(--colorDanger)]",children:"此操作不可恢复,请确认已备份需要保留的资料。"})]})})]})}},58451:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings",function(){return t(49877)}])},82238:(e,s,t)=>{"use strict";t.d(s,{X:()=>a});var r=t(65321);function a(e){let{failures:s,note:t}=e;return 0===s.length?null:(0,r.jsxs)("div",{role:"alert",className:"rounded-xl border border-[var(--colorDanger)]/30 bg-[var(--colorDanger)]/10 px-4 py-3 text-sm text-[var(--colorDanger)]",children:["".concat(s.length," 项数据读取失败:").concat(s.join("、"),"——相关读数显示为「—」(未知),**不代表 0**;请稍后重试或查看服务端日志。"),t?(0,r.jsx)("div",{className:"mt-1 text-xs opacity-90",children:t}):null]})}},85310:(e,s,t)=>{"use strict";t.d(s,{Zk:()=>l,dh:()=>o,wD:()=>a});var r=t(65321);t(97109);let a="rounded-xl bg-[var(--colorBgContainer)] shadow-[var(--shadowSurface)] hover:shadow-[var(--shadowSurfaceHover)] transition-shadow";function l(e){let{title:s,count:t,description:a,extra:l,className:o,children:c}=e;return(0,r.jsxs)("section",{className:"rounded-2xl bg-[var(--colorBgContainer)] shadow-[var(--shadowSurface)] p-6 animateFadeIn ".concat(null!=o?o:""),children:[(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start justify-between gap-3 mb-5",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("h2",{className:"text-base font-semibold text-[var(--colorText)] tracking-wide flex items-center gap-2 m-0",children:[s,void 0!==t&&(0,r.jsx)("span",{className:"text-[var(--colorTextTertiary)] font-normal text-sm",children:t})]}),a&&(0,r.jsx)("p",{className:"text-xs text-[var(--colorTextTertiary)] mt-1.5 mb-0 leading-relaxed max-w-3xl",children:a})]}),l]}),c]})}function o(e){let{children:s}=e;return(0,r.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:s})}},93360:(e,s,t)=>{"use strict";t.d(s,{z:()=>l});var r=t(65321);t(97109);var a=t(33442);function l(e){let{title:s,description:t,extra:l,bottomContent:o}=e;return(0,r.jsxs)("div",{className:"animateFadeIn",children:[(0,r.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,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2",children:s}),t&&(0,r.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)] m-0",children:t})]}),l&&(0,r.jsx)(a.A,{className:"w-full sm:w-auto overflow-x-auto pb-1 sm:pb-0 shrink-0",size:"middle",wrap:!1,children:l})]}),o&&(0,r.jsx)("div",{className:"mt-6",children:o})]})}}},e=>{e.O(0,[9605,7646,636,6593,8792],()=>e(e.s=58451)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2975],{31268:(e,i,u)=>{"use strict";u.r(i),u.d(i,{default:()=>t});var d=u(65321),n=u(86109),s=u(48476);function t(){let e=(0,n.useRouter)(),i="string"==typeof e.query.id?e.query.id:void 0;return(0,d.jsx)(s.q,{mode:"edit",skillId:i},null!=i?i:"loading")}},39928:(e,i,u)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/skills/[id]/edit",function(){return u(31268)}])}},e=>{e.O(0,[6409,1210,5544,9551,4665,8399,7576,8569,8787,3980,2864,6748,9937,636,6593,8792],()=>e(e.s=39928)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9388],{71922:(e,l,s)=>{"use strict";s.r(l),s.d(l,{default:()=>A});var t=s(65321),n=s(86109),r=s(43220),a=s.n(r),i=s(88762),o=s(85493),c=s(84253),d=s(85114),m=s(99650),p=s(97109),x=s(85979),u=s(48399),h=s(68787),j=s(11702),g=s(14524),v=s(35071);let{Text:b}=u.A;function y(e){let{label:l,children:s}=e;return(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mb-1",children:l}),(0,t.jsx)("div",{className:"text-sm font-medium text-[var(--colorText)] break-words",children:s})]})}function f(e){var l,s,n,r,a;let{skill:i,options:o,labelMap:c}=e,d=e=>{var l;return null!=(l=c.get(e))?l:e},m=i.chapterChecklist,p=m?[{label:"章内检索词",values:null!=(l=m.queries)?l:[]},{label:"必含事实",values:null!=(s=m.requiredFacts)?s:[]},{label:"要求成表的小节",values:null!=(n=m.tableSections)?n:[]},{label:"表格形态要求",values:null!=(r=m.tableRequirements)?r:[]},{label:"钉住的证据文件",values:null!=(a=m.pinnedEvidenceFilePaths)?a:[]}].filter(e=>e.values.length>0):[];return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)(h.A,{className:"rounded-2xl border-[var(--borderColor)]",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-x-6 gap-y-4",children:[(0,t.jsx)(y,{label:"技能 ID",children:(0,t.jsx)(b,{code:!0,className:"text-xs",children:i.id})}),(0,t.jsxs)(y,{label:"来源",children:[i.builtIn?(0,t.jsx)(j.A,{color:"gold",className:"m-0",children:"内置"}):(0,t.jsx)(j.A,{className:"m-0",children:"用户"}),(0,t.jsxs)(b,{type:"secondary",className:"text-xs ml-2",children:["技能格式 v",i.version]})]}),(0,t.jsx)(y,{label:"状态",children:(0,t.jsx)(j.A,{color:i.enabled?"green":"default",className:"m-0 border-0",children:i.enabled?"已启用":"已停用"})}),(0,t.jsx)(y,{label:"章域",children:(0,t.jsx)(j.A,{color:"blue",className:"m-0",children:d(i.match.chapterDomain)})}),(0,t.jsx)(y,{label:"适用工程类型",children:0===i.match.projectTypes.length?(0,t.jsx)(b,{type:"secondary",className:"text-xs",children:"全类型(不限定工程类型)"}):(0,t.jsx)("div",{className:"tagWrap flex flex-wrap gap-1 min-w-0",children:i.match.projectTypes.map(e=>(0,t.jsx)(j.A,{className:"m-0",children:d(e)},e))})}),(0,t.jsx)(y,{label:"文档名称建议",children:i.outputTitle?(0,t.jsx)("span",{children:i.outputTitle}):(0,t.jsx)(b,{type:"secondary",className:"text-xs",children:"未声明(不对文档名称表态)"})}),(0,t.jsx)(y,{label:"章职责",children:(null==m?void 0:m.purpose)?(0,t.jsx)("span",{children:m.purpose}):(0,t.jsx)(b,{type:"secondary",className:"text-xs",children:"未声明"})}),(0,t.jsx)(y,{label:"提供内容",children:(0,t.jsxs)("div",{className:"tagWrap flex flex-wrap gap-1 min-w-0",children:[(0,t.jsxs)(j.A,{className:"m-0",children:[i.structure.length," 个专业主题"]}),(0,t.jsxs)(j.A,{color:"green",className:"m-0",children:[i.acceptance.reduce((e,l)=>e+l.items.length,0)," 条核对提示"]})]})})]})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 items-start",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)(g.PZ,{title:"相关专业主题",description:"本条技能提供的专业内容主题。",hint:"".concat(i.structure.length," 项"),children:0===i.structure.length?(0,t.jsx)(b,{type:"secondary",className:"text-xs",children:"未声明专业主题"}):(0,t.jsx)("ol",{className:"m-0 pl-5 text-sm leading-7",children:i.structure.map((e,l)=>{var s;return(0,t.jsxs)("li",{children:[e.title,(0,t.jsx)(b,{type:"secondary",className:"text-xs ml-2",children:(null==(s=e.required)?void 0:s.join(";"))||"按具体对象组织内容"})]},"".concat(e.title,"-").concat(l))})})}),(0,t.jsxs)(g.PZ,{title:"匹配条件",description:"这条技能在什么章域、工程类型与章节标题下被选用。",children:[(0,t.jsx)(g.RU,{label:"小节标题关键词",children:(0,t.jsx)(g.n$,{empty:"未限定小节标题关键词",items:i.match.sectionKeywords.map(e=>(0,t.jsx)(j.A,{className:"m-0 border-0 bg-[var(--colorFillSecondary)]",children:e},e))})}),(0,t.jsx)(g.RU,{label:"小节标题匹配表达式",children:i.match.sectionRegex?(0,t.jsx)(b,{code:!0,className:"text-xs",children:i.match.sectionRegex}):void 0})]}),(0,t.jsx)(g.PZ,{title:"工艺知识引用",description:"写作时可加载的专业参考(按工艺卡名称显示)。",children:0===i.knowledge.length?(0,t.jsx)(b,{type:"secondary",className:"text-xs",children:"未声明知识引用"}):(0,t.jsx)("div",{className:"flex flex-col gap-2",children:i.knowledge.map((e,l)=>{var s,n,r,a;return(0,t.jsxs)("div",{className:"rounded-xl border border-[var(--borderColor)] bg-[var(--colorFillAlter)] px-3 py-2.5",children:[(0,t.jsxs)("div",{className:"tagWrap flex flex-wrap items-center gap-1.5 min-w-0",children:[(0,t.jsx)(j.A,{color:"blue",className:"m-0",children:(n=e.kind,null!=(a=null==o||null==(r=o.knowledgeKinds.find(e=>e.value===n))?void 0:r.label)?a:n)}),(null!=(s=e.ids)?s:[]).map(e=>{var l,s;return(0,t.jsx)(j.A,{className:"m-0 border-0 bg-[var(--colorFillSecondary)]",children:null!=(s=null==o||null==(l=o.processCards.find(l=>l.value===e))?void 0:l.label)?s:e},e)})]}),e.note?(0,t.jsx)("p",{className:"m-0 mt-2 text-xs leading-relaxed text-[var(--colorTextSecondary)]",children:e.note}):null]},"".concat(e.kind,"-").concat(l))})})}),o&&o.isolationRules.length>0&&(0,t.jsx)(g.PZ,{title:"资料与采用边界",description:"以下边界由软件统一执行,技能不能扩大或豁免。",children:(0,t.jsx)("div",{className:"flex flex-col gap-2",children:o.isolationRules.map(e=>(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-baseline gap-1 sm:gap-2",children:[(0,t.jsx)(b,{className:"text-sm shrink-0",children:e.label}),(0,t.jsx)(b,{type:"secondary",className:"text-xs",children:e.note})]},e.id))})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)(g.PZ,{title:"所需项目资料",description:"本次任务要先查证的项目事实;标为必需而查不到时会被上游拦下。",children:(0,t.jsx)(g.n$,{empty:"未声明必需事实",items:i.requires.map(e=>(0,t.jsxs)(j.A,{color:e.required?"red":"default",className:"mb-1",children:[e.key," \xb7 ",d(e.source),e.required?" \xb7 必需":" \xb7 可选"]},e.key))})}),(0,t.jsx)(g.PZ,{title:"文档业务提示",description:"给本次规划的章级候选内容与资料检索提示。",children:0===p.length?(0,t.jsx)(b,{type:"secondary",className:"text-xs",children:"未声明章级清单"}):p.map(e=>(0,t.jsx)(g.RU,{label:e.label,children:(0,t.jsx)(g.n$,{items:e.values.map(e=>(0,t.jsx)(j.A,{className:"m-0 border-0 bg-[var(--colorFillSecondary)]",children:e},e))})},e.label))}),(0,t.jsx)(g.PZ,{title:"禁写项",description:"这条技能明确要求避免的内容或表达。",children:(0,t.jsx)(g.n$,{empty:"没有禁写项",items:i.forbidden.map(e=>(0,t.jsx)(j.A,{color:"red",className:"m-0 border-0",children:(0,v.Oz)(e)},(0,v.Oz)(e)))})}),(0,t.jsx)(g.PZ,{title:"专业写作核对提示",description:"按本任务对象和工况选用,不是数量要求或验收通过证明。",children:0===i.acceptance.flatMap(e=>e.items).length?(0,t.jsx)(b,{type:"secondary",className:"text-xs",children:"没有核对提示"}):(0,t.jsx)("ul",{className:"m-0 pl-5 text-sm leading-7",children:i.acceptance.flatMap(e=>e.items).map(e=>(0,t.jsx)("li",{children:e},e))})}),(0,t.jsx)(g.PZ,{title:"表达示例",description:"示例供理解专业表达,不能作为本项目事实。",children:(0,t.jsx)(g.RU,{label:"是否带示例",children:i.examples?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.A,{color:"green",className:"m-0 border-0",children:"带正例/反例"}),(0,t.jsx)(b,{type:"secondary",className:"text-xs ml-2",children:"本编辑器保留原示例。"})]}):void 0})})]})]})]})}var N=s(33061);function $(e){let{skillId:l}=e,s=(0,N.G)(),n=(0,p.useMemo)(()=>l?s.skills.find(e=>e.id===l):void 0,[s.skills,l]),r=(0,p.useMemo)(()=>{var e,l,t,n,r,a;return new Map([...null!=(n=null==(e=s.options)?void 0:e.chapterDomains)?n:[],...null!=(r=null==(l=s.options)?void 0:l.projectTypes)?r:[],...null!=(a=null==(t=s.options)?void 0:t.factSources)?a:[]].map(e=>[e.value,e.label]))},[s.options]),u=!l,h=!s.loading&&!s.failed&&!!s.options&&!n;return u||s.loading?(0,t.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,t.jsx)(i.A,{active:!0,title:!0,paragraph:{rows:2}}),(0,t.jsx)(i.A,{active:!0,paragraph:{rows:10}})]}):s.failed?(0,t.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,t.jsx)(x.k,{backHref:"/skills",backLabel:"返回技能库",title:"技能预览"}),(0,t.jsx)(o.A,{type:"error",showIcon:!0,message:"技能库读取失败",description:"".concat(s.failed,';这不是"技能不存在",请核对服务端状态后重试。')})]}):h||!n?(0,t.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,t.jsx)(x.k,{backHref:"/skills",backLabel:"返回技能库",title:"技能预览"}),(0,t.jsx)(c.A,{description:"技能库里没有「".concat(l,"」这条技能(可能已被删除或改名)"),children:(0,t.jsx)(a(),{href:"/skills",children:(0,t.jsx)(d.Ay,{type:"primary",children:"返回技能库"})})})]}):(0,t.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,t.jsx)(x.k,{backHref:"/skills",backLabel:"返回技能库",title:"技能预览 \xb7 ".concat(n.displayName),description:"只读查看这条技能声明了什么;要改内容进编辑页,保存前会做字段与引用校验。",extra:(0,t.jsx)(a(),{href:"/skills/".concat(encodeURIComponent(n.id),"/edit"),children:(0,t.jsx)(d.Ay,{type:"primary",icon:(0,t.jsx)(m.A,{}),disabled:n.builtIn,title:n.builtIn?v.F:void 0,children:"编辑"})})}),n.builtIn&&(0,t.jsx)(o.A,{type:"info",showIcon:!0,message:v.F}),(0,t.jsx)(f,{skill:n,options:s.options,labelMap:r})]})}function A(){let e=(0,n.useRouter)(),l="string"==typeof e.query.id?e.query.id:void 0;return(0,t.jsx)($,{skillId:l})}},85493:(e,l,s)=>{"use strict";s.d(l,{A:()=>S});var t=s(97109),n=s(59188),r=s(4216),a=s(45042),i=s(97137),o=s(62188),c=s(67189),d=s(42644),m=s(3638),p=s(92162),x=s(26047),u=s(74567),h=s(15561),j=s(7961),g=s(10540);let v=(e,l,s)=>({background:e,[`${s}-icon`]:{color:l}}),b=(0,g.OF)("Alert",e=>[(e=>{let{componentCls:l,motionDurationSlow:s,marginXS:t,marginSM:n,fontSize:r,fontSizeLG:a,lineHeight:i,borderRadiusLG:o,motionEaseInOutCirc:c,withDescriptionIconSize:d,colorText:m,colorTextHeading:p,withDescriptionPadding:x,defaultPadding:u,lineWidth:g,lineType:v,colorSuccessBorder:b,colorWarningBorder:y,colorErrorBorder:f,colorInfoBorder:N}=e;return{[l]:{...(0,j.dF)(e),position:"relative",display:"flex",alignItems:"center",padding:u,wordWrap:"break-word",borderRadius:o,borderWidth:(0,h.zA)(g),borderStyle:v,[`&${l}-success`]:{borderColor:b},[`&${l}-info`]:{borderColor:N},[`&${l}-warning`]:{borderColor:y},[`&${l}-error`]:{borderColor:f},[`&${l}-filled`]:{borderColor:"transparent"},[`&${l}-rtl`]:{direction:"rtl"},[`${l}-section`]:{flex:1,minWidth:0},[`${l}-icon`]:{marginInlineEnd:t,lineHeight:0},"&-description":{display:"none",fontSize:r,lineHeight:i},"&-title":{color:p},[`&${l}-motion-leave`]:{overflow:"hidden",opacity:1,transition:["max-height","opacity","padding-top","padding-bottom","margin-bottom"].map(e=>`${e} ${s} ${c}`).join(", ")},[`&${l}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0},[`&${l}-with-description`]:{alignItems:"flex-start",padding:x,[`${l}-icon`]:{marginInlineEnd:n,fontSize:d,lineHeight:0},[`${l}-title`]:{display:"block",marginBottom:t,color:p,fontSize:a},[`${l}-description`]:{display:"block",color:m}},[`&${l}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}}})(e),(e=>{let{componentCls:l,colorSuccess:s,colorSuccessBg:t,colorWarning:n,colorWarningBg:r,colorError:a,colorErrorBg:i,colorInfo:o,colorInfoBg:c}=e;return{[l]:{"&-success":v(t,s,l),"&-info":v(c,o,l),"&-warning":v(r,n,l),"&-error":{...v(i,a,l),[`${l}-description > pre`]:{margin:0,padding:0}}}}})(e),(e=>{let{componentCls:l,iconCls:s,motionDurationMid:t,marginXS:n,fontSizeIcon:r,colorIcon:a,colorIconHover:i}=e;return{[l]:{[`${l}-actions`]:{marginInlineStart:n},[`${l}-close-icon`]:{marginInlineStart:n,padding:0,overflow:"hidden",fontSize:r,lineHeight:(0,h.zA)(r),backgroundColor:"transparent",border:"none",cursor:"pointer",...(0,j.K8)(e),[`${s}-close`]:{color:a,transition:`color ${t}`,"&:hover":{color:i}}},"&-close-text":{color:a,transition:`color ${t}`,"&:hover":{color:i}}}}})(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})),y=e=>{let{icon:l,type:s,className:a,style:c,successIcon:d,infoIcon:m,warningIcon:p,errorIcon:x}=e,u={success:d??t.createElement(n.A,null),info:m??t.createElement(o.A,null),error:x??t.createElement(r.A,null),warning:p??t.createElement(i.A,null)};return t.createElement("span",{className:a,style:c},l??u[s])},f=e=>{let{isClosable:l,prefixCls:s,closeIcon:n,handleClose:r,ariaProps:i,className:o,style:c}=e,d=!0===n||void 0===n?t.createElement(a.A,null):n;return l?t.createElement("button",{type:"button",onClick:r,className:(0,m.$)(`${s}-close-icon`,o),tabIndex:0,style:c,...i},d):null},N=t.forwardRef((e,l)=>{let{description:s,prefixCls:n,message:r,title:a,banner:i,className:o,rootClassName:h,style:j,onMouseEnter:g,onMouseLeave:v,onClick:N,afterClose:$,showIcon:A,closable:k,closeText:w,closeIcon:I,action:E,id:C,styles:S,classNames:R,...P}=e,F=a??r,[T,M]=t.useState(!1),H=t.useRef(null);t.useImperativeHandle(l,()=>({nativeElement:H.current}));let{getPrefixCls:_,direction:z,variant:q,closable:Z,closeIcon:D,className:L,style:K,classNames:W,styles:B,successIcon:O,infoIcon:Q,warningIcon:U,errorIcon:X}=(0,u.TP)("alert"),G=_("alert",n),[V,J]=b(G),{onClose:Y,afterClose:ee}=(0,x.Qd)(k)?k:{},el=l=>{M(!0),(Y??e.onClose)?.(l)},es=t.useMemo(()=>void 0!==e.type?e.type:i?"warning":"info",[e.type,i]),et=e.variant??q??"outlined",en=t.useMemo(()=>!!(0,x.Qd)(k)&&!!k.closeIcon||!!w||("boolean"==typeof k?k:!!(!1!==I&&(0,x.R)(I))||!!Z),[w,I,k,Z]),er=!!i&&void 0===A||A,ea={...e,prefixCls:G,variant:et,type:es,showIcon:er,closable:en},ei=(0,p.XT)(K),eo=(0,p.XT)(j),[ec,ed]=(0,p.AV)([W,R],[B,ei,S,eo],{props:ea}),em=(0,m.$)(G,`${G}-${es}`,`${G}-${et}`,{[`${G}-with-description`]:!!s,[`${G}-no-icon`]:!er,[`${G}-banner`]:!!i,[`${G}-rtl`]:"rtl"===z},L,o,h,ec.root,J,V),ep=(0,d.KE)(P,{aria:!0,data:!0}),ex=t.useMemo(()=>(0,x.Qd)(k)&&k.closeIcon?k.closeIcon:w||(void 0!==I?I:(0,x.Qd)(Z)&&Z.closeIcon?Z.closeIcon:D),[I,k,Z,w,D]),eu=t.useMemo(()=>{let e=k??Z;return(0,x.Qd)(e)?(0,d.KE)(e,{data:!0,aria:!0}):{}},[k,Z]);return t.createElement(c.Ay,{visible:!T,motionName:`${G}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:ee??$},({className:l,style:n},r)=>t.createElement("div",{id:C,ref:(0,d.K4)(H,r),"data-show":!T,className:(0,m.$)(em,l),style:{...ed.root,...n},onMouseEnter:g,onMouseLeave:v,onClick:N,role:"alert",...ep},er?t.createElement(y,{className:(0,m.$)(`${G}-icon`,ec.icon),style:ed.icon,description:s,icon:e.icon,prefixCls:G,type:es,successIcon:O,infoIcon:Q,warningIcon:U,errorIcon:X}):null,t.createElement("div",{className:(0,m.$)(`${G}-section`,ec.section),style:ed.section},F?t.createElement("div",{className:(0,m.$)(`${G}-title`,ec.title),style:ed.title},F):null,s?t.createElement("div",{className:(0,m.$)(`${G}-description`,ec.description),style:ed.description},s):null),E?t.createElement("div",{className:(0,m.$)(`${G}-actions`,ec.actions),style:ed.actions},E):null,t.createElement(f,{className:ec.close,style:ed.close,isClosable:en,prefixCls:G,closeIcon:ex,handleClose:el,ariaProps:eu})))});var $=s(41113),A=s(49939),k=s(90218),w=s(13076),I=s(83784),E=s(15472);let C=function(e){function l(){var e,s,t;return(0,$.A)(this,l),s=l,t=arguments,s=(0,k.A)(s),(e=(0,I.A)(this,(0,w.A)()?Reflect.construct(s,t||[],(0,k.A)(this).constructor):s.apply(this,t))).state={error:void 0,info:{}},e}return(0,E.A)(l,e),(0,A.A)(l,[{key:"componentDidCatch",value:function(e,l){this.setState({error:e,info:l})}},{key:"render",value:function(){let{message:e,title:l,description:s,id:n,children:r}=this.props,{error:a,info:i}=this.state,o=l??e,c=i?.componentStack||null,d=(0,x.R)(o)?o:a?.toString(),m=(0,x.R)(s)?s:c;return a?t.createElement(N,{id:n,type:"error",title:d,description:t.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},m)}):r}}])}(t.PureComponent);N.ErrorBoundary=C;let S=N},95195:(e,l,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/skills/[id]",function(){return s(71922)}])}},e=>{e.O(0,[6409,1210,1702,5544,4665,8399,8569,8787,6748,636,6593,8792],()=>e(e.s=95195)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5677],{34698:(e,_,n)=>{"use strict";n.r(_),n.d(_,{default:()=>r});var s=n(65321),u=n(48476);function r(){return(0,s.jsx)(u.q,{mode:"create"})}},84788:(e,_,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/skills/new",function(){return n(34698)}])}},e=>{e.O(0,[6409,1210,5544,9551,4665,8399,7576,8569,8787,3980,2864,6748,9937,636,6593,8792],()=>e(e.s=84788)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9950],{25981:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/skills",function(){return n(81828)}])},33061:(e,t,n)=>{"use strict";n.d(t,{G:()=>s});var i=n(97109),l=n(35071);function s(){let[e,t]=(0,i.useState)([]),[n,s]=(0,i.useState)(),[r,a]=(0,i.useState)([]),[c,o]=(0,i.useState)(!0),[d,u]=(0,i.useState)(""),p=(0,i.useCallback)(async()=>{o(!0);let e=await (0,l.SS)("/api/skills");if(e.ok){var n;t(e.data.skills),s(e.data.options),a(null!=(n=e.data.invalid)?n:[]),u("")}else u(e.message);o(!1)},[]);return(0,i.useEffect)(()=>{p()},[p]),{skills:e,options:n,invalid:r,loading:c,failed:d,reload:p,applySkills:t}}},35071:(e,t,n)=>{"use strict";n.d(t,{F:()=>s,Ie:()=>o,Oz:()=>a,RW:()=>p,SS:()=>l,eT:()=>i,m6:()=>c});let i={"Content-Type":"application/json"};async function l(e,t){try{let i,l=await fetch(e,t),s=await l.text();try{i=s?JSON.parse(s):void 0}catch(e){i=void 0}if(!l.ok){var n;let e=null!=i?i:{};return{ok:!1,status:l.status,message:null!=(n=e.error)?n:"HTTP ".concat(l.status),issues:Array.isArray(e.errors)?e.errors:[]}}return{ok:!0,data:i}}catch(e){return{ok:!1,status:0,message:e instanceof Error?e.message:"网络请求失败",issues:[]}}}let s="内置技能只读,随应用版本更新。可新建用户技能进行配置。";function r(e){return[...new Set((null!=e?e:[]).map(e=>e.trim()).filter(e=>e.length>0))]}function a(e){return"string"==typeof e?e:e.phrase}function c(e){return{id:e.id,enabled:e.enabled,match:{chapterDomain:e.match.chapterDomain,projectTypes:[...e.match.projectTypes],sectionKeywords:[...e.match.sectionKeywords],...e.match.sectionRegex?{sectionRegex:e.match.sectionRegex}:{}},requires:e.requires.map(e=>({...e})),structure:e.structure.map(e=>{var t;return{title:e.title,required:[...null!=(t=e.required)?t:[]]}}),forbidden:e.forbidden.map(a),knowledge:e.knowledge.map(e=>({kind:e.kind,...e.ids?{ids:[...e.ids]}:{},...e.note?{note:e.note}:{}})),acceptance:e.acceptance.map(e=>({kind:"llmChecklist",checklistItems:[...e.items]})),...void 0!==e.outputTitle?{outputTitle:e.outputTitle}:{},...e.chapterChecklist?{chapterChecklist:{...e.chapterChecklist,...e.chapterChecklist.sections?{sections:[...e.chapterChecklist.sections]}:{}}}:{}}}function o(){return{id:"skill-".concat(Date.now()),enabled:!0,match:{projectTypes:[],sectionKeywords:[]},requires:[{source:"boq",required:!1}],structure:[{}],forbidden:[],knowledge:[],acceptance:[{kind:"llmChecklist",checklistItems:[]}]}}function d(e){var t;return(null!=(t=e.ids)?t:[]).length>0}function u(e){var t;return(null!=(t=e.checklistItems)?t:[]).length>0}function p(e,t,n){var i,l,s,a,c,o,p,m,h,x;let v={chapterDomain:null==(i=e.match)?void 0:i.chapterDomain,projectTypes:[...null!=(o=null==(l=e.match)?void 0:l.projectTypes)?o:[]],sectionKeywords:r(null==(s=e.match)?void 0:s.sectionKeywords),...(null==(c=e.match)||null==(a=c.sectionRegex)?void 0:a.trim())?{sectionRegex:e.match.sectionRegex.trim()}:{}},g=(null!=(p=e.requires)?p:[]).filter(e=>{var t;return(null!=(t=e.key)?t:"").trim().length>0}).map(e=>{var t;return{key:(null!=(t=e.key)?t:"").trim(),source:e.source,required:!0===e.required}}),k=(null!=(m=e.structure)?m:[]).filter(e=>{var t;return(null!=(t=e.title)?t:"").trim().length>0}).map(e=>{var t;return{title:(null!=(t=e.title)?t:"").trim(),required:r(e.required)}}),f=(null!=(h=e.knowledge)?h:[]).filter(d).map(e=>{var t;return{kind:"processCard",ids:r(e.ids),...(null==(t=e.note)?void 0:t.trim())?{note:e.note.trim()}:{}}}),j=(null!=(x=e.acceptance)?x:[]).filter(u).map(e=>({kind:"llmChecklist",items:r(e.checklistItems),nonDeterministic:!0}));return{id:e.id.trim(),version:t,source:"user",enabled:!1!==e.enabled,match:v,requires:g,structure:k,forbidden:r(e.forbidden),knowledge:f,acceptance:j,...function(e){var t,n,i,l;let s=null!=(l=null==(t=e.outputTitle)?void 0:t.trim())?l:"",a=e.chapterChecklist,c={sections:r(null==a?void 0:a.sections),queries:r(null==a?void 0:a.queries),requiredFacts:r(null==a?void 0:a.requiredFacts),tableSections:r(null==a?void 0:a.tableSections),tableRequirements:r(null==a?void 0:a.tableRequirements),pinnedEvidenceFilePaths:r(null==a?void 0:a.pinnedEvidenceFilePaths)},o=!!(null==a||null==(n=a.purpose)?void 0:n.trim())||Object.values(c).some(e=>e.length>0);return{...s?{outputTitle:s}:{},...o?{chapterChecklist:{...(null==a||null==(i=a.purpose)?void 0:i.trim())?{purpose:a.purpose.trim()}:{},...Object.fromEntries(Object.entries(c).filter(e=>{let[,t]=e;return t.length>0}))}}:{}}}(e),...n?{examples:n}:{}}}},58690:(e,t,n)=>{"use strict";function i(e){var t,n,i;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{defaultPageSize:null!=(t=l.pageSize)?t:10,pageSizeOptions:null!=(n=l.pageSizeOptions)?n:[10,20,50,100],showSizeChanger:!0,showTotal:t=>{var n,i;return e(null!=(n=l.totalLabelKey)?n:"common.totalRows",null!=(i=l.totalLabelFallback)?i:"共 {count} 条").replace("{count}",String(t))},hideOnSinglePage:null!=(i=l.hideOnSinglePage)&&i,showQuickJumper:!1}}n.d(t,{B:()=>i})},81828:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>I});var i=n(65321),l=n(97109),s=n(86109),r=n(48399),a=n(17807),c=n(85114),o=n(85493),d=n(68787),u=n(42700),p=n(84253),m=n(38964),h=n(11702),x=n(33442),v=n(44534),g=n(32965),k=n(54746),f=n(8263),j=n(99650),y=n(58209),b=n(39507),w=n(58690),S=n(93360),A=n(33061),C=n(35071);let{Text:T}=r.A;function I(){let{message:e}=a.A.useApp(),t=(0,b.Vr)(),n=(0,s.useRouter)(),r=(0,A.G)(),{skills:I,options:N}=r,q=(0,l.useMemo)(()=>{var e,t,n;return new Map([...null!=(e=null==N?void 0:N.chapterDomains)?e:[],...null!=(t=null==N?void 0:N.projectTypes)?t:[],...null!=(n=null==N?void 0:N.factSources)?n:[]].map(e=>[e.value,e.label]))},[N]),z=async(t,n)=>{var i,l;let s=await (0,C.SS)("/api/skills/".concat(encodeURIComponent(t.id)),{method:"PUT",headers:C.eT,body:JSON.stringify({...t,enabled:n})});if(!s.ok)return void e.error("切换启用状态失败:".concat(s.message));i=s.data,r.applySkills(i.skills),(null==(l=i.warnings)?void 0:l.length)&&e.warning("已保存,但有 ".concat(i.warnings.length," 条提示:").concat(i.warnings.map(e=>e.message).join(";")))},R=async n=>{let i=await (0,C.SS)("/api/skills/".concat(encodeURIComponent(n.id)),{method:"DELETE"});if(!i.ok)return void e.error("删除失败:".concat(i.message));r.applySkills(i.data.skills),e.success(t("common.success"))},E=e=>{n.push("/skills/".concat(encodeURIComponent(e.id)))};return(0,i.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,i.jsx)(S.z,{title:t("nav.skills"),description:"技能提供专业主题、资料需求、工艺知识和写作核对提示,按章域、工程类型与具体对象选用。本次任务的实际章节职责由主控规划确定。保存时会校验技能字段与工艺卡引用。",extra:(0,i.jsx)(c.Ay,{type:"primary",icon:(0,i.jsx)(k.A,{}),onClick:()=>{n.push("/skills/new")},disabled:!N,children:"新建技能"})}),r.invalid.length>0&&(0,i.jsx)(o.A,{type:"warning",showIcon:!0,message:"技能库有 ".concat(r.invalid.length," 个无法读取的文件(不影响其余技能)"),description:(0,i.jsx)("div",{className:"text-xs",children:r.invalid.map(e=>(0,i.jsxs)("div",{children:[e.file,":",e.reason]},e.file))})}),r.failed&&!r.loading&&(0,i.jsx)(o.A,{type:"error",showIcon:!0,message:"技能库读取失败",description:"".concat(r.failed,';这不是"技能库为空",请核对服务端状态后重试。')}),(0,i.jsx)(d.A,{className:"rounded-2xl",children:r.loading?(0,i.jsx)("div",{className:"py-10 text-center",children:(0,i.jsx)(u.A,{})}):0===I.length?r.failed?null:(0,i.jsx)(p.A,{description:"技能库为空"}):(0,i.jsx)(m.A,{dataSource:I,rowKey:"id",pagination:(0,w.B)(t),onRow:e=>({onClick:()=>E(e),style:{cursor:"pointer"}}),columns:[{title:"技能",dataIndex:"displayName",render:e=>(0,i.jsx)(T,{strong:!0,children:e})},{title:"章域",width:140,render:(e,t)=>{var n;return(0,i.jsx)(h.A,{color:"blue",children:null!=(n=q.get(t.match.chapterDomain))?n:t.match.chapterDomain})}},{title:"工程类型",width:180,render:(e,t)=>0===t.match.projectTypes.length?(0,i.jsx)(T,{type:"secondary",className:"text-xs",children:"全类型"}):(0,i.jsx)(x.A,{size:4,wrap:!0,children:t.match.projectTypes.map(e=>{var t;return(0,i.jsx)(h.A,{children:null!=(t=q.get(e))?t:e},e)})})},{title:"主题 / 专业提示",width:180,render:(e,t)=>(0,i.jsxs)(x.A,{size:4,children:[(0,i.jsxs)(h.A,{children:[t.structure.length," 个主题"]}),(0,i.jsxs)(h.A,{color:"green",children:[t.acceptance.length," 组提示"]})]})},{title:"来源",width:100,render:(e,t)=>t.builtIn?(0,i.jsx)(h.A,{color:"gold",title:C.F,children:"内置"}):(0,i.jsx)(h.A,{children:"用户"})},{title:"启用",width:90,render:(e,t)=>(0,i.jsx)("div",{onClick:e=>e.stopPropagation(),className:"inline-flex",children:(0,i.jsx)(v.A,{size:"small",checked:t.enabled,disabled:t.builtIn,title:t.builtIn?C.F:void 0,onChange:e=>{z(t,e)}})})},{title:"操作",width:150,render:(e,l)=>(0,i.jsxs)(x.A,{size:0,onClick:e=>e.stopPropagation(),children:[(0,i.jsx)(c.Ay,{size:"small",type:"text",icon:(0,i.jsx)(f.A,{}),title:"预览",onClick:()=>E(l)}),(0,i.jsx)(c.Ay,{size:"small",type:"text",icon:(0,i.jsx)(j.A,{}),disabled:l.builtIn,title:l.builtIn?C.F:t("common.edit"),onClick:()=>{n.push("/skills/".concat(encodeURIComponent(l.id),"/edit"))}}),(0,i.jsx)(g.A,{title:"确认删除该技能?",onConfirm:()=>{R(l)},disabled:l.builtIn,children:(0,i.jsx)(c.Ay,{size:"small",type:"text",danger:!0,icon:(0,i.jsx)(y.A,{}),disabled:l.builtIn,title:l.builtIn?C.F:t("common.delete")})})]})}]})})]})}},93360:(e,t,n)=>{"use strict";n.d(t,{z:()=>s});var i=n(65321);n(97109);var l=n(33442);function s(e){let{title:t,description:n,extra:s,bottomContent:r}=e;return(0,i.jsxs)("div",{className:"animateFadeIn",children:[(0,i.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,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2",children:t}),n&&(0,i.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)] m-0",children:n})]}),s&&(0,i.jsx)(l.A,{className:"w-full sm:w-auto overflow-x-auto pb-1 sm:pb-0 shrink-0",size:"middle",wrap:!1,children:s})]}),r&&(0,i.jsx)("div",{className:"mt-6",children:r})]})}}},e=>{e.O(0,[6409,1210,1702,5544,9551,4665,8399,1499,8569,8338,5061,8787,8964,8715,636,6593,8792],()=>e(e.s=25981)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3979],{9137:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>C});var a=r(9750),s=r(97109),o=r(42644),l=r(10252),n=r(74567),c=r(48921),i=r(98379),d=r(3638),x=r(632),g=r(34475),m=r(52093),p=r(60815),u=r(5741);let h=null,f=e=>e(),v=[],b={};function w(){let{getContainer:e,duration:t,rtl:r,maxCount:a,top:s,stack:o}=b,l=e?.()||document.body;return{getContainer:()=>l,duration:t,rtl:r,maxCount:a,top:s,stack:o}}let y=s.forwardRef((e,t)=>{let{messageConfig:r,sync:a}=e,{getPrefixCls:o}=(0,s.useContext)(n.QO),c=b.prefixCls||o("message"),i=(0,s.useContext)(l.B),[d,x]=(0,p.y)({...r,prefixCls:c,...i.message});return s.useImperativeHandle(t,()=>{let e={...d};return Object.keys(e).forEach(t=>{e[t]=(...e)=>(a(),d[t].apply(d,e))}),{instance:e,sync:a}}),x}),j=s.forwardRef((e,t)=>{let[r,a]=s.useState(w),o=()=>{a(w)};s.useEffect(o,[]);let l=(0,c.cr)(),n=l.getRootPrefixCls(),i=l.getIconPrefixCls(),d=l.getTheme(),x=s.createElement(y,{ref:t,sync:o,messageConfig:r});return s.createElement(c.Ay,{prefixCls:n,iconPrefixCls:i,theme:d},l.holderRender?l.holderRender(x):x)}),N=()=>{if(!h){let e=document.createDocumentFragment(),t={fragment:e};h=t,f(()=>{(0,o.XX)(s.createElement(j,{ref:e=>{let{instance:r,sync:a}=e||{};Promise.resolve().then(()=>{!t.instance&&r&&(t.instance=r,t.sync=a,N())})}}),e)});return}h.instance&&(v.forEach(e=>{let{type:t,skipped:r}=e;if(!r)switch(t){case"open":f(()=>{let t=h.instance.open({...b,...e.config});t?.then(e.resolve),e.setCloseFn(t)});break;case"destroy":f(()=>{h?.instance.destroy(e.key)});break;default:f(()=>{var r;let s=(r=h.instance)[t].apply(r,(0,a.A)(e.args));s?.then(e.resolve),e.setCloseFn(s)})}}),v=[])},A={open:function(e){let t=(0,u.E)(t=>{let r,a={type:"open",config:e,resolve:t,setCloseFn:e=>{r=e}};return v.push(a),()=>{r?f(()=>{r()}):a.skipped=!0}});return N(),t},destroy:e=>{v.push({type:"destroy",key:e}),N()},config:function(e){b={...b,...e},f(()=>{h?.sync?.()})},useMessage:p.A,_InternalPanelDoNotUseOrYouWillBeFired:g.Ay,_InternalListDoNotUseOrYouWillBeFired:e=>{let{items:t,classNames:r,style:a}=e,{getPrefixCls:o}=(0,n.TP)("message"),l=o("message"),c=(0,x.A)(l),[p,u]=(0,m.A)(l,c),h=`${l}-notice`,f=t.map(e=>{let{content:t,duration:r,key:a,type:s}=e,o=s?`${h}-icon-${s}`:void 0;return{key:a,duration:r,icon:(0,g.HC)(s),title:t,className:`${h}-${s}`,classNames:{wrapper:`${l}-${s}`,icon:o}}});return s.createElement(i.qb,{prefixCls:l,placement:"top",configList:f,className:(0,d.$)(p,u,c),classNames:{...r,wrapper:r?.wrapper,title:r?.title},style:a,stack:!1})}};["success","info","warning","error","loading"].forEach(e=>{A[e]=(...t)=>(function(e,t){(0,c.cr)();let r=(0,u.E)(r=>{let a,s={type:e,args:t,resolve:r,setCloseFn:e=>{a=e}};return v.push(s),()=>{a?f(()=>{a()}):s.skipped=!0}});return N(),r})(e,t)});let C=A},12446:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"}},14995:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"}},39214:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/system/logs",function(){return r(78535)}])},53998:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(97109),s=r(12446),o=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let n=a.forwardRef((e,t)=>a.createElement(o.A,l({},e,{ref:t,icon:s.A})))},58690:(e,t,r)=>{"use strict";function a(e){var t,r,a;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{defaultPageSize:null!=(t=s.pageSize)?t:10,pageSizeOptions:null!=(r=s.pageSizeOptions)?r:[10,20,50,100],showSizeChanger:!0,showTotal:t=>{var r,a;return e(null!=(r=s.totalLabelKey)?r:"common.totalRows",null!=(a=s.totalLabelFallback)?a:"共 {count} 条").replace("{count}",String(t))},hideOnSinglePage:null!=(a=s.hideOnSinglePage)&&a,showQuickJumper:!1}}r.d(t,{B:()=>a})},58970:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"}},78535:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var a=r(65321),s=r(97109),o=r(43220),l=r.n(o),n=r(48399),c=r(9137),i=r(11702),d=r(88762),x=r(85114),g=r(7576),m=r(32965),p=r(38964),u=r(84253),h=r(58970),f=r(88483);function v(){return(v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let b=s.forwardRef((e,t)=>s.createElement(f.A,v({},e,{ref:t,icon:h.A})));var w=r(30486),y=r(99811),j=r(58209),N=r(53998),A=r(39507),C=r(6578),k=r(58690);let{Text:T}=n.A;function S(){let e=(0,A.Vr)(),[t,r]=(0,s.useState)([]),[o,n]=(0,s.useState)(!0),[h,f]=(0,s.useState)(""),v=async()=>{n(!0);try{r((await (0,C.oH)(500)).logs)}catch(e){c.Ay.error(e instanceof Error?e.message:"加载日志失败")}finally{n(!1)}};(0,s.useEffect)(()=>{v()},[]);let S=(0,s.useMemo)(()=>{let e=h.trim().toLowerCase();return e?t.filter(t=>[t.id,t.level,t.source,t.functionName,t.message,t.stack].filter(Boolean).some(t=>String(t).toLowerCase().includes(e))):t},[h,t]),O=[{title:e("logs.time"),dataIndex:"createdAt",width:160,render:e=>(0,a.jsx)("span",{className:"text-xs text-[var(--colorTextSecondary)] font-mono",children:new Date(e).toLocaleString()})},{title:e("logs.level"),dataIndex:"level",width:80,render:e=>(0,a.jsx)(i.A,{color:"error"===e?"error":"warn"===e?"warning":"blue",className:"m-0 text-[10px] uppercase tracking-wider border-0",children:e})},{title:e("logs.source"),dataIndex:"source",width:220,render:e=>(0,a.jsx)("span",{className:"text-xs font-mono text-[var(--colorTextSecondary)] break-all",children:e})},{title:e("logs.message"),dataIndex:"message",render:e=>(0,a.jsx)("div",{className:"text-sm text-[var(--colorText)] max-w-3xl whitespace-normal break-words leading-relaxed",title:e,children:e})},{title:e("logs.requestId"),dataIndex:"id",width:120,render:e=>(0,a.jsx)(T,{copyable:!0,className:"text-[10px] font-mono text-[var(--colorTextTertiary)]",children:e.slice(0,8)})}];return o&&0===t.length?(0,a.jsxs)("div",{className:"space-y-8 animateFadeIn",children:[(0,a.jsx)(d.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,a.jsx)(d.A,{active:!0,paragraph:{rows:12}})]}):(0,a.jsxs)("div",{className:"h-[calc(100vh_-_140px)] flex flex-col",children:[(0,a.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4 pb-4 border-b border-[var(--borderColor)] shrink-0 animateFadeIn",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold tracking-tight text-[var(--colorText)] mb-1",children:e("nav.systemLogs")}),(0,a.jsx)("p",{className:"text-xs text-[var(--colorTextSecondary)]",children:e("logs.monitorSystem")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(l(),{href:"/settings",children:(0,a.jsx)(x.Ay,{icon:(0,a.jsx)(b,{}),className:"shadow-none",children:e("logs.backToSettings")})}),(0,a.jsx)(g.A,{placeholder:e("logs.searchLogs"),prefix:(0,a.jsx)(w.A,{className:"text-[var(--colorTextTertiary)]"}),value:h,onChange:e=>f(e.target.value),allowClear:!0,className:"w-[260px] bg-[var(--colorBgHover)] border-transparent"}),(0,a.jsx)(x.Ay,{icon:(0,a.jsx)(y.A,{}),loading:o,onClick:()=>void v(),className:"shadow-none",children:e("logs.refresh")}),(0,a.jsx)(m.A,{title:e("logs.clearConfirm"),onConfirm:()=>{(async()=>{let t=await (0,C.hH)();c.Ay.success(e("logs.clearedFiles").replace("{count}",String(t.deleted))),await v()})()},children:(0,a.jsx)(x.Ay,{danger:!0,icon:(0,a.jsx)(j.A,{}),className:"shadow-none border-transparent",children:e("logs.clear")})})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 py-3 px-1 text-xs text-[var(--colorTextTertiary)] shrink-0 animateFadeIn stagger-1",children:[(0,a.jsx)(N.A,{})," ",e("logs.logStorageInfo")," ",(0,a.jsx)("code",{className:"bg-[var(--colorBgHover)] px-1 rounded",children:"~/.customize-agent/logs/errors.jsonl"}),". ",e("logs.maxLoaded")]}),(0,a.jsx)("div",{className:"flex-1 overflow-hidden bg-[var(--colorBg)] rounded-lg animateFadeIn stagger-2",children:(0,a.jsx)(p.A,{rowKey:"id",loading:o,dataSource:S,columns:O,size:"middle",className:"h-full modern-table tableFillHeight",locale:{emptyText:(0,a.jsx)(u.A,{description:e("logs.noLogsFound"),className:"py-20"})},pagination:(0,k.B)(e),rowClassName:"hover:bg-[var(--colorBgHover)] transition-colors cursor-pointer",expandable:{expandedRowRender:t=>(0,a.jsxs)("div",{className:"flex flex-col gap-4 p-4 bg-[var(--colorBgHover)]/50 border-t border-[var(--borderColor)]",children:[t.functionName&&(0,a.jsxs)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:[(0,a.jsx)("span",{className:"font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)] mr-2",children:e("logs.function")}),(0,a.jsx)("code",{className:"font-mono bg-[var(--colorBgElevated)] px-2 py-1 rounded",children:t.functionName})]}),t.request&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)] mb-2",children:e("logs.requestContext")}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-[var(--colorBgElevated)] p-3 rounded-md border border-[var(--borderColor)] whitespace-pre-wrap break-all m-0 text-[var(--colorTextSecondary)]",children:JSON.stringify(t.request,null,2)})]}),void 0!==t.meta&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)] mb-2",children:e("logs.metadata")}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-[var(--colorBgElevated)] p-3 rounded-md border border-[var(--borderColor)] whitespace-pre-wrap break-all m-0 text-[var(--colorTextSecondary)]",children:JSON.stringify(t.meta,null,2)})]}),t.stack&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)] mb-2",children:e("logs.stackTrace")}),(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-[#1e1e1e] text-[#d4d4d4] p-3 rounded-md overflow-x-auto m-0 leading-relaxed",children:t.stack})]})]})}})})]})}},99811:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(97109),s=r(14995),o=r(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let n=a.forwardRef((e,t)=>a.createElement(o.A,l({},e,{ref:t,icon:s.A})))}},e=>{e.O(0,[6409,1210,1702,5544,9551,4665,8399,7576,1499,8338,5061,8964,636,6593,8792],()=>e(e.s=39214)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (()=>{"use strict";var e={},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var a=r[o]={exports:{}},f=!0;try{e[o].call(a.exports,a,a.exports,t),f=!1}finally{f&&delete r[o]}return a.exports}t.m=e,(()=>{var e=[];t.O=(r,o,n,a)=>{if(o){a=a||0;for(var f=e.length;f>0&&e[f-1][2]>a;f--)e[f]=e[f-1];e[f]=[o,n,a];return}for(var l=1/0,f=0;f<e.length;f++){for(var[o,n,a]=e[f],i=!0,u=0;u<o.length;u++)(!1&a||l>=a)&&Object.keys(t.O).every(e=>t.O[e](o[u]))?o.splice(u--,1):(i=!1,a<l&&(l=a));if(i){e.splice(f--,1);var c=n();void 0!==c&&(r=c)}}return r}})(),t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},(()=>{var e,r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;t.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);t.r(a);var f={};e=e||[null,r({}),r([]),r(r)];for(var l=2&n&&o;"object"==typeof l&&!~e.indexOf(l);l=r(l))Object.getOwnPropertyNames(l).forEach(e=>f[e]=()=>o[e]);return f.default=()=>o,t.d(a,f),a}})(),t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.p="/_next/",(()=>{var e={68:0};t.O.j=r=>0===e[r];var r=(r,o)=>{var n,a,[f,l,i]=o,u=0;if(f.some(r=>0!==e[r])){for(n in l)t.o(l,n)&&(t.m[n]=l[n]);if(i)var c=i(t)}for(r&&r(o);u<f.length;u++)a=f[u],t.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return t.O(c)},o=self.webpackChunk_N_E=self.webpackChunk_N_E||[];o.forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o))})()})();
1
+ (()=>{"use strict";var e={},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var a=r[o]={exports:{}},f=!0;try{e[o].call(a.exports,a,a.exports,t),f=!1}finally{f&&delete r[o]}return a.exports}t.m=e,(()=>{var e=[];t.O=(r,o,n,a)=>{if(o){a=a||0;for(var f=e.length;f>0&&e[f-1][2]>a;f--)e[f]=e[f-1];e[f]=[o,n,a];return}for(var l=1/0,f=0;f<e.length;f++){for(var[o,n,a]=e[f],i=!0,u=0;u<o.length;u++)(!1&a||l>=a)&&Object.keys(t.O).every(e=>t.O[e](o[u]))?o.splice(u--,1):(i=!1,a<l&&(l=a));if(i){e.splice(f--,1);var c=n();void 0!==c&&(r=c)}}return r}})(),t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},(()=>{var e,r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;t.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);t.r(a);var f={};e=e||[null,r({}),r([]),r(r)];for(var l=2&n&&o;"object"==typeof l&&!~e.indexOf(l);l=r(l))Object.getOwnPropertyNames(l).forEach(e=>f[e]=()=>o[e]);return f.default=()=>o,t.d(a,f),a}})(),t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.p="/_next/",(()=>{var e={8068:0};t.O.j=r=>0===e[r];var r=(r,o)=>{var n,a,[f,l,i]=o,u=0;if(f.some(r=>0!==e[r])){for(n in l)t.o(l,n)&&(t.m[n]=l[n]);if(i)var c=i(t)}for(r&&r(o);u<f.length;u++)a=f[u],t.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return t.O(c)},o=self.webpackChunk_N_E=self.webpackChunk_N_E||[];o.forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o))})()})();