-
Notifications
You must be signed in to change notification settings - Fork 0
/
10431.69214856.async.js
12 lines (12 loc) · 58.9 KB
/
10431.69214856.async.js
1
2
3
4
5
6
7
8
9
10
11
12
"use strict";(self.webpackChunkantd=self.webpackChunkantd||[]).push([[10431],{210431:function(To,Lr,H){H.d(Lr,{Z:function(){return No}});var Le=H(487462),T=H(601413),N=H(297685),Ve=H(700091),Kr=H(294184),Ce=H.n(Kr),re=H(204942),fn=H(671002),r=H(667294);function Vt(e){return!!(e.addonBefore||e.addonAfter)}function In(e){return!!(e.prefix||e.suffix||e.allowClear)}function Yn(e,t,n,o){if(n){var a=t;if(t.type==="click"){var l=e.cloneNode(!0);a=Object.create(t,{target:{value:l},currentTarget:{value:l}}),l.value="",n(a);return}if(o!==void 0){a=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=o,n(a);return}n(a)}}function Do(e,t){if(e){e.focus(t);var n=t||{},o=n.cursor;if(o){var a=e.value.length;switch(o){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(a,a);break;default:e.setSelectionRange(0,a)}}}}var zr=function(t){var n,o,a=t.inputElement,l=t.prefixCls,i=t.prefix,u=t.suffix,v=t.addonBefore,c=t.addonAfter,g=t.className,d=t.style,m=t.disabled,f=t.readOnly,h=t.focused,p=t.triggerFocus,y=t.allowClear,Z=t.value,M=t.handleReset,C=t.hidden,s=t.classes,S=t.classNames,$=t.dataAttrs,E=t.styles,R=t.components,G=(R==null?void 0:R.affixWrapper)||"span",A=(R==null?void 0:R.groupWrapper)||"span",ae=(R==null?void 0:R.wrapper)||"span",B=(R==null?void 0:R.groupAddon)||"span",k=(0,r.useRef)(null),O=function(w){var z;(z=k.current)!==null&&z!==void 0&&z.contains(w.target)&&(p==null||p())},D=function(){var w;if(!y)return null;var z=!m&&!f&&Z,_="".concat(l,"-clear-icon"),ue=(0,fn.Z)(y)==="object"&&y!==null&&y!==void 0&&y.clearIcon?y.clearIcon:"\u2716";return r.createElement("span",{onClick:M,onMouseDown:function(oe){return oe.preventDefault()},className:Ce()(_,(w={},(0,re.Z)(w,"".concat(_,"-hidden"),!z),(0,re.Z)(w,"".concat(_,"-has-suffix"),!!u),w)),role:"button",tabIndex:-1},ue)},L=(0,r.cloneElement)(a,{value:Z,hidden:C,className:Ce()((n=a.props)===null||n===void 0?void 0:n.className,!In(t)&&!Vt(t)&&g)||null,style:(0,T.Z)((0,T.Z)({},(o=a.props)===null||o===void 0?void 0:o.style),!In(t)&&!Vt(t)?d:{})});if(In(t)){var x,U="".concat(l,"-affix-wrapper"),V=Ce()(U,(x={},(0,re.Z)(x,"".concat(U,"-disabled"),m),(0,re.Z)(x,"".concat(U,"-focused"),h),(0,re.Z)(x,"".concat(U,"-readonly"),f),(0,re.Z)(x,"".concat(U,"-input-with-clear-btn"),u&&y&&Z),x),!Vt(t)&&g,s==null?void 0:s.affixWrapper,S==null?void 0:S.affixWrapper),Q=(u||y)&&r.createElement("span",{className:Ce()("".concat(l,"-suffix"),S==null?void 0:S.suffix),style:E==null?void 0:E.suffix},D(),u);L=r.createElement(G,(0,Le.Z)({className:V,style:(0,T.Z)((0,T.Z)({},Vt(t)?void 0:d),E==null?void 0:E.affixWrapper),hidden:!Vt(t)&&C,onClick:O},$==null?void 0:$.affixWrapper,{ref:k}),i&&r.createElement("span",{className:Ce()("".concat(l,"-prefix"),S==null?void 0:S.prefix),style:E==null?void 0:E.prefix},i),(0,r.cloneElement)(a,{value:Z,hidden:null}),Q)}if(Vt(t)){var fe="".concat(l,"-group"),Y="".concat(fe,"-addon"),be=Ce()("".concat(l,"-wrapper"),fe,s==null?void 0:s.wrapper),me=Ce()("".concat(l,"-group-wrapper"),g,s==null?void 0:s.group);return r.createElement(A,{className:me,style:d,hidden:C},r.createElement(ae,{className:be},v&&r.createElement(B,{className:Y},v),(0,r.cloneElement)(L,{hidden:null}),c&&r.createElement(B,{className:Y},c)))}return L},Xn=zr,At=H(821770),Fr=["show"];function Ao(e,t){if(!t.max)return!0;var n=t.strategy(e);return n<=t.max}function kr(e,t){return r.useMemo(function(){var n={};t&&(n.show=(0,fn.Z)(t)==="object"&&t.formatter?t.formatter:!!t),n=(0,T.Z)((0,T.Z)({},n),e);var o=n,a=o.show,l=(0,Ve.Z)(o,Fr);return(0,T.Z)((0,T.Z)({},l),{},{show:!!a,showFormatter:typeof a=="function"?a:void 0,strategy:l.strategy||function(i){return i.length}})},[e,t])}var Lo=null,Ko=null,zo=null,Fo=null,Mt=H(974902),wn=H(248555),ut=H(908410),Zt=H(75164),Vr=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,Br=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],En={},st;function Or(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&En[n])return En[n];var o=window.getComputedStyle(e),a=o.getPropertyValue("box-sizing")||o.getPropertyValue("-moz-box-sizing")||o.getPropertyValue("-webkit-box-sizing"),l=parseFloat(o.getPropertyValue("padding-bottom"))+parseFloat(o.getPropertyValue("padding-top")),i=parseFloat(o.getPropertyValue("border-bottom-width"))+parseFloat(o.getPropertyValue("border-top-width")),u=Br.map(function(c){return"".concat(c,":").concat(o.getPropertyValue(c))}).join(";"),v={sizingStyle:u,paddingSize:l,borderSize:i,boxSizing:a};return t&&n&&(En[n]=v),v}function Wr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;st||(st=document.createElement("textarea"),st.setAttribute("tab-index","-1"),st.setAttribute("aria-hidden","true"),document.body.appendChild(st)),e.getAttribute("wrap")?st.setAttribute("wrap",e.getAttribute("wrap")):st.removeAttribute("wrap");var a=Or(e,t),l=a.paddingSize,i=a.borderSize,u=a.boxSizing,v=a.sizingStyle;st.setAttribute("style","".concat(v,";").concat(Vr)),st.value=e.value||e.placeholder||"";var c=void 0,g=void 0,d,m=st.scrollHeight;if(u==="border-box"?m+=i:u==="content-box"&&(m-=l),n!==null||o!==null){st.value=" ";var f=st.scrollHeight-l;n!==null&&(c=f*n,u==="border-box"&&(c=c+l+i),m=Math.max(c,m)),o!==null&&(g=f*o,u==="border-box"&&(g=g+l+i),d=m>g?"":"hidden",m=Math.min(g,m))}var h={height:m,overflowY:d,resize:"none"};return c&&(h.minHeight=c),g&&(h.maxHeight=g),h}var Hr=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Pn=0,Nn=1,$n=2,Ur=r.forwardRef(function(e,t){var n=e,o=n.prefixCls,a=n.onPressEnter,l=n.defaultValue,i=n.value,u=n.autoSize,v=n.onResize,c=n.className,g=n.style,d=n.disabled,m=n.onChange,f=n.onInternalAutoSize,h=(0,Ve.Z)(n,Hr),p=(0,At.default)(l,{value:i,postState:function(w){return w!=null?w:""}}),y=(0,N.Z)(p,2),Z=y[0],M=y[1],C=function(w){M(w.target.value),m==null||m(w)},s=r.useRef();r.useImperativeHandle(t,function(){return{textArea:s.current}});var S=r.useMemo(function(){return u&&(0,fn.Z)(u)==="object"?[u.minRows,u.maxRows]:[]},[u]),$=(0,N.Z)(S,2),E=$[0],R=$[1],G=!!u,A=function(){try{if(document.activeElement===s.current){var w=s.current,z=w.selectionStart,_=w.selectionEnd,ue=w.scrollTop;s.current.setSelectionRange(z,_),s.current.scrollTop=ue}}catch(ce){}},ae=r.useState($n),B=(0,N.Z)(ae,2),k=B[0],O=B[1],D=r.useState(),L=(0,N.Z)(D,2),x=L[0],U=L[1],V=function(){O(Pn)};(0,ut.Z)(function(){G&&V()},[i,E,R,G]),(0,ut.Z)(function(){if(k===Pn)O(Nn);else if(k===Nn){var J=Wr(s.current,!1,E,R);O($n),U(J)}else A()},[k]);var Q=r.useRef(),fe=function(){Zt.Z.cancel(Q.current)},Y=function(w){k===$n&&(v==null||v(w),u&&(fe(),Q.current=(0,Zt.Z)(function(){V()})))};r.useEffect(function(){return fe},[]);var be=G?x:null,me=(0,T.Z)((0,T.Z)({},g),be);return(k===Pn||k===Nn)&&(me.overflowY="hidden",me.overflowX="hidden"),r.createElement(wn.Z,{onResize:Y,disabled:!(u||v)},r.createElement("textarea",(0,Le.Z)({},h,{ref:s,style:me,className:Ce()(o,c,(0,re.Z)({},"".concat(o,"-disabled"),d)),disabled:d,value:Z,onChange:C})))}),_r=Ur,jr=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","count","className","style","disabled","hidden","classNames","styles","onResize"],Gr=r.forwardRef(function(e,t){var n,o,a=e.defaultValue,l=e.value,i=e.onFocus,u=e.onBlur,v=e.onChange,c=e.allowClear,g=e.maxLength,d=e.onCompositionStart,m=e.onCompositionEnd,f=e.suffix,h=e.prefixCls,p=h===void 0?"rc-textarea":h,y=e.classes,Z=e.showCount,M=e.count,C=e.className,s=e.style,S=e.disabled,$=e.hidden,E=e.classNames,R=e.styles,G=e.onResize,A=(0,Ve.Z)(e,jr),ae=(0,At.default)(a,{value:l,defaultValue:a}),B=(0,N.Z)(ae,2),k=B[0],O=B[1],D=k==null?"":String(k),L=r.useState(!1),x=(0,N.Z)(L,2),U=x[0],V=x[1],Q=r.useRef(!1),fe=r.useState(null),Y=(0,N.Z)(fe,2),be=Y[0],me=Y[1],J=(0,r.useRef)(null),w=function(){var P;return(P=J.current)===null||P===void 0?void 0:P.textArea},z=function(){w().focus()};(0,r.useImperativeHandle)(t,function(){return{resizableTextArea:J.current,focus:z,blur:function(){w().blur()}}}),(0,r.useEffect)(function(){V(function(le){return!S&&le})},[S]);var _=r.useState(null),ue=(0,N.Z)(_,2),ce=ue[0],oe=ue[1];r.useEffect(function(){if(ce){var le;(le=w()).setSelectionRange.apply(le,(0,Mt.Z)(ce))}},[ce]);var X=kr(M,Z),ge=(n=X.max)!==null&&n!==void 0?n:g,Ze=Number(ge)>0,De=X.strategy(D),Ie=!!ge&&De>ge,ze=function(P,we){var ve=we;!Q.current&&X.exceedFormatter&&X.max&&X.strategy(we)>X.max&&(ve=X.exceedFormatter(we,{max:X.max}),we!==ve&&oe([w().selectionStart||0,w().selectionEnd||0])),O(ve),Yn(P.currentTarget,P,v,ve)},W=function(P){Q.current=!0,d==null||d(P)},ie=function(P){Q.current=!1,ze(P,P.currentTarget.value),m==null||m(P)},q=function(P){ze(P,P.target.value)},Ee=function(P){var we=A.onPressEnter,ve=A.onKeyDown;P.key==="Enter"&&we&&we(P),ve==null||ve(P)},Ke=function(P){V(!0),i==null||i(P)},ye=function(P){V(!1),u==null||u(P)},et=function(P){O(""),z(),Yn(w(),P,v)},je=f,Re;X.show&&(X.showFormatter?Re=X.showFormatter({value:D,count:De,maxLength:ge}):Re="".concat(De).concat(Ze?" / ".concat(ge):""),je=r.createElement(r.Fragment,null,je,r.createElement("span",{className:Ce()("".concat(p,"-data-count"),E==null?void 0:E.count),style:R==null?void 0:R.count},Re)));var ct=function(P){var we;G==null||G(P),(we=w())!==null&&we!==void 0&&we.style.height&&me(!0)},Pe=!A.autoSize&&!Z&&!c,Ae=r.createElement(Xn,{value:D,allowClear:c,handleReset:et,suffix:je,prefixCls:p,classes:{affixWrapper:Ce()(y==null?void 0:y.affixWrapper,(o={},(0,re.Z)(o,"".concat(p,"-show-count"),Z),(0,re.Z)(o,"".concat(p,"-textarea-allow-clear"),c),o))},disabled:S,focused:U,className:Ce()(C,Ie&&"".concat(p,"-out-of-range")),style:(0,T.Z)((0,T.Z)({},s),be&&!Pe?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Re=="string"?Re:void 0}},hidden:$,inputElement:r.createElement(_r,(0,Le.Z)({},A,{onKeyDown:Ee,onChange:q,onFocus:Ke,onBlur:ye,onCompositionStart:W,onCompositionEnd:ie,className:Ce()(E==null?void 0:E.textarea),style:(0,T.Z)((0,T.Z)({},R==null?void 0:R.textarea),{},{resize:s==null?void 0:s.resize}),disabled:S,prefixCls:p,onResize:ct,ref:J}))});return Ae}),Jr=Gr,Qr=Jr,qn=H(850344),Be=H(915105),er=H(580334);function Yr(){var e=(0,r.useState)({id:0,callback:null}),t=(0,N.Z)(e,2),n=t[0],o=t[1],a=(0,r.useCallback)(function(l){o(function(i){var u=i.id;return{id:u+1,callback:l}})},[]);return(0,r.useEffect)(function(){var l;(l=n.callback)===null||l===void 0||l.call(n)},[n]),a}var tr=H(602788),Tn=H(34203),Dn=H(527571),Lt=H(366680),Xr=H(807028),qr=H(931131),An=H(82225),Jt=H(242550);function ea(e){var t=e.prefixCls,n=e.align,o=e.arrow,a=e.arrowPos,l=o||{},i=l.className,u=l.content,v=a.x,c=v===void 0?0:v,g=a.y,d=g===void 0?0:g,m=r.useRef();if(!n||!n.points)return null;var f={position:"absolute"};if(n.autoArrow!==!1){var h=n.points[0],p=n.points[1],y=h[0],Z=h[1],M=p[0],C=p[1];y===M||!["t","b"].includes(y)?f.top=d:y==="t"?f.top=0:f.bottom=0,Z===C||!["l","r"].includes(Z)?f.left=c:Z==="l"?f.left=0:f.right=0}return r.createElement("div",{ref:m,className:Ce()("".concat(t,"-arrow"),i),style:f},u)}function ta(e){var t=e.prefixCls,n=e.open,o=e.zIndex,a=e.mask,l=e.motion;return a?r.createElement(An.ZP,(0,Le.Z)({},l,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(i){var u=i.className;return r.createElement("div",{style:{zIndex:o},className:Ce()("".concat(t,"-mask"),u)})}):null}var na=r.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),ra=na,aa=r.forwardRef(function(e,t){var n=e.popup,o=e.className,a=e.prefixCls,l=e.style,i=e.target,u=e.onVisibleChanged,v=e.open,c=e.keepDom,g=e.fresh,d=e.onClick,m=e.mask,f=e.arrow,h=e.arrowPos,p=e.align,y=e.motion,Z=e.maskMotion,M=e.forceRender,C=e.getPopupContainer,s=e.autoDestroy,S=e.portal,$=e.zIndex,E=e.onMouseEnter,R=e.onMouseLeave,G=e.onPointerEnter,A=e.ready,ae=e.offsetX,B=e.offsetY,k=e.offsetR,O=e.offsetB,D=e.onAlign,L=e.onPrepare,x=e.stretch,U=e.targetWidth,V=e.targetHeight,Q=typeof n=="function"?n():n,fe=v||c,Y=(C==null?void 0:C.length)>0,be=r.useState(!C||!Y),me=(0,N.Z)(be,2),J=me[0],w=me[1];if((0,ut.Z)(function(){!J&&Y&&i&&w(!0)},[J,Y,i]),!J)return null;var z="auto",_={left:"-1000vw",top:"-1000vh",right:z,bottom:z};if(A||!v){var ue,ce=p.points,oe=p.dynamicInset||((ue=p._experimental)===null||ue===void 0?void 0:ue.dynamicInset),X=oe&&ce[0][1]==="r",ge=oe&&ce[0][0]==="b";X?(_.right=k,_.left=z):(_.left=ae,_.right=z),ge?(_.bottom=O,_.top=z):(_.top=B,_.bottom=z)}var Ze={};return x&&(x.includes("height")&&V?Ze.height=V:x.includes("minHeight")&&V&&(Ze.minHeight=V),x.includes("width")&&U?Ze.width=U:x.includes("minWidth")&&U&&(Ze.minWidth=U)),v||(Ze.pointerEvents="none"),r.createElement(S,{open:M||fe,getContainer:C&&function(){return C(i)},autoDestroy:s},r.createElement(ta,{prefixCls:a,open:v,zIndex:$,mask:m,motion:Z}),r.createElement(wn.Z,{onResize:D,disabled:!v},function(De){return r.createElement(An.ZP,(0,Le.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:M,leavedClassName:"".concat(a,"-hidden")},y,{onAppearPrepare:L,onEnterPrepare:L,visible:v,onVisibleChanged:function(ze){var W;y==null||(W=y.onVisibleChanged)===null||W===void 0||W.call(y,ze),u(ze)}}),function(Ie,ze){var W=Ie.className,ie=Ie.style,q=Ce()(a,W,o);return r.createElement("div",{ref:(0,Jt.sQ)(De,t,ze),className:q,style:(0,T.Z)((0,T.Z)((0,T.Z)((0,T.Z)({"--arrow-x":"".concat(h.x||0,"px"),"--arrow-y":"".concat(h.y||0,"px")},_),Ze),ie),{},{boxSizing:"border-box",zIndex:$},l),onMouseEnter:E,onMouseLeave:R,onPointerEnter:G,onClick:d},f&&r.createElement(ea,{prefixCls:a,arrow:f,arrowPos:h,align:p}),r.createElement(ra,{cache:!v&&!g},Q))})}))}),oa=aa,ia=r.forwardRef(function(e,t){var n=e.children,o=e.getTriggerDOMNode,a=(0,Jt.Yr)(n),l=r.useCallback(function(u){(0,Jt.mH)(t,o?o(u):u)},[o]),i=(0,Jt.x1)(l,n.ref);return a?r.cloneElement(n,{ref:i}):n}),la=ia,ua=r.createContext(null),nr=ua;function rr(e){return e?Array.isArray(e)?e:[e]:[]}function sa(e,t,n,o){return r.useMemo(function(){var a=rr(n!=null?n:t),l=rr(o!=null?o:t),i=new Set(a),u=new Set(l);return e&&(i.has("hover")&&(i.delete("hover"),i.add("click")),u.has("hover")&&(u.delete("hover"),u.add("click"))),[i,u]},[e,t,n,o])}var ca=H(305110);function va(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function da(e,t,n,o){for(var a=n.points,l=Object.keys(e),i=0;i<l.length;i+=1){var u,v=l[i];if(va((u=e[v])===null||u===void 0?void 0:u.points,a,o))return"".concat(t,"-placement-").concat(v)}return""}function ar(e,t,n,o){return t||(n?{motionName:"".concat(e,"-").concat(n)}:o?{motionName:o}:null)}function Qt(e){return e.ownerDocument.defaultView}function Ln(e){for(var t=[],n=e==null?void 0:e.parentElement,o=["hidden","scroll","clip","auto"];n;){var a=Qt(n).getComputedStyle(n),l=a.overflowX,i=a.overflowY,u=a.overflow;[l,i,u].some(function(v){return o.includes(v)})&&t.push(n),n=n.parentElement}return t}function Yt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function Xt(e){return Yt(parseFloat(e),0)}function or(e,t){var n=(0,T.Z)({},e);return(t||[]).forEach(function(o){if(!(o instanceof HTMLBodyElement||o instanceof HTMLHtmlElement)){var a=Qt(o).getComputedStyle(o),l=a.overflow,i=a.overflowClipMargin,u=a.borderTopWidth,v=a.borderBottomWidth,c=a.borderLeftWidth,g=a.borderRightWidth,d=o.getBoundingClientRect(),m=o.offsetHeight,f=o.clientHeight,h=o.offsetWidth,p=o.clientWidth,y=Xt(u),Z=Xt(v),M=Xt(c),C=Xt(g),s=Yt(Math.round(d.width/h*1e3)/1e3),S=Yt(Math.round(d.height/m*1e3)/1e3),$=(h-p-M-C)*s,E=(m-f-y-Z)*S,R=y*S,G=Z*S,A=M*s,ae=C*s,B=0,k=0;if(l==="clip"){var O=Xt(i);B=O*s,k=O*S}var D=d.x+A-B,L=d.y+R-k,x=D+d.width+2*B-A-ae-$,U=L+d.height+2*k-R-G-E;n.left=Math.max(n.left,D),n.top=Math.max(n.top,L),n.right=Math.min(n.right,x),n.bottom=Math.min(n.bottom,U)}}),n}function ir(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(t),o=n.match(/^(.*)\%$/);return o?e*(parseFloat(o[1])/100):parseFloat(n)}function lr(e,t){var n=t||[],o=(0,N.Z)(n,2),a=o[0],l=o[1];return[ir(e.width,a),ir(e.height,l)]}function ur(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function Bt(e,t){var n=t[0],o=t[1],a,l;return n==="t"?l=e.y:n==="b"?l=e.y+e.height:l=e.y+e.height/2,o==="l"?a=e.x:o==="r"?a=e.x+e.width:a=e.x+e.width/2,{x:a,y:l}}function Nt(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map(function(o,a){return a===t?n[o]||"c":o}).join("")}function fa(e,t,n,o,a,l,i){var u=r.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[o]||{}}),v=(0,N.Z)(u,2),c=v[0],g=v[1],d=r.useRef(0),m=r.useMemo(function(){return t?Ln(t):[]},[t]),f=r.useRef({}),h=function(){f.current={}};e||h();var p=(0,Lt.Z)(function(){if(t&&n&&e){let dt=function(xn,ft){var jt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ie,Sn=V.x+xn,Gt=V.y+ft,bn=Sn+_,dn=Gt+z,Rn=Math.max(Sn,jt.left),jn=Math.max(Gt,jt.top),Gn=Math.min(bn,jt.right),Jn=Math.min(dn,jt.bottom);return Math.max(0,(Gn-Rn)*(Jn-jn))},pn=function(){K=V.y+de,j=K+z,Me=V.x+ee,We=Me+_};var M,C,s=t,S=s.ownerDocument,$=Qt(s),E=$.getComputedStyle(s),R=E.width,G=E.height,A=E.position,ae=s.style.left,B=s.style.top,k=s.style.right,O=s.style.bottom,D=(0,T.Z)((0,T.Z)({},a[o]),l),L=S.createElement("div");(M=s.parentElement)===null||M===void 0||M.appendChild(L),L.style.left="".concat(s.offsetLeft,"px"),L.style.top="".concat(s.offsetTop,"px"),L.style.position=A,L.style.height="".concat(s.offsetHeight,"px"),L.style.width="".concat(s.offsetWidth,"px"),s.style.left="0",s.style.top="0",s.style.right="auto",s.style.bottom="auto";var x;if(Array.isArray(n))x={x:n[0],y:n[1],width:0,height:0};else{var U=n.getBoundingClientRect();x={x:U.x,y:U.y,width:U.width,height:U.height}}var V=s.getBoundingClientRect(),Q=S.documentElement,fe=Q.clientWidth,Y=Q.clientHeight,be=Q.scrollWidth,me=Q.scrollHeight,J=Q.scrollTop,w=Q.scrollLeft,z=V.height,_=V.width,ue=x.height,ce=x.width,oe={left:0,top:0,right:fe,bottom:Y},X={left:-w,top:-J,right:be-w,bottom:me-J},ge=D.htmlRegion,Ze="visible",De="visibleFirst";ge!=="scroll"&&ge!==De&&(ge=Ze);var Ie=ge===De,ze=or(X,m),W=or(oe,m),ie=ge===Ze?W:ze,q=Ie?W:ie;s.style.left="auto",s.style.top="auto",s.style.right="0",s.style.bottom="0";var Ee=s.getBoundingClientRect();s.style.left=ae,s.style.top=B,s.style.right=k,s.style.bottom=O,(C=s.parentElement)===null||C===void 0||C.removeChild(L);var Ke=Yt(Math.round(_/parseFloat(R)*1e3)/1e3),ye=Yt(Math.round(z/parseFloat(G)*1e3)/1e3);if(Ke===0||ye===0||(0,Tn.S)(n)&&!(0,ca.Z)(n))return;var et=D.offset,je=D.targetOffset,Re=lr(V,et),ct=(0,N.Z)(Re,2),Pe=ct[0],Ae=ct[1],le=lr(x,je),P=(0,N.Z)(le,2),we=P[0],ve=P[1];x.x-=we,x.y-=ve;var Ye=D.points||[],Ne=(0,N.Z)(Ye,2),he=Ne[0],pe=Ne[1],Xe=ur(pe),Fe=ur(he),rt=Bt(x,Xe),$t=Bt(V,Fe),tt=(0,T.Z)({},D),ee=rt.x-$t.x+Pe,de=rt.y-$t.y+Ae,xe=dt(ee,de),gt=dt(ee,de,W),at=Bt(x,["t","l"]),Oe=Bt(V,["t","l"]),It=Bt(x,["b","r"]),bt=Bt(V,["b","r"]),ot=D.overflow||{},Ge=ot.adjustX,Kt=ot.adjustY,wt=ot.shiftX,te=ot.shiftY,I=function(ft){return typeof ft=="boolean"?ft:ft>=0},K,j,Me,We;pn();var nt=I(Kt),it=Fe[0]===Xe[0];if(nt&&Fe[0]==="t"&&(j>q.bottom||f.current.bt)){var Je=de;it?Je-=z-ue:Je=at.y-bt.y-Ae;var vt=dt(ee,Je),ht=dt(ee,Je,W);vt>xe||vt===xe&&(!Ie||ht>=gt)?(f.current.bt=!0,de=Je,Ae=-Ae,tt.points=[Nt(Fe,0),Nt(Xe,0)]):f.current.bt=!1}if(nt&&Fe[0]==="b"&&(K<q.top||f.current.tb)){var Ct=de;it?Ct+=z-ue:Ct=It.y-Oe.y-Ae;var Qe=dt(ee,Ct),un=dt(ee,Ct,W);Qe>xe||Qe===xe&&(!Ie||un>=gt)?(f.current.tb=!0,de=Ct,Ae=-Ae,tt.points=[Nt(Fe,0),Nt(Xe,0)]):f.current.tb=!1}var Wt=I(Ge),zt=Fe[1]===Xe[1];if(Wt&&Fe[1]==="l"&&(We>q.right||f.current.rl)){var lt=ee;zt?lt-=_-ce:lt=at.x-bt.x-Pe;var Tt=dt(lt,de),sn=dt(lt,de,W);Tt>xe||Tt===xe&&(!Ie||sn>=gt)?(f.current.rl=!0,ee=lt,Pe=-Pe,tt.points=[Nt(Fe,1),Nt(Xe,1)]):f.current.rl=!1}if(Wt&&Fe[1]==="r"&&(Me<q.left||f.current.lr)){var Et=ee;zt?Et+=_-ce:Et=It.x-Oe.x-Pe;var Ht=dt(Et,de),Ut=dt(Et,de,W);Ht>xe||Ht===xe&&(!Ie||Ut>=gt)?(f.current.lr=!0,ee=Et,Pe=-Pe,tt.points=[Nt(Fe,1),Nt(Xe,1)]):f.current.lr=!1}pn();var qe=wt===!0?0:wt;typeof qe=="number"&&(Me<W.left&&(ee-=Me-W.left-Pe,x.x+ce<W.left+qe&&(ee+=x.x-W.left+ce-qe)),We>W.right&&(ee-=We-W.right-Pe,x.x>W.right-qe&&(ee+=x.x-W.right+qe)));var yt=te===!0?0:te;typeof yt=="number"&&(K<W.top&&(de-=K-W.top-Ae,x.y+ue<W.top+yt&&(de+=x.y-W.top+ue-yt)),j>W.bottom&&(de-=j-W.bottom-Ae,x.y>W.bottom-yt&&(de+=x.y-W.bottom+yt)));var Ft=V.x+ee,_t=Ft+_,pt=V.y+de,Pt=pt+z,kt=x.x,Dt=kt+ce,xt=x.y,cn=xt+ue,Se=Math.max(Ft,kt),ne=Math.min(_t,Dt),se=(Se+ne)/2,He=se-Ft,Ue=Math.max(pt,xt),St=Math.min(Pt,cn),Rt=(Ue+St)/2,vn=Rt-pt;i==null||i(t,tt);var _n=Ee.right-V.x-(ee+V.width),yn=Ee.bottom-V.y-(de+V.height);g({ready:!0,offsetX:ee/Ke,offsetY:de/ye,offsetR:_n/Ke,offsetB:yn/ye,arrowX:He/Ke,arrowY:vn/ye,scaleX:Ke,scaleY:ye,align:tt})}}),y=function(){d.current+=1;var C=d.current;Promise.resolve().then(function(){d.current===C&&p()})},Z=function(){g(function(C){return(0,T.Z)((0,T.Z)({},C),{},{ready:!1})})};return(0,ut.Z)(Z,[o]),(0,ut.Z)(function(){e||Z()},[e]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,y]}function ma(e,t,n,o,a){(0,ut.Z)(function(){if(e&&t&&n){let d=function(){o(),a()};var l=t,i=n,u=Ln(l),v=Ln(i),c=Qt(i),g=new Set([c].concat((0,Mt.Z)(u),(0,Mt.Z)(v)));return g.forEach(function(m){m.addEventListener("scroll",d,{passive:!0})}),c.addEventListener("resize",d,{passive:!0}),o(),function(){g.forEach(function(m){m.removeEventListener("scroll",d),c.removeEventListener("resize",d)})}}},[e,t,n])}function ga(e,t,n,o,a,l,i,u){var v=r.useRef(e),c=r.useRef(!1);v.current!==e&&(c.current=!0,v.current=e),r.useEffect(function(){var g=(0,Zt.Z)(function(){c.current=!1});return function(){Zt.Z.cancel(g)}},[e]),r.useEffect(function(){if(t&&o&&(!a||l)){var g=function(){var A=!1,ae=function(O){var D=O.target;A=i(D)},B=function(O){var D=O.target;!c.current&&v.current&&!A&&!i(D)&&u(!1)};return[ae,B]},d=g(),m=(0,N.Z)(d,2),f=m[0],h=m[1],p=g(),y=(0,N.Z)(p,2),Z=y[0],M=y[1],C=Qt(o);C.addEventListener("mousedown",f,!0),C.addEventListener("click",h,!0),C.addEventListener("contextmenu",h,!0);var s=(0,Dn.A)(n);if(s&&(s.addEventListener("mousedown",Z,!0),s.addEventListener("click",M,!0),s.addEventListener("contextmenu",M,!0)),!1)var S,$,E,R;return function(){C.removeEventListener("mousedown",f,!0),C.removeEventListener("click",h,!0),C.removeEventListener("contextmenu",h,!0),s&&(s.removeEventListener("mousedown",Z,!0),s.removeEventListener("click",M,!0),s.removeEventListener("contextmenu",M,!0))}}},[t,n,o,a,l])}var ha=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function Ca(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tr.Z,t=r.forwardRef(function(n,o){var a=n.prefixCls,l=a===void 0?"rc-trigger-popup":a,i=n.children,u=n.action,v=u===void 0?"hover":u,c=n.showAction,g=n.hideAction,d=n.popupVisible,m=n.defaultPopupVisible,f=n.onPopupVisibleChange,h=n.afterPopupVisibleChange,p=n.mouseEnterDelay,y=n.mouseLeaveDelay,Z=y===void 0?.1:y,M=n.focusDelay,C=n.blurDelay,s=n.mask,S=n.maskClosable,$=S===void 0?!0:S,E=n.getPopupContainer,R=n.forceRender,G=n.autoDestroy,A=n.destroyPopupOnHide,ae=n.popup,B=n.popupClassName,k=n.popupStyle,O=n.popupPlacement,D=n.builtinPlacements,L=D===void 0?{}:D,x=n.popupAlign,U=n.zIndex,V=n.stretch,Q=n.getPopupClassNameFromAlign,fe=n.fresh,Y=n.alignPoint,be=n.onPopupClick,me=n.onPopupAlign,J=n.arrow,w=n.popupMotion,z=n.maskMotion,_=n.popupTransitionName,ue=n.popupAnimation,ce=n.maskTransitionName,oe=n.maskAnimation,X=n.className,ge=n.getTriggerDOMNode,Ze=(0,Ve.Z)(n,ha),De=G||A||!1,Ie=r.useState(!1),ze=(0,N.Z)(Ie,2),W=ze[0],ie=ze[1];(0,ut.Z)(function(){ie((0,qr.Z)())},[]);var q=r.useRef({}),Ee=r.useContext(nr),Ke=r.useMemo(function(){return{registerSubPopup:function(F,$e){q.current[F]=$e,Ee==null||Ee.registerSubPopup(F,$e)}}},[Ee]),ye=(0,Xr.Z)(),et=r.useState(null),je=(0,N.Z)(et,2),Re=je[0],ct=je[1],Pe=(0,Lt.Z)(function(b){(0,Tn.S)(b)&&Re!==b&&ct(b),Ee==null||Ee.registerSubPopup(ye,b)}),Ae=r.useState(null),le=(0,N.Z)(Ae,2),P=le[0],we=le[1],ve=r.useRef(null),Ye=(0,Lt.Z)(function(b){(0,Tn.S)(b)&&P!==b&&(we(b),ve.current=b)}),Ne=r.Children.only(i),he=(Ne==null?void 0:Ne.props)||{},pe={},Xe=(0,Lt.Z)(function(b){var F,$e,ke=P;return(ke==null?void 0:ke.contains(b))||((F=(0,Dn.A)(ke))===null||F===void 0?void 0:F.host)===b||b===ke||(Re==null?void 0:Re.contains(b))||(($e=(0,Dn.A)(Re))===null||$e===void 0?void 0:$e.host)===b||b===Re||Object.values(q.current).some(function(Te){return(Te==null?void 0:Te.contains(b))||b===Te})}),Fe=ar(l,w,ue,_),rt=ar(l,z,oe,ce),$t=r.useState(m||!1),tt=(0,N.Z)($t,2),ee=tt[0],de=tt[1],xe=d!=null?d:ee,gt=(0,Lt.Z)(function(b){d===void 0&&de(b)});(0,ut.Z)(function(){de(d||!1)},[d]);var at=r.useRef(xe);at.current=xe;var Oe=r.useRef([]);Oe.current=[];var It=(0,Lt.Z)(function(b){var F;gt(b),((F=Oe.current[Oe.current.length-1])!==null&&F!==void 0?F:xe)!==b&&(Oe.current.push(b),f==null||f(b))}),bt=r.useRef(),ot=function(){clearTimeout(bt.current)},Ge=function(F){var $e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;ot(),$e===0?It(F):bt.current=setTimeout(function(){It(F)},$e*1e3)};r.useEffect(function(){return ot},[]);var Kt=r.useState(!1),wt=(0,N.Z)(Kt,2),te=wt[0],I=wt[1];(0,ut.Z)(function(b){(!b||xe)&&I(!0)},[xe]);var K=r.useState(null),j=(0,N.Z)(K,2),Me=j[0],We=j[1],nt=r.useState([0,0]),it=(0,N.Z)(nt,2),Je=it[0],vt=it[1],ht=function(F){vt([F.clientX,F.clientY])},Ct=fa(xe,Re,Y?Je:P,O,L,x,me),Qe=(0,N.Z)(Ct,11),un=Qe[0],Wt=Qe[1],zt=Qe[2],lt=Qe[3],Tt=Qe[4],sn=Qe[5],Et=Qe[6],Ht=Qe[7],Ut=Qe[8],qe=Qe[9],yt=Qe[10],Ft=sa(W,v,c,g),_t=(0,N.Z)(Ft,2),pt=_t[0],Pt=_t[1],kt=pt.has("click"),Dt=Pt.has("click")||Pt.has("contextMenu"),xt=(0,Lt.Z)(function(){te||yt()}),cn=function(){at.current&&Y&&Dt&&Ge(!1)};ma(xe,P,Re,xt,cn),(0,ut.Z)(function(){xt()},[Je,O]),(0,ut.Z)(function(){xe&&!(L!=null&&L[O])&&xt()},[JSON.stringify(x)]);var Se=r.useMemo(function(){var b=da(L,l,qe,Y);return Ce()(b,Q==null?void 0:Q(qe))},[qe,Q,L,l,Y]);r.useImperativeHandle(o,function(){return{nativeElement:ve.current,forceAlign:xt}});var ne=r.useState(0),se=(0,N.Z)(ne,2),He=se[0],Ue=se[1],St=r.useState(0),Rt=(0,N.Z)(St,2),vn=Rt[0],_n=Rt[1],yn=function(){if(V&&P){var F=P.getBoundingClientRect();Ue(F.width),_n(F.height)}},dt=function(){yn(),xt()},pn=function(F){I(!1),yt(),h==null||h(F)},xn=function(){return new Promise(function(F){yn(),We(function(){return F})})};(0,ut.Z)(function(){Me&&(yt(),Me(),We(null))},[Me]);function ft(b,F,$e,ke){pe[b]=function(Te){var Mn;ke==null||ke(Te),Ge(F,$e);for(var Qn=arguments.length,Ar=new Array(Qn>1?Qn-1:0),Zn=1;Zn<Qn;Zn++)Ar[Zn-1]=arguments[Zn];(Mn=he[b])===null||Mn===void 0||Mn.call.apply(Mn,[he,Te].concat(Ar))}}(kt||Dt)&&(pe.onClick=function(b){var F;at.current&&Dt?Ge(!1):!at.current&&kt&&(ht(b),Ge(!0));for(var $e=arguments.length,ke=new Array($e>1?$e-1:0),Te=1;Te<$e;Te++)ke[Te-1]=arguments[Te];(F=he.onClick)===null||F===void 0||F.call.apply(F,[he,b].concat(ke))}),ga(xe,Dt,P,Re,s,$,Xe,Ge);var jt=pt.has("hover"),Sn=Pt.has("hover"),Gt,bn;jt&&(ft("onMouseEnter",!0,p,function(b){ht(b)}),ft("onPointerEnter",!0,p,function(b){ht(b)}),Gt=function(){(xe||te)&&Ge(!0,p)},Y&&(pe.onMouseMove=function(b){var F;(F=he.onMouseMove)===null||F===void 0||F.call(he,b)})),Sn&&(ft("onMouseLeave",!1,Z),ft("onPointerLeave",!1,Z),bn=function(){Ge(!1,Z)}),pt.has("focus")&&ft("onFocus",!0,M),Pt.has("focus")&&ft("onBlur",!1,C),pt.has("contextMenu")&&(pe.onContextMenu=function(b){var F;at.current&&Pt.has("contextMenu")?Ge(!1):(ht(b),Ge(!0)),b.preventDefault();for(var $e=arguments.length,ke=new Array($e>1?$e-1:0),Te=1;Te<$e;Te++)ke[Te-1]=arguments[Te];(F=he.onContextMenu)===null||F===void 0||F.call.apply(F,[he,b].concat(ke))}),X&&(pe.className=Ce()(he.className,X));var dn=(0,T.Z)((0,T.Z)({},he),pe),Rn={},jn=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];jn.forEach(function(b){Ze[b]&&(Rn[b]=function(){for(var F,$e=arguments.length,ke=new Array($e),Te=0;Te<$e;Te++)ke[Te]=arguments[Te];(F=dn[b])===null||F===void 0||F.call.apply(F,[dn].concat(ke)),Ze[b].apply(Ze,ke)})});var Gn=r.cloneElement(Ne,(0,T.Z)((0,T.Z)({},dn),Rn)),Jn={x:sn,y:Et},$o=J?(0,T.Z)({},J!==!0?J:{}):null;return r.createElement(r.Fragment,null,r.createElement(wn.Z,{disabled:!xe,ref:Ye,onResize:dt},r.createElement(la,{getTriggerDOMNode:ge},Gn)),r.createElement(nr.Provider,{value:Ke},r.createElement(oa,{portal:e,ref:Pe,prefixCls:l,popup:ae,className:Ce()(B,Se),style:k,target:P,onMouseEnter:Gt,onMouseLeave:bn,onPointerEnter:Gt,zIndex:U,open:xe,keepDom:te,fresh:fe,onClick:be,mask:s,motion:Fe,maskMotion:rt,onVisibleChanged:pn,onPrepare:xn,forceRender:R,autoDestroy:De,getPopupContainer:E,align:qe,arrow:$o,arrowPos:Jn,ready:un,offsetX:Wt,offsetY:zt,offsetR:lt,offsetB:Tt,onAlign:xt,stretch:V,targetWidth:He/Ht,targetHeight:vn/Ut})))});return t}var sr=Ca(tr.Z),qt=H(939983),ya=H(973935),cr=H(891881),vr=r.createContext(null);function Kn(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function dr(e){var t=r.useContext(vr);return Kn(t,e)}var pa=H(456982),xa=["children","locked"],mt=r.createContext(null);function Sa(e,t){var n=(0,T.Z)({},e);return Object.keys(t).forEach(function(o){var a=t[o];a!==void 0&&(n[o]=a)}),n}function en(e){var t=e.children,n=e.locked,o=(0,Ve.Z)(e,xa),a=r.useContext(mt),l=(0,pa.Z)(function(){return Sa(a,o)},[a,o],function(i,u){return!n&&(i[0]!==u[0]||!(0,cr.Z)(i[1],u[1],!0))});return r.createElement(mt.Provider,{value:l},t)}var ba=[],fr=r.createContext(null);function mn(){return r.useContext(fr)}var mr=r.createContext(ba);function tn(e){var t=r.useContext(mr);return r.useMemo(function(){return e!==void 0?[].concat((0,Mt.Z)(t),[e]):t},[t,e])}var gr=r.createContext(null),Ra=r.createContext({}),zn=Ra,Ma=H(188603),Fn=Be.Z.LEFT,kn=Be.Z.RIGHT,Vn=Be.Z.UP,gn=Be.Z.DOWN,hn=Be.Z.ENTER,hr=Be.Z.ESC,nn=Be.Z.HOME,rn=Be.Z.END,Cr=[Vn,gn,Fn,kn];function Za(e,t,n,o){var a,l,i,u,v="prev",c="next",g="children",d="parent";if(e==="inline"&&o===hn)return{inlineTrigger:!0};var m=(a={},(0,re.Z)(a,Vn,v),(0,re.Z)(a,gn,c),a),f=(l={},(0,re.Z)(l,Fn,n?c:v),(0,re.Z)(l,kn,n?v:c),(0,re.Z)(l,gn,g),(0,re.Z)(l,hn,g),l),h=(i={},(0,re.Z)(i,Vn,v),(0,re.Z)(i,gn,c),(0,re.Z)(i,hn,g),(0,re.Z)(i,hr,d),(0,re.Z)(i,Fn,n?g:d),(0,re.Z)(i,kn,n?d:g),i),p={inline:m,horizontal:f,vertical:h,inlineSub:m,horizontalSub:h,verticalSub:h},y=(u=p["".concat(e).concat(t?"":"Sub")])===null||u===void 0?void 0:u[o];switch(y){case v:return{offset:-1,sibling:!0};case c:return{offset:1,sibling:!0};case d:return{offset:-1,sibling:!1};case g:return{offset:1,sibling:!1};default:return null}}function Ia(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function wa(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function yr(e,t){var n=(0,Ma.tS)(e,!0);return n.filter(function(o){return t.has(o)})}function pr(e,t,n){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var a=yr(e,t),l=a.length,i=a.findIndex(function(u){return n===u});return o<0?i===-1?i=l-1:i-=1:o>0&&(i+=1),i=(i+l)%l,a[i]}function Ea(e,t,n,o,a,l,i,u,v,c){var g=r.useRef(),d=r.useRef();d.current=t;var m=function(){Zt.Z.cancel(g.current)};return r.useEffect(function(){return function(){m()}},[]),function(f){var h=f.which;if([].concat(Cr,[hn,hr,nn,rn]).includes(h)){var p,y,Z,M=function(){p=new Set,y=new Map,Z=new Map;var D=l();return D.forEach(function(L){var x=document.querySelector("[data-menu-id='".concat(Kn(o,L),"']"));x&&(p.add(x),Z.set(x,L),y.set(L,x))}),p};M();var C=y.get(t),s=wa(C,p),S=Z.get(s),$=Za(e,i(S,!0).length===1,n,h);if(!$&&h!==nn&&h!==rn)return;(Cr.includes(h)||[nn,rn].includes(h))&&f.preventDefault();var E=function(D){if(D){var L=D,x=D.querySelector("a");x!=null&&x.getAttribute("href")&&(L=x);var U=Z.get(D);u(U),m(),g.current=(0,Zt.Z)(function(){d.current===U&&L.focus()})}};if([nn,rn].includes(h)||$.sibling||!s){var R;!s||e==="inline"?R=a.current:R=Ia(s);var G,A=yr(R,p);h===nn?G=A[0]:h===rn?G=A[A.length-1]:G=pr(R,p,s,$.offset),E(G)}else if($.inlineTrigger)v(S);else if($.offset>0)v(S,!0),m(),g.current=(0,Zt.Z)(function(){M();var O=s.getAttribute("aria-controls"),D=document.getElementById(O),L=pr(D,p);E(L)},5);else if($.offset<0){var ae=i(S,!0),B=ae[ae.length-2],k=y.get(B);v(B,!1),E(k)}}c==null||c(f)}}function Pa(e){Promise.resolve().then(e)}var Bn="__RC_UTIL_PATH_SPLIT__",xr=function(t){return t.join(Bn)},Na=function(t){return t.split(Bn)},On="rc-menu-more";function $a(){var e=r.useState({}),t=(0,N.Z)(e,2),n=t[1],o=(0,r.useRef)(new Map),a=(0,r.useRef)(new Map),l=r.useState([]),i=(0,N.Z)(l,2),u=i[0],v=i[1],c=(0,r.useRef)(0),g=(0,r.useRef)(!1),d=function(){g.current||n({})},m=(0,r.useCallback)(function(C,s){var S=xr(s);a.current.set(S,C),o.current.set(C,S),c.current+=1;var $=c.current;Pa(function(){$===c.current&&d()})},[]),f=(0,r.useCallback)(function(C,s){var S=xr(s);a.current.delete(S),o.current.delete(C)},[]),h=(0,r.useCallback)(function(C){v(C)},[]),p=(0,r.useCallback)(function(C,s){var S=o.current.get(C)||"",$=Na(S);return s&&u.includes($[0])&&$.unshift(On),$},[u]),y=(0,r.useCallback)(function(C,s){return C.some(function(S){var $=p(S,!0);return $.includes(s)})},[p]),Z=function(){var s=(0,Mt.Z)(o.current.keys());return u.length&&s.push(On),s},M=(0,r.useCallback)(function(C){var s="".concat(o.current.get(C)).concat(Bn),S=new Set;return(0,Mt.Z)(a.current.keys()).forEach(function($){$.startsWith(s)&&S.add(a.current.get($))}),S},[]);return r.useEffect(function(){return function(){g.current=!0}},[]),{registerPath:m,unregisterPath:f,refreshOverflowKeys:h,isSubPathKey:y,getKeyPath:p,getKeys:Z,getSubPathKeys:M}}function an(e){var t=r.useRef(e);t.current=e;var n=r.useCallback(function(){for(var o,a=arguments.length,l=new Array(a),i=0;i<a;i++)l[i]=arguments[i];return(o=t.current)===null||o===void 0?void 0:o.call.apply(o,[t].concat(l))},[]);return e?n:void 0}var Ta=Math.random().toFixed(5).toString().slice(2),Sr=0;function Da(e){var t=(0,At.default)(e,{value:e}),n=(0,N.Z)(t,2),o=n[0],a=n[1];return r.useEffect(function(){Sr+=1;var l="".concat(Ta,"-").concat(Sr);a("rc-menu-uuid-".concat(l))},[]),o}var Aa=H(215671),La=H(143144),Ka=H(132531),za=H(973568),br=H(898423);function Rr(e,t,n,o){var a=r.useContext(mt),l=a.activeKey,i=a.onActive,u=a.onInactive,v={active:l===e};return t||(v.onMouseEnter=function(c){n==null||n({key:e,domEvent:c}),i(e)},v.onMouseLeave=function(c){o==null||o({key:e,domEvent:c}),u(e)}),v}function Mr(e){var t=r.useContext(mt),n=t.mode,o=t.rtl,a=t.inlineIndent;if(n!=="inline")return null;var l=e;return o?{paddingRight:l*a}:{paddingLeft:l*a}}function Zr(e){var t=e.icon,n=e.props,o=e.children,a;return t===null||t===!1?null:(typeof t=="function"?a=r.createElement(t,(0,T.Z)({},n)):typeof t!="boolean"&&(a=t),a||o||null)}var Fa=["item"];function Cn(e){var t=e.item,n=(0,Ve.Z)(e,Fa);return Object.defineProperty(n,"item",{get:function(){return(0,er.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var ka=["title","attribute","elementRef"],Va=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Ba=["active"],Oa=function(e){(0,Ka.Z)(n,e);var t=(0,za.Z)(n);function n(){return(0,Aa.Z)(this,n),t.apply(this,arguments)}return(0,La.Z)(n,[{key:"render",value:function(){var a=this.props,l=a.title,i=a.attribute,u=a.elementRef,v=(0,Ve.Z)(a,ka),c=(0,br.Z)(v,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,er.ZP)(!i,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),r.createElement(qt.Z.Item,(0,Le.Z)({},i,{title:typeof l=="string"?l:void 0},c,{ref:u}))}}]),n}(r.Component),Wa=r.forwardRef(function(e,t){var n,o=e.style,a=e.className,l=e.eventKey,i=e.warnKey,u=e.disabled,v=e.itemIcon,c=e.children,g=e.role,d=e.onMouseEnter,m=e.onMouseLeave,f=e.onClick,h=e.onKeyDown,p=e.onFocus,y=(0,Ve.Z)(e,Va),Z=dr(l),M=r.useContext(mt),C=M.prefixCls,s=M.onItemClick,S=M.disabled,$=M.overflowDisabled,E=M.itemIcon,R=M.selectedKeys,G=M.onActive,A=r.useContext(zn),ae=A._internalRenderMenuItem,B="".concat(C,"-item"),k=r.useRef(),O=r.useRef(),D=S||u,L=(0,Jt.x1)(t,O),x=tn(l),U=function(oe){return{key:l,keyPath:(0,Mt.Z)(x).reverse(),item:k.current,domEvent:oe}},V=v||E,Q=Rr(l,D,d,m),fe=Q.active,Y=(0,Ve.Z)(Q,Ba),be=R.includes(l),me=Mr(x.length),J=function(oe){if(!D){var X=U(oe);f==null||f(Cn(X)),s(X)}},w=function(oe){if(h==null||h(oe),oe.which===Be.Z.ENTER){var X=U(oe);f==null||f(Cn(X)),s(X)}},z=function(oe){G(l),p==null||p(oe)},_={};e.role==="option"&&(_["aria-selected"]=be);var ue=r.createElement(Oa,(0,Le.Z)({ref:k,elementRef:L,role:g===null?"none":g||"menuitem",tabIndex:u?null:-1,"data-menu-id":$&&Z?null:Z},y,Y,_,{component:"li","aria-disabled":u,style:(0,T.Z)((0,T.Z)({},me),o),className:Ce()(B,(n={},(0,re.Z)(n,"".concat(B,"-active"),fe),(0,re.Z)(n,"".concat(B,"-selected"),be),(0,re.Z)(n,"".concat(B,"-disabled"),D),n),a),onClick:J,onKeyDown:w,onFocus:z}),c,r.createElement(Zr,{props:(0,T.Z)((0,T.Z)({},e),{},{isSelected:be}),icon:V}));return ae&&(ue=ae(ue,e,{selected:be})),ue});function Ha(e,t){var n=e.eventKey,o=mn(),a=tn(n);return r.useEffect(function(){if(o)return o.registerPath(n,a),function(){o.unregisterPath(n,a)}},[a]),o?null:r.createElement(Wa,(0,Le.Z)({},e,{ref:t}))}var on=r.forwardRef(Ha),Ua=["className","children"],_a=function(t,n){var o=t.className,a=t.children,l=(0,Ve.Z)(t,Ua),i=r.useContext(mt),u=i.prefixCls,v=i.mode,c=i.rtl;return r.createElement("ul",(0,Le.Z)({className:Ce()(u,c&&"".concat(u,"-rtl"),"".concat(u,"-sub"),"".concat(u,"-").concat(v==="inline"?"inline":"vertical"),o),role:"menu"},l,{"data-menu-list":!0,ref:n}),a)},Ir=r.forwardRef(_a);Ir.displayName="SubMenuList";var wr=Ir;function Wn(e,t){return(0,qn.Z)(e).map(function(n,o){if(r.isValidElement(n)){var a,l,i=n.key,u=(a=(l=n.props)===null||l===void 0?void 0:l.eventKey)!==null&&a!==void 0?a:i,v=u==null;v&&(u="tmp_key-".concat([].concat((0,Mt.Z)(t),[o]).join("-")));var c={key:u,eventKey:u};return r.cloneElement(n,c)}return n})}var _e={adjustX:1,adjustY:1},ja={topLeft:{points:["bl","tl"],overflow:_e},topRight:{points:["br","tr"],overflow:_e},bottomLeft:{points:["tl","bl"],overflow:_e},bottomRight:{points:["tr","br"],overflow:_e},leftTop:{points:["tr","tl"],overflow:_e},leftBottom:{points:["br","bl"],overflow:_e},rightTop:{points:["tl","tr"],overflow:_e},rightBottom:{points:["bl","br"],overflow:_e}},Ga={topLeft:{points:["bl","tl"],overflow:_e},topRight:{points:["br","tr"],overflow:_e},bottomLeft:{points:["tl","bl"],overflow:_e},bottomRight:{points:["tr","br"],overflow:_e},rightTop:{points:["tr","tl"],overflow:_e},rightBottom:{points:["br","bl"],overflow:_e},leftTop:{points:["tl","tr"],overflow:_e},leftBottom:{points:["bl","br"],overflow:_e}},ko=null;function Er(e,t,n){if(t)return t;if(n)return n[e]||n.other}var Ja={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Qa(e){var t=e.prefixCls,n=e.visible,o=e.children,a=e.popup,l=e.popupStyle,i=e.popupClassName,u=e.popupOffset,v=e.disabled,c=e.mode,g=e.onVisibleChange,d=r.useContext(mt),m=d.getPopupContainer,f=d.rtl,h=d.subMenuOpenDelay,p=d.subMenuCloseDelay,y=d.builtinPlacements,Z=d.triggerSubMenuAction,M=d.forceSubMenuRender,C=d.rootClassName,s=d.motion,S=d.defaultMotions,$=r.useState(!1),E=(0,N.Z)($,2),R=E[0],G=E[1],A=f?(0,T.Z)((0,T.Z)({},Ga),y):(0,T.Z)((0,T.Z)({},ja),y),ae=Ja[c],B=Er(c,s,S),k=r.useRef(B);c!=="inline"&&(k.current=B);var O=(0,T.Z)((0,T.Z)({},k.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),D=r.useRef();return r.useEffect(function(){return D.current=(0,Zt.Z)(function(){G(n)}),function(){Zt.Z.cancel(D.current)}},[n]),r.createElement(sr,{prefixCls:t,popupClassName:Ce()("".concat(t,"-popup"),(0,re.Z)({},"".concat(t,"-rtl"),f),i,C),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:m,builtinPlacements:A,popupPlacement:ae,popupVisible:R,popup:a,popupStyle:l,popupAlign:u&&{offset:u},action:v?[]:[Z],mouseEnterDelay:h,mouseLeaveDelay:p,onPopupVisibleChange:g,forceRender:M,popupMotion:O,fresh:!0},o)}function Ya(e){var t=e.id,n=e.open,o=e.keyPath,a=e.children,l="inline",i=r.useContext(mt),u=i.prefixCls,v=i.forceSubMenuRender,c=i.motion,g=i.defaultMotions,d=i.mode,m=r.useRef(!1);m.current=d===l;var f=r.useState(!m.current),h=(0,N.Z)(f,2),p=h[0],y=h[1],Z=m.current?n:!1;r.useEffect(function(){m.current&&y(!1)},[d]);var M=(0,T.Z)({},Er(l,c,g));o.length>1&&(M.motionAppear=!1);var C=M.onVisibleChanged;return M.onVisibleChanged=function(s){return!m.current&&!s&&y(!0),C==null?void 0:C(s)},p?null:r.createElement(en,{mode:l,locked:!m.current},r.createElement(An.ZP,(0,Le.Z)({visible:Z},M,{forceRender:v,removeOnLeave:!1,leavedClassName:"".concat(u,"-hidden")}),function(s){var S=s.className,$=s.style;return r.createElement(wr,{id:t,className:S,style:$},a)}))}var Xa=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],qa=["active"],eo=function(t){var n,o=t.style,a=t.className,l=t.title,i=t.eventKey,u=t.warnKey,v=t.disabled,c=t.internalPopupClose,g=t.children,d=t.itemIcon,m=t.expandIcon,f=t.popupClassName,h=t.popupOffset,p=t.popupStyle,y=t.onClick,Z=t.onMouseEnter,M=t.onMouseLeave,C=t.onTitleClick,s=t.onTitleMouseEnter,S=t.onTitleMouseLeave,$=(0,Ve.Z)(t,Xa),E=dr(i),R=r.useContext(mt),G=R.prefixCls,A=R.mode,ae=R.openKeys,B=R.disabled,k=R.overflowDisabled,O=R.activeKey,D=R.selectedKeys,L=R.itemIcon,x=R.expandIcon,U=R.onItemClick,V=R.onOpenChange,Q=R.onActive,fe=r.useContext(zn),Y=fe._internalRenderSubMenuItem,be=r.useContext(gr),me=be.isSubPathKey,J=tn(),w="".concat(G,"-submenu"),z=B||v,_=r.useRef(),ue=r.useRef(),ce=d!=null?d:L,oe=m!=null?m:x,X=ae.includes(i),ge=!k&&X,Ze=me(D,i),De=Rr(i,z,s,S),Ie=De.active,ze=(0,Ve.Z)(De,qa),W=r.useState(!1),ie=(0,N.Z)(W,2),q=ie[0],Ee=ie[1],Ke=function(pe){z||Ee(pe)},ye=function(pe){Ke(!0),Z==null||Z({key:i,domEvent:pe})},et=function(pe){Ke(!1),M==null||M({key:i,domEvent:pe})},je=r.useMemo(function(){return Ie||(A!=="inline"?q||me([O],i):!1)},[A,Ie,O,q,i,me]),Re=Mr(J.length),ct=function(pe){z||(C==null||C({key:i,domEvent:pe}),A==="inline"&&V(i,!X))},Pe=an(function(he){y==null||y(Cn(he)),U(he)}),Ae=function(pe){A!=="inline"&&V(i,pe)},le=function(){Q(i)},P=E&&"".concat(E,"-popup"),we=r.createElement("div",(0,Le.Z)({role:"menuitem",style:Re,className:"".concat(w,"-title"),tabIndex:z?null:-1,ref:_,title:typeof l=="string"?l:null,"data-menu-id":k&&E?null:E,"aria-expanded":ge,"aria-haspopup":!0,"aria-controls":P,"aria-disabled":z,onClick:ct,onFocus:le},ze),l,r.createElement(Zr,{icon:A!=="horizontal"?oe:void 0,props:(0,T.Z)((0,T.Z)({},t),{},{isOpen:ge,isSubMenu:!0})},r.createElement("i",{className:"".concat(w,"-arrow")}))),ve=r.useRef(A);if(A!=="inline"&&J.length>1?ve.current="vertical":ve.current=A,!k){var Ye=ve.current;we=r.createElement(Qa,{mode:Ye,prefixCls:w,visible:!c&&ge&&A!=="inline",popupClassName:f,popupOffset:h,popupStyle:p,popup:r.createElement(en,{mode:Ye==="horizontal"?"vertical":Ye},r.createElement(wr,{id:P,ref:ue},g)),disabled:z,onVisibleChange:Ae},we)}var Ne=r.createElement(qt.Z.Item,(0,Le.Z)({role:"none"},$,{component:"li",style:o,className:Ce()(w,"".concat(w,"-").concat(A),a,(n={},(0,re.Z)(n,"".concat(w,"-open"),ge),(0,re.Z)(n,"".concat(w,"-active"),je),(0,re.Z)(n,"".concat(w,"-selected"),Ze),(0,re.Z)(n,"".concat(w,"-disabled"),z),n)),onMouseEnter:ye,onMouseLeave:et}),we,!k&&r.createElement(Ya,{id:P,open:ge,keyPath:J},g));return Y&&(Ne=Y(Ne,t,{selected:Ze,active:je,open:ge,disabled:z})),r.createElement(en,{onItemClick:Pe,mode:A==="horizontal"?"vertical":A,itemIcon:ce,expandIcon:oe},Ne)};function Hn(e){var t=e.eventKey,n=e.children,o=tn(t),a=Wn(n,o),l=mn();r.useEffect(function(){if(l)return l.registerPath(t,o),function(){l.unregisterPath(t,o)}},[o]);var i;return l?i=a:i=r.createElement(eo,e,a),r.createElement(mr.Provider,{value:o},i)}var to=["className","title","eventKey","children"],no=["children"],ro=function(t){var n=t.className,o=t.title,a=t.eventKey,l=t.children,i=(0,Ve.Z)(t,to),u=r.useContext(mt),v=u.prefixCls,c="".concat(v,"-item-group");return r.createElement("li",(0,Le.Z)({role:"presentation"},i,{onClick:function(d){return d.stopPropagation()},className:Ce()(c,n)}),r.createElement("div",{role:"presentation",className:"".concat(c,"-title"),title:typeof o=="string"?o:void 0},o),r.createElement("ul",{role:"group",className:"".concat(c,"-list")},l))};function Pr(e){var t=e.children,n=(0,Ve.Z)(e,no),o=tn(n.eventKey),a=Wn(t,o),l=mn();return l?a:r.createElement(ro,(0,br.Z)(n,["warnKey"]),a)}function Nr(e){var t=e.className,n=e.style,o=r.useContext(mt),a=o.prefixCls,l=mn();return l?null:r.createElement("li",{role:"separator",className:Ce()("".concat(a,"-item-divider"),t),style:n})}var ao=["label","children","key","type"];function Un(e){return(e||[]).map(function(t,n){if(t&&(0,fn.Z)(t)==="object"){var o=t,a=o.label,l=o.children,i=o.key,u=o.type,v=(0,Ve.Z)(o,ao),c=i!=null?i:"tmp-".concat(n);return l||u==="group"?u==="group"?r.createElement(Pr,(0,Le.Z)({key:c},v,{title:a}),Un(l)):r.createElement(Hn,(0,Le.Z)({key:c},v,{title:a}),Un(l)):u==="divider"?r.createElement(Nr,(0,Le.Z)({key:c},v)):r.createElement(on,(0,Le.Z)({key:c},v),a)}return null}).filter(function(t){return t})}function oo(e,t,n){var o=e;return t&&(o=Un(t)),Wn(o,n)}var io=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],Ot=[],lo=r.forwardRef(function(e,t){var n,o,a=e,l=a.prefixCls,i=l===void 0?"rc-menu":l,u=a.rootClassName,v=a.style,c=a.className,g=a.tabIndex,d=g===void 0?0:g,m=a.items,f=a.children,h=a.direction,p=a.id,y=a.mode,Z=y===void 0?"vertical":y,M=a.inlineCollapsed,C=a.disabled,s=a.disabledOverflow,S=a.subMenuOpenDelay,$=S===void 0?.1:S,E=a.subMenuCloseDelay,R=E===void 0?.1:E,G=a.forceSubMenuRender,A=a.defaultOpenKeys,ae=a.openKeys,B=a.activeKey,k=a.defaultActiveFirst,O=a.selectable,D=O===void 0?!0:O,L=a.multiple,x=L===void 0?!1:L,U=a.defaultSelectedKeys,V=a.selectedKeys,Q=a.onSelect,fe=a.onDeselect,Y=a.inlineIndent,be=Y===void 0?24:Y,me=a.motion,J=a.defaultMotions,w=a.triggerSubMenuAction,z=w===void 0?"hover":w,_=a.builtinPlacements,ue=a.itemIcon,ce=a.expandIcon,oe=a.overflowedIndicator,X=oe===void 0?"...":oe,ge=a.overflowedIndicatorPopupClassName,Ze=a.getPopupContainer,De=a.onClick,Ie=a.onOpenChange,ze=a.onKeyDown,W=a.openAnimation,ie=a.openTransitionName,q=a._internalRenderMenuItem,Ee=a._internalRenderSubMenuItem,Ke=(0,Ve.Z)(a,io),ye=r.useMemo(function(){return oo(f,m,Ot)},[f,m]),et=r.useState(!1),je=(0,N.Z)(et,2),Re=je[0],ct=je[1],Pe=r.useRef(),Ae=Da(p),le=h==="rtl",P=(0,At.default)(A,{value:ae,postState:function(ne){return ne||Ot}}),we=(0,N.Z)(P,2),ve=we[0],Ye=we[1],Ne=function(ne){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function He(){Ye(ne),Ie==null||Ie(ne)}se?(0,ya.flushSync)(He):He()},he=r.useState(ve),pe=(0,N.Z)(he,2),Xe=pe[0],Fe=pe[1],rt=r.useRef(!1),$t=r.useMemo(function(){return(Z==="inline"||Z==="vertical")&&M?["vertical",M]:[Z,!1]},[Z,M]),tt=(0,N.Z)($t,2),ee=tt[0],de=tt[1],xe=ee==="inline",gt=r.useState(ee),at=(0,N.Z)(gt,2),Oe=at[0],It=at[1],bt=r.useState(de),ot=(0,N.Z)(bt,2),Ge=ot[0],Kt=ot[1];r.useEffect(function(){It(ee),Kt(de),rt.current&&(xe?Ye(Xe):Ne(Ot))},[ee,de]);var wt=r.useState(0),te=(0,N.Z)(wt,2),I=te[0],K=te[1],j=I>=ye.length-1||Oe!=="horizontal"||s;r.useEffect(function(){xe&&Fe(ve)},[ve]),r.useEffect(function(){return rt.current=!0,function(){rt.current=!1}},[]);var Me=$a(),We=Me.registerPath,nt=Me.unregisterPath,it=Me.refreshOverflowKeys,Je=Me.isSubPathKey,vt=Me.getKeyPath,ht=Me.getKeys,Ct=Me.getSubPathKeys,Qe=r.useMemo(function(){return{registerPath:We,unregisterPath:nt}},[We,nt]),un=r.useMemo(function(){return{isSubPathKey:Je}},[Je]);r.useEffect(function(){it(j?Ot:ye.slice(I+1).map(function(Se){return Se.key}))},[I,j]);var Wt=(0,At.default)(B||k&&((n=ye[0])===null||n===void 0?void 0:n.key),{value:B}),zt=(0,N.Z)(Wt,2),lt=zt[0],Tt=zt[1],sn=an(function(Se){Tt(Se)}),Et=an(function(){Tt(void 0)});(0,r.useImperativeHandle)(t,function(){return{list:Pe.current,focus:function(ne){var se,He=lt!=null?lt:(se=ye.find(function(vn){return!vn.props.disabled}))===null||se===void 0?void 0:se.key;if(He){var Ue,St,Rt;(Ue=Pe.current)===null||Ue===void 0||(St=Ue.querySelector("li[data-menu-id='".concat(Kn(Ae,He),"']")))===null||St===void 0||(Rt=St.focus)===null||Rt===void 0||Rt.call(St,ne)}}}});var Ht=(0,At.default)(U||[],{value:V,postState:function(ne){return Array.isArray(ne)?ne:ne==null?Ot:[ne]}}),Ut=(0,N.Z)(Ht,2),qe=Ut[0],yt=Ut[1],Ft=function(ne){if(D){var se=ne.key,He=qe.includes(se),Ue;x?He?Ue=qe.filter(function(Rt){return Rt!==se}):Ue=[].concat((0,Mt.Z)(qe),[se]):Ue=[se],yt(Ue);var St=(0,T.Z)((0,T.Z)({},ne),{},{selectedKeys:Ue});He?fe==null||fe(St):Q==null||Q(St)}!x&&ve.length&&Oe!=="inline"&&Ne(Ot)},_t=an(function(Se){De==null||De(Cn(Se)),Ft(Se)}),pt=an(function(Se,ne){var se=ve.filter(function(Ue){return Ue!==Se});if(ne)se.push(Se);else if(Oe!=="inline"){var He=Ct(Se);se=se.filter(function(Ue){return!He.has(Ue)})}(0,cr.Z)(ve,se,!0)||Ne(se,!0)}),Pt=function(ne,se){var He=se!=null?se:!ve.includes(ne);pt(ne,He)},kt=Ea(Oe,lt,le,Ae,Pe,ht,vt,Tt,Pt,ze);r.useEffect(function(){ct(!0)},[]);var Dt=r.useMemo(function(){return{_internalRenderMenuItem:q,_internalRenderSubMenuItem:Ee}},[q,Ee]),xt=Oe!=="horizontal"||s?ye:ye.map(function(Se,ne){return r.createElement(en,{key:Se.key,overflowDisabled:ne>I},Se)}),cn=r.createElement(qt.Z,(0,Le.Z)({id:p,ref:Pe,prefixCls:"".concat(i,"-overflow"),component:"ul",itemComponent:on,className:Ce()(i,"".concat(i,"-root"),"".concat(i,"-").concat(Oe),c,(o={},(0,re.Z)(o,"".concat(i,"-inline-collapsed"),Ge),(0,re.Z)(o,"".concat(i,"-rtl"),le),o),u),dir:h,style:v,role:"menu",tabIndex:d,data:xt,renderRawItem:function(ne){return ne},renderRawRest:function(ne){var se=ne.length,He=se?ye.slice(-se):null;return r.createElement(Hn,{eventKey:On,title:X,disabled:j,internalPopupClose:se===0,popupClassName:ge},He)},maxCount:Oe!=="horizontal"||s?qt.Z.INVALIDATE:qt.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ne){K(ne)},onKeyDown:kt},Ke));return r.createElement(zn.Provider,{value:Dt},r.createElement(vr.Provider,{value:Ae},r.createElement(en,{prefixCls:i,rootClassName:u,mode:Oe,openKeys:ve,rtl:le,disabled:C,motion:Re?me:null,defaultMotions:Re?J:null,activeKey:lt,onActive:sn,onInactive:Et,selectedKeys:qe,inlineIndent:be,subMenuOpenDelay:$,subMenuCloseDelay:R,forceSubMenuRender:G,builtinPlacements:_,triggerSubMenuAction:z,getPopupContainer:Ze,itemIcon:ue,expandIcon:ce,onItemClick:_t,onOpenChange:pt},r.createElement(gr.Provider,{value:un},cn),r.createElement("div",{style:{display:"none"},"aria-hidden":!0},r.createElement(fr.Provider,{value:Qe},ye)))))}),uo=lo,ln=uo;ln.Item=on,ln.SubMenu=Hn,ln.ItemGroup=Pr,ln.Divider=Nr;var so=ln,co=r.createContext(null),$r=co;function vo(e){var t=r.useContext($r),n=t.notFoundContent,o=t.activeIndex,a=t.setActiveIndex,l=t.selectOption,i=t.onFocus,u=t.onBlur,v=e.prefixCls,c=e.options,g=c[o]||{};return r.createElement(so,{prefixCls:"".concat(v,"-menu"),activeKey:g.key,onSelect:function(m){var f=m.key,h=c.find(function(p){var y=p.key;return y===f});l(h)},onFocus:i,onBlur:u},c.map(function(d,m){var f=d.key,h=d.disabled,p=d.className,y=d.style,Z=d.label;return r.createElement(on,{key:f,disabled:h,className:p,style:y,onMouseEnter:function(){a(m)}},Z)}),!c.length&&r.createElement(on,{disabled:!0},n))}var fo=vo,mo={bottomRight:{points:["tl","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomLeft:{points:["tr","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["bl","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["br","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},go=function(t){var n=t.prefixCls,o=t.options,a=t.children,l=t.visible,i=t.transitionName,u=t.getPopupContainer,v=t.dropdownClassName,c=t.direction,g=t.placement,d="".concat(n,"-dropdown"),m=r.createElement(fo,{prefixCls:d,options:o}),f=(0,r.useMemo)(function(){var h;return c==="rtl"?h=g==="top"?"topLeft":"bottomLeft":h=g==="top"?"topRight":"bottomRight",h},[c,g]);return r.createElement(sr,{prefixCls:d,popupVisible:l,popup:m,popupPlacement:f,popupTransitionName:i,builtinPlacements:mo,getPopupContainer:u,popupClassName:v},a)},ho=go,Co=function(){return null},yo=Co;function po(e){var t=e.selectionStart;return e.value.slice(0,t)}function xo(e,t){return t.reduce(function(n,o){var a=e.lastIndexOf(o);return a>n.location?{location:a,prefix:o}:n},{location:-1,prefix:""})}function Tr(e){return(e||"").toLowerCase()}function So(e,t,n){var o=e[0];if(!o||o===n)return e;for(var a=e,l=t.length,i=0;i<l;i+=1)if(Tr(a[i])!==Tr(t[i])){a=a.slice(i);break}else i===l-1&&(a=a.slice(l));return a}function bo(e,t){var n=t.measureLocation,o=t.prefix,a=t.targetText,l=t.selectionStart,i=t.split,u=e.slice(0,n);u[u.length-i.length]===i&&(u=u.slice(0,u.length-i.length)),u&&(u="".concat(u).concat(i));var v=So(e.slice(l),a.slice(l-n-o.length),i);v.slice(0,i.length)===i&&(v=v.slice(i.length));var c="".concat(u).concat(o).concat(a).concat(i);return{text:"".concat(c).concat(v),selectionLocation:c.length}}function Ro(e,t){e.setSelectionRange(t,t),e.blur(),e.focus()}function Mo(e,t){return!t||e.indexOf(t)===-1}function Zo(e,t){var n=t.value,o=n===void 0?"":n,a=e.toLowerCase();return o.toLowerCase().indexOf(a)!==-1}var Io=["prefixCls","className","style","prefix","split","notFoundContent","value","defaultValue","children","options","open","validateSearch","filterOption","onChange","onKeyDown","onKeyUp","onPressEnter","onSearch","onSelect","onFocus","onBlur","transitionName","placement","direction","getPopupContainer","dropdownClassName","rows"],wo=["suffix","prefixCls","classes","value"],Eo=(0,r.forwardRef)(function(e,t){var n=e.prefixCls,o=n===void 0?"rc-mentions":n,a=e.className,l=e.style,i=e.prefix,u=i===void 0?"@":i,v=e.split,c=v===void 0?" ":v,g=e.notFoundContent,d=g===void 0?"Not Found":g,m=e.value,f=e.defaultValue,h=e.children,p=e.options,y=e.open,Z=e.validateSearch,M=Z===void 0?Mo:Z,C=e.filterOption,s=C===void 0?Zo:C,S=e.onChange,$=e.onKeyDown,E=e.onKeyUp,R=e.onPressEnter,G=e.onSearch,A=e.onSelect,ae=e.onFocus,B=e.onBlur,k=e.transitionName,O=e.placement,D=e.direction,L=e.getPopupContainer,x=e.dropdownClassName,U=e.rows,V=U===void 0?1:U,Q=(0,Ve.Z)(e,Io),fe=(0,r.useMemo)(function(){return Array.isArray(u)?u:[u]},[u]),Y=(0,r.useRef)(null),be=(0,r.useRef)(null),me=function(){var I,K;return(I=Y.current)===null||I===void 0||(K=I.resizableTextArea)===null||K===void 0?void 0:K.textArea};r.useImperativeHandle(t,function(){var te,I;return{focus:function(){var j;return(j=Y.current)===null||j===void 0?void 0:j.focus()},blur:function(){var j;return(j=Y.current)===null||j===void 0?void 0:j.blur()},textarea:(te=Y.current)===null||te===void 0||(I=te.resizableTextArea)===null||I===void 0?void 0:I.textArea}});var J=(0,r.useState)(!1),w=(0,N.Z)(J,2),z=w[0],_=w[1],ue=(0,r.useState)(""),ce=(0,N.Z)(ue,2),oe=ce[0],X=ce[1],ge=(0,r.useState)(""),Ze=(0,N.Z)(ge,2),De=Ze[0],Ie=Ze[1],ze=(0,r.useState)(0),W=(0,N.Z)(ze,2),ie=W[0],q=W[1],Ee=(0,r.useState)(0),Ke=(0,N.Z)(Ee,2),ye=Ke[0],et=Ke[1],je=(0,r.useState)(!1),Re=(0,N.Z)(je,2),ct=Re[0],Pe=Re[1],Ae=(0,At.default)("",{defaultValue:f,value:m}),le=(0,N.Z)(Ae,2),P=le[0],we=le[1];(0,r.useEffect)(function(){z&&be.current&&(be.current.scrollTop=me().scrollTop)},[z]);var ve=r.useMemo(function(){if(y)for(var te=0;te<fe.length;te+=1){var I=fe[te],K=P.lastIndexOf(I);if(K>=0)return[!0,"",I,K]}return[z,oe,De,ie]},[y,z,fe,P,oe,De,ie]),Ye=(0,N.Z)(ve,4),Ne=Ye[0],he=Ye[1],pe=Ye[2],Xe=Ye[3],Fe=r.useCallback(function(te){var I;return p&&p.length>0?I=p.map(function(K){var j;return(0,T.Z)((0,T.Z)({},K),{},{key:(j=K==null?void 0:K.key)!==null&&j!==void 0?j:K.value})}):I=(0,qn.Z)(h).map(function(K){var j=K.props,Me=K.key;return(0,T.Z)((0,T.Z)({},j),{},{label:j.children,key:Me||j.value})}),I.filter(function(K){return s===!1?!0:s(te,K)})},[h,p,s]),rt=r.useMemo(function(){return Fe(he)},[Fe,he]),$t=Yr(),tt=function(I,K,j){_(!0),X(I),Ie(K),q(j),et(0)},ee=function(I){_(!1),q(0),X(""),$t(I)},de=function(I){we(I),S==null||S(I)},xe=function(I){var K=I.target.value;de(K)},gt=function(I){var K,j=I.value,Me=j===void 0?"":j,We=bo(P,{measureLocation:Xe,targetText:Me,prefix:pe,selectionStart:(K=me())===null||K===void 0?void 0:K.selectionStart,split:c}),nt=We.text,it=We.selectionLocation;de(nt),ee(function(){Ro(me(),it)}),A==null||A(I,pe)},at=function(I){var K=I.which;if($==null||$(I),!!Ne){if(K===Be.Z.UP||K===Be.Z.DOWN){var j=rt.length,Me=K===Be.Z.UP?-1:1,We=(ye+Me+j)%j;et(We),I.preventDefault()}else if(K===Be.Z.ESC)ee();else if(K===Be.Z.ENTER){if(I.preventDefault(),!rt.length){ee();return}var nt=rt[ye];gt(nt)}}},Oe=function(I){var K=I.key,j=I.which,Me=I.target,We=po(Me),nt=xo(We,fe),it=nt.location,Je=nt.prefix;if(E==null||E(I),[Be.Z.ESC,Be.Z.UP,Be.Z.DOWN,Be.Z.ENTER].indexOf(j)===-1)if(it!==-1){var vt=We.slice(it+Je.length),ht=M(vt,c),Ct=!!Fe(vt).length;ht?(K===Je||K==="Shift"||Ne||vt!==he&&Ct)&&tt(vt,Je,it):Ne&&ee(),G&&ht&&G(vt,Je)}else Ne&&ee()},It=function(I){!Ne&&R&&R(I)},bt=(0,r.useRef)(),ot=function(I){window.clearTimeout(bt.current),!ct&&I&&ae&&ae(I),Pe(!0)},Ge=function(I){bt.current=window.setTimeout(function(){Pe(!1),ee(),B==null||B(I)},0)},Kt=function(){ot()},wt=function(){Ge()};return r.createElement("div",{className:Ce()(o,a),style:l},r.createElement(Qr,(0,Le.Z)({ref:Y,value:P},Q,{rows:V,onChange:xe,onKeyDown:at,onKeyUp:Oe,onPressEnter:It,onFocus:ot,onBlur:Ge})),Ne&&r.createElement("div",{ref:be,className:"".concat(o,"-measure")},P.slice(0,Xe),r.createElement($r.Provider,{value:{notFoundContent:d,activeIndex:ye,setActiveIndex:et,selectOption:gt,onFocus:Kt,onBlur:wt}},r.createElement(ho,{prefixCls:o,transitionName:k,placement:O,direction:D,options:rt,visible:!0,getPopupContainer:L,dropdownClassName:x},r.createElement("span",null,pe))),P.slice(Xe+pe.length)))}),Dr=(0,r.forwardRef)(function(e,t){var n=e.suffix,o=e.prefixCls,a=e.classes,l=e.value,i=(0,Ve.Z)(e,wo);return r.createElement(Xn,{inputElement:r.createElement(Eo,(0,Le.Z)({prefixCls:o,ref:t},i)),suffix:n,prefixCls:o,classes:a,value:l})});Dr.Option=yo;var Po=Dr,No=Po}}]);