Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

6 linhas
22 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6358],{38475:function(xt,_e,r){"use strict";r.d(_e,{Z:function(){return Ve}});var y=r(28481),N=r(67294),i=r(73935),V=r(98924),ae=r(80334),E=r(42550),ze=N.createContext(null),n=ze,et=r(85061),q=r(8410),De=[];function mt(O,M){var _=N.useState(function(){if(!(0,V.Z)())return null;var b=document.createElement("div");return b}),Ne=(0,y.Z)(_,1),j=Ne[0],Se=N.useRef(!1),t=N.useContext(n),f=N.useState(De),o=(0,y.Z)(f,2),C=o[0],R=o[1],P=t||(Se.current?void 0:function(b){R(function(U){var $=[b].concat((0,et.Z)(U));return $})});function L(){j.parentElement||document.body.appendChild(j),Se.current=!0}function T(){var b;(b=j.parentElement)===null||b===void 0||b.removeChild(j),Se.current=!1}return(0,q.Z)(function(){return O?t?t(L):L():T(),T},[O]),(0,q.Z)(function(){C.length&&(C.forEach(function(b){return b()}),R(De))},[C]),[j,P]}var Xe=r(44958),xe=r(74204);function tt(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var nt="rc-util-locker-".concat(Date.now()),rt=0;function We(O){var M=!!O,_=N.useState(function(){return rt+=1,"".concat(nt,"_").concat(rt)}),Ne=(0,y.Z)(_,1),j=Ne[0];(0,q.Z)(function(){if(M){var Se=(0,xe.Z)(),t=tt();(0,Xe.hq)(`
  2. html body {
  3. overflow-y: hidden;
  4. `.concat(t?"width: calc(100% - ".concat(Se,"px);"):"",`
  5. }`),j)}else(0,Xe.jL)(j);return function(){(0,Xe.jL)(j)}},[M,j])}var He=!1;function gt(O){return typeof O=="boolean"&&(He=O),He}var at=function(M){return M===!1?!1:!(0,V.Z)()||!M?null:typeof M=="string"?document.querySelector(M):typeof M=="function"?M():M},ot=N.forwardRef(function(O,M){var _=O.open,Ne=O.autoLock,j=O.getContainer,Se=O.debug,t=O.autoDestroy,f=t===void 0?!0:t,o=O.children,C=N.useState(_),R=(0,y.Z)(C,2),P=R[0],L=R[1],T=P||_;N.useEffect(function(){(f||_)&&L(_)},[_,f]);var b=N.useState(function(){return at(j)}),U=(0,y.Z)(b,2),$=U[0],fe=U[1];N.useEffect(function(){var ne=at(j);fe(ne!=null?ne:null)});var oe=mt(T&&!$,Se),ee=(0,y.Z)(oe,2),te=ee[0],ie=ee[1],se=$!=null?$:te;We(Ne&&_&&(0,V.Z)()&&(se===te||se===document.body));var Ze=null;if(o&&(0,E.Yr)(o)&&M){var be=o;Ze=be.ref}var Ee=(0,E.x1)(Ze,M);if(!T||!(0,V.Z)()||$===void 0)return null;var B=se===!1||gt(),ve=o;return M&&(ve=N.cloneElement(o,{ref:Ee})),N.createElement(n.Provider,{value:ie},B?ve:(0,i.createPortal)(ve,se))}),Ct=ot,Ve=Ct},53469:function(){},6122:function(xt,_e,r){"use strict";r.d(_e,{Z:function(){return Ge}});var y=r(22122),N=r(90484),i=r(95357),V=r(28991),ae=r(96156),E=r(28481),ze=r(81253),n=r(67294),et=r(94184),q=r.n(et),De=r(27678),mt=r(21770),Xe=r(57315),xe=r(64019),tt=r(15105),nt=r(80334),rt=["visible","onVisibleChange","getContainer","current","countRender"],We=n.createContext({previewUrls:new Map,setPreviewUrls:function(){return null},current:null,setCurrent:function(){return null},setShowPreview:function(){return null},setMousePosition:function(){return null},registerImage:function(){return function(){return null}},rootClassName:""}),He=We.Provider,gt=function(e){var l=e.previewPrefixCls,a=l===void 0?"rc-image-preview":l,c=e.children,u=e.icons,m=u===void 0?{}:u,v=e.preview,h=(0,N.Z)(v)==="object"?v:{},D=h.visible,S=D===void 0?void 0:D,p=h.onVisibleChange,I=p===void 0?void 0:p,x=h.getContainer,Z=x===void 0?void 0:x,X=h.current,w=X===void 0?0:X,F=h.countRender,de=F===void 0?void 0:F,Me=(0,ze.Z)(h,rt),le=(0,n.useState)(new Map),Q=(0,E.Z)(le,2),z=Q[0],me=Q[1],ge=(0,n.useState)(),re=(0,E.Z)(ge,2),ce=re[0],ue=re[1],Le=(0,mt.Z)(!!S,{value:S,onChange:I}),Ce=(0,E.Z)(Le,2),G=Ce[0],H=Ce[1],J=(0,n.useState)(null),d=(0,E.Z)(J,2),Y=d[0],K=d[1],he=S!==void 0,we=Array.from(z.keys()),k=we[w],Fe=new Map(Array.from(z).filter(function(ye){var W=(0,E.Z)(ye,2),Ue=W[1].canPreview;return!!Ue}).map(function(ye){var W=(0,E.Z)(ye,2),Ue=W[0],Qe=W[1].url;return[Ue,Qe]})),ke=function(W,Ue){var Qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,Ye=function(){me(function(lt){var qe=new Map(lt),ct=qe.delete(W);return ct?qe:lt})};return me(function(Je){return new Map(Je).set(W,{url:Ue,canPreview:Qe})}),Ye},Ae=function(W){W.stopPropagation(),H(!1),K(null)};return n.useEffect(function(){ue(k)},[k]),n.useEffect(function(){!G&&he&&ue(k)},[k,he,G]),n.createElement(He,{value:{isPreviewGroup:!0,previewUrls:Fe,setPreviewUrls:me,current:ce,setCurrent:ue,setShowPreview:H,setMousePosition:K,registerImage:ke}},c,n.createElement(L,(0,y.Z)({"aria-hidden":!G,visible:G,prefixCls:a,onClose:Ae,mousePosition:Y,src:Fe.get(ce),icons:m,getContainer:Z,countRender:de},Me)))},at=gt,ot=r(63441),Ct=r(38475),Ve=1,O=50,M=1,_=.2,Ne=function(e){var l,a=e.visible,c=e.maskTransitionName,u=e.getContainer,m=e.prefixCls,v=e.rootClassName,h=e.icons,D=e.countRender,S=e.showSwitch,p=e.showProgress,I=e.current,x=e.count,Z=e.scale,X=e.onSwitchLeft,w=e.onSwitchRight,F=e.onClose,de=e.onZoomIn,Me=e.onZoomOut,le=e.onRotateRight,Q=e.onRotateLeft,z=h.rotateLeft,me=h.rotateRight,ge=h.zoomIn,re=h.zoomOut,ce=h.close,ue=h.left,Le=h.right,Ce="".concat(m,"-operations-operation"),G="".concat(m,"-operations-icon"),H=[{icon:ce,onClick:F,type:"close"},{icon:ge,onClick:de,type:"zoomIn",disabled:Z===O},{icon:re,onClick:Me,type:"zoomOut",disabled:Z===Ve},{icon:me,onClick:le,type:"rotateRight"},{icon:z,onClick:Q,type:"rotateLeft"}],J=n.createElement(n.Fragment,null,S&&n.createElement(n.Fragment,null,n.createElement("div",{className:q()("".concat(m,"-switch-left"),(0,ae.Z)({},"".concat(m,"-switch-left-disabled"),I===0)),onClick:X},ue),n.createElement("div",{className:q()("".concat(m,"-switch-right"),(0,ae.Z)({},"".concat(m,"-switch-right-disabled"),I===x-1)),onClick:w},Le)),n.createElement("ul",{className:"".concat(m,"-operations")},p&&n.createElement("li",{className:"".concat(m,"-operations-progress")},(l=D==null?void 0:D(I+1,x))!==null&&l!==void 0?l:"".concat(I+1," / ").concat(x)),H.map(function(d){var Y,K=d.icon,he=d.onClick,we=d.type,k=d.disabled;return n.createElement("li",{className:q()(Ce,(Y={},(0,ae.Z)(Y,"".concat(m,"-operations-operation-").concat(we),!0),(0,ae.Z)(Y,"".concat(m,"-operations-operation-disabled"),!!k),Y)),onClick:he,key:we},n.isValidElement(K)?n.cloneElement(K,{className:G}):K)})));return n.createElement(ot.Z,{visible:a,motionName:c},function(d){var Y=d.className,K=d.style;return n.createElement(Ct.Z,{open:!0,getContainer:u!=null?u:document.body},n.createElement("div",{className:q()("".concat(m,"-operations-wrapper"),Y,v),style:K},J))})},j=Ne,Se=r(75164),t={x:0,y:0,rotate:0,scale:1};function f(s){var e=(0,n.useRef)(null),l=(0,n.useRef)([]),a=(0,n.useState)(t),c=(0,E.Z)(a,2),u=c[0],m=c[1],v=function(){m(t)},h=function(p){e.current===null&&(l.current=[],e.current=(0,Se.Z)(function(){m(function(I){var x=I;return l.current.forEach(function(Z){x=(0,V.Z)((0,V.Z)({},x),Z)}),e.current=null,x})})),l.current.push((0,V.Z)((0,V.Z)({},u),p))},D=function(p,I,x){var Z=s.current,X=Z.width,w=Z.height,F=Z.offsetWidth,de=Z.offsetHeight,Me=Z.offsetLeft,le=Z.offsetTop,Q=p,z=u.scale*p;z>O?(Q=O/u.scale,z=O):z<Ve&&(Q=Ve/u.scale,z=Ve);var me=I!=null?I:innerWidth/2,ge=x!=null?x:innerHeight/2,re=Q-1,ce=re*X*.5,ue=re*w*.5,Le=re*(me-u.x-Me),Ce=re*(ge-u.y-le),G=u.x-(Le-ce),H=u.y-(Ce-ue);if(p<1&&z===1){var J=F*z,d=de*z,Y=(0,De.g1)(),K=Y.width,he=Y.height;J<=K&&d<=he&&(G=0,H=0)}h({x:G,y:H,scale:z})};return{transform:u,resetTransform:v,updateTransform:h,dispatchZoonChange:D}}function o(s,e,l,a){var c=e+l,u=(l-a)/2;if(l>a){if(e>0)return(0,ae.Z)({},s,u);if(e<0&&c<a)return(0,ae.Z)({},s,-u)}else if(e<0||c>a)return(0,ae.Z)({},s,e<0?u:-u);return{}}function C(s,e,l,a){var c=(0,De.g1)(),u=c.width,m=c.height,v=null;return s<=u&&e<=m?v={x:0,y:0}:(s>u||e>m)&&(v=(0,V.Z)((0,V.Z)({},o("x",l,s,u)),o("y",a,e,m))),v}var R=["prefixCls","src","alt","onClose","afterClose","visible","icons","rootClassName","getContainer","countRender","scaleStep","transitionName","maskTransitionName"],P=function(e){var l=e.prefixCls,a=e.src,c=e.alt,u=e.onClose,m=e.afterClose,v=e.visible,h=e.icons,D=h===void 0?{}:h,S=e.rootClassName,p=e.getContainer,I=e.countRender,x=e.scaleStep,Z=x===void 0?.5:x,X=e.transitionName,w=X===void 0?"zoom":X,F=e.maskTransitionName,de=F===void 0?"fade":F,Me=(0,ze.Z)(e,R),le=(0,n.useRef)(),Q=(0,n.useRef)({deltaX:0,deltaY:0,transformX:0,transformY:0}),z=(0,n.useState)(!1),me=(0,E.Z)(z,2),ge=me[0],re=me[1],ce=(0,n.useContext)(We),ue=ce.previewUrls,Le=ce.current,Ce=ce.isPreviewGroup,G=ce.setCurrent,H=ue.size,J=Array.from(ue.keys()),d=J.indexOf(Le),Y=Ce?ue.get(Le):a,K=Ce&&H>1,he=Ce&&H>=1,we=f(le),k=we.transform,Fe=we.resetTransform,ke=we.updateTransform,Ae=we.dispatchZoonChange,ye=k.rotate,W=k.scale,Ue=q()((0,ae.Z)({},"".concat(l,"-moving"),ge)),Qe=function(){Fe()},Ye=function(){Ae(M+Z)},Je=function(){Ae(M-Z)},lt=function(){ke({rotate:ye+90})},qe=function(){ke({rotate:ye-90})},ct=function(g){g.preventDefault(),g.stopPropagation(),d>0&&G(J[d-1])},wt=function(g){g.preventDefault(),g.stopPropagation(),d<H-1&&G(J[d+1])},yt=function(){if(v&&ge){re(!1);var g=Q.current,Te=g.transformX,Re=g.transformY,pe=k.x!==Te&&k.y!==Re;if(!pe)return;var $e=le.current.offsetWidth*W,Ke=le.current.offsetHeight*W,Et=le.current.getBoundingClientRect(),Rt=Et.left,Nt=Et.top,pt=ye%180!=0,vt=C(pt?Ke:$e,pt?$e:Ke,Rt,Nt);vt&&ke((0,V.Z)({},vt))}},Pt=function(g){g.button===0&&(g.preventDefault(),g.stopPropagation(),Q.current={deltaX:g.pageX-k.x,deltaY:g.pageY-k.y,transformX:k.x,transformY:k.y},re(!0))},ut=function(g){v&&ge&&ke({x:g.pageX-Q.current.deltaX,y:g.pageY-Q.current.deltaY})},ft=function(g){if(!(!v||g.deltaY==0)){var Te=Math.abs(g.deltaY/100),Re=Math.min(Te,_),pe=M+Re*Z;g.deltaY>0&&(pe=M/pe),Ae(pe,g.clientX,g.clientY)}},St=(0,n.useCallback)(function(A){!v||!K||(A.keyCode===tt.Z.LEFT?d>0&&G(J[d-1]):A.keyCode===tt.Z.RIGHT&&d<H-1&&G(J[d+1]))},[d,H,J,G,K,v]),Zt=function(g){v&&(W!==1?ke({x:0,y:0,scale:1}):Ae(M+Z,g.clientX,g.clientY))};return(0,n.useEffect)(function(){var A,g,Te=(0,xe.Z)(window,"mouseup",yt,!1),Re=(0,xe.Z)(window,"mousemove",ut,!1),pe=(0,xe.Z)(window,"keydown",St,!1);try{window.top!==window.self&&(A=(0,xe.Z)(window.top,"mouseup",yt,!1),g=(0,xe.Z)(window.top,"mousemove",ut,!1))}catch($e){(0,nt.Kp)(!1,"[rc-image] ".concat($e))}return function(){var $e,Ke;Te.remove(),Re.remove(),pe.remove(),($e=A)===null||$e===void 0||$e.remove(),(Ke=g)===null||Ke===void 0||Ke.remove()}},[v,ge,St]),n.createElement(n.Fragment,null,n.createElement(Xe.Z,(0,y.Z)({transitionName:w,maskTransitionName:de,closable:!1,keyboard:!0,prefixCls:l,onClose:u,afterClose:Qe,visible:v,wrapClassName:Ue,rootClassName:S,getContainer:p},Me),n.createElement("div",{className:"".concat(l,"-img-wrapper")},n.createElement("img",{width:e.width,height:e.height,onWheel:ft,onMouseDown:Pt,onDoubleClick:Zt,ref:le,className:"".concat(l,"-img"),src:Y,alt:c,style:{transform:"translate3d(".concat(k.x,"px, ").concat(k.y,"px, 0) scale3d(").concat(W,", ").concat(W,", 1) rotate(").concat(ye,"deg)")}}))),n.createElement(j,{visible:v,maskTransitionName:de,getContainer:p,prefixCls:l,rootClassName:S,icons:D,countRender:I,showSwitch:K,showProgress:he,current:d,count:H,scale:W,onSwitchLeft:ct,onSwitchRight:wt,onZoomIn:Ye,onZoomOut:Je,onRotateRight:lt,onRotateLeft:qe,onClose:u}))},L=P,T=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName","crossOrigin","decoding","loading","referrerPolicy","sizes","srcSet","useMap","draggable"],b=["src","visible","onVisibleChange","getContainer","mask","maskClassName","icons","scaleStep"],U=0,$=function(e){var l,a=e.src,c=e.alt,u=e.onPreviewClose,m=e.prefixCls,v=m===void 0?"rc-image":m,h=e.previewPrefixCls,D=h===void 0?"".concat(v,"-preview"):h,S=e.placeholder,p=e.fallback,I=e.width,x=e.height,Z=e.style,X=e.preview,w=X===void 0?!0:X,F=e.className,de=e.onClick,Me=e.onError,le=e.wrapperClassName,Q=e.wrapperStyle,z=e.rootClassName,me=e.crossOrigin,ge=e.decoding,re=e.loading,ce=e.referrerPolicy,ue=e.sizes,Le=e.srcSet,Ce=e.useMap,G=e.draggable,H=(0,ze.Z)(e,T),J=S&&S!==!0,d=(0,N.Z)(w)==="object"?w:{},Y=d.src,K=d.visible,he=K===void 0?void 0:K,we=d.onVisibleChange,k=we===void 0?u:we,Fe=d.getContainer,ke=Fe===void 0?void 0:Fe,Ae=d.mask,ye=d.maskClassName,W=d.icons,Ue=d.scaleStep,Qe=(0,ze.Z)(d,b),Ye=Y!=null?Y:a,Je=he!==void 0,lt=(0,mt.Z)(!!he,{value:he,onChange:k}),qe=(0,E.Z)(lt,2),ct=qe[0],wt=qe[1],yt=(0,n.useState)(J?"loading":"normal"),Pt=(0,E.Z)(yt,2),ut=Pt[0],ft=Pt[1],St=(0,n.useState)(null),Zt=(0,E.Z)(St,2),A=Zt[0],g=Zt[1],Te=ut==="error",Re=n.useContext(We),pe=Re.isPreviewGroup,$e=Re.setCurrent,Ke=Re.setShowPreview,Et=Re.setMousePosition,Rt=Re.registerImage,Nt=n.useState(function(){return U+=1,U}),pt=(0,E.Z)(Nt,1),vt=pt[0],ht=!!w,bt=n.useRef(!1),It=function(){ft("normal")},$t=function(Pe){Me&&Me(Pe),ft("error")},Dt=function(Pe){if(!Je){var Mt=(0,De.os)(Pe.target),Lt=Mt.left,Tt=Mt.top;pe?($e(vt),Et({x:Lt,y:Tt})):g({x:Lt,y:Tt})}pe?Ke(!0):wt(!0),de&&de(Pe)},kt=function(Pe){Pe.stopPropagation(),wt(!1),Je||g(null)},At=function(Pe){bt.current=!1,ut==="loading"&&Pe!=null&&Pe.complete&&(Pe.naturalWidth||Pe.naturalHeight)&&(bt.current=!0,It())};n.useEffect(function(){var dt=Rt(vt,Ye);return dt},[]),n.useEffect(function(){Rt(vt,Ye,ht)},[Ye,ht]),n.useEffect(function(){Te&&ft("normal"),J&&!bt.current&&ft("loading")},[a]);var Ut=q()(v,le,z,(0,ae.Z)({},"".concat(v,"-error"),Te)),zt=Te&&p?p:Ye,Ot={crossOrigin:me,decoding:ge,draggable:G,loading:re,referrerPolicy:ce,sizes:ue,srcSet:Le,useMap:Ce,alt:c,className:q()("".concat(v,"-img"),(0,ae.Z)({},"".concat(v,"-img-placeholder"),S===!0),F),style:(0,V.Z)({height:x},Z)};return n.createElement(n.Fragment,null,n.createElement("div",(0,y.Z)({},H,{className:Ut,onClick:ht?Dt:de,style:(0,V.Z)({width:I,height:x},Q)}),n.createElement("img",(0,y.Z)({},Ot,{ref:At},Te&&p?{src:p}:{onLoad:It,onError:$t,src:a},{width:I,height:x})),ut==="loading"&&n.createElement("div",{"aria-hidden":"true",className:"".concat(v,"-placeholder")},S),Ae&&ht&&n.createElement("div",{className:q()("".concat(v,"-mask"),ye),style:{display:((l=Ot.style)===null||l===void 0?void 0:l.display)==="none"?"none":void 0}},Ae)),!pe&&ht&&n.createElement(L,(0,y.Z)({"aria-hidden":!ct,visible:ct,prefixCls:D,onClose:kt,mousePosition:A,src:zt,alt:c,getContainer:ke,icons:W,scaleStep:Ue,rootClassName:z},Qe)))};$.PreviewGroup=at,$.displayName="Image";var fe=$,oe=fe,ee=r(53124),te=r(40378),ie=r(33603),se=r(54549),Ze=r(67724),be=r(8812),Ee=r(17582),B=r(3035),ve=r(72504),ne=r(16130),Ie=function(s,e){var l={};for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&e.indexOf(a)<0&&(l[a]=s[a]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(s);c<a.length;c++)e.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(s,a[c])&&(l[a[c]]=s[a[c]]);return l},je={rotateLeft:n.createElement(Ee.Z,null),rotateRight:n.createElement(B.Z,null),zoomIn:n.createElement(ve.Z,null),zoomOut:n.createElement(ne.Z,null),close:n.createElement(se.Z,null),left:n.createElement(Ze.Z,null),right:n.createElement(be.Z,null)},it=function(e){var l=e.previewPrefixCls,a=e.preview,c=Ie(e,["previewPrefixCls","preview"]),u=n.useContext(ee.E_),m=u.getPrefixCls,v=m("image-preview",l),h=m(),D=n.useMemo(function(){if(a===!1)return a;var S=(0,N.Z)(a)==="object"?a:{};return(0,y.Z)((0,y.Z)({},S),{transitionName:(0,ie.mL)(h,"zoom",S.transitionName),maskTransitionName:(0,ie.mL)(h,"fade",S.maskTransitionName)})},[a]);return n.createElement(oe.PreviewGroup,(0,y.Z)({preview:D,previewPrefixCls:v,icons:je},c))},st=it,Be=function(s,e){var l={};for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&e.indexOf(a)<0&&(l[a]=s[a]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(s);c<a.length;c++)e.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(s,a[c])&&(l[a[c]]=s[a[c]]);return l},Oe=function(e){var l=e.prefixCls,a=e.preview,c=Be(e,["prefixCls","preview"]),u=(0,n.useContext)(ee.E_),m=u.getPrefixCls,v=u.locale,h=v===void 0?te.Z:v,D=u.getPopupContainer,S=m("image",l),p=m(),I=h.Image||te.Z.Image,x=n.useMemo(function(){if(a===!1)return a;var Z=(0,N.Z)(a)==="object"?a:{},X=Z.getContainer,w=Be(Z,["getContainer"]);return(0,y.Z)((0,y.Z)({mask:n.createElement("div",{className:"".concat(S,"-mask-info")},n.createElement(i.Z,null),I==null?void 0:I.preview),icons:je},w),{getContainer:X||D,transitionName:(0,ie.mL)(p,"zoom",Z.transitionName),maskTransitionName:(0,ie.mL)(p,"fade",Z.maskTransitionName)})},[a,I]);return n.createElement(oe,(0,y.Z)({prefixCls:S,preview:x},c))};Oe.PreviewGroup=st;var Ge=Oe},12968:function(xt,_e,r){"use strict";var y=r(38663),N=r.n(y),i=r(53469),V=r.n(i)},57315:function(xt,_e,r){"use strict";r.d(_e,{Z:function(){return Se}});var y=r(22122),N=r(28481),i=r(67294),V=r.t(i,2),ae=r(38475),E=r(28991),ze=r(94184),n=r.n(ze),et=r(15105);function q(){var t=(0,E.Z)({},V);return t.useId}var De=0;function mt(){}function Xe(t){var f=i.useState("ssr-id"),o=(0,N.Z)(f,2),C=o[0],R=o[1],P=q(),L=P==null?void 0:P();return i.useEffect(function(){if(!P){var T=De;De+=1,R("rc_unique_".concat(T))}},[]),t||L||C}var xe=r(94999),tt=r(64217),nt=r(63441);function rt(t){var f=t.prefixCls,o=t.style,C=t.visible,R=t.maskProps,P=t.motionName;return i.createElement(nt.Z,{key:"mask",visible:C,motionName:P,leavedClassName:"".concat(f,"-mask-hidden")},function(L,T){var b=L.className,U=L.style;return i.createElement("div",(0,y.Z)({ref:T,style:(0,E.Z)((0,E.Z)({},U),o),className:n()("".concat(f,"-mask"),b)},R))})}function We(t,f,o){var C=f;return!C&&o&&(C="".concat(t,"-").concat(o)),C}function He(t,f){var o=t["page".concat(f?"Y":"X","Offset")],C="scroll".concat(f?"Top":"Left");if(typeof o!="number"){var R=t.document;o=R.documentElement[C],typeof o!="number"&&(o=R.body[C])}return o}function gt(t){var f=t.getBoundingClientRect(),o={left:f.left,top:f.top},C=t.ownerDocument,R=C.defaultView||C.parentWindow;return o.left+=He(R),o.top+=He(R,!0),o}var at=i.memo(function(t){var f=t.children;return f},function(t,f){var o=f.shouldUpdate;return!o}),ot={width:0,height:0,overflow:"hidden",outline:"none"},Ct=i.forwardRef(function(t,f){var o=t.prefixCls,C=t.className,R=t.style,P=t.title,L=t.ariaId,T=t.footer,b=t.closable,U=t.closeIcon,$=t.onClose,fe=t.children,oe=t.bodyStyle,ee=t.bodyProps,te=t.modalRender,ie=t.onMouseDown,se=t.onMouseUp,Ze=t.holderRef,be=t.visible,Ee=t.forceRender,B=t.width,ve=t.height,ne=(0,i.useRef)(),Ie=(0,i.useRef)();i.useImperativeHandle(f,function(){return{focus:function(){var s;(s=ne.current)===null||s===void 0||s.focus()},changeActive:function(s){var e=document,l=e.activeElement;s&&l===Ie.current?ne.current.focus():!s&&l===ne.current&&Ie.current.focus()}}});var je={};B!==void 0&&(je.width=B),ve!==void 0&&(je.height=ve);var it;T&&(it=i.createElement("div",{className:"".concat(o,"-footer")},T));var st;P&&(st=i.createElement("div",{className:"".concat(o,"-header")},i.createElement("div",{className:"".concat(o,"-title"),id:L},P)));var Be;b&&(Be=i.createElement("button",{type:"button",onClick:$,"aria-label":"Close",className:"".concat(o,"-close")},U||i.createElement("span",{className:"".concat(o,"-close-x")})));var Oe=i.createElement("div",{className:"".concat(o,"-content")},Be,st,i.createElement("div",(0,y.Z)({className:"".concat(o,"-body"),style:oe},ee),fe),it);return i.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":P?L:null,"aria-modal":"true",ref:Ze,style:(0,E.Z)((0,E.Z)({},R),je),className:n()(o,C),onMouseDown:ie,onMouseUp:se},i.createElement("div",{tabIndex:0,ref:ne,style:ot,"aria-hidden":"true"}),i.createElement(at,{shouldUpdate:be||Ee},te?te(Oe):Oe),i.createElement("div",{tabIndex:0,ref:Ie,style:ot,"aria-hidden":"true"}))}),Ve=Ct,O=i.forwardRef(function(t,f){var o=t.prefixCls,C=t.title,R=t.style,P=t.className,L=t.visible,T=t.forceRender,b=t.destroyOnClose,U=t.motionName,$=t.ariaId,fe=t.onVisibleChanged,oe=t.mousePosition,ee=(0,i.useRef)(),te=i.useState(),ie=(0,N.Z)(te,2),se=ie[0],Ze=ie[1],be={};se&&(be.transformOrigin=se);function Ee(){var B=gt(ee.current);Ze(oe?"".concat(oe.x-B.left,"px ").concat(oe.y-B.top,"px"):"")}return i.createElement(nt.Z,{visible:L,onVisibleChanged:fe,onAppearPrepare:Ee,onEnterPrepare:Ee,forceRender:T,motionName:U,removeOnLeave:b,ref:ee},function(B,ve){var ne=B.className,Ie=B.style;return i.createElement(Ve,(0,y.Z)({},t,{ref:f,title:C,ariaId:$,prefixCls:o,holderRef:ve,style:(0,E.Z)((0,E.Z)((0,E.Z)({},Ie),R),be),className:n()(P,ne)}))})});O.displayName="Content";var M=O;function _(t){var f=t.prefixCls,o=f===void 0?"rc-dialog":f,C=t.zIndex,R=t.visible,P=R===void 0?!1:R,L=t.keyboard,T=L===void 0?!0:L,b=t.focusTriggerAfterClose,U=b===void 0?!0:b,$=t.wrapStyle,fe=t.wrapClassName,oe=t.wrapProps,ee=t.onClose,te=t.afterClose,ie=t.transitionName,se=t.animation,Ze=t.closable,be=Ze===void 0?!0:Ze,Ee=t.mask,B=Ee===void 0?!0:Ee,ve=t.maskTransitionName,ne=t.maskAnimation,Ie=t.maskClosable,je=Ie===void 0?!0:Ie,it=t.maskStyle,st=t.maskProps,Be=t.rootClassName,Oe=(0,i.useRef)(),Ge=(0,i.useRef)(),s=(0,i.useRef)(),e=i.useState(P),l=(0,N.Z)(e,2),a=l[0],c=l[1],u=Xe();function m(){(0,xe.Z)(Ge.current,document.activeElement)||(Oe.current=document.activeElement)}function v(){if(!(0,xe.Z)(Ge.current,document.activeElement)){var w;(w=s.current)===null||w===void 0||w.focus()}}function h(w){if(w)v();else{if(c(!1),B&&Oe.current&&U){try{Oe.current.focus({preventScroll:!0})}catch(F){}Oe.current=null}a&&(te==null||te())}}function D(w){ee==null||ee(w)}var S=(0,i.useRef)(!1),p=(0,i.useRef)(),I=function(){clearTimeout(p.current),S.current=!0},x=function(){p.current=setTimeout(function(){S.current=!1})},Z=null;je&&(Z=function(F){S.current?S.current=!1:Ge.current===F.target&&D(F)});function X(w){if(T&&w.keyCode===et.Z.ESC){w.stopPropagation(),D(w);return}P&&w.keyCode===et.Z.TAB&&s.current.changeActive(!w.shiftKey)}return(0,i.useEffect)(function(){P&&(c(!0),m())},[P]),(0,i.useEffect)(function(){return function(){clearTimeout(p.current)}},[]),i.createElement("div",(0,y.Z)({className:n()("".concat(o,"-root"),Be)},(0,tt.Z)(t,{data:!0})),i.createElement(rt,{prefixCls:o,visible:B&&P,motionName:We(o,ve,ne),style:(0,E.Z)({zIndex:C},it),maskProps:st}),i.createElement("div",(0,y.Z)({tabIndex:-1,onKeyDown:X,className:n()("".concat(o,"-wrap"),fe),ref:Ge,onClick:Z,style:(0,E.Z)((0,E.Z)({zIndex:C},$),{},{display:a?null:"none"})},oe),i.createElement(M,(0,y.Z)({},t,{onMouseDown:I,onMouseUp:x,ref:s,closable:be,ariaId:u,prefixCls:o,visible:P&&a,onClose:D,onVisibleChanged:h,motionName:We(o,ie,se)}))))}var Ne=function(f){var o=f.visible,C=f.getContainer,R=f.forceRender,P=f.destroyOnClose,L=P===void 0?!1:P,T=f.afterClose,b=i.useState(o),U=(0,N.Z)(b,2),$=U[0],fe=U[1];return i.useEffect(function(){o&&fe(!0)},[o]),!R&&L&&!$?null:i.createElement(ae.Z,{open:o||R||$,autoDestroy:!1,getContainer:C,autoLock:o||$},i.createElement(_,(0,y.Z)({},f,{destroyOnClose:L,afterClose:function(){T==null||T(),fe(!1)}})))};Ne.displayName="Dialog";var j=Ne,Se=j}}]);