Free javascript Hosting


compromise-dates.js

Uploaded on Oct 14 2021 04:17 by abhatia88

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).compromiseDates=t()}(this,(function(){"use strict";const e="(in|by|before|during|on|until|after|of|within|all)",t="(last|next|this|previous|current|upcoming|coming)",a="(start|end|middle|starting|ending|midpoint|beginning)",n="(spring|summer|winter|fall|autumn)",r=(e,t)=>{!0===e.found&&e.forEach((e=>{let a=e.text("reduced"),n=parseInt(a,10);n&&n>1e3&&n<3e3&&e.tag("Year",t)}))},i=(e,t)=>{!0===e.found&&e.forEach((e=>{let a=e.text("reduced"),n=parseInt(a,10);n&&n>1900&&n<2030&&e.tag("Year",t)}))};var o=function(o){o.match("in the (night|evening|morning|afternoon|day|daytime)").tag("Time","in-the-night"),o.match("(#Value|#Time) (am|pm)").tag("Time","value-ampm"),o.match("/^[0-9]{4}-[0-9]{2}$/").tag("Date","2012-06"),o.match("(tue|thu)").tag("WeekDay","misc-weekday"),o.match("(march|april|may) (and|to|or|through|until)? (march|april|may)").tag("Date").match("(march|april|may)").tag("Month","march|april|may");let s=o.if("#Month");!0===s.found&&(s.match("#Month #Date+").tag("Date","correction-numberRange"),s.match("#Value of #Month").tag("Date","value-of-month"),s.match("#Cardinal #Month").tag("Date","cardinal-month"),s.match("#Month #Value (and|or|to)? #Value+").tag("Date","value-to-value"),s.match("#Month the #Value").tag("Date","month-the-value"),s.match("(march|may) to? #Date").tag("Date").match("^.").tag("Month","march-to"),s.match("^(march|may)$").tag("Month","single-march"),s.match("#Month or #Month").tag("Date","month-or-month"));let u=o.if("#Value");if(!0===u.found){u.match("(#WeekDay|#Month) #Value").ifNo("#Money").tag("Date","date-value"),u.match("#Value (#WeekDay|#Month)").ifNo("#Money").tag("Date","value-date"),u.match("#TextValue #TextValue").if("#Date").tag("#Date","textvalue-date"),u.match("#Value (#WeekDay|#Duration) back").tag("#Date","3-back");let t=u.if("#Duration");!0===t.found&&(t.match("for #Value #Duration").tag("Date","for-x-duration"),t.match("#Value #Duration #Conjunction").tag("Date","val-duration-conjunction"),t.match(e+"? #Value #Duration").tag("Date","value-duration"),t.match("#Value #Duration old").unTag("Date","val-years-old"))}let d=o.if(n);!0===d.found&&(d.match(`${e}? ${t} ${n}`).tag("Date","thisNext-season"),d.match(`the? ${a} of ${n}`).tag("Date","section-season"),d.match(`${n} ${e}? #Cardinal`).tag("Date","season-year"));let l=o.if("#Date");!0===l.found&&(l.match("#Date the? #Ordinal").tag("Date","correction"),l.match(t+" #Date").tag("Date","thisNext-date"),l.match("due? (by|before|after|until) #Date").tag("Date","by"),l.match("(last|next|this|previous|current|upcoming|coming|the) #Date").tag("Date","next-feb"),l.match(`the? ${a} of #Date`).tag("Date","section-of"),l.match("#Ordinal #Duration in #Date").tag("Date","duration-in"),l.match("(early|late) (at|in)? the? #Date").tag("Time","early-evening"),l.match("#Date (by|before|after|at|@|about) #Cardinal").not("^#Date").tag("Time","date-before-Cardinal"),l.match("#Date [(am|pm)]",0).unTag("Verb").unTag("Copula").tag("Time","date-am"),l.match("#Date (#Preposition|to) #Date").ifNo("#Duration").tag("Date","date-prep-date"));let h=o.if("#Cardinal");if(!0===h.found){let e=h.match("#Date #Value [#Cardinal]",0);r(e,"date-value-year"),e=h.match("#Date [#Cardinal]",0),i(e,"date-year"),e=h.match(a+" of [#Cardinal]"),i(e,"section-year"),e=h.match("#Month #Value [#Cardinal]",0),r(e,"month-value-year"),e=h.match("#Month #Value to #Value [#Cardinal]",0),r(e,"month-range-year"),e=h.match("(in|of|by|during|before|starting|ending|for|year|since) [#Cardinal]",0),r(e,"in-year-1"),e=h.match("(q1|q2|q3|q4) [#Cardinal]",0),r(e,"in-year-2"),e=h.match("#Ordinal quarter of? [#Cardinal]",0),r(e,"in-year-3"),e=h.match("the year [#Cardinal]",0),r(e,"in-year-4"),e=h.match("it (is|was) [#Cardinal]",0),i(e,"in-year-5"),h.match(a+" of #Year").tag("Date");let t=h.match("between [#Cardinal] and [#Cardinal]");r(t.groups("0"),"between-year-and-year-1"),r(t.groups("1"),"between-year-and-year-2")}let m=o.if("#Time");!0===m.found&&m.match("(by|before|after|at|@|about) #Time").tag("Time","preposition-time");let c=o.match("^/^20[012][0-9]$/$");return i(c,"2020-ish"),o.match("(in|after) /^[0-9]+(min|sec|wk)s?/").tag("Date","shift-units"),o.match("#Date [(now|night|sometime)]",0).tag("Time","date-now"),o.match("(from|starting|until|by) now").tag("Date","for-now"),o.match("(each|every) night").tag("Date","for-now"),o};const s="date-values";var u=function(e){return e.has("#Value")&&(e.match("#Month #Value to #Value of? #Year?").tag("Date",s),e.match("#Value to #Value of? #Month #Year?").tag("Date",s),e.match("#Value #Duration of #Date").tag("Date",s),e.match("#Value+ #Duration (after|before|into|later|afterwards|ago)?").tag("Date",s),e.match("#Value #Date").tag("Date",s),e.match("#Date #Value").tag("Date",s),e.match("#Date #Preposition #Value").tag("Date",s),e.match("#Date (after|before|during|on|in) #Value").tag("Date",s),e.match("#Value (year|month|week|day) and a half").tag("Date",s),e.match("#Value and a half (years|months|weeks|days)").tag("Date",s),e.match("on the #Ordinal").tag("Date",s),e.match("#Month #Value+ (and|or) #Value").tag("Date","date-or-date"),e.match("#Value+ (and|or) #Value of #Month ").tag("Date","date-and-date")),e};const d="date-tagger";var l=function(e){return e.match("(spring|summer|winter|fall|autumn|springtime|wintertime|summertime)").match("#Noun").tag("Season",d),e.match("(q1|q2|q3|q4)").tag("FinancialQuarter",d),e.match("(this|next|last|current) quarter").tag("FinancialQuarter",d),e.match("(this|next|last|current) season").tag("Season",d),e.has("#Date")&&(e.match("#Date #Preposition #Date").tag("Date",d),e.match("(once|twice) (a|an|each) #Date").tag("Date",d),e.match("#Date+").tag("Date",d),e.match("(by|until|on|in|at|during|over|every|each|due) the? #Date").notIf("#PhrasalVerb").tag("Date","until-june"),e.match("a #Duration").tag("Date",d),e.match("(between|from) #Date").tag("Date",d),e.match("(to|until|upto) #Date").tag("Date",d),e.match("#Date and #Date").tag("Date",d),e.match("(by|until|after|before|during|on|in|following|since) (next|this|last)? (#Date|#Date)").notIf("#PhrasalVerb").tag("Date",d),e.match("the? #Date after next one?").tag("Date",d),e.match("(about|approx|approximately|around) #Date").tag("Date",d)),e};const h="section-tagger";var m=function(e){return e.has("#Date")&&(e.match("this? (last|next|past|this|previous|current|upcoming|coming|the) #Date").tag("Date",h),e.match("(starting|beginning|ending) #Date").tag("Date",h),e.match("the? (start|end|middle|beginning) of (last|next|this|the) (#Date|#Date)").tag("Date",h),e.match("(the|this) #Date").tag("Date",h),e.match("#Date up to #Date").tag("Date",h)),e};const c="time-tagger",f=function(e,t){if(e.found){e.tag("Date",t),e.numbers().lessThan(31).ifNo("#Year").tag("#Time",t)}};var y=function(e){e.match("#Cardinal oclock").tag("Time",c),e.match("/^[0-9]{2}h[0-9]{2}$/").tag("Time",c),e.match("/^[0-9]{2}/[0-9]{2}/").tag("Date",c).unTag("Value"),e.match("[#Value] (in|at) the? (morning|evening|night|nighttime)").tag("Time",c),e.has("#Month")||(e.match("(5|10|15|20|five|ten|fifteen|quarter|twenty|half) (to|after|past) #Cardinal").tag("Time",c),e.match("(at|by|before) (5|10|15|20|five|ten|fifteen|twenty|quarter|half) (after|past|to)").tag("Time","at-20-past"));let t=e.if("#Date");if(t.found){t.match("/^[0-9]{4}[:-][0-9]{2}[:-][0-9]{2}T[0-9]/").tag("Time",c),t.match("#Date [at #Cardinal]",0).notIf("#Year").tag("Time",c),t.match("half an (hour|minute|second)").tag("Date",c),t.match("(in|for|by|near|at) #Timezone").tag("Timezone",c),t.match("#Time to #Time").tag("Date",c),t.match("#Time [(sharp|on the dot)]",0).tag("Time",c);let a=t.if("#NumberRange");if(a.found){let e=a.match("[#NumberRange+] (on|by|at)? #WeekDay",0);f(e,"3-4-tuesday"),a.match("[#NumberRange+] (on|by|at)? #Month #Value",0),f(e,"3-4 mar 3"),a.match("[#NumberRange] to (#NumberRange && #Time)",0),f(e,"3-4pm"),a.match("(#NumberRange && #Time) to [#NumberRange]",0),f(e,"3pm-4")}let n=t.match("(from|between) #Cardinal and #Cardinal (in|on)? (#WeekDay|tomorrow|yesterday)");f(n,"from 9-5 tues"),n=e.match("#Cardinal to #Cardinal (#WeekDay|tomorrow|yesterday)"),f(n,"9-5 tues"),n=t.match("(from|between) [#NumericValue] (to|and) #Time",0).tag("Time","4-to-5pm"),f(n,"from 9-5pm"),n=t.match("(#WeekDay|tomorrow|yesterday) (from|between)? (#Cardinal|#Time) (and|to) (#Cardinal|#Time)"),f(n,"tues 3-5"),n=t.match("#Month #Value+ (from|between) [<time>(#Cardinal|#Time) (and|to) (#Cardinal|#Time)]").group("time"),f(n,"sep 4 from 9-5"),n=t.match("#Time to #Cardinal on? #Date"),f(n,"3pm-4 wed"),n=t.match("#Cardinal to #Time on? #Date"),f(n,"3-4pm wed"),n=t.match("#Cardinal to #Cardinal on? (#WeekDay|#Month #Value)"),f(n,"3-4 wed")}return e.match("(at|around|near|#Date) [#Cardinal (thirty|fifteen) (am|pm)?]",0).tag("Time",c),e.match("(anytime|sometime) (before|after|near) #Cardinal").tag("Date","antime-after-3").lastTerm().tag("Time"),e};const p="shift-tagger";var g=function(e){return e.has("#Date")&&(e.match("#Cardinal #Duration (before|after|ago|from|hence|back)").tag("DateShift",p),e.match("in #Cardinal #Duration").tag("DateShift",p),e.match("in a (few|couple) of? #Duration").tag("DateShift",p),e.match("#Cardinal #Duration and? #DateShift").tag("DateShift",p),e.match("#DateShift and #Cardinal #Duration").tag("DateShift",p),e.match("[#Duration (after|before)] #Date",0).tag("DateShift",p),e.match("in half (a|an) #Duration").tag("DateShift",p)),e};var b=function(e){e.match("#Month #Ordinal and #Ordinal").tag("Date","ord-and-ord"),e.match("every other #Duration").tag("Date","every-other"),e.match("(every|any|each|a) (day|weekday|week day|weekend|weekend day)").tag("Date","any-weekday"),e.match("(every|any|each|a) (#WeekDay)").tag("Date","any-wednesday"),e.match("(every|any|each|a) (#Duration)").tag("Date","any-week")};const w=["act","aft","akst","anat","art","azot","azt","bnt","bot","bt","cast","cat","cct","chast","chut","ckt","cvt","cxt","davt","eat","ect","fjt","fkst","fnt","gamt","get","gft","gilt","gyt","hast","hncu","hneg","hnnomx","hnog","hnpm","hnpmx","hntn","hovt","iot","irkt","jst","kgt","kost","lint","magt","mart","mawt","mmt","nct","nft","novt","npt","nrt","nut","nzst","omst","pet","pett","phot","phst","pont","pwt","ret","sakt","samt","sbt","sct","sret","srt","syot","taht","tft","tjt","tkt","tlt","tmt","tot","tvt","ulat","vut","wakt","wat","wet","wft","wit","wst","yekt"].reduce(((e,t)=>(e[t]=!0,e)),{});const k="fix-tagger";const v=[o,u,l,m,y,g,b,function(e){let t=e.match("#Time [#Acronym]",0);if(t.found){let e=t.text("reduced");!0===w[e]&&t.tag("Timezone","tz-abbr")}},function(e){if(e.has("#Date")){let t=e.match("#Date+ by #Date+");t.found&&!t.has("^due")&&t.match("^#Date+").unTag("Date","by-monday"),e.match("[(wed|sat)] (#Month|#Year)",0).tag("WeekDay","wed");let a=e.match("#Date+");a.match("^day$").unTag("Date","spa-day"),a.match("(in|of|by|for)? (#Possessive && #Date)").unTag("Date","tomorrows meeting");let n="(yesterday|today|tomorrow)";a.has(n)&&(a.match(n+" [#Value]$").unTag("Date","yesterday-7"),a.match(`^[#Value] ${n}$`,0).unTag("Date","7 yesterday"),a.match(`#WeekDay+ ${n}$`).unTag("Date").lastTerm().tag("Date","fri-yesterday")),a.match("on #Cardinal$").unTag("Date","on 5"),a.match("this tomorrow").terms(0).unTag("Date","this-tomorrow"),a.match("(q1|q2|q3|q4) #Year").tag("Date",k),a.match("^#Value (this|next|last)").terms(0).unTag("Date","4 next"),a.has("(last|this|next)")&&(a.match("(last|this|next) #Duration #Value").terms(2).unTag("Date","this month 7"),a.match("!#Month #Value (last|this|next) #Date").terms(0).unTag("Date","7 this month")),a.has("^between")&&!a.has("and .")&&a.unTag("Date",k),a.match("(in|over) the #Duration #Date+?").unTag("Date","over-the-duration"),a.has("(minutes|seconds|weeks|hours|days|months)")&&!a.has("#Value #Duration")&&a.match("(minutes|seconds|weeks|hours|days|months)").unTag("Date","log-hours"),a.has("about #Holiday")&&a.match("about").unTag("#Date","about-thanksgiving"),a.match("#Ordinal quarter of? #Year").unTag("Fraction"),a.match("(from|by|before) now").unTag("Time"),a.match("#Date+").match("^the").unTag("Date")}return e}];var D=function(e){return e=function(e){return"function"==typeof e.numbers?e.numbers().normalize():console.warn("Warning: compromise-numbers plugin is not loaded.\n You should load this plugin \n - https://bit.ly/3t8RfFG"),e}(e),v.forEach((t=>t(e))),e};var x=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)),e=e.not("^and"))};var A=function(e){"date"===e.world.isVerbose()&&(e.debug(),console.log(" ---"));let t=e.match("#Date+");t=t.filter((e=>{let t=e.has("^#Duration+$")||e.has("^#Value #Duration+$");return!(!0!==t||!e.has("(#FinancialQuarter|quarter)"))||!1===t}));let a=t.match("[#Cardinal #Duration (in|on|this|next|during|for)] #Date",0);return a.found&&(t=t.not(a)),a=t.match("[#Cardinal #Duration] #WeekDay",0),a.found&&(t=t.not(a)),a=t.match("#Date [for #Value #Duration]$",0),a.found&&(t=t.not(a)),a=t.match("[#Cardinal #Duration] #Date",0),a.found&&!t.has("#Cardinal #Duration] (ago|from|before|after|back)")&&(t=t.not(a)),a=t.match("for #Cardinal #Duration"),a.found&&(t=t.not(a)),t=t.notIf("^one (#WeekDay|#Month)$"),t=x(t),t},O={FinancialQuarter:{isA:"Date",notA:"Fraction"},Season:{isA:"Date"},Year:{isA:["Date"],notA:"RomanNumeral"},Duration:{isA:["Date","Noun"]},Holiday:{isA:["Date","Noun"]},DateShift:{isA:["Date"],notA:["TimeZone","Holiday"]}};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function z(e){var t={exports:{}};return e(t,t.exports),t.exports}var j=z((function(e,t){e.exports=function(){const e=36e5,t=(t,a,n)=>{const[r,i]=t.split("/"),[o,s]=i.split(":");return Date.UTC(n,r-1,o,s)-a*e};var a=(e,a,n,r,i)=>{const o=new Date(e).getUTCFullYear(),s=t(a,i,o),u=t(n,r,o);return e>=s&&e<u},n=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 n=t.offset,r=t.offset+1;"n"===t.hem&&(r=n-1);let i=t.dst.split("->");return!0===a(e.epoch,i[0],i[1],n,r)?n:r},r={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,11/palau","9.5|s|04/04:03->10/03:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/08:01->10/04:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west","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","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/saigon,2/tomsk,2/vientiane,2/ho_chi_minh","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/rangoon,9/cocos,2/yangon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/baku,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/katmandu,2/kathmandu","5.5|n":"2/calcutta,2/colombo,2/kolkata","4|s":"9/reunion","4|n":"2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,2/volgograd,9/mahe,9/mauritius","4.5|n|03/22:00->09/21:24":"2/tehran","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|03/28:03->10/31:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kiev,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia","3|n|03/28:02->10/31:03":"8/chisinau,8/tiraspol","3|n|03/28:00->10/30:24":"2/beirut","3|n|03/27:00->10/30:01":"2/gaza,2/hebron","3|n|03/26:02->10/31:02":"2/jerusalem,2/tel_aviv","3|n|03/26:00->10/29:01":"2/amman","3|n|03/26:00->10/28:24":"2/damascus","3|n":"0/addis_ababa,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/baghdad,2/bahrain,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,0/asmara,2/istanbul","2|s|03/28:02->10/31:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/28:02->10/31: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","2|n":"0/blantyre,0/bujumbura,0/cairo,0/khartoum,0/kigali,0/tripoli,8/kaliningrad","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|04/11:03->05/16:02":"0/casablanca,0/el_aaiun","1|n|03/28:01->10/31:02":"3/canary,3/faeroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faroe,8/belfast","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|04/04:04->09/26:03":"11/apia","13|s|01/15:02->11/05:03":"11/tongatapu","13|n":"11/enderbury,11/fakaofo","12|s|04/04:03->09/26:02":"12/mcmurdo,11/auckland,12/south_pole","12|s|01/17:03->11/14:02":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis","12.75|s|04/04:03->09/26:02":"11/chatham","11|s|04/04:03->10/03:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/ponape,11/pohnpei","11.5|n|04/04:03->10/03:02":"11/norfolk","10|s|04/04:03->10/03: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,2/yakutsk,11/guam,11/saipan,11/truk,11/chuuk,11/yap","10.5|s|04/04:01->10/03:02":"4/lord_howe,4/lhi","0|n|03/28:00->10/31: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/gmt-0,13/gmt+0,13/gmt0,13/greenwich,13/uct,13/universal,13/zulu","-9|n|03/14:02->11/07:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/14:02->11/07:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/14:02->11/07:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n|03/08:02->11/01:01":"1/dawson,1/whitehorse,6/yukon","-7|n":"1/creston,1/dawson_creek,1/fort_nelson,1/hermosillo,1/phoenix,us/arizona","-6|s|04/03:22->09/04:22":"11/easter,7/easterisland","-6|n|04/04:02->10/31:02":"1/chihuahua,1/mazatlan,10/bajasur","-6|n|03/14:02->11/07:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/ojinaga,1/yellowknife,1/shiprock,6/mountain,us/mountain","-6|n":"1/belize,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|04/04:02->10/31:02":"1/bahia_banderas,1/merida,1/mexico_city,1/monterrey,10/general","-5|n|03/14:02->11/07: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|03/12:03->11/05:01":"1/north_dakota","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan","-4|s|05/13:23->08/13:01":"12/palmer","-4|s|04/03:24->09/05:00":"1/santiago,7/continental","-4|s|03/27:24->10/03:00":"1/asuncion","-4|s|02/16:24->11/03:00":"1/campo_grande,1/cuiaba","-4|s":"1/la_paz,1/manaus,5/west","-4|n|03/14:02->11/07:02":"1/detroit,1/grand_turk,1/indianapolis,1/iqaluit,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/14:00->11/07:01":"1/havana","-4|n|03/12:03->11/05:01":"1/indiana,1/kentucky","-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/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/buenos_aires,1/argentina/catamarca,1/argentina/comodrivadavia,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/rosario,5/east","-3|n|03/14:02->11/07: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/27:22->10/30:23":"1/godthab,1/nuuk","-2|n|03/14:02->11/07:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/14:02->11/07: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"},i=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];function o(e,t){return e(t={exports:{}},t.exports),t.exports}function s(e){return e&&e.default||e}var u=s(Object.freeze({__proto__:null,default:r}));let d={};Object.keys(u).forEach((e=>{let t=e.split("|"),a={offset:Number(t[0]),hem:t[1]};t[2]&&(a.dst=t[2]),u[e].split(",").forEach((e=>{e=e.replace(/(^[0-9]+)\//,((e,t)=>(t=Number(t),i[t]+"/"))),d[e]=a}))})),d.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;d[a]={offset:-1*e,hem:"n"},a="utc/gmt"+t,d[a]={offset:-1*e,hem:"n"}}var l=d;const h="utc",m=()=>{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},c=/(\-?[0-9]+)h(rs)?/i,f=/(\-?[0-9]+)/,y=/utc([\-+]?[0-9]+)/i,p=/gmt([\-+]?[0-9]+)/i,g=function(e){return(e=Number(e))>=-13&&e<=13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null};var b=function(e){let t=e.match(c);if(null!==t)return g(t[1]);if(t=e.match(y),null!==t)return g(t[1]);if(t=e.match(p),null!==t){let e=-1*Number(t[1]);return g(e)}return t=e.match(f),null!==t?g(t[1]):null};const w=(()=>{let e=m();return null===e?h:e})(),k=Object.keys(l).reduce(((e,t)=>{let a=t.split("/")[1]||"";return a=a.replace(/_/g," "),e[a]=t,e}),{}),v=e=>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");var D=(e,t)=>{if(!e)return w;"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=v(a),!0===t.hasOwnProperty(a))return a;if(!0===k.hasOwnProperty(a))return k[a];if(!0===/[0-9]/.test(a)){let e=b(a);if(e)return e}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")},x=o((function(e,t){t.isLeapYear=e=>e%4==0&&e%100!=0||e%400==0,t.isDate=e=>"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf()),t.isArray=e=>"[object Array]"===Object.prototype.toString.call(e),t.isObject=e=>"[object Object]"===Object.prototype.toString.call(e),t.isBoolean=e=>"[object Boolean]"===Object.prototype.toString.call(e),t.zeroPad=(e,t=2)=>{let a="0";return(e+="").length>=t?e:new Array(t-e.length+1).join(a)+e},t.titleCase=e=>e?e[0].toUpperCase()+e.substr(1):"",t.ordinal=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"},t.toCardinal=e=>(e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)),t.normalize=(e="")=>"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===e?"date":"min"===e||"mins"===e?"minute":e,t.getEpoch=e=>"number"==typeof e?e:t.isDate(e)?e.getTime():e.epoch?e.epoch:null,t.beADate=(e,a)=>!1===t.isObject(e)?a.clone().set(e):e,t.formatTimezone=(e,a="")=>{const n=e>0?"+":"-",r=Math.abs(e),i=t.zeroPad(parseInt(""+r,10)),o=t.zeroPad(r%1*60);return"".concat(n).concat(i).concat(a).concat(o)}}));x.isLeapYear,x.isDate,x.isArray,x.isObject,x.isBoolean,x.zeroPad,x.titleCase,x.ordinal,x.toCardinal,x.normalize,x.getEpoch,x.beADate,x.formatTimezone;const A={year:(new Date).getFullYear(),month:0,date:1};var O={parseArray:(e,t,a)=>{if(0===t.length)return e;let n=["year","month","date","hour","minute","second","millisecond"];for(let r=0;r<n.length;r++){let i=t[r]||a[n[r]]||A[n[r]]||0;e=e[n[r]](i)}return e},parseObject:(e,t,a)=>{if(0===Object.keys(t).length)return e;t=Object.assign({},A,a,t);let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r];if(void 0===e[i]||"function"!=typeof e[i])continue;if(null===t[i]||void 0===t[i]||""===t[i])continue;let o=t[i]||a[i]||A[i]||0;e=e[i](o)}return e},parseNumber:function(e,t){return t>0&&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 z=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach((t=>{"function"==typeof e[t]&&(e=e[t](e._today[t]))})),e},j={now:e=>z(e),today:e=>z(e),tonight:e=>e=(e=z(e)).hour(18),tomorrow:e=>e=(e=(e=z(e)).add(1,"day")).startOf("day"),yesterday:e=>e=(e=(e=z(e)).subtract(1,"day")).startOf("day"),christmas:e=>{let t=z(e).year();return e=e.set([t,11,25,18,0,0])},"new years":e=>{let t=z(e).year();return e=e.set([t,11,31,18,0,0])}};j["new years eve"]=j["new years"];var M=j,T=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 _={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};_.date=_.day,_.month=25488e5,_.week=6048e5,_.year=3154e7,Object.keys(_).forEach((e=>{_[e+"s"]=_[e]}));var V=_;const E=(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+=V[n]*u,"day"===n&&Math.abs(u)>28&&t<28&&(e.epoch+=V.hour),null!==r&&o!==e.d[r]()&&(e.epoch=s);const d=V[n]/2;for(;e.d[a]()<t;)e.epoch+=d;for(;e.d[a]()>t;)e.epoch-=d;null!==r&&o!==e.d[r]()&&(e.epoch=s)},q={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>E(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+=V.day*(28*o),i!==e.d.getFullYear()&&(e.epoch=r);e.d.getMonth()<t;)e.epoch+=V.day;for(;e.d.getMonth()>t;)e.epoch-=V.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>E(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>E(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>E(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 C=(e,t)=>{let a=Object.keys(q),n=e.clone();for(let r=0;r<a.length;r++){let i=a[r],o=t[i];if(void 0===o&&(o=n[i]()),"string"==typeof o&&(o=parseInt(o,10)),!q[i].valid(o))return e.epoch=null,void(!1===e.silent&&console.warn("invalid "+i+": "+o));q[i].walkTo(e,o)}},S=[31,28,31,30,31,30,31,31,30,31,30,31];let $=["jan","feb","mar","apr","may","jun","jul","aug","sept","oct","nov","dec"],P=["january","february","march","april","may","june","july","august","september","october","november","december"];function N(){const e={sep:8};for(let t=0;t<$.length;t++)e[$[t]]=t;for(let t=0;t<P.length;t++)e[P[t]]=t;return e}var Y={short:()=>$,long:()=>P,mapping:()=>N(),set:e=>{$=e.short||$,P=e.long||P}},W=(e,t)=>{if(!t)return e;"Z"!==t&&"z"!==t||(t="+0000");let a=0;/^[\+-]?[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),a*=-1,a>=0&&(a="+"+a);let n="etc/gmt"+a;return e.timezones[n]&&(e.tz=n),e},I=(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=Number(a[1]);if(n<0||n>24)return e.startOf("day");let r=Number(a[2]);if(a[2].length<2||r<0||r>59)return e.startOf("day");a[4]>999&&(a[4]=parseInt("".concat(a[4]).substring(0,3),10)),e=(e=(e=(e=e.hour(n)).minute(r)).seconds(a[3]||0)).millisecond(a[4]||0);let i=t.match(/[\b0-9](am|pm)\b/);return null!==i&&i[1]&&(e=e.ampm(i[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")};const B=x.isLeapYear,L=Y.mapping();var H={parseOffset:W,parseTime:I,parseYear:(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},parseMonth:function(e){return e=e.toLowerCase().trim(),L[e]},validate:e=>{if(!0!==S.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(B(e.year)&&e.date<=29)||e.date<=28;let t=S[e.month]||0;return e.date<=t}};const{validate:F,parseTime:J,parseYear:Q,parseMonth:R,parseOffset:G}=H;var K=[{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===F(a)?(e.epoch=null,e):(G(e,t[5]),C(e,a),e=J(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===F(a)?(e.epoch=null,e):(C(e,a),e=J(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:Q(t[1],e._today),month:R(t[2]),date:x.toCardinal(t[3]||"")};return!1===F(a)?(e.epoch=null,e):(C(e,a),e=J(e,t[4]))}}];const{validate:Z,parseTime:U,parseYear:X,parseMonth:ee}=H;var te=[{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:X(t[3],e._today)||(new Date).getFullYear()};return!1===Z(r)?(e.epoch=null,e):(C(e,r),e=U(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:X(t[3],e._today),month:ee(t[1]),date:x.toCardinal(t[2]||"")};return!1===Z(a)?(e.epoch=null,e):(C(e,a),e=U(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:X(t[3],e._today),month:ee(t[1]),date:x.toCardinal(t[2]||"")};return!1===Z(a)?(e.epoch=null,e):(C(e,a),e=U(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9:]+)?( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let a={year:X(t[5],e._today),month:ee(t[1]),date:x.toCardinal(t[2]||"")};return!1===Z(a)?(e.epoch=null,e):(C(e,a),e=U(e,t[3]))}}];const{validate:ae,parseTime:ne,parseYear:re,parseMonth:ie}=H;var oe=[{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:(e,t)=>{let a={year:re(t[3],e._today),month:ie(t[2]),date:x.toCardinal(t[1]||"")};return!1===ae(a)?(e.epoch=null,e):(C(e,a),e=ne(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:re(t[3],e._today),month:ie(t[2]),date:x.toCardinal(t[1])};return a.month&&!1!==ae(a)?(C(e,a),e=ne(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:ie(t[2]),year:Number(t[3])};return!1===ae(a)?(e.epoch=null,e):(C(e,a),e=e.startOf("day"),e=ne(e,t[4]))}}];const{validate:se,parseTime:ue,parseYear:de,parseMonth:le}=H;var he=[].concat(K,te,oe,[{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===se(a)?(e.epoch=null,e):(C(e,a),e=ue(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let a={year:de(t[2],e._today),month:le(t[1]),date:e._today.date||1};return!1===se(a)?(e.epoch=null,e):(C(e,a),e=ue(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===se(r)?(e.epoch=null,e):(C(e,r),e=ue(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===se(r)?(e.epoch=null,e):(C(e,r),e=ue(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:de(t[0],a),month:a.month||n.getMonth(),date:a.date||n.getDate()};return!1===se(r)?(e.epoch=null,e):(C(e,r),e=ue(e))}}]),me=function(e,t,a){for(let n=0;n<he.length;n++){let r=t.match(he[n].reg);if(r){let t=he[n].parse(e,r,a);if(null!==t&&t.isValid())return t}}return!1===e.silent&&console.warn("Warning: couldn't parse date-string: '"+t+"'"),e.epoch=null,e};const{parseArray:ce,parseObject:fe,parseNumber:ye}=O,pe={year:(new Date).getFullYear(),month:0,date:1};var ge=(e,t)=>{let a=e._today||pe;if("number"==typeof t)return ye(e,t);if(e.epoch=Date.now(),e._today&&x.isObject(e._today)&&Object.keys(e._today).length>0){let t=fe(e,a,pe);t.isValid()&&(e.epoch=t.epoch)}return null==t||""===t?e:!0===x.isDate(t)?(e.epoch=t.getTime(),e):!0===x.isArray(t)?e=ce(e,t,a):!0===x.isObject(t)?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):e=fe(e,t,a):"string"!=typeof t?e:(t=T(t),!0===M.hasOwnProperty(t)?e=M[t](e):me(e,t))};let be=["sun","mon","tue","wed","thu","fri","sat"],we=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];var ke={short:()=>be,long:()=>we,set:e=>{be=e.short||be,we=e.long||we},aliases:{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 ve=!0;var De={useTitleCase:()=>ve,set:e=>{ve=e}},xe=e=>{let t=e.timezone().current.offset;return t?x.formatTimezone(t,":"):"Z"};const Ae=e=>De.useTitleCase()?x.titleCase(e):e,Oe={day:e=>Ae(e.dayName()),"day-short":e=>Ae(ke.short()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>x.ordinal(e.day()),"day-pad":e=>x.zeroPad(e.day()),date:e=>e.date(),"date-ordinal":e=>x.ordinal(e.date()),"date-pad":e=>x.zeroPad(e.date()),month:e=>Ae(e.monthName()),"month-short":e=>Ae(Y.short()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>x.ordinal(e.month()),"month-pad":e=>x.zeroPad(e.month()),"iso-month":e=>x.zeroPad(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?"'".concat(String(e.year()).substr(2,4)):(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),a=t<0,n=x.zeroPad(Math.abs(t),4);return a&&(n=x.zeroPad(n,6),n="-"+n),n},time:e=>e.time(),"time-24":e=>"".concat(e.hour24(),":").concat(x.zeroPad(e.minute())),hour:e=>e.hour12(),"hour-pad":e=>x.zeroPad(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>x.zeroPad(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>x.zeroPad(e.minute()),second:e=>e.second(),"second-pad":e=>x.zeroPad(e.second()),ampm:e=>e.ampm(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>xe(e),numeric:e=>"".concat(e.year(),"/").concat(x.zeroPad(e.month()+1),"/").concat(x.zeroPad(e.date())),"numeric-us":e=>"".concat(x.zeroPad(e.month()+1),"/").concat(x.zeroPad(e.date()),"/").concat(e.year()),"numeric-uk":e=>"".concat(x.zeroPad(e.date()),"/").concat(x.zeroPad(e.month()+1),"/").concat(e.year()),"mm/dd":e=>"".concat(x.zeroPad(e.month()+1),"/").concat(x.zeroPad(e.date())),iso:e=>{let t=e.format("iso-year"),a=x.zeroPad(e.month()+1),n=x.zeroPad(e.date()),r=x.zeroPad(e.h24()),i=x.zeroPad(e.minute()),o=x.zeroPad(e.second()),s=x.zeroPad(e.millisecond(),3),u=xe(e);return"".concat(t,"-").concat(a,"-").concat(n,"T").concat(r,":").concat(i,":").concat(o,".").concat(s).concat(u)},"iso-short":e=>{let t=x.zeroPad(e.month()+1),a=x.zeroPad(e.date());return"".concat(e.year(),"-").concat(t,"-").concat(a)},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>"".concat(Y.short()[e.month()]," ").concat(x.ordinal(e.date()),", ").concat(e.time()),"nice-24":e=>"".concat(Y.short()[e.month()]," ").concat(x.ordinal(e.date()),", ").concat(e.hour24(),":").concat(x.zeroPad(e.minute())),"nice-year":e=>"".concat(Y.short()[e.month()]," ").concat(x.ordinal(e.date()),", ").concat(e.year()),"nice-day":e=>"".concat(ke.short()[e.day()]," ").concat(Ae(Y.short()[e.month()])," ").concat(x.ordinal(e.date())),"nice-full":e=>"".concat(e.dayName()," ").concat(Ae(e.monthName())," ").concat(x.ordinal(e.date()),", ").concat(e.time()),"nice-full-24":e=>"".concat(e.dayName()," ").concat(Ae(e.monthName())," ").concat(x.ordinal(e.date()),", ").concat(e.hour24(),":").concat(x.zeroPad(e.minute()))},ze={"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(ze).forEach((e=>Oe[e]=Oe[ze[e]]));var je=(e,t="")=>{if(!0!==e.isValid())return"";if(Oe.hasOwnProperty(t)){let a=Oe[t](e)||"";return"json"!==t&&(a=String(a),"ampm"!==t&&(a=Ae(a))),a}if(-1!==t.indexOf("{")){let a=/\{(.+?)\}/g;return t=t.replace(a,((t,a)=>{if(a=a.toLowerCase().trim(),Oe.hasOwnProperty(a)){let t=String(Oe[a](e));return"ampm"!==a?Ae(t):t}return""}))}return e.format("iso-short")};const Me=x.zeroPad,Te=x.formatTimezone,_e={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=>parseInt(String(e.year()).substr(2,4),10),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=>Me(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>Me(e.week()),d:e=>e.date(),dd:e=>Me(e.date()),D:e=>e.dayOfYear(),DD:e=>Me(e.dayOfYear()),DDD:e=>Me(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=>Me(e.h12()),H:e=>e.hour(),HH:e=>Me(e.hour()),m:e=>e.minute(),mm:e=>Me(e.minute()),s:e=>e.second(),ss:e=>Me(e.second()),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=>Te(e.timezone().current.offset),ZZ:e=>Te(e.timezone().current.offset),ZZZ:e=>Te(e.timezone().current.offset),ZZZZ:e=>Te(e.timezone().current.offset,":")},Ve=(e,t,a)=>{let n=e,r=t;for(let i=0;i<a;i+=1)_e[n]=_e[r],n+=e,r+=t};Ve("q","Q",4),Ve("L","M",4),Ve("Y","y",4),Ve("c","e",4),Ve("k","H",2),Ve("K","h",2),Ve("S","s",2),Ve("v","z",4),Ve("V","Z",4);const Ee=function(e){for(let t=0;t<e.length;t+=1)if("'"===e[t])for(let a=t+1;a<e.length;a+=1){if(e[a]&&(e[t]+=e[a]),"'"===e[a]){e[a]=null;break}e[a]=null}return e.filter((e=>e))},qe=function(e){for(let t=0;t<e.length;t+=1){let a=e[t];for(let n=t+1;n<e.length&&e[n]===a;n+=1)e[t]+=e[n],e[n]=null}return e=(e=e.filter((e=>e))).map((e=>("''"===e&&(e="'"),e)))};var Ce=(e,t)=>{let a=t.split("");return a=Ee(a),a=qe(a),a.reduce(((t,a)=>(void 0!==_e[a]?t+=_e[a](e)||"":(/^'.{1,}'$/.test(a)&&(a=a.replace(/'/g,"")),t+=a),t)),"")};const Se=["year","season","quarter","month","week","day","quarterHour","hour","minute"],$e=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 Pe=(e,t)=>{if(t)return t=x.normalize(t),$e(e,t);let a={};return Se.forEach((t=>{a[t]=$e(e,t)})),a},Ne=(e,t)=>{let a=e.progress();return"quarterhour"===(t=x.normalize(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 Ye=(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 We=(e,t,a)=>e.isBefore(t)?Ye(e,t,a):-1*Ye(t,e,a);const Ie=(e,t)=>{let a=t.year()-e.year();return(e=e.year(t.year())).isAfter(t)&&(a-=1),a};var Be=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=Ie(r,t),r=e.add(n.years,"year"),n.months=12*n.years,r=e.add(n.months,"month"),n.months+=We(r,t,"month"),n.weeks=52*n.years,r=e.add(n.weeks,"week"),n.weeks+=We(r,t,"week"),n.days=7*n.weeks,r=e.add(n.days,"day"),n.days+=We(r,t,"day"),n};const Le=function(e){return Object.keys(e).forEach((t=>{e[t]*=-1})),e};var He=function(e,t,a){t=x.beADate(t,e);let n=!1;if(e.isAfter(t)){let a=e;e=t,t=a,n=!0}let r=Be(e,t);return n&&(r=Le(r)),a?(a=x.normalize(a),!0!==/s$/.test(a)&&(a+="s"),"dates"===a&&(a="days"),r[a]):r};const Fe={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 Je(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}function Qe(e,t){return 1===e&&(t=t.slice(0,-1)),e+" "+t}var Re=(e,t)=>{const a=Je(e,t=x.beADate(t,e));if(!0===Object.keys(a).every((e=>!a[e])))return{diff:a,rounded:"now",qualified:"now",precise:"now"};let n,r,i,o=[];return Object.keys(a).forEach(((e,t,i)=>{const s=Math.abs(a[e]);if(0===s)return;const u=Qe(s,e);if(o.push(u),!n){if(n=r=u,t>4)return;const o=i[t+1],d=Math.abs(a[o]);d>Fe[o].almost?(n=Qe(s+1,e),r="almost "+n):d>Fe[o].over&&(r="over "+u)}})),i=o.splice(0,2).join(", "),!0===e.isAfter(t)?(n+=" ago",r+=" ago",i+=" ago"):(n="in "+n,r="in "+r,i="in "+i),{diff:a,rounded:n,qualified:r,precise:i}},Ge={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]]},Ke=[null,[0,1],[3,1],[6,1],[9,1]];const Ze={minute:e=>(C(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),C(e,{second:0,millisecond:0}),e},hour:e=>(C(e,{minute:0,second:0,millisecond:0}),e),day:e=>(C(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")),C(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(C(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Ke[t]&&C(e,{month:Ke[t][0],date:Ke[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<Ge[a].length;n++)if(Ge[a][n][0]===t){let r=e.year();return"winter"===t&&e.month()<3&&(r-=1),C(e,{year:r,month:Ge[a][n][1],date:Ge[a][n][2],hour:0,minute:0,second:0,millisecond:0}),e}return e},year:e=>(C(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)}};Ze.date=Ze.day;var Ue={startOf:(e,t)=>{let a=e.clone();return t=x.normalize(t),Ze[t]?Ze[t](a):"summer"===t||"winter"===t?(a=a.season(t),Ze.season(a)):a},endOf:(e,t)=>{let a=e.clone();return t=x.normalize(t),Ze[t]?(a=Ze[t](a),a=a.add(1,t),a=a.subtract(1,"millisecond"),a):a}};const Xe=function(e){return!!ke.short().find((t=>t===e))||!!ke.long().find((t=>t===e))};var et=function(e,t="",a){if(!t||!a)return[];if(t=x.normalize(t),a=e.clone().set(a),e.isAfter(a)){let t=e;e=a,a=t}let n=e.clone();Xe(t)?(n=n.next(t),t="week"):n=n.next(t);let r=[];for(;n.isBefore(a);)r.push(n),n=n.add(1,t);return r};const tt=e=>e?e.split("->"):[],at=e=>e=(e=(e=e[0].toUpperCase()+e.substr(1)).replace(/\/gmt/,"/GMT")).replace(/[\/_]([a-z])/gi,(e=>e.toUpperCase()));var nt=e=>{let t=e.timezones,n=e.tz;if(!1===t.hasOwnProperty(n)&&(n=D(e.tz,t)),null===n)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let r=t[n],i={name:at(n),hasDst:Boolean(r.dst),default_offset:r.offset,hemisphere:"s"===r.hem?"South":"North",current:{}};if(i.hasDst){let e=tt(r.dst);i.change={start:e[0],back:e[1]}}let o=r.offset,s=o;return!0===i.hasDst&&(s="North"===i.hemisphere?o-1:r.offset+1),!1===i.hasDst?(i.current.offset=o,i.current.isDST=!1):!0===a(e.epoch,i.change.start,i.change.back,o,s)?(i.current.offset=o,i.current.isDST="North"===i.hemisphere):(i.current.offset=s,i.current.isDST="South"===i.hemisphere),i};const rt=["century","decade","year","month","date","day","hour","minute","second","millisecond"],it={set:function(e,t){let a=this.clone();return a=ge(a,e),t&&(this.tz=D(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 je(this,e)},unixFmt:function(e){return Ce(this,e)},startOf:function(e){return Ue.startOf(this,e)},endOf:function(e){return Ue.endOf(this,e)},leapYear:function(){let e=this.year();return x.isLeapYear(e)},progress:function(e){return Pe(this,e)},nearest:function(e){return Ne(this,e)},diff:function(e,t){return He(this,e,t)},since:function(e){return e||(e=this.clone().set()),Re(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=D(e,t.timezones),t},every:function(e,t){if("object"==typeof e&&"string"==typeof t){let a=t;t=e,e=a}return et(this,e,t)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},log:function(){return console.log(""),console.log(je(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(je(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=ke.short().indexOf(e);-1===t&&(t=ke.long().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=x.isLeapYear,ut=e=>("string"==typeof e&&(e=parseInt(e,10)),e),dt=["year","month","date","hour","minute","second","millisecond"],lt=(e,t,a)=>{let n=dt.indexOf(a),r=dt.slice(n,dt.length);for(let a=0;a<r.length;a++){let n=t[r[a]]();e[r[a]](n)}return e},ht=function(e,t,a,n){return!0===a&&e.isBefore(t)?e=e.add(1,n):!1===a&&e.isAfter(t)&&(e=e.minus(1,n)),e};var mt={milliseconds:(e,t)=>{t=ut(t);let a=e.millisecond()-t;return e.epoch-a},seconds:(e,t,a)=>{t=ut(t);let n=e.clone(),r=(e.second()-t)*V.second;return e.epoch=e.epoch-r,(e=ht(e,n,a,"minute")).epoch},minutes:(e,t,a)=>{t=ut(t);let n=e.clone(),r=(e.minute()-t)*V.minute;return e.epoch-=r,lt(e,n,"second"),(e=ht(e,n,a,"hour")).epoch},hours:(e,t,a)=>{(t=ut(t))>=24?t=24:t<0&&(t=0);let n=e.clone(),r=e.hour()-t,i=r*V.hour;return e.epoch-=i,e.date()!==n.date()&&(e=n.clone(),r>1&&(r-=1),r<1&&(r+=1),i=r*V.hour,e.epoch-=i),C(e,{hour:t}),lt(e,n,"minute"),(e=ht(e,n,a,"day")).epoch},time:(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=ht(e,u,a,"day")).epoch},date:(e,t,a)=>{if((t=ut(t))>28){let a=e.month(),n=S[a];1===a&&29===t&&st(e.year())&&(n=29),t>n&&(t=n)}t<=0&&(t=1);let n=e.clone();return C(e,{date:t}),(e=ht(e,n,a,"month")).epoch},month:(e,t,a)=>{"string"==typeof t&&(t=Y.mapping()[t.toLowerCase()]),(t=ut(t))>=12&&(t=11),t<=0&&(t=0);let n=e.date();n>S[t]&&(n=S[t]);let r=e.clone();return C(e,{month:t,date:n}),(e=ht(e,r,a,"year")).epoch},year:(e,t)=>("string"==typeof t&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=(t=Number(t))>30?1900+t:2e3+t),t=ut(t),C(e,{year:t}),e.epoch),week:(e,t,a)=>{let n=e.clone();return t=ut(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=ht(e,n,a,"year")).epoch},dayOfYear:(e,t,a)=>{t=ut(t);let n=e.clone();return(t-=1)<=0?t=0:t>=365&&(t=364),e=(e=e.startOf("year")).add(t,"day"),lt(e,n,"hour"),(e=ht(e,n,a,"year")).epoch}},ct={millisecond:function(e){if(void 0!==e){let t=this.clone();return t.epoch=mt.milliseconds(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(void 0!==e){let a=this.clone();return a.epoch=mt.seconds(a,e,t),a}return this.d.getSeconds()},minute:function(e,t){if(void 0!==e){let a=this.clone();return a.epoch=mt.minutes(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.hours(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.hours(a,r,t),a.epoch=mt.minutes(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.hours(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=mt.time(a,e,t),a}return"".concat(this.h12(),":").concat(x.zeroPad(this.minute())).concat(this.ampm())},ampm:function(e,t){let a="am",n=this.hour();if(n>=12&&(a="pm"),"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:00am",breakfast:"7:00am",noon:"12:00am",lunch:"12:00pm",afternoon:"2:00pm",evening:"6:00pm",dinner:"6:00pm",night:"11:00pm",midnight:"23:59pm"};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")}},ft={date:function(e,t){if(void 0!==e){let a=this.clone();return(e=parseInt(e,10))&&(a.epoch=mt.date(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(),ke.aliases.hasOwnProperty(e)?n=ke.aliases[e]:(n=ke.short().indexOf(e),-1===n&&(n=ke.long().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 C(i,{hour:a.hour(),minute:a.minute(),second:a.second()}),i},dayName:function(e,t){if(void 0===e)return ke.long()[this.day()];let a=this.clone();return a=a.day(e,t),a}};const yt=e=>e=(e=(e=e.minute(0)).second(0)).millisecond(1);var pt={dayOfYear:function(e,t){if(void 0!==e){let a=this.clone();return a.epoch=mt.dayOfYear(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=mt.week(this,e,t),a=yt(a),a}let a=this.clone();a=a.month(0),a=a.date(1),a=yt(a),a=a.day("monday"),"december"===a.monthName()&&a.date()>=28&&(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+=V.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=mt.month(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 Y.long()[this.month()]},quarter:function(e,t){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Ke[e])){let a=this.clone(),n=Ke[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<Ke.length;e++)if(a<Ke[e][0])return e-1;return 4},season:function(e,t){let a="north";if("South"===this.hemisphere()&&(a="south"),void 0!==e){let n=this.clone();for(let r=0;r<Ge[a].length;r++)e===Ge[a][r][0]&&(n=n.month(Ge[a][r][1],t),n=n.date(1),n=n.startOf("day"));return n}let n=this.d.getMonth();for(let e=0;e<Ge[a].length-1;e++)if(n>=Ge[a][e][1]&&n<Ge[a][e+1][1])return Ge[a][e][0];return"winter"},year:function(e){if(void 0!==e){let t=this.clone();return t.epoch=mt.year(t,e),t}return this.d.getFullYear()},era:function(e){if(void 0!==e){let t=this.clone();e=e.toLowerCase();let a=t.d.getFullYear();return"bc"===e&&a>0&&(t.epoch=mt.year(t,-1*a)),"ad"===e&&a<0&&(t.epoch=mt.year(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}};const gt=Object.assign({},ct,ft,pt);gt.milliseconds=gt.millisecond,gt.seconds=gt.second,gt.minutes=gt.minute,gt.hours=gt.hour,gt.hour24=gt.hour,gt.h12=gt.hour12,gt.h24=gt.hour24,gt.days=gt.day;var bt=e=>{Object.keys(gt).forEach((t=>{e.prototype[t]=gt[t]}))};const wt=x.isLeapYear,kt=function(e,t){return 1===e&&wt(t)?29:S[e]};var vt={months:(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.floor(Math.abs(e.month)/13,10);a=Math.abs(a)+1,e.year=t.year()-a,e.month=e.month%12,e.month=e.month+12,12===e.month&&(e.month=0)}return e},days:(e,t,a)=>{let n=t.year(),r=t.month(),i=kt(r,n);for(;a>i;)a-=i,r+=1,r>=12&&(r-=12,n+=1),i=kt(r,n);return e.month=r,e.date=a,e},daysBack:(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=kt(e.month,e.year);e.date+=t}return e}};const Dt=["millisecond","second","minute","hour","date","month"];let xt={second:Dt.slice(0,1),minute:Dt.slice(0,2),quarterhour:Dt.slice(0,2),hour:Dt.slice(0,3),date:Dt.slice(0,4),month:Dt.slice(0,4),quarter:Dt.slice(0,4),season:Dt.slice(0,4),year:Dt,decade:Dt,century:Dt};xt.week=xt.hour,xt.season=xt.date,xt.quarter=xt.date;const At={year:!0,quarter:!0,season:!0,month:!0,week:!0,day:!0},Ot={month:!0,quarter:!0,season:!0,year:!0};var zt=e=>{e.prototype.add=function(e,t){let a=this.clone();if(!t||0===e)return a;let n=this.clone();if("millisecond"===(t=x.normalize(t)))return a.epoch+=e,a;"fortnight"===t&&(e*=2,t="week"),V[t]?a.epoch+=V[t]*e:"week"===t||"weekend"===t?a.epoch+=V.day*(7*e):"quarter"===t||"season"===t?a.epoch+=V.month*(3*e):"quarterhour"===t&&(a.epoch+=15*V.minute*e);let r={};if(xt[t]&&xt[t].forEach((e=>{r[e]=n[e]()})),At[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=vt.months(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=vt.daysBack(r,n,e);else{let t=n.date()+e;r=vt.days(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();(r<t||r>t)&&(a.epoch+=V.day)}else"decade"===t?r.year=a.year()+10:"century"===t&&(r.year=a.year()+100);if(Ot[t]){let e=S[r.month];r.date=n.date(),r.date>e&&(r.date=e)}return Object.keys(r).length>1&&C(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 jt={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()};jt.date=jt.day;var Mt=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),jt[a]?jt[a](r)===jt[a](t):null}},Tt=e=>{const t={isAfter:function(e){e=x.beADate(e,this);let t=x.getEpoch(e);return null===t?null:this.epoch>t},isBefore:function(e){e=x.beADate(e,this);let t=x.getEpoch(e);return null===t?null:this.epoch<t},isEqual:function(e){e=x.beADate(e,this);let t=x.getEpoch(e);return null===t?null:this.epoch===t},isBetween:function(e,t,a=!1){e=x.beADate(e,this),t=x.beADate(t,this);let n=x.getEpoch(e);if(null===n)return null;let r=x.getEpoch(t);return null===r?null:a?this.isBetween(e,t)||this.isEqual(e)||this.isEqual(t):n<this.epoch&&this.epoch<r}};Object.keys(t).forEach((a=>{e.prototype[a]=t[a]}))},_t=e=>{const t={i18n:e=>{x.isObject(e.days)&&ke.set(e.days),x.isObject(e.months)&&Y.set(e.months),x.isBoolean(e.useTitleCase)&&De.set(e.useTitleCase)}};Object.keys(t).forEach((a=>{e.prototype[a]=t[a]}))};let Vt=l;const Et=function(e,t,a={}){this.epoch=null,this.tz=D(t,Vt),this.silent=a.silent||!0,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=n(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:()=>Vt,set:e=>(Vt=e,e)});let r=ge(this,e);this.epoch=r.epoch};Object.keys(ot).forEach((e=>{Et.prototype[e]=ot[e]})),Et.prototype.clone=function(){return new Et(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})},Et.prototype.toLocalDate=function(){return new Date(this.epoch)},bt(Et),zt(Et),Mt(Et),Tt(Et),_t(Et);var qt=Et,Ct=(e,t)=>{let a=new qt(null),n=new qt(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 qt(null,e),o=t.hour();return o>=r&&o<=i&&!(o===r&&t.minute()<a.minute())&&!(o===i&&t.minute()>n.minute())}))},St="6.16.0";const $t=(e,t,a)=>new qt(e,t,a),Pt=function(e){let t=e._today||{};return Object.keys(t).forEach((a=>{e=e[a](t[a])})),e};return $t.now=(e,t)=>{let a=new qt((new Date).getTime(),e,t);return a=Pt(a),a},$t.today=(e,t)=>{let a=new qt((new Date).getTime(),e,t);return a=Pt(a),a.startOf("day")},$t.tomorrow=(e,t)=>{let a=new qt((new Date).getTime(),e,t);return a=Pt(a),a.add(1,"day").startOf("day")},$t.yesterday=(e,t)=>{let a=new qt((new Date).getTime(),e,t);return a=Pt(a),a.subtract(1,"day").startOf("day")},$t.extend=function(e={}){return Object.keys(e).forEach((t=>{qt.prototype[t]=e[t]})),this},$t.timezones=function(){return(new qt).timezones},$t.max=function(e,t){let a=new qt(null,e,t);return a.epoch=864e13,a},$t.min=function(e,t){let a=new qt(null,e,t);return a.epoch=-864e13,a},$t.whereIts=Ct,$t.version=St,$t.plugin=$t.extend,$t}()}));const M="Australia/",T="Pacific/",_={"british summer time":"Europe/London",bst:"Europe/London","british time":"Europe/London","britain time":"Europe/London","irish summer time":"Europe/Dublin","irish time":"Europe/Dublin",ireland:"Europe/Dublin","central european time":"Europe/Berlin",cet:"Europe/Berlin","central european summer time":"Europe/Berlin",cest:"Europe/Berlin","central europe":"Europe/Berlin","eastern european time":"Europe/Riga",eet:"Europe/Riga","eastern european summer time":"Europe/Riga",eest:"Europe/Riga","eastern europe time":"Europe/Riga","western european time":"Europe/Lisbon","western european summer time":"Europe/Lisbon","western europe":"Europe/Lisbon","turkey standard time":"Europe/Istanbul",trt:"Europe/Istanbul","turkish time":"Europe/Istanbul",etc:"Africa/Freetown",utc:"Africa/Freetown","greenwich standard time":"Africa/Freetown",gmt:"Africa/Freetown","east africa time":"Africa/Nairobi","east african time":"Africa/Nairobi","eastern africa time":"Africa/Nairobi","central africa time":"Africa/Khartoum","central african time":"Africa/Khartoum","south africa standard time":"Africa/Johannesburg",sast:"Africa/Johannesburg","southern africa":"Africa/Johannesburg","south african":"Africa/Johannesburg","west africa standard time":"Africa/Lagos","western africa time":"Africa/Lagos","west african time":"Africa/Lagos","australian central standard time":M+"Adelaide",acst:M+"Adelaide","australian central daylight time":M+"Adelaide",acdt:M+"Adelaide","australia central":M+"Adelaide","australian eastern standard time":M+"Brisbane",aest:M+"Brisbane","australian eastern daylight time":M+"Brisbane",aedt:M+"Brisbane","australia east":M+"Brisbane","australian western standard time":M+"Perth",awst:M+"Perth","australian western daylight time":M+"Perth",awdt:M+"Perth","australia west":M+"Perth","australian central western standard time":M+"Eucla",acwst:M+"Eucla","australia central west":M+"Eucla","lord howe standard time":M+"Lord_Howe",lhst:M+"Lord_Howe","lord howe daylight time":M+"Lord_Howe",lhdt:M+"Lord_Howe","russian standard time":"Europe/Moscow",msk:"Europe/Moscow",russian:"Europe/Moscow","central standard time":"America/Chicago","central time":"America/Chicago",cst:"America/Havana","central daylight time":"America/Chicago",cdt:"America/Havana","mountain standard time":"America/Denver","mountain time":"America/Denver",mst:"America/Denver","mountain daylight time":"America/Denver",mdt:"America/Denver","atlantic standard time":"America/Halifax","atlantic time":"America/Halifax",ast:"Asia/Baghdad","atlantic daylight time":"America/Halifax",adt:"America/Halifax","eastern standard time":"America/New_York","eastern time":"America/New_York",est:"America/New_York","eastern daylight time":"America/New_York",edt:"America/New_York","pacific time":"America/Los_Angeles","pacific standard time":"America/Los_Angeles",pst:"America/Los_Angeles","pacific daylight time":"America/Los_Angeles",pdt:"America/Los_Angeles","alaskan standard time":"America/Anchorage","alaskan time":"America/Anchorage",ahst:"America/Anchorage","alaskan daylight time":"America/Anchorage",ahdt:"America/Anchorage","hawaiian standard time":T+"Honolulu","hawaiian time":T+"Honolulu",hst:T+"Honolulu","aleutian time":T+"Honolulu","hawaii time":T+"Honolulu","newfoundland standard time":"America/St_Johns","newfoundland time":"America/St_Johns",nst:"America/St_Johns","newfoundland daylight time":"America/St_Johns",ndt:"America/St_Johns","brazil time":"America/Sao_Paulo",brt:"America/Sao_Paulo","brasília":"America/Sao_Paulo",brasilia:"America/Sao_Paulo","brazilian time":"America/Sao_Paulo","argentina time":"America/Buenos_Aires","argentinian time":"America/Buenos_Aires","amazon time":"America/Manaus",amt:"America/Manaus","amazonian time":"America/Manaus","easter island standard time":"Chile/Easterisland",east:"Chile/Easterisland","easter island summer time":"Chile/Easterisland",easst:"Chile/Easterisland","venezuelan standard time":"America/Caracas","venezuelan time":"America/Caracas",vet:"America/Caracas","venezuela time":"America/Caracas","paraguay time":"America/Asuncion",pyt:"America/Asuncion","paraguay summer time":"America/Asuncion",pyst:"America/Asuncion","cuba standard time":"America/Havana","cuba time":"America/Havana","cuba daylight time":"America/Havana","cuban time":"America/Havana","bolivia time":"America/La_Paz","bolivian time":"America/La_Paz","colombia time":"America/Bogota",cot:"America/Bogota","colombian time":"America/Bogota","acre time":"America/Eirunepe","peru time":"America/Lima","chile standard time":"America/Punta_Arenas","chile time":"America/Punta_Arenas",clst:"America/Punta_Arenas","chile summer time":"America/Punta_Arenas",cldt:"America/Punta_Arenas","uruguay time":"America/Montevideo",uyt:"America/Montevideo",ist:"Asia/Jerusalem","arabic standard time":"Asia/Baghdad","arabic time":"Asia/Baghdad","arab time":"Asia/Baghdad","iran standard time":"Asia/Tehran","iran time":"Asia/Tehran",irst:"Asia/Tehran","iran daylight time":"Asia/Tehran",irdt:"Asia/Tehran",iranian:"Asia/Tehran","pakistan standard time":"Asia/Karachi","pakistan time":"Asia/Karachi",pkt:"Asia/Karachi","india standard time":"Asia/Kolkata","indian time":"Asia/Kolkata","indochina time":"Asia/Bangkok",ict:"Asia/Bangkok","south east asia":"Asia/Bangkok","china standard time":"Asia/Shanghai",ct:"Asia/Shanghai","chinese time":"Asia/Shanghai","alma-ata time":"Asia/Almaty",almt:"Asia/Almaty","oral time":"Asia/Oral","orat time":"Asia/Oral","yakutsk time":"Asia/Yakutsk",yakt:"Asia/Yakutsk","gulf standard time":"Asia/Dubai","gulf time":"Asia/Dubai",gst:"Asia/Dubai",uae:"Asia/Dubai","hong kong time":"Asia/Hong_Kong",hkt:"Asia/Hong_Kong","western indonesian time":"Asia/Jakarta",wib:"Asia/Jakarta","indonesia time":"Asia/Jakarta","central indonesian time":"Asia/Makassar",wita:"Asia/Makassar","israel daylight time":"Asia/Jerusalem",idt:"Asia/Jerusalem","israel standard time":"Asia/Jerusalem","israel time":"Asia/Jerusalem",israeli:"Asia/Jerusalem","krasnoyarsk time":"Asia/Krasnoyarsk",krat:"Asia/Krasnoyarsk","malaysia time":"Asia/Kuala_Lumpur",myt:"Asia/Kuala_Lumpur","singapore time":"Asia/Singapore",sgt:"Asia/Singapore","korea standard time":"Asia/Seoul","korea time":"Asia/Seoul",kst:"Asia/Seoul","korean time":"Asia/Seoul","uzbekistan time":"Asia/Samarkand",uzt:"Asia/Samarkand","vladivostok time":"Asia/Vladivostok",vlat:"Asia/Vladivostok","maldives time":"Indian/Maldives",mvt:"Indian/Maldives","mauritius time":"Indian/Mauritius",mut:"Indian/Mauritius","marshall islands time":T+"Kwajalein",mht:T+"Kwajalein","samoa standard time":T+"Midway",sst:T+"Midway","somoan time":T+"Midway","chamorro standard time":T+"Guam",chst:T+"Guam","papua new guinea time":T+"Bougainville",pgt:T+"Bougainville"};let V=j().timezones,E=Object.keys(V).reduce(((e,t)=>(e[t]=t,e)),{});var q=Object.assign({},_,E);const C=[[["weekday","summer","winter","autumn","some day","one day","all day","some point","eod","eom","eoy","standard time","daylight time","tommorrow"],"#Date"],[["centuries","century","day","days","decade","decades","hour","hours","hr","hrs","millisecond","milliseconds","minute","minutes","min","mins","month","months","seconds","sec","secs","week end","week ends","weekend","weekends","week","weeks","wk","wks","year","years","yr","yrs","quarter","qtr","qtrs","season","seasons"],"#Duration"],[["all hallows eve","all saints day","all sts day","april fools","armistice day","australia day","bastille day","boxing day","canada day","christmas eve","christmas","cinco de mayo","day of the dead","dia de muertos","dieciseis de septiembre","emancipation day","grito de dolores","groundhog day","halloween","harvey milk day","inauguration day","independence day","independents day","juneteenth","labour day","national freedom day","national nurses day","new years eve","new years","purple heart day","rememberance day","rosa parks day","saint andrews day","saint patricks day","saint stephens day","saint valentines day","st andrews day","st patricks day","st stephens day","st valentines day ","valentines day","valentines","veterans day","victoria day","womens equality day","xmas","epiphany","orthodox christmas day","orthodox new year","assumption of mary","all souls day","feast of the immaculate conception","feast of our lady of guadalupe","kwanzaa","imbolc","beltaine","lughnassadh","samhain","martin luther king day","mlk day","presidents day","mardi gras","tax day","commonwealth day","mothers day","memorial day","fathers day","columbus day","indigenous peoples day","canadian thanksgiving","election day","thanksgiving","t-day","turkey day","black friday","cyber monday","ash wednesday","palm sunday","maundy thursday","good friday","holy saturday","easter","easter sunday","easter monday","orthodox good friday","orthodox holy saturday","orthodox easter","orthodox easter monday","ascension day","pentecost","whitsunday","whit sunday","whit monday","trinity sunday","corpus christi","advent","tu bishvat","tu bshevat","purim","passover","yom hashoah","lag baomer","shavuot","tisha bav","rosh hashana","yom kippur","sukkot","shmini atzeret","simchat torah","chanukah","hanukkah","isra and miraj","lailat al-qadr","eid al-fitr","id al-Fitr","eid ul-Fitr","ramadan","eid al-adha","muharram","the prophets birthday","ostara","march equinox","vernal equinox","litha","june solistice","summer solistice","mabon","september equinox","fall equinox","autumnal equinox","yule","december solstice","winter solstice","chinese new year","diwali"],"#Holiday"],[["noon","midnight","morning","tonight","evening","afternoon","breakfast time","lunchtime","dinnertime","midday","eod","oclock","oclock","at night"],"#Time"],[Object.keys(q),"#Timezone"]];let S={"a couple":"Value",thur:"WeekDay"};C.forEach((e=>{for(let t=0;t<e[0].length;t++)S[e[0][t]]=e[1]}));var $=S;class P{constructor(e,t,a){this.unit=t||"day",this.setTime=!1;let n={};(a=a||{}).today&&(n={date:a.today.date(),month:a.today.month(),year:a.today.year()});let r=j(e,a.timezone,{today:n});Object.defineProperty(this,"d",{enumerable:!1,writable:!0,value:r}),Object.defineProperty(this,"context",{enumerable:!1,writable:!0,value:a})}clone(){let e=new P(this.d,this.unit,this.context);return e.setTime=this.setTime,e}log(){return console.log("--"),this.d.log(),console.log("\n"),this}applyShift(e={}){return Object.keys(e).forEach((t=>{this.d=this.d.add(e[t],t),"hour"!==t&&"minute"!==t||(this.setTime=!0)})),this}applyTime(e){if(e){if(/^[0-9]{1,2}$/.test(e)?this.d=this.d.hour(e):this.d=this.d.time(e),!/[ap]m/.test(e)){let e=this.d.time("6:00am");this.d.isBefore(e)&&(this.d=this.d.ampm("pm"));let t=this.d.time("10:00pm");this.d.isAfter(t)&&(this.d=this.d.ampm("am"))}}else this.d=this.d.startOf("day");return this.setTime=!0,this}applyWeekDay(e){if(e){let t=this.d.epoch;this.d=this.d.day(e),this.d.epoch<t&&(this.d=this.d.add(1,"week"))}return this}applyRel(e){return"next"===e?this.next():"last"===e||"this-past"===e?this.last():this}applySection(e){return"start"===e?this.start():"end"===e?this.end():"middle"===e?this.middle():this}format(e){return this.d.format(e)}start(){return this.d=this.d.startOf(this.unit),this.context.dayStart&&(this.d=this.d.time(this.context.dayStart)),this}end(){if(this.d=this.d.endOf(this.unit),this.context.dayEnd){this.d=this.d.startOf("day");let e=this.d.time(this.context.dayEnd);if(e.isAfter(this.d))return this.d=e,this}return this}middle(){let e=this.d.diff(this.d.endOf(this.unit)),t=Math.round(e.minutes/2);return this.d=this.d.add(t,"minutes"),this}beforeEnd(){let e=this.d.startOf(this.unit).diff(this.d.endOf(this.unit)),t=Math.round(e.minutes/4);return this.d=this.d.endOf(this.unit),this.d=this.d.minus(t,"minutes"),this.context.dayStart&&(this.d=this.d.time(this.context.dayStart)),this}before(){return this.d=this.d.minus(1,this.unit),this.d=this.d.endOf(this.unit),this.context.dayEnd&&(this.d=this.d.time(this.context.dayEnd)),this}after(){return this.d=this.d.add(1,this.unit),this.d=this.d.startOf(this.unit),this}next(){return this.d=this.d.add(1,this.unit),this.d=this.d.startOf(this.unit),this}last(){return this.d=this.d.minus(1,this.unit),this.d=this.d.startOf(this.unit),this}}var N=P;class Y extends N{constructor(e,t,a){super(e,t,a),this.unit="day",this.d.isValid()&&(this.d=this.d.startOf("day"))}middle(){return this.d=this.d.time("10am"),this}beforeEnd(){return this.d=this.d.time("2pm"),this}}class W extends Y{constructor(e,t,a){super(e,t,a),this.unit="day",this.d.isValid()&&(this.d=this.d.startOf("day"))}next(){return this.d=this.d.add(1,"year"),this}last(){return this.d=this.d.minus(1,"year"),this}}var I={Day:Y,WeekDay:class extends Y{constructor(e,t,a){super(e,t,a),this.unit="day",this.isWeekDay=!0,"string"==typeof e?(this.d=j(a.today,a.timezone),this.d=this.d.day(e),this.d.isBefore(a.today)&&(this.d=this.d.add(7,"days"))):this.d=e,this.weekDay=this.d.dayName(),this.d.isValid()&&(this.d=this.d.startOf("day"))}next(){return this.d=this.d.add(7,"days"),this.d=this.d.day(this.weekDay),this}last(){return this.d=this.d.minus(7,"days"),this.d=this.d.day(this.weekDay),this}before(){return this.d=this.d.minus(1,"day"),this.d=this.d.endOf("day"),this.context.dayEnd&&(this.d=this.d.time(this.context.dayEnd)),this}applyRel(e){if("next"===e){let e=this.context.today.endOf("week").add(1,"week");return this.next(),this.d.isAfter(e)&&this.last(),this}if("this-past"===e)return this.last();if("last"===e){let e=this.context.today.startOf("week");return this.last(),!1===this.d.isBefore(e)&&this.last(),this}return this}},CalendarDate:W,Holiday:class extends W{constructor(e,t,a){super(e,t,a),this.unit="day",this.d.isValid()&&(this.d=this.d.startOf("day"))}}};var B={AnyMonth:class extends N{constructor(e,t,a){super(e,t,a),this.unit="month",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}},Month:class extends N{constructor(e,t,a){super(e,t,a),this.unit="month",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}next(){return this.d=this.d.add(1,"year"),this.d=this.d.startOf("month"),this}last(){return this.d=this.d.minus(1,"year"),this.d=this.d.startOf("month"),this}},Quarter:class extends N{constructor(e,t,a){super(e,t,a),this.unit="quarter",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}next(){return this.d=this.d.add(1,"year"),this.d=this.d.startOf(this.unit),this}last(){return this.d=this.d.minus(1,"year"),this.d=this.d.startOf(this.unit),this}},AnyQuarter:class extends N{constructor(e,t,a){super(e,t,a),this.unit="quarter",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}last(){return this.d=this.d.minus(1,"quarter"),this.d=this.d.startOf(this.unit),this}},Season:class extends N{constructor(e,t,a){super(e,t,a),this.unit="season",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}next(){return this.d=this.d.add(1,"year"),this.d=this.d.startOf(this.unit),this}last(){return this.d=this.d.minus(1,"year"),this.d=this.d.startOf(this.unit),this}},Year:class extends N{constructor(e,t,a){super(e,t,a),this.unit="year",this.d.isValid()&&(this.d=this.d.startOf("year"))}}};class L extends N{constructor(e,t,a){super(e,t,a),this.unit="week",this.d.isValid()&&(this.d=this.d.startOf("week"))}clone(){return new L(this.d,this.unit,this.context)}middle(){return this.d=this.d.add(2,"days"),this}beforeEnd(){return this.d=this.d.day("friday"),this}}var H={Week:L,WeekEnd:class extends N{constructor(e,t,a){super(e,t,a),this.unit="week",this.d.isValid()&&(this.d=this.d.day("saturday"),this.d=this.d.startOf("day"))}start(){return this.d=this.d.day("saturday").startOf("day"),this}next(){return this.d=this.d.add(1,this.unit),this.d=this.d.startOf("weekend"),this}last(){return this.d=this.d.minus(1,this.unit),this.d=this.d.startOf("weekend"),this}}};var F={Hour:class extends N{constructor(e,t,a){super(e,t,a,!0),this.unit="hour",this.d.isValid()&&(this.d=this.d.startOf("hour"))}},Minute:class extends N{constructor(e,t,a){super(e,t,a,!0),this.unit="minute",this.d.isValid()&&(this.d=this.d.startOf("minute"))}},Moment:class extends N{constructor(e,t,a){super(e,t,a,!0),this.unit="millisecond"}}},J=Object.assign({Unit:N},I,B,H,F);const Q={second:!0,minute:!0,hour:!0,day:!0,week:!0,weekend:!0,month:!0,season:!0,quarter:!0,year:!0},R={wk:"week",min:"minute",sec:"second",weekend:"week"},G=function(e){let t=e.match("#Duration").text("normal");return t=t.replace(/s$/,""),R.hasOwnProperty(t)&&(t=R[t]),t};var K=function(e){let t={},a=e.match("#DateShift+");if(!1===a.found)return t;a.match("#Cardinal #Duration").forEach((e=>{let a=e.match("#Cardinal").text("normal");if(a=parseFloat(a),a&&"number"==typeof a){let n=G(e);!0===Q[n]&&(t[n]=a)}})),!0===a.has("(before|ago|hence|back)$")&&Object.keys(t).forEach((e=>t[e]*=-1)),a.remove("#Cardinal #Duration");let n=a.match("[<unit>#Duration] [<dir>(after|before)]");if(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=a.match("half (a|an) [#Duration]",0),n.found){let e=G(n);t[e]=.5}return e.remove("#DateShift"),t};const Z={minute:!0};var U=function(e){let t=e.match("[<num>#Value] [<unit>#Duration+] (of|in)");if(t.found){let a=t.groups(),n=a.num.text("reduced"),r=a.unit.text("reduced"),i={unit:r,num:Number(n)||0};return Z[r]||(i.num-=1),e=e.remove(t),i}if(t=e.match("[<dir>(first|initial|last|final)] [<unit>#Duration+] (of|in)"),t.found){let a=t.groups(),n=a.dir.text("reduced"),r=a.unit.text("reduced");"initial"===n&&(n="first"),"final"===n&&(n="last");let i={unit:r,dir:n};return e=e.remove(t),i}return{}};const X={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"},ee={quarter:15,half:30},te=function(e){let t=e.time("6:00am");return e.isBefore(t)?e.ampm("pm"):e};var ae=function(e,t){let a=e.match("(at|by|for|before|this|after)? #Time+");a.found&&(e.remove(a),e.remove("^sharp"),e.remove("^on"),e.remove("on the dot")),a=a.not("^(at|by|for|before|this|after)"),a=a.not("sharp"),a=a.not("on the dot");let n=j.now(t.timezone),r=n.clone(),i=a.text("reduced");if(X.hasOwnProperty(i))return X[i];let o=a.match("^#Cardinal oclock (am|pm)?");if(o.found&&(o=o.not("oclock"),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")):te(n),n.time()}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");ee.hasOwnProperty(r)&&(r=ee[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=te(n),n.time();if(o=a.match("[<min>(half|quarter|25|20|15|10|5)] (past|after)"),o.found){let e=o.groups("min").text("reduced"),a=j(t.today);if(ee.hasOwnProperty(e)&&(e=ee[e]),a=a.next("hour").startOf("hour").minute(e),a.isValid()&&!a.isEqual(r))return a.time()}if(o=a.match("[<min>(half|quarter|25|20|15|10|5)] to"),o.found){let e=o.groups("min").text("reduced"),a=j(t.today);if(ee.hasOwnProperty(e)&&(e=ee[e]),a=a.next("hour").startOf("hour").minus(e,"minutes"),a.isValid()&&!a.isEqual(r))return a.time()}if(o=a.match("[<time>#Time] (in|at) the? [<desc>(morning|evening|night|nighttime)]"),o.found){let e=o.groups("time").text("reduced");if(/^[0-9]{1,2}$/.test(e)?(n=n.hour(e),n=n.startOf("hour")):n=n.time(e),n.isValid()&&!n.isEqual(r)){let e=o.groups("desc").text("reduced");return"evening"!==e&&"night"!==e||(n=n.ampm("pm")),n.time()}}if(o=a.match("this? [<desc>(morning|evening|tonight)] at [<time>(#Cardinal|#Time)]"),o.found){let e=o.groups(),t=e.time.text("reduced");if(/^[0-9]{1,2}$/.test(t)?(n=n.hour(t),n=n.startOf("hour")):n=n.time(t),n.isValid()&&!n.isEqual(r)){let t=e.desc.text("reduced");return"morning"===t&&(n=n.ampm("am")),"evening"!==t&&"tonight"!==t||(n=n.ampm("pm")),n.time()}}if(o=a.match("^#Cardinal$"),o.found){let e=o.text("reduced");if(n=n.hour(e),n=n.startOf("hour"),n.isValid()&&!n.isEqual(r))return!1===/(am|pm)/i.test(e)&&(n=te(n)),n.time()}let s=a.text("reduced");return n=n.time(s),n.isValid()&&!n.isEqual(r)?(!1===/(am|pm)/i.test(s)&&(n=te(n)),n.time()):t.dayStart?t.dayStart:null};var ne=function(e){if(e.has("(next|last|this)$"))return null;let t=e.match("^this? (next|upcoming|coming)");return t.found?(e.remove(t),"next"):(t=e.match("^this? (past)"),t.found?(e.remove(t),"this-past"):(t=e.match("^this? (last|previous)"),t.found?(e.remove(t),"last"):(t=e.match("^(this|current)"),t.found?(e.remove(t),"this"):null)))};var re=function(e){let t=e.match("[(start|beginning) of] .",0);return t.found?(e.remove(t),"start"):(t=e.match("[end of] .",0),t.found?(e.remove(t),"end"):(t=e.match("[(middle|midpoint|center) of] .",0),t.found?(e.remove(t),"middle"):null))};const ie=/(\-?[0-9]+)h(rs)?/i,oe=/(\-?[0-9]+)/,se=/utc([\-+]?[0-9]+)/i,ue=/gmt([\-+]?[0-9]+)/i,de=function(e){return(e=Number(e))>-13&&e<13?"Etc/GMT"+(e=((e*=-1)>0?"+":"")+e):null};var le=function(e){let t=e.match("#Timezone+");t=t.remove("(in|for|by|near|at)");let a=t.text("reduced");if(e.remove("#Timezone+"),q.hasOwnProperty(a))return q[a];let n=function(e){let t=e.match(ie);if(null!==t)return de(t[1]);if(t=e.match(se),null!==t)return de(t[1]);if(t=e.match(ue),null!==t){let e=-1*Number(t[1]);return de(e)}return t=e.match(oe),null!==t?de(t[1]):null}(a);return n||null};var he=function(e){let t=e.match("#WeekDay");return t.found&&!e.has("^#WeekDay$")?e.has("(this|next|last) (next|upcoming|coming|past)? #WeekDay")?null:(e.remove(t),t.text("reduced")):null};const{Day:me,Moment:ce}=J,fe={today:e=>new me(e.today,null,e),yesterday:e=>new me(e.today.minus(1,"day"),null,e),tomorrow:e=>new me(e.today.plus(1,"day"),null,e),eom:e=>{let t=e.today.endOf("month");return t=t.startOf("day"),new me(t,null,e)},eoy:e=>{let t=e.today.endOf("year");return t=t.startOf("day"),new me(t,null,e)},now:e=>new ce(e.today,null,e)};fe.tommorrow=fe.tomorrow,fe.tmrw=fe.tomorrow,fe.anytime=fe.today,fe.sometime=fe.today;var ye=function(e,t,a){let n=null;!1===e.found&&(null!==a.time&&(n=new ce(t.today,null,t)),Object.keys(a.shift).length>0&&(n=a.shift.hour||a.shift.minute?new ce(t.today,null,t):new me(t.today,null,t)));let r=e.text("reduced");return!0===fe.hasOwnProperty(r)?fe[r](t):"next"===r&&Object.keys(a.shift).length>0?fe.tomorrow(t):n},pe=z((function(e,t){e.exports=function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),n="january",r="february",i="march",o="april",s="may",u="july",d="august",l="september",h="october",m="november",c="december",f={"new years eve":[c,31],"new years":[n,1],"new years day":[n,1],"inauguration day":[n,20],"australia day":[n,26],"national freedom day":[r,1],"groundhog day":[r,2],"rosa parks day":[r,4],"valentines day":[r,14],"saint valentines day":[r,14],"st valentines day ":[r,14],"saint patricks day":[i,17],"st patricks day":[i,17],"april fools":[o,1],"april fools day":[o,1],"emancipation day":[o,16],"tax day":[o,15],"labour day":[s,1],"cinco de mayo":[s,5],"national nurses day":[s,6],"harvey milk day":[s,22],"victoria day":[s,24],juneteenth:["june",19],"canada day":[u,1],"independence day":[u,4],"independents day":[u,4],"bastille day":[u,14],"purple heart day":[d,7],"womens equality day":[d,26],"16 de septiembre":[l,16],"dieciseis de septiembre":[l,16],"grito de dolores":[l,16],halloween:[h,31],"all hallows eve":[h,31],"day of the dead":[h,31],"dia de muertos":[h,31],"veterans day":[m,11],"st andrews day":[m,30],"saint andrews day":[m,30],"all saints day":[m,1],"all sts day":[m,1],"armistice day":[m,11],"rememberance day":[m,11],"christmas eve":[c,24],christmas:[c,25],xmas:[c,25],"boxing day":[c,26],"st stephens day":[c,26],"saint stephens day":[c,26],epiphany:[n,6],"orthodox christmas day":[n,7],"orthodox new year":[n,14],"assumption of mary":[d,15],"all souls day":[m,2],"feast of the immaculate conception":[c,8],"feast of our lady of guadalupe":[c,12],kwanzaa:[c,26],imbolc:[r,2],beltaine:[s,1],lughnassadh:[d,1],samhain:[h,31]},y=function(e,t,n,r){if(f.hasOwnProperty(e)||f.hasOwnProperty(t)){var i=f[e]||f[t]||[],o=a.default.now(r);if((o=(o=(o=(o=o.year(n)).startOf("year")).month(i[0])).date(i[1])).isValid())return o}return null},p="october",g="november",b="monday",w="sunday",k={"martin luther king day":[3,b,"january"],"presidents day":[3,b,"february"],"commonwealth day":[2,b,"march"],"mothers day":[2,w,"may"],"fathers day":[3,w,"june"],"labor day":[1,b,"september"],"columbus day":[2,b,p],"canadian thanksgiving":[2,b,p],thanksgiving:[4,"thursday",g],"black friday":[4,"friday",g]};k["turday day"]=k.thanksgiving,k["indigenous peoples day"]=k["columbus day"],k["mlk day"]=k["martin luther king day"];var v=k,D=function(e,t,n,r){if(v.hasOwnProperty(e)||v.hasOwnProperty(t)){var i=v[e]||v[t]||[],o=a.default.now(r),s=(o=(o=(o=o.year(n)).month(i[2])).startOf("month")).month();if((o=o.day(i[1])).month()!==s&&(o=o.add(1,"week")),i[0]>1&&(o=o.add(i[0]-1,"week")),o.isValid())return o}return null},x={easter:0,"ash wednesday":-46,"palm sunday":7,"maundy thursday":-3,"good friday":-2,"holy saturday":-1,"easter saturday":-1,"easter monday":1,"ascension day":39,"whit sunday":49,"whit monday":50,"trinity sunday":65,"corpus christi":60,"mardi gras":-47};x["easter sunday"]=x.easter,x.pentecost=x["whit sunday"],x.whitsun=x["whit sunday"];var A=x,O=function(e){var t=Math.floor,a=e%19,n=t(e/100),r=(n-t(n/4)-t((8*n+13)/25)+19*a+15)%30,i=r-t(r/28)*(1-t(29/(r+1))*t((21-a)/11)),o=i-(e+t(e/4)+i+2-n+t(n/4))%7,s=3+t((o+40)/44),u=o+28-31*t(s/4);return(s=4===s?"April":"March")+" "+u},z=function(e,t,n,r){if(A.hasOwnProperty(e)||A.hasOwnProperty(t)){var i=A[e]||A[t]||[],o=O(n);if(!o)return null;var s=a.default(o,r),u=(s=s.year(n)).add(i,"day");if(u.isValid())return u}return null},j={spring:[2003,2007,2044,2048,2052,2056,2060,2064,2068,2072,2076,2077,2080,2081,2084,2085,2088,2089,2092,2093,2096,2097],summer:[2021,2016,2020,2024,2028,2032,2036,2040,2041,2044,2045,2048,2049,2052,2053,2056,2057,2060,2061,2064,2065,2068,2069,2070,2072,2073,2074,2076,2077,2078,2080,2081,2082,2084,2085,2086,2088,2089,2090,2092,2093,2094,2096,2097,2098,2099],fall:[2002,2003,2004,2006,2007,2010,2011,2014,2015,2018,2019,2022,2023,2026,2027,2031,2035,2039,2043,2047,2051,2055,2059,2092,2096],winter:[2002,2003,2006,2007,2011,2015,2019,2023,2027,2031,2035,2039,2043,2080,2084,2088,2092,2096]},M=[2080,2084,2088,2092,2096],T=function(e){var t={spring:"March 20 "+e,summer:"June 21 "+e,fall:"Sept 22 "+e,winter:"Dec 21 "+e};return-1!==j.spring.indexOf(e)&&(t.spring="March 19 "+e),-1!==j.summer.indexOf(e)&&(t.summer="June 20 "+e),-1!==j.fall.indexOf(e)&&(t.fall="Sept 21 "+e),-1!==j.winter.indexOf(e)&&(t.winter="Dec 22 "+e),-1!==M.indexOf(e)&&(t.winter="Dec 20 "+e),t},_={"spring equinox":"spring","summer solistice":"summer","fall equinox":"fall","winter solstice":"winter"};_["march equinox"]=_["spring equinox"],_["vernal equinox"]=_["spring equinox"],_.ostara=_["spring equinox"],_["june solstice"]=_["summer solistice"],_.litha=_["summer solistice"],_["autumn equinox"]=_["fall equinox"],_["autumnal equinox"]=_["fall equinox"],_["september equinox"]=_["fall equinox"],_["sept equinox"]=_["fall equinox"],_.mabon=_["fall equinox"],_["december solstice"]=_["winter solistice"],_["dec solstice"]=_["winter solistice"],_.yule=_["winter solistice"];var V=_,E=function(e,t,n,r){if(V.hasOwnProperty(e)||V.hasOwnProperty(t)){var i=V[e]||V[t],o=T(n);if(!i||!o||!o[i])return null;var s=a.default(o[i],r);if(s.isValid())return s}return null},q={"isra and miraj":"april 13","lailat al-qadr":"june 10","eid al-fitr":"june 15","id al-Fitr":"june 15","eid ul-Fitr":"june 15",ramadan:"may 16","eid al-adha":"sep 22",muharram:"sep 12","prophets birthday":"nov 21"},C=-10.64,S=function(e,t,n,r){if(q.hasOwnProperty(e)||q.hasOwnProperty(t)){var i=q[e]||q[t]||[];if(!i)return null;var o=a.default(i+" 2018",r),s=(n-2018)*C;if((o=(o=(o=o.add(s,"day")).startOf("day")).year(n)).isValid())return o}return null},$=a.default.now().year();return function(e,t,a){t=t||$,e=e||"";var n=(e=(e=(e=String(e)).trim().toLowerCase()).replace(/'s/,"s")).replace(/ day$/,"");n=(n=n.replace(/^the /,"")).replace(/^orthodox /,"");var r=y(e,n,t,a);return null!==r||null!==(r=D(e,n,t,a))||null!==(r=z(e,n,t,a))||null!==(r=E(e,n,t,a))||null!==(r=S(e,n,t,a))?r:null}}(j)}));const{Holiday:ge}=J;var be=function(e,t){let a=null,n=e.match("[<holiday>#Holiday+] [<year>#Year?]"),r=t.today.year();n.groups("year").found&&(r=Number(n.groups("year").text("reduced"))||r);let i=n.groups("holiday").text("reduced"),o=pe(i,r,t.timezone);return null!==o&&(o.isBefore(t.today)&&r===t.today.year()&&(o=pe(i,r+1,t.timezone)),a=new ge(o,null,t)),a};const{Week:we,WeekEnd:ke,AnyMonth:ve,AnyQuarter:De,Year:xe,Season:Ae,WeekDay:Oe,Day:ze,Hour:je,Minute:Me,Moment:Te}=J,_e={day:ze,hour:je,evening:je,second:Te,milliscond:Te,instant:Te,minute:Me,week:we,weekend:ke,month:ve,quarter:De,year:xe,season:Ae,yr:xe,qtr:De,wk:we,sec:Te,hr:je};let Ve=`^(${Object.keys(_e).join("|")})$`;var Ee=function(e,t){let a=e.match(Ve);if(!0===a.found){let e=a.text("reduced");if(_e.hasOwnProperty(e)){let a=_e[e];return a?new a(null,e,t):null}}if(a=e.match("^#WeekDay$"),!0===a.found){let e=a.text("reduced");return new Oe(e,null,t)}return null};const{Quarter:qe,Season:Ce,Year:Se}=J,$e=function(e){return{date:e.today.date(),month:e.today.month(),year:e.today.year()}};var Pe=function(e,t){let a=e.match("(spring|summer|winter|fall|autumn) [<year>#Year?]");if(a.found){let a=e.text("reduced"),n=j(a,t.timezone,{today:$e(t)}),r=new Ce(n,null,t);if(!0===r.d.isValid())return r}if(a=e.match("[<q>#FinancialQuarter] [<year>#Year?]"),a.found){let e=a.groups("q").text("reduced"),n=j(e,t.timezone,{today:$e(t)});if(a.groups("year")){let e=Number(a.groups("year").text())||t.today.year();n=n.year(e)}let r=new qe(n,null,t);if(!0===r.d.isValid())return r}if(a=e.match("[<q>#Value] quarter (of|in)? [<year>#Year?]"),a.found){let e=a.groups("q").text("reduced"),n=j("q"+e,t.timezone,{today:$e(t)});if(a.groups("year")){let e=Number(a.groups("year").text())||t.today.year();n=n.year(e)}let r=new qe(n,null,t);if(!0===r.d.isValid())return r}if(a=e.match("^#Year$"),a.found){let a=e.text("reduced"),n=j(null,t.timezone,{today:$e(t)});n=n.year(a);let r=new Se(n,null,t);if(!0===r.d.isValid())return r}return null};const{Day:Ne,CalendarDate:Ye,Month:We,Moment:Ie}=J;var Be=function(e,t){let a=t.today.year(),n=e.match("[<date>#Value] of? [<month>#Month] [<year>#Year]");if(n.found||(n=e.match("[<month>#Month] the? [<date>#Value] [<year>#Year]")),n.found){let e={month:n.groups("month").text("reduced"),date:n.groups("date").text("reduced"),year:n.groups("year").text()||a},r=new Ye(e,null,t);if(!0===r.d.isValid())return r}if(n=e.match("[<month>#Month] of? [<year>#Year]"),n.found){let e={month:n.groups("month").text("reduced"),year:n.groups("year").text("reduced")||a},r=new We(e,null,t);if(!0===r.d.isValid())return r}if(n=e.match("[<date>#Value] of? [<month>#Month]"),n.found||(n=e.match("[<month>#Month] the? [<date>#Value]")),n.found){let e={month:n.groups("month").text("reduced"),date:n.groups("date").text("reduced"),year:t.today.year()},a=new Ye(e,null,t);if(a.d.month()<t.today.month()&&(e.year+=1,a=new Ye(e,null,t)),!0===a.d.isValid())return a}if(e.has("#Month")){let a={month:e.match("#Month").text("reduced"),date:1,year:t.today.year()},n=new We(a,null,t);if(n.d.month()<t.today.month()&&(a.year+=1,n=new We(a,null,t)),!0===n.d.isValid())return n}if(n=e.match("#WeekDay [<date>#Value]"),n.found){let e={month:t.today.month(),date:n.groups("date").text("reduced"),year:t.today.year()},a=new Ye(e,null,t);if(!0===a.d.isValid())return a}if(n=e.match("the [<date>#Value]"),n.found){let e={month:t.today.month(),date:n.groups("date").text("reduced"),year:t.today.year()},a=new Ye(e,null,t);if(!0===a.d.isValid())return a.d.isBefore(t.today)&&(a.d=a.d.add(1,"month")),a}if(n=e.match("/[0-9]{4}-[0-9]{2}-[0-9]{2}t[0-9]{2}:/"),n.found){let a=e.text("reduced"),n=new Ie(a,null,t);if(!0===n.d.isValid())return n}let r=e.text("reduced");if(!r)return new Ie(t.today,null,t);let i=new Ne(r,null,t);return!1===i.d.isValid()?null:i};const{Quarter:Le,Season:He,Week:Fe,Day:Je,Hour:Qe,Minute:Re,Month:Ge,WeekEnd:Ke}=J,Ze={day:Je,week:Fe,weekend:Ke,month:Ge,quarter:Le,season:He,hour:Qe,minute:Re};var Ue=function(e,t={}){let a=Ze[t.unit];if(!a)return e;let n=e.d;"first"===t.dir||0===t.num?(n=e.start().d,n=n.startOf(t.unit)):"last"===t.dir?(n=n.endOf(e.unit),n="weekend"===t.unit?n.day("saturday",!1):n.startOf(t.unit)):t.num&&("weekend"===t.unit&&(n=n.day("saturday",!0).add(1,"day")),n=n.add(t.num,t.unit));let r=new a(n,null,e.context);return!0===r.d.isValid()?r:e};const{WeekDay:Xe,Moment:et,Day:tt}=J,at={shift:K,counter:U,time:ae,relative:ne,section:re,timezone:le,weekday:he},nt={today:ye,holiday:be,nextLast:Ee,yearly:Pe,explicit:Be},rt={counter:Ue};var it=function(e,t){"date"===(e=e.clone()).world.isVerbose()&&console.log(` str: '${e.text()}'`),e.match("[^the] !#Value",0).remove();let a=at.shift(e),n=at.counter(e),r=at.timezone(e),i=at.time(e,t),o=at.weekday(e,t),s=at.section(e,t),u=at.relative(e);if(r){let e=(t=Object.assign({},t,{timezone:r})).today.format("iso-short");t.today=t.today.goto(t.timezone).set(e)}let d=null;return d=d||nt.today(e,t,{shift:a,time:i,rel:u}),d=d||nt.holiday(e,t),d=d||nt.nextLast(e,t),d=d||nt.yearly(e,t),d=d||nt.explicit(e,t),!d&&o&&(d=new Xe(o,null,t),o=null),"date"===e.world.isVerbose()&&(console.log(" unit: ",d),console.log("")),d?(a&&(d.applyShift(a),a.hour||a.minute?d=new et(d.d,null,d.context):(a.week||a.day||a.month)&&(d=new tt(d.d,null,d.context))),o&&"day"!==d.unit&&(d.applyWeekDay(o),d=new Xe(d.d,null,d.context)),u&&d.applyRel(u),s&&d.applySection(s),i&&d.applyTime(i),n&&n.unit&&(d=rt.counter(d,n)),d):null};var ot=function(e){let t=(e=e.clone()).match("[<hour>#Cardinal] [<min>(thirty|fifteen)]").match("#Time+");if(t.found){let e=t.groups("hour"),a=t.groups("min"),n=e.values().get(0);if(n>0&&n<=12){let e=`${n}:${a.values().get(0)}`;t.replaceWith(e)}}if(e.numbers){let t=e.numbers();t.toNumber(),t.toCardinal(!1)}else console.warn("Warning: compromise-numbers plugin is not loaded.\n You should load this plugin \n - https://bit.ly/3t8RfFG");return e.contractions().expand(),e.adverbs().remove(),e.replace("week end","weekend",!0).tag("Date"),e.replace("up to","upto",!0).tag("Date"),!1===e.has("once (a|an) #Duration")&&(e.match("[(a|an)] #Duration",0).replaceWith("1"),D(e)),e.match("@hasDash").insertAfter("to").tag("Date"),e};var st=function(e,t){return e=ot(e),ae(e,t)};const ut={mon:"monday",tue:"tuesday",tues:"wednesday",wed:"wednesday",thu:"thursday",fri:"friday",sat:"saturday",sun:"sunday",monday:"monday",tuesday:"tuesday",wednesday:"wednesday",thursday:"thursday",friday:"friday",saturday:"saturday",sunday:"sunday"},dt=function(e){return e.match("(every|each)").found?"AND":e.match("(any|a)").found?"OR":null};var lt=function(e,t){let a=e.match("[<logic>(every|any|each)] [<skip>other?] [<unit>#Duration] (starting|beginning|commencing)?");if(a.found){let t={interval:{}},n=a.groups("unit").text("reduced");return t.interval[n]=1,t.choose=dt(a),a.groups("skip").found&&(t.interval[n]=2),e=e.remove(a),{repeat:t}}if(a=e.match("[<logic>(every|any|each)] [<num>#Value] [<unit>#Duration] (starting|beginning|commencing)?"),a.found){let t={interval:{}},n=a.groups("unit");n.nouns().toSingular();let r=n.text("reduced");return t.interval[r]=a.groups("num").numbers().get(0),t.choose=dt(a),e=e.remove(a),{repeat:t}}if(a=e.match("[<logic>(every|any|each|a)] [<skip>other?] [<day>#WeekDay+] (starting|beginning|commencing)?"),a.found){let t={interval:{day:1},filter:{weekDays:{}}},n=a.groups("day").text("reduced");if(n=ut[n],n)return t.filter.weekDays[n]=!0,t.choose=dt(a),e=e.remove(a),{repeat:t}}if(a=e.match("[<logic>(every|any|each|a)] [<day>(weekday|week day|weekend|weekend day)] (starting|beginning|commencing)?"),a.found){let t={interval:{day:1},filter:{weekDays:{}}},n=a.groups("day");return n.has("(weekday|week day)")?t.filter.weekDays={monday:!0,tuesday:!0,wednesday:!0,thursday:!0,friday:!0}:n.has("(weekend|weekend day)")&&(t.filter.weekDays={saturday:!0,sunday:!0}),t.choose=dt(a),e=e.remove(a),{repeat:t}}if(a=e.match("[<day>(mondays|tuesdays|wednesdays|thursdays|fridays|saturdays|sundays)] (at|near|after)? [<time>#Time+?]"),a.found){let n={interval:{day:1},filter:{weekDays:{}}},r=a.groups("day").text("reduced");if(r=r.replace(/s$/,""),r=ut[r],r){n.filter.weekDays[r]=!0,n.choose="OR",e=e.remove(a);let i=a.groups("time");return i.found&&(n.time=st(i,t)),{repeat:n}}}return null};var ht=function(e){let t=e.start,a=e.end;if(t.d.isAfter(a.d)){if(t.isWeekDay&&a.isWeekDay)return e.end.next(),e;let n=t;e.start=a,e.end=n}return e};const mt=function(e){let t=e.start,a=e.end;return t.d.isAfter(a.d)&&a.d.hour()<10&&(a.d=a.d.ampm("pm")),e};const ct=function(e,t){return e=e.applyShift(t.punt)};const ft=[].concat([{match:"[<from>#Time+] (to|until|upto|through|thru|and) [<to>#Time+ #Date+]",desc:"3pm to 4pm january 5th",parse:(e,t)=>{let a=e.groups("from"),n=e.groups("to"),r=it(n,t);if(r){let e=r.clone();if(e.applyTime(a.text("reduced")),e){let t={start:e,end:r,unit:"time"};return!1===/(am|pm)/.test(n)&&(t=mt(t)),t=ht(t),t}}return null}},{match:"[<from>#Date+] (to|until|upto|through|thru|and) [<to>#Time+]",desc:"january from 3pm to 4pm",parse:(e,t)=>{let a=e.groups("from"),n=e.groups("to");if(a=it(a,t),a){let e=a.clone();if(e.applyTime(n.text("reduced")),e){let t={start:a,end:e,unit:"time"};return!1===/(am|pm)/.test(n.text())&&(t=mt(t)),t=ht(t),t}}return null}}],[{match:"^during? #Month+ (or|and) #Month [<year>#Year]?",desc:"march or june",parse:(e,t)=>{let a=e.match("^during? [#Month]",0);e=e.not("(or|and)");let n=it(a,t);if(n){let r=[{start:n,end:n.clone().end(),unit:n.unit}],i=e.not(a);i.found&&i.match("#Month").forEach((e=>{let a=it(e,t);r.push({start:a,end:a.clone().end(),unit:a.unit})}));let o=e.match("#Year$");return o.found&&(o=o.text("reduced"),r.forEach((e=>{e.start.d=e.start.d.year(o),e.end.d=e.end.d.year(o)}))),r}return null}},{match:"^#Month #Value+ (or|and)? #Value$",desc:"jan 5 or 8",parse:(e,t)=>{let a=(e=e.not("(or|and)")).match("^#Month #Value"),n=it(a,t);if(n){let t=[{start:n,end:n.clone().end(),unit:n.unit}],r=e.not(a);return r.found&&r.match("#Value").forEach((e=>{let a=n.clone();a.d=a.d.date(e.text("reduced")),t.push({start:a,end:a.clone().end(),unit:a.unit})})),t}return null}},{match:"^#Month+ #Value #Value+$",desc:"jan 5 8",parse:(e,t)=>{let a=e.match("#Month"),n=e.match("#Year");e=e.not("#Year");let r=[];return e.match("#Value").forEach((e=>{let i=e.append(a);n.found&&i.append(n);let o=it(i,t);o&&r.push({start:o,end:o.clone().end(),unit:o.unit})})),r}},{match:"^#Value+ (or|and)? #Value of #Month #Year?$",desc:"5 or 8 of Jan",parse:(e,t)=>{let a=e.match("#Month"),n=e.match("#Year");e=e.not("#Year");let r=[];return e.match("#Value").forEach((e=>{let i=e.append(a);n.found&&i.append(n);let o=it(i,t);o&&r.push({start:o,end:o.clone().end(),unit:o.unit})})),r}},{match:"^!(between|from|during)? [<from>#Date+] (and|or) [<to>#Date+]$",desc:"A or B",parse:(e,t)=>{let a=e.groups("from"),n=e.groups("to"),r=it(a,t),i=it(n,t);return r&&i?[{start:r,end:r.clone().end()},{start:i,end:i.clone().end()}]:null}}],[{match:"between [<start>.+] and [<end>.+]",desc:"between friday and sunday",parse:(e,t)=>{let a=e.groups("start");a=it(a,t);let n=e.groups("end");return n=it(n,t),a&&n?(n=n.before(),{start:a,end:n}):null}},{match:"[<from>#Month #Value] (to|through|thru) [<to>#Month #Value] [<year>#Year?]",desc:"june 5 to june 7",parse:(e,t)=>{let a=e.groups(),n=a.from;if(a.year&&(n=n.append(a.year)),n=it(n,t),n){let e=a.to;if(a.year&&(e=e.append(a.year)),e=it(e,t),e){return n.d.isAfter(e.d)&&(e.d=e.d.add(1,"year")),{start:n,end:e.end()}}}return null}},{match:"[<month>#Month] [<from>#Value] (to|through|thru) [<to>#Value] of? [<year>#Year]",desc:"january 5 to 7 1998",parse:(e,t)=>{let{month:a,from:n,to:r,year:i}=e.groups(),o=i.clone(),s=n.prepend(a.text()).append(i.text());if(s=it(s,t),s){let e=r.prepend(a.text()).append(o);return e=it(e,t),{start:s,end:e.end()}}return null}},{match:"[<from>#Value] (to|through|thru) [<to>#Value of? #Month #Date+?]",desc:"5 to 7 of january 1998",parse:(e,t)=>{let a=e.groups("to");if(a=it(a,t),a){let t=e.groups("from"),n=a.clone();return n.d=n.d.date(t.text("normal")),{start:n,end:a.end()}}return null}},{match:"[<from>#Month #Value] (to|through|thru) [<to>#Value]",desc:"january 5 to 7",parse:(e,t)=>{let a=e.groups("from");if(a=it(a,t),a){let t=e.groups("to"),n=a.clone();return n.d=n.d.date(t.text("normal")),{start:a,end:n.end()}}return null}},{match:"from? [<from>#Month] (to|until|upto|through|thru) [<to>#Month] [<year>#Year]",desc:"january to may 2020",parse:(e,t)=>{let a=e.groups("from"),n=a.groups("year").numbers().get(0),r=e.groups("to");if(a=it(a,t),r=it(r,t),a.d=a.d.year(n),r.d=r.d.year(n),a&&r){let e={start:a,end:r.end()};return e=ht(e),e}return null}}],[{match:"from? [<from>.+] (to|until|upto|through|thru) [<to>.+]",desc:"from A to B",parse:(e,t)=>{let a=e.groups("from"),n=e.groups("to");if(a=it(a,t),n=it(n,t),a&&n){let e={start:a,end:n.end()};return e=ht(e),e}return null}},{match:"^due? (by|before) [.+]",desc:"before june",parse:(e,t)=>{e=e.group(0);let a=it(e,t);if(a){let e=new N(t.today,null,t);return e.d.isAfter(a.d)&&(e=a.clone().applyShift({weeks:-2})),{start:e,end:a.clone().applyShift({day:-1}).end()}}return null}},{match:"^(on|in|at|@|during) [.+]",desc:"in june",parse:(e,t)=>{e=e.group(0);let a=it(e,t);return a?{start:a,end:a.clone().end(),unit:a.unit}:null}},{match:"^(after|following) [.+]",desc:"after june",parse:(e,t)=>{e=e.group(0);let a=it(e,t);return a?(a=a.after(),{start:a.clone(),end:ct(a.clone(),t)}):null}},{match:"^(middle|center|midpoint) of [.+]",desc:"middle of",parse:(e,t)=>{e=e.group(0);let a=it(e,t),n=a.clone().middle(),r=a.beforeEnd();return a?{start:n,end:r}:null}},{match:".+ after #Time+$",desc:"tuesday after 5pm",parse:(e,t)=>{let a=it(e,t);if(a){return{start:a.clone(),end:a.end(),unit:"time"}}return null}},{match:".+ before #Time+$",desc:"tuesday before noon",parse:(e,t)=>{let a=it(e,t),n=a.clone(),r=a.start();return a?{start:r,end:n,unit:"time"}:null}}]),yt=function(e){return"[object Array]"===Object.prototype.toString.call(e)},pt=function(e,t){let a={start:null,end:null};if(!e.found)return a;let n=it(e,t);if(n){"date"===e.world.isVerbose()&&console.log(" --[no-range]--");let t=n.clone().end();a={start:n,end:t,unit:n.setTime?"time":n.unit}}return a};var gt=function(e,t){let a=lt(e,t)||{},n=function(e,t){for(let a=0;a<ft.length;a+=1){let n=ft[a],r=e.match(n.match);if(r.found){"date"===e.world.isVerbose()&&console.log(` ---[${n.desc}]---`);let a=n.parse(r,t);if(null!==a)return yt(a)||(a=[a]),a}}return null}(e,t);return n||(n=[pt(e,t)]),n=n.map((e=>Object.assign({},a,e))),n.forEach((e=>{e.start&&e.end&&e.start.d.epoch>e.end.d.epoch&&(e.start=e.start.start())})),n};const bt=function(e,t){return!t||!0===t[e.dayName()]},wt={millisecond:!0,hour:!0,time:!0};var kt=function(e,t){let a=[],n=t.max_repeat||12,r=j(e.start||t.today,t.timezone);if(e.repeat.time)r=r.time(e.repeat.time);else if(!0===wt[e.unit])e.repeat.time=r.time();else{r=r.startOf("day"),"12:00am"===r.time()&&t.dayStart&&(r=r.time(t.dayStart))}let i=j(e.end,t.timezone),o=Object.keys(e.repeat.interval);o[0]&&!0===r.isSame(i,o[0])&&(i=j(864e13,t.timezone));let s=null;e.repeat.filter&&(s=e.repeat.filter.weekDays);for(let t=0;t<500&&!(a.length>=n||r.epoch>=i.epoch);t+=1)bt(r,s)&&a.push(r.iso()),o.forEach((t=>{r=r.add(e.repeat.interval[t],t)}));if(e.repeat.generated=a.map((e=>{let a=j(e,t.timezone);return a=t.dayEnd?a.time(t.dayEnd):a.endOf("day"),{start:e,end:a.iso()}})),!e.start&&e.repeat.generated&&e.repeat.generated.length>1){let t=e.repeat.generated;e.start=t[0].start,e.end=t[0].end}return e};const vt=function(e){return e&&e.d?e.d.format("iso"):null};var Dt=function(e,t){(t=t||{}).today=j(t.today||null,t.timezone),e=ot(e);let a=gt(e,t);return a.forEach((e=>{e.start=vt(e.start),e.end=vt(e.end),e.repeat&&(e=kt(e,t)),e.tz=t.timezone})),a};let xt=[["mon","monday"],["tue","tuesday"],["tues","tuesday"],["wed","wednesday"],["thu","thursday"],["thurs","thursday"],["fri","friday"],["sat","saturday"],["sun","sunday"],["jan","january"],["feb","february"],["mar","march"],["apr","april"],["jun","june"],["jul","july"],["aug","august"],["sep","september"],["sept","september"],["oct","october"],["nov","november"],["dec","december"]];xt=xt.map((e=>({short:e[0],long:e[1]})));var At=xt;var Ot=function(e){let t=e.start,a=e.end,n={};return t&&a&&(t=j(t),a=j(a).add(1,"millisecond"),n=t.diff(a),delete n.milliseconds,delete n.seconds,Object.keys(n).forEach((e=>{0===n[e]&&delete n[e]}))),n};const zt={millisecond:"time",hour:"time",minute:"time"};var jt=function(e){if(e.unit)return zt.hasOwnProperty(e.unit)?zt[e.unit]:e.unit;let t=e.duration;t||(t=Ot(e));let a=j(e.start),n=j(e.end);return t.years?a.isSame("year",n)?"year":"years":t.months?a.isSame("month",n)?"month":"months":t.days?"days":a.isSame("day",n)?"time":null},Mt={get:function(e){let t=[];return this.forEach((e=>{let a=Dt(e,this.context);a.forEach((e=>{e.unit=jt(e)})),t=t.concat(a)})),"number"==typeof e?t[e]:t},json:function(e){let t=null;"number"==typeof e&&(t=e,e=null),e=e||{terms:!1};let a=[];return this.forEach((t=>{let n=t.json(e)[0],r=Dt(t,this.context)[0];n=Object.assign(n,r),n.duration=Ot(n),n.unit=jt(n),a.push(n)})),null!==t?a[t]:a},format:function(e){return this.forEach((t=>{Dt(t,this.context).forEach((a=>{if(a.start){let n=j(a.start,this.context.timezone),r=n.format(e);if(a.end){let t=j(a.end,this.context.timezone);!1===n.isSame(t,"day")&&(r+=" to "+t.format(e))}t.replaceWith(r,{keepTags:!0,keepCase:!1})}}))})),this},toLongForm:function(){return At.forEach((e=>{this.replace(e.short,e.long,!0)})),this},toShortForm:function(){return At.forEach((e=>{this.replace(e.long,e.short,!0)})),this}};const Tt={century:!0,day:!0,decade:!0,hour:!0,millisecond:!0,minute:!0,month:!0,second:!0,weekend:!0,week:!0,year:!0,quarter:!0,season:!0};let _t={m:"minute",h:"hour",hr:"hour",min:"minute",sec:"second","week end":"weekend",wk:"week",yr:"year",qtr:"quarter"};Object.keys(_t).forEach((e=>{_t[e+"s"]=_t[e]}));var Vt=function(e){let t={},a=e.match("#Value+ #Duration");if(a.found)a.forEach((e=>{let a=e.numbers().get(0),n=e.terms().last().nouns().toSingular().text("reduced");_t.hasOwnProperty(n)&&(n=_t[n]),Tt.hasOwnProperty(n)&&null!==a&&(t[n]=a)}));else{if(e.match("(#Duration && /[0-9][a-z]+$/)").found){let a=e.text(),n=a.match(/([0-9]+)/),r=a.match(/([a-z]+)/);n&&r&&(n=n[0]||null,r=r[0]||null,_t.hasOwnProperty(r)&&(r=_t[r]),Tt.hasOwnProperty(r)&&null!==n&&(t[r]=Number(n)))}}return t};const Et={get:function(e){let t=[];return this.forEach((e=>{let a=Vt(e);t.push(a)})),"number"==typeof e?t[e]:t},json:function(e){let t=null;"number"==typeof e&&(t=e,e=null),e=e||{terms:!1};let a=[];return this.forEach((t=>{let n=t.json(e);n.duration=Vt(t),a.push(n)})),null!==t?a[t]:a},normalize:function(){return this.forEach((e=>{let t=Vt(e),a=[];if(Object.keys(t).forEach((e=>{let n=t[e],r=e;1!==n&&(r+="s"),a.push(`${n} ${r}`)})),a.length>1){let e=a.length-1;a.splice(e,0,"and")}let n=a.join(" ");e.replaceWith(n)})),this}};var qt=function(e){class t extends e{constructor(e,t,a){super(e,t,a),this.context={}}}Object.assign(t.prototype,Et),e.prototype.durations=function(e){let a=this.match("#Value+ #Duration (and? #Value+ #Duration)?");return a=a.concat(this.match("(#Duration && /[0-9][a-z]+$/)")),a=a.notIf("#DateShift"),"number"==typeof e&&(a=a.get(e)),new t(a.list,this,this.world)}};const Ct={get:function(e){let t=[];return this.forEach((e=>{let a=st(e,this.context);t.push(a)})),"number"==typeof e?t[e]:t},json:function(e){let t=null;"number"==typeof e&&(t=e,e=null),e=e||{terms:!1};let a=[];return this.forEach((t=>{let n=t.json(e);n.time=st(t,this.context),a.push(n)})),null!==t?a[t]:a}};var St=function(e){class t extends e{constructor(e,t,a){super(e,t,a),this.context={}}}Object.assign(t.prototype,Ct),e.prototype.times=function(e){let a=this.match("#Time+ (am|pm)?");return"number"==typeof e&&(a=a.get(e)),new t(a.list,this,this.world)}};const $t={punt:{weeks:2}};return function(e,t){t.addTags(O),t.addWords($),t.postProcess(D),qt(e),St(e);class a extends e{constructor(e,t,a){super(e,t,a),this.context=$t}}Object.assign(a.prototype,Mt),e.prototype.dates=function(e){let t={};e&&"object"==typeof e&&(t=e,e=null),t=Object.assign({},t,$t),void 0===t.timezone&&(t.timezone=j().timezone().name),!1===t.timezone&&(t.timezone="ETC/UTC");let n=A(this);"number"==typeof e&&(n=n.get(e));let r=new a(n.list,this,this.world);return t.today&&(t.today=j(t.today,t.timezone)),r.context=t,r}}}));

Back to list