From c7d5eb38b92762fa4440b4838446e49303acd2a7 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Sun, 15 Oct 2023 15:15:00 -0400 Subject: [PATCH 01/11] 7.4.8 --- builds/spacetime.cjs | 7 +++---- builds/spacetime.min.js | 2 +- builds/spacetime.mjs | 2 +- package.json | 4 ++-- src/_version.js | 2 +- zonefile/_build.js | 3 +-- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/builds/spacetime.cjs b/builds/spacetime.cjs index e4118087..5390eec5 100644 --- a/builds/spacetime.cjs +++ b/builds/spacetime.cjs @@ -1,4 +1,4 @@ -/* spencermountain/spacetime 7.4.7 Apache 2.0 */ +/* spencermountain/spacetime 7.4.8 Apache 2.0 */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -87,10 +87,8 @@ "2|n|04/28:00->10/26:24": "0/cairo,egypt", "2|n|03/26:02->10/29:03": "0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met", "2|n": "0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya", - "1|s|03/19:03->04/23:02": "0/casablanca", "1|s": "0/brazzaville,0/kinshasa,0/luanda,0/windhoek", "1|n|03/26:01->10/29:02": "3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet", - "1|n|03/19:03->04/23:02": "0/el_aaiun", "1|n": "0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis", "14|n": "11/kiritimati", "13|s": "11/apia,11/tongatapu", @@ -107,6 +105,7 @@ "10|s": "12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland", "10|n": "2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap", "10.5|s|04/02:01->10/01:02": "4/lord_howe,4/lhi", + "0|s|03/19:03->04/23:02": "0/casablanca,0/el_aaiun", "0|n|03/26:00->10/29:01": "1/scoresbysund,3/azores", "0|n": "0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory", "-9|n|03/12:02->11/05:02": "1/adak,1/atka,us/aleutian", @@ -4030,7 +4029,7 @@ }; var whereIts$1 = whereIts; - var version = '7.4.7'; + var version = '7.4.8'; const main = (input, tz, options) => new Spacetime(input, tz, options); diff --git a/builds/spacetime.min.js b/builds/spacetime.min.js index 81f4cec6..e6c0de94 100644 --- a/builds/spacetime.min.js +++ b/builds/spacetime.min.js @@ -1 +1 @@ -!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).spacetime=t()}(this,(function(){"use strict";const e=(e,t,n)=>{const[a,r]=e.split("/"),[o,i]=r.split(":");return Date.UTC(n,a-1,o,i)-36e5*t};var t=(t,n,a,r,o)=>{const i=new Date(t).getUTCFullYear(),s=e(n,o,i),u=e(a,r,i);return t>=s&&t{let n=e.timezones[e.tz];if(void 0===n)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(void 0===n.dst)return n.offset;let a=n.offset,r=n.offset+1;"n"===n.hem&&(r=a-1);let o=n.dst.split("->");return!0===t(e.epoch,o[0],o[1],a,r)?a:r},a={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok","9.5|s|04/02:03->10/01:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/13:01->10/02:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,hongkong,prc,roc","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/yangon,9/cocos,2/rangoon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/kolkata,2/colombo,2/calcutta","4|s":"9/reunion","4|n":"2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|04/29:02->10/28:02":"2/gaza,2/hebron","3|n|03/26:03->10/29:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet","3|n|03/26:02->10/29:03":"8/chisinau,8/tiraspol","3|n|03/26:00->10/28:24":"2/beirut","3|n|03/24:02->10/29:02":"2/jerusalem,2/tel_aviv,israel","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su","3.5|n":"2/tehran,iran","2|s|03/26:02->10/29:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|04/28:00->10/26:24":"0/cairo,egypt","2|n|03/26:02->10/29:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met","2|n":"0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|03/26:01->10/29:02":"3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet","1|n|03/19:03->04/23:02":"0/casablanca,0/el_aaiun","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s":"11/apia,11/tongatapu","13|n":"11/enderbury,11/kanton,11/fakaofo","12|s|04/02:03->09/24:02":"12/mcmurdo,11/auckland,12/south_pole,nz","12|s":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein","12.75|s|04/02:03->04/02:02":"11/chatham,nz-chat","11|s|04/02:03->10/01:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n|04/02:03->10/01:02":"11/norfolk","10|s|04/02:03->10/01:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap","10.5|s|04/02:01->10/01:02":"4/lord_howe,4/lhi","0|n|03/26:00->10/29:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory","-9|n|03/12:02->11/05:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/12:02->11/05:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/12:02->11/05:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n":"1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst","-6|s|04/01:22->09/02:22":"11/easter,7/easterisland","-6|n|03/12:02->11/05:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain","-6|n":"1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/merida,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|03/12:02->11/05:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est","-4|s|04/01:24->09/03:00":"1/santiago,7/continental","-4|s|03/25:24->10/01:00":"1/asuncion","-4|s":"1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west","-4|n|03/12:02->11/05:02":"1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/12:00->11/05:01":"1/havana,cuba","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east","-3|n|03/12:02->11/05: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/25:22->10/28:24":"1/nuuk,1/godthab","-2|n|03/12:02->11/05:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/12:02->11/05:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst"},r=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let o={};Object.keys(a).forEach((e=>{let t=e.split("|"),n={offset:Number(t[0]),hem:t[1]};t[2]&&(n.dst=t[2]),a[e].split(",").forEach((e=>{e=e.replace(/(^[0-9]+)\//,((e,t)=>(t=Number(t),r[t]+"/"))),o[e]=n}))})),o.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let n="etc/gmt"+t;o[n]={offset:-1*e,hem:"n"},n="utc/gmt"+t,o[n]={offset:-1*e,hem:"n"}}var i=o;var s=()=>{let e=(()=>{if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;let e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null})();return null===e?"utc":e};const u=/(\-?[0-9]+)h(rs)?/i,l=/(\-?[0-9]+)/,c=/utc([\-+]?[0-9]+)/i,h=/gmt([\-+]?[0-9]+)/i,d=function(e){return(e=Number(e))>=-13&&e<=13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null};var m=function(e){let t=e.match(u);if(null!==t)return d(t[1]);if(t=e.match(c),null!==t)return d(t[1]);if(t=e.match(h),null!==t){let e=-1*Number(t[1]);return d(e)}return t=e.match(l),null!==t?d(t[1]):null};let f=s();const p=Object.keys(i).reduce(((e,t)=>{let n=t.split("/")[1]||"";return n=n.replace(/_/g," "),e[n]=t,e}),{});var y=(e,t)=>{if(!e)return t.hasOwnProperty(f)||(console.warn(`Unrecognized IANA id '${f}'. Setting fallback tz to UTC.`),f="utc"),f;"string"!=typeof e&&console.error("Timezone must be a string - recieved: '",e,"'\n");let n=e.trim();if(n=n.toLowerCase(),!0===t.hasOwnProperty(n))return n;if(n=(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"))(n),!0===t.hasOwnProperty(n))return n;if(!0===p.hasOwnProperty(n))return p[n];if(!0===/[0-9]/.test(n)){let e=m(n);if(e)return e}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function g(e){return e%4==0&&e%100!=0||e%400==0}function b(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())}function k(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e,t=2){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function v(e){let t=e%10,n=e%100;return 1===t&&11!==n?e+"st":2===t&&12!==n?e+"nd":3===t&&13!==n?e+"rd":e+"th"}function _(e){return e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function j(e=""){return"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===e?"date":"min"===e||"mins"===e?"minute":e}function z(e){return"number"==typeof e?e:b(e)?e.getTime():e.epoch?e.epoch:null}function $(e,t){return!1===k(e)?t.clone().set(e):e}function O(e,t=""){const n=e>0?"+":"-",a=Math.abs(e);return`${n}${w(parseInt(""+a,10))}${t}${w(a%1*60)}`}const D={year:(new Date).getFullYear(),month:0,date:1};var M={parseArray:(e,t,n)=>{if(0===t.length)return e;let a=["year","month","date","hour","minute","second","millisecond"];for(let r=0;r{if(0===Object.keys(t).length)return e;t=Object.assign({},D,n,t);let a=Object.keys(t);for(let r=0;r0&&t<25e8&&!1===e.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),e.epoch=t,e}};const S=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach((t=>{"function"==typeof e[t]&&(e=e[t](e._today[t]))})),e},q={now:e=>S(e),today:e=>S(e),tonight:e=>e=(e=S(e)).hour(18),tomorrow:e=>e=(e=(e=S(e)).add(1,"day")).startOf("day"),yesterday:e=>e=(e=(e=S(e)).subtract(1,"day")).startOf("day"),christmas:e=>{let t=S(e).year();return e=e.set([t,11,25,18,0,0])},"new years":e=>{let t=S(e).year();return e=e.set([t,11,31,18,0,0])}};q["new years eve"]=q["new years"];var N=q;var I=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 T={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};T.date=T.day,T.month=25488e5,T.week=6048e5,T.year=3154e7,Object.keys(T).forEach((e=>{T[e+"s"]=T[e]}));var E=T;const C=(e,t,n,a,r)=>{let o=e.d[n]();if(o===t)return;let i=null===r?null:e.d[r](),s=e.epoch,u=t-o;e.epoch+=E[a]*u,"day"===a&&Math.abs(u)>28&&t<28&&(e.epoch+=E.hour),null!==r&&i!==e.d[r]()&&(e.epoch=s);const l=E[a]/2;for(;e.d[n]()t;)e.epoch-=l;null!==r&&i!==e.d[r]()&&(e.epoch=s)},x={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>C(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let n=e.d,a=n.getMonth(),r=e.epoch,o=n.getFullYear();if(a===t)return;let i=t-a;for(e.epoch+=E.day*(28*i),o!==e.d.getFullYear()&&(e.epoch=r);e.d.getMonth()t;)e.epoch-=E.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>C(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>C(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>C(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 A=(e,t)=>{let n=Object.keys(x),a=e.clone();for(let r=0;r{if(!t)return e;let n=0;if(/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(!0===/:00/.test(t)&&(t=t.replace(/:00/,"")),!0===/:30/.test(t)&&(t=t.replace(/:30/,".5"))),/^[\+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,".5")),n=parseFloat(t),Math.abs(n)>100&&(n/=100),0===n||"Z"===t||"z"===t)return e.tz="etc/gmt",e;n*=-1,n>=0&&(n="+"+n);let a="etc/gmt"+n;return e.timezones[a]&&(e.tz=a),e};var Z=(e,t="")=>{let n=(t=t.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==n){let a=Number(n[1]);if(a<0||a>24)return e.startOf("day");let r=Number(n[2]);if(n[2].length<2||r<0||r>59)return e.startOf("day");e=(e=(e=(e=e.hour(a)).minute(r)).seconds(n[3]||0)).millisecond(function(e=""){return(e=String(e)).length>3?e=e.substr(0,3):1===e.length?e+="00":2===e.length&&(e+="0"),Number(e)||0}(n[4]));let o=t.match(/[\b0-9] ?(am|pm)\b/);return null!==o&&o[1]&&(e=e.ampm(o[1])),e}if(n=t.match(/([0-9]+) ?(am|pm)/),null!==n&&n[1]){let t=Number(n[1]);return t>12||t<1?e.startOf("day"):e=(e=(e=e.hour(n[1]||0)).ampm(n[2])).startOf("hour")}return e=e.startOf("day")};let U=B();const Q=e=>{if(!0!==Y.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(g(e.year)&&e.date<=29)||e.date<=28;let t=Y[e.month]||0;return e.date<=t},G=(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 n=parseInt(e,10);return!n&&t&&(n=t.year),n=n||(new Date).getFullYear(),n},V=function(e){return"sept"===(e=e.toLowerCase().trim())?U.sep:U[e]};var W=[{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 n=parseInt(t[1],10)-1,a=parseInt(t[2],10);(e.british||n>=12)&&(a=parseInt(t[1],10),n=parseInt(t[2],10)-1);let r={date:a,month:n,year:G(t[3],e._today)||(new Date).getFullYear()};return!1===Q(r)?(e.epoch=null,e):(A(e,r),e=Z(e,t[4]))}},{reg:/^([a-z]+)[\-\/\. ]([0-9]{1,2})[\-\/\. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9:]+)?( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[5],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[3]))}}],J=[{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:1};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let n={year:G(t[2],e._today),month:V(t[1]),date:e._today.date||1};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.quarter(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.season(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(A(e,r),e=Z(e))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/,/g,"");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(A(e,r),e=Z(e))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let n=e._today;n.month&&!n.date&&(n.date=1);let a=new Date,r={year:G(t[0],n),month:n.month||a.getMonth(),date:n.date||a.getDate()};return!1===Q(r)?(e.epoch=null,e):(A(e,r),e=Z(e))}}],K=[].concat([{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return!1===Q(n)?(e.epoch=null,e):(H(e,t[5]),A(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([0-9]{1,2})[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return n.month>=12&&(n.date=parseInt(t[2],10),n.month=parseInt(t[3],10)-1),!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([a-z]+)[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[1],e._today),month:V(t[2]),date:_(t[3]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}}],W,[{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1])};return n.month&&!1!==Q(n)?(A(e,n),e=Z(e,t[4])):(e.epoch=null,e)}},{reg:/^([0-9]{1,2})[\. -/]([a-z]+)[\. -/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={date:Number(t[1]),month:V(t[2]),year:Number(t[3])};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=e.startOf("day"),e=Z(e,t[4]))}}],J);var R=function(e,t,n){for(let a=0;a{let n=e._today||ne;if("number"==typeof t)return te(e,t);if(e.epoch=Date.now(),e._today&&k(e._today)&&Object.keys(e._today).length>0){let t=ee(e,n,ne);t.isValid()&&(e.epoch=t.epoch)}return null==t||""===t?e:!0===b(t)?(e.epoch=t.getTime(),e):!0===function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t)?e=X(e,t,n):!0===k(t)?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):e=ee(e,t,n):"string"!=typeof t?e:(t=I(t),!0===N.hasOwnProperty(t)?e=N[t](e):R(e,t))};let re=["sun","mon","tue","wed","thu","fri","sat"],oe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ie(){return re}function se(){return oe}const ue={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 le=!0;var ce=e=>{let t=e.timezone().current.offset;return t?O(t,":"):"Z"};const he=e=>le?function(e){return e?e[0].toUpperCase()+e.substr(1):""}(e):e,de={day:e=>he(e.dayName()),"day-short":e=>he(ie()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>v(e.day()),"day-pad":e=>w(e.day()),date:e=>e.date(),"date-ordinal":e=>v(e.date()),"date-pad":e=>w(e.date()),month:e=>he(e.monthName()),"month-short":e=>he(L()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>v(e.month()),"month-pad":e=>w(e.month()),"iso-month":e=>w(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+" BC")},"year-short":e=>{let t=e.year();return t>0?`'${String(e.year()).substr(2,4)}`:(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),n=t<0,a=w(Math.abs(t),4);return n&&(a=w(a,6),a="-"+a),a},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${w(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>w(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>w(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>w(e.minute()),second:e=>e.second(),"second-pad":e=>w(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>w(e.millisecond(),3),ampm:e=>e.ampm(),AMPM:e=>e.ampm().toUpperCase(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>ce(e),numeric:e=>`${e.year()}/${w(e.month()+1)}/${w(e.date())}`,"numeric-us":e=>`${w(e.month()+1)}/${w(e.date())}/${e.year()}`,"numeric-uk":e=>`${w(e.date())}/${w(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${w(e.month()+1)}/${w(e.date())}`,iso:e=>`${e.format("iso-year")}-${w(e.month()+1)}-${w(e.date())}T${w(e.h24())}:${w(e.minute())}:${w(e.second())}.${w(e.millisecond(),3)}${ce(e)}`,"iso-short":e=>{let t=w(e.month()+1),n=w(e.date());var a;return`${(a=e.year())>=0?w(a,4):"-"+w(a=Math.abs(a),4)}-${t}-${n}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${L()[e.month()]} ${v(e.date())}, ${e.time()}`,"nice-24":e=>`${L()[e.month()]} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`,"nice-year":e=>`${L()[e.month()]} ${v(e.date())}, ${e.year()}`,"nice-day":e=>`${ie()[e.day()]} ${he(L()[e.month()])} ${v(e.date())}`,"nice-full":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`},me={"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(me).forEach((e=>de[e]=de[me[e]]));var fe=(e,t="")=>{if(!0!==e.isValid())return"";if(de.hasOwnProperty(t)){let n=de[t](e)||"";return"json"!==t&&(n=String(n),"ampm"!==t.toLowerCase()&&(n=he(n))),n}if(-1!==t.indexOf("{")){let n=/\{(.+?)\}/g;return t=t.replace(n,((t,n)=>{if(n=n.toLowerCase().trim(),de.hasOwnProperty(n)){let t=String(de[n](e));return"ampm"!==n.toLowerCase()?he(t):t}return""})),t}return e.format("iso-short")};const pe={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=>w(Number(String(e.year()).substr(2,4))),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>"0"+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>w(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>w(e.week()),d:e=>e.date(),dd:e=>w(e.date()),D:e=>e.dayOfYear(),DD:e=>w(e.dayOfYear()),DDD:e=>w(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=>w(e.h12()),H:e=>e.hour(),HH:e=>w(e.hour()),m:e=>e.minute(),mm:e=>w(e.minute()),s:e=>e.second(),ss:e=>w(e.second()),SSS:e=>w(e.millisecond(),3),A:e=>e.epoch-e.startOf("day").epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>O(e.timezone().current.offset),ZZ:e=>O(e.timezone().current.offset),ZZZ:e=>O(e.timezone().current.offset),ZZZZ:e=>O(e.timezone().current.offset,":")},ye=(e,t,n)=>{let a=e,r=t;for(let o=0;o{let n=t.split("");return n=function(e){for(let t=0;te))}(n),n=function(e){for(let t=0;te))).map((e=>("''"===e&&(e="'"),e)))}(n),n.reduce(((t,n)=>(void 0!==pe[n]?t+=pe[n](e)||"":(/^'.{1,}'$/.test(n)&&(n=n.replace(/'/g,"")),t+=n),t)),"")};const be=["year","season","quarter","month","week","day","quarterHour","hour","minute"],ke=function(e,t){let n=e.clone().startOf(t),a=e.clone().endOf(t).epoch-n.epoch,r=(e.epoch-n.epoch)/a;return parseFloat(r.toFixed(2))};var we=(e,t)=>{if(t)return t=j(t),ke(e,t);let n={};return be.forEach((t=>{n[t]=ke(e,t)})),n};var ve=(e,t)=>{let n=e.progress();return"quarterhour"===(t=j(t))&&(t="quarterHour"),void 0!==n[t]?(n[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):!1===e.silent&&console.warn("no known unit '"+t+"'"),e};const _e=(e,t,n)=>{let a=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,n),a+=1;return e.isAfter(t,n)&&(a-=1),a};var je=(e,t,n)=>e.isBefore(t)?_e(e,t,n):-1*_e(t,e,n);var ze=function(e,t){let n=t.epoch-e.epoch,a={milliseconds:n,seconds:parseInt(n/1e3,10)};a.minutes=parseInt(a.seconds/60,10),a.hours=parseInt(a.minutes/60,10);let r=e.clone();return a.years=((e,t)=>{let n=t.year()-e.year();return(e=e.year(t.year())).isAfter(t)&&(n-=1),n})(r,t),r=e.add(a.years,"year"),a.months=12*a.years,r=e.add(a.months,"month"),a.months+=je(r,t,"month"),a.quarters=4*a.years,a.quarters+=parseInt(a.months%12/3,10),a.weeks=52*a.years,r=e.add(a.weeks,"week"),a.weeks+=je(r,t,"week"),a.days=7*a.weeks,r=e.add(a.days,"day"),a.days+=je(r,t,"day"),a};var $e=function(e,t,n){t=$(t,e);let a=!1;if(e.isAfter(t)){let n=e;e=t,t=n,a=!0}let r=ze(e,t);return a&&(r=function(e){return Object.keys(e).forEach((t=>{e[t]*=-1})),e}(r)),n?(n=j(n),!0!==/s$/.test(n)&&(n+="s"),"dates"===n&&(n="days"),r[n]):r};const Oe=e=>Math.abs(e)||0;var De=function(e){let t="P";return t+=Oe(e.years)+"Y",t+=Oe(e.months)+"M",t+=Oe(e.days)+"DT",t+=Oe(e.hours)+"H",t+=Oe(e.minutes)+"M",t+=Oe(e.seconds)+"S",t};const Me={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 Se(e,t){return 1===e&&(t=t.slice(0,-1)),e+" "+t}var qe=function(e){let t=null,n=null,a=[],r=[];return Object.keys(e).forEach(((o,i,s)=>{const u=Math.abs(e[o]);if(0===u)return;a.push(u+o[0]);const l=Se(u,o);if(r.push(l),!t){if(t=n=l,i>4)return;const a=s[i+1],r=Math.abs(e[a]);r>Me[a].almost?(t=Se(u+1,o),n="almost "+t):r>Me[a].over&&(n="over "+l)}})),{qualified:n,rounded:t,abbreviated:a,englishValues:r}};var Ne=(e,t)=>{const n=function(e,t){const n=e.isBefore(t),a=n?t:e;let r=n?e:t;r=r.clone();const o={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(o).forEach((e=>{if(r.isSame(a,e))return;let t=r.diff(a,e);r=r.add(t,e),o[e]=t})),n&&Object.keys(o).forEach((e=>{0!==o[e]&&(o[e]*=-1)})),o}(e,t=$(t,e));if(!0===Object.keys(n).every((e=>!n[e])))return{diff:n,rounded:"now",qualified:"now",precise:"now",abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:"present"};let a,r="future",{rounded:o,qualified:i,englishValues:s,abbreviated:u}=qe(n);a=s.splice(0,2).join(", "),!0===e.isAfter(t)?(o+=" ago",i+=" ago",a+=" ago",r="past"):(o="in "+o,i="in "+i,a="in "+a);let l=De(n);return{diff:n,rounded:o,qualified:i,precise:a,abbreviated:u,iso:l,direction:r}};var Ie={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]]},Te=[null,[0,1],[3,1],[6,1],[9,1]];const Ee={second:e=>(A(e,{millisecond:0}),e),minute:e=>(A(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),A(e,{second:0,millisecond:0}),e},hour:e=>(A(e,{minute:0,second:0,millisecond:0}),e),day:e=>(A(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")),A(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(A(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Te[t]&&A(e,{month:Te[t][0],date:Te[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),n="north";"South"===e.hemisphere()&&(n="south");for(let a=0;a(A(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{let t=(e=e.startOf("year")).year(),n=10*parseInt(t/10,10);return e=e.year(n)},century:e=>{let t=(e=e.startOf("year")).year(),n=100*parseInt(t/100,10);return e=e.year(n)}};Ee.date=Ee.day;var Ce=function(e,t,n){if(!t||!n)return[];if(t=j(t),n=e.clone().set(n),e.isAfter(n)){let t=e;e=n,n=t}let a=e.clone();if(function(e){return!!ie().find((t=>t===e))||!!se().find((t=>t===e))}(t))a=a.next(t),t="week";else{a.startOf(t).isBefore(e)&&(a=a.next(t))}let r=[];for(;a.isBefore(n);)r.push(a),a=a.add(1,t);return r};var xe=e=>{let n=e.timezones,a=e.tz;if(!1===n.hasOwnProperty(a)&&(a=y(e.tz,n)),null===a)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let r=n[a],o={name:(i=a,i=(i=(i=(i=(i=(i=(i=i[0].toUpperCase()+i.substr(1)).replace(/[\/_-]([a-z])/gi,(e=>e.toUpperCase()))).replace(/_(of|es)_/i,(e=>e.toLowerCase()))).replace(/\/gmt/i,"/GMT")).replace(/\/Dumontdurville$/i,"/DumontDUrville")).replace(/\/Mcmurdo$/i,"/McMurdo")).replace(/\/Port-au-prince$/i,"/Port-au-Prince")),hasDst:Boolean(r.dst),default_offset:r.offset,hemisphere:"s"===r.hem?"South":"North",current:{}};var i,s;if(o.hasDst){let e=(s=r.dst)?s.split("->"):[];o.change={start:e[0],back:e[1]}}let u=r.offset,l=u;return!0===o.hasDst&&(l="North"===o.hemisphere?u-1:r.offset+1),!1===o.hasDst?(o.current.offset=u,o.current.isDST=!1):!0===t(e.epoch,o.change.start,o.change.back,u,l)?(o.current.offset=u,o.current.isDST="North"===o.hemisphere):(o.current.offset=l,o.current.isDST="South"===o.hemisphere),o};const Ae=["century","decade","year","month","date","day","hour","minute","second","millisecond"],Ye={set:function(e,t){let n=this.clone();return n=ae(n,e),t&&(this.tz=y(t)),n},timezone:function(){return xe(this)},isDST:function(){return xe(this).current.isDST},hasDST:function(){return xe(this).hasDst},offset:function(){return 60*xe(this).current.offset},hemisphere:function(){return xe(this).hemisphere},format:function(e){return fe(this,e)},unixFmt:function(e){return ge(this,e)},startOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Ee[t]?Ee[t](n):"summer"===t||"winter"===t?(n=n.season(t),Ee.season(n)):n})(this,e)},endOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Ee[t]?(n=Ee[t](n),n=n.add(1,t),n=n.subtract(1,"millisecond"),n):n})(this,e)},leapYear:function(){return g(this.year())},progress:function(e){return we(this,e)},nearest:function(e){return ve(this,e)},diff:function(e,t){return $e(this,e,t)},since:function(e){return e||(e=this.clone().set()),Ne(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=y(e,t.timezones),t},every:function(e,t){if("object"==typeof e&&"string"==typeof t){let n=t;t=e,e=n}return Ce(this,e,t)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},daysInMonth:function(){switch(this.month()){case 0:case 2:case 4:case 6:case 7:case 9:case 11:return 31;case 1:return this.leapYear()?29:28;case 3:case 5:case 8:case 10:return 30;default:throw new Error("Invalid Month state.")}},log:function(){return console.log(""),console.log(fe(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(fe(this,"full-short")),this},json:function(){return Ae.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=ie().indexOf(e);-1===t&&(t=se().indexOf(e)),-1===t&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};Ye.inDST=Ye.isDST,Ye.round=Ye.nearest,Ye.each=Ye.every;var Fe=Ye;const Pe=e=>("string"==typeof e&&(e=parseInt(e,10)),e),Le=["year","month","date","hour","minute","second","millisecond"],Be=(e,t,n)=>{let a=Le.indexOf(n),r=Le.slice(a,Le.length);for(let n=0;n=24?t=24:t<0&&(t=0);let a=e.clone(),r=e.hour()-t,o=r*E.hour;return e.epoch-=o,e.date()!==a.date()&&(e=a.clone(),r>1&&(r-=1),r<1&&(r+=1),o=r*E.hour,e.epoch-=o),A(e,{hour:t}),Be(e,a,"minute"),(e=He(e,a,n,"day")).epoch},Qe=function(e,t){return"string"==typeof t&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=(t=Number(t))>30?1900+t:2e3+t),t=Pe(t),A(e,{year:t}),e.epoch};let Ge="am",Ve="pm";const We={millisecond:function(e){if(void 0!==e){let t=this.clone();return t.epoch=function(e,t){t=Pe(t);let n=e.millisecond()-t;return e.epoch-n}(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Pe(t);let a=e.clone(),r=(e.second()-t)*E.second;return e.epoch=e.epoch-r,(e=He(e,a,n,"minute")).epoch}(n,e,t),n}return this.d.getSeconds()},minute:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=Ze(n,e,t),n}return this.d.getMinutes()},hour:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone();return n.epoch=Ue(n,e,t),n}return n.getHours()},hourFloat:function(e,t){if(void 0!==e){let n=this.clone(),a=e%1;a*=60;let r=parseInt(e,10);return n.epoch=Ue(n,r,t),n.epoch=Ze(n,a,t),n}let n=this.d,a=n.getHours(),r=n.getMinutes();return r/=60,a+r},hour12:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone(),a=(e=""+e).match(/^([0-9]+)(am|pm)$/);if(a){let e=parseInt(a[1],10);"pm"===a[2]&&(e+=12),n.epoch=Ue(n,e,t)}return n}let a=n.getHours();return a>12&&(a-=12),0===a&&(a=12),a},time:function(e,t){if(void 0!==e){let n=this.clone();return e=e.toLowerCase().trim(),n.epoch=function(e,t,n){let a=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!a){if(a=t.match(/([0-9]{1,2}) ?(am|pm)/),!a)return e.epoch;a.splice(2,0,"0"),a.splice(3,0,"")}let r=!1,o=parseInt(a[1],10),i=parseInt(a[2],10);i>=60&&(i=59),o>12&&(r=!0),!1===r&&("am"===a[4]&&12===o&&(o=0),"pm"===a[4]&&o<12&&(o+=12)),a[3]=a[3]||"",a[3]=a[3].replace(/:/,"");let s=parseInt(a[3],10)||0,u=e.clone();return e=(e=(e=(e=e.hour(o)).minute(i)).second(s)).millisecond(0),(e=He(e,u,n,"day")).epoch}(n,e,t),n}return`${this.h12()}:${w(this.minute())}${this.ampm()}`},ampm:function(e,t){let n=Ge,a=this.hour();if(a>=12&&(n=Ve),"string"!=typeof e)return n;let r=this.clone();return e=e.toLowerCase().trim(),a>=12&&"am"===e?(a-=12,r.hour(a,t)):a<12&&"pm"===e?(a+=12,r.hour(a,t)):r},dayTime:function(e,t){if(void 0!==e){const n={morning:"7:00",breakfast:"7:00",noon:"12:00",lunch:"12:00",afternoon:"14:00",evening:"18:00",dinner:"18:00",night:"23:00",midnight:"00:00"};let a=this.clone();return e=(e=e||"").toLowerCase(),!0===n.hasOwnProperty(e)&&(a=a.time(n[e],t)),a}let n=this.hour();return n<6?"night":n<12?"morning":n<17?"afternoon":n<22?"evening":"night"},iso:function(e){return void 0!==e?this.set(e):this.format("iso")}};var Je=We;const Ke={date:function(e,t){if(void 0!==e){let n=this.clone();return(e=parseInt(e,10))&&(n.epoch=function(e,t,n){if((t=Pe(t))>28){let n=e.month(),a=Y[n];1===n&&29===t&&g(e.year())&&(a=29),t>a&&(t=a)}t<=0&&(t=1);let a=e.clone();return A(e,{date:t}),(e=He(e,a,n,"month")).epoch}(n,e,t)),n}return this.d.getDate()},day:function(e,t){if(void 0===e)return this.d.getDay();let n=this.clone(),a=e;"string"==typeof e&&(e=e.toLowerCase(),ue.hasOwnProperty(e)?a=ue[e]:(a=ie().indexOf(e),-1===a&&(a=se().indexOf(e))));let r=this.d.getDay()-a;!0===t&&r>0&&(r-=7),!1===t&&r<0&&(r+=7);let o=this.subtract(r,"days");return A(o,{hour:n.hour(),minute:n.minute(),second:n.second()}),o},dayName:function(e,t){if(void 0===e)return se()[this.day()];let n=this.clone();return n=n.day(e,t),n}};var Re=Ke;const Xe=e=>e=(e=(e=e.minute(0)).second(0)).millisecond(1),et={dayOfYear:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Pe(t);let a=e.clone();return(t-=1)<=0?t=0:t>=365&&(t=g(e.year())?365:364),e=(e=e.startOf("year")).add(t,"day"),Be(e,a,"hour"),(e=He(e,a,n,"year")).epoch}(n,e,t),n}let n,a=0,r=this.d.getMonth();for(let e=1;e<=r;e++)n=new Date,n.setDate(1),n.setFullYear(this.d.getFullYear()),n.setHours(1),n.setMinutes(1),n.setMonth(e),n.setHours(-2),a+=n.getDate();return a+this.d.getDate()},week:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){let a=e.clone();return t=Pe(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=He(e,a,n,"year")).epoch}(this,e,t),n=Xe(n),n}let n=this.clone();n=n.month(0),n=n.date(1),n=Xe(n),n=n.day("monday"),11===n.month()&&n.date()>=25&&(n=n.add(1,"week"));let a=1;1===n.date()&&(a=0),n=n.minus(1,"second");const r=this.epoch;if(n.epoch>r)return 1;let o=0,i=4*this.month();for(n.epoch+=E.week*i,o+=i;o<=52;o++){if(n.epoch>r)return o+a;n=n.add(1,"week")}return 52},month:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){"string"==typeof t&&("sept"===t&&(t="sep"),t=B()[t.toLowerCase()]),(t=Pe(t))>=12&&(t=11),t<=0&&(t=0);let a=e.date();a>Y[t]&&(a=Y[t]);let r=e.clone();return A(e,{month:t,d:a}),(e=He(e,r,n,"year")).epoch}(n,e,t),n}return this.d.getMonth()},monthName:function(e,t){if(void 0!==e){let n=this.clone();return n=n.month(e,t),n}return P[this.month()]},quarter:function(e,t){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Te[e])){let n=this.clone(),a=Te[e][0];return n=n.month(a,t),n=n.date(1,t),n=n.startOf("day"),n}let n=this.d.getMonth();for(let e=1;e=Ie[n][e][1]&&a0&&(t.epoch=Qe(t,-1*n)),"ad"===e&&n<0&&(t.epoch=Qe(t,-1*n)),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,n)=>(n.match(/b\.?c\.?/i)&&(t="-"+t),t)))).replace(/c$/,""));let t=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(0===t&&(t=1),t=t>=0?100*(t-1):100*(t+1),this.year(t))}let t=this.startOf("century").year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(void 0!==e){if("string"==typeof e&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=Number(e),isNaN(e)))return console.warn("Spacetime: Invalid millenium input"),this;e>0&&(e-=1);let t=1e3*e;return 0===t&&(t=1),this.year(t)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}};var tt=et;const nt=Object.assign({},Je,Re,tt);nt.milliseconds=nt.millisecond,nt.seconds=nt.second,nt.minutes=nt.minute,nt.hours=nt.hour,nt.hour24=nt.hour,nt.h12=nt.hour12,nt.h24=nt.hour24,nt.days=nt.day;var at=e=>{Object.keys(nt).forEach((t=>{e.prototype[t]=nt[t]}))};const rt=function(e,t){return 1===e&&g(t)?29:Y[e]},ot=(e,t)=>{if(e.month>0){let n=parseInt(e.month/12,10);e.year=t.year()+n,e.month=e.month%12}else if(e.month<0){let n=Math.abs(e.month),a=parseInt(n/12,10);n%12!=0&&(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},it=(e,t,n)=>{let a=t.year(),r=t.month(),o=rt(r,a);for(;n>o;)n-=o,r+=1,r>=12&&(r-=12,a+=1),o=rt(r,a);return e.month=r,e.date=n,e},st=(e,t,n)=>{e.year=t.year(),e.month=t.month();let a=t.date();for(e.date=a-Math.abs(n);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let t=rt(e.month,e.year);e.date+=t}return e},ut=["millisecond","second","minute","hour","date","month"];let lt={second:ut.slice(0,1),minute:ut.slice(0,2),quarterhour:ut.slice(0,2),hour:ut.slice(0,3),date:ut.slice(0,4),month:ut.slice(0,4),quarter:ut.slice(0,4),season:ut.slice(0,4),year:ut,decade:ut,century:ut};lt.week=lt.hour,lt.season=lt.date,lt.quarter=lt.date;const ct={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},ht={month:!0,quarter:!0,season:!0,year:!0};var dt=e=>{e.prototype.add=function(e,t){let n=this.clone();if(!t||0===e)return n;let a=this.clone();if("millisecond"===(t=j(t)))return n.epoch+=e,n;"fortnight"===t&&(e*=2,t="week"),E[t]?n.epoch+=E[t]*e:"week"===t||"weekend"===t?n.epoch+=E.day*(7*e):"quarter"===t||"season"===t?n.epoch+=E.month*(3*e):"quarterhour"===t&&(n.epoch+=15*E.minute*e);let r={};if(lt[t]&<[t].forEach((e=>{r[e]=a[e]()})),ct[t]){const e=a.timezone().current.offset-n.timezone().current.offset;n.epoch+=3600*e*1e3}if("month"===t&&(r.month=a.month()+e,r=ot(r,a)),"week"===t){let t=a.date()+7*e;t<=28&&t>1&&(r.date=t)}if("weekend"===t&&"saturday"!==n.dayName())n=n.day("saturday",!0);else if("date"===t){if(e<0)r=st(r,a,e);else{let t=a.date()+e;r=it(r,a,t)}0!==e&&a.isSame(n,"day")&&(r.date=a.date()+e)}else if("quarter"===t){if(r.month=a.month()+3*e,r.year=a.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=a.date()}else if("year"===t){let t=a.year()+e,r=n.year();if(rt){let t=Math.floor(e/4)||1;n.epoch+=E.day*t}}else"decade"===t?r.year=n.year()+10:"century"===t&&(r.year=n.year()+100);if(ht[t]){let e=Y[r.month];r.date=a.date(),r.date>e&&(r.date=e)}return Object.keys(r).length>1&&A(n,r),n},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 mt={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()};mt.date=mt.day;var ft=e=>{e.prototype.isSame=function(t,n,a=!0){let r=this;if(!n)return null;if("string"==typeof t&&"object"==typeof n){let e=t;t=n,n=e}return"string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),n=n.replace(/s$/,""),!0===a&&r.tz!==t.tz&&((t=t.clone()).tz=r.tz),mt[n]?mt[n](r)===mt[n](t):null}};var pt=e=>{const t={isAfter:function(e){let t=z(e=$(e,this));return null===t?null:this.epoch>t},isBefore:function(e){let t=z(e=$(e,this));return null===t?null:this.epoch{e.prototype[n]=t[n]}))};var yt=e=>{const t={i18n:function(e){var t,n,a;return k(e.days)&&(t=e.days,re=t.short||re,oe=t.long||oe),k(e.months)&&function(e){F=e.short||F,P=e.long||P}(e.months),a=e.useTitleCase,"[object Boolean]"===Object.prototype.toString.call(a)&&(n=e.useTitleCase,le=n),k(e.ampm)&&function(e){Ge=e.am||Ge,Ve=e.pm||Ve}(e.ampm),this}};Object.keys(t).forEach((n=>{e.prototype[n]=t[n]}))};let gt=i;const bt=function(e,t,a={}){this.epoch=null,this.tz=y(t,gt),this.silent=void 0===a.silent||a.silent,this.british=a.dmy||a.british,this._weekStart=1,void 0!==a.weekStart&&(this._weekStart=a.weekStart),this._today={},void 0!==a.today&&(this._today=a.today),Object.defineProperty(this,"d",{get:function(){let e=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:()=>gt,set:e=>(gt=e,e)});let r=ae(this,e);this.epoch=r.epoch};Object.keys(Fe).forEach((e=>{bt.prototype[e]=Fe[e]})),bt.prototype.clone=function(){return new bt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})},bt.prototype.toLocalDate=function(){return this.toNativeDate()},bt.prototype.toNativeDate=function(){return new Date(this.epoch)},at(bt),dt(bt),ft(bt),pt(bt),yt(bt);var kt=bt;var wt=(e,t)=>{let n=new kt(null),a=new kt(null);n=n.time(e),a=t?a.time(t):n.add(59,"minutes");let r=n.hour(),o=a.hour();return Object.keys(n.timezones).filter((e=>{if(-1===e.indexOf("/"))return!1;let t=new kt(null,e),i=t.hour();return i>=r&&i<=o&&(!(i===r&&t.minute()a.minute()))}))};const vt=(e,t,n)=>new kt(e,t,n),_t=function(e){let t=e._today||{};return Object.keys(t).forEach((n=>{e=e[n](t[n])})),e};return vt.now=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n},vt.today=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.startOf("day")},vt.tomorrow=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.add(1,"day").startOf("day")},vt.yesterday=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.subtract(1,"day").startOf("day")},vt.extend=function(e={}){return Object.keys(e).forEach((t=>{kt.prototype[t]=e[t]})),this},vt.timezones=function(){return(new kt).timezones},vt.max=function(e,t){let n=new kt(null,e,t);return n.epoch=864e13,n},vt.min=function(e,t){let n=new kt(null,e,t);return n.epoch=-864e13,n},vt.whereIts=wt,vt.version="7.4.7",vt.plugin=vt.extend,vt})); +!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).spacetime=t()}(this,(function(){"use strict";const e=(e,t,n)=>{const[a,r]=e.split("/"),[o,i]=r.split(":");return Date.UTC(n,a-1,o,i)-36e5*t};var t=(t,n,a,r,o)=>{const i=new Date(t).getUTCFullYear(),s=e(n,o,i),u=e(a,r,i);return t>=s&&t{let n=e.timezones[e.tz];if(void 0===n)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(void 0===n.dst)return n.offset;let a=n.offset,r=n.offset+1;"n"===n.hem&&(r=a-1);let o=n.dst.split("->");return!0===t(e.epoch,o[0],o[1],a,r)?a:r},a={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok","9.5|s|04/02:03->10/01:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/13:01->10/02:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,hongkong,prc,roc","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/yangon,9/cocos,2/rangoon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/kolkata,2/colombo,2/calcutta","4|s":"9/reunion","4|n":"2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|04/29:02->10/28:02":"2/gaza,2/hebron","3|n|03/26:03->10/29:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet","3|n|03/26:02->10/29:03":"8/chisinau,8/tiraspol","3|n|03/26:00->10/28:24":"2/beirut","3|n|03/24:02->10/29:02":"2/jerusalem,2/tel_aviv,israel","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su","3.5|n":"2/tehran,iran","2|s|03/26:02->10/29:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|04/28:00->10/26:24":"0/cairo,egypt","2|n|03/26:02->10/29:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met","2|n":"0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|03/26:01->10/29:02":"3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s":"11/apia,11/tongatapu","13|n":"11/enderbury,11/kanton,11/fakaofo","12|s|04/02:03->09/24:02":"12/mcmurdo,11/auckland,12/south_pole,nz","12|s":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein","12.75|s|04/02:03->04/02:02":"11/chatham,nz-chat","11|s|04/02:03->10/01:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n|04/02:03->10/01:02":"11/norfolk","10|s|04/02:03->10/01:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap","10.5|s|04/02:01->10/01:02":"4/lord_howe,4/lhi","0|s|03/19:03->04/23:02":"0/casablanca,0/el_aaiun","0|n|03/26:00->10/29:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory","-9|n|03/12:02->11/05:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/12:02->11/05:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/12:02->11/05:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n":"1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst","-6|s|04/01:22->09/02:22":"11/easter,7/easterisland","-6|n|03/12:02->11/05:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain","-6|n":"1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/merida,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|03/12:02->11/05:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est","-4|s|04/01:24->09/03:00":"1/santiago,7/continental","-4|s|03/25:24->10/01:00":"1/asuncion","-4|s":"1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west","-4|n|03/12:02->11/05:02":"1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/12:00->11/05:01":"1/havana,cuba","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east","-3|n|03/12:02->11/05: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/25:22->10/28:24":"1/nuuk,1/godthab","-2|n|03/12:02->11/05:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/12:02->11/05:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst"},r=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let o={};Object.keys(a).forEach((e=>{let t=e.split("|"),n={offset:Number(t[0]),hem:t[1]};t[2]&&(n.dst=t[2]),a[e].split(",").forEach((e=>{e=e.replace(/(^[0-9]+)\//,((e,t)=>(t=Number(t),r[t]+"/"))),o[e]=n}))})),o.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let n="etc/gmt"+t;o[n]={offset:-1*e,hem:"n"},n="utc/gmt"+t,o[n]={offset:-1*e,hem:"n"}}var i=o;var s=()=>{let e=(()=>{if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;let e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null})();return null===e?"utc":e};const u=/(\-?[0-9]+)h(rs)?/i,l=/(\-?[0-9]+)/,c=/utc([\-+]?[0-9]+)/i,h=/gmt([\-+]?[0-9]+)/i,d=function(e){return(e=Number(e))>=-13&&e<=13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null};var m=function(e){let t=e.match(u);if(null!==t)return d(t[1]);if(t=e.match(c),null!==t)return d(t[1]);if(t=e.match(h),null!==t){let e=-1*Number(t[1]);return d(e)}return t=e.match(l),null!==t?d(t[1]):null};let f=s();const p=Object.keys(i).reduce(((e,t)=>{let n=t.split("/")[1]||"";return n=n.replace(/_/g," "),e[n]=t,e}),{});var y=(e,t)=>{if(!e)return t.hasOwnProperty(f)||(console.warn(`Unrecognized IANA id '${f}'. Setting fallback tz to UTC.`),f="utc"),f;"string"!=typeof e&&console.error("Timezone must be a string - recieved: '",e,"'\n");let n=e.trim();if(n=n.toLowerCase(),!0===t.hasOwnProperty(n))return n;if(n=(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"))(n),!0===t.hasOwnProperty(n))return n;if(!0===p.hasOwnProperty(n))return p[n];if(!0===/[0-9]/.test(n)){let e=m(n);if(e)return e}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function g(e){return e%4==0&&e%100!=0||e%400==0}function b(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())}function k(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e,t=2){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function v(e){let t=e%10,n=e%100;return 1===t&&11!==n?e+"st":2===t&&12!==n?e+"nd":3===t&&13!==n?e+"rd":e+"th"}function _(e){return e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function j(e=""){return"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===e?"date":"min"===e||"mins"===e?"minute":e}function z(e){return"number"==typeof e?e:b(e)?e.getTime():e.epoch?e.epoch:null}function $(e,t){return!1===k(e)?t.clone().set(e):e}function O(e,t=""){const n=e>0?"+":"-",a=Math.abs(e);return`${n}${w(parseInt(""+a,10))}${t}${w(a%1*60)}`}const D={year:(new Date).getFullYear(),month:0,date:1};var M={parseArray:(e,t,n)=>{if(0===t.length)return e;let a=["year","month","date","hour","minute","second","millisecond"];for(let r=0;r{if(0===Object.keys(t).length)return e;t=Object.assign({},D,n,t);let a=Object.keys(t);for(let r=0;r0&&t<25e8&&!1===e.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),e.epoch=t,e}};const S=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach((t=>{"function"==typeof e[t]&&(e=e[t](e._today[t]))})),e},q={now:e=>S(e),today:e=>S(e),tonight:e=>e=(e=S(e)).hour(18),tomorrow:e=>e=(e=(e=S(e)).add(1,"day")).startOf("day"),yesterday:e=>e=(e=(e=S(e)).subtract(1,"day")).startOf("day"),christmas:e=>{let t=S(e).year();return e=e.set([t,11,25,18,0,0])},"new years":e=>{let t=S(e).year();return e=e.set([t,11,31,18,0,0])}};q["new years eve"]=q["new years"];var N=q;var I=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 T={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};T.date=T.day,T.month=25488e5,T.week=6048e5,T.year=3154e7,Object.keys(T).forEach((e=>{T[e+"s"]=T[e]}));var E=T;const C=(e,t,n,a,r)=>{let o=e.d[n]();if(o===t)return;let i=null===r?null:e.d[r](),s=e.epoch,u=t-o;e.epoch+=E[a]*u,"day"===a&&Math.abs(u)>28&&t<28&&(e.epoch+=E.hour),null!==r&&i!==e.d[r]()&&(e.epoch=s);const l=E[a]/2;for(;e.d[n]()t;)e.epoch-=l;null!==r&&i!==e.d[r]()&&(e.epoch=s)},x={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>C(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let n=e.d,a=n.getMonth(),r=e.epoch,o=n.getFullYear();if(a===t)return;let i=t-a;for(e.epoch+=E.day*(28*i),o!==e.d.getFullYear()&&(e.epoch=r);e.d.getMonth()t;)e.epoch-=E.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>C(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>C(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>C(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 A=(e,t)=>{let n=Object.keys(x),a=e.clone();for(let r=0;r{if(!t)return e;let n=0;if(/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(!0===/:00/.test(t)&&(t=t.replace(/:00/,"")),!0===/:30/.test(t)&&(t=t.replace(/:30/,".5"))),/^[\+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,".5")),n=parseFloat(t),Math.abs(n)>100&&(n/=100),0===n||"Z"===t||"z"===t)return e.tz="etc/gmt",e;n*=-1,n>=0&&(n="+"+n);let a="etc/gmt"+n;return e.timezones[a]&&(e.tz=a),e};var Z=(e,t="")=>{let n=(t=t.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==n){let a=Number(n[1]);if(a<0||a>24)return e.startOf("day");let r=Number(n[2]);if(n[2].length<2||r<0||r>59)return e.startOf("day");e=(e=(e=(e=e.hour(a)).minute(r)).seconds(n[3]||0)).millisecond(function(e=""){return(e=String(e)).length>3?e=e.substr(0,3):1===e.length?e+="00":2===e.length&&(e+="0"),Number(e)||0}(n[4]));let o=t.match(/[\b0-9] ?(am|pm)\b/);return null!==o&&o[1]&&(e=e.ampm(o[1])),e}if(n=t.match(/([0-9]+) ?(am|pm)/),null!==n&&n[1]){let t=Number(n[1]);return t>12||t<1?e.startOf("day"):e=(e=(e=e.hour(n[1]||0)).ampm(n[2])).startOf("hour")}return e=e.startOf("day")};let U=B();const Q=e=>{if(!0!==Y.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(g(e.year)&&e.date<=29)||e.date<=28;let t=Y[e.month]||0;return e.date<=t},G=(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 n=parseInt(e,10);return!n&&t&&(n=t.year),n=n||(new Date).getFullYear(),n},V=function(e){return"sept"===(e=e.toLowerCase().trim())?U.sep:U[e]};var W=[{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 n=parseInt(t[1],10)-1,a=parseInt(t[2],10);(e.british||n>=12)&&(a=parseInt(t[1],10),n=parseInt(t[2],10)-1);let r={date:a,month:n,year:G(t[3],e._today)||(new Date).getFullYear()};return!1===Q(r)?(e.epoch=null,e):(A(e,r),e=Z(e,t[4]))}},{reg:/^([a-z]+)[\-\/\. ]([0-9]{1,2})[\-\/\. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9:]+)?( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[5],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[3]))}}],J=[{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:1};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let n={year:G(t[2],e._today),month:V(t[1]),date:e._today.date||1};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.quarter(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.season(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(A(e,r),e=Z(e))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/,/g,"");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(A(e,r),e=Z(e))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let n=e._today;n.month&&!n.date&&(n.date=1);let a=new Date,r={year:G(t[0],n),month:n.month||a.getMonth(),date:n.date||a.getDate()};return!1===Q(r)?(e.epoch=null,e):(A(e,r),e=Z(e))}}],K=[].concat([{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return!1===Q(n)?(e.epoch=null,e):(H(e,t[5]),A(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([0-9]{1,2})[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return n.month>=12&&(n.date=parseInt(t[2],10),n.month=parseInt(t[3],10)-1),!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([a-z]+)[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[1],e._today),month:V(t[2]),date:_(t[3]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}}],W,[{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1])};return n.month&&!1!==Q(n)?(A(e,n),e=Z(e,t[4])):(e.epoch=null,e)}},{reg:/^([0-9]{1,2})[\. -/]([a-z]+)[\. -/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={date:Number(t[1]),month:V(t[2]),year:Number(t[3])};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=e.startOf("day"),e=Z(e,t[4]))}}],J);var R=function(e,t,n){for(let a=0;a{let n=e._today||ne;if("number"==typeof t)return te(e,t);if(e.epoch=Date.now(),e._today&&k(e._today)&&Object.keys(e._today).length>0){let t=ee(e,n,ne);t.isValid()&&(e.epoch=t.epoch)}return null==t||""===t?e:!0===b(t)?(e.epoch=t.getTime(),e):!0===function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t)?e=X(e,t,n):!0===k(t)?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):e=ee(e,t,n):"string"!=typeof t?e:(t=I(t),!0===N.hasOwnProperty(t)?e=N[t](e):R(e,t))};let re=["sun","mon","tue","wed","thu","fri","sat"],oe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ie(){return re}function se(){return oe}const ue={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 le=!0;var ce=e=>{let t=e.timezone().current.offset;return t?O(t,":"):"Z"};const he=e=>le?function(e){return e?e[0].toUpperCase()+e.substr(1):""}(e):e,de={day:e=>he(e.dayName()),"day-short":e=>he(ie()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>v(e.day()),"day-pad":e=>w(e.day()),date:e=>e.date(),"date-ordinal":e=>v(e.date()),"date-pad":e=>w(e.date()),month:e=>he(e.monthName()),"month-short":e=>he(L()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>v(e.month()),"month-pad":e=>w(e.month()),"iso-month":e=>w(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+" BC")},"year-short":e=>{let t=e.year();return t>0?`'${String(e.year()).substr(2,4)}`:(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),n=t<0,a=w(Math.abs(t),4);return n&&(a=w(a,6),a="-"+a),a},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${w(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>w(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>w(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>w(e.minute()),second:e=>e.second(),"second-pad":e=>w(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>w(e.millisecond(),3),ampm:e=>e.ampm(),AMPM:e=>e.ampm().toUpperCase(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>ce(e),numeric:e=>`${e.year()}/${w(e.month()+1)}/${w(e.date())}`,"numeric-us":e=>`${w(e.month()+1)}/${w(e.date())}/${e.year()}`,"numeric-uk":e=>`${w(e.date())}/${w(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${w(e.month()+1)}/${w(e.date())}`,iso:e=>`${e.format("iso-year")}-${w(e.month()+1)}-${w(e.date())}T${w(e.h24())}:${w(e.minute())}:${w(e.second())}.${w(e.millisecond(),3)}${ce(e)}`,"iso-short":e=>{let t=w(e.month()+1),n=w(e.date());var a;return`${(a=e.year())>=0?w(a,4):"-"+w(a=Math.abs(a),4)}-${t}-${n}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${L()[e.month()]} ${v(e.date())}, ${e.time()}`,"nice-24":e=>`${L()[e.month()]} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`,"nice-year":e=>`${L()[e.month()]} ${v(e.date())}, ${e.year()}`,"nice-day":e=>`${ie()[e.day()]} ${he(L()[e.month()])} ${v(e.date())}`,"nice-full":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`},me={"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(me).forEach((e=>de[e]=de[me[e]]));var fe=(e,t="")=>{if(!0!==e.isValid())return"";if(de.hasOwnProperty(t)){let n=de[t](e)||"";return"json"!==t&&(n=String(n),"ampm"!==t.toLowerCase()&&(n=he(n))),n}if(-1!==t.indexOf("{")){let n=/\{(.+?)\}/g;return t=t.replace(n,((t,n)=>{if(n=n.toLowerCase().trim(),de.hasOwnProperty(n)){let t=String(de[n](e));return"ampm"!==n.toLowerCase()?he(t):t}return""})),t}return e.format("iso-short")};const pe={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=>w(Number(String(e.year()).substr(2,4))),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>"0"+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>w(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>w(e.week()),d:e=>e.date(),dd:e=>w(e.date()),D:e=>e.dayOfYear(),DD:e=>w(e.dayOfYear()),DDD:e=>w(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=>w(e.h12()),H:e=>e.hour(),HH:e=>w(e.hour()),m:e=>e.minute(),mm:e=>w(e.minute()),s:e=>e.second(),ss:e=>w(e.second()),SSS:e=>w(e.millisecond(),3),A:e=>e.epoch-e.startOf("day").epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>O(e.timezone().current.offset),ZZ:e=>O(e.timezone().current.offset),ZZZ:e=>O(e.timezone().current.offset),ZZZZ:e=>O(e.timezone().current.offset,":")},ye=(e,t,n)=>{let a=e,r=t;for(let o=0;o{let n=t.split("");return n=function(e){for(let t=0;te))}(n),n=function(e){for(let t=0;te))).map((e=>("''"===e&&(e="'"),e)))}(n),n.reduce(((t,n)=>(void 0!==pe[n]?t+=pe[n](e)||"":(/^'.{1,}'$/.test(n)&&(n=n.replace(/'/g,"")),t+=n),t)),"")};const be=["year","season","quarter","month","week","day","quarterHour","hour","minute"],ke=function(e,t){let n=e.clone().startOf(t),a=e.clone().endOf(t).epoch-n.epoch,r=(e.epoch-n.epoch)/a;return parseFloat(r.toFixed(2))};var we=(e,t)=>{if(t)return t=j(t),ke(e,t);let n={};return be.forEach((t=>{n[t]=ke(e,t)})),n};var ve=(e,t)=>{let n=e.progress();return"quarterhour"===(t=j(t))&&(t="quarterHour"),void 0!==n[t]?(n[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):!1===e.silent&&console.warn("no known unit '"+t+"'"),e};const _e=(e,t,n)=>{let a=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,n),a+=1;return e.isAfter(t,n)&&(a-=1),a};var je=(e,t,n)=>e.isBefore(t)?_e(e,t,n):-1*_e(t,e,n);var ze=function(e,t){let n=t.epoch-e.epoch,a={milliseconds:n,seconds:parseInt(n/1e3,10)};a.minutes=parseInt(a.seconds/60,10),a.hours=parseInt(a.minutes/60,10);let r=e.clone();return a.years=((e,t)=>{let n=t.year()-e.year();return(e=e.year(t.year())).isAfter(t)&&(n-=1),n})(r,t),r=e.add(a.years,"year"),a.months=12*a.years,r=e.add(a.months,"month"),a.months+=je(r,t,"month"),a.quarters=4*a.years,a.quarters+=parseInt(a.months%12/3,10),a.weeks=52*a.years,r=e.add(a.weeks,"week"),a.weeks+=je(r,t,"week"),a.days=7*a.weeks,r=e.add(a.days,"day"),a.days+=je(r,t,"day"),a};var $e=function(e,t,n){t=$(t,e);let a=!1;if(e.isAfter(t)){let n=e;e=t,t=n,a=!0}let r=ze(e,t);return a&&(r=function(e){return Object.keys(e).forEach((t=>{e[t]*=-1})),e}(r)),n?(n=j(n),!0!==/s$/.test(n)&&(n+="s"),"dates"===n&&(n="days"),r[n]):r};const Oe=e=>Math.abs(e)||0;var De=function(e){let t="P";return t+=Oe(e.years)+"Y",t+=Oe(e.months)+"M",t+=Oe(e.days)+"DT",t+=Oe(e.hours)+"H",t+=Oe(e.minutes)+"M",t+=Oe(e.seconds)+"S",t};const Me={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 Se(e,t){return 1===e&&(t=t.slice(0,-1)),e+" "+t}var qe=function(e){let t=null,n=null,a=[],r=[];return Object.keys(e).forEach(((o,i,s)=>{const u=Math.abs(e[o]);if(0===u)return;a.push(u+o[0]);const l=Se(u,o);if(r.push(l),!t){if(t=n=l,i>4)return;const a=s[i+1],r=Math.abs(e[a]);r>Me[a].almost?(t=Se(u+1,o),n="almost "+t):r>Me[a].over&&(n="over "+l)}})),{qualified:n,rounded:t,abbreviated:a,englishValues:r}};var Ne=(e,t)=>{const n=function(e,t){const n=e.isBefore(t),a=n?t:e;let r=n?e:t;r=r.clone();const o={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(o).forEach((e=>{if(r.isSame(a,e))return;let t=r.diff(a,e);r=r.add(t,e),o[e]=t})),n&&Object.keys(o).forEach((e=>{0!==o[e]&&(o[e]*=-1)})),o}(e,t=$(t,e));if(!0===Object.keys(n).every((e=>!n[e])))return{diff:n,rounded:"now",qualified:"now",precise:"now",abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:"present"};let a,r="future",{rounded:o,qualified:i,englishValues:s,abbreviated:u}=qe(n);a=s.splice(0,2).join(", "),!0===e.isAfter(t)?(o+=" ago",i+=" ago",a+=" ago",r="past"):(o="in "+o,i="in "+i,a="in "+a);let l=De(n);return{diff:n,rounded:o,qualified:i,precise:a,abbreviated:u,iso:l,direction:r}};var Ie={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]]},Te=[null,[0,1],[3,1],[6,1],[9,1]];const Ee={second:e=>(A(e,{millisecond:0}),e),minute:e=>(A(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),A(e,{second:0,millisecond:0}),e},hour:e=>(A(e,{minute:0,second:0,millisecond:0}),e),day:e=>(A(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")),A(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(A(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Te[t]&&A(e,{month:Te[t][0],date:Te[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),n="north";"South"===e.hemisphere()&&(n="south");for(let a=0;a(A(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{let t=(e=e.startOf("year")).year(),n=10*parseInt(t/10,10);return e=e.year(n)},century:e=>{let t=(e=e.startOf("year")).year(),n=100*parseInt(t/100,10);return e=e.year(n)}};Ee.date=Ee.day;var Ce=function(e,t,n){if(!t||!n)return[];if(t=j(t),n=e.clone().set(n),e.isAfter(n)){let t=e;e=n,n=t}let a=e.clone();if(function(e){return!!ie().find((t=>t===e))||!!se().find((t=>t===e))}(t))a=a.next(t),t="week";else{a.startOf(t).isBefore(e)&&(a=a.next(t))}let r=[];for(;a.isBefore(n);)r.push(a),a=a.add(1,t);return r};var xe=e=>{let n=e.timezones,a=e.tz;if(!1===n.hasOwnProperty(a)&&(a=y(e.tz,n)),null===a)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let r=n[a],o={name:(i=a,i=(i=(i=(i=(i=(i=(i=i[0].toUpperCase()+i.substr(1)).replace(/[\/_-]([a-z])/gi,(e=>e.toUpperCase()))).replace(/_(of|es)_/i,(e=>e.toLowerCase()))).replace(/\/gmt/i,"/GMT")).replace(/\/Dumontdurville$/i,"/DumontDUrville")).replace(/\/Mcmurdo$/i,"/McMurdo")).replace(/\/Port-au-prince$/i,"/Port-au-Prince")),hasDst:Boolean(r.dst),default_offset:r.offset,hemisphere:"s"===r.hem?"South":"North",current:{}};var i,s;if(o.hasDst){let e=(s=r.dst)?s.split("->"):[];o.change={start:e[0],back:e[1]}}let u=r.offset,l=u;return!0===o.hasDst&&(l="North"===o.hemisphere?u-1:r.offset+1),!1===o.hasDst?(o.current.offset=u,o.current.isDST=!1):!0===t(e.epoch,o.change.start,o.change.back,u,l)?(o.current.offset=u,o.current.isDST="North"===o.hemisphere):(o.current.offset=l,o.current.isDST="South"===o.hemisphere),o};const Ae=["century","decade","year","month","date","day","hour","minute","second","millisecond"],Ye={set:function(e,t){let n=this.clone();return n=ae(n,e),t&&(this.tz=y(t)),n},timezone:function(){return xe(this)},isDST:function(){return xe(this).current.isDST},hasDST:function(){return xe(this).hasDst},offset:function(){return 60*xe(this).current.offset},hemisphere:function(){return xe(this).hemisphere},format:function(e){return fe(this,e)},unixFmt:function(e){return ge(this,e)},startOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Ee[t]?Ee[t](n):"summer"===t||"winter"===t?(n=n.season(t),Ee.season(n)):n})(this,e)},endOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Ee[t]?(n=Ee[t](n),n=n.add(1,t),n=n.subtract(1,"millisecond"),n):n})(this,e)},leapYear:function(){return g(this.year())},progress:function(e){return we(this,e)},nearest:function(e){return ve(this,e)},diff:function(e,t){return $e(this,e,t)},since:function(e){return e||(e=this.clone().set()),Ne(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=y(e,t.timezones),t},every:function(e,t){if("object"==typeof e&&"string"==typeof t){let n=t;t=e,e=n}return Ce(this,e,t)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},daysInMonth:function(){switch(this.month()){case 0:case 2:case 4:case 6:case 7:case 9:case 11:return 31;case 1:return this.leapYear()?29:28;case 3:case 5:case 8:case 10:return 30;default:throw new Error("Invalid Month state.")}},log:function(){return console.log(""),console.log(fe(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(fe(this,"full-short")),this},json:function(){return Ae.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=ie().indexOf(e);-1===t&&(t=se().indexOf(e)),-1===t&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};Ye.inDST=Ye.isDST,Ye.round=Ye.nearest,Ye.each=Ye.every;var Fe=Ye;const Pe=e=>("string"==typeof e&&(e=parseInt(e,10)),e),Le=["year","month","date","hour","minute","second","millisecond"],Be=(e,t,n)=>{let a=Le.indexOf(n),r=Le.slice(a,Le.length);for(let n=0;n=24?t=24:t<0&&(t=0);let a=e.clone(),r=e.hour()-t,o=r*E.hour;return e.epoch-=o,e.date()!==a.date()&&(e=a.clone(),r>1&&(r-=1),r<1&&(r+=1),o=r*E.hour,e.epoch-=o),A(e,{hour:t}),Be(e,a,"minute"),(e=He(e,a,n,"day")).epoch},Qe=function(e,t){return"string"==typeof t&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=(t=Number(t))>30?1900+t:2e3+t),t=Pe(t),A(e,{year:t}),e.epoch};let Ge="am",Ve="pm";const We={millisecond:function(e){if(void 0!==e){let t=this.clone();return t.epoch=function(e,t){t=Pe(t);let n=e.millisecond()-t;return e.epoch-n}(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Pe(t);let a=e.clone(),r=(e.second()-t)*E.second;return e.epoch=e.epoch-r,(e=He(e,a,n,"minute")).epoch}(n,e,t),n}return this.d.getSeconds()},minute:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=Ze(n,e,t),n}return this.d.getMinutes()},hour:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone();return n.epoch=Ue(n,e,t),n}return n.getHours()},hourFloat:function(e,t){if(void 0!==e){let n=this.clone(),a=e%1;a*=60;let r=parseInt(e,10);return n.epoch=Ue(n,r,t),n.epoch=Ze(n,a,t),n}let n=this.d,a=n.getHours(),r=n.getMinutes();return r/=60,a+r},hour12:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone(),a=(e=""+e).match(/^([0-9]+)(am|pm)$/);if(a){let e=parseInt(a[1],10);"pm"===a[2]&&(e+=12),n.epoch=Ue(n,e,t)}return n}let a=n.getHours();return a>12&&(a-=12),0===a&&(a=12),a},time:function(e,t){if(void 0!==e){let n=this.clone();return e=e.toLowerCase().trim(),n.epoch=function(e,t,n){let a=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!a){if(a=t.match(/([0-9]{1,2}) ?(am|pm)/),!a)return e.epoch;a.splice(2,0,"0"),a.splice(3,0,"")}let r=!1,o=parseInt(a[1],10),i=parseInt(a[2],10);i>=60&&(i=59),o>12&&(r=!0),!1===r&&("am"===a[4]&&12===o&&(o=0),"pm"===a[4]&&o<12&&(o+=12)),a[3]=a[3]||"",a[3]=a[3].replace(/:/,"");let s=parseInt(a[3],10)||0,u=e.clone();return e=(e=(e=(e=e.hour(o)).minute(i)).second(s)).millisecond(0),(e=He(e,u,n,"day")).epoch}(n,e,t),n}return`${this.h12()}:${w(this.minute())}${this.ampm()}`},ampm:function(e,t){let n=Ge,a=this.hour();if(a>=12&&(n=Ve),"string"!=typeof e)return n;let r=this.clone();return e=e.toLowerCase().trim(),a>=12&&"am"===e?(a-=12,r.hour(a,t)):a<12&&"pm"===e?(a+=12,r.hour(a,t)):r},dayTime:function(e,t){if(void 0!==e){const n={morning:"7:00",breakfast:"7:00",noon:"12:00",lunch:"12:00",afternoon:"14:00",evening:"18:00",dinner:"18:00",night:"23:00",midnight:"00:00"};let a=this.clone();return e=(e=e||"").toLowerCase(),!0===n.hasOwnProperty(e)&&(a=a.time(n[e],t)),a}let n=this.hour();return n<6?"night":n<12?"morning":n<17?"afternoon":n<22?"evening":"night"},iso:function(e){return void 0!==e?this.set(e):this.format("iso")}};var Je=We;const Ke={date:function(e,t){if(void 0!==e){let n=this.clone();return(e=parseInt(e,10))&&(n.epoch=function(e,t,n){if((t=Pe(t))>28){let n=e.month(),a=Y[n];1===n&&29===t&&g(e.year())&&(a=29),t>a&&(t=a)}t<=0&&(t=1);let a=e.clone();return A(e,{date:t}),(e=He(e,a,n,"month")).epoch}(n,e,t)),n}return this.d.getDate()},day:function(e,t){if(void 0===e)return this.d.getDay();let n=this.clone(),a=e;"string"==typeof e&&(e=e.toLowerCase(),ue.hasOwnProperty(e)?a=ue[e]:(a=ie().indexOf(e),-1===a&&(a=se().indexOf(e))));let r=this.d.getDay()-a;!0===t&&r>0&&(r-=7),!1===t&&r<0&&(r+=7);let o=this.subtract(r,"days");return A(o,{hour:n.hour(),minute:n.minute(),second:n.second()}),o},dayName:function(e,t){if(void 0===e)return se()[this.day()];let n=this.clone();return n=n.day(e,t),n}};var Re=Ke;const Xe=e=>e=(e=(e=e.minute(0)).second(0)).millisecond(1),et={dayOfYear:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Pe(t);let a=e.clone();return(t-=1)<=0?t=0:t>=365&&(t=g(e.year())?365:364),e=(e=e.startOf("year")).add(t,"day"),Be(e,a,"hour"),(e=He(e,a,n,"year")).epoch}(n,e,t),n}let n,a=0,r=this.d.getMonth();for(let e=1;e<=r;e++)n=new Date,n.setDate(1),n.setFullYear(this.d.getFullYear()),n.setHours(1),n.setMinutes(1),n.setMonth(e),n.setHours(-2),a+=n.getDate();return a+this.d.getDate()},week:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){let a=e.clone();return t=Pe(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=He(e,a,n,"year")).epoch}(this,e,t),n=Xe(n),n}let n=this.clone();n=n.month(0),n=n.date(1),n=Xe(n),n=n.day("monday"),11===n.month()&&n.date()>=25&&(n=n.add(1,"week"));let a=1;1===n.date()&&(a=0),n=n.minus(1,"second");const r=this.epoch;if(n.epoch>r)return 1;let o=0,i=4*this.month();for(n.epoch+=E.week*i,o+=i;o<=52;o++){if(n.epoch>r)return o+a;n=n.add(1,"week")}return 52},month:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){"string"==typeof t&&("sept"===t&&(t="sep"),t=B()[t.toLowerCase()]),(t=Pe(t))>=12&&(t=11),t<=0&&(t=0);let a=e.date();a>Y[t]&&(a=Y[t]);let r=e.clone();return A(e,{month:t,d:a}),(e=He(e,r,n,"year")).epoch}(n,e,t),n}return this.d.getMonth()},monthName:function(e,t){if(void 0!==e){let n=this.clone();return n=n.month(e,t),n}return P[this.month()]},quarter:function(e,t){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Te[e])){let n=this.clone(),a=Te[e][0];return n=n.month(a,t),n=n.date(1,t),n=n.startOf("day"),n}let n=this.d.getMonth();for(let e=1;e=Ie[n][e][1]&&a0&&(t.epoch=Qe(t,-1*n)),"ad"===e&&n<0&&(t.epoch=Qe(t,-1*n)),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,n)=>(n.match(/b\.?c\.?/i)&&(t="-"+t),t)))).replace(/c$/,""));let t=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(0===t&&(t=1),t=t>=0?100*(t-1):100*(t+1),this.year(t))}let t=this.startOf("century").year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(void 0!==e){if("string"==typeof e&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=Number(e),isNaN(e)))return console.warn("Spacetime: Invalid millenium input"),this;e>0&&(e-=1);let t=1e3*e;return 0===t&&(t=1),this.year(t)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}};var tt=et;const nt=Object.assign({},Je,Re,tt);nt.milliseconds=nt.millisecond,nt.seconds=nt.second,nt.minutes=nt.minute,nt.hours=nt.hour,nt.hour24=nt.hour,nt.h12=nt.hour12,nt.h24=nt.hour24,nt.days=nt.day;var at=e=>{Object.keys(nt).forEach((t=>{e.prototype[t]=nt[t]}))};const rt=function(e,t){return 1===e&&g(t)?29:Y[e]},ot=(e,t)=>{if(e.month>0){let n=parseInt(e.month/12,10);e.year=t.year()+n,e.month=e.month%12}else if(e.month<0){let n=Math.abs(e.month),a=parseInt(n/12,10);n%12!=0&&(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},it=(e,t,n)=>{let a=t.year(),r=t.month(),o=rt(r,a);for(;n>o;)n-=o,r+=1,r>=12&&(r-=12,a+=1),o=rt(r,a);return e.month=r,e.date=n,e},st=(e,t,n)=>{e.year=t.year(),e.month=t.month();let a=t.date();for(e.date=a-Math.abs(n);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let t=rt(e.month,e.year);e.date+=t}return e},ut=["millisecond","second","minute","hour","date","month"];let lt={second:ut.slice(0,1),minute:ut.slice(0,2),quarterhour:ut.slice(0,2),hour:ut.slice(0,3),date:ut.slice(0,4),month:ut.slice(0,4),quarter:ut.slice(0,4),season:ut.slice(0,4),year:ut,decade:ut,century:ut};lt.week=lt.hour,lt.season=lt.date,lt.quarter=lt.date;const ct={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},ht={month:!0,quarter:!0,season:!0,year:!0};var dt=e=>{e.prototype.add=function(e,t){let n=this.clone();if(!t||0===e)return n;let a=this.clone();if("millisecond"===(t=j(t)))return n.epoch+=e,n;"fortnight"===t&&(e*=2,t="week"),E[t]?n.epoch+=E[t]*e:"week"===t||"weekend"===t?n.epoch+=E.day*(7*e):"quarter"===t||"season"===t?n.epoch+=E.month*(3*e):"quarterhour"===t&&(n.epoch+=15*E.minute*e);let r={};if(lt[t]&<[t].forEach((e=>{r[e]=a[e]()})),ct[t]){const e=a.timezone().current.offset-n.timezone().current.offset;n.epoch+=3600*e*1e3}if("month"===t&&(r.month=a.month()+e,r=ot(r,a)),"week"===t){let t=a.date()+7*e;t<=28&&t>1&&(r.date=t)}if("weekend"===t&&"saturday"!==n.dayName())n=n.day("saturday",!0);else if("date"===t){if(e<0)r=st(r,a,e);else{let t=a.date()+e;r=it(r,a,t)}0!==e&&a.isSame(n,"day")&&(r.date=a.date()+e)}else if("quarter"===t){if(r.month=a.month()+3*e,r.year=a.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=a.date()}else if("year"===t){let t=a.year()+e,r=n.year();if(rt){let t=Math.floor(e/4)||1;n.epoch+=E.day*t}}else"decade"===t?r.year=n.year()+10:"century"===t&&(r.year=n.year()+100);if(ht[t]){let e=Y[r.month];r.date=a.date(),r.date>e&&(r.date=e)}return Object.keys(r).length>1&&A(n,r),n},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 mt={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()};mt.date=mt.day;var ft=e=>{e.prototype.isSame=function(t,n,a=!0){let r=this;if(!n)return null;if("string"==typeof t&&"object"==typeof n){let e=t;t=n,n=e}return"string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),n=n.replace(/s$/,""),!0===a&&r.tz!==t.tz&&((t=t.clone()).tz=r.tz),mt[n]?mt[n](r)===mt[n](t):null}};var pt=e=>{const t={isAfter:function(e){let t=z(e=$(e,this));return null===t?null:this.epoch>t},isBefore:function(e){let t=z(e=$(e,this));return null===t?null:this.epoch{e.prototype[n]=t[n]}))};var yt=e=>{const t={i18n:function(e){var t,n,a;return k(e.days)&&(t=e.days,re=t.short||re,oe=t.long||oe),k(e.months)&&function(e){F=e.short||F,P=e.long||P}(e.months),a=e.useTitleCase,"[object Boolean]"===Object.prototype.toString.call(a)&&(n=e.useTitleCase,le=n),k(e.ampm)&&function(e){Ge=e.am||Ge,Ve=e.pm||Ve}(e.ampm),this}};Object.keys(t).forEach((n=>{e.prototype[n]=t[n]}))};let gt=i;const bt=function(e,t,a={}){this.epoch=null,this.tz=y(t,gt),this.silent=void 0===a.silent||a.silent,this.british=a.dmy||a.british,this._weekStart=1,void 0!==a.weekStart&&(this._weekStart=a.weekStart),this._today={},void 0!==a.today&&(this._today=a.today),Object.defineProperty(this,"d",{get:function(){let e=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:()=>gt,set:e=>(gt=e,e)});let r=ae(this,e);this.epoch=r.epoch};Object.keys(Fe).forEach((e=>{bt.prototype[e]=Fe[e]})),bt.prototype.clone=function(){return new bt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})},bt.prototype.toLocalDate=function(){return this.toNativeDate()},bt.prototype.toNativeDate=function(){return new Date(this.epoch)},at(bt),dt(bt),ft(bt),pt(bt),yt(bt);var kt=bt;var wt=(e,t)=>{let n=new kt(null),a=new kt(null);n=n.time(e),a=t?a.time(t):n.add(59,"minutes");let r=n.hour(),o=a.hour();return Object.keys(n.timezones).filter((e=>{if(-1===e.indexOf("/"))return!1;let t=new kt(null,e),i=t.hour();return i>=r&&i<=o&&(!(i===r&&t.minute()a.minute()))}))};const vt=(e,t,n)=>new kt(e,t,n),_t=function(e){let t=e._today||{};return Object.keys(t).forEach((n=>{e=e[n](t[n])})),e};return vt.now=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n},vt.today=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.startOf("day")},vt.tomorrow=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.add(1,"day").startOf("day")},vt.yesterday=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.subtract(1,"day").startOf("day")},vt.extend=function(e={}){return Object.keys(e).forEach((t=>{kt.prototype[t]=e[t]})),this},vt.timezones=function(){return(new kt).timezones},vt.max=function(e,t){let n=new kt(null,e,t);return n.epoch=864e13,n},vt.min=function(e,t){let n=new kt(null,e,t);return n.epoch=-864e13,n},vt.whereIts=wt,vt.version="7.4.8",vt.plugin=vt.extend,vt})); diff --git a/builds/spacetime.mjs b/builds/spacetime.mjs index dab31a4c..863314eb 100644 --- a/builds/spacetime.mjs +++ b/builds/spacetime.mjs @@ -1 +1 @@ -const e=(e,t,n)=>{const[a,r]=e.split("/"),[o,i]=r.split(":");return Date.UTC(n,a-1,o,i)-36e5*t};var t=(t,n,a,r,o)=>{const i=new Date(t).getUTCFullYear(),s=e(n,o,i),u=e(a,r,i);return t>=s&&t{let n=e.timezones[e.tz];if(void 0===n)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(void 0===n.dst)return n.offset;let a=n.offset,r=n.offset+1;"n"===n.hem&&(r=a-1);let o=n.dst.split("->");return!0===t(e.epoch,o[0],o[1],a,r)?a:r},a={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok","9.5|s|04/02:03->10/01:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/13:01->10/02:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,hongkong,prc,roc","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/yangon,9/cocos,2/rangoon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/kolkata,2/colombo,2/calcutta","4|s":"9/reunion","4|n":"2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|04/29:02->10/28:02":"2/gaza,2/hebron","3|n|03/26:03->10/29:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet","3|n|03/26:02->10/29:03":"8/chisinau,8/tiraspol","3|n|03/26:00->10/28:24":"2/beirut","3|n|03/24:02->10/29:02":"2/jerusalem,2/tel_aviv,israel","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su","3.5|n":"2/tehran,iran","2|s|03/26:02->10/29:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|04/28:00->10/26:24":"0/cairo,egypt","2|n|03/26:02->10/29:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met","2|n":"0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya","1|s|03/19:03->04/23:02":"0/casablanca","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|03/26:01->10/29:02":"3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet","1|n|03/19:03->04/23:02":"0/el_aaiun","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s":"11/apia,11/tongatapu","13|n":"11/enderbury,11/kanton,11/fakaofo","12|s|04/02:03->09/24:02":"12/mcmurdo,11/auckland,12/south_pole,nz","12|s":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein","12.75|s|04/02:03->04/02:02":"11/chatham,nz-chat","11|s|04/02:03->10/01:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n|04/02:03->10/01:02":"11/norfolk","10|s|04/02:03->10/01:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap","10.5|s|04/02:01->10/01:02":"4/lord_howe,4/lhi","0|n|03/26:00->10/29:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory","-9|n|03/12:02->11/05:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/12:02->11/05:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/12:02->11/05:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n":"1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst","-6|s|04/01:22->09/02:22":"11/easter,7/easterisland","-6|n|03/12:02->11/05:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain","-6|n":"1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/merida,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|03/12:02->11/05:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est","-4|s|04/01:24->09/03:00":"1/santiago,7/continental","-4|s|03/25:24->10/01:00":"1/asuncion","-4|s":"1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west","-4|n|03/12:02->11/05:02":"1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/12:00->11/05:01":"1/havana,cuba","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east","-3|n|03/12:02->11/05: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/25:22->10/28:24":"1/nuuk,1/godthab","-2|n|03/12:02->11/05:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/12:02->11/05:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst"},r=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let o={};Object.keys(a).forEach((e=>{let t=e.split("|"),n={offset:Number(t[0]),hem:t[1]};t[2]&&(n.dst=t[2]),a[e].split(",").forEach((e=>{e=e.replace(/(^[0-9]+)\//,((e,t)=>(t=Number(t),r[t]+"/"))),o[e]=n}))})),o.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let n="etc/gmt"+t;o[n]={offset:-1*e,hem:"n"},n="utc/gmt"+t,o[n]={offset:-1*e,hem:"n"}}var i=o;var s=()=>{let e=(()=>{if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;let e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null})();return null===e?"utc":e};const u=/(\-?[0-9]+)h(rs)?/i,l=/(\-?[0-9]+)/,c=/utc([\-+]?[0-9]+)/i,h=/gmt([\-+]?[0-9]+)/i,d=function(e){return(e=Number(e))>=-13&&e<=13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null};var m=function(e){let t=e.match(u);if(null!==t)return d(t[1]);if(t=e.match(c),null!==t)return d(t[1]);if(t=e.match(h),null!==t){let e=-1*Number(t[1]);return d(e)}return t=e.match(l),null!==t?d(t[1]):null};let f=s();const p=Object.keys(i).reduce(((e,t)=>{let n=t.split("/")[1]||"";return n=n.replace(/_/g," "),e[n]=t,e}),{});var y=(e,t)=>{if(!e)return t.hasOwnProperty(f)||(console.warn(`Unrecognized IANA id '${f}'. Setting fallback tz to UTC.`),f="utc"),f;"string"!=typeof e&&console.error("Timezone must be a string - recieved: '",e,"'\n");let n=e.trim();if(n=n.toLowerCase(),!0===t.hasOwnProperty(n))return n;if(n=(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"))(n),!0===t.hasOwnProperty(n))return n;if(!0===p.hasOwnProperty(n))return p[n];if(!0===/[0-9]/.test(n)){let e=m(n);if(e)return e}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function g(e){return e%4==0&&e%100!=0||e%400==0}function b(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())}function k(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e,t=2){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function v(e){let t=e%10,n=e%100;return 1===t&&11!==n?e+"st":2===t&&12!==n?e+"nd":3===t&&13!==n?e+"rd":e+"th"}function _(e){return e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function j(e=""){return"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===e?"date":"min"===e||"mins"===e?"minute":e}function z(e){return"number"==typeof e?e:b(e)?e.getTime():e.epoch?e.epoch:null}function $(e,t){return!1===k(e)?t.clone().set(e):e}function O(e,t=""){const n=e>0?"+":"-",a=Math.abs(e);return`${n}${w(parseInt(""+a,10))}${t}${w(a%1*60)}`}const D={year:(new Date).getFullYear(),month:0,date:1};var M={parseArray:(e,t,n)=>{if(0===t.length)return e;let a=["year","month","date","hour","minute","second","millisecond"];for(let r=0;r{if(0===Object.keys(t).length)return e;t=Object.assign({},D,n,t);let a=Object.keys(t);for(let r=0;r0&&t<25e8&&!1===e.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),e.epoch=t,e}};const S=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach((t=>{"function"==typeof e[t]&&(e=e[t](e._today[t]))})),e},q={now:e=>S(e),today:e=>S(e),tonight:e=>e=(e=S(e)).hour(18),tomorrow:e=>e=(e=(e=S(e)).add(1,"day")).startOf("day"),yesterday:e=>e=(e=(e=S(e)).subtract(1,"day")).startOf("day"),christmas:e=>{let t=S(e).year();return e=e.set([t,11,25,18,0,0])},"new years":e=>{let t=S(e).year();return e=e.set([t,11,31,18,0,0])}};q["new years eve"]=q["new years"];var N=q;var I=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 E={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};E.date=E.day,E.month=25488e5,E.week=6048e5,E.year=3154e7,Object.keys(E).forEach((e=>{E[e+"s"]=E[e]}));var T=E;const C=(e,t,n,a,r)=>{let o=e.d[n]();if(o===t)return;let i=null===r?null:e.d[r](),s=e.epoch,u=t-o;e.epoch+=T[a]*u,"day"===a&&Math.abs(u)>28&&t<28&&(e.epoch+=T.hour),null!==r&&i!==e.d[r]()&&(e.epoch=s);const l=T[a]/2;for(;e.d[n]()t;)e.epoch-=l;null!==r&&i!==e.d[r]()&&(e.epoch=s)},A={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>C(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let n=e.d,a=n.getMonth(),r=e.epoch,o=n.getFullYear();if(a===t)return;let i=t-a;for(e.epoch+=T.day*(28*i),o!==e.d.getFullYear()&&(e.epoch=r);e.d.getMonth()t;)e.epoch-=T.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>C(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>C(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>C(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 Y=(e,t)=>{let n=Object.keys(A),a=e.clone();for(let r=0;r{if(!t)return e;let n=0;if(/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(!0===/:00/.test(t)&&(t=t.replace(/:00/,"")),!0===/:30/.test(t)&&(t=t.replace(/:30/,".5"))),/^[\+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,".5")),n=parseFloat(t),Math.abs(n)>100&&(n/=100),0===n||"Z"===t||"z"===t)return e.tz="etc/gmt",e;n*=-1,n>=0&&(n="+"+n);let a="etc/gmt"+n;return e.timezones[a]&&(e.tz=a),e};var Z=(e,t="")=>{let n=(t=t.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==n){let a=Number(n[1]);if(a<0||a>24)return e.startOf("day");let r=Number(n[2]);if(n[2].length<2||r<0||r>59)return e.startOf("day");e=(e=(e=(e=e.hour(a)).minute(r)).seconds(n[3]||0)).millisecond(function(e=""){return(e=String(e)).length>3?e=e.substr(0,3):1===e.length?e+="00":2===e.length&&(e+="0"),Number(e)||0}(n[4]));let o=t.match(/[\b0-9] ?(am|pm)\b/);return null!==o&&o[1]&&(e=e.ampm(o[1])),e}if(n=t.match(/([0-9]+) ?(am|pm)/),null!==n&&n[1]){let t=Number(n[1]);return t>12||t<1?e.startOf("day"):e=(e=(e=e.hour(n[1]||0)).ampm(n[2])).startOf("hour")}return e=e.startOf("day")};let U=B();const Q=e=>{if(!0!==x.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(g(e.year)&&e.date<=29)||e.date<=28;let t=x[e.month]||0;return e.date<=t},G=(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 n=parseInt(e,10);return!n&&t&&(n=t.year),n=n||(new Date).getFullYear(),n},V=function(e){return"sept"===(e=e.toLowerCase().trim())?U.sep:U[e]};var W=[{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 n=parseInt(t[1],10)-1,a=parseInt(t[2],10);(e.british||n>=12)&&(a=parseInt(t[1],10),n=parseInt(t[2],10)-1);let r={date:a,month:n,year:G(t[3],e._today)||(new Date).getFullYear()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e,t[4]))}},{reg:/^([a-z]+)[\-\/\. ]([0-9]{1,2})[\-\/\. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9:]+)?( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[5],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[3]))}}],J=[{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:1};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let n={year:G(t[2],e._today),month:V(t[1]),date:e._today.date||1};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.quarter(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.season(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/,/g,"");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let n=e._today;n.month&&!n.date&&(n.date=1);let a=new Date,r={year:G(t[0],n),month:n.month||a.getMonth(),date:n.date||a.getDate()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e))}}],K=[].concat([{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return!1===Q(n)?(e.epoch=null,e):(H(e,t[5]),Y(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([0-9]{1,2})[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return n.month>=12&&(n.date=parseInt(t[2],10),n.month=parseInt(t[3],10)-1),!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([a-z]+)[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[1],e._today),month:V(t[2]),date:_(t[3]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}}],W,[{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1])};return n.month&&!1!==Q(n)?(Y(e,n),e=Z(e,t[4])):(e.epoch=null,e)}},{reg:/^([0-9]{1,2})[\. -/]([a-z]+)[\. -/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={date:Number(t[1]),month:V(t[2]),year:Number(t[3])};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=e.startOf("day"),e=Z(e,t[4]))}}],J);var R=function(e,t,n){for(let a=0;a{let n=e._today||ne;if("number"==typeof t)return te(e,t);if(e.epoch=Date.now(),e._today&&k(e._today)&&Object.keys(e._today).length>0){let t=ee(e,n,ne);t.isValid()&&(e.epoch=t.epoch)}return null==t||""===t?e:!0===b(t)?(e.epoch=t.getTime(),e):!0===function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t)?e=X(e,t,n):!0===k(t)?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):e=ee(e,t,n):"string"!=typeof t?e:(t=I(t),!0===N.hasOwnProperty(t)?e=N[t](e):R(e,t))};let re=["sun","mon","tue","wed","thu","fri","sat"],oe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ie(){return re}function se(){return oe}const ue={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 le=!0;var ce=e=>{let t=e.timezone().current.offset;return t?O(t,":"):"Z"};const he=e=>le?function(e){return e?e[0].toUpperCase()+e.substr(1):""}(e):e,de={day:e=>he(e.dayName()),"day-short":e=>he(ie()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>v(e.day()),"day-pad":e=>w(e.day()),date:e=>e.date(),"date-ordinal":e=>v(e.date()),"date-pad":e=>w(e.date()),month:e=>he(e.monthName()),"month-short":e=>he(L()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>v(e.month()),"month-pad":e=>w(e.month()),"iso-month":e=>w(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+" BC")},"year-short":e=>{let t=e.year();return t>0?`'${String(e.year()).substr(2,4)}`:(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),n=t<0,a=w(Math.abs(t),4);return n&&(a=w(a,6),a="-"+a),a},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${w(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>w(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>w(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>w(e.minute()),second:e=>e.second(),"second-pad":e=>w(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>w(e.millisecond(),3),ampm:e=>e.ampm(),AMPM:e=>e.ampm().toUpperCase(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>ce(e),numeric:e=>`${e.year()}/${w(e.month()+1)}/${w(e.date())}`,"numeric-us":e=>`${w(e.month()+1)}/${w(e.date())}/${e.year()}`,"numeric-uk":e=>`${w(e.date())}/${w(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${w(e.month()+1)}/${w(e.date())}`,iso:e=>`${e.format("iso-year")}-${w(e.month()+1)}-${w(e.date())}T${w(e.h24())}:${w(e.minute())}:${w(e.second())}.${w(e.millisecond(),3)}${ce(e)}`,"iso-short":e=>{let t=w(e.month()+1),n=w(e.date());var a;return`${(a=e.year())>=0?w(a,4):"-"+w(a=Math.abs(a),4)}-${t}-${n}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${L()[e.month()]} ${v(e.date())}, ${e.time()}`,"nice-24":e=>`${L()[e.month()]} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`,"nice-year":e=>`${L()[e.month()]} ${v(e.date())}, ${e.year()}`,"nice-day":e=>`${ie()[e.day()]} ${he(L()[e.month()])} ${v(e.date())}`,"nice-full":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`},me={"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(me).forEach((e=>de[e]=de[me[e]]));var fe=(e,t="")=>{if(!0!==e.isValid())return"";if(de.hasOwnProperty(t)){let n=de[t](e)||"";return"json"!==t&&(n=String(n),"ampm"!==t.toLowerCase()&&(n=he(n))),n}if(-1!==t.indexOf("{")){let n=/\{(.+?)\}/g;return t=t.replace(n,((t,n)=>{if(n=n.toLowerCase().trim(),de.hasOwnProperty(n)){let t=String(de[n](e));return"ampm"!==n.toLowerCase()?he(t):t}return""})),t}return e.format("iso-short")};const pe={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=>w(Number(String(e.year()).substr(2,4))),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>"0"+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>w(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>w(e.week()),d:e=>e.date(),dd:e=>w(e.date()),D:e=>e.dayOfYear(),DD:e=>w(e.dayOfYear()),DDD:e=>w(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=>w(e.h12()),H:e=>e.hour(),HH:e=>w(e.hour()),m:e=>e.minute(),mm:e=>w(e.minute()),s:e=>e.second(),ss:e=>w(e.second()),SSS:e=>w(e.millisecond(),3),A:e=>e.epoch-e.startOf("day").epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>O(e.timezone().current.offset),ZZ:e=>O(e.timezone().current.offset),ZZZ:e=>O(e.timezone().current.offset),ZZZZ:e=>O(e.timezone().current.offset,":")},ye=(e,t,n)=>{let a=e,r=t;for(let o=0;o{let n=t.split("");return n=function(e){for(let t=0;te))}(n),n=function(e){for(let t=0;te))).map((e=>("''"===e&&(e="'"),e)))}(n),n.reduce(((t,n)=>(void 0!==pe[n]?t+=pe[n](e)||"":(/^'.{1,}'$/.test(n)&&(n=n.replace(/'/g,"")),t+=n),t)),"")};const be=["year","season","quarter","month","week","day","quarterHour","hour","minute"],ke=function(e,t){let n=e.clone().startOf(t),a=e.clone().endOf(t).epoch-n.epoch,r=(e.epoch-n.epoch)/a;return parseFloat(r.toFixed(2))};var we=(e,t)=>{if(t)return t=j(t),ke(e,t);let n={};return be.forEach((t=>{n[t]=ke(e,t)})),n};var ve=(e,t)=>{let n=e.progress();return"quarterhour"===(t=j(t))&&(t="quarterHour"),void 0!==n[t]?(n[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):!1===e.silent&&console.warn("no known unit '"+t+"'"),e};const _e=(e,t,n)=>{let a=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,n),a+=1;return e.isAfter(t,n)&&(a-=1),a};var je=(e,t,n)=>e.isBefore(t)?_e(e,t,n):-1*_e(t,e,n);var ze=function(e,t){let n=t.epoch-e.epoch,a={milliseconds:n,seconds:parseInt(n/1e3,10)};a.minutes=parseInt(a.seconds/60,10),a.hours=parseInt(a.minutes/60,10);let r=e.clone();return a.years=((e,t)=>{let n=t.year()-e.year();return(e=e.year(t.year())).isAfter(t)&&(n-=1),n})(r,t),r=e.add(a.years,"year"),a.months=12*a.years,r=e.add(a.months,"month"),a.months+=je(r,t,"month"),a.quarters=4*a.years,a.quarters+=parseInt(a.months%12/3,10),a.weeks=52*a.years,r=e.add(a.weeks,"week"),a.weeks+=je(r,t,"week"),a.days=7*a.weeks,r=e.add(a.days,"day"),a.days+=je(r,t,"day"),a};var $e=function(e,t,n){t=$(t,e);let a=!1;if(e.isAfter(t)){let n=e;e=t,t=n,a=!0}let r=ze(e,t);return a&&(r=function(e){return Object.keys(e).forEach((t=>{e[t]*=-1})),e}(r)),n?(n=j(n),!0!==/s$/.test(n)&&(n+="s"),"dates"===n&&(n="days"),r[n]):r};const Oe=e=>Math.abs(e)||0;var De=function(e){let t="P";return t+=Oe(e.years)+"Y",t+=Oe(e.months)+"M",t+=Oe(e.days)+"DT",t+=Oe(e.hours)+"H",t+=Oe(e.minutes)+"M",t+=Oe(e.seconds)+"S",t};const Me={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 Se(e,t){return 1===e&&(t=t.slice(0,-1)),e+" "+t}var qe=function(e){let t=null,n=null,a=[],r=[];return Object.keys(e).forEach(((o,i,s)=>{const u=Math.abs(e[o]);if(0===u)return;a.push(u+o[0]);const l=Se(u,o);if(r.push(l),!t){if(t=n=l,i>4)return;const a=s[i+1],r=Math.abs(e[a]);r>Me[a].almost?(t=Se(u+1,o),n="almost "+t):r>Me[a].over&&(n="over "+l)}})),{qualified:n,rounded:t,abbreviated:a,englishValues:r}};var Ne=(e,t)=>{const n=function(e,t){const n=e.isBefore(t),a=n?t:e;let r=n?e:t;r=r.clone();const o={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(o).forEach((e=>{if(r.isSame(a,e))return;let t=r.diff(a,e);r=r.add(t,e),o[e]=t})),n&&Object.keys(o).forEach((e=>{0!==o[e]&&(o[e]*=-1)})),o}(e,t=$(t,e));if(!0===Object.keys(n).every((e=>!n[e])))return{diff:n,rounded:"now",qualified:"now",precise:"now",abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:"present"};let a,r="future",{rounded:o,qualified:i,englishValues:s,abbreviated:u}=qe(n);a=s.splice(0,2).join(", "),!0===e.isAfter(t)?(o+=" ago",i+=" ago",a+=" ago",r="past"):(o="in "+o,i="in "+i,a="in "+a);let l=De(n);return{diff:n,rounded:o,qualified:i,precise:a,abbreviated:u,iso:l,direction:r}};var Ie={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]]},Ee=[null,[0,1],[3,1],[6,1],[9,1]];const Te={second:e=>(Y(e,{millisecond:0}),e),minute:e=>(Y(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),Y(e,{second:0,millisecond:0}),e},hour:e=>(Y(e,{minute:0,second:0,millisecond:0}),e),day:e=>(Y(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")),Y(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(Y(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Ee[t]&&Y(e,{month:Ee[t][0],date:Ee[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),n="north";"South"===e.hemisphere()&&(n="south");for(let a=0;a(Y(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{let t=(e=e.startOf("year")).year(),n=10*parseInt(t/10,10);return e=e.year(n)},century:e=>{let t=(e=e.startOf("year")).year(),n=100*parseInt(t/100,10);return e=e.year(n)}};Te.date=Te.day;var Ce=function(e,t,n){if(!t||!n)return[];if(t=j(t),n=e.clone().set(n),e.isAfter(n)){let t=e;e=n,n=t}let a=e.clone();if(function(e){return!!ie().find((t=>t===e))||!!se().find((t=>t===e))}(t))a=a.next(t),t="week";else{a.startOf(t).isBefore(e)&&(a=a.next(t))}let r=[];for(;a.isBefore(n);)r.push(a),a=a.add(1,t);return r};var Ae=e=>{let n=e.timezones,a=e.tz;if(!1===n.hasOwnProperty(a)&&(a=y(e.tz,n)),null===a)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let r=n[a],o={name:(i=a,i=(i=(i=(i=(i=(i=(i=i[0].toUpperCase()+i.substr(1)).replace(/[\/_-]([a-z])/gi,(e=>e.toUpperCase()))).replace(/_(of|es)_/i,(e=>e.toLowerCase()))).replace(/\/gmt/i,"/GMT")).replace(/\/Dumontdurville$/i,"/DumontDUrville")).replace(/\/Mcmurdo$/i,"/McMurdo")).replace(/\/Port-au-prince$/i,"/Port-au-Prince")),hasDst:Boolean(r.dst),default_offset:r.offset,hemisphere:"s"===r.hem?"South":"North",current:{}};var i,s;if(o.hasDst){let e=(s=r.dst)?s.split("->"):[];o.change={start:e[0],back:e[1]}}let u=r.offset,l=u;return!0===o.hasDst&&(l="North"===o.hemisphere?u-1:r.offset+1),!1===o.hasDst?(o.current.offset=u,o.current.isDST=!1):!0===t(e.epoch,o.change.start,o.change.back,u,l)?(o.current.offset=u,o.current.isDST="North"===o.hemisphere):(o.current.offset=l,o.current.isDST="South"===o.hemisphere),o};const Ye=["century","decade","year","month","date","day","hour","minute","second","millisecond"],xe={set:function(e,t){let n=this.clone();return n=ae(n,e),t&&(this.tz=y(t)),n},timezone:function(){return Ae(this)},isDST:function(){return Ae(this).current.isDST},hasDST:function(){return Ae(this).hasDst},offset:function(){return 60*Ae(this).current.offset},hemisphere:function(){return Ae(this).hemisphere},format:function(e){return fe(this,e)},unixFmt:function(e){return ge(this,e)},startOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Te[t]?Te[t](n):"summer"===t||"winter"===t?(n=n.season(t),Te.season(n)):n})(this,e)},endOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Te[t]?(n=Te[t](n),n=n.add(1,t),n=n.subtract(1,"millisecond"),n):n})(this,e)},leapYear:function(){return g(this.year())},progress:function(e){return we(this,e)},nearest:function(e){return ve(this,e)},diff:function(e,t){return $e(this,e,t)},since:function(e){return e||(e=this.clone().set()),Ne(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=y(e,t.timezones),t},every:function(e,t){if("object"==typeof e&&"string"==typeof t){let n=t;t=e,e=n}return Ce(this,e,t)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},daysInMonth:function(){switch(this.month()){case 0:case 2:case 4:case 6:case 7:case 9:case 11:return 31;case 1:return this.leapYear()?29:28;case 3:case 5:case 8:case 10:return 30;default:throw new Error("Invalid Month state.")}},log:function(){return console.log(""),console.log(fe(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(fe(this,"full-short")),this},json:function(){return Ye.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=ie().indexOf(e);-1===t&&(t=se().indexOf(e)),-1===t&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};xe.inDST=xe.isDST,xe.round=xe.nearest,xe.each=xe.every;var Fe=xe;const Pe=e=>("string"==typeof e&&(e=parseInt(e,10)),e),Le=["year","month","date","hour","minute","second","millisecond"],Be=(e,t,n)=>{let a=Le.indexOf(n),r=Le.slice(a,Le.length);for(let n=0;n=24?t=24:t<0&&(t=0);let a=e.clone(),r=e.hour()-t,o=r*T.hour;return e.epoch-=o,e.date()!==a.date()&&(e=a.clone(),r>1&&(r-=1),r<1&&(r+=1),o=r*T.hour,e.epoch-=o),Y(e,{hour:t}),Be(e,a,"minute"),(e=He(e,a,n,"day")).epoch},Qe=function(e,t){return"string"==typeof t&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=(t=Number(t))>30?1900+t:2e3+t),t=Pe(t),Y(e,{year:t}),e.epoch};let Ge="am",Ve="pm";const We={millisecond:function(e){if(void 0!==e){let t=this.clone();return t.epoch=function(e,t){t=Pe(t);let n=e.millisecond()-t;return e.epoch-n}(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Pe(t);let a=e.clone(),r=(e.second()-t)*T.second;return e.epoch=e.epoch-r,(e=He(e,a,n,"minute")).epoch}(n,e,t),n}return this.d.getSeconds()},minute:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=Ze(n,e,t),n}return this.d.getMinutes()},hour:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone();return n.epoch=Ue(n,e,t),n}return n.getHours()},hourFloat:function(e,t){if(void 0!==e){let n=this.clone(),a=e%1;a*=60;let r=parseInt(e,10);return n.epoch=Ue(n,r,t),n.epoch=Ze(n,a,t),n}let n=this.d,a=n.getHours(),r=n.getMinutes();return r/=60,a+r},hour12:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone(),a=(e=""+e).match(/^([0-9]+)(am|pm)$/);if(a){let e=parseInt(a[1],10);"pm"===a[2]&&(e+=12),n.epoch=Ue(n,e,t)}return n}let a=n.getHours();return a>12&&(a-=12),0===a&&(a=12),a},time:function(e,t){if(void 0!==e){let n=this.clone();return e=e.toLowerCase().trim(),n.epoch=function(e,t,n){let a=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!a){if(a=t.match(/([0-9]{1,2}) ?(am|pm)/),!a)return e.epoch;a.splice(2,0,"0"),a.splice(3,0,"")}let r=!1,o=parseInt(a[1],10),i=parseInt(a[2],10);i>=60&&(i=59),o>12&&(r=!0),!1===r&&("am"===a[4]&&12===o&&(o=0),"pm"===a[4]&&o<12&&(o+=12)),a[3]=a[3]||"",a[3]=a[3].replace(/:/,"");let s=parseInt(a[3],10)||0,u=e.clone();return e=(e=(e=(e=e.hour(o)).minute(i)).second(s)).millisecond(0),(e=He(e,u,n,"day")).epoch}(n,e,t),n}return`${this.h12()}:${w(this.minute())}${this.ampm()}`},ampm:function(e,t){let n=Ge,a=this.hour();if(a>=12&&(n=Ve),"string"!=typeof e)return n;let r=this.clone();return e=e.toLowerCase().trim(),a>=12&&"am"===e?(a-=12,r.hour(a,t)):a<12&&"pm"===e?(a+=12,r.hour(a,t)):r},dayTime:function(e,t){if(void 0!==e){const n={morning:"7:00",breakfast:"7:00",noon:"12:00",lunch:"12:00",afternoon:"14:00",evening:"18:00",dinner:"18:00",night:"23:00",midnight:"00:00"};let a=this.clone();return e=(e=e||"").toLowerCase(),!0===n.hasOwnProperty(e)&&(a=a.time(n[e],t)),a}let n=this.hour();return n<6?"night":n<12?"morning":n<17?"afternoon":n<22?"evening":"night"},iso:function(e){return void 0!==e?this.set(e):this.format("iso")}};var Je=We;const Ke={date:function(e,t){if(void 0!==e){let n=this.clone();return(e=parseInt(e,10))&&(n.epoch=function(e,t,n){if((t=Pe(t))>28){let n=e.month(),a=x[n];1===n&&29===t&&g(e.year())&&(a=29),t>a&&(t=a)}t<=0&&(t=1);let a=e.clone();return Y(e,{date:t}),(e=He(e,a,n,"month")).epoch}(n,e,t)),n}return this.d.getDate()},day:function(e,t){if(void 0===e)return this.d.getDay();let n=this.clone(),a=e;"string"==typeof e&&(e=e.toLowerCase(),ue.hasOwnProperty(e)?a=ue[e]:(a=ie().indexOf(e),-1===a&&(a=se().indexOf(e))));let r=this.d.getDay()-a;!0===t&&r>0&&(r-=7),!1===t&&r<0&&(r+=7);let o=this.subtract(r,"days");return Y(o,{hour:n.hour(),minute:n.minute(),second:n.second()}),o},dayName:function(e,t){if(void 0===e)return se()[this.day()];let n=this.clone();return n=n.day(e,t),n}};var Re=Ke;const Xe=e=>e=(e=(e=e.minute(0)).second(0)).millisecond(1),et={dayOfYear:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Pe(t);let a=e.clone();return(t-=1)<=0?t=0:t>=365&&(t=g(e.year())?365:364),e=(e=e.startOf("year")).add(t,"day"),Be(e,a,"hour"),(e=He(e,a,n,"year")).epoch}(n,e,t),n}let n,a=0,r=this.d.getMonth();for(let e=1;e<=r;e++)n=new Date,n.setDate(1),n.setFullYear(this.d.getFullYear()),n.setHours(1),n.setMinutes(1),n.setMonth(e),n.setHours(-2),a+=n.getDate();return a+this.d.getDate()},week:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){let a=e.clone();return t=Pe(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=He(e,a,n,"year")).epoch}(this,e,t),n=Xe(n),n}let n=this.clone();n=n.month(0),n=n.date(1),n=Xe(n),n=n.day("monday"),11===n.month()&&n.date()>=25&&(n=n.add(1,"week"));let a=1;1===n.date()&&(a=0),n=n.minus(1,"second");const r=this.epoch;if(n.epoch>r)return 1;let o=0,i=4*this.month();for(n.epoch+=T.week*i,o+=i;o<=52;o++){if(n.epoch>r)return o+a;n=n.add(1,"week")}return 52},month:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){"string"==typeof t&&("sept"===t&&(t="sep"),t=B()[t.toLowerCase()]),(t=Pe(t))>=12&&(t=11),t<=0&&(t=0);let a=e.date();a>x[t]&&(a=x[t]);let r=e.clone();return Y(e,{month:t,d:a}),(e=He(e,r,n,"year")).epoch}(n,e,t),n}return this.d.getMonth()},monthName:function(e,t){if(void 0!==e){let n=this.clone();return n=n.month(e,t),n}return P[this.month()]},quarter:function(e,t){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Ee[e])){let n=this.clone(),a=Ee[e][0];return n=n.month(a,t),n=n.date(1,t),n=n.startOf("day"),n}let n=this.d.getMonth();for(let e=1;e=Ie[n][e][1]&&a0&&(t.epoch=Qe(t,-1*n)),"ad"===e&&n<0&&(t.epoch=Qe(t,-1*n)),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,n)=>(n.match(/b\.?c\.?/i)&&(t="-"+t),t)))).replace(/c$/,""));let t=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(0===t&&(t=1),t=t>=0?100*(t-1):100*(t+1),this.year(t))}let t=this.startOf("century").year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(void 0!==e){if("string"==typeof e&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=Number(e),isNaN(e)))return console.warn("Spacetime: Invalid millenium input"),this;e>0&&(e-=1);let t=1e3*e;return 0===t&&(t=1),this.year(t)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}};var tt=et;const nt=Object.assign({},Je,Re,tt);nt.milliseconds=nt.millisecond,nt.seconds=nt.second,nt.minutes=nt.minute,nt.hours=nt.hour,nt.hour24=nt.hour,nt.h12=nt.hour12,nt.h24=nt.hour24,nt.days=nt.day;var at=e=>{Object.keys(nt).forEach((t=>{e.prototype[t]=nt[t]}))};const rt=function(e,t){return 1===e&&g(t)?29:x[e]},ot=(e,t)=>{if(e.month>0){let n=parseInt(e.month/12,10);e.year=t.year()+n,e.month=e.month%12}else if(e.month<0){let n=Math.abs(e.month),a=parseInt(n/12,10);n%12!=0&&(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},it=(e,t,n)=>{let a=t.year(),r=t.month(),o=rt(r,a);for(;n>o;)n-=o,r+=1,r>=12&&(r-=12,a+=1),o=rt(r,a);return e.month=r,e.date=n,e},st=(e,t,n)=>{e.year=t.year(),e.month=t.month();let a=t.date();for(e.date=a-Math.abs(n);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let t=rt(e.month,e.year);e.date+=t}return e},ut=["millisecond","second","minute","hour","date","month"];let lt={second:ut.slice(0,1),minute:ut.slice(0,2),quarterhour:ut.slice(0,2),hour:ut.slice(0,3),date:ut.slice(0,4),month:ut.slice(0,4),quarter:ut.slice(0,4),season:ut.slice(0,4),year:ut,decade:ut,century:ut};lt.week=lt.hour,lt.season=lt.date,lt.quarter=lt.date;const ct={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},ht={month:!0,quarter:!0,season:!0,year:!0};var dt=e=>{e.prototype.add=function(e,t){let n=this.clone();if(!t||0===e)return n;let a=this.clone();if("millisecond"===(t=j(t)))return n.epoch+=e,n;"fortnight"===t&&(e*=2,t="week"),T[t]?n.epoch+=T[t]*e:"week"===t||"weekend"===t?n.epoch+=T.day*(7*e):"quarter"===t||"season"===t?n.epoch+=T.month*(3*e):"quarterhour"===t&&(n.epoch+=15*T.minute*e);let r={};if(lt[t]&<[t].forEach((e=>{r[e]=a[e]()})),ct[t]){const e=a.timezone().current.offset-n.timezone().current.offset;n.epoch+=3600*e*1e3}if("month"===t&&(r.month=a.month()+e,r=ot(r,a)),"week"===t){let t=a.date()+7*e;t<=28&&t>1&&(r.date=t)}if("weekend"===t&&"saturday"!==n.dayName())n=n.day("saturday",!0);else if("date"===t){if(e<0)r=st(r,a,e);else{let t=a.date()+e;r=it(r,a,t)}0!==e&&a.isSame(n,"day")&&(r.date=a.date()+e)}else if("quarter"===t){if(r.month=a.month()+3*e,r.year=a.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=a.date()}else if("year"===t){let t=a.year()+e,r=n.year();if(rt){let t=Math.floor(e/4)||1;n.epoch+=T.day*t}}else"decade"===t?r.year=n.year()+10:"century"===t&&(r.year=n.year()+100);if(ht[t]){let e=x[r.month];r.date=a.date(),r.date>e&&(r.date=e)}return Object.keys(r).length>1&&Y(n,r),n},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 mt={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()};mt.date=mt.day;var ft=e=>{e.prototype.isSame=function(t,n,a=!0){let r=this;if(!n)return null;if("string"==typeof t&&"object"==typeof n){let e=t;t=n,n=e}return"string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),n=n.replace(/s$/,""),!0===a&&r.tz!==t.tz&&((t=t.clone()).tz=r.tz),mt[n]?mt[n](r)===mt[n](t):null}};var pt=e=>{const t={isAfter:function(e){let t=z(e=$(e,this));return null===t?null:this.epoch>t},isBefore:function(e){let t=z(e=$(e,this));return null===t?null:this.epoch{e.prototype[n]=t[n]}))};var yt=e=>{const t={i18n:function(e){var t,n,a;return k(e.days)&&(t=e.days,re=t.short||re,oe=t.long||oe),k(e.months)&&function(e){F=e.short||F,P=e.long||P}(e.months),a=e.useTitleCase,"[object Boolean]"===Object.prototype.toString.call(a)&&(n=e.useTitleCase,le=n),k(e.ampm)&&function(e){Ge=e.am||Ge,Ve=e.pm||Ve}(e.ampm),this}};Object.keys(t).forEach((n=>{e.prototype[n]=t[n]}))};let gt=i;const bt=function(e,t,a={}){this.epoch=null,this.tz=y(t,gt),this.silent=void 0===a.silent||a.silent,this.british=a.dmy||a.british,this._weekStart=1,void 0!==a.weekStart&&(this._weekStart=a.weekStart),this._today={},void 0!==a.today&&(this._today=a.today),Object.defineProperty(this,"d",{get:function(){let e=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:()=>gt,set:e=>(gt=e,e)});let r=ae(this,e);this.epoch=r.epoch};Object.keys(Fe).forEach((e=>{bt.prototype[e]=Fe[e]})),bt.prototype.clone=function(){return new bt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})},bt.prototype.toLocalDate=function(){return this.toNativeDate()},bt.prototype.toNativeDate=function(){return new Date(this.epoch)},at(bt),dt(bt),ft(bt),pt(bt),yt(bt);var kt=bt;var wt=(e,t)=>{let n=new kt(null),a=new kt(null);n=n.time(e),a=t?a.time(t):n.add(59,"minutes");let r=n.hour(),o=a.hour();return Object.keys(n.timezones).filter((e=>{if(-1===e.indexOf("/"))return!1;let t=new kt(null,e),i=t.hour();return i>=r&&i<=o&&(!(i===r&&t.minute()a.minute()))}))};const vt=(e,t,n)=>new kt(e,t,n),_t=function(e){let t=e._today||{};return Object.keys(t).forEach((n=>{e=e[n](t[n])})),e};vt.now=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n},vt.today=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.startOf("day")},vt.tomorrow=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.add(1,"day").startOf("day")},vt.yesterday=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.subtract(1,"day").startOf("day")},vt.extend=function(e={}){return Object.keys(e).forEach((t=>{kt.prototype[t]=e[t]})),this},vt.timezones=function(){return(new kt).timezones},vt.max=function(e,t){let n=new kt(null,e,t);return n.epoch=864e13,n},vt.min=function(e,t){let n=new kt(null,e,t);return n.epoch=-864e13,n},vt.whereIts=wt,vt.version="7.4.7",vt.plugin=vt.extend;export{vt as default}; +const e=(e,t,n)=>{const[a,r]=e.split("/"),[o,i]=r.split(":");return Date.UTC(n,a-1,o,i)-36e5*t};var t=(t,n,a,r,o)=>{const i=new Date(t).getUTCFullYear(),s=e(n,o,i),u=e(a,r,i);return t>=s&&t{let n=e.timezones[e.tz];if(void 0===n)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(void 0===n.dst)return n.offset;let a=n.offset,r=n.offset+1;"n"===n.hem&&(r=a-1);let o=n.dst.split("->");return!0===t(e.epoch,o[0],o[1],a,r)?a:r},a={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok","9.5|s|04/02:03->10/01:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/13:01->10/02:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,hongkong,prc,roc","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/yangon,9/cocos,2/rangoon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/kolkata,2/colombo,2/calcutta","4|s":"9/reunion","4|n":"2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|04/29:02->10/28:02":"2/gaza,2/hebron","3|n|03/26:03->10/29:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet","3|n|03/26:02->10/29:03":"8/chisinau,8/tiraspol","3|n|03/26:00->10/28:24":"2/beirut","3|n|03/24:02->10/29:02":"2/jerusalem,2/tel_aviv,israel","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su","3.5|n":"2/tehran,iran","2|s|03/26:02->10/29:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|04/28:00->10/26:24":"0/cairo,egypt","2|n|03/26:02->10/29:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met","2|n":"0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|03/26:01->10/29:02":"3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s":"11/apia,11/tongatapu","13|n":"11/enderbury,11/kanton,11/fakaofo","12|s|04/02:03->09/24:02":"12/mcmurdo,11/auckland,12/south_pole,nz","12|s":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein","12.75|s|04/02:03->04/02:02":"11/chatham,nz-chat","11|s|04/02:03->10/01:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n|04/02:03->10/01:02":"11/norfolk","10|s|04/02:03->10/01:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap","10.5|s|04/02:01->10/01:02":"4/lord_howe,4/lhi","0|s|03/19:03->04/23:02":"0/casablanca,0/el_aaiun","0|n|03/26:00->10/29:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory","-9|n|03/12:02->11/05:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/12:02->11/05:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/12:02->11/05:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n":"1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst","-6|s|04/01:22->09/02:22":"11/easter,7/easterisland","-6|n|03/12:02->11/05:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain","-6|n":"1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/merida,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|03/12:02->11/05:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est","-4|s|04/01:24->09/03:00":"1/santiago,7/continental","-4|s|03/25:24->10/01:00":"1/asuncion","-4|s":"1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west","-4|n|03/12:02->11/05:02":"1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/12:00->11/05:01":"1/havana,cuba","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east","-3|n|03/12:02->11/05: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/25:22->10/28:24":"1/nuuk,1/godthab","-2|n|03/12:02->11/05:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/12:02->11/05:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst"},r=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let o={};Object.keys(a).forEach((e=>{let t=e.split("|"),n={offset:Number(t[0]),hem:t[1]};t[2]&&(n.dst=t[2]),a[e].split(",").forEach((e=>{e=e.replace(/(^[0-9]+)\//,((e,t)=>(t=Number(t),r[t]+"/"))),o[e]=n}))})),o.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let n="etc/gmt"+t;o[n]={offset:-1*e,hem:"n"},n="utc/gmt"+t,o[n]={offset:-1*e,hem:"n"}}var i=o;var s=()=>{let e=(()=>{if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;let e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null})();return null===e?"utc":e};const u=/(\-?[0-9]+)h(rs)?/i,l=/(\-?[0-9]+)/,c=/utc([\-+]?[0-9]+)/i,h=/gmt([\-+]?[0-9]+)/i,d=function(e){return(e=Number(e))>=-13&&e<=13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null};var m=function(e){let t=e.match(u);if(null!==t)return d(t[1]);if(t=e.match(c),null!==t)return d(t[1]);if(t=e.match(h),null!==t){let e=-1*Number(t[1]);return d(e)}return t=e.match(l),null!==t?d(t[1]):null};let f=s();const p=Object.keys(i).reduce(((e,t)=>{let n=t.split("/")[1]||"";return n=n.replace(/_/g," "),e[n]=t,e}),{});var y=(e,t)=>{if(!e)return t.hasOwnProperty(f)||(console.warn(`Unrecognized IANA id '${f}'. Setting fallback tz to UTC.`),f="utc"),f;"string"!=typeof e&&console.error("Timezone must be a string - recieved: '",e,"'\n");let n=e.trim();if(n=n.toLowerCase(),!0===t.hasOwnProperty(n))return n;if(n=(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"))(n),!0===t.hasOwnProperty(n))return n;if(!0===p.hasOwnProperty(n))return p[n];if(!0===/[0-9]/.test(n)){let e=m(n);if(e)return e}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function g(e){return e%4==0&&e%100!=0||e%400==0}function b(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())}function k(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e,t=2){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function v(e){let t=e%10,n=e%100;return 1===t&&11!==n?e+"st":2===t&&12!==n?e+"nd":3===t&&13!==n?e+"rd":e+"th"}function _(e){return e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function j(e=""){return"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===e?"date":"min"===e||"mins"===e?"minute":e}function z(e){return"number"==typeof e?e:b(e)?e.getTime():e.epoch?e.epoch:null}function $(e,t){return!1===k(e)?t.clone().set(e):e}function O(e,t=""){const n=e>0?"+":"-",a=Math.abs(e);return`${n}${w(parseInt(""+a,10))}${t}${w(a%1*60)}`}const D={year:(new Date).getFullYear(),month:0,date:1};var M={parseArray:(e,t,n)=>{if(0===t.length)return e;let a=["year","month","date","hour","minute","second","millisecond"];for(let r=0;r{if(0===Object.keys(t).length)return e;t=Object.assign({},D,n,t);let a=Object.keys(t);for(let r=0;r0&&t<25e8&&!1===e.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),e.epoch=t,e}};const S=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach((t=>{"function"==typeof e[t]&&(e=e[t](e._today[t]))})),e},q={now:e=>S(e),today:e=>S(e),tonight:e=>e=(e=S(e)).hour(18),tomorrow:e=>e=(e=(e=S(e)).add(1,"day")).startOf("day"),yesterday:e=>e=(e=(e=S(e)).subtract(1,"day")).startOf("day"),christmas:e=>{let t=S(e).year();return e=e.set([t,11,25,18,0,0])},"new years":e=>{let t=S(e).year();return e=e.set([t,11,31,18,0,0])}};q["new years eve"]=q["new years"];var N=q;var I=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 E={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};E.date=E.day,E.month=25488e5,E.week=6048e5,E.year=3154e7,Object.keys(E).forEach((e=>{E[e+"s"]=E[e]}));var T=E;const C=(e,t,n,a,r)=>{let o=e.d[n]();if(o===t)return;let i=null===r?null:e.d[r](),s=e.epoch,u=t-o;e.epoch+=T[a]*u,"day"===a&&Math.abs(u)>28&&t<28&&(e.epoch+=T.hour),null!==r&&i!==e.d[r]()&&(e.epoch=s);const l=T[a]/2;for(;e.d[n]()t;)e.epoch-=l;null!==r&&i!==e.d[r]()&&(e.epoch=s)},A={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>C(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let n=e.d,a=n.getMonth(),r=e.epoch,o=n.getFullYear();if(a===t)return;let i=t-a;for(e.epoch+=T.day*(28*i),o!==e.d.getFullYear()&&(e.epoch=r);e.d.getMonth()t;)e.epoch-=T.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>C(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>C(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>C(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 Y=(e,t)=>{let n=Object.keys(A),a=e.clone();for(let r=0;r{if(!t)return e;let n=0;if(/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(!0===/:00/.test(t)&&(t=t.replace(/:00/,"")),!0===/:30/.test(t)&&(t=t.replace(/:30/,".5"))),/^[\+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,".5")),n=parseFloat(t),Math.abs(n)>100&&(n/=100),0===n||"Z"===t||"z"===t)return e.tz="etc/gmt",e;n*=-1,n>=0&&(n="+"+n);let a="etc/gmt"+n;return e.timezones[a]&&(e.tz=a),e};var Z=(e,t="")=>{let n=(t=t.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==n){let a=Number(n[1]);if(a<0||a>24)return e.startOf("day");let r=Number(n[2]);if(n[2].length<2||r<0||r>59)return e.startOf("day");e=(e=(e=(e=e.hour(a)).minute(r)).seconds(n[3]||0)).millisecond(function(e=""){return(e=String(e)).length>3?e=e.substr(0,3):1===e.length?e+="00":2===e.length&&(e+="0"),Number(e)||0}(n[4]));let o=t.match(/[\b0-9] ?(am|pm)\b/);return null!==o&&o[1]&&(e=e.ampm(o[1])),e}if(n=t.match(/([0-9]+) ?(am|pm)/),null!==n&&n[1]){let t=Number(n[1]);return t>12||t<1?e.startOf("day"):e=(e=(e=e.hour(n[1]||0)).ampm(n[2])).startOf("hour")}return e=e.startOf("day")};let U=B();const Q=e=>{if(!0!==x.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(g(e.year)&&e.date<=29)||e.date<=28;let t=x[e.month]||0;return e.date<=t},G=(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 n=parseInt(e,10);return!n&&t&&(n=t.year),n=n||(new Date).getFullYear(),n},V=function(e){return"sept"===(e=e.toLowerCase().trim())?U.sep:U[e]};var W=[{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 n=parseInt(t[1],10)-1,a=parseInt(t[2],10);(e.british||n>=12)&&(a=parseInt(t[1],10),n=parseInt(t[2],10)-1);let r={date:a,month:n,year:G(t[3],e._today)||(new Date).getFullYear()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e,t[4]))}},{reg:/^([a-z]+)[\-\/\. ]([0-9]{1,2})[\-\/\. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9:]+)?( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[5],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[3]))}}],J=[{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:1};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let n={year:G(t[2],e._today),month:V(t[1]),date:e._today.date||1};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.quarter(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.season(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/,/g,"");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let n=e._today;n.month&&!n.date&&(n.date=1);let a=new Date,r={year:G(t[0],n),month:n.month||a.getMonth(),date:n.date||a.getDate()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e))}}],K=[].concat([{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return!1===Q(n)?(e.epoch=null,e):(H(e,t[5]),Y(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([0-9]{1,2})[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return n.month>=12&&(n.date=parseInt(t[2],10),n.month=parseInt(t[3],10)-1),!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([a-z]+)[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[1],e._today),month:V(t[2]),date:_(t[3]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}}],W,[{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1])};return n.month&&!1!==Q(n)?(Y(e,n),e=Z(e,t[4])):(e.epoch=null,e)}},{reg:/^([0-9]{1,2})[\. -/]([a-z]+)[\. -/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={date:Number(t[1]),month:V(t[2]),year:Number(t[3])};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=e.startOf("day"),e=Z(e,t[4]))}}],J);var R=function(e,t,n){for(let a=0;a{let n=e._today||ne;if("number"==typeof t)return te(e,t);if(e.epoch=Date.now(),e._today&&k(e._today)&&Object.keys(e._today).length>0){let t=ee(e,n,ne);t.isValid()&&(e.epoch=t.epoch)}return null==t||""===t?e:!0===b(t)?(e.epoch=t.getTime(),e):!0===function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t)?e=X(e,t,n):!0===k(t)?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):e=ee(e,t,n):"string"!=typeof t?e:(t=I(t),!0===N.hasOwnProperty(t)?e=N[t](e):R(e,t))};let re=["sun","mon","tue","wed","thu","fri","sat"],oe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ie(){return re}function se(){return oe}const ue={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 le=!0;var ce=e=>{let t=e.timezone().current.offset;return t?O(t,":"):"Z"};const he=e=>le?function(e){return e?e[0].toUpperCase()+e.substr(1):""}(e):e,de={day:e=>he(e.dayName()),"day-short":e=>he(ie()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>v(e.day()),"day-pad":e=>w(e.day()),date:e=>e.date(),"date-ordinal":e=>v(e.date()),"date-pad":e=>w(e.date()),month:e=>he(e.monthName()),"month-short":e=>he(L()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>v(e.month()),"month-pad":e=>w(e.month()),"iso-month":e=>w(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+" BC")},"year-short":e=>{let t=e.year();return t>0?`'${String(e.year()).substr(2,4)}`:(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),n=t<0,a=w(Math.abs(t),4);return n&&(a=w(a,6),a="-"+a),a},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${w(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>w(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>w(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>w(e.minute()),second:e=>e.second(),"second-pad":e=>w(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>w(e.millisecond(),3),ampm:e=>e.ampm(),AMPM:e=>e.ampm().toUpperCase(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>ce(e),numeric:e=>`${e.year()}/${w(e.month()+1)}/${w(e.date())}`,"numeric-us":e=>`${w(e.month()+1)}/${w(e.date())}/${e.year()}`,"numeric-uk":e=>`${w(e.date())}/${w(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${w(e.month()+1)}/${w(e.date())}`,iso:e=>`${e.format("iso-year")}-${w(e.month()+1)}-${w(e.date())}T${w(e.h24())}:${w(e.minute())}:${w(e.second())}.${w(e.millisecond(),3)}${ce(e)}`,"iso-short":e=>{let t=w(e.month()+1),n=w(e.date());var a;return`${(a=e.year())>=0?w(a,4):"-"+w(a=Math.abs(a),4)}-${t}-${n}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${L()[e.month()]} ${v(e.date())}, ${e.time()}`,"nice-24":e=>`${L()[e.month()]} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`,"nice-year":e=>`${L()[e.month()]} ${v(e.date())}, ${e.year()}`,"nice-day":e=>`${ie()[e.day()]} ${he(L()[e.month()])} ${v(e.date())}`,"nice-full":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`},me={"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(me).forEach((e=>de[e]=de[me[e]]));var fe=(e,t="")=>{if(!0!==e.isValid())return"";if(de.hasOwnProperty(t)){let n=de[t](e)||"";return"json"!==t&&(n=String(n),"ampm"!==t.toLowerCase()&&(n=he(n))),n}if(-1!==t.indexOf("{")){let n=/\{(.+?)\}/g;return t=t.replace(n,((t,n)=>{if(n=n.toLowerCase().trim(),de.hasOwnProperty(n)){let t=String(de[n](e));return"ampm"!==n.toLowerCase()?he(t):t}return""})),t}return e.format("iso-short")};const pe={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=>w(Number(String(e.year()).substr(2,4))),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>"0"+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>w(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>w(e.week()),d:e=>e.date(),dd:e=>w(e.date()),D:e=>e.dayOfYear(),DD:e=>w(e.dayOfYear()),DDD:e=>w(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=>w(e.h12()),H:e=>e.hour(),HH:e=>w(e.hour()),m:e=>e.minute(),mm:e=>w(e.minute()),s:e=>e.second(),ss:e=>w(e.second()),SSS:e=>w(e.millisecond(),3),A:e=>e.epoch-e.startOf("day").epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>O(e.timezone().current.offset),ZZ:e=>O(e.timezone().current.offset),ZZZ:e=>O(e.timezone().current.offset),ZZZZ:e=>O(e.timezone().current.offset,":")},ye=(e,t,n)=>{let a=e,r=t;for(let o=0;o{let n=t.split("");return n=function(e){for(let t=0;te))}(n),n=function(e){for(let t=0;te))).map((e=>("''"===e&&(e="'"),e)))}(n),n.reduce(((t,n)=>(void 0!==pe[n]?t+=pe[n](e)||"":(/^'.{1,}'$/.test(n)&&(n=n.replace(/'/g,"")),t+=n),t)),"")};const be=["year","season","quarter","month","week","day","quarterHour","hour","minute"],ke=function(e,t){let n=e.clone().startOf(t),a=e.clone().endOf(t).epoch-n.epoch,r=(e.epoch-n.epoch)/a;return parseFloat(r.toFixed(2))};var we=(e,t)=>{if(t)return t=j(t),ke(e,t);let n={};return be.forEach((t=>{n[t]=ke(e,t)})),n};var ve=(e,t)=>{let n=e.progress();return"quarterhour"===(t=j(t))&&(t="quarterHour"),void 0!==n[t]?(n[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):!1===e.silent&&console.warn("no known unit '"+t+"'"),e};const _e=(e,t,n)=>{let a=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,n),a+=1;return e.isAfter(t,n)&&(a-=1),a};var je=(e,t,n)=>e.isBefore(t)?_e(e,t,n):-1*_e(t,e,n);var ze=function(e,t){let n=t.epoch-e.epoch,a={milliseconds:n,seconds:parseInt(n/1e3,10)};a.minutes=parseInt(a.seconds/60,10),a.hours=parseInt(a.minutes/60,10);let r=e.clone();return a.years=((e,t)=>{let n=t.year()-e.year();return(e=e.year(t.year())).isAfter(t)&&(n-=1),n})(r,t),r=e.add(a.years,"year"),a.months=12*a.years,r=e.add(a.months,"month"),a.months+=je(r,t,"month"),a.quarters=4*a.years,a.quarters+=parseInt(a.months%12/3,10),a.weeks=52*a.years,r=e.add(a.weeks,"week"),a.weeks+=je(r,t,"week"),a.days=7*a.weeks,r=e.add(a.days,"day"),a.days+=je(r,t,"day"),a};var $e=function(e,t,n){t=$(t,e);let a=!1;if(e.isAfter(t)){let n=e;e=t,t=n,a=!0}let r=ze(e,t);return a&&(r=function(e){return Object.keys(e).forEach((t=>{e[t]*=-1})),e}(r)),n?(n=j(n),!0!==/s$/.test(n)&&(n+="s"),"dates"===n&&(n="days"),r[n]):r};const Oe=e=>Math.abs(e)||0;var De=function(e){let t="P";return t+=Oe(e.years)+"Y",t+=Oe(e.months)+"M",t+=Oe(e.days)+"DT",t+=Oe(e.hours)+"H",t+=Oe(e.minutes)+"M",t+=Oe(e.seconds)+"S",t};const Me={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 Se(e,t){return 1===e&&(t=t.slice(0,-1)),e+" "+t}var qe=function(e){let t=null,n=null,a=[],r=[];return Object.keys(e).forEach(((o,i,s)=>{const u=Math.abs(e[o]);if(0===u)return;a.push(u+o[0]);const l=Se(u,o);if(r.push(l),!t){if(t=n=l,i>4)return;const a=s[i+1],r=Math.abs(e[a]);r>Me[a].almost?(t=Se(u+1,o),n="almost "+t):r>Me[a].over&&(n="over "+l)}})),{qualified:n,rounded:t,abbreviated:a,englishValues:r}};var Ne=(e,t)=>{const n=function(e,t){const n=e.isBefore(t),a=n?t:e;let r=n?e:t;r=r.clone();const o={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(o).forEach((e=>{if(r.isSame(a,e))return;let t=r.diff(a,e);r=r.add(t,e),o[e]=t})),n&&Object.keys(o).forEach((e=>{0!==o[e]&&(o[e]*=-1)})),o}(e,t=$(t,e));if(!0===Object.keys(n).every((e=>!n[e])))return{diff:n,rounded:"now",qualified:"now",precise:"now",abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:"present"};let a,r="future",{rounded:o,qualified:i,englishValues:s,abbreviated:u}=qe(n);a=s.splice(0,2).join(", "),!0===e.isAfter(t)?(o+=" ago",i+=" ago",a+=" ago",r="past"):(o="in "+o,i="in "+i,a="in "+a);let l=De(n);return{diff:n,rounded:o,qualified:i,precise:a,abbreviated:u,iso:l,direction:r}};var Ie={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]]},Ee=[null,[0,1],[3,1],[6,1],[9,1]];const Te={second:e=>(Y(e,{millisecond:0}),e),minute:e=>(Y(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),Y(e,{second:0,millisecond:0}),e},hour:e=>(Y(e,{minute:0,second:0,millisecond:0}),e),day:e=>(Y(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")),Y(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(Y(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Ee[t]&&Y(e,{month:Ee[t][0],date:Ee[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),n="north";"South"===e.hemisphere()&&(n="south");for(let a=0;a(Y(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{let t=(e=e.startOf("year")).year(),n=10*parseInt(t/10,10);return e=e.year(n)},century:e=>{let t=(e=e.startOf("year")).year(),n=100*parseInt(t/100,10);return e=e.year(n)}};Te.date=Te.day;var Ce=function(e,t,n){if(!t||!n)return[];if(t=j(t),n=e.clone().set(n),e.isAfter(n)){let t=e;e=n,n=t}let a=e.clone();if(function(e){return!!ie().find((t=>t===e))||!!se().find((t=>t===e))}(t))a=a.next(t),t="week";else{a.startOf(t).isBefore(e)&&(a=a.next(t))}let r=[];for(;a.isBefore(n);)r.push(a),a=a.add(1,t);return r};var Ae=e=>{let n=e.timezones,a=e.tz;if(!1===n.hasOwnProperty(a)&&(a=y(e.tz,n)),null===a)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let r=n[a],o={name:(i=a,i=(i=(i=(i=(i=(i=(i=i[0].toUpperCase()+i.substr(1)).replace(/[\/_-]([a-z])/gi,(e=>e.toUpperCase()))).replace(/_(of|es)_/i,(e=>e.toLowerCase()))).replace(/\/gmt/i,"/GMT")).replace(/\/Dumontdurville$/i,"/DumontDUrville")).replace(/\/Mcmurdo$/i,"/McMurdo")).replace(/\/Port-au-prince$/i,"/Port-au-Prince")),hasDst:Boolean(r.dst),default_offset:r.offset,hemisphere:"s"===r.hem?"South":"North",current:{}};var i,s;if(o.hasDst){let e=(s=r.dst)?s.split("->"):[];o.change={start:e[0],back:e[1]}}let u=r.offset,l=u;return!0===o.hasDst&&(l="North"===o.hemisphere?u-1:r.offset+1),!1===o.hasDst?(o.current.offset=u,o.current.isDST=!1):!0===t(e.epoch,o.change.start,o.change.back,u,l)?(o.current.offset=u,o.current.isDST="North"===o.hemisphere):(o.current.offset=l,o.current.isDST="South"===o.hemisphere),o};const Ye=["century","decade","year","month","date","day","hour","minute","second","millisecond"],xe={set:function(e,t){let n=this.clone();return n=ae(n,e),t&&(this.tz=y(t)),n},timezone:function(){return Ae(this)},isDST:function(){return Ae(this).current.isDST},hasDST:function(){return Ae(this).hasDst},offset:function(){return 60*Ae(this).current.offset},hemisphere:function(){return Ae(this).hemisphere},format:function(e){return fe(this,e)},unixFmt:function(e){return ge(this,e)},startOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Te[t]?Te[t](n):"summer"===t||"winter"===t?(n=n.season(t),Te.season(n)):n})(this,e)},endOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Te[t]?(n=Te[t](n),n=n.add(1,t),n=n.subtract(1,"millisecond"),n):n})(this,e)},leapYear:function(){return g(this.year())},progress:function(e){return we(this,e)},nearest:function(e){return ve(this,e)},diff:function(e,t){return $e(this,e,t)},since:function(e){return e||(e=this.clone().set()),Ne(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=y(e,t.timezones),t},every:function(e,t){if("object"==typeof e&&"string"==typeof t){let n=t;t=e,e=n}return Ce(this,e,t)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},daysInMonth:function(){switch(this.month()){case 0:case 2:case 4:case 6:case 7:case 9:case 11:return 31;case 1:return this.leapYear()?29:28;case 3:case 5:case 8:case 10:return 30;default:throw new Error("Invalid Month state.")}},log:function(){return console.log(""),console.log(fe(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(fe(this,"full-short")),this},json:function(){return Ye.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=ie().indexOf(e);-1===t&&(t=se().indexOf(e)),-1===t&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};xe.inDST=xe.isDST,xe.round=xe.nearest,xe.each=xe.every;var Fe=xe;const Pe=e=>("string"==typeof e&&(e=parseInt(e,10)),e),Le=["year","month","date","hour","minute","second","millisecond"],Be=(e,t,n)=>{let a=Le.indexOf(n),r=Le.slice(a,Le.length);for(let n=0;n=24?t=24:t<0&&(t=0);let a=e.clone(),r=e.hour()-t,o=r*T.hour;return e.epoch-=o,e.date()!==a.date()&&(e=a.clone(),r>1&&(r-=1),r<1&&(r+=1),o=r*T.hour,e.epoch-=o),Y(e,{hour:t}),Be(e,a,"minute"),(e=He(e,a,n,"day")).epoch},Qe=function(e,t){return"string"==typeof t&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=(t=Number(t))>30?1900+t:2e3+t),t=Pe(t),Y(e,{year:t}),e.epoch};let Ge="am",Ve="pm";const We={millisecond:function(e){if(void 0!==e){let t=this.clone();return t.epoch=function(e,t){t=Pe(t);let n=e.millisecond()-t;return e.epoch-n}(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Pe(t);let a=e.clone(),r=(e.second()-t)*T.second;return e.epoch=e.epoch-r,(e=He(e,a,n,"minute")).epoch}(n,e,t),n}return this.d.getSeconds()},minute:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=Ze(n,e,t),n}return this.d.getMinutes()},hour:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone();return n.epoch=Ue(n,e,t),n}return n.getHours()},hourFloat:function(e,t){if(void 0!==e){let n=this.clone(),a=e%1;a*=60;let r=parseInt(e,10);return n.epoch=Ue(n,r,t),n.epoch=Ze(n,a,t),n}let n=this.d,a=n.getHours(),r=n.getMinutes();return r/=60,a+r},hour12:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone(),a=(e=""+e).match(/^([0-9]+)(am|pm)$/);if(a){let e=parseInt(a[1],10);"pm"===a[2]&&(e+=12),n.epoch=Ue(n,e,t)}return n}let a=n.getHours();return a>12&&(a-=12),0===a&&(a=12),a},time:function(e,t){if(void 0!==e){let n=this.clone();return e=e.toLowerCase().trim(),n.epoch=function(e,t,n){let a=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!a){if(a=t.match(/([0-9]{1,2}) ?(am|pm)/),!a)return e.epoch;a.splice(2,0,"0"),a.splice(3,0,"")}let r=!1,o=parseInt(a[1],10),i=parseInt(a[2],10);i>=60&&(i=59),o>12&&(r=!0),!1===r&&("am"===a[4]&&12===o&&(o=0),"pm"===a[4]&&o<12&&(o+=12)),a[3]=a[3]||"",a[3]=a[3].replace(/:/,"");let s=parseInt(a[3],10)||0,u=e.clone();return e=(e=(e=(e=e.hour(o)).minute(i)).second(s)).millisecond(0),(e=He(e,u,n,"day")).epoch}(n,e,t),n}return`${this.h12()}:${w(this.minute())}${this.ampm()}`},ampm:function(e,t){let n=Ge,a=this.hour();if(a>=12&&(n=Ve),"string"!=typeof e)return n;let r=this.clone();return e=e.toLowerCase().trim(),a>=12&&"am"===e?(a-=12,r.hour(a,t)):a<12&&"pm"===e?(a+=12,r.hour(a,t)):r},dayTime:function(e,t){if(void 0!==e){const n={morning:"7:00",breakfast:"7:00",noon:"12:00",lunch:"12:00",afternoon:"14:00",evening:"18:00",dinner:"18:00",night:"23:00",midnight:"00:00"};let a=this.clone();return e=(e=e||"").toLowerCase(),!0===n.hasOwnProperty(e)&&(a=a.time(n[e],t)),a}let n=this.hour();return n<6?"night":n<12?"morning":n<17?"afternoon":n<22?"evening":"night"},iso:function(e){return void 0!==e?this.set(e):this.format("iso")}};var Je=We;const Ke={date:function(e,t){if(void 0!==e){let n=this.clone();return(e=parseInt(e,10))&&(n.epoch=function(e,t,n){if((t=Pe(t))>28){let n=e.month(),a=x[n];1===n&&29===t&&g(e.year())&&(a=29),t>a&&(t=a)}t<=0&&(t=1);let a=e.clone();return Y(e,{date:t}),(e=He(e,a,n,"month")).epoch}(n,e,t)),n}return this.d.getDate()},day:function(e,t){if(void 0===e)return this.d.getDay();let n=this.clone(),a=e;"string"==typeof e&&(e=e.toLowerCase(),ue.hasOwnProperty(e)?a=ue[e]:(a=ie().indexOf(e),-1===a&&(a=se().indexOf(e))));let r=this.d.getDay()-a;!0===t&&r>0&&(r-=7),!1===t&&r<0&&(r+=7);let o=this.subtract(r,"days");return Y(o,{hour:n.hour(),minute:n.minute(),second:n.second()}),o},dayName:function(e,t){if(void 0===e)return se()[this.day()];let n=this.clone();return n=n.day(e,t),n}};var Re=Ke;const Xe=e=>e=(e=(e=e.minute(0)).second(0)).millisecond(1),et={dayOfYear:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Pe(t);let a=e.clone();return(t-=1)<=0?t=0:t>=365&&(t=g(e.year())?365:364),e=(e=e.startOf("year")).add(t,"day"),Be(e,a,"hour"),(e=He(e,a,n,"year")).epoch}(n,e,t),n}let n,a=0,r=this.d.getMonth();for(let e=1;e<=r;e++)n=new Date,n.setDate(1),n.setFullYear(this.d.getFullYear()),n.setHours(1),n.setMinutes(1),n.setMonth(e),n.setHours(-2),a+=n.getDate();return a+this.d.getDate()},week:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){let a=e.clone();return t=Pe(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=He(e,a,n,"year")).epoch}(this,e,t),n=Xe(n),n}let n=this.clone();n=n.month(0),n=n.date(1),n=Xe(n),n=n.day("monday"),11===n.month()&&n.date()>=25&&(n=n.add(1,"week"));let a=1;1===n.date()&&(a=0),n=n.minus(1,"second");const r=this.epoch;if(n.epoch>r)return 1;let o=0,i=4*this.month();for(n.epoch+=T.week*i,o+=i;o<=52;o++){if(n.epoch>r)return o+a;n=n.add(1,"week")}return 52},month:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){"string"==typeof t&&("sept"===t&&(t="sep"),t=B()[t.toLowerCase()]),(t=Pe(t))>=12&&(t=11),t<=0&&(t=0);let a=e.date();a>x[t]&&(a=x[t]);let r=e.clone();return Y(e,{month:t,d:a}),(e=He(e,r,n,"year")).epoch}(n,e,t),n}return this.d.getMonth()},monthName:function(e,t){if(void 0!==e){let n=this.clone();return n=n.month(e,t),n}return P[this.month()]},quarter:function(e,t){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Ee[e])){let n=this.clone(),a=Ee[e][0];return n=n.month(a,t),n=n.date(1,t),n=n.startOf("day"),n}let n=this.d.getMonth();for(let e=1;e=Ie[n][e][1]&&a0&&(t.epoch=Qe(t,-1*n)),"ad"===e&&n<0&&(t.epoch=Qe(t,-1*n)),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,n)=>(n.match(/b\.?c\.?/i)&&(t="-"+t),t)))).replace(/c$/,""));let t=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(0===t&&(t=1),t=t>=0?100*(t-1):100*(t+1),this.year(t))}let t=this.startOf("century").year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(void 0!==e){if("string"==typeof e&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=Number(e),isNaN(e)))return console.warn("Spacetime: Invalid millenium input"),this;e>0&&(e-=1);let t=1e3*e;return 0===t&&(t=1),this.year(t)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}};var tt=et;const nt=Object.assign({},Je,Re,tt);nt.milliseconds=nt.millisecond,nt.seconds=nt.second,nt.minutes=nt.minute,nt.hours=nt.hour,nt.hour24=nt.hour,nt.h12=nt.hour12,nt.h24=nt.hour24,nt.days=nt.day;var at=e=>{Object.keys(nt).forEach((t=>{e.prototype[t]=nt[t]}))};const rt=function(e,t){return 1===e&&g(t)?29:x[e]},ot=(e,t)=>{if(e.month>0){let n=parseInt(e.month/12,10);e.year=t.year()+n,e.month=e.month%12}else if(e.month<0){let n=Math.abs(e.month),a=parseInt(n/12,10);n%12!=0&&(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},it=(e,t,n)=>{let a=t.year(),r=t.month(),o=rt(r,a);for(;n>o;)n-=o,r+=1,r>=12&&(r-=12,a+=1),o=rt(r,a);return e.month=r,e.date=n,e},st=(e,t,n)=>{e.year=t.year(),e.month=t.month();let a=t.date();for(e.date=a-Math.abs(n);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let t=rt(e.month,e.year);e.date+=t}return e},ut=["millisecond","second","minute","hour","date","month"];let lt={second:ut.slice(0,1),minute:ut.slice(0,2),quarterhour:ut.slice(0,2),hour:ut.slice(0,3),date:ut.slice(0,4),month:ut.slice(0,4),quarter:ut.slice(0,4),season:ut.slice(0,4),year:ut,decade:ut,century:ut};lt.week=lt.hour,lt.season=lt.date,lt.quarter=lt.date;const ct={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},ht={month:!0,quarter:!0,season:!0,year:!0};var dt=e=>{e.prototype.add=function(e,t){let n=this.clone();if(!t||0===e)return n;let a=this.clone();if("millisecond"===(t=j(t)))return n.epoch+=e,n;"fortnight"===t&&(e*=2,t="week"),T[t]?n.epoch+=T[t]*e:"week"===t||"weekend"===t?n.epoch+=T.day*(7*e):"quarter"===t||"season"===t?n.epoch+=T.month*(3*e):"quarterhour"===t&&(n.epoch+=15*T.minute*e);let r={};if(lt[t]&<[t].forEach((e=>{r[e]=a[e]()})),ct[t]){const e=a.timezone().current.offset-n.timezone().current.offset;n.epoch+=3600*e*1e3}if("month"===t&&(r.month=a.month()+e,r=ot(r,a)),"week"===t){let t=a.date()+7*e;t<=28&&t>1&&(r.date=t)}if("weekend"===t&&"saturday"!==n.dayName())n=n.day("saturday",!0);else if("date"===t){if(e<0)r=st(r,a,e);else{let t=a.date()+e;r=it(r,a,t)}0!==e&&a.isSame(n,"day")&&(r.date=a.date()+e)}else if("quarter"===t){if(r.month=a.month()+3*e,r.year=a.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=a.date()}else if("year"===t){let t=a.year()+e,r=n.year();if(rt){let t=Math.floor(e/4)||1;n.epoch+=T.day*t}}else"decade"===t?r.year=n.year()+10:"century"===t&&(r.year=n.year()+100);if(ht[t]){let e=x[r.month];r.date=a.date(),r.date>e&&(r.date=e)}return Object.keys(r).length>1&&Y(n,r),n},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 mt={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()};mt.date=mt.day;var ft=e=>{e.prototype.isSame=function(t,n,a=!0){let r=this;if(!n)return null;if("string"==typeof t&&"object"==typeof n){let e=t;t=n,n=e}return"string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),n=n.replace(/s$/,""),!0===a&&r.tz!==t.tz&&((t=t.clone()).tz=r.tz),mt[n]?mt[n](r)===mt[n](t):null}};var pt=e=>{const t={isAfter:function(e){let t=z(e=$(e,this));return null===t?null:this.epoch>t},isBefore:function(e){let t=z(e=$(e,this));return null===t?null:this.epoch{e.prototype[n]=t[n]}))};var yt=e=>{const t={i18n:function(e){var t,n,a;return k(e.days)&&(t=e.days,re=t.short||re,oe=t.long||oe),k(e.months)&&function(e){F=e.short||F,P=e.long||P}(e.months),a=e.useTitleCase,"[object Boolean]"===Object.prototype.toString.call(a)&&(n=e.useTitleCase,le=n),k(e.ampm)&&function(e){Ge=e.am||Ge,Ve=e.pm||Ve}(e.ampm),this}};Object.keys(t).forEach((n=>{e.prototype[n]=t[n]}))};let gt=i;const bt=function(e,t,a={}){this.epoch=null,this.tz=y(t,gt),this.silent=void 0===a.silent||a.silent,this.british=a.dmy||a.british,this._weekStart=1,void 0!==a.weekStart&&(this._weekStart=a.weekStart),this._today={},void 0!==a.today&&(this._today=a.today),Object.defineProperty(this,"d",{get:function(){let e=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:()=>gt,set:e=>(gt=e,e)});let r=ae(this,e);this.epoch=r.epoch};Object.keys(Fe).forEach((e=>{bt.prototype[e]=Fe[e]})),bt.prototype.clone=function(){return new bt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})},bt.prototype.toLocalDate=function(){return this.toNativeDate()},bt.prototype.toNativeDate=function(){return new Date(this.epoch)},at(bt),dt(bt),ft(bt),pt(bt),yt(bt);var kt=bt;var wt=(e,t)=>{let n=new kt(null),a=new kt(null);n=n.time(e),a=t?a.time(t):n.add(59,"minutes");let r=n.hour(),o=a.hour();return Object.keys(n.timezones).filter((e=>{if(-1===e.indexOf("/"))return!1;let t=new kt(null,e),i=t.hour();return i>=r&&i<=o&&(!(i===r&&t.minute()a.minute()))}))};const vt=(e,t,n)=>new kt(e,t,n),_t=function(e){let t=e._today||{};return Object.keys(t).forEach((n=>{e=e[n](t[n])})),e};vt.now=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n},vt.today=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.startOf("day")},vt.tomorrow=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.add(1,"day").startOf("day")},vt.yesterday=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.subtract(1,"day").startOf("day")},vt.extend=function(e={}){return Object.keys(e).forEach((t=>{kt.prototype[t]=e[t]})),this},vt.timezones=function(){return(new kt).timezones},vt.max=function(e,t){let n=new kt(null,e,t);return n.epoch=864e13,n},vt.min=function(e,t){let n=new kt(null,e,t);return n.epoch=-864e13,n},vt.whereIts=wt,vt.version="7.4.8",vt.plugin=vt.extend;export{vt as default}; diff --git a/package.json b/package.json index 885184f2..d19cfa9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spacetime", - "version": "7.4.7", + "version": "7.4.8", "description": "figure-out dates across timezones", "main": "src/index.js", "unpkg": "builds/spacetime.min.js", @@ -62,4 +62,4 @@ "timekeeper": "2.3.1" }, "license": "Apache-2.0" -} +} \ No newline at end of file diff --git a/src/_version.js b/src/_version.js index 922abeeb..2278603c 100644 --- a/src/_version.js +++ b/src/_version.js @@ -1 +1 @@ -export default '7.4.7' \ No newline at end of file +export default '7.4.8' \ No newline at end of file diff --git a/zonefile/_build.js b/zonefile/_build.js index 5915e362..36ee70ff 100644 --- a/zonefile/_build.js +++ b/zonefile/_build.js @@ -34,7 +34,6 @@ export default { "2|n": "0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya", "1|s": "0/brazzaville,0/kinshasa,0/luanda,0/windhoek", "1|n|03/26:01->10/29:02": "3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet", - "1|n|03/19:03->04/23:02": "0/el_aaiun", "1|n": "0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis", "14|n": "11/kiritimati", "13|s": "11/apia,11/tongatapu", @@ -51,7 +50,7 @@ export default { "10|s": "12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland", "10|n": "2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap", "10.5|s|04/02:01->10/01:02": "4/lord_howe,4/lhi", - "0|s|03/19:03->04/23:02": "0/casablanca", + "0|s|03/19:03->04/23:02": "0/casablanca,0/el_aaiun", "0|n|03/26:00->10/29:01": "1/scoresbysund,3/azores", "0|n": "0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory", "-9|n|03/12:02->11/05:02": "1/adak,1/atka,us/aleutian", From a9ddb5558c55ba6b324cebaeaa8932c0378e4608 Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 21 Nov 2023 15:12:19 +0100 Subject: [PATCH 02/11] feat: added the translation of since, over and units --- README.md | 26 ++++- src/data/distance.js | 28 ++++++ src/data/units.js | 35 +++++++ src/methods/i18n.js | 16 +++- src/methods/since/index.js | 32 ++++--- src/methods/since/soften.js | 17 +++- test/diff.test.js | 32 +++++++ test/i18n.test.js | 8 ++ test/since.test.js | 184 ++++++++++++++++++++++++++++++++++++ zonefile/_build.js | 3 +- 10 files changed, 360 insertions(+), 21 deletions(-) create mode 100644 src/data/distance.js create mode 100644 src/data/units.js diff --git a/README.md b/README.md index 98107aef..a52d5a98 100644 --- a/README.md +++ b/README.md @@ -535,7 +535,31 @@ s.i18n({ am: ' a. m.', pm: ' a. m.' }, - useTitleCase: true // automatically in .format() + distance: { + past: 'past', + future: 'future', + present: 'present', + now: 'now', + almost: 'almost', + over: 'over', + pastDistance: (value) => `${value} ago`, + futureDistance: (value) => `in ${value}` + }, + units: { + second: 'second', + secondPlural: 'second', + minute: 'minute', + minutePlural: 'minutes', + hour: 'hour', + hourPlural: 'hours', + day: 'day', + dayPlural: 'seconds', + month: 'month', + monthPlural: 'months', + year: 'year', + yearPlural: 'years', + }, + useTitleCase: true // automatically in .format() }); s.format('day') //'Sábado' ``` diff --git a/src/data/distance.js b/src/data/distance.js new file mode 100644 index 00000000..6c1fe5cc --- /dev/null +++ b/src/data/distance.js @@ -0,0 +1,28 @@ +let past = 'past' +let future = 'future' +let present = 'present' +let now = 'now' +let almost = 'almost' +let over = 'over' +let pastDistance = (value) => `${value} ago` +let futureDistance = (value) => `in ${value}` + +export function pastDistanceString(value) { return pastDistance(value) } +export function futureDistanceString(value) { return futureDistance(value) } +export function pastString() { return past } +export function futureString() { return future } +export function presentString() { return present } +export function nowString() { return now } +export function almostString() { return almost } +export function overString() { return over } + +export function set(i18n) { + pastDistance = i18n.pastDistance || pastDistance + futureDistance = i18n.futureDistance || futureDistance + past = i18n.past || past + future = i18n.future || future + present = i18n.present || present + now = i18n.now || now + almost = i18n.almost || almost + over = i18n.over || over +} \ No newline at end of file diff --git a/src/data/units.js b/src/data/units.js new file mode 100644 index 00000000..adf96816 --- /dev/null +++ b/src/data/units.js @@ -0,0 +1,35 @@ +let units = { + second: 'second', + seconds: 'seconds', + minute: 'minute', + minutes: 'minutes', + hour: 'hour', + hours: 'hours', + day: 'day', + days: 'days', + month: 'month', + months: 'months', + year: 'year', + years: 'years', +}; + +export function unitsString(unit) { + return units[unit] || ''; +} + +export function set(i18n = {}) { + units = { + second: i18n.second || units.second, + seconds: i18n.seconds || units.seconds, + minute: i18n.minute || units.minute, + minutes: i18n.minutes || units.minutes, + hour: i18n.hour || units.hour, + hours: i18n.hours || units.hours, + day: i18n.day || units.day, + days: i18n.days || units.days, + month: i18n.month || units.month, + months: i18n.months || units.months, + year: i18n.year || units.year, + years: i18n.years || units.years, + }; +} \ No newline at end of file diff --git a/src/methods/i18n.js b/src/methods/i18n.js index bd566180..ed3e8bda 100644 --- a/src/methods/i18n.js +++ b/src/methods/i18n.js @@ -3,7 +3,8 @@ import { set as setD } from '../data/days.js' import { set as setM } from '../data/months.js' import { set as setTcf } from '../data/caseFormat.js' import { set as setAmpm } from '../data/ampm.js' - +import { set as setDistance } from '../data/distance.js' +import { set as setUnits } from '../data/units.js' const addMethods = SpaceTime => { const methods = { @@ -17,7 +18,7 @@ const addMethods = SpaceTime => { setM(data.months) } - // change the the display style of the month / day names + //change the display style of the month / day names if (isBoolean(data.useTitleCase)) { setTcf(data.useTitleCase) } @@ -26,6 +27,17 @@ const addMethods = SpaceTime => { if (isObject(data.ampm)) { setAmpm(data.ampm) } + + //change distance strings + if(isObject(data.distance)){ + setDistance(data.distance) + } + + //change units strings + if(isObject(data.units)){ + setUnits(data.units) + } + return this } } diff --git a/src/methods/since/index.js b/src/methods/since/index.js index ba45597b..886a0149 100644 --- a/src/methods/since/index.js +++ b/src/methods/since/index.js @@ -2,6 +2,14 @@ import { beADate } from '../../fns.js' import toISO from './_iso.js' import getDiff from './getDiff.js' import soften from './soften.js' +import { + pastString, + futureString, + nowString, + presentString, + pastDistanceString, + futureDistanceString +} from "../../data/distance.js"; //by spencermountain + Shaun Grady //create the human-readable diff between the two dates @@ -12,16 +20,16 @@ const since = (start, end) => { if (isNow === true) { return { diff, - rounded: 'now', - qualified: 'now', - precise: 'now', + rounded: nowString(), + qualified: nowString(), + precise: nowString(), abbreviated: [], iso: 'P0Y0M0DT0H0M0S', - direction: 'present', + direction: presentString(), } } let precise - let direction = 'future' + let direction = futureString() let { rounded, qualified, englishValues, abbreviated } = soften(diff) @@ -29,14 +37,14 @@ const since = (start, end) => { precise = englishValues.splice(0, 2).join(', ') //handle before/after logic if (start.isAfter(end) === true) { - rounded += ' ago' - qualified += ' ago' - precise += ' ago' - direction = 'past' + rounded = pastDistanceString(rounded) + qualified = pastDistanceString(qualified) + precise = pastDistanceString(precise) + direction = pastString() } else { - rounded = 'in ' + rounded - qualified = 'in ' + qualified - precise = 'in ' + precise + rounded = futureDistanceString(rounded) + qualified = futureDistanceString(qualified) + precise = futureDistanceString(precise) } // https://en.wikipedia.org/wiki/ISO_8601#Durations // P[n]Y[n]M[n]DT[n]H[n]M[n]S diff --git a/src/methods/since/soften.js b/src/methods/since/soften.js index 1fd3a610..80507f35 100644 --- a/src/methods/since/soften.js +++ b/src/methods/since/soften.js @@ -1,4 +1,12 @@ //our conceptual 'break-points' for each unit +import { + unitsString, +} from "../../data/units.js"; +import { + almostString, + overString +} from "../../data/distance.js"; + const qualifiers = { months: { almost: 10, @@ -25,9 +33,9 @@ const qualifiers = { // Expects a plural unit arg function pluralize(value, unit) { if (value === 1) { - unit = unit.slice(0, -1) + return value + ' ' + unitsString(unit.slice(0, -1)) } - return value + ' ' + unit + return value + ' ' + unitsString(unit) } const toSoft = function (diff) { @@ -54,12 +62,13 @@ const toSoft = function (diff) { const nextValue = Math.abs(diff[nextUnit]) if (nextValue > qualifiers[nextUnit].almost) { rounded = pluralize(value + 1, unit) - qualified = 'almost ' + rounded + qualified = almostString() + ' ' + rounded } else if (nextValue > qualifiers[nextUnit].over) { - qualified = 'over ' + englishValue + qualified = overString() + ' ' + englishValue } } }) + return { qualified, rounded, abbreviated, englishValues } } export default toSoft \ No newline at end of file diff --git a/test/diff.test.js b/test/diff.test.js index 22f762c3..c2d08444 100644 --- a/test/diff.test.js +++ b/test/diff.test.js @@ -176,3 +176,35 @@ test('diff-timezone equal times', (t) => { t.equal(diff.seconds, 0, 'same-sec') t.end() }) + +test('i18n', (t) => { + let start = spacetime("Dec 25th 2021"); + let end = spacetime("Feb 2nd 2022"); + + let translationValues = { + units: { + secondWord: 'segundo', + secondWordPlural: 'segundos', + minuteWord: 'minuto', + minuteWordPlural: 'minutos', + hourWord: 'hora', + hourWordPlural: 'horas', + dayWord: 'dia', + dayWordPlural: 'dias', + monthWord: 'mes', + monthWordPlural: 'meses', + yearWord: 'año', + yearWordPlural: 'años', + }, + } + + start.i18n(translationValues) + end.i18n(translationValues) + + let diff = start.since(end).diff + t.equal(diff.days, 39, 'same-day') + t.equal(diff.hours, -3, 'hour diff') + t.equal(diff.minutes, 0, 'same-min') + t.equal(diff.seconds, 0, 'same-sec') + t.end() +}) \ No newline at end of file diff --git a/test/i18n.test.js b/test/i18n.test.js index 5197203c..cb0924d2 100644 --- a/test/i18n.test.js +++ b/test/i18n.test.js @@ -27,6 +27,14 @@ const defaultSettings = { ampm: { am: 'am', pm: 'pm' + }, + distance: { + pastWord: 'past', + futureWord: 'future', + presentWord: 'present', + now: 'now', + pastDistance: (value) => `${value} ago`, + futureDistance: (value) => `in ${value}` } } diff --git a/test/since.test.js b/test/since.test.js index 48909dce..fe191e38 100644 --- a/test/since.test.js +++ b/test/since.test.js @@ -257,3 +257,187 @@ test('since calculation involves month addition and subtraction', (t) => { t.end() }) + +test('i18n, past and future', (t) => { + let start = spacetime("Dec 25th 2021"); + let end = start + .add(1, 'minute') + .add(2, 'seconds') + .add(3, 'hours') + .add(1, 'day'); + + let translationValues = { + distance: { + past: 'pasado', + future: 'futuro', + present: 'presente', + now: 'ahora', + almost: 'casi', + over: 'pasan', + pastDistance: (value) => `hace ${value}`, + futureDistance: (value) => `en ${value}` + }, + units: { + second: 'segundo', + seconds: 'segundos', + minute: 'minuto', + minutes: 'minutos', + hour: 'hora', + hours: 'horas', + day: 'dia', + days: 'dias', + month: 'mes', + months: 'meses', + year: 'año', + years: 'años', + }, + } + + start.i18n(translationValues); + end.i18n(translationValues); + + + t.deepEqual(end.since(start), { + diff: { days: 1, hours: 3, minutes: 1, months: 0, seconds: 2, years: 0 }, + precise: "hace 1 dia, 3 horas", + qualified: "hace 1 dia", + rounded: "hace 1 dia", + abbreviated: ['1d', '3h', '1m', '2s'], + iso: "P0Y0M1DT3H1M2S", + direction: 'pasado' + }) + + t.deepEqual(start.since(end), { + diff: { days: -1, hours: -3, minutes: -1, months: 0, seconds: -2, years: 0 }, + precise: "en 1 dia, 3 horas", + qualified: "en 1 dia", + rounded: "en 1 dia", + abbreviated: ['1d', '3h', '1m', '2s'], + iso: "P0Y0M1DT3H1M2S", + direction: 'futuro' + }) + + t.end() +}) + +test('i18n, almost and over', (t) => { + let start = spacetime("Dec 25th 2021"); + let almost21Days = start + .add(23, 'hours') + .add(20, 'days') + let almost1Hour = start + .add(5, 'hours') + .add(59, 'minutes') + const overTwoMonths = start.clone().add(2, 'months').add(11, 'days') + + let translationValues = { + distance: { + past: 'pasado', + future: 'futuro', + present: 'presente', + now: 'ahora', + almost: 'casi', + over: 'algo más de', + pastDistance: (value) => `hace ${value}`, + futureDistance: (value) => `en ${value}` + }, + units: { + second: 'segundo', + seconds: 'segundos', + minute: 'minuto', + minutes: 'minutos', + hour: 'hora', + hours: 'horas', + day: 'dia', + days: 'dias', + month: 'mes', + months: 'meses', + year: 'año', + years: 'años', + }, + } + + start.i18n(translationValues); + almost21Days.i18n(translationValues) + almost1Hour.i18n(translationValues) + overTwoMonths.i18n(translationValues) + + t.deepEqual(start.since(almost21Days).qualified, "en casi 21 dias") + t.deepEqual(almost1Hour.since(start).qualified, "hace casi 6 horas") + t.deepEqual( + start.since(overTwoMonths), + { + diff: { + years: 0, + months: -2, + days: -11, + hours: 0, + minutes: 0, + seconds: 0 + }, + rounded: 'in 3 months', + qualified: 'in over 2 months', + precise: 'in 2 months, 11 days', + abbreviated: ['2m', '11d'], + iso: 'P0Y2M11DT0H0M0S', + direction: 'future' + }, + 'over' + ) + + t.end() +}) + +test('i18n, now', (t) => { + let start = spacetime("Dec 25th 2021"); + let end = spacetime("Dec 25th 2021"); + + let translationValues = { + distance: { + past: 'pasado', + future: 'futuro', + present: 'presente', + now: 'ahora', + almost: 'casi', + over: 'pasan', + pastDistance: (value) => `hace ${value}`, + futureDistance: (value) => `en ${value}` + }, + units: { + second: 'segundo', + seconds: 'segundos', + minute: 'minuto', + minutes: 'minutos', + hour: 'hora', + hours: 'horas', + day: 'dia', + days: 'dias', + month: 'mes', + months: 'meses', + year: 'año', + years: 'años', + }, + } + + start.i18n(translationValues); + end.i18n(translationValues) + + t.deepEqual(start.since(end), { + diff: { + years: 0, + months: 0, + days: 0, + hours: 0, + minutes: 0, + seconds: 0 + }, + rounded: 'ahora', + qualified: 'ahora', + precise: 'ahora', + abbreviated: [], + iso: 'P0Y0M0DT0H0M0S', + direction: 'presente' + }) + + t.end() +}) \ No newline at end of file diff --git a/zonefile/_build.js b/zonefile/_build.js index 5915e362..36ee70ff 100644 --- a/zonefile/_build.js +++ b/zonefile/_build.js @@ -34,7 +34,6 @@ export default { "2|n": "0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya", "1|s": "0/brazzaville,0/kinshasa,0/luanda,0/windhoek", "1|n|03/26:01->10/29:02": "3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet", - "1|n|03/19:03->04/23:02": "0/el_aaiun", "1|n": "0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis", "14|n": "11/kiritimati", "13|s": "11/apia,11/tongatapu", @@ -51,7 +50,7 @@ export default { "10|s": "12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland", "10|n": "2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap", "10.5|s|04/02:01->10/01:02": "4/lord_howe,4/lhi", - "0|s|03/19:03->04/23:02": "0/casablanca", + "0|s|03/19:03->04/23:02": "0/casablanca,0/el_aaiun", "0|n|03/26:00->10/29:01": "1/scoresbysund,3/azores", "0|n": "0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory", "-9|n|03/12:02->11/05:02": "1/adak,1/atka,us/aleutian", From 678897a87d93e7ed6c9459d5ed5947002c88463e Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 21 Nov 2023 15:16:26 +0100 Subject: [PATCH 03/11] feat: fixed test --- test/since.test.js | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/test/since.test.js b/test/since.test.js index fe191e38..f3ae93e1 100644 --- a/test/since.test.js +++ b/test/since.test.js @@ -364,26 +364,7 @@ test('i18n, almost and over', (t) => { t.deepEqual(start.since(almost21Days).qualified, "en casi 21 dias") t.deepEqual(almost1Hour.since(start).qualified, "hace casi 6 horas") - t.deepEqual( - start.since(overTwoMonths), - { - diff: { - years: 0, - months: -2, - days: -11, - hours: 0, - minutes: 0, - seconds: 0 - }, - rounded: 'in 3 months', - qualified: 'in over 2 months', - precise: 'in 2 months, 11 days', - abbreviated: ['2m', '11d'], - iso: 'P0Y2M11DT0H0M0S', - direction: 'future' - }, - 'over' - ) + t.deepEqual(start.since(overTwoMonths).qualified, "en algo más de 2 meses" ) t.end() }) From 8d1833b98a501a4a7178a52e2573eacf3904618f Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 21 Nov 2023 15:25:49 +0100 Subject: [PATCH 04/11] feat: removed build modifications --- zonefile/_build.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zonefile/_build.js b/zonefile/_build.js index 36ee70ff..5915e362 100644 --- a/zonefile/_build.js +++ b/zonefile/_build.js @@ -34,6 +34,7 @@ export default { "2|n": "0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya", "1|s": "0/brazzaville,0/kinshasa,0/luanda,0/windhoek", "1|n|03/26:01->10/29:02": "3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet", + "1|n|03/19:03->04/23:02": "0/el_aaiun", "1|n": "0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis", "14|n": "11/kiritimati", "13|s": "11/apia,11/tongatapu", @@ -50,7 +51,7 @@ export default { "10|s": "12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland", "10|n": "2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap", "10.5|s|04/02:01->10/01:02": "4/lord_howe,4/lhi", - "0|s|03/19:03->04/23:02": "0/casablanca,0/el_aaiun", + "0|s|03/19:03->04/23:02": "0/casablanca", "0|n|03/26:00->10/29:01": "1/scoresbysund,3/azores", "0|n": "0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory", "-9|n|03/12:02->11/05:02": "1/adak,1/atka,us/aleutian", From fd65d157b4bd8cef019ad5a46200ba82c810b1a0 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Mon, 11 Dec 2023 11:18:02 -0500 Subject: [PATCH 05/11] fix tests from #403 --- scratch.js | 22 ++++------------------ test/diff.test.js | 14 +++++++------- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/scratch.js b/scratch.js index 186ed8eb..5795c3a2 100644 --- a/scratch.js +++ b/scratch.js @@ -1,22 +1,8 @@ // const spacetime = require('./builds/spacetime.cjs') import spacetime from './src/index.js' -let s = spacetime('feb 1st 2023', 'Africa/Casablanca') -console.log(s.timezone().current.offset) -s = spacetime('apr 1st 2023', 'Africa/Casablanca') -console.log(s.timezone().current.offset) -s = spacetime('oct 1st 2023', 'Africa/Casablanca') -console.log(s.timezone().current.offset) +let start = spacetime('Dec 25th 2021') +let end = spacetime('Feb 2nd 2022') -// s = spacetime.now('Europe/Lisbon') -// console.log(s.time()) - - -// s = s.year(2020) -// s = s.dayOfYear(366); -// console.log(s.dayTime()); - -// let s = spacetime('03/31/2002', 'America/Denver') -// console.log(s.iso()) - -// casablanca is + 1, 0, +1 +let diff = start.since(end) +console.log(diff) diff --git a/test/diff.test.js b/test/diff.test.js index c2d08444..76609ac3 100644 --- a/test/diff.test.js +++ b/test/diff.test.js @@ -178,8 +178,8 @@ test('diff-timezone equal times', (t) => { }) test('i18n', (t) => { - let start = spacetime("Dec 25th 2021"); - let end = spacetime("Feb 2nd 2022"); + let start = spacetime('Dec 25th 2021') + let end = spacetime('Feb 2nd 2022') let translationValues = { units: { @@ -194,17 +194,17 @@ test('i18n', (t) => { monthWord: 'mes', monthWordPlural: 'meses', yearWord: 'año', - yearWordPlural: 'años', - }, + yearWordPlural: 'años' + } } start.i18n(translationValues) end.i18n(translationValues) let diff = start.since(end).diff - t.equal(diff.days, 39, 'same-day') - t.equal(diff.hours, -3, 'hour diff') + t.equal(diff.days, -8, 'same-day') + t.equal(diff.hours, 0, 'hour diff') t.equal(diff.minutes, 0, 'same-min') t.equal(diff.seconds, 0, 'same-sec') t.end() -}) \ No newline at end of file +}) From 8813dc84ca47d6dc4ab5c19e309ccaa98acaa21e Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Mon, 11 Dec 2023 11:27:23 -0500 Subject: [PATCH 06/11] fix for cairo #404 --- scratch.js | 13 +- test/smoke.test.js | 2 +- zonefile/_build.js | 2 +- zonefile/iana.js | 3766 ++++++++++++++++++++++---------------------- 4 files changed, 1894 insertions(+), 1889 deletions(-) diff --git a/scratch.js b/scratch.js index 5795c3a2..f02ff162 100644 --- a/scratch.js +++ b/scratch.js @@ -1,8 +1,13 @@ // const spacetime = require('./builds/spacetime.cjs') import spacetime from './src/index.js' -let start = spacetime('Dec 25th 2021') -let end = spacetime('Feb 2nd 2022') +let s = spacetime(null, 'Africa/Cairo') +console.log(s.time()) +console.log(s.timezone()) +s = s.minus(5, 'months') +console.log(s.time()) +console.log(s.timezone()) -let diff = start.since(end) -console.log(diff) +// s = spacetime(null, 'America/Toronto') +// console.log(s.time()) +// console.log(s.timezone()) diff --git a/test/smoke.test.js b/test/smoke.test.js index 0a9c9a52..ae761612 100644 --- a/test/smoke.test.js +++ b/test/smoke.test.js @@ -20,7 +20,7 @@ test('random november time', (t) => { ['Asia/Karachi', 'Thu 7:35am'], ['America/Toronto', 'Wed 9:35pm'], ['America/New_York', 'Wed 9:35pm'], - ['Africa/Cairo', 'Thu 3:35am'], + ['Africa/Cairo', 'Thu 4:35am'], ['Asia/Kathmandu', 'Thu 8:20am'], ['Europe/Paris', 'Thu 3:35am'], ['Europe/Kiev', 'Thu 4:35am'], // Alias to "Europe/Kyiv" diff --git a/zonefile/_build.js b/zonefile/_build.js index 36ee70ff..4f375f03 100644 --- a/zonefile/_build.js +++ b/zonefile/_build.js @@ -21,6 +21,7 @@ export default { "4.5|n": "2/kabul", "3|s": "12/syowa,9/antananarivo", "3|n|04/29:02->10/28:02": "2/gaza,2/hebron", + "3|n|04/28:00->10/26:24": "0/cairo,egypt", "3|n|03/26:03->10/29:04": "2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet", "3|n|03/26:02->10/29:03": "8/chisinau,8/tiraspol", "3|n|03/26:00->10/28:24": "2/beirut", @@ -29,7 +30,6 @@ export default { "3.5|n": "2/tehran,iran", "2|s|03/26:02->10/29:02": "12/troll", "2|s": "0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane", - "2|n|04/28:00->10/26:24": "0/cairo,egypt", "2|n|03/26:02->10/29:03": "0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met", "2|n": "0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya", "1|s": "0/brazzaville,0/kinshasa,0/luanda,0/windhoek", diff --git a/zonefile/iana.js b/zonefile/iana.js index 0d3a6beb..9384116a 100644 --- a/zonefile/iana.js +++ b/zonefile/iana.js @@ -1,1899 +1,1899 @@ export default { - "africa/abidjan": { - "offset": 0, - "hem": "n" - }, - "africa/accra": { - "offset": 0, - "hem": "n" - }, - "africa/addis_ababa": { - "offset": 3, - "hem": "n" - }, - "africa/algiers": { - "offset": 1, - "hem": "n" - }, - "africa/asmara": { - "offset": 3, - "hem": "n" - }, - "africa/asmera": { - "offset": 3, - "hem": "n" - }, - "africa/bamako": { - "offset": 0, - "hem": "n" - }, - "africa/bangui": { - "offset": 1, - "hem": "n" - }, - "africa/banjul": { - "offset": 0, - "hem": "n" - }, - "africa/bissau": { - "offset": 0, - "hem": "n" - }, - "africa/blantyre": { - "offset": 2, - "hem": "n" - }, - "africa/brazzaville": { - "offset": 1, - "hem": "s" - }, - "africa/bujumbura": { - "offset": 2, - "hem": "n" - }, - "africa/cairo": { - "offset": 2, - "hem": "n", - "dst": "04/28:00->10/26:24" - }, - "africa/casablanca": { - "offset": 0, - "hem": "s", - "dst": "03/19:03->04/23:02" - }, - "africa/ceuta": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "africa/conakry": { - "offset": 0, - "hem": "n" - }, - "africa/dakar": { - "offset": 0, - "hem": "n" - }, - "africa/dar_es_salaam": { - "offset": 3, - "hem": "n" - }, - "africa/djibouti": { - "offset": 3, - "hem": "n" - }, - "africa/douala": { - "offset": 1, - "hem": "n" - }, - "africa/el_aaiun": { - "offset": 0, - "hem": "s", - "dst": "03/19:03->04/23:02" - }, - "africa/freetown": { - "offset": 0, - "hem": "n" - }, - "africa/gaborone": { - "offset": 2, - "hem": "s" - }, - "africa/harare": { - "offset": 2, - "hem": "s" + 'africa/abidjan': { + offset: 0, + hem: 'n' + }, + 'africa/accra': { + offset: 0, + hem: 'n' + }, + 'africa/addis_ababa': { + offset: 3, + hem: 'n' + }, + 'africa/algiers': { + offset: 1, + hem: 'n' + }, + 'africa/asmara': { + offset: 3, + hem: 'n' + }, + 'africa/asmera': { + offset: 3, + hem: 'n' + }, + 'africa/bamako': { + offset: 0, + hem: 'n' + }, + 'africa/bangui': { + offset: 1, + hem: 'n' + }, + 'africa/banjul': { + offset: 0, + hem: 'n' + }, + 'africa/bissau': { + offset: 0, + hem: 'n' + }, + 'africa/blantyre': { + offset: 2, + hem: 'n' + }, + 'africa/brazzaville': { + offset: 1, + hem: 's' + }, + 'africa/bujumbura': { + offset: 2, + hem: 'n' + }, + 'africa/cairo': { + offset: 3, + hem: 'n', + dst: '04/28:00->10/26:24' + }, + 'africa/casablanca': { + offset: 0, + hem: 's', + dst: '03/19:03->04/23:02' + }, + 'africa/ceuta': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'africa/conakry': { + offset: 0, + hem: 'n' + }, + 'africa/dakar': { + offset: 0, + hem: 'n' + }, + 'africa/dar_es_salaam': { + offset: 3, + hem: 'n' + }, + 'africa/djibouti': { + offset: 3, + hem: 'n' + }, + 'africa/douala': { + offset: 1, + hem: 'n' + }, + 'africa/el_aaiun': { + offset: 0, + hem: 's', + dst: '03/19:03->04/23:02' + }, + 'africa/freetown': { + offset: 0, + hem: 'n' + }, + 'africa/gaborone': { + offset: 2, + hem: 's' + }, + 'africa/harare': { + offset: 2, + hem: 's' }, - "africa/johannesburg": { - "offset": 2, - "hem": "s" + 'africa/johannesburg': { + offset: 2, + hem: 's' }, - "africa/juba": { - "offset": 3, - "hem": "n" + 'africa/juba': { + offset: 3, + hem: 'n' }, - "africa/kampala": { - "offset": 3, - "hem": "n" + 'africa/kampala': { + offset: 3, + hem: 'n' }, - "africa/khartoum": { - "offset": 2, - "hem": "n" - }, - "africa/kigali": { - "offset": 2, - "hem": "n" - }, - "africa/kinshasa": { - "offset": 1, - "hem": "s" - }, - "africa/lagos": { - "offset": 1, - "hem": "n" - }, - "africa/libreville": { - "offset": 1, - "hem": "n" - }, - "africa/lome": { - "offset": 0, - "hem": "n" - }, - "africa/luanda": { - "offset": 1, - "hem": "s" - }, - "africa/lubumbashi": { - "offset": 2, - "hem": "s" - }, - "africa/lusaka": { - "offset": 2, - "hem": "s" - }, - "africa/malabo": { - "offset": 1, - "hem": "n" - }, - "africa/maputo": { - "offset": 2, - "hem": "s" - }, - "africa/maseru": { - "offset": 2, - "hem": "s" - }, - "africa/mbabane": { - "offset": 2, - "hem": "s" - }, - "africa/mogadishu": { - "offset": 3, - "hem": "n" - }, - "africa/monrovia": { - "offset": 0, - "hem": "n" - }, - "africa/nairobi": { - "offset": 3, - "hem": "n" - }, - "africa/ndjamena": { - "offset": 1, - "hem": "n" - }, - "africa/niamey": { - "offset": 1, - "hem": "n" - }, - "africa/nouakchott": { - "offset": 0, - "hem": "n" + 'africa/khartoum': { + offset: 2, + hem: 'n' + }, + 'africa/kigali': { + offset: 2, + hem: 'n' + }, + 'africa/kinshasa': { + offset: 1, + hem: 's' + }, + 'africa/lagos': { + offset: 1, + hem: 'n' + }, + 'africa/libreville': { + offset: 1, + hem: 'n' + }, + 'africa/lome': { + offset: 0, + hem: 'n' + }, + 'africa/luanda': { + offset: 1, + hem: 's' + }, + 'africa/lubumbashi': { + offset: 2, + hem: 's' + }, + 'africa/lusaka': { + offset: 2, + hem: 's' + }, + 'africa/malabo': { + offset: 1, + hem: 'n' + }, + 'africa/maputo': { + offset: 2, + hem: 's' + }, + 'africa/maseru': { + offset: 2, + hem: 's' + }, + 'africa/mbabane': { + offset: 2, + hem: 's' + }, + 'africa/mogadishu': { + offset: 3, + hem: 'n' + }, + 'africa/monrovia': { + offset: 0, + hem: 'n' + }, + 'africa/nairobi': { + offset: 3, + hem: 'n' + }, + 'africa/ndjamena': { + offset: 1, + hem: 'n' + }, + 'africa/niamey': { + offset: 1, + hem: 'n' + }, + 'africa/nouakchott': { + offset: 0, + hem: 'n' }, - "africa/ouagadougou": { - "offset": 0, - "hem": "n" - }, - "africa/porto-novo": { - "offset": 1, - "hem": "n" - }, - "africa/sao_tome": { - "offset": 0, - "hem": "n" - }, - "africa/tripoli": { - "offset": 2, - "hem": "n" - }, - "africa/tunis": { - "offset": 1, - "hem": "n" - }, - "africa/windhoek": { - "offset": 1, - "hem": "s" - }, - "america/adak": { - "offset": -9, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/anchorage": { - "offset": -8, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/anguilla": { - "offset": -4, - "hem": "n" - }, - "america/antigua": { - "offset": -4, - "hem": "n" - }, - "america/araguaina": { - "offset": -3, - "hem": "n" - }, - "america/argentina": { - "offset": -3, - "hem": "s" - }, - "america/aruba": { - "offset": -4, - "hem": "n" - }, - "america/asuncion": { - "offset": -4, - "hem": "s", - "dst": "03/25:24->10/01:00" - }, - "america/bahia": { - "offset": -3, - "hem": "n" - }, - "america/bahia_banderas": { - "offset": -6, - "hem": "n", - }, - "america/barbados": { - "offset": -4, - "hem": "n" - }, - "america/belem": { - "offset": -3, - "hem": "n" - }, - "america/belize": { - "offset": -6, - "hem": "n" - }, - "america/blanc-sablon": { - "offset": -4, - "hem": "n" - }, - "america/boa_vista": { - "offset": -4, - "hem": "n" - }, - "america/bogota": { - "offset": -5, - "hem": "n" - }, - "america/boise": { - "offset": -6, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/buenos_aires": { - "offset": -3, - "hem": "s" - }, - "america/cambridge_bay": { - "offset": -6, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/campo_grande": { - "offset": -4, - "hem": "s" - }, - "america/cancun": { - "offset": -5, - "hem": "n" - }, - "america/caracas": { - "offset": -4, - "hem": "n" - }, - "america/catamarca": { - "offset": -3, - "hem": "s" - }, - "america/cayenne": { - "offset": -3, - "hem": "n" - }, - "america/cayman": { - "offset": -5, - "hem": "n" - }, - "america/chicago": { - "offset": -5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/chihuahua": { - "offset": -6, - "hem": "n", - }, - "america/coral_harbour": { - "offset": -5, - "hem": "n" - }, - "america/cordoba": { - "offset": -3, - "hem": "s" - }, - "america/costa_rica": { - "offset": -6, - "hem": "n" - }, - "america/creston": { - "offset": -7, - "hem": "n" - }, - "america/cuiaba": { - "offset": -4, - "hem": "s" - }, - "america/curacao": { - "offset": -4, - "hem": "n" - }, - "america/danmarkshavn": { - "offset": 0, - "hem": "n" - }, - "america/dawson": { - "offset": -7, - "hem": "n" - }, - "america/dawson_creek": { - "offset": -7, - "hem": "n" - }, - "america/denver": { - "offset": -6, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/detroit": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/dominica": { - "offset": -4, - "hem": "n" - }, - "america/edmonton": { - "offset": -6, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/eirunepe": { - "offset": -5, - "hem": "n" - }, - "america/el_salvador": { - "offset": -6, - "hem": "n" - }, - "america/fort_nelson": { - "offset": -7, - "hem": "n" - }, - "america/fortaleza": { - "offset": -3, - "hem": "s" - }, - "america/glace_bay": { - "offset": -3, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/nuuk": { - "offset": -2, - "hem": "n", - "dst": "03/25:22->10/28:24" - }, - "america/goose_bay": { - "offset": -3, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/grand_turk": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/grenada": { - "offset": -4, - "hem": "n" - }, - "america/guadeloupe": { - "offset": -4, - "hem": "n" - }, - "america/guatemala": { - "offset": -6, - "hem": "n" - }, - "america/guayaquil": { - "offset": -5, - "hem": "n" - }, - "america/guyana": { - "offset": -4, - "hem": "n" - }, - "america/halifax": { - "offset": -3, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/havana": { - "offset": -4, - "hem": "n", - "dst": "03/12:00->11/05:01" - }, - "america/hermosillo": { - "offset": -7, - "hem": "n" - }, - "america/indiana": { - "offset": -4, - "hem": "n", - "dst": "03/12:03->11/05:01" - }, - "america/indianapolis": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/inuvik": { - "offset": -6, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/iqaluit": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/jamaica": { - "offset": -5, - "hem": "n" - }, - "america/jujuy": { - "offset": -3, - "hem": "s" - }, - "america/juneau": { - "offset": -8, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/kentucky": { - "offset": -4, - "hem": "n", - "dst": "03/12:03->11/05:01" - }, - "america/kralendijk": { - "offset": -4, - "hem": "n" - }, - "america/la_paz": { - "offset": -4, - "hem": "s" - }, - "america/lima": { - "offset": -5, - "hem": "s" - }, - "america/los_angeles": { - "offset": -7, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/louisville": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/lower_princes": { - "offset": -4, - "hem": "n" - }, - "america/maceio": { - "offset": -3, - "hem": "n" - }, - "america/managua": { - "offset": -6, - "hem": "n" - }, - "america/manaus": { - "offset": -4, - "hem": "s" - }, - "america/marigot": { - "offset": -4, - "hem": "n" - }, - "america/martinique": { - "offset": -4, - "hem": "n" - }, - "america/matamoros": { - "offset": -5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/mazatlan": { - "offset": -7, - "hem": "n" - }, - "america/mendoza": { - "offset": -3, - "hem": "s" - }, - "america/menominee": { - "offset": -5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/merida": { - "offset": -6, - "hem": "n" - }, - "america/metlakatla": { - "offset": -8, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/mexico_city": { - "offset": -6, - "hem": "n" - }, - "america/miquelon": { - "offset": -2, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/moncton": { - "offset": -3, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/monterrey": { - "offset": -6, - "hem": "n", - }, - "america/montevideo": { - "offset": -3, - "hem": "s" - }, - "america/montreal": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/montserrat": { - "offset": -4, - "hem": "n" - }, - "america/nassau": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/new_york": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/nipigon": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/nome": { - "offset": -8, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/noronha": { - "offset": -2, - "hem": "n" - }, - "america/north_dakota": { - "offset": -5, - "hem": "n", - "dst": "03/12:03->11/05:01" - }, - "america/ojinaga": { - "offset": -6, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/ciudad_juarez": { - "offset": -6, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/panama": { - "offset": -5, - "hem": "n" - }, - "america/pangnirtung": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/paramaribo": { - "offset": -3, - "hem": "n" - }, - "america/phoenix": { - "offset": -7, - "hem": "n" - }, - "america/port-au-prince": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/port_of_spain": { - "offset": -4, - "hem": "n" - }, - "america/porto_velho": { - "offset": -4, - "hem": "n" - }, - "america/puerto_rico": { - "offset": -4, - "hem": "n" - }, - "america/punta_arenas": { - "offset": -3, - "hem": "s" - }, - "america/rainy_river": { - "offset": -5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/rankin_inlet": { - "offset": -5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/recife": { - "offset": -3, - "hem": "n" - }, - "america/regina": { - "offset": -6, - "hem": "n" - }, - "america/resolute": { - "offset": -5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/rio_branco": { - "offset": -5, - "hem": "s" - }, - "america/santa_isabel": { - "offset": -7, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/santarem": { - "offset": -3, - "hem": "n" - }, - "america/santiago": { - "offset": -4, - "hem": "s", - "dst": "04/01:24->09/03:00" - }, - "america/santo_domingo": { - "offset": -4, - "hem": "n" - }, - "america/sao_paulo": { - "offset": -3, - "hem": "s" - }, - "america/scoresbysund": { - "offset": 0, - "hem": "n", - "dst": "03/26:00->10/29:01" - }, - "america/sitka": { - "offset": -8, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/st_barthelemy": { - "offset": -4, - "hem": "n" - }, - "america/st_johns": { - "offset": -2.5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/st_kitts": { - "offset": -4, - "hem": "n" - }, - "america/st_lucia": { - "offset": -4, - "hem": "n" - }, - "america/st_thomas": { - "offset": -4, - "hem": "n" - }, - "america/st_vincent": { - "offset": -4, - "hem": "n" - }, - "america/swift_current": { - "offset": -6, - "hem": "n" - }, - "america/tegucigalpa": { - "offset": -6, - "hem": "n" - }, - "america/thule": { - "offset": -3, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/thunder_bay": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/tijuana": { - "offset": -7, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/toronto": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/tortola": { - "offset": -4, - "hem": "n" - }, - "america/vancouver": { - "offset": -7, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/whitehorse": { - "offset": -7, - "hem": "n" - }, - "america/winnipeg": { - "offset": -5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/yakutat": { - "offset": -8, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/yellowknife": { - "offset": -6, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "antarctica/casey": { - "offset": 8, - "hem": "s", - "dst": "03/13:01->10/02:00" - }, - "antarctica/davis": { - "offset": 7, - "hem": "s" - }, - "antarctica/dumontdurville": { - "offset": 10, - "hem": "s" - }, - "antarctica/macquarie": { - "offset": 11, - "hem": "s", - "dst": "04/02:03->10/01:02" - }, - "antarctica/mawson": { - "offset": 5, - "hem": "s" - }, - "antarctica/mcmurdo": { - "offset": 12, - "hem": "s", - "dst": "04/02:03->09/24:02" - }, - "antarctica/palmer": { - "offset": -3, - "hem": "s" - }, - "antarctica/rothera": { - "offset": -3, - "hem": "s" - }, - "antarctica/syowa": { - "offset": 3, - "hem": "s" - }, - "antarctica/troll": { - "offset": 2, - "hem": "s", - "dst": "03/26:02->10/29:02" - }, - "antarctica/vostok": { - "offset": 6, - "hem": "s" - }, - "arctic/longyearbyen": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "asia/aden": { - "offset": 3, - "hem": "n" - }, - "asia/almaty": { - "offset": 6, - "hem": "n" - }, - "asia/amman": { - "offset": 3, - "hem": "n", - }, - "asia/anadyr": { - "offset": 12, - "hem": "n" - }, - "asia/aqtau": { - "offset": 5, - "hem": "n" - }, - "asia/aqtobe": { - "offset": 5, - "hem": "n" - }, - "asia/ashgabat": { - "offset": 5, - "hem": "n" - }, - "asia/atyrau": { - "offset": 5, - "hem": "n" - }, - "asia/baghdad": { - "offset": 3, - "hem": "n" - }, - "asia/bahrain": { - "offset": 3, - "hem": "n" - }, - "asia/baku": { - "offset": 4, - "hem": "n" - }, - "asia/bangkok": { - "offset": 7, - "hem": "n" - }, - "asia/barnaul": { - "offset": 7, - "hem": "n" - }, - "asia/beirut": { - "offset": 3, - "hem": "n", - "dst": "03/26:00->10/28:24" - }, - "asia/bishkek": { - "offset": 6, - "hem": "n" - }, - "asia/brunei": { - "offset": 8, - "hem": "n" - }, - "asia/kolkata": { - "offset": 5.5, - "hem": "n" - }, - "asia/chita": { - "offset": 9, - "hem": "n" - }, - "asia/choibalsan": { - "offset": 8, - "hem": "n" - }, - "asia/colombo": { - "offset": 5.5, - "hem": "n" - }, - "asia/damascus": { - "offset": 3, - "hem": "n" - }, - "asia/dhaka": { - "offset": 6, - "hem": "n" - }, - "asia/dili": { - "offset": 9, - "hem": "s" - }, - "asia/dubai": { - "offset": 4, - "hem": "n" - }, - "asia/dushanbe": { - "offset": 5, - "hem": "n" - }, - "asia/famagusta": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "asia/gaza": { - "offset": 3, - "hem": "n", - "dst": "04/29:02->10/28:02" - }, - "asia/hebron": { - "offset": 3, - "hem": "n", - "dst": "04/29:02->10/28:02" - }, - "asia/hong_kong": { - "offset": 8, - "hem": "n" - }, - "asia/hovd": { - "offset": 7, - "hem": "n" - }, - "asia/irkutsk": { - "offset": 8, - "hem": "n" - }, - "asia/jakarta": { - "offset": 7, - "hem": "s" - }, - "asia/jayapura": { - "offset": 9, - "hem": "s" - }, - "asia/jerusalem": { - "offset": 3, - "hem": "n", - "dst": "03/24:02->10/29:02" - }, - "asia/kabul": { - "offset": 4.5, - "hem": "n" - }, - "asia/kamchatka": { - "offset": 12, - "hem": "n" - }, - "asia/karachi": { - "offset": 5, - "hem": "n" - }, - "asia/kathmandu": { - "offset": 5.75, - "hem": "n" - }, - "asia/khandyga": { - "offset": 9, - "hem": "n" - }, - "asia/krasnoyarsk": { - "offset": 7, - "hem": "n" - }, - "asia/kuala_lumpur": { - "offset": 8, - "hem": "s" - }, - "asia/kuching": { - "offset": 8, - "hem": "n" - }, - "asia/kuwait": { - "offset": 3, - "hem": "n" - }, - "asia/macau": { - "offset": 8, - "hem": "n" - }, - "asia/magadan": { - "offset": 11, - "hem": "n" - }, - "asia/makassar": { - "offset": 8, - "hem": "s" - }, - "asia/manila": { - "offset": 8, - "hem": "n" - }, - "asia/muscat": { - "offset": 4, - "hem": "n" - }, - "asia/nicosia": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "asia/novokuznetsk": { - "offset": 7, - "hem": "n" + 'africa/ouagadougou': { + offset: 0, + hem: 'n' + }, + 'africa/porto-novo': { + offset: 1, + hem: 'n' + }, + 'africa/sao_tome': { + offset: 0, + hem: 'n' + }, + 'africa/tripoli': { + offset: 2, + hem: 'n' + }, + 'africa/tunis': { + offset: 1, + hem: 'n' + }, + 'africa/windhoek': { + offset: 1, + hem: 's' + }, + 'america/adak': { + offset: -9, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/anchorage': { + offset: -8, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/anguilla': { + offset: -4, + hem: 'n' + }, + 'america/antigua': { + offset: -4, + hem: 'n' + }, + 'america/araguaina': { + offset: -3, + hem: 'n' + }, + 'america/argentina': { + offset: -3, + hem: 's' + }, + 'america/aruba': { + offset: -4, + hem: 'n' + }, + 'america/asuncion': { + offset: -4, + hem: 's', + dst: '03/25:24->10/01:00' + }, + 'america/bahia': { + offset: -3, + hem: 'n' + }, + 'america/bahia_banderas': { + offset: -6, + hem: 'n' + }, + 'america/barbados': { + offset: -4, + hem: 'n' + }, + 'america/belem': { + offset: -3, + hem: 'n' + }, + 'america/belize': { + offset: -6, + hem: 'n' + }, + 'america/blanc-sablon': { + offset: -4, + hem: 'n' + }, + 'america/boa_vista': { + offset: -4, + hem: 'n' + }, + 'america/bogota': { + offset: -5, + hem: 'n' + }, + 'america/boise': { + offset: -6, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/buenos_aires': { + offset: -3, + hem: 's' + }, + 'america/cambridge_bay': { + offset: -6, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/campo_grande': { + offset: -4, + hem: 's' + }, + 'america/cancun': { + offset: -5, + hem: 'n' + }, + 'america/caracas': { + offset: -4, + hem: 'n' + }, + 'america/catamarca': { + offset: -3, + hem: 's' + }, + 'america/cayenne': { + offset: -3, + hem: 'n' + }, + 'america/cayman': { + offset: -5, + hem: 'n' + }, + 'america/chicago': { + offset: -5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/chihuahua': { + offset: -6, + hem: 'n' + }, + 'america/coral_harbour': { + offset: -5, + hem: 'n' + }, + 'america/cordoba': { + offset: -3, + hem: 's' + }, + 'america/costa_rica': { + offset: -6, + hem: 'n' + }, + 'america/creston': { + offset: -7, + hem: 'n' + }, + 'america/cuiaba': { + offset: -4, + hem: 's' + }, + 'america/curacao': { + offset: -4, + hem: 'n' + }, + 'america/danmarkshavn': { + offset: 0, + hem: 'n' + }, + 'america/dawson': { + offset: -7, + hem: 'n' + }, + 'america/dawson_creek': { + offset: -7, + hem: 'n' + }, + 'america/denver': { + offset: -6, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/detroit': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/dominica': { + offset: -4, + hem: 'n' + }, + 'america/edmonton': { + offset: -6, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/eirunepe': { + offset: -5, + hem: 'n' + }, + 'america/el_salvador': { + offset: -6, + hem: 'n' + }, + 'america/fort_nelson': { + offset: -7, + hem: 'n' + }, + 'america/fortaleza': { + offset: -3, + hem: 's' + }, + 'america/glace_bay': { + offset: -3, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/nuuk': { + offset: -2, + hem: 'n', + dst: '03/25:22->10/28:24' + }, + 'america/goose_bay': { + offset: -3, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/grand_turk': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/grenada': { + offset: -4, + hem: 'n' + }, + 'america/guadeloupe': { + offset: -4, + hem: 'n' + }, + 'america/guatemala': { + offset: -6, + hem: 'n' + }, + 'america/guayaquil': { + offset: -5, + hem: 'n' + }, + 'america/guyana': { + offset: -4, + hem: 'n' + }, + 'america/halifax': { + offset: -3, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/havana': { + offset: -4, + hem: 'n', + dst: '03/12:00->11/05:01' + }, + 'america/hermosillo': { + offset: -7, + hem: 'n' + }, + 'america/indiana': { + offset: -4, + hem: 'n', + dst: '03/12:03->11/05:01' + }, + 'america/indianapolis': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/inuvik': { + offset: -6, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/iqaluit': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/jamaica': { + offset: -5, + hem: 'n' + }, + 'america/jujuy': { + offset: -3, + hem: 's' + }, + 'america/juneau': { + offset: -8, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/kentucky': { + offset: -4, + hem: 'n', + dst: '03/12:03->11/05:01' + }, + 'america/kralendijk': { + offset: -4, + hem: 'n' + }, + 'america/la_paz': { + offset: -4, + hem: 's' + }, + 'america/lima': { + offset: -5, + hem: 's' + }, + 'america/los_angeles': { + offset: -7, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/louisville': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/lower_princes': { + offset: -4, + hem: 'n' + }, + 'america/maceio': { + offset: -3, + hem: 'n' + }, + 'america/managua': { + offset: -6, + hem: 'n' + }, + 'america/manaus': { + offset: -4, + hem: 's' + }, + 'america/marigot': { + offset: -4, + hem: 'n' + }, + 'america/martinique': { + offset: -4, + hem: 'n' + }, + 'america/matamoros': { + offset: -5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/mazatlan': { + offset: -7, + hem: 'n' + }, + 'america/mendoza': { + offset: -3, + hem: 's' + }, + 'america/menominee': { + offset: -5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/merida': { + offset: -6, + hem: 'n' + }, + 'america/metlakatla': { + offset: -8, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/mexico_city': { + offset: -6, + hem: 'n' + }, + 'america/miquelon': { + offset: -2, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/moncton': { + offset: -3, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/monterrey': { + offset: -6, + hem: 'n' + }, + 'america/montevideo': { + offset: -3, + hem: 's' + }, + 'america/montreal': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/montserrat': { + offset: -4, + hem: 'n' + }, + 'america/nassau': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/new_york': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/nipigon': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/nome': { + offset: -8, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/noronha': { + offset: -2, + hem: 'n' + }, + 'america/north_dakota': { + offset: -5, + hem: 'n', + dst: '03/12:03->11/05:01' + }, + 'america/ojinaga': { + offset: -6, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/ciudad_juarez': { + offset: -6, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/panama': { + offset: -5, + hem: 'n' + }, + 'america/pangnirtung': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/paramaribo': { + offset: -3, + hem: 'n' + }, + 'america/phoenix': { + offset: -7, + hem: 'n' + }, + 'america/port-au-prince': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/port_of_spain': { + offset: -4, + hem: 'n' + }, + 'america/porto_velho': { + offset: -4, + hem: 'n' + }, + 'america/puerto_rico': { + offset: -4, + hem: 'n' + }, + 'america/punta_arenas': { + offset: -3, + hem: 's' + }, + 'america/rainy_river': { + offset: -5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/rankin_inlet': { + offset: -5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/recife': { + offset: -3, + hem: 'n' + }, + 'america/regina': { + offset: -6, + hem: 'n' + }, + 'america/resolute': { + offset: -5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/rio_branco': { + offset: -5, + hem: 's' + }, + 'america/santa_isabel': { + offset: -7, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/santarem': { + offset: -3, + hem: 'n' + }, + 'america/santiago': { + offset: -4, + hem: 's', + dst: '04/01:24->09/03:00' + }, + 'america/santo_domingo': { + offset: -4, + hem: 'n' + }, + 'america/sao_paulo': { + offset: -3, + hem: 's' + }, + 'america/scoresbysund': { + offset: 0, + hem: 'n', + dst: '03/26:00->10/29:01' + }, + 'america/sitka': { + offset: -8, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/st_barthelemy': { + offset: -4, + hem: 'n' + }, + 'america/st_johns': { + offset: -2.5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/st_kitts': { + offset: -4, + hem: 'n' + }, + 'america/st_lucia': { + offset: -4, + hem: 'n' + }, + 'america/st_thomas': { + offset: -4, + hem: 'n' + }, + 'america/st_vincent': { + offset: -4, + hem: 'n' + }, + 'america/swift_current': { + offset: -6, + hem: 'n' + }, + 'america/tegucigalpa': { + offset: -6, + hem: 'n' + }, + 'america/thule': { + offset: -3, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/thunder_bay': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/tijuana': { + offset: -7, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/toronto': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/tortola': { + offset: -4, + hem: 'n' + }, + 'america/vancouver': { + offset: -7, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/whitehorse': { + offset: -7, + hem: 'n' + }, + 'america/winnipeg': { + offset: -5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/yakutat': { + offset: -8, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/yellowknife': { + offset: -6, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'antarctica/casey': { + offset: 8, + hem: 's', + dst: '03/13:01->10/02:00' + }, + 'antarctica/davis': { + offset: 7, + hem: 's' + }, + 'antarctica/dumontdurville': { + offset: 10, + hem: 's' + }, + 'antarctica/macquarie': { + offset: 11, + hem: 's', + dst: '04/02:03->10/01:02' + }, + 'antarctica/mawson': { + offset: 5, + hem: 's' + }, + 'antarctica/mcmurdo': { + offset: 12, + hem: 's', + dst: '04/02:03->09/24:02' + }, + 'antarctica/palmer': { + offset: -3, + hem: 's' + }, + 'antarctica/rothera': { + offset: -3, + hem: 's' + }, + 'antarctica/syowa': { + offset: 3, + hem: 's' + }, + 'antarctica/troll': { + offset: 2, + hem: 's', + dst: '03/26:02->10/29:02' + }, + 'antarctica/vostok': { + offset: 6, + hem: 's' + }, + 'arctic/longyearbyen': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'asia/aden': { + offset: 3, + hem: 'n' + }, + 'asia/almaty': { + offset: 6, + hem: 'n' + }, + 'asia/amman': { + offset: 3, + hem: 'n' + }, + 'asia/anadyr': { + offset: 12, + hem: 'n' + }, + 'asia/aqtau': { + offset: 5, + hem: 'n' + }, + 'asia/aqtobe': { + offset: 5, + hem: 'n' + }, + 'asia/ashgabat': { + offset: 5, + hem: 'n' + }, + 'asia/atyrau': { + offset: 5, + hem: 'n' + }, + 'asia/baghdad': { + offset: 3, + hem: 'n' + }, + 'asia/bahrain': { + offset: 3, + hem: 'n' + }, + 'asia/baku': { + offset: 4, + hem: 'n' + }, + 'asia/bangkok': { + offset: 7, + hem: 'n' + }, + 'asia/barnaul': { + offset: 7, + hem: 'n' + }, + 'asia/beirut': { + offset: 3, + hem: 'n', + dst: '03/26:00->10/28:24' + }, + 'asia/bishkek': { + offset: 6, + hem: 'n' + }, + 'asia/brunei': { + offset: 8, + hem: 'n' + }, + 'asia/kolkata': { + offset: 5.5, + hem: 'n' + }, + 'asia/chita': { + offset: 9, + hem: 'n' + }, + 'asia/choibalsan': { + offset: 8, + hem: 'n' + }, + 'asia/colombo': { + offset: 5.5, + hem: 'n' + }, + 'asia/damascus': { + offset: 3, + hem: 'n' + }, + 'asia/dhaka': { + offset: 6, + hem: 'n' + }, + 'asia/dili': { + offset: 9, + hem: 's' + }, + 'asia/dubai': { + offset: 4, + hem: 'n' + }, + 'asia/dushanbe': { + offset: 5, + hem: 'n' + }, + 'asia/famagusta': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'asia/gaza': { + offset: 3, + hem: 'n', + dst: '04/29:02->10/28:02' + }, + 'asia/hebron': { + offset: 3, + hem: 'n', + dst: '04/29:02->10/28:02' + }, + 'asia/hong_kong': { + offset: 8, + hem: 'n' + }, + 'asia/hovd': { + offset: 7, + hem: 'n' + }, + 'asia/irkutsk': { + offset: 8, + hem: 'n' + }, + 'asia/jakarta': { + offset: 7, + hem: 's' + }, + 'asia/jayapura': { + offset: 9, + hem: 's' + }, + 'asia/jerusalem': { + offset: 3, + hem: 'n', + dst: '03/24:02->10/29:02' + }, + 'asia/kabul': { + offset: 4.5, + hem: 'n' + }, + 'asia/kamchatka': { + offset: 12, + hem: 'n' + }, + 'asia/karachi': { + offset: 5, + hem: 'n' + }, + 'asia/kathmandu': { + offset: 5.75, + hem: 'n' + }, + 'asia/khandyga': { + offset: 9, + hem: 'n' + }, + 'asia/krasnoyarsk': { + offset: 7, + hem: 'n' + }, + 'asia/kuala_lumpur': { + offset: 8, + hem: 's' + }, + 'asia/kuching': { + offset: 8, + hem: 'n' + }, + 'asia/kuwait': { + offset: 3, + hem: 'n' + }, + 'asia/macau': { + offset: 8, + hem: 'n' + }, + 'asia/magadan': { + offset: 11, + hem: 'n' + }, + 'asia/makassar': { + offset: 8, + hem: 's' + }, + 'asia/manila': { + offset: 8, + hem: 'n' + }, + 'asia/muscat': { + offset: 4, + hem: 'n' + }, + 'asia/nicosia': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'asia/novokuznetsk': { + offset: 7, + hem: 'n' }, - "asia/novosibirsk": { - "offset": 7, - "hem": "n" + 'asia/novosibirsk': { + offset: 7, + hem: 'n' }, - "asia/omsk": { - "offset": 6, - "hem": "n" + 'asia/omsk': { + offset: 6, + hem: 'n' }, - "asia/oral": { - "offset": 5, - "hem": "n" + 'asia/oral': { + offset: 5, + hem: 'n' }, - "asia/phnom_penh": { - "offset": 7, - "hem": "n" + 'asia/phnom_penh': { + offset: 7, + hem: 'n' }, - "asia/pontianak": { - "offset": 7, - "hem": "n" + 'asia/pontianak': { + offset: 7, + hem: 'n' }, - "asia/pyongyang": { - "offset": 9, - "hem": "n" + 'asia/pyongyang': { + offset: 9, + hem: 'n' }, - "asia/qatar": { - "offset": 3, - "hem": "n" + 'asia/qatar': { + offset: 3, + hem: 'n' }, - "asia/qyzylorda": { - "offset": 6, - "hem": "n" + 'asia/qyzylorda': { + offset: 6, + hem: 'n' }, - "asia/qostanay": { - "offset": 6, - "hem": "n" - }, - "asia/yangon": { - "offset": 6.5, - "hem": "n" - }, - "asia/riyadh": { - "offset": 3, - "hem": "n" - }, - "asia/ho_chi_minh": { - "offset": 7, - "hem": "n" - }, - "asia/sakhalin": { - "offset": 11, - "hem": "n" - }, - "asia/samarkand": { - "offset": 5, - "hem": "n" - }, - "asia/seoul": { - "offset": 9, - "hem": "n" - }, - "asia/shanghai": { - "offset": 8, - "hem": "n" - }, - "asia/singapore": { - "offset": 8, - "hem": "s" - }, - "asia/srednekolymsk": { - "offset": 12, - "hem": "n" - }, - "asia/taipei": { - "offset": 8, - "hem": "n" - }, - "asia/tashkent": { - "offset": 5, - "hem": "n" - }, - "asia/tbilisi": { - "offset": 4, - "hem": "n" - }, - "asia/tehran": { - "offset": 3.5, - "hem": "n", - }, - "asia/thimphu": { - "offset": 6, - "hem": "n" - }, - "asia/tokyo": { - "offset": 9, - "hem": "n" - }, - "asia/tomsk": { - "offset": 7, - "hem": "n" - }, - "asia/ulaanbaatar": { - "offset": 8, - "hem": "n" - }, - "asia/urumqi": { - "offset": 6, - "hem": "n" - }, - "asia/ust-nera": { - "offset": 10, - "hem": "n" - }, - "asia/vientiane": { - "offset": 7, - "hem": "n" - }, - "asia/vladivostok": { - "offset": 10, - "hem": "n" - }, - "asia/yakutsk": { - "offset": 9, - "hem": "n" - }, - "asia/yekaterinburg": { - "offset": 5, - "hem": "n" - }, - "asia/yerevan": { - "offset": 4, - "hem": "n" - }, - "atlantic/azores": { - "offset": 0, - "hem": "n", - "dst": "03/26:00->10/29:01" - }, - "atlantic/bermuda": { - "offset": -3, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "atlantic/canary": { - "offset": 1, - "hem": "n", - "dst": "03/26:01->10/29:02" - }, - "atlantic/cape_verde": { - "offset": -1, - "hem": "n" - }, - "atlantic/faroe": { - "offset": 1, - "hem": "n", - "dst": "03/26:01->10/29:02" - }, - "atlantic/madeira": { - "offset": 1, - "hem": "n", - "dst": "03/26:01->10/29:02" - }, - "atlantic/reykjavik": { - "offset": 0, - "hem": "n" - }, - "atlantic/south_georgia": { - "offset": -2, - "hem": "n" - }, - "atlantic/st_helena": { - "offset": 0, - "hem": "n" - }, - "atlantic/stanley": { - "offset": -3, - "hem": "s" - }, - "australia/adelaide": { - "offset": 9.5, - "hem": "s", - "dst": "04/02:03->10/01:02" - }, - "australia/brisbane": { - "offset": 10, - "hem": "s" - }, - "australia/broken_hill": { - "offset": 9.5, - "hem": "s", - "dst": "04/02:03->10/01:02" - }, - "australia/currie": { - "offset": 10, - "hem": "s", - "dst": "04/02:03->10/01:02" - }, - "australia/darwin": { - "offset": 9.5, - "hem": "s" - }, - "australia/eucla": { - "offset": 8.75, - "hem": "s" - }, - "australia/hobart": { - "offset": 10, - "hem": "s", - "dst": "04/02:03->10/01:02" - }, - "australia/lindeman": { - "offset": 10, - "hem": "s" - }, - "australia/lord_howe": { - "offset": 10.5, - "hem": "s", - "dst": "04/02:01->10/01:02" - }, - "australia/melbourne": { - "offset": 10, - "hem": "s", - "dst": "04/02:03->10/01:02" - }, - "australia/perth": { - "offset": 8, - "hem": "s" - }, - "australia/sydney": { - "offset": 10, - "hem": "s", - "dst": "04/02:03->10/01:02" - }, - "europe/amsterdam": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/andorra": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/astrakhan": { - "offset": 4, - "hem": "n" - }, - "europe/athens": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "europe/belgrade": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/berlin": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/bratislava": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/brussels": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/bucharest": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "europe/budapest": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/busingen": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/chisinau": { - "offset": 3, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/copenhagen": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/dublin": { - "offset": 1, - "hem": "n", - "dst": "03/26:01->10/29:02" - }, - "europe/gibraltar": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/guernsey": { - "offset": 1, - "hem": "n", - "dst": "03/26:01->10/29:02" - }, - "europe/helsinki": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "europe/isle_of_man": { - "offset": 1, - "hem": "n", - "dst": "03/26:01->10/29:02" - }, - "europe/istanbul": { - "offset": 3, - "hem": "n" - }, - "europe/jersey": { - "offset": 1, - "hem": "n", - "dst": "03/26:01->10/29:02" - }, - "europe/kaliningrad": { - "offset": 2, - "hem": "n" - }, - "europe/kirov": { - "offset": 3, - "hem": "n" - }, - "europe/kyiv": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "europe/lisbon": { - "offset": 1, - "hem": "n", - "dst": "03/26:01->10/29:02" - }, - "europe/ljubljana": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/london": { - "offset": 1, - "hem": "n", - "dst": "03/26:01->10/29:02" - }, - "europe/luxembourg": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/madrid": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/malta": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/mariehamn": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "europe/minsk": { - "offset": 3, - "hem": "n" - }, - "europe/monaco": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/moscow": { - "offset": 3, - "hem": "n" - }, - "europe/oslo": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/paris": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/podgorica": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/prague": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/riga": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "europe/rome": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/samara": { - "offset": 4, - "hem": "n" - }, - "europe/saratov": { - "offset": 4, - "hem": "n" - }, - "europe/san_marino": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/sarajevo": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/simferopol": { - "offset": 3, - "hem": "n" - }, - "europe/skopje": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/sofia": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "europe/stockholm": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/tallinn": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "europe/tirane": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/ulyanovsk": { - "offset": 4, - "hem": "n" - }, - "europe/uzhgorod": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "europe/vaduz": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/vatican": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/vienna": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/vilnius": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "europe/volgograd": { - "offset": 4, - "hem": "n" - }, - "europe/warsaw": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/zagreb": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "europe/zaporozhye": { - "offset": 3, - "hem": "n", - "dst": "03/26:03->10/29:04" - }, - "europe/zurich": { - "offset": 2, - "hem": "n", - "dst": "03/26:02->10/29:03" - }, - "indian/antananarivo": { - "offset": 3, - "hem": "s" - }, - "indian/chagos": { - "offset": 6, - "hem": "n" - }, - "indian/christmas": { - "offset": 7, - "hem": "s" - }, - "indian/cocos": { - "offset": 6.5, - "hem": "n" - }, - "indian/comoro": { - "offset": 3, - "hem": "n" - }, - "indian/kerguelen": { - "offset": 5, - "hem": "s" - }, - "indian/mahe": { - "offset": 4, - "hem": "n" - }, - "indian/maldives": { - "offset": 5, - "hem": "n" - }, - "indian/mauritius": { - "offset": 4, - "hem": "n" - }, - "indian/mayotte": { - "offset": 3, - "hem": "n" - }, - "indian/reunion": { - "offset": 4, - "hem": "s" - }, - "pacific/apia": { - "offset": 13, - "hem": "s" - }, - "pacific/auckland": { - "offset": 12, - "hem": "s", - "dst": "04/02:03->09/24:02" - }, - "pacific/bougainville": { - "offset": 11, - "hem": "s" - }, - "pacific/chatham": { - "offset": 12.75, - "hem": "s", - "dst": "04/02:03->04/02:02" - }, - "pacific/easter": { - "offset": -6, - "hem": "s", - "dst": "04/01:22->09/02:22" - }, - "pacific/efate": { - "offset": 11, - "hem": "n" - }, - "pacific/enderbury": { - "offset": 13, - "hem": "n" - }, - "pacific/kanton": { - "offset": 13, - "hem": "n" - }, - "america/atikokan": { - "offset": -5, - "hem": "n" - }, - "pacific/fakaofo": { - "offset": 13, - "hem": "n" - }, - "pacific/fiji": { - "offset": 12, - "hem": "s" - }, - "pacific/funafuti": { - "offset": 12, - "hem": "n" - }, - "pacific/galapagos": { - "offset": -6, - "hem": "n" - }, - "pacific/gambier": { - "offset": -9, - "hem": "n" - }, - "pacific/guadalcanal": { - "offset": 11, - "hem": "n" - }, - "pacific/guam": { - "offset": 10, - "hem": "n" - }, - "pacific/honolulu": { - "offset": -10, - "hem": "n" - }, - "pacific/johnston": { - "offset": -10, - "hem": "n" - }, - "pacific/kiritimati": { - "offset": 14, - "hem": "n" - }, - "pacific/kosrae": { - "offset": 11, - "hem": "n" - }, - "pacific/kwajalein": { - "offset": 12, - "hem": "n" - }, - "pacific/majuro": { - "offset": 12, - "hem": "n" - }, - "pacific/marquesas": { - "offset": -9.5, - "hem": "n" - }, - "pacific/midway": { - "offset": -11, - "hem": "n" - }, - "pacific/nauru": { - "offset": 12, - "hem": "n" - }, - "pacific/niue": { - "offset": -11, - "hem": "n" - }, - "pacific/norfolk": { - "offset": 11.5, - "hem": "n", - "dst": "04/02:03->10/01:02" - }, - "pacific/noumea": { - "offset": 11, - "hem": "n" - }, - "pacific/pago_pago": { - "offset": -11, - "hem": "n" - }, - "pacific/palau": { - "offset": 9, - "hem": "n" - }, - "pacific/pitcairn": { - "offset": -8, - "hem": "n" - }, - "pacific/pohnpei": { - "offset": 11, - "hem": "n" - }, - "pacific/port_moresby": { - "offset": 10, - "hem": "s" - }, - "pacific/rarotonga": { - "offset": -10, - "hem": "n" - }, - "pacific/saipan": { - "offset": 10, - "hem": "n" - }, - "pacific/tahiti": { - "offset": -10, - "hem": "n" - }, - "pacific/tarawa": { - "offset": 12, - "hem": "n" - }, - "pacific/tongatapu": { - "offset": 13, - "hem": "s" - }, - "pacific/chuuk": { - "offset": 10, - "hem": "n" - }, - "pacific/wake": { - "offset": 12, - "hem": "n" - }, - "pacific/wallis": { - "offset": 12, - "hem": "n" - }, - "etc/gmt": { - "offset": 0, - "hem": "n" - }, - "etc/utc": { - "offset": 0, - "hem": "n" - }, - "america/argentina/la_rioja": { - "offset": -3, - "hem": "s" - }, - "america/argentina/rio_gallegos": { - "offset": -3, - "hem": "s" - }, - "america/argentina/salta": { - "offset": -3, - "hem": "s" - }, - "america/argentina/san_juan": { - "offset": -3, - "hem": "s" - }, - "america/argentina/san_luis": { - "offset": -3, - "hem": "s" - }, - "america/argentina/tucuman": { - "offset": -3, - "hem": "s" - }, - "america/argentina/ushuaia": { - "offset": -3, - "hem": "s" - }, - "america/indiana/knox": { - "offset": -5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/indiana/tell_city": { - "offset": -5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/north_dakota/beulah": { - "offset": -5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/north_dakota/center": { - "offset": -5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/north_dakota/new_salem": { - "offset": -5, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/indiana/marengo": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/indiana/petersburg": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/indiana/vevay": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/indiana/vincennes": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/indiana/winamac": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" - }, - "america/kentucky/monticello": { - "offset": -4, - "hem": "n", - "dst": "03/12:02->11/05:02" + 'asia/qostanay': { + offset: 6, + hem: 'n' + }, + 'asia/yangon': { + offset: 6.5, + hem: 'n' + }, + 'asia/riyadh': { + offset: 3, + hem: 'n' + }, + 'asia/ho_chi_minh': { + offset: 7, + hem: 'n' + }, + 'asia/sakhalin': { + offset: 11, + hem: 'n' + }, + 'asia/samarkand': { + offset: 5, + hem: 'n' + }, + 'asia/seoul': { + offset: 9, + hem: 'n' + }, + 'asia/shanghai': { + offset: 8, + hem: 'n' + }, + 'asia/singapore': { + offset: 8, + hem: 's' + }, + 'asia/srednekolymsk': { + offset: 12, + hem: 'n' + }, + 'asia/taipei': { + offset: 8, + hem: 'n' + }, + 'asia/tashkent': { + offset: 5, + hem: 'n' + }, + 'asia/tbilisi': { + offset: 4, + hem: 'n' + }, + 'asia/tehran': { + offset: 3.5, + hem: 'n' + }, + 'asia/thimphu': { + offset: 6, + hem: 'n' + }, + 'asia/tokyo': { + offset: 9, + hem: 'n' + }, + 'asia/tomsk': { + offset: 7, + hem: 'n' + }, + 'asia/ulaanbaatar': { + offset: 8, + hem: 'n' + }, + 'asia/urumqi': { + offset: 6, + hem: 'n' + }, + 'asia/ust-nera': { + offset: 10, + hem: 'n' + }, + 'asia/vientiane': { + offset: 7, + hem: 'n' + }, + 'asia/vladivostok': { + offset: 10, + hem: 'n' + }, + 'asia/yakutsk': { + offset: 9, + hem: 'n' + }, + 'asia/yekaterinburg': { + offset: 5, + hem: 'n' + }, + 'asia/yerevan': { + offset: 4, + hem: 'n' + }, + 'atlantic/azores': { + offset: 0, + hem: 'n', + dst: '03/26:00->10/29:01' + }, + 'atlantic/bermuda': { + offset: -3, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'atlantic/canary': { + offset: 1, + hem: 'n', + dst: '03/26:01->10/29:02' + }, + 'atlantic/cape_verde': { + offset: -1, + hem: 'n' + }, + 'atlantic/faroe': { + offset: 1, + hem: 'n', + dst: '03/26:01->10/29:02' + }, + 'atlantic/madeira': { + offset: 1, + hem: 'n', + dst: '03/26:01->10/29:02' + }, + 'atlantic/reykjavik': { + offset: 0, + hem: 'n' + }, + 'atlantic/south_georgia': { + offset: -2, + hem: 'n' + }, + 'atlantic/st_helena': { + offset: 0, + hem: 'n' + }, + 'atlantic/stanley': { + offset: -3, + hem: 's' + }, + 'australia/adelaide': { + offset: 9.5, + hem: 's', + dst: '04/02:03->10/01:02' + }, + 'australia/brisbane': { + offset: 10, + hem: 's' + }, + 'australia/broken_hill': { + offset: 9.5, + hem: 's', + dst: '04/02:03->10/01:02' + }, + 'australia/currie': { + offset: 10, + hem: 's', + dst: '04/02:03->10/01:02' + }, + 'australia/darwin': { + offset: 9.5, + hem: 's' + }, + 'australia/eucla': { + offset: 8.75, + hem: 's' + }, + 'australia/hobart': { + offset: 10, + hem: 's', + dst: '04/02:03->10/01:02' + }, + 'australia/lindeman': { + offset: 10, + hem: 's' + }, + 'australia/lord_howe': { + offset: 10.5, + hem: 's', + dst: '04/02:01->10/01:02' + }, + 'australia/melbourne': { + offset: 10, + hem: 's', + dst: '04/02:03->10/01:02' + }, + 'australia/perth': { + offset: 8, + hem: 's' + }, + 'australia/sydney': { + offset: 10, + hem: 's', + dst: '04/02:03->10/01:02' + }, + 'europe/amsterdam': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/andorra': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/astrakhan': { + offset: 4, + hem: 'n' + }, + 'europe/athens': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'europe/belgrade': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/berlin': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/bratislava': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/brussels': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/bucharest': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'europe/budapest': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/busingen': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/chisinau': { + offset: 3, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/copenhagen': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/dublin': { + offset: 1, + hem: 'n', + dst: '03/26:01->10/29:02' + }, + 'europe/gibraltar': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/guernsey': { + offset: 1, + hem: 'n', + dst: '03/26:01->10/29:02' + }, + 'europe/helsinki': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'europe/isle_of_man': { + offset: 1, + hem: 'n', + dst: '03/26:01->10/29:02' + }, + 'europe/istanbul': { + offset: 3, + hem: 'n' + }, + 'europe/jersey': { + offset: 1, + hem: 'n', + dst: '03/26:01->10/29:02' + }, + 'europe/kaliningrad': { + offset: 2, + hem: 'n' + }, + 'europe/kirov': { + offset: 3, + hem: 'n' + }, + 'europe/kyiv': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'europe/lisbon': { + offset: 1, + hem: 'n', + dst: '03/26:01->10/29:02' + }, + 'europe/ljubljana': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/london': { + offset: 1, + hem: 'n', + dst: '03/26:01->10/29:02' + }, + 'europe/luxembourg': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/madrid': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/malta': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/mariehamn': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'europe/minsk': { + offset: 3, + hem: 'n' + }, + 'europe/monaco': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/moscow': { + offset: 3, + hem: 'n' + }, + 'europe/oslo': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/paris': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/podgorica': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/prague': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/riga': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'europe/rome': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/samara': { + offset: 4, + hem: 'n' + }, + 'europe/saratov': { + offset: 4, + hem: 'n' + }, + 'europe/san_marino': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/sarajevo': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/simferopol': { + offset: 3, + hem: 'n' + }, + 'europe/skopje': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/sofia': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'europe/stockholm': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/tallinn': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'europe/tirane': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/ulyanovsk': { + offset: 4, + hem: 'n' + }, + 'europe/uzhgorod': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'europe/vaduz': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/vatican': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/vienna': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/vilnius': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'europe/volgograd': { + offset: 4, + hem: 'n' + }, + 'europe/warsaw': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/zagreb': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'europe/zaporozhye': { + offset: 3, + hem: 'n', + dst: '03/26:03->10/29:04' + }, + 'europe/zurich': { + offset: 2, + hem: 'n', + dst: '03/26:02->10/29:03' + }, + 'indian/antananarivo': { + offset: 3, + hem: 's' + }, + 'indian/chagos': { + offset: 6, + hem: 'n' + }, + 'indian/christmas': { + offset: 7, + hem: 's' + }, + 'indian/cocos': { + offset: 6.5, + hem: 'n' + }, + 'indian/comoro': { + offset: 3, + hem: 'n' + }, + 'indian/kerguelen': { + offset: 5, + hem: 's' + }, + 'indian/mahe': { + offset: 4, + hem: 'n' + }, + 'indian/maldives': { + offset: 5, + hem: 'n' + }, + 'indian/mauritius': { + offset: 4, + hem: 'n' + }, + 'indian/mayotte': { + offset: 3, + hem: 'n' + }, + 'indian/reunion': { + offset: 4, + hem: 's' + }, + 'pacific/apia': { + offset: 13, + hem: 's' + }, + 'pacific/auckland': { + offset: 12, + hem: 's', + dst: '04/02:03->09/24:02' + }, + 'pacific/bougainville': { + offset: 11, + hem: 's' + }, + 'pacific/chatham': { + offset: 12.75, + hem: 's', + dst: '04/02:03->04/02:02' + }, + 'pacific/easter': { + offset: -6, + hem: 's', + dst: '04/01:22->09/02:22' + }, + 'pacific/efate': { + offset: 11, + hem: 'n' + }, + 'pacific/enderbury': { + offset: 13, + hem: 'n' + }, + 'pacific/kanton': { + offset: 13, + hem: 'n' + }, + 'america/atikokan': { + offset: -5, + hem: 'n' + }, + 'pacific/fakaofo': { + offset: 13, + hem: 'n' + }, + 'pacific/fiji': { + offset: 12, + hem: 's' + }, + 'pacific/funafuti': { + offset: 12, + hem: 'n' + }, + 'pacific/galapagos': { + offset: -6, + hem: 'n' + }, + 'pacific/gambier': { + offset: -9, + hem: 'n' + }, + 'pacific/guadalcanal': { + offset: 11, + hem: 'n' + }, + 'pacific/guam': { + offset: 10, + hem: 'n' + }, + 'pacific/honolulu': { + offset: -10, + hem: 'n' + }, + 'pacific/johnston': { + offset: -10, + hem: 'n' + }, + 'pacific/kiritimati': { + offset: 14, + hem: 'n' + }, + 'pacific/kosrae': { + offset: 11, + hem: 'n' + }, + 'pacific/kwajalein': { + offset: 12, + hem: 'n' + }, + 'pacific/majuro': { + offset: 12, + hem: 'n' + }, + 'pacific/marquesas': { + offset: -9.5, + hem: 'n' + }, + 'pacific/midway': { + offset: -11, + hem: 'n' + }, + 'pacific/nauru': { + offset: 12, + hem: 'n' + }, + 'pacific/niue': { + offset: -11, + hem: 'n' + }, + 'pacific/norfolk': { + offset: 11.5, + hem: 'n', + dst: '04/02:03->10/01:02' + }, + 'pacific/noumea': { + offset: 11, + hem: 'n' + }, + 'pacific/pago_pago': { + offset: -11, + hem: 'n' + }, + 'pacific/palau': { + offset: 9, + hem: 'n' + }, + 'pacific/pitcairn': { + offset: -8, + hem: 'n' + }, + 'pacific/pohnpei': { + offset: 11, + hem: 'n' + }, + 'pacific/port_moresby': { + offset: 10, + hem: 's' + }, + 'pacific/rarotonga': { + offset: -10, + hem: 'n' + }, + 'pacific/saipan': { + offset: 10, + hem: 'n' + }, + 'pacific/tahiti': { + offset: -10, + hem: 'n' + }, + 'pacific/tarawa': { + offset: 12, + hem: 'n' + }, + 'pacific/tongatapu': { + offset: 13, + hem: 's' + }, + 'pacific/chuuk': { + offset: 10, + hem: 'n' + }, + 'pacific/wake': { + offset: 12, + hem: 'n' + }, + 'pacific/wallis': { + offset: 12, + hem: 'n' + }, + 'etc/gmt': { + offset: 0, + hem: 'n' + }, + 'etc/utc': { + offset: 0, + hem: 'n' + }, + 'america/argentina/la_rioja': { + offset: -3, + hem: 's' + }, + 'america/argentina/rio_gallegos': { + offset: -3, + hem: 's' + }, + 'america/argentina/salta': { + offset: -3, + hem: 's' + }, + 'america/argentina/san_juan': { + offset: -3, + hem: 's' + }, + 'america/argentina/san_luis': { + offset: -3, + hem: 's' + }, + 'america/argentina/tucuman': { + offset: -3, + hem: 's' + }, + 'america/argentina/ushuaia': { + offset: -3, + hem: 's' + }, + 'america/indiana/knox': { + offset: -5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/indiana/tell_city': { + offset: -5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/north_dakota/beulah': { + offset: -5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/north_dakota/center': { + offset: -5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/north_dakota/new_salem': { + offset: -5, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/indiana/marengo': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/indiana/petersburg': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/indiana/vevay': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/indiana/vincennes': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/indiana/winamac': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' + }, + 'america/kentucky/monticello': { + offset: -4, + hem: 'n', + dst: '03/12:02->11/05:02' } -} \ No newline at end of file +} From 1ef9b8204ede6d71618ee32f73f3f66dec8b5d12 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Mon, 11 Dec 2023 11:33:33 -0500 Subject: [PATCH 07/11] 2024 zonefile --- scratch.js | 13 ++ scripts/updateZonefile.js | 2 +- zonefile/iana.js | 306 ++++++++++++++++++++------------------ 3 files changed, 172 insertions(+), 149 deletions(-) diff --git a/scratch.js b/scratch.js index f02ff162..3be6ec9b 100644 --- a/scratch.js +++ b/scratch.js @@ -11,3 +11,16 @@ console.log(s.timezone()) // s = spacetime(null, 'America/Toronto') // console.log(s.time()) // console.log(s.timezone()) + +/* +bahia_banderas +chihuahua +mazatlan +merida +mexico_city +monterrey +amman +damascus +tehran +fiji +*/ diff --git a/scripts/updateZonefile.js b/scripts/updateZonefile.js index f8ed9cd0..abbd2028 100644 --- a/scripts/updateZonefile.js +++ b/scripts/updateZonefile.js @@ -2,7 +2,7 @@ import sh from 'shelljs' sh.config.silent = true import data from '../zonefile/iana.js' import { writeFileSync } from 'fs' -const year = 2023//new Date().getFullYear() +const year = 2024 //new Date().getFullYear() // /usr/share/zoneinfo only stores changes, and will use the most-recent change // see /usr/share/zoneinfo/Africa/Algiers - has changes scheduled for 2038 diff --git a/zonefile/iana.js b/zonefile/iana.js index 9384116a..f97b3cee 100644 --- a/zonefile/iana.js +++ b/zonefile/iana.js @@ -59,12 +59,12 @@ export default { 'africa/casablanca': { offset: 0, hem: 's', - dst: '03/19:03->04/23:02' + dst: '03/10:03->04/14:02' }, 'africa/ceuta': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'africa/conakry': { offset: 0, @@ -89,7 +89,7 @@ export default { 'africa/el_aaiun': { offset: 0, hem: 's', - dst: '03/19:03->04/23:02' + dst: '03/10:03->04/14:02' }, 'africa/freetown': { offset: 0, @@ -218,12 +218,12 @@ export default { 'america/adak': { offset: -9, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/anchorage': { offset: -8, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/anguilla': { offset: -4, @@ -248,7 +248,7 @@ export default { 'america/asuncion': { offset: -4, hem: 's', - dst: '03/25:24->10/01:00' + dst: '03/23:24->10/06:00' }, 'america/bahia': { offset: -3, @@ -256,7 +256,8 @@ export default { }, 'america/bahia_banderas': { offset: -6, - hem: 'n' + hem: 'n', + dst: '04/07:02->10/27:02' }, 'america/barbados': { offset: -4, @@ -285,7 +286,7 @@ export default { 'america/boise': { offset: -6, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/buenos_aires': { offset: -3, @@ -294,7 +295,7 @@ export default { 'america/cambridge_bay': { offset: -6, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/campo_grande': { offset: -4, @@ -323,11 +324,12 @@ export default { 'america/chicago': { offset: -5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/chihuahua': { offset: -6, - hem: 'n' + hem: 'n', + dst: '04/07:02->10/27:02' }, 'america/coral_harbour': { offset: -5, @@ -368,12 +370,12 @@ export default { 'america/denver': { offset: -6, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/detroit': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/dominica': { offset: -4, @@ -382,7 +384,7 @@ export default { 'america/edmonton': { offset: -6, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/eirunepe': { offset: -5, @@ -403,22 +405,22 @@ export default { 'america/glace_bay': { offset: -3, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/nuuk': { offset: -2, hem: 'n', - dst: '03/25:22->10/28:24' + dst: '03/30:22->10/26:23' }, 'america/goose_bay': { offset: -3, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/grand_turk': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/grenada': { offset: -4, @@ -443,12 +445,12 @@ export default { 'america/halifax': { offset: -3, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/havana': { offset: -4, hem: 'n', - dst: '03/12:00->11/05:01' + dst: '03/10:00->11/03:01' }, 'america/hermosillo': { offset: -7, @@ -462,17 +464,17 @@ export default { 'america/indianapolis': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/inuvik': { offset: -6, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/iqaluit': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/jamaica': { offset: -5, @@ -485,7 +487,7 @@ export default { 'america/juneau': { offset: -8, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/kentucky': { offset: -4, @@ -507,12 +509,12 @@ export default { 'america/los_angeles': { offset: -7, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/louisville': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/lower_princes': { offset: -4, @@ -541,11 +543,12 @@ export default { 'america/matamoros': { offset: -5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/mazatlan': { offset: -7, - hem: 'n' + hem: 'n', + dst: '04/07:02->10/27:02' }, 'america/mendoza': { offset: -3, @@ -554,34 +557,37 @@ export default { 'america/menominee': { offset: -5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/merida': { offset: -6, - hem: 'n' + hem: 'n', + dst: '04/07:02->10/27:02' }, 'america/metlakatla': { offset: -8, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/mexico_city': { offset: -6, - hem: 'n' + hem: 'n', + dst: '04/07:02->10/27:02' }, 'america/miquelon': { offset: -2, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/moncton': { offset: -3, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/monterrey': { offset: -6, - hem: 'n' + hem: 'n', + dst: '04/07:02->10/27:02' }, 'america/montevideo': { offset: -3, @@ -590,7 +596,7 @@ export default { 'america/montreal': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/montserrat': { offset: -4, @@ -599,22 +605,22 @@ export default { 'america/nassau': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/new_york': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/nipigon': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/nome': { offset: -8, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/noronha': { offset: -2, @@ -628,7 +634,7 @@ export default { 'america/ojinaga': { offset: -6, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/ciudad_juarez': { offset: -6, @@ -642,7 +648,7 @@ export default { 'america/pangnirtung': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/paramaribo': { offset: -3, @@ -655,7 +661,7 @@ export default { 'america/port-au-prince': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/port_of_spain': { offset: -4, @@ -676,12 +682,12 @@ export default { 'america/rainy_river': { offset: -5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/rankin_inlet': { offset: -5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/recife': { offset: -3, @@ -694,7 +700,7 @@ export default { 'america/resolute': { offset: -5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/rio_branco': { offset: -5, @@ -703,7 +709,7 @@ export default { 'america/santa_isabel': { offset: -7, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/santarem': { offset: -3, @@ -712,7 +718,7 @@ export default { 'america/santiago': { offset: -4, hem: 's', - dst: '04/01:24->09/03:00' + dst: '04/06:24->09/08:00' }, 'america/santo_domingo': { offset: -4, @@ -725,12 +731,12 @@ export default { 'america/scoresbysund': { offset: 0, hem: 'n', - dst: '03/26:00->10/29:01' + dst: '03/31:00->10/27:01' }, 'america/sitka': { offset: -8, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/st_barthelemy': { offset: -4, @@ -739,7 +745,7 @@ export default { 'america/st_johns': { offset: -2.5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/st_kitts': { offset: -4, @@ -768,22 +774,22 @@ export default { 'america/thule': { offset: -3, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/thunder_bay': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/tijuana': { offset: -7, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/toronto': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/tortola': { offset: -4, @@ -792,7 +798,7 @@ export default { 'america/vancouver': { offset: -7, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/whitehorse': { offset: -7, @@ -801,17 +807,17 @@ export default { 'america/winnipeg': { offset: -5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/yakutat': { offset: -8, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/yellowknife': { offset: -6, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'antarctica/casey': { offset: 8, @@ -829,7 +835,7 @@ export default { 'antarctica/macquarie': { offset: 11, hem: 's', - dst: '04/02:03->10/01:02' + dst: '04/07:03->10/06:02' }, 'antarctica/mawson': { offset: 5, @@ -838,7 +844,7 @@ export default { 'antarctica/mcmurdo': { offset: 12, hem: 's', - dst: '04/02:03->09/24:02' + dst: '04/07:03->09/29:02' }, 'antarctica/palmer': { offset: -3, @@ -855,7 +861,7 @@ export default { 'antarctica/troll': { offset: 2, hem: 's', - dst: '03/26:02->10/29:02' + dst: '03/31:02->10/27:02' }, 'antarctica/vostok': { offset: 6, @@ -864,7 +870,7 @@ export default { 'arctic/longyearbyen': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'asia/aden': { offset: 3, @@ -876,7 +882,8 @@ export default { }, 'asia/amman': { offset: 3, - hem: 'n' + hem: 'n', + dst: '03/01:00->10/25:01' }, 'asia/anadyr': { offset: 12, @@ -921,7 +928,7 @@ export default { 'asia/beirut': { offset: 3, hem: 'n', - dst: '03/26:00->10/28:24' + dst: '03/31:00->10/26:24' }, 'asia/bishkek': { offset: 6, @@ -949,7 +956,8 @@ export default { }, 'asia/damascus': { offset: 3, - hem: 'n' + hem: 'n', + dst: '03/29:00->10/24:24' }, 'asia/dhaka': { offset: 6, @@ -970,17 +978,17 @@ export default { 'asia/famagusta': { offset: 3, hem: 'n', - dst: '03/26:03->10/29:04' + dst: '03/31:03->10/27:04' }, 'asia/gaza': { offset: 3, hem: 'n', - dst: '04/29:02->10/28:02' + dst: '03/31:00->10/25:01' }, 'asia/hebron': { offset: 3, hem: 'n', - dst: '04/29:02->10/28:02' + dst: '03/31:00->10/25:01' }, 'asia/hong_kong': { offset: 8, @@ -1005,7 +1013,7 @@ export default { 'asia/jerusalem': { offset: 3, hem: 'n', - dst: '03/24:02->10/29:02' + dst: '03/29:02->10/27:02' }, 'asia/kabul': { offset: 4.5, @@ -1066,7 +1074,7 @@ export default { 'asia/nicosia': { offset: 3, hem: 'n', - dst: '03/26:03->10/29:04' + dst: '03/31:03->10/27:04' }, 'asia/novokuznetsk': { offset: 7, @@ -1158,7 +1166,8 @@ export default { }, 'asia/tehran': { offset: 3.5, - hem: 'n' + hem: 'n', + dst: '03/21:00->09/20:24' }, 'asia/thimphu': { offset: 6, @@ -1207,17 +1216,17 @@ export default { 'atlantic/azores': { offset: 0, hem: 'n', - dst: '03/26:00->10/29:01' + dst: '03/31:00->10/27:01' }, 'atlantic/bermuda': { offset: -3, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'atlantic/canary': { offset: 1, hem: 'n', - dst: '03/26:01->10/29:02' + dst: '03/31:01->10/27:02' }, 'atlantic/cape_verde': { offset: -1, @@ -1226,12 +1235,12 @@ export default { 'atlantic/faroe': { offset: 1, hem: 'n', - dst: '03/26:01->10/29:02' + dst: '03/31:01->10/27:02' }, 'atlantic/madeira': { offset: 1, hem: 'n', - dst: '03/26:01->10/29:02' + dst: '03/31:01->10/27:02' }, 'atlantic/reykjavik': { offset: 0, @@ -1252,7 +1261,7 @@ export default { 'australia/adelaide': { offset: 9.5, hem: 's', - dst: '04/02:03->10/01:02' + dst: '04/07:03->10/06:02' }, 'australia/brisbane': { offset: 10, @@ -1261,12 +1270,12 @@ export default { 'australia/broken_hill': { offset: 9.5, hem: 's', - dst: '04/02:03->10/01:02' + dst: '04/07:03->10/06:02' }, 'australia/currie': { offset: 10, hem: 's', - dst: '04/02:03->10/01:02' + dst: '04/07:03->10/06:02' }, 'australia/darwin': { offset: 9.5, @@ -1279,7 +1288,7 @@ export default { 'australia/hobart': { offset: 10, hem: 's', - dst: '04/02:03->10/01:02' + dst: '04/07:03->10/06:02' }, 'australia/lindeman': { offset: 10, @@ -1288,12 +1297,12 @@ export default { 'australia/lord_howe': { offset: 10.5, hem: 's', - dst: '04/02:01->10/01:02' + dst: '04/07:01->10/06:02' }, 'australia/melbourne': { offset: 10, hem: 's', - dst: '04/02:03->10/01:02' + dst: '04/07:03->10/06:02' }, 'australia/perth': { offset: 8, @@ -1302,17 +1311,17 @@ export default { 'australia/sydney': { offset: 10, hem: 's', - dst: '04/02:03->10/01:02' + dst: '04/07:03->10/06:02' }, 'europe/amsterdam': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/andorra': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/astrakhan': { offset: 4, @@ -1321,77 +1330,77 @@ export default { 'europe/athens': { offset: 3, hem: 'n', - dst: '03/26:03->10/29:04' + dst: '03/31:03->10/27:04' }, 'europe/belgrade': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/berlin': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/bratislava': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/brussels': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/bucharest': { offset: 3, hem: 'n', - dst: '03/26:03->10/29:04' + dst: '03/31:03->10/27:04' }, 'europe/budapest': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/busingen': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/chisinau': { offset: 3, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/copenhagen': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/dublin': { offset: 1, hem: 'n', - dst: '03/26:01->10/29:02' + dst: '03/31:01->10/27:02' }, 'europe/gibraltar': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/guernsey': { offset: 1, hem: 'n', - dst: '03/26:01->10/29:02' + dst: '03/31:01->10/27:02' }, 'europe/helsinki': { offset: 3, hem: 'n', - dst: '03/26:03->10/29:04' + dst: '03/31:03->10/27:04' }, 'europe/isle_of_man': { offset: 1, hem: 'n', - dst: '03/26:01->10/29:02' + dst: '03/31:01->10/27:02' }, 'europe/istanbul': { offset: 3, @@ -1400,7 +1409,7 @@ export default { 'europe/jersey': { offset: 1, hem: 'n', - dst: '03/26:01->10/29:02' + dst: '03/31:01->10/27:02' }, 'europe/kaliningrad': { offset: 2, @@ -1418,37 +1427,37 @@ export default { 'europe/lisbon': { offset: 1, hem: 'n', - dst: '03/26:01->10/29:02' + dst: '03/31:01->10/27:02' }, 'europe/ljubljana': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/london': { offset: 1, hem: 'n', - dst: '03/26:01->10/29:02' + dst: '03/31:01->10/27:02' }, 'europe/luxembourg': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/madrid': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/malta': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/mariehamn': { offset: 3, hem: 'n', - dst: '03/26:03->10/29:04' + dst: '03/31:03->10/27:04' }, 'europe/minsk': { offset: 3, @@ -1457,7 +1466,7 @@ export default { 'europe/monaco': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/moscow': { offset: 3, @@ -1466,32 +1475,32 @@ export default { 'europe/oslo': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/paris': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/podgorica': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/prague': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/riga': { offset: 3, hem: 'n', - dst: '03/26:03->10/29:04' + dst: '03/31:03->10/27:04' }, 'europe/rome': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/samara': { offset: 4, @@ -1504,12 +1513,12 @@ export default { 'europe/san_marino': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/sarajevo': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/simferopol': { offset: 3, @@ -1518,27 +1527,27 @@ export default { 'europe/skopje': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/sofia': { offset: 3, hem: 'n', - dst: '03/26:03->10/29:04' + dst: '03/31:03->10/27:04' }, 'europe/stockholm': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/tallinn': { offset: 3, hem: 'n', - dst: '03/26:03->10/29:04' + dst: '03/31:03->10/27:04' }, 'europe/tirane': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/ulyanovsk': { offset: 4, @@ -1547,27 +1556,27 @@ export default { 'europe/uzhgorod': { offset: 3, hem: 'n', - dst: '03/26:03->10/29:04' + dst: '03/31:03->10/27:04' }, 'europe/vaduz': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/vatican': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/vienna': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/vilnius': { offset: 3, hem: 'n', - dst: '03/26:03->10/29:04' + dst: '03/31:03->10/27:04' }, 'europe/volgograd': { offset: 4, @@ -1576,22 +1585,22 @@ export default { 'europe/warsaw': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/zagreb': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'europe/zaporozhye': { offset: 3, hem: 'n', - dst: '03/26:03->10/29:04' + dst: '03/31:03->10/27:04' }, 'europe/zurich': { offset: 2, hem: 'n', - dst: '03/26:02->10/29:03' + dst: '03/31:02->10/27:03' }, 'indian/antananarivo': { offset: 3, @@ -1644,7 +1653,7 @@ export default { 'pacific/auckland': { offset: 12, hem: 's', - dst: '04/02:03->09/24:02' + dst: '04/07:03->09/29:02' }, 'pacific/bougainville': { offset: 11, @@ -1653,12 +1662,12 @@ export default { 'pacific/chatham': { offset: 12.75, hem: 's', - dst: '04/02:03->04/02:02' + dst: '04/07:03->04/07:02' }, 'pacific/easter': { offset: -6, hem: 's', - dst: '04/01:22->09/02:22' + dst: '04/06:22->09/07:22' }, 'pacific/efate': { offset: 11, @@ -1682,7 +1691,8 @@ export default { }, 'pacific/fiji': { offset: 12, - hem: 's' + hem: 's', + dst: '01/14:03->11/10:02' }, 'pacific/funafuti': { offset: 12, @@ -1747,7 +1757,7 @@ export default { 'pacific/norfolk': { offset: 11.5, hem: 'n', - dst: '04/02:03->10/01:02' + dst: '04/07:03->10/06:02' }, 'pacific/noumea': { offset: 11, @@ -1844,56 +1854,56 @@ export default { 'america/indiana/knox': { offset: -5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/indiana/tell_city': { offset: -5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/north_dakota/beulah': { offset: -5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/north_dakota/center': { offset: -5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/north_dakota/new_salem': { offset: -5, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/indiana/marengo': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/indiana/petersburg': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/indiana/vevay': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/indiana/vincennes': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/indiana/winamac': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' }, 'america/kentucky/monticello': { offset: -4, hem: 'n', - dst: '03/12:02->11/05:02' + dst: '03/10:02->11/03:02' } } From 378f480f10987a38c04927a47c4f1bc8e887bbd8 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Mon, 11 Dec 2023 11:41:50 -0500 Subject: [PATCH 08/11] fix mexican dst changes --- scratch.js | 8 ++--- zonefile/_build.js | 77 ++++++++++++++++++++++++---------------------- zonefile/iana.js | 18 ++++------- 3 files changed, 51 insertions(+), 52 deletions(-) diff --git a/scratch.js b/scratch.js index 3be6ec9b..d812f758 100644 --- a/scratch.js +++ b/scratch.js @@ -1,12 +1,12 @@ // const spacetime = require('./builds/spacetime.cjs') import spacetime from './src/index.js' -let s = spacetime(null, 'Africa/Cairo') -console.log(s.time()) -console.log(s.timezone()) -s = s.minus(5, 'months') +let s = spacetime(null, 'asia/amman') console.log(s.time()) console.log(s.timezone()) +// s = s.minus(5, 'months') +// console.log(s.time()) +// console.log(s.timezone()) // s = spacetime(null, 'America/Toronto') // console.log(s.time()) diff --git a/zonefile/_build.js b/zonefile/_build.js index 4f375f03..8dd152cf 100644 --- a/zonefile/_build.js +++ b/zonefile/_build.js @@ -1,7 +1,7 @@ export default { "9|s": "2/dili,2/jayapura", "9|n": "2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok", - "9.5|s|04/02:03->10/01:02": "4/adelaide,4/broken_hill,4/south,4/yancowinna", + "9.5|s|04/07:03->10/06:02": "4/adelaide,4/broken_hill,4/south,4/yancowinna", "9.5|s": "4/darwin,4/north", "8|s|03/13:01->10/02:00": "12/casey", "8|s": "2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore", @@ -20,65 +20,70 @@ export default { "4|n": "2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd", "4.5|n": "2/kabul", "3|s": "12/syowa,9/antananarivo", - "3|n|04/29:02->10/28:02": "2/gaza,2/hebron", "3|n|04/28:00->10/26:24": "0/cairo,egypt", - "3|n|03/26:03->10/29:04": "2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet", - "3|n|03/26:02->10/29:03": "8/chisinau,8/tiraspol", - "3|n|03/26:00->10/28:24": "2/beirut", - "3|n|03/24:02->10/29:02": "2/jerusalem,2/tel_aviv,israel", - "3|n": "0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su", - "3.5|n": "2/tehran,iran", - "2|s|03/26:02->10/29:02": "12/troll", + "3|n|03/31:03->10/27:04": "2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,eet", + "3|n|03/31:02->10/27:03": "8/chisinau,8/tiraspol", + "3|n|03/31:00->10/26:24": "2/beirut", + "3|n|03/31:00->10/25:01": "2/gaza,2/hebron", + "3|n|03/29:02->10/27:02": "2/jerusalem,2/tel_aviv,israel", + "3|n|03/29:00->10/24:24": "2/damascus", + "3|n|03/26:03->10/29:04": "8/kyiv,8/kiev", + "3|n|03/01:00->10/25:01": "2/amman", + "3|n": "0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/baghdad,2/bahrain,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su", + "3.5|n|03/21:00->09/20:24": "2/tehran,iran", + "2|s|03/31:02->10/27:02": "12/troll", "2|s": "0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane", - "2|n|03/26:02->10/29:03": "0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met", + "2|n|03/31:02->10/27:03": "0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met", "2|n": "0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya", "1|s": "0/brazzaville,0/kinshasa,0/luanda,0/windhoek", - "1|n|03/26:01->10/29:02": "3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet", + "1|n|03/31:01->10/27:02": "3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet", "1|n": "0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis", "14|n": "11/kiritimati", "13|s": "11/apia,11/tongatapu", "13|n": "11/enderbury,11/kanton,11/fakaofo", - "12|s|04/02:03->09/24:02": "12/mcmurdo,11/auckland,12/south_pole,nz", - "12|s": "11/fiji", + "12|s|04/07:03->09/29:02": "12/mcmurdo,11/auckland,12/south_pole,nz", + "12|s|01/14:03->11/10: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,kwajalein", - "12.75|s|04/02:03->04/02:02": "11/chatham,nz-chat", - "11|s|04/02:03->10/01:02": "12/macquarie", + "12.75|s|04/07:03->04/07:02": "11/chatham,nz-chat", + "11|s|04/07:03->10/06:02": "12/macquarie", "11|s": "11/bougainville", "11|n": "2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape", - "11.5|n|04/02:03->10/01:02": "11/norfolk", - "10|s|04/02:03->10/01:02": "4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria", + "11.5|n|04/07:03->10/06:02": "11/norfolk", + "10|s|04/07:03->10/06:02": "4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria", "10|s": "12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland", "10|n": "2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap", - "10.5|s|04/02:01->10/01:02": "4/lord_howe,4/lhi", - "0|s|03/19:03->04/23:02": "0/casablanca,0/el_aaiun", - "0|n|03/26:00->10/29:01": "1/scoresbysund,3/azores", + "10.5|s|04/07:01->10/06:02": "4/lord_howe,4/lhi", + "0|s|03/10:03->04/14:02": "0/casablanca,0/el_aaiun", + "0|n|03/31:00->10/27:01": "1/scoresbysund,3/azores", "0|n": "0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory", - "-9|n|03/12:02->11/05:02": "1/adak,1/atka,us/aleutian", + "-9|n|03/10:02->11/03:02": "1/adak,1/atka,us/aleutian", "-9|n": "11/gambier", "-9.5|n": "11/marquesas", - "-8|n|03/12:02->11/05:02": "1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska", - "-8|n": "11/pitcairn", - "-7|n|03/12:02->11/05:02": "1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific", + "-8|n|03/10:02->11/03:02": "1/anchorage,1/juneau,1/nome,1/sitka,1/yakutat,us/alaska", + "-8|n": "1/metlakatla,11/pitcairn", + "-7|n|03/10:02->11/03:02": "1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific", "-7|n": "1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst", - "-6|s|04/01:22->09/02:22": "11/easter,7/easterisland", - "-6|n|03/12:02->11/05:02": "1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain", - "-6|n": "1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/merida,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general", + "-6|s|04/06:22->09/07:22": "11/easter,7/easterisland", + "-6|n|04/07:02->10/27:02": "1/merida", + "-6|n|03/12:02->11/05:02": "1/ciudad_juarez", + "-6|n|03/10:02->11/03:02": "1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain", + "-6|n": "1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general", "-5|s": "1/lima,1/rio_branco,1/porto_acre,5/acre", - "-5|n|03/12:02->11/05: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/10:02->11/03:02": "1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke", "-5|n": "1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est", - "-4|s|04/01:24->09/03:00": "1/santiago,7/continental", - "-4|s|03/25:24->10/01:00": "1/asuncion", + "-4|s|04/06:24->09/08:00": "1/santiago,7/continental", + "-4|s|03/23:24->10/06:00": "1/asuncion", "-4|s": "1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west", - "-4|n|03/12:02->11/05:02": "1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan", - "-4|n|03/12:00->11/05:01": "1/havana,cuba", + "-4|n|03/10:02->11/03:02": "1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan", + "-4|n|03/10:00->11/03:01": "1/havana,cuba", "-4|n": "1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin", "-3|s": "1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east", - "-3|n|03/12:02->11/05:02": "1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic", + "-3|n|03/10:02->11/03:02": "1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic", "-3|n": "1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem", - "-2|n|03/25:22->10/28:24": "1/nuuk,1/godthab", - "-2|n|03/12:02->11/05:02": "1/miquelon", + "-2|n|03/30:22->10/26:23": "1/nuuk,1/godthab", + "-2|n|03/10:02->11/03:02": "1/miquelon", "-2|n": "1/noronha,3/south_georgia,5/denoronha", - "-2.5|n|03/12:02->11/05:02": "1/st_johns,6/newfoundland", + "-2.5|n|03/10:02->11/03:02": "1/st_johns,6/newfoundland", "-1|n": "3/cape_verde", "-11|n": "11/midway,11/niue,11/pago_pago,11/samoa,us/samoa", "-10|n": "11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst" diff --git a/zonefile/iana.js b/zonefile/iana.js index f97b3cee..c67d20c9 100644 --- a/zonefile/iana.js +++ b/zonefile/iana.js @@ -256,8 +256,7 @@ export default { }, 'america/bahia_banderas': { offset: -6, - hem: 'n', - dst: '04/07:02->10/27:02' + hem: 'n' }, 'america/barbados': { offset: -4, @@ -328,8 +327,7 @@ export default { }, 'america/chihuahua': { offset: -6, - hem: 'n', - dst: '04/07:02->10/27:02' + hem: 'n' }, 'america/coral_harbour': { offset: -5, @@ -547,8 +545,7 @@ export default { }, 'america/mazatlan': { offset: -7, - hem: 'n', - dst: '04/07:02->10/27:02' + hem: 'n' }, 'america/mendoza': { offset: -3, @@ -566,13 +563,11 @@ export default { }, 'america/metlakatla': { offset: -8, - hem: 'n', - dst: '03/10:02->11/03:02' + hem: 'n' }, 'america/mexico_city': { offset: -6, - hem: 'n', - dst: '04/07:02->10/27:02' + hem: 'n' }, 'america/miquelon': { offset: -2, @@ -586,8 +581,7 @@ export default { }, 'america/monterrey': { offset: -6, - hem: 'n', - dst: '04/07:02->10/27:02' + hem: 'n' }, 'america/montevideo': { offset: -3, From d7cc7b61d2d05de154fa8ae4f861d4199bfddb93 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Mon, 11 Dec 2023 11:44:14 -0500 Subject: [PATCH 09/11] fix jordan, syria, tehran dst --- scratch.js | 2 +- zonefile/_build.js | 6 ++---- zonefile/iana.js | 9 +++------ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/scratch.js b/scratch.js index d812f758..7d8de63c 100644 --- a/scratch.js +++ b/scratch.js @@ -1,7 +1,7 @@ // const spacetime = require('./builds/spacetime.cjs') import spacetime from './src/index.js' -let s = spacetime(null, 'asia/amman') +let s = spacetime(null, 'asia/tehran') console.log(s.time()) console.log(s.timezone()) // s = s.minus(5, 'months') diff --git a/zonefile/_build.js b/zonefile/_build.js index 8dd152cf..8dc00827 100644 --- a/zonefile/_build.js +++ b/zonefile/_build.js @@ -26,11 +26,9 @@ export default { "3|n|03/31:00->10/26:24": "2/beirut", "3|n|03/31:00->10/25:01": "2/gaza,2/hebron", "3|n|03/29:02->10/27:02": "2/jerusalem,2/tel_aviv,israel", - "3|n|03/29:00->10/24:24": "2/damascus", "3|n|03/26:03->10/29:04": "8/kyiv,8/kiev", - "3|n|03/01:00->10/25:01": "2/amman", - "3|n": "0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/baghdad,2/bahrain,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su", - "3.5|n|03/21:00->09/20:24": "2/tehran,iran", + "3|n": "0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su", + "3.5|n": "2/tehran,iran", "2|s|03/31:02->10/27:02": "12/troll", "2|s": "0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane", "2|n|03/31:02->10/27:03": "0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met", diff --git a/zonefile/iana.js b/zonefile/iana.js index c67d20c9..5f3d1132 100644 --- a/zonefile/iana.js +++ b/zonefile/iana.js @@ -876,8 +876,7 @@ export default { }, 'asia/amman': { offset: 3, - hem: 'n', - dst: '03/01:00->10/25:01' + hem: 'n' }, 'asia/anadyr': { offset: 12, @@ -950,8 +949,7 @@ export default { }, 'asia/damascus': { offset: 3, - hem: 'n', - dst: '03/29:00->10/24:24' + hem: 'n' }, 'asia/dhaka': { offset: 6, @@ -1160,8 +1158,7 @@ export default { }, 'asia/tehran': { offset: 3.5, - hem: 'n', - dst: '03/21:00->09/20:24' + hem: 'n' }, 'asia/thimphu': { offset: 6, From af8af5541de588b6e9237235aabb12657639a8aa Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Mon, 11 Dec 2023 11:46:44 -0500 Subject: [PATCH 10/11] fix fiji dst --- changelog.md | 6 ++++++ package.json | 4 ++-- scratch.js | 2 +- zonefile/_build.js | 2 +- zonefile/iana.js | 3 +-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index 55a070cb..188fbaeb 100644 --- a/changelog.md +++ b/changelog.md @@ -9,7 +9,13 @@ This project follows semVer, where: --> +### 7.5.0 [Dec 2023] + +- **[fix]** - offset in Africa/Cairo #404 +- **[update]** - 2024 DST changes + ### 7.4.8 [Oct 2023] + - **[fix]** - fix for reversed-DST in `africa/casablanca` and `africa/el_aaiun` #400 - **[update]** - deps diff --git a/package.json b/package.json index d19cfa9b..28b90f62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spacetime", - "version": "7.4.8", + "version": "7.5.0", "description": "figure-out dates across timezones", "main": "src/index.js", "unpkg": "builds/spacetime.min.js", @@ -62,4 +62,4 @@ "timekeeper": "2.3.1" }, "license": "Apache-2.0" -} \ No newline at end of file +} diff --git a/scratch.js b/scratch.js index 7d8de63c..5e211799 100644 --- a/scratch.js +++ b/scratch.js @@ -1,7 +1,7 @@ // const spacetime = require('./builds/spacetime.cjs') import spacetime from './src/index.js' -let s = spacetime(null, 'asia/tehran') +let s = spacetime(null, 'pacific/fiji') console.log(s.time()) console.log(s.timezone()) // s = s.minus(5, 'months') diff --git a/zonefile/_build.js b/zonefile/_build.js index 8dc00827..94cdd435 100644 --- a/zonefile/_build.js +++ b/zonefile/_build.js @@ -40,7 +40,7 @@ export default { "13|s": "11/apia,11/tongatapu", "13|n": "11/enderbury,11/kanton,11/fakaofo", "12|s|04/07:03->09/29:02": "12/mcmurdo,11/auckland,12/south_pole,nz", - "12|s|01/14:03->11/10:02": "11/fiji", + "12|s": "11/fiji", "12|n": "2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein", "12.75|s|04/07:03->04/07:02": "11/chatham,nz-chat", "11|s|04/07:03->10/06:02": "12/macquarie", diff --git a/zonefile/iana.js b/zonefile/iana.js index 5f3d1132..548f7ff1 100644 --- a/zonefile/iana.js +++ b/zonefile/iana.js @@ -1682,8 +1682,7 @@ export default { }, 'pacific/fiji': { offset: 12, - hem: 's', - dst: '01/14:03->11/10:02' + hem: 's' }, 'pacific/funafuti': { offset: 12, From b728cd673f34219798d52df055d02d4cfcda9a90 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Mon, 11 Dec 2023 11:48:54 -0500 Subject: [PATCH 11/11] 7.5.0rc --- builds/spacetime.cjs | 211 +++++++++++++++++++++++++++------------- builds/spacetime.min.js | 2 +- builds/spacetime.mjs | 2 +- changelog.md | 1 + package-lock.json | 136 ++++++++++++++++++-------- package.json | 2 +- src/_version.js | 2 +- 7 files changed, 247 insertions(+), 109 deletions(-) diff --git a/builds/spacetime.cjs b/builds/spacetime.cjs index 5390eec5..f897d2f1 100644 --- a/builds/spacetime.cjs +++ b/builds/spacetime.cjs @@ -1,4 +1,4 @@ -/* spencermountain/spacetime 7.4.8 Apache 2.0 */ +/* spencermountain/spacetime 7.5.0 Apache 2.0 */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -56,7 +56,7 @@ var data = { "9|s": "2/dili,2/jayapura", "9|n": "2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok", - "9.5|s|04/02:03->10/01:02": "4/adelaide,4/broken_hill,4/south,4/yancowinna", + "9.5|s|04/07:03->10/06:02": "4/adelaide,4/broken_hill,4/south,4/yancowinna", "9.5|s": "4/darwin,4/north", "8|s|03/13:01->10/02:00": "12/casey", "8|s": "2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore", @@ -75,65 +75,68 @@ "4|n": "2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd", "4.5|n": "2/kabul", "3|s": "12/syowa,9/antananarivo", - "3|n|04/29:02->10/28:02": "2/gaza,2/hebron", - "3|n|03/26:03->10/29:04": "2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet", - "3|n|03/26:02->10/29:03": "8/chisinau,8/tiraspol", - "3|n|03/26:00->10/28:24": "2/beirut", - "3|n|03/24:02->10/29:02": "2/jerusalem,2/tel_aviv,israel", + "3|n|04/28:00->10/26:24": "0/cairo,egypt", + "3|n|03/31:03->10/27:04": "2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,eet", + "3|n|03/31:02->10/27:03": "8/chisinau,8/tiraspol", + "3|n|03/31:00->10/26:24": "2/beirut", + "3|n|03/31:00->10/25:01": "2/gaza,2/hebron", + "3|n|03/29:02->10/27:02": "2/jerusalem,2/tel_aviv,israel", + "3|n|03/26:03->10/29:04": "8/kyiv,8/kiev", "3|n": "0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su", "3.5|n": "2/tehran,iran", - "2|s|03/26:02->10/29:02": "12/troll", + "2|s|03/31:02->10/27:02": "12/troll", "2|s": "0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane", - "2|n|04/28:00->10/26:24": "0/cairo,egypt", - "2|n|03/26:02->10/29:03": "0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met", + "2|n|03/31:02->10/27:03": "0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met", "2|n": "0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya", "1|s": "0/brazzaville,0/kinshasa,0/luanda,0/windhoek", - "1|n|03/26:01->10/29:02": "3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet", + "1|n|03/31:01->10/27:02": "3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet", "1|n": "0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis", "14|n": "11/kiritimati", "13|s": "11/apia,11/tongatapu", "13|n": "11/enderbury,11/kanton,11/fakaofo", - "12|s|04/02:03->09/24:02": "12/mcmurdo,11/auckland,12/south_pole,nz", + "12|s|04/07:03->09/29:02": "12/mcmurdo,11/auckland,12/south_pole,nz", "12|s": "11/fiji", "12|n": "2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein", - "12.75|s|04/02:03->04/02:02": "11/chatham,nz-chat", - "11|s|04/02:03->10/01:02": "12/macquarie", + "12.75|s|04/07:03->04/07:02": "11/chatham,nz-chat", + "11|s|04/07:03->10/06:02": "12/macquarie", "11|s": "11/bougainville", "11|n": "2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape", - "11.5|n|04/02:03->10/01:02": "11/norfolk", - "10|s|04/02:03->10/01:02": "4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria", + "11.5|n|04/07:03->10/06:02": "11/norfolk", + "10|s|04/07:03->10/06:02": "4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria", "10|s": "12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland", "10|n": "2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap", - "10.5|s|04/02:01->10/01:02": "4/lord_howe,4/lhi", - "0|s|03/19:03->04/23:02": "0/casablanca,0/el_aaiun", - "0|n|03/26:00->10/29:01": "1/scoresbysund,3/azores", + "10.5|s|04/07:01->10/06:02": "4/lord_howe,4/lhi", + "0|s|03/10:03->04/14:02": "0/casablanca,0/el_aaiun", + "0|n|03/31:00->10/27:01": "1/scoresbysund,3/azores", "0|n": "0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory", - "-9|n|03/12:02->11/05:02": "1/adak,1/atka,us/aleutian", + "-9|n|03/10:02->11/03:02": "1/adak,1/atka,us/aleutian", "-9|n": "11/gambier", "-9.5|n": "11/marquesas", - "-8|n|03/12:02->11/05:02": "1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska", - "-8|n": "11/pitcairn", - "-7|n|03/12:02->11/05:02": "1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific", + "-8|n|03/10:02->11/03:02": "1/anchorage,1/juneau,1/nome,1/sitka,1/yakutat,us/alaska", + "-8|n": "1/metlakatla,11/pitcairn", + "-7|n|03/10:02->11/03:02": "1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific", "-7|n": "1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst", - "-6|s|04/01:22->09/02:22": "11/easter,7/easterisland", - "-6|n|03/12:02->11/05:02": "1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain", - "-6|n": "1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/merida,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general", + "-6|s|04/06:22->09/07:22": "11/easter,7/easterisland", + "-6|n|04/07:02->10/27:02": "1/merida", + "-6|n|03/12:02->11/05:02": "1/ciudad_juarez", + "-6|n|03/10:02->11/03:02": "1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain", + "-6|n": "1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general", "-5|s": "1/lima,1/rio_branco,1/porto_acre,5/acre", - "-5|n|03/12:02->11/05: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/10:02->11/03:02": "1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke", "-5|n": "1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est", - "-4|s|04/01:24->09/03:00": "1/santiago,7/continental", - "-4|s|03/25:24->10/01:00": "1/asuncion", + "-4|s|04/06:24->09/08:00": "1/santiago,7/continental", + "-4|s|03/23:24->10/06:00": "1/asuncion", "-4|s": "1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west", - "-4|n|03/12:02->11/05:02": "1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan", - "-4|n|03/12:00->11/05:01": "1/havana,cuba", + "-4|n|03/10:02->11/03:02": "1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan", + "-4|n|03/10:00->11/03:01": "1/havana,cuba", "-4|n": "1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin", "-3|s": "1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east", - "-3|n|03/12:02->11/05:02": "1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic", + "-3|n|03/10:02->11/03:02": "1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic", "-3|n": "1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem", - "-2|n|03/25:22->10/28:24": "1/nuuk,1/godthab", - "-2|n|03/12:02->11/05:02": "1/miquelon", + "-2|n|03/30:22->10/26:23": "1/nuuk,1/godthab", + "-2|n|03/10:02->11/03:02": "1/miquelon", "-2|n": "1/noronha,3/south_georgia,5/denoronha", - "-2.5|n|03/12:02->11/05:02": "1/st_johns,6/newfoundland", + "-2.5|n|03/10:02->11/03:02": "1/st_johns,6/newfoundland", "-1|n": "3/cape_verde", "-11|n": "11/midway,11/niue,11/pago_pago,11/samoa,us/samoa", "-10|n": "11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst" @@ -615,7 +618,7 @@ } }; //find the desired date by a increment/check while loop - const units$3 = { + const units$4 = { year: { valid: (n) => n > -4000 && n < 4000, walkTo: (s, n) => walk(s, n, 'getFullYear', 'year', null) @@ -675,7 +678,7 @@ }; const walkTo = (s, wants) => { - let keys = Object.keys(units$3); + let keys = Object.keys(units$4); let old = s.clone(); for (let i = 0; i < keys.length; i++) { let k = keys[i]; @@ -687,14 +690,14 @@ n = parseInt(n, 10); } //make-sure it's valid - if (!units$3[k].valid(n)) { + if (!units$4[k].valid(n)) { s.epoch = null; if (s.silent === false) { console.warn('invalid ' + k + ': ' + n); } return } - units$3[k].walkTo(s, n); + units$4[k].walkTo(s, n); } return }; @@ -766,7 +769,7 @@ function short$1() { return shortMonths } function long$1() { return longMonths } function mapping$1() { return buildMapping() } - function set$3(i18n) { + function set$5(i18n) { shortMonths = i18n.short || shortMonths; longMonths = i18n.long || longMonths; } @@ -1402,7 +1405,7 @@ function short() { return shortDays } function long() { return longDays } - function set$2(i18n) { + function set$4(i18n) { shortDays = i18n.short || shortDays; longDays = i18n.long || longDays; } @@ -1427,7 +1430,7 @@ return titleCaseEnabled } - function set$1(val) { + function set$3(val) { titleCaseEnabled = val; } @@ -1816,7 +1819,7 @@ }; var unixFmt$1 = unixFmt; - const units$2 = ['year', 'season', 'quarter', 'month', 'week', 'day', 'quarterHour', 'hour', 'minute']; + const units$3 = ['year', 'season', 'quarter', 'month', 'week', 'day', 'quarterHour', 'hour', 'minute']; const doUnit = function (s, k) { let start = s.clone().startOf(k); @@ -1833,7 +1836,7 @@ return doUnit(s, unit) } let obj = {}; - units$2.forEach(k => { + units$3.forEach(k => { obj[k] = doUnit(s, k); }); return obj @@ -2052,7 +2055,73 @@ return diff } + let units$2 = { + second: 'second', + seconds: 'seconds', + minute: 'minute', + minutes: 'minutes', + hour: 'hour', + hours: 'hours', + day: 'day', + days: 'days', + month: 'month', + months: 'months', + year: 'year', + years: 'years', + }; + + function unitsString(unit) { + return units$2[unit] || ''; + } + + function set$2(i18n = {}) { + units$2 = { + second: i18n.second || units$2.second, + seconds: i18n.seconds || units$2.seconds, + minute: i18n.minute || units$2.minute, + minutes: i18n.minutes || units$2.minutes, + hour: i18n.hour || units$2.hour, + hours: i18n.hours || units$2.hours, + day: i18n.day || units$2.day, + days: i18n.days || units$2.days, + month: i18n.month || units$2.month, + months: i18n.months || units$2.months, + year: i18n.year || units$2.year, + years: i18n.years || units$2.years, + }; + } + + let past = 'past'; + let future = 'future'; + let present = 'present'; + let now = 'now'; + let almost = 'almost'; + let over = 'over'; + let pastDistance = (value) => `${value} ago`; + let futureDistance = (value) => `in ${value}`; + + function pastDistanceString(value) { return pastDistance(value) } + function futureDistanceString(value) { return futureDistance(value) } + function pastString() { return past } + function futureString() { return future } + function presentString() { return present } + function nowString() { return now } + function almostString() { return almost } + function overString() { return over } + + function set$1(i18n) { + pastDistance = i18n.pastDistance || pastDistance; + futureDistance = i18n.futureDistance || futureDistance; + past = i18n.past || past; + future = i18n.future || future; + present = i18n.present || present; + now = i18n.now || now; + almost = i18n.almost || almost; + over = i18n.over || over; + } + //our conceptual 'break-points' for each unit + const qualifiers = { months: { almost: 10, @@ -2079,9 +2148,9 @@ // Expects a plural unit arg function pluralize(value, unit) { if (value === 1) { - unit = unit.slice(0, -1); + return value + ' ' + unitsString(unit.slice(0, -1)) } - return value + ' ' + unit + return value + ' ' + unitsString(unit) } const toSoft = function (diff) { @@ -2108,12 +2177,13 @@ const nextValue = Math.abs(diff[nextUnit]); if (nextValue > qualifiers[nextUnit].almost) { rounded = pluralize(value + 1, unit); - qualified = 'almost ' + rounded; + qualified = almostString() + ' ' + rounded; } else if (nextValue > qualifiers[nextUnit].over) { - qualified = 'over ' + englishValue; + qualified = overString() + ' ' + englishValue; } } }); + return { qualified, rounded, abbreviated, englishValues } }; var soften = toSoft; @@ -2128,16 +2198,16 @@ if (isNow === true) { return { diff, - rounded: 'now', - qualified: 'now', - precise: 'now', + rounded: nowString(), + qualified: nowString(), + precise: nowString(), abbreviated: [], iso: 'P0Y0M0DT0H0M0S', - direction: 'present', + direction: presentString(), } } let precise; - let direction = 'future'; + let direction = futureString(); let { rounded, qualified, englishValues, abbreviated } = soften(diff); @@ -2145,14 +2215,14 @@ precise = englishValues.splice(0, 2).join(', '); //handle before/after logic if (start.isAfter(end) === true) { - rounded += ' ago'; - qualified += ' ago'; - precise += ' ago'; - direction = 'past'; + rounded = pastDistanceString(rounded); + qualified = pastDistanceString(qualified); + precise = pastDistanceString(precise); + direction = pastString(); } else { - rounded = 'in ' + rounded; - qualified = 'in ' + qualified; - precise = 'in ' + precise; + rounded = futureDistanceString(rounded); + qualified = futureDistanceString(qualified); + precise = futureDistanceString(precise); } // https://en.wikipedia.org/wiki/ISO_8601#Durations // P[n]Y[n]M[n]DT[n]H[n]M[n]S @@ -3867,22 +3937,33 @@ i18n: function (data) { //change the day names if (isObject(data.days)) { - set$2(data.days); + set$4(data.days); } //change the month names if (isObject(data.months)) { - set$3(data.months); + set$5(data.months); } - // change the the display style of the month / day names + //change the display style of the month / day names if (isBoolean(data.useTitleCase)) { - set$1(data.useTitleCase); + set$3(data.useTitleCase); } //change am and pm strings if (isObject(data.ampm)) { set(data.ampm); } + + //change distance strings + if(isObject(data.distance)){ + set$1(data.distance); + } + + //change units strings + if(isObject(data.units)){ + set$2(data.units); + } + return this } }; @@ -4029,7 +4110,7 @@ }; var whereIts$1 = whereIts; - var version = '7.4.8'; + var version = '7.5.0'; const main = (input, tz, options) => new Spacetime(input, tz, options); diff --git a/builds/spacetime.min.js b/builds/spacetime.min.js index e6c0de94..20dc7cb2 100644 --- a/builds/spacetime.min.js +++ b/builds/spacetime.min.js @@ -1 +1 @@ -!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).spacetime=t()}(this,(function(){"use strict";const e=(e,t,n)=>{const[a,r]=e.split("/"),[o,i]=r.split(":");return Date.UTC(n,a-1,o,i)-36e5*t};var t=(t,n,a,r,o)=>{const i=new Date(t).getUTCFullYear(),s=e(n,o,i),u=e(a,r,i);return t>=s&&t{let n=e.timezones[e.tz];if(void 0===n)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(void 0===n.dst)return n.offset;let a=n.offset,r=n.offset+1;"n"===n.hem&&(r=a-1);let o=n.dst.split("->");return!0===t(e.epoch,o[0],o[1],a,r)?a:r},a={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok","9.5|s|04/02:03->10/01:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/13:01->10/02:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,hongkong,prc,roc","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/yangon,9/cocos,2/rangoon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/kolkata,2/colombo,2/calcutta","4|s":"9/reunion","4|n":"2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|04/29:02->10/28:02":"2/gaza,2/hebron","3|n|03/26:03->10/29:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet","3|n|03/26:02->10/29:03":"8/chisinau,8/tiraspol","3|n|03/26:00->10/28:24":"2/beirut","3|n|03/24:02->10/29:02":"2/jerusalem,2/tel_aviv,israel","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su","3.5|n":"2/tehran,iran","2|s|03/26:02->10/29:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|04/28:00->10/26:24":"0/cairo,egypt","2|n|03/26:02->10/29:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met","2|n":"0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|03/26:01->10/29:02":"3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s":"11/apia,11/tongatapu","13|n":"11/enderbury,11/kanton,11/fakaofo","12|s|04/02:03->09/24:02":"12/mcmurdo,11/auckland,12/south_pole,nz","12|s":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein","12.75|s|04/02:03->04/02:02":"11/chatham,nz-chat","11|s|04/02:03->10/01:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n|04/02:03->10/01:02":"11/norfolk","10|s|04/02:03->10/01:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap","10.5|s|04/02:01->10/01:02":"4/lord_howe,4/lhi","0|s|03/19:03->04/23:02":"0/casablanca,0/el_aaiun","0|n|03/26:00->10/29:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory","-9|n|03/12:02->11/05:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/12:02->11/05:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/12:02->11/05:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n":"1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst","-6|s|04/01:22->09/02:22":"11/easter,7/easterisland","-6|n|03/12:02->11/05:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain","-6|n":"1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/merida,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|03/12:02->11/05:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est","-4|s|04/01:24->09/03:00":"1/santiago,7/continental","-4|s|03/25:24->10/01:00":"1/asuncion","-4|s":"1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west","-4|n|03/12:02->11/05:02":"1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/12:00->11/05:01":"1/havana,cuba","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east","-3|n|03/12:02->11/05: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/25:22->10/28:24":"1/nuuk,1/godthab","-2|n|03/12:02->11/05:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/12:02->11/05:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst"},r=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let o={};Object.keys(a).forEach((e=>{let t=e.split("|"),n={offset:Number(t[0]),hem:t[1]};t[2]&&(n.dst=t[2]),a[e].split(",").forEach((e=>{e=e.replace(/(^[0-9]+)\//,((e,t)=>(t=Number(t),r[t]+"/"))),o[e]=n}))})),o.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let n="etc/gmt"+t;o[n]={offset:-1*e,hem:"n"},n="utc/gmt"+t,o[n]={offset:-1*e,hem:"n"}}var i=o;var s=()=>{let e=(()=>{if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;let e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null})();return null===e?"utc":e};const u=/(\-?[0-9]+)h(rs)?/i,l=/(\-?[0-9]+)/,c=/utc([\-+]?[0-9]+)/i,h=/gmt([\-+]?[0-9]+)/i,d=function(e){return(e=Number(e))>=-13&&e<=13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null};var m=function(e){let t=e.match(u);if(null!==t)return d(t[1]);if(t=e.match(c),null!==t)return d(t[1]);if(t=e.match(h),null!==t){let e=-1*Number(t[1]);return d(e)}return t=e.match(l),null!==t?d(t[1]):null};let f=s();const p=Object.keys(i).reduce(((e,t)=>{let n=t.split("/")[1]||"";return n=n.replace(/_/g," "),e[n]=t,e}),{});var y=(e,t)=>{if(!e)return t.hasOwnProperty(f)||(console.warn(`Unrecognized IANA id '${f}'. Setting fallback tz to UTC.`),f="utc"),f;"string"!=typeof e&&console.error("Timezone must be a string - recieved: '",e,"'\n");let n=e.trim();if(n=n.toLowerCase(),!0===t.hasOwnProperty(n))return n;if(n=(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"))(n),!0===t.hasOwnProperty(n))return n;if(!0===p.hasOwnProperty(n))return p[n];if(!0===/[0-9]/.test(n)){let e=m(n);if(e)return e}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function g(e){return e%4==0&&e%100!=0||e%400==0}function b(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())}function k(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e,t=2){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function v(e){let t=e%10,n=e%100;return 1===t&&11!==n?e+"st":2===t&&12!==n?e+"nd":3===t&&13!==n?e+"rd":e+"th"}function _(e){return e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function j(e=""){return"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===e?"date":"min"===e||"mins"===e?"minute":e}function z(e){return"number"==typeof e?e:b(e)?e.getTime():e.epoch?e.epoch:null}function $(e,t){return!1===k(e)?t.clone().set(e):e}function O(e,t=""){const n=e>0?"+":"-",a=Math.abs(e);return`${n}${w(parseInt(""+a,10))}${t}${w(a%1*60)}`}const D={year:(new Date).getFullYear(),month:0,date:1};var M={parseArray:(e,t,n)=>{if(0===t.length)return e;let a=["year","month","date","hour","minute","second","millisecond"];for(let r=0;r{if(0===Object.keys(t).length)return e;t=Object.assign({},D,n,t);let a=Object.keys(t);for(let r=0;r0&&t<25e8&&!1===e.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),e.epoch=t,e}};const S=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach((t=>{"function"==typeof e[t]&&(e=e[t](e._today[t]))})),e},q={now:e=>S(e),today:e=>S(e),tonight:e=>e=(e=S(e)).hour(18),tomorrow:e=>e=(e=(e=S(e)).add(1,"day")).startOf("day"),yesterday:e=>e=(e=(e=S(e)).subtract(1,"day")).startOf("day"),christmas:e=>{let t=S(e).year();return e=e.set([t,11,25,18,0,0])},"new years":e=>{let t=S(e).year();return e=e.set([t,11,31,18,0,0])}};q["new years eve"]=q["new years"];var N=q;var I=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 T={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};T.date=T.day,T.month=25488e5,T.week=6048e5,T.year=3154e7,Object.keys(T).forEach((e=>{T[e+"s"]=T[e]}));var E=T;const C=(e,t,n,a,r)=>{let o=e.d[n]();if(o===t)return;let i=null===r?null:e.d[r](),s=e.epoch,u=t-o;e.epoch+=E[a]*u,"day"===a&&Math.abs(u)>28&&t<28&&(e.epoch+=E.hour),null!==r&&i!==e.d[r]()&&(e.epoch=s);const l=E[a]/2;for(;e.d[n]()t;)e.epoch-=l;null!==r&&i!==e.d[r]()&&(e.epoch=s)},x={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>C(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let n=e.d,a=n.getMonth(),r=e.epoch,o=n.getFullYear();if(a===t)return;let i=t-a;for(e.epoch+=E.day*(28*i),o!==e.d.getFullYear()&&(e.epoch=r);e.d.getMonth()t;)e.epoch-=E.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>C(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>C(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>C(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 A=(e,t)=>{let n=Object.keys(x),a=e.clone();for(let r=0;r{if(!t)return e;let n=0;if(/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(!0===/:00/.test(t)&&(t=t.replace(/:00/,"")),!0===/:30/.test(t)&&(t=t.replace(/:30/,".5"))),/^[\+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,".5")),n=parseFloat(t),Math.abs(n)>100&&(n/=100),0===n||"Z"===t||"z"===t)return e.tz="etc/gmt",e;n*=-1,n>=0&&(n="+"+n);let a="etc/gmt"+n;return e.timezones[a]&&(e.tz=a),e};var Z=(e,t="")=>{let n=(t=t.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==n){let a=Number(n[1]);if(a<0||a>24)return e.startOf("day");let r=Number(n[2]);if(n[2].length<2||r<0||r>59)return e.startOf("day");e=(e=(e=(e=e.hour(a)).minute(r)).seconds(n[3]||0)).millisecond(function(e=""){return(e=String(e)).length>3?e=e.substr(0,3):1===e.length?e+="00":2===e.length&&(e+="0"),Number(e)||0}(n[4]));let o=t.match(/[\b0-9] ?(am|pm)\b/);return null!==o&&o[1]&&(e=e.ampm(o[1])),e}if(n=t.match(/([0-9]+) ?(am|pm)/),null!==n&&n[1]){let t=Number(n[1]);return t>12||t<1?e.startOf("day"):e=(e=(e=e.hour(n[1]||0)).ampm(n[2])).startOf("hour")}return e=e.startOf("day")};let U=B();const Q=e=>{if(!0!==Y.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(g(e.year)&&e.date<=29)||e.date<=28;let t=Y[e.month]||0;return e.date<=t},G=(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 n=parseInt(e,10);return!n&&t&&(n=t.year),n=n||(new Date).getFullYear(),n},V=function(e){return"sept"===(e=e.toLowerCase().trim())?U.sep:U[e]};var W=[{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 n=parseInt(t[1],10)-1,a=parseInt(t[2],10);(e.british||n>=12)&&(a=parseInt(t[1],10),n=parseInt(t[2],10)-1);let r={date:a,month:n,year:G(t[3],e._today)||(new Date).getFullYear()};return!1===Q(r)?(e.epoch=null,e):(A(e,r),e=Z(e,t[4]))}},{reg:/^([a-z]+)[\-\/\. ]([0-9]{1,2})[\-\/\. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9:]+)?( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[5],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[3]))}}],J=[{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:1};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let n={year:G(t[2],e._today),month:V(t[1]),date:e._today.date||1};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.quarter(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.season(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(A(e,r),e=Z(e))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/,/g,"");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(A(e,r),e=Z(e))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let n=e._today;n.month&&!n.date&&(n.date=1);let a=new Date,r={year:G(t[0],n),month:n.month||a.getMonth(),date:n.date||a.getDate()};return!1===Q(r)?(e.epoch=null,e):(A(e,r),e=Z(e))}}],K=[].concat([{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return!1===Q(n)?(e.epoch=null,e):(H(e,t[5]),A(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([0-9]{1,2})[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return n.month>=12&&(n.date=parseInt(t[2],10),n.month=parseInt(t[3],10)-1),!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([a-z]+)[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[1],e._today),month:V(t[2]),date:_(t[3]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}}],W,[{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1])};return n.month&&!1!==Q(n)?(A(e,n),e=Z(e,t[4])):(e.epoch=null,e)}},{reg:/^([0-9]{1,2})[\. -/]([a-z]+)[\. -/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={date:Number(t[1]),month:V(t[2]),year:Number(t[3])};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=e.startOf("day"),e=Z(e,t[4]))}}],J);var R=function(e,t,n){for(let a=0;a{let n=e._today||ne;if("number"==typeof t)return te(e,t);if(e.epoch=Date.now(),e._today&&k(e._today)&&Object.keys(e._today).length>0){let t=ee(e,n,ne);t.isValid()&&(e.epoch=t.epoch)}return null==t||""===t?e:!0===b(t)?(e.epoch=t.getTime(),e):!0===function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t)?e=X(e,t,n):!0===k(t)?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):e=ee(e,t,n):"string"!=typeof t?e:(t=I(t),!0===N.hasOwnProperty(t)?e=N[t](e):R(e,t))};let re=["sun","mon","tue","wed","thu","fri","sat"],oe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ie(){return re}function se(){return oe}const ue={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 le=!0;var ce=e=>{let t=e.timezone().current.offset;return t?O(t,":"):"Z"};const he=e=>le?function(e){return e?e[0].toUpperCase()+e.substr(1):""}(e):e,de={day:e=>he(e.dayName()),"day-short":e=>he(ie()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>v(e.day()),"day-pad":e=>w(e.day()),date:e=>e.date(),"date-ordinal":e=>v(e.date()),"date-pad":e=>w(e.date()),month:e=>he(e.monthName()),"month-short":e=>he(L()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>v(e.month()),"month-pad":e=>w(e.month()),"iso-month":e=>w(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+" BC")},"year-short":e=>{let t=e.year();return t>0?`'${String(e.year()).substr(2,4)}`:(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),n=t<0,a=w(Math.abs(t),4);return n&&(a=w(a,6),a="-"+a),a},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${w(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>w(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>w(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>w(e.minute()),second:e=>e.second(),"second-pad":e=>w(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>w(e.millisecond(),3),ampm:e=>e.ampm(),AMPM:e=>e.ampm().toUpperCase(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>ce(e),numeric:e=>`${e.year()}/${w(e.month()+1)}/${w(e.date())}`,"numeric-us":e=>`${w(e.month()+1)}/${w(e.date())}/${e.year()}`,"numeric-uk":e=>`${w(e.date())}/${w(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${w(e.month()+1)}/${w(e.date())}`,iso:e=>`${e.format("iso-year")}-${w(e.month()+1)}-${w(e.date())}T${w(e.h24())}:${w(e.minute())}:${w(e.second())}.${w(e.millisecond(),3)}${ce(e)}`,"iso-short":e=>{let t=w(e.month()+1),n=w(e.date());var a;return`${(a=e.year())>=0?w(a,4):"-"+w(a=Math.abs(a),4)}-${t}-${n}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${L()[e.month()]} ${v(e.date())}, ${e.time()}`,"nice-24":e=>`${L()[e.month()]} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`,"nice-year":e=>`${L()[e.month()]} ${v(e.date())}, ${e.year()}`,"nice-day":e=>`${ie()[e.day()]} ${he(L()[e.month()])} ${v(e.date())}`,"nice-full":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`},me={"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(me).forEach((e=>de[e]=de[me[e]]));var fe=(e,t="")=>{if(!0!==e.isValid())return"";if(de.hasOwnProperty(t)){let n=de[t](e)||"";return"json"!==t&&(n=String(n),"ampm"!==t.toLowerCase()&&(n=he(n))),n}if(-1!==t.indexOf("{")){let n=/\{(.+?)\}/g;return t=t.replace(n,((t,n)=>{if(n=n.toLowerCase().trim(),de.hasOwnProperty(n)){let t=String(de[n](e));return"ampm"!==n.toLowerCase()?he(t):t}return""})),t}return e.format("iso-short")};const pe={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=>w(Number(String(e.year()).substr(2,4))),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>"0"+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>w(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>w(e.week()),d:e=>e.date(),dd:e=>w(e.date()),D:e=>e.dayOfYear(),DD:e=>w(e.dayOfYear()),DDD:e=>w(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=>w(e.h12()),H:e=>e.hour(),HH:e=>w(e.hour()),m:e=>e.minute(),mm:e=>w(e.minute()),s:e=>e.second(),ss:e=>w(e.second()),SSS:e=>w(e.millisecond(),3),A:e=>e.epoch-e.startOf("day").epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>O(e.timezone().current.offset),ZZ:e=>O(e.timezone().current.offset),ZZZ:e=>O(e.timezone().current.offset),ZZZZ:e=>O(e.timezone().current.offset,":")},ye=(e,t,n)=>{let a=e,r=t;for(let o=0;o{let n=t.split("");return n=function(e){for(let t=0;te))}(n),n=function(e){for(let t=0;te))).map((e=>("''"===e&&(e="'"),e)))}(n),n.reduce(((t,n)=>(void 0!==pe[n]?t+=pe[n](e)||"":(/^'.{1,}'$/.test(n)&&(n=n.replace(/'/g,"")),t+=n),t)),"")};const be=["year","season","quarter","month","week","day","quarterHour","hour","minute"],ke=function(e,t){let n=e.clone().startOf(t),a=e.clone().endOf(t).epoch-n.epoch,r=(e.epoch-n.epoch)/a;return parseFloat(r.toFixed(2))};var we=(e,t)=>{if(t)return t=j(t),ke(e,t);let n={};return be.forEach((t=>{n[t]=ke(e,t)})),n};var ve=(e,t)=>{let n=e.progress();return"quarterhour"===(t=j(t))&&(t="quarterHour"),void 0!==n[t]?(n[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):!1===e.silent&&console.warn("no known unit '"+t+"'"),e};const _e=(e,t,n)=>{let a=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,n),a+=1;return e.isAfter(t,n)&&(a-=1),a};var je=(e,t,n)=>e.isBefore(t)?_e(e,t,n):-1*_e(t,e,n);var ze=function(e,t){let n=t.epoch-e.epoch,a={milliseconds:n,seconds:parseInt(n/1e3,10)};a.minutes=parseInt(a.seconds/60,10),a.hours=parseInt(a.minutes/60,10);let r=e.clone();return a.years=((e,t)=>{let n=t.year()-e.year();return(e=e.year(t.year())).isAfter(t)&&(n-=1),n})(r,t),r=e.add(a.years,"year"),a.months=12*a.years,r=e.add(a.months,"month"),a.months+=je(r,t,"month"),a.quarters=4*a.years,a.quarters+=parseInt(a.months%12/3,10),a.weeks=52*a.years,r=e.add(a.weeks,"week"),a.weeks+=je(r,t,"week"),a.days=7*a.weeks,r=e.add(a.days,"day"),a.days+=je(r,t,"day"),a};var $e=function(e,t,n){t=$(t,e);let a=!1;if(e.isAfter(t)){let n=e;e=t,t=n,a=!0}let r=ze(e,t);return a&&(r=function(e){return Object.keys(e).forEach((t=>{e[t]*=-1})),e}(r)),n?(n=j(n),!0!==/s$/.test(n)&&(n+="s"),"dates"===n&&(n="days"),r[n]):r};const Oe=e=>Math.abs(e)||0;var De=function(e){let t="P";return t+=Oe(e.years)+"Y",t+=Oe(e.months)+"M",t+=Oe(e.days)+"DT",t+=Oe(e.hours)+"H",t+=Oe(e.minutes)+"M",t+=Oe(e.seconds)+"S",t};const Me={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 Se(e,t){return 1===e&&(t=t.slice(0,-1)),e+" "+t}var qe=function(e){let t=null,n=null,a=[],r=[];return Object.keys(e).forEach(((o,i,s)=>{const u=Math.abs(e[o]);if(0===u)return;a.push(u+o[0]);const l=Se(u,o);if(r.push(l),!t){if(t=n=l,i>4)return;const a=s[i+1],r=Math.abs(e[a]);r>Me[a].almost?(t=Se(u+1,o),n="almost "+t):r>Me[a].over&&(n="over "+l)}})),{qualified:n,rounded:t,abbreviated:a,englishValues:r}};var Ne=(e,t)=>{const n=function(e,t){const n=e.isBefore(t),a=n?t:e;let r=n?e:t;r=r.clone();const o={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(o).forEach((e=>{if(r.isSame(a,e))return;let t=r.diff(a,e);r=r.add(t,e),o[e]=t})),n&&Object.keys(o).forEach((e=>{0!==o[e]&&(o[e]*=-1)})),o}(e,t=$(t,e));if(!0===Object.keys(n).every((e=>!n[e])))return{diff:n,rounded:"now",qualified:"now",precise:"now",abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:"present"};let a,r="future",{rounded:o,qualified:i,englishValues:s,abbreviated:u}=qe(n);a=s.splice(0,2).join(", "),!0===e.isAfter(t)?(o+=" ago",i+=" ago",a+=" ago",r="past"):(o="in "+o,i="in "+i,a="in "+a);let l=De(n);return{diff:n,rounded:o,qualified:i,precise:a,abbreviated:u,iso:l,direction:r}};var Ie={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]]},Te=[null,[0,1],[3,1],[6,1],[9,1]];const Ee={second:e=>(A(e,{millisecond:0}),e),minute:e=>(A(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),A(e,{second:0,millisecond:0}),e},hour:e=>(A(e,{minute:0,second:0,millisecond:0}),e),day:e=>(A(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")),A(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(A(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Te[t]&&A(e,{month:Te[t][0],date:Te[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),n="north";"South"===e.hemisphere()&&(n="south");for(let a=0;a(A(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{let t=(e=e.startOf("year")).year(),n=10*parseInt(t/10,10);return e=e.year(n)},century:e=>{let t=(e=e.startOf("year")).year(),n=100*parseInt(t/100,10);return e=e.year(n)}};Ee.date=Ee.day;var Ce=function(e,t,n){if(!t||!n)return[];if(t=j(t),n=e.clone().set(n),e.isAfter(n)){let t=e;e=n,n=t}let a=e.clone();if(function(e){return!!ie().find((t=>t===e))||!!se().find((t=>t===e))}(t))a=a.next(t),t="week";else{a.startOf(t).isBefore(e)&&(a=a.next(t))}let r=[];for(;a.isBefore(n);)r.push(a),a=a.add(1,t);return r};var xe=e=>{let n=e.timezones,a=e.tz;if(!1===n.hasOwnProperty(a)&&(a=y(e.tz,n)),null===a)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let r=n[a],o={name:(i=a,i=(i=(i=(i=(i=(i=(i=i[0].toUpperCase()+i.substr(1)).replace(/[\/_-]([a-z])/gi,(e=>e.toUpperCase()))).replace(/_(of|es)_/i,(e=>e.toLowerCase()))).replace(/\/gmt/i,"/GMT")).replace(/\/Dumontdurville$/i,"/DumontDUrville")).replace(/\/Mcmurdo$/i,"/McMurdo")).replace(/\/Port-au-prince$/i,"/Port-au-Prince")),hasDst:Boolean(r.dst),default_offset:r.offset,hemisphere:"s"===r.hem?"South":"North",current:{}};var i,s;if(o.hasDst){let e=(s=r.dst)?s.split("->"):[];o.change={start:e[0],back:e[1]}}let u=r.offset,l=u;return!0===o.hasDst&&(l="North"===o.hemisphere?u-1:r.offset+1),!1===o.hasDst?(o.current.offset=u,o.current.isDST=!1):!0===t(e.epoch,o.change.start,o.change.back,u,l)?(o.current.offset=u,o.current.isDST="North"===o.hemisphere):(o.current.offset=l,o.current.isDST="South"===o.hemisphere),o};const Ae=["century","decade","year","month","date","day","hour","minute","second","millisecond"],Ye={set:function(e,t){let n=this.clone();return n=ae(n,e),t&&(this.tz=y(t)),n},timezone:function(){return xe(this)},isDST:function(){return xe(this).current.isDST},hasDST:function(){return xe(this).hasDst},offset:function(){return 60*xe(this).current.offset},hemisphere:function(){return xe(this).hemisphere},format:function(e){return fe(this,e)},unixFmt:function(e){return ge(this,e)},startOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Ee[t]?Ee[t](n):"summer"===t||"winter"===t?(n=n.season(t),Ee.season(n)):n})(this,e)},endOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Ee[t]?(n=Ee[t](n),n=n.add(1,t),n=n.subtract(1,"millisecond"),n):n})(this,e)},leapYear:function(){return g(this.year())},progress:function(e){return we(this,e)},nearest:function(e){return ve(this,e)},diff:function(e,t){return $e(this,e,t)},since:function(e){return e||(e=this.clone().set()),Ne(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=y(e,t.timezones),t},every:function(e,t){if("object"==typeof e&&"string"==typeof t){let n=t;t=e,e=n}return Ce(this,e,t)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},daysInMonth:function(){switch(this.month()){case 0:case 2:case 4:case 6:case 7:case 9:case 11:return 31;case 1:return this.leapYear()?29:28;case 3:case 5:case 8:case 10:return 30;default:throw new Error("Invalid Month state.")}},log:function(){return console.log(""),console.log(fe(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(fe(this,"full-short")),this},json:function(){return Ae.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=ie().indexOf(e);-1===t&&(t=se().indexOf(e)),-1===t&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};Ye.inDST=Ye.isDST,Ye.round=Ye.nearest,Ye.each=Ye.every;var Fe=Ye;const Pe=e=>("string"==typeof e&&(e=parseInt(e,10)),e),Le=["year","month","date","hour","minute","second","millisecond"],Be=(e,t,n)=>{let a=Le.indexOf(n),r=Le.slice(a,Le.length);for(let n=0;n=24?t=24:t<0&&(t=0);let a=e.clone(),r=e.hour()-t,o=r*E.hour;return e.epoch-=o,e.date()!==a.date()&&(e=a.clone(),r>1&&(r-=1),r<1&&(r+=1),o=r*E.hour,e.epoch-=o),A(e,{hour:t}),Be(e,a,"minute"),(e=He(e,a,n,"day")).epoch},Qe=function(e,t){return"string"==typeof t&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=(t=Number(t))>30?1900+t:2e3+t),t=Pe(t),A(e,{year:t}),e.epoch};let Ge="am",Ve="pm";const We={millisecond:function(e){if(void 0!==e){let t=this.clone();return t.epoch=function(e,t){t=Pe(t);let n=e.millisecond()-t;return e.epoch-n}(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Pe(t);let a=e.clone(),r=(e.second()-t)*E.second;return e.epoch=e.epoch-r,(e=He(e,a,n,"minute")).epoch}(n,e,t),n}return this.d.getSeconds()},minute:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=Ze(n,e,t),n}return this.d.getMinutes()},hour:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone();return n.epoch=Ue(n,e,t),n}return n.getHours()},hourFloat:function(e,t){if(void 0!==e){let n=this.clone(),a=e%1;a*=60;let r=parseInt(e,10);return n.epoch=Ue(n,r,t),n.epoch=Ze(n,a,t),n}let n=this.d,a=n.getHours(),r=n.getMinutes();return r/=60,a+r},hour12:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone(),a=(e=""+e).match(/^([0-9]+)(am|pm)$/);if(a){let e=parseInt(a[1],10);"pm"===a[2]&&(e+=12),n.epoch=Ue(n,e,t)}return n}let a=n.getHours();return a>12&&(a-=12),0===a&&(a=12),a},time:function(e,t){if(void 0!==e){let n=this.clone();return e=e.toLowerCase().trim(),n.epoch=function(e,t,n){let a=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!a){if(a=t.match(/([0-9]{1,2}) ?(am|pm)/),!a)return e.epoch;a.splice(2,0,"0"),a.splice(3,0,"")}let r=!1,o=parseInt(a[1],10),i=parseInt(a[2],10);i>=60&&(i=59),o>12&&(r=!0),!1===r&&("am"===a[4]&&12===o&&(o=0),"pm"===a[4]&&o<12&&(o+=12)),a[3]=a[3]||"",a[3]=a[3].replace(/:/,"");let s=parseInt(a[3],10)||0,u=e.clone();return e=(e=(e=(e=e.hour(o)).minute(i)).second(s)).millisecond(0),(e=He(e,u,n,"day")).epoch}(n,e,t),n}return`${this.h12()}:${w(this.minute())}${this.ampm()}`},ampm:function(e,t){let n=Ge,a=this.hour();if(a>=12&&(n=Ve),"string"!=typeof e)return n;let r=this.clone();return e=e.toLowerCase().trim(),a>=12&&"am"===e?(a-=12,r.hour(a,t)):a<12&&"pm"===e?(a+=12,r.hour(a,t)):r},dayTime:function(e,t){if(void 0!==e){const n={morning:"7:00",breakfast:"7:00",noon:"12:00",lunch:"12:00",afternoon:"14:00",evening:"18:00",dinner:"18:00",night:"23:00",midnight:"00:00"};let a=this.clone();return e=(e=e||"").toLowerCase(),!0===n.hasOwnProperty(e)&&(a=a.time(n[e],t)),a}let n=this.hour();return n<6?"night":n<12?"morning":n<17?"afternoon":n<22?"evening":"night"},iso:function(e){return void 0!==e?this.set(e):this.format("iso")}};var Je=We;const Ke={date:function(e,t){if(void 0!==e){let n=this.clone();return(e=parseInt(e,10))&&(n.epoch=function(e,t,n){if((t=Pe(t))>28){let n=e.month(),a=Y[n];1===n&&29===t&&g(e.year())&&(a=29),t>a&&(t=a)}t<=0&&(t=1);let a=e.clone();return A(e,{date:t}),(e=He(e,a,n,"month")).epoch}(n,e,t)),n}return this.d.getDate()},day:function(e,t){if(void 0===e)return this.d.getDay();let n=this.clone(),a=e;"string"==typeof e&&(e=e.toLowerCase(),ue.hasOwnProperty(e)?a=ue[e]:(a=ie().indexOf(e),-1===a&&(a=se().indexOf(e))));let r=this.d.getDay()-a;!0===t&&r>0&&(r-=7),!1===t&&r<0&&(r+=7);let o=this.subtract(r,"days");return A(o,{hour:n.hour(),minute:n.minute(),second:n.second()}),o},dayName:function(e,t){if(void 0===e)return se()[this.day()];let n=this.clone();return n=n.day(e,t),n}};var Re=Ke;const Xe=e=>e=(e=(e=e.minute(0)).second(0)).millisecond(1),et={dayOfYear:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Pe(t);let a=e.clone();return(t-=1)<=0?t=0:t>=365&&(t=g(e.year())?365:364),e=(e=e.startOf("year")).add(t,"day"),Be(e,a,"hour"),(e=He(e,a,n,"year")).epoch}(n,e,t),n}let n,a=0,r=this.d.getMonth();for(let e=1;e<=r;e++)n=new Date,n.setDate(1),n.setFullYear(this.d.getFullYear()),n.setHours(1),n.setMinutes(1),n.setMonth(e),n.setHours(-2),a+=n.getDate();return a+this.d.getDate()},week:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){let a=e.clone();return t=Pe(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=He(e,a,n,"year")).epoch}(this,e,t),n=Xe(n),n}let n=this.clone();n=n.month(0),n=n.date(1),n=Xe(n),n=n.day("monday"),11===n.month()&&n.date()>=25&&(n=n.add(1,"week"));let a=1;1===n.date()&&(a=0),n=n.minus(1,"second");const r=this.epoch;if(n.epoch>r)return 1;let o=0,i=4*this.month();for(n.epoch+=E.week*i,o+=i;o<=52;o++){if(n.epoch>r)return o+a;n=n.add(1,"week")}return 52},month:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){"string"==typeof t&&("sept"===t&&(t="sep"),t=B()[t.toLowerCase()]),(t=Pe(t))>=12&&(t=11),t<=0&&(t=0);let a=e.date();a>Y[t]&&(a=Y[t]);let r=e.clone();return A(e,{month:t,d:a}),(e=He(e,r,n,"year")).epoch}(n,e,t),n}return this.d.getMonth()},monthName:function(e,t){if(void 0!==e){let n=this.clone();return n=n.month(e,t),n}return P[this.month()]},quarter:function(e,t){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Te[e])){let n=this.clone(),a=Te[e][0];return n=n.month(a,t),n=n.date(1,t),n=n.startOf("day"),n}let n=this.d.getMonth();for(let e=1;e=Ie[n][e][1]&&a0&&(t.epoch=Qe(t,-1*n)),"ad"===e&&n<0&&(t.epoch=Qe(t,-1*n)),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,n)=>(n.match(/b\.?c\.?/i)&&(t="-"+t),t)))).replace(/c$/,""));let t=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(0===t&&(t=1),t=t>=0?100*(t-1):100*(t+1),this.year(t))}let t=this.startOf("century").year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(void 0!==e){if("string"==typeof e&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=Number(e),isNaN(e)))return console.warn("Spacetime: Invalid millenium input"),this;e>0&&(e-=1);let t=1e3*e;return 0===t&&(t=1),this.year(t)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}};var tt=et;const nt=Object.assign({},Je,Re,tt);nt.milliseconds=nt.millisecond,nt.seconds=nt.second,nt.minutes=nt.minute,nt.hours=nt.hour,nt.hour24=nt.hour,nt.h12=nt.hour12,nt.h24=nt.hour24,nt.days=nt.day;var at=e=>{Object.keys(nt).forEach((t=>{e.prototype[t]=nt[t]}))};const rt=function(e,t){return 1===e&&g(t)?29:Y[e]},ot=(e,t)=>{if(e.month>0){let n=parseInt(e.month/12,10);e.year=t.year()+n,e.month=e.month%12}else if(e.month<0){let n=Math.abs(e.month),a=parseInt(n/12,10);n%12!=0&&(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},it=(e,t,n)=>{let a=t.year(),r=t.month(),o=rt(r,a);for(;n>o;)n-=o,r+=1,r>=12&&(r-=12,a+=1),o=rt(r,a);return e.month=r,e.date=n,e},st=(e,t,n)=>{e.year=t.year(),e.month=t.month();let a=t.date();for(e.date=a-Math.abs(n);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let t=rt(e.month,e.year);e.date+=t}return e},ut=["millisecond","second","minute","hour","date","month"];let lt={second:ut.slice(0,1),minute:ut.slice(0,2),quarterhour:ut.slice(0,2),hour:ut.slice(0,3),date:ut.slice(0,4),month:ut.slice(0,4),quarter:ut.slice(0,4),season:ut.slice(0,4),year:ut,decade:ut,century:ut};lt.week=lt.hour,lt.season=lt.date,lt.quarter=lt.date;const ct={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},ht={month:!0,quarter:!0,season:!0,year:!0};var dt=e=>{e.prototype.add=function(e,t){let n=this.clone();if(!t||0===e)return n;let a=this.clone();if("millisecond"===(t=j(t)))return n.epoch+=e,n;"fortnight"===t&&(e*=2,t="week"),E[t]?n.epoch+=E[t]*e:"week"===t||"weekend"===t?n.epoch+=E.day*(7*e):"quarter"===t||"season"===t?n.epoch+=E.month*(3*e):"quarterhour"===t&&(n.epoch+=15*E.minute*e);let r={};if(lt[t]&<[t].forEach((e=>{r[e]=a[e]()})),ct[t]){const e=a.timezone().current.offset-n.timezone().current.offset;n.epoch+=3600*e*1e3}if("month"===t&&(r.month=a.month()+e,r=ot(r,a)),"week"===t){let t=a.date()+7*e;t<=28&&t>1&&(r.date=t)}if("weekend"===t&&"saturday"!==n.dayName())n=n.day("saturday",!0);else if("date"===t){if(e<0)r=st(r,a,e);else{let t=a.date()+e;r=it(r,a,t)}0!==e&&a.isSame(n,"day")&&(r.date=a.date()+e)}else if("quarter"===t){if(r.month=a.month()+3*e,r.year=a.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=a.date()}else if("year"===t){let t=a.year()+e,r=n.year();if(rt){let t=Math.floor(e/4)||1;n.epoch+=E.day*t}}else"decade"===t?r.year=n.year()+10:"century"===t&&(r.year=n.year()+100);if(ht[t]){let e=Y[r.month];r.date=a.date(),r.date>e&&(r.date=e)}return Object.keys(r).length>1&&A(n,r),n},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 mt={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()};mt.date=mt.day;var ft=e=>{e.prototype.isSame=function(t,n,a=!0){let r=this;if(!n)return null;if("string"==typeof t&&"object"==typeof n){let e=t;t=n,n=e}return"string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),n=n.replace(/s$/,""),!0===a&&r.tz!==t.tz&&((t=t.clone()).tz=r.tz),mt[n]?mt[n](r)===mt[n](t):null}};var pt=e=>{const t={isAfter:function(e){let t=z(e=$(e,this));return null===t?null:this.epoch>t},isBefore:function(e){let t=z(e=$(e,this));return null===t?null:this.epoch{e.prototype[n]=t[n]}))};var yt=e=>{const t={i18n:function(e){var t,n,a;return k(e.days)&&(t=e.days,re=t.short||re,oe=t.long||oe),k(e.months)&&function(e){F=e.short||F,P=e.long||P}(e.months),a=e.useTitleCase,"[object Boolean]"===Object.prototype.toString.call(a)&&(n=e.useTitleCase,le=n),k(e.ampm)&&function(e){Ge=e.am||Ge,Ve=e.pm||Ve}(e.ampm),this}};Object.keys(t).forEach((n=>{e.prototype[n]=t[n]}))};let gt=i;const bt=function(e,t,a={}){this.epoch=null,this.tz=y(t,gt),this.silent=void 0===a.silent||a.silent,this.british=a.dmy||a.british,this._weekStart=1,void 0!==a.weekStart&&(this._weekStart=a.weekStart),this._today={},void 0!==a.today&&(this._today=a.today),Object.defineProperty(this,"d",{get:function(){let e=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:()=>gt,set:e=>(gt=e,e)});let r=ae(this,e);this.epoch=r.epoch};Object.keys(Fe).forEach((e=>{bt.prototype[e]=Fe[e]})),bt.prototype.clone=function(){return new bt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})},bt.prototype.toLocalDate=function(){return this.toNativeDate()},bt.prototype.toNativeDate=function(){return new Date(this.epoch)},at(bt),dt(bt),ft(bt),pt(bt),yt(bt);var kt=bt;var wt=(e,t)=>{let n=new kt(null),a=new kt(null);n=n.time(e),a=t?a.time(t):n.add(59,"minutes");let r=n.hour(),o=a.hour();return Object.keys(n.timezones).filter((e=>{if(-1===e.indexOf("/"))return!1;let t=new kt(null,e),i=t.hour();return i>=r&&i<=o&&(!(i===r&&t.minute()a.minute()))}))};const vt=(e,t,n)=>new kt(e,t,n),_t=function(e){let t=e._today||{};return Object.keys(t).forEach((n=>{e=e[n](t[n])})),e};return vt.now=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n},vt.today=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.startOf("day")},vt.tomorrow=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.add(1,"day").startOf("day")},vt.yesterday=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.subtract(1,"day").startOf("day")},vt.extend=function(e={}){return Object.keys(e).forEach((t=>{kt.prototype[t]=e[t]})),this},vt.timezones=function(){return(new kt).timezones},vt.max=function(e,t){let n=new kt(null,e,t);return n.epoch=864e13,n},vt.min=function(e,t){let n=new kt(null,e,t);return n.epoch=-864e13,n},vt.whereIts=wt,vt.version="7.4.8",vt.plugin=vt.extend,vt})); +!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).spacetime=t()}(this,(function(){"use strict";const e=(e,t,n)=>{const[r,a]=e.split("/"),[o,i]=a.split(":");return Date.UTC(n,r-1,o,i)-36e5*t};var t=(t,n,r,a,o)=>{const i=new Date(t).getUTCFullYear(),s=e(n,o,i),u=e(r,a,i);return t>=s&&t{let n=e.timezones[e.tz];if(void 0===n)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(void 0===n.dst)return n.offset;let r=n.offset,a=n.offset+1;"n"===n.hem&&(a=r-1);let o=n.dst.split("->");return!0===t(e.epoch,o[0],o[1],r,a)?r:a},r={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok","9.5|s|04/07:03->10/06:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/13:01->10/02:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,hongkong,prc,roc","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/yangon,9/cocos,2/rangoon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/kolkata,2/colombo,2/calcutta","4|s":"9/reunion","4|n":"2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|04/28:00->10/26:24":"0/cairo,egypt","3|n|03/31:03->10/27:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,eet","3|n|03/31:02->10/27:03":"8/chisinau,8/tiraspol","3|n|03/31:00->10/26:24":"2/beirut","3|n|03/31:00->10/25:01":"2/gaza,2/hebron","3|n|03/29:02->10/27:02":"2/jerusalem,2/tel_aviv,israel","3|n|03/26:03->10/29:04":"8/kyiv,8/kiev","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su","3.5|n":"2/tehran,iran","2|s|03/31:02->10/27:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/31:02->10/27:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met","2|n":"0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|03/31:01->10/27:02":"3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s":"11/apia,11/tongatapu","13|n":"11/enderbury,11/kanton,11/fakaofo","12|s|04/07:03->09/29:02":"12/mcmurdo,11/auckland,12/south_pole,nz","12|s":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein","12.75|s|04/07:03->04/07:02":"11/chatham,nz-chat","11|s|04/07:03->10/06:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n|04/07:03->10/06:02":"11/norfolk","10|s|04/07:03->10/06:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap","10.5|s|04/07:01->10/06:02":"4/lord_howe,4/lhi","0|s|03/10:03->04/14:02":"0/casablanca,0/el_aaiun","0|n|03/31:00->10/27:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory","-9|n|03/10:02->11/03:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/10:02->11/03:02":"1/anchorage,1/juneau,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"1/metlakatla,11/pitcairn","-7|n|03/10:02->11/03:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n":"1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst","-6|s|04/06:22->09/07:22":"11/easter,7/easterisland","-6|n|04/07:02->10/27:02":"1/merida","-6|n|03/12:02->11/05:02":"1/ciudad_juarez","-6|n|03/10:02->11/03:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain","-6|n":"1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|03/10:02->11/03:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est","-4|s|04/06:24->09/08:00":"1/santiago,7/continental","-4|s|03/23:24->10/06:00":"1/asuncion","-4|s":"1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west","-4|n|03/10:02->11/03:02":"1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/10:00->11/03:01":"1/havana,cuba","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east","-3|n|03/10:02->11/03:02":"1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic","-3|n":"1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem","-2|n|03/30:22->10/26:23":"1/nuuk,1/godthab","-2|n|03/10:02->11/03:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/10:02->11/03:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst"},a=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let o={};Object.keys(r).forEach((e=>{let t=e.split("|"),n={offset:Number(t[0]),hem:t[1]};t[2]&&(n.dst=t[2]),r[e].split(",").forEach((e=>{e=e.replace(/(^[0-9]+)\//,((e,t)=>(t=Number(t),a[t]+"/"))),o[e]=n}))})),o.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let n="etc/gmt"+t;o[n]={offset:-1*e,hem:"n"},n="utc/gmt"+t,o[n]={offset:-1*e,hem:"n"}}var i=o;var s=()=>{let e=(()=>{if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;let e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null})();return null===e?"utc":e};const u=/(\-?[0-9]+)h(rs)?/i,l=/(\-?[0-9]+)/,c=/utc([\-+]?[0-9]+)/i,h=/gmt([\-+]?[0-9]+)/i,d=function(e){return(e=Number(e))>=-13&&e<=13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null};var m=function(e){let t=e.match(u);if(null!==t)return d(t[1]);if(t=e.match(c),null!==t)return d(t[1]);if(t=e.match(h),null!==t){let e=-1*Number(t[1]);return d(e)}return t=e.match(l),null!==t?d(t[1]):null};let f=s();const p=Object.keys(i).reduce(((e,t)=>{let n=t.split("/")[1]||"";return n=n.replace(/_/g," "),e[n]=t,e}),{});var y=(e,t)=>{if(!e)return t.hasOwnProperty(f)||(console.warn(`Unrecognized IANA id '${f}'. Setting fallback tz to UTC.`),f="utc"),f;"string"!=typeof e&&console.error("Timezone must be a string - recieved: '",e,"'\n");let n=e.trim();if(n=n.toLowerCase(),!0===t.hasOwnProperty(n))return n;if(n=(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"))(n),!0===t.hasOwnProperty(n))return n;if(!0===p.hasOwnProperty(n))return p[n];if(!0===/[0-9]/.test(n)){let e=m(n);if(e)return e}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function g(e){return e%4==0&&e%100!=0||e%400==0}function b(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())}function k(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e,t=2){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function v(e){let t=e%10,n=e%100;return 1===t&&11!==n?e+"st":2===t&&12!==n?e+"nd":3===t&&13!==n?e+"rd":e+"th"}function _(e){return e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function j(e=""){return"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===e?"date":"min"===e||"mins"===e?"minute":e}function $(e){return"number"==typeof e?e:b(e)?e.getTime():e.epoch?e.epoch:null}function z(e,t){return!1===k(e)?t.clone().set(e):e}function O(e,t=""){const n=e>0?"+":"-",r=Math.abs(e);return`${n}${w(parseInt(""+r,10))}${t}${w(r%1*60)}`}const D={year:(new Date).getFullYear(),month:0,date:1};var M={parseArray:(e,t,n)=>{if(0===t.length)return e;let r=["year","month","date","hour","minute","second","millisecond"];for(let a=0;a{if(0===Object.keys(t).length)return e;t=Object.assign({},D,n,t);let r=Object.keys(t);for(let a=0;a0&&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 S=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach((t=>{"function"==typeof e[t]&&(e=e[t](e._today[t]))})),e},q={now:e=>S(e),today:e=>S(e),tonight:e=>e=(e=S(e)).hour(18),tomorrow:e=>e=(e=(e=S(e)).add(1,"day")).startOf("day"),yesterday:e=>e=(e=(e=S(e)).subtract(1,"day")).startOf("day"),christmas:e=>{let t=S(e).year();return e=e.set([t,11,25,18,0,0])},"new years":e=>{let t=S(e).year();return e=e.set([t,11,31,18,0,0])}};q["new years eve"]=q["new years"];var N=q;var I=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 T={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};T.date=T.day,T.month=25488e5,T.week=6048e5,T.year=3154e7,Object.keys(T).forEach((e=>{T[e+"s"]=T[e]}));var E=T;const C=(e,t,n,r,a)=>{let o=e.d[n]();if(o===t)return;let i=null===a?null:e.d[a](),s=e.epoch,u=t-o;e.epoch+=E[r]*u,"day"===r&&Math.abs(u)>28&&t<28&&(e.epoch+=E.hour),null!==a&&i!==e.d[a]()&&(e.epoch=s);const l=E[r]/2;for(;e.d[n]()t;)e.epoch-=l;null!==a&&i!==e.d[a]()&&(e.epoch=s)},x={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>C(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let n=e.d,r=n.getMonth(),a=e.epoch,o=n.getFullYear();if(r===t)return;let i=t-r;for(e.epoch+=E.day*(28*i),o!==e.d.getFullYear()&&(e.epoch=a);e.d.getMonth()t;)e.epoch-=E.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>C(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>C(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>C(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 A=(e,t)=>{let n=Object.keys(x),r=e.clone();for(let a=0;a{if(!t)return e;let n=0;if(/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(!0===/:00/.test(t)&&(t=t.replace(/:00/,"")),!0===/:30/.test(t)&&(t=t.replace(/:30/,".5"))),/^[\+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,".5")),n=parseFloat(t),Math.abs(n)>100&&(n/=100),0===n||"Z"===t||"z"===t)return e.tz="etc/gmt",e;n*=-1,n>=0&&(n="+"+n);let r="etc/gmt"+n;return e.timezones[r]&&(e.tz=r),e};var Z=(e,t="")=>{let n=(t=t.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==n){let r=Number(n[1]);if(r<0||r>24)return e.startOf("day");let a=Number(n[2]);if(n[2].length<2||a<0||a>59)return e.startOf("day");e=(e=(e=(e=e.hour(r)).minute(a)).seconds(n[3]||0)).millisecond(function(e=""){return(e=String(e)).length>3?e=e.substr(0,3):1===e.length?e+="00":2===e.length&&(e+="0"),Number(e)||0}(n[4]));let o=t.match(/[\b0-9] ?(am|pm)\b/);return null!==o&&o[1]&&(e=e.ampm(o[1])),e}if(n=t.match(/([0-9]+) ?(am|pm)/),null!==n&&n[1]){let t=Number(n[1]);return t>12||t<1?e.startOf("day"):e=(e=(e=e.hour(n[1]||0)).ampm(n[2])).startOf("hour")}return e=e.startOf("day")};let U=B();const Q=e=>{if(!0!==Y.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(g(e.year)&&e.date<=29)||e.date<=28;let t=Y[e.month]||0;return e.date<=t},G=(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 n=parseInt(e,10);return!n&&t&&(n=t.year),n=n||(new Date).getFullYear(),n},V=function(e){return"sept"===(e=e.toLowerCase().trim())?U.sep:U[e]};var W=[{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 n=parseInt(t[1],10)-1,r=parseInt(t[2],10);(e.british||n>=12)&&(r=parseInt(t[1],10),n=parseInt(t[2],10)-1);let a={date:r,month:n,year:G(t[3],e._today)||(new Date).getFullYear()};return!1===Q(a)?(e.epoch=null,e):(A(e,a),e=Z(e,t[4]))}},{reg:/^([a-z]+)[\-\/\. ]([0-9]{1,2})[\-\/\. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9:]+)?( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[5],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[3]))}}],J=[{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:1};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let n={year:G(t[2],e._today),month:V(t[1]),date:e._today.date||1};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.quarter(n);let r=t[3]||"";return r&&(r=r.trim(),e=e.year(r)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.season(n);let r=t[3]||"";return r&&(r=r.trim(),e=e.year(r)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let r=new Date,a={year:parseInt(n.trim(),10),month:r.getMonth(),date:r.getDate()};return!1===Q(a)?(e.epoch=null,e):(A(e,a),e=Z(e))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/,/g,"");let r=new Date,a={year:parseInt(n.trim(),10),month:r.getMonth(),date:r.getDate()};return!1===Q(a)?(e.epoch=null,e):(A(e,a),e=Z(e))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let n=e._today;n.month&&!n.date&&(n.date=1);let r=new Date,a={year:G(t[0],n),month:n.month||r.getMonth(),date:n.date||r.getDate()};return!1===Q(a)?(e.epoch=null,e):(A(e,a),e=Z(e))}}],K=[].concat([{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return!1===Q(n)?(e.epoch=null,e):(H(e,t[5]),A(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([0-9]{1,2})[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return n.month>=12&&(n.date=parseInt(t[2],10),n.month=parseInt(t[3],10)-1),!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([a-z]+)[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[1],e._today),month:V(t[2]),date:_(t[3]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}}],W,[{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1]||"")};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1])};return n.month&&!1!==Q(n)?(A(e,n),e=Z(e,t[4])):(e.epoch=null,e)}},{reg:/^([0-9]{1,2})[\. -/]([a-z]+)[\. -/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={date:Number(t[1]),month:V(t[2]),year:Number(t[3])};return!1===Q(n)?(e.epoch=null,e):(A(e,n),e=e.startOf("day"),e=Z(e,t[4]))}}],J);var R=function(e,t,n){for(let r=0;r{let n=e._today||ne;if("number"==typeof t)return te(e,t);if(e.epoch=Date.now(),e._today&&k(e._today)&&Object.keys(e._today).length>0){let t=ee(e,n,ne);t.isValid()&&(e.epoch=t.epoch)}return null==t||""===t?e:!0===b(t)?(e.epoch=t.getTime(),e):!0===function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t)?e=X(e,t,n):!0===k(t)?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):e=ee(e,t,n):"string"!=typeof t?e:(t=I(t),!0===N.hasOwnProperty(t)?e=N[t](e):R(e,t))};let ae=["sun","mon","tue","wed","thu","fri","sat"],oe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ie(){return ae}function se(){return oe}const ue={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 le=!0;var ce=e=>{let t=e.timezone().current.offset;return t?O(t,":"):"Z"};const he=e=>le?function(e){return e?e[0].toUpperCase()+e.substr(1):""}(e):e,de={day:e=>he(e.dayName()),"day-short":e=>he(ie()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>v(e.day()),"day-pad":e=>w(e.day()),date:e=>e.date(),"date-ordinal":e=>v(e.date()),"date-pad":e=>w(e.date()),month:e=>he(e.monthName()),"month-short":e=>he(L()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>v(e.month()),"month-pad":e=>w(e.month()),"iso-month":e=>w(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+" BC")},"year-short":e=>{let t=e.year();return t>0?`'${String(e.year()).substr(2,4)}`:(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),n=t<0,r=w(Math.abs(t),4);return n&&(r=w(r,6),r="-"+r),r},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${w(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>w(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>w(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>w(e.minute()),second:e=>e.second(),"second-pad":e=>w(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>w(e.millisecond(),3),ampm:e=>e.ampm(),AMPM:e=>e.ampm().toUpperCase(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>ce(e),numeric:e=>`${e.year()}/${w(e.month()+1)}/${w(e.date())}`,"numeric-us":e=>`${w(e.month()+1)}/${w(e.date())}/${e.year()}`,"numeric-uk":e=>`${w(e.date())}/${w(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${w(e.month()+1)}/${w(e.date())}`,iso:e=>`${e.format("iso-year")}-${w(e.month()+1)}-${w(e.date())}T${w(e.h24())}:${w(e.minute())}:${w(e.second())}.${w(e.millisecond(),3)}${ce(e)}`,"iso-short":e=>{let t=w(e.month()+1),n=w(e.date());var r;return`${(r=e.year())>=0?w(r,4):"-"+w(r=Math.abs(r),4)}-${t}-${n}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${L()[e.month()]} ${v(e.date())}, ${e.time()}`,"nice-24":e=>`${L()[e.month()]} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`,"nice-year":e=>`${L()[e.month()]} ${v(e.date())}, ${e.year()}`,"nice-day":e=>`${ie()[e.day()]} ${he(L()[e.month()])} ${v(e.date())}`,"nice-full":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`},me={"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(me).forEach((e=>de[e]=de[me[e]]));var fe=(e,t="")=>{if(!0!==e.isValid())return"";if(de.hasOwnProperty(t)){let n=de[t](e)||"";return"json"!==t&&(n=String(n),"ampm"!==t.toLowerCase()&&(n=he(n))),n}if(-1!==t.indexOf("{")){let n=/\{(.+?)\}/g;return t=t.replace(n,((t,n)=>{if(n=n.toLowerCase().trim(),de.hasOwnProperty(n)){let t=String(de[n](e));return"ampm"!==n.toLowerCase()?he(t):t}return""})),t}return e.format("iso-short")};const pe={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=>w(Number(String(e.year()).substr(2,4))),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>"0"+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>w(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>w(e.week()),d:e=>e.date(),dd:e=>w(e.date()),D:e=>e.dayOfYear(),DD:e=>w(e.dayOfYear()),DDD:e=>w(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=>w(e.h12()),H:e=>e.hour(),HH:e=>w(e.hour()),m:e=>e.minute(),mm:e=>w(e.minute()),s:e=>e.second(),ss:e=>w(e.second()),SSS:e=>w(e.millisecond(),3),A:e=>e.epoch-e.startOf("day").epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>O(e.timezone().current.offset),ZZ:e=>O(e.timezone().current.offset),ZZZ:e=>O(e.timezone().current.offset),ZZZZ:e=>O(e.timezone().current.offset,":")},ye=(e,t,n)=>{let r=e,a=t;for(let o=0;o{let n=t.split("");return n=function(e){for(let t=0;te))}(n),n=function(e){for(let t=0;te))).map((e=>("''"===e&&(e="'"),e)))}(n),n.reduce(((t,n)=>(void 0!==pe[n]?t+=pe[n](e)||"":(/^'.{1,}'$/.test(n)&&(n=n.replace(/'/g,"")),t+=n),t)),"")};const be=["year","season","quarter","month","week","day","quarterHour","hour","minute"],ke=function(e,t){let n=e.clone().startOf(t),r=e.clone().endOf(t).epoch-n.epoch,a=(e.epoch-n.epoch)/r;return parseFloat(a.toFixed(2))};var we=(e,t)=>{if(t)return t=j(t),ke(e,t);let n={};return be.forEach((t=>{n[t]=ke(e,t)})),n};var ve=(e,t)=>{let n=e.progress();return"quarterhour"===(t=j(t))&&(t="quarterHour"),void 0!==n[t]?(n[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):!1===e.silent&&console.warn("no known unit '"+t+"'"),e};const _e=(e,t,n)=>{let r=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,n),r+=1;return e.isAfter(t,n)&&(r-=1),r};var je=(e,t,n)=>e.isBefore(t)?_e(e,t,n):-1*_e(t,e,n);var $e=function(e,t){let n=t.epoch-e.epoch,r={milliseconds:n,seconds:parseInt(n/1e3,10)};r.minutes=parseInt(r.seconds/60,10),r.hours=parseInt(r.minutes/60,10);let a=e.clone();return r.years=((e,t)=>{let n=t.year()-e.year();return(e=e.year(t.year())).isAfter(t)&&(n-=1),n})(a,t),a=e.add(r.years,"year"),r.months=12*r.years,a=e.add(r.months,"month"),r.months+=je(a,t,"month"),r.quarters=4*r.years,r.quarters+=parseInt(r.months%12/3,10),r.weeks=52*r.years,a=e.add(r.weeks,"week"),r.weeks+=je(a,t,"week"),r.days=7*r.weeks,a=e.add(r.days,"day"),r.days+=je(a,t,"day"),r};var ze=function(e,t,n){t=z(t,e);let r=!1;if(e.isAfter(t)){let n=e;e=t,t=n,r=!0}let a=$e(e,t);return r&&(a=function(e){return Object.keys(e).forEach((t=>{e[t]*=-1})),e}(a)),n?(n=j(n),!0!==/s$/.test(n)&&(n+="s"),"dates"===n&&(n="days"),a[n]):a};const Oe=e=>Math.abs(e)||0;var De=function(e){let t="P";return t+=Oe(e.years)+"Y",t+=Oe(e.months)+"M",t+=Oe(e.days)+"DT",t+=Oe(e.hours)+"H",t+=Oe(e.minutes)+"M",t+=Oe(e.seconds)+"S",t};let Me={second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years"};function Se(e){return Me[e]||""}let qe="past",Ne="future",Ie="present",Te="now",Ee="almost",Ce="over",xe=e=>`${e} ago`,Ae=e=>`in ${e}`;function Ye(e){return xe(e)}function Fe(e){return Ae(e)}function Pe(){return Te}const Le={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 Be(e,t){return 1===e?e+" "+Se(t.slice(0,-1)):e+" "+Se(t)}var He=function(e){let t=null,n=null,r=[],a=[];return Object.keys(e).forEach(((o,i,s)=>{const u=Math.abs(e[o]);if(0===u)return;r.push(u+o[0]);const l=Be(u,o);if(a.push(l),!t){if(t=n=l,i>4)return;const r=s[i+1],a=Math.abs(e[r]);a>Le[r].almost?(t=Be(u+1,o),n=Ee+" "+t):a>Le[r].over&&(n=Ce+" "+l)}})),{qualified:n,rounded:t,abbreviated:r,englishValues:a}};var Ze=(e,t)=>{const n=function(e,t){const n=e.isBefore(t),r=n?t:e;let a=n?e:t;a=a.clone();const o={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(o).forEach((e=>{if(a.isSame(r,e))return;let t=a.diff(r,e);a=a.add(t,e),o[e]=t})),n&&Object.keys(o).forEach((e=>{0!==o[e]&&(o[e]*=-1)})),o}(e,t=z(t,e));if(!0===Object.keys(n).every((e=>!n[e])))return{diff:n,rounded:Pe(),qualified:Pe(),precise:Pe(),abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:Ie};let r,a=Ne,{rounded:o,qualified:i,englishValues:s,abbreviated:u}=He(n);r=s.splice(0,2).join(", "),!0===e.isAfter(t)?(o=Ye(o),i=Ye(i),r=Ye(r),a=qe):(o=Fe(o),i=Fe(i),r=Fe(r));let l=De(n);return{diff:n,rounded:o,qualified:i,precise:r,abbreviated:u,iso:l,direction:a}};var Ue={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]]},Qe=[null,[0,1],[3,1],[6,1],[9,1]];const Ge={second:e=>(A(e,{millisecond:0}),e),minute:e=>(A(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),A(e,{second:0,millisecond:0}),e},hour:e=>(A(e,{minute:0,second:0,millisecond:0}),e),day:e=>(A(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")),A(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(A(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Qe[t]&&A(e,{month:Qe[t][0],date:Qe[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),n="north";"South"===e.hemisphere()&&(n="south");for(let r=0;r(A(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{let t=(e=e.startOf("year")).year(),n=10*parseInt(t/10,10);return e=e.year(n)},century:e=>{let t=(e=e.startOf("year")).year(),n=100*parseInt(t/100,10);return e=e.year(n)}};Ge.date=Ge.day;var Ve=function(e,t,n){if(!t||!n)return[];if(t=j(t),n=e.clone().set(n),e.isAfter(n)){let t=e;e=n,n=t}let r=e.clone();if(function(e){return!!ie().find((t=>t===e))||!!se().find((t=>t===e))}(t))r=r.next(t),t="week";else{r.startOf(t).isBefore(e)&&(r=r.next(t))}let a=[];for(;r.isBefore(n);)a.push(r),r=r.add(1,t);return a};var We=e=>{let n=e.timezones,r=e.tz;if(!1===n.hasOwnProperty(r)&&(r=y(e.tz,n)),null===r)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let a=n[r],o={name:(i=r,i=(i=(i=(i=(i=(i=(i=i[0].toUpperCase()+i.substr(1)).replace(/[\/_-]([a-z])/gi,(e=>e.toUpperCase()))).replace(/_(of|es)_/i,(e=>e.toLowerCase()))).replace(/\/gmt/i,"/GMT")).replace(/\/Dumontdurville$/i,"/DumontDUrville")).replace(/\/Mcmurdo$/i,"/McMurdo")).replace(/\/Port-au-prince$/i,"/Port-au-Prince")),hasDst:Boolean(a.dst),default_offset:a.offset,hemisphere:"s"===a.hem?"South":"North",current:{}};var i,s;if(o.hasDst){let e=(s=a.dst)?s.split("->"):[];o.change={start:e[0],back:e[1]}}let u=a.offset,l=u;return!0===o.hasDst&&(l="North"===o.hemisphere?u-1:a.offset+1),!1===o.hasDst?(o.current.offset=u,o.current.isDST=!1):!0===t(e.epoch,o.change.start,o.change.back,u,l)?(o.current.offset=u,o.current.isDST="North"===o.hemisphere):(o.current.offset=l,o.current.isDST="South"===o.hemisphere),o};const Je=["century","decade","year","month","date","day","hour","minute","second","millisecond"],Ke={set:function(e,t){let n=this.clone();return n=re(n,e),t&&(this.tz=y(t)),n},timezone:function(){return We(this)},isDST:function(){return We(this).current.isDST},hasDST:function(){return We(this).hasDst},offset:function(){return 60*We(this).current.offset},hemisphere:function(){return We(this).hemisphere},format:function(e){return fe(this,e)},unixFmt:function(e){return ge(this,e)},startOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Ge[t]?Ge[t](n):"summer"===t||"winter"===t?(n=n.season(t),Ge.season(n)):n})(this,e)},endOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Ge[t]?(n=Ge[t](n),n=n.add(1,t),n=n.subtract(1,"millisecond"),n):n})(this,e)},leapYear:function(){return g(this.year())},progress:function(e){return we(this,e)},nearest:function(e){return ve(this,e)},diff:function(e,t){return ze(this,e,t)},since:function(e){return e||(e=this.clone().set()),Ze(this,e)},next:function(e){return this.add(1,e).startOf(e)},last:function(e){return this.subtract(1,e).startOf(e)},isValid:function(){return!(!this.epoch&&0!==this.epoch)&&!isNaN(this.d.getTime())},goto:function(e){let t=this.clone();return t.tz=y(e,t.timezones),t},every:function(e,t){if("object"==typeof e&&"string"==typeof t){let n=t;t=e,e=n}return Ve(this,e,t)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},daysInMonth:function(){switch(this.month()){case 0:case 2:case 4:case 6:case 7:case 9:case 11:return 31;case 1:return this.leapYear()?29:28;case 3:case 5:case 8:case 10:return 30;default:throw new Error("Invalid Month state.")}},log:function(){return console.log(""),console.log(fe(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(fe(this,"full-short")),this},json:function(){return Je.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=ie().indexOf(e);-1===t&&(t=se().indexOf(e)),-1===t&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};Ke.inDST=Ke.isDST,Ke.round=Ke.nearest,Ke.each=Ke.every;var Re=Ke;const Xe=e=>("string"==typeof e&&(e=parseInt(e,10)),e),et=["year","month","date","hour","minute","second","millisecond"],tt=(e,t,n)=>{let r=et.indexOf(n),a=et.slice(r,et.length);for(let n=0;n=24?t=24:t<0&&(t=0);let r=e.clone(),a=e.hour()-t,o=a*E.hour;return e.epoch-=o,e.date()!==r.date()&&(e=r.clone(),a>1&&(a-=1),a<1&&(a+=1),o=a*E.hour,e.epoch-=o),A(e,{hour:t}),tt(e,r,"minute"),(e=nt(e,r,n,"day")).epoch},ot=function(e,t){return"string"==typeof t&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=(t=Number(t))>30?1900+t:2e3+t),t=Xe(t),A(e,{year:t}),e.epoch};let it="am",st="pm";const ut={millisecond:function(e){if(void 0!==e){let t=this.clone();return t.epoch=function(e,t){t=Xe(t);let n=e.millisecond()-t;return e.epoch-n}(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Xe(t);let r=e.clone(),a=(e.second()-t)*E.second;return e.epoch=e.epoch-a,(e=nt(e,r,n,"minute")).epoch}(n,e,t),n}return this.d.getSeconds()},minute:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=rt(n,e,t),n}return this.d.getMinutes()},hour:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone();return n.epoch=at(n,e,t),n}return n.getHours()},hourFloat:function(e,t){if(void 0!==e){let n=this.clone(),r=e%1;r*=60;let a=parseInt(e,10);return n.epoch=at(n,a,t),n.epoch=rt(n,r,t),n}let n=this.d,r=n.getHours(),a=n.getMinutes();return a/=60,r+a},hour12:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone(),r=(e=""+e).match(/^([0-9]+)(am|pm)$/);if(r){let e=parseInt(r[1],10);"pm"===r[2]&&(e+=12),n.epoch=at(n,e,t)}return n}let r=n.getHours();return r>12&&(r-=12),0===r&&(r=12),r},time:function(e,t){if(void 0!==e){let n=this.clone();return e=e.toLowerCase().trim(),n.epoch=function(e,t,n){let r=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!r){if(r=t.match(/([0-9]{1,2}) ?(am|pm)/),!r)return e.epoch;r.splice(2,0,"0"),r.splice(3,0,"")}let a=!1,o=parseInt(r[1],10),i=parseInt(r[2],10);i>=60&&(i=59),o>12&&(a=!0),!1===a&&("am"===r[4]&&12===o&&(o=0),"pm"===r[4]&&o<12&&(o+=12)),r[3]=r[3]||"",r[3]=r[3].replace(/:/,"");let s=parseInt(r[3],10)||0,u=e.clone();return e=(e=(e=(e=e.hour(o)).minute(i)).second(s)).millisecond(0),(e=nt(e,u,n,"day")).epoch}(n,e,t),n}return`${this.h12()}:${w(this.minute())}${this.ampm()}`},ampm:function(e,t){let n=it,r=this.hour();if(r>=12&&(n=st),"string"!=typeof e)return n;let a=this.clone();return e=e.toLowerCase().trim(),r>=12&&"am"===e?(r-=12,a.hour(r,t)):r<12&&"pm"===e?(r+=12,a.hour(r,t)):a},dayTime:function(e,t){if(void 0!==e){const n={morning:"7:00",breakfast:"7:00",noon:"12:00",lunch:"12:00",afternoon:"14:00",evening:"18:00",dinner:"18:00",night:"23:00",midnight:"00:00"};let r=this.clone();return e=(e=e||"").toLowerCase(),!0===n.hasOwnProperty(e)&&(r=r.time(n[e],t)),r}let n=this.hour();return n<6?"night":n<12?"morning":n<17?"afternoon":n<22?"evening":"night"},iso:function(e){return void 0!==e?this.set(e):this.format("iso")}};var lt=ut;const ct={date:function(e,t){if(void 0!==e){let n=this.clone();return(e=parseInt(e,10))&&(n.epoch=function(e,t,n){if((t=Xe(t))>28){let n=e.month(),r=Y[n];1===n&&29===t&&g(e.year())&&(r=29),t>r&&(t=r)}t<=0&&(t=1);let r=e.clone();return A(e,{date:t}),(e=nt(e,r,n,"month")).epoch}(n,e,t)),n}return this.d.getDate()},day:function(e,t){if(void 0===e)return this.d.getDay();let n=this.clone(),r=e;"string"==typeof e&&(e=e.toLowerCase(),ue.hasOwnProperty(e)?r=ue[e]:(r=ie().indexOf(e),-1===r&&(r=se().indexOf(e))));let a=this.d.getDay()-r;!0===t&&a>0&&(a-=7),!1===t&&a<0&&(a+=7);let o=this.subtract(a,"days");return A(o,{hour:n.hour(),minute:n.minute(),second:n.second()}),o},dayName:function(e,t){if(void 0===e)return se()[this.day()];let n=this.clone();return n=n.day(e,t),n}};var ht=ct;const dt=e=>e=(e=(e=e.minute(0)).second(0)).millisecond(1),mt={dayOfYear:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Xe(t);let r=e.clone();return(t-=1)<=0?t=0:t>=365&&(t=g(e.year())?365:364),e=(e=e.startOf("year")).add(t,"day"),tt(e,r,"hour"),(e=nt(e,r,n,"year")).epoch}(n,e,t),n}let n,r=0,a=this.d.getMonth();for(let e=1;e<=a;e++)n=new Date,n.setDate(1),n.setFullYear(this.d.getFullYear()),n.setHours(1),n.setMinutes(1),n.setMonth(e),n.setHours(-2),r+=n.getDate();return r+this.d.getDate()},week:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){let r=e.clone();return t=Xe(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=nt(e,r,n,"year")).epoch}(this,e,t),n=dt(n),n}let n=this.clone();n=n.month(0),n=n.date(1),n=dt(n),n=n.day("monday"),11===n.month()&&n.date()>=25&&(n=n.add(1,"week"));let r=1;1===n.date()&&(r=0),n=n.minus(1,"second");const a=this.epoch;if(n.epoch>a)return 1;let o=0,i=4*this.month();for(n.epoch+=E.week*i,o+=i;o<=52;o++){if(n.epoch>a)return o+r;n=n.add(1,"week")}return 52},month:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){"string"==typeof t&&("sept"===t&&(t="sep"),t=B()[t.toLowerCase()]),(t=Xe(t))>=12&&(t=11),t<=0&&(t=0);let r=e.date();r>Y[t]&&(r=Y[t]);let a=e.clone();return A(e,{month:t,d:r}),(e=nt(e,a,n,"year")).epoch}(n,e,t),n}return this.d.getMonth()},monthName:function(e,t){if(void 0!==e){let n=this.clone();return n=n.month(e,t),n}return P[this.month()]},quarter:function(e,t){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Qe[e])){let n=this.clone(),r=Qe[e][0];return n=n.month(r,t),n=n.date(1,t),n=n.startOf("day"),n}let n=this.d.getMonth();for(let e=1;e=Ue[n][e][1]&&r0&&(t.epoch=ot(t,-1*n)),"ad"===e&&n<0&&(t.epoch=ot(t,-1*n)),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,n)=>(n.match(/b\.?c\.?/i)&&(t="-"+t),t)))).replace(/c$/,""));let t=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(0===t&&(t=1),t=t>=0?100*(t-1):100*(t+1),this.year(t))}let t=this.startOf("century").year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(void 0!==e){if("string"==typeof e&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=Number(e),isNaN(e)))return console.warn("Spacetime: Invalid millenium input"),this;e>0&&(e-=1);let t=1e3*e;return 0===t&&(t=1),this.year(t)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}};var ft=mt;const pt=Object.assign({},lt,ht,ft);pt.milliseconds=pt.millisecond,pt.seconds=pt.second,pt.minutes=pt.minute,pt.hours=pt.hour,pt.hour24=pt.hour,pt.h12=pt.hour12,pt.h24=pt.hour24,pt.days=pt.day;var yt=e=>{Object.keys(pt).forEach((t=>{e.prototype[t]=pt[t]}))};const gt=function(e,t){return 1===e&&g(t)?29:Y[e]},bt=(e,t)=>{if(e.month>0){let n=parseInt(e.month/12,10);e.year=t.year()+n,e.month=e.month%12}else if(e.month<0){let n=Math.abs(e.month),r=parseInt(n/12,10);n%12!=0&&(r+=1),e.year=t.year()-r,e.month=e.month%12,e.month=e.month+12,12===e.month&&(e.month=0)}return e},kt=(e,t,n)=>{let r=t.year(),a=t.month(),o=gt(a,r);for(;n>o;)n-=o,a+=1,a>=12&&(a-=12,r+=1),o=gt(a,r);return e.month=a,e.date=n,e},wt=(e,t,n)=>{e.year=t.year(),e.month=t.month();let r=t.date();for(e.date=r-Math.abs(n);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let t=gt(e.month,e.year);e.date+=t}return e},vt=["millisecond","second","minute","hour","date","month"];let _t={second:vt.slice(0,1),minute:vt.slice(0,2),quarterhour:vt.slice(0,2),hour:vt.slice(0,3),date:vt.slice(0,4),month:vt.slice(0,4),quarter:vt.slice(0,4),season:vt.slice(0,4),year:vt,decade:vt,century:vt};_t.week=_t.hour,_t.season=_t.date,_t.quarter=_t.date;const jt={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},$t={month:!0,quarter:!0,season:!0,year:!0};var zt=e=>{e.prototype.add=function(e,t){let n=this.clone();if(!t||0===e)return n;let r=this.clone();if("millisecond"===(t=j(t)))return n.epoch+=e,n;"fortnight"===t&&(e*=2,t="week"),E[t]?n.epoch+=E[t]*e:"week"===t||"weekend"===t?n.epoch+=E.day*(7*e):"quarter"===t||"season"===t?n.epoch+=E.month*(3*e):"quarterhour"===t&&(n.epoch+=15*E.minute*e);let a={};if(_t[t]&&_t[t].forEach((e=>{a[e]=r[e]()})),jt[t]){const e=r.timezone().current.offset-n.timezone().current.offset;n.epoch+=3600*e*1e3}if("month"===t&&(a.month=r.month()+e,a=bt(a,r)),"week"===t){let t=r.date()+7*e;t<=28&&t>1&&(a.date=t)}if("weekend"===t&&"saturday"!==n.dayName())n=n.day("saturday",!0);else if("date"===t){if(e<0)a=wt(a,r,e);else{let t=r.date()+e;a=kt(a,r,t)}0!==e&&r.isSame(n,"day")&&(a.date=r.date()+e)}else if("quarter"===t){if(a.month=r.month()+3*e,a.year=r.year(),a.month<0){let e=Math.floor(a.month/12),t=a.month+12*Math.abs(e);a.month=t,a.year+=e}else if(a.month>=12){let e=Math.floor(a.month/12);a.month=a.month%12,a.year+=e}a.date=r.date()}else if("year"===t){let t=r.year()+e,a=n.year();if(at){let t=Math.floor(e/4)||1;n.epoch+=E.day*t}}else"decade"===t?a.year=n.year()+10:"century"===t&&(a.year=n.year()+100);if($t[t]){let e=Y[a.month];a.date=r.date(),a.date>e&&(a.date=e)}return Object.keys(a).length>1&&A(n,a),n},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 Ot={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()};Ot.date=Ot.day;var Dt=e=>{e.prototype.isSame=function(t,n,r=!0){let a=this;if(!n)return null;if("string"==typeof t&&"object"==typeof n){let e=t;t=n,n=e}return"string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),n=n.replace(/s$/,""),!0===r&&a.tz!==t.tz&&((t=t.clone()).tz=a.tz),Ot[n]?Ot[n](a)===Ot[n](t):null}};var Mt=e=>{const t={isAfter:function(e){let t=$(e=z(e,this));return null===t?null:this.epoch>t},isBefore:function(e){let t=$(e=z(e,this));return null===t?null:this.epoch{e.prototype[n]=t[n]}))};var St=e=>{const t={i18n:function(e){var t,n,r;return k(e.days)&&(t=e.days,ae=t.short||ae,oe=t.long||oe),k(e.months)&&function(e){F=e.short||F,P=e.long||P}(e.months),r=e.useTitleCase,"[object Boolean]"===Object.prototype.toString.call(r)&&(n=e.useTitleCase,le=n),k(e.ampm)&&function(e){it=e.am||it,st=e.pm||st}(e.ampm),k(e.distance)&&function(e){xe=e.pastDistance||xe,Ae=e.futureDistance||Ae,qe=e.past||qe,Ne=e.future||Ne,Ie=e.present||Ie,Te=e.now||Te,Ee=e.almost||Ee,Ce=e.over||Ce}(e.distance),k(e.units)&&function(e={}){Me={second:e.second||Me.second,seconds:e.seconds||Me.seconds,minute:e.minute||Me.minute,minutes:e.minutes||Me.minutes,hour:e.hour||Me.hour,hours:e.hours||Me.hours,day:e.day||Me.day,days:e.days||Me.days,month:e.month||Me.month,months:e.months||Me.months,year:e.year||Me.year,years:e.years||Me.years}}(e.units),this}};Object.keys(t).forEach((n=>{e.prototype[n]=t[n]}))};let qt=i;const Nt=function(e,t,r={}){this.epoch=null,this.tz=y(t,qt),this.silent=void 0===r.silent||r.silent,this.british=r.dmy||r.british,this._weekStart=1,void 0!==r.weekStart&&(this._weekStart=r.weekStart),this._today={},void 0!==r.today&&(this._today=r.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 r=this.epoch+t;return new Date(r)}}),Object.defineProperty(this,"timezones",{get:()=>qt,set:e=>(qt=e,e)});let a=re(this,e);this.epoch=a.epoch};Object.keys(Re).forEach((e=>{Nt.prototype[e]=Re[e]})),Nt.prototype.clone=function(){return new Nt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})},Nt.prototype.toLocalDate=function(){return this.toNativeDate()},Nt.prototype.toNativeDate=function(){return new Date(this.epoch)},yt(Nt),zt(Nt),Dt(Nt),Mt(Nt),St(Nt);var It=Nt;var Tt=(e,t)=>{let n=new It(null),r=new It(null);n=n.time(e),r=t?r.time(t):n.add(59,"minutes");let a=n.hour(),o=r.hour();return Object.keys(n.timezones).filter((e=>{if(-1===e.indexOf("/"))return!1;let t=new It(null,e),i=t.hour();return i>=a&&i<=o&&(!(i===a&&t.minute()r.minute()))}))};const Et=(e,t,n)=>new It(e,t,n),Ct=function(e){let t=e._today||{};return Object.keys(t).forEach((n=>{e=e[n](t[n])})),e};return Et.now=(e,t)=>{let n=new It((new Date).getTime(),e,t);return n=Ct(n),n},Et.today=(e,t)=>{let n=new It((new Date).getTime(),e,t);return n=Ct(n),n.startOf("day")},Et.tomorrow=(e,t)=>{let n=new It((new Date).getTime(),e,t);return n=Ct(n),n.add(1,"day").startOf("day")},Et.yesterday=(e,t)=>{let n=new It((new Date).getTime(),e,t);return n=Ct(n),n.subtract(1,"day").startOf("day")},Et.extend=function(e={}){return Object.keys(e).forEach((t=>{It.prototype[t]=e[t]})),this},Et.timezones=function(){return(new It).timezones},Et.max=function(e,t){let n=new It(null,e,t);return n.epoch=864e13,n},Et.min=function(e,t){let n=new It(null,e,t);return n.epoch=-864e13,n},Et.whereIts=Tt,Et.version="7.5.0",Et.plugin=Et.extend,Et})); diff --git a/builds/spacetime.mjs b/builds/spacetime.mjs index 863314eb..fecbabee 100644 --- a/builds/spacetime.mjs +++ b/builds/spacetime.mjs @@ -1 +1 @@ -const e=(e,t,n)=>{const[a,r]=e.split("/"),[o,i]=r.split(":");return Date.UTC(n,a-1,o,i)-36e5*t};var t=(t,n,a,r,o)=>{const i=new Date(t).getUTCFullYear(),s=e(n,o,i),u=e(a,r,i);return t>=s&&t{let n=e.timezones[e.tz];if(void 0===n)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(void 0===n.dst)return n.offset;let a=n.offset,r=n.offset+1;"n"===n.hem&&(r=a-1);let o=n.dst.split("->");return!0===t(e.epoch,o[0],o[1],a,r)?a:r},a={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok","9.5|s|04/02:03->10/01:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/13:01->10/02:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,hongkong,prc,roc","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/yangon,9/cocos,2/rangoon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/kolkata,2/colombo,2/calcutta","4|s":"9/reunion","4|n":"2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|04/29:02->10/28:02":"2/gaza,2/hebron","3|n|03/26:03->10/29:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet","3|n|03/26:02->10/29:03":"8/chisinau,8/tiraspol","3|n|03/26:00->10/28:24":"2/beirut","3|n|03/24:02->10/29:02":"2/jerusalem,2/tel_aviv,israel","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su","3.5|n":"2/tehran,iran","2|s|03/26:02->10/29:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|04/28:00->10/26:24":"0/cairo,egypt","2|n|03/26:02->10/29:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met","2|n":"0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|03/26:01->10/29:02":"3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s":"11/apia,11/tongatapu","13|n":"11/enderbury,11/kanton,11/fakaofo","12|s|04/02:03->09/24:02":"12/mcmurdo,11/auckland,12/south_pole,nz","12|s":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein","12.75|s|04/02:03->04/02:02":"11/chatham,nz-chat","11|s|04/02:03->10/01:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n|04/02:03->10/01:02":"11/norfolk","10|s|04/02:03->10/01:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap","10.5|s|04/02:01->10/01:02":"4/lord_howe,4/lhi","0|s|03/19:03->04/23:02":"0/casablanca,0/el_aaiun","0|n|03/26:00->10/29:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory","-9|n|03/12:02->11/05:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/12:02->11/05:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/12:02->11/05:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n":"1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst","-6|s|04/01:22->09/02:22":"11/easter,7/easterisland","-6|n|03/12:02->11/05:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain","-6|n":"1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/merida,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|03/12:02->11/05:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est","-4|s|04/01:24->09/03:00":"1/santiago,7/continental","-4|s|03/25:24->10/01:00":"1/asuncion","-4|s":"1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west","-4|n|03/12:02->11/05:02":"1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/12:00->11/05:01":"1/havana,cuba","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east","-3|n|03/12:02->11/05: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/25:22->10/28:24":"1/nuuk,1/godthab","-2|n|03/12:02->11/05:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/12:02->11/05:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst"},r=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let o={};Object.keys(a).forEach((e=>{let t=e.split("|"),n={offset:Number(t[0]),hem:t[1]};t[2]&&(n.dst=t[2]),a[e].split(",").forEach((e=>{e=e.replace(/(^[0-9]+)\//,((e,t)=>(t=Number(t),r[t]+"/"))),o[e]=n}))})),o.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let n="etc/gmt"+t;o[n]={offset:-1*e,hem:"n"},n="utc/gmt"+t,o[n]={offset:-1*e,hem:"n"}}var i=o;var s=()=>{let e=(()=>{if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;let e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null})();return null===e?"utc":e};const u=/(\-?[0-9]+)h(rs)?/i,l=/(\-?[0-9]+)/,c=/utc([\-+]?[0-9]+)/i,h=/gmt([\-+]?[0-9]+)/i,d=function(e){return(e=Number(e))>=-13&&e<=13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null};var m=function(e){let t=e.match(u);if(null!==t)return d(t[1]);if(t=e.match(c),null!==t)return d(t[1]);if(t=e.match(h),null!==t){let e=-1*Number(t[1]);return d(e)}return t=e.match(l),null!==t?d(t[1]):null};let f=s();const p=Object.keys(i).reduce(((e,t)=>{let n=t.split("/")[1]||"";return n=n.replace(/_/g," "),e[n]=t,e}),{});var y=(e,t)=>{if(!e)return t.hasOwnProperty(f)||(console.warn(`Unrecognized IANA id '${f}'. Setting fallback tz to UTC.`),f="utc"),f;"string"!=typeof e&&console.error("Timezone must be a string - recieved: '",e,"'\n");let n=e.trim();if(n=n.toLowerCase(),!0===t.hasOwnProperty(n))return n;if(n=(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"))(n),!0===t.hasOwnProperty(n))return n;if(!0===p.hasOwnProperty(n))return p[n];if(!0===/[0-9]/.test(n)){let e=m(n);if(e)return e}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function g(e){return e%4==0&&e%100!=0||e%400==0}function b(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())}function k(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e,t=2){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function v(e){let t=e%10,n=e%100;return 1===t&&11!==n?e+"st":2===t&&12!==n?e+"nd":3===t&&13!==n?e+"rd":e+"th"}function _(e){return e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function j(e=""){return"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===e?"date":"min"===e||"mins"===e?"minute":e}function z(e){return"number"==typeof e?e:b(e)?e.getTime():e.epoch?e.epoch:null}function $(e,t){return!1===k(e)?t.clone().set(e):e}function O(e,t=""){const n=e>0?"+":"-",a=Math.abs(e);return`${n}${w(parseInt(""+a,10))}${t}${w(a%1*60)}`}const D={year:(new Date).getFullYear(),month:0,date:1};var M={parseArray:(e,t,n)=>{if(0===t.length)return e;let a=["year","month","date","hour","minute","second","millisecond"];for(let r=0;r{if(0===Object.keys(t).length)return e;t=Object.assign({},D,n,t);let a=Object.keys(t);for(let r=0;r0&&t<25e8&&!1===e.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),e.epoch=t,e}};const S=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach((t=>{"function"==typeof e[t]&&(e=e[t](e._today[t]))})),e},q={now:e=>S(e),today:e=>S(e),tonight:e=>e=(e=S(e)).hour(18),tomorrow:e=>e=(e=(e=S(e)).add(1,"day")).startOf("day"),yesterday:e=>e=(e=(e=S(e)).subtract(1,"day")).startOf("day"),christmas:e=>{let t=S(e).year();return e=e.set([t,11,25,18,0,0])},"new years":e=>{let t=S(e).year();return e=e.set([t,11,31,18,0,0])}};q["new years eve"]=q["new years"];var N=q;var I=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 E={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};E.date=E.day,E.month=25488e5,E.week=6048e5,E.year=3154e7,Object.keys(E).forEach((e=>{E[e+"s"]=E[e]}));var T=E;const C=(e,t,n,a,r)=>{let o=e.d[n]();if(o===t)return;let i=null===r?null:e.d[r](),s=e.epoch,u=t-o;e.epoch+=T[a]*u,"day"===a&&Math.abs(u)>28&&t<28&&(e.epoch+=T.hour),null!==r&&i!==e.d[r]()&&(e.epoch=s);const l=T[a]/2;for(;e.d[n]()t;)e.epoch-=l;null!==r&&i!==e.d[r]()&&(e.epoch=s)},A={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>C(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let n=e.d,a=n.getMonth(),r=e.epoch,o=n.getFullYear();if(a===t)return;let i=t-a;for(e.epoch+=T.day*(28*i),o!==e.d.getFullYear()&&(e.epoch=r);e.d.getMonth()t;)e.epoch-=T.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>C(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>C(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>C(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 Y=(e,t)=>{let n=Object.keys(A),a=e.clone();for(let r=0;r{if(!t)return e;let n=0;if(/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(!0===/:00/.test(t)&&(t=t.replace(/:00/,"")),!0===/:30/.test(t)&&(t=t.replace(/:30/,".5"))),/^[\+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,".5")),n=parseFloat(t),Math.abs(n)>100&&(n/=100),0===n||"Z"===t||"z"===t)return e.tz="etc/gmt",e;n*=-1,n>=0&&(n="+"+n);let a="etc/gmt"+n;return e.timezones[a]&&(e.tz=a),e};var Z=(e,t="")=>{let n=(t=t.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==n){let a=Number(n[1]);if(a<0||a>24)return e.startOf("day");let r=Number(n[2]);if(n[2].length<2||r<0||r>59)return e.startOf("day");e=(e=(e=(e=e.hour(a)).minute(r)).seconds(n[3]||0)).millisecond(function(e=""){return(e=String(e)).length>3?e=e.substr(0,3):1===e.length?e+="00":2===e.length&&(e+="0"),Number(e)||0}(n[4]));let o=t.match(/[\b0-9] ?(am|pm)\b/);return null!==o&&o[1]&&(e=e.ampm(o[1])),e}if(n=t.match(/([0-9]+) ?(am|pm)/),null!==n&&n[1]){let t=Number(n[1]);return t>12||t<1?e.startOf("day"):e=(e=(e=e.hour(n[1]||0)).ampm(n[2])).startOf("hour")}return e=e.startOf("day")};let U=B();const Q=e=>{if(!0!==x.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(g(e.year)&&e.date<=29)||e.date<=28;let t=x[e.month]||0;return e.date<=t},G=(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 n=parseInt(e,10);return!n&&t&&(n=t.year),n=n||(new Date).getFullYear(),n},V=function(e){return"sept"===(e=e.toLowerCase().trim())?U.sep:U[e]};var W=[{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 n=parseInt(t[1],10)-1,a=parseInt(t[2],10);(e.british||n>=12)&&(a=parseInt(t[1],10),n=parseInt(t[2],10)-1);let r={date:a,month:n,year:G(t[3],e._today)||(new Date).getFullYear()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e,t[4]))}},{reg:/^([a-z]+)[\-\/\. ]([0-9]{1,2})[\-\/\. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9:]+)?( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[5],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[3]))}}],J=[{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:1};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let n={year:G(t[2],e._today),month:V(t[1]),date:e._today.date||1};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.quarter(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.season(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/,/g,"");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let n=e._today;n.month&&!n.date&&(n.date=1);let a=new Date,r={year:G(t[0],n),month:n.month||a.getMonth(),date:n.date||a.getDate()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e))}}],K=[].concat([{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return!1===Q(n)?(e.epoch=null,e):(H(e,t[5]),Y(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([0-9]{1,2})[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return n.month>=12&&(n.date=parseInt(t[2],10),n.month=parseInt(t[3],10)-1),!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([a-z]+)[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[1],e._today),month:V(t[2]),date:_(t[3]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}}],W,[{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1])};return n.month&&!1!==Q(n)?(Y(e,n),e=Z(e,t[4])):(e.epoch=null,e)}},{reg:/^([0-9]{1,2})[\. -/]([a-z]+)[\. -/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={date:Number(t[1]),month:V(t[2]),year:Number(t[3])};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=e.startOf("day"),e=Z(e,t[4]))}}],J);var R=function(e,t,n){for(let a=0;a{let n=e._today||ne;if("number"==typeof t)return te(e,t);if(e.epoch=Date.now(),e._today&&k(e._today)&&Object.keys(e._today).length>0){let t=ee(e,n,ne);t.isValid()&&(e.epoch=t.epoch)}return null==t||""===t?e:!0===b(t)?(e.epoch=t.getTime(),e):!0===function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t)?e=X(e,t,n):!0===k(t)?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):e=ee(e,t,n):"string"!=typeof t?e:(t=I(t),!0===N.hasOwnProperty(t)?e=N[t](e):R(e,t))};let re=["sun","mon","tue","wed","thu","fri","sat"],oe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ie(){return re}function se(){return oe}const ue={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 le=!0;var ce=e=>{let t=e.timezone().current.offset;return t?O(t,":"):"Z"};const he=e=>le?function(e){return e?e[0].toUpperCase()+e.substr(1):""}(e):e,de={day:e=>he(e.dayName()),"day-short":e=>he(ie()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>v(e.day()),"day-pad":e=>w(e.day()),date:e=>e.date(),"date-ordinal":e=>v(e.date()),"date-pad":e=>w(e.date()),month:e=>he(e.monthName()),"month-short":e=>he(L()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>v(e.month()),"month-pad":e=>w(e.month()),"iso-month":e=>w(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+" BC")},"year-short":e=>{let t=e.year();return t>0?`'${String(e.year()).substr(2,4)}`:(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),n=t<0,a=w(Math.abs(t),4);return n&&(a=w(a,6),a="-"+a),a},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${w(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>w(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>w(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>w(e.minute()),second:e=>e.second(),"second-pad":e=>w(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>w(e.millisecond(),3),ampm:e=>e.ampm(),AMPM:e=>e.ampm().toUpperCase(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>ce(e),numeric:e=>`${e.year()}/${w(e.month()+1)}/${w(e.date())}`,"numeric-us":e=>`${w(e.month()+1)}/${w(e.date())}/${e.year()}`,"numeric-uk":e=>`${w(e.date())}/${w(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${w(e.month()+1)}/${w(e.date())}`,iso:e=>`${e.format("iso-year")}-${w(e.month()+1)}-${w(e.date())}T${w(e.h24())}:${w(e.minute())}:${w(e.second())}.${w(e.millisecond(),3)}${ce(e)}`,"iso-short":e=>{let t=w(e.month()+1),n=w(e.date());var a;return`${(a=e.year())>=0?w(a,4):"-"+w(a=Math.abs(a),4)}-${t}-${n}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${L()[e.month()]} ${v(e.date())}, ${e.time()}`,"nice-24":e=>`${L()[e.month()]} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`,"nice-year":e=>`${L()[e.month()]} ${v(e.date())}, ${e.year()}`,"nice-day":e=>`${ie()[e.day()]} ${he(L()[e.month()])} ${v(e.date())}`,"nice-full":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`},me={"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(me).forEach((e=>de[e]=de[me[e]]));var fe=(e,t="")=>{if(!0!==e.isValid())return"";if(de.hasOwnProperty(t)){let n=de[t](e)||"";return"json"!==t&&(n=String(n),"ampm"!==t.toLowerCase()&&(n=he(n))),n}if(-1!==t.indexOf("{")){let n=/\{(.+?)\}/g;return t=t.replace(n,((t,n)=>{if(n=n.toLowerCase().trim(),de.hasOwnProperty(n)){let t=String(de[n](e));return"ampm"!==n.toLowerCase()?he(t):t}return""})),t}return e.format("iso-short")};const pe={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=>w(Number(String(e.year()).substr(2,4))),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>"0"+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>w(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>w(e.week()),d:e=>e.date(),dd:e=>w(e.date()),D:e=>e.dayOfYear(),DD:e=>w(e.dayOfYear()),DDD:e=>w(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=>w(e.h12()),H:e=>e.hour(),HH:e=>w(e.hour()),m:e=>e.minute(),mm:e=>w(e.minute()),s:e=>e.second(),ss:e=>w(e.second()),SSS:e=>w(e.millisecond(),3),A:e=>e.epoch-e.startOf("day").epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>O(e.timezone().current.offset),ZZ:e=>O(e.timezone().current.offset),ZZZ:e=>O(e.timezone().current.offset),ZZZZ:e=>O(e.timezone().current.offset,":")},ye=(e,t,n)=>{let a=e,r=t;for(let o=0;o{let n=t.split("");return n=function(e){for(let t=0;te))}(n),n=function(e){for(let t=0;te))).map((e=>("''"===e&&(e="'"),e)))}(n),n.reduce(((t,n)=>(void 0!==pe[n]?t+=pe[n](e)||"":(/^'.{1,}'$/.test(n)&&(n=n.replace(/'/g,"")),t+=n),t)),"")};const be=["year","season","quarter","month","week","day","quarterHour","hour","minute"],ke=function(e,t){let n=e.clone().startOf(t),a=e.clone().endOf(t).epoch-n.epoch,r=(e.epoch-n.epoch)/a;return parseFloat(r.toFixed(2))};var we=(e,t)=>{if(t)return t=j(t),ke(e,t);let n={};return be.forEach((t=>{n[t]=ke(e,t)})),n};var ve=(e,t)=>{let n=e.progress();return"quarterhour"===(t=j(t))&&(t="quarterHour"),void 0!==n[t]?(n[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):!1===e.silent&&console.warn("no known unit '"+t+"'"),e};const _e=(e,t,n)=>{let a=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,n),a+=1;return e.isAfter(t,n)&&(a-=1),a};var je=(e,t,n)=>e.isBefore(t)?_e(e,t,n):-1*_e(t,e,n);var ze=function(e,t){let n=t.epoch-e.epoch,a={milliseconds:n,seconds:parseInt(n/1e3,10)};a.minutes=parseInt(a.seconds/60,10),a.hours=parseInt(a.minutes/60,10);let r=e.clone();return a.years=((e,t)=>{let n=t.year()-e.year();return(e=e.year(t.year())).isAfter(t)&&(n-=1),n})(r,t),r=e.add(a.years,"year"),a.months=12*a.years,r=e.add(a.months,"month"),a.months+=je(r,t,"month"),a.quarters=4*a.years,a.quarters+=parseInt(a.months%12/3,10),a.weeks=52*a.years,r=e.add(a.weeks,"week"),a.weeks+=je(r,t,"week"),a.days=7*a.weeks,r=e.add(a.days,"day"),a.days+=je(r,t,"day"),a};var $e=function(e,t,n){t=$(t,e);let a=!1;if(e.isAfter(t)){let n=e;e=t,t=n,a=!0}let r=ze(e,t);return a&&(r=function(e){return Object.keys(e).forEach((t=>{e[t]*=-1})),e}(r)),n?(n=j(n),!0!==/s$/.test(n)&&(n+="s"),"dates"===n&&(n="days"),r[n]):r};const Oe=e=>Math.abs(e)||0;var De=function(e){let t="P";return t+=Oe(e.years)+"Y",t+=Oe(e.months)+"M",t+=Oe(e.days)+"DT",t+=Oe(e.hours)+"H",t+=Oe(e.minutes)+"M",t+=Oe(e.seconds)+"S",t};const Me={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 Se(e,t){return 1===e&&(t=t.slice(0,-1)),e+" "+t}var qe=function(e){let t=null,n=null,a=[],r=[];return Object.keys(e).forEach(((o,i,s)=>{const u=Math.abs(e[o]);if(0===u)return;a.push(u+o[0]);const l=Se(u,o);if(r.push(l),!t){if(t=n=l,i>4)return;const a=s[i+1],r=Math.abs(e[a]);r>Me[a].almost?(t=Se(u+1,o),n="almost "+t):r>Me[a].over&&(n="over "+l)}})),{qualified:n,rounded:t,abbreviated:a,englishValues:r}};var Ne=(e,t)=>{const n=function(e,t){const n=e.isBefore(t),a=n?t:e;let r=n?e:t;r=r.clone();const o={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(o).forEach((e=>{if(r.isSame(a,e))return;let t=r.diff(a,e);r=r.add(t,e),o[e]=t})),n&&Object.keys(o).forEach((e=>{0!==o[e]&&(o[e]*=-1)})),o}(e,t=$(t,e));if(!0===Object.keys(n).every((e=>!n[e])))return{diff:n,rounded:"now",qualified:"now",precise:"now",abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:"present"};let a,r="future",{rounded:o,qualified:i,englishValues:s,abbreviated:u}=qe(n);a=s.splice(0,2).join(", "),!0===e.isAfter(t)?(o+=" ago",i+=" ago",a+=" ago",r="past"):(o="in "+o,i="in "+i,a="in "+a);let l=De(n);return{diff:n,rounded:o,qualified:i,precise:a,abbreviated:u,iso:l,direction:r}};var Ie={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]]},Ee=[null,[0,1],[3,1],[6,1],[9,1]];const Te={second:e=>(Y(e,{millisecond:0}),e),minute:e=>(Y(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),Y(e,{second:0,millisecond:0}),e},hour:e=>(Y(e,{minute:0,second:0,millisecond:0}),e),day:e=>(Y(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")),Y(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(Y(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Ee[t]&&Y(e,{month:Ee[t][0],date:Ee[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),n="north";"South"===e.hemisphere()&&(n="south");for(let a=0;a(Y(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{let t=(e=e.startOf("year")).year(),n=10*parseInt(t/10,10);return e=e.year(n)},century:e=>{let t=(e=e.startOf("year")).year(),n=100*parseInt(t/100,10);return e=e.year(n)}};Te.date=Te.day;var Ce=function(e,t,n){if(!t||!n)return[];if(t=j(t),n=e.clone().set(n),e.isAfter(n)){let t=e;e=n,n=t}let a=e.clone();if(function(e){return!!ie().find((t=>t===e))||!!se().find((t=>t===e))}(t))a=a.next(t),t="week";else{a.startOf(t).isBefore(e)&&(a=a.next(t))}let r=[];for(;a.isBefore(n);)r.push(a),a=a.add(1,t);return r};var Ae=e=>{let n=e.timezones,a=e.tz;if(!1===n.hasOwnProperty(a)&&(a=y(e.tz,n)),null===a)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let r=n[a],o={name:(i=a,i=(i=(i=(i=(i=(i=(i=i[0].toUpperCase()+i.substr(1)).replace(/[\/_-]([a-z])/gi,(e=>e.toUpperCase()))).replace(/_(of|es)_/i,(e=>e.toLowerCase()))).replace(/\/gmt/i,"/GMT")).replace(/\/Dumontdurville$/i,"/DumontDUrville")).replace(/\/Mcmurdo$/i,"/McMurdo")).replace(/\/Port-au-prince$/i,"/Port-au-Prince")),hasDst:Boolean(r.dst),default_offset:r.offset,hemisphere:"s"===r.hem?"South":"North",current:{}};var i,s;if(o.hasDst){let e=(s=r.dst)?s.split("->"):[];o.change={start:e[0],back:e[1]}}let u=r.offset,l=u;return!0===o.hasDst&&(l="North"===o.hemisphere?u-1:r.offset+1),!1===o.hasDst?(o.current.offset=u,o.current.isDST=!1):!0===t(e.epoch,o.change.start,o.change.back,u,l)?(o.current.offset=u,o.current.isDST="North"===o.hemisphere):(o.current.offset=l,o.current.isDST="South"===o.hemisphere),o};const Ye=["century","decade","year","month","date","day","hour","minute","second","millisecond"],xe={set:function(e,t){let n=this.clone();return n=ae(n,e),t&&(this.tz=y(t)),n},timezone:function(){return Ae(this)},isDST:function(){return Ae(this).current.isDST},hasDST:function(){return Ae(this).hasDst},offset:function(){return 60*Ae(this).current.offset},hemisphere:function(){return Ae(this).hemisphere},format:function(e){return fe(this,e)},unixFmt:function(e){return ge(this,e)},startOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Te[t]?Te[t](n):"summer"===t||"winter"===t?(n=n.season(t),Te.season(n)):n})(this,e)},endOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Te[t]?(n=Te[t](n),n=n.add(1,t),n=n.subtract(1,"millisecond"),n):n})(this,e)},leapYear:function(){return g(this.year())},progress:function(e){return we(this,e)},nearest:function(e){return ve(this,e)},diff:function(e,t){return $e(this,e,t)},since:function(e){return e||(e=this.clone().set()),Ne(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=y(e,t.timezones),t},every:function(e,t){if("object"==typeof e&&"string"==typeof t){let n=t;t=e,e=n}return Ce(this,e,t)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},daysInMonth:function(){switch(this.month()){case 0:case 2:case 4:case 6:case 7:case 9:case 11:return 31;case 1:return this.leapYear()?29:28;case 3:case 5:case 8:case 10:return 30;default:throw new Error("Invalid Month state.")}},log:function(){return console.log(""),console.log(fe(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(fe(this,"full-short")),this},json:function(){return Ye.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=ie().indexOf(e);-1===t&&(t=se().indexOf(e)),-1===t&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};xe.inDST=xe.isDST,xe.round=xe.nearest,xe.each=xe.every;var Fe=xe;const Pe=e=>("string"==typeof e&&(e=parseInt(e,10)),e),Le=["year","month","date","hour","minute","second","millisecond"],Be=(e,t,n)=>{let a=Le.indexOf(n),r=Le.slice(a,Le.length);for(let n=0;n=24?t=24:t<0&&(t=0);let a=e.clone(),r=e.hour()-t,o=r*T.hour;return e.epoch-=o,e.date()!==a.date()&&(e=a.clone(),r>1&&(r-=1),r<1&&(r+=1),o=r*T.hour,e.epoch-=o),Y(e,{hour:t}),Be(e,a,"minute"),(e=He(e,a,n,"day")).epoch},Qe=function(e,t){return"string"==typeof t&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=(t=Number(t))>30?1900+t:2e3+t),t=Pe(t),Y(e,{year:t}),e.epoch};let Ge="am",Ve="pm";const We={millisecond:function(e){if(void 0!==e){let t=this.clone();return t.epoch=function(e,t){t=Pe(t);let n=e.millisecond()-t;return e.epoch-n}(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Pe(t);let a=e.clone(),r=(e.second()-t)*T.second;return e.epoch=e.epoch-r,(e=He(e,a,n,"minute")).epoch}(n,e,t),n}return this.d.getSeconds()},minute:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=Ze(n,e,t),n}return this.d.getMinutes()},hour:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone();return n.epoch=Ue(n,e,t),n}return n.getHours()},hourFloat:function(e,t){if(void 0!==e){let n=this.clone(),a=e%1;a*=60;let r=parseInt(e,10);return n.epoch=Ue(n,r,t),n.epoch=Ze(n,a,t),n}let n=this.d,a=n.getHours(),r=n.getMinutes();return r/=60,a+r},hour12:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone(),a=(e=""+e).match(/^([0-9]+)(am|pm)$/);if(a){let e=parseInt(a[1],10);"pm"===a[2]&&(e+=12),n.epoch=Ue(n,e,t)}return n}let a=n.getHours();return a>12&&(a-=12),0===a&&(a=12),a},time:function(e,t){if(void 0!==e){let n=this.clone();return e=e.toLowerCase().trim(),n.epoch=function(e,t,n){let a=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!a){if(a=t.match(/([0-9]{1,2}) ?(am|pm)/),!a)return e.epoch;a.splice(2,0,"0"),a.splice(3,0,"")}let r=!1,o=parseInt(a[1],10),i=parseInt(a[2],10);i>=60&&(i=59),o>12&&(r=!0),!1===r&&("am"===a[4]&&12===o&&(o=0),"pm"===a[4]&&o<12&&(o+=12)),a[3]=a[3]||"",a[3]=a[3].replace(/:/,"");let s=parseInt(a[3],10)||0,u=e.clone();return e=(e=(e=(e=e.hour(o)).minute(i)).second(s)).millisecond(0),(e=He(e,u,n,"day")).epoch}(n,e,t),n}return`${this.h12()}:${w(this.minute())}${this.ampm()}`},ampm:function(e,t){let n=Ge,a=this.hour();if(a>=12&&(n=Ve),"string"!=typeof e)return n;let r=this.clone();return e=e.toLowerCase().trim(),a>=12&&"am"===e?(a-=12,r.hour(a,t)):a<12&&"pm"===e?(a+=12,r.hour(a,t)):r},dayTime:function(e,t){if(void 0!==e){const n={morning:"7:00",breakfast:"7:00",noon:"12:00",lunch:"12:00",afternoon:"14:00",evening:"18:00",dinner:"18:00",night:"23:00",midnight:"00:00"};let a=this.clone();return e=(e=e||"").toLowerCase(),!0===n.hasOwnProperty(e)&&(a=a.time(n[e],t)),a}let n=this.hour();return n<6?"night":n<12?"morning":n<17?"afternoon":n<22?"evening":"night"},iso:function(e){return void 0!==e?this.set(e):this.format("iso")}};var Je=We;const Ke={date:function(e,t){if(void 0!==e){let n=this.clone();return(e=parseInt(e,10))&&(n.epoch=function(e,t,n){if((t=Pe(t))>28){let n=e.month(),a=x[n];1===n&&29===t&&g(e.year())&&(a=29),t>a&&(t=a)}t<=0&&(t=1);let a=e.clone();return Y(e,{date:t}),(e=He(e,a,n,"month")).epoch}(n,e,t)),n}return this.d.getDate()},day:function(e,t){if(void 0===e)return this.d.getDay();let n=this.clone(),a=e;"string"==typeof e&&(e=e.toLowerCase(),ue.hasOwnProperty(e)?a=ue[e]:(a=ie().indexOf(e),-1===a&&(a=se().indexOf(e))));let r=this.d.getDay()-a;!0===t&&r>0&&(r-=7),!1===t&&r<0&&(r+=7);let o=this.subtract(r,"days");return Y(o,{hour:n.hour(),minute:n.minute(),second:n.second()}),o},dayName:function(e,t){if(void 0===e)return se()[this.day()];let n=this.clone();return n=n.day(e,t),n}};var Re=Ke;const Xe=e=>e=(e=(e=e.minute(0)).second(0)).millisecond(1),et={dayOfYear:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Pe(t);let a=e.clone();return(t-=1)<=0?t=0:t>=365&&(t=g(e.year())?365:364),e=(e=e.startOf("year")).add(t,"day"),Be(e,a,"hour"),(e=He(e,a,n,"year")).epoch}(n,e,t),n}let n,a=0,r=this.d.getMonth();for(let e=1;e<=r;e++)n=new Date,n.setDate(1),n.setFullYear(this.d.getFullYear()),n.setHours(1),n.setMinutes(1),n.setMonth(e),n.setHours(-2),a+=n.getDate();return a+this.d.getDate()},week:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){let a=e.clone();return t=Pe(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=He(e,a,n,"year")).epoch}(this,e,t),n=Xe(n),n}let n=this.clone();n=n.month(0),n=n.date(1),n=Xe(n),n=n.day("monday"),11===n.month()&&n.date()>=25&&(n=n.add(1,"week"));let a=1;1===n.date()&&(a=0),n=n.minus(1,"second");const r=this.epoch;if(n.epoch>r)return 1;let o=0,i=4*this.month();for(n.epoch+=T.week*i,o+=i;o<=52;o++){if(n.epoch>r)return o+a;n=n.add(1,"week")}return 52},month:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){"string"==typeof t&&("sept"===t&&(t="sep"),t=B()[t.toLowerCase()]),(t=Pe(t))>=12&&(t=11),t<=0&&(t=0);let a=e.date();a>x[t]&&(a=x[t]);let r=e.clone();return Y(e,{month:t,d:a}),(e=He(e,r,n,"year")).epoch}(n,e,t),n}return this.d.getMonth()},monthName:function(e,t){if(void 0!==e){let n=this.clone();return n=n.month(e,t),n}return P[this.month()]},quarter:function(e,t){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Ee[e])){let n=this.clone(),a=Ee[e][0];return n=n.month(a,t),n=n.date(1,t),n=n.startOf("day"),n}let n=this.d.getMonth();for(let e=1;e=Ie[n][e][1]&&a0&&(t.epoch=Qe(t,-1*n)),"ad"===e&&n<0&&(t.epoch=Qe(t,-1*n)),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,n)=>(n.match(/b\.?c\.?/i)&&(t="-"+t),t)))).replace(/c$/,""));let t=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(0===t&&(t=1),t=t>=0?100*(t-1):100*(t+1),this.year(t))}let t=this.startOf("century").year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(void 0!==e){if("string"==typeof e&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=Number(e),isNaN(e)))return console.warn("Spacetime: Invalid millenium input"),this;e>0&&(e-=1);let t=1e3*e;return 0===t&&(t=1),this.year(t)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}};var tt=et;const nt=Object.assign({},Je,Re,tt);nt.milliseconds=nt.millisecond,nt.seconds=nt.second,nt.minutes=nt.minute,nt.hours=nt.hour,nt.hour24=nt.hour,nt.h12=nt.hour12,nt.h24=nt.hour24,nt.days=nt.day;var at=e=>{Object.keys(nt).forEach((t=>{e.prototype[t]=nt[t]}))};const rt=function(e,t){return 1===e&&g(t)?29:x[e]},ot=(e,t)=>{if(e.month>0){let n=parseInt(e.month/12,10);e.year=t.year()+n,e.month=e.month%12}else if(e.month<0){let n=Math.abs(e.month),a=parseInt(n/12,10);n%12!=0&&(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},it=(e,t,n)=>{let a=t.year(),r=t.month(),o=rt(r,a);for(;n>o;)n-=o,r+=1,r>=12&&(r-=12,a+=1),o=rt(r,a);return e.month=r,e.date=n,e},st=(e,t,n)=>{e.year=t.year(),e.month=t.month();let a=t.date();for(e.date=a-Math.abs(n);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let t=rt(e.month,e.year);e.date+=t}return e},ut=["millisecond","second","minute","hour","date","month"];let lt={second:ut.slice(0,1),minute:ut.slice(0,2),quarterhour:ut.slice(0,2),hour:ut.slice(0,3),date:ut.slice(0,4),month:ut.slice(0,4),quarter:ut.slice(0,4),season:ut.slice(0,4),year:ut,decade:ut,century:ut};lt.week=lt.hour,lt.season=lt.date,lt.quarter=lt.date;const ct={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},ht={month:!0,quarter:!0,season:!0,year:!0};var dt=e=>{e.prototype.add=function(e,t){let n=this.clone();if(!t||0===e)return n;let a=this.clone();if("millisecond"===(t=j(t)))return n.epoch+=e,n;"fortnight"===t&&(e*=2,t="week"),T[t]?n.epoch+=T[t]*e:"week"===t||"weekend"===t?n.epoch+=T.day*(7*e):"quarter"===t||"season"===t?n.epoch+=T.month*(3*e):"quarterhour"===t&&(n.epoch+=15*T.minute*e);let r={};if(lt[t]&<[t].forEach((e=>{r[e]=a[e]()})),ct[t]){const e=a.timezone().current.offset-n.timezone().current.offset;n.epoch+=3600*e*1e3}if("month"===t&&(r.month=a.month()+e,r=ot(r,a)),"week"===t){let t=a.date()+7*e;t<=28&&t>1&&(r.date=t)}if("weekend"===t&&"saturday"!==n.dayName())n=n.day("saturday",!0);else if("date"===t){if(e<0)r=st(r,a,e);else{let t=a.date()+e;r=it(r,a,t)}0!==e&&a.isSame(n,"day")&&(r.date=a.date()+e)}else if("quarter"===t){if(r.month=a.month()+3*e,r.year=a.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=a.date()}else if("year"===t){let t=a.year()+e,r=n.year();if(rt){let t=Math.floor(e/4)||1;n.epoch+=T.day*t}}else"decade"===t?r.year=n.year()+10:"century"===t&&(r.year=n.year()+100);if(ht[t]){let e=x[r.month];r.date=a.date(),r.date>e&&(r.date=e)}return Object.keys(r).length>1&&Y(n,r),n},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 mt={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()};mt.date=mt.day;var ft=e=>{e.prototype.isSame=function(t,n,a=!0){let r=this;if(!n)return null;if("string"==typeof t&&"object"==typeof n){let e=t;t=n,n=e}return"string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),n=n.replace(/s$/,""),!0===a&&r.tz!==t.tz&&((t=t.clone()).tz=r.tz),mt[n]?mt[n](r)===mt[n](t):null}};var pt=e=>{const t={isAfter:function(e){let t=z(e=$(e,this));return null===t?null:this.epoch>t},isBefore:function(e){let t=z(e=$(e,this));return null===t?null:this.epoch{e.prototype[n]=t[n]}))};var yt=e=>{const t={i18n:function(e){var t,n,a;return k(e.days)&&(t=e.days,re=t.short||re,oe=t.long||oe),k(e.months)&&function(e){F=e.short||F,P=e.long||P}(e.months),a=e.useTitleCase,"[object Boolean]"===Object.prototype.toString.call(a)&&(n=e.useTitleCase,le=n),k(e.ampm)&&function(e){Ge=e.am||Ge,Ve=e.pm||Ve}(e.ampm),this}};Object.keys(t).forEach((n=>{e.prototype[n]=t[n]}))};let gt=i;const bt=function(e,t,a={}){this.epoch=null,this.tz=y(t,gt),this.silent=void 0===a.silent||a.silent,this.british=a.dmy||a.british,this._weekStart=1,void 0!==a.weekStart&&(this._weekStart=a.weekStart),this._today={},void 0!==a.today&&(this._today=a.today),Object.defineProperty(this,"d",{get:function(){let e=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:()=>gt,set:e=>(gt=e,e)});let r=ae(this,e);this.epoch=r.epoch};Object.keys(Fe).forEach((e=>{bt.prototype[e]=Fe[e]})),bt.prototype.clone=function(){return new bt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})},bt.prototype.toLocalDate=function(){return this.toNativeDate()},bt.prototype.toNativeDate=function(){return new Date(this.epoch)},at(bt),dt(bt),ft(bt),pt(bt),yt(bt);var kt=bt;var wt=(e,t)=>{let n=new kt(null),a=new kt(null);n=n.time(e),a=t?a.time(t):n.add(59,"minutes");let r=n.hour(),o=a.hour();return Object.keys(n.timezones).filter((e=>{if(-1===e.indexOf("/"))return!1;let t=new kt(null,e),i=t.hour();return i>=r&&i<=o&&(!(i===r&&t.minute()a.minute()))}))};const vt=(e,t,n)=>new kt(e,t,n),_t=function(e){let t=e._today||{};return Object.keys(t).forEach((n=>{e=e[n](t[n])})),e};vt.now=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n},vt.today=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.startOf("day")},vt.tomorrow=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.add(1,"day").startOf("day")},vt.yesterday=(e,t)=>{let n=new kt((new Date).getTime(),e,t);return n=_t(n),n.subtract(1,"day").startOf("day")},vt.extend=function(e={}){return Object.keys(e).forEach((t=>{kt.prototype[t]=e[t]})),this},vt.timezones=function(){return(new kt).timezones},vt.max=function(e,t){let n=new kt(null,e,t);return n.epoch=864e13,n},vt.min=function(e,t){let n=new kt(null,e,t);return n.epoch=-864e13,n},vt.whereIts=wt,vt.version="7.4.8",vt.plugin=vt.extend;export{vt as default}; +const e=(e,t,n)=>{const[a,r]=e.split("/"),[o,i]=r.split(":");return Date.UTC(n,a-1,o,i)-36e5*t};var t=(t,n,a,r,o)=>{const i=new Date(t).getUTCFullYear(),s=e(n,o,i),u=e(a,r,i);return t>=s&&t{let n=e.timezones[e.tz];if(void 0===n)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(void 0===n.dst)return n.offset;let a=n.offset,r=n.offset+1;"n"===n.hem&&(r=a-1);let o=n.dst.split("->");return!0===t(e.epoch,o[0],o[1],a,r)?a:r},a={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok","9.5|s|04/07:03->10/06:02":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/13:01->10/02:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore","8|n":"2/brunei,2/choibalsan,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,hongkong,prc,roc","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/yangon,9/cocos,2/rangoon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/kolkata,2/colombo,2/calcutta","4|s":"9/reunion","4|n":"2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|04/28:00->10/26:24":"0/cairo,egypt","3|n|03/31:03->10/27:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,eet","3|n|03/31:02->10/27:03":"8/chisinau,8/tiraspol","3|n|03/31:00->10/26:24":"2/beirut","3|n|03/31:00->10/25:01":"2/gaza,2/hebron","3|n|03/29:02->10/27:02":"2/jerusalem,2/tel_aviv,israel","3|n|03/26:03->10/29:04":"8/kyiv,8/kiev","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su","3.5|n":"2/tehran,iran","2|s|03/31:02->10/27:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/31:02->10/27:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met","2|n":"0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|03/31:01->10/27:02":"3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s":"11/apia,11/tongatapu","13|n":"11/enderbury,11/kanton,11/fakaofo","12|s|04/07:03->09/29:02":"12/mcmurdo,11/auckland,12/south_pole,nz","12|s":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein","12.75|s|04/07:03->04/07:02":"11/chatham,nz-chat","11|s|04/07:03->10/06:02":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n|04/07:03->10/06:02":"11/norfolk","10|s|04/07:03->10/06:02":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap","10.5|s|04/07:01->10/06:02":"4/lord_howe,4/lhi","0|s|03/10:03->04/14:02":"0/casablanca,0/el_aaiun","0|n|03/31:00->10/27:01":"1/scoresbysund,3/azores","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory","-9|n|03/10:02->11/03:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/10:02->11/03:02":"1/anchorage,1/juneau,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"1/metlakatla,11/pitcairn","-7|n|03/10:02->11/03:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n":"1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst","-6|s|04/06:22->09/07:22":"11/easter,7/easterisland","-6|n|04/07:02->10/27:02":"1/merida","-6|n|03/12:02->11/05:02":"1/ciudad_juarez","-6|n|03/10:02->11/03:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain","-6|n":"1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|03/10:02->11/03:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est","-4|s|04/06:24->09/08:00":"1/santiago,7/continental","-4|s|03/23:24->10/06:00":"1/asuncion","-4|s":"1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west","-4|n|03/10:02->11/03:02":"1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/10:00->11/03:01":"1/havana,cuba","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east","-3|n|03/10:02->11/03:02":"1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic","-3|n":"1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem","-2|n|03/30:22->10/26:23":"1/nuuk,1/godthab","-2|n|03/10:02->11/03:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/10:02->11/03:02":"1/st_johns,6/newfoundland","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst"},r=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let o={};Object.keys(a).forEach((e=>{let t=e.split("|"),n={offset:Number(t[0]),hem:t[1]};t[2]&&(n.dst=t[2]),a[e].split(",").forEach((e=>{e=e.replace(/(^[0-9]+)\//,((e,t)=>(t=Number(t),r[t]+"/"))),o[e]=n}))})),o.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let n="etc/gmt"+t;o[n]={offset:-1*e,hem:"n"},n="utc/gmt"+t,o[n]={offset:-1*e,hem:"n"}}var i=o;var s=()=>{let e=(()=>{if("undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;let e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null})();return null===e?"utc":e};const u=/(\-?[0-9]+)h(rs)?/i,l=/(\-?[0-9]+)/,c=/utc([\-+]?[0-9]+)/i,h=/gmt([\-+]?[0-9]+)/i,d=function(e){return(e=Number(e))>=-13&&e<=13?"etc/gmt"+(e=((e*=-1)>0?"+":"")+e):null};var m=function(e){let t=e.match(u);if(null!==t)return d(t[1]);if(t=e.match(c),null!==t)return d(t[1]);if(t=e.match(h),null!==t){let e=-1*Number(t[1]);return d(e)}return t=e.match(l),null!==t?d(t[1]):null};let f=s();const p=Object.keys(i).reduce(((e,t)=>{let n=t.split("/")[1]||"";return n=n.replace(/_/g," "),e[n]=t,e}),{});var y=(e,t)=>{if(!e)return t.hasOwnProperty(f)||(console.warn(`Unrecognized IANA id '${f}'. Setting fallback tz to UTC.`),f="utc"),f;"string"!=typeof e&&console.error("Timezone must be a string - recieved: '",e,"'\n");let n=e.trim();if(n=n.toLowerCase(),!0===t.hasOwnProperty(n))return n;if(n=(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"))(n),!0===t.hasOwnProperty(n))return n;if(!0===p.hasOwnProperty(n))return p[n];if(!0===/[0-9]/.test(n)){let e=m(n);if(e)return e}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function g(e){return e%4==0&&e%100!=0||e%400==0}function b(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())}function k(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e,t=2){return(e+="").length>=t?e:new Array(t-e.length+1).join("0")+e}function v(e){let t=e%10,n=e%100;return 1===t&&11!==n?e+"st":2===t&&12!==n?e+"nd":3===t&&13!==n?e+"rd":e+"th"}function _(e){return e=(e=String(e)).replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function j(e=""){return"day"===(e=(e=(e=(e=e.toLowerCase().trim()).replace(/ies$/,"y")).replace(/s$/,"")).replace(/-/g,""))||"days"===e?"date":"min"===e||"mins"===e?"minute":e}function $(e){return"number"==typeof e?e:b(e)?e.getTime():e.epoch?e.epoch:null}function z(e,t){return!1===k(e)?t.clone().set(e):e}function O(e,t=""){const n=e>0?"+":"-",a=Math.abs(e);return`${n}${w(parseInt(""+a,10))}${t}${w(a%1*60)}`}const D={year:(new Date).getFullYear(),month:0,date:1};var M={parseArray:(e,t,n)=>{if(0===t.length)return e;let a=["year","month","date","hour","minute","second","millisecond"];for(let r=0;r{if(0===Object.keys(t).length)return e;t=Object.assign({},D,n,t);let a=Object.keys(t);for(let r=0;r0&&t<25e8&&!1===e.silent&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),e.epoch=t,e}};const S=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach((t=>{"function"==typeof e[t]&&(e=e[t](e._today[t]))})),e},q={now:e=>S(e),today:e=>S(e),tonight:e=>e=(e=S(e)).hour(18),tomorrow:e=>e=(e=(e=S(e)).add(1,"day")).startOf("day"),yesterday:e=>e=(e=(e=S(e)).subtract(1,"day")).startOf("day"),christmas:e=>{let t=S(e).year();return e=e.set([t,11,25,18,0,0])},"new years":e=>{let t=S(e).year();return e=e.set([t,11,31,18,0,0])}};q["new years eve"]=q["new years"];var N=q;var I=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 E={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5};E.date=E.day,E.month=25488e5,E.week=6048e5,E.year=3154e7,Object.keys(E).forEach((e=>{E[e+"s"]=E[e]}));var T=E;const C=(e,t,n,a,r)=>{let o=e.d[n]();if(o===t)return;let i=null===r?null:e.d[r](),s=e.epoch,u=t-o;e.epoch+=T[a]*u,"day"===a&&Math.abs(u)>28&&t<28&&(e.epoch+=T.hour),null!==r&&i!==e.d[r]()&&(e.epoch=s);const l=T[a]/2;for(;e.d[n]()t;)e.epoch-=l;null!==r&&i!==e.d[r]()&&(e.epoch=s)},A={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>C(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let n=e.d,a=n.getMonth(),r=e.epoch,o=n.getFullYear();if(a===t)return;let i=t-a;for(e.epoch+=T.day*(28*i),o!==e.d.getFullYear()&&(e.epoch=r);e.d.getMonth()t;)e.epoch-=T.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>C(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>C(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>C(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 Y=(e,t)=>{let n=Object.keys(A),a=e.clone();for(let r=0;r{if(!t)return e;let n=0;if(/^[\+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(!0===/:00/.test(t)&&(t=t.replace(/:00/,"")),!0===/:30/.test(t)&&(t=t.replace(/:30/,".5"))),/^[\+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,".5")),n=parseFloat(t),Math.abs(n)>100&&(n/=100),0===n||"Z"===t||"z"===t)return e.tz="etc/gmt",e;n*=-1,n>=0&&(n="+"+n);let a="etc/gmt"+n;return e.timezones[a]&&(e.tz=a),e};var Z=(e,t="")=>{let n=(t=t.replace(/^\s+/,"").toLowerCase()).match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:\.]?([0-9]{1,4})?/);if(null!==n){let a=Number(n[1]);if(a<0||a>24)return e.startOf("day");let r=Number(n[2]);if(n[2].length<2||r<0||r>59)return e.startOf("day");e=(e=(e=(e=e.hour(a)).minute(r)).seconds(n[3]||0)).millisecond(function(e=""){return(e=String(e)).length>3?e=e.substr(0,3):1===e.length?e+="00":2===e.length&&(e+="0"),Number(e)||0}(n[4]));let o=t.match(/[\b0-9] ?(am|pm)\b/);return null!==o&&o[1]&&(e=e.ampm(o[1])),e}if(n=t.match(/([0-9]+) ?(am|pm)/),null!==n&&n[1]){let t=Number(n[1]);return t>12||t<1?e.startOf("day"):e=(e=(e=e.hour(n[1]||0)).ampm(n[2])).startOf("hour")}return e=e.startOf("day")};let U=B();const Q=e=>{if(!0!==x.hasOwnProperty(e.month))return!1;if(1===e.month)return!!(g(e.year)&&e.date<=29)||e.date<=28;let t=x[e.month]||0;return e.date<=t},G=(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 n=parseInt(e,10);return!n&&t&&(n=t.year),n=n||(new Date).getFullYear(),n},V=function(e){return"sept"===(e=e.toLowerCase().trim())?U.sep:U[e]};var W=[{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 n=parseInt(t[1],10)-1,a=parseInt(t[2],10);(e.british||n>=12)&&(a=parseInt(t[1],10),n=parseInt(t[2],10)-1);let r={date:a,month:n,year:G(t[3],e._today)||(new Date).getFullYear()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e,t[4]))}},{reg:/^([a-z]+)[\-\/\. ]([0-9]{1,2})[\-\/\. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9:]+)?( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[5],e._today),month:V(t[1]),date:_(t[2]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[3]))}}],J=[{reg:/^([0-9]{4})[\-\/]([0-9]{2})$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:1};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let n={year:G(t[2],e._today),month:V(t[1]),date:e._today.date||1};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.quarter(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let n=t[1]||"";e=e.season(n);let a=t[3]||"";return a&&(a=a.trim(),e=e.year(a)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e))}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let n=t[0]||"";n=n.replace(/,/g,"");let a=new Date,r={year:parseInt(n.trim(),10),month:a.getMonth(),date:a.getDate()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e))}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let n=e._today;n.month&&!n.date&&(n.date=1);let a=new Date,r={year:G(t[0],n),month:n.month||a.getMonth(),date:n.date||a.getDate()};return!1===Q(r)?(e.epoch=null,e):(Y(e,r),e=Z(e))}}],K=[].concat([{reg:/^(\-?0?0?[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9\-\+:]+)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return!1===Q(n)?(e.epoch=null,e):(H(e,t[5]),Y(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([0-9]{1,2})[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return n.month>=12&&(n.date=parseInt(t[2],10),n.month=parseInt(t[3],10)-1),!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{4})[\-\/\. ]([a-z]+)[\-\/\. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={year:G(t[1],e._today),month:V(t[2]),date:_(t[3]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}}],W,[{reg:/^([0-9]{1,2})[\-\/]([a-z]+)[\-\/]?([0-9]{4})?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1]||"")};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=Z(e,t[4]))}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2}? ?(am|pm|gmt))?$/i,parse:(e,t)=>{let n={year:G(t[3],e._today),month:V(t[2]),date:_(t[1])};return n.month&&!1!==Q(n)?(Y(e,n),e=Z(e,t[4])):(e.epoch=null,e)}},{reg:/^([0-9]{1,2})[\. -/]([a-z]+)[\. -/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let n={date:Number(t[1]),month:V(t[2]),year:Number(t[3])};return!1===Q(n)?(e.epoch=null,e):(Y(e,n),e=e.startOf("day"),e=Z(e,t[4]))}}],J);var R=function(e,t,n){for(let a=0;a{let n=e._today||ne;if("number"==typeof t)return te(e,t);if(e.epoch=Date.now(),e._today&&k(e._today)&&Object.keys(e._today).length>0){let t=ee(e,n,ne);t.isValid()&&(e.epoch=t.epoch)}return null==t||""===t?e:!0===b(t)?(e.epoch=t.getTime(),e):!0===function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t)?e=X(e,t,n):!0===k(t)?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):e=ee(e,t,n):"string"!=typeof t?e:(t=I(t),!0===N.hasOwnProperty(t)?e=N[t](e):R(e,t))};let re=["sun","mon","tue","wed","thu","fri","sat"],oe=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function ie(){return re}function se(){return oe}const ue={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 le=!0;var ce=e=>{let t=e.timezone().current.offset;return t?O(t,":"):"Z"};const he=e=>le?function(e){return e?e[0].toUpperCase()+e.substr(1):""}(e):e,de={day:e=>he(e.dayName()),"day-short":e=>he(ie()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>v(e.day()),"day-pad":e=>w(e.day()),date:e=>e.date(),"date-ordinal":e=>v(e.date()),"date-pad":e=>w(e.date()),month:e=>he(e.monthName()),"month-short":e=>he(L()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>v(e.month()),"month-pad":e=>w(e.month()),"iso-month":e=>w(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+" BC")},"year-short":e=>{let t=e.year();return t>0?`'${String(e.year()).substr(2,4)}`:(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),n=t<0,a=w(Math.abs(t),4);return n&&(a=w(a,6),a="-"+a),a},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${w(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>w(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>w(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>w(e.minute()),second:e=>e.second(),"second-pad":e=>w(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>w(e.millisecond(),3),ampm:e=>e.ampm(),AMPM:e=>e.ampm().toUpperCase(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>ce(e),numeric:e=>`${e.year()}/${w(e.month()+1)}/${w(e.date())}`,"numeric-us":e=>`${w(e.month()+1)}/${w(e.date())}/${e.year()}`,"numeric-uk":e=>`${w(e.date())}/${w(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${w(e.month()+1)}/${w(e.date())}`,iso:e=>`${e.format("iso-year")}-${w(e.month()+1)}-${w(e.date())}T${w(e.h24())}:${w(e.minute())}:${w(e.second())}.${w(e.millisecond(),3)}${ce(e)}`,"iso-short":e=>{let t=w(e.month()+1),n=w(e.date());var a;return`${(a=e.year())>=0?w(a,4):"-"+w(a=Math.abs(a),4)}-${t}-${n}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${L()[e.month()]} ${v(e.date())}, ${e.time()}`,"nice-24":e=>`${L()[e.month()]} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`,"nice-year":e=>`${L()[e.month()]} ${v(e.date())}, ${e.year()}`,"nice-day":e=>`${ie()[e.day()]} ${he(L()[e.month()])} ${v(e.date())}`,"nice-full":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${he(e.monthName())} ${v(e.date())}, ${e.hour24()}:${w(e.minute())}`},me={"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(me).forEach((e=>de[e]=de[me[e]]));var fe=(e,t="")=>{if(!0!==e.isValid())return"";if(de.hasOwnProperty(t)){let n=de[t](e)||"";return"json"!==t&&(n=String(n),"ampm"!==t.toLowerCase()&&(n=he(n))),n}if(-1!==t.indexOf("{")){let n=/\{(.+?)\}/g;return t=t.replace(n,((t,n)=>{if(n=n.toLowerCase().trim(),de.hasOwnProperty(n)){let t=String(de[n](e));return"ampm"!==n.toLowerCase()?he(t):t}return""})),t}return e.format("iso-short")};const pe={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=>w(Number(String(e.year()).substr(2,4))),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>"0"+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>w(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>w(e.week()),d:e=>e.date(),dd:e=>w(e.date()),D:e=>e.dayOfYear(),DD:e=>w(e.dayOfYear()),DDD:e=>w(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=>w(e.h12()),H:e=>e.hour(),HH:e=>w(e.hour()),m:e=>e.minute(),mm:e=>w(e.minute()),s:e=>e.second(),ss:e=>w(e.second()),SSS:e=>w(e.millisecond(),3),A:e=>e.epoch-e.startOf("day").epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>O(e.timezone().current.offset),ZZ:e=>O(e.timezone().current.offset),ZZZ:e=>O(e.timezone().current.offset),ZZZZ:e=>O(e.timezone().current.offset,":")},ye=(e,t,n)=>{let a=e,r=t;for(let o=0;o{let n=t.split("");return n=function(e){for(let t=0;te))}(n),n=function(e){for(let t=0;te))).map((e=>("''"===e&&(e="'"),e)))}(n),n.reduce(((t,n)=>(void 0!==pe[n]?t+=pe[n](e)||"":(/^'.{1,}'$/.test(n)&&(n=n.replace(/'/g,"")),t+=n),t)),"")};const be=["year","season","quarter","month","week","day","quarterHour","hour","minute"],ke=function(e,t){let n=e.clone().startOf(t),a=e.clone().endOf(t).epoch-n.epoch,r=(e.epoch-n.epoch)/a;return parseFloat(r.toFixed(2))};var we=(e,t)=>{if(t)return t=j(t),ke(e,t);let n={};return be.forEach((t=>{n[t]=ke(e,t)})),n};var ve=(e,t)=>{let n=e.progress();return"quarterhour"===(t=j(t))&&(t="quarterHour"),void 0!==n[t]?(n[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):!1===e.silent&&console.warn("no known unit '"+t+"'"),e};const _e=(e,t,n)=>{let a=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,n),a+=1;return e.isAfter(t,n)&&(a-=1),a};var je=(e,t,n)=>e.isBefore(t)?_e(e,t,n):-1*_e(t,e,n);var $e=function(e,t){let n=t.epoch-e.epoch,a={milliseconds:n,seconds:parseInt(n/1e3,10)};a.minutes=parseInt(a.seconds/60,10),a.hours=parseInt(a.minutes/60,10);let r=e.clone();return a.years=((e,t)=>{let n=t.year()-e.year();return(e=e.year(t.year())).isAfter(t)&&(n-=1),n})(r,t),r=e.add(a.years,"year"),a.months=12*a.years,r=e.add(a.months,"month"),a.months+=je(r,t,"month"),a.quarters=4*a.years,a.quarters+=parseInt(a.months%12/3,10),a.weeks=52*a.years,r=e.add(a.weeks,"week"),a.weeks+=je(r,t,"week"),a.days=7*a.weeks,r=e.add(a.days,"day"),a.days+=je(r,t,"day"),a};var ze=function(e,t,n){t=z(t,e);let a=!1;if(e.isAfter(t)){let n=e;e=t,t=n,a=!0}let r=$e(e,t);return a&&(r=function(e){return Object.keys(e).forEach((t=>{e[t]*=-1})),e}(r)),n?(n=j(n),!0!==/s$/.test(n)&&(n+="s"),"dates"===n&&(n="days"),r[n]):r};const Oe=e=>Math.abs(e)||0;var De=function(e){let t="P";return t+=Oe(e.years)+"Y",t+=Oe(e.months)+"M",t+=Oe(e.days)+"DT",t+=Oe(e.hours)+"H",t+=Oe(e.minutes)+"M",t+=Oe(e.seconds)+"S",t};let Me={second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years"};function Se(e){return Me[e]||""}let qe="past",Ne="future",Ie="present",Ee="now",Te="almost",Ce="over",Ae=e=>`${e} ago`,Ye=e=>`in ${e}`;function xe(e){return Ae(e)}function Fe(e){return Ye(e)}function Pe(){return Ee}const Le={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 Be(e,t){return 1===e?e+" "+Se(t.slice(0,-1)):e+" "+Se(t)}var He=function(e){let t=null,n=null,a=[],r=[];return Object.keys(e).forEach(((o,i,s)=>{const u=Math.abs(e[o]);if(0===u)return;a.push(u+o[0]);const l=Be(u,o);if(r.push(l),!t){if(t=n=l,i>4)return;const a=s[i+1],r=Math.abs(e[a]);r>Le[a].almost?(t=Be(u+1,o),n=Te+" "+t):r>Le[a].over&&(n=Ce+" "+l)}})),{qualified:n,rounded:t,abbreviated:a,englishValues:r}};var Ze=(e,t)=>{const n=function(e,t){const n=e.isBefore(t),a=n?t:e;let r=n?e:t;r=r.clone();const o={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(o).forEach((e=>{if(r.isSame(a,e))return;let t=r.diff(a,e);r=r.add(t,e),o[e]=t})),n&&Object.keys(o).forEach((e=>{0!==o[e]&&(o[e]*=-1)})),o}(e,t=z(t,e));if(!0===Object.keys(n).every((e=>!n[e])))return{diff:n,rounded:Pe(),qualified:Pe(),precise:Pe(),abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:Ie};let a,r=Ne,{rounded:o,qualified:i,englishValues:s,abbreviated:u}=He(n);a=s.splice(0,2).join(", "),!0===e.isAfter(t)?(o=xe(o),i=xe(i),a=xe(a),r=qe):(o=Fe(o),i=Fe(i),a=Fe(a));let l=De(n);return{diff:n,rounded:o,qualified:i,precise:a,abbreviated:u,iso:l,direction:r}};var Ue={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]]},Qe=[null,[0,1],[3,1],[6,1],[9,1]];const Ge={second:e=>(Y(e,{millisecond:0}),e),minute:e=>(Y(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),Y(e,{second:0,millisecond:0}),e},hour:e=>(Y(e,{minute:0,second:0,millisecond:0}),e),day:e=>(Y(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")),Y(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(Y(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Qe[t]&&Y(e,{month:Qe[t][0],date:Qe[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),n="north";"South"===e.hemisphere()&&(n="south");for(let a=0;a(Y(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{let t=(e=e.startOf("year")).year(),n=10*parseInt(t/10,10);return e=e.year(n)},century:e=>{let t=(e=e.startOf("year")).year(),n=100*parseInt(t/100,10);return e=e.year(n)}};Ge.date=Ge.day;var Ve=function(e,t,n){if(!t||!n)return[];if(t=j(t),n=e.clone().set(n),e.isAfter(n)){let t=e;e=n,n=t}let a=e.clone();if(function(e){return!!ie().find((t=>t===e))||!!se().find((t=>t===e))}(t))a=a.next(t),t="week";else{a.startOf(t).isBefore(e)&&(a=a.next(t))}let r=[];for(;a.isBefore(n);)r.push(a),a=a.add(1,t);return r};var We=e=>{let n=e.timezones,a=e.tz;if(!1===n.hasOwnProperty(a)&&(a=y(e.tz,n)),null===a)return!1===e.silent&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let r=n[a],o={name:(i=a,i=(i=(i=(i=(i=(i=(i=i[0].toUpperCase()+i.substr(1)).replace(/[\/_-]([a-z])/gi,(e=>e.toUpperCase()))).replace(/_(of|es)_/i,(e=>e.toLowerCase()))).replace(/\/gmt/i,"/GMT")).replace(/\/Dumontdurville$/i,"/DumontDUrville")).replace(/\/Mcmurdo$/i,"/McMurdo")).replace(/\/Port-au-prince$/i,"/Port-au-Prince")),hasDst:Boolean(r.dst),default_offset:r.offset,hemisphere:"s"===r.hem?"South":"North",current:{}};var i,s;if(o.hasDst){let e=(s=r.dst)?s.split("->"):[];o.change={start:e[0],back:e[1]}}let u=r.offset,l=u;return!0===o.hasDst&&(l="North"===o.hemisphere?u-1:r.offset+1),!1===o.hasDst?(o.current.offset=u,o.current.isDST=!1):!0===t(e.epoch,o.change.start,o.change.back,u,l)?(o.current.offset=u,o.current.isDST="North"===o.hemisphere):(o.current.offset=l,o.current.isDST="South"===o.hemisphere),o};const Je=["century","decade","year","month","date","day","hour","minute","second","millisecond"],Ke={set:function(e,t){let n=this.clone();return n=ae(n,e),t&&(this.tz=y(t)),n},timezone:function(){return We(this)},isDST:function(){return We(this).current.isDST},hasDST:function(){return We(this).hasDst},offset:function(){return 60*We(this).current.offset},hemisphere:function(){return We(this).hemisphere},format:function(e){return fe(this,e)},unixFmt:function(e){return ge(this,e)},startOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Ge[t]?Ge[t](n):"summer"===t||"winter"===t?(n=n.season(t),Ge.season(n)):n})(this,e)},endOf:function(e){return((e,t)=>{let n=e.clone();return t=j(t),Ge[t]?(n=Ge[t](n),n=n.add(1,t),n=n.subtract(1,"millisecond"),n):n})(this,e)},leapYear:function(){return g(this.year())},progress:function(e){return we(this,e)},nearest:function(e){return ve(this,e)},diff:function(e,t){return ze(this,e,t)},since:function(e){return e||(e=this.clone().set()),Ze(this,e)},next:function(e){return this.add(1,e).startOf(e)},last:function(e){return this.subtract(1,e).startOf(e)},isValid:function(){return!(!this.epoch&&0!==this.epoch)&&!isNaN(this.d.getTime())},goto:function(e){let t=this.clone();return t.tz=y(e,t.timezones),t},every:function(e,t){if("object"==typeof e&&"string"==typeof t){let n=t;t=e,e=n}return Ve(this,e,t)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},daysInMonth:function(){switch(this.month()){case 0:case 2:case 4:case 6:case 7:case 9:case 11:return 31;case 1:return this.leapYear()?29:28;case 3:case 5:case 8:case 10:return 30;default:throw new Error("Invalid Month state.")}},log:function(){return console.log(""),console.log(fe(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(fe(this,"full-short")),this},json:function(){return Je.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=ie().indexOf(e);-1===t&&(t=se().indexOf(e)),-1===t&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};Ke.inDST=Ke.isDST,Ke.round=Ke.nearest,Ke.each=Ke.every;var Re=Ke;const Xe=e=>("string"==typeof e&&(e=parseInt(e,10)),e),et=["year","month","date","hour","minute","second","millisecond"],tt=(e,t,n)=>{let a=et.indexOf(n),r=et.slice(a,et.length);for(let n=0;n=24?t=24:t<0&&(t=0);let a=e.clone(),r=e.hour()-t,o=r*T.hour;return e.epoch-=o,e.date()!==a.date()&&(e=a.clone(),r>1&&(r-=1),r<1&&(r+=1),o=r*T.hour,e.epoch-=o),Y(e,{hour:t}),tt(e,a,"minute"),(e=nt(e,a,n,"day")).epoch},ot=function(e,t){return"string"==typeof t&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=(t=Number(t))>30?1900+t:2e3+t),t=Xe(t),Y(e,{year:t}),e.epoch};let it="am",st="pm";const ut={millisecond:function(e){if(void 0!==e){let t=this.clone();return t.epoch=function(e,t){t=Xe(t);let n=e.millisecond()-t;return e.epoch-n}(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Xe(t);let a=e.clone(),r=(e.second()-t)*T.second;return e.epoch=e.epoch-r,(e=nt(e,a,n,"minute")).epoch}(n,e,t),n}return this.d.getSeconds()},minute:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=at(n,e,t),n}return this.d.getMinutes()},hour:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone();return n.epoch=rt(n,e,t),n}return n.getHours()},hourFloat:function(e,t){if(void 0!==e){let n=this.clone(),a=e%1;a*=60;let r=parseInt(e,10);return n.epoch=rt(n,r,t),n.epoch=at(n,a,t),n}let n=this.d,a=n.getHours(),r=n.getMinutes();return r/=60,a+r},hour12:function(e,t){let n=this.d;if(void 0!==e){let n=this.clone(),a=(e=""+e).match(/^([0-9]+)(am|pm)$/);if(a){let e=parseInt(a[1],10);"pm"===a[2]&&(e+=12),n.epoch=rt(n,e,t)}return n}let a=n.getHours();return a>12&&(a-=12),0===a&&(a=12),a},time:function(e,t){if(void 0!==e){let n=this.clone();return e=e.toLowerCase().trim(),n.epoch=function(e,t,n){let a=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!a){if(a=t.match(/([0-9]{1,2}) ?(am|pm)/),!a)return e.epoch;a.splice(2,0,"0"),a.splice(3,0,"")}let r=!1,o=parseInt(a[1],10),i=parseInt(a[2],10);i>=60&&(i=59),o>12&&(r=!0),!1===r&&("am"===a[4]&&12===o&&(o=0),"pm"===a[4]&&o<12&&(o+=12)),a[3]=a[3]||"",a[3]=a[3].replace(/:/,"");let s=parseInt(a[3],10)||0,u=e.clone();return e=(e=(e=(e=e.hour(o)).minute(i)).second(s)).millisecond(0),(e=nt(e,u,n,"day")).epoch}(n,e,t),n}return`${this.h12()}:${w(this.minute())}${this.ampm()}`},ampm:function(e,t){let n=it,a=this.hour();if(a>=12&&(n=st),"string"!=typeof e)return n;let r=this.clone();return e=e.toLowerCase().trim(),a>=12&&"am"===e?(a-=12,r.hour(a,t)):a<12&&"pm"===e?(a+=12,r.hour(a,t)):r},dayTime:function(e,t){if(void 0!==e){const n={morning:"7:00",breakfast:"7:00",noon:"12:00",lunch:"12:00",afternoon:"14:00",evening:"18:00",dinner:"18:00",night:"23:00",midnight:"00:00"};let a=this.clone();return e=(e=e||"").toLowerCase(),!0===n.hasOwnProperty(e)&&(a=a.time(n[e],t)),a}let n=this.hour();return n<6?"night":n<12?"morning":n<17?"afternoon":n<22?"evening":"night"},iso:function(e){return void 0!==e?this.set(e):this.format("iso")}};var lt=ut;const ct={date:function(e,t){if(void 0!==e){let n=this.clone();return(e=parseInt(e,10))&&(n.epoch=function(e,t,n){if((t=Xe(t))>28){let n=e.month(),a=x[n];1===n&&29===t&&g(e.year())&&(a=29),t>a&&(t=a)}t<=0&&(t=1);let a=e.clone();return Y(e,{date:t}),(e=nt(e,a,n,"month")).epoch}(n,e,t)),n}return this.d.getDate()},day:function(e,t){if(void 0===e)return this.d.getDay();let n=this.clone(),a=e;"string"==typeof e&&(e=e.toLowerCase(),ue.hasOwnProperty(e)?a=ue[e]:(a=ie().indexOf(e),-1===a&&(a=se().indexOf(e))));let r=this.d.getDay()-a;!0===t&&r>0&&(r-=7),!1===t&&r<0&&(r+=7);let o=this.subtract(r,"days");return Y(o,{hour:n.hour(),minute:n.minute(),second:n.second()}),o},dayName:function(e,t){if(void 0===e)return se()[this.day()];let n=this.clone();return n=n.day(e,t),n}};var ht=ct;const dt=e=>e=(e=(e=e.minute(0)).second(0)).millisecond(1),mt={dayOfYear:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){t=Xe(t);let a=e.clone();return(t-=1)<=0?t=0:t>=365&&(t=g(e.year())?365:364),e=(e=e.startOf("year")).add(t,"day"),tt(e,a,"hour"),(e=nt(e,a,n,"year")).epoch}(n,e,t),n}let n,a=0,r=this.d.getMonth();for(let e=1;e<=r;e++)n=new Date,n.setDate(1),n.setFullYear(this.d.getFullYear()),n.setHours(1),n.setMinutes(1),n.setMonth(e),n.setHours(-2),a+=n.getDate();return a+this.d.getDate()},week:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){let a=e.clone();return t=Xe(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=nt(e,a,n,"year")).epoch}(this,e,t),n=dt(n),n}let n=this.clone();n=n.month(0),n=n.date(1),n=dt(n),n=n.day("monday"),11===n.month()&&n.date()>=25&&(n=n.add(1,"week"));let a=1;1===n.date()&&(a=0),n=n.minus(1,"second");const r=this.epoch;if(n.epoch>r)return 1;let o=0,i=4*this.month();for(n.epoch+=T.week*i,o+=i;o<=52;o++){if(n.epoch>r)return o+a;n=n.add(1,"week")}return 52},month:function(e,t){if(void 0!==e){let n=this.clone();return n.epoch=function(e,t,n){"string"==typeof t&&("sept"===t&&(t="sep"),t=B()[t.toLowerCase()]),(t=Xe(t))>=12&&(t=11),t<=0&&(t=0);let a=e.date();a>x[t]&&(a=x[t]);let r=e.clone();return Y(e,{month:t,d:a}),(e=nt(e,r,n,"year")).epoch}(n,e,t),n}return this.d.getMonth()},monthName:function(e,t){if(void 0!==e){let n=this.clone();return n=n.month(e,t),n}return P[this.month()]},quarter:function(e,t){if(void 0!==e&&("string"==typeof e&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Qe[e])){let n=this.clone(),a=Qe[e][0];return n=n.month(a,t),n=n.date(1,t),n=n.startOf("day"),n}let n=this.d.getMonth();for(let e=1;e=Ue[n][e][1]&&a0&&(t.epoch=ot(t,-1*n)),"ad"===e&&n<0&&(t.epoch=ot(t,-1*n)),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,n)=>(n.match(/b\.?c\.?/i)&&(t="-"+t),t)))).replace(/c$/,""));let t=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(0===t&&(t=1),t=t>=0?100*(t-1):100*(t+1),this.year(t))}let t=this.startOf("century").year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(void 0!==e){if("string"==typeof e&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=Number(e),isNaN(e)))return console.warn("Spacetime: Invalid millenium input"),this;e>0&&(e-=1);let t=1e3*e;return 0===t&&(t=1),this.year(t)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}};var ft=mt;const pt=Object.assign({},lt,ht,ft);pt.milliseconds=pt.millisecond,pt.seconds=pt.second,pt.minutes=pt.minute,pt.hours=pt.hour,pt.hour24=pt.hour,pt.h12=pt.hour12,pt.h24=pt.hour24,pt.days=pt.day;var yt=e=>{Object.keys(pt).forEach((t=>{e.prototype[t]=pt[t]}))};const gt=function(e,t){return 1===e&&g(t)?29:x[e]},bt=(e,t)=>{if(e.month>0){let n=parseInt(e.month/12,10);e.year=t.year()+n,e.month=e.month%12}else if(e.month<0){let n=Math.abs(e.month),a=parseInt(n/12,10);n%12!=0&&(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},kt=(e,t,n)=>{let a=t.year(),r=t.month(),o=gt(r,a);for(;n>o;)n-=o,r+=1,r>=12&&(r-=12,a+=1),o=gt(r,a);return e.month=r,e.date=n,e},wt=(e,t,n)=>{e.year=t.year(),e.month=t.month();let a=t.date();for(e.date=a-Math.abs(n);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let t=gt(e.month,e.year);e.date+=t}return e},vt=["millisecond","second","minute","hour","date","month"];let _t={second:vt.slice(0,1),minute:vt.slice(0,2),quarterhour:vt.slice(0,2),hour:vt.slice(0,3),date:vt.slice(0,4),month:vt.slice(0,4),quarter:vt.slice(0,4),season:vt.slice(0,4),year:vt,decade:vt,century:vt};_t.week=_t.hour,_t.season=_t.date,_t.quarter=_t.date;const jt={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},$t={month:!0,quarter:!0,season:!0,year:!0};var zt=e=>{e.prototype.add=function(e,t){let n=this.clone();if(!t||0===e)return n;let a=this.clone();if("millisecond"===(t=j(t)))return n.epoch+=e,n;"fortnight"===t&&(e*=2,t="week"),T[t]?n.epoch+=T[t]*e:"week"===t||"weekend"===t?n.epoch+=T.day*(7*e):"quarter"===t||"season"===t?n.epoch+=T.month*(3*e):"quarterhour"===t&&(n.epoch+=15*T.minute*e);let r={};if(_t[t]&&_t[t].forEach((e=>{r[e]=a[e]()})),jt[t]){const e=a.timezone().current.offset-n.timezone().current.offset;n.epoch+=3600*e*1e3}if("month"===t&&(r.month=a.month()+e,r=bt(r,a)),"week"===t){let t=a.date()+7*e;t<=28&&t>1&&(r.date=t)}if("weekend"===t&&"saturday"!==n.dayName())n=n.day("saturday",!0);else if("date"===t){if(e<0)r=wt(r,a,e);else{let t=a.date()+e;r=kt(r,a,t)}0!==e&&a.isSame(n,"day")&&(r.date=a.date()+e)}else if("quarter"===t){if(r.month=a.month()+3*e,r.year=a.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=a.date()}else if("year"===t){let t=a.year()+e,r=n.year();if(rt){let t=Math.floor(e/4)||1;n.epoch+=T.day*t}}else"decade"===t?r.year=n.year()+10:"century"===t&&(r.year=n.year()+100);if($t[t]){let e=x[r.month];r.date=a.date(),r.date>e&&(r.date=e)}return Object.keys(r).length>1&&Y(n,r),n},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 Ot={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()};Ot.date=Ot.day;var Dt=e=>{e.prototype.isSame=function(t,n,a=!0){let r=this;if(!n)return null;if("string"==typeof t&&"object"==typeof n){let e=t;t=n,n=e}return"string"!=typeof t&&"number"!=typeof t||(t=new e(t,this.timezone.name)),n=n.replace(/s$/,""),!0===a&&r.tz!==t.tz&&((t=t.clone()).tz=r.tz),Ot[n]?Ot[n](r)===Ot[n](t):null}};var Mt=e=>{const t={isAfter:function(e){let t=$(e=z(e,this));return null===t?null:this.epoch>t},isBefore:function(e){let t=$(e=z(e,this));return null===t?null:this.epoch{e.prototype[n]=t[n]}))};var St=e=>{const t={i18n:function(e){var t,n,a;return k(e.days)&&(t=e.days,re=t.short||re,oe=t.long||oe),k(e.months)&&function(e){F=e.short||F,P=e.long||P}(e.months),a=e.useTitleCase,"[object Boolean]"===Object.prototype.toString.call(a)&&(n=e.useTitleCase,le=n),k(e.ampm)&&function(e){it=e.am||it,st=e.pm||st}(e.ampm),k(e.distance)&&function(e){Ae=e.pastDistance||Ae,Ye=e.futureDistance||Ye,qe=e.past||qe,Ne=e.future||Ne,Ie=e.present||Ie,Ee=e.now||Ee,Te=e.almost||Te,Ce=e.over||Ce}(e.distance),k(e.units)&&function(e={}){Me={second:e.second||Me.second,seconds:e.seconds||Me.seconds,minute:e.minute||Me.minute,minutes:e.minutes||Me.minutes,hour:e.hour||Me.hour,hours:e.hours||Me.hours,day:e.day||Me.day,days:e.days||Me.days,month:e.month||Me.month,months:e.months||Me.months,year:e.year||Me.year,years:e.years||Me.years}}(e.units),this}};Object.keys(t).forEach((n=>{e.prototype[n]=t[n]}))};let qt=i;const Nt=function(e,t,a={}){this.epoch=null,this.tz=y(t,qt),this.silent=void 0===a.silent||a.silent,this.british=a.dmy||a.british,this._weekStart=1,void 0!==a.weekStart&&(this._weekStart=a.weekStart),this._today={},void 0!==a.today&&(this._today=a.today),Object.defineProperty(this,"d",{get:function(){let e=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:()=>qt,set:e=>(qt=e,e)});let r=ae(this,e);this.epoch=r.epoch};Object.keys(Re).forEach((e=>{Nt.prototype[e]=Re[e]})),Nt.prototype.clone=function(){return new Nt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})},Nt.prototype.toLocalDate=function(){return this.toNativeDate()},Nt.prototype.toNativeDate=function(){return new Date(this.epoch)},yt(Nt),zt(Nt),Dt(Nt),Mt(Nt),St(Nt);var It=Nt;var Et=(e,t)=>{let n=new It(null),a=new It(null);n=n.time(e),a=t?a.time(t):n.add(59,"minutes");let r=n.hour(),o=a.hour();return Object.keys(n.timezones).filter((e=>{if(-1===e.indexOf("/"))return!1;let t=new It(null,e),i=t.hour();return i>=r&&i<=o&&(!(i===r&&t.minute()a.minute()))}))};const Tt=(e,t,n)=>new It(e,t,n),Ct=function(e){let t=e._today||{};return Object.keys(t).forEach((n=>{e=e[n](t[n])})),e};Tt.now=(e,t)=>{let n=new It((new Date).getTime(),e,t);return n=Ct(n),n},Tt.today=(e,t)=>{let n=new It((new Date).getTime(),e,t);return n=Ct(n),n.startOf("day")},Tt.tomorrow=(e,t)=>{let n=new It((new Date).getTime(),e,t);return n=Ct(n),n.add(1,"day").startOf("day")},Tt.yesterday=(e,t)=>{let n=new It((new Date).getTime(),e,t);return n=Ct(n),n.subtract(1,"day").startOf("day")},Tt.extend=function(e={}){return Object.keys(e).forEach((t=>{It.prototype[t]=e[t]})),this},Tt.timezones=function(){return(new It).timezones},Tt.max=function(e,t){let n=new It(null,e,t);return n.epoch=864e13,n},Tt.min=function(e,t){let n=new It(null,e,t);return n.epoch=-864e13,n},Tt.whereIts=Et,Tt.version="7.5.0",Tt.plugin=Tt.extend;export{Tt as default}; diff --git a/changelog.md b/changelog.md index 188fbaeb..3a1b140f 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,7 @@ This project follows semVer, where: - **[fix]** - offset in Africa/Cairo #404 - **[update]** - 2024 DST changes +- **[change]** - support i18n config in .since() #403 ### 7.4.8 [Oct 2023] diff --git a/package-lock.json b/package-lock.json index e0baaa44..af95dacf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "spacetime", - "version": "7.4.7", + "version": "7.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "spacetime", - "version": "7.4.7", + "version": "7.5.0", "license": "Apache-2.0", "devDependencies": { "amble": "^1.3.0", @@ -20,7 +20,7 @@ "rollup-plugin-terser": "7.0.2", "shelljs": "0.8.5", "tap-dancer": "0.3.4", - "tape": "5.7.1", + "tape": "5.7.2", "timekeeper": "2.3.1" } }, @@ -733,13 +733,17 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/camelcase": { @@ -1280,10 +1284,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.6", @@ -1551,6 +1558,18 @@ "node": ">=8" } }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -2409,9 +2428,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2920,6 +2939,21 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/set-function-name": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", @@ -3233,28 +3267,28 @@ } }, "node_modules/tape": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/tape/-/tape-5.7.1.tgz", - "integrity": "sha512-5U2nU0PbvWXXtJxE0hFv78VSyhJiyEPq1wNtMCWUxt17SZbeBqs9V5zcyDqkyguYN39d8qAjZxfFkjJ1+kB4yA==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/tape/-/tape-5.7.2.tgz", + "integrity": "sha512-cvSyprYahyOYXbtBwV/B7nrx7kINeZ3VZ9fKoSywoPwZN3oQ1WVLvt+Vl0XCz/gi37CDrY3dlW790nzviIzoPw==", "dev": true, "dependencies": { "@ljharb/resumer": "^0.0.1", "@ljharb/through": "^2.3.11", "array.prototype.every": "^1.1.5", - "call-bind": "^1.0.2", + "call-bind": "^1.0.5", "deep-equal": "^2.2.2", "defined": "^1.0.1", "dotignore": "^0.1.2", "for-each": "^0.3.3", "get-package-type": "^0.1.0", "glob": "^7.2.3", - "has": "^1.0.3", "has-dynamic-import": "^2.0.1", + "hasown": "^2.0.0", "inherits": "^2.0.4", "is-regex": "^1.1.4", "minimist": "^1.2.8", - "mock-property": "^1.0.0", - "object-inspect": "^1.12.3", + "mock-property": "^1.0.2", + "object-inspect": "^1.13.1", "object-is": "^1.1.5", "object-keys": "^1.1.1", "object.assign": "^4.1.4", @@ -4252,13 +4286,14 @@ } }, "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" } }, "camelcase": { @@ -4703,9 +4738,9 @@ "optional": true }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true }, "function.prototype.name": { @@ -4890,6 +4925,15 @@ "type-fest": "^0.8.0" } }, + "hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "requires": { + "function-bind": "^1.1.2" + } + }, "html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -5533,9 +5577,9 @@ } }, "object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true }, "object-is": { @@ -5948,6 +5992,18 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, + "set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "requires": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + } + }, "set-function-name": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", @@ -6191,28 +6247,28 @@ } }, "tape": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/tape/-/tape-5.7.1.tgz", - "integrity": "sha512-5U2nU0PbvWXXtJxE0hFv78VSyhJiyEPq1wNtMCWUxt17SZbeBqs9V5zcyDqkyguYN39d8qAjZxfFkjJ1+kB4yA==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/tape/-/tape-5.7.2.tgz", + "integrity": "sha512-cvSyprYahyOYXbtBwV/B7nrx7kINeZ3VZ9fKoSywoPwZN3oQ1WVLvt+Vl0XCz/gi37CDrY3dlW790nzviIzoPw==", "dev": true, "requires": { "@ljharb/resumer": "^0.0.1", "@ljharb/through": "^2.3.11", "array.prototype.every": "^1.1.5", - "call-bind": "^1.0.2", + "call-bind": "^1.0.5", "deep-equal": "^2.2.2", "defined": "^1.0.1", "dotignore": "^0.1.2", "for-each": "^0.3.3", "get-package-type": "^0.1.0", "glob": "^7.2.3", - "has": "^1.0.3", "has-dynamic-import": "^2.0.1", + "hasown": "^2.0.0", "inherits": "^2.0.4", "is-regex": "^1.1.4", "minimist": "^1.2.8", - "mock-property": "^1.0.0", - "object-inspect": "^1.12.3", + "mock-property": "^1.0.2", + "object-inspect": "^1.13.1", "object-is": "^1.1.5", "object-keys": "^1.1.1", "object.assign": "^4.1.4", diff --git a/package.json b/package.json index 28b90f62..61b06993 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "rollup-plugin-terser": "7.0.2", "shelljs": "0.8.5", "tap-dancer": "0.3.4", - "tape": "5.7.1", + "tape": "5.7.2", "timekeeper": "2.3.1" }, "license": "Apache-2.0" diff --git a/src/_version.js b/src/_version.js index 2278603c..31add70e 100644 --- a/src/_version.js +++ b/src/_version.js @@ -1 +1 @@ -export default '7.4.8' \ No newline at end of file +export default '7.5.0' \ No newline at end of file