15 lines
66 KiB
JavaScript
15 lines
66 KiB
JavaScript
import{i as e,t}from"./rolldown-runtime-BgaNhQyE.js";import{$ as n,$t as r,B as i,Dr as a,E as o,Er as s,Ft as c,Hn as l,Jn as u,K as d,Ln as f,Pn as p,Q as m,Qt as h,St as g,Ut as _,V as v,Vn as y,Wt as b,Xn as x,Yn as S,Z as C,Zn as w,Zt as T,at as E,cr as D,d as O,en as k,gr as A,ir as j,nt as M,p as N,q as P,tr as F,u as I,ur as ee,ut as te,vr as L,wr as ne,xn as R,xr as z,xt as B,yr as V,yt as re,z as ie,zn as ae}from"./jsx-runtime-ADHq9IcL.js";import{f as oe,m as se,p as ce,y as le}from"./tooltip-CRuv8UNz.js";import{t as H}from"./CloseCircleFilled-BARdd-Ff.js";import{r as ue}from"./PlusOutlined-W6xCIIXs.js";import{g as U,h as W}from"./style-Der9vtsK.js";import{n as de}from"./LeftOutlined-DolIAuof.js";import{t as fe}from"./PurePanel-CKFVxwoF.js";import{t as G}from"./empty-oL0hNsAh.js";import{t as pe}from"./DownOutlined-DUvTsWMS.js";import{t as me}from"./SearchOutlined-B7X5pgf4.js";var K=e(a()),he=(e,t,n,r,i=!1,a,o)=>{let s=(0,K.useMemo)(()=>typeof n==`boolean`?{allowClear:n}:n&&typeof n==`object`?n:{allowClear:!1},[n]);return(0,K.useMemo)(()=>{let e=!i&&s.allowClear!==!1&&(t.length||a)&&!(o===`combobox`&&a===``);return{allowClear:e,clearIcon:e?s.clearIcon||r||`×`:null}},[s,r,i,t.length,a,o])},ge=K.createContext(null);function q(){return K.useContext(ge)}function _e(e=250){let t=K.useRef(null),n=K.useRef(null);K.useEffect(()=>()=>{window.clearTimeout(n.current)},[]);function r(r){(r||t.current===null)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,r]}function ve(e,t){return e.filter(e=>e).some(e=>e.contains(t)||e===t)}function ye(e,t,n,r){let i=ne(i=>{if(r)return;let a=i.target;a.shadowRoot&&i.composed&&(a=i.composedPath()[0]||a),i._ori_target&&(a=i._ori_target),t&&!ve(e(),a)&&n(!1)});K.useEffect(()=>(window.addEventListener(`mousedown`,i),()=>window.removeEventListener(`mousedown`,i)),[i])}function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},J.apply(this,arguments)}var Y=e=>{let t=e===!0?0:1;return{bottomLeft:{points:[`tl`,`bl`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},bottomRight:{points:[`tr`,`br`],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topLeft:{points:[`bl`,`tl`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`},topRight:{points:[`br`,`tr`],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:`scroll`}}},be=K.forwardRef((e,t)=>{let{prefixCls:n,disabled:r,visible:i,children:a,popupElement:o,animation:s,transitionName:c,popupStyle:l,popupClassName:u,direction:d=`ltr`,placement:f,builtinPlacements:p,popupMatchSelectWidth:m,popupRender:h,popupAlign:g,getPopupContainer:_,empty:v,onPopupVisibleChange:b,onPopupMouseEnter:x,onPopupMouseDown:S,onPopupBlur:C,...w}=e,T=`${n}-dropdown`,E=o;h&&(E=h(o));let D=K.useMemo(()=>p||Y(m),[p,m]),O=s?`${T}-${s}`:c,k=typeof m==`number`,A=K.useMemo(()=>m===!1||k?`minWidth`:`width`,[m,k]),j=l;k&&(j={...l,width:m});let M=K.useRef(null);return K.useImperativeHandle(t,()=>({getPopupElement:()=>M.current?.popupElement})),K.createElement(te,J({},w,{showAction:b?[`click`]:[],hideAction:b?[`click`]:[],popupPlacement:f||(d===`rtl`?`bottomRight`:`bottomLeft`),builtinPlacements:D,prefixCls:T,popupMotion:{motionName:O},popup:K.createElement(`div`,{onMouseEnter:x,onMouseDown:S,onBlur:C},E),ref:M,stretch:A,popupAlign:g,popupVisible:i,getPopupContainer:_,popupClassName:y(u,{[`${T}-empty`]:v}),popupStyle:j,onPopupVisibleChange:b}),a)});function xe(e,t){let{key:n}=e,r;return`value`in e&&({value:r}=e),n??(r===void 0?`rc-index-key-${t}`:r)}function Se(e){return e!==void 0&&!Number.isNaN(e)}function Ce(e,t){let{label:n,value:r,options:i,groupLabel:a}=e||{},o=n||(t?`children`:`label`);return{label:o,value:r||`value`,options:i||`options`,groupLabel:a||o}}function we(e,{fieldNames:t,childrenAsData:n}={}){let r=[],{label:i,value:a,options:o,groupLabel:s}=Ce(t,!1);function c(e,t){Array.isArray(e)&&e.forEach(e=>{if(t||!(o in e)){let n=e[a];r.push({key:xe(e,r.length),groupOption:t,data:e,label:e[i],value:n})}else{let t=e[s];t===void 0&&n&&(t=e.label),r.push({key:xe(e,r.length),group:!0,data:e,label:t}),c(e[o],!0)}})}return c(e,!1),r}function Te(e){let t={...e};return`props`in t||Object.defineProperty(t,"props",{get(){return F(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var X=(e,t,n)=>{if(!t||!t.length)return null;let r=!1,i=(e,[t,...n])=>{if(!t)return[e];let a=e.split(t);return r||=a.length>1,a.reduce((e,t)=>[...e,...i(t,n)],[]).filter(Boolean)},a=i(e,t);return r?n===void 0?a:a.slice(0,n):null};function Ee(e){let{visible:t,values:n}=e;return t?K.createElement(`span`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`${n.slice(0,50).map(({label:e,value:t})=>[`number`,`string`].includes(typeof e)?e:t).join(`, `)}`,n.length>50?`, ...`:null):null}var De=e=>{let t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},Oe=(e,t=1)=>{if(t<=0){e();return}De(()=>{Oe(e,t-1)})};function ke(e,t,n,r){let[i,a]=(0,K.useState)(!1);(0,K.useEffect)(()=>{a(!0)},[]);let[o,s]=V(e,t),[c,l]=(0,K.useState)(!1),u=i?o:!1,d=r(u),f=(0,K.useRef)(0),p=ne(e=>{n&&d!==e&&n(e),s(e)});return[u,d,ne((e,t={})=>{let{cancelFun:n}=t;f.current+=1;let r=f.current,i=typeof e==`boolean`?e:!d;l(!i);function a(){r===f.current&&!n?.()&&(p(i),l(!1))}i?a():Oe(()=>{a()})}),c]}function Z(e){let{children:t,...n}=e;return t?K.createElement(`div`,n,t):null}var Ae=K.createContext(null);function je(){return K.useContext(Ae)}var Me=K.forwardRef((e,t)=>{let{onChange:n,onKeyDown:r,onBlur:i,style:a,syncWidth:o,value:s,className:c,autoComplete:l,...u}=e,{prefixCls:d,mode:f,onSearch:p,onSearchSubmit:m,onInputBlur:h,autoFocus:g,tokenWithEnter:_,placeholder:v,components:{input:b=`input`}}=je(),{id:x,classNames:S,styles:C,open:w,activeDescendantId:T,role:E,disabled:D}=q()||{},O=y(`${d}-input`,S?.input,c),k=K.useRef(!1),A=K.useRef(null),j=K.useRef(null);K.useImperativeHandle(t,()=>j.current);let M=e=>{let{value:t}=e.target;if(_&&A.current&&/[\r\n]/.test(A.current)){let e=A.current.replace(/[\r\n]+$/,``).replace(/\r\n/g,` `).replace(/[\r\n]/g,` `);t=t.replace(e,A.current)}A.current=null,p&&p(t,!0,k.current),n?.(e)},N=e=>{let{key:t}=e,{value:n}=e.currentTarget;t===`Enter`&&f===`tags`&&!w&&!k.current&&m&&m(n),r?.(e)},P=e=>{h?.(),i?.(e)},F=()=>{k.current=!0},I=e=>{if(k.current=!1,f!==`combobox`){let{value:t}=e.currentTarget;p?.(t,!0,!1)}},te=e=>{let{clipboardData:t}=e,n=t?.getData(`text`);A.current=n||``},[L,ne]=K.useState(void 0);z(()=>{let e=j.current;if(o&&e){e.style.width=`0px`;let t=e.scrollWidth;ne(t),e.style.width=``}},[o,s]);let R={id:x,type:`text`,...u,ref:j,style:{...C?.input,...a,"--select-input-width":L},autoFocus:g,autoComplete:l||`new-password`,className:O,disabled:D,value:s||``,onChange:M,onKeyDown:N,onBlur:P,onPaste:te,onCompositionStart:F,onCompositionEnd:I,role:E||`combobox`,"aria-expanded":w||!1,"aria-haspopup":`listbox`,"aria-owns":w?`${x}_list`:void 0,"aria-autocomplete":`list`,"aria-controls":w?`${x}_list`:void 0,"aria-activedescendant":w?T:void 0};if(K.isValidElement(b)){let t=b.props||{},n={placeholder:e.placeholder||v,...R,...t};return Object.keys(t).forEach(e=>{let r=t[e];typeof r==`function`&&(n[e]=(...t)=>{r(...t),R[e]?.(...t)})}),n.ref=ee(b.ref,R.ref),K.cloneElement(b,n)}let B=b;return K.createElement(B,R)});function Q(e){let{prefixCls:t,placeholder:n,displayValues:r}=je(),{classNames:i,styles:a}=q(),{show:o=!0}=e;return r.length?null:K.createElement(`div`,{className:y(`${t}-placeholder`,i?.placeholder),style:{visibility:o?`visible`:`hidden`,...a?.placeholder}},n)}var $=K.createContext(null);function Ne(e){return Array.isArray(e)?e:e===void 0?[]:[e]}typeof window<`u`&&window.document&&window.document.documentElement;function Pe(e){return e!=null}function Fe(e){return!e&&e!==0}function Ie(e){return[`string`,`number`].includes(typeof e)}function Le(e){let t;return e&&(Ie(e.title)?t=e.title.toString():Ie(e.label)&&(t=e.label.toString())),t}function Re(){return Re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Re.apply(this,arguments)}var ze=K.forwardRef(({inputProps:e},t)=>{let{prefixCls:n,searchValue:r,activeValue:i,displayValues:a,maxLength:o,mode:s,components:c}=je(),{triggerOpen:l,title:u,showSearch:d,classNames:f,styles:p}=q(),m=K.useContext($),[h,g]=K.useState(!1),_=s===`combobox`,v=a[0],b=K.useMemo(()=>_&&i&&!h&&l?i:d?r:``,[_,i,h,l,r,d]),[x,S,C,w]=K.useMemo(()=>{let e,t,n;if(v&&m?.flattenOptions){let r=m.flattenOptions.find(e=>e.value===v.value);r?.data&&(e=r.data.className,t=r.data.style,n=Le(r.data))}return v&&!n&&(n=Le(v)),u!==void 0&&(n=u),[e,t,n,!!e||!!t]},[v,m?.flattenOptions,u]);K.useEffect(()=>{_&&g(!1)},[_,i]);let T=v&&v.label!==null&&v.label!==void 0&&String(v.label).trim()!==``,E=_&&c?.input?null:v?w?K.createElement(`div`,{className:y(`${n}-content-value`,x),style:{...b?{visibility:`hidden`}:{},...S},title:C},v.label):v.label:K.createElement(Q,{show:!b});return K.createElement(`div`,{className:y(`${n}-content`,T&&`${n}-content-has-value`,b&&`${n}-content-has-search-value`,w&&`${n}-content-has-option-style`,f?.content),style:p?.content,title:w?void 0:C},E,K.createElement(Me,Re({ref:t},e,{value:b,maxLength:s===`combobox`?o:void 0,onChange:t=>{g(!0),e.onChange?.(t)}})))}),Be=e=>{let{className:t,style:n,customizeIcon:r,customizeIconProps:i,children:a,onMouseDown:o,onClick:s}=e,c=typeof r==`function`?r(i):r;return K.createElement(`span`,{className:t,onMouseDown:e=>{e.preventDefault(),o?.(e)},style:{userSelect:`none`,WebkitUserSelect:`none`,...n},unselectable:`on`,onClick:s,"aria-hidden":!0},c===void 0?K.createElement(`span`,{className:y(t.split(/\s+/).map(e=>`${e}-icon`))},a):c)};function Ve(){return Ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ve.apply(this,arguments)}function He(e){return e.key??e.value}var Ue=e=>{e.preventDefault(),e.stopPropagation()},We=K.forwardRef(function({inputProps:e},t){let{prefixCls:n,displayValues:r,searchValue:i,mode:a,onSelectorRemove:o,removeIcon:s}=je(),{disabled:c,showSearch:l,triggerOpen:u,rawOpen:d,toggleOpen:f,autoClearSearchValue:p,tagRender:m,maxTagPlaceholder:h,maxTagTextLength:g,maxTagCount:_,classNames:v,styles:b}=q(),x=`${n}-selection-item`,S=i;!d&&a===`multiple`&&p!==!1&&(S=``);let C=l&&S||``,w=l&&!c,T=s??`×`,E=h??(e=>`+ ${e.length} ...`),D=m,k=e=>{f(e)},A=e=>{o?.(e)},j=(e,t,n,r,i)=>K.createElement(`span`,{title:Le(e),className:y(x,{[`${x}-disabled`]:n},v?.item),style:b?.item},K.createElement(`span`,{className:y(`${x}-content`,v?.itemContent),style:b?.itemContent},t),r&&K.createElement(Be,{className:y(`${x}-remove`,v?.itemRemove),style:b?.itemRemove,onMouseDown:Ue,onClick:i,customizeIcon:T},`×`)),M=(e,t,n,r,i,a,o)=>K.createElement(`span`,{onMouseDown:e=>{Ue(e),k(!u)}},D({label:t,value:e,index:o?.index,disabled:n,closable:r,onClose:i,isMaxTag:!!a}));return K.createElement(O,{prefixCls:`${n}-content`,className:v?.content,style:b?.content,prefix:!r.length&&!C&&K.createElement(Q,null),data:r,renderItem:(e,t)=>{let{disabled:n,label:r,value:i}=e,a=!c&&!n,o=r;if(typeof g==`number`&&(typeof r==`string`||typeof r==`number`)){let e=String(o);e.length>g&&(o=`${e.slice(0,g)}...`)}let s=t=>{t&&t.stopPropagation(),A(e)};return typeof D==`function`?M(i,o,n,a,s,void 0,t):j(e,o,n,a,s)},renderRest:e=>{if(!r.length)return null;let t=typeof E==`function`?E(e):E;return typeof D==`function`?M(void 0,t,!1,!1,void 0,!0):j({title:t},t,!1)},suffix:K.createElement(Me,Ve({ref:t,disabled:c,readOnly:!w},e,{value:C||``,syncWidth:!0})),itemKey:He,maxCount:_})}),Ge=K.forwardRef(function(e,t){let{multiple:n,onInputKeyDown:r,tabIndex:i}=je(),a=q(),{showSearch:o}=a,s={...x(a,{aria:!0}),onKeyDown:r,readOnly:!o,tabIndex:i};return n?K.createElement(We,{ref:t,inputProps:s}):K.createElement(ze,{ref:t,inputProps:s})});function Ke(e){return e&&![j.ESC,j.SHIFT,j.BACKSPACE,j.TAB,j.WIN_KEY,j.ALT,j.META,j.WIN_KEY_RIGHT,j.CTRL,j.SEMICOLON,j.EQUALS,j.CAPS_LOCK,j.CONTEXT_MENU,j.UP,j.LEFT,j.RIGHT,j.F1,j.F2,j.F3,j.F4,j.F5,j.F6,j.F7,j.F8,j.F9,j.F10,j.F11,j.F12].includes(e)}function qe(){return qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qe.apply(this,arguments)}var Je=[`value`,`onChange`,`removeIcon`,`placeholder`,`maxTagCount`,`maxTagTextLength`,`maxTagPlaceholder`,`choiceTransitionName`,`onInputKeyDown`,`onPopupScroll`,`tabIndex`,`activeValue`,`onSelectorRemove`,`focused`],Ye=K.forwardRef(function(e,t){let{prefixCls:n,className:r,style:i,prefix:a,suffix:o,clearIcon:s,children:c,multiple:l,displayValues:u,placeholder:d,mode:f,searchValue:p,onSearch:m,onSearchSubmit:h,onInputBlur:g,maxLength:_,autoFocus:v,onMouseDown:b,onClearMouseDown:S,onInputKeyDown:C,onSelectorRemove:T,tokenWithEnter:E,components:O,...k}=e,{triggerOpen:A,toggleOpen:M,showSearch:N,disabled:P,loading:F,classNames:I,styles:te}=q(),L=K.useRef(null),R=K.useRef(null),z=ne(e=>{let{which:t}=e,n=R.current instanceof HTMLTextAreaElement;!n&&A&&(t===j.UP||t===j.DOWN)&&e.preventDefault(),C&&C(e),!(n&&!A&&~[j.UP,j.DOWN,j.LEFT,j.RIGHT].indexOf(t))&&!(e.ctrlKey||e.altKey||e.metaKey)&&Ke(t)&&M(!0)});K.useImperativeHandle(t,()=>({focus:e=>{(R.current||L.current).focus?.(e)},blur:()=>{(R.current||L.current).blur?.()},nativeElement:D(L.current)}));let B=ne(e=>{if(!P){let t=D(R.current);e.nativeEvent._ori_target=t;let n=t===e.target||t?.contains(e.target);t&&!n&&e.preventDefault();let r=A&&!l&&(f===`combobox`||N)||A&&l&&n;e.nativeEvent._select_lazy?A&&!l&&M(!1):(R.current?.focus(),r||M())}b?.(e)}),{root:V}=O,re=w(k,Je),ie=x(re,{aria:!0}),ae=Object.keys(ie),oe={...e,onInputKeyDown:z};if(V){let e=V.props||{},t={...e,...re};return Object.keys(e).forEach(n=>{let r=e[n],i=re[n];typeof r==`function`&&typeof i==`function`&&(t[n]=(...e)=>{i(...e),r(...e)})}),K.isValidElement(V)?K.cloneElement(V,{...t,ref:ee(V.ref,L)}):K.createElement(V,qe({},t,{ref:L}))}return K.createElement(Ae.Provider,{value:oe},K.createElement(`div`,qe({},w(re,ae),{ref:L,className:r,style:i,onMouseDown:B}),K.createElement(Z,{className:y(`${n}-prefix`,I?.prefix),style:te?.prefix},a),K.createElement(Ge,{ref:R}),K.createElement(Z,{className:y(`${n}-suffix`,{[`${n}-suffix-loading`]:F},I?.suffix),style:te?.suffix},o),s&&K.createElement(Z,{className:y(`${n}-clear`,I?.clear),style:te?.clear,onMouseDown:e=>{e.nativeEvent._select_lazy=!0,S?.(e)}},s),c))});function Xe(e,t,n){return K.useMemo(()=>{let{root:r,input:i}=e||{};return n&&(r=n()),t&&(i=t()),{root:r,input:i}},[e,t,n])}function Ze(){return Ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ze.apply(this,arguments)}var Qe=e=>e===`tags`||e===`multiple`,$e=K.forwardRef((e,t)=>{let{id:n,prefixCls:r,className:i,styles:a,classNames:o,showSearch:s,tagRender:c,showScrollBar:l=`optional`,direction:u,omitDomProps:d,displayValues:f,onDisplayValuesChange:p,emptyOptions:m,notFoundContent:h=`Not Found`,onClear:g,maxCount:_,placeholder:v,mode:b,disabled:x,loading:S,getInputElement:C,getRawInputElement:w,open:T,defaultOpen:E,onPopupVisibleChange:O,activeValue:k,onActiveValueChange:A,activeDescendantId:j,searchValue:M,autoClearSearchValue:N,onSearch:P,onSearchSplit:F,tokenSeparators:I,allowClear:ee,prefix:te,suffix:L,suffixIcon:R,clearIcon:z,OptionList:B,animation:V,transitionName:re,popupStyle:ie,popupClassName:ae,popupMatchSelectWidth:oe,popupRender:se,popupAlign:ce,placement:le,builtinPlacements:H,getPopupContainer:ue,showAction:U=[],onFocus:W,onBlur:de,onKeyUp:fe,onKeyDown:G,onMouseDown:pe,components:me,...q}=e,J=Qe(b),Y=K.useRef(null),xe=K.useRef(null),Ce=K.useRef(null),[we,Te]=K.useState(!1);K.useImperativeHandle(t,()=>({focus:Y.current?.focus,blur:Y.current?.blur,scrollTo:e=>Ce.current?.scrollTo(e),nativeElement:D(Y.current)}));let De=Xe(me,C,w),Z=K.useMemo(()=>{if(b!==`combobox`)return M;let e=f[0]?.value;return typeof e==`string`||typeof e==`number`?String(e):``},[M,b,f]),Ae=b===`combobox`&&typeof C==`function`&&C()||null,je=!h&&m,[Me,Q,$,Ne]=ke(E||!1,T,O,e=>x||je?!1:e),Pe=K.useMemo(()=>typeof I==`function`||(I||[]).some(e=>[`
|
||
`,`\r
|
||
`].includes(e)),[I]),Fe=K.useMemo(()=>typeof I==`function`?(e,t)=>{let n=I(e),r=Array.isArray(n)&&n.length===1&&n[0]===e;return!Array.isArray(n)||!n.length||r?null:t===void 0?n:n.slice(0,t)}:(e,t)=>X(e,I,t),[I]),Ie=(e,t,n)=>{if(J&&Se(_)&&f.length>=_)return;let r=!0,i=e;A?.(null);let a=Se(_)?_-f.length:void 0,o=n?null:Fe(e,a);return b!==`combobox`&&o&&(i=``,F?.(o),$(!1),r=!1),P&&Z!==i&&P(i,{source:t?`typing`:`effect`}),e&&t&&r&&$(!0),r},Le=e=>{!e||!e.trim()||P(e,{source:`submit`})};K.useEffect(()=>{!Me&&!J&&b!==`combobox`&&Ie(``,!1,!1)},[Me]),K.useEffect(()=>{x&&($(!1),Te(!1))},[x,Q]);let[Re,ze]=_e(),Be=K.useRef(!1),Ve=e=>{let t=Re(),{key:n}=e,r=n===`Enter`,i=n===` `;if(r||i){let t=b===`combobox`;(i&&!(t||s)||r&&!t)&&e.preventDefault(),Q||$(!0)}if(ze(!!Z),n===`Backspace`&&!t&&J&&!Z&&f.length){let e=[...f],t=null;for(let n=e.length-1;n>=0;--n){let r=e[n];if(!r.disabled){e.splice(n,1),t=r;break}}t&&p(e,{type:`remove`,values:[t]})}Q&&(!r||!Be.current)&&!i&&(r&&(Be.current=!0),Ce.current?.onKeyDown(e)),G?.(e)},He=(e,...t)=>{Q&&Ce.current?.onKeyUp(e,...t),e.key===`Enter`&&(Be.current=!1),fe?.(e,...t)},Ue=ne(e=>{let t=f.filter(t=>t!==e);p(t,{type:`remove`,values:[e]})}),We=()=>{Be.current=!1},Ge=()=>[D(Y.current),xe.current?.getPopupElement()];ye(Ge,Q,$,!!De.root);let Ke=K.useRef(!1),qe=e=>{Te(!0),x||(U.includes(`focus`)&&$(!0),W?.(e))},Je=()=>{Q&&!Ke.current&&$(!1,{cancelFun:()=>ve(Ge(),document.activeElement)})},$e=e=>{Te(!1),Z&&(b===`tags`?P(Z,{source:`submit`}):b===`multiple`&&P(``,{source:`blur`})),Je(),x||de?.(e)},et=(e,...t)=>{let{target:n}=e;(xe.current?.getPopupElement())?.contains(n)&&$&&$(!0),pe?.(e,...t),Ke.current=!0,Oe(()=>{Ke.current=!1})},[,tt]=K.useState({});function nt(){tt({})}let rt;De.root&&(rt=e=>{$(e)});let it=K.useMemo(()=>({...e,notFoundContent:h,open:Q,triggerOpen:Q,rawOpen:Me,id:n,showSearch:s,multiple:J,toggleOpen:$,showScrollBar:l,styles:a,classNames:o,lockOptions:Ne}),[e,h,$,n,s,J,Q,Me,l,a,o,Ne]),at=K.useMemo(()=>{let e=L??R;return typeof e==`function`?e({searchValue:Z,open:Q,focused:we,showSearch:s,loading:S}):e},[L,R,Z,Q,we,s,S]),ot=()=>{g?.(),Y.current?.focus(),p([],{type:`clear`,values:f}),Ie(``,!1,!1)},{allowClear:st,clearIcon:ct}=he(r,f,ee,z,x,Z,b),lt=K.createElement(B,{ref:Ce}),ut=y(r,i,{[`${r}-focused`]:we,[`${r}-multiple`]:J,[`${r}-single`]:!J,[`${r}-allow-clear`]:st,[`${r}-show-arrow`]:at!=null,[`${r}-disabled`]:x,[`${r}-loading`]:S,[`${r}-open`]:Q,[`${r}-customize-input`]:Ae,[`${r}-show-search`]:s}),dt=K.createElement(Ye,Ze({},q,{ref:Y,prefixCls:r,className:ut,focused:we,prefix:te,suffix:at,clearIcon:ct,multiple:J,mode:b,displayValues:f,placeholder:v,searchValue:Z,activeValue:k,onSearch:Ie,onSearchSubmit:Le,onInputBlur:We,onFocus:qe,onBlur:$e,onClearMouseDown:ot,onKeyDown:Ve,onKeyUp:He,onSelectorRemove:Ue,tokenWithEnter:Pe,onMouseDown:et,components:De}));return dt=K.createElement(be,{ref:xe,disabled:x,prefixCls:r,visible:Q,popupElement:lt,animation:V,transitionName:re,popupStyle:ie,popupClassName:ae,direction:u,popupMatchSelectWidth:oe,popupRender:se,popupAlign:ce,placement:le,builtinPlacements:H,getPopupContainer:ue,empty:m,onPopupVisibleChange:rt,onPopupMouseEnter:nt,onPopupMouseDown:et,onPopupBlur:Je},dt),K.createElement(ge.Provider,{value:it},K.createElement(Ee,{visible:we&&!Q,values:f}),dt)}),et=()=>null;et.isSelectOptGroup=!0;var tt=()=>null;tt.isSelectOption=!0;var nt=e(s());function rt(){return rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rt.apply(this,arguments)}var it=K.forwardRef(({height:e,offsetY:t,offsetX:n,children:r,prefixCls:i,onInnerResize:a,innerProps:o,rtl:s,extra:c},u)=>{let d={},f={display:`flex`,flexDirection:`column`};return t!==void 0&&(d={height:e,position:`relative`,overflow:`hidden`},f={...f,transform:`translateY(${t}px)`,[s?`marginRight`:`marginLeft`]:-n,position:`absolute`,left:0,right:0,top:0}),K.createElement(`div`,{style:d},K.createElement(l,{onResize:({offsetHeight:e})=>{e&&a&&a()}},K.createElement(`div`,rt({style:f,className:y({[`${i}-holder-inner`]:i}),ref:u},o),r,c)))});it.displayName=`Filler`;function at({children:e,setRef:t}){let n=K.useCallback(e=>{t(e)},[t]);return K.cloneElement(e,{ref:n})}function ot(e,t,n,r,i,a,o,{getKey:s}){return e.slice(t,n+1).map((e,n)=>{let c=o(e,t+n,{style:{width:r},offsetX:i}),l=s(e);return K.createElement(at,{key:l,setRef:t=>a(e,t)},c)})}function st(e,t,n){let r=e.length,i=t.length,a,o;if(r===0&&i===0)return null;r<i?(a=e,o=t):(a=t,o=e);let s={__EMPTY_ITEM__:!0};function c(e){return e===void 0?s:n(e)}let l=null,u=Math.abs(r-i)!==1;for(let e=0;e<o.length;e+=1){let t=c(a[e]);if(t!==c(o[e])){l=e,u||=t!==c(o[e+1]);break}}return l===null?null:{index:l,multiple:u}}function ct(e,t,n){let[r,i]=K.useState(e),[a,o]=K.useState(null);return K.useEffect(()=>{let a=st(r||[],e||[],t);a?.index!==void 0&&(n?.(a.index),o(e[a.index])),i(e)},[e]),[a]}var lt=typeof navigator==`object`&&/Firefox/i.test(navigator.userAgent),ut=((e,t,n,r)=>{let i=(0,K.useRef)(!1),a=(0,K.useRef)(null);function o(){clearTimeout(a.current),i.current=!0,a.current=setTimeout(()=>{i.current=!1},50)}let s=(0,K.useRef)({top:e,bottom:t,left:n,right:r});return s.current.top=e,s.current.bottom=t,s.current.left=n,s.current.right=r,(e,t,n=!1)=>{let r=e?t<0&&s.current.left||t>0&&s.current.right:t<0&&s.current.top||t>0&&s.current.bottom;return n&&r?(clearTimeout(a.current),i.current=!1):(!r||i.current)&&o(),!i.current&&r}});function dt(e,t,n,r,i,a,o){let s=(0,K.useRef)(0),c=(0,K.useRef)(null),l=(0,K.useRef)(null),u=(0,K.useRef)(!1),d=ut(t,n,r,i);function f(e,t){if(S.cancel(c.current),d(!1,t))return;let n=e;if(!n._virtualHandled)n._virtualHandled=!0;else return;s.current+=t,l.current=t,lt||n.preventDefault(),c.current=S(()=>{let e=u.current?10:1;o(s.current*e,!1),s.current=0})}function p(e,t){o(t,!0),lt||e.preventDefault()}let m=(0,K.useRef)(null),h=(0,K.useRef)(null);function g(t){if(!e)return;S.cancel(h.current),h.current=S(()=>{m.current=null},2);let{deltaX:n,deltaY:r,shiftKey:i}=t,o=n,s=r;(m.current===`sx`||!m.current&&i&&r&&!n)&&(o=r,s=0,m.current=`sx`);let c=Math.abs(o),l=Math.abs(s);m.current===null&&(m.current=a&&c>l?`x`:`y`),m.current===`y`?f(t,s):p(t,o)}function _(t){e&&(u.current=t.detail===l.current)}return[g,_]}function ft(e,t,n,r){let[i,a]=K.useMemo(()=>[new Map,[]],[e,n.id,r]);return(o,s=o)=>{let c=i.get(o),l=i.get(s);if(c===void 0||l===void 0){let u=e.length;for(let d=a.length;d<u;d+=1){let u=e[d],f=t(u);i.set(f,d);let p=n.get(f)??r;if(a[d]=(a[d-1]||0)+p,f===o&&(c=d),f===s&&(l=d),c!==void 0&&l!==void 0)break}}return{top:a[c-1]||0,bottom:a[l]}}}var pt=class{maps;id=0;diffRecords=new Map;constructor(){this.maps=Object.create(null)}set(e,t){this.diffRecords.set(e,this.maps[e]),this.maps[e]=t,this.id+=1}get(e){return this.maps[e]}resetRecord(){this.diffRecords.clear()}getRecord(){return this.diffRecords}};function mt(e){let t=parseFloat(e);return isNaN(t)?0:t}function ht(e,t,n){let[r,i]=K.useState(0),a=(0,K.useRef)(new Map),o=(0,K.useRef)(new pt),s=(0,K.useRef)(0);function c(){s.current+=1}function l(e=!1){c();let t=()=>{let e=!1;a.current.forEach((t,n)=>{if(t&&t.offsetParent){let{offsetHeight:r}=t,{marginTop:i,marginBottom:a}=getComputedStyle(t),s=mt(i),c=mt(a),l=r+s+c;o.current.get(n)!==l&&(o.current.set(n,l),e=!0)}}),e&&i(e=>e+1)};if(e)t();else{s.current+=1;let e=s.current;Promise.resolve().then(()=>{e===s.current&&t()})}}function u(r,i){let o=e(r),s=a.current.get(o);i?(a.current.set(o,i),l()):a.current.delete(o),!s!=!i&&(i?t?.(r):n?.(r))}return(0,K.useEffect)(()=>c,[]),[u,l,o.current,r]}var gt=14/15;function _t(e,t,n){let r=(0,K.useRef)(!1),i=(0,K.useRef)(0),a=(0,K.useRef)(0),o=(0,K.useRef)(null),s=(0,K.useRef)(null),c,l=e=>{if(r.current){let t=Math.ceil(e.touches[0].pageX),r=Math.ceil(e.touches[0].pageY),o=i.current-t,c=a.current-r,l=Math.abs(o)>Math.abs(c);l?i.current=t:a.current=r;let u=n(l,l?o:c,!1,e);u&&e.preventDefault(),clearInterval(s.current),u&&(s.current=setInterval(()=>{l?o*=gt:c*=gt;let e=Math.floor(l?o:c);(!n(l,e,!0)||Math.abs(e)<=.1)&&clearInterval(s.current)},16))}},u=()=>{r.current=!1,c()},d=e=>{c(),e.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(e.touches[0].pageX),a.current=Math.ceil(e.touches[0].pageY),o.current=e.target,o.current.addEventListener(`touchmove`,l,{passive:!1}),o.current.addEventListener(`touchend`,u,{passive:!0}))};c=()=>{o.current&&(o.current.removeEventListener(`touchmove`,l),o.current.removeEventListener(`touchend`,u))},z(()=>(e&&t.current.addEventListener(`touchstart`,d,{passive:!0}),()=>{t.current?.removeEventListener(`touchstart`,d),c(),clearInterval(s.current)}),[e])}function vt(e){return Math.floor(e**.5)}function yt(e,t){return(`touches`in e?e.touches[0]:e)[t?`pageX`:`pageY`]-window[t?`scrollX`:`scrollY`]}function bt(e,t,n){K.useEffect(()=>{let r=t.current;if(e&&r){let e=!1,t,i,a=()=>{S.cancel(t)},o=()=>{a(),t=S(()=>{n(i),o()})},s=()=>{e=!1,a()},c=t=>{if(t.target.draggable||t.button!==0)return;let n=t;n._virtualHandled||(n._virtualHandled=!0,e=!0)},l=t=>{if(e){let e=yt(t,!1),{top:n,bottom:s}=r.getBoundingClientRect();e<=n?(i=-vt(n-e),o()):e>=s?(i=vt(e-s),o()):a()}};return r.addEventListener(`mousedown`,c),r.ownerDocument.addEventListener(`mouseup`,s),r.ownerDocument.addEventListener(`mousemove`,l),r.ownerDocument.addEventListener(`dragend`,s),()=>{r.removeEventListener(`mousedown`,c),r.ownerDocument.removeEventListener(`mouseup`,s),r.ownerDocument.removeEventListener(`mousemove`,l),r.ownerDocument.removeEventListener(`dragend`,s),a()}}},[e])}var xt=10;function St(e,t){let n=typeof e==`function`?e(t):e;return Number.isFinite(n)?n:0}function Ct(e,t,n,r,i,a,o,s,c){let l=K.useRef(void 0),[u,d]=K.useState(null);return z(()=>{if(u&&u.times<xt){if(!e.current){d(e=>({...e}));return}o();let{targetAlign:c,originAlign:l,index:f,offset:p}=u,m=St(p,{getSize:a}),h=e.current.clientHeight,g=!1,_=c,v=null;if(h){let a=c||l,o=0,d=0,p=0,y=Math.min(t.length-1,f);for(let e=0;e<=y;e+=1){let a=i(t[e]);d=o;let s=n.get(a);p=d+(s===void 0?r:s),o=p}let b=a===`top`?m:h-m;for(let e=y;e>=0;--e){let r=i(t[e]),a=n.get(r);if(a===void 0){g=!0;break}if(b-=a,b<=0)break}switch(a){case`top`:v=d-m;break;case`bottom`:v=p-h+m;break;default:{let{scrollTop:t}=e.current,n=t+h;d<t?_=`top`:p>n&&(_=`bottom`)}}v!==null&&s(v),v!==u.lastTop&&(g=!0)}g&&d({...u,times:u.times+1,targetAlign:_,lastTop:v})}},[u,e.current]),e=>{if(e==null){c();return}if(S.cancel(l.current),typeof e==`number`)s(e);else if(e&&typeof e==`object`){let n,{align:r}=e;`index`in e?{index:n}=e:n=t.findIndex(t=>i(t)===e.key);let{offset:a=0}=e;d({times:0,index:n,offset:a,originAlign:r})}}}function wt(e,t,n){if(t<=0||n<=0)return 0;let r=Math.max(Math.min(e,n),0)/n,i=Math.ceil(r*t);return i=Math.max(i,0),i=Math.min(i,t),i}var Tt=K.forwardRef((e,t)=>{let{prefixCls:n,rtl:r,scrollOffset:i,scrollRange:a,onStartMove:o,onStopMove:s,onScroll:c,horizontal:l,spinSize:u,containerSize:d,style:f,thumbStyle:p,showScrollBar:m}=e,[h,g]=K.useState(!1),[_,v]=K.useState(null),[b,x]=K.useState(null),C=!r,w=K.useRef(null),T=K.useRef(null),[E,D]=K.useState(m),O=K.useRef(void 0),k=()=>{m===!0||m===!1||(clearTimeout(O.current),D(!0),O.current=setTimeout(()=>{D(!1)},3e3))},A=a-d||0,j=d-u||0,M=K.useMemo(()=>i===0||A===0?0:i/A*j,[i,A,j]),N=e=>!!e&&T.current?.contains(e),P=e=>{let t=w.current;if(!t)return;let n=t.getBoundingClientRect(),r=yt(e,l),i;if(Number.isFinite(r)){if(l){let e=C?n.left:n.right;if(!Number.isFinite(e))return;i=(C?r-e:e-r)-u/2}else{if(!Number.isFinite(n.top))return;i=r-n.top-u/2}c(wt(i,A,j),l)}},F=e=>{e.stopPropagation(),e.preventDefault(),!(e.button!==0||N(e.target))&&P(e)},I=K.useRef({top:M,dragging:h,pageY:_,startTop:b});I.current={top:M,dragging:h,pageY:_,startTop:b};let ee=ne(e=>{g(!0),v(yt(e,l)),x(I.current.top),o(),e.stopPropagation(),e.preventDefault()});K.useEffect(()=>{let e=e=>{e.preventDefault()},t=w.current,n=T.current;return t.addEventListener(`touchstart`,e,{passive:!1}),n.addEventListener(`touchstart`,ee,{passive:!1}),()=>{t.removeEventListener(`touchstart`,e),n.removeEventListener(`touchstart`,ee)}},[ee]);let te=K.useRef(void 0);te.current=A;let L=K.useRef(void 0);L.current=j,K.useEffect(()=>{if(h){let e,t=t=>{let{dragging:n,pageY:r,startTop:i}=I.current;S.cancel(e);let a=w.current.getBoundingClientRect(),o=d/(l?a.width:a.height);if(n){let n=(yt(t,l)-r)*o,a=i;!C&&l?a-=n:a+=n;let s=te.current,u=L.current,d=wt(a,s,u);e=S(()=>{c(d,l)})}},n=()=>{g(!1),s()};return window.addEventListener(`mousemove`,t,{passive:!0}),window.addEventListener(`touchmove`,t,{passive:!0}),window.addEventListener(`mouseup`,n,{passive:!0}),window.addEventListener(`touchend`,n,{passive:!0}),()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`touchmove`,t),window.removeEventListener(`mouseup`,n),window.removeEventListener(`touchend`,n),S.cancel(e)}}},[h]),K.useEffect(()=>(k(),()=>{clearTimeout(O.current)}),[i]),K.useImperativeHandle(t,()=>({delayHidden:k}));let R=`${n}-scrollbar`,z={position:`absolute`,visibility:E?null:`hidden`},B={position:`absolute`,borderRadius:99,background:`var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))`,cursor:`pointer`,userSelect:`none`};return l?(Object.assign(z,{height:8,left:0,right:0,bottom:0}),Object.assign(B,{height:`100%`,width:u,[C?`left`:`right`]:M})):(Object.assign(z,{width:8,top:0,bottom:0,[C?`right`:`left`]:0}),Object.assign(B,{width:`100%`,height:u,top:M})),K.createElement(`div`,{ref:w,className:y(R,{[`${R}-horizontal`]:l,[`${R}-vertical`]:!l,[`${R}-visible`]:E}),style:{...z,...f},onMouseDown:F,onMouseMove:k},K.createElement(`div`,{ref:T,className:y(`${R}-thumb`,{[`${R}-thumb-moving`]:h}),style:{...B,...p},onMouseDown:ee}))}),Et=20;function Dt(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,Et),Math.floor(n)}function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ot.apply(this,arguments)}var kt=[],At={overflowY:`auto`,overflowAnchor:`none`};function jt(e,t){let{prefixCls:n=`rc-virtual-list`,className:r,height:i,itemHeight:a,fullHeight:o=!0,style:s,data:c,children:u,itemKey:d,virtual:f,direction:p,scrollWidth:m,component:h=`div`,onScroll:g,onVirtualScroll:_,onVisibleChange:v,innerProps:b,extraRender:x,styles:S,showScrollBar:C=`optional`,...w}=e,T=K.useCallback(e=>typeof d==`function`?d(e):e?.[d],[d]),[E,D,O,k]=ht(T,null,null),A=!!(f!==!1&&i&&a),j=K.useMemo(()=>Object.values(O.maps).reduce((e,t)=>e+t,0),[O.id,O.maps]),M=A&&c&&(Math.max(a*c.length,j)>i||!!m),N=p===`rtl`,P=y(n,{[`${n}-rtl`]:N},r),F=c||kt,I=(0,K.useRef)(null),ee=(0,K.useRef)(null),te=(0,K.useRef)(null),[L,R]=(0,K.useState)(0),[B,V]=(0,K.useState)(0),[re,ie]=(0,K.useState)(!1),ae=()=>{ie(!0)},oe=()=>{ie(!1)},se={getKey:T};function ce(e){R(t=>{let n;n=typeof e==`function`?e(t):e;let r=J(n);return I.current.scrollTop=r,r})}let le=(0,K.useRef)({start:0,end:F.length}),H=(0,K.useRef)(void 0),[ue]=ct(F,T);H.current=ue;let{scrollHeight:U,start:W,end:de,offset:fe}=K.useMemo(()=>{if(!A)return{scrollHeight:void 0,start:0,end:F.length-1,offset:void 0};if(!M)return{scrollHeight:ee.current?.offsetHeight||0,start:0,end:F.length-1,offset:void 0};let e=0,t,n,r,o=F.length;for(let s=0;s<o;s+=1){let o=F[s],c=T(o),l=O.get(c),u=e+(l===void 0?a:l);u>=L&&t===void 0&&(t=s,n=e),u>L+i&&r===void 0&&(r=s),e=u}return t===void 0&&(t=0,n=0,r=Math.ceil(i/a)),r===void 0&&(r=F.length-1),r=Math.min(r+1,F.length-1),{scrollHeight:e,start:t,end:r,offset:n}},[M,A,L,F,k,i]);le.current.start=W,le.current.end=de,K.useLayoutEffect(()=>{let e=O.getRecord();if(e.size===1){let t=Array.from(e.keys())[0],n=e.get(t),r=F[W];if(r&&n===void 0&&T(r)===t){let e=O.get(t)-a;ce(t=>t+e)}}O.resetRecord()},[U]);let[G,pe]=K.useState({width:0,height:i}),me=e=>{pe({width:e.offsetWidth,height:e.offsetHeight})},he=(0,K.useRef)(null),ge=(0,K.useRef)(null),q=K.useMemo(()=>Dt(G.width,m),[G.width,m]),_e=K.useMemo(()=>Dt(G.height,U),[G.height,U]),ve=U-i,ye=(0,K.useRef)(ve);ye.current=ve;function J(e){let t=e;return Number.isNaN(ye.current)||(t=Math.min(t,ye.current)),t=Math.max(t,0),t}let Y=L<=0,be=L>=ve,xe=B<=0,Se=B>=m,Ce=ut(Y,be,xe,Se),we=()=>({x:N?-B:B,y:L}),Te=(0,K.useRef)(we()),X=ne(e=>{if(_){let t={...we(),...e};(Te.current.x!==t.x||Te.current.y!==t.y)&&(_(t),Te.current=t)}});function Ee(e,t){let n=e;t?((0,nt.flushSync)(()=>{V(n)}),X()):ce(n)}function De(e){let{scrollTop:t}=e.currentTarget;t!==L&&ce(t),g?.(e),X()}let Oe=e=>{let t=e,n=m?m-G.width:0;return t=Math.max(t,0),t=Math.min(t,n),t},ke=ne((e,t)=>{t?((0,nt.flushSync)(()=>{V(t=>{let n=t+(N?-e:e);return Oe(n)})}),X()):ce(t=>t+e)}),[Z,Ae]=dt(A,Y,be,xe,Se,!!m,ke);_t(A,I,(e,t,n,r)=>{let i=r;return Ce(e,t,n)?!1:!i||!i._virtualHandled?(i&&(i._virtualHandled=!0),Z({preventDefault(){},deltaX:e?t:0,deltaY:e?0:t}),!0):!1}),bt(M,I,e=>{ce(t=>t+e)}),z(()=>{function e(e){let t=Y&&e.detail<0,n=be&&e.detail>0;A&&!t&&!n&&e.preventDefault()}let t=I.current;return t.addEventListener(`wheel`,Z,{passive:!1}),t.addEventListener(`DOMMouseScroll`,Ae,{passive:!0}),t.addEventListener(`MozMousePixelScroll`,e,{passive:!1}),()=>{t.removeEventListener(`wheel`,Z),t.removeEventListener(`DOMMouseScroll`,Ae),t.removeEventListener(`MozMousePixelScroll`,e)}},[A,Y,be]),z(()=>{if(m){let e=Oe(B);V(e),X({x:e})}},[G.width,m]);let je=()=>{he.current?.delayHidden(),ge.current?.delayHidden()},Me=ft(F,T,O,a),Q=Ct(I,F,O,a,T,Me,()=>D(!0),ce,je);K.useImperativeHandle(t,()=>({nativeElement:te.current,getScrollInfo:we,scrollTo:e=>{function t(e){return e&&typeof e==`object`&&(`left`in e||`top`in e)}t(e)?(e.left!==void 0&&V(Oe(e.left)),Q(e.top)):Q(e)}})),z(()=>{if(v){let e=F.slice(W,de+1);v(e,F)}},[W,de,F]);let $=x?.({start:W,end:de,virtual:M,offsetX:B,scrollTop:L,offsetY:fe,rtl:N,getSize:Me}),Ne=ot(F,W,de,m,B,E,u,se),Pe=null;i&&(Pe={[o?`height`:`maxHeight`]:i,...At},A&&(Pe.overflowY=`hidden`,m&&(Pe.overflowX=`hidden`),re&&(Pe.pointerEvents=`none`)));let Fe={};return N&&(Fe.dir=`rtl`),K.createElement(`div`,Ot({ref:te,style:{...s,position:`relative`},className:P},Fe,w),K.createElement(l,{onResize:me},K.createElement(h,{className:`${n}-holder`,style:Pe,ref:I,onScroll:De,onMouseEnter:je},K.createElement(it,{prefixCls:n,height:U,offsetX:B,offsetY:fe,scrollWidth:m,onInnerResize:D,ref:ee,innerProps:b,rtl:N,extra:$},Ne))),M&&U>i&&K.createElement(Tt,{ref:he,prefixCls:n,scrollOffset:L,scrollRange:U,rtl:N,onScroll:Ee,onStartMove:ae,onStopMove:oe,spinSize:_e,containerSize:G.height,style:S?.verticalScrollBar,thumbStyle:S?.verticalScrollBarThumb,showScrollBar:C}),M&&m>G.width&&K.createElement(Tt,{ref:ge,prefixCls:n,scrollOffset:B,scrollRange:m,rtl:N,onScroll:Ee,onStartMove:ae,onStopMove:oe,spinSize:q,containerSize:G.width,horizontal:!0,style:S?.horizontalScrollBar,thumbStyle:S?.horizontalScrollBarThumb,showScrollBar:C}))}var Mt=K.forwardRef(jt);Mt.displayName=`List`;var Nt=K.forwardRef((e,t)=>jt({...e,virtual:!1},t));Nt.displayName=`List`;var Pt=Mt;function Ft(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},It.apply(this,arguments)}function Lt(e){return typeof e==`string`||typeof e==`number`}var Rt=K.forwardRef((e,t)=>{let{prefixCls:n,id:r,open:i,multiple:a,mode:o,searchValue:s,toggleOpen:c,notFoundContent:l,onPopupScroll:u,showScrollBar:d,lockOptions:f}=q(),{maxCount:p,flattenOptions:m,onActiveValue:h,defaultActiveFirstOption:g,onSelect:_,menuItemSelectedIcon:v,rawValues:b,fieldNames:S,virtual:C,direction:T,listHeight:E,listItemHeight:D,optionRender:O,classNames:k,styles:M}=K.useContext($),N=`${n}-item`,P=A(()=>m,[i,f],(e,t)=>t[0]&&!t[1]),F=K.useRef(null),I=K.useMemo(()=>a&&Se(p)&&b?.size>=p,[a,p,b?.size]),ee=e=>{e.preventDefault()},te=e=>{F.current?.scrollTo(typeof e==`number`?{index:e}:e)},L=K.useCallback(e=>o!==`combobox`&&b.has(e),[o,[...b].toString(),b.size]),ne=(e,t=1)=>{let n=P.length;for(let r=0;r<n;r+=1){let i=(e+r*t+n)%n,{group:a,data:o}=P[i]||{};if(!a&&!o?.disabled&&(L(o.value)||!I))return i}return-1},[R,z]=K.useState(()=>ne(0)),B=(e,t=!1)=>{z(e);let n={source:t?`keyboard`:`mouse`},r=P[e];if(!r){h(null,-1,n);return}h(r.value,e,n)};(0,K.useEffect)(()=>{B(g===!1?-1:ne(0))},[P.length,s]);let V=K.useCallback(e=>o===`combobox`?String(e).toLowerCase()===s.toLowerCase():b.has(e),[o,s,[...b].toString(),b.size]);(0,K.useEffect)(()=>{let e;if(!a&&i&&b.size===1){let t=Array.from(b)[0],n=P.findIndex(({data:e})=>s?String(e.value).startsWith(s):e.value===t);n!==-1&&(B(n),e=setTimeout(()=>{te(n)}))}return i&&F.current?.scrollTo(void 0),()=>clearTimeout(e)},[i,s]);let re=e=>{e!==void 0&&_(e,{selected:!b.has(e)}),a||c(!1)};if(K.useImperativeHandle(t,()=>({onKeyDown:e=>{let{which:t,ctrlKey:n}=e;switch(t){case j.N:case j.P:case j.UP:case j.DOWN:{let e=0;if(t===j.UP?e=-1:t===j.DOWN?e=1:Ft()&&n&&(t===j.N?e=1:t===j.P&&(e=-1)),e!==0){let t=ne(R+e,e);te(t),B(t,!0)}break}case j.TAB:case j.ENTER:{let t=P[R];if(!t||t.data.disabled)return re(void 0);!I||b.has(t.value)?re(t.value):re(void 0),i&&e.preventDefault();break}case j.ESC:c(!1),i&&e.stopPropagation()}},onKeyUp:()=>{},scrollTo:e=>{te(e)}})),P.length===0)return K.createElement(`div`,{role:`listbox`,id:`${r}_list`,className:`${N}-empty`,onMouseDown:ee},l);let ie=Object.keys(S).map(e=>S[e]),ae=e=>e.label;function oe(e,t){let{group:n}=e;return{role:n?`presentation`:`option`,id:`${r}_list_${t}`}}let se=e=>{let t=P[e];if(!t)return null;let n=t.data||{},{value:r,disabled:i}=n,{group:a}=t,o=x(n,!0),s=ae(t);return t?K.createElement(`div`,It({"aria-label":typeof s==`string`&&!a?s:null},o,{key:e},oe(t,e),{"aria-selected":V(r),"aria-disabled":i}),r):null},ce={role:`listbox`,id:`${r}_list`};return K.createElement(K.Fragment,null,C&&K.createElement(`div`,It({},ce,{style:{height:0,width:0,overflow:`hidden`}}),se(R-1),se(R),se(R+1)),K.createElement(Pt,{itemKey:`key`,ref:F,data:P,height:E,itemHeight:D,fullHeight:!1,onMouseDown:ee,onScroll:u,virtual:C,direction:T,innerProps:C?null:ce,showScrollBar:d,className:k?.popup?.list,style:M?.popup?.list},(e,t)=>{let{group:n,groupOption:r,data:i,label:a,value:o}=e,{key:s}=i;if(n){let e=i.title??(Lt(a)?a.toString():void 0);return K.createElement(`div`,{className:y(N,`${N}-group`,i.className),title:e},a===void 0?s:a)}let{disabled:c,title:l,children:u,style:d,className:f,...p}=i,m=w(p,ie),h=L(o),g=c||!h&&I,_=`${N}-option`,b=y(N,_,f,k?.popup?.listItem,{[`${_}-grouped`]:r,[`${_}-active`]:R===t&&!g,[`${_}-disabled`]:g,[`${_}-selected`]:h}),S=ae(e),T=!v||typeof v==`function`||h,E=typeof S==`number`?S:S||o,D=Lt(E)?E.toString():void 0;return l!==void 0&&(D=l),K.createElement(`div`,It({},x(m),C?{}:oe(e,t),{"aria-selected":C?void 0:V(o),"aria-disabled":g,className:b,title:D,onMouseMove:()=>{R===t||g||B(t)},onClick:()=>{g||re(o)},style:{...M?.popup?.listItem,...d}}),K.createElement(`div`,{className:`${_}-content`},typeof O==`function`?O(e,{index:t}):E),K.isValidElement(v)||h,T&&K.createElement(Be,{className:`${N}-option-state`,customizeIcon:v,customizeIconProps:{value:o,disabled:g,isSelected:h}},h?`✓`:null))}))}),zt=((e,t)=>{let n=K.useRef({values:new Map,options:new Map});return[K.useMemo(()=>{let{values:r,options:i}=n.current,a=e.map(e=>e.label===void 0?{...e,label:r.get(e.value)?.label}:e),o=new Map,s=new Map;return a.forEach(e=>{o.set(e.value,e),s.set(e.value,t.get(e.value)||i.get(e.value))}),n.current.values=o,n.current.options=s,a},[e,t]),K.useCallback(e=>t.get(e)||n.current.options.get(e),[t])]});function Bt(e,t){return Ne(e).join(``).toUpperCase().includes(t)}var Vt=((e,t,n,r,i)=>K.useMemo(()=>{if(!n||r===!1)return e;let{options:a,label:o,value:s}=t,c=[],l=typeof r==`function`,u=n.toUpperCase(),d=l?r:(e,t)=>i&&i.length?i.some(e=>Bt(t[e],u)):t[a]?Bt(t[o===`children`?`label`:o],u):Bt(t[s],u),f=l?e=>Te(e):e=>e;return e.forEach(e=>{if(e[a]){if(d(n,f(e)))c.push(e);else{let t=e[a].filter(e=>d(n,f(e)));t.length&&c.push({...e,[a]:t})}return}d(n,f(e))&&c.push(e)}),c},[e,r,i,n,t]));function Ht(e){let{key:t,props:{children:n,value:r,...i}}=e;return{key:t,value:r===void 0?t:r,children:n,...i}}function Ut(e,t=!1){return u(e).map((e,n)=>{if(!K.isValidElement(e)||!e.type)return null;let{type:{isSelectOptGroup:r},key:i,props:{children:a,...o}}=e;return t||!r?Ht(e):{key:`__RC_SELECT_GRP__${i===null?n:i}__`,label:i,...o,options:Ut(a)}}).filter(e=>e)}var Wt=(e,t,n,r,i)=>K.useMemo(()=>{let a=e;e||(a=Ut(t));let o=new Map,s=new Map,c=(e,t,n)=>{n&&typeof n==`string`&&e.set(t[n],t)},l=(e,t=!1)=>{for(let a=0;a<e.length;a+=1){let u=e[a];!u[n.options]||t?(o.set(u[n.value],u),c(s,u,n.label),r.forEach(e=>{c(s,u,e)}),c(s,u,i)):l(u[n.options],!0)}};return l(a),{options:a,valueOptions:o,labelOptions:s}},[e,t,n,r,i]);function Gt(e){let t=K.useRef();return t.current=e,K.useCallback((...e)=>t.current(...e),[])}function Kt(e,t,n){let{filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c}=t;return K.useMemo(()=>{let t=typeof e==`object`,l={filterOption:r,searchValue:i,optionFilterProp:a,filterSort:o,onSearch:s,autoClearSearchValue:c,...t?e:{}};return[t||n===`combobox`||n===`tags`||n===`multiple`&&e===void 0?!0:e,l]},[n,e,r,i,a,o,s,c])}function qt(){return qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qt.apply(this,arguments)}var Jt=[`inputValue`];function Yt(e){return!e||typeof e!=`object`}var Xt=K.forwardRef((e,t)=>{let{id:n,mode:r,prefixCls:i=`rc-select`,backfill:a,fieldNames:o,showSearch:s,searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p,onSelect:m,onDeselect:h,onActive:g,popupMatchSelectWidth:_=!0,optionLabelProp:v,options:y,optionRender:b,children:x,defaultActiveFirstOption:S,menuItemSelectedIcon:C,virtual:w,direction:T,listHeight:E=200,listItemHeight:D=20,labelRender:O,value:k,defaultValue:A,labelInValue:j,onChange:M,maxCount:N,classNames:P,styles:F,...I}=e,[ee,te]=Kt(s,{searchValue:c,onSearch:l,autoClearSearchValue:u,filterOption:d,optionFilterProp:f,filterSort:p},r),{filterOption:ne,searchValue:R,optionFilterProp:z,filterSort:B,onSearch:re,autoClearSearchValue:ie=!0}=te,ae=K.useMemo(()=>z?Array.isArray(z)?z:[z]:[],[z]),oe=L(n),se=Qe(r),ce=!!(!y&&x),le=K.useMemo(()=>ne===void 0&&r===`combobox`?!1:ne,[ne,r]),H=K.useMemo(()=>Ce(o,ce),[JSON.stringify(o),ce]),[ue,U]=V(``,R),W=ue||``,de=Wt(y,x,H,ae,v),{valueOptions:fe,labelOptions:G,options:pe}=de,me=K.useCallback(e=>Ne(e).map(e=>{let t,n,r,i;Yt(e)?t=e:(n=e.label,t=e.value);let a=fe.get(t);return a&&(n===void 0&&(n=a?.[v||H.label]),r=a?.disabled,i=a?.title),{label:n,value:t,key:t,disabled:r,title:i}}),[H,v,fe]),[he,ge]=V(A,k),[q,_e]=zt(K.useMemo(()=>{let e=me(se&&he===null?[]:he);return r===`combobox`&&Fe(e[0]?.value)?[]:e},[he,me,r,se]),fe),ve=K.useMemo(()=>{if(!r&&q.length===1){let e=q[0];if(e.value===null&&(e.label===null||e.label===void 0))return[]}return q.map(e=>({...e,label:(typeof O==`function`?O(e):e.label)??e.value}))},[r,q,O]),ye=K.useMemo(()=>new Set(q.map(e=>e.value)),[q]);K.useEffect(()=>{if(r===`combobox`){let e=q[0]?.value;U(Pe(e)?String(e):``)}},[q]);let J=Gt((e,t)=>{let n=t??e;return{[H.value]:e,[H.label]:n}}),Y=Vt(K.useMemo(()=>{if(r!==`tags`)return pe;let e=[...pe],t=e=>fe.has(e);return[...q].sort((e,t)=>e.value<t.value?-1:1).forEach(n=>{let r=n.value;t(r)||e.push(J(r,n.label))}),e},[J,pe,fe,q,r]),H,W,le,ae),be=K.useMemo(()=>{let e=e=>ae.length?ae.some(t=>e?.[t]===W):e?.value===W;return r!==`tags`||!W||Y.some(t=>e(t))||Y.some(e=>e[H.value]===W)||fe.get(W)?.disabled?Y:[J(W),...Y]},[J,ae,r,Y,W,H,fe]),xe=e=>[...e].sort((e,t)=>B(e,t,{searchValue:W})).map(e=>Array.isArray(e.options)?{...e,options:e.options.length>0?xe(e.options):e.options}:e),Se=K.useMemo(()=>B?xe(be):be,[be,B,W]),X=K.useMemo(()=>we(Se,{fieldNames:H,childrenAsData:ce}),[Se,H,ce]),Ee=e=>{let t=me(e);if(ge(t),M&&(t.length!==q.length||t.some((e,t)=>q[t]?.value!==e?.value))){let e=j?t.map(({label:e,value:t})=>({label:e,value:t})):t.map(e=>e.value),n=t.map(e=>Te(_e(e.value)));M(se?e:e[0],se?n:n[0])}},[De,Oe]=K.useState(null),[ke,Z]=K.useState(0),Ae=S===void 0?r!==`combobox`:S,je=K.useRef(),Me=K.useCallback((e,t,{source:n=`keyboard`}={})=>{Z(t),a&&r===`combobox`&&e!==null&&n===`keyboard`&&Oe(String(e));let i=Promise.resolve().then(()=>{je.current===i&&g?.(e)});je.current=i},[a,r,g]),Q=(e,t,n)=>{let r=()=>{let t=_e(e);return[j?{label:t?.[H.label],value:e}:e,Te(t)]};if(t&&m){let[e,t]=r();m(e,t)}else if(!t&&h&&n!==`clear`){let[e,t]=r();h(e,t)}},Ie=Gt((e,t)=>{let n,i=!se||t.selected;n=i?se?[...q,e]:[e]:q.filter(t=>t.value!==e),Ee(n),Q(e,i),r===`combobox`?Oe(``):(!Qe||ie)&&(U(``),Oe(``))}),Le=(e,t)=>{Ee(e);let{type:n,values:r}=t;(n===`remove`||n===`clear`)&&r.forEach(e=>{Q(e.value,!1,n)})},Re=(e,t)=>{if(U(e),Oe(null),t.source===`submit`){let t=(e||``).trim();if(t){if(fe.get(t)?.disabled){U(``);return}let e=Array.from(new Set([...ye,t]));Ee(e),Q(t,!0),U(``)}return}t.source!==`blur`&&(r===`combobox`&&Ee(e),re?.(e))},ze=e=>{let t=e;r!==`tags`&&(t=e.map(e=>G.get(e)?.value).filter(e=>e!==void 0)),r===`tags`&&(t=t.filter(e=>!fe.get(e)?.disabled));let n=Array.from(new Set([...ye,...t]));Ee(n),n.forEach(e=>{Q(e,!0)})},Be=K.useMemo(()=>{let e=w!==!1&&_!==!1;return{...de,flattenOptions:X,onActiveValue:Me,defaultActiveFirstOption:Ae,onSelect:Ie,menuItemSelectedIcon:C,rawValues:ye,fieldNames:H,virtual:e,direction:T,listHeight:E,listItemHeight:D,childrenAsData:ce,maxCount:N,optionRender:b,classNames:P,styles:F}},[N,de,X,Me,Ae,Ie,C,ye,H,w,_,T,E,D,ce,b,P,F]);return K.createElement($.Provider,{value:Be},K.createElement($e,qt({},I,{id:oe,prefixCls:i,ref:t,omitDomProps:Jt,mode:r,classNames:P,styles:F,displayValues:ve,onDisplayValuesChange:Le,maxCount:N,direction:T,showSearch:ee,searchValue:W,onSearch:Re,autoClearSearchValue:ie,onSearchSplit:ze,popupMatchSelectWidth:_,OptionList:Rt,emptyOptions:!X.length,activeValue:De,activeDescendantId:`${oe}_list_${ke}`})))});Xt.Option=tt,Xt.OptGroup=et;var Zt=Xt;function Qt(e,t,n){return e===!1?null:e===!0?n:e&&e[t]!==void 0?e[t]:n}var $t=e=>{let{componentName:t}=e,{getPrefixCls:n}=(0,K.useContext)(f),r=n(`empty`);switch(t){case`Table`:case`List`:return K.createElement(G,{image:G.PRESENTED_IMAGE_SIMPLE});case`Select`:case`TreeSelect`:case`Cascader`:case`Transfer`:case`Mentions`:return K.createElement(G,{image:G.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case`Table.filter`:return null;default:return K.createElement(G,null)}},en=e=>{let t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e===`scroll`?`scroll`:`visible`,dynamicInset:!0};return{bottomLeft:{...t,points:[`tl`,`bl`],offset:[0,4]},bottomRight:{...t,points:[`tr`,`br`],offset:[0,4]},topLeft:{...t,points:[`bl`,`tl`],offset:[0,-4]},topRight:{...t,points:[`br`,`tr`],offset:[0,-4]}}};function tn(e,t){return e||en(t)}var nn=e=>{let{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:i}=e;return{position:`relative`,display:`block`,minHeight:t,padding:i,color:e.colorText,fontWeight:`normal`,fontSize:n,lineHeight:r,boxSizing:`border-box`}},rn=e=>{let{antCls:t,componentCls:n}=e,a=`${n}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,s=`&${t}-slide-up-appear${t}-slide-up-appear-active`,c=`&${t}-slide-up-leave${t}-slide-up-leave-active`,l=`${n}-dropdown-placement-`,u=`${a}-option-selected`;return[{[`${n}-dropdown`]:{...T(e),position:`absolute`,top:-9999,zIndex:e.zIndexPopup,boxSizing:`border-box`,padding:e.paddingXXS,overflow:`hidden`,fontSize:e.fontSize,fontVariant:`initial`,backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,[`
|
||
${o}${l}bottomLeft,
|
||
${s}${l}bottomLeft
|
||
`]:{animationName:d},[`
|
||
${o}${l}topLeft,
|
||
${s}${l}topLeft,
|
||
${o}${l}topRight,
|
||
${s}${l}topRight
|
||
`]:{animationName:i},[`${c}${l}bottomLeft`]:{animationName:P},[`
|
||
${c}${l}topLeft,
|
||
${c}${l}topRight
|
||
`]:{animationName:v},"&-hidden":{display:`none`},[a]:{...nn(e),cursor:`pointer`,transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:`default`},"&-option":{display:`flex`,"&-content":{flex:`auto`,...r},"&-state":{flex:`none`,display:`flex`,alignItems:`center`},[`&-selected:not(${a}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${a}-option-state`]:{color:e.colorPrimary}},[`&-active:not(${a}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected${a}-option-active:not(${a}-option-disabled)`]:{backgroundColor:e.controlItemBgActiveHover},"&-disabled":{[`&${a}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:`not-allowed`},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...nn(e),color:e.colorTextDisabled}},[`${u}:has(+ ${u})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${u}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:`rtl`}}},ie(e,`slide-up`),ie(e,`slide-down`),de(e,`move-up`),de(e,`move-down`)]},an=e=>{let{antCls:t,componentCls:n}=e,r={background:`transparent`},i=[`> input[disabled]`,`> textarea[disabled]`,`> ${n}-input`,`> ${t}-input-affix-wrapper-disabled`,`> ${t}-input-search`].join(`, `);return{[`&${n}-customize`]:{border:0,padding:0,fontSize:`inherit`,lineHeight:`inherit`,[`${n}-placeholder`]:{display:`none`},[`${n}-content`]:{margin:0,padding:0,"&-value":{display:`none`}},[`&${n}-disabled ${n}-content`]:{[i]:r,"input[disabled], textarea[disabled]":r}}}},on=4,sn=e=>{let{componentCls:t,calc:n,iconCls:i,paddingXS:a,paddingXXS:o,INTERNAL_FIXED_ITEM_MARGIN:s,lineWidth:c,colorIcon:l,colorIconHover:u,inputPaddingHorizontalBase:d,antCls:f}=e,[p,m]=_(f,`select`);return{"&-multiple":{[p(`multi-item-background`)]:e.multipleItemBg,[p(`multi-item-border-color`)]:`transparent`,[p(`multi-item-border-radius`)]:e.borderRadiusSM,[p(`multi-item-height`)]:e.multipleItemHeight,[p(`multi-padding-base`)]:`calc((${m(`height`)} - ${m(`multi-item-height`)}) / 2)`,[p(`multi-padding-vertical`)]:`calc(${m(`multi-padding-base`)} - ${s} - ${c})`,[p(`multi-item-padding-horizontal`)]:`calc(${d} - ${m(`multi-padding-vertical`)} - ${c} * 2)`,paddingBlock:m(`multi-padding-vertical`),paddingInlineStart:`calc(${m(`multi-padding-base`)} - ${c})`,[`${t}-prefix`]:{marginInlineStart:m(`multi-item-padding-horizontal`)},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:`absolute`,lineHeight:m(`line-height`),insetInlineStart:m(`multi-item-padding-horizontal`),width:`calc(100% - ${m(`multi-item-padding-horizontal`)})`,top:`50%`,transform:`translateY(-50%)`},[`${t}-content`]:{flexWrap:`wrap`,alignItems:`center`,lineHeight:1,"&-item-prefix":{height:m(`font-size`)},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${on}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix,
|
||
${t}-content-item-suffix:first-child`]:{marginInlineStart:m(`multi-item-padding-horizontal`)},[`${t}-selection-item`]:{lineHeight:`calc(${m(`multi-item-height`)} - ${c} * 2)`,border:`${c} solid ${m(`multi-item-border-color`)}`,display:`flex`,marginBlock:s,marginInlineEnd:n(s).mul(2).equal(),background:m(`multi-item-background`),borderRadius:m(`multi-item-border-radius`),paddingInlineStart:a,paddingInlineEnd:o,transition:[`height`,`line-height`,`padding`].map(t=>`${t} ${e.motionDurationSlow}`).join(`,`),"&-content":{...r,marginInlineEnd:o},"&-remove":{...h(),display:`inline-flex`,alignItems:`center`,color:l,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${i}`]:{verticalAlign:`-0.2em`},"&:hover":{color:u}}},[`${t}-input`]:{lineHeight:n(s).mul(2).add(m(`multi-item-height`)).equal(),width:`calc(var(--select-input-width, 0) * 1px)`,minWidth:on,maxWidth:`100%`,transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[p(`multi-item-height`)]:e.multipleItemHeightSM,[p(`multi-item-border-radius`)]:e.borderRadiusXS},[`&${t}-lg`]:{[p(`multi-item-height`)]:e.multipleItemHeightLG,[p(`multi-item-border-radius`)]:e.borderRadius},[`&${t}-filled`]:{[p(`multi-item-border-color`)]:e.colorSplit,[p(`multi-item-background`)]:e.colorBgContainer,[`&${t}-disabled`]:{[p(`multi-item-border-color`)]:`transparent`}}}}},cn=(e,t)=>{let{componentCls:n,antCls:r}=e,[i]=_(r,`select`),{border:a,borderHover:o,borderActive:s,borderOutline:c}=t,l=t.background||e.selectorBg||e.colorBgContainer;return{[i(`border-color`)]:a,[i(`background-color`)]:l,[i(`affix-color`)]:t.affixColor,[`&:not(${n}-disabled)`]:{"&:hover":{[i(`border-color`)]:o,[i(`background-color`)]:t.backgroundHover||l},[`&${n}-focused`]:{[i(`border-color`)]:s,[i(`background-color`)]:t.backgroundActive||l,boxShadow:`0 0 0 ${p(e.controlOutlineWidth)} ${c}`}},[`&${n}-disabled`]:{[i(`border-color`)]:t.borderDisabled||t.border,[i(`background-color`)]:t.backgroundDisabled||t.background}}},ln=(e,t,n,r,i,a)=>{let{componentCls:o}=e;return{[`&${o}-${t}`]:[cn(e,n),{[`&${o}-status-error`]:cn(e,{...n,...r}),[`&${o}-status-warning`]:cn(e,{...n,...i})},a]}},un=(e,t)=>({outline:`${p(e.lineWidth)} ${e.lineType} ${t}`,outlineOffset:p(e.calc(e.lineWidth).mul(-1).equal()),transition:[`outline-offset`,`outline`].map(e=>`${e} 0s`).join(`, `)}),dn=e=>{let{componentCls:t,fontHeight:n,controlHeight:i,fontSizeIcon:a,showArrowPaddingInlineEnd:o,iconCls:s,antCls:c,max:l,calc:u}=e,[d,f]=_(c,`select`),p=l(u(o).sub(a).equal(),0);return{[t]:[{[d(`border-radius`)]:e.borderRadius,[d(`border-color`)]:`#000`,[d(`border-size`)]:e.lineWidth,[d(`background-color`)]:e.colorBgContainer,[d(`font-size`)]:e.fontSize,[d(`line-height`)]:e.lineHeight,[d(`font-height`)]:n,[d(`color`)]:e.colorText,[d(`affix-color`)]:e.colorText,[d(`height`)]:i,[d(`padding-horizontal`)]:u(e.paddingSM).sub(e.lineWidth).equal(),[d(`padding-vertical`)]:`calc((${f(`height`)} - ${f(`font-height`)}) / 2 - ${f(`border-size`)})`,...T(e),display:`inline-flex`,flexWrap:`nowrap`,position:`relative`,transition:`all ${e.motionDurationSlow}`,alignItems:`flex-start`,outline:0,cursor:`pointer`,borderRadius:f(`border-radius`),borderWidth:f(`border-size`),borderStyle:e.lineType,borderColor:f(`border-color`),background:f(`background-color`),fontSize:f(`font-size`),lineHeight:f(`line-height`),color:f(`color`),paddingInline:f(`padding-horizontal`),paddingBlock:f(`padding-vertical`),[`${t}-prefix`]:{color:f(`affix-color`),flex:`none`,lineHeight:1},[`${t}-placeholder`]:{...r,color:e.colorTextPlaceholder,pointerEvents:`none`,zIndex:1},[`${t}-content`]:{flex:`auto`,minWidth:0,position:`relative`,display:`flex`,marginInlineEnd:p,"&:before":{content:`"\\a0"`,width:0,overflow:`hidden`},"&-value":{visibility:`inherit`},"input[readonly]":{cursor:`inherit`,caretColor:`transparent`}},[`${t}-suffix`]:{flex:`none`,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:`center`,[s]:{verticalAlign:`top`}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:`not-allowed`,input:{cursor:`not-allowed`}},"&-sm":{[d(`height`)]:e.controlHeightSM,[d(`padding-horizontal`)]:u(e.paddingXS).sub(e.lineWidth).equal(),[d(`border-radius`)]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:f(`padding-horizontal`)}},"&-lg":{[d(`height`)]:e.controlHeightLG,[d(`font-size`)]:e.fontSizeLG,[d(`line-height`)]:e.lineHeightLG,[d(`font-height`)]:e.fontHeightLG,[d(`border-radius`)]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:`none`,background:`transparent`,appearance:`none`,border:0,margin:0,padding:0,color:f(`color`),fontFamily:`inherit`,fontSize:`inherit`,"&::-webkit-search-cancel-button":{display:`none`,appearance:`none`}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:`absolute`,inset:0,lineHeight:`inherit`},[`${t}-content`]:{...r,alignSelf:`center`,"&-has-value":{display:`block`,"&:before":{display:`none`}},"&-has-search-value":{color:`transparent`,[`> *:not(${t}-input)`]:{opacity:0}},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1,opacity:1}},[`&${t}-open ${t}-content`]:{"&-has-value":{opacity:.25},"&-has-search-value":{opacity:1,transition:`opacity ${e.motionDurationMid} ${e.motionEaseInOut}`,color:`transparent`,[`> *:not(${t}-input)`]:{opacity:0}}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:`text`}},sn(e),ln(e,`outlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorBorderHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline,affixColor:e.colorErrorAffix},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline,affixColor:e.colorWarningAffix}),ln(e,`filled`,{border:`transparent`,borderHover:`transparent`,borderActive:e.activeBorderColor,borderOutline:`transparent`,borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{color:e.colorErrorText,background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),ln(e,`borderless`,{border:`transparent`,borderHover:`transparent`,borderActive:`transparent`,borderOutline:`transparent`,background:`transparent`},{},{},{[`&:not(${t}-disabled):has(input:focus-visible), &:not(${t}-disabled):has(textarea:focus-visible)`]:un(e,e.activeBorderColor),[`&${t}-status-error:not(${t}-disabled):has(input:focus-visible), &${t}-status-error:not(${t}-disabled):has(textarea:focus-visible)`]:un(e,e.colorError),[`&${t}-status-warning:not(${t}-disabled):has(input:focus-visible), &${t}-status-warning:not(${t}-disabled):has(textarea:focus-visible)`]:un(e,e.colorWarning)}),ln(e,`underlined`,{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:`transparent`},{border:e.colorError,borderHover:e.colorErrorBorderHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:`transparent`,borderInlineColor:`transparent`}),an(e)]}},fn=e=>{let{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:a,controlHeightLG:o,paddingXXS:s,controlPaddingHorizontal:c,zIndexPopupBase:l,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:p,colorBgContainer:m,colorFillSecondary:h,colorBgContainerDisabled:g,colorTextDisabled:_,colorPrimaryHover:v,colorPrimary:y,controlOutline:b}=e,x=s*2,S=r*2,C=Math.min(i-x,i-S),w=Math.min(a-x,a-S),T=Math.min(o-x,o-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:l+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:p,optionPadding:`${(i-t*n)/2}px ${c}px`,optionFontSize:t,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:o,multipleItemBg:h,multipleItemBorderColor:`transparent`,multipleItemHeight:C,multipleItemHeightSM:w,multipleItemHeightLG:T,multipleSelectorBgDisabled:g,multipleItemColorDisabled:_,multipleItemBorderColorDisabled:`transparent`,showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:b,selectAffixPadding:s}},pn=e=>{let{antCls:t,componentCls:n,motionDurationMid:i,inputPaddingHorizontalBase:a}=e,o={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:`50%`}};return{[n]:{...T(e),[`${n}-selection-item`]:{flex:1,fontWeight:`normal`,position:`relative`,userSelect:`none`,...r,[`> ${t}-typography`]:{display:`inline`}},[`${n}-prefix`]:{flex:`none`,marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:`absolute`,top:`50%`,insetInlineStart:`auto`,insetInlineEnd:a,zIndex:1,display:`inline-block`,width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:`normal`,lineHeight:1,textAlign:`center`,textTransform:`none`,cursor:`pointer`,opacity:0,transition:[`color`,`opacity`].map(e=>`${e} ${i} ease`).join(`, `),textRendering:`auto`,transform:`translateZ(0)`,"&:before":{display:`block`},"&:hover":{color:e.colorIcon}},"@media(hover:none)":o,"&:hover":o},[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(a).add(e.fontSize).add(e.paddingXS).equal()}}}}}},mn=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:`100%`}}},pn(e),rn(e),{[`${t}-rtl`]:{direction:`rtl`}},o(e,{focusElCls:`${t}-focused`})]},hn=b(`Select`,(e,{rootPrefixCls:t})=>{let n=R(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[mn(n),dn(n)]},fn,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});function gn({suffixIcon:e,contextSuffixIcon:t,clearIcon:n,contextClearIcon:r,menuItemSelectedIcon:i,contextMenuItemSelectedIcon:a,removeIcon:o,contextRemoveIcon:s,loading:c,loadingIcon:l,contextLoadingIcon:u,searchIcon:d,contextSearchIcon:f,multiple:p,hasFeedback:m,showSuffixIcon:h,feedbackIcon:g,showArrow:_,componentName:v}){return K.useMemo(()=>{let v=U(n,r,K.createElement(H,null)),y=t=>e===null&&!m&&!_?null:K.createElement(K.Fragment,null,h!==!1&&t,m&&g),b=null;b=e===void 0?c?y(U(l,u,K.createElement(M,{spin:!0}))):({open:e,showSearch:n})=>y(e&&n?U(d,f,K.createElement(me,null)):U(t,K.createElement(pe,null))):y(e);let x=U(i,a,p?K.createElement(W,null):null),S=U(o,s,K.createElement(ue,null));return{clearIcon:v,suffixIcon:b,itemIcon:x,removeIcon:S}},[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_])}function _n(e){return K.useMemo(()=>{if(e)return(...t)=>K.createElement(se,{space:!0},e.apply(void 0,t))},[e])}function vn(e,t){return t===void 0?e!==null:t}var yn=`SECRET_COMBOBOX_MODE_DO_NOT_USE`,bn=K.forwardRef((e,t)=>{let{prefixCls:r,bordered:i,className:a,rootClassName:o,getPopupContainer:s,popupClassName:c,dropdownClassName:l,listHeight:u=256,placement:d,listItemHeight:p,size:h,disabled:_,notFoundContent:v,status:b,builtinPlacements:x,dropdownMatchSelectWidth:S,popupMatchSelectWidth:T,direction:D,style:O,allowClear:A,variant:j,popupStyle:M,dropdownStyle:P,transitionName:F,tagRender:ee,maxCount:te,prefix:L,dropdownRender:ne,popupRender:R,onDropdownVisibleChange:z,onOpenChange:V,styles:ie,classNames:se,clearIcon:H,showSearch:ue,...U}=e,{getPopupContainer:W,getPrefixCls:de,renderEmpty:fe,direction:G,virtual:pe,popupMatchSelectWidth:me,popupOverflow:he}=K.useContext(f),{showSearch:ge,allowClear:q,style:_e,styles:ve,className:ye,classNames:J,clearIcon:Y,loadingIcon:be,menuItemSelectedIcon:xe,removeIcon:Se,suffixIcon:Ce}=ae(`select`),[,we]=k(),Te=p??we?.controlHeight,X=de(`select`,r),Ee=de(),De=D??G,{compactSize:Oe,compactItemClassnames:ke}=C(X,De),[Z,Ae]=I(`select`,j,i),je=re(X),[Me,Q]=hn(X,je),$=K.useMemo(()=>{let{mode:t}=e;if(t!==`combobox`)return t===yn?`combobox`:t},[e.mode]),Ne=$===`multiple`||$===`tags`,Pe=vn(e.suffixIcon,e.showArrow),Fe=T??S??me,Ie=_n(R||ne),Le=V||z,{status:Re,hasFeedback:ze,isFormItemInput:Be,feedbackIcon:Ve}=K.useContext(N),He=oe(Re,b),Ue;Ue=v===void 0?$===`combobox`?null:fe?.(`Select`)||K.createElement($t,{componentName:`Select`}):v;let{suffixIcon:We,itemIcon:Ge,removeIcon:Ke,clearIcon:qe}=gn({...U,multiple:Ne,hasFeedback:ze,feedbackIcon:Ve,showSuffixIcon:Pe,prefixCls:X,componentName:`Select`,clearIcon:H,searchIcon:Qt(ue,`searchIcon`),contextClearIcon:Y,contextLoadingIcon:be,contextMenuItemSelectedIcon:xe,contextRemoveIcon:Se,contextSearchIcon:Qt(ge,`searchIcon`),contextSuffixIcon:Ce}),Je=A??q,Ye=Je===!0?{clearIcon:qe}:Je,Xe=ue??ge,Ze=w(U,[`suffixIcon`,`itemIcon`]),Qe=m(e=>h??Oe??e),$e=K.useContext(E),et=_??$e,tt={...e,variant:Z,status:He,disabled:et,size:Qe},nt=g(_e),rt=g(O),[it,at]=B([J,se],[ve,nt,ie,rt],{props:tt},{popup:{_default:`root`}}),ot=y(it.popup.root,c,l,{[`${X}-dropdown-${De}`]:De===`rtl`},o,Q,je,Me),st={...at.popup?.root,...M??P},ct=y({[`${X}-lg`]:Qe===`large`,[`${X}-sm`]:Qe===`small`,[`${X}-rtl`]:De===`rtl`,[`${X}-${Z}`]:Ae,[`${X}-in-form-item`]:Be},ce(X,He,ze),ke,ye,a,it.root,o,Q,je,Me),lt=K.useMemo(()=>d===void 0?De===`rtl`?`bottomRight`:`bottomLeft`:d,[d,De]),[ut]=le(`SelectLike`,at.popup.root?.zIndex??st.zIndex);return K.createElement(Zt,{ref:t,virtual:pe,classNames:it,styles:at,showSearch:Xe,...Ze,style:at.root,popupMatchSelectWidth:Fe,transitionName:n(Ee,`slide-up`,F),builtinPlacements:tn(x,he),listHeight:u,listItemHeight:Te,mode:$,prefixCls:X,placement:lt,direction:De,prefix:L,suffixIcon:We,menuItemSelectedIcon:Ge,removeIcon:Ke,allowClear:Ye,notFoundContent:Ue,className:ct,getPopupContainer:s||W,popupClassName:ot,disabled:et,popupStyle:{...at.popup.root,...st,zIndex:ut},maxCount:Ne?te:void 0,tagRender:Ne?ee:void 0,popupRender:Ie,onPopupVisibleChange:Le})}),xn=fe(bn,`popupAlign`);bn.SECRET_COMBOBOX_MODE_DO_NOT_USE=yn,bn.Option=tt,bn.OptGroup=et,bn._InternalPanelDoNotUseOrYouWillBeFired=xn;var Sn=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z`}}]},name:`double-left`,theme:`outlined`}}))());function Cn(){return Cn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cn.apply(this,arguments)}var wn=K.forwardRef((e,t)=>K.createElement(c,Cn({},e,{ref:t,icon:Sn.default}))),Tn=e(t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z`}}]},name:`double-right`,theme:`outlined`}}))());function En(){return En=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},En.apply(this,arguments)}var Dn=K.forwardRef((e,t)=>K.createElement(c,En({},e,{ref:t,icon:Tn.default})));export{_n as a,tn as c,$e as d,q as f,vn as i,$t as l,wn as n,gn as o,bn as r,hn as s,Dn as t,Pt as u}; |