"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2362],{63185:function(Ie,me,l){l.d(me,{C2:function(){return Z}});var F=l(11568),O=l(14747),Q=l(83262),xe=l(83559);const De=o=>{const{checkboxCls:K}=o,B=`${K}-wrapper`;return[{[`${K}-group`]:Object.assign(Object.assign({},(0,O.Wf)(o)),{display:"inline-flex",flexWrap:"wrap",columnGap:o.marginXS,[`> ${o.antCls}-row`]:{flex:1}}),[B]:Object.assign(Object.assign({},(0,O.Wf)(o)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${B}`]:{marginInlineStart:0},[`&${B}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[K]:Object.assign(Object.assign({},(0,O.Wf)(o)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:o.borderRadiusSM,alignSelf:"center",[`${K}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${K}-inner`]:(0,O.oN)(o)},[`${K}-inner`]:{boxSizing:"border-box",display:"block",width:o.checkboxSize,height:o.checkboxSize,direction:"ltr",backgroundColor:o.colorBgContainer,border:`${(0,F.bf)(o.lineWidth)} ${o.lineType} ${o.colorBorder}`,borderRadius:o.borderRadiusSM,borderCollapse:"separate",transition:`all ${o.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:o.calc(o.checkboxSize).div(14).mul(5).equal(),height:o.calc(o.checkboxSize).div(14).mul(8).equal(),border:`${(0,F.bf)(o.lineWidthBold)} solid ${o.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${o.motionDurationFast} ${o.motionEaseInBack}, opacity ${o.motionDurationFast}`}},"& + span":{paddingInlineStart:o.paddingXS,paddingInlineEnd:o.paddingXS}})},{[`
${B}:not(${B}-disabled),
${K}:not(${K}-disabled)
`]:{[`&:hover ${K}-inner`]:{borderColor:o.colorPrimary}},[`${B}:not(${B}-disabled)`]:{[`&:hover ${K}-checked:not(${K}-disabled) ${K}-inner`]:{backgroundColor:o.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${K}-checked:not(${K}-disabled):after`]:{borderColor:o.colorPrimaryHover}}},{[`${K}-checked`]:{[`${K}-inner`]:{backgroundColor:o.colorPrimary,borderColor:o.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${o.motionDurationMid} ${o.motionEaseOutBack} ${o.motionDurationFast}`}}},[`
${B}-checked:not(${B}-disabled),
${K}-checked:not(${K}-disabled)
`]:{[`&:hover ${K}-inner`]:{backgroundColor:o.colorPrimaryHover,borderColor:"transparent"}}},{[K]:{"&-indeterminate":{"&":{[`${K}-inner`]:{backgroundColor:`${o.colorBgContainer}`,borderColor:`${o.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:o.calc(o.fontSizeLG).div(2).equal(),height:o.calc(o.fontSizeLG).div(2).equal(),backgroundColor:o.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${K}-inner`]:{backgroundColor:`${o.colorBgContainer}`,borderColor:`${o.colorPrimary}`}}}}},{[`${B}-disabled`]:{cursor:"not-allowed"},[`${K}-disabled`]:{[`&, ${K}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${K}-inner`]:{background:o.colorBgContainerDisabled,borderColor:o.colorBorder,"&:after":{borderColor:o.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:o.colorTextDisabled},[`&${K}-indeterminate ${K}-inner::after`]:{background:o.colorTextDisabled}}}]};function Z(o,K){const B=(0,Q.IX)(K,{checkboxCls:`.${o}`,checkboxSize:K.controlInteractiveSize});return De(B)}me.ZP=(0,xe.I$)("Checkbox",(o,{prefixCls:K})=>[Z(K,o)])},40561:function(Ie,me,l){l.d(me,{ZP:function(){return ie},Yk:function(){return H},TM:function(){return _}});var F=l(11568),O=l(63185),Q=l(14747),xe=l(33507),De=l(83262),Z=l(83559);const o=({treeCls:s,treeNodeCls:c,directoryNodeSelectedBg:y,directoryNodeSelectedColor:k,motionDurationMid:I,borderRadius:n,controlItemBgHover:t})=>({[`${s}${s}-directory ${c}`]:{[`${s}-node-content-wrapper`]:{position:"static",[`&:has(${s}-drop-indicator)`]:{position:"relative"},[`> *:not(${s}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${I}`,content:'""',borderRadius:n},"&:hover:before":{background:t}},[`${s}-switcher, ${s}-checkbox, ${s}-draggable-icon`]:{zIndex:1},"&-selected":{background:y,borderRadius:n,[`${s}-switcher, ${s}-draggable-icon`]:{color:k},[`${s}-node-content-wrapper`]:{color:k,background:"transparent","&, &:hover":{color:k},"&:before, &:hover:before":{background:y}}}}}),K=new F.E4("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),B=(s,c)=>({[`.${s}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${c.motionDurationSlow}`}}}),v=(s,c)=>({[`.${s}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:c.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${(0,F.bf)(c.lineWidthBold)} solid ${c.colorPrimary}`,borderRadius:"50%",content:'""'}}}),re=(s,c)=>{const{treeCls:y,treeNodeCls:k,treeNodePadding:I,titleHeight:n,indentSize:t,nodeSelectedBg:g,nodeHoverBg:p,colorTextQuaternary:m,controlItemBgActiveDisabled:N}=c;return{[y]:Object.assign(Object.assign({},(0,Q.Wf)(c)),{"--rc-virtual-list-scrollbar-bg":c.colorSplit,background:c.colorBgContainer,borderRadius:c.borderRadius,transition:`background-color ${c.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${y}-rtl ${y}-switcher_close ${y}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${y}-active-focused)`]:(0,Q.oN)(c),[`${y}-list-holder-inner`]:{alignItems:"flex-start"},[`&${y}-block-node`]:{[`${y}-list-holder-inner`]:{alignItems:"stretch",[`${y}-node-content-wrapper`]:{flex:"auto"},[`${k}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${c.colorPrimary}`,opacity:0,animationName:K,animationDuration:c.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:c.borderRadius}}},[k]:{display:"flex",alignItems:"flex-start",marginBottom:I,lineHeight:(0,F.bf)(n),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:I},[`&-disabled ${y}-node-content-wrapper`]:{color:c.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${y}-checkbox-disabled + ${y}-node-selected,&${k}-disabled${k}-selected ${y}-node-content-wrapper`]:{backgroundColor:N},[`${y}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${k}-disabled)`]:{[`${y}-node-content-wrapper`]:{"&:hover":{color:c.nodeHoverColor}}},[`&-active ${y}-node-content-wrapper`]:{background:c.controlItemBgHover},[`&:not(${k}-disabled).filter-node ${y}-title`]:{color:c.colorPrimary,fontWeight:c.fontWeightStrong},"&-draggable":{cursor:"grab",[`${y}-draggable-icon`]:{flexShrink:0,width:n,textAlign:"center",visibility:"visible",color:m},[`&${k}-disabled ${y}-draggable-icon`]:{visibility:"hidden"}}},[`${y}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:t}},[`${y}-draggable-icon`]:{visibility:"hidden"},[`${y}-switcher, ${y}-checkbox`]:{marginInlineEnd:c.calc(c.calc(n).sub(c.controlInteractiveSize)).div(2).equal()},[`${y}-switcher`]:Object.assign(Object.assign({},B(s,c)),{position:"relative",flex:"none",alignSelf:"stretch",width:n,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${c.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:n,height:n,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:c.borderRadius,transition:`all ${c.motionDurationSlow}`},[`&:not(${y}-switcher-noop):hover:before`]:{backgroundColor:c.colorBgTextHover},[`&_close ${y}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:c.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:c.calc(n).div(2).equal(),bottom:c.calc(I).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${c.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:c.calc(c.calc(n).div(2).equal()).mul(.8).equal(),height:c.calc(n).div(2).equal(),borderBottom:`1px solid ${c.colorBorder}`,content:'""'}}}),[`${y}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:n,paddingBlock:0,paddingInline:c.paddingXS,background:"transparent",borderRadius:c.borderRadius,cursor:"pointer",transition:`all ${c.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},v(s,c)),{"&:hover":{backgroundColor:p},[`&${y}-node-selected`]:{color:c.nodeSelectedColor,backgroundColor:g},[`${y}-iconEle`]:{display:"inline-block",width:n,height:n,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${y}-unselectable ${y}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${k}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${c.colorPrimary}`},"&-show-line":{[`${y}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:c.calc(n).div(2).equal(),bottom:c.calc(I).mul(-1).equal(),borderInlineEnd:`1px solid ${c.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${y}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${k}-leaf-last ${y}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${(0,F.bf)(c.calc(n).div(2).equal())} !important`}})}},H=(s,c,y=!0)=>{const k=`.${s}`,I=`${k}-treenode`,n=c.calc(c.paddingXS).div(2).equal(),t=(0,De.IX)(c,{treeCls:k,treeNodeCls:I,treeNodePadding:n});return[re(s,t),y&&o(t)].filter(Boolean)},_=s=>{const{controlHeightSM:c,controlItemBgHover:y,controlItemBgActive:k}=s,I=c;return{titleHeight:I,indentSize:I,nodeHoverBg:y,nodeHoverColor:s.colorText,nodeSelectedBg:k,nodeSelectedColor:s.colorText}},W=s=>{const{colorTextLightSolid:c,colorPrimary:y}=s;return Object.assign(Object.assign({},_(s)),{directoryNodeSelectedColor:c,directoryNodeSelectedBg:y})};var ie=(0,Z.I$)("Tree",(s,{prefixCls:c})=>[{[s.componentCls]:(0,O.C2)(`${c}-checkbox`,s)},H(c,s),(0,xe.Z)(s)],W)},61639:function(Ie,me,l){var F=l(67294),O=l(68265),Q=l(26911),xe=l(50888),De=l(28638),Z=l(13982),o=l(93967),K=l.n(o),B=l(96159);const v=re=>{var H,_;const{prefixCls:W,switcherIcon:ie,treeNodeProps:s,showLine:c,switcherLoadingIcon:y}=re,{isLeaf:k,expanded:I,loading:n}=s;if(n)return F.isValidElement(y)?y:F.createElement(xe.Z,{className:`${W}-switcher-loading-icon`});let t;if(c&&typeof c=="object"&&(t=c.showLeafIcon),k){if(!c)return null;if(typeof t!="boolean"&&t){const m=typeof t=="function"?t(s):t,N=`${W}-switcher-line-custom-icon`;return F.isValidElement(m)?(0,B.Tm)(m,{className:K()((H=m.props)===null||H===void 0?void 0:H.className,N)}):m}return t?F.createElement(Q.Z,{className:`${W}-switcher-line-icon`}):F.createElement("span",{className:`${W}-switcher-leaf-line`})}const g=`${W}-switcher-icon`,p=typeof ie=="function"?ie(s):ie;return F.isValidElement(p)?(0,B.Tm)(p,{className:K()((_=p.props)===null||_===void 0?void 0:_.className,g)}):p!==void 0?p:c?I?F.createElement(De.Z,{className:`${W}-switcher-line-icon`}):F.createElement(Z.Z,{className:`${W}-switcher-line-icon`}):F.createElement(O.Z,{className:g})};me.Z=v},86128:function(Ie,me,l){l.d(me,{Z:function(){return I}});var F=l(87462),O=l(4942),Q=l(1413),xe=l(97685),De=l(91),Z=l(67294),o=l(93967),K=l.n(o),B=l(64217),v=l(27822),re=function(t){for(var g=t.prefixCls,p=t.level,m=t.isStart,N=t.isEnd,M="".concat(g,"-indent-unit"),z=[],D=0;D
0&&arguments[0]!==void 0?arguments[0]:[],ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],G=u.length,e=ee.length;if(Math.abs(G-e)!==1)return{add:!1,key:null};function E($,X){var r=new Map;$.forEach(function(a){r.set(a,!0)});var d=X.filter(function(a){return!r.has(a)});return d.length===1?d[0]:null}return G ").concat(ee);return ee}var We=s.forwardRef(function(u,ee){var G=u.prefixCls,e=u.data,E=u.selectable,$=u.checkable,X=u.expandedKeys,r=u.selectedKeys,d=u.checkedKeys,a=u.loadedKeys,f=u.loadingKeys,b=u.halfCheckedKeys,P=u.keyEntities,S=u.disabled,T=u.dragging,U=u.dragOverNodeKey,h=u.dropPosition,C=u.motion,A=u.height,L=u.itemHeight,w=u.virtual,te=u.scrollWidth,Y=u.focusable,j=u.activeItem,ne=u.focused,ge=u.tabIndex,Ee=u.onKeyDown,ye=u.onFocus,Ke=u.onBlur,Se=u.onActiveChange,Ce=u.onListChangeStart,Ze=u.onListChangeEnd,Ue=(0,t.Z)(u,V),Re=s.useRef(null),J=s.useRef(null);s.useImperativeHandle(ee,function(){return{scrollTo:function(_e){Re.current.scrollTo(_e)},getIndentWidth:function(){return J.current.offsetWidth}}});var x=s.useState(X),Ne=(0,n.Z)(x,2),Fe=Ne[0],Ae=Ne[1],Be=s.useState(e),Qe=(0,n.Z)(Be,2),He=Qe[0],Je=Qe[1],rt=s.useState(e),qe=(0,n.Z)(rt,2),at=qe[0],ze=qe[1],Ge=s.useState([]),et=(0,n.Z)(Ge,2),ft=et[0],ot=et[1],vt=s.useState(null),st=(0,n.Z)(vt,2),gt=st[0],it=st[1],ct=s.useRef(e);ct.current=e;function dt(){var pe=ct.current;Je(pe),ze(pe),ot([]),it(null),Ze()}(0,g.Z)(function(){Ae(X);var pe=ae(Fe,X);if(pe.key!==null)if(pe.add){var _e=He.findIndex(function(Ve){var Ye=Ve.key;return Ye===pe.key}),je=ve(le(He,e,pe.key),w,A,L),tt=He.slice();tt.splice(_e+1,0,Pe),ze(tt),ot(je),it("show")}else{var Xe=e.findIndex(function(Ve){var Ye=Ve.key;return Ye===pe.key}),lt=ve(le(e,He,pe.key),w,A,L),nt=e.slice();nt.splice(Xe+1,0,Pe),ze(nt),ot(lt),it("hide")}else He!==e&&(Je(e),ze(e))},[X,e]),s.useEffect(function(){T||dt()},[T]);var ht=C?at:e,ut={expandedKeys:X,selectedKeys:r,loadedKeys:a,loadingKeys:f,checkedKeys:d,halfCheckedKeys:b,dragOverNodeKey:U,dropPosition:h,keyEntities:P};return s.createElement(s.Fragment,null,ne&&j&&s.createElement("span",{style:fe,"aria-live":"assertive"},ke(j)),s.createElement("div",null,s.createElement("input",{style:fe,disabled:Y===!1||S,tabIndex:Y!==!1?ge:null,onKeyDown:Ee,onFocus:ye,onBlur:Ke,value:"",onChange:se,"aria-label":"for screen reader"})),s.createElement("div",{className:"".concat(G,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},s.createElement("div",{className:"".concat(G,"-indent")},s.createElement("div",{ref:J,className:"".concat(G,"-indent-unit")}))),s.createElement(p.Z,(0,F.Z)({},Ue,{data:ht,itemKey:Le,height:A,fullHeight:!1,virtual:w,itemHeight:L,scrollWidth:te,prefixCls:"".concat(G,"-list"),ref:Re,role:"tree",onVisibleChange:function(_e){_e.every(function(je){return Le(je)!==ce})&&dt()}}),function(pe){var _e=pe.pos,je=Object.assign({},(I(pe.data),pe.data)),tt=pe.title,Xe=pe.key,lt=pe.isStart,nt=pe.isEnd,Ve=(0,D.km)(Xe,_e);delete je.key,delete je.children;var Ye=(0,D.H8)(Ve,ut);return s.createElement(de,(0,F.Z)({},je,Ye,{title:tt,active:!!j&&Xe===j.key,pos:_e,data:pe.data,isStart:lt,isEnd:nt,motion:C,motionNodes:Xe===ce?ft:null,motionType:gt,onMotionStart:Ce,onMotionEnd:dt,treeNodeRequiredProps:ut,onMouseMove:function(){Se(null)}}))}))}),i=We,R=l(10225),we=l(17341),$e=l(35381),Te=10,Oe=function(u){(0,K.Z)(G,u);var ee=(0,B.Z)(G);function G(){var e;(0,De.Z)(this,G);for(var E=arguments.length,$=new Array(E),X=0;X2&&arguments[2]!==void 0?arguments[2]:!1,b=e.state,P=b.dragChildrenKeys,S=b.dropPosition,T=b.dropTargetKey,U=b.dropTargetPos,h=b.dropAllowed;if(h){var C=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),T!==null){var A=(0,Q.Z)((0,Q.Z)({},(0,D.H8)(T,e.getTreeNodeRequiredProps())),{},{active:((a=e.getActiveItem())===null||a===void 0?void 0:a.key)===T,data:(0,$e.Z)(e.state.keyEntities,T).node}),L=P.includes(T);(0,ie.ZP)(!L,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var w=(0,R.yx)(U),te={event:r,node:(0,D.F)(A),dragNode:e.dragNodeProps?(0,D.F)(e.dragNodeProps):null,dragNodesKeys:[e.dragNodeProps.eventKey].concat(P),dropToGap:S!==0,dropPosition:S+Number(w[w.length-1])};f||C==null||C(te),e.dragNodeProps=null}}}),(0,v.Z)((0,o.Z)(e),"cleanDragState",function(){var r=e.state.draggingNodeKey;r!==null&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null}),(0,v.Z)((0,o.Z)(e),"triggerExpandActionExpand",function(r,d){var a=e.state,f=a.expandedKeys,b=a.flattenNodes,P=d.expanded,S=d.key,T=d.isLeaf;if(!(T||r.shiftKey||r.metaKey||r.ctrlKey)){var U=b.filter(function(C){return C.key===S})[0],h=(0,D.F)((0,Q.Z)((0,Q.Z)({},(0,D.H8)(S,e.getTreeNodeRequiredProps())),{},{data:U.data}));e.setExpandedKeys(P?(0,R._5)(f,S):(0,R.L0)(f,S)),e.onNodeExpand(r,h)}}),(0,v.Z)((0,o.Z)(e),"onNodeClick",function(r,d){var a=e.props,f=a.onClick,b=a.expandAction;b==="click"&&e.triggerExpandActionExpand(r,d),f==null||f(r,d)}),(0,v.Z)((0,o.Z)(e),"onNodeDoubleClick",function(r,d){var a=e.props,f=a.onDoubleClick,b=a.expandAction;b==="doubleClick"&&e.triggerExpandActionExpand(r,d),f==null||f(r,d)}),(0,v.Z)((0,o.Z)(e),"onNodeSelect",function(r,d){var a=e.state.selectedKeys,f=e.state,b=f.keyEntities,P=f.fieldNames,S=e.props,T=S.onSelect,U=S.multiple,h=d.selected,C=d[P.key],A=!h;A?U?a=(0,R.L0)(a,C):a=[C]:a=(0,R._5)(a,C);var L=a.map(function(w){var te=(0,$e.Z)(b,w);return te?te.node:null}).filter(Boolean);e.setUncontrolledState({selectedKeys:a}),T==null||T(a,{event:"select",selected:A,node:d,selectedNodes:L,nativeEvent:r.nativeEvent})}),(0,v.Z)((0,o.Z)(e),"onNodeCheck",function(r,d,a){var f=e.state,b=f.keyEntities,P=f.checkedKeys,S=f.halfCheckedKeys,T=e.props,U=T.checkStrictly,h=T.onCheck,C=d.key,A,L={event:"check",node:d,checked:a,nativeEvent:r.nativeEvent};if(U){var w=a?(0,R.L0)(P,C):(0,R._5)(P,C),te=(0,R._5)(S,C);A={checked:w,halfChecked:te},L.checkedNodes=w.map(function(ye){return(0,$e.Z)(b,ye)}).filter(Boolean).map(function(ye){return ye.node}),e.setUncontrolledState({checkedKeys:w})}else{var Y=(0,we.S)([].concat((0,xe.Z)(P),[C]),!0,b),j=Y.checkedKeys,ne=Y.halfCheckedKeys;if(!a){var ge=new Set(j);ge.delete(C);var Ee=(0,we.S)(Array.from(ge),{checked:!1,halfCheckedKeys:ne},b);j=Ee.checkedKeys,ne=Ee.halfCheckedKeys}A=j,L.checkedNodes=[],L.checkedNodesPositions=[],L.halfCheckedKeys=ne,j.forEach(function(ye){var Ke=(0,$e.Z)(b,ye);if(Ke){var Se=Ke.node,Ce=Ke.pos;L.checkedNodes.push(Se),L.checkedNodesPositions.push({node:Se,pos:Ce})}}),e.setUncontrolledState({checkedKeys:j},!1,{halfCheckedKeys:ne})}h==null||h(A,L)}),(0,v.Z)((0,o.Z)(e),"onNodeLoad",function(r){var d,a=r.key,f=e.state.keyEntities,b=(0,$e.Z)(f,a);if(!(b!=null&&(d=b.children)!==null&&d!==void 0&&d.length)){var P=new Promise(function(S,T){e.setState(function(U){var h=U.loadedKeys,C=h===void 0?[]:h,A=U.loadingKeys,L=A===void 0?[]:A,w=e.props,te=w.loadData,Y=w.onLoad;if(!te||C.includes(a)||L.includes(a))return null;var j=te(r);return j.then(function(){var ne=e.state.loadedKeys,ge=(0,R.L0)(ne,a);Y==null||Y(ge,{event:"load",node:r}),e.setUncontrolledState({loadedKeys:ge}),e.setState(function(Ee){return{loadingKeys:(0,R._5)(Ee.loadingKeys,a)}}),S()}).catch(function(ne){if(e.setState(function(Ee){return{loadingKeys:(0,R._5)(Ee.loadingKeys,a)}}),e.loadingRetryTimes[a]=(e.loadingRetryTimes[a]||0)+1,e.loadingRetryTimes[a]>=Te){var ge=e.state.loadedKeys;(0,ie.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:(0,R.L0)(ge,a)}),S()}T(ne)}),{loadingKeys:(0,R.L0)(L,a)}})});return P.catch(function(){}),P}}),(0,v.Z)((0,o.Z)(e),"onNodeMouseEnter",function(r,d){var a=e.props.onMouseEnter;a==null||a({event:r,node:d})}),(0,v.Z)((0,o.Z)(e),"onNodeMouseLeave",function(r,d){var a=e.props.onMouseLeave;a==null||a({event:r,node:d})}),(0,v.Z)((0,o.Z)(e),"onNodeContextMenu",function(r,d){var a=e.props.onRightClick;a&&(r.preventDefault(),a({event:r,node:d}))}),(0,v.Z)((0,o.Z)(e),"onFocus",function(){var r=e.props.onFocus;e.setState({focused:!0});for(var d=arguments.length,a=new Array(d),f=0;f1&&arguments[1]!==void 0?arguments[1]:!1,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!e.destroyed){var f=!1,b=!0,P={};Object.keys(r).forEach(function(S){if(e.props.hasOwnProperty(S)){b=!1;return}f=!0,P[S]=r[S]}),f&&(!d||b)&&e.setState((0,Q.Z)((0,Q.Z)({},P),a))}}),(0,v.Z)((0,o.Z)(e),"scrollTo",function(r){e.listRef.current.scrollTo(r)}),e}return(0,Z.Z)(G,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var E=this.props,$=E.activeKey,X=E.itemScrollOffset,r=X===void 0?0:X;$!==void 0&&$!==this.state.activeKey&&(this.setState({activeKey:$}),$!==null&&this.scrollTo({key:$,offset:r}))}},{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 E=this.state,$=E.focused,X=E.flattenNodes,r=E.keyEntities,d=E.draggingNodeKey,a=E.activeKey,f=E.dropLevelOffset,b=E.dropContainerKey,P=E.dropTargetKey,S=E.dropPosition,T=E.dragOverNodeKey,U=E.indent,h=this.props,C=h.prefixCls,A=h.className,L=h.style,w=h.showLine,te=h.focusable,Y=h.tabIndex,j=Y===void 0?0:Y,ne=h.selectable,ge=h.showIcon,Ee=h.icon,ye=h.switcherIcon,Ke=h.draggable,Se=h.checkable,Ce=h.checkStrictly,Ze=h.disabled,Ue=h.motion,Re=h.loadData,J=h.filterTreeNode,x=h.height,Ne=h.itemHeight,Fe=h.scrollWidth,Ae=h.virtual,Be=h.titleRender,Qe=h.dropIndicatorRender,He=h.onContextMenu,Je=h.onScroll,rt=h.direction,qe=h.rootClassName,at=h.rootStyle,ze=(0,W.Z)(this.props,{aria:!0,data:!0}),Ge;Ke&&((0,O.Z)(Ke)==="object"?Ge=Ke:typeof Ke=="function"?Ge={nodeDraggable:Ke}:Ge={});var et={prefixCls:C,selectable:ne,showIcon:ge,icon:Ee,switcherIcon:ye,draggable:Ge,draggingNodeKey:d,checkable:Se,checkStrictly:Ce,disabled:Ze,keyEntities:r,dropLevelOffset:f,dropContainerKey:b,dropTargetKey:P,dropPosition:S,dragOverNodeKey:T,indent:U,direction:rt,dropIndicatorRender:Qe,loadData:Re,filterTreeNode:J,titleRender:Be,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};return s.createElement(c.k.Provider,{value:et},s.createElement("div",{className:H()(C,A,qe,(0,v.Z)((0,v.Z)((0,v.Z)({},"".concat(C,"-show-line"),w),"".concat(C,"-focused"),$),"".concat(C,"-active-focused"),a!==null)),style:at},s.createElement(i,(0,F.Z)({ref:this.listRef,prefixCls:C,style:L,data:X,disabled:Ze,selectable:ne,checkable:!!Se,motion:Ue,dragging:d!==null,height:x,itemHeight:Ne,virtual:Ae,focusable:te,focused:$,tabIndex:j,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:He,onScroll:Je,scrollWidth:Fe},this.getTreeNodeRequiredProps(),ze))))}}],[{key:"getDerivedStateFromProps",value:function(E,$){var X=$.prevProps,r={prevProps:E};function d(j){return!X&&E.hasOwnProperty(j)||X&&X[j]!==E[j]}var a,f=$.fieldNames;if(d("fieldNames")&&(f=(0,D.w$)(E.fieldNames),r.fieldNames=f),d("treeData")?a=E.treeData:d("children")&&((0,ie.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=(0,D.zn)(E.children)),a){r.treeData=a;var b=(0,D.I8)(a,{fieldNames:f});r.keyEntities=(0,Q.Z)((0,v.Z)({},ce,q),b.keyEntities)}var P=r.keyEntities||$.keyEntities;if(d("expandedKeys")||X&&d("autoExpandParent"))r.expandedKeys=E.autoExpandParent||!X&&E.defaultExpandParent?(0,R.r7)(E.expandedKeys,P):E.expandedKeys;else if(!X&&E.defaultExpandAll){var S=(0,Q.Z)({},P);delete S[ce];var T=[];Object.keys(S).forEach(function(j){var ne=S[j];ne.children&&ne.children.length&&T.push(ne.key)}),r.expandedKeys=T}else!X&&E.defaultExpandedKeys&&(r.expandedKeys=E.autoExpandParent||E.defaultExpandParent?(0,R.r7)(E.defaultExpandedKeys,P):E.defaultExpandedKeys);if(r.expandedKeys||delete r.expandedKeys,a||r.expandedKeys){var U=(0,D.oH)(a||$.treeData,r.expandedKeys||$.expandedKeys,f);r.flattenNodes=U}if(E.selectable&&(d("selectedKeys")?r.selectedKeys=(0,R.BT)(E.selectedKeys,E):!X&&E.defaultSelectedKeys&&(r.selectedKeys=(0,R.BT)(E.defaultSelectedKeys,E))),E.checkable){var h;if(d("checkedKeys")?h=(0,R.E6)(E.checkedKeys)||{}:!X&&E.defaultCheckedKeys?h=(0,R.E6)(E.defaultCheckedKeys)||{}:a&&(h=(0,R.E6)(E.checkedKeys)||{checkedKeys:$.checkedKeys,halfCheckedKeys:$.halfCheckedKeys}),h){var C=h,A=C.checkedKeys,L=A===void 0?[]:A,w=C.halfCheckedKeys,te=w===void 0?[]:w;if(!E.checkStrictly){var Y=(0,we.S)(L,!0,P);L=Y.checkedKeys,te=Y.halfCheckedKeys}r.checkedKeys=L,r.halfCheckedKeys=te}}return d("loadedKeys")&&(r.loadedKeys=E.loadedKeys),r}}]),G}(s.Component);(0,v.Z)(Oe,"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:k,allowDrop:function(){return!0},expandAction:!1}),(0,v.Z)(Oe,"TreeNode",N.Z);var Me=Oe,be=Me},10225:function(Ie,me,l){l.d(me,{BT:function(){return s},E6:function(){return k},L0:function(){return v},OM:function(){return ie},_5:function(){return B},r7:function(){return I},wA:function(){return H},yx:function(){return re}});var F=l(74902),O=l(71002),Q=l(80334),xe=l(67294),De=l(86128),Z=l(35381),o=l(1089),K=null;function B(n,t){if(!n)return[];var g=n.slice(),p=g.indexOf(t);return p>=0&&g.splice(p,1),g}function v(n,t){var g=(n||[]).slice();return g.indexOf(t)===-1&&g.push(t),g}function re(n){return n.split("-")}function H(n,t){var g=[],p=(0,Z.Z)(t,n);function m(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];N.forEach(function(M){var z=M.key,D=M.children;g.push(z),m(D)})}return m(p.children),g}function _(n){if(n.parent){var t=re(n.pos);return Number(t[t.length-1])===n.parent.children.length-1}return!1}function W(n){var t=re(n.pos);return Number(t[t.length-1])===0}function ie(n,t,g,p,m,N,M,z,D,oe){var ue,de=n.clientX,ae=n.clientY,le=n.target.getBoundingClientRect(),V=le.top,fe=le.height,se=(oe==="rtl"?-1:1)*(((m==null?void 0:m.x)||0)-de),ce=(se-12)/p,he=D.filter(function(be){var u;return(u=z[be])===null||u===void 0||(u=u.children)===null||u===void 0?void 0:u.length}),q=(0,Z.Z)(z,g.eventKey);if(ae-1.5?N({dragNode:Te,dropNode:Oe,dropPosition:1})?R=1:Me=!1:N({dragNode:Te,dropNode:Oe,dropPosition:0})?R=0:N({dragNode:Te,dropNode:Oe,dropPosition:1})?R=1:Me=!1:N({dragNode:Te,dropNode:Oe,dropPosition:1})?R=1:Me=!1,{dropPosition:R,dropLevelOffset:we,dropTargetKey:q.key,dropTargetPos:q.pos,dragOverNodeKey:i,dropContainerKey:R===0?null:((ue=q.parent)===null||ue===void 0?void 0:ue.key)||null,dropAllowed:Me}}function s(n,t){if(n){var g=t.multiple;return g?n.slice():n.length?[n[0]]:n}}var c=function(t){return t};function y(n,t){if(!n)return[];var g=t||{},p=g.processProps,m=p===void 0?c:p,N=Array.isArray(n)?n:[n];return N.map(function(M){var z=M.children,D=_objectWithoutProperties(M,K),oe=y(z,t);return React.createElement(TreeNode,_extends({key:D.key},m(D)),oe)})}function k(n){if(!n)return null;var t;if(Array.isArray(n))t={checkedKeys:n,halfCheckedKeys:void 0};else if((0,O.Z)(n)==="object")t={checkedKeys:n.checked||void 0,halfCheckedKeys:n.halfChecked||void 0};else return(0,Q.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return t}function I(n,t){var g=new Set;function p(m){if(!g.has(m)){var N=(0,Z.Z)(t,m);if(N){g.add(m);var M=N.parent,z=N.node;z.disabled||M&&p(M.key)}}}return(n||[]).forEach(function(m){p(m)}),(0,F.Z)(g)}},17341:function(Ie,me,l){l.d(me,{S:function(){return o}});var F=l(80334),O=l(35381);function Q(K,B){var v=new Set;return K.forEach(function(re){B.has(re)||v.add(re)}),v}function xe(K){var B=K||{},v=B.disabled,re=B.disableCheckbox,H=B.checkable;return!!(v||re)||H===!1}function De(K,B,v,re){for(var H=new Set(K),_=new Set,W=0;W<=v;W+=1){var ie=B.get(W)||new Set;ie.forEach(function(k){var I=k.key,n=k.node,t=k.children,g=t===void 0?[]:t;H.has(I)&&!re(n)&&g.filter(function(p){return!re(p.node)}).forEach(function(p){H.add(p.key)})})}for(var s=new Set,c=v;c>=0;c-=1){var y=B.get(c)||new Set;y.forEach(function(k){var I=k.parent,n=k.node;if(!(re(n)||!k.parent||s.has(k.parent.key))){if(re(k.parent.node)){s.add(I.key);return}var t=!0,g=!1;(I.children||[]).filter(function(p){return!re(p.node)}).forEach(function(p){var m=p.key,N=H.has(m);t&&!N&&(t=!1),!g&&(N||_.has(m))&&(g=!0)}),t&&H.add(I.key),g&&_.add(I.key),s.add(I.key)}})}return{checkedKeys:Array.from(H),halfCheckedKeys:Array.from(Q(_,H))}}function Z(K,B,v,re,H){for(var _=new Set(K),W=new Set(B),ie=0;ie<=re;ie+=1){var s=v.get(ie)||new Set;s.forEach(function(I){var n=I.key,t=I.node,g=I.children,p=g===void 0?[]:g;!_.has(n)&&!W.has(n)&&!H(t)&&p.filter(function(m){return!H(m.node)}).forEach(function(m){_.delete(m.key)})})}W=new Set;for(var c=new Set,y=re;y>=0;y-=1){var k=v.get(y)||new Set;k.forEach(function(I){var n=I.parent,t=I.node;if(!(H(t)||!I.parent||c.has(I.parent.key))){if(H(I.parent.node)){c.add(n.key);return}var g=!0,p=!1;(n.children||[]).filter(function(m){return!H(m.node)}).forEach(function(m){var N=m.key,M=_.has(N);g&&!M&&(g=!1),!p&&(M||W.has(N))&&(p=!0)}),g||_.delete(n.key),p&&W.add(n.key),c.add(n.key)}})}return{checkedKeys:Array.from(_),halfCheckedKeys:Array.from(Q(W,_))}}function o(K,B,v,re){var H=[],_;re?_=re:_=xe;var W=new Set(K.filter(function(y){var k=!!(0,O.Z)(v,y);return k||H.push(y),k})),ie=new Map,s=0;Object.keys(v).forEach(function(y){var k=v[y],I=k.level,n=ie.get(I);n||(n=new Set,ie.set(I,n)),n.add(k),s=Math.max(s,I)}),(0,F.ZP)(!H.length,"Tree missing follow keys: ".concat(H.slice(0,100).map(function(y){return"'".concat(y,"'")}).join(", ")));var c;return B===!0?c=De(W,ie,s,_):c=Z(W,B.halfCheckedKeys,ie,s,_),c}},35381:function(Ie,me,l){l.d(me,{Z:function(){return F}});function F(O,Q){return O[Q]}},1089:function(Ie,me,l){l.d(me,{F:function(){return I},H8:function(){return k},I8:function(){return y},km:function(){return H},oH:function(){return s},w$:function(){return _},zn:function(){return ie}});var F=l(71002),O=l(74902),Q=l(1413),xe=l(91),De=l(50344),Z=l(98423),o=l(80334),K=l(35381),B=["children"];function v(n,t){return"".concat(n,"-").concat(t)}function re(n){return n&&n.type&&n.type.isTreeNode}function H(n,t){return n!=null?n:t}function _(n){var t=n||{},g=t.title,p=t._title,m=t.key,N=t.children,M=g||"title";return{title:M,_title:p||[M],key:m||"key",children:N||"children"}}function W(n,t){var g=new Map;function p(m){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(m||[]).forEach(function(M){var z=M[t.key],D=M[t.children];warning(z!=null,"Tree node must have a certain key: [".concat(N).concat(z,"]"));var oe=String(z);warning(!g.has(oe)||z===null||z===void 0,"Same 'key' exist in the Tree: ".concat(oe)),g.set(oe,!0),p(D,"".concat(N).concat(oe," > "))})}p(n)}function ie(n){function t(g){var p=(0,De.Z)(g);return p.map(function(m){if(!re(m))return(0,o.ZP)(!m,"Tree/TreeNode can only accept TreeNode as children."),null;var N=m.key,M=m.props,z=M.children,D=(0,xe.Z)(M,B),oe=(0,Q.Z)({key:N},D),ue=t(z);return ue.length&&(oe.children=ue),oe}).filter(function(m){return m})}return t(n)}function s(n,t,g){var p=_(g),m=p._title,N=p.key,M=p.children,z=new Set(t===!0?[]:t),D=[];function oe(ue){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return ue.map(function(ae,le){for(var V=v(de?de.pos:"0",le),fe=H(ae[N],V),se,ce=0;ce1&&arguments[1]!==void 0?arguments[1]:{},g=t.initWrapper,p=t.processEntity,m=t.onProcessFinished,N=t.externalGetKey,M=t.childrenPropName,z=t.fieldNames,D=arguments.length>2?arguments[2]:void 0,oe=N||D,ue={},de={},ae={posEntities:ue,keyEntities:de};return g&&(ae=g(ae)||ae),c(n,function(le){var V=le.node,fe=le.index,se=le.pos,ce=le.key,he=le.parentPos,q=le.level,Pe=le.nodes,ve={node:V,nodes:Pe,index:fe,key:ce,pos:se,level:q},Le=H(ce,se);ue[se]=ve,de[Le]=ve,ve.parent=ue[he],ve.parent&&(ve.parent.children=ve.parent.children||[],ve.parent.children.push(ve)),p&&p(ve,ae)},{externalGetKey:oe,childrenPropName:M,fieldNames:z}),m&&m(ae),ae}function k(n,t){var g=t.expandedKeys,p=t.selectedKeys,m=t.loadedKeys,N=t.loadingKeys,M=t.checkedKeys,z=t.halfCheckedKeys,D=t.dragOverNodeKey,oe=t.dropPosition,ue=t.keyEntities,de=(0,K.Z)(ue,n),ae={eventKey:n,expanded:g.indexOf(n)!==-1,selected:p.indexOf(n)!==-1,loaded:m.indexOf(n)!==-1,loading:N.indexOf(n)!==-1,checked:M.indexOf(n)!==-1,halfChecked:z.indexOf(n)!==-1,pos:String(de?de.pos:""),dragOver:D===n&&oe===0,dragOverGapTop:D===n&&oe===-1,dragOverGapBottom:D===n&&oe===1};return ae}function I(n){var t=n.data,g=n.expanded,p=n.selected,m=n.checked,N=n.loaded,M=n.loading,z=n.halfChecked,D=n.dragOver,oe=n.dragOverGapTop,ue=n.dragOverGapBottom,de=n.pos,ae=n.active,le=n.eventKey,V=(0,Q.Z)((0,Q.Z)({},t),{},{expanded:g,selected:p,checked:m,loaded:N,loading:M,halfChecked:z,dragOver:D,dragOverGapTop:oe,dragOverGapBottom:ue,pos:de,active:ae,key:le});return"props"in V||Object.defineProperty(V,"props",{get:function(){return(0,o.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),n}}),V}}}]);