1import{cy as T,dd as W,r as n,az as Z,aA as ee,aE as te,aI as ne,aL as h,aM as se,as as N,at as ae,ae as oe,ap as re,aH as ce}from"./theme-3dfVej7W.js";const le=t=>{const{value:e,formatter:a,precision:r,decimalSeparator:m,groupSeparator:u="",prefixCls:f,className:l,style:c}=t;let i;if(T(a))i=a(e);else{const p=String(e),d=p.match(/^(-?)(\d*)(\.(\d+))?$/);if(!d||p==="-")i=p;else{const x=d[1];let s=d[2]||"0",o=d[4]||"";s=s.replace(/\B(?=(\d{3})+(?!\d))/g,u),W(r)&&(o=o.padEnd(r,"0").slice(0,r>0?r:0)),o&&(o=`${m}${o}`),i=[n.createElement("span",{key:"int",className:`${f}-content-value-int`},x,s),o&&n.createElement("span",{key:"decimal",className:`${f}-content-value-decimal`},o)]}}return n.createElement("span",{className:l,style:c},i)},ie=t=>{const{componentCls:e,marginXXS:a,padding:r,colorTextDescription:m,titleFontSize:u,colorTextHeading:f,contentFontSize:l,fontFamily:c}=t;return{[e]:{...te(t),[`${e}-header`]:{paddingBottom:a,[`${e}-title`]:{color:m,fontSize:u}},[`${e}-skeleton`]:{paddingTop:r},[`${e}-content`]:{color:f,fontSize:l,fontFamily:c,[`${e}-content-value`]:{display:"inline-block",direction:"ltr"},[`${e}-content-prefix, ${e}-content-suffix`]:{display:"inline-block"},[`${e}-content-prefix`]:{marginInlineEnd:a},[`${e}-content-suffix`]:{marginInlineStart:a}}}}},me=t=>{const{fontSizeHeading3:e,fontSize:a}=t;return{titleFontSize:a,contentFontSize:e}},ue=Z("Statistic",t=>{const e=ee(t,{});return ie(e)},me),E=n.forwardRef((t,e)=>{const{prefixCls:a,className:r,rootClassName:m,style:u,valueStyle:f,value:l=0,title:c,valueRender:i,prefix:p,suffix:d,loading:x=!1,formatter:s,precision:o,decimalSeparator:y=".",groupSeparator:C=",",onMouseEnter:R,onMouseLeave:z,styles:I,classNames:D,...H}=t,{getPrefixCls:M,direction:F,className:P,style:b,classNames:A,styles:L}=ne("statistic"),S=M("statistic",a),[B,U]=ue(S),V={...t,decimalSeparator:y,groupSeparator:C,loading:x,value:l},X=h(b),Y=h(u),[g,v]=se([A,D],[L,X,I,Y],{props:V}),_=N(S,{[`${S}-rtl`]:F==="rtl"},P,r,m,g.root,B,U),j=N(`${S}-header`,g.header),q=N(`${S}-title`,g.title),G=N(`${S}-content`,g.content),J=N(`${S}-content-value`,g.value),K=N(`${S}-content-prefix`,g.prefix),O=N(`${S}-content-suffix`,g.suffix),$=n.createElement(le,{decimalSeparator:y,groupSeparator:C,prefixCls:S,formatter:s,precision:o,value:l,className:J,style:v.value}),w=n.useRef(null);n.useImperativeHandle(e,()=>({nativeElement:w.current}));const Q=ae(H,{aria:!0,data:!0});return n.createElement("div",{...Q,className:_,style:v.root,ref:w,onMouseEnter:R,onMouseLeave:z},c&&n.createElement("div",{className:j,style:v.header},n.createElement("div",{className:q,style:v.title},c)),n.createElement(oe,{paragraph:!1,loading:x,className:`${S}-skeleton`,active:!0},n.createElement("div",{className:G,style:{...f,...v.content}},p&&n.createElement("span",{className:K,style:v.prefix},p),T(i)?i($):$,d&&n.createElement("span",{className:O,style:v.suffix},d))))}),fe=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function de(t,e){let a=t;const r=/\[[^\]]*]/g,m=(e.match(r)||[]).map(c=>c.slice(1,-1)),u=e.replace(r,"[]"),f=fe.reduce((c,[i,p])=>{if(c.includes(i)){const d=Math.floor(a/p);return a-=d*p,c.replace(new RegExp(`${i}+`,"g"),x=>{const s=x.length;return d.toString().padStart(s,"0")})}return c},u);let l=0;return f.replace(r,()=>{const c=m[l];return l+=1,c})}function pe(t,e,a){const{format:r=""}=e,m=new Date(t).getTime(),u=Date.now(),f=Math.max(a?m-u:u-m,0);return de(f,r)}const Se=1e3/60;function xe(t){return new Date(t).getTime()}const k=t=>{const{value:e,format:a="HH:mm:ss",onChange:r,onFinish:m,type:u,...f}=t,l=u==="countdown",[c,i]=n.useState(null),p=re(()=>{const s=Date.now(),o=xe(e);i({});const y=l?o-s:s-o;return r?.(y),l&&o<s?(m?.(),!1):!0});n.useEffect(()=>{let s;const o=()=>{p()||window.clearInterval(s)},y=()=>{s=window.setInterval(o,Se)},C=()=>{window.clearInterval(s)};return y(),()=>{C()}},[e,l]),n.useEffect(()=>{i({})},[]);const d=(s,o)=>c?pe(s,{...o,format:a},l):"-",x=s=>ce(s,{title:void 0});return n.createElement(E,{...f,value:e,valueRender:x,formatter:d})},ge=t=>n.createElement(k,{...t,type:"countdown"}),ve=n.memo(ge);E.Timer=k;E.Countdown=ve;export{E as S};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.