import{r as e,z as a,E as s}from"./vendor-s2rfM_Vj.js";import{K as t,D as n,a as r}from"./apis-DdFSvwR4.js";import"./newtab-BWIjnu6l.js";import"./constant-Dkm_Y9q1.js";import{L as o}from"./LunarCalendar-CSepryyr.js";import"./index-Bf7N7lFc.js";import"./t-r-vendor-gn7FMrPE.js";const i=s("div")({name:"WarpUI",class:"w1ioe4y",propsAsIs:!1}),m=s("div")({name:"TimeUI",class:"tb4hrm0",propsAsIs:!1}),c=s("div")({name:"DateUI",class:"d15sf8i3",propsAsIs:!1}),l=({info:s})=>{const[l,p]=e.useState(new Date),d=t(l,s.second?"second":"min"),u=l.toLocaleDateString().split("/"),j=`${u[0]}年${u[1]}月${u[2]}日`,D=o.solarToLunar(l.getFullYear(),l.getMonth()+1,l.getDate()),f=`${D.GanZhiYear}年${D.lunarMonthName}${D.lunarDayName}`,h=n(l);return e.useEffect((()=>{let e,a=Date.now();return r((()=>{const s=()=>{const t=Date.now();t-a>=1e3&&(p(new Date),a=t),e=requestAnimationFrame(s)};e=requestAnimationFrame(s)}),500),()=>{e&&cancelAnimationFrame(e)}}),[]),a.jsxs(i,{children:[a.jsx(m,{children:d}),s.date&&a.jsxs(c,{children:[j," · ",f," · ",h]})]})};export{l as default};
