You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
10 KiB
1 line
10 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[63527],{77578:function(e,t,o){"use strict";o.d(t,{Z:function(){return r}});const r=e=>e?"function"==typeof e?e():e:null},39722:function(e,t,o){"use strict";o.d(t,{t5:function(){return c}});var r=o(92310),n=o.n(r),i=o(55477),s=o(59301),l=o(36355),a=o(77578),p=o(17356),u=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o};const c=e=>{const{hashId:t,prefixCls:o,className:r,style:l,placement:p="top",title:u,content:c,children:d}=e;return s.createElement("div",{className:n()(t,o,`${o}-pure`,`${o}-placement-${p}`,r),style:l},s.createElement("div",{className:`${o}-arrow`}),s.createElement(i.G,Object.assign({},e,{className:t,prefixCls:o}),d||((e,t,o)=>{if(t||o)return s.createElement(s.Fragment,null,t&&s.createElement("div",{className:`${e}-title`},(0,a.Z)(t)),s.createElement("div",{className:`${e}-inner-content`},(0,a.Z)(o)))})(o,u,c)))};t.ZP=e=>{const{prefixCls:t}=e,o=u(e,["prefixCls"]),{getPrefixCls:r}=s.useContext(l.E_),n=r("popover",t),[i,a]=(0,p.Z)(n);return i(s.createElement(c,Object.assign({},o,{prefixCls:n,hashId:a})))}},60324:function(e,t,o){"use strict";var r=o(92310),n=o.n(r),i=o(59301),s=o(77578),l=o(62892),a=o(36355),p=o(6848),u=o(39722),c=o(17356),d=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]])}return o};const h=e=>{let{title:t,content:o,prefixCls:r}=e;return i.createElement(i.Fragment,null,t&&i.createElement("div",{className:`${r}-title`},(0,s.Z)(t)),i.createElement("div",{className:`${r}-inner-content`},(0,s.Z)(o)))},f=i.forwardRef(((e,t)=>{const{prefixCls:o,title:r,content:s,overlayClassName:u,placement:f="top",trigger:v="hover",mouseEnterDelay:m=.1,mouseLeaveDelay:g=.1,overlayStyle:y={}}=e,b=d(e,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:w}=i.useContext(a.E_),L=w("popover",o),[C,P]=(0,c.Z)(L),O=w(),S=n()(u,P);return C(i.createElement(p.Z,Object.assign({placement:f,trigger:v,mouseEnterDelay:m,mouseLeaveDelay:g,overlayStyle:y},b,{prefixCls:L,overlayClassName:S,ref:t,overlay:r||s?i.createElement(h,{prefixCls:L,title:r,content:s}):null,transitionName:(0,l.m)(O,"zoom-big",b.transitionName),"data-popover-inject":!0})))}));f._InternalPanelDoNotUseOrYouWillBeFired=u.ZP,t.Z=f},17356:function(e,t,o){"use strict";var r=o(17313),n=o(29878),i=o(19447),s=o(33166),l=o(83116),a=o(37613);const p=e=>{const{componentCls:t,popoverColor:o,minWidth:n,fontWeightStrong:s,popoverPadding:l,boxShadowSecondary:a,colorTextHeading:p,borderRadiusLG:u,zIndexPopup:c,marginXS:d,colorBgElevated:h,popoverBg:f}=e;return[{[t]:Object.assign(Object.assign({},(0,r.Wf)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":h,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:u,boxShadow:a,padding:l},[`${t}-title`]:{minWidth:n,marginBottom:d,color:p,fontWeight:s},[`${t}-inner-content`]:{color:o}})},(0,i.ZP)(e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},u=e=>{const{componentCls:t}=e;return{[t]:s.i.map((o=>{const r=e[`${o}6`];return{[`&${t}-${o}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:"transparent"}}}}))}},c=e=>{const{componentCls:t,lineWidth:o,lineType:r,colorSplit:n,paddingSM:i,controlHeight:s,fontSize:l,lineHeight:a,padding:p}=e,u=s-Math.round(l*a);return{[t]:{[`${t}-inner`]:{padding:0},[`${t}-title`]:{margin:0,padding:`${u/2}px ${p}px ${u/2-o}px`,borderBottom:`${o}px ${r} ${n}`},[`${t}-inner-content`]:{padding:`${i}px ${p}px`}}}};t.Z=(0,l.Z)("Popover",(e=>{const{colorBgElevated:t,colorText:o,wireframe:r}=e,i=(0,a.TS)(e,{popoverPadding:12,popoverBg:t,popoverColor:o});return[p(i),u(i),r&&c(i),(0,n._y)(i,"zoom-big")]}),(e=>({width:177,minWidth:177,zIndexPopup:e.zIndexPopupBase+30})),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},51581:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,o,r){return o&&e(t.prototype,o),r&&e(t,r),t}}(),n=o(59301),i=l(n),s=l(o(12708));function l(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.scrollListener=o.scrollListener.bind(o),o.eventListenerOptions=o.eventListenerOptions.bind(o),o.mousewheelListener=o.mousewheelListener.bind(o),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,o=this.getParentElement(e),r=void 0;if(this.props.useWindow){var n=document.documentElement||document.body.parentNode||document.body,i=void 0!==t.pageYOffset?t.pageYOffset:n.scrollTop;r=this.props.isReverse?i:this.calculateOffset(e,i)}else r=this.props.isReverse?o.scrollTop:e.scrollHeight-o.scrollTop-o.clientHeight;r<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=o.scrollHeight,this.beforeScrollTop=o.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),o=t.children,r=t.element,n=t.hasMore,s=(t.initialLoad,t.isReverse),l=t.loader,a=(t.loadMore,t.pageStart,t.ref),p=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var o={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(o[r]=e[r]);return o}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));p.ref=function(t){e.scrollComponent=t,a&&a(t)};var u=[o];return n&&(l?s?u.unshift(l):u.push(l):this.defaultLoader&&(s?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),i.default.createElement(r,p,u)}}]),t}(n.Component);a.propTypes={children:s.default.node.isRequired,element:s.default.node,hasMore:s.default.bool,initialLoad:s.default.bool,isReverse:s.default.bool,loader:s.default.node,loadMore:s.default.func.isRequired,pageStart:s.default.number,ref:s.default.func,getScrollParent:s.default.func,threshold:s.default.number,useCapture:s.default.bool,useWindow:s.default.bool},a.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=a,e.exports=t.default},26724:function(e,t,o){e.exports=o(51581)}}]); |