1
0
Fork 0
obsidian-vault-starter/.obsidian/plugins/obsidian-tasks-plugin/main.js

226 lines
434 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
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 kk=Object.create;var Bi=Object.defineProperty,Dk=Object.defineProperties,Ek=Object.getOwnPropertyDescriptor,Sk=Object.getOwnPropertyDescriptors,Ok=Object.getOwnPropertyNames,tm=Object.getOwnPropertySymbols,Mk=Object.getPrototypeOf,nm=Object.prototype.hasOwnProperty,Rk=Object.prototype.propertyIsEnumerable;var rm=(r,e,t)=>e in r?Bi(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ae=(r,e)=>{for(var t in e||(e={}))nm.call(e,t)&&rm(r,t,e[t]);if(tm)for(var t of tm(e))Rk.call(e,t)&&rm(r,t,e[t]);return r},tr=(r,e)=>Dk(r,Sk(e));var S=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),xk=(r,e)=>{for(var t in e)Bi(r,t,{get:e[t],enumerable:!0})},sm=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ok(e))!nm.call(r,s)&&s!==t&&Bi(r,s,{get:()=>e[s],enumerable:!(n=Ek(e,s))||n.enumerable});return r};var Fn=(r,e,t)=>(t=r!=null?kk(Mk(r)):{},sm(e||!r||!r.__esModule?Bi(t,"default",{value:r,enumerable:!0}):t,r)),Pk=r=>sm(Bi({},"__esModule",{value:!0}),r);var J=(r,e,t)=>new Promise((n,s)=>{var a=c=>{try{l(t.next(c))}catch(f){s(f)}},o=c=>{try{l(t.throw(c))}catch(f){s(f)}},l=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,o);l((t=t.apply(r,e)).next())});var Ie=S(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.matchAnyPattern=Ln.extractTerms=Ln.repeatedTimeunitPattern=void 0;function Ik(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Ln.repeatedTimeunitPattern=Ik;function im(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Ln.extractTerms=im;function Fk(r){return`(?:${im(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Ln.matchAnyPattern=Fk});var Re=S((Il,Fl)=>{(function(r,e){typeof Il=="object"&&typeof Fl!="undefined"?Fl.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Il,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",s="second",a="minute",o="hour",l="day",c="week",f="month",p="quarter",g="year",T="date",O="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|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,C={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("_")},$=function(V,q,P){var Q=String(V);return!Q||Q.length>=q?V:""+Array(q+1-Q.length).join(P)+V},B={s:$,z:function(V){var q=-V.utcOffset(),P=Math.abs(q),Q=Math.floor(P/60),Y=P%60;return(q<=0?"+":"-")+$(Q,2,"0")+":"+$(Y,2,"0")},m:function V(q,P){if(q.date()<P.date())return-V(P,q);var Q=12*(P.year()-q.year())+(P.month()-q.month()),Y=q.clone().add(Q,f),oe=P-Y<0,y=q.clone().add(Q+(oe?-1:1),f);return+(-(Q+(P-Y)/(oe?Y-y:y-Y))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:f,y:g,w:c,d:l,D:T,h:o,m:a,s,ms:n,Q:p}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},W="en",ke={};ke[W]=C;var Te=function(V){return V instanceof It},be=function(V,q,P){var Q;if(!V)return W;if(typeof V=="string")ke[V]&&(Q=V),q&&(ke[V]=q,Q=V);else{var Y=V.name;ke[Y]=V,Q=Y}return!P&&Q&&(W=Q),Q||!P&&W},ee=function(V,q){if(Te(V))return V.clone();var P=typeof q=="object"?q:{};return P.date=V,P.args=arguments,new It(P)},ne=B;ne.l=be,ne.i=Te,ne.w=function(V,q){return ee(V,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var It=function(){function V(P){this.$L=be(P.locale,null,!0),this.parse(P)}var q=V.prototype;return q.parse=function(P){this.$d=function(Q){var Y=Q.date,oe=Q.utc;if(Y===null)return new Date(NaN);if(ne.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var y=Y.match(v);if(y){var _=y[2]-1||0,w=(y[7]||"0").substring(0,3);return oe?new Date(Date.UTC(y[1],_,y[3]||1,y[4]||0,y[5]||0,y[6]||0,w)):new Date(y[1],_,y[3]||1,y[4]||0,y[5]||0,y[6]||0,w)}}return new Date(Y)}(P),this.$x=P.x||{},this.init()},q.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},q.$utils=function(){return ne},q.isValid=function(){return this.$d.toString()!==O},q.isSame=function(P,Q){var Y=ee(P);return this.startOf(Q)<=Y&&Y<=this.endOf(Q)},q.isAfter=function(P,Q){return ee(P)<this.startOf(Q)},q.isBefore=function(P,Q){return this.endOf(Q)<ee(P)},q.$g=function(P,Q,Y){return ne.u(P)?this[Q]:this.set(Y,P)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(P,Q){var Y=this,oe=!!ne.u(Q)||Q,y=ne.p(P),_=function(N,j){var De=ne.w(Y.$u?Date.UTC(Y.$y,j,N):new Date(Y.$y,j,N),Y);return oe?De:De.endOf(l)},w=function(N,j){return ne.w(Y.toDate()[N].apply(Y.toDate("s"),(oe?[0,0,0,0]:[23,59,59,999]).slice(j)),Y)},k=this.$W,E=this.$M,M=this.$D,D="set"+(this.$u?"UTC":"");switch(y){case g:return oe?_(1,0):_(31,11);case f:return oe?_(1,E):_(0,E+1);case c:var I=this.$locale().weekStart||0,A=(k<I?k+7:k)-I;return _(oe?M-A:M+(6-A),E);case l:case T:return w(D+"Hours",0);case o:return w(D+"Minutes",1);case a:return w(D+"Seconds",2);case s:return w(D+"Milliseconds",3);default:return this.clone()}},q.endOf=function(P){return this.startOf(P,!1)},q.$set=function(P,Q){var Y,oe=ne.p(P),y="set"+(this.$u?"UTC":""),_=(Y={},Y[l]=y+"Date",Y[T]=y+"Date",Y[f]=y+"Month",Y[g]=y+"FullYear",Y[o]=y+"Hours",Y[a]=y+"Minutes",Y[s]=y+"Seconds",Y[n]=y+"Milliseconds",Y)[oe],w=oe===l?this.$D+(Q-this.$W):Q;if(oe===f||oe===g){var k=this.clone().set(T,1);k.$d[_](w),k.init(),this.$d=k.set(T,Math.min(this.$D,k.daysInMonth())).$d}else _&&this.$d[_](w);return this.init(),this},q.set=function(P,Q){return this.clone().$set(P,Q)},q.get=function(P){return this[ne.p(P)]()},q.add=function(P,Q){var Y,oe=this;P=Number(P);var y=ne.p(Q),_=function(E){var M=ee(oe);return ne.w(M.date(M.date()+Math.round(E*P)),oe)};if(y===f)return this.set(f,this.$M+P);if(y===g)return this.set(g,this.$y+P);if(y===l)return _(1);if(y===c)return _(7);var w=(Y={},Y[a]=e,Y[o]=t,Y[s]=r,Y)[y]||1,k=this.$d.getTime()+P*w;return ne.w(k,this)},q.subtract=function(P,Q){return this.add(-1*P,Q)},q.format=function(P){var Q=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||O;var oe=P||"YYYY-MM-DDTHH:mm:ssZ",y=ne.z(this),_=this.$H,w=this.$m,k=this.$M,E=Y.weekdays,M=Y.months,D=function(j,De,pe,le){return j&&(j[De]||j(Q,oe))||pe[De].substr(0,le)},I=function(j){return ne.s(_%12||12,j,"0")},A=Y.meridiem||function(j,De,pe){var le=j<12?"AM":"PM";return pe?le.toLowerCase():le},N={YY:String(this.$y).slice(-2),YYYY:this.$y,M:k+1,MM:ne.s(k+1,2,"0"),MMM:D(Y.monthsShort,k,M,3),MMMM:D(M,k),D:this.$D,DD:ne.s(this.$D,2,"0"),d:String(this.$W),dd:D(Y.weekdaysMin,this.$W,E,2),ddd:D(Y.weekdaysShort,this.$W,E,3),dddd:E[this.$W],H:String(_),HH:ne.s(_,2,"0"),h:I(1),hh:I(2),a:A(_,w,!0),A:A(_,w,!1),m:String(w),mm:ne.s(w,2,"0"),s:String(this.$s),ss:ne.s(this.$s,2,"0"),SSS:ne.s(this.$ms,3,"0"),Z:y};return oe.replace(R,function(j,De){return De||N[j]||y.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(P,Q,Y){var oe,y=ne.p(Q),_=ee(P),w=(_.utcOffset()-this.utcOffset())*e,k=this-_,E=ne.m(this,_);return E=(oe={},oe[g]=E/12,oe[f]=E,oe[p]=E/3,oe[c]=(k-w)/6048e5,oe[l]=(k-w)/864e5,oe[o]=k/t,oe[a]=k/e,oe[s]=k/r,oe)[y]||k,Y?E:ne.a(E)},q.daysInMonth=function(){return this.endOf(f).$D},q.$locale=function(){return ke[this.$L]},q.locale=function(P,Q){if(!P)return this.$L;var Y=this.clone(),oe=be(P,Q,!0);return oe&&(Y.$L=oe),Y},q.clone=function(){return ne.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},V}(),yt=It.prototype;return ee.prototype=yt,[["$ms",n],["$s",s],["$m",a],["$H",o],["$W",l],["$M",f],["$y",g],["$D",T]].forEach(function(V){yt[V[1]]=function(q){return this.$g(q,V[0],V[1])}}),ee.extend=function(V,q){return V.$i||(V(q,It,ee),V.$i=!0),ee},ee.locale=be,ee.isDayjs=Te,ee.unix=function(V){return ee(1e3*V)},ee.en=ke[W],ee.Ls=ke,ee.p={},ee})});var xt=S(Yn=>{"use strict";var Lk=Yn&&Yn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.findYearClosestToRef=Yn.findMostLikelyADYear=void 0;var Yk=Lk(Re());function Uk(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Yn.findMostLikelyADYear=Uk;function Wk(r,e,t){let n=Yk.default(r),s=n;s=s.month(t-1),s=s.date(e),s=s.year(n.year());let a=s.add(1,"y"),o=s.add(-1,"y");return Math.abs(a.diff(n))<Math.abs(s.diff(n))?s=a:Math.abs(o.diff(n))<Math.abs(s.diff(n))&&(s=o),s.year()}Yn.findYearClosestToRef=Wk});var Pt=S(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.parseTimeUnits=ye.TIME_UNITS_PATTERN=ye.parseYear=ye.YEAR_PATTERN=ye.parseOrdinalNumberPattern=ye.ORDINAL_NUMBER_PATTERN=ye.parseNumberPattern=ye.NUMBER_PATTERN=ye.TIME_UNIT_DICTIONARY=ye.ORDINAL_WORD_DICTIONARY=ye.INTEGER_WORD_DICTIONARY=ye.MONTH_DICTIONARY=ye.FULL_MONTH_NAME_DICTIONARY=ye.WEEKDAY_DICTIONARY=void 0;var Po=Ie(),qk=xt();ye.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};ye.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};ye.MONTH_DICTIONARY=Object.assign(Object.assign({},ye.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});ye.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};ye.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};ye.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"};ye.NUMBER_PATTERN=`(?:${Po.matchAnyPattern(ye.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 om(r){let e=r.toLowerCase();return ye.INTEGER_WORD_DICTIONARY[e]!==void 0?ye.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)}ye.parseNumberPattern=om;ye.ORDINAL_NUMBER_PATTERN=`(?:${Po.matchAnyPattern(ye.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function jk(r){let e=r.toLowerCase();return ye.ORDINAL_WORD_DICTIONARY[e]!==void 0?ye.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}ye.parseOrdinalNumberPattern=jk;ye.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 $k(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 qk.findMostLikelyADYear(e)}ye.parseYear=$k;var um=`(${ye.NUMBER_PATTERN})\\s{0,3}(${Po.matchAnyPattern(ye.TIME_UNIT_DICTIONARY)})`,am=new RegExp(um,"i");ye.TIME_UNITS_PATTERN=Po.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",um);function Gk(r){let e={},t=r,n=am.exec(t);for(;n;)Bk(e,n),t=t.substring(n[0].length).trim(),n=am.exec(t);return e}ye.parseTimeUnits=Gk;function Bk(r,e){let t=om(e[1]),n=ye.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var lm=S((Ll,Yl)=>{(function(r,e){typeof Ll=="object"&&typeof Yl!="undefined"?Yl.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs_plugin_quarterOfYear=e()})(Ll,function(){"use strict";var r="month",e="quarter";return function(t,n){var s=n.prototype;s.quarter=function(l){return this.$utils().u(l)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(l-1))};var a=s.add;s.add=function(l,c){return l=Number(l),this.$utils().p(c)===e?this.add(3*l,r):a.bind(this)(l,c)};var o=s.startOf;s.startOf=function(l,c){var f=this.$utils(),p=!!f.u(c)||c;if(f.p(l)===e){var g=this.quarter()-1;return p?this.month(3*g).startOf(r).startOf("day"):this.month(3*g+2).endOf(r).endOf("day")}return o.bind(this)(l,c)}}})});var yr=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.implySimilarTime=Wr.assignSimilarTime=Wr.assignSimilarDate=Wr.assignTheNextDay=void 0;var cm=pt();function Hk(r,e){e=e.add(1,"day"),dm(r,e),fm(r,e)}Wr.assignTheNextDay=Hk;function dm(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}Wr.assignSimilarDate=dm;function zk(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",cm.Meridiem.AM):r.assign("meridiem",cm.Meridiem.PM)}Wr.assignSimilarTime=zk;function fm(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}Wr.implySimilarTime=fm});var hm=S(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.toTimezoneOffset=ls.TIMEZONE_ABBR_MAP=void 0;ls.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 Vk(r){var e;return r==null?null:typeof r=="number"?r:(e=ls.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}ls.toTimezoneOffset=Vk});var tt=S(qr=>{"use strict";var pm=qr&&qr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qr,"__esModule",{value:!0});qr.ParsingResult=qr.ParsingComponents=qr.ReferenceWithTimezone=void 0;var Kk=pm(lm()),Ao=pm(Re()),Ul=yr(),Zk=hm();Ao.default.extend(Kk.default);var Wl=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=Zk.toTimezoneOffset(e.timezone))}};qr.ReferenceWithTimezone=Wl;var cs=class{constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let s in t)this.knownValues[s]=t[s];let n=Ao.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 cs(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 Ao.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 s=-e.getTimezoneOffset(),a=(n=(t=this.get("timezoneOffset"))!==null&&t!==void 0?t:this.reference.timezoneOffset)!==null&&n!==void 0?n:s;return s-a}static createRelativeFromReference(e,t){let n=Ao.default(e.instant);for(let a in t)n=n.add(t[a],a);let s=new cs(e);return t.hour||t.minute||t.second?(Ul.assignSimilarTime(s,n),Ul.assignSimilarDate(s,n),e.timezoneOffset!==null&&s.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Ul.implySimilarTime(s,n),e.timezoneOffset!==null&&s.imply("timezoneOffset",-e.instant.getTimezoneOffset()),t.d?(s.assign("day",n.date()),s.assign("month",n.month()+1),s.assign("year",n.year())):(t.week&&s.imply("weekday",n.day()),s.imply("day",n.date()),t.month?(s.assign("month",n.month()+1),s.assign("year",n.year())):(s.imply("month",n.month()+1),t.year?s.assign("year",n.year()):s.imply("year",n.year())))),s}};qr.ParsingComponents=cs;var Hi=class{constructor(e,t,n,s,a){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=s||new cs(e),this.end=a}clone(){let e=new Hi(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}', ...}]`}};qr.ParsingResult=Hi});var Z=S(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.AbstractParserWithWordBoundaryChecking=void 0;var ql=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 s=(n=t[1])!==null&&n!==void 0?n:"";t.index=t.index+s.length,t[0]=t[0].substring(s.length);for(let a=2;a<t.length;a++)t[a-1]=t[a];return this.innerExtract(e,t)}};No.AbstractParserWithWordBoundaryChecking=ql});var mm=S(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var $l=Pt(),Xk=tt(),Qk=Z(),Jk=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${$l.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),eD=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${$l.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),jl=class extends Qk.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?eD:Jk}innerExtract(e,t){let n=$l.parseTimeUnits(t[1]);return Xk.ParsingComponents.createRelativeFromReference(e.reference,n)}};Gl.default=jl});var vm=S(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var tD=xt(),Tm=Pt(),bm=Pt(),Co=Pt(),rD=Ie(),nD=Z(),sD=new RegExp(`(?:on\\s{0,3})?(${Co.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Co.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${rD.matchAnyPattern(Tm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${bm.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),ym=1,gm=2,iD=3,_m=4,Bl=class extends nD.AbstractParserWithWordBoundaryChecking{innerPattern(){return sD}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Tm.MONTH_DICTIONARY[t[iD].toLowerCase()],a=Co.parseOrdinalNumberPattern(t[ym]);if(a>31)return t.index=t.index+t[ym].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[_m]){let o=bm.parseYear(t[_m]);n.start.assign("year",o)}else{let o=tD.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[gm]){let o=Co.parseOrdinalNumberPattern(t[gm]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Hl.default=Bl});var Sm=S(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var aD=xt(),Dm=Pt(),Io=Pt(),Em=Pt(),oD=Ie(),uD=Z(),lD=new RegExp(`(${oD.matchAnyPattern(Dm.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Io.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Io.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${Em.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),cD=1,dD=2,wm=3,km=4,zl=class extends uD.AbstractParserWithWordBoundaryChecking{innerPattern(){return lD}innerExtract(e,t){let n=Dm.MONTH_DICTIONARY[t[cD].toLowerCase()],s=Io.parseOrdinalNumberPattern(t[dD]);if(s>31)return null;let a=e.createParsingComponents({day:s,month:n});if(t[km]){let c=Em.parseYear(t[km]);a.assign("year",c)}else{let c=aD.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[wm])return a;let o=Io.parseOrdinalNumberPattern(t[wm]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};Vl.default=zl});var Rm=S(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var Kl=Pt(),fD=xt(),hD=Ie(),Mm=Pt(),pD=Z(),mD=new RegExp(`((?:in)\\s*)?(${hD.matchAnyPattern(Kl.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Mm.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),yD=1,gD=2,Om=3,Zl=class extends pD.AbstractParserWithWordBoundaryChecking{innerPattern(){return mD}innerExtract(e,t){let n=t[gD].toLowerCase();if(t[0].length<=3&&!Kl.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index+(t[yD]||"").length,t.index+t[0].length);s.start.imply("day",1);let a=Kl.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[Om]){let o=Mm.parseYear(t[Om]);s.start.assign("year",o)}else{let o=fD.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};Xl.default=Zl});var Am=S(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var Pm=Pt(),_D=Ie(),TD=Z(),bD=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${_D.matchAnyPattern(Pm.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),vD=1,wD=2,xm=3,kD=4,Ql=class extends TD.AbstractParserWithWordBoundaryChecking{innerPattern(){return bD}innerExtract(e,t){let n=t[xm]?parseInt(t[xm]):Pm.MONTH_DICTIONARY[t[wD].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[vD]);return{day:parseInt(t[kD]),month:n,year:s}}};Jl.default=Ql});var Nm=S(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var DD=Z(),ED=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),SD=1,OD=2,ec=class extends DD.AbstractParserWithWordBoundaryChecking{innerPattern(){return ED}innerExtract(e,t){let n=parseInt(t[OD]),s=parseInt(t[SD]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};tc.default=ec});var ds=S(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.AbstractTimeExpressionParser=void 0;var Gt=pt();function MD(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 RD(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 Cm=2,Ks=3,Fo=4,Lo=5,zi=6,rc=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 s=t.index+t[1].length,a=t[0].substring(t[1].length),o=e.createParsingResult(s,a,n);t.index+=t[0].length;let l=e.text.substring(t.index),f=this.getFollowingTimePatternThroughCache().exec(l);return a.match(/^\d{3,4}/)&&f&&f[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!f||f[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(o):(o.end=this.extractFollowingTimeComponents(e,f,o),o.end&&(o.text+=f[0]),this.checkAndReturnWithFollowingPattern(o))}extractPrimaryTimeComponents(e,t,n=!1){let s=e.createParsingComponents(),a=0,o=null,l=parseInt(t[Cm]);if(l>100){if(this.strictMode||t[Ks]!=null)return null;a=l%100,l=Math.floor(l/100)}if(l>24)return null;if(t[Ks]!=null){if(t[Ks].length==1&&!t[zi])return null;a=parseInt(t[Ks])}if(a>=60)return null;if(l>12&&(o=Gt.Meridiem.PM),t[zi]!=null){if(l>12)return null;let c=t[zi][0].toLowerCase();c=="a"&&(o=Gt.Meridiem.AM,l==12&&(l=0)),c=="p"&&(o=Gt.Meridiem.PM,l!=12&&(l+=12))}if(s.assign("hour",l),s.assign("minute",a),o!==null?s.assign("meridiem",o):l<12?s.imply("meridiem",Gt.Meridiem.AM):s.imply("meridiem",Gt.Meridiem.PM),t[Lo]!=null){let c=parseInt(t[Lo].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[Fo]!=null){let c=parseInt(t[Fo]);if(c>=60)return null;s.assign("second",c)}return s}extractFollowingTimeComponents(e,t,n){let s=e.createParsingComponents();if(t[Lo]!=null){let c=parseInt(t[Lo].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[Fo]!=null){let c=parseInt(t[Fo]);if(c>=60)return null;s.assign("second",c)}let a=parseInt(t[Cm]),o=0,l=-1;if(t[Ks]!=null?o=parseInt(t[Ks]):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=Gt.Meridiem.PM),t[zi]!=null){if(a>12)return null;let c=t[zi][0].toLowerCase();c=="a"&&(l=Gt.Meridiem.AM,a==12&&(a=0,s.isCertain("day")||s.imply("day",s.get("day")+1))),c=="p"&&(l=Gt.Meridiem.PM,a!=12&&(a+=12)),n.start.isCertain("meridiem")||(l==Gt.Meridiem.AM?(n.start.imply("meridiem",Gt.Meridiem.AM),n.start.get("hour")==12&&n.start.assign("hour",0)):(n.start.imply("meridiem",Gt.Meridiem.PM),n.start.get("hour")!=12&&n.start.assign("hour",n.start.get("hour")+12)))}return s.assign("hour",a),s.assign("minute",o),l>=0?s.assign("meridiem",l):n.start.isCertain("meridiem")&&n.start.get("hour")>12?n.start.get("hour")-12>a?s.imply("meridiem",Gt.Meridiem.AM):a<=12&&(s.assign("hour",a+12),s.assign("meridiem",Gt.Meridiem.PM)):a>12?s.imply("meridiem",Gt.Meridiem.PM):a<=12&&s.imply("meridiem",Gt.Meridiem.AM),s.date().getTime()<n.start.date().getTime()&&s.imply("day",s.get("day")+1),s}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],s=t[2];if(s.includes(".")&&!s.match(/\d(\.\d{2})+$/))return null;let a=parseInt(s),o=parseInt(n);if(a>24||o>24)return null}return e}getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=MD(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=RD(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};Yo.AbstractTimeExpressionParser=rc});var Im=S(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var Uo=pt(),xD=ds(),nc=class extends xD.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 s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",Uo.Meridiem.PM)):s<6&&n.assign("meridiem",Uo.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Uo.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("morning")&&(n.assign("meridiem",Uo.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};sc.default=nc});var gr=S(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.addImpliedTimeUnits=Zs.reverseTimeUnits=void 0;function PD(r){let e={};for(let t in r)e[t]=-r[t];return e}Zs.reverseTimeUnits=PD;function AD(r,e){let t=r.clone(),n=r.dayjs();for(let s in e)n=n.add(e[s],s);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}Zs.addImpliedTimeUnits=AD});var Fm=S(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var ac=Pt(),ND=tt(),CD=Z(),ID=gr(),FD=new RegExp(`(${ac.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),LD=new RegExp(`(${ac.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),ic=class extends CD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?LD:FD}innerExtract(e,t){let n=ac.parseTimeUnits(t[1]),s=ID.reverseTimeUnits(n);return ND.ParsingComponents.createRelativeFromReference(e.reference,s)}};oc.default=ic});var Lm=S(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var lc=Pt(),YD=tt(),UD=Z(),WD=new RegExp(`(${lc.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),qD=new RegExp("("+lc.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),jD=1,uc=class extends UD.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?qD:WD}innerExtract(e,t){let n=lc.parseTimeUnits(t[jD]);return YD.ParsingComponents.createRelativeFromReference(e.reference,n)}};cc.default=uc});var Qs=S(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.MergingRefiner=Xs.Filter=void 0;var dc=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};Xs.Filter=dc;var fc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0],a=null;for(let o=1;o<t.length;o++){a=t[o];let l=e.text.substring(s.index+s.text.length,a.index);if(!this.shouldMergeResults(l,s,a,e))n.push(s),s=a;else{let c=s,f=a,p=this.mergeResults(l,c,f,e);e.debug(()=>{console.log(`${this.constructor.name} merged ${c} and ${f} into ${p}`)}),s=p}}return s!=null&&n.push(s),n}};Xs.MergingRefiner=fc});var jr=S(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var $D=Qs(),hc=class extends $D.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(a=>{t.start.isCertain(a)||t.start.assign(a,n.start.get(a))}),t.start.getCertainComponents().forEach(a=>{n.start.isCertain(a)||n.start.assign(a,t.start.get(a))})),t.start.date().getTime()>n.start.date().getTime()){let a=t.start.dayjs(),o=n.start.dayjs();t.start.isOnlyWeekdayComponent()&&a.add(-7,"days").isBefore(o)?(a=a.add(-7,"days"),t.start.imply("day",a.date()),t.start.imply("month",a.month()+1),t.start.imply("year",a.year())):n.start.isOnlyWeekdayComponent()&&o.add(7,"days").isAfter(a)?(o=o.add(7,"days"),n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())):[n,t]=[t,n]}let s=t.clone();return s.start=t.start,s.end=n.start,s.index=Math.min(t.index,n.index),t.index<n.index?s.text=t.text+e+n.text:s.text=n.text+e+t.text,s}};pc.default=hc});var Ym=S(Vi=>{"use strict";var GD=Vi&&Vi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vi,"__esModule",{value:!0});var BD=GD(jr()),mc=class extends BD.default{patternBetween(){return/^\s*(to|-)\s*$/i}};Vi.default=mc});var Um=S(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.mergeDateTimeComponent=Js.mergeDateTimeResult=void 0;var HD=pt();function zD(r,e){let t=r.clone(),n=r.start,s=e.start;if(t.start=yc(n,s),r.end!=null||e.end!=null){let a=r.end==null?r.start:r.end,o=e.end==null?e.start:e.end,l=yc(a,o);r.end==null&&l.date().getTime()<t.start.date().getTime()&&(l.isCertain("day")?l.assign("day",l.get("day")+1):l.imply("day",l.get("day")+1)),t.end=l}return t}Js.mergeDateTimeResult=zD;function yc(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")==HD.Meridiem.PM&&t.get("hour")<12&&(e.isCertain("hour")?t.assign("hour",t.get("hour")+12):t.imply("hour",t.get("hour")+12)),t}Js.mergeDateTimeComponent=yc});var ln=S(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var VD=Qs(),Wm=Um(),gc=class extends VD.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 s=t.start.isOnlyDate()?Wm.mergeDateTimeResult(t,n):Wm.mergeDateTimeResult(n,t);return s.index=t.index,s.text=t.text+e+n.text,s}};_c.default=gc});var qm=S(Ki=>{"use strict";var KD=Ki&&Ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ki,"__esModule",{value:!0});var ZD=KD(ln()),Tc=class extends ZD.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};Ki.default=Tc});var jm=S(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var XD=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),QD={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},bc=class{constructor(e){this.timezone=Object.assign(Object.assign({},QD),e)}refine(e,t){var n;let s=(n=e.option.timezones)!==null&&n!==void 0?n:{};return t.forEach(a=>{var o,l;let c=e.text.substring(a.index+a.text.length),f=XD.exec(c);if(!f)return;let p=f[1].toUpperCase(),g=(l=(o=s[p])!==null&&o!==void 0?o:this.timezone[p])!==null&&l!==void 0?l:null;if(g===null)return;e.debug(()=>{console.log(`Extracting timezone: '${p}' into: ${g} for: ${a.start}`)});let T=a.start.get("timezoneOffset");T!==null&&g!=T&&(a.start.isCertain("timezoneOffset")||p!=f[1])||a.start.isOnlyDate()&&p!=f[1]||(a.text+=f[0],a.start.isCertain("timezoneOffset")||a.start.assign("timezoneOffset",g),a.end!=null&&!a.end.isCertain("timezoneOffset")&&a.end.assign("timezoneOffset",g))}),t}};vc.default=bc});var Wo=S(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var JD=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),eE=1,tE=2,rE=3,wc=class{refine(e,t){return t.forEach(function(n){if(n.start.isCertain("timezoneOffset"))return;let s=e.text.substring(n.index+n.text.length),a=JD.exec(s);if(!a)return;e.debug(()=>{console.log(`Extracting timezone: '${a[0]}' into : ${n}`)});let o=parseInt(a[tE]),l=parseInt(a[rE]||"0"),c=o*60+l;c>14*60||(a[eE]==="-"&&(c=-c),n.end!=null&&n.end.assign("timezoneOffset",c),n.start.assign("timezoneOffset",c),n.text+=a[0])}),t}};kc.default=wc});var $m=S(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var Dc=class{refine(e,t){if(t.length<2)return t;let n=[],s=t[0];for(let a=1;a<t.length;a++){let o=t[a];o.index<s.index+s.text.length?o.text.length>s.text.length&&(s=o):(n.push(s),s=o)}return s!=null&&n.push(s),n}};Ec.default=Dc});var Gm=S(Zi=>{"use strict";var nE=Zi&&Zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zi,"__esModule",{value:!0});var sE=nE(Re()),Sc=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let s=sE.default(e.refDate);if(n.start.isOnlyDayMonthComponent()&&s.isAfter(n.start.dayjs()))for(let a=0;a<3&&s.isAfter(n.start.dayjs());a++)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()&&s.isAfter(n.start.dayjs())&&(s.day()>=n.start.get("weekday")?s=s.day(n.start.get("weekday")+7):s=s.day(n.start.get("weekday")),n.start.imply("day",s.date()),n.start.imply("month",s.month()+1),n.start.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.start})`)}),n.end&&n.end.isOnlyWeekdayComponent()&&(s.day()>n.end.get("weekday")?s=s.day(n.end.get("weekday")+7):s=s.day(n.end.get("weekday")),n.end.imply("day",s.date()),n.end.imply("month",s.month()+1),n.end.imply("year",s.year()),e.debug(()=>{console.log(`Forward weekly adjusted for ${n} (${n.end})`)})))}),t}};Zi.default=Sc});var Bm=S(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var iE=Qs(),Oc=class extends iE.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}};Mc.default=Oc});var Pc=S(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var aE=Z(),oE=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"),uE=1,lE=2,cE=3,Hm=4,dE=5,zm=6,Vm=7,Km=8,Zm=9,Rc=class extends aE.AbstractParserWithWordBoundaryChecking{innerPattern(){return oE}innerExtract(e,t){let n={};if(n.year=parseInt(t[uE]),n.month=parseInt(t[lE]),n.day=parseInt(t[cE]),t[Hm]!=null)if(n.hour=parseInt(t[Hm]),n.minute=parseInt(t[dE]),t[zm]!=null&&(n.second=parseInt(t[zm])),t[Vm]!=null&&(n.millisecond=parseInt(t[Vm])),t[Km]==null)n.timezoneOffset=0;else{let s=parseInt(t[Km]),a=0;t[Zm]!=null&&(a=parseInt(t[Zm]));let o=s*60;o<0?o-=a:o+=a,n.timezoneOffset=o}return n}};xc.default=Rc});var Xm=S(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var fE=Qs(),Ac=class extends fE.MergingRefiner{mergeResults(e,t,n){let s=n.clone();return s.index=t.index,s.text=t.text+e+s.text,s.start.assign("weekday",t.start.get("weekday")),s.end&&s.end.assign("weekday",t.start.get("weekday")),s}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain("hour")&&n.start.isCertain("day")&&e.match(/^,?\s*$/)!=null}};Nc.default=Ac});var cn=S(ei=>{"use strict";var fs=ei&&ei.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ei,"__esModule",{value:!0});ei.includeCommonConfiguration=void 0;var hE=fs(jm()),pE=fs(Wo()),Qm=fs($m()),mE=fs(Gm()),yE=fs(Bm()),gE=fs(Pc()),_E=fs(Xm());function TE(r,e=!1){return r.parsers.unshift(new gE.default),r.refiners.unshift(new _E.default),r.refiners.unshift(new hE.default),r.refiners.unshift(new pE.default),r.refiners.unshift(new Qm.default),r.refiners.push(new Qm.default),r.refiners.push(new mE.default),r.refiners.push(new yE.default(e)),r}ei.includeCommonConfiguration=TE});var fn=S(Ne=>{"use strict";var bE=Ne&&Ne.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.noon=Ne.morning=Ne.midnight=Ne.yesterdayEvening=Ne.evening=Ne.lastNight=Ne.tonight=Ne.theDayAfter=Ne.tomorrow=Ne.theDayBefore=Ne.yesterday=Ne.today=Ne.now=void 0;var $r=tt(),ti=bE(Re()),dn=yr(),Xi=pt();function vE(r){let e=ti.default(r.instant),t=new $r.ParsingComponents(r,{});return dn.assignSimilarDate(t,e),dn.assignSimilarTime(t,e),r.timezoneOffset!==null&&t.assign("timezoneOffset",e.utcOffset()),t}Ne.now=vE;function wE(r){let e=ti.default(r.instant),t=new $r.ParsingComponents(r,{});return dn.assignSimilarDate(t,e),dn.implySimilarTime(t,e),t}Ne.today=wE;function kE(r){return Jm(r,1)}Ne.yesterday=kE;function Jm(r,e){return Cc(r,-e)}Ne.theDayBefore=Jm;function DE(r){return Cc(r,1)}Ne.tomorrow=DE;function Cc(r,e){let t=ti.default(r.instant),n=new $r.ParsingComponents(r,{});return t=t.add(e,"day"),dn.assignSimilarDate(n,t),dn.implySimilarTime(n,t),n}Ne.theDayAfter=Cc;function EE(r,e=22){let t=ti.default(r.instant),n=new $r.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",Xi.Meridiem.PM),dn.assignSimilarDate(n,t),n}Ne.tonight=EE;function SE(r,e=0){let t=ti.default(r.instant),n=new $r.ParsingComponents(r,{});return t.hour()<6&&(t=t.add(-1,"day")),dn.assignSimilarDate(n,t),n.imply("hour",e),n}Ne.lastNight=SE;function OE(r,e=20){let t=new $r.ParsingComponents(r,{});return t.imply("meridiem",Xi.Meridiem.PM),t.imply("hour",e),t}Ne.evening=OE;function ME(r,e=20){let t=ti.default(r.instant),n=new $r.ParsingComponents(r,{});return t=t.add(-1,"day"),dn.assignSimilarDate(n,t),n.imply("hour",e),n.imply("meridiem",Xi.Meridiem.PM),n}Ne.yesterdayEvening=ME;function RE(r){let e=new $r.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}Ne.midnight=RE;function xE(r,e=6){let t=new $r.ParsingComponents(r,{});return t.imply("meridiem",Xi.Meridiem.AM),t.imply("hour",e),t}Ne.morning=xE;function PE(r){let e=new $r.ParsingComponents(r,{});return e.imply("meridiem",Xi.Meridiem.AM),e.imply("hour",12),e}Ne.noon=PE});var ey=S(Rr=>{"use strict";var AE=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]}),NE=Rr&&Rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),CE=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)&&AE(e,r,t);return NE(e,r),e},IE=Rr&&Rr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rr,"__esModule",{value:!0});var FE=IE(Re()),LE=Z(),YE=yr(),Qi=CE(fn()),UE=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Ic=class extends LE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return UE}innerExtract(e,t){let n=FE.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"now":return Qi.now(e.reference);case"today":return Qi.today(e.reference);case"yesterday":return Qi.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return Qi.tomorrow(e.reference);case"tonight":return Qi.tonight(e.reference);default:s.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),YE.assignSimilarDate(a,n),a.imply("hour",0));break}return a}};Rr.default=Ic});var ty=S(Ji=>{"use strict";var WE=Ji&&Ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ji,"__esModule",{value:!0});var qo=pt(),qE=Z(),jE=WE(Re()),$E=yr(),GE=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Fc=class extends qE.AbstractParserWithWordBoundaryChecking{innerPattern(){return GE}innerExtract(e,t){let n=jE.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":s.imply("meridiem",qo.Meridiem.PM),s.imply("hour",15);break;case"evening":case"night":s.imply("meridiem",qo.Meridiem.PM),s.imply("hour",20);break;case"midnight":$E.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"morning":s.imply("meridiem",qo.Meridiem.AM),s.imply("hour",6);break;case"noon":s.imply("meridiem",qo.Meridiem.AM),s.imply("hour",12);break}return s}};Ji.default=Fc});var hs=S(Un=>{"use strict";var BE=Un&&Un.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Un,"__esModule",{value:!0});Un.toDayJSClosestWeekday=Un.toDayJSWeekday=void 0;var ry=BE(Re());function HE(r,e,t){if(!t)return ny(r,e);let n=ry.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}Un.toDayJSWeekday=HE;function ny(r,e){let t=ry.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}Un.toDayJSClosestWeekday=ny});var iy=S(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var sy=Pt(),zE=Ie(),VE=Z(),KE=hs(),ZE=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${zE.matchAnyPattern(sy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),XE=1,QE=2,JE=3,Lc=class extends VE.AbstractParserWithWordBoundaryChecking{innerPattern(){return ZE}innerExtract(e,t){let n=t[QE].toLowerCase(),s=sy.WEEKDAY_DICTIONARY[n],a=t[XE],o=t[JE],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="last"||l=="past"?c="last":l=="next"?c="next":l=="this"&&(c="this");let f=KE.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};Yc.default=Lc});var uy=S(ea=>{"use strict";var eS=ea&&ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ea,"__esModule",{value:!0});var oy=Pt(),ay=tt(),tS=eS(Re()),rS=Z(),nS=Ie(),sS=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${nS.matchAnyPattern(oy.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),iS=1,aS=2,Uc=class extends rS.AbstractParserWithWordBoundaryChecking{innerPattern(){return sS}innerExtract(e,t){let n=t[iS].toLowerCase(),s=t[aS].toLowerCase(),a=oy.TIME_UNIT_DICTIONARY[s];if(n=="next"||n.startsWith("after")){let c={};return c[a]=1,ay.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="last"||n=="past"){let c={};return c[a]=-1,ay.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=tS.default(e.reference.instant);return s.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):s.match(/month/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):s.match(/year/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};ea.default=Uc});var xr=S(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.ParsingContext=si.Chrono=void 0;var ri=tt(),oS=Wc(),ni=class{constructor(e){e=e||oS.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new ni({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let s=this.parse(e,t,n);return s.length>0?s[0].start.date():null}parse(e,t,n){let s=new jo(e,t,n),a=[];return this.parsers.forEach(o=>{let l=ni.executeParser(s,o);a=a.concat(l)}),a.sort((o,l)=>o.index-l.index),this.refiners.forEach(function(o){a=o.refine(s,a)}),a}static executeParser(e,t){let n=[],s=t.pattern(e),a=e.text,o=e.text,l=s.exec(o);for(;l;){let c=l.index+a.length-o.length;l.index=c;let f=t.extract(e,l);if(!f){o=a.substring(l.index+1),l=s.exec(o);continue}let p=null;f instanceof ri.ParsingResult?p=f:f instanceof ri.ParsingComponents?(p=e.createParsingResult(l.index,l[0]),p.start=f):p=e.createParsingResult(l.index,l[0],f),e.debug(()=>console.log(`${t.constructor.name} extracted result ${p}`)),n.push(p),o=a.substring(c+p.text.length),l=s.exec(o)}return n}};si.Chrono=ni;var jo=class{constructor(e,t,n){this.text=e,this.reference=new ri.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof ri.ParsingComponents?e:new ri.ParsingComponents(this.reference,e)}createParsingResult(e,t,n,s){let a=typeof t=="string"?t:this.text.substring(e,t),o=n?this.createParsingComponents(n):null,l=s?this.createParsingComponents(s):null;return new ri.ParsingResult(this.reference,e,a,o,l)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}};si.ParsingContext=jo});var ps=S($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});var ly=xt(),uS=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"),$o=1,cy=5,dy=2,fy=3,qc=4,jc=class{constructor(e){this.groupNumberMonth=e?fy:dy,this.groupNumberDay=e?dy:fy}pattern(){return uS}extract(e,t){if(t[$o]=="/"||t[cy]=="/"){t.index+=t[0].length;return}let n=t.index+t[$o].length,s=t[0].substr(t[$o].length,t[0].length-t[$o].length-t[cy].length);if(s.match(/^\d\.\d$/)||s.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[qc]&&t[0].indexOf("/")<0)return;let a=e.createParsingResult(n,s),o=parseInt(t[this.groupNumberMonth]),l=parseInt(t[this.groupNumberDay]);if((o<1||o>12)&&o>12)if(l>=1&&l<=12&&o<=31)[l,o]=[o,l];else return null;if(l<1||l>31)return null;if(a.start.assign("day",l),a.start.assign("month",o),t[qc]){let c=parseInt(t[qc]),f=ly.findMostLikelyADYear(c);a.start.assign("year",f)}else{let c=ly.findYearClosestToRef(e.refDate,l,o);a.start.imply("year",c)}return a}};$c.default=jc});var py=S(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var hy=Pt(),lS=tt(),cS=Z(),dS=gr(),fS=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${hy.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Gc=class extends cS.AbstractParserWithWordBoundaryChecking{innerPattern(){return fS}innerExtract(e,t){let n=t[1].toLowerCase(),s=hy.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":s=dS.reverseTimeUnits(s);break}return lS.ParsingComponents.createRelativeFromReference(e.reference,s)}};Bc.default=Gc});var yy=S(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});var hS=Qs(),Hc=tt(),pS=Pt(),mS=gr();function my(r){return r.text.match(/\s+(before|from)$/i)!=null}function yS(r){return r.text.match(/\s+(after|since)$/i)!=null}var zc=class extends hS.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!my(t)&&!yS(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let s=pS.parseTimeUnits(t.text);my(t)&&(s=mS.reverseTimeUnits(s));let a=Hc.ParsingComponents.createRelativeFromReference(new Hc.ReferenceWithTimezone(n.start.date()),s);return new Hc.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,a)}};Vc.default=zc});var Wc=S(at=>{"use strict";var Tt=at&&at.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(at,"__esModule",{value:!0});at.createConfiguration=at.createCasualConfiguration=at.parseDate=at.parse=at.GB=at.strict=at.casual=void 0;var gS=Tt(mm()),_S=Tt(vm()),TS=Tt(Sm()),bS=Tt(Rm()),vS=Tt(Am()),wS=Tt(Nm()),kS=Tt(Im()),DS=Tt(Fm()),ES=Tt(Lm()),SS=Tt(Ym()),OS=Tt(qm()),MS=cn(),RS=Tt(ey()),xS=Tt(ty()),PS=Tt(iy()),AS=Tt(uy()),Kc=xr(),NS=Tt(ps()),CS=Tt(py()),IS=Tt(yy());at.casual=new Kc.Chrono(gy(!1));at.strict=new Kc.Chrono(Go(!0,!1));at.GB=new Kc.Chrono(Go(!1,!0));function FS(r,e,t){return at.casual.parse(r,e,t)}at.parse=FS;function LS(r,e,t){return at.casual.parseDate(r,e,t)}at.parseDate=LS;function gy(r=!1){let e=Go(!1,r);return e.parsers.unshift(new RS.default),e.parsers.unshift(new xS.default),e.parsers.unshift(new bS.default),e.parsers.unshift(new AS.default),e.parsers.unshift(new CS.default),e}at.createCasualConfiguration=gy;function Go(r=!0,e=!1){return MS.includeCommonConfiguration({parsers:[new NS.default(e),new gS.default,new _S.default,new TS.default,new PS.default,new vS.default,new wS.default,new kS.default(r),new DS.default(r),new ES.default(r)],refiners:[new IS.default,new OS.default,new SS.default]},r)}at.createConfiguration=Go});var _y=S(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var YS=ds(),Zc=class extends YS.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)}};Xc.default=Zc});var ta=S(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.parseTimeUnits=Ue.TIME_UNITS_PATTERN=Ue.parseYear=Ue.YEAR_PATTERN=Ue.parseNumberPattern=Ue.NUMBER_PATTERN=Ue.TIME_UNIT_DICTIONARY=Ue.INTEGER_WORD_DICTIONARY=Ue.MONTH_DICTIONARY=Ue.WEEKDAY_DICTIONARY=void 0;var Qc=Ie(),US=xt();Ue.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};Ue.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};Ue.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};Ue.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"};Ue.NUMBER_PATTERN=`(?:${Qc.matchAnyPattern(Ue.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function by(r){let e=r.toLowerCase();return Ue.INTEGER_WORD_DICTIONARY[e]!==void 0?Ue.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)}Ue.parseNumberPattern=by;Ue.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 WS(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 US.findMostLikelyADYear(e)}Ue.parseYear=WS;var vy=`(${Ue.NUMBER_PATTERN})\\s{0,5}(${Qc.matchAnyPattern(Ue.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Ty=new RegExp(vy,"i");Ue.TIME_UNITS_PATTERN=Qc.repeatedTimeunitPattern("",vy);function qS(r){let e={},t=r,n=Ty.exec(t);for(;n;)jS(e,n),t=t.substring(n[0].length),n=Ty.exec(t);return e}Ue.parseTimeUnits=qS;function jS(r,e){let t=by(e[1]),n=Ue.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var ky=S(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var wy=ta(),$S=Ie(),GS=Z(),BS=hs(),HS=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${$S.matchAnyPattern(wy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),zS=1,VS=3,KS=2,Jc=class extends GS.AbstractParserWithWordBoundaryChecking{innerPattern(){return HS}innerExtract(e,t){let n=t[KS].toLowerCase(),s=wy.WEEKDAY_DICTIONARY[n],a=t[zS],o=t[VS],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l.match(/letzte/)?c="last":l.match(/chste/)?c="next":l.match(/diese/)&&(c="this");let f=BS.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};ed.default=Jc});var Oy=S(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var Wn=pt(),ZS=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"),XS=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"),QS=2,Dy=3,Ey=4,Sy=5,ii=class{pattern(e){return ZS}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=ii.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),a=XS.exec(s);return a&&(n.end=ii.extractTimeComponent(n.start.clone(),a),n.end&&(n.text+=a[0])),n}static extractTimeComponent(e,t){let n=0,s=0,a=null;if(n=parseInt(t[QS]),t[Dy]!=null&&(s=parseInt(t[Dy])),s>=60||n>24)return null;if(n>=12&&(a=Wn.Meridiem.PM),t[Sy]!=null){if(n>12)return null;let o=t[Sy].toLowerCase();o.match(/morgen|vormittag/)&&(a=Wn.Meridiem.AM,n==12&&(n=0)),o.match(/nachmittag|abend/)&&(a=Wn.Meridiem.PM,n!=12&&(n+=12)),o.match(/nacht/)&&(n==12?(a=Wn.Meridiem.AM,n=0):n<6?a=Wn.Meridiem.AM:(a=Wn.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",Wn.Meridiem.AM):e.imply("meridiem",Wn.Meridiem.PM),t[Ey]!=null){let o=parseInt(t[Ey]);if(o>=60)return null;e.assign("second",o)}return e}};td.default=ii});var My=S(ra=>{"use strict";var JS=ra&&ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ra,"__esModule",{value:!0});var eO=JS(jr()),rd=class extends eO.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};ra.default=rd});var Ry=S(na=>{"use strict";var tO=na&&na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(na,"__esModule",{value:!0});var rO=tO(ln()),nd=class extends rO.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};na.default=nd});var sd=S(ia=>{"use strict";var nO=ia&&ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ia,"__esModule",{value:!0});var sO=nO(Re()),ms=pt(),iO=Z(),aO=yr(),oO=gr(),sa=class extends iO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=sO.default(e.refDate),s=t[2].toLowerCase(),a=e.createParsingComponents();return aO.implySimilarTime(a,n),sa.extractTimeComponents(a,s)}static extractTimeComponents(e,t){switch(t){case"morgen":e.imply("hour",6),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ms.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ms.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ms.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ms.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ms.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ms.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=oO.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ms.Meridiem.AM);break}return e}};ia.default=sa});var Ay=S(Pr=>{"use strict";var uO=Pr&&Pr.__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=Pr&&Pr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),cO=Pr&&Pr.__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)&&uO(e,r,t);return lO(e,r),e},Py=Pr&&Pr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pr,"__esModule",{value:!0});var dO=Py(Re()),fO=Z(),ys=yr(),hO=Py(sd()),xy=cO(fn()),pO=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),mO=1,yO=2,id=class extends fO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return pO}innerExtract(e,t){let n=dO.default(e.refDate),s=(t[mO]||"").toLowerCase(),a=(t[yO]||"").toLowerCase(),o=e.createParsingComponents();switch(s){case"jetzt":o=xy.now(e.reference);break;case"heute":o=xy.today(e.reference);break;case"morgen":ys.assignTheNextDay(o,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),ys.assignTheNextDay(o,n);break;case"gestern":n=n.add(-1,"day"),ys.assignSimilarDate(o,n),ys.implySimilarTime(o,n);break;case"vorgestern":n=n.add(-2,"day"),ys.assignSimilarDate(o,n),ys.implySimilarTime(o,n);break;default:s.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),ys.assignSimilarDate(o,n),o.imply("hour",0));break}return a&&(o=hO.default.extractTimeComponents(o,a)),o}};Pr.default=id});var Yy=S(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var gO=xt(),Fy=ta(),Ly=ta(),_O=Ie(),TO=Z(),bO=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${_O.matchAnyPattern(Fy.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Ly.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Ny=1,Cy=2,vO=3,Iy=4,ad=class extends TO.AbstractParserWithWordBoundaryChecking{innerPattern(){return bO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Fy.MONTH_DICTIONARY[t[vO].toLowerCase()],a=parseInt(t[Ny]);if(a>31)return t.index=t.index+t[Ny].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Iy]){let o=Ly.parseYear(t[Iy]);n.start.assign("year",o)}else{let o=gO.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Cy]){let o=parseInt(t[Cy]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};od.default=ad});var Uy=S(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});var Bo=ta(),wO=tt(),kO=Z(),DO=gr(),EO=Ie(),ud=class extends kO.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*)?(${Bo.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${EO.matchAnyPattern(Bo.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?Bo.parseNumberPattern(t[2]):1,s=Bo.TIME_UNIT_DICTIONARY[t[4].toLowerCase()],a={};a[s]=n;let o=t[1]||t[3]||"";if(o=o.toLowerCase(),!!o)return(/vor/.test(o)||/letzte/.test(o)||/vergangen/.test(o))&&(a=DO.reverseTimeUnits(a)),wO.ParsingComponents.createRelativeFromReference(e.reference,a)}};ld.default=ud});var jy=S(bt=>{"use strict";var Ar=bt&&bt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(bt,"__esModule",{value:!0});bt.createConfiguration=bt.createCasualConfiguration=bt.parseDate=bt.parse=bt.strict=bt.casual=void 0;var SO=cn(),Wy=xr(),OO=Ar(ps()),MO=Ar(Pc()),RO=Ar(_y()),xO=Ar(ky()),PO=Ar(Oy()),AO=Ar(My()),NO=Ar(Ry()),CO=Ar(Ay()),IO=Ar(sd()),FO=Ar(Yy()),LO=Ar(Uy());bt.casual=new Wy.Chrono(qy());bt.strict=new Wy.Chrono(cd(!0));function YO(r,e,t){return bt.casual.parse(r,e,t)}bt.parse=YO;function UO(r,e,t){return bt.casual.parseDate(r,e,t)}bt.parseDate=UO;function qy(r=!0){let e=cd(!1,r);return e.parsers.unshift(new IO.default),e.parsers.unshift(new CO.default),e.parsers.unshift(new LO.default),e}bt.createCasualConfiguration=qy;function cd(r=!0,e=!0){return SO.includeCommonConfiguration({parsers:[new MO.default,new OO.default(e),new RO.default,new PO.default,new FO.default,new xO.default],refiners:[new AO.default,new NO.default]},r)}bt.createConfiguration=cd});var Gy=S(Nr=>{"use strict";var WO=Nr&&Nr.__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]}),qO=Nr&&Nr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),jO=Nr&&Nr.__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)&&WO(e,r,t);return qO(e,r),e},$O=Nr&&Nr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Nr,"__esModule",{value:!0});var GO=$O(Re()),BO=pt(),HO=Z(),$y=yr(),Ho=jO(fn()),dd=class extends HO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=GO.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"maintenant":return Ho.now(e.reference);case"aujourd'hui":return Ho.today(e.reference);case"hier":return Ho.yesterday(e.reference);case"demain":return Ho.tomorrow(e.reference);default:s.match(/cette\s*nuit/)?($y.assignSimilarDate(a,n),a.imply("hour",22),a.imply("meridiem",BO.Meridiem.PM)):s.match(/la\s*veille/)&&(n=n.add(-1,"day"),$y.assignSimilarDate(a,n),a.imply("hour",0))}return a}};Nr.default=dd});var By=S(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var aa=pt(),zO=Z(),fd=class extends zO.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(),s=e.createParsingComponents();switch(n){case"apr\xE8s-midi":case"aprem":s.imply("hour",14),s.imply("minute",0),s.imply("meridiem",aa.Meridiem.PM);break;case"soir":s.imply("hour",18),s.imply("minute",0),s.imply("meridiem",aa.Meridiem.PM);break;case"matin":s.imply("hour",8),s.imply("minute",0),s.imply("meridiem",aa.Meridiem.AM);break;case"a midi":s.imply("hour",12),s.imply("minute",0),s.imply("meridiem",aa.Meridiem.AM);break;case"\xE0 minuit":s.imply("hour",0),s.imply("meridiem",aa.Meridiem.AM);break}return s}};hd.default=fd});var Hy=S(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});var VO=ds(),pd=class extends VO.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)}};md.default=pd});var zy=S(oa=>{"use strict";var KO=oa&&oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oa,"__esModule",{value:!0});var ZO=KO(ln()),yd=class extends ZO.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};oa.default=yd});var Vy=S(ua=>{"use strict";var XO=ua&&ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ua,"__esModule",{value:!0});var QO=XO(jr()),gd=class extends QO.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};ua.default=gd});var qn=S(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.parseTimeUnits=xe.TIME_UNITS_PATTERN=xe.parseYear=xe.YEAR_PATTERN=xe.parseOrdinalNumberPattern=xe.ORDINAL_NUMBER_PATTERN=xe.parseNumberPattern=xe.NUMBER_PATTERN=xe.TIME_UNIT_DICTIONARY=xe.INTEGER_WORD_DICTIONARY=xe.MONTH_DICTIONARY=xe.WEEKDAY_DICTIONARY=void 0;var _d=Ie();xe.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};xe.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};xe.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};xe.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"};xe.NUMBER_PATTERN=`(?:${_d.matchAnyPattern(xe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function Zy(r){let e=r.toLowerCase();return xe.INTEGER_WORD_DICTIONARY[e]!==void 0?xe.INTEGER_WORD_DICTIONARY[e]:e==="une"||e==="un"?1:e.match(/quelques?/)?3:e.match(/demi-?/)?.5:parseFloat(e)}xe.parseNumberPattern=Zy;xe.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function JO(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}xe.parseOrdinalNumberPattern=JO;xe.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 eM(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}xe.parseYear=eM;var Xy=`(${xe.NUMBER_PATTERN})\\s{0,5}(${_d.matchAnyPattern(xe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Ky=new RegExp(Xy,"i");xe.TIME_UNITS_PATTERN=_d.repeatedTimeunitPattern("",Xy);function tM(r){let e={},t=r,n=Ky.exec(t);for(;n;)rM(e,n),t=t.substring(n[0].length),n=Ky.exec(t);return e}xe.parseTimeUnits=tM;function rM(r,e){let t=Zy(e[1]),n=xe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Jy=S(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});var Qy=qn(),nM=Ie(),sM=Z(),iM=hs(),aM=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${nM.matchAnyPattern(Qy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),oM=1,uM=2,Td=class extends sM.AbstractParserWithWordBoundaryChecking{innerPattern(){return aM}innerExtract(e,t){let n=t[oM].toLowerCase(),s=Qy.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[uM];a=a||"",a=a.toLowerCase();let o=null;a=="dernier"?o="last":a=="prochain"&&(o="next");let l=iM.toDayJSWeekday(e.refDate,s,o);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};bd.default=Td});var ng=S(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});var la=pt(),lM=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"),cM=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"),dM=2,eg=3,tg=4,rg=5,ai=class{pattern(e){return lM}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=ai.extractTimeComponent(n.start.clone(),t),!n.start))return t.index+=t[0].length,null;let s=e.text.substring(t.index+t[0].length),a=cM.exec(s);return a&&(n.end=ai.extractTimeComponent(n.start.clone(),a),n.end&&(n.text+=a[0])),n}static extractTimeComponent(e,t){let n=0,s=0,a=null;if(n=parseInt(t[dM]),t[eg]!=null&&(s=parseInt(t[eg])),s>=60||n>24)return null;if(n>=12&&(a=la.Meridiem.PM),t[rg]!=null){if(n>12)return null;let o=t[rg][0].toLowerCase();o=="a"&&(a=la.Meridiem.AM,n==12&&(n=0)),o=="p"&&(a=la.Meridiem.PM,n!=12&&(n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",la.Meridiem.AM):e.imply("meridiem",la.Meridiem.PM),t[tg]!=null){let o=parseInt(t[tg]);if(o>=60)return null;e.assign("second",o)}return e}};vd.default=ai});var lg=S(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});var fM=xt(),og=qn(),ug=qn(),zo=qn(),hM=Ie(),pM=Z(),mM=new RegExp(`(?:on\\s*?)?(${zo.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${zo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${hM.matchAnyPattern(og.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${ug.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),sg=1,ig=2,yM=3,ag=4,wd=class extends pM.AbstractParserWithWordBoundaryChecking{innerPattern(){return mM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=og.MONTH_DICTIONARY[t[yM].toLowerCase()],a=zo.parseOrdinalNumberPattern(t[sg]);if(a>31)return t.index=t.index+t[sg].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[ag]){let o=ug.parseYear(t[ag]);n.start.assign("year",o)}else{let o=fM.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[ig]){let o=zo.parseOrdinalNumberPattern(t[ig]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};kd.default=wd});var dg=S(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});var cg=qn(),gM=tt(),_M=Z(),TM=gr(),Dd=class extends _M.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${cg.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=cg.parseTimeUnits(t[1]),s=TM.reverseTimeUnits(n);return gM.ParsingComponents.createRelativeFromReference(e.reference,s)}};Ed.default=Dd});var hg=S(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});var fg=qn(),bM=tt(),vM=Z(),Sd=class extends vM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${fg.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=fg.parseTimeUnits(t[1]);return bM.ParsingComponents.createRelativeFromReference(e.reference,n)}};Od.default=Sd});var pg=S(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var Vo=qn(),wM=tt(),kM=Z(),DM=gr(),EM=Ie(),Md=class extends kM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${Vo.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${EM.matchAnyPattern(Vo.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]?Vo.parseNumberPattern(t[1]):1,s=Vo.TIME_UNIT_DICTIONARY[t[3].toLowerCase()],a={};a[s]=n;let o=t[2]||t[4]||"";if(o=o.toLowerCase(),!!o)return(/derni[eè]re?s?/.test(o)||/pass[ée]e?s?/.test(o)||/pr[ée]c[ée]dents?/.test(o))&&(a=DM.reverseTimeUnits(a)),wM.ParsingComponents.createRelativeFromReference(e.reference,a)}};Rd.default=Md});var gg=S(vt=>{"use strict";var _r=vt&&vt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vt,"__esModule",{value:!0});vt.createConfiguration=vt.createCasualConfiguration=vt.parseDate=vt.parse=vt.strict=vt.casual=void 0;var SM=cn(),mg=xr(),OM=_r(Gy()),MM=_r(By()),RM=_r(ps()),xM=_r(Hy()),PM=_r(zy()),AM=_r(Vy()),NM=_r(Jy()),CM=_r(ng()),IM=_r(lg()),FM=_r(dg()),LM=_r(hg()),YM=_r(pg());vt.casual=new mg.Chrono(yg());vt.strict=new mg.Chrono(xd(!0));function UM(r,e,t){return vt.casual.parse(r,e,t)}vt.parse=UM;function WM(r,e,t){return vt.casual.parseDate(r,e,t)}vt.parseDate=WM;function yg(r=!0){let e=xd(!1,r);return e.parsers.unshift(new OM.default),e.parsers.unshift(new MM.default),e.parsers.unshift(new YM.default),e}vt.createCasualConfiguration=yg;function xd(r=!0,e=!0){return SM.includeCommonConfiguration({parsers:[new RM.default(e),new IM.default,new xM.default,new CM.default,new FM.default,new LM.default,new NM.default],refiners:[new PM.default,new AM.default]},r)}vt.createConfiguration=xd});var _g=S(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.toHankaku=void 0;function qM(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,jM)}Ko.toHankaku=qM;function jM(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var bg=S(ca=>{"use strict";var $M=ca&&ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ca,"__esModule",{value:!0});var Pd=_g(),GM=xt(),BM=$M(Re()),HM=/(?:(?:([同今本])|((昭和|平成|令和)?([0-9-]{1,4}|元)))年\s*)?([0-9-]{1,2})月\s*([0-9-]{1,2})日/i,Tg=1,zM=2,Ad=3,VM=4,KM=5,ZM=6,Nd=class{pattern(){return HM}extract(e,t){let n=parseInt(Pd.toHankaku(t[KM])),s=parseInt(Pd.toHankaku(t[ZM])),a=e.createParsingComponents({day:s,month:n});if(t[Tg]&&t[Tg].match("\u540C|\u4ECA|\u672C")){let o=BM.default(e.refDate);a.assign("year",o.year())}if(t[zM]){let o=t[VM],l=o=="\u5143"?1:parseInt(Pd.toHankaku(o));t[Ad]=="\u4EE4\u548C"?l+=2018:t[Ad]=="\u5E73\u6210"?l+=1988:t[Ad]=="\u662D\u548C"&&(l+=1925),a.assign("year",l)}else{let o=GM.findYearClosestToRef(e.refDate,s,n);a.imply("year",o)}return a}};ca.default=Nd});var vg=S(da=>{"use strict";var XM=da&&da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(da,"__esModule",{value:!0});var QM=XM(jr()),Cd=class extends QM.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};da.default=Cd});var kg=S(Cr=>{"use strict";var JM=Cr&&Cr.__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=Cr&&Cr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),tR=Cr&&Cr.__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)&&JM(e,r,t);return eR(e,r),e},rR=Cr&&Cr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cr,"__esModule",{value:!0});var nR=rR(Re()),wg=pt(),Id=tR(fn()),sR=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Fd=class{pattern(){return sR}extract(e,t){let n=t[0],s=nR.default(e.refDate),a=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Id.yesterday(e.reference);case"\u660E\u65E5":return Id.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Id.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(a.imply("hour",22),a.assign("meridiem",wg.Meridiem.PM)):n.match("\u4ECA\u671D")&&(a.imply("hour",6),a.assign("meridiem",wg.Meridiem.AM)),a.assign("day",s.date()),a.assign("month",s.month()+1),a.assign("year",s.year()),a}};Cr.default=Fd});var Sg=S(wt=>{"use strict";var Ld=wt&&wt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wt,"__esModule",{value:!0});wt.createConfiguration=wt.createCasualConfiguration=wt.parseDate=wt.parse=wt.strict=wt.casual=void 0;var iR=Ld(bg()),aR=Ld(vg()),oR=Ld(kg()),Dg=xr();wt.casual=new Dg.Chrono(Eg());wt.strict=new Dg.Chrono(Yd());function uR(r,e,t){return wt.casual.parse(r,e,t)}wt.parse=uR;function lR(r,e,t){return wt.casual.parseDate(r,e,t)}wt.parseDate=lR;function Eg(){let r=Yd();return r.parsers.unshift(new oR.default),r}wt.createCasualConfiguration=Eg;function Yd(){return{parsers:[new iR.default],refiners:[new aR.default]}}wt.createConfiguration=Yd});var Zo=S(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.parseYear=Gr.YEAR_PATTERN=Gr.MONTH_DICTIONARY=Gr.WEEKDAY_DICTIONARY=void 0;Gr.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};Gr.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};Gr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function cR(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)}Gr.parseYear=cR});var Mg=S(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});var Og=Zo(),dR=Ie(),fR=Z(),hR=hs(),pR=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${dR.matchAnyPattern(Og.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),mR=1,yR=2,gR=3,Ud=class extends fR.AbstractParserWithWordBoundaryChecking{innerPattern(){return pR}innerExtract(e,t){let n=t[yR].toLowerCase(),s=Og.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[mR],o=t[gR],l=a||o||"";l=l.toLowerCase();let c=null;l=="passado"?c="this":l=="pr\xF3ximo"||l=="proximo"?c="next":l=="este"&&(c="this");let f=hR.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};Wd.default=Ud});var Rg=S(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});var _R=ds(),qd=class extends _R.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};jd.default=qd});var xg=S(fa=>{"use strict";var TR=fa&&fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fa,"__esModule",{value:!0});var bR=TR(ln()),$d=class extends bR.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};fa.default=$d});var Pg=S(ha=>{"use strict";var vR=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var wR=vR(jr()),Gd=class extends wR.default{patternBetween(){return/^\s*(?:-)\s*$/i}};ha.default=Gd});var Lg=S(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});var kR=xt(),Ig=Zo(),Fg=Zo(),DR=Ie(),ER=Z(),SR=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*)(${DR.matchAnyPattern(Ig.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Fg.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Ag=1,Ng=2,OR=3,Cg=4,Bd=class extends ER.AbstractParserWithWordBoundaryChecking{innerPattern(){return SR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Ig.MONTH_DICTIONARY[t[OR].toLowerCase()],a=parseInt(t[Ag]);if(a>31)return t.index=t.index+t[Ag].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Cg]){let o=Fg.parseYear(t[Cg]);n.start.assign("year",o)}else{let o=kR.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Ng]){let o=parseInt(t[Ng]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Hd.default=Bd});var Yg=S(hn=>{"use strict";var MR=hn&&hn.__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]}),RR=hn&&hn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),xR=hn&&hn.__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)&&MR(e,r,t);return RR(e,r),e};Object.defineProperty(hn,"__esModule",{value:!0});var PR=Z(),Xo=xR(fn()),zd=class extends PR.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"agora":return Xo.now(e.reference);case"hoje":return Xo.today(e.reference);case"amanha":case"amanh\xE3":return Xo.tomorrow(e.reference);case"ontem":return Xo.yesterday(e.reference)}return s}};hn.default=zd});var Ug=S(pa=>{"use strict";var AR=pa&&pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pa,"__esModule",{value:!0});var Qo=pt(),NR=Z(),CR=yr(),IR=AR(Re()),Vd=class extends NR.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=IR.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":s.imply("meridiem",Qo.Meridiem.PM),s.imply("hour",15);break;case"noite":s.imply("meridiem",Qo.Meridiem.PM),s.imply("hour",22);break;case"manha":case"manh\xE3":s.imply("meridiem",Qo.Meridiem.AM),s.imply("hour",6);break;case"meia-noite":CR.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"meio-dia":s.imply("meridiem",Qo.Meridiem.AM),s.imply("hour",12);break}return s}};pa.default=Vd});var jg=S(kt=>{"use strict";var jn=kt&&kt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(kt,"__esModule",{value:!0});kt.createConfiguration=kt.createCasualConfiguration=kt.parseDate=kt.parse=kt.strict=kt.casual=void 0;var FR=cn(),Wg=xr(),LR=jn(ps()),YR=jn(Mg()),UR=jn(Rg()),WR=jn(xg()),qR=jn(Pg()),jR=jn(Lg()),$R=jn(Yg()),GR=jn(Ug());kt.casual=new Wg.Chrono(qg());kt.strict=new Wg.Chrono(Kd(!0));function BR(r,e,t){return kt.casual.parse(r,e,t)}kt.parse=BR;function HR(r,e,t){return kt.casual.parseDate(r,e,t)}kt.parseDate=HR;function qg(r=!0){let e=Kd(!1,r);return e.parsers.push(new $R.default),e.parsers.push(new GR.default),e}kt.createCasualConfiguration=qg;function Kd(r=!0,e=!0){return FR.includeCommonConfiguration({parsers:[new LR.default(e),new YR.default,new UR.default,new jR.default],refiners:[new WR.default,new qR.default]},r)}kt.createConfiguration=Kd});var $g=S(ma=>{"use strict";var zR=ma&&ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ma,"__esModule",{value:!0});var VR=zR(jr()),Zd=class extends VR.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};ma.default=Zd});var Gg=S(ya=>{"use strict";var KR=ya&&ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ya,"__esModule",{value:!0});var ZR=KR(ln()),Xd=class extends ZR.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};ya.default=Xd});var Bg=S(pn=>{"use strict";var XR=pn&&pn.__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]}),QR=pn&&pn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),JR=pn&&pn.__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)&&XR(e,r,t);return QR(e,r),e};Object.defineProperty(pn,"__esModule",{value:!0});var ex=Z(),Jo=JR(fn()),Qd=class extends ex.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(e,t){let n=t[0].toLowerCase(),s=e.createParsingComponents();switch(n){case"nu":return Jo.now(e.reference);case"vandaag":return Jo.today(e.reference);case"morgen":case"morgend":return Jo.tomorrow(e.reference);case"gisteren":return Jo.yesterday(e.reference)}return s}};pn.default=Qd});var Hg=S(ga=>{"use strict";var tx=ga&&ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ga,"__esModule",{value:!0});var eu=pt(),rx=Z(),nx=tx(Re()),sx=yr(),ix=1,ax=2,Jd=class extends rx.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=nx.default(e.refDate),s=e.createParsingComponents();switch(t[ix]==="deze"&&(s.assign("day",e.refDate.getDate()),s.assign("month",e.refDate.getMonth()+1),s.assign("year",e.refDate.getFullYear())),t[ax].toLowerCase()){case"namiddag":case"'s namiddags":s.imply("meridiem",eu.Meridiem.PM),s.imply("hour",15);break;case"avond":case"'s avonds'":s.imply("meridiem",eu.Meridiem.PM),s.imply("hour",20);break;case"middernacht":sx.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"ochtend":case"'s ochtends":s.imply("meridiem",eu.Meridiem.AM),s.imply("hour",6);break;case"middag":case"'s middags":s.imply("meridiem",eu.Meridiem.AM),s.imply("hour",12);break}return s}};ga.default=Jd});var rr=S(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.parseTimeUnits=ve.TIME_UNITS_PATTERN=ve.parseYear=ve.YEAR_PATTERN=ve.parseOrdinalNumberPattern=ve.ORDINAL_NUMBER_PATTERN=ve.parseNumberPattern=ve.NUMBER_PATTERN=ve.TIME_UNIT_DICTIONARY=ve.ORDINAL_WORD_DICTIONARY=ve.INTEGER_WORD_DICTIONARY=ve.MONTH_DICTIONARY=ve.WEEKDAY_DICTIONARY=void 0;var tu=Ie(),ox=xt();ve.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};ve.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};ve.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};ve.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};ve.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"};ve.NUMBER_PATTERN=`(?:${tu.matchAnyPattern(ve.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function Vg(r){let e=r.toLowerCase();return ve.INTEGER_WORD_DICTIONARY[e]!==void 0?ve.INTEGER_WORD_DICTIONARY[e]:e==="paar"?2:e==="half"||e.match(/halve?/)?.5:parseFloat(e.replace(",","."))}ve.parseNumberPattern=Vg;ve.ORDINAL_NUMBER_PATTERN=`(?:${tu.matchAnyPattern(ve.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function ux(r){let e=r.toLowerCase();return ve.ORDINAL_WORD_DICTIONARY[e]!==void 0?ve.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:ste|de)$/i,""),parseInt(e))}ve.parseOrdinalNumberPattern=ux;ve.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function lx(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 ox.findMostLikelyADYear(e)}ve.parseYear=lx;var Kg=`(${ve.NUMBER_PATTERN})\\s{0,5}(${tu.matchAnyPattern(ve.TIME_UNIT_DICTIONARY)})\\s{0,5}`,zg=new RegExp(Kg,"i");ve.TIME_UNITS_PATTERN=tu.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Kg);function cx(r){let e={},t=r,n=zg.exec(t);for(;n;)dx(e,n),t=t.substring(n[0].length),n=zg.exec(t);return e}ve.parseTimeUnits=cx;function dx(r,e){let t=Vg(e[1]),n=ve.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Xg=S(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});var Zg=rr(),fx=tt(),hx=Z(),ef=class extends hx.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Zg.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=Zg.parseTimeUnits(t[1]);return fx.ParsingComponents.createRelativeFromReference(e.reference,n)}};tf.default=ef});var Jg=S(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var Qg=rr(),px=Ie(),mx=Z(),yx=hs(),gx=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${px.matchAnyPattern(Qg.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),_x=1,Tx=2,bx=3,rf=class extends mx.AbstractParserWithWordBoundaryChecking{innerPattern(){return gx}innerExtract(e,t){let n=t[Tx].toLowerCase(),s=Qg.WEEKDAY_DICTIONARY[n],a=t[_x],o=t[bx],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="vorige"?c="last":l=="volgende"?c="next":l=="deze"&&(c="this");let f=yx.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};nf.default=rf});var i_=S(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});var vx=xt(),n_=rr(),ru=rr(),s_=rr(),wx=Ie(),kx=Z(),Dx=new RegExp(`(?:on\\s*?)?(${ru.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${ru.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+wx.matchAnyPattern(n_.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${s_.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Ex=3,e_=1,t_=2,r_=4,sf=class extends kx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Dx}innerExtract(e,t){let n=n_.MONTH_DICTIONARY[t[Ex].toLowerCase()],s=ru.parseOrdinalNumberPattern(t[e_]);if(s>31)return t.index=t.index+t[e_].length,null;let a=e.createParsingComponents({day:s,month:n});if(t[r_]){let c=s_.parseYear(t[r_]);a.assign("year",c)}else{let c=vx.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[t_])return a;let o=ru.parseOrdinalNumberPattern(t[t_]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};af.default=sf});var l_=S(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var o_=rr(),Sx=xt(),Ox=Ie(),u_=rr(),Mx=Z(),Rx=new RegExp(`(${Ox.matchAnyPattern(o_.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${u_.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),xx=1,a_=2,of=class extends Mx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Rx}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let s=t[xx],a=o_.MONTH_DICTIONARY[s.toLowerCase()];if(n.assign("month",a),t[a_]){let o=u_.parseYear(t[a_]);n.assign("year",o)}else{let o=Sx.findYearClosestToRef(e.refDate,1,a);n.imply("year",o)}return n}};uf.default=of});var c_=S(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var Px=Z(),Ax=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Nx=1,Cx=2,lf=class extends Px.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ax}innerExtract(e,t){let n=parseInt(t[Cx]),s=parseInt(t[Nx]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};cf.default=lf});var d_=S(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});var Ix=ds(),df=class extends Ix.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)}};ff.default=df});var p_=S(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});var h_=rr(),Fx=Ie(),Lx=Z(),Yx=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Fx.matchAnyPattern(h_.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Ux=1,Wx=2,f_=3,qx=4,hf=class extends Lx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Yx}innerExtract(e,t){let n=t[f_]?parseInt(t[f_]):h_.MONTH_DICTIONARY[t[Wx].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[Ux]);return{day:parseInt(t[qx]),month:n,year:s}}};pf.default=hf});var m_=S(_a=>{"use strict";var jx=_a&&_a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_a,"__esModule",{value:!0});var $x=Z(),nu=pt(),mf=yr(),Gx=jx(Re()),Bx=1,Hx=2,yf=class extends $x.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[Bx].toLowerCase(),s=t[Hx].toLowerCase(),a=e.createParsingComponents(),o=Gx.default(e.refDate);switch(n){case"gisteren":mf.assignSimilarDate(a,o.add(-1,"day"));break;case"van":mf.assignSimilarDate(a,o);break;case"morgen":mf.assignTheNextDay(a,o);break}switch(s){case"ochtend":a.imply("meridiem",nu.Meridiem.AM),a.imply("hour",6);break;case"middag":a.imply("meridiem",nu.Meridiem.AM),a.imply("hour",12);break;case"namiddag":a.imply("meridiem",nu.Meridiem.PM),a.imply("hour",15);break;case"avond":a.imply("meridiem",nu.Meridiem.PM),a.imply("hour",20);break}return a}};_a.default=yf});var g_=S(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var y_=rr(),zx=tt(),Vx=Z(),Kx=gr(),Zx=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${y_.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),gf=class extends Vx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Zx}innerExtract(e,t){let n=t[1].toLowerCase(),s=y_.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":s=Kx.reverseTimeUnits(s);break}return zx.ParsingComponents.createRelativeFromReference(e.reference,s)}};_f.default=gf});var b_=S(Ta=>{"use strict";var Xx=Ta&&Ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ta,"__esModule",{value:!0});var T_=rr(),__=tt(),Qx=Xx(Re()),Jx=Z(),eP=Ie(),tP=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${eP.matchAnyPattern(T_.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),rP=1,nP=2,Tf=class extends Jx.AbstractParserWithWordBoundaryChecking{innerPattern(){return tP}innerExtract(e,t){let n=t[rP].toLowerCase(),s=t[nP].toLowerCase(),a=T_.TIME_UNIT_DICTIONARY[s];if(n=="volgend"||n=="volgende"||n=="komende"){let c={};return c[a]=1,__.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="afgelopen"||n=="vorige"){let c={};return c[a]=-1,__.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=Qx.default(e.reference.instant);return s.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):s.match(/maand/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):s.match(/jaar/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};Ta.default=Tf});var v_=S(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var vf=rr(),sP=tt(),iP=Z(),aP=gr(),oP=new RegExp("("+vf.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),uP=new RegExp("("+vf.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),bf=class extends iP.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?uP:oP}innerExtract(e,t){let n=vf.parseTimeUnits(t[1]),s=aP.reverseTimeUnits(n);return sP.ParsingComponents.createRelativeFromReference(e.reference,s)}};wf.default=bf});var w_=S(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});var Df=rr(),lP=tt(),cP=Z(),dP=new RegExp("("+Df.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),fP=new RegExp("("+Df.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),hP=1,kf=class extends cP.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?fP:dP}innerExtract(e,t){let n=Df.parseTimeUnits(t[hP]);return lP.ParsingComponents.createRelativeFromReference(e.reference,n)}};Ef.default=kf});var S_=S(Dt=>{"use strict";var At=Dt&&Dt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.createConfiguration=Dt.createCasualConfiguration=Dt.parseDate=Dt.parse=Dt.strict=Dt.casual=void 0;var pP=cn(),k_=xr(),mP=At($g()),yP=At(Gg()),gP=At(Bg()),_P=At(Hg()),TP=At(ps()),bP=At(Xg()),vP=At(Jg()),wP=At(i_()),D_=At(l_()),kP=At(c_()),DP=At(d_()),EP=At(p_()),SP=At(m_()),OP=At(g_()),MP=At(b_()),RP=At(v_()),xP=At(w_());Dt.casual=new k_.Chrono(E_());Dt.strict=new k_.Chrono(Sf(!0));function PP(r,e,t){return Dt.casual.parse(r,e,t)}Dt.parse=PP;function AP(r,e,t){return Dt.casual.parseDate(r,e,t)}Dt.parseDate=AP;function E_(r=!0){let e=Sf(!1,r);return e.parsers.unshift(new gP.default),e.parsers.unshift(new _P.default),e.parsers.unshift(new SP.default),e.parsers.unshift(new D_.default),e.parsers.unshift(new MP.default),e.parsers.unshift(new OP.default),e}Dt.createCasualConfiguration=E_;function Sf(r=!0,e=!0){return pP.includeCommonConfiguration({parsers:[new TP.default(e),new bP.default,new wP.default,new D_.default,new vP.default,new EP.default,new kP.default,new DP.default(r),new RP.default(r),new xP.default(r)],refiners:[new yP.default,new mP.default]},r)}Dt.createConfiguration=Sf});var x_=S(ba=>{"use strict";var NP=ba&&ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ba,"__esModule",{value:!0});var CP=NP(Re()),IP=Z(),FP=1,O_=2,LP=3,M_=4,R_=5,YP=6,Of=class extends IP.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,s=e.createParsingResult(n,t[0]),a=CP.default(e.refDate),o=a;if(t[FP])s.start.imply("hour",a.hour()),s.start.imply("minute",a.minute()),s.start.imply("second",a.second()),s.start.imply("millisecond",a.millisecond());else if(t[O_]){let l=t[O_],c=t[LP];l=="\u660E"||l=="\u807D"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u5F8C"?o=o.add(2,"day"):l=="\u5927\u5F8C"&&(o=o.add(3,"day")),c=="\u65E9"||c=="\u671D"?s.start.imply("hour",6):c=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[M_]){let c=t[M_][0];c=="\u65E9"||c=="\u671D"||c=="\u4E0A"?s.start.imply("hour",6):c=="\u4E0B"||c=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):c=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):c=="\u51CC"&&s.start.imply("hour",0)}else if(t[R_]){let l=t[R_];l=="\u660E"||l=="\u807D"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u5F8C"?o=o.add(2,"day"):l=="\u5927\u5F8C"&&(o=o.add(3,"day"));let c=t[YP];if(c){let f=c[0];f=="\u65E9"||f=="\u671D"||f=="\u4E0A"?s.start.imply("hour",6):f=="\u4E0B"||f=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):f=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):f=="\u591C"||f=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):f=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",o.date()),s.start.assign("month",o.month()+1),s.start.assign("year",o.year()),s}};ba.default=Of});var oi=S(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.zhStringToYear=Vt.zhStringToNumber=Vt.WEEKDAY_OFFSET=Vt.NUMBER=void 0;Vt.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};Vt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function UP(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?Vt.NUMBER[n]:e*Vt.NUMBER[n]:e+=Vt.NUMBER[n]}return e}Vt.zhStringToNumber=UP;function WP(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+Vt.NUMBER[n]}return parseInt(e)}Vt.zhStringToYear=WP});var A_=S(va=>{"use strict";var qP=va&&va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(va,"__esModule",{value:!0});var jP=qP(Re()),$P=Z(),gs=oi(),Mf=1,P_=2,Rf=3,xf=class extends $P.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(gs.NUMBER).join("")+"]{4}|["+Object.keys(gs.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(gs.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(gs.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=jP.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[P_]);if(isNaN(a)&&(a=gs.zhStringToNumber(t[P_])),s.start.assign("month",a),t[Rf]){let o=parseInt(t[Rf]);isNaN(o)&&(o=gs.zhStringToNumber(t[Rf])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[Mf]){let o=parseInt(t[Mf]);isNaN(o)&&(o=gs.zhStringToYear(t[Mf])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};va.default=xf});var C_=S(wa=>{"use strict";var GP=wa&&wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wa,"__esModule",{value:!0});var BP=GP(Re()),HP=Z(),N_=oi(),zP=new RegExp("(\\d+|["+Object.keys(N_.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"),Pf=1,VP=2,Af=class extends HP.AbstractParserWithWordBoundaryChecking{innerPattern(){return zP}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[Pf]);if(isNaN(s)&&(s=N_.zhStringToNumber(t[Pf])),isNaN(s)){let c=t[Pf];if(c==="\u5E7E")s=3;else if(c==="\u534A")s=.5;else return null}let a=BP.default(e.refDate),l=t[VP][0];return l.match(/[日天星禮月年]/)?(l=="\u65E5"||l=="\u5929"?a=a.add(s,"d"):l=="\u661F"||l=="\u79AE"?a=a.add(s*7,"d"):l=="\u6708"?a=a.add(s,"month"):l=="\u5E74"&&(a=a.add(s,"year")),n.start.assign("year",a.year()),n.start.assign("month",a.month()+1),n.start.assign("day",a.date()),n):(l=="\u79D2"?a=a.add(s,"second"):l=="\u5206"?a=a.add(s,"minute"):(l=="\u5C0F"||l=="\u9418")&&(a=a.add(s,"hour")),n.start.imply("year",a.year()),n.start.imply("month",a.month()+1),n.start.imply("day",a.date()),n.start.assign("hour",a.hour()),n.start.assign("minute",a.minute()),n.start.assign("second",a.second()),n)}};wa.default=Af});var F_=S(ka=>{"use strict";var KP=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0});var ZP=KP(Re()),XP=Z(),I_=oi(),QP=new RegExp("(?<prefix>\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(I_.WEEKDAY_OFFSET).join("|")+")"),Nf=class extends XP.AbstractParserWithWordBoundaryChecking{innerPattern(){return QP}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=I_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=null,l=t.groups.prefix;l=="\u4E0A"?o="last":l=="\u4E0B"?o="next":(l=="\u4ECA"||l=="\u9019"||l=="\u5462")&&(o="this");let c=ZP.default(e.refDate),f=!1,p=c.day();return o=="last"||o=="past"?(c=c.day(a-7),f=!0):o=="next"?(c=c.day(a+7),f=!0):o=="this"?c=c.day(a):Math.abs(a-7-p)<Math.abs(a-p)?c=c.day(a-7):Math.abs(a+7-p)<Math.abs(a-p)?c=c.day(a+7):c=c.day(a),n.start.assign("weekday",a),f?(n.start.assign("day",c.date()),n.start.assign("month",c.month()+1),n.start.assign("year",c.year())):(n.start.imply("day",c.date()),n.start.imply("month",c.month()+1),n.start.imply("year",c.year())),n}};ka.default=Nf});var L_=S(Da=>{"use strict";var JP=Da&&Da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Da,"__esModule",{value:!0});var eA=JP(Re()),tA=Z(),br=oi(),rA=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(br.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(br.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(br.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),nA=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(br.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(br.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(br.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),su=1,iu=2,au=3,ou=4,uu=5,lu=6,Tr=7,ui=8,cu=9,Cf=class extends tA.AbstractParserWithWordBoundaryChecking{innerPattern(){return rA}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=eA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[su]){var o=t[su];o=="\u660E"||o=="\u807D"?n.hour()>1&&a.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a.add(-1,"day"):o=="\u524D"?a.add(-2,"day"):o=="\u5927\u524D"?a.add(-3,"day"):o=="\u5F8C"?a.add(2,"day"):o=="\u5927\u5F8C"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else if(t[ou]){var l=t[ou];l=="\u660E"||l=="\u807D"?a.add(1,"day"):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?a.add(-1,"day"):l=="\u524D"?a.add(-2,"day"):l=="\u5927\u524D"?a.add(-3,"day"):l=="\u5F8C"?a.add(2,"day"):l=="\u5927\u5F8C"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else s.start.imply("day",a.date()),s.start.imply("month",a.month()+1),s.start.imply("year",a.year());let c=0,f=0,p=-1;if(t[ui]){var g=parseInt(t[ui]);if(isNaN(g)&&(g=br.zhStringToNumber(t[ui])),g>=60)return null;s.start.assign("second",g)}if(c=parseInt(t[lu]),isNaN(c)&&(c=br.zhStringToNumber(t[lu])),t[Tr]?t[Tr]=="\u534A"?f=30:t[Tr]=="\u6B63"||t[Tr]=="\u6574"?f=0:(f=parseInt(t[Tr]),isNaN(f)&&(f=br.zhStringToNumber(t[Tr]))):c>100&&(f=c%100,c=Math.floor(c/100)),f>=60||c>24)return null;if(c>=12&&(p=1),t[cu]){if(c>12)return null;var T=t[cu][0].toLowerCase();T=="a"&&(p=0,c==12&&(c=0)),T=="p"&&(p=1,c!=12&&(c+=12))}else if(t[iu]){var O=t[iu],v=O[0];v=="\u671D"||v=="\u65E9"?(p=0,c==12&&(c=0)):v=="\u665A"&&(p=1,c!=12&&(c+=12))}else if(t[au]){var R=t[au],C=R[0];C=="\u4E0A"||C=="\u671D"||C=="\u65E9"||C=="\u51CC"?(p=0,c==12&&(c=0)):(C=="\u4E0B"||C=="\u664F"||C=="\u665A")&&(p=1,c!=12&&(c+=12))}else if(t[uu]){var $=t[uu],B=$[0];B=="\u4E0A"||B=="\u671D"||B=="\u65E9"||B=="\u51CC"?(p=0,c==12&&(c=0)):(B=="\u4E0B"||B=="\u664F"||B=="\u665A")&&(p=1,c!=12&&(c+=12))}if(s.start.assign("hour",c),s.start.assign("minute",f),p>=0?s.start.assign("meridiem",p):c<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=nA.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let W=a.clone();if(s.end=e.createParsingComponents(),t[su]){var o=t[su];o=="\u660E"||o=="\u807D"?n.hour()>1&&W.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?W.add(-1,"day"):o=="\u524D"?W.add(-2,"day"):o=="\u5927\u524D"?W.add(-3,"day"):o=="\u5F8C"?W.add(2,"day"):o=="\u5927\u5F8C"&&W.add(3,"day"),s.end.assign("day",W.date()),s.end.assign("month",W.month()+1),s.end.assign("year",W.year())}else if(t[ou]){var l=t[ou];l=="\u660E"||l=="\u807D"?W.add(1,"day"):l=="\u6628"||l=="\u5C0B"||l=="\u7434"?W.add(-1,"day"):l=="\u524D"?W.add(-2,"day"):l=="\u5927\u524D"?W.add(-3,"day"):l=="\u5F8C"?W.add(2,"day"):l=="\u5927\u5F8C"&&W.add(3,"day"),s.end.assign("day",W.date()),s.end.assign("month",W.month()+1),s.end.assign("year",W.year())}else s.end.imply("day",W.date()),s.end.imply("month",W.month()+1),s.end.imply("year",W.year());if(c=0,f=0,p=-1,t[ui]){var g=parseInt(t[ui]);if(isNaN(g)&&(g=br.zhStringToNumber(t[ui])),g>=60)return null;s.end.assign("second",g)}if(c=parseInt(t[lu]),isNaN(c)&&(c=br.zhStringToNumber(t[lu])),t[Tr]?t[Tr]=="\u534A"?f=30:t[Tr]=="\u6B63"||t[Tr]=="\u6574"?f=0:(f=parseInt(t[Tr]),isNaN(f)&&(f=br.zhStringToNumber(t[Tr]))):c>100&&(f=c%100,c=Math.floor(c/100)),f>=60||c>24)return null;if(c>=12&&(p=1),t[cu]){if(c>12)return null;var T=t[cu][0].toLowerCase();T=="a"&&(p=0,c==12&&(c=0)),T=="p"&&(p=1,c!=12&&(c+=12)),s.start.isCertain("meridiem")||(p==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[iu]){var O=t[iu],v=O[0];v=="\u671D"||v=="\u65E9"?(p=0,c==12&&(c=0)):v=="\u665A"&&(p=1,c!=12&&(c+=12))}else if(t[au]){var R=t[au],C=R[0];C=="\u4E0A"||C=="\u671D"||C=="\u65E9"||C=="\u51CC"?(p=0,c==12&&(c=0)):(C=="\u4E0B"||C=="\u664F"||C=="\u665A")&&(p=1,c!=12&&(c+=12))}else if(t[uu]){var $=t[uu],B=$[0];B=="\u4E0A"||B=="\u671D"||B=="\u65E9"||B=="\u51CC"?(p=0,c==12&&(c=0)):(B=="\u4E0B"||B=="\u664F"||B=="\u665A")&&(p=1,c!=12&&(c+=12))}return s.text=s.text+t[0],s.end.assign("hour",c),s.end.assign("minute",f),p>=0?s.end.assign("meridiem",p):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>c?s.end.imply("meridiem",0):c>12&&s.end.imply("meridiem",1),s.end.date().getTime()<s.start.date().getTime()&&s.end.imply("day",s.end.get("day")+1),s}};Da.default=Cf});var U_=S(Ea=>{"use strict";var sA=Ea&&Ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ea,"__esModule",{value:!0});var iA=sA(Re()),aA=Z(),Y_=oi(),oA=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(Y_.WEEKDAY_OFFSET).join("|")+")"),If=class extends aA.AbstractParserWithWordBoundaryChecking{innerPattern(){return oA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=Y_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=iA.default(e.refDate),l=!1,c=o.day();return Math.abs(a-7-c)<Math.abs(a-c)?o=o.day(a-7):Math.abs(a+7-c)<Math.abs(a-c)?o=o.day(a+7):o=o.day(a),n.start.assign("weekday",a),l?(n.start.assign("day",o.date()),n.start.assign("month",o.month()+1),n.start.assign("year",o.year())):(n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())),n}};Ea.default=If});var W_=S(Sa=>{"use strict";var uA=Sa&&Sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sa,"__esModule",{value:!0});var lA=uA(jr()),Ff=class extends lA.default{patternBetween(){return/^\s*(至|到|\-|\~|||ー)\s*$/i}};Sa.default=Ff});var q_=S(Oa=>{"use strict";var cA=Oa&&Oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oa,"__esModule",{value:!0});var dA=cA(ln()),Lf=class extends dA.default{patternBetween(){return/^\s*$/i}};Oa.default=Lf});var j_=S(ot=>{"use strict";var mn=ot&&ot.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ot,"__esModule",{value:!0});ot.createConfiguration=ot.createCasualConfiguration=ot.parseDate=ot.parse=ot.strict=ot.casual=ot.hant=void 0;var Yf=xr(),fA=mn(Wo()),hA=cn(),pA=mn(x_()),mA=mn(A_()),yA=mn(C_()),gA=mn(F_()),_A=mn(L_()),TA=mn(U_()),bA=mn(W_()),vA=mn(q_());ot.hant=new Yf.Chrono(Uf());ot.casual=new Yf.Chrono(Uf());ot.strict=new Yf.Chrono(Wf());function wA(r,e,t){return ot.casual.parse(r,e,t)}ot.parse=wA;function kA(r,e,t){return ot.casual.parseDate(r,e,t)}ot.parseDate=kA;function Uf(){let r=Wf();return r.parsers.unshift(new pA.default),r}ot.createCasualConfiguration=Uf;function Wf(){let r=hA.includeCommonConfiguration({parsers:[new mA.default,new gA.default,new TA.default,new _A.default,new yA.default],refiners:[new bA.default,new vA.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof fA.default)),r}ot.createConfiguration=Wf});var H_=S(Ma=>{"use strict";var DA=Ma&&Ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ma,"__esModule",{value:!0});var EA=DA(Re()),SA=Z(),OA=1,$_=2,MA=3,G_=4,B_=5,RA=6,qf=class extends SA.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,s=e.createParsingResult(n,t[0]),a=EA.default(e.refDate),o=a;if(t[OA])s.start.imply("hour",a.hour()),s.start.imply("minute",a.minute()),s.start.imply("second",a.second()),s.start.imply("millisecond",a.millisecond());else if(t[$_]){let l=t[$_],c=t[MA];l=="\u660E"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u540E"?o=o.add(2,"day"):l=="\u5927\u540E"&&(o=o.add(3,"day")),c=="\u65E9"?s.start.imply("hour",6):c=="\u665A"&&(s.start.imply("hour",22),s.start.imply("meridiem",1))}else if(t[G_]){let c=t[G_][0];c=="\u65E9"||c=="\u4E0A"?s.start.imply("hour",6):c=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):c=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):c=="\u591C"||c=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):c=="\u51CC"&&s.start.imply("hour",0)}else if(t[B_]){let l=t[B_];l=="\u660E"?a.hour()>1&&(o=o.add(1,"day")):l=="\u6628"?o=o.add(-1,"day"):l=="\u524D"?o=o.add(-2,"day"):l=="\u5927\u524D"?o=o.add(-3,"day"):l=="\u540E"?o=o.add(2,"day"):l=="\u5927\u540E"&&(o=o.add(3,"day"));let c=t[RA];if(c){let f=c[0];f=="\u65E9"||f=="\u4E0A"?s.start.imply("hour",6):f=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):f=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):f=="\u591C"||f=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):f=="\u51CC"&&s.start.imply("hour",0)}}return s.start.assign("day",o.date()),s.start.assign("month",o.month()+1),s.start.assign("year",o.year()),s}};Ma.default=qf});var li=S(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.zhStringToYear=Kt.zhStringToNumber=Kt.WEEKDAY_OFFSET=Kt.NUMBER=void 0;Kt.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};Kt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function xA(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?Kt.NUMBER[n]:e*Kt.NUMBER[n]:e+=Kt.NUMBER[n]}return e}Kt.zhStringToNumber=xA;function PA(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+Kt.NUMBER[n]}return parseInt(e)}Kt.zhStringToYear=PA});var V_=S(Ra=>{"use strict";var AA=Ra&&Ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ra,"__esModule",{value:!0});var NA=AA(Re()),CA=Z(),_s=li(),jf=1,z_=2,$f=3,Gf=class extends CA.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(_s.NUMBER).join("")+"]{4}|["+Object.keys(_s.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(_s.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(_s.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=NA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[z_]);if(isNaN(a)&&(a=_s.zhStringToNumber(t[z_])),s.start.assign("month",a),t[$f]){let o=parseInt(t[$f]);isNaN(o)&&(o=_s.zhStringToNumber(t[$f])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[jf]){let o=parseInt(t[jf]);isNaN(o)&&(o=_s.zhStringToYear(t[jf])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};Ra.default=Gf});var Z_=S(xa=>{"use strict";var IA=xa&&xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xa,"__esModule",{value:!0});var FA=IA(Re()),LA=Z(),K_=li(),YA=new RegExp("(\\d+|["+Object.keys(K_.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"),Bf=1,UA=2,Hf=class extends LA.AbstractParserWithWordBoundaryChecking{innerPattern(){return YA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[Bf]);if(isNaN(s)&&(s=K_.zhStringToNumber(t[Bf])),isNaN(s)){let c=t[Bf];if(c==="\u51E0")s=3;else if(c==="\u534A")s=.5;else return null}let a=FA.default(e.refDate),l=t[UA][0];return l.match(/[日天星礼月年]/)?(l=="\u65E5"||l=="\u5929"?a=a.add(s,"d"):l=="\u661F"||l=="\u793C"?a=a.add(s*7,"d"):l=="\u6708"?a=a.add(s,"month"):l=="\u5E74"&&(a=a.add(s,"year")),n.start.assign("year",a.year()),n.start.assign("month",a.month()+1),n.start.assign("day",a.date()),n):(l=="\u79D2"?a=a.add(s,"second"):l=="\u5206"?a=a.add(s,"minute"):(l=="\u5C0F"||l=="\u949F")&&(a=a.add(s,"hour")),n.start.imply("year",a.year()),n.start.imply("month",a.month()+1),n.start.imply("day",a.date()),n.start.assign("hour",a.hour()),n.start.assign("minute",a.minute()),n.start.assign("second",a.second()),n)}};xa.default=Hf});var Q_=S(Pa=>{"use strict";var WA=Pa&&Pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pa,"__esModule",{value:!0});var qA=WA(Re()),jA=Z(),X_=li(),$A=new RegExp("(?<prefix>\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(X_.WEEKDAY_OFFSET).join("|")+")"),zf=class extends jA.AbstractParserWithWordBoundaryChecking{innerPattern(){return $A}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=X_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=null,l=t.groups.prefix;l=="\u4E0A"?o="last":l=="\u4E0B"?o="next":l=="\u8FD9"&&(o="this");let c=qA.default(e.refDate),f=!1,p=c.day();return o=="last"||o=="past"?(c=c.day(a-7),f=!0):o=="next"?(c=c.day(a+7),f=!0):o=="this"?c=c.day(a):Math.abs(a-7-p)<Math.abs(a-p)?c=c.day(a-7):Math.abs(a+7-p)<Math.abs(a-p)?c=c.day(a+7):c=c.day(a),n.start.assign("weekday",a),f?(n.start.assign("day",c.date()),n.start.assign("month",c.month()+1),n.start.assign("year",c.year())):(n.start.imply("day",c.date()),n.start.imply("month",c.month()+1),n.start.imply("year",c.year())),n}};Pa.default=zf});var J_=S(Aa=>{"use strict";var GA=Aa&&Aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Aa,"__esModule",{value:!0});var BA=GA(Re()),HA=Z(),wr=li(),zA=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(wr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),VA=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(wr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(wr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),du=1,fu=2,hu=3,pu=4,mu=5,yu=6,vr=7,ci=8,gu=9,Vf=class extends HA.AbstractParserWithWordBoundaryChecking{innerPattern(){return zA}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=BA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[du]){let p=t[du];p=="\u660E"?n.hour()>1&&a.add(1,"day"):p=="\u6628"?a.add(-1,"day"):p=="\u524D"?a.add(-2,"day"):p=="\u5927\u524D"?a.add(-3,"day"):p=="\u540E"?a.add(2,"day"):p=="\u5927\u540E"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else if(t[pu]){let p=t[pu];p=="\u660E"?a.add(1,"day"):p=="\u6628"?a.add(-1,"day"):p=="\u524D"?a.add(-2,"day"):p=="\u5927\u524D"?a.add(-3,"day"):p=="\u540E"?a.add(2,"day"):p=="\u5927\u540E"&&a.add(3,"day"),s.start.assign("day",a.date()),s.start.assign("month",a.month()+1),s.start.assign("year",a.year())}else s.start.imply("day",a.date()),s.start.imply("month",a.month()+1),s.start.imply("year",a.year());let o=0,l=0,c=-1;if(t[ci]){let p=parseInt(t[ci]);if(isNaN(p)&&(p=wr.zhStringToNumber(t[ci])),p>=60)return null;s.start.assign("second",p)}if(o=parseInt(t[yu]),isNaN(o)&&(o=wr.zhStringToNumber(t[yu])),t[vr]?t[vr]=="\u534A"?l=30:t[vr]=="\u6B63"||t[vr]=="\u6574"?l=0:(l=parseInt(t[vr]),isNaN(l)&&(l=wr.zhStringToNumber(t[vr]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[gu]){if(o>12)return null;let p=t[gu][0].toLowerCase();p=="a"&&(c=0,o==12&&(o=0)),p=="p"&&(c=1,o!=12&&(o+=12))}else if(t[fu]){let g=t[fu][0];g=="\u65E9"?(c=0,o==12&&(o=0)):g=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[hu]){let g=t[hu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}else if(t[mu]){let g=t[mu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}if(s.start.assign("hour",o),s.start.assign("minute",l),c>=0?s.start.assign("meridiem",c):o<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=VA.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let f=a.clone();if(s.end=e.createParsingComponents(),t[du]){let p=t[du];p=="\u660E"?n.hour()>1&&f.add(1,"day"):p=="\u6628"?f.add(-1,"day"):p=="\u524D"?f.add(-2,"day"):p=="\u5927\u524D"?f.add(-3,"day"):p=="\u540E"?f.add(2,"day"):p=="\u5927\u540E"&&f.add(3,"day"),s.end.assign("day",f.date()),s.end.assign("month",f.month()+1),s.end.assign("year",f.year())}else if(t[pu]){let p=t[pu];p=="\u660E"?f.add(1,"day"):p=="\u6628"?f.add(-1,"day"):p=="\u524D"?f.add(-2,"day"):p=="\u5927\u524D"?f.add(-3,"day"):p=="\u540E"?f.add(2,"day"):p=="\u5927\u540E"&&f.add(3,"day"),s.end.assign("day",f.date()),s.end.assign("month",f.month()+1),s.end.assign("year",f.year())}else s.end.imply("day",f.date()),s.end.imply("month",f.month()+1),s.end.imply("year",f.year());if(o=0,l=0,c=-1,t[ci]){let p=parseInt(t[ci]);if(isNaN(p)&&(p=wr.zhStringToNumber(t[ci])),p>=60)return null;s.end.assign("second",p)}if(o=parseInt(t[yu]),isNaN(o)&&(o=wr.zhStringToNumber(t[yu])),t[vr]?t[vr]=="\u534A"?l=30:t[vr]=="\u6B63"||t[vr]=="\u6574"?l=0:(l=parseInt(t[vr]),isNaN(l)&&(l=wr.zhStringToNumber(t[vr]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[gu]){if(o>12)return null;let p=t[gu][0].toLowerCase();p=="a"&&(c=0,o==12&&(o=0)),p=="p"&&(c=1,o!=12&&(o+=12)),s.start.isCertain("meridiem")||(c==0?(s.start.imply("meridiem",0),s.start.get("hour")==12&&s.start.assign("hour",0)):(s.start.imply("meridiem",1),s.start.get("hour")!=12&&s.start.assign("hour",s.start.get("hour")+12)))}else if(t[fu]){let g=t[fu][0];g=="\u65E9"?(c=0,o==12&&(o=0)):g=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[hu]){let g=t[hu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}else if(t[mu]){let g=t[mu][0];g=="\u4E0A"||g=="\u65E9"||g=="\u51CC"?(c=0,o==12&&(o=0)):(g=="\u4E0B"||g=="\u665A")&&(c=1,o!=12&&(o+=12))}return s.text=s.text+t[0],s.end.assign("hour",o),s.end.assign("minute",l),c>=0?s.end.assign("meridiem",c):s.start.isCertain("meridiem")&&s.start.get("meridiem")==1&&s.start.get("hour")>o?s.end.imply("meridiem",0):o>12&&s.end.imply("meridiem",1),s.end.date().getTime()<s.start.date().getTime()&&s.end.imply("day",s.end.get("day")+1),s}};Aa.default=Vf});var tT=S(Na=>{"use strict";var KA=Na&&Na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Na,"__esModule",{value:!0});var ZA=KA(Re()),XA=Z(),eT=li(),QA=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(eT.WEEKDAY_OFFSET).join("|")+")"),Kf=class extends XA.AbstractParserWithWordBoundaryChecking{innerPattern(){return QA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=eT.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=ZA.default(e.refDate),l=!1,c=o.day();return Math.abs(a-7-c)<Math.abs(a-c)?o=o.day(a-7):Math.abs(a+7-c)<Math.abs(a-c)?o=o.day(a+7):o=o.day(a),n.start.assign("weekday",a),l?(n.start.assign("day",o.date()),n.start.assign("month",o.month()+1),n.start.assign("year",o.year())):(n.start.imply("day",o.date()),n.start.imply("month",o.month()+1),n.start.imply("year",o.year())),n}};Na.default=Kf});var rT=S(Ca=>{"use strict";var JA=Ca&&Ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ca,"__esModule",{value:!0});var eN=JA(jr()),Zf=class extends eN.default{patternBetween(){return/^\s*(至|到|-|~|||ー)\s*$/i}};Ca.default=Zf});var nT=S(Ia=>{"use strict";var tN=Ia&&Ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ia,"__esModule",{value:!0});var rN=tN(ln()),Xf=class extends rN.default{patternBetween(){return/^\s*$/i}};Ia.default=Xf});var sT=S(ut=>{"use strict";var yn=ut&&ut.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ut,"__esModule",{value:!0});ut.createConfiguration=ut.createCasualConfiguration=ut.parseDate=ut.parse=ut.strict=ut.casual=ut.hans=void 0;var Qf=xr(),nN=yn(Wo()),sN=cn(),iN=yn(H_()),aN=yn(V_()),oN=yn(Z_()),uN=yn(Q_()),lN=yn(J_()),cN=yn(tT()),dN=yn(rT()),fN=yn(nT());ut.hans=new Qf.Chrono(Jf());ut.casual=new Qf.Chrono(Jf());ut.strict=new Qf.Chrono(eh());function hN(r,e,t){return ut.casual.parse(r,e,t)}ut.parse=hN;function pN(r,e,t){return ut.casual.parseDate(r,e,t)}ut.parseDate=pN;function Jf(){let r=eh();return r.parsers.unshift(new iN.default),r}ut.createCasualConfiguration=Jf;function eh(){let r=sN.includeCommonConfiguration({parsers:[new aN.default,new uN.default,new cN.default,new lN.default,new oN.default],refiners:[new dN.default,new fN.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof nN.default)),r}ut.createConfiguration=eh});var aT=S(nr=>{"use strict";var iT=nr&&nr.__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]}),mN=nr&&nr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),yN=nr&&nr.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&iT(e,r,t)},gN=nr&&nr.__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)&&iT(e,r,t);return mN(e,r),e};Object.defineProperty(nr,"__esModule",{value:!0});nr.hans=void 0;yN(j_(),nr);nr.hans=gN(sT())});var Zt=S(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.parseTimeUnits=fe.TIME_UNITS_PATTERN=fe.parseYear=fe.YEAR_PATTERN=fe.parseOrdinalNumberPattern=fe.ORDINAL_NUMBER_PATTERN=fe.parseNumberPattern=fe.NUMBER_PATTERN=fe.TIME_UNIT_DICTIONARY=fe.ORDINAL_WORD_DICTIONARY=fe.INTEGER_WORD_DICTIONARY=fe.MONTH_DICTIONARY=fe.FULL_MONTH_NAME_DICTIONARY=fe.WEEKDAY_DICTIONARY=fe.REGEX_PARTS=void 0;var _u=Ie(),_N=xt();fe.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};fe.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};fe.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};fe.MONTH_DICTIONARY=Object.assign(Object.assign({},fe.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});fe.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};fe.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};fe.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"};fe.NUMBER_PATTERN=`(?:${_u.matchAnyPattern(fe.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 uT(r){let e=r.toLowerCase();return fe.INTEGER_WORD_DICTIONARY[e]!==void 0?fe.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}fe.parseNumberPattern=uT;fe.ORDINAL_NUMBER_PATTERN=`(?:${_u.matchAnyPattern(fe.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function TN(r){let e=r.toLowerCase();return fe.ORDINAL_WORD_DICTIONARY[e]!==void 0?fe.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}fe.parseOrdinalNumberPattern=TN;var th="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";fe.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${th}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${th}|[5-9][0-9]${th})`;function bN(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 _N.findMostLikelyADYear(e)}fe.parseYear=bN;var lT=`(${fe.NUMBER_PATTERN})\\s{0,3}(${_u.matchAnyPattern(fe.TIME_UNIT_DICTIONARY)})`,oT=new RegExp(lT,"i");fe.TIME_UNITS_PATTERN=_u.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",lT);function vN(r){let e={},t=r,n=oT.exec(t);for(;n;)wN(e,n),t=t.substring(n[0].length).trim(),n=oT.exec(t);return e}fe.parseTimeUnits=vN;function wN(r,e){let t=uT(e[1]),n=fe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var dT=S(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});var Fa=Zt(),kN=tt(),DN=Z(),cT=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Fa.TIME_UNITS_PATTERN})${Fa.REGEX_PARTS.rightBoundary}`,EN=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${cT}`,Fa.REGEX_PARTS.flags),SN=new RegExp(cT,"i"),rh=class extends DN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Fa.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?SN:EN}innerExtract(e,t){let n=Fa.parseTimeUnits(t[1]);return kN.ParsingComponents.createRelativeFromReference(e.reference,n)}};nh.default=rh});var yT=S(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});var ON=xt(),La=Zt(),mT=Zt(),Tu=Zt(),MN=Ie(),RN=Z(),xN=new RegExp(`(?:\u0441)?\\s*(${Tu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Tu.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${MN.matchAnyPattern(La.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${mT.YEAR_PATTERN}(?![^\\s]\\d)))?${La.REGEX_PARTS.rightBoundary}`,La.REGEX_PARTS.flags),fT=1,hT=2,PN=3,pT=4,sh=class extends RN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return La.REGEX_PARTS.leftBoundary}innerPattern(){return xN}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=La.MONTH_DICTIONARY[t[PN].toLowerCase()],a=Tu.parseOrdinalNumberPattern(t[fT]);if(a>31)return t.index=t.index+t[fT].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[pT]){let o=mT.parseYear(t[pT]);n.start.assign("year",o)}else{let o=ON.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[hT]){let o=Tu.parseOrdinalNumberPattern(t[hT]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};ih.default=sh});var TT=S(oh=>{"use strict";Object.defineProperty(oh,"__esModule",{value:!0});var Ya=Zt(),AN=xt(),NN=Ie(),_T=Zt(),CN=Z(),IN=new RegExp(`((?:\u0432)\\s*)?(${NN.matchAnyPattern(Ya.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${_T.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Ya.REGEX_PARTS.flags),FN=2,gT=3,ah=class extends CN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ya.REGEX_PARTS.leftBoundary}innerPattern(){return IN}innerExtract(e,t){let n=t[FN].toLowerCase();if(t[0].length<=3&&!Ya.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index,t.index+t[0].length);s.start.imply("day",1);let a=Ya.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[gT]){let o=_T.parseYear(t[gT]);s.start.assign("year",o)}else{let o=AN.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};oh.default=ah});var vT=S(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});var bu=pt(),LN=ds(),bT=Zt(),uh=class extends LN.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return bT.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))?(?!\\/)${bT.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 s=n.get("hour");s>=6&&s<12?(n.assign("hour",n.get("hour")+12),n.assign("meridiem",bu.Meridiem.PM)):s<6&&n.assign("meridiem",bu.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",bu.Meridiem.PM);let s=n.get("hour");s>=0&&s<=6&&n.assign("hour",n.get("hour")+12)}t[0].endsWith("\u0443\u0442\u0440\u0430")&&(n.assign("meridiem",bu.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};lh.default=uh});var wT=S(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});var vu=Zt(),YN=tt(),UN=Z(),WN=gr(),qN=new RegExp(`(${vu.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,vu.REGEX_PARTS.flags),ch=class extends UN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return vu.REGEX_PARTS.leftBoundary}innerPattern(){return qN}innerExtract(e,t){let n=vu.parseTimeUnits(t[1]),s=WN.reverseTimeUnits(n);return YN.ParsingComponents.createRelativeFromReference(e.reference,s)}};dh.default=ch});var kT=S(Ua=>{"use strict";var jN=Ua&&Ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ua,"__esModule",{value:!0});var $N=jN(jr()),fh=class extends $N.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Ua.default=fh});var DT=S(Wa=>{"use strict";var GN=Wa&&Wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wa,"__esModule",{value:!0});var BN=GN(ln()),hh=class extends BN.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Wa.default=hh});var ET=S(gn=>{"use strict";var HN=gn&&gn.__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]}),zN=gn&&gn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),VN=gn&&gn.__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)&&HN(e,r,t);return zN(e,r),e};Object.defineProperty(gn,"__esModule",{value:!0});var KN=Z(),qa=VN(fn()),ph=Zt(),ZN=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)${ph.REGEX_PARTS.rightBoundary}`,ph.REGEX_PARTS.flags),mh=class extends KN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ph.REGEX_PARTS.leftBoundary}innerPattern(e){return ZN}innerExtract(e,t){let n=t[1].toLowerCase(),s=e.createParsingComponents();switch(n){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return qa.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return qa.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return qa.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return qa.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return qa.theDayBefore(e.reference,2)}return s}};gn.default=mh});var ST=S(Ir=>{"use strict";var XN=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]}),QN=Ir&&Ir.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),JN=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)&&XN(e,r,t);return QN(e,r),e},eC=Ir&&Ir.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ir,"__esModule",{value:!0});var tC=Z(),Ts=JN(fn()),rC=yr(),nC=eC(Re()),yh=Zt(),sC=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)${yh.REGEX_PARTS.rightBoundary}`,yh.REGEX_PARTS.flags),gh=class extends tC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return yh.REGEX_PARTS.leftBoundary}innerPattern(){return sC}innerExtract(e,t){let n=nC.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();if(s==="\u0441\u0435\u0439\u0447\u0430\u0441")return Ts.now(e.reference);if(s==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||s==="\u0432\u0435\u0447\u0435\u0440\u0430")return Ts.evening(e.reference);if(s.endsWith("\u0443\u0442\u0440\u043E\u043C")||s.endsWith("\u0443\u0442\u0440\u0430"))return Ts.morning(e.reference);if(s.match(/в\s*полдень/))return Ts.noon(e.reference);if(s.match(/прошлой\s*ночью/))return Ts.lastNight(e.reference);if(s.match(/прошлым\s*вечером/))return Ts.yesterdayEvening(e.reference);if(s.match(/следующей\s*ночью/)){let o=n.hour()<22?1:2;n=n.add(o,"day"),rC.assignSimilarDate(a,n),a.imply("hour",0)}return s.match(/в\s*полночь/)||s.endsWith("\u043D\u043E\u0447\u044C\u044E")?Ts.midnight(e.reference):a}};Ir.default=gh});var OT=S(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var ja=Zt(),iC=Ie(),aC=Z(),oC=hs(),uC=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*)?(${iC.matchAnyPattern(ja.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)?${ja.REGEX_PARTS.rightBoundary}`,ja.REGEX_PARTS.flags),lC=1,cC=2,dC=3,_h=class extends aC.AbstractParserWithWordBoundaryChecking{innerPattern(){return uC}patternLeftBoundary(){return ja.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[cC].toLowerCase(),s=ja.WEEKDAY_DICTIONARY[n],a=t[lC],o=t[dC],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||l=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||l=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?c="last":l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||l=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?c="next":(l=="\u044D\u0442\u043E\u0442"||l=="\u044D\u0442\u0443"||l=="\u044D\u0442\u043E\u0439")&&(c="this");let f=oC.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",f.date()).imply("month",f.month()+1).imply("year",f.year())}};Th.default=_h});var RT=S(Ga=>{"use strict";var fC=Ga&&Ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ga,"__esModule",{value:!0});var $a=Zt(),MT=tt(),hC=fC(Re()),pC=Z(),mC=Ie(),yC=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*(${mC.matchAnyPattern($a.TIME_UNIT_DICTIONARY)})(?=\\s*)${$a.REGEX_PARTS.rightBoundary}`,$a.REGEX_PARTS.flags),gC=1,_C=2,bh=class extends pC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return $a.REGEX_PARTS.leftBoundary}innerPattern(){return yC}innerExtract(e,t){let n=t[gC].toLowerCase(),s=t[_C].toLowerCase(),a=$a.TIME_UNIT_DICTIONARY[s];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 c={};return c[a]=1,MT.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||n=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let c={};return c[a]=-1,MT.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=hC.default(e.reference.instant);return a.match(/week/i)?(l=l.add(-l.get("d"),"d"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.imply("year",l.year())):a.match(/month/i)?(l=l.add(-l.date()+1,"d"),o.imply("day",l.date()),o.assign("year",l.year()),o.assign("month",l.month()+1)):a.match(/year/i)&&(l=l.add(-l.date()+1,"d"),l=l.add(-l.month(),"month"),o.imply("day",l.date()),o.imply("month",l.month()+1),o.assign("year",l.year())),o}};Ga.default=bh});var xT=S(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var Ba=Zt(),TC=tt(),bC=Z(),vC=gr(),wC=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*(${Ba.TIME_UNITS_PATTERN})${Ba.REGEX_PARTS.rightBoundary}`,Ba.REGEX_PARTS.flags),vh=class extends bC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ba.REGEX_PARTS.leftBoundary}innerPattern(){return wC}innerExtract(e,t){let n=t[1].toLowerCase(),s=Ba.parseTimeUnits(t[2]);switch(n){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":s=vC.reverseTimeUnits(s);break}return TC.ParsingComponents.createRelativeFromReference(e.reference,s)}};wh.default=vh});var NT=S(Et=>{"use strict";var sr=Et&&Et.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Et,"__esModule",{value:!0});Et.createConfiguration=Et.createCasualConfiguration=Et.parseDate=Et.parse=Et.strict=Et.casual=void 0;var kC=sr(dT()),DC=sr(yT()),EC=sr(TT()),SC=sr(vT()),OC=sr(wT()),MC=sr(kT()),RC=sr(DT()),xC=cn(),PC=sr(ET()),AC=sr(ST()),NC=sr(OT()),CC=sr(RT()),PT=xr(),IC=sr(ps()),FC=sr(xT());Et.casual=new PT.Chrono(AT());Et.strict=new PT.Chrono(kh(!0));function LC(r,e,t){return Et.casual.parse(r,e,t)}Et.parse=LC;function YC(r,e,t){return Et.casual.parseDate(r,e,t)}Et.parseDate=YC;function AT(){let r=kh(!1);return r.parsers.unshift(new PC.default),r.parsers.unshift(new AC.default),r.parsers.unshift(new EC.default),r.parsers.unshift(new CC.default),r.parsers.unshift(new FC.default),r}Et.createCasualConfiguration=AT;function kh(r=!0){return xC.includeCommonConfiguration({parsers:[new IC.default(!0),new kC.default,new DC.default,new NC.default,new SC.default(r),new OC.default],refiners:[new RC.default,new MC.default]},r)}Et.createConfiguration=kh});var pt=S(ge=>{"use strict";var UC=ge&&ge.__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]}),WC=ge&&ge.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),$n=ge&&ge.__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)&&UC(e,r,t);return WC(e,r),e};Object.defineProperty(ge,"__esModule",{value:!0});ge.parseDate=ge.parse=ge.casual=ge.strict=ge.ru=ge.zh=ge.nl=ge.pt=ge.ja=ge.fr=ge.de=ge.Meridiem=ge.Chrono=ge.en=void 0;var Dh=$n(Wc());ge.en=Dh;var qC=xr();Object.defineProperty(ge,"Chrono",{enumerable:!0,get:function(){return qC.Chrono}});var jC;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(jC=ge.Meridiem||(ge.Meridiem={}));var $C=$n(jy());ge.de=$C;var GC=$n(gg());ge.fr=GC;var BC=$n(Sg());ge.ja=BC;var HC=$n(jg());ge.pt=HC;var zC=$n(S_());ge.nl=zC;var VC=$n(aT());ge.zh=VC;var KC=$n(NT());ge.ru=KC;ge.strict=Dh.strict;ge.casual=Dh.casual;function ZC(r,e,t){return ge.casual.parse(r,e,t)}ge.parse=ZC;function XC(r,e,t){return ge.casual.parseDate(r,e,t)}ge.parseDate=XC});var wu=S((Eh,di)=>{(function(r,e){typeof Eh=="object"&&typeof di!="undefined"?di.exports=e():typeof define=="function"&&define.amd?define(e):r.moment=e()})(Eh,function(){"use strict";var r;function e(){return r.apply(null,arguments)}function t(i){r=i}function n(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function s(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function a(i,u){return Object.prototype.hasOwnProperty.call(i,u)}function o(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var u;for(u in i)if(a(i,u))return!1;return!0}function l(i){return i===void 0}function c(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function f(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function p(i,u){var d=[],h,m=i.length;for(h=0;h<m;++h)d.push(u(i[h],h));return d}function g(i,u){for(var d in u)a(u,d)&&(i[d]=u[d]);return a(u,"toString")&&(i.toString=u.toString),a(u,"valueOf")&&(i.valueOf=u.valueOf),i}function T(i,u,d,h){return Np(i,u,d,h,!0).utc()}function O(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function v(i){return i._pf==null&&(i._pf=O()),i._pf}var R;Array.prototype.some?R=Array.prototype.some:R=function(i){var u=Object(this),d=u.length>>>0,h;for(h=0;h<d;h++)if(h in u&&i.call(this,u[h],h,u))return!0;return!1};function C(i){if(i._isValid==null){var u=v(i),d=R.call(u.parsedDateParts,function(m){return m!=null}),h=!isNaN(i._d.getTime())&&u.overflow<0&&!u.empty&&!u.invalidEra&&!u.invalidMonth&&!u.invalidWeekday&&!u.weekdayMismatch&&!u.nullInput&&!u.invalidFormat&&!u.userInvalidated&&(!u.meridiem||u.meridiem&&d);if(i._strict&&(h=h&&u.charsLeftOver===0&&u.unusedTokens.length===0&&u.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(i))i._isValid=h;else return h}return i._isValid}function $(i){var u=T(NaN);return i!=null?g(v(u),i):v(u).userInvalidated=!0,u}var B=e.momentProperties=[],W=!1;function ke(i,u){var d,h,m,b=B.length;if(l(u._isAMomentObject)||(i._isAMomentObject=u._isAMomentObject),l(u._i)||(i._i=u._i),l(u._f)||(i._f=u._f),l(u._l)||(i._l=u._l),l(u._strict)||(i._strict=u._strict),l(u._tzm)||(i._tzm=u._tzm),l(u._isUTC)||(i._isUTC=u._isUTC),l(u._offset)||(i._offset=u._offset),l(u._pf)||(i._pf=v(u)),l(u._locale)||(i._locale=u._locale),b>0)for(d=0;d<b;d++)h=B[d],m=u[h],l(m)||(i[h]=m);return i}function Te(i){ke(this,i),this._d=new Date(i._d!=null?i._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),W===!1&&(W=!0,e.updateOffset(this),W=!1)}function be(i){return i instanceof Te||i!=null&&i._isAMomentObject!=null}function ee(i){e.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+i)}function ne(i,u){var d=!0;return g(function(){if(e.deprecationHandler!=null&&e.deprecationHandler(null,i),d){var h=[],m,b,x,te=arguments.length;for(b=0;b<te;b++){if(m="",typeof arguments[b]=="object"){m+=`
[`+b+"] ";for(x in arguments[0])a(arguments[0],x)&&(m+=x+": "+arguments[0][x]+", ");m=m.slice(0,-2)}else m=arguments[b];h.push(m)}ee(i+`
Arguments: `+Array.prototype.slice.call(h).join("")+`
`+new Error().stack),d=!1}return u.apply(this,arguments)},u)}var It={};function yt(i,u){e.deprecationHandler!=null&&e.deprecationHandler(i,u),It[i]||(ee(u),It[i]=!0)}e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;function V(i){return typeof Function!="undefined"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function q(i){var u,d;for(d in i)a(i,d)&&(u=i[d],V(u)?this[d]=u:this["_"+d]=u);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function P(i,u){var d=g({},i),h;for(h in u)a(u,h)&&(s(i[h])&&s(u[h])?(d[h]={},g(d[h],i[h]),g(d[h],u[h])):u[h]!=null?d[h]=u[h]:delete d[h]);for(h in i)a(i,h)&&!a(u,h)&&s(i[h])&&(d[h]=g({},d[h]));return d}function Q(i){i!=null&&this.set(i)}var Y;Object.keys?Y=Object.keys:Y=function(i){var u,d=[];for(u in i)a(i,u)&&d.push(u);return d};var oe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function y(i,u,d){var h=this._calendar[i]||this._calendar.sameElse;return V(h)?h.call(u,d):h}function _(i,u,d){var h=""+Math.abs(i),m=u-h.length,b=i>=0;return(b?d?"+":"":"-")+Math.pow(10,Math.max(0,m)).toString().substr(1)+h}var w=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,k=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,E={},M={};function D(i,u,d,h){var m=h;typeof h=="string"&&(m=function(){return this[h]()}),i&&(M[i]=m),u&&(M[u[0]]=function(){return _(m.apply(this,arguments),u[1],u[2])}),d&&(M[d]=function(){return this.localeData().ordinal(m.apply(this,arguments),i)})}function I(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function A(i){var u=i.match(w),d,h;for(d=0,h=u.length;d<h;d++)M[u[d]]?u[d]=M[u[d]]:u[d]=I(u[d]);return function(m){var b="",x;for(x=0;x<h;x++)b+=V(u[x])?u[x].call(m,i):u[x];return b}}function N(i,u){return i.isValid()?(u=j(u,i.localeData()),E[u]=E[u]||A(u),E[u](i)):i.localeData().invalidDate()}function j(i,u){var d=5;function h(m){return u.longDateFormat(m)||m}for(k.lastIndex=0;d>=0&&k.test(i);)i=i.replace(k,h),k.lastIndex=0,d-=1;return i}var De={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function pe(i){var u=this._longDateFormat[i],d=this._longDateFormat[i.toUpperCase()];return u||!d?u:(this._longDateFormat[i]=d.match(w).map(function(h){return h==="MMMM"||h==="MM"||h==="DD"||h==="dddd"?h.slice(1):h}).join(""),this._longDateFormat[i])}var le="Invalid date";function Ce(){return this._invalidDate}var K="%d",qe=/\d{1,2}/;function Xe(i){return this._ordinal.replace("%d",i)}var ct={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Or(i,u,d,h){var m=this._relativeTime[d];return V(m)?m(i,u,d,h):m.replace(/%d/i,i)}function it(i,u){var d=this._relativeTime[i>0?"future":"past"];return V(d)?d(u):d.replace(/%s/i,u)}var je={};function dt(i,u){var d=i.toLowerCase();je[d]=je[d+"s"]=je[u]=i}function gt(i){return typeof i=="string"?je[i]||je[i.toLowerCase()]:void 0}function Mn(i){var u={},d,h;for(h in i)a(i,h)&&(d=gt(h),d&&(u[d]=i[h]));return u}var Li={};function $e(i,u){Li[i]=u}function qs(i){var u=[],d;for(d in i)a(i,d)&&u.push({unit:d,priority:Li[d]});return u.sort(function(h,m){return h.priority-m.priority}),u}function ts(i){return i%4===0&&i%100!==0||i%400===0}function ft(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function ce(i){var u=+i,d=0;return u!==0&&isFinite(u)&&(d=ft(u)),d}function Jr(i,u){return function(d){return d!=null?(rs(this,i,d),e.updateOffset(this,u),this):Rt(this,i)}}function Rt(i,u){return i.isValid()?i._d["get"+(i._isUTC?"UTC":"")+u]():NaN}function rs(i,u,d){i.isValid()&&!isNaN(d)&&(u==="FullYear"&&ts(i.year())&&i.month()===1&&i.date()===29?(d=ce(d),i._d["set"+(i._isUTC?"UTC":"")+u](d,i.month(),_o(d,i.month()))):i._d["set"+(i._isUTC?"UTC":"")+u](d))}function po(i){return i=gt(i),V(this[i])?this[i]():this}function Ur(i,u){if(typeof i=="object"){i=Mn(i);var d=qs(i),h,m=d.length;for(h=0;h<m;h++)this[d[h].unit](i[d[h].unit])}else if(i=gt(i),V(this[i]))return this[i](u);return this}var Rn=/\d/,_t=/\d\d/,Yi=/\d{3}/,dr=/\d{4}/,en=/[+-]?\d{6}/,Le=/\d\d?/,xn=/\d\d\d\d?/,js=/\d\d\d\d\d\d?/,ns=/\d{1,3}/,Pn=/\d{1,4}/,ss=/[+-]?\d{1,6}/,fr=/\d+/,An=/[+-]?\d+/,mo=/Z|[+-]\d\d:?\d\d/gi,tn=/Z|[+-]\d\d(?::?\d\d)?/gi,yo=/[+-]?\d+(\.\d{1,3})?/,hr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,pr;pr={};function H(i,u,d){pr[i]=V(u)?u:function(h,m){return h&&d?d:u}}function $s(i,u){return a(pr,i)?pr[i](u._strict,u._locale):new RegExp(go(i))}function go(i){return ht(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(u,d,h,m,b){return d||h||m||b}))}function ht(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var is={};function Pe(i,u){var d,h=u,m;for(typeof i=="string"&&(i=[i]),c(u)&&(h=function(b,x){x[u]=ce(b)}),m=i.length,d=0;d<m;d++)is[i[d]]=h}function mr(i,u){Pe(i,function(d,h,m,b){m._w=m._w||{},u(d,m._w,m,b)})}function Ft(i,u,d){u!=null&&a(is,i)&&is[i](u,d._a,d,i)}var et=0,Qe=1,G=2,re=3,ue=4,jt=5,as=6,Vv=7,Kv=8;function Zv(i,u){return(i%u+u)%u}var nt;Array.prototype.indexOf?nt=Array.prototype.indexOf:nt=function(i){var u;for(u=0;u<this.length;++u)if(this[u]===i)return u;return-1};function _o(i,u){if(isNaN(i)||isNaN(u))return NaN;var d=Zv(u,12);return i+=(u-d)/12,d===1?ts(i)?29:28:31-d%7%2}D("M",["MM",2],"Mo",function(){return this.month()+1}),D("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),D("MMMM",0,0,function(i){return this.localeData().months(this,i)}),dt("month","M"),$e("month",8),H("M",Le),H("MM",Le,_t),H("MMM",function(i,u){return u.monthsShortRegex(i)}),H("MMMM",function(i,u){return u.monthsRegex(i)}),Pe(["M","MM"],function(i,u){u[Qe]=ce(i)-1}),Pe(["MMM","MMMM"],function(i,u,d,h){var m=d._locale.monthsParse(i,h,d._strict);m!=null?u[Qe]=m:v(d).invalidMonth=i});var Xv="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),_p="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Tp=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Qv=hr,Jv=hr;function ew(i,u){return i?n(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||Tp).test(u)?"format":"standalone"][i.month()]:n(this._months)?this._months:this._months.standalone}function tw(i,u){return i?n(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[Tp.test(u)?"format":"standalone"][i.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function rw(i,u,d){var h,m,b,x=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],h=0;h<12;++h)b=T([2e3,h]),this._shortMonthsParse[h]=this.monthsShort(b,"").toLocaleLowerCase(),this._longMonthsParse[h]=this.months(b,"").toLocaleLowerCase();return d?u==="MMM"?(m=nt.call(this._shortMonthsParse,x),m!==-1?m:null):(m=nt.call(this._longMonthsParse,x),m!==-1?m:null):u==="MMM"?(m=nt.call(this._shortMonthsParse,x),m!==-1?m:(m=nt.call(this._longMonthsParse,x),m!==-1?m:null)):(m=nt.call(this._longMonthsParse,x),m!==-1?m:(m=nt.call(this._shortMonthsParse,x),m!==-1?m:null))}function nw(i,u,d){var h,m,b;if(this._monthsParseExact)return rw.call(this,i,u,d);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),h=0;h<12;h++){if(m=T([2e3,h]),d&&!this._longMonthsParse[h]&&(this._longMonthsParse[h]=new RegExp("^"+this.months(m,"").replace(".","")+"$","i"),this._shortMonthsParse[h]=new RegExp("^"+this.monthsShort(m,"").replace(".","")+"$","i")),!d&&!this._monthsParse[h]&&(b="^"+this.months(m,"")+"|^"+this.monthsShort(m,""),this._monthsParse[h]=new RegExp(b.replace(".",""),"i")),d&&u==="MMMM"&&this._longMonthsParse[h].test(i))return h;if(d&&u==="MMM"&&this._shortMonthsParse[h].test(i))return h;if(!d&&this._monthsParse[h].test(i))return h}}function bp(i,u){var d;if(!i.isValid())return i;if(typeof u=="string"){if(/^\d+$/.test(u))u=ce(u);else if(u=i.localeData().monthsParse(u),!c(u))return i}return d=Math.min(i.date(),_o(i.year(),u)),i._d["set"+(i._isUTC?"UTC":"")+"Month"](u,d),i}function vp(i){return i!=null?(bp(this,i),e.updateOffset(this,!0),this):Rt(this,"Month")}function sw(){return _o(this.year(),this.month())}function iw(i){return this._monthsParseExact?(a(this,"_monthsRegex")||wp.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Qv),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function aw(i){return this._monthsParseExact?(a(this,"_monthsRegex")||wp.call(this),i?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Jv),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function wp(){function i(x,te){return te.length-x.length}var u=[],d=[],h=[],m,b;for(m=0;m<12;m++)b=T([2e3,m]),u.push(this.monthsShort(b,"")),d.push(this.months(b,"")),h.push(this.months(b,"")),h.push(this.monthsShort(b,""));for(u.sort(i),d.sort(i),h.sort(i),m=0;m<12;m++)u[m]=ht(u[m]),d[m]=ht(d[m]);for(m=0;m<24;m++)h[m]=ht(h[m]);this._monthsRegex=new RegExp("^("+h.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+u.join("|")+")","i")}D("Y",0,0,function(){var i=this.year();return i<=9999?_(i,4):"+"+i}),D(0,["YY",2],0,function(){return this.year()%100}),D(0,["YYYY",4],0,"year"),D(0,["YYYYY",5],0,"year"),D(0,["YYYYYY",6,!0],0,"year"),dt("year","y"),$e("year",1),H("Y",An),H("YY",Le,_t),H("YYYY",Pn,dr),H("YYYYY",ss,en),H("YYYYYY",ss,en),Pe(["YYYYY","YYYYYY"],et),Pe("YYYY",function(i,u){u[et]=i.length===2?e.parseTwoDigitYear(i):ce(i)}),Pe("YY",function(i,u){u[et]=e.parseTwoDigitYear(i)}),Pe("Y",function(i,u){u[et]=parseInt(i,10)});function Ui(i){return ts(i)?366:365}e.parseTwoDigitYear=function(i){return ce(i)+(ce(i)>68?1900:2e3)};var kp=Jr("FullYear",!0);function ow(){return ts(this.year())}function uw(i,u,d,h,m,b,x){var te;return i<100&&i>=0?(te=new Date(i+400,u,d,h,m,b,x),isFinite(te.getFullYear())&&te.setFullYear(i)):te=new Date(i,u,d,h,m,b,x),te}function Wi(i){var u,d;return i<100&&i>=0?(d=Array.prototype.slice.call(arguments),d[0]=i+400,u=new Date(Date.UTC.apply(null,d)),isFinite(u.getUTCFullYear())&&u.setUTCFullYear(i)):u=new Date(Date.UTC.apply(null,arguments)),u}function To(i,u,d){var h=7+u-d,m=(7+Wi(i,0,h).getUTCDay()-u)%7;return-m+h-1}function Dp(i,u,d,h,m){var b=(7+d-h)%7,x=To(i,h,m),te=1+7*(u-1)+b+x,me,Ye;return te<=0?(me=i-1,Ye=Ui(me)+te):te>Ui(i)?(me=i+1,Ye=te-Ui(i)):(me=i,Ye=te),{year:me,dayOfYear:Ye}}function qi(i,u,d){var h=To(i.year(),u,d),m=Math.floor((i.dayOfYear()-h-1)/7)+1,b,x;return m<1?(x=i.year()-1,b=m+rn(x,u,d)):m>rn(i.year(),u,d)?(b=m-rn(i.year(),u,d),x=i.year()+1):(x=i.year(),b=m),{week:b,year:x}}function rn(i,u,d){var h=To(i,u,d),m=To(i+1,u,d);return(Ui(i)-h+m)/7}D("w",["ww",2],"wo","week"),D("W",["WW",2],"Wo","isoWeek"),dt("week","w"),dt("isoWeek","W"),$e("week",5),$e("isoWeek",5),H("w",Le),H("ww",Le,_t),H("W",Le),H("WW",Le,_t),mr(["w","ww","W","WW"],function(i,u,d,h){u[h.substr(0,1)]=ce(i)});function lw(i){return qi(i,this._week.dow,this._week.doy).week}var cw={dow:0,doy:6};function dw(){return this._week.dow}function fw(){return this._week.doy}function hw(i){var u=this.localeData().week(this);return i==null?u:this.add((i-u)*7,"d")}function pw(i){var u=qi(this,1,4).week;return i==null?u:this.add((i-u)*7,"d")}D("d",0,"do","day"),D("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),D("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),D("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),D("e",0,0,"weekday"),D("E",0,0,"isoWeekday"),dt("day","d"),dt("weekday","e"),dt("isoWeekday","E"),$e("day",11),$e("weekday",11),$e("isoWeekday",11),H("d",Le),H("e",Le),H("E",Le),H("dd",function(i,u){return u.weekdaysMinRegex(i)}),H("ddd",function(i,u){return u.weekdaysShortRegex(i)}),H("dddd",function(i,u){return u.weekdaysRegex(i)}),mr(["dd","ddd","dddd"],function(i,u,d,h){var m=d._locale.weekdaysParse(i,h,d._strict);m!=null?u.d=m:v(d).invalidWeekday=i}),mr(["d","e","E"],function(i,u,d,h){u[h]=ce(i)});function mw(i,u){return typeof i!="string"?i:isNaN(i)?(i=u.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function yw(i,u){return typeof i=="string"?u.weekdaysParse(i)%7||7:isNaN(i)?null:i}function gl(i,u){return i.slice(u,7).concat(i.slice(0,u))}var gw="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ep="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),_w="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Tw=hr,bw=hr,vw=hr;function ww(i,u){var d=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(u)?"format":"standalone"];return i===!0?gl(d,this._week.dow):i?d[i.day()]:d}function kw(i){return i===!0?gl(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function Dw(i){return i===!0?gl(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function Ew(i,u,d){var h,m,b,x=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],h=0;h<7;++h)b=T([2e3,1]).day(h),this._minWeekdaysParse[h]=this.weekdaysMin(b,"").toLocaleLowerCase(),this._shortWeekdaysParse[h]=this.weekdaysShort(b,"").toLocaleLowerCase(),this._weekdaysParse[h]=this.weekdays(b,"").toLocaleLowerCase();return d?u==="dddd"?(m=nt.call(this._weekdaysParse,x),m!==-1?m:null):u==="ddd"?(m=nt.call(this._shortWeekdaysParse,x),m!==-1?m:null):(m=nt.call(this._minWeekdaysParse,x),m!==-1?m:null):u==="dddd"?(m=nt.call(this._weekdaysParse,x),m!==-1||(m=nt.call(this._shortWeekdaysParse,x),m!==-1)?m:(m=nt.call(this._minWeekdaysParse,x),m!==-1?m:null)):u==="ddd"?(m=nt.call(this._shortWeekdaysParse,x),m!==-1||(m=nt.call(this._weekdaysParse,x),m!==-1)?m:(m=nt.call(this._minWeekdaysParse,x),m!==-1?m:null)):(m=nt.call(this._minWeekdaysParse,x),m!==-1||(m=nt.call(this._weekdaysParse,x),m!==-1)?m:(m=nt.call(this._shortWeekdaysParse,x),m!==-1?m:null))}function Sw(i,u,d){var h,m,b;if(this._weekdaysParseExact)return Ew.call(this,i,u,d);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),h=0;h<7;h++){if(m=T([2e3,1]).day(h),d&&!this._fullWeekdaysParse[h]&&(this._fullWeekdaysParse[h]=new RegExp("^"+this.weekdays(m,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[h]=new RegExp("^"+this.weekdaysShort(m,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[h]=new RegExp("^"+this.weekdaysMin(m,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[h]||(b="^"+this.weekdays(m,"")+"|^"+this.weekdaysShort(m,"")+"|^"+this.weekdaysMin(m,""),this._weekdaysParse[h]=new RegExp(b.replace(".",""),"i")),d&&u==="dddd"&&this._fullWeekdaysParse[h].test(i))return h;if(d&&u==="ddd"&&this._shortWeekdaysParse[h].test(i))return h;if(d&&u==="dd"&&this._minWeekdaysParse[h].test(i))return h;if(!d&&this._weekdaysParse[h].test(i))return h}}function Ow(i){if(!this.isValid())return i!=null?this:NaN;var u=this._isUTC?this._d.getUTCDay():this._d.getDay();return i!=null?(i=mw(i,this.localeData()),this.add(i-u,"d")):u}function Mw(i){if(!this.isValid())return i!=null?this:NaN;var u=(this.day()+7-this.localeData()._week.dow)%7;return i==null?u:this.add(i-u,"d")}function Rw(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var u=yw(i,this.localeData());return this.day(this.day()%7?u:u-7)}else return this.day()||7}function xw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||_l.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Tw),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function Pw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||_l.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=bw),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Aw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||_l.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=vw),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function _l(){function i($t,un){return un.length-$t.length}var u=[],d=[],h=[],m=[],b,x,te,me,Ye;for(b=0;b<7;b++)x=T([2e3,1]).day(b),te=ht(this.weekdaysMin(x,"")),me=ht(this.weekdaysShort(x,"")),Ye=ht(this.weekdays(x,"")),u.push(te),d.push(me),h.push(Ye),m.push(te),m.push(me),m.push(Ye);u.sort(i),d.sort(i),h.sort(i),m.sort(i),this._weekdaysRegex=new RegExp("^("+m.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+u.join("|")+")","i")}function Tl(){return this.hours()%12||12}function Nw(){return this.hours()||24}D("H",["HH",2],0,"hour"),D("h",["hh",2],0,Tl),D("k",["kk",2],0,Nw),D("hmm",0,0,function(){return""+Tl.apply(this)+_(this.minutes(),2)}),D("hmmss",0,0,function(){return""+Tl.apply(this)+_(this.minutes(),2)+_(this.seconds(),2)}),D("Hmm",0,0,function(){return""+this.hours()+_(this.minutes(),2)}),D("Hmmss",0,0,function(){return""+this.hours()+_(this.minutes(),2)+_(this.seconds(),2)});function Sp(i,u){D(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),u)})}Sp("a",!0),Sp("A",!1),dt("hour","h"),$e("hour",13);function Op(i,u){return u._meridiemParse}H("a",Op),H("A",Op),H("H",Le),H("h",Le),H("k",Le),H("HH",Le,_t),H("hh",Le,_t),H("kk",Le,_t),H("hmm",xn),H("hmmss",js),H("Hmm",xn),H("Hmmss",js),Pe(["H","HH"],re),Pe(["k","kk"],function(i,u,d){var h=ce(i);u[re]=h===24?0:h}),Pe(["a","A"],function(i,u,d){d._isPm=d._locale.isPM(i),d._meridiem=i}),Pe(["h","hh"],function(i,u,d){u[re]=ce(i),v(d).bigHour=!0}),Pe("hmm",function(i,u,d){var h=i.length-2;u[re]=ce(i.substr(0,h)),u[ue]=ce(i.substr(h)),v(d).bigHour=!0}),Pe("hmmss",function(i,u,d){var h=i.length-4,m=i.length-2;u[re]=ce(i.substr(0,h)),u[ue]=ce(i.substr(h,2)),u[jt]=ce(i.substr(m)),v(d).bigHour=!0}),Pe("Hmm",function(i,u,d){var h=i.length-2;u[re]=ce(i.substr(0,h)),u[ue]=ce(i.substr(h))}),Pe("Hmmss",function(i,u,d){var h=i.length-4,m=i.length-2;u[re]=ce(i.substr(0,h)),u[ue]=ce(i.substr(h,2)),u[jt]=ce(i.substr(m))});function Cw(i){return(i+"").toLowerCase().charAt(0)==="p"}var Iw=/[ap]\.?m?\.?/i,Fw=Jr("Hours",!0);function Lw(i,u,d){return i>11?d?"pm":"PM":d?"am":"AM"}var Mp={calendar:oe,longDateFormat:De,invalidDate:le,ordinal:K,dayOfMonthOrdinalParse:qe,relativeTime:ct,months:Xv,monthsShort:_p,week:cw,weekdays:gw,weekdaysMin:_w,weekdaysShort:Ep,meridiemParse:Iw},Je={},ji={},$i;function Yw(i,u){var d,h=Math.min(i.length,u.length);for(d=0;d<h;d+=1)if(i[d]!==u[d])return d;return h}function Rp(i){return i&&i.toLowerCase().replace("_","-")}function Uw(i){for(var u=0,d,h,m,b;u<i.length;){for(b=Rp(i[u]).split("-"),d=b.length,h=Rp(i[u+1]),h=h?h.split("-"):null;d>0;){if(m=bo(b.slice(0,d).join("-")),m)return m;if(h&&h.length>=d&&Yw(b,h)>=d-1)break;d--}u++}return $i}function Ww(i){return i.match("^[^/\\\\]*$")!=null}function bo(i){var u=null,d;if(Je[i]===void 0&&typeof di!="undefined"&&di&&di.exports&&Ww(i))try{u=$i._abbr,d=require,d("./locale/"+i),Nn(u)}catch(h){Je[i]=null}return Je[i]}function Nn(i,u){var d;return i&&(l(u)?d=nn(i):d=bl(i,u),d?$i=d:typeof console!="undefined"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),$i._abbr}function bl(i,u){if(u!==null){var d,h=Mp;if(u.abbr=i,Je[i]!=null)yt("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),h=Je[i]._config;else if(u.parentLocale!=null)if(Je[u.parentLocale]!=null)h=Je[u.parentLocale]._config;else if(d=bo(u.parentLocale),d!=null)h=d._config;else return ji[u.parentLocale]||(ji[u.parentLocale]=[]),ji[u.parentLocale].push({name:i,config:u}),null;return Je[i]=new Q(P(h,u)),ji[i]&&ji[i].forEach(function(m){bl(m.name,m.config)}),Nn(i),Je[i]}else return delete Je[i],null}function qw(i,u){if(u!=null){var d,h,m=Mp;Je[i]!=null&&Je[i].parentLocale!=null?Je[i].set(P(Je[i]._config,u)):(h=bo(i),h!=null&&(m=h._config),u=P(m,u),h==null&&(u.abbr=i),d=new Q(u),d.parentLocale=Je[i],Je[i]=d),Nn(i)}else Je[i]!=null&&(Je[i].parentLocale!=null?(Je[i]=Je[i].parentLocale,i===Nn()&&Nn(i)):Je[i]!=null&&delete Je[i]);return Je[i]}function nn(i){var u;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return $i;if(!n(i)){if(u=bo(i),u)return u;i=[i]}return Uw(i)}function jw(){return Y(Je)}function vl(i){var u,d=i._a;return d&&v(i).overflow===-2&&(u=d[Qe]<0||d[Qe]>11?Qe:d[G]<1||d[G]>_o(d[et],d[Qe])?G:d[re]<0||d[re]>24||d[re]===24&&(d[ue]!==0||d[jt]!==0||d[as]!==0)?re:d[ue]<0||d[ue]>59?ue:d[jt]<0||d[jt]>59?jt:d[as]<0||d[as]>999?as:-1,v(i)._overflowDayOfYear&&(u<et||u>G)&&(u=G),v(i)._overflowWeeks&&u===-1&&(u=Vv),v(i)._overflowWeekday&&u===-1&&(u=Kv),v(i).overflow=u),i}var $w=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Gw=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Bw=/Z|[+-]\d\d(?::?\d\d)?/,vo=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],wl=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Hw=/^\/?Date\((-?\d+)/i,zw=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Vw={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function xp(i){var u,d,h=i._i,m=$w.exec(h)||Gw.exec(h),b,x,te,me,Ye=vo.length,$t=wl.length;if(m){for(v(i).iso=!0,u=0,d=Ye;u<d;u++)if(vo[u][1].exec(m[1])){x=vo[u][0],b=vo[u][2]!==!1;break}if(x==null){i._isValid=!1;return}if(m[3]){for(u=0,d=$t;u<d;u++)if(wl[u][1].exec(m[3])){te=(m[2]||" ")+wl[u][0];break}if(te==null){i._isValid=!1;return}}if(!b&&te!=null){i._isValid=!1;return}if(m[4])if(Bw.exec(m[4]))me="Z";else{i._isValid=!1;return}i._f=x+(te||"")+(me||""),Dl(i)}else i._isValid=!1}function Kw(i,u,d,h,m,b){var x=[Zw(i),_p.indexOf(u),parseInt(d,10),parseInt(h,10),parseInt(m,10)];return b&&x.push(parseInt(b,10)),x}function Zw(i){var u=parseInt(i,10);return u<=49?2e3+u:u<=999?1900+u:u}function Xw(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Qw(i,u,d){if(i){var h=Ep.indexOf(i),m=new Date(u[0],u[1],u[2]).getDay();if(h!==m)return v(d).weekdayMismatch=!0,d._isValid=!1,!1}return!0}function Jw(i,u,d){if(i)return Vw[i];if(u)return 0;var h=parseInt(d,10),m=h%100,b=(h-m)/100;return b*60+m}function Pp(i){var u=zw.exec(Xw(i._i)),d;if(u){if(d=Kw(u[4],u[3],u[2],u[5],u[6],u[7]),!Qw(u[1],d,i))return;i._a=d,i._tzm=Jw(u[8],u[9],u[10]),i._d=Wi.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),v(i).rfc2822=!0}else i._isValid=!1}function e0(i){var u=Hw.exec(i._i);if(u!==null){i._d=new Date(+u[1]);return}if(xp(i),i._isValid===!1)delete i._isValid;else return;if(Pp(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:e.createFromInputFallback(i)}e.createFromInputFallback=ne("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(i){i._d=new Date(i._i+(i._useUTC?" UTC":""))});function Gs(i,u,d){return i!=null?i:u!=null?u:d}function t0(i){var u=new Date(e.now());return i._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()]}function kl(i){var u,d,h=[],m,b,x;if(!i._d){for(m=t0(i),i._w&&i._a[G]==null&&i._a[Qe]==null&&r0(i),i._dayOfYear!=null&&(x=Gs(i._a[et],m[et]),(i._dayOfYear>Ui(x)||i._dayOfYear===0)&&(v(i)._overflowDayOfYear=!0),d=Wi(x,0,i._dayOfYear),i._a[Qe]=d.getUTCMonth(),i._a[G]=d.getUTCDate()),u=0;u<3&&i._a[u]==null;++u)i._a[u]=h[u]=m[u];for(;u<7;u++)i._a[u]=h[u]=i._a[u]==null?u===2?1:0:i._a[u];i._a[re]===24&&i._a[ue]===0&&i._a[jt]===0&&i._a[as]===0&&(i._nextDay=!0,i._a[re]=0),i._d=(i._useUTC?Wi:uw).apply(null,h),b=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[re]=24),i._w&&typeof i._w.d!="undefined"&&i._w.d!==b&&(v(i).weekdayMismatch=!0)}}function r0(i){var u,d,h,m,b,x,te,me,Ye;u=i._w,u.GG!=null||u.W!=null||u.E!=null?(b=1,x=4,d=Gs(u.GG,i._a[et],qi(ze(),1,4).year),h=Gs(u.W,1),m=Gs(u.E,1),(m<1||m>7)&&(me=!0)):(b=i._locale._week.dow,x=i._locale._week.doy,Ye=qi(ze(),b,x),d=Gs(u.gg,i._a[et],Ye.year),h=Gs(u.w,Ye.week),u.d!=null?(m=u.d,(m<0||m>6)&&(me=!0)):u.e!=null?(m=u.e+b,(u.e<0||u.e>6)&&(me=!0)):m=b),h<1||h>rn(d,b,x)?v(i)._overflowWeeks=!0:me!=null?v(i)._overflowWeekday=!0:(te=Dp(d,h,m,b,x),i._a[et]=te.year,i._dayOfYear=te.dayOfYear)}e.ISO_8601=function(){},e.RFC_2822=function(){};function Dl(i){if(i._f===e.ISO_8601){xp(i);return}if(i._f===e.RFC_2822){Pp(i);return}i._a=[],v(i).empty=!0;var u=""+i._i,d,h,m,b,x,te=u.length,me=0,Ye,$t;for(m=j(i._f,i._locale).match(w)||[],$t=m.length,d=0;d<$t;d++)b=m[d],h=(u.match($s(b,i))||[])[0],h&&(x=u.substr(0,u.indexOf(h)),x.length>0&&v(i).unusedInput.push(x),u=u.slice(u.indexOf(h)+h.length),me+=h.length),M[b]?(h?v(i).empty=!1:v(i).unusedTokens.push(b),Ft(b,h,i)):i._strict&&!h&&v(i).unusedTokens.push(b);v(i).charsLeftOver=te-me,u.length>0&&v(i).unusedInput.push(u),i._a[re]<=12&&v(i).bigHour===!0&&i._a[re]>0&&(v(i).bigHour=void 0),v(i).parsedDateParts=i._a.slice(0),v(i).meridiem=i._meridiem,i._a[re]=n0(i._locale,i._a[re],i._meridiem),Ye=v(i).era,Ye!==null&&(i._a[et]=i._locale.erasConvertYear(Ye,i._a[et])),kl(i),vl(i)}function n0(i,u,d){var h;return d==null?u:i.meridiemHour!=null?i.meridiemHour(u,d):(i.isPM!=null&&(h=i.isPM(d),h&&u<12&&(u+=12),!h&&u===12&&(u=0)),u)}function s0(i){var u,d,h,m,b,x,te=!1,me=i._f.length;if(me===0){v(i).invalidFormat=!0,i._d=new Date(NaN);return}for(m=0;m<me;m++)b=0,x=!1,u=ke({},i),i._useUTC!=null&&(u._useUTC=i._useUTC),u._f=i._f[m],Dl(u),C(u)&&(x=!0),b+=v(u).charsLeftOver,b+=v(u).unusedTokens.length*10,v(u).score=b,te?b<h&&(h=b,d=u):(h==null||b<h||x)&&(h=b,d=u,x&&(te=!0));g(i,d||u)}function i0(i){if(!i._d){var u=Mn(i._i),d=u.day===void 0?u.date:u.day;i._a=p([u.year,u.month,d,u.hour,u.minute,u.second,u.millisecond],function(h){return h&&parseInt(h,10)}),kl(i)}}function a0(i){var u=new Te(vl(Ap(i)));return u._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function Ap(i){var u=i._i,d=i._f;return i._locale=i._locale||nn(i._l),u===null||d===void 0&&u===""?$({nullInput:!0}):(typeof u=="string"&&(i._i=u=i._locale.preparse(u)),be(u)?new Te(vl(u)):(f(u)?i._d=u:n(d)?s0(i):d?Dl(i):o0(i),C(i)||(i._d=null),i))}function o0(i){var u=i._i;l(u)?i._d=new Date(e.now()):f(u)?i._d=new Date(u.valueOf()):typeof u=="string"?e0(i):n(u)?(i._a=p(u.slice(0),function(d){return parseInt(d,10)}),kl(i)):s(u)?i0(i):c(u)?i._d=new Date(u):e.createFromInputFallback(i)}function Np(i,u,d,h,m){var b={};return(u===!0||u===!1)&&(h=u,u=void 0),(d===!0||d===!1)&&(h=d,d=void 0),(s(i)&&o(i)||n(i)&&i.length===0)&&(i=void 0),b._isAMomentObject=!0,b._useUTC=b._isUTC=m,b._l=d,b._i=i,b._f=u,b._strict=h,a0(b)}function ze(i,u,d,h){return Np(i,u,d,h,!1)}var u0=ne("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=ze.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:$()}),l0=ne("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=ze.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:$()});function Cp(i,u){var d,h;if(u.length===1&&n(u[0])&&(u=u[0]),!u.length)return ze();for(d=u[0],h=1;h<u.length;++h)(!u[h].isValid()||u[h][i](d))&&(d=u[h]);return d}function c0(){var i=[].slice.call(arguments,0);return Cp("isBefore",i)}function d0(){var i=[].slice.call(arguments,0);return Cp("isAfter",i)}var f0=function(){return Date.now?Date.now():+new Date},Gi=["year","quarter","month","week","day","hour","minute","second","millisecond"];function h0(i){var u,d=!1,h,m=Gi.length;for(u in i)if(a(i,u)&&!(nt.call(Gi,u)!==-1&&(i[u]==null||!isNaN(i[u]))))return!1;for(h=0;h<m;++h)if(i[Gi[h]]){if(d)return!1;parseFloat(i[Gi[h]])!==ce(i[Gi[h]])&&(d=!0)}return!0}function p0(){return this._isValid}function m0(){return Mr(NaN)}function wo(i){var u=Mn(i),d=u.year||0,h=u.quarter||0,m=u.month||0,b=u.week||u.isoWeek||0,x=u.day||0,te=u.hour||0,me=u.minute||0,Ye=u.second||0,$t=u.millisecond||0;this._isValid=h0(u),this._milliseconds=+$t+Ye*1e3+me*6e4+te*1e3*60*60,this._days=+x+b*7,this._months=+m+h*3+d*12,this._data={},this._locale=nn(),this._bubble()}function ko(i){return i instanceof wo}function El(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function y0(i,u,d){var h=Math.min(i.length,u.length),m=Math.abs(i.length-u.length),b=0,x;for(x=0;x<h;x++)(d&&i[x]!==u[x]||!d&&ce(i[x])!==ce(u[x]))&&b++;return b+m}function Ip(i,u){D(i,0,0,function(){var d=this.utcOffset(),h="+";return d<0&&(d=-d,h="-"),h+_(~~(d/60),2)+u+_(~~d%60,2)})}Ip("Z",":"),Ip("ZZ",""),H("Z",tn),H("ZZ",tn),Pe(["Z","ZZ"],function(i,u,d){d._useUTC=!0,d._tzm=Sl(tn,i)});var g0=/([\+\-]|\d\d)/gi;function Sl(i,u){var d=(u||"").match(i),h,m,b;return d===null?null:(h=d[d.length-1]||[],m=(h+"").match(g0)||["-",0,0],b=+(m[1]*60)+ce(m[2]),b===0?0:m[0]==="+"?b:-b)}function Ol(i,u){var d,h;return u._isUTC?(d=u.clone(),h=(be(i)||f(i)?i.valueOf():ze(i).valueOf())-d.valueOf(),d._d.setTime(d._d.valueOf()+h),e.updateOffset(d,!1),d):ze(i).local()}function Ml(i){return-Math.round(i._d.getTimezoneOffset())}e.updateOffset=function(){};function _0(i,u,d){var h=this._offset||0,m;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=Sl(tn,i),i===null)return this}else Math.abs(i)<16&&!d&&(i=i*60);return!this._isUTC&&u&&(m=Ml(this)),this._offset=i,this._isUTC=!0,m!=null&&this.add(m,"m"),h!==i&&(!u||this._changeInProgress?Up(this,Mr(i-h,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?h:Ml(this)}function T0(i,u){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,u),this):-this.utcOffset()}function b0(i){return this.utcOffset(0,i)}function v0(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Ml(this),"m")),this}function w0(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Sl(mo,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function k0(i){return this.isValid()?(i=i?ze(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function D0(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function E0(){if(!l(this._isDSTShifted))return this._isDSTShifted;var i={},u;return ke(i,this),i=Ap(i),i._a?(u=i._isUTC?T(i._a):ze(i._a),this._isDSTShifted=this.isValid()&&y0(i._a,u.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function S0(){return this.isValid()?!this._isUTC:!1}function O0(){return this.isValid()?this._isUTC:!1}function Fp(){return this.isValid()?this._isUTC&&this._offset===0:!1}var M0=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,R0=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Mr(i,u){var d=i,h=null,m,b,x;return ko(i)?d={ms:i._milliseconds,d:i._days,M:i._months}:c(i)||!isNaN(+i)?(d={},u?d[u]=+i:d.milliseconds=+i):(h=M0.exec(i))?(m=h[1]==="-"?-1:1,d={y:0,d:ce(h[G])*m,h:ce(h[re])*m,m:ce(h[ue])*m,s:ce(h[jt])*m,ms:ce(El(h[as]*1e3))*m}):(h=R0.exec(i))?(m=h[1]==="-"?-1:1,d={y:os(h[2],m),M:os(h[3],m),w:os(h[4],m),d:os(h[5],m),h:os(h[6],m),m:os(h[7],m),s:os(h[8],m)}):d==null?d={}:typeof d=="object"&&("from"in d||"to"in d)&&(x=x0(ze(d.from),ze(d.to)),d={},d.ms=x.milliseconds,d.M=x.months),b=new wo(d),ko(i)&&a(i,"_locale")&&(b._locale=i._locale),ko(i)&&a(i,"_isValid")&&(b._isValid=i._isValid),b}Mr.fn=wo.prototype,Mr.invalid=m0;function os(i,u){var d=i&&parseFloat(i.replace(",","."));return(isNaN(d)?0:d)*u}function Lp(i,u){var d={};return d.months=u.month()-i.month()+(u.year()-i.year())*12,i.clone().add(d.months,"M").isAfter(u)&&--d.months,d.milliseconds=+u-+i.clone().add(d.months,"M"),d}function x0(i,u){var d;return i.isValid()&&u.isValid()?(u=Ol(u,i),i.isBefore(u)?d=Lp(i,u):(d=Lp(u,i),d.milliseconds=-d.milliseconds,d.months=-d.months),d):{milliseconds:0,months:0}}function Yp(i,u){return function(d,h){var m,b;return h!==null&&!isNaN(+h)&&(yt(u,"moment()."+u+"(period, number) is deprecated. Please use moment()."+u+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),b=d,d=h,h=b),m=Mr(d,h),Up(this,m,i),this}}function Up(i,u,d,h){var m=u._milliseconds,b=El(u._days),x=El(u._months);!i.isValid()||(h=h==null?!0:h,x&&bp(i,Rt(i,"Month")+x*d),b&&rs(i,"Date",Rt(i,"Date")+b*d),m&&i._d.setTime(i._d.valueOf()+m*d),h&&e.updateOffset(i,b||x))}var P0=Yp(1,"add"),A0=Yp(-1,"subtract");function Wp(i){return typeof i=="string"||i instanceof String}function N0(i){return be(i)||f(i)||Wp(i)||c(i)||I0(i)||C0(i)||i===null||i===void 0}function C0(i){var u=s(i)&&!o(i),d=!1,h=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],m,b,x=h.length;for(m=0;m<x;m+=1)b=h[m],d=d||a(i,b);return u&&d}function I0(i){var u=n(i),d=!1;return u&&(d=i.filter(function(h){return!c(h)&&Wp(i)}).length===0),u&&d}function F0(i){var u=s(i)&&!o(i),d=!1,h=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],m,b;for(m=0;m<h.length;m+=1)b=h[m],d=d||a(i,b);return u&&d}function L0(i,u){var d=i.diff(u,"days",!0);return d<-6?"sameElse":d<-1?"lastWeek":d<0?"lastDay":d<1?"sameDay":d<2?"nextDay":d<7?"nextWeek":"sameElse"}function Y0(i,u){arguments.length===1&&(arguments[0]?N0(arguments[0])?(i=arguments[0],u=void 0):F0(arguments[0])&&(u=arguments[0],i=void 0):(i=void 0,u=void 0));var d=i||ze(),h=Ol(d,this).startOf("day"),m=e.calendarFormat(this,h)||"sameElse",b=u&&(V(u[m])?u[m].call(this,d):u[m]);return this.format(b||this.localeData().calendar(m,this,ze(d)))}function U0(){return new Te(this)}function W0(i,u){var d=be(i)?i:ze(i);return this.isValid()&&d.isValid()?(u=gt(u)||"millisecond",u==="millisecond"?this.valueOf()>d.valueOf():d.valueOf()<this.clone().startOf(u).valueOf()):!1}function q0(i,u){var d=be(i)?i:ze(i);return this.isValid()&&d.isValid()?(u=gt(u)||"millisecond",u==="millisecond"?this.valueOf()<d.valueOf():this.clone().endOf(u).valueOf()<d.valueOf()):!1}function j0(i,u,d,h){var m=be(i)?i:ze(i),b=be(u)?u:ze(u);return this.isValid()&&m.isValid()&&b.isValid()?(h=h||"()",(h[0]==="("?this.isAfter(m,d):!this.isBefore(m,d))&&(h[1]===")"?this.isBefore(b,d):!this.isAfter(b,d))):!1}function $0(i,u){var d=be(i)?i:ze(i),h;return this.isValid()&&d.isValid()?(u=gt(u)||"millisecond",u==="millisecond"?this.valueOf()===d.valueOf():(h=d.valueOf(),this.clone().startOf(u).valueOf()<=h&&h<=this.clone().endOf(u).valueOf())):!1}function G0(i,u){return this.isSame(i,u)||this.isAfter(i,u)}function B0(i,u){return this.isSame(i,u)||this.isBefore(i,u)}function H0(i,u,d){var h,m,b;if(!this.isValid())return NaN;if(h=Ol(i,this),!h.isValid())return NaN;switch(m=(h.utcOffset()-this.utcOffset())*6e4,u=gt(u),u){case"year":b=Do(this,h)/12;break;case"month":b=Do(this,h);break;case"quarter":b=Do(this,h)/3;break;case"second":b=(this-h)/1e3;break;case"minute":b=(this-h)/6e4;break;case"hour":b=(this-h)/36e5;break;case"day":b=(this-h-m)/864e5;break;case"week":b=(this-h-m)/6048e5;break;default:b=this-h}return d?b:ft(b)}function Do(i,u){if(i.date()<u.date())return-Do(u,i);var d=(u.year()-i.year())*12+(u.month()-i.month()),h=i.clone().add(d,"months"),m,b;return u-h<0?(m=i.clone().add(d-1,"months"),b=(u-h)/(h-m)):(m=i.clone().add(d+1,"months"),b=(u-h)/(m-h)),-(d+b)||0}e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function z0(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function V0(i){if(!this.isValid())return null;var u=i!==!0,d=u?this.clone().utc():this;return d.year()<0||d.year()>9999?N(d,u?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):V(Date.prototype.toISOString)?u?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",N(d,"Z")):N(d,u?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function K0(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",u="",d,h,m,b;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",u="Z"),d="["+i+'("]',h=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",m="-MM-DD[T]HH:mm:ss.SSS",b=u+'[")]',this.format(d+h+m+b)}function Z0(i){i||(i=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var u=N(this,i);return this.localeData().postformat(u)}function X0(i,u){return this.isValid()&&(be(i)&&i.isValid()||ze(i).isValid())?Mr({to:this,from:i}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function Q0(i){return this.from(ze(),i)}function J0(i,u){return this.isValid()&&(be(i)&&i.isValid()||ze(i).isValid())?Mr({from:this,to:i}).locale(this.locale()).humanize(!u):this.localeData().invalidDate()}function e1(i){return this.to(ze(),i)}function qp(i){var u;return i===void 0?this._locale._abbr:(u=nn(i),u!=null&&(this._locale=u),this)}var jp=ne("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function $p(){return this._locale}var Eo=1e3,Bs=60*Eo,So=60*Bs,Gp=(365*400+97)*24*So;function Hs(i,u){return(i%u+u)%u}function Bp(i,u,d){return i<100&&i>=0?new Date(i+400,u,d)-Gp:new Date(i,u,d).valueOf()}function Hp(i,u,d){return i<100&&i>=0?Date.UTC(i+400,u,d)-Gp:Date.UTC(i,u,d)}function t1(i){var u,d;if(i=gt(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?Hp:Bp,i){case"year":u=d(this.year(),0,1);break;case"quarter":u=d(this.year(),this.month()-this.month()%3,1);break;case"month":u=d(this.year(),this.month(),1);break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":u=d(this.year(),this.month(),this.date());break;case"hour":u=this._d.valueOf(),u-=Hs(u+(this._isUTC?0:this.utcOffset()*Bs),So);break;case"minute":u=this._d.valueOf(),u-=Hs(u,Bs);break;case"second":u=this._d.valueOf(),u-=Hs(u,Eo);break}return this._d.setTime(u),e.updateOffset(this,!0),this}function r1(i){var u,d;if(i=gt(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?Hp:Bp,i){case"year":u=d(this.year()+1,0,1)-1;break;case"quarter":u=d(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":u=d(this.year(),this.month()+1,1)-1;break;case"week":u=d(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":u=d(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":u=d(this.year(),this.month(),this.date()+1)-1;break;case"hour":u=this._d.valueOf(),u+=So-Hs(u+(this._isUTC?0:this.utcOffset()*Bs),So)-1;break;case"minute":u=this._d.valueOf(),u+=Bs-Hs(u,Bs)-1;break;case"second":u=this._d.valueOf(),u+=Eo-Hs(u,Eo)-1;break}return this._d.setTime(u),e.updateOffset(this,!0),this}function n1(){return this._d.valueOf()-(this._offset||0)*6e4}function s1(){return Math.floor(this.valueOf()/1e3)}function i1(){return new Date(this.valueOf())}function a1(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function o1(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function u1(){return this.isValid()?this.toISOString():null}function l1(){return C(this)}function c1(){return g({},v(this))}function d1(){return v(this).overflow}function f1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}D("N",0,0,"eraAbbr"),D("NN",0,0,"eraAbbr"),D("NNN",0,0,"eraAbbr"),D("NNNN",0,0,"eraName"),D("NNNNN",0,0,"eraNarrow"),D("y",["y",1],"yo","eraYear"),D("y",["yy",2],0,"eraYear"),D("y",["yyy",3],0,"eraYear"),D("y",["yyyy",4],0,"eraYear"),H("N",Rl),H("NN",Rl),H("NNN",Rl),H("NNNN",k1),H("NNNNN",D1),Pe(["N","NN","NNN","NNNN","NNNNN"],function(i,u,d,h){var m=d._locale.erasParse(i,h,d._strict);m?v(d).era=m:v(d).invalidEra=i}),H("y",fr),H("yy",fr),H("yyy",fr),H("yyyy",fr),H("yo",E1),Pe(["y","yy","yyy","yyyy"],et),Pe(["yo"],function(i,u,d,h){var m;d._locale._eraYearOrdinalRegex&&(m=i.match(d._locale._eraYearOrdinalRegex)),d._locale.eraYearOrdinalParse?u[et]=d._locale.eraYearOrdinalParse(i,m):u[et]=parseInt(i,10)});function h1(i,u){var d,h,m,b=this._eras||nn("en")._eras;for(d=0,h=b.length;d<h;++d){switch(typeof b[d].since){case"string":m=e(b[d].since).startOf("day"),b[d].since=m.valueOf();break}switch(typeof b[d].until){case"undefined":b[d].until=1/0;break;case"string":m=e(b[d].until).startOf("day").valueOf(),b[d].until=m.valueOf();break}}return b}function p1(i,u,d){var h,m,b=this.eras(),x,te,me;for(i=i.toUpperCase(),h=0,m=b.length;h<m;++h)if(x=b[h].name.toUpperCase(),te=b[h].abbr.toUpperCase(),me=b[h].narrow.toUpperCase(),d)switch(u){case"N":case"NN":case"NNN":if(te===i)return b[h];break;case"NNNN":if(x===i)return b[h];break;case"NNNNN":if(me===i)return b[h];break}else if([x,te,me].indexOf(i)>=0)return b[h]}function m1(i,u){var d=i.since<=i.until?1:-1;return u===void 0?e(i.since).year():e(i.since).year()+(u-i.offset)*d}function y1(){var i,u,d,h=this.localeData().eras();for(i=0,u=h.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),h[i].since<=d&&d<=h[i].until||h[i].until<=d&&d<=h[i].since)return h[i].name;return""}function g1(){var i,u,d,h=this.localeData().eras();for(i=0,u=h.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),h[i].since<=d&&d<=h[i].until||h[i].until<=d&&d<=h[i].since)return h[i].narrow;return""}function _1(){var i,u,d,h=this.localeData().eras();for(i=0,u=h.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),h[i].since<=d&&d<=h[i].until||h[i].until<=d&&d<=h[i].since)return h[i].abbr;return""}function T1(){var i,u,d,h,m=this.localeData().eras();for(i=0,u=m.length;i<u;++i)if(d=m[i].since<=m[i].until?1:-1,h=this.clone().startOf("day").valueOf(),m[i].since<=h&&h<=m[i].until||m[i].until<=h&&h<=m[i].since)return(this.year()-e(m[i].since).year())*d+m[i].offset;return this.year()}function b1(i){return a(this,"_erasNameRegex")||xl.call(this),i?this._erasNameRegex:this._erasRegex}function v1(i){return a(this,"_erasAbbrRegex")||xl.call(this),i?this._erasAbbrRegex:this._erasRegex}function w1(i){return a(this,"_erasNarrowRegex")||xl.call(this),i?this._erasNarrowRegex:this._erasRegex}function Rl(i,u){return u.erasAbbrRegex(i)}function k1(i,u){return u.erasNameRegex(i)}function D1(i,u){return u.erasNarrowRegex(i)}function E1(i,u){return u._eraYearOrdinalRegex||fr}function xl(){var i=[],u=[],d=[],h=[],m,b,x=this.eras();for(m=0,b=x.length;m<b;++m)u.push(ht(x[m].name)),i.push(ht(x[m].abbr)),d.push(ht(x[m].narrow)),h.push(ht(x[m].name)),h.push(ht(x[m].abbr)),h.push(ht(x[m].narrow));this._erasRegex=new RegExp("^("+h.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+u.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+d.join("|")+")","i")}D(0,["gg",2],0,function(){return this.weekYear()%100}),D(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Oo(i,u){D(0,[i,i.length],0,u)}Oo("gggg","weekYear"),Oo("ggggg","weekYear"),Oo("GGGG","isoWeekYear"),Oo("GGGGG","isoWeekYear"),dt("weekYear","gg"),dt("isoWeekYear","GG"),$e("weekYear",1),$e("isoWeekYear",1),H("G",An),H("g",An),H("GG",Le,_t),H("gg",Le,_t),H("GGGG",Pn,dr),H("gggg",Pn,dr),H("GGGGG",ss,en),H("ggggg",ss,en),mr(["gggg","ggggg","GGGG","GGGGG"],function(i,u,d,h){u[h.substr(0,2)]=ce(i)}),mr(["gg","GG"],function(i,u,d,h){u[h]=e.parseTwoDigitYear(i)});function S1(i){return zp.call(this,i,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function O1(i){return zp.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function M1(){return rn(this.year(),1,4)}function R1(){return rn(this.isoWeekYear(),1,4)}function x1(){var i=this.localeData()._week;return rn(this.year(),i.dow,i.doy)}function P1(){var i=this.localeData()._week;return rn(this.weekYear(),i.dow,i.doy)}function zp(i,u,d,h,m){var b;return i==null?qi(this,h,m).year:(b=rn(i,h,m),u>b&&(u=b),A1.call(this,i,u,d,h,m))}function A1(i,u,d,h,m){var b=Dp(i,u,d,h,m),x=Wi(b.year,0,b.dayOfYear);return this.year(x.getUTCFullYear()),this.month(x.getUTCMonth()),this.date(x.getUTCDate()),this}D("Q",0,"Qo","quarter"),dt("quarter","Q"),$e("quarter",7),H("Q",Rn),Pe("Q",function(i,u){u[Qe]=(ce(i)-1)*3});function N1(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}D("D",["DD",2],"Do","date"),dt("date","D"),$e("date",9),H("D",Le),H("DD",Le,_t),H("Do",function(i,u){return i?u._dayOfMonthOrdinalParse||u._ordinalParse:u._dayOfMonthOrdinalParseLenient}),Pe(["D","DD"],G),Pe("Do",function(i,u){u[G]=ce(i.match(Le)[0])});var Vp=Jr("Date",!0);D("DDD",["DDDD",3],"DDDo","dayOfYear"),dt("dayOfYear","DDD"),$e("dayOfYear",4),H("DDD",ns),H("DDDD",Yi),Pe(["DDD","DDDD"],function(i,u,d){d._dayOfYear=ce(i)});function C1(i){var u=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?u:this.add(i-u,"d")}D("m",["mm",2],0,"minute"),dt("minute","m"),$e("minute",14),H("m",Le),H("mm",Le,_t),Pe(["m","mm"],ue);var I1=Jr("Minutes",!1);D("s",["ss",2],0,"second"),dt("second","s"),$e("second",15),H("s",Le),H("ss",Le,_t),Pe(["s","ss"],jt);var F1=Jr("Seconds",!1);D("S",0,0,function(){return~~(this.millisecond()/100)}),D(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),D(0,["SSS",3],0,"millisecond"),D(0,["SSSS",4],0,function(){return this.millisecond()*10}),D(0,["SSSSS",5],0,function(){return this.millisecond()*100}),D(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),D(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),D(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),D(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),dt("millisecond","ms"),$e("millisecond",16),H("S",ns,Rn),H("SS",ns,_t),H("SSS",ns,Yi);var Cn,Kp;for(Cn="SSSS";Cn.length<=9;Cn+="S")H(Cn,fr);function L1(i,u){u[as]=ce(("0."+i)*1e3)}for(Cn="S";Cn.length<=9;Cn+="S")Pe(Cn,L1);Kp=Jr("Milliseconds",!1),D("z",0,0,"zoneAbbr"),D("zz",0,0,"zoneName");function Y1(){return this._isUTC?"UTC":""}function U1(){return this._isUTC?"Coordinated Universal Time":""}var F=Te.prototype;F.add=P0,F.calendar=Y0,F.clone=U0,F.diff=H0,F.endOf=r1,F.format=Z0,F.from=X0,F.fromNow=Q0,F.to=J0,F.toNow=e1,F.get=po,F.invalidAt=d1,F.isAfter=W0,F.isBefore=q0,F.isBetween=j0,F.isSame=$0,F.isSameOrAfter=G0,F.isSameOrBefore=B0,F.isValid=l1,F.lang=jp,F.locale=qp,F.localeData=$p,F.max=l0,F.min=u0,F.parsingFlags=c1,F.set=Ur,F.startOf=t1,F.subtract=A0,F.toArray=a1,F.toObject=o1,F.toDate=i1,F.toISOString=V0,F.inspect=K0,typeof Symbol!="undefined"&&Symbol.for!=null&&(F[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),F.toJSON=u1,F.toString=z0,F.unix=s1,F.valueOf=n1,F.creationData=f1,F.eraName=y1,F.eraNarrow=g1,F.eraAbbr=_1,F.eraYear=T1,F.year=kp,F.isLeapYear=ow,F.weekYear=S1,F.isoWeekYear=O1,F.quarter=F.quarters=N1,F.month=vp,F.daysInMonth=sw,F.week=F.weeks=hw,F.isoWeek=F.isoWeeks=pw,F.weeksInYear=x1,F.weeksInWeekYear=P1,F.isoWeeksInYear=M1,F.isoWeeksInISOWeekYear=R1,F.date=Vp,F.day=F.days=Ow,F.weekday=Mw,F.isoWeekday=Rw,F.dayOfYear=C1,F.hour=F.hours=Fw,F.minute=F.minutes=I1,F.second=F.seconds=F1,F.millisecond=F.milliseconds=Kp,F.utcOffset=_0,F.utc=b0,F.local=v0,F.parseZone=w0,F.hasAlignedHourOffset=k0,F.isDST=D0,F.isLocal=S0,F.isUtcOffset=O0,F.isUtc=Fp,F.isUTC=Fp,F.zoneAbbr=Y1,F.zoneName=U1,F.dates=ne("dates accessor is deprecated. Use date instead.",Vp),F.months=ne("months accessor is deprecated. Use month instead",vp),F.years=ne("years accessor is deprecated. Use year instead",kp),F.zone=ne("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",T0),F.isDSTShifted=ne("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",E0);function W1(i){return ze(i*1e3)}function q1(){return ze.apply(null,arguments).parseZone()}function Zp(i){return i}var Me=Q.prototype;Me.calendar=y,Me.longDateFormat=pe,Me.invalidDate=Ce,Me.ordinal=Xe,Me.preparse=Zp,Me.postformat=Zp,Me.relativeTime=Or,Me.pastFuture=it,Me.set=q,Me.eras=h1,Me.erasParse=p1,Me.erasConvertYear=m1,Me.erasAbbrRegex=v1,Me.erasNameRegex=b1,Me.erasNarrowRegex=w1,Me.months=ew,Me.monthsShort=tw,Me.monthsParse=nw,Me.monthsRegex=aw,Me.monthsShortRegex=iw,Me.week=lw,Me.firstDayOfYear=fw,Me.firstDayOfWeek=dw,Me.weekdays=ww,Me.weekdaysMin=Dw,Me.weekdaysShort=kw,Me.weekdaysParse=Sw,Me.weekdaysRegex=xw,Me.weekdaysShortRegex=Pw,Me.weekdaysMinRegex=Aw,Me.isPM=Cw,Me.meridiem=Lw;function Mo(i,u,d,h){var m=nn(),b=T().set(h,u);return m[d](b,i)}function Xp(i,u,d){if(c(i)&&(u=i,i=void 0),i=i||"",u!=null)return Mo(i,u,d,"month");var h,m=[];for(h=0;h<12;h++)m[h]=Mo(i,h,d,"month");return m}function Pl(i,u,d,h){typeof i=="boolean"?(c(u)&&(d=u,u=void 0),u=u||""):(u=i,d=u,i=!1,c(u)&&(d=u,u=void 0),u=u||"");var m=nn(),b=i?m._week.dow:0,x,te=[];if(d!=null)return Mo(u,(d+b)%7,h,"day");for(x=0;x<7;x++)te[x]=Mo(u,(x+b)%7,h,"day");return te}function j1(i,u){return Xp(i,u,"months")}function $1(i,u){return Xp(i,u,"monthsShort")}function G1(i,u,d){return Pl(i,u,d,"weekdays")}function B1(i,u,d){return Pl(i,u,d,"weekdaysShort")}function H1(i,u,d){return Pl(i,u,d,"weekdaysMin")}Nn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var u=i%10,d=ce(i%100/10)===1?"th":u===1?"st":u===2?"nd":u===3?"rd":"th";return i+d}}),e.lang=ne("moment.lang is deprecated. Use moment.locale instead.",Nn),e.langData=ne("moment.langData is deprecated. Use moment.localeData instead.",nn);var sn=Math.abs;function z1(){var i=this._data;return this._milliseconds=sn(this._milliseconds),this._days=sn(this._days),this._months=sn(this._months),i.milliseconds=sn(i.milliseconds),i.seconds=sn(i.seconds),i.minutes=sn(i.minutes),i.hours=sn(i.hours),i.months=sn(i.months),i.years=sn(i.years),this}function Qp(i,u,d,h){var m=Mr(u,d);return i._milliseconds+=h*m._milliseconds,i._days+=h*m._days,i._months+=h*m._months,i._bubble()}function V1(i,u){return Qp(this,i,u,1)}function K1(i,u){return Qp(this,i,u,-1)}function Jp(i){return i<0?Math.floor(i):Math.ceil(i)}function Z1(){var i=this._milliseconds,u=this._days,d=this._months,h=this._data,m,b,x,te,me;return i>=0&&u>=0&&d>=0||i<=0&&u<=0&&d<=0||(i+=Jp(Al(d)+u)*864e5,u=0,d=0),h.milliseconds=i%1e3,m=ft(i/1e3),h.seconds=m%60,b=ft(m/60),h.minutes=b%60,x=ft(b/60),h.hours=x%24,u+=ft(x/24),me=ft(em(u)),d+=me,u-=Jp(Al(me)),te=ft(d/12),d%=12,h.days=u,h.months=d,h.years=te,this}function em(i){return i*4800/146097}function Al(i){return i*146097/4800}function X1(i){if(!this.isValid())return NaN;var u,d,h=this._milliseconds;if(i=gt(i),i==="month"||i==="quarter"||i==="year")switch(u=this._days+h/864e5,d=this._months+em(u),i){case"month":return d;case"quarter":return d/3;case"year":return d/12}else switch(u=this._days+Math.round(Al(this._months)),i){case"week":return u/7+h/6048e5;case"day":return u+h/864e5;case"hour":return u*24+h/36e5;case"minute":return u*1440+h/6e4;case"second":return u*86400+h/1e3;case"millisecond":return Math.floor(u*864e5)+h;default:throw new Error("Unknown unit "+i)}}function Q1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+ce(this._months/12)*31536e6:NaN}function an(i){return function(){return this.as(i)}}var J1=an("ms"),ek=an("s"),tk=an("m"),rk=an("h"),nk=an("d"),sk=an("w"),ik=an("M"),ak=an("Q"),ok=an("y");function uk(){return Mr(this)}function lk(i){return i=gt(i),this.isValid()?this[i+"s"]():NaN}function us(i){return function(){return this.isValid()?this._data[i]:NaN}}var ck=us("milliseconds"),dk=us("seconds"),fk=us("minutes"),hk=us("hours"),pk=us("days"),mk=us("months"),yk=us("years");function gk(){return ft(this.days()/7)}var on=Math.round,zs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function _k(i,u,d,h,m){return m.relativeTime(u||1,!!d,i,h)}function Tk(i,u,d,h){var m=Mr(i).abs(),b=on(m.as("s")),x=on(m.as("m")),te=on(m.as("h")),me=on(m.as("d")),Ye=on(m.as("M")),$t=on(m.as("w")),un=on(m.as("y")),In=b<=d.ss&&["s",b]||b<d.s&&["ss",b]||x<=1&&["m"]||x<d.m&&["mm",x]||te<=1&&["h"]||te<d.h&&["hh",te]||me<=1&&["d"]||me<d.d&&["dd",me];return d.w!=null&&(In=In||$t<=1&&["w"]||$t<d.w&&["ww",$t]),In=In||Ye<=1&&["M"]||Ye<d.M&&["MM",Ye]||un<=1&&["y"]||["yy",un],In[2]=u,In[3]=+i>0,In[4]=h,_k.apply(null,In)}function bk(i){return i===void 0?on:typeof i=="function"?(on=i,!0):!1}function vk(i,u){return zs[i]===void 0?!1:u===void 0?zs[i]:(zs[i]=u,i==="s"&&(zs.ss=u-1),!0)}function wk(i,u){if(!this.isValid())return this.localeData().invalidDate();var d=!1,h=zs,m,b;return typeof i=="object"&&(u=i,i=!1),typeof i=="boolean"&&(d=i),typeof u=="object"&&(h=Object.assign({},zs,u),u.s!=null&&u.ss==null&&(h.ss=u.s-1)),m=this.localeData(),b=Tk(this,!d,h,m),d&&(b=m.pastFuture(+this,b)),m.postformat(b)}var Nl=Math.abs;function Vs(i){return(i>0)-(i<0)||+i}function Ro(){if(!this.isValid())return this.localeData().invalidDate();var i=Nl(this._milliseconds)/1e3,u=Nl(this._days),d=Nl(this._months),h,m,b,x,te=this.asSeconds(),me,Ye,$t,un;return te?(h=ft(i/60),m=ft(h/60),i%=60,h%=60,b=ft(d/12),d%=12,x=i?i.toFixed(3).replace(/\.?0+$/,""):"",me=te<0?"-":"",Ye=Vs(this._months)!==Vs(te)?"-":"",$t=Vs(this._days)!==Vs(te)?"-":"",un=Vs(this._milliseconds)!==Vs(te)?"-":"",me+"P"+(b?Ye+b+"Y":"")+(d?Ye+d+"M":"")+(u?$t+u+"D":"")+(m||h||i?"T":"")+(m?un+m+"H":"")+(h?un+h+"M":"")+(i?un+x+"S":"")):"P0D"}var Oe=wo.prototype;Oe.isValid=p0,Oe.abs=z1,Oe.add=V1,Oe.subtract=K1,Oe.as=X1,Oe.asMilliseconds=J1,Oe.asSeconds=ek,Oe.asMinutes=tk,Oe.asHours=rk,Oe.asDays=nk,Oe.asWeeks=sk,Oe.asMonths=ik,Oe.asQuarters=ak,Oe.asYears=ok,Oe.valueOf=Q1,Oe._bubble=Z1,Oe.clone=uk,Oe.get=lk,Oe.milliseconds=ck,Oe.seconds=dk,Oe.minutes=fk,Oe.hours=hk,Oe.days=pk,Oe.weeks=gk,Oe.months=mk,Oe.years=yk,Oe.humanize=wk,Oe.toISOString=Ro,Oe.toString=Ro,Oe.toJSON=Ro,Oe.locale=qp,Oe.localeData=$p,Oe.toIsoString=ne("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ro),Oe.lang=jp,D("X",0,0,"unix"),D("x",0,0,"valueOf"),H("x",An),H("X",yo),Pe("X",function(i,u,d){d._d=new Date(parseFloat(i)*1e3)}),Pe("x",function(i,u,d){d._d=new Date(ce(i))});return e.version="2.29.4",t(ze),e.fn=F,e.min=c0,e.max=d0,e.now=f0,e.utc=T,e.unix=W1,e.months=j1,e.isDate=f,e.locale=Nn,e.invalid=$,e.duration=Mr,e.isMoment=be,e.weekdays=G1,e.parseZone=q1,e.localeData=nn,e.isDuration=ko,e.monthsShort=$1,e.weekdaysMin=H1,e.defineLocale=bl,e.updateLocale=qw,e.locales=jw,e.weekdaysShort=B1,e.normalizeUnits=gt,e.relativeTimeRounding=bk,e.relativeTimeThreshold=vk,e.calendarFormat=L0,e.prototype=F,e.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},e})});var nb=S((fY,Mu)=>{var FT,LT,YT,UT,WT,qT,jT,$T,GT,Su,Oh,BT,HT,zT,pi,VT,KT,ZT,XT,QT,JT,eb,tb,rb,Ou;(function(r){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){r(t(e,t(n)))}):typeof Mu=="object"&&typeof Mu.exports=="object"?r(t(e,t(Mu.exports))):r(t(e));function t(n,s){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(a,o){return n[a]=s?s(a,o):o}}})(function(r){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(n[a]=s[a])};FT=function(n,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(n,s);function a(){this.constructor=n}n.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)},LT=Object.assign||function(n){for(var s,a=1,o=arguments.length;a<o;a++){s=arguments[a];for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(n[l]=s[l])}return n},YT=function(n,s){var a={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&s.indexOf(o)<0&&(a[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(n);l<o.length;l++)s.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(n,o[l])&&(a[o[l]]=n[o[l]]);return a},UT=function(n,s,a,o){var l=arguments.length,c=l<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,a):o,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(n,s,a,o);else for(var p=n.length-1;p>=0;p--)(f=n[p])&&(c=(l<3?f(c):l>3?f(s,a,c):f(s,a))||c);return l>3&&c&&Object.defineProperty(s,a,c),c},WT=function(n,s){return function(a,o){s(a,o,n)}},qT=function(n,s){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,s)},jT=function(n,s,a,o){function l(c){return c instanceof a?c:new a(function(f){f(c)})}return new(a||(a=Promise))(function(c,f){function p(O){try{T(o.next(O))}catch(v){f(v)}}function g(O){try{T(o.throw(O))}catch(v){f(v)}}function T(O){O.done?c(O.value):l(O.value).then(p,g)}T((o=o.apply(n,s||[])).next())})},$T=function(n,s){var a={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,l,c,f;return f={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function p(T){return function(O){return g([T,O])}}function g(T){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,l&&(c=T[0]&2?l.return:T[0]?l.throw||((c=l.return)&&c.call(l),0):l.next)&&!(c=c.call(l,T[1])).done)return c;switch(l=0,c&&(T=[T[0]&2,c.value]),T[0]){case 0:case 1:c=T;break;case 4:return a.label++,{value:T[1],done:!1};case 5:a.label++,l=T[1],T=[0];continue;case 7:T=a.ops.pop(),a.trys.pop();continue;default:if(c=a.trys,!(c=c.length>0&&c[c.length-1])&&(T[0]===6||T[0]===2)){a=0;continue}if(T[0]===3&&(!c||T[1]>c[0]&&T[1]<c[3])){a.label=T[1];break}if(T[0]===6&&a.label<c[1]){a.label=c[1],c=T;break}if(c&&a.label<c[2]){a.label=c[2],a.ops.push(T);break}c[2]&&a.ops.pop(),a.trys.pop();continue}T=s.call(n,a)}catch(O){T=[6,O],l=0}finally{o=c=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}},GT=function(n,s){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&Ou(s,n,a)},Ou=Object.create?function(n,s,a,o){o===void 0&&(o=a);var l=Object.getOwnPropertyDescriptor(s,a);(!l||("get"in l?!s.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return s[a]}}),Object.defineProperty(n,o,l)}:function(n,s,a,o){o===void 0&&(o=a),n[o]=s[a]},Su=function(n){var s=typeof Symbol=="function"&&Symbol.iterator,a=s&&n[s],o=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&o>=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},Oh=function(n,s){var a=typeof Symbol=="function"&&n[Symbol.iterator];if(!a)return n;var o=a.call(n),l,c=[],f;try{for(;(s===void 0||s-- >0)&&!(l=o.next()).done;)c.push(l.value)}catch(p){f={error:p}}finally{try{l&&!l.done&&(a=o.return)&&a.call(o)}finally{if(f)throw f.error}}return c},BT=function(){for(var n=[],s=0;s<arguments.length;s++)n=n.concat(Oh(arguments[s]));return n},HT=function(){for(var n=0,s=0,a=arguments.length;s<a;s++)n+=arguments[s].length;for(var o=Array(n),l=0,s=0;s<a;s++)for(var c=arguments[s],f=0,p=c.length;f<p;f++,l++)o[l]=c[f];return o},zT=function(n,s,a){if(a||arguments.length===2)for(var o=0,l=s.length,c;o<l;o++)(c||!(o in s))&&(c||(c=Array.prototype.slice.call(s,0,o)),c[o]=s[o]);return n.concat(c||Array.prototype.slice.call(s))},pi=function(n){return this instanceof pi?(this.v=n,this):new pi(n)},VT=function(n,s,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=a.apply(n,s||[]),l,c=[];return l={},f("next"),f("throw"),f("return"),l[Symbol.asyncIterator]=function(){return this},l;function f(R){o[R]&&(l[R]=function(C){return new Promise(function($,B){c.push([R,C,$,B])>1||p(R,C)})})}function p(R,C){try{g(o[R](C))}catch($){v(c[0][3],$)}}function g(R){R.value instanceof pi?Promise.resolve(R.value.v).then(T,O):v(c[0][2],R)}function T(R){p("next",R)}function O(R){p("throw",R)}function v(R,C){R(C),c.shift(),c.length&&p(c[0][0],c[0][1])}},KT=function(n){var s,a;return s={},o("next"),o("throw",function(l){throw l}),o("return"),s[Symbol.iterator]=function(){return this},s;function o(l,c){s[l]=n[l]?function(f){return(a=!a)?{value:pi(n[l](f)),done:l==="return"}:c?c(f):f}:c}},ZT=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=n[Symbol.asyncIterator],a;return s?s.call(n):(n=typeof Su=="function"?Su(n):n[Symbol.iterator](),a={},o("next"),o("throw"),o("return"),a[Symbol.asyncIterator]=function(){return this},a);function o(c){a[c]=n[c]&&function(f){return new Promise(function(p,g){f=n[c](f),l(p,g,f.done,f.value)})}}function l(c,f,p,g){Promise.resolve(g).then(function(T){c({value:T,done:p})},f)}},XT=function(n,s){return Object.defineProperty?Object.defineProperty(n,"raw",{value:s}):n.raw=s,n};var t=Object.create?function(n,s){Object.defineProperty(n,"default",{enumerable:!0,value:s})}:function(n,s){n.default=s};QT=function(n){if(n&&n.__esModule)return n;var s={};if(n!=null)for(var a in n)a!=="default"&&Object.prototype.hasOwnProperty.call(n,a)&&Ou(s,n,a);return t(s,n),s},JT=function(n){return n&&n.__esModule?n:{default:n}},eb=function(n,s,a,o){if(a==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof s=="function"?n!==s||!o:!s.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?o:a==="a"?o.call(n):o?o.value:s.get(n)},tb=function(n,s,a,o,l){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof s=="function"?n!==s||!l:!s.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?l.call(n,a):l?l.value=a:s.set(n,a),a},rb=function(n,s){if(s===null||typeof s!="object"&&typeof s!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?s===n:n.has(s)},r("__extends",FT),r("__assign",LT),r("__rest",YT),r("__decorate",UT),r("__param",WT),r("__metadata",qT),r("__awaiter",jT),r("__generator",$T),r("__exportStar",GT),r("__createBinding",Ou),r("__values",Su),r("__read",Oh),r("__spread",BT),r("__spreadArrays",HT),r("__spreadArray",zT),r("__await",pi),r("__asyncGenerator",VT),r("__asyncDelegator",KT),r("__asyncValues",ZT),r("__makeTemplateObject",XT),r("__importStar",QT),r("__importDefault",JT),r("__classPrivateFieldGet",eb),r("__classPrivateFieldSet",tb),r("__classPrivateFieldIn",rb)})});var jb=S((Wb,qb)=>{(function(r){var e=Object.hasOwnProperty,t=Array.isArray?Array.isArray:function(_){return Object.prototype.toString.call(_)==="[object Array]"},n=10,s=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",o=typeof Reflect=="object",l=typeof setImmediate=="function",c=l?setImmediate:setTimeout,f=a?o&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(y){var _=Object.getOwnPropertyNames(y);return _.push.apply(_,Object.getOwnPropertySymbols(y)),_}:Object.keys;function p(){this._events={},this._conf&&g.call(this,this._conf)}function g(y){y&&(this._conf=y,y.delimiter&&(this.delimiter=y.delimiter),y.maxListeners!==r&&(this._maxListeners=y.maxListeners),y.wildcard&&(this.wildcard=y.wildcard),y.newListener&&(this._newListener=y.newListener),y.removeListener&&(this._removeListener=y.removeListener),y.verboseMemoryLeak&&(this.verboseMemoryLeak=y.verboseMemoryLeak),y.ignoreErrors&&(this.ignoreErrors=y.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function T(y,_){var w="(node) warning: possible EventEmitter memory leak detected. "+y+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(w+=" Event name: "+_+"."),typeof process!="undefined"&&process.emitWarning){var k=new Error(w);k.name="MaxListenersExceededWarning",k.emitter=this,k.count=y,process.emitWarning(k)}else console.error(w),console.trace&&console.trace()}var O=function(y,_,w){var k=arguments.length;switch(k){case 0:return[];case 1:return[y];case 2:return[y,_];case 3:return[y,_,w];default:for(var E=new Array(k);k--;)E[k]=arguments[k];return E}};function v(y,_){for(var w={},k,E=y.length,M=_?_.length:0,D=0;D<E;D++)k=y[D],w[k]=D<M?_[D]:r;return w}function R(y,_,w){this._emitter=y,this._target=_,this._listeners={},this._listenersCount=0;var k,E;if((w.on||w.off)&&(k=w.on,E=w.off),_.addEventListener?(k=_.addEventListener,E=_.removeEventListener):_.addListener?(k=_.addListener,E=_.removeListener):_.on&&(k=_.on,E=_.off),!k&&!E)throw Error("target does not implement any known event API");if(typeof k!="function")throw TypeError("on method must be a function");if(typeof E!="function")throw TypeError("off method must be a function");this._on=k,this._off=E;var M=y._observers;M?M.push(this):y._observers=[this]}Object.assign(R.prototype,{subscribe:function(y,_,w){var k=this,E=this._target,M=this._emitter,D=this._listeners,I=function(){var A=O.apply(null,arguments),N={data:A,name:_,original:y};if(w){var j=w.call(E,N);j!==!1&&M.emit.apply(M,[N.name].concat(A));return}M.emit.apply(M,[_].concat(A))};if(D[y])throw Error("Event '"+y+"' is already listening");this._listenersCount++,M._newListener&&M._removeListener&&!k._onNewListener?(this._onNewListener=function(A){A===_&&D[y]===null&&(D[y]=I,k._on.call(E,y,I))},M.on("newListener",this._onNewListener),this._onRemoveListener=function(A){A===_&&!M.hasListeners(A)&&D[y]&&(D[y]=null,k._off.call(E,y,I))},D[y]=null,M.on("removeListener",this._onRemoveListener)):(D[y]=I,k._on.call(E,y,I))},unsubscribe:function(y){var _=this,w=this._listeners,k=this._emitter,E,M,D=this._off,I=this._target,A;if(y&&typeof y!="string")throw TypeError("event must be a string");function N(){_._onNewListener&&(k.off("newListener",_._onNewListener),k.off("removeListener",_._onRemoveListener),_._onNewListener=null,_._onRemoveListener=null);var j=be.call(k,_);k._observers.splice(j,1)}if(y){if(E=w[y],!E)return;D.call(I,y,E),delete w[y],--this._listenersCount||N()}else{for(M=f(w),A=M.length;A-- >0;)y=M[A],D.call(I,y,w[y]);this._listeners={},this._listenersCount=0,N()}}});function C(y,_,w,k){var E=Object.assign({},_);if(!y)return E;if(typeof y!="object")throw TypeError("options must be an object");var M=Object.keys(y),D=M.length,I,A,N;function j(pe){throw Error('Invalid "'+I+'" option value'+(pe?". Reason: "+pe:""))}for(var De=0;De<D;De++){if(I=M[De],!k&&!e.call(_,I))throw Error('Unknown "'+I+'" option');A=y[I],A!==r&&(N=w[I],E[I]=N?N(A,j):A)}return E}function $(y,_){return(typeof y!="function"||!y.hasOwnProperty("prototype"))&&_("value must be a constructor"),y}function B(y){var _="value must be type of "+y.join("|"),w=y.length,k=y[0],E=y[1];return w===1?function(M,D){if(typeof M===k)return M;D(_)}:w===2?function(M,D){var I=typeof M;if(I===k||I===E)return M;D(_)}:function(M,D){for(var I=typeof M,A=w;A-- >0;)if(I===y[A])return M;D(_)}}var W=B(["function"]),ke=B(["object","function"]);function Te(y,_,w){var k,E,M=0,D,I=new y(function(A,N,j){w=C(w,{timeout:0,overload:!1},{timeout:function(Ce,K){return Ce*=1,(typeof Ce!="number"||Ce<0||!Number.isFinite(Ce))&&K("timeout must be a positive number"),Ce}}),k=!w.overload&&typeof y.prototype.cancel=="function"&&typeof j=="function";function De(){E&&(E=null),M&&(clearTimeout(M),M=0)}var pe=function(Ce){De(),A(Ce)},le=function(Ce){De(),N(Ce)};k?_(pe,le,j):(E=[function(Ce){le(Ce||Error("canceled"))}],_(pe,le,function(Ce){if(D)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Ce!="function")throw TypeError("onCancel callback must be a function");E.push(Ce)}),D=!0),w.timeout>0&&(M=setTimeout(function(){var Ce=Error("timeout");Ce.code="ETIMEDOUT",M=0,I.cancel(Ce),N(Ce)},w.timeout))});return k||(I.cancel=function(A){if(!!E){for(var N=E.length,j=1;j<N;j++)E[j](A);E[0](A),E=null}}),I}function be(y){var _=this._observers;if(!_)return-1;for(var w=_.length,k=0;k<w;k++)if(_[k]._target===y)return k;return-1}function ee(y,_,w,k,E){if(!w)return null;if(k===0){var M=typeof _;if(M==="string"){var D,I,A=0,N=0,j=this.delimiter,De=j.length;if((I=_.indexOf(j))!==-1){D=new Array(5);do D[A++]=_.slice(N,I),N=I+De;while((I=_.indexOf(j,N))!==-1);D[A++]=_.slice(N),_=D,E=A}else _=[_],E=1}else M==="object"?E=_.length:(_=[_],E=1)}var pe=null,le,Ce,K,qe,Xe,ct=_[k],Or=_[k+1],it,je;if(k===E)w._listeners&&(typeof w._listeners=="function"?(y&&y.push(w._listeners),pe=[w]):(y&&y.push.apply(y,w._listeners),pe=[w]));else if(ct==="*"){for(it=f(w),I=it.length;I-- >0;)le=it[I],le!=="_listeners"&&(je=ee(y,_,w[le],k+1,E),je&&(pe?pe.push.apply(pe,je):pe=je));return pe}else if(ct==="**"){for(Xe=k+1===E||k+2===E&&Or==="*",Xe&&w._listeners&&(pe=ee(y,_,w,E,E)),it=f(w),I=it.length;I-- >0;)le=it[I],le!=="_listeners"&&(le==="*"||le==="**"?(w[le]._listeners&&!Xe&&(je=ee(y,_,w[le],E,E),je&&(pe?pe.push.apply(pe,je):pe=je)),je=ee(y,_,w[le],k,E)):le===Or?je=ee(y,_,w[le],k+2,E):je=ee(y,_,w[le],k,E),je&&(pe?pe.push.apply(pe,je):pe=je));return pe}else w[ct]&&(pe=ee(y,_,w[ct],k+1,E));if(Ce=w["*"],Ce&&ee(y,_,Ce,k+1,E),K=w["**"],K)if(k<E)for(K._listeners&&ee(y,_,K,E,E),it=f(K),I=it.length;I-- >0;)le=it[I],le!=="_listeners"&&(le===Or?ee(y,_,K[le],k+2,E):le===ct?ee(y,_,K[le],k+1,E):(qe={},qe[le]=K[le],ee(y,_,{"**":qe},k+1,E)));else K._listeners?ee(y,_,K,E,E):K["*"]&&K["*"]._listeners&&ee(y,_,K["*"],E,E);return pe}function ne(y,_,w){var k=0,E=0,M,D=this.delimiter,I=D.length,A;if(typeof y=="string")if((M=y.indexOf(D))!==-1){A=new Array(5);do A[k++]=y.slice(E,M),E=M+I;while((M=y.indexOf(D,E))!==-1);A[k++]=y.slice(E)}else A=[y],k=1;else A=y,k=y.length;if(k>1){for(M=0;M+1<k;M++)if(A[M]==="**"&&A[M+1]==="**")return}var N=this.listenerTree,j;for(M=0;M<k;M++)if(j=A[M],N=N[j]||(N[j]={}),M===k-1)return N._listeners?(typeof N._listeners=="function"&&(N._listeners=[N._listeners]),w?N._listeners.unshift(_):N._listeners.push(_),!N._listeners.warned&&this._maxListeners>0&&N._listeners.length>this._maxListeners&&(N._listeners.warned=!0,T.call(this,N._listeners.length,j))):N._listeners=_,!0;return!0}function It(y,_,w,k){for(var E=f(y),M=E.length,D,I,A,N=y._listeners,j;M-- >0;)I=E[M],D=y[I],I==="_listeners"?A=w:A=w?w.concat(I):[I],j=k||typeof I=="symbol",N&&_.push(j?A:A.join(this.delimiter)),typeof D=="object"&&It.call(this,D,_,A,j);return _}function yt(y){for(var _=f(y),w=_.length,k,E,M;w-- >0;)E=_[w],k=y[E],k&&(M=!0,E!=="_listeners"&&!yt(k)&&delete y[E]);return M}function V(y,_,w){this.emitter=y,this.event=_,this.listener=w}V.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function q(y,_,w){if(w===!0)E=!0;else if(w===!1)k=!0;else{if(!w||typeof w!="object")throw TypeError("options should be an object or true");var k=w.async,E=w.promisify,M=w.nextTick,D=w.objectify}if(k||M||E){var I=_,A=_._origin||_;if(M&&!s)throw Error("process.nextTick is not supported");E===r&&(E=_.constructor.name==="AsyncFunction"),_=function(){var N=arguments,j=this,De=this.event;return E?M?Promise.resolve():new Promise(function(pe){c(pe)}).then(function(){return j.event=De,I.apply(j,N)}):(M?process.nextTick:c)(function(){j.event=De,I.apply(j,N)})},_._async=!0,_._origin=A}return[_,D?new V(this,y,_):this]}function P(y){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,g.call(this,y)}P.EventEmitter2=P,P.prototype.listenTo=function(y,_,w){if(typeof y!="object")throw TypeError("target musts be an object");var k=this;w=C(w,{on:r,off:r,reducers:r},{on:W,off:W,reducers:ke});function E(M){if(typeof M!="object")throw TypeError("events must be an object");var D=w.reducers,I=be.call(k,y),A;I===-1?A=new R(k,y,w):A=k._observers[I];for(var N=f(M),j=N.length,De,pe=typeof D=="function",le=0;le<j;le++)De=N[le],A.subscribe(De,M[De]||De,pe?D:D&&D[De])}return t(_)?E(v(_)):E(typeof _=="string"?v(_.split(/\s+/)):_),this},P.prototype.stopListeningTo=function(y,_){var w=this._observers;if(!w)return!1;var k=w.length,E,M=!1;if(y&&typeof y!="object")throw TypeError("target should be an object");for(;k-- >0;)E=w[k],(!y||E._target===y)&&(E.unsubscribe(_),M=!0);return M},P.prototype.delimiter=".",P.prototype.setMaxListeners=function(y){y!==r&&(this._maxListeners=y,this._conf||(this._conf={}),this._conf.maxListeners=y)},P.prototype.getMaxListeners=function(){return this._maxListeners},P.prototype.event="",P.prototype.once=function(y,_,w){return this._once(y,_,!1,w)},P.prototype.prependOnceListener=function(y,_,w){return this._once(y,_,!0,w)},P.prototype._once=function(y,_,w,k){return this._many(y,1,_,w,k)},P.prototype.many=function(y,_,w,k){return this._many(y,_,w,!1,k)},P.prototype.prependMany=function(y,_,w,k){return this._many(y,_,w,!0,k)},P.prototype._many=function(y,_,w,k,E){var M=this;if(typeof w!="function")throw new Error("many only accepts instances of Function");function D(){return--_===0&&M.off(y,D),w.apply(this,arguments)}return D._origin=w,this._on(y,D,k,E)},P.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||p.call(this);var y=arguments[0],_,w=this.wildcard,k,E,M,D,I;if(y==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(w&&(_=y,y!=="newListener"&&y!=="removeListener"&&typeof y=="object")){if(E=y.length,a){for(M=0;M<E;M++)if(typeof y[M]=="symbol"){I=!0;break}}I||(y=y.join(this.delimiter))}var A=arguments.length,N;if(this._all&&this._all.length)for(N=this._all.slice(),M=0,E=N.length;M<E;M++)switch(this.event=y,A){case 1:N[M].call(this,y);break;case 2:N[M].call(this,y,arguments[1]);break;case 3:N[M].call(this,y,arguments[1],arguments[2]);break;default:N[M].apply(this,arguments)}if(w)N=[],ee.call(this,N,_,this.listenerTree,0,E);else if(N=this._events[y],typeof N=="function"){switch(this.event=y,A){case 1:N.call(this);break;case 2:N.call(this,arguments[1]);break;case 3:N.call(this,arguments[1],arguments[2]);break;default:for(k=new Array(A-1),D=1;D<A;D++)k[D-1]=arguments[D];N.apply(this,k)}return!0}else N&&(N=N.slice());if(N&&N.length){if(A>3)for(k=new Array(A-1),D=1;D<A;D++)k[D-1]=arguments[D];for(M=0,E=N.length;M<E;M++)switch(this.event=y,A){case 1:N[M].call(this);break;case 2:N[M].call(this,arguments[1]);break;case 3:N[M].call(this,arguments[1],arguments[2]);break;default:N[M].apply(this,k)}return!0}else if(!this.ignoreErrors&&!this._all&&y==="error")throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},P.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||p.call(this);var y=arguments[0],_=this.wildcard,w,k,E,M,D,I;if(y==="newListener"&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(_&&(w=y,y!=="newListener"&&y!=="removeListener"&&typeof y=="object")){if(M=y.length,a){for(D=0;D<M;D++)if(typeof y[D]=="symbol"){k=!0;break}}k||(y=y.join(this.delimiter))}var A=[],N=arguments.length,j;if(this._all)for(D=0,M=this._all.length;D<M;D++)switch(this.event=y,N){case 1:A.push(this._all[D].call(this,y));break;case 2:A.push(this._all[D].call(this,y,arguments[1]));break;case 3:A.push(this._all[D].call(this,y,arguments[1],arguments[2]));break;default:A.push(this._all[D].apply(this,arguments))}if(_?(j=[],ee.call(this,j,w,this.listenerTree,0)):j=this._events[y],typeof j=="function")switch(this.event=y,N){case 1:A.push(j.call(this));break;case 2:A.push(j.call(this,arguments[1]));break;case 3:A.push(j.call(this,arguments[1],arguments[2]));break;default:for(E=new Array(N-1),I=1;I<N;I++)E[I-1]=arguments[I];A.push(j.apply(this,E))}else if(j&&j.length){if(j=j.slice(),N>3)for(E=new Array(N-1),I=1;I<N;I++)E[I-1]=arguments[I];for(D=0,M=j.length;D<M;D++)switch(this.event=y,N){case 1:A.push(j[D].call(this));break;case 2:A.push(j[D].call(this,arguments[1]));break;case 3:A.push(j[D].call(this,arguments[1],arguments[2]));break;default:A.push(j[D].apply(this,E))}}else if(!this.ignoreErrors&&!this._all&&y==="error")return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(A)},P.prototype.on=function(y,_,w){return this._on(y,_,!1,w)},P.prototype.prependListener=function(y,_,w){return this._on(y,_,!0,w)},P.prototype.onAny=function(y){return this._onAny(y,!1)},P.prototype.prependAny=function(y){return this._onAny(y,!0)},P.prototype.addListener=P.prototype.on,P.prototype._onAny=function(y,_){if(typeof y!="function")throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),_?this._all.unshift(y):this._all.push(y),this},P.prototype._on=function(y,_,w,k){if(typeof y=="function")return this._onAny(y,_),this;if(typeof _!="function")throw new Error("on only accepts instances of Function");this._events||p.call(this);var E=this,M;return k!==r&&(M=q.call(this,y,_,k),_=M[0],E=M[1]),this._newListener&&this.emit("newListener",y,_),this.wildcard?(ne.call(this,y,_,w),E):(this._events[y]?(typeof this._events[y]=="function"&&(this._events[y]=[this._events[y]]),w?this._events[y].unshift(_):this._events[y].push(_),!this._events[y].warned&&this._maxListeners>0&&this._events[y].length>this._maxListeners&&(this._events[y].warned=!0,T.call(this,this._events[y].length,y))):this._events[y]=_,E)},P.prototype.off=function(y,_){if(typeof _!="function")throw new Error("removeListener only takes instances of Function");var w,k=[];if(this.wildcard){var E=typeof y=="string"?y.split(this.delimiter):y.slice();if(k=ee.call(this,null,E,this.listenerTree,0),!k)return this}else{if(!this._events[y])return this;w=this._events[y],k.push({_listeners:w})}for(var M=0;M<k.length;M++){var D=k[M];if(w=D._listeners,t(w)){for(var I=-1,A=0,N=w.length;A<N;A++)if(w[A]===_||w[A].listener&&w[A].listener===_||w[A]._origin&&w[A]._origin===_){I=A;break}if(I<0)continue;return this.wildcard?D._listeners.splice(I,1):this._events[y].splice(I,1),w.length===0&&(this.wildcard?delete D._listeners:delete this._events[y]),this._removeListener&&this.emit("removeListener",y,_),this}else(w===_||w.listener&&w.listener===_||w._origin&&w._origin===_)&&(this.wildcard?delete D._listeners:delete this._events[y],this._removeListener&&this.emit("removeListener",y,_))}return this.listenerTree&&yt(this.listenerTree),this},P.prototype.offAny=function(y){var _=0,w=0,k;if(y&&this._all&&this._all.length>0){for(k=this._all,_=0,w=k.length;_<w;_++)if(y===k[_])return k.splice(_,1),this._removeListener&&this.emit("removeListenerAny",y),this}else{if(k=this._all,this._removeListener)for(_=0,w=k.length;_<w;_++)this.emit("removeListenerAny",k[_]);this._all=[]}return this},P.prototype.removeListener=P.prototype.off,P.prototype.removeAllListeners=function(y){if(y===r)return!this._events||p.call(this),this;if(this.wildcard){var _=ee.call(this,null,y,this.listenerTree,0),w,k;if(!_)return this;for(k=0;k<_.length;k++)w=_[k],w._listeners=null;this.listenerTree&&yt(this.listenerTree)}else this._events&&(this._events[y]=null);return this},P.prototype.listeners=function(y){var _=this._events,w,k,E,M,D;if(y===r){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!_)return[];for(w=f(_),M=w.length,E=[];M-- >0;)k=_[w[M]],typeof k=="function"?E.push(k):E.push.apply(E,k);return E}else{if(this.wildcard){if(D=this.listenerTree,!D)return[];var I=[],A=typeof y=="string"?y.split(this.delimiter):y.slice();return ee.call(this,I,A,D,0),I}return _?(k=_[y],k?typeof k=="function"?[k]:k:[]):[]}},P.prototype.eventNames=function(y){var _=this._events;return this.wildcard?It.call(this,this.listenerTree,[],null,y):_?f(_):[]},P.prototype.listenerCount=function(y){return this.listeners(y).length},P.prototype.hasListeners=function(y){if(this.wildcard){var _=[],w=typeof y=="string"?y.split(this.delimiter):y.slice();return ee.call(this,_,w,this.listenerTree,0),_.length>0}var k=this._events,E=this._all;return!!(E&&E.length||k&&(y===r?f(k).length:k[y]))},P.prototype.listenersAny=function(){return this._all?this._all:[]},P.prototype.waitFor=function(y,_){var w=this,k=typeof _;return k==="number"?_={timeout:_}:k==="function"&&(_={filter:_}),_=C(_,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:W,Promise:$}),Te(_.Promise,function(E,M,D){function I(){var A=_.filter;if(!(A&&!A.apply(w,arguments)))if(w.off(y,I),_.handleError){var N=arguments[0];N?M(N):E(O.apply(null,arguments).slice(1))}else E(O.apply(null,arguments))}D(function(){w.off(y,I)}),w._on(y,I,!1)},{timeout:_.timeout,overload:_.overload})};function Q(y,_,w){w=C(w,{Promise,timeout:0,overload:!1},{Promise:$});var k=w.Promise;return Te(k,function(E,M,D){var I;if(typeof y.addEventListener=="function"){I=function(){E(O.apply(null,arguments))},D(function(){y.removeEventListener(_,I)}),y.addEventListener(_,I,{once:!0});return}var A=function(){N&&y.removeListener("error",N),E(O.apply(null,arguments))},N;_!=="error"&&(N=function(j){y.removeListener(_,A),M(j)},y.once("error",N)),D(function(){N&&y.removeListener("error",N),y.removeListener(_,A)}),y.once(_,A)},{timeout:w.timeout,overload:w.overload})}var Y=P.prototype;if(Object.defineProperties(P,{defaultMaxListeners:{get:function(){return Y._maxListeners},set:function(y){if(typeof y!="number"||y<0||Number.isNaN(y))throw TypeError("n must be a non-negative number");Y._maxListeners=y},enumerable:!0},once:{value:Q,writable:!0,configurable:!0}}),Object.defineProperties(Y,{_maxListeners:{value:n,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return P});else if(typeof Wb=="object")qb.exports=P;else{var oe=new Function("","return this")();oe.EventEmitter2=P}})()});var Qr=S(Jn=>{"use strict";Jn.__esModule=!0;var fF;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(fF=Jn.Operators||(Jn.Operators={}));var hF;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(hF=Jn.StructuralCharacters||(Jn.StructuralCharacters={}));var pF;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(pF=Jn.Tokens||(Jn.Tokens={}))});var ip=S(il=>{"use strict";il.__esModule=!0;var rt=Qr();il.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};il.VALID_TOKENS={identifierOnly:[{name:rt.Tokens.IDENTIFIER},{name:rt.Tokens.STRUCTURAL_CHARACTER,value:rt.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:rt.Tokens.IDENTIFIER},{name:rt.Tokens.STRUCTURAL_CHARACTER,value:rt.StructuralCharacters.OPEN_PARENTHESIS},{name:rt.Tokens.OPERATOR,value:rt.Operators.NOT}],binaryOperator:[{name:rt.Tokens.OPERATOR,value:rt.Operators.AND},{name:rt.Tokens.OPERATOR,value:rt.Operators.OR},{name:rt.Tokens.OPERATOR,value:rt.Operators.XOR}],binaryOperatorOrClose:[{name:rt.Tokens.OPERATOR,value:rt.Operators.AND},{name:rt.Tokens.OPERATOR,value:rt.Operators.OR},{name:rt.Tokens.OPERATOR,value:rt.Operators.XOR},{name:rt.Tokens.STRUCTURAL_CHARACTER,value:rt.StructuralCharacters.CLOSE_PARENTHESIS}]}});var ap=S(Dn=>{"use strict";Dn.__esModule=!0;var xi=Qr();Dn.STRUCTURAL_CHARACTERS={"(":xi.StructuralCharacters.OPEN_PARENTHESIS,")":xi.StructuralCharacters.CLOSE_PARENTHESIS};Dn.OPERATORS={AND:xi.Operators.AND,OR:xi.Operators.OR,XOR:xi.Operators.XOR,NOT:xi.Operators.NOT};Dn.SEPARATORS=new Set([32,9,10,13].map(function(r){return String.fromCodePoint(r)}));Dn.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);Dn.COMMENT_DELIMITER=String.fromCodePoint(35);Dn.EOL=String.fromCodePoint(10);Dn.ESCAPE_CHARACTER=String.fromCodePoint(92)});var bv=S(En=>{"use strict";var op=En&&En.__assign||function(){return op=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}return r},op.apply(this,arguments)};En.__esModule=!0;var Tv=Qr(),Is=ap();En.createResult=function(r,e,t){return{token:op({name:r},e!==null?{value:e}:{}),remainingString:t}};En.getComment=function(r){for(var e=r.length,t=0;t<r.length;t+=1){var n=r[t];if(n===Is.EOL){e=t;break}}return En.createResult(Tv.Tokens.COMMENT,r.slice(0,e),r.slice(e+1))};En.getQuotedIdentifier=function(r){for(var e=!1,t="",n=null,s=0;s<r.length;s+=1){var a=r[s];if(n===null)a===Is.QUOTED_IDENTIFIER_DELIMITER?e?t=t.slice(-1)+Is.QUOTED_IDENTIFIER_DELIMITER:n=s:(a===Is.ESCAPE_CHARACTER?e=!0:e=!1,t=t+=a);else{if(!Is.SEPARATORS.has(a)&&!Is.STRUCTURAL_CHARACTERS[a])throw new Error("Unexpected character: "+a+" Expected ) character or separator");break}}if(n===null)throw new Error("Unexpected end of expression: expected "+Is.QUOTED_IDENTIFIER_DELIMITER+" character");return En.createResult(Tv.Tokens.IDENTIFIER,t,r.slice(n+1))}});var vv=S(up=>{"use strict";up.__esModule=!0;var Pi=Qr(),lr=ap(),Ai=bv();up.lex=function(r){for(var e=null,t=null,n=null,s=0;s<r.length;s+=1){var a=r[s];if(e===null){if(!lr.SEPARATORS.has(a)){var o=lr.STRUCTURAL_CHARACTERS[a];if(o){var l=r[s+1];if(o===Pi.StructuralCharacters.CLOSE_PARENTHESIS&&l&&!lr.SEPARATORS.has(l)&&l!==Pi.StructuralCharacters.CLOSE_PARENTHESIS)throw new Error("Unexpected character: "+l+". A closing parenthesis should be followed by another closing parenthesis or whitespace");return Ai.createResult(Pi.Tokens.STRUCTURAL_CHARACTER,lr.STRUCTURAL_CHARACTERS[a],r.slice(s+1))}if(a===lr.QUOTED_IDENTIFIER_DELIMITER)return Ai.getQuotedIdentifier(r.slice(s+1));if(a===lr.COMMENT_DELIMITER)return Ai.getComment(r.slice(s+1));e=s}}else if(lr.SEPARATORS.has(a)||lr.STRUCTURAL_CHARACTERS[a]){t=s,n=a;break}else if(a===lr.QUOTED_IDENTIFIER_DELIMITER||a===lr.COMMENT_DELIMITER)throw new Error("Unexpected character: "+a)}if(e!==null){t=t!=null?t:r.length;var c=r.slice(e,t),f=r.slice(t);if(lr.OPERATORS[c]){if(n&&!lr.SEPARATORS.has(n))throw new Error("Unexpected character: "+n+". Operators should be separated using whitespace");return Ai.createResult(Pi.Tokens.OPERATOR,lr.OPERATORS[c],f)}else return Ai.createResult(Pi.Tokens.IDENTIFIER,c,f)}return Ai.createResult(Pi.Tokens.EOF,null,"")}});var wv=S(Sn=>{"use strict";var mF=Sn&&Sn.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),s=0,e=0;e<t;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,s++)n[s]=a[o];return n};Sn.__esModule=!0;var yF=vv(),Ni=Qr(),al=ip();Sn.newTokenGenerator=function(r){var e=r;return function(t,n){for(n===void 0&&(n=!1);;){var s=yF.lex(e),a=s.token,o=s.remainingString;if(e=o,a.name!==Ni.Tokens.COMMENT)return Sn.validateToken(a,t,n),a}}};Sn.getValue=function(r,e){var t=r(al.VALID_TOKENS.identifierOrNot),n=t.value===Ni.Operators.NOT;n&&(t=r(al.VALID_TOKENS.identifierOnly));var s=t.name===Ni.Tokens.STRUCTURAL_CHARACTER?e(r,!0):[t];return n?mF(s,[{name:Ni.Tokens.OPERATOR,value:Ni.Operators.NOT}]):s};Sn.previousOperatorTakesPrecedent=function(r,e){return al.OPERATOR_PRECEDENCE[r]<=al.OPERATOR_PRECEDENCE[e]};Sn.validateToken=function(r,e,t){if(t===void 0&&(t=!1),r.name===Ni.Tokens.EOF){if(t)return;throw new Error("Unexpected end of expression")}for(var n=0,s=e;n<s.length;n++){var a=s[n];if(a.name===r.name&&(!a.value||a.value===r.value))return}throw new TypeError("Invalid token")}});var cp=S(lo=>{"use strict";var Ci=lo&&lo.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),s=0,e=0;e<t;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,s++)n[s]=a[o];return n};lo.__esModule=!0;var kv=Qr(),Dv=ip(),ol=wv();lo.parse=function(r){if(typeof r!="string")throw new Error("Expected string but received "+typeof r);var e=ol.newTokenGenerator(r);return lp(e)};var lp=function(r,e){e===void 0&&(e=!1);for(var t=Ci(ol.getValue(r,lp)),n=[];;){var s=e?Dv.VALID_TOKENS.binaryOperatorOrClose:Dv.VALID_TOKENS.binaryOperator,a=r(s,!e);if(a.name===kv.Tokens.EOF||a.name===kv.Tokens.STRUCTURAL_CHARACTER)return Ci(t,Ci(n).reverse());for(;n.length;){var o=n[n.length-1]||null;if(o&&ol.previousOperatorTakesPrecedent(o.value,a.value))t=Ci(t,[o]),n=n.slice(0,-1);else break}n=Ci(n,[a]),t=Ci(t,ol.getValue(r,lp))}}});var dp=S(On=>{"use strict";On.__esModule=!0;var Ev=Qr();On.andUtil=function(r,e){return r&&e};On.orUtil=function(r,e){return r||e};On.xorUtil=function(r,e){return r!==e};On.notUtil=function(r){return!r};On.isIdentifier=function(r){var e=r.name,t=r.value;return e===Ev.Tokens.IDENTIFIER&&typeof t=="string"};On.isOperator=function(r){var e=r.name,t=r.value;return e===Ev.Tokens.OPERATOR&&typeof t=="string"};On.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var Sv=S(pp=>{"use strict";var co;pp.__esModule=!0;var fp=Qr(),hp=dp();pp.OPERATOR_MAP=(co={},co[fp.Operators.AND]=hp.andUtil,co[fp.Operators.OR]=hp.orUtil,co[fp.Operators.XOR]=hp.xorUtil,co)});var Mv=S(Ls=>{"use strict";var mp=Ls&&Ls.__spreadArrays||function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var n=Array(r),s=0,e=0;e<t;e++)for(var a=arguments[e],o=0,l=a.length;o<l;o++,s++)n[s]=a[o];return n};Ls.__esModule=!0;var gF=cp(),Ov=Qr(),_F=Sv(),Fs=dp();Ls.getEvaluator=function(r){var e=gF.parse(r);return function(t){return Ls.evaluate(e,t)}};Ls.evaluate=function(r,e){if(!Array.isArray(r))throw new Error(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,s,a){if(!(s&&(Fs.isIdentifier(s)||Fs.isOperator(s))))throw new Error("Invalid token: "+s+". Found in parsed expression at index "+a);if(s.name===Ov.Tokens.IDENTIFIER)return mp(n,[Boolean(e[s.value])]);var o=n[n.length-2],l=n[n.length-1];if(s.value===Ov.Operators.NOT)return l===void 0&&Fs.throwInvalidExpression("missing identifier"),mp(n.slice(0,-1),[Fs.notUtil(l)]);(l===void 0||o===void 0)&&Fs.throwInvalidExpression("missing identifier");var c=_F.OPERATOR_MAP[s.value];return c||Fs.throwInvalidExpression("unknown operator"),mp(n.slice(0,-2),[c(o,l)])},[]);return t.length!==1&&Fs.throwInvalidExpression("too many identifiers after evaluation"),t[0]}});var xv=S(fo=>{"use strict";fo.__esModule=!0;var Rv=Mv();fo.getEvaluator=Rv.getEvaluator;fo.evaluate=Rv.evaluate;var TF=cp();fo.parse=TF.parse});var DF={};xk(DF,{default:()=>yl});module.exports=Pk(DF);var zv=require("obsidian");var _i=require("obsidian");var SF=new Error("timeout while waiting for mutex to become available"),OF=new Error("mutex already locked"),Ak=new Error("request for lock canceled"),Nk=function(r,e,t,n){function s(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(p){try{f(n.next(p))}catch(g){o(g)}}function c(p){try{f(n.throw(p))}catch(g){o(g)}}function f(p){p.done?a(p.value):s(p.value).then(l,c)}f((n=n.apply(r,e||[])).next())})},Cl=class{constructor(e,t=Ak){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 Nk(this,void 0,void 0,function*(){let[n,s]=yield this.acquire(t);try{return yield e(n)}finally{s()}})}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 s=this._value,a=t;this._value-=t,t=this._value+1,n.resolve([s,this._newReleaser(a)])}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]=[])}},Ck=function(r,e,t,n){function s(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function l(p){try{f(n.next(p))}catch(g){o(g)}}function c(p){try{f(n.throw(p))}catch(g){o(g)}}function f(p){p.done?a(p.value):s(p.value).then(l,c)}f((n=n.apply(r,e||[])).next())})},xo=class{constructor(e){this._semaphore=new Cl(1,e)}acquire(){return Ck(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 ku=Fn(pt()),fi=Fn(wu());var bs=Fn(wu()),Bt=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 Bt((0,bs.default)().startOf(t).startOf("day"),(0,bs.default)().endOf(t).startOf("day"))}static buildInvalid(){return new Bt(bs.default.invalid(),bs.default.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=bs.default.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=bs.default.duration(1,e);this.start.add(t),this.end.add(t),(e==="month"||e==="quarter")&&(this.end=this.end.endOf(e).startOf("day"))}};var ir=class{static parseDate(e,t=!1){return(0,fi.default)(ku.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e,t=!1){let n=[ir.parseRelativeDateRange,ir.parseNumberedDateRange,ir.parseAbsoluteDateRange];for(let s of n){let a=s(e,t);if(a.isValid())return a}return Bt.buildInvalid()}static parseAbsoluteDateRange(e,t){let n=ku.parse(e,void 0,{forwardDate:t});if(n.length===0)return Bt.buildInvalid();let s=n[0].start,a=n[1]&&n[1].start?n[1].start:s,o=(0,fi.default)(s.date()),l=(0,fi.default)(a.date());return new Bt(o,l)}static parseRelativeDateRange(e,t){let n=/(last|this|next) (week|month|quarter|year)/,s=e.match(n);if(s&&s.length===3){let a=s[1],o=s[2],l=Bt.buildRelative(o);switch(a){case"last":l.moveToPrevious(o);break;case"next":l.moveToNext(o);break}return l}return Bt.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[s,a,o]of n){let l=e.match(s);if(l){let c=l[0].trim();return new Bt((0,fi.default)(c,a).startOf(o),(0,fi.default)(c,a).endOf(o))}}return Bt.buildInvalid()}};var QC={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function hi(r){for(let[e,t]of Object.entries(QC))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var Du=["MO","TU","WE","TH","FR","SA","SU"],lt=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(Du.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=Du[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 He=function(r){return r!=null},ar=function(r){return typeof r=="number"},Sh=function(r){return typeof r=="string"&&Du.includes(r)},Nt=Array.isArray,kr=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 we=function(r,e){var t=0,n=[];if(Nt(r))for(;t<e;t++)n[t]=[].concat(r);else for(;t<e;t++)n[t]=r;return n},CT=function(r){return Nt(r)?r:[r]};function vs(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+=we(t,e/t.length)),t.slice(0,e)+String(n))}var IT=function(r,e,t){var n=r.split(e);return t?n.slice(0,t).concat([n.slice(t).join(e)]):n},Lt=function(r,e){var t=r%e;return t*e<0?t+e:t},Eu=function(r,e){return{div:Math.floor(r/e),mod:Lt(r,e)}},or=function(r){return!He(r)||r.length===0},st=function(r){return!or(r)},Ee=function(r,e){return st(r)&&r.indexOf(e)!==-1};var Gn;(function(r){r.MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31],r.ONE_DAY=1e3*60*60*24,r.MAXYEAR=9999,r.ORDINAL_BASE=new Date(Date.UTC(1970,0,1)),r.PY_WEEKDAYS=[6,0,1,2,3,4,5],r.getYearDay=function(e){var t=new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());return Math.ceil((t.valueOf()-new Date(e.getUTCFullYear(),0,1).valueOf())/r.ONE_DAY)+1},r.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},r.isDate=function(e){return e instanceof Date},r.isValidDate=function(e){return r.isDate(e)&&!isNaN(e.getTime())},r.tzOffset=function(e){return e.getTimezoneOffset()*60*1e3},r.daysBetween=function(e,t){var n=e.getTime()-r.tzOffset(e),s=t.getTime()-r.tzOffset(t),a=n-s;return Math.round(a/r.ONE_DAY)},r.toOrdinal=function(e){return r.daysBetween(e,r.ORDINAL_BASE)},r.fromOrdinal=function(e){return new Date(r.ORDINAL_BASE.getTime()+e*r.ONE_DAY)},r.getMonthDays=function(e){var t=e.getUTCMonth();return t===1&&r.isLeapYear(e.getUTCFullYear())?29:r.MONTH_DAYS[t]},r.getWeekday=function(e){return r.PY_WEEKDAYS[e.getUTCDay()]},r.monthRange=function(e,t){var n=new Date(Date.UTC(e,t,1));return[r.getWeekday(n),r.getMonthDays(n)]},r.combine=function(e,t){return t=t||e,new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},r.clone=function(e){var t=new Date(e.getTime());return t},r.cloneDates=function(e){for(var t=[],n=0;n<e.length;n++)t.push(r.clone(e[n]));return t},r.sort=function(e){e.sort(function(t,n){return t.getTime()-n.getTime()})},r.timeToUntilString=function(e,t){t===void 0&&(t=!0);var n=new Date(e);return[vs(n.getUTCFullYear().toString(),4,"0"),vs(n.getUTCMonth()+1,2,"0"),vs(n.getUTCDate(),2,"0"),"T",vs(n.getUTCHours(),2,"0"),vs(n.getUTCMinutes(),2,"0"),vs(n.getUTCSeconds(),2,"0"),t?"Z":""].join("")},r.untilStringToDate=function(e){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,n=t.exec(e);if(!n)throw new Error("Invalid UNTIL value: ".concat(e));return new Date(Date.UTC(parseInt(n[1],10),parseInt(n[2],10)-1,parseInt(n[3],10),parseInt(n[5],10)||0,parseInt(n[6],10)||0,parseInt(n[7],10)||0))}})(Gn||(Gn={}));var se=Gn;var JC=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}(),_n=JC;var sb=Fn(nb(),1),{__extends:mi,__assign:Ht,__rest:hY,__decorate:pY,__param:mY,__metadata:yY,__awaiter:gY,__generator:_Y,__exportStar:TY,__createBinding:bY,__values:vY,__read:wY,__spread:kY,__spreadArrays:DY,__spreadArray:U,__await:EY,__asyncGenerator:SY,__asyncDelegator:OY,__asyncValues:MY,__makeTemplateObject:RY,__importStar:xY,__importDefault:PY,__classPrivateFieldGet:AY,__classPrivateFieldSet:NY,__classPrivateFieldIn:CY}=sb.default;var eI=function(r){mi(e,r);function e(t,n,s){var a=r.call(this,t,n)||this;return a.iterator=s,a}return e.prototype.add=function(t){return this.iterator(t,this._result.length)?(this._result.push(t),!0):!1},e}(_n),Mh=eI;var tI={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}},ws=tI;var ib=function(r,e){return r.indexOf(e)!==-1},rI=function(r){return r.toString()},nI=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},sI=function(){function r(e,t,n,s){if(t===void 0&&(t=rI),n===void 0&&(n=ws),s===void 0&&(s=nI),this.text=[],this.language=n||ws,this.gettext=t,this.dateFormatter=s,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var a=[].concat(this.options.bymonthday),o=[].concat(this.options.bynmonthday);a.sort(function(p,g){return p-g}),o.sort(function(p,g){return g-p}),this.bymonthday=a.concat(o),this.bymonthday.length||(this.bymonthday=null)}if(He(this.origOptions.byweekday)){var l=Nt(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],c=String(l);this.byweekday={allWeeks:l.filter(function(p){return!p.n}),someWeeks:l.filter(function(p){return Boolean(p.n)}),isWeekdays:c.indexOf("MO")!==-1&&c.indexOf("TU")!==-1&&c.indexOf("WE")!==-1&&c.indexOf("TH")!==-1&&c.indexOf("FR")!==-1&&c.indexOf("SA")===-1&&c.indexOf("SU")===-1,isEveryDay:c.indexOf("MO")!==-1&&c.indexOf("TU")!==-1&&c.indexOf("WE")!==-1&&c.indexOf("TH")!==-1&&c.indexOf("FR")!==-1&&c.indexOf("SA")!==-1&&c.indexOf("SU")!==-1};var f=function(p,g){return p.weekday-g.weekday};this.byweekday.allWeeks.sort(f),this.byweekday.someWeeks.sort(f),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(ib(["dtstart","wkst","freq"],n))return!0;if(!ib(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[X.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 s=Math.abs(e);switch(s){case 1:case 21:case 31:t=s+n("st");break;case 2:case 22:t=s+n("nd");break;case 3:case 23:t=s+n("rd");break;default:t=s+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=ar(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,s){var a=this;s===void 0&&(s=","),Nt(e)||(e=[e]);var o=function(c,f,p){for(var g="",T=0;T<c.length;T++)T!==0&&(T===c.length-1?g+=" "+p+" ":g+=f+" "),g+=c[T];return g};t=t||function(c){return c.toString()};var l=function(c){return t&&t.call(a,c)};return n?o(e.map(l),s,n):e.map(l).join(s+" ")},r}(),Br=sI;var iI=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 s in this.rules){n=this.rules[s];var a=n.exec(this.text);a&&(e===null||a[0].length>e[0].length)&&(e=a,t=s)}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 Ha(r,e){e===void 0&&(e=ws);var t={},n=new iI(e.tokens);if(!n.start(r))return null;return s(),t;function s(){n.expect("every");var T=n.acceptNumber();if(T&&(t.interval=parseInt(T[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":t.freq=X.DAILY,n.nextSymbol()&&(o(),g());break;case"weekday(s)":t.freq=X.WEEKLY,t.byweekday=[X.MO,X.TU,X.WE,X.TH,X.FR],n.nextSymbol(),g();break;case"week(s)":t.freq=X.WEEKLY,n.nextSymbol()&&(a(),g());break;case"hour(s)":t.freq=X.HOURLY,n.nextSymbol()&&(a(),g());break;case"minute(s)":t.freq=X.MINUTELY,n.nextSymbol()&&(a(),g());break;case"month(s)":t.freq=X.MONTHLY,n.nextSymbol()&&(a(),g());break;case"year(s)":t.freq=X.YEARLY,n.nextSymbol()&&(a(),g());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":t.freq=X.WEEKLY;var O=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[X[O]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var v=c();if(!v)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");t.byweekday.push(X[v]),n.nextSymbol()}p(),g();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=X.YEARLY,t.bymonth=[l()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var R=l();if(!R)throw new Error("Unexpected symbol "+n.symbol+", expected month");t.bymonth.push(R),n.nextSymbol()}a(),g();break;default:throw new Error("Unknown symbol")}}function a(){var T=n.accept("on"),O=n.accept("the");if(!!(T||O))do{var v=f(),R=c(),C=l();if(v)R?(n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(X[R].nth(v))):(t.bymonthday||(t.bymonthday=[]),t.bymonthday.push(v),n.accept("day(s)"));else if(R)n.nextSymbol(),t.byweekday||(t.byweekday=[]),t.byweekday.push(X[R]);else if(n.symbol==="weekday(s)")n.nextSymbol(),t.byweekday||(t.byweekday=[X.MO,X.TU,X.WE,X.TH,X.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var $=n.acceptNumber();if(!$)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(t.byweekno=[parseInt($[0],10)];n.accept("comma");){if($=n.acceptNumber(),!$)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.byweekno.push(parseInt($[0],10))}}else if(C)n.nextSymbol(),t.bymonth||(t.bymonth=[]),t.bymonth.push(C);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function o(){var T=n.accept("at");if(!!T)do{var O=n.acceptNumber();if(!O)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(O[0],10)];n.accept("comma");){if(O=n.acceptNumber(),!O)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(O[0],10))}}while(n.accept("comma")||n.accept("at"))}function l(){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 c(){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 f(){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 T=parseInt(n.value[1],10);if(T<-366||T>366)throw new Error("Nth out of range: "+T);return n.nextSymbol(),n.accept("last")?-T:T;default:return!1}}function p(){n.accept("on"),n.accept("the");var T=f();if(!!T)for(t.bymonthday=[T],n.nextSymbol();n.accept("comma");){if(T=f(),!T)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");t.bymonthday.push(T),n.nextSymbol()}}function g(){if(n.symbol==="until"){var T=Date.parse(n.text);if(!T)throw new Error("Cannot parse until date:"+n.text);t.until=new Date(T)}else n.accept("for")&&(t.count=parseInt(n.value[0],10),n.expect("number"))}}var _e;(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"})(_e||(_e={}));function za(r){return r<_e.HOURLY}var ab=function(r,e){return e===void 0&&(e=ws),new X(Ha(r,e)||void 0)},yi=["count","until","interval","byweekday","bymonthday","bymonth"];Br.IMPLEMENTED=[];Br.IMPLEMENTED[_e.HOURLY]=yi;Br.IMPLEMENTED[_e.MINUTELY]=yi;Br.IMPLEMENTED[_e.DAILY]=["byhour"].concat(yi);Br.IMPLEMENTED[_e.WEEKLY]=yi;Br.IMPLEMENTED[_e.MONTHLY]=yi;Br.IMPLEMENTED[_e.YEARLY]=["byweekno","byyearday"].concat(yi);var ob=function(r,e,t,n){return new Br(r,e,t,n).toString()},ub=Br.isFullyConvertible;var gi=function(){function r(e,t,n,s){this.hour=e,this.minute=t,this.second=n,this.millisecond=s||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 lb=function(r){mi(e,r);function e(t,n,s,a,o,l,c){var f=r.call(this,a,o,l,c)||this;return f.year=t,f.month=n,f.day=s,f}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 Gn.getWeekday(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(t){this.year+=t},e.prototype.addMonths=function(t){if(this.month+=t,this.month>12){var n=Math.floor(this.month/12),s=Lt(this.month,12);this.month=s,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,s){for(n&&(this.hour+=Math.floor((23-this.hour)/t)*t);;){this.hour+=t;var a=Eu(this.hour,24),o=a.div,l=a.mod;if(o&&(this.hour=l,this.addDaily(o)),or(s)||Ee(s,this.hour))break}},e.prototype.addMinutes=function(t,n,s,a){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/t)*t);;){this.minute+=t;var o=Eu(this.minute,60),l=o.div,c=o.mod;if(l&&(this.minute=c,this.addHours(l,!1,s)),(or(s)||Ee(s,this.hour))&&(or(a)||Ee(a,this.minute)))break}},e.prototype.addSeconds=function(t,n,s,a,o){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/t)*t);;){this.second+=t;var l=Eu(this.second,60),c=l.div,f=l.mod;if(c&&(this.second=f,this.addMinutes(c,!1,s,a)),(or(s)||Ee(s,this.hour))&&(or(a)||Ee(a,this.minute))&&(or(o)||Ee(o,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=Gn.monthRange(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>Gn.MAXYEAR))return;t=Gn.monthRange(this.year,this.month-1)[1]}}},e.prototype.add=function(t,n){var s=t.freq,a=t.interval,o=t.wkst,l=t.byhour,c=t.byminute,f=t.bysecond;switch(s){case _e.YEARLY:return this.addYears(a);case _e.MONTHLY:return this.addMonths(a);case _e.WEEKLY:return this.addWeekly(a,o);case _e.DAILY:return this.addDaily(a);case _e.HOURLY:return this.addHours(a,n,l);case _e.MINUTELY:return this.addMinutes(a,n,l,c);case _e.SECONDLY:return this.addSeconds(a,n,l,c,f)}},e}(gi);function Rh(r){for(var e=[],t=Object.keys(r),n=0,s=t;n<s.length;n++){var a=s[n];Ee(fb,a)||e.push(a),se.isDate(r[a])&&!se.isValidDate(r[a])&&e.push(a)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return Ht({},r)}function cb(r){var e=Ht(Ht({},Va),Rh(r));if(He(e.byeaster)&&(e.freq=X.YEARLY),!(He(e.freq)&&X.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))),He(e.wkst)?ar(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=X.MO.weekday,He(e.bysetpos)){ar(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)||st(e.byweekno)||st(e.byyearday)||Boolean(e.bymonthday)||st(e.bymonthday)||He(e.byweekday)||He(e.byeaster)))switch(e.freq){case X.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case X.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case X.WEEKLY:e.byweekday=[se.getWeekday(e.dtstart)];break}if(He(e.bymonth)&&!Nt(e.bymonth)&&(e.bymonth=[e.bymonth]),He(e.byyearday)&&!Nt(e.byyearday)&&ar(e.byyearday)&&(e.byyearday=[e.byyearday]),!He(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(Nt(e.bymonthday)){for(var s=[],a=[],t=0;t<e.bymonthday.length;t++){var n=e.bymonthday[t];n>0?s.push(n):n<0&&a.push(n)}e.bymonthday=s,e.bynmonthday=a}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(He(e.byweekno)&&!Nt(e.byweekno)&&(e.byweekno=[e.byweekno]),!He(e.byweekday))e.bynweekday=null;else if(ar(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Sh(e.byweekday))e.byweekday=[lt.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof lt)!e.byweekday.n||e.freq>X.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var o=[],l=[],t=0;t<e.byweekday.length;t++){var c=e.byweekday[t];if(ar(c)){o.push(c);continue}else if(Sh(c)){o.push(lt.fromStr(c).weekday);continue}!c.n||e.freq>X.MONTHLY?o.push(c.weekday):l.push([c.weekday,c.n])}e.byweekday=st(o)?o:null,e.bynweekday=st(l)?l:null}return He(e.byhour)?ar(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<X.HOURLY?[e.dtstart.getUTCHours()]:null,He(e.byminute)?ar(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<X.MINUTELY?[e.dtstart.getUTCMinutes()]:null,He(e.bysecond)?ar(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<X.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function db(r){var e=r.dtstart.getTime()%1e3;if(!za(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(s){r.bysecond.forEach(function(a){t.push(new gi(n,s,a,e))})})}),t}function Za(r){var e=r.split(`
`).map(aI).filter(function(t){return t!==null});return Ht(Ht({},e[0]),e[1])}function Ka(r){var e={},t=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(r);if(!t)return e;var n=t[1],s=t[2];return n&&(e.tzid=n),e.dtstart=se.untilStringToDate(s),e}function aI(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return hb(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return hb(r);case"DTSTART":return Ka(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function hb(r){var e=r.replace(/^RRULE:/i,""),t=Ka(e),n=r.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(s){var a=s.split("="),o=a[0],l=a[1];switch(o.toUpperCase()){case"FREQ":t.freq=_e[l.toUpperCase()];break;case"WKST":t.wkst=Dr[l.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var c=oI(l),f=o.toLowerCase();t[f]=c;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=uI(l);break;case"DTSTART":case"TZID":var p=Ka(r);t.tzid=p.tzid,t.dtstart=p.dtstart;break;case"UNTIL":t.until=se.untilStringToDate(l);break;case"BYEASTER":t.byeaster=Number(l);break;default:throw new Error("Unknown RRULE property '"+o+"'")}}),t}function oI(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(pb)}return pb(r)}function pb(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function uI(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return Dr[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 s=Number(n[1]),a=n[2],o=Dr[a].weekday;return new lt(o,s)})}var ks=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=se.timeToUntilString(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(){var e;if(this.isUTC)return this.date;var t=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(this.date.toLocaleString(void 0,{timeZone:t})),s=new Date(this.date.toLocaleString(void 0,{timeZone:(e=this.tzid)!==null&&e!==void 0?e:"UTC"})),a=s.getTime()-n.getTime();return new Date(this.date.getTime()-a)},r}();function Xa(r){for(var e=[],t="",n=Object.keys(r),s=Object.keys(Va),a=0;a<n.length;a++)if(n[a]!=="tzid"&&!!Ee(s,n[a])){var o=n[a].toUpperCase(),l=r[n[a]],c="";if(!(!He(l)||Nt(l)&&!l.length)){switch(o){case"FREQ":c=X.FREQUENCIES[r.freq];break;case"WKST":ar(l)?c=new lt(l).toString():c=l.toString();break;case"BYWEEKDAY":o="BYDAY",c=CT(l).map(function(O){return O instanceof lt?O:Nt(O)?new lt(O[0],O[1]):new lt(O)}).toString();break;case"DTSTART":t=lI(l,r.tzid);break;case"UNTIL":c=se.timeToUntilString(l,!r.tzid);break;default:if(Nt(l)){for(var f=[],p=0;p<l.length;p++)f[p]=String(l[p]);c=f.toString()}else c=String(l)}c&&e.push([o,c])}}var g=e.map(function(O){var v=O[0],R=O[1];return"".concat(v,"=").concat(R.toString())}).join(";"),T="";return g!==""&&(T="RRULE:".concat(g)),[t,T].filter(function(O){return!!O}).join(`
`)}function lI(r,e){return r?"DTSTART"+new ks(new Date(r),e).toString():""}function cI(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 mb=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?se.clone(t):se.cloneDates(t)),e==="all"?this.all=t:(n._value=t,this[e].push(n))},r.prototype._cacheGet=function(e,t){var n=!1,s=t?Object.keys(t):[],a=function(p){for(var g=0;g<s.length;g++){var T=s[g];if(!cI(t[T],p[T]))return!0}return!1},o=this[e];if(e==="all")n=this.all;else if(Nt(o))for(var l=0;l<o.length;l++){var c=o[l];if(!(s.length&&a(c))){n=c._value;break}}if(!n&&this.all){for(var f=new _n(e,t),l=0;l<this.all.length&&f.accept(this.all[l]);l++);n=f.getValue(),this._cacheAdd(e,n,t)}return Nt(n)?se.cloneDates(n):n instanceof Date?se.clone(n):n},r}();var yb=U(U(U(U(U(U(U(U(U(U(U(U(U([],we(1,31),!0),we(2,28),!0),we(3,31),!0),we(4,30),!0),we(5,31),!0),we(6,30),!0),we(7,31),!0),we(8,31),!0),we(9,30),!0),we(10,31),!0),we(11,30),!0),we(12,31),!0),we(1,7),!0),gb=U(U(U(U(U(U(U(U(U(U(U(U(U([],we(1,31),!0),we(2,29),!0),we(3,31),!0),we(4,30),!0),we(5,31),!0),we(6,30),!0),we(7,31),!0),we(8,31),!0),we(9,30),!0),we(10,31),!0),we(11,30),!0),we(12,31),!0),we(1,7),!0),dI=kr(1,29),fI=kr(1,30),Bn=kr(1,31),Yt=kr(1,32),_b=U(U(U(U(U(U(U(U(U(U(U(U(U([],Yt,!0),fI,!0),Yt,!0),Bn,!0),Yt,!0),Bn,!0),Yt,!0),Yt,!0),Bn,!0),Yt,!0),Bn,!0),Yt,!0),Yt.slice(0,7),!0),Tb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Yt,!0),dI,!0),Yt,!0),Bn,!0),Yt,!0),Bn,!0),Yt,!0),Yt,!0),Bn,!0),Yt,!0),Bn,!0),Yt,!0),Yt.slice(0,7),!0),hI=kr(-28,0),pI=kr(-29,0),Hn=kr(-30,0),Ut=kr(-31,0),bb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Ut,!0),pI,!0),Ut,!0),Hn,!0),Ut,!0),Hn,!0),Ut,!0),Ut,!0),Hn,!0),Ut,!0),Hn,!0),Ut,!0),Ut.slice(0,7),!0),vb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Ut,!0),hI,!0),Ut,!0),Hn,!0),Ut,!0),Hn,!0),Ut,!0),Ut,!0),Hn,!0),Ut,!0),Hn,!0),Ut,!0),Ut.slice(0,7),!0),wb=[0,31,60,91,121,152,182,213,244,274,305,335,366],kb=[0,31,59,90,120,151,181,212,243,273,304,334,365],xh=function(){for(var r=[],e=0;e<55;e++)r=r.concat(kr(7));return r}();function Db(r,e){var t=new Date(Date.UTC(r,0,1)),n=se.isLeapYear(r)?366:365,s=se.isLeapYear(r+1)?366:365,a=se.toOrdinal(t),o=se.getWeekday(t),l=Ht(Ht({yearlen:n,nextyearlen:s,yearordinal:a,yearweekday:o},mI(r)),{wnomask:null});if(or(e.byweekno))return l;l.wnomask=we(0,n+7);var c,f,p=c=Lt(7-o+e.wkst,7);p>=4?(p=0,f=l.yearlen+Lt(o-e.wkst,7)):f=n-p;for(var g=Math.floor(f/7),T=Lt(f,7),O=Math.floor(g+T/4),v=0;v<e.byweekno.length;v++){var R=e.byweekno[v];if(R<0&&(R+=O+1),R>0&&R<=O){var C=void 0;R>1?(C=p+(R-1)*7,p!==c&&(C-=7-c)):C=p;for(var $=0;$<7&&(l.wnomask[C]=1,C++,l.wdaymask[C]!==e.wkst);$++);}}if(Ee(e.byweekno,1)){var C=p+O*7;if(p!==c&&(C-=7-c),C<n)for(var v=0;v<7&&(l.wnomask[C]=1,C+=1,l.wdaymask[C]!==e.wkst);v++);}if(p){var B=void 0;if(Ee(e.byweekno,-1))B=-1;else{var W=se.getWeekday(new Date(Date.UTC(r-1,0,1))),ke=Lt(7-W.valueOf()+e.wkst,7),Te=se.isLeapYear(r-1)?366:365,be=void 0;ke>=4?(ke=0,be=Te+Lt(W-e.wkst,7)):be=n-p,B=Math.floor(52+Lt(be,7)/4)}if(Ee(e.byweekno,B))for(var C=0;C<p;C++)l.wnomask[C]=1}return l}function mI(r){var e=se.isLeapYear(r)?366:365,t=new Date(Date.UTC(r,0,1)),n=se.getWeekday(t);return e===365?{mmask:yb,mdaymask:Tb,nmdaymask:vb,wdaymask:xh.slice(n),mrange:kb}:{mmask:gb,mdaymask:_b,nmdaymask:bb,wdaymask:xh.slice(n),mrange:wb}}function Eb(r,e,t,n,s,a){var o={lastyear:r,lastmonth:e,nwdaymask:[]},l=[];if(a.freq===X.YEARLY)if(or(a.bymonth))l=[[0,t]];else for(var c=0;c<a.bymonth.length;c++)e=a.bymonth[c],l.push(n.slice(e-1,e+1));else a.freq===X.MONTHLY&&(l=[n.slice(e-1,e+1)]);if(or(l))return o;o.nwdaymask=we(0,t);for(var c=0;c<l.length;c++)for(var f=l[c],p=f[0],g=f[1]-1,T=0;T<a.bynweekday.length;T++){var O=void 0,v=a.bynweekday[T],R=v[0],C=v[1];C<0?(O=g+(C+1)*7,O-=Lt(s[O]-R,7)):(O=p+(C-1)*7,O+=Lt(7-s[O]+R,7)),p<=O&&O<=g&&(o.nwdaymask[O]=1)}return o}function Sb(r,e){e===void 0&&(e=0);var t=r%19,n=Math.floor(r/100),s=r%100,a=Math.floor(n/4),o=n%4,l=Math.floor((n+8)/25),c=Math.floor((n-l+1)/3),f=Math.floor(19*t+n-a-c+15)%30,p=Math.floor(s/4),g=s%4,T=Math.floor(32+2*o+2*p-f-g)%7,O=Math.floor((t+11*f+22*T)/451),v=Math.floor((f+T-7*O+114)/31),R=(f+T-7*O+114)%31+1,C=Date.UTC(r,v-1,R+e),$=Date.UTC(r,0,1);return[Math.ceil((C-$)/(1e3*60*60*24))]}var yI=function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=Db(e,n)),st(n.bynweekday)&&(t!==this.lastmonth||e!==this.lastyear)){var s=this.yearinfo,a=s.yearlen,o=s.mrange,l=s.wdaymask;this.monthinfo=Eb(e,t,a,o,l,n)}He(n.byeaster)&&(this.eastermask=Sb(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[kr(this.yearlen),0,this.yearlen]},r.prototype.mdayset=function(e,t){for(var n=this.mrange[t-1],s=this.mrange[t],a=we(null,this.yearlen),o=n;o<s;o++)a[o]=o;return[a,n,s]},r.prototype.wdayset=function(e,t,n){for(var s=we(null,this.yearlen+7),a=se.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal,o=a,l=0;l<7&&(s[a]=a,++a,this.wdaymask[a]!==this.options.wkst);l++);return[s,o,a]},r.prototype.ddayset=function(e,t,n){var s=we(null,this.yearlen),a=se.toOrdinal(new Date(Date.UTC(e,t-1,n)))-this.yearordinal;return s[a]=a,[s,a,a+1]},r.prototype.htimeset=function(e,t,n,s){var a=this,o=[];return this.options.byminute.forEach(function(l){o=o.concat(a.mtimeset(e,l,n,s))}),se.sort(o),o},r.prototype.mtimeset=function(e,t,n,s){var a=this.options.bysecond.map(function(o){return new gi(e,t,o,s)});return se.sort(a),a},r.prototype.stimeset=function(e,t,n,s){return[new gi(e,t,n,s)]},r.prototype.getdayset=function(e){switch(e){case _e.YEARLY:return this.ydayset.bind(this);case _e.MONTHLY:return this.mdayset.bind(this);case _e.WEEKLY:return this.wdayset.bind(this);case _e.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},r.prototype.gettimeset=function(e){switch(e){case _e.HOURLY:return this.htimeset.bind(this);case _e.MINUTELY:return this.mtimeset.bind(this);case _e.SECONDLY:return this.stimeset.bind(this)}},r}(),Ob=yI;function Mb(r,e,t,n,s,a){for(var o=[],l=0;l<r.length;l++){var c=void 0,f=void 0,p=r[l];p<0?(c=Math.floor(p/e.length),f=Lt(p,e.length)):(c=Math.floor((p-1)/e.length),f=Lt(p-1,e.length));for(var g=[],T=t;T<n;T++){var O=a[T];!He(O)||g.push(O)}var v=void 0;c<0?v=g.slice(c)[0]:v=g[c];var R=e[f],C=se.fromOrdinal(s.yearordinal+v),$=se.combine(C,R);Ee(o,$)||o.push($)}return se.sort(o),o}function Ru(r,e){var t=e.dtstart,n=e.freq,s=e.interval,a=e.until,o=e.bysetpos,l=e.count;if(l===0||s===0)return Tn(r);var c=lb.fromDate(t),f=new Ob(e);f.rebuild(c.year,c.month);for(var p=TI(f,c,e);;){var g=f.getdayset(n)(c.year,c.month,c.day),T=g[0],O=g[1],v=g[2],R=_I(T,O,v,f,e);if(st(o))for(var C=Mb(o,p,O,v,f,T),$=0;$<C.length;$++){var B=C[$];if(a&&B>a)return Tn(r);if(B>=t){var W=Rb(B,e);if(!r.accept(W)||l&&(--l,!l))return Tn(r)}}else for(var $=O;$<v;$++){var ke=T[$];if(!!He(ke))for(var Te=se.fromOrdinal(f.yearordinal+ke),be=0;be<p.length;be++){var ee=p[be],B=se.combine(Te,ee);if(a&&B>a)return Tn(r);if(B>=t){var W=Rb(B,e);if(!r.accept(W)||l&&(--l,!l))return Tn(r)}}}if(e.interval===0||(c.add(e,R),c.year>se.MAXYEAR))return Tn(r);za(n)||(p=f.gettimeset(n)(c.hour,c.minute,c.second,0)),f.rebuild(c.year,c.month)}}function gI(r,e,t){var n=t.bymonth,s=t.byweekno,a=t.byweekday,o=t.byeaster,l=t.bymonthday,c=t.bynmonthday,f=t.byyearday;return st(n)&&!Ee(n,r.mmask[e])||st(s)&&!r.wnomask[e]||st(a)&&!Ee(a,r.wdaymask[e])||st(r.nwdaymask)&&!r.nwdaymask[e]||o!==null&&!Ee(r.eastermask,e)||(st(l)||st(c))&&!Ee(l,r.mdaymask[e])&&!Ee(c,r.nmdaymask[e])||st(f)&&(e<r.yearlen&&!Ee(f,e+1)&&!Ee(f,-r.yearlen+e)||e>=r.yearlen&&!Ee(f,e+1-r.yearlen)&&!Ee(f,-r.nextyearlen+e-r.yearlen))}function Rb(r,e){return new ks(r,e.tzid).rezonedDate()}function Tn(r){return r.getValue()}function _I(r,e,t,n,s){for(var a=!1,o=e;o<t;o++){var l=r[o];a=gI(n,l,s),a&&(r[l]=null)}return a}function TI(r,e,t){var n=t.freq,s=t.byhour,a=t.byminute,o=t.bysecond;return za(n)?db(t):n>=X.HOURLY&&st(s)&&!Ee(s,e.hour)||n>=X.MINUTELY&&st(a)&&!Ee(a,e.minute)||n>=X.SECONDLY&&st(o)&&!Ee(o,e.second)?[]:r.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var Dr={MO:new lt(0),TU:new lt(1),WE:new lt(2),TH:new lt(3),FR:new lt(4),SA:new lt(5),SU:new lt(6)},Va={freq:_e.YEARLY,dtstart:null,interval:1,wkst:Dr.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},fb=Object.keys(Va),X=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new mb,this.origOptions=Rh(e);var n=cb(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Ha(e,t)},r.fromText=function(e,t){return ab(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return Ru(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 Mh("all",{},e));var t=this._cacheGet("all");return t===!1&&(t=this._iter(new _n("all",{})),this._cacheAdd("all",t)),t},r.prototype.between=function(e,t,n,s){if(n===void 0&&(n=!1),!se.isValidDate(e)||!se.isValidDate(t))throw new Error("Invalid date passed in to RRule.between");var a={before:t,after:e,inc:n};if(s)return this._iter(new Mh("between",a,s));var o=this._cacheGet("between",a);return o===!1&&(o=this._iter(new _n("between",a)),this._cacheAdd("between",o,a)),o},r.prototype.before=function(e,t){if(t===void 0&&(t=!1),!se.isValidDate(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:t},s=this._cacheGet("before",n);return s===!1&&(s=this._iter(new _n("before",n)),this._cacheAdd("before",s,n)),s},r.prototype.after=function(e,t){if(t===void 0&&(t=!1),!se.isValidDate(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:t},s=this._cacheGet("after",n);return s===!1&&(s=this._iter(new _n("after",n)),this._cacheAdd("after",s,n)),s},r.prototype.count=function(){return this.all().length},r.prototype.toString=function(){return Xa(this.origOptions)},r.prototype.toText=function(e,t,n){return ob(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return ub(this)},r.prototype.clone=function(){return new r(this.origOptions)},r.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],r.YEARLY=_e.YEARLY,r.MONTHLY=_e.MONTHLY,r.WEEKLY=_e.WEEKLY,r.DAILY=_e.DAILY,r.HOURLY=_e.HOURLY,r.MINUTELY=_e.MINUTELY,r.SECONDLY=_e.SECONDLY,r.MO=Dr.MO,r.TU=Dr.TU,r.WE=Dr.WE,r.TH=Dr.TH,r.FR=Dr.FR,r.SA=Dr.SA,r.SU=Dr.SU,r.parseString=Za,r.optionsToString=Xa,r}();function xb(r,e,t,n,s,a){var o={},l=r.accept;function c(T,O){t.forEach(function(v){v.between(T,O,!0).forEach(function(R){o[Number(R)]=!0})})}s.forEach(function(T){var O=new ks(T,a).rezonedDate();o[Number(O)]=!0}),r.accept=function(T){var O=Number(T);return isNaN(O)?l.call(this,T):!o[O]&&(c(new Date(O-1),new Date(O+1)),!o[O])?(o[O]=!0,l.call(this,T)):!0},r.method==="between"&&(c(r.args.after,r.args.before),r.accept=function(T){var O=Number(T);return o[O]?!0:(o[O]=!0,l.call(this,T))});for(var f=0;f<n.length;f++){var p=new ks(n[f],a).rezonedDate();if(!r.accept(new Date(p.getTime())))break}e.forEach(function(T){Ru(r,T.options)});var g=r._result;switch(se.sort(g),r.method){case"all":case"between":return g;case"before":return g.length&&g[g.length-1]||null;case"after":default:return g.length&&g[0]||null}}var Pb={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function bI(r,e){var t=[],n=[],s=[],a=[],o=Ka(r),l=o.dtstart,c=o.tzid,f=EI(r,e.unfold);return f.forEach(function(p){var g;if(!!p){var T=DI(p),O=T.name,v=T.parms,R=T.value;switch(O.toUpperCase()){case"RRULE":if(v.length)throw new Error("unsupported RRULE parm: ".concat(v.join(",")));t.push(Za(p));break;case"RDATE":var C=(g=/RDATE(?:;TZID=([^:=]+))?/i.exec(p))!==null&&g!==void 0?g:[],$=C[1];$&&!c&&(c=$),n=n.concat(Ab(R,v));break;case"EXRULE":if(v.length)throw new Error("unsupported EXRULE parm: ".concat(v.join(",")));s.push(Za(R));break;case"EXDATE":a=a.concat(Ab(R,v));break;case"DTSTART":break;default:throw new Error("unsupported property: "+O)}}}),{dtstart:l,tzid:c,rrulevals:t,rdatevals:n,exrulevals:s,exdatevals:a}}function vI(r,e){var t=bI(r,e),n=t.rrulevals,s=t.rdatevals,a=t.exrulevals,o=t.exdatevals,l=t.dtstart,c=t.tzid,f=e.cache===!1;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||n.length>1||s.length||a.length||o.length){var p=new Ah(f);return p.dtstart(l),p.tzid(c||void 0),n.forEach(function(T){p.rrule(new X(Ph(T,l,c),f))}),s.forEach(function(T){p.rdate(T)}),a.forEach(function(T){p.exrule(new X(Ph(T,l,c),f))}),o.forEach(function(T){p.exdate(T)}),e.compatible&&e.dtstart&&p.rdate(l),p}var g=n[0]||{};return new X(Ph(g,g.dtstart||e.dtstart||l,g.tzid||e.tzid||c),f)}function xu(r,e){return e===void 0&&(e={}),vI(r,wI(e))}function Ph(r,e,t){return Ht(Ht({},r),{dtstart:e,tzid:t})}function wI(r){var e=[],t=Object.keys(r),n=Object.keys(Pb);if(t.forEach(function(s){Ee(n,s)||e.push(s)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Ht(Ht({},Pb),r)}function kI(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=IT(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function DI(r){var e=kI(r),t=e.name,n=e.value,s=t.split(";");if(!s)throw new Error("empty property name");return{name:s[0].toUpperCase(),parms:s.slice(1),value:n}}function EI(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 s=t[n]=t[n].replace(/\s+$/g,"");s?n>0&&s[0]===" "?(t[n-1]+=s.slice(1),t.splice(n,1)):n+=1:t.splice(n,1)}return t}function SI(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Ab(r,e){return SI(e),r.split(",").map(function(t){return se.untilStringToDate(t)})}function Nb(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 s=e._rrule[n].origOptions[r];if(s)return s}}}var Ah=function(r){mi(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=Nb.apply(n,["dtstart"]),n.tzid=Nb.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return xb(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){Cb(t,this._rrule)},e.prototype.exrule=function(t){Cb(t,this._exrule)},e.prototype.rdate=function(t){Ib(t,this._rdate)},e.prototype.exdate=function(t){Ib(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return xu(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return xu(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(Xa({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(s){return s.replace(/^RRULE:/,"EXRULE:")}).filter(function(s){return!/^DTSTART/.test(s)}))}),this._rdate.length&&t.push(Fb("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(Fb("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}(X);function Cb(r,e){if(!(r instanceof X))throw new TypeError(String(r)+" is not RRule instance");Ee(e.map(String),String(r))||e.push(r)}function Ib(r,e){if(!(r instanceof Date))throw new TypeError(String(r)+" is not Date instance");Ee(e.map(Number),Number(r))||(e.push(r),se.sort(e))}function Fb(r,e,t){var n=!t||t.toUpperCase()==="UTC",s=n?"".concat(r,":"):"".concat(r,";TZID=").concat(t,":"),a=e.map(function(o){return se.timeToUntilString(o.valueOf(),n)}).join(",");return"".concat(s).concat(a)}function Hr(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 St=class{constructor({rrule:e,baseOnToday:t,referenceDate:n,startDate:s,scheduledDate:a,dueDate:o}){this.rrule=e,this.baseOnToday=t,this.referenceDate=n,this.startDate=s,this.scheduledDate=a,this.dueDate=o}static fromText({recurrenceRuleText:e,startDate:t,scheduledDate:n,dueDate:s}){try{let a=e.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(a==null)return null;let o=a[1].trim(),l=a[2]!==void 0,c=X.parseText(o);if(c!==null){let f=null;s?f=window.moment(s):n?f=window.moment(n):t&&(f=window.moment(t)),!l&&f!==null?c.dtstart=window.moment(f).startOf("day").utc(!0).toDate():c.dtstart=window.moment().startOf("day").utc(!0).toDate();let p=new X(c);return new St({rrule:p,baseOnToday:l,referenceDate:f,startDate:t,scheduledDate:n,dueDate:s})}}catch(a){}return null}toText(){let e=this.rrule.toText();return this.baseOnToday&&(e+=" when done"),e}next(){var t;let e;if(this.baseOnToday){let n=window.moment(),s=new X(tr(Ae({},this.rrule.origOptions),{dtstart:n.startOf("day").utc(!0).toDate()}));e=this.nextAfter(n.endOf("day"),s)}else{let n=window.moment((t=this.referenceDate)!=null?t:void 0).endOf("day");e=this.nextAfter(n,this.rrule)}if(e!==null){let n=null,s=null,a=null;if(this.referenceDate){if(this.startDate){let o=window.moment.duration(this.startDate.diff(this.referenceDate));n=window.moment(e),n.add(Math.round(o.asDays()),"days")}if(this.scheduledDate){let o=window.moment.duration(this.scheduledDate.diff(this.referenceDate));s=window.moment(e),s.add(Math.round(o.asDays()),"days")}if(this.dueDate){let o=window.moment.duration(this.dueDate.diff(this.referenceDate));a=window.moment(e),a.add(Math.round(o.asDays()),"days")}}return{startDate:n,scheduledDate:s,dueDate:a}}return null}identicalTo(e){return this.baseOnToday!==e.baseOnToday||Hr(this.startDate,e.startDate)!==0||Hr(this.scheduledDate,e.scheduledDate)!==0||Hr(this.dueDate,e.dueDate)!==0?!1:this.toText()===e.toText()}nextAfter(e,t){e.utc(!0);let n=window.moment(t.after(e.toDate())),s=this.toText(),a=s.match(/every( \d+)? month(s)?(.*)?/);a!==null&&(s.includes(" on ")||(n=St.nextAfterMonths(e,n,t,a[1])));let o=s.match(/every( \d+)? year(s)?(.*)?/);return o!==null&&(n=St.nextAfterYears(e,n,t,o[1])),St.addTimezone(n).toDate()}static nextAfterMonths(e,t,n,s){let a=1;for(s!==void 0&&(a=Number.parseInt(s.trim(),10));St.isSkippingTooManyMonths(e,t,a);)t=St.fromOneDayEarlier(e,n);return t}static isSkippingTooManyMonths(e,t,n){let s=t.month()-e.month();return s+=(t.year()-e.year())*12,s>n}static nextAfterYears(e,t,n,s){let a=1;for(s!==void 0&&(a=Number.parseInt(s.trim(),10));St.isSkippingTooManyYears(e,t,a);)t=St.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 X(n),window.moment(t.after(e.toDate()))}static addTimezone(e){return window.moment.utc(e).local(!0).startOf("day")}};function Nh(r){let e=[r.startDateSymbol,r.scheduledDateSymbol,r.dueDateSymbol].join("|");return(t,n,s)=>{let a=[];a=a.concat(MI(t,n,s,e)),a=a.concat(RI(t,n,s,r.recurrenceSymbol));let o=OI(t,s,r),l=Ch(t,/([a-zA-Z'_-]*)/g,n),c=!1;if(l&&l.length>0){let f=l[0];if(f.length>=Math.max(1,s.autoSuggestMinMatch)){let p=o.filter(g=>g.displayText.toLowerCase().includes(f.toLowerCase()));for(let g of p)a.push({suggestionType:"match",displayText:g.displayText,appendText:g.appendText,insertAt:l.index,insertSkip:f.length}),c=!0}}return!c&&s.autoSuggestMinMatch===0&&(a=a.concat(o)),a.length>0&&!a.some(f=>f.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:`
`}),a=a.slice(0,s.autoSuggestMaxItems),a}}function OI(r,e,t){let n=a=>Object.values(t.prioritySymbols).some(o=>o.length>0&&a.includes(o)),s=[];if(r.includes(t.dueDateSymbol)||s.push({displayText:`${t.dueDateSymbol} due date`,appendText:`${t.dueDateSymbol} `}),r.includes(t.startDateSymbol)||s.push({displayText:`${t.startDateSymbol} start date`,appendText:`${t.startDateSymbol} `}),r.includes(t.scheduledDateSymbol)||s.push({displayText:`${t.scheduledDateSymbol} scheduled date`,appendText:`${t.scheduledDateSymbol} `}),n(r)||(s.push({displayText:`${t.prioritySymbols.High} high priority`,appendText:`${t.prioritySymbols.High} `}),s.push({displayText:`${t.prioritySymbols.Medium} medium priority`,appendText:`${t.prioritySymbols.Medium} `}),s.push({displayText:`${t.prioritySymbols.Low} low priority`,appendText:`${t.prioritySymbols.Low} `})),r.includes(t.recurrenceSymbol)||s.push({displayText:`${t.recurrenceSymbol} recurring (repeat)`,appendText:`${t.recurrenceSymbol} `}),!r.includes(t.createdDateSymbol)){let o=ir.parseDate("today",!0).format(ie.dateFormat);s.push({displayText:`${t.createdDateSymbol} created today (${o})`,appendText:`${t.createdDateSymbol} ${o} `})}return s}function MI(r,e,t,n){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"),l=Ch(r,o,e);if(l&&l.length>=2){let c=l[1],f=l[2];if(f.length<t.autoSuggestMinMatch)return[];let p=f&&f.length>1?ir.parseDate(hi(f),!0):null;p&&p.isValid()&&a.push({displayText:`${p.format(ie.dateFormat)}`,appendText:`${c} ${p.format(ie.dateFormat)} `,insertAt:l.index,insertSkip:l[0].length});let g=1,T=5,O=s.filter(v=>f&&f.length>=g&&v.toLowerCase().includes(f.toLowerCase())).slice(0,T);O.length===0&&(O=s.slice(0,T));for(let v of O){let C=`${ir.parseDate(v,!0).format(ie.dateFormat)}`;a.push({suggestionType:"match",displayText:`${v} (${C})`,appendText:`${c} ${C} `,insertAt:l.index,insertSkip:l[0].length})}}return a}function RI(r,e,t,n){var c;let s=["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"],a=[],o=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),l=Ch(r,o,e);if(l&&l.length>=2){let f=l[1],p=l[2];if(p.length<t.autoSuggestMinMatch)return[];if(p.length>0){let v=(c=St.fromText({recurrenceRuleText:p,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:c.toText();if(v){let R=`${f} ${v} `;if(a.push({suggestionType:"match",displayText:`\u2705 ${v}`,appendText:R,insertAt:l.index,insertSkip:l[0].length}),l[0]==R)return[]}}let g=1,T=t.autoSuggestMaxItems/2,O=s.filter(v=>p&&p.length>=g&&v.toLowerCase().includes(p.toLowerCase())).slice(0,T);O.length===0&&p.trim().length===0&&(O=s.slice(0,T));for(let v of O)a.push({suggestionType:"match",displayText:`${v}`,appendText:`${f} ${v} `,insertAt:l.index,insertSkip:l[0].length})}return a}function Ch(r,e,t){let n=r.matchAll(e);for(let s of n)if((s==null?void 0:s.index)&&s.index<=t&&t<=s.index+s[0].length)return s;return[]}var Qa=class{constructor(){this.hideTaskCount=!1;this.hideBacklinks=!1;this.hidePriority=!1;this.hideCreatedDate=!1;this.hideStartDate=!1;this.hideScheduledDate=!1;this.hideDoneDate=!1;this.hideDueDate=!1;this.hideRecurrenceRule=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.shortMode=!1;this.explainQuery=!1}},zn=class{constructor(e,t){this.defaultLayout=["description","priority","recurrenceRule","createdDate","startDate","scheduledDate","dueDate","doneDate","blockLink"];this.hiddenComponents=[];this.specificClasses=[];e?this.options=e:this.options=new Qa,t?this.layoutComponents=t:this.layoutComponents=this.defaultLayout,this.layoutComponents=this.applyOptions(this.options)}applyOptions(e){let t=(s,a,o)=>a?(this.specificClasses.push(`tasks-layout-hide-${o}`),this.hiddenComponents.push(o),s.filter(l=>l!=o)):s,n=this.layoutComponents;return n=t(n,e.hidePriority,"priority"),n=t(n,e.hideRecurrenceRule,"recurrenceRule"),n=t(n,e.hideCreatedDate,"createdDate"),n=t(n,e.hideStartDate,"startDate"),n=t(n,e.hideScheduledDate,"scheduledDate"),n=t(n,e.hideDueDate,"dueDate"),n=t(n,e.hideDoneDate,"doneDate"),e.shortMode&&this.specificClasses.push("tasks-layout-short-mode"),n}};var Ih={prioritySymbols:{High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",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}},Ds=class{constructor(e){this.symbols=e}serialize(e){let t=new zn,n="";for(let s of t.layoutComponents)n+=this.componentToString(e,t,s);return n}componentToString(e,t,n){var g;let{prioritySymbols:s,startDateSymbol:a,createdDateSymbol:o,scheduledDateSymbol:l,doneDateSymbol:c,recurrenceSymbol:f,dueDateSymbol:p}=this.symbols;switch(n){case"description":return e.description;case"priority":{let T="";return e.priority==="1"?T=" "+s.High:e.priority==="2"?T=" "+s.Medium:e.priority==="4"&&(T=" "+s.Low),T}case"startDate":return e.startDate?t.options.shortMode?" "+a:` ${a} ${e.startDate.format(ie.dateFormat)}`:"";case"createdDate":return e.createdDate?t.options.shortMode?" "+o:` ${o} ${e.createdDate.format(ie.dateFormat)}`:"";case"scheduledDate":return!e.scheduledDate||e.scheduledDateIsInferred?"":t.options.shortMode?" "+l:` ${l} ${e.scheduledDate.format(ie.dateFormat)}`;case"doneDate":return e.doneDate?t.options.shortMode?" "+c:` ${c} ${e.doneDate.format(ie.dateFormat)}`:"";case"dueDate":return e.dueDate?t.options.shortMode?" "+p:` ${p} ${e.dueDate.format(ie.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+f:` ${f} ${e.recurrence.toText()}`:"";case"blockLink":return(g=e.blockLink)!=null?g:"";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.Low:return"4";case t.Medium:return"2";case t.High:return"1";default:return"3"}}deserialize(e){let{TaskFormatRegularExpressions:t}=this.symbols,n,s="3",a=null,o=null,l=null,c=null,f=null,p="",g=null,T="",O=20,v=0;do{n=!1;let R=e.match(t.priorityRegex);R!==null&&(s=this.parsePriority(R[1]),e=e.replace(t.priorityRegex,"").trim(),n=!0);let C=e.match(t.doneDateRegex);C!==null&&(c=window.moment(C[1],ie.dateFormat),e=e.replace(t.doneDateRegex,"").trim(),n=!0);let $=e.match(t.dueDateRegex);$!==null&&(l=window.moment($[1],ie.dateFormat),e=e.replace(t.dueDateRegex,"").trim(),n=!0);let B=e.match(t.scheduledDateRegex);B!==null&&(o=window.moment(B[1],ie.dateFormat),e=e.replace(t.scheduledDateRegex,"").trim(),n=!0);let W=e.match(t.startDateRegex);W!==null&&(a=window.moment(W[1],ie.dateFormat),e=e.replace(t.startDateRegex,"").trim(),n=!0);let ke=e.match(t.createdDateRegex);ke!==null&&(f=window.moment(ke[1],ie.dateFormat),e=e.replace(t.createdDateRegex,"").trim(),n=!0);let Te=e.match(t.recurrenceRegex);Te!==null&&(p=Te[1].trim(),e=e.replace(t.recurrenceRegex,"").trim(),n=!0);let be=e.match(ie.hashTagsFromEnd);if(be!=null){e=e.replace(ie.hashTagsFromEnd,"").trim(),n=!0;let ee=be[0].trim();T=T.length>0?[ee,T].join(" "):ee}v++}while(n&&v<=O);return p.length>0&&(g=St.fromText({recurrenceRuleText:p,startDate:a,scheduledDate:o,dueDate:l})),T.length>0&&(e+=" "+T),{description:e,priority:s,startDate:a,createdDate:f,scheduledDate:o,dueDate:l,doneDate:c,recurrence:g,tags:Ge.extractHashtags(e)}}};function Es(r){let e=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,r,/ */,/[)\]]/,/$/].map(t=>t instanceof RegExp?t.source:t).join("");return new RegExp(e,r.flags)}var Fh={prioritySymbols:{High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",recurrenceSymbol:"repeat::",TaskFormatRegularExpressions:{priorityRegex:Es(/priority:: *(high|medium|low)/),startDateRegex:Es(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Es(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Es(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Es(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Es(/completion:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Es(/repeat:: *([a-zA-Z0-9, !]+)/)}},Pu=class extends Ds{constructor(){super(Fh)}parsePriority(e){switch(e){case"high":return"1";case"medium":return"2";case"low":return"4";default:return"3"}}componentToString(e,t,n){let s=super.componentToString(e,t,n);return s!==""&&!["blockLink","description"].includes(n)?` [${s.trim()}]`:s}};var Er=(o=>(o.TODO="TODO",o.DONE="DONE",o.IN_PROGRESS="IN_PROGRESS",o.CANCELLED="CANCELLED",o.NON_TASK="NON_TASK",o.EMPTY="EMPTY",o))(Er||{}),Ot=class{constructor(e,t,n,s,a="TODO"){this.symbol=e,this.name=t,this.nextStatusSymbol=n,this.availableAsCommand=s,this.type=a}};var Xt=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}constructor(e){this.configuration=e}static makeDone(){return new Xt(new Ot("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Xt(new Ot("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Xt(new Ot(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Xt(new Ot("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Xt(new Ot("/","In Progress","x",!0,"IN_PROGRESS"))}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 Er[e]||"TODO"}static createUnknownStatus(e){return new Xt(new Ot(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Xt.getTypeFromStatusTypeString(e[3]);return new Xt(new Ot(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}previewText(){let e="";return Xt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},he=Xt;he.DONE=Xt.makeDone(),he.EMPTY=Xt.makeEmpty(),he.TODO=Xt.makeTodo();var Au=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var mt=class{constructor(){this.coreStatuses=[he.makeTodo().configuration,he.makeDone().configuration],this.customStatuses=[he.makeInProgress().configuration,he.makeCancelled().configuration]}static addStatus(e,t){e.push(t)}static replaceStatus(e,t,n){let s=this.findStatusIndex(t,e);return s<=-1?!1:(e.splice(s,1,n),!0)}static findStatusIndex(e,t){let n=new he(e);return t.findIndex(s=>new he(s).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){mt.deleteAllCustomStatuses(e),new mt().customStatuses.forEach(n=>{mt.addStatus(e.customStatuses,n)})}static bulkAddStatusCollection(e,t){let n=[];return t.forEach(s=>{e.customStatuses.find(o=>o.symbol==s[0]&&o.name==s[1]&&o.nextStatusSymbol==s[2])?n.push(`The status ${s[1]} (${s[0]}) is already added.`):mt.addStatus(e.customStatuses,he.createFromImportedValue(s))}),n}static applyToStatusRegistry(e,t){t.clearStatuses(),e.coreStatuses.forEach(n=>{t.add(n)}),e.customStatuses.forEach(n=>{t.add(n)})}};var Lb=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}];var zr=class{constructor(e,t,n,s,a,o){this.internalName=e;this.index=t;this.description=n;this.displayName=s;this.enabledByDefault=a;this.stable=o}static get values(){let e=[];return Lb.forEach(t=>{e=[...e,new zr(t.internalName,t.index,t.description,t.displayName,t.enabledByDefault,t.stable)]}),e}static get settingsFlags(){let e={};return zr.values.forEach(t=>{e[t.internalName]=t.enabledByDefault}),e}static fromString(e){for(let t of zr.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}`)}};function Nu(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var Sr=class{static get(){let{globalFilter:e}=de();return e}static set(e){Mt({globalFilter:e})}static reset(){Mt({globalFilter:Sr.empty})}static isEmpty(){return Sr.get()===Sr.empty}static equals(e){return Sr.get()===e}static includedIn(e){let t=Sr.get();return e.includes(t)}static prependTo(e){return Sr.get()+" "+e}static removeAsWordFrom(e){if(Sr.isEmpty())return e;let t=RegExp("(^|\\s)"+Nu(Sr.get())+"($|\\s)","ug");return e.search(t)>-1&&(e=e.replace(t,"$1$2").replace(" "," ").trim()),e}static removeAsSubstringFrom(e){let t=Sr.get();return e.replace(t,"").trim()}static removeAsSubstringFromDependingOnSettings(e){let{removeGlobalFilter:t}=de();return t?Sr.removeAsSubstringFrom(e):e}},Fe=Sr;Fe.empty="";var bn={tasksPluginEmoji:{displayName:"Tasks Emoji Format",taskSerializer:new Ds(Ih),buildSuggestions:Nh(Ih)},dataview:{displayName:"Dataview",taskSerializer:new Pu,buildSuggestions:Nh(Fh)}},PI={globalFilter:Fe.empty,removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:6,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsDateFolders:[],statusSettings:new mt,features:zr.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new Au},Vn=Ae({},PI),de=()=>{for(let r in zr.settingsFlags)Vn.features[r]===void 0&&(Vn.features[r]=zr.settingsFlags[r]);return Vn.statusSettings.customStatuses.forEach((r,e,t)=>{var s,a;let n=he.getTypeFromStatusTypeString(r.type);t[e]=new Ot((s=r.symbol)!=null?s:" ",r.name,(a=r.nextStatusSymbol)!=null?a:"x",r.availableAsCommand,n)}),Ae({},Vn)},Mt=r=>(Vn=Ae(Ae({},Vn),r),de());var Ss=(r,e)=>(Vn.generalSettings[r]=e,de()),Ub=r=>{var e;return(e=Vn.features[r])!=null?e:!1};function eo(){return bn[de().taskFormat]}var Be=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==he.EMPTY.symbol)}static getInstance(){return Be.instance||(Be.instance=new Be),Be.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof he?this._registeredStatuses.push(e):this._registeredStatuses.push(new he(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):he.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):he.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:he.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 he.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:he.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(a=>!this.hasSymbol(a.symbol)),n=new Be,s=[];return t.forEach(a=>{if(n.hasSymbol(a.symbol))return;let o=Be.copyStatusWithNewName(a,`Unknown (${a.symbol})`);s.push(o),n.add(o)}),s}static copyStatusWithNewName(e,t){let n=new Ot(e.symbol,t,e.nextStatusSymbol,e.availableAsCommand,e.type);return new he(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(){[he.makeTodo(),he.makeInProgress(),he.makeDone(),he.makeCancelled()].forEach(t=>{this.add(t)})}};var wn=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=Math.round(window.moment().diff(e.dueDate)/wn.milliSecondsPerDay),s;n>=7?s=1:n>=-14?s=(n+14)*.8/21+.2:s=.2,t+=s*wn.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*wn.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*wn.startedCoefficient),e.priority){case"1":t+=1*wn.priorityCoefficient;break;case"2":t+=.65*wn.priorityCoefficient;break;case"3":t+=.325*wn.priorityCoefficient;break}return t}},vn=wn;vn.dueCoefficient=12,vn.scheduledCoefficient=5,vn.startedCoefficient=-3,vn.priorityCoefficient=6,vn.milliSecondsPerDay=1e3*60*60*24;var Vb=require("obsidian");var ro=require("obsidian");var $b=Fn(wu()),AI=require("obsidian"),Gb=Fn(jb());var Lh=class extends Gb.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=t=>t.reduce((n,s)=>n+s,0)/t.length}configure(t){return this.options=Object.assign({},this.options,t),this}getLogger(t){let n="none",s="";for(let a in this.options.minLevels)t.startsWith(a)&&a.length>=s.length&&(n=this.options.minLevels[a],s=a);return new Yh(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${(0,$b.default)().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)}},Cu=new Lh,Yh=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 a={level:e,module:this.module,message:t,objects:n,traceId:void 0};this.logManager.emit("log",a)}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,s){if(this.levelToInt(e)<this.minLevel)return;let o={level:e,module:this.module,message:n,objects:s,traceId:t};this.logManager.emit("log",o)}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)}};var Wh,qh,jh,NI=["md"],to=Cu.getLogger("tasks"),Bb=({metadataCache:r,vault:e,workspace:t})=>{Wh=r,qh=e,jh=t},Iu=t=>J(void 0,[t],function*({originalTask:r,newTasks:e}){if(qh===void 0||Wh===void 0||jh===void 0){$h("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),to.debug(`replaceTaskWithTasks entered. ${r.path}`),Hb({originalTask:r,newTasks:e,vault:qh,metadataCache:Wh,workspace:jh,previousTries:0})});function $h(r){console.error(r),new ro.Notice(r,15e3)}function Uh(r){console.warn(r),new ro.Notice(r,1e4)}function CI(r){to.debug(r)}var Hb=o=>J(void 0,[o],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a}){to.debug(`tryRepetitive after ${a} previous tries`);let l=()=>{if(a>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.
`;$h(C);return}let R=Math.min(Math.pow(10,a),100);to.debug(`timeout = ${R}`),setTimeout(()=>{Hb({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a+1})},R)},c=t.getAbstractFileByPath(r.path);if(!(c instanceof ro.TFile))return Uh(`Tasks: No file found for task ${r.description}. Retrying ...`),l();if(!NI.includes(c.extension)){$h(`Tasks: Does not support files with the ${c.extension} file extension.`);return}let f=n.getFileCache(c);if(f==null||f===null)return Uh(`Tasks: No file cache found for file ${c.path}. Retrying ...`),l();let p=f.listItems;if(p===void 0||p.length===0)return Uh(`Tasks: No list items found in file cache of ${c.path}. Retrying ...`),l();let T=(yield t.read(c)).split(`
`),O=II(r,T,p,CI);if(O===void 0)return l();let v=[...T.slice(0,O),...e.map(R=>R.toFileLineString()),...T.slice(O+1)];yield t.modify(c,v.join(`
`))});function zb(r,e){return r<e.length}function II(r,e,t,n){let s=FI(r,e);return s!==void 0||(s=LI(r,e),s!==void 0)?s:YI(r,e,t,n)}function FI(r,e){let t=r.taskLocation.lineNumber;if(zb(t,e)&&e[t]===r.originalMarkdown)return to.debug(`Found original markdown at original line number ${t}`),t}function LI(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 YI(r,e,t,n){let s,a=0;for(let o of t){let l=o.position.start.line;if(!zb(l,e))return;if(l<r.taskLocation.sectionStart||o.task===void 0)continue;let c=e[l];if(Fe.includedIn(c)){if(a===r.taskLocation.sectionIndex){if(c===r.originalMarkdown)s=l;else{n(`Tasks: Unable to find task in file ${r.taskLocation.path}.
Expected task:
${r.originalMarkdown}
Found task:
${c}`);return}break}a++}}return s}var Kn={description:"task-description",priority:"task-priority",dueDate:"task-due",startDate:"task-start",createdDate:"task-created",scheduledDate:"task-scheduled",doneDate:"task-done",recurrenceRule:"task-recurring",blockLink:""},UI=7,WI="far";function qI(r,e,t){return J(this,null,function*(){yield Vb.MarkdownRenderer.renderMarkdown(r,e,t,null)})}function Kb(r,e,t=null){return J(this,null,function*(){var l;t||(t=qI);let n=document.createElement("li");e.parentUlElement.appendChild(n),n.classList.add("task-list-item","plugin-tasks-list-item");let s=document.createElement("span");n.appendChild(s),s.classList.add("tasks-list-text");let a=yield jI(r,e,s,t);for(let c in a)n.dataset[c]=a[c];let o=document.createElement("input");return n.appendChild(o),o.classList.add("task-list-item-checkbox"),o.type="checkbox",r.status.symbol!==" "&&(o.checked=!0,n.classList.add("is-checked")),o.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),o.disabled=!0;let f=r.toggle();Iu({originalTask:r,newTasks:f})}),n.prepend(o),n.setAttribute("data-task",r.status.symbol.trim()),n.setAttribute("data-line",e.listIndex.toString()),n.setAttribute("data-task-status-name",r.status.name),n.setAttribute("data-task-status-type",r.status.type),o.setAttribute("data-line",e.listIndex.toString()),(l=e.layoutOptions)!=null&&l.shortMode&&zI({task:r,element:s,isFilenameUnique:e.isFilenameUnique}),n})}function jI(r,e,t,n){return J(this,null,function*(){let s={},a=new zn(e.layoutOptions),o=bn.tasksPluginEmoji.taskSerializer;for(let l of a.layoutComponents){let c=o.componentToString(r,a,l);if(c){l==="description"&&(c=Fe.removeAsSubstringFromDependingOnSettings(c));let f=document.createElement("span");if(t.appendChild(f),f){let p=document.createElement("span");f.appendChild(p),yield $I(p,c,l,r,n);let[g,T]=Gh(l,r);GI(l,p),f.classList.add(...g);for(let O in T)f.dataset[O]=T[O];s=Ae(Ae({},s),T)}}}for(let l of a.hiddenComponents){let[c,f]=Gh(l,r);s=Ae(Ae({},s),f)}if(s.taskPriority===void 0){let[l,c]=Gh("priority",r);s=Ae(Ae({},s),c)}return s})}function $I(r,e,t,n,s){return J(this,null,function*(){if(t==="description"){let{debugSettings:a}=de();a.showTaskHiddenData&&(e+=`<br>\u{1F41B} <b>${n.lineNumber}</b> . ${n.sectionStart} . ${n.sectionIndex} . '<code>${n.originalMarkdown}</code>'<br>'<code>${n.path}</code>' > '<code>${n.precedingHeader}</code>'<br>`),yield s(e,r,n.path);let o=r.querySelector("blockquote"),l=o!=null?o:r,c=l.querySelector("p");if(c!==null){for(;c.firstChild;)l.insertBefore(c.firstChild,c);c.remove()}r.querySelectorAll("p").forEach(f=>{f.hasChildNodes()||f.remove()}),r.querySelectorAll(".footnotes").forEach(f=>{f.remove()})}else r.innerHTML=e})}function Gh(r,e){let t=[],n={},s=(a,o)=>{let l=BI(a);l&&(n[o]=l)};switch(r){case"description":t.push(Kn.description);break;case"priority":{let a=null;e.priority==="1"?a="high":e.priority==="2"?a="medium":e.priority==="4"?a="low":a="normal",n.taskPriority=a,t.push(Kn.priority);break}case"createdDate":{let a=e.createdDate;a&&(t.push(Kn.createdDate),s(a,"taskCreated"));break}case"dueDate":{let a=e.dueDate;a&&(t.push(Kn.dueDate),s(a,"taskDue"));break}case"startDate":{let a=e.startDate;a&&(t.push(Kn.startDate),s(a,"taskStart"));break}case"scheduledDate":{let a=e.scheduledDate;a&&(t.push(Kn.scheduledDate),s(a,"taskScheduled"));break}case"doneDate":{let a=e.doneDate;a&&(t.push(Kn.doneDate),s(a,"taskDone"));break}case"recurrenceRule":{t.push(Kn.recurrenceRule);break}}return[t,n]}function GI(r,e){if(r==="description"){let t=e.getElementsByClassName("tag");for(let n=0;n<t.length;n++){let s=t[n].textContent;if(s){let a=HI(s),o=t[n];a&&(o.dataset.tagName=a)}}}}function BI(r){let e=window.moment().startOf("day"),t="",n=e.diff(r,"days");return isNaN(n)?null:n===0?"today":(n>0?t+="past-":n<0&&(t+="future-"),Math.abs(n)<=UI?t+=Math.abs(n).toString()+"d":t+=WI,t)}function HI(r){let e=/["&\x00\r\n]/g,t=r.replace(e,"-");return t=t.replace(/^[-_]+/,""),t.length>0?t:null}function zI({task:r,element:e,isFilenameUnique:t}){let{recurrenceSymbol:n,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,dueDateSymbol:l,doneDateSymbol:c}=bn.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{let f=e.createDiv();f.addClasses(["tooltip","pop-up"]),r.recurrence&&f.createDiv().setText(`${n} ${r.recurrence.toText()}`),r.createdDate&&f.createDiv().setText(no({signifier:a,date:r.createdDate})),r.startDate&&f.createDiv().setText(no({signifier:s,date:r.startDate})),r.scheduledDate&&f.createDiv().setText(no({signifier:o,date:r.scheduledDate})),r.dueDate&&f.createDiv().setText(no({signifier:l,date:r.dueDate})),r.doneDate&&f.createDiv().setText(no({signifier:c,date:r.doneDate}));let p=r.getLinkText({isFilenameUnique:t});p&&f.createDiv().setText(`\u{1F517} ${p}`),e.addEventListener("mouseleave",()=>{f.remove()})})}function no({signifier:r,date:e}){return`${r} ${e.format(ie.dateFormat)} (${e.from(window.moment().startOf("day"))})`}var Qt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=de();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("."),s=e.substring(t,n),a=/(\d{4})-(\d{2})-(\d{2})/.exec(s);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(s)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:e,scheduledDate:t,dueDate:n}){return e===null&&n===null&&t===null}static updateTaskPath(e,t,n){let s=e.scheduledDate,a=e.scheduledDateIsInferred;return n===null?a&&(a=!1,s=null):a?s=n:this.canApplyFallback(e)&&(s=n,a=!0),new Ge(tr(Ae({},e),{taskLocation:e.taskLocation.fromRenamedFile(t),scheduledDate:s,scheduledDateIsInferred:a}))}static removeInferredStatusIfNeeded(e,t){let n=e.scheduledDateIsInferred?e.scheduledDate:null;return t.map(s=>(n!==null&&!n.isSame(s.scheduledDate,"day")&&(s=new Ge(tr(Ae({},s),{scheduledDateIsInferred:!1}))),s))}};var ur=class{},ie=ur;ie.dateFormat="YYYY-MM-DD",ie.indentationRegex=/^([\s\t>]*)/,ie.listMarkerRegex=/([-*]|[0-9]+\.)/,ie.checkboxRegex=/\[(.)\]/u,ie.afterCheckboxRegex=/ *(.*)/u,ie.taskRegex=new RegExp(ur.indentationRegex.source+ur.listMarkerRegex.source+" +"+ur.checkboxRegex.source+ur.afterCheckboxRegex.source,"u"),ie.nonTaskRegex=new RegExp(ur.indentationRegex.source+ur.listMarkerRegex.source+"? *("+ur.checkboxRegex.source+")?"+ur.afterCheckboxRegex.source,"u"),ie.listItemRegex=new RegExp(ur.indentationRegex.source+ur.listMarkerRegex.source),ie.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,ie.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g,ie.hashTagsFromEnd=new RegExp(ur.hashTags.source+"$");var Ge=class{constructor({status:e,description:t,taskLocation:n,indentation:s,listMarker:a,priority:o,createdDate:l,startDate:c,scheduledDate:f,dueDate:p,doneDate:g,recurrence:T,blockLink:O,tags:v,originalMarkdown:R,scheduledDateIsInferred:C}){this._urgency=null;this.status=e,this.description=t,this.indentation=s,this.listMarker=a,this.taskLocation=n,this.tags=v,this.priority=o,this.createdDate=l,this.startDate=c,this.scheduledDate=f,this.dueDate=p,this.doneDate=g,this.recurrence=T,this.blockLink=O,this.originalMarkdown=R,this.scheduledDateIsInferred=C}static fromLine({line:e,taskLocation:t,fallbackDate:n}){let s=e.match(ie.taskRegex);if(s===null)return null;let a=s[4].trim();if(!Fe.includedIn(a))return null;let o=a,l=s[1],c=s[2],f=s[3],p=Be.getInstance().bySymbolOrCreate(f),g=o.match(ie.blockLinkRegex),T=g!==null?g[0]:"";T!==""&&(o=o.replace(ie.blockLinkRegex,"").trim());let{taskSerializer:O}=eo(),v=O.deserialize(o),R=!1;return Qt.canApplyFallback(v)&&n!==null&&(v.scheduledDate=n,R=!0),v.tags=v.tags.map(C=>C.trim()),v.tags=v.tags.filter(C=>!Fe.equals(C)),new Ge(tr(Ae({},v),{status:p,indentation:l,listMarker:c,taskLocation:t,blockLink:T,originalMarkdown:e,scheduledDateIsInferred:R}))}toLi(e){return J(this,null,function*(){return Kb(this,e)})}toString(){return eo().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=Be.getInstance().getNextStatusOrCreate(this.status),t=null,n=null;if(e.isCompleted()){let{setDoneDate:o}=de();o&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let s=new Ge(tr(Ae({},this),{status:e,doneDate:t})),a=[];if(n!==null){let{setCreatedDate:o}=de(),l=null;o&&(l=window.moment());let c=Be.getInstance().getNextStatusOrCreate(e),f=new Ge(tr(Ae(Ae({},this),n),{status:c,blockLink:"",createdDate:l}));a.push(f)}return a.push(s),a}get urgency(){return this._urgency===null&&(this._urgency=vn.calculate(this)),this._urgency}get path(){return this.taskLocation.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,s)=>n.identicalTo(t[s]))}identicalTo(e){let t=["status","description","path","indentation","listMarker","lineNumber","sectionStart","sectionIndex","precedingHeader","priority","blockLink","scheduledDateIsInferred"];for(let a of t)if(this[a]!==e[a])return!1;if(this.tags.length!==e.tags.length||!this.tags.every(function(a,o){return a===e.tags[o]}))return!1;t=["createdDate","startDate","scheduledDate","dueDate","doneDate"];for(let a of t){let o=this[a],l=e[a];if(Hr(o,l)!==0)return!1}let n=this.recurrence,s=e.recurrence;return n===null&&s!==null||n!==null&&s===null?!1:!(n&&s&&!n.identicalTo(s))}static extractHashtags(e){var t,n;return(n=(t=e.match(ie.hashTags))==null?void 0:t.map(s=>s.trim()))!=null?n:[]}};var so=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,s,a){this._path=e,this._lineNumber=t,this._sectionStart=n,this._sectionIndex=s,this._precedingHeader=a}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 Os=class{constructor({metadataCache:e,vault:t,events:n}){this.metadataCache=e,this.metadataCacheEventReferences=[],this.vault=t,this.vaultEventReferences=[],this.events=n,this.eventsEventReferences=[],this.tasksMutex=new xo,this.state="Cold",this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.subscribeToVault(),this.subscribeToEvents(),this.loadVault()}unload(){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.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){let e=this.metadataCache.on("resolved",()=>J(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(){let{useFilenameAsScheduledDate:e}=de(),t=this.vault.on("create",a=>{a instanceof _i.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(a)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",a=>{a instanceof _i.TFile&&this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(o=>o.path!==a.path),this.notifySubscribers()})});this.vaultEventReferences.push(n);let s=this.vault.on("rename",(a,o)=>{a instanceof _i.TFile&&this.tasksMutex.runExclusive(()=>{let l=new so(()=>Qt.fromPath(a.path));this.tasks=this.tasks.map(c=>c.path===o?e?Qt.updateTaskPath(c,a.path,l.value):new Ge(tr(Ae({},c),{taskLocation:c.taskLocation.fromRenamedFile(a.path)})):c),this.notifySubscribers()})});this.vaultEventReferences.push(s)}subscribeToEvents(){let e=this.events.onRequestCacheUpdate(t=>{t({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(e)}loadVault(){return this.tasksMutex.runExclusive(()=>J(this,null,function*(){this.state="Initializing",yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.notifySubscribers()}))}indexFile(e){return J(this,null,function*(){let t=this.metadataCache.getFileCache(e);if(t==null)return;let n=this.tasks.filter(o=>o.path===e.path),s=t.listItems,a=[];if(s!==void 0){let o=yield this.vault.cachedRead(e);a=this.getTasksFromFileContent(o,s,t,e)}Ge.tasksListsIdentical(n,a)||(this.getState()=="Warm"&&console.debug(`At least one task, its line number or its heading has changed in ${e.path}: triggering a refresh of all active Tasks blocks in Live Preview and Reading mode views.`),this.tasks=this.tasks.filter(o=>o.path!==e.path),this.tasks.push(...a),this.notifySubscribers())})}getTasksFromFileContent(e,t,n,s){let a=[],o=e.split(`
`),l=o.length,c=new so(()=>Qt.fromPath(s.path)),f=null,p=0;for(let g of t)if(g.task!==void 0){let T=g.position.start.line;if(T>=l)return console.log(`${s.path} Obsidian gave us a line number ${T} past the end of the file. ${l}.`),a;if((f===null||f.position.end.line<T)&&(f=Os.getSection(T,n.sections),p=0),f===null)continue;let O=o[T];if(O===void 0){console.log(`${s.path}: line ${T} - ignoring 'undefined' line.`);continue}let v;try{v=Ge.fromLine({line:O,taskLocation:new Ct(s.path,T,f.position.start.line,p,Os.getPrecedingHeader(T,n.headings)),fallbackDate:c.value})}catch(R){this.reportTaskParsingErrorToUser(R,s,g,O);continue}v!==null&&(p++,a.push(v))}return a}reportTaskParsingErrorToUser(e,t,n,s){let a=`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: ${s}
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.
`;console.error(a),e instanceof Error&&console.error(e.stack),this.state==="Initializing"&&new _i.Notice(a,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 s of t){if(s.position.start.line>e)return n;n=s.heading}return n}};var tp=require("obsidian");var hv=require("obsidian");function Rs(){}function zh(r){return r()}function Xb(){return Object.create(null)}function xs(r){r.forEach(zh)}function Jb(r){return typeof r=="function"}function ev(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function tv(r){return Object.keys(r).length===0}var rv=!1;function VI(){rv=!0}function KI(){rv=!1}function L(r,e){r.appendChild(e)}function Ti(r,e,t){r.insertBefore(e,t||null)}function Ps(r){r.parentNode.removeChild(r)}function Vh(r,e){for(let t=0;t<r.length;t+=1)r[t]&&r[t].d(e)}function ae(r){return document.createElement(r)}function ZI(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function Jt(r){return document.createTextNode(r)}function Se(){return Jt(" ")}function zt(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function nv(r){return function(e){return e.preventDefault(),r.call(this,e)}}function z(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}function XI(r){return Array.from(r.childNodes)}function Kh(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function Fr(r,e){r.value=e==null?"":e}function Zh(r,e){for(let t=0;t<r.options.length;t+=1){let n=r.options[t];if(n.__value===e){n.selected=!0;return}}r.selectedIndex=-1}function sv(r){let e=r.querySelector(":checked")||r.options[0];return e&&e.__value}function Lr(r,e,t){r.classList[t?"add":"remove"](e)}var Ms=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=ZI(t.nodeName):this.e=ae(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)Ti(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(Ps)}};var oo;function ao(r){oo=r}function QI(){if(!oo)throw new Error("Function called outside component initialization");return oo}function Xh(r){QI().$$.on_mount.push(r)}var io=[];var Yu=[],Lu=[],Qb=[],JI=Promise.resolve(),Hh=!1;function eF(){Hh||(Hh=!0,JI.then(iv))}function uo(r){Lu.push(r)}var Bh=new Set,Fu=0;function iv(){let r=oo;do{for(;Fu<io.length;){let e=io[Fu];Fu++,ao(e),tF(e.$$)}for(ao(null),io.length=0,Fu=0;Yu.length;)Yu.pop()();for(let e=0;e<Lu.length;e+=1){let t=Lu[e];Bh.has(t)||(Bh.add(t),t())}Lu.length=0}while(io.length);for(;Qb.length;)Qb.pop()();Hh=!1,Bh.clear(),ao(r)}function tF(r){if(r.fragment!==null){r.update(),xs(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(uo)}}var rF=new Set;function nF(r,e){r&&r.i&&(rF.delete(r),r.i(e))}var Dj=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function sF(r,e,t,n){let{fragment:s,on_mount:a,on_destroy:o,after_update:l}=r.$$;s&&s.m(e,t),n||uo(()=>{let c=a.map(zh).filter(Jb);o?o.push(...c):xs(c),r.$$.on_mount=[]}),l.forEach(uo)}function av(r,e){let t=r.$$;t.fragment!==null&&(xs(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function iF(r,e){r.$$.dirty[0]===-1&&(io.push(r),eF(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function ov(r,e,t,n,s,a,o,l=[-1]){let c=oo;ao(r);let f=r.$$={fragment:null,ctx:null,props:a,update:Rs,not_equal:s,bound:Xb(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Xb(),dirty:l,skip_bound:!1,root:e.target||c.$$.root};o&&o(f.root);let p=!1;if(f.ctx=t?t(r,e.props||{},(g,T,...O)=>{let v=O.length?O[0]:T;return f.ctx&&s(f.ctx[g],f.ctx[g]=v)&&(!f.skip_bound&&f.bound[g]&&f.bound[g](v),p&&iF(r,g)),T}):[],f.update(),p=!0,xs(f.before_update),f.fragment=n?n(f.ctx):!1,e.target){if(e.hydrate){VI();let g=XI(e.target);f.fragment&&f.fragment.l(g),g.forEach(Ps)}else f.fragment&&f.fragment.c();e.intro&&nF(r.$$.fragment),sF(r,e.target,e.anchor,e.customElement),KI(),iv()}ao(c)}var aF;typeof HTMLElement=="function"&&(aF=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map(zh).filter(Jb);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){xs(this.$$.on_disconnect)}$destroy(){av(this,1),this.$destroy=Rs}$on(r,e){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&&!tv(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Uu=class{$destroy(){av(this,1),this.$destroy=Rs}$on(e,t){let n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{let s=n.indexOf(t);s!==-1&&n.splice(s,1)}}$set(e){this.$$set&&!tv(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Jh=Fn(pt());function uv(r,e,t){let n=r.slice();return n[45]=e[t],n}function lv(r,e,t){let n=r.slice();return n[48]=e[t].value,n[49]=e[t].label,n[50]=e[t].symbol,n}function oF(r){let e,t=r[50]+"",n;return{c(){e=ae("span"),n=Jt(t)},m(s,a){Ti(s,e,a),L(e,n)},p:Rs,d(s){s&&Ps(e)}}}function cv(r){let e,t,n,s,a,o,l,c,f=r[49]+"",p,g,T=r[50]&&r[50].charCodeAt(0)>=256,O,v,R,C,$=T&&oF(r);return{c(){e=ae("span"),t=ae("input"),o=Se(),l=ae("label"),c=ae("span"),p=Jt(f),g=Se(),$&&$.c(),v=Se(),z(t,"type","radio"),z(t,"id",n="priority-"+r[48]),t.__value=s=r[48],t.value=t.__value,z(t,"accesskey",a=r[15](r[49].charAt(0).toLowerCase())),r[33][0].push(t),z(c,"class","accesskey-first"),z(l,"for",O="priority-"+r[48])},m(B,W){Ti(B,e,W),L(e,t),t.checked=t.__value===r[1].priority,L(e,o),L(e,l),L(l,c),L(c,p),L(l,g),$&&$.m(l,null),L(e,v),R||(C=zt(t,"change",r[32]),R=!0)},p(B,W){W[0]&32768&&a!==(a=B[15](B[49].charAt(0).toLowerCase()))&&z(t,"accesskey",a),W[0]&3&&(t.checked=t.__value===B[1].priority),T&&$.p(B,W)},d(B){B&&Ps(e),r[33][0].splice(r[33][0].indexOf(t),1),$&&$.d(),R=!1,C()}}}function dv(r){let e,t=r[45].name+"",n,s,a=r[45].symbol+"",o,l,c;return{c(){e=ae("option"),n=Jt(t),s=Jt(" ["),o=Jt(a),l=Jt("]"),e.__value=c=r[45],e.value=e.__value},m(f,p){Ti(f,e,p),L(e,n),L(e,s),L(e,o),L(e,l)},p(f,p){p[0]&1&&t!==(t=f[45].name+"")&&Kh(n,t),p[0]&1&&a!==(a=f[45].symbol+"")&&Kh(o,a),p[0]&1&&c!==(c=f[45])&&(e.__value=c,e.value=e.__value)},d(f){f&&Ps(e)}}}function uF(r){let e,t,n,s,a,o,l,c,f,p,g,T,O,v,R,C,$,B,W,ke,Te,be,ee,ne,It,yt,V,q,P,Q,Y,oe,y,_,w,k,E,M,D,I,A,N,j,De,pe,le,Ce,K,qe,Xe,ct,Or,it,je,dt,gt,Mn,Li,$e,qs,ts,ft,ce,Jr,Rt,rs,po,Ur,Rn,_t,Yi,dr,en,Le,xn,js,ns,Pn,ss,fr,An,mo,tn,yo,hr,pr,H,$s,go,ht,is,Pe,mr=r[20],Ft=[];for(let G=0;G<mr.length;G+=1)Ft[G]=cv(lv(r,mr,G));let et=r[0],Qe=[];for(let G=0;G<et.length;G+=1)Qe[G]=dv(uv(r,et,G));return{c(){e=ae("div"),t=ae("form"),n=ae("div"),s=ae("label"),s.innerHTML='Descrip<span class="accesskey">t</span>ion',a=Se(),o=ae("textarea"),c=Se(),f=ae("div"),p=ae("label"),g=Jt("Priority"),O=Se();for(let G=0;G<Ft.length;G+=1)Ft[G].c();v=Se(),R=ae("div"),C=ae("label"),C.textContent="Recurs",$=Se(),B=ae("input"),ke=Se(),Te=ae("code"),be=Jt(r[16]),ee=Se(),ne=new Ms(!1),It=Se(),yt=ae("label"),yt.textContent="Due",V=Se(),q=ae("input"),Q=Se(),Y=ae("code"),oe=Jt(r[19]),y=Se(),_=new Ms(!1),w=Se(),k=ae("label"),k.textContent="Scheduled",E=Se(),M=ae("input"),I=Se(),A=ae("code"),N=Jt(r[18]),j=Se(),De=new Ms(!1),pe=Se(),le=ae("label"),le.innerHTML='St<span class="accesskey">a</span>rt',Ce=Se(),K=ae("input"),Xe=Se(),ct=ae("code"),Or=Jt(r[17]),it=Se(),je=new Ms(!1),dt=Se(),gt=ae("div"),Mn=ae("label"),Mn.innerHTML=`Only
<span class="accesskey-first">future</span> dates:`,Li=Se(),$e=ae("input"),ts=Se(),ft=ae("div"),ce=ae("label"),ce.innerHTML='Stat<span class="accesskey">u</span>s',Jr=Se(),Rt=ae("select");for(let G=0;G<Qe.length;G+=1)Qe[G].c();po=Se(),Ur=ae("div"),Rn=ae("div"),_t=ae("label"),_t.textContent="Completed:",Yi=Se(),dr=ae("input"),Le=Se(),xn=ae("div"),js=ae("span"),js.textContent="Created on:",ns=Se(),Pn=ae("code"),ss=Se(),fr=ae("div"),An=ae("span"),An.textContent="Done on:",mo=Se(),tn=ae("code"),yo=Se(),hr=ae("div"),pr=ae("button"),H=Jt("Apply"),go=Se(),ht=ae("button"),ht.textContent="Cancel",z(s,"for","description"),z(o,"id","description"),z(o,"type","text"),z(o,"class","tasks-modal-description"),z(o,"placeholder","Take out the trash"),z(o,"accesskey",l=r[15]("t")),z(n,"class","tasks-modal-section"),z(p,"for",T="priority-"+r[1].priority),z(f,"class","tasks-modal-section tasks-modal-priorities"),z(C,"for","recurrence"),z(C,"class","accesskey-first"),z(B,"id","recurrence"),z(B,"type","text"),z(B,"placeholder","Try 'every 2 weeks on Thursday'."),z(B,"accesskey",W=r[15]("r")),Lr(B,"tasks-modal-error",!r[8]),ne.a=null,z(yt,"for","due"),z(yt,"class","accesskey-first"),z(q,"id","due"),z(q,"type","text"),z(q,"placeholder",Qh),z(q,"accesskey",P=r[15]("d")),Lr(q,"tasks-modal-error",!r[7]),_.a=null,z(k,"for","scheduled"),z(k,"class","accesskey-first"),z(M,"id","scheduled"),z(M,"type","text"),z(M,"placeholder",Qh),z(M,"accesskey",D=r[15]("s")),Lr(M,"tasks-modal-error",!r[5]),De.a=null,z(le,"for","start"),z(K,"id","start"),z(K,"type","text"),z(K,"placeholder",Qh),z(K,"accesskey",qe=r[15]("a")),Lr(K,"tasks-modal-error",!r[3]),je.a=null,z(Mn,"for","forwardOnly"),z($e,"id","forwardOnly"),z($e,"type","checkbox"),z($e,"class","task-list-item-checkbox tasks-modal-checkbox"),z($e,"accesskey",qs=r[15]("f")),z(R,"class","tasks-modal-section tasks-modal-dates"),z(ce,"for","status"),z(Rt,"id","status-type"),z(Rt,"class","dropdown"),z(Rt,"accesskey",rs=r[15]("u")),r[1].status===void 0&&uo(()=>r[39].call(Rt)),z(ft,"class","tasks-modal-section"),z(_t,"for","status"),z(dr,"id","status"),z(dr,"type","checkbox"),z(dr,"class","task-list-item-checkbox tasks-modal-checkbox"),dr.checked=en=r[1].status.isCompleted(),dr.disabled=!0,z(Ur,"class","tasks-modal-section tasks-modal-status"),pr.disabled=$s=!r[14],z(pr,"type","submit"),z(pr,"class","mod-cta"),z(ht,"type","button"),z(hr,"class","tasks-modal-section tasks-modal-buttons"),Lr(t,"with-accesskeys",r[9]),z(e,"class","tasks-modal")},m(G,re){Ti(G,e,re),L(e,t),L(t,n),L(n,s),L(n,a),L(n,o),Fr(o,r[1].description),r[31](o),L(t,c),L(t,f),L(f,p),L(p,g),L(f,O);for(let ue=0;ue<Ft.length;ue+=1)Ft[ue].m(f,null);L(t,v),L(t,R),L(R,C),L(R,$),L(R,B),Fr(B,r[1].recurrenceRule),L(R,ke),L(R,Te),L(Te,be),L(Te,ee),ne.m(r[12],Te),L(R,It),L(R,yt),L(R,V),L(R,q),Fr(q,r[1].dueDate),L(R,Q),L(R,Y),L(Y,oe),L(Y,y),_.m(r[6],Y),L(R,w),L(R,k),L(R,E),L(R,M),Fr(M,r[1].scheduledDate),L(R,I),L(R,A),L(A,N),L(A,j),De.m(r[4],A),L(R,pe),L(R,le),L(R,Ce),L(R,K),Fr(K,r[1].startDate),L(R,Xe),L(R,ct),L(ct,Or),L(ct,it),je.m(r[2],ct),L(R,dt),L(R,gt),L(gt,Mn),L(gt,Li),L(gt,$e),$e.checked=r[1].forwardOnly,L(t,ts),L(t,ft),L(ft,ce),L(ft,Jr),L(ft,Rt);for(let ue=0;ue<Qe.length;ue+=1)Qe[ue].m(Rt,null);Zh(Rt,r[1].status),L(t,po),L(t,Ur),L(Ur,Rn),L(Rn,_t),L(Rn,Yi),L(Rn,dr),L(Ur,Le),L(Ur,xn),L(xn,js),L(xn,ns),L(xn,Pn),Pn.innerHTML=r[11],L(Ur,ss),L(Ur,fr),L(fr,An),L(fr,mo),L(fr,tn),tn.innerHTML=r[13],L(t,yo),L(t,hr),L(hr,pr),L(pr,H),L(hr,go),L(hr,ht),is||(Pe=[zt(o,"input",r[30]),zt(o,"keydown",r[23]),zt(o,"paste",r[24]),zt(o,"drop",r[24]),zt(f,"keyup",r[21]),zt(B,"input",r[34]),zt(q,"input",r[35]),zt(M,"input",r[36]),zt(K,"input",r[37]),zt($e,"change",r[38]),zt(Rt,"change",r[39]),zt(ht,"click",r[22]),zt(t,"submit",nv(r[25]))],is=!0)},p(G,re){if(re[0]&32768&&l!==(l=G[15]("t"))&&z(o,"accesskey",l),re[0]&3&&Fr(o,G[1].description),re[0]&3&&T!==(T="priority-"+G[1].priority)&&z(p,"for",T),re[0]&1081346){mr=G[20];let ue;for(ue=0;ue<mr.length;ue+=1){let jt=lv(G,mr,ue);Ft[ue]?Ft[ue].p(jt,re):(Ft[ue]=cv(jt),Ft[ue].c(),Ft[ue].m(f,null))}for(;ue<Ft.length;ue+=1)Ft[ue].d(1);Ft.length=mr.length}if(re[0]&32768&&W!==(W=G[15]("r"))&&z(B,"accesskey",W),re[0]&3&&B.value!==G[1].recurrenceRule&&Fr(B,G[1].recurrenceRule),re[0]&256&&Lr(B,"tasks-modal-error",!G[8]),re[0]&4096&&ne.p(G[12]),re[0]&32768&&P!==(P=G[15]("d"))&&z(q,"accesskey",P),re[0]&3&&q.value!==G[1].dueDate&&Fr(q,G[1].dueDate),re[0]&128&&Lr(q,"tasks-modal-error",!G[7]),re[0]&64&&_.p(G[6]),re[0]&32768&&D!==(D=G[15]("s"))&&z(M,"accesskey",D),re[0]&3&&M.value!==G[1].scheduledDate&&Fr(M,G[1].scheduledDate),re[0]&32&&Lr(M,"tasks-modal-error",!G[5]),re[0]&16&&De.p(G[4]),re[0]&32768&&qe!==(qe=G[15]("a"))&&z(K,"accesskey",qe),re[0]&3&&K.value!==G[1].startDate&&Fr(K,G[1].startDate),re[0]&8&&Lr(K,"tasks-modal-error",!G[3]),re[0]&4&&je.p(G[2]),re[0]&32768&&qs!==(qs=G[15]("f"))&&z($e,"accesskey",qs),re[0]&3&&($e.checked=G[1].forwardOnly),re[0]&1){et=G[0];let ue;for(ue=0;ue<et.length;ue+=1){let jt=uv(G,et,ue);Qe[ue]?Qe[ue].p(jt,re):(Qe[ue]=dv(jt),Qe[ue].c(),Qe[ue].m(Rt,null))}for(;ue<Qe.length;ue+=1)Qe[ue].d(1);Qe.length=et.length}re[0]&32768&&rs!==(rs=G[15]("u"))&&z(Rt,"accesskey",rs),re[0]&3&&Zh(Rt,G[1].status),re[0]&3&&en!==(en=G[1].status.isCompleted())&&(dr.checked=en),re[0]&2048&&(Pn.innerHTML=G[11]),re[0]&8192&&(tn.innerHTML=G[13]),re[0]&16384&&$s!==($s=!G[14])&&(pr.disabled=$s),re[0]&512&&Lr(t,"with-accesskeys",G[9])},i:Rs,o:Rs,d(G){G&&Ps(e),r[31](null),Vh(Ft,G),Vh(Qe,G),is=!1,xs(Pe)}}}var Qh="Try 'Monday' or 'tomorrow', or [td|tm|yd|tw|nw|we] then space.";function lF(r,e,t){let n;var s;let{task:a}=e,{onSubmit:o}=e,{statusOptions:l}=e,{prioritySymbols:c,recurrenceSymbol:f,startDateSymbol:p,scheduledDateSymbol:g,dueDateSymbol:T}=bn.tasksPluginEmoji.taskSerializer.symbols,O,v={description:"",status:he.TODO,priority:"none",recurrenceRule:"",createdDate:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:"",forwardOnly:!0},R=!0,C="",$="",B=!0,W="",ke=!0,Te="",be=!0,ee="",ne=!0,It="",yt=!1,V=!0,q=!0,P=[{value:"low",label:"Low",symbol:c.Low},{value:"none",label:"Normal",symbol:c.None},{value:"medium",label:"Medium",symbol:c.Medium},{value:"high",label:"High",symbol:c.High}];function Q(K,qe,Xe=void 0){if(!qe)return`<i>no ${K} date</i>`;let ct=Jh.parseDate(qe,Xe,{forwardDate:Xe!=null});return ct!==null?window.moment(ct).format("YYYY-MM-DD"):`<i>invalid ${K} date</i>`}function Y(K,qe){return Q(K,qe,v.forwardOnly?new Date:void 0)}function oe(K){let qe=null,Xe=Jh.parseDate(K,new Date,{forwardDate:v.forwardOnly});return Xe!==null&&(qe=window.moment(Xe)),qe}Xh(()=>{let{provideAccessKeys:K}=de();t(9,V=K);let qe=Fe.removeAsWordFrom(a.description);(qe!=a.description||!Fe.includedIn(a.description))&&(yt=!0);let Xe="none";a.priority==="4"?Xe="low":a.priority==="2"?Xe="medium":a.priority==="1"&&(Xe="high"),t(1,v={description:qe,status:a.status,priority:Xe,recurrenceRule:a.recurrence?a.recurrence.toText():"",createdDate:a.createdDate?a.createdDate.format("YYYY-MM-DD"):"",startDate:a.startDate?a.startDate.format("YYYY-MM-DD"):"",scheduledDate:a.scheduledDate?a.scheduledDate.format("YYYY-MM-DD"):"",dueDate:a.dueDate?a.dueDate.format("YYYY-MM-DD"):"",doneDate:a.doneDate?a.doneDate.format("YYYY-MM-DD"):"",forwardOnly:!0}),setTimeout(()=>{O.focus()},10)});let y=K=>{if(K.key&&!K.altKey&&!K.ctrlKey){let qe=P.find(Xe=>Xe.label.charAt(0).toLowerCase()==K.key);qe&&t(1,v.priority=qe.value,v)}},_=()=>{o([])},w=K=>{K.key==="Enter"&&(K.preventDefault(),q&&E())},k=()=>{setTimeout(()=>{t(1,v.description=v.description.replace(/[\r\n]+/g," "),v)},0)},E=()=>{let K=v.description.trim();yt&&(K=Fe.prependTo(K));let qe=oe(v.startDate),Xe=oe(v.scheduledDate),ct=oe(v.dueDate),Or=null;v.recurrenceRule&&(Or=St.fromText({recurrenceRuleText:v.recurrenceRule,startDate:qe,scheduledDate:Xe,dueDate:ct}));let it;switch(v.priority){case"low":it="4";break;case"medium":it="2";break;case"high":it="1";break;default:it="3"}let je=new Ge(Object.assign(Object.assign({},a),{description:K,status:v.status,priority:it,recurrence:Or,startDate:qe,scheduledDate:Xe,dueDate:ct,doneDate:window.moment(v.doneDate,"YYYY-MM-DD").isValid()?window.moment(v.doneDate,"YYYY-MM-DD"):null}));o([je])},M=[[]];function D(){v.description=this.value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function I(K){Yu[K?"unshift":"push"](()=>{O=K,t(10,O)})}function A(){v.priority=this.__value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function N(){v.recurrenceRule=this.value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function j(){v.dueDate=this.value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function De(){v.scheduledDate=this.value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function pe(){v.startDate=this.value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function le(){v.forwardOnly=this.checked,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function Ce(){v.status=sv(this),t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}return r.$$set=K=>{"task"in K&&t(26,a=K.task),"onSubmit"in K&&t(27,o=K.onSubmit),"statusOptions"in K&&t(0,l=K.statusOptions)},r.$$.update=()=>{if(r.$$.dirty[0]&512){e:t(15,n=K=>V?K:null)}if(r.$$.dirty[0]&66){e:t(1,v.dueDate=hi(v.dueDate),v),t(6,Te=Y("due",v.dueDate)),t(7,be=!Te.includes("invalid"))}if(r.$$.dirty[0]&6){e:t(1,v.startDate=hi(v.startDate),v),t(2,$=Y("start",v.startDate)),t(3,B=!$.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,v.scheduledDate=hi(v.scheduledDate),v),t(4,W=Y("scheduled",v.scheduledDate)),t(5,ke=!W.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,ne=!0),!v.recurrenceRule)t(12,ee="<i>not recurring</>");else{let K=t(28,s=St.fromText({recurrenceRuleText:v.recurrenceRule,startDate:null,scheduledDate:null,dueDate:null}))===null||s===void 0?void 0:s.toText();K?t(12,ee=K):(t(12,ee="<i>invalid recurrence rule</i>"),t(8,ne=!1))}}if(r.$$.dirty[0]&2){e:t(29,R=v.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,q=be&&ne&&ke&&B&&R)}if(r.$$.dirty[0]&2){e:t(11,C=Q("created",v.createdDate)),t(13,It=Q("done",v.doneDate))}},[l,v,$,B,W,ke,Te,be,ne,V,O,C,ee,It,q,n,f,p,g,T,P,y,_,w,k,E,a,o,s,R,D,I,A,M,N,j,De,pe,le,Ce]}var ep=class extends Uu{constructor(e){super(),ov(this,e,lF,uF,ev,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},fv=ep;var Zn=class extends hv.Modal{constructor({app:t,task:n,onSubmit:s}){super(t);this.task=n,this.onSubmit=a=>{a.length&&s(a),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task");let{contentEl:t}=this,n=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new fv({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=Be.getInstance().registeredStatuses;return Be.getInstance().bySymbol(this.task.status.symbol)===he.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};var Wu=({line:r,path:e})=>{var v,R;let t=Qt.fromPath(e),n=Ge.fromLine({line:r,taskLocation:Ct.fromUnknownPosition(e),fallbackDate:t});if(n!==null)return n;let{setCreatedDate:s}=de(),a=null;s&&(a=window.moment());let o=r.match(ie.nonTaskRegex);if(o===null)return console.error("Tasks: Cannot create task on line:",r),new Ge({status:he.TODO,description:"",taskLocation:Ct.fromUnknownPosition(e),indentation:"",listMarker:"-",priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let l=o[1],c=(v=o[2])!=null?v:"-",f=(R=o[4])!=null?R:" ",p=Be.getInstance().bySymbolOrCreate(f),g=o[5],T=r.match(ie.blockLinkRegex),O=T!==null?T[0]:"";return O!==""&&(g=g.replace(ie.blockLinkRegex,"")),new Ge({status:p,description:g,taskLocation:Ct.fromUnknownPosition(e),indentation:l,listMarker:c,blockLink:O,priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var pv=(r,e,t,n)=>{var g;if(r)return t instanceof tp.MarkdownView;if(!(t instanceof tp.MarkdownView))return;let s=(g=t.file)==null?void 0:g.path;if(s===void 0)return;let o=e.getCursor().line,l=e.getLine(o),c=Wu({line:l,path:s}),f=T=>{let O=Qt.removeInferredStatusIfNeeded(c,T).map(v=>v.toFileLineString()).join(`
`);e.setLine(o,O)};new Zn({app:n,task:c,onSubmit:f}).open()};var rp=require("obsidian");var mv=(r,e,t)=>{var c;if(r)return t instanceof rp.MarkdownView;if(!(t instanceof rp.MarkdownView))return;let n=(c=t.file)==null?void 0:c.path;if(n===void 0)return;let s=e.getCursor(),a=s.line,o=e.getLine(a),l=cF(o,n);e.setLine(a,l.text),e.setCursor(dF(s,l))},cF=(r,e)=>{let t=Ge.fromLine({line:r,taskLocation:Ct.fromUnknownPosition(e),fallbackDate:null});if(t!==null){let n=t.toggle().map(s=>s.toFileLineString());return{text:n.join(`
`),moveTo:{line:n.length-1}}}else{let n=r.match(ie.taskRegex);if(n!==null){let s=n[3],o=Be.getInstance().bySymbol(s).nextStatusSymbol;return{text:r.replace(ie.taskRegex,`$1- [${o}] $4`)}}else if(ie.listItemRegex.test(r)){let s=r.replace(ie.listItemRegex,"$1$2 [ ]");return{text:s,moveTo:{ch:s.length}}}else{let s=r.replace(ie.indentationRegex,"$1- ");return{text:s,moveTo:{ch:s.length}}}}},dF=(r,e)=>{var a;let t={line:0,ch:r.ch},n=Ae(Ae({},t),(a=e.moveTo)!=null?a:{}),s=e.text.split(`
`)[n.line].length;return{line:r.line+n.line,ch:Math.min(n.ch,s)}};var qu=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,s)=>pv(t,n,s,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:mv})}};var ju=class{constructor({obsidianEvents:e}){this.obsidianEvents=e}onCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",e)}triggerCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",e)}onRequestCacheUpdate(e){return this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",e)}triggerRequestCacheUpdate(e){this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",e)}off(e){this.obsidianEvents.offref(e)}};var $u=class{constructor({plugin:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);e.registerMarkdownPostProcessor(this._markdownPostProcessor.bind(this))}_markdownPostProcessor(e,t){return J(this,null,function*(){var f;let n=e.findAll(".task-list-item").filter(p=>{var O;let g=(O=p.textContent)==null?void 0:O.split(`
`);if(g===void 0)return!1;let T=null;for(let v=0;v<g.length;v=v+1)if(g[v]!==""){T=g[v];break}return T===null?!1:Fe.includedIn(T)});if(n.length===0)return;let s=t.sourcePath,a=t.getSectionInfo(e);if(a===null)return;let o=a.text.split(`
`),l=0,c=[];for(let p=a.lineStart;p<=a.lineEnd;p++){let g=o[p];if(g===void 0)continue;let T=null,O=Ge.fromLine({line:g,taskLocation:new Ct(s,p,a.lineStart,l,T),fallbackDate:null});O!==null&&(c.push(O),l++)}for(let p=0;p<n.length;p++){let g=c[p],T=n[p];if(g===void 0||T===void 0)continue;let O=(f=T.getAttr("data-line"))!=null?f:"0",v=Number.parseInt(O,10),R=yield g.toLi({parentUlElement:e,listIndex:v}),C=T.childNodes;for(let W=0;W<C.length;W=W+1){let ke=C[W];ke.nodeName.toLowerCase()==="div"?R.prepend(ke):ke.nodeName.toLowerCase()==="ul"&&R.append(ke)}let $=T.querySelectorAll("[data-footnote-id]"),B=R.querySelectorAll("[data-footnote-id]");if($.length===B.length)for(let W=0;W<$.length;W++)B[W].replaceWith($[W]);T.replaceWith(R)}})}};var yv=require("@codemirror/view"),gv=require("obsidian");var _v=()=>yv.ViewPlugin.fromClass(np),np=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 T=`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(T),new gv.Notice(T,45e3)}return!1}let{state:s}=this.view,a=this.view.posAtDOM(t),o=s.doc.lineAt(a),l=Ge.fromLine({line:o.text,taskLocation:Ct.fromUnknownPosition(""),fallbackDate:null});if(console.debug(`Live Preview Extension: toggle called. Position: ${a} Line: ${o.text}`),l===null)return!1;e.preventDefault();let f=l.toggle().map(T=>T.toFileLineString()).join(s.lineBreak),p=s.update({changes:{from:o.from,to:o.to,insert:f}});this.view.dispatch(p);let g=t.checked;return setTimeout(()=>{t.checked=g},1),!0}};var pl=require("obsidian");var kn=class{constructor(e,t,n){this.property=e,this.comparator=kn.maybeReverse(n,t)}static maybeReverse(e,t){return e?kn.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var Xn=class{constructor(e,t){this.property=e,this.grouper=t}};var Ve=class{canCreateFilterForLine(e){return Ve.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 Nu(this.fieldNameSingular())}supportsSorting(){return!1}parseSortLine(e){return!this.supportsSorting()||!this.canCreateSorterForLine(e)?null:this.createSorterFromLine(e)}canCreateSorterForLine(e){return this.supportsSorting()?Ve.lineMatchesFilter(this.sorterRegExp(),e):!1}createSorterFromLine(e){if(!this.supportsSorting())return null;let t=Ve.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)?`)}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(e){return new kn(this.fieldNameSingular(),this.comparator(),e)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(){return new Xn(this.fieldNameSingular(),this.grouper())}};var Ke=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 Ke("None of",e,"NOT")}static booleanXor(e){return new Ke("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 s=0;s<this.children.length;s++)t+=`
${this.children[s].asString(n)}`;return t}static combineOrCreateExplanation(e,t,n){if(t.length===2){let s=t[0],a=t[1];if(s.symbol===n&&a.symbol==="")return s.children.push(a),s}return new Ke(e,t,n)}};var er=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(" ")}
`}},Ze=class{constructor(e){this.instruction=e}get filter(){return this._filter}set filter(e){this._filter=e}get filterFunction(){if(this._filter)return this._filter.filterFunction}static fromFilter(e){let t=new Ze(e.instruction);return t.filter=e,t}static fromError(e,t){let n=new Ze(e);return n.error=t,n}};var Gu=class{constructor(e,t){this._instruction=e,this._filter=t}canCreateFilterForLine(e){return e==this._instruction}createFilterOrErrorMessage(e){let t=new Ze(e);return e===this._instruction?(t.filter=new er(e,this._filter,new Ke(e)),t):(t.error=`do not understand filter: ${e}`,t)}};var Vr=class{constructor(){this._filters=[]}add(e,t){this._filters.push(new Gu(e,t))}canCreateFilterForLine(e){for(let t of this._filters)if(t.canCreateFilterForLine(e))return!0;return!1}createFilterOrErrorMessage(e){for(let n of this._filters){let s=n.createFilterOrErrorMessage(e);if(s.error===void 0)return s}let t=new Ze(e);return t.error=`do not understand filter: ${e}`,t}};var Qn=class extends Ve{constructor(){super(...arguments);this._filters=new Vr}canCreateFilterForLine(t){return this._filters.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){return this._filters.createFilterOrErrorMessage(t)}filterRegExp(){return null}};var Kr=class extends Qn{constructor(){super(),this._filters.add("done",e=>e.status.type==="DONE"||e.status.type==="CANCELLED"||e.status.type==="NON_TASK"),this._filters.add("not done",e=>e.status.type==="TODO"||e.status.type==="IN_PROGRESS")}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Kr.oldStatusName(e),s=Kr.oldStatusName(t);return n<s?1:n>s?-1:0}}static oldStatusName(e){return e.status.symbol===" "?"Todo":"Done"}supportsGrouping(){return!0}grouper(){return e=>[Kr.oldStatusName(e)]}};var Wt=class extends Ve{constructor(t=null){super();t!==null?this.filterInstructions=t:(this.filterInstructions=new Vr,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 s=this.date(n);return s!==null&&!s.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){let n=this.filterInstructions.createFilterOrErrorMessage(t);if(n.filter!==void 0)return n;let s=new Ze(t),a=Ve.getMatch(this.filterRegExp(),t);if(a!==null){let o=a[1],l=a[2],c=a[3],f=ir.parseDateRange(c);if(!f.isValid()){let p=ir.parseDate(o);p.isValid()&&(f=new Bt(p,p))}if(!f.isValid())s.error="do not understand "+this.fieldName()+" date";else{let p=this.buildFilterFunction(l,f),g=Wt.buildExplanation(this.fieldNameForExplanation(),l,this.filterResultIfFieldMissing(),f);s.filter=new er(t,p,g)}}else s.error="do not understand query filter ("+this.fieldName()+" date)";return s}buildFilterFunction(t,n){let s;return t==="before"?s=a=>a?a.isBefore(n.start):this.filterResultIfFieldMissing():t==="after"?s=a=>a?a.isAfter(n.end):this.filterResultIfFieldMissing():s=a=>a?a.isSameOrAfter(n.start)&&a.isSameOrBefore(n.end):this.filterResultIfFieldMissing(),this.getFilter(s)}getFilter(t){return n=>t(this.date(n))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} ((before|after|on|in)? ?(.*))`)}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,n,s,a){let o,l="YYYY-MM-DD (dddd Do MMMM YYYY)",c;switch(n){case"before":o=n,c=a.start.format(l);break;case"after":o=n,c=a.end.format(l);break;default:if(a.start.isSame(a.end))o="on",c=a.start.format(l);else{let p=`${t} date is between:`,g=[new Ke(`${a.start.format(l)} and`),new Ke(`${a.end.format(l)} inclusive`)];return s&&g.push(new Ke(`OR no ${t} date`)),new Ke(p,g)}break}let f=`${t} date is ${o} ${c}`;return s&&(f+=` OR no ${t} date`),new Ke(f)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,n)=>Hr(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")]}}};var bi=class extends Wt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var sp=class extends Ve{createFilterOrErrorMessage(e){let t=new Ze(e),n=Ve.getMatch(this.filterRegExp(),e);if(n!==null){let s=n[5],a=null;switch(s){case"low":a="4";break;case"none":a="3";break;case"medium":a="2";break;case"high":a="1";break}if(a===null)return t.error="do not understand priority",t;let o=e,l;switch(n[3]){case"above":l=c=>c.priority.localeCompare(a)<0;break;case"below":l=c=>c.priority.localeCompare(a)>0;break;case"not":l=c=>c.priority!==a;break;default:l=c=>c.priority===a,o=`${this.fieldName()} is ${s}`}t.filter=new er(e,l,new Ke(o))}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegExp(){return sp.priorityRegexp}supportsSorting(){return!0}comparator(){return(e,t)=>e.priority.localeCompare(t.priority)}supportsGrouping(){return!0}grouper(){return e=>{let t="ERROR";switch(e.priority){case"1":t="High";break;case"2":t="Medium";break;case"3":t="None";break;case"4":t="Low";break}return[`Priority ${e.priority}: ${t}`]}}},As=sp;As.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(low|none|medium|high))$/;var Bu=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var Hu=class{constructor(e){this.lastHeadingAtLevel=new Array;let n=e.keys().next().value.length;for(let s=0;s<n;s++)this.lastHeadingAtLevel.push("")}getHeadingsForTaskGroup(e){let t=new Array;for(let n=0;n<e.length;n++){let s=e[n];if(s!=this.lastHeadingAtLevel[n]){t.push(new Bu(n,s));for(let a=n;a<e.length;a++)this.lastHeadingAtLevel[a]="";this.lastHeadingAtLevel[n]=s}}return t}};var zu=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,s]of this.children)e.push(n),s.generateAllPaths(e).forEach((o,l)=>t.set(l,o)),e.pop();return t}};var Vu=class extends Map{},Ku=class extends zu{},Zu=class{constructor(e,t){this.groups=new Vu;let n=this.buildGroupingTree(e,t);this.groups=n.generateAllPaths(),this.groups=this.getSortedGroups()}buildGroupingTree(e,t){let n=new Ku(t),s=[n];for(let a of e){let o=[];for(let l of s)for(let c of l.values){let f=Zr.getGroupNamesForTask(a,c);for(let p of f){let g=l.children.get(p);g===void 0&&(g=new Ku([]),l.children.set(p,g),o.push(g)),g.values.push(c)}}s=o}return n}getSortedGroups(){return new Vu([...this.groups.entries()].sort())}};var Xu=class{constructor(e,t,n){this.groups=e,this.groupHeadings=t,this.tasks=n}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.name}
`;return e+=this.tasksAsStringOfLines(),e}};var Qu=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length;let n=new Zu(e,t);this.addTasks(n)}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let e="";for(let n of this.groups)e+=n.toString(),e+=`
---
`;return e+=`
${this.totalTasksCount()} tasks
`,e}addTasks(e){let t=new Hu(e.groups);for(let[n,s]of e.groups){let a=t.getHeadingsForTaskGroup(n),o=new Xu(n,a,s);this.add(o)}}add(e){this._groups.push(e)}};var vi=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var wi=class extends vi{constructor(t){super();this.stringToFind=t}matches(t){return wi.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}};var ki=class extends vi{constructor(t){super();this.regex=t}static validateAndConstruct(t){let n=/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/,s=t.match(n);if(s!==null){let a=new RegExp(s[1],s[2]);return new ki(a)}else return null}matches(t){return t.match(this.regex)!==null}};var qt=class extends Ve{createFilterOrErrorMessage(e){let t=Ve.getMatch(this.filterRegExp(),e);if(t===null)return Ze.fromError(e,`do not understand query filter (${this.fieldName()})`);let[n,s,a]=t,o=null;if(s.includes("include"))o=new wi(a);else if(s.includes("regex")&&(o=ki.validateAndConstruct(a),o===null))return Ze.fromError(e,`cannot parse regex (${this.fieldName()}); check your leading and trailing slashes for your query`);if(o===null)return Ze.fromError(e,`do not understand query filter (${this.fieldName()})`);let l=s.match(/not/)!==null,c=new er(e,this.getFilter(o,l),new Ke(e));return Ze.fromFilter(c)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`)}getFilter(e,t){return n=>{let s=e.matches(this.value(n));return t?!s:s}}comparator(){return(e,t)=>this.value(e).localeCompare(this.value(t),void 0,{numeric:!0})}grouper(){return e=>[this.value(e)]}};var Di=class extends qt{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 Xr=class{static fromGroupingProperty(e){return new Xn(e,Xr.grouperForProperty(e))}static by(e,t){return new Qu(e,t)}static getGroupNamesForTask(e,t){return e.grouper(t)}static grouperForProperty(e){return Xr.groupers[e]}static escapeMarkdownCharacters(e){return e.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}static groupByFolder(e){let t=e.path,n=e.filename+".md",s=t.substring(0,t.lastIndexOf(n));return s===""?["/"]:[Xr.escapeMarkdownCharacters(s)]}static groupByRoot(e){let t=e.path.replace(/\\/g,"/"),n=t.indexOf("/");return n==-1?["/"]:[Xr.escapeMarkdownCharacters(t.substring(0,n+1))]}static groupByBacklink(e){if(e.getLinkText({isFilenameUnique:!0})===null)return["Unknown Location"];let n="Unknown Location";if(e.filename!==null&&(n=Xr.escapeMarkdownCharacters(e.filename)),e.precedingHeader===null||e.precedingHeader.length===0)return[n];let s=new Di().createGrouper().grouper,a=s(e)[0];return n===a?[n]:[`${n} > ${a}`]}},Zr=Xr;Zr.groupers={backlink:Xr.groupByBacklink,folder:Xr.groupByFolder,root:Xr.groupByRoot};var Ei=class extends qt{fieldName(){return"path"}value(e){return e.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return e=>[Zr.escapeMarkdownCharacters(e.path.replace(".md",""))]}};var Si=class extends Ve{canCreateFilterForLine(e){return!1}createFilterOrErrorMessage(e){return Ze.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}};var Oi=class{static by(e,t){let n=[new Si().comparator(),new Kr().comparator(),new bi().comparator(),new As().comparator(),new Ei().comparator()],s=[];for(let a of e)s.push(a.comparator);return t.sort(Oi.makeCompositeComparator([...s,...n]))}static makeCompositeComparator(e){return(t,n)=>{for(let s of e){let a=s(t,n);if(a!==0)return a}return 0}}};var Ns=class extends qt{fieldName(){return"description"}value(e){return Fe.removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=Ns.cleanDescription(e.description),s=Ns.cleanDescription(t.description);return n.localeCompare(s,void 0,{numeric:!0})}}static cleanDescription(e){e=Fe.removeAsSubstringFrom(e);let t=/^\[\[?([^\]]*)]]?/,n=e.match(t);if(n!==null){let s=n[1];e=s.substring(s.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 Ju=class extends Wt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var el=class extends Wt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var tl=class extends Qn{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 rl=class extends Wt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var nl=class extends Wt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Mi=class extends Wt{constructor(){let e=new Vr;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 Array.of(e.startDate,e.scheduledDate,e.dueDate)}earliestDate(e){return new Mi().dates(e).sort(Hr)[0]}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var sl=class extends Qn{constructor(){super(),this._filters.add("is recurring",e=>e.recurrence!==null),this._filters.add("is not recurring",e=>e.recurrence===null)}fieldName(){return"recurring"}supportsGrouping(){return!0}grouper(){return e=>e.recurrence!==null?["Recurring"]:["Not Recurring"]}};var Ri=class extends qt{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 s=e.matchesAnyOf(this.values(n));return t?!s:s}}createGrouper(){return new Xn(this.fieldNamePlural(),this.grouper())}};var Cs=class extends Ri{constructor(){super();this.filterInstructions=new Vr,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 s=!!n[1],a=isNaN(+n[2])?1:+n[2],o=Cs.makeCompareByTagComparator(a);return new kn(this.fieldNameSingular(),o,s)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return Cs.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(n,s)=>{if(n.tags.length===0&&s.tags.length===0)return 0;if(n.tags.length===0)return 1;if(s.tags.length===0)return-1;let a=t-1;if(n.tags.length<t&&s.tags.length>=t)return 1;if(s.tags.length<t&&n.tags.length>=t)return-1;if(n.tags.length<t&&s.tags.length<t)return 0;let o=n.tags[a],l=s.tags[a];return o.localeCompare(l,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return t=>t.tags.length==0?["(No tags)"]:t.tags}};var Pv=Fn(xv());var ul=class extends Ve{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){let n=new Ze(t);if(t.length===0)return n.error="empty line",n;let s=this.preprocessExpression(t);try{let a=(0,Pv.parse)(s);for(let c of a)if(c.name==="IDENTIFIER"&&c.value){let f=c.value.trim();if(!(f in this.subFields)){let p=ll(f);if(p===null)return n.error=`couldn't parse sub-expression '${f}'`,n;if(p.error)return n.error=`couldn't parse sub-expression '${f}': ${p.error}`,n;p.filter&&(this.subFields[f]=p.filter)}}else if(c.name==="OPERATOR"){if(c.value==null)return n.error="empty operator in boolean query",n;if(!this.supportedOperators.includes(c.value))return n.error=`unknown boolean operator '${c.value}'`,n}let o=c=>this.filterTaskWithParsedQuery(c,a),l=this.constructExplanation(a);return n.filter=new er(t,o,l),n}catch(a){let o=a instanceof Error?a.message:"unknown error type";return n.error=`malformed boolean query -- ${o} (check the documentation for guidelines)`,n}return n}preprocessExpression(t){return t.replace(/\(([^()]+)\)/g,'("$1")')}filterTaskWithParsedQuery(t,n){let s=l=>l==="true",a=l=>l?"true":"false",o=[];for(let l of n)if(l.name==="IDENTIFIER"){if(l.value==null)throw Error("null token value");let f=this.subFields[l.value.trim()].filterFunction(t);o.push(a(f))}else if(l.name==="OPERATOR")if(l.value==="NOT"){let c=s(o.pop());o.push(a(!c))}else if(l.value==="OR"){let c=s(o.pop()),f=s(o.pop());o.push(a(c||f))}else if(l.value==="AND"){let c=s(o.pop()),f=s(o.pop());o.push(a(c&&f))}else if(l.value==="XOR"){let c=s(o.pop()),f=s(o.pop());o.push(a(c&&!f||!c&&f))}else throw Error("Unsupported operator: "+l.value);else throw Error("Unsupported token type: "+l);return s(o[0])}constructExplanation(t){let n=[];for(let s of t)if(s.name==="IDENTIFIER"){if(s.value==null)throw Error("null token value");let a=this.subFields[s.value.trim()];n.push(a.explanation)}else if(s.name==="OPERATOR")if(s.value==="NOT"){let a=n.pop();n.push(Ke.booleanNot([a]))}else if(s.value==="OR"){let a=n.pop(),o=n.pop();n.push(Ke.booleanOr([o,a]))}else if(s.value==="AND"){let a=n.pop(),o=n.pop();n.push(Ke.booleanAnd([o,a]))}else if(s.value==="XOR"){let a=n.pop(),o=n.pop();n.push(Ke.booleanXor([o,a]))}else throw Error("Unsupported operator: "+s.value);else throw Error("Unsupported token type: "+s);return n[0]}};var cl=class extends qt{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 dl=class extends qt{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var es=class extends Ve{canCreateFilterForLine(e){let t=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`);return Ve.lineMatchesFilter(t,e)}createFilterOrErrorMessage(e){let t=Ve.getMatch(this.filterRegExp(),e);if(t===null)return this.helpMessage(e);let[n,s,a]=t,o=Er[a.toUpperCase()];if(!o)return this.helpMessage(e);let l;switch(s){case"is":l=c=>c.status.type===o;break;case"is not":l=c=>c.status.type!==o;break;default:return this.helpMessage(e)}return Ze.fromFilter(new er(e,l,new Ke(e)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`)}helpMessage(e){let t=Object.values(Er).filter(s=>s!=="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 Ze.fromError(e,n)}fieldName(){return"status.type"}value(e){return e.status.type}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=es.groupName(e),s=es.groupName(t);return n.localeCompare(s,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[es.groupName(e)]}static groupName(e){let t;switch(e.status.type){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.status.type}};var fl=class extends qt{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 yp=[()=>new dl,()=>new es,()=>new Kr,()=>new sl,()=>new As,()=>new Mi,()=>new Ju,()=>new nl,()=>new rl,()=>new bi,()=>new el,()=>new Ei,()=>new Ns,()=>new Cs,()=>new Di,()=>new tl,()=>new ul,()=>new cl,()=>new Si,()=>new fl];function ll(r){for(let e of yp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function Av(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of yp){let s=t().parseSortLine(r);if(s)return s}return null}function Nv(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of yp){let n=t(),s=n.fieldNameSingular();if(n.supportsGrouping()&&(r===`group by ${s}`||n instanceof Ri&&r===`group by ${n.fieldNamePlural()}`))return n.createGrouper()}return null}var Ii=class{constructor({source:e}){this._limit=void 0;this._layoutOptions=new Qa;this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this.groupByRegexp=/^group by (backlink|folder|root)/;this.hideOptionsRegexp=/^(hide|show) (task count|backlink|priority|created date|start date|scheduled date|done date|due date|recurrence rule|edit button|urgency)/;this.shortModeRegexp=/^short/;this.explainQueryRegexp=/^explain/;this.limitRegexp=/^limit (to )?(\d+)( tasks?)?/;this.commentRegexp=/^#.*/;this.source=e,e.split(`
`).map(t=>t.trim()).forEach(t=>{switch(!0){case t==="":break;case this.shortModeRegexp.test(t):this._layoutOptions.shortMode=!0;break;case this.explainQueryRegexp.test(t):this._layoutOptions.explainQuery=!0;break;case this.limitRegexp.test(t):this.parseLimit({line:t});break;case this.parseSortBy({line:t}):break;case this.parseGroupBy2({line:t}):break;case this.groupByRegexp.test(t):this.parseGroupBy({line:t});break;case this.hideOptionsRegexp.test(t):this.parseHideOptions({line:t});break;case this.commentRegexp.test(t):break;case this.parseFilter(t):break;default:this._error=`do not understand query: ${t}`}})}explainQuery(){return`Explanation of this Tasks code block query:
`+this.explainQueryWithoutIntroduction()}explainQueryWithoutIntroduction(){let e="";Fe.isEmpty()||(e+=`Only tasks containing the global filter '${Fe.get()}'.
`);let t=this.filters.length;if(t===0)e+="No filters supplied. All tasks will match the query.";else for(let s=0;s<t;s++)s>0&&(e+=`
`),e+=this.filters[s].explainFilterIndented("");this._limit!==void 0&&(e+=`
At most ${this._limit} task`,this._limit!==1&&(e+="s"),e+=`.
`);let{debugSettings:n}=de();return n.ignoreSortInstructions&&(e+=`
NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.`),e}get limit(){return this._limit}get layoutOptions(){return this._layoutOptions}get filters(){return this._filters}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}applyQueryToTasks(e){this.filters.forEach(a=>{e=e.filter(a.filterFunction)});let{debugSettings:t}=de(),s=(t.ignoreSortInstructions?e:Oi.by(this.sorting,e)).slice(0,this.limit);return Zr.by(this.grouping,s)}parseHideOptions({line:e}){let t=e.match(this.hideOptionsRegexp);if(t!==null){let n=t[1]==="hide";switch(t[2]){case"task count":this._layoutOptions.hideTaskCount=n;break;case"backlink":this._layoutOptions.hideBacklinks=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._layoutOptions.hideEditButton=n;break;case"urgency":this._layoutOptions.hideUrgency=n;break;default:this._error="do not understand hide/show option"}}}parseFilter(e){let t=ll(e);return t!=null?(t.filter?this._filters.push(t.filter):this._error=t.error,!0):!1}parseLimit({line:e}){let t=e.match(this.limitRegexp);t!==null?this._limit=Number.parseInt(t[2],10):this._error="do not understand query limit"}parseSortBy({line:e}){let t=Av(e);return t?(this._sorting.push(t),!0):!1}parseGroupBy({line:e}){let t=e.match(this.groupByRegexp);t!==null?this._grouping.push(Zr.fromGroupingProperty(t[1])):this._error="do not understand query grouping"}parseGroupBy2({line:e}){let t=Nv(e);return t?(this._grouping.push(t),!0):!1}};var hl=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 J(this,null,function*(){n.addChild(new gp({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},gp=class extends pl.MarkdownRenderChild{constructor({app:t,events:n,container:s,source:a,filePath:o}){super(s);switch(this.app=t,this.events=n,this.source=a,this.filePath=o,this.containerEl.className){case"block-language-tasks":this.query=new Ii({source:a}),this.queryType="tasks";break;default:this.query=new Ii({source:a}),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,s=t.getTime()-n.getTime();this.queryReloadTimeout=setTimeout(()=>{this.query=new Ii({source:this.source}),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},s+1e3)}render(s){return J(this,arguments,function*({tasks:t,state:n}){var o;let a=this.containerEl.createEl("div");if(n==="Warm"&&this.query.error===void 0){console.debug(`Render ${this.queryType} called for a block in active file "${this.filePath}", to select from ${t.length} tasks: plugin state: ${n}`),this.query.layoutOptions.explainQuery&&this.createExplanation(a);let l=this.query.applyQueryToTasks(t);for(let f of l.groups){this.addGroupHeadings(a,f.groupHeadings);let{taskList:p}=yield this.createTasksList({tasks:f.tasks,content:a});a.appendChild(p)}let c=l.totalTasksCount();console.debug(`${c} of ${t.length} tasks displayed in a block in "${this.filePath}"`),this.addTaskCount(a,c)}else this.query.error!==void 0?a.createDiv().innerHTML=`<pre>Tasks query: ${this.query.error.replace(/\n/g,"<br>")}</pre>`:a.setText("Loading Tasks ...");(o=this.containerEl.firstChild)==null||o.replaceWith(a)})}createExplanation(t){let n=this.query.explainQuery(),s=t.createEl("pre");s.addClasses(["plugin-tasks-query-explanation"]),s.setText(n),t.appendChild(s)}createTasksList(s){return J(this,arguments,function*({tasks:t,content:n}){let a=t.length,o=new zn(this.query.layoutOptions),l=n.createEl("ul");l.addClasses(["contains-task-list","plugin-tasks-query-result"]),l.addClasses(o.specificClasses);let c=this.getGroupingAttribute();c&&c.length>0&&(l.dataset.taskGroupBy=c);for(let f=0;f<a;f++){let p=t[f],g=this.isFilenameUnique({task:p}),T=yield p.toLi({parentUlElement:l,listIndex:f,layoutOptions:this.query.layoutOptions,isFilenameUnique:g,taskLayout:o});T.querySelectorAll("[data-footnote-id]").forEach(C=>C.remove());let v=this.query.layoutOptions.shortMode,R=T.createSpan("task-extras");this.query.layoutOptions.hideUrgency||this.addUrgency(R,p),this.query.layoutOptions.hideBacklinks||this.addBacklinks(R,p,v,g),this.query.layoutOptions.hideEditButton||this.addEditButton(R,p),l.appendChild(T)}return{taskList:l,tasksCount:a}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(a=>{a.preventDefault();let o=c=>{Iu({originalTask:n,newTasks:Qt.removeInferredStatusIfNeeded(n,c)})};new Zn({app:this.app,task:n,onSubmit:o}).open()})}addUrgency(t,n){let s=new Intl.NumberFormat().format(n.urgency);t.createSpan({text:s,cls:"tasks-urgency"})}addGroupHeadings(t,n){for(let s of n)this.addGroupHeading(t,s)}addGroupHeading(t,n){return J(this,null,function*(){let s;n.nestingLevel===0?s=t.createEl("h4",{cls:"tasks-group-heading"}):n.nestingLevel===1?s=t.createEl("h5",{cls:"tasks-group-heading"}):s=t.createEl("h6",{cls:"tasks-group-heading"}),yield pl.MarkdownRenderer.renderMarkdown(n.name,s,this.filePath,this)})}addBacklinks(t,n,s,a){var f;let o=t.createSpan({cls:"tasks-backlink"});s||o.append(" (");let l=o.createEl("a");if(l.href=n.path,l.setAttribute("data-href",n.path),l.rel="noopener",l.target="_blank",l.addClass("internal-link"),s&&l.addClass("internal-link-short-mode"),n.precedingHeader!==null){let p=n.precedingHeader.replace(/#/g,"");l.href=l.href+"#"+p,l.setAttribute("data-href",l.getAttribute("data-href")+"#"+p)}let c;s?c=" \u{1F517}":c=(f=n.getLinkText({isFilenameUnique:a}))!=null?f:"",l.setText(c),s||o.append(")")}addTaskCount(t,n){this.query.layoutOptions.hideTaskCount||t.createDiv({text:`${n} task${n!==1?"s":""}`,cls:"tasks-count"})}isFilenameUnique({task:t}){let n=t.path.match(/([^/]*)\..+$/i);if(n===null)return;let s=n[1];return this.app.vault.getMarkdownFiles().filter(o=>{if(o.basename===s)return!0}).length<2}getGroupingAttribute(){let t=[];for(let n of this.query.grouping)t.push(n.property);return t.join(",")}};var We=require("obsidian");function Cv(){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 Iv(){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 Fv(){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 Lv(){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 Yv(){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 Uv(){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 Wv(){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 qv=[{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 Yr=require("obsidian");var Ys=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,s,a]=e,o=[];if(o.push(...this.validateType(a)),t===s&&a!=="NON_TASK"&&o.push(`Status symbol '${t}' toggles to itself`),o.length>0)return o;let l=he.createFromImportedValue(e).configuration;return o.push(...this.validateSymbolTypeConventions(l)),o.push(...this.validate(l)),o}validateSymbol(e){return Ys.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return Ys.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=Er[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,s=new Be,a=n==="X"?"x":n,o=s.bySymbol(a);return o.type!=="EMPTY"&&(e.nextStatusSymbol!==o.nextStatusSymbol&&t.push(`Next Status Symbol for symbol '${n}': '${e.nextStatusSymbol}' is inconsistent with convention '${o.nextStatusSymbol}'`),e.type!==o.type&&t.push(`Status Type for symbol '${n}': '${e.type}' is inconsistent with convention '${o.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 Us=new Ys,cr=class extends Yr.Modal{constructor(t,n,s){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=s}statusConfiguration(){return new Ot(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return J(this,null,function*(){let{contentEl:t}=this;t.empty();let n=t.createDiv(),s;new Yr.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(f=>{s=f,f.setValue(this.statusSymbol).onChange(p=>{this.statusSymbol=p,cr.setValid(f,Us.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(f=>{cr.setValid(s,Us.validateSymbol(this.statusConfiguration()))});let a;new Yr.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(f=>{a=f,f.setValue(this.statusName).onChange(p=>{this.statusName=p,cr.setValid(f,Us.validateName(this.statusConfiguration()))})}).then(f=>{cr.setValid(a,Us.validateName(this.statusConfiguration()))});let o;new Yr.Setting(n).setName("Task Next Status Symbol").setDesc("When clicked on this is the symbol that should be used next.").addText(f=>{o=f,f.setValue(this.statusNextSymbol).onChange(p=>{this.statusNextSymbol=p,cr.setValid(f,Us.validateNextSymbol(this.statusConfiguration()))})}).then(f=>{cr.setValid(o,Us.validateNextSymbol(this.statusConfiguration()))}),new Yr.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(f=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(g=>{f.addOption(g,g)}),f.setValue(this.type).onChange(g=>{this.type=he.getTypeFromStatusTypeString(g)})}),he.tasksPluginCanCreateCommandsForStatuses()&&new Yr.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(f=>{f.setValue(this.statusAvailableAsCommand).onChange(p=>J(this,null,function*(){this.statusAvailableAsCommand=p}))});let l=t.createDiv(),c=new Yr.Setting(l);c.addButton(f=>(f.setTooltip("Save").setIcon("checkmark").onClick(()=>J(this,null,function*(){let p=Us.validate(this.statusConfiguration());if(p.length>0){let g=p.join(`
`)+`
Fix errors before saving.`;new Yr.Notice(g);return}this.saved=!0,this.close()})),f)),c.addExtraButton(f=>(f.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),f))})}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?cr.removeValidationError(t):cr.setValidationError(t)}};var Ws=class extends We.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 J(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 We.Setting(t).setName("Task Format").setDesc(Ws.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/Formats/About+Formats">documentation</a>.</p>')).addDropdown(s=>{for(let a of Object.keys(bn))s.addOption(a,bn[a].displayName);s.setValue(de().taskFormat).onChange(a=>J(this,null,function*(){Mt({taskFormat:a}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Global filter Settings"}),new We.Setting(t).setName("Global task filter").setDesc(Ws.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(s=>{s.setPlaceholder("e.g. #task or TODO").setValue(Fe.get()).onChange(a=>J(this,null,function*(){Fe.set(a),yield this.plugin.saveSettings()}))}),new We.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(s=>{let a=de();s.setValue(a.removeGlobalFilter).onChange(o=>J(this,null,function*(){Mt({removeGlobalFilter:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=de();qv.forEach(s=>{this.addOneSettingsBlock(t,s,n)}),t.createEl("h4",{text:"Date Settings"}),new We.Setting(t).setName("Set created date on every added task").setDesc("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.").addToggle(s=>{let a=de();s.setValue(a.setCreatedDate).onChange(o=>J(this,null,function*(){Mt({setCreatedDate:o}),yield this.plugin.saveSettings()}))}),new We.Setting(t).setName("Set done date on every completed task").setDesc("Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.").addToggle(s=>{let a=de();s.setValue(a.setDoneDate).onChange(o=>J(this,null,function*(){Mt({setDoneDate:o}),yield this.plugin.saveSettings()}))}),new We.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Ws.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(s=>{let a=de();s.setValue(a.useFilenameAsScheduledDate).onChange(o=>J(this,null,function*(){Mt({useFilenameAsScheduledDate:o}),yield this.plugin.saveSettings()}))}),new We.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(s=>J(this,null,function*(){let a=de();yield this.plugin.saveSettings(),s.setValue(Ws.renderFolderArray(a.filenameAsDateFolders)).onChange(o=>J(this,null,function*(){let l=Ws.parseCommaSeparatedFolders(o);Mt({filenameAsDateFolders:l}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Auto-suggest Settings"}),new We.Setting(t).setName("Auto-suggest task content").setDesc("Enabling this will open an intelligent suggest menu while typing inside a recognized task line.").addToggle(s=>{let a=de();s.setValue(a.autoSuggestInEditor).onChange(o=>J(this,null,function*(){Mt({autoSuggestInEditor:o}),yield this.plugin.saveSettings()}))}),new We.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(s=>{let a=de();s.setLimits(0,3,1).setValue(a.autoSuggestMinMatch).setDynamicTooltip().onChange(o=>J(this,null,function*(){Mt({autoSuggestMinMatch:o}),yield this.plugin.saveSettings()}))}),new We.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(s=>{let a=de();s.setLimits(3,12,1).setValue(a.autoSuggestMaxItems).setDynamicTooltip().onChange(o=>J(this,null,function*(){Mt({autoSuggestMaxItems:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new We.Setting(t).setName("Provide access keys in dialogs").setDesc("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.").addToggle(s=>{let a=de();s.setValue(a.provideAccessKeys).onChange(o=>J(this,null,function*(){Mt({provideAccessKeys:o}),yield this.plugin.saveSettings()}))})}addOneSettingsBlock(t,n,s){let a=t.createEl("details",{cls:"tasks-nested-settings",attr:Ae({},n.open||s[n.text]?{open:!0}:{})});a.empty(),a.ontoggle=()=>{s[n.text]=a.open,Mt({headingOpened:s}),this.plugin.saveSettings()};let o=a.createEl("summary");if(new We.Setting(o).setHeading().setName(n.text),o.createDiv("collapser").createDiv("handle"),n.notice!==null){let l=a.createEl("div",{cls:n.notice.class,text:n.notice.text});n.notice.html!==null&&l.insertAdjacentHTML("beforeend",n.notice.html)}n.settings.forEach(l=>{if(!(l.featureFlag!==""&&!Ub(l.featureFlag))&&(l.type==="checkbox"?new We.Setting(a).setName(l.name).setDesc(l.description).addToggle(c=>{let f=de();f.generalSettings[l.settingName]||Ss(l.settingName,l.initialValue),c.setValue(f.generalSettings[l.settingName]).onChange(p=>J(this,null,function*(){Ss(l.settingName,p),yield this.plugin.saveSettings()}))}):l.type==="text"?new We.Setting(a).setName(l.name).setDesc(l.description).addText(c=>{let f=de();f.generalSettings[l.settingName]||Ss(l.settingName,l.initialValue);let p=g=>J(this,null,function*(){Ss(l.settingName,g),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(f.generalSettings[l.settingName].toString()).onChange((0,We.debounce)(p,500,!0))}):l.type==="textarea"?new We.Setting(a).setName(l.name).setDesc(l.description).addTextArea(c=>{let f=de();f.generalSettings[l.settingName]||Ss(l.settingName,l.initialValue);let p=g=>J(this,null,function*(){Ss(l.settingName,g),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(f.generalSettings[l.settingName].toString()).onChange((0,We.debounce)(p,500,!0)),c.inputEl.rows=8,c.inputEl.cols=40}):l.type==="function"&&this.customFunctions[l.settingName](a,this),l.notice!==null)){let c=a.createEl("p",{cls:l.notice.class,text:l.notice.text});l.notice.html!==null&&c.insertAdjacentHTML("beforeend",l.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:s}=de();s.coreStatuses.forEach(a=>{jv(t,a,s.coreStatuses,s,n,n.plugin,!0)})}insertCustomTaskStatusSettings(t,n){let{statusSettings:s}=de();s.customStatuses.forEach(f=>{jv(t,f,s.customStatuses,s,n,n.plugin,!1)}),t.createEl("div"),new We.Setting(t).addButton(f=>{f.setButtonText("Add New Task Status").setCta().onClick(()=>J(this,null,function*(){mt.addStatus(s.customStatuses,new Ot("","","",!1,"TODO")),yield Fi(s,n)}))}).infoEl.remove();let o=[["AnuPpuccin Theme",Cv()],["Aura Theme",Iv()],["Ebullientworks Theme",Fv()],["ITS Theme & SlRvb Checkboxes",Lv()],["Minimal Theme",Uv()],["Things Theme",Wv()],["LYT Mode Theme (Dark mode only)",Yv()]];for(let[f,p]of o)new We.Setting(t).addButton(T=>{let O=`${f}: Add ${p.length} supported Statuses`;T.setButtonText(O).onClick(()=>J(this,null,function*(){yield kF(p,s,n)}))}).infoEl.remove();new We.Setting(t).addButton(f=>{f.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>J(this,null,function*(){let g=this.plugin.getTasks().map(O=>O.status),T=Be.getInstance().findUnknownStatuses(g);T.length!==0&&(T.forEach(O=>{mt.addStatus(s.customStatuses,O)}),yield Fi(s,n))}))}).infoEl.remove(),new We.Setting(t).addButton(f=>{f.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>J(this,null,function*(){mt.resetAllCustomStatuses(s),yield Fi(s,n)}))}).infoEl.remove()}},ho=Ws;ho.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function jv(r,e,t,n,s,a,o){let l=r.createEl("pre");l.addClass("row-for-status"),l.textContent=new he(e).previewText();let c=new We.Setting(r);c.infoEl.replaceWith(l),o||c.addExtraButton(f=>{f.setIcon("cross").setTooltip("Delete").onClick(()=>J(this,null,function*(){mt.deleteStatus(t,e)&&(yield Fi(n,s))}))}),c.addExtraButton(f=>{f.setIcon("pencil").setTooltip("Edit").onClick(()=>J(this,null,function*(){let p=new cr(a,e,o);p.onClose=()=>J(this,null,function*(){p.saved&&mt.replaceStatus(t,e,p.statusConfiguration())&&(yield Fi(n,s))}),p.open()}))}),c.infoEl.remove()}function kF(r,e,t){return J(this,null,function*(){mt.bulkAddStatusCollection(e,r).forEach(s=>{new We.Notice(s)}),yield Fi(e,t)})}function Fi(r,e){return J(this,null,function*(){Mt({statusSettings:r}),mt.applyToStatusRegistry(r,Be.getInstance()),yield e.saveSettings(!0)})}var $v=require("obsidian");var ml=class extends $v.EditorSuggest{constructor(t,n){super(t);this.settings=n}onTrigger(t,n,s){if(!this.settings.autoSuggestInEditor)return null;let a=n.getLine(t.line);return Fe.includedIn(a)&&a.match(ie.taskRegex)?{start:{line:t.line,ch:0},end:{line:t.line,ch:a.length},query:a}:null}getSuggestions(t){var o,l,c;let n=t.query,s=t.editor.getCursor();return((c=(l=(o=eo()).buildSuggestions)==null?void 0:l.call(o,n,s.ch,this.settings))!=null?c:[]).map(f=>tr(Ae({},f),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var c,f,p;let s=t.context.editor;if(t.suggestionType==="empty"){this.close();let g=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(f=(c=s==null?void 0:s.cm)==null?void 0:c.contentDOM)==null||f.dispatchEvent(g);return}let a=t.context.editor.getCursor(),o={line:a.line,ch:(p=t.insertAt)!=null?p:a.ch},l=t.insertSkip?{line:a.line,ch:o.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,o,l),t.context.editor.setCursor({line:a.line,ch:o.ch+t.appendText.length})}};var Gv=(r,e)=>{let t,n=new Promise((o,l)=>{t=o});return e(r,o=>{let l=o.map(c=>c.toFileLineString()).join(`
`);t(l)}).open(),n};var Bv=(r,e)=>{let t=Wu({line:"",path:""});return new Zn({app:r,task:t,onSubmit:e})};var Hv=r=>({createTaskLineModal:()=>Gv(r,Bv)});var yl=class extends zv.Plugin{get apiV1(){return Hv(app)}onload(){return J(this,null,function*(){Cu.registerConsoleLogger(),console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new ho({plugin:this})),Bb({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let t=new ju({obsidianEvents:this.app.workspace});this.cache=new Os({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new $u({plugin:this}),this.queryRenderer=new hl({plugin:this,events:t}),this.registerEditorExtension(_v()),this.registerEditorSuggest(new ml(this.app,de())),new qu({plugin:this})})}loadTaskStatuses(){return J(this,null,function*(){let{statusSettings:t}=de();mt.applyToStatusRegistry(t,Be.getInstance())})}onunload(){var t;console.log('unloading plugin "tasks"'),(t=this.cache)==null||t.unload()}loadSettings(){return J(this,null,function*(){let t=yield this.loadData();Mt(t),yield this.loadTaskStatuses()})}saveSettings(){return J(this,null,function*(){yield this.saveData(de())})}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.
*/
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! moment.js
//! momentjs.com
//! version : 2.29.4