@para-ui/core 4.0.21 → 4.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cascader/index.js +2 -2
- package/ComboSelect/index.js +1 -1
- package/DynamicMultiBox/index.js +1 -1
- package/Form/index.js +2 -2
- package/FormItem/index.js +2 -2
- package/Pagination/index.js +2 -2
- package/README.md +4 -0
- package/Tree/index.js +2 -2
- package/_verture/{index-f59b0bc0.js → index-066d47d4.js} +594 -591
- package/_verture/{index-c77ccb98.js → index-b892f976.js} +5 -1
- package/index.js +3 -3
- package/package.json +1 -1
- package/umd/AutoBox.js +2 -2
- package/umd/AutoTips.js +4 -4
- package/umd/Breadcrumbs.js +4 -4
- package/umd/Button.js +4 -4
- package/umd/ButtonGroup.js +4 -4
- package/umd/Cascader.js +3 -3
- package/umd/Checkbox.js +2 -2
- package/umd/CheckboxGroup.js +2 -2
- package/umd/Collapse.js +2 -2
- package/umd/CollapseBox.js +1 -1
- package/umd/ComboSelect.js +3 -3
- package/umd/CopyText.js +4 -4
- package/umd/CycleSelector.js +2 -2
- package/umd/DatePicker.js +4 -4
- package/umd/Descriptions.js +2 -2
- package/umd/Desktop.js +2 -2
- package/umd/Drawer.js +2 -2
- package/umd/Dropdown.js +2 -2
- package/umd/DynamicMultiBox.js +3 -3
- package/umd/Form.js +3 -3
- package/umd/FormItem.js +3 -3
- package/umd/FunctionModal.js +5 -5
- package/umd/Help.js +2 -2
- package/umd/InputLang.js +4 -4
- package/umd/InputNumber.js +2 -2
- package/umd/Label.js +2 -2
- package/umd/Menu.js +2 -2
- package/umd/Modal.js +6 -6
- package/umd/MultiBox.js +2 -2
- package/umd/Notification.js +1 -1
- package/umd/OperateBtn.js +2 -2
- package/umd/PageHeader.js +2 -2
- package/umd/Pagination.js +2 -2
- package/umd/PopConfirm.js +2 -2
- package/umd/PopMenu.js +2 -2
- package/umd/Popover.js +2 -2
- package/umd/Progress.js +1 -1
- package/umd/QuickReply.js +2 -2
- package/umd/Radio.js +2 -2
- package/umd/RadioGroup.js +2 -2
- package/umd/Search.js +2 -2
- package/umd/Select.js +2 -2
- package/umd/SelectInput.js +2 -2
- package/umd/Selector.js +2 -2
- package/umd/SelectorPicker.js +2 -2
- package/umd/SingleBox.js +2 -2
- package/umd/Slider.js +2 -2
- package/umd/Stepper.js +2 -2
- package/umd/Switch.js +2 -2
- package/umd/Table.js +2 -2
- package/umd/Tabs.js +2 -2
- package/umd/Tag.js +2 -2
- package/umd/TextEditor.js +17 -17
- package/umd/TextField.js +2 -2
- package/umd/TimePicker.js +4 -4
- package/umd/Title.js +6 -6
- package/umd/ToggleButton.js +4 -4
- package/umd/Tooltip.js +2 -2
- package/umd/Transfer.js +2 -2
- package/umd/Tree.js +2 -2
- package/umd/Upload.js +2 -2
- /package/_verture/{index-fa1ee687.js → index-4b965dd7.js} +0 -0
package/umd/Select.js
CHANGED
|
@@ -18,7 +18,7 @@ object-assign
|
|
|
18
18
|
(c) Sindre Sorhus
|
|
19
19
|
@license MIT
|
|
20
20
|
*/var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,r){for(var i,a,c=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var s in i=Object(arguments[l]))n.call(i,s)&&(c[s]=i[s]);if(t){a=t(i);for(var p=0;p<a.length;p++)o.call(i,a[p])&&(c[a[p]]=i[a[p]])}}return c}},44785:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var o=n(64467),r=n(89379),i=n(3453),a=n(82284),c=n(39155),l=n(66588),s=n(8719),p=n(46942),u=n.n(p),f=n(80371),d=n(25931),m=n(25318),v=n(72137),h=n(58515);const g=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===(0,a.A)(e)&&(t=e.transitionSupport);var p=c.forwardRef((function(e,t){var a=e.visible,p=void 0===a||a,g=e.removeOnLeave,y=void 0===g||g,b=e.forceRender,w=e.children,x=e.motionName,A=e.leavedClassName,O=e.eventProps,E=n(e),S=(0,c.useRef)(),k=(0,c.useRef)();var C=(0,m.A)(E,p,(function(){try{return(0,l.A)(S.current||k.current)}catch(e){return null}}),e),M=(0,i.A)(C,4),j=M[0],P=M[1],T=M[2],_=M[3],N=c.useRef(_);_&&(N.current=!0);var D=(0,c.useRef)(t);D.current=t;var L,R=c.useCallback((function(e){S.current=e,(0,s.Xf)(D.current,e)}),[]),H=(0,r.A)((0,r.A)({},O),{},{visible:p});if(w)if(j!==d.SF&&n(e)){var I,z;P===d.px?z="prepare":(0,h.$m)(P)?z="active":P===d.Mv&&(z="start"),L=w((0,r.A)((0,r.A)({},H),{},{className:u()((0,f.by)(x,j),(I={},(0,o.A)(I,(0,f.by)(x,"".concat(j,"-").concat(z)),z),(0,o.A)(I,x,"string"==typeof x),I)),style:T}),R)}else L=_?w((0,r.A)({},H),R):!y&&N.current?w((0,r.A)((0,r.A)({},H),{},{className:A}),R):b?w((0,r.A)((0,r.A)({},H),{},{style:{display:"none"}}),R):null;else L=null;return c.createElement(v.A,{ref:k},L)}));return p.displayName="CSSMotion",p}(f.J1)},97333:(e,t,n)=>{"use strict";var o=n(58168),r=n(80045),i=n(89379),a=n(23029),c=n(92901),l=n(85501),s=n(29426),p=n(39155),u=n(44785),f=n(80371),d=n(29710),m=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.A,n=function(e){(0,l.A)(u,e);var n=(0,s.A)(u);function u(){var e;return(0,a.A)(this,u),(e=n.apply(this,arguments)).state={keyEntities:[]},e.removeKey=function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:(0,i.A)((0,i.A)({},e),{},{status:d.e8})}))}}))},e}return(0,c.A)(u,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,i=this.props,a=i.component,c=i.children,l=i.onVisibleChanged,s=(0,r.A)(i,["component","children","onVisibleChanged"]),u=a||p.Fragment,f={};return m.forEach((function(e){f[e]=s[e],delete s[e]})),delete s.keys,p.createElement(u,s,n.map((function(n){var i=n.status,a=(0,r.A)(n,["status"]),s=i===d.bK||i===d.xI;return p.createElement(t,(0,o.A)({},f,{key:a.key,visible:s,eventProps:a,onVisibleChanged:function(t){null==l||l(t,{key:a.key}),t||e.removeKey(a.key)}}),c)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,o=t.keyEntities,r=(0,d.Ss)(n);return{keyEntities:(0,d.y$)(o,r).filter((function(e){var t=o.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==d.e8||e.status!==d.au}))}}}]),u}(p.Component);n.defaultProps={component:"div"}}(f.J1)},72137:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var o=n(23029),r=n(92901),i=n(85501),a=n(29426),c=n(39155);const l=function(e){(0,i.A)(n,e);var t=(0,a.A)(n);function n(){return(0,o.A)(this,n),t.apply(this,arguments)}return(0,r.A)(n,[{key:"render",value:function(){return this.props.children}}]),n}(c.Component)},85849:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(39155),r=n(80371);const i=function(e){var t=(0,o.useRef)(),n=(0,o.useRef)(e);n.current=e;var i=o.useCallback((function(e){n.current(e)}),[]);function a(e){e&&(e.removeEventListener(r.m8,i),e.removeEventListener(r.Vc,i))}return o.useEffect((function(){return function(){a(t.current)}}),[]),[function(e){t.current&&t.current!==e&&a(t.current),e&&e!==t.current&&(e.addEventListener(r.m8,i),e.addEventListener(r.Vc,i),t.current=e)},a]}},43982:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(39155);const r=(0,n(20998).A)()?o.useLayoutEffect:o.useEffect},84560:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(39155),r=n(25371);const i=function(){var e=o.useRef(null);function t(){r.A.cancel(e.current)}return o.useEffect((function(){return function(){t()}}),[]),[function n(o){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var a=(0,r.A)((function(){i<=1?o({isCanceled:function(){return a!==e.current}}):n(o,i-1)}));e.current=a},t]}},92659:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(3453),r=n(39155);function i(e){var t=(0,r.useRef)(!1),n=(0,r.useState)(e),i=(0,o.A)(n,2),a=i[0],c=i[1];return(0,r.useEffect)((function(){return function(){t.current=!0}}),[]),[a,function(e){t.current||c(e)}]}},25318:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var o=n(89379),r=n(64467),i=n(3453),a=n(39155),c=n(25931),l=n(92659),s=n(43982),p=n(58515),u=n(85849);function f(e,t,n,f){var d=f.motionEnter,m=void 0===d||d,v=f.motionAppear,h=void 0===v||v,g=f.motionLeave,y=void 0===g||g,b=f.motionDeadline,w=f.motionLeaveImmediately,x=f.onAppearPrepare,A=f.onEnterPrepare,O=f.onLeavePrepare,E=f.onAppearStart,S=f.onEnterStart,k=f.onLeaveStart,C=f.onAppearActive,M=f.onEnterActive,j=f.onLeaveActive,P=f.onAppearEnd,T=f.onEnterEnd,_=f.onLeaveEnd,N=f.onVisibleChanged,D=(0,l.A)(),L=(0,i.A)(D,2),R=L[0],H=L[1],I=(0,l.A)(c.SF),z=(0,i.A)(I,2),F=z[0],V=z[1],Z=(0,l.A)(null),B=(0,i.A)(Z,2),$=B[0],W=B[1],U=(0,a.useRef)(!1),Y=(0,a.useRef)(null),q=(0,a.useRef)(!1),K=(0,a.useRef)(null);function X(){return n()||K.current}var G=(0,a.useRef)(!1);function Q(e){var t,n=X();e&&!e.deadline&&e.target!==n||(F===c.Tv&&G.current?t=null==P?void 0:P(n,e):F===c.Wd&&G.current?t=null==T?void 0:T(n,e):F===c.dp&&G.current&&(t=null==_?void 0:_(n,e)),!1===t||q.current||(V(c.SF),W(null)))}var J=(0,u.A)(Q),ee=(0,i.A)(J,1)[0],te=a.useMemo((function(){var e,t,n;switch(F){case"appear":return e={},(0,r.A)(e,c.px,x),(0,r.A)(e,c.Mv,E),(0,r.A)(e,c.m7,C),e;case"enter":return t={},(0,r.A)(t,c.px,A),(0,r.A)(t,c.Mv,S),(0,r.A)(t,c.m7,M),t;case"leave":return n={},(0,r.A)(n,c.px,O),(0,r.A)(n,c.Mv,k),(0,r.A)(n,c.m7,j),n;default:return{}}}),[F]),ne=(0,p.Ay)(F,(function(e){if(e===c.px){var t=te[c.px];return t?t(X()):p.es}var n;ie in te&&W((null===(n=te[ie])||void 0===n?void 0:n.call(te,X(),null))||null);return ie===c.m7&&(ee(X()),b>0&&(clearTimeout(Y.current),Y.current=setTimeout((function(){Q({deadline:!0})}),b))),p.qB})),oe=(0,i.A)(ne,2),re=oe[0],ie=oe[1],ae=(0,p.$m)(ie);G.current=ae,(0,s.A)((function(){H(t);var n,o=U.current;(U.current=!0,e)&&(!o&&t&&h&&(n=c.Tv),o&&t&&m&&(n=c.Wd),(o&&!t&&y||!o&&w&&!t&&y)&&(n=c.dp),n&&(V(n),re()))}),[t]),(0,a.useEffect)((function(){(F===c.Tv&&!h||F===c.Wd&&!m||F===c.dp&&!y)&&V(c.SF)}),[h,m,y]),(0,a.useEffect)((function(){return function(){clearTimeout(Y.current),q.current=!0}}),[]),(0,a.useEffect)((function(){void 0!==R&&F===c.SF&&(null==N||N(R))}),[R,F]);var ce=$;return te[c.px]&&ie===c.Mv&&(ce=(0,o.A)({transition:"none"},ce)),[F,ie,ce,null!=R?R:t]}},58515:(e,t,n)=>{"use strict";n.d(t,{$m:()=>u,Ay:()=>f,es:()=>s,qB:()=>p});var o=n(3453),r=n(39155),i=n(25931),a=n(43982),c=n(84560),l=[i.px,i.Mv,i.m7,i.Hs],s=!1,p=!0;function u(e){return e===i.m7||e===i.Hs}const f=function(e,t){var n=r.useState(i.cE),p=(0,o.A)(n,2),u=p[0],f=p[1],d=(0,c.A)(),m=(0,o.A)(d,2),v=m[0],h=m[1];return(0,a.A)((function(){if(u!==i.cE&&u!==i.Hs){var e=l.indexOf(u),n=l[e+1],o=t(u);o===s?f(n):v((function(e){function t(){e.isCanceled()||f(n)}!0===o?t():Promise.resolve(o).then(t)}))}}),[e,u]),r.useEffect((function(){return function(){h()}}),[]),[function(){f(i.px)},u]}},30156:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(44785);n(97333);const r=o.A},25931:(e,t,n)=>{"use strict";n.d(t,{Hs:()=>u,Mv:()=>s,SF:()=>o,Tv:()=>r,Wd:()=>i,cE:()=>c,dp:()=>a,m7:()=>p,px:()=>l});var o="none",r="appear",i="enter",a="leave",c="none",l="prepare",s="start",p="active",u="end"},29710:(e,t,n)=>{"use strict";n.d(t,{Ss:()=>p,au:()=>c,bK:()=>i,e8:()=>l,xI:()=>a,y$:()=>u});var o=n(89379),r=n(82284),i="add",a="keep",c="remove",l="removed";function s(e){var t;return t=e&&"object"===(0,r.A)(e)&&"key"in e?e:{key:e},(0,o.A)((0,o.A)({},t),{},{key:String(t.key)})}function p(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(s)}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,l=t.length,s=p(e),u=p(t);s.forEach((function(e){for(var t=!1,s=r;s<l;s+=1){var p=u[s];if(p.key===e.key){r<s&&(n=n.concat(u.slice(r,s).map((function(e){return(0,o.A)((0,o.A)({},e),{},{status:i})}))),r=s),n.push((0,o.A)((0,o.A)({},p),{},{status:a})),r+=1,t=!0;break}}t||n.push((0,o.A)((0,o.A)({},e),{},{status:c}))})),r<l&&(n=n.concat(u.slice(r).map((function(e){return(0,o.A)((0,o.A)({},e),{},{status:i})}))));var f={};return n.forEach((function(e){var t=e.key;f[t]=(f[t]||0)+1})),Object.keys(f).filter((function(e){return f[e]>1})).forEach((function(e){(n=n.filter((function(t){var n=t.key,o=t.status;return n!==e||o!==c}))).forEach((function(t){t.key===e&&(t.status=a)}))})),n}},80371:(e,t,n)=>{"use strict";n.d(t,{J1:()=>h,Vc:()=>g,by:()=>b,m8:()=>y});var o=n(82284),r=n(20998);function i(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var a,c,l,s=(a=(0,r.A)(),c="undefined"!=typeof window?window:{},l={animationend:i("Animation","AnimationEnd"),transitionend:i("Transition","TransitionEnd")},a&&("AnimationEvent"in c||delete l.animationend.animation,"TransitionEvent"in c||delete l.transitionend.transition),l),p={};if((0,r.A)()){var u=document.createElement("div");p=u.style}var f={};function d(e){if(f[e])return f[e];var t=s[e];if(t)for(var n=Object.keys(t),o=n.length,r=0;r<o;r+=1){var i=n[r];if(Object.prototype.hasOwnProperty.call(t,i)&&i in p)return f[e]=t[i],f[e]}return""}var m=d("animationend"),v=d("transitionend"),h=!(!m||!v),g=m||"animationend",y=v||"transitionend";function b(e,t){return e?"object"===(0,o.A)(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}},34307:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var o=n(58168),r=n(82284),i=n(89379),a=n(80045),c=n(39155),l=n(1748),s={adjustX:1,adjustY:1},p=[0,0],u={left:{points:["cr","cl"],overflow:s,offset:[-4,0],targetOffset:p},right:{points:["cl","cr"],overflow:s,offset:[4,0],targetOffset:p},top:{points:["bc","tc"],overflow:s,offset:[0,-4],targetOffset:p},bottom:{points:["tc","bc"],overflow:s,offset:[0,4],targetOffset:p},topLeft:{points:["bl","tl"],overflow:s,offset:[0,-4],targetOffset:p},leftTop:{points:["tr","tl"],overflow:s,offset:[-4,0],targetOffset:p},topRight:{points:["br","tr"],overflow:s,offset:[0,-4],targetOffset:p},rightTop:{points:["tl","tr"],overflow:s,offset:[4,0],targetOffset:p},bottomRight:{points:["tr","br"],overflow:s,offset:[0,4],targetOffset:p},rightBottom:{points:["bl","br"],overflow:s,offset:[4,0],targetOffset:p},bottomLeft:{points:["tl","bl"],overflow:s,offset:[0,4],targetOffset:p},leftBottom:{points:["br","bl"],overflow:s,offset:[-4,0],targetOffset:p}};const f=function(e){var t=e.overlay,n=e.prefixCls,o=e.id,r=e.overlayInnerStyle;return c.createElement("div",{className:"".concat(n,"-inner"),id:o,role:"tooltip",style:r},"function"==typeof t?t():t)};var d=function(e,t){var n=e.overlayClassName,s=e.trigger,p=void 0===s?["hover"]:s,d=e.mouseEnterDelay,m=void 0===d?0:d,v=e.mouseLeaveDelay,h=void 0===v?.1:v,g=e.overlayStyle,y=e.prefixCls,b=void 0===y?"rc-tooltip":y,w=e.children,x=e.onVisibleChange,A=e.afterVisibleChange,O=e.transitionName,E=e.animation,S=e.motion,k=e.placement,C=void 0===k?"right":k,M=e.align,j=void 0===M?{}:M,P=e.destroyTooltipOnHide,T=void 0!==P&&P,_=e.defaultVisible,N=e.getTooltipContainer,D=e.overlayInnerStyle,L=(0,a.A)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),R=(0,c.useRef)(null);(0,c.useImperativeHandle)(t,(function(){return R.current}));var H=(0,i.A)({},L);"visible"in e&&(H.popupVisible=e.visible);var I=!1,z=!1;if("boolean"==typeof T)I=T;else if(T&&"object"===(0,r.A)(T)){var F=T.keepParent;I=!0===F,z=!1===F}return c.createElement(l.A,(0,o.A)({popupClassName:n,prefixCls:b,popup:function(){var t=e.arrowContent,n=void 0===t?null:t,o=e.overlay,r=e.id;return[c.createElement("div",{className:"".concat(b,"-arrow"),key:"arrow"},n),c.createElement(f,{key:"content",prefixCls:b,id:r,overlay:o,overlayInnerStyle:D})]},action:p,builtinPlacements:u,popupPlacement:C,ref:R,popupAlign:j,getPopupContainer:N,onPopupVisibleChange:x,afterPopupVisibleChange:A,popupTransitionName:O,popupAnimation:E,popupMotion:S,defaultPopupVisible:_,destroyPopupOnHide:I,autoDestroy:z,mouseLeaveDelay:h,popupStyle:g,mouseEnterDelay:m},H),w)};const m=(0,c.forwardRef)(d)},94934:(e,t)=>{"use strict";t.DD=void 0;var n={adjustX:1,adjustY:1},o=[0,0],r={left:{points:["cr","cl"],overflow:n,offset:[-4,0],targetOffset:o},right:{points:["cl","cr"],overflow:n,offset:[4,0],targetOffset:o},top:{points:["bc","tc"],overflow:n,offset:[0,-4],targetOffset:o},bottom:{points:["tc","bc"],overflow:n,offset:[0,4],targetOffset:o},topLeft:{points:["bl","tl"],overflow:n,offset:[0,-4],targetOffset:o},leftTop:{points:["tr","tl"],overflow:n,offset:[-4,0],targetOffset:o},topRight:{points:["br","tr"],overflow:n,offset:[0,-4],targetOffset:o},rightTop:{points:["tl","tr"],overflow:n,offset:[4,0],targetOffset:o},bottomRight:{points:["tr","br"],overflow:n,offset:[0,4],targetOffset:o},rightBottom:{points:["bl","br"],overflow:n,offset:[4,0],targetOffset:o},bottomLeft:{points:["tl","bl"],overflow:n,offset:[0,4],targetOffset:o},leftBottom:{points:["br","bl"],overflow:n,offset:[-4,0],targetOffset:o}};t.DD=r},1748:(e,t,n)=>{"use strict";n.d(t,{A:()=>lt});var o=n(89379),r=n(58168),i=n(23029),a=n(92901),c=n(9417),l=n(85501),s=n(29426),p=n(64467),u=n(39155),f=n.n(u),d=n(69514),m=n.n(d),v=n(25371),h=n(54808),g=n(66588),y=n(8719),b=n(69916),w=n(88822),x=n(46942),A=n.n(x);function O(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var E=n(3453),S=n(80045),k=n(68430),C=n(30156);function M(e){var t=e.prefixCls,n=e.motion,o=e.animation,r=e.transitionName;return n||(o?{motionName:"".concat(t,"-").concat(o)}:r?{motionName:r}:null)}function j(e){var t=e.prefixCls,n=e.visible,i=e.zIndex,a=e.mask,c=e.maskMotion,l=e.maskAnimation,s=e.maskTransitionName;if(!a)return null;var p={};return(c||s||l)&&(p=(0,o.A)({motionAppear:!0},M({motion:c,prefixCls:t,transitionName:s,animation:l}))),u.createElement(C.A,(0,r.A)({},p,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return u.createElement("div",{style:{zIndex:i},className:A()("".concat(t,"-mask"),n)})}))}var P,T=n(82284);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){L(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var R={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function H(){if(void 0!==P)return P;P="";var e=document.createElement("p").style;for(var t in R)t+"Transform"in e&&(P=t);return P}function I(){return H()?"".concat(H(),"TransitionProperty"):"transitionProperty"}function z(){return H()?"".concat(H(),"Transform"):"transform"}function F(e,t){var n=I();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function V(e,t){var n=z();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}var Z,B=/matrix\((.*)\)/,$=/matrix3d\((.*)\)/;function W(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function U(e,t,n){var o=n;if("object"!==D(t))return void 0!==o?("number"==typeof o&&(o="".concat(o,"px")),void(e.style[t]=o)):Z(e,t);for(var r in t)t.hasOwnProperty(r)&&U(e,r,t[r])}function Y(e,t){var n=e["page".concat(t?"Y":"X","Offset")],o="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function q(e){return Y(e)}function K(e){return Y(e,!0)}function X(e){var t=function(e){var t,n,o,r=e.ownerDocument,i=r.body,a=r&&r.documentElement;return t=e.getBoundingClientRect(),n=Math.floor(t.left),o=Math.floor(t.top),{left:n-=a.clientLeft||i.clientLeft||0,top:o-=a.clientTop||i.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=q(o),t.top+=K(o),t}function G(e){return null!=e&&e==e.window}function Q(e){return G(e)?e.document:9===e.nodeType?e:e.ownerDocument}var J=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),ee=/^(top|right|bottom|left)$/,te="currentStyle",ne="runtimeStyle",oe="left";function re(e,t){return"left"===e?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function ie(e){return"left"===e?"right":"right"===e?"left":"top"===e?"bottom":"bottom"===e?"top":void 0}function ae(e,t,n){"static"===U(e,"position")&&(e.style.position="relative");var o=-999,r=-999,i=re("left",n),a=re("top",n),c=ie(i),l=ie(a);"left"!==i&&(o=999),"top"!==a&&(r=999);var s,p="",u=X(e);("left"in t||"top"in t)&&(p=(s=e).style.transitionProperty||s.style[I()]||"",F(e,"none")),"left"in t&&(e.style[c]="",e.style[i]="".concat(o,"px")),"top"in t&&(e.style[l]="",e.style[a]="".concat(r,"px")),W(e);var f=X(e),d={};for(var m in t)if(t.hasOwnProperty(m)){var v=re(m,n),h="left"===m?o:r,g=u[m]-f[m];d[v]=v===m?h+g:h-g}U(e,d),W(e),("left"in t||"top"in t)&&F(e,p);var y={};for(var b in t)if(t.hasOwnProperty(b)){var w=re(b,n),x=t[b]-u[b];y[w]=b===w?d[w]+x:d[w]-x}U(e,y)}function ce(e,t){var n=X(e),o=function(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(z());if(n&&"none"!==n){var o=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(o[12]||o[4],0),y:parseFloat(o[13]||o[5],0)}}return{x:0,y:0}}(e),r={x:o.x,y:o.y};"left"in t&&(r.x=o.x+t.left-n.left),"top"in t&&(r.y=o.y+t.top-n.top),function(e,t){var n=window.getComputedStyle(e,null),o=n.getPropertyValue("transform")||n.getPropertyValue(z());if(o&&"none"!==o){var r,i=o.match(B);i?((r=(i=i[1]).split(",").map((function(e){return parseFloat(e,10)})))[4]=t.x,r[5]=t.y,V(e,"matrix(".concat(r.join(","),")"))):((r=o.match($)[1].split(",").map((function(e){return parseFloat(e,10)})))[12]=t.x,r[13]=t.y,V(e,"matrix3d(".concat(r.join(","),")")))}else V(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}(e,r)}function le(e,t){for(var n=0;n<e.length;n++)t(e[n])}function se(e){return"border-box"===Z(e,"boxSizing")}"undefined"!=typeof window&&(Z=window.getComputedStyle?function(e,t,n){var o=n,r="",i=Q(e);return(o=o||i.defaultView.getComputedStyle(e,null))&&(r=o.getPropertyValue(t)||o[t]),r}:function(e,t){var n=e[te]&&e[te][t];if(J.test(n)&&!ee.test(t)){var o=e.style,r=o[oe],i=e[ne][oe];e[ne][oe]=e[te][oe],o[oe]="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o[oe]=r,e[ne][oe]=i}return""===n?"auto":n});var pe=["margin","border","padding"],ue=-1,fe=2,de=1;function me(e,t,n){var o,r,i,a=0;for(r=0;r<t.length;r++)if(o=t[r])for(i=0;i<n.length;i++){var c=void 0;c="border"===o?"".concat(o).concat(n[i],"Width"):o+n[i],a+=parseFloat(Z(e,c))||0}return a}var ve={getParent:function(e){var t=e;do{t=11===t.nodeType&&t.host?t.host:t.parentNode}while(t&&1!==t.nodeType&&9!==t.nodeType);return t}};function he(e,t,n){var o=n;if(G(e))return"width"===t?ve.viewportWidth(e):ve.viewportHeight(e);if(9===e.nodeType)return"width"===t?ve.docWidth(e):ve.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],i="width"===t?Math.floor(e.getBoundingClientRect().width):Math.floor(e.getBoundingClientRect().height),a=se(e),c=0;(null==i||i<=0)&&(i=void 0,(null==(c=Z(e,t))||Number(c)<0)&&(c=e.style[t]||0),c=Math.floor(parseFloat(c))||0),void 0===o&&(o=a?de:ue);var l=void 0!==i||a,s=i||c;return o===ue?l?s-me(e,["border","padding"],r):c:l?o===de?s:s+(o===fe?-me(e,["border"],r):me(e,["margin"],r)):c+me(e,pe.slice(o),r)}le(["Width","Height"],(function(e){ve["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],ve["viewport".concat(e)](n))},ve["viewport".concat(e)]=function(t){var n="client".concat(e),o=t.document,r=o.body,i=o.documentElement[n];return"CSS1Compat"===o.compatMode&&i||r&&r[n]||i}}));var ge={position:"absolute",visibility:"hidden",display:"block"};function ye(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o,r=t[0];return 0!==r.offsetWidth?o=he.apply(void 0,t):function(e,t,n){var o,r={},i=e.style;for(o in t)t.hasOwnProperty(o)&&(r[o]=i[o],i[o]=t[o]);for(o in n.call(e),t)t.hasOwnProperty(o)&&(i[o]=r[o])}(r,ge,(function(){o=he.apply(void 0,t)})),o}function be(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}le(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);ve["outer".concat(t)]=function(t,n){return t&&ye(t,e,n?0:de)};var n="width"===e?["Left","Right"]:["Top","Bottom"];ve[e]=function(t,o){var r=o;return void 0!==r?t?(se(t)&&(r+=me(t,["padding","border"],n)),U(t,e,r)):void 0:t&&ye(t,e,ue)}}));var we={getWindow:function(e){if(e&&e.document&&e.setTimeout)return e;var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},getDocument:Q,offset:function(e,t,n){if(void 0===t)return X(e);!function(e,t,n){if(n.ignoreShake){var o=X(e),r=o.left.toFixed(0),i=o.top.toFixed(0),a=t.left.toFixed(0),c=t.top.toFixed(0);if(r===a&&i===c)return}n.useCssRight||n.useCssBottom?ae(e,t,n):n.useCssTransform&&z()in document.body.style?ce(e,t):ae(e,t,n)}(e,t,n||{})},isWindow:G,each:le,css:U,clone:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);if(e.overflow)for(t in e)e.hasOwnProperty(t)&&(n.overflow[t]=e.overflow[t]);return n},mix:be,getWindowScrollLeft:function(e){return q(e)},getWindowScrollTop:function(e){return K(e)},merge:function(){for(var e={},t=0;t<arguments.length;t++)we.mix(e,t<0||arguments.length<=t?void 0:arguments[t]);return e},viewportWidth:0,viewportHeight:0};be(we,ve);var xe=we.getParent;function Ae(e){if(we.isWindow(e)||9===e.nodeType)return null;var t,n=we.getDocument(e).body,o=we.css(e,"position");if(!("fixed"===o||"absolute"===o))return"html"===e.nodeName.toLowerCase()?null:xe(e);for(t=xe(e);t&&t!==n&&9!==t.nodeType;t=xe(t))if("static"!==(o=we.css(t,"position")))return t;return null}var Oe=we.getParent;function Ee(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},o=Ae(e),r=we.getDocument(e),i=r.defaultView||r.parentWindow,a=r.body,c=r.documentElement;o;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===o.clientWidth||o===a||o===c||"visible"===we.css(o,"overflow")){if(o===a||o===c)break}else{var l=we.offset(o);l.left+=o.clientLeft,l.top+=o.clientTop,n.top=Math.max(n.top,l.top),n.right=Math.min(n.right,l.left+o.clientWidth),n.bottom=Math.min(n.bottom,l.top+o.clientHeight),n.left=Math.max(n.left,l.left)}o=Ae(o)}var s=null;we.isWindow(e)||9===e.nodeType||(s=e.style.position,"absolute"===we.css(e,"position")&&(e.style.position="fixed"));var p=we.getWindowScrollLeft(i),u=we.getWindowScrollTop(i),f=we.viewportWidth(i),d=we.viewportHeight(i),m=c.scrollWidth,v=c.scrollHeight,h=window.getComputedStyle(a);if("hidden"===h.overflowX&&(m=i.innerWidth),"hidden"===h.overflowY&&(v=i.innerHeight),e.style&&(e.style.position=s),t||function(e){if(we.isWindow(e)||9===e.nodeType)return!1;var t=we.getDocument(e),n=t.body,o=null;for(o=Oe(e);o&&o!==n&&o!==t;o=Oe(o))if("fixed"===we.css(o,"position"))return!0;return!1}(e))n.left=Math.max(n.left,p),n.top=Math.max(n.top,u),n.right=Math.min(n.right,p+f),n.bottom=Math.min(n.bottom,u+d);else{var g=Math.max(m,p+f);n.right=Math.min(n.right,g);var y=Math.max(v,u+d);n.bottom=Math.min(n.bottom,y)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function Se(e){var t,n,o;if(we.isWindow(e)||9===e.nodeType){var r=we.getWindow(e);t={left:we.getWindowScrollLeft(r),top:we.getWindowScrollTop(r)},n=we.viewportWidth(r),o=we.viewportHeight(r)}else t=we.offset(e),n=we.outerWidth(e),o=we.outerHeight(e);return t.width=n,t.height=o,t}function ke(e,t){var n=t.charAt(0),o=t.charAt(1),r=e.width,i=e.height,a=e.left,c=e.top;return"c"===n?c+=i/2:"b"===n&&(c+=i),"c"===o?a+=r/2:"r"===o&&(a+=r),{left:a,top:c}}function Ce(e,t,n,o,r){var i=ke(t,n[1]),a=ke(e,n[0]),c=[a.left-i.left,a.top-i.top];return{left:Math.round(e.left-c[0]+o[0]-r[0]),top:Math.round(e.top-c[1]+o[1]-r[1])}}function Me(e,t,n){return e.left<n.left||e.left+t.width>n.right}function je(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function Pe(e,t,n){var o=[];return we.each(e,(function(e){o.push(e.replace(t,(function(e){return n[e]})))})),o}function Te(e,t){return e[t]=-e[t],e}function _e(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function Ne(e,t){e[0]=_e(e[0],t.width),e[1]=_e(e[1],t.height)}function De(e,t,n,o){var r=n.points,i=n.offset||[0,0],a=n.targetOffset||[0,0],c=n.overflow,l=n.source||e;i=[].concat(i),a=[].concat(a);var s={},p=0,u=Ee(l,!(!(c=c||{})||!c.alwaysByViewport)),f=Se(l);Ne(i,f),Ne(a,t);var d=Ce(f,t,r,i,a),m=we.merge(f,d);if(u&&(c.adjustX||c.adjustY)&&o){if(c.adjustX&&Me(d,f,u)){var v=Pe(r,/[lr]/gi,{l:"r",r:"l"}),h=Te(i,0),g=Te(a,0);(function(e,t,n){return e.left>n.right||e.left+t.width<n.left})(Ce(f,t,v,h,g),f,u)||(p=1,r=v,i=h,a=g)}if(c.adjustY&&je(d,f,u)){var y=Pe(r,/[tb]/gi,{t:"b",b:"t"}),b=Te(i,1),w=Te(a,1);(function(e,t,n){return e.top>n.bottom||e.top+t.height<n.top})(Ce(f,t,y,b,w),f,u)||(p=1,r=y,i=b,a=w)}p&&(d=Ce(f,t,r,i,a),we.mix(m,d));var x=Me(d,f,u),A=je(d,f,u);if(x||A){var O=r;x&&(O=Pe(r,/[lr]/gi,{l:"r",r:"l"})),A&&(O=Pe(r,/[tb]/gi,{t:"b",b:"t"})),r=O,i=n.offset||[0,0],a=n.targetOffset||[0,0]}s.adjustX=c.adjustX&&x,s.adjustY=c.adjustY&&A,(s.adjustX||s.adjustY)&&(m=function(e,t,n,o){var r=we.clone(e),i={width:t.width,height:t.height};return o.adjustX&&r.left<n.left&&(r.left=n.left),o.resizeWidth&&r.left>=n.left&&r.left+i.width>n.right&&(i.width-=r.left+i.width-n.right),o.adjustX&&r.left+i.width>n.right&&(r.left=Math.max(n.right-i.width,n.left)),o.adjustY&&r.top<n.top&&(r.top=n.top),o.resizeHeight&&r.top>=n.top&&r.top+i.height>n.bottom&&(i.height-=r.top+i.height-n.bottom),o.adjustY&&r.top+i.height>n.bottom&&(r.top=Math.max(n.bottom-i.height,n.top)),we.mix(r,i)}(d,f,u,s))}return m.width!==f.width&&we.css(l,"width",we.width(l)+m.width-f.width),m.height!==f.height&&we.css(l,"height",we.height(l)+m.height-f.height),we.offset(l,{left:m.left,top:m.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:r,offset:i,targetOffset:a,overflow:s}}function Le(e,t,n){var o=n.target||t,r=Se(o),i=!function(e,t){var n=Ee(e,t),o=Se(e);return!n||o.left+o.width<=n.left||o.top+o.height<=n.top||o.left>=n.right||o.top>=n.bottom}(o,n.overflow&&n.overflow.alwaysByViewport);return De(e,r,n,i)}Le.__getOffsetParent=Ae,Le.__getVisibleRectForElement=Ee;var Re=n(43210),He=n(42467),Ie=n(30981);var ze=n(43591);function Fe(e,t){var n=null,o=null;var r=new ze.default((function(e){var r=(0,E.A)(e,1)[0].target;if(document.documentElement.contains(r)){var i=r.getBoundingClientRect(),a=i.width,c=i.height,l=Math.floor(a),s=Math.floor(c);n===l&&o===s||Promise.resolve().then((function(){t({width:l,height:s})})),n=l,o=s}}));return e&&r.observe(e),function(){r.disconnect()}}function Ve(e){return"function"!=typeof e?null:e()}function Ze(e){return"object"===(0,T.A)(e)&&e?e:null}var Be=function(e,t){var n=e.children,o=e.disabled,r=e.target,i=e.align,a=e.onAlign,c=e.monitorWindowResize,l=e.monitorBufferTime,s=void 0===l?0:l,p=f().useRef({}),u=f().useRef(),d=f().Children.only(n),m=f().useRef({});m.current.disabled=o,m.current.target=r,m.current.align=i,m.current.onAlign=a;var v=function(e,t){var n=f().useRef(!1),o=f().useRef(null);function r(){window.clearTimeout(o.current)}return[function i(a){if(r(),n.current&&!0!==a)o.current=window.setTimeout((function(){n.current=!1,i()}),t);else{if(!1===e(a))return;n.current=!0,o.current=window.setTimeout((function(){n.current=!1}),t)}},function(){n.current=!1,r()}]}((function(){var e=m.current,t=e.disabled,n=e.target,o=e.align,r=e.onAlign,i=u.current;if(!t&&n&&i){var a,c=Ve(n),l=Ze(n);p.current.element=c,p.current.point=l,p.current.align=o;var s=document.activeElement;return c&&(0,He.A)(c)?a=Le(i,c,o):l&&(a=function(e,t,n){var o,r,i=we.getDocument(e),a=i.defaultView||i.parentWindow,c=we.getWindowScrollLeft(a),l=we.getWindowScrollTop(a),s=we.viewportWidth(a),p=we.viewportHeight(a),u={left:o="pageX"in t?t.pageX:c+t.clientX,top:r="pageY"in t?t.pageY:l+t.clientY,width:0,height:0},f=o>=0&&o<=c+s&&r>=0&&r<=l+p,d=[n.points[0],"cc"];return De(e,u,N(N({},n),{},{points:d}),f)}(i,l,o)),function(e,t){e!==document.activeElement&&(0,h.A)(t,e)&&"function"==typeof e.focus&&e.focus()}(s,i),r&&a&&r(i,a),!0}return!1}),s),g=(0,E.A)(v,2),w=g[0],x=g[1],A=f().useState(),O=(0,E.A)(A,2),S=O[0],k=O[1],C=f().useState(),M=(0,E.A)(C,2),j=M[0],P=M[1];return(0,Ie.A)((function(){k(Ve(r)),P(Ze(r))})),f().useEffect((function(){var e,t;p.current.element===S&&((e=p.current.point)===(t=j)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))&&(0,Re.A)(p.current.align,i)||w()})),f().useEffect((function(){return Fe(u.current,w)}),[u.current]),f().useEffect((function(){return Fe(S,w)}),[S]),f().useEffect((function(){o?x():w()}),[o]),f().useEffect((function(){if(c)return(0,b.A)(window,"resize",w).remove}),[c]),f().useEffect((function(){return function(){x()}}),[]),f().useImperativeHandle(t,(function(){return{forceAlign:function(){return w(!0)}}})),f().isValidElement(d)&&(d=f().cloneElement(d,{ref:(0,y.K4)(d.ref,u)})),d},$e=f().forwardRef(Be);$e.displayName="Align";const We=$e;function Ue(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
21
|
-
Ue=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function p(e,t,n,o){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),c=new P(o||[]);return r(a,"_invoke",{value:k(e,n,c)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var f="suspendedStart",d="suspendedYield",m="executing",v="completed",h={};function g(){}function y(){}function b(){}var w={};s(w,a,(function(){return this}));var x=Object.getPrototypeOf,A=x&&x(x(_([])));A&&A!==n&&o.call(A,a)&&(w=A);var O=b.prototype=g.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(r,i,a,c){var l=u(e[r],e,i);if("throw"!==l.type){var s=l.arg,p=s.value;return p&&"object"==(0,T.A)(p)&&o.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(p).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,c)}))}c(l.arg)}var i;r(this,"_invoke",{value:function(e,o){function r(){return new t((function(t,r){n(e,o,t,r)}))}return i=i?i.then(r,r):r()}})}function k(t,n,o){var r=f;return function(i,a){if(r===m)throw Error("Generator is already running");if(r===v){if("throw"===i)throw a;return{value:e,done:!0}}for(o.method=i,o.arg=a;;){var c=o.delegate;if(c){var l=C(c,o);if(l){if(l===h)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(r===f)throw r=v,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r=m;var s=u(t,n,o);if("normal"===s.type){if(r=o.done?v:d,s.arg===h)continue;return{value:s.arg,done:o.done}}"throw"===s.type&&(r=v,o.method="throw",o.arg=s.arg)}}}function C(t,n){var o=n.method,r=t.iterator[o];if(r===e)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),h;var i=u(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,h;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function n(){for(;++r<t.length;)if(o.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError((0,T.A)(t)+" is not iterable")}return y.prototype=b,r(O,"constructor",{value:b,configurable:!0}),r(b,"constructor",{value:y,configurable:!0}),y.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},E(S.prototype),s(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,o,r,i){void 0===i&&(i=Promise);var a=new S(p(e,n,o,r),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(O),s(O,l,"Generator"),s(O,a,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=_,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(j),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(o,r){return c.type="throw",c.arg=t,n.next=o,r&&(n.method="next",n.arg=e),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(l&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;j(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:_(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),h}},t}var Ye=n(10467),qe=n(1233),Ke=["measure","alignPre","align",null,"motion"];var Xe=u.forwardRef((function(e,t){var n=e.visible,i=e.prefixCls,a=e.className,c=e.style,l=e.children,s=e.zIndex,p=e.stretch,f=e.destroyPopupOnHide,d=e.forceRender,m=e.align,h=e.point,g=e.getRootDomNode,y=e.getClassNameFromAlign,b=e.onAlign,w=e.onMouseEnter,x=e.onMouseLeave,O=e.onMouseDown,S=e.onTouchStart,k=e.onClick,j=(0,u.useRef)(),P=(0,u.useRef)(),T=(0,u.useState)(),_=(0,E.A)(T,2),N=_[0],D=_[1],L=function(e){var t=u.useState({width:0,height:0}),n=(0,E.A)(t,2),o=n[0],r=n[1];return[u.useMemo((function(){var t={};if(e){var n=o.width,r=o.height;-1!==e.indexOf("height")&&r?t.height=r:-1!==e.indexOf("minHeight")&&r&&(t.minHeight=r),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,o]),function(e){var t=e.offsetWidth,n=e.offsetHeight,o=e.getBoundingClientRect(),i=o.width,a=o.height;Math.abs(t-i)<1&&Math.abs(n-a)<1&&(t=i,n=a),r({width:t,height:n})}]}(p),R=(0,E.A)(L,2),H=R[0],I=R[1];var z=function(e,t){var n=(0,qe.A)(null),o=(0,E.A)(n,2),r=o[0],i=o[1],a=(0,u.useRef)();function c(e){i(e,!0)}function l(){v.A.cancel(a.current)}return(0,u.useEffect)((function(){c("measure")}),[e]),(0,u.useEffect)((function(){"measure"===r&&t(),r&&(a.current=(0,v.A)((0,Ye.A)(Ue().mark((function e(){var t,n;return Ue().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ke.indexOf(r),(n=Ke[t+1])&&-1!==t&&c(n);case 3:case"end":return e.stop()}}),e)})))))}),[r]),(0,u.useEffect)((function(){return function(){l()}}),[]),[r,function(e){l(),a.current=(0,v.A)((function(){c((function(e){switch(r){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){p&&I(g())})),F=(0,E.A)(z,2),V=F[0],Z=F[1],B=(0,u.useState)(0),$=(0,E.A)(B,2),W=$[0],U=$[1],Y=(0,u.useRef)();function q(){var e;null===(e=j.current)||void 0===e||e.forceAlign()}function K(e,t){var n=y(t);N!==n&&D(n),U((function(e){return e+1})),"align"===V&&(null==b||b(e,t))}(0,Ie.A)((function(){"alignPre"===V&&U(0)}),[V]),(0,Ie.A)((function(){"align"===V&&(W<3?q():Z((function(){var e;null===(e=Y.current)||void 0===e||e.call(Y)})))}),[W]);var X=(0,o.A)({},M(e));function G(){return new Promise((function(e){Y.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=X[e];X[e]=function(e,n){return Z(),null==t?void 0:t(e,n)}})),u.useEffect((function(){X.motionName||"motion"!==V||Z()}),[X.motionName,V]),u.useImperativeHandle(t,(function(){return{forceAlign:q,getElement:function(){return P.current}}}));var Q=(0,o.A)((0,o.A)({},H),{},{zIndex:s,opacity:"motion"!==V&&"stable"!==V&&n?0:void 0,pointerEvents:n||"stable"===V?void 0:"none"},c),J=!0;null==m||!m.points||"align"!==V&&"stable"!==V||(J=!1);var ee=l;return u.Children.count(l)>1&&(ee=u.createElement("div",{className:"".concat(i,"-content")},l)),u.createElement(C.A,(0,r.A)({visible:n,ref:P,leavedClassName:"".concat(i,"-hidden")},X,{onAppearPrepare:G,onEnterPrepare:G,removeOnLeave:f,forceRender:d}),(function(e,t){var n=e.className,r=e.style,c=A()(i,a,N,n);return u.createElement(We,{target:h||g,key:"popup",ref:j,monitorWindowResize:!0,disabled:J,align:m,onAlign:K},u.createElement("div",{ref:t,className:c,onMouseEnter:w,onMouseLeave:x,onMouseDownCapture:O,onTouchStartCapture:S,onClick:k,style:(0,o.A)((0,o.A)({},r),Q)},ee))}))}));Xe.displayName="PopupInner";const Ge=Xe;var Qe=u.forwardRef((function(e,t){var n=e.prefixCls,i=e.visible,a=e.zIndex,c=e.children,l=e.mobile,s=(l=void 0===l?{}:l).popupClassName,p=l.popupStyle,f=l.popupMotion,d=void 0===f?{}:f,m=l.popupRender,v=e.onClick,h=u.useRef();u.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return h.current}}}));var g=(0,o.A)({zIndex:a},p),y=c;return u.Children.count(c)>1&&(y=u.createElement("div",{className:"".concat(n,"-content")},c)),m&&(y=m(y)),u.createElement(C.A,(0,r.A)({visible:i,ref:h,removeOnLeave:!0},d),(function(e,t){var r=e.className,i=e.style,a=A()(n,s,r);return u.createElement("div",{ref:t,className:a,onClick:v,style:(0,o.A)((0,o.A)({},i),g)},y)}))}));Qe.displayName="MobilePopupInner";const Je=Qe;var et=["visible","mobile"],tt=u.forwardRef((function(e,t){var n=e.visible,i=e.mobile,a=(0,S.A)(e,et),c=(0,u.useState)(n),l=(0,E.A)(c,2),s=l[0],p=l[1],f=(0,u.useState)(!1),d=(0,E.A)(f,2),m=d[0],v=d[1],h=(0,o.A)((0,o.A)({},a),{},{visible:s});(0,u.useEffect)((function(){p(n),n&&i&&v((0,k.A)())}),[n,i]);var g=m?u.createElement(Je,(0,r.A)({},h,{mobile:i,ref:t})):u.createElement(Ge,(0,r.A)({},h,{ref:t}));return u.createElement("div",null,u.createElement(j,h),g)}));tt.displayName="Popup";const nt=tt;const ot=u.createContext(null);function rt(){}function it(){return""}function at(e){return e?e.ownerDocument:window.document}var ct=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];const lt=(st=w.A,pt=function(e){(0,l.A)(n,e);var t=(0,s.A)(n);function n(e){var o,a;return(0,i.A)(this,n),o=t.call(this,e),(0,p.A)((0,c.A)(o),"popupRef",u.createRef()),(0,p.A)((0,c.A)(o),"triggerRef",u.createRef()),(0,p.A)((0,c.A)(o),"portalContainer",void 0),(0,p.A)((0,c.A)(o),"attachId",void 0),(0,p.A)((0,c.A)(o),"clickOutsideHandler",void 0),(0,p.A)((0,c.A)(o),"touchOutsideHandler",void 0),(0,p.A)((0,c.A)(o),"contextMenuOutsideHandler1",void 0),(0,p.A)((0,c.A)(o),"contextMenuOutsideHandler2",void 0),(0,p.A)((0,c.A)(o),"mouseDownTimeout",void 0),(0,p.A)((0,c.A)(o),"focusTime",void 0),(0,p.A)((0,c.A)(o),"preClickTime",void 0),(0,p.A)((0,c.A)(o),"preTouchTime",void 0),(0,p.A)((0,c.A)(o),"delayTimer",void 0),(0,p.A)((0,c.A)(o),"hasPopupMouseDown",void 0),(0,p.A)((0,c.A)(o),"onMouseEnter",(function(e){var t=o.props.mouseEnterDelay;o.fireEvents("onMouseEnter",e),o.delaySetPopupVisible(!0,t,t?null:e)})),(0,p.A)((0,c.A)(o),"onMouseMove",(function(e){o.fireEvents("onMouseMove",e),o.setPoint(e)})),(0,p.A)((0,c.A)(o),"onMouseLeave",(function(e){o.fireEvents("onMouseLeave",e),o.delaySetPopupVisible(!1,o.props.mouseLeaveDelay)})),(0,p.A)((0,c.A)(o),"onPopupMouseEnter",(function(){o.clearDelayTimer()})),(0,p.A)((0,c.A)(o),"onPopupMouseLeave",(function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&(0,h.A)(null===(t=o.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||o.delaySetPopupVisible(!1,o.props.mouseLeaveDelay)})),(0,p.A)((0,c.A)(o),"onFocus",(function(e){o.fireEvents("onFocus",e),o.clearDelayTimer(),o.isFocusToShow()&&(o.focusTime=Date.now(),o.delaySetPopupVisible(!0,o.props.focusDelay))})),(0,p.A)((0,c.A)(o),"onMouseDown",(function(e){o.fireEvents("onMouseDown",e),o.preClickTime=Date.now()})),(0,p.A)((0,c.A)(o),"onTouchStart",(function(e){o.fireEvents("onTouchStart",e),o.preTouchTime=Date.now()})),(0,p.A)((0,c.A)(o),"onBlur",(function(e){o.fireEvents("onBlur",e),o.clearDelayTimer(),o.isBlurToHide()&&o.delaySetPopupVisible(!1,o.props.blurDelay)})),(0,p.A)((0,c.A)(o),"onContextMenu",(function(e){e.preventDefault(),o.fireEvents("onContextMenu",e),o.setPopupVisible(!0,e)})),(0,p.A)((0,c.A)(o),"onContextMenuClose",(function(){o.isContextMenuToShow()&&o.close()})),(0,p.A)((0,c.A)(o),"onClick",(function(e){if(o.fireEvents("onClick",e),o.focusTime){var t;if(o.preClickTime&&o.preTouchTime?t=Math.min(o.preClickTime,o.preTouchTime):o.preClickTime?t=o.preClickTime:o.preTouchTime&&(t=o.preTouchTime),Math.abs(t-o.focusTime)<20)return;o.focusTime=0}o.preClickTime=0,o.preTouchTime=0,o.isClickToShow()&&(o.isClickToHide()||o.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!o.state.popupVisible;(o.isClickToHide()&&!n||n&&o.isClickToShow())&&o.setPopupVisible(!o.state.popupVisible,e)})),(0,p.A)((0,c.A)(o),"onPopupMouseDown",(function(){var e;o.hasPopupMouseDown=!0,clearTimeout(o.mouseDownTimeout),o.mouseDownTimeout=window.setTimeout((function(){o.hasPopupMouseDown=!1}),0),o.context&&(e=o.context).onPopupMouseDown.apply(e,arguments)})),(0,p.A)((0,c.A)(o),"onDocumentClick",(function(e){if(!o.props.mask||o.props.maskClosable){var t=e.target,n=o.getRootDomNode(),r=o.getPopupDomNode();(0,h.A)(n,t)&&!o.isContextMenuOnly()||(0,h.A)(r,t)||o.hasPopupMouseDown||o.close()}})),(0,p.A)((0,c.A)(o),"getRootDomNode",(function(){var e=o.props.getTriggerDOMNode;if(e)return e(o.triggerRef.current);try{var t=(0,g.A)(o.triggerRef.current);if(t)return t}catch(e){}return m().findDOMNode((0,c.A)(o))})),(0,p.A)((0,c.A)(o),"getPopupClassNameFromAlign",(function(e){var t=[],n=o.props,r=n.popupPlacement,i=n.builtinPlacements,a=n.prefixCls,c=n.alignPoint,l=n.getPopupClassNameFromAlign;return r&&i&&t.push(function(e,t,n,o){for(var r=n.points,i=Object.keys(e),a=0;a<i.length;a+=1){var c=i[a];if(O(e[c].points,r,o))return"".concat(t,"-placement-").concat(c)}return""}(i,a,e,c)),l&&t.push(l(e)),t.join(" ")})),(0,p.A)((0,c.A)(o),"getComponent",(function(){var e=o.props,t=e.prefixCls,n=e.destroyPopupOnHide,i=e.popupClassName,a=e.onPopupAlign,c=e.popupMotion,l=e.popupAnimation,s=e.popupTransitionName,p=e.popupStyle,f=e.mask,d=e.maskAnimation,m=e.maskTransitionName,v=e.maskMotion,h=e.zIndex,g=e.popup,y=e.stretch,b=e.alignPoint,w=e.mobile,x=e.forceRender,A=e.onPopupClick,O=o.state,E=O.popupVisible,S=O.point,k=o.getPopupAlign(),C={};return o.isMouseEnterToShow()&&(C.onMouseEnter=o.onPopupMouseEnter),o.isMouseLeaveToHide()&&(C.onMouseLeave=o.onPopupMouseLeave),C.onMouseDown=o.onPopupMouseDown,C.onTouchStart=o.onPopupMouseDown,u.createElement(nt,(0,r.A)({prefixCls:t,destroyPopupOnHide:n,visible:E,point:b&&S,className:i,align:k,onAlign:a,animation:l,getClassNameFromAlign:o.getPopupClassNameFromAlign},C,{stretch:y,getRootDomNode:o.getRootDomNode,style:p,mask:f,zIndex:h,transitionName:s,maskAnimation:d,maskTransitionName:m,maskMotion:v,ref:o.popupRef,motion:c,mobile:w,forceRender:x,onClick:A}),"function"==typeof g?g():g)})),(0,p.A)((0,c.A)(o),"attachParent",(function(e){v.A.cancel(o.attachId);var t,n=o.props,r=n.getPopupContainer,i=n.getDocument,a=o.getRootDomNode();r?(a||0===r.length)&&(t=r(a)):t=i(o.getRootDomNode()).body,t?t.appendChild(e):o.attachId=(0,v.A)((function(){o.attachParent(e)}))})),(0,p.A)((0,c.A)(o),"getContainer",(function(){if(!o.portalContainer){var e=(0,o.props.getDocument)(o.getRootDomNode()).createElement("div");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",o.portalContainer=e}return o.attachParent(o.portalContainer),o.portalContainer})),(0,p.A)((0,c.A)(o),"setPoint",(function(e){o.props.alignPoint&&e&&o.setState({point:{pageX:e.pageX,pageY:e.pageY}})})),(0,p.A)((0,c.A)(o),"handlePortalUpdate",(function(){o.state.prevPopupVisible!==o.state.popupVisible&&o.props.afterPopupVisibleChange(o.state.popupVisible)})),(0,p.A)((0,c.A)(o),"triggerContextValue",{onPopupMouseDown:o.onPopupMouseDown}),a="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,o.state={prevPopupVisible:a,popupVisible:a},ct.forEach((function(e){o["fire".concat(e)]=function(t){o.fireEvents(e,t)}})),o}return(0,a.A)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=(0,b.A)(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=(0,b.A)(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=(0,b.A)(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=(0,b.A)(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),v.A.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var e;return(null===(e=this.popupRef.current)||void 0===e?void 0:e.getElement())||null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,r=e.builtinPlacements;return t&&r?function(e,t,n){var r=e[t]||{};return(0,o.A)((0,o.A)({},r),n)}(r,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,o=this.state.popupVisible;this.clearDelayTimer(),o!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:o}),this.props.onPopupVisibleChange(e)),n&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var o=this,r=1e3*t;if(this.clearDelayTimer(),r){var i=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){o.setPopupVisible(e,i),o.clearDelayTimer()}),r)}else this.setPopupVisible(e,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuOnly",value:function(){var e=this.props.action;return"contextMenu"===e||1===e.length&&"contextMenu"===e[0]}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var e;this.state.popupVisible&&(null===(e=this.popupRef.current)||void 0===e||e.forceAlign())}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var o=this.props[e];o&&o(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var e=this.state.popupVisible,t=this.props,n=t.children,r=t.forceRender,i=t.alignPoint,a=t.className,c=t.autoDestroy,l=u.Children.only(n),s={key:"trigger"};this.isContextMenuToShow()?s.onContextMenu=this.onContextMenu:s.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(s.onClick=this.onClick,s.onMouseDown=this.onMouseDown,s.onTouchStart=this.onTouchStart):(s.onClick=this.createTwoChains("onClick"),s.onMouseDown=this.createTwoChains("onMouseDown"),s.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(s.onMouseEnter=this.onMouseEnter,i&&(s.onMouseMove=this.onMouseMove)):s.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?s.onMouseLeave=this.onMouseLeave:s.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(s.onFocus=this.onFocus,s.onBlur=this.onBlur):(s.onFocus=this.createTwoChains("onFocus"),s.onBlur=this.createTwoChains("onBlur"));var p=A()(l&&l.props&&l.props.className,a);p&&(s.className=p);var f=(0,o.A)({},s);(0,y.f3)(l)&&(f.ref=(0,y.K4)(this.triggerRef,l.ref));var d,m=u.cloneElement(l,f);return(e||this.popupRef.current||r)&&(d=u.createElement(st,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!e&&c&&(d=null),u.createElement(ot.Provider,{value:this.triggerContextValue},m,d)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,o={};return void 0!==n&&t.popupVisible!==n&&(o.popupVisible=n,o.prevPopupVisible=t.popupVisible),o}}]),n}(u.Component),(0,p.A)(pt,"contextType",ot),(0,p.A)(pt,"defaultProps",{prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:it,getDocument:at,onPopupVisibleChange:rt,afterPopupVisibleChange:rt,onPopupAlign:rt,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1}),pt);var st,pt},69916:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(69514),r=n.n(o);function i(e,t,n,o){var i=r().unstable_batchedUpdates?function(e){r().unstable_batchedUpdates(n,e)}:n;return null!=e&&e.addEventListener&&e.addEventListener(t,i,o),{remove:function(){null!=e&&e.removeEventListener&&e.removeEventListener(t,i,o)}}}},20998:(e,t,n)=>{"use strict";function o(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}n.d(t,{A:()=>o})},54808:(e,t,n)=>{"use strict";function o(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}n.d(t,{A:()=>o})},66588:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var o=n(39155),r=n.n(o),i=n(69514),a=n.n(i);function c(e){return function(e){return e instanceof HTMLElement||e instanceof SVGElement}(e)?e:e instanceof r().Component?a().findDOMNode(e):null}},42467:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,o=t.height;if(n||o)return!0}if(e.getBoundingClientRect){var r=e.getBoundingClientRect(),i=r.width,a=r.height;if(i||a)return!0}}return!1}},16928:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=o.F1&&t<=o.F12)return!1;switch(t){case o.ALT:case o.CAPS_LOCK:case o.CONTEXT_MENU:case o.CTRL:case o.DOWN:case o.END:case o.ESC:case o.HOME:case o.INSERT:case o.LEFT:case o.MAC_FF_META:case o.META:case o.NUMLOCK:case o.NUM_CENTER:case o.PAGE_DOWN:case o.PAGE_UP:case o.PAUSE:case o.PRINT_SCREEN:case o.RIGHT:case o.SHIFT:case o.UP:case o.WIN_KEY:case o.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=o.ZERO&&e<=o.NINE)return!0;if(e>=o.NUM_ZERO&&e<=o.NUM_MULTIPLY)return!0;if(e>=o.A&&e<=o.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case o.SPACE:case o.QUESTION_MARK:case o.NUM_PLUS:case o.NUM_MINUS:case o.NUM_PERIOD:case o.NUM_DIVISION:case o.SEMICOLON:case o.DASH:case o.EQUALS:case o.COMMA:case o.PERIOD:case o.SLASH:case o.APOSTROPHE:case o.SINGLE_QUOTE:case o.OPEN_SQUARE_BRACKET:case o.BACKSLASH:case o.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const r=o},88822:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var o=n(39155),r=n(69514),i=n.n(r),a=n(20998);const c=(0,o.forwardRef)((function(e,t){var n=e.didUpdate,r=e.getContainer,c=e.children,l=(0,o.useRef)(),s=(0,o.useRef)();(0,o.useImperativeHandle)(t,(function(){return{}}));var p=(0,o.useRef)(!1);return!p.current&&(0,a.A)()&&(s.current=r(),l.current=s.current.parentNode,p.current=!0),(0,o.useEffect)((function(){null==n||n(e)})),(0,o.useEffect)((function(){return null===s.current.parentNode&&null!==l.current&&l.current.appendChild(s.current),function(){var e;null===(e=s.current)||void 0===e||null===(e=e.parentNode)||void 0===e||e.removeChild(s.current)}}),[]),s.current?i().createPortal(c,s.current):null}))},30981:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(39155),r=(0,n(20998).A)()?o.useLayoutEffect:o.useEffect,i=function(e,t){var n=o.useRef(!0);r((function(){return e(n.current)}),t),r((function(){return n.current=!1,function(){n.current=!0}}),[])};const a=i},28104:(e,t,n)=>{"use strict";n(39155)},1233:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(3453),r=n(39155);function i(e){var t=r.useRef(!1),n=r.useState(e),i=(0,o.A)(n,2),a=i[0],c=i[1];return r.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[a,function(e,n){n&&t.current||c(e)}]}},43210:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(82284),r=n(68210);const i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new Set;return function e(t,a){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=i.has(t);if((0,r.Ay)(!l,"Warning: There may be circular references"),l)return!1;if(t===a)return!0;if(n&&c>1)return!1;i.add(t);var s=c+1;if(Array.isArray(t)){if(!Array.isArray(a)||t.length!==a.length)return!1;for(var p=0;p<t.length;p++)if(!e(t[p],a[p],s))return!1;return!0}if(t&&a&&"object"===(0,o.A)(t)&&"object"===(0,o.A)(a)){var u=Object.keys(t);return u.length===Object.keys(a).length&&u.every((function(n){return e(t[n],a[n],s)}))}return!1}(e,t)}},68430:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4))}},25371:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=function(e){return+setTimeout(e,16)},r=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(o=function(e){return window.requestAnimationFrame(e)},r=function(e){return window.cancelAnimationFrame(e)});var i=0,a=new Map;function c(e){a.delete(e)}var l=function(e){var t=i+=1;return function n(r){if(0===r)c(t),e();else{var i=o((function(){n(r-1)}));a.set(t,i)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};l.cancel=function(e){var t=a.get(e);return c(e),r(t)};const s=l},8719:(e,t,n)=>{"use strict";n.d(t,{K4:()=>a,Xf:()=>i,f3:()=>c});var o=n(82284),r=(n(39155),n(44363));n(28104);function i(e,t){"function"==typeof e?e(t):"object"===(0,o.A)(e)&&e&&"current"in e&&(e.current=t)}function a(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t.filter((function(e){return e}));return o.length<=1?o[0]:function(e){t.forEach((function(t){i(t,e)}))}}function c(e){var t,n,o=(0,r.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof o||null!==(t=o.prototype)&&void 0!==t&&t.render||o.$$typeof===r.ForwardRef)&&!!("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render||e.$$typeof===r.ForwardRef)}},68210:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s});var o={},r=[];function i(e,t){}function a(e,t){}function c(e,t,n){t||o[n]||(e(!1,n),o[n]=!0)}function l(e,t){c(i,e,t)}l.preMessage=function(e){r.push(e)},l.resetWarned=function(){o={}},l.noteOnce=function(e,t){c(a,e,t)};const s=l},22799:(e,t)=>{"use strict";var n,o=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),p=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");
|
|
21
|
+
Ue=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function p(e,t,n,o){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),c=new P(o||[]);return r(a,"_invoke",{value:k(e,n,c)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var f="suspendedStart",d="suspendedYield",m="executing",v="completed",h={};function g(){}function y(){}function b(){}var w={};s(w,a,(function(){return this}));var x=Object.getPrototypeOf,A=x&&x(x(_([])));A&&A!==n&&o.call(A,a)&&(w=A);var O=b.prototype=g.prototype=Object.create(w);function E(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(r,i,a,c){var l=u(e[r],e,i);if("throw"!==l.type){var s=l.arg,p=s.value;return p&&"object"==(0,T.A)(p)&&o.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(p).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,c)}))}c(l.arg)}var i;r(this,"_invoke",{value:function(e,o){function r(){return new t((function(t,r){n(e,o,t,r)}))}return i=i?i.then(r,r):r()}})}function k(t,n,o){var r=f;return function(i,a){if(r===m)throw Error("Generator is already running");if(r===v){if("throw"===i)throw a;return{value:e,done:!0}}for(o.method=i,o.arg=a;;){var c=o.delegate;if(c){var l=C(c,o);if(l){if(l===h)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(r===f)throw r=v,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r=m;var s=u(t,n,o);if("normal"===s.type){if(r=o.done?v:d,s.arg===h)continue;return{value:s.arg,done:o.done}}"throw"===s.type&&(r=v,o.method="throw",o.arg=s.arg)}}}function C(t,n){var o=n.method,r=t.iterator[o];if(r===e)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),h;var i=u(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,h;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function _(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function n(){for(;++r<t.length;)if(o.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError((0,T.A)(t)+" is not iterable")}return y.prototype=b,r(O,"constructor",{value:b,configurable:!0}),r(b,"constructor",{value:y,configurable:!0}),y.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},E(S.prototype),s(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,o,r,i){void 0===i&&(i=Promise);var a=new S(p(e,n,o,r),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},E(O),s(O,l,"Generator"),s(O,a,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=_,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(j),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(o,r){return c.type="throw",c.arg=t,n.next=o,r&&(n.method="next",n.arg=e),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(l&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;j(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:_(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),h}},t}var Ye=n(10467),qe=n(1233),Ke=["measure","alignPre","align",null,"motion"];var Xe=u.forwardRef((function(e,t){var n=e.visible,i=e.prefixCls,a=e.className,c=e.style,l=e.children,s=e.zIndex,p=e.stretch,f=e.destroyPopupOnHide,d=e.forceRender,m=e.align,h=e.point,g=e.getRootDomNode,y=e.getClassNameFromAlign,b=e.onAlign,w=e.onMouseEnter,x=e.onMouseLeave,O=e.onMouseDown,S=e.onTouchStart,k=e.onClick,j=(0,u.useRef)(),P=(0,u.useRef)(),T=(0,u.useState)(),_=(0,E.A)(T,2),N=_[0],D=_[1],L=function(e){var t=u.useState({width:0,height:0}),n=(0,E.A)(t,2),o=n[0],r=n[1];return[u.useMemo((function(){var t={};if(e){var n=o.width,r=o.height;-1!==e.indexOf("height")&&r?t.height=r:-1!==e.indexOf("minHeight")&&r&&(t.minHeight=r),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,o]),function(e){var t=e.offsetWidth,n=e.offsetHeight,o=e.getBoundingClientRect(),i=o.width,a=o.height;Math.abs(t-i)<1&&Math.abs(n-a)<1&&(t=i,n=a),r({width:t,height:n})}]}(p),R=(0,E.A)(L,2),H=R[0],I=R[1];var z=function(e,t){var n=(0,qe.A)(null),o=(0,E.A)(n,2),r=o[0],i=o[1],a=(0,u.useRef)();function c(e){i(e,!0)}function l(){v.A.cancel(a.current)}return(0,u.useEffect)((function(){c("measure")}),[e]),(0,u.useEffect)((function(){"measure"===r&&t(),r&&(a.current=(0,v.A)((0,Ye.A)(Ue().mark((function e(){var t,n;return Ue().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ke.indexOf(r),(n=Ke[t+1])&&-1!==t&&c(n);case 3:case"end":return e.stop()}}),e)})))))}),[r]),(0,u.useEffect)((function(){return function(){l()}}),[]),[r,function(e){l(),a.current=(0,v.A)((function(){c((function(e){switch(r){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){p&&I(g())})),F=(0,E.A)(z,2),V=F[0],Z=F[1],B=(0,u.useState)(0),$=(0,E.A)(B,2),W=$[0],U=$[1],Y=(0,u.useRef)();function q(){var e;null===(e=j.current)||void 0===e||e.forceAlign()}function K(e,t){var n=y(t);N!==n&&D(n),U((function(e){return e+1})),"align"===V&&(null==b||b(e,t))}(0,Ie.A)((function(){"alignPre"===V&&U(0)}),[V]),(0,Ie.A)((function(){"align"===V&&(W<3?q():Z((function(){var e;null===(e=Y.current)||void 0===e||e.call(Y)})))}),[W]);var X=(0,o.A)({},M(e));function G(){return new Promise((function(e){Y.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=X[e];X[e]=function(e,n){return Z(),null==t?void 0:t(e,n)}})),u.useEffect((function(){X.motionName||"motion"!==V||Z()}),[X.motionName,V]),u.useImperativeHandle(t,(function(){return{forceAlign:q,getElement:function(){return P.current}}}));var Q=(0,o.A)((0,o.A)({},H),{},{zIndex:s,opacity:"motion"!==V&&"stable"!==V&&n?0:void 0,pointerEvents:n||"stable"===V?void 0:"none"},c),J=!0;null==m||!m.points||"align"!==V&&"stable"!==V||(J=!1);var ee=l;return u.Children.count(l)>1&&(ee=u.createElement("div",{className:"".concat(i,"-content")},l)),u.createElement(C.A,(0,r.A)({visible:n,ref:P,leavedClassName:"".concat(i,"-hidden")},X,{onAppearPrepare:G,onEnterPrepare:G,removeOnLeave:f,forceRender:d}),(function(e,t){var n=e.className,r=e.style,c=A()(i,a,N,n);return u.createElement(We,{target:h||g,key:"popup",ref:j,monitorWindowResize:!0,disabled:J,align:m,onAlign:K},u.createElement("div",{ref:t,className:c,onMouseEnter:w,onMouseLeave:x,onMouseDownCapture:O,onTouchStartCapture:S,onClick:k,style:(0,o.A)((0,o.A)({},r),Q)},ee))}))}));Xe.displayName="PopupInner";const Ge=Xe;var Qe=u.forwardRef((function(e,t){var n=e.prefixCls,i=e.visible,a=e.zIndex,c=e.children,l=e.mobile,s=(l=void 0===l?{}:l).popupClassName,p=l.popupStyle,f=l.popupMotion,d=void 0===f?{}:f,m=l.popupRender,v=e.onClick,h=u.useRef();u.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return h.current}}}));var g=(0,o.A)({zIndex:a},p),y=c;return u.Children.count(c)>1&&(y=u.createElement("div",{className:"".concat(n,"-content")},c)),m&&(y=m(y)),u.createElement(C.A,(0,r.A)({visible:i,ref:h,removeOnLeave:!0},d),(function(e,t){var r=e.className,i=e.style,a=A()(n,s,r);return u.createElement("div",{ref:t,className:a,onClick:v,style:(0,o.A)((0,o.A)({},i),g)},y)}))}));Qe.displayName="MobilePopupInner";const Je=Qe;var et=["visible","mobile"],tt=u.forwardRef((function(e,t){var n=e.visible,i=e.mobile,a=(0,S.A)(e,et),c=(0,u.useState)(n),l=(0,E.A)(c,2),s=l[0],p=l[1],f=(0,u.useState)(!1),d=(0,E.A)(f,2),m=d[0],v=d[1],h=(0,o.A)((0,o.A)({},a),{},{visible:s});(0,u.useEffect)((function(){p(n),n&&i&&v((0,k.A)())}),[n,i]);var g=m?u.createElement(Je,(0,r.A)({},h,{mobile:i,ref:t})):u.createElement(Ge,(0,r.A)({},h,{ref:t}));return u.createElement("div",null,u.createElement(j,h),g)}));tt.displayName="Popup";const nt=tt;const ot=u.createContext(null);function rt(){}function it(){return""}function at(e){return e?e.ownerDocument:window.document}var ct=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];const lt=(st=w.A,pt=function(e){(0,l.A)(n,e);var t=(0,s.A)(n);function n(e){var o,a;return(0,i.A)(this,n),o=t.call(this,e),(0,p.A)((0,c.A)(o),"popupRef",u.createRef()),(0,p.A)((0,c.A)(o),"triggerRef",u.createRef()),(0,p.A)((0,c.A)(o),"portalContainer",void 0),(0,p.A)((0,c.A)(o),"attachId",void 0),(0,p.A)((0,c.A)(o),"clickOutsideHandler",void 0),(0,p.A)((0,c.A)(o),"touchOutsideHandler",void 0),(0,p.A)((0,c.A)(o),"contextMenuOutsideHandler1",void 0),(0,p.A)((0,c.A)(o),"contextMenuOutsideHandler2",void 0),(0,p.A)((0,c.A)(o),"mouseDownTimeout",void 0),(0,p.A)((0,c.A)(o),"focusTime",void 0),(0,p.A)((0,c.A)(o),"preClickTime",void 0),(0,p.A)((0,c.A)(o),"preTouchTime",void 0),(0,p.A)((0,c.A)(o),"delayTimer",void 0),(0,p.A)((0,c.A)(o),"hasPopupMouseDown",void 0),(0,p.A)((0,c.A)(o),"onMouseEnter",(function(e){var t=o.props.mouseEnterDelay;o.fireEvents("onMouseEnter",e),o.delaySetPopupVisible(!0,t,t?null:e)})),(0,p.A)((0,c.A)(o),"onMouseMove",(function(e){o.fireEvents("onMouseMove",e),o.setPoint(e)})),(0,p.A)((0,c.A)(o),"onMouseLeave",(function(e){o.fireEvents("onMouseLeave",e),o.delaySetPopupVisible(!1,o.props.mouseLeaveDelay)})),(0,p.A)((0,c.A)(o),"onPopupMouseEnter",(function(){o.clearDelayTimer()})),(0,p.A)((0,c.A)(o),"onPopupMouseLeave",(function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&(0,h.A)(null===(t=o.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||o.delaySetPopupVisible(!1,o.props.mouseLeaveDelay)})),(0,p.A)((0,c.A)(o),"onFocus",(function(e){o.fireEvents("onFocus",e),o.clearDelayTimer(),o.isFocusToShow()&&(o.focusTime=Date.now(),o.delaySetPopupVisible(!0,o.props.focusDelay))})),(0,p.A)((0,c.A)(o),"onMouseDown",(function(e){o.fireEvents("onMouseDown",e),o.preClickTime=Date.now()})),(0,p.A)((0,c.A)(o),"onTouchStart",(function(e){o.fireEvents("onTouchStart",e),o.preTouchTime=Date.now()})),(0,p.A)((0,c.A)(o),"onBlur",(function(e){o.fireEvents("onBlur",e),o.clearDelayTimer(),o.isBlurToHide()&&o.delaySetPopupVisible(!1,o.props.blurDelay)})),(0,p.A)((0,c.A)(o),"onContextMenu",(function(e){e.preventDefault(),o.fireEvents("onContextMenu",e),o.setPopupVisible(!0,e)})),(0,p.A)((0,c.A)(o),"onContextMenuClose",(function(){o.isContextMenuToShow()&&o.close()})),(0,p.A)((0,c.A)(o),"onClick",(function(e){if(o.fireEvents("onClick",e),o.focusTime){var t;if(o.preClickTime&&o.preTouchTime?t=Math.min(o.preClickTime,o.preTouchTime):o.preClickTime?t=o.preClickTime:o.preTouchTime&&(t=o.preTouchTime),Math.abs(t-o.focusTime)<20)return;o.focusTime=0}o.preClickTime=0,o.preTouchTime=0,o.isClickToShow()&&(o.isClickToHide()||o.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!o.state.popupVisible;(o.isClickToHide()&&!n||n&&o.isClickToShow())&&o.setPopupVisible(!o.state.popupVisible,e)})),(0,p.A)((0,c.A)(o),"onPopupMouseDown",(function(){var e;o.hasPopupMouseDown=!0,clearTimeout(o.mouseDownTimeout),o.mouseDownTimeout=window.setTimeout((function(){o.hasPopupMouseDown=!1}),0),o.context&&(e=o.context).onPopupMouseDown.apply(e,arguments)})),(0,p.A)((0,c.A)(o),"onDocumentClick",(function(e){if(!o.props.mask||o.props.maskClosable){var t=e.target,n=o.getRootDomNode(),r=o.getPopupDomNode();(0,h.A)(n,t)&&!o.isContextMenuOnly()||(0,h.A)(r,t)||o.hasPopupMouseDown||o.close()}})),(0,p.A)((0,c.A)(o),"getRootDomNode",(function(){var e=o.props.getTriggerDOMNode;if(e)return e(o.triggerRef.current);try{var t=(0,g.A)(o.triggerRef.current);if(t)return t}catch(e){}return m().findDOMNode((0,c.A)(o))})),(0,p.A)((0,c.A)(o),"getPopupClassNameFromAlign",(function(e){var t=[],n=o.props,r=n.popupPlacement,i=n.builtinPlacements,a=n.prefixCls,c=n.alignPoint,l=n.getPopupClassNameFromAlign;return r&&i&&t.push(function(e,t,n,o){for(var r=n.points,i=Object.keys(e),a=0;a<i.length;a+=1){var c=i[a];if(O(e[c].points,r,o))return"".concat(t,"-placement-").concat(c)}return""}(i,a,e,c)),l&&t.push(l(e)),t.join(" ")})),(0,p.A)((0,c.A)(o),"getComponent",(function(){var e=o.props,t=e.prefixCls,n=e.destroyPopupOnHide,i=e.popupClassName,a=e.onPopupAlign,c=e.popupMotion,l=e.popupAnimation,s=e.popupTransitionName,p=e.popupStyle,f=e.mask,d=e.maskAnimation,m=e.maskTransitionName,v=e.maskMotion,h=e.zIndex,g=e.popup,y=e.stretch,b=e.alignPoint,w=e.mobile,x=e.forceRender,A=e.onPopupClick,O=o.state,E=O.popupVisible,S=O.point,k=o.getPopupAlign(),C={};return o.isMouseEnterToShow()&&(C.onMouseEnter=o.onPopupMouseEnter),o.isMouseLeaveToHide()&&(C.onMouseLeave=o.onPopupMouseLeave),C.onMouseDown=o.onPopupMouseDown,C.onTouchStart=o.onPopupMouseDown,u.createElement(nt,(0,r.A)({prefixCls:t,destroyPopupOnHide:n,visible:E,point:b&&S,className:i,align:k,onAlign:a,animation:l,getClassNameFromAlign:o.getPopupClassNameFromAlign},C,{stretch:y,getRootDomNode:o.getRootDomNode,style:p,mask:f,zIndex:h,transitionName:s,maskAnimation:d,maskTransitionName:m,maskMotion:v,ref:o.popupRef,motion:c,mobile:w,forceRender:x,onClick:A}),"function"==typeof g?g():g)})),(0,p.A)((0,c.A)(o),"attachParent",(function(e){v.A.cancel(o.attachId);var t,n=o.props,r=n.getPopupContainer,i=n.getDocument,a=o.getRootDomNode();r?(a||0===r.length)&&(t=r(a)):t=i(o.getRootDomNode()).body,t?t.appendChild(e):o.attachId=(0,v.A)((function(){o.attachParent(e)}))})),(0,p.A)((0,c.A)(o),"getContainer",(function(){if(!o.portalContainer){var e=(0,o.props.getDocument)(o.getRootDomNode()).createElement("div");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",o.portalContainer=e}return o.attachParent(o.portalContainer),o.portalContainer})),(0,p.A)((0,c.A)(o),"setPoint",(function(e){o.props.alignPoint&&e&&o.setState({point:{pageX:e.pageX,pageY:e.pageY}})})),(0,p.A)((0,c.A)(o),"handlePortalUpdate",(function(){o.state.prevPopupVisible!==o.state.popupVisible&&o.props.afterPopupVisibleChange(o.state.popupVisible)})),(0,p.A)((0,c.A)(o),"triggerContextValue",{onPopupMouseDown:o.onPopupMouseDown}),a="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,o.state={prevPopupVisible:a,popupVisible:a},ct.forEach((function(e){o["fire".concat(e)]=function(t){o.fireEvents(e,t)}})),o}return(0,a.A)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=(0,b.A)(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=(0,b.A)(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=(0,b.A)(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=(0,b.A)(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),v.A.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var e;return(null===(e=this.popupRef.current)||void 0===e?void 0:e.getElement())||null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,r=e.builtinPlacements;return t&&r?function(e,t,n){var r=e[t]||{};return(0,o.A)((0,o.A)({},r),n)}(r,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,o=this.state.popupVisible;this.clearDelayTimer(),o!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:o}),this.props.onPopupVisibleChange(e)),n&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var o=this,r=1e3*t;if(this.clearDelayTimer(),r){var i=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){o.setPopupVisible(e,i),o.clearDelayTimer()}),r)}else this.setPopupVisible(e,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuOnly",value:function(){var e=this.props.action;return"contextMenu"===e||1===e.length&&"contextMenu"===e[0]}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var e;this.state.popupVisible&&(null===(e=this.popupRef.current)||void 0===e||e.forceAlign())}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var o=this.props[e];o&&o(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var e=this.state.popupVisible,t=this.props,n=t.children,r=t.forceRender,i=t.alignPoint,a=t.className,c=t.autoDestroy,l=u.Children.only(n),s={key:"trigger"};this.isContextMenuToShow()?s.onContextMenu=this.onContextMenu:s.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(s.onClick=this.onClick,s.onMouseDown=this.onMouseDown,s.onTouchStart=this.onTouchStart):(s.onClick=this.createTwoChains("onClick"),s.onMouseDown=this.createTwoChains("onMouseDown"),s.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(s.onMouseEnter=this.onMouseEnter,i&&(s.onMouseMove=this.onMouseMove)):s.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?s.onMouseLeave=this.onMouseLeave:s.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(s.onFocus=this.onFocus,s.onBlur=this.onBlur):(s.onFocus=this.createTwoChains("onFocus"),s.onBlur=this.createTwoChains("onBlur"));var p=A()(l&&l.props&&l.props.className,a);p&&(s.className=p);var f=(0,o.A)({},s);(0,y.f3)(l)&&(f.ref=(0,y.K4)(this.triggerRef,l.ref));var d,m=u.cloneElement(l,f);return(e||this.popupRef.current||r)&&(d=u.createElement(st,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!e&&c&&(d=null),u.createElement(ot.Provider,{value:this.triggerContextValue},m,d)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,o={};return void 0!==n&&t.popupVisible!==n&&(o.popupVisible=n,o.prevPopupVisible=t.popupVisible),o}}]),n}(u.Component),(0,p.A)(pt,"contextType",ot),(0,p.A)(pt,"defaultProps",{prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:it,getDocument:at,onPopupVisibleChange:rt,afterPopupVisibleChange:rt,onPopupAlign:rt,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1}),pt);var st,pt},69916:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(69514),r=n.n(o);function i(e,t,n,o){var i=r().unstable_batchedUpdates?function(e){r().unstable_batchedUpdates(n,e)}:n;return null!=e&&e.addEventListener&&e.addEventListener(t,i,o),{remove:function(){null!=e&&e.removeEventListener&&e.removeEventListener(t,i,o)}}}},20998:(e,t,n)=>{"use strict";function o(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}n.d(t,{A:()=>o})},54808:(e,t,n)=>{"use strict";function o(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}n.d(t,{A:()=>o})},66588:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var o=n(39155),r=n.n(o),i=n(69514),a=n.n(i);function c(e){return function(e){return e instanceof HTMLElement||e instanceof SVGElement}(e)?e:e instanceof r().Component?a().findDOMNode(e):null}},42467:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,o=t.height;if(n||o)return!0}if(e.getBoundingClientRect){var r=e.getBoundingClientRect(),i=r.width,a=r.height;if(i||a)return!0}}return!1}},16928:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=o.F1&&t<=o.F12)return!1;switch(t){case o.ALT:case o.CAPS_LOCK:case o.CONTEXT_MENU:case o.CTRL:case o.DOWN:case o.END:case o.ESC:case o.HOME:case o.INSERT:case o.LEFT:case o.MAC_FF_META:case o.META:case o.NUMLOCK:case o.NUM_CENTER:case o.PAGE_DOWN:case o.PAGE_UP:case o.PAUSE:case o.PRINT_SCREEN:case o.RIGHT:case o.SHIFT:case o.UP:case o.WIN_KEY:case o.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=o.ZERO&&e<=o.NINE)return!0;if(e>=o.NUM_ZERO&&e<=o.NUM_MULTIPLY)return!0;if(e>=o.A&&e<=o.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case o.SPACE:case o.QUESTION_MARK:case o.NUM_PLUS:case o.NUM_MINUS:case o.NUM_PERIOD:case o.NUM_DIVISION:case o.SEMICOLON:case o.DASH:case o.EQUALS:case o.COMMA:case o.PERIOD:case o.SLASH:case o.APOSTROPHE:case o.SINGLE_QUOTE:case o.OPEN_SQUARE_BRACKET:case o.BACKSLASH:case o.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const r=o},88822:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var o=n(39155),r=n(69514),i=n.n(r),a=n(20998);const c=(0,o.forwardRef)((function(e,t){var n=e.didUpdate,r=e.getContainer,c=e.children,l=(0,o.useRef)(),s=(0,o.useRef)();(0,o.useImperativeHandle)(t,(function(){return{}}));var p=(0,o.useRef)(!1);return!p.current&&(0,a.A)()&&(s.current=r(),l.current=s.current.parentNode,p.current=!0),(0,o.useEffect)((function(){null==n||n(e)})),(0,o.useEffect)((function(){return null===s.current.parentNode&&null!==l.current&&l.current.appendChild(s.current),function(){var e;null===(e=s.current)||void 0===e||null===(e=e.parentNode)||void 0===e||e.removeChild(s.current)}}),[]),s.current?i().createPortal(c,s.current):null}))},30981:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(39155),r=(0,n(20998).A)()?o.useLayoutEffect:o.useEffect,i=function(e,t){var n=o.useRef(!0);r((function(){return e(n.current)}),t),r((function(){return n.current=!1,function(){n.current=!0}}),[])};const a=i},28104:(e,t,n)=>{"use strict";n(39155)},1233:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(3453),r=n(39155);function i(e){var t=r.useRef(!1),n=r.useState(e),i=(0,o.A)(n,2),a=i[0],c=i[1];return r.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[a,function(e,n){n&&t.current||c(e)}]}},43210:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(82284),r=n(68210);const i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new Set;return function e(t,a){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=i.has(t);if((0,r.Ay)(!l,"Warning: There may be circular references"),l)return!1;if(t===a)return!0;if(n&&c>1)return!1;i.add(t);var s=c+1;if(Array.isArray(t)){if(!Array.isArray(a)||t.length!==a.length)return!1;for(var p=0;p<t.length;p++)if(!e(t[p],a[p],s))return!1;return!0}if(t&&a&&"object"===(0,o.A)(t)&&"object"===(0,o.A)(a)){var u=Object.keys(t);return u.length===Object.keys(a).length&&u.every((function(n){return e(t[n],a[n],s)}))}return!1}(e,t)}},68430:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const o=function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4))}},25371:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=function(e){return+setTimeout(e,16)},r=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(o=function(e){return window.requestAnimationFrame(e)},r=function(e){return window.cancelAnimationFrame(e)});var i=0,a=new Map;function c(e){a.delete(e)}var l=function(e){var t=i+=1;return function n(r){if(0===r)c(t),e();else{var i=o((function(){n(r-1)}));a.set(t,i)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};l.cancel=function(e){var t=a.get(e);return c(e),r(t)};const s=l},8719:(e,t,n)=>{"use strict";n.d(t,{K4:()=>a,Xf:()=>i,f3:()=>c});var o=n(82284),r=(n(39155),n(44363)),i=(n(28104),function(e,t){"function"==typeof e?e(t):"object"===(0,o.A)(e)&&e&&"current"in e&&(e.current=t)}),a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t.filter(Boolean);return o.length<=1?o[0]:function(e){t.forEach((function(t){i(t,e)}))}},c=function(e){var t,n,o=(0,r.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof o||null!==(t=o.prototype)&&void 0!==t&&t.render||o.$$typeof===r.ForwardRef)&&!!("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render||e.$$typeof===r.ForwardRef)}},68210:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s});var o={},r=[];function i(e,t){}function a(e,t){}function c(e,t,n){t||o[n]||(e(!1,n),o[n]=!0)}function l(e,t){c(i,e,t)}l.preMessage=function(e){r.push(e)},l.resetWarned=function(){o={}},l.noteOnce=function(e,t){c(a,e,t)};const s=l},22799:(e,t)=>{"use strict";var n,o=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),p=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");
|
|
22
22
|
/**
|
|
23
23
|
* @license React
|
|
24
24
|
* react-is.production.min.js
|
|
@@ -40,4 +40,4 @@ Ue=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,r=Objec
|
|
|
40
40
|
Copyright (c) 2018 Jed Watson.
|
|
41
41
|
Licensed under the MIT License (MIT), see
|
|
42
42
|
http://jedwatson.github.io/classnames
|
|
43
|
-
*/!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},43145:(e,t,n)=>{"use strict";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}n.d(t,{A:()=>o})},96369:(e,t,n)=>{"use strict";function o(e){if(Array.isArray(e))return e}n.d(t,{A:()=>o})},9417:(e,t,n)=>{"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>o})},10467:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,a){try{var c=e[i](a),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(o,r)}function r(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function c(e){o(a,r,i,c,l,"next",e)}function l(e){o(a,r,i,c,l,"throw",e)}c(void 0)}))}}n.d(t,{A:()=>r})},23029:(e,t,n)=>{"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:()=>o})},92901:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(49922);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(0,o.A)(r.key),r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},29426:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(53954),r=n(52176),i=n(56822);function a(e){var t=(0,r.A)();return function(){var n,r=(0,o.A)(e);if(t){var a=(0,o.A)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return(0,i.A)(this,n)}}},64467:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(49922);function r(e,t,n){return(t=(0,o.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},58168:(e,t,n)=>{"use strict";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{A:()=>o})},53954:(e,t,n)=>{"use strict";function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}n.d(t,{A:()=>o})},85501:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(63662);function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,o.A)(e,t)}},52176:(e,t,n)=>{"use strict";function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}n.d(t,{A:()=>o})},6986:(e,t,n)=>{"use strict";function o(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(c.push(o.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw r}}return c}}n.d(t,{A:()=>o})},76562:(e,t,n)=>{"use strict";function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>o})},89379:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(64467);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){(0,o.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},80045:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(98587);function r(e,t){if(null==e)return{};var n,r,i=(0,o.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},98587:(e,t,n)=>{"use strict";function o(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}n.d(t,{A:()=>o})},56822:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(82284),r=n(9417);function i(e,t){if(t&&("object"===(0,o.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.A)(e)}},63662:(e,t,n)=>{"use strict";function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}n.d(t,{A:()=>o})},3453:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var o=n(96369),r=n(6986),i=n(27800),a=n(76562);function c(e,t){return(0,o.A)(e)||(0,r.A)(e,t)||(0,i.A)(e,t)||(0,a.A)()}},92327:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(82284);function r(e,t){if("object"!=(0,o.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=(0,o.A)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}},49922:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(82284),r=n(92327);function i(e){var t=(0,r.A)(e,"string");return"symbol"==(0,o.A)(t)?t:t+""}},82284:(e,t,n)=>{"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n.d(t,{A:()=>o})},27800:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(43145);function r(e,t){if(e){if("string"==typeof e)return(0,o.A)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,o.A)(e,t):void 0}}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={id:e,exports:{}};return o[e].call(n.exports,n,n.exports,i),n.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var a={};return(()=>{"use strict";i.r(a),i.d(a,{default:()=>N});var e=i(39155),t=i.n(e),n=i(27788),o=i(18406),r=i(96342),c=i(32663),l=i(4205),s=i(39864),p=i(97978),u=i(15664),f=i(74848),d=i(55307),m=function(e){return(0,f.jsx)(d.A,Object.assign({dataName:"Check",viewBox:"0 0 24 24",path:(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)("g",Object.assign({id:"Check",transform:"translate(-362 -287)"},{children:[(0,f.jsx)("rect",{id:"safe",width:"24",height:"24",transform:"translate(362 287)",fill:"none"}),(0,f.jsx)("path",{id:"icon",d:"M6.795,13.6h0a.933.933,0,0,1-.66-.273L.273,7.463a.933.933,0,0,1,1.32-1.32l5.2,5.2L17.873.273a.933.933,0,1,1,1.32,1.32L7.455,13.327a.933.933,0,0,1-.66.273",transform:"translate(364.267 292.2)"})]}))})},e))},v=i(77424),h=i(7569);const g={zh:{searchPlaceholder:"请输入",more:"更多"},en:{searchPlaceholder:"Please enter",more:"More"}};var y=i(69004),b=i(7192),w=i(89315),x=i(17234),A=i(32209),O=i(82316),E=i(14552);i(32324);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){k(e,t,n[t])}))}return e}function M(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){c=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw r}}return i}}(e,t)||T(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}var _=function(e,n){var o=t().useRef(!1);t().useEffect((function(){o.current?e():o.current=!0}),n)};const N=function(i){var a,f=(0,O.A)(i,"Select"),d=f.className,S=f.style,T=f.showSelect,N=void 0===T||T,D=f.allowClear,L=void 0!==D&&D,R=f.emptyProps,H=f.size,I=void 0===H?"large":H,z=f.labelMode,F=void 0===z?"outside":z,V=f.labelTooltip,Z=f.placeholder,B=void 0===Z?"":Z,$=f.searchPlaceholder,W=f.label,U=void 0===W?"":W,Y=f.input,q=void 0!==Y&&Y,K=f.disabled,X=void 0!==K&&K,G=f.disabledTooltip,Q=f.multiple,J=void 0!==Q&&Q,ee=f.required,te=void 0!==ee&&ee,ne=f.labelSign,oe=f.error,re=void 0!==oe&&oe,ie=f.hideErrorDom,ae=f.helperText,ce=void 0===ae?"":ae,le=f.list,se=f.showName,pe=void 0===se?"label":se,ue=f.showValue,fe=void 0===ue?"value":ue,de=f.childrenName,me=void 0===de?"children":de,ve=f.value,he=f.onChange,ge=f.overLine,ye=void 0!==ge&&ge,be=f.search,we=void 0!==be&&be,xe=f.searchModel,Ae=void 0===xe?"inside":xe,Oe=f.selectPopoverClassName,Ee=f.morePopoverClassName,Se=(f.fetchSuggestions,f.searchInputProps),ke=f.onEnter,Ce=f.onEnterInput,Me=f.onClear,je=f.getPopupContainer,Pe=f.renderContent,Te=f.selectCheckIcon,_e=void 0===Te||Te,Ne=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=0,o=e.length;n<o;n++){var r=e[n];if("object"==typeof r&&null!==r)t.push(r);else{var i={};i[pe]=r,i[fe]=r,t.push(i)}}return t},De=function(){for(var e=Ne(le),t={},n=0,o=e.length;n<o;n++){var r=e[n];if(r[me]&&r[me].length>0)for(var i=r[me],a=0,c=i.length;a<c;a++){var l=i[a];t[l[fe]]=l}else t[r[fe]]=r}return t},Le=(0,e.useRef)(null),Re=j((0,e.useState)("".concat(E.n,"-select-").concat((0,c.UUID)())),1)[0],He=j((0,e.useState)("select-popover-".concat((0,c.UUID)())),1)[0],Ie=j((0,e.useState)(!1),2),ze=Ie[0],Fe=Ie[1],Ve=j((0,e.useState)(!1),2),Ze=Ve[0],Be=Ve[1],$e=j((0,e.useState)((a=[],void 0!==i.defaultValue&&(a=i.multiple?(0,c.DeepClone)(i.defaultValue||[]):""===i.defaultValue?[]:[i.defaultValue]),void 0!==ve&&(a=J?(0,c.DeepClone)(ve||[]):""===ve?[]:[ve]),a)),2),We=$e[0],Ue=$e[1],Ye=j((0,e.useState)([]),2),qe=Ye[0],Ke=Ye[1],Xe=j((0,e.useState)(De()),2),Ge=Xe[0],Qe=Xe[1],Je=j((0,e.useState)(null),2),et=Je[0],tt=Je[1],nt=j((0,e.useState)(!1),2),ot=nt[0],rt=nt[1],it=j((0,e.useState)(""),2),at=it[0],ct=it[1],lt=j((0,e.useState)(!1),2),st=lt[0],pt=lt[1],ut=j((0,e.useState)(!1),2),ft=ut[0],dt=ut[1],mt=j((0,e.useState)(!1),2),vt=mt[0],ht=mt[1],gt=(0,e.useRef)(null),yt=j((0,e.useState)({}),1)[0],bt=t().useContext(l.default),wt=bt.language,xt=bt.locale,At=(0,h.A)("Select",g);yt.valueCom=P(We),yt.listCom=qe,yt.searchModel=Ae,yt.openMore=ot,(0,e.useEffect)((function(){return function(){clearTimeout(yt.searchTimer),clearTimeout(yt.timer),clearTimeout(yt.scrollTimer),clearTimeout(yt.dropDownTimer)}}),[]),_((function(){void 0!==ve&&Ue(J?(0,c.DeepClone)(ve||[]):""===ve?[]:[ve])}),[ve,J]),(0,e.useEffect)((function(){St()}),[We,ve]),(0,e.useEffect)((function(){if("outside"===Ae&&J)return pt(!0);pt(ye)}),[ye,Ae,J,q]),_((function(){Qe(De())}),[le]),(0,e.useEffect)((function(){return!st&&J?window.addEventListener("resize",St):window.removeEventListener("resize",St),function(){window.removeEventListener("resize",St)}}),[st,J]),(0,e.useEffect)((function(){We&&We.length>0?Be(!0):(Be(!1),"outside"===Ae&&Be(""!==at))}),[we,at,Ae,We,q]),(0,e.useEffect)((function(){if(ze)if(dt(!0),i.fetchSuggestions)i.fetchSuggestions(at,(function(e){var t=Ne(e);kt(t,!0),dt(!1)}));else{var e=Ne(le);kt(e),dt(!1)}}),[we,at,le,ze]),(0,e.useEffect)((function(){return ze?(clearTimeout(yt.openTimer),yt.openTimer=setTimeout((function(){Ct(),window.addEventListener("keydown",Ft)}))):(ct(""),window.removeEventListener("keydown",Ft)),function(){clearTimeout(yt.openTimer),window.removeEventListener("keydown",Ft)}}),[ze]),(0,e.useEffect)((function(){!0!==X&&J&&"outside"===Ae&&Ht(at)}),[at,J,X,Ae,q]);var Ot,Et=function(e){if(null!==e&&0!==e){void 0===e&&(e=yt.valueCom.length);var t=document.querySelector(".".concat(Re," > .select-content > .check-select-content"));if(t)if(t.scrollHeight>t.clientHeight){var n=Number(e)-1;tt(n),Et(n)}else yt.valueCom.length<=e&&_t()}},St=function(){if(0===yt.valueCom.length)return tt(null);clearTimeout(yt.timer),yt.timer=setTimeout((function(){tt(yt.valueCom.length),Et()}),50)},kt=function(e,t){for(var n=[],o=P(e),r=0,i=o.length;r<i;r++){var a=o[r];if(a[me]&&a[me].length>0){for(var c=a[me],l=[],s=0,p=c.length;s<p;s++){var u=c[s];if(t)l.push(u);else jt(u)&&l.push(u)}l.length>0&&(a[me]=l,n.push(a))}else{if(t)n.push(a);else jt(a)&&n.push(a)}}Ke(n),dt(!1),ht(0===n.length)},Ct=function(){var e=gt&>.current;"inside"!==yt.searchModel&&e&&e.focus({preventScroll:!0})},Mt=function(e,t){for(var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!n.call(e,t);)e=e.parentElement;return e},jt=function(e){var t=!0;if(""===at.trim())return t;var n=e[pe];return(!n||"number"!=typeof n&&"string"!=typeof n||-1===(n=n.toString()).toLowerCase().indexOf(at.trim().toLowerCase()))&&(t=!1),t},Pt=function(){!0!==X&&Fe(!0)},Tt=function(e){rt(!0),Fe(!1),e.stopPropagation()},_t=function(){yt.openMore&&rt(!1)},Nt=function(e,t){return function(n){var o=e[fe];if("object"!=typeof X||-1===X.indexOf(o))if(J){var r=yt.valueCom.indexOf(o);-1!==r?yt.valueCom.splice(r,1):yt.valueCom.push(o),void 0===i.value&&Ue(P(yt.valueCom)),he&&he(P(yt.valueCom),n),t&&ke&&ke(P(yt.valueCom)),Ct()}else void 0===i.value&&Ue([o]),he&&he(o,n),t&&ke&&ke(o),Fe(!1),ct("")}},Dt=function(e,t){return function(n){e||(e=k({},fe,t)),Nt(e)(n),n.stopPropagation()}},Lt=function(e){ct(e.target.value),Se&&Se.onChange&&Se.onChange(e)},Rt=function(e){if(13===e.keyCode){Ce&&Ce(at);var t=document.querySelector(".".concat(He," .select-popover-list"));if(t){var n=t.querySelector(".select-popover-list-item-hover");if(t.querySelector(".select-popover-list-item-keydown")||n)return}if(i.input&&""!==at.trim()){var o="";o=J?P(We).concat([at]):at,void 0===i.value&&Ue(o),he&&he(o,e),ct("")}}Se&&Se.onKeyDown&&Se.onKeyDown(e)},Ht=function(e){var t=gt&>.current;if(!t)return null;var n=window.getComputedStyle(t),o=n.fontFamily,r=function(e,t,n){var o=document.createElement("span");o.id="referenceSpan";var r={};r.width=o.offsetWidth,r.height=o.offsetHeight,o.style.visibility="hidden",o.style.fontSize=e,o.style.fontFamily=t,o.style.display="inline-block";var i=document.getElementById("referenceSpan");return i&&document.body.removeChild(i),document.body.appendChild(o),void 0!==o.textContent?o.textContent=n:o.innerText=n,r.width=parseFloat(window.getComputedStyle(o).width)-r.width,r.height=parseFloat(window.getComputedStyle(o).height)-r.height,document.body.removeChild(o),r}(n.fontSize,o,e),i=r.width;i<10&&(i=10),t.style.width="".concat(i,"px")},It=function(e){var t=e.selectDom,n=e.keyCode,o=e.currentKeydownDom,r=null,i="nextSibling",a=".select-popover-list > div",c=".select-popover-list-item";if(38===n&&(i="previousSibling",a=".select-popover-list > div:last-child",c=".select-popover-list-item:last-child"),o)if(r=o[i])-1!==r.className.indexOf("select-popover-list-group-label")&&((r=(r=o.parentNode)[i])||(r=t.querySelector(a)));else{var l=o.parentNode;l&&l.className&&-1!==l.className.indexOf("select-popover-list-group")&&(r=(r=o.parentNode)[i])||(r=t.querySelector(a))}else r=t.querySelector(a);if(r)if(-1!==r.className.indexOf("select-popover-list-group")){var s=r.querySelector(c);s&&(s.classList.add("select-popover-list-item-keydown"),zt(s,t))}else r.classList.add("select-popover-list-item-keydown"),zt(r,t)},zt=function(e,t){clearTimeout(yt.scrollTimer);var n=t.clientHeight,o=e.offsetTop+e.clientHeight-n;yt.scroll=!0,t.scrollTop=o>0?o:0,yt.scrollTimer=setTimeout((function(){yt.scroll=!1}),100)},Ft=function(e){var t=document.querySelector(".".concat(He," .select-popover-list"));if(t){var n=t.querySelector(".select-popover-list-item-select"),o=t.querySelector(".select-popover-list-item-hover"),r=t.querySelector(".select-popover-list-item-keydown"),i=n;if(o&&(i=o),13===e.keyCode){var a=r||o;if(a){var c=a.dataset.val;Nt(Ge[c],!0)({target:r})}else ke&&ke(ve)}r&&(i=r,r.classList.remove("select-popover-list-item-keydown")),40===e.keyCode&&It({selectDom:t,keyCode:e.keyCode,currentKeydownDom:i}),38===e.keyCode&&It({selectDom:t,keyCode:e.keyCode,currentKeydownDom:i})}},Vt=function(e){if(!yt.scroll){var t=Mt(e.target,".select-popover-list-item");if(t){t.classList.add("select-popover-list-item-hover");var n=document.querySelector(".".concat(He)).querySelector(".select-popover-list-item-keydown");n&&n.classList.remove("select-popover-list-item-keydown")}}},Zt=function(e){var t=Mt(e.target,".select-popover-list-item");t&&t.classList.remove("select-popover-list-item-hover")},Bt=(0,e.useMemo)((function(){var e,n=Boolean(U||te||ne);return t().createElement(t().Fragment,null,"outside"===F&&n&&t().createElement(o.default,M(C({label:U,required:te,labelSign:ne},V),{className:(e="select-label",V&&V.className&&(e+=" ".concat(V.className)),e)})))}),[F,U,ne,te,V]),$t=(0,e.useMemo)((function(){return t().createElement(t().Fragment,null,!Ze&&t().createElement("span",{className:"select-label-placeholder"},"outside"===F?B:t().createElement(t().Fragment,null,U||B,te&&t().createElement("span",{className:"select-required"},"*"),ne&&t().createElement("span",null,ne))))}),[Ze,F,B,U,ne,te]),Wt=function(e){if(!0===X)return null;var n="".concat(e,"-search-outside");return"outside"===Ae?t().createElement("input",M(C({},Se),{onClick:function(e){var t;yt.inputOpen=!0,Se&&(null===(t=Se.onClick)||void 0===t||t.call(Se,e))},onBlur:function(e){var t;yt.inputOpen=!1,Se&&(null===(t=Se.onBlur)||void 0===t||t.call(Se,e))},className:n,value:at,onChange:Lt,onKeyDown:Rt,ref:gt})):null},Ut=(0,e.useMemo)((function(){return t().createElement(t().Fragment,null,!J&&t().createElement(t().Fragment,null,t().createElement("div",{className:"radio-select-content"},function(){if(""!==at&&("outside"===Ae||q))return null;var e=Ge[We[0]]&&Ge[We[0]][pe]||We[0],n=Pe&&Pe(Ge[We[0]],!1);return st?n||e:t().createElement(y.default,{placement:"top-start"},n||e)}()),Wt("radio")))}),[J,Ze,st,Ge,We,pe,we,Ae,at,X,q,Se,Pe]),Yt=(0,e.useMemo)((function(){return t().createElement(t().Fragment,null,J&&t().createElement("div",{className:"check-select-content"},We&&We.map((function(e,n){if(null!==et&&et<=n)return null;var o=!0;(!0===X||"object"==typeof X&&-1!==X.indexOf(We[n]))&&(o=!1);var r="check-select-content-item check-select-content-item-select";return o||(r+=" check-select-content-item-noclose"),t().createElement("div",{className:r,key:n},t().createElement("span",null,t().createElement(y.default,{placement:"top-start"},function(e){var t=Ge[We[e]]&&Ge[We[e]][pe]||We[e];return Pe&&Pe(Ge[We[e]],!1)||t}(n))),o&&t().createElement(s.A,{onClick:Dt(Ge[We[n]],We[n])}))})),function(){if(null!==et&&We.length>et)return t().createElement("div",{className:"check-select-content-item check-select-content-item-more",onClick:Tt},t().createElement("span",null,"+",We.length-et))}(),Wt("check")))}),[J,Ze,We,et,Ge,X,he,at,we,Ae,q,Se,Pe]),qt=function(e){e.stopPropagation();var t,n,o="",r=[];if(J&&(o=[],t=X,null!=(n=Array)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):t instanceof n))for(var a=0,c=We.length;a<c;a++){var l=We[a];-1!==X.indexOf(l)&&(o.push(l),r.push(l))}void 0===i.value&&Ue(r),he&&he(o,e),Fe(!1),Me&&Me()},Kt=function(){return t().createElement("div",{className:"select-more"},t().createElement("div",{className:"select-more-title"},t().createElement("span",null,At({id:"more"}))),t().createElement("div",{className:"select-more-content"},We&&We.map((function(e,n){if(null!==et&&et>n)return null;var o=!0;return(!0===X||"object"==typeof X&&-1!==X.indexOf(We[n]))&&(o=!1),t().createElement("div",{className:"select-more-content-item",key:n},t().createElement("span",null,t().createElement(y.default,{placement:"top-start"},function(e){var t=Ge[We[e]]&&Ge[We[e]][pe]||We[e];return Pe&&Pe(Ge[We[e]],"more")||t}(n))),o&&t().createElement(s.A,{onClick:Dt(Ge[We[n]],We[n])}))}))))},Xt=(0,e.useMemo)((function(){return t().createElement(w.default,{placement:"bottom-end",visible:ot,content:Kt(),onVisibleChange:_t,overlayClassName:(e="".concat(E.n,"-select-more-popover ").concat(E.n,"-scrollbar-small"),I&&(e+=" ".concat(E.n,"-select-more-popover-").concat(I)),Ee&&(e+=" ".concat(Ee)),e)},t().createElement("div",{className:"select-content",onClick:Pt,ref:Le},$t,t().createElement("span",{className:"select-svg"},t().createElement(u.A,null),function(){if(We.length>0&&!0!==X&&L)return t().createElement("span",{className:"clean-up-icon",onClick:qt},t().createElement(p.A,null))}()),Ut,Yt));var e}),[Le,Ze,F,B,U,ne,te,st,Ge,We,pe,J,et,X,he,at,Ae,q,N,Se,L,Me,ot,Pe]),Gt=(0,e.useMemo)((function(){var e,o=function(e){var n=e[pe]||e[fe],o=Pe&&Pe(e,!0);return t().createElement(t().Fragment,null,t().createElement("span",{className:"select-popover-list-item-label"},t().createElement(y.default,{placement:"top-start"},o||n)),J&&_e&&t().createElement("span",{className:"select-popover-list-item-svg"},t().createElement(m,null)))};return t().createElement("div",{className:(e="select-popover-list",ft&&(e+=" select-popover-list-loading"),e),style:{outline:"1px solid transparent"}},qe&&qe.length>0?t().createElement(t().Fragment,null,qe.map((function(e,n){if(e[me]&&e[me].length>0){var r=e[me];return t().createElement("div",{className:"select-popover-list-group",key:n},t().createElement("span",{className:"select-popover-list-group-label"},e[pe]||e[fe]),r.map((function(e,n){var r=e[fe],i="select-popover-list-item";return-1!==We.indexOf(r)&&(i+=" select-popover-list-item-select"),"object"==typeof X&&-1!==X.indexOf(r)&&(i+=" select-popover-list-item-disabled"),t().createElement("div",{onClick:Nt(e),className:i,onMouseEnter:Vt,onMouseLeave:Zt,"data-val":r,key:n},o(e))})))}var i=e[fe],a="select-popover-list-item";return-1!==We.indexOf(i)&&(a+=" select-popover-list-item-select"),"object"==typeof X&&-1!==X.indexOf(i)&&(a+=" select-popover-list-item-disabled"),t().createElement("div",{onClick:Nt(e),className:a,onMouseEnter:Vt,onMouseLeave:Zt,"data-val":i,key:n},o(e))}))):!ft&&vt&&t().createElement("div",{className:"select-nodata"},t().createElement(n.default,M(C({},R),{size:(null==R?void 0:R.size)||"small"}))),ft&&t().createElement(b.default,null))}),[qe,pe,fe,We,he,J,ft,wt,xt,R,vt,Pe,_e]),Qt=(0,e.useMemo)((function(){if(!N)return"";var e;return t().createElement("div",{style:{width:"".concat(Le&&Le.current?Le.current.offsetWidth:0,"px")},className:(e="select-popover-content ".concat(He),we&&"inside"===Ae&&(e+=" select-popover-content-search"),e)},we&&"inside"===Ae&&t().createElement("div",{className:"select-popover-search"},t().createElement("input",M(C({},Se),{placeholder:$||At({id:"searchPlaceholder"}),value:at,onChange:Lt,onKeyDown:Rt,ref:gt})),t().createElement(v.A,null)),Gt)}),[ze,Le,qe,me,fe,pe,We,at,we,He,Ae,J,$,N,ft,Se,wt,xt,R,vt,Pe,_e]);return t().createElement("div",{className:(Ot="".concat(E.n,"-select"),J&&!st&&(Ot+=" ".concat(Re)),d&&(Ot+=" ".concat(d)),I&&(Ot+=" ".concat(E.n,"-select-").concat(I)),re&&(Ot+=" ".concat(E.n,"-select-error")),!0===X&&(Ot+=" ".concat(E.n,"-select-disabled")),ze&&(Ot+=" ".concat(E.n,"-select-open")),J&&(Ot+=" ".concat(E.n,"-select-multiple")),st&&(Ot+=" ".concat(E.n,"-select-over-line")),N&&(Ot+=" ".concat(E.n,"-select-show-select")),We.length>0&&(Ot+=" ".concat(E.n,"-select-value")),L&&(Ot+=" ".concat(E.n,"-select-allow-clear")),Ot),style:S},Bt,function(){return t().createElement(r.default,{visible:ze,placement:"bottomLeft",trigger:["click"],overlay:t().createElement(t().Fragment,null,Qt),overlayClassName:(e="".concat(E.n,"-select-popover ").concat(E.n,"-scrollbar-small"),I&&(e+=" ".concat(E.n,"-select-popover-").concat(I)),e+=" ".concat(E.n,J?"-select-popover-multiple":"-select-popover-radio"),Oe&&(e+=" ".concat(Oe)),N||(e+=" ".concat(E.n,"-select-popover-hide")),e),getPopupContainer:je,onVisibleChange:function(e){e||(clearTimeout(yt.dropDownTimer),yt.dropDownTimer=setTimeout((function(){yt.inputOpen||Fe(!1)}),0))}},G?t().createElement(x.default,C({disabled:!0},G),Xt):Xt);var e}(),t().createElement(A.default,{className:"select-error-text",error:re,helperText:ce,hideErrorDom:ie}))}})(),a})()));
|
|
43
|
+
*/!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},43145:(e,t,n)=>{"use strict";function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}n.d(t,{A:()=>o})},96369:(e,t,n)=>{"use strict";function o(e){if(Array.isArray(e))return e}n.d(t,{A:()=>o})},9417:(e,t,n)=>{"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>o})},10467:(e,t,n)=>{"use strict";function o(e,t,n,o,r,i,a){try{var c=e[i](a),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(o,r)}function r(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function c(e){o(a,r,i,c,l,"next",e)}function l(e){o(a,r,i,c,l,"throw",e)}c(void 0)}))}}n.d(t,{A:()=>r})},23029:(e,t,n)=>{"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{A:()=>o})},92901:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(49922);function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(0,o.A)(r.key),r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},29426:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(53954),r=n(52176),i=n(56822);function a(e){var t=(0,r.A)();return function(){var n,r=(0,o.A)(e);if(t){var a=(0,o.A)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return(0,i.A)(this,n)}}},64467:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(49922);function r(e,t,n){return(t=(0,o.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},58168:(e,t,n)=>{"use strict";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(this,arguments)}n.d(t,{A:()=>o})},53954:(e,t,n)=>{"use strict";function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}n.d(t,{A:()=>o})},85501:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(63662);function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,o.A)(e,t)}},52176:(e,t,n)=>{"use strict";function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}n.d(t,{A:()=>o})},6986:(e,t,n)=>{"use strict";function o(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(c.push(o.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw r}}return c}}n.d(t,{A:()=>o})},76562:(e,t,n)=>{"use strict";function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>o})},89379:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(64467);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){(0,o.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},80045:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(98587);function r(e,t){if(null==e)return{};var n,r,i=(0,o.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},98587:(e,t,n)=>{"use strict";function o(e,t){if(null==e)return{};var n={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;n[o]=e[o]}return n}n.d(t,{A:()=>o})},56822:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(82284),r=n(9417);function i(e,t){if(t&&("object"===(0,o.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.A)(e)}},63662:(e,t,n)=>{"use strict";function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}n.d(t,{A:()=>o})},3453:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var o=n(96369),r=n(6986),i=n(27800),a=n(76562);function c(e,t){return(0,o.A)(e)||(0,r.A)(e,t)||(0,i.A)(e,t)||(0,a.A)()}},92327:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(82284);function r(e,t){if("object"!=(0,o.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=(0,o.A)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}},49922:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(82284),r=n(92327);function i(e){var t=(0,r.A)(e,"string");return"symbol"==(0,o.A)(t)?t:t+""}},82284:(e,t,n)=>{"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n.d(t,{A:()=>o})},27800:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(43145);function r(e,t){if(e){if("string"==typeof e)return(0,o.A)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,o.A)(e,t):void 0}}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={id:e,exports:{}};return o[e].call(n.exports,n,n.exports,i),n.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var a={};return(()=>{"use strict";i.r(a),i.d(a,{default:()=>N});var e=i(39155),t=i.n(e),n=i(27788),o=i(18406),r=i(96342),c=i(32663),l=i(4205),s=i(39864),p=i(97978),u=i(15664),f=i(74848),d=i(55307),m=function(e){return(0,f.jsx)(d.A,Object.assign({dataName:"Check",viewBox:"0 0 24 24",path:(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)("g",Object.assign({id:"Check",transform:"translate(-362 -287)"},{children:[(0,f.jsx)("rect",{id:"safe",width:"24",height:"24",transform:"translate(362 287)",fill:"none"}),(0,f.jsx)("path",{id:"icon",d:"M6.795,13.6h0a.933.933,0,0,1-.66-.273L.273,7.463a.933.933,0,0,1,1.32-1.32l5.2,5.2L17.873.273a.933.933,0,1,1,1.32,1.32L7.455,13.327a.933.933,0,0,1-.66.273",transform:"translate(364.267 292.2)"})]}))})},e))},v=i(77424),h=i(7569);const g={zh:{searchPlaceholder:"请输入",more:"更多"},en:{searchPlaceholder:"Please enter",more:"More"}};var y=i(69004),b=i(7192),w=i(89315),x=i(17234),A=i(32209),O=i(82316),E=i(14552);i(32324);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){k(e,t,n[t])}))}return e}function M(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){c=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw r}}return i}}(e,t)||T(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}var _=function(e,n){var o=t().useRef(!1);t().useEffect((function(){o.current?e():o.current=!0}),n)};const N=function(i){var a,f=(0,O.A)(i,"Select"),d=f.className,S=f.style,T=f.showSelect,N=void 0===T||T,D=f.allowClear,L=void 0!==D&&D,R=f.emptyProps,H=f.size,I=void 0===H?"large":H,z=f.labelMode,F=void 0===z?"outside":z,V=f.labelTooltip,Z=f.placeholder,B=void 0===Z?"":Z,$=f.searchPlaceholder,W=f.label,U=void 0===W?"":W,Y=f.input,q=void 0!==Y&&Y,K=f.disabled,X=void 0!==K&&K,G=f.disabledTooltip,Q=f.multiple,J=void 0!==Q&&Q,ee=f.required,te=void 0!==ee&&ee,ne=f.labelSign,oe=f.error,re=void 0!==oe&&oe,ie=f.hideErrorDom,ae=f.helperText,ce=void 0===ae?"":ae,le=f.list,se=f.showName,pe=void 0===se?"label":se,ue=f.showValue,fe=void 0===ue?"value":ue,de=f.childrenName,me=void 0===de?"children":de,ve=f.value,he=f.onChange,ge=f.overLine,ye=void 0!==ge&&ge,be=f.search,we=void 0!==be&&be,xe=f.searchModel,Ae=void 0===xe?"inside":xe,Oe=f.selectPopoverClassName,Ee=f.morePopoverClassName,Se=(f.fetchSuggestions,f.searchInputProps),ke=f.onEnter,Ce=f.onEnterInput,Me=f.onClear,je=f.getPopupContainer,Pe=f.renderContent,Te=f.selectCheckIcon,_e=void 0===Te||Te,Ne=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=0,o=e.length;n<o;n++){var r=e[n];if("object"==typeof r&&null!==r)t.push(r);else{var i={};i[pe]=r,i[fe]=r,t.push(i)}}return t},De=function(){for(var e=Ne(le),t={},n=0,o=e.length;n<o;n++){var r=e[n];if(r[me]&&r[me].length>0)for(var i=r[me],a=0,c=i.length;a<c;a++){var l=i[a];t[l[fe]]=l}else t[r[fe]]=r}return t},Le=(0,e.useRef)(null),Re=j((0,e.useState)("".concat(E.n,"-select-").concat((0,c.UUID)())),1)[0],He=j((0,e.useState)("select-popover-".concat((0,c.UUID)())),1)[0],Ie=j((0,e.useState)(!1),2),ze=Ie[0],Fe=Ie[1],Ve=j((0,e.useState)(!1),2),Ze=Ve[0],Be=Ve[1],$e=j((0,e.useState)((a=[],void 0!==i.defaultValue&&(a=i.multiple?(0,c.DeepClone)(i.defaultValue||[]):""===i.defaultValue?[]:[i.defaultValue]),void 0!==ve&&(a=J?(0,c.DeepClone)(ve||[]):""===ve?[]:[ve]),a)),2),We=$e[0],Ue=$e[1],Ye=j((0,e.useState)([]),2),qe=Ye[0],Ke=Ye[1],Xe=j((0,e.useState)(De()),2),Ge=Xe[0],Qe=Xe[1],Je=j((0,e.useState)(null),2),et=Je[0],tt=Je[1],nt=j((0,e.useState)(!1),2),ot=nt[0],rt=nt[1],it=j((0,e.useState)(""),2),at=it[0],ct=it[1],lt=j((0,e.useState)(!1),2),st=lt[0],pt=lt[1],ut=j((0,e.useState)(!1),2),ft=ut[0],dt=ut[1],mt=j((0,e.useState)(!1),2),vt=mt[0],ht=mt[1],gt=(0,e.useRef)(null),yt=j((0,e.useState)({}),1)[0],bt=t().useContext(l.default),wt=bt.language,xt=bt.locale,At=(0,h.A)("Select",g);yt.valueCom=P(We),yt.listCom=qe,yt.searchModel=Ae,yt.openMore=ot,(0,e.useEffect)((function(){return function(){clearTimeout(yt.searchTimer),clearTimeout(yt.timer),clearTimeout(yt.scrollTimer),clearTimeout(yt.dropDownTimer)}}),[]),_((function(){void 0!==ve&&Ue(J?(0,c.DeepClone)(ve||[]):""===ve?[]:[ve])}),[ve,J]),(0,e.useEffect)((function(){St()}),[We,ve]),(0,e.useEffect)((function(){if("outside"===Ae&&J)return pt(!0);pt(ye)}),[ye,Ae,J,q]),_((function(){Qe(De())}),[le]),(0,e.useEffect)((function(){return!st&&J?window.addEventListener("resize",St):window.removeEventListener("resize",St),function(){window.removeEventListener("resize",St)}}),[st,J]),(0,e.useEffect)((function(){We&&We.length>0?Be(!0):(Be(!1),"outside"===Ae&&Be(""!==at))}),[we,at,Ae,We,q]),(0,e.useEffect)((function(){if(ze)if(dt(!0),i.fetchSuggestions)i.fetchSuggestions(at,(function(e){var t=Ne(e);kt(t,!0),dt(!1)}));else{var e=Ne(le);kt(e),dt(!1)}}),[we,at,le,ze]),(0,e.useEffect)((function(){return ze?(clearTimeout(yt.openTimer),yt.openTimer=setTimeout((function(){Ct(),window.addEventListener("keydown",Ft)}))):(ct(""),window.removeEventListener("keydown",Ft)),function(){clearTimeout(yt.openTimer),window.removeEventListener("keydown",Ft)}}),[ze]),(0,e.useEffect)((function(){!0!==X&&J&&"outside"===Ae&&Ht(at)}),[at,J,X,Ae,q]);var Ot,Et=function(e){if(null!==e&&0!==e){void 0===e&&(e=yt.valueCom.length);var t=document.querySelector(".".concat(Re," > .select-content > .check-select-content"));if(t)if(t.scrollHeight>t.clientHeight){var n=Number(e)-1;tt(n),Et(n)}else yt.valueCom.length<=e&&_t()}},St=function(){if(0===yt.valueCom.length)return tt(null);clearTimeout(yt.timer),yt.timer=setTimeout((function(){tt(yt.valueCom.length),Et()}),50)},kt=function(e,t){for(var n=[],o=P(e),r=0,i=o.length;r<i;r++){var a=o[r];if(a[me]&&a[me].length>0){for(var c=a[me],l=[],s=0,p=c.length;s<p;s++){var u=c[s];if(t)l.push(u);else jt(u)&&l.push(u)}l.length>0&&(a[me]=l,n.push(a))}else{if(t)n.push(a);else jt(a)&&n.push(a)}}Ke(n),dt(!1),ht(0===n.length)},Ct=function(){var e=gt&>.current;"inside"!==yt.searchModel&&e&&e.focus({preventScroll:!0})},Mt=function(e,t){for(var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!n.call(e,t);)e=e.parentElement;return e},jt=function(e){var t=!0;if(""===at.trim())return t;var n=e[pe];return(!n||"number"!=typeof n&&"string"!=typeof n||-1===(n=n.toString()).toLowerCase().indexOf(at.trim().toLowerCase()))&&(t=!1),t},Pt=function(){!0!==X&&Fe(!0)},Tt=function(e){rt(!0),Fe(!1),e.stopPropagation()},_t=function(){yt.openMore&&rt(!1)},Nt=function(e,t){return function(n){var o=e[fe];if("object"!=typeof X||-1===X.indexOf(o))if(J){var r=yt.valueCom.indexOf(o);-1!==r?yt.valueCom.splice(r,1):yt.valueCom.push(o),void 0===i.value&&Ue(P(yt.valueCom)),he&&he(P(yt.valueCom),n),t&&ke&&ke(P(yt.valueCom)),Ct()}else void 0===i.value&&Ue([o]),he&&he(o,n),t&&ke&&ke(o),Fe(!1),ct("")}},Dt=function(e,t){return function(n){e||(e=k({},fe,t)),Nt(e)(n),n.stopPropagation()}},Lt=function(e){ct(e.target.value),Se&&Se.onChange&&Se.onChange(e)},Rt=function(e){if(13===e.keyCode){Ce&&Ce(at);var t=document.querySelector(".".concat(He," .select-popover-list"));if(t){var n=t.querySelector(".select-popover-list-item-hover");if(t.querySelector(".select-popover-list-item-keydown")||n)return}if(i.input&&""!==at.trim()){var o="";o=J?P(We).concat([at]):at,void 0===i.value&&Ue(o),he&&he(o,e),ct("")}}Se&&Se.onKeyDown&&Se.onKeyDown(e)},Ht=function(e){var t=gt&>.current;if(!t)return null;var n=window.getComputedStyle(t),o=n.fontFamily,r=function(e,t,n){var o=document.createElement("span");o.id="referenceSpan";var r={};r.width=o.offsetWidth,r.height=o.offsetHeight,o.style.visibility="hidden",o.style.fontSize=e,o.style.fontFamily=t,o.style.display="inline-block";var i=document.getElementById("referenceSpan");return i&&document.body.removeChild(i),document.body.appendChild(o),void 0!==o.textContent?o.textContent=n:o.innerText=n,r.width=parseFloat(window.getComputedStyle(o).width)-r.width,r.height=parseFloat(window.getComputedStyle(o).height)-r.height,document.body.removeChild(o),r}(n.fontSize,o,e),i=r.width;i<10&&(i=10),t.style.width="".concat(i,"px")},It=function(e){var t=e.selectDom,n=e.keyCode,o=e.currentKeydownDom,r=null,i="nextSibling",a=".select-popover-list > div",c=".select-popover-list-item";if(38===n&&(i="previousSibling",a=".select-popover-list > div:last-child",c=".select-popover-list-item:last-child"),o)if(r=o[i])-1!==r.className.indexOf("select-popover-list-group-label")&&((r=(r=o.parentNode)[i])||(r=t.querySelector(a)));else{var l=o.parentNode;l&&l.className&&-1!==l.className.indexOf("select-popover-list-group")&&(r=(r=o.parentNode)[i])||(r=t.querySelector(a))}else r=t.querySelector(a);if(r)if(-1!==r.className.indexOf("select-popover-list-group")){var s=r.querySelector(c);s&&(s.classList.add("select-popover-list-item-keydown"),zt(s,t))}else r.classList.add("select-popover-list-item-keydown"),zt(r,t)},zt=function(e,t){clearTimeout(yt.scrollTimer);var n=t.clientHeight,o=e.offsetTop+e.clientHeight-n;yt.scroll=!0,t.scrollTop=o>0?o:0,yt.scrollTimer=setTimeout((function(){yt.scroll=!1}),100)},Ft=function(e){var t=document.querySelector(".".concat(He," .select-popover-list"));if(t){var n=t.querySelector(".select-popover-list-item-select"),o=t.querySelector(".select-popover-list-item-hover"),r=t.querySelector(".select-popover-list-item-keydown"),i=n;if(o&&(i=o),13===e.keyCode){var a=r||o;if(a){var c=a.dataset.val;Nt(Ge[c],!0)({target:r})}else ke&&ke(ve)}r&&(i=r,r.classList.remove("select-popover-list-item-keydown")),40===e.keyCode&&It({selectDom:t,keyCode:e.keyCode,currentKeydownDom:i}),38===e.keyCode&&It({selectDom:t,keyCode:e.keyCode,currentKeydownDom:i})}},Vt=function(e){if(!yt.scroll){var t=Mt(e.target,".select-popover-list-item");if(t){t.classList.add("select-popover-list-item-hover");var n=document.querySelector(".".concat(He)).querySelector(".select-popover-list-item-keydown");n&&n.classList.remove("select-popover-list-item-keydown")}}},Zt=function(e){var t=Mt(e.target,".select-popover-list-item");t&&t.classList.remove("select-popover-list-item-hover")},Bt=(0,e.useMemo)((function(){var e,n=Boolean(U||te||ne);return t().createElement(t().Fragment,null,"outside"===F&&n&&t().createElement(o.default,M(C({label:U,required:te,labelSign:ne},V),{className:(e="select-label",V&&V.className&&(e+=" ".concat(V.className)),e)})))}),[F,U,ne,te,V]),$t=(0,e.useMemo)((function(){return t().createElement(t().Fragment,null,!Ze&&t().createElement("span",{className:"select-label-placeholder"},"outside"===F?B:t().createElement(t().Fragment,null,U||B,te&&t().createElement("span",{className:"select-required"},"*"),ne&&t().createElement("span",null,ne))))}),[Ze,F,B,U,ne,te]),Wt=function(e){if(!0===X)return null;var n="".concat(e,"-search-outside");return"outside"===Ae?t().createElement("input",M(C({},Se),{onClick:function(e){var t;yt.inputOpen=!0,Se&&(null===(t=Se.onClick)||void 0===t||t.call(Se,e))},onBlur:function(e){var t;yt.inputOpen=!1,Se&&(null===(t=Se.onBlur)||void 0===t||t.call(Se,e))},className:n,value:at,onChange:Lt,onKeyDown:Rt,ref:gt})):null},Ut=(0,e.useMemo)((function(){return t().createElement(t().Fragment,null,!J&&t().createElement(t().Fragment,null,t().createElement("div",{className:"radio-select-content"},function(){if(""!==at&&("outside"===Ae||q))return null;var e=Ge[We[0]]&&Ge[We[0]][pe]||We[0],n=Pe&&Pe(Ge[We[0]],!1);return st?n||e:t().createElement(y.default,{placement:"top-start"},n||e)}()),Wt("radio")))}),[J,Ze,st,Ge,We,pe,we,Ae,at,X,q,Se,Pe]),Yt=(0,e.useMemo)((function(){return t().createElement(t().Fragment,null,J&&t().createElement("div",{className:"check-select-content"},We&&We.map((function(e,n){if(null!==et&&et<=n)return null;var o=!0;(!0===X||"object"==typeof X&&-1!==X.indexOf(We[n]))&&(o=!1);var r="check-select-content-item check-select-content-item-select";return o||(r+=" check-select-content-item-noclose"),t().createElement("div",{className:r,key:n},t().createElement("span",null,t().createElement(y.default,{placement:"top-start"},function(e){var t=Ge[We[e]]&&Ge[We[e]][pe]||We[e];return Pe&&Pe(Ge[We[e]],!1)||t}(n))),o&&t().createElement(s.A,{onClick:Dt(Ge[We[n]],We[n])}))})),function(){if(null!==et&&We.length>et)return t().createElement("div",{className:"check-select-content-item check-select-content-item-more",onClick:Tt},t().createElement("span",null,"+",We.length-et))}(),Wt("check")))}),[J,Ze,We,et,Ge,X,he,at,we,Ae,q,Se,Pe]),qt=function(e){e.stopPropagation();var t,n,o="",r=[];if(J&&(o=[],t=X,null!=(n=Array)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](t):t instanceof n))for(var a=0,c=We.length;a<c;a++){var l=We[a];-1!==X.indexOf(l)&&(o.push(l),r.push(l))}void 0===i.value&&Ue(r),he&&he(o,e),Fe(!1),Me&&Me()},Kt=function(){return t().createElement("div",{className:"select-more"},t().createElement("div",{className:"select-more-title"},t().createElement("span",null,At({id:"more"}))),t().createElement("div",{className:"select-more-content"},We&&We.map((function(e,n){if(null!==et&&et>n)return null;var o=!0;return(!0===X||"object"==typeof X&&-1!==X.indexOf(We[n]))&&(o=!1),t().createElement("div",{className:"select-more-content-item",key:n},t().createElement("span",null,t().createElement(y.default,{placement:"top-start"},function(e){var t=Ge[We[e]]&&Ge[We[e]][pe]||We[e];return Pe&&Pe(Ge[We[e]],"more")||t}(n))),o&&t().createElement(s.A,{onClick:Dt(Ge[We[n]],We[n])}))}))))},Xt=(0,e.useMemo)((function(){return t().createElement(w.default,{placement:"bottom-end",visible:ot,content:Kt(),onVisibleChange:_t,overlayClassName:(e="".concat(E.n,"-select-more-popover ").concat(E.n,"-scrollbar-small"),I&&(e+=" ".concat(E.n,"-select-more-popover-").concat(I)),Ee&&(e+=" ".concat(Ee)),e)},t().createElement("div",{className:"select-content",onClick:Pt,ref:Le},$t,t().createElement("span",{className:"select-svg"},t().createElement(u.A,null),function(){if(We.length>0&&!0!==X&&L)return t().createElement("span",{className:"clean-up-icon",onClick:qt},t().createElement(p.A,null))}()),Ut,Yt));var e}),[Le,Ze,F,B,U,ne,te,st,Ge,We,pe,J,et,X,he,at,Ae,q,N,Se,L,Me,ot,Pe]),Gt=(0,e.useMemo)((function(){var e,o=function(e){var n=e[pe]||e[fe],o=Pe&&Pe(e,!0);return t().createElement(t().Fragment,null,t().createElement("span",{className:"select-popover-list-item-label"},t().createElement(y.default,{placement:"top-start"},o||n)),J&&_e&&t().createElement("span",{className:"select-popover-list-item-svg"},t().createElement(m,null)))};return t().createElement("div",{className:(e="select-popover-list",ft&&(e+=" select-popover-list-loading"),e),style:{outline:"1px solid transparent"}},qe&&qe.length>0?t().createElement(t().Fragment,null,qe.map((function(e,n){if(e[me]&&e[me].length>0){var r=e[me];return t().createElement("div",{className:"select-popover-list-group",key:n},t().createElement("span",{className:"select-popover-list-group-label"},e[pe]||e[fe]),r.map((function(e,n){var r=e[fe],i="select-popover-list-item";return-1!==We.indexOf(r)&&(i+=" select-popover-list-item-select"),"object"==typeof X&&-1!==X.indexOf(r)&&(i+=" select-popover-list-item-disabled"),t().createElement("div",{onClick:Nt(e),className:i,onMouseEnter:Vt,onMouseLeave:Zt,"data-val":r,key:n},o(e))})))}var i=e[fe],a="select-popover-list-item";return-1!==We.indexOf(i)&&(a+=" select-popover-list-item-select"),"object"==typeof X&&-1!==X.indexOf(i)&&(a+=" select-popover-list-item-disabled"),t().createElement("div",{onClick:Nt(e),className:a,onMouseEnter:Vt,onMouseLeave:Zt,"data-val":i,key:n},o(e))}))):!ft&&vt&&t().createElement("div",{className:"select-nodata"},t().createElement(n.default,M(C({},R),{size:(null==R?void 0:R.size)||"small"}))),ft&&t().createElement(b.default,null))}),[qe,pe,fe,We,he,J,ft,wt,xt,R,vt,Pe,_e]),Qt=(0,e.useMemo)((function(){if(!N)return"";var e;return t().createElement("div",{style:{width:"".concat(Le&&Le.current?Le.current.offsetWidth:0,"px")},className:(e="select-popover-content ".concat(He),we&&"inside"===Ae&&(e+=" select-popover-content-search"),e)},we&&"inside"===Ae&&t().createElement("div",{className:"select-popover-search"},t().createElement("input",M(C({},Se),{placeholder:$||At({id:"searchPlaceholder"}),value:at,onChange:Lt,onKeyDown:Rt,ref:gt})),t().createElement(v.A,null)),Gt)}),[ze,Le,qe,me,fe,pe,We,at,we,He,Ae,J,$,N,ft,Se,wt,xt,R,vt,Pe,_e]);return t().createElement("div",{className:(Ot="".concat(E.n,"-select"),J&&!st&&(Ot+=" ".concat(Re)),d&&(Ot+=" ".concat(d)),I&&(Ot+=" ".concat(E.n,"-select-").concat(I)),re&&(Ot+=" ".concat(E.n,"-select-error")),!0===X&&(Ot+=" ".concat(E.n,"-select-disabled")),ze&&(Ot+=" ".concat(E.n,"-select-open")),J&&(Ot+=" ".concat(E.n,"-select-multiple")),st&&(Ot+=" ".concat(E.n,"-select-over-line")),N&&(Ot+=" ".concat(E.n,"-select-show-select")),We.length>0&&(Ot+=" ".concat(E.n,"-select-value")),L&&(Ot+=" ".concat(E.n,"-select-allow-clear")),Ot),style:S},Bt,function(){return t().createElement(r.default,{visible:ze,placement:"bottomLeft",trigger:["click"],overlay:t().createElement(t().Fragment,null,Qt),overlayClassName:(e="".concat(E.n,"-select-popover ").concat(E.n,"-scrollbar-small"),I&&(e+=" ".concat(E.n,"-select-popover-").concat(I)),e+=" ".concat(E.n,J?"-select-popover-multiple":"-select-popover-radio"),Oe&&(e+=" ".concat(Oe)),N||(e+=" ".concat(E.n,"-select-popover-hide")),e),getPopupContainer:je,onVisibleChange:function(e){e||(clearTimeout(yt.dropDownTimer),yt.dropDownTimer=setTimeout((function(){yt.inputOpen||Fe(!1)}),0))}},G?t().createElement(x.default,C({disabled:!0},G),Xt):Xt);var e}(),t().createElement(A.default,{className:"select-error-text",error:re,helperText:ce,hideErrorDom:ie}))}})(),a})()));
|