@emailmaker/emailmaker 1.0.101-alpha.2 → 1.0.101-alpha.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/README.md +2 -1
- package/asset-manifest.json +34 -33
- package/emailmaker-esm.js +1 -1
- package/emailmaker.d.ts +37 -20
- package/emailmaker.js +1 -1
- package/iframe/429.js +1 -1
- package/iframe/766.js +1 -1
- package/iframe/iframe-eblock.23c21a44a5dc8a1c4e79.html +1 -1
- package/iframe/iframe.23c21a44a5dc8a1c4e79.html +1 -1
- package/iframe/js/330.a0aeb747.js +1 -0
- package/iframe/sandbox-eblock.js +1 -1
- package/iframe/sandbox.js +1 -1
- package/package.json +1 -1
- package/plugin.html +1 -1
- package/plugin_blocks_test.html +1 -1
- package/plugin_default.html +1 -1
- package/plugin_default_config.html +666 -0
- package/plugin_idigital.html +1 -1
- package/plugin_nota.html +1 -1
- package/plugin_s.html +1 -1
- package/static/css/3435.162aa635.chunk.css +1 -0
- package/static/css/9638.d75174cf.chunk.css +1 -0
- package/static/js/2195.3f4b43e5.js +2 -0
- package/static/js/{9332.dc949fd3.js.LICENSE.txt → 2195.3f4b43e5.js.LICENSE.txt} +0 -7
- package/static/js/2200.42d4f2e8.js +2 -0
- package/static/js/{2897.21033685.js → 2897.745c5a53.js} +2 -2
- package/static/js/{3017.64a47f09.js → 3017.d27d1e16.js} +1 -1
- package/static/js/3435.43ded9f9.js +1 -0
- package/static/js/4574.2e8b86e3.js +1 -0
- package/static/js/{4972.a230fee4.js → 4972.d9c59bfc.js} +1 -1
- package/static/js/5447.b9977073.js +2 -0
- package/static/js/{6501.ce1c1684.js → 6501.6c1b1685.js} +1 -1
- package/static/js/6819.3e90e2de.js +2 -0
- package/static/js/7419.39384410.js +2 -0
- package/static/js/{84.c021c849.js → 84.efd34783.js} +1 -1
- package/static/js/9544.70c0ba76.js +2 -0
- package/static/js/{3473.abdeb8f7.js.LICENSE.txt → 9544.70c0ba76.js.LICENSE.txt} +0 -2
- package/static/js/9638.af70e006.js +2 -0
- package/static/js/{6798.4b7584f2.js.LICENSE.txt → 9638.af70e006.js.LICENSE.txt} +0 -7
- package/static/js/9795.84aa32d9.js +2 -0
- package/static/js/{2624.c73e6966.js.LICENSE.txt → 9795.84aa32d9.js.LICENSE.txt} +7 -0
- package/static/js/{emailmaker_core.ea526523.js → emailmaker_core.210811cd.js} +2 -2
- package/static/media/xa.8e9f984ff84e3f51c6f6.png +0 -0
- package/translations.pot +340 -336
- package/iframe/js/330.5b87e8cb.js +0 -1
- package/static/css/3435.6e12750c.chunk.css +0 -1
- package/static/css/6798.4b23f0cb.chunk.css +0 -1
- package/static/js/2624.c73e6966.js +0 -2
- package/static/js/3435.b0aac1ed.js +0 -1
- package/static/js/3473.abdeb8f7.js +0 -2
- package/static/js/5447.173960c2.js +0 -2
- package/static/js/6655.b54ad4d6.js +0 -2
- package/static/js/6798.4b7584f2.js +0 -2
- package/static/js/6819.c2bea9e8.js +0 -2
- package/static/js/7419.28b3875c.js +0 -2
- package/static/js/9332.dc949fd3.js +0 -2
- package/static/js/9981.1dda98a3.js +0 -1
- package/static/media/tw.823a7736ac2d82815c71.png +0 -0
- /package/iframe/js/{330.5b87e8cb.js.LICENSE.txt → 330.a0aeb747.js.LICENSE.txt} +0 -0
- /package/static/js/{6655.b54ad4d6.js.LICENSE.txt → 2200.42d4f2e8.js.LICENSE.txt} +0 -0
- /package/static/js/{2897.21033685.js.LICENSE.txt → 2897.745c5a53.js.LICENSE.txt} +0 -0
- /package/static/js/{5447.173960c2.js.LICENSE.txt → 5447.b9977073.js.LICENSE.txt} +0 -0
- /package/static/js/{6819.c2bea9e8.js.LICENSE.txt → 6819.3e90e2de.js.LICENSE.txt} +0 -0
- /package/static/js/{7419.28b3875c.js.LICENSE.txt → 7419.39384410.js.LICENSE.txt} +0 -0
- /package/static/js/{emailmaker_core.ea526523.js.LICENSE.txt → emailmaker_core.210811cd.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 7419.28b3875c.js.LICENSE.txt */
|
|
2
|
-
"use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[7419],{5889:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(9793),r=n(98173);const i={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"};var a=n(8880),l=function(e,t){return r.createElement(a.A,(0,o.A)({},e,{ref:t,icon:i}))};const s=r.forwardRef(l)},6476:(e,t,n)=>{n.d(t,{A:()=>te});var o=n(98173),r=n(63448),i=n(36236),a=n(42567),l=n(80320),s=n(85591),c=n.n(s),u=n(89408),p=n(5462),d=n(9793),m=n(2250),h=n(64916),f={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},g=function(){var e=(0,o.useRef)([]),t=(0,o.useRef)(null);return(0,o.useEffect)(function(){var n=Date.now(),o=!1;e.current.forEach(function(e){if(e){o=!0;var r=e.style;r.transitionDuration=".3s, .3s, .3s, .06s",t.current&&n-t.current<100&&(r.transitionDuration="0s, 0s")}}),o&&(t.current=Date.now())}),e.current};var v=n(53575),b=n(712),y=n(15717),w=0,$=(0,y.A)();const C=function(e){var t=o.useState(),n=(0,b.A)(t,2),r=n[0],i=n[1];return o.useEffect(function(){i("rc_progress_".concat(function(){var e;return $?(e=w,w+=1):e="TEST_OR_SSR",e}()))},[]),e||r};var E=function(e){var t=e.bg,n=e.children;return o.createElement("div",{style:{width:"100%",height:"100%",background:t}},n)};function k(e,t){return Object.keys(e).map(function(n){var o=parseFloat(n),r="".concat(Math.floor(o*t),"%");return"".concat(e[n]," ").concat(r)})}const S=o.forwardRef(function(e,t){var n=e.prefixCls,r=e.color,i=e.gradientId,a=e.radius,l=e.style,s=e.ptg,c=e.strokeLinecap,u=e.strokeWidth,p=e.size,d=e.gapDegree,m=r&&"object"===(0,v.A)(r),h=m?"#FFF":void 0,f=p/2,g=o.createElement("circle",{className:"".concat(n,"-circle-path"),r:a,cx:f,cy:f,stroke:h,strokeLinecap:c,strokeWidth:u,opacity:0===s?0:1,style:l,ref:t});if(!m)return g;var b="".concat(i,"-conic"),y=d?"".concat(180+d/2,"deg"):"0deg",w=k(r,(360-d)/360),$=k(r,1),C="conic-gradient(from ".concat(y,", ").concat(w.join(", "),")"),S="linear-gradient(to ".concat(d?"bottom":"top",", ").concat($.join(", "),")");return o.createElement(o.Fragment,null,o.createElement("mask",{id:b},g),o.createElement("foreignObject",{x:0,y:0,width:p,height:p,mask:"url(#".concat(b,")")},o.createElement(E,{bg:S},o.createElement(E,{bg:C}))))});var O=100,x=function(e,t,n,o,r,i,a,l,s,c){var u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,p=n/100*360*((360-i)/360),d=0===i?0:{bottom:0,top:180,left:90,right:-90}[a],m=(100-o)/100*t;"round"===s&&100!==o&&(m+=c/2)>=t&&(m=t-.01);return{stroke:"string"===typeof l?l:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:m+u,transform:"rotate(".concat(r+p+d,"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"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}},A=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function D(e){var t=null!==e&&void 0!==e?e:[];return Array.isArray(t)?t:[t]}const j=function(e){var t=(0,m.A)((0,m.A)({},f),e),n=t.id,r=t.prefixCls,i=t.steps,a=t.strokeWidth,l=t.trailWidth,s=t.gapDegree,u=void 0===s?0:s,p=t.gapPosition,b=t.trailColor,y=t.strokeLinecap,w=t.style,$=t.className,E=t.strokeColor,k=t.percent,j=(0,h.A)(t,A),R=C(n),I="".concat(R,"-gradient"),T=50-a/2,L=2*Math.PI*T,P=u>0?90+u/2:-90,N=L*((360-u)/360),M="object"===(0,v.A)(i)?i:{count:i,space:2},F=M.count,z=M.space,_=D(k),H=D(E),B=H.find(function(e){return e&&"object"===(0,v.A)(e)}),U=B&&"object"===(0,v.A)(B)?"butt":y,W=x(L,N,0,100,P,u,p,b,U,a),X=g();return o.createElement("svg",(0,d.A)({className:c()("".concat(r,"-circle"),$),viewBox:"0 0 ".concat(O," ").concat(O),style:w,id:n,role:"presentation"},j),!F&&o.createElement("circle",{className:"".concat(r,"-circle-trail"),r:T,cx:50,cy:50,stroke:b,strokeLinecap:U,strokeWidth:l||a,style:W}),F?function(){var e=Math.round(F*(_[0]/100)),t=100/F,n=0;return new Array(F).fill(null).map(function(i,l){var s=l<=e-1?H[0]:b,c=s&&"object"===(0,v.A)(s)?"url(#".concat(I,")"):void 0,d=x(L,N,n,t,P,u,p,s,"butt",a,z);return n+=100*(N-d.strokeDashoffset+z)/N,o.createElement("circle",{key:l,className:"".concat(r,"-circle-path"),r:T,cx:50,cy:50,stroke:c,strokeWidth:a,opacity:1,style:d,ref:function(e){X[l]=e}})})}():function(){var e=0;return _.map(function(t,n){var i=H[n]||H[H.length-1],l=x(L,N,e,t,P,u,p,i,U,a);return e+=t,o.createElement(S,{key:n,color:i,ptg:t,radius:T,prefixCls:r,gradientId:I,style:l,strokeLinecap:U,strokeWidth:a,gapDegree:u,ref:function(e){X[n]=e},size:O})}).reverse()}())};var R=n(13785),I=n(46695);function T(e){return!e||e<0?0:e>100?100:e}function L(e){let{success:t,successPercent:n}=e,o=n;return t&&"progress"in t&&(o=t.progress),t&&"percent"in t&&(o=t.percent),o}const P=e=>{let{percent:t,success:n,successPercent:o}=e;const r=T(L({success:n,successPercent:o}));return[r,T(T(t)-r)]},N=(e,t,n)=>{var o,r,i,a;let l=-1,s=-1;if("step"===t){const t=n.steps,o=n.strokeWidth;"string"===typeof e||"undefined"===typeof e?(l="small"===e?2:14,s=null!==o&&void 0!==o?o:8):"number"===typeof e?[l,s]=[e,e]:[l=14,s=8]=e,l*=t}else if("line"===t){const t=null===n||void 0===n?void 0:n.strokeWidth;"string"===typeof e||"undefined"===typeof e?s=t||("small"===e?6:8):"number"===typeof e?[l,s]=[e,e]:[l=-1,s=8]=e}else"circle"!==t&&"dashboard"!==t||("string"===typeof e||"undefined"===typeof e?[l,s]="small"===e?[60,60]:[120,120]:"number"===typeof e?[l,s]=[e,e]:(l=null!==(r=null!==(o=e[0])&&void 0!==o?o:e[1])&&void 0!==r?r:120,s=null!==(a=null!==(i=e[0])&&void 0!==i?i:e[1])&&void 0!==a?a:120));return[l,s]},M=e=>{const{prefixCls:t,trailColor:n=null,strokeLinecap:r="round",gapPosition:i,gapDegree:a,width:l=120,type:s,children:u,success:p,size:d=l}=e,[m,h]=N(d,"circle");let{strokeWidth:f}=e;void 0===f&&(f=Math.max((e=>3/e*100)(m),6));const g={width:m,height:h,fontSize:.15*m+6},v=o.useMemo(()=>a||0===a?a:"dashboard"===s?75:void 0,[a,s]),b=i||"dashboard"===s&&"bottom"||void 0,y="[object Object]"===Object.prototype.toString.call(e.strokeColor),w=(e=>{let{success:t={},strokeColor:n}=e;const{strokeColor:o}=t;return[o||I.uy.green,n||null]})({success:p,strokeColor:e.strokeColor}),$=c()(`${t}-inner`,{[`${t}-circle-gradient`]:y}),C=o.createElement(j,{percent:P(e),strokeWidth:f,trailWidth:f,strokeColor:w,strokeLinecap:r,trailColor:n,prefixCls:t,gapDegree:v,gapPosition:b});return o.createElement("div",{className:$,style:g},m<=20?o.createElement(R.A,{title:u},o.createElement("span",null,C)):o.createElement(o.Fragment,null,C,u))};var F=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const z=(e,t)=>{const{from:n=I.uy.blue,to:o=I.uy.blue,direction:r=("rtl"===t?"to left":"to right")}=e,i=F(e,["from","to","direction"]);if(0!==Object.keys(i).length){return{backgroundImage:`linear-gradient(${r}, ${(e=>{let t=[];return Object.keys(e).forEach(n=>{const o=parseFloat(n.replace(/%/g,""));isNaN(o)||t.push({key:o,value:e[n]})}),t=t.sort((e,t)=>e.key-t.key),t.map(e=>{let{key:t,value:n}=e;return`${n} ${t}%`}).join(", ")})(i)})`}}return{backgroundImage:`linear-gradient(${r}, ${n}, ${o})`}},_=e=>{const{prefixCls:t,direction:n,percent:r,size:i,strokeWidth:a,strokeColor:l,strokeLinecap:s="round",children:c,trailColor:u=null,success:p}=e,d=l&&"string"!==typeof l?z(l,n):{backgroundColor:l},m="square"===s||"butt"===s?0:void 0,h={backgroundColor:u||void 0,borderRadius:m},f=null!==i&&void 0!==i?i:[-1,a||("small"===i?6:8)],[g,v]=N(f,"line",{strokeWidth:a});const b=Object.assign({width:`${T(r)}%`,height:v,borderRadius:m},d),y=L(e),w={width:`${T(y)}%`,height:v,borderRadius:m,backgroundColor:null===p||void 0===p?void 0:p.strokeColor},$={width:g<0?"100%":g,height:v};return o.createElement(o.Fragment,null,o.createElement("div",{className:`${t}-outer`,style:$},o.createElement("div",{className:`${t}-inner`,style:h},o.createElement("div",{className:`${t}-bg`,style:b}),void 0!==y?o.createElement("div",{className:`${t}-success-bg`,style:w}):null)),c)},H=e=>{const{size:t,steps:n,percent:r=0,strokeWidth:i=8,strokeColor:a,trailColor:l=null,prefixCls:s,children:u}=e,p=Math.round(n*(r/100)),d=null!==t&&void 0!==t?t:["small"===t?2:14,i],[m,h]=N(d,"step",{steps:n,strokeWidth:i}),f=m/n,g=new Array(n);for(let v=0;v<n;v++){const e=Array.isArray(a)?a[v]:a;g[v]=o.createElement("div",{key:v,className:c()(`${s}-steps-item`,{[`${s}-steps-item-active`]:v<=p-1}),style:{backgroundColor:v<=p-1?e:l,width:f,height:h}})}return o.createElement("div",{className:`${s}-steps-outer`},g,u)};var B=n(12602),U=n(76660),W=n(33456),X=n(41887);const Y=e=>{const t=e?"100%":"-100%";return new B.Mo(`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}})},q=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:Object.assign(Object.assign({},(0,U.dF)(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize,marginInlineEnd:e.marginXS,marginBottom:e.marginXS},[`${t}-outer`]:{display:"inline-block",width:"100%"},[`&${t}-show-info`]:{[`${t}-outer`]:{marginInlineEnd:`calc(-2em - ${e.marginXS}px)`,paddingInlineEnd:`calc(2em + ${e.paddingXS}px)`}},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",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",backgroundColor:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",width:"2em",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:Y(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:Y(!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}}})}},V=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.fontSize/e.fontSizeSM+"em"}},[`${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"}}}},G=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}}}}}},Q=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${n}`]:{fontSize:e.fontSizeSM}}}},J=(0,W.A)("Progress",e=>{const t=e.marginXXS/2,n=(0,X.h1)(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[q(n),V(n),G(n),Q(n)]},e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"}));var K=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const Z=["normal","exception","active","success"],ee=o.forwardRef((e,t)=>{const{prefixCls:n,className:s,rootClassName:d,steps:m,strokeColor:h,percent:f=0,size:g="default",showInfo:v=!0,type:b="line",status:y,format:w,style:$}=e,C=K(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),E=o.useMemo(()=>{var t,n;const o=L(e);return parseInt(void 0!==o?null===(t=null!==o&&void 0!==o?o:0)||void 0===t?void 0:t.toString():null===(n=null!==f&&void 0!==f?f:0)||void 0===n?void 0:n.toString(),10)},[f,e.success,e.successPercent]),k=o.useMemo(()=>!Z.includes(y)&&E>=100?"success":y||"normal",[y,E]),{getPrefixCls:S,direction:O,progress:x}=o.useContext(p.QO),A=S("progress",n),[D,j]=J(A),R=o.useMemo(()=>{if(!v)return null;const t=L(e);let n;const s="line"===b;return w||"exception"!==k&&"success"!==k?n=(w||(e=>`${e}%`))(T(f),T(t)):"exception"===k?n=s?o.createElement(a.A,null):o.createElement(l.A,null):"success"===k&&(n=s?o.createElement(r.A,null):o.createElement(i.A,null)),o.createElement("span",{className:`${A}-text`,title:"string"===typeof n?n:void 0},n)},[v,f,E,k,b,A,w]);const I=Array.isArray(h)?h[0]:h,P="string"===typeof h||Array.isArray(h)?h:void 0;let F;"line"===b?F=m?o.createElement(H,Object.assign({},e,{strokeColor:P,prefixCls:A,steps:m}),R):o.createElement(_,Object.assign({},e,{strokeColor:I,prefixCls:A,direction:O}),R):"circle"!==b&&"dashboard"!==b||(F=o.createElement(M,Object.assign({},e,{strokeColor:I,prefixCls:A,progressStatus:k}),R));const z=c()(A,`${A}-status-${k}`,`${A}-${("dashboard"===b?"circle":m&&"steps")||b}`,{[`${A}-inline-circle`]:"circle"===b&&N(g,"circle")[0]<=20,[`${A}-show-info`]:v,[`${A}-${g}`]:"string"===typeof g,[`${A}-rtl`]:"rtl"===O},null===x||void 0===x?void 0:x.className,s,d,j);return D(o.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},null===x||void 0===x?void 0:x.style),$),className:z,role:"progressbar","aria-valuenow":E},(0,u.A)(C,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),F))});const te=ee},20127:(e,t,n)=>{n.d(t,{A:()=>u});var o=n(98173),r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};var i=function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};var a="Pixel",l="Percent",s={unit:l,value:.8};function c(e){return"number"===typeof e?{unit:l,value:100*e}:"string"===typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:a,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:l,value:parseFloat(e)}:s:s}const u=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"===typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(n.props.scrollableTarget,null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>1.5*n.maxPullDownDistance||n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")})},n.onScrollListener=function(e){"function"===typeof n.props.onScroll&&setTimeout(function(){return n.props.onScroll&&n.props.onScroll(e)},0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,o){var r,i=!1,a=0;function l(){r&&clearTimeout(r)}function s(){var s=this,c=Date.now()-a,u=arguments;function p(){a=Date.now(),n.apply(s,u)}i||(o&&!r&&p(),l(),void 0===o&&c>e?p():!0!==t&&(r=setTimeout(o?function(){r=void 0}:p,void 0===o?e-c:e)))}return"boolean"!==typeof t&&(o=n,n=t,t=void 0),s.cancel=function(){l(),i=!0},s}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if("undefined"===typeof this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"===typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!==typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?i(i({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,o=c(t);return o.unit===a?e.scrollTop<=o.value+n-e.scrollHeight+1:e.scrollTop<=o.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,o=c(t);return o.unit===a?e.scrollTop+n>=e.scrollHeight-o.value:e.scrollTop+n>=o.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=i({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),r=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return o.createElement("div",{style:r,className:"infinite-scroll-component__outerdiv"},o.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&o.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},o.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(o.Component)},21867:(e,t,n)=>{n.d(t,{A:()=>p});var o=n(98173);function r(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i.apply(this,arguments)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0};class u extends o.Component{constructor(e){let t;super(e),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this),t=this.props.breakpointCols&&this.props.breakpointCols.default?this.props.breakpointCols.default:parseInt(this.props.breakpointCols)||2,this.state={columnCount:t}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){window&&window.requestAnimationFrame?(window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame(()=>{this.reCalculateColumnCount()})):this.reCalculateColumnCount()}reCalculateColumnCount(){const e=window&&window.innerWidth||1/0;let t=this.props.breakpointCols;"object"!==typeof t&&(t={default:parseInt(t)||2});let n=1/0,o=t.default||2;for(let r in t){const i=parseInt(r);i>0&&e<=i&&i<n&&(n=i,o=t[r])}o=Math.max(1,parseInt(o)||1),this.state.columnCount!==o&&this.setState({columnCount:o})}itemsInColumns(){const e=this.state.columnCount,t=new Array(e),n=o.Children.toArray(this.props.children);for(let o=0;o<n.length;o++){const r=o%e;t[r]||(t[r]=[]),t[r].push(n[o])}return t}renderColumns(){const{column:e,columnAttrs:t={},columnClassName:n}=this.props,r=this.itemsInColumns(),a=100/r.length+"%";let s=n;s&&"string"!==typeof s&&(this.logDeprecated('The property "columnClassName" requires a string'),"undefined"===typeof s&&(s="my-masonry-grid_column"));const c=l(l(l({},e),t),{},{style:l(l({},t.style),{},{width:a}),className:s});return r.map((e,t)=>o.createElement("div",i({},c,{key:t}),e))}logDeprecated(e){}render(){const e=this.props,{children:t,breakpointCols:n,columnClassName:a,columnAttrs:l,column:s,className:c}=e,u=r(e,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let p=c;return"string"!==typeof c&&(this.logDeprecated('The property "className" requires a string'),"undefined"===typeof c&&(p="my-masonry-grid")),o.createElement("div",i({},u,{className:p}),this.renderColumns())}}u.defaultProps=c;const p=u},55415:(e,t,n)=>{n.d(t,{A:()=>We});var o=n(98173),r=n(83912),i=n(85740),a=n(85591),l=n.n(a),s=n(9793),c=n(26786),u=n(96212),p=n(91586),d=n(8068),m=n(70908),h=n(64916),f=n(82542),g=n(53575),v=n(44980),b=n(14902);function y(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(n){return t}}function w(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(t){var o=e.data[t];Array.isArray(o)?o.forEach(function(e){n.append("".concat(t,"[]"),e)}):n.append(t,o)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),o=new Error(n);return o.status=t.status,o.method=e.method,o.url=e.action,o}(e,t),y(t)):e.onSuccess(y(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var o=e.headers||{};return null!==o["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(o).forEach(function(e){null!==o[e]&&t.setRequestHeader(e,o[e])}),t.send(n),{abort:function(){t.abort()}}}var $=+new Date,C=0;function E(){return"rc-upload-".concat($,"-").concat(++C)}var k=n(44449);const S=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),o=e.name||"",r=e.type||"",i=r.replace(/\/.*$/,"");return n.some(function(e){var t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if("."===t.charAt(0)){var n=o.toLowerCase(),a=t.toLowerCase(),l=[a];return".jpg"!==a&&".jpeg"!==a||(l=[".jpg",".jpeg"]),l.some(function(e){return n.endsWith(e)})}return/\/\*$/.test(t)?i===t.replace(/\/.*$/,""):r===t||!!/^\w+$/.test(t)&&((0,k.Ay)(!1,"Upload takes an invalidate 'accept' type '".concat(t,"'.Skip for check.")),!0)})}return!0};const O=function(e,t,n){var o=function e(o,r){o&&(o.path=r||"",o.isFile?o.file(function(e){n(e)&&(o.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=o.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))}):o.isDirectory&&function(e,t){var n=e.createReader(),o=[];!function e(){n.readEntries(function(n){var r=Array.prototype.slice.apply(n);o=o.concat(r),r.length?e():t(o)})}()}(o,function(t){t.forEach(function(t){e(t,"".concat(r).concat(o.name,"/"))})}))};e.forEach(function(e){o(e.webkitGetAsEntry())})};var x=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],A=function(e){(0,p.A)(n,e);var t=(0,d.A)(n);function n(){var e;(0,c.A)(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).state={uid:E()},e.reqs={},e.fileInput=void 0,e._isMounted=void 0,e.onChange=function(t){var n=e.props,o=n.accept,i=n.directory,a=t.target.files,l=(0,r.A)(a).filter(function(e){return!i||S(e,o)});e.uploadFiles(l),e.reset()},e.onClick=function(t){var n=e.fileInput;if(n){var o=t.target,r=e.props.onClick;if(o&&"BUTTON"===o.tagName)n.parentNode.focus(),o.blur();n.click(),r&&r(t)}},e.onKeyDown=function(t){"Enter"===t.key&&e.onClick(t)},e.onFileDrop=function(t){var n=e.props.multiple;if(t.preventDefault(),"dragover"!==t.type)if(e.props.directory)O(Array.prototype.slice.call(t.dataTransfer.items),e.uploadFiles,function(t){return S(t,e.props.accept)});else{var o=(0,r.A)(t.dataTransfer.files).filter(function(t){return S(t,e.props.accept)});!1===n&&(o=o.slice(0,1)),e.uploadFiles(o)}},e.uploadFiles=function(t){var n=(0,r.A)(t),o=n.map(function(t){return t.uid=E(),e.processFile(t,n)});Promise.all(o).then(function(t){var n=e.props.onBatchStart;null===n||void 0===n||n(t.map(function(e){return{file:e.origin,parsedFile:e.parsedFile}})),t.filter(function(e){return null!==e.parsedFile}).forEach(function(t){e.post(t)})})},e.processFile=function(){var t=(0,v.A)((0,f.A)().mark(function t(n,o){var r,i,a,l,s,c,u,p,d;return(0,f.A)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.props.beforeUpload,i=n,!r){t.next=14;break}return t.prev=3,t.next=6,r(n,o);case 6:i=t.sent,t.next=12;break;case 9:t.prev=9,t.t0=t.catch(3),i=!1;case 12:if(!1!==i){t.next=14;break}return t.abrupt("return",{origin:n,parsedFile:null,action:null,data:null});case 14:if("function"!==typeof(a=e.props.action)){t.next=21;break}return t.next=18,a(n);case 18:l=t.sent,t.next=22;break;case 21:l=a;case 22:if("function"!==typeof(s=e.props.data)){t.next=29;break}return t.next=26,s(n);case 26:c=t.sent,t.next=30;break;case 29:c=s;case 30:return u="object"!==(0,g.A)(i)&&"string"!==typeof i||!i?n:i,p=u instanceof File?u:new File([u],n.name,{type:n.type}),(d=p).uid=n.uid,t.abrupt("return",{origin:n,data:c,parsedFile:d,action:l});case 35:case"end":return t.stop()}},t,null,[[3,9]])}));return function(e,n){return t.apply(this,arguments)}}(),e.saveFileInput=function(t){e.fileInput=t},e}return(0,u.A)(n,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(e){var t=this,n=e.data,o=e.origin,r=e.action,i=e.parsedFile;if(this._isMounted){var a=this.props,l=a.onStart,s=a.customRequest,c=a.name,u=a.headers,p=a.withCredentials,d=a.method,m=o.uid,h=s||w,f={action:r,filename:c,data:n,file:i,headers:u,withCredentials:p,method:d||"post",onProgress:function(e){var n=t.props.onProgress;null===n||void 0===n||n(e,i)},onSuccess:function(e,n){var o=t.props.onSuccess;null===o||void 0===o||o(e,i,n),delete t.reqs[m]},onError:function(e,n){var o=t.props.onError;null===o||void 0===o||o(e,n,i),delete t.reqs[m]}};l(o),this.reqs[m]=h(f)}}},{key:"reset",value:function(){this.setState({uid:E()})}},{key:"abort",value:function(e){var t=this.reqs;if(e){var n=e.uid?e.uid:e;t[n]&&t[n].abort&&t[n].abort(),delete t[n]}else Object.keys(t).forEach(function(e){t[e]&&t[e].abort&&t[e].abort(),delete t[e]})}},{key:"render",value:function(){var e=this.props,t=e.component,n=e.prefixCls,r=e.className,i=e.disabled,a=e.id,c=e.style,u=e.multiple,p=e.accept,d=e.capture,f=e.children,g=e.directory,v=e.openFileDialogOnClick,y=e.onMouseEnter,w=e.onMouseLeave,$=(0,h.A)(e,x),C=l()((0,m.A)((0,m.A)((0,m.A)({},n,!0),"".concat(n,"-disabled"),i),r,r)),E=g?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},k=i?{}:{onClick:v?this.onClick:function(){},onKeyDown:v?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:w,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return o.createElement(t,(0,s.A)({},k,{className:C,role:"button",style:c}),o.createElement("input",(0,s.A)({},(0,b.A)($,{aria:!0,data:!0}),{id:a,disabled:i,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:p},E,{multiple:u,onChange:this.onChange},null!=d?{capture:d}:{})),f)}}]),n}(o.Component);const D=A;function j(){}var R=function(e){(0,p.A)(n,e);var t=(0,d.A)(n);function n(){var e;(0,c.A)(this,n);for(var o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))).uploader=void 0,e.saveUploader=function(t){e.uploader=t},e}return(0,u.A)(n,[{key:"abort",value:function(e){this.uploader.abort(e)}},{key:"render",value:function(){return o.createElement(D,(0,s.A)({},this.props,{ref:this.saveUploader}))}}]),n}(o.Component);R.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:j,onError:j,onSuccess:j,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};const I=R;var T=n(57144),L=n(5462),P=n(47886),N=n(46555),M=n(94609),F=n(76660),z=n(44800),_=n(33456),H=n(41887);const B=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{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}`,[t]:{padding:`${e.padding}px 0`},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`\n &:not(${t}-disabled):hover,\n &-hover:not(${t}-disabled)\n `]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${e.marginXXS}px`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${n},\n p${t}-text,\n p${t}-hint\n `]:{color:e.colorTextDisabled}}}}}},U=e=>{const{componentCls:t,antCls:n,iconCls:o,fontSize:r,lineHeight:i}=e,a=`${t}-list-item`,l=`${a}-actions`,s=`${a}-action`,c=Math.round(r*i);return{[`${t}-wrapper`]:{[`${t}-list`]:Object.assign(Object.assign({},(0,F.t6)()),{lineHeight:e.lineHeight,[a]:{position:"relative",height:e.lineHeight*r,marginTop:e.marginXS,fontSize:r,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${a}-name`]:Object.assign(Object.assign({},F.L9),{padding:`0 ${e.paddingXS}px`,lineHeight:i,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[l]:{[s]:{opacity:0},[`${s}${n}-btn-sm`]:{height:c,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`\n ${s}:focus-visible,\n &.picture ${s}\n `]:{opacity:1},[o]:{color:e.actionsColor,transition:`all ${e.motionDurationSlow}`},[`&:hover ${o}`]:{color:e.colorText}},[`${t}-icon ${o}`]:{color:e.colorTextDescription,fontSize:r},[`${a}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:r+e.paddingXS,fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${a}:hover ${s}`]:{opacity:1,color:e.colorText},[`${a}-error`]:{color:e.colorError,[`${a}-name, ${t}-icon ${o}`]:{color:e.colorError},[l]:{[`${o}, ${o}:hover`]:{color:e.colorError},[s]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}};var W=n(12602),X=n(83389);const Y=new W.Mo("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),q=new W.Mo("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),V=e=>{const{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:Y},[`${n}-leave`]:{animationName:q}}},{[`${t}-wrapper`]:(0,X.p9)(e)},Y,q]};var G=n(46695),Q=n(43507);const J=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:o,uploadProgressOffset:r}=e,i=`${t}-list`,a=`${i}-item`;return{[`${t}-wrapper`]:{[`\n ${i}${i}-picture,\n ${i}${i}-picture-card,\n ${i}${i}-picture-circle\n `]:{[a]:{position:"relative",height:o+2*e.lineWidth+2*e.paddingXS,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${a}-thumbnail`]:Object.assign(Object.assign({},F.L9),{width:o,height:o,lineHeight:`${o+e.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${a}-progress`]:{bottom:r,width:`calc(100% - ${2*e.paddingSM}px)`,marginTop:0,paddingInlineStart:o+e.paddingXS}},[`${a}-error`]:{borderColor:e.colorError,[`${a}-thumbnail ${n}`]:{[`svg path[fill='${G.z1[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${G.z1.primary}']`]:{fill:e.colorError}}},[`${a}-uploading`]:{borderStyle:"dashed",[`${a}-name`]:{marginBottom:r}}},[`${i}${i}-picture-circle ${a}`]:{[`&, &::before, ${a}-thumbnail`]:{borderRadius:"50%"}}}}},K=e=>{const{componentCls:t,iconCls:n,fontSizeLG:o,colorTextLightSolid:r}=e,i=`${t}-list`,a=`${i}-item`,l=e.uploadPicCardSize;return{[`\n ${t}-wrapper${t}-picture-card-wrapper,\n ${t}-wrapper${t}-picture-circle-wrapper\n `]:Object.assign(Object.assign({},(0,F.t6)()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:l,height:l,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}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${i}${i}-picture-card, ${i}${i}-picture-circle`]:{[`${i}-item-container`]:{display:"inline-block",width:l,height:l,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[a]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${2*e.paddingXS}px)`,height:`calc(100% - ${2*e.paddingXS}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${a}:hover`]:{[`&::before, ${a}-actions`]:{opacity:1}},[`${a}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:o,margin:`0 ${e.marginXXS}px`,fontSize:o,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,svg:{verticalAlign:"baseline"}}},[`${a}-actions, ${a}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new Q.q(r).setAlpha(.65).toRgbString(),"&:hover":{color:r}}},[`${a}-thumbnail, ${a}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${a}-name`]:{display:"none",textAlign:"center"},[`${a}-file + ${a}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${2*e.paddingXS}px)`},[`${a}-uploading`]:{[`&${a}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${a}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${2*e.paddingXS}px)`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}},Z=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},ee=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},(0,F.dF)(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},te=(0,_.A)("Upload",e=>{const{fontSizeHeading3:t,fontSize:n,lineHeight:o,lineWidth:r,controlHeightLG:i}=e,a=Math.round(n*o),l=(0,H.h1)(e,{uploadThumbnailSize:2*t,uploadProgressOffset:a/2+r,uploadPicCardSize:2.55*i});return[ee(l),B(l),J(l),K(l),U(l),V(l),Z(l),(0,z.A)(l)]},e=>({actionsColor:e.colorTextDescription}));const ne={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:t}},{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"};var oe=n(8880),re=function(e,t){return o.createElement(oe.A,(0,s.A)({},e,{ref:t,icon:ne}))};const ie=o.forwardRef(re);var ae=n(38826);const le={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"};var se=function(e,t){return o.createElement(oe.A,(0,s.A)({},e,{ref:t,icon:le}))};const ce=o.forwardRef(se);const ue={icon:function(e,t){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:t}},{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:t}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:t}},{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"};var pe=function(e,t){return o.createElement(oe.A,(0,s.A)({},e,{ref:t,icon:ue}))};const de=o.forwardRef(pe);var me=n(52039),he=n(69736),fe=n(72548),ge=n(66823),ve=n(37969);function be(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 ye(e,t){const n=(0,r.A)(t),o=n.findIndex(t=>{let{uid:n}=t;return n===e.uid});return-1===o?n.push(e):n[o]=e,n}function we(e,t){const n=void 0!==e.uid?"uid":"name";return t.filter(t=>t[n]===e[n])[0]}const $e=e=>0===e.indexOf("image/"),Ce=e=>{if(e.type&&!e.thumbUrl)return $e(e.type);const t=e.thumbUrl||e.url||"",n=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("/"),t=e[e.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(t)||[""])[0]}(t);return!(!/^data:image\//.test(t)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n))||!/^data:/.test(t)&&!n},Ee=200;function ke(e){return new Promise(t=>{if(!e.type||!$e(e.type))return void t("");const n=document.createElement("canvas");n.width=Ee,n.height=Ee,n.style.cssText="position: fixed; left: 0; top: 0; width: 200px; height: 200px; z-index: 9999; display: none;",document.body.appendChild(n);const o=n.getContext("2d"),r=new Image;if(r.onload=()=>{const{width:e,height:i}=r;let a=Ee,l=Ee,s=0,c=0;e>i?(l=i*(Ee/e),c=-(l-a)/2):(a=e*(Ee/i),s=-(a-l)/2),o.drawImage(r,s,c,a,l);const u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(r.src),t(u)},r.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const t=new FileReader;t.onload=()=>{t.result&&(r.src=t.result)},t.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const n=new FileReader;n.onload=()=>{n.result&&t(n.result)},n.readAsDataURL(e)}else r.src=window.URL.createObjectURL(e)})}var Se=n(40186);const Oe={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"};var xe=function(e,t){return o.createElement(oe.A,(0,s.A)({},e,{ref:t,icon:Oe}))};const Ae=o.forwardRef(xe);var De=n(67756),je=n(6476),Re=n(13785);const Ie=o.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,locale:a,listType:s,file:c,items:u,progress:p,iconRender:d,actionIconRender:m,itemRender:h,isImgUrl:f,showPreviewIcon:g,showRemoveIcon:v,showDownloadIcon:b,previewIcon:y,removeIcon:w,downloadIcon:$,onPreview:C,onDownload:E,onClose:k}=e;var S,O;const{status:x}=c,[A,D]=o.useState(x);o.useEffect(()=>{"removed"!==x&&D(x)},[x]);const[j,R]=o.useState(!1);o.useEffect(()=>{const e=setTimeout(()=>{R(!0)},300);return()=>{clearTimeout(e)}},[]);const I=d(c);let T=o.createElement("div",{className:`${n}-icon`},I);if("picture"===s||"picture-card"===s||"picture-circle"===s)if("uploading"===A||!c.thumbUrl&&!c.url){const e=l()(`${n}-list-item-thumbnail`,{[`${n}-list-item-file`]:"uploading"!==A});T=o.createElement("div",{className:e},I)}else{const e=(null===f||void 0===f?void 0:f(c))?o.createElement("img",{src:c.thumbUrl||c.url,alt:c.name,className:`${n}-list-item-image`,crossOrigin:c.crossOrigin}):I,t=l()(`${n}-list-item-thumbnail`,{[`${n}-list-item-file`]:f&&!f(c)});T=o.createElement("a",{className:t,onClick:e=>C(c,e),href:c.url||c.thumbUrl,target:"_blank",rel:"noopener noreferrer"},e)}const P=l()(`${n}-list-item`,`${n}-list-item-${A}`),N="string"===typeof c.linkProps?JSON.parse(c.linkProps):c.linkProps,M=v?m(("function"===typeof w?w(c):w)||o.createElement(Se.A,null),()=>k(c),n,a.removeFile):null,F=b&&"done"===A?m(("function"===typeof $?$(c):$)||o.createElement(Ae,null),()=>E(c),n,a.downloadFile):null,z="picture-card"!==s&&"picture-circle"!==s&&o.createElement("span",{key:"download-delete",className:l()(`${n}-list-item-actions`,{picture:"picture"===s})},F,M),_=l()(`${n}-list-item-name`),H=c.url?[o.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:_,title:c.name},N,{href:c.url,onClick:e=>C(c,e)}),c.name),z]:[o.createElement("span",{key:"view",className:_,onClick:e=>C(c,e),title:c.name},c.name),z],B=g?o.createElement("a",{href:c.url||c.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:c.url||c.thumbUrl?void 0:{pointerEvents:"none",opacity:.5},onClick:e=>C(c,e),title:a.previewFile},"function"===typeof y?y(c):y||o.createElement(De.A,null)):null,U=("picture-card"===s||"picture-circle"===s)&&"uploading"!==A&&o.createElement("span",{className:`${n}-list-item-actions`},B,"done"===A&&F,M),{getPrefixCls:W}=o.useContext(L.QO),X=W(),Y=o.createElement("div",{className:P},T,H,U,j&&o.createElement(me.Ay,{motionName:`${X}-fade`,visible:"uploading"===A,motionDeadline:2e3},e=>{let{className:t}=e;const r="percent"in c?o.createElement(je.A,Object.assign({},p,{type:"line",percent:c.percent,"aria-label":c["aria-label"],"aria-labelledby":c["aria-labelledby"]})):null;return o.createElement("div",{className:l()(`${n}-list-item-progress`,t)},r)})),q=c.response&&"string"===typeof c.response?c.response:(null===(S=c.error)||void 0===S?void 0:S.statusText)||(null===(O=c.error)||void 0===O?void 0:O.message)||a.uploadError,V="error"===A?o.createElement(Re.A,{title:q,getPopupContainer:e=>e.parentNode},Y):Y;return o.createElement("div",{className:l()(`${n}-list-item-container`,r),style:i,ref:t},h?h(V,c,u,{download:E.bind(null,c),preview:C.bind(null,c),remove:k.bind(null,c)}):V)}),Te=Ie,Le=(e,t)=>{const{listType:n="text",previewFile:i=ke,onPreview:a,onDownload:s,onRemove:c,locale:u,iconRender:p,isImageUrl:d=Ce,prefixCls:m,items:h=[],showPreviewIcon:f=!0,showRemoveIcon:g=!0,showDownloadIcon:v=!1,removeIcon:b,previewIcon:y,downloadIcon:w,progress:$={size:[-1,2],showInfo:!1},appendAction:C,appendActionVisible:E=!0,itemRender:k,disabled:S}=e,O=(0,he.A)(),[x,A]=o.useState(!1);o.useEffect(()=>{"picture"!==n&&"picture-card"!==n&&"picture-circle"!==n||(h||[]).forEach(e=>{"undefined"!==typeof document&&"undefined"!==typeof window&&window.FileReader&&window.File&&(e.originFileObj instanceof File||e.originFileObj instanceof Blob)&&void 0===e.thumbUrl&&(e.thumbUrl="",i&&i(e.originFileObj).then(t=>{e.thumbUrl=t||"",O()}))})},[n,h,i]),o.useEffect(()=>{A(!0)},[]);const D=(e,t)=>{if(a)return null===t||void 0===t||t.preventDefault(),a(e)},j=e=>{"function"===typeof s?s(e):e.url&&window.open(e.url)},R=e=>{null===c||void 0===c||c(e)},I=e=>{if(p)return p(e,n);const t="uploading"===e.status,r=d&&d(e)?o.createElement(de,null):o.createElement(ie,null);let i=t?o.createElement(ae.A,null):o.createElement(ce,null);return"picture"===n?i=t?o.createElement(ae.A,null):r:"picture-card"!==n&&"picture-circle"!==n||(i=t?u.uploading:r),i},T=(e,t,n,r)=>{const i={type:"text",size:"small",title:r,onClick:n=>{t(),(0,ge.zO)(e)&&e.props.onClick&&e.props.onClick(n)},className:`${n}-list-item-action`,disabled:S};if((0,ge.zO)(e)){const t=(0,ge.Ob)(e,Object.assign(Object.assign({},e.props),{onClick:()=>{}}));return o.createElement(ve.Ay,Object.assign({},i,{icon:t}))}return o.createElement(ve.Ay,Object.assign({},i),o.createElement("span",null,e))};o.useImperativeHandle(t,()=>({handlePreview:D,handleDownload:j}));const{getPrefixCls:P}=o.useContext(L.QO),N=P("upload",m),M=P(),F=l()(`${N}-list`,`${N}-list-${n}`),z=(0,r.A)(h.map(e=>({key:e.uid,file:e})));let _={motionDeadline:2e3,motionName:`${N}-${"picture-card"===n||"picture-circle"===n?"animate-inline":"animate"}`,keys:z,motionAppear:x};const H=o.useMemo(()=>{const e=Object.assign({},(0,fe.A)(M));return delete e.onAppearEnd,delete e.onEnterEnd,delete e.onLeaveEnd,e},[M]);return"picture-card"!==n&&"picture-circle"!==n&&(_=Object.assign(Object.assign({},H),_)),o.createElement("div",{className:F},o.createElement(me.aF,Object.assign({},_,{component:!1}),e=>{let{key:t,file:r,className:i,style:a}=e;return o.createElement(Te,{key:t,locale:u,prefixCls:N,className:i,style:a,file:r,items:h,progress:$,listType:n,isImgUrl:d,showPreviewIcon:f,showRemoveIcon:g,showDownloadIcon:v,removeIcon:b,previewIcon:y,downloadIcon:w,iconRender:I,actionIconRender:T,itemRender:k,onPreview:D,onDownload:j,onClose:R})}),C&&o.createElement(me.Ay,Object.assign({},_,{visible:E,forceRender:!0}),e=>{let{className:t,style:n}=e;return(0,ge.Ob)(C,e=>({className:l()(e.className,t),style:Object.assign(Object.assign(Object.assign({},n),{pointerEvents:t?"none":void 0}),e.style)}))}))};const Pe=o.forwardRef(Le);var Ne=function(e,t,n,o){return new(n||(n=Promise))(function(r,i){function a(e){try{s(o.next(e))}catch(t){i(t)}}function l(e){try{s(o.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,l)}s((o=o.apply(e,t||[])).next())})};const Me=`__LIST_IGNORE_${Date.now()}__`,Fe=(e,t)=>{const{fileList:n,defaultFileList:a,onRemove:s,showUploadList:c=!0,listType:u="text",onPreview:p,onDownload:d,onChange:m,onDrop:h,previewFile:f,disabled:g,locale:v,iconRender:b,isImageUrl:y,progress:w,prefixCls:$,className:C,type:E="select",children:k,style:S,itemRender:O,maxCount:x,data:A={},multiple:D=!1,action:j="",accept:R="",supportServerRender:F=!0,rootClassName:z}=e,_=o.useContext(P.A),H=null!==g&&void 0!==g?g:_,[B,U]=(0,T.A)(a||[],{value:n,postState:e=>null!==e&&void 0!==e?e:[]}),[W,X]=o.useState("drop"),Y=o.useRef(null);o.useMemo(()=>{const e=Date.now();(n||[]).forEach((t,n)=>{t.uid||Object.isFrozen(t)||(t.uid=`__AUTO__${e}_${n}__`)})},[n]);const q=(e,t,n)=>{let o=(0,r.A)(t),a=!1;1===x?o=o.slice(-1):x&&(a=o.length>x,o=o.slice(0,x)),(0,i.flushSync)(()=>{U(o)});const l={file:e,fileList:o};n&&(l.event=n),a&&!o.some(t=>t.uid===e.uid)||(0,i.flushSync)(()=>{null===m||void 0===m||m(l)})},V=e=>{const t=e.filter(e=>!e.file[Me]);if(!t.length)return;const n=t.map(e=>be(e.file));let o=(0,r.A)(B);n.forEach(e=>{o=ye(e,o)}),n.forEach((e,n)=>{let r=e;if(t[n].parsedFile)e.status="uploading";else{const{originFileObj:t}=e;let n;try{n=new File([t],t.name,{type:t.type})}catch(i){n=new Blob([t],{type:t.type}),n.name=t.name,n.lastModifiedDate=new Date,n.lastModified=(new Date).getTime()}n.uid=e.uid,r=n}q(r,o)})},G=(e,t,n)=>{try{"string"===typeof e&&(e=JSON.parse(e))}catch(i){}if(!we(t,B))return;const o=be(t);o.status="done",o.percent=100,o.response=e,o.xhr=n;const r=ye(o,B);q(o,r)},Q=(e,t)=>{if(!we(t,B))return;const n=be(t);n.status="uploading",n.percent=e.percent;const o=ye(n,B);q(n,o,e)},J=(e,t,n)=>{if(!we(n,B))return;const o=be(n);o.error=e,o.response=t,o.status="error";const r=ye(o,B);q(o,r)},K=e=>{let t;Promise.resolve("function"===typeof s?s(e):s).then(n=>{var o;if(!1===n)return;const r=function(e,t){const n=void 0!==e.uid?"uid":"name",o=t.filter(t=>t[n]!==e[n]);return o.length===t.length?null:o}(e,B);r&&(t=Object.assign(Object.assign({},e),{status:"removed"}),null===B||void 0===B||B.forEach(e=>{const n=void 0!==t.uid?"uid":"name";e[n]!==t[n]||Object.isFrozen(e)||(e.status="removed")}),null===(o=Y.current)||void 0===o||o.abort(t),q(t,r))})},Z=e=>{X(e.type),"drop"===e.type&&(null===h||void 0===h||h(e))};o.useImperativeHandle(t,()=>({onBatchStart:V,onSuccess:G,onProgress:Q,onError:J,fileList:B,upload:Y.current}));const{getPrefixCls:ee,direction:ne,upload:oe}=o.useContext(L.QO),re=ee("upload",$),ie=Object.assign(Object.assign({onBatchStart:V,onError:J,onProgress:Q,onSuccess:G},e),{data:A,multiple:D,action:j,accept:R,supportServerRender:F,prefixCls:re,disabled:H,beforeUpload:(t,n)=>Ne(void 0,void 0,void 0,function*(){const{beforeUpload:o,transformFile:r}=e;let i=t;if(o){const e=yield o(t,n);if(!1===e)return!1;if(delete t[Me],e===Me)return Object.defineProperty(t,Me,{value:!0,configurable:!0}),!1;"object"===typeof e&&e&&(i=e)}return r&&(i=yield r(i)),i}),onChange:void 0});delete ie.className,delete ie.style,k&&!H||delete ie.id;const[ae,le]=te(re),[se]=(0,N.default)("Upload",M.default.Upload),{showRemoveIcon:ce,showPreviewIcon:ue,showDownloadIcon:pe,removeIcon:de,previewIcon:me,downloadIcon:he}="boolean"===typeof c?{}:c,fe=(e,t)=>c?o.createElement(Pe,{prefixCls:re,listType:u,items:B,previewFile:f,onPreview:p,onDownload:d,onRemove:K,showRemoveIcon:!H&&ce,showPreviewIcon:ue,showDownloadIcon:pe,removeIcon:de,previewIcon:me,downloadIcon:he,iconRender:b,locale:Object.assign(Object.assign({},se),v),isImageUrl:y,progress:w,appendAction:e,appendActionVisible:t,itemRender:O,disabled:H}):e,ge=l()(`${re}-wrapper`,C,z,le,null===oe||void 0===oe?void 0:oe.className,{[`${re}-rtl`]:"rtl"===ne,[`${re}-picture-card-wrapper`]:"picture-card"===u,[`${re}-picture-circle-wrapper`]:"picture-circle"===u}),ve=Object.assign(Object.assign({},null===oe||void 0===oe?void 0:oe.style),S);if("drag"===E){const e=l()(le,re,`${re}-drag`,{[`${re}-drag-uploading`]:B.some(e=>"uploading"===e.status),[`${re}-drag-hover`]:"dragover"===W,[`${re}-disabled`]:H,[`${re}-rtl`]:"rtl"===ne});return ae(o.createElement("span",{className:ge},o.createElement("div",{className:e,style:ve,onDrop:Z,onDragOver:Z,onDragLeave:Z},o.createElement(I,Object.assign({},ie,{ref:Y,className:`${re}-btn`}),o.createElement("div",{className:`${re}-drag-container`},k))),fe()))}const $e=l()(re,`${re}-select`,{[`${re}-disabled`]:H}),Ce=(Ee=k?void 0:{display:"none"},o.createElement("div",{className:$e,style:Ee},o.createElement(I,Object.assign({},ie,{ref:Y}))));var Ee;return ae("picture-card"===u||"picture-circle"===u?o.createElement("span",{className:ge},fe(Ce,!!k)):o.createElement("span",{className:ge},Ce,fe()))};const ze=o.forwardRef(Fe);var _e=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const He=o.forwardRef((e,t)=>{var{style:n,height:r}=e,i=_e(e,["style","height"]);return o.createElement(ze,Object.assign({ref:t},i,{type:"drag",style:Object.assign(Object.assign({},n),{height:r})}))});const Be=He,Ue=ze;Ue.Dragger=Be,Ue.LIST_IGNORE=Me;const We=Ue}}]);
|