mirror of https://gitee.com/topiam/eiam
33 lines
49 KiB
JavaScript
33 lines
49 KiB
JavaScript
/*
|
|
* eiam-console - Employee Identity and Access Management Program
|
|
* Copyright © 2020-2022 TopIAM (support@topiam.cn)
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[5642],{62548:function(Ee,le,c){"use strict";c.d(le,{Z:function(){return Y}});var u=c(1413),t=c(67294),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}},{tag:"path",attrs:{d:"M376.9 656.4c1.8-33.5 15.7-64.7 39.5-88.6 25.4-25.5 60-39.8 96-39.8 36.2 0 70.3 14.1 96 39.8 1.4 1.4 2.7 2.8 4.1 4.3l-25 19.6a8 8 0 003 14.1l98.2 24c5 1.2 9.9-2.6 9.9-7.7l.5-101.3c0-6.7-7.6-10.5-12.9-6.3L663 532.7c-36.6-42-90.4-68.6-150.5-68.6-107.4 0-195 85.1-199.4 191.7-.2 4.5 3.4 8.3 8 8.3H369c4.2-.1 7.7-3.4 7.9-7.7zM703 664h-47.9c-4.2 0-7.7 3.3-8 7.6-1.8 33.5-15.7 64.7-39.5 88.6-25.4 25.5-60 39.8-96 39.8-36.2 0-70.3-14.1-96-39.8-1.4-1.4-2.7-2.8-4.1-4.3l25-19.6a8 8 0 00-3-14.1l-98.2-24c-5-1.2-9.9 2.6-9.9 7.7l-.4 101.4c0 6.7 7.6 10.5 12.9 6.3l23.2-18.2c36.6 42 90.4 68.6 150.5 68.6 107.4 0 195-85.1 199.4-191.7.2-4.5-3.4-8.3-8-8.3z"}}]},name:"cloud-sync",theme:"outlined"},ee=s,ve=c(84089),N=function(A,se){return t.createElement(ve.Z,(0,u.Z)((0,u.Z)({},A),{},{ref:se,icon:ee}))};N.displayName="CloudSyncOutlined";var Y=t.forwardRef(N)},69243:function(Ee,le,c){"use strict";c.d(le,{Z:function(){return Y}});var u=c(1413),t=c(67294),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"}}]},name:"desktop",theme:"outlined"},ee=s,ve=c(84089),N=function(A,se){return t.createElement(ve.Z,(0,u.Z)((0,u.Z)({},A),{},{ref:se,icon:ee}))};N.displayName="DesktopOutlined";var Y=t.forwardRef(N)},45742:function(Ee,le,c){"use strict";c.d(le,{Z:function(){return Y}});var u=c(1413),t=c(67294),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM492 400h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zM340 368a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"profile",theme:"outlined"},ee=s,ve=c(84089),N=function(A,se){return t.createElement(ve.Z,(0,u.Z)((0,u.Z)({},A),{},{ref:se,icon:ee}))};N.displayName="ProfileOutlined";var Y=t.forwardRef(N)},63434:function(Ee,le,c){"use strict";var u=c(1413),t=c(91),s=c(85893),ee=c(22270),ve=c(32808),N=c(67294),Y=c(90789),Re=c(7772),A=["options","fieldProps","proFieldProps","valueEnum"],se=N.forwardRef(function(D,We){var Oe=D.options,Xe=D.fieldProps,_e=D.proFieldProps,er=D.valueEnum,rr=(0,t.Z)(D,A);return(0,s.jsx)(Re.Z,(0,u.Z)({ref:We,valueType:"checkbox",valueEnum:(0,ee.h)(er,void 0),fieldProps:(0,u.Z)({options:Oe},Xe),lightProps:(0,u.Z)({labelFormatter:function(){return(0,s.jsx)(Re.Z,(0,u.Z)({ref:We,valueType:"checkbox",mode:"read",valueEnum:(0,ee.h)(er,void 0),filedConfig:{customLightMode:!0},fieldProps:(0,u.Z)({options:Oe},Xe),proFieldProps:_e},rr))}},rr.lightProps),proFieldProps:_e},rr))}),ze=N.forwardRef(function(D,We){var Oe=D.fieldProps,Xe=D.children;return(0,s.jsx)(ve.Z,(0,u.Z)((0,u.Z)({ref:We},Oe),{},{children:Xe}))}),Ke=(0,Y.G)(ze,{valuePropName:"checked"}),Te=Ke;Te.Group=se,le.Z=Te},90672:function(Ee,le,c){"use strict";var u=c(1413),t=c(91),s=c(85893),ee=c(67294),ve=c(7772),N=["fieldProps","proFieldProps"],Y=function(A,se){var ze=A.fieldProps,Ke=A.proFieldProps,Te=(0,t.Z)(A,N);return(0,s.jsx)(ve.Z,(0,u.Z)({ref:se,valueType:"textarea",fieldProps:ze,proFieldProps:Ke},Te))};le.Z=ee.forwardRef(Y)},15045:function(Ee,le,c){"use strict";c.d(le,{Z:function(){return Jr}});var u=c(87462),t=c(4942),s=c(97685),ee=c(18073),ve=c(94184),N=c.n(ve),Y=c(74902),Re=c(15671),A=c(43144),se=c(60136),ze=c(29388),Ke=c(71002),Te=c(50344),D=c(67294),We=c(96774),Oe=c.n(We),Xe=c(91),_e=c(62874),er=D.forwardRef(function(O,v){var Z,m=O.prefixCls,g=O.forceRender,P=O.className,y=O.style,E=O.children,x=O.isActive,R=O.role,F=D.useState(x||g),$=(0,s.Z)(F,2),G=$[0],X=$[1];return D.useEffect(function(){(g||x)&&X(!0)},[g,x]),G?D.createElement("div",{ref:v,className:N()("".concat(m,"-content"),(Z={},(0,t.Z)(Z,"".concat(m,"-content-active"),x),(0,t.Z)(Z,"".concat(m,"-content-inactive"),!x),Z),P),style:y,role:R},D.createElement("div",{className:"".concat(m,"-content-box")},E)):null});er.displayName="PanelContent";var rr=er,Tr=["className","id","style","prefixCls","headerClass","children","isActive","destroyInactivePanel","accordion","forceRender","openMotion","extra","collapsible"],sr=function(O){(0,se.Z)(Z,O);var v=(0,ze.Z)(Z);function Z(){var m;(0,Re.Z)(this,Z);for(var g=arguments.length,P=new Array(g),y=0;y<g;y++)P[y]=arguments[y];return m=v.call.apply(v,[this].concat(P)),m.onItemClick=function(){var E=m.props,x=E.onItemClick,R=E.panelKey;typeof x=="function"&&x(R)},m.handleKeyPress=function(E){(E.key==="Enter"||E.keyCode===13||E.which===13)&&m.onItemClick()},m.renderIcon=function(){var E=m.props,x=E.showArrow,R=E.expandIcon,F=E.prefixCls,$=E.collapsible;if(!x)return null;var G=typeof R=="function"?R(m.props):D.createElement("i",{className:"arrow"});return G&&D.createElement("div",{className:"".concat(F,"-expand-icon"),onClick:$==="header"||$==="icon"?m.onItemClick:null},G)},m.renderTitle=function(){var E=m.props,x=E.header,R=E.prefixCls,F=E.collapsible;return D.createElement("span",{className:"".concat(R,"-header-text"),onClick:F==="header"?m.onItemClick:null},x)},m}return(0,A.Z)(Z,[{key:"shouldComponentUpdate",value:function(g){return!Oe()(this.props,g)}},{key:"render",value:function(){var g,P,y=this.props,E=y.className,x=y.id,R=y.style,F=y.prefixCls,$=y.headerClass,G=y.children,X=y.isActive,V=y.destroyInactivePanel,Ce=y.accordion,Se=y.forceRender,Ae=y.openMotion,ce=y.extra,de=y.collapsible,ue=(0,Xe.Z)(y,Tr),J=de==="disabled",be=de==="header",Ze=de==="icon",De=N()((g={},(0,t.Z)(g,"".concat(F,"-item"),!0),(0,t.Z)(g,"".concat(F,"-item-active"),X),(0,t.Z)(g,"".concat(F,"-item-disabled"),J),g),E),Ie=N()("".concat(F,"-header"),(P={},(0,t.Z)(P,$,$),(0,t.Z)(P,"".concat(F,"-header-collapsible-only"),be),(0,t.Z)(P,"".concat(F,"-icon-collapsible-only"),Ze),P)),re={className:Ie,"aria-expanded":X,"aria-disabled":J,onKeyPress:this.handleKeyPress};!be&&!Ze&&(re.onClick=this.onItemClick,re.role=Ce?"tab":"button",re.tabIndex=J?-1:0);var ne=ce!=null&&typeof ce!="boolean";return delete ue.header,delete ue.panelKey,delete ue.onItemClick,delete ue.showArrow,delete ue.expandIcon,D.createElement("div",(0,u.Z)({},ue,{className:De,style:R,id:x}),D.createElement("div",re,this.renderIcon(),this.renderTitle(),ne&&D.createElement("div",{className:"".concat(F,"-extra")},ce)),D.createElement(_e.Z,(0,u.Z)({visible:X,leavedClassName:"".concat(F,"-content-hidden")},Ae,{forceRender:Se,removeOnLeave:V}),function(Be,nr){var xr=Be.className,dr=Be.style;return D.createElement(rr,{ref:nr,prefixCls:F,className:xr,style:dr,isActive:X,forceRender:Se,role:Ce?"tabpanel":null},G)}))}}]),Z}(D.Component);sr.defaultProps={showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1};var Br=sr;function cr(O){var v=O;if(!Array.isArray(v)){var Z=(0,Ke.Z)(v);v=Z==="number"||Z==="string"?[v]:[]}return v.map(function(m){return String(m)})}var yr=function(O){(0,se.Z)(Z,O);var v=(0,ze.Z)(Z);function Z(m){var g;(0,Re.Z)(this,Z),g=v.call(this,m),g.onClickItem=function(x){var R=g.state.activeKey;if(g.props.accordion)R=R[0]===x?[]:[x];else{R=(0,Y.Z)(R);var F=R.indexOf(x),$=F>-1;$?R.splice(F,1):R.push(x)}g.setActiveKey(R)},g.getNewChild=function(x,R){if(!x)return null;var F=g.state.activeKey,$=g.props,G=$.prefixCls,X=$.openMotion,V=$.accordion,Ce=$.destroyInactivePanel,Se=$.expandIcon,Ae=$.collapsible,ce=x.key||String(R),de=x.props,ue=de.header,J=de.headerClass,be=de.destroyInactivePanel,Ze=de.collapsible,De=!1;V?De=F[0]===ce:De=F.indexOf(ce)>-1;var Ie=Ze!=null?Ze:Ae,re={key:ce,panelKey:ce,header:ue,headerClass:J,isActive:De,prefixCls:G,destroyInactivePanel:be!=null?be:Ce,openMotion:X,accordion:V,children:x.props.children,onItemClick:Ie==="disabled"?null:g.onClickItem,expandIcon:Se,collapsible:Ie};return typeof x.type=="string"?x:(Object.keys(re).forEach(function(ne){typeof re[ne]=="undefined"&&delete re[ne]}),D.cloneElement(x,re))},g.getItems=function(){var x=g.props.children;return(0,Te.Z)(x).map(g.getNewChild)},g.setActiveKey=function(x){"activeKey"in g.props||g.setState({activeKey:x}),g.props.onChange(g.props.accordion?x[0]:x)};var P=m.activeKey,y=m.defaultActiveKey,E=y;return"activeKey"in m&&(E=P),g.state={activeKey:cr(E)},g}return(0,A.Z)(Z,[{key:"shouldComponentUpdate",value:function(g,P){return!Oe()(this.props,g)||!Oe()(this.state,P)}},{key:"render",value:function(){var g,P=this.props,y=P.prefixCls,E=P.className,x=P.style,R=P.accordion,F=N()((g={},(0,t.Z)(g,y,!0),(0,t.Z)(g,E,!!E),g));return D.createElement("div",{className:F,style:x,role:R?"tablist":null},this.getItems())}}],[{key:"getDerivedStateFromProps",value:function(g){var P={};return"activeKey"in g&&(P.activeKey=cr(g.activeKey)),P}}]),Z}(D.Component);yr.defaultProps={prefixCls:"rc-collapse",onChange:function(){},accordion:!1,destroyInactivePanel:!1},yr.Panel=Br;var Or=yr,Mr=Or,rt=Or.Panel,Hr=c(98423),Ar=c(53124),Cr=c(33603),Zr=c(96159),$r=function(v){var Z=D.useContext(Ar.E_),m=Z.getPrefixCls,g=v.prefixCls,P=v.className,y=P===void 0?"":P,E=v.showArrow,x=E===void 0?!0:E,R=m("collapse",g),F=N()((0,t.Z)({},R+"-no-arrow",!x),y);return D.createElement(Mr.Panel,(0,u.Z)({},v,{prefixCls:R,className:F}))},Nr=$r,jr=c(33507),Kr=c(67968),wr=c(45503),Lr=c(14747),Wr=function(v){var Z,m,g,P,y=v.componentCls,E=v.collapseContentBg,x=v.padding,R=v.collapseContentPaddingHorizontal,F=v.collapseHeaderBg,$=v.collapseHeaderPadding,G=v.collapsePanelBorderRadius,X=v.lineWidth,V=v.lineType,Ce=v.colorBorder,Se=v.colorText,Ae=v.colorTextHeading,ce=v.colorTextDisabled,de=v.fontSize,ue=v.lineHeight,J=v.marginSM,be=v.paddingSM,Ze=v.motionDurationSlow,De=v.fontSizeIcon,Ie=X+"px "+V+" "+Ce;return(0,t.Z)({},y,(0,u.Z)((0,u.Z)({},(0,Lr.Wf)(v)),(P={backgroundColor:F,border:Ie,borderBottom:0,borderRadius:G+"px"},(0,t.Z)(P,"&-rtl",{direction:"rtl"}),(0,t.Z)(P,"& > "+y+"-item",(m={borderBottom:Ie},(0,t.Z)(m,"&:last-child",(0,t.Z)({},`
|
|
&,
|
|
& > `+y+"-header",{borderRadius:"0 0 "+G+"px "+G+"px"})),(0,t.Z)(m,"> "+y+"-header",(Z={position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:$,color:Ae,lineHeight:ue,cursor:"pointer",transition:"all "+Ze+", visibility 0s"},(0,t.Z)(Z,"> "+y+"-header-text",{flex:"auto"}),(0,t.Z)(Z,"&:focus",{outline:"none"}),(0,t.Z)(Z,y+"-expand-icon",{height:de*ue,display:"flex",alignItems:"center",paddingInlineEnd:J}),(0,t.Z)(Z,y+"-arrow",(0,u.Z)((0,u.Z)({},(0,Lr.Ro)()),{fontSize:De,svg:{transition:"transform "+Ze}})),(0,t.Z)(Z,y+"-header-text",{marginInlineEnd:"auto"}),Z)),(0,t.Z)(m,y+"-header-collapsible-only",(0,t.Z)({cursor:"default"},y+"-header-text",{flex:"none",cursor:"pointer"})),(0,t.Z)(m,y+"-icon-collapsible-only",(0,t.Z)({cursor:"default"},y+"-expand-icon",{cursor:"pointer"})),(0,t.Z)(m,"&"+y+"-no-arrow",(0,t.Z)({},"> "+y+"-header",{paddingInlineStart:be})),m)),(0,t.Z)(P,y+"-content",(g={color:Se,backgroundColor:E,borderTop:Ie},(0,t.Z)(g,"& > "+y+"-content-box",{padding:x+"px "+R+"px"}),(0,t.Z)(g,"&-hidden",{display:"none"}),g)),(0,t.Z)(P,y+"-item:last-child",(0,t.Z)({},"> "+y+"-content",{borderRadius:"0 0 "+G+"px "+G+"px"})),(0,t.Z)(P,"& "+y+"-item-disabled > "+y+"-header",(0,t.Z)({},`
|
|
&,
|
|
& > .arrow
|
|
`,{color:ce,cursor:"not-allowed"})),(0,t.Z)(P,"&"+y+"-icon-position-end",(0,t.Z)({},"& > "+y+"-item",(0,t.Z)({},"> "+y+"-header",(0,t.Z)({},y+"-expand-icon",{order:1,paddingInlineEnd:0,paddingInlineStart:J})))),P)))},Xr=function(v){var Z=v.componentCls,m="> "+Z+"-item > "+Z+"-header "+Z+"-arrow svg";return(0,t.Z)({},Z+"-rtl",(0,t.Z)({},m,{transform:"rotate(180deg)"}))},Me=function(v){var Z,m=v.componentCls,g=v.collapseHeaderBg,P=v.paddingXXS,y=v.colorBorder;return(0,t.Z)({},m+"-borderless",(Z={backgroundColor:g,border:0},(0,t.Z)(Z,"> "+m+"-item",{borderBottom:"1px solid "+y}),(0,t.Z)(Z,`
|
|
> `+m+`-item:last-child,
|
|
> `+m+"-item:last-child "+m+`-header
|
|
`,{borderRadius:0}),(0,t.Z)(Z,"> "+m+"-item:last-child",{borderBottom:0}),(0,t.Z)(Z,"> "+m+"-item > "+m+"-content",{backgroundColor:"transparent",borderTop:0}),(0,t.Z)(Z,"> "+m+"-item > "+m+"-content > "+m+"-content-box",{paddingTop:P}),Z))},Vr=function(v){var Z=v.componentCls,m=v.paddingSM;return(0,t.Z)({},Z+"-ghost",(0,t.Z)({backgroundColor:"transparent",border:0},"> "+Z+"-item",(0,t.Z)({borderBottom:0},"> "+Z+"-content",(0,t.Z)({backgroundColor:"transparent",border:0},"> "+Z+"-content-box",{paddingBlock:m}))))},Gr=(0,Kr.Z)("Collapse",function(O){var v=(0,wr.TS)(O,{collapseContentBg:O.colorBgContainer,collapseHeaderBg:O.colorFillAlter,collapseHeaderPadding:O.paddingSM+"px "+O.padding+"px",collapsePanelBorderRadius:O.borderRadiusLG,collapseContentPaddingHorizontal:16});return[Wr(v),Me(v),Vr(v),Xr(v),(0,jr.Z)(v)]}),tr=function(v){var Z,m=D.useContext(Ar.E_),g=m.getPrefixCls,P=m.direction,y=v.prefixCls,E=v.className,x=E===void 0?"":E,R=v.bordered,F=R===void 0?!0:R,$=v.ghost,G=v.expandIconPosition,X=G===void 0?"start":G,V=g("collapse",y),Ce=g(),Se=Gr(V),Ae=(0,s.Z)(Se,2),ce=Ae[0],de=Ae[1],ue=D.useMemo(function(){return X==="left"?"start":X==="right"?"end":X},[X]),J=function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=v.expandIcon,Be=ne?ne(re):D.createElement(ee.Z,{rotate:re.isActive?90:void 0});return(0,Zr.Tm)(Be,function(){return{className:N()(Be.props.className,V+"-arrow")}})},be=N()(V+"-icon-position-"+ue,(Z={},(0,t.Z)(Z,V+"-borderless",!F),(0,t.Z)(Z,V+"-rtl",P==="rtl"),(0,t.Z)(Z,V+"-ghost",!!$),Z),x,de),Ze=(0,u.Z)((0,u.Z)({},(0,Cr.ZP)(Ce)),{motionAppear:!1,leavedClassName:V+"-content-hidden"}),De=function(){var re=v.children;return(0,Te.Z)(re).map(function(ne,Be){var nr;if(!((nr=ne.props)===null||nr===void 0)&&nr.disabled){var xr=ne.key||String(Be),dr=ne.props,Yr=dr.disabled,Pr=dr.collapsible,Qr=(0,u.Z)((0,u.Z)({},(0,Hr.Z)(ne.props,["disabled"])),{key:xr,collapsible:Pr!=null?Pr:Yr?"disabled":void 0});return(0,Zr.Tm)(ne,Qr)}return ne})};return ce(D.createElement(Mr,(0,u.Z)({openMotion:Ze},v,{expandIcon:J,prefixCls:V,className:be}),De()))};tr.Panel=Nr;var Ur=tr,Jr=Ur},2058:function(Ee,le,c){"use strict";c.d(le,{Z:function(){return Ot}});var u=c(87462),t=c(67294),s=c(4942),ee=c(74165),ve=c(71002),N=c(74902),Y=c(97685),Re=c(94184),A=c.n(Re),se=c(15671),ze=c(43144),Ke=c(60136),Te=c(29388),D=c(91),We=c(15861),Oe=c(64217);function Xe(o,e){var n="cannot ".concat(o.method," ").concat(o.action," ").concat(e.status,"'"),r=new Error(n);return r.status=e.status,r.method=o.method,r.url=o.action,r}function _e(o){var e=o.responseText||o.response;if(!e)return e;try{return JSON.parse(e)}catch(n){return e}}function er(o){var e=new XMLHttpRequest;o.onProgress&&e.upload&&(e.upload.onprogress=function(l){l.total>0&&(l.percent=l.loaded/l.total*100),o.onProgress(l)});var n=new FormData;o.data&&Object.keys(o.data).forEach(function(i){var l=o.data[i];if(Array.isArray(l)){l.forEach(function(d){n.append("".concat(i,"[]"),d)});return}n.append(i,l)}),o.file instanceof Blob?n.append(o.filename,o.file,o.file.name):n.append(o.filename,o.file),e.onerror=function(l){o.onError(l)},e.onload=function(){return e.status<200||e.status>=300?o.onError(Xe(o,e),_e(e)):o.onSuccess(_e(e),e)},e.open(o.method,o.action,!0),o.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var r=o.headers||{};return r["X-Requested-With"]!==null&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach(function(i){r[i]!==null&&e.setRequestHeader(i,r[i])}),e.send(n),{abort:function(){e.abort()}}}var rr=+new Date,Tr=0;function sr(){return"rc-upload-".concat(rr,"-").concat(++Tr)}var Br=c(80334),cr=function(o,e){if(o&&e){var n=Array.isArray(e)?e:e.split(","),r=o.name||"",i=o.type||"",l=i.replace(/\/.*$/,"");return n.some(function(d){var a=d.trim();if(/^\*(\/\*)?$/.test(d))return!0;if(a.charAt(0)==="."){var C=r.toLowerCase(),p=a.toLowerCase(),f=[p];return(p===".jpg"||p===".jpeg")&&(f=[".jpg",".jpeg"]),f.some(function(h){return C.endsWith(h)})}return/\/\*$/.test(a)?l===a.replace(/\/.*$/,""):i===a?!0:/^\w+$/.test(a)?((0,Br.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(a,"'.Skip for check.")),!0):!1})}return!0};function yr(o,e){var n=o.createReader(),r=[];function i(){n.readEntries(function(l){var d=Array.prototype.slice.apply(l);r=r.concat(d);var a=!d.length;a?e(r):i()})}i()}var Or=function(e,n,r){var i=function l(d,a){d.path=a||"",d.isFile?d.file(function(C){r(C)&&(d.fullPath&&!C.webkitRelativePath&&(Object.defineProperties(C,{webkitRelativePath:{writable:!0}}),C.webkitRelativePath=d.fullPath.replace(/^\//,""),Object.defineProperties(C,{webkitRelativePath:{writable:!1}})),n([C]))}):d.isDirectory&&yr(d,function(C){C.forEach(function(p){l(p,"".concat(a).concat(d.name,"/"))})})};e.forEach(function(l){i(l.webkitGetAsEntry())})},Mr=Or,rt=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],Hr=function(o){(0,Ke.Z)(n,o);var e=(0,Te.Z)(n);function n(){var r;(0,se.Z)(this,n);for(var i=arguments.length,l=new Array(i),d=0;d<i;d++)l[d]=arguments[d];return r=e.call.apply(e,[this].concat(l)),r.state={uid:sr()},r.reqs={},r.fileInput=void 0,r._isMounted=void 0,r.onChange=function(a){var C=r.props,p=C.accept,f=C.directory,h=a.target.files,w=(0,N.Z)(h).filter(function(L){return!f||cr(L,p)});r.uploadFiles(w),r.reset()},r.onClick=function(a){var C=r.fileInput;if(!!C){var p=r.props,f=p.children,h=p.onClick;if(f&&f.type==="button"){var w=C.parentNode;w.focus(),w.querySelector("button").blur()}C.click(),h&&h(a)}},r.onKeyDown=function(a){a.key==="Enter"&&r.onClick(a)},r.onFileDrop=function(a){var C=r.props.multiple;if(a.preventDefault(),a.type!=="dragover")if(r.props.directory)Mr(Array.prototype.slice.call(a.dataTransfer.items),r.uploadFiles,function(f){return cr(f,r.props.accept)});else{var p=(0,N.Z)(a.dataTransfer.files).filter(function(f){return cr(f,r.props.accept)});C===!1&&(p=p.slice(0,1)),r.uploadFiles(p)}},r.uploadFiles=function(a){var C=(0,N.Z)(a),p=C.map(function(f){return f.uid=sr(),r.processFile(f,C)});Promise.all(p).then(function(f){var h=r.props.onBatchStart;h==null||h(f.map(function(w){var L=w.origin,z=w.parsedFile;return{file:L,parsedFile:z}})),f.filter(function(w){return w.parsedFile!==null}).forEach(function(w){r.post(w)})})},r.processFile=function(){var a=(0,We.Z)((0,ee.Z)().mark(function C(p,f){var h,w,L,z,Q,fe,K,ae,pe;return(0,ee.Z)().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(h=r.props.beforeUpload,w=p,!h){b.next=14;break}return b.prev=3,b.next=6,h(p,f);case 6:w=b.sent,b.next=12;break;case 9:b.prev=9,b.t0=b.catch(3),w=!1;case 12:if(w!==!1){b.next=14;break}return b.abrupt("return",{origin:p,parsedFile:null,action:null,data:null});case 14:if(L=r.props.action,typeof L!="function"){b.next=21;break}return b.next=18,L(p);case 18:z=b.sent,b.next=22;break;case 21:z=L;case 22:if(Q=r.props.data,typeof Q!="function"){b.next=29;break}return b.next=26,Q(p);case 26:fe=b.sent,b.next=30;break;case 29:fe=Q;case 30:return K=((0,ve.Z)(w)==="object"||typeof w=="string")&&w?w:p,K instanceof File?ae=K:ae=new File([K],p.name,{type:p.type}),pe=ae,pe.uid=p.uid,b.abrupt("return",{origin:p,data:fe,parsedFile:pe,action:z});case 35:case"end":return b.stop()}},C,null,[[3,9]])}));return function(C,p){return a.apply(this,arguments)}}(),r.saveFileInput=function(a){r.fileInput=a},r}return(0,ze.Z)(n,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(i){var l=this,d=i.data,a=i.origin,C=i.action,p=i.parsedFile;if(!!this._isMounted){var f=this.props,h=f.onStart,w=f.customRequest,L=f.name,z=f.headers,Q=f.withCredentials,fe=f.method,K=a.uid,ae=w||er,pe={action:C,filename:L,data:d,file:p,headers:z,withCredentials:Q,method:fe||"post",onProgress:function(b){var k=l.props.onProgress;k==null||k(b,p)},onSuccess:function(b,k){var te=l.props.onSuccess;te==null||te(b,p,k),delete l.reqs[K]},onError:function(b,k){var te=l.props.onError;te==null||te(b,k,p),delete l.reqs[K]}};h(a),this.reqs[K]=ae(pe)}}},{key:"reset",value:function(){this.setState({uid:sr()})}},{key:"abort",value:function(i){var l=this.reqs;if(i){var d=i.uid?i.uid:i;l[d]&&l[d].abort&&l[d].abort(),delete l[d]}else Object.keys(l).forEach(function(a){l[a]&&l[a].abort&&l[a].abort(),delete l[a]})}},{key:"render",value:function(){var i,l=this.props,d=l.component,a=l.prefixCls,C=l.className,p=l.disabled,f=l.id,h=l.style,w=l.multiple,L=l.accept,z=l.capture,Q=l.children,fe=l.directory,K=l.openFileDialogOnClick,ae=l.onMouseEnter,pe=l.onMouseLeave,oe=(0,D.Z)(l,rt),b=A()((i={},(0,s.Z)(i,a,!0),(0,s.Z)(i,"".concat(a,"-disabled"),p),(0,s.Z)(i,C,C),i)),k=fe?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},te=p?{}:{onClick:K?this.onClick:function(){},onKeyDown:K?this.onKeyDown:function(){},onMouseEnter:ae,onMouseLeave:pe,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return t.createElement(d,(0,u.Z)({},te,{className:b,role:"button",style:h}),t.createElement("input",(0,u.Z)({},(0,Oe.Z)(oe,{aria:!0,data:!0}),{id:f,type:"file",ref:this.saveFileInput,onClick:function(Ne){return Ne.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:L},k,{multiple:w,onChange:this.onChange},z!=null?{capture:z}:{})),Q)}}]),n}(t.Component),Ar=Hr;function Cr(){}var Zr=function(o){(0,Ke.Z)(n,o);var e=(0,Te.Z)(n);function n(){var r;(0,se.Z)(this,n);for(var i=arguments.length,l=new Array(i),d=0;d<i;d++)l[d]=arguments[d];return r=e.call.apply(e,[this].concat(l)),r.uploader=void 0,r.saveUploader=function(a){r.uploader=a},r}return(0,ze.Z)(n,[{key:"abort",value:function(i){this.uploader.abort(i)}},{key:"render",value:function(){return t.createElement(Ar,(0,u.Z)({},this.props,{ref:this.saveUploader}))}}]),n}(t.Component);Zr.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Cr,onError:Cr,onSuccess:Cr,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var $r=Zr,Nr=$r,jr=c(21770),Kr=c(73935),wr=c(53124),Lr=c(98866),Wr=c(77667),Xr=c(24457),Me=c(1413),Vr={icon:function(e,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:e}}]}},name:"file",theme:"twotone"},Gr=Vr,tr=c(84089),Ur=function(e,n){return t.createElement(tr.Z,(0,Me.Z)((0,Me.Z)({},e),{},{ref:n,icon:Gr}))};Ur.displayName="FileTwoTone";var Jr=t.forwardRef(Ur),O=c(50888),v={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"},Z=v,m=function(e,n){return t.createElement(tr.Z,(0,Me.Z)((0,Me.Z)({},e),{},{ref:n,icon:Z}))};m.displayName="PaperClipOutlined";var g=t.forwardRef(m),P={icon:function(e,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:e}},{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:e}}]}},name:"picture",theme:"twotone"},y=P,E=function(e,n){return t.createElement(tr.Z,(0,Me.Z)((0,Me.Z)({},e),{},{ref:n,icon:y}))};E.displayName="PictureTwoTone";var x=t.forwardRef(E),R=c(62874),F=c(71577),$=c(57838),G=c(33603),X=c(96159);function V(o){return(0,u.Z)((0,u.Z)({},o),{lastModified:o.lastModified,lastModifiedDate:o.lastModifiedDate,name:o.name,size:o.size,type:o.type,uid:o.uid,percent:0,originFileObj:o})}function Ce(o,e){var n=(0,N.Z)(e),r=n.findIndex(function(i){var l=i.uid;return l===o.uid});return r===-1?n.push(o):n[r]=o,n}function Se(o,e){var n=o.uid!==void 0?"uid":"name";return e.filter(function(r){return r[n]===o[n]})[0]}function Ae(o,e){var n=o.uid!==void 0?"uid":"name",r=e.filter(function(i){return i[n]!==o[n]});return r.length===e.length?null:r}var ce=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=e.split("/"),r=n[n.length-1],i=r.split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(i)||[""])[0]},de=function(e){return e.indexOf("image/")===0},ue=function(e){if(e.type&&!e.thumbUrl)return de(e.type);var n=e.thumbUrl||e.url||"",r=ce(n);return/^data:image\//.test(n)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(r)?!0:!(/^data:/.test(n)||r)},J=200;function be(o){return new Promise(function(e){if(!o.type||!de(o.type)){e("");return}var n=document.createElement("canvas");n.width=J,n.height=J,n.style.cssText="position: fixed; left: 0; top: 0; width: "+J+"px; height: "+J+"px; z-index: 9999; display: none;",document.body.appendChild(n);var r=n.getContext("2d"),i=new Image;if(i.onload=function(){var d=i.width,a=i.height,C=J,p=J,f=0,h=0;d>a?(p=a*(J/d),h=-(p-C)/2):(C=d*(J/a),f=-(C-p)/2),r.drawImage(i,f,h,C,p);var w=n.toDataURL();document.body.removeChild(n),e(w)},i.crossOrigin="anonymous",o.type.startsWith("image/svg+xml")){var l=new FileReader;l.addEventListener("load",function(){l.result&&(i.src=l.result)}),l.readAsDataURL(o)}else i.src=window.URL.createObjectURL(o)})}var Ze=c(48689),De={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"},Ie=De,re=function(e,n){return t.createElement(tr.Z,(0,Me.Z)((0,Me.Z)({},e),{},{ref:n,icon:Ie}))};re.displayName="DownloadOutlined";var ne=t.forwardRef(re),Be=c(99611),nr=c(69814),xr=c(83062),dr=t.forwardRef(function(o,e){var n=o.prefixCls,r=o.className,i=o.style,l=o.locale,d=o.listType,a=o.file,C=o.items,p=o.progress,f=o.iconRender,h=o.actionIconRender,w=o.itemRender,L=o.isImgUrl,z=o.showPreviewIcon,Q=o.showRemoveIcon,fe=o.showDownloadIcon,K=o.previewIcon,ae=o.removeIcon,pe=o.downloadIcon,oe=o.onPreview,b=o.onDownload,k=o.onClose,te,Fe,Ne=a.status,Ir=t.useState(Ne),He=(0,Y.Z)(Ir,2),we=He[0],ur=He[1];t.useEffect(function(){Ne!=="removed"&&ur(Ne)},[Ne]);var ar=t.useState(!1),pr=(0,Y.Z)(ar,2),vr=pr[0],Er=pr[1],Ve=t.useRef(null);t.useEffect(function(){return Ve.current=setTimeout(function(){Er(!0)},300),function(){Ve.current&&clearTimeout(Ve.current)}},[]);var Ge=f(a),Je=t.createElement("div",{className:n+"-icon"},Ge);if(d==="picture"||d==="picture-card")if(we==="uploading"||!a.thumbUrl&&!a.url){var Ye,fr=A()((Ye={},(0,s.Z)(Ye,n+"-list-item-thumbnail",!0),(0,s.Z)(Ye,n+"-list-item-file",we!=="uploading"),Ye));Je=t.createElement("div",{className:fr},Ge)}else{var xe,Rr=L!=null&&L(a)?t.createElement("img",{src:a.thumbUrl||a.url,alt:a.name,className:n+"-list-item-image",crossOrigin:a.crossOrigin}):Ge,mr=A()((xe={},(0,s.Z)(xe,n+"-list-item-thumbnail",!0),(0,s.Z)(xe,n+"-list-item-file",L&&!L(a)),xe));Je=t.createElement("a",{className:mr,onClick:function(ie){return oe(a,ie)},href:a.url||a.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Rr)}var q=A()(n+"-list-item",n+"-list-item-"+we),Dr=typeof a.linkProps=="string"?JSON.parse(a.linkProps):a.linkProps,or=Q?h((typeof ae=="function"?ae(a):ae)||t.createElement(Ze.Z,null),function(){return k(a)},n,l.removeFile):null,Le=fe&&we==="done"?h((typeof pe=="function"?pe(a):pe)||t.createElement(ne,null),function(){return b(a)},n,l.downloadFile):null,ir=d!=="picture-card"&&t.createElement("span",{key:"download-delete",className:A()(n+"-list-item-actions",{picture:d==="picture"})},Le,or),hr=A()(n+"-list-item-name"),Qe=a.url?[t.createElement("a",(0,u.Z)({key:"view",target:"_blank",rel:"noopener noreferrer",className:hr,title:a.name},Dr,{href:a.url,onClick:function(ie){return oe(a,ie)}}),a.name),ir]:[t.createElement("span",{key:"view",className:hr,onClick:function(ie){return oe(a,ie)},title:a.name},a.name),ir],$e={pointerEvents:"none",opacity:.5},ke=z?t.createElement("a",{href:a.url||a.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:a.url||a.thumbUrl?void 0:$e,onClick:function(ie){return oe(a,ie)},title:l.previewFile},typeof K=="function"?K(a):K||t.createElement(Be.Z,null)):null,gr=d==="picture-card"&&we!=="uploading"&&t.createElement("span",{className:n+"-list-item-actions"},ke,we==="done"&&Le,or),T=t.useContext(wr.E_),M=T.getPrefixCls,_=M(),me=t.createElement("div",{className:q},Je,Qe,gr,vr&&t.createElement(R.Z,{motionName:_+"-fade",visible:we==="uploading",motionDeadline:2e3},function(Ue){var ie=Ue.className,j="percent"in a?t.createElement(nr.Z,(0,u.Z)({},p,{type:"line",percent:a.percent})):null;return t.createElement("div",{className:A()(n+"-list-item-progress",ie)},j)})),Pe=a.response&&typeof a.response=="string"?a.response:((te=a.error)===null||te===void 0?void 0:te.statusText)||((Fe=a.error)===null||Fe===void 0?void 0:Fe.message)||l.uploadError,qe=we==="error"?t.createElement(xr.Z,{title:Pe,getPopupContainer:function(ie){return ie.parentNode}},me):me;return t.createElement("div",{className:A()(n+"-list-item-container",r),style:i,ref:e},w?w(qe,a,C,{download:b.bind(null,a),preview:oe.bind(null,a),remove:k.bind(null,a)}):qe)}),Yr=dr,Pr=function(e,n){var r,i=e.listType,l=i===void 0?"text":i,d=e.previewFile,a=d===void 0?be:d,C=e.onPreview,p=e.onDownload,f=e.onRemove,h=e.locale,w=e.iconRender,L=e.isImageUrl,z=L===void 0?ue:L,Q=e.prefixCls,fe=e.items,K=fe===void 0?[]:fe,ae=e.showPreviewIcon,pe=ae===void 0?!0:ae,oe=e.showRemoveIcon,b=oe===void 0?!0:oe,k=e.showDownloadIcon,te=k===void 0?!1:k,Fe=e.removeIcon,Ne=e.previewIcon,Ir=e.downloadIcon,He=e.progress,we=He===void 0?{strokeWidth:2,showInfo:!1}:He,ur=e.appendAction,ar=e.appendActionVisible,pr=ar===void 0?!0:ar,vr=e.itemRender,Er=(0,$.Z)(),Ve=t.useState(!1),Ge=(0,Y.Z)(Ve,2),Je=Ge[0],Ye=Ge[1];t.useEffect(function(){l!=="picture"&&l!=="picture-card"||(K||[]).forEach(function(T){typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(T.originFileObj instanceof File||T.originFileObj instanceof Blob)||T.thumbUrl!==void 0||(T.thumbUrl="",a&&a(T.originFileObj).then(function(M){T.thumbUrl=M||"",Er()}))})},[l,K,a]),t.useEffect(function(){Ye(!0)},[]);var fr=function(M,_){if(!!C)return _==null||_.preventDefault(),C(M)},xe=function(M){typeof p=="function"?p(M):M.url&&window.open(M.url)},Rr=function(M){f==null||f(M)},mr=function(M){if(w)return w(M,l);var _=M.status==="uploading",me=z&&z(M)?t.createElement(x,null):t.createElement(Jr,null),Pe=_?t.createElement(O.Z,null):t.createElement(g,null);return l==="picture"?Pe=_?t.createElement(O.Z,null):me:l==="picture-card"&&(Pe=_?h.uploading:me),Pe},q=function(M,_,me,Pe){var qe={type:"text",size:"small",title:Pe,onClick:function(j){_(),(0,X.l$)(M)&&M.props.onClick&&M.props.onClick(j)},className:me+"-list-item-action"};if((0,X.l$)(M)){var Ue=(0,X.Tm)(M,(0,u.Z)((0,u.Z)({},M.props),{onClick:function(){}}));return t.createElement(F.Z,(0,u.Z)({},qe,{icon:Ue}))}return t.createElement(F.Z,(0,u.Z)({},qe),t.createElement("span",null,M))};t.useImperativeHandle(n,function(){return{handlePreview:fr,handleDownload:xe}});var Dr=t.useContext(wr.E_),or=Dr.getPrefixCls,Le=or("upload",Q),ir=or(),hr=A()((r={},(0,s.Z)(r,Le+"-list",!0),(0,s.Z)(r,Le+"-list-"+l,!0),r)),Qe=(0,N.Z)(K.map(function(T){return{key:T.uid,file:T}})),$e=l==="picture-card"?"animate-inline":"animate",ke={motionDeadline:2e3,motionName:Le+"-"+$e,keys:Qe,motionAppear:Je},gr=(0,t.useMemo)(function(){var T=(0,u.Z)({},(0,G.ZP)(ir));return delete T.onAppearEnd,delete T.onEnterEnd,delete T.onLeaveEnd,T},[ir]);return l!=="picture-card"&&(ke=(0,u.Z)((0,u.Z)({},gr),ke)),t.createElement("div",{className:hr},t.createElement(R.V,(0,u.Z)({},ke,{component:!1}),function(T){var M=T.key,_=T.file,me=T.className,Pe=T.style;return t.createElement(Yr,{key:M,locale:h,prefixCls:Le,className:me,style:Pe,file:_,items:K,progress:we,listType:l,isImgUrl:z,showPreviewIcon:pe,showRemoveIcon:b,showDownloadIcon:te,removeIcon:Fe,previewIcon:Ne,downloadIcon:Ir,iconRender:mr,actionIconRender:q,itemRender:vr,onPreview:fr,onDownload:xe,onClose:Rr})}),ur&&t.createElement(R.Z,(0,u.Z)({},ke,{visible:pr,forceRender:!0}),function(T){var M=T.className,_=T.style;return(0,X.Tm)(ur,function(me){return{className:A()(me.className,M),style:(0,u.Z)((0,u.Z)((0,u.Z)({},_),{pointerEvents:M?"none":void 0}),me.style)}})}))},Qr=t.forwardRef(Pr),ct=Qr,dt=c(67968),ut=c(45503),pt=function(e){var n,r=e.componentCls,i=e.iconCls;return(0,s.Z)({},r+"-wrapper",(0,s.Z)({},r+"-drag",(n={position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:e.lineWidth+"px dashed "+e.colorBorder,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:"border-color "+e.motionDurationSlow},(0,s.Z)(n,r,{padding:e.padding+"px 0"}),(0,s.Z)(n,r+"-btn",{display:"table",width:"100%",height:"100%",outline:"none"}),(0,s.Z)(n,r+"-drag-container",{display:"table-cell",verticalAlign:"middle"}),(0,s.Z)(n,"&:not("+r+"-disabled):hover",{borderColor:e.colorPrimaryHover}),(0,s.Z)(n,"p"+r+"-drag-icon",(0,s.Z)({marginBottom:e.margin},i,{color:e.colorPrimary,fontSize:e.uploadThumbnailSize})),(0,s.Z)(n,"p"+r+"-text",{margin:"0 0 "+e.marginXXS+"px",color:e.colorTextHeading,fontSize:e.fontSizeLG}),(0,s.Z)(n,"p"+r+"-hint",{color:e.colorTextDescription,fontSize:e.fontSize}),(0,s.Z)(n,"&"+r+"-disabled",(0,s.Z)({cursor:"not-allowed"},"p"+r+"-drag-icon "+i+`,
|
|
p`+r+`-text,
|
|
p`+r+`-hint
|
|
`,{color:e.colorTextDisabled})),n)))},vt=pt,Sr=c(14747),ft=function(e){var n,r,i,l,d,a=e.componentCls,C=e.antCls,p=e.iconCls,f=e.fontSize,h=e.lineHeight,w=a+"-list-item",L=w+"-actions",z=w+"-action",Q=Math.round(f*h);return(0,s.Z)({},a+"-wrapper",(0,s.Z)({},a+"-list",(0,u.Z)((0,u.Z)({},(0,Sr.dF)()),(d={lineHeight:e.lineHeight},(0,s.Z)(d,w,(r={position:"relative",height:e.lineHeight*f,marginTop:e.marginXS,fontSize:f,display:"flex",alignItems:"center",transition:"background-color "+e.motionDurationSlow,"&:hover":{backgroundColor:e.controlItemBgHover}},(0,s.Z)(r,w+"-name",(0,u.Z)((0,u.Z)({},Sr.vS),{padding:"0 "+e.paddingXS+"px",lineHeight:h,flex:"auto",transition:"all "+e.motionDurationSlow})),(0,s.Z)(r,L,(n={},(0,s.Z)(n,z,{opacity:0}),(0,s.Z)(n,""+z+C+"-btn-sm",{height:Q,border:0,lineHeight:1,"> span":{transform:"scale(1)"}}),(0,s.Z)(n,`
|
|
`+z+`:focus,
|
|
&.picture `+z+`
|
|
`,{opacity:1}),(0,s.Z)(n,p,{color:e.colorTextDescription,transition:"all "+e.motionDurationSlow}),(0,s.Z)(n,"&:hover "+p,{color:e.colorText}),n)),(0,s.Z)(r,a+"-icon "+p,{color:e.colorTextDescription,fontSize:f}),(0,s.Z)(r,w+"-progress",{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:f+e.paddingXS,fontSize:f,lineHeight:0,pointerEvents:"none","> div":{margin:0}}),r)),(0,s.Z)(d,w+":hover "+z,{opacity:1,color:e.colorText}),(0,s.Z)(d,w+"-error",(l={color:e.colorError},(0,s.Z)(l,w+"-name, "+a+"-icon "+p,{color:e.colorError}),(0,s.Z)(l,L,(i={},(0,s.Z)(i,p+", "+p+":hover",{color:e.colorError}),(0,s.Z)(i,z,{opacity:1}),i)),l)),(0,s.Z)(d,a+"-list-item-container",{transition:"opacity "+e.motionDurationSlow+", height "+e.motionDurationSlow,"&::before":{display:"table",width:0,height:0,content:'""'}}),d))))},mt=ft,tt=c(66981),nt=new tt.E4("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),at=new tt.E4("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),ht=function(e){var n,r=e.componentCls,i=r+"-animate-inline";return[(0,s.Z)({},r+"-wrapper",(n={},(0,s.Z)(n,i+"-appear, "+i+"-enter, "+i+"-leave",{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"}),(0,s.Z)(n,i+"-appear, "+i+"-enter",{animationName:nt}),(0,s.Z)(n,i+"-leave",{animationName:at}),n)),nt,at]},gt=ht,yt=c(10274),Ct=function(e){var n,r,i,l,d=e.componentCls,a=e.iconCls,C=e.uploadThumbnailSize,p=e.uploadProgressOffset,f=d+"-list",h=f+"-item";return(0,s.Z)({},d+"-wrapper",(0,s.Z)({},""+f+f+"-picture, "+f+f+"-picture-card",(l={},(0,s.Z)(l,h,(r={position:"relative",height:C+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:e.lineWidth+"px "+e.lineType+" "+e.colorBorder,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"}},(0,s.Z)(r,h+"-thumbnail",(0,u.Z)((0,u.Z)({},Sr.vS),(n={width:C,height:C,lineHeight:C+e.paddingSM+"px",textAlign:"center",flex:"none"},(0,s.Z)(n,a,{fontSize:e.fontSizeHeading2,color:e.colorPrimary}),(0,s.Z)(n,"img",{display:"block",width:"100%",height:"100%",overflow:"hidden"}),n))),(0,s.Z)(r,h+"-progress",{bottom:p,width:"calc(100% - "+e.paddingSM*2+"px)",marginTop:0,paddingInlineStart:C+e.paddingXS}),r)),(0,s.Z)(l,h+"-error",(0,s.Z)({borderColor:e.colorError},h+"-thumbnail "+a,(i={},(0,s.Z)(i,"svg path[fill='#e6f7ff']",{fill:e.colorErrorBg}),(0,s.Z)(i,"svg path[fill='#1890ff']",{fill:e.colorError}),i))),(0,s.Z)(l,h+"-uploading",(0,s.Z)({borderStyle:"dashed"},h+"-name",{marginBottom:p})),l)))},Zt=function(e){var n,r,i,l,d=e.componentCls,a=e.iconCls,C=e.fontSizeLG,p=e.colorTextLightSolid,f=d+"-list",h=f+"-item",w=e.uploadPicCardSize;return(0,s.Z)({},d+"-wrapper"+d+"-picture-card-wrapper",(0,u.Z)((0,u.Z)({},(0,Sr.dF)()),(l={display:"inline-block",width:"100%"},(0,s.Z)(l,""+d+d+"-select",(n={width:w,height:w,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:e.lineWidth+"px dashed "+e.colorBorder,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:"border-color "+e.motionDurationSlow},(0,s.Z)(n,"> "+d,{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"}),(0,s.Z)(n,"&:not("+d+"-disabled):hover",{borderColor:e.colorPrimary}),n)),(0,s.Z)(l,""+f+f+"-picture-card",(i={},(0,s.Z)(i,f+"-item-container",{display:"inline-block",width:w,height:w,marginBlock:"0 "+e.marginXS+"px",marginInline:"0 "+e.marginXS+"px",verticalAlign:"top"}),(0,s.Z)(i,"&::after",{display:"none"}),(0,s.Z)(i,h,{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:"calc(100% - "+e.paddingXS*2+"px)",height:"calc(100% - "+e.paddingXS*2+"px)",backgroundColor:e.colorBgMask,opacity:0,transition:"all "+e.motionDurationSlow,content:'" "'}}),(0,s.Z)(i,h+":hover",(0,s.Z)({},"&::before, "+h+"-actions",{opacity:1})),(0,s.Z)(i,h+"-actions",(0,s.Z)({position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:"all "+e.motionDurationSlow},a+"-eye, "+a+"-download, "+a+"-delete",{zIndex:10,width:C,margin:"0 "+e.marginXXS+"px",fontSize:C,cursor:"pointer",transition:"all "+e.motionDurationSlow})),(0,s.Z)(i,h+"-actions, "+h+"-actions:hover",(0,s.Z)({},a+"-eye, "+a+"-download, "+a+"-delete",{color:new yt.C(p).setAlpha(.65).toRgbString(),"&:hover":{color:p}})),(0,s.Z)(i,h+"-thumbnail, "+h+"-thumbnail img",{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"}),(0,s.Z)(i,h+"-name",{display:"none",textAlign:"center"}),(0,s.Z)(i,h+"-file + "+h+"-name",{position:"absolute",bottom:e.margin,display:"block",width:"calc(100% - "+e.paddingXS*2+"px)"}),(0,s.Z)(i,h+"-uploading",(r={},(0,s.Z)(r,"&"+h,{backgroundColor:e.colorFillAlter}),(0,s.Z)(r,"&::before, "+a+"-eye, "+a+"-download, "+a+"-delete",{display:"none"}),r)),(0,s.Z)(i,h+"-progress",{bottom:e.marginXL,width:"calc(100% - "+e.paddingXS*2+"px)",paddingInlineStart:0}),i)),l)))},wt=function(e){var n=e.componentCls;return(0,s.Z)({},n+"-rtl",{direction:"rtl"})},xt=wt,Pt=c(33507),St=function(e){var n,r=e.componentCls,i=e.colorTextDisabled;return(0,s.Z)({},r+"-wrapper",(0,u.Z)((0,u.Z)({},(0,Sr.Wf)(e)),(n={},(0,s.Z)(n,r,{outline:0,"input[type='file']":{cursor:"pointer"}}),(0,s.Z)(n,r+"-select",{display:"inline-block"}),(0,s.Z)(n,r+"-disabled",{color:i,cursor:"not-allowed"}),n)))},bt=(0,dt.Z)("Upload",function(o){var e=o.fontSizeHeading3,n=o.fontSize,r=o.lineHeight,i=o.lineWidth,l=o.controlHeightLG,d=Math.round(n*r),a=(0,ut.TS)(o,{uploadThumbnailSize:e*2,uploadProgressOffset:d/2+i,uploadPicCardSize:l*2.55});return[St(a),vt(a),Ct(a),Zt(a),mt(a),gt(a),xt(a),(0,Pt.Z)(a)]}),It=function(o,e,n,r){function i(l){return l instanceof n?l:new n(function(d){d(l)})}return new(n||(n=Promise))(function(l,d){function a(f){try{p(r.next(f))}catch(h){d(h)}}function C(f){try{p(r.throw(f))}catch(h){d(h)}}function p(f){f.done?l(f.value):i(f.value).then(a,C)}p((r=r.apply(o,e||[])).next())})},br="__LIST_IGNORE_"+Date.now()+"__",Et=function(e,n){var r=e.fileList,i=e.defaultFileList,l=e.onRemove,d=e.showUploadList,a=d===void 0?!0:d,C=e.listType,p=C===void 0?"text":C,f=e.onPreview,h=e.onDownload,w=e.onChange,L=e.onDrop,z=e.previewFile,Q=e.disabled,fe=e.locale,K=e.iconRender,ae=e.isImageUrl,pe=e.progress,oe=e.prefixCls,b=e.className,k=e.type,te=k===void 0?"select":k,Fe=e.children,Ne=e.style,Ir=e.itemRender,He=e.maxCount,we=e.data,ur=we===void 0?{}:we,ar=e.multiple,pr=ar===void 0?!1:ar,vr=e.action,Er=vr===void 0?"":vr,Ve=e.accept,Ge=Ve===void 0?"":Ve,Je=e.supportServerRender,Ye=Je===void 0?!0:Je,fr=t.useContext(Lr.Z),xe=Q!=null?Q:fr,Rr=(0,jr.Z)(i||[],{value:r,postState:function(I){return I!=null?I:[]}}),mr=(0,Y.Z)(Rr,2),q=mr[0],Dr=mr[1],or=t.useState("drop"),Le=(0,Y.Z)(or,2),ir=Le[0],hr=Le[1],Qe=t.useRef(null);t.useMemo(function(){var he=Date.now();(r||[]).forEach(function(I,B){!I.uid&&!Object.isFrozen(I)&&(I.uid="__AUTO__"+he+"_"+B+"__")})},[r]);var $e=function(I,B,W){var S=(0,N.Z)(B);He===1?S=S.slice(-1):He&&(S=S.slice(0,He)),(0,Kr.flushSync)(function(){Dr(S)});var U={file:I,fileList:S};W&&(U.event=W),w==null||w(U)},ke=function(I,B){return It(void 0,void 0,void 0,(0,ee.Z)().mark(function W(){var S,U,ge,ye;return(0,ee.Z)().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:if(S=e.beforeUpload,U=e.transformFile,ge=I,!S){H.next=13;break}return H.next=5,S(I,B);case 5:if(ye=H.sent,ye!==!1){H.next=8;break}return H.abrupt("return",!1);case 8:if(delete I[br],ye!==br){H.next=12;break}return Object.defineProperty(I,br,{value:!0,configurable:!0}),H.abrupt("return",!1);case 12:(0,ve.Z)(ye)==="object"&&ye&&(ge=ye);case 13:if(!U){H.next=17;break}return H.next=16,U(ge);case 16:ge=H.sent;case 17:return H.abrupt("return",ge);case 18:case"end":return H.stop()}},W)}))},gr=function(I){var B=I.filter(function(U){return!U.file[br]});if(!!B.length){var W=B.map(function(U){return V(U.file)}),S=(0,N.Z)(q);W.forEach(function(U){S=Ce(U,S)}),W.forEach(function(U,ge){var ye=U;if(B[ge].parsedFile)U.status="uploading";else{var je=U.originFileObj,H;try{H=new File([je],je.name,{type:je.type})}catch(st){H=new Blob([je],{type:je.type}),H.name=je.name,H.lastModifiedDate=new Date,H.lastModified=new Date().getTime()}H.uid=U.uid,ye=H}$e(ye,S)})}},T=function(I,B,W){try{typeof I=="string"&&(I=JSON.parse(I))}catch(ge){}if(!!Se(B,q)){var S=V(B);S.status="done",S.percent=100,S.response=I,S.xhr=W;var U=Ce(S,q);$e(S,U)}},M=function(I,B){if(!!Se(B,q)){var W=V(B);W.status="uploading",W.percent=I.percent;var S=Ce(W,q);$e(W,S,I)}},_=function(I,B,W){if(!!Se(W,q)){var S=V(W);S.error=I,S.response=B,S.status="error";var U=Ce(S,q);$e(S,U)}},me=function(I){var B;Promise.resolve(typeof l=="function"?l(I):l).then(function(W){var S;if(W!==!1){var U=Ae(I,q);U&&(B=(0,u.Z)((0,u.Z)({},I),{status:"removed"}),q==null||q.forEach(function(ge){var ye=B.uid!==void 0?"uid":"name";ge[ye]===B[ye]&&!Object.isFrozen(ge)&&(ge.status="removed")}),(S=Qe.current)===null||S===void 0||S.abort(B),$e(B,U))}})},Pe=function(I){hr(I.type),I.type==="drop"&&(L==null||L(I))};t.useImperativeHandle(n,function(){return{onBatchStart:gr,onSuccess:T,onProgress:M,onError:_,fileList:q,upload:Qe.current}});var qe=t.useContext(wr.E_),Ue=qe.getPrefixCls,ie=qe.direction,j=Ue("upload",oe),Fr=(0,u.Z)((0,u.Z)({onBatchStart:gr,onError:_,onProgress:M,onSuccess:T},e),{data:ur,multiple:pr,action:Er,accept:Ge,supportServerRender:Ye,prefixCls:j,disabled:xe,beforeUpload:ke,onChange:void 0});delete Fr.className,delete Fr.style,(!Fe||xe)&&delete Fr.id;var Mt=bt(j),it=(0,Y.Z)(Mt,2),qr=it[0],zr=it[1],_r=function(I,B){return a?t.createElement(Wr.Z,{componentName:"Upload",defaultLocale:Xr.Z.Upload},function(W){var S=typeof a=="boolean"?{}:a,U=S.showRemoveIcon,ge=S.showPreviewIcon,ye=S.showDownloadIcon,je=S.removeIcon,H=S.previewIcon,st=S.downloadIcon;return t.createElement(ct,{prefixCls:j,listType:p,items:q,previewFile:z,onPreview:f,onDownload:h,onRemove:me,showRemoveIcon:!xe&&U,showPreviewIcon:ge,showDownloadIcon:ye,removeIcon:je,previewIcon:H,downloadIcon:st,iconRender:K,locale:(0,u.Z)((0,u.Z)({},W),fe),isImageUrl:ae,progress:pe,appendAction:I,appendActionVisible:B,itemRender:Ir})}):I},et=(0,s.Z)({},j+"-rtl",ie==="rtl");if(te==="drag"){var lr,At=A()(j,(lr={},(0,s.Z)(lr,j+"-drag",!0),(0,s.Z)(lr,j+"-drag-uploading",q.some(function(he){return he.status==="uploading"})),(0,s.Z)(lr,j+"-drag-hover",ir==="dragover"),(0,s.Z)(lr,j+"-disabled",xe),(0,s.Z)(lr,j+"-rtl",ie==="rtl"),lr),zr);return qr(t.createElement("span",{className:A()(j+"-wrapper",et,b,zr)},t.createElement("div",{className:At,onDrop:Pe,onDragOver:Pe,onDragLeave:Pe,style:Ne},t.createElement(Nr,(0,u.Z)({},Fr,{ref:Qe,className:j+"-btn"}),t.createElement("div",{className:j+"-drag-container"},Fe))),_r()))}var Nt=A()(j,j+"-select",(0,s.Z)({},j+"-disabled",xe)),Lt=function(I){return t.createElement("div",{className:Nt,style:I},t.createElement(Nr,(0,u.Z)({},Fr,{ref:Qe})))},lt=Lt(Fe?void 0:{display:"none"});return qr(p==="picture-card"?t.createElement("span",{className:A()(j+"-wrapper",j+"-picture-card-wrapper",et,b,zr)},_r(lt,!!Fe)):t.createElement("span",{className:A()(j+"-wrapper",et,b,zr)},lt,_r()))},Rt=t.forwardRef(Et),ot=Rt,Dt=function(o,e){var n={};for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&e.indexOf(r)<0&&(n[r]=o[r]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(o);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(o,r[i])&&(n[r[i]]=o[r[i]]);return n},Ft=t.forwardRef(function(o,e){var n=o.style,r=o.height,i=Dt(o,["style","height"]);return t.createElement(ot,(0,u.Z)({ref:e},i,{type:"drag",style:(0,u.Z)((0,u.Z)({},n),{height:r})}))}),Tt=Ft,kr=ot;kr.Dragger=Tt,kr.LIST_IGNORE=br;var Ot=kr},5200:function(Ee){function le(c){if(c==null)throw new TypeError("Cannot destructure undefined")}Ee.exports=le,Ee.exports.__esModule=!0,Ee.exports.default=Ee.exports}}]);
|