(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{bT9E:function(Xt,Le,y){"use strict";y.d(Le,"a",function(){return M});var j=y("VTBJ");function M(Oe,h){var d=Object(j.a)({},Oe);return Array.isArray(h)&&h.forEach(function(Ee){delete d[Ee]}),d}},k3GJ:function(Xt,Le,y){"use strict";y.d(Le,"a",function(){return Qn});var j=y("rePB"),M=y("ODXe"),Oe=y("Ff2n"),h=y("VTBJ"),d=y("q1tI"),Ee=y("TSYQ"),X=y.n(Ee),at=y("Zm9Q"),it=y("6cGi"),Ae=y("KQm4"),rt=y("xEkU"),ke=y.n(rt),st=y("t23M");function Be(o){var s=Object(d.useRef)(),u=Object(d.useRef)(!1);function i(){for(var e=arguments.length,n=new Array(e),t=0;tf&&(m=f-v),Object(d.useMemo)(function(){if(!n.length)return[0,0];for(var b=n.length,C=b,D=0;Dl+m){C=D-1;break}}for(var N=0,R=b-1;R>=0;R-=1){var w=o.get(n[R].key)||ue;if(w[c]1&&arguments[1]!==void 0?arguments[1]:!1,i=s&&typeof s.getBoundingClientRect=="function"&&s.getBoundingClientRect().width;if(i){if(u){var e=getComputedStyle(s),n=e.marginLeft,t=e.marginRight;i+=+n.replace("px","")+ +t.replace("px","")}i=+i.toFixed(6)}return i||0},ut=function(s,u,i){s&&Object($e.a)(s.style)==="object"&&(s.style[u]=i)},Do=function(){return _o.any},Ro=y("bdgK"),un=y("i8i4"),No=y.n(un),ye=y("wgJM"),Ct=y("l4aY"),cn=y("m+aA"),Mt=y("c+Xe"),ct=y("zT1h"),Ao=y("QC+M");function ko(o,s,u){return u?o[0]===s[0]:o[0]===s[0]&&o[1]===s[1]}function xo(o,s,u){var i=o[s]||{};return Object(h.a)(Object(h.a)({},i),u)}function Po(o,s,u,i){for(var e=u.points,n=Object.keys(o),t=0;t1&&arguments[1]!==void 0?arguments[1]:2;s();var n=Object(ye.a)(function(){e<=1?i({isCanceled:function(){return n!==o.current}}):u(i,e-1)});o.current=n}return d.useEffect(function(){return function(){s()}},[]),[u,s]},Cn=[Te,We,ze,_t],Mn=!1,Vo=!0;function jn(o){return o===ze||o===_t}var Fo=function(o,s){var u=d.useState(On),i=Object(M.a)(u,2),e=i[0],n=i[1],t=zo(),a=Object(M.a)(t,2),r=a[0],c=a[1];function l(){n(Te)}return En(function(){if(e!==On&&e!==_t){var f=Cn.indexOf(e),p=Cn[f+1],v=s(e);v===Mn?n(p):r(function(m){function b(){if(m.isCanceled())return;n(p)}v===!0?b():Promise.resolve(v).then(b)})}},[o,e]),d.useEffect(function(){return function(){c()}},[]),[l,e]},Ho=function(o){var s=Object(d.useRef)(),u=Object(d.useRef)(o);u.current=o;var i=d.useCallback(function(t){u.current(t)},[]);function e(t){t&&(t.removeEventListener(gn,i),t.removeEventListener(bn,i))}function n(t){s.current&&s.current!==t&&e(s.current),t&&t!==s.current&&(t.addEventListener(gn,i),t.addEventListener(bn,i),s.current=t)}return d.useEffect(function(){return function(){e(s.current)}},[]),[n,e]};function Bo(o,s,u,i){var e=i.motionEnter,n=e===void 0?!0:e,t=i.motionAppear,a=t===void 0?!0:t,r=i.motionLeave,c=r===void 0?!0:r,l=i.motionDeadline,f=i.motionLeaveImmediately,p=i.onAppearPrepare,v=i.onEnterPrepare,m=i.onLeavePrepare,b=i.onAppearStart,C=i.onEnterStart,D=i.onLeaveStart,S=i.onAppearActive,N=i.onEnterActive,R=i.onLeaveActive,w=i.onAppearEnd,_=i.onEnterEnd,I=i.onLeaveEnd,A=i.onVisibleChanged,Q=Dt(),W=Object(M.a)(Q,2),E=W[0],O=W[1],k=Dt(Ge),P=Object(M.a)(k,2),g=P[0],L=P[1],B=Dt(null),U=Object(M.a)(B,2),V=U[0],Y=U[1],ie=Object(d.useRef)(!1),fe=Object(d.useRef)(null),Z=Object(d.useRef)(!1),pe=Object(d.useRef)(null);function Me(){var $=u();return $||pe.current}var he=Object(d.useRef)(!1);function be($){var K=Me();if($&&!$.deadline&&$.target!==K)return;var se;g===Tt&&he.current?se=w==null?void 0:w(K,$):g===St&&he.current?se=_==null?void 0:_(K,$):g===wt&&he.current&&(se=I==null?void 0:I(K,$)),se!==!1&&!Z.current&&(L(Ge),Y(null))}var q=Ho(be),le=Object(M.a)(q,1),re=le[0],ne=d.useMemo(function(){var $,K,se;switch(g){case"appear":return $={},Object(j.a)($,Te,p),Object(j.a)($,We,b),Object(j.a)($,ze,S),$;case"enter":return K={},Object(j.a)(K,Te,v),Object(j.a)(K,We,C),Object(j.a)(K,ze,N),K;case"leave":return se={},Object(j.a)(se,Te,m),Object(j.a)(se,We,D),Object(j.a)(se,ze,R),se;default:return{}}},[g]),De=Fo(g,function($){if($===Te){var K=ne[Te];return K?K(Me()):Mn}if(H in ne){var se;Y(((se=ne[H])===null||se===void 0?void 0:se.call(ne,Me(),null))||null)}return H===ze&&(re(Me()),l>0&&(clearTimeout(fe.current),fe.current=setTimeout(function(){be({deadline:!0})},l))),Vo}),Re=Object(M.a)(De,2),Pe=Re[0],H=Re[1],Se=jn(H);he.current=Se,En(function(){O(s);var $=ie.current;if(ie.current=!0,!o)return;var K;!$&&s&&a&&(K=Tt),$&&s&&n&&(K=St),($&&!s&&c||!$&&f&&!s&&c)&&(K=wt),K&&(L(K),Pe())},[s]),Object(d.useEffect)(function(){(g===Tt&&!a||g===St&&!n||g===wt&&!c)&&L(Ge)},[a,n,c]),Object(d.useEffect)(function(){return function(){clearTimeout(fe.current),Z.current=!0}},[]),Object(d.useEffect)(function(){E!==void 0&&g===Ge&&(A==null||A(E))},[E,g]);var Ie=V;return ne[Te]&&H===We&&(Ie=Object(h.a)({transition:"none"},Ie)),[g,H,Ie,E!=null?E:s]}var $o=function(o){Object(me.a)(u,o);var s=Object(ve.a)(u);function u(){return Object(ce.a)(this,u),s.apply(this,arguments)}return Object(de.a)(u,[{key:"render",value:function(){return this.props.children}}]),u}(d.Component),Xo=$o;function Go(o){var s=o;Object($e.a)(o)==="object"&&(s=o.transitionSupport);function u(e){return!!(e.motionName&&s)}var i=d.forwardRef(function(e,n){var t=e.visible,a=t===void 0?!0:t,r=e.removeOnLeave,c=r===void 0?!0:r,l=e.forceRender,f=e.children,p=e.motionName,v=e.leavedClassName,m=e.eventProps,b=u(e),C=Object(d.useRef)(),D=Object(d.useRef)();function S(){try{return Object(cn.a)(C.current||D.current)}catch(L){return null}}var N=Bo(b,a,S,e),R=Object(M.a)(N,4),w=R[0],_=R[1],I=R[2],A=R[3],Q=d.useRef(A);A&&(Q.current=!0);var W=Object(d.useRef)(n);W.current=n;var E=d.useCallback(function(L){C.current=L,Object(Mt.b)(W.current,L)},[]),O,k=Object(h.a)(Object(h.a)({},m),{},{visible:a});if(!f)O=null;else if(w===Ge||!u(e))A?O=f(Object(h.a)({},k),E):!c&&Q.current?O=f(Object(h.a)(Object(h.a)({},k),{},{className:v}),E):l?O=f(Object(h.a)(Object(h.a)({},k),{},{style:{display:"none"}}),E):O=null;else{var P,g;_===Te?g="prepare":jn(_)?g="active":_===We&&(g="start"),O=f(Object(h.a)(Object(h.a)({},k),{},{className:X()(yn(p,w),(P={},Object(j.a)(P,yn(p,"".concat(w,"-").concat(g)),g),Object(j.a)(P,p,typeof p=="string"),P)),style:I}),E)}return d.createElement(Xo,{ref:D},O)});return i.displayName="CSSMotion",i}var Tn=Go(hn),Rt="add",Nt="keep",At="remove",Sn="removed";function Yo(o){var s;return o&&Object($e.a)(o)==="object"&&"key"in o?s=o:s={key:o},Object(h.a)(Object(h.a)({},s),{},{key:String(s.key)})}function kt(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return o.map(Yo)}function Qo(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],u=[],i=0,e=s.length,n=kt(o),t=kt(s);n.forEach(function(c){for(var l=!1,f=i;f1});return r.forEach(function(c){u=u.filter(function(l){var f=l.key,p=l.status;return f!==c||p!==At}),u.forEach(function(l){l.key===c&&(l.status=Nt)})}),u}var Jo=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Zo(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Tn,u=function(i){Object(me.a)(n,i);var e=Object(ve.a)(n);function n(){var t;return Object(ce.a)(this,n),t=e.apply(this,arguments),t.state={keyEntities:[]},t.removeKey=function(a){t.setState(function(r){var c=r.keyEntities;return{keyEntities:c.map(function(l){return l.key!==a?l:Object(h.a)(Object(h.a)({},l),{},{status:Sn})})}})},t}return Object(de.a)(n,[{key:"render",value:function(){var a=this,r=this.state.keyEntities,c=this.props,l=c.component,f=c.children,p=c.onVisibleChanged,v=Object(Oe.a)(c,["component","children","onVisibleChanged"]),m=l||d.Fragment,b={};return Jo.forEach(function(C){b[C]=v[C],delete v[C]}),delete v.keys,d.createElement(m,v,r.map(function(C){var D=C.status,S=Object(Oe.a)(C,["status"]),N=D===Rt||D===Nt;return d.createElement(s,Object(F.a)({},b,{key:S.key,visible:N,eventProps:S,onVisibleChanged:function(w){p==null||p(w,{key:S.key}),w||a.removeKey(S.key)}}),f)}))}}],[{key:"getDerivedStateFromProps",value:function(a,r){var c=a.keys,l=r.keyEntities,f=kt(c),p=Qo(l,f);return{keyEntities:p.filter(function(v){var m=l.find(function(b){var C=b.key;return v.key===C});return!(m&&m.status===Sn&&v.status===At)})}}}]),n}(d.Component);return u.defaultProps={component:"div"},u}var fi=Zo(hn),ft=Tn;function wn(o){var s=o.prefixCls,u=o.motion,i=o.animation,e=o.transitionName;return u||(i?{motionName:"".concat(s,"-").concat(i)}:e?{motionName:e}:null)}function qo(o){var s=o.prefixCls,u=o.visible,i=o.zIndex,e=o.mask,n=o.maskMotion,t=o.maskAnimation,a=o.maskTransitionName;if(!e)return null;var r={};return(n||a||t)&&(r=Object(h.a)({motionAppear:!0},wn({motion:n,prefixCls:s,transitionName:a,animation:t}))),d.createElement(ft,Object(F.a)({},r,{visible:u,removeOnLeave:!0}),function(c){var l=c.className;return d.createElement("div",{style:{zIndex:i},className:X()("".concat(s,"-mask"),l)})})}var ea=y("9mu1"),ta=y("o0o1"),_n=y.n(ta),na=y("HaE+"),Dn=["measure","align",null,"motion"],oa=function(o,s){var u=Object(d.useState)(null),i=Object(M.a)(u,2),e=i[0],n=i[1],t=Object(d.useRef)(),a=Object(d.useRef)(!1);function r(f){a.current||n(f)}function c(){ye.a.cancel(t.current)}function l(f){c(),t.current=Object(ye.a)(function(){r(function(p){switch(e){case"align":return"motion";case"motion":return"stable";default:}return p}),f==null||f()})}return Object(d.useEffect)(function(){r("measure")},[o]),Object(d.useEffect)(function(){switch(e){case"measure":s();break;default:}e&&(t.current=Object(ye.a)(Object(na.a)(_n.a.mark(function f(){var p,v;return _n.a.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:p=Dn.indexOf(e),v=Dn[p+1],v&&p!==-1&&r(v);case 3:case"end":return b.stop()}},f)}))))},[e]),Object(d.useEffect)(function(){return function(){a.current=!0,c()}},[]),[e,l]},aa=function(o){var s=d.useState({width:0,height:0}),u=Object(M.a)(s,2),i=u[0],e=u[1];function n(a){e({width:a.offsetWidth,height:a.offsetHeight})}var t=d.useMemo(function(){var a={};if(o){var r=i.width,c=i.height;o.indexOf("height")!==-1&&c?a.height=c:o.indexOf("minHeight")!==-1&&c&&(a.minHeight=c),o.indexOf("width")!==-1&&r?a.width=r:o.indexOf("minWidth")!==-1&&r&&(a.minWidth=r)}return a},[o,i]);return[t,n]},Rn=d.forwardRef(function(o,s){var u=o.visible,i=o.prefixCls,e=o.className,n=o.style,t=o.children,a=o.zIndex,r=o.stretch,c=o.destroyPopupOnHide,l=o.forceRender,f=o.align,p=o.point,v=o.getRootDomNode,m=o.getClassNameFromAlign,b=o.onAlign,C=o.onMouseEnter,D=o.onMouseLeave,S=o.onMouseDown,N=o.onTouchStart,R=Object(d.useRef)(),w=Object(d.useRef)(),_=Object(d.useState)(),I=Object(M.a)(_,2),A=I[0],Q=I[1],W=aa(r),E=Object(M.a)(W,2),O=E[0],k=E[1];function P(){r&&k(v())}var g=oa(u,P),L=Object(M.a)(g,2),B=L[0],U=L[1],V=Object(d.useRef)();function Y(){return p||v}function ie(){var q;(q=R.current)===null||q===void 0||q.forceAlign()}function fe(q,le){var re=m(le);A!==re&&Q(re),B==="align"&&(A!==re?Promise.resolve().then(function(){ie()}):U(function(){var ne;(ne=V.current)===null||ne===void 0||ne.call(V)}),b==null||b(q,le))}var Z=Object(h.a)({},wn(o));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(q){var le=Z[q];Z[q]=function(re,ne){return U(),le==null?void 0:le(re,ne)}});function pe(){return new Promise(function(q){V.current=q})}d.useEffect(function(){!Z.motionName&&B==="motion"&&U()},[Z.motionName,B]),d.useImperativeHandle(s,function(){return{forceAlign:ie,getElement:function(){return w.current}}});var Me=Object(h.a)(Object(h.a)({},O),{},{zIndex:a,opacity:B==="motion"||B==="stable"||!u?void 0:0,pointerEvents:B==="stable"?void 0:"none"},n),he=!0;(f==null?void 0:f.points)&&(B==="align"||B==="stable")&&(he=!1);var be=t;return d.Children.count(t)>1&&(be=d.createElement("div",{className:"".concat(i,"-content")},t)),d.createElement(ft,Object(F.a)({visible:u,ref:w,leavedClassName:"".concat(i,"-hidden")},Z,{onAppearPrepare:pe,onEnterPrepare:pe,removeOnLeave:c,forceRender:l}),function(q,le){var re=q.className,ne=q.style,De=X()(i,e,A,re);return d.createElement(ea.a,{target:Y(),key:"popup",ref:R,monitorWindowResize:!0,disabled:he,align:f,onAlign:fe},d.createElement("div",{ref:le,className:De,onMouseEnter:C,onMouseLeave:D,onMouseDownCapture:S,onTouchStartCapture:N,style:Object(h.a)(Object(h.a)({},ne),Me)},be))})});Rn.displayName="PopupInner";var ia=Rn,Nn=d.forwardRef(function(o,s){var u=o.prefixCls,i=o.visible,e=o.zIndex,n=o.children,t=o.mobile;t=t===void 0?{}:t;var a=t.popupClassName,r=t.popupStyle,c=t.popupMotion,l=c===void 0?{}:c,f=t.popupRender,p=d.useRef();d.useImperativeHandle(s,function(){return{forceAlign:function(){},getElement:function(){return p.current}}});var v=Object(h.a)({zIndex:e},r),m=n;return d.Children.count(n)>1&&(m=d.createElement("div",{className:"".concat(u,"-content")},n)),f&&(m=f(m)),d.createElement(ft,Object(F.a)({visible:i,ref:p,removeOnLeave:!0},l),function(b,C){var D=b.className,S=b.style,N=X()(u,a,D);return d.createElement("div",{ref:C,className:N,style:Object(h.a)(Object(h.a)({},S),v)},m)})});Nn.displayName="MobilePopupInner";var ra=Nn,sa=["visible","mobile"],An=d.forwardRef(function(o,s){var u=o.visible,i=o.mobile,e=Object(Oe.a)(o,sa),n=Object(d.useState)(u),t=Object(M.a)(n,2),a=t[0],r=t[1],c=Object(d.useState)(!1),l=Object(M.a)(c,2),f=l[0],p=l[1],v=Object(h.a)(Object(h.a)({},e),{},{visible:a});Object(d.useEffect)(function(){r(u),u&&i&&p(Io())},[u,i]);var m=f?d.createElement(ra,Object(F.a)({},v,{mobile:i,ref:s})):d.createElement(ia,Object(F.a)({},v,{ref:s}));return d.createElement("div",null,d.createElement(qo,v),m)});An.displayName="Popup";var la=An,ua=d.createContext(null),kn=ua;function xt(){}function ca(){return""}function da(o){return o?o.ownerDocument:window.document}var fa=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function pa(o){var s=function(u){Object(me.a)(e,u);var i=Object(ve.a)(e);function e(n){var t;Object(ce.a)(this,e),t=i.call(this,n),t.popupRef=d.createRef(),t.triggerRef=d.createRef(),t.attachId=void 0,t.clickOutsideHandler=void 0,t.touchOutsideHandler=void 0,t.contextMenuOutsideHandler1=void 0,t.contextMenuOutsideHandler2=void 0,t.mouseDownTimeout=void 0,t.focusTime=void 0,t.preClickTime=void 0,t.preTouchTime=void 0,t.delayTimer=void 0,t.hasPopupMouseDown=void 0,t.onMouseEnter=function(r){var c=t.props.mouseEnterDelay;t.fireEvents("onMouseEnter",r),t.delaySetPopupVisible(!0,c,c?null:r)},t.onMouseMove=function(r){t.fireEvents("onMouseMove",r),t.setPoint(r)},t.onMouseLeave=function(r){t.fireEvents("onMouseLeave",r),t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)},t.onPopupMouseEnter=function(){t.clearDelayTimer()},t.onPopupMouseLeave=function(r){var c;if(r.relatedTarget&&!r.relatedTarget.setTimeout&&Object(Ct.a)((c=t.popupRef.current)===null||c===void 0?void 0:c.getElement(),r.relatedTarget))return;t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)},t.onFocus=function(r){t.fireEvents("onFocus",r),t.clearDelayTimer(),t.isFocusToShow()&&(t.focusTime=Date.now(),t.delaySetPopupVisible(!0,t.props.focusDelay))},t.onMouseDown=function(r){t.fireEvents("onMouseDown",r),t.preClickTime=Date.now()},t.onTouchStart=function(r){t.fireEvents("onTouchStart",r),t.preTouchTime=Date.now()},t.onBlur=function(r){t.fireEvents("onBlur",r),t.clearDelayTimer(),t.isBlurToHide()&&t.delaySetPopupVisible(!1,t.props.blurDelay)},t.onContextMenu=function(r){r.preventDefault(),t.fireEvents("onContextMenu",r),t.setPopupVisible(!0,r)},t.onContextMenuClose=function(){t.isContextMenuToShow()&&t.close()},t.onClick=function(r){if(t.fireEvents("onClick",r),t.focusTime){var c;if(t.preClickTime&&t.preTouchTime?c=Math.min(t.preClickTime,t.preTouchTime):t.preClickTime?c=t.preClickTime:t.preTouchTime&&(c=t.preTouchTime),Math.abs(c-t.focusTime)<20)return;t.focusTime=0}t.preClickTime=0,t.preTouchTime=0,t.isClickToShow()&&(t.isClickToHide()||t.isBlurToHide())&&r&&r.preventDefault&&r.preventDefault();var l=!t.state.popupVisible;(t.isClickToHide()&&!l||l&&t.isClickToShow())&&t.setPopupVisible(!t.state.popupVisible,r)},t.onPopupMouseDown=function(){if(t.hasPopupMouseDown=!0,clearTimeout(t.mouseDownTimeout),t.mouseDownTimeout=window.setTimeout(function(){t.hasPopupMouseDown=!1},0),t.context){var r;(r=t.context).onPopupMouseDown.apply(r,arguments)}},t.onDocumentClick=function(r){if(t.props.mask&&!t.props.maskClosable)return;var c=r.target,l=t.getRootDomNode(),f=t.getPopupDomNode();(!Object(Ct.a)(l,c)||t.isContextMenuOnly())&&!Object(Ct.a)(f,c)&&!t.hasPopupMouseDown&&t.close()},t.getRootDomNode=function(){var r=t.props.getTriggerDOMNode;if(r)return r(t.triggerRef.current);try{var c=Object(cn.a)(t.triggerRef.current);if(c)return c}catch(l){}return No.a.findDOMNode(Object(ee.a)(t))},t.getPopupClassNameFromAlign=function(r){var c=[],l=t.props,f=l.popupPlacement,p=l.builtinPlacements,v=l.prefixCls,m=l.alignPoint,b=l.getPopupClassNameFromAlign;return f&&p&&c.push(Po(p,v,r,m)),b&&c.push(b(r)),c.join(" ")},t.getComponent=function(){var r=t.props,c=r.prefixCls,l=r.destroyPopupOnHide,f=r.popupClassName,p=r.onPopupAlign,v=r.popupMotion,m=r.popupAnimation,b=r.popupTransitionName,C=r.popupStyle,D=r.mask,S=r.maskAnimation,N=r.maskTransitionName,R=r.maskMotion,w=r.zIndex,_=r.popup,I=r.stretch,A=r.alignPoint,Q=r.mobile,W=r.forceRender,E=t.state,O=E.popupVisible,k=E.point,P=t.getPopupAlign(),g={};return t.isMouseEnterToShow()&&(g.onMouseEnter=t.onPopupMouseEnter),t.isMouseLeaveToHide()&&(g.onMouseLeave=t.onPopupMouseLeave),g.onMouseDown=t.onPopupMouseDown,g.onTouchStart=t.onPopupMouseDown,d.createElement(la,Object(F.a)({prefixCls:c,destroyPopupOnHide:l,visible:O,point:A&&k,className:f,align:P,onAlign:p,animation:m,getClassNameFromAlign:t.getPopupClassNameFromAlign},g,{stretch:I,getRootDomNode:t.getRootDomNode,style:C,mask:D,zIndex:w,transitionName:b,maskAnimation:S,maskTransitionName:N,maskMotion:R,ref:t.popupRef,motion:v,mobile:Q,forceRender:W}),typeof _=="function"?_():_)},t.attachParent=function(r){ye.a.cancel(t.attachId);var c=t.props,l=c.getPopupContainer,f=c.getDocument,p=t.getRootDomNode(),v;l?(p||l.length===0)&&(v=l(p)):v=f(t.getRootDomNode()).body,v?v.appendChild(r):t.attachId=Object(ye.a)(function(){t.attachParent(r)})},t.getContainer=function(){var r=t.props.getDocument,c=r(t.getRootDomNode()).createElement("div");return c.style.position="absolute",c.style.top="0",c.style.left="0",c.style.width="100%",t.attachParent(c),c},t.setPoint=function(r){var c=t.props.alignPoint;if(!c||!r)return;t.setState({point:{pageX:r.pageX,pageY:r.pageY}})},t.handlePortalUpdate=function(){t.state.prevPopupVisible!==t.state.popupVisible&&t.props.afterPopupVisibleChange(t.state.popupVisible)},t.triggerContextValue={onPopupMouseDown:t.onPopupMouseDown};var a;return"popupVisible"in n?a=!!n.popupVisible:a=!!n.defaultPopupVisible,t.state={prevPopupVisible:a,popupVisible:a},fa.forEach(function(r){t["fire".concat(r)]=function(c){t.fireEvents(r,c)}}),t}return Object(de.a)(e,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var t=this.props,a=this.state;if(a.popupVisible){var r;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(r=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(ct.a)(r,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(r=r||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(ct.a)(r,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(r=r||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(ct.a)(r,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(ct.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),ye.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var t;return((t=this.popupRef.current)===null||t===void 0?void 0:t.getElement())||null}},{key:"getPopupAlign",value:function(){var t=this.props,a=t.popupPlacement,r=t.popupAlign,c=t.builtinPlacements;return a&&c?xo(c,a,r):r}},{key:"setPopupVisible",value:function(t,a){var r=this.props.alignPoint,c=this.state.popupVisible;this.clearDelayTimer(),c!==t&&("popupVisible"in this.props||this.setState({popupVisible:t,prevPopupVisible:c}),this.props.onPopupVisibleChange(t)),r&&a&&t&&this.setPoint(a)}},{key:"delaySetPopupVisible",value:function(t,a,r){var c=this,l=a*1e3;if(this.clearDelayTimer(),l){var f=r?{pageX:r.pageX,pageY:r.pageY}:null;this.delayTimer=window.setTimeout(function(){c.setPopupVisible(t,f),c.clearDelayTimer()},l)}else this.setPopupVisible(t,r)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(t){var a=this.props.children.props,r=this.props;return a[t]&&r[t]?this["fire".concat(t)]:a[t]||r[t]}},{key:"isClickToShow",value:function(){var t=this.props,a=t.action,r=t.showAction;return a.indexOf("click")!==-1||r.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var t=this.props.action;return t==="contextMenu"||t.length===1&&t[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var t=this.props,a=t.action,r=t.showAction;return a.indexOf("contextMenu")!==-1||r.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var t=this.props,a=t.action,r=t.hideAction;return a.indexOf("click")!==-1||r.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var t=this.props,a=t.action,r=t.showAction;return a.indexOf("hover")!==-1||r.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var t=this.props,a=t.action,r=t.hideAction;return a.indexOf("hover")!==-1||r.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var t=this.props,a=t.action,r=t.showAction;return a.indexOf("focus")!==-1||r.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var t=this.props,a=t.action,r=t.hideAction;return a.indexOf("focus")!==-1||r.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var t;(t=this.popupRef.current)===null||t===void 0||t.forceAlign()}}},{key:"fireEvents",value:function(t,a){var r=this.props.children.props[t];r&&r(a);var c=this.props[t];c&&c(a)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var t=this.state.popupVisible,a=this.props,r=a.children,c=a.forceRender,l=a.alignPoint,f=a.className,p=a.autoDestroy,v=d.Children.only(r),m={key:"trigger"};this.isContextMenuToShow()?m.onContextMenu=this.onContextMenu:m.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(m.onClick=this.onClick,m.onMouseDown=this.onMouseDown,m.onTouchStart=this.onTouchStart):(m.onClick=this.createTwoChains("onClick"),m.onMouseDown=this.createTwoChains("onMouseDown"),m.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(m.onMouseEnter=this.onMouseEnter,l&&(m.onMouseMove=this.onMouseMove)):m.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?m.onMouseLeave=this.onMouseLeave:m.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(m.onFocus=this.onFocus,m.onBlur=this.onBlur):(m.onFocus=this.createTwoChains("onFocus"),m.onBlur=this.createTwoChains("onBlur"));var b=X()(v&&v.props&&v.props.className,f);b&&(m.className=b);var C=Object(h.a)({},m);Object(Mt.c)(v)&&(C.ref=Object(Mt.a)(this.triggerRef,v.ref));var D=d.cloneElement(v,C),S;return(t||this.popupRef.current||c)&&(S=d.createElement(o,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!t&&p&&(S=null),d.createElement(kn.Provider,{value:this.triggerContextValue},D,S)}}],[{key:"getDerivedStateFromProps",value:function(t,a){var r=t.popupVisible,c={};return r!==void 0&&a.popupVisible!==r&&(c.popupVisible=r,c.prevPopupVisible=a.popupVisible),c}}]),e}(d.Component);return s.contextType=kn,s.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:ca,getDocument:da,onPopupVisibleChange:xt,afterPopupVisibleChange:xt,onPopupAlign:xt,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},s}var ma=pa(Ao.a),_e={adjustX:1,adjustY:1},xn={topLeft:{points:["bl","tl"],overflow:_e,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:_e,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:_e,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:_e,offset:[4,0]}},va={topLeft:{points:["bl","tl"],overflow:_e,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:_e,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:_e,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:_e,offset:[4,0]}},pi=xn,Pn=0,ha={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Ye=function(s,u,i){var e=rn(u),n=s.getState();s.setState({defaultActiveFirst:Object(h.a)(Object(h.a)({},n.defaultActiveFirst),{},Object(j.a)({},e,i))})},In=function(o){Object(me.a)(u,o);var s=Object(ve.a)(u);function u(i){var e;Object(ce.a)(this,u),e=s.call(this,i),e.onDestroy=function(l){e.props.onDestroy(l)},e.onKeyDown=function(l){var f=l.keyCode,p=e.menuInstance,v=e.props.store,m=e.getVisible();if(f===J.a.ENTER)return e.onTitleClick(l),Ye(v,e.props.eventKey,!0),!0;if(f===J.a.RIGHT)return m?p.onKeyDown(l):(e.triggerOpenChange(!0),Ye(v,e.props.eventKey,!0)),!0;if(f===J.a.LEFT){var b;if(m)b=p.onKeyDown(l);else return;return b||(e.triggerOpenChange(!1),b=!0),b}return m&&(f===J.a.UP||f===J.a.DOWN)?p.onKeyDown(l):void 0},e.onOpenChange=function(l){e.props.onOpenChange(l)},e.onPopupVisibleChange=function(l){e.triggerOpenChange(l,l?"mouseenter":"mouseleave")},e.onMouseEnter=function(l){var f=e.props,p=f.eventKey,v=f.onMouseEnter,m=f.store;Ye(m,e.props.eventKey,!1),v({key:p,domEvent:l})},e.onMouseLeave=function(l){var f=e.props,p=f.parentMenu,v=f.eventKey,m=f.onMouseLeave;p.subMenuInstance=Object(ee.a)(e),m({key:v,domEvent:l})},e.onTitleMouseEnter=function(l){var f=e.props,p=f.eventKey,v=f.onItemHover,m=f.onTitleMouseEnter;v({key:p,hover:!0}),m({key:p,domEvent:l})},e.onTitleMouseLeave=function(l){var f=e.props,p=f.parentMenu,v=f.eventKey,m=f.onItemHover,b=f.onTitleMouseLeave;p.subMenuInstance=Object(ee.a)(e),m({key:v,hover:!1}),b({key:v,domEvent:l})},e.onTitleClick=function(l){var f=Object(ee.a)(e),p=f.props;if(p.onTitleClick({key:p.eventKey,domEvent:l}),p.triggerSubMenuAction==="hover")return;e.triggerOpenChange(!e.getVisible(),"click"),Ye(p.store,e.props.eventKey,!1)},e.onSubMenuClick=function(l){typeof e.props.onClick=="function"&&e.props.onClick(e.addKeyPath(l))},e.onSelect=function(l){e.props.onSelect(l)},e.onDeselect=function(l){e.props.onDeselect(l)},e.getPrefixCls=function(){return"".concat(e.props.rootPrefixCls,"-submenu")},e.getActiveClassName=function(){return"".concat(e.getPrefixCls(),"-active")},e.getDisabledClassName=function(){return"".concat(e.getPrefixCls(),"-disabled")},e.getSelectedClassName=function(){return"".concat(e.getPrefixCls(),"-selected")},e.getOpenClassName=function(){return"".concat(e.props.rootPrefixCls,"-submenu-open")},e.getVisible=function(){return e.state.isOpen},e.getMode=function(){return e.state.mode},e.saveMenuInstance=function(l){e.menuInstance=l},e.addKeyPath=function(l){return Object(h.a)(Object(h.a)({},l),{},{keyPath:(l.keyPath||[]).concat(e.props.eventKey)})},e.triggerOpenChange=function(l,f){var p=e.props.eventKey,v=function(){e.onOpenChange({key:p,item:Object(ee.a)(e),trigger:f,open:l})};f==="mouseenter"?e.mouseenterTimeout=setTimeout(function(){v()},0):v()},e.isChildrenSelected=function(){var l={find:!1};return ln(e.props.children,e.props.selectedKeys,l),l.find},e.isInlineMode=function(){return e.getMode()==="inline"},e.adjustWidth=function(){if(!e.subMenuTitle||!e.menuInstance)return;var l=un.findDOMNode(e.menuInstance);if(l.offsetWidth>=e.subMenuTitle.offsetWidth)return;l.style.minWidth="".concat(e.subMenuTitle.offsetWidth,"px")},e.saveSubMenuTitle=function(l){e.subMenuTitle=l},e.getBaseProps=function(){var l=Object(ee.a)(e),f=l.props,p=e.getMode();return{mode:p==="horizontal"?"vertical":p,visible:e.getVisible(),level:f.level+1,inlineIndent:f.inlineIndent,focusable:!1,onClick:e.onSubMenuClick,onSelect:e.onSelect,onDeselect:e.onDeselect,onDestroy:e.onDestroy,selectedKeys:f.selectedKeys,eventKey:"".concat(f.eventKey,"-menu-"),openKeys:f.openKeys,motion:f.motion,onOpenChange:e.onOpenChange,subMenuOpenDelay:f.subMenuOpenDelay,parentMenu:Object(ee.a)(e),subMenuCloseDelay:f.subMenuCloseDelay,forceSubMenuRender:f.forceSubMenuRender,triggerSubMenuAction:f.triggerSubMenuAction,builtinPlacements:f.builtinPlacements,defaultActiveFirst:f.store.getState().defaultActiveFirst[rn(f.eventKey)],multiple:f.multiple,prefixCls:f.rootPrefixCls,id:e.internalMenuId,manualRef:e.saveMenuInstance,itemIcon:f.itemIcon,expandIcon:f.expandIcon,direction:f.direction}},e.getMotion=function(l,f){var p=Object(ee.a)(e),v=p.haveRendered,m=e.props,b=m.motion,C=m.rootPrefixCls,D=Object(h.a)(Object(h.a)({},b),{},{leavedClassName:"".concat(C,"-hidden"),removeOnLeave:!1,motionAppear:v||!f||l!=="inline"});return D};var n=i.store,t=i.eventKey,a=n.getState(),r=a.defaultActiveFirst;e.isRootMenu=!1;var c=!1;return r&&(c=r[t]),Ye(n,t,c),e.state={mode:i.mode,isOpen:i.isOpen},e}return Object(de.a)(u,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,n=this.props,t=n.mode,a=n.parentMenu,r=n.manualRef,c=n.isOpen,l=function(){e.setState({mode:t,isOpen:c})},f=c!==this.state.isOpen,p=t!==this.state.mode;if((p||f)&&(ye.a.cancel(this.updateStateRaf),p?this.updateStateRaf=Object(ye.a)(l):l()),r&&r(this),t!=="horizontal"||!(a==null?void 0:a.isRootMenu)||!c)return;this.minWidthTimeout=setTimeout(function(){return e.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var e=this.props,n=e.onDestroy,t=e.eventKey;n&&n(t),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ye.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,n){var t=this.getBaseProps();return d.createElement(zn,Object(F.a)({},t,{id:this.internalMenuId,className:e,style:n}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,n=this.getBaseProps(),t=n.mode,a=n.visible,r=n.forceSubMenuRender,c=n.direction,l=this.getMotion(t,a);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||a||r,!this.haveOpened)return d.createElement("div",null);var f=X()("".concat(n.prefixCls,"-sub"),Object(j.a)({},"".concat(n.prefixCls,"-rtl"),c==="rtl"));return this.isInlineMode()?d.createElement(ft,Object(F.a)({visible:n.visible,forceRender:r},l),function(p){var v=p.className,m=p.style,b=X()(f,v);return e.renderPopupMenu(b,m)}):this.renderPopupMenu(f)}},{key:"render",value:function(){var e,n,t,a=Object(h.a)({},this.props),r=this.getVisible(),c=this.getPrefixCls(),l=this.isInlineMode(),f=this.getMode(),p=X()(c,"".concat(c,"-").concat(f),(e={},Object(j.a)(e,a.className,!!a.className),Object(j.a)(e,this.getOpenClassName(),r),Object(j.a)(e,this.getActiveClassName(),a.active||r&&!l),Object(j.a)(e,this.getDisabledClassName(),a.disabled),Object(j.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(a.eventKey?this.internalMenuId="".concat(a.eventKey,"$Menu"):(Pn+=1,this.internalMenuId="$__$".concat(Pn,"$Menu")));var v={},m={},b={};a.disabled||(v={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},m={onClick:this.onTitleClick},b={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var C={},D=a.direction,S=D==="rtl";l&&(S?C.paddingRight=a.inlineIndent*a.level:C.paddingLeft=a.inlineIndent*a.level);var N={};this.getVisible()&&(N={"aria-owns":this.internalMenuId});var R=null;f!=="horizontal"&&(R=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(R=d.createElement(this.props.expandIcon,Object(h.a)({},this.props))));var w=d.createElement("div",Object(F.a)({ref:this.saveSubMenuTitle,style:C,className:"".concat(c,"-title"),role:"button"},b,m,{"aria-expanded":r},N,{"aria-haspopup":"true",title:typeof a.title=="string"?a.title:void 0}),a.title,R||d.createElement("i",{className:"".concat(c,"-arrow")})),_=this.renderChildren(),I=((n=a.parentMenu)===null||n===void 0?void 0:n.isRootMenu)?a.parentMenu.props.getPopupContainer:function(Y){return Y.parentNode},A=ha[f],Q=a.popupOffset?{offset:a.popupOffset}:{},W=X()((t={},Object(j.a)(t,a.popupClassName,a.popupClassName&&!l),Object(j.a)(t,"".concat(c,"-rtl"),S),t)),E=a.disabled,O=a.triggerSubMenuAction,k=a.subMenuOpenDelay,P=a.forceSubMenuRender,g=a.subMenuCloseDelay,L=a.builtinPlacements;Xe.forEach(function(Y){return delete a[Y]}),delete a.onClick;var B=S?Object(h.a)(Object(h.a)({},va),L):Object(h.a)(Object(h.a)({},xn),L);delete a.direction;var U=this.getBaseProps(),V=l?null:this.getMotion(U.mode,U.visible);return d.createElement("li",Object(F.a)({},a,v,{className:p,role:"menuitem"}),d.createElement(ma,{prefixCls:c,popupClassName:X()("".concat(c,"-popup"),W),getPopupContainer:I,builtinPlacements:B,popupPlacement:A,popupVisible:l?!1:r,popupAlign:Q,popup:l?null:_,action:E||l?[]:[O],mouseEnterDelay:k,mouseLeaveDelay:g,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:P,popupMotion:V},w),l?_:null)}}]),u}(d.Component);In.defaultProps={onMouseEnter:ae,onMouseLeave:ae,onTitleMouseEnter:ae,onTitleMouseLeave:ae,onTitleClick:ae,manualRef:ae,mode:"vertical",title:""};var Ln=Object(we.b)(function(o,s){var u=o.openKeys,i=o.activeKey,e=o.selectedKeys,n=s.eventKey,t=s.subMenuKey;return{isOpen:u.indexOf(n)>-1,active:i[t]===n,selectedKeys:e}})(In);Ln.isSubMenu=!0;var ba=Ln,Un="menuitem-overflowed",ga=.5,Kn=function(o){Object(me.a)(u,o);var s=Object(ve.a)(u);function u(){var i;return Object(ce.a)(this,u),i=s.apply(this,arguments),i.resizeObserver=null,i.mutationObserver=null,i.originalTotalWidth=0,i.overflowedItems=[],i.menuItemSizes=[],i.cancelFrameId=null,i.state={lastVisibleIndex:void 0},i.childRef=d.createRef(),i.getMenuItemNodes=function(){var e=i.props.prefixCls,n=i.childRef.current;return n?[].slice.call(n.children).filter(function(t){return t.className.split(" ").indexOf("".concat(e,"-overflowed-submenu"))<0}):[]},i.getOverflowedSubMenuItem=function(e,n,t){var a=i.props,r=a.overflowedIndicator,c=a.level,l=a.mode,f=a.prefixCls,p=a.theme;if(c!==1||l!=="horizontal")return null;var v=i.props.children[0],m=v.props,b=m.children,C=m.title,D=m.style,S=Object(Oe.a)(m,["children","title","style"]),N=Object(h.a)({},D),R="".concat(e,"-overflowed-indicator"),w="".concat(e,"-overflowed-indicator");n.length===0&&t!==!0?N=Object(h.a)(Object(h.a)({},N),{},{display:"none"}):t&&(N=Object(h.a)(Object(h.a)({},N),{},{visibility:"hidden",position:"absolute"}),R="".concat(R,"-placeholder"),w="".concat(w,"-placeholder"));var _=p?"".concat(f,"-").concat(p):"",I={};return Xe.forEach(function(A){S[A]!==void 0&&(I[A]=S[A])}),d.createElement(ba,Object(F.a)({title:r,className:"".concat(f,"-overflowed-submenu"),popupClassName:_},I,{key:R,eventKey:w,disabled:!1,style:N}),n)},i.setChildrenWidthAndResize=function(){if(i.props.mode!=="horizontal")return;var e=i.childRef.current;if(!e)return;var n=e.children;if(!n||n.length===0)return;var t=e.children[n.length-1];ut(t,"display","inline-block");var a=i.getMenuItemNodes(),r=a.filter(function(c){return c.className.split(" ").indexOf(Un)>=0});r.forEach(function(c){ut(c,"display","inline-block")}),i.menuItemSizes=a.map(function(c){return Et(c,!0)}),r.forEach(function(c){ut(c,"display","none")}),i.overflowedIndicatorWidth=Et(e.children[e.children.length-1],!0),i.originalTotalWidth=i.menuItemSizes.reduce(function(c,l){return c+l},0),i.handleResize(),ut(t,"display","none")},i.handleResize=function(){if(i.props.mode!=="horizontal")return;var e=i.childRef.current;if(!e)return;var n=Et(e);i.overflowedItems=[];var t=0,a;i.originalTotalWidth>n+ga&&(a=-1,i.menuItemSizes.forEach(function(r){t+=r,t+i.overflowedIndicatorWidth<=n&&(a+=1)})),i.setState({lastVisibleIndex:a})},i}return Object(de.a)(u,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var n=this.childRef.current;if(!n)return;this.resizeObserver=new Ro.default(function(t){t.forEach(function(){var a=e.cancelFrameId;cancelAnimationFrame(a),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)})}),[].slice.call(n.children).concat(n).forEach(function(t){e.resizeObserver.observe(t)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){e.resizeObserver.disconnect(),[].slice.call(n.children).concat(n).forEach(function(t){e.resizeObserver.observe(t)}),e.setChildrenWidthAndResize()}),this.mutationObserver.observe(n,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var n=this,t=this.state.lastVisibleIndex;return(e||[]).reduce(function(a,r,c){var l=r;if(n.props.mode==="horizontal"){var f=n.getOverflowedSubMenuItem(r.props.eventKey,[]);t!==void 0&&n.props.className.indexOf("".concat(n.props.prefixCls,"-root"))!==-1&&(c>t&&(l=d.cloneElement(r,{style:{display:"none"},eventKey:"".concat(r.props.eventKey,"-hidden"),className:"".concat(Un)})),c===t+1&&(n.overflowedItems=e.slice(t+1).map(function(v){return d.cloneElement(v,{key:v.props.eventKey,mode:"vertical-left"})}),f=n.getOverflowedSubMenuItem(r.props.eventKey,n.overflowedItems)));var p=[].concat(Object(Ae.a)(a),[f,l]);return c===e.length-1&&p.push(n.getOverflowedSubMenuItem(r.props.eventKey,[],!0)),p}return[].concat(Object(Ae.a)(a),[l])},[])}},{key:"render",value:function(){var e=this.props,n=e.visible,t=e.prefixCls,a=e.overflowedIndicator,r=e.mode,c=e.level,l=e.tag,f=e.children,p=e.theme,v=Object(Oe.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),m=l;return d.createElement(m,Object(F.a)({ref:this.childRef},v),this.renderChildren(f))}}]),u}(d.Component);Kn.defaultProps={tag:"div",className:""};var ya=Kn;function Oa(o){return o.length?o.every(function(s){return!!s.props.disabled}):!0}function pt(o,s,u){var i=o.getState();o.setState({activeKey:Object(h.a)(Object(h.a)({},i.activeKey),{},Object(j.a)({},s,u))})}function Ve(o){return o.eventKey||"0-menu-"}function mt(o,s){var u=s,i=o.children,e=o.eventKey;if(u){var n;if(sn(i,function(t,a){t&&t.props&&!t.props.disabled&&u===Ot(t,e,a)&&(n=!0)}),n)return u}return u=null,o.defaultActiveFirst&&sn(i,function(t,a){!u&&t&&!t.props.disabled&&(u=Ot(t,e,a))}),u}function Ea(o){if(!o)return;var s=this.instanceArray.indexOf(o);s!==-1?this.instanceArray[s]=o:this.instanceArray.push(o)}var Wn=function(o){Object(me.a)(u,o);var s=Object(ve.a)(u);function u(i){var e;return Object(ce.a)(this,u),e=s.call(this,i),e.onKeyDown=function(n,t){var a=n.keyCode,r;if(e.getFlatInstanceArray().forEach(function(l){l&&l.props.active&&l.onKeyDown&&(r=l.onKeyDown(n))}),r)return 1;var c=null;return(a===J.a.UP||a===J.a.DOWN)&&(c=e.step(a===J.a.UP?-1:1)),c?(n.preventDefault(),pt(e.props.store,Ve(e.props),c.props.eventKey),typeof t=="function"&&t(c),1):void 0},e.onItemHover=function(n){var t=n.key,a=n.hover;pt(e.props.store,Ve(e.props),a?t:null)},e.onDeselect=function(n){e.props.onDeselect(n)},e.onSelect=function(n){e.props.onSelect(n)},e.onClick=function(n){e.props.onClick(n)},e.onOpenChange=function(n){e.props.onOpenChange(n)},e.onDestroy=function(n){e.props.onDestroy(n)},e.getFlatInstanceArray=function(){return e.instanceArray},e.step=function(n){var t=e.getFlatInstanceArray(),a=e.props.store.getState().activeKey[Ve(e.props)],r=t.length;if(!r)return null;n<0&&(t=t.concat().reverse());var c=-1;if(t.every(function(v,m){return v&&v.props.eventKey===a?(c=m,!1):!0}),!e.props.defaultActiveFirst&&c!==-1&&Oa(t.slice(c,r-1)))return;var l=(c+1)%r,f=l;do{var p=t[f];if(!p||p.props.disabled)f=(f+1)%r;else return p}while(f!==l);return null},e.renderCommonMenuItem=function(n,t,a){var r=e.props.store.getState(),c=Object(ee.a)(e),l=c.props,f=Ot(n,l.eventKey,t),p=n.props;if(!p||typeof n.type=="string")return n;var v=f===r.activeKey,m=Object(h.a)(Object(h.a)({mode:p.mode||l.mode,level:l.level,inlineIndent:l.inlineIndent,renderMenuItem:e.renderMenuItem,rootPrefixCls:l.prefixCls,index:t,parentMenu:l.parentMenu,manualRef:p.disabled?void 0:Object(jo.a)(n.ref,Ea.bind(Object(ee.a)(e))),eventKey:f,active:!p.disabled&&v,multiple:l.multiple,onClick:function(C){(p.onClick||ae)(C),e.onClick(C)},onItemHover:e.onItemHover,motion:l.motion,subMenuOpenDelay:l.subMenuOpenDelay,subMenuCloseDelay:l.subMenuCloseDelay,forceSubMenuRender:l.forceSubMenuRender,onOpenChange:e.onOpenChange,onDeselect:e.onDeselect,onSelect:e.onSelect,builtinPlacements:l.builtinPlacements,itemIcon:p.itemIcon||e.props.itemIcon,expandIcon:p.expandIcon||e.props.expandIcon},a),{},{direction:l.direction});return(l.mode==="inline"||Do())&&(m.triggerSubMenuAction="click"),d.cloneElement(n,Object(h.a)(Object(h.a)({},m),{},{key:f||t}))},e.renderMenuItem=function(n,t,a){if(!n)return null;var r=e.props.store.getState(),c={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:e.props.triggerSubMenuAction,subMenuKey:a};return e.renderCommonMenuItem(n,t,c)},i.store.setState({activeKey:Object(h.a)(Object(h.a)({},i.store.getState().activeKey),{},Object(j.a)({},i.eventKey,mt(i,i.activeKey)))}),e.instanceArray=[],e}return Object(de.a)(u,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!So()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var n=this.props,t="activeKey"in n?n.activeKey:n.store.getState().activeKey[Ve(n)],a=mt(n,t);if(a!==t)pt(n.store,Ve(n),a);else if("activeKey"in e){var r=mt(e,e.activeKey);a!==r&&pt(n.store,Ve(n),a)}}},{key:"render",value:function(){var e=this,n=Object(F.a)({},this.props);this.instanceArray=[];var t=X()(n.prefixCls,n.className,"".concat(n.prefixCls,"-").concat(n.mode)),a={className:t,role:n.role||"menu"};n.id&&(a.id=n.id),n.focusable&&(a.tabIndex=0,a.onKeyDown=this.onKeyDown);var r=n.prefixCls,c=n.eventKey,l=n.visible,f=n.level,p=n.mode,v=n.overflowedIndicator,m=n.theme;return Xe.forEach(function(b){return delete n[b]}),delete n.onClick,d.createElement(ya,Object(F.a)({},n,{prefixCls:r,mode:p,tag:"ul",level:f,theme:m,visible:l,overflowedIndicator:v},a),Object(at.a)(n.children).map(function(b,C){return e.renderMenuItem(b,C,c||"0-menu-")}))}}]),u}(d.Component);Wn.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ae};var Ca=Object(we.b)()(Wn),zn=Ca,Ma=y("Kwbf");function ja(o,s,u){var i=o.prefixCls,e=o.motion,n=o.defaultMotions,t=n===void 0?{}:n,a=o.openAnimation,r=o.openTransitionName,c=s.switchingModeFromInline;if(e)return e;if(Object($e.a)(a)==="object"&&a)Object(Ma.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof a=="string")return{motionName:"".concat(i,"-open-").concat(a)};if(r)return{motionName:r};var l=t[u];return l||(c?null:t.other)}var Vn=function(o){Object(me.a)(u,o);var s=Object(ve.a)(u);function u(i){var e;Object(ce.a)(this,u),e=s.call(this,i),e.onSelect=function(a){var r=Object(ee.a)(e),c=r.props;if(c.selectable){var l=e.store.getState(),f=l.selectedKeys,p=a.key;c.multiple?f=f.concat([p]):f=[p],"selectedKeys"in c||e.store.setState({selectedKeys:f}),c.onSelect(Object(h.a)(Object(h.a)({},a),{},{selectedKeys:f}))}},e.onClick=function(a){var r=e.getRealMenuMode(),c=Object(ee.a)(e),l=c.store,f=c.props.onOpenChange;r!=="inline"&&!("openKeys"in e.props)&&(l.setState({openKeys:[]}),f([])),e.props.onClick(a)},e.onKeyDown=function(a,r){e.innerMenu.getWrappedInstance().onKeyDown(a,r)},e.onOpenChange=function(a){var r=Object(ee.a)(e),c=r.props,l=e.store.getState().openKeys.concat(),f=!1,p=function(m){var b=!1;if(m.open)b=l.indexOf(m.key)===-1,b&&l.push(m.key);else{var C=l.indexOf(m.key);b=C!==-1,b&&l.splice(C,1)}f=f||b};Array.isArray(a)?a.forEach(p):p(a),f&&("openKeys"in e.props||e.store.setState({openKeys:l}),c.onOpenChange(l))},e.onDeselect=function(a){var r=Object(ee.a)(e),c=r.props;if(c.selectable){var l=e.store.getState().selectedKeys.concat(),f=a.key,p=l.indexOf(f);p!==-1&&l.splice(p,1),"selectedKeys"in c||e.store.setState({selectedKeys:l}),c.onDeselect(Object(h.a)(Object(h.a)({},a),{},{selectedKeys:l}))}},e.onMouseEnter=function(a){e.restoreModeVerticalFromInline();var r=e.props.onMouseEnter;r&&r(a)},e.onTransitionEnd=function(a){var r=a.propertyName==="width"&&a.target===a.currentTarget,c=a.target.className,l=Object.prototype.toString.call(c)==="[object SVGAnimatedString]"?c.animVal:c,f=a.propertyName==="font-size"&&l.indexOf("anticon")>=0;(r||f)&&e.restoreModeVerticalFromInline()},e.setInnerMenu=function(a){e.innerMenu=a},e.isRootMenu=!0;var n=i.defaultSelectedKeys,t=i.defaultOpenKeys;return"selectedKeys"in i&&(n=i.selectedKeys||[]),"openKeys"in i&&(t=i.openKeys||[]),e.store=Object(we.c)({selectedKeys:n,openKeys:t,activeKey:{"0-menu-":mt(i,i.activeKey)}}),e.state={switchingModeFromInline:!1,prevProps:i,inlineOpenKeys:[],store:e.store},e}return Object(de.a)(u,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var n=this.props,t=n.siderCollapsed,a=n.inlineCollapsed,r=n.onOpenChange;(!e.inlineCollapsed&&a||!e.siderCollapsed&&t)&&r([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,n=this.store,t=this.prevOpenKeys,a=this.getInlineCollapsed()&&(e===0||e==="0"||e==="0px");a?(this.prevOpenKeys=n.getState().openKeys.concat(),this.store.setState({openKeys:[]})):t&&(this.store.setState({openKeys:t}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,n=this.state.switchingModeFromInline,t=this.getInlineCollapsed();return n&&t?"inline":t?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,n=e.inlineCollapsed,t=e.siderCollapsed;return t!==void 0?t:n}},{key:"restoreModeVerticalFromInline",value:function(){var e=this.state.switchingModeFromInline;e&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(h.a)({},Object(Gt.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),n=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),e.direction==="rtl"&&(e.className+=" ".concat(e.prefixCls,"-rtl")),e=Object(h.a)(Object(h.a)({},e),{},{mode:n,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ja(this.props,this.state,n)}),delete e.openAnimation,delete e.openTransitionName,d.createElement(we.a,{store:this.store},d.createElement(zn,Object(F.a)({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var t=n.prevProps,a=n.store,r=a.getState(),c={},l={prevProps:e};return t.mode==="inline"&&e.mode!=="inline"&&(l.switchingModeFromInline=!0),"openKeys"in e?c.openKeys=e.openKeys||[]:((e.inlineCollapsed&&!t.inlineCollapsed||e.siderCollapsed&&!t.siderCollapsed)&&(l.switchingModeFromInline=!0,l.inlineOpenKeys=r.openKeys,c.openKeys=[]),(!e.inlineCollapsed&&t.inlineCollapsed||!e.siderCollapsed&&t.siderCollapsed)&&(c.openKeys=n.inlineOpenKeys,l.inlineOpenKeys=[])),Object.keys(c).length&&a.setState(c),l}}]),u}(d.Component);Vn.defaultProps={selectable:!0,onClick:ae,onSelect:ae,onOpenChange:ae,onDeselect:ae,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:d.createElement("span",null,"\xB7\xB7\xB7")};var Ta=Vn,Pt=function(o){Object(me.a)(u,o);var s=Object(ve.a)(u);function u(){var i;return Object(ce.a)(this,u),i=s.apply(this,arguments),i.onKeyDown=function(e){var n=e.keyCode;return n===J.a.ENTER?(i.onClick(e),!0):void 0},i.onMouseLeave=function(e){var n=i.props,t=n.eventKey,a=n.onItemHover,r=n.onMouseLeave;a({key:t,hover:!1}),r({key:t,domEvent:e})},i.onMouseEnter=function(e){var n=i.props,t=n.eventKey,a=n.onItemHover,r=n.onMouseEnter;a({key:t,hover:!0}),r({key:t,domEvent:e})},i.onClick=function(e){var n=i.props,t=n.eventKey,a=n.multiple,r=n.onClick,c=n.onSelect,l=n.onDeselect,f=n.isSelected,p={key:t,keyPath:[t],item:Object(ee.a)(i),domEvent:e};r(p),a?f?l(p):c(p):f||c(p)},i.saveNode=function(e){i.node=e},i}return Object(de.a)(u,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,n=Object(h.a)({},this.props),t=X()(this.getPrefixCls(),n.className,(e={},Object(j.a)(e,this.getActiveClassName(),!n.disabled&&n.active),Object(j.a)(e,this.getSelectedClassName(),n.isSelected),Object(j.a)(e,this.getDisabledClassName(),n.disabled),e)),a=Object(h.a)(Object(h.a)({},n.attribute),{},{title:typeof n.title=="string"?n.title:void 0,className:t,role:n.role||"menuitem","aria-disabled":n.disabled});n.role==="option"?a=Object(h.a)(Object(h.a)({},a),{},{role:"option","aria-selected":n.isSelected}):(n.role===null||n.role==="none")&&(a.role="none");var r={onClick:n.disabled?null:this.onClick,onMouseLeave:n.disabled?null:this.onMouseLeave,onMouseEnter:n.disabled?null:this.onMouseEnter},c=Object(h.a)({},n.style);n.mode==="inline"&&(n.direction==="rtl"?c.paddingRight=n.inlineIndent*n.level:c.paddingLeft=n.inlineIndent*n.level),Xe.forEach(function(f){return delete n[f]}),delete n.direction;var l=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(l=d.createElement(this.props.itemIcon,this.props)),d.createElement("li",Object(F.a)({},Object(Gt.a)(n,["onClick","onMouseEnter","onMouseLeave","onSelect"]),a,r,{style:c,ref:this.saveNode}),n.children,l)}}]),u}(d.Component);Pt.isMenuItem=!0,Pt.defaultProps={onSelect:ae,onMouseEnter:ae,onMouseLeave:ae,manualRef:ae};var Sa=Object(we.b)(function(o,s){var u=o.activeKey,i=o.selectedKeys,e=s.eventKey,n=s.subMenuKey;return{active:u[n]===e,isSelected:Array.isArray(i)?i.indexOf(e)!==-1:i===e}})(Pt),wa=Sa,It=function(o){Object(me.a)(u,o);var s=Object(ve.a)(u);function u(){var i;return Object(ce.a)(this,u),i=s.apply(this,arguments),i.renderInnerMenuItem=function(e){var n=i.props,t=n.renderMenuItem,a=n.index;return t(e,a,i.props.subMenuKey)},i}return Object(de.a)(u,[{key:"render",value:function(){var e=Object(F.a)({},this.props),n=e.className,t=n===void 0?"":n,a=e.rootPrefixCls,r="".concat(a,"-item-group-title"),c="".concat(a,"-item-group-list"),l=e.title,f=e.children;return Xe.forEach(function(p){return delete e[p]}),delete e.direction,d.createElement("li",Object(F.a)({},e,{onClick:function(v){return v.stopPropagation()},className:"".concat(t," ").concat(a,"-item-group")}),d.createElement("div",{className:r,title:typeof l=="string"?l:void 0},l),d.createElement("ul",{className:c},d.Children.map(f,this.renderInnerMenuItem)))}}]),u}(d.Component);It.isMenuItemGroup=!0,It.defaultProps={disabled:!0};var mi=It,Fn=function(s){var u=s.className,i=s.rootPrefixCls,e=s.style;return d.createElement("li",{className:"".concat(u," ").concat(i,"-item-divider"),style:e})};Fn.defaultProps={disabled:!0,className:"",style:{}};var vi=Fn,_a=Ta,Da=y("eDIo");function Ra(o,s){var u=o.prefixCls,i=o.editable,e=o.locale,n=o.style;return!i||i.showAdd===!1?null:d.createElement("button",{ref:s,type:"button",className:"".concat(u,"-nav-add"),style:n,"aria-label":(e==null?void 0:e.addAriaLabel)||"Add tab",onClick:function(a){i.onEdit("add",{event:a})}},i.addIcon||"+")}var Hn=d.forwardRef(Ra);function Na(o,s){var u=o.prefixCls,i=o.id,e=o.tabs,n=o.locale,t=o.mobile,a=o.moreIcon,r=a===void 0?"More":a,c=o.moreTransitionName,l=o.style,f=o.className,p=o.editable,v=o.tabBarGutter,m=o.rtl,b=o.onTabClick,C=Object(d.useState)(!1),D=Object(M.a)(C,2),S=D[0],N=D[1],R=Object(d.useState)(null),w=Object(M.a)(R,2),_=w[0],I=w[1],A="".concat(i,"-more-popup"),Q="".concat(u,"-dropdown"),W=_!==null?"".concat(A,"-").concat(_):null,E=n==null?void 0:n.dropdownAriaLabel,O=d.createElement(_a,{onClick:function(V){var Y=V.key,ie=V.domEvent;b(Y,ie),N(!1)},id:A,tabIndex:-1,role:"listbox","aria-activedescendant":W,selectedKeys:[_],"aria-label":E!==void 0?E:"expanded dropdown"},e.map(function(U){return d.createElement(wa,{key:U.key,id:"".concat(A,"-").concat(U.key),role:"option","aria-controls":i&&"".concat(i,"-panel-").concat(U.key),disabled:U.disabled},U.tab)}));function k(U){for(var V=e.filter(function(pe){return!pe.disabled}),Y=V.findIndex(function(pe){return pe.key===_})||0,ie=V.length,fe=0;feL?(P=O,A.current="x"):(P=k,A.current="y");var B=Date.now();B-_.current>100&&(I.current=!1),(s(-P,-P)||I.current)&&(E.preventDefault(),I.current=!0),_.current=B}var W=Object(d.useRef)(null);W.current={onTouchStart:N,onTouchMove:R,onTouchEnd:w,onWheel:Q},d.useEffect(function(){function E(g){W.current.onTouchStart(g)}function O(g){W.current.onTouchMove(g)}function k(g){W.current.onTouchEnd(g)}function P(g){W.current.onWheel(g)}return document.addEventListener("touchmove",O,{passive:!1}),document.addEventListener("touchend",k,{passive:!1}),o.current.addEventListener("touchstart",E,{passive:!1}),o.current.addEventListener("wheel",P),function(){document.removeEventListener("touchmove",O),document.removeEventListener("touchend",k)}},[])}function Ia(){var o=Object(d.useRef)(new Map);function s(i){return o.current.has(i)||o.current.set(i,d.createRef()),o.current.get(i)}function u(i){o.current.delete(i)}return[s,u]}function Xn(o,s){var u=d.useRef(o),i=d.useState({}),e=Object(M.a)(i,2),n=e[1];function t(a){var r=typeof a=="function"?a(u.current):a;r!==u.current&&s(r,u.current),u.current=r,n({})}return[u.current,t]}var Gn=function(s){var u=s.position,i=s.prefixCls,e=s.extra;if(!e)return null;var n,t=e;return u==="right"&&(n=t.right||!t.left&&t||null),u==="left"&&(n=t.left||null),n?d.createElement("div",{className:"".concat(i,"-extra-content")},n):null};function La(o,s){var u,i=d.useContext(Lt),e=i.prefixCls,n=i.tabs,t=o.className,a=o.style,r=o.id,c=o.animated,l=o.activeKey,f=o.rtl,p=o.extra,v=o.editable,m=o.locale,b=o.tabPosition,C=o.tabBarGutter,D=o.children,S=o.onTabClick,N=o.onTabScroll,R=Object(d.useRef)(),w=Object(d.useRef)(),_=Object(d.useRef)(),I=Object(d.useRef)(),A=Ia(),Q=Object(M.a)(A,2),W=Q[0],E=Q[1],O=b==="top"||b==="bottom",k=Xn(0,function(z,x){O&&N&&N({direction:z>x?"left":"right"})}),P=Object(M.a)(k,2),g=P[0],L=P[1],B=Xn(0,function(z,x){!O&&N&&N({direction:z>x?"top":"bottom"})}),U=Object(M.a)(B,2),V=U[0],Y=U[1],ie=Object(d.useState)(0),fe=Object(M.a)(ie,2),Z=fe[0],pe=fe[1],Me=Object(d.useState)(0),he=Object(M.a)(Me,2),be=he[0],q=he[1],le=Object(d.useState)(0),re=Object(M.a)(le,2),ne=re[0],De=re[1],Re=Object(d.useState)(0),Pe=Object(M.a)(Re,2),H=Pe[0],Se=Pe[1],Ie=Object(d.useState)(null),$=Object(M.a)(Ie,2),K=$[0],se=$[1],Va=Object(d.useState)(null),qn=Object(M.a)(Va,2),Fe=qn[0],Fa=qn[1],Ha=Object(d.useState)(0),eo=Object(M.a)(Ha,2),Ba=eo[0],$a=eo[1],Xa=Object(d.useState)(0),to=Object(M.a)(Xa,2),Ga=to[0],Ya=to[1],Qa=bt(new Map),no=Object(M.a)(Qa,2),Ja=no[0],Za=no[1],ht=te(n,Ja,Z),oo="".concat(e,"-nav-operations-hidden"),Qe=0,Je=0;O?f?(Qe=0,Je=Math.max(0,Z-K)):(Qe=Math.min(0,K-Z),Je=0):(Qe=Math.min(0,Fe-be),Je=0);function Ut(z){return zJe?[Je,!1]:[z,!0]}var ao=Object(d.useRef)(),qa=Object(d.useState)(),io=Object(M.a)(qa,2),Kt=io[0],ro=io[1];function Wt(){ro(Date.now())}function zt(){window.clearTimeout(ao.current)}Pa(R,function(z,x){var oe=!1;function ge(qe,et){qe(function(tt){var nt=Ut(tt+et),He=Object(M.a)(nt,2),Bt=He[0],$t=He[1];return oe=$t,Bt})}if(O){if(K>=Z)return oe;ge(L,z)}else{if(Fe>=be)return oe;ge(Y,x)}return zt(),Wt(),oe}),Object(d.useEffect)(function(){return zt(),Kt&&(ao.current=window.setTimeout(function(){ro(0)},100)),zt},[Kt]);function so(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l,x=ht.get(z);if(!x)return;if(O){var oe=g;f?x.rightg+K&&(oe=x.right+x.width-K):x.left<-g?oe=-x.left:x.left+x.width>-g+K&&(oe=-(x.left+x.width-K)),Y(0),L(Ut(oe)[0])}else{var ge=V;x.top<-V?ge=-x.top:x.top+x.height>-V+Fe&&(ge=-(x.top+x.height-Fe)),L(0),Y(Ut(ge)[0])}}var ei=Ue(ht,{width:K,height:Fe,left:g,top:V},{width:ne,height:H},{width:Ba,height:Ga},Object(h.a)(Object(h.a)({},o),{},{tabs:n})),lo=Object(M.a)(ei,2),ti=lo[0],ni=lo[1],oi=n.map(function(z){var x=z.key;return d.createElement(G,{id:r,prefixCls:e,key:x,rtl:f,tab:z,closable:z.closable,editable:v,active:x===l,tabPosition:b,tabBarGutter:C,renderWrapper:D,removeAriaLabel:m==null?void 0:m.removeAriaLabel,ref:W(x),onClick:function(ge){S(x,ge)},onRemove:function(){E(x)},onFocus:function(){so(x),Wt(),f||(R.current.scrollLeft=0),R.current.scrollTop=0}})}),Vt=Be(function(){var z,x,oe,ge,qe,et,tt,nt,He,Bt=((z=R.current)===null||z===void 0?void 0:z.offsetWidth)||0,$t=((x=R.current)===null||x===void 0?void 0:x.offsetHeight)||0,bo=((oe=I.current)===null||oe===void 0?void 0:oe.offsetWidth)||0,go=((ge=I.current)===null||ge===void 0?void 0:ge.offsetHeight)||0,ui=((qe=_.current)===null||qe===void 0?void 0:qe.offsetWidth)||0,ci=((et=_.current)===null||et===void 0?void 0:et.offsetHeight)||0;se(Bt),Fa($t),$a(bo),Ya(go);var yo=(((tt=w.current)===null||tt===void 0?void 0:tt.offsetWidth)||0)-bo,Oo=(((nt=w.current)===null||nt===void 0?void 0:nt.offsetHeight)||0)-go;pe(yo),q(Oo);var Eo=(He=_.current)===null||He===void 0?void 0:He.className.includes(oo);De(yo-(Eo?0:ui)),Se(Oo-(Eo?0:ci)),Za(function(){var Co=new Map;return n.forEach(function(di){var Mo=di.key,ot=W(Mo).current;ot&&Co.set(Mo,{width:ot.offsetWidth,height:ot.offsetHeight,left:ot.offsetLeft,top:ot.offsetTop})}),Co})}),ai=n.slice(0,ti),ii=n.slice(ni+1),uo=[].concat(Object(Ae.a)(ai),Object(Ae.a)(ii)),ri=Object(d.useState)(),co=Object(M.a)(ri,2),si=co[0],li=co[1],Ne=ht.get(l),fo=Object(d.useRef)();function po(){ke.a.cancel(fo.current)}Object(d.useEffect)(function(){var z={};return Ne&&(O?(f?z.right=Ne.right:z.left=Ne.left,z.width=Ne.width):(z.top=Ne.top,z.height=Ne.height)),po(),fo.current=ke()(function(){li(z)}),po},[Ne,O,f]),Object(d.useEffect)(function(){so()},[l,Ne,ht,O]),Object(d.useEffect)(function(){Vt()},[f,C,l,n.map(function(z){return z.key}).join("_")]);var mo=!!uo.length,Ze="".concat(e,"-nav-wrap"),Ft,Ht,vo,ho;return O?f?(Ht=g>0,Ft=g+K1)Object(Ae.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(te.length===0)return Object(Ae.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var ue=te[0];if(Ee.isValidElement(ue)&&Object(rt.c)(ue)){var Ue=ue.ref;te[0]=Ee.cloneElement(ue,{ref:Object(rt.a)(Ue,this.setChildNode)})}return te.length===1?te[0]:te.map(function(F,ce){return!Ee.isValidElement(F)||"key"in F&&F.key!==null?F:Ee.cloneElement(F,{key:"".concat(st,"-").concat(ce)})})}}]),xe}(Ee.Component);Be.displayName="ResizeObserver",Le.a=Be}}]);