包含后厨 团餐 门店分支
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
23 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[791],{63252:function(){},93009:function(rt,Ke,v){"use strict";v.d(Ke,{Z:function(){return Yt}});var g=v(22122),l=v(67294),Z=v(96156),Re=v(55507),Me=v(90484),re=v(85061),ve=v(28481),at=v(94184),H=v.n(at),ze=v(6610),He=v(5991),Ge=v(10379),Ve=v(44144),ot=v(81253),it=v(92137),lt=v(64217);function st(n,t){var i="cannot ".concat(n.method," ").concat(n.action," ").concat(t.status,"'"),e=new Error(i);return e.status=t.status,e.method=n.method,e.url=n.action,e}function Xe(n){var t=n.responseText||n.response;if(!t)return t;try{return JSON.parse(t)}catch(i){return t}}function ct(n){var t=new XMLHttpRequest;n.onProgress&&t.upload&&(t.upload.onprogress=function(a){a.total>0&&(a.percent=a.loaded/a.total*100),n.onProgress(a)});var i=new FormData;n.data&&Object.keys(n.data).forEach(function(o){var a=n.data[o];if(Array.isArray(a)){a.forEach(function(c){i.append("".concat(o,"[]"),c)});return}i.append(o,a)}),n.file instanceof Blob?i.append(n.filename,n.file,n.file.name):i.append(n.filename,n.file),t.onerror=function(a){n.onError(a)},t.onload=function(){return t.status<200||t.status>=300?n.onError(st(n,t),Xe(t)):n.onSuccess(Xe(t),t)},t.open(n.method,n.action,!0),n.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var e=n.headers||{};return e["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(e).forEach(function(o){e[o]!==null&&t.setRequestHeader(o,e[o])}),t.send(i),{abort:function(){t.abort()}}}var ut=+new Date,dt=0;function Te(){return"rc-upload-".concat(ut,"-").concat(++dt)}var vt=v(80334),$e=function(n,t){if(n&&t){var i=Array.isArray(t)?t:t.split(","),e=n.name||"",o=n.type||"",a=o.replace(/\/.*$/,"");return i.some(function(c){var s=c.trim();if(/^\*(\/\*)?$/.test(c))return!0;if(s.charAt(0)==="."){var r=e.toLowerCase(),u=s.toLowerCase(),d=[u];return(u===".jpg"||u===".jpeg")&&(d=[".jpg",".jpeg"]),d.some(function(y){return r.endsWith(y)})}return/\/\*$/.test(s)?a===s.replace(/\/.*$/,""):o===s?!0:/^\w+$/.test(s)?((0,vt.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(s,"'.Skip for check.")),!0):!1})}return!0};function ft(n,t){var i=n.createReader(),e=[];function o(){i.readEntries(function(a){var c=Array.prototype.slice.apply(a);e=e.concat(c);var s=!c.length;s?t(e):o()})}o()}var pt=function(t,i,e){var o=function a(c,s){c.path=s||"",c.isFile?c.file(function(r){e(r)&&(c.fullPath&&!r.webkitRelativePath&&(Object.defineProperties(r,{webkitRelativePath:{writable:!0}}),r.webkitRelativePath=c.fullPath.replace(/^\//,""),Object.defineProperties(r,{webkitRelativePath:{writable:!1}})),i([r]))}):c.isDirectory&&ft(c,function(r){r.forEach(function(u){a(u,"".concat(s).concat(c.name,"/"))})})};t.forEach(function(a){o(a.webkitGetAsEntry())})},mt=pt,ht=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],gt=function(n){(0,Ge.Z)(i,n);var t=(0,Ve.Z)(i);function i(){var e;(0,ze.Z)(this,i);for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];return e=t.call.apply(t,[this].concat(a)),e.state={uid:Te()},e.reqs={},e.fileInput=void 0,e._isMounted=void 0,e.onChange=function(s){var r=e.props,u=r.accept,d=r.directory,y=s.target.files,h=(0,re.Z)(y).filter(function(D){return!d||$e(D,u)});e.uploadFiles(h),e.reset()},e.onClick=function(s){var r=e.fileInput;if(!!r){var u=e.props,d=u.children,y=u.onClick;if(d&&d.type==="button"){var h=r.parentNode;h.focus(),h.querySelector("button").blur()}r.click(),y&&y(s)}},e.onKeyDown=function(s){s.key==="Enter"&&e.onClick(s)},e.onFileDrop=function(s){var r=e.props.multiple;if(s.preventDefault(),s.type!=="dragover")if(e.props.directory)mt(Array.prototype.slice.call(s.dataTransfer.items),e.uploadFiles,function(d){return $e(d,e.props.accept)});else{var u=(0,re.Z)(s.dataTransfer.files).filter(function(d){return $e(d,e.props.accept)});r===!1&&(u=u.slice(0,1)),e.uploadFiles(u)}},e.uploadFiles=function(s){var r=(0,re.Z)(s),u=r.map(function(d){return d.uid=Te(),e.processFile(d,r)});Promise.all(u).then(function(d){var y=e.props.onBatchStart;y==null||y(d.map(function(h){var D=h.origin,R=h.parsedFile;return{file:D,parsedFile:R}})),d.filter(function(h){return h.parsedFile!==null}).forEach(function(h){e.post(h)})})},e.processFile=function(){var s=(0,it.Z)((0,Re.Z)().mark(function r(u,d){var y,h,D,R,k,N,F,M,$;return(0,Re.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(y=e.props.beforeUpload,h=u,!y){f.next=14;break}return f.prev=3,f.next=6,y(u,d);case 6:h=f.sent,f.next=12;break;case 9:f.prev=9,f.t0=f.catch(3),h=!1;case 12:if(h!==!1){f.next=14;break}return f.abrupt("return",{origin:u,parsedFile:null,action:null,data:null});case 14:if(D=e.props.action,typeof D!="function"){f.next=21;break}return f.next=18,D(u);case 18:R=f.sent,f.next=22;break;case 21:R=D;case 22:if(k=e.props.data,typeof k!="function"){f.next=29;break}return f.next=26,k(u);case 26:N=f.sent,f.next=30;break;case 29:N=k;case 30:return F=((0,Me.Z)(h)==="object"||typeof h=="string")&&h?h:u,F instanceof File?M=F:M=new File([F],u.name,{type:u.type}),$=M,$.uid=u.uid,f.abrupt("return",{origin:u,data:N,parsedFile:$,action:R});case 35:case"end":return f.stop()}},r,null,[[3,9]])}));return function(r,u){return s.apply(this,arguments)}}(),e.saveFileInput=function(s){e.fileInput=s},e}return(0,He.Z)(i,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(o){var a=this,c=o.data,s=o.origin,r=o.action,u=o.parsedFile;if(!!this._isMounted){var d=this.props,y=d.onStart,h=d.customRequest,D=d.name,R=d.headers,k=d.withCredentials,N=d.method,F=s.uid,M=h||ct,$={action:r,filename:D,data:c,file:u,headers:R,withCredentials:k,method:N||"post",onProgress:function(f){var U=a.props.onProgress;U==null||U(f,u)},onSuccess:function(f,U){var O=a.props.onSuccess;O==null||O(f,u,U),delete a.reqs[F]},onError:function(f,U){var O=a.props.onError;O==null||O(f,U,u),delete a.reqs[F]}};y(s),this.reqs[F]=M($)}}},{key:"reset",value:function(){this.setState({uid:Te()})}},{key:"abort",value:function(o){var a=this.reqs;if(o){var c=o.uid?o.uid:o;a[c]&&a[c].abort&&a[c].abort(),delete a[c]}else Object.keys(a).forEach(function(s){a[s]&&a[s].abort&&a[s].abort(),delete a[s]})}},{key:"render",value:function(){var o,a=this.props,c=a.component,s=a.prefixCls,r=a.className,u=a.disabled,d=a.id,y=a.style,h=a.multiple,D=a.accept,R=a.capture,k=a.children,N=a.directory,F=a.openFileDialogOnClick,M=a.onMouseEnter,$=a.onMouseLeave,j=(0,ot.Z)(a,ht),f=H()((o={},(0,Z.Z)(o,s,!0),(0,Z.Z)(o,"".concat(s,"-disabled"),u),(0,Z.Z)(o,r,r),o)),U=N?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},O=u?{}:{onClick:F?this.onClick:function(){},onKeyDown:F?this.onKeyDown:function(){},onMouseEnter:M,onMouseLeave:$,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return l.createElement(c,(0,g.Z)({},O,{className:f,role:"button",style:y}),l.createElement("input",(0,g.Z)({},(0,lt.Z)(j,{aria:!0,data:!0}),{id:d,type:"file",ref:this.saveFileInput,onClick:function(G){return G.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:D},U,{multiple:h,onChange:this.onChange},R!=null?{capture:R}:{})),k)}}]),i}(l.Component),yt=gt;function Ae(){}var Je=function(n){(0,Ge.Z)(i,n);var t=(0,Ve.Z)(i);function i(){var e;(0,ze.Z)(this,i);for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];return e=t.call.apply(t,[this].concat(a)),e.uploader=void 0,e.saveUploader=function(s){e.uploader=s},e}return(0,He.Z)(i,[{key:"abort",value:function(o){this.uploader.abort(o)}},{key:"render",value:function(){return l.createElement(yt,(0,g.Z)({},this.props,{ref:this.saveUploader}))}}]),i}(l.Component);Je.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ae,onError:Ae,onSuccess:Ae,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var wt=Je,Ye=wt,Et=v(21770),It=v(73935),ke=v(53124),Ct=v(98866),Zt=v(42051),Rt=v(85636),Pt=v(20406),Qe=v(7085),Dt=v(74962),bt=v(4810),je=v(63441),qe=v(71577),Ft=v(57838),Ut=v(33603),Se=v(96159);function Le(n){return(0,g.Z)((0,g.Z)({},n),{lastModified:n.lastModified,lastModifiedDate:n.lastModifiedDate,name:n.name,size:n.size,type:n.type,uid:n.uid,percent:0,originFileObj:n})}function xe(n,t){var i=(0,re.Z)(t),e=i.findIndex(function(o){var a=o.uid;return a===n.uid});return e===-1?i.push(n):i[e]=n,i}function Be(n,t){var i=n.uid!==void 0?"uid":"name";return t.filter(function(e){return e[i]===n[i]})[0]}function St(n,t){var i=n.uid!==void 0?"uid":"name",e=t.filter(function(o){return o[i]!==n[i]});return e.length===t.length?null:e}var Lt=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",i=t.split("/"),e=i[i.length-1],o=e.split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(o)||[""])[0]},_e=function(t){return t.indexOf("image/")===0},xt=function(t){if(t.type&&!t.thumbUrl)return _e(t.type);var i=t.thumbUrl||t.url||"",e=Lt(i);return/^data:image\//.test(i)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(e)?!0:!(/^data:/.test(i)||e)},ae=200;function Ot(n){return new Promise(function(t){if(!n.type||!_e(n.type)){t("");return}var i=document.createElement("canvas");i.width=ae,i.height=ae,i.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(ae,"px; height: ").concat(ae,"px; z-index: 9999; display: none;"),document.body.appendChild(i);var e=i.getContext("2d"),o=new Image;if(o.onload=function(){var c=o.width,s=o.height,r=ae,u=ae,d=0,y=0;c>s?(u=s*(ae/c),y=-(u-r)/2):(r=c*(ae/s),d=-(r-u)/2),e.drawImage(o,d,y,r,u);var h=i.toDataURL();document.body.removeChild(i),t(h)},o.crossOrigin="anonymous",n.type.startsWith("image/svg+xml")){var a=new FileReader;a.addEventListener("load",function(){a.result&&(o.src=a.result)}),a.readAsDataURL(n)}else o.src=window.URL.createObjectURL(n)})}var Nt=v(73171),Mt=v(90631),Tt=v(95357),$t=v(54458),At=v(45777),kt=l.forwardRef(function(n,t){var i,e=n.prefixCls,o=n.className,a=n.style,c=n.locale,s=n.listType,r=n.file,u=n.items,d=n.progress,y=n.iconRender,h=n.actionIconRender,D=n.itemRender,R=n.isImgUrl,k=n.showPreviewIcon,N=n.showRemoveIcon,F=n.showDownloadIcon,M=n.previewIcon,$=n.removeIcon,j=n.downloadIcon,f=n.onPreview,U=n.onDownload,O=n.onClose,oe,G,ie=r.status,fe=l.useState(ie),le=(0,ve.Z)(fe,2),B=le[0],pe=le[1];l.useEffect(function(){ie!=="removed"&&pe(ie)},[ie]);var me=l.useState(!1),he=(0,ve.Z)(me,2),ge=he[0],De=he[1],Q=l.useRef(null);l.useEffect(function(){return Q.current=setTimeout(function(){De(!0)},300),function(){Q.current&&clearTimeout(Q.current)}},[]);var be="".concat(e,"-span"),se=y(r),ce=l.createElement("div",{className:"".concat(e,"-text-icon")},se);if(s==="picture"||s==="picture-card")if(B==="uploading"||!r.thumbUrl&&!r.url){var q,_=H()((q={},(0,Z.Z)(q,"".concat(e,"-list-item-thumbnail"),!0),(0,Z.Z)(q,"".concat(e,"-list-item-file"),B!=="uploading"),q));ce=l.createElement("div",{className:_},se)}else{var ue,ye=(R==null?void 0:R(r))?l.createElement("img",{src:r.thumbUrl||r.url,alt:r.name,className:"".concat(e,"-list-item-image"),crossOrigin:r.crossOrigin}):se,S=H()((ue={},(0,Z.Z)(ue,"".concat(e,"-list-item-thumbnail"),!0),(0,Z.Z)(ue,"".concat(e,"-list-item-file"),R&&!R(r)),ue));ce=l.createElement("a",{className:S,onClick:function(A){return f(r,A)},href:r.url||r.thumbUrl,target:"_blank",rel:"noopener noreferrer"},ye)}var Fe=H()((i={},(0,Z.Z)(i,"".concat(e,"-list-item"),!0),(0,Z.Z)(i,"".concat(e,"-list-item-").concat(B),!0),(0,Z.Z)(i,"".concat(e,"-list-item-list-type-").concat(s),!0),i)),Ue=typeof r.linkProps=="string"?JSON.parse(r.linkProps):r.linkProps,Y=N?h((typeof $=="function"?$(r):$)||l.createElement(Nt.Z,null),function(){return O(r)},e,c.removeFile):null,we=F&&B==="done"?h((typeof j=="function"?j(r):j)||l.createElement(Mt.Z,null),function(){return U(r)},e,c.downloadFile):null,Ee=s!=="picture-card"&&l.createElement("span",{key:"download-delete",className:H()("".concat(e,"-list-item-card-actions"),{picture:s==="picture"})},we,Y),ee=H()("".concat(e,"-list-item-name")),V=r.url?[l.createElement("a",(0,g.Z)({key:"view",target:"_blank",rel:"noopener noreferrer",className:ee,title:r.name},Ue,{href:r.url,onClick:function(A){return f(r,A)}}),r.name),Ee]:[l.createElement("span",{key:"view",className:ee,onClick:function(A){return f(r,A)},title:r.name},r.name),Ee],E={pointerEvents:"none",opacity:.5},w=k?l.createElement("a",{href:r.url||r.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:r.url||r.thumbUrl?void 0:E,onClick:function(A){return f(r,A)},title:c.previewFile},typeof M=="function"?M(r):M||l.createElement(Tt.Z,null)):null,x=s==="picture-card"&&B!=="uploading"&&l.createElement("span",{className:"".concat(e,"-list-item-actions")},w,B==="done"&&we,Y),T;r.response&&typeof r.response=="string"?T=r.response:T=((oe=r.error)===null||oe===void 0?void 0:oe.statusText)||((G=r.error)===null||G===void 0?void 0:G.message)||c.uploadError;var X=l.createElement("span",{className:be},ce,V),Ie=l.useContext(ke.E_),de=Ie.getPrefixCls,Ce=de(),Ze=l.createElement("div",{className:Fe},l.createElement("div",{className:"".concat(e,"-list-item-info")},X),x,ge&&l.createElement(je.Z,{motionName:"".concat(Ce,"-fade"),visible:B==="uploading",motionDeadline:2e3},function(J){var A=J.className,te="percent"in r?l.createElement($t.Z,(0,g.Z)({},d,{type:"line",percent:r.percent})):null;return l.createElement("div",{className:H()("".concat(e,"-list-item-progress"),A)},te)})),Ne=H()("".concat(e,"-list-").concat(s,"-container"),o),L=B==="error"?l.createElement(At.Z,{title:T,getPopupContainer:function(A){return A.parentNode}},Ze):Ze;return l.createElement("div",{className:Ne,style:a,ref:t},D?D(L,r,u,{download:U.bind(null,r),preview:f.bind(null,r),remove:O.bind(null,r)}):L)}),jt=kt,Oe=(0,g.Z)({},Ut.ZP);delete Oe.onAppearEnd,delete Oe.onEnterEnd,delete Oe.onLeaveEnd;var Bt=function(t,i){var e,o=t.listType,a=o===void 0?"text":o,c=t.previewFile,s=c===void 0?Ot:c,r=t.onPreview,u=t.onDownload,d=t.onRemove,y=t.locale,h=t.iconRender,D=t.isImageUrl,R=D===void 0?xt:D,k=t.prefixCls,N=t.items,F=N===void 0?[]:N,M=t.showPreviewIcon,$=M===void 0?!0:M,j=t.showRemoveIcon,f=j===void 0?!0:j,U=t.showDownloadIcon,O=U===void 0?!1:U,oe=t.removeIcon,G=t.previewIcon,ie=t.downloadIcon,fe=t.progress,le=fe===void 0?{strokeWidth:2,showInfo:!1}:fe,B=t.appendAction,pe=t.appendActionVisible,me=pe===void 0?!0:pe,he=t.itemRender,ge=(0,Ft.Z)(),De=l.useState(!1),Q=(0,ve.Z)(De,2),be=Q[0],se=Q[1];l.useEffect(function(){a!=="picture"&&a!=="picture-card"||(F||[]).forEach(function(E){typeof document=="undefined"||typeof window=="undefined"||!window.FileReader||!window.File||!(E.originFileObj instanceof File||E.originFileObj instanceof Blob)||E.thumbUrl!==void 0||(E.thumbUrl="",s&&s(E.originFileObj).then(function(w){E.thumbUrl=w||"",ge()}))})},[a,F,s]),l.useEffect(function(){se(!0)},[]);var ce=function(w,x){if(!!r)return x==null||x.preventDefault(),r(w)},q=function(w){typeof u=="function"?u(w):w.url&&window.open(w.url)},_=function(w){d==null||d(w)},ue=function(w){if(h)return h(w,a);var x=w.status==="uploading",T=R&&R(w)?l.createElement(bt.Z,null):l.createElement(Pt.Z,null),X=x?l.createElement(Qe.Z,null):l.createElement(Dt.Z,null);return a==="picture"?X=x?l.createElement(Qe.Z,null):T:a==="picture-card"&&(X=x?y.uploading:T),X},ye=function(w,x,T,X){var Ie={type:"text",size:"small",title:X,onClick:function(Ze){x(),(0,Se.l$)(w)&&w.props.onClick&&w.props.onClick(Ze)},className:"".concat(T,"-list-item-card-actions-btn")};if((0,Se.l$)(w)){var de=(0,Se.Tm)(w,(0,g.Z)((0,g.Z)({},w.props),{onClick:function(){}}));return l.createElement(qe.Z,(0,g.Z)({},Ie,{icon:de}))}return l.createElement(qe.Z,(0,g.Z)({},Ie),l.createElement("span",null,w))};l.useImperativeHandle(i,function(){return{handlePreview:ce,handleDownload:q}});var S=l.useContext(ke.E_),Fe=S.getPrefixCls,Ue=S.direction,Y=Fe("upload",k),we=H()((e={},(0,Z.Z)(e,"".concat(Y,"-list"),!0),(0,Z.Z)(e,"".concat(Y,"-list-").concat(a),!0),(0,Z.Z)(e,"".concat(Y,"-list-rtl"),Ue==="rtl"),e)),Ee=(0,re.Z)(F.map(function(E){return{key:E.uid,file:E}})),ee=a==="picture-card"?"animate-inline":"animate",V={motionDeadline:2e3,motionName:"".concat(Y,"-").concat(ee),keys:Ee,motionAppear:be};return a!=="picture-card"&&(V=(0,g.Z)((0,g.Z)({},Oe),V)),l.createElement("div",{className:we},l.createElement(je.V,(0,g.Z)({},V,{component:!1}),function(E){var w=E.key,x=E.file,T=E.className,X=E.style;return l.createElement(jt,{key:w,locale:y,prefixCls:Y,className:T,style:X,file:x,items:F,progress:le,listType:a,isImgUrl:R,showPreviewIcon:$,showRemoveIcon:f,showDownloadIcon:O,removeIcon:oe,previewIcon:G,downloadIcon:ie,iconRender:ue,actionIconRender:ye,itemRender:he,onPreview:ce,onDownload:q,onClose:_})}),B&&l.createElement(je.Z,(0,g.Z)({},V,{visible:me,forceRender:!0}),function(E){var w=E.className,x=E.style;return(0,Se.Tm)(B,function(T){return{className:H()(T.className,w),style:(0,g.Z)((0,g.Z)((0,g.Z)({},x),{pointerEvents:w?"none":void 0}),T.style)}})}))},Wt=l.forwardRef(Bt),Kt=Wt,zt=function(n,t,i,e){function o(a){return a instanceof i?a:new i(function(c){c(a)})}return new(i||(i=Promise))(function(a,c){function s(d){try{u(e.next(d))}catch(y){c(y)}}function r(d){try{u(e.throw(d))}catch(y){c(y)}}function u(d){d.done?a(d.value):o(d.value).then(s,r)}u((e=e.apply(n,t||[])).next())})},Pe="__LIST_IGNORE_".concat(Date.now(),"__"),Ht=function(t,i){var e,o=t.fileList,a=t.defaultFileList,c=t.onRemove,s=t.showUploadList,r=s===void 0?!0:s,u=t.listType,d=u===void 0?"text":u,y=t.onPreview,h=t.onDownload,D=t.onChange,R=t.onDrop,k=t.previewFile,N=t.disabled,F=t.locale,M=t.iconRender,$=t.isImageUrl,j=t.progress,f=t.prefixCls,U=t.className,O=t.type,oe=O===void 0?"select":O,G=t.children,ie=t.style,fe=t.itemRender,le=t.maxCount,B=t.data,pe=B===void 0?{}:B,me=t.multiple,he=me===void 0?!1:me,ge=t.action,De=ge===void 0?"":ge,Q=t.accept,be=Q===void 0?"":Q,se=t.supportServerRender,ce=se===void 0?!0:se,q=l.useContext(Ct.Z),_=N!=null?N:q,ue=(0,Et.Z)(a||[],{value:o,postState:function(m){return m!=null?m:[]}}),ye=(0,ve.Z)(ue,2),S=ye[0],Fe=ye[1],Ue=l.useState("drop"),Y=(0,ve.Z)(Ue,2),we=Y[0],Ee=Y[1],ee=l.useRef(null);l.useMemo(function(){var W=Date.now();(o||[]).forEach(function(m,C){!m.uid&&!Object.isFrozen(m)&&(m.uid="__AUTO__".concat(W,"_").concat(C,"__"))})},[o]);var V=function(m,C,b){var p=(0,re.Z)(C);le===1?p=p.slice(-1):le&&(p=p.slice(0,le)),(0,It.flushSync)(function(){Fe(p)});var I={file:m,fileList:p};b&&(I.event=b),D==null||D(I)},E=function(m,C){return zt(void 0,void 0,void 0,(0,Re.Z)().mark(function b(){var p,I,K,z;return(0,Re.Z)().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(p=t.beforeUpload,I=t.transformFile,K=m,!p){P.next=13;break}return P.next=5,p(m,C);case 5:if(z=P.sent,z!==!1){P.next=8;break}return P.abrupt("return",!1);case 8:if(delete m[Pe],z!==Pe){P.next=12;break}return Object.defineProperty(m,Pe,{value:!0,configurable:!0}),P.abrupt("return",!1);case 12:(0,Me.Z)(z)==="object"&&z&&(K=z);case 13:if(!I){P.next=17;break}return P.next=16,I(K);case 16:K=P.sent;case 17:return P.abrupt("return",K);case 18:case"end":return P.stop()}},b)}))},w=function(m){var C=m.filter(function(I){return!I.file[Pe]});if(!!C.length){var b=C.map(function(I){return Le(I.file)}),p=(0,re.Z)(S);b.forEach(function(I){p=xe(I,p)}),b.forEach(function(I,K){var z=I;if(C[K].parsedFile)I.status="uploading";else{var ne=I.originFileObj,P;try{P=new File([ne],ne.name,{type:ne.type})}catch(nt){P=new Blob([ne],{type:ne.type}),P.name=ne.name,P.lastModifiedDate=new Date,P.lastModified=new Date().getTime()}P.uid=I.uid,z=P}V(z,p)})}},x=function(m,C,b){try{typeof m=="string"&&(m=JSON.parse(m))}catch(K){}if(!!Be(C,S)){var p=Le(C);p.status="done",p.percent=100,p.response=m,p.xhr=b;var I=xe(p,S);V(p,I)}},T=function(m,C){if(!!Be(C,S)){var b=Le(C);b.status="uploading",b.percent=m.percent;var p=xe(b,S);V(b,p,m)}},X=function(m,C,b){if(!!Be(b,S)){var p=Le(b);p.error=m,p.response=C,p.status="error";var I=xe(p,S);V(p,I)}},Ie=function(m){var C;Promise.resolve(typeof c=="function"?c(m):c).then(function(b){var p;if(b!==!1){var I=St(m,S);I&&(C=(0,g.Z)((0,g.Z)({},m),{status:"removed"}),S==null||S.forEach(function(K){var z=C.uid!==void 0?"uid":"name";K[z]===C[z]&&!Object.isFrozen(K)&&(K.status="removed")}),(p=ee.current)===null||p===void 0||p.abort(C),V(C,I))}})},de=function(m){Ee(m.type),m.type==="drop"&&(R==null||R(m))};l.useImperativeHandle(i,function(){return{onBatchStart:w,onSuccess:x,onProgress:T,onError:X,fileList:S,upload:ee.current}});var Ce=l.useContext(ke.E_),Ze=Ce.getPrefixCls,Ne=Ce.direction,L=Ze("upload",f),J=(0,g.Z)((0,g.Z)({onBatchStart:w,onError:X,onProgress:T,onSuccess:x},t),{data:pe,multiple:he,action:De,accept:be,supportServerRender:ce,prefixCls:L,disabled:_,beforeUpload:E,onChange:void 0});delete J.className,delete J.style,(!G||_)&&delete J.id;var A=function(m,C){return r?l.createElement(Zt.Z,{componentName:"Upload",defaultLocale:Rt.Z.Upload},function(b){var p=typeof r=="boolean"?{}:r,I=p.showRemoveIcon,K=p.showPreviewIcon,z=p.showDownloadIcon,ne=p.removeIcon,P=p.previewIcon,nt=p.downloadIcon;return l.createElement(Kt,{prefixCls:L,listType:d,items:S,previewFile:k,onPreview:y,onDownload:h,onRemove:Ie,showRemoveIcon:!_&&I,showPreviewIcon:K,showDownloadIcon:z,removeIcon:ne,previewIcon:P,downloadIcon:nt,iconRender:M,locale:(0,g.Z)((0,g.Z)({},b),F),isImageUrl:$,progress:j,appendAction:m,appendActionVisible:C,itemRender:fe})}):m};if(oe==="drag"){var te,Qt=H()(L,(te={},(0,Z.Z)(te,"".concat(L,"-drag"),!0),(0,Z.Z)(te,"".concat(L,"-drag-uploading"),S.some(function(W){return W.status==="uploading"})),(0,Z.Z)(te,"".concat(L,"-drag-hover"),we==="dragover"),(0,Z.Z)(te,"".concat(L,"-disabled"),_),(0,Z.Z)(te,"".concat(L,"-rtl"),Ne==="rtl"),te),U);return l.createElement("span",null,l.createElement("div",{className:Qt,onDrop:de,onDragOver:de,onDragLeave:de,style:ie},l.createElement(Ye,(0,g.Z)({},J,{ref:ee,className:"".concat(L,"-btn")}),l.createElement("div",{className:"".concat(L,"-drag-container")},G))),A())}var qt=H()(L,(e={},(0,Z.Z)(e,"".concat(L,"-select"),!0),(0,Z.Z)(e,"".concat(L,"-select-").concat(d),!0),(0,Z.Z)(e,"".concat(L,"-disabled"),_),(0,Z.Z)(e,"".concat(L,"-rtl"),Ne==="rtl"),e)),_t=function(m){return l.createElement("div",{className:qt,style:m},l.createElement(Ye,(0,g.Z)({},J,{ref:ee})))},tt=_t(G?void 0:{display:"none"});return d==="picture-card"?l.createElement("span",{className:H()("".concat(L,"-picture-card-wrapper"),U)},A(tt,!!G)):l.createElement("span",{className:U},tt,A())},Gt=l.forwardRef(Ht),et=Gt,Vt=function(n,t){var i={};for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&t.indexOf(e)<0&&(i[e]=n[e]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,e=Object.getOwnPropertySymbols(n);o<e.length;o++)t.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(n,e[o])&&(i[e[o]]=n[e[o]]);return i},Xt=l.forwardRef(function(n,t){var i=n.style,e=n.height,o=Vt(n,["style","height"]);return l.createElement(et,(0,g.Z)({ref:t},o,{type:"drag",style:(0,g.Z)((0,g.Z)({},i),{height:e})}))}),Jt=Xt,We=et;We.Dragger=Jt,We.LIST_IGNORE=Pe;var Yt=We},43185:function(rt,Ke,v){"use strict";var g=v(38663),l=v.n(g),Z=v(63252),Re=v.n(Z),Me=v(57663),re=v(34669),ve=v(22385)}}]);