(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3400],{49:function(R,c,n){"use strict";n.r(c),n.d(c,{default:function(){return I}});var u=n(11849),M=n(43185),h=n(93009),D=n(57663),f=n(71577),v=n(2824),p=n(67294),S=n(84391),i=n(96486),t=n(9669),e=n.n(t),g=n(3182),a=n(94043),U=n.n(a),Z=n(48971);function A(C){return y.apply(this,arguments)}function y(){return y=(0,g.Z)(U().mark(function C(P){return U().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,Z.WY)("/kitchen/api/systemconfig/GetCosRequestSignURL",{method:"POST",data:P}));case 1:case"end":return r.stop()}},C)})),y.apply(this,arguments)}var m=n(85893),F=function(){var P=(0,p.useState)({domain:"",fileUrl:"",param:"",allUrl:"",seeUrl:""}),E=(0,v.Z)(P,2),r=E[0],G=E[1],K={beforeUpload:function(o){var s=o.name.lastIndexOf("."),l=o.name.substr(s+1);A({directory:"adv",fileExtension:l,method:"PUT"}).then(function(x){G(x)})},name:"file",showUploadList:!1,multiple:!1,accept:".png, .jpg, .jpeg, .gif",action:r.fileUrl+"?"+r.param,headers:{"Content-Type":"application/octet-stream"},onStart:function(o){console.log("onStart",o,o.name)},onSuccess:function(o,s){console.log("onSuccess",o,s),that.props.getData("/cos/bb/21aa1.jpg")},onProgress:function(o,s){var l=o.percent;console.log("onProgress","".concat(l,"%"),s.name)},onError:function(o){console.log("onError",o)},customRequest:function(o){var s=o.action,l=o.file,x=o.headers,W=o.onError,w=o.onProgress,B=o.onSuccess,N=o.withCredentials,T=new FileReader;T.readAsArrayBuffer(l);var L=null;return T.onload=function(O){L=O.target.result,e().put(s,L,{withCredentials:N,headers:x,onUploadProgress:function(j){var V=j.total,z=j.loaded;w({percent:Math.round(z/V*100).toFixed(2)},l)}}).then(function(b){B(b,l)}).catch(W)},{abort:function(){console.log("upload progress is aborted.")}}}};return(0,m.jsx)("div",{children:(0,m.jsx)(h.Z,(0,u.Z)((0,u.Z)({},K),{},{children:(0,m.jsx)(f.Z,{icon:(0,m.jsx)(S.Z,{}),children:"\u4E0A\u4F20"})}))})},I=F},64217:function(R,c,n){"use strict";n.d(c,{Z:function(){return S}});var u=n(28991),M=`accept acceptCharset accessKey action allowFullScreen allowTransparency
    alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
    charSet checked classID className colSpan cols content contentEditable contextMenu
    controls coords crossOrigin data dateTime default defer dir disabled download draggable
    encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
    headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
    is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
    mediaGroup method min minLength multiple muted name noValidate nonce open
    optimum pattern placeholder poster preload radioGroup readOnly rel required
    reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
    shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
    summary tabIndex target title type useMap value width wmode wrap`,h=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
    onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
    onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
    onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
    onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
    onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
    onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,D="".concat(M," ").concat(h).split(/[\s\n]+/),f="aria-",v="data-";function p(i,t){return i.indexOf(t)===0}function S(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e;t===!1?e={aria:!0,data:!0,attr:!0}:t===!0?e={aria:!0}:e=(0,u.Z)({},t);var g={};return Object.keys(i).forEach(function(a){(e.aria&&(a==="role"||p(a,f))||e.data&&p(a,v)||e.attr&&D.includes(a))&&(g[a]=i[a])}),g}}}]);
