import*as C from"./constant";import en from"./locale/en";import U from"./utils";var L="en",Ls={};Ls[L]=en;var IS_DAYJS="$isDayjsObject",isDayjs=function(t){return t instanceof Dayjs||!(!t||!t[IS_DAYJS])},parseLocale=function t(e,s,r){var n;if(!e)return L;if("string"==typeof e){var i=e.toLowerCase();Ls[i]&&(n=i),s&&(Ls[i]=s,n=i);var a=e.split("-");if(!n&&a.length>1)return t(a[0])}else{var u=e.name;Ls[u]=e,n=u}return!r&&n&&(L=n),n||!r&&L},dayjs=function(t,e){if(isDayjs(t))return t.clone();var s="object"==typeof e?e:{};return s.date=t,s.args=arguments,new Dayjs(s)},wrapper=function(t,e){return dayjs(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})},Utils=U;Utils.l=parseLocale,Utils.i=isDayjs,Utils.w=wrapper;var parseDate=function(t){var e=t.date,s=t.utc;if(null===e)return new Date(NaN);if(Utils.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(C.REGEX_PARSE);if(r){var n=r[2]-1||0,i=(r[7]||"0").substring(0,3);return s?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)},Dayjs=function(){function t(t){this.$L=parseLocale(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[IS_DAYJS]=!0}var e=t.prototype;return e.parse=function(t){this.$d=parseDate(t),this.init()},e.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},e.$utils=function(){return Utils},e.isValid=function(){return!(this.$d.toString()===C.INVALID_DATE_STRING)},e.isSame=function(t,e){var s=dayjs(t);return this.startOf(e)<=s&&s<=this.endOf(e)},e.isAfter=function(t,e){return dayjs(t)