dayjs-9ee440cb.js 15 KB

12
  1. var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r={exports:{}};r.exports=function(){var t=1e3,e=6e4,r=36e5,n="millisecond",s="second",i="minute",a="hour",o="day",u="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},p=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},y={s:p,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),s=r%60;return(e<=0?"+":"-")+p(n,2,"0")+":"+p(s,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var n=12*(r.year()-e.year())+(r.month()-e.month()),s=e.clone().add(n,c),i=r-s<0,a=e.clone().add(n+(i?-1:1),c);return+(-(n+(r-s)/(i?s-a:a-s))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:u,d:o,D:d,h:a,m:i,s:s,ms:n,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},w="en",v={};v[w]=M;var D="$isDayjsObject",g=function(t){return t instanceof x||!(!t||!t[D])},S=function t(e,r,n){var s;if(!e)return w;if("string"==typeof e){var i=e.toLowerCase();v[i]&&(s=i),r&&(v[i]=r,s=i);var a=e.split("-");if(!s&&a.length>1)return t(a[0])}else{var o=e.name;v[o]=e,s=o}return!n&&s&&(w=s),s||!n&&w},k=function(t,e){if(g(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new x(r)},Y=y;Y.l=S,Y.i=g,Y.w=function(t,e){return k(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var x=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[D]=!0}var p=M.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(Y.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(m);if(n){var s=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(e)}(t),this.init()},p.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()},p.$utils=function(){return Y},p.isValid=function(){return!(this.$d.toString()===l)},p.isSame=function(t,e){var r=k(t);return this.startOf(e)<=r&&r<=this.endOf(e)},p.isAfter=function(t,e){return k(t)<this.startOf(e)},p.isBefore=function(t,e){return this.endOf(e)<k(t)},p.$g=function(t,e,r){return Y.u(t)?this[e]:this.set(r,t)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(t,e){var r=this,n=!!Y.u(e)||e,f=Y.p(t),l=function(t,e){var s=Y.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return n?s:s.endOf(o)},m=function(t,e){return Y.w(r.toDate()[t].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},$=this.$W,M=this.$M,p=this.$D,y="set"+(this.$u?"UTC":"");switch(f){case h:return n?l(1,0):l(31,11);case c:return n?l(1,M):l(0,M+1);case u:var w=this.$locale().weekStart||0,v=($<w?$+7:$)-w;return l(n?p-v:p+(6-v),M);case o:case d:return m(y+"Hours",0);case a:return m(y+"Minutes",1);case i:return m(y+"Seconds",2);case s:return m(y+"Milliseconds",3);default:return this.clone()}},p.endOf=function(t){return this.startOf(t,!1)},p.$set=function(t,e){var r,u=Y.p(t),f="set"+(this.$u?"UTC":""),l=(r={},r[o]=f+"Date",r[d]=f+"Date",r[c]=f+"Month",r[h]=f+"FullYear",r[a]=f+"Hours",r[i]=f+"Minutes",r[s]=f+"Seconds",r[n]=f+"Milliseconds",r)[u],m=u===o?this.$D+(e-this.$W):e;if(u===c||u===h){var $=this.clone().set(d,1);$.$d[l](m),$.init(),this.$d=$.set(d,Math.min(this.$D,$.daysInMonth())).$d}else l&&this.$d[l](m);return this.init(),this},p.set=function(t,e){return this.clone().$set(t,e)},p.get=function(t){return this[Y.p(t)]()},p.add=function(n,f){var d,l=this;n=Number(n);var m=Y.p(f),$=function(t){var e=k(l);return Y.w(e.date(e.date()+Math.round(t*n)),l)};if(m===c)return this.set(c,this.$M+n);if(m===h)return this.set(h,this.$y+n);if(m===o)return $(1);if(m===u)return $(7);var M=(d={},d[i]=e,d[a]=r,d[s]=t,d)[m]||1,p=this.$d.getTime()+n*M;return Y.w(p,this)},p.subtract=function(t,e){return this.add(-1*t,e)},p.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||l;var n=t||"YYYY-MM-DDTHH:mm:ssZ",s=Y.z(this),i=this.$H,a=this.$m,o=this.$M,u=r.weekdays,c=r.months,f=r.meridiem,h=function(t,r,s,i){return t&&(t[r]||t(e,n))||s[r].slice(0,i)},d=function(t){return Y.s(i%12||12,t,"0")},m=f||function(t,e,r){var n=t<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace($,(function(t,n){return n||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return Y.s(e.$y,4,"0");case"M":return o+1;case"MM":return Y.s(o+1,2,"0");case"MMM":return h(r.monthsShort,o,c,3);case"MMMM":return h(c,o);case"D":return e.$D;case"DD":return Y.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(r.weekdaysMin,e.$W,u,2);case"ddd":return h(r.weekdaysShort,e.$W,u,3);case"dddd":return u[e.$W];case"H":return String(i);case"HH":return Y.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return m(i,a,!0);case"A":return m(i,a,!1);case"m":return String(a);case"mm":return Y.s(a,2,"0");case"s":return String(e.$s);case"ss":return Y.s(e.$s,2,"0");case"SSS":return Y.s(e.$ms,3,"0");case"Z":return s}return null}(t)||s.replace(":","")}))},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(n,d,l){var m,$=this,M=Y.p(d),p=k(n),y=(p.utcOffset()-this.utcOffset())*e,w=this-p,v=function(){return Y.m($,p)};switch(M){case h:m=v()/12;break;case c:m=v();break;case f:m=v()/3;break;case u:m=(w-y)/6048e5;break;case o:m=(w-y)/864e5;break;case a:m=w/r;break;case i:m=w/e;break;case s:m=w/t;break;default:m=w}return l?m:Y.a(m)},p.daysInMonth=function(){return this.endOf(c).$D},p.$locale=function(){return v[this.$L]},p.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),n=S(t,e,!0);return n&&(r.$L=n),r},p.clone=function(){return Y.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},M}(),O=x.prototype;return k.prototype=O,[["$ms",n],["$s",s],["$m",i],["$H",a],["$W",o],["$M",c],["$y",h],["$D",d]].forEach((function(t){O[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),k.extend=function(t,e){return t.$i||(t(e,x,k),t.$i=!0),k},k.locale=S,k.isDayjs=g,k.unix=function(t){return k(1e3*t)},k.en=v[w],k.Ls=v,k.p={},k}();const n=e(r.exports);var s={exports:{}};s.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d\d/,n=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,i={},a=function(t){return(t=+t)+(t>68?1900:2e3)},o=function(t){return function(e){this[t]=+e}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),r=60*e[1]+(+e[2]||0);return 0===r?0:"+"===e[0]?-r:r}(t)}],c=function(t){var e=i[t];return e&&(e.indexOf?e:e.s.concat(e.f))},f=function(t,e){var r,n=i.meridiem;if(n){for(var s=1;s<=24;s+=1)if(t.indexOf(n(s,0,e))>-1){r=s>12;break}}else r=t===(e?"pm":"PM");return r},h={A:[s,function(t){this.afternoon=f(t,!1)}],a:[s,function(t){this.afternoon=f(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[r,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[n,o("seconds")],ss:[n,o("seconds")],m:[n,o("minutes")],mm:[n,o("minutes")],H:[n,o("hours")],h:[n,o("hours")],HH:[n,o("hours")],hh:[n,o("hours")],D:[n,o("day")],DD:[r,o("day")],Do:[s,function(t){var e=i.ordinal,r=t.match(/\d+/);if(this.day=r[0],e)for(var n=1;n<=31;n+=1)e(n).replace(/\[|\]/g,"")===t&&(this.day=n)}],M:[n,o("month")],MM:[r,o("month")],MMM:[s,function(t){var e=c("months"),r=(c("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(r<1)throw new Error;this.month=r%12||r}],MMMM:[s,function(t){var e=c("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,o("year")],YY:[r,function(t){this.year=a(t)}],YYYY:[/\d{4}/,o("year")],Z:u,ZZ:u};function d(r){var n,s;n=r,s=i&&i.formats;for(var a=(r=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,r,n){var i=n&&n.toUpperCase();return r||s[n]||t[n]||s[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,r){return e||r.slice(1)}))}))).match(e),o=a.length,u=0;u<o;u+=1){var c=a[u],f=h[c],d=f&&f[0],l=f&&f[1];a[u]=l?{regex:d,parser:l}:c.replace(/^\[|\]$/g,"")}return function(t){for(var e={},r=0,n=0;r<o;r+=1){var s=a[r];if("string"==typeof s)n+=s.length;else{var i=s.regex,u=s.parser,c=t.slice(n),f=i.exec(c)[0];u.call(e,f),t=t.replace(f,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var r=t.hours;e?r<12&&(t.hours+=12):12===r&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,r){r.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(a=t.parseTwoDigitYear);var n=e.prototype,s=n.parse;n.parse=function(t){var e=t.date,n=t.utc,a=t.args;this.$u=n;var o=a[1];if("string"==typeof o){var u=!0===a[2],c=!0===a[3],f=u||c,h=a[2];c&&(h=a[2]),i=this.$locale(),!u&&h&&(i=r.Ls[h]),this.$d=function(t,e,r){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var n=d(e)(t),s=n.year,i=n.month,a=n.day,o=n.hours,u=n.minutes,c=n.seconds,f=n.milliseconds,h=n.zone,l=new Date,m=a||(s||i?1:l.getDate()),$=s||l.getFullYear(),M=0;s&&!i||(M=i>0?i-1:l.getMonth());var p=o||0,y=u||0,w=c||0,v=f||0;return h?new Date(Date.UTC($,M,m,p,y,w,v+60*h.offset*1e3)):r?new Date(Date.UTC($,M,m,p,y,w,v)):new Date($,M,m,p,y,w,v)}catch(D){return new Date("")}}(e,o,n),this.init(),h&&!0!==h&&(this.$L=this.locale(h).$L),f&&e!=this.format(o)&&(this.$d=new Date("")),i={}}else if(o instanceof Array)for(var l=o.length,m=1;m<=l;m+=1){a[1]=o[m-1];var $=r.apply(this,a);if($.isValid()){this.$d=$.$d,this.$L=$.$L,this.init();break}m===l&&(this.$d=new Date(""))}else s.call(this,t)}}}();const i=e(s.exports);var a={exports:{}};a.exports=function(t,e,r){var n=e.prototype,s=function(t){return t&&(t.indexOf?t:t.s)},i=function(t,e,r,n,i){var a=t.name?t:t.$locale(),o=s(a[e]),u=s(a[r]),c=o||u.map((function(t){return t.slice(0,n)}));if(!i)return c;var f=a.weekStart;return c.map((function(t,e){return c[(e+(f||0))%7]}))},a=function(){return r.Ls[r.locale()]},o=function(t,e){return t.formats[e]||t.formats[e.toUpperCase()].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,r){return e||r.slice(1)}))},u=function(){var t=this;return{months:function(e){return e?e.format("MMMM"):i(t,"months")},monthsShort:function(e){return e?e.format("MMM"):i(t,"monthsShort","months",3)},firstDayOfWeek:function(){return t.$locale().weekStart||0},weekdays:function(e){return e?e.format("dddd"):i(t,"weekdays")},weekdaysMin:function(e){return e?e.format("dd"):i(t,"weekdaysMin","weekdays",2)},weekdaysShort:function(e){return e?e.format("ddd"):i(t,"weekdaysShort","weekdays",3)},longDateFormat:function(e){return o(t.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};n.localeData=function(){return u.bind(this)()},r.localeData=function(){var t=a();return{firstDayOfWeek:function(){return t.weekStart||0},weekdays:function(){return r.weekdays()},weekdaysShort:function(){return r.weekdaysShort()},weekdaysMin:function(){return r.weekdaysMin()},months:function(){return r.months()},monthsShort:function(){return r.monthsShort()},longDateFormat:function(e){return o(t,e)},meridiem:t.meridiem,ordinal:t.ordinal}},r.months=function(){return i(a(),"months")},r.monthsShort=function(){return i(a(),"monthsShort","months",3)},r.weekdays=function(t){return i(a(),"weekdays",null,null,t)},r.weekdaysShort=function(t){return i(a(),"weekdaysShort","weekdays",3,t)},r.weekdaysMin=function(t){return i(a(),"weekdaysMin","weekdays",2,t)}};const o=e(a.exports);var u={exports:{}};u.exports=function(t,e){var r=e.prototype,n=r.format;r.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return n.bind(this)(t);var s=this.$utils(),i=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return r.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return r.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}}));return n.bind(this)(i)}};const c=e(u.exports);var f,h,d={exports:{}};const l=e(d.exports=(f="week",h="year",function(t,e,r){var n=e.prototype;n.week=function(t){if(void 0===t&&(t=null),null!==t)return this.add(7*(t-this.week()),"day");var e=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var n=r(this).startOf(h).add(1,h).date(e),s=r(this).endOf(f);if(n.isBefore(s))return 1}var i=r(this).startOf(h).date(e).startOf(f).subtract(1,"millisecond"),a=this.diff(i,f,!0);return a<0?r(this).startOf("week").week():Math.ceil(a)},n.weeks=function(t){return void 0===t&&(t=null),this.week(t)}}));var m={exports:{}};m.exports=function(t,e){e.prototype.weekYear=function(){var t=this.month(),e=this.week(),r=this.year();return 1===e&&11===t?r+1:0===t&&e>=52?r-1:r}};const $=e(m.exports);var M={exports:{}};M.exports=function(t,e,r){e.prototype.dayOfYear=function(t){var e=Math.round((r(this).startOf("day")-r(this).startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"day")}};const p=e(M.exports);var y={exports:{}};y.exports=function(t,e){e.prototype.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)}};const w=e(y.exports);var v={exports:{}};const D=e(v.exports=function(t,e){e.prototype.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)}});export{c as a,$ as b,i as c,n as d,p as e,D as f,e as g,t as h,w as i,o as l,l as w};