-
Notifications
You must be signed in to change notification settings - Fork 0
/
35784.daa81d43.async.js
1 lines (1 loc) · 11.1 KB
/
35784.daa81d43.async.js
1
"use strict";(self.webpackChunkantd=self.webpackChunkantd||[]).push([[35784],{363606:function(j,E,e){e.d(E,{Z:function(){return w}});var S=e(487462),r=e(667294),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},a=y,I=e(713401),P=function(D,T){return r.createElement(I.Z,(0,S.Z)({},D,{ref:T,icon:a}))},w=r.forwardRef(P)},297937:function(j,E,e){e.d(E,{Z:function(){return w}});var S=e(487462),r=e(667294),y={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},a=y,I=e(713401),P=function(D,T){return r.createElement(I.Z,(0,S.Z)({},D,{ref:T,icon:a}))},w=r.forwardRef(P)},935784:function(j,E,e){e.r(E),e.d(E,{scopes:function(){return L}});var S=e(667294),r=e(979331),y=e(988872),a=e(945016),I=e(75529),P=e(363606),w=e(297937),L={"switch-demo-basic":{React:S,Switch:r.Z},"switch-demo-disabled":{React:S,useState:S.useState,Button:y.ZP,Space:a.Z,Switch:r.Z},"switch-demo-text":{React:S,CheckOutlined:P.Z,CloseOutlined:w.Z,Switch:r.Z,Space:a.Z},"switch-demo-size":{React:S,Switch:r.Z},"switch-demo-loading":{React:S,Switch:r.Z},"switch-demo-component-token":{React:S,ConfigProvider:I.ZP,Space:a.Z,Switch:r.Z}}},979331:function(j,E,e){e.d(E,{Z:function(){return tn}});var S=e(242122),r=e.n(S),y=e(238416),a=e.n(y),I=e(627424),P=e.n(I),w=e(670215),L=e.n(w),D=e(667294),T=e(100628),$=e.n(T),M=e(294184),G=e.n(M),R=e(33413),X=e(189265),x=e(73287),J=e(147315),Y=e(947170),O=e(615624),B=e(510274),V=e(548073),q=e(286665),_=e(986943),K=function(n){var c,i,d,o,s,h=n.componentCls,l=n.trackHeightSM,C=n.trackPadding,v=n.trackMinWidthSM,Z=n.innerMinMarginSM,m=n.innerMaxMarginSM,u=n.handleSizeSM,g=n.calc,f="".concat(h,"-inner"),A=(0,O.bf)(g(u).add(g(C).mul(2)).equal()),p=(0,O.bf)(g(m).mul(2).equal());return a()({},h,a()({},"&".concat(h,"-small"),(s={minWidth:v,height:l,lineHeight:(0,O.bf)(l)},a()(s,"".concat(h,"-inner"),(c={paddingInlineStart:m,paddingInlineEnd:Z},a()(c,"".concat(f,"-checked"),{marginInlineStart:"calc(-100% + ".concat(A," - ").concat(p,")"),marginInlineEnd:"calc(100% - ".concat(A," + ").concat(p,")")}),a()(c,"".concat(f,"-unchecked"),{marginTop:g(l).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}),c)),a()(s,"".concat(h,"-handle"),{width:u,height:u}),a()(s,"".concat(h,"-loading-icon"),{top:g(g(u).sub(n.switchLoadingIconSize)).div(2).equal(),fontSize:n.switchLoadingIconSize}),a()(s,"&".concat(h,"-checked"),(d={},a()(d,"".concat(h,"-inner"),(i={paddingInlineStart:Z,paddingInlineEnd:m},a()(i,"".concat(f,"-checked"),{marginInlineStart:0,marginInlineEnd:0}),a()(i,"".concat(f,"-unchecked"),{marginInlineStart:"calc(100% - ".concat(A," + ").concat(p,")"),marginInlineEnd:"calc(-100% + ".concat(A," - ").concat(p,")")}),i)),a()(d,"".concat(h,"-handle"),{insetInlineStart:"calc(100% - ".concat((0,O.bf)(g(u).add(C).equal()),")")}),d)),a()(s,"&:not(".concat(h,"-disabled):active"),(o={},a()(o,"&:not(".concat(h,"-checked) ").concat(f),a()({},"".concat(f,"-unchecked"),{marginInlineStart:g(n.marginXXS).div(2).equal(),marginInlineEnd:g(n.marginXXS).mul(-1).div(2).equal()})),a()(o,"&".concat(h,"-checked ").concat(f),a()({},"".concat(f,"-checked"),{marginInlineStart:g(n.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:g(n.marginXXS).div(2).equal()})),o)),s)))},N=function(n){var c,i=n.componentCls,d=n.handleSize,o=n.calc;return a()({},i,(c={},a()(c,"".concat(i,"-loading-icon").concat(n.iconCls),{position:"relative",top:o(o(d).sub(n.fontSize)).div(2).equal(),color:n.switchLoadingIconColor,verticalAlign:"top"}),a()(c,"&".concat(i,"-checked ").concat(i,"-loading-icon"),{color:n.switchColor}),c))},U=function(n){var c,i,d=n.componentCls,o=n.trackPadding,s=n.handleBg,h=n.handleShadow,l=n.handleSize,C=n.calc,v="".concat(d,"-handle");return a()({},d,(i={},a()(i,v,{position:"absolute",top:o,insetInlineStart:o,width:l,height:l,transition:"all ".concat(n.switchDuration," ease-in-out"),"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:s,borderRadius:C(l).div(2).equal(),boxShadow:h,transition:"all ".concat(n.switchDuration," ease-in-out"),content:'""'}}),a()(i,"&".concat(d,"-checked ").concat(v),{insetInlineStart:"calc(100% - ".concat((0,O.bf)(C(l).add(o).equal()),")")}),a()(i,"&:not(".concat(d,"-disabled):active"),(c={},a()(c,"".concat(v,"::before"),{insetInlineEnd:n.switchHandleActiveInset,insetInlineStart:0}),a()(c,"&".concat(d,"-checked ").concat(v,"::before"),{insetInlineEnd:0,insetInlineStart:n.switchHandleActiveInset}),c)),i))},nn=function(n){var c,i,d,o,s=n.componentCls,h=n.trackHeight,l=n.trackPadding,C=n.innerMinMargin,v=n.innerMaxMargin,Z=n.handleSize,m=n.calc,u="".concat(s,"-inner"),g=(0,O.bf)(m(Z).add(m(l).mul(2)).equal()),f=(0,O.bf)(m(v).mul(2).equal());return a()({},s,(o={},a()(o,u,(c={display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:v,paddingInlineEnd:C,transition:"padding-inline-start ".concat(n.switchDuration," ease-in-out, padding-inline-end ").concat(n.switchDuration," ease-in-out")},a()(c,"".concat(u,"-checked, ").concat(u,"-unchecked"),{display:"block",color:n.colorTextLightSolid,fontSize:n.fontSizeSM,transition:"margin-inline-start ".concat(n.switchDuration," ease-in-out, margin-inline-end ").concat(n.switchDuration," ease-in-out"),pointerEvents:"none"}),a()(c,"".concat(u,"-checked"),{marginInlineStart:"calc(-100% + ".concat(g," - ").concat(f,")"),marginInlineEnd:"calc(100% - ".concat(g," + ").concat(f,")")}),a()(c,"".concat(u,"-unchecked"),{marginTop:m(h).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}),c)),a()(o,"&".concat(s,"-checked ").concat(u),(i={paddingInlineStart:C,paddingInlineEnd:v},a()(i,"".concat(u,"-checked"),{marginInlineStart:0,marginInlineEnd:0}),a()(i,"".concat(u,"-unchecked"),{marginInlineStart:"calc(100% - ".concat(g," + ").concat(f,")"),marginInlineEnd:"calc(-100% + ".concat(g," - ").concat(f,")")}),i)),a()(o,"&:not(".concat(s,"-disabled):active"),(d={},a()(d,"&:not(".concat(s,"-checked) ").concat(u),a()({},"".concat(u,"-unchecked"),{marginInlineStart:m(l).mul(2).equal(),marginInlineEnd:m(l).mul(-1).mul(2).equal()})),a()(d,"&".concat(s,"-checked ").concat(u),a()({},"".concat(u,"-checked"),{marginInlineStart:m(l).mul(-1).mul(2).equal(),marginInlineEnd:m(l).mul(2).equal()})),d)),o))},an=function(n){var c,i=n.componentCls,d=n.trackHeight,o=n.trackMinWidth;return a()({},i,r()(r()(r()({},(0,V.Wf)(n)),{},a()({position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:o,height:d,lineHeight:"".concat((0,O.bf)(d)),verticalAlign:"middle",background:n.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:"all ".concat(n.motionDurationMid),userSelect:"none"},"&:hover:not(".concat(i,"-disabled)"),{background:n.colorTextTertiary}),(0,V.Qy)(n)),{},(c={},a()(c,"&".concat(i,"-checked"),a()({background:n.switchColor},"&:hover:not(".concat(i,"-disabled)"),{background:n.colorPrimaryHover})),a()(c,"&".concat(i,"-loading, &").concat(i,"-disabled"),{cursor:"not-allowed",opacity:n.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}}),a()(c,"&".concat(i,"-rtl"),{direction:"rtl"}),c)))},Q=function(n){var c=n.fontSize,i=n.lineHeight,d=n.controlHeight,o=n.colorWhite,s=c*i,h=d/2,l=2,C=s-l*2,v=h-l*2;return{trackHeight:s,trackHeightSM:h,trackMinWidth:C*2+l*4,trackMinWidthSM:v*2+l*2,trackPadding:l,handleBg:o,handleSize:C,handleSizeSM:v,handleShadow:"0 2px 4px 0 ".concat(new B.C("#00230b").setAlpha(.2).toRgbString()),innerMinMargin:C/2,innerMaxMargin:C+l+l*2,innerMinMarginSM:v/2,innerMaxMarginSM:v+l+l*2}},W=(0,q.I$)("Switch",function(t){var n=(0,_.TS)(t,{switchDuration:t.motionDurationMid,switchColor:t.colorPrimary,switchDisabledOpacity:t.opacityLoading,switchLoadingIconSize:t.calc(t.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:"rgba(0, 0, 0, ".concat(t.opacityLoading,")"),switchHandleActiveInset:"-30%"});return[an(n),nn(n),U(n),N(n),K(n)]},Q),en=e(260869),b=e(785893),cn=["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"],k=D.forwardRef(function(t,n){var c,i=t.prefixCls,d=t.size,o=t.disabled,s=t.loading,h=t.className,l=t.rootClassName,C=t.style,v=t.checked,Z=t.value,m=t.defaultChecked,u=t.defaultValue,g=t.onChange,f=L()(t,cn),A=(0,en.default)(!1,{value:v!=null?v:Z,defaultValue:m!=null?m:u}),p=P()(A,2),sn=p[0],hn=p[1],ln=D.useContext(x.E_),un=ln.getPrefixCls,gn=ln.direction,H=ln.switch,vn=D.useContext(J.Z),mn=(o!=null?o:vn)||s,z=un("switch",i),Sn=(0,b.jsx)("div",{className:"".concat(z,"-handle"),children:s&&(0,b.jsx)($(),{className:"".concat(z,"-loading-icon")})}),Cn=W(z),dn=P()(Cn,2),fn=dn[0],Mn=dn[1],In=(0,Y.Z)(d),En=G()(H==null?void 0:H.className,(c={},a()(c,"".concat(z,"-small"),In==="small"),a()(c,"".concat(z,"-loading"),s),a()(c,"".concat(z,"-rtl"),gn==="rtl"),c),h,l,Mn),Pn=r()(r()({},H==null?void 0:H.style),C),Dn=function(){for(var rn=arguments.length,on=new Array(rn),F=0;F<rn;F++)on[F]=arguments[F];hn(on[0]),g==null||g.apply(void 0,on)};return fn((0,b.jsx)(X.Z,{component:"Switch",children:(0,b.jsx)(R.Z,r()(r()({},f),{},{checked:sn,onChange:Dn,prefixCls:z,className:En,style:Pn,disabled:mn,ref:n,loadingIcon:Sn}))}))});k.__ANT_SWITCH=!0;var tn=k},33413:function(j,E,e){var S=e(487462),r=e(204942),y=e(297685),a=e(700091),I=e(667294),P=e(294184),w=e.n(P),L=e(821770),D=e(915105),T=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],$=I.forwardRef(function(M,G){var R,X=M.prefixCls,x=X===void 0?"rc-switch":X,J=M.className,Y=M.checked,O=M.defaultChecked,B=M.disabled,V=M.loadingIcon,q=M.checkedChildren,_=M.unCheckedChildren,K=M.onClick,N=M.onChange,U=M.onKeyDown,nn=(0,a.Z)(M,T),an=(0,L.default)(!1,{value:Y,defaultValue:O}),Q=(0,y.Z)(an,2),W=Q[0],en=Q[1];function b(t,n){var c=W;return B||(c=t,en(c),N==null||N(c,n)),c}function cn(t){t.which===D.Z.LEFT?b(!1,t):t.which===D.Z.RIGHT&&b(!0,t),U==null||U(t)}function k(t){var n=b(!W,t);K==null||K(n,t)}var tn=w()(x,J,(R={},(0,r.Z)(R,"".concat(x,"-checked"),W),(0,r.Z)(R,"".concat(x,"-disabled"),B),R));return I.createElement("button",(0,S.Z)({},nn,{type:"button",role:"switch","aria-checked":W,disabled:B,className:tn,ref:G,onKeyDown:cn,onClick:k}),V,I.createElement("span",{className:"".concat(x,"-inner")},I.createElement("span",{className:"".concat(x,"-inner-checked")},q),I.createElement("span",{className:"".concat(x,"-inner-unchecked")},_)))});$.displayName="Switch",E.Z=$}}]);