@gientech/modual 2.2.20 → 2.2.22

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 (54) hide show
  1. package/README.md +761 -761
  2. package/assets/{GientechStreamReader-ClJ18ke0.js → GientechStreamReader-CCAVgoU7.js} +1 -1
  3. package/assets/{LeftOutlined-DbVWaJal.js → LeftOutlined-6ZZOHHzZ.js} +1 -1
  4. package/assets/{circle-plus-Bqwlq2UM.js → circle-plus-P1B4Xn23.js} +1 -1
  5. package/assets/database.svg +11 -11
  6. package/assets/database_add.svg +53 -53
  7. package/assets/database_connect.svg +66 -66
  8. package/assets/database_upload.svg +29 -29
  9. package/assets/databse.svg +6 -6
  10. package/assets/defaultWeLogo.svg +14 -14
  11. package/assets/graph.svg +4 -4
  12. package/assets/iconAi.svg +9 -9
  13. package/assets/{index-CaKTISxy.js → index-AbRL5gZq.js} +1 -1
  14. package/assets/{index-BB-K4Uv2.js → index-BVGi9GLj.js} +1 -1
  15. package/assets/{index-BbQ5_tfg.js → index-CshF4ZrU.js} +337 -226
  16. package/assets/{index-DiTGnLML.js → index-Cxdo0VA9.js} +1 -1
  17. package/assets/{index-O8MDfMV6.js → index-DBBlFPQ7.js} +1 -1
  18. package/assets/{index-zCzB-56N.js → index-DBcQE2Ji.js} +1 -1
  19. package/assets/{index-BZ2Q8J4Z.js → index-DSsXFuyz.js} +159 -159
  20. package/assets/{index-g1ObzlRk.js → index-DXFiVEll.js} +60 -60
  21. package/assets/{index-DCnYE71u.js → index-D_Hj7QNz.js} +11 -11
  22. package/assets/index-DgYjqte0.js +745 -0
  23. package/assets/{index-DIaywdNt.js → index-VLFjDTvh.js} +1 -1
  24. package/assets/knowledge.svg +4 -4
  25. package/assets/mysql.svg +14 -14
  26. package/assets/{plus-B4_cWXV7.js → plus-Dksaa79Q.js} +1 -1
  27. package/assets/{search-B5sYxJby.js → search-DPX4n-TM.js} +1 -1
  28. package/assets/sensitive.svg +5 -5
  29. package/assets/style-403S9iLe.js +196 -0
  30. package/assets/style2.css +1 -1
  31. package/assets/style4.css +1 -1
  32. package/assets/style6.css +1 -1
  33. package/assets/style7.css +1 -1
  34. package/assets/{triangle-alert-DMLBtHZo.js → triangle-alert-DwIOmwma.js} +1 -1
  35. package/assets/{x-BHe7G4Ln.js → x-cAgrXVQW.js} +1 -1
  36. package/assistantConfig.d.ts +110 -0
  37. package/assistantConfig.js +38 -38
  38. package/chat.js +1 -1
  39. package/chatCompare.js +1 -1
  40. package/database.d.ts +0 -2
  41. package/database.js +2 -6
  42. package/databaseId.d.ts +0 -2
  43. package/databaseId.js +1 -1
  44. package/databaseTable.js +2 -2
  45. package/index.d.ts +104 -0
  46. package/index.js +1 -1
  47. package/modelManage.js +2 -2
  48. package/package.json +6 -6
  49. package/sensitive.js +30 -30
  50. package/sensitiveWords.js +1 -1
  51. package/streamFilesReader.js +1 -1
  52. package/worker/pdf.worker.min.js +21 -21
  53. package/assets/index-CQChY5LV.js +0 -741
  54. package/assets/style-CC4nBmWs.js +0 -196
