From 547c730278e694308eb74f1e93293681feed3170 Mon Sep 17 00:00:00 2001 From: DavisVaughan Date: Thu, 30 Mar 2023 16:57:55 -0400 Subject: [PATCH 1/3] Add simple updater script --- .Rbuildignore | 1 + tools/update-rrule.R | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tools/update-rrule.R diff --git a/.Rbuildignore b/.Rbuildignore index cb41503..d3ca1e3 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,3 +12,4 @@ ^\.github$ ^cran-comments\.md$ ^CRAN-RELEASE$ +^tools$ diff --git a/tools/update-rrule.R b/tools/update-rrule.R new file mode 100644 index 0000000..aa9610e --- /dev/null +++ b/tools/update-rrule.R @@ -0,0 +1,15 @@ +# Update script for `inst/js/rrule.js`, which corresponds to the minified rrule +# JS library found at https://github.com/jakubroztocil/rrule. + +url <- "https://jakubroztocil.github.io/rrule/dist/es5/rrule.min.js" + +tf <- tempfile(fileext = ".js") +download.file(url, destfile = tf) + +fs::file_copy( + path = tf, + new_path = here::here("inst", "js", "rrule.js"), + overwrite = TRUE +) + +unlink(tf) From 3803f62dcd2d7619e3641d835d4ed89c46a2637e Mon Sep 17 00:00:00 2001 From: DavisVaughan Date: Thu, 30 Mar 2023 16:58:08 -0400 Subject: [PATCH 2/3] Update `rrule.js` --- inst/js/rrule.js | 66 +++++++++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/inst/js/rrule.js b/inst/js/rrule.js index f33ff60..103bb16 100644 --- a/inst/js/rrule.js +++ b/inst/js/rrule.js @@ -1,26 +1,40 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("luxon")):"function"==typeof define&&define.amd?define(["luxon"],e):"object"==typeof exports?exports.rrule=e(require("luxon")):t.rrule=e(t.luxon)}("undefined"!=typeof self?self:this,function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e,n){"use strict";n.d(e,"f",function(){return r}),n.d(e,"e",function(){return i}),n.d(e,"d",function(){return o}),n.d(e,"j",function(){return a}),n.d(e,"k",function(){return s}),n.d(e,"m",function(){return u}),n.d(e,"h",function(){return c}),n.d(e,"l",function(){return h}),n.d(e,"i",function(){return d}),n.d(e,"a",function(){return y}),n.d(e,"b",function(){return l}),n.d(e,"g",function(){return f}),n.d(e,"c",function(){return b});var r=function(t){return null!==t&&void 0!==t},i=function(t){return"number"==typeof t},o=Array.isArray,a=function(t,e){void 0===e&&(e=t),1===arguments.length&&(e=t,t=0);for(var n=[],r=t;r>=0,r.length>e?String(r):((e-=r.length)>n.length&&(n+=s(n,e/n.length)),n.slice(0,e)+String(r))}var h=function(t,e,n){var r=t.split(e);return n?r.slice(0,n).concat([r.slice(n).join(e)]):r},d=function(t,e){var n=t%e;return n*e<0?n+e:n},y=function(t,e){return{div:Math.floor(t/e),mod:d(t,e)}},l=function(t){return!r(t)||0===t.length},f=function(t){return!l(t)},b=function(t,e){return f(t)&&-1!==t.indexOf(e)}},function(t,e,n){"use strict";n.r(e);var r,i=n(0);!function(t){t.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],t.ONE_DAY=864e5,t.MAXYEAR=9999,t.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),t.PY_WEEKDAYS=[6,0,1,2,3,4,5],t.getYearDay=function(e){var n=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((n.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/t.ONE_DAY)+1},t.isLeapYear=function(t){return t%4==0&&t%100!=0||t%400==0},t.isDate=function(t){return t instanceof Date},t.isValidDate=function(e){return t.isDate(e)&&!isNaN(e.getTime())},t.tzOffset=function(t){return 60*t.getTimezoneOffset()*1e3},t.daysBetween=function(e,n){var r=e.getTime()-t.tzOffset(e)-(n.getTime()-t.tzOffset(n));return Math.round(r/t.ONE_DAY)},t.toOrdinal=function(e){return t.daysBetween(e,t.ORDINAL_BASE)},t.fromOrdinal=function(e){return new Date(t.ORDINAL_BASE.getTime()+e*t.ONE_DAY)},t.getMonthDays=function(e){var n=e.getUTCMonth();return 1===n&&t.isLeapYear(e.getUTCFullYear())?29:t.MONTH_DAYS[n]},t.getWeekday=function(e){return t.PY_WEEKDAYS[e.getUTCDay()]},t.monthRange=function(e,n){var r=new Date(Date.UTC(e,n,1));return[t.getWeekday(r),t.getMonthDays(r)]},t.combine=function(t,e){return e=e||t,new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},t.clone=function(t){return new Date(t.getTime())},t.cloneDates=function(e){for(var n=[],r=0;rthis.maxDate;if("between"===this.method){if(e)return!0;if(n)return!1}else if("before"===this.method){if(n)return!1}else if("after"===this.method)return!!e||(this.add(t),!1);return this.add(t)},t.prototype.add=function(t){return this._result.push(t),!0},t.prototype.getValue=function(){var t=this._result;switch(this.method){case"all":case"between":return t;case"before":case"after":default:return t.length?t[t.length-1]:null}},t.prototype.clone=function(){return new t(this.method,this.args)},t}(),u=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.iterator=r,i}return u(e,t),e.prototype.add=function(t){return!!this.iterator(t,this._result.length)&&(this._result.push(t),!0)},e}(s);function h(t){return t0?"+":"")+String(this.n)+t),t},t.prototype.getJsWeekday=function(){return 6===this.weekday?0:this.weekday+1},t}(),l=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=function(){function t(t,e,n,r){this.hour=t,this.minute=e,this.second=n,this.millisecond=r||0}return t.prototype.getHours=function(){return this.hour},t.prototype.getMinutes=function(){return this.minute},t.prototype.getSeconds=function(){return this.second},t.prototype.getMilliseconds=function(){return this.millisecond},t.prototype.getTime=function(){return 1e3*(60*this.hour*60+60*this.minute+this.second)+this.millisecond},t}(),b=function(t){function e(e,n,r,i,o,a,s){var u=t.call(this,i,o,a,s)||this;return u.year=e,u.month=n,u.day=r,u}return l(e,t),e.fromDate=function(t){return new this(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.valueOf()%1e3)},e.prototype.getWeekday=function(){return r.getWeekday(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(t){this.year+=t},e.prototype.addMonths=function(t){if(this.month+=t,this.month>12){var e=Math.floor(this.month/12),n=Object(i.i)(this.month,12);this.month=n,this.year+=e,0===this.month&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,e){e>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-e))+7*t:this.day+=-(this.getWeekday()-e)+7*t,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,e,n){for(e&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var r=Object(i.a)(this.hour,24),o=r.div,a=r.mod;if(o&&(this.hour=a,this.addDaily(o)),Object(i.b)(n)||Object(i.c)(n,this.hour))break}},e.prototype.addMinutes=function(t,e,n,r){for(e&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/t)*t);;){this.minute+=t;var o=Object(i.a)(this.minute,60),a=o.div,s=o.mod;if(a&&(this.minute=s,this.addHours(a,!1,n)),(Object(i.b)(n)||Object(i.c)(n,this.hour))&&(Object(i.b)(r)||Object(i.c)(r,this.minute)))break}},e.prototype.addSeconds=function(t,e,n,r,o){for(e&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/t)*t);;){this.second+=t;var a=Object(i.a)(this.second,60),s=a.div,u=a.mod;if(s&&(this.second=u,this.addMinutes(s,!1,n,r)),(Object(i.b)(n)||Object(i.c)(n,this.hour))&&(Object(i.b)(r)||Object(i.c)(r,this.minute))&&(Object(i.b)(o)||Object(i.c)(o,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=r.monthRange(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,13===this.month&&(this.month=1,++this.year,this.year>r.MAXYEAR))return;t=r.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,e){var n=t.freq,r=t.interval,i=t.wkst,a=t.byhour,s=t.byminute,u=t.bysecond;switch(n){case o.YEARLY:return this.addYears(r);case o.MONTHLY:return this.addMonths(r);case o.WEEKLY:return this.addWeekly(r,i);case o.DAILY:return this.addDaily(r);case o.HOURLY:return this.addHours(r,e,a);case o.MINUTELY:return this.addMinutes(r,e,a,s);case o.SECONDLY:return this.addSeconds(r,e,a,s,u)}},e}(f);function p(t){var e=[],n={};if(Object.keys(t).forEach(function(r){var o=t[r];n[r]=o,Object(i.c)(rt,r)||e.push(r),a.isDate(o)&&!a.isValidDate(o)&&e.push(r)}),e.length)throw new Error("Invalid options: "+e.join(", "));return n}var m=function(){return(m=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=4?(y=0,r=d.yearlen+Object(i.i)(h-e.wkst,7)):r=s-y;for(var l=Math.floor(r/7),f=Object(i.i)(r,7),b=Math.floor(l+f/4),p=0;p0&&m<=b){var w=void 0;m>1?(w=y+7*(m-1),y!==n&&(w-=7-n)):w=y;for(var v=0;v<7&&(d.wnomask[w]=1,w++,d.wdaymask[w]!==e.wkst);v++);}}if(Object(i.c)(e.byweekno,1)){w=y+7*b;if(y!==n&&(w-=7-n),w=4?(k=0,E=j+Object(i.i)(g-e.wkst,7)):E=s-y,O=Math.floor(52+Object(i.i)(E,7)/4)}if(Object(i.c)(e.byweekno,O))for(w=0;w=it.HOURLY&&Object(i.g)(o)&&!Object(i.c)(o,e.hour)||r>=it.MINUTELY&&Object(i.g)(a)&&!Object(i.c)(a,e.minute)||r>=it.SECONDLY&&Object(i.g)(s)&&!Object(i.c)(s,e.second))return[];return t.gettimeset(r)(e.hour,e.minute,e.second,e.millisecond)}(y,d,e);;){var p=y.getdayset(r)(d.year,d.month,d.day),m=p[0],w=p[1],v=p[2],O=$(m,w,v,y,e);if(Object(i.g)(u))for(var g=V(u,l,w,v,y,m),k=0;ks)return Q(t);if(j>=n){var E=J(j,e);if(!t.accept(E))return Q(t);if(c&&!--c)return Q(t)}}else for(k=w;ks)return Q(t);if(j>=n){E=J(j,e);if(!t.accept(E))return Q(t);if(c&&!--c)return Q(t)}}}if(0===e.interval)return Q(t);if(d.add(e,O),d.year>a.MAXYEAR)return Q(t);h(r)||(l=y.gettimeset(r)(d.hour,d.minute,d.second,0)),y.rebuild(d.year,d.month)}}function G(t,e,n){var r=n.bymonth,o=n.byweekno,a=n.byweekday,s=n.byeaster,u=n.bymonthday,c=n.bynmonthday,h=n.byyearday;return Object(i.g)(r)&&!Object(i.c)(r,t.mmask[e])||Object(i.g)(o)&&!t.wnomask[e]||Object(i.g)(a)&&!Object(i.c)(a,t.wdaymask[e])||Object(i.g)(t.nwdaymask)&&!t.nwdaymask[e]||null!==s&&!Object(i.c)(t.eastermask,e)||(Object(i.g)(u)||Object(i.g)(c))&&!Object(i.c)(u,t.mdaymask[e])&&!Object(i.c)(c,t.nmdaymask[e])||Object(i.g)(h)&&(e=t.yearlen&&!Object(i.c)(h,e+1-t.yearlen)&&!Object(i.c)(h,-t.nextyearlen+e-t.yearlen))}function J(t,e){return new E(t,e.tzid).rezonedDate()}function Q(t){return t.getValue()}function $(t,e,n,r,i){for(var o=!1,a=e;a=-366&&u<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}if(!(Boolean(e.byweekno)||Object(i.g)(e.byweekno)||Object(i.g)(e.byyearday)||Boolean(e.bymonthday)||Object(i.g)(e.bymonthday)||Object(i.f)(e.byweekday)||Object(i.f)(e.byeaster)))switch(e.freq){case it.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case it.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case it.WEEKLY:e.byweekday=[a.getWeekday(e.dtstart)]}if(Object(i.f)(e.bymonth)&&!Object(i.d)(e.bymonth)&&(e.bymonth=[e.bymonth]),Object(i.f)(e.byyearday)&&!Object(i.d)(e.byyearday)&&Object(i.e)(e.byyearday)&&(e.byyearday=[e.byyearday]),Object(i.f)(e.bymonthday))if(Object(i.d)(e.bymonthday)){var o=[],s=[];for(r=0;r0?o.push(u):u<0&&s.push(u)}e.bymonthday=o,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);else e.bymonthday=[],e.bynmonthday=[];if(Object(i.f)(e.byweekno)&&!Object(i.d)(e.byweekno)&&(e.byweekno=[e.byweekno]),Object(i.f)(e.byweekday))if(Object(i.e)(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(e.byweekday instanceof y)!e.byweekday.n||e.freq>it.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{var c=[],h=[];for(r=0;rit.MONTHLY?c.push(l.weekday):h.push([l.weekday,l.n])}}e.byweekday=Object(i.g)(c)?c:null,e.bynweekday=Object(i.g)(h)?h:null}else e.bynweekday=null;return Object(i.f)(e.byhour)?Object(i.e)(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq0&&" "===i[0]?(n[r-1]+=i.slice(1),n.splice(r,1)):r+=1:n.splice(r,1)}return n}(t,e.unfold).forEach(function(t){if(t){var e=function(t){var e=function(t){if(-1===t.indexOf(":"))return{name:"RRULE",value:t};var e=Object(i.l)(t,":",1),n=e[0],r=e[1];return{name:n,value:r}}(t),n=e.name,r=e.value,o=n.split(";");if(!o)throw new Error("empty property name");return{name:o[0].toUpperCase(),parms:o.slice(1),value:r}}(t),s=e.name,u=e.parms,h=e.value;switch(s.toUpperCase()){case"RRULE":if(u.length)throw new Error("unsupported RRULE parm: "+u.join(","));n.push(w(t));break;case"RDATE":var d=/RDATE(?:;TZID=([^:=]+))?/i.exec(t),y=(d[0],d[1]);y&&!c&&(c=y),r=r.concat(bt(h,u));break;case"EXRULE":if(u.length)throw new Error("unsupported EXRULE parm: "+u.join(","));o.push(w(h));break;case"EXDATE":a=a.concat(bt(h,u));break;case"DTSTART":break;default:throw new Error("unsupported property: "+s)}}}),{dtstart:u,tzid:c,rrulevals:n,rdatevals:r,exrulevals:o,exdatevals:a}}function lt(t,e){return void 0===e&&(e={}),function(t,e){var n=yt(t,e),r=n.rrulevals,i=n.rdatevals,o=n.exrulevals,a=n.exdatevals,s=n.dtstart,u=n.tzid,c=!1===e.cache;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||r.length>1||i.length||o.length||a.length){var h=new at(c);return h.tzid(u||void 0),r.forEach(function(t){h.rrule(new it(ft(t,s,u),c))}),i.forEach(function(t){h.rdate(t)}),o.forEach(function(t){h.exrule(new it(ft(t,s,u),c))}),a.forEach(function(t){h.exdate(t)}),e.compatible&&e.dtstart&&h.rdate(s),h}var d=r[0];return new it(ft(d,d.dtstart||e.dtstart||s,d.tzid||e.tzid||u),c)}(t,function(t){var e=[],n=Object.keys(t),r=Object.keys(dt);if(n.forEach(function(t){Object(i.c)(r,t)||e.push(t)}),e.length)throw new Error("Invalid options: "+e.join(", "));var o=ht({},t);return r.forEach(function(t){Object(i.c)(n,t)||(o[t]=dt[t])}),o}(e))}function ft(t,e,n){return ht({},t,{dtstart:e,tzid:n})}function bt(t,e){return function(t){t.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}(e),t.split(",").map(function(t){return a.untilStringToDate(t)})}n.d(e,"Frequency",function(){return o}),n.d(e,"Weekday",function(){return y}),n.d(e,"RRule",function(){return it}),n.d(e,"RRuleSet",function(){return at}),n.d(e,"rrulestr",function(){return lt}); - /*! - * rrule.js - Library for working with recurrence rules for calendar dates. - * https://github.com/jakubroztocil/rrule - * - * Copyright 2010, Jakub Roztocil and Lars Schoning - * Licenced under the BSD licence. - * https://github.com/jakubroztocil/rrule/blob/master/LICENCE - * - * Based on: - * python-dateutil - Extensions to the standard Python datetime module. - * Copyright (c) 2003-2011 - Gustavo Niemeyer - * Copyright (c) 2012 - Tomi Pieviläinen - * https://github.com/jakubroztocil/rrule/blob/master/LICENCE - * - */e.default=it},function(e,n){e.exports=t},function(t,e,n){"use strict";n.r(e);var r={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},i=n(1),o=n(0),a=function(t,e){return-1!==t.indexOf(e)},s=function(t){return t.toString()},u=function(){function t(t,e,n){if(void 0===e&&(e=s),void 0===n&&(n=r),this.text=[],this.language=n||r,this.gettext=e,this.rrule=t,this.options=t.options,this.origOptions=t.origOptions,this.origOptions.bymonthday){var i=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);i.sort(function(t,e){return t-e}),a.sort(function(t,e){return e-t}),this.bymonthday=i.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(Object(o.f)(this.origOptions.byweekday)){var u=Object(o.d)(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],c=String(u);this.byweekday={allWeeks:u.filter(function(t){return!t.n}),someWeeks:u.filter(function(t){return Boolean(t.n)}),isWeekdays:-1!==c.indexOf("MO")&&-1!==c.indexOf("TU")&&-1!==c.indexOf("WE")&&-1!==c.indexOf("TH")&&-1!==c.indexOf("FR")&&-1===c.indexOf("SA")&&-1===c.indexOf("SU"),isEveryDay:-1!==c.indexOf("MO")&&-1!==c.indexOf("TU")&&-1!==c.indexOf("WE")&&-1!==c.indexOf("TH")&&-1!==c.indexOf("FR")&&-1!==c.indexOf("SA")&&-1!==c.indexOf("SU")};var h=function(t,e){return t.weekday-e.weekday};this.byweekday.allWeeks.sort(h),this.byweekday.someWeeks.sort(h),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return t.isFullyConvertible=function(e){if(!(e.options.freq in t.IMPLEMENTED))return!1;if(e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(a(["dtstart","wkst","freq"],n))return!0;if(!a(t.IMPLEMENTED[e.options.freq],n))return!1}return!0},t.prototype.isFullyConvertible=function(){return t.isFullyConvertible(this.rrule)},t.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in t.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[i.default.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var n=this.options.until;this.add(this.language.monthNames[n.getUTCMonth()]).add(n.getUTCDate()+",").add(n.getUTCFullYear().toString())}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},t.prototype.HOURLY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("hours"):t("hour"))},t.prototype.MINUTELY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.add((this.plural(this.options.interval),t("minutes")))},t.prototype.DAILY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(this.plural(this.options.interval)?t("days"):t("day")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},t.prototype.WEEKLY=function(){var t=this.gettext;1!==this.options.interval&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?t("weeks"):t("week")),this.byweekday&&this.byweekday.isWeekdays?1===this.options.interval?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(t("on")).add(t("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?t("days"):t("day")):(1===this.options.interval&&this.add(t("week")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},t.prototype.MONTHLY=function(){var t=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()).add(t("months")),this.plural(this.options.interval)&&this.add(t("in"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("months"):t("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(t("on")).add(t("weekdays")):this.byweekday&&this._byweekday()},t.prototype.YEARLY=function(){var t=this.gettext;this.origOptions.bymonth?(1!==this.options.interval&&(this.add(this.options.interval.toString()),this.add(t("years"))),this._bymonth()):(1!==this.options.interval&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("years"):t("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(t("on the")).add(this.list(this.options.byyearday,this.nth,t("and"))).add(t("day")),this.options.byweekno&&this.add(t("in")).add(this.plural(this.options.byweekno.length)?t("weeks"):t("week")).add(this.list(this.options.byweekno,void 0,t("and")))},t.prototype._bymonthday=function(){var t=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,t("or"))).add(t("the")).add(this.list(this.bymonthday,this.nth,t("or"))):this.add(t("on the")).add(this.list(this.bymonthday,this.nth,t("and")))},t.prototype._byweekday=function(){var t=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(t("and")),this.add(t("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,t("and"))))},t.prototype._byhour=function(){var t=this.gettext;this.add(t("at")).add(this.list(this.origOptions.byhour,void 0,t("and")))},t.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},t.prototype.nth=function(t){var e,n;t=parseInt(t.toString(),10);var r=this.gettext;if(-1===t)return r("last");switch(n=Math.abs(t)){case 1:case 21:case 31:e=n+r("st");break;case 2:case 22:e=n+r("nd");break;case 3:case 23:e=n+r("rd");break;default:e=n+r("th")}return t<0?e+" "+r("last"):e},t.prototype.monthtext=function(t){return this.language.monthNames[t-1]},t.prototype.weekdaytext=function(t){var e=Object(o.e)(t)?(t+1)%7:t.getJsWeekday();return(t.n?this.nth(t.n)+" ":"")+this.language.dayNames[e]},t.prototype.plural=function(t){return t%100!=1},t.prototype.add=function(t){return this.text.push(" "),this.text.push(t),this},t.prototype.list=function(t,e,n,r){void 0===r&&(r=","),Object(o.d)(t)||(t=[t]);e=e||function(t){return t.toString()};var i=this,a=function(t){return e&&e.call(i,t)};return n?function(t,e,n){for(var r="",i=0;it[0].length)&&(t=r,e=n)}if(null!=t&&(this.text=this.text.substr(t[0].length),""===this.text&&(this.done=!0)),null==t)return this.done=!0,this.symbol=null,void(this.value=null)}while("SKIP"===e);return this.symbol=e,this.value=t,!0},t.prototype.accept=function(t){if(this.symbol===t){if(this.value){var e=this.value;return this.nextSymbol(),e}return this.nextSymbol(),!0}return!1},t.prototype.acceptNumber=function(){return this.accept("number")},t.prototype.expect=function(t){if(this.accept(t))return!0;throw new Error("expected "+t+" but found "+this.symbol)},t}();function h(t,e){void 0===e&&(e=r);var n={},o=new c(e.tokens);return o.start(t)?(function(){o.expect("every");var t=o.acceptNumber();t&&(n.interval=parseInt(t[0],10));if(o.isDone())throw new Error("Unexpected end");switch(o.symbol){case"day(s)":n.freq=i.default.DAILY,o.nextSymbol()&&(!function(){if(!o.accept("at"))return;do{var t=o.acceptNumber();if(!t)throw new Error("Unexpected symbol "+o.symbol+", expected hour");for(n.byhour=[parseInt(t[0],10)];o.accept("comma");){if(!(t=o.acceptNumber()))throw new Error("Unexpected symbol "+o.symbol+"; expected hour");n.byhour.push(parseInt(t[0],10))}}while(o.accept("comma")||o.accept("at"))}(),d());break;case"weekday(s)":n.freq=i.default.WEEKLY,n.byweekday=[i.default.MO,i.default.TU,i.default.WE,i.default.TH,i.default.FR],o.nextSymbol(),d();break;case"week(s)":n.freq=i.default.WEEKLY,o.nextSymbol()&&(a(),d());break;case"hour(s)":n.freq=i.default.HOURLY,o.nextSymbol()&&(a(),d());break;case"minute(s)":n.freq=i.default.MINUTELY,o.nextSymbol()&&(a(),d());break;case"month(s)":n.freq=i.default.MONTHLY,o.nextSymbol()&&(a(),d());break;case"year(s)":n.freq=i.default.YEARLY,o.nextSymbol()&&(a(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":n.freq=i.default.WEEKLY;var e=o.symbol.substr(0,2).toUpperCase();if(n.byweekday=[i.default[e]],!o.nextSymbol())return;for(;o.accept("comma");){if(o.isDone())throw new Error("Unexpected end");var r=u();if(!r)throw new Error("Unexpected symbol "+o.symbol+", expected weekday");n.byweekday.push(i.default[r]),o.nextSymbol()}!function(){o.accept("on"),o.accept("the");var t=h();if(!t)return;n.bymonthday=[t],o.nextSymbol();for(;o.accept("comma");){if(!(t=h()))throw new Error("Unexpected symbol "+o.symbol+"; expected monthday");n.bymonthday.push(t),o.nextSymbol()}}(),d();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(n.freq=i.default.YEARLY,n.bymonth=[s()],!o.nextSymbol())return;for(;o.accept("comma");){if(o.isDone())throw new Error("Unexpected end");var c=s();if(!c)throw new Error("Unexpected symbol "+o.symbol+", expected month");n.bymonth.push(c),o.nextSymbol()}a(),d();break;default:throw new Error("Unknown symbol")}}(),n):null;function a(){var t=o.accept("on"),e=o.accept("the");if(t||e)do{var r=h(),a=u(),c=s();if(r)a?(o.nextSymbol(),n.byweekday||(n.byweekday=[]),n.byweekday.push(i.default[a].nth(r))):(n.bymonthday||(n.bymonthday=[]),n.bymonthday.push(r),o.accept("day(s)"));else if(a)o.nextSymbol(),n.byweekday||(n.byweekday=[]),n.byweekday.push(i.default[a]);else if("weekday(s)"===o.symbol)o.nextSymbol(),n.byweekday||(n.byweekday=[i.default.MO,i.default.TU,i.default.WE,i.default.TH,i.default.FR]);else if("week(s)"===o.symbol){o.nextSymbol();var d=o.acceptNumber();if(!d)throw new Error("Unexpected symbol "+o.symbol+", expected week number");for(n.byweekno=[parseInt(d[0],10)];o.accept("comma");){if(!(d=o.acceptNumber()))throw new Error("Unexpected symbol "+o.symbol+"; expected monthday");n.byweekno.push(parseInt(d[0],10))}}else{if(!c)return;o.nextSymbol(),n.bymonth||(n.bymonth=[]),n.bymonth.push(c)}}while(o.accept("comma")||o.accept("the")||o.accept("on"))}function s(){switch(o.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(o.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return o.symbol.substr(0,2).toUpperCase();default:return!1}}function h(){switch(o.symbol){case"last":return o.nextSymbol(),-1;case"first":return o.nextSymbol(),1;case"second":return o.nextSymbol(),o.accept("last")?-2:2;case"third":return o.nextSymbol(),o.accept("last")?-3:3;case"nth":var t=parseInt(o.value[1],10);if(t<-366||t>366)throw new Error("Nth out of range: "+t);return o.nextSymbol(),o.accept("last")?-t:t;default:return!1}}function d(){if("until"===o.symbol){var t=Date.parse(o.text);if(!t)throw new Error("Cannot parse until date:"+o.text);n.until=new Date(t)}else o.accept("for")&&(n.count=parseInt(o.value[0],10),o.expect("number"))}}n.d(e,"fromText",function(){return d}),n.d(e,"isFullyConvertible",function(){return f}),n.d(e,"toText",function(){return l}),n.d(e,"parseText",function(){return h}); - /*! - * rrule.js - Library for working with recurrence rules for calendar dates. - * https://github.com/jakubroztocil/rrule - * - * Copyright 2010, Jakub Roztocil and Lars Schoning - * Licenced under the BSD licence. - * https://github.com/jakubroztocil/rrule/blob/master/LICENCE - * - */ - var d=function(t,e){return void 0===e&&(e=r),new i.default(h(t,e)||void 0)},y=["count","until","interval","byweekday","bymonthday","bymonth"];u.IMPLEMENTED=[],u.IMPLEMENTED[i.default.HOURLY]=y,u.IMPLEMENTED[i.default.MINUTELY]=y,u.IMPLEMENTED[i.default.DAILY]=["byhour"].concat(y),u.IMPLEMENTED[i.default.WEEKLY]=y,u.IMPLEMENTED[i.default.MONTHLY]=y,u.IMPLEMENTED[i.default.YEARLY]=["byweekno","byyearday"].concat(y);var l=function(t,e,n){return new u(t,e,n).toString()},f=u.isFullyConvertible}])}); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rrule=e():t.rrule=e()}("undefined"!=typeof self?self:this,function(){return r={},i.m=n=[function(t,e,n){"use strict";n.d(e,"f",function(){return i}),n.d(e,"e",function(){return a}),n.d(e,"g",function(){return o}),n.d(e,"d",function(){return s}),n.d(e,"k",function(){return u}),n.d(e,"l",function(){return c}),n.d(e,"n",function(){return h}),n.d(e,"i",function(){return d}),n.d(e,"m",function(){return y}),n.d(e,"j",function(){return l}),n.d(e,"a",function(){return f}),n.d(e,"b",function(){return b}),n.d(e,"h",function(){return p}),n.d(e,"c",function(){return m});var r=n(2),i=function(t){return null!=t},a=function(t){return"number"==typeof t},o=function(t){return 0<=r.a.indexOf(t)},s=Array.isArray,u=function(t,e){void 0===e&&(e=t),1===arguments.length&&(e=t,t=0);for(var n=[],r=t;r>=0,r.length>e?String(r):((e-=r.length)>n.length&&(n+=c(n,e/n.length)),n.slice(0,e)+String(r))}var y=function(t,e,n){var r=t.split(e);return n?r.slice(0,n).concat([r.slice(n).join(e)]):r},l=function(t,e){var n=t%e;return n*e<0?n+e:n},f=function(t,e){return{div:Math.floor(t/e),mod:l(t,e)}},b=function(t){return!i(t)||0===t.length},p=function(t){return!b(t)},m=function(t,e){return p(t)&&-1!==t.indexOf(e)}},function(t,e,n){"use strict";n.r(e);var r,i,x=n(0);(i=r=r||{}).MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],i.ONE_DAY=864e5,i.MAXYEAR=9999,i.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),i.PY_WEEKDAYS=[6,0,1,2,3,4,5],i.getYearDay=function(t){var e=new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate());return Math.ceil((e.valueOf()-new Date(t.getUTCFullYear(),0,1).valueOf())/i.ONE_DAY)+1},i.isLeapYear=function(t){return t%4==0&&t%100!=0||t%400==0},i.isDate=function(t){return t instanceof Date},i.isValidDate=function(t){return i.isDate(t)&&!isNaN(t.getTime())},i.tzOffset=function(t){return 60*t.getTimezoneOffset()*1e3},i.daysBetween=function(t,e){var n=t.getTime()-i.tzOffset(t)-(e.getTime()-i.tzOffset(e));return Math.round(n/i.ONE_DAY)},i.toOrdinal=function(t){return i.daysBetween(t,i.ORDINAL_BASE)},i.fromOrdinal=function(t){return new Date(i.ORDINAL_BASE.getTime()+t*i.ONE_DAY)},i.getMonthDays=function(t){var e=t.getUTCMonth();return 1===e&&i.isLeapYear(t.getUTCFullYear())?29:i.MONTH_DAYS[e]},i.getWeekday=function(t){return i.PY_WEEKDAYS[t.getUTCDay()]},i.monthRange=function(t,e){var n=new Date(Date.UTC(t,e,1));return[i.getWeekday(n),i.getMonthDays(n)]},i.combine=function(t,e){return e=e||t,new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},i.clone=function(t){return new Date(t.getTime())},i.cloneDates=function(t){for(var e=[],n=0;nthis.maxDate;if("between"===this.method){if(e)return!0;if(n)return!1}else if("before"===this.method){if(n)return!1}else if("after"===this.method)return!!e||(this.add(t),!1);return this.add(t)},a.prototype.add=function(t){return this._result.push(t),!0},a.prototype.getValue=function(){var t=this._result;switch(this.method){case"all":case"between":return t;case"before":case"after":default:return t.length?t[t.length-1]:null}},a.prototype.clone=function(){return new a(this.method,this.args)},a),o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)}; +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */function s(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var u,S=function(){return(S=Object.assign||function(t){for(var e,n=1,r=arguments.length;nthis.getWeekday()?this.day+=-(this.getWeekday()+1+(6-e))+7*t:this.day+=-(this.getWeekday()-e)+7*t,this.fixDay()},w.prototype.addDaily=function(t){this.day+=t,this.fixDay()},w.prototype.addHours=function(t,e,n){for(e&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var r=Object(x.a)(this.hour,24),i=r.div,a=r.mod;if(i&&(this.hour=a,this.addDaily(i)),Object(x.b)(n)||Object(x.c)(n,this.hour))break}},w.prototype.addMinutes=function(t,e,n,r){for(e&&(this.minute+=Math.floor((1439-(60*this.hour+this.minute))/t)*t);;){this.minute+=t;var i=Object(x.a)(this.minute,60),a=i.div,o=i.mod;if(a&&(this.minute=o,this.addHours(a,!1,n)),(Object(x.b)(n)||Object(x.c)(n,this.hour))&&(Object(x.b)(r)||Object(x.c)(r,this.minute)))break}},w.prototype.addSeconds=function(t,e,n,r,i){for(e&&(this.second+=Math.floor((86399-(3600*this.hour+60*this.minute+this.second))/t)*t);;){this.second+=t;var a=Object(x.a)(this.second,60),o=a.div,s=a.mod;if(o&&(this.second=s,this.addMinutes(o,!1,n,r)),(Object(x.b)(n)||Object(x.c)(n,this.hour))&&(Object(x.b)(r)||Object(x.c)(r,this.minute))&&(Object(x.b)(i)||Object(x.c)(i,this.second)))break}},w.prototype.fixDay=function(){if(!(this.day<=28)){var t=r.monthRange(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,13===this.month&&(this.month=1,++this.year,this.year>r.MAXYEAR))return;t=r.monthRange(this.year,this.month-1)[1]}}},w.prototype.add=function(t,e){var n=t.freq,r=t.interval,i=t.wkst,a=t.byhour,o=t.byminute,s=t.bysecond;switch(n){case y.YEARLY:return this.addYears(r);case y.MONTHLY:return this.addMonths(r);case y.WEEKLY:return this.addWeekly(r,i);case y.DAILY:return this.addDaily(r);case y.HOURLY:return this.addHours(r,e,a);case y.MINUTELY:return this.addMinutes(r,e,a,o);case y.SECONDLY:return this.addSeconds(r,e,a,o,s)}},w);function w(t,e,n,r,i,a,o){var s=m.call(this,r,i,a,o)||this;return s.year=t,s.month=e,s.day=n,s}function v(t){for(var e=[],n=0,r=Object.keys(t);n=ft.HOURLY&&Object(x.h)(i)&&!Object(x.c)(i,e.hour)||r>=ft.MINUTELY&&Object(x.h)(a)&&!Object(x.c)(a,e.minute)||r>=ft.SECONDLY&&Object(x.h)(o)&&!Object(x.c)(o,e.second))return[];return t.gettimeset(r)(e.hour,e.minute,e.second,e.millisecond)}(c,u,e);;){var d=c.getdayset(r)(u.year,u.month,u.day),y=d[0],l=d[1],f=d[2],b=ut(y,l,f,c,e);if(Object(x.h)(o))for(var p=it(o,h,l,f,c,y),m=0;mY.MAXYEAR)return st(t);j(r)||(h=c.gettimeset(r)(u.hour,u.minute,u.second,0)),c.rebuild(u.year,u.month)}}function ot(t,e){return new M(t,e.tzid).rezonedDate()}function st(t){return t.getValue()}function ut(t,e,n,r,i){for(var a,o,s,u,c,h,d,y,l,f,b=!1,p=e;p=a.yearlen&&!Object(x.c)(f,o+1-a.yearlen)&&!Object(x.c)(f,-a.nextyearlen+o-a.yearlen)))&&(t[m]=null)}return b}var ct=function(){return ct._nlp||(ct._nlp=n(3)),ct._nlp},ht={MO:new b.b(0),TU:new b.b(1),WE:new b.b(2),TH:new b.b(3),FR:new b.b(4),SA:new b.b(5),SU:new b.b(6)},dt={freq:y.YEARLY,dtstart:null,interval:1,wkst:ht.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},yt=Object.keys(dt);function lt(t,e){void 0===t&&(t={}),void 0===e&&(e=!1),this._cache=e?null:new A,this.origOptions=v(t);var n=function(t){var e=S(S({},dt),v(t));if(Object(x.f)(e.byeaster)&&(e.freq=ft.YEARLY),!Object(x.f)(e.freq)||!ft.FREQUENCIES[e.freq])throw new Error("Invalid frequency: "+e.freq+" "+t.freq);if(e.dtstart||(e.dtstart=new Date((new Date).setMilliseconds(0))),Object(x.f)(e.wkst)?Object(x.e)(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=ft.MO.weekday,Object(x.f)(e.bysetpos)){Object(x.e)(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var n=0;nft.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{var o=[],s=[];for(n=0;nft.MONTHLY?o.push(u.weekday):s.push([u.weekday,u.n])}e.byweekday=Object(x.h)(o)?o:null,e.bynweekday=Object(x.h)(s)?s:null}else e.bynweekday=null;return Object(x.f)(e.byhour)?Object(x.e)(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq + * Copyright (c) 2012 - Tomi Pieviläinen + * https://github.com/jakubroztocil/rrule/blob/master/LICENCE + * + */e.default=ft},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i});var r=["MO","TU","WE","TH","FR","SA","SU"],i=(a.fromStr=function(t){return new a(r.indexOf(t))},a.prototype.nth=function(t){return this.n===t?this:new a(this.weekday,t)},a.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},a.prototype.toString=function(){var t=r[this.weekday];return this.n&&(t=(0t[0].length)&&(t=r,e=n)}if(null!=t&&(this.text=this.text.substr(t[0].length),""===this.text&&(this.done=!0)),null==t)return this.done=!0,this.symbol=null,void(this.value=null)}while("SKIP"===e);return this.symbol=e,this.value=t,!0},o.prototype.accept=function(t){if(this.symbol!==t)return!1;if(this.value){var e=this.value;return this.nextSymbol(),e}return this.nextSymbol(),!0},o.prototype.acceptNumber=function(){return this.accept("number")},o.prototype.expect=function(t){if(this.accept(t))return!0;throw new Error("expected "+t+" but found "+this.symbol)},o);function o(t){this.done=!0,this.rules=t}function s(t,e){void 0===e&&(e=d);var o={},s=new f(e.tokens);return s.start(t)?(function(){s.expect("every");var t=s.acceptNumber();t&&(o.interval=parseInt(t[0],10));if(s.isDone())throw new Error("Unexpected end");switch(s.symbol){case"day(s)":o.freq=y.default.DAILY,s.nextSymbol()&&(function(){if(!s.accept("at"))return;do{var t=s.acceptNumber();if(!t)throw new Error("Unexpected symbol "+s.symbol+", expected hour");for(o.byhour=[parseInt(t[0],10)];s.accept("comma");){if(!(t=s.acceptNumber()))throw new Error("Unexpected symbol "+s.symbol+"; expected hour");o.byhour.push(parseInt(t[0],10))}}while(s.accept("comma")||s.accept("at"))}(),a());break;case"weekday(s)":o.freq=y.default.WEEKLY,o.byweekday=[y.default.MO,y.default.TU,y.default.WE,y.default.TH,y.default.FR],s.nextSymbol(),a();break;case"week(s)":o.freq=y.default.WEEKLY,s.nextSymbol()&&(i(),a());break;case"hour(s)":o.freq=y.default.HOURLY,s.nextSymbol()&&(i(),a());break;case"minute(s)":o.freq=y.default.MINUTELY,s.nextSymbol()&&(i(),a());break;case"month(s)":o.freq=y.default.MONTHLY,s.nextSymbol()&&(i(),a());break;case"year(s)":o.freq=y.default.YEARLY,s.nextSymbol()&&(i(),a());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":o.freq=y.default.WEEKLY;var e=s.symbol.substr(0,2).toUpperCase();if(o.byweekday=[y.default[e]],!s.nextSymbol())return;for(;s.accept("comma");){if(s.isDone())throw new Error("Unexpected end");var n=c();if(!n)throw new Error("Unexpected symbol "+s.symbol+", expected weekday");o.byweekday.push(y.default[n]),s.nextSymbol()}!function(){s.accept("on"),s.accept("the");var t=h();if(!t)return;o.bymonthday=[t],s.nextSymbol();for(;s.accept("comma");){if(!(t=h()))throw new Error("Unexpected symbol "+s.symbol+"; expected monthday");o.bymonthday.push(t),s.nextSymbol()}}(),a();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(o.freq=y.default.YEARLY,o.bymonth=[u()],!s.nextSymbol())return;for(;s.accept("comma");){if(s.isDone())throw new Error("Unexpected end");var r=u();if(!r)throw new Error("Unexpected symbol "+s.symbol+", expected month");o.bymonth.push(r),s.nextSymbol()}i(),a();break;default:throw new Error("Unknown symbol")}}(),o):null;function i(){var t=s.accept("on"),e=s.accept("the");if(t||e)do{var n=h(),r=c(),i=u();if(n)r?(s.nextSymbol(),o.byweekday||(o.byweekday=[]),o.byweekday.push(y.default[r].nth(n))):(o.bymonthday||(o.bymonthday=[]),o.bymonthday.push(n),s.accept("day(s)"));else if(r)s.nextSymbol(),o.byweekday||(o.byweekday=[]),o.byweekday.push(y.default[r]);else if("weekday(s)"===s.symbol)s.nextSymbol(),o.byweekday||(o.byweekday=[y.default.MO,y.default.TU,y.default.WE,y.default.TH,y.default.FR]);else if("week(s)"===s.symbol){s.nextSymbol();var a=s.acceptNumber();if(!a)throw new Error("Unexpected symbol "+s.symbol+", expected week number");for(o.byweekno=[parseInt(a[0],10)];s.accept("comma");){if(!(a=s.acceptNumber()))throw new Error("Unexpected symbol "+s.symbol+"; expected monthday");o.byweekno.push(parseInt(a[0],10))}}else{if(!i)return;s.nextSymbol(),o.bymonth||(o.bymonth=[]),o.bymonth.push(i)}}while(s.accept("comma")||s.accept("the")||s.accept("on"))}function u(){switch(s.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function c(){switch(s.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return s.symbol.substr(0,2).toUpperCase();default:return!1}}function h(){switch(s.symbol){case"last":return s.nextSymbol(),-1;case"first":return s.nextSymbol(),1;case"second":return s.nextSymbol(),s.accept("last")?-2:2;case"third":return s.nextSymbol(),s.accept("last")?-3:3;case"nth":var t=parseInt(s.value[1],10);if(t<-366||366 Date: Thu, 30 Mar 2023 16:59:38 -0400 Subject: [PATCH 3/3] NEWS bullet --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index c4bd3fc..ef6b4fe 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # almanac (development version) +* Updated internal JavaScript rrule library to version 2.7.2 (#82). + * almanac steppers created with `stepper()` now work as `.before` and `.after` arguments of `slider::slide_index()` and friends (#80).