owncast/static/web/_next/static/chunks/9343-421f594f4a4480fc.js
2024-02-07 19:05:09 +00:00

1 line
No EOL
21 KiB
JavaScript
Vendored

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9343],{98201:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(1413),o=n(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},c=n(32206),i=function(e,t){return o.createElement(c.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:a}))};i.displayName="DeleteOutlined";var l=o.forwardRef(i)},14845:function(e,t,n){n.d(t,{Z:function(){return y}});var r=n(4942),o=n(87462),a=n(97685),c=n(96494),i=n(93967),l=n.n(i),s=n(55548),u=n(67294),d=n(71946),f=n(5505),p=n(40823),m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},h=new RegExp("^(".concat(f.Y.join("|"),")(-inverse)?$")),g=new RegExp("^(".concat(f.E.join("|"),")$")),w=u.forwardRef(function(e,t){var n=e.prefixCls,i=e.className,f=e.style,m=e.children,w=e.icon,y=e.color,Z=e.onClose,b=e.closeIcon,E=e.closable,x=v(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),C=u.useContext(d.E_),I=C.getPrefixCls,N=C.direction,O=u.useState(!0),R=(0,a.Z)(O,2),k=R[0],P=R[1];u.useEffect(function(){"visible"in x&&P(x.visible)},[x.visible]);var D=function(){return!!y&&(h.test(y)||g.test(y))},L=(0,o.Z)({backgroundColor:y&&!D()?y:void 0},f),j=D(),U=I("tag",n),S=l()(U,(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(U,"-").concat(y),j),"".concat(U,"-has-color"),y&&!j),"".concat(U,"-hidden"),!k),"".concat(U,"-rtl"),"rtl"===N),i),_=function(e){e.stopPropagation(),null==Z||Z(e),!e.defaultPrevented&&("visible"in x||P(!1))},F="onClick"in x||m&&"a"===m.type,z=(0,s.Z)(x,["visible"]),M=w||null,T=M?u.createElement(u.Fragment,null,M,u.createElement("span",null,m)):m,H=u.createElement("span",(0,o.Z)({},z,{ref:t,className:S,style:L}),T,void 0!==E&&E?b?u.createElement("span",{className:"".concat(U,"-close-icon"),onClick:_},b):u.createElement(c.Z,{className:"".concat(U,"-close-icon"),onClick:_}):null);return F?u.createElement(p.Z,null,H):H});w.CheckableTag=function(e){var t=e.prefixCls,n=e.className,a=e.checked,c=e.onChange,i=e.onClick,s=m(e,["prefixCls","className","checked","onChange","onClick"]),f=(0,u.useContext(d.E_).getPrefixCls)("tag",t),p=l()(f,(0,r.Z)((0,r.Z)({},"".concat(f,"-checkable"),!0),"".concat(f,"-checkable-checked"),a),n);return u.createElement("span",(0,o.Z)({},s,{className:p,onClick:function(e){null==c||c(!a),null==i||i(e)}}))};var y=w},70961:function(e,t,n){n.d(t,{Z:function(){return et}});var r=n(87462),o=n(67294),a=n(4942),c=n(74165),i=n(71002),l=n(74902),s=n(97685),u=n(93967),d=n.n(u),f=n(36356),p=n(21640),m=n(73935),v=n(71946),h=n(6089),g=n(72490),w=n(18203),y=n(1413),Z={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"},b=n(32206),E=function(e,t){return o.createElement(b.Z,(0,y.Z)((0,y.Z)({},e),{},{ref:t,icon:Z}))};E.displayName="FileTwoTone";var x=o.forwardRef(E),C=n(38813),I={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"},N=function(e,t){return o.createElement(b.Z,(0,y.Z)((0,y.Z)({},e),{},{ref:t,icon:I}))};N.displayName="PaperClipOutlined";var O=o.forwardRef(N),R={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"},k=function(e,t){return o.createElement(b.Z,(0,y.Z)((0,y.Z)({},e),{},{ref:t,icon:R}))};k.displayName="PictureTwoTone";var P=o.forwardRef(k),D=n(82225),L=n(90622),j=n(41760),U=n(37474),S=n(91604);function _(e){return(0,r.Z)((0,r.Z)({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function F(e,t){var n=(0,l.Z)(t),r=n.findIndex(function(t){return t.uid===e.uid});return -1===r?n.push(e):n[r]=e,n}function z(e,t){var n=void 0!==e.uid?"uid":"name";return t.filter(function(t){return t[n]===e[n]})[0]}var M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.split("/"),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[""])[0]},T=function(e){return 0===e.indexOf("image/")},H=function(e){if(e.type&&!e.thumbUrl)return T(e.type);var t=e.thumbUrl||e.url||"",n=M(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};function V(e){return new Promise(function(t){if(!e.type||!T(e.type)){t("");return}var n=document.createElement("canvas");n.width=200,n.height=200,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(200,"px; height: ").concat(200,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),o=new Image;if(o.onload=function(){var e=o.width,a=o.height,c=200,i=200,l=0,s=0;e>a?s=-((i=200/e*a)-c)/2:l=-((c=200/a*e)-i)/2,r.drawImage(o,l,s,c,i);var u=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(o.src),t(u)},o.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){var a=new FileReader;a.onload=function(){a.result&&(o.src=a.result)},a.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){var c=new FileReader;c.onload=function(){c.result&&t(c.result)},c.readAsDataURL(e)}else o.src=window.URL.createObjectURL(e)})}var A=n(98201),B=n(72611),$=n(2850),W=n(47066),G=n(27189),J=o.forwardRef(function(e,t){var n,c,i,l=e.prefixCls,u=e.className,f=e.style,p=e.locale,m=e.listType,h=e.file,g=e.items,w=e.progress,y=e.iconRender,Z=e.actionIconRender,b=e.itemRender,E=e.isImgUrl,x=e.showPreviewIcon,C=e.showRemoveIcon,I=e.showDownloadIcon,N=e.previewIcon,O=e.removeIcon,R=e.downloadIcon,k=e.onPreview,P=e.onDownload,L=e.onClose,j=h.status,U=o.useState(j),S=(0,s.Z)(U,2),_=S[0],F=S[1];o.useEffect(function(){"removed"!==j&&F(j)},[j]);var z=o.useState(!1),M=(0,s.Z)(z,2),T=M[0],H=M[1],V=o.useRef(null);o.useEffect(function(){return V.current=setTimeout(function(){H(!0)},300),function(){V.current&&clearTimeout(V.current)}},[]);var J="".concat(l,"-span"),Y=y(h),q=o.createElement("div",{className:"".concat(l,"-text-icon")},Y);if("picture"===m||"picture-card"===m){if("uploading"!==_&&(h.thumbUrl||h.url)){var K=(null==E?void 0:E(h))?o.createElement("img",{src:h.thumbUrl||h.url,alt:h.name,className:"".concat(l,"-list-item-image"),crossOrigin:h.crossOrigin}):Y,Q=d()((0,a.Z)((0,a.Z)({},"".concat(l,"-list-item-thumbnail"),!0),"".concat(l,"-list-item-file"),E&&!E(h)));q=o.createElement("a",{className:Q,onClick:function(e){return k(h,e)},href:h.url||h.thumbUrl,target:"_blank",rel:"noopener noreferrer"},K)}else{var X=d()((0,a.Z)((0,a.Z)({},"".concat(l,"-list-item-thumbnail"),!0),"".concat(l,"-list-item-file"),"uploading"!==_));q=o.createElement("div",{className:X},Y)}}var ee=d()((0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(l,"-list-item"),!0),"".concat(l,"-list-item-").concat(_),!0),"".concat(l,"-list-item-list-type-").concat(m),!0)),et="string"==typeof h.linkProps?JSON.parse(h.linkProps):h.linkProps,en=C?Z(("function"==typeof O?O(h):O)||o.createElement(A.Z,null),function(){return L(h)},l,p.removeFile):null,er=I&&"done"===_?Z(("function"==typeof R?R(h):R)||o.createElement(B.Z,null),function(){return P(h)},l,p.downloadFile):null,eo="picture-card"!==m&&o.createElement("span",{key:"download-delete",className:d()("".concat(l,"-list-item-card-actions"),{picture:"picture"===m})},er,en),ea=d()("".concat(l,"-list-item-name")),ec=h.url?[o.createElement("a",(0,r.Z)({key:"view",target:"_blank",rel:"noopener noreferrer",className:ea,title:h.name},et,{href:h.url,onClick:function(e){return k(h,e)}}),h.name),eo]:[o.createElement("span",{key:"view",className:ea,onClick:function(e){return k(h,e)},title:h.name},h.name),eo],ei=x?o.createElement("a",{href:h.url||h.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:h.url||h.thumbUrl?void 0:{pointerEvents:"none",opacity:.5},onClick:function(e){return k(h,e)},title:p.previewFile},"function"==typeof N?N(h):N||o.createElement($.Z,null)):null,el="picture-card"===m&&"uploading"!==_&&o.createElement("span",{className:"".concat(l,"-list-item-actions")},ei,"done"===_&&er,en);i=h.response&&"string"==typeof h.response?h.response:(null===(n=h.error)||void 0===n?void 0:n.statusText)||(null===(c=h.error)||void 0===c?void 0:c.message)||p.uploadError;var es=o.createElement("span",{className:J},q,ec),eu=(0,o.useContext(v.E_).getPrefixCls)(),ed=o.createElement("div",{className:ee},o.createElement("div",{className:"".concat(l,"-list-item-info")},es),el,T&&o.createElement(D.default,{motionName:"".concat(eu,"-fade"),visible:"uploading"===_,motionDeadline:2e3},function(e){var t=e.className,n="percent"in h?o.createElement(W.Z,(0,r.Z)({},w,{type:"line",percent:h.percent})):null;return o.createElement("div",{className:d()("".concat(l,"-list-item-progress"),t)},n)})),ef=d()("".concat(l,"-list-").concat(m,"-container"),u),ep="error"===_?o.createElement(G.Z,{title:i,getPopupContainer:function(e){return e.parentNode}},ed):ed;return o.createElement("div",{className:ef,style:f,ref:t},b?b(ep,h,g,{download:P.bind(null,h),preview:k.bind(null,h),remove:L.bind(null,h)}):ep)}),Y=(0,r.Z)({},U.ZP);delete Y.onAppearEnd,delete Y.onEnterEnd,delete Y.onLeaveEnd;var q=o.forwardRef(function(e,t){var n=e.listType,c=void 0===n?"text":n,i=e.previewFile,u=void 0===i?V:i,f=e.onPreview,p=e.onDownload,m=e.onRemove,h=e.locale,g=e.iconRender,w=e.isImageUrl,y=void 0===w?H:w,Z=e.prefixCls,b=e.items,E=void 0===b?[]:b,I=e.showPreviewIcon,N=void 0===I||I,R=e.showRemoveIcon,k=void 0===R||R,U=e.showDownloadIcon,_=void 0!==U&&U,F=e.removeIcon,z=e.previewIcon,M=e.downloadIcon,T=e.progress,A=void 0===T?{strokeWidth:2,showInfo:!1}:T,B=e.appendAction,$=e.appendActionVisible,W=e.itemRender,G=e.disabled,q=(0,j.Z)(),K=o.useState(!1),Q=(0,s.Z)(K,2),X=Q[0],ee=Q[1];o.useEffect(function(){("picture"===c||"picture-card"===c)&&(E||[]).forEach(function(e){"undefined"!=typeof document&&window.FileReader&&window.File&&(e.originFileObj instanceof File||e.originFileObj instanceof Blob)&&void 0===e.thumbUrl&&(e.thumbUrl="",u&&u(e.originFileObj).then(function(t){e.thumbUrl=t||"",q()}))})},[c,E,u]),o.useEffect(function(){ee(!0)},[]);var et=function(e,t){if(f)return null==t||t.preventDefault(),f(e)},en=function(e){"function"==typeof p?p(e):e.url&&window.open(e.url)},er=function(e){null==m||m(e)},eo=function(e){if(g)return g(e,c);var t="uploading"===e.status,n=y&&y(e)?o.createElement(P,null):o.createElement(x,null),r=t?o.createElement(C.Z,null):o.createElement(O,null);return"picture"===c?r=t?o.createElement(C.Z,null):n:"picture-card"===c&&(r=t?h.uploading:n),r},ea=function(e,t,n,a){var c={type:"text",size:"small",title:a,disabled:G,onClick:function(n){t(),(0,S.l$)(e)&&e.props.onClick&&e.props.onClick(n)},className:"".concat(n,"-list-item-card-actions-btn")};if((0,S.l$)(e)){var i=(0,S.Tm)(e,(0,r.Z)((0,r.Z)({},e.props),{onClick:function(){}}));return o.createElement(L.Z,(0,r.Z)({},c,{icon:i}))}return o.createElement(L.Z,(0,r.Z)({},c),o.createElement("span",null,e))};o.useImperativeHandle(t,function(){return{handlePreview:et,handleDownload:en}});var ec=o.useContext(v.E_),ei=ec.getPrefixCls,el=ec.direction,es=ei("upload",Z),eu=d()((0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(es,"-list"),!0),"".concat(es,"-list-").concat(c),!0),"".concat(es,"-list-rtl"),"rtl"===el)),ed=(0,l.Z)(E.map(function(e){return{key:e.uid,file:e}})),ef={motionDeadline:2e3,motionName:"".concat(es,"-").concat("picture-card"===c?"animate-inline":"animate"),keys:ed,motionAppear:X};return"picture-card"!==c&&(ef=(0,r.Z)((0,r.Z)({},Y),ef)),o.createElement("div",{className:eu},o.createElement(D.CSSMotionList,(0,r.Z)({},ef,{component:!1}),function(e){var t=e.key,n=e.file,r=e.className,a=e.style;return o.createElement(J,{key:t,locale:h,prefixCls:es,className:r,style:a,file:n,items:E,progress:A,listType:c,isImgUrl:y,showPreviewIcon:N,showRemoveIcon:k,showDownloadIcon:_,removeIcon:F,previewIcon:z,downloadIcon:M,iconRender:eo,actionIconRender:ea,itemRender:W,onPreview:et,onDownload:en,onClose:er})}),B&&o.createElement(D.default,(0,r.Z)({},ef,{visible:void 0===$||$,forceRender:!0}),function(e){var t=e.className,n=e.style;return(0,S.Tm)(B,function(e){return{className:d()(e.className,t),style:(0,r.Z)((0,r.Z)((0,r.Z)({},n),{pointerEvents:t?"none":void 0}),e.style)}})}))}),K="__LIST_IGNORE_".concat(Date.now(),"__"),Q=o.forwardRef(function(e,t){var n=e.fileList,u=e.defaultFileList,y=e.onRemove,Z=e.showUploadList,b=void 0===Z||Z,E=e.listType,x=void 0===E?"text":E,C=e.onPreview,I=e.onDownload,N=e.onChange,O=e.onDrop,R=e.previewFile,k=e.disabled,P=e.locale,D=e.iconRender,L=e.isImageUrl,j=e.progress,U=e.prefixCls,S=e.className,M=e.type,T=e.children,H=e.style,V=e.itemRender,A=e.maxCount,B=e.data,$=e.multiple,W=e.action,G=e.accept,J=e.supportServerRender,Y=o.useContext(h.Z),Q=null!=k?k:Y,X=(0,p.Z)(u||[],{value:n,postState:function(e){return null!=e?e:[]}}),ee=(0,s.Z)(X,2),et=ee[0],en=ee[1],er=o.useState("drop"),eo=(0,s.Z)(er,2),ea=eo[0],ec=eo[1],ei=o.useRef(null);o.useMemo(function(){var e=Date.now();(n||[]).forEach(function(t,n){t.uid||Object.isFrozen(t)||(t.uid="__AUTO__".concat(e,"_").concat(n,"__"))})},[n]);var el=function(e,t,n){var r=(0,l.Z)(t);1===A?r=r.slice(-1):A&&(r=r.slice(0,A)),(0,m.flushSync)(function(){en(r)});var o={file:e,fileList:r};n&&(o.event=n),(0,m.flushSync)(function(){null==N||N(o)})},es=function(e){var t=e.filter(function(e){return!e.file[K]});if(t.length){var n=t.map(function(e){return _(e.file)}),r=(0,l.Z)(et);n.forEach(function(e){r=F(e,r)}),n.forEach(function(e,n){var o=e;if(t[n].parsedFile)e.status="uploading";else{var a,c=e.originFileObj;try{a=new File([c],c.name,{type:c.type})}catch(e){(a=new Blob([c],{type:c.type})).name=c.name,a.lastModifiedDate=new Date,a.lastModified=new Date().getTime()}a.uid=e.uid,o=a}el(o,r)})}},eu=function(e,t,n){try{"string"==typeof e&&(e=JSON.parse(e))}catch(e){}if(z(t,et)){var r=_(t);r.status="done",r.percent=100,r.response=e,r.xhr=n;var o=F(r,et);el(r,o)}},ed=function(e,t){if(z(t,et)){var n=_(t);n.status="uploading",n.percent=e.percent;var r=F(n,et);el(n,r,e)}},ef=function(e,t,n){if(z(n,et)){var r=_(n);r.error=e,r.response=t,r.status="error";var o=F(r,et);el(r,o)}},ep=function(e){var t;Promise.resolve("function"==typeof y?y(e):y).then(function(n){if(!1!==n){var o,a,c,i=(o=void 0!==e.uid?"uid":"name",(a=et.filter(function(t){return t[o]!==e[o]})).length===et.length?null:a);i&&(t=(0,r.Z)((0,r.Z)({},e),{status:"removed"}),null==et||et.forEach(function(e){var n=void 0!==t.uid?"uid":"name";e[n]!==t[n]||Object.isFrozen(e)||(e.status="removed")}),null===(c=ei.current)||void 0===c||c.abort(t),el(t,i))}})},em=function(e){ec(e.type),"drop"===e.type&&(null==O||O(e))};o.useImperativeHandle(t,function(){return{onBatchStart:es,onSuccess:eu,onProgress:ed,onError:ef,fileList:et,upload:ei.current}});var ev=o.useContext(v.E_),eh=ev.getPrefixCls,eg=ev.direction,ew=eh("upload",U),ey=(0,r.Z)((0,r.Z)({onBatchStart:es,onError:ef,onProgress:ed,onSuccess:eu},e),{data:void 0===B?{}:B,multiple:void 0!==$&&$,action:void 0===W?"":W,accept:void 0===G?"":G,supportServerRender:void 0===J||J,prefixCls:ew,disabled:Q,beforeUpload:function(t,n){var r,o,a,l;return r=void 0,o=void 0,a=void 0,l=(0,c.Z)().mark(function r(){var o,a,l,s;return(0,c.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(o=e.beforeUpload,a=e.transformFile,l=t,!o){r.next=13;break}return r.next=5,o(t,n);case 5:if(!1!==(s=r.sent)){r.next=8;break}return r.abrupt("return",!1);case 8:if(delete t[K],s!==K){r.next=12;break}return Object.defineProperty(t,K,{value:!0,configurable:!0}),r.abrupt("return",!1);case 12:"object"===(0,i.Z)(s)&&s&&(l=s);case 13:if(!a){r.next=17;break}return r.next=16,a(l);case 16:l=r.sent;case 17:return r.abrupt("return",l);case 18:case"end":return r.stop()}},r)}),new(a||(a=Promise))(function(e,t){function n(e){try{i(l.next(e))}catch(e){t(e)}}function c(e){try{i(l.throw(e))}catch(e){t(e)}}function i(t){var r;t.done?e(t.value):((r=t.value)instanceof a?r:new a(function(e){e(r)})).then(n,c)}i((l=l.apply(r,o||[])).next())})},onChange:void 0});delete ey.className,delete ey.style,(!T||Q)&&delete ey.id;var eZ=function(e,t){return b?o.createElement(g.Z,{componentName:"Upload",defaultLocale:w.Z.Upload},function(n){var a="boolean"==typeof b?{}:b,c=a.showRemoveIcon,i=a.showPreviewIcon,l=a.showDownloadIcon,s=a.removeIcon,u=a.previewIcon,d=a.downloadIcon;return o.createElement(q,{prefixCls:ew,listType:x,items:et,previewFile:R,onPreview:C,onDownload:I,onRemove:ep,showRemoveIcon:!Q&&c,showPreviewIcon:i,showDownloadIcon:l,removeIcon:s,previewIcon:u,downloadIcon:d,iconRender:D,locale:(0,r.Z)((0,r.Z)({},n),P),isImageUrl:L,progress:j,appendAction:e,appendActionVisible:t,itemRender:V,disabled:Q})}):e};if("drag"===(void 0===M?"select":M)){var eb=d()(ew,(0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(ew,"-drag"),!0),"".concat(ew,"-drag-uploading"),et.some(function(e){return"uploading"===e.status})),"".concat(ew,"-drag-hover"),"dragover"===ea),"".concat(ew,"-disabled"),Q),"".concat(ew,"-rtl"),"rtl"===eg),S);return o.createElement("span",null,o.createElement("div",{className:eb,onDrop:em,onDragOver:em,onDragLeave:em,style:H},o.createElement(f.default,(0,r.Z)({},ey,{ref:ei,className:"".concat(ew,"-btn")}),o.createElement("div",{className:"".concat(ew,"-drag-container")},T))),eZ())}var eE=d()(ew,(0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(ew,"-select"),!0),"".concat(ew,"-select-").concat(x),!0),"".concat(ew,"-disabled"),Q),"".concat(ew,"-rtl"),"rtl"===eg)),ex=o.createElement("div",{className:eE,style:T?void 0:{display:"none"}},o.createElement(f.default,(0,r.Z)({},ey,{ref:ei})));return"picture-card"===x?o.createElement("span",{className:d()("".concat(ew,"-picture-card-wrapper"),S)},eZ(ex,!!T)):o.createElement("span",{className:S},ex,eZ())}),X=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},ee=o.forwardRef(function(e,t){var n=e.style,a=e.height,c=X(e,["style","height"]);return o.createElement(Q,(0,r.Z)({ref:t},c,{type:"drag",style:(0,r.Z)((0,r.Z)({},n),{height:a})}))});Q.Dragger=ee,Q.LIST_IGNORE=K;var et=Q}}]);