Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

2 righe
24 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3373],{53469:function(){},27904:function(Nt,et,l){"use strict";l.d(et,{Z:function(){return nt}});var N=l(22122),z=l(90484),u=l(95357),B=l(28991),V=l(96156),h=l(28481),Ce=l(81253),i=l(67294),tt=l(94184),X=l.n(tt),Le=l(27678),oe=l(21770),dt=l(57315),F=l(64019),De=l(15105),$e=l(80334),D=l(75164);function Te(f){var n=i.useRef(null),m=i.useState(f),o=(0,h.Z)(m,2),g=o[0],w=o[1],y=i.useRef([]),x=function(M){n.current===null&&(y.current=[],n.current=(0,D.Z)(function(){w(function(S){var $=S;return y.current.forEach(function(R){$=(0,B.Z)((0,B.Z)({},$),R)}),n.current=null,$})})),y.current.push(M)};return i.useEffect(function(){return function(){return n.current&&D.Z.cancel(n.current)}},[]),[g,x]}function pe(f,n,m,o){var g=n+m,w=(m-o)/2;if(m>o){if(n>0)return(0,V.Z)({},f,w);if(n<0&&g<o)return(0,V.Z)({},f,-w)}else if(n<0||g>o)return(0,V.Z)({},f,n<0?w:-w);return{}}function mt(f,n,m,o){var g=(0,Le.g1)(),w=g.width,y=g.height,x=null;return f<=w&&n<=y?x={x:0,y:0}:(f>w||n>y)&&(x=(0,B.Z)((0,B.Z)({},pe("x",m,f,w)),pe("y",o,n,y))),x}var Ue=["visible","onVisibleChange","getContainer","current","countRender"],xe=i.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:""}),j=xe.Provider,he=function(n){var m=n.previewPrefixCls,o=m===void 0?"rc-image-preview":m,g=n.children,w=n.icons,y=w===void 0?{}:w,x=n.preview,E=(0,z.Z)(x)==="object"?x:{},M=E.visible,S=M===void 0?void 0:M,$=E.onVisibleChange,R=$===void 0?void 0:$,J=E.getContainer,H=J===void 0?void 0:J,Q=E.current,ce=Q===void 0?0:Q,ue=E.countRender,k=ue===void 0?void 0:ue,q=(0,Ce.Z)(E,Ue),rt=(0,i.useState)(new Map),Ve=(0,h.Z)(rt,2),je=Ve[0],Y=Ve[1],Ie=(0,i.useState)(),ot=(0,h.Z)(Ie,2),Ge=ot[0],ke=ot[1],Ke=(0,oe.Z)(!!S,{value:S,onChange:R}),at=(0,h.Z)(Ke,2),ve=at[0],O=at[1],_=(0,i.useState)(null),fe=(0,h.Z)(_,2),ee=fe[0],He=fe[1],Ye=S!==void 0,Ze=Array.from(je.keys()),Ee=Ze[ce],de=new Map(Array.from(je).filter(function(me){var I=(0,h.Z)(me,2),U=I[1].canPreview;return!!U}).map(function(me){var I=(0,h.Z)(me,2),U=I[0],te=I[1].url;return[U,te]})),Be=function(I,U){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,L=function(){Y(function(re){var st=new Map(re),Fe=st.delete(I);return Fe?st:re})};return Y(function(Xe){return new Map(Xe).set(I,{url:U,canPreview:te})}),L},it=function(I){I.stopPropagation(),O(!1),He(null)};return i.useEffect(function(){ke(Ee)},[Ee]),i.useEffect(function(){!ve&&Ye&&ke(Ee)},[Ee,Ye,ve]),i.createElement(j,{value:{isPreviewGroup:!0,previewUrls:de,setPreviewUrls:Y,current:Ge,setCurrent:ke,setShowPreview:O,setMousePosition:He,registerImage:Be}},g,i.createElement(t,(0,N.Z)({"aria-hidden":!ve,visible:ve,prefixCls:o,onClose:it,mousePosition:ee,src:de.get(Ge),icons:y,getContainer:H,countRender:k},q)))},gt=he,be=["prefixCls","src","alt","onClose","afterClose","visible","icons","rootClassName","countRender"],A=i.useState,We=i.useEffect,Ct=i.useCallback,T=i.useRef,e=i.useContext,a={x:0,y:0},r=function(n){var m,o=n.prefixCls,g=n.src,w=n.alt,y=n.onClose,x=n.afterClose,E=n.visible,M=n.icons,S=M===void 0?{}:M,$=n.rootClassName,R=n.countRender,J=(0,Ce.Z)(n,be),H=S.rotateLeft,Q=S.rotateRight,ce=S.zoomIn,ue=S.zoomOut,k=S.close,q=S.left,rt=S.right,Ve=A(1),je=(0,h.Z)(Ve,2),Y=je[0],Ie=je[1],ot=A(0),Ge=(0,h.Z)(ot,2),ke=Ge[0],Ke=Ge[1],at=Te(a),ve=(0,h.Z)(at,2),O=ve[0],_=ve[1],fe=T(),ee=T({originX:0,originY:0,deltaX:0,deltaY:0}),He=A(!1),Ye=(0,h.Z)(He,2),Ze=Ye[0],Ee=Ye[1],de=e(xe),Be=de.previewUrls,it=de.current,me=de.isPreviewGroup,I=de.setCurrent,U=Be.size,te=Array.from(Be.keys()),L=te.indexOf(it),Xe=me?Be.get(it):g,re=me&&U>1,st=A({wheelDirection:0}),Fe=(0,h.Z)(st,2),lt=Fe[0],ct=Fe[1],xt=function(){Ie(1),Ke(0),_(a)},pt=function(){Ie(function(d){return d+1}),_(a)},yt=function(){Y>1&&Ie(function(d){return d-1}),_(a)},Pt=function(){Ke(function(d){return d+90})},Je=function(){Ke(function(d){return d-90})},Qe=function(d){d.preventDefault(),d.stopPropagation(),L>0&&I(te[L-1])},ht=function(d){d.preventDefault(),d.stopPropagation(),L<U-1&&I(te[L+1])},bt=X()((0,V.Z)({},"".concat(o,"-moving"),Ze)),Rt="".concat(o,"-operations-operation"),Ot="".concat(o,"-operations-icon"),St=[{icon:k,onClick:y,type:"close"},{icon:ce,onClick:pt,type:"zoomIn"},{icon:ue,onClick:yt,type:"zoomOut",disabled:Y===1},{icon:Q,onClick:Pt,type:"rotateRight"},{icon:H,onClick:Je,type:"rotateLeft"}],Zt=function(){if(E&&Ze){var d=fe.current.offsetWidth*Y,ge=fe.current.offsetHeight*Y,Me=fe.current.getBoundingClientRect(),_e=Me.left,wt=Me.top,ft=ke%180!=0;Ee(!1);var Ne=mt(ft?ge:d,ft?d:ge,_e,wt);Ne&&_((0,B.Z)({},Ne))}},It=function(d){d.button===0&&(d.preventDefault(),d.stopPropagation(),ee.current.deltaX=d.pageX-O.x,ee.current.deltaY=d.pageY-O.y,ee.current.originX=O.x,ee.current.originY=O.y,Ee(!0))},ut=function(d){E&&Ze&&_({x:d.pageX-ee.current.deltaX,y:d.pageY-ee.current.deltaY})},qe=function(d){if(!!E){d.preventDefault();var ge=d.deltaY;ct({wheelDirection:ge})}},vt=Ct(function(P){!E||!re||(P.preventDefault(),P.keyCode===De.Z.LEFT?L>0&&I(te[L-1]):P.keyCode===De.Z.RIGHT&&L<U-1&&I(te[L+1]))},[L,U,te,I,re,E]),Et=function(){E&&(Y!==1&&Ie(1),(O.x!==a.x||O.y!==a.y)&&_(a))};return We(function(){var P=lt.wheelDirection;P>0?yt():P<0&&pt()},[lt]),We(function(){var P,d,ge=(0,F.Z)(window,"mouseup",Zt,!1),Me=(0,F.Z)(window,"mousemove",ut,!1),_e=(0,F.Z)(window,"wheel",qe,{passive:!1}),wt=(0,F.Z)(window,"keydown",vt,!1);try{window.top!==window.self&&(P=(0,F.Z)(window.top,"mouseup",Zt,!1),d=(0,F.Z)(window.top,"mousemove",ut,!1))}catch(ft){(0,$e.Kp)(!1,"[rc-image] ".concat(ft))}return function(){ge.remove(),Me.remove(),_e.remove(),wt.remove(),P&&P.remove(),d&&d.remove()}},[E,Ze,vt]),i.createElement(dt.Z,(0,N.Z)({transitionName:"zoom",maskTransitionName:"fade",closable:!1,keyboard:!0,prefixCls:o,onClose:y,afterClose:xt,visible:E,wrapClassName:bt,rootClassName:$},J),i.createElement("ul",{className:"".concat(o,"-operations")},re&&i.createElement("li",{className:"".concat(o,"-operations-progress")},(m=R==null?void 0:R(L+1,U))!==null&&m!==void 0?m:"".concat(L+1," / ").concat(U)),St.map(function(P){var d=P.icon,ge=P.onClick,Me=P.type,_e=P.disabled;return i.createElement("li",{className:X()(Rt,(0,V.Z)({},"".concat(o,"-operations-operation-disabled"),!!_e)),onClick:ge,key:Me},i.isValidElement(d)?i.cloneElement(d,{className:Ot}):d)})),i.createElement("div",{className:"".concat(o,"-img-wrapper"),style:{transform:"translate3d(".concat(O.x,"px, ").concat(O.y,"px, 0)")}},i.createElement("img",{onMouseDown:It,onDoubleClick:Et,ref:fe,className:"".concat(o,"-img"),src:Xe,alt:w,style:{transform:"scale3d(".concat(Y,", ").concat(Y,", 1) rotate(").concat(ke,"deg)")}})),re&&i.createElement("div",{className:X()("".concat(o,"-switch-left"),(0,V.Z)({},"".concat(o,"-switch-left-disabled"),L===0)),onClick:Qe},q),re&&i.createElement("div",{className:X()("".concat(o,"-switch-right"),(0,V.Z)({},"".concat(o,"-switch-right-disabled"),L===U-1)),onClick:ht},rt))},t=r,s=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName","crossOrigin","decoding","loading","referrerPolicy","sizes","srcSet","useMap"],c=["src","visible","onVisibleChange","getContainer","mask","maskClassName","icons"],p=0,v=function(n){var m=n.src,o=n.alt,g=n.onPreviewClose,w=n.prefixCls,y=w===void 0?"rc-image":w,x=n.previewPrefixCls,E=x===void 0?"".concat(y,"-preview"):x,M=n.placeholder,S=n.fallback,$=n.width,R=n.height,J=n.style,H=n.preview,Q=H===void 0?!0:H,ce=n.className,ue=n.onClick,k=n.onError,q=n.wrapperClassName,rt=n.wrapperStyle,Ve=n.rootClassName,je=n.crossOrigin,Y=n.decoding,Ie=n.loading,ot=n.referrerPolicy,Ge=n.sizes,ke=n.srcSet,Ke=n.useMap,at=(0,Ce.Z)(n,s),ve=M&&M!==!0,O=(0,z.Z)(Q)==="object"?Q:{},_=O.src,fe=O.visible,ee=fe===void 0?void 0:fe,He=O.onVisibleChange,Ye=He===void 0?g:He,Ze=O.getContainer,Ee=Ze===void 0?void 0:Ze,de=O.mask,Be=O.maskClassName,it=O.icons,me=(0,Ce.Z)(O,c),I=_!=null?_:m,U=ee!==void 0,te=(0,oe.Z)(!!ee,{value:ee,onChange:Ye}),L=(0,h.Z)(te,2),Xe=L[0],re=L[1],st=(0,i.useState)(ve?"loading":"normal"),Fe=(0,h.Z)(st,2),lt=Fe[0],ct=Fe[1],xt=(0,i.useState)(null),pt=(0,h.Z)(xt,2),yt=pt[0],Pt=pt[1],Je=lt==="error",Qe=i.useContext(xe),ht=Qe.isPreviewGroup,bt=Qe.setCurrent,Rt=Qe.setShowPreview,Ot=Qe.setMousePosition,St=Qe.registerImage,Zt=i.useState(function(){return p+=1,p}),It=(0,h.Z)(Zt,1),ut=It[0],qe=Q&&!Je,vt=i.useRef(!1),Et=function(){ct("normal")},P=function(ne){k&&k(ne),ct("error")},d=function(ne){if(!U){var kt=(0,Le.os)(ne.target),Mt=kt.left,Lt=kt.top;ht?(bt(ut),Ot({x:Mt,y:Lt})):Pt({x:Mt,y:Lt})}ht?Rt(!0):re(!0),ue&&ue(ne)},ge=function(ne){ne.stopPropagation(),re(!1),U||Pt(null)},Me=function(ne){vt.current=!1,lt==="loading"&&(ne==null?void 0:ne.complete)&&(ne.naturalWidth||ne.naturalHeight)&&(vt.current=!0,Et())};i.useEffect(function(){var Ne=St(ut,I);return Ne},[]),i.useEffect(function(){St(ut,I,qe)},[I,qe]),i.useEffect(function(){Je&&ct("normal"),ve&&!vt.current&&ct("loading")},[m]);var _e=X()(y,q,Ve,(0,V.Z)({},"".concat(y,"-error"),Je)),wt=Je&&S?S:I,ft={crossOrigin:je,decoding:Y,loading:Ie,referrerPolicy:ot,sizes:Ge,srcSet:ke,useMap:Ke,alt:o,className:X()("".concat(y,"-img"),(0,V.Z)({},"".concat(y,"-img-placeholder"),M===!0),ce),style:(0,B.Z)({height:R},J)};return i.createElement(i.Fragment,null,i.createElement("div",(0,N.Z)({},at,{className:_e,onClick:qe?d:ue,style:(0,B.Z)({width:$,height:R},rt)}),i.createElement("img",(0,N.Z)({},ft,{ref:Me},Je&&S?{src:S}:{onLoad:Et,onError:P,src:m})),lt==="loading"&&i.createElement("div",{"aria-hidden":"true",className:"".concat(y,"-placeholder")},M),de&&qe&&i.createElement("div",{className:X()("".concat(y,"-mask"),Be)},de)),!ht&&qe&&i.createElement(t,(0,N.Z)({"aria-hidden":!Xe,visible:Xe,prefixCls:E,onClose:ge,mousePosition:yt,src:wt,alt:o,getContainer:Ee,icons:it,rootClassName:Ve},me)))};v.PreviewGroup=gt,v.displayName="Image";var C=v,Z=C,b=l(53124),G=l(40378),W=l(33603),we=l(54549),ae=l(67724),ie=l(8812),Re=l(17582),Ae=l(3035),ye=l(72504),Oe=l(16130),K=function(f,n){var m={};for(var o in f)Object.prototype.hasOwnProperty.call(f,o)&&n.indexOf(o)<0&&(m[o]=f[o]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var g=0,o=Object.getOwnPropertySymbols(f);g<o.length;g++)n.indexOf(o[g])<0&&Object.prototype.propertyIsEnumerable.call(f,o[g])&&(m[o[g]]=f[o[g]]);return m},se={rotateLeft:i.createElement(Re.Z,null),rotateRight:i.createElement(Ae.Z,null),zoomIn:i.createElement(ye.Z,null),zoomOut:i.createElement(Oe.Z,null),close:i.createElement(we.Z,null),left:i.createElement(ae.Z,null),right:i.createElement(ie.Z,null)},le=function(n){var m=n.previewPrefixCls,o=n.preview,g=K(n,["previewPrefixCls","preview"]),w=i.useContext(b.E_),y=w.getPrefixCls,x=y("image-preview",m),E=y(),M=i.useMemo(function(){if(o===!1)return o;var S=(0,z.Z)(o)==="object"?o:{};return(0,N.Z)((0,N.Z)({},S),{transitionName:(0,W.mL)(E,"zoom",S.transitionName),maskTransitionName:(0,W.mL)(E,"fade",S.maskTransitionName)})},[o]);return i.createElement(Z.PreviewGroup,(0,N.Z)({preview:M,previewPrefixCls:x,icons:se},g))},Pe=le,Se=function(f,n){var m={};for(var o in f)Object.prototype.hasOwnProperty.call(f,o)&&n.indexOf(o)<0&&(m[o]=f[o]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function")for(var g=0,o=Object.getOwnPropertySymbols(f);g<o.length;g++)n.indexOf(o[g])<0&&Object.prototype.propertyIsEnumerable.call(f,o[g])&&(m[o[g]]=f[o[g]]);return m},ze=function(n){var m=n.prefixCls,o=n.preview,g=Se(n,["prefixCls","preview"]),w=(0,i.useContext)(b.E_),y=w.getPrefixCls,x=w.locale,E=x===void 0?G.Z:x,M=w.getPopupContainer,S=y("image",m),$=y(),R=E.Image||G.Z.Image,J=i.useMemo(function(){if(o===!1)return o;var H=(0,z.Z)(o)==="object"?o:{},Q=H.getContainer,ce=Se(H,["getContainer"]);return(0,N.Z)((0,N.Z)({mask:i.createElement("div",{className:"".concat(S,"-mask-info")},i.createElement(u.Z,null),R==null?void 0:R.preview),icons:se},ce),{getContainer:Q||M,transitionName:(0,W.mL)($,"zoom",H.transitionName),maskTransitionName:(0,W.mL)($,"fade",H.maskTransitionName)})},[o,R]);return i.createElement(Z,(0,N.Z)({prefixCls:S,preview:J},g))};ze.PreviewGroup=Pe;var nt=ze},12968:function(Nt,et,l){"use strict";var N=l(38663),z=l.n(N),u=l(53469),B=l.n(u)},57315:function(Nt,et,l){"use strict";l.d(et,{Z:function(){return T}});var N=l(22122),z=l(28481),u=l(67294),B=l.t(u,2),V=l(2016),h=l(28991),Ce=l(94184),i=l.n(Ce),tt=l(15105);function X(){var e=(0,h.Z)({},B);return e.useId}var Le=0;function oe(){}function dt(e){var a=u.useState("ssr-id"),r=(0,z.Z)(a,2),t=r[0],s=r[1],c=X(),p=c==null?void 0:c();return u.useEffect(function(){if(!c){var v=Le;Le+=1,s("rc_unique_".concat(v))}},[]),e||p||t}var F=l(94999),De=l(64217),$e=l(63441);function D(e){var a=e.prefixCls,r=e.style,t=e.visible,s=e.maskProps,c=e.motionName;return u.createElement($e.Z,{key:"mask",visible:t,motionName:c,leavedClassName:"".concat(a,"-mask-hidden")},function(p){var v=p.className,C=p.style;return u.createElement("div",(0,N.Z)({style:(0,h.Z)((0,h.Z)({},C),r),className:i()("".concat(a,"-mask"),v)},s))})}function Te(e,a,r){var t=a;return!t&&r&&(t="".concat(e,"-").concat(r)),t}function pe(e,a){var r=e["page".concat(a?"Y":"X","Offset")],t="scroll".concat(a?"Top":"Left");if(typeof r!="number"){var s=e.document;r=s.documentElement[t],typeof r!="number"&&(r=s.body[t])}return r}function mt(e){var a=e.getBoundingClientRect(),r={left:a.left,top:a.top},t=e.ownerDocument,s=t.defaultView||t.parentWindow;return r.left+=pe(s),r.top+=pe(s,!0),r}var Ue=u.memo(function(e){var a=e.children;return a},function(e,a){var r=a.shouldUpdate;return!r}),xe={width:0,height:0,overflow:"hidden",outline:"none"},j=u.forwardRef(function(e,a){var r=e.prefixCls,t=e.className,s=e.style,c=e.title,p=e.ariaId,v=e.footer,C=e.closable,Z=e.closeIcon,b=e.onClose,G=e.children,W=e.bodyStyle,we=e.bodyProps,ae=e.modalRender,ie=e.onMouseDown,Re=e.onMouseUp,Ae=e.holderRef,ye=e.visible,Oe=e.forceRender,K=e.width,se=e.height,le=(0,u.useRef)(),Pe=(0,u.useRef)();u.useImperativeHandle(a,function(){return{focus:function(){var o;(o=le.current)===null||o===void 0||o.focus()},changeActive:function(o){var g=document,w=g.activeElement;o&&w===Pe.current?le.current.focus():!o&&w===le.current&&Pe.current.focus()}}});var Se={};K!==void 0&&(Se.width=K),se!==void 0&&(Se.height=se);var ze;v&&(ze=u.createElement("div",{className:"".concat(r,"-footer")},v));var nt;c&&(nt=u.createElement("div",{className:"".concat(r,"-header")},u.createElement("div",{className:"".concat(r,"-title"),id:p},c)));var f;C&&(f=u.createElement("button",{type:"button",onClick:b,"aria-label":"Close",className:"".concat(r,"-close")},Z||u.createElement("span",{className:"".concat(r,"-close-x")})));var n=u.createElement("div",{className:"".concat(r,"-content")},f,nt,u.createElement("div",(0,N.Z)({className:"".concat(r,"-body"),style:W},we),G),ze);return u.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":c?p:null,"aria-modal":"true",ref:Ae,style:(0,h.Z)((0,h.Z)({},s),Se),className:i()(r,t),onMouseDown:ie,onMouseUp:Re},u.createElement("div",{tabIndex:0,ref:le,style:xe,"aria-hidden":"true"}),u.createElement(Ue,{shouldUpdate:ye||Oe},ae?ae(n):n),u.createElement("div",{tabIndex:0,ref:Pe,style:xe,"aria-hidden":"true"}))}),he=j,gt=u.forwardRef(function(e,a){var r=e.prefixCls,t=e.title,s=e.style,c=e.className,p=e.visible,v=e.forceRender,C=e.destroyOnClose,Z=e.motionName,b=e.ariaId,G=e.onVisibleChanged,W=e.mousePosition,we=(0,u.useRef)(),ae=u.useState(),ie=(0,z.Z)(ae,2),Re=ie[0],Ae=ie[1],ye={};Re&&(ye.transformOrigin=Re);function Oe(){var K=mt(we.current);Ae(W?"".concat(W.x-K.left,"px ").concat(W.y-K.top,"px"):"")}return u.createElement($e.Z,{visible:p,onVisibleChanged:G,onAppearPrepare:Oe,onEnterPrepare:Oe,forceRender:v,motionName:Z,removeOnLeave:C,ref:we},function(K,se){var le=K.className,Pe=K.style;return u.createElement(he,(0,N.Z)({},e,{ref:a,title:t,ariaId:b,prefixCls:r,holderRef:se,style:(0,h.Z)((0,h.Z)((0,h.Z)({},Pe),s),ye),className:i()(c,le)}))})});gt.displayName="Content";var be=gt;function A(e){var a=e.prefixCls,r=a===void 0?"rc-dialog":a,t=e.zIndex,s=e.visible,c=s===void 0?!1:s,p=e.keyboard,v=p===void 0?!0:p,C=e.focusTriggerAfterClose,Z=C===void 0?!0:C,b=e.scrollLocker,G=e.wrapStyle,W=e.wrapClassName,we=e.wrapProps,ae=e.onClose,ie=e.afterClose,Re=e.transitionName,Ae=e.animation,ye=e.closable,Oe=ye===void 0?!0:ye,K=e.mask,se=K===void 0?!0:K,le=e.maskTransitionName,Pe=e.maskAnimation,Se=e.maskClosable,ze=Se===void 0?!0:Se,nt=e.maskStyle,f=e.maskProps,n=e.rootClassName,m=(0,u.useRef)(),o=(0,u.useRef)(),g=(0,u.useRef)(),w=u.useState(c),y=(0,z.Z)(w,2),x=y[0],E=y[1],M=dt();function S(k){if(k){if(!(0,F.Z)(o.current,document.activeElement)){var q;m.current=document.activeElement,(q=g.current)===null||q===void 0||q.focus()}}else{if(E(!1),se&&m.current&&Z){try{m.current.focus({preventScroll:!0})}catch(rt){}m.current=null}x&&(ie==null||ie())}}function $(k){ae==null||ae(k)}var R=(0,u.useRef)(!1),J=(0,u.useRef)(),H=function(){clearTimeout(J.current),R.current=!0},Q=function(){J.current=setTimeout(function(){R.current=!1})},ce=null;ze&&(ce=function(q){R.current?R.current=!1:o.current===q.target&&$(q)});function ue(k){if(v&&k.keyCode===tt.Z.ESC){k.stopPropagation(),$(k);return}c&&k.keyCode===tt.Z.TAB&&g.current.changeActive(!k.shiftKey)}return(0,u.useEffect)(function(){return c&&E(!0),function(){}},[c]),(0,u.useEffect)(function(){return function(){clearTimeout(J.current)}},[]),(0,u.useEffect)(function(){return x?(b==null||b.lock(),b==null?void 0:b.unLock):function(){}},[x,b]),u.createElement("div",(0,N.Z)({className:i()("".concat(r,"-root"),n)},(0,De.Z)(e,{data:!0})),u.createElement(D,{prefixCls:r,visible:se&&c,motionName:Te(r,le,Pe),style:(0,h.Z)({zIndex:t},nt),maskProps:f}),u.createElement("div",(0,N.Z)({tabIndex:-1,onKeyDown:ue,className:i()("".concat(r,"-wrap"),W),ref:o,onClick:ce,style:(0,h.Z)((0,h.Z)({zIndex:t},G),{},{display:x?null:"none"})},we),u.createElement(be,(0,N.Z)({},e,{onMouseDown:H,onMouseUp:Q,ref:g,closable:Oe,ariaId:M,prefixCls:r,visible:c,onClose:$,onVisibleChanged:S,motionName:Te(r,Re,Ae)}))))}var We=function(a){var r=a.visible,t=a.getContainer,s=a.forceRender,c=a.destroyOnClose,p=c===void 0?!1:c,v=a.afterClose,C=u.useState(r),Z=(0,z.Z)(C,2),b=Z[0],G=Z[1];return u.useEffect(function(){r&&G(!0)},[r]),t===!1?u.createElement(A,(0,N.Z)({},a,{getOpenCount:function(){return 2}})):!s&&p&&!b?null:u.createElement(V.Z,{visible:r,forceRender:s,getContainer:t},function(W){return u.createElement(A,(0,N.Z)({},a,{destroyOnClose:p,afterClose:function(){v==null||v(),G(!1)}},W))})};We.displayName="Dialog";var Ct=We,T=Ct},2016:function(Nt,et,l){"use strict";l.d(et,{Z:function(){return Ct}});var N=l(6610),z=l(5991),u=l(10379),B=l(54070),V=l(90484),h=l(67294),Ce=l(75164),i=l(59015),tt=l(98924),X=l(74204);function Le(T){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!T)return{};var a=e.element,r=a===void 0?document.body:a,t={},s=Object.keys(T);return s.forEach(function(c){t[c]=r.style[c]}),s.forEach(function(c){r.style[c]=T[c]}),t}var oe=Le;function dt(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var F={},De=function(T){if(!(!dt()&&!T)){var e="ant-scrolling-effect",a=new RegExp("".concat(e),"g"),r=document.body.className;if(T){if(!a.test(r))return;oe(F),F={},document.body.className=r.replace(a,"").trim();return}var t=(0,X.Z)();if(t&&(F=oe({position:"relative",width:"calc(100% - ".concat(t,"px)")}),!a.test(r))){var s="".concat(r," ").concat(e);document.body.className=s.trim()}}},$e=l(85061),D=[],Te="ant-scrolling-effect",pe=new RegExp("".concat(Te),"g"),mt=0,Ue=new Map,xe=(0,z.Z)(function T(e){var a=this;(0,N.Z)(this,T),this.lockTarget=void 0,this.options=void 0,this.getContainer=function(){var r;return(r=a.options)===null||r===void 0?void 0:r.container},this.reLock=function(r){var t=D.find(function(s){var c=s.target;return c===a.lockTarget});t&&a.unLock(),a.options=r,t&&(t.options=r,a.lock())},this.lock=function(){var r;if(!D.some(function(v){var C=v.target;return C===a.lockTarget})){if(D.some(function(v){var C,Z=v.options;return(Z==null?void 0:Z.container)===((C=a.options)===null||C===void 0?void 0:C.container)})){D=[].concat((0,$e.Z)(D),[{target:a.lockTarget,options:a.options}]);return}var t=0,s=((r=a.options)===null||r===void 0?void 0:r.container)||document.body;(s===document.body&&window.innerWidth-document.documentElement.clientWidth>0||s.scrollHeight>s.clientHeight)&&(t=(0,X.Z)());var c=s.className;if(D.filter(function(v){var C,Z=v.options;return(Z==null?void 0:Z.container)===((C=a.options)===null||C===void 0?void 0:C.container)}).length===0&&Ue.set(s,oe({width:t!==0?"calc(100% - ".concat(t,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:s})),!pe.test(c)){var p="".concat(c," ").concat(Te);s.className=p.trim()}D=[].concat((0,$e.Z)(D),[{target:a.lockTarget,options:a.options}])}},this.unLock=function(){var r,t=D.find(function(p){var v=p.target;return v===a.lockTarget});if(D=D.filter(function(p){var v=p.target;return v!==a.lockTarget}),!(!t||D.some(function(p){var v,C=p.options;return(C==null?void 0:C.container)===((v=t.options)===null||v===void 0?void 0:v.container)}))){var s=((r=a.options)===null||r===void 0?void 0:r.container)||document.body,c=s.className;!pe.test(c)||(oe(Ue.get(s),{element:s}),Ue.delete(s),s.className=s.className.replace(pe,"").trim())}},this.lockTarget=mt++,this.options=e}),j=0,he=(0,tt.Z)();function gt(){return 0}var be={},A=function(e){if(!he)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if((0,V.Z)(e)==="object"&&e instanceof window.HTMLElement)return e}return document.body},We=function(T){(0,u.Z)(a,T);var e=(0,B.Z)(a);function a(r){var t;return(0,N.Z)(this,a),t=e.call(this,r),t.container=void 0,t.componentRef=h.createRef(),t.rafId=void 0,t.scrollLocker=void 0,t.renderComponent=void 0,t.updateScrollLocker=function(s){var c=s||{},p=c.visible,v=t.props,C=v.getContainer,Z=v.visible;Z&&Z!==p&&he&&A(C)!==t.scrollLocker.getContainer()&&t.scrollLocker.reLock({container:A(C)})},t.updateOpenCount=function(s){var c=s||{},p=c.visible,v=c.getContainer,C=t.props,Z=C.visible,b=C.getContainer;Z!==p&&he&&A(b)===document.body&&(Z&&!p?j+=1:s&&(j-=1));var G=typeof b=="function"&&typeof v=="function";(G?b.toString()!==v.toString():b!==v)&&t.removeCurrentContainer()},t.attachToParent=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(s||t.container&&!t.container.parentNode){var c=A(t.props.getContainer);return c?(c.appendChild(t.container),!0):!1}return!0},t.getContainer=function(){return he?(t.container||(t.container=document.createElement("div"),t.attachToParent(!0)),t.setWrapperClassName(),t.container):null},t.setWrapperClassName=function(){var s=t.props.wrapperClassName;t.container&&s&&s!==t.container.className&&(t.container.className=s)},t.removeCurrentContainer=function(){var s,c;(s=t.container)===null||s===void 0||(c=s.parentNode)===null||c===void 0||c.removeChild(t.container)},t.switchScrollingEffect=function(){j===1&&!Object.keys(be).length?(De(),be=oe({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"})):j||(oe(be),be={},De(!0))},t.scrollLocker=new xe({container:A(r.getContainer)}),t}return(0,z.Z)(a,[{key:"componentDidMount",value:function(){var t=this;this.updateOpenCount(),this.attachToParent()||(this.rafId=(0,Ce.Z)(function(){t.forceUpdate()}))}},{key:"componentDidUpdate",value:function(t){this.updateOpenCount(t),this.updateScrollLocker(t),this.setWrapperClassName(),this.attachToParent()}},{key:"componentWillUnmount",value:function(){var t=this.props,s=t.visible,c=t.getContainer;he&&A(c)===document.body&&(j=s&&j?j-1:j),this.removeCurrentContainer(),Ce.Z.cancel(this.rafId)}},{key:"render",value:function(){var t=this.props,s=t.children,c=t.forceRender,p=t.visible,v=null,C={getOpenCount:function(){return j},getContainer:this.getContainer,switchScrollingEffect:this.switchScrollingEffect,scrollLocker:this.scrollLocker};return(c||p||this.componentRef.current)&&(v=h.createElement(i.Z,{getContainer:this.getContainer,ref:this.componentRef},s(C))),v}}]),a}(h.Component),Ct=We}}]);