import{n as c,b$ as H,m as b,D as m,bu as M,r as l,I as S,_ as w,w as E,b9 as D,j as C,v as z}from"./createLucideIcon-BcINIXoS.js";import{R as L}from"./SearchOutlined-B5_bI2oW.js";const P=new c("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),q=new c("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),B=new c("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),N=new c("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),K=new c("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),W=new c("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),_=new c("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),T=new c("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),A={"move-up":{inKeyframes:_,outKeyframes:T},"move-down":{inKeyframes:P,outKeyframes:q},"move-left":{inKeyframes:B,outKeyframes:N},"move-right":{inKeyframes:K,outKeyframes:W}},ee=(e,n)=>{const{antCls:t}=e,i=`${t}-${n}`,{inKeyframes:a,outKeyframes:r}=A[n];return[H(i,a,r,e.motionDurationMid),{[`
        ${i}-enter,
        ${i}-appear
      `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${i}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},F=e=>{const{multipleSelectItemHeight:n,paddingXXS:t,lineWidth:i,INTERNAL_FIXED_ITEM_MARGIN:a}=e,r=e.max(e.calc(t).sub(i).equal(),0),s=e.max(e.calc(r).sub(a).equal(),0);return{basePadding:r,containerPadding:s,itemHeight:m(n),itemLineHeight:m(e.calc(n).sub(e.calc(e.lineWidth).mul(2)).equal())}},G=e=>{const{multipleSelectItemHeight:n,selectHeight:t,lineWidth:i}=e;return e.calc(t).sub(n).div(2).sub(i).equal()},X=e=>{const{componentCls:n,iconCls:t,borderRadiusSM:i,motionDurationSlow:a,paddingXS:r,multipleItemColorDisabled:s,multipleItemBorderColorDisabled:d,colorIcon:o,colorIconHover:I,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${n}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${n}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:i,cursor:"default",transition:`font-size ${a}, line-height ${a}, height ${a}`,marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:r,paddingInlineEnd:e.calc(r).div(2).equal(),[`${n}-disabled&`]:{color:s,borderColor:d,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(r).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},M()),{display:"inline-flex",alignItems:"center",color:o,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${t}`]:{verticalAlign:"-0.2em"},"&:hover":{color:I}})}}}},U=(e,n)=>{const{componentCls:t,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=`${t}-selection-overflow`,r=e.multipleSelectItemHeight,s=G(e),d=n?`${t}-${n}`:"",o=F(e);return{[`${t}-multiple${d}`]:Object.assign(Object.assign({},X(e)),{[`${t}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:o.basePadding,paddingBlock:o.containerPadding,borderRadius:e.borderRadius,[`${t}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${m(i)} 0`,lineHeight:m(r),visibility:"hidden",content:'"\\a0"'}},[`${t}-selection-item`]:{height:o.itemHeight,lineHeight:m(o.itemLineHeight)},[`${t}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:m(r),marginBlock:i}},[`${t}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(o.basePadding).equal()},[`${a}-item + ${a}-item,
        ${t}-prefix + ${t}-selection-wrap
      `]:{[`${t}-selection-search`]:{marginInlineStart:0},[`${t}-selection-placeholder`]:{insetInlineStart:0}},[`${a}-item-suffix`]:{minHeight:o.itemHeight,marginBlock:i},[`${t}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(s).equal(),"\n          &-input,\n          &-mirror\n        ":{height:r,fontFamily:e.fontFamily,lineHeight:m(r),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${t}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(o.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function $(e,n){const{componentCls:t}=e,i=n?`${t}-${n}`:"",a={[`${t}-multiple${i}`]:{fontSize:e.fontSize,[`${t}-selector`]:{[`${t}-show-search&`]:{cursor:"text"}},[`
        &${t}-show-arrow ${t}-selector,
        &${t}-allow-clear ${t}-selector
      `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[U(e,n),a]}const te=e=>{const{componentCls:n}=e,t=b(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),i=b(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[$(e),$(t,"sm"),{[`${n}-multiple${n}-sm`]:{[`${n}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${n}-selection-search`]:{marginInlineStart:2}}},$(i,"lg")]};var j={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},V=function(n,t){return l.createElement(S,w({},n,{ref:t,icon:j}))},Y=l.forwardRef(V);function ne({suffixIcon:e,clearIcon:n,menuItemSelectedIcon:t,removeIcon:i,loading:a,multiple:r,hasFeedback:s,prefixCls:d,showSuffixIcon:o,feedbackIcon:I,showArrow:u,componentName:y}){const O=n??l.createElement(E,null),f=h=>e===null&&!s&&!u?null:l.createElement(l.Fragment,null,o!==!1&&h,s&&I);let g=null;if(e!==void 0)g=f(e);else if(a)g=f(l.createElement(z,{spin:!0}));else{const h=`${d}-suffix`;g=({open:x,showSearch:R})=>f(x&&R?l.createElement(L,{className:h}):l.createElement(Y,{className:h}))}let p=null;t!==void 0?p=t:r?p=l.createElement(D,null):p=null;let v=null;return i!==void 0?v=i:v=l.createElement(C,null),{clearIcon:O,suffixIcon:g,itemIcon:p,removeIcon:v}}var J={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},Q=function(n,t){return l.createElement(S,w({},n,{ref:t,icon:J}))},ie=l.forwardRef(Q);export{ie as R,F as a,Y as b,te as c,X as g,ee as i,ne as u};
