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
17 KiB
1 line
17 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[26634],{24905:function(e,t,o){"use strict";o.d(t,{Z:function(){return $}});var n=o(92310),r=o.n(n),l=o(5630),i=o(59301),a=o(36355),s=o(1684),c=o(32441);var u=i.createContext(null),d=o(98447),p=o(14088),f=o(4572),h=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o};const m=(e,t)=>{var o;const{prefixCls:n,className:m,rootClassName:v,children:b,indeterminate:y=!1,style:g,onMouseEnter:C,onMouseLeave:O,skipGroup:w=!1,disabled:x}=e,$=h(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:k,direction:P,checkbox:S}=i.useContext(a.E_),E=i.useContext(u),{isFormItemInput:L}=i.useContext(c.aM),N=i.useContext(s.Z),j=null!==(o=(null==E?void 0:E.disabled)||x)&&void 0!==o?o:N,M=i.useRef($.value);i.useEffect((()=>{null==E||E.registerValue($.value)}),[]),i.useEffect((()=>{if(!w)return $.value!==M.current&&(null==E||E.cancelValue(M.current),null==E||E.registerValue($.value),M.current=$.value),()=>null==E?void 0:E.cancelValue($.value)}),[$.value]);const T=k("checkbox",n),[R,I]=(0,d.ZP)(T),Z=Object.assign({},$);E&&!w&&(Z.onChange=function(){$.onChange&&$.onChange.apply($,arguments),E.toggleOption&&E.toggleOption({label:b,value:$.value})},Z.name=E.name,Z.checked=E.value.includes($.value));const _=r()(`${T}-wrapper`,{[`${T}-rtl`]:"rtl"===P,[`${T}-wrapper-checked`]:Z.checked,[`${T}-wrapper-disabled`]:j,[`${T}-wrapper-in-form-item`]:L},null==S?void 0:S.className,m,v,I),z=r()({[`${T}-indeterminate`]:y},f.A,I),D=y?"mixed":void 0;return R(i.createElement(p.Z,{component:"Checkbox",disabled:j},i.createElement("label",{className:_,style:Object.assign(Object.assign({},null==S?void 0:S.style),g),onMouseEnter:C,onMouseLeave:O},i.createElement(l.Z,Object.assign({"aria-checked":D},Z,{prefixCls:T,className:z,disabled:j,ref:t})),void 0!==b&&i.createElement("span",null,b))))};var v=i.forwardRef(m),b=o(26390),y=o(64002),g=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o};const C=(e,t)=>{const{defaultValue:o,children:n,options:l=[],prefixCls:s,className:c,rootClassName:p,style:f,onChange:h}=e,m=g(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:C,direction:O}=i.useContext(a.E_),[w,x]=i.useState(m.value||o||[]),[$,k]=i.useState([]);i.useEffect((()=>{"value"in m&&x(m.value||[])}),[m.value]);const P=i.useMemo((()=>l.map((e=>"string"==typeof e||"number"==typeof e?{label:e,value:e}:e))),[l]),S=C("checkbox",s),E=`${S}-group`,[L,N]=(0,d.ZP)(S),j=(0,y.Z)(m,["value","disabled"]),M=l.length?P.map((e=>i.createElement(v,{prefixCls:S,key:e.value.toString(),disabled:"disabled"in e?e.disabled:m.disabled,value:e.value,checked:w.includes(e.value),onChange:e.onChange,className:`${E}-item`,style:e.style,title:e.title},e.label))):n,T={toggleOption:e=>{const t=w.indexOf(e.value),o=(0,b.Z)(w);-1===t?o.push(e.value):o.splice(t,1),"value"in m||x(o),null==h||h(o.filter((e=>$.includes(e))).sort(((e,t)=>P.findIndex((t=>t.value===e))-P.findIndex((e=>e.value===t)))))},value:w,disabled:m.disabled,name:m.name,registerValue:e=>{k((t=>[].concat((0,b.Z)(t),[e])))},cancelValue:e=>{k((t=>t.filter((t=>t!==e))))}},R=r()(E,{[`${E}-rtl`]:"rtl"===O},c,p,N);return L(i.createElement("div",Object.assign({className:R,style:f},j,{ref:t}),i.createElement(u.Provider,{value:T},M)))},O=i.forwardRef(C);var w=i.memo(O);const x=v;x.Group=w,x.__ANT_CHECKBOX=!0;var $=x},98447:function(e,t,o){"use strict";o.d(t,{C2:function(){return a}});var n=o(17313),r=o(37613),l=o(83116);const i=e=>{const{checkboxCls:t}=e,o=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,n.Wf)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[o]:Object.assign(Object.assign({},(0,n.Wf)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${o}`]:{marginInlineStart:0},[`&${o}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,n.Wf)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Object.assign({},(0,n.oN)(e))},[`${t}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`\n ${o}:not(${o}-disabled),\n ${t}:not(${t}-disabled)\n `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${o}:not(${o}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`\n ${o}-checked:not(${o}-disabled),\n ${t}-checked:not(${t}-disabled)\n `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{[`${t}-inner`]:{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${o}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function a(e,t){const o=(0,r.TS)(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[i(o)]}t.ZP=(0,l.Z)("Checkbox",((e,t)=>{let{prefixCls:o}=t;return[a(o,e)]}))},38854:function(e,t,o){"use strict";o.d(t,{Z:function(){return b}});var n=o(91857),r=o(92310),l=o.n(r),i=o(59301),a=o(19362),s=o(3113),c=o(36355),u=o(81327),d=o(33234),p=o(47211),f=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o};const h=e=>{const{getPopupContainer:t,getPrefixCls:o,direction:r}=i.useContext(c.E_),{prefixCls:h,type:m="default",danger:v,disabled:b,loading:y,onClick:g,htmlType:C,children:O,className:w,menu:x,arrow:$,autoFocus:k,overlay:P,trigger:S,align:E,open:L,onOpenChange:N,placement:j,getPopupContainer:M,href:T,icon:R=i.createElement(a.Z,null),title:I,buttonsRender:Z=(e=>e),mouseEnterDelay:_,mouseLeaveDelay:z,overlayClassName:D,overlayStyle:W,destroyPopupOnHide:H,dropdownRender:B}=e,F=f(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),G=o("dropdown",h),V=`${G}-button`,[A,X]=(0,p.Z)(G),U={menu:x,arrow:$,autoFocus:k,align:E,disabled:b,trigger:b?[]:S,onOpenChange:N,getPopupContainer:M||t,mouseEnterDelay:_,mouseLeaveDelay:z,overlayClassName:D,overlayStyle:W,destroyPopupOnHide:H,dropdownRender:B},{compactSize:Y,compactItemClassnames:q}=(0,d.ri)(G,r),K=l()(V,q,w,X);"overlay"in e&&(U.overlay=P),"open"in e&&(U.open=L),U.placement="placement"in e?j:"rtl"===r?"bottomLeft":"bottomRight";const J=i.createElement(s.ZP,{type:m,danger:v,disabled:b,loading:y,onClick:g,htmlType:C,href:T,title:I},O),Q=i.createElement(s.ZP,{type:m,danger:v,icon:R}),[ee,te]=Z([J,Q]);return A(i.createElement(u.Z.Compact,Object.assign({className:K,size:Y,block:!0},F),ee,i.createElement(n.Z,Object.assign({},U),te)))};h.__ANT_BUTTON=!0;var m=h;const v=n.Z;v.Button=m;var b=v},81327:function(e,t,o){"use strict";o.d(t,{Z:function(){return y}});var n=o(59301),r=o(92310),l=o.n(r),i=o(38298),a=o(36355),s=o(33234);const c=n.createContext({latestIndex:0}),u=c.Provider;var d=e=>{let{className:t,index:o,children:r,split:l,style:i}=e;const{latestIndex:a}=n.useContext(c);return null==r?null:n.createElement(n.Fragment,null,n.createElement("div",{className:t,style:i},r),o<a&&l&&n.createElement("span",{className:`${t}-split`},l))},p=o(2856);function f(e){return["small","middle","large"].includes(e)}function h(e){return!!e&&("number"==typeof e&&!Number.isNaN(e))}var m=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o};const v=n.forwardRef(((e,t)=>{var o,r;const{getPrefixCls:s,space:c,direction:v}=n.useContext(a.E_),{size:b=(null==c?void 0:c.size)||"small",align:y,className:g,rootClassName:C,children:O,direction:w="horizontal",prefixCls:x,split:$,style:k,wrap:P=!1,classNames:S,styles:E}=e,L=m(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[N,j]=Array.isArray(b)?b:[b,b],M=f(j),T=f(N),R=h(j),I=h(N),Z=(0,i.Z)(O,{keepEmpty:!0}),_=void 0===y&&"horizontal"===w?"center":y,z=s("space",x),[D,W]=(0,p.Z)(z),H=l()(z,null==c?void 0:c.className,W,`${z}-${w}`,{[`${z}-rtl`]:"rtl"===v,[`${z}-align-${_}`]:_,[`${z}-gap-row-${j}`]:M,[`${z}-gap-col-${N}`]:T},g,C),B=l()(`${z}-item`,null!==(o=null==S?void 0:S.item)&&void 0!==o?o:null===(r=null==c?void 0:c.classNames)||void 0===r?void 0:r.item);let F=0;const G=Z.map(((e,t)=>{var o,r;null!=e&&(F=t);const l=e&&e.key||`${B}-${t}`;return n.createElement(d,{className:B,key:l,index:t,split:$,style:null!==(o=null==E?void 0:E.item)&&void 0!==o?o:null===(r=null==c?void 0:c.styles)||void 0===r?void 0:r.item},e)})),V=n.useMemo((()=>({latestIndex:F})),[F]);if(0===Z.length)return null;const A={};return P&&(A.flexWrap="wrap"),!T&&I&&(A.columnGap=N),!M&&R&&(A.rowGap=j),D(n.createElement("div",Object.assign({ref:t,className:H,style:Object.assign(Object.assign(Object.assign({},A),null==c?void 0:c.style),k)},L),n.createElement(u,{value:V},G)))}));const b=v;b.Compact=s.ZP;var y=b},51581:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),r=o(59301),l=a(r),i=a(o(12708));function a(e){return e&&e.__esModule?e:{default:e}}var s=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),n(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),n=void 0;if(this.props.useWindow){var r=document.documentElement||document.body.parentNode||document.body,l=void 0!==t.pageYOffset?t.pageYOffset:r.scrollTop;n=this.props.isReverse?l:this.calculateOffset(e,l)}else n=this.props.isReverse?o.scrollTop:e.scrollHeight-o.scrollTop-o.clientHeight;n<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,n=t.element,r=t.hasMore,i=(t.initialLoad,t.isReverse),a=t.loader,s=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var o={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,s&&s(t)};var u=[o];return r&&(a?i?u.unshift(a):u.push(a):this.defaultLoader&&(i?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),l.default.createElement(n,c,u)}}]),t}(r.Component);s.propTypes={children:i.default.node.isRequired,element:i.default.node,hasMore:i.default.bool,initialLoad:i.default.bool,isReverse:i.default.bool,loader:i.default.node,loadMore:i.default.func.isRequired,pageStart:i.default.number,ref:i.default.func,getScrollParent:i.default.func,threshold:i.default.number,useCapture:i.default.bool,useWindow:i.default.bool},s.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=s,e.exports=t.default},26724:function(e,t,o){e.exports=o(51581)}}]); |