@gientech/modual 2.2.2 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/sensitive.js CHANGED
@@ -1,4 +1,4 @@
1
- import{jsxs as se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c from"react";import we,{useRef as je,useEffect as ot,Component as At,useState as me,useCallback as pe,useMemo as _e}from"react";import{c as Bt,Q as ir,ay as sr,a6 as Ee,U as tt,L as It,_ as ge,j as Q,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 We,az as Nt,as as cr,av as ur,at as dr,aP as pr,I as Le,O as mr,aQ as be,aR as oe,B as fe,aS as Tt,aT as Mt,aU as _t,V as J,aV as ae,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 Ut,b0 as br,b1 as Fr,am as Cr,o as ht,J as vt,aq as bt,u as yr,b2 as wr,l as $r,ag as xr,aK as Sr,w as Er,d as le,f as it,H as st,F as Ke,x as Dr}from"./assets/index-DHK_n74G.js";import{z as Ar}from"./assets/index-Dj91ulxd.js";import{Y as ve,U as Br,N as Ir}from"./assets/index-DPA1HCWQ.js";import{s as te,M as lt}from"./assets/index-iOuQJ8vu.js";import{flushSync as Ft}from"react-dom";import{S as Wt}from"./assets/search-CD5YKija.js";import{P as Ht}from"./assets/plus-BICgMvz9.js";import{X as Pr}from"./assets/x-DWGzNb9c.js";import{D as kr}from"./assets/index-BIEKgWu0.js";/* empty css */import"./assets/LeftOutlined-DZMeGbKk.js";/**
1
+ import{jsxs as ce,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c from"react";import we,{useRef as je,useEffect as ot,Component as At,useState as me,useCallback as pe,useMemo as _e}from"react";import{c as Bt,Q as ir,ay as sr,a6 as Ee,U as tt,L as It,_ as ge,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 be,aR as se,B as fe,aS as Tt,aT as Mt,aU as _t,V as Q,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 Cr,am as yr,o as ht,J as vt,aq as bt,u as Fr,b2 as wr,l as $r,ag as xr,aK as Sr,w as Er,d as ue,f as it,H as st,F as Ke,x as Dr}from"./assets/index-DHK_n74G.js";import{z as Ar}from"./assets/index-Dj91ulxd.js";import{Y as ve,N as Br}from"./assets/index-DPA1HCWQ.js";import{s as ne,M as lt}from"./assets/index-iOuQJ8vu.js";import{flushSync as Ct}from"react-dom";import{C as Ir}from"./assets/circle-plus-B73z_SUN.js";import{S as Ut}from"./assets/search-CD5YKija.js";import{X as Pr}from"./assets/x-DWGzNb9c.js";import{P as Ht}from"./assets/plus-BICgMvz9.js";import{D as kr}from"./assets/index-BIEKgWu0.js";/* empty css */import"./assets/LeftOutlined-DZMeGbKk.js";/**
2
2
  * @license lucide-react v0.456.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -8,7 +8,7 @@ import{jsxs as se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c fr
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},yt=0,Tr=sr();function Mr(){var e;return Tr?(e=yt,yt+=1):e="TEST_OR_SSR",e}const _r=(function(e){var t=c.useState(),n=ir(t,2),a=n[0],o=n[1];return c.useEffect(function(){o("rc_progress_".concat(Mr()))},[]),e||a});var wt=function(t){var n=t.bg,a=t.children;return c.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=c.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,m=e.size,f=e.gapDegree,l=a&&Ee(a)==="object",p=l?"#FFF":void 0,h=m/2,b=c.createElement("circle",{className:"".concat(n,"-circle-path"),r,cx:h,cy:h,stroke:p,strokeLinecap:u,strokeWidth:d,opacity:i===0?0:1,style:s,ref:t});if(!l)return b;var C="".concat(o,"-conic"),y=f?"".concat(180+f/2,"deg"):"0deg",w=$t(a,(360-f)/360),S=$t(a,1),$="conic-gradient(from ".concat(y,", ").concat(w.join(", "),")"),g="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(S.join(", "),")");return c.createElement(c.Fragment,null,c.createElement("mask",{id:C},b),c.createElement("foreignObject",{x:0,y:0,width:m,height:m,mask:"url(#".concat(C,")")},c.createElement(wt,{bg:g},c.createElement(wt,{bg:$}))))}),Ie=100,Je=function(t,n,a,o,r,s,i,u,d,m){var f=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,l=a/100*360*((360-s)/360),p=s===0?0:{bottom:0,top:180,left:90,right:-90}[i],h=(100-o)/100*n;d==="round"&&o!==100&&(h+=m/2,h>=n&&(h=n-.01));var b=Ie/2;return{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:h+f,transform:"rotate(".concat(r+l+p,"deg)"),transformOrigin:"".concat(b,"px ").concat(b,"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 xt(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,m=n.gapPosition,f=n.trailColor,l=n.strokeLinecap,p=n.style,h=n.className,b=n.strokeColor,C=n.percent,y=It(n,Rr),w=Ie/2,S=_r(a),$="".concat(S,"-gradient"),g=w-s/2,A=Math.PI*2*g,B=d>0?90+d/2:-90,O=A*((360-d)/360),R=Ee(r)==="object"?r:{count:r,gap:2},D=R.count,re=R.gap,ne=xt(C),G=xt(b),H=G.find(function(z){return z&&Ee(z)==="object"}),U=H&&Ee(H)==="object",ee=U?"butt":l,M=Je(A,O,0,100,B,d,m,f,ee,s),K=Nr(),F=function(){var q=0;return ne.map(function(x,k){var E=G[k]||G[G.length-1],v=Je(A,O,q,x,B,d,m,E,ee,s);return q+=x,c.createElement(jr,{key:k,color:E,ptg:x,radius:g,prefixCls:o,gradientId:$,style:v,strokeLinecap:ee,strokeWidth:s,gapDegree:d,ref:function(L){K[k]=L},size:Ie})}).reverse()},T=function(){var q=Math.round(D*(ne[0]/100)),x=100/D,k=0;return new Array(D).fill(null).map(function(E,v){var _=v<=q-1?G[0]:f,L=_&&Ee(_)==="object"?"url(#".concat($,")"):void 0,X=Je(A,O,k,x,B,d,m,_,"butt",s,re);return k+=(O-X.strokeDashoffset+re)*100/O,c.createElement("circle",{key:v,className:"".concat(o,"-circle-path"),r:g,cx:w,cy:w,stroke:L,strokeWidth:s,opacity:1,style:X,ref:function(ue){K[v]=ue}})})};return c.createElement("svg",ge({className:Q("".concat(o,"-circle"),h),viewBox:"0 0 ".concat(Ie," ").concat(Ie),style:p,id:a,role:"presentation"},y),!D&&c.createElement("circle",{className:"".concat(o,"-circle-trail"),r:g,cx:w,cy:w,stroke:f,strokeLinecap:ee,strokeWidth:i||s,style:M}),D?T():F())};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)]},Wr=({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,m=n.strokeWidth;typeof e=="string"||typeof e>"u"?(i=e==="small"?2:14,u=m??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:m=s,steps:f}=e,[l,p]=He(m,"circle");let{strokeWidth:h}=e;h===void 0&&(h=Math.max(qr(l),6));const b={width:l,height:p,fontSize:l*.15+6},C=c.useMemo(()=>{if(r||r===0)return r;if(i==="dashboard")return 75},[r,i]),y=Ur(e),w=o||i==="dashboard"&&"bottom"||void 0,S=Object.prototype.toString.call(e.strokeColor)==="[object Object]",$=Wr({success:d,strokeColor:e.strokeColor}),g=Q(`${t}-inner`,{[`${t}-circle-gradient`]:S}),A=c.createElement(zr,{steps:f,percent:f?y[1]:y,strokeWidth:h,trailWidth:h,strokeColor:f?$[1]:$,strokeLinecap:a,trailColor:n,prefixCls:t,gapDegree:C,gapPosition:w}),B=l<=20,O=c.createElement("div",{className:g,style:b},A,!B&&u);return B?c.createElement(Pt,{title:u},O):O},ze="--progress-line-stroke-color",qt="--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}})},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: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}}})}},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:m,success:f}=e,{align:l,type:p}=m,h=s&&typeof s!="string"?tn(s,n):{[ze]:s,background:s},b=i==="square"||i==="butt"?0:void 0,C=o??[-1,r||(o==="small"?6:8)],[y,w]=He(C,"line",{strokeWidth:r}),S={backgroundColor:d||void 0,borderRadius:b},$=Object.assign(Object.assign({width:`${Fe(a)}%`,height:w,borderRadius:b},h),{[qt]:Fe(a)/100}),g=Re(e),A={width:`${Fe(g)}%`,height:w,borderRadius:b,backgroundColor:f==null?void 0:f.strokeColor},B={width:y<0?"100%":y},O=c.createElement("div",{className:`${t}-inner`,style:S},c.createElement("div",{className:Q(`${t}-bg`,`${t}-bg-${p}`),style:$},p==="inner"&&u),g!==void 0&&c.createElement("div",{className:`${t}-success-bg`,style:A})),R=p==="outer"&&l==="start",D=p==="outer"&&l==="end";return p==="outer"&&l==="center"?c.createElement("div",{className:`${t}-layout-bottom`},O,u):c.createElement("div",{className:`${t}-outer`,style:B},R&&u,O,D&&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,m=a(n*(o/100)),l=t??[t==="small"?2:14,r],[p,h]=He(l,"step",{steps:n,strokeWidth:r}),b=p/n,C=Array.from({length:n});for(let y=0;y<n;y++){const w=Array.isArray(s)?s[y]:s;C[y]=c.createElement("div",{key:y,className:Q(`${u}-steps-item`,{[`${u}-steps-item-active`]:y<=m-1}),style:{backgroundColor:y<=m-1?w:i,width:b,height:h}})}return c.createElement("div",{className:`${u}-steps-outer`},C,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=c.forwardRef((e,t)=>{const{prefixCls:n,className:a,rootClassName:o,steps:r,strokeColor:s,percent:i=0,size:u="default",showInfo:d=!0,type:m="line",status:f,format:l,style:p,percentPosition:h={}}=e,b=an(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:C="end",type:y="outer"}=h,w=Array.isArray(s)?s[0]:s,S=typeof s=="string"||Array.isArray(s)?s:void 0,$=c.useMemo(()=>{if(w){const F=typeof w=="string"?w:Object.values(w)[0];return new lr(F).isLight()}return!1},[s]),g=c.useMemo(()=>{var F,T;const z=Re(e);return Number.parseInt(z!==void 0?(F=z??0)===null||F===void 0?void 0:F.toString():(T=i??0)===null||T===void 0?void 0:T.toString(),10)},[i,e.success,e.successPercent]),A=c.useMemo(()=>!on.includes(f)&&g>=100?"success":f||"normal",[f,g]),{getPrefixCls:B,direction:O,progress:R}=c.useContext(We),D=B("progress",n),[re,ne,G]=Zr(D),H=m==="line",U=H&&!r,ee=c.useMemo(()=>{if(!d)return null;const F=Re(e);let T;const z=l||(x=>`${x}%`),q=H&&$&&y==="inner";return y==="inner"||l||A!=="exception"&&A!=="success"?T=z(Fe(i),Fe(F)):A==="exception"?T=H?c.createElement(cr,null):c.createElement(ur,null):A==="success"&&(T=H?c.createElement(dr,null):c.createElement(pr,null)),c.createElement("span",{className:Q(`${D}-text`,{[`${D}-text-bright`]:q,[`${D}-text-${C}`]:U,[`${D}-text-${y}`]:U}),title:typeof T=="string"?T:void 0},T)},[d,i,g,A,m,D,l]);let M;m==="line"?M=r?c.createElement(nn,Object.assign({},e,{strokeColor:S,prefixCls:D,steps:typeof r=="object"?r.count:r}),ee):c.createElement(rn,Object.assign({},e,{strokeColor:w,prefixCls:D,direction:O,percentPosition:{align:C,type:y}}),ee):(m==="circle"||m==="dashboard")&&(M=c.createElement(Xr,Object.assign({},e,{strokeColor:w,prefixCls:D,progressStatus:A}),ee));const K=Q(D,`${D}-status-${A}`,{[`${D}-${m==="dashboard"&&"circle"||m}`]:m!=="line",[`${D}-inline-circle`]:m==="circle"&&He(u,"circle")[0]<=20,[`${D}-line`]:U,[`${D}-line-align-${C}`]:U,[`${D}-line-position-${y}`]:U,[`${D}-steps`]:r,[`${D}-show-info`]:d,[`${D}-${u}`]:typeof u=="string",[`${D}-rtl`]:O==="rtl"},R==null?void 0:R.className,a,o,ne,G);return re(c.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},R==null?void 0:R.style),p),className:K,role:"progressbar","aria-valuenow":g,"aria-valuemin":0,"aria-valuemax":100},Nt(b,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),M))});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 c.createElement(Le,ge({},t,{ref:n,icon:ln}))},un=c.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(),m=[d];return(d===".jpg"||d===".jpeg")&&(m=[".jpg",".jpeg"]),m.some(function(f){return u.endsWith(f)})}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 Et(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),Et(t)):e.onSuccess(Et(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=be(oe().mark(function t(n,a){var o,r,s,i,u,d,m,f;return oe().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:d=function(){return d=be(oe().mark(function b(C){return oe().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.abrupt("return",new Promise(function(S){C.file(function($){a($)?(C.fullPath&&!$.webkitRelativePath&&(Object.defineProperties($,{webkitRelativePath:{writable:!0}}),$.webkitRelativePath=C.fullPath.replace(/^\//,""),Object.defineProperties($,{webkitRelativePath:{writable:!1}})),S($)):S(null)})}));case 1:case"end":return w.stop()}},b)})),d.apply(this,arguments)},u=function(b){return d.apply(this,arguments)},i=function(){return i=be(oe().mark(function b(C){var y,w,S,$,g;return oe().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:y=C.createReader(),w=[];case 2:return B.next=5,new Promise(function(O){y.readEntries(O,function(){return O([])})});case 5:if(S=B.sent,$=S.length,$){B.next=9;break}return B.abrupt("break",12);case 9:for(g=0;g<$;g++)w.push(S[g]);B.next=2;break;case 12:return B.abrupt("return",w);case 13:case"end":return B.stop()}},b)})),i.apply(this,arguments)},s=function(b){return i.apply(this,arguments)},o=[],r=[],n.forEach(function(h){return r.push(h.webkitGetAsEntry())}),m=(function(){var h=be(oe().mark(function b(C,y){var w,S;return oe().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(C){g.next=2;break}return g.abrupt("return");case 2:if(C.path=y||"",!C.isFile){g.next=10;break}return g.next=6,u(C);case 6:w=g.sent,w&&o.push(w),g.next=15;break;case 10:if(!C.isDirectory){g.next=15;break}return g.next=13,s(C);case 13:S=g.sent,r.push.apply(r,fe(S));case 15:case"end":return g.stop()}},b)}));return function(C,y){return h.apply(this,arguments)}})(),f=0;case 9:if(!(f<r.length)){p.next=15;break}return p.next=12,m(r[f]);case 12:f++,p.next=9;break;case 15:return p.abrupt("return",o);case 16:case"end":return p.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=Mt(n);function n(){var a;_t(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)),J(ae(a),"state",{uid:Ze()}),J(ae(a),"reqs",{}),J(ae(a),"fileInput",void 0),J(ae(a),"_isMounted",void 0),J(ae(a),"onChange",function(i){var u=a.props,d=u.accept,m=u.directory,f=i.target.files,l=fe(f).filter(function(p){return!m||Ye(p,d)});a.uploadFiles(l),a.reset()}),J(ae(a),"onClick",function(i){var u=a.fileInput;if(u){var d=i.target,m=a.props.onClick;if(d&&d.tagName==="BUTTON"){var f=u.parentNode;f.focus(),d.blur()}u.click(),m&&m(i)}}),J(ae(a),"onKeyDown",function(i){i.key==="Enter"&&a.onClick(i)}),J(ae(a),"onDataTransferFiles",(function(){var i=be(oe().mark(function u(d,m){var f,l,p,h,b,C,y;return oe().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(f=a.props,l=f.multiple,p=f.accept,h=f.directory,b=fe(d.items||[]),C=fe(d.files||[]),(C.length>0||b.some(function($){return $.kind==="file"}))&&(m==null||m()),!h){S.next=11;break}return S.next=7,pn(Array.prototype.slice.call(b),function($){return Ye($,a.props.accept)});case 7:C=S.sent,a.uploadFiles(C),S.next=14;break;case 11:y=fe(C).filter(function($){return Ye($,p)}),l===!1&&(y=C.slice(0,1)),a.uploadFiles(y);case 14:case"end":return S.stop()}},u)}));return function(u,d){return i.apply(this,arguments)}})()),J(ae(a),"onFilePaste",(function(){var i=be(oe().mark(function u(d){var m,f;return oe().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(m=a.props.pastable,m){p.next=3;break}return p.abrupt("return");case 3:if(d.type!=="paste"){p.next=6;break}return f=d.clipboardData,p.abrupt("return",a.onDataTransferFiles(f,function(){d.preventDefault()}));case 6:case"end":return p.stop()}},u)}));return function(u){return i.apply(this,arguments)}})()),J(ae(a),"onFileDragOver",function(i){i.preventDefault()}),J(ae(a),"onFileDrop",(function(){var i=be(oe().mark(function u(d){var m;return oe().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(d.preventDefault(),d.type!=="drop"){l.next=4;break}return m=d.dataTransfer,l.abrupt("return",a.onDataTransferFiles(m));case 4:case"end":return l.stop()}},u)}));return function(u){return i.apply(this,arguments)}})()),J(ae(a),"uploadFiles",function(i){var u=fe(i),d=u.map(function(m){return m.uid=Ze(),a.processFile(m,u)});Promise.all(d).then(function(m){var f=a.props.onBatchStart;f==null||f(m.map(function(l){var p=l.origin,h=l.parsedFile;return{file:p,parsedFile:h}})),m.filter(function(l){return l.parsedFile!==null}).forEach(function(l){a.post(l)})})}),J(ae(a),"processFile",(function(){var i=be(oe().mark(function u(d,m){var f,l,p,h,b,C,y,w,S;return oe().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(f=a.props.beforeUpload,l=d,!f){g.next=14;break}return g.prev=3,g.next=6,f(d,m);case 6:l=g.sent,g.next=12;break;case 9:g.prev=9,g.t0=g.catch(3),l=!1;case 12:if(l!==!1){g.next=14;break}return g.abrupt("return",{origin:d,parsedFile:null,action:null,data:null});case 14:if(p=a.props.action,typeof p!="function"){g.next=21;break}return g.next=18,p(d);case 18:h=g.sent,g.next=22;break;case 21:h=p;case 22:if(b=a.props.data,typeof b!="function"){g.next=29;break}return g.next=26,b(d);case 26:C=g.sent,g.next=30;break;case 29:C=b;case 30:return y=(Ee(l)==="object"||typeof l=="string")&&l?l:d,y instanceof File?w=y:w=new File([y],d.name,{type:d.type}),S=w,S.uid=d.uid,g.abrupt("return",{origin:d,data:C,parsedFile:S,action:h});case 35:case"end":return g.stop()}},u,null,[[3,9]])}));return function(u,d){return i.apply(this,arguments)}})()),J(ae(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 m=this.props,f=m.onStart,l=m.customRequest,p=m.name,h=m.headers,b=m.withCredentials,C=m.method,y=i.uid,w=l||Dt,S={action:u,filename:p,data:s,file:d,headers:h,withCredentials:b,method:C||"post",onProgress:function(g){var A=r.props.onProgress;A==null||A(g,d)},onSuccess:function(g,A){var B=r.props.onSuccess;B==null||B(g,d,A),delete r.reqs[y]},onError:function(g,A){var B=r.props.onError;B==null||B(g,A,d),delete r.reqs[y]}};f(i),this.reqs[y]=w(S,{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,m=o.disabled,f=o.id,l=o.name,p=o.style,h=o.styles,b=h===void 0?{}:h,C=o.multiple,y=o.accept,w=o.capture,S=o.children,$=o.directory,g=o.folder,A=o.openFileDialogOnClick,B=o.onMouseEnter,O=o.onMouseLeave,R=o.hasControlInside,D=It(o,gn),re=Q(J(J(J({},s,!0),"".concat(s,"-disabled"),m),i,i)),ne=$||g?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},G=m?{}:{onClick:A?this.onClick:function(){},onKeyDown:A?this.onKeyDown:function(){},onMouseEnter:B,onMouseLeave:O,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:R?void 0:"0"};return we.createElement(r,ge({},G,{className:re,role:R?void 0:"button",style:p}),we.createElement("input",ge({},fr(D,{aria:!0,data:!0}),{id:f,name:l,disabled:m,type:"file",ref:this.saveFileInput,onClick:function(U){return U.stopPropagation()},key:this.state.uid,style:tt({display:"none"},b.input),className:d.input,accept:y},ne,{multiple:C,onChange:this.onChange},w!=null?{capture:w}:{})),S)}}]),n})(At);function Qe(){}var at=(function(e){Tt(n,e);var t=Mt(n);function n(){var a;_t(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)),J(ae(a),"uploader",void 0),J(ae(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 we.createElement(hn,ge({},this.props,{ref:this.saveUploader}))}}]),n})(At);J(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 yt=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 Mr(){var e;return Tr?(e=Ft,Ft+=1):e="TEST_OR_SSR",e}const _r=(function(e){var t=c.useState(),n=ir(t,2),a=n[0],o=n[1];return c.useEffect(function(){o("rc_progress_".concat(Mr()))},[]),e||a});var wt=function(t){var n=t.bg,a=t.children;return c.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=c.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,f=e.gapDegree,b=a&&Ee(a)==="object",l=b?"#FFF":void 0,m=p/2,h=c.createElement("circle",{className:"".concat(n,"-circle-path"),r,cx:m,cy:m,stroke:l,strokeLinecap:u,strokeWidth:d,opacity:i===0?0:1,style:s,ref:t});if(!b)return h;var v="".concat(o,"-conic"),y=f?"".concat(180+f/2,"deg"):"0deg",F=$t(a,(360-f)/360),S=$t(a,1),w="conic-gradient(from ".concat(y,", ").concat(F.join(", "),")"),g="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(S.join(", "),")");return c.createElement(c.Fragment,null,c.createElement("mask",{id:v},h),c.createElement("foreignObject",{x:0,y:0,width:p,height:p,mask:"url(#".concat(v,")")},c.createElement(wt,{bg:g},c.createElement(wt,{bg:w}))))}),Ie=100,Je=function(t,n,a,o,r,s,i,u,d,p){var f=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,b=a/100*360*((360-s)/360),l=s===0?0:{bottom:0,top:180,left:90,right:-90}[i],m=(100-o)/100*n;d==="round"&&o!==100&&(m+=p/2,m>=n&&(m=n-.01));var h=Ie/2;return{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:m+f,transform:"rotate(".concat(r+b+l,"deg)"),transformOrigin:"".concat(h,"px ").concat(h,"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 xt(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,f=n.trailColor,b=n.strokeLinecap,l=n.style,m=n.className,h=n.strokeColor,v=n.percent,y=It(n,Rr),F=Ie/2,S=_r(a),w="".concat(S,"-gradient"),g=F-s/2,B=Math.PI*2*g,A=d>0?90+d/2:-90,T=B*((360-d)/360),W=Ee(r)==="object"?r:{count:r,gap:2},E=W.count,re=W.gap,ae=xt(v),Z=xt(h),K=Z.find(function(M){return M&&Ee(M)==="object"}),H=K&&Ee(K)==="object",X=H?"butt":b,J=Je(B,T,0,100,A,d,p,f,X,s),z=Nr(),L=function(){var V=0;return ae.map(function(x,P){var j=Z[P]||Z[Z.length-1],D=Je(B,T,V,x,A,d,p,j,X,s);return V+=x,c.createElement(jr,{key:P,color:j,ptg:x,radius:g,prefixCls:o,gradientId:w,style:D,strokeLinecap:X,strokeWidth:s,gapDegree:d,ref:function(O){z[P]=O},size:Ie})}).reverse()},$=function(){var V=Math.round(E*(ae[0]/100)),x=100/E,P=0;return new Array(E).fill(null).map(function(j,D){var C=D<=V-1?Z[0]:f,O=C&&Ee(C)==="object"?"url(#".concat(w,")"):void 0,N=Je(B,T,P,x,A,d,p,C,"butt",s,re);return P+=(T-N.strokeDashoffset+re)*100/T,c.createElement("circle",{key:D,className:"".concat(o,"-circle-path"),r:g,cx:F,cy:F,stroke:O,strokeWidth:s,opacity:1,style:N,ref:function(oe){z[D]=oe}})})};return c.createElement("svg",ge({className:te("".concat(o,"-circle"),m),viewBox:"0 0 ".concat(Ie," ").concat(Ie),style:l,id:a,role:"presentation"},y),!E&&c.createElement("circle",{className:"".concat(o,"-circle-trail"),r:g,cx:F,cy:F,stroke:f,strokeLinecap:X,strokeWidth:i||s,style:J}),E?$():L())};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:f}=e,[b,l]=He(p,"circle");let{strokeWidth:m}=e;m===void 0&&(m=Math.max(qr(b),6));const h={width:b,height:l,fontSize:b*.15+6},v=c.useMemo(()=>{if(r||r===0)return r;if(i==="dashboard")return 75},[r,i]),y=Wr(e),F=o||i==="dashboard"&&"bottom"||void 0,S=Object.prototype.toString.call(e.strokeColor)==="[object Object]",w=Ur({success:d,strokeColor:e.strokeColor}),g=te(`${t}-inner`,{[`${t}-circle-gradient`]:S}),B=c.createElement(zr,{steps:f,percent:f?y[1]:y,strokeWidth:m,trailWidth:m,strokeColor:f?w[1]:w,strokeLinecap:a,trailColor:n,prefixCls:t,gapDegree:v,gapPosition:F}),A=b<=20,T=c.createElement("div",{className:g,style:h},B,!A&&u);return A?c.createElement(Pt,{title:u},T):T},ze="--progress-line-stroke-color",qt="--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}})},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: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}}})}},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:f}=e,{align:b,type:l}=p,m=s&&typeof s!="string"?tn(s,n):{[ze]:s,background:s},h=i==="square"||i==="butt"?0:void 0,v=o??[-1,r||(o==="small"?6:8)],[y,F]=He(v,"line",{strokeWidth:r}),S={backgroundColor:d||void 0,borderRadius:h},w=Object.assign(Object.assign({width:`${Ce(a)}%`,height:F,borderRadius:h},m),{[qt]:Ce(a)/100}),g=Re(e),B={width:`${Ce(g)}%`,height:F,borderRadius:h,backgroundColor:f==null?void 0:f.strokeColor},A={width:y<0?"100%":y},T=c.createElement("div",{className:`${t}-inner`,style:S},c.createElement("div",{className:te(`${t}-bg`,`${t}-bg-${l}`),style:w},l==="inner"&&u),g!==void 0&&c.createElement("div",{className:`${t}-success-bg`,style:B})),W=l==="outer"&&b==="start",E=l==="outer"&&b==="end";return l==="outer"&&b==="center"?c.createElement("div",{className:`${t}-layout-bottom`},T,u):c.createElement("div",{className:`${t}-outer`,style:A},W&&u,T,E&&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],[l,m]=He(b,"step",{steps:n,strokeWidth:r}),h=l/n,v=Array.from({length:n});for(let y=0;y<n;y++){const F=Array.isArray(s)?s[y]:s;v[y]=c.createElement("div",{key:y,className:te(`${u}-steps-item`,{[`${u}-steps-item-active`]:y<=p-1}),style:{backgroundColor:y<=p-1?F:i,width:h,height:m}})}return c.createElement("div",{className:`${u}-steps-outer`},v,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=c.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:f,format:b,style:l,percentPosition:m={}}=e,h=an(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:v="end",type:y="outer"}=m,F=Array.isArray(s)?s[0]:s,S=typeof s=="string"||Array.isArray(s)?s:void 0,w=c.useMemo(()=>{if(F){const L=typeof F=="string"?F:Object.values(F)[0];return new lr(L).isLight()}return!1},[s]),g=c.useMemo(()=>{var L,$;const M=Re(e);return Number.parseInt(M!==void 0?(L=M??0)===null||L===void 0?void 0:L.toString():($=i??0)===null||$===void 0?void 0:$.toString(),10)},[i,e.success,e.successPercent]),B=c.useMemo(()=>!on.includes(f)&&g>=100?"success":f||"normal",[f,g]),{getPrefixCls:A,direction:T,progress:W}=c.useContext(Ue),E=A("progress",n),[re,ae,Z]=Zr(E),K=p==="line",H=K&&!r,X=c.useMemo(()=>{if(!d)return null;const L=Re(e);let $;const M=b||(x=>`${x}%`),V=K&&w&&y==="inner";return y==="inner"||b||B!=="exception"&&B!=="success"?$=M(Ce(i),Ce(L)):B==="exception"?$=K?c.createElement(cr,null):c.createElement(ur,null):B==="success"&&($=K?c.createElement(dr,null):c.createElement(pr,null)),c.createElement("span",{className:te(`${E}-text`,{[`${E}-text-bright`]:V,[`${E}-text-${v}`]:H,[`${E}-text-${y}`]:H}),title:typeof $=="string"?$:void 0},$)},[d,i,g,B,p,E,b]);let J;p==="line"?J=r?c.createElement(nn,Object.assign({},e,{strokeColor:S,prefixCls:E,steps:typeof r=="object"?r.count:r}),X):c.createElement(rn,Object.assign({},e,{strokeColor:F,prefixCls:E,direction:T,percentPosition:{align:v,type:y}}),X):(p==="circle"||p==="dashboard")&&(J=c.createElement(Xr,Object.assign({},e,{strokeColor:F,prefixCls:E,progressStatus:B}),X));const z=te(E,`${E}-status-${B}`,{[`${E}-${p==="dashboard"&&"circle"||p}`]:p!=="line",[`${E}-inline-circle`]:p==="circle"&&He(u,"circle")[0]<=20,[`${E}-line`]:H,[`${E}-line-align-${v}`]:H,[`${E}-line-position-${y}`]:H,[`${E}-steps`]:r,[`${E}-show-info`]:d,[`${E}-${u}`]:typeof u=="string",[`${E}-rtl`]:T==="rtl"},W==null?void 0:W.className,a,o,ae,Z);return re(c.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},W==null?void 0:W.style),l),className:z,role:"progressbar","aria-valuenow":g,"aria-valuemin":0,"aria-valuemax":100},Nt(h,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),J))});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 c.createElement(Le,ge({},t,{ref:n,icon:ln}))},un=c.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(f){return u.endsWith(f)})}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 Et(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),Et(t)):e.onSuccess(Et(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=be(se().mark(function t(n,a){var o,r,s,i,u,d,p,f;return se().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:d=function(){return d=be(se().mark(function h(v){return se().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.abrupt("return",new Promise(function(S){v.file(function(w){a(w)?(v.fullPath&&!w.webkitRelativePath&&(Object.defineProperties(w,{webkitRelativePath:{writable:!0}}),w.webkitRelativePath=v.fullPath.replace(/^\//,""),Object.defineProperties(w,{webkitRelativePath:{writable:!1}})),S(w)):S(null)})}));case 1:case"end":return F.stop()}},h)})),d.apply(this,arguments)},u=function(h){return d.apply(this,arguments)},i=function(){return i=be(se().mark(function h(v){var y,F,S,w,g;return se().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:y=v.createReader(),F=[];case 2:return A.next=5,new Promise(function(T){y.readEntries(T,function(){return T([])})});case 5:if(S=A.sent,w=S.length,w){A.next=9;break}return A.abrupt("break",12);case 9:for(g=0;g<w;g++)F.push(S[g]);A.next=2;break;case 12:return A.abrupt("return",F);case 13:case"end":return A.stop()}},h)})),i.apply(this,arguments)},s=function(h){return i.apply(this,arguments)},o=[],r=[],n.forEach(function(m){return r.push(m.webkitGetAsEntry())}),p=(function(){var m=be(se().mark(function h(v,y){var F,S;return se().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(v){g.next=2;break}return g.abrupt("return");case 2:if(v.path=y||"",!v.isFile){g.next=10;break}return g.next=6,u(v);case 6:F=g.sent,F&&o.push(F),g.next=15;break;case 10:if(!v.isDirectory){g.next=15;break}return g.next=13,s(v);case 13:S=g.sent,r.push.apply(r,fe(S));case 15:case"end":return g.stop()}},h)}));return function(v,y){return m.apply(this,arguments)}})(),f=0;case 9:if(!(f<r.length)){l.next=15;break}return l.next=12,p(r[f]);case 12:f++,l.next=9;break;case 15:return l.abrupt("return",o);case 16:case"end":return l.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=Mt(n);function n(){var a;_t(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)),Q(ie(a),"state",{uid:Ze()}),Q(ie(a),"reqs",{}),Q(ie(a),"fileInput",void 0),Q(ie(a),"_isMounted",void 0),Q(ie(a),"onChange",function(i){var u=a.props,d=u.accept,p=u.directory,f=i.target.files,b=fe(f).filter(function(l){return!p||Ye(l,d)});a.uploadFiles(b),a.reset()}),Q(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 f=u.parentNode;f.focus(),d.blur()}u.click(),p&&p(i)}}),Q(ie(a),"onKeyDown",function(i){i.key==="Enter"&&a.onClick(i)}),Q(ie(a),"onDataTransferFiles",(function(){var i=be(se().mark(function u(d,p){var f,b,l,m,h,v,y;return se().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(f=a.props,b=f.multiple,l=f.accept,m=f.directory,h=fe(d.items||[]),v=fe(d.files||[]),(v.length>0||h.some(function(w){return w.kind==="file"}))&&(p==null||p()),!m){S.next=11;break}return S.next=7,pn(Array.prototype.slice.call(h),function(w){return Ye(w,a.props.accept)});case 7:v=S.sent,a.uploadFiles(v),S.next=14;break;case 11:y=fe(v).filter(function(w){return Ye(w,l)}),b===!1&&(y=v.slice(0,1)),a.uploadFiles(y);case 14:case"end":return S.stop()}},u)}));return function(u,d){return i.apply(this,arguments)}})()),Q(ie(a),"onFilePaste",(function(){var i=be(se().mark(function u(d){var p,f;return se().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(p=a.props.pastable,p){l.next=3;break}return l.abrupt("return");case 3:if(d.type!=="paste"){l.next=6;break}return f=d.clipboardData,l.abrupt("return",a.onDataTransferFiles(f,function(){d.preventDefault()}));case 6:case"end":return l.stop()}},u)}));return function(u){return i.apply(this,arguments)}})()),Q(ie(a),"onFileDragOver",function(i){i.preventDefault()}),Q(ie(a),"onFileDrop",(function(){var i=be(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)}})()),Q(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 f=a.props.onBatchStart;f==null||f(p.map(function(b){var l=b.origin,m=b.parsedFile;return{file:l,parsedFile:m}})),p.filter(function(b){return b.parsedFile!==null}).forEach(function(b){a.post(b)})})}),Q(ie(a),"processFile",(function(){var i=be(se().mark(function u(d,p){var f,b,l,m,h,v,y,F,S;return se().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(f=a.props.beforeUpload,b=d,!f){g.next=14;break}return g.prev=3,g.next=6,f(d,p);case 6:b=g.sent,g.next=12;break;case 9:g.prev=9,g.t0=g.catch(3),b=!1;case 12:if(b!==!1){g.next=14;break}return g.abrupt("return",{origin:d,parsedFile:null,action:null,data:null});case 14:if(l=a.props.action,typeof l!="function"){g.next=21;break}return g.next=18,l(d);case 18:m=g.sent,g.next=22;break;case 21:m=l;case 22:if(h=a.props.data,typeof h!="function"){g.next=29;break}return g.next=26,h(d);case 26:v=g.sent,g.next=30;break;case 29:v=h;case 30:return y=(Ee(b)==="object"||typeof b=="string")&&b?b:d,y instanceof File?F=y:F=new File([y],d.name,{type:d.type}),S=F,S.uid=d.uid,g.abrupt("return",{origin:d,data:v,parsedFile:S,action:m});case 35:case"end":return g.stop()}},u,null,[[3,9]])}));return function(u,d){return i.apply(this,arguments)}})()),Q(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,f=p.onStart,b=p.customRequest,l=p.name,m=p.headers,h=p.withCredentials,v=p.method,y=i.uid,F=b||Dt,S={action:u,filename:l,data:s,file:d,headers:m,withCredentials:h,method:v||"post",onProgress:function(g){var B=r.props.onProgress;B==null||B(g,d)},onSuccess:function(g,B){var A=r.props.onSuccess;A==null||A(g,d,B),delete r.reqs[y]},onError:function(g,B){var A=r.props.onError;A==null||A(g,B,d),delete r.reqs[y]}};f(i),this.reqs[y]=F(S,{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,f=o.id,b=o.name,l=o.style,m=o.styles,h=m===void 0?{}:m,v=o.multiple,y=o.accept,F=o.capture,S=o.children,w=o.directory,g=o.folder,B=o.openFileDialogOnClick,A=o.onMouseEnter,T=o.onMouseLeave,W=o.hasControlInside,E=It(o,gn),re=te(Q(Q(Q({},s,!0),"".concat(s,"-disabled"),p),i,i)),ae=w||g?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Z=p?{}:{onClick:B?this.onClick:function(){},onKeyDown:B?this.onKeyDown:function(){},onMouseEnter:A,onMouseLeave:T,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:W?void 0:"0"};return we.createElement(r,ge({},Z,{className:re,role:W?void 0:"button",style:l}),we.createElement("input",ge({},fr(E,{aria:!0,data:!0}),{id:f,name:b,disabled:p,type:"file",ref:this.saveFileInput,onClick:function(H){return H.stopPropagation()},key:this.state.uid,style:tt({display:"none"},h.input),className:d.input,accept:y},ae,{multiple:v,onChange:this.onChange},F!=null?{capture:F}:{})),S)}}]),n})(At);function Qe(){}var at=(function(e){Tt(n,e);var t=Mt(n);function n(){var a;_t(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)),Q(ie(a),"uploader",void 0),Q(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 we.createElement(hn,ge({},this.props,{ref:this.saveUploader}))}}]),n})(At);Q(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"},[`
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},
@@ -17,24 +17,24 @@ import{jsxs as se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c fr
17
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}`},[`
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:'""'}}})}}},Fn=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`]:gr(e)},n,a]},yn=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%"}}}}},yn=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({},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{[`
25
25
  ${t}-wrapper${t}-picture-card-wrapper,
26
26
  ${t}-wrapper${t}-picture-circle-wrapper
27
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}`,[`
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"}})}},xn=e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55}),Sn=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),yn(s),bn(s),Fn(s),wn(s),hr(s)]},xn);var En={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 c.createElement(Le,ge({},t,{ref:n,icon:En}))},An=c.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 c.createElement(Le,ge({},t,{ref:n,icon:Bn}))},Pn=c.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 c.createElement(Le,ge({},t,{ref:n,icon:kn}))},On=c.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,Mn=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)},he=200;function _n(e){return new Promise(t=>{if(!e.type||!Xt(e.type)){t("");return}const n=document.createElement("canvas");n.width=he,n.height=he,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${he}px; height: ${he}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=he,u=he,d=0,m=0;r>s?(u=s*(he/r),m=-(u-i)/2):(i=r*(he/s),d=-(i-u)/2),a.drawImage(o,d,m,i,u);const f=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(o.src),t(f)},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 c.createElement(Le,ge({},t,{ref:n,icon:jn}))},zn=c.forwardRef(Rn);const Un=c.forwardRef(({prefixCls:e,className:t,style:n,locale:a,listType:o,file:r,items:s,progress:i,iconRender:u,actionIconRender:d,itemRender:m,isImgUrl:f,showPreviewIcon:l,showRemoveIcon:p,showDownloadIcon:h,previewIcon:b,removeIcon:C,downloadIcon:y,extra:w,onPreview:S,onDownload:$,onClose:g},A)=>{var B,O;const{status:R}=r,[D,re]=c.useState(R);c.useEffect(()=>{R!=="removed"&&re(R)},[R]);const[ne,G]=c.useState(!1);c.useEffect(()=>{const Y=setTimeout(()=>{G(!0)},300);return()=>{clearTimeout(Y)}},[]);const H=u(r);let U=c.createElement("div",{className:`${e}-icon`},H);if(o==="picture"||o==="picture-card"||o==="picture-circle")if(D==="uploading"||!r.thumbUrl&&!r.url){const Y=Q(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:D!=="uploading"});U=c.createElement("div",{className:Y},H)}else{const Y=f!=null&&f(r)?c.createElement("img",{src:r.thumbUrl||r.url,alt:r.name,className:`${e}-list-item-image`,crossOrigin:r.crossOrigin}):H,Ae=Q(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:f&&!f(r)});U=c.createElement("a",{className:Ae,onClick:Oe=>S(r,Oe),href:r.url||r.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Y)}const ee=Q(`${e}-list-item`,`${e}-list-item-${D}`),M=typeof r.linkProps=="string"?JSON.parse(r.linkProps):r.linkProps,K=(typeof p=="function"?p(r):p)?d((typeof C=="function"?C(r):C)||c.createElement(un,null),()=>g(r),e,a.removeFile,!0):null,F=(typeof h=="function"?h(r):h)&&D==="done"?d((typeof y=="function"?y(r):y)||c.createElement(zn,null),()=>$(r),e,a.downloadFile):null,T=o!=="picture-card"&&o!=="picture-circle"&&c.createElement("span",{key:"download-delete",className:Q(`${e}-list-item-actions`,{picture:o==="picture"})},F,K),z=typeof w=="function"?w(r):w,q=z&&c.createElement("span",{className:`${e}-list-item-extra`},z),x=Q(`${e}-list-item-name`),k=r.url?c.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:x,title:r.name},M,{href:r.url,onClick:Y=>S(r,Y)}),r.name,q):c.createElement("span",{key:"view",className:x,onClick:Y=>S(r,Y),title:r.name},r.name,q),E=(typeof l=="function"?l(r):l)&&(r.url||r.thumbUrl)?c.createElement("a",{href:r.url||r.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:Y=>S(r,Y),title:a.previewFile},typeof b=="function"?b(r):b||c.createElement(vr,null)):null,v=(o==="picture-card"||o==="picture-circle")&&D!=="uploading"&&c.createElement("span",{className:`${e}-list-item-actions`},E,D==="done"&&F,K),{getPrefixCls:_}=c.useContext(We),L=_(),X=c.createElement("div",{className:ee},U,k,T,v,ne&&c.createElement(Ut,{motionName:`${L}-fade`,visible:D==="uploading",motionDeadline:2e3},({className:Y})=>{const Ae="percent"in r?c.createElement(sn,Object.assign({type:"line",percent:r.percent,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"]},i)):null;return c.createElement("div",{className:Q(`${e}-list-item-progress`,Y)},Ae)})),ce=r.response&&typeof r.response=="string"?r.response:((B=r.error)===null||B===void 0?void 0:B.statusText)||((O=r.error)===null||O===void 0?void 0:O.message)||a.uploadError,ue=D==="error"?c.createElement(Pt,{title:ce,getPopupContainer:Y=>Y.parentNode},X):X;return c.createElement("div",{className:Q(`${e}-list-item-container`,t),style:n,ref:A},m?m(ue,r,s,{download:$.bind(null,r),preview:S.bind(null,r),remove:g.bind(null,r)}):ue)}),Wn=(e,t)=>{const{listType:n="text",previewFile:a=_n,onPreview:o,onDownload:r,onRemove:s,locale:i,iconRender:u,isImageUrl:d=Mn,prefixCls:m,items:f=[],showPreviewIcon:l=!0,showRemoveIcon:p=!0,showDownloadIcon:h=!1,removeIcon:b,previewIcon:C,downloadIcon:y,extra:w,progress:S={size:[-1,2],showInfo:!1},appendAction:$,appendActionVisible:g=!0,itemRender:A,disabled:B}=e,[,O]=br(),[R,D]=c.useState(!1),re=["picture-card","picture-circle"].includes(n);c.useEffect(()=>{n.startsWith("picture")&&(f||[]).forEach(x=>{!(x.originFileObj instanceof File||x.originFileObj instanceof Blob)||x.thumbUrl!==void 0||(x.thumbUrl="",a==null||a(x.originFileObj).then(k=>{x.thumbUrl=k||"",O()}))})},[n,f,a]),c.useEffect(()=>{D(!0)},[]);const ne=(x,k)=>{if(o)return k==null||k.preventDefault(),o(x)},G=x=>{typeof r=="function"?r(x):x.url&&window.open(x.url)},H=x=>{s==null||s(x)},U=x=>{if(u)return u(x,n);const k=x.status==="uploading";if(n.startsWith("picture")){const E=n==="picture"?c.createElement(bt,null):i.uploading,v=d!=null&&d(x)?c.createElement(On,null):c.createElement(An,null);return k?E:v}return k?c.createElement(bt,null):c.createElement(Pn,null)},ee=(x,k,E,v,_)=>{const L={type:"text",size:"small",title:v,onClick:X=>{var ce,ue;k(),c.isValidElement(x)&&((ue=(ce=x.props).onClick)===null||ue===void 0||ue.call(ce,X))},className:`${E}-list-item-action`,disabled:_?B:!1};return c.isValidElement(x)?c.createElement(vt,Object.assign({},L,{icon:ht(x,Object.assign(Object.assign({},x.props),{onClick:()=>{}}))})):c.createElement(vt,Object.assign({},L),c.createElement("span",null,x))};c.useImperativeHandle(t,()=>({handlePreview:ne,handleDownload:G}));const{getPrefixCls:M}=c.useContext(We),K=M("upload",m),F=M(),T=Q(`${K}-list`,`${K}-list-${n}`),z=c.useMemo(()=>Nt(Fr(F),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[F]),q=Object.assign(Object.assign({},re?{}:z),{motionDeadline:2e3,motionName:`${K}-${re?"animate-inline":"animate"}`,keys:fe(f.map(x=>({key:x.uid,file:x}))),motionAppear:R});return c.createElement("div",{className:T},c.createElement(Cr,Object.assign({},q,{component:!1}),({key:x,file:k,className:E,style:v})=>c.createElement(Un,{key:x,locale:i,prefixCls:K,className:E,style:v,file:k,items:f,progress:S,listType:n,isImgUrl:d,showPreviewIcon:l,showRemoveIcon:p,showDownloadIcon:h,removeIcon:b,previewIcon:C,downloadIcon:y,extra:w,iconRender:U,actionIconRender:ee,itemRender:A,onPreview:ne,onDownload:G,onClose:H})),$&&c.createElement(Ut,Object.assign({},q,{visible:g,forceRender:!0}),({className:x,style:k})=>ht($,E=>({className:Q(E.className,x),style:Object.assign(Object.assign(Object.assign({},k),{pointerEvents:x?"none":void 0}),E.style)}))))},Hn=c.forwardRef(Wn);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(m){try{d(a.next(m))}catch(f){s(f)}}function u(m){try{d(a.throw(m))}catch(f){s(f)}}function d(m){m.done?r(m.value):o(m.value).then(i,u)}d((a=a.apply(e,[])).next())})};const Pe=`__LIST_IGNORE_${Date.now()}__`,Xn=(e,t)=>{const n=yr("upload"),{fileList:a,defaultFileList:o,onRemove:r,showUploadList:s=!0,listType:i="text",onPreview:u,onDownload:d,onChange:m,onDrop:f,previewFile:l,disabled:p,locale:h,iconRender:b,isImageUrl:C,progress:y,prefixCls:w,className:S,type:$="select",children:g,style:A,itemRender:B,maxCount:O,data:R={},multiple:D=!1,hasControlInside:re=!0,action:ne="",accept:G="",supportServerRender:H=!0,rootClassName:U}=e,ee=c.useContext(wr),M=p??ee,K=e.customRequest||n.customRequest,[F,T]=$r(o||[],{value:a,postState:P=>P??[]}),[z,q]=c.useState("drop"),x=c.useRef(null),k=c.useRef(null);c.useMemo(()=>{const P=Date.now();(a||[]).forEach((j,V)=>{!j.uid&&!Object.isFrozen(j)&&(j.uid=`__AUTO__${P}_${V}__`)})},[a]);const E=(P,j,V)=>{let N=fe(j),W=!1;O===1?N=N.slice(-1):O&&(W=N.length>O,N=N.slice(0,O)),Ft(()=>{T(N)});const ie={file:P,fileList:N};V&&(ie.event=V),(!W||P.status==="removed"||N.some(Ce=>Ce.uid===P.uid))&&Ft(()=>{m==null||m(ie)})},v=(P,j)=>qn(void 0,void 0,void 0,function*(){const{beforeUpload:V,transformFile:N}=e;let W=P;if(V){const ie=yield V(P,j);if(ie===!1)return!1;if(delete P[Pe],ie===Pe)return Object.defineProperty(P,Pe,{value:!0,configurable:!0}),!1;typeof ie=="object"&&ie&&(W=ie)}return N&&(W=yield N(W)),W}),_=P=>{const j=P.filter(W=>!W.file[Pe]);if(!j.length)return;const V=j.map(W=>Ne(W.file));let N=fe(F);V.forEach(W=>{N=Te(W,N)}),V.forEach((W,ie)=>{let Ce=W;if(j[ie].parsedFile)W.status="uploading";else{const{originFileObj:xe}=W;let ye;try{ye=new File([xe],xe.name,{type:xe.type})}catch{ye=new Blob([xe],{type:xe.type}),ye.name=xe.name,ye.lastModifiedDate=new Date,ye.lastModified=new Date().getTime()}ye.uid=W.uid,Ce=ye}E(Ce,N)})},L=(P,j,V)=>{try{typeof P=="string"&&(P=JSON.parse(P))}catch{}if(!et(j,F))return;const N=Ne(j);N.status="done",N.percent=100,N.response=P,N.xhr=V;const W=Te(N,F);E(N,W)},X=(P,j)=>{if(!et(j,F))return;const V=Ne(j);V.status="uploading",V.percent=P.percent;const N=Te(V,F);E(V,N,P)},ce=(P,j,V)=>{if(!et(V,F))return;const N=Ne(V);N.error=P,N.response=j,N.status="error";const W=Te(N,F);E(N,W)},ue=P=>{let j;Promise.resolve(typeof r=="function"?r(P):r).then(V=>{var N;if(V===!1)return;const W=Nn(P,F);W&&(j=Object.assign(Object.assign({},P),{status:"removed"}),F==null||F.forEach(ie=>{const Ce=j.uid!==void 0?"uid":"name";ie[Ce]===j[Ce]&&!Object.isFrozen(ie)&&(ie.status="removed")}),(N=x.current)===null||N===void 0||N.abort(j),E(j,W))})},Y=P=>{q(P.type),P.type==="drop"&&(f==null||f(P))};c.useImperativeHandle(t,()=>({onBatchStart:_,onSuccess:L,onProgress:X,onError:ce,fileList:F,upload:x.current,nativeElement:k.current}));const{getPrefixCls:Ae,direction:Oe,upload:$e}=c.useContext(We),Z=Ae("upload",w),Be=Object.assign(Object.assign({onBatchStart:_,onError:ce,onProgress:X,onSuccess:L},e),{customRequest:K,data:R,multiple:D,action:ne,accept:G,supportServerRender:H,prefixCls:Z,disabled:M,beforeUpload:v,onChange:void 0,hasControlInside:re});delete Be.className,delete Be.style,(!g||M)&&delete Be.id;const ut=`${Z}-wrapper`,[Xe,dt,Kt]=Sn(Z,ut),[Jt]=xr("Upload",Sr.Upload),{showRemoveIcon:pt,showPreviewIcon:Yt,showDownloadIcon:Zt,removeIcon:Qt,previewIcon:er,downloadIcon:tr,extra:rr}=typeof s=="boolean"?{}:s,nr=typeof pt>"u"?!M:pt,Ve=(P,j)=>s?c.createElement(Hn,{prefixCls:Z,listType:i,items:F,previewFile:l,onPreview:u,onDownload:d,onRemove:ue,showRemoveIcon:nr,showPreviewIcon:Yt,showDownloadIcon:Zt,removeIcon:Qt,previewIcon:er,downloadIcon:tr,iconRender:b,extra:rr,locale:Object.assign(Object.assign({},Jt),h),isImageUrl:C,progress:y,appendAction:P,appendActionVisible:j,itemRender:B,disabled:M}):P,Ge=Q(ut,S,U,dt,Kt,$e==null?void 0:$e.className,{[`${Z}-rtl`]:Oe==="rtl",[`${Z}-picture-card-wrapper`]:i==="picture-card",[`${Z}-picture-circle-wrapper`]:i==="picture-circle"}),mt=Object.assign(Object.assign({},$e==null?void 0:$e.style),A);if($==="drag"){const P=Q(dt,Z,`${Z}-drag`,{[`${Z}-drag-uploading`]:F.some(j=>j.status==="uploading"),[`${Z}-drag-hover`]:z==="dragover",[`${Z}-disabled`]:M,[`${Z}-rtl`]:Oe==="rtl"});return Xe(c.createElement("span",{className:Ge,ref:k},c.createElement("div",{className:P,style:mt,onDrop:Y,onDragOver:Y,onDragLeave:Y},c.createElement(at,Object.assign({},Be,{ref:x,className:`${Z}-btn`}),c.createElement("div",{className:`${Z}-drag-container`},g))),Ve()))}const ar=Q(Z,`${Z}-select`,{[`${Z}-disabled`]:M,[`${Z}-hidden`]:!g}),ft=c.createElement("div",{className:ar,style:mt},c.createElement(at,Object.assign({},Be,{ref:x})));return Xe(i==="picture-card"||i==="picture-circle"?c.createElement("span",{className:Ge,ref:k},Ve(ft,!!g)):c.createElement("span",{className:Ge,ref:k},ft,Ve()))},Vt=c.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=c.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 c.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=(l,p)=>a?a(l):p,r=Er.create({baseURL:e,timeout:1e6});return r.interceptors.request.use(l=>{let p=t;if(!p&&!["user/login","user/kaptcha","user/regist"].some(b=>l.url.includes(b))){window.location.pathname="/login";return}return l.headers.Authorization=p||"",l.headers.userName=n==="\u672A\u767B\u5F55\u7528\u6237"?"":n,l}),r.interceptors.response.use(l=>{const p=["user/kaptcha"],h=l.data;if(p.some(w=>l.config.url&&l.config.url.includes(w))||h.size&&h.type)return h;const{success:b,errorMsg:C,errorCode:y}=h;return Kn.includes(y)||b?h:(te.error(C||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")),!1)},l=>{var p,h,b,C,y,w,S,$,g,A;l.message!=="canceled"&&((((h=(p=l==null?void 0:l.response)==null?void 0:p.data)==null?void 0:h.errorCode)==="30013"||((C=(b=l==null?void 0:l.response)==null?void 0:b.data)==null?void 0:C.errorCode)==="30023")&&te.error((((y=l==null?void 0:l.response)==null?void 0:y.data)||{}).errorMsg||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")),((w=l==null?void 0:l.response)==null?void 0:w.status)===401&&(console.log("Error url:",(S=l==null?void 0:l.request)==null?void 0:S.responseURL),te.error(((($=l==null?void 0:l.response)==null?void 0:$.data)||{}).errorMsg||o("server.noPermission","\u6CA1\u6709\u8DB3\u591F\u6743\u9650"))),console.log("Error occurs",l),(((g=l==null?void 0:l.response)==null?void 0:g.data)||{}).errorMsg!="\u672A\u8BBE\u7F6E\u9ED8\u8BA4\u914D\u7F6E\uFF01"&&te.error((((A=l==null?void 0:l.response)==null?void 0:A.data)||{}).errorMsg||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")))}),{getLibraryList:async l=>{try{const p=await r.get(`/sensitive/library?${new URLSearchParams(l).toString()}`),{success:h,data:b}=p;return h?b:!1}catch(p){return console.log("e",p),!1}},createLibrary:async l=>{try{const p=await r.post("/sensitive/library",l),{success:h,data:b}=p;return h?b:!1}catch(p){return console.log("e",p),!1}},deleteLibrary:async l=>{try{const p=await r.delete(`/sensitive/library/${l}`),{success:h,data:b}=p;return h?b:!1}catch(p){return console.log("e",p),!1}},updateLibrary:async(l,p)=>{try{const h=await r.put(`/sensitive/library/${l}`,p),{success:b,data:C}=h;return b?C:!1}catch(h){return console.log("e",h),!1}},downloadTemplate:async l=>{try{const p=await r.get("/sensitive/word/downloadTemplate",{params:{fileType:l},responseType:"blob"});return p&&typeof p.size=="number"?p:!1}catch(p){return console.log("e",p),!1}},importWords:async(l,p)=>{try{const h=new FormData;h.append("file",p);const b=await r.put(`/sensitive/word/${l}/import`,h);return b&&b.success!==!1?b:!1}catch(h){return console.log("e",h),!1}}}},Ue={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:Ue,en:Yn,ja:Zn};function ea(e){return Qn[e]??Ue}function ke(e,t){return e.replace(/\{\{(\w+)\}\}/g,(n,a)=>String(t[a]??""))}const Gt=we.createContext({locale:"zh",messages:Ue,getMessage:e=>{const t=e.split(".");let n=Ue;for(const a of t)n=n==null?void 0:n[a];return typeof n=="string"?n:e}});function qe(){return we.useContext(Gt)}function ta({locale:e,messages:t,children:n}){const a=we.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 m of u)d=d==null?void 0:d[m];return typeof d=="string"?d:i}}},[e,t]);return we.createElement(Gt.Provider,{value:a},n)}const{Dragger:ra}=ct,Se=16,na=le.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%"}}}},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"}})}},xn=e=>({actionsColor:e.colorIcon,pictureCardSize:e.controlHeightLG*2.55}),Sn=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),yn(s),Fn(s),bn(s),Cn(s),wn(s),hr(s)]},xn);var En={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 c.createElement(Le,ge({},t,{ref:n,icon:En}))},An=c.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 c.createElement(Le,ge({},t,{ref:n,icon:Bn}))},Pn=c.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 c.createElement(Le,ge({},t,{ref:n,icon:kn}))},On=c.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,Mn=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)},he=200;function _n(e){return new Promise(t=>{if(!e.type||!Xt(e.type)){t("");return}const n=document.createElement("canvas");n.width=he,n.height=he,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${he}px; height: ${he}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=he,u=he,d=0,p=0;r>s?(u=s*(he/r),p=-(u-i)/2):(i=r*(he/s),d=-(i-u)/2),a.drawImage(o,d,p,i,u);const f=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(o.src),t(f)},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 c.createElement(Le,ge({},t,{ref:n,icon:jn}))},zn=c.forwardRef(Rn);const Wn=c.forwardRef(({prefixCls:e,className:t,style:n,locale:a,listType:o,file:r,items:s,progress:i,iconRender:u,actionIconRender:d,itemRender:p,isImgUrl:f,showPreviewIcon:b,showRemoveIcon:l,showDownloadIcon:m,previewIcon:h,removeIcon:v,downloadIcon:y,extra:F,onPreview:S,onDownload:w,onClose:g},B)=>{var A,T;const{status:W}=r,[E,re]=c.useState(W);c.useEffect(()=>{W!=="removed"&&re(W)},[W]);const[ae,Z]=c.useState(!1);c.useEffect(()=>{const q=setTimeout(()=>{Z(!0)},300);return()=>{clearTimeout(q)}},[]);const K=u(r);let H=c.createElement("div",{className:`${e}-icon`},K);if(o==="picture"||o==="picture-card"||o==="picture-circle")if(E==="uploading"||!r.thumbUrl&&!r.url){const q=te(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:E!=="uploading"});H=c.createElement("div",{className:q},K)}else{const q=f!=null&&f(r)?c.createElement("img",{src:r.thumbUrl||r.url,alt:r.name,className:`${e}-list-item-image`,crossOrigin:r.crossOrigin}):K,Ae=te(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:f&&!f(r)});H=c.createElement("a",{className:Ae,onClick:Oe=>S(r,Oe),href:r.url||r.thumbUrl,target:"_blank",rel:"noopener noreferrer"},q)}const X=te(`${e}-list-item`,`${e}-list-item-${E}`),J=typeof r.linkProps=="string"?JSON.parse(r.linkProps):r.linkProps,z=(typeof l=="function"?l(r):l)?d((typeof v=="function"?v(r):v)||c.createElement(un,null),()=>g(r),e,a.removeFile,!0):null,L=(typeof m=="function"?m(r):m)&&E==="done"?d((typeof y=="function"?y(r):y)||c.createElement(zn,null),()=>w(r),e,a.downloadFile):null,$=o!=="picture-card"&&o!=="picture-circle"&&c.createElement("span",{key:"download-delete",className:te(`${e}-list-item-actions`,{picture:o==="picture"})},L,z),M=typeof F=="function"?F(r):F,V=M&&c.createElement("span",{className:`${e}-list-item-extra`},M),x=te(`${e}-list-item-name`),P=r.url?c.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:x,title:r.name},J,{href:r.url,onClick:q=>S(r,q)}),r.name,V):c.createElement("span",{key:"view",className:x,onClick:q=>S(r,q),title:r.name},r.name,V),j=(typeof b=="function"?b(r):b)&&(r.url||r.thumbUrl)?c.createElement("a",{href:r.url||r.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:q=>S(r,q),title:a.previewFile},typeof h=="function"?h(r):h||c.createElement(vr,null)):null,D=(o==="picture-card"||o==="picture-circle")&&E!=="uploading"&&c.createElement("span",{className:`${e}-list-item-actions`},j,E==="done"&&L,z),{getPrefixCls:C}=c.useContext(Ue),O=C(),N=c.createElement("div",{className:X},H,P,$,D,ae&&c.createElement(Wt,{motionName:`${O}-fade`,visible:E==="uploading",motionDeadline:2e3},({className:q})=>{const Ae="percent"in r?c.createElement(sn,Object.assign({type:"line",percent:r.percent,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"]},i)):null;return c.createElement("div",{className:te(`${e}-list-item-progress`,q)},Ae)})),Y=r.response&&typeof r.response=="string"?r.response:((A=r.error)===null||A===void 0?void 0:A.statusText)||((T=r.error)===null||T===void 0?void 0:T.message)||a.uploadError,oe=E==="error"?c.createElement(Pt,{title:Y,getPopupContainer:q=>q.parentNode},N):N;return c.createElement("div",{className:te(`${e}-list-item-container`,t),style:n,ref:B},p?p(oe,r,s,{download:w.bind(null,r),preview:S.bind(null,r),remove:g.bind(null,r)}):oe)}),Un=(e,t)=>{const{listType:n="text",previewFile:a=_n,onPreview:o,onDownload:r,onRemove:s,locale:i,iconRender:u,isImageUrl:d=Mn,prefixCls:p,items:f=[],showPreviewIcon:b=!0,showRemoveIcon:l=!0,showDownloadIcon:m=!1,removeIcon:h,previewIcon:v,downloadIcon:y,extra:F,progress:S={size:[-1,2],showInfo:!1},appendAction:w,appendActionVisible:g=!0,itemRender:B,disabled:A}=e,[,T]=br(),[W,E]=c.useState(!1),re=["picture-card","picture-circle"].includes(n);c.useEffect(()=>{n.startsWith("picture")&&(f||[]).forEach(x=>{!(x.originFileObj instanceof File||x.originFileObj instanceof Blob)||x.thumbUrl!==void 0||(x.thumbUrl="",a==null||a(x.originFileObj).then(P=>{x.thumbUrl=P||"",T()}))})},[n,f,a]),c.useEffect(()=>{E(!0)},[]);const ae=(x,P)=>{if(o)return P==null||P.preventDefault(),o(x)},Z=x=>{typeof r=="function"?r(x):x.url&&window.open(x.url)},K=x=>{s==null||s(x)},H=x=>{if(u)return u(x,n);const P=x.status==="uploading";if(n.startsWith("picture")){const j=n==="picture"?c.createElement(bt,null):i.uploading,D=d!=null&&d(x)?c.createElement(On,null):c.createElement(An,null);return P?j:D}return P?c.createElement(bt,null):c.createElement(Pn,null)},X=(x,P,j,D,C)=>{const O={type:"text",size:"small",title:D,onClick:N=>{var Y,oe;P(),c.isValidElement(x)&&((oe=(Y=x.props).onClick)===null||oe===void 0||oe.call(Y,N))},className:`${j}-list-item-action`,disabled:C?A:!1};return c.isValidElement(x)?c.createElement(vt,Object.assign({},O,{icon:ht(x,Object.assign(Object.assign({},x.props),{onClick:()=>{}}))})):c.createElement(vt,Object.assign({},O),c.createElement("span",null,x))};c.useImperativeHandle(t,()=>({handlePreview:ae,handleDownload:Z}));const{getPrefixCls:J}=c.useContext(Ue),z=J("upload",p),L=J(),$=te(`${z}-list`,`${z}-list-${n}`),M=c.useMemo(()=>Nt(Cr(L),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[L]),V=Object.assign(Object.assign({},re?{}:M),{motionDeadline:2e3,motionName:`${z}-${re?"animate-inline":"animate"}`,keys:fe(f.map(x=>({key:x.uid,file:x}))),motionAppear:W});return c.createElement("div",{className:$},c.createElement(yr,Object.assign({},V,{component:!1}),({key:x,file:P,className:j,style:D})=>c.createElement(Wn,{key:x,locale:i,prefixCls:z,className:j,style:D,file:P,items:f,progress:S,listType:n,isImgUrl:d,showPreviewIcon:b,showRemoveIcon:l,showDownloadIcon:m,removeIcon:h,previewIcon:v,downloadIcon:y,extra:F,iconRender:H,actionIconRender:X,itemRender:B,onPreview:ae,onDownload:Z,onClose:K})),w&&c.createElement(Wt,Object.assign({},V,{visible:g,forceRender:!0}),({className:x,style:P})=>ht(w,j=>({className:te(j.className,x),style:Object.assign(Object.assign(Object.assign({},P),{pointerEvents:x?"none":void 0}),j.style)}))))},Hn=c.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(f){s(f)}}function u(p){try{d(a.throw(p))}catch(f){s(f)}}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:f,previewFile:b,disabled:l,locale:m,iconRender:h,isImageUrl:v,progress:y,prefixCls:F,className:S,type:w="select",children:g,style:B,itemRender:A,maxCount:T,data:W={},multiple:E=!1,hasControlInside:re=!0,action:ae="",accept:Z="",supportServerRender:K=!0,rootClassName:H}=e,X=c.useContext(wr),J=l??X,z=e.customRequest||n.customRequest,[L,$]=$r(o||[],{value:a,postState:k=>k??[]}),[M,V]=c.useState("drop"),x=c.useRef(null),P=c.useRef(null);c.useMemo(()=>{const k=Date.now();(a||[]).forEach((R,G)=>{!R.uid&&!Object.isFrozen(R)&&(R.uid=`__AUTO__${k}_${G}__`)})},[a]);const j=(k,R,G)=>{let _=fe(R),U=!1;T===1?_=_.slice(-1):T&&(U=_.length>T,_=_.slice(0,T)),Ct(()=>{$(_)});const le={file:k,fileList:_};G&&(le.event=G),(!U||k.status==="removed"||_.some(ye=>ye.uid===k.uid))&&Ct(()=>{p==null||p(le)})},D=(k,R)=>qn(void 0,void 0,void 0,function*(){const{beforeUpload:G,transformFile:_}=e;let U=k;if(G){const le=yield G(k,R);if(le===!1)return!1;if(delete k[Pe],le===Pe)return Object.defineProperty(k,Pe,{value:!0,configurable:!0}),!1;typeof le=="object"&&le&&(U=le)}return _&&(U=yield _(U)),U}),C=k=>{const R=k.filter(U=>!U.file[Pe]);if(!R.length)return;const G=R.map(U=>Ne(U.file));let _=fe(L);G.forEach(U=>{_=Te(U,_)}),G.forEach((U,le)=>{let ye=U;if(R[le].parsedFile)U.status="uploading";else{const{originFileObj:xe}=U;let Fe;try{Fe=new File([xe],xe.name,{type:xe.type})}catch{Fe=new Blob([xe],{type:xe.type}),Fe.name=xe.name,Fe.lastModifiedDate=new Date,Fe.lastModified=new Date().getTime()}Fe.uid=U.uid,ye=Fe}j(ye,_)})},O=(k,R,G)=>{try{typeof k=="string"&&(k=JSON.parse(k))}catch{}if(!et(R,L))return;const _=Ne(R);_.status="done",_.percent=100,_.response=k,_.xhr=G;const U=Te(_,L);j(_,U)},N=(k,R)=>{if(!et(R,L))return;const G=Ne(R);G.status="uploading",G.percent=k.percent;const _=Te(G,L);j(G,_,k)},Y=(k,R,G)=>{if(!et(G,L))return;const _=Ne(G);_.error=k,_.response=R,_.status="error";const U=Te(_,L);j(_,U)},oe=k=>{let R;Promise.resolve(typeof r=="function"?r(k):r).then(G=>{var _;if(G===!1)return;const U=Nn(k,L);U&&(R=Object.assign(Object.assign({},k),{status:"removed"}),L==null||L.forEach(le=>{const ye=R.uid!==void 0?"uid":"name";le[ye]===R[ye]&&!Object.isFrozen(le)&&(le.status="removed")}),(_=x.current)===null||_===void 0||_.abort(R),j(R,U))})},q=k=>{V(k.type),k.type==="drop"&&(f==null||f(k))};c.useImperativeHandle(t,()=>({onBatchStart:C,onSuccess:O,onProgress:N,onError:Y,fileList:L,upload:x.current,nativeElement:P.current}));const{getPrefixCls:Ae,direction:Oe,upload:$e}=c.useContext(Ue),ee=Ae("upload",F),Be=Object.assign(Object.assign({onBatchStart:C,onError:Y,onProgress:N,onSuccess:O},e),{customRequest:z,data:W,multiple:E,action:ae,accept:Z,supportServerRender:K,prefixCls:ee,disabled:J,beforeUpload:D,onChange:void 0,hasControlInside:re});delete Be.className,delete Be.style,(!g||J)&&delete Be.id;const ut=`${ee}-wrapper`,[Xe,dt,Kt]=Sn(ee,ut),[Jt]=xr("Upload",Sr.Upload),{showRemoveIcon:pt,showPreviewIcon:Yt,showDownloadIcon:Zt,removeIcon:Qt,previewIcon:er,downloadIcon:tr,extra:rr}=typeof s=="boolean"?{}:s,nr=typeof pt>"u"?!J:pt,Ve=(k,R)=>s?c.createElement(Hn,{prefixCls:ee,listType:i,items:L,previewFile:b,onPreview:u,onDownload:d,onRemove:oe,showRemoveIcon:nr,showPreviewIcon:Yt,showDownloadIcon:Zt,removeIcon:Qt,previewIcon:er,downloadIcon:tr,iconRender:h,extra:rr,locale:Object.assign(Object.assign({},Jt),m),isImageUrl:v,progress:y,appendAction:k,appendActionVisible:R,itemRender:A,disabled:J}):k,Ge=te(ut,S,H,dt,Kt,$e==null?void 0:$e.className,{[`${ee}-rtl`]:Oe==="rtl",[`${ee}-picture-card-wrapper`]:i==="picture-card",[`${ee}-picture-circle-wrapper`]:i==="picture-circle"}),mt=Object.assign(Object.assign({},$e==null?void 0:$e.style),B);if(w==="drag"){const k=te(dt,ee,`${ee}-drag`,{[`${ee}-drag-uploading`]:L.some(R=>R.status==="uploading"),[`${ee}-drag-hover`]:M==="dragover",[`${ee}-disabled`]:J,[`${ee}-rtl`]:Oe==="rtl"});return Xe(c.createElement("span",{className:Ge,ref:P},c.createElement("div",{className:k,style:mt,onDrop:q,onDragOver:q,onDragLeave:q},c.createElement(at,Object.assign({},Be,{ref:x,className:`${ee}-btn`}),c.createElement("div",{className:`${ee}-drag-container`},g))),Ve()))}const ar=te(ee,`${ee}-select`,{[`${ee}-disabled`]:J,[`${ee}-hidden`]:!g}),ft=c.createElement("div",{className:ar,style:mt},c.createElement(at,Object.assign({},Be,{ref:x})));return Xe(i==="picture-card"||i==="picture-circle"?c.createElement("span",{className:Ge,ref:P},Ve(ft,!!g)):c.createElement("span",{className:Ge,ref:P},ft,Ve()))},Vt=c.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=c.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 c.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=(l,m)=>a?a(l):m,r=Er.create({baseURL:e,timeout:1e6});return r.interceptors.request.use(l=>{let m=t;if(!m&&!["user/login","user/kaptcha","user/regist"].some(v=>l.url.includes(v))){window.location.pathname="/login";return}return l.headers.Authorization=m||"",l.headers.userName=n==="\u672A\u767B\u5F55\u7528\u6237"?"":n,l}),r.interceptors.response.use(l=>{const m=["user/kaptcha"],h=l.data;if(m.some(S=>l.config.url&&l.config.url.includes(S))||h.size&&h.type)return h;const{success:v,errorMsg:y,errorCode:F}=h;return Kn.includes(F)||v?h:(ne.error(y||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")),!1)},l=>{var m,h,v,y,F,S,w,g,B,A;l.message!=="canceled"&&((((h=(m=l==null?void 0:l.response)==null?void 0:m.data)==null?void 0:h.errorCode)==="30013"||((y=(v=l==null?void 0:l.response)==null?void 0:v.data)==null?void 0:y.errorCode)==="30023")&&ne.error((((F=l==null?void 0:l.response)==null?void 0:F.data)||{}).errorMsg||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")),((S=l==null?void 0:l.response)==null?void 0:S.status)===401&&(console.log("Error url:",(w=l==null?void 0:l.request)==null?void 0:w.responseURL),ne.error((((g=l==null?void 0:l.response)==null?void 0:g.data)||{}).errorMsg||o("server.noPermission","\u6CA1\u6709\u8DB3\u591F\u6743\u9650"))),console.log("Error occurs",l),(((B=l==null?void 0:l.response)==null?void 0:B.data)||{}).errorMsg!="\u672A\u8BBE\u7F6E\u9ED8\u8BA4\u914D\u7F6E\uFF01"&&ne.error((((A=l==null?void 0:l.response)==null?void 0:A.data)||{}).errorMsg||o("server.requestError","\u8BF7\u6C42\u51FA\u9519\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5")))}),{getLibraryList:async l=>{try{const m=await r.get(`/sensitive/library?${new URLSearchParams(l).toString()}`),{success:h,data:v}=m;return h?v:!1}catch(m){return console.log("e",m),!1}},createLibrary:async l=>{try{const m=await r.post("/sensitive/library",l),{success:h,data:v}=m;return h?v:!1}catch(m){return console.log("e",m),!1}},deleteLibrary:async l=>{try{const m=await r.delete(`/sensitive/library/${l}`),{success:h,data:v}=m;return h?v:!1}catch(m){return console.log("e",m),!1}},updateLibrary:async(l,m)=>{try{const h=await r.put(`/sensitive/library/${l}`,m),{success:v,data:y}=h;return v?y:!1}catch(h){return console.log("e",h),!1}},downloadTemplate:async l=>{try{const m=await r.get("/sensitive/word/downloadTemplate",{params:{fileType:l},responseType:"blob"});return m&&typeof m.size=="number"?m:!1}catch(m){return console.log("e",m),!1}},importWords:async(l,m)=>{try{const h=new FormData;h.append("file",m);const v=await r.put(`/sensitive/word/${l}/import`,h);return v&&v.success!==!1?v:!1}catch(h){return console.log("e",h),!1}},getWords:async l=>{try{const m=await r.get(`/sensitive/library/${l}`),{success:h,data:v}=m;return h?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=we.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 we.useContext(Gt)}function ta({locale:e,messages:t,children:n}){const a=we.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 we.createElement(Gt.Provider,{value:a},n)}const{Dragger:ra}=ct,Se=16,na=ue.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=le.div.attrs({className:"sensitive-edit-toolbar"})`
37
+ `,aa=ue.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 se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c fr
42
42
  flex-wrap: wrap;
43
43
  padding: 12px 20px;
44
44
 
45
- `,oa=le.div.attrs({className:"sensitive-edit-content-box"})`
45
+ `,oa=ue.div.attrs({className:"sensitive-edit-content-box"})`
46
46
  flex: 1;
47
47
  min-height: 0;
48
48
  overflow: auto;
@@ -51,12 +51,12 @@ import{jsxs as se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c fr
51
51
  border-radius: 8px;
52
52
  padding: 16px;
53
53
  margin: 0 20px;
54
- `,ia=le.div.attrs({className:"sensitive-edit-tag-list"})`
54
+ `,ia=ue.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
- `,De=28,sa=le.span.attrs({className:"sensitive-edit-tag"})`
59
+ `,De=28,sa=ue.span.attrs({className:"sensitive-edit-tag"})`
60
60
  box-sizing: border-box;
61
61
  display: inline-flex;
62
62
  align-items: center;
@@ -82,7 +82,7 @@ import{jsxs as se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c fr
82
82
  opacity: 1;
83
83
  }
84
84
  }
85
- `,la=le.span.attrs({className:"sensitive-edit-add-trigger"})`
85
+ `,la=ue.span.attrs({className:"sensitive-edit-add-trigger"})`
86
86
  box-sizing: border-box;
87
87
  display: inline-flex;
88
88
  align-items: center;
@@ -104,7 +104,7 @@ import{jsxs as se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c fr
104
104
  border-style: solid;
105
105
  opacity: 0.9;
106
106
  }
107
- `,ca=le.span.attrs({className:"sensitive-edit-add-input-wrap"})`
107
+ `,ca=ue.span.attrs({className:"sensitive-edit-add-input-wrap"})`
108
108
  box-sizing: border-box;
109
109
  display: inline-flex;
110
110
  align-items: center;
@@ -131,14 +131,14 @@ import{jsxs as se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c fr
131
131
  .sensitive-edit-add-input::placeholder {
132
132
  color: #9ca3af;
133
133
  }
134
- `,ua=le.div.attrs({className:"sensitive-edit-footer"})`
134
+ `,ua=ue.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=le.div.attrs({className:"sensitive-upload-modal-alert"})`
141
+ `,da=ue.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 se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c 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=le.div.attrs({className:"sensitive-upload-modal-dragger-wrap"})`
152
+ `,pa=ue.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 se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c 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 K;const{messages:i}=qe(),[u,d]=me(""),[m,f]=me(!1),[l,p]=me(""),h=je(null),[b,C]=me(!1),[y,w]=me([]),[S,$]=me(!1),g=((K=o==null?void 0:o.theme)==null?void 0:K.colors)||it.colors||{},A=g.tagColor??"#1d70f5",B=g.tagBackground??"#ebf6ff",O="none";ot(()=>{m&&(p(""),setTimeout(()=>{var F;return(F=h.current)==null?void 0:F.focus()},0))},[m]);const R=pe(()=>{const F=l.trim();if(F){if(F.length>Se){te.warning(ke(i.editor.maxLengthWarning,{max:String(Se)}));return}if(e.includes(F)){te.warning(i.editor.duplicateWarning);return}t([F,...e])}p(""),f(!1)},[l,e,t,i]),D=pe(F=>{t(e.filter(T=>T!==F))},[e,t]),re=_e(()=>{const F=u.trim().toLowerCase();return F?e.filter(T=>T.toLowerCase().includes(F)):e},[e,u]),ne=pe(()=>{w([]),C(!0)},[]),G=pe(F=>{r?r(F):te.info(i.editor.configTemplateHint)},[r,i]),H={items:[{key:"csv",label:i.editor.formatCsv},{key:"txt",label:i.editor.formatTxt}],onClick:({key:F})=>G(F)},U=pe(F=>{const T=F.replace(/\r\n/g,`
162
+ `,ma=({words:e,onWordsChange:t,onSave:n,onCancel:a,styles:o,onDownloadTemplate:r,onImportFile:s})=>{var L;const{messages:i}=qe(),[u,d]=me(""),[p,f]=me(!1),[b,l]=me(""),m=je(null),[h,v]=me(!1),[y,F]=me([]),[S,w]=me(!1),g=((L=o==null?void 0:o.theme)==null?void 0:L.colors)||it.colors||{},B=g.tagColor??"#1d70f5",A=g.tagAddColor??"#1d70f5",T=g.tagBackground??"#ebf6ff",W="none";ot(()=>{p&&(l(""),setTimeout(()=>{var $;return($=m.current)==null?void 0:$.focus()},0))},[p]);const E=pe(()=>{const $=b.trim();if($){if($.length>Se){ne.warning(ke(i.editor.maxLengthWarning,{max:String(Se)}));return}if(e.includes($)){ne.warning(i.editor.duplicateWarning);return}t([...e,$])}l(""),f(!1)},[b,e,t,i]),re=pe($=>{t(e.filter(M=>M!==$))},[e,t]),ae=_e(()=>{const $=u.trim().toLowerCase();return $?e.filter(M=>M.toLowerCase().includes($)):e},[e,u]),Z=pe(()=>{F([]),v(!0)},[]),K=pe($=>{r?r($):ne.info(i.editor.configTemplateHint)},[r,i]),H={items:[{key:"csv",label:i.editor.formatCsv},{key:"txt",label:i.editor.formatTxt}],onClick:({key:$})=>K($)},X=pe($=>{const M=$.replace(/\r\n/g,`
163
163
  `).replace(/\r/g,`
164
- `).split(/[\n,\t]/).map(x=>x.trim()).filter(Boolean),z=new Set,q=[];for(const x of T){const k=x.length>Se?x.slice(0,Se):x;z.has(k)||(z.add(k),q.push(k))}return q},[]),ee=pe(async()=>{var z;const F=(z=y[0])==null?void 0:z.originFileObj;if(!F){te.warning(i.editor.selectFileWarning);return}if(s){$(!0);try{await s(F),C(!1),w([])}catch{te.error(i.editor.importFailRetry)}finally{$(!1)}return}const T=new FileReader;T.onload=()=>{try{const q=T.result||"",x=U(q),k=Array.from(new Set([...e,...x]));t(k),te.success(ke(i.editor.importCountSuccess,{count:String(x.length)})),C(!1),w([])}catch{te.error(i.editor.parseFail)}},T.onerror=()=>te.error(i.editor.readFileFail),T.readAsText(F,"UTF-8")},[y,e,t,U,s,i]),M=pe(()=>{C(!1),w([])},[]);return se(na,{theme:o==null?void 0:o.theme,children:[se(aa,{theme:o==null?void 0:o.theme,children:[I(ve,{mode:"primary",label:i.editor.import,icon:I(Br,{size:16}),onClick:ne,styles:o}),se("span",{style:{display:"flex",alignItems:"center",gap:6,color:g.textSecondary??"#6b7280",fontSize:12},children:[I(Ct,{size:14}),ke(i.editor.maxLengthHint,{max:String(Se)})]}),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(Wt,{size:16,style:{color:"#9ca3af"}}),style:{flex:1}})})]}),I(oa,{theme:o==null?void 0:o.theme,children:se(ia,{children:[m?I(ca,{$focused:!0,$color:A,children:I("input",{ref:h,type:"text",className:"sensitive-edit-add-input",placeholder:i.editor.inputPlaceholder,value:l,onChange:F=>p(F.target.value),onBlur:R,onKeyDown:F=>{F.key==="Enter"&&R(),F.key==="Escape"&&(p(""),f(!1))},maxLength:Se})}):se(la,{$color:A,onClick:()=>f(!0),role:"button",tabIndex:0,onKeyDown:F=>F.key==="Enter"&&f(!0),children:[I(Ht,{size:14}),i.editor.add]}),re.map(F=>se(sa,{$color:A,$bg:B,$border:O,children:[F,I("span",{className:"sensitive-edit-tag-remove",onClick:()=>D(F),role:"button",tabIndex:0,onKeyDown:T=>T.key==="Enter"&&D(F),children:I(Pr,{size:14})})]},F))]})}),se(ua,{theme:o==null?void 0:o.theme,children:[I(ve,{mode:"default",label:i.editor.cancel,onClick:a,styles:o,style:{width:76}}),I(ve,{mode:"primary",label:i.editor.save,onClick:n,styles:o,style:{width:76}})]}),se(lt,{title:i.editor.uploadModalTitle,open:b,onCancel:M,footer:se("div",{style:{display:"flex",justifyContent:"flex-end",gap:20},children:[I(ve,{mode:"default",label:i.editor.cancel,onClick:M,styles:o,disabled:S,style:{width:76}}),I(ve,{mode:"primary",label:i.editor.confirm,onClick:ee,styles:o,disabled:S,style:{width:76}})]}),destroyOnClose:!0,width:650,children:[se(da,{theme:o==null?void 0:o.theme,children:[se("span",{style:{display:"flex",alignItems:"center",gap:8},children:[I(Ct,{size:18,style:{color:"#1d70f5",flexShrink:0}}),i.editor.uploadModalHint]}),I(kr,{menu:H,trigger:["click"],children:I("div",{style:{display:"inline-block"},children:I(ve,{mode:"default",label:i.editor.downloadTemplate,styles:o})})})]}),I(pa,{children:se(ra,{accept:".csv,.txt",maxCount:1,fileList:y,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(Lr,{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:fa}=lt,ga={pageNo:1,pageSize:999},ha=le.div.attrs({className:"sensitive-modal-footer"})`
164
+ `).split(/[\n,\t]/).map(P=>P.trim()).filter(Boolean),V=new Set,x=[];for(const P of M){const j=P.length>Se?P.slice(0,Se):P;V.has(j)||(V.add(j),x.push(j))}return x},[]),J=pe(async()=>{var V;const $=(V=y[0])==null?void 0:V.originFileObj;if(!$){ne.warning(i.editor.selectFileWarning);return}if(s){w(!0);try{await s($),v(!1),F([])}catch{ne.error(i.editor.importFailRetry)}finally{w(!1)}return}const M=new FileReader;M.onload=()=>{try{const x=M.result||"",P=X(x),j=Array.from(new Set([...e,...P]));t(j),ne.success(ke(i.editor.importCountSuccess,{count:String(P.length)})),v(!1),F([])}catch{ne.error(i.editor.parseFail)}},M.onerror=()=>ne.error(i.editor.readFileFail),M.readAsText($,"UTF-8")},[y,e,t,X,s,i]),z=pe(()=>{v(!1),F([])},[]);return ce(na,{theme:o==null?void 0:o.theme,children:[ce(aa,{theme:o==null?void 0:o.theme,children:[I(ve,{mode:"primary",label:i.editor.import,icon:I(Ir,{size:16}),onClick:Z,styles:o}),ce("span",{style:{display:"flex",alignItems:"center",gap:6,color:g.textSecondary??"#6b7280",fontSize:12},children:[I(yt,{size:14}),ke(i.editor.maxLengthHint,{max:String(Se)})]}),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:$=>d($.target.value),suffix:I(Ut,{size:16,style:{color:"#9ca3af"}}),style:{flex:1}})})]}),I(oa,{theme:o==null?void 0:o.theme,children:ce(ia,{children:[ae.map($=>ce(sa,{$color:B,$bg:T,$border:W,children:[$,I("span",{className:"sensitive-edit-tag-remove",onClick:()=>re($),role:"button",tabIndex:0,onKeyDown:M=>M.key==="Enter"&&re($),children:I(Pr,{size:14})})]},$)),p?I(ca,{$focused:!0,$color:B,children:I("input",{ref:m,type:"text",className:"sensitive-edit-add-input",placeholder:i.editor.inputPlaceholder,value:b,onChange:$=>l($.target.value),onBlur:E,onKeyDown:$=>{$.key==="Enter"&&E(),$.key==="Escape"&&(l(""),f(!1))},maxLength:Se})}):ce(la,{$color:A,onClick:()=>f(!0),role:"button",tabIndex:0,onKeyDown:$=>$.key==="Enter"&&f(!0),children:[I(Ht,{size:14}),i.editor.add]})]})}),ce(ua,{theme:o==null?void 0:o.theme,children:[I(ve,{mode:"default",label:i.editor.cancel,onClick:a,styles:o,style:{width:76}}),I(ve,{mode:"primary",label:i.editor.save,onClick:n,styles:o,style:{width:76}})]}),ce(lt,{title:i.editor.uploadModalTitle,open:h,onCancel:z,footer:ce("div",{style:{display:"flex",justifyContent:"flex-end",gap:20},children:[I(ve,{mode:"default",label:i.editor.cancel,onClick:z,styles:o,disabled:S,style:{width:76}}),I(ve,{mode:"primary",label:i.editor.confirm,onClick:J,styles:o,disabled:S,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:[I(yt,{size:18,style:{color:"#1d70f5",flexShrink:0}}),i.editor.uploadModalHint]}),I(kr,{menu:H,trigger:["click"],children:I("div",{style:{display:"inline-block"},children:I(ve,{mode:"default",label:i.editor.downloadTemplate,styles:o})})})]}),I(pa,{children:ce(ra,{accept:".csv,.txt",maxCount:1,fileList:y,beforeUpload:()=>!1,onChange:({fileList:$})=>F($.slice(-1)),showUploadList:{showPreviewIcon:!1},children:[I("p",{className:"ant-upload-drag-icon",style:{marginBottom:8},children:I(Lr,{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:fa}=lt,ga={pageNo:1,pageSize:999},ha=ue.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=le.div.attrs({className:"sensitive-toolbar-search-wrap"})`
170
+ `,va=ue.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 I(va,{children:I(st,{placeholder:a.toolbar.searchPlaceholder,allowClear:!0,value:t,onChange:r=>n(r.target.value),onPressEnter:o,suffix:I(Wt,{size:16,style:{color:"#9ca3af"}})})})},Fa=le.div.attrs({className:"sensitive-tag-cell-wrap"})`
174
+ `,ba=({onAction:e})=>{const[t,n]=me(""),{messages:a}=qe(),o=pe(()=>{const r=t.trim();e("search",{keyword:r})},[t,e]);return I(va,{children:I(st,{placeholder:a.toolbar.searchPlaceholder,allowClear:!0,value:t,onChange:r=>n(r.target.value),onPressEnter:o,suffix:I(Ut,{size:16,style:{color:"#9ca3af"}})})})},Ca=ue.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=le.span.attrs({className:"sensitive-tag-item"})`
180
+ `,ya=ue.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 se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c fr
190
190
  white-space: nowrap;
191
191
  flex-shrink: 0;
192
192
  font-family: PingFangSC, 微软雅黑, Helvetic, sans-serif;
193
- `,Me=8,ya=le.span.attrs({className:"sensitive-tag-more"})`
193
+ `,Me=8,Fa=ue.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 se,jsx as I,Fragment as or}from"react/jsx-runtime";import*as c fr
202
202
  &:hover {
203
203
  text-decoration: underline;
204
204
  }
205
- `;function wa({value:e,theme:t,onViewAll:n}){const{messages:a}=qe(),o=(t==null?void 0:t.colors)||it.colors||{},r=o.tagColor??"#1d70f5",s=o.tagBackground??"#ebf6ff",i=Array.isArray(e)?e:[];if(i.length===0)return null;const u=i.slice(0,Me),d=i.length>Me,m=d?i.length-Me:0,f=ke(a.tagCell.viewAllTitle,{total:String(i.length),max:String(Me)}),l=ke(a.tagCell.viewAllLink,{count:String(m)});return se(Fa,{children:[u.map((p,h)=>I(Ca,{$color:r,$bg:s,$border:"none",children:p},h)),d&&I(ya,{$color:r,title:f,onClick:()=>n==null?void 0:n(),children:l})]})}const $a=({url:e,token:t,role:n,server:a,styles:o,eventsEmit:r,CustomComponents:s})=>{const{messages:i,locale:u,getMessage:d}=qe(),[m,f]=me({container:"ready",content:"ready"}),l=je(null),[p,h]=me(),[b]=Ke.useForm(),[C,y]=me(!1),[w,S]=me(""),[$,g]=me({active:!1,libraryId:null,libraryName:"",words:[]}),A=_e(()=>a||Jn({url:e,token:t,role:n,getMessage:d}),[a,e,t,n,d]),{getLibraryList:B,deleteLibrary:O,createLibrary:R,updateLibrary:D,downloadTemplate:re,importWords:ne}=A,G=pe(E=>{const v=(E==null?void 0:E.data)??[],_=v.find(ue=>ue.columnId==="name"),L=v.find(ue=>ue.columnId==="sensitiveWords"),X=(_==null?void 0:_.value)??"",ce=Array.isArray(L==null?void 0:L.value)?[...L.value]:[];return{name:X,words:ce}},[]),H=pe(E=>{const{name:v,words:_}=G(E);g({active:!0,libraryId:E.id,libraryName:v,words:_})},[G]),U=pe(()=>{g({active:!1,libraryId:null,libraryName:"",words:[]}),r==null||r("sensitive_edit_closed",{})},[r]),ee=pe(async()=>{if($.libraryId)try{await D($.libraryId,{name:$.libraryName,words:$.words})&&(te.success(i.message.saveSuccess),U(),f(v=>({...v,content:"loading"})),K())}catch(E){console.error("[SensitiveView] \u4FDD\u5B58\u654F\u611F\u8BCD\u5931\u8D25:",E)}},[$.libraryId,$.words,D,U]),M=_e(()=>Dr({theme:it,mode:"light"},o||{}),[o]);ot(()=>{f(E=>({...E,content:"loading"})),K()},[]);const K=async E=>{try{const v={...ga},_=E??w;_&&(v.name=_);const L=await B(v);if(L){const X=F(L.records);h(X||[]),f(ce=>({...ce,content:"ready"}))}}catch(v){console.log("[SensitiveView] getSensitiveList error:",v)}};function F(E){return(E||[]).map(v=>({id:v.id,data:[{columnId:"name",value:v.name,type:"label"},{columnId:"sensitiveWords",value:v.words,type:"customized"},{columnId:"createDate",value:v.gmtCreate,type:"date"},{columnId:"count",value:v.count,type:"text"},{columnId:"actions",value:"edit",label:i.table.actionEdit,type:"action"},{columnId:"actions",value:"delete",label:i.table.actionDelete,type:"action"}]}))}const T=u==="zh"?"zh-CN":u==="ja"?"ja-JP":"en-US",z=_e(()=>({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:E,row:v})=>({value:E,theme:M==null?void 0:M.theme,onViewAll:v?()=>H(v):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(Ht,{size:16})},{type:"customized",key:"search",label:i.table.toolbar.searchPlaceholder,position:"right",component:ba}]}]}),[M,H,i]),q=async()=>{var E;try{const v=await b.validateFields();if(!v)return;const _=await R({...v,words:[]});if(_&&(l!=null&&l.current)){const L={id:_,data:[{columnId:"name",value:v.name,type:"label"},{columnId:"sensitiveWords",value:[],type:"customized"},{columnId:"createDate",value:new Date().toLocaleString(T,{year:"2-digit",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"}]};(E=l.current.appFn)==null||E.addItem(L,{animate:!0,position:"start"}),te.success(i.message.createSuccess),r==null||r("sensitive_library_created",{id:_,name:v.name})}}catch(v){console.error("[SensitiveView] \u65B0\u589E\u654F\u611F\u8BCD\u5931\u8D25:",v)}finally{y(!1),b.resetFields()}};function x(E,v,_){switch(E){case"toolbar_create":y(!0),r==null||r("sensitive_toolbar_create",v);break;case"table_action_edit":{const L=v==null?void 0:v.id,X=L&&Array.isArray(p)?p.find(ce=>ce.id===L):v!=null&&v.data?v:null;X&&X.data?H(X):v!=null&&v.id&&(v!=null&&v.data)&&H(v),r==null||r("sensitive_table_action_edit",v);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 L;try{await O(v.id)&&(l!=null&&l.current)&&((L=l.current.appFn)==null||L.removeItem(v.id),te.success(i.message.deleteSuccess),r==null||r("sensitive_table_action_delete",v))}catch(X){console.error("[SensitiveView] \u5220\u9664\u654F\u611F\u8BCD\u5E93\u5931\u8D25",X)}}});break}case"toolbar_search_search":{const L=(v==null?void 0:v.keyword)||"";S(L),f(X=>({...X,content:"loading"})),K(L),r==null||r("sensitive_toolbar_search",v);break}default:r==null||r("sensitive_"+E,v);break}}const k=()=>{y(!1),b.resetFields()};return I(Ir,{goBack:$.active?U:()=>r==null?void 0:r("goBack",{}),title:$.active?$.libraryName:i.dashboard.title,styles:M,children:$.active?I(ma,{libraryName:$.libraryName,words:$.words,onWordsChange:E=>g(v=>({...v,words:E})),onSave:ee,onCancel:U,styles:M,onDownloadTemplate:async E=>{const v=await re(E);if(!v){te.error(i.message.downloadTemplateFail);return}const _=URL.createObjectURL(v),L=document.createElement("a");L.href=_,L.download=`${i.downloadTemplateFilename}.${E}`,L.click(),URL.revokeObjectURL(_)},onImportFile:async E=>{var _;if(!$.libraryId)return;const v=await ne($.libraryId,E);if(v&&v.success!==!1)te.success(i.message.importSuccess),((_=v.data)==null?void 0:_.words)!=null&&g(L=>({...L,words:v.data.words}));else throw te.error((v==null?void 0:v.errorMsg)||i.message.importFail),new Error("import failed")}}):se(or,{children:[I(Ar,{dataSource:p,ref:l,eventsEmit:x,status:m,styles:M,CustomComponents:{...s},...z}),I(lt,{title:i.createModal.title,open:C,width:650,destroyOnClose:!0,onCancel:k,footer:se(ha,{theme:M==null?void 0:M.theme,children:[I(ve,{mode:"default",label:i.createModal.cancel,onClick:k}),I(ve,{mode:"primary",label:i.createModal.confirm,onClick:q})]}),children:I(Ke,{form:b,children:I(Ke.Item,{label:null,name:"name",rules:[{required:!0,message:i.createModal.nameRequired}],children:I(st,{placeholder:i.createModal.namePlaceholder})})})})]})})},_a=e=>{const{locale:t="zh",messages:n,...a}=e;return I(ta,{locale:t,messages:n,children:I($a,{...a})})};export{Gt as SensitiveI18nContext,ta as SensitiveI18nProvider,_a as default,ea as getSensitiveMessages,ke as interpolate,qe as useSensitiveI18n};
205
+ `;function wa({value:e,theme:t,onViewAll:n}){const{messages:a}=qe(),o=(t==null?void 0:t.colors)||it.colors||{},r=o.tagColor??"#1d70f5",s=o.tagBackground??"#ebf6ff",i=Array.isArray(e)?e:[];if(i.length===0)return null;const u=i.slice(0,Me),d=i.length>Me,p=d?i.length-Me:0,f=ke(a.tagCell.viewAllTitle,{total:String(i.length),max:String(Me)}),b=ke(a.tagCell.viewAllLink,{count:String(p)});return ce(Ca,{children:[u.map((l,m)=>I(ya,{$color:r,$bg:s,$border:"none",children:l},m)),d&&I(Fa,{$color:r,title:f,onClick:()=>n==null?void 0:n(),children:b})]})}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,f]=me({container:"ready",content:"ready"}),b=je(null),[l,m]=me(),[h]=Ke.useForm(),[v,y]=me(!1),[F,S]=me(""),[w,g]=me({active:!1,libraryId:null,libraryName:"",words:[]}),B=_e(()=>a||Jn({url:e,token:t,role:n,getMessage:d}),[a,e,t,n,d]),{getLibraryList:A,deleteLibrary:T,createLibrary:W,updateLibrary:E,downloadTemplate:re,importWords:ae,getWords:Z}=B,K=pe(D=>{const C=(D==null?void 0:D.data)??[],O=C.find(q=>q.columnId==="name"),N=C.find(q=>q.columnId==="sensitiveWords"),Y=(O==null?void 0:O.value)??"",oe=Array.isArray(N==null?void 0:N.value)?[...N.value]:[];return{name:Y,words:oe}},[]),H=pe(D=>{const{name:C,words:O}=K(D);g({active:!0,libraryId:D.id,libraryName:C,words:O})},[K]),X=pe(()=>{g({active:!1,libraryId:null,libraryName:"",words:[]}),r==null||r("sensitive_edit_closed",{})},[r]),J=pe(async()=>{if(w.libraryId)try{await E(w.libraryId,{name:w.libraryName,words:w.words})&&(ne.success(i.message.saveSuccess),X(),f(C=>({...C,content:"loading"})),L())}catch(D){console.error("[SensitiveView] \u4FDD\u5B58\u654F\u611F\u8BCD\u5931\u8D25:",D)}},[w.libraryId,w.words,E,X]),z=_e(()=>Dr({theme:it,mode:"light"},o||{}),[o]);ot(()=>{f(D=>({...D,content:"loading"})),L()},[]);const L=async D=>{try{const C={...ga},O=D??F;O&&(C.name=O);const N=await A(C);if(N){const Y=$(N.records);m(Y||[]),f(oe=>({...oe,content:"ready"}))}}catch(C){console.log("[SensitiveView] getSensitiveList error:",C)}};function $(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 M=u==="zh"?"zh-CN":u==="ja"?"ja-JP":"en-US",V=_e(()=>({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:z==null?void 0:z.theme,onViewAll:C?()=>H(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(Ht,{size:16})},{type:"customized",key:"search",label:i.table.toolbar.searchPlaceholder,position:"right",component:ba}]}]}),[z,H,i]),x=async()=>{var D;try{const C=await h.validateFields();if(!C)return;const O=await W({...C,words:[]});if(O&&(b!=null&&b.current)){console.log("+++++",new Date().toLocaleString(M,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).replace(/\//g,"-"));const N={id:O,data:[{columnId:"name",value:C.name,type:"label"},{columnId:"sensitiveWords",value:[],type:"customized"},{columnId:"createDate",value:new Date().toLocaleString(M,{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"}]};(D=b.current.appFn)==null||D.addItem(N,{animate:!0,position:"start"}),ne.success(i.message.createSuccess),r==null||r("sensitive_library_created",{id:O,name:C.name})}}catch(C){console.error("[SensitiveView] \u65B0\u589E\u654F\u611F\u8BCD\u5931\u8D25:",C)}finally{y(!1),h.resetFields()}};function P(D,C,O){switch(D){case"toolbar_create":y(!0),r==null||r("sensitive_toolbar_create",C);break;case"table_action_edit":{const N=C==null?void 0:C.id,Y=N&&Array.isArray(l)?l.find(oe=>oe.id===N):C!=null&&C.data?C:null;Y&&Y.data?H(Y):C!=null&&C.id&&(C!=null&&C.data)&&H(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 N;try{await T(C.id)&&(b!=null&&b.current)&&((N=b.current.appFn)==null||N.removeItem(C.id),ne.success(i.message.deleteSuccess),r==null||r("sensitive_table_action_delete",C))}catch(Y){console.error("[SensitiveView] \u5220\u9664\u654F\u611F\u8BCD\u5E93\u5931\u8D25",Y)}}});break}case"toolbar_search_search":{const N=(C==null?void 0:C.keyword)||"";S(N),f(Y=>({...Y,content:"loading"})),L(N),r==null||r("sensitive_toolbar_search",C);break}default:r==null||r("sensitive_"+D,C);break}}const j=()=>{y(!1),h.resetFields()};return I(Br,{goBack:w.active?X:()=>r==null?void 0:r("goBack",{}),title:w.active?w.libraryName:i.dashboard.title,styles:z,children:w.active?I(ma,{libraryName:w.libraryName,words:w.words,onWordsChange:D=>g(C=>({...C,words:D})),onSave:J,onCancel:X,styles:z,onDownloadTemplate:async D=>{const C=await re(D);if(!C){ne.error(i.message.downloadTemplateFail);return}const O=URL.createObjectURL(C),N=document.createElement("a");N.href=O,N.download=`${i.downloadTemplateFilename}.${D}`,N.click(),URL.revokeObjectURL(O)},onImportFile:async D=>{if(!w.libraryId)return;const C=await ae(w.libraryId,D);if(C&&C.success!==!1){ne.success(i.message.importSuccess);const O=await Z(w.libraryId);(O==null?void 0:O.words)!=null&&g(N=>({...N,words:O==null?void 0:O.words}))}else throw ne.error((C==null?void 0:C.errorMsg)||i.message.importFail),new Error("import failed")}}):ce(or,{children:[I(Ar,{dataSource:l,ref:b,eventsEmit:P,status:p,styles:z,CustomComponents:{...s},...V}),I(lt,{title:i.createModal.title,open:v,width:650,destroyOnClose:!0,onCancel:j,footer:ce(ha,{theme:z==null?void 0:z.theme,children:[I(ve,{mode:"default",label:i.createModal.cancel,onClick:j}),I(ve,{mode:"primary",label:i.createModal.confirm,onClick:x})]}),children:I(Ke,{form:h,children:I(Ke.Item,{label:null,name:"name",rules:[{required:!0,message:i.createModal.nameRequired}],children:I(st,{placeholder:i.createModal.namePlaceholder})})})})]})})},ja=e=>{const{locale:t="zh",messages:n,...a}=e;return I(ta,{locale:t,messages:n,children:I($a,{...a})})};export{Gt as SensitiveI18nContext,ta as SensitiveI18nProvider,ja as default,ea as getSensitiveMessages,ke as interpolate,qe as useSensitiveI18n};