/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source visit the plugins github repository
*/

/*
License obsidian-tasks:
MIT License

Copyright (c) 2021 Martin Schenck and Clare Macrae

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

/*
License rrule (included library):
rrule.js: Library for working with recurrence rules for calendar dates.
=======================================================================

Copyright 2010, Jakub Roztocil <jakub@roztocil.name> and Lars Schöning

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice,
       this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.

    3. Neither the name of The author nor the names of its contributors may
       be used to endorse or promote products derived from this software
       without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



./rrule.js and ./test/tests.js is based on python-dateutil. LICENCE:

python-dateutil - Extensions to the standard Python datetime module.
====================================================================

Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>
Copyright (c) 2012 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
    * Neither the name of the copyright holder nor the names of its
      contributors may be used to endorse or promote products derived from
      this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/*
License chrono-node (included library):
The MIT License

Copyright (c) 2014, Wanasit Tanakitrungruang

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

"use strict";var uv=Object.create;var os=Object.defineProperty,lv=Object.defineProperties,cv=Object.getOwnPropertyDescriptor,dv=Object.getOwnPropertyDescriptors,fv=Object.getOwnPropertyNames,rh=Object.getOwnPropertySymbols,pv=Object.getPrototypeOf,ih=Object.prototype.hasOwnProperty,hv=Object.prototype.propertyIsEnumerable;var nh=(r,e,t)=>e in r?os(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,we=(r,e)=>{for(var t in e||(e={}))ih.call(e,t)&&nh(r,t,e[t]);if(rh)for(var t of rh(e))hv.call(e,t)&&nh(r,t,e[t]);return r},it=(r,e)=>lv(r,dv(e));var _=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),mv=(r,e)=>{for(var t in e)os(r,t,{get:e[t],enumerable:!0})},sh=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fv(e))!ih.call(r,i)&&i!==t&&os(r,i,{get:()=>e[i],enumerable:!(n=cv(e,i))||n.enumerable});return r};var us=(r,e,t)=>(t=r!=null?uv(pv(r)):{},sh(e||!r||!r.__esModule?os(t,"default",{value:r,enumerable:!0}):t,r)),gv=r=>sh(os({},"__esModule",{value:!0}),r);var F=(r,e,t)=>new Promise((n,i)=>{var s=u=>{try{o(t.next(u))}catch(l){i(l)}},a=u=>{try{o(t.throw(u))}catch(l){i(l)}},o=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,a);o((t=t.apply(r,e)).next())});var Ee=_(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.matchAnyPattern=rn.extractTerms=rn.repeatedTimeunitPattern=void 0;function _v(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}rn.repeatedTimeunitPattern=_v;function ah(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}rn.extractTerms=ah;function vv(r){return`(?:${ah(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}rn.matchAnyPattern=vv});var ye=_((Qu,Xu)=>{(function(r,e){typeof Qu=="object"&&typeof Xu!="undefined"?Xu.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Qu,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",i="second",s="minute",a="hour",o="day",u="week",l="month",c="quarter",f="year",h="date",T="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},C=function(B,A,E){var H=String(B);return!H||H.length>=A?B:""+Array(A+1-H.length).join(E)+B},N={s:C,z:function(B){var A=-B.utcOffset(),E=Math.abs(A),H=Math.floor(E/60),P=E%60;return(A<=0?"+":"-")+C(H,2,"0")+":"+C(P,2,"0")},m:function B(A,E){if(A.date()<E.date())return-B(E,A);var H=12*(E.year()-A.year())+(E.month()-A.month()),P=A.clone().add(H,l),Z=E-P<0,d=A.clone().add(H+(Z?-1:1),l);return+(-(H+(E-P)/(Z?P-d:d-P))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:l,y:f,w:u,d:o,D:h,h:a,m:s,s:i,ms:n,Q:c}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},L="en",oe={};oe[L]=D;var z=function(B){return B instanceof Ne},ie=function(B,A,E){var H;if(!B)return L;if(typeof B=="string")oe[B]&&(H=B),A&&(oe[B]=A,H=B);else{var P=B.name;oe[P]=B,H=P}return!E&&H&&(L=H),H||!E&&L},G=function(B,A){if(z(B))return B.clone();var E=typeof A=="object"?A:{};return E.date=B,E.args=arguments,new Ne(E)},j=N;j.l=ie,j.i=z,j.w=function(B,A){return G(B,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var Ne=function(){function B(E){this.$L=ie(E.locale,null,!0),this.parse(E)}var A=B.prototype;return A.parse=function(E){this.$d=function(H){var P=H.date,Z=H.utc;if(P===null)return new Date(NaN);if(j.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var d=P.match(y);if(d){var p=d[2]-1||0,m=(d[7]||"0").substring(0,3);return Z?new Date(Date.UTC(d[1],p,d[3]||1,d[4]||0,d[5]||0,d[6]||0,m)):new Date(d[1],p,d[3]||1,d[4]||0,d[5]||0,d[6]||0,m)}}return new Date(P)}(E),this.$x=E.x||{},this.init()},A.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},A.$utils=function(){return j},A.isValid=function(){return this.$d.toString()!==T},A.isSame=function(E,H){var P=G(E);return this.startOf(H)<=P&&P<=this.endOf(H)},A.isAfter=function(E,H){return G(E)<this.startOf(H)},A.isBefore=function(E,H){return this.endOf(H)<G(E)},A.$g=function(E,H,P){return j.u(E)?this[H]:this.set(P,E)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(E,H){var P=this,Z=!!j.u(H)||H,d=j.p(E),p=function(O,I){var me=j.w(P.$u?Date.UTC(P.$y,I,O):new Date(P.$y,I,O),P);return Z?me:me.endOf(o)},m=function(O,I){return j.w(P.toDate()[O].apply(P.toDate("s"),(Z?[0,0,0,0]:[23,59,59,999]).slice(I)),P)},g=this.$W,b=this.$M,v=this.$D,k="set"+(this.$u?"UTC":"");switch(d){case f:return Z?p(1,0):p(31,11);case l:return Z?p(1,b):p(0,b+1);case u:var x=this.$locale().weekStart||0,S=(g<x?g+7:g)-x;return p(Z?v-S:v+(6-S),b);case o:case h:return m(k+"Hours",0);case a:return m(k+"Minutes",1);case s:return m(k+"Seconds",2);case i:return m(k+"Milliseconds",3);default:return this.clone()}},A.endOf=function(E){return this.startOf(E,!1)},A.$set=function(E,H){var P,Z=j.p(E),d="set"+(this.$u?"UTC":""),p=(P={},P[o]=d+"Date",P[h]=d+"Date",P[l]=d+"Month",P[f]=d+"FullYear",P[a]=d+"Hours",P[s]=d+"Minutes",P[i]=d+"Seconds",P[n]=d+"Milliseconds",P)[Z],m=Z===o?this.$D+(H-this.$W):H;if(Z===l||Z===f){var g=this.clone().set(h,1);g.$d[p](m),g.init(),this.$d=g.set(h,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},A.set=function(E,H){return this.clone().$set(E,H)},A.get=function(E){return this[j.p(E)]()},A.add=function(E,H){var P,Z=this;E=Number(E);var d=j.p(H),p=function(b){var v=G(Z);return j.w(v.date(v.date()+Math.round(b*E)),Z)};if(d===l)return this.set(l,this.$M+E);if(d===f)return this.set(f,this.$y+E);if(d===o)return p(1);if(d===u)return p(7);var m=(P={},P[s]=e,P[a]=t,P[i]=r,P)[d]||1,g=this.$d.getTime()+E*m;return j.w(g,this)},A.subtract=function(E,H){return this.add(-1*E,H)},A.format=function(E){var H=this,P=this.$locale();if(!this.isValid())return P.invalidDate||T;var Z=E||"YYYY-MM-DDTHH:mm:ssZ",d=j.z(this),p=this.$H,m=this.$m,g=this.$M,b=P.weekdays,v=P.months,k=function(I,me,se,te){return I&&(I[me]||I(H,Z))||se[me].substr(0,te)},x=function(I){return j.s(p%12||12,I,"0")},S=P.meridiem||function(I,me,se){var te=I<12?"AM":"PM";return se?te.toLowerCase():te},O={YY:String(this.$y).slice(-2),YYYY:this.$y,M:g+1,MM:j.s(g+1,2,"0"),MMM:k(P.monthsShort,g,v,3),MMMM:k(v,g),D:this.$D,DD:j.s(this.$D,2,"0"),d:String(this.$W),dd:k(P.weekdaysMin,this.$W,b,2),ddd:k(P.weekdaysShort,this.$W,b,3),dddd:b[this.$W],H:String(p),HH:j.s(p,2,"0"),h:x(1),hh:x(2),a:S(p,m,!0),A:S(p,m,!1),m:String(m),mm:j.s(m,2,"0"),s:String(this.$s),ss:j.s(this.$s,2,"0"),SSS:j.s(this.$ms,3,"0"),Z:d};return Z.replace(w,function(I,me){return me||O[I]||d.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(E,H,P){var Z,d=j.p(H),p=G(E),m=(p.utcOffset()-this.utcOffset())*e,g=this-p,b=j.m(this,p);return b=(Z={},Z[f]=b/12,Z[l]=b,Z[c]=b/3,Z[u]=(g-m)/6048e5,Z[o]=(g-m)/864e5,Z[a]=g/t,Z[s]=g/e,Z[i]=g/r,Z)[d]||g,P?b:j.a(b)},A.daysInMonth=function(){return this.endOf(l).$D},A.$locale=function(){return oe[this.$L]},A.locale=function(E,H){if(!E)return this.$L;var P=this.clone(),Z=ie(E,H,!0);return Z&&(P.$L=Z),P},A.clone=function(){return j.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},B}(),Le=Ne.prototype;return G.prototype=Le,[["$ms",n],["$s",i],["$m",s],["$H",a],["$W",o],["$M",l],["$y",f],["$D",h]].forEach(function(B){Le[B[1]]=function(A){return this.$g(A,B[0],B[1])}}),G.extend=function(B,A){return B.$i||(B(A,Ne,G),B.$i=!0),G},G.locale=ie,G.isDayjs=z,G.unix=function(B){return G(1e3*B)},G.en=oe[L],G.Ls=oe,G.p={},G})});var st=_(nn=>{"use strict";var wv=nn&&nn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nn,"__esModule",{value:!0});nn.findYearClosestToRef=nn.findMostLikelyADYear=void 0;var Ev=wv(ye());function kv(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}nn.findMostLikelyADYear=kv;function Sv(r,e,t){let n=Ev.default(r),i=n;i=i.month(t-1),i=i.date(e),i=i.year(n.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(n))<Math.abs(i.diff(n))?i=s:Math.abs(a.diff(n))<Math.abs(i.diff(n))&&(i=a),i.year()}nn.findYearClosestToRef=Sv});var at=_(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.parseTimeUnits=re.TIME_UNITS_PATTERN=re.parseYear=re.YEAR_PATTERN=re.parseOrdinalNumberPattern=re.ORDINAL_NUMBER_PATTERN=re.parseNumberPattern=re.NUMBER_PATTERN=re.TIME_UNIT_DICTIONARY=re.ORDINAL_WORD_DICTIONARY=re.INTEGER_WORD_DICTIONARY=re.MONTH_DICTIONARY=re.FULL_MONTH_NAME_DICTIONARY=re.WEEKDAY_DICTIONARY=void 0;var Ya=Ee(),Ov=st();re.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};re.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};re.MONTH_DICTIONARY=Object.assign(Object.assign({},re.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});re.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};re.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};re.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};re.NUMBER_PATTERN=`(?:${Ya.matchAnyPattern(re.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function uh(r){let e=r.toLowerCase();return re.INTEGER_WORD_DICTIONARY[e]!==void 0?re.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}re.parseNumberPattern=uh;re.ORDINAL_NUMBER_PATTERN=`(?:${Ya.matchAnyPattern(re.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function Dv(r){let e=r.toLowerCase();return re.ORDINAL_WORD_DICTIONARY[e]!==void 0?re.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}re.parseOrdinalNumberPattern=Dv;re.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function xv(r){if(/BE/i.test(r))return r=r.replace(/BE/i,""),parseInt(r)-543;if(/BCE?/i.test(r))return r=r.replace(/BCE?/i,""),-parseInt(r);if(/(AD|CE)/i.test(r))return r=r.replace(/(AD|CE)/i,""),parseInt(r);let e=parseInt(r);return Ov.findMostLikelyADYear(e)}re.parseYear=xv;var lh=`(${re.NUMBER_PATTERN})\\s{0,3}(${Ya.matchAnyPattern(re.TIME_UNIT_DICTIONARY)})`,oh=new RegExp(lh,"i");re.TIME_UNITS_PATTERN=Ya.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",lh);function Rv(r){let e={},t=r,n=oh.exec(t);for(;n;)Mv(e,n),t=t.substring(n[0].length).trim(),n=oh.exec(t);return e}re.parseTimeUnits=Rv;function Mv(r,e){let t=uh(e[1]),n=re.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var ch=_((Zu,Ju)=>{(function(r,e){typeof Zu=="object"&&typeof Ju!="undefined"?Ju.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Zu,function(){"use strict";var r="month",e="quarter";return function(t,n){var i=n.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,u){return o=Number(o),this.$utils().p(u)===e?this.add(3*o,r):s.bind(this)(o,u)};var a=i.startOf;i.startOf=function(o,u){var l=this.$utils(),c=!!l.u(u)||u;if(l.p(o)===e){var f=this.quarter()-1;return c?this.month(3*f).startOf(r).startOf("day"):this.month(3*f+2).endOf(r).endOf("day")}return a.bind(this)(o,u)}}})});var jt=_(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.implySimilarTime=gr.assignSimilarTime=gr.assignSimilarDate=gr.assignTheNextDay=void 0;var dh=Be();function Cv(r,e){e=e.add(1,"day"),fh(r,e),ph(r,e)}gr.assignTheNextDay=Cv;function fh(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}gr.assignSimilarDate=fh;function Av(r,e){r.assign("hour",e.hour()),r.assign("minute",e.minute()),r.assign("second",e.second()),r.assign("millisecond",e.millisecond()),r.get("hour")<12?r.assign("meridiem",dh.Meridiem.AM):r.assign("meridiem",dh.Meridiem.PM)}gr.assignSimilarTime=Av;function ph(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}gr.implySimilarTime=ph});var hh=_(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.toTimezoneOffset=On.TIMEZONE_ABBR_MAP=void 0;On.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function Pv(r){var e;return r==null?null:typeof r=="number"?r:(e=On.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}On.toTimezoneOffset=Pv});var Ie=_(yr=>{"use strict";var mh=yr&&yr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(yr,"__esModule",{value:!0});yr.ParsingResult=yr.ParsingComponents=yr.ReferenceWithTimezone=void 0;var Nv=mh(ch()),Ga=mh(ye()),el=jt(),Iv=hh();Ga.default.extend(Nv.default);var tl=class{constructor(e){var t;e=e!=null?e:new Date,e instanceof Date?this.instant=e:(this.instant=(t=e.instant)!==null&&t!==void 0?t:new Date,this.timezoneOffset=Iv.toTimezoneOffset(e.timezone))}};yr.ReferenceWithTimezone=tl;var Dn=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let i in t)this.knownValues[i]=t[i];let n=Ga.default(e.instant);this.imply("day",n.date()),this.imply("month",n.month()+1),this.imply("year",n.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues?this:(this.impliedValues[e]=t,this)}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}delete(e){delete this.knownValues[e],delete this.impliedValues[e]}clone(){let e=new Dn(this.reference);e.knownValues={},e.impliedValues={};for(let t in this.knownValues)e.knownValues[t]=this.knownValues[t];for(let t in this.impliedValues)e.impliedValues[t]=this.impliedValues[t];return e}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get("year")||e.getMonth()!==this.get("month")-1||e.getDate()!==this.get("day")||this.get("hour")!=null&&e.getHours()!=this.get("hour")||this.get("minute")!=null&&e.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return Ga.default(this.date())}date(){let e=this.dateWithoutTimezoneAdjustment();return new Date(e.getTime()+this.getSystemTimezoneAdjustmentMinute(e)*6e4)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return e.setFullYear(this.get("year")),e}getSystemTimezoneAdjustmentMinute(e){var t,n;(!e||e.getTime()<0)&&(e=new Date);let i=-e.getTimezoneOffset(),s=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:i;return i-s}static createRelativeFromReference(e,t){let n=Ga.default(e.instant);for(let s in t)n=n.add(t[s],s);let i=new Dn(e);return t.hour||t.minute||t.second?(el.assignSimilarTime(i,n),el.assignSimilarDate(i,n),e.timezoneOffset!==null&&i.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(el.implySimilarTime(i,n),e.timezoneOffset!==null&&i.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(i.assign("day",n.date()),i.assign("month",n.month()+1),i.assign("year",n.year())):(t.week&&i.imply("weekday",n.day()),i.imply("day",n.date()),t.month?(i.assign("month",n.month()+1),i.assign("year",n.year())):(i.imply("month",n.month()+1),t.year?i.assign("year",n.year()):i.imply("year",n.year())))),i}};yr.ParsingComponents=Dn;var ls=class{constructor(e,t,n,i,s){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=i||new Dn(e),this.end=s}clone(){let e=new ls(this.reference,this.index,this.text);return e.start=this.start?this.start.clone():null,e.end=this.end?this.end.clone():null,e}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};yr.ParsingResult=ls});var W=_(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.AbstractParserWithWordBoundaryChecking=void 0;var rl=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(e){let t=this.innerPattern(e);return t==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${t.source}`,t.flags),this.cachedInnerPattern=t,this.cachedPattern)}extract(e,t){var n;let i=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+i.length,t[0]=t[0].substring(i.length);for(let s=2;s<t.length;s++)t[s-1]=t[s];return this.innerExtract(e,t)}};ja.AbstractParserWithWordBoundaryChecking=rl});var gh=_(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});var il=at(),Fv=Ie(),Lv=W(),Uv=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${il.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),qv=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${il.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),nl=class extends Lv.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?qv:Uv}innerExtract(e,t){let n=il.parseTimeUnits(t[1]);return Fv.ParsingComponents.createRelativeFromReference(e.reference,n)}};sl.default=nl});var wh=_(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var Wv=st(),_h=at(),vh=at(),Ba=at(),$v=Ee(),Yv=W(),Gv=new RegExp(`(?:on\\s{0,3})?(${Ba.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Ba.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${$v.matchAnyPattern(_h.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${vh.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),yh=1,Th=2,jv=3,bh=4,al=class extends Yv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Gv}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=_h.MONTH_DICTIONARY[t[jv].toLowerCase()],s=Ba.parseOrdinalNumberPattern(t[yh]);if(s>31)return t.index=t.index+t[yh].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[bh]){let a=vh.parseYear(t[bh]);n.start.assign("year",a)}else{let a=Wv.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Th]){let a=Ba.parseOrdinalNumberPattern(t[Th]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};ol.default=al});var Dh=_(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});var Bv=st(),Sh=at(),Ha=at(),Oh=at(),Hv=Ee(),zv=W(),Vv=new RegExp(`(${Hv.matchAnyPattern(Sh.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Ha.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Ha.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Oh.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),Kv=1,Qv=2,Eh=3,kh=4,ul=class extends zv.AbstractParserWithWordBoundaryChecking{innerPattern(){return Vv}innerExtract(e,t){let n=Sh.MONTH_DICTIONARY[t[Kv].toLowerCase()],i=Ha.parseOrdinalNumberPattern(t[Qv]);if(i>31)return null;let s=e.createParsingComponents({day:i,month:n});if(t[kh]){let u=Oh.parseYear(t[kh]);s.assign("year",u)}else{let u=Bv.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[Eh])return s;let a=Ha.parseOrdinalNumberPattern(t[Eh]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};ll.default=ul});var Mh=_(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});var cl=at(),Xv=st(),Zv=Ee(),Rh=at(),Jv=W(),ew=new RegExp(`((?:in)\\s*)?(${Zv.matchAnyPattern(cl.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Rh.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),tw=1,rw=2,xh=3,dl=class extends Jv.AbstractParserWithWordBoundaryChecking{innerPattern(){return ew}innerExtract(e,t){let n=t[rw].toLowerCase();if(t[0].length<=3&&!cl.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index+(t[tw]||"").length,t.index+t[0].length);i.start.imply("day",1);let s=cl.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[xh]){let a=Rh.parseYear(t[xh]);i.start.assign("year",a)}else{let a=Xv.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};fl.default=dl});var Ph=_(hl=>{"use strict";Object.defineProperty(hl,"__esModule",{value:!0});var Ah=at(),nw=Ee(),iw=W(),sw=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${nw.matchAnyPattern(Ah.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),aw=1,ow=2,Ch=3,uw=4,pl=class extends iw.AbstractParserWithWordBoundaryChecking{innerPattern(){return sw}innerExtract(e,t){let n=t[Ch]?parseInt(t[Ch]):Ah.MONTH_DICTIONARY[t[ow].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[aw]);return{day:parseInt(t[uw]),month:n,year:i}}};hl.default=pl});var Nh=_(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});var lw=W(),cw=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),dw=1,fw=2,ml=class extends lw.AbstractParserWithWordBoundaryChecking{innerPattern(){return cw}innerExtract(e,t){let n=parseInt(t[fw]),i=parseInt(t[dw]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};gl.default=ml});var xn=_(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.AbstractTimeExpressionParser=void 0;var wt=Be();function pw(r,e,t,n){return new RegExp(`${r}${e}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,n)}function hw(r,e){return new RegExp(`^(${r})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,"i")}var Ih=2,li=3,za=4,Va=5,cs=6,yl=class{constructor(e=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=e}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t.index+=t[0].length,null;let i=t.index+t[1].length,s=t[0].substring(t[1].length),a=e.createParsingResult(i,s,n);t.index+=t[0].length;let o=e.text.substring(t.index),l=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&l&&l[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!l||l[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,l,a),a.end&&(a.text+=l[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,n=!1){let i=e.createParsingComponents(),s=0,a=null,o=parseInt(t[Ih]);if(o>100){if(this.strictMode||t[li]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(t[li]!=null){if(t[li].length==1&&!t[cs])return null;s=parseInt(t[li])}if(s>=60)return null;if(o>12&&(a=wt.Meridiem.PM),t[cs]!=null){if(o>12)return null;let u=t[cs][0].toLowerCase();u=="a"&&(a=wt.Meridiem.AM,o==12&&(o=0)),u=="p"&&(a=wt.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",wt.Meridiem.AM):i.imply("meridiem",wt.Meridiem.PM),t[Va]!=null){let u=parseInt(t[Va].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[za]!=null){let u=parseInt(t[za]);if(u>=60)return null;i.assign("second",u)}return i}extractFollowingTimeComponents(e,t,n){let i=e.createParsingComponents();if(t[Va]!=null){let u=parseInt(t[Va].substring(0,3));if(u>=1e3)return null;i.assign("millisecond",u)}if(t[za]!=null){let u=parseInt(t[za]);if(u>=60)return null;i.assign("second",u)}let s=parseInt(t[Ih]),a=0,o=-1;if(t[li]!=null?a=parseInt(t[li]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=wt.Meridiem.PM),t[cs]!=null){if(s>12)return null;let u=t[cs][0].toLowerCase();u=="a"&&(o=wt.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),u=="p"&&(o=wt.Meridiem.PM,s!=12&&(s+=12)),n.start.isCertain("meridiem")||(o==wt.Meridiem.AM?(n.start.imply("meridiem",wt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",wt.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>s?i.imply("meridiem",wt.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",wt.Meridiem.PM)):s>12?i.imply("meridiem",wt.Meridiem.PM):s<=12&&i.imply("meridiem",wt.Meridiem.AM),i.date().getTime()<n.start.date().getTime()&&i.imply("day",i.get("day")+1),i}checkAndReturnWithoutFollowingPattern(e){if(e.text.match(/^\d$/)||e.text.match(/^\d\d\d+$/)||e.text.match(/\d[apAP]$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)$/);if(t){let n=t[1];if(this.strictMode||n.includes(".")&&!n.match(/\d(\.\d{2})+$/)||parseInt(n)>24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let n=t[1],i=t[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(n);if(s>24||a>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=pw(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=hw(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};Ka.AbstractTimeExpressionParser=yl});var Fh=_(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var Qa=Be(),mw=xn(),Tl=class extends mw.AbstractTimeExpressionParser{constructor(e){super(e)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("night")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Qa.Meridiem.PM)):i<6&&n.assign("meridiem",Qa.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Qa.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",Qa.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};bl.default=Tl});var Bt=_(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.addImpliedTimeUnits=ci.reverseTimeUnits=void 0;function gw(r){let e={};for(let t in r)e[t]=-r[t];return e}ci.reverseTimeUnits=gw;function yw(r,e){let t=r.clone(),n=r.dayjs();for(let i in e)n=n.add(e[i],i);return("day"in e||"d"in e||"week"in e||"month"in e||"year"in e)&&(t.imply("day",n.date()),t.imply("month",n.month()+1),t.imply("year",n.year())),("second"in e||"minute"in e||"hour"in e)&&(t.imply("second",n.second()),t.imply("minute",n.minute()),t.imply("hour",n.hour())),t}ci.addImpliedTimeUnits=yw});var Lh=_(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});var vl=at(),Tw=Ie(),bw=W(),_w=Bt(),vw=new RegExp(`(${vl.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),ww=new RegExp(`(${vl.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),_l=class extends bw.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?ww:vw}innerExtract(e,t){let n=vl.parseTimeUnits(t[1]),i=_w.reverseTimeUnits(n);return Tw.ParsingComponents.createRelativeFromReference(e.reference,i)}};wl.default=_l});var Uh=_(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});var kl=at(),Ew=Ie(),kw=W(),Sw=new RegExp(`(${kl.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),Ow=new RegExp("("+kl.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Dw=1,El=class extends kw.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Ow:Sw}innerExtract(e,t){let n=kl.parseTimeUnits(t[Dw]);return Ew.ParsingComponents.createRelativeFromReference(e.reference,n)}};Sl.default=El});var fi=_(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.MergingRefiner=di.Filter=void 0;var Ol=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};di.Filter=Ol;var Dl=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0],s=null;for(let a=1;a<t.length;a++){s=t[a];let o=e.text.substring(i.index+i.text.length,s.index);if(!this.shouldMergeResults(o,i,s,e))n.push(i),i=s;else{let u=i,l=s,c=this.mergeResults(o,u,l,e);e.debug(()=>{console.log(`${this.constructor.name} merged ${u} and ${l} into ${c}`)}),i=c}}return i!=null&&n.push(i),n}};di.MergingRefiner=Dl});var Tr=_(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});var xw=fi(),xl=class extends xw.MergingRefiner{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(s=>{t.start.isCertain(s)||t.start.assign(s,n.start.get(s))}),t.start.getCertainComponents().forEach(s=>{n.start.isCertain(s)||n.start.assign(s,t.start.get(s))})),t.start.date().getTime()>n.start.date().getTime()){let s=t.start.dayjs(),a=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),t.start.imply("day",s.date()),t.start.imply("month",s.month()+1),t.start.imply("year",s.year())):n.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())):[n,t]=[t,n]}let i=t.clone();return i.start=t.start,i.end=n.start,i.index=Math.min(t.index,n.index),t.index<n.index?i.text=t.text+e+n.text:i.text=n.text+e+t.text,i}};Rl.default=xl});var qh=_(ds=>{"use strict";var Rw=ds&&ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ds,"__esModule",{value:!0});var Mw=Rw(Tr()),Ml=class extends Mw.default{patternBetween(){return/^\s*(to|-)\s*$/i}};ds.default=Ml});var Wh=_(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.mergeDateTimeComponent=pi.mergeDateTimeResult=void 0;var Cw=Be();function Aw(r,e){let t=r.clone(),n=r.start,i=e.start;if(t.start=Cl(n,i),r.end!=null||e.end!=null){let s=r.end==null?r.start:r.end,a=e.end==null?e.start:e.end,o=Cl(s,a);r.end==null&&o.date().getTime()<t.start.date().getTime()&&(o.isCertain("day")?o.assign("day",o.get("day")+1):o.imply("day",o.get("day")+1)),t.end=o}return t}pi.mergeDateTimeResult=Aw;function Cl(r,e){let t=r.clone();return e.isCertain("hour")?(t.assign("hour",e.get("hour")),t.assign("minute",e.get("minute")),e.isCertain("second")?(t.assign("second",e.get("second")),e.isCertain("millisecond")?t.assign("millisecond",e.get("millisecond")):t.imply("millisecond",e.get("millisecond"))):(t.imply("second",e.get("second")),t.imply("millisecond",e.get("millisecond")))):(t.imply("hour",e.get("hour")),t.imply("minute",e.get("minute")),t.imply("second",e.get("second")),t.imply("millisecond",e.get("millisecond"))),e.isCertain("timezoneOffset")&&t.assign("timezoneOffset",e.get("timezoneOffset")),e.isCertain("meridiem")?t.assign("meridiem",e.get("meridiem")):e.get("meridiem")!=null&&t.get("meridiem")==null&&t.imply("meridiem",e.get("meridiem")),t.get("meridiem")==Cw.Meridiem.PM&&t.get("hour")<12&&(e.isCertain("hour")?t.assign("hour",t.get("hour")+12):t.imply("hour",t.get("hour")+12)),t}pi.mergeDateTimeComponent=Cl});var Cr=_(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var Pw=fi(),$h=Wh(),Al=class extends Pw.MergingRefiner{shouldMergeResults(e,t,n){return(t.start.isOnlyDate()&&n.start.isOnlyTime()||n.start.isOnlyDate()&&t.start.isOnlyTime())&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){let i=t.start.isOnlyDate()?$h.mergeDateTimeResult(t,n):$h.mergeDateTimeResult(n,t);return i.index=t.index,i.text=t.text+e+n.text,i}};Pl.default=Al});var Yh=_(fs=>{"use strict";var Nw=fs&&fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fs,"__esModule",{value:!0});var Iw=Nw(Cr()),Nl=class extends Iw.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};fs.default=Nl});var Gh=_(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var Fw=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),Lw={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:240,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360},Il=class{constructor(e){this.timezone=Object.assign(Object.assign({},Lw),e)}refine(e,t){var n;let i=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(s=>{var a,o;let u=e.text.substring(s.index+s.text.length),l=Fw.exec(u);if(!l)return;let c=l[1].toUpperCase(),f=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(f===null)return;e.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${f} for: ${s.start}`)});let h=s.start.get("timezoneOffset");h!==null&&f!=h&&(s.start.isCertain("timezoneOffset")||c!=l[1])||s.start.isOnlyDate()&&c!=l[1]||(s.text+=l[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",f),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",f))}),t}};Fl.default=Il});var Xa=_(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var Uw=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),qw=1,Ww=2,$w=3,Ll=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let i=e.text.substring(n.index+n.text.length),s=Uw.exec(i);if(!s)return;e.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${n}`)});let a=parseInt(s[Ww]),o=parseInt(s[$w]||"0"),u=a*60+o;u>14*60||(s[qw]==="-"&&(u=-u),n.end!=null&&n.end.assign("timezoneOffset",u),n.start.assign("timezoneOffset",u),n.text+=s[0])}),t}};Ul.default=Ll});var jh=_(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});var ql=class{refine(e,t){if(t.length<2)return t;let n=[],i=t[0];for(let s=1;s<t.length;s++){let a=t[s];a.index<i.index+i.text.length?a.text.length>i.text.length&&(i=a):(n.push(i),i=a)}return i!=null&&n.push(i),n}};Wl.default=ql});var Bh=_(ps=>{"use strict";var Yw=ps&&ps.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ps,"__esModule",{value:!0});var Gw=Yw(ye()),$l=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let i=Gw.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&i.isAfter(n.start.dayjs()))for(let s=0;s<3&&i.isAfter(n.start.dayjs());s++)n.start.imply("year",n.start.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.start})`)}),n.end&&!n.end.isCertain("year")&&(n.end.imply("year",n.end.get("year")+1),e.debug(()=>{console.log(`Forward yearly adjusted for ${n} (${n.end})`)}));n.start.isOnlyWeekdayComponent()&&i.isAfter(n.start.dayjs())&&(i.day()>=n.start.get("weekday")?i=i.day(n.start.get("weekday")+7):i=i.day(n.start.get("weekday")),n.start.imply("day",i.date()),n.start.imply("month",i.month()+1),n.start.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(i.day()>n.end.get("weekday")?i=i.day(n.end.get("weekday")+7):i=i.day(n.end.get("weekday")),n.end.imply("day",i.date()),n.end.imply("month",i.month()+1),n.end.imply("year",i.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};ps.default=$l});var Hh=_(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var jw=fi(),Yl=class extends jw.Filter{constructor(e){super(),this.strictMode=e}isValid(e,t){return t.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,t):!0:(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return t.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1):t.start.isOnlyTime()&&(!t.start.isCertain("hour")||!t.start.isCertain("minute"))?(e.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${t} (${t.end})`)}),!1):!0}};Gl.default=Yl});var Hl=_(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var Bw=W(),Hw=new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(?:Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),zw=1,Vw=2,Kw=3,zh=4,Qw=5,Vh=6,Kh=7,Qh=8,Xh=9,jl=class extends Bw.AbstractParserWithWordBoundaryChecking{innerPattern(){return Hw}innerExtract(e,t){let n={};if(n.year=parseInt(t[zw]),n.month=parseInt(t[Vw]),n.day=parseInt(t[Kw]),t[zh]!=null)if(n.hour=parseInt(t[zh]),n.minute=parseInt(t[Qw]),t[Vh]!=null&&(n.second=parseInt(t[Vh])),t[Kh]!=null&&(n.millisecond=parseInt(t[Kh])),t[Qh]==null)n.timezoneOffset=0;else{let i=parseInt(t[Qh]),s=0;t[Xh]!=null&&(s=parseInt(t[Xh]));let a=i*60;a<0?a-=s:a+=s,n.timezoneOffset=a}return n}};Bl.default=jl});var Zh=_(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var Xw=fi(),zl=class extends Xw.MergingRefiner{mergeResults(e,t,n){let i=n.clone();return i.index=t.index,i.text=t.text+e+i.text,i.start.assign("weekday",t.start.get("weekday")),i.end&&i.end.assign("weekday",t.start.get("weekday")),i}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};Vl.default=zl});var Ar=_(hi=>{"use strict";var Rn=hi&&hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(hi,"__esModule",{value:!0});hi.includeCommonConfiguration=void 0;var Zw=Rn(Gh()),Jw=Rn(Xa()),Jh=Rn(jh()),eE=Rn(Bh()),tE=Rn(Hh()),rE=Rn(Hl()),nE=Rn(Zh());function iE(r,e=!1){return r.parsers.unshift(new rE.default),r.refiners.unshift(new nE.default),r.refiners.unshift(new Zw.default),r.refiners.unshift(new Jw.default),r.refiners.unshift(new Jh.default),r.refiners.push(new Jh.default),r.refiners.push(new eE.default),r.refiners.push(new tE.default(e)),r}hi.includeCommonConfiguration=iE});var Nr=_(_e=>{"use strict";var sE=_e&&_e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_e,"__esModule",{value:!0});_e.noon=_e.morning=_e.midnight=_e.yesterdayEvening=_e.evening=_e.lastNight=_e.tonight=_e.theDayAfter=_e.tomorrow=_e.theDayBefore=_e.yesterday=_e.today=_e.now=void 0;var br=Ie(),mi=sE(ye()),Pr=jt(),hs=Be();function aE(r){let e=mi.default(r.instant),t=new br.ParsingComponents(r,{});return Pr.assignSimilarDate(t,e),Pr.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}_e.now=aE;function oE(r){let e=mi.default(r.instant),t=new br.ParsingComponents(r,{});return Pr.assignSimilarDate(t,e),Pr.implySimilarTime(t,e),t}_e.today=oE;function uE(r){return em(r,1)}_e.yesterday=uE;function em(r,e){return Kl(r,-e)}_e.theDayBefore=em;function lE(r){return Kl(r,1)}_e.tomorrow=lE;function Kl(r,e){let t=mi.default(r.instant),n=new br.ParsingComponents(r,{});return t=t.add(e,"day"),Pr.assignSimilarDate(n,t),Pr.implySimilarTime(n,t),n}_e.theDayAfter=Kl;function cE(r,e=22){let t=mi.default(r.instant),n=new br.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",hs.Meridiem.PM),Pr.assignSimilarDate(n,t),n}_e.tonight=cE;function dE(r,e=0){let t=mi.default(r.instant),n=new br.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),Pr.assignSimilarDate(n,t),n.imply("hour",e),n}_e.lastNight=dE;function fE(r,e=20){let t=new br.ParsingComponents(r,{});return t.imply("meridiem",hs.Meridiem.PM),t.imply("hour",e),t}_e.evening=fE;function pE(r,e=20){let t=mi.default(r.instant),n=new br.ParsingComponents(r,{});return t=t.add(-1,"day"),Pr.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",hs.Meridiem.PM),n}_e.yesterdayEvening=pE;function hE(r){let e=new br.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}_e.midnight=hE;function mE(r,e=6){let t=new br.ParsingComponents(r,{});return t.imply("meridiem",hs.Meridiem.AM),t.imply("hour",e),t}_e.morning=mE;function gE(r){let e=new br.ParsingComponents(r,{});return e.imply("meridiem",hs.Meridiem.AM),e.imply("hour",12),e}_e.noon=gE});var tm=_(rr=>{"use strict";var yE=rr&&rr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),TE=rr&&rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),bE=rr&&rr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&yE(e,r,t);return TE(e,r),e},_E=rr&&rr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rr,"__esModule",{value:!0});var vE=_E(ye()),wE=W(),EE=jt(),ms=bE(Nr()),kE=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Ql=class extends wE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return kE}innerExtract(e,t){let n=vE.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"now":return ms.now(e.reference);case"today":return ms.today(e.reference);case"yesterday":return ms.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return ms.tomorrow(e.reference);case"tonight":return ms.tonight(e.reference);default:i.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),EE.assignSimilarDate(s,n),s.imply("hour",0));break}return s}};rr.default=Ql});var rm=_(gs=>{"use strict";var SE=gs&&gs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gs,"__esModule",{value:!0});var Za=Be(),OE=W(),DE=SE(ye()),xE=jt(),RE=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Xl=class extends OE.AbstractParserWithWordBoundaryChecking{innerPattern(){return RE}innerExtract(e,t){let n=DE.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":i.imply("meridiem",Za.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",Za.Meridiem.PM),i.imply("hour",20);break;case"midnight":xE.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",Za.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",Za.Meridiem.AM),i.imply("hour",12);break}return i}};gs.default=Xl});var Mn=_(sn=>{"use strict";var ME=sn&&sn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(sn,"__esModule",{value:!0});sn.toDayJSClosestWeekday=sn.toDayJSWeekday=void 0;var nm=ME(ye());function CE(r,e,t){if(!t)return im(r,e);let n=nm.default(r);switch(t){case"this":n=n.day(e);break;case"next":n=n.day(e+7);break;case"last":n=n.day(e-7);break}return n}sn.toDayJSWeekday=CE;function im(r,e){let t=nm.default(r),n=t.day();return Math.abs(e-7-n)<Math.abs(e-n)?t=t.day(e-7):Math.abs(e+7-n)<Math.abs(e-n)?t=t.day(e+7):t=t.day(e),t}sn.toDayJSClosestWeekday=im});var am=_(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var sm=at(),AE=Ee(),PE=W(),NE=Mn(),IE=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${AE.matchAnyPattern(sm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),FE=1,LE=2,UE=3,Zl=class extends PE.AbstractParserWithWordBoundaryChecking{innerPattern(){return IE}innerExtract(e,t){let n=t[LE].toLowerCase(),i=sm.WEEKDAY_DICTIONARY[n],s=t[FE],a=t[UE],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="last"||o=="past"?u="last":o=="next"?u="next":o=="this"&&(u="this");let l=NE.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Jl.default=Zl});var lm=_(ys=>{"use strict";var qE=ys&&ys.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ys,"__esModule",{value:!0});var um=at(),om=Ie(),WE=qE(ye()),$E=W(),YE=Ee(),GE=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${YE.matchAnyPattern(um.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),jE=1,BE=2,ec=class extends $E.AbstractParserWithWordBoundaryChecking{innerPattern(){return GE}innerExtract(e,t){let n=t[jE].toLowerCase(),i=t[BE].toLowerCase(),s=um.TIME_UNIT_DICTIONARY[i];if(n=="next"||n.startsWith("after")){let u={};return u[s]=1,om.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="last"||n=="past"){let u={};return u[s]=-1,om.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=WE.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};ys.default=ec});var nr=_(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.ParsingContext=Ti.Chrono=void 0;var gi=Ie(),HE=tc(),yi=class{constructor(e){e=e||HE.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new yi({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let i=this.parse(e,t,n);return i.length>0?i[0].start.date():null}parse(e,t,n){let i=new Ja(e,t,n),s=[];return this.parsers.forEach(a=>{let o=yi.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(e,t){let n=[],i=t.pattern(e),s=e.text,a=e.text,o=i.exec(a);for(;o;){let u=o.index+s.length-a.length;o.index=u;let l=t.extract(e,o);if(!l){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;l instanceof gi.ParsingResult?c=l:l instanceof gi.ParsingComponents?(c=e.createParsingResult(o.index,o[0]),c.start=l):c=e.createParsingResult(o.index,o[0],l),e.debug(()=>console.log(`${t.constructor.name} extracted result ${c}`)),n.push(c),a=s.substring(u+c.text.length),o=i.exec(a)}return n}};Ti.Chrono=yi;var Ja=class{constructor(e,t,n){this.text=e,this.reference=new gi.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof gi.ParsingComponents?e:new gi.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,i){let s=typeof t=="string"?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=i?this.createParsingComponents(i):null;return new gi.ParsingResult(this.reference,e,s,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};Ti.ParsingContext=Ja});var Cn=_(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var cm=st(),zE=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),eo=1,dm=5,fm=2,pm=3,rc=4,nc=class{constructor(e){this.groupNumberMonth=e?pm:fm,this.groupNumberDay=e?fm:pm}pattern(){return zE}extract(e,t){if(t[eo]=="/"||t[dm]=="/"){t.index+=t[0].length;return}let n=t.index+t[eo].length,i=t[0].substr(t[eo].length,t[0].length-t[eo].length-t[dm].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[rc]&&t[0].indexOf("/")<0)return;let s=e.createParsingResult(n,i),a=parseInt(t[this.groupNumberMonth]),o=parseInt(t[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),t[rc]){let u=parseInt(t[rc]),l=cm.findMostLikelyADYear(u);s.start.assign("year",l)}else{let u=cm.findYearClosestToRef(e.refDate,o,a);s.start.imply("year",u)}return s}};ic.default=nc});var mm=_(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var hm=at(),VE=Ie(),KE=W(),QE=Bt(),XE=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${hm.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),sc=class extends KE.AbstractParserWithWordBoundaryChecking{innerPattern(){return XE}innerExtract(e,t){let n=t[1].toLowerCase(),i=hm.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":i=QE.reverseTimeUnits(i);break}return VE.ParsingComponents.createRelativeFromReference(e.reference,i)}};ac.default=sc});var ym=_(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var ZE=fi(),oc=Ie(),JE=at(),ek=Bt();function gm(r){return r.text.match(/\s+(before|from)$/i)!=null}function tk(r){return r.text.match(/\s+(after|since)$/i)!=null}var uc=class extends ZE.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!gm(t)&&!tk(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let i=JE.parseTimeUnits(t.text);gm(t)&&(i=ek.reverseTimeUnits(i));let s=oc.ParsingComponents.createRelativeFromReference(new oc.ReferenceWithTimezone(n.start.date()),i);return new oc.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,s)}};lc.default=uc});var tc=_($e=>{"use strict";var ze=$e&&$e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($e,"__esModule",{value:!0});$e.createConfiguration=$e.createCasualConfiguration=$e.parseDate=$e.parse=$e.GB=$e.strict=$e.casual=void 0;var rk=ze(gh()),nk=ze(wh()),ik=ze(Dh()),sk=ze(Mh()),ak=ze(Ph()),ok=ze(Nh()),uk=ze(Fh()),lk=ze(Lh()),ck=ze(Uh()),dk=ze(qh()),fk=ze(Yh()),pk=Ar(),hk=ze(tm()),mk=ze(rm()),gk=ze(am()),yk=ze(lm()),cc=nr(),Tk=ze(Cn()),bk=ze(mm()),_k=ze(ym());$e.casual=new cc.Chrono(Tm(!1));$e.strict=new cc.Chrono(to(!0,!1));$e.GB=new cc.Chrono(to(!1,!0));function vk(r,e,t){return $e.casual.parse(r,e,t)}$e.parse=vk;function wk(r,e,t){return $e.casual.parseDate(r,e,t)}$e.parseDate=wk;function Tm(r=!1){let e=to(!1,r);return e.parsers.unshift(new hk.default),e.parsers.unshift(new mk.default),e.parsers.unshift(new sk.default),e.parsers.unshift(new yk.default),e.parsers.unshift(new bk.default),e}$e.createCasualConfiguration=Tm;function to(r=!0,e=!1){return pk.includeCommonConfiguration({parsers:[new Tk.default(e),new rk.default,new nk.default,new ik.default,new gk.default,new ak.default,new ok.default,new uk.default(r),new lk.default(r),new ck.default(r)],refiners:[new _k.default,new fk.default,new dk.default]},r)}$e.createConfiguration=to});var bm=_(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var Ek=xn(),dc=class extends Ek.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};fc.default=dc});var Ts=_(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.parseTimeUnits=Oe.TIME_UNITS_PATTERN=Oe.parseYear=Oe.YEAR_PATTERN=Oe.parseNumberPattern=Oe.NUMBER_PATTERN=Oe.TIME_UNIT_DICTIONARY=Oe.INTEGER_WORD_DICTIONARY=Oe.MONTH_DICTIONARY=Oe.WEEKDAY_DICTIONARY=void 0;var pc=Ee(),kk=st();Oe.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};Oe.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};Oe.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};Oe.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};Oe.NUMBER_PATTERN=`(?:${pc.matchAnyPattern(Oe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function vm(r){let e=r.toLowerCase();return Oe.INTEGER_WORD_DICTIONARY[e]!==void 0?Oe.INTEGER_WORD_DICTIONARY[e]:e==="a"||e==="an"?1:e.match(/few/)?3:e.match(/half/)?.5:e.match(/couple/)?2:e.match(/several/)?7:parseFloat(e)}Oe.parseNumberPattern=vm;Oe.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function Sk(r){if(/v/i.test(r))return-parseInt(r.replace(/[^0-9]+/gi,""));if(/n/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));if(/z/i.test(r))return parseInt(r.replace(/[^0-9]+/gi,""));let e=parseInt(r);return kk.findMostLikelyADYear(e)}Oe.parseYear=Sk;var wm=`(${Oe.NUMBER_PATTERN})\\s{0,5}(${pc.matchAnyPattern(Oe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,_m=new RegExp(wm,"i");Oe.TIME_UNITS_PATTERN=pc.repeatedTimeunitPattern("",wm);function Ok(r){let e={},t=r,n=_m.exec(t);for(;n;)Dk(e,n),t=t.substring(n[0].length),n=_m.exec(t);return e}Oe.parseTimeUnits=Ok;function Dk(r,e){let t=vm(e[1]),n=Oe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var km=_(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});var Em=Ts(),xk=Ee(),Rk=W(),Mk=Mn(),Ck=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${xk.matchAnyPattern(Em.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),Ak=1,Pk=3,Nk=2,hc=class extends Rk.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ck}innerExtract(e,t){let n=t[Nk].toLowerCase(),i=Em.WEEKDAY_DICTIONARY[n],s=t[Ak],a=t[Pk],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o.match(/letzte/)?u="last":o.match(/chste/)?u="next":o.match(/diese/)&&(u="this");let l=Mk.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};mc.default=hc});var xm=_(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var an=Be(),Ik=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),Fk=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),Lk=2,Sm=3,Om=4,Dm=5,bi=class{pattern(e){return Ik}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=bi.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=Fk.exec(i);return s&&(n.end=bi.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[Lk]),t[Sm]!=null&&(i=parseInt(t[Sm])),i>=60||n>24)return null;if(n>=12&&(s=an.Meridiem.PM),t[Dm]!=null){if(n>12)return null;let a=t[Dm].toLowerCase();a.match(/morgen|vormittag/)&&(s=an.Meridiem.AM,n==12&&(n=0)),a.match(/nachmittag|abend/)&&(s=an.Meridiem.PM,n!=12&&(n+=12)),a.match(/nacht/)&&(n==12?(s=an.Meridiem.AM,n=0):n<6?s=an.Meridiem.AM:(s=an.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",an.Meridiem.AM):e.imply("meridiem",an.Meridiem.PM),t[Om]!=null){let a=parseInt(t[Om]);if(a>=60)return null;e.assign("second",a)}return e}};gc.default=bi});var Rm=_(bs=>{"use strict";var Uk=bs&&bs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bs,"__esModule",{value:!0});var qk=Uk(Tr()),yc=class extends qk.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};bs.default=yc});var Mm=_(_s=>{"use strict";var Wk=_s&&_s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_s,"__esModule",{value:!0});var $k=Wk(Cr()),Tc=class extends $k.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};_s.default=Tc});var bc=_(ws=>{"use strict";var Yk=ws&&ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ws,"__esModule",{value:!0});var Gk=Yk(ye()),An=Be(),jk=W(),Bk=jt(),Hk=Bt(),vs=class extends jk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=Gk.default(e.refDate),i=t[2].toLowerCase(),s=e.createParsingComponents();return Bk.implySimilarTime(s,n),vs.extractTimeComponents(s,i)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",An.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",An.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",An.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",An.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",An.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",An.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=Hk.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",An.Meridiem.AM);break}return e}};ws.default=vs});var Pm=_(ir=>{"use strict";var zk=ir&&ir.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Vk=ir&&ir.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Kk=ir&&ir.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&zk(e,r,t);return Vk(e,r),e},Am=ir&&ir.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ir,"__esModule",{value:!0});var Qk=Am(ye()),Xk=W(),Pn=jt(),Zk=Am(bc()),Cm=Kk(Nr()),Jk=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),e1=1,t1=2,_c=class extends Xk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return Jk}innerExtract(e,t){let n=Qk.default(e.refDate),i=(t[e1]||"").toLowerCase(),s=(t[t1]||"").toLowerCase(),a=e.createParsingComponents();switch(i){case"jetzt":a=Cm.now(e.reference);break;case"heute":a=Cm.today(e.reference);break;case"morgen":Pn.assignTheNextDay(a,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),Pn.assignTheNextDay(a,n);break;case"gestern":n=n.add(-1,"day"),Pn.assignSimilarDate(a,n),Pn.implySimilarTime(a,n);break;case"vorgestern":n=n.add(-2,"day"),Pn.assignSimilarDate(a,n),Pn.implySimilarTime(a,n);break;default:i.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),Pn.assignSimilarDate(a,n),a.imply("hour",0));break}return s&&(a=Zk.default.extractTimeComponents(a,s)),a}};ir.default=_c});var qm=_(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var r1=st(),Lm=Ts(),Um=Ts(),n1=Ee(),i1=W(),s1=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${n1.matchAnyPattern(Lm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Um.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Nm=1,Im=2,a1=3,Fm=4,vc=class extends i1.AbstractParserWithWordBoundaryChecking{innerPattern(){return s1}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Lm.MONTH_DICTIONARY[t[a1].toLowerCase()],s=parseInt(t[Nm]);if(s>31)return t.index=t.index+t[Nm].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Fm]){let a=Um.parseYear(t[Fm]);n.start.assign("year",a)}else{let a=r1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Im]){let a=parseInt(t[Im]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};wc.default=vc});var Wm=_(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var ro=Ts(),o1=Ie(),u1=W(),l1=Bt(),c1=Ee(),Ec=class extends u1.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${ro.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${c1.matchAnyPattern(ro.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?ro.parseNumberPattern(t[2]):1,i=ro.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],s={};s[i]=n;let a=t[1]||t[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=l1.reverseTimeUnits(s)),o1.ParsingComponents.createRelativeFromReference(e.reference,s)}};kc.default=Ec});var Gm=_(Ve=>{"use strict";var sr=Ve&&Ve.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.createConfiguration=Ve.createCasualConfiguration=Ve.parseDate=Ve.parse=Ve.strict=Ve.casual=void 0;var d1=Ar(),$m=nr(),f1=sr(Cn()),p1=sr(Hl()),h1=sr(bm()),m1=sr(km()),g1=sr(xm()),y1=sr(Rm()),T1=sr(Mm()),b1=sr(Pm()),_1=sr(bc()),v1=sr(qm()),w1=sr(Wm());Ve.casual=new $m.Chrono(Ym());Ve.strict=new $m.Chrono(Sc(!0));function E1(r,e,t){return Ve.casual.parse(r,e,t)}Ve.parse=E1;function k1(r,e,t){return Ve.casual.parseDate(r,e,t)}Ve.parseDate=k1;function Ym(r=!0){let e=Sc(!1,r);return e.parsers.unshift(new _1.default),e.parsers.unshift(new b1.default),e.parsers.unshift(new w1.default),e}Ve.createCasualConfiguration=Ym;function Sc(r=!0,e=!0){return d1.includeCommonConfiguration({parsers:[new p1.default,new f1.default(e),new h1.default,new g1.default,new v1.default,new m1.default],refiners:[new y1.default,new T1.default]},r)}Ve.createConfiguration=Sc});var Bm=_(ar=>{"use strict";var S1=ar&&ar.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),O1=ar&&ar.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),D1=ar&&ar.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&S1(e,r,t);return O1(e,r),e},x1=ar&&ar.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ar,"__esModule",{value:!0});var R1=x1(ye()),M1=Be(),C1=W(),jm=jt(),no=D1(Nr()),Oc=class extends C1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=R1.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();switch(i){case"maintenant":return no.now(e.reference);case"aujourd'hui":return no.today(e.reference);case"hier":return no.yesterday(e.reference);case"demain":return no.tomorrow(e.reference);default:i.match(/cette\s*nuit/)?(jm.assignSimilarDate(s,n),s.imply("hour",22),s.imply("meridiem",M1.Meridiem.PM)):i.match(/la\s*veille/)&&(n=n.add(-1,"day"),jm.assignSimilarDate(s,n),s.imply("hour",0))}return s}};ar.default=Oc});var Hm=_(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var Es=Be(),A1=W(),Dc=class extends A1.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(e,t){let n=t[2].toLowerCase(),i=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",Es.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",Es.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",Es.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",Es.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",Es.Meridiem.AM);break}return i}};xc.default=Dc});var zm=_(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var P1=xn(),Rc=class extends P1.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Mc.default=Rc});var Vm=_(ks=>{"use strict";var N1=ks&&ks.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ks,"__esModule",{value:!0});var I1=N1(Cr()),Cc=class extends I1.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};ks.default=Cc});var Km=_(Ss=>{"use strict";var F1=Ss&&Ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ss,"__esModule",{value:!0});var L1=F1(Tr()),Ac=class extends L1.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};Ss.default=Ac});var on=_(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.parseTimeUnits=Te.TIME_UNITS_PATTERN=Te.parseYear=Te.YEAR_PATTERN=Te.parseOrdinalNumberPattern=Te.ORDINAL_NUMBER_PATTERN=Te.parseNumberPattern=Te.NUMBER_PATTERN=Te.TIME_UNIT_DICTIONARY=Te.INTEGER_WORD_DICTIONARY=Te.MONTH_DICTIONARY=Te.WEEKDAY_DICTIONARY=void 0;var Pc=Ee();Te.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};Te.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};Te.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};Te.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};Te.NUMBER_PATTERN=`(?:${Pc.matchAnyPattern(Te.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function Xm(r){let e=r.toLowerCase();return Te.INTEGER_WORD_DICTIONARY[e]!==void 0?Te.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}Te.parseNumberPattern=Xm;Te.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function U1(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}Te.parseOrdinalNumberPattern=U1;Te.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function q1(r){if(/AC/i.test(r))return r=r.replace(/BC/i,""),-parseInt(r);if(/AD/i.test(r)||/C/i.test(r))return r=r.replace(/[^\d]+/i,""),parseInt(r);let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}Te.parseYear=q1;var Zm=`(${Te.NUMBER_PATTERN})\\s{0,5}(${Pc.matchAnyPattern(Te.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Qm=new RegExp(Zm,"i");Te.TIME_UNITS_PATTERN=Pc.repeatedTimeunitPattern("",Zm);function W1(r){let e={},t=r,n=Qm.exec(t);for(;n;)$1(e,n),t=t.substring(n[0].length),n=Qm.exec(t);return e}Te.parseTimeUnits=W1;function $1(r,e){let t=Xm(e[1]),n=Te.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var eg=_(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var Jm=on(),Y1=Ee(),G1=W(),j1=Mn(),B1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${Y1.matchAnyPattern(Jm.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),H1=1,z1=2,Nc=class extends G1.AbstractParserWithWordBoundaryChecking{innerPattern(){return B1}innerExtract(e,t){let n=t[H1].toLowerCase(),i=Jm.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[z1];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=j1.toDayJSWeekday(e.refDate,i,a);return e.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};Ic.default=Nc});var ig=_(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var Os=Be(),V1=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),K1=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),Q1=2,tg=3,rg=4,ng=5,_i=class{pattern(e){return V1}extract(e,t){let n=e.createParsingResult(t.index+t[1].length,t[0].substring(t[1].length));if(n.text.match(/^\d{4}$/)||(n.start=_i.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let i=e.text.substring(t.index+t[0].length),s=K1.exec(i);return s&&(n.end=_i.extractTimeComponent(n.start.clone(),s),n.end&&(n.text+=s[0])),n}static extractTimeComponent(e,t){let n=0,i=0,s=null;if(n=parseInt(t[Q1]),t[tg]!=null&&(i=parseInt(t[tg])),i>=60||n>24)return null;if(n>=12&&(s=Os.Meridiem.PM),t[ng]!=null){if(n>12)return null;let a=t[ng][0].toLowerCase();a=="a"&&(s=Os.Meridiem.AM,n==12&&(n=0)),a=="p"&&(s=Os.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",i),s!==null?e.assign("meridiem",s):n<12?e.imply("meridiem",Os.Meridiem.AM):e.imply("meridiem",Os.Meridiem.PM),t[rg]!=null){let a=parseInt(t[rg]);if(a>=60)return null;e.assign("second",a)}return e}};Fc.default=_i});var cg=_(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var X1=st(),ug=on(),lg=on(),io=on(),Z1=Ee(),J1=W(),eS=new RegExp(`(?:on\\s*?)?(${io.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${io.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${Z1.matchAnyPattern(ug.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${lg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),sg=1,ag=2,tS=3,og=4,Lc=class extends J1.AbstractParserWithWordBoundaryChecking{innerPattern(){return eS}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=ug.MONTH_DICTIONARY[t[tS].toLowerCase()],s=io.parseOrdinalNumberPattern(t[sg]);if(s>31)return t.index=t.index+t[sg].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[og]){let a=lg.parseYear(t[og]);n.start.assign("year",a)}else{let a=X1.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[ag]){let a=io.parseOrdinalNumberPattern(t[ag]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};Uc.default=Lc});var fg=_(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var dg=on(),rS=Ie(),nS=W(),iS=Bt(),qc=class extends nS.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${dg.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=dg.parseTimeUnits(t[1]),i=iS.reverseTimeUnits(n);return rS.ParsingComponents.createRelativeFromReference(e.reference,i)}};Wc.default=qc});var hg=_(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var pg=on(),sS=Ie(),aS=W(),$c=class extends aS.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${pg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=pg.parseTimeUnits(t[1]);return sS.ParsingComponents.createRelativeFromReference(e.reference,n)}};Yc.default=$c});var mg=_(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});var so=on(),oS=Ie(),uS=W(),lS=Bt(),cS=Ee(),Gc=class extends uS.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${so.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${cS.matchAnyPattern(so.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(e,t){let n=t[1]?so.parseNumberPattern(t[1]):1,i=so.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],s={};s[i]=n;let a=t[2]||t[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=lS.reverseTimeUnits(s)),oS.ParsingComponents.createRelativeFromReference(e.reference,s)}};jc.default=Gc});var Tg=_(Ke=>{"use strict";var Ht=Ke&&Ke.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.createConfiguration=Ke.createCasualConfiguration=Ke.parseDate=Ke.parse=Ke.strict=Ke.casual=void 0;var dS=Ar(),gg=nr(),fS=Ht(Bm()),pS=Ht(Hm()),hS=Ht(Cn()),mS=Ht(zm()),gS=Ht(Vm()),yS=Ht(Km()),TS=Ht(eg()),bS=Ht(ig()),_S=Ht(cg()),vS=Ht(fg()),wS=Ht(hg()),ES=Ht(mg());Ke.casual=new gg.Chrono(yg());Ke.strict=new gg.Chrono(Bc(!0));function kS(r,e,t){return Ke.casual.parse(r,e,t)}Ke.parse=kS;function SS(r,e,t){return Ke.casual.parseDate(r,e,t)}Ke.parseDate=SS;function yg(r=!0){let e=Bc(!1,r);return e.parsers.unshift(new fS.default),e.parsers.unshift(new pS.default),e.parsers.unshift(new ES.default),e}Ke.createCasualConfiguration=yg;function Bc(r=!0,e=!0){return dS.includeCommonConfiguration({parsers:[new hS.default(e),new _S.default,new mS.default,new bS.default,new vS.default,new wS.default,new TS.default],refiners:[new gS.default,new yS.default]},r)}Ke.createConfiguration=Bc});var bg=_(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.toHankaku=void 0;function OS(r){return String(r).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,DS)}ao.toHankaku=OS;function DS(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var vg=_(Ds=>{"use strict";var xS=Ds&&Ds.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ds,"__esModule",{value:!0});var Hc=bg(),RS=st(),MS=xS(ye()),CS=/(?:(?:([同今本])|((昭和|平成|令和)?([0-9０-９]{1,4}|元)))年\s*)?([0-9０-９]{1,2})月\s*([0-9０-９]{1,2})日/i,_g=1,AS=2,zc=3,PS=4,NS=5,IS=6,Vc=class{pattern(){return CS}extract(e,t){let n=parseInt(Hc.toHankaku(t[NS])),i=parseInt(Hc.toHankaku(t[IS])),s=e.createParsingComponents({day:i,month:n});if(t[_g]&&t[_g].match("\u540C|\u4ECA|\u672C")){let a=MS.default(e.refDate);s.assign("year",a.year())}if(t[AS]){let a=t[PS],o=a=="\u5143"?1:parseInt(Hc.toHankaku(a));t[zc]=="\u4EE4\u548C"?o+=2018:t[zc]=="\u5E73\u6210"?o+=1988:t[zc]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=RS.findYearClosestToRef(e.refDate,i,n);s.imply("year",a)}return s}};Ds.default=Vc});var wg=_(xs=>{"use strict";var FS=xs&&xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xs,"__esModule",{value:!0});var LS=FS(Tr()),Kc=class extends LS.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};xs.default=Kc});var kg=_(or=>{"use strict";var US=or&&or.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),qS=or&&or.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),WS=or&&or.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&US(e,r,t);return qS(e,r),e},$S=or&&or.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(or,"__esModule",{value:!0});var YS=$S(ye()),Eg=Be(),Qc=WS(Nr()),GS=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Xc=class{pattern(){return GS}extract(e,t){let n=t[0],i=YS.default(e.refDate),s=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Qc.yesterday(e.reference);case"\u660E\u65E5":return Qc.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Qc.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",Eg.Meridiem.PM)):n.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",Eg.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};or.default=Xc});var Dg=_(Qe=>{"use strict";var Zc=Qe&&Qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.createConfiguration=Qe.createCasualConfiguration=Qe.parseDate=Qe.parse=Qe.strict=Qe.casual=void 0;var jS=Zc(vg()),BS=Zc(wg()),HS=Zc(kg()),Sg=nr();Qe.casual=new Sg.Chrono(Og());Qe.strict=new Sg.Chrono(Jc());function zS(r,e,t){return Qe.casual.parse(r,e,t)}Qe.parse=zS;function VS(r,e,t){return Qe.casual.parseDate(r,e,t)}Qe.parseDate=VS;function Og(){let r=Jc();return r.parsers.unshift(new HS.default),r}Qe.createCasualConfiguration=Og;function Jc(){return{parsers:[new jS.default],refiners:[new BS.default]}}Qe.createConfiguration=Jc});var oo=_(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.parseYear=_r.YEAR_PATTERN=_r.MONTH_DICTIONARY=_r.WEEKDAY_DICTIONARY=void 0;_r.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};_r.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};_r.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function KS(r){if(r.match(/^[0-9]{1,4}$/)){let e=parseInt(r);return e<100&&(e>50?e=e+1900:e=e+2e3),e}return r.match(/a\.?\s*c\.?/i)?(r=r.replace(/a\.?\s*c\.?/i,""),-parseInt(r)):parseInt(r)}_r.parseYear=KS});var Rg=_(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var xg=oo(),QS=Ee(),XS=W(),ZS=Mn(),JS=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${QS.matchAnyPattern(xg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),eO=1,tO=2,rO=3,ed=class extends XS.AbstractParserWithWordBoundaryChecking{innerPattern(){return JS}innerExtract(e,t){let n=t[tO].toLowerCase(),i=xg.WEEKDAY_DICTIONARY[n];if(i===void 0)return null;let s=t[eO],a=t[rO],o=s||a||"";o=o.toLowerCase();let u=null;o=="passado"?u="this":o=="pr\xF3ximo"||o=="proximo"?u="next":o=="este"&&(u="this");let l=ZS.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};td.default=ed});var Mg=_(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var nO=xn(),rd=class extends nO.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};nd.default=rd});var Cg=_(Rs=>{"use strict";var iO=Rs&&Rs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rs,"__esModule",{value:!0});var sO=iO(Cr()),id=class extends sO.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};Rs.default=id});var Ag=_(Ms=>{"use strict";var aO=Ms&&Ms.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ms,"__esModule",{value:!0});var oO=aO(Tr()),sd=class extends oO.default{patternBetween(){return/^\s*(?:-)\s*$/i}};Ms.default=sd});var Ug=_(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var uO=st(),Fg=oo(),Lg=oo(),lO=Ee(),cO=W(),dO=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${lO.matchAnyPattern(Fg.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Lg.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Pg=1,Ng=2,fO=3,Ig=4,ad=class extends cO.AbstractParserWithWordBoundaryChecking{innerPattern(){return dO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=Fg.MONTH_DICTIONARY[t[fO].toLowerCase()],s=parseInt(t[Pg]);if(s>31)return t.index=t.index+t[Pg].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[Ig]){let a=Lg.parseYear(t[Ig]);n.start.assign("year",a)}else{let a=uO.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[Ng]){let a=parseInt(t[Ng]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};od.default=ad});var qg=_(Ir=>{"use strict";var pO=Ir&&Ir.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),hO=Ir&&Ir.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),mO=Ir&&Ir.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&pO(e,r,t);return hO(e,r),e};Object.defineProperty(Ir,"__esModule",{value:!0});var gO=W(),uo=mO(Nr()),ud=class extends gO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"agora":return uo.now(e.reference);case"hoje":return uo.today(e.reference);case"amanha":case"amanh\xE3":return uo.tomorrow(e.reference);case"ontem":return uo.yesterday(e.reference)}return i}};Ir.default=ud});var Wg=_(Cs=>{"use strict";var yO=Cs&&Cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cs,"__esModule",{value:!0});var lo=Be(),TO=W(),bO=jt(),_O=yO(ye()),ld=class extends TO.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=_O.default(e.refDate),i=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":i.imply("meridiem",lo.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",lo.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",lo.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":bO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",lo.Meridiem.AM),i.imply("hour",12);break}return i}};Cs.default=ld});var Gg=_(Xe=>{"use strict";var un=Xe&&Xe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.createConfiguration=Xe.createCasualConfiguration=Xe.parseDate=Xe.parse=Xe.strict=Xe.casual=void 0;var vO=Ar(),$g=nr(),wO=un(Cn()),EO=un(Rg()),kO=un(Mg()),SO=un(Cg()),OO=un(Ag()),DO=un(Ug()),xO=un(qg()),RO=un(Wg());Xe.casual=new $g.Chrono(Yg());Xe.strict=new $g.Chrono(cd(!0));function MO(r,e,t){return Xe.casual.parse(r,e,t)}Xe.parse=MO;function CO(r,e,t){return Xe.casual.parseDate(r,e,t)}Xe.parseDate=CO;function Yg(r=!0){let e=cd(!1,r);return e.parsers.push(new xO.default),e.parsers.push(new RO.default),e}Xe.createCasualConfiguration=Yg;function cd(r=!0,e=!0){return vO.includeCommonConfiguration({parsers:[new wO.default(e),new EO.default,new kO.default,new DO.default],refiners:[new SO.default,new OO.default]},r)}Xe.createConfiguration=cd});var jg=_(As=>{"use strict";var AO=As&&As.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(As,"__esModule",{value:!0});var PO=AO(Tr()),dd=class extends PO.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};As.default=dd});var Bg=_(Ps=>{"use strict";var NO=Ps&&Ps.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ps,"__esModule",{value:!0});var IO=NO(Cr()),fd=class extends IO.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Ps.default=fd});var Hg=_(Fr=>{"use strict";var FO=Fr&&Fr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),LO=Fr&&Fr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),UO=Fr&&Fr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&FO(e,r,t);return LO(e,r),e};Object.defineProperty(Fr,"__esModule",{value:!0});var qO=W(),co=UO(Nr()),pd=class extends qO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),i=e.createParsingComponents();switch(n){case"nu":return co.now(e.reference);case"vandaag":return co.today(e.reference);case"morgen":case"morgend":return co.tomorrow(e.reference);case"gisteren":return co.yesterday(e.reference)}return i}};Fr.default=pd});var zg=_(Ns=>{"use strict";var WO=Ns&&Ns.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ns,"__esModule",{value:!0});var fo=Be(),$O=W(),YO=WO(ye()),GO=jt(),jO=1,BO=2,hd=class extends $O.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=YO.default(e.refDate),i=e.createParsingComponents();switch(t[jO]==="deze"&&(i.assign("day",e.refDate.getDate()),i.assign("month",e.refDate.getMonth()+1),i.assign("year",e.refDate.getFullYear())),t[BO].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",fo.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",fo.Meridiem.PM),i.imply("hour",20);break;case"middernacht":GO.assignTheNextDay(i,n),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",fo.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",fo.Meridiem.AM),i.imply("hour",12);break}return i}};Ns.default=hd});var Ct=_(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.parseTimeUnits=ue.TIME_UNITS_PATTERN=ue.parseYear=ue.YEAR_PATTERN=ue.parseOrdinalNumberPattern=ue.ORDINAL_NUMBER_PATTERN=ue.parseNumberPattern=ue.NUMBER_PATTERN=ue.TIME_UNIT_DICTIONARY=ue.ORDINAL_WORD_DICTIONARY=ue.INTEGER_WORD_DICTIONARY=ue.MONTH_DICTIONARY=ue.WEEKDAY_DICTIONARY=void 0;var po=Ee(),HO=st();ue.WEEKDAY_DICTIONARY={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6};ue.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12};ue.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};ue.ORDINAL_WORD_DICTIONARY={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,twee\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31};ue.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};ue.NUMBER_PATTERN=`(?:${po.matchAnyPattern(ue.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function Kg(r){let e=r.toLowerCase();return ue.INTEGER_WORD_DICTIONARY[e]!==void 0?ue.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}ue.parseNumberPattern=Kg;ue.ORDINAL_NUMBER_PATTERN=`(?:${po.matchAnyPattern(ue.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function zO(r){let e=r.toLowerCase();return ue.ORDINAL_WORD_DICTIONARY[e]!==void 0?ue.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}ue.parseOrdinalNumberPattern=zO;ue.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function VO(r){if(/voor Christus/i.test(r))return r=r.replace(/voor Christus/i,""),-parseInt(r);if(/na Christus/i.test(r))return r=r.replace(/na Christus/i,""),parseInt(r);let e=parseInt(r);return HO.findMostLikelyADYear(e)}ue.parseYear=VO;var Qg=`(${ue.NUMBER_PATTERN})\\s{0,5}(${po.matchAnyPattern(ue.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Vg=new RegExp(Qg,"i");ue.TIME_UNITS_PATTERN=po.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Qg);function KO(r){let e={},t=r,n=Vg.exec(t);for(;n;)QO(e,n),t=t.substring(n[0].length),n=Vg.exec(t);return e}ue.parseTimeUnits=KO;function QO(r,e){let t=Kg(e[1]),n=ue.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Zg=_(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});var Xg=Ct(),XO=Ie(),ZO=W(),md=class extends ZO.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Xg.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=Xg.parseTimeUnits(t[1]);return XO.ParsingComponents.createRelativeFromReference(e.reference,n)}};gd.default=md});var ey=_(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});var Jg=Ct(),JO=Ee(),eD=W(),tD=Mn(),rD=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${JO.matchAnyPattern(Jg.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),nD=1,iD=2,sD=3,yd=class extends eD.AbstractParserWithWordBoundaryChecking{innerPattern(){return rD}innerExtract(e,t){let n=t[iD].toLowerCase(),i=Jg.WEEKDAY_DICTIONARY[n],s=t[nD],a=t[sD],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="vorige"?u="last":o=="volgende"?u="next":o=="deze"&&(u="this");let l=tD.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Td.default=yd});var ay=_(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var aD=st(),iy=Ct(),ho=Ct(),sy=Ct(),oD=Ee(),uD=W(),lD=new RegExp(`(?:on\\s*?)?(${ho.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${ho.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+oD.matchAnyPattern(iy.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${sy.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),cD=3,ty=1,ry=2,ny=4,bd=class extends uD.AbstractParserWithWordBoundaryChecking{innerPattern(){return lD}innerExtract(e,t){let n=iy.MONTH_DICTIONARY[t[cD].toLowerCase()],i=ho.parseOrdinalNumberPattern(t[ty]);if(i>31)return t.index=t.index+t[ty].length,null;let s=e.createParsingComponents({day:i,month:n});if(t[ny]){let u=sy.parseYear(t[ny]);s.assign("year",u)}else{let u=aD.findYearClosestToRef(e.refDate,i,n);s.imply("year",u)}if(!t[ry])return s;let a=ho.parseOrdinalNumberPattern(t[ry]),o=e.createParsingResult(t.index,t[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};_d.default=bd});var cy=_(wd=>{"use strict";Object.defineProperty(wd,"__esModule",{value:!0});var uy=Ct(),dD=st(),fD=Ee(),ly=Ct(),pD=W(),hD=new RegExp(`(${fD.matchAnyPattern(uy.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${ly.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),mD=1,oy=2,vd=class extends pD.AbstractParserWithWordBoundaryChecking{innerPattern(){return hD}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let i=t[mD],s=uy.MONTH_DICTIONARY[i.toLowerCase()];if(n.assign("month",s),t[oy]){let a=ly.parseYear(t[oy]);n.assign("year",a)}else{let a=dD.findYearClosestToRef(e.refDate,1,s);n.imply("year",a)}return n}};wd.default=vd});var dy=_(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});var gD=W(),yD=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),TD=1,bD=2,Ed=class extends gD.AbstractParserWithWordBoundaryChecking{innerPattern(){return yD}innerExtract(e,t){let n=parseInt(t[bD]),i=parseInt(t[TD]);return e.createParsingComponents().imply("day",1).assign("month",i).assign("year",n)}};kd.default=Ed});var fy=_(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});var _D=xn(),Sd=class extends _D.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(e,t){return t[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(e,t)}};Od.default=Sd});var my=_(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});var hy=Ct(),vD=Ee(),wD=W(),ED=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${vD.matchAnyPattern(hy.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),kD=1,SD=2,py=3,OD=4,Dd=class extends wD.AbstractParserWithWordBoundaryChecking{innerPattern(){return ED}innerExtract(e,t){let n=t[py]?parseInt(t[py]):hy.MONTH_DICTIONARY[t[SD].toLowerCase()];if(n<1||n>12)return null;let i=parseInt(t[kD]);return{day:parseInt(t[OD]),month:n,year:i}}};xd.default=Dd});var gy=_(Is=>{"use strict";var DD=Is&&Is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Is,"__esModule",{value:!0});var xD=W(),mo=Be(),Rd=jt(),RD=DD(ye()),MD=1,CD=2,Md=class extends xD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[MD].toLowerCase(),i=t[CD].toLowerCase(),s=e.createParsingComponents(),a=RD.default(e.refDate);switch(n){case"gisteren":Rd.assignSimilarDate(s,a.add(-1,"day"));break;case"van":Rd.assignSimilarDate(s,a);break;case"morgen":Rd.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",mo.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",mo.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",mo.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",mo.Meridiem.PM),s.imply("hour",20);break}return s}};Is.default=Md});var Ty=_(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});var yy=Ct(),AD=Ie(),PD=W(),ND=Bt(),ID=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${yy.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Cd=class extends PD.AbstractParserWithWordBoundaryChecking{innerPattern(){return ID}innerExtract(e,t){let n=t[1].toLowerCase(),i=yy.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":i=ND.reverseTimeUnits(i);break}return AD.ParsingComponents.createRelativeFromReference(e.reference,i)}};Ad.default=Cd});var vy=_(Fs=>{"use strict";var FD=Fs&&Fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fs,"__esModule",{value:!0});var _y=Ct(),by=Ie(),LD=FD(ye()),UD=W(),qD=Ee(),WD=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${qD.matchAnyPattern(_y.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),$D=1,YD=2,Pd=class extends UD.AbstractParserWithWordBoundaryChecking{innerPattern(){return WD}innerExtract(e,t){let n=t[$D].toLowerCase(),i=t[YD].toLowerCase(),s=_y.TIME_UNIT_DICTIONARY[i];if(n=="volgend"||n=="volgende"||n=="komende"){let u={};return u[s]=1,by.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="afgelopen"||n=="vorige"){let u={};return u[s]=-1,by.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=LD.default(e.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};Fs.default=Pd});var wy=_(Fd=>{"use strict";Object.defineProperty(Fd,"__esModule",{value:!0});var Id=Ct(),GD=Ie(),jD=W(),BD=Bt(),HD=new RegExp("("+Id.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),zD=new RegExp("("+Id.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Nd=class extends jD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?zD:HD}innerExtract(e,t){let n=Id.parseTimeUnits(t[1]),i=BD.reverseTimeUnits(n);return GD.ParsingComponents.createRelativeFromReference(e.reference,i)}};Fd.default=Nd});var Ey=_(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var Ud=Ct(),VD=Ie(),KD=W(),QD=new RegExp("("+Ud.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),XD=new RegExp("("+Ud.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),ZD=1,Ld=class extends KD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?XD:QD}innerExtract(e,t){let n=Ud.parseTimeUnits(t[ZD]);return VD.ParsingComponents.createRelativeFromReference(e.reference,n)}};qd.default=Ld});var Dy=_(Ze=>{"use strict";var ot=Ze&&Ze.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.createConfiguration=Ze.createCasualConfiguration=Ze.parseDate=Ze.parse=Ze.strict=Ze.casual=void 0;var JD=Ar(),ky=nr(),e0=ot(jg()),t0=ot(Bg()),r0=ot(Hg()),n0=ot(zg()),i0=ot(Cn()),s0=ot(Zg()),a0=ot(ey()),o0=ot(ay()),Sy=ot(cy()),u0=ot(dy()),l0=ot(fy()),c0=ot(my()),d0=ot(gy()),f0=ot(Ty()),p0=ot(vy()),h0=ot(wy()),m0=ot(Ey());Ze.casual=new ky.Chrono(Oy());Ze.strict=new ky.Chrono(Wd(!0));function g0(r,e,t){return Ze.casual.parse(r,e,t)}Ze.parse=g0;function y0(r,e,t){return Ze.casual.parseDate(r,e,t)}Ze.parseDate=y0;function Oy(r=!0){let e=Wd(!1,r);return e.parsers.unshift(new r0.default),e.parsers.unshift(new n0.default),e.parsers.unshift(new d0.default),e.parsers.unshift(new Sy.default),e.parsers.unshift(new p0.default),e.parsers.unshift(new f0.default),e}Ze.createCasualConfiguration=Oy;function Wd(r=!0,e=!0){return JD.includeCommonConfiguration({parsers:[new i0.default(e),new s0.default,new o0.default,new Sy.default,new a0.default,new c0.default,new u0.default,new l0.default(r),new h0.default(r),new m0.default(r)],refiners:[new t0.default,new e0.default]},r)}Ze.createConfiguration=Wd});var Cy=_(Ls=>{"use strict";var T0=Ls&&Ls.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ls,"__esModule",{value:!0});var b0=T0(ye()),_0=W(),v0=1,xy=2,w0=3,Ry=4,My=5,E0=6,$d=class extends _0.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=b0.default(e.refDate),a=s;if(t[v0])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[xy]){let o=t[xy],u=t[w0];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),u=="\u65E9"||u=="\u671D"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[Ry]){let u=t[Ry][0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[My]){let o=t[My];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let u=t[E0];if(u){let l=u[0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ls.default=$d});var vi=_(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.zhStringToYear=xt.zhStringToNumber=xt.WEEKDAY_OFFSET=xt.NUMBER=void 0;xt.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};xt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function k0(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?xt.NUMBER[n]:e*xt.NUMBER[n]:e+=xt.NUMBER[n]}return e}xt.zhStringToNumber=k0;function S0(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+xt.NUMBER[n]}return parseInt(e)}xt.zhStringToYear=S0});var Py=_(Us=>{"use strict";var O0=Us&&Us.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Us,"__esModule",{value:!0});var D0=O0(ye()),x0=W(),Nn=vi(),Yd=1,Ay=2,Gd=3,jd=class extends x0.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Nn.NUMBER).join("")+"]{4}|["+Object.keys(Nn.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Nn.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Nn.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=D0.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Ay]);if(isNaN(s)&&(s=Nn.zhStringToNumber(t[Ay])),i.start.assign("month",s),t[Gd]){let a=parseInt(t[Gd]);isNaN(a)&&(a=Nn.zhStringToNumber(t[Gd])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[Yd]){let a=parseInt(t[Yd]);isNaN(a)&&(a=Nn.zhStringToYear(t[Yd])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Us.default=jd});var Iy=_(qs=>{"use strict";var R0=qs&&qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qs,"__esModule",{value:!0});var M0=R0(ye()),C0=W(),Ny=vi(),A0=new RegExp("(\\d+|["+Object.keys(Ny.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),Bd=1,P0=2,Hd=class extends C0.AbstractParserWithWordBoundaryChecking{innerPattern(){return A0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[Bd]);if(isNaN(i)&&(i=Ny.zhStringToNumber(t[Bd])),isNaN(i)){let u=t[Bd];if(u==="\u5E7E")i=3;else if(u==="\u534A")i=.5;else return null}let s=M0.default(e.refDate),o=t[P0][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};qs.default=Hd});var Ly=_(Ws=>{"use strict";var N0=Ws&&Ws.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ws,"__esModule",{value:!0});var I0=N0(ye()),F0=W(),Fy=vi(),L0=new RegExp("(?<prefix>\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(Fy.WEEKDAY_OFFSET).join("|")+")"),zd=class extends F0.AbstractParserWithWordBoundaryChecking{innerPattern(){return L0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Fy.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let u=I0.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c)<Math.abs(s-c)?u=u.day(s-7):Math.abs(s+7-c)<Math.abs(s-c)?u=u.day(s+7):u=u.day(s),n.start.assign("weekday",s),l?(n.start.assign("day",u.date()),n.start.assign("month",u.month()+1),n.start.assign("year",u.year())):(n.start.imply("day",u.date()),n.start.imply("month",u.month()+1),n.start.imply("year",u.year())),n}};Ws.default=zd});var Uy=_($s=>{"use strict";var U0=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0});var q0=U0(ye()),W0=W(),Vt=vi(),$0=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Vt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Vt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Vt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Y0=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Vt.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Vt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Vt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),go=1,yo=2,To=3,bo=4,_o=5,vo=6,zt=7,wi=8,wo=9,Vd=class extends W0.AbstractParserWithWordBoundaryChecking{innerPattern(){return $0}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=q0.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[go]){var a=t[go];a=="\u660E"||a=="\u807D"?n.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[bo]){var o=t[bo];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let u=0,l=0,c=-1;if(t[wi]){var f=parseInt(t[wi]);if(isNaN(f)&&(f=Vt.zhStringToNumber(t[wi])),f>=60)return null;i.start.assign("second",f)}if(u=parseInt(t[vo]),isNaN(u)&&(u=Vt.zhStringToNumber(t[vo])),t[zt]?t[zt]=="\u534A"?l=30:t[zt]=="\u6B63"||t[zt]=="\u6574"?l=0:(l=parseInt(t[zt]),isNaN(l)&&(l=Vt.zhStringToNumber(t[zt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[wo]){if(u>12)return null;var h=t[wo][0].toLowerCase();h=="a"&&(c=0,u==12&&(u=0)),h=="p"&&(c=1,u!=12&&(u+=12))}else if(t[yo]){var T=t[yo],y=T[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[To]){var w=t[To],D=w[0];D=="\u4E0A"||D=="\u671D"||D=="\u65E9"||D=="\u51CC"?(c=0,u==12&&(u=0)):(D=="\u4E0B"||D=="\u664F"||D=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[_o]){var C=t[_o],N=C[0];N=="\u4E0A"||N=="\u671D"||N=="\u65E9"||N=="\u51CC"?(c=0,u==12&&(u=0)):(N=="\u4E0B"||N=="\u664F"||N=="\u665A")&&(c=1,u!=12&&(u+=12))}if(i.start.assign("hour",u),i.start.assign("minute",l),c>=0?i.start.assign("meridiem",c):u<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=Y0.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let L=s.clone();if(i.end=e.createParsingComponents(),t[go]){var a=t[go];a=="\u660E"||a=="\u807D"?n.hour()>1&&L.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?L.add(-1,"day"):a=="\u524D"?L.add(-2,"day"):a=="\u5927\u524D"?L.add(-3,"day"):a=="\u5F8C"?L.add(2,"day"):a=="\u5927\u5F8C"&&L.add(3,"day"),i.end.assign("day",L.date()),i.end.assign("month",L.month()+1),i.end.assign("year",L.year())}else if(t[bo]){var o=t[bo];o=="\u660E"||o=="\u807D"?L.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?L.add(-1,"day"):o=="\u524D"?L.add(-2,"day"):o=="\u5927\u524D"?L.add(-3,"day"):o=="\u5F8C"?L.add(2,"day"):o=="\u5927\u5F8C"&&L.add(3,"day"),i.end.assign("day",L.date()),i.end.assign("month",L.month()+1),i.end.assign("year",L.year())}else i.end.imply("day",L.date()),i.end.imply("month",L.month()+1),i.end.imply("year",L.year());if(u=0,l=0,c=-1,t[wi]){var f=parseInt(t[wi]);if(isNaN(f)&&(f=Vt.zhStringToNumber(t[wi])),f>=60)return null;i.end.assign("second",f)}if(u=parseInt(t[vo]),isNaN(u)&&(u=Vt.zhStringToNumber(t[vo])),t[zt]?t[zt]=="\u534A"?l=30:t[zt]=="\u6B63"||t[zt]=="\u6574"?l=0:(l=parseInt(t[zt]),isNaN(l)&&(l=Vt.zhStringToNumber(t[zt]))):u>100&&(l=u%100,u=Math.floor(u/100)),l>=60||u>24)return null;if(u>=12&&(c=1),t[wo]){if(u>12)return null;var h=t[wo][0].toLowerCase();h=="a"&&(c=0,u==12&&(u=0)),h=="p"&&(c=1,u!=12&&(u+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[yo]){var T=t[yo],y=T[0];y=="\u671D"||y=="\u65E9"?(c=0,u==12&&(u=0)):y=="\u665A"&&(c=1,u!=12&&(u+=12))}else if(t[To]){var w=t[To],D=w[0];D=="\u4E0A"||D=="\u671D"||D=="\u65E9"||D=="\u51CC"?(c=0,u==12&&(u=0)):(D=="\u4E0B"||D=="\u664F"||D=="\u665A")&&(c=1,u!=12&&(u+=12))}else if(t[_o]){var C=t[_o],N=C[0];N=="\u4E0A"||N=="\u671D"||N=="\u65E9"||N=="\u51CC"?(c=0,u==12&&(u=0)):(N=="\u4E0B"||N=="\u664F"||N=="\u665A")&&(c=1,u!=12&&(u+=12))}return i.text=i.text+t[0],i.end.assign("hour",u),i.end.assign("minute",l),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>u?i.end.imply("meridiem",0):u>12&&i.end.imply("meridiem",1),i.end.date().getTime()<i.start.date().getTime()&&i.end.imply("day",i.end.get("day")+1),i}};$s.default=Vd});var Wy=_(Ys=>{"use strict";var G0=Ys&&Ys.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ys,"__esModule",{value:!0});var j0=G0(ye()),B0=W(),qy=vi(),H0=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(qy.WEEKDAY_OFFSET).join("|")+")"),Kd=class extends B0.AbstractParserWithWordBoundaryChecking{innerPattern(){return H0}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=qy.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=j0.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u)<Math.abs(s-u)?a=a.day(s-7):Math.abs(s+7-u)<Math.abs(s-u)?a=a.day(s+7):a=a.day(s),n.start.assign("weekday",s),o?(n.start.assign("day",a.date()),n.start.assign("month",a.month()+1),n.start.assign("year",a.year())):(n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())),n}};Ys.default=Kd});var $y=_(Gs=>{"use strict";var z0=Gs&&Gs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gs,"__esModule",{value:!0});var V0=z0(Tr()),Qd=class extends V0.default{patternBetween(){return/^\s*(至|到|\-|\~|～|－|ー)\s*$/i}};Gs.default=Qd});var Yy=_(js=>{"use strict";var K0=js&&js.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(js,"__esModule",{value:!0});var Q0=K0(Cr()),Xd=class extends Q0.default{patternBetween(){return/^\s*$/i}};js.default=Xd});var Gy=_(Ye=>{"use strict";var Lr=Ye&&Ye.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.createConfiguration=Ye.createCasualConfiguration=Ye.parseDate=Ye.parse=Ye.strict=Ye.casual=Ye.hant=void 0;var Zd=nr(),X0=Lr(Xa()),Z0=Ar(),J0=Lr(Cy()),ex=Lr(Py()),tx=Lr(Iy()),rx=Lr(Ly()),nx=Lr(Uy()),ix=Lr(Wy()),sx=Lr($y()),ax=Lr(Yy());Ye.hant=new Zd.Chrono(Jd());Ye.casual=new Zd.Chrono(Jd());Ye.strict=new Zd.Chrono(ef());function ox(r,e,t){return Ye.casual.parse(r,e,t)}Ye.parse=ox;function ux(r,e,t){return Ye.casual.parseDate(r,e,t)}Ye.parseDate=ux;function Jd(){let r=ef();return r.parsers.unshift(new J0.default),r}Ye.createCasualConfiguration=Jd;function ef(){let r=Z0.includeCommonConfiguration({parsers:[new ex.default,new rx.default,new ix.default,new nx.default,new tx.default],refiners:[new sx.default,new ax.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof X0.default)),r}Ye.createConfiguration=ef});var zy=_(Bs=>{"use strict";var lx=Bs&&Bs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bs,"__esModule",{value:!0});var cx=lx(ye()),dx=W(),fx=1,jy=2,px=3,By=4,Hy=5,hx=6,tf=class extends dx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(e,t){let n=t.index,i=e.createParsingResult(n,t[0]),s=cx.default(e.refDate),a=s;if(t[fx])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(t[jy]){let o=t[jy],u=t[px];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),u=="\u65E9"?i.start.imply("hour",6):u=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(t[By]){let u=t[By][0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}else if(t[Hy]){let o=t[Hy];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let u=t[hx];if(u){let l=u[0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Bs.default=tf});var Ei=_(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.zhStringToYear=Rt.zhStringToNumber=Rt.WEEKDAY_OFFSET=Rt.NUMBER=void 0;Rt.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};Rt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function mx(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?Rt.NUMBER[n]:e*Rt.NUMBER[n]:e+=Rt.NUMBER[n]}return e}Rt.zhStringToNumber=mx;function gx(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+Rt.NUMBER[n]}return parseInt(e)}Rt.zhStringToYear=gx});var Ky=_(Hs=>{"use strict";var yx=Hs&&Hs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hs,"__esModule",{value:!0});var Tx=yx(ye()),bx=W(),In=Ei(),rf=1,Vy=2,nf=3,sf=class extends bx.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(In.NUMBER).join("")+"]{4}|["+Object.keys(In.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(In.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(In.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=Tx.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=parseInt(t[Vy]);if(isNaN(s)&&(s=In.zhStringToNumber(t[Vy])),i.start.assign("month",s),t[nf]){let a=parseInt(t[nf]);isNaN(a)&&(a=In.zhStringToNumber(t[nf])),i.start.assign("day",a)}else i.start.imply("day",n.date());if(t[rf]){let a=parseInt(t[rf]);isNaN(a)&&(a=In.zhStringToYear(t[rf])),i.start.assign("year",a)}else i.start.imply("year",n.year());return i}};Hs.default=sf});var Xy=_(zs=>{"use strict";var _x=zs&&zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zs,"__esModule",{value:!0});var vx=_x(ye()),wx=W(),Qy=Ei(),Ex=new RegExp("(\\d+|["+Object.keys(Qy.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),af=1,kx=2,of=class extends wx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ex}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=parseInt(t[af]);if(isNaN(i)&&(i=Qy.zhStringToNumber(t[af])),isNaN(i)){let u=t[af];if(u==="\u51E0")i=3;else if(u==="\u534A")i=.5;else return null}let s=vx.default(e.refDate),o=t[kx][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),n.start.assign("year",s.year()),n.start.assign("month",s.month()+1),n.start.assign("day",s.date()),n):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),n.start.imply("year",s.year()),n.start.imply("month",s.month()+1),n.start.imply("day",s.date()),n.start.assign("hour",s.hour()),n.start.assign("minute",s.minute()),n.start.assign("second",s.second()),n)}};zs.default=of});var Jy=_(Vs=>{"use strict";var Sx=Vs&&Vs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vs,"__esModule",{value:!0});var Ox=Sx(ye()),Dx=W(),Zy=Ei(),xx=new RegExp("(?<prefix>\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(Zy.WEEKDAY_OFFSET).join("|")+")"),uf=class extends Dx.AbstractParserWithWordBoundaryChecking{innerPattern(){return xx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=Zy.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=t.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let u=Ox.default(e.refDate),l=!1,c=u.day();return a=="last"||a=="past"?(u=u.day(s-7),l=!0):a=="next"?(u=u.day(s+7),l=!0):a=="this"?u=u.day(s):Math.abs(s-7-c)<Math.abs(s-c)?u=u.day(s-7):Math.abs(s+7-c)<Math.abs(s-c)?u=u.day(s+7):u=u.day(s),n.start.assign("weekday",s),l?(n.start.assign("day",u.date()),n.start.assign("month",u.month()+1),n.start.assign("year",u.year())):(n.start.imply("day",u.date()),n.start.imply("month",u.month()+1),n.start.imply("year",u.year())),n}};Vs.default=uf});var eT=_(Ks=>{"use strict";var Rx=Ks&&Ks.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ks,"__esModule",{value:!0});var Mx=Rx(ye()),Cx=W(),Qt=Ei(),Ax=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Qt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Qt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Qt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Px=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Qt.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Qt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Qt.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Eo=1,ko=2,So=3,Oo=4,Do=5,xo=6,Kt=7,ki=8,Ro=9,lf=class extends Cx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ax}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=Mx.default(e.refDate),i=e.createParsingResult(t.index,t[0]),s=n.clone();if(t[Eo]){let c=t[Eo];c=="\u660E"?n.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(t[Oo]){let c=t[Oo];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,u=-1;if(t[ki]){let c=parseInt(t[ki]);if(isNaN(c)&&(c=Qt.zhStringToNumber(t[ki])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(t[xo]),isNaN(a)&&(a=Qt.zhStringToNumber(t[xo])),t[Kt]?t[Kt]=="\u534A"?o=30:t[Kt]=="\u6B63"||t[Kt]=="\u6574"?o=0:(o=parseInt(t[Kt]),isNaN(o)&&(o=Qt.zhStringToNumber(t[Kt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Ro]){if(a>12)return null;let c=t[Ro][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12))}else if(t[ko]){let f=t[ko][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[So]){let f=t[So][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Do]){let f=t[Do][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),u>=0?i.start.assign("meridiem",u):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),t=Px.exec(e.text.substring(i.index+i.text.length)),!t)return i.text.match(/^\d+$/)?null:i;let l=s.clone();if(i.end=e.createParsingComponents(),t[Eo]){let c=t[Eo];c=="\u660E"?n.hour()>1&&l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else if(t[Oo]){let c=t[Oo];c=="\u660E"?l.add(1,"day"):c=="\u6628"?l.add(-1,"day"):c=="\u524D"?l.add(-2,"day"):c=="\u5927\u524D"?l.add(-3,"day"):c=="\u540E"?l.add(2,"day"):c=="\u5927\u540E"&&l.add(3,"day"),i.end.assign("day",l.date()),i.end.assign("month",l.month()+1),i.end.assign("year",l.year())}else i.end.imply("day",l.date()),i.end.imply("month",l.month()+1),i.end.imply("year",l.year());if(a=0,o=0,u=-1,t[ki]){let c=parseInt(t[ki]);if(isNaN(c)&&(c=Qt.zhStringToNumber(t[ki])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(t[xo]),isNaN(a)&&(a=Qt.zhStringToNumber(t[xo])),t[Kt]?t[Kt]=="\u534A"?o=30:t[Kt]=="\u6B63"||t[Kt]=="\u6574"?o=0:(o=parseInt(t[Kt]),isNaN(o)&&(o=Qt.zhStringToNumber(t[Kt]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(u=1),t[Ro]){if(a>12)return null;let c=t[Ro][0].toLowerCase();c=="a"&&(u=0,a==12&&(a=0)),c=="p"&&(u=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(u==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(t[ko]){let f=t[ko][0];f=="\u65E9"?(u=0,a==12&&(a=0)):f=="\u665A"&&(u=1,a!=12&&(a+=12))}else if(t[So]){let f=t[So][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}else if(t[Do]){let f=t[Do][0];f=="\u4E0A"||f=="\u65E9"||f=="\u51CC"?(u=0,a==12&&(a=0)):(f=="\u4E0B"||f=="\u665A")&&(u=1,a!=12&&(a+=12))}return i.text=i.text+t[0],i.end.assign("hour",a),i.end.assign("minute",o),u>=0?i.end.assign("meridiem",u):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime()<i.start.date().getTime()&&i.end.imply("day",i.end.get("day")+1),i}};Ks.default=lf});var rT=_(Qs=>{"use strict";var Nx=Qs&&Qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qs,"__esModule",{value:!0});var Ix=Nx(ye()),Fx=W(),tT=Ei(),Lx=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(tT.WEEKDAY_OFFSET).join("|")+")"),cf=class extends Fx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Lx}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=t.groups.weekday,s=tT.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=Ix.default(e.refDate),o=!1,u=a.day();return Math.abs(s-7-u)<Math.abs(s-u)?a=a.day(s-7):Math.abs(s+7-u)<Math.abs(s-u)?a=a.day(s+7):a=a.day(s),n.start.assign("weekday",s),o?(n.start.assign("day",a.date()),n.start.assign("month",a.month()+1),n.start.assign("year",a.year())):(n.start.imply("day",a.date()),n.start.imply("month",a.month()+1),n.start.imply("year",a.year())),n}};Qs.default=cf});var nT=_(Xs=>{"use strict";var Ux=Xs&&Xs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xs,"__esModule",{value:!0});var qx=Ux(Tr()),df=class extends qx.default{patternBetween(){return/^\s*(至|到|-|~|～|－|ー)\s*$/i}};Xs.default=df});var iT=_(Zs=>{"use strict";var Wx=Zs&&Zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zs,"__esModule",{value:!0});var $x=Wx(Cr()),ff=class extends $x.default{patternBetween(){return/^\s*$/i}};Zs.default=ff});var sT=_(Ge=>{"use strict";var Ur=Ge&&Ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.createConfiguration=Ge.createCasualConfiguration=Ge.parseDate=Ge.parse=Ge.strict=Ge.casual=Ge.hans=void 0;var pf=nr(),Yx=Ur(Xa()),Gx=Ar(),jx=Ur(zy()),Bx=Ur(Ky()),Hx=Ur(Xy()),zx=Ur(Jy()),Vx=Ur(eT()),Kx=Ur(rT()),Qx=Ur(nT()),Xx=Ur(iT());Ge.hans=new pf.Chrono(hf());Ge.casual=new pf.Chrono(hf());Ge.strict=new pf.Chrono(mf());function Zx(r,e,t){return Ge.casual.parse(r,e,t)}Ge.parse=Zx;function Jx(r,e,t){return Ge.casual.parseDate(r,e,t)}Ge.parseDate=Jx;function hf(){let r=mf();return r.parsers.unshift(new jx.default),r}Ge.createCasualConfiguration=hf;function mf(){let r=Gx.includeCommonConfiguration({parsers:[new Bx.default,new zx.default,new Kx.default,new Vx.default,new Hx.default],refiners:[new Qx.default,new Xx.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof Yx.default)),r}Ge.createConfiguration=mf});var oT=_(At=>{"use strict";var aT=At&&At.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),eR=At&&At.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),tR=At&&At.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&aT(e,r,t)},rR=At&&At.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&aT(e,r,t);return eR(e,r),e};Object.defineProperty(At,"__esModule",{value:!0});At.hans=void 0;tR(Gy(),At);At.hans=rR(sT())});var Mt=_(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.parseTimeUnits=ee.TIME_UNITS_PATTERN=ee.parseYear=ee.YEAR_PATTERN=ee.parseOrdinalNumberPattern=ee.ORDINAL_NUMBER_PATTERN=ee.parseNumberPattern=ee.NUMBER_PATTERN=ee.TIME_UNIT_DICTIONARY=ee.ORDINAL_WORD_DICTIONARY=ee.INTEGER_WORD_DICTIONARY=ee.MONTH_DICTIONARY=ee.FULL_MONTH_NAME_DICTIONARY=ee.WEEKDAY_DICTIONARY=ee.REGEX_PARTS=void 0;var Mo=Ee(),nR=st();ee.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};ee.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};ee.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};ee.MONTH_DICTIONARY=Object.assign(Object.assign({},ee.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});ee.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};ee.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};ee.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};ee.NUMBER_PATTERN=`(?:${Mo.matchAnyPattern(ee.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function lT(r){let e=r.toLowerCase();return ee.INTEGER_WORD_DICTIONARY[e]!==void 0?ee.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}ee.parseNumberPattern=lT;ee.ORDINAL_NUMBER_PATTERN=`(?:${Mo.matchAnyPattern(ee.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function iR(r){let e=r.toLowerCase();return ee.ORDINAL_WORD_DICTIONARY[e]!==void 0?ee.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ee.parseOrdinalNumberPattern=iR;var gf="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";ee.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${gf}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${gf}|[5-9][0-9]${gf})`;function sR(r){if(/(год|года|г|г.)/i.test(r)&&(r=r.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(r))return r=r.replace(/(до н.э.|до н. э.)/i,""),-parseInt(r);if(/(н. э.|н.э.)/i.test(r))return r=r.replace(/(н. э.|н.э.)/i,""),parseInt(r);let e=parseInt(r);return nR.findMostLikelyADYear(e)}ee.parseYear=sR;var cT=`(${ee.NUMBER_PATTERN})\\s{0,3}(${Mo.matchAnyPattern(ee.TIME_UNIT_DICTIONARY)})`,uT=new RegExp(cT,"i");ee.TIME_UNITS_PATTERN=Mo.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",cT);function aR(r){let e={},t=r,n=uT.exec(t);for(;n;)oR(e,n),t=t.substring(n[0].length).trim(),n=uT.exec(t);return e}ee.parseTimeUnits=aR;function oR(r,e){let t=lT(e[1]),n=ee.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var fT=_(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});var Js=Mt(),uR=Ie(),lR=W(),dT=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Js.TIME_UNITS_PATTERN})${Js.REGEX_PARTS.rightBoundary}`,cR=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${dT}`,Js.REGEX_PARTS.flags),dR=new RegExp(dT,"i"),yf=class extends lR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Js.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?dR:cR}innerExtract(e,t){let n=Js.parseTimeUnits(t[1]);return uR.ParsingComponents.createRelativeFromReference(e.reference,n)}};Tf.default=yf});var yT=_(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var fR=st(),ea=Mt(),gT=Mt(),Co=Mt(),pR=Ee(),hR=W(),mR=new RegExp(`(?:\u0441)?\\s*(${Co.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Co.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${pR.matchAnyPattern(ea.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${gT.YEAR_PATTERN}(?![^\\s]\\d)))?${ea.REGEX_PARTS.rightBoundary}`,ea.REGEX_PARTS.flags),pT=1,hT=2,gR=3,mT=4,bf=class extends hR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ea.REGEX_PARTS.leftBoundary}innerPattern(){return mR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),i=ea.MONTH_DICTIONARY[t[gR].toLowerCase()],s=Co.parseOrdinalNumberPattern(t[pT]);if(s>31)return t.index=t.index+t[pT].length,null;if(n.start.assign("month",i),n.start.assign("day",s),t[mT]){let a=gT.parseYear(t[mT]);n.start.assign("year",a)}else{let a=fR.findYearClosestToRef(e.refDate,s,i);n.start.imply("year",a)}if(t[hT]){let a=Co.parseOrdinalNumberPattern(t[hT]);n.end=n.start.clone(),n.end.assign("day",a)}return n}};_f.default=bf});var _T=_(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var ta=Mt(),yR=st(),TR=Ee(),bT=Mt(),bR=W(),_R=new RegExp(`((?:\u0432)\\s*)?(${TR.matchAnyPattern(ta.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${bT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,ta.REGEX_PARTS.flags),vR=2,TT=3,vf=class extends bR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ta.REGEX_PARTS.leftBoundary}innerPattern(){return _R}innerExtract(e,t){let n=t[vR].toLowerCase();if(t[0].length<=3&&!ta.FULL_MONTH_NAME_DICTIONARY[n])return null;let i=e.createParsingResult(t.index,t.index+t[0].length);i.start.imply("day",1);let s=ta.MONTH_DICTIONARY[n];if(i.start.assign("month",s),t[TT]){let a=bT.parseYear(t[TT]);i.start.assign("year",a)}else{let a=yR.findYearClosestToRef(e.refDate,1,s);i.start.imply("year",a)}return i}};wf.default=vf});var wT=_(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});var Ao=Be(),wR=xn(),vT=Mt(),Ef=class extends wR.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return vT.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${vT.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(e,t){let n=super.extractPrimaryTimeComponents(e,t);if(n){if(t[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=n.get("hour");i>=6&&i<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Ao.Meridiem.PM)):i<6&&n.assign("meridiem",Ao.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",Ao.Meridiem.PM);let i=n.get("hour");i>=0&&i<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",Ao.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};kf.default=Ef});var ET=_(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});var Po=Mt(),ER=Ie(),kR=W(),SR=Bt(),OR=new RegExp(`(${Po.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Po.REGEX_PARTS.flags),Sf=class extends kR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Po.REGEX_PARTS.leftBoundary}innerPattern(){return OR}innerExtract(e,t){let n=Po.parseTimeUnits(t[1]),i=SR.reverseTimeUnits(n);return ER.ParsingComponents.createRelativeFromReference(e.reference,i)}};Of.default=Sf});var kT=_(ra=>{"use strict";var DR=ra&&ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ra,"__esModule",{value:!0});var xR=DR(Tr()),Df=class extends xR.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};ra.default=Df});var ST=_(na=>{"use strict";var RR=na&&na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(na,"__esModule",{value:!0});var MR=RR(Cr()),xf=class extends MR.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};na.default=xf});var OT=_(qr=>{"use strict";var CR=qr&&qr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),AR=qr&&qr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),PR=qr&&qr.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&CR(e,r,t);return AR(e,r),e};Object.defineProperty(qr,"__esModule",{value:!0});var NR=W(),ia=PR(Nr()),Rf=Mt(),IR=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${Rf.REGEX_PARTS.rightBoundary}`,Rf.REGEX_PARTS.flags),Mf=class extends NR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Rf.REGEX_PARTS.leftBoundary}innerPattern(e){return IR}innerExtract(e,t){let n=t[1].toLowerCase(),i=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return ia.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return ia.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return ia.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return ia.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return ia.theDayBefore(e.reference,2)}return i}};qr.default=Mf});var DT=_(ur=>{"use strict";var FR=ur&&ur.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),LR=ur&&ur.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),UR=ur&&ur.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&FR(e,r,t);return LR(e,r),e},qR=ur&&ur.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ur,"__esModule",{value:!0});var WR=W(),Fn=UR(Nr()),$R=jt(),YR=qR(ye()),Cf=Mt(),GR=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${Cf.REGEX_PARTS.rightBoundary}`,Cf.REGEX_PARTS.flags),Af=class extends WR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Cf.REGEX_PARTS.leftBoundary}innerPattern(){return GR}innerExtract(e,t){let n=YR.default(e.refDate),i=t[0].toLowerCase(),s=e.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return Fn.now(e.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return Fn.evening(e.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return Fn.morning(e.reference);if(i.match(/в\s*полдень/))return Fn.noon(e.reference);if(i.match(/прошлой\s*ночью/))return Fn.lastNight(e.reference);if(i.match(/прошлым\s*вечером/))return Fn.yesterdayEvening(e.reference);if(i.match(/следующей\s*ночью/)){let a=n.hour()<22?1:2;n=n.add(a,"day"),$R.assignSimilarDate(s,n),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?Fn.midnight(e.reference):s}};ur.default=Af});var xT=_(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});var sa=Mt(),jR=Ee(),BR=W(),HR=Mn(),zR=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${jR.matchAnyPattern(sa.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${sa.REGEX_PARTS.rightBoundary}`,sa.REGEX_PARTS.flags),VR=1,KR=2,QR=3,Pf=class extends BR.AbstractParserWithWordBoundaryChecking{innerPattern(){return zR}patternLeftBoundary(){return sa.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[KR].toLowerCase(),i=sa.WEEKDAY_DICTIONARY[n],s=t[VR],a=t[QR],o=s||a;o=o||"",o=o.toLowerCase();let u=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?u="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?u="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(u="this");let l=HR.toDayJSWeekday(e.refDate,i,u);return e.createParsingComponents().assign("weekday",i).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};Nf.default=Pf});var MT=_(oa=>{"use strict";var XR=oa&&oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oa,"__esModule",{value:!0});var aa=Mt(),RT=Ie(),ZR=XR(ye()),JR=W(),eM=Ee(),tM=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${eM.matchAnyPattern(aa.TIME_UNIT_DICTIONARY)})(?=\\s*)${aa.REGEX_PARTS.rightBoundary}`,aa.REGEX_PARTS.flags),rM=1,nM=2,If=class extends JR.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return aa.REGEX_PARTS.leftBoundary}innerPattern(){return tM}innerExtract(e,t){let n=t[rM].toLowerCase(),i=t[nM].toLowerCase(),s=aa.TIME_UNIT_DICTIONARY[i];if(n=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||n=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let u={};return u[s]=1,RT.ParsingComponents.createRelativeFromReference(e.reference,u)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let u={};return u[s]=-1,RT.ParsingComponents.createRelativeFromReference(e.reference,u)}let a=e.createParsingComponents(),o=ZR.default(e.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};oa.default=If});var CT=_(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});var ua=Mt(),iM=Ie(),sM=W(),aM=Bt(),oM=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${ua.TIME_UNITS_PATTERN})${ua.REGEX_PARTS.rightBoundary}`,ua.REGEX_PARTS.flags),Ff=class extends sM.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ua.REGEX_PARTS.leftBoundary}innerPattern(){return oM}innerExtract(e,t){let n=t[1].toLowerCase(),i=ua.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=aM.reverseTimeUnits(i);break}return iM.ParsingComponents.createRelativeFromReference(e.reference,i)}};Lf.default=Ff});var NT=_(Je=>{"use strict";var Pt=Je&&Je.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Je,"__esModule",{value:!0});Je.createConfiguration=Je.createCasualConfiguration=Je.parseDate=Je.parse=Je.strict=Je.casual=void 0;var uM=Pt(fT()),lM=Pt(yT()),cM=Pt(_T()),dM=Pt(wT()),fM=Pt(ET()),pM=Pt(kT()),hM=Pt(ST()),mM=Ar(),gM=Pt(OT()),yM=Pt(DT()),TM=Pt(xT()),bM=Pt(MT()),AT=nr(),_M=Pt(Cn()),vM=Pt(CT());Je.casual=new AT.Chrono(PT());Je.strict=new AT.Chrono(Uf(!0));function wM(r,e,t){return Je.casual.parse(r,e,t)}Je.parse=wM;function EM(r,e,t){return Je.casual.parseDate(r,e,t)}Je.parseDate=EM;function PT(){let r=Uf(!1);return r.parsers.unshift(new gM.default),r.parsers.unshift(new yM.default),r.parsers.unshift(new cM.default),r.parsers.unshift(new bM.default),r.parsers.unshift(new vM.default),r}Je.createCasualConfiguration=PT;function Uf(r=!0){return mM.includeCommonConfiguration({parsers:[new _M.default(!0),new uM.default,new lM.default,new TM.default,new dM.default(r),new fM.default],refiners:[new hM.default,new pM.default]},r)}Je.createConfiguration=Uf});var Be=_(ne=>{"use strict";var kM=ne&&ne.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),SM=ne&&ne.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ln=ne&&ne.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&kM(e,r,t);return SM(e,r),e};Object.defineProperty(ne,"__esModule",{value:!0});ne.parseDate=ne.parse=ne.casual=ne.strict=ne.ru=ne.zh=ne.nl=ne.pt=ne.ja=ne.fr=ne.de=ne.Meridiem=ne.Chrono=ne.en=void 0;var qf=ln(tc());ne.en=qf;var OM=nr();Object.defineProperty(ne,"Chrono",{enumerable:!0,get:function(){return OM.Chrono}});var DM;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(DM=ne.Meridiem||(ne.Meridiem={}));var xM=ln(Gm());ne.de=xM;var RM=ln(Tg());ne.fr=RM;var MM=ln(Dg());ne.ja=MM;var CM=ln(Gg());ne.pt=CM;var AM=ln(Dy());ne.nl=AM;var PM=ln(oT());ne.zh=PM;var NM=ln(NT());ne.ru=NM;ne.strict=qf.strict;ne.casual=qf.casual;function IM(r,e,t){return ne.casual.parse(r,e,t)}ne.parse=IM;function FM(r,e,t){return ne.casual.parseDate(r,e,t)}ne.parseDate=FM});var Cb=_((Rb,Mb)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(p){return Object.prototype.toString.call(p)==="[object Array]"},n=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",u=o?setImmediate:setTimeout,l=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(d){var p=Object.getOwnPropertyNames(d);return p.push.apply(p,Object.getOwnPropertySymbols(d)),p}:Object.keys;function c(){this._events={},this._conf&&f.call(this,this._conf)}function f(d){d&&(this._conf=d,d.delimiter&&(this.delimiter=d.delimiter),d.maxListeners!==r&&(this._maxListeners=d.maxListeners),d.wildcard&&(this.wildcard=d.wildcard),d.newListener&&(this._newListener=d.newListener),d.removeListener&&(this._removeListener=d.removeListener),d.verboseMemoryLeak&&(this.verboseMemoryLeak=d.verboseMemoryLeak),d.ignoreErrors&&(this.ignoreErrors=d.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function h(d,p){var m="(node) warning: possible EventEmitter memory leak detected. "+d+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(m+=" Event name: "+p+"."),typeof process!="undefined"&&process.emitWarning){var g=new Error(m);g.name="MaxListenersExceededWarning",g.emitter=this,g.count=d,process.emitWarning(g)}else console.error(m),console.trace&&console.trace()}var T=function(d,p,m){var g=arguments.length;switch(g){case 0:return[];case 1:return[d];case 2:return[d,p];case 3:return[d,p,m];default:for(var b=new Array(g);g--;)b[g]=arguments[g];return b}};function y(d,p){for(var m={},g,b=d.length,v=p?p.length:0,k=0;k<b;k++)g=d[k],m[g]=k<v?p[k]:r;return m}function w(d,p,m){this._emitter=d,this._target=p,this._listeners={},this._listenersCount=0;var g,b;if((m.on||m.off)&&(g=m.on,b=m.off),p.addEventListener?(g=p.addEventListener,b=p.removeEventListener):p.addListener?(g=p.addListener,b=p.removeListener):p.on&&(g=p.on,b=p.off),!g&&!b)throw Error("target does not implement any known event API");if(typeof g!="function")throw TypeError("on method must be a function");if(typeof b!="function")throw TypeError("off method must be a function");this._on=g,this._off=b;var v=d._observers;v?v.push(this):d._observers=[this]}Object.assign(w.prototype,{subscribe:function(d,p,m){var g=this,b=this._target,v=this._emitter,k=this._listeners,x=function(){var S=T.apply(null,arguments),O={data:S,name:p,original:d};if(m){var I=m.call(b,O);I!==!1&&v.emit.apply(v,[O.name].concat(S));return}v.emit.apply(v,[p].concat(S))};if(k[d])throw Error("Event '"+d+"' is already listening");this._listenersCount++,v._newListener&&v._removeListener&&!g._onNewListener?(this._onNewListener=function(S){S===p&&k[d]===null&&(k[d]=x,g._on.call(b,d,x))},v.on("newListener",this._onNewListener),this._onRemoveListener=function(S){S===p&&!v.hasListeners(S)&&k[d]&&(k[d]=null,g._off.call(b,d,x))},k[d]=null,v.on("removeListener",this._onRemoveListener)):(k[d]=x,g._on.call(b,d,x))},unsubscribe:function(d){var p=this,m=this._listeners,g=this._emitter,b,v,k=this._off,x=this._target,S;if(d&&typeof d!="string")throw TypeError("event must be a string");function O(){p._onNewListener&&(g.off("newListener",p._onNewListener),g.off("removeListener",p._onRemoveListener),p._onNewListener=null,p._onRemoveListener=null);var I=ie.call(g,p);g._observers.splice(I,1)}if(d){if(b=m[d],!b)return;k.call(x,d,b),delete m[d],--this._listenersCount||O()}else{for(v=l(m),S=v.length;S-- >0;)d=v[S],k.call(x,d,m[d]);this._listeners={},this._listenersCount=0,O()}}});function D(d,p,m,g){var b=Object.assign({},p);if(!d)return b;if(typeof d!="object")throw TypeError("options must be an object");var v=Object.keys(d),k=v.length,x,S,O;function I(se){throw Error('Invalid "'+x+'" option value'+(se?". Reason: "+se:""))}for(var me=0;me<k;me++){if(x=v[me],!g&&!e.call(p,x))throw Error('Unknown "'+x+'" option');S=d[x],S!==r&&(O=m[x],b[x]=O?O(S,I):S)}return b}function C(d,p){return(typeof d!="function"||!d.hasOwnProperty("prototype"))&&p("value must be a constructor"),d}function N(d){var p="value must be type of "+d.join("|"),m=d.length,g=d[0],b=d[1];return m===1?function(v,k){if(typeof v===g)return v;k(p)}:m===2?function(v,k){var x=typeof v;if(x===g||x===b)return v;k(p)}:function(v,k){for(var x=typeof v,S=m;S-- >0;)if(x===d[S])return v;k(p)}}var L=N(["function"]),oe=N(["object","function"]);function z(d,p,m){var g,b,v=0,k,x=new d(function(S,O,I){m=D(m,{timeout:0,overload:!1},{timeout:function(De,q){return De*=1,(typeof De!="number"||De<0||!Number.isFinite(De))&&q("timeout must be a positive number"),De}}),g=!m.overload&&typeof d.prototype.cancel=="function"&&typeof I=="function";function me(){b&&(b=null),v&&(clearTimeout(v),v=0)}var se=function(De){me(),S(De)},te=function(De){me(),O(De)};g?p(se,te,I):(b=[function(De){te(De||Error("canceled"))}],p(se,te,function(De){if(k)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof De!="function")throw TypeError("onCancel callback must be a function");b.push(De)}),k=!0),m.timeout>0&&(v=setTimeout(function(){var De=Error("timeout");De.code="ETIMEDOUT",v=0,x.cancel(De),O(De)},m.timeout))});return g||(x.cancel=function(S){if(!!b){for(var O=b.length,I=1;I<O;I++)b[I](S);b[0](S),b=null}}),x}function ie(d){var p=this._observers;if(!p)return-1;for(var m=p.length,g=0;g<m;g++)if(p[g]._target===d)return g;return-1}function G(d,p,m,g,b){if(!m)return null;if(g===0){var v=typeof p;if(v==="string"){var k,x,S=0,O=0,I=this.delimiter,me=I.length;if((x=p.indexOf(I))!==-1){k=new Array(5);do k[S++]=p.slice(O,x),O=x+me;while((x=p.indexOf(I,O))!==-1);k[S++]=p.slice(O),p=k,b=S}else p=[p],b=1}else v==="object"?b=p.length:(p=[p],b=1)}var se=null,te,De,q,Re,Ae,nt=p[g],Mr=p[g+1],We,Ue;if(g===b)m._listeners&&(typeof m._listeners=="function"?(d&&d.push(m._listeners),se=[m]):(d&&d.push.apply(d,m._listeners),se=[m]));else if(nt==="*"){for(We=l(m),x=We.length;x-- >0;)te=We[x],te!=="_listeners"&&(Ue=G(d,p,m[te],g+1,b),Ue&&(se?se.push.apply(se,Ue):se=Ue));return se}else if(nt==="**"){for(Ae=g+1===b||g+2===b&&Mr==="*",Ae&&m._listeners&&(se=G(d,p,m,b,b)),We=l(m),x=We.length;x-- >0;)te=We[x],te!=="_listeners"&&(te==="*"||te==="**"?(m[te]._listeners&&!Ae&&(Ue=G(d,p,m[te],b,b),Ue&&(se?se.push.apply(se,Ue):se=Ue)),Ue=G(d,p,m[te],g,b)):te===Mr?Ue=G(d,p,m[te],g+2,b):Ue=G(d,p,m[te],g,b),Ue&&(se?se.push.apply(se,Ue):se=Ue));return se}else m[nt]&&(se=G(d,p,m[nt],g+1,b));if(De=m["*"],De&&G(d,p,De,g+1,b),q=m["**"],q)if(g<b)for(q._listeners&&G(d,p,q,b,b),We=l(q),x=We.length;x-- >0;)te=We[x],te!=="_listeners"&&(te===Mr?G(d,p,q[te],g+2,b):te===nt?G(d,p,q[te],g+1,b):(Re={},Re[te]=q[te],G(d,p,{"**":Re},g+1,b)));else q._listeners?G(d,p,q,b,b):q["*"]&&q["*"]._listeners&&G(d,p,q["*"],b,b);return se}function j(d,p,m){var g=0,b=0,v,k=this.delimiter,x=k.length,S;if(typeof d=="string")if((v=d.indexOf(k))!==-1){S=new Array(5);do S[g++]=d.slice(b,v),b=v+x;while((v=d.indexOf(k,b))!==-1);S[g++]=d.slice(b)}else S=[d],g=1;else S=d,g=d.length;if(g>1){for(v=0;v+1<g;v++)if(S[v]==="**"&&S[v+1]==="**")return}var O=this.listenerTree,I;for(v=0;v<g;v++)if(I=S[v],O=O[I]||(O[I]={}),v===g-1)return O._listeners?(typeof O._listeners=="function"&&(O._listeners=[O._listeners]),m?O._listeners.unshift(p):O._listeners.push(p),!O._listeners.warned&&this._maxListeners>0&&O._listeners.length>this._maxListeners&&(O._listeners.warned=!0,h.call(this,O._listeners.length,I))):O._listeners=p,!0;return!0}function Ne(d,p,m,g){for(var b=l(d),v=b.length,k,x,S,O=d._listeners,I;v-- >0;)x=b[v],k=d[x],x==="_listeners"?S=m:S=m?m.concat(x):[x],I=g||typeof x=="symbol",O&&p.push(I?S:S.join(this.delimiter)),typeof k=="object"&&Ne.call(this,k,p,S,I);return p}function Le(d){for(var p=l(d),m=p.length,g,b,v;m-- >0;)b=p[m],g=d[b],g&&(v=!0,b!=="_listeners"&&!Le(g)&&delete d[b]);return v}function B(d,p,m){this.emitter=d,this.event=p,this.listener=m}B.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function A(d,p,m){if(m===!0)b=!0;else if(m===!1)g=!0;else{if(!m||typeof m!="object")throw TypeError("options should be an object or true");var g=m.async,b=m.promisify,v=m.nextTick,k=m.objectify}if(g||v||b){var x=p,S=p._origin||p;if(v&&!i)throw Error("process.nextTick is not supported");b===r&&(b=p.constructor.name==="AsyncFunction"),p=function(){var O=arguments,I=this,me=this.event;return b?v?Promise.resolve():new Promise(function(se){u(se)}).then(function(){return I.event=me,x.apply(I,O)}):(v?process.nextTick:u)(function(){I.event=me,x.apply(I,O)})},p._async=!0,p._origin=S}return[p,k?new B(this,d,p):this]}function E(d){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,f.call(this,d)}E.EventEmitter2=E,E.prototype.listenTo=function(d,p,m){if(typeof d!="object")throw TypeError("target musts be an object");var g=this;m=D(m,{on:r,off:r,reducers:r},{on:L,off:L,reducers:oe});function b(v){if(typeof v!="object")throw TypeError("events must be an object");var k=m.reducers,x=ie.call(g,d),S;x===-1?S=new w(g,d,m):S=g._observers[x];for(var O=l(v),I=O.length,me,se=typeof k=="function",te=0;te<I;te++)me=O[te],S.subscribe(me,v[me]||me,se?k:k&&k[me])}return t(p)?b(y(p)):b(typeof p=="string"?y(p.split(/\s+/)):p),this},E.prototype.stopListeningTo=function(d,p){var m=this._observers;if(!m)return!1;var g=m.length,b,v=!1;if(d&&typeof d!="object")throw TypeError("target should be an object");for(;g-- >0;)b=m[g],(!d||b._target===d)&&(b.unsubscribe(p),v=!0);return v},E.prototype.delimiter=".",E.prototype.setMaxListeners=function(d){d!==r&&(this._maxListeners=d,this._conf||(this._conf={}),this._conf.maxListeners=d)},E.prototype.getMaxListeners=function(){return this._maxListeners},E.prototype.event="",E.prototype.once=function(d,p,m){return this._once(d,p,!1,m)},E.prototype.prependOnceListener=function(d,p,m){return this._once(d,p,!0,m)},E.prototype._once=function(d,p,m,g){return this._many(d,1,p,m,g)},E.prototype.many=function(d,p,m,g){return this._many(d,p,m,!1,g)},E.prototype.prependMany=function(d,p,m,g){return this._many(d,p,m,!0,g)},E.prototype._many=function(d,p,m,g,b){var v=this;if(typeof m!="function")throw new Error("many only accepts instances of Function");function k(){return--p===0&&v.off(d,k),m.apply(this,arguments)}return k._origin=m,this._on(d,k,g,b)},E.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var d=arguments[0],p,m=this.wildcard,g,b,v,k,x;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(m&&(p=d,d!=="newListener"&&d!=="removeListener"&&typeof d=="object")){if(b=d.length,s){for(v=0;v<b;v++)if(typeof d[v]=="symbol"){x=!0;break}}x||(d=d.join(this.delimiter))}var S=arguments.length,O;if(this._all&&this._all.length)for(O=this._all.slice(),v=0,b=O.length;v<b;v++)switch(this.event=d,S){case 1:O[v].call(this,d);break;case 2:O[v].call(this,d,arguments[1]);break;case 3:O[v].call(this,d,arguments[1],arguments[2]);break;default:O[v].apply(this,arguments)}if(m)O=[],G.call(this,O,p,this.listenerTree,0,b);else if(O=this._events[d],typeof O=="function"){switch(this.event=d,S){case 1:O.call(this);break;case 2:O.call(this,arguments[1]);break;case 3:O.call(this,arguments[1],arguments[2]);break;default:for(g=new Array(S-1),k=1;k<S;k++)g[k-1]=arguments[k];O.apply(this,g)}return!0}else O&&(O=O.slice());if(O&&O.length){if(S>3)for(g=new Array(S-1),k=1;k<S;k++)g[k-1]=arguments[k];for(v=0,b=O.length;v<b;v++)switch(this.event=d,S){case 1:O[v].call(this);break;case 2:O[v].call(this,arguments[1]);break;case 3:O[v].call(this,arguments[1],arguments[2]);break;default:O[v].apply(this,g)}return!0}else if(!this.ignoreErrors&&!this._all&&d==="error")throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},E.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var d=arguments[0],p=this.wildcard,m,g,b,v,k,x;if(d==="newListener"&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(p&&(m=d,d!=="newListener"&&d!=="removeListener"&&typeof d=="object")){if(v=d.length,s){for(k=0;k<v;k++)if(typeof d[k]=="symbol"){g=!0;break}}g||(d=d.join(this.delimiter))}var S=[],O=arguments.length,I;if(this._all)for(k=0,v=this._all.length;k<v;k++)switch(this.event=d,O){case 1:S.push(this._all[k].call(this,d));break;case 2:S.push(this._all[k].call(this,d,arguments[1]));break;case 3:S.push(this._all[k].call(this,d,arguments[1],arguments[2]));break;default:S.push(this._all[k].apply(this,arguments))}if(p?(I=[],G.call(this,I,m,this.listenerTree,0)):I=this._events[d],typeof I=="function")switch(this.event=d,O){case 1:S.push(I.call(this));break;case 2:S.push(I.call(this,arguments[1]));break;case 3:S.push(I.call(this,arguments[1],arguments[2]));break;default:for(b=new Array(O-1),x=1;x<O;x++)b[x-1]=arguments[x];S.push(I.apply(this,b))}else if(I&&I.length){if(I=I.slice(),O>3)for(b=new Array(O-1),x=1;x<O;x++)b[x-1]=arguments[x];for(k=0,v=I.length;k<v;k++)switch(this.event=d,O){case 1:S.push(I[k].call(this));break;case 2:S.push(I[k].call(this,arguments[1]));break;case 3:S.push(I[k].call(this,arguments[1],arguments[2]));break;default:S.push(I[k].apply(this,b))}}else if(!this.ignoreErrors&&!this._all&&d==="error")return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(S)},E.prototype.on=function(d,p,m){return this._on(d,p,!1,m)},E.prototype.prependListener=function(d,p,m){return this._on(d,p,!0,m)},E.prototype.onAny=function(d){return this._onAny(d,!1)},E.prototype.prependAny=function(d){return this._onAny(d,!0)},E.prototype.addListener=E.prototype.on,E.prototype._onAny=function(d,p){if(typeof d!="function")throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),p?this._all.unshift(d):this._all.push(d),this},E.prototype._on=function(d,p,m,g){if(typeof d=="function")return this._onAny(d,p),this;if(typeof p!="function")throw new Error("on only accepts instances of Function");this._events||c.call(this);var b=this,v;return g!==r&&(v=A.call(this,d,p,g),p=v[0],b=v[1]),this._newListener&&this.emit("newListener",d,p),this.wildcard?(j.call(this,d,p,m),b):(this._events[d]?(typeof this._events[d]=="function"&&(this._events[d]=[this._events[d]]),m?this._events[d].unshift(p):this._events[d].push(p),!this._events[d].warned&&this._maxListeners>0&&this._events[d].length>this._maxListeners&&(this._events[d].warned=!0,h.call(this,this._events[d].length,d))):this._events[d]=p,b)},E.prototype.off=function(d,p){if(typeof p!="function")throw new Error("removeListener only takes instances of Function");var m,g=[];if(this.wildcard){var b=typeof d=="string"?d.split(this.delimiter):d.slice();if(g=G.call(this,null,b,this.listenerTree,0),!g)return this}else{if(!this._events[d])return this;m=this._events[d],g.push({_listeners:m})}for(var v=0;v<g.length;v++){var k=g[v];if(m=k._listeners,t(m)){for(var x=-1,S=0,O=m.length;S<O;S++)if(m[S]===p||m[S].listener&&m[S].listener===p||m[S]._origin&&m[S]._origin===p){x=S;break}if(x<0)continue;return this.wildcard?k._listeners.splice(x,1):this._events[d].splice(x,1),m.length===0&&(this.wildcard?delete k._listeners:delete this._events[d]),this._removeListener&&this.emit("removeListener",d,p),this}else(m===p||m.listener&&m.listener===p||m._origin&&m._origin===p)&&(this.wildcard?delete k._listeners:delete this._events[d],this._removeListener&&this.emit("removeListener",d,p))}return this.listenerTree&&Le(this.listenerTree),this},E.prototype.offAny=function(d){var p=0,m=0,g;if(d&&this._all&&this._all.length>0){for(g=this._all,p=0,m=g.length;p<m;p++)if(d===g[p])return g.splice(p,1),this._removeListener&&this.emit("removeListenerAny",d),this}else{if(g=this._all,this._removeListener)for(p=0,m=g.length;p<m;p++)this.emit("removeListenerAny",g[p]);this._all=[]}return this},E.prototype.removeListener=E.prototype.off,E.prototype.removeAllListeners=function(d){if(d===r)return!this._events||c.call(this),this;if(this.wildcard){var p=G.call(this,null,d,this.listenerTree,0),m,g;if(!p)return this;for(g=0;g<p.length;g++)m=p[g],m._listeners=null;this.listenerTree&&Le(this.listenerTree)}else this._events&&(this._events[d]=null);return this},E.prototype.listeners=function(d){var p=this._events,m,g,b,v,k;if(d===r){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!p)return[];for(m=l(p),v=m.length,b=[];v-- >0;)g=p[m[v]],typeof g=="function"?b.push(g):b.push.apply(b,g);return b}else{if(this.wildcard){if(k=this.listenerTree,!k)return[];var x=[],S=typeof d=="string"?d.split(this.delimiter):d.slice();return G.call(this,x,S,k,0),x}return p?(g=p[d],g?typeof g=="function"?[g]:g:[]):[]}},E.prototype.eventNames=function(d){var p=this._events;return this.wildcard?Ne.call(this,this.listenerTree,[],null,d):p?l(p):[]},E.prototype.listenerCount=function(d){return this.listeners(d).length},E.prototype.hasListeners=function(d){if(this.wildcard){var p=[],m=typeof d=="string"?d.split(this.delimiter):d.slice();return G.call(this,p,m,this.listenerTree,0),p.length>0}var g=this._events,b=this._all;return!!(b&&b.length||g&&(d===r?l(g).length:g[d]))},E.prototype.listenersAny=function(){return this._all?this._all:[]},E.prototype.waitFor=function(d,p){var m=this,g=typeof p;return g==="number"?p={timeout:p}:g==="function"&&(p={filter:p}),p=D(p,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:L,Promise:C}),z(p.Promise,function(b,v,k){function x(){var S=p.filter;if(!(S&&!S.apply(m,arguments)))if(m.off(d,x),p.handleError){var O=arguments[0];O?v(O):b(T.apply(null,arguments).slice(1))}else b(T.apply(null,arguments))}k(function(){m.off(d,x)}),m._on(d,x,!1)},{timeout:p.timeout,overload:p.overload})};function H(d,p,m){m=D(m,{Promise,timeout:0,overload:!1},{Promise:C});var g=m.Promise;return z(g,function(b,v,k){var x;if(typeof d.addEventListener=="function"){x=function(){b(T.apply(null,arguments))},k(function(){d.removeEventListener(p,x)}),d.addEventListener(p,x,{once:!0});return}var S=function(){O&&d.removeListener("error",O),b(T.apply(null,arguments))},O;p!=="error"&&(O=function(I){d.removeListener(p,S),v(I)},d.once("error",O)),k(function(){O&&d.removeListener("error",O),d.removeListener(p,S)}),d.once(p,S)},{timeout:m.timeout,overload:m.overload})}var P=E.prototype;if(Object.defineProperties(E,{defaultMaxListeners:{get:function(){return P._maxListeners},set:function(d){if(typeof d!="number"||d<0||Number.isNaN(d))throw TypeError("n must be a non-negative number");P._maxListeners=d},enumerable:!0},once:{value:H,writable:!0,configurable:!0}}),Object.defineProperties(P,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return E});else if(typeof Rb=="object")Mb.exports=E;else{var Z=new Function("","return this")();Z.EventEmitter2=E}})()});var i_=_(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});var r_=Symbol("MustacheDataPath");function t_({target:r,propertyName:e}){return[...r[r_]||[],e]}function n_(r,e){return typeof r!="object"?r:new Proxy(r,{get(t,n){let i=t[n];if(i===void 0&&!(n in t)){let s=t_({target:t,propertyName:n});if(e!=null&&e.handleError)return e.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[r_]=t_({target:t,propertyName:n}),n_(i,e)):i}})}bp.default=n_});var Or=_(fr=>{"use strict";fr.__esModule=!0;fr.Tokens=fr.StructuralCharacters=fr.Operators=void 0;var pA;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(pA=fr.Operators||(fr.Operators={}));var hA;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(hA=fr.StructuralCharacters||(fr.StructuralCharacters={}));var mA;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(mA=fr.Tokens||(fr.Tokens={}))});var kp=_(Hi=>{"use strict";Hi.__esModule=!0;Hi.VALID_TOKENS=Hi.OPERATOR_PRECEDENCE=void 0;var Fe=Or();Hi.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Hi.VALID_TOKENS={identifierOnly:[{name:Fe.Tokens.IDENTIFIER},{name:Fe.Tokens.STRUCTURAL_CHARACTER,value:Fe.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:Fe.Tokens.IDENTIFIER},{name:Fe.Tokens.STRUCTURAL_CHARACTER,value:Fe.StructuralCharacters.OPEN_PARENTHESIS},{name:Fe.Tokens.OPERATOR,value:Fe.Operators.NOT}],binaryOperator:[{name:Fe.Tokens.OPERATOR,value:Fe.Operators.AND},{name:Fe.Tokens.OPERATOR,value:Fe.Operators.OR},{name:Fe.Tokens.OPERATOR,value:Fe.Operators.XOR}],binaryOperatorOrClose:[{name:Fe.Tokens.OPERATOR,value:Fe.Operators.AND},{name:Fe.Tokens.OPERATOR,value:Fe.Operators.OR},{name:Fe.Tokens.OPERATOR,value:Fe.Operators.XOR},{name:Fe.Tokens.STRUCTURAL_CHARACTER,value:Fe.StructuralCharacters.CLOSE_PARENTHESIS}]}});var Sp=_(Tt=>{"use strict";Tt.__esModule=!0;Tt.ESCAPE_CHARACTER=Tt.EOL=Tt.COMMENT_DELIMITER=Tt.QUOTED_IDENTIFIER_DELIMITER=Tt.SEPARATORS=Tt.OPERATORS=Tt.STRUCTURAL_CHARACTERS=void 0;var zi=Or();Tt.STRUCTURAL_CHARACTERS={"(":zi.StructuralCharacters.OPEN_PARENTHESIS,")":zi.StructuralCharacters.CLOSE_PARENTHESIS};Tt.OPERATORS={AND:zi.Operators.AND,OR:zi.Operators.OR,XOR:zi.Operators.XOR,NOT:zi.Operators.NOT};Tt.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));Tt.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);Tt.COMMENT_DELIMITER=String.fromCodePoint(35);Tt.EOL=String.fromCodePoint(10);Tt.ESCAPE_CHARACTER=String.fromCodePoint(92)});var l_=_(er=>{"use strict";var Op=er&&er.__assign||function(){return Op=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},Op.apply(this,arguments)};er.__esModule=!0;er.getQuotedIdentifier=er.getComment=er.createResult=void 0;var u_=Or(),Jn=Sp(),gA=function(r,e,t){return{token:Op({name:r},e!==null?{value:e}:{}),remainingString:t}};er.createResult=gA;var yA=function(r){for(var e=r.length,t=0;t<r.length;t+=1){var n=r[t];if(n===Jn.EOL){e=t;break}}return(0,er.createResult)(u_.Tokens.COMMENT,r.slice(0,e),r.slice(e+1))};er.getComment=yA;var TA=function(r){for(var e=!1,t="",n=null,i=0;i<r.length;i+=1){var s=r[i];if(n===null)s===Jn.QUOTED_IDENTIFIER_DELIMITER?e?t=t.slice(-1)+Jn.QUOTED_IDENTIFIER_DELIMITER:n=i:(s===Jn.ESCAPE_CHARACTER?e=!0:e=!1,t=t+=s);else{if(!Jn.SEPARATORS.has(s)&&!Jn.STRUCTURAL_CHARACTERS[s])throw new Error("Unexpected character: ".concat(s," Expected ) character or separator"));break}}if(n===null)throw new Error("Unexpected end of expression: expected ".concat(Jn.QUOTED_IDENTIFIER_DELIMITER," character"));return(0,er.createResult)(u_.Tokens.IDENTIFIER,t,r.slice(n+1))};er.getQuotedIdentifier=TA});var c_=_(vu=>{"use strict";vu.__esModule=!0;vu.lex=void 0;var Vi=Or(),qt=Sp(),Ki=l_(),bA=function(r){for(var e=null,t=null,n=null,i=0;i<r.length;i+=1){var s=r[i];if(e===null){if(!qt.SEPARATORS.has(s)){var a=qt.STRUCTURAL_CHARACTERS[s];if(a){var o=r[i+1];if(a===Vi.StructuralCharacters.CLOSE_PARENTHESIS&&o&&!qt.SEPARATORS.has(o)&&o!==Vi.StructuralCharacters.CLOSE_PARENTHESIS)throw new Error("Unexpected character: ".concat(o,". A closing parenthesis should be followed by another closing parenthesis or whitespace"));return(0,Ki.createResult)(Vi.Tokens.STRUCTURAL_CHARACTER,qt.STRUCTURAL_CHARACTERS[s],r.slice(i+1))}if(s===qt.QUOTED_IDENTIFIER_DELIMITER)return(0,Ki.getQuotedIdentifier)(r.slice(i+1));if(s===qt.COMMENT_DELIMITER)return(0,Ki.getComment)(r.slice(i+1));e=i}}else if(qt.SEPARATORS.has(s)||qt.STRUCTURAL_CHARACTERS[s]){t=i,n=s;break}else if(s===qt.QUOTED_IDENTIFIER_DELIMITER||s===qt.COMMENT_DELIMITER)throw new Error("Unexpected character: ".concat(s))}if(e!==null){t=t!=null?t:r.length;var u=r.slice(e,t),l=r.slice(t);if(qt.OPERATORS[u]){if(n&&!qt.SEPARATORS.has(n))throw new Error("Unexpected character: ".concat(n,". Operators should be separated using whitespace"));return(0,Ki.createResult)(Vi.Tokens.OPERATOR,qt.OPERATORS[u],l)}else return(0,Ki.createResult)(Vi.Tokens.IDENTIFIER,u,l)}return(0,Ki.createResult)(Vi.Tokens.EOF,null,"")};vu.lex=bA});var f_=_(Wt=>{"use strict";var d_=Wt&&Wt.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))};Wt.__esModule=!0;Wt.validateToken=Wt.previousOperatorTakesPrecedent=Wt.getValue=Wt.newTokenGenerator=void 0;var _A=c_(),Qi=Or(),wu=kp(),vA=function(r){var e=r;return function(t,n){for(n===void 0&&(n=!1);;){var i=(0,_A.lex)(e),s=i.token,a=i.remainingString;if(e=a,s.name!==Qi.Tokens.COMMENT)return(0,Wt.validateToken)(s,t,n),s}}};Wt.newTokenGenerator=vA;var wA=function(r,e){var t=r(wu.VALID_TOKENS.identifierOrNot),n=t.value===Qi.Operators.NOT;n&&(t=r(wu.VALID_TOKENS.identifierOnly));var i=t.name===Qi.Tokens.STRUCTURAL_CHARACTER?e(r,!0):[t];return n?d_(d_([],i,!0),[{name:Qi.Tokens.OPERATOR,value:Qi.Operators.NOT}],!1):i};Wt.getValue=wA;var EA=function(r,e){return wu.OPERATOR_PRECEDENCE[r]<=wu.OPERATOR_PRECEDENCE[e]};Wt.previousOperatorTakesPrecedent=EA;var kA=function(r,e,t){if(t===void 0&&(t=!1),r.name===Qi.Tokens.EOF){if(t)return;throw new Error("Unexpected end of expression")}for(var n=0,i=e;n<i.length;n++){var s=i[n];if(s.name===r.name&&(!s.value||s.value===r.value))return}throw new TypeError("Invalid token")};Wt.validateToken=kA});var xp=_(Xi=>{"use strict";var Dr=Xi&&Xi.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))};Xi.__esModule=!0;Xi.parse=void 0;var p_=Or(),h_=kp(),Eu=f_(),SA=function(r){if(typeof r!="string")throw new Error("Expected string but received ".concat(typeof r));var e=(0,Eu.newTokenGenerator)(r);return Dp(e)};Xi.parse=SA;var Dp=function(r,e){e===void 0&&(e=!1);for(var t=Dr([],(0,Eu.getValue)(r,Dp),!0),n=[];;){var i=e?h_.VALID_TOKENS.binaryOperatorOrClose:h_.VALID_TOKENS.binaryOperator,s=r(i,!e);if(s.name===p_.Tokens.EOF||s.name===p_.Tokens.STRUCTURAL_CHARACTER)return Dr(Dr([],t,!0),Dr([],n,!0).reverse(),!0);for(;n.length;){var a=n[n.length-1]||null;if(a&&(0,Eu.previousOperatorTakesPrecedent)(a.value,s.value))t=Dr(Dr([],t,!0),[a],!1),n=n.slice(0,-1);else break}n=Dr(Dr([],n,!0),[s],!1),t=Dr(Dr([],t,!0),(0,Eu.getValue)(r,Dp),!0)}}});var Rp=_(bt=>{"use strict";bt.__esModule=!0;bt.throwInvalidExpression=bt.isOperator=bt.isIdentifier=bt.notUtil=bt.xorUtil=bt.orUtil=bt.andUtil=void 0;var m_=Or(),OA=function(r,e){return r&&e};bt.andUtil=OA;var DA=function(r,e){return r||e};bt.orUtil=DA;var xA=function(r,e){return r!==e};bt.xorUtil=xA;var RA=function(r){return!r};bt.notUtil=RA;var MA=function(r){var e=r.name,t=r.value;return e===m_.Tokens.IDENTIFIER&&typeof t=="string"};bt.isIdentifier=MA;var CA=function(r){var e=r.name,t=r.value;return e===m_.Tokens.OPERATOR&&typeof t=="string"};bt.isOperator=CA;var AA=function(r){throw new TypeError("Invalid postfix expression: ".concat(r))};bt.throwInvalidExpression=AA});var g_=_(ku=>{"use strict";var Da;ku.__esModule=!0;ku.OPERATOR_MAP=void 0;var Mp=Or(),Cp=Rp();ku.OPERATOR_MAP=(Da={},Da[Mp.Operators.AND]=Cp.andUtil,Da[Mp.Operators.OR]=Cp.orUtil,Da[Mp.Operators.XOR]=Cp.xorUtil,Da)});var T_=_(Zr=>{"use strict";var Zi=Zr&&Zr.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))};Zr.__esModule=!0;Zr.evaluate=Zr.getEvaluator=void 0;var PA=xp(),y_=Or(),NA=g_(),ei=Rp(),IA=function(r){var e=(0,PA.parse)(r);return function(t){return(0,Zr.evaluate)(e,t)}};Zr.getEvaluator=IA;var FA=function(r,e){if(!Array.isArray(r))throw new Error("".concat(r," should be an array. evaluate takes in a parsed expression. Use in combination with parse or use getEvaluator"));var t=r.reduce(function(n,i,s){if(!(i&&((0,ei.isIdentifier)(i)||(0,ei.isOperator)(i))))throw new Error("Invalid token: ".concat(i,". Found in parsed expression at index ").concat(s));if(i.name===y_.Tokens.IDENTIFIER)return Zi(Zi([],n,!0),[Boolean(e[i.value])],!1);var a=n[n.length-2],o=n[n.length-1];if(i.value===y_.Operators.NOT)return o===void 0&&(0,ei.throwInvalidExpression)("missing identifier"),Zi(Zi([],n.slice(0,-1),!0),[(0,ei.notUtil)(o)],!1);(o===void 0||a===void 0)&&(0,ei.throwInvalidExpression)("missing identifier");var u=NA.OPERATOR_MAP[i.value];return u||(0,ei.throwInvalidExpression)("unknown operator"),Zi(Zi([],n.slice(0,-2),!0),[u(a,o)],!1)},[]);return t.length!==1&&(0,ei.throwInvalidExpression)("too many identifiers after evaluation"),t[0]};Zr.evaluate=FA});var __=_(xr=>{"use strict";var Ap=xr&&xr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]});xr.__esModule=!0;xr.parse=xr.evaluate=xr.getEvaluator=void 0;var b_=T_();Ap(xr,b_,"getEvaluator");Ap(xr,b_,"evaluate");var LA=xp();Ap(xr,LA,"parse")});var iP={};mv(iP,{default:()=>Bu});module.exports=gv(iP);var ov=require("obsidian");var Ai=require("obsidian");var aP=new Error("timeout while waiting for mutex to become available"),oP=new Error("mutex already locked"),yv=new Error("request for lock canceled"),Tv=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},Ku=class{constructor(e,t=yv){this._value=e,this._cancelError=t,this._weightedQueues=[],this._weightedWaiters=[]}acquire(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((t,n)=>{this._weightedQueues[e-1]||(this._weightedQueues[e-1]=[]),this._weightedQueues[e-1].push({resolve:t,reject:n}),this._dispatch()})}runExclusive(e,t=1){return Tv(this,void 0,void 0,function*(){let[n,i]=yield this.acquire(t);try{return yield e(n)}finally{i()}})}waitForUnlock(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(t=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),this._weightedWaiters[e-1].push(t),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatch()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatch()}cancel(){this._weightedQueues.forEach(e=>e.forEach(t=>t.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var e;for(let t=this._value;t>0;t--){let n=(e=this._weightedQueues[t-1])===null||e===void 0?void 0:e.shift();if(!n)continue;let i=this._value,s=t;this._value-=t,t=this._value+1,n.resolve([i,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){for(let e=this._value;e>0;e--)!this._weightedWaiters[e-1]||(this._weightedWaiters[e-1].forEach(t=>t()),this._weightedWaiters[e-1]=[])}},bv=function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return new(t||(t=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(r,e||[])).next())})},$a=class{constructor(e){this._semaphore=new Ku(1,e)}acquire(){return bv(this,void 0,void 0,function*(){let[,e]=yield this._semaphore.acquire();return e})}runExclusive(e){return this._semaphore.runExclusive(()=>e())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var No=us(Be());var Et=class{constructor(e,t){this.start=e,this.end=t,t.isBefore(e)&&(this.start=t,this.end=e),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(e){let t=e==="week"?"isoWeek":e;return new Et(window.moment().startOf(t).startOf("day"),window.moment().endOf(t).startOf("day"))}static buildInvalid(){return new Et(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=window.moment.duration(1,e);this.start.subtract(t),this.end.subtract(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}moveToNext(e){let t=window.moment.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var Nt=class{static parseDate(e,t=!1){return window.moment(No.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[Nt.parseRelativeDateRange,Nt.parseNumberedDateRange,Nt.parseAbsoluteDateRange];for(let i of n){let s=i(e,t);if(s.isValid())return s}return Et.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=No.parse(e,void 0,{forwardDate:t});if(n.length===0)return Et.buildInvalid();let i=n[0].start,s=n[1]&&n[1].start?n[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new Et(a,o)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,i=e.match(n);if(i&&i.length===3){let s=i[1],a=i[2],o=Et.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return Et.buildInvalid()}static parseNumberedDateRange(e,t){let n=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of n){let o=e.match(i);if(o){let u=o[0].trim();return new Et(window.moment(u,s).startOf(a),window.moment(u,s).endOf(a))}}return Et.buildInvalid()}};var LM={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function Si(r){for(let[e,t]of Object.entries(LM))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var Io=["MO","TU","WE","TH","FR","SA","SU"],je=function(){function r(e,t){if(t===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=t}return r.fromStr=function(e){return new r(Io.indexOf(e))},r.prototype.nth=function(e){return this.n===e?this:new r(this.weekday,e)},r.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},r.prototype.toString=function(){var e=Io[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},r.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},r}();var xe=function(r){return r!=null},It=function(r){return typeof r=="number"},Wf=function(r){return typeof r=="string"&&Io.includes(r)},ut=Array.isArray,Xt=function(r,e){e===void 0&&(e=r),arguments.length===1&&(e=r,r=0);for(var t=[],n=r;n<e;n++)t.push(n);return t};var ce=function(r,e){var t=0,n=[];if(ut(r))for(;t<e;t++)n[t]=[].concat(r);else for(;t<e;t++)n[t]=r;return n},IT=function(r){return ut(r)?r:[r]};function Ln(r,e,t){t===void 0&&(t=" ");var n=String(r);return e=e>>0,n.length>e?String(n):(e=e-n.length,e>t.length&&(t+=ce(t,e/t.length)),t.slice(0,e)+String(n))}var FT=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},dt=function(r,e){var t=r%e;return t*e<0?t+e:t},Fo=function(r,e){return{div:Math.floor(r/e),mod:dt(r,e)}},Ft=function(r){return!xe(r)||r.length===0},qe=function(r){return!Ft(r)},fe=function(r,e){return qe(r)&&r.indexOf(e)!==-1};var vr=function(r,e,t,n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=0),new Date(Date.UTC(r,e-1,t,n,i,s))},UM=[31,28,31,30,31,30,31,31,30,31,30,31],qT=1e3*60*60*24,Lo=9999,WT=vr(1970,1,1),qM=[6,0,1,2,3,4,5];var Oi=function(r){return r%4===0&&r%100!==0||r%400===0},$f=function(r){return r instanceof Date},Un=function(r){return $f(r)&&!isNaN(r.getTime())},LT=function(r){return r.getTimezoneOffset()*60*1e3},WM=function(r,e){var t=r.getTime()-LT(r),n=e.getTime()-LT(e),i=t-n;return Math.round(i/qT)},la=function(r){return WM(r,WT)},Uo=function(r){return new Date(WT.getTime()+r*qT)},$M=function(r){var e=r.getUTCMonth();return e===1&&Oi(r.getUTCFullYear())?29:UM[e]},Wr=function(r){return qM[r.getUTCDay()]},Yf=function(r,e){var t=vr(r,e+1,1);return[Wr(t),$M(t)]},qo=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()))},Wo=function(r){var e=new Date(r.getTime());return e},Gf=function(r){for(var e=[],t=0;t<r.length;t++)e.push(Wo(r[t]));return e},$r=function(r){r.sort(function(e,t){return e.getTime()-t.getTime()})},Di=function(r,e){e===void 0&&(e=!0);var t=new Date(r);return[Ln(t.getUTCFullYear().toString(),4,"0"),Ln(t.getUTCMonth()+1,2,"0"),Ln(t.getUTCDate(),2,"0"),"T",Ln(t.getUTCHours(),2,"0"),Ln(t.getUTCMinutes(),2,"0"),Ln(t.getUTCSeconds(),2,"0"),e?"Z":""].join("")},ca=function(r){var e=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,t=e.exec(r);if(!t)throw new Error("Invalid UNTIL value: ".concat(r));return new Date(Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[5],10)||0,parseInt(t[6],10)||0,parseInt(t[7],10)||0))},UT=function(r,e){var t=r.toLocaleString("sv-SE",{timeZone:e});return t.replace(" ","T")+"Z"},$T=function(r,e){var t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(UT(r,t)),i=new Date(UT(r,e!=null?e:"UTC")),s=i.getTime()-n.getTime();return new Date(r.getTime()-s)};var YM=function(){function r(e,t){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=t,e==="between"?(this.maxDate=t.inc?t.before:new Date(t.before.getTime()-1),this.minDate=t.inc?t.after:new Date(t.after.getTime()+1)):e==="before"?this.maxDate=t.inc?t.dt:new Date(t.dt.getTime()-1):e==="after"&&(this.minDate=t.inc?t.dt:new Date(t.dt.getTime()+1))}return r.prototype.accept=function(e){++this.total;var t=this.minDate&&e<this.minDate,n=this.maxDate&&e>this.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;case"before":case"after":default:return e.length?e[e.length-1]:null}},r.prototype.clone=function(){return new r(this.method,this.args)},r}(),Yr=YM;var jf=function(r,e){return jf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},jf(r,e)};function xi(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");jf(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var lt=function(){return lt=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},lt.apply(this,arguments)};function M(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))}var GM=function(r){xi(e,r);function e(t,n,i){var s=r.call(this,t,n)||this;return s.iterator=i,s}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(Yr),Bf=GM;var jM={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}},qn=jM;var YT=function(r,e){return r.indexOf(e)!==-1},BM=function(r){return r.toString()},HM=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},zM=function(){function r(e,t,n,i){if(t===void 0&&(t=BM),n===void 0&&(n=qn),i===void 0&&(i=HM),this.text=[],this.language=n||qn,this.gettext=t,this.dateFormatter=i,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var s=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);s.sort(function(c,f){return c-f}),a.sort(function(c,f){return f-c}),this.bymonthday=s.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(xe(this.origOptions.byweekday)){var o=ut(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(c){return!c.n}),someWeeks:o.filter(function(c){return Boolean(c.n)}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var l=function(c,f){return c.weekday-f.weekday};this.byweekday.allWeeks.sort(l),this.byweekday.someWeeks.sort(l),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return r.isFullyConvertible=function(e){var t=!0;if(!(e.options.freq in r.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(YT(["dtstart","wkst","freq"],n))return!0;if(!YT(r.IMPLEMENTED[e.options.freq],n))return!1}return t},r.prototype.isFullyConvertible=function(){return r.isFullyConvertible(this.rrule)},r.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in r.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[$.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var t=this.options.until;this.add(this.dateFormatter(t.getUTCFullYear(),this.language.monthNames[t.getUTCMonth()],t.getUTCDate()))}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("")},r.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},r.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},r.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},r.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},r.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},r.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},r.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},r.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},r.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},r.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},r.prototype.nth=function(e){e=parseInt(e.toString(),10);var t,n=this.gettext;if(e===-1)return n("last");var i=Math.abs(e);switch(i){case 1:case 21:case 31:t=i+n("st");break;case 2:case 22:t=i+n("nd");break;case 3:case 23:t=i+n("rd");break;default:t=i+n("th")}return e<0?t+" "+n("last"):t},r.prototype.monthtext=function(e){return this.language.monthNames[e-1]},r.prototype.weekdaytext=function(e){var t=It(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[t]},r.prototype.plural=function(e){return e%100!==1},r.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},r.prototype.list=function(e,t,n,i){var s=this;i===void 0&&(i=","),ut(e)||(e=[e]);var a=function(u,l,c){for(var f="",h=0;h<u.length;h++)h!==0&&(h===u.length-1?f+=" "+c+" ":f+=l+" "),f+=u[h];return f};t=t||function(u){return u.toString()};var o=function(u){return t&&t.call(s,u)};return n?a(e.map(o),i,n):e.map(o).join(i+" ")},r}(),wr=zM;var VM=function(){function r(e){this.done=!0,this.rules=e}return r.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},r.prototype.isDone=function(){return this.done&&this.symbol===null},r.prototype.nextSymbol=function(){var e,t;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;e=null;for(var i in this.rules){n=this.rules[i];var s=n.exec(this.text);s&&(e===null||s[0].length>e[0].length)&&(e=s,t=i)}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 da(r,e){e===void 0&&(e=qn);var t={},n=new VM(e.tokens);if(!n.start(r))return null;return i(),t;function i(){n.expect("every");var h=n.acceptNumber();if(h&&(t.interval=parseInt(h[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=$.DAILY,n.nextSymbol()&&(a(),f());break;case"weekday(s)":t.freq=$.WEEKLY,t.byweekday=[$.MO,$.TU,$.WE,$.TH,$.FR],n.nextSymbol(),f();break;case"week(s)":t.freq=$.WEEKLY,n.nextSymbol()&&(s(),f());break;case"hour(s)":t.freq=$.HOURLY,n.nextSymbol()&&(s(),f());break;case"minute(s)":t.freq=$.MINUTELY,n.nextSymbol()&&(s(),f());break;case"month(s)":t.freq=$.MONTHLY,n.nextSymbol()&&(s(),f());break;case"year(s)":t.freq=$.YEARLY,n.nextSymbol()&&(s(),f());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=$.WEEKLY;var T=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[$[T]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var y=u();if(!y)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push($[y]),n.nextSymbol()}c(),f();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=$.YEARLY,t.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var w=o();if(!w)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(w),n.nextSymbol()}s(),f();break;default:throw new Error("Unknown symbol")}}function s(){var h=n.accept("on"),T=n.accept("the");if(!!(h||T))do{var y=l(),w=u(),D=o();if(y)w?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push($[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($[w]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[$.MO,$.TU,$.WE,$.TH,$.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var C=n.acceptNumber();if(!C)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt(C[0],10)];n.accept("comma");){if(C=n.acceptNumber(),!C)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt(C[0],10))}}else if(D)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(D);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function a(){var h=n.accept("at");if(!!h)do{var T=n.acceptNumber();if(!T)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(T[0],10)];n.accept("comma");){if(T=n.acceptNumber(),!T)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(T[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){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 u(){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 l(){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 h=parseInt(n.value[1],10);if(h<-366||h>366)throw new Error("Nth out of range: "+h);return n.nextSymbol(),n.accept("last")?-h:h;default:return!1}}function c(){n.accept("on"),n.accept("the");var h=l();if(!!h)for(t.bymonthday=[h],n.nextSymbol();n.accept("comma");){if(h=l(),!h)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(h),n.nextSymbol()}}function f(){if(n.symbol==="until"){var h=Date.parse(n.text);if(!h)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(h)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var ae;(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"})(ae||(ae={}));function fa(r){return r<ae.HOURLY}var GT=function(r,e){return e===void 0&&(e=qn),new $(da(r,e)||void 0)},Ri=["count","until","interval","byweekday","bymonthday","bymonth"];wr.IMPLEMENTED=[];wr.IMPLEMENTED[ae.HOURLY]=Ri;wr.IMPLEMENTED[ae.MINUTELY]=Ri;wr.IMPLEMENTED[ae.DAILY]=["byhour"].concat(Ri);wr.IMPLEMENTED[ae.WEEKLY]=Ri;wr.IMPLEMENTED[ae.MONTHLY]=Ri;wr.IMPLEMENTED[ae.YEARLY]=["byweekno","byyearday"].concat(Ri);var jT=function(r,e,t,n){return new wr(r,e,t,n).toString()},BT=wr.isFullyConvertible;var Mi=function(){function r(e,t,n,i){this.hour=e,this.minute=t,this.second=n,this.millisecond=i||0}return r.prototype.getHours=function(){return this.hour},r.prototype.getMinutes=function(){return this.minute},r.prototype.getSeconds=function(){return this.second},r.prototype.getMilliseconds=function(){return this.millisecond},r.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},r}();var HT=function(r){xi(e,r);function e(t,n,i,s,a,o,u){var l=r.call(this,s,a,o,u)||this;return l.year=t,l.month=n,l.day=i,l}return 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 Wr(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 n=Math.floor(this.month/12),i=dt(this.month,12);this.month=i,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,i){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var s=Fo(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),Ft(i)||fe(i,this.hour))break}},e.prototype.addMinutes=function(t,n,i,s){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var a=Fo(this.minute,60),o=a.div,u=a.mod;if(o&&(this.minute=u,this.addHours(o,!1,i)),(Ft(i)||fe(i,this.hour))&&(Ft(s)||fe(s,this.minute)))break}},e.prototype.addSeconds=function(t,n,i,s,a){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var o=Fo(this.second,60),u=o.div,l=o.mod;if(u&&(this.second=l,this.addMinutes(u,!1,i,s)),(Ft(i)||fe(i,this.hour))&&(Ft(s)||fe(s,this.minute))&&(Ft(a)||fe(a,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Yf(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>Lo))return;t=Yf(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var i=t.freq,s=t.interval,a=t.wkst,o=t.byhour,u=t.byminute,l=t.bysecond;switch(i){case ae.YEARLY:return this.addYears(s);case ae.MONTHLY:return this.addMonths(s);case ae.WEEKLY:return this.addWeekly(s,a);case ae.DAILY:return this.addDaily(s);case ae.HOURLY:return this.addHours(s,n,o);case ae.MINUTELY:return this.addMinutes(s,n,o,u);case ae.SECONDLY:return this.addSeconds(s,n,o,u,l)}},e}(Mi);function Hf(r){for(var e=[],t=Object.keys(r),n=0,i=t;n<i.length;n++){var s=i[n];fe(KT,s)||e.push(s),$f(r[s])&&!Un(r[s])&&e.push(s)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return lt({},r)}function zT(r){var e=lt(lt({},pa),Hf(r));if(xe(e.byeaster)&&(e.freq=$.YEARLY),!(xe(e.freq)&&$.FREQUENCIES[e.freq]))throw new Error("Invalid frequency: ".concat(e.freq," ").concat(r.freq));if(e.dtstart||(e.dtstart=new Date(new Date().setMilliseconds(0))),xe(e.wkst)?It(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=$.MO.weekday,xe(e.bysetpos)){It(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var t=0;t<e.bysetpos.length;t++){var n=e.bysetpos[t];if(n===0||!(n>=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(e.byweekno)||qe(e.byweekno)||qe(e.byyearday)||Boolean(e.bymonthday)||qe(e.bymonthday)||xe(e.byweekday)||xe(e.byeaster)))switch(e.freq){case $.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case $.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case $.WEEKLY:e.byweekday=[Wr(e.dtstart)];break}if(xe(e.bymonth)&&!ut(e.bymonth)&&(e.bymonth=[e.bymonth]),xe(e.byyearday)&&!ut(e.byyearday)&&It(e.byyearday)&&(e.byyearday=[e.byyearday]),!xe(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(ut(e.bymonthday)){for(var i=[],s=[],t=0;t<e.bymonthday.length;t++){var n=e.bymonthday[t];n>0?i.push(n):n<0&&s.push(n)}e.bymonthday=i,e.bynmonthday=s}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(xe(e.byweekno)&&!ut(e.byweekno)&&(e.byweekno=[e.byweekno]),!xe(e.byweekday))e.bynweekday=null;else if(It(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Wf(e.byweekday))e.byweekday=[je.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof je)!e.byweekday.n||e.freq>$.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var a=[],o=[],t=0;t<e.byweekday.length;t++){var u=e.byweekday[t];if(It(u)){a.push(u);continue}else if(Wf(u)){a.push(je.fromStr(u).weekday);continue}!u.n||e.freq>$.MONTHLY?a.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=qe(a)?a:null,e.bynweekday=qe(o)?o:null}return xe(e.byhour)?It(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<$.HOURLY?[e.dtstart.getUTCHours()]:null,xe(e.byminute)?It(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<$.MINUTELY?[e.dtstart.getUTCMinutes()]:null,xe(e.bysecond)?It(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<$.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function VT(r){var e=r.dtstart.getTime()%1e3;if(!fa(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(i){r.bysecond.forEach(function(s){t.push(new Mi(n,i,s,e))})})}),t}function ma(r){var e=r.split(`
`).map(KM).filter(function(t){return t!==null});return lt(lt({},e[0]),e[1])}function ha(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(r);if(!t)return e;var n=t[1],i=t[2];return n&&(e.tzid=n),e.dtstart=ca(i),e}function KM(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return QT(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return QT(r);case"DTSTART":return ha(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function QT(r){var e=r.replace(/^RRULE:/i,""),t=ha(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var s=i.split("="),a=s[0],o=s[1];switch(a.toUpperCase()){case"FREQ":t.freq=ae[o.toUpperCase()];break;case"WKST":t.wkst=Zt[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=QM(o),l=a.toLowerCase();t[l]=u;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=XM(o);break;case"DTSTART":case"TZID":var c=ha(r);t.tzid=c.tzid,t.dtstart=c.dtstart;break;case"UNTIL":t.until=ca(o);break;case"BYEASTER":t.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),t}function QM(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(XT)}return XT(r)}function XT(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function XM(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return Zt[t];var n=t.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(t));var i=Number(n[1]),s=n[2],a=Zt[s].weekday;return new je(a,i)})}var Wn=function(){function r(e,t){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=t}return Object.defineProperty(r.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),r.prototype.toString=function(){var e=Di(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},r.prototype.getTime=function(){return this.date.getTime()},r.prototype.rezonedDate=function(){return this.isUTC?this.date:$T(this.date,this.tzid)},r}();function ga(r){for(var e=[],t="",n=Object.keys(r),i=Object.keys(pa),s=0;s<n.length;s++)if(n[s]!=="tzid"&&!!fe(i,n[s])){var a=n[s].toUpperCase(),o=r[n[s]],u="";if(!(!xe(o)||ut(o)&&!o.length)){switch(a){case"FREQ":u=$.FREQUENCIES[r.freq];break;case"WKST":It(o)?u=new je(o).toString():u=o.toString();break;case"BYWEEKDAY":a="BYDAY",u=IT(o).map(function(T){return T instanceof je?T:ut(T)?new je(T[0],T[1]):new je(T)}).toString();break;case"DTSTART":t=ZM(o,r.tzid);break;case"UNTIL":u=Di(o,!r.tzid);break;default:if(ut(o)){for(var l=[],c=0;c<o.length;c++)l[c]=String(o[c]);u=l.toString()}else u=String(o)}u&&e.push([a,u])}}var f=e.map(function(T){var y=T[0],w=T[1];return"".concat(y,"=").concat(w.toString())}).join(";"),h="";return f!==""&&(h="RRULE:".concat(f)),[t,h].filter(function(T){return!!T}).join(`
`)}function ZM(r,e){return r?"DTSTART"+new Wn(new Date(r),e).toString():""}function JM(r,e){return Array.isArray(r)?!Array.isArray(e)||r.length!==e.length?!1:r.every(function(t,n){return t.getTime()===e[n].getTime()}):r instanceof Date?e instanceof Date&&r.getTime()===e.getTime():r===e}var ZT=function(){function r(){this.all=!1,this.before=[],this.after=[],this.between=[]}return r.prototype._cacheAdd=function(e,t,n){t&&(t=t instanceof Date?Wo(t):Gf(t)),e==="all"?this.all=t:(n._value=t,this[e].push(n))},r.prototype._cacheGet=function(e,t){var n=!1,i=t?Object.keys(t):[],s=function(c){for(var f=0;f<i.length;f++){var h=i[f];if(!JM(t[h],c[h]))return!0}return!1},a=this[e];if(e==="all")n=this.all;else if(ut(a))for(var o=0;o<a.length;o++){var u=a[o];if(!(i.length&&s(u))){n=u._value;break}}if(!n&&this.all){for(var l=new Yr(e,t),o=0;o<this.all.length&&l.accept(this.all[o]);o++);n=l.getValue(),this._cacheAdd(e,n,t)}return ut(n)?Gf(n):n instanceof Date?Wo(n):n},r}();var JT=M(M(M(M(M(M(M(M(M(M(M(M(M([],ce(1,31),!0),ce(2,28),!0),ce(3,31),!0),ce(4,30),!0),ce(5,31),!0),ce(6,30),!0),ce(7,31),!0),ce(8,31),!0),ce(9,30),!0),ce(10,31),!0),ce(11,30),!0),ce(12,31),!0),ce(1,7),!0),eb=M(M(M(M(M(M(M(M(M(M(M(M(M([],ce(1,31),!0),ce(2,29),!0),ce(3,31),!0),ce(4,30),!0),ce(5,31),!0),ce(6,30),!0),ce(7,31),!0),ce(8,31),!0),ce(9,30),!0),ce(10,31),!0),ce(11,30),!0),ce(12,31),!0),ce(1,7),!0),eC=Xt(1,29),tC=Xt(1,30),cn=Xt(1,31),ft=Xt(1,32),tb=M(M(M(M(M(M(M(M(M(M(M(M(M([],ft,!0),tC,!0),ft,!0),cn,!0),ft,!0),cn,!0),ft,!0),ft,!0),cn,!0),ft,!0),cn,!0),ft,!0),ft.slice(0,7),!0),rb=M(M(M(M(M(M(M(M(M(M(M(M(M([],ft,!0),eC,!0),ft,!0),cn,!0),ft,!0),cn,!0),ft,!0),ft,!0),cn,!0),ft,!0),cn,!0),ft,!0),ft.slice(0,7),!0),rC=Xt(-28,0),nC=Xt(-29,0),dn=Xt(-30,0),pt=Xt(-31,0),nb=M(M(M(M(M(M(M(M(M(M(M(M(M([],pt,!0),nC,!0),pt,!0),dn,!0),pt,!0),dn,!0),pt,!0),pt,!0),dn,!0),pt,!0),dn,!0),pt,!0),pt.slice(0,7),!0),ib=M(M(M(M(M(M(M(M(M(M(M(M(M([],pt,!0),rC,!0),pt,!0),dn,!0),pt,!0),dn,!0),pt,!0),pt,!0),dn,!0),pt,!0),dn,!0),pt,!0),pt.slice(0,7),!0),sb=[0,31,60,91,121,152,182,213,244,274,305,335,366],ab=[0,31,59,90,120,151,181,212,243,273,304,334,365],zf=function(){for(var r=[],e=0;e<55;e++)r=r.concat(Xt(7));return r}();function ob(r,e){var t=vr(r,1,1),n=Oi(r)?366:365,i=Oi(r+1)?366:365,s=la(t),a=Wr(t),o=lt(lt({yearlen:n,nextyearlen:i,yearordinal:s,yearweekday:a},iC(r)),{wnomask:null});if(Ft(e.byweekno))return o;o.wnomask=ce(0,n+7);var u,l,c=u=dt(7-a+e.wkst,7);c>=4?(c=0,l=o.yearlen+dt(a-e.wkst,7)):l=n-c;for(var f=Math.floor(l/7),h=dt(l,7),T=Math.floor(f+h/4),y=0;y<e.byweekno.length;y++){var w=e.byweekno[y];if(w<0&&(w+=T+1),w>0&&w<=T){var D=void 0;w>1?(D=c+(w-1)*7,c!==u&&(D-=7-u)):D=c;for(var C=0;C<7&&(o.wnomask[D]=1,D++,o.wdaymask[D]!==e.wkst);C++);}}if(fe(e.byweekno,1)){var D=c+T*7;if(c!==u&&(D-=7-u),D<n)for(var y=0;y<7&&(o.wnomask[D]=1,D+=1,o.wdaymask[D]!==e.wkst);y++);}if(c){var N=void 0;if(fe(e.byweekno,-1))N=-1;else{var L=Wr(vr(r-1,1,1)),oe=dt(7-L.valueOf()+e.wkst,7),z=Oi(r-1)?366:365,ie=void 0;oe>=4?(oe=0,ie=z+dt(L-e.wkst,7)):ie=n-c,N=Math.floor(52+dt(ie,7)/4)}if(fe(e.byweekno,N))for(var D=0;D<c;D++)o.wnomask[D]=1}return o}function iC(r){var e=Oi(r)?366:365,t=vr(r,1,1),n=Wr(t);return e===365?{mmask:JT,mdaymask:rb,nmdaymask:ib,wdaymask:zf.slice(n),mrange:ab}:{mmask:eb,mdaymask:tb,nmdaymask:nb,wdaymask:zf.slice(n),mrange:sb}}function ub(r,e,t,n,i,s){var a={lastyear:r,lastmonth:e,nwdaymask:[]},o=[];if(s.freq===$.YEARLY)if(Ft(s.bymonth))o=[[0,t]];else for(var u=0;u<s.bymonth.length;u++)e=s.bymonth[u],o.push(n.slice(e-1,e+1));else s.freq===$.MONTHLY&&(o=[n.slice(e-1,e+1)]);if(Ft(o))return a;a.nwdaymask=ce(0,t);for(var u=0;u<o.length;u++)for(var l=o[u],c=l[0],f=l[1]-1,h=0;h<s.bynweekday.length;h++){var T=void 0,y=s.bynweekday[h],w=y[0],D=y[1];D<0?(T=f+(D+1)*7,T-=dt(i[T]-w,7)):(T=c+(D-1)*7,T+=dt(7-i[T]+w,7)),c<=T&&T<=f&&(a.nwdaymask[T]=1)}return a}function lb(r,e){e===void 0&&(e=0);var t=r%19,n=Math.floor(r/100),i=r%100,s=Math.floor(n/4),a=n%4,o=Math.floor((n+8)/25),u=Math.floor((n-o+1)/3),l=Math.floor(19*t+n-s-u+15)%30,c=Math.floor(i/4),f=i%4,h=Math.floor(32+2*a+2*c-l-f)%7,T=Math.floor((t+11*l+22*h)/451),y=Math.floor((l+h-7*T+114)/31),w=(l+h-7*T+114)%31+1,D=Date.UTC(r,y-1,w+e),C=Date.UTC(r,0,1);return[Math.ceil((D-C)/(1e3*60*60*24))]}var sC=function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=ob(e,n)),qe(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var i=this.yearinfo,s=i.yearlen,a=i.mrange,o=i.wdaymask;this.monthinfo=ub(e,t,s,a,o,n)}xe(n.byeaster)&&(this.eastermask=lb(e,n.byeaster))},Object.defineProperty(r.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),r.prototype.ydayset=function(){return[Xt(this.yearlen),0,this.yearlen]},r.prototype.mdayset=function(e,t){for(var n=this.mrange[t-1],i=this.mrange[t],s=ce(null,this.yearlen),a=n;a<i;a++)s[a]=a;return[s,n,i]},r.prototype.wdayset=function(e,t,n){for(var i=ce(null,this.yearlen+7),s=la(vr(e,t,n))-this.yearordinal,a=s,o=0;o<7&&(i[s]=s,++s,this.wdaymask[s]!==this.options.wkst);o++);return[i,a,s]},r.prototype.ddayset=function(e,t,n){var i=ce(null,this.yearlen),s=la(vr(e,t,n))-this.yearordinal;return i[s]=s,[i,s,s+1]},r.prototype.htimeset=function(e,t,n,i){var s=this,a=[];return this.options.byminute.forEach(function(o){a=a.concat(s.mtimeset(e,o,n,i))}),$r(a),a},r.prototype.mtimeset=function(e,t,n,i){var s=this.options.bysecond.map(function(a){return new Mi(e,t,a,i)});return $r(s),s},r.prototype.stimeset=function(e,t,n,i){return[new Mi(e,t,n,i)]},r.prototype.getdayset=function(e){switch(e){case ae.YEARLY:return this.ydayset.bind(this);case ae.MONTHLY:return this.mdayset.bind(this);case ae.WEEKLY:return this.wdayset.bind(this);case ae.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},r.prototype.gettimeset=function(e){switch(e){case ae.HOURLY:return this.htimeset.bind(this);case ae.MINUTELY:return this.mtimeset.bind(this);case ae.SECONDLY:return this.stimeset.bind(this)}},r}(),cb=sC;function db(r,e,t,n,i,s){for(var a=[],o=0;o<r.length;o++){var u=void 0,l=void 0,c=r[o];c<0?(u=Math.floor(c/e.length),l=dt(c,e.length)):(u=Math.floor((c-1)/e.length),l=dt(c-1,e.length));for(var f=[],h=t;h<n;h++){var T=s[h];!xe(T)||f.push(T)}var y=void 0;u<0?y=f.slice(u)[0]:y=f[u];var w=e[l],D=Uo(i.yearordinal+y),C=qo(D,w);fe(a,C)||a.push(C)}return $r(a),a}function $o(r,e){var t=e.dtstart,n=e.freq,i=e.interval,s=e.until,a=e.bysetpos,o=e.count;if(o===0||i===0)return Gr(r);var u=HT.fromDate(t),l=new cb(e);l.rebuild(u.year,u.month);for(var c=uC(l,u,e);;){var f=l.getdayset(n)(u.year,u.month,u.day),h=f[0],T=f[1],y=f[2],w=oC(h,T,y,l,e);if(qe(a))for(var D=db(a,c,T,y,l,h),C=0;C<D.length;C++){var N=D[C];if(s&&N>s)return Gr(r);if(N>=t){var L=fb(N,e);if(!r.accept(L)||o&&(--o,!o))return Gr(r)}}else for(var C=T;C<y;C++){var oe=h[C];if(!!xe(oe))for(var z=Uo(l.yearordinal+oe),ie=0;ie<c.length;ie++){var G=c[ie],N=qo(z,G);if(s&&N>s)return Gr(r);if(N>=t){var L=fb(N,e);if(!r.accept(L)||o&&(--o,!o))return Gr(r)}}}if(e.interval===0||(u.add(e,w),u.year>Lo))return Gr(r);fa(n)||(c=l.gettimeset(n)(u.hour,u.minute,u.second,0)),l.rebuild(u.year,u.month)}}function aC(r,e,t){var n=t.bymonth,i=t.byweekno,s=t.byweekday,a=t.byeaster,o=t.bymonthday,u=t.bynmonthday,l=t.byyearday;return qe(n)&&!fe(n,r.mmask[e])||qe(i)&&!r.wnomask[e]||qe(s)&&!fe(s,r.wdaymask[e])||qe(r.nwdaymask)&&!r.nwdaymask[e]||a!==null&&!fe(r.eastermask,e)||(qe(o)||qe(u))&&!fe(o,r.mdaymask[e])&&!fe(u,r.nmdaymask[e])||qe(l)&&(e<r.yearlen&&!fe(l,e+1)&&!fe(l,-r.yearlen+e)||e>=r.yearlen&&!fe(l,e+1-r.yearlen)&&!fe(l,-r.nextyearlen+e-r.yearlen))}function fb(r,e){return new Wn(r,e.tzid).rezonedDate()}function Gr(r){return r.getValue()}function oC(r,e,t,n,i){for(var s=!1,a=e;a<t;a++){var o=r[a];s=aC(n,o,i),s&&(r[o]=null)}return s}function uC(r,e,t){var n=t.freq,i=t.byhour,s=t.byminute,a=t.bysecond;return fa(n)?VT(t):n>=$.HOURLY&&qe(i)&&!fe(i,e.hour)||n>=$.MINUTELY&&qe(s)&&!fe(s,e.minute)||n>=$.SECONDLY&&qe(a)&&!fe(a,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var Zt={MO:new je(0),TU:new je(1),WE:new je(2),TH:new je(3),FR:new je(4),SA:new je(5),SU:new je(6)},pa={freq:ae.YEARLY,dtstart:null,interval:1,wkst:Zt.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},KT=Object.keys(pa),$=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new ZT,this.origOptions=Hf(e);var n=zT(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return da(e,t)},r.fromText=function(e,t){return GT(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return $o(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 Bf("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new Yr("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,i){if(n===void 0&&(n=!1),!Un(e)||!Un(t))throw new Error("Invalid date passed in to RRule.between");var s={before:t,after:e,inc:n};if(i)return this._iter(new Bf("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new Yr("between",s)),this._cacheAdd("between",a,s)),a},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!Un(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},i=this._cacheGet("before",n);return i===!1&&(i=this._iter(new Yr("before",n)),this._cacheAdd("before",i,n)),i},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!Un(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},i=this._cacheGet("after",n);return i===!1&&(i=this._iter(new Yr("after",n)),this._cacheAdd("after",i,n)),i},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return ga(this.origOptions)},r.prototype.toText=function(e,t,n){return jT(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return BT(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=ae.YEARLY,r.MONTHLY=ae.MONTHLY,r.WEEKLY=ae.WEEKLY,r.DAILY=ae.DAILY,r.HOURLY=ae.HOURLY,r.MINUTELY=ae.MINUTELY,r.SECONDLY=ae.SECONDLY,r.MO=Zt.MO,r.TU=Zt.TU,r.WE=Zt.WE,r.TH=Zt.TH,r.FR=Zt.FR,r.SA=Zt.SA,r.SU=Zt.SU,r.parseString=ma,r.optionsToString=ga,r}();function pb(r,e,t,n,i,s){var a={},o=r.accept;function u(h,T){t.forEach(function(y){y.between(h,T,!0).forEach(function(w){a[Number(w)]=!0})})}i.forEach(function(h){var T=new Wn(h,s).rezonedDate();a[Number(T)]=!0}),r.accept=function(h){var T=Number(h);return isNaN(T)?o.call(this,h):!a[T]&&(u(new Date(T-1),new Date(T+1)),!a[T])?(a[T]=!0,o.call(this,h)):!0},r.method==="between"&&(u(r.args.after,r.args.before),r.accept=function(h){var T=Number(h);return a[T]?!0:(a[T]=!0,o.call(this,h))});for(var l=0;l<n.length;l++){var c=new Wn(n[l],s).rezonedDate();if(!r.accept(new Date(c.getTime())))break}e.forEach(function(h){$o(r,h.options)});var f=r._result;switch($r(f),r.method){case"all":case"between":return f;case"before":return f.length&&f[f.length-1]||null;case"after":default:return f.length&&f[0]||null}}var hb={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function lC(r,e){var t=[],n=[],i=[],s=[],a=ha(r),o=a.dtstart,u=a.tzid,l=hC(r,e.unfold);return l.forEach(function(c){var f;if(!!c){var h=pC(c),T=h.name,y=h.parms,w=h.value;switch(T.toUpperCase()){case"RRULE":if(y.length)throw new Error("unsupported RRULE parm: ".concat(y.join(",")));t.push(ma(c));break;case"RDATE":var D=(f=/RDATE(?:;TZID=([^:=]+))?/i.exec(c))!==null&&f!==void 0?f:[],C=D[1];C&&!u&&(u=C),n=n.concat(mb(w,y));break;case"EXRULE":if(y.length)throw new Error("unsupported EXRULE parm: ".concat(y.join(",")));i.push(ma(w));break;case"EXDATE":s=s.concat(mb(w,y));break;case"DTSTART":break;default:throw new Error("unsupported property: "+T)}}}),{dtstart:o,tzid:u,rrulevals:t,rdatevals:n,exrulevals:i,exdatevals:s}}function cC(r,e){var t=lC(r,e),n=t.rrulevals,i=t.rdatevals,s=t.exrulevals,a=t.exdatevals,o=t.dtstart,u=t.tzid,l=e.cache===!1;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||n.length>1||i.length||s.length||a.length){var c=new Kf(l);return c.dtstart(o),c.tzid(u||void 0),n.forEach(function(h){c.rrule(new $(Vf(h,o,u),l))}),i.forEach(function(h){c.rdate(h)}),s.forEach(function(h){c.exrule(new $(Vf(h,o,u),l))}),a.forEach(function(h){c.exdate(h)}),e.compatible&&e.dtstart&&c.rdate(o),c}var f=n[0]||{};return new $(Vf(f,f.dtstart||e.dtstart||o,f.tzid||e.tzid||u),l)}function Yo(r,e){return e===void 0&&(e={}),cC(r,dC(e))}function Vf(r,e,t){return lt(lt({},r),{dtstart:e,tzid:t})}function dC(r){var e=[],t=Object.keys(r),n=Object.keys(hb);if(t.forEach(function(i){fe(n,i)||e.push(i)}),e.length)throw new Error("Invalid options: "+e.join(", "));return lt(lt({},hb),r)}function fC(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=FT(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function pC(r){var e=fC(r),t=e.name,n=e.value,i=t.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:n}}function hC(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;n<t.length;){var i=t[n]=t[n].replace(/\s+$/g,"");i?n>0&&i[0]===" "?(t[n-1]+=i.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function mC(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function mb(r,e){return mC(e),r.split(",").map(function(t){return ca(t)})}function gb(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;n<e._rrule.length;n++){var i=e._rrule[n].origOptions[r];if(i)return i}}}var Kf=function(r){xi(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=gb.apply(n,["dtstart"]),n.tzid=gb.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return pb(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){yb(t,this._rrule)},e.prototype.exrule=function(t){yb(t,this._exrule)},e.prototype.rdate=function(t){Tb(t,this._rdate)},e.prototype.exdate=function(t){Tb(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return Yo(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return Yo(t.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(t){return new Date(t.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(t){return new Date(t.getTime())})},e.prototype.valueOf=function(){var t=[];return!this._rrule.length&&this._dtstart&&(t=t.concat(ga({dtstart:this._dtstart}))),this._rrule.forEach(function(n){t=t.concat(n.toString().split(`
`))}),this._exrule.forEach(function(n){t=t.concat(n.toString().split(`
`).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&t.push(bb("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(bb("EXDATE",this._exdate,this.tzid())),t},e.prototype.toString=function(){return this.valueOf().join(`
`)},e.prototype.clone=function(){var t=new e(!!this._cache);return this._rrule.forEach(function(n){return t.rrule(n.clone())}),this._exrule.forEach(function(n){return t.exrule(n.clone())}),this._rdate.forEach(function(n){return t.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return t.exdate(new Date(n.getTime()))}),t},e}($);function yb(r,e){if(!(r instanceof $))throw new TypeError(String(r)+" is not RRule instance");fe(e.map(String),String(r))||e.push(r)}function Tb(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");fe(e.map(Number),Number(r))||(e.push(r),$r(e))}function bb(r,e,t){var n=!t||t.toUpperCase()==="UTC",i=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),s=e.map(function(a){return Di(a.valueOf(),n)}).join(",");return"".concat(i).concat(s)}function jr(r,e){return r!==null&&e===null?-1:r===null&&e!==null?1:r!==null&&e!==null?r.isValid()&&!e.isValid()?-1:!r.isValid()&&e.isValid()||r.isAfter(e)?1:r.isBefore(e)?-1:0:0}var et=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:i,scheduledDate:s,dueDate:a}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=i,this.scheduledDate=s,this.dueDate=a}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:i}){try{let s=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(s==null)return null;let a=s[1].trim(),o=s[2]!==void 0,u=$.parseText(a);if(u!==null){let l=null;i?l=window.moment(i):n?l=window.moment(n):t&&(l=window.moment(t)),!o&&l!==null?u.dtstart=window.moment(l).startOf("day").utc(!0).toDate():u.dtstart=window.moment().startOf("day").utc(!0).toDate();let c=new $(u);return new et({rrule:c,baseOnToday:o,referenceDate:l,startDate:t,scheduledDate:n,dueDate:i})}}catch(s){s instanceof Error&&console.log(s.message)}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(){let e=this.nextReferenceDate();if(e!==null){let t=null,n=null,i=null;if(this.referenceDate){if(this.startDate){let s=window.moment.duration(this.startDate.diff(this.referenceDate));t=window.moment(e),t.add(Math.round(s.asDays()),"days")}if(this.scheduledDate){let s=window.moment.duration(this.scheduledDate.diff(this.referenceDate));n=window.moment(e),n.add(Math.round(s.asDays()),"days")}if(this.dueDate){let s=window.moment.duration(this.dueDate.diff(this.referenceDate));i=window.moment(e),i.add(Math.round(s.asDays()),"days")}}return{startDate:t,scheduledDate:n,dueDate:i}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||jr(this.startDate,e.startDate)!==0||jr(this.scheduledDate,e.scheduledDate)!==0||jr(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextReferenceDate(){if(this.baseOnToday){let e=window.moment();return this.nextReferenceDateFromToday(e).toDate()}else return this.nextReferenceDateFromOriginalReferenceDate().toDate()}nextReferenceDateFromToday(e){let t=new $(it(we({},this.rrule.origOptions),{dtstart:e.startOf("day").utc(!0).toDate()}));return this.nextAfter(e.endOf("day"),t)}nextReferenceDateFromOriginalReferenceDate(){var t;let e=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");return this.nextAfter(e,this.rrule)}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),i=this.toText(),s=i.match(/every( \d+)? month(s)?(.*)?/);s!==null&&(i.includes(" on ")||(n=et.nextAfterMonths(e,n,t,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(n=et.nextAfterYears(e,n,t,a[1])),et.addTimezone(n)}static nextAfterMonths(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));et.isSkippingTooManyMonths(e,t,s);)t=et.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let i=t.month()-e.month();return i+=(t.year()-e.year())*12,i>n}static nextAfterYears(e,t,n,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));et.isSkippingTooManyYears(e,t,s);)t=et.fromOneDayEarlier(e,n);return t}static isSkippingTooManyYears(e,t,n){return t.year()-e.year()>n}static fromOneDayEarlier(e,t){e.subtract(1,"days").endOf("day");let n=t.origOptions;return n.dtstart=e.startOf("day").toDate(),t=new $(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};function Go(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var fn=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return fn.instance||(fn.instance=new fn),fn.instance}get(){return this._globalFilter}set(e){this._globalFilter=e}reset(){this.set(fn.empty)}isEmpty(){return this.get()===fn.empty}equals(e){return this.get()===e}includedIn(e){let t=this.get();return e.includes(t)}prependTo(e){return this.get()+" "+e}removeAsWordFromDependingOnSettings(e){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(e):e}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(e){this._removeGlobalFilter=e}removeAsWordFrom(e){if(this.isEmpty())return e;let t=RegExp("(^|\\s)"+Go(this.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace("  "," ").trim()),e}removeAsSubstringFrom(e){let t=this.get();return e.replace(t,"").trim()}},ge=fn;ge.empty="";var Qf=5;function Xf(r,e){let t=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(n,i,s)=>{let a=[];return a=a.concat(yC(n,i,s,t,e)),a=a.concat(TC(n,i,s,r.recurrenceSymbol)),a=a.concat(gC(n,i,s,r)),a.length>0&&!a.some(o=>o.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:`
`}),a=a.slice(0,s.autoSuggestMaxItems),a}}function gC(r,e,t,n){let i=u=>Object.values(n.prioritySymbols).some(l=>l.length>0&&u.includes(l)),s=[];if(r.includes(n.dueDateSymbol)||s.push({displayText:`${n.dueDateSymbol} due date`,appendText:`${n.dueDateSymbol} `}),r.includes(n.startDateSymbol)||s.push({displayText:`${n.startDateSymbol} start date`,appendText:`${n.startDateSymbol} `}),r.includes(n.scheduledDateSymbol)||s.push({displayText:`${n.scheduledDateSymbol} scheduled date`,appendText:`${n.scheduledDateSymbol} `}),i(r)||(s.push({displayText:`${n.prioritySymbols.High} high priority`,appendText:`${n.prioritySymbols.High} `}),s.push({displayText:`${n.prioritySymbols.Medium} medium priority`,appendText:`${n.prioritySymbols.Medium} `}),s.push({displayText:`${n.prioritySymbols.Low} low priority`,appendText:`${n.prioritySymbols.Low} `}),s.push({displayText:`${n.prioritySymbols.Highest} highest priority`,appendText:`${n.prioritySymbols.Highest} `}),s.push({displayText:`${n.prioritySymbols.Lowest} lowest priority`,appendText:`${n.prioritySymbols.Lowest} `})),r.includes(n.recurrenceSymbol)||s.push({displayText:`${n.recurrenceSymbol} recurring (repeat)`,appendText:`${n.recurrenceSymbol} `}),!r.includes(n.createdDateSymbol)){let l=Nt.parseDate("today",!0).format(V.dateFormat);s.push({textToMatch:`${n.createdDateSymbol} created`,displayText:`${n.createdDateSymbol} created today (${l})`,appendText:`${n.createdDateSymbol} ${l} `})}let a=Zf(r,/([a-zA-Z'_-]*)/g,e),o=[];if(a&&a.length>0){let u=a[0];if(u.length>=Math.max(1,t.autoSuggestMinMatch)){let l=s.filter(c=>(c.textToMatch||c.displayText).toLowerCase().includes(u.toLowerCase()));for(let c of l)o.push({suggestionType:"match",displayText:c.displayText,appendText:c.appendText,insertAt:a.index,insertSkip:u.length})}}return o.length===0&&t.autoSuggestMinMatch===0?s:o}function yC(r,e,t,n,i){let s=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],a=[],o=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),u=Zf(r,o,e);if(u&&u.length>=2){let l=u[1],c=u[2];if(c.length<t.autoSuggestMinMatch)return[];let f=c&&c.length>1?Nt.parseDate(Si(c),!0):null;f&&f.isValid()&&a.push({displayText:`${f.format(V.dateFormat)}`,appendText:`${l} ${f.format(V.dateFormat)} `,insertAt:u.index,insertSkip:u[0].length});let h=1,T=s.filter(y=>c&&c.length>=h&&y.toLowerCase().includes(c.toLowerCase())).slice(0,i);T.length===0&&(T=s.slice(0,i));for(let y of T){let D=`${Nt.parseDate(y,!0).format(V.dateFormat)}`;a.push({suggestionType:"match",displayText:`${y} (${D})`,appendText:`${l} ${D} `,insertAt:u.index,insertSkip:u[0].length})}}return a}function TC(r,e,t,n){var u;let i=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],s=[],a=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),o=Zf(r,a,e);if(o&&o.length>=2){let l=o[1],c=o[2];if(c.length<t.autoSuggestMinMatch)return[];if(c.length>0){let y=(u=et.fromText({recurrenceRuleText:c,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:u.toText();if(y){let w=`${l} ${y} `;if(s.push({suggestionType:"match",displayText:`\u2705 ${y}`,appendText:w,insertAt:o.index,insertSkip:o[0].length}),o[0]==w)return[]}}let f=1,h=t.autoSuggestMaxItems/2,T=i.filter(y=>c&&c.length>=f&&y.toLowerCase().includes(c.toLowerCase())).slice(0,h);T.length===0&&c.trim().length===0&&(T=i.slice(0,h));for(let y of T)s.push({suggestionType:"match",displayText:`${y}`,appendText:`${l} ${y} `,insertAt:o.index,insertSkip:o[0].length})}return s}function Zf(r,e,t){let n=r.matchAll(e);for(let i of n)if((i==null?void 0:i.index)&&i.index<=t&&t<=i.index+i[0].length)return i}function bC(r,e){if(e.length===0)return!1;let t=Object.fromEntries(e.map(([i,s])=>[i,0])),n=Object.fromEntries(e.map(([i,s])=>[s,i]));for(let i of r)i in t?t[i]++:i in n&&(t[n[i]]=Math.max(0,t[n[i]]-1));return Object.values(t).some(i=>i>0)}function vb(r,e){return(t,n,i)=>bC(t.slice(0,n),e)?r(t,n,i):[]}function wb(r,e){return ge.getInstance().includedIn(r)&&_C(r,e)}function _C(r,e){if(r.length===0)return!1;let t=le.extractTaskComponents(r);if(!t)return!1;let n=t.indentation+t.listMarker+" ["+t.status.symbol+"] ";return e>=n.length}var pn=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}};var $n=class{constructor(){this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideTags=!1}},hn=class{constructor(e,t){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];this.hiddenTaskLayoutComponents=[];this.taskListHiddenClasses=[];e?this.options=e:this.options=new $n,t?this.queryLayoutOptions=t:this.queryLayoutOptions=new pn,this.shownTaskLayoutComponents=this.defaultLayout,this.applyOptions()}applyOptions(){let e=[[this.options.hidePriority,"priority"],[this.options.hideRecurrenceRule,"recurrenceRule"],[this.options.hideCreatedDate,"createdDate"],[this.options.hideStartDate,"startDate"],[this.options.hideScheduledDate,"scheduledDate"],[this.options.hideDueDate,"dueDate"],[this.options.hideDoneDate,"doneDate"]];for(let[n,i]of e)this.hideComponent(n,i),this.generateHiddenClassForTaskList(n,i);let t=[[this.options.hideTags,"tags"],[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[n,i]of t)this.generateHiddenClassForTaskList(n,i);this.queryLayoutOptions.shortMode&&this.taskListHiddenClasses.push("tasks-layout-short-mode")}generateHiddenClassForTaskList(e,t){e&&this.taskListHiddenClasses.push(`tasks-layout-hide-${t}`)}hideComponent(e,t){e&&(this.hiddenTaskLayoutComponents.push(t),this.shownTaskLayoutComponents=this.shownTaskLayoutComponents.filter(n=>n!=t))}};var Jf={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",recurrenceSymbol:"\u{1F501}",TaskFormatRegularExpressions:{priorityRegex:/([🔺⏫🔼🔽⏬])$/u,startDateRegex:/🛫 *(\d{4}-\d{2}-\d{2})$/u,createdDateRegex:/➕ *(\d{4}-\d{2}-\d{2})$/u,scheduledDateRegex:/[⏳⌛] *(\d{4}-\d{2}-\d{2})$/u,dueDateRegex:/[📅📆🗓] *(\d{4}-\d{2}-\d{2})$/u,doneDateRegex:/✅ *(\d{4}-\d{2}-\d{2})$/u,recurrenceRegex:/🔁 ?([a-zA-Z0-9, !]+)$/iu}},Yn=class{constructor(e){this.symbols=e}serialize(e){let t=new hn,n="";for(let i of t.shownTaskLayoutComponents)n+=this.componentToString(e,t.queryLayoutOptions.shortMode,i);return n}componentToString(e,t,n){var f;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:u,recurrenceSymbol:l,dueDateSymbol:c}=this.symbols;switch(n){case"description":return e.description;case"priority":{let h="";return e.priority==="0"?h=" "+i.Highest:e.priority==="1"?h=" "+i.High:e.priority==="2"?h=" "+i.Medium:e.priority==="4"?h=" "+i.Low:e.priority==="5"&&(h=" "+i.Lowest),h}case"startDate":return e.startDate?t?" "+s:` ${s} ${e.startDate.format(V.dateFormat)}`:"";case"createdDate":return e.createdDate?t?" "+a:` ${a} ${e.createdDate.format(V.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t?" "+o:` ${o} ${e.scheduledDate.format(V.dateFormat)}`;case"doneDate":return e.doneDate?t?" "+u:` ${u} ${e.doneDate.format(V.dateFormat)}`:"";case"dueDate":return e.dueDate?t?" "+c:` ${c} ${e.dueDate.format(V.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t?" "+l:` ${l} ${e.recurrence.toText()}`:"";case"blockLink":return(f=e.blockLink)!=null?f:"";default:throw new Error(`Don't know how to render task component of type '${n}'`)}}parsePriority(e){let{prioritySymbols:t}=this.symbols;switch(e){case t.Lowest:return"5";case t.Low:return"4";case t.Medium:return"2";case t.High:return"1";case t.Highest:return"0";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,i="3",s=null,a=null,o=null,u=null,l=null,c="",f=null,h="",T=20,y=0;do{n=!1;let w=e.match(t.priorityRegex);w!==null&&(i=this.parsePriority(w[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let D=e.match(t.doneDateRegex);D!==null&&(u=window.moment(D[1],V.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let C=e.match(t.dueDateRegex);C!==null&&(o=window.moment(C[1],V.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let N=e.match(t.scheduledDateRegex);N!==null&&(a=window.moment(N[1],V.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let L=e.match(t.startDateRegex);L!==null&&(s=window.moment(L[1],V.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let oe=e.match(t.createdDateRegex);oe!==null&&(l=window.moment(oe[1],V.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let z=e.match(t.recurrenceRegex);z!==null&&(c=z[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let ie=e.match(V.hashTagsFromEnd);if(ie!=null){e=e.replace(V.hashTagsFromEnd,"").trim(),n=!0;let G=ie[0].trim();h=h.length>0?[G,h].join(" "):G}y++}while(n&&y<=T);return c.length>0&&(f=et.fromText({recurrenceRuleText:c,startDate:s,scheduledDate:a,dueDate:o})),h.length>0&&(e+=" "+h),{description:e,priority:i,startDate:s,createdDate:l,scheduledDate:a,dueDate:o,doneDate:u,recurrence:f,tags:le.extractHashtags(e)}}};function Gn(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/(?: *,)?/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var ep={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",recurrenceSymbol:"repeat::",TaskFormatRegularExpressions:{priorityRegex:Gn(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Gn(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Gn(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Gn(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Gn(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Gn(/completion:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Gn(/repeat:: *([a-zA-Z0-9, !]+)/)}},jo=class extends Yn{constructor(){super(ep)}parsePriority(e){switch(e){case"highest":return"0";case"high":return"1";case"medium":return"2";case"low":return"4";case"lowest":return"5";default:return"3"}}componentToString(e,t,n){let i=super.componentToString(e,t,n);return i!==""&&!["blockLink","description"].includes(n)?`  [${i.trim()}]`:i}};var Lt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(Lt||{}),He=class{constructor(e,t,n,i,s="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=i,this.type=s}};var kt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}get typeGroupText(){let e=this.type,t;switch(e){case"IN_PROGRESS":t="1";break;case"TODO":t="2";break;case"DONE":t="3";break;case"CANCELLED":t="4";break;case"NON_TASK":t="5";break;case"EMPTY":t="6";break}return`%%${t}%%${e}`}constructor(e){this.configuration=e}static makeDone(){return new kt(new He("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new kt(new He("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new kt(new He(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new kt(new He("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new kt(new He("/","In Progress","x",!0,"IN_PROGRESS"))}static makeNonTask(){return new kt(new He("Q","Non-Task","A",!0,"NON_TASK"))}static getTypeForUnknownSymbol(e){switch(e){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(e){return Lt[e]||"TODO"}static createUnknownStatus(e){return new kt(new He(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=kt.getTypeFromStatusTypeString(e[3]);return new kt(new He(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}identicalTo(e){let t=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let n of t)if(this[n]!==e[n])return!1;return!0}previewText(){let e="";return kt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},X=kt;X.DONE=kt.makeDone(),X.EMPTY=kt.makeEmpty(),X.TODO=kt.makeTodo();var Bo=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var Pe=class{constructor(){this.coreStatuses=[X.makeTodo().configuration,X.makeDone().configuration],this.customStatuses=[X.makeInProgress().configuration,X.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let i=this.findStatusIndex(t,e);return i<=-1?!1:(e.splice(i,1,n),!0)}static findStatusIndex(e,t){let n=new X(e);return t.findIndex(i=>new X(i).previewText()==n.previewText())}static deleteStatus(e,t){let n=this.findStatusIndex(t,e);return n<=-1?!1:(e.splice(n,1),!0)}static deleteAllCustomStatuses(e){e.customStatuses.splice(0)}static resetAllCustomStatuses(e){Pe.deleteAllCustomStatuses(e),new Pe().customStatuses.forEach(n=>{Pe.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(i=>{e.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?n.push(`The status ${i[1]} (${i[0]}) is already added.`):Pe.addStatus(e.customStatuses,X.createFromImportedValue(i))}),n}static allStatuses(e){return e.coreStatuses.concat(e.customStatuses)}static applyToStatusRegistry(e,t){t.clearStatuses(),Pe.allStatuses(e).forEach(n=>{t.add(n)})}};var Eb=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var Br=class{constructor(e,t,n,i,s,a){this.internalName=e;this.index=t;this.description=n;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let e=[];return Eb.forEach(t=>{e=[...e,new Br(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return Br.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of Br.values)if(e===t.internalName)return t;throw new RangeError(`Illegal argument passed to fromString(): ${e} does not correspond to any available Feature ${this.prototype.constructor.name}`)}};var Hr={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new Yn(Jf),buildSuggestions:Xf(Jf,Qf)},dataview:{displayName:"Dataview",taskSerializer:new jo,buildSuggestions:vb(Xf(ep,Qf),[["(",")"],["[","]"]])}},Sb={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],recurrenceOnNextLine:!1,statusSettings:new Pe,features:Br.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new Bo,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},mn=we({},Sb);function kb(r,e){for(let t in r)e[t]===void 0&&(e[t]=r[t])}var Q=()=>(kb(Br.settingsFlags,mn.features),kb(Sb.loggingOptions.minLevels,mn.loggingOptions.minLevels),mn.statusSettings.customStatuses.forEach((r,e,t)=>{var i,s;let n=X.getTypeFromStatusTypeString(r.type);t[e]=new He((i=r.symbol)!=null?i:" ",r.name,(s=r.nextStatusSymbol)!=null?s:"x",r.availableAsCommand,n)}),we({},mn)),tt=r=>(mn=we(we({},mn),r),Q());var jn=(r,e)=>(mn.generalSettings[r]=e,Q()),Ob=r=>{var e;return(e=mn.features[r])!=null?e:!1};function Ta(){return Hr[Q().taskFormat]}function Ho(r){let t={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;"}[r];return t!==void 0?t:r}function Db(r){let e=[...r],t="";return e.forEach(n=>{t+=Ho(n)}),t}var ve=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(e){this.clearStatuses(),e.forEach(t=>{this.add(t)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==X.EMPTY.symbol)}static getInstance(){return ve.instance||(ve.instance=new ve),ve.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof X?this._registeredStatuses.push(e):this._registeredStatuses.push(new X(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):X.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):X.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:X.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(e){if(e.nextStatusSymbol!==""){let t=this.bySymbol(e.nextStatusSymbol);if(t!==null)return t}return X.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:X.createUnknownStatus(e.nextStatusSymbol)}getNextRecurrenceStatusOrCreate(e){let t=this.getNextStatusOrCreate(e),n=this.getNextRecurrenceStatusOfType(t,"TODO");if(n)return n;let i=this.getNextRecurrenceStatusOfType(t,"IN_PROGRESS");return i||this.bySymbolOrCreate(" ")}getNextRecurrenceStatusOfType(e,t){if(e.type===t)return e;let n=e;for(let i=0;i<this.registeredStatuses.length-1;i++)if(n=this.getNextStatusOrCreate(n),n.type===t)return n}findUnknownStatuses(e){let t=e.filter(s=>!this.hasSymbol(s.symbol)),n=new ve,i=[];return t.forEach(s=>{if(n.hasSymbol(s.symbol))return;let a=ve.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),n.add(a)}),i.sort((s,a)=>s.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(e,t){let n=new He(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new X(n)}getSymbol(e){return this._registeredStatuses.filter(({symbol:t})=>t===e)[0]}hasSymbol(e){return this._registeredStatuses.find(t=>t.symbol===e)!==void 0}addDefaultStatusTypes(){[X.makeTodo(),X.makeInProgress(),X.makeDone(),X.makeCancelled()].forEach(t=>{this.add(t)})}mermaidDiagram(e=!1){let t=this.registeredStatuses,n="mermaid",i=[],s=[];return t.forEach((a,o)=>{let u=this.getMermaidNodeLabel(a,e);i.push(`${o+1}${u}`);let l=this.getNextStatus(a);if(this.addEdgeIfNotToInternal(t,l,s,o,!1),a.type==="DONE"){let c=this.getNextRecurrenceStatusOrCreate(a);c.symbol!==l.symbol&&this.addEdgeIfNotToInternal(t,c,s,o,!0)}}),`
\`\`\`${n}
flowchart LR

classDef TODO        stroke:#f33,stroke-width:3px;
classDef DONE        stroke:#0c0,stroke-width:3px;
classDef IN_PROGRESS stroke:#fa0,stroke-width:3px;
classDef CANCELLED   stroke:#ddd,stroke-width:3px;
classDef NON_TASK    stroke:#99e,stroke-width:3px;

${i.join(`
`)}
${s.join(`
`)}

linkStyle default stroke:gray
\`\`\`
`}addEdgeIfNotToInternal(e,t,n,i,s){let a=e.findIndex(l=>l.symbol===t.symbol),o=a!==-1,u=t.type!=="EMPTY";if(o&&u){let l;s?l='-. "\u{1F501}" .-> ':l=" --> ";let c=`${i+1}${l}${a+1}`;n.push(c)}}getMermaidNodeLabel(e,t){let n=Db(e.name),i=e.type;if(t){let s=Ho(e.symbol),a=Ho(e.nextStatusSymbol),o=`[${s}] -> [${a}]`,u=`'${n}'`,l=`(${i})`;return`["${u}<br>${o}<br>${l}"]:::${i}`}else return`["${n}"]:::${i}`}};var lr=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=window.moment().startOf("day"),i=Math.round(n.diff(e.dueDate)/lr.milliSecondsPerDay),s;i>=7?s=1:i>=-14?s=(i+14)*.8/21+.2:s=.2,t+=s*lr.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*lr.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*lr.startedCoefficient),e.priority){case"0":t+=1.5*lr.priorityCoefficient;break;case"1":t+=1*lr.priorityCoefficient;break;case"2":t+=.65*lr.priorityCoefficient;break;case"3":t+=.325*lr.priorityCoefficient;break;case"5":t-=.3*lr.priorityCoefficient;break}return t}},zr=lr;zr.dueCoefficient=12,zr.scheduledCoefficient=5,zr.startedCoefficient=-3,zr.priorityCoefficient=6,zr.milliSecondsPerDay=1e3*60*60*24;var ht=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=Q();return!t||!this.matchesAnyFolder(n,e)?null:this.extractDateFromPath(e)}static matchesAnyFolder(e,t){return e.length===0?!0:e.some(n=>t.startsWith(n+"/"))}static extractDateFromPath(e){let t=Math.max(0,e.lastIndexOf("/")+1),n=e.lastIndexOf("."),i=e.substring(t,n),s=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(s||(s=/(\d{4})(\d{2})(\d{2})/.exec(i)),s){let a=window.moment([parseInt(s[1]),parseInt(s[2])-1,parseInt(s[3])]);if(a.isValid())return a}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let i=e.scheduledDate,s=e.scheduledDateIsInferred;return n===null?s&&(s=!1,i=null):s?i=n:this.canApplyFallback(e)&&(i=n,s=!0),new le(it(we({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(i=>(n!==null&&!n.isSame(i.scheduledDate,"day")&&(i=new le(it(we({},i),{scheduledDateIsInferred:!1}))),i))}};var xb=require("obsidian");var Vr=class{constructor(e,t){this.name=e,this.sortOrder=t}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}};var rt=class{constructor(e){this._date=null;this._date=e}get moment(){return this._date}formatAsDate(e=""){return this.format(V.dateFormat,e)}formatAsDateAndTime(e=""){return this.format(V.dateTimeFormat,e)}format(e,t=""){return this._date?this._date.format(e):t}toISOString(e){return this._date?this._date.toISOString(e):""}get category(){let e=window.moment(),t=this.moment;return t?t.isBefore(e,"day")?new Vr("Overdue",1):t.isSame(e,"day")?new Vr("Today",2):new Vr("Future",3):new Vr("Undated",4)}get fromNow(){let e=this.moment;if(!e)return new Vr("",0);let t=this.fromNowOrder(e);return new Vr(e.fromNow(),t)}fromNowOrder(e){let t=window.moment(),n=e.isSameOrBefore(t,"day"),i=this.fromNowStartDateOfGroup(e,n,t);return Number((n?1:3)+i.format("YYYYMMDD"))}fromNowStartDateOfGroup(e,t,n){let i=e.fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return t?n.subtract(s,o):n.add(s,o)}postpone(e="days",t=1){if(!this._date)throw new xb.Notice("Cannot postpone a null date");let n=window.moment().startOf("day");return this._date.isSameOrAfter(n,"day")?this._date.clone().add(t,e):n.add(t,e)}};var Ci=class{constructor(e){this._path=e}get path(){return this._path}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(e){return e.replace(/\.md$/,"")}get root(){let e=this.path.replace(/\\/g,"/");e.charAt(0)==="/"&&(e=e.substring(1));let t=e.indexOf("/");return t==-1?"/":e.substring(0,t+1)}get folder(){let e=this.path,t=this.filename,n=e.substring(0,e.lastIndexOf(t));return n===""?"/":n}get filename(){let e=this.path.match(/([^/]+)$/);return e!==null?e[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}};var Kr=class{static priorityNameUsingNone(e){let t="ERROR";switch(e){case"1":t="High";break;case"0":t="Highest";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break;case"5":t="Lowest";break}return t}static priorityNameUsingNormal(e){return Kr.priorityNameUsingNone(e).replace("None","Normal")}};var wC=require("obsidian"),Ab=us(Cb());var tp=class extends Ab.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,i)=>n+i,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",i="";for(let s in this.options.minLevels)t.startsWith(s)&&s.length>=i.length&&(n=this.options.minLevels[s],i=s);return new rp(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${t.level}][${t.module}]`;switch(t.traceId&&(n+=`[${t.traceId}]`),n+=` ${t.message}`,t.objects===void 0&&(t.objects=""),t.level){case"trace":console.trace(n,t.objects);break;case"debug":console.debug(n,t.objects);break;case"info":console.info(n,t.objects);break;case"warn":console.warn(n,t.objects);break;case"error":console.error(n,t.objects);break;default:console.log(`{${t.level}} ${n}`,t.objects)}}),this.consoleLoggerRegistered=!0,this)}},St=new tp,rp=class{constructor(e,t,n){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=e,this.module=t,this.minLevel=this.levelToInt(n)}levelToInt(e){return e.toLowerCase()in this.levels?this.levels[e.toLowerCase()]:99}log(e,t,n){if(this.levelToInt(e)<this.minLevel)return;let s={level:e,module:this.module,message:t,objects:n,traceId:void 0};this.logManager.emit("log",s)}trace(e,t){this.log("trace",e,t)}debug(e,t){this.log("debug",e,t)}info(e,t){this.log("info",e,t)}warn(e,t){this.log("warn",e,t)}error(e,t){this.log("error",e,t)}logWithId(e,t,n,i){if(this.levelToInt(e)<this.minLevel)return;let a={level:e,module:this.module,message:n,objects:i,traceId:t};this.logManager.emit("log",a)}traceWithId(e,t,n){this.logWithId("trace",e,t,n)}debugWithId(e,t,n){this.logWithId("debug",e,t,n)}infoWithId(e,t,n){this.logWithId("info",e,t,n)}warnWithId(e,t,n){this.logWithId("warn",e,t,n)}errorWithId(e,t,n){this.logWithId("error",e,t,n)}};function np(r,e){let t=St.getLogger("tasks");switch(r){case"trace":t.trace(e);break;case"debug":t.debug(e);break;case"info":t.info(e);break;case"warn":t.warn(e);break;case"error":t.error(e);break;default:break}}function zo(r,e,t){r.debug(`${e}: task line number: ${t.taskLocation.lineNumber}. file path: "${t.path}"`),r.debug(`${e} original: ${t.originalMarkdown}`)}function Vo(r,e,t){t.map((n,i)=>{r.debug(`${e} ==> ${i+1}   : ${n.toFileLineString()}`)})}var Ut=class{},V=Ut;V.dateFormat="YYYY-MM-DD",V.dateTimeFormat="YYYY-MM-DD HH:mm",V.indentationRegex=/^([\s\t>]*)/,V.listMarkerRegex=/([-*+]|[0-9]+\.)/,V.checkboxRegex=/\[(.)\]/u,V.afterCheckboxRegex=/ *(.*)/u,V.taskRegex=new RegExp(Ut.indentationRegex.source+Ut.listMarkerRegex.source+" +"+Ut.checkboxRegex.source+Ut.afterCheckboxRegex.source,"u"),V.nonTaskRegex=new RegExp(Ut.indentationRegex.source+Ut.listMarkerRegex.source+"? *("+Ut.checkboxRegex.source+")?"+Ut.afterCheckboxRegex.source,"u"),V.listItemRegex=new RegExp(Ut.indentationRegex.source+Ut.listMarkerRegex.source),V.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,V.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,V.hashTagsFromEnd=new RegExp(Ut.hashTags.source+"$");var le=class{constructor({status:e,description:t,taskLocation:n,indentation:i,listMarker:s,priority:a,createdDate:o,startDate:u,scheduledDate:l,dueDate:c,doneDate:f,recurrence:h,blockLink:T,tags:y,originalMarkdown:w,scheduledDateIsInferred:D}){this._urgency=null;this.status=e,this.description=t,this.indentation=i,this.listMarker=s,this.taskLocation=n,this.tags=y,this.priority=a,this.createdDate=o,this.startDate=u,this.scheduledDate=l,this.dueDate=c,this.doneDate=f,this.recurrence=h,this.blockLink=T,this.originalMarkdown=w,this.scheduledDateIsInferred=D}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let i=le.extractTaskComponents(e);return i===null||!ge.getInstance().includedIn(i.body)?null:le.parseTaskSignifiers(e,t,n)}static parseTaskSignifiers(e,t,n){let i=le.extractTaskComponents(e);if(i===null)return null;let{taskSerializer:s}=Ta(),a=s.deserialize(i.body),o=!1;return ht.canApplyFallback(a)&&n!==null&&(a.scheduledDate=n,o=!0),a.tags=a.tags.map(u=>u.trim()),a.tags=a.tags.filter(u=>!ge.getInstance().equals(u)),new le(it(we(we({},i),a),{taskLocation:t,originalMarkdown:e,scheduledDateIsInferred:o}))}static extractTaskComponents(e){let t=e.match(V.taskRegex);if(t===null)return null;let n=t[1],i=t[2],s=t[3],a=ve.getInstance().bySymbolOrCreate(s),o=t[4].trim(),u=o.match(V.blockLinkRegex),l=u!==null?u[0]:"";return l!==""&&(o=o.replace(V.blockLinkRegex,"").trim()),{indentation:n,listMarker:i,status:a,body:o,blockLink:l}}toString(){return Ta().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=St.getLogger("tasks.Task"),t="toggle()";zo(e,t,this);let n=ve.getInstance().getNextStatusOrCreate(this.status),i=this.handleNewStatus(n);return Vo(e,t,i),i}handleNewStatus(e){if(e.identicalTo(this.status))return[this];let t=null;if(e.isCompleted())if(this.status.isCompleted())t=this.doneDate;else{let{setDoneDate:a}=Q();a&&(t=window.moment())}let n=null;e.isCompleted()&&!this.status.isCompleted()&&this.recurrence!==null&&(n=this.recurrence.next());let i=new le(it(we({},this),{status:e,doneDate:t})),s=[];if(n!==null){let{setCreatedDate:a}=Q(),o=null;a&&(o=window.moment());let l=ve.getInstance().getNextRecurrenceStatusOrCreate(e),c=new le(it(we(we({},this),n),{status:l,blockLink:"",createdDate:o}));s.push(c)}return s.push(i),s}toggleWithRecurrenceInUsersOrder(){let e=this.toggle(),{recurrenceOnNextLine:t}=Q();return t?e.reverse():e}handleNewStatusWithRecurrenceInUsersOrder(e){St.getLogger("tasks.Task").debug(`changed task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown} status to ${e}`);let n=this.handleNewStatus(e),{recurrenceOnNextLine:i}=Q();return i?n.reverse():n}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}get priorityNumber(){return Number.parseInt(this.priority)}get priorityNameGroupText(){let e=Kr.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${e} priority`}get descriptionWithoutTags(){return this.description.replace(V.hashTags,"").trim()}get priorityName(){return Kr.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=zr.calculate(this)),this._urgency}get path(){return this.taskLocation.path}get created(){return new rt(this.createdDate)}get done(){return new rt(this.doneDate)}get due(){return new rt(this.dueDate)}get scheduled(){return new rt(this.scheduledDate)}get start(){return new rt(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let t=this.happensDates.sort(jr);return new rt(t[0])}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}get file(){return new Ci(this.path)}get filename(){let e=this.path.match(/([^/]+)\.md$/);return e!==null?e[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}getLinkText({isFilenameUnique:e}){let t;return e?t=this.filename:t="/"+this.path,t===null?null:(this.precedingHeader!==null&&this.precedingHeader!==t&&(t=t+" > "+this.precedingHeader),t)}static tasksListsIdentical(e,t){return e.length!==t.length?!1:e.every((n,i)=>n.identicalTo(t[i]))}identicalTo(e){let t=["description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let s of t)if(this[s]!==e[s])return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(s,a){return s===e.tags[a]}))return!1;t=le.allDateFields();for(let s of t){let a=this[s],o=e[s];if(jr(a,o)!==0)return!1}let n=this.recurrence,i=e.recurrence;return n===null&&i!==null||n!==null&&i===null?!1:!(n&&i&&!n.identicalTo(i))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate"]}static extractHashtags(e){var t,n;return(n=(t=e.match(V.hashTags))==null?void 0:t.map(i=>i.trim()))!=null?n:[]}};var ba=class{constructor(e){this.fetch=e;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};var ct=class{constructor(e,t,n,i,s){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(e){return new ct(e,0,0,0,null)}fromRenamedFile(e){return new ct(e,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get path(){return this._path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}};var Bn=class{constructor({metadataCache:e,vault:t,events:n}){this.logger=St.getLogger("tasks.Cache");this.logger.debug("Creating Cache object"),this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new $a,this.state="Cold",this.logger.debug("Cache.constructor(): state = Cold"),this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){this.logger.info("Unloading Cache");for(let e of this.metadataCacheEventReferences)this.metadataCache.offref(e);for(let e of this.vaultEventReferences)this.vault.offref(e);for(let e of this.eventsEventReferences)this.events.off(e)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.logger.debug("Cache.notifySubscribers()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let e=this.metadataCache.on("resolved",()=>F(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(e);let t=this.metadataCache.on("changed",n=>{this.tasksMutex.runExclusive(()=>{this.indexFile(n)})});this.metadataCacheEventReferences.push(t)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:e}=Q(),t=this.vault.on("create",s=>{s instanceof Ai.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(s)}))});this.vaultEventReferences.push(t);let n=this.vault.on("delete",s=>{s instanceof Ai.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()}))});this.vaultEventReferences.push(n);let i=this.vault.on("rename",(s,a)=>{s instanceof Ai.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{let o=new ba(()=>ht.fromPath(s.path));this.tasks=this.tasks.map(u=>u.path===a?e?ht.updateTaskPath(u,s.path,o.value):new le(it(we({},u),{taskLocation:u.taskLocation.fromRenamedFile(s.path)})):u),this.notifySubscribers()}))});this.vaultEventReferences.push(i)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>F(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(e){return F(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;if(!e.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+e.path);return}this.logger.debug("Cache.indexFile: "+e.path);let n=this.tasks.filter(a=>a.path===e.path),i=t.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(e);s=this.getTasksFromFileContent(a,i,t,e)}le.tasksListsIdentical(n,s)||(this.tasks=this.tasks.filter(a=>a.path!==e.path),this.tasks.push(...s),this.logger.debug("Cache.indexFile: "+e.path+`: read ${s.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,i){let s=[],a=e.split(`
`),o=a.length,u=new ba(()=>ht.fromPath(i.path)),l=null,c=0;for(let f of t)if(f.task!==void 0){let h=f.position.start.line;if(h>=o)return this.logger.debug(`${i.path} Obsidian gave us a line number ${h} past the end of the file. ${o}.`),s;if((l===null||l.position.end.line<h)&&(l=Bn.getSection(h,n.sections),c=0),l===null)continue;let T=a[h];if(T===void 0){this.logger.debug(`${i.path}: line ${h} - ignoring 'undefined' line.`);continue}let y;try{y=le.fromLine({line:T,taskLocation:new ct(i.path,h,l.position.start.line,c,Bn.getPrecedingHeader(h,n.headings)),fallbackDate:u.value})}catch(w){this.reportTaskParsingErrorToUser(w,i,f,T);continue}y!==null&&(c++,s.push(y))}return s}reportTaskParsingErrorToUser(e,t,n,i){let s=`There was an error reading one of the tasks in this vault.
The following task has been ignored, to prevent Tasks queries getting stuck with 'Loading Tasks ...'
Error: ${e}
File: ${t.path}
Line number: ${n.position.start.line}
Task line: ${i}

Please create a bug report for this message at
https://github.com/obsidian-tasks-group/obsidian-tasks/issues/new/choose
to help us find and fix the underlying issue.

Include:
- either a screenshot of the error popup, or copy the text from the console, if on a desktop machine.
- the output from running the Obsidian command 'Show debug info'

The error popup will only be shown when Tasks is starting up, but if the error persists,
it will be shown in the console every time this file is edited during the Obsidian
session.
`;this.logger.error(s),e instanceof Error&&this.logger.error(e.stack?e.stack:"Cannot determine stack"),this.state==="Initializing"&&new Ai.Notice(s,1e4)}static getSection(e,t){if(t===void 0)return null;for(let n of t)if(n.position.start.line<=e&&n.position.end.line>=e)return n;return null}static getPrecedingHeader(e,t){if(t===void 0)return null;let n=null;for(let i of t){if(i.position.start.line>e)return n;n=i.heading}return n}};var hp=require("obsidian");var Qb=require("obsidian");function Qr(){}function ap(r){return r()}function Pb(){return Object.create(null)}function zn(r){r.forEach(ap)}function Ko(r){return typeof r=="function"}function Ib(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function Fb(r){return Object.keys(r).length===0}var Lb=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,va=class{constructor(e){this.options=e,this._listeners="WeakMap"in Lb?new WeakMap:void 0}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var n;for(let i of t)va.entries.set(i.target,i),(n=this._listeners.get(i.target))===null||n===void 0||n(i)})}};va.entries="WeakMap"in Lb?new WeakMap:void 0;var Ub=!1;function kC(){Ub=!0}function SC(){Ub=!1}function R(r,e){r.appendChild(e)}function Fi(r,e,t){r.insertBefore(e,t||null)}function Vn(r){r.parentNode&&r.parentNode.removeChild(r)}function op(r,e){for(let t=0;t<r.length;t+=1)r[t]&&r[t].d(e)}function K(r){return document.createElement(r)}function OC(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function mt(r){return document.createTextNode(r)}function pe(){return mt(" ")}function Ot(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function qb(r){return function(e){return e.preventDefault(),r.call(this,e)}}function U(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function Wb(r){let e;return{p(...t){e=t,e.forEach(n=>r.push(n))},r(){e.forEach(t=>r.splice(r.indexOf(t),1))}}}function DC(r){return Array.from(r.childNodes)}function up(r,e){e=""+e,r.data!==e&&(r.data=e)}function cr(r,e){r.value=e==null?"":e}function lp(r,e,t){for(let n=0;n<r.options.length;n+=1){let i=r.options[n];if(i.__value===e){i.selected=!0;return}}(!t||e!==void 0)&&(r.selectedIndex=-1)}function $b(r){let e=r.querySelector(":checked");return e&&e.__value}function dr(r,e,t){r.classList[t?"add":"remove"](e)}var Hn=class{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=OC(t.nodeName):this.e=K(t.nodeType===11?"TEMPLATE":t.nodeName),this.t=t.tagName!=="TEMPLATE"?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)Fi(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(Vn)}};var wa;function _a(r){wa=r}function xC(){if(!wa)throw new Error("Function called outside component initialization");return wa}function cp(r){xC().$$.on_mount.push(r)}var Ni=[];var Qo=[],Ii=[],Nb=[],RC=Promise.resolve(),sp=!1;function MC(){sp||(sp=!0,RC.then(Yb))}function Ea(r){Ii.push(r)}var ip=new Set,Pi=0;function Yb(){if(Pi!==0)return;let r=wa;do{try{for(;Pi<Ni.length;){let e=Ni[Pi];Pi++,_a(e),CC(e.$$)}}catch(e){throw Ni.length=0,Pi=0,e}for(_a(null),Ni.length=0,Pi=0;Qo.length;)Qo.pop()();for(let e=0;e<Ii.length;e+=1){let t=Ii[e];ip.has(t)||(ip.add(t),t())}Ii.length=0}while(Ni.length);for(;Nb.length;)Nb.pop()();sp=!1,ip.clear(),_a(r)}function CC(r){if(r.fragment!==null){r.update(),zn(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(Ea)}}function AC(r){let e=[],t=[];Ii.forEach(n=>r.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),Ii=e}var PC=new Set;function NC(r,e){r&&r.i&&(PC.delete(r),r.i(e))}var IC=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],UU=new Set([...IC]);function FC(r,e,t,n){let{fragment:i,after_update:s}=r.$$;i&&i.m(e,t),n||Ea(()=>{let a=r.$$.on_mount.map(ap).filter(Ko);r.$$.on_destroy?r.$$.on_destroy.push(...a):zn(a),r.$$.on_mount=[]}),s.forEach(Ea)}function Gb(r,e){let t=r.$$;t.fragment!==null&&(AC(t.after_update),zn(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function LC(r,e){r.$$.dirty[0]===-1&&(Ni.push(r),MC(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function jb(r,e,t,n,i,s,a,o=[-1]){let u=wa;_a(r);let l=r.$$={fragment:null,ctx:[],props:s,update:Qr,not_equal:i,bound:Pb(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:Pb(),dirty:o,skip_bound:!1,root:e.target||u.$$.root};a&&a(l.root);let c=!1;if(l.ctx=t?t(r,e.props||{},(f,h,...T)=>{let y=T.length?T[0]:h;return l.ctx&&i(l.ctx[f],l.ctx[f]=y)&&(!l.skip_bound&&l.bound[f]&&l.bound[f](y),c&&LC(r,f)),h}):[],l.update(),c=!0,zn(l.before_update),l.fragment=n?n(l.ctx):!1,e.target){if(e.hydrate){kC();let f=DC(e.target);l.fragment&&l.fragment.l(f),f.forEach(Vn)}else l.fragment&&l.fragment.c();e.intro&&NC(r.$$.fragment),FC(r,e.target,e.anchor,e.customElement),SC(),Yb()}_a(u)}var UC;typeof HTMLElement=="function"&&(UC=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(ap).filter(Ko);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){zn(this.$$.on_disconnect)}$destroy(){Gb(this,1),this.$destroy=Qr}$on(r,e){if(!Ko(e))return Qr;let t=this.$$.callbacks[r]||(this.$$.callbacks[r]=[]);return t.push(e),()=>{let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}$set(r){this.$$set&&!Fb(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Xo=class{$destroy(){Gb(this,1),this.$destroy=Qr}$on(e,t){if(!Ko(t))return Qr;let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!Fb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var fp=us(Be());function Bb(r,e,t){let n=r.slice();return n[45]=e[t],n}function Hb(r,e,t){let n=r.slice();return n[48]=e[t].value,n[49]=e[t].label,n[50]=e[t].symbol,n[51]=e[t].accessKey,n[52]=e[t].accessKeyIndex,n}function qC(r){let e,t=r[50]+"",n;return{c(){e=K("span"),n=mt(t)},m(i,s){Fi(i,e,s),R(e,n)},p:Qr,d(i){i&&Vn(e)}}}function zb(r){let e,t,n,i,s,a,o,u,l=r[49].substring(0,r[52])+"",c,f,h=r[49].substring(r[52],r[52]+1)+"",T,y,w=r[49].substring(r[52]+1)+"",D,C,N=r[50]&&r[50].charCodeAt(0)>=256,L,oe,z,ie,G,j=N&&qC(r);return z=Wb(r[33][0]),{c(){e=K("span"),t=K("input"),a=pe(),o=K("label"),u=K("span"),c=mt(l),f=K("span"),T=mt(h),y=K("span"),D=mt(w),C=pe(),j&&j.c(),oe=pe(),U(t,"type","radio"),U(t,"id",n="priority-"+r[48]),t.__value=i=r[48],t.value=t.__value,U(t,"accesskey",s=r[15](r[51])),U(f,"class","accesskey"),U(o,"for",L="priority-"+r[48]),z.p(t)},m(Ne,Le){Fi(Ne,e,Le),R(e,t),t.checked=t.__value===r[1].priority,R(e,a),R(e,o),R(o,u),R(u,c),R(o,f),R(f,T),R(o,y),R(y,D),R(o,C),j&&j.m(o,null),R(e,oe),ie||(G=Ot(t,"change",r[32]),ie=!0)},p(Ne,Le){Le[0]&32768&&s!==(s=Ne[15](Ne[51]))&&U(t,"accesskey",s),Le[0]&3&&(t.checked=t.__value===Ne[1].priority),N&&j.p(Ne,Le)},d(Ne){Ne&&Vn(e),j&&j.d(),z.r(),ie=!1,G()}}}function Vb(r){let e,t=r[45].name+"",n,i,s=r[45].symbol+"",a,o,u;return{c(){e=K("option"),n=mt(t),i=mt(" ["),a=mt(s),o=mt("]"),e.__value=u=r[45],e.value=e.__value},m(l,c){Fi(l,e,c),R(e,n),R(e,i),R(e,a),R(e,o)},p(l,c){c[0]&1&&t!==(t=l[45].name+"")&&up(n,t),c[0]&1&&s!==(s=l[45].symbol+"")&&up(a,s),c[0]&1&&u!==(u=l[45])&&(e.__value=u,e.value=e.__value)},d(l){l&&Vn(e)}}}function WC(r){let e,t,n,i,s,a,o,u,l,c,f,h,T,y,w,D,C,N,L,oe,z,ie,G,j,Ne,Le,B,A,E,H,P,Z,d,p,m,g,b,v,k,x,S,O,I,me,se,te,De,q,Re,Ae,nt,Mr,We,Ue,Yp,ts,Aa,Gp,mr,Pa,jp,si,Na,Bp,Gt,Ia,Hp,en,rs,Fa,zp,tn,La,Vp,ns,Hu,Kp,Ua,Qp,is,zu,Xp,qa,Zp,ai,Sn,Jp,Wa,eh,ss,Vu,th,oi=r[20],_t=[];for(let Y=0;Y<oi.length;Y+=1)_t[Y]=zb(Hb(r,oi,Y));let ui=r[0],vt=[];for(let Y=0;Y<ui.length;Y+=1)vt[Y]=Vb(Bb(r,ui,Y));return{c(){e=K("div"),t=K("form"),n=K("div"),i=K("label"),i.innerHTML='Descrip<span class="accesskey">t</span>ion',s=pe(),a=K("textarea"),u=pe(),l=K("div"),c=K("label"),f=mt("Priority"),T=pe();for(let Y=0;Y<_t.length;Y+=1)_t[Y].c();y=pe(),w=K("div"),D=K("label"),D.textContent="Recurs",C=pe(),N=K("input"),oe=pe(),z=K("code"),ie=mt(r[16]),G=pe(),j=new Hn(!1),Ne=pe(),Le=K("label"),Le.textContent="Due",B=pe(),A=K("input"),H=pe(),P=K("code"),Z=mt(r[19]),d=pe(),p=new Hn(!1),m=pe(),g=K("label"),g.textContent="Scheduled",b=pe(),v=K("input"),x=pe(),S=K("code"),O=mt(r[18]),I=pe(),me=new Hn(!1),se=pe(),te=K("label"),te.innerHTML='St<span class="accesskey">a</span>rt',De=pe(),q=K("input"),Ae=pe(),nt=K("code"),Mr=mt(r[17]),We=pe(),Ue=new Hn(!1),Yp=pe(),ts=K("div"),Aa=K("label"),Aa.innerHTML=`Only
                    <span class="accesskey-first">future</span> dates:`,Gp=pe(),mr=K("input"),jp=pe(),si=K("div"),Na=K("label"),Na.innerHTML='Stat<span class="accesskey">u</span>s',Bp=pe(),Gt=K("select");for(let Y=0;Y<vt.length;Y+=1)vt[Y].c();Hp=pe(),en=K("div"),rs=K("div"),Fa=K("label"),Fa.textContent="Completed:",zp=pe(),tn=K("input"),Vp=pe(),ns=K("div"),Hu=K("span"),Hu.textContent="Created on:",Kp=pe(),Ua=K("code"),Qp=pe(),is=K("div"),zu=K("span"),zu.textContent="Done on:",Xp=pe(),qa=K("code"),Zp=pe(),ai=K("div"),Sn=K("button"),Jp=mt("Apply"),eh=pe(),ss=K("button"),ss.textContent="Cancel",U(i,"for","description"),U(a,"id","description"),U(a,"class","tasks-modal-description"),U(a,"placeholder","Take out the trash"),U(a,"accesskey",o=r[15]("t")),U(n,"class","tasks-modal-section"),U(c,"for",h="priority-"+r[1].priority),U(l,"class","tasks-modal-section tasks-modal-priorities"),U(D,"for","recurrence"),U(D,"class","accesskey-first"),U(N,"id","recurrence"),U(N,"type","text"),U(N,"placeholder","Try 'every 2 weeks on Thursday'."),U(N,"accesskey",L=r[15]("r")),dr(N,"tasks-modal-error",!r[8]),j.a=null,U(Le,"for","due"),U(Le,"class","accesskey-first"),U(A,"id","due"),U(A,"type","text"),U(A,"placeholder",dp),U(A,"accesskey",E=r[15]("d")),dr(A,"tasks-modal-error",!r[7]),p.a=null,U(g,"for","scheduled"),U(g,"class","accesskey-first"),U(v,"id","scheduled"),U(v,"type","text"),U(v,"placeholder",dp),U(v,"accesskey",k=r[15]("s")),dr(v,"tasks-modal-error",!r[5]),me.a=null,U(te,"for","start"),U(q,"id","start"),U(q,"type","text"),U(q,"placeholder",dp),U(q,"accesskey",Re=r[15]("a")),dr(q,"tasks-modal-error",!r[3]),Ue.a=null,U(Aa,"for","forwardOnly"),U(mr,"id","forwardOnly"),U(mr,"type","checkbox"),U(mr,"class","task-list-item-checkbox tasks-modal-checkbox"),U(mr,"accesskey",Pa=r[15]("f")),U(w,"class","tasks-modal-section tasks-modal-dates"),U(Na,"for","status"),U(Gt,"id","status-type"),U(Gt,"class","dropdown"),U(Gt,"accesskey",Ia=r[15]("u")),r[1].status===void 0&&Ea(()=>r[39].call(Gt)),U(si,"class","tasks-modal-section"),U(Fa,"for","status"),U(tn,"id","status"),U(tn,"type","checkbox"),U(tn,"class","task-list-item-checkbox tasks-modal-checkbox"),tn.checked=La=r[1].status.isCompleted(),tn.disabled=!0,U(en,"class","tasks-modal-section tasks-modal-status"),Sn.disabled=Wa=!r[14],U(Sn,"type","submit"),U(Sn,"class","mod-cta"),U(ss,"type","button"),U(ai,"class","tasks-modal-section tasks-modal-buttons"),dr(t,"with-accesskeys",r[9]),U(e,"class","tasks-modal")},m(Y,he){Fi(Y,e,he),R(e,t),R(t,n),R(n,i),R(n,s),R(n,a),cr(a,r[1].description),r[31](a),R(t,u),R(t,l),R(l,c),R(c,f),R(l,T);for(let de=0;de<_t.length;de+=1)_t[de]&&_t[de].m(l,null);R(t,y),R(t,w),R(w,D),R(w,C),R(w,N),cr(N,r[1].recurrenceRule),R(w,oe),R(w,z),R(z,ie),R(z,G),j.m(r[12],z),R(w,Ne),R(w,Le),R(w,B),R(w,A),cr(A,r[1].dueDate),R(w,H),R(w,P),R(P,Z),R(P,d),p.m(r[6],P),R(w,m),R(w,g),R(w,b),R(w,v),cr(v,r[1].scheduledDate),R(w,x),R(w,S),R(S,O),R(S,I),me.m(r[4],S),R(w,se),R(w,te),R(w,De),R(w,q),cr(q,r[1].startDate),R(w,Ae),R(w,nt),R(nt,Mr),R(nt,We),Ue.m(r[2],nt),R(w,Yp),R(w,ts),R(ts,Aa),R(ts,Gp),R(ts,mr),mr.checked=r[1].forwardOnly,R(t,jp),R(t,si),R(si,Na),R(si,Bp),R(si,Gt);for(let de=0;de<vt.length;de+=1)vt[de]&&vt[de].m(Gt,null);lp(Gt,r[1].status,!0),R(t,Hp),R(t,en),R(en,rs),R(rs,Fa),R(rs,zp),R(rs,tn),R(en,Vp),R(en,ns),R(ns,Hu),R(ns,Kp),R(ns,Ua),Ua.innerHTML=r[11],R(en,Qp),R(en,is),R(is,zu),R(is,Xp),R(is,qa),qa.innerHTML=r[13],R(t,Zp),R(t,ai),R(ai,Sn),R(Sn,Jp),R(ai,eh),R(ai,ss),Vu||(th=[Ot(a,"input",r[30]),Ot(a,"keydown",r[23]),Ot(a,"paste",r[24]),Ot(a,"drop",r[24]),Ot(l,"keyup",r[21]),Ot(N,"input",r[34]),Ot(A,"input",r[35]),Ot(v,"input",r[36]),Ot(q,"input",r[37]),Ot(mr,"change",r[38]),Ot(Gt,"change",r[39]),Ot(ss,"click",r[22]),Ot(t,"submit",qb(r[25]))],Vu=!0)},p(Y,he){if(he[0]&32768&&o!==(o=Y[15]("t"))&&U(a,"accesskey",o),he[0]&3&&cr(a,Y[1].description),he[0]&3&&h!==(h="priority-"+Y[1].priority)&&U(c,"for",h),he[0]&1081346){oi=Y[20];let de;for(de=0;de<oi.length;de+=1){let as=Hb(Y,oi,de);_t[de]?_t[de].p(as,he):(_t[de]=zb(as),_t[de].c(),_t[de].m(l,null))}for(;de<_t.length;de+=1)_t[de].d(1);_t.length=oi.length}if(he[0]&32768&&L!==(L=Y[15]("r"))&&U(N,"accesskey",L),he[0]&3&&N.value!==Y[1].recurrenceRule&&cr(N,Y[1].recurrenceRule),he[0]&256&&dr(N,"tasks-modal-error",!Y[8]),he[0]&4096&&j.p(Y[12]),he[0]&32768&&E!==(E=Y[15]("d"))&&U(A,"accesskey",E),he[0]&3&&A.value!==Y[1].dueDate&&cr(A,Y[1].dueDate),he[0]&128&&dr(A,"tasks-modal-error",!Y[7]),he[0]&64&&p.p(Y[6]),he[0]&32768&&k!==(k=Y[15]("s"))&&U(v,"accesskey",k),he[0]&3&&v.value!==Y[1].scheduledDate&&cr(v,Y[1].scheduledDate),he[0]&32&&dr(v,"tasks-modal-error",!Y[5]),he[0]&16&&me.p(Y[4]),he[0]&32768&&Re!==(Re=Y[15]("a"))&&U(q,"accesskey",Re),he[0]&3&&q.value!==Y[1].startDate&&cr(q,Y[1].startDate),he[0]&8&&dr(q,"tasks-modal-error",!Y[3]),he[0]&4&&Ue.p(Y[2]),he[0]&32768&&Pa!==(Pa=Y[15]("f"))&&U(mr,"accesskey",Pa),he[0]&3&&(mr.checked=Y[1].forwardOnly),he[0]&1){ui=Y[0];let de;for(de=0;de<ui.length;de+=1){let as=Bb(Y,ui,de);vt[de]?vt[de].p(as,he):(vt[de]=Vb(as),vt[de].c(),vt[de].m(Gt,null))}for(;de<vt.length;de+=1)vt[de].d(1);vt.length=ui.length}he[0]&32768&&Ia!==(Ia=Y[15]("u"))&&U(Gt,"accesskey",Ia),he[0]&3&&lp(Gt,Y[1].status),he[0]&3&&La!==(La=Y[1].status.isCompleted())&&(tn.checked=La),he[0]&2048&&(Ua.innerHTML=Y[11]),he[0]&8192&&(qa.innerHTML=Y[13]),he[0]&16384&&Wa!==(Wa=!Y[14])&&(Sn.disabled=Wa),he[0]&512&&dr(t,"with-accesskeys",Y[9])},i:Qr,o:Qr,d(Y){Y&&Vn(e),r[31](null),op(_t,Y),op(vt,Y),Vu=!1,zn(th)}}}var dp="Try 'Monday' or 'tomorrow', or [td|tm|yd|tw|nw|we] then space.";function $C(r,e,t){let n;var i;let{task:s}=e,{onSubmit:a}=e,{statusOptions:o}=e,{prioritySymbols:u,recurrenceSymbol:l,startDateSymbol:c,scheduledDateSymbol:f,dueDateSymbol:h}=Hr.tasksPluginEmoji.taskSerializer.symbols,T,y={description:"",status:X.TODO,priority:"none",recurrenceRule:"",createdDate:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:"",forwardOnly:!0},w=!0,D="",C="",N=!0,L="",oe=!0,z="",ie=!0,G="",j=!0,Ne="",Le=!1,B=!0,A=!0,E=[{value:"lowest",label:"Lowest",symbol:u.Lowest,accessKey:"o",accessKeyIndex:1},{value:"low",label:"Low",symbol:u.Low,accessKey:"l",accessKeyIndex:0},{value:"none",label:"Normal",symbol:u.None,accessKey:"n",accessKeyIndex:0},{value:"medium",label:"Medium",symbol:u.Medium,accessKey:"m",accessKeyIndex:0},{value:"high",label:"High",symbol:u.High,accessKey:"h",accessKeyIndex:0},{value:"highest",label:"Highest",symbol:u.Highest,accessKey:"i",accessKeyIndex:1}];function H(q,Re,Ae=void 0){if(!Re)return`<i>no ${q} date</i>`;let nt=fp.parseDate(Re,Ae,{forwardDate:Ae!=null});return nt!==null?window.moment(nt).format("YYYY-MM-DD"):`<i>invalid ${q} date</i>`}function P(q,Re){return H(q,Re,y.forwardOnly?new Date:void 0)}function Z(q){let Re=null,Ae=fp.parseDate(q,new Date,{forwardDate:y.forwardOnly});return Ae!==null&&(Re=window.moment(Ae)),Re}cp(()=>{let{provideAccessKeys:q}=Q();t(9,B=q);let Re=ge.getInstance().removeAsWordFrom(s.description);(Re!=s.description||!ge.getInstance().includedIn(s.description))&&(Le=!0);let Ae="none";s.priority==="5"?Ae="lowest":s.priority==="4"?Ae="low":s.priority==="2"?Ae="medium":s.priority==="1"?Ae="high":s.priority==="0"&&(Ae="highest"),t(1,y={description:Re,status:s.status,priority:Ae,recurrenceRule:s.recurrence?s.recurrence.toText():"",createdDate:new rt(s.createdDate).formatAsDate(),startDate:new rt(s.startDate).formatAsDate(),scheduledDate:new rt(s.scheduledDate).formatAsDate(),dueDate:new rt(s.dueDate).formatAsDate(),doneDate:new rt(s.doneDate).formatAsDate(),forwardOnly:!0}),setTimeout(()=>{T.focus()},10)});let d=q=>{if(q.key&&!q.altKey&&!q.ctrlKey){let Re=E.find(Ae=>Ae.label.charAt(0).toLowerCase()==q.key);Re&&t(1,y.priority=Re.value,y)}},p=()=>{a([])},m=q=>{q.key==="Enter"&&(q.preventDefault(),A&&b())},g=()=>{setTimeout(()=>{t(1,y.description=y.description.replace(/[\r\n]+/g," "),y)},0)},b=()=>{let q=y.description.trim();Le&&(q=ge.getInstance().prependTo(q));let Re=Z(y.startDate),Ae=Z(y.scheduledDate),nt=Z(y.dueDate),Mr=null;y.recurrenceRule&&(Mr=et.fromText({recurrenceRuleText:y.recurrenceRule,startDate:Re,scheduledDate:Ae,dueDate:nt}));let We;switch(y.priority){case"lowest":We="5";break;case"low":We="4";break;case"medium":We="2";break;case"high":We="1";break;case"highest":We="0";break;default:We="3"}let Ue=new le(Object.assign(Object.assign({},s),{description:q,status:y.status,priority:We,recurrence:Mr,startDate:Re,scheduledDate:Ae,dueDate:nt,doneDate:window.moment(y.doneDate,"YYYY-MM-DD").isValid()?window.moment(y.doneDate,"YYYY-MM-DD"):null}));a([Ue])},v=[[]];function k(){y.description=this.value,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function x(q){Qo[q?"unshift":"push"](()=>{T=q,t(10,T)})}function S(){y.priority=this.__value,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function O(){y.recurrenceRule=this.value,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function I(){y.dueDate=this.value,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function me(){y.scheduledDate=this.value,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function se(){y.startDate=this.value,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function te(){y.forwardOnly=this.checked,t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}function De(){y.status=$b(this),t(1,y),t(6,z),t(2,C),t(4,L),t(0,o)}return r.$$set=q=>{"task"in q&&t(26,s=q.task),"onSubmit"in q&&t(27,a=q.onSubmit),"statusOptions"in q&&t(0,o=q.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=q=>B?q:null)}if(r.$$.dirty[0]&66){e:t(1,y.dueDate=Si(y.dueDate),y),t(6,z=P("due",y.dueDate)),t(7,ie=!z.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,y.startDate=Si(y.startDate),y),t(2,C=P("start",y.startDate)),t(3,N=!C.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,y.scheduledDate=Si(y.scheduledDate),y),t(4,L=P("scheduled",y.scheduledDate)),t(5,oe=!L.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,j=!0),!y.recurrenceRule)t(12,G="<i>not recurring</>");else{let q=t(28,i=et.fromText({recurrenceRuleText:y.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||i===void 0?void 0:i.toText();q?!y.startDate&&!y.scheduledDate&&!y.dueDate?(t(12,G="<i>due, scheduled or start date required</i>"),t(8,j=!1)):t(12,G=q):(t(12,G="<i>invalid recurrence rule</i>"),t(8,j=!1))}}if(r.$$.dirty[0]&2){e:t(29,w=y.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,A=ie&&j&&oe&&N&&w)}if(r.$$.dirty[0]&2){e:t(11,D=H("created",y.createdDate)),t(13,Ne=H("done",y.doneDate))}},[o,y,C,N,L,oe,z,ie,j,B,T,D,G,Ne,A,n,l,c,f,h,E,d,p,m,g,b,s,a,i,w,k,x,S,v,O,I,me,se,te,De]}var pp=class extends Xo{constructor(e){super(),jb(this,e,$C,WC,Ib,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},Kb=pp;var gn=class extends Qb.Modal{constructor({app:t,task:n,onSubmit:i}){super(t);this.task=n,this.onSubmit=s=>{s.length&&i(s),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new Kb({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=ve.getInstance().registeredStatuses;return ve.getInstance().bySymbol(this.task.status.symbol)===X.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};function YC(){let{setCreatedDate:r}=Q();return r?window.moment():null}function GC(r){let{setCreatedDate:e}=Q();if(!e||r.createdDate!==null)return!1;let t=r.description==="",n=!ge.getInstance().isEmpty(),i=!ge.getInstance().includedIn(r.description);return t||n&&i}var Zo=({line:r,path:e})=>{var h,T;let t=le.parseTaskSignifiers(r,ct.fromUnknownPosition(e),ht.fromPath(e)),n=YC();if(t!==null)return GC(t)?new le(it(we({},t),{createdDate:n})):t;let i=r.match(V.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",r),new le({status:X.TODO,description:"",taskLocation:ct.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(h=i[2])!=null?h:"-",o=(T=i[4])!=null?T:" ",u=ve.getInstance().bySymbolOrCreate(o),l=i[5],c=r.match(V.blockLinkRegex),f=c!==null?c[0]:"";return f!==""&&(l=l.replace(V.blockLinkRegex,"")),new le({status:u,description:l,taskLocation:ct.fromUnknownPosition(e),indentation:s,listMarker:a,blockLink:f,priority:"3",createdDate:n,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var Xb=(r,e,t,n)=>{var f;if(r)return t instanceof hp.MarkdownView;if(!(t instanceof hp.MarkdownView))return;let i=(f=t.file)==null?void 0:f.path;if(i===void 0)return;let a=e.getCursor().line,o=e.getLine(a),u=Zo({line:o,path:i}),l=h=>{let T=ht.removeInferredStatusIfNeeded(u,h).map(y=>y.toFileLineString()).join(`
`);e.setLine(a,T)};new gn({app:n,task:u,onSubmit:l}).open()};var mp=require("obsidian");var Zb=(r,e,t)=>{var u;if(r)return t instanceof mp.MarkdownView;if(!(t instanceof mp.MarkdownView))return;let n=(u=t.file)==null?void 0:u.path;if(n===void 0)return;let i=e.getCursor(),s=i.line,a=e.getLine(s),o=jC(a,n);e.setLine(s,o.text),e.setCursor(BC(i,o))},jC=(r,e)=>{let t=le.fromLine({line:r,taskLocation:ct.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggleWithRecurrenceInUsersOrder().map(i=>i.toFileLineString());return{text:n.join(`
`),moveTo:{line:n.length-1}}}else{let n=r.match(V.taskRegex);if(n!==null){let i=n[3],a=ve.getInstance().bySymbol(i).nextStatusSymbol;return{text:r.replace(V.taskRegex,`$1- [${a}] $4`)}}else if(V.listItemRegex.test(r)){let i=r.replace(V.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=r.replace(V.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},BC=(r,e)=>{var s;let t={line:0,ch:r.ch},n=we(we({},t),(s=e.moveTo)!=null?s:{}),i=e.text.split(`
`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,i)}};var Jo=class{get app(){return this.plugin.app}constructor({plugin:e}){this.plugin=e,e.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(t,n,i)=>Xb(t,n,i,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:Zb})}};var HC=Object.prototype.toString,Ui=Array.isArray||function(e){return HC.call(e)==="[object Array]"};function yp(r){return typeof r=="function"}function zC(r){return Ui(r)?"array":typeof r}function gp(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Jb(r,e){return r!=null&&typeof r=="object"&&e in r}function VC(r,e){return r!=null&&typeof r!="object"&&r.hasOwnProperty&&r.hasOwnProperty(e)}var KC=RegExp.prototype.test;function QC(r,e){return KC.call(r,e)}var XC=/\S/;function ZC(r){return!QC(XC,r)}var JC={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function eA(r){return String(r).replace(/[&<>"'`=\/]/g,function(t){return JC[t]})}var tA=/\s*/,rA=/\s+/,e_=/\s*=/,nA=/\s*\}/,iA=/#|\^|\/|>|\{|&|=|!/;function sA(r,e){if(!r)return[];var t=!1,n=[],i=[],s=[],a=!1,o=!1,u="",l=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var f,h,T;function y(j){if(typeof j=="string"&&(j=j.split(rA,2)),!Ui(j)||j.length!==2)throw new Error("Invalid tags: "+j);f=new RegExp(gp(j[0])+"\\s*"),h=new RegExp("\\s*"+gp(j[1])),T=new RegExp("\\s*"+gp("}"+j[1]))}y(e||Jt.tags);for(var w=new Sa(r),D,C,N,L,oe,z;!w.eos();){if(D=w.pos,N=w.scanUntil(f),N)for(var ie=0,G=N.length;ie<G;++ie)L=N.charAt(ie),ZC(L)?(s.push(i.length),u+=L):(o=!0,t=!0,u+=" "),i.push(["text",L,D,D+1]),D+=1,L===`
`&&(c(),u="",l=0,t=!1);if(!w.scan(f))break;if(a=!0,C=w.scan(iA)||"name",w.scan(tA),C==="="?(N=w.scanUntil(e_),w.scan(e_),w.scanUntil(h)):C==="{"?(N=w.scanUntil(T),w.scan(nA),w.scanUntil(h),C="&"):N=w.scanUntil(h),!w.scan(h))throw new Error("Unclosed tag at "+w.pos);if(C==">"?oe=[C,N,D,w.pos,u,l,t]:oe=[C,N,D,w.pos],l++,i.push(oe),C==="#"||C==="^")n.push(oe);else if(C==="/"){if(z=n.pop(),!z)throw new Error('Unopened section "'+N+'" at '+D);if(z[1]!==N)throw new Error('Unclosed section "'+z[1]+'" at '+D)}else C==="name"||C==="{"||C==="&"?o=!0:C==="="&&y(N)}if(c(),z=n.pop(),z)throw new Error('Unclosed section "'+z[1]+'" at '+w.pos);return oA(aA(i))}function aA(r){for(var e=[],t,n,i=0,s=r.length;i<s;++i)t=r[i],t&&(t[0]==="text"&&n&&n[0]==="text"?(n[1]+=t[1],n[3]=t[3]):(e.push(t),n=t));return e}function oA(r){for(var e=[],t=e,n=[],i,s,a=0,o=r.length;a<o;++a)switch(i=r[a],i[0]){case"#":case"^":t.push(i),n.push(i),t=i[4]=[];break;case"/":s=n.pop(),s[5]=i[2],t=n.length>0?n[n.length-1][4]:e;break;default:t.push(i)}return e}function Sa(r){this.string=r,this.tail=r,this.pos=0}Sa.prototype.eos=function(){return this.tail===""};Sa.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n};Sa.prototype.scanUntil=function(e){var t=this.tail.search(e),n;switch(t){case-1:n=this.tail,this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=n.length,n};function Li(r,e){this.view=r,this.cache={".":this.view},this.parent=e}Li.prototype.push=function(e){return new Li(e,this)};Li.prototype.lookup=function(e){var t=this.cache,n;if(t.hasOwnProperty(e))n=t[e];else{for(var i=this,s,a,o,u=!1;i;){if(e.indexOf(".")>0)for(s=i.view,a=e.split("."),o=0;s!=null&&o<a.length;)o===a.length-1&&(u=Jb(s,a[o])||VC(s,a[o])),s=s[a[o++]];else s=i.view[e],u=Jb(i.view,e);if(u){n=s;break}i=i.parent}t[e]=n}return yp(n)&&(n=n.call(this.view)),n};function Dt(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}Dt.prototype.clearCache=function(){typeof this.templateCache!="undefined"&&this.templateCache.clear()};Dt.prototype.parse=function(e,t){var n=this.templateCache,i=e+":"+(t||Jt.tags).join(":"),s=typeof n!="undefined",a=s?n.get(i):void 0;return a==null&&(a=sA(e,t),s&&n.set(i,a)),a};Dt.prototype.render=function(e,t,n,i){var s=this.getConfigTags(i),a=this.parse(e,s),o=t instanceof Li?t:new Li(t,void 0);return this.renderTokens(a,o,n,e,i)};Dt.prototype.renderTokens=function(e,t,n,i,s){for(var a="",o,u,l,c=0,f=e.length;c<f;++c)l=void 0,o=e[c],u=o[0],u==="#"?l=this.renderSection(o,t,n,i,s):u==="^"?l=this.renderInverted(o,t,n,i,s):u===">"?l=this.renderPartial(o,t,n,s):u==="&"?l=this.unescapedValue(o,t):u==="name"?l=this.escapedValue(o,t,s):u==="text"&&(l=this.rawValue(o)),l!==void 0&&(a+=l);return a};Dt.prototype.renderSection=function(e,t,n,i,s){var a=this,o="",u=t.lookup(e[1]);function l(h){return a.render(h,t,n,s)}if(!!u){if(Ui(u))for(var c=0,f=u.length;c<f;++c)o+=this.renderTokens(e[4],t.push(u[c]),n,i,s);else if(typeof u=="object"||typeof u=="string"||typeof u=="number")o+=this.renderTokens(e[4],t.push(u),n,i,s);else if(yp(u)){if(typeof i!="string")throw new Error("Cannot use higher-order sections without the original template");u=u.call(t.view,i.slice(e[3],e[5]),l),u!=null&&(o+=u)}else o+=this.renderTokens(e[4],t,n,i,s);return o}};Dt.prototype.renderInverted=function(e,t,n,i,s){var a=t.lookup(e[1]);if(!a||Ui(a)&&a.length===0)return this.renderTokens(e[4],t,n,i,s)};Dt.prototype.indentPartial=function(e,t,n){for(var i=t.replace(/[^ \t]/g,""),s=e.split(`
`),a=0;a<s.length;a++)s[a].length&&(a>0||!n)&&(s[a]=i+s[a]);return s.join(`
`)};Dt.prototype.renderPartial=function(e,t,n,i){if(!!n){var s=this.getConfigTags(i),a=yp(n)?n(e[1]):n[e[1]];if(a!=null){var o=e[6],u=e[5],l=e[4],c=a;u==0&&l&&(c=this.indentPartial(a,l,o));var f=this.parse(c,s);return this.renderTokens(f,t,n,c,i)}}};Dt.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(n!=null)return n};Dt.prototype.escapedValue=function(e,t,n){var i=this.getConfigEscape(n)||Jt.escape,s=t.lookup(e[1]);if(s!=null)return typeof s=="number"&&i===Jt.escape?String(s):i(s)};Dt.prototype.rawValue=function(e){return e[1]};Dt.prototype.getConfigTags=function(e){return Ui(e)?e:e&&typeof e=="object"?e.tags:void 0};Dt.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!Ui(e))return e.escape};var Jt={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(r){ka.templateCache=r},get templateCache(){return ka.templateCache}},ka=new Dt;Jt.clearCache=function(){return ka.clearCache()};Jt.parse=function(e,t){return ka.parse(e,t)};Jt.render=function(e,t,n,i){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+zC(e)+'" was given as the first argument for mustache#render(template, view, partials)');return ka.render(e,t,n,i)};Jt.escape=eA;Jt.Scanner=Sa;Jt.Context=Li;Jt.Writer=Dt;var Tp=Jt;var s_=us(i_());function a_(r,e){Tp.escape=function(t){return t};try{return Tp.render(r,(0,s_.default)(e))}catch(t){let n="";throw t instanceof Error?n=`There was an error expanding one or more placeholders.

The error message was:
    ${t.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:n="Unknown error expanding placeholders.",n+=`

The problem is in:
    ${r}`,Error(n)}}function eu(r){return{query:{file:new Ci(r)}}}function Kn(r,e){let t=`Error: ${r}.
The error message was:
    `,n="";return e instanceof Error?n+=e:n+="Unknown error",`${t}"${n}"`}var Xr=class{constructor(e,t,n,i){this.instruction=e,this.property=t,this.comparator=Xr.maybeReverse(i,n)}static maybeReverse(e,t){return e?Xr.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var yn=class{constructor(e,t,n,i){this.instruction=e,this.property=t,this.grouper=n,this.reverse=i}};var ke=class{canCreateFilterForLine(e){return ke.lineMatchesFilter(this.filterRegExp(),e)}static lineMatchesFilter(e,t){return e?e.test(t):!1}static getMatch(e,t){return e?t.match(e):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Go(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=ke.getMatch(this.sorterRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createSorter(n)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(e){let t=`sort by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new Xr(this.sorterInstruction(e),this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(e){if(!this.supportsGrouping())return null;let t=ke.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1];return this.createGrouper(n)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNameSingular()}`;return e&&(t+=" reverse"),t}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(e){return new yn(this.grouperInstruction(e),this.fieldNameSingular(),this.grouper(),e)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var Se=class{constructor(e,t=[],n=""){this.description=e,this.symbol=n,this.children=t}static booleanAnd(e){return this.combineOrCreateExplanation("All of",e,"AND")}static booleanOr(e){return this.combineOrCreateExplanation("At least one of",e,"OR")}static booleanNot(e){return new Se("None of",e,"NOT")}static booleanXor(e){return new Se("Exactly one of",e,"XOR")}asString(e=""){if(this.children.length==0)return e+this.description;let t=e;this.symbol===""?t+=this.description:(t+=this.symbol,this.children.length>1&&(t+=` (${this.description})`),t+=":");let n=e+"  ";for(let i=0;i<this.children.length;i++)t+=`
${this.children[i].asString(n)}`;return t}static combineOrCreateExplanation(e,t,n){if(t.length===2){let i=t[0],s=t[1];if(i.symbol===n&&s.symbol==="")return i.children.push(s),i}return new Se(e,t,n)}};var gt=class{constructor(e,t,n){this.instruction=e,this.explanation=n,this.filterFunction=t}explainFilterIndented(e){let t=this.explanation;return t.asString()===this.instruction?`${e}${this.instruction}
`:`${e}${this.instruction} =>
${t.asString(e+"  ")}
`}};var Er=class{constructor(e){this.instruction=e}get queryComponent(){return this._queryComponent}set queryComponent(e){this._queryComponent=e}get error(){return this._error}set error(e){this._error=e}static fromObject(e,t){let n=new Er(e);return n._queryComponent=t,n}static fromError(e,t){let n=new Er(e);return n._error=t,n}};var J=class{constructor(e){this.object=e}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(e){return new J(Er.fromObject(e.instruction,e))}static fromError(e,t){return new J(Er.fromError(e,t))}};var tu=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(e){return this.canCreateFilterForLine(e)?J.fromFilter(new gt(e,this._filter,new Se(e))):J.fromError(e,`do not understand filter: ${e}`)}};var kr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new tu(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let t of this._filters){let n=t.createFilterOrErrorMessage(e);if(n.error===void 0)return n}return J.fromError(e,`do not understand filter: ${e}`)}};var Tn=class extends ke{constructor(){super(...arguments);this._filters=new kr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var Sr=class extends Tn{constructor(){super(),this._filters.add("done",e=>e.isDone),this._filters.add("not done",e=>!e.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Sr.oldStatusName(e),i=Sr.oldStatusName(t);return n<i?1:n>i?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[Sr.oldStatusName(e)]}};var ru=class{findUnexpandedDateText(e){let t=["<%","YYYY-MM-DD"];for(let n of t)if(e.includes(n))return this.unexpandedDateTextMessage(n);return null}unexpandedDateTextMessage(e){return`Instruction contains unexpanded template text: "${e}" - and cannot be interpreted.

Possible causes:
- The query is an a template file, and is not intended to be searched.
- A command such as "Replace templates in the active file" needs to be run.
- The core "Daily notes" plugin is in use, and the template contained
  date calculations that it does not support.
- Some sample template text was accidentally pasted in to a tasks query,
  instead of in to a template file.

See: https://publish.obsidian.md/tasks/Advanced/Instruction+contains+unexpanded+template+text
`}};var yt=class extends ke{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new kr,this.filterInstructions.add(`has ${this.fieldName()} date`,n=>this.date(n)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,n=>this.date(n)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,n=>{let i=this.date(n);return i!==null&&!i.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){var h;let n=this.checkForUnexpandedTemplateText(t);if(n)return J.fromError(t,n);let i=this.filterInstructions.createFilterOrErrorMessage(t);if(i.filter!==void 0)return i;let s=ke.getMatch(this.filterRegExp(),t);if(s===null)return J.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let a=s[1],o=(h=s[2])==null?void 0:h.toLowerCase(),u=s[3],l=Nt.parseDateRange(u);if(!l.isValid()){let T=Nt.parseDate(a);T.isValid()&&(l=new Et(T,T))}if(!l.isValid())return J.fromError(t,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,l),f=yt.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),l);return J.fromFilter(new gt(t,c,f))}buildFilterFunction(t,n){let i;switch(t){case"before":i=s=>s?s.isBefore(n.start):this.filterResultIfFieldMissing();break;case"after":i=s=>s?s.isAfter(n.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":i=s=>s?s.isSameOrBefore(n.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":i=s=>s?s.isSameOrAfter(n.start):this.filterResultIfFieldMissing();break;default:i=s=>s?s.isSameOrAfter(n.start)&&s.isSameOrBefore(n.end):this.filterResultIfFieldMissing()}return this.getFilter(i)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,i,s){let a=n,o="YYYY-MM-DD (dddd Do MMMM YYYY)",u;switch(n){case"before":case"on or after":u=s.start.format(o);break;case"after":case"on or before":u=s.end.format(o);break;case"in or before":a="on or before",u=s.end.format(o);break;case"in or after":a="on or after",u=s.start.format(o);break;default:if(!s.start.isSame(s.end)){let c=`${t} date is between:`,f=[new Se(`${s.start.format(o)} and`),new Se(`${s.end.format(o)} inclusive`)];return i&&f.push(new Se(`OR no ${t} date`)),new Se(c,f)}a="on",u=s.start.format(o);break}let l=`${t} date is ${a} ${u}`;return i&&(l+=` OR no ${t} date`),new Se(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>jr(this.date(t),this.date(n))}supportsGrouping(){return!0}grouper(){return t=>{let n=this.date(t);return n===null?["No "+this.fieldName()+" date"]:[n.format("YYYY-MM-DD dddd")]}}checkForUnexpandedTemplateText(t){return new ru().findUnexpandedDateText(t)}};var qi=class extends yt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var _p=class extends ke{createFilterOrErrorMessage(e){var n;let t=ke.getMatch(this.filterRegExp(),e);if(t!==null){let i=t[5],s=null;switch(i.toLowerCase()){case"lowest":s="5";break;case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break;case"highest":s="0";break}if(s===null)return J.fromError(e,"do not understand priority");let a=e,o;switch((n=t[3])==null?void 0:n.toLowerCase()){case"above":o=u=>u.priority.localeCompare(s)<0;break;case"below":o=u=>u.priority.localeCompare(s)>0;break;case"not":o=u=>u.priority!==s;break;default:o=u=>u.priority===s,a=`${this.fieldName()} is ${i}`}return J.fromFilter(new gt(e,o,new Se(a)))}else return J.fromError(e,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return _p.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>[e.priorityNameGroupText]}},Qn=_p;Qn.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Wi=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var $i=class extends Wi{constructor(t){super();this.stringToFind=t}matches(t){return $i.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}explanation(t){return new Se(t)}};var bn=class extends Wi{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/^\/(.+)\/([^/]*)$/,i=t.match(n);if(i!==null){let s=new RegExp(i[1],i[2]);return new bn(s)}else return null}matches(t){return t.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions

Regular expressions must look like this:
    /pattern/
or this:
    /pattern/flags

Where:
- pattern: The 'regular expression' pattern to search for.
- flags:   Optional characters that modify the search.
           i => make the search case-insensitive
           u => add Unicode support

Examples:  /^Log/
           /^Log/i
           /File Name\.md/
           /waiting|waits|waited/i
           /\d\d:\d\d/

The following characters have special meaning in the pattern:
to find them literally, you must add a \ before them:
    [\^$.|?*+()

CAUTION! Regular expression (or 'regex') searching is a powerful
but advanced feature that requires thorough knowledge in order to
use successfully, and not miss intended search results.
`}explanation(t){let i=uA(t,"using regex: ",this.regexAsString());return new Se(i)}regexAsString(){let t=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:t+="no flags";break;case 1:t+=`flag '${this.regex.flags}'`;break;default:t+=`flags '${this.regex.flags}'`;break}return t}};function uA(r,e,t){var o;let n=r.match(/\//);if(!n)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=n.index)!=null?o:i)-i;return`${e.padEnd(s)}${t}`}var Me=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let n=t[1].toLowerCase(),i=t[2],s=null;if(n.includes("include"))s=new $i(i);else if(n.includes("regex")){try{s=bn.validateAndConstruct(i)}catch(u){let l=Kn("Parsing regular expression",u)+`

${bn.helpMessage()}`;return J.fromError(e,l)}if(s===null)return J.fromError(e,`Invalid instruction: '${e}'

${bn.helpMessage()}`)}if(s===null)return J.fromError(e,`do not understand query filter (${this.fieldName()})`);let a=n.match(/not/)!==null,o=new gt(e,this.getFilter(s,a),s.explanation(e));return J.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(e,t){return n=>{let i=e.matches(this.value(n));return t?!i:i}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Yi=class extends Me{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Gi=class extends ke{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return J.fromError(e,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(e,t)=>t.urgency-e.urgency}supportsGrouping(){return!0}grouper(){return e=>[`${e.urgency.toFixed(2)}`]}createGrouper(e){return super.createGrouper(!e)}grouperInstruction(e){return super.grouperInstruction(!e)}};var ji=class{static by(e,t){let n=[new Gi().comparator(),new Sr().comparator(),new qi().comparator(),new Qn().comparator(),new Yi().comparator()],i=[];for(let s of e)i.push(s.comparator);return t.sort(ji.makeCompositeComparator([...i,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let i of e){let s=i(t,n);if(s!==0)return s}return 0}}};var nu=class{constructor(e,t,n){this.nestingLevel=e,this.displayName=t,this.property=n}};var iu=class{constructor(e,t){this.lastHeadingAtLevel=new Array;this.groupers=t;let i=e.keys().next().value.length;for(let s=0;s<i;s++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(e){let t=new Array;for(let n=0;n<e.length;n++){let i=e[n];if(i!=this.lastHeadingAtLevel[n]){t.push(new nu(n,i,this.groupers[n].property));for(let s=n;s<e.length;s++)this.lastHeadingAtLevel[s]="";this.lastHeadingAtLevel[n]=i}}return t}};var su=class{constructor(e){this.children=new Map;this.values=[];this.values=e}generateAllPaths(e=[]){let t=new Map;if(this.children.size==0)return t.set([...e],this.values),t;for(let[n,i]of this.children)e.push(n),i.generateAllPaths(e).forEach((a,o)=>t.set(o,a)),e.pop();return t}};var au=class extends su{},ou=class{constructor(e,t,n){this.root=new au(t),this.buildGroupingTree(e,n)}buildGroupingTree(e,t){let n=[this.root];for(let i of e){let s=[];for(let a of n)for(let o of a.values){let u=i.grouper(o,t);u.length===0&&u.push("");for(let l of u){let c=a.children.get(l);c===void 0&&(c=new au([]),a.children.set(l,c),s.push(c)),c.values.push(o)}}n=s}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var uu=class{constructor(e,t){this.groups=e,this.groupHeadings=[],this.tasks=t}setGroupHeadings(e){for(let t of e)this.groupHeadings.push(t)}applyTaskLimit(e){this.tasks=this.tasks.slice(0,e)}tasksAsStringOfLines(){let e="";for(let t of this.tasks)e+=t.toFileLineString()+`
`;return e}toString(){let e=`
`;e+=`Group names: [${this.groups}]
`;for(let t of this.groupHeadings)e+=`${"#".repeat(4+t.nestingLevel)} [${t.property}] ${t.displayName}
`;return e+=this.tasksAsStringOfLines(),e}};var Bi=class{constructor(e,t,n){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length,this._groupers=e;let s=new ou(e,t,n).generateTaskTreeStorage();this.addTaskGroups(s),this.sortTaskGroups(),this.setGroupsHeadings(s)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";e+=`Groupers (if any):
`;for(let n of this._groupers){let i=n.reverse?" reverse":"";e+=`- ${n.property}${i}
`}for(let n of this.groups)e+=n.toString(),e+=`
---
`;return e+=`
${this.totalTasksCount()} tasks
`,e}addTaskGroups(e){for(let[t,n]of e){let i=new uu(t,n);this.addTaskGroup(i)}}addTaskGroup(e){this._groups.push(e)}sortTaskGroups(){let e=(t,n)=>{let i=t.groups,s=n.groups;for(let a=0;a<i.length;a++){let o=this._groupers[a],u=i[a].localeCompare(s[a],void 0,{numeric:!0});if(u!==0)return o.reverse?-u:u}return 0};this._groups.sort(e)}setGroupsHeadings(e){let t=new iu(e,this._groupers);for(let n of this._groups)n.setGroupHeadings(t.getHeadingsForTaskGroup(n.groups))}applyTaskLimit(e){this._groupers.length!==0&&(this._groups.forEach(t=>{t.applyTaskLimit(e)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let e=[];this._groups.forEach(n=>{e=[...e,...n.tasks]});let t=[...new Set(e)];this._totalTaskCount=t.length}};var Xn=class extends Me{fieldName(){return"description"}value(e){return ge.getInstance().removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Xn.cleanDescription(e.description),i=Xn.cleanDescription(t.description);return n.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(e){e=ge.getInstance().removeAsSubstringFrom(e);let t=/^\[\[?([^\]]*)]]?/,n=e.match(t);if(n!==null){let i=n[1];e=i.substring(i.indexOf("|")+1)+e.replace(t,"")}return e=this.replaceFormatting(e,/^\*\*([^*]+)\*\*/),e=this.replaceFormatting(e,/^\*([^*]+)\*/),e=this.replaceFormatting(e,/^==([^=]+)==/),e=this.replaceFormatting(e,/^__([^_]+)__/),e=this.replaceFormatting(e,/^_([^_]+)_/),e}static replaceFormatting(e,t){let n=e.match(t);return n!==null&&(e=n[1]+e.replace(t,"")),e}};var lu=class extends yt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var cu=class extends yt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var du=class extends Tn{constructor(){super(),this._filters.add("exclude sub-items",e=>{if(e.indentation==="")return!0;let t=e.indentation.lastIndexOf(">");return t===-1?!1:/^ ?$/.test(e.indentation.slice(t+1))})}fieldName(){return"exclude"}};var Oa=class extends Er{};function vp(r,e){let t=r.map(([n])=>n);try{let n=e.includes("return")?e:`return ${e}`,i=e&&new Function(...t,n);return i instanceof Function?Oa.fromObject(e,i):Oa.fromError(e,"Error parsing group function")}catch(n){return Oa.fromError(e,Kn(`Failed parsing expression "${e}"`,n))}}function wp(r,e){let t=e.map(([n,i])=>i);return r(...t)}function Ep(r,e,t){try{return wp(r,e)}catch(n){return Kn(`Failed calculating expression "${t}"`,n)}}function fu(r,e){return[["task",r],["query",e?e.query:null]]}function o_(r,e,t){let n=fu(r,t||null),i=vp(n,e);return i.error?i.error:Ep(i.queryComponent,n,e)}var pu=class{constructor(e){this.line=e,this.functionOrError=vp(fu(null,null),e)}isValid(){return this.functionOrError.error===void 0}get parseError(){return this.functionOrError.error}evaluate(e,t){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return wp(this.functionOrError.queryComponent,fu(e,t||null))}evaluateOrCatch(e,t){return this.isValid()?Ep(this.functionOrError.queryComponent,fu(e,t),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};var hu=class extends ke{createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return J.fromError(e,"Unable to parse line");let n=t[1],i=new pu(n);return i.isValid()?J.fromFilter(new gt(e,lA(i),new Se(e))):J.fromError(e,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsGrouping(){return!0}createGrouperFromLine(e){let t=ke.getMatch(this.grouperRegExp(),e);if(t===null)return null;let n=!!t[1],i=t[2];return new yn(e,"function",dA(i),n)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function lA(r){return(e,t)=>{let n=t.queryContext();return cA(r,e,n)}}function cA(r,e,t){let n=r.evaluate(e,t);if(typeof n=="boolean")return n;throw Error(`filtering function must return true or false. This returned "${n}".`)}function dA(r){return(e,t)=>{let n=t.queryContext();return fA(e,r,n)}}function fA(r,e,t){try{let n=o_(r,e,t);return Array.isArray(n)?n.map(s=>s.toString()):n===null?[]:[n.toString()]}catch(n){let i=`Error: Failed calculating expression "${e}". The error message was: `;return n instanceof Error?[i+n.message]:[i+"Unknown error"]}}var mu=class extends Me{fieldName(){return"heading"}value(e){return e.precedingHeader?e.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>e.precedingHeader===null||e.precedingHeader.length===0?["(No heading)"]:[e.precedingHeader]}};var gu=class extends yt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var yu=class extends yt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Tu=class extends yt{constructor(){let e=new kr;e.add("has happens date",t=>this.dates(t).some(n=>n!==null)),e.add("no happens date",t=>!this.dates(t).some(n=>n!==null)),super(e)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(e){return this.earliestDate(e)}dates(e){return e.happensDates}earliestDate(e){return e.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var bu=class extends Tn{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(e,t)=>e.recurrence!==null&&t.recurrence===null?-1:e.recurrence===null&&t.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?["Recurring"]:["Not Recurring"]}};var _u=class extends Me{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(e){return this.values(e).join(", ")}getFilter(e,t){return n=>{let i=e.matchesAnyOf(this.values(n));return t?!i:i}}createGrouper(e){return new yn(this.grouperInstruction(e),this.fieldNamePlural(),this.grouper(),e)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`,"i")}grouperInstruction(e){let t=`group by ${this.fieldNamePlural()}`;return e&&(t+=" reverse"),t}};var Zn=class extends _u{constructor(){super();this.filterInstructions=new kr,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);return n.filter!==void 0?n:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let n=t.match(this.sorterRegExp());if(n===null)return null;let i=!!n[1],s=isNaN(+n[2])?1:+n[2],a=Zn.makeCompareByTagComparator(s);return new Xr(t,this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return Zn.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,i)=>{if(n.tags.length===0&&i.tags.length===0)return 0;if(n.tags.length===0)return 1;if(i.tags.length===0)return-1;let s=t-1;if(n.tags.length<t&&i.tags.length>=t)return 1;if(i.tags.length<t&&n.tags.length>=t)return-1;if(n.tags.length<t&&i.tags.length<t)return 0;let a=n.tags[s],o=i.tags[s];return a.localeCompare(o,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return t=>t.tags.length==0?["(No tags)"]:t.tags}};var v_=us(__());var Su=class extends ke{constructor(){super(...arguments);this.basicBooleanRegexp=/(.*(AND|OR|XOR|NOT)\s*[("].*|\(.+\))/g;this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={}}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(t){return this.parseLine(t)}fieldName(){return"boolean query"}parseLine(t){if(t.length===0)return J.fromError(t,"empty line");let n=this.preprocessExpression(t);try{let i=(0,v_.parse)(n);for(let o of i)if(o.name==="IDENTIFIER"&&o.value){let u=o.value.trim();if(!(u in this.subFields)){let l=Ou(u);if(l===null)return J.fromError(t,`couldn't parse sub-expression '${u}'`);if(l.error)return J.fromError(t,`couldn't parse sub-expression '${u}': ${l.error}`);l.filter&&(this.subFields[u]=l.filter)}}else if(o.name==="OPERATOR"){if(o.value==null)return J.fromError(t,"empty operator in boolean query");if(!this.supportedOperators.includes(o.value))return J.fromError(t,`unknown boolean operator '${o.value}'`)}let s=(o,u)=>this.filterTaskWithParsedQuery(o,i,u),a=this.constructExplanation(i);return J.fromFilter(new gt(t,s,a))}catch(i){let s=i instanceof Error?i.message:"unknown error type";return J.fromError(t,`malformed boolean query -- ${s} (check the documentation for guidelines)`)}}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n,i){let s=u=>u==="true",a=u=>u?"true":"false",o=[];for(let u of n)if(u.name==="IDENTIFIER"){if(u.value==null)throw Error("null token value");let c=this.subFields[u.value.trim()].filterFunction(t,i);o.push(a(c))}else if(u.name==="OPERATOR")if(u.value==="NOT"){let l=s(o.pop());o.push(a(!l))}else if(u.value==="OR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l||c))}else if(u.value==="AND"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&c))}else if(u.value==="XOR"){let l=s(o.pop()),c=s(o.pop());o.push(a(l&&!c||!l&&c))}else throw Error("Unsupported operator: "+u.value);else throw Error("Unsupported token type: "+u);return s(o[0])}constructExplanation(t){let n=[];for(let i of t)if(i.name==="IDENTIFIER"){if(i.value==null)throw Error("null token value");let s=this.subFields[i.value.trim()];n.push(s.explanation)}else if(i.name==="OPERATOR")if(i.value==="NOT"){let s=n.pop();n.push(Se.booleanNot([s]))}else if(i.value==="OR"){let s=n.pop(),a=n.pop();n.push(Se.booleanOr([a,s]))}else if(i.value==="AND"){let s=n.pop(),a=n.pop();n.push(Se.booleanAnd([a,s]))}else if(i.value==="XOR"){let s=n.pop(),a=n.pop();n.push(Se.booleanXor([a,s]))}else throw Error("Unsupported operator: "+i.value);else throw Error("Unsupported token type: "+i.name);return n[0]}};var Du=class extends Me{fieldName(){return"filename"}value(e){let t=e.filename;return t===null?"":t+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;return t===null?["Unknown Location"]:["[["+t+"]]"]}}};var xu=class extends Me{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var _n=class extends ke{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`,"i");return ke.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=ke.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let n=t[1].toLowerCase(),i=t[2],s=Lt[i.toUpperCase()];if(!s)return this.helpMessage(e);let a;switch(n){case"is":a=o=>o.status.type===s;break;case"is not":a=o=>o.status.type!==s;break;default:return this.helpMessage(e)}return J.fromFilter(new gt(e,a,new Se(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(e){let t=Object.values(Lt).filter(i=>i!=="EMPTY").join(" "),n=`Invalid ${this.fieldNameSingular()} instruction: '${e}'.
    Allowed options: 'is' and 'is not' (without quotes).
    Allowed values:  ${t}
                     Note: values are case-insensitive,
                           so 'in_progress' works too, for example.
    Example:         ${this.fieldNameSingular()} is not NON_TASK`;return J.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=_n.groupName(e),i=_n.groupName(t);return n.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[_n.groupName(e)]}static groupName(e){return e.status.typeGroupText}};var Ru=class extends Me{fieldName(){return"recurrence"}value(e){return e.recurrence!==null?e.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?[e.recurrence.toText()]:["None"]}};var Mu=class extends Me{fieldName(){return"folder"}value(e){return e.file.folder}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(this.value(e))]}};var Cu=class extends Me{fieldName(){return"root"}value(e){return e.file.root}supportsGrouping(){return!0}grouper(){return e=>[Me.escapeMarkdownCharacters(this.value(e))]}};var Au=class extends Me{fieldName(){return"backlink"}value(e){let t=e.getLinkText({isFilenameUnique:!0});return t===null?"Unknown Location":t}createFilterOrErrorMessage(e){return J.fromError(e,"backlink field does not support filtering")}canCreateFilterForLine(e){return!1}supportsGrouping(){return!0}grouper(){return e=>{let t=e.filename;if(t===null)return["Unknown Location"];let n=e.precedingHeader;return n===null?["[["+t+"]]"]:[`[[${t}#${n}|${t} > ${n}]]`]}}};var Pp=[()=>new xu,()=>new _n,()=>new Sr,()=>new bu,()=>new Qn,()=>new Tu,()=>new lu,()=>new yu,()=>new gu,()=>new qi,()=>new cu,()=>new Yi,()=>new Mu,()=>new Cu,()=>new Au,()=>new Xn,()=>new Zn,()=>new mu,()=>new du,()=>new Du,()=>new Gi,()=>new Ru,()=>new hu,()=>new Su];function Ou(r){for(let e of Pp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function w_(r){let e=/^sort by /i;if(r.match(e)===null)return null;for(let t of Pp){let i=t().createSorterFromLine(r);if(i)return i}return null}function E_(r){let e=/^group by /i;if(r.match(e)===null)return null;for(let t of Pp){let i=t().createGrouperFromLine(r);if(i)return i}return null}var vn=class{constructor(e,t){this.queryPath=e,this.allTasks=[...t]}static fromAllTasks(e){return new vn(void 0,e)}queryContext(){return this.queryPath?eu(this.queryPath):void 0}};function k_(r){return`task${r!==1?"s":""}`}var ti=class{constructor(e,t){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=e,this.totalTasksCountBeforeLimit=t}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(e){this._searchErrorMessage=e}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let e=this.totalTasksCount,t=this.totalTasksCountBeforeLimit;return e===t?`${e} ${k_(e)}`:`${e} of ${t} ${k_(t)}`}get groups(){return this.taskGroups.groups}static fromError(e){let t=new ti(new Bi([],[],vn.fromAllTasks([])),0);return t._searchErrorMessage=e,t}};function S_(r){return r.endsWith("\\")}function O_(r){return r.endsWith("\\\\")}function qA(r){return r.replace(/^[ \t]*/,"")}function WA(r){return r.replace(/[ \t]*\\$/,"")}function $A(r,e){let t=r;return e&&(t=qA(r)),O_(t)?t=t.slice(0,-1):S_(r)&&(t=WA(t)),t}function YA(r,e,t){e?r[r.length-1]+=" "+t:r.push(t)}function GA(r){let e=[],t=!1;for(let n of r.split(`
`)){let i=$A(n,t);YA(e,t,i),O_(n)?t=!1:t=S_(n)}return e.join(`
`)}function D_(r){return GA(r).split(`
`).map(e=>e.trim()).filter(e=>e!=="")}var Ji=class{constructor(e=""){this.indentation=e}explainQuery(e){if(e.error!==void 0)return this.explainError(e);let t=[];return t.push(this.explainFilters(e)),t.push(this.explainGroups(e)),t.push(this.explainSorters(e)),t.push(this.explainQueryLimits(e)),t.push(this.explainDebugSettings()),t.filter(n=>n!=="").join(`
`)}explainError(e){let t="";return t+=`Query has an error:
`,t+=e.error+`
`,t}explainFilters(e){return e.filters.length===0?this.indent(`No filters supplied. All tasks will match the query.
`):e.filters.map(n=>n.explainFilterIndented(this.indentation)).join(`
`)}explainGroups(e){let t=e.grouping.length;if(t===0)return this.indent(`No grouping instructions supplied.
`);let n="";for(let i=0;i<t;i++)n+=this.indentation+e.grouping[i].instruction+`
`;return n}explainSorters(e){let t=e.sorting.length;if(t===0)return this.indent(`No sorting instructions supplied.
`);let n="";for(let i=0;i<t;i++)n+=this.indentation+e.sorting[i].instruction+`
`;return n}explainQueryLimits(e){function t(i){let s=`At most ${i} task`;return i!==1&&(s+="s"),s}let n=[];if(e.limit!==void 0){let i=t(e.limit)+`.
`;n.push(this.indent(i))}if(e.taskGroupLimit!==void 0){let i=t(e.taskGroupLimit)+` per group (if any "group by" options are supplied).
`;n.push(this.indent(i))}return n.join(`
`)}explainDebugSettings(){let e="",{debugSettings:t}=Q();return t.ignoreSortInstructions&&(e+=this.indent(`NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.
`)),e}indent(e){return this.indentation+e}};var Jr=class{constructor(e,t=void 0){this._limit=void 0;this._taskGroupLimit=void 0;this._layoutOptions=new $n;this._queryLayoutOptions=new pn;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|postpone button|urgency|tags)/i;this.shortModeRegexp=/^short/i;this.fullModeRegexp=/^full/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=St.getLogger("tasks.Query");this._queryId="";this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this._queryId=this.generateQueryId(10),this.source=e,this.filePath=t,this.debug(`Creating query: ${this.formatQueryForLogging()}`),D_(e).forEach(n=>{let i=this.expandPlaceholders(n,t);if(this.error===void 0)switch(!0){case this.shortModeRegexp.test(i):this._queryLayoutOptions.shortMode=!0;break;case this.fullModeRegexp.test(i):this._queryLayoutOptions.shortMode=!1;break;case this.explainQueryRegexp.test(i):this._queryLayoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(i):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(i):this.parseLimit(i);break;case this.parseSortBy(i):break;case this.parseGroupBy(i):break;case this.hideOptionsRegexp.test(i):this.parseHideOptions(i);break;case this.commentRegexp.test(i):break;case this.parseFilter(i):break;default:this.setError("do not understand query",i)}})}formatQueryForLogging(){return`[${this.source.split(`
`).join(" ; ")}]`}expandPlaceholders(e,t){if(e.includes("{{")&&e.includes("}}")&&this.filePath===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}"
but no file path has been supplied, so cannot expand placeholder values.
The query is:
${e}`,e;let n=e;if(t){let i=eu(t);try{n=a_(e,i)}catch(s){return s instanceof Error?this._error=s.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",e}}return n}append(e){return this.source===""?e:e.source===""?this:new Jr(`${this.source}
${e.source}`,this.filePath)}explainQuery(){return new Ji().explainQuery(this)}get limit(){return this._limit}get taskGroupLimit(){return this._taskGroupLimit}get layoutOptions(){return this._layoutOptions}get queryLayoutOptions(){return this._queryLayoutOptions}get filters(){return this._filters}addFilter(e){this._filters.push(e)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(e,t){this._error=`${e}
Problem line: "${t}"`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(e){this.debug(`Executing query: ${this.formatQueryForLogging()}`);let t=new vn(this.filePath,e);try{this.filters.forEach(o=>{e=e.filter(u=>o.filterFunction(u,t))});let{debugSettings:n}=Q(),i=n.ignoreSortInstructions?e:ji.by(this.sorting,e),s=i.slice(0,this.limit),a=new Bi(this.grouping,s,t);return this._taskGroupLimit!==void 0&&a.applyTaskLimit(this._taskGroupLimit),new ti(a,i.length)}catch(n){let i="Search failed";return ti.fromError(Kn(i,n))}}parseHideOptions(e){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1].toLowerCase()==="hide";switch(t[2].toLowerCase()){case"task count":this._queryLayoutOptions.hideTaskCount=n;break;case"backlink":this._queryLayoutOptions.hideBacklinks=n;break;case"postpone button":this._queryLayoutOptions.hidePostponeButton=n;break;case"priority":this._layoutOptions.hidePriority=n;break;case"created date":this._layoutOptions.hideCreatedDate=n;break;case"start date":this._layoutOptions.hideStartDate=n;break;case"scheduled date":this._layoutOptions.hideScheduledDate=n;break;case"due date":this._layoutOptions.hideDueDate=n;break;case"done date":this._layoutOptions.hideDoneDate=n;break;case"recurrence rule":this._layoutOptions.hideRecurrenceRule=n;break;case"edit button":this._queryLayoutOptions.hideEditButton=n;break;case"urgency":this._queryLayoutOptions.hideUrgency=n;break;case"tags":this._layoutOptions.hideTags=n;break;default:this.setError("do not understand hide/show option",e)}}}parseFilter(e){var n;let t=Ou(e);return t!=null?(t.filter?this._filters.push(t.filter):this.setError((n=t.error)!=null?n:"Unknown error",e),!0):!1}parseLimit(e){let t=e.match(this.limitRegexp);if(t===null){this.setError("do not understand query limit",e);return}let n=Number.parseInt(t[3],10);t[1]!==void 0?this._taskGroupLimit=n:this._limit=n}parseSortBy(e){let t=w_(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy(e){let t=E_(e);return t?(this._grouping.push(t),!0):!1}generateQueryId(e){let t="AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890";return Array.from({length:e},()=>t[Math.floor(Math.random()*t.length)]).join("")}debug(e,t){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${e}`,t)}};var wn=class{constructor(e=wn.empty){this._source=e}static getInstance(){return wn.instance||(wn.instance=new wn),wn.instance}set(e){this._source=e}query(e=void 0){return new Jr(this._source,e)}hasInstructions(){return this._source.trim()!==wn.empty}},tr=wn;tr.empty="";var Pu=class{constructor({obsidianEvents:e}){this.logger=St.getLogger("tasks.Events");this.obsidianEvents=e}onCacheUpdate(e){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(e)}};var Ra=require("obsidian");var xa,Np,Ip,jA=["md"];function Fu(){return St.getLogger("tasks.File")}var x_=({metadataCache:r,vault:e,workspace:t})=>{xa=r,Np=e,Ip=t},ri=t=>F(void 0,[t],function*({originalTask:r,newTasks:e}){if(Np===void 0||xa===void 0||Ip===void 0){Nu("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]);let n=Fu(),i="replaceTaskWithTasks()";zo(n,i,r),Vo(n,i,e),M_({originalTask:r,newTasks:e,vault:Np,metadataCache:xa,workspace:Ip,previousTries:0})});function Nu(r){console.error(r),new Ra.Notice(r,15e3)}function R_(r){console.warn(r),new Ra.Notice(r,1e4)}function BA(r){Fu().debug(r)}var En=class extends Error{},Iu=class extends Error{},M_=a=>F(void 0,[a],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s}){let o=Fu();o.debug(`tryRepetitive after ${s} previous tries`);let u=()=>{if(s>10){let c=`Tasks: Could not find the correct task line to update.

The task line not updated is:
${r.originalMarkdown}

In this markdown file:
"${r.taskLocation.path}"

Note: further clicks on this checkbox will usually now be ignored until the file is opened (or certain, specific edits are made - it's complicated).

Recommendations:

1. Close all panes that have the above file open, and then re-open the file.

2. Check for exactly identical copies of the task line, in this file, and see if you can make them different.
`;Nu(c);return}let l=Math.min(Math.pow(10,s),100);o.debug(`timeout = ${l}`),setTimeout(()=>{M_({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:i,previousTries:s+1})},l)};try{let[l,c,f]=yield C_(r,t),h=[...f.slice(0,l),...e.map(T=>T.toFileLineString()),...f.slice(l+1)];yield t.modify(c,h.join(`
`))}catch(l){if(l instanceof En)return l.message&&R_(l.message),u();if(l instanceof Iu)return u();l instanceof Error&&Nu(l.message)}});function C_(r,e){return F(this,null,function*(){if(xa===void 0)throw new En;let t=e.getAbstractFileByPath(r.path);if(!(t instanceof Ra.TFile))throw new En(`Tasks: No file found for task ${r.description}. Retrying ...`);if(!jA.includes(t.extension))throw new Error(`Tasks: Does not support files with the ${t.extension} file extension.`);let n=xa.getFileCache(t);if(n==null||n===null)throw new En(`Tasks: No file cache found for file ${t.path}. Retrying ...`);let i=n.listItems;if(i===void 0||i.length===0)throw new En(`Tasks: No list items found in file cache of ${t.path}. Retrying ...`);let a=(yield e.read(t)).split(`
`),o=HA(r,a,i,BA);if(o===void 0)throw new Iu;return[o,t,a]})}function Fp(r,e){return F(this,null,function*(){try{let[t,n,i]=yield C_(r,e);return[t,n]}catch(t){t instanceof En?t.message&&R_(t.message):t instanceof Error&&Nu(t.message)}})}function A_(r,e){return r<e.length}function HA(r,e,t,n){let i=zA(r,e);return i!==void 0||(i=VA(r,e),i!==void 0)?i:KA(r,e,t,n)}function zA(r,e){let t=r.taskLocation.lineNumber;if(A_(t,e)&&e[t]===r.originalMarkdown)return Fu().debug(`Found original markdown at original line number ${t}`),t}function VA(r,e){let t=[];for(let n=0;n<e.length;n++)e[n]===r.originalMarkdown&&t.push(n);if(t.length===1)return t[0]}function KA(r,e,t,n){let i,s=0;for(let a of t){let o=a.position.start.line;if(!A_(o,e))return;if(o<r.taskLocation.sectionStart||a.task===void 0)continue;let u=e[o];if(ge.getInstance().includedIn(u)){if(s===r.taskLocation.sectionIndex){if(u===r.originalMarkdown)i=o;else{n(`Tasks: Unable to find task in file ${r.taskLocation.path}.
Expected task:
${r.originalMarkdown}
Found task:
${u}`);return}break}s++}}return i}var F_=require("obsidian");var I_=require("obsidian");var Lu=class{constructor(){this.data=QA}addDataAttribute(e,t,n){this.data[n].addDataAttribute(e,t,n)}className(e){return this.data[e].className}},Lp=class{constructor(e,t,n){if(e==="")throw Error("Developer note: CSS class cannot be an empty string, please specify one.");this.className=e,this.attributeName=t,this.attributeValueCalculator=n}addDataAttribute(e,t,n){this.attributeName!==Lp.noAttributeName&&(e.dataset[this.attributeName]=this.attributeValueCalculator(n,t))}},Ce=Lp;Ce.noAttributeName="",Ce.noAttributeValueCalculator=()=>"",Ce.dateAttributeCalculator=(e,t)=>{let i="far";function s(o){let u=window.moment().startOf("day"),l="",c=u.diff(o,"days");return isNaN(c)?null:c===0?"today":(c>0?l+="past-":c<0&&(l+="future-"),Math.abs(c)<=7?l+=Math.abs(c).toString()+"d":l+=i,l)}let a=t[e];if(a instanceof window.moment){let o=s(a);if(o)return o}return""};var QA={createdDate:new Ce("task-created","taskCreated",Ce.dateAttributeCalculator),dueDate:new Ce("task-due","taskDue",Ce.dateAttributeCalculator),startDate:new Ce("task-start","taskStart",Ce.dateAttributeCalculator),scheduledDate:new Ce("task-scheduled","taskScheduled",Ce.dateAttributeCalculator),doneDate:new Ce("task-done","taskDone",Ce.dateAttributeCalculator),description:new Ce("task-description",Ce.noAttributeName,Ce.noAttributeValueCalculator),recurrenceRule:new Ce("task-recurring",Ce.noAttributeName,Ce.noAttributeValueCalculator),priority:new Ce("task-priority","taskPriority",(r,e)=>Kr.priorityNameUsingNormal(e.priority).toLocaleLowerCase()),blockLink:new Ce("task-block-link",Ce.noAttributeName,Ce.noAttributeValueCalculator)};var P_=require("obsidian");function N_(r,e){return F(this,null,function*(){yield ri({originalTask:r,newTasks:e})})}var Uu=class extends P_.Menu{constructor(t){super();this.taskSaver=t}};var qu=class extends Uu{constructor(t,n,i=N_){super(i);this.statusRegistry=t;let s="Change status to:",a=(u,l,c,f)=>{let h=`${s} [${f}] ${c}`;l.setTitle(h).setChecked(f===u.status.symbol).onClick(()=>F(this,null,function*(){if(f!==u.status.symbol){let T=this.statusRegistry.bySymbol(f),y=u.handleNewStatusWithRecurrenceInUsersOrder(T);yield this.taskSaver(u,y)}}))},o=new Pe().coreStatuses.map(u=>u.symbol);for(let u of[!0,!1])for(let l of t.registeredStatuses)o.includes(l.symbol)===u&&this.addItem(c=>a(n,c,l.name,l.symbol))}};var Ma=new Lu,kn=class{static obsidianMarkdownRenderer(e,t,n,i){return F(this,null,function*(){if(!i)throw new Error("Must call the Obsidian renderer with an Obsidian Component object");yield I_.MarkdownRenderer.renderMarkdown(e,t,n,i)})}constructor({textRenderer:e=kn.obsidianMarkdownRenderer,obsidianComponent:t,parentUlElement:n,layoutOptions:i,queryLayoutOptions:s}){this.textRenderer=e,this.obsidianComponent=t,this.parentUlElement=n,this.layoutOptions=i,this.queryLayoutOptions=s}renderTaskLine(e,t,n){return F(this,null,function*(){let i=document.createElement("li");this.parentUlElement.appendChild(i),i.classList.add("task-list-item","plugin-tasks-list-item");let s=document.createElement("span");i.appendChild(s),s.classList.add("tasks-list-text"),yield this.taskToHtml(e,s,i);let a=document.createElement("input");return i.appendChild(a),a.classList.add("task-list-item-checkbox"),a.type="checkbox",e.status.symbol!==" "&&(a.checked=!0,i.classList.add("is-checked")),a.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),a.disabled=!0;let u=e.toggleWithRecurrenceInUsersOrder();ri({originalTask:e,newTasks:u})}),a.addEventListener("contextmenu",o=>{new qu(ve.getInstance(),e).showAtPosition({x:o.clientX,y:o.clientY})}),a.setAttribute("title","Right-click for options"),i.prepend(a),i.setAttribute("data-task",e.status.symbol.trim()),i.setAttribute("data-line",t.toString()),i.setAttribute("data-task-status-name",e.status.name),i.setAttribute("data-task-status-type",e.status.type),a.setAttribute("data-line",t.toString()),this.queryLayoutOptions.shortMode&&this.addTooltip(e,s,n),i})}taskToHtml(e,t,n){return F(this,null,function*(){let i=new hn(this.layoutOptions,this.queryLayoutOptions),s=Hr.tasksPluginEmoji.taskSerializer;for(let a of i.shownTaskLayoutComponents){let o=s.componentToString(e,i.queryLayoutOptions.shortMode,a);if(o){let u=document.createElement("span");t.appendChild(u);let l=document.createElement("span");u.appendChild(l),yield this.renderComponentText(l,o,a,e),this.addInternalClasses(a,l);let c=Ma.className(a);u.classList.add(c),Ma.addDataAttribute(u,e,a),Ma.addDataAttribute(n,e,a)}}for(let a of i.hiddenTaskLayoutComponents)Ma.addDataAttribute(n,e,a);n.dataset.taskPriority===void 0&&Ma.addDataAttribute(n,e,"priority")})}renderComponentText(e,t,n,i){return F(this,null,function*(){if(n==="description"){t=ge.getInstance().removeAsWordFromDependingOnSettings(t);let{debugSettings:s}=Q();s.showTaskHiddenData&&(t+=`<br>\u{1F41B} <b>${i.lineNumber}</b> . ${i.sectionStart} . ${i.sectionIndex} . '<code>${i.originalMarkdown}</code>'<br>'<code>${i.path}</code>' > '<code>${i.precedingHeader}</code>'<br>`),yield this.textRenderer(t,e,i.path,this.obsidianComponent);let a=e.querySelector("blockquote"),o=a!=null?a:e,u=o.querySelector("p");if(u!==null){for(;u.firstChild;)o.insertBefore(u.firstChild,u);u.remove()}e.querySelectorAll("p").forEach(l=>{l.hasChildNodes()||l.remove()}),e.querySelectorAll(".footnotes").forEach(l=>{l.remove()})}else e.innerHTML=t})}addInternalClasses(e,t){function n(i){let s=/["&\x00\r\n]/g,a=i.replace(s,"-");return a=a.replace(/^[-_]+/,""),a.length>0?a:null}if(e==="description"){let i=t.getElementsByClassName("tag");for(let s=0;s<i.length;s++){let a=i[s].textContent;if(a){let o=n(a),u=i[s];o&&(u.dataset.tagName=o)}}}}addTooltip(e,t,n){let{recurrenceSymbol:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,dueDateSymbol:u,doneDateSymbol:l}=Hr.tasksPluginEmoji.taskSerializer.symbols;t.addEventListener("mouseenter",()=>{function c(y,w,D){w&&y.createDiv().setText(f({signifier:D,date:w}))}function f({signifier:y,date:w}){return`${y} ${w.format(V.dateFormat)} (${w.from(window.moment().startOf("day"))})`}let h=t.createDiv();h.addClasses(["tooltip","pop-up"]),e.recurrence&&h.createDiv().setText(`${i} ${e.recurrence.toText()}`),c(h,e.createdDate,a),c(h,e.startDate,s),c(h,e.scheduledDate,o),c(h,e.dueDate,u),c(h,e.doneDate,l);let T=e.getLinkText({isFilenameUnique:n});T&&h.createDiv().setText(`\u{1F517} ${T}`),t.addEventListener("mouseleave",()=>{h.remove()})})}};var Wu=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return F(this,null,function*(){var f;let n=new F_.MarkdownRenderChild(e);t.addChild(n);let i=e.findAll(".task-list-item").filter(h=>{var w;let T=(w=h.textContent)==null?void 0:w.split(`
`);if(T===void 0)return!1;let y=null;for(let D=0;D<T.length;D=D+1)if(T[D]!==""){y=T[D];break}return y===null?!1:ge.getInstance().includedIn(y)});if(i.length===0)return;let s=t.sourcePath,a=t.getSectionInfo(e);if(a===null)return;let o=a.text.split(`
`),u=0,l=[];for(let h=a.lineStart;h<=a.lineEnd;h++){let T=o[h];if(T===void 0)continue;let y=null,w=le.fromLine({line:T,taskLocation:new ct(s,h,a.lineStart,u,y),fallbackDate:null});w!==null&&(l.push(w),u++)}let c=new kn({obsidianComponent:n,parentUlElement:e,layoutOptions:new $n,queryLayoutOptions:new pn});for(let h=0;h<i.length;h++){let T=l[h],y=i[h];if(T===void 0||y===void 0)continue;let w=(f=y.getAttr("data-line"))!=null?f:"0",D=Number.parseInt(w,10),C=yield c.renderTaskLine(T,D),N=y.childNodes;for(let z=0;z<N.length;z=z+1){let ie=N[z];ie.nodeName.toLowerCase()==="div"?C.prepend(ie):ie.nodeName.toLowerCase()==="ul"&&C.append(ie)}let L=y.querySelectorAll("[data-footnote-id]"),oe=C.querySelectorAll("[data-footnote-id]");if(L.length===oe.length)for(let z=0;z<L.length;z++)oe[z].replaceWith(L[z]);y.replaceWith(C)}})}};var L_=require("@codemirror/view"),U_=require("obsidian");var q_=()=>L_.ViewPlugin.fromClass(Up),Up=class{constructor(e){this.view=e,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(e){let{target:t}=e;if(!t||!(t instanceof HTMLInputElement)||t.type!=="checkbox")return!1;let n=t.closest("ul.plugin-tasks-query-result, div.callout-content");if(n){if(n.matches("div.callout-content")){let h=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. 
If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(h),new U_.Notice(h,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(t),a=i.doc.lineAt(s),o=le.fromLine({line:a.text,taskLocation:ct.fromUnknownPosition(""),fallbackDate:null});if(o===null)return!1;e.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder().map(h=>h.toFileLineString()).join(i.lineBreak),c=i.update({changes:{from:a.from,to:a.to,insert:l}});this.view.dispatch(c);let f=t.checked;return setTimeout(()=>{t.checked=f},1),!0}};var pr=require("obsidian");function W_(r,e,t,n=void 0){let i="";e.isEmpty()||(i+=`Only tasks containing the global filter '${e.get()}'.

`);let s=new Ji("  "),a=new Jr(r,n);if(!a.ignoreGlobalQuery&&t.hasInstructions()){let o=t.query(n);i+=`Explanation of the global query:

${s.explainQuery(o)}
`}return i+=`Explanation of this Tasks code block query:

${s.explainQuery(a)}`,i}function $u(r,e,t){let n=new Jr(r,t);return n.ignoreGlobalQuery?n:e.query(t).append(n)}function $_(r){for(let t of le.allDateFields()){let n=r[t];if(n&&!n.isValid())return!1}let e=r.happensDates.some(t=>!!(t!=null&&t.isValid()));return!r.isDone&&e}function qp(r){return r.dueDate?"dueDate":r.scheduledDate?"scheduledDate":r.startDate?"startDate":null}function Y_(r,e,t,n){let i=r[e],s=new rt(i).postpone(t,n),a=ht.removeInferredStatusIfNeeded(r,[new le(it(we({},r),{[e]:s}))])[0];return{postponedDate:s,postponedTask:a}}function G_(r,e){let t=r==null?void 0:r.format("DD MMM YYYY");return`Task's ${e} postponed until ${t}`}function j_(r,e,t){return`\u2139\uFE0F ${Wp(r,e,t)} (right-click for more options)`}function Wp(r,e,t){function n(l){return l.charAt(0).toUpperCase()+l.slice(1)}let i=qp(r),s=r[i],o=new rt(s).postpone(t,e).format("ddd Do MMM"),u=e>1?e:"a";return s.isSameOrBefore(window.moment(),"day")?`${n(i.replace("Date",""))} in ${u} ${t}, on ${o}`:`Postpone ${i.replace("Date"," date")} by ${u} ${t}, to ${o}`}var Yu=class{constructor({plugin:e,events:t}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=e.app,this.events=t,e.registerMarkdownCodeBlockProcessor("tasks",this._addQueryRenderChild.bind(this))}_addQueryRenderChild(e,t,n){return F(this,null,function*(){n.addChild(new $p({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},$p=class extends pr.MarkdownRenderChild{constructor({app:t,events:n,container:i,source:s,filePath:a}){super(i);switch(this.app=t,this.events=n,this.source=s,this.filePath=a,this.containerEl.className){case"block-language-tasks":this.query=$u(this.source,tr.getInstance(),this.filePath),this.queryType="tasks";break;default:this.query=$u(this.source,tr.getInstance(),this.filePath),this.queryType="tasks";break}}onload(){this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()}onunload(){this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let t=new Date;t.setHours(24,0,0,0);let n=new Date,i=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=$u(this.source,tr.getInstance(),this.filePath),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return F(this,arguments,function*({tasks:t,state:n}){var a;let s=this.containerEl.createEl("div");n==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(t,n,s):this.query.error!==void 0?this.renderErrorMessage(s,this.query.error):this.renderLoadingMessage(s),(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}renderQuerySearchResults(t,n,i){return F(this,null,function*(){this.query.debug(`[render] Render called: plugin state: ${n}; searching ${t.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(i);let s=this.query.applyQueryToTasks(t);if(s.searchErrorMessage!==void 0){this.renderErrorMessage(i,s.searchErrorMessage);return}yield this.addAllTaskGroups(s.taskGroups,i);let a=s.totalTasksCount;this.addTaskCount(i,s),this.query.debug(`[render] ${a} tasks displayed`)})}renderErrorMessage(t,n){t.createDiv().innerHTML=`<pre>Tasks query: ${n.replace(/\n/g,"<br>")}</pre>`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let n=W_(this.source,ge.getInstance(),tr.getInstance(),this.filePath),i=t.createEl("pre");i.addClasses(["plugin-tasks-query-explanation"]),i.setText(n),t.appendChild(i)}createTaskList(t,n){return F(this,null,function*(){let i=new hn(this.query.layoutOptions,this.query.queryLayoutOptions),s=n.createEl("ul");s.addClasses(["contains-task-list","plugin-tasks-query-result"]),s.addClasses(i.taskListHiddenClasses);let a=this.getGroupingAttribute();a&&a.length>0&&(s.dataset.taskGroupBy=a);let o=new kn({obsidianComponent:this,parentUlElement:s,layoutOptions:this.query.layoutOptions,queryLayoutOptions:this.query.queryLayoutOptions});for(let[u,l]of t.entries()){let c=this.isFilenameUnique({task:l}),f=yield o.renderTaskLine(l,u,c);f.querySelectorAll("[data-footnote-id]").forEach(w=>w.remove());let T=f.createSpan("task-extras");this.query.queryLayoutOptions.hideUrgency||this.addUrgency(T,l);let y=this.query.queryLayoutOptions.shortMode;this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(T,l,y,c),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(T,l),!this.query.queryLayoutOptions.hidePostponeButton&&$_(l)&&this.addPostponeButton(T,l,y),s.appendChild(f)}n.appendChild(s)})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(s=>{s.preventDefault();let a=u=>F(this,null,function*(){yield ri({originalTask:n,newTasks:ht.removeInferredStatusIfNeeded(n,u)})});new gn({app:this.app,task:n,onSubmit:a}).open()})}addUrgency(t,n){let i=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:i,cls:"tasks-urgency"})}addAllTaskGroups(t,n){return F(this,null,function*(){for(let i of t.groups)yield this.addGroupHeadings(n,i.groupHeadings),yield this.createTaskList(i.tasks,n)})}addGroupHeadings(t,n){return F(this,null,function*(){for(let i of n)yield this.addGroupHeading(t,i)})}addGroupHeading(t,n){return F(this,null,function*(){let i="h6";n.nestingLevel===0?i="h4":n.nestingLevel===1&&(i="h5");let s=t.createEl(i,{cls:"tasks-group-heading"});yield pr.MarkdownRenderer.renderMarkdown(n.displayName,s,this.filePath,this)})}addBacklinks(t,n,i,s){var c;let a=t.createSpan({cls:"tasks-backlink"});i||a.append(" (");let o=a.createEl("a");o.rel="noopener",o.target="_blank",o.addClass("internal-link"),i&&o.addClass("internal-link-short-mode");let u;i?u=" \u{1F517}":u=(c=n.getLinkText({isFilenameUnique:s}))!=null?c:"",o.setText(u);let l=this.app.vault;o.addEventListener("click",f=>F(this,null,function*(){let h=yield Fp(n,l);if(h){let[T,y]=h,w=this.app.workspace.getLeaf(pr.Keymap.isModEvent(f));f.preventDefault(),yield w.openFile(y,{eState:{line:T}})}})),o.addEventListener("mousedown",f=>F(this,null,function*(){if(f.button===1){let h=yield Fp(n,l);if(h){let[T,y]=h,w=this.app.workspace.getLeaf("tab");f.preventDefault(),yield w.openFile(y,{eState:{line:T}})}}})),i||a.append(")")}addPostponeButton(t,n,i){let a="day",o=j_(n,1,a),u=t.createEl("button",{attr:{id:"postpone-button",title:o}}),l=i?["tasks-postpone","tasks-postpone-short-mode"]:["tasks-postpone"];u.addClasses(l),u.setText(" \u23E9"),u.addEventListener("click",c=>{c.preventDefault(),this.postponeOnClickCallback(u,n,1,a)}),u.addEventListener("contextmenu",c=>F(this,null,function*(){c.stopPropagation();let f=new pr.Menu,h=(T,y,w=1)=>{let D=Wp(n,w,y);T.setTitle(D).onClick(()=>this.postponeOnClickCallback(u,n,w,y))};f.addItem(T=>h(T,"days",2)),f.addItem(T=>h(T,"days",3)),f.addItem(T=>h(T,"days",4)),f.addItem(T=>h(T,"days",5)),f.addItem(T=>h(T,"days",6)),f.addSeparator(),f.addItem(T=>h(T,"week")),f.addItem(T=>h(T,"weeks",2)),f.addItem(T=>h(T,"weeks",3)),f.addItem(T=>h(T,"month")),f.showAtPosition({x:c.clientX,y:c.clientY})}))}addTaskCount(t,n){this.query.queryLayoutOptions.hideTaskCount||t.createDiv({text:n.totalTasksCountDisplayText(),cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let i=n[1];return this.app.vault.getMarkdownFiles().filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}postponeOnClickCallback(t,n,i,s){return F(this,null,function*(){let a=qp(n);if(a===null){let l="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new pr.Notice(l,1e4)}let{postponedDate:o,postponedTask:u}=Y_(n,a,s,i);yield ri({originalTask:n,newTasks:u}),this.postponeSuccessCallback(t,a,o)})}postponeSuccessCallback(t,n,i){t.disabled=!0;let s=G_(i,n);new pr.Notice(s,2e3)}};var be=require("obsidian");var Gu=class{constructor(e){this._markdown="";this.columnNames=e,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let e="|",t="|";this.columnNames.forEach(n=>{e+=` ${n} |`,t+=" ----- |"}),this._markdown+=`${e}
`,this._markdown+=`${t}
`}addRow(e){let t=this.makeRowText(e);this._markdown+=`${t}
`}addRowIfNew(e){let t=this.makeRowText(e);this._markdown.includes(t)||(this._markdown+=`${t}
`)}makeRowText(e){let t="|";return e.forEach(n=>{t+=` ${n} |`}),t}};function B_(r,e){return r.findIndex(t=>t.symbol===e)}function XA(r,e){let t=X.getTypeForUnknownSymbol(r.symbol);r.type!==t&&(t==="TODO"&&r.symbol!==" "||e.push(`For information, the conventional type for status symbol ${Rr(r.symbol)} is ${Rr(t)}: you may wish to review this type.`))}function ZA(r,e,t){let n=B_(r,e.nextStatusSymbol);if(n===-1){t.push(`Next symbol ${Rr(e.nextStatusSymbol)} is unknown: create a status with symbol ${Rr(e.nextStatusSymbol)}.`);return}if(e.type!=="DONE")return;let i=r[n];if(i){if(i.type!=="TODO"&&i.type!=="IN_PROGRESS"){let s="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",a=[`This \`DONE\` status is followed by ${Rr(i.type)}, not \`TODO\` or \`IN_PROGRESS\`.`,"If used to complete a recurring task, it will instead be followed by `TODO` or `IN_PROGRESS`, to ensure the next task matches the `not done` filter.",`See [Recurring Tasks and Custom Statuses](${s}).`].join("<br>");t.push(a)}}else t.push("Unexpected failure to find the next status.")}function JA(r,e,t){let n=[];return e.symbol===X.EMPTY.symbol?(n.push("Empty symbol: this status will be ignored."),n):B_(r,e.symbol)!=t?(n.push(`Duplicate symbol '${Rr(e.symbol)}': this status will be ignored.`),n):(XA(e,n),ZA(r,e,n),n)}function H_(r){let e=new Gu(["Status Symbol","Next Status Symbol","Status Name","Status Type","Problems (if any)"]),t=Pe.allStatuses(r);return t.forEach((n,i)=>{e.addRow([Rr(n.symbol),Rr(n.nextStatusSymbol),n.name,Rr(n.type),JA(t,n,i).join("<br>")])}),e.markdown}function z_(r,e,t,n){let s=H_(r),a=e.mermaidDiagram(!0);return`# ${t}

## About this file

This file was created by the Obsidian Tasks plugin (version ${n}) to help visualise the task statuses in this vault.

If you change the Tasks status settings, you can get an updated report by:

- Going to \`Settings\` -> \`Tasks\`.
- Clicking on \`Review and check your Statuses\`.

You can delete this file any time.

## Status Settings

<!--
Switch to Live Preview or Reading Mode to see the table.
If there are any Markdown formatting characters in status names, such as '*' or '_',
Obsidian may only render the table correctly in Reading Mode.
-->

These are the status values in the Core and Custom statuses sections.

${s}
## Loaded Settings

<!-- Switch to Live Preview or Reading Mode to see the diagram. -->

These are the settings actually used by Tasks.
${a}`}function Rr(r){return r===""?r:"`"+(r!==" "?r:"space")+"`"}function V_(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function K_(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function Q_(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function X_(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function Z_(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function J_(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function ev(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}var tv=[{text:"Core Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"<p>These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.</p><p>You can add edit and add your own custom statuses in the section below.</p>"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:"Custom Statuses",level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:`<p>You should first <b>select and install a CSS Snippet or Theme</b> to style custom checkboxes.</p><p>Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.</p><p><b>Note</b> Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.</p><p></p><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Statuses">documentation</a> to get started!</p>`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}];var hr=require("obsidian");var ni=class{validate(e){let t=[];return t.push(...this.validateSymbol(e)),t.push(...this.validateName(e)),t.push(...this.validateNextSymbol(e)),t}validateStatusCollectionEntry(e){let[t,n,i,s]=e,a=[];if(a.push(...this.validateType(s)),t===i&&s!=="NON_TASK"&&a.push(`Status symbol '${t}' toggles to itself`),a.length>0)return a;let o=X.createFromImportedValue(e).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(e){return ni.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return ni.validateOneSymbol(e.nextStatusSymbol,"Task Next Status Symbol")}validateName(e){let t=[];return e.name.length===0&&t.push("Task Status Name cannot be empty."),t}validateType(e){let t=Lt[e],n=[];return t||n.push(`Status Type "${e}" is not a valid type`),t=="EMPTY"&&n.push('Status Type "EMPTY" is not permitted in user data'),n}validateSymbolTypeConventions(e){let t=[],n=e.symbol,i=new ve,s=n==="X"?"x":n,a=i.bySymbol(s);return a.type!=="EMPTY"&&(e.nextStatusSymbol!==a.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),e.type!==a.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${a.type}'`)),t}static validateOneSymbol(e,t){let n=[];return e.length===0&&n.push(`${t} cannot be empty.`),e.length>1&&n.push(`${t} ("${e}") must be a single character.`),n}};var ii=new ni,$t=class extends hr.Modal{constructor(t,n,i){super(t.app);this.plugin=t;this.saved=!1;this.error=!1;this.statusSymbol=n.symbol,this.statusName=n.name,this.statusNextSymbol=n.nextStatusSymbol,this.statusAvailableAsCommand=n.availableAsCommand,this.type=n.type,this.isCoreStatus=i}statusConfiguration(){return new He(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return F(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),i;new hr.Setting(n).setName("Task Status Symbol").setDesc("This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)").addText(l=>{i=l,l.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,$t.setValid(l,ii.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(l=>{$t.setValid(i,ii.validateSymbol(this.statusConfiguration()))});let s;new hr.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(l=>{s=l,l.setValue(this.statusName).onChange(c=>{this.statusName=c,$t.setValid(l,ii.validateName(this.statusConfiguration()))})}).then(l=>{$t.setValid(s,ii.validateName(this.statusConfiguration()))});let a;new hr.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(l=>{a=l,l.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,$t.setValid(l,ii.validateNextSymbol(this.statusConfiguration()))})}).then(l=>{$t.setValid(a,ii.validateNextSymbol(this.statusConfiguration()))}),new hr.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(l=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(f=>{l.addOption(f,f)}),l.setValue(this.type).onChange(f=>{this.type=X.getTypeFromStatusTypeString(f)})}),X.tasksPluginCanCreateCommandsForStatuses()&&new hr.Setting(n).setName("Available as command").setDesc("If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.").addToggle(l=>{l.setValue(this.statusAvailableAsCommand).onChange(c=>F(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=t.createDiv(),u=new hr.Setting(o);u.addButton(l=>(l.setTooltip("Save").setIcon("checkmark").onClick(()=>F(this,null,function*(){let c=ii.validate(this.statusConfiguration());if(c.length>0){let f=c.join(`
`)+`

Fix errors before saving.`;new hr.Notice(f);return}this.saved=!0,this.close()})),l)),u.addExtraButton(l=>(l.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),l))})}onOpen(){this.display()}static setValidationError(t){t.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(t){t.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(t,n){n.length===0?$t.removeValidationError(t):$t.setValidationError(t)}};var Yt=class extends be.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return F(this,null,function*(){yield this.plugin.saveSettings(),t&&this.display()})}display(){let{containerEl:t}=this;t.empty(),this.containerEl.addClass("tasks-settings"),t.createEl("h3",{text:"Tasks Settings"}),t.createEl("p",{cls:"tasks-setting-important",text:"Changing any settings requires a restart of obsidian."}),t.createEl("h4",{text:"Task Format Settings"}),new be.Setting(t).setName("Task Format").setDesc(Yt.createFragmentWithHTML('<p>The format that Tasks uses to read and write tasks.</p><p><b>Important:</b> Tasks currently only supports one format at a time. Selecting Dataview will currently <b>stop Tasks reading its own emoji signifiers</b>.</p><p>See the <a href="https://publish.obsidian.md/tasks/Reference/Task+Formats/About+Task+Formats">documentation</a>.</p>')).addDropdown(i=>{for(let s of Object.keys(Hr))i.addOption(s,Hr[s].displayName);i.setValue(Q().taskFormat).onChange(s=>F(this,null,function*(){tt({taskFormat:s}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new be.Setting(t).setName("Global task filter").setDesc(Yt.createFragmentWithHTML('<p><b>Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.</b></p><p>Use a global filter if you want Tasks to only act on a subset of your "<code>- [ ]</code>" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.<p><p>For example, if you set the global filter to <code>#task</code>, the Tasks plugin will only handle checklist items tagged with <code>#task</code>.</br>Other checklist items will remain normal checklist items and not appear in queries or get a done date set.</p><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Global+Filter">documentation</a>.</p>')).addText(i=>{i.setPlaceholder("e.g. #task or TODO").setValue(ge.getInstance().get()).onChange(s=>F(this,null,function*(){tt({globalFilter:s}),ge.getInstance().set(s),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(i=>{let s=Q();i.setValue(s.removeGlobalFilter).onChange(a=>F(this,null,function*(){tt({removeGlobalFilter:a}),ge.getInstance().setRemoveGlobalFilter(a),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global Query"}),nP(new be.Setting(t).setDesc(Yt.createFragmentWithHTML('<p>A query that is automatically included at the start of every Tasks block in the vault. Useful for adding default filters, or layout options.</p><p>See the <a href="https://publish.obsidian.md/tasks/Queries/Global+Query">documentation</a>.</p>')).addTextArea(i=>{let s=Q();i.inputEl.rows=4,i.setPlaceholder(`# For example...
path does not include _templates/
limit 300
show urgency`).setValue(s.globalQuery).onChange(a=>F(this,null,function*(){tt({globalQuery:a}),tr.getInstance().set(a),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=Q();tv.forEach(i=>{this.addOneSettingsBlock(t,i,n)}),t.createEl("h4",{text:"Date Settings"}),new be.Setting(t).setName("Set created date on every added task").setDesc(Yt.createFragmentWithHTML(`Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Dates#Created+date">documentation</a>.</p>`)).addToggle(i=>{let s=Q();i.setValue(s.setCreatedDate).onChange(a=>F(this,null,function*(){tt({setCreatedDate:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Set done date on every completed task").setDesc(Yt.createFragmentWithHTML('Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Dates#Done+date">documentation</a>.</p>')).addToggle(i=>{let s=Q();i.setValue(s.setDoneDate).onChange(a=>F(this,null,function*(){tt({setDoneDate:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Yt.createFragmentWithHTML('Save time entering Scheduled (\u23F3) dates.</br>If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.</br>The date in the file name must be in one of <code>YYYY-MM-DD</code> or <code>YYYYMMDD</code> formats.</br>Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Use+Filename+as+Default+Date">documentation</a>.</p>')).addToggle(i=>{let s=Q();i.setValue(s.useFilenameAsScheduledDate).onChange(a=>F(this,null,function*(){tt({useFilenameAsScheduledDate:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(i=>F(this,null,function*(){let s=Q();yield this.plugin.saveSettings(),i.setValue(Yt.renderFolderArray(s.filenameAsDateFolders)).onChange(a=>F(this,null,function*(){let o=Yt.parseCommaSeparatedFolders(a);tt({filenameAsDateFolders:o}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Recurring task Settings"}),new be.Setting(t).setName("Next recurrence appears on the line below").setDesc(Yt.createFragmentWithHTML('Enabling this will make the next recurrence of a task appear on the line below the completed task. Otherwise the next recurrence will appear before the completed one.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Recurring+Tasks">documentation</a>.</p>')).addToggle(i=>{let{recurrenceOnNextLine:s}=Q();i.setValue(s).onChange(a=>F(this,null,function*(){tt({recurrenceOnNextLine:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Auto-suggest Settings"}),new be.Setting(t).setName("Auto-suggest task content").setDesc(Yt.createFragmentWithHTML('Enabling this will open an intelligent suggest menu while typing inside a recognized task line.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Auto-Suggest">documentation</a>.</p>')).addToggle(i=>{let s=Q();i.setValue(s.autoSuggestInEditor).onChange(a=>F(this,null,function*(){tt({autoSuggestInEditor:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(i=>{let s=Q();i.setLimits(0,3,1).setValue(s.autoSuggestMinMatch).setDynamicTooltip().onChange(a=>F(this,null,function*(){tt({autoSuggestMinMatch:a}),yield this.plugin.saveSettings()}))}),new be.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(i=>{let s=Q();i.setLimits(3,12,1).setValue(s.autoSuggestMaxItems).setDynamicTooltip().onChange(a=>F(this,null,function*(){tt({autoSuggestMaxItems:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new be.Setting(t).setName("Provide access keys in dialogs").setDesc(Yt.createFragmentWithHTML('If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.</br><p>See the <a href="https://publish.obsidian.md/tasks/Getting+Started/Create+or+edit+Task#Keyboard+shortcuts">documentation</a>.</p>')).addToggle(i=>{let s=Q();i.setValue(s.provideAccessKeys).onChange(a=>F(this,null,function*(){tt({provideAccessKeys:a}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,i){let s=t.createEl("details",{cls:"tasks-nested-settings",attr:we({},n.open||i[n.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[n.text]=s.open,tt({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new be.Setting(a).setHeading().setName(n.text),a.createDiv("collapser").createDiv("handle"),n.notice!==null){let o=s.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&o.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(o=>{if(!(o.featureFlag!==""&&!Ob(o.featureFlag))&&(o.type==="checkbox"?new be.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let l=Q();l.generalSettings[o.settingName]||jn(o.settingName,o.initialValue),u.setValue(l.generalSettings[o.settingName]).onChange(c=>F(this,null,function*(){jn(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new be.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let l=Q();l.generalSettings[o.settingName]||jn(o.settingName,o.initialValue);let c=f=>F(this,null,function*(){jn(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,be.debounce)(c,500,!0))}):o.type==="textarea"?new be.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let l=Q();l.generalSettings[o.settingName]||jn(o.settingName,o.initialValue);let c=f=>F(this,null,function*(){jn(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(l.generalSettings[o.settingName].toString()).onChange((0,be.debounce)(c,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let u=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&u.insertAdjacentHTML("beforeend",o.notice.html)}})}static parseCommaSeparatedFolders(t){return t.split(",").map(n=>n.trim()).map(n=>n.replace(/^\/|\/$/g,"")).filter(n=>n!=="")}static renderFolderArray(t){return t.join(",")}insertTaskCoreStatusSettings(t,n){let{statusSettings:i}=Q();i.coreStatuses.forEach(a=>{rv(t,a,i.coreStatuses,i,n,n.plugin,!0)}),new be.Setting(t).addButton(a=>{let o="Review and check your Statuses";a.setButtonText(o).setCta().onClick(()=>F(this,null,function*(){let l=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${l}.md`,f=this.plugin.manifest.version,h=ve.getInstance(),T=z_(i,h,o,f),y=yield app.vault.create(c,T);yield this.app.workspace.getLeaf(!0).openFile(y)})),a.setTooltip("Create a new file in the root of the vault, containing a Mermaid diagram of the current status settings.")}).infoEl.remove()}insertCustomTaskStatusSettings(t,n){let{statusSettings:i}=Q();i.customStatuses.forEach(l=>{rv(t,l,i.customStatuses,i,n,n.plugin,!1)}),t.createEl("div"),new be.Setting(t).addButton(l=>{l.setButtonText("Add New Task Status").setCta().onClick(()=>F(this,null,function*(){Pe.addStatus(i.customStatuses,new He("","","",!1,"TODO")),yield es(i,n)}))}).infoEl.remove();let a=[["AnuPpuccin Theme",V_()],["Aura Theme",K_()],["Ebullientworks Theme",Q_()],["ITS Theme & SlRvb Checkboxes",X_()],["Minimal Theme",J_()],["Things Theme",ev()],["LYT Mode Theme (Dark mode only)",Z_()]];for(let[l,c]of a)new be.Setting(t).addButton(h=>{let T=`${l}: Add ${c.length} supported Statuses`;h.setButtonText(T).onClick(()=>F(this,null,function*(){yield rP(c,i,n)}))}).infoEl.remove();new be.Setting(t).addButton(l=>{l.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>F(this,null,function*(){let f=this.plugin.getTasks().map(T=>T.status),h=ve.getInstance().findUnknownStatuses(f);h.length!==0&&(h.forEach(T=>{Pe.addStatus(i.customStatuses,T)}),yield es(i,n))}))}).infoEl.remove(),new be.Setting(t).addButton(l=>{l.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>F(this,null,function*(){Pe.resetAllCustomStatuses(i),yield es(i,n)}))}).infoEl.remove()}},Ca=Yt;Ca.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function rv(r,e,t,n,i,s,a){let o=r.createEl("pre");o.addClass("row-for-status"),o.textContent=new X(e).previewText();let u=new be.Setting(r);u.infoEl.replaceWith(o),a||u.addExtraButton(l=>{l.setIcon("cross").setTooltip("Delete").onClick(()=>F(this,null,function*(){Pe.deleteStatus(t,e)&&(yield es(n,i))}))}),u.addExtraButton(l=>{l.setIcon("pencil").setTooltip("Edit").onClick(()=>F(this,null,function*(){let c=new $t(s,e,a);c.onClose=()=>F(this,null,function*(){c.saved&&Pe.replaceStatus(t,e,c.statusConfiguration())&&(yield es(n,i))}),c.open()}))}),u.infoEl.remove()}function rP(r,e,t){return F(this,null,function*(){Pe.bulkAddStatusCollection(e,r).forEach(i=>{new be.Notice(i)}),yield es(e,t)})}function es(r,e){return F(this,null,function*(){tt({statusSettings:r}),Pe.applyToStatusRegistry(r,ve.getInstance()),yield e.saveSettings(!0)})}function nP(r){let{settingEl:e,infoEl:t,controlEl:n}=r,i=n.querySelector("textarea");i!==null&&(e.style.display="block",t.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}var nv=require("obsidian");var ju=class extends nv.EditorSuggest{constructor(t,n){super(t);this.settings=n,t.scope.register([],"Tab",()=>{var s;let i=(s=this.context)==null?void 0:s.editor;return i?(i.exec("indentMore"),!1):!0})}onTrigger(t,n,i){if(!this.settings.autoSuggestInEditor)return null;let s=n.getLine(t.line);return wb(s,t.ch)?{start:{line:t.line,ch:0},end:{line:t.line,ch:s.length},query:s}:null}getSuggestions(t){var a,o,u;let n=t.query,i=t.editor.getCursor();return((u=(o=(a=Ta()).buildSuggestions)==null?void 0:o.call(a,n,i.ch,this.settings))!=null?u:[]).map(l=>it(we({},l),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var u,l,c;let i=t.context.editor;if(t.suggestionType==="empty"){this.close();let f=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(l=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||l.dispatchEvent(f);return}let s=t.context.editor.getCursor(),a={line:s.line,ch:(c=t.insertAt)!=null?c:s.ch},o=t.insertSkip?{line:s.line,ch:a.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,a,o),t.context.editor.setCursor({line:s.line,ch:a.ch+t.appendText.length})}};var iv=(r,e)=>{let t,n=new Promise((a,o)=>{t=a});return e(r,a=>{let o=a.map(u=>u.toFileLineString()).join(`
`);t(o)}).open(),n};var sv=(r,e)=>{let t=Zo({line:"",path:""});return new gn({app:r,task:t,onSubmit:e})};var av=r=>({createTaskLineModal:()=>iv(r,sv)});var Bu=class extends ov.Plugin{get apiV1(){return av(app)}onload(){return F(this,null,function*(){St.registerConsoleLogger(),np("info",`loading plugin "${this.manifest.name}" v${this.manifest.version}`),yield this.loadSettings();let{loggingOptions:t}=Q();St.configure(t),this.addSettingTab(new Ca({plugin:this})),x_({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let n=new Pu({obsidianEvents:this.app.workspace});this.cache=new Bn({metadataCache:this.app.metadataCache,vault:this.app.vault,events:n}),this.inlineRenderer=new Wu({plugin:this}),this.queryRenderer=new Yu({plugin:this,events:n}),this.registerEditorExtension(q_()),this.registerEditorSuggest(new ju(this.app,Q())),new Jo({plugin:this})})}loadTaskStatuses(){return F(this,null,function*(){let{statusSettings:t}=Q();Pe.applyToStatusRegistry(t,ve.getInstance())})}onunload(){var t;np("info",`unloading plugin "${this.manifest.name}" v${this.manifest.version}`),(t=this.cache)==null||t.unload()}loadSettings(){return F(this,null,function*(){let t=yield this.loadData();tt(t),t=Q(),ge.getInstance().set(t.globalFilter),ge.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),tr.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return F(this,null,function*(){yield this.saveData(Q())})}getTasks(){var t;return(t=this.cache)==null?void 0:t.getTasks()}};
/*!
 * EventEmitter2
 * https://github.com/hij1nx/EventEmitter2
 *
 * Copyright (c) 2013 hij1nx
 * Licensed under the MIT license.
 */
/*!
 * mustache.js - Logic-less {{mustache}} templates with JavaScript
 * http://github.com/janl/mustache.js
 */