package/sensitive.js CHANGED
@@ -1,40 +1,40 @@
1
- import{jsxs as ce,jsx as P,Fragment as or}from"react/jsx-runtime";import*as l from"react";import $e,{useRef as je,useEffect as ot,Component as At,useState as me,useCallback as pe,useMemo as Me}from"react";import{c as Bt,Q as ir,ay as sr,a6 as De,U as tt,L as It,_ as he,j as te,aN as rt,T as Pt,a as kt,m as Lt,r as Ot,s as de,q as nt,aO as lr,C as Ue,az as Nt,as as cr,av as ur,at as dr,aP as pr,I as Le,O as mr,aQ as ye,aR as se,A as fe,aS as Tt,aT as _t,aU as Mt,V as Z,aV as ie,aW as jt,N as fr,aG as Rt,aX as zt,aY as gr,aZ as gt,a_ as hr,a$ as vr,v as Wt,b0 as br,b1 as yr,am as Cr,o as ht,H as vt,aq as bt,u as Fr,b2 as wr,l as $r,ag as Er,aK as xr,F as Sr,d as ue,f as it,G as st,J as Ke,x as Dr}from"./assets/index-DCnYE71u.js";import{e as Ar}from"./assets/index-CQChY5LV.js";import{Y as be,N as Br}from"./assets/index-BbQ5_tfg.js";import{s as ae,M as lt}from"./assets/index-DiTGnLML.js";import{flushSync as yt}from"react-dom";import{C as Ir}from"./assets/circle-plus-Bqwlq2UM.js";import{S as Ut}from"./assets/search-B5sYxJby.js";import{X as Pr}from"./assets/x-BHe7G4Ln.js";import{P as Ht}from"./assets/plus-B4_cWXV7.js";import{D as kr}from"./assets/index-CaKTISxy.js";/* empty css */import"./assets/LeftOutlined-DbVWaJal.js";/**
1
+ import{jsxs as le,jsx as I,Fragment as ir}from"react/jsx-runtime";import*as l from"react";import Ee,{useRef as je,useEffect as ot,Component as Bt,useState as me,useCallback as pe,useMemo as Me}from"react";import{c as It,Q as sr,ay as lr,a6 as Ae,U as tt,L as Pt,_ as he,f as ee,aN as rt,T as kt,g as Lt,m as Ot,r as Tt,q as de,o as nt,aO as cr,C as Ue,az as Nt,as as ur,av as dr,at as pr,aP as mr,I as Oe,O as fr,aQ as Ce,aR as ie,A as ge,aS as _t,aT as Mt,aU as jt,V as Y,aV as oe,aW as Rt,N as gr,aG as zt,aX as Wt,aY as hr,aZ as gt,a_ as vr,a$ as br,t as Ut,b0 as yr,b1 as Cr,am as Fr,l as ht,H as vt,aq as bt,u as wr,b2 as $r,j as Er,ag as xr,aK as Sr,F as Dr,d as ce,p as it,G as st,J as Ke,x as Ar,v as yt}from"./assets/index-D_Hj7QNz.js";import{o as Br}from"./assets/index-DgYjqte0.js";import{$ as ye,z as Ir}from"./assets/index-CshF4ZrU.js";import{s as ne,M as lt}from"./assets/index-Cxdo0VA9.js";import{flushSync as Ct}from"react-dom";import{C as Pr}from"./assets/circle-plus-P1B4Xn23.js";import{S as Ht}from"./assets/search-DPX4n-TM.js";import{X as kr}from"./assets/x-cAgrXVQW.js";import{P as qt}from"./assets/plus-Dksaa79Q.js";import{D as Lr}from"./assets/index-AbRL5gZq.js";/* empty css */import"./assets/LeftOutlined-6ZZOHHzZ.js";/**
2
2
  * @license lucide-react v0.456.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const Lr=Bt("FileUp",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]]);/**
6
+ */const Or=It("FileUp",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]]);/**
7
7
  * @license lucide-react v0.456.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const Ct=Bt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var Or={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Nr=function(){var t=je([]),n=je(null);return ot(function(){var a=Date.now(),o=!1;t.current.forEach(function(r){if(r){o=!0;var s=r.style;s.transitionDuration=".3s, .3s, .3s, .06s",n.current&&a-n.current<100&&(s.transitionDuration="0s, 0s")}}),o&&(n.current=Date.now())}),t.current},Ft=0,Tr=sr();function _r(){var e;return Tr?(e=Ft,Ft+=1):e="TEST_OR_SSR",e}const Mr=(function(e){var t=l.useState(),n=ir(t,2),a=n[0],o=n[1];return l.useEffect(function(){o("rc_progress_".concat(_r()))},[]),e||a});var wt=function(t){var n=t.bg,a=t.children;return l.createElement("div",{style:{width:"100%",height:"100%",background:n}},a)};function $t(e,t){return Object.keys(e).map(function(n){var a=parseFloat(n),o="".concat(Math.floor(a*t),"%");return"".concat(e[n]," ").concat(o)})}var jr=l.forwardRef(function(e,t){var n=e.prefixCls,a=e.color,o=e.gradientId,r=e.radius,s=e.style,i=e.ptg,u=e.strokeLinecap,d=e.strokeWidth,p=e.size,g=e.gapDegree,b=a&&De(a)==="object",y=b?"#FFF":void 0,c=p/2,m=l.createElement("circle",{className:"".concat(n,"-circle-path"),r,cx:c,cy:c,stroke:y,strokeLinecap:u,strokeWidth:d,opacity:i===0?0:1,style:s,ref:t});if(!b)return m;var f="".concat(o,"-conic"),v=g?"".concat(180+g/2,"deg"):"0deg",F=$t(a,(360-g)/360),x=$t(a,1),w="conic-gradient(from ".concat(v,", ").concat(F.join(", "),")"),h="linear-gradient(to ".concat(g?"bottom":"top",", ").concat(x.join(", "),")");return l.createElement(l.Fragment,null,l.createElement("mask",{id:f},m),l.createElement("foreignObject",{x:0,y:0,width:p,height:p,mask:"url(#".concat(f,")")},l.createElement(wt,{bg:h},l.createElement(wt,{bg:w}))))}),Ie=100,Je=function(t,n,a,o,r,s,i,u,d,p){var g=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,b=a/100*360*((360-s)/360),y=s===0?0:{bottom:0,top:180,left:90,right:-90}[i],c=(100-o)/100*n;d==="round"&&o!==100&&(c+=p/2,c>=n&&(c=n-.01));var m=Ie/2;return{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:c+g,transform:"rotate(".concat(r+b+y,"deg)"),transformOrigin:"".concat(m,"px ").concat(m,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Rr=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Et(e){var t=e??[];return Array.isArray(t)?t:[t]}var zr=function(t){var n=tt(tt({},Or),t),a=n.id,o=n.prefixCls,r=n.steps,s=n.strokeWidth,i=n.trailWidth,u=n.gapDegree,d=u===void 0?0:u,p=n.gapPosition,g=n.trailColor,b=n.strokeLinecap,y=n.style,c=n.className,m=n.strokeColor,f=n.percent,v=It(n,Rr),F=Ie/2,x=Mr(a),w="".concat(x,"-gradient"),h=F-s/2,I=Math.PI*2*h,A=d>0?90+d/2:-90,O=I*((360-d)/360),z=De(r)==="object"?r:{count:r,gap:2},S=z.count,re=z.gap,oe=Et(f),J=Et(m),Y=J.find(function(T){return T&&De(T)==="object"}),K=Y&&De(Y)==="object",V=K?"butt":b,H=Je(I,O,0,100,A,d,p,g,V,s),Q=Nr(),B=function(){var q=0;return oe.map(function(E,k){var j=J[k]||J[J.length-1],ne=Je(I,O,q,E,A,d,p,j,V,s);return q+=E,l.createElement(jr,{key:k,color:j,ptg:E,radius:h,prefixCls:o,gradientId:w,style:ne,strokeLinecap:V,strokeWidth:s,gapDegree:d,ref:function(C){Q[k]=C},size:Ie})}).reverse()},$=function(){var q=Math.round(S*(oe[0]/100)),E=100/S,k=0;return new Array(S).fill(null).map(function(j,ne){var D=ne<=q-1?J[0]:g,C=D&&De(D)==="object"?"url(#".concat(w,")"):void 0,M=Je(I,O,k,E,A,d,p,D,"butt",s,re);return k+=(O-M.strokeDashoffset+re)*100/O,l.createElement("circle",{key:ne,className:"".concat(o,"-circle-path"),r:h,cx:F,cy:F,stroke:C,strokeWidth:s,opacity:1,style:M,ref:function(X){Q[ne]=X}})})};return l.createElement("svg",he({className:te("".concat(o,"-circle"),c),viewBox:"0 0 ".concat(Ie," ").concat(Ie),style:y,id:a,role:"presentation"},v),!S&&l.createElement("circle",{className:"".concat(o,"-circle-trail"),r:h,cx:F,cy:F,stroke:g,strokeLinecap:V,strokeWidth:i||s,style:H}),S?$():B())};function Ce(e){return!e||e<0?0:e>100?100:e}function Re({success:e,successPercent:t}){let n=t;return e&&"progress"in e&&(n=e.progress),e&&"percent"in e&&(n=e.percent),n}const Wr=({percent:e,success:t,successPercent:n})=>{const a=Ce(Re({success:t,successPercent:n}));return[a,Ce(Ce(e)-a)]},Ur=({success:e={},strokeColor:t})=>{const{strokeColor:n}=e;return[n||rt.green,t||null]},He=(e,t,n)=>{var a,o,r,s;let i=-1,u=-1;if(t==="step"){const d=n.steps,p=n.strokeWidth;typeof e=="string"||typeof e>"u"?(i=e==="small"?2:14,u=p??8):typeof e=="number"?[i,u]=[e,e]:[i=14,u=8]=Array.isArray(e)?e:[e.width,e.height],i*=d}else if(t==="line"){const d=n==null?void 0:n.strokeWidth;typeof e=="string"||typeof e>"u"?u=d||(e==="small"?6:8):typeof e=="number"?[i,u]=[e,e]:[i=-1,u=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[i,u]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[i,u]=[e,e]:Array.isArray(e)&&(i=(o=(a=e[0])!==null&&a!==void 0?a:e[1])!==null&&o!==void 0?o:120,u=(s=(r=e[0])!==null&&r!==void 0?r:e[1])!==null&&s!==void 0?s:120));return[i,u]},Hr=3,qr=e=>Hr/e*100,Xr=e=>{const{prefixCls:t,trailColor:n=null,strokeLinecap:a="round",gapPosition:o,gapDegree:r,width:s=120,type:i,children:u,success:d,size:p=s,steps:g}=e,[b,y]=He(p,"circle");let{strokeWidth:c}=e;c===void 0&&(c=Math.max(qr(b),6));const m={width:b,height:y,fontSize:b*.15+6},f=l.useMemo(()=>{if(r||r===0)return r;if(i==="dashboard")return 75},[r,i]),v=Wr(e),F=o||i==="dashboard"&&"bottom"||void 0,x=Object.prototype.toString.call(e.strokeColor)==="[object Object]",w=Ur({success:d,strokeColor:e.strokeColor}),h=te(`${t}-inner`,{[`${t}-circle-gradient`]:x}),I=l.createElement(zr,{steps:g,percent:g?v[1]:v,strokeWidth:c,trailWidth:c,strokeColor:g?w[1]:w,strokeLinecap:a,trailColor:n,prefixCls:t,gapDegree:f,gapPosition:F}),A=b<=20,O=l.createElement("div",{className:h,style:m},I,!A&&u);return A?l.createElement(Pt,{title:u},O):O},ze="--progress-line-stroke-color",qt="--progress-percent",xt=e=>{const t=e?"100%":"-100%";return new nt(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Vr=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:Object.assign(Object.assign({},Ot(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${ze})`]},height:"100%",width:`calc(1 / var(${qt}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${de(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:xt(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:xt(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Gr=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Kr=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},Jr=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${n}`]:{fontSize:e.fontSizeSM}}}},Yr=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),Zr=kt("Progress",e=>{const t=e.calc(e.marginXXS).div(2).equal(),n=Lt(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Vr(n),Gr(n),Kr(n),Jr(n)]},Yr);var Qr=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const en=e=>{let t=[];return Object.keys(e).forEach(n=>{const a=Number.parseFloat(n.replace(/%/g,""));Number.isNaN(a)||t.push({key:a,value:e[n]})}),t=t.sort((n,a)=>n.key-a.key),t.map(({key:n,value:a})=>`${a} ${n}%`).join(", ")},tn=(e,t)=>{const{from:n=rt.blue,to:a=rt.blue,direction:o=t==="rtl"?"to left":"to right"}=e,r=Qr(e,["from","to","direction"]);if(Object.keys(r).length!==0){const i=en(r),u=`linear-gradient(${o}, ${i})`;return{background:u,[ze]:u}}const s=`linear-gradient(${o}, ${n}, ${a})`;return{background:s,[ze]:s}},rn=e=>{const{prefixCls:t,direction:n,percent:a,size:o,strokeWidth:r,strokeColor:s,strokeLinecap:i="round",children:u,trailColor:d=null,percentPosition:p,success:g}=e,{align:b,type:y}=p,c=s&&typeof s!="string"?tn(s,n):{[ze]:s,background:s},m=i==="square"||i==="butt"?0:void 0,f=o??[-1,r||(o==="small"?6:8)],[v,F]=He(f,"line",{strokeWidth:r}),x={backgroundColor:d||void 0,borderRadius:m},w=Object.assign(Object.assign({width:`${Ce(a)}%`,height:F,borderRadius:m},c),{[qt]:Ce(a)/100}),h=Re(e),I={width:`${Ce(h)}%`,height:F,borderRadius:m,backgroundColor:g==null?void 0:g.strokeColor},A={width:v<0?"100%":v},O=l.createElement("div",{className:`${t}-inner`,style:x},l.createElement("div",{className:te(`${t}-bg`,`${t}-bg-${y}`),style:w},y==="inner"&&u),h!==void 0&&l.createElement("div",{className:`${t}-success-bg`,style:I})),z=y==="outer"&&b==="start",S=y==="outer"&&b==="end";return y==="outer"&&b==="center"?l.createElement("div",{className:`${t}-layout-bottom`},O,u):l.createElement("div",{className:`${t}-outer`,style:A},z&&u,O,S&&u)},nn=e=>{const{size:t,steps:n,rounding:a=Math.round,percent:o=0,strokeWidth:r=8,strokeColor:s,trailColor:i=null,prefixCls:u,children:d}=e,p=a(n*(o/100)),b=t??[t==="small"?2:14,r],[y,c]=He(b,"step",{steps:n,strokeWidth:r}),m=y/n,f=Array.from({length:n});for(let v=0;v<n;v++){const F=Array.isArray(s)?s[v]:s;f[v]=l.createElement("div",{key:v,className:te(`${u}-steps-item`,{[`${u}-steps-item-active`]:v<=p-1}),style:{backgroundColor:v<=p-1?F:i,width:m,height:c}})}return l.createElement("div",{className:`${u}-steps-outer`},f,d)};var an=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const on=["normal","exception","active","success"],sn=l.forwardRef((e,t)=>{const{prefixCls:n,className:a,rootClassName:o,steps:r,strokeColor:s,percent:i=0,size:u="default",showInfo:d=!0,type:p="line",status:g,format:b,style:y,percentPosition:c={}}=e,m=an(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:f="end",type:v="outer"}=c,F=Array.isArray(s)?s[0]:s,x=typeof s=="string"||Array.isArray(s)?s:void 0,w=l.useMemo(()=>{if(F){const B=typeof F=="string"?F:Object.values(F)[0];return new lr(B).isLight()}return!1},[s]),h=l.useMemo(()=>{var B,$;const T=Re(e);return Number.parseInt(T!==void 0?(B=T??0)===null||B===void 0?void 0:B.toString():($=i??0)===null||$===void 0?void 0:$.toString(),10)},[i,e.success,e.successPercent]),I=l.useMemo(()=>!on.includes(g)&&h>=100?"success":g||"normal",[g,h]),{getPrefixCls:A,direction:O,progress:z}=l.useContext(Ue),S=A("progress",n),[re,oe,J]=Zr(S),Y=p==="line",K=Y&&!r,V=l.useMemo(()=>{if(!d)return null;const B=Re(e);let $;const T=b||(E=>`${E}%`),q=Y&&w&&v==="inner";return v==="inner"||b||I!=="exception"&&I!=="success"?$=T(Ce(i),Ce(B)):I==="exception"?$=Y?l.createElement(cr,null):l.createElement(ur,null):I==="success"&&($=Y?l.createElement(dr,null):l.createElement(pr,null)),l.createElement("span",{className:te(`${S}-text`,{[`${S}-text-bright`]:q,[`${S}-text-${f}`]:K,[`${S}-text-${v}`]:K}),title:typeof $=="string"?$:void 0},$)},[d,i,h,I,p,S,b]);let H;p==="line"?H=r?l.createElement(nn,Object.assign({},e,{strokeColor:x,prefixCls:S,steps:typeof r=="object"?r.count:r}),V):l.createElement(rn,Object.assign({},e,{strokeColor:F,prefixCls:S,direction:O,percentPosition:{align:f,type:v}}),V):(p==="circle"||p==="dashboard")&&(H=l.createElement(Xr,Object.assign({},e,{strokeColor:F,prefixCls:S,progressStatus:I}),V));const Q=te(S,`${S}-status-${I}`,{[`${S}-${p==="dashboard"&&"circle"||p}`]:p!=="line",[`${S}-inline-circle`]:p==="circle"&&He(u,"circle")[0]<=20,[`${S}-line`]:K,[`${S}-line-align-${f}`]:K,[`${S}-line-position-${v}`]:K,[`${S}-steps`]:r,[`${S}-show-info`]:d,[`${S}-${u}`]:typeof u=="string",[`${S}-rtl`]:O==="rtl"},z==null?void 0:z.className,a,o,oe,J);return re(l.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},z==null?void 0:z.style),y),className:Q,role:"progressbar","aria-valuenow":h,"aria-valuemin":0,"aria-valuemax":100},Nt(m,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),H))});var ln={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"},cn=function(t,n){return l.createElement(Le,he({},t,{ref:n,icon:ln}))},un=l.forwardRef(cn);const Ye=(function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),a=e.name||"",o=e.type||"",r=o.replace(/\/.*$/,"");return n.some(function(s){var i=s.trim();if(/^\*(\/\*)?$/.test(s))return!0;if(i.charAt(0)==="."){var u=a.toLowerCase(),d=i.toLowerCase(),p=[d];return(d===".jpg"||d===".jpeg")&&(p=[".jpg",".jpeg"]),p.some(function(g){return u.endsWith(g)})}return/\/\*$/.test(i)?r===i.replace(/\/.*$/,""):o===i?!0:/^\w+$/.test(i)?(mr(!1,"Upload takes an invalidate 'accept' type '".concat(i,"'.Skip for check.")),!0):!1})}return!0});function dn(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),a=new Error(n);return a.status=t.status,a.method=e.method,a.url=e.action,a}function St(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function Dt(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(r){r.total>0&&(r.percent=r.loaded/r.total*100),e.onProgress(r)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(o){var r=e.data[o];if(Array.isArray(r)){r.forEach(function(s){n.append("".concat(o,"[]"),s)});return}n.append(o,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(r){e.onError(r)},t.onload=function(){return t.status<200||t.status>=300?e.onError(dn(e,t),St(t)):e.onSuccess(St(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var a=e.headers||{};return a["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(a).forEach(function(o){a[o]!==null&&t.setRequestHeader(o,a[o])}),t.send(n),{abort:function(){t.abort()}}}var pn=(function(){var e=ye(se().mark(function t(n,a){var o,r,s,i,u,d,p,g;return se().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:d=function(){return d=ye(se().mark(function m(f){return se().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.abrupt("return",new Promise(function(x){f.file(function(w){a(w)?(f.fullPath&&!w.webkitRelativePath&&(Object.defineProperties(w,{webkitRelativePath:{writable:!0}}),w.webkitRelativePath=f.fullPath.replace(/^\//,""),Object.defineProperties(w,{webkitRelativePath:{writable:!1}})),x(w)):x(null)})}));case 1:case"end":return F.stop()}},m)})),d.apply(this,arguments)},u=function(m){return d.apply(this,arguments)},i=function(){return i=ye(se().mark(function m(f){var v,F,x,w,h;return se().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:v=f.createReader(),F=[];case 2:return A.next=5,new Promise(function(O){v.readEntries(O,function(){return O([])})});case 5:if(x=A.sent,w=x.length,w){A.next=9;break}return A.abrupt("break",12);case 9:for(h=0;h<w;h++)F.push(x[h]);A.next=2;break;case 12:return A.abrupt("return",F);case 13:case"end":return A.stop()}},m)})),i.apply(this,arguments)},s=function(m){return i.apply(this,arguments)},o=[],r=[],n.forEach(function(c){return r.push(c.webkitGetAsEntry())}),p=(function(){var c=ye(se().mark(function m(f,v){var F,x;return se().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(f){h.next=2;break}return h.abrupt("return");case 2:if(f.path=v||"",!f.isFile){h.next=10;break}return h.next=6,u(f);case 6:F=h.sent,F&&o.push(F),h.next=15;break;case 10:if(!f.isDirectory){h.next=15;break}return h.next=13,s(f);case 13:x=h.sent,r.push.apply(r,fe(x));case 15:case"end":return h.stop()}},m)}));return function(f,v){return c.apply(this,arguments)}})(),g=0;case 9:if(!(g<r.length)){y.next=15;break}return y.next=12,p(r[g]);case 12:g++,y.next=9;break;case 15:return y.abrupt("return",o);case 16:case"end":return y.stop()}},t)}));return function(n,a){return e.apply(this,arguments)}})(),mn=+new Date,fn=0;function Ze(){return"rc-upload-".concat(mn,"-").concat(++fn)}var gn=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","folder","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],hn=(function(e){Tt(n,e);var t=_t(n);function n(){var a;Mt(this,n);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return a=t.call.apply(t,[this].concat(r)),Z(ie(a),"state",{uid:Ze()}),Z(ie(a),"reqs",{}),Z(ie(a),"fileInput",void 0),Z(ie(a),"_isMounted",void 0),Z(ie(a),"onChange",function(i){var u=a.props,d=u.accept,p=u.directory,g=i.target.files,b=fe(g).filter(function(y){return!p||Ye(y,d)});a.uploadFiles(b),a.reset()}),Z(ie(a),"onClick",function(i){var u=a.fileInput;if(u){var d=i.target,p=a.props.onClick;if(d&&d.tagName==="BUTTON"){var g=u.parentNode;g.focus(),d.blur()}u.click(),p&&p(i)}}),Z(ie(a),"onKeyDown",function(i){i.key==="Enter"&&a.onClick(i)}),Z(ie(a),"onDataTransferFiles",(function(){var i=ye(se().mark(function u(d,p){var g,b,y,c,m,f,v;return se().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(g=a.props,b=g.multiple,y=g.accept,c=g.directory,m=fe(d.items||[]),f=fe(d.files||[]),(f.length>0||m.some(function(w){return w.kind==="file"}))&&(p==null||p()),!c){x.next=11;break}return x.next=7,pn(Array.prototype.slice.call(m),function(w){return Ye(w,a.props.accept)});case 7:f=x.sent,a.uploadFiles(f),x.next=14;break;case 11:v=fe(f).filter(function(w){return Ye(w,y)}),b===!1&&(v=f.slice(0,1)),a.uploadFiles(v);case 14:case"end":return x.stop()}},u)}));return function(u,d){return i.apply(this,arguments)}})()),Z(ie(a),"onFilePaste",(function(){var i=ye(se().mark(function u(d){var p,g;return se().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(p=a.props.pastable,p){y.next=3;break}return y.abrupt("return");case 3:if(d.type!=="paste"){y.next=6;break}return g=d.clipboardData,y.abrupt("return",a.onDataTransferFiles(g,function(){d.preventDefault()}));case 6:case"end":return y.stop()}},u)}));return function(u){return i.apply(this,arguments)}})()),Z(ie(a),"onFileDragOver",function(i){i.preventDefault()}),Z(ie(a),"onFileDrop",(function(){var i=ye(se().mark(function u(d){var p;return se().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(d.preventDefault(),d.type!=="drop"){b.next=4;break}return p=d.dataTransfer,b.abrupt("return",a.onDataTransferFiles(p));case 4:case"end":return b.stop()}},u)}));return function(u){return i.apply(this,arguments)}})()),Z(ie(a),"uploadFiles",function(i){var u=fe(i),d=u.map(function(p){return p.uid=Ze(),a.processFile(p,u)});Promise.all(d).then(function(p){var g=a.props.onBatchStart;g==null||g(p.map(function(b){var y=b.origin,c=b.parsedFile;return{file:y,parsedFile:c}})),p.filter(function(b){return b.parsedFile!==null}).forEach(function(b){a.post(b)})})}),Z(ie(a),"processFile",(function(){var i=ye(se().mark(function u(d,p){var g,b,y,c,m,f,v,F,x;return se().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(g=a.props.beforeUpload,b=d,!g){h.next=14;break}return h.prev=3,h.next=6,g(d,p);case 6:b=h.sent,h.next=12;break;case 9:h.prev=9,h.t0=h.catch(3),b=!1;case 12:if(b!==!1){h.next=14;break}return h.abrupt("return",{origin:d,parsedFile:null,action:null,data:null});case 14:if(y=a.props.action,typeof y!="function"){h.next=21;break}return h.next=18,y(d);case 18:c=h.sent,h.next=22;break;case 21:c=y;case 22:if(m=a.props.data,typeof m!="function"){h.next=29;break}return h.next=26,m(d);case 26:f=h.sent,h.next=30;break;case 29:f=m;case 30:return v=(De(b)==="object"||typeof b=="string")&&b?b:d,v instanceof File?F=v:F=new File([v],d.name,{type:d.type}),x=F,x.uid=d.uid,h.abrupt("return",{origin:d,data:f,parsedFile:x,action:c});case 35:case"end":return h.stop()}},u,null,[[3,9]])}));return function(u,d){return i.apply(this,arguments)}})()),Z(ie(a),"saveFileInput",function(i){a.fileInput=i}),a}return jt(n,[{key:"componentDidMount",value:function(){this._isMounted=!0;var o=this.props.pastable;o&&document.addEventListener("paste",this.onFilePaste)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort(),document.removeEventListener("paste",this.onFilePaste)}},{key:"componentDidUpdate",value:function(o){var r=this.props.pastable;r&&!o.pastable?document.addEventListener("paste",this.onFilePaste):!r&&o.pastable&&document.removeEventListener("paste",this.onFilePaste)}},{key:"post",value:function(o){var r=this,s=o.data,i=o.origin,u=o.action,d=o.parsedFile;if(this._isMounted){var p=this.props,g=p.onStart,b=p.customRequest,y=p.name,c=p.headers,m=p.withCredentials,f=p.method,v=i.uid,F=b||Dt,x={action:u,filename:y,data:s,file:d,headers:c,withCredentials:m,method:f||"post",onProgress:function(h){var I=r.props.onProgress;I==null||I(h,d)},onSuccess:function(h,I){var A=r.props.onSuccess;A==null||A(h,d,I),delete r.reqs[v]},onError:function(h,I){var A=r.props.onError;A==null||A(h,I,d),delete r.reqs[v]}};g(i),this.reqs[v]=F(x,{defaultRequest:Dt})}}},{key:"reset",value:function(){this.setState({uid:Ze()})}},{key:"abort",value:function(o){var r=this.reqs;if(o){var s=o.uid?o.uid:o;r[s]&&r[s].abort&&r[s].abort(),delete r[s]}else Object.keys(r).forEach(function(i){r[i]&&r[i].abort&&r[i].abort(),delete r[i]})}},{key:"render",value:function(){var o=this.props,r=o.component,s=o.prefixCls,i=o.className,u=o.classNames,d=u===void 0?{}:u,p=o.disabled,g=o.id,b=o.name,y=o.style,c=o.styles,m=c===void 0?{}:c,f=o.multiple,v=o.accept,F=o.capture,x=o.children,w=o.directory,h=o.folder,I=o.openFileDialogOnClick,A=o.onMouseEnter,O=o.onMouseLeave,z=o.hasControlInside,S=It(o,gn),re=te(Z(Z(Z({},s,!0),"".concat(s,"-disabled"),p),i,i)),oe=w||h?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},J=p?{}:{onClick:I?this.onClick:function(){},onKeyDown:I?this.onKeyDown:function(){},onMouseEnter:A,onMouseLeave:O,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:z?void 0:"0"};return $e.createElement(r,he({},J,{className:re,role:z?void 0:"button",style:y}),$e.createElement("input",he({},fr(S,{aria:!0,data:!0}),{id:g,name:b,disabled:p,type:"file",ref:this.saveFileInput,onClick:function(K){return K.stopPropagation()},key:this.state.uid,style:tt({display:"none"},m.input),className:d.input,accept:v},oe,{multiple:f,onChange:this.onChange},F!=null?{capture:F}:{})),x)}}]),n})(At);function Qe(){}var at=(function(e){Tt(n,e);var t=_t(n);function n(){var a;Mt(this,n);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return a=t.call.apply(t,[this].concat(r)),Z(ie(a),"uploader",void 0),Z(ie(a),"saveUploader",function(i){a.uploader=i}),a}return jt(n,[{key:"abort",value:function(o){this.uploader.abort(o)}},{key:"render",value:function(){return $e.createElement(hn,he({},this.props,{ref:this.saveUploader}))}}]),n})(At);Z(at,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Qe,onError:Qe,onSuccess:Qe,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});const vn=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${de(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${de(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
11
+ */const Ft=It("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var Tr={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Nr=function(){var t=je([]),n=je(null);return ot(function(){var a=Date.now(),o=!1;t.current.forEach(function(r){if(r){o=!0;var s=r.style;s.transitionDuration=".3s, .3s, .3s, .06s",n.current&&a-n.current<100&&(s.transitionDuration="0s, 0s")}}),o&&(n.current=Date.now())}),t.current},wt=0,_r=lr();function Mr(){var e;return _r?(e=wt,wt+=1):e="TEST_OR_SSR",e}const jr=(function(e){var t=l.useState(),n=sr(t,2),a=n[0],o=n[1];return l.useEffect(function(){o("rc_progress_".concat(Mr()))},[]),e||a});var $t=function(t){var n=t.bg,a=t.children;return l.createElement("div",{style:{width:"100%",height:"100%",background:n}},a)};function Et(e,t){return Object.keys(e).map(function(n){var a=parseFloat(n),o="".concat(Math.floor(a*t),"%");return"".concat(e[n]," ").concat(o)})}var Rr=l.forwardRef(function(e,t){var n=e.prefixCls,a=e.color,o=e.gradientId,r=e.radius,s=e.style,i=e.ptg,u=e.strokeLinecap,d=e.strokeWidth,p=e.size,g=e.gapDegree,b=a&&Ae(a)==="object",y=b?"#FFF":void 0,c=p/2,m=l.createElement("circle",{className:"".concat(n,"-circle-path"),r,cx:c,cy:c,stroke:y,strokeLinecap:u,strokeWidth:d,opacity:i===0?0:1,style:s,ref:t});if(!b)return m;var f="".concat(o,"-conic"),v=g?"".concat(180+g/2,"deg"):"0deg",w=Et(a,(360-g)/360),x=Et(a,1),$="conic-gradient(from ".concat(v,", ").concat(w.join(", "),")"),h="linear-gradient(to ".concat(g?"bottom":"top",", ").concat(x.join(", "),")");return l.createElement(l.Fragment,null,l.createElement("mask",{id:f},m),l.createElement("foreignObject",{x:0,y:0,width:p,height:p,mask:"url(#".concat(f,")")},l.createElement($t,{bg:h},l.createElement($t,{bg:$}))))}),Pe=100,Je=function(t,n,a,o,r,s,i,u,d,p){var g=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,b=a/100*360*((360-s)/360),y=s===0?0:{bottom:0,top:180,left:90,right:-90}[i],c=(100-o)/100*n;d==="round"&&o!==100&&(c+=p/2,c>=n&&(c=n-.01));var m=Pe/2;return{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:c+g,transform:"rotate(".concat(r+b+y,"deg)"),transformOrigin:"".concat(m,"px ").concat(m,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},zr=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function xt(e){var t=e??[];return Array.isArray(t)?t:[t]}var Wr=function(t){var n=tt(tt({},Tr),t),a=n.id,o=n.prefixCls,r=n.steps,s=n.strokeWidth,i=n.trailWidth,u=n.gapDegree,d=u===void 0?0:u,p=n.gapPosition,g=n.trailColor,b=n.strokeLinecap,y=n.style,c=n.className,m=n.strokeColor,f=n.percent,v=Pt(n,zr),w=Pe/2,x=jr(a),$="".concat(x,"-gradient"),h=w-s/2,B=Math.PI*2*h,A=d>0?90+d/2:-90,L=B*((360-d)/360),W=Ae(r)==="object"?r:{count:r,gap:2},S=W.count,te=W.gap,ae=xt(f),K=xt(m),J=K.find(function(O){return O&&Ae(O)==="object"}),G=J&&Ae(J)==="object",q=G?"butt":b,H=Je(B,L,0,100,A,d,p,g,q,s),Z=Nr(),T=function(){var X=0;return ae.map(function(E,P){var z=K[P]||K[K.length-1],re=Je(B,L,X,E,A,d,p,z,q,s);return X+=E,l.createElement(Rr,{key:P,color:z,ptg:E,radius:h,prefixCls:o,gradientId:$,style:re,strokeLinecap:q,strokeWidth:s,gapDegree:d,ref:function(D){Z[P]=D},size:Pe})}).reverse()},F=function(){var X=Math.round(S*(ae[0]/100)),E=100/S,P=0;return new Array(S).fill(null).map(function(z,re){var ue=re<=X-1?K[0]:g,D=ue&&Ae(ue)==="object"?"url(#".concat($,")"):void 0,C=Je(B,L,P,E,A,d,p,ue,"butt",s,te);return P+=(L-C.strokeDashoffset+te)*100/L,l.createElement("circle",{key:re,className:"".concat(o,"-circle-path"),r:h,cx:w,cy:w,stroke:D,strokeWidth:s,opacity:1,style:C,ref:function(N){Z[re]=N}})})};return l.createElement("svg",he({className:ee("".concat(o,"-circle"),c),viewBox:"0 0 ".concat(Pe," ").concat(Pe),style:y,id:a,role:"presentation"},v),!S&&l.createElement("circle",{className:"".concat(o,"-circle-trail"),r:h,cx:w,cy:w,stroke:g,strokeLinecap:q,strokeWidth:i||s,style:H}),S?F():T())};function Fe(e){return!e||e<0?0:e>100?100:e}function Re({success:e,successPercent:t}){let n=t;return e&&"progress"in e&&(n=e.progress),e&&"percent"in e&&(n=e.percent),n}const Ur=({percent:e,success:t,successPercent:n})=>{const a=Fe(Re({success:t,successPercent:n}));return[a,Fe(Fe(e)-a)]},Hr=({success:e={},strokeColor:t})=>{const{strokeColor:n}=e;return[n||rt.green,t||null]},He=(e,t,n)=>{var a,o,r,s;let i=-1,u=-1;if(t==="step"){const d=n.steps,p=n.strokeWidth;typeof e=="string"||typeof e>"u"?(i=e==="small"?2:14,u=p??8):typeof e=="number"?[i,u]=[e,e]:[i=14,u=8]=Array.isArray(e)?e:[e.width,e.height],i*=d}else if(t==="line"){const d=n==null?void 0:n.strokeWidth;typeof e=="string"||typeof e>"u"?u=d||(e==="small"?6:8):typeof e=="number"?[i,u]=[e,e]:[i=-1,u=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[i,u]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[i,u]=[e,e]:Array.isArray(e)&&(i=(o=(a=e[0])!==null&&a!==void 0?a:e[1])!==null&&o!==void 0?o:120,u=(s=(r=e[0])!==null&&r!==void 0?r:e[1])!==null&&s!==void 0?s:120));return[i,u]},qr=3,Xr=e=>qr/e*100,Vr=e=>{const{prefixCls:t,trailColor:n=null,strokeLinecap:a="round",gapPosition:o,gapDegree:r,width:s=120,type:i,children:u,success:d,size:p=s,steps:g}=e,[b,y]=He(p,"circle");let{strokeWidth:c}=e;c===void 0&&(c=Math.max(Xr(b),6));const m={width:b,height:y,fontSize:b*.15+6},f=l.useMemo(()=>{if(r||r===0)return r;if(i==="dashboard")return 75},[r,i]),v=Ur(e),w=o||i==="dashboard"&&"bottom"||void 0,x=Object.prototype.toString.call(e.strokeColor)==="[object Object]",$=Hr({success:d,strokeColor:e.strokeColor}),h=ee(`${t}-inner`,{[`${t}-circle-gradient`]:x}),B=l.createElement(Wr,{steps:g,percent:g?v[1]:v,strokeWidth:c,trailWidth:c,strokeColor:g?$[1]:$,strokeLinecap:a,trailColor:n,prefixCls:t,gapDegree:f,gapPosition:w}),A=b<=20,L=l.createElement("div",{className:h,style:m},B,!A&&u);return A?l.createElement(kt,{title:u},L):L},ze="--progress-line-stroke-color",Xt="--progress-percent",St=e=>{const t=e?"100%":"-100%";return new nt(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Gr=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:Object.assign(Object.assign({},Tt(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${ze})`]},height:"100%",width:`calc(1 / var(${Xt}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${de(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:St(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:St(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Kr=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Jr=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},Yr=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${n}`]:{fontSize:e.fontSizeSM}}}},Zr=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),Qr=Lt("Progress",e=>{const t=e.calc(e.marginXXS).div(2).equal(),n=Ot(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Gr(n),Kr(n),Jr(n),Yr(n)]},Zr);var en=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const tn=e=>{let t=[];return Object.keys(e).forEach(n=>{const a=Number.parseFloat(n.replace(/%/g,""));Number.isNaN(a)||t.push({key:a,value:e[n]})}),t=t.sort((n,a)=>n.key-a.key),t.map(({key:n,value:a})=>`${a} ${n}%`).join(", ")},rn=(e,t)=>{const{from:n=rt.blue,to:a=rt.blue,direction:o=t==="rtl"?"to left":"to right"}=e,r=en(e,["from","to","direction"]);if(Object.keys(r).length!==0){const i=tn(r),u=`linear-gradient(${o}, ${i})`;return{background:u,[ze]:u}}const s=`linear-gradient(${o}, ${n}, ${a})`;return{background:s,[ze]:s}},nn=e=>{const{prefixCls:t,direction:n,percent:a,size:o,strokeWidth:r,strokeColor:s,strokeLinecap:i="round",children:u,trailColor:d=null,percentPosition:p,success:g}=e,{align:b,type:y}=p,c=s&&typeof s!="string"?rn(s,n):{[ze]:s,background:s},m=i==="square"||i==="butt"?0:void 0,f=o??[-1,r||(o==="small"?6:8)],[v,w]=He(f,"line",{strokeWidth:r}),x={backgroundColor:d||void 0,borderRadius:m},$=Object.assign(Object.assign({width:`${Fe(a)}%`,height:w,borderRadius:m},c),{[Xt]:Fe(a)/100}),h=Re(e),B={width:`${Fe(h)}%`,height:w,borderRadius:m,backgroundColor:g==null?void 0:g.strokeColor},A={width:v<0?"100%":v},L=l.createElement("div",{className:`${t}-inner`,style:x},l.createElement("div",{className:ee(`${t}-bg`,`${t}-bg-${y}`),style:$},y==="inner"&&u),h!==void 0&&l.createElement("div",{className:`${t}-success-bg`,style:B})),W=y==="outer"&&b==="start",S=y==="outer"&&b==="end";return y==="outer"&&b==="center"?l.createElement("div",{className:`${t}-layout-bottom`},L,u):l.createElement("div",{className:`${t}-outer`,style:A},W&&u,L,S&&u)},an=e=>{const{size:t,steps:n,rounding:a=Math.round,percent:o=0,strokeWidth:r=8,strokeColor:s,trailColor:i=null,prefixCls:u,children:d}=e,p=a(n*(o/100)),b=t??[t==="small"?2:14,r],[y,c]=He(b,"step",{steps:n,strokeWidth:r}),m=y/n,f=Array.from({length:n});for(let v=0;v<n;v++){const w=Array.isArray(s)?s[v]:s;f[v]=l.createElement("div",{key:v,className:ee(`${u}-steps-item`,{[`${u}-steps-item-active`]:v<=p-1}),style:{backgroundColor:v<=p-1?w:i,width:m,height:c}})}return l.createElement("div",{className:`${u}-steps-outer`},f,d)};var on=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const sn=["normal","exception","active","success"],ln=l.forwardRef((e,t)=>{const{prefixCls:n,className:a,rootClassName:o,steps:r,strokeColor:s,percent:i=0,size:u="default",showInfo:d=!0,type:p="line",status:g,format:b,style:y,percentPosition:c={}}=e,m=on(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:f="end",type:v="outer"}=c,w=Array.isArray(s)?s[0]:s,x=typeof s=="string"||Array.isArray(s)?s:void 0,$=l.useMemo(()=>{if(w){const T=typeof w=="string"?w:Object.values(w)[0];return new cr(T).isLight()}return!1},[s]),h=l.useMemo(()=>{var T,F;const O=Re(e);return Number.parseInt(O!==void 0?(T=O??0)===null||T===void 0?void 0:T.toString():(F=i??0)===null||F===void 0?void 0:F.toString(),10)},[i,e.success,e.successPercent]),B=l.useMemo(()=>!sn.includes(g)&&h>=100?"success":g||"normal",[g,h]),{getPrefixCls:A,direction:L,progress:W}=l.useContext(Ue),S=A("progress",n),[te,ae,K]=Qr(S),J=p==="line",G=J&&!r,q=l.useMemo(()=>{if(!d)return null;const T=Re(e);let F;const O=b||(E=>`${E}%`),X=J&&$&&v==="inner";return v==="inner"||b||B!=="exception"&&B!=="success"?F=O(Fe(i),Fe(T)):B==="exception"?F=J?l.createElement(ur,null):l.createElement(dr,null):B==="success"&&(F=J?l.createElement(pr,null):l.createElement(mr,null)),l.createElement("span",{className:ee(`${S}-text`,{[`${S}-text-bright`]:X,[`${S}-text-${f}`]:G,[`${S}-text-${v}`]:G}),title:typeof F=="string"?F:void 0},F)},[d,i,h,B,p,S,b]);let H;p==="line"?H=r?l.createElement(an,Object.assign({},e,{strokeColor:x,prefixCls:S,steps:typeof r=="object"?r.count:r}),q):l.createElement(nn,Object.assign({},e,{strokeColor:w,prefixCls:S,direction:L,percentPosition:{align:f,type:v}}),q):(p==="circle"||p==="dashboard")&&(H=l.createElement(Vr,Object.assign({},e,{strokeColor:w,prefixCls:S,progressStatus:B}),q));const Z=ee(S,`${S}-status-${B}`,{[`${S}-${p==="dashboard"&&"circle"||p}`]:p!=="line",[`${S}-inline-circle`]:p==="circle"&&He(u,"circle")[0]<=20,[`${S}-line`]:G,[`${S}-line-align-${f}`]:G,[`${S}-line-position-${v}`]:G,[`${S}-steps`]:r,[`${S}-show-info`]:d,[`${S}-${u}`]:typeof u=="string",[`${S}-rtl`]:L==="rtl"},W==null?void 0:W.className,a,o,ae,K);return te(l.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},W==null?void 0:W.style),y),className:Z,role:"progressbar","aria-valuenow":h,"aria-valuemin":0,"aria-valuemax":100},Nt(m,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),H))});var cn={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"},un=function(t,n){return l.createElement(Oe,he({},t,{ref:n,icon:cn}))},dn=l.forwardRef(un);const Ye=(function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),a=e.name||"",o=e.type||"",r=o.replace(/\/.*$/,"");return n.some(function(s){var i=s.trim();if(/^\*(\/\*)?$/.test(s))return!0;if(i.charAt(0)==="."){var u=a.toLowerCase(),d=i.toLowerCase(),p=[d];return(d===".jpg"||d===".jpeg")&&(p=[".jpg",".jpeg"]),p.some(function(g){return u.endsWith(g)})}return/\/\*$/.test(i)?r===i.replace(/\/.*$/,""):o===i?!0:/^\w+$/.test(i)?(fr(!1,"Upload takes an invalidate 'accept' type '".concat(i,"'.Skip for check.")),!0):!1})}return!0});function pn(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),a=new Error(n);return a.status=t.status,a.method=e.method,a.url=e.action,a}function Dt(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function At(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(r){r.total>0&&(r.percent=r.loaded/r.total*100),e.onProgress(r)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(o){var r=e.data[o];if(Array.isArray(r)){r.forEach(function(s){n.append("".concat(o,"[]"),s)});return}n.append(o,r)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(r){e.onError(r)},t.onload=function(){return t.status<200||t.status>=300?e.onError(pn(e,t),Dt(t)):e.onSuccess(Dt(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var a=e.headers||{};return a["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(a).forEach(function(o){a[o]!==null&&t.setRequestHeader(o,a[o])}),t.send(n),{abort:function(){t.abort()}}}var mn=(function(){var e=Ce(ie().mark(function t(n,a){var o,r,s,i,u,d,p,g;return ie().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:d=function(){return d=Ce(ie().mark(function m(f){return ie().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.abrupt("return",new Promise(function(x){f.file(function($){a($)?(f.fullPath&&!$.webkitRelativePath&&(Object.defineProperties($,{webkitRelativePath:{writable:!0}}),$.webkitRelativePath=f.fullPath.replace(/^\//,""),Object.defineProperties($,{webkitRelativePath:{writable:!1}})),x($)):x(null)})}));case 1:case"end":return w.stop()}},m)})),d.apply(this,arguments)},u=function(m){return d.apply(this,arguments)},i=function(){return i=Ce(ie().mark(function m(f){var v,w,x,$,h;return ie().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:v=f.createReader(),w=[];case 2:return A.next=5,new Promise(function(L){v.readEntries(L,function(){return L([])})});case 5:if(x=A.sent,$=x.length,$){A.next=9;break}return A.abrupt("break",12);case 9:for(h=0;h<$;h++)w.push(x[h]);A.next=2;break;case 12:return A.abrupt("return",w);case 13:case"end":return A.stop()}},m)})),i.apply(this,arguments)},s=function(m){return i.apply(this,arguments)},o=[],r=[],n.forEach(function(c){return r.push(c.webkitGetAsEntry())}),p=(function(){var c=Ce(ie().mark(function m(f,v){var w,x;return ie().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(f){h.next=2;break}return h.abrupt("return");case 2:if(f.path=v||"",!f.isFile){h.next=10;break}return h.next=6,u(f);case 6:w=h.sent,w&&o.push(w),h.next=15;break;case 10:if(!f.isDirectory){h.next=15;break}return h.next=13,s(f);case 13:x=h.sent,r.push.apply(r,ge(x));case 15:case"end":return h.stop()}},m)}));return function(f,v){return c.apply(this,arguments)}})(),g=0;case 9:if(!(g<r.length)){y.next=15;break}return y.next=12,p(r[g]);case 12:g++,y.next=9;break;case 15:return y.abrupt("return",o);case 16:case"end":return y.stop()}},t)}));return function(n,a){return e.apply(this,arguments)}})(),fn=+new Date,gn=0;function Ze(){return"rc-upload-".concat(fn,"-").concat(++gn)}var hn=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","folder","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],vn=(function(e){_t(n,e);var t=Mt(n);function n(){var a;jt(this,n);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return a=t.call.apply(t,[this].concat(r)),Y(oe(a),"state",{uid:Ze()}),Y(oe(a),"reqs",{}),Y(oe(a),"fileInput",void 0),Y(oe(a),"_isMounted",void 0),Y(oe(a),"onChange",function(i){var u=a.props,d=u.accept,p=u.directory,g=i.target.files,b=ge(g).filter(function(y){return!p||Ye(y,d)});a.uploadFiles(b),a.reset()}),Y(oe(a),"onClick",function(i){var u=a.fileInput;if(u){var d=i.target,p=a.props.onClick;if(d&&d.tagName==="BUTTON"){var g=u.parentNode;g.focus(),d.blur()}u.click(),p&&p(i)}}),Y(oe(a),"onKeyDown",function(i){i.key==="Enter"&&a.onClick(i)}),Y(oe(a),"onDataTransferFiles",(function(){var i=Ce(ie().mark(function u(d,p){var g,b,y,c,m,f,v;return ie().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(g=a.props,b=g.multiple,y=g.accept,c=g.directory,m=ge(d.items||[]),f=ge(d.files||[]),(f.length>0||m.some(function($){return $.kind==="file"}))&&(p==null||p()),!c){x.next=11;break}return x.next=7,mn(Array.prototype.slice.call(m),function($){return Ye($,a.props.accept)});case 7:f=x.sent,a.uploadFiles(f),x.next=14;break;case 11:v=ge(f).filter(function($){return Ye($,y)}),b===!1&&(v=f.slice(0,1)),a.uploadFiles(v);case 14:case"end":return x.stop()}},u)}));return function(u,d){return i.apply(this,arguments)}})()),Y(oe(a),"onFilePaste",(function(){var i=Ce(ie().mark(function u(d){var p,g;return ie().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(p=a.props.pastable,p){y.next=3;break}return y.abrupt("return");case 3:if(d.type!=="paste"){y.next=6;break}return g=d.clipboardData,y.abrupt("return",a.onDataTransferFiles(g,function(){d.preventDefault()}));case 6:case"end":return y.stop()}},u)}));return function(u){return i.apply(this,arguments)}})()),Y(oe(a),"onFileDragOver",function(i){i.preventDefault()}),Y(oe(a),"onFileDrop",(function(){var i=Ce(ie().mark(function u(d){var p;return ie().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(d.preventDefault(),d.type!=="drop"){b.next=4;break}return p=d.dataTransfer,b.abrupt("return",a.onDataTransferFiles(p));case 4:case"end":return b.stop()}},u)}));return function(u){return i.apply(this,arguments)}})()),Y(oe(a),"uploadFiles",function(i){var u=ge(i),d=u.map(function(p){return p.uid=Ze(),a.processFile(p,u)});Promise.all(d).then(function(p){var g=a.props.onBatchStart;g==null||g(p.map(function(b){var y=b.origin,c=b.parsedFile;return{file:y,parsedFile:c}})),p.filter(function(b){return b.parsedFile!==null}).forEach(function(b){a.post(b)})})}),Y(oe(a),"processFile",(function(){var i=Ce(ie().mark(function u(d,p){var g,b,y,c,m,f,v,w,x;return ie().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(g=a.props.beforeUpload,b=d,!g){h.next=14;break}return h.prev=3,h.next=6,g(d,p);case 6:b=h.sent,h.next=12;break;case 9:h.prev=9,h.t0=h.catch(3),b=!1;case 12:if(b!==!1){h.next=14;break}return h.abrupt("return",{origin:d,parsedFile:null,action:null,data:null});case 14:if(y=a.props.action,typeof y!="function"){h.next=21;break}return h.next=18,y(d);case 18:c=h.sent,h.next=22;break;case 21:c=y;case 22:if(m=a.props.data,typeof m!="function"){h.next=29;break}return h.next=26,m(d);case 26:f=h.sent,h.next=30;break;case 29:f=m;case 30:return v=(Ae(b)==="object"||typeof b=="string")&&b?b:d,v instanceof File?w=v:w=new File([v],d.name,{type:d.type}),x=w,x.uid=d.uid,h.abrupt("return",{origin:d,data:f,parsedFile:x,action:c});case 35:case"end":return h.stop()}},u,null,[[3,9]])}));return function(u,d){return i.apply(this,arguments)}})()),Y(oe(a),"saveFileInput",function(i){a.fileInput=i}),a}return Rt(n,[{key:"componentDidMount",value:function(){this._isMounted=!0;var o=this.props.pastable;o&&document.addEventListener("paste",this.onFilePaste)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort(),document.removeEventListener("paste",this.onFilePaste)}},{key:"componentDidUpdate",value:function(o){var r=this.props.pastable;r&&!o.pastable?document.addEventListener("paste",this.onFilePaste):!r&&o.pastable&&document.removeEventListener("paste",this.onFilePaste)}},{key:"post",value:function(o){var r=this,s=o.data,i=o.origin,u=o.action,d=o.parsedFile;if(this._isMounted){var p=this.props,g=p.onStart,b=p.customRequest,y=p.name,c=p.headers,m=p.withCredentials,f=p.method,v=i.uid,w=b||At,x={action:u,filename:y,data:s,file:d,headers:c,withCredentials:m,method:f||"post",onProgress:function(h){var B=r.props.onProgress;B==null||B(h,d)},onSuccess:function(h,B){var A=r.props.onSuccess;A==null||A(h,d,B),delete r.reqs[v]},onError:function(h,B){var A=r.props.onError;A==null||A(h,B,d),delete r.reqs[v]}};g(i),this.reqs[v]=w(x,{defaultRequest:At})}}},{key:"reset",value:function(){this.setState({uid:Ze()})}},{key:"abort",value:function(o){var r=this.reqs;if(o){var s=o.uid?o.uid:o;r[s]&&r[s].abort&&r[s].abort(),delete r[s]}else Object.keys(r).forEach(function(i){r[i]&&r[i].abort&&r[i].abort(),delete r[i]})}},{key:"render",value:function(){var o=this.props,r=o.component,s=o.prefixCls,i=o.className,u=o.classNames,d=u===void 0?{}:u,p=o.disabled,g=o.id,b=o.name,y=o.style,c=o.styles,m=c===void 0?{}:c,f=o.multiple,v=o.accept,w=o.capture,x=o.children,$=o.directory,h=o.folder,B=o.openFileDialogOnClick,A=o.onMouseEnter,L=o.onMouseLeave,W=o.hasControlInside,S=Pt(o,hn),te=ee(Y(Y(Y({},s,!0),"".concat(s,"-disabled"),p),i,i)),ae=$||h?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},K=p?{}:{onClick:B?this.onClick:function(){},onKeyDown:B?this.onKeyDown:function(){},onMouseEnter:A,onMouseLeave:L,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:W?void 0:"0"};return Ee.createElement(r,he({},K,{className:te,role:W?void 0:"button",style:y}),Ee.createElement("input",he({},gr(S,{aria:!0,data:!0}),{id:g,name:b,disabled:p,type:"file",ref:this.saveFileInput,onClick:function(G){return G.stopPropagation()},key:this.state.uid,style:tt({display:"none"},m.input),className:d.input,accept:v},ae,{multiple:f,onChange:this.onChange},w!=null?{capture:w}:{})),x)}}]),n})(Bt);function Qe(){}var at=(function(e){_t(n,e);var t=Mt(n);function n(){var a;jt(this,n);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return a=t.call.apply(t,[this].concat(r)),Y(oe(a),"uploader",void 0),Y(oe(a),"saveUploader",function(i){a.uploader=i}),a}return Rt(n,[{key:"abort",value:function(o){this.uploader.abort(o)}},{key:"render",value:function(){return Ee.createElement(vn,he({},this.props,{ref:this.saveUploader}))}}]),n})(Bt);Y(at,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Qe,onError:Qe,onSuccess:Qe,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});const bn=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${de(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${de(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
12
12
  &:not(${t}-disabled):hover,
13
13
  &-hover:not(${t}-disabled)
14
14
  `]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${de(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${n},
15
15
  p${t}-text,
16
16
  p${t}-hint
17
- `]:{color:e.colorTextDisabled}}}}}},bn=e=>{const{componentCls:t,iconCls:n,fontSize:a,lineHeight:o,calc:r}=e,s=`${t}-list-item`,i=`${s}-actions`,u=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:Object.assign(Object.assign({},Rt()),{lineHeight:e.lineHeight,[s]:{position:"relative",height:r(e.lineHeight).mul(a).equal(),marginTop:e.marginXS,fontSize:a,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:Object.assign(Object.assign({},zt),{padding:`0 ${de(e.paddingXS)}`,lineHeight:o,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[i]:{whiteSpace:"nowrap",[u]:{opacity:0},[n]:{color:e.actionsColor,transition:`all ${e.motionDurationSlow}`},[`
17
+ `]:{color:e.colorTextDisabled}}}}}},yn=e=>{const{componentCls:t,iconCls:n,fontSize:a,lineHeight:o,calc:r}=e,s=`${t}-list-item`,i=`${s}-actions`,u=`${s}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:Object.assign(Object.assign({},zt()),{lineHeight:e.lineHeight,[s]:{position:"relative",height:r(e.lineHeight).mul(a).equal(),marginTop:e.marginXS,fontSize:a,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${s}-name`]:Object.assign(Object.assign({},Wt),{padding:`0 ${de(e.paddingXS)}`,lineHeight:o,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[i]:{whiteSpace:"nowrap",[u]:{opacity:0},[n]:{color:e.actionsColor,transition:`all ${e.motionDurationSlow}`},[`
18
18
  ${u}:focus-visible,
19
19
  &.picture ${u}
20
- `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:a},[`${s}-progress`]:{position:"absolute",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:r(a).add(e.paddingXS).equal(),fontSize:a,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${s}:hover ${u}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[i]:{[`${n}, ${n}:hover`]:{color:e.colorError},[u]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},yn=e=>{const{componentCls:t}=e,n=new nt("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),a=new nt("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),o=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${o}-appear, ${o}-enter, ${o}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${o}-appear, ${o}-enter`]:{animationName:n},[`${o}-leave`]:{animationName:a}}},{[`${t}-wrapper`]:gr(e)},n,a]},Cn=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:a,uploadProgressOffset:o,calc:r}=e,s=`${t}-list`,i=`${s}-item`;return{[`${t}-wrapper`]:{[`
20
+ `]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:a},[`${s}-progress`]:{position:"absolute",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:r(a).add(e.paddingXS).equal(),fontSize:a,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${s}:hover ${u}`]:{opacity:1},[`${s}-error`]:{color:e.colorError,[`${s}-name, ${t}-icon ${n}`]:{color:e.colorError},[i]:{[`${n}, ${n}:hover`]:{color:e.colorError},[u]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Cn=e=>{const{componentCls:t}=e,n=new nt("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),a=new nt("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),o=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${o}-appear, ${o}-enter, ${o}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${o}-appear, ${o}-enter`]:{animationName:n},[`${o}-leave`]:{animationName:a}}},{[`${t}-wrapper`]:hr(e)},n,a]},Fn=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:a,uploadProgressOffset:o,calc:r}=e,s=`${t}-list`,i=`${s}-item`;return{[`${t}-wrapper`]:{[`
21
21
  ${s}${s}-picture,
22
22
  ${s}${s}-picture-card,
23
23
  ${s}${s}-picture-circle
24
- `]:{[i]:{position:"relative",height:r(a).add(r(e.lineWidth).mul(2)).add(r(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${de(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${i}-thumbnail`]:Object.assign(Object.assign({},zt),{width:a,height:a,lineHeight:de(r(a).add(e.paddingSM).equal()),textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${i}-progress`]:{bottom:o,width:`calc(100% - ${de(r(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:r(a).add(e.paddingXS).equal()}},[`${i}-error`]:{borderColor:e.colorError,[`${i}-thumbnail ${n}`]:{[`svg path[fill='${gt[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${gt.primary}']`]:{fill:e.colorError}}},[`${i}-uploading`]:{borderStyle:"dashed",[`${i}-name`]:{marginBottom:o}}},[`${s}${s}-picture-circle ${i}`]:{[`&, &::before, ${i}-thumbnail`]:{borderRadius:"50%"}}}}},Fn=e=>{const{componentCls:t,iconCls:n,fontSizeLG:a,colorTextLightSolid:o,calc:r}=e,s=`${t}-list`,i=`${s}-item`,u=e.uploadPicCardSize;return{[`
24
+ `]:{[i]:{position:"relative",height:r(a).add(r(e.lineWidth).mul(2)).add(r(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${de(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${i}-thumbnail`]:Object.assign(Object.assign({},Wt),{width:a,height:a,lineHeight:de(r(a).add(e.paddingSM).equal()),textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${i}-progress`]:{bottom:o,width:`calc(100% - ${de(r(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:r(a).add(e.paddingXS).equal()}},[`${i}-error`]:{borderColor:e.colorError,[`${i}-thumbnail ${n}`]:{[`svg path[fill='${gt[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${gt.primary}']`]:{fill:e.colorError}}},[`${i}-uploading`]:{borderStyle:"dashed",[`${i}-name`]:{marginBottom:o}}},[`${s}${s}-picture-circle ${i}`]:{[`&, &::before, ${i}-thumbnail`]:{borderRadius:"50%"}}}}},wn=e=>{const{componentCls:t,iconCls:n,fontSizeLG:a,colorTextLightSolid:o,calc:r}=e,s=`${t}-list`,i=`${s}-item`,u=e.uploadPicCardSize;return{[`
25
25
  ${t}-wrapper${t}-picture-card-wrapper,
26
26
  ${t}-wrapper${t}-picture-circle-wrapper
27
- `]:Object.assign(Object.assign({},Rt()),{display:"block",[`${t}${t}-select`]:{width:u,height:u,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${de(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${s}${s}-picture-card, ${s}${s}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${s}-item-container`]:{display:"inline-block",width:u,height:u,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[i]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${de(r(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${de(r(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${i}:hover`]:{[`&::before, ${i}-actions`]:{opacity:1}},[`${i}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`
27
+ `]:Object.assign(Object.assign({},zt()),{display:"block",[`${t}${t}-select`]:{width:u,height:u,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${de(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${s}${s}-picture-card, ${s}${s}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${s}-item-container`]:{display:"inline-block",width:u,height:u,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[i]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${de(r(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${de(r(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${i}:hover`]:{[`&::before, ${i}-actions`]:{opacity:1}},[`${i}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`
28
28
  ${n}-eye,
29
29
  ${n}-download,
30
30
  ${n}-delete
31
- `]:{zIndex:10,width:a,margin:`0 ${de(e.marginXXS)}`,fontSize:a,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,color:o,"&:hover":{color:o},svg:{verticalAlign:"baseline"}}},[`${i}-thumbnail, ${i}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${i}-name`]:{display:"none",textAlign:"center"},[`${i}-file + ${i}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${de(r(e.paddingXS).mul(2).equal())})`},[`${i}-uploading`]:{[`&${i}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${i}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${de(r(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}},wn=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},$n=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},Ot(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-hidden`]:{display:"none"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},En=e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55}),xn=kt("Upload",e=>{const{fontSizeHeading3:t,fontHeight:n,lineWidth:a,pictureCardSize:o,calc:r}=e,s=Lt(e,{uploadThumbnailSize:r(t).mul(2).equal(),uploadProgressOffset:r(r(n).div(2)).add(a).equal(),uploadPicCardSize:o});return[$n(s),vn(s),Cn(s),Fn(s),bn(s),yn(s),wn(s),hr(s)]},En);var Sn={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:n}},{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.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},Dn=function(t,n){return l.createElement(Le,he({},t,{ref:n,icon:Sn}))},An=l.forwardRef(Dn),Bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},In=function(t,n){return l.createElement(Le,he({},t,{ref:n,icon:Bn}))},Pn=l.forwardRef(In),kn={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:n}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:n}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:n}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},Ln=function(t,n){return l.createElement(Le,he({},t,{ref:n,icon:kn}))},On=l.forwardRef(Ln);function Ne(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function Te(e,t){const n=fe(t),a=n.findIndex(({uid:o})=>o===e.uid);return a===-1?n.push(e):n[a]=e,n}function et(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(a=>a[n]===e[n])[0]}function Nn(e,t){const n=e.uid!==void 0?"uid":"name",a=t.filter(o=>o[n]!==e[n]);return a.length===t.length?null:a}const Tn=(e="")=>{const t=e.split("/"),a=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(a)||[""])[0]},Xt=e=>e.indexOf("image/")===0,_n=e=>{if(e.type&&!e.thumbUrl)return Xt(e.type);const t=e.thumbUrl||e.url||"",n=Tn(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},ve=200;function Mn(e){return new Promise(t=>{if(!e.type||!Xt(e.type)){t("");return}const n=document.createElement("canvas");n.width=ve,n.height=ve,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${ve}px; height: ${ve}px; z-index: 9999; display: none;`,document.body.appendChild(n);const a=n.getContext("2d"),o=new Image;if(o.onload=()=>{const{width:r,height:s}=o;let i=ve,u=ve,d=0,p=0;r>s?(u=s*(ve/r),p=-(u-i)/2):(i=r*(ve/s),d=-(i-u)/2),a.drawImage(o,d,p,i,u);const g=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(o.src),t(g)},o.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const r=new FileReader;r.onload=()=>{r.result&&typeof r.result=="string"&&(o.src=r.result)},r.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const r=new FileReader;r.onload=()=>{r.result&&t(r.result)},r.readAsDataURL(e)}else o.src=window.URL.createObjectURL(e)})}var jn={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"},Rn=function(t,n){return l.createElement(Le,he({},t,{ref:n,icon:jn}))},zn=l.forwardRef(Rn);const Wn=l.forwardRef(({prefixCls:e,className:t,style:n,locale:a,listType:o,file:r,items:s,progress:i,iconRender:u,actionIconRender:d,itemRender:p,isImgUrl:g,showPreviewIcon:b,showRemoveIcon:y,showDownloadIcon:c,previewIcon:m,removeIcon:f,downloadIcon:v,extra:F,onPreview:x,onDownload:w,onClose:h},I)=>{var A,O;const{status:z}=r,[S,re]=l.useState(z);l.useEffect(()=>{z!=="removed"&&re(z)},[z]);const[oe,J]=l.useState(!1);l.useEffect(()=>{const W=setTimeout(()=>{J(!0)},300);return()=>{clearTimeout(W)}},[]);const Y=u(r);let K=l.createElement("div",{className:`${e}-icon`},Y);if(o==="picture"||o==="picture-card"||o==="picture-circle")if(S==="uploading"||!r.thumbUrl&&!r.url){const W=te(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:S!=="uploading"});K=l.createElement("div",{className:W},Y)}else{const W=g!=null&&g(r)?l.createElement("img",{src:r.thumbUrl||r.url,alt:r.name,className:`${e}-list-item-image`,crossOrigin:r.crossOrigin}):Y,ge=te(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:g&&!g(r)});K=l.createElement("a",{className:ge,onClick:Oe=>x(r,Oe),href:r.url||r.thumbUrl,target:"_blank",rel:"noopener noreferrer"},W)}const V=te(`${e}-list-item`,`${e}-list-item-${S}`),H=typeof r.linkProps=="string"?JSON.parse(r.linkProps):r.linkProps,Q=(typeof y=="function"?y(r):y)?d((typeof f=="function"?f(r):f)||l.createElement(un,null),()=>h(r),e,a.removeFile,!0):null,B=(typeof c=="function"?c(r):c)&&S==="done"?d((typeof v=="function"?v(r):v)||l.createElement(zn,null),()=>w(r),e,a.downloadFile):null,$=o!=="picture-card"&&o!=="picture-circle"&&l.createElement("span",{key:"download-delete",className:te(`${e}-list-item-actions`,{picture:o==="picture"})},B,Q),T=typeof F=="function"?F(r):F,q=T&&l.createElement("span",{className:`${e}-list-item-extra`},T),E=te(`${e}-list-item-name`),k=r.url?l.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:E,title:r.name},H,{href:r.url,onClick:W=>x(r,W)}),r.name,q):l.createElement("span",{key:"view",className:E,onClick:W=>x(r,W),title:r.name},r.name,q),j=(typeof b=="function"?b(r):b)&&(r.url||r.thumbUrl)?l.createElement("a",{href:r.url||r.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:W=>x(r,W),title:a.previewFile},typeof m=="function"?m(r):m||l.createElement(vr,null)):null,ne=(o==="picture-card"||o==="picture-circle")&&S!=="uploading"&&l.createElement("span",{className:`${e}-list-item-actions`},j,S==="done"&&B,Q),{getPrefixCls:D}=l.useContext(Ue),C=D(),M=l.createElement("div",{className:V},K,k,$,ne,oe&&l.createElement(Wt,{motionName:`${C}-fade`,visible:S==="uploading",motionDeadline:2e3},({className:W})=>{const ge="percent"in r?l.createElement(sn,Object.assign({type:"line",percent:r.percent,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"]},i)):null;return l.createElement("div",{className:te(`${e}-list-item-progress`,W)},ge)})),_=r.response&&typeof r.response=="string"?r.response:((A=r.error)===null||A===void 0?void 0:A.statusText)||((O=r.error)===null||O===void 0?void 0:O.message)||a.uploadError,X=S==="error"?l.createElement(Pt,{title:_,getPopupContainer:W=>W.parentNode},M):M;return l.createElement("div",{className:te(`${e}-list-item-container`,t),style:n,ref:I},p?p(X,r,s,{download:w.bind(null,r),preview:x.bind(null,r),remove:h.bind(null,r)}):X)}),Un=(e,t)=>{const{listType:n="text",previewFile:a=Mn,onPreview:o,onDownload:r,onRemove:s,locale:i,iconRender:u,isImageUrl:d=_n,prefixCls:p,items:g=[],showPreviewIcon:b=!0,showRemoveIcon:y=!0,showDownloadIcon:c=!1,removeIcon:m,previewIcon:f,downloadIcon:v,extra:F,progress:x={size:[-1,2],showInfo:!1},appendAction:w,appendActionVisible:h=!0,itemRender:I,disabled:A}=e,[,O]=br(),[z,S]=l.useState(!1),re=["picture-card","picture-circle"].includes(n);l.useEffect(()=>{n.startsWith("picture")&&(g||[]).forEach(E=>{!(E.originFileObj instanceof File||E.originFileObj instanceof Blob)||E.thumbUrl!==void 0||(E.thumbUrl="",a==null||a(E.originFileObj).then(k=>{E.thumbUrl=k||"",O()}))})},[n,g,a]),l.useEffect(()=>{S(!0)},[]);const oe=(E,k)=>{if(o)return k==null||k.preventDefault(),o(E)},J=E=>{typeof r=="function"?r(E):E.url&&window.open(E.url)},Y=E=>{s==null||s(E)},K=E=>{if(u)return u(E,n);const k=E.status==="uploading";if(n.startsWith("picture")){const j=n==="picture"?l.createElement(bt,null):i.uploading,ne=d!=null&&d(E)?l.createElement(On,null):l.createElement(An,null);return k?j:ne}return k?l.createElement(bt,null):l.createElement(Pn,null)},V=(E,k,j,ne,D)=>{const C={type:"text",size:"small",title:ne,onClick:M=>{var _,X;k(),l.isValidElement(E)&&((X=(_=E.props).onClick)===null||X===void 0||X.call(_,M))},className:`${j}-list-item-action`,disabled:D?A:!1};return l.isValidElement(E)?l.createElement(vt,Object.assign({},C,{icon:ht(E,Object.assign(Object.assign({},E.props),{onClick:()=>{}}))})):l.createElement(vt,Object.assign({},C),l.createElement("span",null,E))};l.useImperativeHandle(t,()=>({handlePreview:oe,handleDownload:J}));const{getPrefixCls:H}=l.useContext(Ue),Q=H("upload",p),B=H(),$=te(`${Q}-list`,`${Q}-list-${n}`),T=l.useMemo(()=>Nt(yr(B),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[B]),q=Object.assign(Object.assign({},re?{}:T),{motionDeadline:2e3,motionName:`${Q}-${re?"animate-inline":"animate"}`,keys:fe(g.map(E=>({key:E.uid,file:E}))),motionAppear:z});return l.createElement("div",{className:$},l.createElement(Cr,Object.assign({},q,{component:!1}),({key:E,file:k,className:j,style:ne})=>l.createElement(Wn,{key:E,locale:i,prefixCls:Q,className:j,style:ne,file:k,items:g,progress:x,listType:n,isImgUrl:d,showPreviewIcon:b,showRemoveIcon:y,showDownloadIcon:c,removeIcon:m,previewIcon:f,downloadIcon:v,extra:F,iconRender:K,actionIconRender:V,itemRender:I,onPreview:oe,onDownload:J,onClose:Y})),w&&l.createElement(Wt,Object.assign({},q,{visible:h,forceRender:!0}),({className:E,style:k})=>ht(w,j=>({className:te(j.className,E),style:Object.assign(Object.assign(Object.assign({},k),{pointerEvents:E?"none":void 0}),j.style)}))))},Hn=l.forwardRef(Un);var qn=function(e,t,n,a){function o(r){return r instanceof n?r:new n(function(s){s(r)})}return new(n||(n=Promise))(function(r,s){function i(p){try{d(a.next(p))}catch(g){s(g)}}function u(p){try{d(a.throw(p))}catch(g){s(g)}}function d(p){p.done?r(p.value):o(p.value).then(i,u)}d((a=a.apply(e,[])).next())})};const Pe=`__LIST_IGNORE_${Date.now()}__`,Xn=(e,t)=>{const n=Fr("upload"),{fileList:a,defaultFileList:o,onRemove:r,showUploadList:s=!0,listType:i="text",onPreview:u,onDownload:d,onChange:p,onDrop:g,previewFile:b,disabled:y,locale:c,iconRender:m,isImageUrl:f,progress:v,prefixCls:F,className:x,type:w="select",children:h,style:I,itemRender:A,maxCount:O,data:z={},multiple:S=!1,hasControlInside:re=!0,action:oe="",accept:J="",supportServerRender:Y=!0,rootClassName:K}=e,V=l.useContext(wr),H=y??V,Q=e.customRequest||n.customRequest,[B,$]=$r(o||[],{value:a,postState:L=>L??[]}),[T,q]=l.useState("drop"),E=l.useRef(null),k=l.useRef(null);l.useMemo(()=>{const L=Date.now();(a||[]).forEach((R,G)=>{!R.uid&&!Object.isFrozen(R)&&(R.uid=`__AUTO__${L}_${G}__`)})},[a]);const j=(L,R,G)=>{let N=fe(R),U=!1;O===1?N=N.slice(-1):O&&(U=N.length>O,N=N.slice(0,O)),yt(()=>{$(N)});const le={file:L,fileList:N};G&&(le.event=G),(!U||L.status==="removed"||N.some(Fe=>Fe.uid===L.uid))&&yt(()=>{p==null||p(le)})},ne=(L,R)=>qn(void 0,void 0,void 0,function*(){const{beforeUpload:G,transformFile:N}=e;let U=L;if(G){const le=yield G(L,R);if(le===!1)return!1;if(delete L[Pe],le===Pe)return Object.defineProperty(L,Pe,{value:!0,configurable:!0}),!1;typeof le=="object"&&le&&(U=le)}return N&&(U=yield N(U)),U}),D=L=>{const R=L.filter(U=>!U.file[Pe]);if(!R.length)return;const G=R.map(U=>Ne(U.file));let N=fe(B);G.forEach(U=>{N=Te(U,N)}),G.forEach((U,le)=>{let Fe=U;if(R[le].parsedFile)U.status="uploading";else{const{originFileObj:xe}=U;let we;try{we=new File([xe],xe.name,{type:xe.type})}catch{we=new Blob([xe],{type:xe.type}),we.name=xe.name,we.lastModifiedDate=new Date,we.lastModified=new Date().getTime()}we.uid=U.uid,Fe=we}j(Fe,N)})},C=(L,R,G)=>{try{typeof L=="string"&&(L=JSON.parse(L))}catch{}if(!et(R,B))return;const N=Ne(R);N.status="done",N.percent=100,N.response=L,N.xhr=G;const U=Te(N,B);j(N,U)},M=(L,R)=>{if(!et(R,B))return;const G=Ne(R);G.status="uploading",G.percent=L.percent;const N=Te(G,B);j(G,N,L)},_=(L,R,G)=>{if(!et(G,B))return;const N=Ne(G);N.error=L,N.response=R,N.status="error";const U=Te(N,B);j(N,U)},X=L=>{let R;Promise.resolve(typeof r=="function"?r(L):r).then(G=>{var N;if(G===!1)return;const U=Nn(L,B);U&&(R=Object.assign(Object.assign({},L),{status:"removed"}),B==null||B.forEach(le=>{const Fe=R.uid!==void 0?"uid":"name";le[Fe]===R[Fe]&&!Object.isFrozen(le)&&(le.status="removed")}),(N=E.current)===null||N===void 0||N.abort(R),j(R,U))})},W=L=>{q(L.type),L.type==="drop"&&(g==null||g(L))};l.useImperativeHandle(t,()=>({onBatchStart:D,onSuccess:C,onProgress:M,onError:_,fileList:B,upload:E.current,nativeElement:k.current}));const{getPrefixCls:ge,direction:Oe,upload:Ee}=l.useContext(Ue),ee=ge("upload",F),Be=Object.assign(Object.assign({onBatchStart:D,onError:_,onProgress:M,onSuccess:C},e),{customRequest:Q,data:z,multiple:S,action:oe,accept:J,supportServerRender:Y,prefixCls:ee,disabled:H,beforeUpload:ne,onChange:void 0,hasControlInside:re});delete Be.className,delete Be.style,(!h||H)&&delete Be.id;const ut=`${ee}-wrapper`,[Xe,dt,Kt]=xn(ee,ut),[Jt]=Er("Upload",xr.Upload),{showRemoveIcon:pt,showPreviewIcon:Yt,showDownloadIcon:Zt,removeIcon:Qt,previewIcon:er,downloadIcon:tr,extra:rr}=typeof s=="boolean"?{}:s,nr=typeof pt>"u"?!H:pt,Ve=(L,R)=>s?l.createElement(Hn,{prefixCls:ee,listType:i,items:B,previewFile:b,onPreview:u,onDownload:d,onRemove:X,showRemoveIcon:nr,showPreviewIcon:Yt,showDownloadIcon:Zt,removeIcon:Qt,previewIcon:er,downloadIcon:tr,iconRender:m,extra:rr,locale:Object.assign(Object.assign({},Jt),c),isImageUrl:f,progress:v,appendAction:L,appendActionVisible:R,itemRender:A,disabled:H}):L,Ge=te(ut,x,K,dt,Kt,Ee==null?void 0:Ee.className,{[`${ee}-rtl`]:Oe==="rtl",[`${ee}-picture-card-wrapper`]:i==="picture-card",[`${ee}-picture-circle-wrapper`]:i==="picture-circle"}),mt=Object.assign(Object.assign({},Ee==null?void 0:Ee.style),I);if(w==="drag"){const L=te(dt,ee,`${ee}-drag`,{[`${ee}-drag-uploading`]:B.some(R=>R.status==="uploading"),[`${ee}-drag-hover`]:T==="dragover",[`${ee}-disabled`]:H,[`${ee}-rtl`]:Oe==="rtl"});return Xe(l.createElement("span",{className:Ge,ref:k},l.createElement("div",{className:L,style:mt,onDrop:W,onDragOver:W,onDragLeave:W},l.createElement(at,Object.assign({},Be,{ref:E,className:`${ee}-btn`}),l.createElement("div",{className:`${ee}-drag-container`},h))),Ve()))}const ar=te(ee,`${ee}-select`,{[`${ee}-disabled`]:H,[`${ee}-hidden`]:!h}),ft=l.createElement("div",{className:ar,style:mt},l.createElement(at,Object.assign({},Be,{ref:E})));return Xe(i==="picture-card"||i==="picture-circle"?l.createElement("span",{className:Ge,ref:k},Ve(ft,!!h)):l.createElement("span",{className:Ge,ref:k},ft,Ve()))},Vt=l.forwardRef(Xn);var Vn=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const Gn=l.forwardRef((e,t)=>{const{style:n,height:a,hasControlInside:o=!1,children:r}=e,s=Vn(e,["style","height","hasControlInside","children"]),i=Object.assign(Object.assign({},n),{height:a});return l.createElement(Vt,Object.assign({ref:t,hasControlInside:o},s,{style:i,type:"drag"}),r)}),ct=Vt;ct.Dragger=Gn;ct.LIST_IGNORE=Pe;const Kn=["10014"],Jn=({url:e,token:t,role:n,getMessage:a})=>{const o=(c,m)=>a?a(c):m,r=Sr.create({baseURL:e,timeout:1e6});return r.interceptors.request.use(c=>{let m=t;if(!m&&!["user/login","user/kaptcha","user/regist"].some(v=>c.url.includes(v))){window.location.pathname="/login";return}return c.headers.Authorization=m||"",c.headers.userName=n==="\u672A\u767B\u5F55\u7528\u6237"?"":n,c}),r.interceptors.response.use(c=>{const m=["user/kaptcha"],f=c.data;if(m.some(w=>c.config.url&&c.config.url.includes(w))||f.size&&f.type)return f;const{success:v,errorMsg:F,errorCode:x}=f;return Kn.includes(x)||v?f:(ae.error(F||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")),!1)},c=>{var m,f,v,F,x,w,h,I,A,O;c.message!=="canceled"&&((((f=(m=c==null?void 0:c.response)==null?void 0:m.data)==null?void 0:f.errorCode)==="30013"||((F=(v=c==null?void 0:c.response)==null?void 0:v.data)==null?void 0:F.errorCode)==="30023")&&ae.error((((x=c==null?void 0:c.response)==null?void 0:x.data)||{}).errorMsg||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")),((w=c==null?void 0:c.response)==null?void 0:w.status)===401&&(console.log("Error url:",(h=c==null?void 0:c.request)==null?void 0:h.responseURL),ae.error((((I=c==null?void 0:c.response)==null?void 0:I.data)||{}).errorMsg||o("server.noPermission","\u6CA1\u6709\u8DB3\u591F\u6743\u9650"))),console.log("Error occurs",c),(((A=c==null?void 0:c.response)==null?void 0:A.data)||{}).errorMsg!="\u672A\u8BBE\u7F6E\u9ED8\u8BA4\u914D\u7F6E\uFF01"&&ae.error((((O=c==null?void 0:c.response)==null?void 0:O.data)||{}).errorMsg||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")))}),{getLibraryList:async c=>{try{const m=await r.get(`/sensitive/library?${new URLSearchParams(c).toString()}`),{success:f,data:v}=m;return f?v:!1}catch(m){return console.log("e",m),!1}},createLibrary:async c=>{try{const m=await r.post("/sensitive/library",c),{success:f,data:v}=m;return f?v:!1}catch(m){return console.log("e",m),!1}},deleteLibrary:async c=>{try{const m=await r.delete(`/sensitive/library/${c}`),{success:f,data:v}=m;return f?v:!1}catch(m){return console.log("e",m),!1}},updateLibrary:async(c,m)=>{try{const f=await r.put(`/sensitive/library/${c}`,m),{success:v,data:F}=f;return v?F:!1}catch(f){return console.log("e",f),!1}},downloadTemplate:async c=>{try{const m=await r.get("/sensitive/word/downloadTemplate",{params:{fileType:c},responseType:"blob"});return m&&typeof m.size=="number"?m:!1}catch(m){return console.log("e",m),!1}},importWords:async(c,m)=>{try{const f=new FormData;f.append("file",m);const v=await r.put(`/sensitive/word/${c}/import`,f);return v&&v.success!==!1?v:!1}catch(f){return console.log("e",f),!1}},getWords:async c=>{try{const m=await r.get(`/sensitive/library/${c}`),{success:f,data:v}=m;return f?v:!1}catch(m){return console.log("e",m),!1}},getLibraryData:async c=>{try{const m=await r.get(`/sensitive/library/${c}`),{success:f,data:v}=m;return f?v:!1}catch(m){return console.log("e",m),!1}}}},We={toolbar:{searchPlaceholder:"\u8BF7\u8F93\u5165\u5185\u5BB9"},tagCell:{viewAllTitle:"\u5171 {{total}} \u4E2A\uFF0C\u5F53\u524D\u4EC5\u5C55\u793A\u524D {{max}} \u4E2A",viewAllLink:"\u2026\u67E5\u770B\u5168\u90E8\uFF08+{{count}}\uFF09"},table:{label:"\u654F\u611F\u8BCD\u914D\u7F6E",viewLabel:"\u654F\u611F\u8BCD\u5E93\u5217\u8868",columns:{name:"\u540D\u79F0",sensitiveWords:"\u654F\u611F\u8BCD",createDate:"\u521B\u5EFA\u65E5\u671F",count:"\u6570\u91CF",actions:"\u64CD\u4F5C"},toolbar:{create:"\u65B0\u5EFA\u654F\u611F\u8BCD\u5E93",searchPlaceholder:"\u8BF7\u8F93\u5165\u5185\u5BB9"},actionEdit:"\u7F16\u8F91",actionDelete:"\u5220\u9664"},dashboard:{title:"\u654F\u611F\u8BCD\u5E93\u7BA1\u7406"},deleteConfirm:{title:"\u786E\u8BA4\u5220\u9664\u654F\u611F\u8BCD\u5E93\uFF1F",content:"\u5220\u9664\u540E\uFF0C\u8BE5\u654F\u611F\u8BCD\u5E93\u5C06\u65E0\u6CD5\u6062\u590D",okText:"\u5220\u9664",cancelText:"\u53D6\u6D88"},createModal:{title:"\u65B0\u5EFA\u654F\u611F\u8BCD\u5E93",cancel:"\u53D6\u6D88",confirm:"\u786E\u8BA4",nameRequired:"\u8BF7\u8F93\u5165\u654F\u611F\u8BCD\u5E93\u540D\u79F0!",namePlaceholder:"\u8BF7\u8F93\u5165"},message:{saveSuccess:"\u4FDD\u5B58\u6210\u529F",createSuccess:"\u65B0\u589E\u654F\u611F\u8BCD\u6210\u529F!",deleteSuccess:"\u5220\u9664\u6210\u529F",downloadTemplateFail:"\u6A21\u677F\u4E0B\u8F7D\u5931\u8D25",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25"},downloadTemplateFilename:"\u654F\u611F\u8BCD\u6A21\u677F",editor:{maxLengthHint:"\u654F\u611F\u8BCD\u6700\u591A\u53EF\u8F93\u5165{{max}}\u4E2A\u5B57\u7B26",maxLengthWarning:"\u654F\u611F\u8BCD\u6700\u591A\u53EF\u8F93\u5165{{max}}\u4E2A\u5B57\u7B26",duplicateWarning:"\u5DF2\u5B58\u5728\u76F8\u540C\u654F\u611F\u8BCD",configTemplateHint:"\u8BF7\u914D\u7F6E\u6A21\u677F\u4E0B\u8F7D\u5730\u5740",selectFileWarning:"\u8BF7\u5148\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6",importFailRetry:"\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",importCountSuccess:"\u5DF2\u5BFC\u5165 {{count}} \u4E2A\u654F\u611F\u8BCD",parseFail:"\u6587\u4EF6\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u786E\u4FDD\u4E3A csv \u6216 txt \u683C\u5F0F",readFileFail:"\u6587\u4EF6\u8BFB\u53D6\u5931\u8D25",searchPlaceholder:"\u8BF7\u8F93\u5165\u654F\u611F\u8BCD\u641C\u7D22",inputPlaceholder:"\u8BF7\u8F93\u5165",add:"\u6DFB\u52A0",import:"\u5BFC\u5165",cancel:"\u53D6\u6D88",save:"\u4FDD\u5B58",confirm:"\u786E\u8BA4",downloadTemplate:"\u4E0B\u8F7D\u6A21\u677F",uploadModalTitle:"\u4E0A\u4F20\u6587\u4EF6",uploadModalHint:"\u5148\u4E0B\u8F7D\u6A21\u677F\u540E\u4E0A\u4F20",uploadDragText:"\u70B9\u51FB\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64\u5904\u4E0A\u4F20",uploadDragHint:"\u652F\u6301\u5355\u6B21\u4E0A\u4F20\uFF0C\u652F\u6301 csv\u3001txt \u683C\u5F0F\u3002",formatCsv:"csv",formatTxt:"txt"},server:{requestError:"\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5",noPermission:"\u6CA1\u6709\u8DB3\u591F\u6743\u9650"}},Yn={toolbar:{searchPlaceholder:"Enter keyword"},tagCell:{viewAllTitle:"{{total}} total, showing first {{max}}",viewAllLink:"\u2026View all (+{{count}})"},table:{label:"Sensitive words",viewLabel:"Sensitive word libraries",columns:{name:"Name",sensitiveWords:"Sensitive words",createDate:"Created",count:"Count",actions:"Actions"},toolbar:{create:"New library",searchPlaceholder:"Enter keyword"},actionEdit:"Edit",actionDelete:"Delete"},dashboard:{title:"Sensitive word libraries"},deleteConfirm:{title:"Delete this library?",content:"This library cannot be recovered after deletion.",okText:"Delete",cancelText:"Cancel"},createModal:{title:"New sensitive word library",cancel:"Cancel",confirm:"Confirm",nameRequired:"Please enter the library name.",namePlaceholder:"Enter name"},message:{saveSuccess:"Saved",createSuccess:"Library created.",deleteSuccess:"Deleted",downloadTemplateFail:"Template download failed",importSuccess:"Import succeeded",importFail:"Import failed"},downloadTemplateFilename:"sensitive-words-template",editor:{maxLengthHint:"Max {{max}} characters per word",maxLengthWarning:"Max {{max}} characters per word",duplicateWarning:"Duplicate word",configTemplateHint:"Please configure template download URL",selectFileWarning:"Please select a file first",importFailRetry:"Import failed, please retry",importCountSuccess:"Imported {{count}} words",parseFail:"Parse failed. Use csv or txt format.",readFileFail:"File read failed",searchPlaceholder:"Search sensitive words",inputPlaceholder:"Enter",add:"Add",import:"Import",cancel:"Cancel",save:"Save",confirm:"Confirm",downloadTemplate:"Download template",uploadModalTitle:"Upload file",uploadModalHint:"Download template first, then upload",uploadDragText:"Click or drag file here to upload",uploadDragHint:"Single file. csv or txt.",formatCsv:"csv",formatTxt:"txt"},server:{requestError:"Request failed, please try again.",noPermission:"Insufficient permission"}},Zn={toolbar:{searchPlaceholder:"\u30AD\u30FC\u30EF\u30FC\u30C9\u3092\u5165\u529B"},tagCell:{viewAllTitle:"\u5168{{total}}\u4EF6\u3001\u5148\u982D{{max}}\u4EF6\u3092\u8868\u793A",viewAllLink:"\u2026\u3059\u3079\u3066\u8868\u793A\uFF08+{{count}}\uFF09"},table:{label:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9",viewLabel:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u30E9\u30A4\u30D6\u30E9\u30EA",columns:{name:"\u540D\u524D",sensitiveWords:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9",createDate:"\u4F5C\u6210\u65E5",count:"\u4EF6\u6570",actions:"\u64CD\u4F5C"},toolbar:{create:"\u65B0\u898F\u30E9\u30A4\u30D6\u30E9\u30EA",searchPlaceholder:"\u30AD\u30FC\u30EF\u30FC\u30C9\u3092\u5165\u529B"},actionEdit:"\u7DE8\u96C6",actionDelete:"\u524A\u9664"},dashboard:{title:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u7BA1\u7406"},deleteConfirm:{title:"\u3053\u306E\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",content:"\u524A\u9664\u3059\u308B\u3068\u5FA9\u5143\u3067\u304D\u307E\u305B\u3093\u3002",okText:"\u524A\u9664",cancelText:"\u30AD\u30E3\u30F3\u30BB\u30EB"},createModal:{title:"\u65B0\u898F\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u30E9\u30A4\u30D6\u30E9\u30EA",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",confirm:"\u78BA\u8A8D",nameRequired:"\u30E9\u30A4\u30D6\u30E9\u30EA\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",namePlaceholder:"\u5165\u529B"},message:{saveSuccess:"\u4FDD\u5B58\u3057\u307E\u3057\u305F",createSuccess:"\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F\u3002",deleteSuccess:"\u524A\u9664\u3057\u307E\u3057\u305F",downloadTemplateFail:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F",importSuccess:"\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u307E\u3057\u305F",importFail:"\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F"},downloadTemplateFilename:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8",editor:{maxLengthHint:"1\u8A9E\u3042\u305F\u308A{{max}}\u6587\u5B57\u307E\u3067",maxLengthWarning:"1\u8A9E\u3042\u305F\u308A{{max}}\u6587\u5B57\u307E\u3067",duplicateWarning:"\u540C\u3058\u8A9E\u304C\u65E2\u306B\u3042\u308A\u307E\u3059",configTemplateHint:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9URL\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044",selectFileWarning:"\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",importFailRetry:"\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",importCountSuccess:"{{count}}\u8A9E\u3092\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u307E\u3057\u305F",parseFail:"\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002csv \u307E\u305F\u306F txt \u5F62\u5F0F\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",readFileFail:"\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",searchPlaceholder:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u3092\u691C\u7D22",inputPlaceholder:"\u5165\u529B",add:"\u8FFD\u52A0",import:"\u30A4\u30F3\u30DD\u30FC\u30C8",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",save:"\u4FDD\u5B58",confirm:"\u78BA\u8A8D",downloadTemplate:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9",uploadModalTitle:"\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",uploadModalHint:"\u5148\u306B\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3066\u304B\u3089\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",uploadDragText:"\u30AF\u30EA\u30C3\u30AF\u307E\u305F\u306F\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",uploadDragHint:"1\u30D5\u30A1\u30A4\u30EB\u3002csv \u307E\u305F\u306F txt\u3002",formatCsv:"csv",formatTxt:"txt"},server:{requestError:"\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",noPermission:"\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093"}},Qn={zh:We,en:Yn,ja:Zn};function ea(e){return Qn[e]??We}function ke(e,t){return e.replace(/\{\{(\w+)\}\}/g,(n,a)=>String(t[a]??""))}const Gt=$e.createContext({locale:"zh",messages:We,getMessage:e=>{const t=e.split(".");let n=We;for(const a of t)n=n==null?void 0:n[a];return typeof n=="string"?n:e}});function qe(){return $e.useContext(Gt)}function ta({locale:e,messages:t,children:n}){const a=$e.useMemo(()=>{const o=ea(e),r=t?{...o,...t}:o;return{locale:e,messages:r,getMessage:i=>{const u=i.split(".");let d=r;for(const p of u)d=d==null?void 0:d[p];return typeof d=="string"?d:i}}},[e,t]);return $e.createElement(Gt.Provider,{value:a},n)}const{Dragger:ra}=ct,Se=16,na=ue.div.attrs({className:"sensitive-edit-page"})`
31
+ `]:{zIndex:10,width:a,margin:`0 ${de(e.marginXXS)}`,fontSize:a,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,color:o,"&:hover":{color:o},svg:{verticalAlign:"baseline"}}},[`${i}-thumbnail, ${i}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${i}-name`]:{display:"none",textAlign:"center"},[`${i}-file + ${i}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${de(r(e.paddingXS).mul(2).equal())})`},[`${i}-uploading`]:{[`&${i}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${i}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${de(r(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}},$n=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},En=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},Tt(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-hidden`]:{display:"none"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},xn=e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55}),Sn=Lt("Upload",e=>{const{fontSizeHeading3:t,fontHeight:n,lineWidth:a,pictureCardSize:o,calc:r}=e,s=Ot(e,{uploadThumbnailSize:r(t).mul(2).equal(),uploadProgressOffset:r(r(n).div(2)).add(a).equal(),uploadPicCardSize:o});return[En(s),bn(s),Fn(s),wn(s),yn(s),Cn(s),$n(s),vr(s)]},xn);var Dn={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:n}},{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.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},An=function(t,n){return l.createElement(Oe,he({},t,{ref:n,icon:Dn}))},Bn=l.forwardRef(An),In={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},Pn=function(t,n){return l.createElement(Oe,he({},t,{ref:n,icon:In}))},kn=l.forwardRef(Pn),Ln={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:n}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:n}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:n}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},On=function(t,n){return l.createElement(Oe,he({},t,{ref:n,icon:Ln}))},Tn=l.forwardRef(On);function Te(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function Ne(e,t){const n=ge(t),a=n.findIndex(({uid:o})=>o===e.uid);return a===-1?n.push(e):n[a]=e,n}function et(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(a=>a[n]===e[n])[0]}function Nn(e,t){const n=e.uid!==void 0?"uid":"name",a=t.filter(o=>o[n]!==e[n]);return a.length===t.length?null:a}const _n=(e="")=>{const t=e.split("/"),a=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(a)||[""])[0]},Vt=e=>e.indexOf("image/")===0,Mn=e=>{if(e.type&&!e.thumbUrl)return Vt(e.type);const t=e.thumbUrl||e.url||"",n=_n(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},be=200;function jn(e){return new Promise(t=>{if(!e.type||!Vt(e.type)){t("");return}const n=document.createElement("canvas");n.width=be,n.height=be,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${be}px; height: ${be}px; z-index: 9999; display: none;`,document.body.appendChild(n);const a=n.getContext("2d"),o=new Image;if(o.onload=()=>{const{width:r,height:s}=o;let i=be,u=be,d=0,p=0;r>s?(u=s*(be/r),p=-(u-i)/2):(i=r*(be/s),d=-(i-u)/2),a.drawImage(o,d,p,i,u);const g=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(o.src),t(g)},o.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const r=new FileReader;r.onload=()=>{r.result&&typeof r.result=="string"&&(o.src=r.result)},r.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const r=new FileReader;r.onload=()=>{r.result&&t(r.result)},r.readAsDataURL(e)}else o.src=window.URL.createObjectURL(e)})}var Rn={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"},zn=function(t,n){return l.createElement(Oe,he({},t,{ref:n,icon:Rn}))},Wn=l.forwardRef(zn);const Un=l.forwardRef(({prefixCls:e,className:t,style:n,locale:a,listType:o,file:r,items:s,progress:i,iconRender:u,actionIconRender:d,itemRender:p,isImgUrl:g,showPreviewIcon:b,showRemoveIcon:y,showDownloadIcon:c,previewIcon:m,removeIcon:f,downloadIcon:v,extra:w,onPreview:x,onDownload:$,onClose:h},B)=>{var A,L;const{status:W}=r,[S,te]=l.useState(W);l.useEffect(()=>{W!=="removed"&&te(W)},[W]);const[ae,K]=l.useState(!1);l.useEffect(()=>{const M=setTimeout(()=>{K(!0)},300);return()=>{clearTimeout(M)}},[]);const J=u(r);let G=l.createElement("div",{className:`${e}-icon`},J);if(o==="picture"||o==="picture-card"||o==="picture-circle")if(S==="uploading"||!r.thumbUrl&&!r.url){const M=ee(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:S!=="uploading"});G=l.createElement("div",{className:M},J)}else{const M=g!=null&&g(r)?l.createElement("img",{src:r.thumbUrl||r.url,alt:r.name,className:`${e}-list-item-image`,crossOrigin:r.crossOrigin}):J,fe=ee(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:g&&!g(r)});G=l.createElement("a",{className:fe,onClick:ve=>x(r,ve),href:r.url||r.thumbUrl,target:"_blank",rel:"noopener noreferrer"},M)}const q=ee(`${e}-list-item`,`${e}-list-item-${S}`),H=typeof r.linkProps=="string"?JSON.parse(r.linkProps):r.linkProps,Z=(typeof y=="function"?y(r):y)?d((typeof f=="function"?f(r):f)||l.createElement(dn,null),()=>h(r),e,a.removeFile,!0):null,T=(typeof c=="function"?c(r):c)&&S==="done"?d((typeof v=="function"?v(r):v)||l.createElement(Wn,null),()=>$(r),e,a.downloadFile):null,F=o!=="picture-card"&&o!=="picture-circle"&&l.createElement("span",{key:"download-delete",className:ee(`${e}-list-item-actions`,{picture:o==="picture"})},T,Z),O=typeof w=="function"?w(r):w,X=O&&l.createElement("span",{className:`${e}-list-item-extra`},O),E=ee(`${e}-list-item-name`),P=r.url?l.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:E,title:r.name},H,{href:r.url,onClick:M=>x(r,M)}),r.name,X):l.createElement("span",{key:"view",className:E,onClick:M=>x(r,M),title:r.name},r.name,X),z=(typeof b=="function"?b(r):b)&&(r.url||r.thumbUrl)?l.createElement("a",{href:r.url||r.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:M=>x(r,M),title:a.previewFile},typeof m=="function"?m(r):m||l.createElement(br,null)):null,re=(o==="picture-card"||o==="picture-circle")&&S!=="uploading"&&l.createElement("span",{className:`${e}-list-item-actions`},z,S==="done"&&T,Z),{getPrefixCls:ue}=l.useContext(Ue),D=ue(),C=l.createElement("div",{className:q},G,P,F,re,ae&&l.createElement(Ut,{motionName:`${D}-fade`,visible:S==="uploading",motionDeadline:2e3},({className:M})=>{const fe="percent"in r?l.createElement(ln,Object.assign({type:"line",percent:r.percent,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"]},i)):null;return l.createElement("div",{className:ee(`${e}-list-item-progress`,M)},fe)})),j=r.response&&typeof r.response=="string"?r.response:((A=r.error)===null||A===void 0?void 0:A.statusText)||((L=r.error)===null||L===void 0?void 0:L.message)||a.uploadError,N=S==="error"?l.createElement(kt,{title:j,getPopupContainer:M=>M.parentNode},C):C;return l.createElement("div",{className:ee(`${e}-list-item-container`,t),style:n,ref:B},p?p(N,r,s,{download:$.bind(null,r),preview:x.bind(null,r),remove:h.bind(null,r)}):N)}),Hn=(e,t)=>{const{listType:n="text",previewFile:a=jn,onPreview:o,onDownload:r,onRemove:s,locale:i,iconRender:u,isImageUrl:d=Mn,prefixCls:p,items:g=[],showPreviewIcon:b=!0,showRemoveIcon:y=!0,showDownloadIcon:c=!1,removeIcon:m,previewIcon:f,downloadIcon:v,extra:w,progress:x={size:[-1,2],showInfo:!1},appendAction:$,appendActionVisible:h=!0,itemRender:B,disabled:A}=e,[,L]=yr(),[W,S]=l.useState(!1),te=["picture-card","picture-circle"].includes(n);l.useEffect(()=>{n.startsWith("picture")&&(g||[]).forEach(E=>{!(E.originFileObj instanceof File||E.originFileObj instanceof Blob)||E.thumbUrl!==void 0||(E.thumbUrl="",a==null||a(E.originFileObj).then(P=>{E.thumbUrl=P||"",L()}))})},[n,g,a]),l.useEffect(()=>{S(!0)},[]);const ae=(E,P)=>{if(o)return P==null||P.preventDefault(),o(E)},K=E=>{typeof r=="function"?r(E):E.url&&window.open(E.url)},J=E=>{s==null||s(E)},G=E=>{if(u)return u(E,n);const P=E.status==="uploading";if(n.startsWith("picture")){const z=n==="picture"?l.createElement(bt,null):i.uploading,re=d!=null&&d(E)?l.createElement(Tn,null):l.createElement(Bn,null);return P?z:re}return P?l.createElement(bt,null):l.createElement(kn,null)},q=(E,P,z,re,ue)=>{const D={type:"text",size:"small",title:re,onClick:C=>{var j,N;P(),l.isValidElement(E)&&((N=(j=E.props).onClick)===null||N===void 0||N.call(j,C))},className:`${z}-list-item-action`,disabled:ue?A:!1};return l.isValidElement(E)?l.createElement(vt,Object.assign({},D,{icon:ht(E,Object.assign(Object.assign({},E.props),{onClick:()=>{}}))})):l.createElement(vt,Object.assign({},D),l.createElement("span",null,E))};l.useImperativeHandle(t,()=>({handlePreview:ae,handleDownload:K}));const{getPrefixCls:H}=l.useContext(Ue),Z=H("upload",p),T=H(),F=ee(`${Z}-list`,`${Z}-list-${n}`),O=l.useMemo(()=>Nt(Cr(T),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[T]),X=Object.assign(Object.assign({},te?{}:O),{motionDeadline:2e3,motionName:`${Z}-${te?"animate-inline":"animate"}`,keys:ge(g.map(E=>({key:E.uid,file:E}))),motionAppear:W});return l.createElement("div",{className:F},l.createElement(Fr,Object.assign({},X,{component:!1}),({key:E,file:P,className:z,style:re})=>l.createElement(Un,{key:E,locale:i,prefixCls:Z,className:z,style:re,file:P,items:g,progress:x,listType:n,isImgUrl:d,showPreviewIcon:b,showRemoveIcon:y,showDownloadIcon:c,removeIcon:m,previewIcon:f,downloadIcon:v,extra:w,iconRender:G,actionIconRender:q,itemRender:B,onPreview:ae,onDownload:K,onClose:J})),$&&l.createElement(Ut,Object.assign({},X,{visible:h,forceRender:!0}),({className:E,style:P})=>ht($,z=>({className:ee(z.className,E),style:Object.assign(Object.assign(Object.assign({},P),{pointerEvents:E?"none":void 0}),z.style)}))))},qn=l.forwardRef(Hn);var Xn=function(e,t,n,a){function o(r){return r instanceof n?r:new n(function(s){s(r)})}return new(n||(n=Promise))(function(r,s){function i(p){try{d(a.next(p))}catch(g){s(g)}}function u(p){try{d(a.throw(p))}catch(g){s(g)}}function d(p){p.done?r(p.value):o(p.value).then(i,u)}d((a=a.apply(e,[])).next())})};const ke=`__LIST_IGNORE_${Date.now()}__`,Vn=(e,t)=>{const n=wr("upload"),{fileList:a,defaultFileList:o,onRemove:r,showUploadList:s=!0,listType:i="text",onPreview:u,onDownload:d,onChange:p,onDrop:g,previewFile:b,disabled:y,locale:c,iconRender:m,isImageUrl:f,progress:v,prefixCls:w,className:x,type:$="select",children:h,style:B,itemRender:A,maxCount:L,data:W={},multiple:S=!1,hasControlInside:te=!0,action:ae="",accept:K="",supportServerRender:J=!0,rootClassName:G}=e,q=l.useContext($r),H=y??q,Z=e.customRequest||n.customRequest,[T,F]=Er(o||[],{value:a,postState:k=>k??[]}),[O,X]=l.useState("drop"),E=l.useRef(null),P=l.useRef(null);l.useMemo(()=>{const k=Date.now();(a||[]).forEach((R,V)=>{!R.uid&&!Object.isFrozen(R)&&(R.uid=`__AUTO__${k}_${V}__`)})},[a]);const z=(k,R,V)=>{let _=ge(R),U=!1;L===1?_=_.slice(-1):L&&(U=_.length>L,_=_.slice(0,L)),Ct(()=>{F(_)});const se={file:k,fileList:_};V&&(se.event=V),(!U||k.status==="removed"||_.some(we=>we.uid===k.uid))&&Ct(()=>{p==null||p(se)})},re=(k,R)=>Xn(void 0,void 0,void 0,function*(){const{beforeUpload:V,transformFile:_}=e;let U=k;if(V){const se=yield V(k,R);if(se===!1)return!1;if(delete k[ke],se===ke)return Object.defineProperty(k,ke,{value:!0,configurable:!0}),!1;typeof se=="object"&&se&&(U=se)}return _&&(U=yield _(U)),U}),ue=k=>{const R=k.filter(U=>!U.file[ke]);if(!R.length)return;const V=R.map(U=>Te(U.file));let _=ge(T);V.forEach(U=>{_=Ne(U,_)}),V.forEach((U,se)=>{let we=U;if(R[se].parsedFile)U.status="uploading";else{const{originFileObj:Se}=U;let $e;try{$e=new File([Se],Se.name,{type:Se.type})}catch{$e=new Blob([Se],{type:Se.type}),$e.name=Se.name,$e.lastModifiedDate=new Date,$e.lastModified=new Date().getTime()}$e.uid=U.uid,we=$e}z(we,_)})},D=(k,R,V)=>{try{typeof k=="string"&&(k=JSON.parse(k))}catch{}if(!et(R,T))return;const _=Te(R);_.status="done",_.percent=100,_.response=k,_.xhr=V;const U=Ne(_,T);z(_,U)},C=(k,R)=>{if(!et(R,T))return;const V=Te(R);V.status="uploading",V.percent=k.percent;const _=Ne(V,T);z(V,_,k)},j=(k,R,V)=>{if(!et(V,T))return;const _=Te(V);_.error=k,_.response=R,_.status="error";const U=Ne(_,T);z(_,U)},N=k=>{let R;Promise.resolve(typeof r=="function"?r(k):r).then(V=>{var _;if(V===!1)return;const U=Nn(k,T);U&&(R=Object.assign(Object.assign({},k),{status:"removed"}),T==null||T.forEach(se=>{const we=R.uid!==void 0?"uid":"name";se[we]===R[we]&&!Object.isFrozen(se)&&(se.status="removed")}),(_=E.current)===null||_===void 0||_.abort(R),z(R,U))})},M=k=>{X(k.type),k.type==="drop"&&(g==null||g(k))};l.useImperativeHandle(t,()=>({onBatchStart:ue,onSuccess:D,onProgress:C,onError:j,fileList:T,upload:E.current,nativeElement:P.current}));const{getPrefixCls:fe,direction:ve,upload:xe}=l.useContext(Ue),Q=fe("upload",w),Ie=Object.assign(Object.assign({onBatchStart:ue,onError:j,onProgress:C,onSuccess:D},e),{customRequest:Z,data:W,multiple:S,action:ae,accept:K,supportServerRender:J,prefixCls:Q,disabled:H,beforeUpload:re,onChange:void 0,hasControlInside:te});delete Ie.className,delete Ie.style,(!h||H)&&delete Ie.id;const ut=`${Q}-wrapper`,[Xe,dt,Jt]=Sn(Q,ut),[Yt]=xr("Upload",Sr.Upload),{showRemoveIcon:pt,showPreviewIcon:Zt,showDownloadIcon:Qt,removeIcon:er,previewIcon:tr,downloadIcon:rr,extra:nr}=typeof s=="boolean"?{}:s,ar=typeof pt>"u"?!H:pt,Ve=(k,R)=>s?l.createElement(qn,{prefixCls:Q,listType:i,items:T,previewFile:b,onPreview:u,onDownload:d,onRemove:N,showRemoveIcon:ar,showPreviewIcon:Zt,showDownloadIcon:Qt,removeIcon:er,previewIcon:tr,downloadIcon:rr,iconRender:m,extra:nr,locale:Object.assign(Object.assign({},Yt),c),isImageUrl:f,progress:v,appendAction:k,appendActionVisible:R,itemRender:A,disabled:H}):k,Ge=ee(ut,x,G,dt,Jt,xe==null?void 0:xe.className,{[`${Q}-rtl`]:ve==="rtl",[`${Q}-picture-card-wrapper`]:i==="picture-card",[`${Q}-picture-circle-wrapper`]:i==="picture-circle"}),mt=Object.assign(Object.assign({},xe==null?void 0:xe.style),B);if($==="drag"){const k=ee(dt,Q,`${Q}-drag`,{[`${Q}-drag-uploading`]:T.some(R=>R.status==="uploading"),[`${Q}-drag-hover`]:O==="dragover",[`${Q}-disabled`]:H,[`${Q}-rtl`]:ve==="rtl"});return Xe(l.createElement("span",{className:Ge,ref:P},l.createElement("div",{className:k,style:mt,onDrop:M,onDragOver:M,onDragLeave:M},l.createElement(at,Object.assign({},Ie,{ref:E,className:`${Q}-btn`}),l.createElement("div",{className:`${Q}-drag-container`},h))),Ve()))}const or=ee(Q,`${Q}-select`,{[`${Q}-disabled`]:H,[`${Q}-hidden`]:!h}),ft=l.createElement("div",{className:or,style:mt},l.createElement(at,Object.assign({},Ie,{ref:E})));return Xe(i==="picture-card"||i==="picture-circle"?l.createElement("span",{className:Ge,ref:P},Ve(ft,!!h)):l.createElement("span",{className:Ge,ref:P},ft,Ve()))},Gt=l.forwardRef(Vn);var Gn=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]]);return n};const Kn=l.forwardRef((e,t)=>{const{style:n,height:a,hasControlInside:o=!1,children:r}=e,s=Gn(e,["style","height","hasControlInside","children"]),i=Object.assign(Object.assign({},n),{height:a});return l.createElement(Gt,Object.assign({ref:t,hasControlInside:o},s,{style:i,type:"drag"}),r)}),ct=Gt;ct.Dragger=Kn;ct.LIST_IGNORE=ke;const Jn=["10014"],Yn=({url:e,token:t,role:n,getMessage:a})=>{const o=(c,m)=>a?a(c):m,r=Dr.create({baseURL:e,timeout:1e6});return r.interceptors.request.use(c=>{let m=t;if(!m&&!["user/login","user/kaptcha","user/regist"].some(v=>c.url.includes(v))){window.location.pathname="/login";return}return c.headers.Authorization=m||"",c.headers.userName=n==="\u672A\u767B\u5F55\u7528\u6237"?"":n,c}),r.interceptors.response.use(c=>{const m=["user/kaptcha"],f=c.data;if(m.some($=>c.config.url&&c.config.url.includes($))||f.size&&f.type)return f;const{success:v,errorMsg:w,errorCode:x}=f;return Jn.includes(x)||v?f:(ne.error(w||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")),!1)},c=>{var m,f,v,w,x,$,h,B,A,L;c.message!=="canceled"&&((((f=(m=c==null?void 0:c.response)==null?void 0:m.data)==null?void 0:f.errorCode)==="30013"||((w=(v=c==null?void 0:c.response)==null?void 0:v.data)==null?void 0:w.errorCode)==="30023")&&ne.error((((x=c==null?void 0:c.response)==null?void 0:x.data)||{}).errorMsg||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")),(($=c==null?void 0:c.response)==null?void 0:$.status)===401&&(console.log("Error url:",(h=c==null?void 0:c.request)==null?void 0:h.responseURL),ne.error((((B=c==null?void 0:c.response)==null?void 0:B.data)||{}).errorMsg||o("server.noPermission","\u6CA1\u6709\u8DB3\u591F\u6743\u9650"))),console.log("Error occurs",c),(((A=c==null?void 0:c.response)==null?void 0:A.data)||{}).errorMsg!="\u672A\u8BBE\u7F6E\u9ED8\u8BA4\u914D\u7F6E\uFF01"&&ne.error((((L=c==null?void 0:c.response)==null?void 0:L.data)||{}).errorMsg||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")))}),{getLibraryList:async c=>{try{const m=await r.get(`/sensitive/library?${new URLSearchParams(c).toString()}`),{success:f,data:v}=m;return f?v:!1}catch(m){return console.log("e",m),!1}},createLibrary:async c=>{try{const m=await r.post("/sensitive/library",c),{success:f,data:v}=m;return f?v:!1}catch(m){return console.log("e",m),!1}},deleteLibrary:async c=>{try{const m=await r.delete(`/sensitive/library/${c}`),{success:f,data:v}=m;return f?v:!1}catch(m){return console.log("e",m),!1}},updateLibrary:async(c,m)=>{try{const f=await r.put(`/sensitive/library/${c}`,m),{success:v,data:w}=f;return v?w:!1}catch(f){return console.log("e",f),!1}},downloadTemplate:async c=>{try{const m=await r.get("/sensitive/word/downloadTemplate",{params:{fileType:c},responseType:"blob"});return m&&typeof m.size=="number"?m:!1}catch(m){return console.log("e",m),!1}},importWords:async(c,m)=>{try{const f=new FormData;f.append("file",m);const v=await r.put(`/sensitive/word/${c}/import`,f);return v&&v.success!==!1?v:!1}catch(f){return console.log("e",f),!1}},getWords:async c=>{try{const m=await r.get(`/sensitive/library/${c}`),{success:f,data:v}=m;return f?v:!1}catch(m){return console.log("e",m),!1}},getLibraryData:async c=>{try{const m=await r.get(`/sensitive/library/${c}`),{success:f,data:v}=m;return f?v:!1}catch(m){return console.log("e",m),!1}}}},We={toolbar:{searchPlaceholder:"\u8BF7\u8F93\u5165\u5185\u5BB9"},tagCell:{viewAllTitle:"\u5171 {{total}} \u4E2A\uFF0C\u5F53\u524D\u4EC5\u5C55\u793A\u524D {{max}} \u4E2A",viewAllLink:"\u2026\u67E5\u770B\u5168\u90E8\uFF08+{{count}}\uFF09"},table:{label:"\u654F\u611F\u8BCD\u914D\u7F6E",viewLabel:"\u654F\u611F\u8BCD\u5E93\u5217\u8868",columns:{name:"\u540D\u79F0",sensitiveWords:"\u654F\u611F\u8BCD",createDate:"\u521B\u5EFA\u65E5\u671F",count:"\u6570\u91CF",actions:"\u64CD\u4F5C"},toolbar:{create:"\u65B0\u5EFA\u654F\u611F\u8BCD\u5E93",searchPlaceholder:"\u8BF7\u8F93\u5165\u5185\u5BB9"},actionEdit:"\u7F16\u8F91",actionDelete:"\u5220\u9664"},dashboard:{title:"\u654F\u611F\u8BCD\u5E93\u7BA1\u7406"},deleteConfirm:{title:"\u786E\u8BA4\u5220\u9664\u654F\u611F\u8BCD\u5E93\uFF1F",content:"\u5220\u9664\u540E\uFF0C\u8BE5\u654F\u611F\u8BCD\u5E93\u5C06\u65E0\u6CD5\u6062\u590D",okText:"\u5220\u9664",cancelText:"\u53D6\u6D88"},createModal:{title:"\u65B0\u5EFA\u654F\u611F\u8BCD\u5E93",cancel:"\u53D6\u6D88",confirm:"\u786E\u8BA4",nameRequired:"\u8BF7\u8F93\u5165\u654F\u611F\u8BCD\u5E93\u540D\u79F0!",namePlaceholder:"\u8BF7\u8F93\u5165"},message:{saveSuccess:"\u4FDD\u5B58\u6210\u529F",createSuccess:"\u65B0\u589E\u654F\u611F\u8BCD\u6210\u529F!",deleteSuccess:"\u5220\u9664\u6210\u529F",downloadTemplateFail:"\u6A21\u677F\u4E0B\u8F7D\u5931\u8D25",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25"},downloadTemplateFilename:"\u654F\u611F\u8BCD\u6A21\u677F",editor:{maxLengthHint:"\u654F\u611F\u8BCD\u6700\u591A\u53EF\u8F93\u5165{{max}}\u4E2A\u5B57\u7B26",maxLengthWarning:"\u654F\u611F\u8BCD\u6700\u591A\u53EF\u8F93\u5165{{max}}\u4E2A\u5B57\u7B26",duplicateWarning:"\u5DF2\u5B58\u5728\u76F8\u540C\u654F\u611F\u8BCD",configTemplateHint:"\u8BF7\u914D\u7F6E\u6A21\u677F\u4E0B\u8F7D\u5730\u5740",selectFileWarning:"\u8BF7\u5148\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6",importFailRetry:"\u5BFC\u5165\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5",importCountSuccess:"\u5DF2\u5BFC\u5165 {{count}} \u4E2A\u654F\u611F\u8BCD",parseFail:"\u6587\u4EF6\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u786E\u4FDD\u4E3A csv \u6216 txt \u683C\u5F0F",readFileFail:"\u6587\u4EF6\u8BFB\u53D6\u5931\u8D25",searchPlaceholder:"\u8BF7\u8F93\u5165\u654F\u611F\u8BCD\u641C\u7D22",inputPlaceholder:"\u8BF7\u8F93\u5165",add:"\u6DFB\u52A0",import:"\u5BFC\u5165",cancel:"\u53D6\u6D88",save:"\u4FDD\u5B58",confirm:"\u786E\u8BA4",downloadTemplate:"\u4E0B\u8F7D\u6A21\u677F",uploadModalTitle:"\u4E0A\u4F20\u6587\u4EF6",uploadModalHint:"\u5148\u4E0B\u8F7D\u6A21\u677F\u540E\u4E0A\u4F20",uploadDragText:"\u70B9\u51FB\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64\u5904\u4E0A\u4F20",uploadDragHint:"\u652F\u6301\u5355\u6B21\u4E0A\u4F20\uFF0C\u652F\u6301 csv\u3001txt \u683C\u5F0F\u3002",formatCsv:"csv",formatTxt:"txt"},server:{requestError:"\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5",noPermission:"\u6CA1\u6709\u8DB3\u591F\u6743\u9650"}},Zn={toolbar:{searchPlaceholder:"Enter keyword"},tagCell:{viewAllTitle:"{{total}} total, showing first {{max}}",viewAllLink:"\u2026View all (+{{count}})"},table:{label:"Sensitive words",viewLabel:"Sensitive word libraries",columns:{name:"Name",sensitiveWords:"Sensitive words",createDate:"Created",count:"Count",actions:"Actions"},toolbar:{create:"New library",searchPlaceholder:"Enter keyword"},actionEdit:"Edit",actionDelete:"Delete"},dashboard:{title:"Sensitive word libraries"},deleteConfirm:{title:"Delete this library?",content:"This library cannot be recovered after deletion.",okText:"Delete",cancelText:"Cancel"},createModal:{title:"New sensitive word library",cancel:"Cancel",confirm:"Confirm",nameRequired:"Please enter the library name.",namePlaceholder:"Enter name"},message:{saveSuccess:"Saved",createSuccess:"Library created.",deleteSuccess:"Deleted",downloadTemplateFail:"Template download failed",importSuccess:"Import succeeded",importFail:"Import failed"},downloadTemplateFilename:"sensitive-words-template",editor:{maxLengthHint:"Max {{max}} characters per word",maxLengthWarning:"Max {{max}} characters per word",duplicateWarning:"Duplicate word",configTemplateHint:"Please configure template download URL",selectFileWarning:"Please select a file first",importFailRetry:"Import failed, please retry",importCountSuccess:"Imported {{count}} words",parseFail:"Parse failed. Use csv or txt format.",readFileFail:"File read failed",searchPlaceholder:"Search sensitive words",inputPlaceholder:"Enter",add:"Add",import:"Import",cancel:"Cancel",save:"Save",confirm:"Confirm",downloadTemplate:"Download template",uploadModalTitle:"Upload file",uploadModalHint:"Download template first, then upload",uploadDragText:"Click or drag file here to upload",uploadDragHint:"Single file. csv or txt.",formatCsv:"csv",formatTxt:"txt"},server:{requestError:"Request failed, please try again.",noPermission:"Insufficient permission"}},Qn={toolbar:{searchPlaceholder:"\u30AD\u30FC\u30EF\u30FC\u30C9\u3092\u5165\u529B"},tagCell:{viewAllTitle:"\u5168{{total}}\u4EF6\u3001\u5148\u982D{{max}}\u4EF6\u3092\u8868\u793A",viewAllLink:"\u2026\u3059\u3079\u3066\u8868\u793A\uFF08+{{count}}\uFF09"},table:{label:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9",viewLabel:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u30E9\u30A4\u30D6\u30E9\u30EA",columns:{name:"\u540D\u524D",sensitiveWords:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9",createDate:"\u4F5C\u6210\u65E5",count:"\u4EF6\u6570",actions:"\u64CD\u4F5C"},toolbar:{create:"\u65B0\u898F\u30E9\u30A4\u30D6\u30E9\u30EA",searchPlaceholder:"\u30AD\u30FC\u30EF\u30FC\u30C9\u3092\u5165\u529B"},actionEdit:"\u7DE8\u96C6",actionDelete:"\u524A\u9664"},dashboard:{title:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u7BA1\u7406"},deleteConfirm:{title:"\u3053\u306E\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",content:"\u524A\u9664\u3059\u308B\u3068\u5FA9\u5143\u3067\u304D\u307E\u305B\u3093\u3002",okText:"\u524A\u9664",cancelText:"\u30AD\u30E3\u30F3\u30BB\u30EB"},createModal:{title:"\u65B0\u898F\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u30E9\u30A4\u30D6\u30E9\u30EA",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",confirm:"\u78BA\u8A8D",nameRequired:"\u30E9\u30A4\u30D6\u30E9\u30EA\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",namePlaceholder:"\u5165\u529B"},message:{saveSuccess:"\u4FDD\u5B58\u3057\u307E\u3057\u305F",createSuccess:"\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F\u3002",deleteSuccess:"\u524A\u9664\u3057\u307E\u3057\u305F",downloadTemplateFail:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F",importSuccess:"\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u307E\u3057\u305F",importFail:"\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F"},downloadTemplateFilename:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8",editor:{maxLengthHint:"1\u8A9E\u3042\u305F\u308A{{max}}\u6587\u5B57\u307E\u3067",maxLengthWarning:"1\u8A9E\u3042\u305F\u308A{{max}}\u6587\u5B57\u307E\u3067",duplicateWarning:"\u540C\u3058\u8A9E\u304C\u65E2\u306B\u3042\u308A\u307E\u3059",configTemplateHint:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9URL\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044",selectFileWarning:"\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",importFailRetry:"\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",importCountSuccess:"{{count}}\u8A9E\u3092\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u307E\u3057\u305F",parseFail:"\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002csv \u307E\u305F\u306F txt \u5F62\u5F0F\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",readFileFail:"\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",searchPlaceholder:"\u30BB\u30F3\u30B7\u30C6\u30A3\u30D6\u30EF\u30FC\u30C9\u3092\u691C\u7D22",inputPlaceholder:"\u5165\u529B",add:"\u8FFD\u52A0",import:"\u30A4\u30F3\u30DD\u30FC\u30C8",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",save:"\u4FDD\u5B58",confirm:"\u78BA\u8A8D",downloadTemplate:"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9",uploadModalTitle:"\u30D5\u30A1\u30A4\u30EB\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",uploadModalHint:"\u5148\u306B\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3066\u304B\u3089\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",uploadDragText:"\u30AF\u30EA\u30C3\u30AF\u307E\u305F\u306F\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",uploadDragHint:"1\u30D5\u30A1\u30A4\u30EB\u3002csv \u307E\u305F\u306F txt\u3002",formatCsv:"csv",formatTxt:"txt"},server:{requestError:"\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",noPermission:"\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093"}},ea={zh:We,en:Zn,ja:Qn};function ta(e){return ea[e]??We}function Le(e,t){return e.replace(/\{\{(\w+)\}\}/g,(n,a)=>String(t[a]??""))}const Kt=Ee.createContext({locale:"zh",messages:We,getMessage:e=>{const t=e.split(".");let n=We;for(const a of t)n=n==null?void 0:n[a];return typeof n=="string"?n:e}});function qe(){return Ee.useContext(Kt)}function ra({locale:e,messages:t,children:n}){const a=Ee.useMemo(()=>{const o=ta(e),r=t?{...o,...t}:o;return{locale:e,messages:r,getMessage:i=>{const u=i.split(".");let d=r;for(const p of u)d=d==null?void 0:d[p];return typeof d=="string"?d:i}}},[e,t]);return Ee.createElement(Kt.Provider,{value:a},n)}const{Dragger:na}=ct,De=16,aa=ce.div.attrs({className:"sensitive-edit-page"})`
32
32
  display: flex;
33
33
  flex-direction: column;
34
34
  width: 100%;
35
35
  height: 100%;
36
36
  background: ${({theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.background)??"#FFFFFF"}};
37
- `,aa=ue.div.attrs({className:"sensitive-edit-toolbar"})`
37
+ `,oa=ce.div.attrs({className:"sensitive-edit-toolbar"})`
38
38
  flex-shrink: 0;
39
39
  display: flex;
40
40
  align-items: center;
@@ -42,7 +42,7 @@ import{jsxs as ce,jsx as P,Fragment as or}from"react/jsx-runtime";import*as l fr
42
42
  flex-wrap: wrap;
43
43
  padding: 12px 20px;
44
44
 
45
- `,oa=ue.div.attrs({className:"sensitive-edit-content-box"})`
45
+ `,ia=ce.div.attrs({className:"sensitive-edit-content-box"})`
46
46
  flex: 1;
47
47
  min-height: 0;
48
48
  overflow: auto;
@@ -51,18 +51,18 @@ import{jsxs as ce,jsx as P,Fragment as or}from"react/jsx-runtime";import*as l fr
51
51
  border-radius: 8px;
52
52
  padding: 16px;
53
53
  margin: 0 20px;
54
- `,ia=ue.div.attrs({className:"sensitive-edit-tag-list"})`
54
+ `,sa=ce.div.attrs({className:"sensitive-edit-tag-list"})`
55
55
  display: flex;
56
56
  flex-wrap: wrap;
57
57
  gap: 12px;
58
58
  min-height: 30px;
59
- `,Ae=28,sa=ue.span.attrs({className:"sensitive-edit-tag"})`
59
+ `,Be=28,la=ce.span.attrs({className:"sensitive-edit-tag"})`
60
60
  box-sizing: border-box;
61
61
  display: inline-flex;
62
62
  align-items: center;
63
63
  gap: 6px;
64
- height: ${Ae}px;
65
- min-height: ${Ae}px;
64
+ height: ${Be}px;
65
+ min-height: ${Be}px;
66
66
  color: ${e=>e.$color};
67
67
  background: ${e=>e.$bg};
68
68
  border: ${e=>e.$border==="none"?"none":`1px solid ${e.$border}`};
@@ -82,13 +82,13 @@ import{jsxs as ce,jsx as P,Fragment as or}from"react/jsx-runtime";import*as l fr
82
82
  opacity: 1;
83
83
  }
84
84
  }
85
- `,la=ue.span.attrs({className:"sensitive-edit-add-trigger"})`
85
+ `,ca=ce.span.attrs({className:"sensitive-edit-add-trigger"})`
86
86
  box-sizing: border-box;
87
87
  display: inline-flex;
88
88
  align-items: center;
89
89
  gap: 6px;
90
- height: ${Ae}px;
91
- min-height: ${Ae}px;
90
+ height: ${Be}px;
91
+ min-height: ${Be}px;
92
92
  padding: 0 12px;
93
93
  border: 1px dashed ${e=>e.$color};
94
94
  border-radius: 4px;
@@ -104,13 +104,13 @@ import{jsxs as ce,jsx as P,Fragment as or}from"react/jsx-runtime";import*as l fr
104
104
  border-style: solid;
105
105
  opacity: 0.9;
106
106
  }
107
- `,ca=ue.span.attrs({className:"sensitive-edit-add-input-wrap"})`
107
+ `,ua=ce.span.attrs({className:"sensitive-edit-add-input-wrap"})`
108
108
  box-sizing: border-box;
109
109
  display: inline-flex;
110
110
  align-items: center;
111
111
 
112
- height: ${Ae}px;
113
- min-height: ${Ae}px;
112
+ height: ${Be}px;
113
+ min-height: ${Be}px;
114
114
  padding: 0 8px 0 12px;
115
115
  border: 1px solid ${e=>e.$focused?e.$color:"#E5E7EB"};
116
116
  border-radius: 4px;
@@ -131,14 +131,14 @@ import{jsxs as ce,jsx as P,Fragment as or}from"react/jsx-runtime";import*as l fr
131
131
  .sensitive-edit-add-input::placeholder {
132
132
  color: #9ca3af;
133
133
  }
134
- `,ua=ue.div.attrs({className:"sensitive-edit-footer"})`
134
+ `,da=ce.div.attrs({className:"sensitive-edit-footer"})`
135
135
  flex-shrink: 0;
136
136
  display: flex;
137
137
  justify-content: flex-end;
138
138
  gap: 10px;
139
139
  padding: 16px 20px;
140
140
 
141
- `,da=ue.div.attrs({className:"sensitive-upload-modal-alert"})`
141
+ `,pa=ce.div.attrs({className:"sensitive-upload-modal-alert"})`
142
142
  display: flex;
143
143
  align-items: center;
144
144
  justify-content: space-between;
@@ -149,7 +149,7 @@ import{jsxs as ce,jsx as P,Fragment as or}from"react/jsx-runtime";import*as l fr
149
149
  border-radius: 6px;
150
150
  font-size: 14px;
151
151
  color: ${({theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.text)??"#1f2937"}};
152
- `,pa=ue.div.attrs({className:"sensitive-upload-modal-dragger-wrap"})`
152
+ `,ma=ce.div.attrs({className:"sensitive-upload-modal-dragger-wrap"})`
153
153
  .ant-upload-drag {
154
154
  border-radius: 8px;
155
155
  border: 1px dashed #d1d5db;
@@ -159,25 +159,25 @@ import{jsxs as ce,jsx as P,Fragment as or}from"react/jsx-runtime";import*as l fr
159
159
  border-color: #1d70f5;
160
160
  background: #f0f7ff;
161
161
  }
162
- `,ma=({words:e,onWordsChange:t,onSave:n,onCancel:a,styles:o,onDownloadTemplate:r,onImportFile:s})=>{var B;const{messages:i}=qe(),[u,d]=me(""),[p,g]=me(!1),[b,y]=me(""),c=je(null),[m,f]=me(!1),[v,F]=me([]),[x,w]=me(!1),h=((B=o==null?void 0:o.theme)==null?void 0:B.colors)||it.colors||{},I=h.tagColor??"#1d70f5",A=h.tagAddColor??"#1d70f5",O=h.tagBackground??"#ebf6ff",z="none";ot(()=>{p&&(y(""),setTimeout(()=>{var $;return($=c.current)==null?void 0:$.focus()},0))},[p]);const S=pe(()=>{const $=b.trim();if($){if($.length>Se){ae.warning(ke(i.editor.maxLengthWarning,{max:String(Se)}));return}if(e.includes($)){ae.warning(i.editor.duplicateWarning);return}t([...e,$])}y(""),g(!1)},[b,e,t,i]),re=pe($=>{t(e.filter(T=>T!==$))},[e,t]),oe=Me(()=>{const $=u.trim().toLowerCase();return $?e.filter(T=>T.toLowerCase().includes($)):e},[e,u]),J=pe(()=>{F([]),f(!0)},[]),Y=pe($=>{r?r($):ae.info(i.editor.configTemplateHint)},[r,i]),K={items:[{key:"csv",label:i.editor.formatCsv},{key:"txt",label:i.editor.formatTxt}],onClick:({key:$})=>Y($)},V=pe($=>{const T=$.replace(/\r\n/g,`
162
+ `,fa=({words:e,onWordsChange:t,onSave:n,onCancel:a,styles:o,onDownloadTemplate:r,onImportFile:s})=>{var T;const{messages:i}=qe(),[u,d]=me(""),[p,g]=me(!1),[b,y]=me(""),c=je(null),[m,f]=me(!1),[v,w]=me([]),[x,$]=me(!1),h=((T=o==null?void 0:o.theme)==null?void 0:T.colors)||it.colors||{},B=h.tagColor??"#1d70f5",A=h.tagAddColor??"#1d70f5",L=h.tagBackground??"#ebf6ff",W="none";ot(()=>{p&&(y(""),setTimeout(()=>{var F;return(F=c.current)==null?void 0:F.focus()},0))},[p]);const S=pe(()=>{const F=b.trim();if(F){if(F.length>De){ne.warning(Le(i.editor.maxLengthWarning,{max:String(De)}));return}if(e.includes(F)){ne.warning(i.editor.duplicateWarning);return}t([...e,F])}y(""),g(!1)},[b,e,t,i]),te=pe(F=>{t(e.filter(O=>O!==F))},[e,t]),ae=Me(()=>{const F=u.trim().toLowerCase();return F?e.filter(O=>O.toLowerCase().includes(F)):e},[e,u]),K=pe(()=>{w([]),f(!0)},[]),J=pe(F=>{r?r(F):ne.info(i.editor.configTemplateHint)},[r,i]),G={items:[{key:"csv",label:i.editor.formatCsv},{key:"txt",label:i.editor.formatTxt}],onClick:({key:F})=>J(F)},q=pe(F=>{const O=F.replace(/\r\n/g,`
163
163
  `).replace(/\r/g,`
164
- `).split(/[\n,\t]/).map(k=>k.trim()).filter(Boolean),q=new Set,E=[];for(const k of T){const j=k.length>Se?k.slice(0,Se):k;q.has(j)||(q.add(j),E.push(j))}return E},[]),H=pe(async()=>{var q;const $=(q=v[0])==null?void 0:q.originFileObj;if(!$){ae.warning(i.editor.selectFileWarning);return}if(s){w(!0);try{await s($),f(!1),F([])}catch{ae.error(i.editor.importFailRetry)}finally{w(!1)}return}const T=new FileReader;T.onload=()=>{try{const E=T.result||"",k=V(E),j=Array.from(new Set([...e,...k]));t(j),ae.success(ke(i.editor.importCountSuccess,{count:String(k.length)})),f(!1),F([])}catch{ae.error(i.editor.parseFail)}},T.onerror=()=>ae.error(i.editor.readFileFail),T.readAsText($,"UTF-8")},[v,e,t,V,s,i]),Q=pe(()=>{f(!1),F([])},[]);return ce(na,{theme:o==null?void 0:o.theme,children:[ce(aa,{theme:o==null?void 0:o.theme,children:[P(be,{mode:"primary",label:i.editor.import,icon:P(Ir,{size:16}),onClick:J,styles:o}),ce("span",{style:{display:"flex",alignItems:"center",gap:6,color:h.textSecondary??"#6b7280",fontSize:12},children:[P(Ct,{size:14}),ke(i.editor.maxLengthHint,{max:String(Se)})]}),P("div",{style:{flex:1,marginLeft:"auto",minWidth:200,maxWidth:320,display:"flex",alignItems:"center",gap:8},children:P(st,{placeholder:i.editor.searchPlaceholder,value:u,allowClear:!0,onChange:$=>d($.target.value),suffix:P(Ut,{size:16,style:{color:"#9ca3af"}}),style:{flex:1}})})]}),P(oa,{theme:o==null?void 0:o.theme,children:ce(ia,{children:[oe.map($=>ce(sa,{$color:I,$bg:O,$border:z,children:[$,P("span",{className:"sensitive-edit-tag-remove",onClick:()=>re($),role:"button",tabIndex:0,onKeyDown:T=>T.key==="Enter"&&re($),children:P(Pr,{size:14})})]},$)),p?P(ca,{$focused:!0,$color:I,children:P("input",{ref:c,type:"text",className:"sensitive-edit-add-input",placeholder:i.editor.inputPlaceholder,value:b,onChange:$=>y($.target.value),onBlur:S,onKeyDown:$=>{$.key==="Enter"&&S(),$.key==="Escape"&&(y(""),g(!1))},maxLength:Se})}):ce(la,{$color:A,onClick:()=>g(!0),role:"button",tabIndex:0,onKeyDown:$=>$.key==="Enter"&&g(!0),children:[P(Ht,{size:14}),i.editor.add]})]})}),ce(ua,{theme:o==null?void 0:o.theme,children:[P(be,{mode:"default",label:i.editor.cancel,onClick:a,styles:o,style:{width:76}}),P(be,{mode:"primary",label:i.editor.save,onClick:n,styles:o,style:{width:76}})]}),ce(lt,{title:i.editor.uploadModalTitle,open:m,onCancel:Q,footer:ce("div",{style:{display:"flex",justifyContent:"flex-end",gap:20},children:[P(be,{mode:"default",label:i.editor.cancel,onClick:Q,styles:o,disabled:x,style:{width:76}}),P(be,{mode:"primary",label:i.editor.confirm,onClick:H,styles:o,disabled:x,style:{width:76}})]}),destroyOnClose:!0,width:650,children:[ce(da,{theme:o==null?void 0:o.theme,children:[ce("span",{style:{display:"flex",alignItems:"center",gap:8},children:[P(Ct,{size:18,style:{color:"#1d70f5",flexShrink:0}}),i.editor.uploadModalHint]}),P(kr,{menu:K,trigger:["click"],children:P("div",{style:{display:"inline-block"},children:P(be,{mode:"default",label:i.editor.downloadTemplate,styles:o})})})]}),P(pa,{children:ce(ra,{accept:".csv,.txt",maxCount:1,fileList:v,beforeUpload:()=>!1,onChange:({fileList:$})=>F($.slice(-1)),showUploadList:{showPreviewIcon:!1},children:[P("p",{className:"ant-upload-drag-icon",style:{marginBottom:8},children:P(Lr,{size:48,style:{color:"#1d70f5"}})}),P("p",{className:"ant-upload-text",children:i.editor.uploadDragText}),P("p",{className:"ant-upload-hint",children:i.editor.uploadDragHint})]})})]})]})},{confirm:fa}=lt,ga={pageNo:1,pageSize:999},ha=ue.div.attrs({className:"sensitive-modal-footer"})`
164
+ `).split(/[\n,\t]/).map(P=>P.trim()).filter(Boolean),X=new Set,E=[];for(const P of O){const z=P.length>De?P.slice(0,De):P;X.has(z)||(X.add(z),E.push(z))}return E},[]),H=pe(async()=>{var X;const F=(X=v[0])==null?void 0:X.originFileObj;if(!F){ne.warning(i.editor.selectFileWarning);return}if(s){$(!0);try{await s(F),f(!1),w([])}catch{ne.error(i.editor.importFailRetry)}finally{$(!1)}return}const O=new FileReader;O.onload=()=>{try{const E=O.result||"",P=q(E),z=Array.from(new Set([...e,...P]));t(z),ne.success(Le(i.editor.importCountSuccess,{count:String(P.length)})),f(!1),w([])}catch{ne.error(i.editor.parseFail)}},O.onerror=()=>ne.error(i.editor.readFileFail),O.readAsText(F,"UTF-8")},[v,e,t,q,s,i]),Z=pe(()=>{f(!1),w([])},[]);return le(aa,{theme:o==null?void 0:o.theme,children:[le(oa,{theme:o==null?void 0:o.theme,children:[I(ye,{mode:"primary",label:i.editor.import,icon:I(Pr,{size:16}),onClick:K,styles:o}),le("span",{style:{display:"flex",alignItems:"center",gap:6,color:h.textSecondary??"#6b7280",fontSize:12},children:[I(Ft,{size:14}),Le(i.editor.maxLengthHint,{max:String(De)})]}),I("div",{style:{flex:1,marginLeft:"auto",minWidth:200,maxWidth:320,display:"flex",alignItems:"center",gap:8},children:I(st,{placeholder:i.editor.searchPlaceholder,value:u,allowClear:!0,onChange:F=>d(F.target.value),suffix:I(Ht,{size:16,style:{color:"#9ca3af"}}),style:{flex:1}})})]}),I(ia,{theme:o==null?void 0:o.theme,children:le(sa,{children:[ae.map(F=>le(la,{$color:B,$bg:L,$border:W,children:[F,I("span",{className:"sensitive-edit-tag-remove",onClick:()=>te(F),role:"button",tabIndex:0,onKeyDown:O=>O.key==="Enter"&&te(F),children:I(kr,{size:14})})]},F)),p?I(ua,{$focused:!0,$color:B,children:I("input",{ref:c,type:"text",className:"sensitive-edit-add-input",placeholder:i.editor.inputPlaceholder,value:b,onChange:F=>y(F.target.value),onBlur:S,onKeyDown:F=>{F.key==="Enter"&&S(),F.key==="Escape"&&(y(""),g(!1))},maxLength:De})}):le(ca,{$color:A,onClick:()=>g(!0),role:"button",tabIndex:0,onKeyDown:F=>F.key==="Enter"&&g(!0),children:[I(qt,{size:14}),i.editor.add]})]})}),le(da,{theme:o==null?void 0:o.theme,children:[I(ye,{mode:"default",label:i.editor.cancel,onClick:a,styles:o,style:{width:76}}),I(ye,{mode:"primary",label:i.editor.save,onClick:n,styles:o,style:{width:76}})]}),le(lt,{title:i.editor.uploadModalTitle,open:m,onCancel:Z,footer:le("div",{style:{display:"flex",justifyContent:"flex-end",gap:20},children:[I(ye,{mode:"default",label:i.editor.cancel,onClick:Z,styles:o,disabled:x,style:{width:76}}),I(ye,{mode:"primary",label:i.editor.confirm,onClick:H,styles:o,disabled:x,style:{width:76}})]}),destroyOnClose:!0,width:650,children:[le(pa,{theme:o==null?void 0:o.theme,children:[le("span",{style:{display:"flex",alignItems:"center",gap:8},children:[I(Ft,{size:18,style:{color:"#1d70f5",flexShrink:0}}),i.editor.uploadModalHint]}),I(Lr,{menu:G,trigger:["click"],children:I("div",{style:{display:"inline-block"},children:I(ye,{mode:"default",label:i.editor.downloadTemplate,styles:o})})})]}),I(ma,{children:le(na,{accept:".csv,.txt",maxCount:1,fileList:v,beforeUpload:()=>!1,onChange:({fileList:F})=>w(F.slice(-1)),showUploadList:{showPreviewIcon:!1},children:[I("p",{className:"ant-upload-drag-icon",style:{marginBottom:8},children:I(Or,{size:48,style:{color:"#1d70f5"}})}),I("p",{className:"ant-upload-text",children:i.editor.uploadDragText}),I("p",{className:"ant-upload-hint",children:i.editor.uploadDragHint})]})})]})]})},{confirm:ga}=lt,ha={pageNo:1,pageSize:999},va=ce.div.attrs({className:"sensitive-modal-footer"})`
165
165
  width: 100%;
166
166
  display: flex;
167
167
  flex-direction: row;
168
168
  justify-content: flex-end;
169
169
  gap: 10px;
170
- `,va=ue.div.attrs({className:"sensitive-toolbar-search-wrap"})`
170
+ `,ba=ce.div.attrs({className:"sensitive-toolbar-search-wrap"})`
171
171
  display: flex;
172
172
  align-items: center;
173
173
  min-width: 220px;
174
- `,ba=({onAction:e})=>{const[t,n]=me(""),{messages:a}=qe(),o=pe(()=>{const r=t.trim();e("search",{keyword:r})},[t,e]);return P(va,{children:P(st,{placeholder:a.toolbar.searchPlaceholder,allowClear:!0,value:t,onChange:r=>n(r.target.value),onPressEnter:o,suffix:P(Ut,{size:16,style:{color:"#9ca3af"}})})})},ya=ue.div.attrs({className:"sensitive-tag-cell-wrap"})`
174
+ `,ya=({onAction:e})=>{const[t,n]=me(""),{messages:a}=qe(),o=pe(()=>{const r=t.trim();e("search",{keyword:r})},[t,e]);return I(ba,{children:I(st,{placeholder:a.toolbar.searchPlaceholder,allowClear:!0,value:t,onChange:r=>n(r.target.value),onPressEnter:o,suffix:I(Ht,{size:16,style:{color:"#9ca3af"}})})})},Ca=ce.div.attrs({className:"sensitive-tag-cell-wrap"})`
175
175
  display: flex;
176
176
  flex-wrap: wrap;
177
177
  gap: 12px;
178
178
  min-width: 200px;
179
179
  max-width: 100%;
180
- `,Ca=ue.span.attrs({className:"sensitive-tag-item"})`
180
+ `,Fa=ce.span.attrs({className:"sensitive-tag-item"})`
181
181
  box-sizing: border-box;
182
182
  display: inline-block;
183
183
  color: ${e=>e.$color};
@@ -190,7 +190,7 @@ import{jsxs as ce,jsx as P,Fragment as or}from"react/jsx-runtime";import*as l fr
190
190
  white-space: nowrap;
191
191
  flex-shrink: 0;
192
192
  font-family: PingFangSC, 微软雅黑, Helvetic, sans-serif;
193
- `,_e=8,Fa=ue.span.attrs({className:"sensitive-tag-more"})`
193
+ `,_e=8,wa=ce.span.attrs({className:"sensitive-tag-more"})`
194
194
  display: inline-block;
195
195
  color: ${e=>e.$color};
196
196
  font-size: 12px;
@@ -202,4 +202,4 @@ import{jsxs as ce,jsx as P,Fragment as or}from"react/jsx-runtime";import*as l fr
202
202
  &:hover {
203
203
  text-decoration: underline;
204
204
  }
205
- `;function wa({value:e,theme:t,onViewAll:n,row:a}){var m;const{messages:o}=qe(),r=(t==null?void 0:t.colors)||it.colors||{},s=r.tagColor??"#1d70f5",i=r.tagBackground??"#ebf6ff",u=Array.isArray(e)?e:[];if(u.length===0)return null;const d=((m=((a==null?void 0:a.data)||[]).find(f=>f.columnId==="count"))==null?void 0:m.value)||0,p=u.slice(0,_e),g=d>_e,b=g?d-_e:0,y=ke(o.tagCell.viewAllTitle,{total:String(d),max:String(_e)}),c=ke(o.tagCell.viewAllLink,{count:String(b)});return ce(ya,{children:[p.map((f,v)=>P(Ca,{$color:s,$bg:i,$border:"none",children:f},v)),g&&P(Fa,{$color:s,title:y,onClick:()=>n==null?void 0:n(),children:c})]})}const $a=({url:e,token:t,role:n,server:a,styles:o,eventsEmit:r,CustomComponents:s})=>{const{messages:i,locale:u,getMessage:d}=qe(),[p,g]=me({container:"ready",content:"ready"}),b=je(null),[y,c]=me(),[m]=Ke.useForm(),[f,v]=me(!1),[F,x]=me(""),[w,h]=me({active:!1,libraryId:null,libraryName:"",words:[]}),I=Me(()=>a||Jn({url:e,token:t,role:n,getMessage:d}),[a,e,t,n,d]),{getLibraryList:A,deleteLibrary:O,createLibrary:z,updateLibrary:S,downloadTemplate:re,importWords:oe,getWords:J,getLibraryData:Y}=I,K=pe(D=>{const C=(D==null?void 0:D.data)??[],M=C.find(ge=>ge.columnId==="name"),_=C.find(ge=>ge.columnId==="sensitiveWords"),X=(M==null?void 0:M.value)??"",W=Array.isArray(_==null?void 0:_.value)?[..._.value]:[];return{name:X,words:W}},[]),V=pe(async D=>{const{id:C,name:M,words:_}=await Y(D.id);h({active:!0,libraryId:C,libraryName:M,words:_})},[K]),H=pe(()=>{h({active:!1,libraryId:null,libraryName:"",words:[]}),$(),r==null||r("sensitive_edit_closed",{})},[r]),Q=pe(async()=>{if(w.libraryId)try{await S(w.libraryId,{name:w.libraryName,words:w.words})&&(ae.success(i.message.saveSuccess),H(),g(C=>({...C,content:"loading"})),$())}catch(D){console.error("[SensitiveView] \u4FDD\u5B58\u654F\u611F\u8BCD\u5931\u8D25:",D)}},[w.libraryId,w.words,S,H]),B=Me(()=>Dr({theme:it,mode:"light"},o||{}),[o]);ot(()=>{g(D=>({...D,content:"loading"})),$()},[]);const $=async D=>{try{const C={...ga},M=D??F;M&&(C.name=M);const _=await A(C);if(_){const X=T(_.records);c(X||[]),g(W=>({...W,content:"ready"}))}}catch(C){console.log("[SensitiveView] getSensitiveList error:",C)}};function T(D){return(D||[]).map(C=>({id:C.id,data:[{columnId:"name",value:C.name,type:"label"},{columnId:"sensitiveWords",value:C.words,type:"customized"},{columnId:"createDate",value:C.gmtCreate,type:"date"},{columnId:"count",value:C.count,type:"text"},{columnId:"actions",value:"edit",label:i.table.actionEdit,type:"action"},{columnId:"actions",value:"delete",label:i.table.actionDelete,type:"action"}]}))}const q=u==="zh"?"zh-CN":u==="ja"?"ja-JP":"en-US",E=Me(()=>({label:i.table.label,model:null,defaultActiveId:"sensitive-table",views:[{id:"sensitive-table",label:i.table.viewLabel,type:"table",viewBehavior:"pagination",allowMultiSelect:!1,viewPageSize:10,paginationLocale:u,columns:[{title:i.table.columns.name,id:"name",type:"label"},{title:i.table.columns.sensitiveWords,id:"sensitiveWords",type:"customized",component:wa,componentProps:({value:D,row:C})=>({value:D,theme:B==null?void 0:B.theme,row:C,onViewAll:C?()=>V(C):void 0}),fallback:null},{title:i.table.columns.createDate,id:"createDate",type:"date"},{title:i.table.columns.count,id:"count",type:"text"},{title:i.table.columns.actions,id:"actions",type:"action"}],toolbar:[{type:"button",key:"create",label:i.table.toolbar.create,btnType:"primary",icon:P(Ht,{size:16})},{type:"customized",key:"search",label:i.table.toolbar.searchPlaceholder,position:"right",component:ba}]}]}),[B,V,i]),k=async()=>{try{const D=await m.validateFields();if(!D)return;const C=await z({...D,words:[]});if(C&&(b!=null&&b.current)){console.log("+++++",new Date().toLocaleString(q,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).replace(/\//g,"-"));const M={id:C,data:[{columnId:"name",value:D.name,type:"label"},{columnId:"sensitiveWords",value:[],type:"customized"},{columnId:"createDate",value:new Date().toLocaleString(q,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).replace(/\//g,"-"),type:"date"},{columnId:"count",value:0,type:"text"},{columnId:"actions",value:"edit",label:i.table.actionEdit,type:"action"},{columnId:"actions",value:"delete",label:i.table.actionDelete,type:"action"}]};ae.success(i.message.createSuccess),j("table_action_edit",{id:C},()=>{}),r==null||r("sensitive_library_created",{id:C,name:D.name})}}catch(D){console.error("[SensitiveView] \u65B0\u589E\u654F\u611F\u8BCD\u5931\u8D25:",D)}finally{v(!1),m.resetFields()}};function j(D,C,M){switch(console.log("name",D),D){case"toolbar_create":v(!0),r==null||r("sensitive_toolbar_create",C);break;case"table_action_edit":{const _=C==null?void 0:C.id,X=_&&Array.isArray(y)?y.find(W=>W.id===_):C!=null&&C.data?C:null;X&&X.data?V(X):C!=null&&C.id&&V(C),r==null||r("sensitive_table_action_edit",C);break}case"table_action_delete":{fa({title:i.deleteConfirm.title,content:i.deleteConfirm.content,okText:i.deleteConfirm.okText,cancelText:i.deleteConfirm.cancelText,async onOk(){var _;try{await O(C.id)&&(b!=null&&b.current)&&((_=b.current.appFn)==null||_.removeItem(C.id),ae.success(i.message.deleteSuccess),$(),r==null||r("sensitive_table_action_delete",C))}catch(X){console.error("[SensitiveView] \u5220\u9664\u654F\u611F\u8BCD\u5E93\u5931\u8D25",X)}}});break}case"toolbar_search_search":{const _=(C==null?void 0:C.keyword)||"";x(_),g(X=>({...X,content:"loading"})),$(_),r==null||r("sensitive_toolbar_search",C);break}default:r==null||r("sensitive_"+D,C);break}}const ne=()=>{v(!1),m.resetFields()};return P(Br,{styles:B,children:w.active?P(ma,{libraryName:w.libraryName,words:w.words,onWordsChange:D=>h(C=>({...C,words:D})),onSave:Q,onCancel:H,styles:B,onDownloadTemplate:async D=>{const C=await re(D);if(!C){ae.error(i.message.downloadTemplateFail);return}const M=URL.createObjectURL(C),_=document.createElement("a");_.href=M,_.download=`${i.downloadTemplateFilename}.${D}`,_.click(),URL.revokeObjectURL(M)},onImportFile:async D=>{if(!w.libraryId)return;const C=await oe(w.libraryId,D);if(C&&C.success!==!1){ae.success(i.message.importSuccess);const M=await J(w.libraryId);(M==null?void 0:M.words)!=null&&h(_=>({..._,words:M==null?void 0:M.words}))}else throw ae.error((C==null?void 0:C.errorMsg)||i.message.importFail),new Error("import failed")}}):ce(or,{children:[P(Ar,{dataSource:y,ref:b,eventsEmit:j,status:p,styles:B,CustomComponents:{...s},...E}),P(lt,{title:i.createModal.title,open:f,width:650,destroyOnClose:!0,onCancel:ne,footer:ce(ha,{theme:B==null?void 0:B.theme,children:[P(be,{mode:"default",label:i.createModal.cancel,onClick:ne}),P(be,{mode:"primary",label:i.createModal.confirm,onClick:k})]}),children:P(Ke,{form:m,children:P(Ke.Item,{label:null,name:"name",rules:[{required:!0,message:i.createModal.nameRequired}],children:P(st,{placeholder:i.createModal.namePlaceholder})})})})]})})},ja=e=>{const{locale:t="zh",messages:n,...a}=e;return P(ta,{locale:t,messages:n,children:P($a,{...a})})};export{Gt as SensitiveI18nContext,ta as SensitiveI18nProvider,ja as default,ea as getSensitiveMessages,ke as interpolate,qe as useSensitiveI18n};
205
+ `;function $a({value:e,theme:t,onViewAll:n,row:a}){var m;const{messages:o}=qe(),r=(t==null?void 0:t.colors)||it.colors||{},s=r.tagColor??"#1d70f5",i=r.tagBackground??"#ebf6ff",u=Array.isArray(e)?e:[];if(u.length===0)return null;const d=((m=((a==null?void 0:a.data)||[]).find(f=>f.columnId==="count"))==null?void 0:m.value)||0,p=u.slice(0,_e),g=d>_e,b=g?d-_e:0,y=Le(o.tagCell.viewAllTitle,{total:String(d),max:String(_e)}),c=Le(o.tagCell.viewAllLink,{count:String(b)});return le(Ca,{children:[p.map((f,v)=>I(Fa,{$color:s,$bg:i,$border:"none",children:f},v)),g&&I(wa,{$color:s,title:y,onClick:()=>n==null?void 0:n(),children:c})]})}const Ea=({url:e,token:t,role:n,server:a,styles:o,eventsEmit:r,CustomComponents:s})=>{const{messages:i,locale:u,getMessage:d}=qe(),[p,g]=me({container:"ready",content:"ready"}),b=je(null),[y,c]=me(),[m]=Ke.useForm(),[f,v]=me(!1),[w,x]=me(""),[$,h]=me({active:!1,libraryId:null,libraryName:"",words:[]}),B=Me(()=>a||Yn({url:e,token:t,role:n,getMessage:d}),[a,e,t,n,d]),{getLibraryList:A,deleteLibrary:L,createLibrary:W,updateLibrary:S,downloadTemplate:te,importWords:ae,getWords:K,getLibraryData:J}=B,G=pe(D=>{const C=(D==null?void 0:D.data)??[],j=C.find(ve=>ve.columnId==="name"),N=C.find(ve=>ve.columnId==="sensitiveWords"),M=(j==null?void 0:j.value)??"",fe=Array.isArray(N==null?void 0:N.value)?[...N.value]:[];return{name:M,words:fe}},[]),q=pe(async D=>{const{id:C,name:j,words:N}=await J(D.id);h({active:!0,libraryId:C,libraryName:j,words:N})},[G]),H=pe(()=>{h({active:!1,libraryId:null,libraryName:"",words:[]}),O(),r==null||r("sensitive_edit_closed",{})},[r]),Z=pe(async()=>{if($.libraryId)try{await S($.libraryId,{name:$.libraryName,words:$.words})&&(ne.success(i.message.saveSuccess),H(),g(C=>({...C,content:"loading"})),O())}catch(D){console.error("[SensitiveView] \u4FDD\u5B58\u654F\u611F\u8BCD\u5931\u8D25:",D)}},[$.libraryId,$.words,S,H]),T=Ar(),F=Me(()=>yt(yt({theme:it,mode:"light"},T||{}),o||{}),[T,o]);ot(()=>{g(D=>({...D,content:"loading"})),O()},[]);const O=async D=>{try{const C={...ha},j=D??w;j&&(C.name=j);const N=await A(C);if(N){const M=X(N.records);c(M||[]),g(fe=>({...fe,content:"ready"}))}}catch(C){console.log("[SensitiveView] getSensitiveList error:",C)}};function X(D){return(D||[]).map(C=>({id:C.id,data:[{columnId:"name",value:C.name,type:"label"},{columnId:"sensitiveWords",value:C.words,type:"customized"},{columnId:"createDate",value:C.gmtCreate,type:"date"},{columnId:"count",value:C.count,type:"text"},{columnId:"actions",value:"edit",label:i.table.actionEdit,type:"action"},{columnId:"actions",value:"delete",label:i.table.actionDelete,type:"action"}]}))}const E=u==="zh"?"zh-CN":u==="ja"?"ja-JP":"en-US",P=Me(()=>({label:i.table.label,model:null,defaultActiveId:"sensitive-table",views:[{id:"sensitive-table",label:i.table.viewLabel,type:"table",viewBehavior:"pagination",allowMultiSelect:!1,viewPageSize:10,paginationLocale:u,columns:[{title:i.table.columns.name,id:"name",type:"label"},{title:i.table.columns.sensitiveWords,id:"sensitiveWords",type:"customized",component:$a,componentProps:({value:D,row:C})=>({value:D,theme:F==null?void 0:F.theme,row:C,onViewAll:C?()=>q(C):void 0}),fallback:null},{title:i.table.columns.createDate,id:"createDate",type:"date"},{title:i.table.columns.count,id:"count",type:"text"},{title:i.table.columns.actions,id:"actions",type:"action"}],toolbar:[{type:"button",key:"create",label:i.table.toolbar.create,btnType:"primary",icon:I(qt,{size:16})},{type:"customized",key:"search",label:i.table.toolbar.searchPlaceholder,position:"right",component:ya}]}]}),[F,q,i]),z=async()=>{try{const D=await m.validateFields();if(!D)return;const C=await W({...D,words:[]});if(C&&(b!=null&&b.current)){console.log("+++++",new Date().toLocaleString(E,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).replace(/\//g,"-"));const j={id:C,data:[{columnId:"name",value:D.name,type:"label"},{columnId:"sensitiveWords",value:[],type:"customized"},{columnId:"createDate",value:new Date().toLocaleString(E,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).replace(/\//g,"-"),type:"date"},{columnId:"count",value:0,type:"text"},{columnId:"actions",value:"edit",label:i.table.actionEdit,type:"action"},{columnId:"actions",value:"delete",label:i.table.actionDelete,type:"action"}]};ne.success(i.message.createSuccess),re("table_action_edit",{id:C},()=>{}),r==null||r("sensitive_library_created",{id:C,name:D.name})}}catch(D){console.error("[SensitiveView] \u65B0\u589E\u654F\u611F\u8BCD\u5931\u8D25:",D)}finally{v(!1),m.resetFields()}};function re(D,C,j){switch(console.log("name",D),D){case"toolbar_create":v(!0),r==null||r("sensitive_toolbar_create",C);break;case"table_action_edit":{const N=C==null?void 0:C.id,M=N&&Array.isArray(y)?y.find(fe=>fe.id===N):C!=null&&C.data?C:null;M&&M.data?q(M):C!=null&&C.id&&q(C),r==null||r("sensitive_table_action_edit",C);break}case"table_action_delete":{ga({title:i.deleteConfirm.title,content:i.deleteConfirm.content,okText:i.deleteConfirm.okText,cancelText:i.deleteConfirm.cancelText,async onOk(){var N;try{await L(C.id)&&(b!=null&&b.current)&&((N=b.current.appFn)==null||N.removeItem(C.id),ne.success(i.message.deleteSuccess),O(),r==null||r("sensitive_table_action_delete",C))}catch(M){console.error("[SensitiveView] \u5220\u9664\u654F\u611F\u8BCD\u5E93\u5931\u8D25",M)}}});break}case"toolbar_search_search":{const N=(C==null?void 0:C.keyword)||"";x(N),g(M=>({...M,content:"loading"})),O(N),r==null||r("sensitive_toolbar_search",C);break}default:r==null||r("sensitive_"+D,C);break}}const ue=()=>{v(!1),m.resetFields()};return I(Ir,{styles:F,children:$.active?I(fa,{libraryName:$.libraryName,words:$.words,onWordsChange:D=>h(C=>({...C,words:D})),onSave:Z,onCancel:H,styles:F,onDownloadTemplate:async D=>{const C=await te(D);if(!C){ne.error(i.message.downloadTemplateFail);return}const j=URL.createObjectURL(C),N=document.createElement("a");N.href=j,N.download=`${i.downloadTemplateFilename}.${D}`,N.click(),URL.revokeObjectURL(j)},onImportFile:async D=>{if(!$.libraryId)return;const C=await ae($.libraryId,D);if(C&&C.success!==!1){ne.success(i.message.importSuccess);const j=await K($.libraryId);(j==null?void 0:j.words)!=null&&h(N=>({...N,words:j==null?void 0:j.words}))}else throw ne.error((C==null?void 0:C.errorMsg)||i.message.importFail),new Error("import failed")}}):le(ir,{children:[I(Br,{dataSource:y,ref:b,eventsEmit:re,status:p,styles:F,CustomComponents:{...s},...P}),I(lt,{title:i.createModal.title,open:f,width:650,destroyOnClose:!0,onCancel:ue,footer:le(va,{theme:F==null?void 0:F.theme,children:[I(ye,{mode:"default",label:i.createModal.cancel,onClick:ue}),I(ye,{mode:"primary",label:i.createModal.confirm,onClick:z})]}),children:I(Ke,{form:m,children:I(Ke.Item,{label:null,name:"name",rules:[{required:!0,message:i.createModal.nameRequired}],children:I(st,{placeholder:i.createModal.namePlaceholder})})})})]})})},Ra=e=>{const{locale:t="zh",messages:n,...a}=e;return I(ra,{locale:t,messages:n,children:I(Ea,{...a})})};export{Kt as SensitiveI18nContext,ra as SensitiveI18nProvider,Ra as default,ta as getSensitiveMessages,Le as interpolate,qe as useSensitiveI18n};