You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
42 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8928],{61639:function($e,me,l){"use strict";l.d(me,{Z:function(){return g}});var ie=l(90484),F=l(44378),ge=l(86504),se=l(7085),Ne=l(18095),Ce=l(18267),te=l(94184),J=l.n(te),Y=l(67294),O=l(96159);function g(w,Q,ne,ae){var oe=ae.isLeaf,j=ae.expanded,C=ae.loading;if(C)return Y.createElement(se.Z,{className:"".concat(w,"-switcher-loading-icon")});var i;if(ne&&(0,ie.Z)(ne)==="object"&&(i=ne.showLeafIcon),oe){if(!ne)return null;if(typeof i!="boolean"&&!!i){var h=typeof i=="function"?i(ae):i,s="".concat(w,"-switcher-line-custom-icon");return(0,O.l$)(h)?(0,O.Tm)(h,{className:J()(h.props.className||"",s)}):h}return i?Y.createElement(ge.Z,{className:"".concat(w,"-switcher-line-icon")}):Y.createElement("span",{className:"".concat(w,"-switcher-leaf-line")})}var u="".concat(w,"-switcher-icon"),f=typeof Q=="function"?Q(ae):Q;return(0,O.l$)(f)?(0,O.Tm)(f,{className:J()(f.props.className||"",u)}):f||(ne?j?Y.createElement(Ne.Z,{className:"".concat(w,"-switcher-line-icon")}):Y.createElement(Ce.Z,{className:"".concat(w,"-switcher-line-icon")}):Y.createElement(F.Z,{className:u}))}},4258:function($e,me,l){"use strict";l.d(me,{Z:function(){return L}});var ie=l(22122),F=l(96156),ge=l(81253),se=l(28991),Ne=l(6610),Ce=l(5991),te=l(63349),J=l(10379),Y=l(44144),O=l(67294),g=l(94184),w=l.n(g),Q=l(64217),ne=l(27822),ae=function(S){for(var A=S.prefixCls,t=S.level,D=S.isStart,k=S.isEnd,I="".concat(A,"-indent-unit"),d=[],o=0;o<t;o+=1){var N;d.push(O.createElement("span",{key:o,className:w()(I,(N={},(0,F.Z)(N,"".concat(I,"-start"),D[o]),(0,F.Z)(N,"".concat(I,"-end"),k[o]),N))}))}return O.createElement("span",{"aria-hidden":"true",className:"".concat(A,"-indent")},d)},oe=O.memo(ae),j=l(1089),C=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],i="open",h="close",s="---",u=function(x){(0,J.Z)(A,x);var S=(0,Y.Z)(A);function A(){var t;(0,Ne.Z)(this,A);for(var D=arguments.length,k=new Array(D),I=0;I<D;I++)k[I]=arguments[I];return t=S.call.apply(S,[this].concat(k)),t.state={dragNodeHighlight:!1},t.selectHandle=void 0,t.onSelectorClick=function(d){var o=t.props.context.onNodeClick;o(d,(0,j.F)(t.props)),t.isSelectable()?t.onSelect(d):t.onCheck(d)},t.onSelectorDoubleClick=function(d){var o=t.props.context.onNodeDoubleClick;o(d,(0,j.F)(t.props))},t.onSelect=function(d){if(!t.isDisabled()){var o=t.props.context.onNodeSelect;d.preventDefault(),o(d,(0,j.F)(t.props))}},t.onCheck=function(d){if(!t.isDisabled()){var o=t.props,N=o.disableCheckbox,K=o.checked,B=t.props.context.onNodeCheck;if(!(!t.isCheckable()||N)){d.preventDefault();var re=!K;B(d,(0,j.F)(t.props),re)}}},t.onMouseEnter=function(d){var o=t.props.context.onNodeMouseEnter;o(d,(0,j.F)(t.props))},t.onMouseLeave=function(d){var o=t.props.context.onNodeMouseLeave;o(d,(0,j.F)(t.props))},t.onContextMenu=function(d){var o=t.props.context.onNodeContextMenu;o(d,(0,j.F)(t.props))},t.onDragStart=function(d){var o=t.props.context.onNodeDragStart;d.stopPropagation(),t.setState({dragNodeHighlight:!0}),o(d,(0,te.Z)(t));try{d.dataTransfer.setData("text/plain","")}catch(N){}},t.onDragEnter=function(d){var o=t.props.context.onNodeDragEnter;d.preventDefault(),d.stopPropagation(),o(d,(0,te.Z)(t))},t.onDragOver=function(d){var o=t.props.context.onNodeDragOver;d.preventDefault(),d.stopPropagation(),o(d,(0,te.Z)(t))},t.onDragLeave=function(d){var o=t.props.context.onNodeDragLeave;d.stopPropagation(),o(d,(0,te.Z)(t))},t.onDragEnd=function(d){var o=t.props.context.onNodeDragEnd;d.stopPropagation(),t.setState({dragNodeHighlight:!1}),o(d,(0,te.Z)(t))},t.onDrop=function(d){var o=t.props.context.onNodeDrop;d.preventDefault(),d.stopPropagation(),t.setState({dragNodeHighlight:!1}),o(d,(0,te.Z)(t))},t.onExpand=function(d){var o=t.props,N=o.loading,K=o.context.onNodeExpand;N||K(d,(0,j.F)(t.props))},t.setSelectHandle=function(d){t.selectHandle=d},t.getNodeState=function(){var d=t.props.expanded;return t.isLeaf()?null:d?i:h},t.hasChildren=function(){var d=t.props.eventKey,o=t.props.context.keyEntities,N=o[d]||{},K=N.children;return!!(K||[]).length},t.isLeaf=function(){var d=t.props,o=d.isLeaf,N=d.loaded,K=t.props.context.loadData,B=t.hasChildren();return o===!1?!1:o||!K&&!B||K&&N&&!B},t.isDisabled=function(){var d=t.props.disabled,o=t.props.context.disabled;return!!(o||d)},t.isCheckable=function(){var d=t.props.checkable,o=t.props.context.checkable;return!o||d===!1?!1:o},t.syncLoadData=function(d){var o=d.expanded,N=d.loading,K=d.loaded,B=t.props.context,re=B.loadData,V=B.onNodeLoad;N||re&&o&&!t.isLeaf()&&!t.hasChildren()&&!K&&V((0,j.F)(t.props))},t.isDraggable=function(){var d=t.props,o=d.data,N=d.context.draggable;return!!(N&&(!N.nodeDraggable||N.nodeDraggable(o)))},t.renderDragHandler=function(){var d=t.props.context,o=d.draggable,N=d.prefixCls;return(o==null?void 0:o.icon)?O.createElement("span",{className:"".concat(N,"-draggable-icon")},o.icon):null},t.renderSwitcherIconDom=function(d){var o=t.props.switcherIcon,N=t.props.context.switcherIcon,K=o||N;return typeof K=="function"?K((0,se.Z)((0,se.Z)({},t.props),{},{isLeaf:d})):K},t.renderSwitcher=function(){var d=t.props.expanded,o=t.props.context.prefixCls;if(t.isLeaf()){var N=t.renderSwitcherIconDom(!0);return N!==!1?O.createElement("span",{className:w()("".concat(o,"-switcher"),"".concat(o,"-switcher-noop"))},N):null}var K=w()("".concat(o,"-switcher"),"".concat(o,"-switcher_").concat(d?i:h)),B=t.renderSwitcherIconDom(!1);return B!==!1?O.createElement("span",{onClick:t.onExpand,className:K},B):null},t.renderCheckbox=function(){var d=t.props,o=d.checked,N=d.halfChecked,K=d.disableCheckbox,B=t.props.context.prefixCls,re=t.isDisabled(),V=t.isCheckable();if(!V)return null;var G=typeof V!="boolean"?V:null;return O.createElement("span",{className:w()("".concat(B,"-checkbox"),o&&"".concat(B,"-checkbox-checked"),!o&&N&&"".concat(B,"-checkbox-indeterminate"),(re||K)&&"".concat(B,"-checkbox-disabled")),onClick:t.onCheck},G)},t.renderIcon=function(){var d=t.props.loading,o=t.props.context.prefixCls;return O.createElement("span",{className:w()("".concat(o,"-iconEle"),"".concat(o,"-icon__").concat(t.getNodeState()||"docu"),d&&"".concat(o,"-icon_loading"))})},t.renderSelector=function(){var d=t.state.dragNodeHighlight,o=t.props,N=o.title,K=N===void 0?s:N,B=o.selected,re=o.icon,V=o.loading,G=o.data,q=t.props.context,fe=q.prefixCls,Ee=q.showIcon,xe=q.icon,De=q.loadData,ke=q.titleRender,ye=t.isDisabled(),Pe="".concat(fe,"-node-content-wrapper"),Se;if(Ee){var pe=re||xe;Se=pe?O.createElement("span",{className:w()("".concat(fe,"-iconEle"),"".concat(fe,"-icon__customize"))},typeof pe=="function"?pe(t.props):pe):t.renderIcon()}else De&&V&&(Se=t.renderIcon());var v;typeof K=="function"?v=K(G):ke?v=ke(G):v=K;var P=O.createElement("span",{className:"".concat(fe,"-title")},v);return O.createElement("span",{ref:t.setSelectHandle,title:typeof K=="string"?K:"",className:w()("".concat(Pe),"".concat(Pe,"-").concat(t.getNodeState()||"normal"),!ye&&(B||d)&&"".concat(fe,"-node-selected")),onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onContextMenu:t.onContextMenu,onClick:t.onSelectorClick,onDoubleClick:t.onSelectorDoubleClick},Se,P,t.renderDropIndicator())},t.renderDropIndicator=function(){var d=t.props,o=d.disabled,N=d.eventKey,K=t.props.context,B=K.draggable,re=K.dropLevelOffset,V=K.dropPosition,G=K.prefixCls,q=K.indent,fe=K.dropIndicatorRender,Ee=K.dragOverNodeKey,xe=K.direction,De=!!B,ke=!o&&De&&Ee===N;return ke?fe({dropPosition:V,dropLevelOffset:re,indent:q,prefixCls:G,direction:xe}):null},t}return(0,Ce.Z)(A,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var D=this.props.selectable,k=this.props.context.selectable;return typeof D=="boolean"?D:k}},{key:"render",value:function(){var D,k=this.props,I=k.eventKey,d=k.className,o=k.style,N=k.dragOver,K=k.dragOverGapTop,B=k.dragOverGapBottom,re=k.isLeaf,V=k.isStart,G=k.isEnd,q=k.expanded,fe=k.selected,Ee=k.checked,xe=k.halfChecked,De=k.loading,ke=k.domRef,ye=k.active,Pe=k.data,Se=k.onMouseMove,pe=k.selectable,v=(0,ge.Z)(k,C),P=this.props.context,M=P.prefixCls,e=P.filterTreeNode,y=P.keyEntities,z=P.dropContainerKey,_=P.dropTargetKey,n=P.draggingNodeKey,r=this.isDisabled(),a=(0,Q.Z)(v,{aria:!0,data:!0}),p=y[I]||{},m=p.level,b=G[G.length-1],E=this.isDraggable(),T=!r&&E,R=n===I,$=pe!==void 0?{"aria-selected":!!pe}:void 0;return O.createElement("div",(0,ie.Z)({ref:ke,className:w()(d,"".concat(M,"-treenode"),(D={},(0,F.Z)(D,"".concat(M,"-treenode-disabled"),r),(0,F.Z)(D,"".concat(M,"-treenode-switcher-").concat(q?"open":"close"),!re),(0,F.Z)(D,"".concat(M,"-treenode-checkbox-checked"),Ee),(0,F.Z)(D,"".concat(M,"-treenode-checkbox-indeterminate"),xe),(0,F.Z)(D,"".concat(M,"-treenode-selected"),fe),(0,F.Z)(D,"".concat(M,"-treenode-loading"),De),(0,F.Z)(D,"".concat(M,"-treenode-active"),ye),(0,F.Z)(D,"".concat(M,"-treenode-leaf-last"),b),(0,F.Z)(D,"".concat(M,"-treenode-draggable"),E),(0,F.Z)(D,"dragging",R),(0,F.Z)(D,"drop-target",_===I),(0,F.Z)(D,"drop-container",z===I),(0,F.Z)(D,"drag-over",!r&&N),(0,F.Z)(D,"drag-over-gap-top",!r&&K),(0,F.Z)(D,"drag-over-gap-bottom",!r&&B),(0,F.Z)(D,"filter-node",e&&e((0,j.F)(this.props))),D)),style:o,draggable:T,"aria-grabbed":R,onDragStart:T?this.onDragStart:void 0,onDragEnter:E?this.onDragEnter:void 0,onDragOver:E?this.onDragOver:void 0,onDragLeave:E?this.onDragLeave:void 0,onDrop:E?this.onDrop:void 0,onDragEnd:E?this.onDragEnd:void 0,onMouseMove:Se},$,a),O.createElement(oe,{prefixCls:M,level:m,isStart:V,isEnd:G}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),A}(O.Component),f=function(S){return O.createElement(ne.k.Consumer,null,function(A){return O.createElement(u,(0,ie.Z)({},S,{context:A}))})};f.displayName="TreeNode",f.isTreeNode=1;var L=f},27822:function($e,me,l){"use strict";l.d(me,{k:function(){return F}});var ie=l(67294),F=ie.createContext(null)},93549:function($e,me,l){"use strict";l.d(me,{O:function(){return x.Z},Z:function(){return pe}});var ie=l(22122),F=l(96156),ge=l(90484),se=l(28991),Ne=l(85061),Ce=l(6610),te=l(5991),J=l(63349),Y=l(10379),O=l(44144),g=l(67294),w=l(15105),Q=l(80334),ne=l(64217),ae=l(94184),oe=l.n(ae),j=l(27822),C=l(10225),i=l(1089);function h(v){if(v==null)throw new TypeError("Cannot destructure "+v)}var s=l(28481),u=l(81253),f=l(7606),L=l(63441),x=l(4258),S=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],A=function(P,M){var e=P.className,y=P.style,z=P.motion,_=P.motionNodes,n=P.motionType,r=P.onMotionStart,a=P.onMotionEnd,p=P.active,m=P.treeNodeRequiredProps,b=(0,u.Z)(P,S),E=g.useState(!0),T=(0,s.Z)(E,2),R=T[0],$=T[1],c=g.useContext(j.k),W=c.prefixCls,U=g.useRef(!1),Z=function(){U.current||a(),U.current=!0};return(0,g.useEffect)(function(){_&&n==="hide"&&R&&$(!1)},[_]),(0,g.useEffect)(function(){return _&&r(),function(){_&&Z()}},[]),_?g.createElement(L.Z,(0,ie.Z)({ref:M,visible:R},z,{motionAppear:n==="show",onAppearEnd:Z,onLeaveEnd:Z}),function(H,X){var de=H.className,ce=H.style;return g.createElement("div",{ref:X,className:oe()("".concat(W,"-treenode-motion"),de),style:ce},_.map(function(ee){var he=(0,ie.Z)({},(h(ee.data),ee.data)),ue=ee.title,ve=ee.key,Ke=ee.isStart,Oe=ee.isEnd;delete he.children;var Te=(0,i.H8)(ve,m);return g.createElement(x.Z,(0,ie.Z)({},he,Te,{title:ue,active:p,data:ee.data,key:ve,isStart:Ke,isEnd:Oe}))}))}):g.createElement(x.Z,(0,ie.Z)({domRef:M,className:e,style:y},b,{active:p}))};A.displayName="MotionTreeNode";var t=g.forwardRef(A),D=t;function k(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],M=v.length,e=P.length;if(Math.abs(M-e)!==1)return{add:!1,key:null};function y(z,_){var n=new Map;z.forEach(function(a){n.set(a,!0)});var r=_.filter(function(a){return!n.has(a)});return r.length===1?r[0]:null}return M<e?{add:!0,key:y(v,P)}:{add:!1,key:y(P,v)}}function I(v,P,M){var e=v.findIndex(function(n){return n.key===M}),y=v[e+1],z=P.findIndex(function(n){return n.key===M});if(y){var _=P.findIndex(function(n){return n.key===y.key});return P.slice(z+1,_)}return P.slice(z+1)}var d=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],o={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},N=function(){},K="RC_TREE_MOTION_".concat(Math.random()),B={key:K},re={key:K,level:0,index:0,pos:"0",node:B,nodes:[B]},V={parent:null,children:[],pos:re.pos,data:B,title:null,key:K,isStart:[],isEnd:[]};function G(v,P,M,e){return P===!1||!M?v:v.slice(0,Math.ceil(M/e)+1)}function q(v){var P=v.key,M=v.pos;return(0,i.km)(P,M)}function fe(v){for(var P=String(v.data.key),M=v;M.parent;)M=M.parent,P="".concat(M.data.key," > ").concat(P);return P}var Ee=g.forwardRef(function(v,P){var M=v.prefixCls,e=v.data,y=v.selectable,z=v.checkable,_=v.expandedKeys,n=v.selectedKeys,r=v.checkedKeys,a=v.loadedKeys,p=v.loadingKeys,m=v.halfCheckedKeys,b=v.keyEntities,E=v.disabled,T=v.dragging,R=v.dragOverNodeKey,$=v.dropPosition,c=v.motion,W=v.height,U=v.itemHeight,Z=v.virtual,H=v.focusable,X=v.activeItem,de=v.focused,ce=v.tabIndex,ee=v.onKeyDown,he=v.onFocus,ue=v.onBlur,ve=v.onActiveChange,Ke=v.onListChangeStart,Oe=v.onListChangeEnd,Te=(0,u.Z)(v,d),Le=g.useRef(null),be=g.useRef(null);g.useImperativeHandle(P,function(){return{scrollTo:function(Me){Le.current.scrollTo(Me)},getIndentWidth:function(){return be.current.offsetWidth}}});var Ue=g.useState(_),He=(0,s.Z)(Ue,2),Xe=He[0],Ve=He[1],Je=g.useState(e),Ge=(0,s.Z)(Je,2),Ze=Ge[0],je=Ge[1],Qe=g.useState(e),ze=(0,s.Z)(Qe,2),qe=ze[0],Fe=ze[1],et=g.useState([]),Re=(0,s.Z)(et,2),it=Re[0],tt=Re[1],st=g.useState(null),rt=(0,s.Z)(st,2),lt=rt[0],nt=rt[1],ot=g.useRef(e);ot.current=e;function at(){var le=ot.current;je(le),Fe(le),tt([]),nt(null),Oe()}g.useEffect(function(){Ve(_);var le=k(Xe,_);if(le.key!==null)if(le.add){var Me=Ze.findIndex(function(We){var _e=We.key;return _e===le.key}),Ae=G(I(Ze,e,le.key),Z,W,U),Be=Ze.slice();Be.splice(Me+1,0,V),Fe(Be),tt(Ae),nt("show")}else{var Ie=e.findIndex(function(We){var _e=We.key;return _e===le.key}),we=G(I(e,Ze,le.key),Z,W,U),Ye=e.slice();Ye.splice(Ie+1,0,V),Fe(Ye),tt(we),nt("hide")}else Ze!==e&&(je(e),Fe(e))},[_,e]),g.useEffect(function(){T||at()},[T]);var ct=c?qe:e,dt={expandedKeys:_,selectedKeys:n,loadedKeys:a,loadingKeys:p,checkedKeys:r,halfCheckedKeys:m,dragOverNodeKey:R,dropPosition:$,keyEntities:b};return g.createElement(g.Fragment,null,de&&X&&g.createElement("span",{style:o,"aria-live":"assertive"},fe(X)),g.createElement("div",null,g.createElement("input",{style:o,disabled:H===!1||E,tabIndex:H!==!1?ce:null,onKeyDown:ee,onFocus:he,onBlur:ue,value:"",onChange:N,"aria-label":"for screen reader"})),g.createElement("div",{className:"".concat(M,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},g.createElement("div",{className:"".concat(M,"-indent")},g.createElement("div",{ref:be,className:"".concat(M,"-indent-unit")}))),g.createElement(f.Z,(0,ie.Z)({},Te,{data:ct,itemKey:q,height:W,fullHeight:!1,virtual:Z,itemHeight:U,prefixCls:"".concat(M,"-list"),ref:Le,onVisibleChange:function(Me,Ae){var Be=new Set(Me),Ie=Ae.filter(function(we){return!Be.has(we)});Ie.some(function(we){return q(we)===K})&&at()}}),function(le){var Me=le.pos,Ae=(0,ie.Z)({},(h(le.data),le.data)),Be=le.title,Ie=le.key,we=le.isStart,Ye=le.isEnd,We=(0,i.km)(Ie,Me);delete Ae.key,delete Ae.children;var _e=(0,i.H8)(We,dt);return g.createElement(D,(0,ie.Z)({},Ae,_e,{title:Be,active:!!X&&Ie===X.key,pos:Me,data:le.data,isStart:we,isEnd:Ye,motion:c,motionNodes:Ie===K?it:null,motionType:lt,onMotionStart:Ke,onMotionEnd:at,treeNodeRequiredProps:dt,onMouseMove:function(){ve(null)}}))}))});Ee.displayName="NodeList";var xe=Ee,De=l(17341);function ke(v){var P=v.dropPosition,M=v.dropLevelOffset,e=v.indent,y={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(P){case-1:y.top=0,y.left=-M*e;break;case 1:y.bottom=0,y.left=-M*e;break;case 0:y.bottom=0,y.left=e;break}return g.createElement("div",{style:y})}var ye=10,Pe=function(v){(0,Y.Z)(M,v);var P=(0,O.Z)(M);function M(){var e;(0,Ce.Z)(this,M);for(var y=arguments.length,z=new Array(y),_=0;_<y;_++)z[_]=arguments[_];return e=P.call.apply(P,[this].concat(z)),e.destroyed=!1,e.delayedDragEnterLogic=void 0,e.loadingRetryTimes={},e.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,i.w$)()},e.dragStartMousePosition=null,e.dragNode=void 0,e.currentMouseOverDroppableNodeKey=null,e.listRef=g.createRef(),e.onNodeDragStart=function(n,r){var a=e.state,p=a.expandedKeys,m=a.keyEntities,b=e.props.onDragStart,E=r.props.eventKey;e.dragNode=r,e.dragStartMousePosition={x:n.clientX,y:n.clientY};var T=(0,C._5)(p,E);e.setState({draggingNodeKey:E,dragChildrenKeys:(0,C.wA)(E,m),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(T),window.addEventListener("dragend",e.onWindowDragEnd),b==null||b({event:n,node:(0,i.F)(r.props)})},e.onNodeDragEnter=function(n,r){var a=e.state,p=a.expandedKeys,m=a.keyEntities,b=a.dragChildrenKeys,E=a.flattenNodes,T=a.indent,R=e.props,$=R.onDragEnter,c=R.onExpand,W=R.allowDrop,U=R.direction,Z=r.props,H=Z.pos,X=Z.eventKey,de=(0,J.Z)(e),ce=de.dragNode;if(e.currentMouseOverDroppableNodeKey!==X&&(e.currentMouseOverDroppableNodeKey=X),!ce){e.resetDragState();return}var ee=(0,C.OM)(n,ce,r,T,e.dragStartMousePosition,W,E,m,p,U),he=ee.dropPosition,ue=ee.dropLevelOffset,ve=ee.dropTargetKey,Ke=ee.dropContainerKey,Oe=ee.dropTargetPos,Te=ee.dropAllowed,Le=ee.dragOverNodeKey;if(b.indexOf(ve)!==-1||!Te){e.resetDragState();return}if(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach(function(be){clearTimeout(e.delayedDragEnterLogic[be])}),ce.props.eventKey!==r.props.eventKey&&(n.persist(),e.delayedDragEnterLogic[H]=window.setTimeout(function(){if(e.state.draggingNodeKey!==null){var be=(0,Ne.Z)(p),Ue=m[r.props.eventKey];Ue&&(Ue.children||[]).length&&(be=(0,C.L0)(p,r.props.eventKey)),"expandedKeys"in e.props||e.setExpandedKeys(be),c==null||c(be,{node:(0,i.F)(r.props),expanded:!0,nativeEvent:n.nativeEvent})}},800)),ce.props.eventKey===ve&&ue===0){e.resetDragState();return}e.setState({dragOverNodeKey:Le,dropPosition:he,dropLevelOffset:ue,dropTargetKey:ve,dropContainerKey:Ke,dropTargetPos:Oe,dropAllowed:Te}),$==null||$({event:n,node:(0,i.F)(r.props),expandedKeys:p})},e.onNodeDragOver=function(n,r){var a=e.state,p=a.dragChildrenKeys,m=a.flattenNodes,b=a.keyEntities,E=a.expandedKeys,T=a.indent,R=e.props,$=R.onDragOver,c=R.allowDrop,W=R.direction,U=(0,J.Z)(e),Z=U.dragNode;if(!!Z){var H=(0,C.OM)(n,Z,r,T,e.dragStartMousePosition,c,m,b,E,W),X=H.dropPosition,de=H.dropLevelOffset,ce=H.dropTargetKey,ee=H.dropContainerKey,he=H.dropAllowed,ue=H.dropTargetPos,ve=H.dragOverNodeKey;p.indexOf(ce)!==-1||!he||(Z.props.eventKey===ce&&de===0?e.state.dropPosition===null&&e.state.dropLevelOffset===null&&e.state.dropTargetKey===null&&e.state.dropContainerKey===null&&e.state.dropTargetPos===null&&e.state.dropAllowed===!1&&e.state.dragOverNodeKey===null||e.resetDragState():X===e.state.dropPosition&&de===e.state.dropLevelOffset&&ce===e.state.dropTargetKey&&ee===e.state.dropContainerKey&&ue===e.state.dropTargetPos&&he===e.state.dropAllowed&&ve===e.state.dragOverNodeKey||e.setState({dropPosition:X,dropLevelOffset:de,dropTargetKey:ce,dropContainerKey:ee,dropTargetPos:ue,dropAllowed:he,dragOverNodeKey:ve}),$==null||$({event:n,node:(0,i.F)(r.props)}))}},e.onNodeDragLeave=function(n,r){e.currentMouseOverDroppableNodeKey===r.props.eventKey&&!n.currentTarget.contains(n.relatedTarget)&&(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var a=e.props.onDragLeave;a==null||a({event:n,node:(0,i.F)(r.props)})},e.onWindowDragEnd=function(n){e.onNodeDragEnd(n,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)},e.onNodeDragEnd=function(n,r){var a=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),a==null||a({event:n,node:(0,i.F)(r.props)}),e.dragNode=null,window.removeEventListener("dragend",e.onWindowDragEnd)},e.onNodeDrop=function(n,r){var a,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,m=e.state,b=m.dragChildrenKeys,E=m.dropPosition,T=m.dropTargetKey,R=m.dropTargetPos,$=m.dropAllowed;if(!!$){var c=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),T!==null){var W=(0,se.Z)((0,se.Z)({},(0,i.H8)(T,e.getTreeNodeRequiredProps())),{},{active:((a=e.getActiveItem())===null||a===void 0?void 0:a.key)===T,data:e.state.keyEntities[T].node}),U=b.indexOf(T)!==-1;(0,Q.ZP)(!U,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Z=(0,C.yx)(R),H={event:n,node:(0,i.F)(W),dragNode:e.dragNode?(0,i.F)(e.dragNode.props):null,dragNodesKeys:[e.dragNode.props.eventKey].concat(b),dropToGap:E!==0,dropPosition:E+Number(Z[Z.length-1])};p||c==null||c(H),e.dragNode=null}}},e.cleanDragState=function(){var n=e.state.draggingNodeKey;n!==null&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null},e.triggerExpandActionExpand=function(n,r){var a=e.state,p=a.expandedKeys,m=a.flattenNodes,b=r.expanded,E=r.key,T=r.isLeaf;if(!(T||n.shiftKey||n.metaKey||n.ctrlKey)){var R=m.filter(function(c){return c.key===E})[0],$=(0,i.F)((0,se.Z)((0,se.Z)({},(0,i.H8)(E,e.getTreeNodeRequiredProps())),{},{data:R.data}));e.setExpandedKeys(b?(0,C._5)(p,E):(0,C.L0)(p,E)),e.onNodeExpand(n,$)}},e.onNodeClick=function(n,r){var a=e.props,p=a.onClick,m=a.expandAction;m==="click"&&e.triggerExpandActionExpand(n,r),p==null||p(n,r)},e.onNodeDoubleClick=function(n,r){var a=e.props,p=a.onDoubleClick,m=a.expandAction;m==="doubleClick"&&e.triggerExpandActionExpand(n,r),p==null||p(n,r)},e.onNodeSelect=function(n,r){var a=e.state.selectedKeys,p=e.state,m=p.keyEntities,b=p.fieldNames,E=e.props,T=E.onSelect,R=E.multiple,$=r.selected,c=r[b.key],W=!$;W?R?a=(0,C.L0)(a,c):a=[c]:a=(0,C._5)(a,c);var U=a.map(function(Z){var H=m[Z];return H?H.node:null}).filter(function(Z){return Z});e.setUncontrolledState({selectedKeys:a}),T==null||T(a,{event:"select",selected:W,node:r,selectedNodes:U,nativeEvent:n.nativeEvent})},e.onNodeCheck=function(n,r,a){var p=e.state,m=p.keyEntities,b=p.checkedKeys,E=p.halfCheckedKeys,T=e.props,R=T.checkStrictly,$=T.onCheck,c=r.key,W,U={event:"check",node:r,checked:a,nativeEvent:n.nativeEvent};if(R){var Z=a?(0,C.L0)(b,c):(0,C._5)(b,c),H=(0,C._5)(E,c);W={checked:Z,halfChecked:H},U.checkedNodes=Z.map(function(ue){return m[ue]}).filter(function(ue){return ue}).map(function(ue){return ue.node}),e.setUncontrolledState({checkedKeys:Z})}else{var X=(0,De.S)([].concat((0,Ne.Z)(b),[c]),!0,m),de=X.checkedKeys,ce=X.halfCheckedKeys;if(!a){var ee=new Set(de);ee.delete(c);var he=(0,De.S)(Array.from(ee),{checked:!1,halfCheckedKeys:ce},m);de=he.checkedKeys,ce=he.halfCheckedKeys}W=de,U.checkedNodes=[],U.checkedNodesPositions=[],U.halfCheckedKeys=ce,de.forEach(function(ue){var ve=m[ue];if(!!ve){var Ke=ve.node,Oe=ve.pos;U.checkedNodes.push(Ke),U.checkedNodesPositions.push({node:Ke,pos:Oe})}}),e.setUncontrolledState({checkedKeys:de},!1,{halfCheckedKeys:ce})}$==null||$(W,U)},e.onNodeLoad=function(n){var r=n.key,a=new Promise(function(p,m){e.setState(function(b){var E=b.loadedKeys,T=E===void 0?[]:E,R=b.loadingKeys,$=R===void 0?[]:R,c=e.props,W=c.loadData,U=c.onLoad;if(!W||T.indexOf(r)!==-1||$.indexOf(r)!==-1)return null;var Z=W(n);return Z.then(function(){var H=e.state.loadedKeys,X=(0,C.L0)(H,r);U==null||U(X,{event:"load",node:n}),e.setUncontrolledState({loadedKeys:X}),e.setState(function(de){return{loadingKeys:(0,C._5)(de.loadingKeys,r)}}),p()}).catch(function(H){if(e.setState(function(de){return{loadingKeys:(0,C._5)(de.loadingKeys,r)}}),e.loadingRetryTimes[r]=(e.loadingRetryTimes[r]||0)+1,e.loadingRetryTimes[r]>=ye){var X=e.state.loadedKeys;(0,Q.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:(0,C.L0)(X,r)}),p()}m(H)}),{loadingKeys:(0,C.L0)($,r)}})});return a.catch(function(){}),a},e.onNodeMouseEnter=function(n,r){var a=e.props.onMouseEnter;a==null||a({event:n,node:r})},e.onNodeMouseLeave=function(n,r){var a=e.props.onMouseLeave;a==null||a({event:n,node:r})},e.onNodeContextMenu=function(n,r){var a=e.props.onRightClick;a&&(n.preventDefault(),a({event:n,node:r}))},e.onFocus=function(){var n=e.props.onFocus;e.setState({focused:!0});for(var r=arguments.length,a=new Array(r),p=0;p<r;p++)a[p]=arguments[p];n==null||n.apply(void 0,a)},e.onBlur=function(){var n=e.props.onBlur;e.setState({focused:!1}),e.onActiveChange(null);for(var r=arguments.length,a=new Array(r),p=0;p<r;p++)a[p]=arguments[p];n==null||n.apply(void 0,a)},e.getTreeNodeRequiredProps=function(){var n=e.state,r=n.expandedKeys,a=n.selectedKeys,p=n.loadedKeys,m=n.loadingKeys,b=n.checkedKeys,E=n.halfCheckedKeys,T=n.dragOverNodeKey,R=n.dropPosition,$=n.keyEntities;return{expandedKeys:r||[],selectedKeys:a||[],loadedKeys:p||[],loadingKeys:m||[],checkedKeys:b||[],halfCheckedKeys:E||[],dragOverNodeKey:T,dropPosition:R,keyEntities:$}},e.setExpandedKeys=function(n){var r=e.state,a=r.treeData,p=r.fieldNames,m=(0,i.oH)(a,n,p);e.setUncontrolledState({expandedKeys:n,flattenNodes:m},!0)},e.onNodeExpand=function(n,r){var a=e.state.expandedKeys,p=e.state,m=p.listChanging,b=p.fieldNames,E=e.props,T=E.onExpand,R=E.loadData,$=r.expanded,c=r[b.key];if(!m){var W=a.indexOf(c),U=!$;if((0,Q.ZP)($&&W!==-1||!$&&W===-1,"Expand state not sync with index check"),U?a=(0,C.L0)(a,c):a=(0,C._5)(a,c),e.setExpandedKeys(a),T==null||T(a,{node:r,expanded:U,nativeEvent:n.nativeEvent}),U&&R){var Z=e.onNodeLoad(r);Z&&Z.then(function(){var H=(0,i.oH)(e.state.treeData,a,b);e.setUncontrolledState({flattenNodes:H})}).catch(function(){var H=e.state.expandedKeys,X=(0,C._5)(H,c);e.setExpandedKeys(X)})}}},e.onListChangeStart=function(){e.setUncontrolledState({listChanging:!0})},e.onListChangeEnd=function(){setTimeout(function(){e.setUncontrolledState({listChanging:!1})})},e.onActiveChange=function(n){var r=e.state.activeKey,a=e.props.onActiveChange;r!==n&&(e.setState({activeKey:n}),n!==null&&e.scrollTo({key:n}),a==null||a(n))},e.getActiveItem=function(){var n=e.state,r=n.activeKey,a=n.flattenNodes;return r===null?null:a.find(function(p){var m=p.key;return m===r})||null},e.offsetActiveKey=function(n){var r=e.state,a=r.flattenNodes,p=r.activeKey,m=a.findIndex(function(T){var R=T.key;return R===p});m===-1&&n<0&&(m=a.length),m=(m+n+a.length)%a.length;var b=a[m];if(b){var E=b.key;e.onActiveChange(E)}else e.onActiveChange(null)},e.onKeyDown=function(n){var r=e.state,a=r.activeKey,p=r.expandedKeys,m=r.checkedKeys,b=r.fieldNames,E=e.props,T=E.onKeyDown,R=E.checkable,$=E.selectable;switch(n.which){case w.Z.UP:{e.offsetActiveKey(-1),n.preventDefault();break}case w.Z.DOWN:{e.offsetActiveKey(1),n.preventDefault();break}}var c=e.getActiveItem();if(c&&c.data){var W=e.getTreeNodeRequiredProps(),U=c.data.isLeaf===!1||!!(c.data[b.children]||[]).length,Z=(0,i.F)((0,se.Z)((0,se.Z)({},(0,i.H8)(a,W)),{},{data:c.data,active:!0}));switch(n.which){case w.Z.LEFT:{U&&p.includes(a)?e.onNodeExpand({},Z):c.parent&&e.onActiveChange(c.parent.key),n.preventDefault();break}case w.Z.RIGHT:{U&&!p.includes(a)?e.onNodeExpand({},Z):c.children&&c.children.length&&e.onActiveChange(c.children[0].key),n.preventDefault();break}case w.Z.ENTER:case w.Z.SPACE:{R&&!Z.disabled&&Z.checkable!==!1&&!Z.disableCheckbox?e.onNodeCheck({},Z,!m.includes(a)):!R&&$&&!Z.disabled&&Z.selectable!==!1&&e.onNodeSelect({},Z);break}}}T==null||T(n)},e.setUncontrolledState=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!e.destroyed){var p=!1,m=!0,b={};Object.keys(n).forEach(function(E){if(E in e.props){m=!1;return}p=!0,b[E]=n[E]}),p&&(!r||m)&&e.setState((0,se.Z)((0,se.Z)({},b),a))}},e.scrollTo=function(n){e.listRef.current.scrollTo(n)},e}return(0,te.Z)(M,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var y=this.props.activeKey;y!==void 0&&y!==this.state.activeKey&&(this.setState({activeKey:y}),y!==null&&this.scrollTo({key:y}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var y,z=this.state,_=z.focused,n=z.flattenNodes,r=z.keyEntities,a=z.draggingNodeKey,p=z.activeKey,m=z.dropLevelOffset,b=z.dropContainerKey,E=z.dropTargetKey,T=z.dropPosition,R=z.dragOverNodeKey,$=z.indent,c=this.props,W=c.prefixCls,U=c.className,Z=c.style,H=c.showLine,X=c.focusable,de=c.tabIndex,ce=de===void 0?0:de,ee=c.selectable,he=c.showIcon,ue=c.icon,ve=c.switcherIcon,Ke=c.draggable,Oe=c.checkable,Te=c.checkStrictly,Le=c.disabled,be=c.motion,Ue=c.loadData,He=c.filterTreeNode,Xe=c.height,Ve=c.itemHeight,Je=c.virtual,Ge=c.titleRender,Ze=c.dropIndicatorRender,je=c.onContextMenu,Qe=c.onScroll,ze=c.direction,qe=c.rootClassName,Fe=c.rootStyle,et=(0,ne.Z)(this.props,{aria:!0,data:!0}),Re;return Ke&&((0,ge.Z)(Ke)==="object"?Re=Ke:typeof Ke=="function"?Re={nodeDraggable:Ke}:Re={}),g.createElement(j.k.Provider,{value:{prefixCls:W,selectable:ee,showIcon:he,icon:ue,switcherIcon:ve,draggable:Re,draggingNodeKey:a,checkable:Oe,checkStrictly:Te,disabled:Le,keyEntities:r,dropLevelOffset:m,dropContainerKey:b,dropTargetKey:E,dropPosition:T,dragOverNodeKey:R,indent:$,direction:ze,dropIndicatorRender:Ze,loadData:Ue,filterTreeNode:He,titleRender:Ge,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},g.createElement("div",{role:"tree",className:oe()(W,U,qe,(y={},(0,F.Z)(y,"".concat(W,"-show-line"),H),(0,F.Z)(y,"".concat(W,"-focused"),_),(0,F.Z)(y,"".concat(W,"-active-focused"),p!==null),y)),style:Fe},g.createElement(xe,(0,ie.Z)({ref:this.listRef,prefixCls:W,style:Z,data:n,disabled:Le,selectable:ee,checkable:!!Oe,motion:be,dragging:a!==null,height:Xe,itemHeight:Ve,virtual:Je,focusable:X,focused:_,tabIndex:ce,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:je,onScroll:Qe},this.getTreeNodeRequiredProps(),et))))}}],[{key:"getDerivedStateFromProps",value:function(y,z){var _=z.prevProps,n={prevProps:y};function r(X){return!_&&X in y||_&&_[X]!==y[X]}var a,p=z.fieldNames;if(r("fieldNames")&&(p=(0,i.w$)(y.fieldNames),n.fieldNames=p),r("treeData")?a=y.treeData:r("children")&&((0,Q.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=(0,i.zn)(y.children)),a){n.treeData=a;var m=(0,i.I8)(a,{fieldNames:p});n.keyEntities=(0,se.Z)((0,F.Z)({},K,re),m.keyEntities)}var b=n.keyEntities||z.keyEntities;if(r("expandedKeys")||_&&r("autoExpandParent"))n.expandedKeys=y.autoExpandParent||!_&&y.defaultExpandParent?(0,C.r7)(y.expandedKeys,b):y.expandedKeys;else if(!_&&y.defaultExpandAll){var E=(0,se.Z)({},b);delete E[K],n.expandedKeys=Object.keys(E).map(function(X){return E[X].key})}else!_&&y.defaultExpandedKeys&&(n.expandedKeys=y.autoExpandParent||y.defaultExpandParent?(0,C.r7)(y.defaultExpandedKeys,b):y.defaultExpandedKeys);if(n.expandedKeys||delete n.expandedKeys,a||n.expandedKeys){var T=(0,i.oH)(a||z.treeData,n.expandedKeys||z.expandedKeys,p);n.flattenNodes=T}if(y.selectable&&(r("selectedKeys")?n.selectedKeys=(0,C.BT)(y.selectedKeys,y):!_&&y.defaultSelectedKeys&&(n.selectedKeys=(0,C.BT)(y.defaultSelectedKeys,y))),y.checkable){var R;if(r("checkedKeys")?R=(0,C.E6)(y.checkedKeys)||{}:!_&&y.defaultCheckedKeys?R=(0,C.E6)(y.defaultCheckedKeys)||{}:a&&(R=(0,C.E6)(y.checkedKeys)||{checkedKeys:z.checkedKeys,halfCheckedKeys:z.halfCheckedKeys}),R){var $=R,c=$.checkedKeys,W=c===void 0?[]:c,U=$.halfCheckedKeys,Z=U===void 0?[]:U;if(!y.checkStrictly){var H=(0,De.S)(W,!0,b);W=H.checkedKeys,Z=H.halfCheckedKeys}n.checkedKeys=W,n.halfCheckedKeys=Z}}return r("loadedKeys")&&(n.loadedKeys=y.loadedKeys),n}}]),M}(g.Component);Pe.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:ke,allowDrop:function(){return!0},expandAction:!1},Pe.TreeNode=x.Z;var Se=Pe,pe=Se},10225:function($e,me,l){"use strict";l.d(me,{_5:function(){return te},L0:function(){return J},yx:function(){return Y},bt:function(){return O},Ds:function(){return g},wA:function(){return w},OM:function(){return ae},BT:function(){return oe},E6:function(){return i},r7:function(){return h}});var ie=l(85061),F=l(90484),ge=l(67294),se=l(80334),Ne=l(4258),Ce=null;function te(s,u){if(!s)return[];var f=s.slice(),L=f.indexOf(u);return L>=0&&f.splice(L,1),f}function J(s,u){var f=(s||[]).slice();return f.indexOf(u)===-1&&f.push(u),f}function Y(s){return s.split("-")}function O(s,u){return"".concat(s,"-").concat(u)}function g(s){return s&&s.type&&s.type.isTreeNode}function w(s,u){var f=[],L=u[s];function x(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];S.forEach(function(A){var t=A.key,D=A.children;f.push(t),x(D)})}return x(L.children),f}function Q(s){if(s.parent){var u=Y(s.pos);return Number(u[u.length-1])===s.parent.children.length-1}return!1}function ne(s){var u=Y(s.pos);return Number(u[u.length-1])===0}function ae(s,u,f,L,x,S,A,t,D,k){var I,d=s.clientX,o=s.clientY,N=s.target.getBoundingClientRect(),K=N.top,B=N.height,re=(k==="rtl"?-1:1)*(((x==null?void 0:x.x)||0)-d),V=(re-12)/L,G=t[f.props.eventKey];if(o<K+B/2){var q=A.findIndex(function(M){return M.key===G.key}),fe=q<=0?0:q-1,Ee=A[fe].key;G=t[Ee]}var xe=G.key,De=G,ke=G.key,ye=0,Pe=0;if(!D.includes(xe))for(var Se=0;Se<V&&Q(G);Se+=1)G=G.parent,Pe+=1;var pe=u.props.data,v=G.node,P=!0;return ne(G)&&G.level===0&&o<K+B/2&&S({dragNode:pe,dropNode:v,dropPosition:-1})&&G.key===f.props.eventKey?ye=-1:(De.children||[]).length&&D.includes(ke)?S({dragNode:pe,dropNode:v,dropPosition:0})?ye=0:P=!1:Pe===0?V>-1.5?S({dragNode:pe,dropNode:v,dropPosition:1})?ye=1:P=!1:S({dragNode:pe,dropNode:v,dropPosition:0})?ye=0:S({dragNode:pe,dropNode:v,dropPosition:1})?ye=1:P=!1:S({dragNode:pe,dropNode:v,dropPosition:1})?ye=1:P=!1,{dropPosition:ye,dropLevelOffset:Pe,dropTargetKey:G.key,dropTargetPos:G.pos,dragOverNodeKey:ke,dropContainerKey:ye===0?null:((I=G.parent)===null||I===void 0?void 0:I.key)||null,dropAllowed:P}}function oe(s,u){if(!!s){var f=u.multiple;return f?s.slice():s.length?[s[0]]:s}}var j=function(u){return u};function C(s,u){if(!s)return[];var f=u||{},L=f.processProps,x=L===void 0?j:L,S=Array.isArray(s)?s:[s];return S.map(function(A){var t=A.children,D=_objectWithoutProperties(A,Ce),k=C(t,u);return React.createElement(TreeNode,_extends({key:D.key},x(D)),k)})}function i(s){if(!s)return null;var u;if(Array.isArray(s))u={checkedKeys:s,halfCheckedKeys:void 0};else if((0,F.Z)(s)==="object")u={checkedKeys:s.checked||void 0,halfCheckedKeys:s.halfChecked||void 0};else return(0,se.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return u}function h(s,u){var f=new Set;function L(x){if(!f.has(x)){var S=u[x];if(!!S){f.add(x);var A=S.parent,t=S.node;t.disabled||A&&L(A.key)}}}return(s||[]).forEach(function(x){L(x)}),(0,ie.Z)(f)}},17341:function($e,me,l){"use strict";l.d(me,{S:function(){return Ce}});var ie=l(80334);function F(te,J){var Y=new Set;return te.forEach(function(O){J.has(O)||Y.add(O)}),Y}function ge(te){var J=te||{},Y=J.disabled,O=J.disableCheckbox,g=J.checkable;return!!(Y||O)||g===!1}function se(te,J,Y,O){for(var g=new Set(te),w=new Set,Q=0;Q<=Y;Q+=1){var ne=J.get(Q)||new Set;ne.forEach(function(C){var i=C.key,h=C.node,s=C.children,u=s===void 0?[]:s;g.has(i)&&!O(h)&&u.filter(function(f){return!O(f.node)}).forEach(function(f){g.add(f.key)})})}for(var ae=new Set,oe=Y;oe>=0;oe-=1){var j=J.get(oe)||new Set;j.forEach(function(C){var i=C.parent,h=C.node;if(!(O(h)||!C.parent||ae.has(C.parent.key))){if(O(C.parent.node)){ae.add(i.key);return}var s=!0,u=!1;(i.children||[]).filter(function(f){return!O(f.node)}).forEach(function(f){var L=f.key,x=g.has(L);s&&!x&&(s=!1),!u&&(x||w.has(L))&&(u=!0)}),s&&g.add(i.key),u&&w.add(i.key),ae.add(i.key)}})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(F(w,g))}}function Ne(te,J,Y,O,g){for(var w=new Set(te),Q=new Set(J),ne=0;ne<=O;ne+=1){var ae=Y.get(ne)||new Set;ae.forEach(function(i){var h=i.key,s=i.node,u=i.children,f=u===void 0?[]:u;!w.has(h)&&!Q.has(h)&&!g(s)&&f.filter(function(L){return!g(L.node)}).forEach(function(L){w.delete(L.key)})})}Q=new Set;for(var oe=new Set,j=O;j>=0;j-=1){var C=Y.get(j)||new Set;C.forEach(function(i){var h=i.parent,s=i.node;if(!(g(s)||!i.parent||oe.has(i.parent.key))){if(g(i.parent.node)){oe.add(h.key);return}var u=!0,f=!1;(h.children||[]).filter(function(L){return!g(L.node)}).forEach(function(L){var x=L.key,S=w.has(x);u&&!S&&(u=!1),!f&&(S||Q.has(x))&&(f=!0)}),u||w.delete(h.key),f&&Q.add(h.key),oe.add(h.key)}})}return{checkedKeys:Array.from(w),halfCheckedKeys:Array.from(F(Q,w))}}function Ce(te,J,Y,O){var g=[],w;O?w=O:w=ge;var Q=new Set(te.filter(function(j){var C=!!Y[j];return C||g.push(j),C})),ne=new Map,ae=0;Object.keys(Y).forEach(function(j){var C=Y[j],i=C.level,h=ne.get(i);h||(h=new Set,ne.set(i,h)),h.add(C),ae=Math.max(ae,i)}),(0,ie.ZP)(!g.length,"Tree missing follow keys: ".concat(g.slice(0,100).map(function(j){return"'".concat(j,"'")}).join(", ")));var oe;return J===!0?oe=se(Q,ne,ae,w):oe=Ne(Q,J.halfCheckedKeys,ne,ae,w),oe}},1089:function($e,me,l){"use strict";l.d(me,{km:function(){return O},w$:function(){return g},zn:function(){return Q},oH:function(){return ne},I8:function(){return oe},H8:function(){return j},F:function(){return C}});var ie=l(90484),F=l(85061),ge=l(28991),se=l(81253),Ne=l(98423),Ce=l(50344),te=l(80334),J=l(10225),Y=["children"];function O(i,h){return i!=null?i:h}function g(i){var h=i||{},s=h.title,u=h._title,f=h.key,L=h.children,x=s||"title";return{title:x,_title:u||[x],key:f||"key",children:L||"children"}}function w(i,h){var s=new Map;function u(f){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(f||[]).forEach(function(x){var S=x[h.key],A=x[h.children];warning(S!=null,"Tree node must have a certain key: [".concat(L).concat(S,"]"));var t=String(S);warning(!s.has(t)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(t)),s.set(t,!0),u(A,"".concat(L).concat(t," > "))})}u(i)}function Q(i){function h(s){var u=(0,Ce.Z)(s);return u.map(function(f){if(!(0,J.Ds)(f))return(0,te.ZP)(!f,"Tree/TreeNode can only accept TreeNode as children."),null;var L=f.key,x=f.props,S=x.children,A=(0,se.Z)(x,Y),t=(0,ge.Z)({key:L},A),D=h(S);return D.length&&(t.children=D),t}).filter(function(f){return f})}return h(i)}function ne(i,h,s){var u=g(s),f=u._title,L=u.key,x=u.children,S=new Set(h===!0?[]:h),A=[];function t(D){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return D.map(function(I,d){for(var o=(0,J.bt)(k?k.pos:"0",d),N=O(I[L],o),K,B=0;B<f.length;B+=1){var re=f[B];if(I[re]!==void 0){K=I[re];break}}var V=(0,ge.Z)((0,ge.Z)({},(0,Ne.Z)(I,[].concat((0,F.Z)(f),[L,x]))),{},{title:K,key:N,parent:k,pos:o,children:null,data:I,isStart:[].concat((0,F.Z)(k?k.isStart:[]),[d===0]),isEnd:[].concat((0,F.Z)(k?k.isEnd:[]),[d===D.length-1])});return A.push(V),h===!0||S.has(N)?V.children=t(I[x]||[],V):V.children=[],V})}return t(i),A}function ae(i,h,s){var u={};(0,ie.Z)(s)==="object"?u=s:u={externalGetKey:s},u=u||{};var f=u,L=f.childrenPropName,x=f.externalGetKey,S=f.fieldNames,A=g(S),t=A.key,D=A.children,k=L||D,I;x?typeof x=="string"?I=function(N){return N[x]}:typeof x=="function"&&(I=function(N){return x(N)}):I=function(N,K){return O(N[t],K)};function d(o,N,K,B){var re=o?o[k]:i,V=o?(0,J.bt)(K.pos,N):"0",G=o?[].concat((0,F.Z)(B),[o]):[];if(o){var q=I(o,V),fe={node:o,index:N,pos:V,key:q,parentPos:K.node?K.pos:null,level:K.level+1,nodes:G};h(fe)}re&&re.forEach(function(Ee,xe){d(Ee,xe,{node:o,pos:V,level:K?K.level+1:-1},G)})}d(null)}function oe(i){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=h.initWrapper,u=h.processEntity,f=h.onProcessFinished,L=h.externalGetKey,x=h.childrenPropName,S=h.fieldNames,A=arguments.length>2?arguments[2]:void 0,t=L||A,D={},k={},I={posEntities:D,keyEntities:k};return s&&(I=s(I)||I),ae(i,function(d){var o=d.node,N=d.index,K=d.pos,B=d.key,re=d.parentPos,V=d.level,G=d.nodes,q={node:o,nodes:G,index:N,key:B,pos:K,level:V},fe=O(B,K);D[K]=q,k[fe]=q,q.parent=D[re],q.parent&&(q.parent.children=q.parent.children||[],q.parent.children.push(q)),u&&u(q,I)},{externalGetKey:t,childrenPropName:x,fieldNames:S}),f&&f(I),I}function j(i,h){var s=h.expandedKeys,u=h.selectedKeys,f=h.loadedKeys,L=h.loadingKeys,x=h.checkedKeys,S=h.halfCheckedKeys,A=h.dragOverNodeKey,t=h.dropPosition,D=h.keyEntities,k=D[i],I={eventKey:i,expanded:s.indexOf(i)!==-1,selected:u.indexOf(i)!==-1,loaded:f.indexOf(i)!==-1,loading:L.indexOf(i)!==-1,checked:x.indexOf(i)!==-1,halfChecked:S.indexOf(i)!==-1,pos:String(k?k.pos:""),dragOver:A===i&&t===0,dragOverGapTop:A===i&&t===-1,dragOverGapBottom:A===i&&t===1};return I}function C(i){var h=i.data,s=i.expanded,u=i.selected,f=i.checked,L=i.loaded,x=i.loading,S=i.halfChecked,A=i.dragOver,t=i.dragOverGapTop,D=i.dragOverGapBottom,k=i.pos,I=i.active,d=i.eventKey,o=(0,ge.Z)((0,ge.Z)({},h),{},{expanded:s,selected:u,checked:f,loaded:L,loading:x,halfChecked:S,dragOver:A,dragOverGapTop:t,dragOverGapBottom:D,pos:k,active:I,key:d});return"props"in o||Object.defineProperty(o,"props",{get:function(){return(0,te.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),o}}}]);