var Ne=Object.defineProperty;var Ye=(n,s,e)=>s in n?Ne(n,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[s]=e;var o=(n,s,e)=>Ye(n,typeof s!="symbol"?s+"":s,e);import{g as fe,t as Y,a3 as T,a5 as Ie,a6 as Oe,a7 as Pe,a8 as ke,v as Z,a9 as we,aa as _e,ab as He,c as he,ac as pe,ad as Ee,ae as S,af as Le,ag as ee,ah as Ce,f as qe,W as R}from"./client-BmVmnFEC.js";function ye(){return Object.assign({},fe())}function ze(n){let e=Y(n).getDay();return e===0&&(e=7),e}function ve(n,s){const e=s instanceof Date?T(s,0):new s(0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}const Fe=10;class me{constructor(){o(this,"subPriority",0)}validate(s,e){return!0}}class $e extends me{constructor(s,e,t,r,a){super(),this.value=s,this.validateValue=e,this.setValue=t,this.priority=r,a&&(this.subPriority=a)}validate(s,e){return this.validateValue(s,this.value,e)}set(s,e,t){return this.setValue(s,e,this.value,t)}}class Ze extends me{constructor(){super(...arguments);o(this,"priority",Fe);o(this,"subPriority",-1)}set(e,t){return t.timestampIsSet?e:T(e,ve(e,Date))}}class u{run(s,e,t,r){const a=this.parse(s,e,t,r);return a?{setter:new $e(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(s,e,t){return!0}}class Re extends u{constructor(){super(...arguments);o(this,"priority",140);o(this,"incompatibleTokens",["R","u","t","T"])}parse(e,t,r){switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,t,r){return t.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}const p={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},D={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function y(n,s){return n&&{value:s(n.value),rest:n.rest}}function d(n,s){const e=s.match(n);return e?{value:parseInt(e[0],10),rest:s.slice(e[0].length)}:null}function g(n,s){const e=s.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:s.slice(1)};const t=e[1]==="+"?1:-1,r=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,i=e[5]?parseInt(e[5],10):0;return{value:t*(r*Ie+a*Oe+i*Pe),rest:s.slice(e[0].length)}}function xe(n){return d(p.anyDigitsSigned,n)}function h(n,s){switch(n){case 1:return d(p.singleDigit,s);case 2:return d(p.twoDigits,s);case 3:return d(p.threeDigits,s);case 4:return d(p.fourDigits,s);default:return d(new RegExp("^\\d{1,"+n+"}"),s)}}function H(n,s){switch(n){case 1:return d(p.singleDigitSigned,s);case 2:return d(p.twoDigitsSigned,s);case 3:return d(p.threeDigitsSigned,s);case 4:return d(p.fourDigitsSigned,s);default:return d(new RegExp("^-?\\d{1,"+n+"}"),s)}}function Q(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Te(n,s){const e=s>0,t=e?s:1-s;let r;if(t<=50)r=n||100;else{const a=t+50,i=Math.trunc(a/100)*100,l=n>=a%100;r=n+i-(l?100:0)}return e?r:1-r}function be(n){return n%400===0||n%4===0&&n%100!==0}class We extends u{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,t,r){const a=i=>({year:i,isTwoDigitYear:t==="yy"});switch(t){case"y":return y(h(4,e),a);case"yo":return y(r.ordinalNumber(e,{unit:"year"}),a);default:return y(h(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r){const a=e.getFullYear();if(r.isTwoDigitYear){const l=Te(r.year,a);return e.setFullYear(l,0,1),e.setHours(0,0,0,0),e}const i=!("era"in t)||t.era===1?r.year:1-r.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}}class Qe extends u{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,t,r){const a=i=>({year:i,isTwoDigitYear:t==="YY"});switch(t){case"Y":return y(h(4,e),a);case"Yo":return y(r.ordinalNumber(e,{unit:"year"}),a);default:return y(h(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r,a){const i=ke(e,a);if(r.isTwoDigitYear){const f=Te(r.year,i);return e.setFullYear(f,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),Z(e,a)}const l=!("era"in t)||t.era===1?r.year:1-r.year;return e.setFullYear(l,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),Z(e,a)}}class Ue extends u{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return H(t==="R"?4:t.length,e)}set(e,t,r){const a=T(e,0);return a.setFullYear(r,0,4),a.setHours(0,0,0,0),we(a)}}class Xe extends u{constructor(){super(...arguments);o(this,"priority",130);o(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return H(t==="u"?4:t.length,e)}set(e,t,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}class Ae extends u{constructor(){super(...arguments);o(this,"priority",120);o(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"Q":case"QQ":return h(t.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}class Ge extends u{constructor(){super(...arguments);o(this,"priority",120);o(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"q":case"qq":return h(t.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}class Be extends u{constructor(){super(...arguments);o(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);o(this,"priority",110)}parse(e,t,r){const a=i=>i-1;switch(t){case"M":return y(d(p.month,e),a);case"MM":return y(h(2,e),a);case"Mo":return y(r.ordinalNumber(e,{unit:"month"}),a);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}class je extends u{constructor(){super(...arguments);o(this,"priority",110);o(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,t,r){const a=i=>i-1;switch(t){case"L":return y(d(p.month,e),a);case"LL":return y(h(2,e),a);case"Lo":return y(r.ordinalNumber(e,{unit:"month"}),a);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}function Ke(n,s,e){const t=Y(n),r=_e(t,e)-s;return t.setDate(t.getDate()-r*7),t}class Ve extends u{constructor(){super(...arguments);o(this,"priority",100);o(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,r){switch(t){case"w":return d(p.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return h(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r,a){return Z(Ke(e,r,a),a)}}function Je(n,s){const e=Y(n),t=He(e)-s;return e.setDate(e.getDate()-t*7),e}class Se extends u{constructor(){super(...arguments);o(this,"priority",100);o(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,t,r){switch(t){case"I":return d(p.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return h(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r){return we(Je(e,r))}}const et=[31,28,31,30,31,30,31,31,30,31,30,31],tt=[31,29,31,30,31,30,31,31,30,31,30,31];class rt extends u{constructor(){super(...arguments);o(this,"priority",90);o(this,"subPriority",1);o(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"d":return d(p.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return h(t.length,e)}}validate(e,t){const r=e.getFullYear(),a=be(r),i=e.getMonth();return a?t>=1&&t<=tt[i]:t>=1&&t<=et[i]}set(e,t,r){return e.setDate(r),e.setHours(0,0,0,0),e}}class nt extends u{constructor(){super(...arguments);o(this,"priority",90);o(this,"subpriority",1);o(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,t,r){switch(t){case"D":case"DD":return d(p.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return h(t.length,e)}}validate(e,t){const r=e.getFullYear();return be(r)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}}function U(n,s,e){var I,_,N,P;const t=fe(),r=(e==null?void 0:e.weekStartsOn)??((_=(I=e==null?void 0:e.locale)==null?void 0:I.options)==null?void 0:_.weekStartsOn)??t.weekStartsOn??((P=(N=t.locale)==null?void 0:N.options)==null?void 0:P.weekStartsOn)??0,a=Y(n),i=a.getDay(),f=(s%7+7)%7,m=7-r,L=s<0||s>6?s-(i+m)%7:(f+m)%7-(i+m)%7;return he(a,L)}class st extends u{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,t,r){switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,a){return e=U(e,r,a),e.setHours(0,0,0,0),e}}class at extends u{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,t,r,a){const i=l=>{const f=Math.floor((l-1)/7)*7;return(l+a.weekStartsOn+6)%7+f};switch(t){case"e":case"ee":return y(h(t.length,e),i);case"eo":return y(r.ordinalNumber(e,{unit:"day"}),i);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,a){return e=U(e,r,a),e.setHours(0,0,0,0),e}}class ot extends u{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,t,r,a){const i=l=>{const f=Math.floor((l-1)/7)*7;return(l+a.weekStartsOn+6)%7+f};switch(t){case"c":case"cc":return y(h(t.length,e),i);case"co":return y(r.ordinalNumber(e,{unit:"day"}),i);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,r,a){return e=U(e,r,a),e.setHours(0,0,0,0),e}}function it(n,s){const e=Y(n),t=ze(e),r=s-t;return he(e,r)}class ct extends u{constructor(){super(...arguments);o(this,"priority",90);o(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,t,r){const a=i=>i===0?7:i;switch(t){case"i":case"ii":return h(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return y(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),a);case"iiiii":return y(r.day(e,{width:"narrow",context:"formatting"}),a);case"iiiiii":return y(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),a);case"iiii":default:return y(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),a)}}validate(e,t){return t>=1&&t<=7}set(e,t,r){return e=it(e,r),e.setHours(0,0,0,0),e}}class ut extends u{constructor(){super(...arguments);o(this,"priority",80);o(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,t,r){switch(t){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(Q(r),0,0,0),e}}class lt extends u{constructor(){super(...arguments);o(this,"priority",80);o(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,t,r){switch(t){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(Q(r),0,0,0),e}}class dt extends u{constructor(){super(...arguments);o(this,"priority",80);o(this,"incompatibleTokens",["a","b","t","T"])}parse(e,t,r){switch(t){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,r){return e.setHours(Q(r),0,0,0),e}}class ft extends u{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,r){switch(t){case"h":return d(p.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return h(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,r){const a=e.getHours()>=12;return a&&r<12?e.setHours(r+12,0,0,0):!a&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}}class wt extends u{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,r){switch(t){case"H":return d(p.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return h(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,r){return e.setHours(r,0,0,0),e}}class ht extends u{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,r){switch(t){case"K":return d(p.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return h(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}}class pt extends u{constructor(){super(...arguments);o(this,"priority",70);o(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,r){switch(t){case"k":return d(p.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return h(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,r){const a=r<=24?r%24:r;return e.setHours(a,0,0,0),e}}class yt extends u{constructor(){super(...arguments);o(this,"priority",60);o(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"m":return d(p.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return h(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setMinutes(r,0,0),e}}class mt extends u{constructor(){super(...arguments);o(this,"priority",50);o(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"s":return d(p.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return h(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setSeconds(r,0),e}}class xt extends u{constructor(){super(...arguments);o(this,"priority",30);o(this,"incompatibleTokens",["t","T"])}parse(e,t){const r=a=>Math.trunc(a*Math.pow(10,-t.length+3));return y(h(t.length,e),r)}set(e,t,r){return e.setMilliseconds(r),e}}class Tt extends u{constructor(){super(...arguments);o(this,"priority",10);o(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return g(D.basicOptionalMinutes,e);case"XX":return g(D.basic,e);case"XXXX":return g(D.basicOptionalSeconds,e);case"XXXXX":return g(D.extendedOptionalSeconds,e);case"XXX":default:return g(D.extended,e)}}set(e,t,r){return t.timestampIsSet?e:T(e,e.getTime()-pe(e)-r)}}class bt extends u{constructor(){super(...arguments);o(this,"priority",10);o(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return g(D.basicOptionalMinutes,e);case"xx":return g(D.basic,e);case"xxxx":return g(D.basicOptionalSeconds,e);case"xxxxx":return g(D.extendedOptionalSeconds,e);case"xxx":default:return g(D.extended,e)}}set(e,t,r){return t.timestampIsSet?e:T(e,e.getTime()-pe(e)-r)}}class Dt extends u{constructor(){super(...arguments);o(this,"priority",40);o(this,"incompatibleTokens","*")}parse(e){return xe(e)}set(e,t,r){return[T(e,r*1e3),{timestampIsSet:!0}]}}class gt extends u{constructor(){super(...arguments);o(this,"priority",20);o(this,"incompatibleTokens","*")}parse(e){return xe(e)}set(e,t,r){return[T(e,r),{timestampIsSet:!0}]}}const Mt={G:new Re,y:new We,Y:new Qe,R:new Ue,u:new Xe,Q:new Ae,q:new Ge,M:new Be,L:new je,w:new Ve,I:new Se,d:new rt,D:new nt,E:new st,e:new at,c:new ot,i:new ct,a:new ut,b:new lt,B:new dt,h:new ft,H:new wt,K:new ht,k:new pt,m:new yt,s:new mt,S:new xt,X:new Tt,x:new bt,t:new Dt,T:new gt},Nt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Yt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,It=/^'([^]*?)'?$/,Ot=/''/g,Pt=/\S/,kt=/[a-zA-Z]/;function _t(n,s,e,t){var A,G,B,j;const r=ye(),a=r.locale??Ee,i=r.firstWeekContainsDate??((G=(A=r.locale)==null?void 0:A.options)==null?void 0:G.firstWeekContainsDate)??1,l=r.weekStartsOn??((j=(B=r.locale)==null?void 0:B.options)==null?void 0:j.weekStartsOn)??0;if(s==="")return n===""?Y(e):T(e,NaN);const f={firstWeekContainsDate:i,weekStartsOn:l,locale:a},m=[new Ze],L=s.match(Yt).map(c=>{const w=c[0];if(w in S){const b=S[w];return b(c,a.formatLong)}return c}).join("").match(Nt),I=[];for(let c of L){Le(c)&&ee(c,s,n),Ce(c)&&ee(c,s,n);const w=c[0],b=Mt[w];if(b){const{incompatibleTokens:K}=b;if(Array.isArray(K)){const V=I.find(J=>K.includes(J.token)||J.token===w);if(V)throw new RangeError(`The format string mustn't contain \`${V.fullToken}\` and \`${c}\` at the same time`)}else if(b.incompatibleTokens==="*"&&I.length>0)throw new RangeError(`The format string mustn't contain \`${c}\` and any other token at the same time`);I.push({token:w,fullToken:c});const C=b.run(n,c,a.match,f);if(!C)return T(e,NaN);m.push(C.setter),n=C.rest}else{if(w.match(kt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(c==="''"?c="'":w==="'"&&(c=Ht(c)),n.indexOf(c)===0)n=n.slice(c.length);else return T(e,NaN)}}if(n.length>0&&Pt.test(n))return T(e,NaN);const _=m.map(c=>c.priority).sort((c,w)=>w-c).filter((c,w,b)=>b.indexOf(c)===w).map(c=>m.filter(w=>w.priority===c).sort((w,b)=>b.subPriority-w.subPriority)).map(c=>c[0]);let N=Y(e);if(isNaN(N.getTime()))return T(e,NaN);const P={};for(const c of _){if(!c.validate(N,f))return T(e,NaN);const w=c.set(N,P,f);Array.isArray(w)?(N=w[0],Object.assign(P,w[1])):N=w}return T(e,N)}function Ht(n){return n.match(It)[1].replace(Ot,"'")}function te(n,s,e){const t=ye(),r=Ct(n,e.timeZone,e.locale??t.locale);return"formatToParts"in r?Et(r,s):Lt(r,s)}function Et(n,s){const e=n.formatToParts(s);for(let t=e.length-1;t>=0;--t)if(e[t].type==="timeZoneName")return e[t].value}function Lt(n,s){const e=n.format(s).replace(/\u200E/g,""),t=/ [\w-+ ]+$/.exec(e);return t?t[0].substr(1):""}function Ct(n,s,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:s,timeZoneName:n})}function qt(n,s){const e=Zt(s);return"formatToParts"in e?vt(e,n):Ft(e,n)}const zt={year:0,month:1,day:2,hour:3,minute:4,second:5};function vt(n,s){try{const e=n.formatToParts(s),t=[];for(let r=0;r