function W(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}function y(n){return(e,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let a;if(r==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,o=t!=null&&t.width?String(t.width):i;a=n.formattingValues[o]||n.formattingValues[i]}else{const i=n.defaultWidth,o=t!=null&&t.width?String(t.width):n.defaultWidth;a=n.values[o]||n.values[i]}const s=n.argumentCallback?n.argumentCallback(e):e;return a[s]}}function b(n){return(e,t={})=>{const r=t.width,a=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],s=e.match(a);if(!s)return null;const i=s[0],o=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],c=Array.isArray(o)?re(o,w=>w.test(i)):ne(o,w=>w.test(i));let f;f=n.valueCallback?n.valueCallback(c):c,f=t.valueCallback?t.valueCallback(f):f;const h=e.slice(i.length);return{value:f,rest:h}}}function ne(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function re(n,e){for(let t=0;t{const r=e.match(n.matchPattern);if(!r)return null;const a=r[0],s=e.match(n.parsePattern);if(!s)return null;let i=n.valueCallback?n.valueCallback(s[0]):s[0];i=t.valueCallback?t.valueCallback(i):i;const o=e.slice(a.length);return{value:i,rest:o}}}const J=6048e5,ae=864e5,Q=Symbol.for("constructDateFrom");function l(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&Q in n?n[Q](e):n instanceof Date?new n.constructor(e):new Date(e)}function x(n,...e){const t=l.bind(null,e.find(r=>typeof r=="object"));return e.map(t)}let se={};function E(){return se}function d(n,e){return l(e||n,n)}function N(n,e){var o,c,f,h;const t=E(),r=(e==null?void 0:e.weekStartsOn)??((c=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((h=(f=t.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=d(n,e==null?void 0:e.in),s=a.getDay(),i=(s{let r;const a=ie[n];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r},ce={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ue=(n,e,t,r)=>ce[n],de={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},fe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},le={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},he={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},me={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ge={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},we=(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},ye={ordinalNumber:we,era:y({values:de,defaultWidth:"wide"}),quarter:y({values:fe,defaultWidth:"wide",argumentCallback:n=>n-1}),month:y({values:le,defaultWidth:"wide"}),day:y({values:he,defaultWidth:"wide"}),dayPeriod:y({values:me,defaultWidth:"wide",formattingValues:ge,defaultFormattingWidth:"wide"})},be=/^(\d+)(th|st|nd|rd)?/i,Me=/\d+/i,De={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Oe={any:[/^b/i,/^(a|c)/i]},Pe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Se={any:[/1/i,/2/i,/3/i,/4/i]},Te={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ve={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ke={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},We={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},xe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ye={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ce={ordinalNumber:R({matchPattern:be,parsePattern:Me,valueCallback:n=>parseInt(n,10)}),era:b({matchPatterns:De,defaultMatchWidth:"wide",parsePatterns:Oe,defaultParseWidth:"any"}),quarter:b({matchPatterns:Pe,defaultMatchWidth:"wide",parsePatterns:Se,defaultParseWidth:"any",valueCallback:n=>n+1}),month:b({matchPatterns:Te,defaultMatchWidth:"wide",parsePatterns:ve,defaultParseWidth:"any"}),day:b({matchPatterns:ke,defaultMatchWidth:"wide",parsePatterns:We,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:xe,defaultMatchWidth:"any",parsePatterns:Ye,defaultParseWidth:"any"})},Fe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ne={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ee={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$e={date:W({formats:Fe,defaultWidth:"full"}),time:W({formats:Ne,defaultWidth:"full"}),dateTime:W({formats:Ee,defaultWidth:"full"})},He={code:"en-US",formatDistance:oe,formatLong:$e,formatRelative:ue,localize:ye,match:Ce,options:{weekStartsOn:0,firstWeekContainsDate:1}},qe={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},Ue=(n,e,t)=>{let r;const a=qe[n];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?r+" 후":r+" 전":r},_e={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},Le={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Xe={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Qe={date:W({formats:_e,defaultWidth:"full"}),time:W({formats:Le,defaultWidth:"full"}),dateTime:W({formats:Xe,defaultWidth:"full"})},Ie={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},je=(n,e,t,r)=>Ie[n],ze={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},Be={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},Ve={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},Ae={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},Ge={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},Re={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},Je=(n,e)=>{const t=Number(n);switch(String(e==null?void 0:e.unit)){case"minute":case"second":return String(t);case"date":return t+"일";default:return t+"번째"}},Ze={ordinalNumber:Je,era:y({values:ze,defaultWidth:"wide"}),quarter:y({values:Be,defaultWidth:"wide",argumentCallback:n=>n-1}),month:y({values:Ve,defaultWidth:"wide"}),day:y({values:Ae,defaultWidth:"wide"}),dayPeriod:y({values:Ge,defaultWidth:"wide",formattingValues:Re,defaultFormattingWidth:"wide"})},Ke=/^(\d+)(일|번째)?/i,pe=/\d+/i,et={narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},tt={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},nt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},rt={any:[/1/i,/2/i,/3/i,/4/i]},at={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},st={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},it={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},ot={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},ct={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},ut={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},dt={ordinalNumber:R({matchPattern:Ke,parsePattern:pe,valueCallback:n=>parseInt(n,10)}),era:b({matchPatterns:et,defaultMatchWidth:"wide",parsePatterns:tt,defaultParseWidth:"any"}),quarter:b({matchPatterns:nt,defaultMatchWidth:"wide",parsePatterns:rt,defaultParseWidth:"any",valueCallback:n=>n+1}),month:b({matchPatterns:at,defaultMatchWidth:"wide",parsePatterns:st,defaultParseWidth:"any"}),day:b({matchPatterns:it,defaultMatchWidth:"wide",parsePatterns:ot,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:ct,defaultMatchWidth:"any",parsePatterns:ut,defaultParseWidth:"any"})},It={code:"ko",formatDistance:Ue,formatLong:Qe,formatRelative:je,localize:Ze,match:dt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ft(n,e,t="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:n,timeZoneName:t}).format(e).split(/\s/g).slice(2).join(" ")}const L={},C={};function v(n,e){try{const r=(L[n]||(L[n]=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"longOffset"}).format))(e).split("GMT")[1];return r in C?C[r]:I(r,r.split(":"))}catch{if(n in C)return C[n];const t=n==null?void 0:n.match(lt);return t?I(n,t.slice(1)):NaN}}const lt=/([+-]\d\d):?(\d\d)?/;function I(n,e){const t=+(e[0]||0),r=+(e[1]||0),a=+(e[2]||0)/60;return C[n]=t*60+r>0?t*60+r+a:t*60-r-a}class M extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]=="string"&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(v(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]=="number"&&(e.length===1||e.length===2&&typeof e[1]!="number")?this.setTime(e[0]):typeof e[0]=="string"?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),Z(this),X(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new M(...t,e):new M(Date.now(),e)}withTimeZone(e){return new M(+this,e)}getTimezoneOffset(){const e=-v(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),X(this),+this}[Symbol.for("constructDateFrom")](e){return new M(+new Date(e),this.timeZone)}}const j=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(n=>{if(!j.test(n))return;const e=n.replace(j,"$1UTC");M.prototype[e]&&(n.startsWith("get")?M.prototype[n]=function(){return this.internal[e]()}:(M.prototype[n]=function(){return Date.prototype[e].apply(this.internal,arguments),ht(this),+this},M.prototype[e]=function(){return Date.prototype[e].apply(this,arguments),X(this),+this}))});function X(n){n.internal.setTime(+n),n.internal.setUTCSeconds(n.internal.getUTCSeconds()-Math.round(-v(n.timeZone,n)*60))}function ht(n){Date.prototype.setFullYear.call(n,n.internal.getUTCFullYear(),n.internal.getUTCMonth(),n.internal.getUTCDate()),Date.prototype.setHours.call(n,n.internal.getUTCHours(),n.internal.getUTCMinutes(),n.internal.getUTCSeconds(),n.internal.getUTCMilliseconds()),Z(n)}function Z(n){const e=v(n.timeZone,n),t=e>0?Math.floor(e):Math.ceil(e),r=new Date(+n);r.setUTCHours(r.getUTCHours()-1);const a=-new Date(+n).getTimezoneOffset(),s=-new Date(+r).getTimezoneOffset(),i=a-s,o=Date.prototype.getHours.apply(n)!==n.internal.getUTCHours();i&&o&&n.internal.setUTCMinutes(n.internal.getUTCMinutes()+i);const c=a-t;c&&Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+c);const f=new Date(+n);f.setUTCSeconds(0);const h=a>0?f.getSeconds():(f.getSeconds()-60)%60,w=Math.round(-(v(n.timeZone,n)*60))%60;(w||h)&&(n.internal.setUTCSeconds(n.internal.getUTCSeconds()+w),Date.prototype.setUTCSeconds.call(n,Date.prototype.getUTCSeconds.call(n)+w+h));const D=v(n.timeZone,n),O=D>0?Math.floor(D):Math.ceil(D),$=-new Date(+n).getTimezoneOffset()-O,H=O!==t,Y=$-c;if(H&&Y){Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+Y);const m=v(n.timeZone,n),g=m>0?Math.floor(m):Math.ceil(m),S=O-g;S&&(n.internal.setUTCMinutes(n.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+S))}}class F extends M{static tz(e,...t){return t.length?new F(...t,e):new F(Date.now(),e)}toISOString(){const[e,t,r]=this.tzComponents(),a=`${e}${t}:${r}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,r,a]=this.internal.toUTCString().split(" ");return`${e==null?void 0:e.slice(0,-1)} ${r} ${t} ${a}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,r,a]=this.tzComponents();return`${e} GMT${t}${r}${a} (${ft(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:(t==null?void 0:t.timeZone)||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:(t==null?void 0:t.timeZone)||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:(t==null?void 0:t.timeZone)||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset(),t=e>0?"-":"+",r=String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),a=String(Math.abs(e)%60).padStart(2,"0");return[t,r,a]}withTimeZone(e){return new F(+this,e)}[Symbol.for("constructDateFrom")](e){return new F(+new Date(e),this.timeZone)}}function mt(n,e,t){const r=d(n,t==null?void 0:t.in);return isNaN(e)?l(n,NaN):(e&&r.setDate(r.getDate()+e),r)}function gt(n,e,t){const r=d(n,t==null?void 0:t.in);if(isNaN(e))return l(n,NaN);if(!e)return r;const a=r.getDate(),s=l(n,r.getTime());s.setMonth(r.getMonth()+e+1,0);const i=s.getDate();return a>=i?s:(r.setFullYear(s.getFullYear(),s.getMonth(),a),r)}function q(n,e){return N(n,{...e,weekStartsOn:1})}function K(n,e){const t=d(n,e==null?void 0:e.in),r=t.getFullYear(),a=l(t,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const s=q(a),i=l(t,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const o=q(i);return t.getTime()>=s.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function z(n){const e=d(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function U(n,e){const t=d(n,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function wt(n,e,t){const[r,a]=x(t==null?void 0:t.in,n,e),s=U(r),i=U(a),o=+s-z(s),c=+i-z(i);return Math.round((o-c)/ae)}function yt(n,e){const t=K(n,e),r=l(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),q(r)}function jt(n,e,t){return mt(n,e*7,t)}function zt(n,e,t){return gt(n,e*12,t)}function Bt(n,e){let t,r=e==null?void 0:e.in;return n.forEach(a=>{!r&&typeof a=="object"&&(r=l.bind(null,a));const s=d(a,r);(!t||t{!r&&typeof a=="object"&&(r=l.bind(null,a));const s=d(a,r);(!t||t>s||isNaN(+s))&&(t=s)}),l(r,t||NaN)}function At(n,e,t){const[r,a]=x(t==null?void 0:t.in,n,e);return+U(r)==+U(a)}function bt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Mt(n){return!(!bt(n)&&typeof n!="number"||isNaN(+d(n)))}function Gt(n,e,t){const[r,a]=x(t==null?void 0:t.in,n,e),s=r.getFullYear()-a.getFullYear(),i=r.getMonth()-a.getMonth();return s*12+i}function Rt(n,e){const t=d(n,e==null?void 0:e.in),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function p(n,e){const[t,r]=x(n,e.start,e.end);return{start:t,end:r}}function Jt(n,e){const{start:t,end:r}=p(e==null?void 0:e.in,n);let a=+t>+r;const s=a?+t:+r,i=a?r:t;i.setHours(0,0,0,0),i.setDate(1);let o=1;const c=[];for(;+i<=s;)c.push(l(t,i)),i.setMonth(i.getMonth()+o);return a?c.reverse():c}function Zt(n,e){const t=d(n,e==null?void 0:e.in);return t.setDate(1),t.setHours(0,0,0,0),t}function Kt(n,e){const t=d(n,e==null?void 0:e.in),r=t.getFullYear();return t.setFullYear(r+1,0,0),t.setHours(23,59,59,999),t}function Dt(n,e){const t=d(n,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function pt(n,e){const{start:t,end:r}=p(e==null?void 0:e.in,n);let a=+t>+r;const s=a?+t:+r,i=a?r:t;i.setHours(0,0,0,0),i.setMonth(0,1);let o=1;const c=[];for(;+i<=s;)c.push(l(t,i)),i.setFullYear(i.getFullYear()+o);return a?c.reverse():c}function Ot(n,e){var o,c,f,h;const t=E(),r=(e==null?void 0:e.weekStartsOn)??((c=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:c.weekStartsOn)??t.weekStartsOn??((h=(f=t.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=d(n,e==null?void 0:e.in),s=a.getDay(),i=(s=+o?r+1:+t>=+f?r:r-1}function Tt(n,e){var o,c,f,h;const t=E(),r=(e==null?void 0:e.firstWeekContainsDate)??((c=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:c.firstWeekContainsDate)??t.firstWeekContainsDate??((h=(f=t.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,a=ee(n,e),s=l((e==null?void 0:e.in)||n,0);return s.setFullYear(a,0,r),s.setHours(0,0,0,0),N(s,e)}function vt(n,e){const t=d(n,e==null?void 0:e.in),r=+N(t,e)-+Tt(t,e);return Math.round(r/J)+1}function u(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const P={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return u(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):u(t+1,2)},d(n,e){return u(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return u(n.getHours()%12||12,e.length)},H(n,e){return u(n.getHours(),e.length)},m(n,e){return u(n.getMinutes(),e.length)},s(n,e){return u(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),a=Math.trunc(r*Math.pow(10,t-3));return u(a,e.length)}},k={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},B={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),a=r>0?r:1-r;return t.ordinalNumber(a,{unit:"year"})}return P.y(n,e)},Y:function(n,e,t,r){const a=ee(n,r),s=a>0?a:1-a;if(e==="YY"){const i=s%100;return u(i,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):u(s,e.length)},R:function(n,e){const t=K(n);return u(t,e.length)},u:function(n,e){const t=n.getFullYear();return u(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return u(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return u(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return P.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return u(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const a=vt(n,r);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):u(a,e.length)},I:function(n,e,t){const r=St(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):u(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):P.d(n,e)},D:function(n,e,t){const r=Pt(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):u(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return u(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return u(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return u(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const a=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let a;switch(r===12?a=k.noon:r===0?a=k.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let a;switch(r>=17?a=k.evening:r>=12?a=k.afternoon:r>=4?a=k.morning:a=k.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return P.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):P.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):u(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):u(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):P.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):P.s(n,e)},S:function(n,e){return P.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return A(r);case"XXXX":case"XX":return T(r);case"XXXXX":case"XXX":default:return T(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return A(r);case"xxxx":case"xx":return T(r);case"xxxxx":case"xxx":default:return T(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+V(r,":");case"OOOO":default:return"GMT"+T(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+V(r,":");case"zzzz":default:return"GMT"+T(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return u(r,e.length)},T:function(n,e,t){return u(+n,e.length)}};function V(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),s=r%60;return s===0?t+String(a):t+String(a)+e+u(s,2)}function A(n,e){return n%60===0?(n>0?"-":"+")+u(Math.abs(n)/60,2):T(n,e)}function T(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),a=u(Math.trunc(r/60),2),s=u(r%60,2);return t+a+e+s}const G=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},te=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},kt=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],a=t[2];if(!a)return G(n,e);let s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",G(r,e)).replace("{{time}}",te(a,e))},Wt={p:te,P:kt},xt=/^D+$/,Yt=/^Y+$/,Ct=["D","DD","YY","YYYY"];function Ft(n){return xt.test(n)}function Nt(n){return Yt.test(n)}function Et(n,e,t){const r=$t(n,e,t);if(Ct.includes(n))throw new RangeError(r)}function $t(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ht=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ut=/^'([^]*?)'?$/,_t=/''/g,Lt=/[a-zA-Z]/;function tn(n,e,t){var h,w,D,O,_,$,H,Y;const r=E(),a=(t==null?void 0:t.locale)??r.locale??He,s=(t==null?void 0:t.firstWeekContainsDate)??((w=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:w.firstWeekContainsDate)??r.firstWeekContainsDate??((O=(D=r.locale)==null?void 0:D.options)==null?void 0:O.firstWeekContainsDate)??1,i=(t==null?void 0:t.weekStartsOn)??(($=(_=t==null?void 0:t.locale)==null?void 0:_.options)==null?void 0:$.weekStartsOn)??r.weekStartsOn??((Y=(H=r.locale)==null?void 0:H.options)==null?void 0:Y.weekStartsOn)??0,o=d(n,t==null?void 0:t.in);if(!Mt(o))throw new RangeError("Invalid time value");let c=e.match(qt).map(m=>{const g=m[0];if(g==="p"||g==="P"){const S=Wt[g];return S(m,a.formatLong)}return m}).join("").match(Ht).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:Xt(m)};if(B[g])return{isToken:!0,value:m};if(g.match(Lt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(c=a.localize.preprocessor(o,c));const f={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return c.map(m=>{if(!m.isToken)return m.value;const g=m.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&Nt(g)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&Ft(g))&&Et(g,e,String(n));const S=B[g[0]];return S(o,g,a.localize,f)}).join("")}function Xt(n){const e=n.match(Ut);return e?e[1].replace(_t,"'"):n}function Qt(n,e){const t=d(n,e==null?void 0:e.in),r=t.getFullYear(),a=t.getMonth(),s=l(t,0);return s.setFullYear(r,a+1,0),s.setHours(0,0,0,0),s.getDate()}function nn(n,e){return d(n,e==null?void 0:e.in).getMonth()}function rn(n,e){return d(n,e==null?void 0:e.in).getFullYear()}function an(n,e){return+d(n)>+d(e)}function sn(n,e){return+d(n)<+d(e)}function on(n,e,t){const[r,a]=x(t==null?void 0:t.in,n,e);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function cn(n,e,t){const[r,a]=x(t==null?void 0:t.in,n,e);return r.getFullYear()===a.getFullYear()}function un(n,e,t){const r=d(n,t==null?void 0:t.in),a=r.getFullYear(),s=r.getDate(),i=l(n,0);i.setFullYear(a,e,15),i.setHours(0,0,0,0);const o=Qt(i);return r.setMonth(e,Math.min(s,o)),r}function dn(n,e,t){const r=d(n,t==null?void 0:t.in);return isNaN(+r)?l(n,NaN):(r.setFullYear(e),r)}export{un as A,dn as B,U as C,q as D,Zt as E,N as F,Dt as G,It as H,F as T,mt as a,gt as b,jt as c,zt as d,He as e,tn as f,wt as g,Gt as h,Jt as i,pt as j,en as k,Rt as l,Ot as m,Kt as n,St as o,nn as p,rn as q,vt as r,an as s,sn as t,bt as u,At as v,on as w,cn as x,Bt as y,Vt as z};