import{d as ht,p as x,h as W,o as Y,c as p,j as h,a1 as I,a2 as B,F as T,C as L,a as O,t as w,n as yt,e as Q,_ as _t}from"./framework.CUIZiAXs.js";var wt=Object.defineProperty,gt=(a,t,e)=>t in a?wt(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,N=(a,t,e)=>gt(a,typeof t!="symbol"?t+"":t,e);const X=class c{constructor(t){N(this,"_date"),t instanceof c?this._date=new Date(t.toDate()):t instanceof Date?this._date=new Date(t):typeof t=="string"||typeof t=="number"?(this._date=new Date(t),typeof t=="string"&&isNaN(this._date.getTime())&&(this._date=new Date(t.replace(/-/g,"/")))):this._date=new Date}toDate(){return this._date}isValid(){return!isNaN(this._date.getTime())}diff(t,e="day"){const r=new c(t).toDate(),n=this._date.getTime()-r.getTime();switch(e){case"year":return this._date.getFullYear()-r.getFullYear();case"month":return(this._date.getFullYear()-r.getFullYear())*12+(this._date.getMonth()-r.getMonth());case"day":default:return Math.floor(n/(1e3*60*60*24))}}startOf(t){const e=new Date(this._date);switch(t){case"year":e.setMonth(0),e.setDate(1),e.setHours(0,0,0,0);break;case"month":e.setDate(1),e.setHours(0,0,0,0);break;case"day":e.setHours(0,0,0,0);break}return new c(e)}endOf(t){const e=new Date(this._date);switch(t){case"year":e.setMonth(11),e.setDate(31),e.setHours(23,59,59,999);break;case"month":e.setDate(new Date(e.getFullYear(),e.getMonth()+1,0).getDate()),e.setHours(23,59,59,999);break;case"day":e.setHours(23,59,59,999);break}return new c(e)}add(t,e){const r=new Date(this._date);switch(e){case"year":r.setFullYear(r.getFullYear()+t);break;case"month":r.setMonth(r.getMonth()+t);break;case"day":r.setDate(r.getDate()+t);break}return new c(r)}subtract(t,e){return this.add(-t,e)}format(t){const e={YYYY:this._date.getFullYear(),MM:(this._date.getMonth()+1).toString().padStart(2,"0"),DD:this._date.getDate().toString().padStart(2,"0"),HH:this._date.getHours().toString().padStart(2,"0"),mm:this._date.getMinutes().toString().padStart(2,"0"),ss:this._date.getSeconds().toString().padStart(2,"0"),dddd:c.daysOfWeek[this._date.getDay()]};return t.replace(/YYYY|MM|DD|HH|mm|ss|dddd/g,r=>e[r].toString())}year(t){if(t===void 0)return this._date.getFullYear();const e=new Date(this._date);return e.setFullYear(t),new c(e)}month(t){if(t===void 0)return this._date.getMonth();const e=new Date(this._date);return e.setMonth(t),new c(e)}date(t){if(t===void 0)return this._date.getDate();const e=new Date(this._date);return e.setDate(t),new c(e)}day(t){if(t===void 0)return this._date.getDay();{const e=this._date.getDay(),r=t-e,n=new Date(this._date);return n.setDate(this._date.getDate()+r),new c(n)}}isBefore(t){const e=new c(t).toDate();return this._date.getTime()e.getTime()}isSame(t,e="day"){const r=new c(t).toDate();switch(e){case"year":return this._date.getFullYear()===r.getFullYear();case"month":return this._date.getFullYear()===r.getFullYear()&&this._date.getMonth()===r.getMonth();case"day":default:return this._date.getFullYear()===r.getFullYear()&&this._date.getMonth()===r.getMonth()&&this._date.getDate()===r.getDate()}}isBetween(t,e,r){const n=new c(t).startOf(r).toDate(),u=new c(e).endOf(r).toDate(),o=this.toDate();return o>=n&&o<=u}};N(X,"daysOfWeek",["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);let ct=X;const f=a=>new ct(a),k=a=>f(a).startOf("day"),H=(a,t)=>{a=k(a),t=k(t);const e=t.diff(a,"day");return Array.from({length:e+1},(r,n)=>a.add(n,"day"))},mt={1999:{"New Year's Day,元旦":1,"Spring Festival,春节":3,"Labour Day,劳动节":3,"National Day,国庆节":3},2008:{"Tomb-sweeping Day,清明":1,"Labour Day,劳动节":1,"Dragon Boat Festival,端午":1,"Mid-autumn Festival,中秋":1},2015:{"Anti-Fascist 70th Day,中国人民抗日战争暨世界反法西斯战争胜利70周年纪念日":1},2025:{"Spring Festival,春节":4,"Labour Day,劳动节":2}};class ft{constructor(){N(this,"dayDetails",{}),N(this,"holidays",{}),N(this,"workdays",{}),N(this,"inLieuDays",{})}y(t){return this.dayDetails.year=t,this}getHolidayDays(t,e){let r=0;for(const[n,u]of Object.entries(mt)){if(parseInt(n)>t)break;u[e]!==void 0&&(r=u[e])}return r}mark(t){return this.dayDetails.holiday=t,this}save(t,e,r){if(!this.dayDetails.year)throw new Error("should set year before saving holiday");if(!this.dayDetails.holiday)throw new Error("should set holiday before saving holiday");this.dayDetails.month=t,this.dayDetails.day=e,this.dayDetails.dayType=r;const n=f(`${this.dayDetails.year}-${t}-${e}`).format("YYYY-MM-DD"),u=this.getHolidayDays(this.dayDetails.year,this.dayDetails.holiday),o=`${this.dayDetails.holiday},${u}`;return r===2?this.holidays[n]=o:r===1?this.workdays[n]=o:r===3&&(this.inLieuDays[n]=o),this}to(t,e){if(!this.dayDetails.holiday||!this.dayDetails.year||!this.dayDetails.month||!this.dayDetails.day)throw new Error("should set year/month/day before saving holiday range");const r=f(`${this.dayDetails.year}-${this.dayDetails.month}-${this.dayDetails.day}`),n=f(`${this.dayDetails.year}-${t}-${e}`);if(n.isBefore(r)||n.isSame(r))throw new Error("end date should be after start date");const u=this.getHolidayDays(this.dayDetails.year,this.dayDetails.holiday),o=`${this.dayDetails.holiday},${u}`,l=n.diff(r,"day");for(let s=1;s<=l;s++){const D=r.add(s,"day").format("YYYY-MM-DD");this.dayDetails.dayType===2?this.holidays[D]=o:this.dayDetails.dayType===1?this.workdays[D]=o:this.dayDetails.dayType===3&&(this.inLieuDays[D]=o)}return this}w(t,e){return this.save(t,e,1)}r(t,e){return this.save(t,e,2)}i(t,e){return this.save(t,e,3)}ny(){return this.mark("New Year's Day,元旦")}s(){return this.mark("Spring Festival,春节")}t(){return this.mark("Tomb-sweeping Day,清明")}l(){return this.mark("Labour Day,劳动节")}d(){return this.mark("Dragon Boat Festival,端午")}n(){return this.mark("National Day,国庆节")}m(){return this.mark("Mid-autumn Festival,中秋")}a(){return this.mark("Anti-Fascist 70th Day,中国人民抗日战争暨世界反法西斯战争胜利70周年纪念日")}}const Dt=()=>{const a=new ft;return a.y(2025).ny().r(1,1).s().r(1,28).to(2,4).w(1,26).w(2,8).i(2,3).i(2,4).t().r(4,4).to(4,6).l().r(5,1).to(5,5).w(4,27).i(5,5).d().r(5,31).to(6,2).n().r(10,1).to(10,8).w(9,28).w(10,11).i(10,7).i(10,8).m().r(10,6),a.y(2024).ny().r(1,1).s().r(2,10).to(2,17).w(2,4).w(2,18).i(2,15).to(2,16).t().r(4,4).to(4,6).w(4,7).i(4,5).l().r(5,1).to(5,5).w(4,28).w(5,11).i(5,2).to(5,3).d().r(6,10).m().r(9,15).to(9,17).w(9,14).i(9,16).n().r(10,1).to(10,7).w(9,29).w(10,12).i(10,4).i(10,7),a.y(2023).ny().r(1,1).to(1,2).s().r(1,21).to(1,27).w(1,28).to(1,29).i(1,26).to(1,27).t().r(4,5).l().r(4,29).to(5,3).w(4,23).w(5,6).i(5,2).to(5,3).d().r(6,22).to(6,24).w(6,25).i(6,23).m().r(9,29).n().r(9,30).to(10,6).w(10,7).to(10,8).i(10,5).to(10,6),a.y(2022).ny().r(1,1).to(1,3).s().r(1,31).to(2,6).w(1,29).w(1,30).i(2,3).to(2,4).t().r(4,3).to(4,5).w(4,2).i(4,4).l().r(4,30).to(5,4).w(4,24).w(5,7).i(5,3).to(5,4).d().r(6,3).to(6,5).m().r(9,10).to(9,12).n().r(10,1).to(10,7).w(10,8).w(10,9).i(10,6).to(10,7).ny().r(12,31),a.y(2021).ny().r(1,1).to(1,3).s().r(2,11).to(2,17).w(2,7).w(2,20).i(2,16).to(2,17).t().r(4,3).to(4,5).l().r(5,1).to(5,5).w(4,25).w(5,8).i(5,4).to(5,5).d().r(6,12).to(6,14).m().r(9,19).to(9,21).w(9,18).i(9,20).n().r(10,1).to(10,7).w(9,26).w(10,9).i(10,6).to(10,7),a.y(2020).ny().r(1,1).s().r(1,24).to(2,2).w(1,19).i(1,29).t().r(4,4).to(4,6).l().r(5,1).to(5,5).w(4,26).w(5,9).i(5,4).to(5,5).d().r(6,25).to(6,27).w(6,28).i(6,26).n().r(10,1).to(10,8).w(9,27).w(10,10).i(10,7).to(10,8),a.y(2019).ny().r(1,1).s().r(2,4).to(2,10).w(2,2).to(2,3).i(2,4).i(2,8).t().r(4,5).to(4,7).l().r(5,1).to(5,4).w(4,28).w(5,5).i(5,2).i(5,3).d().r(6,7).to(6,9).m().r(9,13).to(9,15).n().r(10,1).to(10,7).w(9,29).w(10,12).i(10,4).i(10,7),a.y(2018).ny().r(1,1).s().r(2,15).to(2,21).w(2,11).w(2,24).i(2,19).to(2,21).t().r(4,5).to(4,7).w(4,8).i(4,6).l().r(4,29).to(5,1).w(4,28).i(4,30).d().r(6,18).n().r(10,1).to(10,7).w(9,29).to(9,30).i(10,4).to(10,5).m().r(9,24).ny().r(12,30).to(12,31).w(12,29).i(12,31),a.y(2017).ny().r(1,1).to(1,2).s().r(1,27).to(2,2).w(1,22).w(2,4).i(2,1).to(2,2).t().r(4,2).to(4,4).w(4,1).i(4,3).l().r(5,1).d().r(5,28).to(5,30).w(5,27).i(5,29).n().r(10,1).to(10,8).w(9,30).i(10,6).m().r(10,4),a.y(2016).ny().r(1,1).s().r(2,7).to(2,13).w(2,6).w(2,14).i(2,11).to(2,12).t().r(4,4).l().r(5,1).to(5,2).d().r(6,9).to(6,11).w(6,12).i(6,10).m().r(9,15).to(9,17).w(9,18).i(9,16).n().r(10,1).to(10,7).w(10,8).to(10,9).i(10,6).to(10,7),a.y(2015).ny().r(1,1).to(1,3).w(1,4).i(1,2).s().r(2,18).to(2,24).w(2,15).w(2,28).i(2,23).to(2,24).t().r(4,5).to(4,6).l().r(5,1).d().r(6,20).r(6,22).m().r(9,27).n().r(10,1).to(10,7).w(10,10).i(10,7).a().r(9,3).to(9,4).w(9,6).i(9,4),a.y(2014).ny().r(1,1).s().r(1,31).to(2,6).w(1,26).w(2,8).i(2,5).to(2,6).t().r(4,5).to(4,7).l().r(5,1).to(5,3).w(5,4).i(5,2).d().r(6,2).m().r(9,8).n().r(10,1).to(10,7).w(9,28).w(10,11).i(10,6).to(10,7),a.y(2013).ny().r(1,1).to(1,3).w(1,5).to(1,6).i(1,2).to(1,3).s().r(2,9).to(2,15).w(2,16).to(2,17).i(2,14).to(2,15).t().r(4,4).to(4,6).w(4,7).i(4,5).l().r(4,29).to(5,1).w(4,27).to(4,28).i(4,29).to(4,30).d().r(6,10).to(6,12).w(6,8).to(6,9).i(6,10).to(6,11).m().r(9,19).to(9,21).w(9,22).i(9,20).n().r(10,1).to(10,7).w(9,29).w(10,12).i(10,4).i(10,7),a.y(2012).ny().r(1,1).to(1,3).i(1,3).s().r(1,22).to(1,28).w(1,21).w(1,29).i(1,26).to(1,27).t().r(4,2).to(4,4).w(3,31).w(4,1).i(4,2).to(4,3).l().r(4,29).to(5,1).w(4,28).i(4,30).d().r(6,22).r(6,24).m().r(9,30).n().r(10,1).to(10,7).w(9,29).i(10,5),a.y(2011).ny().r(1,1).to(1,3).s().r(2,2).to(2,8).w(1,30).w(2,12).i(2,7).to(2,8).t().r(4,3).to(4,5).w(4,2).i(4,4).l().r(4,30).to(5,2).d().r(6,4).r(6,6).m().r(9,10).to(9,12).n().r(10,1).to(10,7).w(10,8).to(10,9).i(10,6).to(10,7).ny().w(12,31),a.y(2010).ny().r(1,1).to(1,3).s().r(2,13).to(2,19).w(2,20).to(2,21).i(2,18).to(2,19).t().r(4,3).to(4,5).l().r(5,1).to(5,3).d().r(6,14).to(6,16).w(6,12).to(6,13).i(6,14).to(6,15).m().r(9,22).to(9,24).w(9,19).w(9,25).i(9,23).to(9,24).n().r(10,1).to(10,7).w(9,26).w(10,9).i(10,6).to(10,7),a.y(2009).ny().r(1,1).to(1,3).w(1,4).i(1,2).s().r(1,25).to(1,31).w(1,24).w(2,1).i(1,29).to(1,30).t().r(4,4).to(4,6).l().r(5,1).to(5,3).d().r(5,28).to(5,30).w(5,31).i(5,29).n().r(10,1).to(10,8).w(9,27).w(10,10).i(10,7).to(10,8).m().r(10,3),a.y(2008).ny().r(1,1).s().r(2,6).to(2,12).w(2,2).to(2,3).i(2,11).to(2,12).t().r(4,4).to(4,6).l().r(5,1).to(5,3).w(5,4).i(5,2).d().r(6,7).to(6,9).m().r(9,13).to(9,15).n().r(9,29).to(10,5).w(9,27).to(9,28).i(9,29).to(9,30),a.y(2007).ny().r(1,1).to(1,3).i(1,2).to(1,3).s().r(2,18).to(2,24).w(2,17).w(2,25).i(2,22).to(2,23).l().r(5,1).to(5,7).w(4,28).to(4,29).i(5,4).i(5,7).n().r(10,1).to(10,7).w(9,29).to(9,30).i(10,4).to(10,5).ny().r(12,30).to(12,31).w(12,29).i(12,31),a.y(2006).ny().r(1,1).to(1,3).s().r(1,29).to(2,4).w(1,28).w(2,5).i(2,2).to(2,3).l().r(5,1).to(5,7).w(4,29).to(4,30).i(5,4).to(5,5).n().r(10,1).to(10,7).w(9,30).w(10,8).i(10,5).to(10,6).ny().w(12,30).to(12,31),a.y(2005).ny().r(1,1).to(1,3).s().r(2,9).to(2,15).w(2,5).to(2,6).i(2,14).to(2,15).l().r(5,1).to(5,7).w(4,30).w(5,8).i(5,5).to(5,6).n().r(10,1).to(10,7).w(10,8).to(10,9).i(10,6).to(10,7),a.y(2004).ny().r(1,1).s().r(1,22).to(1,28).w(1,17).to(1,18).i(1,27).to(1,28).l().r(5,1).to(5,7).w(5,8).to(5,9).i(5,6).to(5,7).n().r(10,1).to(10,7).w(10,9).to(10,10).i(10,6).to(10,7),{holidays:a.holidays,workdays:a.workdays,inLieuDays:a.inLieuDays}},{holidays:j,workdays:V,inLieuDays:Yt}=Dt(),S=(...a)=>{if(a.length!==1)return a.map(e=>S(e));const t=k(a[0]);if(!t.isValid())throw new Error(`unsupported type ${typeof t}, expected type is Date or Dayjs`);return t},Z=a=>!C(a),C=a=>{const t=S(a),e=t.day(),r=t.format("YYYY-MM-DD");return!!(V[r]||e>=1&&e<=5&&!j[r])},pt=a=>(a=S(a),!!Yt[a.format("YYYY-MM-DD")]),vt=a=>{a=S(a);const t=a.format("YYYY-MM-DD");if(V[t])return{date:t,work:!0,name:V[t]};if(j[t])return{date:t,work:!1,name:j[t]};{const e=a.day();return{date:t,work:e!==0&&e!==6,name:a.format("dddd")}}},Mt=(a,t,e=!0)=>(a=S(a),t=S(t),e?H(a,t).filter(Z).map(r=>r.format("YYYY-MM-DD")):H(a,t).filter(r=>j[r.format("YYYY-MM-DD")]).map(r=>r.format("YYYY-MM-DD"))),bt=(a,t,e=!0)=>(a=S(a),t=S(t),e?H(a,t).filter(C).map(r=>r.format("YYYY-MM-DD")):H(a,t).filter(r=>C(r)&&r.day()>=1&&r.day()<=5).map(r=>r.format("YYYY-MM-DD"))),kt=(a=0,t=f())=>{if(t=k(t),a===0){if(C(t))return t.format("YYYY-MM-DD");a=1}const e=a>0?1:-1;let r=Math.abs(a);for(;r>0;)t=t.add(e,"day"),C(t)&&r--;return t.format("YYYY-MM-DD")},St=Object.freeze(Object.defineProperty({__proto__:null,findWorkday:kt,getDayDetail:vt,getHolidaysInRange:Mt,getWorkdaysInRange:bt,isHoliday:Z,isInLieu:pt,isWorkday:C},Symbol.toStringTag,{value:"Module"})),Tt={the_beginning_of_spring:[4.6295,3.87],rain_water:[19.4599,18.73],the_waking_of_insects:[6.3926,5.63],the_spring_equinox:[21.4155,20.646],pure_brightness:[5.59,4.81],grain_rain:[20.888,20.1],the_beginning_of_summer:[6.318,5.52],lesser_fullness_of_grain:[21.86,21.04],grain_in_beard:[6.5,5.678],the_summer_solstice:[22.2,21.37],lesser_heat:[7.928,7.108],greater_heat:[23.65,22.83],the_beginning_of_autumn:[28.35,7.5],the_end_of_heat:[23.95,23.13],white_dew:[8.44,7.646],the_autumn_equinox:[23.822,23.042],code_dew:[9.098,8.318],frost_descent:[24.218,23.438],the_beginning_of_winter:[8.218,7.438],lesser_snow:[23.08,22.36],greater_snow:[7.9,7.18],the_winter_solstice:[22.6,21.94],lesser_cold:[6.11,5.4055],greater_cold:[20.84,20.12]},tt={1:["lesser_cold","greater_cold"],2:["the_beginning_of_spring","rain_water"],3:["the_waking_of_insects","the_spring_equinox"],4:["pure_brightness","grain_rain"],5:["the_beginning_of_summer","lesser_fullness_of_grain"],6:["grain_in_beard","the_summer_solstice"],7:["lesser_heat","greater_heat"],8:["the_beginning_of_autumn","the_end_of_heat"],9:["white_dew","the_autumn_equinox"],10:["code_dew","frost_descent"],11:["the_beginning_of_winter","lesser_snow"],12:["greater_snow","the_winter_solstice"]},Ft={"2026_rain_water":-1,"2084_the_spring_equinox":1,"1911_the_beginning_of_summer":1,"2008_lesser_fullness_of_grain":1,"1902_grain_in_beard":1,"1928_the_summer_solstice":1,"1925_lesser_heat":1,"2016_lesser_heat":1,"1922_greater_heat":1,"2002_the_beginning_of_autumn":1,"1927_white_dew":1,"1942_the_autumn_equinox":1,"2089_frost_descent":1,"2089_the_beginning_of_winter":1,"1978_lesser_snow":1,"1954_greater_snow":1,"1918_the_winter_solstice":-1,"2021_the_winter_solstice":-1,"1982_lesser_cold":1,"2019_lesser_cold":-1,"2000_greater_cold":1,"2082_greater_cold":1},et={lesser_cold:"小寒",greater_cold:"大寒",the_beginning_of_spring:"立春",rain_water:"雨水",the_waking_of_insects:"惊蛰",the_spring_equinox:"春分",pure_brightness:"清明",grain_rain:"谷雨",the_beginning_of_summer:"立夏",lesser_fullness_of_grain:"小满",grain_in_beard:"芒种",the_summer_solstice:"夏至",lesser_heat:"小暑",greater_heat:"大暑",the_beginning_of_autumn:"立秋",the_end_of_heat:"处暑",white_dew:"白露",the_autumn_equinox:"秋分",code_dew:"寒露",frost_descent:"霜降",the_beginning_of_winter:"立冬",lesser_snow:"小雪",greater_snow:"大雪",the_winter_solstice:"冬至"},A=(a,t,e)=>{const r=a>=2e3?21:20,n=a%100,u=.2422,o=Tt[e][r===21?1:0];let l=Math.floor(n/4);["lesser_cold","greater_cold","the_beginning_of_spring","rain_water"].includes(e)&&(l=Math.floor((n-1)/4));let s=Math.floor(n*u+o)-l;const D=Ft[`${a}_${e}`];return D&&(s+=D),f(`${a}-${t}-${s}`).format("YYYY-MM-DD")},Lt=(a,t)=>{const e=[];let r=k(a);const n=k(t||a);for(;r.isBefore(n)||r.isSame(n);){const u=r.year(),o=r.month()+1;tt[o].forEach(l=>{const s=f(A(u,o,l));(s!=null&&s.isBefore(n)||s!=null&&s.isSame(n))&&(s!=null&&s.isAfter(r)||s!=null&&s.isSame(r))&&e.push({date:s.format("YYYY-MM-DD"),term:l,name:et[l],index:1})}),o===12?r=r.add(1,"year").startOf("year"):r=r.add(1,"month").startOf("month")}return e},Nt=(a,t)=>{let e=k(a).subtract(1,"month");const r=k(t||a).add(1,"month"),n=[];for(;e.isBefore(r)||e.isSame(r);){const o=e.year(),l=e.month()+1;tt[l].forEach(s=>{const D=f(A(o,l,s));n.push({term:s,date:D})}),e.month()===11?e=e.add(1,"year").startOf("year"):e=e.add(1,"month").startOf("month")}const u=[];return n.forEach((o,l)=>{for(let s=o.date;n[l+1]&&s.isBefore(n[l+1].date);s=s.add(1,"day"))u.push({day:s,term:o.term,name:et[o.term],index:s.diff(o.date,"day")+1})}),t||(t=a),u.filter(o=>o.day.isBetween(a,t,"day")).map(o=>({date:o.day.format("YYYY-MM-DD"),term:o.term,name:o.name,index:o.index}))},Ct=Object.freeze(Object.defineProperty({__proto__:null,getSolarTermDate:A,getSolarTerms:Lt,getSolarTermsInRange:Nt},Symbol.toStringTag,{value:"Module"})),z=[19416,19168,42352,21717,53856,55632,91476,22176,39632,21970,19168,42422,42192,53840,119381,46400,54944,44450,38320,84343,18800,42160,46261,27216,27968,109396,11104,38256,21234,18800,25958,54432,59984,28309,23248,11104,100067,37600,116951,51536,54432,120998,46416,22176,107956,9680,37584,53938,43344,46423,27808,46416,86869,19872,42416,83315,21168,43432,59728,27296,44710,43856,19296,43748,42352,21088,62051,55632,23383,22176,38608,19925,19152,42192,54484,53840,54616,46400,46752,103846,38320,18864,43380,42160,45690,27216,27968,44870,43872,38256,19189,18800,25776,29859,59984,27480,21952,43872,38613,37600,51552,55636,54432,55888,30034,22176,43959,9680,37584,51893,43344,46240,47780,44368,21977,19360,42416,86390,21168,43312,31060,27296,44368,23378,19296,42726,42208,53856,60005,54576,23200,30371,38608,19195,19152,42192,118966,53840,54560,56645,46496,22224,21938,18864,42359,42160,43600,111189,27936,44448,84835,37744,18936,18800,25776,92326,59984,27424,108228,43744,41696,53987,51552,54615,54432,55888,23893,22176,42704,21972,21200,43448,43344,46240,46758,44368,21920,43940,42416,21168,45683,26928,29495,27296,44368,84821,19296,42352,21732,53600,59752,54560,55968,92838,22224,19168,43476,41680,53584,62034,54560],at=["零","一","二","三","四","五","六","七","八","九"],Ot=["正","二","三","四","五","六","七","八","九","十","冬","腊"],$t=["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"],xt=["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],It=["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"],rt=a=>{let t=348;for(let e=32768;e>8;e>>=1)t+=z[a-1900]&e?1:0;return t+P(a)},R=a=>z[a-1900]&15,P=a=>R(a)?z[a-1900]&65536?30:29:0,E=a=>$t[a%10]+xt[a%12],q=(a,t)=>z[a-1900]&65536>>t?30:29,Bt=a=>It[(a-4)%12],Ht=a=>{const t=["初","十","廿","三十"];if(a===10)return"初十";if(a===20)return"二十";if(a===30)return"三十";const e=Math.floor(a/10),r=a%10;return t[e]+(r?at[r]:"")},U=a=>{const t=new Array(7).fill(0);let e=0,r=0;const n=f(new Date(1900,0,31)),u=f(a);let o=u.diff(n,"day");t[5]=o+40,t[4]=14;let l=1900;for(;l<2100&&o>0;l++)e=rt(l),o-=e,t[4]+=12;o<0&&(o+=e,l--,t[4]-=12),t[0]=l,t[3]=l-1864,r=R(l),t[6]=0;for(let s=1;s<13&&o>=0;s++)r>0&&s===r+1&&t[6]===0?(--s,t[6]=1,e=P(l)):e=q(l,s),t[6]===1&&s===r+1&&(t[6]=0),o-=e,t[6]===0&&t[4]++,t[1]=s;return o===0&&r>0&&t[6]===1?t[6]=0:o<0&&(o+=e,t[1]--,t[4]--),t[2]=o+1,{date:u.format("YYYY-MM-DD"),lunarYear:t[0],lunarMon:t[1]+1,lunarDay:t[2],isLeap:!!t[6],zodiac:Bt(t[0]),yearCyl:E(t[3]),monCyl:E(t[4]),dayCyl:E(t[5]),lunarYearCN:`${t[0].toString().split("").map(s=>at[Number(s)]).join("")}`,lunarMonCN:`${Ot[t[1]]}月`,lunarDayCN:Ht(t[2])}},ot=(a,t)=>{const e=f(a),r=f(t),n=[];for(let u=e;u.isBefore(r)||u.isSame(r,"day");u=u.add(1,"day"))n.push(U(u));return n},st=a=>{const t=f(a),e=t.year(),r=t.month()+1,n=t.date();let u=0;for(let v=1900;vu.lang==="zh"?["日","一","二","三","四","五","六"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),$=["January","February","March","April","May","June","July","August","September","October","November","December"],v=W(()=>{const y=s.value,d=l.value,M=new Date(y,d,1),b=new Date(y,d+1,0),i=[];let _=M.getDay()-u.startOfWeek;_<0&&(_+=7);for(let m=_;m>0;m--)i.push(new Date(y,d,-m+1));for(let m=1;m<=b.getDate();m++)i.push(new Date(y,d,m));let F=b.getDay()-u.startOfWeek;F<0&&(F+=7);for(let m=1;m<7-F;m++)i.push(new Date(y,d+1,m));return i});function nt(){l.value===0?(l.value=11,s.value--):l.value--}function it(){l.value===11?(l.value=0,s.value++):l.value++}function lt(y){const d=new Date;return y.getDate()===d.getDate()&&y.getMonth()===d.getMonth()&&y.getFullYear()===d.getFullYear()}function J(y){const d=t(y),M=d.name.split(",")[1];return{disable:l.value!==y.getMonth(),isToday:lt(y),isInLieu:n(y),solarTerm:r(y)[0],...e(y),...d,holidayName:M,date:y}}const g=x(J(new Date));function dt(y){g.value=y}function ut(y){var d,M,b;return y.getDate()===((d=g.value)==null?void 0:d.date.getDate())&&y.getMonth()===((M=g.value)==null?void 0:M.date.getMonth())&&y.getFullYear()===((b=g.value)==null?void 0:b.date.getFullYear())}const G=W(()=>v.value.map(y=>J(y)));return(y,d)=>{var M,b;return Y(),p(T,null,[h("div",Et,[h("header",Vt,[h("button",{onClick:nt},d[4]||(d[4]=[h("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},[h("path",{d:"M684.29 799.276L393.929 513.019 684.29 226.762c37.685-37.153 38.003-97.625 0.707-134.384-37.297-36.758-98.646-36.435-136.331 0.718l-357.43 352.378c-0.155 0.153-0.297 0.314-0.451 0.468-0.084 0.082-0.172 0.157-0.256 0.239-18.357 18.092-27.581 41.929-27.743 65.902-0.004 0.311-0.017 0.623-0.018 0.934 0.001 0.316 0.014 0.632 0.018 0.948 0.165 23.97 9.389 47.803 27.743 65.892 0.083 0.082 0.171 0.157 0.255 0.239 0.154 0.154 0.296 0.315 0.452 0.468l357.43 352.378c37.685 37.153 99.034 37.476 136.331 0.718 37.297-36.758 36.979-97.231-0.707-134.384z",fill:"currentColor"})],-1)])),y.lang==="zh"?(Y(),p("h2",qt,[I(h("select",{"onUpdate:modelValue":d[0]||(d[0]=i=>s.value=i),style:{width:"130px"}},[(Y(),p(T,null,L(201,(i,_)=>h("option",{key:_,value:1900+_},w(1900+_),9,At)),64))],512),[[B,s.value]]),d[5]||(d[5]=O(" 年 ")),I(h("select",{"onUpdate:modelValue":d[1]||(d[1]=i=>l.value=i)},[(Y(),p(T,null,L(12,(i,_)=>h("option",{key:_,value:_},w(i<10?`0${i}`:i),9,Rt)),64))],512),[[B,l.value]]),d[6]||(d[6]=O(" 月 "))])):(Y(),p("h2",Pt,[I(h("select",{"onUpdate:modelValue":d[2]||(d[2]=i=>l.value=i),style:{width:"160px"}},[(Y(),p(T,null,L(12,(i,_)=>h("option",{key:_,value:_},w($[i-1]),9,Ut)),64))],512),[[B,l.value]]),I(h("select",{"onUpdate:modelValue":d[3]||(d[3]=i=>s.value=i)},[(Y(),p(T,null,L(201,(i,_)=>h("option",{key:_,value:1900+_},w(1900+_),9,Jt)),64))],512),[[B,s.value]])])),h("button",{onClick:it},d[7]||(d[7]=[h("svg",{class:"r",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},[h("path",{d:"M684.29 799.276L393.929 513.019 684.29 226.762c37.685-37.153 38.003-97.625 0.707-134.384-37.297-36.758-98.646-36.435-136.331 0.718l-357.43 352.378c-0.155 0.153-0.297 0.314-0.451 0.468-0.084 0.082-0.172 0.157-0.256 0.239-18.357 18.092-27.581 41.929-27.743 65.902-0.004 0.311-0.017 0.623-0.018 0.934 0.001 0.316 0.014 0.632 0.018 0.948 0.165 23.97 9.389 47.803 27.743 65.892 0.083 0.082 0.171 0.157 0.255 0.239 0.154 0.154 0.296 0.315 0.452 0.468l357.43 352.378c37.685 37.153 99.034 37.476 136.331 0.718 37.297-36.758 36.979-97.231-0.707-134.384z",fill:"currentColor"})],-1)]))]),h("div",Gt,[(Y(),p(T,null,L(7,(i,_)=>h("div",{key:i,class:"calendar-day"},w(D.value[G.value[_].date.getDay()]),1)),64)),(Y(!0),p(T,null,L(G.value,(i,_)=>{var F,m,K;return Y(),p("div",{key:_,class:yt(["calendar-cell",{today:i.isToday,disable:i.disable,holiday:i.holidayName,inlieu:i.isInLieu,work:i.holidayName&&i.work,solar:((F=i.solarTerm)==null?void 0:F.index)===1,selected:ut(i.date)}]),onClick:se=>dt(i)},[i.isToday?(Y(),p("span",Qt,w(y.lang==="en"?"Today":"今"),1)):Q("",!0),i.holidayName?(Y(),p("span",Xt,w(i.work?"班":i.isInLieu?"调":"休"),1)):Q("",!0),h("span",Zt,w(i.date.getDate()),1),h("span",te,w(((m=i.solarTerm)==null?void 0:m.index)===1?(K=i.solarTerm)==null?void 0:K.name:i.holidayName||i.lunarDayCN),1)],10,Kt)}),128))])]),h("div",ee,[h("div",ae,[h("p",null,w(g.value.lunarYearCN)+" "+w(g.value.lunarMonCN)+w(g.value.lunarDayCN),1),h("p",null,w(g.value.yearCyl)+w(g.value.zodiac)+"年 "+w(g.value.monCyl)+"月 "+w(g.value.dayCyl)+"日 ",1)]),h("div",re,[h("p",null,[O(w(g.value.isToday?"今天是":"此日是")+" ",1),h("span",null,w((M=g.value.solarTerm)==null?void 0:M.name),1),d[8]||(d[8]=O(" 节气的第 ")),h("span",null,w((b=g.value.solarTerm)==null?void 0:b.index),1),d[9]||(d[9]=O(" 天。 "))]),h("p",null,w(g.value.work?"又是需要工作的一天!😥":g.value.isInLieu?"虽然调休,但要补班还回来的!🤬":"休息啦~😃"),1)])])],64)}}}),ie=_t(oe,[["__scopeId","data-v-d47dfab8"]]);export{ie as C};