/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ "use strict";var b_=Object.create;var ys=Object.defineProperty;var v_=Object.getOwnPropertyDescriptor;var y_=Object.getOwnPropertyNames;var __=Object.getPrototypeOf,I_=Object.prototype.hasOwnProperty;var Lf=r=>{throw TypeError(r)};var w_=(r,e,t)=>e in r?ys(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var C_=(r,e)=>()=>{try{return e||r((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},x_=(r,e)=>{for(var t in e)ys(r,t,{get:e[t],enumerable:!0})},Of=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of y_(e))!I_.call(r,o)&&o!==t&&ys(r,o,{get:()=>e[o],enumerable:!(n=v_(e,o))||n.enumerable});return r};var Nr=(r,e,t)=>(t=r!=null?b_(__(r)):{},Of(e||!r||!r.__esModule?ys(t,"default",{value:r,enumerable:!0}):t,r)),A_=r=>Of(ys({},"__esModule",{value:!0}),r);var h=(r,e,t)=>w_(r,typeof e!="symbol"?e+"":e,t),Hu=(r,e,t)=>e.has(r)||Lf("Cannot "+t);var C=(r,e,t)=>(Hu(r,e,"read from private field"),t?t.call(r):e.get(r)),q=(r,e,t)=>e.has(r)?Lf("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),j=(r,e,t,n)=>(Hu(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t),le=(r,e,t)=>(Hu(r,e,"access private method"),t);var wr=C_((ju,io)=>{(function(r,e){typeof ju=="object"&&typeof io!="undefined"?io.exports=e():typeof define=="function"&&define.amd?define(e):r.moment=e()})(ju,(function(){"use strict";var r;function e(){return r.apply(null,arguments)}function t(i){r=i}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function o(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function a(i,s){return Object.prototype.hasOwnProperty.call(i,s)}function c(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var s;for(s in i)if(a(i,s))return!1;return!0}function u(i){return i===void 0}function f(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function p(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function b(i,s){var l=[],d,m=i.length;for(d=0;d>>0,d;for(d=0;d0)for(l=0;l<_;l++)d=E[l],m=s[d],u(m)||(i[d]=m);return i}function ae(i){te(this,i),this._d=new Date(i._d!=null?i._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Z===!1&&(Z=!0,e.updateOffset(this),Z=!1)}function M(i){return i instanceof ae||i!=null&&i._isAMomentObject!=null}function pe(i){e.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+i)}function ye(i,s){var l=!0;return I(function(){if(e.deprecationHandler!=null&&e.deprecationHandler(null,i),l){var d=[],m,_,R,N=arguments.length;for(_=0;_=0;return(_?l?"+":"":"-")+Math.pow(10,Math.max(0,m)).toString().substr(1)+d}var D=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,se=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Be={},T={};function G(i,s,l,d){var m=d;typeof d=="string"&&(m=function(){return this[d]()}),i&&(T[i]=m),s&&(T[s[0]]=function(){return ie(m.apply(this,arguments),s[1],s[2])}),l&&(T[l]=function(){return this.localeData().ordinal(m.apply(this,arguments),i)})}function _t(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function Je(i){var s=i.match(D),l,d;for(l=0,d=s.length;l=0&&se.test(i);)i=i.replace(se,d),se.lastIndex=0,l-=1;return i}var wi={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function qt(i){var s=this._longDateFormat[i],l=this._longDateFormat[i.toUpperCase()];return s||!l?s:(this._longDateFormat[i]=l.match(D).map(function(d){return d==="MMMM"||d==="MM"||d==="DD"||d==="dddd"?d.slice(1):d}).join(""),this._longDateFormat[i])}var vn="Invalid date";function ei(){return this._invalidDate}var us="%d",xu=/\d{1,2}/;function Tg(i){return this._ordinal.replace("%d",i)}var Gg={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Eg(i,s,l,d){var m=this._relativeTime[l];return he(m)?m(i,s,l,d):m.replace(/%d/i,i)}function Bg(i,s){var l=this._relativeTime[i>0?"future":"past"];return he(l)?l(s):l.replace(/%s/i,s)}var qd={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function _r(i){return typeof i=="string"?qd[i]||qd[i.toLowerCase()]:void 0}function Au(i){var s={},l,d;for(d in i)a(i,d)&&(l=_r(d),l&&(s[l]=i[d]));return s}var Dg={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ng(i){var s=[],l;for(l in i)a(i,l)&&s.push({unit:l,priority:Dg[l]});return s.sort(function(d,m){return d.priority-m.priority}),s}var ef=/\d/,ir=/\d\d/,tf=/\d{3}/,ku=/\d{4}/,ha=/[+-]?\d{6}/,We=/\d\d?/,rf=/\d\d\d\d?/,nf=/\d\d\d\d\d\d?/,ga=/\d{1,3}/,Ru=/\d{1,4}/,ba=/[+-]?\d{1,6}/,Hi=/\d+/,va=/[+-]?\d+/,Wg=/Z|[+-]\d\d:?\d\d/gi,ya=/Z|[+-]\d\d(?::?\d\d)?/gi,Zg=/[+-]?\d+(\.\d{1,3})?/,cs=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ji=/^[1-9]\d?/,Su=/^([1-9]\d|\d)/,_a;_a={};function W(i,s,l){_a[i]=he(s)?s:function(d,m){return d&&l?l:s}}function Yg(i,s){return a(_a,i)?_a[i](s._strict,s._locale):new RegExp(Mg(i))}function Mg(i){return yn(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(s,l,d,m,_){return l||d||m||_}))}function yn(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ir(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function fe(i){var s=+i,l=0;return s!==0&&isFinite(s)&&(l=Ir(s)),l}var Fu={};function Re(i,s){var l,d=s,m;for(typeof i=="string"&&(i=[i]),f(s)&&(d=function(_,R){R[s]=fe(_)}),m=i.length,l=0;l68?1900:2e3)};var of=ji("FullYear",!0);function Vg(){return Ia(this.year())}function ji(i,s){return function(l){return l!=null?(sf(this,i,l),e.updateOffset(this,s),this):ms(this,i)}}function ms(i,s){if(!i.isValid())return NaN;var l=i._d,d=i._isUTC;switch(s){case"Milliseconds":return d?l.getUTCMilliseconds():l.getMilliseconds();case"Seconds":return d?l.getUTCSeconds():l.getSeconds();case"Minutes":return d?l.getUTCMinutes():l.getMinutes();case"Hours":return d?l.getUTCHours():l.getHours();case"Date":return d?l.getUTCDate():l.getDate();case"Day":return d?l.getUTCDay():l.getDay();case"Month":return d?l.getUTCMonth():l.getMonth();case"FullYear":return d?l.getUTCFullYear():l.getFullYear();default:return NaN}}function sf(i,s,l){var d,m,_,R,N;if(!(!i.isValid()||isNaN(l))){switch(d=i._d,m=i._isUTC,s){case"Milliseconds":return void(m?d.setUTCMilliseconds(l):d.setMilliseconds(l));case"Seconds":return void(m?d.setUTCSeconds(l):d.setSeconds(l));case"Minutes":return void(m?d.setUTCMinutes(l):d.setMinutes(l));case"Hours":return void(m?d.setUTCHours(l):d.setHours(l));case"Date":return void(m?d.setUTCDate(l):d.setDate(l));case"FullYear":break;default:return}_=l,R=i.month(),N=i.date(),N=N===29&&R===1&&!Ia(_)?28:N,m?d.setUTCFullYear(_,R,N):d.setFullYear(_,R,N)}}function Lg(i){return i=_r(i),he(this[i])?this[i]():this}function Og(i,s){if(typeof i=="object"){i=Au(i);var l=Ng(i),d,m=l.length;for(d=0;d=0?(N=new Date(i+400,s,l,d,m,_,R),isFinite(N.getFullYear())&&N.setFullYear(i)):N=new Date(i,s,l,d,m,_,R),N}function ps(i){var s,l;return i<100&&i>=0?(l=Array.prototype.slice.call(arguments),l[0]=i+400,s=new Date(Date.UTC.apply(null,l)),isFinite(s.getUTCFullYear())&&s.setUTCFullYear(i)):s=new Date(Date.UTC.apply(null,arguments)),s}function wa(i,s,l){var d=7+s-l,m=(7+ps(i,0,d).getUTCDay()-s)%7;return-m+d-1}function ff(i,s,l,d,m){var _=(7+l-d)%7,R=wa(i,d,m),N=1+7*(s-1)+_+R,ee,ge;return N<=0?(ee=i-1,ge=fs(ee)+N):N>fs(i)?(ee=i+1,ge=N-fs(i)):(ee=i,ge=N),{year:ee,dayOfYear:ge}}function hs(i,s,l){var d=wa(i.year(),s,l),m=Math.floor((i.dayOfYear()-d-1)/7)+1,_,R;return m<1?(R=i.year()-1,_=m+wn(R,s,l)):m>wn(i.year(),s,l)?(_=m-wn(i.year(),s,l),R=i.year()+1):(R=i.year(),_=m),{week:_,year:R}}function wn(i,s,l){var d=wa(i,s,l),m=wa(i+1,s,l);return(fs(i)-d+m)/7}G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),W("w",We,Ji),W("ww",We,ir),W("W",We,Ji),W("WW",We,ir),ds(["w","ww","W","WW"],function(i,s,l,d){s[d.substr(0,1)]=fe(i)});function ib(i){return hs(i,this._week.dow,this._week.doy).week}var ob={dow:0,doy:6};function sb(){return this._week.dow}function ab(){return this._week.doy}function lb(i){var s=this.localeData().week(this);return i==null?s:this.add((i-s)*7,"d")}function ub(i){var s=hs(this,1,4).week;return i==null?s:this.add((i-s)*7,"d")}G("d",0,"do","day"),G("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),G("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),G("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),W("d",We),W("e",We),W("E",We),W("dd",function(i,s){return s.weekdaysMinRegex(i)}),W("ddd",function(i,s){return s.weekdaysShortRegex(i)}),W("dddd",function(i,s){return s.weekdaysRegex(i)}),ds(["dd","ddd","dddd"],function(i,s,l,d){var m=l._locale.weekdaysParse(i,d,l._strict);m!=null?s.d=m:y(l).invalidWeekday=i}),ds(["d","e","E"],function(i,s,l,d){s[d]=fe(i)});function cb(i,s){return typeof i!="string"?i:isNaN(i)?(i=s.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function db(i,s){return typeof i=="string"?s.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Gu(i,s){return i.slice(s,7).concat(i.slice(0,s))}var fb="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),mf="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),mb="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),pb=cs,hb=cs,gb=cs;function bb(i,s){var l=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(s)?"format":"standalone"];return i===!0?Gu(l,this._week.dow):i?l[i.day()]:l}function vb(i){return i===!0?Gu(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function yb(i){return i===!0?Gu(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function _b(i,s,l){var d,m,_,R=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;d<7;++d)_=g([2e3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(_,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(_,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(_,"").toLocaleLowerCase();return l?s==="dddd"?(m=je.call(this._weekdaysParse,R),m!==-1?m:null):s==="ddd"?(m=je.call(this._shortWeekdaysParse,R),m!==-1?m:null):(m=je.call(this._minWeekdaysParse,R),m!==-1?m:null):s==="dddd"?(m=je.call(this._weekdaysParse,R),m!==-1||(m=je.call(this._shortWeekdaysParse,R),m!==-1)?m:(m=je.call(this._minWeekdaysParse,R),m!==-1?m:null)):s==="ddd"?(m=je.call(this._shortWeekdaysParse,R),m!==-1||(m=je.call(this._weekdaysParse,R),m!==-1)?m:(m=je.call(this._minWeekdaysParse,R),m!==-1?m:null)):(m=je.call(this._minWeekdaysParse,R),m!==-1||(m=je.call(this._weekdaysParse,R),m!==-1)?m:(m=je.call(this._shortWeekdaysParse,R),m!==-1?m:null))}function Ib(i,s,l){var d,m,_;if(this._weekdaysParseExact)return _b.call(this,i,s,l);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;d<7;d++){if(m=g([2e3,1]).day(d),l&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(m,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(m,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(m,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[d]||(_="^"+this.weekdays(m,"")+"|^"+this.weekdaysShort(m,"")+"|^"+this.weekdaysMin(m,""),this._weekdaysParse[d]=new RegExp(_.replace(".",""),"i")),l&&s==="dddd"&&this._fullWeekdaysParse[d].test(i))return d;if(l&&s==="ddd"&&this._shortWeekdaysParse[d].test(i))return d;if(l&&s==="dd"&&this._minWeekdaysParse[d].test(i))return d;if(!l&&this._weekdaysParse[d].test(i))return d}}function wb(i){if(!this.isValid())return i!=null?this:NaN;var s=ms(this,"Day");return i!=null?(i=cb(i,this.localeData()),this.add(i-s,"d")):s}function Cb(i){if(!this.isValid())return i!=null?this:NaN;var s=(this.day()+7-this.localeData()._week.dow)%7;return i==null?s:this.add(i-s,"d")}function xb(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var s=db(i,this.localeData());return this.day(this.day()%7?s:s-7)}else return this.day()||7}function Ab(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Eu.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=pb),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function kb(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Eu.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=hb),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Rb(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Eu.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=gb),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Eu(){function i(Ot,Rn){return Rn.length-Ot.length}var s=[],l=[],d=[],m=[],_,R,N,ee,ge;for(_=0;_<7;_++)R=g([2e3,1]).day(_),N=yn(this.weekdaysMin(R,"")),ee=yn(this.weekdaysShort(R,"")),ge=yn(this.weekdays(R,"")),s.push(N),l.push(ee),d.push(ge),m.push(N),m.push(ee),m.push(ge);s.sort(i),l.sort(i),d.sort(i),m.sort(i),this._weekdaysRegex=new RegExp("^("+m.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Bu(){return this.hours()%12||12}function Sb(){return this.hours()||24}G("H",["HH",2],0,"hour"),G("h",["hh",2],0,Bu),G("k",["kk",2],0,Sb),G("hmm",0,0,function(){return""+Bu.apply(this)+ie(this.minutes(),2)}),G("hmmss",0,0,function(){return""+Bu.apply(this)+ie(this.minutes(),2)+ie(this.seconds(),2)}),G("Hmm",0,0,function(){return""+this.hours()+ie(this.minutes(),2)}),G("Hmmss",0,0,function(){return""+this.hours()+ie(this.minutes(),2)+ie(this.seconds(),2)});function pf(i,s){G(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),s)})}pf("a",!0),pf("A",!1);function hf(i,s){return s._meridiemParse}W("a",hf),W("A",hf),W("H",We,Su),W("h",We,Ji),W("k",We,Ji),W("HH",We,ir),W("hh",We,ir),W("kk",We,ir),W("hmm",rf),W("hmmss",nf),W("Hmm",rf),W("Hmmss",nf),Re(["H","HH"],ut),Re(["k","kk"],function(i,s,l){var d=fe(i);s[ut]=d===24?0:d}),Re(["a","A"],function(i,s,l){l._isPm=l._locale.isPM(i),l._meridiem=i}),Re(["h","hh"],function(i,s,l){s[ut]=fe(i),y(l).bigHour=!0}),Re("hmm",function(i,s,l){var d=i.length-2;s[ut]=fe(i.substr(0,d)),s[Br]=fe(i.substr(d)),y(l).bigHour=!0}),Re("hmmss",function(i,s,l){var d=i.length-4,m=i.length-2;s[ut]=fe(i.substr(0,d)),s[Br]=fe(i.substr(d,2)),s[In]=fe(i.substr(m)),y(l).bigHour=!0}),Re("Hmm",function(i,s,l){var d=i.length-2;s[ut]=fe(i.substr(0,d)),s[Br]=fe(i.substr(d))}),Re("Hmmss",function(i,s,l){var d=i.length-4,m=i.length-2;s[ut]=fe(i.substr(0,d)),s[Br]=fe(i.substr(d,2)),s[In]=fe(i.substr(m))});function Fb(i){return(i+"").toLowerCase().charAt(0)==="p"}var Tb=/[ap]\.?m?\.?/i,Gb=ji("Hours",!0);function Eb(i,s,l){return i>11?l?"pm":"PM":l?"am":"AM"}var gf={calendar:Kt,longDateFormat:wi,invalidDate:vn,ordinal:us,dayOfMonthOrdinalParse:xu,relativeTime:Gg,months:Pg,monthsShort:af,week:ob,weekdays:fb,weekdaysMin:mb,weekdaysShort:mf,meridiemParse:Tb},Ue={},gs={},bs;function Bb(i,s){var l,d=Math.min(i.length,s.length);for(l=0;l0;){if(m=Ca(_.slice(0,l).join("-")),m)return m;if(d&&d.length>=l&&Bb(_,d)>=l-1)break;l--}s++}return bs}function Nb(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Ca(i){var s=null,l;if(Ue[i]===void 0&&typeof io!="undefined"&&io&&io.exports&&Nb(i))try{s=bs._abbr,l=require,l("./locale/"+i),ti(s)}catch(d){Ue[i]=null}return Ue[i]}function ti(i,s){var l;return i&&(u(s)?l=Cn(i):l=Du(i,s),l?bs=l:typeof console!="undefined"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),bs._abbr}function Du(i,s){if(s!==null){var l,d=gf;if(s.abbr=i,Ue[i]!=null)He("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),d=Ue[i]._config;else if(s.parentLocale!=null)if(Ue[s.parentLocale]!=null)d=Ue[s.parentLocale]._config;else if(l=Ca(s.parentLocale),l!=null)d=l._config;else return gs[s.parentLocale]||(gs[s.parentLocale]=[]),gs[s.parentLocale].push({name:i,config:s}),null;return Ue[i]=new tt(Ne(d,s)),gs[i]&&gs[i].forEach(function(m){Du(m.name,m.config)}),ti(i),Ue[i]}else return delete Ue[i],null}function Wb(i,s){if(s!=null){var l,d,m=gf;Ue[i]!=null&&Ue[i].parentLocale!=null?Ue[i].set(Ne(Ue[i]._config,s)):(d=Ca(i),d!=null&&(m=d._config),s=Ne(m,s),d==null&&(s.abbr=i),l=new tt(s),l.parentLocale=Ue[i],Ue[i]=l),ti(i)}else Ue[i]!=null&&(Ue[i].parentLocale!=null?(Ue[i]=Ue[i].parentLocale,i===ti()&&ti(i)):Ue[i]!=null&&delete Ue[i]);return Ue[i]}function Cn(i){var s;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return bs;if(!n(i)){if(s=Ca(i),s)return s;i=[i]}return Db(i)}function Zb(){return xt(Ue)}function Nu(i){var s,l=i._a;return l&&y(i).overflow===-2&&(s=l[_n]<0||l[_n]>11?_n:l[Hr]<1||l[Hr]>Tu(l[Dt],l[_n])?Hr:l[ut]<0||l[ut]>24||l[ut]===24&&(l[Br]!==0||l[In]!==0||l[Ci]!==0)?ut:l[Br]<0||l[Br]>59?Br:l[In]<0||l[In]>59?In:l[Ci]<0||l[Ci]>999?Ci:-1,y(i)._overflowDayOfYear&&(sHr)&&(s=Hr),y(i)._overflowWeeks&&s===-1&&(s=Ug),y(i)._overflowWeekday&&s===-1&&(s=Qg),y(i).overflow=s),i}var Yb=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mb=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Xb=/Z|[+-]\d\d(?::?\d\d)?/,xa=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Wu=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ub=/^\/?Date\((-?\d+)/i,Qb=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Vb={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vf(i){var s,l,d=i._i,m=Yb.exec(d)||Mb.exec(d),_,R,N,ee,ge=xa.length,Ot=Wu.length;if(m){for(y(i).iso=!0,s=0,l=ge;sfs(R)||i._dayOfYear===0)&&(y(i)._overflowDayOfYear=!0),l=ps(R,0,i._dayOfYear),i._a[_n]=l.getUTCMonth(),i._a[Hr]=l.getUTCDate()),s=0;s<3&&i._a[s]==null;++s)i._a[s]=d[s]=m[s];for(;s<7;s++)i._a[s]=d[s]=i._a[s]==null?s===2?1:0:i._a[s];i._a[ut]===24&&i._a[Br]===0&&i._a[In]===0&&i._a[Ci]===0&&(i._nextDay=!0,i._a[ut]=0),i._d=(i._useUTC?ps:nb).apply(null,d),_=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ut]=24),i._w&&typeof i._w.d!="undefined"&&i._w.d!==_&&(y(i).weekdayMismatch=!0)}}function zb(i){var s,l,d,m,_,R,N,ee,ge;s=i._w,s.GG!=null||s.W!=null||s.E!=null?(_=1,R=4,l=zi(s.GG,i._a[Dt],hs(Ze(),1,4).year),d=zi(s.W,1),m=zi(s.E,1),(m<1||m>7)&&(ee=!0)):(_=i._locale._week.dow,R=i._locale._week.doy,ge=hs(Ze(),_,R),l=zi(s.gg,i._a[Dt],ge.year),d=zi(s.w,ge.week),s.d!=null?(m=s.d,(m<0||m>6)&&(ee=!0)):s.e!=null?(m=s.e+_,(s.e<0||s.e>6)&&(ee=!0)):m=_),d<1||d>wn(l,_,R)?y(i)._overflowWeeks=!0:ee!=null?y(i)._overflowWeekday=!0:(N=ff(l,d,m,_,R),i._a[Dt]=N.year,i._dayOfYear=N.dayOfYear)}e.ISO_8601=function(){},e.RFC_2822=function(){};function Yu(i){if(i._f===e.ISO_8601){vf(i);return}if(i._f===e.RFC_2822){yf(i);return}i._a=[],y(i).empty=!0;var s=""+i._i,l,d,m,_,R,N=s.length,ee=0,ge,Ot;for(m=Ve(i._f,i._locale).match(D)||[],Ot=m.length,l=0;l0&&y(i).unusedInput.push(R),s=s.slice(s.indexOf(d)+d.length),ee+=d.length),T[_]?(d?y(i).empty=!1:y(i).unusedTokens.push(_),Xg(_,d,i)):i._strict&&!d&&y(i).unusedTokens.push(_);y(i).charsLeftOver=N-ee,s.length>0&&y(i).unusedInput.push(s),i._a[ut]<=12&&y(i).bigHour===!0&&i._a[ut]>0&&(y(i).bigHour=void 0),y(i).parsedDateParts=i._a.slice(0),y(i).meridiem=i._meridiem,i._a[ut]=Kb(i._locale,i._a[ut],i._meridiem),ge=y(i).era,ge!==null&&(i._a[Dt]=i._locale.erasConvertYear(ge,i._a[Dt])),Zu(i),Nu(i)}function Kb(i,s,l){var d;return l==null?s:i.meridiemHour!=null?i.meridiemHour(s,l):(i.isPM!=null&&(d=i.isPM(l),d&&s<12&&(s+=12),!d&&s===12&&(s=0)),s)}function qb(i){var s,l,d,m,_,R,N=!1,ee=i._f.length;if(ee===0){y(i).invalidFormat=!0,i._d=new Date(NaN);return}for(m=0;mthis?this:i:k()});function wf(i,s){var l,d;if(s.length===1&&n(s[0])&&(s=s[0]),!s.length)return Ze();for(l=s[0],d=1;dthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _v(){if(!u(this._isDSTShifted))return this._isDSTShifted;var i={},s;return te(i,this),i=_f(i),i._a?(s=i._isUTC?g(i._a):Ze(i._a),this._isDSTShifted=this.isValid()&&dv(i._a,s.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Iv(){return this.isValid()?!this._isUTC:!1}function wv(){return this.isValid()?this._isUTC:!1}function xf(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Cv=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,xv=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Dr(i,s){var l=i,d=null,m,_,R;return ka(i)?l={ms:i._milliseconds,d:i._days,M:i._months}:f(i)||!isNaN(+i)?(l={},s?l[s]=+i:l.milliseconds=+i):(d=Cv.exec(i))?(m=d[1]==="-"?-1:1,l={y:0,d:fe(d[Hr])*m,h:fe(d[ut])*m,m:fe(d[Br])*m,s:fe(d[In])*m,ms:fe(Mu(d[Ci]*1e3))*m}):(d=xv.exec(i))?(m=d[1]==="-"?-1:1,l={y:xi(d[2],m),M:xi(d[3],m),w:xi(d[4],m),d:xi(d[5],m),h:xi(d[6],m),m:xi(d[7],m),s:xi(d[8],m)}):l==null?l={}:typeof l=="object"&&("from"in l||"to"in l)&&(R=Av(Ze(l.from),Ze(l.to)),l={},l.ms=R.milliseconds,l.M=R.months),_=new Aa(l),ka(i)&&a(i,"_locale")&&(_._locale=i._locale),ka(i)&&a(i,"_isValid")&&(_._isValid=i._isValid),_}Dr.fn=Aa.prototype,Dr.invalid=cv;function xi(i,s){var l=i&&parseFloat(i.replace(",","."));return(isNaN(l)?0:l)*s}function Af(i,s){var l={};return l.months=s.month()-i.month()+(s.year()-i.year())*12,i.clone().add(l.months,"M").isAfter(s)&&--l.months,l.milliseconds=+s-+i.clone().add(l.months,"M"),l}function Av(i,s){var l;return i.isValid()&&s.isValid()?(s=Uu(s,i),i.isBefore(s)?l=Af(i,s):(l=Af(s,i),l.milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0}}function kf(i,s){return function(l,d){var m,_;return d!==null&&!isNaN(+d)&&(He(s,"moment()."+s+"(period, number) is deprecated. Please use moment()."+s+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),_=l,l=d,d=_),m=Dr(l,d),Rf(this,m,i),this}}function Rf(i,s,l,d){var m=s._milliseconds,_=Mu(s._days),R=Mu(s._months);i.isValid()&&(d=d==null?!0:d,R&&uf(i,ms(i,"Month")+R*l),_&&sf(i,"Date",ms(i,"Date")+_*l),m&&i._d.setTime(i._d.valueOf()+m*l),d&&e.updateOffset(i,_||R))}var kv=kf(1,"add"),Rv=kf(-1,"subtract");function Sf(i){return typeof i=="string"||i instanceof String}function Sv(i){return M(i)||p(i)||Sf(i)||f(i)||Tv(i)||Fv(i)||i===null||i===void 0}function Fv(i){var s=o(i)&&!c(i),l=!1,d=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],m,_,R=d.length;for(m=0;ml.valueOf():l.valueOf()9999?lt(l,s?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):he(Date.prototype.toISOString)?s?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",lt(l,"Z")):lt(l,s?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Lv(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",s="",l,d,m,_;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",s="Z"),l="["+i+'("]',d=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",m="-MM-DD[T]HH:mm:ss.SSS",_=s+'[")]',this.format(l+d+m+_)}function Ov(i){i||(i=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var s=lt(this,i);return this.localeData().postformat(s)}function $v(i,s){return this.isValid()&&(M(i)&&i.isValid()||Ze(i).isValid())?Dr({to:this,from:i}).locale(this.locale()).humanize(!s):this.localeData().invalidDate()}function Pv(i){return this.from(Ze(),i)}function Hv(i,s){return this.isValid()&&(M(i)&&i.isValid()||Ze(i).isValid())?Dr({from:this,to:i}).locale(this.locale()).humanize(!s):this.localeData().invalidDate()}function Jv(i){return this.to(Ze(),i)}function Ff(i){var s;return i===void 0?this._locale._abbr:(s=Cn(i),s!=null&&(this._locale=s),this)}var Tf=ye("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function Gf(){return this._locale}var Sa=1e3,Ki=60*Sa,Fa=60*Ki,Ef=(365*400+97)*24*Fa;function qi(i,s){return(i%s+s)%s}function Bf(i,s,l){return i<100&&i>=0?new Date(i+400,s,l)-Ef:new Date(i,s,l).valueOf()}function Df(i,s,l){return i<100&&i>=0?Date.UTC(i+400,s,l)-Ef:Date.UTC(i,s,l)}function jv(i){var s,l;if(i=_r(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Df:Bf,i){case"year":s=l(this.year(),0,1);break;case"quarter":s=l(this.year(),this.month()-this.month()%3,1);break;case"month":s=l(this.year(),this.month(),1);break;case"week":s=l(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":s=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":s=l(this.year(),this.month(),this.date());break;case"hour":s=this._d.valueOf(),s-=qi(s+(this._isUTC?0:this.utcOffset()*Ki),Fa);break;case"minute":s=this._d.valueOf(),s-=qi(s,Ki);break;case"second":s=this._d.valueOf(),s-=qi(s,Sa);break}return this._d.setTime(s),e.updateOffset(this,!0),this}function zv(i){var s,l;if(i=_r(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(l=this._isUTC?Df:Bf,i){case"year":s=l(this.year()+1,0,1)-1;break;case"quarter":s=l(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":s=l(this.year(),this.month()+1,1)-1;break;case"week":s=l(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":s=l(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":s=l(this.year(),this.month(),this.date()+1)-1;break;case"hour":s=this._d.valueOf(),s+=Fa-qi(s+(this._isUTC?0:this.utcOffset()*Ki),Fa)-1;break;case"minute":s=this._d.valueOf(),s+=Ki-qi(s,Ki)-1;break;case"second":s=this._d.valueOf(),s+=Sa-qi(s,Sa)-1;break}return this._d.setTime(s),e.updateOffset(this,!0),this}function Kv(){return this._d.valueOf()-(this._offset||0)*6e4}function qv(){return Math.floor(this.valueOf()/1e3)}function ey(){return new Date(this.valueOf())}function ty(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function ry(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function ny(){return this.isValid()?this.toISOString():null}function iy(){return x(this)}function oy(){return I({},y(this))}function sy(){return y(this).overflow}function ay(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}G("N",0,0,"eraAbbr"),G("NN",0,0,"eraAbbr"),G("NNN",0,0,"eraAbbr"),G("NNNN",0,0,"eraName"),G("NNNNN",0,0,"eraNarrow"),G("y",["y",1],"yo","eraYear"),G("y",["yy",2],0,"eraYear"),G("y",["yyy",3],0,"eraYear"),G("y",["yyyy",4],0,"eraYear"),W("N",Vu),W("NN",Vu),W("NNN",Vu),W("NNNN",vy),W("NNNNN",yy),Re(["N","NN","NNN","NNNN","NNNNN"],function(i,s,l,d){var m=l._locale.erasParse(i,d,l._strict);m?y(l).era=m:y(l).invalidEra=i}),W("y",Hi),W("yy",Hi),W("yyy",Hi),W("yyyy",Hi),W("yo",_y),Re(["y","yy","yyy","yyyy"],Dt),Re(["yo"],function(i,s,l,d){var m;l._locale._eraYearOrdinalRegex&&(m=i.match(l._locale._eraYearOrdinalRegex)),l._locale.eraYearOrdinalParse?s[Dt]=l._locale.eraYearOrdinalParse(i,m):s[Dt]=parseInt(i,10)});function ly(i,s){var l,d,m,_=this._eras||Cn("en")._eras;for(l=0,d=_.length;l=0)return _[d]}function cy(i,s){var l=i.since<=i.until?1:-1;return s===void 0?e(i.since).year():e(i.since).year()+(s-i.offset)*l}function dy(){var i,s,l,d=this.localeData().eras();for(i=0,s=d.length;i_&&(s=_),Ry.call(this,i,s,l,d,m))}function Ry(i,s,l,d,m){var _=ff(i,s,l,d,m),R=ps(_.year,0,_.dayOfYear);return this.year(R.getUTCFullYear()),this.month(R.getUTCMonth()),this.date(R.getUTCDate()),this}G("Q",0,"Qo","quarter"),W("Q",ef),Re("Q",function(i,s){s[_n]=(fe(i)-1)*3});function Sy(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}G("D",["DD",2],"Do","date"),W("D",We,Ji),W("DD",We,ir),W("Do",function(i,s){return i?s._dayOfMonthOrdinalParse||s._ordinalParse:s._dayOfMonthOrdinalParseLenient}),Re(["D","DD"],Hr),Re("Do",function(i,s){s[Hr]=fe(i.match(We)[0])});var Wf=ji("Date",!0);G("DDD",["DDDD",3],"DDDo","dayOfYear"),W("DDD",ga),W("DDDD",tf),Re(["DDD","DDDD"],function(i,s,l){l._dayOfYear=fe(i)});function Fy(i){var s=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?s:this.add(i-s,"d")}G("m",["mm",2],0,"minute"),W("m",We,Su),W("mm",We,ir),Re(["m","mm"],Br);var Ty=ji("Minutes",!1);G("s",["ss",2],0,"second"),W("s",We,Su),W("ss",We,ir),Re(["s","ss"],In);var Gy=ji("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,function(){return this.millisecond()*10}),G(0,["SSSSS",5],0,function(){return this.millisecond()*100}),G(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),G(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),G(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),G(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),W("S",ga,ef),W("SS",ga,ir),W("SSS",ga,tf);var ri,Zf;for(ri="SSSS";ri.length<=9;ri+="S")W(ri,Hi);function Ey(i,s){s[Ci]=fe(("0."+i)*1e3)}for(ri="S";ri.length<=9;ri+="S")Re(ri,Ey);Zf=ji("Milliseconds",!1),G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");function By(){return this._isUTC?"UTC":""}function Dy(){return this._isUTC?"Coordinated Universal Time":""}var F=ae.prototype;F.add=kv,F.calendar=Bv,F.clone=Dv,F.diff=Uv,F.endOf=zv,F.format=Ov,F.from=$v,F.fromNow=Pv,F.to=Hv,F.toNow=Jv,F.get=Lg,F.invalidAt=sy,F.isAfter=Nv,F.isBefore=Wv,F.isBetween=Zv,F.isSame=Yv,F.isSameOrAfter=Mv,F.isSameOrBefore=Xv,F.isValid=iy,F.lang=Tf,F.locale=Ff,F.localeData=Gf,F.max=iv,F.min=nv,F.parsingFlags=oy,F.set=Og,F.startOf=jv,F.subtract=Rv,F.toArray=ty,F.toObject=ry,F.toDate=ey,F.toISOString=Vv,F.inspect=Lv,typeof Symbol!="undefined"&&Symbol.for!=null&&(F[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),F.toJSON=ny,F.toString=Qv,F.unix=qv,F.valueOf=Kv,F.creationData=ay,F.eraName=dy,F.eraNarrow=fy,F.eraAbbr=my,F.eraYear=py,F.year=of,F.isLeapYear=Vg,F.weekYear=Iy,F.isoWeekYear=wy,F.quarter=F.quarters=Sy,F.month=cf,F.daysInMonth=eb,F.week=F.weeks=lb,F.isoWeek=F.isoWeeks=ub,F.weeksInYear=Ay,F.weeksInWeekYear=ky,F.isoWeeksInYear=Cy,F.isoWeeksInISOWeekYear=xy,F.date=Wf,F.day=F.days=wb,F.weekday=Cb,F.isoWeekday=xb,F.dayOfYear=Fy,F.hour=F.hours=Gb,F.minute=F.minutes=Ty,F.second=F.seconds=Gy,F.millisecond=F.milliseconds=Zf,F.utcOffset=mv,F.utc=hv,F.local=gv,F.parseZone=bv,F.hasAlignedHourOffset=vv,F.isDST=yv,F.isLocal=Iv,F.isUtcOffset=wv,F.isUtc=xf,F.isUTC=xf,F.zoneAbbr=By,F.zoneName=Dy,F.dates=ye("dates accessor is deprecated. Use date instead.",Wf),F.months=ye("months accessor is deprecated. Use month instead",cf),F.years=ye("years accessor is deprecated. Use year instead",of),F.zone=ye("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",pv),F.isDSTShifted=ye("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_v);function Ny(i){return Ze(i*1e3)}function Wy(){return Ze.apply(null,arguments).parseZone()}function Yf(i){return i}var we=tt.prototype;we.calendar=Q,we.longDateFormat=qt,we.invalidDate=ei,we.ordinal=Tg,we.preparse=Yf,we.postformat=Yf,we.relativeTime=Eg,we.pastFuture=Bg,we.set=Lt,we.eras=ly,we.erasParse=uy,we.erasConvertYear=cy,we.erasAbbrRegex=gy,we.erasNameRegex=hy,we.erasNarrowRegex=by,we.months=jg,we.monthsShort=zg,we.monthsParse=qg,we.monthsRegex=rb,we.monthsShortRegex=tb,we.week=ib,we.firstDayOfYear=ab,we.firstDayOfWeek=sb,we.weekdays=bb,we.weekdaysMin=yb,we.weekdaysShort=vb,we.weekdaysParse=Ib,we.weekdaysRegex=Ab,we.weekdaysShortRegex=kb,we.weekdaysMinRegex=Rb,we.isPM=Fb,we.meridiem=Eb;function Ga(i,s,l,d){var m=Cn(),_=g().set(d,s);return m[l](_,i)}function Mf(i,s,l){if(f(i)&&(s=i,i=void 0),i=i||"",s!=null)return Ga(i,s,l,"month");var d,m=[];for(d=0;d<12;d++)m[d]=Ga(i,d,l,"month");return m}function Ou(i,s,l,d){typeof i=="boolean"?(f(s)&&(l=s,s=void 0),s=s||""):(s=i,l=s,i=!1,f(s)&&(l=s,s=void 0),s=s||"");var m=Cn(),_=i?m._week.dow:0,R,N=[];if(l!=null)return Ga(s,(l+_)%7,d,"day");for(R=0;R<7;R++)N[R]=Ga(s,(R+_)%7,d,"day");return N}function Zy(i,s){return Mf(i,s,"months")}function Yy(i,s){return Mf(i,s,"monthsShort")}function My(i,s,l){return Ou(i,s,l,"weekdays")}function Xy(i,s,l){return Ou(i,s,l,"weekdaysShort")}function Uy(i,s,l){return Ou(i,s,l,"weekdaysMin")}ti("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var s=i%10,l=fe(i%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th";return i+l}}),e.lang=ye("moment.lang is deprecated. Use moment.locale instead.",ti),e.langData=ye("moment.langData is deprecated. Use moment.localeData instead.",Cn);var xn=Math.abs;function Qy(){var i=this._data;return this._milliseconds=xn(this._milliseconds),this._days=xn(this._days),this._months=xn(this._months),i.milliseconds=xn(i.milliseconds),i.seconds=xn(i.seconds),i.minutes=xn(i.minutes),i.hours=xn(i.hours),i.months=xn(i.months),i.years=xn(i.years),this}function Xf(i,s,l,d){var m=Dr(s,l);return i._milliseconds+=d*m._milliseconds,i._days+=d*m._days,i._months+=d*m._months,i._bubble()}function Vy(i,s){return Xf(this,i,s,1)}function Ly(i,s){return Xf(this,i,s,-1)}function Uf(i){return i<0?Math.floor(i):Math.ceil(i)}function Oy(){var i=this._milliseconds,s=this._days,l=this._months,d=this._data,m,_,R,N,ee;return i>=0&&s>=0&&l>=0||i<=0&&s<=0&&l<=0||(i+=Uf($u(l)+s)*864e5,s=0,l=0),d.milliseconds=i%1e3,m=Ir(i/1e3),d.seconds=m%60,_=Ir(m/60),d.minutes=_%60,R=Ir(_/60),d.hours=R%24,s+=Ir(R/24),ee=Ir(Qf(s)),l+=ee,s-=Uf($u(ee)),N=Ir(l/12),l%=12,d.days=s,d.months=l,d.years=N,this}function Qf(i){return i*4800/146097}function $u(i){return i*146097/4800}function $y(i){if(!this.isValid())return NaN;var s,l,d=this._milliseconds;if(i=_r(i),i==="month"||i==="quarter"||i==="year")switch(s=this._days+d/864e5,l=this._months+Qf(s),i){case"month":return l;case"quarter":return l/3;case"year":return l/12}else switch(s=this._days+Math.round($u(this._months)),i){case"week":return s/7+d/6048e5;case"day":return s+d/864e5;case"hour":return s*24+d/36e5;case"minute":return s*1440+d/6e4;case"second":return s*86400+d/1e3;case"millisecond":return Math.floor(s*864e5)+d;default:throw new Error("Unknown unit "+i)}}function An(i){return function(){return this.as(i)}}var Vf=An("ms"),Py=An("s"),Hy=An("m"),Jy=An("h"),jy=An("d"),zy=An("w"),Ky=An("M"),qy=An("Q"),e_=An("y"),t_=Vf;function r_(){return Dr(this)}function n_(i){return i=_r(i),this.isValid()?this[i+"s"]():NaN}function Ai(i){return function(){return this.isValid()?this._data[i]:NaN}}var i_=Ai("milliseconds"),o_=Ai("seconds"),s_=Ai("minutes"),a_=Ai("hours"),l_=Ai("days"),u_=Ai("months"),c_=Ai("years");function d_(){return Ir(this.days()/7)}var kn=Math.round,eo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function f_(i,s,l,d,m){return m.relativeTime(s||1,!!l,i,d)}function m_(i,s,l,d){var m=Dr(i).abs(),_=kn(m.as("s")),R=kn(m.as("m")),N=kn(m.as("h")),ee=kn(m.as("d")),ge=kn(m.as("M")),Ot=kn(m.as("w")),Rn=kn(m.as("y")),ni=_<=l.ss&&["s",_]||_0,ni[4]=d,f_.apply(null,ni)}function p_(i){return i===void 0?kn:typeof i=="function"?(kn=i,!0):!1}function h_(i,s){return eo[i]===void 0?!1:s===void 0?eo[i]:(eo[i]=s,i==="s"&&(eo.ss=s-1),!0)}function g_(i,s){if(!this.isValid())return this.localeData().invalidDate();var l=!1,d=eo,m,_;return typeof i=="object"&&(s=i,i=!1),typeof i=="boolean"&&(l=i),typeof s=="object"&&(d=Object.assign({},eo,s),s.s!=null&&s.ss==null&&(d.ss=s.s-1)),m=this.localeData(),_=m_(this,!l,d,m),l&&(_=m.pastFuture(+this,_)),m.postformat(_)}var Pu=Math.abs;function to(i){return(i>0)-(i<0)||+i}function Ea(){if(!this.isValid())return this.localeData().invalidDate();var i=Pu(this._milliseconds)/1e3,s=Pu(this._days),l=Pu(this._months),d,m,_,R,N=this.asSeconds(),ee,ge,Ot,Rn;return N?(d=Ir(i/60),m=Ir(d/60),i%=60,d%=60,_=Ir(l/12),l%=12,R=i?i.toFixed(3).replace(/\.?0+$/,""):"",ee=N<0?"-":"",ge=to(this._months)!==to(N)?"-":"",Ot=to(this._days)!==to(N)?"-":"",Rn=to(this._milliseconds)!==to(N)?"-":"",ee+"P"+(_?ge+_+"Y":"")+(l?ge+l+"M":"")+(s?Ot+s+"D":"")+(m||d||i?"T":"")+(m?Rn+m+"H":"")+(d?Rn+d+"M":"")+(i?Rn+R+"S":"")):"P0D"}var _e=Aa.prototype;_e.isValid=uv,_e.abs=Qy,_e.add=Vy,_e.subtract=Ly,_e.as=$y,_e.asMilliseconds=Vf,_e.asSeconds=Py,_e.asMinutes=Hy,_e.asHours=Jy,_e.asDays=jy,_e.asWeeks=zy,_e.asMonths=Ky,_e.asQuarters=qy,_e.asYears=e_,_e.valueOf=t_,_e._bubble=Oy,_e.clone=r_,_e.get=n_,_e.milliseconds=i_,_e.seconds=o_,_e.minutes=s_,_e.hours=a_,_e.days=l_,_e.weeks=d_,_e.months=u_,_e.years=c_,_e.humanize=g_,_e.toISOString=Ea,_e.toString=Ea,_e.toJSON=Ea,_e.locale=Ff,_e.localeData=Gf,_e.toIsoString=ye("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ea),_e.lang=Tf,G("X",0,0,"unix"),G("x",0,0,"valueOf"),W("x",va),W("X",Zg),Re("X",function(i,s,l){l._d=new Date(parseFloat(i)*1e3)}),Re("x",function(i,s,l){l._d=new Date(fe(i))});return e.version="2.30.1",t(Ze),e.fn=F,e.min=ov,e.max=sv,e.now=av,e.utc=g,e.unix=Ny,e.months=Zy,e.isDate=p,e.locale=ti,e.invalid=k,e.duration=Dr,e.isMoment=M,e.weekdays=My,e.parseZone=Wy,e.localeData=Cn,e.isDuration=ka,e.monthsShort=Yy,e.weekdaysMin=Uy,e.defineLocale=Du,e.updateLocale=Wb,e.locales=Zb,e.weekdaysShort=Xy,e.normalizeUnits=_r,e.relativeTimeRounding=p_,e.relativeTimeThreshold=h_,e.calendarFormat=Ev,e.prototype=F,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e}))});var dC={};x_(dC,{default:()=>Cu});module.exports=A_(dC);var _s=class{constructor(e){h(this,"deps",e);h(this,"lastExpiredKeys",new Set)}startPeriodicTask(){let e=!0;this.periodicTask().finally(()=>{e=!1}),this.deps.registerInterval(window.setInterval(()=>{if(e){console.debug("Skip reminder interval task because task is already running.");return}e=!0,this.periodicTask().finally(()=>{e=!1})},this.deps.checkIntervalSec()*1e3))}async periodicTask(){if(this.deps.reloadUI(!1),this.deps.isScanned()||this.deps.reloadRemindersInAllFiles().then(()=>{this.deps.markScanned(),this.deps.saveData()}),this.deps.saveData(!1),this.deps.isPopupIntrusive()&&this.deps.isEditing())return;let e=this.deps.getExpiredReminders(),t=new Set(e.map(o=>o.key()));for(let o of t)if(!this.lastExpiredKeys.has(o)){this.deps.reloadUI(!0);break}if(this.lastExpiredKeys=t,!this.deps.isNotificationEnabled()||this.deps.isNotificationPaused())return;let n;for(let o of e)if(this.deps.isLayoutReady()){if(o.muteNotification)continue;if(n)for(;n.beingDisplayed;)await this.sleep(100);this.deps.showReminder(o),n=o}}async sleep(e){return new Promise(t=>setTimeout(t,e))}};var bn=require("obsidian");var cp=require("obsidian");var $f=require("obsidian");function Pf(r,e){if(!e.reminders.getExpiredReminders(e.settings.reminderTime.value).some(o=>!o.muteNotification))return!1;if(r)return!0;let n=e.reminders.muteExpiredReminders(e.settings.reminderTime.value);return e.ui.reload(!0),e.data.save(!0),new $f.Notice(`Muted ${n} reminder${n===1?"":"s"}`),!0}var Ju=require("obsidian");var Hf=require("obsidian");var Ba=class extends Hf.SuggestModal{constructor(t,n,o){super(t);h(this,"laters",n);h(this,"onSelect",o);this.setPlaceholder("Pause reminder notifications for...")}getSuggestions(t){return this.laters.filter(n=>n.label.toLowerCase().includes(t.toLowerCase()))}renderSuggestion(t,n){n.createEl("div",{text:t.label})}onChooseSuggestion(t){this.onSelect(t)}};function k_(r,e){let t=e.later();r.data.dndUntil.value=t,r.data.save(!0),r.ui.refreshDndStatusBar(),new Ju.Notice(`Reminder notifications paused until ${t.format("YYYY-MM-DD HH:mm")}`)}function Da(r){r.data.dndUntil.value=null,r.data.save(!0),r.ui.refreshDndStatusBar(),new Ju.Notice("Reminder notifications resumed")}function Na(r){new Ba(r.app,r.settings.laters.value,e=>{k_(r,e)}).open()}function Jf(r,e){return r||Na(e),!0}function ro(r,e){return r==null?!1:e.getTimeInMillis(){n(t,e)})}};var or=Nr(wr(),1);var P=class r{constructor(e,t){h(this,"time",e);h(this,"_hasTimePart",t)}static now(){return new r((0,or.default)(),!0)}static parse(e){return e.length>10?new r((0,or.default)(e,"YYYY-MM-DD HH:mm"),!0):new r((0,or.default)(e,"YYYY-MM-DD"),!1)}static ofEpochMillis(e){return new r((0,or.default)(e),!0)}static duration(e,t,n,o){return t.fixedTime(o).diff(e.fixedTime(o),n)}getTimeInMillis(e){return this.fixedTime(e).valueOf()}format(e,t){return this.fixedTime(t).format(e)}toYYYYMMMM(e){return this.fixedTime(e).format("YYYY, MMMM")}toYYYYMMDD(e){return this.fixedTime(e).format("YYYY-MM-DD")}add(e,t,n){return new r(this.fixedTime(n).clone().add(e,t),this._hasTimePart)}fixedTime(e){return this._hasTimePart?this.time:e===void 0?this.time:this.time.clone().add(e.minutes,"minutes")}get hasTimePart(){return this._hasTimePart}moment(){return this.time}isValid(){return this.time.isValid()}clone(e){let t=e==null?this._hasTimePart:e,n=this.time.clone();return new r(n,t)}toString(){return this._hasTimePart?this.format("YYYY-MM-DD HH:mm"):this.format("YYYY-MM-DD")}equals(e){return this._hasTimePart===e._hasTimePart&&this.time.isSame(e.time)}},Wa=class r{constructor(e,t){h(this,"hour",e);h(this,"minute",t)}static parse(e){if(!e.match(/^\d{1,2}:\d{1,2}$/))throw`Unexpected format time(${e}). Time must be HH:mm.`;let t=e.split(":");if(t.length!==2)throw`Unexpected format time(${e}). time must be HH:mm.`;let n=parseInt(t[0]),o=parseInt(t[1]);if(n>23||n<0)throw"hour must be 0~23";if(o>59||o<0)throw"minute must be 0~59";return new r(n,o)}get minutes(){return this.hour*60+this.minute}toString(){let e=t=>t<10?"0"+t:""+t;return`${e(this.hour)}:${e(this.minute)}`}};function oo(r,e){return()=>new P((0,or.default)(),!0).add(r,e)}function jf(r){return oo(r,"minutes")}function zu(r){return oo(r,"hours")}function R_(r){return oo(r,"days")}function S_(r){return oo(r,"weeks")}function F_(r){return oo(r,"months")}function T_(r){return oo(r,"years")}function ki(r){return()=>{let e=(0,or.default)();return e.isoWeekday()<=r?new P(e.isoWeekday(r),!1):new P(e.add(1,"weeks").isoWeekday(r),!1)}}function Ku(){return()=>new P((0,or.default)().add(1,"days"),!1)}function zf(){return()=>new P((0,or.default)().add(1,"weeks"),!1)}function G_(){return()=>new P((0,or.default)().add(1,"months"),!1)}function E_(){return()=>new P((0,or.default)().add(1,"years"),!1)}var Ye=class{constructor(e,t){h(this,"label",e);h(this,"later",t)}};function Kf(r){return r.split(` `).map(e=>B_(e.trim()))}function B_(r){if(r=r.toLowerCase(),r.startsWith("in")){let e=r.split(" ");if(e.length!==3)throw"Unsupported format. Should be 'In N (minutes|hours)'";let t=e[1]==="a"||e[1]==="an"?1:parseInt(e[1]);switch(e[2]){case"minute":case"minutes":{let n=t==1?"minute":"minutes";return new Ye(`In ${t} ${n}`,jf(t))}case"hour":case"hours":{let n=t==1?"hour":"hours";return new Ye(`In ${t} ${n}`,zu(t))}case"day":case"days":{let n=t==1?"day":"days";return new Ye(`In ${t} ${n}`,R_(t))}case"week":case"weeks":{let n=t==1?"week":"weeks";return new Ye(`In ${t} ${n}`,S_(t))}case"month":case"months":{let n=t==1?"month":"months";return new Ye(`In ${t} ${n}`,F_(t))}case"year":case"years":{let n=t==1?"year":"years";return new Ye(`In ${t} ${n}`,T_(t))}}}else if(r.startsWith("next")){let e=r.substring(5);switch(e){case"sunday":return new Ye("Next Sunday",ki(0));case"monday":return new Ye("Next Monday",ki(1));case"tuesday":return new Ye("Next Tuesday",ki(2));case"wednesday":return new Ye("Next Wednesday",ki(3));case"thursday":return new Ye("Next Thursday",ki(4));case"friday":return new Ye("Next Friday",ki(5));case"saturday":return new Ye("Next Saturday",ki(6));case"day":return new Ye("Tomorrow",Ku());case"week":return new Ye("Next week",zf());case"month":return new Ye("Next month",G_());case"year":return new Ye("Next year",E_());default:throw`Unsupported weekday: ${e}`}}else if(r==="tomorrow")return new Ye("Tomorrow",Ku());throw`Unsupported format: ${r}`}var ec=[new Ye("In 30 minutes",jf(30)),new Ye("In 1 hours",zu(1)),new Ye("In 3 hours",zu(3)),new Ye("Tomorrow",Ku()),new Ye("Next week",zf())],qu=class{constructor(){h(this,"dateFormat",new no("YYYY-MM-DD"));h(this,"dateTimeFormat",new no("YYYY-MM-DD HH:mm"));h(this,"strict",new no(!1))}setTimeFormat(e,t,n){this.dateFormat=e,this.dateTimeFormat=t,this.strict=n}parse(e){let t=this.doParse(e,!0);return t!=null?t:this.strict.value?null:this.doParse(e,!1)}doParse(e,t){let n=(0,or.default)(e,this.dateTimeFormat.value,t);if(n.isValid())return new P(n,!0);let o=(0,or.default)(e,this.dateFormat.value,t);return o.isValid()?new P(o,!1):null}toString(e){return e.hasTimePart?e.format(this.dateTimeFormat.value):e.format(this.dateFormat.value)}},Jr=new qu;function qf(r,e){return ro(e.data.dndUntil.value,P.now())?(r||Da(e),!0):!1}function em(r,e){return r||e.fileSystem.reloadRemindersInAllFiles(),!0}function tm(r,e){return r||e.showReminderList(),!0}var oi=class oi{constructor(e,t,n,o,a){h(this,"lineIndex",e);h(this,"prefix",t);h(this,"check",n);h(this,"suffix",o);h(this,"body",a)}static parse(e,t){let n=oi.regexp.exec(t);return n?new oi(e,n.groups.prefix,n.groups.check,n.groups.suffix,n.groups.body):null}toMarkdown(){return`${this.prefix}${this.check}${this.suffix}${this.body}`}isChecked(){return oi.checkedStatuses.some(e=>e===this.check)}setChecked(e){this.check=e?"x":" "}getHeaderLength(){return this.prefix.length+this.check.length+this.suffix.length}clone(){return oi.parse(this.lineIndex,this.toMarkdown())}};h(oi,"regexp",/^(?((> ?)*)?\s*[-*+][ ]+\[)(?.)(?\]\s+)(?.*)$/),h(oi,"checkedStatuses",["x","-"]);var so=oi;function rm(r){if(so.parse(0,r)!==null)return r;let e=/^(?(?:> ?)*\s*)(?.*)$/.exec(r),t=e.groups.lead,n=e.groups.rest;if(/^#{1,6}[ ]/.test(n)||/^\d+[.)][ ]/.test(n)||n.startsWith("|")||n.startsWith("```"))return null;let o=/^(?[-*+])[ ]+(?.*)$/.exec(n);if(o){let a=o.groups.marker,c=o.groups.content;return`${t}${a} [ ] ${c}`}return`${t}- [ ] ${n}`}var Sn=class{constructor(e,t){h(this,"file",e);h(this,"lines",[]);h(this,"todos",[]);this.parse(t)}parse(e){this.lines=e.split(` `),this.todos=[],this.lines.forEach((t,n)=>{let o=so.parse(n,t);o&&this.todos.push(o)})}getTodos(){return this.todos}insertTodo(e,t){t.lineIndex=e,this.lines.splice(e,0,t.toMarkdown());let n=-1;for(let o in this.todos){let a=this.todos[o];a.lineIndex>=e&&(n<0&&(n=parseInt(o)),a.lineIndex++)}n<=0?this.todos.splice(0,0,t):this.todos.splice(n,0,t)}getTodo(e){let t=this.todos.find(n=>n.lineIndex===e);return t==null?null:t}applyChanges(){this.todos.forEach(e=>{this.lines[e.lineIndex]=e.toMarkdown()})}toMarkdown(){return this.applyChanges(),this.lines.join(` `)}};var im=require("obsidian"),nm=window.require?window.require("electron"):void 0;function Za(){new im.Notice('Cannot insert a reminder here. Reminders can only be added to task lines such as "- [ ] Task".')}function Ya(r,e,t,n,o){let a=r.appendReminder(e,t,n);if(a!=null)return a;if(!o)return null;let c=rm(e);if(c==null)return null;let u=n==null?void 0:n+(c.length-e.length);return r.appendReminder(c,t,u)}async function om(r,e){return nm&&(await nm.remote.dialog.showMessageBox({type:"question",title:"Obsidian Reminder",message:r,detail:e,buttons:["OK","Cancel"],cancelId:1})).response===0?0:1}var ao=class r{constructor(e,t,n,o,a){h(this,"file",e);h(this,"title",t);h(this,"time",n);h(this,"rowNumber",o);h(this,"done",a);h(this,"muteNotification",!1);h(this,"beingDisplayed",!1)}key(){return this.file+this.title+this.time.toString()}isExpired(e,t){return this.time.getTimeInMillis(t)<=e}equals(e){return this.rowNumber===e.rowNumber&&this.title===e.title&&this.time.equals(e.time)&&this.file===e.file}getFileName(){return r.extractFileName(this.file)}static extractFileName(e){let t=e.split(/[/\\]/);return t[t.length-1].replace(/^(.*?)(\..+)?$/,"$1")}},Ma=class{constructor(e){h(this,"onChange",e);h(this,"fileToReminders",new Map);h(this,"reminders",[]);h(this,"reminderTime")}getExpiredReminders(e){let t=new Date().getTime(),n=[];for(let o=0;ot.time.toYYYYMMDD()===e.toYYYYMMDD())}removeReminder(e){console.debug("Remove reminder: %o",e),this.reminders.remove(e);let t=this.fileToReminders.get(e.file);t&&(t.remove(e),t.length===0&&this.fileToReminders.delete(e.file)),this.onChange()}clear(){this.fileToReminders.clear(),this.reminders=[],this.onChange()}removeByFile(e){return this.fileToReminders.delete(e)?(this.sortReminders(),!0):!1}replaceFile(e,t){let n=this.fileToReminders.get(e);if(n){if(this.equals(n,t))return!1;let o=new Map;for(let a of n)o.set(a.key(),a.muteNotification);for(let a of t){let c=o.get(a.key());o.set(a.key(),a.muteNotification),c!==void 0&&(a.muteNotification=c)}}return this.fileToReminders.set(e,t),this.sortReminders(),!0}equals(e,t){if(e.length!==t.length)return!1;let n=[...e],o=[...t];return this.sort(n),this.sort(o),n.every((a,c)=>a.equals(o[c]))}sortReminders(){let e=[];for(let t of this.fileToReminders.values())e.push(...t);this.sort(e),this.reminders=e,this.onChange()}sort(e){e.sort((t,n)=>{var a,c;let o=t.time.getTimeInMillis((a=this.reminderTime)==null?void 0:a.value)-n.time.getTimeInMillis((c=this.reminderTime)==null?void 0:c.value);return o>0?1:o<0?-1:0})}},am=[{name:"US Style (12h)",format:{yearMonthFormat:"MMMM YYYY",monthDayFormat:"MM/DD",shortDateWithWeekdayFormat:"M/DD (ddd)",timeFormat:"h:mm A"}},{name:"US Style (24h)",format:{yearMonthFormat:"MMMM YYYY",monthDayFormat:"MM/DD",shortDateWithWeekdayFormat:"M/DD (ddd)",timeFormat:"HH:mm"}},{name:"EU Style (24h)",format:{yearMonthFormat:"MMMM YYYY",monthDayFormat:"DD/MM",shortDateWithWeekdayFormat:"D/MM (ddd)",timeFormat:"HH:mm"}},{name:"EU Style (12h)",format:{yearMonthFormat:"MMMM YYYY",monthDayFormat:"DD/MM",shortDateWithWeekdayFormat:"D/MM (ddd)",timeFormat:"h:mm A"}},{name:"JP Style (24h)",format:{yearMonthFormat:"YYYY\u5E74MM\u6708",monthDayFormat:"MM/DD",shortDateWithWeekdayFormat:"M\u6708D\u65E5 (ddd)",timeFormat:"HH:mm"}},{name:"JP Style (12h)",format:{yearMonthFormat:"YYYY\u5E74MM\u6708",monthDayFormat:"MM/DD",shortDateWithWeekdayFormat:"M\u6708D\u65E5 (ddd)",timeFormat:"h:mm A"}}];function sm(r,e,t,n){let o=P.duration(e,r,"days",t);if(o>30)return new si(r.format(n.yearMonthFormat,t),a=>a.format(n.monthDayFormat,t));if(o>=7)return new si("Over 1 week",a=>a.format(n.monthDayFormat,t));if(r.toYYYYMMDD(t)===e.toYYYYMMDD(t)){let a=new si("Today",c=>c.format(n.timeFormat,t));return a.isToday=!0,a}return r.toYYYYMMDD(t)===e.add(1,"days",t).toYYYYMMDD()?new si("Tomorrow",a=>a.format(n.timeFormat,t)):new si(r.format(n.shortDateWithWeekdayFormat,t),a=>a.format(n.timeFormat,t))}var si=class{constructor(e,t){h(this,"name",e);h(this,"timeToStringFunc",t);h(this,"isToday",!1);h(this,"isOverdue",!1)}timeToString(e){return this.timeToStringFunc(e)}};function lm(r,e,t){let n=P.now(),o=n.getTimeInMillis(),a=[],c=[],u=[],f=sm(n,n,e,t);for(let p=0;p0||f.isToday)&&a.push(new Is(f,c)),c=[]),c.push(b),f=I}if(c.length>0&&a.push(new Is(f,c)),u.length>0){let p=new si("Overdue",b=>b.toYYYYMMDD(e)===n.toYYYYMMDD(e)?b.format(t.timeFormat,e):b.format(t.monthDayFormat,e));p.isOverdue=!0,a.splice(0,0,new Is(p,u))}return a}var Is=class{constructor(e,t){h(this,"group",e);h(this,"reminders",t)}get name(){return this.group.name}get isOverdue(){return this.group.isOverdue}timeToString(e){return this.group.timeToString(e)}};var Nt=class Nt{constructor(e,t){h(this,"key",e);h(this,"defaultValue",t)}};h(Nt,"now",new Nt("now",P.now())),h(Nt,"useCustomEmojiForTasksPlugin",new Nt("useCustomEmojiForTasksPlugin",!1)),h(Nt,"removeTagsForTasksPlugin",new Nt("removeTagsForTasksPlugin",!1)),h(Nt,"useReminderTimeFallbackForTasksPlugin",new Nt("useReminderTimeFallbackForTasksPlugin",!1)),h(Nt,"dataviewReminderFieldName",new Nt("dataviewReminderFieldName","reminder")),h(Nt,"linkDatesToDailyNotes",new Nt("linkDatesToDailyNotes",!1)),h(Nt,"strictDateFormat",new Nt("strictDateFormat",!1));var Qe=Nt,ws=class{constructor(){h(this,"parameters",new Map)}setParameter(e,t){this.parameters.set(e.key,()=>t.value)}setParameterFunc(e,t){this.parameters.set(e.key,t)}setParameterValue(e,t){this.parameters.set(e.key,()=>t)}getParameter(e){let t=this.parameters.get(e.key);return t==null?e.defaultValue:t()}},ai=class{constructor(){h(this,"config",new ws)}setConfig(e){this.config=e}parse(e){return e.getTodos().map(t=>{let n=this.parseValidReminder(t);if(n==null)return null;let o=n.getTitle();if(o==null)return null;let a=n.getTime();if(a==null)return null;let c=new ao(e.file,o,a,t.lineIndex,t.isChecked()),u=n.computeSpan(),f=t.getHeaderLength();return{reminder:c,columnStart:u.start+f,columnEnd:u.end+f}}).filter(t=>t!=null)}async modify(e,t,n){let o=e.getTodo(t.rowNumber);if(o===null)return console.warn("Not a todo: reminder=%o",t),!1;let a=this.parseValidReminder(o);return a===null||!this.modifyReminder(e,o,a,n)?!1:(o.body=a.toMarkdown(),!0)}parseValidReminder(e){let t=this.parseReminder(e);return t===null||!this.isValidReminder(t)?null:t}isValidReminder(e){return e.getTime()!==null}modifyReminder(e,t,n,o){if(o.rawTime!==void 0){if(!n.setRawTime(o.rawTime))return console.warn("The reminder doesn't support raw time: parsed=%o",n),!1}else o.time!==void 0&&n.setTime(o.time);return o.checked!==void 0&&t.setChecked(o.checked),!0}appendReminder(e,t,n){let o=so.parse(0,e);if(o==null)return null;let a=this.parseReminder(o),c=o.getHeaderLength();return n!=null&&(n-=c),a!=null?a.setTime(t,n):(a=this.newReminder(o.body,t,n),a.setTime(t)),o.body=a.toMarkdown(),{insertedLine:o.toMarkdown(),caretPosition:c+a.getEndOfTimeTextIndex()}}isStrictDateFormat(){return this.config.getParameter(Qe.strictDateFormat)}},Xa=class{constructor(){h(this,"config");h(this,"formats",[])}setConfig(e){this.config=e,this.syncConfig()}parse(e){let t=[];for(let n of this.formats){let o=n.parse(e);o!=null&&t.push(...o)}return t}async modify(e,t,n){for(let o of this.formats)if(await o.modify(e,t,n))return!0;return!1}resetFormat(e){this.formats=e,this.syncConfig()}syncConfig(){this.config!=null&&this.formats.forEach(e=>e.setConfig(this.config))}appendReminder(e,t){return this.formats[0]==null?null:this.formats[0].appendReminder(e,t)}};var mc=Nr(wr(),1);var um="(?[[(])(?
\\s*)(?[\\p{L}\\p{N}_-]+)::(?\\s*)(?[^[\\]()]*?)(?\\s*)(?[)\\]])";function D_(r,e){return r==="["&&e==="]"?"bracket":r==="("&&e===")"?"paren":null}function cm(r){let e=new RegExp(um,"gu"),t=[],n;for(;(n=e.exec(r))!==null;){let o=n.groups,a=D_(o.open,o.close);a!=null&&t.push({key:o.key,value:o.value,style:a,start:n.index,end:n.index+n[0].length})}return t}function dm(r,e,t){let n=r.slice(e.start,e.end),a=new RegExp(`^${um}$`,"u").exec(n);if(a==null)return r;let c=a.groups,u=c.open.length+c.pre.length+c.key.length+2+c.mid.length,f=c.value.length,p=n.slice(0,u)+t+n.slice(u+f);return r.slice(0,e.start)+p+r.slice(e.end)}function fm(r,e,t,n="bracket"){let[o,a]=n==="bracket"?["[","]"]:["(",")"],c=`${o}${e}:: ${t}${a}`;if(r.length===0)return c;let u=/\s$/.test(r)?"":" ";return`${r}${u}${c}`}function tc(r,e){let t=e.start,n=e.end;return t>0&&r[t-1]===" "?t-=1:n0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r})();var De=function(r){return r!=null},sr=function(r){return typeof r=="number"},rc=function(r){return typeof r=="string"&&Cs.includes(r)},At=Array.isArray,Cr=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=me(t,e/t.length)),t.slice(0,e)+String(n))}var pm=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},Wt=function(r,e){var t=r%e;return t*e<0?t+e:t},Ua=function(r,e){return{div:Math.floor(r/e),mod:Wt(r,e)}},ar=function(r){return!De(r)||r.length===0},ze=function(r){return!ar(r)},be=function(r,e){return ze(r)&&r.indexOf(e)!==-1};var jr=function(r,e,t,n,o,a){return n===void 0&&(n=0),o===void 0&&(o=0),a===void 0&&(a=0),new Date(Date.UTC(r,e-1,t,n,o,a))},N_=[31,28,31,30,31,30,31,31,30,31,30,31],gm=1e3*60*60*24,Qa=9999,bm=jr(1970,1,1),W_=[6,0,1,2,3,4,5];var lo=function(r){return r%4===0&&r%100!==0||r%400===0},nc=function(r){return r instanceof Date},Si=function(r){return nc(r)&&!isNaN(r.getTime())};var Z_=function(r,e){var t=r.getTime(),n=e.getTime(),o=t-n;return Math.round(o/gm)},xs=function(r){return Z_(r,bm)},Va=function(r){return new Date(bm.getTime()+r*gm)},Y_=function(r){var e=r.getUTCMonth();return e===1&&lo(r.getUTCFullYear())?29:N_[e]},Fn=function(r){return W_[r.getUTCDay()]},ic=function(r,e){var t=jr(r,e+1,1);return[Fn(t),Y_(t)]},La=function(r,e){return e=e||r,new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},Oa=function(r){var e=new Date(r.getTime());return e},oc=function(r){for(var e=[],t=0;tthis.maxDate;if(this.method==="between"){if(t)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return t?!0:(this.add(e),!1);return this.add(e)},r.prototype.add=function(e){return this._result.push(e),!0},r.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r})(),Gn=M_;var sc=function(r,e){return sc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])},sc(r,e)};function co(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");sc(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var kt=function(){return kt=Object.assign||function(e){for(var t,n=1,o=arguments.length;ne[0].length)&&(e=a,t=o)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(t==="SKIP");return this.symbol=t,this.value=e,!0},r.prototype.accept=function(e){if(this.symbol===e){if(this.value){var t=this.value;return this.nextSymbol(),t}return this.nextSymbol(),!0}return!1},r.prototype.acceptNumber=function(){return this.accept("number")},r.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},r})();function ks(r,e){e===void 0&&(e=Fi);var t={},n=new O_(e.tokens);if(!n.start(r))return null;return o(),t;function o(){n.expect("every");var g=n.acceptNumber();if(g&&(t.interval=parseInt(g[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=U.DAILY,n.nextSymbol()&&(c(),I());break;case"weekday(s)":t.freq=U.WEEKLY,t.byweekday=[U.MO,U.TU,U.WE,U.TH,U.FR],n.nextSymbol(),c(),I();break;case"week(s)":t.freq=U.WEEKLY,n.nextSymbol()&&(a(),c(),I());break;case"hour(s)":t.freq=U.HOURLY,n.nextSymbol()&&(a(),I());break;case"minute(s)":t.freq=U.MINUTELY,n.nextSymbol()&&(a(),I());break;case"month(s)":t.freq=U.MONTHLY,n.nextSymbol()&&(a(),I());break;case"year(s)":t.freq=U.YEARLY,n.nextSymbol()&&(a(),I());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=U.WEEKLY;var v=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[U[v]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=f();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(U[y]),n.nextSymbol()}c(),b(),I();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(t.freq=U.YEARLY,t.bymonth=[u()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var w=u();if(!w)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(w),n.nextSymbol()}a(),I();break;default:throw new Error("Unknown symbol")}}function a(){var g=n.accept("on"),v=n.accept("the");if(g||v)do{var y=p(),w=f(),x=u();if(y)w?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(U[w].nth(y))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(y),n.accept("day(s)"));else if(w)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(U[w]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[U.MO,U.TU,U.WE,U.TH,U.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var k=n.acceptNumber();if(!k)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(k[0],10)];n.accept("comma");){if(k=n.acceptNumber(),!k)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(k[0],10))}}else if(x)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(x);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function c(){var g=n.accept("at");if(g)do{var v=n.acceptNumber();if(!v)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(v[0],10)];n.accept("comma");){if(v=n.acceptNumber(),!v)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(v[0],10))}}while(n.accept("comma")||n.accept("at"))}function u(){switch(n.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 f(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function p(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var g=parseInt(n.value[1],10);if(g<-366||g>366)throw new Error("Nth out of range: "+g);return n.nextSymbol(),n.accept("last")?-g:g;default:return!1}}function b(){n.accept("on"),n.accept("the");var g=p();if(g)for(t.bymonthday=[g],n.nextSymbol();n.accept("comma");){if(g=p(),!g)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(g),n.nextSymbol()}}function I(){if(n.symbol==="until"){var g=Date.parse(n.text);if(!g)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(g)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ue;(function(r){r[r.YEARLY=0]="YEARLY",r[r.MONTHLY=1]="MONTHLY",r[r.WEEKLY=2]="WEEKLY",r[r.DAILY=3]="DAILY",r[r.HOURLY=4]="HOURLY",r[r.MINUTELY=5]="MINUTELY",r[r.SECONDLY=6]="SECONDLY"})(ue||(ue={}));function Rs(r){return r12){var n=Math.floor(this.month/12),o=Wt(this.month,12);this.month=o,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(t,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+t*7:this.day+=-(this.getWeekday()-n)+t*7,this.fixDay()},e.prototype.addDaily=function(t){this.day+=t,this.fixDay()},e.prototype.addHours=function(t,n,o){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var a=Ua(this.hour,24),c=a.div,u=a.mod;if(c&&(this.hour=u,this.addDaily(c)),ar(o)||be(o,this.hour))break}},e.prototype.addMinutes=function(t,n,o,a){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var c=Ua(this.minute,60),u=c.div,f=c.mod;if(u&&(this.minute=f,this.addHours(u,!1,o)),(ar(o)||be(o,this.hour))&&(ar(a)||be(a,this.minute)))break}},e.prototype.addSeconds=function(t,n,o,a,c){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var u=Ua(this.second,60),f=u.div,p=u.mod;if(f&&(this.second=p,this.addMinutes(f,!1,o,a)),(ar(o)||be(o,this.hour))&&(ar(a)||be(a,this.minute))&&(ar(c)||be(c,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=ic(this.year,this.month-1)[1];if(!(this.day<=t))for(;this.day>t;){if(this.day-=t,++this.month,this.month===13&&(this.month=1,++this.year,this.year>Qa))return;t=ic(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var o=t.freq,a=t.interval,c=t.wkst,u=t.byhour,f=t.byminute,p=t.bysecond;switch(o){case ue.YEARLY:return this.addYears(a);case ue.MONTHLY:return this.addMonths(a);case ue.WEEKLY:return this.addWeekly(a,c);case ue.DAILY:return this.addDaily(a);case ue.HOURLY:return this.addHours(a,n,u);case ue.MINUTELY:return this.addMinutes(a,n,u,f);case ue.SECONDLY:return this.addSeconds(a,n,u,f,p)}},e})(mo);function lc(r){for(var e=[],t=Object.keys(r),n=0,o=t;n=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(e.byweekno||ze(e.byweekno)||ze(e.byyearday)||e.bymonthday||ze(e.bymonthday)||De(e.byweekday)||De(e.byeaster)))switch(e.freq){case U.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case U.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case U.WEEKLY:e.byweekday=[Fn(e.dtstart)];break}if(De(e.bymonth)&&!At(e.bymonth)&&(e.bymonth=[e.bymonth]),De(e.byyearday)&&!At(e.byyearday)&&sr(e.byyearday)&&(e.byyearday=[e.byyearday]),!De(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(At(e.bymonthday)){for(var o=[],a=[],t=0;t0?o.push(n):n<0&&a.push(n)}e.bymonthday=o,e.bynmonthday=a}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(De(e.byweekno)&&!At(e.byweekno)&&(e.byweekno=[e.byweekno]),!De(e.byweekday))e.bynweekday=null;else if(sr(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(rc(e.byweekday))e.byweekday=[rt.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof rt)!e.byweekday.n||e.freq>U.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var c=[],u=[],t=0;tU.MONTHLY?c.push(f.weekday):u.push([f.weekday,f.n])}e.byweekday=ze(c)?c:null,e.bynweekday=ze(u)?u:null}return De(e.byhour)?sr(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq=4?(b=0,p=u.yearlen+Wt(c-e.wkst,7)):p=n-b;for(var I=Math.floor(p/7),g=Wt(p,7),v=Math.floor(I+g/4),y=0;y0&&w<=v){var x=void 0;w>1?(x=b+(w-1)*7,b!==f&&(x-=7-f)):x=b;for(var k=0;k<7&&(u.wnomask[x]=1,x++,u.wdaymask[x]!==e.wkst);k++);}}if(be(e.byweekno,1)){var x=b+v*7;if(b!==f&&(x-=7-f),x=4?(te=0,M=ae+Wt(Z-e.wkst,7)):M=n-b,E=Math.floor(52+Wt(M,7)/4)}if(be(e.byweekno,E))for(var x=0;xa)return En(r);if(E>=t){var Z=Vm(E,e);if(!r.accept(Z)||u&&(--u,!u))return En(r)}}else for(var k=v;ka)return En(r);if(E>=t){var Z=Vm(E,e);if(!r.accept(Z)||u&&(--u,!u))return En(r)}}}if(e.interval===0||(f.add(e,w),f.year>Qa))return En(r);Rs(n)||(b=p.gettimeset(n)(f.hour,f.minute,f.second,0)),p.rebuild(f.year,f.month)}}function nI(r,e,t){var n=t.bymonth,o=t.byweekno,a=t.byweekday,c=t.byeaster,u=t.bymonthday,f=t.bynmonthday,p=t.byyearday;return ze(n)&&!be(n,r.mmask[e])||ze(o)&&!r.wnomask[e]||ze(a)&&!be(a,r.wdaymask[e])||ze(r.nwdaymask)&&!r.nwdaymask[e]||c!==null&&!be(r.eastermask,e)||(ze(u)||ze(f))&&!be(u,r.mdaymask[e])&&!be(f,r.nmdaymask[e])||ze(p)&&(e=r.yearlen&&!be(p,e+1-r.yearlen)&&!be(p,-r.nextyearlen+e-r.yearlen))}function Vm(r,e){return new Ti(r,e.tzid).rezonedDate()}function En(r){return r.getValue()}function iI(r,e,t,n,o){for(var a=!1,c=e;c=U.HOURLY&&ze(o)&&!be(o,e.hour)||n>=U.MINUTELY&&ze(a)&&!be(a,e.minute)||n>=U.SECONDLY&&ze(c)&&!be(c,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var xr={MO:new rt(0),TU:new rt(1),WE:new rt(2),TH:new rt(3),FR:new rt(4),SA:new rt(5),SU:new rt(6)},Ss={freq:ue.YEARLY,dtstart:null,interval:1,wkst:xr.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},km=Object.keys(Ss),U=(function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new Fm,this.origOptions=lc(e);var n=xm(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return ks(e,t)},r.fromText=function(e,t){return _m(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return $a(e,this.options)},r.prototype._cacheGet=function(e,t){return this._cache?this._cache._cacheGet(e,t):!1},r.prototype._cacheAdd=function(e,t,n){if(this._cache)return this._cache._cacheAdd(e,t,n)},r.prototype.all=function(e){if(e)return this._iter(new ac("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new Gn("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,o){if(n===void 0&&(n=!1),!Si(e)||!Si(t))throw new Error("Invalid date passed in to RRule.between");var a={before:t,after:e,inc:n};if(o)return this._iter(new ac("between",a,o));var c=this._cacheGet("between",a);return c===!1&&(c=this._iter(new Gn("between",a)),this._cacheAdd("between",c,a)),c},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!Si(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},o=this._cacheGet("before",n);return o===!1&&(o=this._iter(new Gn("before",n)),this._cacheAdd("before",o,n)),o},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!Si(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},o=this._cacheGet("after",n);return o===!1&&(o=this._iter(new Gn("after",n)),this._cacheAdd("after",o,n)),o},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Gs(this.origOptions)},r.prototype.toText=function(e,t,n){return Im(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return wm(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ue.YEARLY,r.MONTHLY=ue.MONTHLY,r.WEEKLY=ue.WEEKLY,r.DAILY=ue.DAILY,r.HOURLY=ue.HOURLY,r.MINUTELY=ue.MINUTELY,r.SECONDLY=ue.SECONDLY,r.MO=xr.MO,r.TU=xr.TU,r.WE=xr.WE,r.TH=xr.TH,r.FR=xr.FR,r.SA=xr.SA,r.SU=xr.SU,r.parseString=Ts,r.optionsToString=Gs,r})();function Lm(r,e,t,n,o,a){var c={},u=r.accept;function f(g,v){t.forEach(function(y){y.between(g,v,!0).forEach(function(w){c[Number(w)]=!0})})}o.forEach(function(g){var v=new Ti(g,a).rezonedDate();c[Number(v)]=!0}),r.accept=function(g){var v=Number(g);return isNaN(v)?u.call(this,g):!c[v]&&(f(new Date(v-1),new Date(v+1)),!c[v])?(c[v]=!0,u.call(this,g)):!0},r.method==="between"&&(f(r.args.after,r.args.before),r.accept=function(g){var v=Number(g);return c[v]?!0:(c[v]=!0,u.call(this,g))});for(var p=0;p1||o.length||a.length||c.length){var b=new dc(p);return b.dtstart(u),b.tzid(f||void 0),n.forEach(function(g){b.rrule(new U(cc(g,u,f),p))}),o.forEach(function(g){b.rdate(g)}),a.forEach(function(g){b.exrule(new U(cc(g,u,f),p))}),c.forEach(function(g){b.exdate(g)}),e.compatible&&e.dtstart&&b.rdate(u),b}var I=n[0]||{};return new U(cc(I,I.dtstart||e.dtstart||u,I.tzid||e.tzid||f),p)}function Pa(r,e){return e===void 0&&(e={}),aI(r,lI(e))}function cc(r,e,t){return kt(kt({},r),{dtstart:e,tzid:t})}function lI(r){var e=[],t=Object.keys(r),n=Object.keys(Om);if(t.forEach(function(o){be(n,o)||e.push(o)}),e.length)throw new Error("Invalid options: "+e.join(", "));return kt(kt({},Om),r)}function uI(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=pm(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function cI(r){var e=uI(r),t=e.name,n=e.value,o=t.split(";");if(!o)throw new Error("empty property name");return{name:o[0].toUpperCase(),parms:o.slice(1),value:n}}function dI(r,e){if(e===void 0&&(e=!1),r=r&&r.trim(),!r)throw new Error("Invalid empty string");if(!e)return r.split(/\s/);for(var t=r.split(`
`),n=0;n0&&o[0]===" "?(t[n-1]+=o.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function fI(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function $m(r,e){return fI(e),r.split(",").map(function(t){return As(t)})}function Pm(r){var e=this;return function(t){if(t!==void 0&&(e["_".concat(r)]=t),e["_".concat(r)]!==void 0)return e["_".concat(r)];for(var n=0;nt.key.toLowerCase()===e)}firstField(e){var t;return(t=this.fieldsByKey(e)[0])!=null?t:null}hasReminderField(){return this.firstField(this.reminderFieldName)!=null}hasAnySourceField(){return this.hasReminderField()||this.firstField(Gi)!=null}reminderSourceField(){var e;return(e=this.firstField(this.reminderFieldName))!=null?e:this.firstField(Gi)}getTitle(){let e=new Set([...gI,this.reminderFieldName]),t=this.fields().filter(o=>e.has(o.key.toLowerCase())).sort((o,a)=>a.start-o.start),n=this.text;for(let o of t)n=tc(n,o);return n=n.trim(),this.removeTags&&(n=Ja(n)),n}getTime(){let e=this.reminderSourceField();return e==null?null:fc(e.value)}setTime(e){var o;let t=this.reminderSourceField(),n=(o=t==null?void 0:t.key)!=null?o:Gi;this.setFieldValue(n,zm(e))}setRawTime(e){var o;let t=this.reminderSourceField(),n=(o=t==null?void 0:t.key)!=null?o:Gi;return this.setFieldValue(n,e),!0}getDueDate(){let e=this.firstField(Gi);return e==null?null:fc(e.value)}setDueDate(e){this.setFieldValue(Gi,zm(e))}getRecurrence(){var t;let e=this.firstField(Km);return(t=e==null?void 0:e.value)!=null?t:null}getDoneDate(){let e=this.firstField(ja);return e==null?null:fc(e.value)}setDoneDate(e){if(e==null){this.removeFieldByKey(ja);return}let t=e instanceof P?e.format(pc):e;this.setFieldValue(ja,t)}getEndOfTimeTextIndex(){let e=this.reminderSourceField();return e!=null?e.end:this.toMarkdown().length}computeSpan(){let e=this.reminderSourceField();return e==null?{start:0,end:0}:{start:e.start,end:e.end}}toMarkdown(){return this.text}clone(){return r.parse(this.toMarkdown(),this.reminderFieldName,this.removeTags)}setFieldValue(e,t){let n=this.firstField(e);n!=null?this.text=dm(this.text,n,t):this.text=fm(this.text,e,t,"bracket")}removeFieldByKey(e){let t=this.firstField(e);t!=null&&(this.text=tc(this.text,t))}},qa=class qa extends ho{parseReminder(e){let t=za.parse(e.body,this.reminderFieldName(),this.removeTagsEnabled());return t.hasAnySourceField()?t:null}reminderFieldName(){return this.config.getParameter(Qe.dataviewReminderFieldName)}removeTagsEnabled(){return this.config.getParameter(Qe.removeTagsForTasksPlugin)}usesSeparateReminderDate(e){return e.hasReminderField()}newReminder(e,t){let n=za.parse(e,this.reminderFieldName(),this.removeTagsEnabled());return n.setTime(t),n}};h(qa,"instance",new qa);var Ka=qa;var qm=Nr(wr(),1);var Kr=class Kr{constructor(e,t,n,o,a=null){h(this,"linkDatesToDailyNotes",e);h(this,"title1",t);h(this,"time",n);h(this,"title2",o);h(this,"recurrence",a)}static parse(e,t){t==null&&(t=!1);let n=Kr.regexp.exec(e);if(n==null)return null;let o=n.groups.title1,a=n.groups.time;if(a==null)return null;let c=n.groups.title2;t&&(a=a.replace("[[",""),a=a.replace("]]",""));let u=null,f=a.indexOf(Kr.recurrenceSymbol);if(f>=0){let p=a.substring(0,f).trim(),b=a.substring(f+Kr.recurrenceSymbol.length).trim();b!==""&&(a=p,u=b)}return new Kr(t,o,a,c,u)}getTitle(){return`${this.title1.trim()} ${this.title2.trim()}`.trim()}getTime(){return Jr.parse(this.time)}setTime(e){this.time=Jr.toString(e)}setRawTime(e){return this.time=e,!0}getEndOfTimeTextIndex(){return this.toMarkdown().length-this.title2.length}computeSpan(){let e=this.title1.length,t=this.computeGroupText();return{start:e,end:e+t.length}}toMarkdown(){return`${this.title1}${this.computeGroupText()}${this.title2}`}computeGroupText(){let e=this.recurrence!==null?`${this.time} ${Kr.recurrenceSymbol}${this.recurrence}`:this.time;return`(@${this.renderTimeText(e)})`}renderTimeText(e){if(!this.linkDatesToDailyNotes)return e;let t=Jr.parse(this.time);if(!t)return e;let n=Jr.toString(t.clone(!1));return e.replace(n,`[[${n}]]`)}clone(){return Kr.parse(this.toMarkdown(),this.linkDatesToDailyNotes)}};h(Kr,"regexp",/^(?.*?)\(@(?