diff --git a/plugins/dates/builds/compromise-dates.cjs b/plugins/dates/builds/compromise-dates.cjs index 1a8cf6697..50bde1bf5 100644 --- a/plugins/dates/builds/compromise-dates.cjs +++ b/plugins/dates/builds/compromise-dates.cjs @@ -5110,7 +5110,7 @@ input.month = 'sep'; } // set it to the beginning of the given unit - let d = spacetime(input, context.timezone, { today: today }); + let d = spacetime(input, context.timezone, { today: today, dmy: context.dmy }); Object.defineProperty(this, 'd', { enumerable: false, writable: true, diff --git a/plugins/dates/builds/compromise-dates.min.js b/plugins/dates/builds/compromise-dates.min.js index bf1d1474d..d4e29ffdc 100644 --- a/plugins/dates/builds/compromise-dates.min.js +++ b/plugins/dates/builds/compromise-dates.min.js @@ -1 +1 @@ -var e,t;e=this,t=function(){var e=function(e){let t=null;return e.has("^(between|within) #Date")?e:(e.has("#Month")&&(t=e.match("[#Month #Value] and? #Month",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter(t)),t=e.match("[#Value #Month] and? #Value #Month",0),t.found&&(e=e.splitAfter(t)),t=e.match("^[#Month] and? #Month #Ordinal?$",0),t.found&&(e=e.splitAfter(t)),t=e.match("[#Month #Value] #Month",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter(t))),e.has("#WeekDay")&&(t=e.match("^[#WeekDay] and? #WeekDay$",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter(t)),t=e.match("#WeekDay #WeekDay and? #WeekDay"),t.found&&(e=e.splitOn("#WeekDay")),t=e.match("[#WeekDay] (and|or|this|next)? #WeekDay",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter("#WeekDay"))),t=e.match("(this|next) #Duration [(today|tomorrow|yesterday)]",0),t.found&&(e=e.splitBefore(t)),t=e.match("[(today|tomorrow|yesterday)] #Value #Month",0),t.found&&(e=e.splitAfter(t)),t=e.match("[(today|tomorrow|yesterday)] (today|tomorrow|yesterday|#WeekDay)",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter(t)),t=e.match("#Year [and] #Year",0),t.found&&(e=e.splitAfter(t)),e=(e=e.not("^and")).not("and$"))},t=function(t){let a=t.match("#Date+");a=a.filter((e=>{let t=e.has("^#Duration+$")||e.has("^#Value #Duration+$");return!(!0!==t||!e.has("(#FinancialQuarter|quarter)"))||!1===t}));let n=a.match("[#Cardinal #Duration (in|on|this|next|during|for)] #Date",0);return n.found&&(a=a.not(n)),n=a.match("[#Cardinal #Duration] #WeekDay",0),n.found&&(a=a.not(n)),n=a.match("#Date [for #Value #Duration]$",0),n.found&&(a=a.not(n)),n=a.match("[#Cardinal #Duration] #Date",0),n.found&&!a.has("#Cardinal #Duration] (ago|from|before|after|back)")&&(a=a.not(n)),n=a.match("for #Cardinal #Duration"),n.found&&(a=a.not(n)),a=a.notIf("^one (#WeekDay|#Month)$"),a=e(a),a=a.notIf("(#Money|#Percentage)"),a=a.notIf("^per #Duration"),a};const a={second:!0,minute:!0,hour:!0,day:!0,week:!0,weekend:!0,month:!0,season:!0,quarter:!0,year:!0},n={wk:"week",min:"minute",sec:"second",weekend:"week"},r=function(e){let t=e.match("#Duration").text("normal");return t=t.replace(/s$/,""),n.hasOwnProperty(t)&&(t=n[t]),t};var i=function(e){let t={},n=e.none(),i=e.match("#DateShift+");if(!1===i.found)return{res:t,m:n};if(i.match("#Cardinal #Duration").forEach((e=>{let n=e.match("#Cardinal").numbers().get()[0];if(n&&"number"==typeof n){let i=r(e);!0===a[i]&&(t[i]=n)}})),!0===i.has("(before|ago|hence|back)$")&&Object.keys(t).forEach((e=>t[e]*=-1)),n=i.match("#Cardinal #Duration"),i=i.not(n),n=i.match("[#Duration] [(after|before)]"),n.found){let e=n.groups("unit").text("reduced"),a=n.groups("dir").text("reduced");"after"===a?t[e]=1:"before"===a&&(t[e]=-1)}if(n=i.match("half (a|an) [#Duration]",0),n.found){let e=r(n);t[e]=.5}return n=e.match("#DateShift+"),{result:t,m:n}};const o={minute:!0};var s=function(e){let t=e.match("[#Value] [#Duration+] (of|in)");if(t.found){let e=t.groups(),a=e.num.numbers().get()[0],n=e.unit.text("reduced"),r={unit:n,num:Number(a)||0};return o[n]||(r.num-=1),{result:r,m:t}}if(t=e.match("[(first|initial|last|final)] [#Duration+] (of|in)"),t.found){let e=t.groups(),a=e.dir.text("reduced");return"initial"===a&&(a="first"),"final"===a&&(a="last"),{result:{unit:e.unit.text("reduced"),dir:a},m:t}}return{result:null,m:e.none()}};const u=(e,t,a)=>{const[n,r]=e.split("/"),[i,o]=r.split(":");return Date.UTC(a,n-1,i,o)-36e5*t};var d=(e,t,a,n,r)=>{const i=new Date(e).getUTCFullYear(),o=u(t,r,i),s=u(a,n,i);return e>=o&&e{let t=e.timezones[e.tz];if(void 0===t)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(void 0===t.dst)return t.offset;let a=t.offset,n=t.offset+1;"n"===t.hem&&(n=a-1);let r=t.dst.split("->");return!0===d(e.epoch,r[0],r[1],a,n)?a:n},h={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok","9.5|s|04/07:03->10/06:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/13:01->10/02:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,hongkong,prc,roc","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/yangon,9/cocos,2/rangoon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/kolkata,2/colombo,2/calcutta","4|s":"9/reunion","4|n":"2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|04/26:00->10/31:24":"0/cairo,egypt","3|n|04/20:02->10/26:02":"2/gaza,2/hebron","3|n|03/31:03->10/27:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet","3|n|03/31:02->10/27:03":"8/chisinau,8/tiraspol","3|n|03/31:00->10/26:24":"2/beirut","3|n|03/29:02->10/27:02":"2/jerusalem,2/tel_aviv,israel","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su","3.5|n":"2/tehran,iran","2|s|03/31:02->10/27:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/31:02->10/27:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met","2|n":"0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|03/31:01->10/27:02":"3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s":"11/apia,11/tongatapu","13|n":"11/enderbury,11/kanton,11/fakaofo","12|s|04/07:03->09/29:02":"12/mcmurdo,11/auckland,12/south_pole,nz","12|s":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein","12.75|s|04/07:03->04/07:02":"11/chatham,nz-chat","11|s|04/07:03->10/06:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n|04/07:03->10/06:02":"11/norfolk","10|s|04/07:03->10/06:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap","10.5|s|04/07:01->10/06:02":"4/lord_howe,4/lhi","0|s|03/10:03->04/14:02":"0/casablanca,0/el_aaiun","0|n|03/31:00->10/27:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory","-9|n|03/10:02->11/03:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/10:02->11/03:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/10:02->11/03:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n":"1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst","-6|s|04/06:22->09/07:22":"11/easter,7/easterisland","-6|n|04/07:02->10/27:02":"1/merida","-6|n|03/10:02->11/03:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain","-6|n":"1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|03/10:02->11/03:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est","-4|s|04/06:24->09/08:00":"1/santiago,7/continental","-4|s|03/23:24->10/06:00":"1/asuncion","-4|s":"1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west","-4|n|03/10:02->11/03:02":"1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/10:00->11/03:01":"1/havana,cuba","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east","-3|n|03/10:02->11/03:02":"1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic","-3|n":"1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem","-2|n|03/30:22->10/26:23":"1/nuuk,1/godthab","-2|n|03/10:02->11/03:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/10:02->11/03:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst"},m=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let c={};Object.keys(h).forEach((e=>{let t=e.split("|"),a={offset:Number(t[0]),hem:t[1]};t[2]&&(a.dst=t[2]),h[e].split(",").forEach((e=>{e=e.replace(/(^[0-9]+)\//,((e,t)=>(t=Number(t),m[t]+"/"))),c[e]=a}))})),c.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let a="etc/gmt"+t;c[a]={offset:-1*e,hem:"n"},a="utc/gmt"+t,c[a]={offset:-1*e,hem:"n"}}var f=c,y=()=>{let e=(()=>{if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;let e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null})();return null===e?"utc":e};const p=/(\-?[0-9]+)h(rs)?/i,g=/(\-?[0-9]+)/,w=/utc([\-+]?[0-9]+)/i,b=/gmt([\-+]?[0-9]+)/i,k=function(e){return(e=Number(e))>=-13&&e<=13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null};var D=function(e){let t=e.match(p);if(null!==t)return k(t[1]);if(t=e.match(w),null!==t)return k(t[1]);if(t=e.match(b),null!==t){let e=-1*Number(t[1]);return k(e)}return t=e.match(g),null!==t?k(t[1]):null};let v=y();const x=Object.keys(f).reduce(((e,t)=>{let a=t.split("/")[1]||"";return a=a.replace(/_/g," "),e[a]=t,e}),{});var O=(e,t)=>{if(!e)return t.hasOwnProperty(v)||(console.warn(`Unrecognized IANA id '${v}'. Setting fallback tz to UTC.`),v="utc"),v;"string"!=typeof e&&console.error("Timezone must be a string - recieved: '",e,"'\n");let a=e.trim();if(a=a.toLowerCase(),!0===t.hasOwnProperty(a))return a;if(a=(e=>(e=(e=(e=(e=(e=e.replace(/ time/g,"")).replace(/ (standard|daylight|summer)/g,"")).replace(/\b(east|west|north|south)ern/g,"$1")).replace(/\b(africa|america|australia)n/g,"$1")).replace(/\beuropean/g,"europe")).replace(/\islands/g,"island"))(a),!0===t.hasOwnProperty(a))return a;if(!0===x.hasOwnProperty(a))return x[a];if(!0===/[0-9]/.test(a)){let e=D(a);if(e)return e}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function M(e){return e%4==0&&e%100!=0||e%400==0}function _(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())}function j(e){return"[object Object]"===Object.prototype.toString.call(e)}function $(e,t=2){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function z(e){let t=e%10,a=e%100;return 1===t&&11!==a?e+"st":2===t&&12!==a?e+"nd":3===t&&13!==a?e+"rd":e+"th"}function T(e){return e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function V(e=""){return"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===e?"date":"min"===e||"mins"===e?"minute":e}function q(e){return"number"==typeof e?e:_(e)?e.getTime():e.epoch?e.epoch:null}function S(e,t){return!1===j(e)?t.clone().set(e):e}function C(e,t=""){const a=e>0?"+":"-",n=Math.abs(e);return`${a}${$(parseInt(""+n,10))}${t}${$(n%1*60)}`}const A={year:(new Date).getFullYear(),month:0,date:1};var E={parseArray:(e,t,a)=>{if(0===t.length)return e;let n=["year","month","date","hour","minute","second","millisecond"];for(let r=0;r{if(0===Object.keys(t).length)return e;t=Object.assign({},A,a,t);let n=Object.keys(t);for(let r=0;r0&&t<25e8&&!1===e.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),e.epoch=t,e}};const N=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach((t=>{"function"==typeof e[t]&&(e=e[t](e._today[t]))})),e},P={now:e=>N(e),today:e=>N(e),tonight:e=>e=(e=N(e)).hour(18),tomorrow:e=>e=(e=(e=N(e)).add(1,"day")).startOf("day"),yesterday:e=>e=(e=(e=N(e)).subtract(1,"day")).startOf("day"),christmas:e=>{let t=N(e).year();return e=e.set([t,11,25,18,0,0])},"new years":e=>{let t=N(e).year();return e=e.set([t,11,31,18,0,0])}};P["new years eve"]=P["new years"];var Y=P,B=function(e){return e=(e=(e=(e=e.replace(/\b(mon|tues?|wed|wednes|thur?s?|fri|sat|satur|sun)(day)?\b/i,"")).replace(/([0-9])(th|rd|st|nd)/,"$1")).replace(/,/g,"")).replace(/ +/g," ").trim()};let H={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};H.date=H.day,H.month=25488e5,H.week=6048e5,H.year=3154e7,Object.keys(H).forEach((e=>{H[e+"s"]=H[e]}));var L=H;const I=(e,t,a,n,r)=>{let i=e.d[a]();if(i===t)return;let o=null===r?null:e.d[r](),s=e.epoch,u=t-i;e.epoch+=L[n]*u,"day"===n&&Math.abs(u)>28&&t<28&&(e.epoch+=L.hour),null!==r&&o!==e.d[r]()&&(e.epoch=s);const d=L[n]/2;for(;e.d[a]()t;)e.epoch-=d;null!==r&&o!==e.d[r]()&&(e.epoch=s)},W={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>I(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let a=e.d,n=a.getMonth(),r=e.epoch,i=a.getFullYear();if(n===t)return;let o=t-n;for(e.epoch+=L.day*(28*o),i!==e.d.getFullYear()&&(e.epoch=r);e.d.getMonth()t;)e.epoch-=L.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>I(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>I(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>I(e,t,"getMinutes","minute","getHours")},second:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>{e.epoch=e.seconds(t).epoch}},millisecond:{valid:e=>e>=0&&e<1e3,walkTo:(e,t)=>{e.epoch=e.milliseconds(t).epoch}}};var F=(e,t)=>{let a=Object.keys(W),n=e.clone();for(let r=0;r{if(!t)return e;t=t.trim().toLowerCase();let a=0;if(/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(!0===/:00/.test(t)&&(t=t.replace(/:00/,"")),!0===/:30/.test(t)&&(t=t.replace(/:30/,".5"))),/^[\+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,".5")),a=parseFloat(t),Math.abs(a)>100&&(a/=100),0===a||"Z"===t||"z"===t)return e.tz="etc/gmt",e;a*=-1,a>=0&&(a="+"+a);let n="etc/gmt"+a;return e.timezones[n]&&(e.tz=n),e},Z=(e,t="")=>{let a=(t=t.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==a){let[,n,r,i,o]=a;if(n=Number(n),n<0||n>24)return e.startOf("day");if(r=Number(r),a[2].length<2||r<0||r>59)return e.startOf("day");e=(e=(e=(e=e.hour(n)).minute(r)).seconds(i||0)).millisecond(function(e=""){return(e=String(e)).length>3?e=e.substring(0,3):1===e.length?e+="00":2===e.length&&(e+="0"),Number(e)||0}(o));let s=t.match(/[\b0-9] ?(am|pm)\b/);return null!==s&&s[1]&&(e=e.ampm(s[1])),e}if(a=t.match(/([0-9]+) ?(am|pm)/),null!==a&&a[1]){let t=Number(a[1]);return t>12||t<1?e.startOf("day"):e=(e=(e=e.hour(a[1]||0)).ampm(a[2])).startOf("hour")}return e=e.startOf("day")};let X=U();const ee=e=>{if(!0!==J.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(M(e.year)&&e.date<=29)||e.date<=28;let t=J[e.month]||0;return e.date<=t},te=(e="",t)=>{if(e=e.trim(),!0===/^'[0-9][0-9]$/.test(e)){let t=Number(e.replace(/'/,""));return t>50?1900+t:2e3+t}let a=parseInt(e,10);return!a&&t&&(a=t.year),a=a||(new Date).getFullYear(),a},ae=function(e){return"sept"===(e=e.toLowerCase().trim())?X.sep:X[e]};var ne=[{reg:/^([0-9]{1,2})[\-\/.]([0-9]{1,2})[\-\/.]?([0-9]{4})?( [0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:(e,t)=>{let a=parseInt(t[1],10)-1,n=parseInt(t[2],10);(e.british||a>=12)&&(n=parseInt(t[1],10),a=parseInt(t[2],10)-1);let r={date:n,month:a,year:te(t[3],e._today)||(new Date).getFullYear()};return!1===ee(r)?(e.epoch=null,e):(F(e,r),e=Z(e,t[4]))}},{reg:/^([a-z]+)[\-\/\. ]([0-9]{1,2})[\-\/\. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let a={year:te(t[3],e._today),month:ae(t[1]),date:T(t[2]||"")};return!1===ee(a)?(e.epoch=null,e):(F(e,a),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let a={year:te(t[3],e._today),month:ae(t[1]),date:T(t[2]||"")};return!1===ee(a)?(e.epoch=null,e):(F(e,a),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2}) ([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2})( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let[,a,n,r,i,o]=t,s={year:te(o,e._today),month:ae(a),date:T(n||"")};return!1===ee(s)?(e.epoch=null,e):(F(e,s),e=G(e,i),e=Z(e,r))}}],re=[{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:(e,t)=>{let a={year:t[1],month:parseInt(t[2],10)-1,date:1};return!1===ee(a)?(e.epoch=null,e):(F(e,a),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let a={year:te(t[2],e._today),month:ae(t[1]),date:e._today.date||1};return!1===ee(a)?(e.epoch=null,e):(F(e,a),e=Z(e,t[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let a=t[1]||"";e=e.quarter(a);let n=t[3]||"";return n&&(n=n.trim(),e=e.year(n)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let a=t[1]||"";e=e.season(a);let n=t[3]||"";return n&&(n=n.trim(),e=e.year(n)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let a=t[0]||"";a=a.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let n=new Date,r={year:parseInt(a.trim(),10),month:n.getMonth(),date:n.getDate()};return!1===ee(r)?(e.epoch=null,e):(F(e,r),e=Z(e))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let a=t[0]||"";a=a.replace(/,/g,"");let n=new Date,r={year:parseInt(a.trim(),10),month:n.getMonth(),date:n.getDate()};return!1===ee(r)?(e.epoch=null,e):(F(e,r),e=Z(e))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let a=e._today;a.month&&!a.date&&(a.date=1);let n=new Date,r={year:te(t[0],a),month:a.month||n.getMonth(),date:a.date||n.getDate()};return!1===ee(r)?(e.epoch=null,e):(F(e,r),e=Z(e))}}],ie=[].concat([{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:(e,t)=>{let a={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return!1===ee(a)?(e.epoch=null,e):(G(e,t[5]),F(e,a),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([0-9]{1,2})[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let a={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return a.month>=12&&(a.date=parseInt(t[2],10),a.month=parseInt(t[3],10)-1),!1===ee(a)?(e.epoch=null,e):(F(e,a),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([a-z]+)[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let a={year:te(t[1],e._today),month:ae(t[2]),date:T(t[3]||"")};return!1===ee(a)?(e.epoch=null,e):(F(e,a),e=Z(e,t[4]))}}],ne,[{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:(e,t)=>{let a={year:te(t[3],e._today),month:ae(t[2]),date:T(t[1]||"")};return!1===ee(a)?(e.epoch=null,e):(F(e,a),e=Z(e,t[4]))}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:(e,t)=>{let a={year:te(t[3],e._today),month:ae(t[2]),date:T(t[1])};return a.month&&!1!==ee(a)?(F(e,a),e=Z(e,t[4])):(e.epoch=null,e)}},{reg:/^([0-9]{1,2})[\. -/]([a-z]+)[\. -/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let a={date:Number(t[1]),month:ae(t[2]),year:Number(t[3])};return!1===ee(a)?(e.epoch=null,e):(F(e,a),e=e.startOf("day"),e=Z(e,t[4]))}}],re),oe=function(e,t,a){for(let n=0;n{let a=e._today||le;if("number"==typeof t)return de(e,t);if(e.epoch=Date.now(),e._today&&j(e._today)&&Object.keys(e._today).length>0){let t=ue(e,a,le);t.isValid()&&(e.epoch=t.epoch)}return null==t||""===t?e:!0===_(t)?(e.epoch=t.getTime(),e):!0===function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t)?e=se(e,t,a):!0===j(t)?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):e=ue(e,t,a):"string"!=typeof t?e:(t=B(t),!0===Y.hasOwnProperty(t)?e=Y[t](e):oe(e,t))};let me=["sun","mon","tue","wed","thu","fri","sat"],ce=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function fe(){return me}function ye(){return ce}const pe={mo:1,tu:2,we:3,th:4,fr:5,sa:6,su:7,tues:2,weds:3,wedn:3,thur:4,thurs:4};let ge=!0;var we=e=>{let t=e.timezone().current.offset;return t?C(t,":"):"Z"};const be=e=>ge?function(e){return e?e[0].toUpperCase()+e.substr(1):""}(e):e,ke={day:e=>be(e.dayName()),"day-short":e=>be(fe()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>z(e.day()),"day-pad":e=>$(e.day()),date:e=>e.date(),"date-ordinal":e=>z(e.date()),"date-pad":e=>$(e.date()),month:e=>be(e.monthName()),"month-short":e=>be(R()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>z(e.month()),"month-pad":e=>$(e.month()),"iso-month":e=>$(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+" BC")},"year-short":e=>{let t=e.year();return t>0?`'${String(e.year()).substr(2,4)}`:(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),a=t<0,n=$(Math.abs(t),4);return a&&(n=$(n,6),n="-"+n),n},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${$(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>$(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>$(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>$(e.minute()),second:e=>e.second(),"second-pad":e=>$(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>$(e.millisecond(),3),ampm:e=>e.ampm(),AMPM:e=>e.ampm().toUpperCase(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>we(e),numeric:e=>`${e.year()}/${$(e.month()+1)}/${$(e.date())}`,"numeric-us":e=>`${$(e.month()+1)}/${$(e.date())}/${e.year()}`,"numeric-uk":e=>`${$(e.date())}/${$(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${$(e.month()+1)}/${$(e.date())}`,iso:e=>`${e.format("iso-year")}-${$(e.month()+1)}-${$(e.date())}T${$(e.h24())}:${$(e.minute())}:${$(e.second())}.${$(e.millisecond(),3)}${we(e)}`,"iso-short":e=>{let t=$(e.month()+1),a=$(e.date());var n;return`${(n=e.year())>=0?$(n,4):"-"+$(n=Math.abs(n),4)}-${t}-${a}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${R()[e.month()]} ${z(e.date())}, ${e.time()}`,"nice-24":e=>`${R()[e.month()]} ${z(e.date())}, ${e.hour24()}:${$(e.minute())}`,"nice-year":e=>`${R()[e.month()]} ${z(e.date())}, ${e.year()}`,"nice-day":e=>`${fe()[e.day()]} ${be(R()[e.month()])} ${z(e.date())}`,"nice-full":e=>`${e.dayName()} ${be(e.monthName())} ${z(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${be(e.monthName())} ${z(e.date())}, ${e.hour24()}:${$(e.minute())}`},De={"day-name":"day","month-name":"month","iso 8601":"iso","time-h24":"time-24","time-12":"time","time-h12":"time",tz:"timezone","day-num":"day-number","month-num":"month-number","month-iso":"iso-month","year-iso":"iso-year","nice-short":"nice","nice-short-24":"nice-24",mdy:"numeric-us",dmy:"numeric-uk",ymd:"numeric","yyyy/mm/dd":"numeric","mm/dd/yyyy":"numeric-us","dd/mm/yyyy":"numeric-us","little-endian":"numeric-uk","big-endian":"numeric","day-nice":"nice-day"};Object.keys(De).forEach((e=>ke[e]=ke[De[e]]));var ve=(e,t="")=>{if(!0!==e.isValid())return"";if(ke.hasOwnProperty(t)){let a=ke[t](e)||"";return"json"!==t&&(a=String(a),"ampm"!==t.toLowerCase()&&(a=be(a))),a}if(-1!==t.indexOf("{")){let a=/\{(.+?)\}/g;return t=t.replace(a,((t,a)=>{if(a=a.toLowerCase().trim(),ke.hasOwnProperty(a)){let t=String(ke[a](e));return"ampm"!==a.toLowerCase()?be(t):t}return""})),t}return e.format("iso-short")};const xe={G:e=>e.era(),GG:e=>e.era(),GGG:e=>e.era(),GGGG:e=>"AD"===e.era()?"Anno Domini":"Before Christ",y:e=>e.year(),yy:e=>$(Number(String(e.year()).substr(2,4))),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>"0"+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>$(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>$(e.week()),d:e=>e.date(),dd:e=>$(e.date()),D:e=>e.dayOfYear(),DD:e=>$(e.dayOfYear()),DDD:e=>$(e.dayOfYear(),3),E:e=>e.format("day-short"),EE:e=>e.format("day-short"),EEE:e=>e.format("day-short"),EEEE:e=>e.format("day"),EEEEE:e=>e.format("day")[0],e:e=>e.day(),ee:e=>e.day(),eee:e=>e.format("day-short"),eeee:e=>e.format("day"),eeeee:e=>e.format("day")[0],a:e=>e.ampm().toUpperCase(),aa:e=>e.ampm().toUpperCase(),aaa:e=>e.ampm().toUpperCase(),aaaa:e=>e.ampm().toUpperCase(),h:e=>e.h12(),hh:e=>$(e.h12()),H:e=>e.hour(),HH:e=>$(e.hour()),m:e=>e.minute(),mm:e=>$(e.minute()),s:e=>e.second(),ss:e=>$(e.second()),SSS:e=>$(e.millisecond(),3),A:e=>e.epoch-e.startOf("day").epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>C(e.timezone().current.offset),ZZ:e=>C(e.timezone().current.offset),ZZZ:e=>C(e.timezone().current.offset),ZZZZ:e=>C(e.timezone().current.offset,":")},Oe=(e,t,a)=>{let n=e,r=t;for(let i=0;i{let a=t.split("");return a=function(e){for(let t=0;te))}(a),a=function(e){for(let t=0;te))).map((e=>("''"===e&&(e="'"),e)))}(a),a.reduce(((t,a)=>(void 0!==xe[a]?t+=xe[a](e)||"":(/^'.{1,}'$/.test(a)&&(a=a.replace(/'/g,"")),t+=a),t)),"")};const _e=["year","season","quarter","month","week","day","quarterHour","hour","minute"],je=function(e,t){let a=e.clone().startOf(t),n=e.clone().endOf(t).epoch-a.epoch,r=(e.epoch-a.epoch)/n;return parseFloat(r.toFixed(2))};var $e=(e,t)=>{if(t)return t=V(t),je(e,t);let a={};return _e.forEach((t=>{a[t]=je(e,t)})),a},ze=(e,t)=>{let a=e.progress();return"quarterhour"===(t=V(t))&&(t="quarterHour"),void 0!==a[t]?(a[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):!1===e.silent&&console.warn("no known unit '"+t+"'"),e};const Te=(e,t,a)=>{let n=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,a),n+=1;return e.isAfter(t,a)&&(n-=1),n};var Ve=(e,t,a)=>e.isBefore(t)?Te(e,t,a):-1*Te(t,e,a),qe=function(e,t){let a=t.epoch-e.epoch,n={milliseconds:a,seconds:parseInt(a/1e3,10)};n.minutes=parseInt(n.seconds/60,10),n.hours=parseInt(n.minutes/60,10);let r=e.clone();return n.years=((e,t)=>{let a=t.year()-e.year();return(e=e.year(t.year())).isAfter(t)&&(a-=1),a})(r,t),r=e.add(n.years,"year"),n.months=12*n.years,r=e.add(n.months,"month"),n.months+=Ve(r,t,"month"),n.quarters=4*n.years,n.quarters+=parseInt(n.months%12/3,10),n.weeks=52*n.years,r=e.add(n.weeks,"week"),n.weeks+=Ve(r,t,"week"),n.days=7*n.weeks,r=e.add(n.days,"day"),n.days+=Ve(r,t,"day"),n},Se=function(e,t,a){t=S(t,e);let n=!1;if(e.isAfter(t)){let a=e;e=t,t=a,n=!0}let r=qe(e,t);return n&&(r=function(e){return Object.keys(e).forEach((t=>{e[t]*=-1})),e}(r)),a?(a=V(a),!0!==/s$/.test(a)&&(a+="s"),"dates"===a&&(a="days"),r[a]):r};const Ce=e=>Math.abs(e)||0;var Ae=function(e){let t="P";return t+=Ce(e.years)+"Y",t+=Ce(e.months)+"M",t+=Ce(e.days)+"DT",t+=Ce(e.hours)+"H",t+=Ce(e.minutes)+"M",t+=Ce(e.seconds)+"S",t};let Ee={second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years"};function Ne(e){return Ee[e]||""}let Pe="past",Ye="future",Be="present",He="now",Le="almost",Ie="over",We=e=>`${e} ago`,Fe=e=>`in ${e}`;function Je(e){return We(e)}function Ke(e){return Fe(e)}function Qe(){return He}const Re={months:{almost:10,over:4},days:{almost:25,over:10},hours:{almost:20,over:8},minutes:{almost:50,over:20},seconds:{almost:50,over:20}};function Ue(e,t){return 1===e?e+" "+Ne(t.slice(0,-1)):e+" "+Ne(t)}var Ge=function(e){let t=null,a=null,n=[],r=[];return Object.keys(e).forEach(((i,o,s)=>{const u=Math.abs(e[i]);if(0===u)return;n.push(u+i[0]);const d=Ue(u,i);if(r.push(d),!t){if(t=a=d,o>4)return;const n=s[o+1],r=Math.abs(e[n]);r>Re[n].almost?(t=Ue(u+1,i),a=Le+" "+t):r>Re[n].over&&(a=Ie+" "+d)}})),{qualified:a,rounded:t,abbreviated:n,englishValues:r}},Ze=(e,t)=>{const a=function(e,t){const a=e.isBefore(t),n=a?t:e;let r=a?e:t;r=r.clone();const i={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(i).forEach((e=>{if(r.isSame(n,e))return;let t=r.diff(n,e);r=r.add(t,e),i[e]=t})),a&&Object.keys(i).forEach((e=>{0!==i[e]&&(i[e]*=-1)})),i}(e,t=S(t,e));if(!0===Object.keys(a).every((e=>!a[e])))return{diff:a,rounded:Qe(),qualified:Qe(),precise:Qe(),abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:Be};let n,r=Ye,{rounded:i,qualified:o,englishValues:s,abbreviated:u}=Ge(a);n=s.splice(0,2).join(", "),!0===e.isAfter(t)?(i=Je(i),o=Je(o),n=Je(n),r=Pe):(i=Ke(i),o=Ke(o),n=Ke(n));let d=Ae(a);return{diff:a,rounded:i,qualified:o,precise:n,abbreviated:u,iso:d,direction:r}},Xe={north:[["spring",2,1],["summer",5,1],["fall",8,1],["autumn",8,1],["winter",11,1]],south:[["fall",2,1],["autumn",2,1],["winter",5,1],["spring",8,1],["summer",11,1]]},et=[null,[0,1],[3,1],[6,1],[9,1]];const tt={second:e=>(F(e,{millisecond:0}),e),minute:e=>(F(e,{second:0,millisecond:0}),e),quarterhour:e=>{let t=e.minutes();return e=t>=45?e.minutes(45):t>=30?e.minutes(30):t>=15?e.minutes(15):e.minutes(0),F(e,{second:0,millisecond:0}),e},hour:e=>(F(e,{minute:0,second:0,millisecond:0}),e),day:e=>(F(e,{hour:0,minute:0,second:0,millisecond:0}),e),week:e=>{let t=e.clone();return(e=e.day(e._weekStart)).isAfter(t)&&(e=e.subtract(1,"week")),F(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(F(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return et[t]&&F(e,{month:et[t][0],date:et[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),a="north";"South"===e.hemisphere()&&(a="south");for(let n=0;n(F(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{let t=(e=e.startOf("year")).year(),a=10*parseInt(t/10,10);return e=e.year(a)},century:e=>{let t=(e=e.startOf("year")).year(),a=100*parseInt(t/100,10);return e=e.year(a)}};tt.date=tt.day;var at=function(e,t,a){if(!t||!a)return[];if(t=V(t),a=e.clone().set(a),e.isAfter(a)){let t=e;e=a,a=t}let n=e.clone();!function(e){return!!fe().find((t=>t===e))||!!ye().find((t=>t===e))}(t)?n.startOf(t).isBefore(e)&&(n=n.next(t)):(n=n.next(t),t="week");let r=[];for(;n.isBefore(a);)r.push(n),n=n.add(1,t);return r},nt=e=>{let t=e.timezones,a=e.tz;if(!1===t.hasOwnProperty(a)&&(a=O(e.tz,t)),null===a)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let n=t[a],r={name:(i=a,i=(i=(i=(i=(i=(i=(i=i[0].toUpperCase()+i.substr(1)).replace(/[\/_-]([a-z])/gi,(e=>e.toUpperCase()))).replace(/_(of|es)_/i,(e=>e.toLowerCase()))).replace(/\/gmt/i,"/GMT")).replace(/\/Dumontdurville$/i,"/DumontDUrville")).replace(/\/Mcmurdo$/i,"/McMurdo")).replace(/\/Port-au-prince$/i,"/Port-au-Prince")),hasDst:Boolean(n.dst),default_offset:n.offset,hemisphere:"s"===n.hem?"South":"North",current:{}};var i,o;if(r.hasDst){let e=(o=n.dst)?o.split("->"):[];r.change={start:e[0],back:e[1]}}let s=n.offset,u=s;return!0===r.hasDst&&(u="North"===r.hemisphere?s-1:n.offset+1),!1===r.hasDst?(r.current.offset=s,r.current.isDST=!1):!0===d(e.epoch,r.change.start,r.change.back,s,u)?(r.current.offset=s,r.current.isDST="North"===r.hemisphere):(r.current.offset=u,r.current.isDST="South"===r.hemisphere),r};const rt=["century","decade","year","month","date","day","hour","minute","second","millisecond"],it={set:function(e,t){let a=this.clone();return a=he(a,e),t&&(this.tz=O(t)),a},timezone:function(){return nt(this)},isDST:function(){return nt(this).current.isDST},hasDST:function(){return nt(this).hasDst},offset:function(){return 60*nt(this).current.offset},hemisphere:function(){return nt(this).hemisphere},format:function(e){return ve(this,e)},unixFmt:function(e){return Me(this,e)},startOf:function(e){return((e,t)=>{let a=e.clone();return t=V(t),tt[t]?tt[t](a):"summer"===t||"winter"===t?(a=a.season(t),tt.season(a)):a})(this,e)},endOf:function(e){return((e,t)=>{let a=e.clone();return t=V(t),tt[t]?(a=tt[t](a),a=a.add(1,t),a=a.subtract(1,"millisecond"),a):a})(this,e)},leapYear:function(){return M(this.year())},progress:function(e){return $e(this,e)},nearest:function(e){return ze(this,e)},diff:function(e,t){return Se(this,e,t)},since:function(e){return e||(e=this.clone().set()),Ze(this,e)},next:function(e){return this.add(1,e).startOf(e)},last:function(e){return this.subtract(1,e).startOf(e)},isValid:function(){return!(!this.epoch&&0!==this.epoch||isNaN(this.d.getTime()))},goto:function(e){let t=this.clone();return t.tz=O(e,t.timezones),t},every:function(e,t){if("object"==typeof e&&"string"==typeof t){let a=t;t=e,e=a}return at(this,e,t)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},daysInMonth:function(){switch(this.month()){case 0:case 2:case 4:case 6:case 7:case 9:case 11:return 31;case 1:return this.leapYear()?29:28;case 3:case 5:case 8:case 10:return 30;default:throw new Error("Invalid Month state.")}},log:function(){return console.log(""),console.log(ve(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(ve(this,"full-short")),this},json:function(){return rt.reduce(((e,t)=>(e[t]=this[t](),e)),{})},debug:function(){let e=this.timezone(),t=this.format("MM")+" "+this.format("date-ordinal")+" "+this.year();return t+="\n - "+this.format("time"),console.log("\n\n",t+"\n - "+e.name+" ("+e.current.offset+")"),this},from:function(e){return(e=this.clone().set(e)).since(this)},fromNow:function(){return this.clone().set(Date.now()).since(this)},weekStart:function(e){if("number"==typeof e)return this._weekStart=e,this;if("string"==typeof e){e=e.toLowerCase().trim();let t=fe().indexOf(e);-1===t&&(t=ye().indexOf(e)),-1===t&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};it.inDST=it.isDST,it.round=it.nearest,it.each=it.every;var ot=it;const st=e=>("string"==typeof e&&(e=parseInt(e,10)),e),ut=["year","month","date","hour","minute","second","millisecond"],dt=(e,t,a)=>{let n=ut.indexOf(a),r=ut.slice(n,ut.length);for(let a=0;a=24?t=24:t<0&&(t=0);let n=e.clone(),r=e.hour()-t,i=r*L.hour;return e.epoch-=i,e.date()!==n.date()&&(e=n.clone(),r>1&&(r-=1),r<1&&(r+=1),i=r*L.hour,e.epoch-=i),F(e,{hour:t}),dt(e,n,"minute"),(e=lt(e,n,a,"day")).epoch},ct=function(e,t){return"string"==typeof t&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=(t=Number(t))>30?1900+t:2e3+t),t=st(t),F(e,{year:t}),e.epoch};let ft="am",yt="pm";const pt={millisecond:function(e){if(void 0!==e){let t=this.clone();return t.epoch=function(e,t){t=st(t);let a=e.millisecond()-t;return e.epoch-a}(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(void 0!==e){let a=this.clone();return a.epoch=function(e,t,a){t=st(t);let n=e.clone(),r=(e.second()-t)*L.second;return e.epoch=e.epoch-r,(e=lt(e,n,a,"minute")).epoch}(a,e,t),a}return this.d.getSeconds()},minute:function(e,t){if(void 0!==e){let a=this.clone();return a.epoch=ht(a,e,t),a}return this.d.getMinutes()},hour:function(e,t){let a=this.d;if(void 0!==e){let a=this.clone();return a.epoch=mt(a,e,t),a}return a.getHours()},hourFloat:function(e,t){if(void 0!==e){let a=this.clone(),n=e%1;n*=60;let r=parseInt(e,10);return a.epoch=mt(a,r,t),a.epoch=ht(a,n,t),a}let a=this.d,n=a.getHours(),r=a.getMinutes();return r/=60,n+r},hour12:function(e,t){let a=this.d;if(void 0!==e){let a=this.clone(),n=(e=""+e).match(/^([0-9]+)(am|pm)$/);if(n){let e=parseInt(n[1],10);"pm"===n[2]&&(e+=12),a.epoch=mt(a,e,t)}return a}let n=a.getHours();return n>12&&(n-=12),0===n&&(n=12),n},time:function(e,t){if(void 0!==e){let a=this.clone();return e=e.toLowerCase().trim(),a.epoch=function(e,t,a){let n=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!n){if(n=t.match(/([0-9]{1,2}) ?(am|pm)/),!n)return e.epoch;n.splice(2,0,"0"),n.splice(3,0,"")}let r=!1,i=parseInt(n[1],10),o=parseInt(n[2],10);o>=60&&(o=59),i>12&&(r=!0),!1===r&&("am"===n[4]&&12===i&&(i=0),"pm"===n[4]&&i<12&&(i+=12)),n[3]=n[3]||"",n[3]=n[3].replace(/:/,"");let s=parseInt(n[3],10)||0,u=e.clone();return e=(e=(e=(e=e.hour(i)).minute(o)).second(s)).millisecond(0),(e=lt(e,u,a,"day")).epoch}(a,e,t),a}return`${this.h12()}:${$(this.minute())}${this.ampm()}`},ampm:function(e,t){let a=ft,n=this.hour();if(n>=12&&(a=yt),"string"!=typeof e)return a;let r=this.clone();return e=e.toLowerCase().trim(),n>=12&&"am"===e?(n-=12,r.hour(n,t)):n<12&&"pm"===e?(n+=12,r.hour(n,t)):r},dayTime:function(e,t){if(void 0!==e){const a={morning:"7:00",breakfast:"7:00",noon:"12:00",lunch:"12:00",afternoon:"14:00",evening:"18:00",dinner:"18:00",night:"23:00",midnight:"00:00"};let n=this.clone();return e=(e=e||"").toLowerCase(),!0===a.hasOwnProperty(e)&&(n=n.time(a[e],t)),n}let a=this.hour();return a<6?"night":a<12?"morning":a<17?"afternoon":a<22?"evening":"night"},iso:function(e){return void 0!==e?this.set(e):this.format("iso")}};var gt=pt;const wt={date:function(e,t){if(void 0!==e){let a=this.clone();return(e=parseInt(e,10))&&(a.epoch=function(e,t,a){if((t=st(t))>28){let a=e.month(),n=J[a];1===a&&29===t&&M(e.year())&&(n=29),t>n&&(t=n)}t<=0&&(t=1);let n=e.clone();return F(e,{date:t}),(e=lt(e,n,a,"month")).epoch}(a,e,t)),a}return this.d.getDate()},day:function(e,t){if(void 0===e)return this.d.getDay();let a=this.clone(),n=e;"string"==typeof e&&(e=e.toLowerCase(),pe.hasOwnProperty(e)?n=pe[e]:(n=fe().indexOf(e),-1===n&&(n=ye().indexOf(e))));let r=this.d.getDay()-n;!0===t&&r>0&&(r-=7),!1===t&&r<0&&(r+=7);let i=this.subtract(r,"days");return F(i,{hour:a.hour(),minute:a.minute(),second:a.second()}),i},dayName:function(e,t){if(void 0===e)return ye()[this.day()];let a=this.clone();return a=a.day(e,t),a}};var bt=wt;const kt=e=>e=(e=(e=e.minute(0)).second(0)).millisecond(1),Dt={dayOfYear:function(e,t){if(void 0!==e){let a=this.clone();return a.epoch=function(e,t,a){t=st(t);let n=e.clone();return(t-=1)<=0?t=0:t>=365&&(t=M(e.year())?365:364),e=(e=e.startOf("year")).add(t,"day"),dt(e,n,"hour"),(e=lt(e,n,a,"year")).epoch}(a,e,t),a}let a,n=0,r=this.d.getMonth();for(let e=1;e<=r;e++)a=new Date,a.setDate(1),a.setFullYear(this.d.getFullYear()),a.setHours(1),a.setMinutes(1),a.setMonth(e),a.setHours(-2),n+=a.getDate();return n+this.d.getDate()},week:function(e,t){if(void 0!==e){let a=this.clone();return a.epoch=function(e,t,a){let n=e.clone();return t=st(t),"december"===(e=(e=(e=e.month(0)).date(1)).day("monday")).monthName()&&e.date()>=28&&(e=e.add(1,"week")),t-=1,e=e.add(t,"weeks"),(e=lt(e,n,a,"year")).epoch}(this,e,t),a=kt(a),a}let a=this.clone();a=a.month(0),a=a.date(1),a=kt(a),a=a.day("monday"),11===a.month()&&a.date()>=25&&(a=a.add(1,"week"));let n=1;1===a.date()&&(n=0),a=a.minus(1,"second");const r=this.epoch;if(a.epoch>r)return 1;let i=0,o=4*this.month();for(a.epoch+=L.week*o,i+=o;i<=52;i++){if(a.epoch>r)return i+n;a=a.add(1,"week")}return 52},month:function(e,t){if(void 0!==e){let a=this.clone();return a.epoch=function(e,t,a){"string"==typeof t&&("sept"===t&&(t="sep"),t=U()[t.toLowerCase()]),(t=st(t))>=12&&(t=11),t<=0&&(t=0);let n=e.date();n>J[t]&&(n=J[t]);let r=e.clone();return F(e,{month:t,d:n}),(e=lt(e,r,a,"year")).epoch}(a,e,t),a}return this.d.getMonth()},monthName:function(e,t){if(void 0!==e){let a=this.clone();return a=a.month(e,t),a}return Q[this.month()]},quarter:function(e,t){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),et[e])){let a=this.clone(),n=et[e][0];return a=a.month(n,t),a=a.date(1,t),a=a.startOf("day"),a}let a=this.d.getMonth();for(let e=1;e=Xe[a][e][1]&&n0&&(t.epoch=ct(t,-1*a)),"ad"===e&&a<0&&(t.epoch=ct(t,-1*a)),t}return this.d.getFullYear()<0?"BC":"AD"},decade:function(e){if(void 0!==e){if(!(e=(e=(e=String(e)).replace(/([0-9])'?s$/,"$1")).replace(/([0-9])(th|rd|st|nd)/,"$1")))return console.warn("Spacetime: Invalid decade input"),this;2===e.length&&/[0-9][0-9]/.test(e)&&(e="19"+e);let t=Number(e);return isNaN(t)?this:(t=10*Math.floor(t/10),this.year(t))}return this.startOf("decade").year()},century:function(e){if(void 0!==e){"string"==typeof e&&(e=(e=(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1")).replace(/([0-9]+) ?(b\.?c\.?|a\.?d\.?)/i,((e,t,a)=>(a.match(/b\.?c\.?/i)&&(t="-"+t),t)))).replace(/c$/,""));let t=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(0===t&&(t=1),t=t>=0?100*(t-1):100*(t+1),this.year(t))}let t=this.startOf("century").year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(void 0!==e){if("string"==typeof e&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=Number(e),isNaN(e)))return console.warn("Spacetime: Invalid millenium input"),this;e>0&&(e-=1);let t=1e3*e;return 0===t&&(t=1),this.year(t)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}};var vt=Dt;const xt=Object.assign({},gt,bt,vt);xt.milliseconds=xt.millisecond,xt.seconds=xt.second,xt.minutes=xt.minute,xt.hours=xt.hour,xt.hour24=xt.hour,xt.h12=xt.hour12,xt.h24=xt.hour24,xt.days=xt.day;var Ot=e=>{Object.keys(xt).forEach((t=>{e.prototype[t]=xt[t]}))};const Mt=function(e,t){return 1===e&&M(t)?29:J[e]},_t=(e,t)=>{if(e.month>0){let a=parseInt(e.month/12,10);e.year=t.year()+a,e.month=e.month%12}else if(e.month<0){let a=Math.abs(e.month),n=parseInt(a/12,10);a%12!=0&&(n+=1),e.year=t.year()-n,e.month=e.month%12,e.month=e.month+12,12===e.month&&(e.month=0)}return e},jt=(e,t,a)=>{let n=t.year(),r=t.month(),i=Mt(r,n);for(;a>i;)a-=i,r+=1,r>=12&&(r-=12,n+=1),i=Mt(r,n);return e.month=r,e.date=a,e},$t=(e,t,a)=>{e.year=t.year(),e.month=t.month();let n=t.date();for(e.date=n-Math.abs(a);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let t=Mt(e.month,e.year);e.date+=t}return e},zt=["millisecond","second","minute","hour","date","month"];let Tt={second:zt.slice(0,1),minute:zt.slice(0,2),quarterhour:zt.slice(0,2),hour:zt.slice(0,3),date:zt.slice(0,4),month:zt.slice(0,4),quarter:zt.slice(0,4),season:zt.slice(0,4),year:zt,decade:zt,century:zt};Tt.week=Tt.hour,Tt.season=Tt.date,Tt.quarter=Tt.date;const Vt={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},qt={month:!0,quarter:!0,season:!0,year:!0};var St=e=>{e.prototype.add=function(e,t){let a=this.clone();if(!t||0===e)return a;let n=this.clone();if("millisecond"===(t=V(t)))return a.epoch+=e,a;"fortnight"===t&&(e*=2,t="week"),L[t]?a.epoch+=L[t]*e:"week"===t||"weekend"===t?a.epoch+=L.day*(7*e):"quarter"===t||"season"===t?a.epoch+=L.month*(3*e):"quarterhour"===t&&(a.epoch+=15*L.minute*e);let r={};if(Tt[t]&&Tt[t].forEach((e=>{r[e]=n[e]()})),Vt[t]){const e=n.timezone().current.offset-a.timezone().current.offset;a.epoch+=3600*e*1e3}if("month"===t&&(r.month=n.month()+e,r=_t(r,n)),"week"===t){let t=n.date()+7*e;t<=28&&t>1&&(r.date=t)}if("weekend"===t&&"saturday"!==a.dayName())a=a.day("saturday",!0);else if("date"===t){if(e<0)r=$t(r,n,e);else{let t=n.date()+e;r=jt(r,n,t)}0!==e&&n.isSame(a,"day")&&(r.date=n.date()+e)}else if("quarter"===t){if(r.month=n.month()+3*e,r.year=n.year(),r.month<0){let e=Math.floor(r.month/12),t=r.month+12*Math.abs(e);r.month=t,r.year+=e}else if(r.month>=12){let e=Math.floor(r.month/12);r.month=r.month%12,r.year+=e}r.date=n.date()}else if("year"===t){let t=n.year()+e,r=a.year();if(rt){let t=Math.floor(e/4)||1;a.epoch+=L.day*t}}else"decade"===t?r.year=a.year()+10:"century"===t&&(r.year=a.year()+100);if(qt[t]){let e=J[r.month];r.date=n.date(),r.date>e&&(r.date=e)}return Object.keys(r).length>1&&F(a,r),a},e.prototype.subtract=function(e,t){return this.clone().add(-1*e,t)},e.prototype.minus=e.prototype.subtract,e.prototype.plus=e.prototype.add};const Ct={millisecond:e=>e.epoch,second:e=>[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second()].join("-"),minute:e=>[e.year(),e.month(),e.date(),e.hour(),e.minute()].join("-"),hour:e=>[e.year(),e.month(),e.date(),e.hour()].join("-"),day:e=>[e.year(),e.month(),e.date()].join("-"),week:e=>[e.year(),e.week()].join("-"),month:e=>[e.year(),e.month()].join("-"),quarter:e=>[e.year(),e.quarter()].join("-"),year:e=>e.year()};Ct.date=Ct.day;var At=e=>{e.prototype.isSame=function(t,a,n=!0){let r=this;if(!a)return null;if("string"==typeof t&&"object"==typeof a){let e=t;t=a,a=e}return"string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),a=a.replace(/s$/,""),!0===n&&r.tz!==t.tz&&((t=t.clone()).tz=r.tz),Ct[a]?Ct[a](r)===Ct[a](t):null}},Et=e=>{const t={isAfter:function(e){let t=q(e=S(e,this));return null===t?null:this.epoch>t},isBefore:function(e){let t=q(e=S(e,this));return null===t?null:this.epoch{e.prototype[a]=t[a]}))},Nt=e=>{const t={i18n:function(e){var t,a,n;return j(e.days)&&(t=e.days,me=t.short||me,ce=t.long||ce),j(e.months)&&function(e){K=e.short||K,Q=e.long||Q}(e.months),n=e.useTitleCase,"[object Boolean]"===Object.prototype.toString.call(n)&&(a=e.useTitleCase,ge=a),j(e.ampm)&&function(e){ft=e.am||ft,yt=e.pm||yt}(e.ampm),j(e.distance)&&function(e){We=e.pastDistance||We,Fe=e.futureDistance||Fe,Pe=e.past||Pe,Ye=e.future||Ye,Be=e.present||Be,He=e.now||He,Le=e.almost||Le,Ie=e.over||Ie}(e.distance),j(e.units)&&function(e={}){Ee={second:e.second||Ee.second,seconds:e.seconds||Ee.seconds,minute:e.minute||Ee.minute,minutes:e.minutes||Ee.minutes,hour:e.hour||Ee.hour,hours:e.hours||Ee.hours,day:e.day||Ee.day,days:e.days||Ee.days,month:e.month||Ee.month,months:e.months||Ee.months,year:e.year||Ee.year,years:e.years||Ee.years}}(e.units),this}};Object.keys(t).forEach((a=>{e.prototype[a]=t[a]}))};let Pt=f;const Yt=function(e,t,a={}){this.epoch=null,this.tz=O(t,Pt),this.silent=void 0===a.silent||a.silent,this.british=a.dmy||a.british,this._weekStart=1,void 0!==a.weekStart&&(this._weekStart=a.weekStart),this._today={},void 0!==a.today&&(this._today=a.today),Object.defineProperty(this,"d",{get:function(){let e=l(this),t=(new Date(this.epoch).getTimezoneOffset()||0)+60*e;t=60*t*1e3;let a=this.epoch+t;return new Date(a)}}),Object.defineProperty(this,"timezones",{get:()=>Pt,set:e=>(Pt=e,e)});let n=he(this,e);this.epoch=n.epoch,n.tz&&(this.tz=n.tz)};Object.keys(ot).forEach((e=>{Yt.prototype[e]=ot[e]})),Yt.prototype.clone=function(){return new Yt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})},Yt.prototype.toLocalDate=function(){return this.toNativeDate()},Yt.prototype.toNativeDate=function(){return new Date(this.epoch)},Ot(Yt),St(Yt),At(Yt),Et(Yt),Nt(Yt);var Bt=Yt,Ht=(e,t)=>{let a=new Bt(null),n=new Bt(null);a=a.time(e),n=t?n.time(t):a.add(59,"minutes");let r=a.hour(),i=n.hour();return Object.keys(a.timezones).filter((e=>{if(-1===e.indexOf("/"))return!1;let t=new Bt(null,e),o=t.hour();return o>=r&&o<=i&&!(o===r&&t.minute()n.minute())}))};const Lt=(e,t,a)=>new Bt(e,t,a),It=function(e){let t=e._today||{};return Object.keys(t).forEach((a=>{e=e[a](t[a])})),e};Lt.now=(e,t)=>{let a=new Bt((new Date).getTime(),e,t);return a=It(a),a},Lt.today=(e,t)=>{let a=new Bt((new Date).getTime(),e,t);return a=It(a),a.startOf("day")},Lt.tomorrow=(e,t)=>{let a=new Bt((new Date).getTime(),e,t);return a=It(a),a.add(1,"day").startOf("day")},Lt.yesterday=(e,t)=>{let a=new Bt((new Date).getTime(),e,t);return a=It(a),a.subtract(1,"day").startOf("day")},Lt.extend=function(e={}){return Object.keys(e).forEach((t=>{Bt.prototype[t]=e[t]})),this},Lt.timezones=function(){return(new Bt).timezones},Lt.max=function(e,t){let a=new Bt(null,e,t);return a.epoch=864e13,a},Lt.min=function(e,t){let a=new Bt(null,e,t);return a.epoch=-864e13,a},Lt.whereIts=Ht,Lt.version="7.6.0",Lt.plugin=Lt.extend;var Wt=Lt;const Ft={daybreak:"7:00am",breakfast:"8:00am",morning:"9:00am",noon:"12:00pm",midday:"12:00pm",afternoon:"2:00pm",lunchtime:"12:00pm",evening:"6:00pm",dinnertime:"6:00pm",night:"8:00pm",eod:"10:00pm",midnight:"12:00am",am:"9:00am",pm:"5:00pm","early day":"8:00am","late at night":"11:00pm"},Jt={quarter:15,half:30},Kt=function(e){let t=e.time("6:00am");return e.isBefore(t)?e.ampm("pm"):e};var Qt=function(e,t){let a=e.match("(at|by|for|before|this|after)? #Time+");a=a.not("^(at|by|for|before|this|after)"),a=a.not("sharp"),a=a.not("on the dot");let n=Wt.now(t.timezone),r=n.clone(),i=a.not("in the").text("reduced");if(i=i.replace(/^@/,""),Ft.hasOwnProperty(i))return{result:Ft[i],m:a};let o=a.match("^#Cardinal oclock (am|pm)?");if(o.found&&(n=n.hour(o.text("reduced")),n=n.startOf("hour"),n.isValid()&&!n.isEqual(r))){let e=o.match("(am|pm)");return n=e.found?n.ampm(e.text("reduced")):Kt(n),{result:n.time(),m:o}}if(o=a.match("(half|quarter|25|20|15|10|5) (past|after|to) #Cardinal"),o.found&&(n=function(e,t){let a=e.match("#Cardinal$"),n=e.not(a).match("(half|quarter|25|20|15|10|5)");a=a.text("reduced");let r=n.text("reduced");Jt.hasOwnProperty(r)&&(r=Jt[r]);let i=e.has("to");return t=(t=t.hour(a)).startOf("hour"),a<6&&(t=t.ampm("pm")),i?t.subtract(r,"minutes"):t.add(r,"minutes")}(o,n),n.isValid()&&!n.isEqual(r)))return n=Kt(n),{result:n.time(),m:o};if(o=a.match("[(half|quarter|25|20|15|10|5)] (past|after)"),o.found){let e=o.groups("min").text("reduced"),a=Wt(t.today);if(Jt.hasOwnProperty(e)&&(e=Jt[e]),a=a.next("hour").startOf("hour").minute(e),a.isValid()&&!a.isEqual(r))return{result:a.time(),m:o}}if(o=a.match("[(half|quarter|25|20|15|10|5)] to"),o.found){let e=o.groups("min").text("reduced"),a=Wt(t.today);if(Jt.hasOwnProperty(e)&&(e=Jt[e]),a=a.next("hour").startOf("hour").minus(e,"minutes"),a.isValid()&&!a.isEqual(r))return{result:a.time(),m:o}}if(o=a.match("[