1 line
52 KiB
JavaScript
1 line
52 KiB
JavaScript
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8909],{24308:function(e,t,n){n.d(t,{c4:function(){return a}});var o=n(4942),r=n(87462),a=["xxl","xl","lg","md","sm","xs"],i={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},l=new Map,u=-1,c={};t.ZP={matchHandlers:{},dispatch:function(e){return c=e,l.forEach(function(e){return e(c)}),l.size>=1},subscribe:function(e){return l.size||this.register(),u+=1,l.set(u,e),e(c),u},unsubscribe:function(e){l.delete(e),l.size||this.unregister()},unregister:function(){var e=this;Object.keys(i).forEach(function(t){var n=i[t],o=e.matchHandlers[n];null==o||o.mql.removeListener(null==o?void 0:o.listener)}),l.clear()},register:function(){var e=this;Object.keys(i).forEach(function(t){var n=i[t],a=function(n){var a=n.matches;e.dispatch((0,r.Z)((0,r.Z)({},c),(0,o.Z)({},t,a)))},l=window.matchMedia(n);l.addListener(a),e.matchHandlers[n]={mql:l,listener:a},a(l)})}}},88258:function(e,t,n){var o=n(67294),r=n(53124),a=n(62986);t.Z=function(e){return o.createElement(r.C,null,function(t){var n=(0,t.getPrefixCls)("empty");switch(e){case"Table":case"List":return o.createElement(a.Z,{image:a.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return o.createElement(a.Z,{image:a.Z.PRESENTED_IMAGE_SIMPLE,className:"".concat(n,"-small")});default:return o.createElement(a.Z,null)}})}},62986:function(e,t,n){n.d(t,{Z:function(){return v}});var o=n(4942),r=n(87462),a=n(94184),i=n.n(a),l=n(67294),u=n(53124),c=n(23715),s=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)0>t.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n},f=l.createElement(function(){var e=(0,l.useContext(u.E_).getPrefixCls)("empty-img-default");return l.createElement("svg",{className:e,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},l.createElement("g",{fill:"none",fillRule:"evenodd"},l.createElement("g",{transform:"translate(24 31.67)"},l.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),l.createElement("path",{className:"".concat(e,"-path-1"),d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),l.createElement("path",{className:"".concat(e,"-path-2"),d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",transform:"translate(13.56)"}),l.createElement("path",{className:"".concat(e,"-path-3"),d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),l.createElement("path",{className:"".concat(e,"-path-4"),d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),l.createElement("path",{className:"".concat(e,"-path-5"),d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),l.createElement("g",{className:"".concat(e,"-g"),transform:"translate(149.65 15.383)"},l.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),l.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},null),d=l.createElement(function(){var e=(0,l.useContext(u.E_).getPrefixCls)("empty-img-simple");return l.createElement("svg",{className:e,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},l.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},l.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),l.createElement("g",{className:"".concat(e,"-g"),fillRule:"nonzero"},l.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),l.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",className:"".concat(e,"-path")}))))},null),p=function(e){var t=e.className,n=e.prefixCls,a=e.image,p=void 0===a?f:a,v=e.description,m=e.children,h=e.imageStyle,g=s(e,["className","prefixCls","image","description","children","imageStyle"]),b=l.useContext(u.E_),E=b.getPrefixCls,w=b.direction;return l.createElement(c.Z,{componentName:"Empty"},function(e){var a,u=E("empty",n),c=void 0!==v?v:e.description,s=null;return s="string"==typeof p?l.createElement("img",{alt:"string"==typeof c?c:"empty",src:p}):p,l.createElement("div",(0,r.Z)({className:i()(u,(a={},(0,o.Z)(a,"".concat(u,"-normal"),p===d),(0,o.Z)(a,"".concat(u,"-rtl"),"rtl"===w),a),t)},g),l.createElement("div",{className:"".concat(u,"-image"),style:h},s),c&&l.createElement("div",{className:"".concat(u,"-description")},c),m&&l.createElement("div",{className:"".concat(u,"-footer")},m))})};p.PRESENTED_IMAGE_DEFAULT=f,p.PRESENTED_IMAGE_SIMPLE=d;var v=p},38939:function(e,t,n){n.d(t,{Z:function(){return eD}});var o=n(4942),r=n(87462),a=n(94184),i=n.n(a),l=n(74902),u=n(1413),c=n(97685),s=n(45987),f=n(71002),d=n(21770),p=n(80334),v=n(67294),m=n(8410),h=n(31131),g=n(15105),b=n(42550),E=v.createContext(null);function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=v.useRef(null),n=v.useRef(null);return v.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]),[function(){return t.current},function(o){(o||null===t.current)&&(t.current=o),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}]}var Z=n(64217),y=n(34243),C=function(e){var t,n=e.className,o=e.customizeIcon,r=e.customizeIconProps,a=e.onMouseDown,l=e.onClick,u=e.children;return t="function"==typeof o?o(r):o,v.createElement("span",{className:n,onMouseDown:function(e){e.preventDefault(),a&&a(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:l,"aria-hidden":!0},void 0!==t?t:v.createElement("span",{className:i()(n.split(/\s+/).map(function(e){return"".concat(e,"-icon")}))},u))},S=v.forwardRef(function(e,t){var n,o,r=e.prefixCls,a=e.id,l=e.inputElement,c=e.disabled,s=e.tabIndex,f=e.autoFocus,d=e.autoComplete,m=e.editable,h=e.activeDescendantId,g=e.value,E=e.maxLength,w=e.onKeyDown,Z=e.onMouseDown,y=e.onChange,C=e.onPaste,S=e.onCompositionStart,x=e.onCompositionEnd,M=e.open,I=e.attrs,N=l||v.createElement("input",null),R=N,D=R.ref,T=R.props,O=T.onKeyDown,P=T.onChange,k=T.onMouseDown,L=T.onCompositionStart,V=T.onCompositionEnd,H=T.style;return(0,p.Kp)(!("maxLength"in N.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),N=v.cloneElement(N,(0,u.Z)((0,u.Z)((0,u.Z)({type:"search"},T),{},{id:a,ref:(0,b.sQ)(t,D),disabled:c,tabIndex:s,autoComplete:d||"off",autoFocus:f,className:i()("".concat(r,"-selection-search-input"),null===(n=N)||void 0===n?void 0:null===(o=n.props)||void 0===o?void 0:o.className),role:"combobox","aria-expanded":M,"aria-haspopup":"listbox","aria-owns":"".concat(a,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(a,"_list"),"aria-activedescendant":h},I),{},{value:m?g:"",maxLength:E,readOnly:!m,unselectable:m?null:"on",style:(0,u.Z)((0,u.Z)({},H),{},{opacity:m?null:0}),onKeyDown:function(e){w(e),O&&O(e)},onMouseDown:function(e){Z(e),k&&k(e)},onChange:function(e){y(e),P&&P(e)},onCompositionStart:function(e){S(e),L&&L(e)},onCompositionEnd:function(e){x(e),V&&V(e)},onPaste:C}))});function x(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}S.displayName="Input";var M="undefined"!=typeof window&&window.document&&window.document.documentElement;function I(e){return["string","number"].includes((0,f.Z)(e))}function N(e){var t=void 0;return e&&(I(e.title)?t=e.title.toString():I(e.label)&&(t=e.label.toString())),t}function R(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var D=function(e){e.preventDefault(),e.stopPropagation()},T=function(e){var t,n,r=e.id,a=e.prefixCls,l=e.values,u=e.open,s=e.searchValue,f=e.autoClearSearchValue,d=e.inputRef,p=e.placeholder,m=e.disabled,h=e.mode,g=e.showSearch,b=e.autoFocus,E=e.autoComplete,w=e.activeDescendantId,x=e.tabIndex,I=e.removeIcon,T=e.maxTagCount,O=e.maxTagTextLength,P=e.maxTagPlaceholder,k=void 0===P?function(e){return"+ ".concat(e.length," ...")}:P,L=e.tagRender,V=e.onToggleOpen,H=e.onRemove,_=e.onInputChange,A=e.onInputPaste,F=e.onInputKeyDown,z=e.onInputMouseDown,K=e.onInputCompositionStart,j=e.onInputCompositionEnd,W=v.useRef(null),U=(0,v.useState)(0),Y=(0,c.Z)(U,2),B=Y[0],G=Y[1],X=(0,v.useState)(!1),q=(0,c.Z)(X,2),Q=q[0],J=q[1],$="".concat(a,"-selection"),ee=u||"multiple"===h&&!1===f||"tags"===h?s:"";function et(e,t,n,r,a){return v.createElement("span",{className:i()("".concat($,"-item"),(0,o.Z)({},"".concat($,"-item-disabled"),n)),title:N(e)},v.createElement("span",{className:"".concat($,"-item-content")},t),r&&v.createElement(C,{className:"".concat($,"-item-remove"),onMouseDown:D,onClick:a,customizeIcon:I},"\xd7"))}t=function(){G(W.current.scrollWidth)},n=[ee],M?v.useLayoutEffect(t,n):v.useEffect(t,n);var en=v.createElement("div",{className:"".concat($,"-search"),style:{width:B},onFocus:function(){J(!0)},onBlur:function(){J(!1)}},v.createElement(S,{ref:d,open:u,prefixCls:a,id:r,inputElement:null,disabled:m,autoFocus:b,autoComplete:E,editable:"tags"===h||"multiple"===h&&!1===f||g&&(u||Q),activeDescendantId:w,value:ee,onKeyDown:F,onMouseDown:z,onChange:_,onPaste:A,onCompositionStart:K,onCompositionEnd:j,tabIndex:x,attrs:(0,Z.Z)(e,!0)}),v.createElement("span",{ref:W,className:"".concat($,"-search-mirror"),"aria-hidden":!0},ee,"\xa0")),eo=v.createElement(y.Z,{prefixCls:"".concat($,"-overflow"),data:l,renderItem:function(e){var t,n=e.disabled,o=e.label,r=e.value,a=!m&&!n,i=o;if("number"==typeof O&&("string"==typeof o||"number"==typeof o)){var l=String(i);l.length>O&&(i="".concat(l.slice(0,O),"..."))}var c=function(t){t&&t.stopPropagation(),H(e)};return"function"==typeof L?(t=i,v.createElement("span",{onMouseDown:function(e){D(e),V(!u)}},L({label:t,value:r,disabled:n,closable:a,onClose:c}))):et(e,i,n,a,c)},renderRest:function(e){var t="function"==typeof k?k(e):k;return et({title:t},t,!1)},suffix:en,itemKey:R,maxCount:T});return v.createElement(v.Fragment,null,eo,!l.length&&!ee&&v.createElement("span",{className:"".concat($,"-placeholder")},p))},O=function(e){var t=e.inputElement,n=e.prefixCls,o=e.id,r=e.inputRef,a=e.disabled,i=e.autoFocus,l=e.autoComplete,u=e.activeDescendantId,s=e.mode,f=e.open,d=e.values,p=e.placeholder,m=e.tabIndex,h=e.showSearch,g=e.searchValue,b=e.activeValue,E=e.maxLength,w=e.onInputKeyDown,y=e.onInputMouseDown,C=e.onInputChange,x=e.onInputPaste,M=e.onInputCompositionStart,I=e.onInputCompositionEnd,R=v.useState(!1),D=(0,c.Z)(R,2),T=D[0],O=D[1],P="combobox"===s,k=d[0],L=g||"";P&&b&&!T&&(L=b),v.useEffect(function(){P&&O(!1)},[P,b]);var V=("combobox"===s||!!f||!!h)&&!!L,H=N(k);return v.createElement(v.Fragment,null,v.createElement("span",{className:"".concat(n,"-selection-search")},v.createElement(S,{ref:r,prefixCls:n,id:o,open:f,inputElement:t,disabled:a,autoFocus:i,autoComplete:l,editable:P||h,activeDescendantId:u,value:L,onKeyDown:w,onMouseDown:y,onChange:function(e){O(!0),C(e)},onPaste:x,onCompositionStart:M,onCompositionEnd:I,tabIndex:m,attrs:(0,Z.Z)(e,!0),maxLength:P?E:void 0})),!P&&k&&!V&&v.createElement("span",{className:"".concat(n,"-selection-item"),title:H},k.label),k?null:v.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:V?{visibility:"hidden"}:void 0},p))},P=v.forwardRef(function(e,t){var n=(0,v.useRef)(null),o=(0,v.useRef)(!1),a=e.prefixCls,i=e.open,l=e.mode,u=e.showSearch,s=e.tokenWithEnter,f=e.onSearch,d=e.onSearchSubmit,p=e.onToggleOpen,m=e.onInputKeyDown,h=e.domRef;v.useImperativeHandle(t,function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}});var b=w(0),E=(0,c.Z)(b,2),Z=E[0],y=E[1],C=(0,v.useRef)(null),S=function(e){!1!==f(e,!0,o.current)&&p(!0)},x={inputRef:n,onInputKeyDown:function(e){var t=e.which;(t===g.Z.UP||t===g.Z.DOWN)&&e.preventDefault(),m&&m(e),t!==g.Z.ENTER||"tags"!==l||o.current||i||null==d||d(e.target.value),[g.Z.ESC,g.Z.SHIFT,g.Z.BACKSPACE,g.Z.TAB,g.Z.WIN_KEY,g.Z.ALT,g.Z.META,g.Z.WIN_KEY_RIGHT,g.Z.CTRL,g.Z.SEMICOLON,g.Z.EQUALS,g.Z.CAPS_LOCK,g.Z.CONTEXT_MENU,g.Z.F1,g.Z.F2,g.Z.F3,g.Z.F4,g.Z.F5,g.Z.F6,g.Z.F7,g.Z.F8,g.Z.F9,g.Z.F10,g.Z.F11,g.Z.F12].includes(t)||p(!0)},onInputMouseDown:function(){y(!0)},onInputChange:function(e){var t=e.target.value;if(s&&C.current&&/[\r\n]/.test(C.current)){var n=C.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,C.current)}C.current=null,S(t)},onInputPaste:function(e){var t=e.clipboardData.getData("text");C.current=t},onInputCompositionStart:function(){o.current=!0},onInputCompositionEnd:function(e){o.current=!1,"combobox"!==l&&S(e.target.value)}},M="multiple"===l||"tags"===l?v.createElement(T,(0,r.Z)({},e,x)):v.createElement(O,(0,r.Z)({},e,x));return v.createElement("div",{ref:h,className:"".concat(a,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout(function(){n.current.focus()}):n.current.focus())},onMouseDown:function(e){var t=Z();e.target===n.current||t||"combobox"===l||e.preventDefault(),("combobox"===l||u&&t)&&i||(i&&f("",!0,!1),p())}},M)});P.displayName="Selector";var k=n(81263),L=["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],V=function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},H=v.forwardRef(function(e,t){var n=e.prefixCls,a=(e.disabled,e.visible),l=e.children,c=e.popupElement,f=e.containerWidth,d=e.animation,p=e.transitionName,m=e.dropdownStyle,h=e.dropdownClassName,g=e.direction,b=e.placement,E=e.dropdownMatchSelectWidth,w=e.dropdownRender,Z=e.dropdownAlign,y=e.getPopupContainer,C=e.empty,S=e.getTriggerDOMNode,x=e.onPopupVisibleChange,M=e.onPopupMouseEnter,I=(0,s.Z)(e,L),N="".concat(n,"-dropdown"),R=c;w&&(R=w(c));var D=v.useMemo(function(){return V(E)},[E]),T=d?"".concat(N,"-").concat(d):p,O=v.useRef(null);v.useImperativeHandle(t,function(){return{getPopupElement:function(){return O.current}}});var P=(0,u.Z)({minWidth:f},m);return"number"==typeof E?P.width=E:E&&(P.width=f),v.createElement(k.Z,(0,r.Z)({},I,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:b||("rtl"===(void 0===g?"ltr":g)?"bottomRight":"bottomLeft"),builtinPlacements:D,prefixCls:N,popupTransitionName:T,popup:v.createElement("div",{ref:O,onMouseEnter:M},R),popupAlign:Z,popupVisible:a,getPopupContainer:y,popupClassName:i()(h,(0,o.Z)({},"".concat(N,"-empty"),C)),popupStyle:P,getTriggerDOMNode:S,onPopupVisibleChange:x}),l)});H.displayName="SelectTrigger";var _=n(84506);function A(e,t){var n,o=e.key;return("value"in e&&(n=e.value),null!=o)?o:void 0!==n?n:"rc-index-key-".concat(t)}function F(e,t){var n=e||{};return{label:n.label||(t?"children":"label"),value:n.value||"value",options:n.options||"options"}}function z(e){var t=(0,u.Z)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return(0,p.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var K=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","showArrow","inputIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],j=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function W(e){return"tags"===e||"multiple"===e}var U=v.forwardRef(function(e,t){var n,a,p,Z,y,S,x,M,I=e.id,N=e.prefixCls,R=e.className,D=e.showSearch,T=e.tagRender,O=e.direction,k=e.omitDomProps,L=e.displayValues,V=e.onDisplayValuesChange,A=e.emptyOptions,F=e.notFoundContent,z=void 0===F?"Not Found":F,U=e.onClear,Y=e.mode,B=e.disabled,G=e.loading,X=e.getInputElement,q=e.getRawInputElement,Q=e.open,J=e.defaultOpen,$=e.onDropdownVisibleChange,ee=e.activeValue,et=e.onActiveValueChange,en=e.activeDescendantId,eo=e.searchValue,er=e.autoClearSearchValue,ea=e.onSearch,ei=e.onSearchSplit,el=e.tokenSeparators,eu=e.allowClear,ec=e.showArrow,es=e.inputIcon,ef=e.clearIcon,ed=e.OptionList,ep=e.animation,ev=e.transitionName,em=e.dropdownStyle,eh=e.dropdownClassName,eg=e.dropdownMatchSelectWidth,eb=e.dropdownRender,eE=e.dropdownAlign,ew=e.placement,eZ=e.getPopupContainer,ey=e.showAction,eC=void 0===ey?[]:ey,eS=e.onFocus,ex=e.onBlur,eM=e.onKeyUp,eI=e.onKeyDown,eN=e.onMouseDown,eR=(0,s.Z)(e,K),eD=W(Y),eT=(void 0!==D?D:eD)||"combobox"===Y,eO=(0,u.Z)({},eR);j.forEach(function(e){delete eO[e]}),null==k||k.forEach(function(e){delete eO[e]});var eP=v.useState(!1),ek=(0,c.Z)(eP,2),eL=ek[0],eV=ek[1];v.useEffect(function(){eV((0,h.Z)())},[]);var eH=v.useRef(null),e_=v.useRef(null),eA=v.useRef(null),eF=v.useRef(null),ez=v.useRef(null),eK=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=v.useState(!1),n=(0,c.Z)(t,2),o=n[0],r=n[1],a=v.useRef(null),i=function(){window.clearTimeout(a.current)};return v.useEffect(function(){return i},[]),[o,function(t,n){i(),a.current=window.setTimeout(function(){r(t),n&&n()},e)},i]}(),ej=(0,c.Z)(eK,3),eW=ej[0],eU=ej[1],eY=ej[2];v.useImperativeHandle(t,function(){var e,t;return{focus:null===(e=eF.current)||void 0===e?void 0:e.focus,blur:null===(t=eF.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=ez.current)||void 0===t?void 0:t.scrollTo(e)}}});var eB=v.useMemo(function(){if("combobox"!==Y)return eo;var e,t=null===(e=L[0])||void 0===e?void 0:e.value;return"string"==typeof t||"number"==typeof t?String(t):""},[eo,Y,L]),eG="combobox"===Y&&"function"==typeof X&&X()||null,eX="function"==typeof q&&q(),eq=(0,b.x1)(e_,null==eX?void 0:null===(p=eX.props)||void 0===p?void 0:p.ref),eQ=(0,d.Z)(void 0,{defaultValue:J,value:Q}),eJ=(0,c.Z)(eQ,2),e$=eJ[0],e0=eJ[1],e1=e$,e2=!z&&A;(B||e2&&e1&&"combobox"===Y)&&(e1=!1);var e4=!e2&&e1,e3=v.useCallback(function(e){var t=void 0!==e?e:!e1;B||(e0(t),e1!==t&&(null==$||$(t)))},[B,e1,e0,$]),e5=v.useMemo(function(){return(el||[]).some(function(e){return["\n","\r\n"].includes(e)})},[el]),e7=function(e,t,n){var o=!0,r=e;null==et||et(null);var a=n?null:function(e,t){if(!t||!t.length)return null;var n=!1,o=function e(t,o){var r=(0,_.Z)(o),a=r[0],i=r.slice(1);if(!a)return[t];var u=t.split(a);return n=n||u.length>1,u.reduce(function(t,n){return[].concat((0,l.Z)(t),(0,l.Z)(e(n,i)))},[]).filter(function(e){return e})}(e,t);return n?o:null}(e,el);return"combobox"!==Y&&a&&(r="",null==ei||ei(a),e3(!1),o=!1),ea&&eB!==r&&ea(r,{source:t?"typing":"effect"}),o};v.useEffect(function(){e1||eD||"combobox"===Y||e7("",!1,!1)},[e1]),v.useEffect(function(){e$&&B&&e0(!1),B&&eU(!1)},[B]);var e6=w(),e9=(0,c.Z)(e6,2),e8=e9[0],te=e9[1],tt=v.useRef(!1),tn=[];v.useEffect(function(){return function(){tn.forEach(function(e){return clearTimeout(e)}),tn.splice(0,tn.length)}},[]);var to=v.useState(null),tr=(0,c.Z)(to,2),ta=tr[0],ti=tr[1],tl=v.useState({}),tu=(0,c.Z)(tl,2)[1];(0,m.Z)(function(){if(e4){var e,t=Math.ceil(null===(e=eH.current)||void 0===e?void 0:e.offsetWidth);ta===t||Number.isNaN(t)||ti(t)}},[e4]),eX&&(y=function(e){e3(e)}),n=function(){var e;return[eH.current,null===(e=eA.current)||void 0===e?void 0:e.getPopupElement()]},(a=v.useRef(null)).current={open:e4,triggerOpen:e3,customizedTrigger:!!eX},v.useEffect(function(){function e(e){if(null===(t=a.current)||void 0===t||!t.customizedTrigger){var t,o=e.target;o.shadowRoot&&e.composed&&(o=e.composedPath()[0]||o),a.current.open&&n().filter(function(e){return e}).every(function(e){return!e.contains(o)&&e!==o})&&a.current.triggerOpen(!1)}}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}},[]);var tc=v.useMemo(function(){return(0,u.Z)((0,u.Z)({},e),{},{notFoundContent:z,open:e1,triggerOpen:e4,id:I,showSearch:eT,multiple:eD,toggleOpen:e3})},[e,z,e4,e1,I,eT,eD,e3]),ts=void 0!==ec?ec:G||!eD&&"combobox"!==Y;ts&&(S=v.createElement(C,{className:i()("".concat(N,"-arrow"),(0,o.Z)({},"".concat(N,"-arrow-loading"),G)),customizeIcon:es,customizeIconProps:{loading:G,searchValue:eB,open:e1,focused:eW,showSearch:eT}})),!B&&eu&&(L.length||eB)&&!("combobox"===Y&&""===eB)&&(x=v.createElement(C,{className:"".concat(N,"-clear"),onMouseDown:function(){null==U||U(),V([],{type:"clear",values:L}),e7("",!1,!1)},customizeIcon:ef},"\xd7"));var tf=v.createElement(ed,{ref:ez}),td=i()(N,R,(Z={},(0,o.Z)(Z,"".concat(N,"-focused"),eW),(0,o.Z)(Z,"".concat(N,"-multiple"),eD),(0,o.Z)(Z,"".concat(N,"-single"),!eD),(0,o.Z)(Z,"".concat(N,"-allow-clear"),eu),(0,o.Z)(Z,"".concat(N,"-show-arrow"),ts),(0,o.Z)(Z,"".concat(N,"-disabled"),B),(0,o.Z)(Z,"".concat(N,"-loading"),G),(0,o.Z)(Z,"".concat(N,"-open"),e1),(0,o.Z)(Z,"".concat(N,"-customize-input"),eG),(0,o.Z)(Z,"".concat(N,"-show-search"),eT),Z)),tp=v.createElement(H,{ref:eA,disabled:B,prefixCls:N,visible:e4,popupElement:tf,containerWidth:ta,animation:ep,transitionName:ev,dropdownStyle:em,dropdownClassName:eh,direction:O,dropdownMatchSelectWidth:eg,dropdownRender:eb,dropdownAlign:eE,placement:ew,getPopupContainer:eZ,empty:A,getTriggerDOMNode:function(){return e_.current},onPopupVisibleChange:y,onPopupMouseEnter:function(){tu({})}},eX?v.cloneElement(eX,{ref:eq}):v.createElement(P,(0,r.Z)({},e,{domRef:e_,prefixCls:N,inputElement:eG,ref:eF,id:I,showSearch:eT,autoClearSearchValue:er,mode:Y,activeDescendantId:en,tagRender:T,values:L,open:e1,onToggleOpen:e3,activeValue:ee,searchValue:eB,onSearch:e7,onSearchSubmit:function(e){e&&e.trim()&&ea(e,{source:"submit"})},onRemove:function(e){V(L.filter(function(t){return t!==e}),{type:"remove",values:[e]})},tokenWithEnter:e5})));return M=eX?tp:v.createElement("div",(0,r.Z)({className:td},eO,{ref:eH,onMouseDown:function(e){var t,n=e.target,o=null===(t=eA.current)||void 0===t?void 0:t.getPopupElement();if(o&&o.contains(n)){var r=setTimeout(function(){var e,t=tn.indexOf(r);-1!==t&&tn.splice(t,1),eY(),eL||o.contains(document.activeElement)||null===(e=eF.current)||void 0===e||e.focus()});tn.push(r)}for(var a=arguments.length,i=Array(a>1?a-1:0),l=1;l<a;l++)i[l-1]=arguments[l];null==eN||eN.apply(void 0,[e].concat(i))},onKeyDown:function(e){var t,n=e8(),o=e.which;if(o!==g.Z.ENTER||("combobox"!==Y&&e.preventDefault(),e1||e3(!0)),te(!!eB),o===g.Z.BACKSPACE&&!n&&eD&&!eB&&L.length){for(var r=(0,l.Z)(L),a=null,i=r.length-1;i>=0;i-=1){var u=r[i];if(!u.disabled){r.splice(i,1),a=u;break}}a&&V(r,{type:"remove",values:[a]})}for(var c=arguments.length,s=Array(c>1?c-1:0),f=1;f<c;f++)s[f-1]=arguments[f];e1&&ez.current&&(t=ez.current).onKeyDown.apply(t,[e].concat(s)),null==eI||eI.apply(void 0,[e].concat(s))},onKeyUp:function(e){for(var t,n=arguments.length,o=Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];e1&&ez.current&&(t=ez.current).onKeyUp.apply(t,[e].concat(o)),null==eM||eM.apply(void 0,[e].concat(o))},onFocus:function(){eU(!0),!B&&(eS&&!tt.current&&eS.apply(void 0,arguments),eC.includes("focus")&&e3(!0)),tt.current=!0},onBlur:function(){eU(!1,function(){tt.current=!1,e3(!1)}),!B&&(eB&&("tags"===Y?ea(eB,{source:"submit"}):"multiple"===Y&&ea("",{source:"blur"})),ex&&ex.apply(void 0,arguments))}}),eW&&!e1&&v.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(L.map(function(e){var t=e.label,n=e.value;return["number","string"].includes((0,f.Z)(t))?t:n}).join(", "))),tp,S,x),v.createElement(E.Provider,{value:tc},M)}),Y=function(e,t){var n=v.useRef({values:new Map,options:new Map});return[v.useMemo(function(){var o=n.current,r=o.values,a=o.options,i=e.map(function(e){if(void 0===e.label){var t;return(0,u.Z)((0,u.Z)({},e),{},{label:null===(t=r.get(e.value))||void 0===t?void 0:t.label})}return e}),l=new Map,c=new Map;return i.forEach(function(e){l.set(e.value,e),c.set(e.value,t.get(e.value)||a.get(e.value))}),n.current.values=l,n.current.options=c,i},[e,t]),v.useCallback(function(e){return t.get(e)||n.current.options.get(e)},[t])]};function B(e,t){return x(e).join("").toUpperCase().includes(t)}var G=n(98924),X=0,q=(0,G.Z)(),Q=n(50344),J=["children","value"],$=["children"];function ee(e){var t=v.useRef();return t.current=e,v.useCallback(function(){return t.current.apply(t,arguments)},[])}var et=function(){return null};et.isSelectOptGroup=!0;var en=function(){return null};en.isSelectOption=!0;var eo=n(98423),er=n(56982),ea=n(73453),ei=v.createContext(null),el=["disabled","title","children","style","className"];function eu(e){return"string"==typeof e||"number"==typeof e}var ec=v.forwardRef(function(e,t){var n=v.useContext(E),a=n.prefixCls,u=n.id,f=n.open,d=n.multiple,p=n.mode,m=n.searchValue,h=n.toggleOpen,b=n.notFoundContent,w=n.onPopupScroll,y=v.useContext(ei),S=y.flattenOptions,x=y.onActiveValue,M=y.defaultActiveFirstOption,I=y.onSelect,N=y.menuItemSelectedIcon,R=y.rawValues,D=y.fieldNames,T=y.virtual,O=y.listHeight,P=y.listItemHeight,k="".concat(a,"-item"),L=(0,er.Z)(function(){return S},[f,S],function(e,t){return t[0]&&e[1]!==t[1]}),V=v.useRef(null),H=function(e){e.preventDefault()},_=function(e){V.current&&V.current.scrollTo("number"==typeof e?{index:e}:e)},A=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=L.length,o=0;o<n;o+=1){var r=(e+o*t+n)%n,a=L[r],i=a.group,l=a.data;if(!i&&!l.disabled)return r}return -1},F=v.useState(function(){return A(0)}),z=(0,c.Z)(F,2),K=z[0],j=z[1],W=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];j(e);var n={source:t?"keyboard":"mouse"},o=L[e];if(!o){x(null,-1,n);return}x(o.value,e,n)};(0,v.useEffect)(function(){W(!1!==M?A(0):-1)},[L.length,m]);var U=v.useCallback(function(e){return R.has(e)&&"combobox"!==p},[p,(0,l.Z)(R).toString(),R.size]);(0,v.useEffect)(function(){var e,t=setTimeout(function(){if(!d&&f&&1===R.size){var e=Array.from(R)[0],t=L.findIndex(function(t){return t.data.value===e});-1!==t&&(W(t),_(t))}});return f&&(null===(e=V.current)||void 0===e||e.scrollTo(void 0)),function(){return clearTimeout(t)}},[f,m]);var Y=function(e){void 0!==e&&I(e,{selected:!R.has(e)}),d||h(!1)};if(v.useImperativeHandle(t,function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case g.Z.N:case g.Z.P:case g.Z.UP:case g.Z.DOWN:var o=0;if(t===g.Z.UP?o=-1:t===g.Z.DOWN?o=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===g.Z.N?o=1:t===g.Z.P&&(o=-1)),0!==o){var r=A(K+o,o);_(r),W(r,!0)}break;case g.Z.ENTER:var a=L[K];a&&!a.data.disabled?Y(a.value):Y(void 0),f&&e.preventDefault();break;case g.Z.ESC:h(!1),f&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){_(e)}}}),0===L.length)return v.createElement("div",{role:"listbox",id:"".concat(u,"_list"),className:"".concat(k,"-empty"),onMouseDown:H},b);var B=Object.keys(D).map(function(e){return D[e]}),G=function(e){return e.label},X=function(e){var t=L[e];if(!t)return null;var n=t.data||{},o=n.value,a=t.group,i=(0,Z.Z)(n,!0),l=G(t);return t?v.createElement("div",(0,r.Z)({"aria-label":"string"!=typeof l||a?null:l},i,{key:e,role:a?"presentation":"option",id:"".concat(u,"_list_").concat(e),"aria-selected":U(o)}),o):null};return v.createElement(v.Fragment,null,v.createElement("div",{role:"listbox",id:"".concat(u,"_list"),style:{height:0,width:0,overflow:"hidden"}},X(K-1),X(K),X(K+1)),v.createElement(ea.Z,{itemKey:"key",ref:V,data:L,height:O,itemHeight:P,fullHeight:!1,onMouseDown:H,onScroll:w,virtual:T},function(e,t){var n=e.group,a=e.groupOption,l=e.data,u=e.label,c=e.value,f=l.key;if(n){var d,p,m=null!==(p=l.title)&&void 0!==p?p:eu(u)?u.toString():void 0;return v.createElement("div",{className:i()(k,"".concat(k,"-group")),title:m},void 0!==u?u:f)}var h=l.disabled,g=l.title,b=(l.children,l.style),E=l.className,w=(0,s.Z)(l,el),y=(0,eo.Z)(w,B),S=U(c),x="".concat(k,"-option"),M=i()(k,x,E,(d={},(0,o.Z)(d,"".concat(x,"-grouped"),a),(0,o.Z)(d,"".concat(x,"-active"),K===t&&!h),(0,o.Z)(d,"".concat(x,"-disabled"),h),(0,o.Z)(d,"".concat(x,"-selected"),S),d)),I=G(e),R="number"==typeof I?I:I||c,D=eu(R)?R.toString():void 0;return void 0!==g&&(D=g),v.createElement("div",(0,r.Z)({},(0,Z.Z)(y),{"aria-selected":S,className:M,title:D,onMouseMove:function(){K===t||h||W(t)},onClick:function(){h||Y(c)},style:b}),v.createElement("div",{className:"".concat(x,"-content")},R),v.isValidElement(N)||S,(!N||"function"==typeof N||S)&&v.createElement(C,{className:"".concat(k,"-option-state"),customizeIcon:N,customizeIconProps:{isSelected:S}},S?"✓":null))}))});ec.displayName="OptionList";var es=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],ef=["inputValue"],ed=v.forwardRef(function(e,t){var n,a,i,p,m,h=e.id,g=e.mode,b=e.prefixCls,E=e.backfill,w=e.fieldNames,Z=e.inputValue,y=e.searchValue,C=e.onSearch,S=e.autoClearSearchValue,M=void 0===S||S,I=e.onSelect,N=e.onDeselect,R=e.dropdownMatchSelectWidth,D=void 0===R||R,T=e.filterOption,O=e.filterSort,P=e.optionFilterProp,k=e.optionLabelProp,L=e.options,V=e.children,H=e.defaultActiveFirstOption,_=e.menuItemSelectedIcon,K=e.virtual,j=e.listHeight,G=void 0===j?200:j,et=e.listItemHeight,en=void 0===et?20:et,eo=e.value,er=e.defaultValue,ea=e.labelInValue,el=e.onChange,eu=(0,s.Z)(e,es),ed=(n=v.useState(),i=(a=(0,c.Z)(n,2))[0],p=a[1],v.useEffect(function(){var e;p("rc_select_".concat((q?(e=X,X+=1):e="TEST_OR_SSR",e)))},[]),h||i),ep=W(g),ev=!!(!L&&V),em=v.useMemo(function(){return(void 0!==T||"combobox"!==g)&&T},[T,g]),eh=v.useMemo(function(){return F(w,ev)},[JSON.stringify(w),ev]),eg=(0,d.Z)("",{value:void 0!==y?y:Z,postState:function(e){return e||""}}),eb=(0,c.Z)(eg,2),eE=eb[0],ew=eb[1],eZ=v.useMemo(function(){var e=L;L||(e=function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,Q.Z)(t).map(function(t,o){if(!v.isValidElement(t)||!t.type)return null;var r,a,i,l,c,f=t.type.isSelectOptGroup,d=t.key,p=t.props,m=p.children,h=(0,s.Z)(p,$);return n||!f?(r=t.key,i=(a=t.props).children,l=a.value,c=(0,s.Z)(a,J),(0,u.Z)({key:r,value:void 0!==l?l:r,children:i},c)):(0,u.Z)((0,u.Z)({key:"__RC_SELECT_GRP__".concat(null===d?o:d,"__"),label:d},h),{},{options:e(m)})}).filter(function(e){return e})}(V));var t=new Map,n=new Map,o=function(e,t,n){n&&"string"==typeof n&&e.set(t[n],t)};return function e(r){for(var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=0;i<r.length;i+=1){var l=r[i];!l[eh.options]||a?(t.set(l[eh.value],l),o(n,l,eh.label),o(n,l,P),o(n,l,k)):e(l[eh.options],!0)}}(e),{options:e,valueOptions:t,labelOptions:n}},[L,V,eh,P,k]),ey=eZ.valueOptions,eC=eZ.labelOptions,eS=eZ.options,ex=v.useCallback(function(e){return x(e).map(function(e){e&&"object"===(0,f.Z)(e)?(o=e.key,n=e.label,t=null!==(i=e.value)&&void 0!==i?i:o):t=e;var t,n,o,r,a,i,l,u=ey.get(t);return u&&(void 0===n&&(n=null==u?void 0:u[k||eh.label]),void 0===o&&(o=null!==(l=null==u?void 0:u.key)&&void 0!==l?l:t),r=null==u?void 0:u.disabled,a=null==u?void 0:u.title),{label:n,value:t,key:o,disabled:r,title:a}})},[eh,k,ey]),eM=(0,d.Z)(er,{value:eo}),eI=(0,c.Z)(eM,2),eN=eI[0],eR=eI[1],eD=Y(v.useMemo(function(){var e,t=ex(eN);return"combobox"!==g||null!==(e=t[0])&&void 0!==e&&e.value?t:[]},[eN,ex,g]),ey),eT=(0,c.Z)(eD,2),eO=eT[0],eP=eT[1],ek=v.useMemo(function(){if(!g&&1===eO.length){var e=eO[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return eO.map(function(e){var t;return(0,u.Z)((0,u.Z)({},e),{},{label:null!==(t=e.label)&&void 0!==t?t:e.value})})},[g,eO]),eL=v.useMemo(function(){return new Set(eO.map(function(e){return e.value}))},[eO]);v.useEffect(function(){if("combobox"===g){var e,t=null===(e=eO[0])||void 0===e?void 0:e.value;ew(null!=t?String(t):"")}},[eO]);var eV=ee(function(e,t){var n;return n={},(0,o.Z)(n,eh.value,e),(0,o.Z)(n,eh.label,null!=t?t:e),n}),eH=(m=v.useMemo(function(){if("tags"!==g)return eS;var e=(0,l.Z)(eS);return(0,l.Z)(eO).sort(function(e,t){return e.value<t.value?-1:1}).forEach(function(t){var n=t.value;ey.has(n)||e.push(eV(n,t.label))}),e},[eV,eS,ey,eO,g]),v.useMemo(function(){if(!eE||!1===em)return m;var e=eh.options,t=eh.label,n=eh.value,r=[],a="function"==typeof em,i=eE.toUpperCase(),l=a?em:function(o,r){return P?B(r[P],i):r[e]?B(r["children"!==t?t:"label"],i):B(r[n],i)},c=a?function(e){return z(e)}:function(e){return e};return m.forEach(function(t){if(t[e]){if(l(eE,c(t)))r.push(t);else{var n=t[e].filter(function(e){return l(eE,c(e))});n.length&&r.push((0,u.Z)((0,u.Z)({},t),{},(0,o.Z)({},e,n)))}return}l(eE,c(t))&&r.push(t)}),r},[m,em,P,eE,eh])),e_=v.useMemo(function(){return"tags"!==g||!eE||eH.some(function(e){return e[P||"value"]===eE})?eH:[eV(eE)].concat((0,l.Z)(eH))},[eV,P,g,eH,eE]),eA=v.useMemo(function(){return O?(0,l.Z)(e_).sort(function(e,t){return O(e,t)}):e_},[e_,O]),eF=v.useMemo(function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,o=t.childrenAsData,r=[],a=F(n,!1),i=a.label,l=a.value,u=a.options;return!function e(t,n){t.forEach(function(t){var a=t[i];if(!n&&u in t){var c=a;void 0===c&&o&&(c=t.label),r.push({key:A(t,r.length),group:!0,data:t,label:c}),e(t[u],!0)}else{var s=t[l];r.push({key:A(t,r.length),groupOption:n,data:t,label:a,value:s})}})}(e,!1),r}(eA,{fieldNames:eh,childrenAsData:ev})},[eA,eh,ev]),ez=function(e){var t=ex(e);if(eR(t),el&&(t.length!==eO.length||t.some(function(e,t){var n;return(null===(n=eO[t])||void 0===n?void 0:n.value)!==(null==e?void 0:e.value)}))){var n=ea?t:t.map(function(e){return e.value}),o=t.map(function(e){return z(eP(e.value))});el(ep?n:n[0],ep?o:o[0])}},eK=v.useState(null),ej=(0,c.Z)(eK,2),eW=ej[0],eU=ej[1],eY=v.useState(0),eB=(0,c.Z)(eY,2),eG=eB[0],eX=eB[1],eq=void 0!==H?H:"combobox"!==g,eQ=v.useCallback(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.source;eX(t),E&&"combobox"===g&&null!==e&&"keyboard"===(void 0===o?"keyboard":o)&&eU(String(e))},[E,g]),eJ=function(e,t,n){var o=function(){var t,n=eP(e);return[ea?{label:null==n?void 0:n[eh.label],value:e,key:null!==(t=null==n?void 0:n.key)&&void 0!==t?t:e}:e,z(n)]};if(t&&I){var r=o(),a=(0,c.Z)(r,2);I(a[0],a[1])}else if(!t&&N&&"clear"!==n){var i=o(),l=(0,c.Z)(i,2);N(l[0],l[1])}},e$=ee(function(e,t){var n=!ep||t.selected;ez(n?ep?[].concat((0,l.Z)(eO),[e]):[e]:eO.filter(function(t){return t.value!==e})),eJ(e,n),"combobox"===g?eU(""):(!W||M)&&(ew(""),eU(""))}),e0=v.useMemo(function(){return(0,u.Z)((0,u.Z)({},eZ),{},{flattenOptions:eF,onActiveValue:eQ,defaultActiveFirstOption:eq,onSelect:e$,menuItemSelectedIcon:_,rawValues:eL,fieldNames:eh,virtual:!1!==K&&!1!==D,listHeight:G,listItemHeight:en,childrenAsData:ev})},[eZ,eF,eQ,eq,e$,_,eL,eh,K,D,G,en,ev]);return v.createElement(ei.Provider,{value:e0},v.createElement(U,(0,r.Z)({},eu,{id:ed,prefixCls:void 0===b?"rc-select":b,ref:t,omitDomProps:ef,mode:g,displayValues:ek,onDisplayValuesChange:function(e,t){ez(e);var n=t.type,o=t.values;("remove"===n||"clear"===n)&&o.forEach(function(e){eJ(e.value,!1,n)})},searchValue:eE,onSearch:function(e,t){if(ew(e),eU(null),"submit"===t.source){var n=(e||"").trim();n&&(ez(Array.from(new Set([].concat((0,l.Z)(eL),[n])))),eJ(n,!0),ew(""));return}"blur"!==t.source&&("combobox"===g&&ez(e),null==C||C(e))},autoClearSearchValue:M,onSearchSplit:function(e){var t=e;"tags"!==g&&(t=e.map(function(e){var t=eC.get(e);return null==t?void 0:t.value}).filter(function(e){return void 0!==e}));var n=Array.from(new Set([].concat((0,l.Z)(eL),(0,l.Z)(t))));ez(n),n.forEach(function(e){eJ(e,!0)})},dropdownMatchSelectWidth:D,OptionList:ec,emptyOptions:!eF.length,activeValue:eW,activeDescendantId:"".concat(ed,"_list_").concat(eG)})))});ed.Option=en,ed.OptGroup=et;var ep=n(53124),ev=n(88258),em=n(98866),eh=n(97647),eg=n(65223),eb=n(33603),eE=n(9708),ew=n(63606),eZ=n(4340),ey=n(97937),eC=n(80882),eS=n(50888),ex=n(68795),eM=n(4173),eI=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)0>t.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n},eN="SECRET_COMBOBOX_MODE_DO_NOT_USE",eR=v.forwardRef(function(e,t){var n,a,l=e.prefixCls,u=e.bordered,c=e.className,s=e.getPopupContainer,f=e.dropdownClassName,d=e.popupClassName,p=e.listHeight,m=e.placement,h=e.listItemHeight,g=e.size,b=e.disabled,E=e.notFoundContent,w=e.status,Z=e.showArrow,y=eI(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),C=v.useContext(ep.E_),S=C.getPopupContainer,x=C.getPrefixCls,M=C.renderEmpty,I=C.direction,N=C.virtual,R=C.dropdownMatchSelectWidth,D=v.useContext(eh.Z),T=x("select",l),O=x(),P=(0,eM.ri)(T,I),k=P.compactSize,L=P.compactItemClassnames,V=v.useMemo(function(){var e=y.mode;return"combobox"===e?void 0:e===eN?"combobox":e},[y.mode]),H="multiple"===V||"tags"===V,_=void 0!==Z?Z:y.loading||!(H||"combobox"===V),A=(0,v.useContext)(eg.aM),F=A.status,z=A.hasFeedback,K=A.isFormItemInput,j=A.feedbackIcon,W=(0,eE.F)(F,w);a=void 0!==E?E:"combobox"===V?null:(M||ev.Z)("Select");var U=function(e){var t=e.suffixIcon,n=e.clearIcon,o=e.menuItemSelectedIcon,r=e.removeIcon,a=e.loading,i=e.multiple,l=e.hasFeedback,u=e.prefixCls,c=e.showArrow,s=e.feedbackIcon,f=null!=n?n:v.createElement(eZ.Z,null),d=function(e){return v.createElement(v.Fragment,null,!1!==c&&e,l&&s)},p=null;if(void 0!==t)p=d(t);else if(a)p=d(v.createElement(eS.Z,{spin:!0}));else{var m="".concat(u,"-suffix");p=function(e){var t=e.open,n=e.showSearch;return t&&n?d(v.createElement(ex.Z,{className:m})):d(v.createElement(eC.Z,{className:m}))}}var h=null;return h=void 0!==o?o:i?v.createElement(ew.Z,null):null,{clearIcon:f,suffixIcon:p,itemIcon:h,removeIcon:void 0!==r?r:v.createElement(ey.Z,null)}}((0,r.Z)((0,r.Z)({},y),{multiple:H,hasFeedback:z,feedbackIcon:j,showArrow:_,prefixCls:T})),Y=U.suffixIcon,B=U.itemIcon,G=U.removeIcon,X=U.clearIcon,q=(0,eo.Z)(y,["suffixIcon","itemIcon"]),Q=i()(d||f,(0,o.Z)({},"".concat(T,"-dropdown-").concat(I),"rtl"===I)),J=k||g||D,$=v.useContext(em.Z),ee=i()((n={},(0,o.Z)(n,"".concat(T,"-lg"),"large"===J),(0,o.Z)(n,"".concat(T,"-sm"),"small"===J),(0,o.Z)(n,"".concat(T,"-rtl"),"rtl"===I),(0,o.Z)(n,"".concat(T,"-borderless"),!(void 0===u||u)),(0,o.Z)(n,"".concat(T,"-in-form-item"),K),n),(0,eE.Z)(T,W,z),L,c);return v.createElement(ed,(0,r.Z)({ref:t,virtual:N,dropdownMatchSelectWidth:R},q,{transitionName:(0,eb.mL)(O,(0,eb.q0)(m),y.transitionName),listHeight:void 0===p?256:p,listItemHeight:void 0===h?24:h,mode:V,prefixCls:T,placement:void 0!==m?m:"rtl"===I?"bottomRight":"bottomLeft",direction:I,inputIcon:Y,menuItemSelectedIcon:B,removeIcon:G,clearIcon:X,notFoundContent:a,className:ee,getPopupContainer:s||S,dropdownClassName:Q,showArrow:z||Z,disabled:null!=b?b:$}))});eR.SECRET_COMBOBOX_MODE_DO_NOT_USE=eN,eR.Option=en,eR.OptGroup=et;var eD=eR},73453:function(e,t,n){n.d(t,{Z:function(){return O}});var o=n(87462),r=n(4942),a=n(1413),i=n(97685),l=n(45987),u=n(67294),c=n(94184),s=n.n(c),f=n(48555),d=u.forwardRef(function(e,t){var n=e.height,o=e.offset,i=e.children,l=e.prefixCls,c=e.onInnerResize,d={},p={display:"flex",flexDirection:"column"};return void 0!==o&&(d={height:n,position:"relative",overflow:"hidden"},p=(0,a.Z)((0,a.Z)({},p),{},{transform:"translateY(".concat(o,"px)"),position:"absolute",left:0,right:0,top:0})),u.createElement("div",{style:d},u.createElement(f.default,{onResize:function(e){e.offsetHeight&&c&&c()}},u.createElement("div",{style:p,className:s()((0,r.Z)({},"".concat(l,"-holder-inner"),l)),ref:t},i)))});d.displayName="Filler";var p=n(15671),v=n(43144),m=n(60136),h=n(33643),g=n(75164);function b(e){return"touches"in e?e.touches[0].pageY:e.pageY}var E=function(e){(0,m.Z)(n,e);var t=(0,h.Z)(n);function n(){var e;(0,p.Z)(this,n);for(var o=arguments.length,r=Array(o),a=0;a<o;a++)r[a]=arguments[a];return(e=t.call.apply(t,[this].concat(r))).moveRaf=null,e.scrollbarRef=u.createRef(),e.thumbRef=u.createRef(),e.visibleTimeout=null,e.state={dragging:!1,pageY:null,startTop:null,visible:!1},e.delayHidden=function(){clearTimeout(e.visibleTimeout),e.setState({visible:!0}),e.visibleTimeout=setTimeout(function(){e.setState({visible:!1})},2e3)},e.onScrollbarTouchStart=function(e){e.preventDefault()},e.onContainerMouseDown=function(e){e.stopPropagation(),e.preventDefault()},e.patchEvents=function(){window.addEventListener("mousemove",e.onMouseMove),window.addEventListener("mouseup",e.onMouseUp),e.thumbRef.current.addEventListener("touchmove",e.onMouseMove),e.thumbRef.current.addEventListener("touchend",e.onMouseUp)},e.removeEvents=function(){var t;window.removeEventListener("mousemove",e.onMouseMove),window.removeEventListener("mouseup",e.onMouseUp),null===(t=e.scrollbarRef.current)||void 0===t||t.removeEventListener("touchstart",e.onScrollbarTouchStart),e.thumbRef.current&&(e.thumbRef.current.removeEventListener("touchstart",e.onMouseDown),e.thumbRef.current.removeEventListener("touchmove",e.onMouseMove),e.thumbRef.current.removeEventListener("touchend",e.onMouseUp)),g.Z.cancel(e.moveRaf)},e.onMouseDown=function(t){var n=e.props.onStartMove;e.setState({dragging:!0,pageY:b(t),startTop:e.getTop()}),n(),e.patchEvents(),t.stopPropagation(),t.preventDefault()},e.onMouseMove=function(t){var n=e.state,o=n.dragging,r=n.pageY,a=n.startTop,i=e.props.onScroll;if(g.Z.cancel(e.moveRaf),o){var l=b(t)-r,u=e.getEnableScrollRange(),c=e.getEnableHeightRange(),s=Math.ceil((c?(a+l)/c:0)*u);e.moveRaf=(0,g.Z)(function(){i(s)})}},e.onMouseUp=function(){var t=e.props.onStopMove;e.setState({dragging:!1}),t(),e.removeEvents()},e.getSpinHeight=function(){var t=e.props,n=t.height,o=n/t.count*10;return Math.floor(o=Math.min(o=Math.max(o,20),n/2))},e.getEnableScrollRange=function(){var t=e.props;return t.scrollHeight-t.height||0},e.getEnableHeightRange=function(){return e.props.height-e.getSpinHeight()||0},e.getTop=function(){var t=e.props.scrollTop,n=e.getEnableScrollRange(),o=e.getEnableHeightRange();return 0===t||0===n?0:t/n*o},e.showScroll=function(){var t=e.props,n=t.height;return t.scrollHeight>n},e}return(0,v.Z)(n,[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(e){e.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var e=this.state,t=e.dragging,n=e.visible,o=this.props.prefixCls,a=this.getSpinHeight(),i=this.getTop(),l=this.showScroll();return u.createElement("div",{ref:this.scrollbarRef,className:s()("".concat(o,"-scrollbar"),(0,r.Z)({},"".concat(o,"-scrollbar-show"),l)),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:l&&n?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden},u.createElement("div",{ref:this.thumbRef,className:s()("".concat(o,"-scrollbar-thumb"),(0,r.Z)({},"".concat(o,"-scrollbar-thumb-moving"),t)),style:{width:"100%",height:a,top:i,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown}))}}]),n}(u.Component);function w(e){var t=e.children,n=e.setRef,o=u.useCallback(function(e){n(e)},[]);return u.cloneElement(t,{ref:o})}var Z=n(34203),y=function(){function e(){(0,p.Z)(this,e),this.maps=void 0,this.maps=Object.create(null)}return(0,v.Z)(e,[{key:"set",value:function(e,t){this.maps[e]=t}},{key:"get",value:function(e){return this.maps[e]}}]),e}(),C=n(71002),S=("undefined"==typeof navigator?"undefined":(0,C.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),x=function(e,t){var n=(0,u.useRef)(!1),o=(0,u.useRef)(null),r=(0,u.useRef)({top:e,bottom:t});return r.current.top=e,r.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=e<0&&r.current.top||e>0&&r.current.bottom;return t&&a?(clearTimeout(o.current),n.current=!1):(!a||n.current)&&(clearTimeout(o.current),n.current=!0,o.current=setTimeout(function(){n.current=!1},50)),!n.current&&a}},M=n(8410),I=14/15,N=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll","onVisibleChange"],R=[],D={overflowY:"auto",overflowAnchor:"none"},T=u.forwardRef(function(e,t){var n,c,f,p,v,m,h,b,T,O,P,k,L,V,H,_,A,F,z,K,j,W,U,Y,B,G,X=e.prefixCls,q=void 0===X?"rc-virtual-list":X,Q=e.className,J=e.height,$=e.itemHeight,ee=e.fullHeight,et=e.style,en=e.data,eo=e.children,er=e.itemKey,ea=e.virtual,ei=e.component,el=e.onScroll,eu=e.onVisibleChange,ec=(0,l.Z)(e,N),es=!!(!1!==ea&&J&&$),ef=es&&en&&$*en.length>J,ed=(0,u.useState)(0),ep=(0,i.Z)(ed,2),ev=ep[0],em=ep[1],eh=(0,u.useState)(!1),eg=(0,i.Z)(eh,2),eb=eg[0],eE=eg[1],ew=s()(q,Q),eZ=en||R,ey=(0,u.useRef)(),eC=(0,u.useRef)(),eS=(0,u.useRef)(),ex=u.useCallback(function(e){return"function"==typeof er?er(e):null==e?void 0:e[er]},[er]);function eM(e){em(function(t){var n,o=(n="function"==typeof e?e(t):e,Number.isNaN(ej.current)||(n=Math.min(n,ej.current)),n=Math.max(n,0));return ey.current.scrollTop=o,o})}var eI=(0,u.useRef)({start:0,end:eZ.length}),eN=(0,u.useRef)(),eR=(c=u.useState(eZ),p=(f=(0,i.Z)(c,2))[0],v=f[1],m=u.useState(null),b=(h=(0,i.Z)(m,2))[0],T=h[1],u.useEffect(function(){var e=function(e,t,n){var o,r,a=e.length,i=t.length;if(0===a&&0===i)return null;a<i?(o=e,r=t):(o=t,r=e);var l={__EMPTY_ITEM__:!0};function u(e){return void 0!==e?n(e):l}for(var c=null,s=1!==Math.abs(a-i),f=0;f<r.length;f+=1){var d=u(o[f]);if(d!==u(r[f])){c=f,s=s||d!==u(r[f+1]);break}}return null===c?null:{index:c,multiple:s}}(p||[],eZ||[],ex);(null==e?void 0:e.index)!==void 0&&(null==n||n(e.index),T(eZ[e.index])),v(eZ)},[eZ]),[b]),eD=(0,i.Z)(eR,1)[0];eN.current=eD;var eT=function(e,t,n){var o=u.useState(0),r=(0,i.Z)(o,2),a=r[0],l=r[1],c=(0,u.useRef)(new Map),s=(0,u.useRef)(new y),f=(0,u.useRef)();function d(){g.Z.cancel(f.current)}function p(){d(),f.current=(0,g.Z)(function(){c.current.forEach(function(e,t){if(e&&e.offsetParent){var n=(0,Z.Z)(e),o=n.offsetHeight;s.current.get(t)!==o&&s.current.set(t,n.offsetHeight)}}),l(function(e){return e+1})})}return(0,u.useEffect)(function(){return d},[]),[function(o,r){var a=e(o),i=c.current.get(a);r?(c.current.set(a,r),p()):c.current.delete(a),!i!=!r&&(r?null==t||t(o):null==n||n(o))},p,s.current,a]}(ex,null,null),eO=(0,i.Z)(eT,4),eP=eO[0],ek=eO[1],eL=eO[2],eV=eO[3],eH=u.useMemo(function(){if(!es)return{scrollHeight:void 0,start:0,end:eZ.length-1,offset:void 0};if(!ef)return{scrollHeight:(null===(e=eC.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:eZ.length-1,offset:void 0};for(var e,t,n,o,r=0,a=eZ.length,i=0;i<a;i+=1){var l=ex(eZ[i]),u=eL.get(l),c=r+(void 0===u?$:u);c>=ev&&void 0===t&&(t=i,n=r),c>ev+J&&void 0===o&&(o=i),r=c}return void 0===t&&(t=0,n=0,o=Math.ceil(J/$)),void 0===o&&(o=eZ.length-1),{scrollHeight:r,start:t,end:o=Math.min(o+1,eZ.length),offset:n}},[ef,es,ev,eZ,eV,J]),e_=eH.scrollHeight,eA=eH.start,eF=eH.end,ez=eH.offset;eI.current.start=eA,eI.current.end=eF;var eK=e_-J,ej=(0,u.useRef)(eK);ej.current=eK;var eW=ev<=0,eU=ev>=eK,eY=x(eW,eU),eB=(O=function(e){eM(function(t){return t+e})},P=(0,u.useRef)(0),k=(0,u.useRef)(null),L=(0,u.useRef)(null),V=(0,u.useRef)(!1),H=x(eW,eU),[function(e){if(es){g.Z.cancel(k.current);var t=e.deltaY;P.current+=t,L.current=t,H(t)||(S||e.preventDefault(),k.current=(0,g.Z)(function(){var e=V.current?10:1;O(P.current*e),P.current=0}))}},function(e){es&&(V.current=e.detail===L.current)}]),eG=(0,i.Z)(eB,2),eX=eG[0],eq=eG[1];_=function(e,t){return!eY(e,t)&&(eX({preventDefault:function(){},deltaY:e}),!0)},F=(0,u.useRef)(!1),z=(0,u.useRef)(0),K=(0,u.useRef)(null),j=(0,u.useRef)(null),W=function(e){if(F.current){var t=Math.ceil(e.touches[0].pageY),n=z.current-t;z.current=t,_(n)&&e.preventDefault(),clearInterval(j.current),j.current=setInterval(function(){(!_(n*=I,!0)||.1>=Math.abs(n))&&clearInterval(j.current)},16)}},U=function(){F.current=!1,A()},Y=function(e){A(),1!==e.touches.length||F.current||(F.current=!0,z.current=Math.ceil(e.touches[0].pageY),K.current=e.target,K.current.addEventListener("touchmove",W),K.current.addEventListener("touchend",U))},A=function(){K.current&&(K.current.removeEventListener("touchmove",W),K.current.removeEventListener("touchend",U))},(0,M.Z)(function(){return es&&ey.current.addEventListener("touchstart",Y),function(){var e;null===(e=ey.current)||void 0===e||e.removeEventListener("touchstart",Y),A(),clearInterval(j.current)}},[es]),(0,M.Z)(function(){function e(e){es&&e.preventDefault()}return ey.current.addEventListener("wheel",eX),ey.current.addEventListener("DOMMouseScroll",eq),ey.current.addEventListener("MozMousePixelScroll",e),function(){ey.current&&(ey.current.removeEventListener("wheel",eX),ey.current.removeEventListener("DOMMouseScroll",eq),ey.current.removeEventListener("MozMousePixelScroll",e))}},[es]);var eQ=(B=function(){var e;null===(e=eS.current)||void 0===e||e.delayHidden()},G=u.useRef(),function(e){if(null==e){B();return}if(g.Z.cancel(G.current),"number"==typeof e)eM(e);else if(e&&"object"===(0,C.Z)(e)){var t,n=e.align;t="index"in e?e.index:eZ.findIndex(function(t){return ex(t)===e.key});var o=e.offset,r=void 0===o?0:o;!function e(o,a){if(!(o<0)&&ey.current){var i=ey.current.clientHeight,l=!1,u=a;if(i){for(var c=0,s=0,f=0,d=Math.min(eZ.length,t),p=0;p<=d;p+=1){var v=ex(eZ[p]);s=c;var m=eL.get(v);c=f=s+(void 0===m?$:m),p===t&&void 0===m&&(l=!0)}var h=null;switch(a||n){case"top":h=s-r;break;case"bottom":h=f-i+r;break;default:var b=ey.current.scrollTop;s<b?u="top":f>b+i&&(u="bottom")}null!==h&&h!==ey.current.scrollTop&&eM(h)}G.current=(0,g.Z)(function(){l&&ek(),e(o-1,u)})}}(3)}});u.useImperativeHandle(t,function(){return{scrollTo:eQ}}),(0,M.Z)(function(){eu&&eu(eZ.slice(eA,eF+1),eZ)},[eA,eF,eZ]);var eJ=eZ.slice(eA,eF+1).map(function(e,t){var n=eo(e,eA+t,{}),o=ex(e);return u.createElement(w,{key:o,setRef:function(t){return eP(e,t)}},n)}),e$=null;return J&&(e$=(0,a.Z)((0,r.Z)({},void 0===ee||ee?"height":"maxHeight",J),D),es&&(e$.overflowY="hidden",eb&&(e$.pointerEvents="none"))),u.createElement("div",(0,o.Z)({style:(0,a.Z)((0,a.Z)({},et),{},{position:"relative"}),className:ew},ec),u.createElement(void 0===ei?"div":ei,{className:"".concat(q,"-holder"),style:e$,ref:ey,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==ev&&eM(t),null==el||el(e)}},u.createElement(d,{prefixCls:q,height:e_,offset:ez,onInnerResize:ek,ref:eC},eJ)),es&&u.createElement(E,{ref:eS,prefixCls:q,scrollTop:ev,height:J,scrollHeight:e_,count:eZ.length,onScroll:function(e){eM(e)},onStartMove:function(){eE(!0)},onStopMove:function(){eE(!1)}}))});T.displayName="List";var O=T}}]); |