import{r as e,z as s,E as t}from"./vendor-s2rfM_Vj.js";import{K as n,a as r}from"./apis-DdFSvwR4.js";import"./newtab-BWIjnu6l.js";import"./constant-Dkm_Y9q1.js";import"./index-Bf7N7lFc.js";import"./t-r-vendor-gn7FMrPE.js";const a=t("div")({name:"WrapUI",class:"wlklf4r",propsAsIs:!1}),o=t("h1")({name:"TimeUI",class:"t1vvptgk",propsAsIs:!1}),i=t("h2")({name:"DateUI",class:"dfybfxz",propsAsIs:!1}),c=({info:t})=>{const[c,m]=e.useState(new Date),p=n(c,t.second?"second":"min"),d=t.date?c.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"long",day:"numeric"}):"";let l=e.useRef(0);return e.useEffect((()=>(r((()=>{let e=Date.now();const s=()=>{const t=Date.now();t-e>=1e3&&(m(new Date),e=t),l.current=requestAnimationFrame(s)};l.current=requestAnimationFrame(s)}),500),()=>{cancelAnimationFrame(l.current)})),[]),s.jsxs(a,{children:[s.jsx(o,{children:p}),s.jsx(i,{children:d})]})};export{c as default};
