You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

227 lines
432 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
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 bD=Object.create;var $i=Object.defineProperty,vD=Object.defineProperties,wD=Object.getOwnPropertyDescriptor,DD=Object.getOwnPropertyDescriptors,kD=Object.getOwnPropertyNames,Xp=Object.getOwnPropertySymbols,ED=Object.getPrototypeOf,Jp=Object.prototype.hasOwnProperty,SD=Object.prototype.propertyIsEnumerable;var Qp=(r,e,t)=>e in r?$i(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ae=(r,e)=>{for(var t in e||(e={}))Jp.call(e,t)&&Qp(r,t,e[t]);if(Xp)for(var t of Xp(e))SD.call(e,t)&&Qp(r,t,e[t]);return r},er=(r,e)=>vD(r,DD(e));var O=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),OD=(r,e)=>{for(var t in e)$i(r,t,{get:e[t],enumerable:!0})},em=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of kD(e))!Jp.call(r,s)&&s!==t&&$i(r,s,{get:()=>e[s],enumerable:!(n=wD(e,s))||n.enumerable});return r};var In=(r,e,t)=>(t=r!=null?bD(ED(r)):{},em(e||!r||!r.__esModule?$i(t,"default",{value:r,enumerable:!0}):t,r)),MD=r=>em($i({},"__esModule",{value:!0}),r);var J=(r,e,t)=>new Promise((n,s)=>{var a=c=>{try{l(t.next(c))}catch(h){s(h)}},o=c=>{try{l(t.throw(c))}catch(h){s(h)}},l=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,o);l((t=t.apply(r,e)).next())});var Ie=O(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.matchAnyPattern=Fn.extractTerms=Fn.repeatedTimeunitPattern=void 0;function AD(r,e){let t=e.replace(/\((?!\?)/g,"(?:");return`${r}${t}\\s{0,5}(?:,?\\s{0,5}${t}){0,10}`}Fn.repeatedTimeunitPattern=AD;function tm(r){let e;return r instanceof Array?e=[...r]:r instanceof Map?e=Array.from(r.keys()):e=Object.keys(r),e}Fn.extractTerms=tm;function ND(r){return`(?:${tm(r).sort((t,n)=>n.length-t.length).join("|").replace(/\./g,"\\.")})`}Fn.matchAnyPattern=ND});var Re=O((Nl,Cl)=>{(function(r,e){typeof Nl=="object"&&typeof Cl!="undefined"?Cl.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis!="undefined"?globalThis:r||self).dayjs=e()})(Nl,function(){"use strict";var r=1e3,e=6e4,t=36e5,n="millisecond",s="second",a="minute",o="hour",l="day",c="week",h="month",m="quarter",g="year",T="date",S="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,h),oe=P-Y<0,y=q.clone().add(Q+(oe?-1:1),h);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:h,y:g,w:c,d:l,D:T,h:o,m:a,s,ms:n,Q:m}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},W="en",De={};De[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")De[V]&&(Q=V),q&&(De[V]=q,Q=V);else{var Y=V.name;De[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)},te=B;te.l=be,te.i=Te,te.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(te.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 te},q.isValid=function(){return this.$d.toString()!==S},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 te.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=!!te.u(Q)||Q,y=te.p(P),_=function(N,j){var ke=te.w(Y.$u?Date.UTC(Y.$y,j,N):new Date(Y.$y,j,N),Y);return oe?ke:ke.endOf(l)},w=function(N,j){return te.w(Y.toDate()[N].apply(Y.toDate("s"),(oe?[0,0,0,0]:[23,59,59,999]).slice(j)),Y)},D=this.$W,E=this.$M,M=this.$D,k="set"+(this.$u?"UTC":"");switch(y){case g:return oe?_(1,0):_(31,11);case h:return oe?_(1,E):_(0,E+1);case c:var I=this.$locale().weekStart||0,A=(D<I?D+7:D)-I;return _(oe?M-A:M+(6-A),E);case l:case T:return w(k+"Hours",0);case o:return w(k+"Minutes",1);case a:return w(k+"Seconds",2);case s:return w(k+"Milliseconds",3);default:return this.clone()}},q.endOf=function(P){return this.startOf(P,!1)},q.$set=function(P,Q){var Y,oe=te.p(P),y="set"+(this.$u?"UTC":""),_=(Y={},Y[l]=y+"Date",Y[T]=y+"Date",Y[h]=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===h||oe===g){var D=this.clone().set(T,1);D.$d[_](w),D.init(),this.$d=D.set(T,Math.min(this.$D,D.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[te.p(P)]()},q.add=function(P,Q){var Y,oe=this;P=Number(P);var y=te.p(Q),_=function(E){var M=ee(oe);return te.w(M.date(M.date()+Math.round(E*P)),oe)};if(y===h)return this.set(h,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,D=this.$d.getTime()+P*w;return te.w(D,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||S;var oe=P||"YYYY-MM-DDTHH:mm:ssZ",y=te.z(this),_=this.$H,w=this.$m,D=this.$M,E=Y.weekdays,M=Y.months,k=function(j,ke,pe,le){return j&&(j[ke]||j(Q,oe))||pe[ke].substr(0,le)},I=function(j){return te.s(_%12||12,j,"0")},A=Y.meridiem||function(j,ke,pe){var le=j<12?"AM":"PM";return pe?le.toLowerCase():le},N={YY:String(this.$y).slice(-2),YYYY:this.$y,M:D+1,MM:te.s(D+1,2,"0"),MMM:k(Y.monthsShort,D,M,3),MMMM:k(M,D),D:this.$D,DD:te.s(this.$D,2,"0"),d:String(this.$W),dd:k(Y.weekdaysMin,this.$W,E,2),ddd:k(Y.weekdaysShort,this.$W,E,3),dddd:E[this.$W],H:String(_),HH:te.s(_,2,"0"),h:I(1),hh:I(2),a:A(_,w,!0),A:A(_,w,!1),m:String(w),mm:te.s(w,2,"0"),s:String(this.$s),ss:te.s(this.$s,2,"0"),SSS:te.s(this.$ms,3,"0"),Z:y};return oe.replace(R,function(j,ke){return ke||N[j]||y.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(P,Q,Y){var oe,y=te.p(Q),_=ee(P),w=(_.utcOffset()-this.utcOffset())*e,D=this-_,E=te.m(this,_);return E=(oe={},oe[g]=E/12,oe[h]=E,oe[m]=E/3,oe[c]=(D-w)/6048e5,oe[l]=(D-w)/864e5,oe[o]=D/t,oe[a]=D/e,oe[s]=D/r,oe)[y]||D,Y?E:te.a(E)},q.daysInMonth=function(){return this.endOf(h).$D},q.$locale=function(){return De[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 te.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",h],["$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=De[W],ee.Ls=De,ee.p={},ee})});var Rt=O(Ln=>{"use strict";var CD=Ln&&Ln.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.findYearClosestToRef=Ln.findMostLikelyADYear=void 0;var ID=CD(Re());function FD(r){return r<100&&(r>50?r=r+1900:r=r+2e3),r}Ln.findMostLikelyADYear=FD;function LD(r,e,t){let n=ID.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()}Ln.findYearClosestToRef=LD});var xt=O(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 Ro=Ie(),YD=Rt();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=`(?:${Ro.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 nm(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=nm;ye.ORDINAL_NUMBER_PATTERN=`(?:${Ro.matchAnyPattern(ye.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function UD(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=UD;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 WD(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 YD.findMostLikelyADYear(e)}ye.parseYear=WD;var sm=`(${ye.NUMBER_PATTERN})\\s{0,3}(${Ro.matchAnyPattern(ye.TIME_UNIT_DICTIONARY)})`,rm=new RegExp(sm,"i");ye.TIME_UNITS_PATTERN=Ro.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",sm);function qD(r){let e={},t=r,n=rm.exec(t);for(;n;)jD(e,n),t=t.substring(n[0].length).trim(),n=rm.exec(t);return e}ye.parseTimeUnits=qD;function jD(r,e){let t=nm(e[1]),n=ye.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var im=O((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_plugin_quarterOfYear=e()})(Il,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 h=this.$utils(),m=!!h.u(c)||c;if(h.p(l)===e){var g=this.quarter()-1;return m?this.month(3*g).startOf(r).startOf("day"):this.month(3*g+2).endOf(r).endOf("day")}return o.bind(this)(l,c)}}})});var mr=O(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.implySimilarTime=Wr.assignSimilarTime=Wr.assignSimilarDate=Wr.assignTheNextDay=void 0;var am=pt();function $D(r,e){e=e.add(1,"day"),om(r,e),um(r,e)}Wr.assignTheNextDay=$D;function om(r,e){r.assign("day",e.date()),r.assign("month",e.month()+1),r.assign("year",e.year())}Wr.assignSimilarDate=om;function GD(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",am.Meridiem.AM):r.assign("meridiem",am.Meridiem.PM)}Wr.assignSimilarTime=GD;function um(r,e){r.imply("hour",e.hour()),r.imply("minute",e.minute()),r.imply("second",e.second()),r.imply("millisecond",e.millisecond())}Wr.implySimilarTime=um});var lm=O(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.toTimezoneOffset=us.TIMEZONE_ABBR_MAP=void 0;us.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 BD(r){var e;return r==null?null:typeof r=="number"?r:(e=us.TIMEZONE_ABBR_MAP[r])!==null&&e!==void 0?e:null}us.toTimezoneOffset=BD});var tt=O(qr=>{"use strict";var cm=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 HD=cm(im()),xo=cm(Re()),Ll=mr(),zD=lm();xo.default.extend(HD.default);var Yl=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=zD.toTimezoneOffset(e.timezone))}};qr.ReferenceWithTimezone=Yl;var ls=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=xo.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 ls(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 xo.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=xo.default(e.instant);for(let a in t)n=n.add(t[a],a);let s=new ls(e);return t.hour||t.minute||t.second?(Ll.assignSimilarTime(s,n),Ll.assignSimilarDate(s,n),e.timezoneOffset!==null&&s.assign("timezoneOffset",-e.instant.getTimezoneOffset())):(Ll.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=ls;var Gi=class{constructor(e,t,n,s,a){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=s||new ls(e),this.end=a}clone(){let e=new Gi(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=Gi});var Z=O(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.AbstractParserWithWordBoundaryChecking=void 0;var Ul=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)}};Po.AbstractParserWithWordBoundaryChecking=Ul});var dm=O(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var ql=xt(),VD=tt(),KD=Z(),ZD=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ql.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),XD=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${ql.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Wl=class extends KD.AbstractParserWithWordBoundaryChecking{innerPattern(e){return e.option.forwardDate?XD:ZD}innerExtract(e,t){let n=ql.parseTimeUnits(t[1]);return VD.ParsingComponents.createRelativeFromReference(e.reference,n)}};jl.default=Wl});var gm=O(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var QD=Rt(),mm=xt(),ym=xt(),Ao=xt(),JD=Ie(),ek=Z(),tk=new RegExp(`(?:on\\s{0,3})?(${Ao.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Ao.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${JD.matchAnyPattern(mm.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${ym.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),fm=1,hm=2,rk=3,pm=4,$l=class extends ek.AbstractParserWithWordBoundaryChecking{innerPattern(){return tk}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=mm.MONTH_DICTIONARY[t[rk].toLowerCase()],a=Ao.parseOrdinalNumberPattern(t[fm]);if(a>31)return t.index=t.index+t[fm].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[pm]){let o=ym.parseYear(t[pm]);n.start.assign("year",o)}else{let o=QD.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[hm]){let o=Ao.parseOrdinalNumberPattern(t[hm]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Gl.default=$l});var wm=O(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var nk=Rt(),bm=xt(),No=xt(),vm=xt(),sk=Ie(),ik=Z(),ak=new RegExp(`(${sk.matchAnyPattern(bm.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${No.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${No.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${vm.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),ok=1,uk=2,_m=3,Tm=4,Bl=class extends ik.AbstractParserWithWordBoundaryChecking{innerPattern(){return ak}innerExtract(e,t){let n=bm.MONTH_DICTIONARY[t[ok].toLowerCase()],s=No.parseOrdinalNumberPattern(t[uk]);if(s>31)return null;let a=e.createParsingComponents({day:s,month:n});if(t[Tm]){let c=vm.parseYear(t[Tm]);a.assign("year",c)}else{let c=nk.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[_m])return a;let o=No.parseOrdinalNumberPattern(t[_m]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};Hl.default=Bl});var Em=O(Kl=>{"use strict";Object.defineProperty(Kl,"__esModule",{value:!0});var zl=xt(),lk=Rt(),ck=Ie(),km=xt(),dk=Z(),fk=new RegExp(`((?:in)\\s*)?(${ck.matchAnyPattern(zl.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${km.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),hk=1,pk=2,Dm=3,Vl=class extends dk.AbstractParserWithWordBoundaryChecking{innerPattern(){return fk}innerExtract(e,t){let n=t[pk].toLowerCase();if(t[0].length<=3&&!zl.FULL_MONTH_NAME_DICTIONARY[n])return null;let s=e.createParsingResult(t.index+(t[hk]||"").length,t.index+t[0].length);s.start.imply("day",1);let a=zl.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[Dm]){let o=km.parseYear(t[Dm]);s.start.assign("year",o)}else{let o=lk.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};Kl.default=Vl});var Mm=O(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var Om=xt(),mk=Ie(),yk=Z(),gk=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${mk.matchAnyPattern(Om.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),_k=1,Tk=2,Sm=3,bk=4,Zl=class extends yk.AbstractParserWithWordBoundaryChecking{innerPattern(){return gk}innerExtract(e,t){let n=t[Sm]?parseInt(t[Sm]):Om.MONTH_DICTIONARY[t[Tk].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[_k]);return{day:parseInt(t[bk]),month:n,year:s}}};Xl.default=Zl});var Rm=O(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var vk=Z(),wk=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),Dk=1,kk=2,Ql=class extends vk.AbstractParserWithWordBoundaryChecking{innerPattern(){return wk}innerExtract(e,t){let n=parseInt(t[kk]),s=parseInt(t[Dk]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};Jl.default=Ql});var cs=O(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.AbstractTimeExpressionParser=void 0;var Gt=pt();function Ek(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 Sk(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 xm=2,Bs=3,Co=4,Io=5,Bi=6,ec=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),h=this.getFollowingTimePatternThroughCache().exec(l);return a.match(/^\d{3,4}/)&&h&&h[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!h||h[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(o):(o.end=this.extractFollowingTimeComponents(e,h,o),o.end&&(o.text+=h[0]),this.checkAndReturnWithFollowingPattern(o))}extractPrimaryTimeComponents(e,t,n=!1){let s=e.createParsingComponents(),a=0,o=null,l=parseInt(t[xm]);if(l>100){if(this.strictMode||t[Bs]!=null)return null;a=l%100,l=Math.floor(l/100)}if(l>24)return null;if(t[Bs]!=null){if(t[Bs].length==1&&!t[Bi])return null;a=parseInt(t[Bs])}if(a>=60)return null;if(l>12&&(o=Gt.Meridiem.PM),t[Bi]!=null){if(l>12)return null;let c=t[Bi][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[Io]!=null){let c=parseInt(t[Io].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[Co]!=null){let c=parseInt(t[Co]);if(c>=60)return null;s.assign("second",c)}return s}extractFollowingTimeComponents(e,t,n){let s=e.createParsingComponents();if(t[Io]!=null){let c=parseInt(t[Io].substring(0,3));if(c>=1e3)return null;s.assign("millisecond",c)}if(t[Co]!=null){let c=parseInt(t[Co]);if(c>=60)return null;s.assign("second",c)}let a=parseInt(t[xm]),o=0,l=-1;if(t[Bs]!=null?o=parseInt(t[Bs]):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=Gt.Meridiem.PM),t[Bi]!=null){if(a>12)return null;let c=t[Bi][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=Ek(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=Sk(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}};Fo.AbstractTimeExpressionParser=ec});var Pm=O(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var Lo=pt(),Ok=cs(),tc=class extends Ok.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",Lo.Meridiem.PM)):s<6&&n.assign("meridiem",Lo.Meridiem.AM)}if(t[0].endsWith("afternoon")){n.assign("meridiem",Lo.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",Lo.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};rc.default=tc});var yr=O(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.addImpliedTimeUnits=Hs.reverseTimeUnits=void 0;function Mk(r){let e={};for(let t in r)e[t]=-r[t];return e}Hs.reverseTimeUnits=Mk;function Rk(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}Hs.addImpliedTimeUnits=Rk});var Am=O(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var sc=xt(),xk=tt(),Pk=Z(),Ak=yr(),Nk=new RegExp(`(${sc.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),Ck=new RegExp(`(${sc.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),nc=class extends Pk.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Ck:Nk}innerExtract(e,t){let n=sc.parseTimeUnits(t[1]),s=Ak.reverseTimeUnits(n);return xk.ParsingComponents.createRelativeFromReference(e.reference,s)}};ic.default=nc});var Nm=O(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var oc=xt(),Ik=tt(),Fk=Z(),Lk=new RegExp(`(${oc.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),Yk=new RegExp("("+oc.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),Uk=1,ac=class extends Fk.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Yk:Lk}innerExtract(e,t){let n=oc.parseTimeUnits(t[Uk]);return Ik.ParsingComponents.createRelativeFromReference(e.reference,n)}};uc.default=ac});var Vs=O(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});zs.MergingRefiner=zs.Filter=void 0;var lc=class{refine(e,t){return t.filter(n=>this.isValid(e,n))}};zs.Filter=lc;var cc=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,h=a,m=this.mergeResults(l,c,h,e);e.debug(()=>{console.log(`${this.constructor.name} merged ${c} and ${h} into ${m}`)}),s=m}}return s!=null&&n.push(s),n}};zs.MergingRefiner=cc});var jr=O(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var Wk=Vs(),dc=class extends Wk.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}};fc.default=dc});var Cm=O(Hi=>{"use strict";var qk=Hi&&Hi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hi,"__esModule",{value:!0});var jk=qk(jr()),hc=class extends jk.default{patternBetween(){return/^\s*(to|-)\s*$/i}};Hi.default=hc});var Im=O(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.mergeDateTimeComponent=Ks.mergeDateTimeResult=void 0;var $k=pt();function Gk(r,e){let t=r.clone(),n=r.start,s=e.start;if(t.start=pc(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=pc(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}Ks.mergeDateTimeResult=Gk;function pc(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")==$k.Meridiem.PM&&t.get("hour")<12&&(e.isCertain("hour")?t.assign("hour",t.get("hour")+12):t.imply("hour",t.get("hour")+12)),t}Ks.mergeDateTimeComponent=pc});var ln=O(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var Bk=Vs(),Fm=Im(),mc=class extends Bk.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()?Fm.mergeDateTimeResult(t,n):Fm.mergeDateTimeResult(n,t);return s.index=t.index,s.text=t.text+e+n.text,s}};yc.default=mc});var Lm=O(zi=>{"use strict";var Hk=zi&&zi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zi,"__esModule",{value:!0});var zk=Hk(ln()),gc=class extends zk.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};zi.default=gc});var Ym=O(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});var Vk=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),Kk={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},_c=class{constructor(e){this.timezone=Object.assign(Object.assign({},Kk),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),h=Vk.exec(c);if(!h)return;let m=h[1].toUpperCase(),g=(l=(o=s[m])!==null&&o!==void 0?o:this.timezone[m])!==null&&l!==void 0?l:null;if(g===null)return;e.debug(()=>{console.log(`Extracting timezone: '${m}' into: ${g} for: ${a.start}`)});let T=a.start.get("timezoneOffset");T!==null&&g!=T&&(a.start.isCertain("timezoneOffset")||m!=h[1])||a.start.isOnlyDate()&&m!=h[1]||(a.text+=h[0],a.start.isCertain("timezoneOffset")||a.start.assign("timezoneOffset",g),a.end!=null&&!a.end.isCertain("timezoneOffset")&&a.end.assign("timezoneOffset",g))}),t}};Tc.default=_c});var Yo=O(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var Zk=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),Xk=1,Qk=2,Jk=3,bc=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=Zk.exec(s);if(!a)return;e.debug(()=>{console.log(`Extracting timezone: '${a[0]}' into : ${n}`)});let o=parseInt(a[Qk]),l=parseInt(a[Jk]||"0"),c=o*60+l;c>14*60||(a[Xk]==="-"&&(c=-c),n.end!=null&&n.end.assign("timezoneOffset",c),n.start.assign("timezoneOffset",c),n.text+=a[0])}),t}};vc.default=bc});var Um=O(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var wc=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}};Dc.default=wc});var Wm=O(Vi=>{"use strict";var eE=Vi&&Vi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vi,"__esModule",{value:!0});var tE=eE(Re()),kc=class{refine(e,t){return e.option.forwardDate&&t.forEach(function(n){let s=tE.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}};Vi.default=kc});var qm=O(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var rE=Vs(),Ec=class extends rE.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}};Sc.default=Ec});var Rc=O(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var nE=Z(),sE=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"),iE=1,aE=2,oE=3,jm=4,uE=5,$m=6,Gm=7,Bm=8,Hm=9,Oc=class extends nE.AbstractParserWithWordBoundaryChecking{innerPattern(){return sE}innerExtract(e,t){let n={};if(n.year=parseInt(t[iE]),n.month=parseInt(t[aE]),n.day=parseInt(t[oE]),t[jm]!=null)if(n.hour=parseInt(t[jm]),n.minute=parseInt(t[uE]),t[$m]!=null&&(n.second=parseInt(t[$m])),t[Gm]!=null&&(n.millisecond=parseInt(t[Gm])),t[Bm]==null)n.timezoneOffset=0;else{let s=parseInt(t[Bm]),a=0;t[Hm]!=null&&(a=parseInt(t[Hm]));let o=s*60;o<0?o-=a:o+=a,n.timezoneOffset=o}return n}};Mc.default=Oc});var zm=O(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var lE=Vs(),xc=class extends lE.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}};Pc.default=xc});var cn=O(Zs=>{"use strict";var ds=Zs&&Zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zs,"__esModule",{value:!0});Zs.includeCommonConfiguration=void 0;var cE=ds(Ym()),dE=ds(Yo()),Vm=ds(Um()),fE=ds(Wm()),hE=ds(qm()),pE=ds(Rc()),mE=ds(zm());function yE(r,e=!1){return r.parsers.unshift(new pE.default),r.refiners.unshift(new mE.default),r.refiners.unshift(new cE.default),r.refiners.unshift(new dE.default),r.refiners.unshift(new Vm.default),r.refiners.push(new Vm.default),r.refiners.push(new fE.default),r.refiners.push(new hE.default(e)),r}Zs.includeCommonConfiguration=yE});var fn=O(Ne=>{"use strict";var gE=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(),Xs=gE(Re()),dn=mr(),Ki=pt();function _E(r){let e=Xs.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=_E;function TE(r){let e=Xs.default(r.instant),t=new $r.ParsingComponents(r,{});return dn.assignSimilarDate(t,e),dn.implySimilarTime(t,e),t}Ne.today=TE;function bE(r){return Km(r,1)}Ne.yesterday=bE;function Km(r,e){return Ac(r,-e)}Ne.theDayBefore=Km;function vE(r){return Ac(r,1)}Ne.tomorrow=vE;function Ac(r,e){let t=Xs.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=Ac;function wE(r,e=22){let t=Xs.default(r.instant),n=new $r.ParsingComponents(r,{});return n.imply("hour",e),n.imply("meridiem",Ki.Meridiem.PM),dn.assignSimilarDate(n,t),n}Ne.tonight=wE;function DE(r,e=0){let t=Xs.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=DE;function kE(r,e=20){let t=new $r.ParsingComponents(r,{});return t.imply("meridiem",Ki.Meridiem.PM),t.imply("hour",e),t}Ne.evening=kE;function EE(r,e=20){let t=Xs.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",Ki.Meridiem.PM),n}Ne.yesterdayEvening=EE;function SE(r){let e=new $r.ParsingComponents(r,{});return e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e}Ne.midnight=SE;function OE(r,e=6){let t=new $r.ParsingComponents(r,{});return t.imply("meridiem",Ki.Meridiem.AM),t.imply("hour",e),t}Ne.morning=OE;function ME(r){let e=new $r.ParsingComponents(r,{});return e.imply("meridiem",Ki.Meridiem.AM),e.imply("hour",12),e}Ne.noon=ME});var Zm=O(Rr=>{"use strict";var RE=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]}),xE=Rr&&Rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),PE=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)&&RE(e,r,t);return xE(e,r),e},AE=Rr&&Rr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rr,"__esModule",{value:!0});var NE=AE(Re()),CE=Z(),IE=mr(),Zi=PE(fn()),FE=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Nc=class extends CE.AbstractParserWithWordBoundaryChecking{innerPattern(e){return FE}innerExtract(e,t){let n=NE.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"now":return Zi.now(e.reference);case"today":return Zi.today(e.reference);case"yesterday":return Zi.yesterday(e.reference);case"tomorrow":case"tmr":case"tmrw":return Zi.tomorrow(e.reference);case"tonight":return Zi.tonight(e.reference);default:s.match(/last\s*night/)&&(n.hour()>6&&(n=n.add(-1,"day")),IE.assignSimilarDate(a,n),a.imply("hour",0));break}return a}};Rr.default=Nc});var Xm=O(Xi=>{"use strict";var LE=Xi&&Xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xi,"__esModule",{value:!0});var Uo=pt(),YE=Z(),UE=LE(Re()),WE=mr(),qE=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Cc=class extends YE.AbstractParserWithWordBoundaryChecking{innerPattern(){return qE}innerExtract(e,t){let n=UE.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"afternoon":s.imply("meridiem",Uo.Meridiem.PM),s.imply("hour",15);break;case"evening":case"night":s.imply("meridiem",Uo.Meridiem.PM),s.imply("hour",20);break;case"midnight":WE.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"morning":s.imply("meridiem",Uo.Meridiem.AM),s.imply("hour",6);break;case"noon":s.imply("meridiem",Uo.Meridiem.AM),s.imply("hour",12);break}return s}};Xi.default=Cc});var fs=O(Yn=>{"use strict";var jE=Yn&&Yn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.toDayJSClosestWeekday=Yn.toDayJSWeekday=void 0;var Qm=jE(Re());function $E(r,e,t){if(!t)return Jm(r,e);let n=Qm.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}Yn.toDayJSWeekday=$E;function Jm(r,e){let t=Qm.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}Yn.toDayJSClosestWeekday=Jm});var ty=O(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var ey=xt(),GE=Ie(),BE=Z(),HE=fs(),zE=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${GE.matchAnyPattern(ey.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),VE=1,KE=2,ZE=3,Ic=class extends BE.AbstractParserWithWordBoundaryChecking{innerPattern(){return zE}innerExtract(e,t){let n=t[KE].toLowerCase(),s=ey.WEEKDAY_DICTIONARY[n],a=t[VE],o=t[ZE],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 h=HE.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};Fc.default=Ic});var sy=O(Qi=>{"use strict";var XE=Qi&&Qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qi,"__esModule",{value:!0});var ny=xt(),ry=tt(),QE=XE(Re()),JE=Z(),eS=Ie(),tS=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${eS.matchAnyPattern(ny.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),rS=1,nS=2,Lc=class extends JE.AbstractParserWithWordBoundaryChecking{innerPattern(){return tS}innerExtract(e,t){let n=t[rS].toLowerCase(),s=t[nS].toLowerCase(),a=ny.TIME_UNIT_DICTIONARY[s];if(n=="next"||n.startsWith("after")){let c={};return c[a]=1,ry.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="last"||n=="past"){let c={};return c[a]=-1,ry.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=QE.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}};Qi.default=Lc});var xr=O(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.ParsingContext=ei.Chrono=void 0;var Qs=tt(),sS=Yc(),Js=class{constructor(e){e=e||sS.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new Js({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 Wo(e,t,n),a=[];return this.parsers.forEach(o=>{let l=Js.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 h=t.extract(e,l);if(!h){o=a.substring(l.index+1),l=s.exec(o);continue}let m=null;h instanceof Qs.ParsingResult?m=h:h instanceof Qs.ParsingComponents?(m=e.createParsingResult(l.index,l[0]),m.start=h):m=e.createParsingResult(l.index,l[0],h),e.debug(()=>console.log(`${t.constructor.name} extracted result ${m}`)),n.push(m),o=a.substring(c+m.text.length),l=s.exec(o)}return n}};ei.Chrono=Js;var Wo=class{constructor(e,t,n){this.text=e,this.reference=new Qs.ReferenceWithTimezone(t),this.option=n!=null?n:{},this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof Qs.ParsingComponents?e:new Qs.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 Qs.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))}};ei.ParsingContext=Wo});var hs=O(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var iy=Rt(),iS=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"),qo=1,ay=5,oy=2,uy=3,Uc=4,Wc=class{constructor(e){this.groupNumberMonth=e?uy:oy,this.groupNumberDay=e?oy:uy}pattern(){return iS}extract(e,t){if(t[qo]=="/"||t[ay]=="/"){t.index+=t[0].length;return}let n=t.index+t[qo].length,s=t[0].substr(t[qo].length,t[0].length-t[qo].length-t[ay].length);if(s.match(/^\d\.\d$/)||s.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!t[Uc]&&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[Uc]){let c=parseInt(t[Uc]),h=iy.findMostLikelyADYear(c);a.start.assign("year",h)}else{let c=iy.findYearClosestToRef(e.refDate,l,o);a.start.imply("year",c)}return a}};qc.default=Wc});var cy=O($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});var ly=xt(),aS=tt(),oS=Z(),uS=yr(),lS=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${ly.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),jc=class extends oS.AbstractParserWithWordBoundaryChecking{innerPattern(){return lS}innerExtract(e,t){let n=t[1].toLowerCase(),s=ly.parseTimeUnits(t[2]);switch(n){case"last":case"past":case"-":s=uS.reverseTimeUnits(s);break}return aS.ParsingComponents.createRelativeFromReference(e.reference,s)}};$c.default=jc});var fy=O(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var cS=Vs(),Gc=tt(),dS=xt(),fS=yr();function dy(r){return r.text.match(/\s+(before|from)$/i)!=null}function hS(r){return r.text.match(/\s+(after|since)$/i)!=null}var Bc=class extends cS.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!dy(t)&&!hS(t)?!1:!!n.start.get("day")&&!!n.start.get("month")&&!!n.start.get("year")}mergeResults(e,t,n){let s=dS.parseTimeUnits(t.text);dy(t)&&(s=fS.reverseTimeUnits(s));let a=Gc.ParsingComponents.createRelativeFromReference(new Gc.ReferenceWithTimezone(n.start.date()),s);return new Gc.ParsingResult(n.reference,t.index,`${t.text}${e}${n.text}`,a)}};Hc.default=Bc});var Yc=O(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 pS=Tt(dm()),mS=Tt(gm()),yS=Tt(wm()),gS=Tt(Em()),_S=Tt(Mm()),TS=Tt(Rm()),bS=Tt(Pm()),vS=Tt(Am()),wS=Tt(Nm()),DS=Tt(Cm()),kS=Tt(Lm()),ES=cn(),SS=Tt(Zm()),OS=Tt(Xm()),MS=Tt(ty()),RS=Tt(sy()),zc=xr(),xS=Tt(hs()),PS=Tt(cy()),AS=Tt(fy());at.casual=new zc.Chrono(hy(!1));at.strict=new zc.Chrono(jo(!0,!1));at.GB=new zc.Chrono(jo(!1,!0));function NS(r,e,t){return at.casual.parse(r,e,t)}at.parse=NS;function CS(r,e,t){return at.casual.parseDate(r,e,t)}at.parseDate=CS;function hy(r=!1){let e=jo(!1,r);return e.parsers.unshift(new SS.default),e.parsers.unshift(new OS.default),e.parsers.unshift(new gS.default),e.parsers.unshift(new RS.default),e.parsers.unshift(new PS.default),e}at.createCasualConfiguration=hy;function jo(r=!0,e=!1){return ES.includeCommonConfiguration({parsers:[new xS.default(e),new pS.default,new mS.default,new yS.default,new MS.default,new _S.default,new TS.default,new bS.default(r),new vS.default(r),new wS.default(r)],refiners:[new AS.default,new kS.default,new DS.default]},r)}at.createConfiguration=jo});var py=O(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var IS=cs(),Vc=class extends IS.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)}};Kc.default=Vc});var Ji=O(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 Zc=Ie(),FS=Rt();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=`(?:${Zc.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 yy(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=yy;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 LS(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 FS.findMostLikelyADYear(e)}Ue.parseYear=LS;var gy=`(${Ue.NUMBER_PATTERN})\\s{0,5}(${Zc.matchAnyPattern(Ue.TIME_UNIT_DICTIONARY)})\\s{0,5}`,my=new RegExp(gy,"i");Ue.TIME_UNITS_PATTERN=Zc.repeatedTimeunitPattern("",gy);function YS(r){let e={},t=r,n=my.exec(t);for(;n;)US(e,n),t=t.substring(n[0].length),n=my.exec(t);return e}Ue.parseTimeUnits=YS;function US(r,e){let t=yy(e[1]),n=Ue.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Ty=O(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var _y=Ji(),WS=Ie(),qS=Z(),jS=fs(),$S=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${WS.matchAnyPattern(_y.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),GS=1,BS=3,HS=2,Xc=class extends qS.AbstractParserWithWordBoundaryChecking{innerPattern(){return $S}innerExtract(e,t){let n=t[HS].toLowerCase(),s=_y.WEEKDAY_DICTIONARY[n],a=t[GS],o=t[BS],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 h=jS.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};Qc.default=Xc});var Dy=O(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var Un=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"),VS=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"),KS=2,by=3,vy=4,wy=5,ti=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=ti.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=VS.exec(s);return a&&(n.end=ti.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[KS]),t[by]!=null&&(s=parseInt(t[by])),s>=60||n>24)return null;if(n>=12&&(a=Un.Meridiem.PM),t[wy]!=null){if(n>12)return null;let o=t[wy].toLowerCase();o.match(/morgen|vormittag/)&&(a=Un.Meridiem.AM,n==12&&(n=0)),o.match(/nachmittag|abend/)&&(a=Un.Meridiem.PM,n!=12&&(n+=12)),o.match(/nacht/)&&(n==12?(a=Un.Meridiem.AM,n=0):n<6?a=Un.Meridiem.AM:(a=Un.Meridiem.PM,n+=12))}if(e.assign("hour",n),e.assign("minute",s),a!==null?e.assign("meridiem",a):n<12?e.imply("meridiem",Un.Meridiem.AM):e.imply("meridiem",Un.Meridiem.PM),t[vy]!=null){let o=parseInt(t[vy]);if(o>=60)return null;e.assign("second",o)}return e}};Jc.default=ti});var ky=O(ea=>{"use strict";var ZS=ea&&ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ea,"__esModule",{value:!0});var XS=ZS(jr()),ed=class extends XS.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};ea.default=ed});var Ey=O(ta=>{"use strict";var QS=ta&&ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ta,"__esModule",{value:!0});var JS=QS(ln()),td=class extends JS.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};ta.default=td});var rd=O(na=>{"use strict";var eO=na&&na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(na,"__esModule",{value:!0});var tO=eO(Re()),ps=pt(),rO=Z(),nO=mr(),sO=yr(),ra=class extends rO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(e,t){let n=tO.default(e.refDate),s=t[2].toLowerCase(),a=e.createParsingComponents();return nO.implySimilarTime(a,n),ra.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",ps.Meridiem.AM);break;case"vormittag":e.imply("hour",9),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.AM);break;case"mittag":case"mittags":e.imply("hour",12),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.AM);break;case"nachmittag":e.imply("hour",15),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.PM);break;case"abend":e.imply("hour",18),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.PM);break;case"nacht":e.imply("hour",22),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.PM);break;case"mitternacht":e.get("hour")>1&&(e=sO.addImpliedTimeUnits(e,{day:1})),e.imply("hour",0),e.imply("minute",0),e.imply("second",0),e.imply("meridiem",ps.Meridiem.AM);break}return e}};na.default=ra});var My=O(Pr=>{"use strict";var iO=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]}),aO=Pr&&Pr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),oO=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)&&iO(e,r,t);return aO(e,r),e},Oy=Pr&&Pr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pr,"__esModule",{value:!0});var uO=Oy(Re()),lO=Z(),ms=mr(),cO=Oy(rd()),Sy=oO(fn()),dO=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),fO=1,hO=2,nd=class extends lO.AbstractParserWithWordBoundaryChecking{innerPattern(e){return dO}innerExtract(e,t){let n=uO.default(e.refDate),s=(t[fO]||"").toLowerCase(),a=(t[hO]||"").toLowerCase(),o=e.createParsingComponents();switch(s){case"jetzt":o=Sy.now(e.reference);break;case"heute":o=Sy.today(e.reference);break;case"morgen":ms.assignTheNextDay(o,n);break;case"\xFCbermorgen":case"uebermorgen":n=n.add(1,"day"),ms.assignTheNextDay(o,n);break;case"gestern":n=n.add(-1,"day"),ms.assignSimilarDate(o,n),ms.implySimilarTime(o,n);break;case"vorgestern":n=n.add(-2,"day"),ms.assignSimilarDate(o,n),ms.implySimilarTime(o,n);break;default:s.match(/letzte\s*nacht/)&&(n.hour()>6&&(n=n.add(-1,"day")),ms.assignSimilarDate(o,n),o.imply("hour",0));break}return a&&(o=cO.default.extractTimeComponents(o,a)),o}};Pr.default=nd});var Cy=O(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var pO=Rt(),Ay=Ji(),Ny=Ji(),mO=Ie(),yO=Z(),gO=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${mO.matchAnyPattern(Ay.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Ny.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),Ry=1,xy=2,_O=3,Py=4,sd=class extends yO.AbstractParserWithWordBoundaryChecking{innerPattern(){return gO}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Ay.MONTH_DICTIONARY[t[_O].toLowerCase()],a=parseInt(t[Ry]);if(a>31)return t.index=t.index+t[Ry].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[Py]){let o=Ny.parseYear(t[Py]);n.start.assign("year",o)}else{let o=pO.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[xy]){let o=parseInt(t[xy]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};id.default=sd});var Iy=O(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var $o=Ji(),TO=tt(),bO=Z(),vO=yr(),wO=Ie(),ad=class extends bO.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*)?(${$o.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${wO.matchAnyPattern($o.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(e,t){let n=t[2]?$o.parseNumberPattern(t[2]):1,s=$o.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=vO.reverseTimeUnits(a)),TO.ParsingComponents.createRelativeFromReference(e.reference,a)}};od.default=ad});var Yy=O(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 DO=cn(),Fy=xr(),kO=Ar(hs()),EO=Ar(Rc()),SO=Ar(py()),OO=Ar(Ty()),MO=Ar(Dy()),RO=Ar(ky()),xO=Ar(Ey()),PO=Ar(My()),AO=Ar(rd()),NO=Ar(Cy()),CO=Ar(Iy());bt.casual=new Fy.Chrono(Ly());bt.strict=new Fy.Chrono(ud(!0));function IO(r,e,t){return bt.casual.parse(r,e,t)}bt.parse=IO;function FO(r,e,t){return bt.casual.parseDate(r,e,t)}bt.parseDate=FO;function Ly(r=!0){let e=ud(!1,r);return e.parsers.unshift(new AO.default),e.parsers.unshift(new PO.default),e.parsers.unshift(new CO.default),e}bt.createCasualConfiguration=Ly;function ud(r=!0,e=!0){return DO.includeCommonConfiguration({parsers:[new EO.default,new kO.default(e),new SO.default,new MO.default,new NO.default,new OO.default],refiners:[new RO.default,new xO.default]},r)}bt.createConfiguration=ud});var Wy=O(Nr=>{"use strict";var LO=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]}),YO=Nr&&Nr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),UO=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)&&LO(e,r,t);return YO(e,r),e},WO=Nr&&Nr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Nr,"__esModule",{value:!0});var qO=WO(Re()),jO=pt(),$O=Z(),Uy=mr(),Go=UO(fn()),ld=class extends $O.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(e,t){let n=qO.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();switch(s){case"maintenant":return Go.now(e.reference);case"aujourd'hui":return Go.today(e.reference);case"hier":return Go.yesterday(e.reference);case"demain":return Go.tomorrow(e.reference);default:s.match(/cette\s*nuit/)?(Uy.assignSimilarDate(a,n),a.imply("hour",22),a.imply("meridiem",jO.Meridiem.PM)):s.match(/la\s*veille/)&&(n=n.add(-1,"day"),Uy.assignSimilarDate(a,n),a.imply("hour",0))}return a}};Nr.default=ld});var qy=O(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var sa=pt(),GO=Z(),cd=class extends GO.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",sa.Meridiem.PM);break;case"soir":s.imply("hour",18),s.imply("minute",0),s.imply("meridiem",sa.Meridiem.PM);break;case"matin":s.imply("hour",8),s.imply("minute",0),s.imply("meridiem",sa.Meridiem.AM);break;case"a midi":s.imply("hour",12),s.imply("minute",0),s.imply("meridiem",sa.Meridiem.AM);break;case"\xE0 minuit":s.imply("hour",0),s.imply("meridiem",sa.Meridiem.AM);break}return s}};dd.default=cd});var jy=O(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var BO=cs(),fd=class extends BO.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)}};hd.default=fd});var $y=O(ia=>{"use strict";var HO=ia&&ia.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ia,"__esModule",{value:!0});var zO=HO(ln()),pd=class extends zO.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};ia.default=pd});var Gy=O(aa=>{"use strict";var VO=aa&&aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(aa,"__esModule",{value:!0});var KO=VO(jr()),md=class extends KO.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};aa.default=md});var Wn=O(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 yd=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=`(?:${yd.matchAnyPattern(xe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function Hy(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=Hy;xe.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function ZO(r){let e=r.toLowerCase();return e=e.replace(/(?:er)$/i,""),parseInt(e)}xe.parseOrdinalNumberPattern=ZO;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 XO(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=XO;var zy=`(${xe.NUMBER_PATTERN})\\s{0,5}(${yd.matchAnyPattern(xe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,By=new RegExp(zy,"i");xe.TIME_UNITS_PATTERN=yd.repeatedTimeunitPattern("",zy);function QO(r){let e={},t=r,n=By.exec(t);for(;n;)JO(e,n),t=t.substring(n[0].length),n=By.exec(t);return e}xe.parseTimeUnits=QO;function JO(r,e){let t=Hy(e[1]),n=xe.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var Ky=O(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var Vy=Wn(),eM=Ie(),tM=Z(),rM=fs(),nM=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${eM.matchAnyPattern(Vy.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),sM=1,iM=2,gd=class extends tM.AbstractParserWithWordBoundaryChecking{innerPattern(){return nM}innerExtract(e,t){let n=t[sM].toLowerCase(),s=Vy.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[iM];a=a||"",a=a.toLowerCase();let o=null;a=="dernier"?o="last":a=="prochain"&&(o="next");let l=rM.toDayJSWeekday(e.refDate,s,o);return e.createParsingComponents().assign("weekday",s).imply("day",l.date()).imply("month",l.month()+1).imply("year",l.year())}};_d.default=gd});var Jy=O(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});var oa=pt(),aM=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"),oM=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"),uM=2,Zy=3,Xy=4,Qy=5,ri=class{pattern(e){return aM}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=ri.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=oM.exec(s);return a&&(n.end=ri.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[uM]),t[Zy]!=null&&(s=parseInt(t[Zy])),s>=60||n>24)return null;if(n>=12&&(a=oa.Meridiem.PM),t[Qy]!=null){if(n>12)return null;let o=t[Qy][0].toLowerCase();o=="a"&&(a=oa.Meridiem.AM,n==12&&(n=0)),o=="p"&&(a=oa.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",oa.Meridiem.AM):e.imply("meridiem",oa.Meridiem.PM),t[Xy]!=null){let o=parseInt(t[Xy]);if(o>=60)return null;e.assign("second",o)}return e}};Td.default=ri});var ig=O(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});var lM=Rt(),ng=Wn(),sg=Wn(),Bo=Wn(),cM=Ie(),dM=Z(),fM=new RegExp(`(?:on\\s*?)?(${Bo.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${Bo.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${cM.matchAnyPattern(ng.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${sg.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),eg=1,tg=2,hM=3,rg=4,bd=class extends dM.AbstractParserWithWordBoundaryChecking{innerPattern(){return fM}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=ng.MONTH_DICTIONARY[t[hM].toLowerCase()],a=Bo.parseOrdinalNumberPattern(t[eg]);if(a>31)return t.index=t.index+t[eg].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[rg]){let o=sg.parseYear(t[rg]);n.start.assign("year",o)}else{let o=lM.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[tg]){let o=Bo.parseOrdinalNumberPattern(t[tg]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};vd.default=bd});var og=O(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});var ag=Wn(),pM=tt(),mM=Z(),yM=yr(),wd=class extends mM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${ag.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(e,t){let n=ag.parseTimeUnits(t[1]),s=yM.reverseTimeUnits(n);return pM.ParsingComponents.createRelativeFromReference(e.reference,s)}};Dd.default=wd});var lg=O(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});var ug=Wn(),gM=tt(),_M=Z(),kd=class extends _M.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${ug.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(e,t){let n=ug.parseTimeUnits(t[1]);return gM.ParsingComponents.createRelativeFromReference(e.reference,n)}};Ed.default=kd});var cg=O(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});var Ho=Wn(),TM=tt(),bM=Z(),vM=yr(),wM=Ie(),Sd=class extends bM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${Ho.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${wM.matchAnyPattern(Ho.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]?Ho.parseNumberPattern(t[1]):1,s=Ho.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=vM.reverseTimeUnits(a)),TM.ParsingComponents.createRelativeFromReference(e.reference,a)}};Od.default=Sd});var hg=O(vt=>{"use strict";var gr=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 DM=cn(),dg=xr(),kM=gr(Wy()),EM=gr(qy()),SM=gr(hs()),OM=gr(jy()),MM=gr($y()),RM=gr(Gy()),xM=gr(Ky()),PM=gr(Jy()),AM=gr(ig()),NM=gr(og()),CM=gr(lg()),IM=gr(cg());vt.casual=new dg.Chrono(fg());vt.strict=new dg.Chrono(Md(!0));function FM(r,e,t){return vt.casual.parse(r,e,t)}vt.parse=FM;function LM(r,e,t){return vt.casual.parseDate(r,e,t)}vt.parseDate=LM;function fg(r=!0){let e=Md(!1,r);return e.parsers.unshift(new kM.default),e.parsers.unshift(new EM.default),e.parsers.unshift(new IM.default),e}vt.createCasualConfiguration=fg;function Md(r=!0,e=!0){return DM.includeCommonConfiguration({parsers:[new SM.default(e),new AM.default,new OM.default,new PM.default,new NM.default,new CM.default,new xM.default],refiners:[new MM.default,new RM.default]},r)}vt.createConfiguration=Md});var pg=O(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.toHankaku=void 0;function YM(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,UM)}zo.toHankaku=YM;function UM(r){return String.fromCharCode(r.charCodeAt(0)-65248)}});var yg=O(ua=>{"use strict";var WM=ua&&ua.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ua,"__esModule",{value:!0});var Rd=pg(),qM=Rt(),jM=WM(Re()),$M=/(?:(?:([同今本])|((昭和|平成|令和)?([0-9-]{1,4}|元)))年\s*)?([0-9-]{1,2})月\s*([0-9-]{1,2})日/i,mg=1,GM=2,xd=3,BM=4,HM=5,zM=6,Pd=class{pattern(){return $M}extract(e,t){let n=parseInt(Rd.toHankaku(t[HM])),s=parseInt(Rd.toHankaku(t[zM])),a=e.createParsingComponents({day:s,month:n});if(t[mg]&&t[mg].match("\u540C|\u4ECA|\u672C")){let o=jM.default(e.refDate);a.assign("year",o.year())}if(t[GM]){let o=t[BM],l=o=="\u5143"?1:parseInt(Rd.toHankaku(o));t[xd]=="\u4EE4\u548C"?l+=2018:t[xd]=="\u5E73\u6210"?l+=1988:t[xd]=="\u662D\u548C"&&(l+=1925),a.assign("year",l)}else{let o=qM.findYearClosestToRef(e.refDate,s,n);a.imply("year",o)}return a}};ua.default=Pd});var gg=O(la=>{"use strict";var VM=la&&la.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(la,"__esModule",{value:!0});var KM=VM(jr()),Ad=class extends KM.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};la.default=Ad});var Tg=O(Cr=>{"use strict";var ZM=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]}),XM=Cr&&Cr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),QM=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)&&ZM(e,r,t);return XM(e,r),e},JM=Cr&&Cr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Cr,"__esModule",{value:!0});var eR=JM(Re()),_g=pt(),Nd=QM(fn()),tR=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Cd=class{pattern(){return tR}extract(e,t){let n=t[0],s=eR.default(e.refDate),a=e.createParsingComponents();switch(n){case"\u6628\u65E5":return Nd.yesterday(e.reference);case"\u660E\u65E5":return Nd.tomorrow(e.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return Nd.today(e.reference)}return n=="\u4ECA\u591C"||n=="\u4ECA\u5915"||n=="\u4ECA\u6669"?(a.imply("hour",22),a.assign("meridiem",_g.Meridiem.PM)):n.match("\u4ECA\u671D")&&(a.imply("hour",6),a.assign("meridiem",_g.Meridiem.AM)),a.assign("day",s.date()),a.assign("month",s.month()+1),a.assign("year",s.year()),a}};Cr.default=Cd});var wg=O(wt=>{"use strict";var Id=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 rR=Id(yg()),nR=Id(gg()),sR=Id(Tg()),bg=xr();wt.casual=new bg.Chrono(vg());wt.strict=new bg.Chrono(Fd());function iR(r,e,t){return wt.casual.parse(r,e,t)}wt.parse=iR;function aR(r,e,t){return wt.casual.parseDate(r,e,t)}wt.parseDate=aR;function vg(){let r=Fd();return r.parsers.unshift(new sR.default),r}wt.createCasualConfiguration=vg;function Fd(){return{parsers:[new rR.default],refiners:[new nR.default]}}wt.createConfiguration=Fd});var Vo=O(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 oR(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=oR});var kg=O(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});var Dg=Vo(),uR=Ie(),lR=Z(),cR=fs(),dR=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${uR.matchAnyPattern(Dg.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),fR=1,hR=2,pR=3,Ld=class extends lR.AbstractParserWithWordBoundaryChecking{innerPattern(){return dR}innerExtract(e,t){let n=t[hR].toLowerCase(),s=Dg.WEEKDAY_DICTIONARY[n];if(s===void 0)return null;let a=t[fR],o=t[pR],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 h=cR.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};Yd.default=Ld});var Eg=O(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});var mR=cs(),Ud=class extends mR.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Wd.default=Ud});var Sg=O(ca=>{"use strict";var yR=ca&&ca.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ca,"__esModule",{value:!0});var gR=yR(ln()),qd=class extends gR.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};ca.default=qd});var Og=O(da=>{"use strict";var _R=da&&da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(da,"__esModule",{value:!0});var TR=_R(jr()),jd=class extends TR.default{patternBetween(){return/^\s*(?:-)\s*$/i}};da.default=jd});var Ng=O(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});var bR=Rt(),Pg=Vo(),Ag=Vo(),vR=Ie(),wR=Z(),DR=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*)(${vR.matchAnyPattern(Pg.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Ag.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Mg=1,Rg=2,kR=3,xg=4,$d=class extends wR.AbstractParserWithWordBoundaryChecking{innerPattern(){return DR}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Pg.MONTH_DICTIONARY[t[kR].toLowerCase()],a=parseInt(t[Mg]);if(a>31)return t.index=t.index+t[Mg].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[xg]){let o=Ag.parseYear(t[xg]);n.start.assign("year",o)}else{let o=bR.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[Rg]){let o=parseInt(t[Rg]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};Gd.default=$d});var Cg=O(hn=>{"use strict";var ER=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]}),SR=hn&&hn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),OR=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)&&ER(e,r,t);return SR(e,r),e};Object.defineProperty(hn,"__esModule",{value:!0});var MR=Z(),Ko=OR(fn()),Bd=class extends MR.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 Ko.now(e.reference);case"hoje":return Ko.today(e.reference);case"amanha":case"amanh\xE3":return Ko.tomorrow(e.reference);case"ontem":return Ko.yesterday(e.reference)}return s}};hn.default=Bd});var Ig=O(fa=>{"use strict";var RR=fa&&fa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fa,"__esModule",{value:!0});var Zo=pt(),xR=Z(),PR=mr(),AR=RR(Re()),Hd=class extends xR.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(e,t){let n=AR.default(e.refDate),s=e.createParsingComponents();switch(t[1].toLowerCase()){case"tarde":s.imply("meridiem",Zo.Meridiem.PM),s.imply("hour",15);break;case"noite":s.imply("meridiem",Zo.Meridiem.PM),s.imply("hour",22);break;case"manha":case"manh\xE3":s.imply("meridiem",Zo.Meridiem.AM),s.imply("hour",6);break;case"meia-noite":PR.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"meio-dia":s.imply("meridiem",Zo.Meridiem.AM),s.imply("hour",12);break}return s}};fa.default=Hd});var Yg=O(Dt=>{"use strict";var qn=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 NR=cn(),Fg=xr(),CR=qn(hs()),IR=qn(kg()),FR=qn(Eg()),LR=qn(Sg()),YR=qn(Og()),UR=qn(Ng()),WR=qn(Cg()),qR=qn(Ig());Dt.casual=new Fg.Chrono(Lg());Dt.strict=new Fg.Chrono(zd(!0));function jR(r,e,t){return Dt.casual.parse(r,e,t)}Dt.parse=jR;function $R(r,e,t){return Dt.casual.parseDate(r,e,t)}Dt.parseDate=$R;function Lg(r=!0){let e=zd(!1,r);return e.parsers.push(new WR.default),e.parsers.push(new qR.default),e}Dt.createCasualConfiguration=Lg;function zd(r=!0,e=!0){return NR.includeCommonConfiguration({parsers:[new CR.default(e),new IR.default,new FR.default,new UR.default],refiners:[new LR.default,new YR.default]},r)}Dt.createConfiguration=zd});var Ug=O(ha=>{"use strict";var GR=ha&&ha.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ha,"__esModule",{value:!0});var BR=GR(jr()),Vd=class extends BR.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};ha.default=Vd});var Wg=O(pa=>{"use strict";var HR=pa&&pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pa,"__esModule",{value:!0});var zR=HR(ln()),Kd=class extends zR.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};pa.default=Kd});var qg=O(pn=>{"use strict";var VR=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]}),KR=pn&&pn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ZR=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)&&VR(e,r,t);return KR(e,r),e};Object.defineProperty(pn,"__esModule",{value:!0});var XR=Z(),Xo=ZR(fn()),Zd=class extends XR.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 Xo.now(e.reference);case"vandaag":return Xo.today(e.reference);case"morgen":case"morgend":return Xo.tomorrow(e.reference);case"gisteren":return Xo.yesterday(e.reference)}return s}};pn.default=Zd});var jg=O(ma=>{"use strict";var QR=ma&&ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ma,"__esModule",{value:!0});var Qo=pt(),JR=Z(),ex=QR(Re()),tx=mr(),rx=1,nx=2,Xd=class extends JR.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(e,t){let n=ex.default(e.refDate),s=e.createParsingComponents();switch(t[rx]==="deze"&&(s.assign("day",e.refDate.getDate()),s.assign("month",e.refDate.getMonth()+1),s.assign("year",e.refDate.getFullYear())),t[nx].toLowerCase()){case"namiddag":case"'s namiddags":s.imply("meridiem",Qo.Meridiem.PM),s.imply("hour",15);break;case"avond":case"'s avonds'":s.imply("meridiem",Qo.Meridiem.PM),s.imply("hour",20);break;case"middernacht":tx.assignTheNextDay(s,n),s.imply("hour",0),s.imply("minute",0),s.imply("second",0);break;case"ochtend":case"'s ochtends":s.imply("meridiem",Qo.Meridiem.AM),s.imply("hour",6);break;case"middag":case"'s middags":s.imply("meridiem",Qo.Meridiem.AM),s.imply("hour",12);break}return s}};ma.default=Xd});var tr=O(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 Jo=Ie(),sx=Rt();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=`(?:${Jo.matchAnyPattern(ve.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function Gg(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=Gg;ve.ORDINAL_NUMBER_PATTERN=`(?:${Jo.matchAnyPattern(ve.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function ix(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=ix;ve.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function ax(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 sx.findMostLikelyADYear(e)}ve.parseYear=ax;var Bg=`(${ve.NUMBER_PATTERN})\\s{0,5}(${Jo.matchAnyPattern(ve.TIME_UNIT_DICTIONARY)})\\s{0,5}`,$g=new RegExp(Bg,"i");ve.TIME_UNITS_PATTERN=Jo.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Bg);function ox(r){let e={},t=r,n=$g.exec(t);for(;n;)ux(e,n),t=t.substring(n[0].length),n=$g.exec(t);return e}ve.parseTimeUnits=ox;function ux(r,e){let t=Gg(e[1]),n=ve.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var zg=O(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});var Hg=tr(),lx=tt(),cx=Z(),Qd=class extends cx.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+Hg.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(e,t){let n=Hg.parseTimeUnits(t[1]);return lx.ParsingComponents.createRelativeFromReference(e.reference,n)}};Jd.default=Qd});var Kg=O(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});var Vg=tr(),dx=Ie(),fx=Z(),hx=fs(),px=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${dx.matchAnyPattern(Vg.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),mx=1,yx=2,gx=3,ef=class extends fx.AbstractParserWithWordBoundaryChecking{innerPattern(){return px}innerExtract(e,t){let n=t[yx].toLowerCase(),s=Vg.WEEKDAY_DICTIONARY[n],a=t[mx],o=t[gx],l=a||o;l=l||"",l=l.toLowerCase();let c=null;l=="vorige"?c="last":l=="volgende"?c="next":l=="deze"&&(c="this");let h=hx.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};tf.default=ef});var t_=O(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var _x=Rt(),Jg=tr(),eu=tr(),e_=tr(),Tx=Ie(),bx=Z(),vx=new RegExp(`(?:on\\s*?)?(${eu.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${eu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+Tx.matchAnyPattern(Jg.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${e_.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),wx=3,Zg=1,Xg=2,Qg=4,rf=class extends bx.AbstractParserWithWordBoundaryChecking{innerPattern(){return vx}innerExtract(e,t){let n=Jg.MONTH_DICTIONARY[t[wx].toLowerCase()],s=eu.parseOrdinalNumberPattern(t[Zg]);if(s>31)return t.index=t.index+t[Zg].length,null;let a=e.createParsingComponents({day:s,month:n});if(t[Qg]){let c=e_.parseYear(t[Qg]);a.assign("year",c)}else{let c=_x.findYearClosestToRef(e.refDate,s,n);a.imply("year",c)}if(!t[Xg])return a;let o=eu.parseOrdinalNumberPattern(t[Xg]),l=e.createParsingResult(t.index,t[0]);return l.start=a,l.end=a.clone(),l.end.assign("day",o),l}};nf.default=rf});var i_=O(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});var n_=tr(),Dx=Rt(),kx=Ie(),s_=tr(),Ex=Z(),Sx=new RegExp(`(${kx.matchAnyPattern(n_.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${s_.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),Ox=1,r_=2,sf=class extends Ex.AbstractParserWithWordBoundaryChecking{innerPattern(){return Sx}innerExtract(e,t){let n=e.createParsingComponents();n.imply("day",1);let s=t[Ox],a=n_.MONTH_DICTIONARY[s.toLowerCase()];if(n.assign("month",a),t[r_]){let o=s_.parseYear(t[r_]);n.assign("year",o)}else{let o=Dx.findYearClosestToRef(e.refDate,1,a);n.imply("year",o)}return n}};af.default=sf});var a_=O(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var Mx=Z(),Rx=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),xx=1,Px=2,of=class extends Mx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Rx}innerExtract(e,t){let n=parseInt(t[Px]),s=parseInt(t[xx]);return e.createParsingComponents().imply("day",1).assign("month",s).assign("year",n)}};uf.default=of});var o_=O(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var Ax=cs(),lf=class extends Ax.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)}};cf.default=lf});var c_=O(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});var l_=tr(),Nx=Ie(),Cx=Z(),Ix=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${Nx.matchAnyPattern(l_.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),Fx=1,Lx=2,u_=3,Yx=4,df=class extends Cx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Ix}innerExtract(e,t){let n=t[u_]?parseInt(t[u_]):l_.MONTH_DICTIONARY[t[Lx].toLowerCase()];if(n<1||n>12)return null;let s=parseInt(t[Fx]);return{day:parseInt(t[Yx]),month:n,year:s}}};ff.default=df});var d_=O(ya=>{"use strict";var Ux=ya&&ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ya,"__esModule",{value:!0});var Wx=Z(),tu=pt(),hf=mr(),qx=Ux(Re()),jx=1,$x=2,pf=class extends Wx.AbstractParserWithWordBoundaryChecking{innerPattern(e){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(e,t){let n=t[jx].toLowerCase(),s=t[$x].toLowerCase(),a=e.createParsingComponents(),o=qx.default(e.refDate);switch(n){case"gisteren":hf.assignSimilarDate(a,o.add(-1,"day"));break;case"van":hf.assignSimilarDate(a,o);break;case"morgen":hf.assignTheNextDay(a,o);break}switch(s){case"ochtend":a.imply("meridiem",tu.Meridiem.AM),a.imply("hour",6);break;case"middag":a.imply("meridiem",tu.Meridiem.AM),a.imply("hour",12);break;case"namiddag":a.imply("meridiem",tu.Meridiem.PM),a.imply("hour",15);break;case"avond":a.imply("meridiem",tu.Meridiem.PM),a.imply("hour",20);break}return a}};ya.default=pf});var h_=O(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var f_=tr(),Gx=tt(),Bx=Z(),Hx=yr(),zx=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${f_.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),mf=class extends Bx.AbstractParserWithWordBoundaryChecking{innerPattern(){return zx}innerExtract(e,t){let n=t[1].toLowerCase(),s=f_.parseTimeUnits(t[2]);switch(n){case"vorige":case"afgelopen":case"-":s=Hx.reverseTimeUnits(s);break}return Gx.ParsingComponents.createRelativeFromReference(e.reference,s)}};yf.default=mf});var y_=O(ga=>{"use strict";var Vx=ga&&ga.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ga,"__esModule",{value:!0});var m_=tr(),p_=tt(),Kx=Vx(Re()),Zx=Z(),Xx=Ie(),Qx=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${Xx.matchAnyPattern(m_.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),Jx=1,eP=2,gf=class extends Zx.AbstractParserWithWordBoundaryChecking{innerPattern(){return Qx}innerExtract(e,t){let n=t[Jx].toLowerCase(),s=t[eP].toLowerCase(),a=m_.TIME_UNIT_DICTIONARY[s];if(n=="volgend"||n=="volgende"||n=="komende"){let c={};return c[a]=1,p_.ParsingComponents.createRelativeFromReference(e.reference,c)}if(n=="afgelopen"||n=="vorige"){let c={};return c[a]=-1,p_.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=Kx.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}};ga.default=gf});var g_=O(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var Tf=tr(),tP=tt(),rP=Z(),nP=yr(),sP=new RegExp("("+Tf.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),iP=new RegExp("("+Tf.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),_f=class extends rP.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?iP:sP}innerExtract(e,t){let n=Tf.parseTimeUnits(t[1]),s=nP.reverseTimeUnits(n);return tP.ParsingComponents.createRelativeFromReference(e.reference,s)}};bf.default=_f});var __=O(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});var wf=tr(),aP=tt(),oP=Z(),uP=new RegExp("("+wf.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),lP=new RegExp("("+wf.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),cP=1,vf=class extends oP.AbstractParserWithWordBoundaryChecking{constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?lP:uP}innerExtract(e,t){let n=wf.parseTimeUnits(t[cP]);return aP.ParsingComponents.createRelativeFromReference(e.reference,n)}};Df.default=vf});var w_=O(kt=>{"use strict";var Pt=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 dP=cn(),T_=xr(),fP=Pt(Ug()),hP=Pt(Wg()),pP=Pt(qg()),mP=Pt(jg()),yP=Pt(hs()),gP=Pt(zg()),_P=Pt(Kg()),TP=Pt(t_()),b_=Pt(i_()),bP=Pt(a_()),vP=Pt(o_()),wP=Pt(c_()),DP=Pt(d_()),kP=Pt(h_()),EP=Pt(y_()),SP=Pt(g_()),OP=Pt(__());kt.casual=new T_.Chrono(v_());kt.strict=new T_.Chrono(kf(!0));function MP(r,e,t){return kt.casual.parse(r,e,t)}kt.parse=MP;function RP(r,e,t){return kt.casual.parseDate(r,e,t)}kt.parseDate=RP;function v_(r=!0){let e=kf(!1,r);return e.parsers.unshift(new pP.default),e.parsers.unshift(new mP.default),e.parsers.unshift(new DP.default),e.parsers.unshift(new b_.default),e.parsers.unshift(new EP.default),e.parsers.unshift(new kP.default),e}kt.createCasualConfiguration=v_;function kf(r=!0,e=!0){return dP.includeCommonConfiguration({parsers:[new yP.default(e),new gP.default,new TP.default,new b_.default,new _P.default,new wP.default,new bP.default,new vP.default(r),new SP.default(r),new OP.default(r)],refiners:[new hP.default,new fP.default]},r)}kt.createConfiguration=kf});var S_=O(_a=>{"use strict";var xP=_a&&_a.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_a,"__esModule",{value:!0});var PP=xP(Re()),AP=Z(),NP=1,D_=2,CP=3,k_=4,E_=5,IP=6,Ef=class extends AP.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=PP.default(e.refDate),o=a;if(t[NP])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[D_]){let l=t[D_],c=t[CP];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[k_]){let c=t[k_][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[E_]){let l=t[E_];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[IP];if(c){let h=c[0];h=="\u65E9"||h=="\u671D"||h=="\u4E0A"?s.start.imply("hour",6):h=="\u4E0B"||h=="\u664F"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):h=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):h=="\u591C"||h=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):h=="\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}};_a.default=Ef});var ni=O(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.zhStringToYear=zt.zhStringToNumber=zt.WEEKDAY_OFFSET=zt.NUMBER=void 0;zt.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};zt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function FP(r){let e=0;for(let t=0;t<r.length;t++){let n=r[t];n==="\u5341"?e=e===0?zt.NUMBER[n]:e*zt.NUMBER[n]:e+=zt.NUMBER[n]}return e}zt.zhStringToNumber=FP;function LP(r){let e="";for(let t=0;t<r.length;t++){let n=r[t];e=e+zt.NUMBER[n]}return parseInt(e)}zt.zhStringToYear=LP});var M_=O(Ta=>{"use strict";var YP=Ta&&Ta.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ta,"__esModule",{value:!0});var UP=YP(Re()),WP=Z(),ys=ni(),Sf=1,O_=2,Of=3,Mf=class extends WP.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(ys.NUMBER).join("")+"]{4}|["+Object.keys(ys.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(ys.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(ys.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(e,t){let n=UP.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[O_]);if(isNaN(a)&&(a=ys.zhStringToNumber(t[O_])),s.start.assign("month",a),t[Of]){let o=parseInt(t[Of]);isNaN(o)&&(o=ys.zhStringToNumber(t[Of])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[Sf]){let o=parseInt(t[Sf]);isNaN(o)&&(o=ys.zhStringToYear(t[Sf])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};Ta.default=Mf});var x_=O(ba=>{"use strict";var qP=ba&&ba.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ba,"__esModule",{value:!0});var jP=qP(Re()),$P=Z(),R_=ni(),GP=new RegExp("(\\d+|["+Object.keys(R_.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"),Rf=1,BP=2,xf=class extends $P.AbstractParserWithWordBoundaryChecking{innerPattern(){return GP}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[Rf]);if(isNaN(s)&&(s=R_.zhStringToNumber(t[Rf])),isNaN(s)){let c=t[Rf];if(c==="\u5E7E")s=3;else if(c==="\u534A")s=.5;else return null}let a=jP.default(e.refDate),l=t[BP][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)}};ba.default=xf});var A_=O(va=>{"use strict";var HP=va&&va.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(va,"__esModule",{value:!0});var zP=HP(Re()),VP=Z(),P_=ni(),KP=new RegExp("(?<prefix>\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(P_.WEEKDAY_OFFSET).join("|")+")"),Pf=class extends VP.AbstractParserWithWordBoundaryChecking{innerPattern(){return KP}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=P_.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),h=!1,m=c.day();return o=="last"||o=="past"?(c=c.day(a-7),h=!0):o=="next"?(c=c.day(a+7),h=!0):o=="this"?c=c.day(a):Math.abs(a-7-m)<Math.abs(a-m)?c=c.day(a-7):Math.abs(a+7-m)<Math.abs(a-m)?c=c.day(a+7):c=c.day(a),n.start.assign("weekday",a),h?(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}};va.default=Pf});var N_=O(wa=>{"use strict";var ZP=wa&&wa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wa,"__esModule",{value:!0});var XP=ZP(Re()),QP=Z(),Tr=ni(),JP=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(Tr.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),eA=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(Tr.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Tr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),ru=1,nu=2,su=3,iu=4,au=5,ou=6,_r=7,si=8,uu=9,Af=class extends QP.AbstractParserWithWordBoundaryChecking{innerPattern(){return JP}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=XP.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[ru]){var o=t[ru];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[iu]){var l=t[iu];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,h=0,m=-1;if(t[si]){var g=parseInt(t[si]);if(isNaN(g)&&(g=Tr.zhStringToNumber(t[si])),g>=60)return null;s.start.assign("second",g)}if(c=parseInt(t[ou]),isNaN(c)&&(c=Tr.zhStringToNumber(t[ou])),t[_r]?t[_r]=="\u534A"?h=30:t[_r]=="\u6B63"||t[_r]=="\u6574"?h=0:(h=parseInt(t[_r]),isNaN(h)&&(h=Tr.zhStringToNumber(t[_r]))):c>100&&(h=c%100,c=Math.floor(c/100)),h>=60||c>24)return null;if(c>=12&&(m=1),t[uu]){if(c>12)return null;var T=t[uu][0].toLowerCase();T=="a"&&(m=0,c==12&&(c=0)),T=="p"&&(m=1,c!=12&&(c+=12))}else if(t[nu]){var S=t[nu],v=S[0];v=="\u671D"||v=="\u65E9"?(m=0,c==12&&(c=0)):v=="\u665A"&&(m=1,c!=12&&(c+=12))}else if(t[su]){var R=t[su],C=R[0];C=="\u4E0A"||C=="\u671D"||C=="\u65E9"||C=="\u51CC"?(m=0,c==12&&(c=0)):(C=="\u4E0B"||C=="\u664F"||C=="\u665A")&&(m=1,c!=12&&(c+=12))}else if(t[au]){var $=t[au],B=$[0];B=="\u4E0A"||B=="\u671D"||B=="\u65E9"||B=="\u51CC"?(m=0,c==12&&(c=0)):(B=="\u4E0B"||B=="\u664F"||B=="\u665A")&&(m=1,c!=12&&(c+=12))}if(s.start.assign("hour",c),s.start.assign("minute",h),m>=0?s.start.assign("meridiem",m):c<12?s.start.imply("meridiem",0):s.start.imply("meridiem",1),t=eA.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[ru]){var o=t[ru];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[iu]){var l=t[iu];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,h=0,m=-1,t[si]){var g=parseInt(t[si]);if(isNaN(g)&&(g=Tr.zhStringToNumber(t[si])),g>=60)return null;s.end.assign("second",g)}if(c=parseInt(t[ou]),isNaN(c)&&(c=Tr.zhStringToNumber(t[ou])),t[_r]?t[_r]=="\u534A"?h=30:t[_r]=="\u6B63"||t[_r]=="\u6574"?h=0:(h=parseInt(t[_r]),isNaN(h)&&(h=Tr.zhStringToNumber(t[_r]))):c>100&&(h=c%100,c=Math.floor(c/100)),h>=60||c>24)return null;if(c>=12&&(m=1),t[uu]){if(c>12)return null;var T=t[uu][0].toLowerCase();T=="a"&&(m=0,c==12&&(c=0)),T=="p"&&(m=1,c!=12&&(c+=12)),s.start.isCertain("meridiem")||(m==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[nu]){var S=t[nu],v=S[0];v=="\u671D"||v=="\u65E9"?(m=0,c==12&&(c=0)):v=="\u665A"&&(m=1,c!=12&&(c+=12))}else if(t[su]){var R=t[su],C=R[0];C=="\u4E0A"||C=="\u671D"||C=="\u65E9"||C=="\u51CC"?(m=0,c==12&&(c=0)):(C=="\u4E0B"||C=="\u664F"||C=="\u665A")&&(m=1,c!=12&&(c+=12))}else if(t[au]){var $=t[au],B=$[0];B=="\u4E0A"||B=="\u671D"||B=="\u65E9"||B=="\u51CC"?(m=0,c==12&&(c=0)):(B=="\u4E0B"||B=="\u664F"||B=="\u665A")&&(m=1,c!=12&&(c+=12))}return s.text=s.text+t[0],s.end.assign("hour",c),s.end.assign("minute",h),m>=0?s.end.assign("meridiem",m):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}};wa.default=Af});var I_=O(Da=>{"use strict";var tA=Da&&Da.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Da,"__esModule",{value:!0});var rA=tA(Re()),nA=Z(),C_=ni(),sA=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(C_.WEEKDAY_OFFSET).join("|")+")"),Nf=class extends nA.AbstractParserWithWordBoundaryChecking{innerPattern(){return sA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=C_.WEEKDAY_OFFSET[s];if(a===void 0)return null;let o=rA.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}};Da.default=Nf});var F_=O(ka=>{"use strict";var iA=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0});var aA=iA(jr()),Cf=class extends aA.default{patternBetween(){return/^\s*(至|到|\-|\~|||ー)\s*$/i}};ka.default=Cf});var L_=O(Ea=>{"use strict";var oA=Ea&&Ea.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ea,"__esModule",{value:!0});var uA=oA(ln()),If=class extends uA.default{patternBetween(){return/^\s*$/i}};Ea.default=If});var Y_=O(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 Ff=xr(),lA=mn(Yo()),cA=cn(),dA=mn(S_()),fA=mn(M_()),hA=mn(x_()),pA=mn(A_()),mA=mn(N_()),yA=mn(I_()),gA=mn(F_()),_A=mn(L_());ot.hant=new Ff.Chrono(Lf());ot.casual=new Ff.Chrono(Lf());ot.strict=new Ff.Chrono(Yf());function TA(r,e,t){return ot.casual.parse(r,e,t)}ot.parse=TA;function bA(r,e,t){return ot.casual.parseDate(r,e,t)}ot.parseDate=bA;function Lf(){let r=Yf();return r.parsers.unshift(new dA.default),r}ot.createCasualConfiguration=Lf;function Yf(){let r=cA.includeCommonConfiguration({parsers:[new fA.default,new pA.default,new yA.default,new mA.default,new hA.default],refiners:[new gA.default,new _A.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof lA.default)),r}ot.createConfiguration=Yf});var j_=O(Sa=>{"use strict";var vA=Sa&&Sa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sa,"__esModule",{value:!0});var wA=vA(Re()),DA=Z(),kA=1,U_=2,EA=3,W_=4,q_=5,SA=6,Uf=class extends DA.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=wA.default(e.refDate),o=a;if(t[kA])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[U_]){let l=t[U_],c=t[EA];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[W_]){let c=t[W_][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[q_]){let l=t[q_];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[SA];if(c){let h=c[0];h=="\u65E9"||h=="\u4E0A"?s.start.imply("hour",6):h=="\u4E0B"?(s.start.imply("hour",15),s.start.imply("meridiem",1)):h=="\u4E2D"?(s.start.imply("hour",12),s.start.imply("meridiem",1)):h=="\u591C"||h=="\u665A"?(s.start.imply("hour",22),s.start.imply("meridiem",1)):h=="\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}};Sa.default=Uf});var ii=O(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.zhStringToYear=Vt.zhStringToNumber=Vt.WEEKDAY_OFFSET=Vt.NUMBER=void 0;Vt.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};Vt.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function OA(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=OA;function MA(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=MA});var G_=O(Oa=>{"use strict";var RA=Oa&&Oa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oa,"__esModule",{value:!0});var xA=RA(Re()),PA=Z(),gs=ii(),Wf=1,$_=2,qf=3,jf=class extends PA.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,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(gs.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(e,t){let n=xA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=parseInt(t[$_]);if(isNaN(a)&&(a=gs.zhStringToNumber(t[$_])),s.start.assign("month",a),t[qf]){let o=parseInt(t[qf]);isNaN(o)&&(o=gs.zhStringToNumber(t[qf])),s.start.assign("day",o)}else s.start.imply("day",n.date());if(t[Wf]){let o=parseInt(t[Wf]);isNaN(o)&&(o=gs.zhStringToYear(t[Wf])),s.start.assign("year",o)}else s.start.imply("year",n.year());return s}};Oa.default=jf});var H_=O(Ma=>{"use strict";var AA=Ma&&Ma.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ma,"__esModule",{value:!0});var NA=AA(Re()),CA=Z(),B_=ii(),IA=new RegExp("(\\d+|["+Object.keys(B_.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"),$f=1,FA=2,Gf=class extends CA.AbstractParserWithWordBoundaryChecking{innerPattern(){return IA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=parseInt(t[$f]);if(isNaN(s)&&(s=B_.zhStringToNumber(t[$f])),isNaN(s)){let c=t[$f];if(c==="\u51E0")s=3;else if(c==="\u534A")s=.5;else return null}let a=NA.default(e.refDate),l=t[FA][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)}};Ma.default=Gf});var V_=O(Ra=>{"use strict";var LA=Ra&&Ra.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ra,"__esModule",{value:!0});var YA=LA(Re()),UA=Z(),z_=ii(),WA=new RegExp("(?<prefix>\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(z_.WEEKDAY_OFFSET).join("|")+")"),Bf=class extends UA.AbstractParserWithWordBoundaryChecking{innerPattern(){return WA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=z_.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=YA.default(e.refDate),h=!1,m=c.day();return o=="last"||o=="past"?(c=c.day(a-7),h=!0):o=="next"?(c=c.day(a+7),h=!0):o=="this"?c=c.day(a):Math.abs(a-7-m)<Math.abs(a-m)?c=c.day(a-7):Math.abs(a+7-m)<Math.abs(a-m)?c=c.day(a+7):c=c.day(a),n.start.assign("weekday",a),h?(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}};Ra.default=Bf});var K_=O(xa=>{"use strict";var qA=xa&&xa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xa,"__esModule",{value:!0});var jA=qA(Re()),$A=Z(),vr=ii(),GA=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(vr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(vr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(vr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),BA=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(vr.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(vr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(vr.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),lu=1,cu=2,du=3,fu=4,hu=5,pu=6,br=7,ai=8,mu=9,Hf=class extends $A.AbstractParserWithWordBoundaryChecking{innerPattern(){return GA}innerExtract(e,t){if(t.index>0&&e.text[t.index-1].match(/\w/))return null;let n=jA.default(e.refDate),s=e.createParsingResult(t.index,t[0]),a=n.clone();if(t[lu]){let m=t[lu];m=="\u660E"?n.hour()>1&&a.add(1,"day"):m=="\u6628"?a.add(-1,"day"):m=="\u524D"?a.add(-2,"day"):m=="\u5927\u524D"?a.add(-3,"day"):m=="\u540E"?a.add(2,"day"):m=="\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[fu]){let m=t[fu];m=="\u660E"?a.add(1,"day"):m=="\u6628"?a.add(-1,"day"):m=="\u524D"?a.add(-2,"day"):m=="\u5927\u524D"?a.add(-3,"day"):m=="\u540E"?a.add(2,"day"):m=="\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[ai]){let m=parseInt(t[ai]);if(isNaN(m)&&(m=vr.zhStringToNumber(t[ai])),m>=60)return null;s.start.assign("second",m)}if(o=parseInt(t[pu]),isNaN(o)&&(o=vr.zhStringToNumber(t[pu])),t[br]?t[br]=="\u534A"?l=30:t[br]=="\u6B63"||t[br]=="\u6574"?l=0:(l=parseInt(t[br]),isNaN(l)&&(l=vr.zhStringToNumber(t[br]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[mu]){if(o>12)return null;let m=t[mu][0].toLowerCase();m=="a"&&(c=0,o==12&&(o=0)),m=="p"&&(c=1,o!=12&&(o+=12))}else if(t[cu]){let g=t[cu][0];g=="\u65E9"?(c=0,o==12&&(o=0)):g=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[du]){let g=t[du][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[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))}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=BA.exec(e.text.substring(s.index+s.text.length)),!t)return s.text.match(/^\d+$/)?null:s;let h=a.clone();if(s.end=e.createParsingComponents(),t[lu]){let m=t[lu];m=="\u660E"?n.hour()>1&&h.add(1,"day"):m=="\u6628"?h.add(-1,"day"):m=="\u524D"?h.add(-2,"day"):m=="\u5927\u524D"?h.add(-3,"day"):m=="\u540E"?h.add(2,"day"):m=="\u5927\u540E"&&h.add(3,"day"),s.end.assign("day",h.date()),s.end.assign("month",h.month()+1),s.end.assign("year",h.year())}else if(t[fu]){let m=t[fu];m=="\u660E"?h.add(1,"day"):m=="\u6628"?h.add(-1,"day"):m=="\u524D"?h.add(-2,"day"):m=="\u5927\u524D"?h.add(-3,"day"):m=="\u540E"?h.add(2,"day"):m=="\u5927\u540E"&&h.add(3,"day"),s.end.assign("day",h.date()),s.end.assign("month",h.month()+1),s.end.assign("year",h.year())}else s.end.imply("day",h.date()),s.end.imply("month",h.month()+1),s.end.imply("year",h.year());if(o=0,l=0,c=-1,t[ai]){let m=parseInt(t[ai]);if(isNaN(m)&&(m=vr.zhStringToNumber(t[ai])),m>=60)return null;s.end.assign("second",m)}if(o=parseInt(t[pu]),isNaN(o)&&(o=vr.zhStringToNumber(t[pu])),t[br]?t[br]=="\u534A"?l=30:t[br]=="\u6B63"||t[br]=="\u6574"?l=0:(l=parseInt(t[br]),isNaN(l)&&(l=vr.zhStringToNumber(t[br]))):o>100&&(l=o%100,o=Math.floor(o/100)),l>=60||o>24)return null;if(o>=12&&(c=1),t[mu]){if(o>12)return null;let m=t[mu][0].toLowerCase();m=="a"&&(c=0,o==12&&(o=0)),m=="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[cu]){let g=t[cu][0];g=="\u65E9"?(c=0,o==12&&(o=0)):g=="\u665A"&&(c=1,o!=12&&(o+=12))}else if(t[du]){let g=t[du][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[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))}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}};xa.default=Hf});var X_=O(Pa=>{"use strict";var HA=Pa&&Pa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pa,"__esModule",{value:!0});var zA=HA(Re()),VA=Z(),Z_=ii(),KA=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(Z_.WEEKDAY_OFFSET).join("|")+")"),zf=class extends VA.AbstractParserWithWordBoundaryChecking{innerPattern(){return KA}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=t.groups.weekday,a=Z_.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}};Pa.default=zf});var Q_=O(Aa=>{"use strict";var ZA=Aa&&Aa.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Aa,"__esModule",{value:!0});var XA=ZA(jr()),Vf=class extends XA.default{patternBetween(){return/^\s*(至|到|-|~|||ー)\s*$/i}};Aa.default=Vf});var J_=O(Na=>{"use strict";var QA=Na&&Na.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Na,"__esModule",{value:!0});var JA=QA(ln()),Kf=class extends JA.default{patternBetween(){return/^\s*$/i}};Na.default=Kf});var eT=O(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 Zf=xr(),eN=yn(Yo()),tN=cn(),rN=yn(j_()),nN=yn(G_()),sN=yn(H_()),iN=yn(V_()),aN=yn(K_()),oN=yn(X_()),uN=yn(Q_()),lN=yn(J_());ut.hans=new Zf.Chrono(Xf());ut.casual=new Zf.Chrono(Xf());ut.strict=new Zf.Chrono(Qf());function cN(r,e,t){return ut.casual.parse(r,e,t)}ut.parse=cN;function dN(r,e,t){return ut.casual.parseDate(r,e,t)}ut.parseDate=dN;function Xf(){let r=Qf();return r.parsers.unshift(new rN.default),r}ut.createCasualConfiguration=Xf;function Qf(){let r=tN.includeCommonConfiguration({parsers:[new nN.default,new iN.default,new oN.default,new aN.default,new sN.default],refiners:[new uN.default,new lN.default]});return r.refiners=r.refiners.filter(e=>!(e instanceof eN.default)),r}ut.createConfiguration=Qf});var rT=O(rr=>{"use strict";var tT=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]}),fN=rr&&rr.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),hN=rr&&rr.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&tT(e,r,t)},pN=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)&&tT(e,r,t);return fN(e,r),e};Object.defineProperty(rr,"__esModule",{value:!0});rr.hans=void 0;hN(Y_(),rr);rr.hans=pN(eT())});var Kt=O(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.parseTimeUnits=de.TIME_UNITS_PATTERN=de.parseYear=de.YEAR_PATTERN=de.parseOrdinalNumberPattern=de.ORDINAL_NUMBER_PATTERN=de.parseNumberPattern=de.NUMBER_PATTERN=de.TIME_UNIT_DICTIONARY=de.ORDINAL_WORD_DICTIONARY=de.INTEGER_WORD_DICTIONARY=de.MONTH_DICTIONARY=de.FULL_MONTH_NAME_DICTIONARY=de.WEEKDAY_DICTIONARY=de.REGEX_PARTS=void 0;var yu=Ie(),mN=Rt();de.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};de.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};de.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};de.MONTH_DICTIONARY=Object.assign(Object.assign({},de.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});de.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};de.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};de.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"};de.NUMBER_PATTERN=`(?:${yu.matchAnyPattern(de.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 sT(r){let e=r.toLowerCase();return de.INTEGER_WORD_DICTIONARY[e]!==void 0?de.INTEGER_WORD_DICTIONARY[e]:e.match(/несколько/)?3:e.match(/пол/)?.5:e.match(/пар/)?2:e===""?1:parseFloat(e)}de.parseNumberPattern=sT;de.ORDINAL_NUMBER_PATTERN=`(?:${yu.matchAnyPattern(de.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function yN(r){let e=r.toLowerCase();return de.ORDINAL_WORD_DICTIONARY[e]!==void 0?de.ORDINAL_WORD_DICTIONARY[e]:(e=e.replace(/(?:st|nd|rd|th)$/i,""),parseInt(e))}de.parseOrdinalNumberPattern=yN;var Jf="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";de.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${Jf}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${Jf}|[5-9][0-9]${Jf})`;function gN(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 mN.findMostLikelyADYear(e)}de.parseYear=gN;var iT=`(${de.NUMBER_PATTERN})\\s{0,3}(${yu.matchAnyPattern(de.TIME_UNIT_DICTIONARY)})`,nT=new RegExp(iT,"i");de.TIME_UNITS_PATTERN=yu.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",iT);function _N(r){let e={},t=r,n=nT.exec(t);for(;n;)TN(e,n),t=t.substring(n[0].length).trim(),n=nT.exec(t);return e}de.parseTimeUnits=_N;function TN(r,e){let t=sT(e[1]),n=de.TIME_UNIT_DICTIONARY[e[2].toLowerCase()];r[n]=t}});var oT=O(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});var Ca=Kt(),bN=tt(),vN=Z(),aT=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Ca.TIME_UNITS_PATTERN})${Ca.REGEX_PARTS.rightBoundary}`,wN=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${aT}`,Ca.REGEX_PARTS.flags),DN=new RegExp(aT,"i"),eh=class extends vN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ca.REGEX_PARTS.leftBoundary}innerPattern(e){return e.option.forwardDate?DN:wN}innerExtract(e,t){let n=Ca.parseTimeUnits(t[1]);return bN.ParsingComponents.createRelativeFromReference(e.reference,n)}};th.default=eh});var fT=O(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});var kN=Rt(),Ia=Kt(),dT=Kt(),gu=Kt(),EN=Ie(),SN=Z(),ON=new RegExp(`(?:\u0441)?\\s*(${gu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${gu.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${EN.matchAnyPattern(Ia.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${dT.YEAR_PATTERN}(?![^\\s]\\d)))?${Ia.REGEX_PARTS.rightBoundary}`,Ia.REGEX_PARTS.flags),uT=1,lT=2,MN=3,cT=4,rh=class extends SN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ia.REGEX_PARTS.leftBoundary}innerPattern(){return ON}innerExtract(e,t){let n=e.createParsingResult(t.index,t[0]),s=Ia.MONTH_DICTIONARY[t[MN].toLowerCase()],a=gu.parseOrdinalNumberPattern(t[uT]);if(a>31)return t.index=t.index+t[uT].length,null;if(n.start.assign("month",s),n.start.assign("day",a),t[cT]){let o=dT.parseYear(t[cT]);n.start.assign("year",o)}else{let o=kN.findYearClosestToRef(e.refDate,a,s);n.start.imply("year",o)}if(t[lT]){let o=gu.parseOrdinalNumberPattern(t[lT]);n.end=n.start.clone(),n.end.assign("day",o)}return n}};nh.default=rh});var mT=O(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});var Fa=Kt(),RN=Rt(),xN=Ie(),pT=Kt(),PN=Z(),AN=new RegExp(`((?:\u0432)\\s*)?(${xN.matchAnyPattern(Fa.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${pT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Fa.REGEX_PARTS.flags),NN=2,hT=3,sh=class extends PN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Fa.REGEX_PARTS.leftBoundary}innerPattern(){return AN}innerExtract(e,t){let n=t[NN].toLowerCase();if(t[0].length<=3&&!Fa.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=Fa.MONTH_DICTIONARY[n];if(s.start.assign("month",a),t[hT]){let o=pT.parseYear(t[hT]);s.start.assign("year",o)}else{let o=RN.findYearClosestToRef(e.refDate,1,a);s.start.imply("year",o)}return s}};ih.default=sh});var gT=O(oh=>{"use strict";Object.defineProperty(oh,"__esModule",{value:!0});var _u=pt(),CN=cs(),yT=Kt(),ah=class extends CN.AbstractTimeExpressionParser{constructor(e){super(e)}patternFlags(){return yT.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))?(?!\\/)${yT.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",_u.Meridiem.PM)):s<6&&n.assign("meridiem",_u.Meridiem.AM)}if(t[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){n.assign("meridiem",_u.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",_u.Meridiem.AM),n.get("hour")<12&&n.assign("hour",n.get("hour")))}return n}};oh.default=ah});var _T=O(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});var Tu=Kt(),IN=tt(),FN=Z(),LN=yr(),YN=new RegExp(`(${Tu.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Tu.REGEX_PARTS.flags),uh=class extends FN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Tu.REGEX_PARTS.leftBoundary}innerPattern(){return YN}innerExtract(e,t){let n=Tu.parseTimeUnits(t[1]),s=LN.reverseTimeUnits(n);return IN.ParsingComponents.createRelativeFromReference(e.reference,s)}};lh.default=uh});var TT=O(La=>{"use strict";var UN=La&&La.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(La,"__esModule",{value:!0});var WN=UN(jr()),ch=class extends WN.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};La.default=ch});var bT=O(Ya=>{"use strict";var qN=Ya&&Ya.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ya,"__esModule",{value:!0});var jN=qN(ln()),dh=class extends jN.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};Ya.default=dh});var vT=O(gn=>{"use strict";var $N=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]}),GN=gn&&gn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),BN=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)&&$N(e,r,t);return GN(e,r),e};Object.defineProperty(gn,"__esModule",{value:!0});var HN=Z(),Ua=BN(fn()),fh=Kt(),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)${fh.REGEX_PARTS.rightBoundary}`,fh.REGEX_PARTS.flags),hh=class extends HN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return fh.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 Ua.today(e.reference);case"\u0432\u0447\u0435\u0440\u0430":return Ua.yesterday(e.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Ua.tomorrow(e.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Ua.theDayAfter(e.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Ua.theDayBefore(e.reference,2)}return s}};gn.default=hh});var wT=O(Ir=>{"use strict";var VN=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]}),KN=Ir&&Ir.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ZN=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)&&VN(e,r,t);return KN(e,r),e},XN=Ir&&Ir.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ir,"__esModule",{value:!0});var QN=Z(),_s=ZN(fn()),JN=mr(),eC=XN(Re()),ph=Kt(),tC=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)${ph.REGEX_PARTS.rightBoundary}`,ph.REGEX_PARTS.flags),mh=class extends QN.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ph.REGEX_PARTS.leftBoundary}innerPattern(){return tC}innerExtract(e,t){let n=eC.default(e.refDate),s=t[0].toLowerCase(),a=e.createParsingComponents();if(s==="\u0441\u0435\u0439\u0447\u0430\u0441")return _s.now(e.reference);if(s==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||s==="\u0432\u0435\u0447\u0435\u0440\u0430")return _s.evening(e.reference);if(s.endsWith("\u0443\u0442\u0440\u043E\u043C")||s.endsWith("\u0443\u0442\u0440\u0430"))return _s.morning(e.reference);if(s.match(/в\s*полдень/))return _s.noon(e.reference);if(s.match(/прошлой\s*ночью/))return _s.lastNight(e.reference);if(s.match(/прошлым\s*вечером/))return _s.yesterdayEvening(e.reference);if(s.match(/следующей\s*ночью/)){let o=n.hour()<22?1:2;n=n.add(o,"day"),JN.assignSimilarDate(a,n),a.imply("hour",0)}return s.match(/в\s*полночь/)||s.endsWith("\u043D\u043E\u0447\u044C\u044E")?_s.midnight(e.reference):a}};Ir.default=mh});var DT=O(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var Wa=Kt(),rC=Ie(),nC=Z(),sC=fs(),iC=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*)?(${rC.matchAnyPattern(Wa.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)?${Wa.REGEX_PARTS.rightBoundary}`,Wa.REGEX_PARTS.flags),aC=1,oC=2,uC=3,yh=class extends nC.AbstractParserWithWordBoundaryChecking{innerPattern(){return iC}patternLeftBoundary(){return Wa.REGEX_PARTS.leftBoundary}innerExtract(e,t){let n=t[oC].toLowerCase(),s=Wa.WEEKDAY_DICTIONARY[n],a=t[aC],o=t[uC],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 h=sC.toDayJSWeekday(e.refDate,s,c);return e.createParsingComponents().assign("weekday",s).imply("day",h.date()).imply("month",h.month()+1).imply("year",h.year())}};gh.default=yh});var ET=O(ja=>{"use strict";var lC=ja&&ja.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ja,"__esModule",{value:!0});var qa=Kt(),kT=tt(),cC=lC(Re()),dC=Z(),fC=Ie(),hC=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*(${fC.matchAnyPattern(qa.TIME_UNIT_DICTIONARY)})(?=\\s*)${qa.REGEX_PARTS.rightBoundary}`,qa.REGEX_PARTS.flags),pC=1,mC=2,_h=class extends dC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return qa.REGEX_PARTS.leftBoundary}innerPattern(){return hC}innerExtract(e,t){let n=t[pC].toLowerCase(),s=t[mC].toLowerCase(),a=qa.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,kT.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,kT.ParsingComponents.createRelativeFromReference(e.reference,c)}let o=e.createParsingComponents(),l=cC.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}};ja.default=_h});var ST=O(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var $a=Kt(),yC=tt(),gC=Z(),_C=yr(),TC=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*(${$a.TIME_UNITS_PATTERN})${$a.REGEX_PARTS.rightBoundary}`,$a.REGEX_PARTS.flags),Th=class extends gC.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return $a.REGEX_PARTS.leftBoundary}innerPattern(){return TC}innerExtract(e,t){let n=t[1].toLowerCase(),s=$a.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=_C.reverseTimeUnits(s);break}return yC.ParsingComponents.createRelativeFromReference(e.reference,s)}};bh.default=Th});var RT=O(Et=>{"use strict";var nr=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 bC=nr(oT()),vC=nr(fT()),wC=nr(mT()),DC=nr(gT()),kC=nr(_T()),EC=nr(TT()),SC=nr(bT()),OC=cn(),MC=nr(vT()),RC=nr(wT()),xC=nr(DT()),PC=nr(ET()),OT=xr(),AC=nr(hs()),NC=nr(ST());Et.casual=new OT.Chrono(MT());Et.strict=new OT.Chrono(vh(!0));function CC(r,e,t){return Et.casual.parse(r,e,t)}Et.parse=CC;function IC(r,e,t){return Et.casual.parseDate(r,e,t)}Et.parseDate=IC;function MT(){let r=vh(!1);return r.parsers.unshift(new MC.default),r.parsers.unshift(new RC.default),r.parsers.unshift(new wC.default),r.parsers.unshift(new PC.default),r.parsers.unshift(new NC.default),r}Et.createCasualConfiguration=MT;function vh(r=!0){return OC.includeCommonConfiguration({parsers:[new AC.default(!0),new bC.default,new vC.default,new xC.default,new DC.default(r),new kC.default],refiners:[new SC.default,new EC.default]},r)}Et.createConfiguration=vh});var pt=O(ge=>{"use strict";var FC=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]}),LC=ge&&ge.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),jn=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)&&FC(e,r,t);return LC(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 wh=jn(Yc());ge.en=wh;var YC=xr();Object.defineProperty(ge,"Chrono",{enumerable:!0,get:function(){return YC.Chrono}});var UC;(function(r){r[r.AM=0]="AM",r[r.PM=1]="PM"})(UC=ge.Meridiem||(ge.Meridiem={}));var WC=jn(Yy());ge.de=WC;var qC=jn(hg());ge.fr=qC;var jC=jn(wg());ge.ja=jC;var $C=jn(Yg());ge.pt=$C;var GC=jn(w_());ge.nl=GC;var BC=jn(rT());ge.zh=BC;var HC=jn(RT());ge.ru=HC;ge.strict=wh.strict;ge.casual=wh.casual;function zC(r,e,t){return ge.casual.parse(r,e,t)}ge.parse=zC;function VC(r,e,t){return ge.casual.parseDate(r,e,t)}ge.parseDate=VC});var bu=O((Dh,oi)=>{(function(r,e){typeof Dh=="object"&&typeof oi!="undefined"?oi.exports=e():typeof define=="function"&&define.amd?define(e):r.moment=e()})(Dh,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 h(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function m(i,u){var d=[],f,p=i.length;for(f=0;f<p;++f)d.push(u(i[f],f));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,f){return Rp(i,u,d,f,!0).utc()}function S(){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=S()),i._pf}var R;Array.prototype.some?R=Array.prototype.some:R=function(i){var u=Object(this),d=u.length>>>0,f;for(f=0;f<d;f++)if(f in u&&i.call(this,u[f],f,u))return!0;return!1};function C(i){if(i._isValid==null){var u=v(i),d=R.call(u.parsedDateParts,function(p){return p!=null}),f=!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&&(f=f&&u.charsLeftOver===0&&u.unusedTokens.length===0&&u.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(i))i._isValid=f;else return f}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 De(i,u){var d,f,p,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++)f=B[d],p=u[f],l(p)||(i[f]=p);return i}function Te(i){De(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 te(i,u){var d=!0;return g(function(){if(e.deprecationHandler!=null&&e.deprecationHandler(null,i),d){var f=[],p,b,x,re=arguments.length;for(b=0;b<re;b++){if(p="",typeof arguments[b]=="object"){p+=`
[`+b+"] ";for(x in arguments[0])a(arguments[0],x)&&(p+=x+": "+arguments[0][x]+", ");p=p.slice(0,-2)}else p=arguments[b];f.push(p)}ee(i+`
Arguments: `+Array.prototype.slice.call(f).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),f;for(f in u)a(u,f)&&(s(i[f])&&s(u[f])?(d[f]={},g(d[f],i[f]),g(d[f],u[f])):u[f]!=null?d[f]=u[f]:delete d[f]);for(f in i)a(i,f)&&!a(u,f)&&s(i[f])&&(d[f]=g({},d[f]));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 f=this._calendar[i]||this._calendar.sameElse;return V(f)?f.call(u,d):f}function _(i,u,d){var f=""+Math.abs(i),p=u-f.length,b=i>=0;return(b?d?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+f}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,D=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,E={},M={};function k(i,u,d,f){var p=f;typeof f=="string"&&(p=function(){return this[f]()}),i&&(M[i]=p),u&&(M[u[0]]=function(){return _(p.apply(this,arguments),u[1],u[2])}),d&&(M[d]=function(){return this.localeData().ordinal(p.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,f;for(d=0,f=u.length;d<f;d++)M[u[d]]?u[d]=M[u[d]]:u[d]=I(u[d]);return function(p){var b="",x;for(x=0;x<f;x++)b+=V(u[x])?u[x].call(p,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 f(p){return u.longDateFormat(p)||p}for(D.lastIndex=0;d>=0&&D.test(i);)i=i.replace(D,f),D.lastIndex=0,d-=1;return i}var ke={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(f){return f==="MMMM"||f==="MM"||f==="DD"||f==="dddd"?f.slice(1):f}).join(""),this._longDateFormat[i])}var le="Invalid date";function Ce(){return this._invalidDate}var K="%d",We=/\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,f){var p=this._relativeTime[d];return V(p)?p(i,u,d,f):p.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 qe={};function dt(i,u){var d=i.toLowerCase();qe[d]=qe[d+"s"]=qe[u]=i}function gt(i){return typeof i=="string"?qe[i]||qe[i.toLowerCase()]:void 0}function On(i){var u={},d,f;for(f in i)a(i,f)&&(d=gt(f),d&&(u[d]=i[f]));return u}var Ii={};function je(i,u){Ii[i]=u}function Ls(i){var u=[],d;for(d in i)a(i,d)&&u.push({unit:d,priority:Ii[d]});return u.sort(function(f,p){return f.priority-p.priority}),u}function es(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?(ts(this,i,d),e.updateOffset(this,u),this):Mt(this,i)}}function Mt(i,u){return i.isValid()?i._d["get"+(i._isUTC?"UTC":"")+u]():NaN}function ts(i,u,d){i.isValid()&&!isNaN(d)&&(u==="FullYear"&&es(i.year())&&i.month()===1&&i.date()===29?(d=ce(d),i._d["set"+(i._isUTC?"UTC":"")+u](d,i.month(),yo(d,i.month()))):i._d["set"+(i._isUTC?"UTC":"")+u](d))}function fo(i){return i=gt(i),V(this[i])?this[i]():this}function Ur(i,u){if(typeof i=="object"){i=On(i);var d=Ls(i),f,p=d.length;for(f=0;f<p;f++)this[d[f].unit](i[d[f].unit])}else if(i=gt(i),V(this[i]))return this[i](u);return this}var Mn=/\d/,_t=/\d\d/,Fi=/\d{3}/,cr=/\d{4}/,en=/[+-]?\d{6}/,Le=/\d\d?/,Rn=/\d\d\d\d?/,Ys=/\d\d\d\d\d\d?/,rs=/\d{1,3}/,xn=/\d{1,4}/,ns=/[+-]?\d{1,6}/,dr=/\d+/,Pn=/[+-]?\d+/,ho=/Z|[+-]\d\d:?\d\d/gi,tn=/Z|[+-]\d\d(?::?\d\d)?/gi,po=/[+-]?\d+(\.\d{1,3})?/,fr=/[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,hr;hr={};function H(i,u,d){hr[i]=V(u)?u:function(f,p){return f&&d?d:u}}function Us(i,u){return a(hr,i)?hr[i](u._strict,u._locale):new RegExp(mo(i))}function mo(i){return ht(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(u,d,f,p,b){return d||f||p||b}))}function ht(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ss={};function Pe(i,u){var d,f=u,p;for(typeof i=="string"&&(i=[i]),c(u)&&(f=function(b,x){x[u]=ce(b)}),p=i.length,d=0;d<p;d++)ss[i[d]]=f}function pr(i,u){Pe(i,function(d,f,p,b){p._w=p._w||{},u(d,p._w,p,b)})}function Ft(i,u,d){u!=null&&a(ss,i)&&ss[i](u,d._a,d,i)}var et=0,Qe=1,G=2,ne=3,ue=4,jt=5,is=6,Bv=7,Hv=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 yo(i,u){if(isNaN(i)||isNaN(u))return NaN;var d=zv(u,12);return i+=(u-d)/12,d===1?es(i)?29:28:31-d%7%2}k("M",["MM",2],"Mo",function(){return this.month()+1}),k("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),k("MMMM",0,0,function(i){return this.localeData().months(this,i)}),dt("month","M"),je("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,f){var p=d._locale.monthsParse(i,f,d._strict);p!=null?u[Qe]=p:v(d).invalidMonth=i});var Vv="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),pp="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),mp=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Kv=fr,Zv=fr;function Xv(i,u){return i?n(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||mp).test(u)?"format":"standalone"][i.month()]:n(this._months)?this._months:this._months.standalone}function Qv(i,u){return i?n(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[mp.test(u)?"format":"standalone"][i.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Jv(i,u,d){var f,p,b,x=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],f=0;f<12;++f)b=T([2e3,f]),this._shortMonthsParse[f]=this.monthsShort(b,"").toLocaleLowerCase(),this._longMonthsParse[f]=this.months(b,"").toLocaleLowerCase();return d?u==="MMM"?(p=nt.call(this._shortMonthsParse,x),p!==-1?p:null):(p=nt.call(this._longMonthsParse,x),p!==-1?p:null):u==="MMM"?(p=nt.call(this._shortMonthsParse,x),p!==-1?p:(p=nt.call(this._longMonthsParse,x),p!==-1?p:null)):(p=nt.call(this._longMonthsParse,x),p!==-1?p:(p=nt.call(this._shortMonthsParse,x),p!==-1?p:null))}function ew(i,u,d){var f,p,b;if(this._monthsParseExact)return Jv.call(this,i,u,d);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),f=0;f<12;f++){if(p=T([2e3,f]),d&&!this._longMonthsParse[f]&&(this._longMonthsParse[f]=new RegExp("^"+this.months(p,"").replace(".","")+"$","i"),this._shortMonthsParse[f]=new RegExp("^"+this.monthsShort(p,"").replace(".","")+"$","i")),!d&&!this._monthsParse[f]&&(b="^"+this.months(p,"")+"|^"+this.monthsShort(p,""),this._monthsParse[f]=new RegExp(b.replace(".",""),"i")),d&&u==="MMMM"&&this._longMonthsParse[f].test(i))return f;if(d&&u==="MMM"&&this._shortMonthsParse[f].test(i))return f;if(!d&&this._monthsParse[f].test(i))return f}}function yp(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(),yo(i.year(),u)),i._d["set"+(i._isUTC?"UTC":"")+"Month"](u,d),i}function gp(i){return i!=null?(yp(this,i),e.updateOffset(this,!0),this):Mt(this,"Month")}function tw(){return yo(this.year(),this.month())}function rw(i){return this._monthsParseExact?(a(this,"_monthsRegex")||_p.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Kv),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function nw(i){return this._monthsParseExact?(a(this,"_monthsRegex")||_p.call(this),i?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Zv),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function _p(){function i(x,re){return re.length-x.length}var u=[],d=[],f=[],p,b;for(p=0;p<12;p++)b=T([2e3,p]),u.push(this.monthsShort(b,"")),d.push(this.months(b,"")),f.push(this.months(b,"")),f.push(this.monthsShort(b,""));for(u.sort(i),d.sort(i),f.sort(i),p=0;p<12;p++)u[p]=ht(u[p]),d[p]=ht(d[p]);for(p=0;p<24;p++)f[p]=ht(f[p]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+u.join("|")+")","i")}k("Y",0,0,function(){var i=this.year();return i<=9999?_(i,4):"+"+i}),k(0,["YY",2],0,function(){return this.year()%100}),k(0,["YYYY",4],0,"year"),k(0,["YYYYY",5],0,"year"),k(0,["YYYYYY",6,!0],0,"year"),dt("year","y"),je("year",1),H("Y",Pn),H("YY",Le,_t),H("YYYY",xn,cr),H("YYYYY",ns,en),H("YYYYYY",ns,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 Li(i){return es(i)?366:365}e.parseTwoDigitYear=function(i){return ce(i)+(ce(i)>68?1900:2e3)};var Tp=Jr("FullYear",!0);function sw(){return es(this.year())}function iw(i,u,d,f,p,b,x){var re;return i<100&&i>=0?(re=new Date(i+400,u,d,f,p,b,x),isFinite(re.getFullYear())&&re.setFullYear(i)):re=new Date(i,u,d,f,p,b,x),re}function Yi(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 go(i,u,d){var f=7+u-d,p=(7+Yi(i,0,f).getUTCDay()-u)%7;return-p+f-1}function bp(i,u,d,f,p){var b=(7+d-f)%7,x=go(i,f,p),re=1+7*(u-1)+b+x,me,Ye;return re<=0?(me=i-1,Ye=Li(me)+re):re>Li(i)?(me=i+1,Ye=re-Li(i)):(me=i,Ye=re),{year:me,dayOfYear:Ye}}function Ui(i,u,d){var f=go(i.year(),u,d),p=Math.floor((i.dayOfYear()-f-1)/7)+1,b,x;return p<1?(x=i.year()-1,b=p+rn(x,u,d)):p>rn(i.year(),u,d)?(b=p-rn(i.year(),u,d),x=i.year()+1):(x=i.year(),b=p),{week:b,year:x}}function rn(i,u,d){var f=go(i,u,d),p=go(i+1,u,d);return(Li(i)-f+p)/7}k("w",["ww",2],"wo","week"),k("W",["WW",2],"Wo","isoWeek"),dt("week","w"),dt("isoWeek","W"),je("week",5),je("isoWeek",5),H("w",Le),H("ww",Le,_t),H("W",Le),H("WW",Le,_t),pr(["w","ww","W","WW"],function(i,u,d,f){u[f.substr(0,1)]=ce(i)});function aw(i){return Ui(i,this._week.dow,this._week.doy).week}var ow={dow:0,doy:6};function uw(){return this._week.dow}function lw(){return this._week.doy}function cw(i){var u=this.localeData().week(this);return i==null?u:this.add((i-u)*7,"d")}function dw(i){var u=Ui(this,1,4).week;return i==null?u:this.add((i-u)*7,"d")}k("d",0,"do","day"),k("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),k("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),k("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),k("e",0,0,"weekday"),k("E",0,0,"isoWeekday"),dt("day","d"),dt("weekday","e"),dt("isoWeekday","E"),je("day",11),je("weekday",11),je("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)}),pr(["dd","ddd","dddd"],function(i,u,d,f){var p=d._locale.weekdaysParse(i,f,d._strict);p!=null?u.d=p:v(d).invalidWeekday=i}),pr(["d","e","E"],function(i,u,d,f){u[f]=ce(i)});function fw(i,u){return typeof i!="string"?i:isNaN(i)?(i=u.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function hw(i,u){return typeof i=="string"?u.weekdaysParse(i)%7||7:isNaN(i)?null:i}function ml(i,u){return i.slice(u,7).concat(i.slice(0,u))}var pw="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),vp="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),mw="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),yw=fr,gw=fr,_w=fr;function Tw(i,u){var d=n(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(u)?"format":"standalone"];return i===!0?ml(d,this._week.dow):i?d[i.day()]:d}function bw(i){return i===!0?ml(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function vw(i){return i===!0?ml(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function ww(i,u,d){var f,p,b,x=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],f=0;f<7;++f)b=T([2e3,1]).day(f),this._minWeekdaysParse[f]=this.weekdaysMin(b,"").toLocaleLowerCase(),this._shortWeekdaysParse[f]=this.weekdaysShort(b,"").toLocaleLowerCase(),this._weekdaysParse[f]=this.weekdays(b,"").toLocaleLowerCase();return d?u==="dddd"?(p=nt.call(this._weekdaysParse,x),p!==-1?p:null):u==="ddd"?(p=nt.call(this._shortWeekdaysParse,x),p!==-1?p:null):(p=nt.call(this._minWeekdaysParse,x),p!==-1?p:null):u==="dddd"?(p=nt.call(this._weekdaysParse,x),p!==-1||(p=nt.call(this._shortWeekdaysParse,x),p!==-1)?p:(p=nt.call(this._minWeekdaysParse,x),p!==-1?p:null)):u==="ddd"?(p=nt.call(this._shortWeekdaysParse,x),p!==-1||(p=nt.call(this._weekdaysParse,x),p!==-1)?p:(p=nt.call(this._minWeekdaysParse,x),p!==-1?p:null)):(p=nt.call(this._minWeekdaysParse,x),p!==-1||(p=nt.call(this._weekdaysParse,x),p!==-1)?p:(p=nt.call(this._shortWeekdaysParse,x),p!==-1?p:null))}function Dw(i,u,d){var f,p,b;if(this._weekdaysParseExact)return ww.call(this,i,u,d);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),f=0;f<7;f++){if(p=T([2e3,1]).day(f),d&&!this._fullWeekdaysParse[f]&&(this._fullWeekdaysParse[f]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[f]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[f]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[f]||(b="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[f]=new RegExp(b.replace(".",""),"i")),d&&u==="dddd"&&this._fullWeekdaysParse[f].test(i))return f;if(d&&u==="ddd"&&this._shortWeekdaysParse[f].test(i))return f;if(d&&u==="dd"&&this._minWeekdaysParse[f].test(i))return f;if(!d&&this._weekdaysParse[f].test(i))return f}}function kw(i){if(!this.isValid())return i!=null?this:NaN;var u=this._isUTC?this._d.getUTCDay():this._d.getDay();return i!=null?(i=fw(i,this.localeData()),this.add(i-u,"d")):u}function Ew(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 Sw(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var u=hw(i,this.localeData());return this.day(this.day()%7?u:u-7)}else return this.day()||7}function Ow(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||yl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=yw),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function Mw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||yl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=gw),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Rw(i){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||yl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=_w),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function yl(){function i($t,un){return un.length-$t.length}var u=[],d=[],f=[],p=[],b,x,re,me,Ye;for(b=0;b<7;b++)x=T([2e3,1]).day(b),re=ht(this.weekdaysMin(x,"")),me=ht(this.weekdaysShort(x,"")),Ye=ht(this.weekdays(x,"")),u.push(re),d.push(me),f.push(Ye),p.push(re),p.push(me),p.push(Ye);u.sort(i),d.sort(i),f.sort(i),p.sort(i),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+u.join("|")+")","i")}function gl(){return this.hours()%12||12}function xw(){return this.hours()||24}k("H",["HH",2],0,"hour"),k("h",["hh",2],0,gl),k("k",["kk",2],0,xw),k("hmm",0,0,function(){return""+gl.apply(this)+_(this.minutes(),2)}),k("hmmss",0,0,function(){return""+gl.apply(this)+_(this.minutes(),2)+_(this.seconds(),2)}),k("Hmm",0,0,function(){return""+this.hours()+_(this.minutes(),2)}),k("Hmmss",0,0,function(){return""+this.hours()+_(this.minutes(),2)+_(this.seconds(),2)});function wp(i,u){k(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),u)})}wp("a",!0),wp("A",!1),dt("hour","h"),je("hour",13);function Dp(i,u){return u._meridiemParse}H("a",Dp),H("A",Dp),H("H",Le),H("h",Le),H("k",Le),H("HH",Le,_t),H("hh",Le,_t),H("kk",Le,_t),H("hmm",Rn),H("hmmss",Ys),H("Hmm",Rn),H("Hmmss",Ys),Pe(["H","HH"],ne),Pe(["k","kk"],function(i,u,d){var f=ce(i);u[ne]=f===24?0:f}),Pe(["a","A"],function(i,u,d){d._isPm=d._locale.isPM(i),d._meridiem=i}),Pe(["h","hh"],function(i,u,d){u[ne]=ce(i),v(d).bigHour=!0}),Pe("hmm",function(i,u,d){var f=i.length-2;u[ne]=ce(i.substr(0,f)),u[ue]=ce(i.substr(f)),v(d).bigHour=!0}),Pe("hmmss",function(i,u,d){var f=i.length-4,p=i.length-2;u[ne]=ce(i.substr(0,f)),u[ue]=ce(i.substr(f,2)),u[jt]=ce(i.substr(p)),v(d).bigHour=!0}),Pe("Hmm",function(i,u,d){var f=i.length-2;u[ne]=ce(i.substr(0,f)),u[ue]=ce(i.substr(f))}),Pe("Hmmss",function(i,u,d){var f=i.length-4,p=i.length-2;u[ne]=ce(i.substr(0,f)),u[ue]=ce(i.substr(f,2)),u[jt]=ce(i.substr(p))});function Pw(i){return(i+"").toLowerCase().charAt(0)==="p"}var Aw=/[ap]\.?m?\.?/i,Nw=Jr("Hours",!0);function Cw(i,u,d){return i>11?d?"pm":"PM":d?"am":"AM"}var kp={calendar:oe,longDateFormat:ke,invalidDate:le,ordinal:K,dayOfMonthOrdinalParse:We,relativeTime:ct,months:Vv,monthsShort:pp,week:ow,weekdays:pw,weekdaysMin:mw,weekdaysShort:vp,meridiemParse:Aw},Je={},Wi={},qi;function Iw(i,u){var d,f=Math.min(i.length,u.length);for(d=0;d<f;d+=1)if(i[d]!==u[d])return d;return f}function Ep(i){return i&&i.toLowerCase().replace("_","-")}function Fw(i){for(var u=0,d,f,p,b;u<i.length;){for(b=Ep(i[u]).split("-"),d=b.length,f=Ep(i[u+1]),f=f?f.split("-"):null;d>0;){if(p=_o(b.slice(0,d).join("-")),p)return p;if(f&&f.length>=d&&Iw(b,f)>=d-1)break;d--}u++}return qi}function Lw(i){return i.match("^[^/\\\\]*$")!=null}function _o(i){var u=null,d;if(Je[i]===void 0&&typeof oi!="undefined"&&oi&&oi.exports&&Lw(i))try{u=qi._abbr,d=require,d("./locale/"+i),An(u)}catch(f){Je[i]=null}return Je[i]}function An(i,u){var d;return i&&(l(u)?d=nn(i):d=_l(i,u),d?qi=d:typeof console!="undefined"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),qi._abbr}function _l(i,u){if(u!==null){var d,f=kp;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."),f=Je[i]._config;else if(u.parentLocale!=null)if(Je[u.parentLocale]!=null)f=Je[u.parentLocale]._config;else if(d=_o(u.parentLocale),d!=null)f=d._config;else return Wi[u.parentLocale]||(Wi[u.parentLocale]=[]),Wi[u.parentLocale].push({name:i,config:u}),null;return Je[i]=new Q(P(f,u)),Wi[i]&&Wi[i].forEach(function(p){_l(p.name,p.config)}),An(i),Je[i]}else return delete Je[i],null}function Yw(i,u){if(u!=null){var d,f,p=kp;Je[i]!=null&&Je[i].parentLocale!=null?Je[i].set(P(Je[i]._config,u)):(f=_o(i),f!=null&&(p=f._config),u=P(p,u),f==null&&(u.abbr=i),d=new Q(u),d.parentLocale=Je[i],Je[i]=d),An(i)}else Je[i]!=null&&(Je[i].parentLocale!=null?(Je[i]=Je[i].parentLocale,i===An()&&An(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 qi;if(!n(i)){if(u=_o(i),u)return u;i=[i]}return Fw(i)}function Uw(){return Y(Je)}function Tl(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]>yo(d[et],d[Qe])?G:d[ne]<0||d[ne]>24||d[ne]===24&&(d[ue]!==0||d[jt]!==0||d[is]!==0)?ne:d[ue]<0||d[ue]>59?ue:d[jt]<0||d[jt]>59?jt:d[is]<0||d[is]>999?is:-1,v(i)._overflowDayOfYear&&(u<et||u>G)&&(u=G),v(i)._overflowWeeks&&u===-1&&(u=Bv),v(i)._overflowWeekday&&u===-1&&(u=Hv),v(i).overflow=u),i}var Ww=/^\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)?)?$/,qw=/^\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)?)?$/,jw=/Z|[+-]\d\d(?::?\d\d)?/,To=[["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]],bl=[["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/]],$w=/^\/?Date\((-?\d+)/i,Gw=/^(?:(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}))$/,Bw={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 Sp(i){var u,d,f=i._i,p=Ww.exec(f)||qw.exec(f),b,x,re,me,Ye=To.length,$t=bl.length;if(p){for(v(i).iso=!0,u=0,d=Ye;u<d;u++)if(To[u][1].exec(p[1])){x=To[u][0],b=To[u][2]!==!1;break}if(x==null){i._isValid=!1;return}if(p[3]){for(u=0,d=$t;u<d;u++)if(bl[u][1].exec(p[3])){re=(p[2]||" ")+bl[u][0];break}if(re==null){i._isValid=!1;return}}if(!b&&re!=null){i._isValid=!1;return}if(p[4])if(jw.exec(p[4]))me="Z";else{i._isValid=!1;return}i._f=x+(re||"")+(me||""),wl(i)}else i._isValid=!1}function Hw(i,u,d,f,p,b){var x=[zw(i),pp.indexOf(u),parseInt(d,10),parseInt(f,10),parseInt(p,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 Vw(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Kw(i,u,d){if(i){var f=vp.indexOf(i),p=new Date(u[0],u[1],u[2]).getDay();if(f!==p)return v(d).weekdayMismatch=!0,d._isValid=!1,!1}return!0}function Zw(i,u,d){if(i)return Bw[i];if(u)return 0;var f=parseInt(d,10),p=f%100,b=(f-p)/100;return b*60+p}function Op(i){var u=Gw.exec(Vw(i._i)),d;if(u){if(d=Hw(u[4],u[3],u[2],u[5],u[6],u[7]),!Kw(u[1],d,i))return;i._a=d,i._tzm=Zw(u[8],u[9],u[10]),i._d=Yi.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),v(i).rfc2822=!0}else i._isValid=!1}function Xw(i){var u=$w.exec(i._i);if(u!==null){i._d=new Date(+u[1]);return}if(Sp(i),i._isValid===!1)delete i._isValid;else return;if(Op(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:e.createFromInputFallback(i)}e.createFromInputFallback=te("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 Ws(i,u,d){return i!=null?i:u!=null?u:d}function Qw(i){var u=new Date(e.now());return i._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()]}function vl(i){var u,d,f=[],p,b,x;if(!i._d){for(p=Qw(i),i._w&&i._a[G]==null&&i._a[Qe]==null&&Jw(i),i._dayOfYear!=null&&(x=Ws(i._a[et],p[et]),(i._dayOfYear>Li(x)||i._dayOfYear===0)&&(v(i)._overflowDayOfYear=!0),d=Yi(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]=f[u]=p[u];for(;u<7;u++)i._a[u]=f[u]=i._a[u]==null?u===2?1:0:i._a[u];i._a[ne]===24&&i._a[ue]===0&&i._a[jt]===0&&i._a[is]===0&&(i._nextDay=!0,i._a[ne]=0),i._d=(i._useUTC?Yi:iw).apply(null,f),b=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ne]=24),i._w&&typeof i._w.d!="undefined"&&i._w.d!==b&&(v(i).weekdayMismatch=!0)}}function Jw(i){var u,d,f,p,b,x,re,me,Ye;u=i._w,u.GG!=null||u.W!=null||u.E!=null?(b=1,x=4,d=Ws(u.GG,i._a[et],Ui(ze(),1,4).year),f=Ws(u.W,1),p=Ws(u.E,1),(p<1||p>7)&&(me=!0)):(b=i._locale._week.dow,x=i._locale._week.doy,Ye=Ui(ze(),b,x),d=Ws(u.gg,i._a[et],Ye.year),f=Ws(u.w,Ye.week),u.d!=null?(p=u.d,(p<0||p>6)&&(me=!0)):u.e!=null?(p=u.e+b,(u.e<0||u.e>6)&&(me=!0)):p=b),f<1||f>rn(d,b,x)?v(i)._overflowWeeks=!0:me!=null?v(i)._overflowWeekday=!0:(re=bp(d,f,p,b,x),i._a[et]=re.year,i._dayOfYear=re.dayOfYear)}e.ISO_8601=function(){},e.RFC_2822=function(){};function wl(i){if(i._f===e.ISO_8601){Sp(i);return}if(i._f===e.RFC_2822){Op(i);return}i._a=[],v(i).empty=!0;var u=""+i._i,d,f,p,b,x,re=u.length,me=0,Ye,$t;for(p=j(i._f,i._locale).match(w)||[],$t=p.length,d=0;d<$t;d++)b=p[d],f=(u.match(Us(b,i))||[])[0],f&&(x=u.substr(0,u.indexOf(f)),x.length>0&&v(i).unusedInput.push(x),u=u.slice(u.indexOf(f)+f.length),me+=f.length),M[b]?(f?v(i).empty=!1:v(i).unusedTokens.push(b),Ft(b,f,i)):i._strict&&!f&&v(i).unusedTokens.push(b);v(i).charsLeftOver=re-me,u.length>0&&v(i).unusedInput.push(u),i._a[ne]<=12&&v(i).bigHour===!0&&i._a[ne]>0&&(v(i).bigHour=void 0),v(i).parsedDateParts=i._a.slice(0),v(i).meridiem=i._meridiem,i._a[ne]=e0(i._locale,i._a[ne],i._meridiem),Ye=v(i).era,Ye!==null&&(i._a[et]=i._locale.erasConvertYear(Ye,i._a[et])),vl(i),Tl(i)}function e0(i,u,d){var f;return d==null?u:i.meridiemHour!=null?i.meridiemHour(u,d):(i.isPM!=null&&(f=i.isPM(d),f&&u<12&&(u+=12),!f&&u===12&&(u=0)),u)}function t0(i){var u,d,f,p,b,x,re=!1,me=i._f.length;if(me===0){v(i).invalidFormat=!0,i._d=new Date(NaN);return}for(p=0;p<me;p++)b=0,x=!1,u=De({},i),i._useUTC!=null&&(u._useUTC=i._useUTC),u._f=i._f[p],wl(u),C(u)&&(x=!0),b+=v(u).charsLeftOver,b+=v(u).unusedTokens.length*10,v(u).score=b,re?b<f&&(f=b,d=u):(f==null||b<f||x)&&(f=b,d=u,x&&(re=!0));g(i,d||u)}function r0(i){if(!i._d){var u=On(i._i),d=u.day===void 0?u.date:u.day;i._a=m([u.year,u.month,d,u.hour,u.minute,u.second,u.millisecond],function(f){return f&&parseInt(f,10)}),vl(i)}}function n0(i){var u=new Te(Tl(Mp(i)));return u._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function Mp(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(Tl(u)):(h(u)?i._d=u:n(d)?t0(i):d?wl(i):s0(i),C(i)||(i._d=null),i))}function s0(i){var u=i._i;l(u)?i._d=new Date(e.now()):h(u)?i._d=new Date(u.valueOf()):typeof u=="string"?Xw(i):n(u)?(i._a=m(u.slice(0),function(d){return parseInt(d,10)}),vl(i)):s(u)?r0(i):c(u)?i._d=new Date(u):e.createFromInputFallback(i)}function Rp(i,u,d,f,p){var b={};return(u===!0||u===!1)&&(f=u,u=void 0),(d===!0||d===!1)&&(f=d,d=void 0),(s(i)&&o(i)||n(i)&&i.length===0)&&(i=void 0),b._isAMomentObject=!0,b._useUTC=b._isUTC=p,b._l=d,b._i=i,b._f=u,b._strict=f,n0(b)}function ze(i,u,d,f){return Rp(i,u,d,f,!1)}var i0=te("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:$()}),a0=te("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 xp(i,u){var d,f;if(u.length===1&&n(u[0])&&(u=u[0]),!u.length)return ze();for(d=u[0],f=1;f<u.length;++f)(!u[f].isValid()||u[f][i](d))&&(d=u[f]);return d}function o0(){var i=[].slice.call(arguments,0);return xp("isBefore",i)}function u0(){var i=[].slice.call(arguments,0);return xp("isAfter",i)}var l0=function(){return Date.now?Date.now():+new Date},ji=["year","quarter","month","week","day","hour","minute","second","millisecond"];function c0(i){var u,d=!1,f,p=ji.length;for(u in i)if(a(i,u)&&!(nt.call(ji,u)!==-1&&(i[u]==null||!isNaN(i[u]))))return!1;for(f=0;f<p;++f)if(i[ji[f]]){if(d)return!1;parseFloat(i[ji[f]])!==ce(i[ji[f]])&&(d=!0)}return!0}function d0(){return this._isValid}function f0(){return Mr(NaN)}function bo(i){var u=On(i),d=u.year||0,f=u.quarter||0,p=u.month||0,b=u.week||u.isoWeek||0,x=u.day||0,re=u.hour||0,me=u.minute||0,Ye=u.second||0,$t=u.millisecond||0;this._isValid=c0(u),this._milliseconds=+$t+Ye*1e3+me*6e4+re*1e3*60*60,this._days=+x+b*7,this._months=+p+f*3+d*12,this._data={},this._locale=nn(),this._bubble()}function vo(i){return i instanceof bo}function Dl(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function h0(i,u,d){var f=Math.min(i.length,u.length),p=Math.abs(i.length-u.length),b=0,x;for(x=0;x<f;x++)(d&&i[x]!==u[x]||!d&&ce(i[x])!==ce(u[x]))&&b++;return b+p}function Pp(i,u){k(i,0,0,function(){var d=this.utcOffset(),f="+";return d<0&&(d=-d,f="-"),f+_(~~(d/60),2)+u+_(~~d%60,2)})}Pp("Z",":"),Pp("ZZ",""),H("Z",tn),H("ZZ",tn),Pe(["Z","ZZ"],function(i,u,d){d._useUTC=!0,d._tzm=kl(tn,i)});var p0=/([\+\-]|\d\d)/gi;function kl(i,u){var d=(u||"").match(i),f,p,b;return d===null?null:(f=d[d.length-1]||[],p=(f+"").match(p0)||["-",0,0],b=+(p[1]*60)+ce(p[2]),b===0?0:p[0]==="+"?b:-b)}function El(i,u){var d,f;return u._isUTC?(d=u.clone(),f=(be(i)||h(i)?i.valueOf():ze(i).valueOf())-d.valueOf(),d._d.setTime(d._d.valueOf()+f),e.updateOffset(d,!1),d):ze(i).local()}function Sl(i){return-Math.round(i._d.getTimezoneOffset())}e.updateOffset=function(){};function m0(i,u,d){var f=this._offset||0,p;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=kl(tn,i),i===null)return this}else Math.abs(i)<16&&!d&&(i=i*60);return!this._isUTC&&u&&(p=Sl(this)),this._offset=i,this._isUTC=!0,p!=null&&this.add(p,"m"),f!==i&&(!u||this._changeInProgress?Ip(this,Mr(i-f,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?f:Sl(this)}function y0(i,u){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,u),this):-this.utcOffset()}function g0(i){return this.utcOffset(0,i)}function _0(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Sl(this),"m")),this}function T0(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=kl(ho,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function b0(i){return this.isValid()?(i=i?ze(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function v0(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function w0(){if(!l(this._isDSTShifted))return this._isDSTShifted;var i={},u;return De(i,this),i=Mp(i),i._a?(u=i._isUTC?T(i._a):ze(i._a),this._isDSTShifted=this.isValid()&&h0(i._a,u.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function D0(){return this.isValid()?!this._isUTC:!1}function k0(){return this.isValid()?this._isUTC:!1}function Ap(){return this.isValid()?this._isUTC&&this._offset===0:!1}var E0=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,S0=/^(-|\+)?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,f=null,p,b,x;return vo(i)?d={ms:i._milliseconds,d:i._days,M:i._months}:c(i)||!isNaN(+i)?(d={},u?d[u]=+i:d.milliseconds=+i):(f=E0.exec(i))?(p=f[1]==="-"?-1:1,d={y:0,d:ce(f[G])*p,h:ce(f[ne])*p,m:ce(f[ue])*p,s:ce(f[jt])*p,ms:ce(Dl(f[is]*1e3))*p}):(f=S0.exec(i))?(p=f[1]==="-"?-1:1,d={y:as(f[2],p),M:as(f[3],p),w:as(f[4],p),d:as(f[5],p),h:as(f[6],p),m:as(f[7],p),s:as(f[8],p)}):d==null?d={}:typeof d=="object"&&("from"in d||"to"in d)&&(x=O0(ze(d.from),ze(d.to)),d={},d.ms=x.milliseconds,d.M=x.months),b=new bo(d),vo(i)&&a(i,"_locale")&&(b._locale=i._locale),vo(i)&&a(i,"_isValid")&&(b._isValid=i._isValid),b}Mr.fn=bo.prototype,Mr.invalid=f0;function as(i,u){var d=i&&parseFloat(i.replace(",","."));return(isNaN(d)?0:d)*u}function Np(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 O0(i,u){var d;return i.isValid()&&u.isValid()?(u=El(u,i),i.isBefore(u)?d=Np(i,u):(d=Np(u,i),d.milliseconds=-d.milliseconds,d.months=-d.months),d):{milliseconds:0,months:0}}function Cp(i,u){return function(d,f){var p,b;return f!==null&&!isNaN(+f)&&(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=f,f=b),p=Mr(d,f),Ip(this,p,i),this}}function Ip(i,u,d,f){var p=u._milliseconds,b=Dl(u._days),x=Dl(u._months);!i.isValid()||(f=f==null?!0:f,x&&yp(i,Mt(i,"Month")+x*d),b&&ts(i,"Date",Mt(i,"Date")+b*d),p&&i._d.setTime(i._d.valueOf()+p*d),f&&e.updateOffset(i,b||x))}var M0=Cp(1,"add"),R0=Cp(-1,"subtract");function Fp(i){return typeof i=="string"||i instanceof String}function x0(i){return be(i)||h(i)||Fp(i)||c(i)||A0(i)||P0(i)||i===null||i===void 0}function P0(i){var u=s(i)&&!o(i),d=!1,f=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,b,x=f.length;for(p=0;p<x;p+=1)b=f[p],d=d||a(i,b);return u&&d}function A0(i){var u=n(i),d=!1;return u&&(d=i.filter(function(f){return!c(f)&&Fp(i)}).length===0),u&&d}function N0(i){var u=s(i)&&!o(i),d=!1,f=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],p,b;for(p=0;p<f.length;p+=1)b=f[p],d=d||a(i,b);return u&&d}function C0(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 I0(i,u){arguments.length===1&&(arguments[0]?x0(arguments[0])?(i=arguments[0],u=void 0):N0(arguments[0])&&(u=arguments[0],i=void 0):(i=void 0,u=void 0));var d=i||ze(),f=El(d,this).startOf("day"),p=e.calendarFormat(this,f)||"sameElse",b=u&&(V(u[p])?u[p].call(this,d):u[p]);return this.format(b||this.localeData().calendar(p,this,ze(d)))}function F0(){return new Te(this)}function L0(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 Y0(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 U0(i,u,d,f){var p=be(i)?i:ze(i),b=be(u)?u:ze(u);return this.isValid()&&p.isValid()&&b.isValid()?(f=f||"()",(f[0]==="("?this.isAfter(p,d):!this.isBefore(p,d))&&(f[1]===")"?this.isBefore(b,d):!this.isAfter(b,d))):!1}function W0(i,u){var d=be(i)?i:ze(i),f;return this.isValid()&&d.isValid()?(u=gt(u)||"millisecond",u==="millisecond"?this.valueOf()===d.valueOf():(f=d.valueOf(),this.clone().startOf(u).valueOf()<=f&&f<=this.clone().endOf(u).valueOf())):!1}function q0(i,u){return this.isSame(i,u)||this.isAfter(i,u)}function j0(i,u){return this.isSame(i,u)||this.isBefore(i,u)}function $0(i,u,d){var f,p,b;if(!this.isValid())return NaN;if(f=El(i,this),!f.isValid())return NaN;switch(p=(f.utcOffset()-this.utcOffset())*6e4,u=gt(u),u){case"year":b=wo(this,f)/12;break;case"month":b=wo(this,f);break;case"quarter":b=wo(this,f)/3;break;case"second":b=(this-f)/1e3;break;case"minute":b=(this-f)/6e4;break;case"hour":b=(this-f)/36e5;break;case"day":b=(this-f-p)/864e5;break;case"week":b=(this-f-p)/6048e5;break;default:b=this-f}return d?b:ft(b)}function wo(i,u){if(i.date()<u.date())return-wo(u,i);var d=(u.year()-i.year())*12+(u.month()-i.month()),f=i.clone().add(d,"months"),p,b;return u-f<0?(p=i.clone().add(d-1,"months"),b=(u-f)/(f-p)):(p=i.clone().add(d+1,"months"),b=(u-f)/(p-f)),-(d+b)||0}e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function G0(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function B0(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 H0(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",u="",d,f,p,b;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",u="Z"),d="["+i+'("]',f=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",b=u+'[")]',this.format(d+f+p+b)}function z0(i){i||(i=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var u=N(this,i);return this.localeData().postformat(u)}function V0(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 K0(i){return this.from(ze(),i)}function Z0(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 X0(i){return this.to(ze(),i)}function Lp(i){var u;return i===void 0?this._locale._abbr:(u=nn(i),u!=null&&(this._locale=u),this)}var Yp=te("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 Up(){return this._locale}var Do=1e3,qs=60*Do,ko=60*qs,Wp=(365*400+97)*24*ko;function js(i,u){return(i%u+u)%u}function qp(i,u,d){return i<100&&i>=0?new Date(i+400,u,d)-Wp:new Date(i,u,d).valueOf()}function jp(i,u,d){return i<100&&i>=0?Date.UTC(i+400,u,d)-Wp:Date.UTC(i,u,d)}function Q0(i){var u,d;if(i=gt(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?jp:qp,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-=js(u+(this._isUTC?0:this.utcOffset()*qs),ko);break;case"minute":u=this._d.valueOf(),u-=js(u,qs);break;case"second":u=this._d.valueOf(),u-=js(u,Do);break}return this._d.setTime(u),e.updateOffset(this,!0),this}function J0(i){var u,d;if(i=gt(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(d=this._isUTC?jp:qp,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+=ko-js(u+(this._isUTC?0:this.utcOffset()*qs),ko)-1;break;case"minute":u=this._d.valueOf(),u+=qs-js(u,qs)-1;break;case"second":u=this._d.valueOf(),u+=Do-js(u,Do)-1;break}return this._d.setTime(u),e.updateOffset(this,!0),this}function e1(){return this._d.valueOf()-(this._offset||0)*6e4}function t1(){return Math.floor(this.valueOf()/1e3)}function r1(){return new Date(this.valueOf())}function n1(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function s1(){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 i1(){return this.isValid()?this.toISOString():null}function a1(){return C(this)}function o1(){return g({},v(this))}function u1(){return v(this).overflow}function l1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}k("N",0,0,"eraAbbr"),k("NN",0,0,"eraAbbr"),k("NNN",0,0,"eraAbbr"),k("NNNN",0,0,"eraName"),k("NNNNN",0,0,"eraNarrow"),k("y",["y",1],"yo","eraYear"),k("y",["yy",2],0,"eraYear"),k("y",["yyy",3],0,"eraYear"),k("y",["yyyy",4],0,"eraYear"),H("N",Ol),H("NN",Ol),H("NNN",Ol),H("NNNN",b1),H("NNNNN",v1),Pe(["N","NN","NNN","NNNN","NNNNN"],function(i,u,d,f){var p=d._locale.erasParse(i,f,d._strict);p?v(d).era=p:v(d).invalidEra=i}),H("y",dr),H("yy",dr),H("yyy",dr),H("yyyy",dr),H("yo",w1),Pe(["y","yy","yyy","yyyy"],et),Pe(["yo"],function(i,u,d,f){var p;d._locale._eraYearOrdinalRegex&&(p=i.match(d._locale._eraYearOrdinalRegex)),d._locale.eraYearOrdinalParse?u[et]=d._locale.eraYearOrdinalParse(i,p):u[et]=parseInt(i,10)});function c1(i,u){var d,f,p,b=this._eras||nn("en")._eras;for(d=0,f=b.length;d<f;++d){switch(typeof b[d].since){case"string":p=e(b[d].since).startOf("day"),b[d].since=p.valueOf();break}switch(typeof b[d].until){case"undefined":b[d].until=1/0;break;case"string":p=e(b[d].until).startOf("day").valueOf(),b[d].until=p.valueOf();break}}return b}function d1(i,u,d){var f,p,b=this.eras(),x,re,me;for(i=i.toUpperCase(),f=0,p=b.length;f<p;++f)if(x=b[f].name.toUpperCase(),re=b[f].abbr.toUpperCase(),me=b[f].narrow.toUpperCase(),d)switch(u){case"N":case"NN":case"NNN":if(re===i)return b[f];break;case"NNNN":if(x===i)return b[f];break;case"NNNNN":if(me===i)return b[f];break}else if([x,re,me].indexOf(i)>=0)return b[f]}function f1(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 h1(){var i,u,d,f=this.localeData().eras();for(i=0,u=f.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),f[i].since<=d&&d<=f[i].until||f[i].until<=d&&d<=f[i].since)return f[i].name;return""}function p1(){var i,u,d,f=this.localeData().eras();for(i=0,u=f.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),f[i].since<=d&&d<=f[i].until||f[i].until<=d&&d<=f[i].since)return f[i].narrow;return""}function m1(){var i,u,d,f=this.localeData().eras();for(i=0,u=f.length;i<u;++i)if(d=this.clone().startOf("day").valueOf(),f[i].since<=d&&d<=f[i].until||f[i].until<=d&&d<=f[i].since)return f[i].abbr;return""}function y1(){var i,u,d,f,p=this.localeData().eras();for(i=0,u=p.length;i<u;++i)if(d=p[i].since<=p[i].until?1:-1,f=this.clone().startOf("day").valueOf(),p[i].since<=f&&f<=p[i].until||p[i].until<=f&&f<=p[i].since)return(this.year()-e(p[i].since).year())*d+p[i].offset;return this.year()}function g1(i){return a(this,"_erasNameRegex")||Ml.call(this),i?this._erasNameRegex:this._erasRegex}function _1(i){return a(this,"_erasAbbrRegex")||Ml.call(this),i?this._erasAbbrRegex:this._erasRegex}function T1(i){return a(this,"_erasNarrowRegex")||Ml.call(this),i?this._erasNarrowRegex:this._erasRegex}function Ol(i,u){return u.erasAbbrRegex(i)}function b1(i,u){return u.erasNameRegex(i)}function v1(i,u){return u.erasNarrowRegex(i)}function w1(i,u){return u._eraYearOrdinalRegex||dr}function Ml(){var i=[],u=[],d=[],f=[],p,b,x=this.eras();for(p=0,b=x.length;p<b;++p)u.push(ht(x[p].name)),i.push(ht(x[p].abbr)),d.push(ht(x[p].narrow)),f.push(ht(x[p].name)),f.push(ht(x[p].abbr)),f.push(ht(x[p].narrow));this._erasRegex=new RegExp("^("+f.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+u.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+d.join("|")+")","i")}k(0,["gg",2],0,function(){return this.weekYear()%100}),k(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Eo(i,u){k(0,[i,i.length],0,u)}Eo("gggg","weekYear"),Eo("ggggg","weekYear"),Eo("GGGG","isoWeekYear"),Eo("GGGGG","isoWeekYear"),dt("weekYear","gg"),dt("isoWeekYear","GG"),je("weekYear",1),je("isoWeekYear",1),H("G",Pn),H("g",Pn),H("GG",Le,_t),H("gg",Le,_t),H("GGGG",xn,cr),H("gggg",xn,cr),H("GGGGG",ns,en),H("ggggg",ns,en),pr(["gggg","ggggg","GGGG","GGGGG"],function(i,u,d,f){u[f.substr(0,2)]=ce(i)}),pr(["gg","GG"],function(i,u,d,f){u[f]=e.parseTwoDigitYear(i)});function D1(i){return $p.call(this,i,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function k1(i){return $p.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function E1(){return rn(this.year(),1,4)}function S1(){return rn(this.isoWeekYear(),1,4)}function O1(){var i=this.localeData()._week;return rn(this.year(),i.dow,i.doy)}function M1(){var i=this.localeData()._week;return rn(this.weekYear(),i.dow,i.doy)}function $p(i,u,d,f,p){var b;return i==null?Ui(this,f,p).year:(b=rn(i,f,p),u>b&&(u=b),R1.call(this,i,u,d,f,p))}function R1(i,u,d,f,p){var b=bp(i,u,d,f,p),x=Yi(b.year,0,b.dayOfYear);return this.year(x.getUTCFullYear()),this.month(x.getUTCMonth()),this.date(x.getUTCDate()),this}k("Q",0,"Qo","quarter"),dt("quarter","Q"),je("quarter",7),H("Q",Mn),Pe("Q",function(i,u){u[Qe]=(ce(i)-1)*3});function x1(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}k("D",["DD",2],"Do","date"),dt("date","D"),je("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 Gp=Jr("Date",!0);k("DDD",["DDDD",3],"DDDo","dayOfYear"),dt("dayOfYear","DDD"),je("dayOfYear",4),H("DDD",rs),H("DDDD",Fi),Pe(["DDD","DDDD"],function(i,u,d){d._dayOfYear=ce(i)});function P1(i){var u=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?u:this.add(i-u,"d")}k("m",["mm",2],0,"minute"),dt("minute","m"),je("minute",14),H("m",Le),H("mm",Le,_t),Pe(["m","mm"],ue);var A1=Jr("Minutes",!1);k("s",["ss",2],0,"second"),dt("second","s"),je("second",15),H("s",Le),H("ss",Le,_t),Pe(["s","ss"],jt);var N1=Jr("Seconds",!1);k("S",0,0,function(){return~~(this.millisecond()/100)}),k(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),k(0,["SSS",3],0,"millisecond"),k(0,["SSSS",4],0,function(){return this.millisecond()*10}),k(0,["SSSSS",5],0,function(){return this.millisecond()*100}),k(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),k(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),k(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),k(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),dt("millisecond","ms"),je("millisecond",16),H("S",rs,Mn),H("SS",rs,_t),H("SSS",rs,Fi);var Nn,Bp;for(Nn="SSSS";Nn.length<=9;Nn+="S")H(Nn,dr);function C1(i,u){u[is]=ce(("0."+i)*1e3)}for(Nn="S";Nn.length<=9;Nn+="S")Pe(Nn,C1);Bp=Jr("Milliseconds",!1),k("z",0,0,"zoneAbbr"),k("zz",0,0,"zoneName");function I1(){return this._isUTC?"UTC":""}function F1(){return this._isUTC?"Coordinated Universal Time":""}var F=Te.prototype;F.add=M0,F.calendar=I0,F.clone=F0,F.diff=$0,F.endOf=J0,F.format=z0,F.from=V0,F.fromNow=K0,F.to=Z0,F.toNow=X0,F.get=fo,F.invalidAt=u1,F.isAfter=L0,F.isBefore=Y0,F.isBetween=U0,F.isSame=W0,F.isSameOrAfter=q0,F.isSameOrBefore=j0,F.isValid=a1,F.lang=Yp,F.locale=Lp,F.localeData=Up,F.max=a0,F.min=i0,F.parsingFlags=o1,F.set=Ur,F.startOf=Q0,F.subtract=R0,F.toArray=n1,F.toObject=s1,F.toDate=r1,F.toISOString=B0,F.inspect=H0,typeof Symbol!="undefined"&&Symbol.for!=null&&(F[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),F.toJSON=i1,F.toString=G0,F.unix=t1,F.valueOf=e1,F.creationData=l1,F.eraName=h1,F.eraNarrow=p1,F.eraAbbr=m1,F.eraYear=y1,F.year=Tp,F.isLeapYear=sw,F.weekYear=D1,F.isoWeekYear=k1,F.quarter=F.quarters=x1,F.month=gp,F.daysInMonth=tw,F.week=F.weeks=cw,F.isoWeek=F.isoWeeks=dw,F.weeksInYear=O1,F.weeksInWeekYear=M1,F.isoWeeksInYear=E1,F.isoWeeksInISOWeekYear=S1,F.date=Gp,F.day=F.days=kw,F.weekday=Ew,F.isoWeekday=Sw,F.dayOfYear=P1,F.hour=F.hours=Nw,F.minute=F.minutes=A1,F.second=F.seconds=N1,F.millisecond=F.milliseconds=Bp,F.utcOffset=m0,F.utc=g0,F.local=_0,F.parseZone=T0,F.hasAlignedHourOffset=b0,F.isDST=v0,F.isLocal=D0,F.isUtcOffset=k0,F.isUtc=Ap,F.isUTC=Ap,F.zoneAbbr=I1,F.zoneName=F1,F.dates=te("dates accessor is deprecated. Use date instead.",Gp),F.months=te("months accessor is deprecated. Use month instead",gp),F.years=te("years accessor is deprecated. Use year instead",Tp),F.zone=te("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",y0),F.isDSTShifted=te("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",w0);function L1(i){return ze(i*1e3)}function Y1(){return ze.apply(null,arguments).parseZone()}function Hp(i){return i}var Me=Q.prototype;Me.calendar=y,Me.longDateFormat=pe,Me.invalidDate=Ce,Me.ordinal=Xe,Me.preparse=Hp,Me.postformat=Hp,Me.relativeTime=Or,Me.pastFuture=it,Me.set=q,Me.eras=c1,Me.erasParse=d1,Me.erasConvertYear=f1,Me.erasAbbrRegex=_1,Me.erasNameRegex=g1,Me.erasNarrowRegex=T1,Me.months=Xv,Me.monthsShort=Qv,Me.monthsParse=ew,Me.monthsRegex=nw,Me.monthsShortRegex=rw,Me.week=aw,Me.firstDayOfYear=lw,Me.firstDayOfWeek=uw,Me.weekdays=Tw,Me.weekdaysMin=vw,Me.weekdaysShort=bw,Me.weekdaysParse=Dw,Me.weekdaysRegex=Ow,Me.weekdaysShortRegex=Mw,Me.weekdaysMinRegex=Rw,Me.isPM=Pw,Me.meridiem=Cw;function So(i,u,d,f){var p=nn(),b=T().set(f,u);return p[d](b,i)}function zp(i,u,d){if(c(i)&&(u=i,i=void 0),i=i||"",u!=null)return So(i,u,d,"month");var f,p=[];for(f=0;f<12;f++)p[f]=So(i,f,d,"month");return p}function Rl(i,u,d,f){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 p=nn(),b=i?p._week.dow:0,x,re=[];if(d!=null)return So(u,(d+b)%7,f,"day");for(x=0;x<7;x++)re[x]=So(u,(x+b)%7,f,"day");return re}function U1(i,u){return zp(i,u,"months")}function W1(i,u){return zp(i,u,"monthsShort")}function q1(i,u,d){return Rl(i,u,d,"weekdays")}function j1(i,u,d){return Rl(i,u,d,"weekdaysShort")}function $1(i,u,d){return Rl(i,u,d,"weekdaysMin")}An("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=te("moment.lang is deprecated. Use moment.locale instead.",An),e.langData=te("moment.langData is deprecated. Use moment.localeData instead.",nn);var sn=Math.abs;function G1(){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 Vp(i,u,d,f){var p=Mr(u,d);return i._milliseconds+=f*p._milliseconds,i._days+=f*p._days,i._months+=f*p._months,i._bubble()}function B1(i,u){return Vp(this,i,u,1)}function H1(i,u){return Vp(this,i,u,-1)}function Kp(i){return i<0?Math.floor(i):Math.ceil(i)}function z1(){var i=this._milliseconds,u=this._days,d=this._months,f=this._data,p,b,x,re,me;return i>=0&&u>=0&&d>=0||i<=0&&u<=0&&d<=0||(i+=Kp(xl(d)+u)*864e5,u=0,d=0),f.milliseconds=i%1e3,p=ft(i/1e3),f.seconds=p%60,b=ft(p/60),f.minutes=b%60,x=ft(b/60),f.hours=x%24,u+=ft(x/24),me=ft(Zp(u)),d+=me,u-=Kp(xl(me)),re=ft(d/12),d%=12,f.days=u,f.months=d,f.years=re,this}function Zp(i){return i*4800/146097}function xl(i){return i*146097/4800}function V1(i){if(!this.isValid())return NaN;var u,d,f=this._milliseconds;if(i=gt(i),i==="month"||i==="quarter"||i==="year")switch(u=this._days+f/864e5,d=this._months+Zp(u),i){case"month":return d;case"quarter":return d/3;case"year":return d/12}else switch(u=this._days+Math.round(xl(this._months)),i){case"week":return u/7+f/6048e5;case"day":return u+f/864e5;case"hour":return u*24+f/36e5;case"minute":return u*1440+f/6e4;case"second":return u*86400+f/1e3;case"millisecond":return Math.floor(u*864e5)+f;default:throw new Error("Unknown unit "+i)}}function K1(){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 Z1=an("ms"),X1=an("s"),Q1=an("m"),J1=an("h"),eD=an("d"),tD=an("w"),rD=an("M"),nD=an("Q"),sD=an("y");function iD(){return Mr(this)}function aD(i){return i=gt(i),this.isValid()?this[i+"s"]():NaN}function os(i){return function(){return this.isValid()?this._data[i]:NaN}}var oD=os("milliseconds"),uD=os("seconds"),lD=os("minutes"),cD=os("hours"),dD=os("days"),fD=os("months"),hD=os("years");function pD(){return ft(this.days()/7)}var on=Math.round,$s={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function mD(i,u,d,f,p){return p.relativeTime(u||1,!!d,i,f)}function yD(i,u,d,f){var p=Mr(i).abs(),b=on(p.as("s")),x=on(p.as("m")),re=on(p.as("h")),me=on(p.as("d")),Ye=on(p.as("M")),$t=on(p.as("w")),un=on(p.as("y")),Cn=b<=d.ss&&["s",b]||b<d.s&&["ss",b]||x<=1&&["m"]||x<d.m&&["mm",x]||re<=1&&["h"]||re<d.h&&["hh",re]||me<=1&&["d"]||me<d.d&&["dd",me];return d.w!=null&&(Cn=Cn||$t<=1&&["w"]||$t<d.w&&["ww",$t]),Cn=Cn||Ye<=1&&["M"]||Ye<d.M&&["MM",Ye]||un<=1&&["y"]||["yy",un],Cn[2]=u,Cn[3]=+i>0,Cn[4]=f,mD.apply(null,Cn)}function gD(i){return i===void 0?on:typeof i=="function"?(on=i,!0):!1}function _D(i,u){return $s[i]===void 0?!1:u===void 0?$s[i]:($s[i]=u,i==="s"&&($s.ss=u-1),!0)}function TD(i,u){if(!this.isValid())return this.localeData().invalidDate();var d=!1,f=$s,p,b;return typeof i=="object"&&(u=i,i=!1),typeof i=="boolean"&&(d=i),typeof u=="object"&&(f=Object.assign({},$s,u),u.s!=null&&u.ss==null&&(f.ss=u.s-1)),p=this.localeData(),b=yD(this,!d,f,p),d&&(b=p.pastFuture(+this,b)),p.postformat(b)}var Pl=Math.abs;function Gs(i){return(i>0)-(i<0)||+i}function Oo(){if(!this.isValid())return this.localeData().invalidDate();var i=Pl(this._milliseconds)/1e3,u=Pl(this._days),d=Pl(this._months),f,p,b,x,re=this.asSeconds(),me,Ye,$t,un;return re?(f=ft(i/60),p=ft(f/60),i%=60,f%=60,b=ft(d/12),d%=12,x=i?i.toFixed(3).replace(/\.?0+$/,""):"",me=re<0?"-":"",Ye=Gs(this._months)!==Gs(re)?"-":"",$t=Gs(this._days)!==Gs(re)?"-":"",un=Gs(this._milliseconds)!==Gs(re)?"-":"",me+"P"+(b?Ye+b+"Y":"")+(d?Ye+d+"M":"")+(u?$t+u+"D":"")+(p||f||i?"T":"")+(p?un+p+"H":"")+(f?un+f+"M":"")+(i?un+x+"S":"")):"P0D"}var Oe=bo.prototype;Oe.isValid=d0,Oe.abs=G1,Oe.add=B1,Oe.subtract=H1,Oe.as=V1,Oe.asMilliseconds=Z1,Oe.asSeconds=X1,Oe.asMinutes=Q1,Oe.asHours=J1,Oe.asDays=eD,Oe.asWeeks=tD,Oe.asMonths=rD,Oe.asQuarters=nD,Oe.asYears=sD,Oe.valueOf=K1,Oe._bubble=z1,Oe.clone=iD,Oe.get=aD,Oe.milliseconds=oD,Oe.seconds=uD,Oe.minutes=lD,Oe.hours=cD,Oe.days=dD,Oe.weeks=pD,Oe.months=fD,Oe.years=hD,Oe.humanize=TD,Oe.toISOString=Oo,Oe.toString=Oo,Oe.toJSON=Oo,Oe.locale=Lp,Oe.localeData=Up,Oe.toIsoString=te("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Oo),Oe.lang=Yp,k("X",0,0,"unix"),k("x",0,0,"valueOf"),H("x",Pn),H("X",po),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=o0,e.max=u0,e.now=l0,e.utc=T,e.unix=L1,e.months=U1,e.isDate=h,e.locale=An,e.invalid=$,e.duration=Mr,e.isMoment=be,e.weekdays=q1,e.parseZone=Y1,e.localeData=nn,e.isDuration=vo,e.monthsShort=W1,e.weekdaysMin=$1,e.defineLocale=_l,e.updateLocale=Yw,e.locales=Uw,e.weekdaysShort=j1,e.normalizeUnits=gt,e.relativeTimeRounding=gD,e.relativeTimeThreshold=_D,e.calendarFormat=C0,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 JT=O((lY,Su)=>{var AT,NT,CT,IT,FT,LT,YT,UT,WT,ku,Eh,qT,jT,$T,ci,GT,BT,HT,zT,VT,KT,ZT,XT,QT,Eu;(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 Su=="object"&&typeof Su.exports=="object"?r(t(e,t(Su.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])};AT=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)},NT=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},CT=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},IT=function(n,s,a,o){var l=arguments.length,c=l<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,a):o,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(n,s,a,o);else for(var m=n.length-1;m>=0;m--)(h=n[m])&&(c=(l<3?h(c):l>3?h(s,a,c):h(s,a))||c);return l>3&&c&&Object.defineProperty(s,a,c),c},FT=function(n,s){return function(a,o){s(a,o,n)}},LT=function(n,s){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,s)},YT=function(n,s,a,o){function l(c){return c instanceof a?c:new a(function(h){h(c)})}return new(a||(a=Promise))(function(c,h){function m(S){try{T(o.next(S))}catch(v){h(v)}}function g(S){try{T(o.throw(S))}catch(v){h(v)}}function T(S){S.done?c(S.value):l(S.value).then(m,g)}T((o=o.apply(n,s||[])).next())})},UT=function(n,s){var a={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,l,c,h;return h={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function m(T){return function(S){return g([T,S])}}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(S){T=[6,S],l=0}finally{o=c=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}},WT=function(n,s){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&Eu(s,n,a)},Eu=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]},ku=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.")},Eh=function(n,s){var a=typeof Symbol=="function"&&n[Symbol.iterator];if(!a)return n;var o=a.call(n),l,c=[],h;try{for(;(s===void 0||s-- >0)&&!(l=o.next()).done;)c.push(l.value)}catch(m){h={error:m}}finally{try{l&&!l.done&&(a=o.return)&&a.call(o)}finally{if(h)throw h.error}}return c},qT=function(){for(var n=[],s=0;s<arguments.length;s++)n=n.concat(Eh(arguments[s]));return n},jT=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],h=0,m=c.length;h<m;h++,l++)o[l]=c[h];return o},$T=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))},ci=function(n){return this instanceof ci?(this.v=n,this):new ci(n)},GT=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={},h("next"),h("throw"),h("return"),l[Symbol.asyncIterator]=function(){return this},l;function h(R){o[R]&&(l[R]=function(C){return new Promise(function($,B){c.push([R,C,$,B])>1||m(R,C)})})}function m(R,C){try{g(o[R](C))}catch($){v(c[0][3],$)}}function g(R){R.value instanceof ci?Promise.resolve(R.value.v).then(T,S):v(c[0][2],R)}function T(R){m("next",R)}function S(R){m("throw",R)}function v(R,C){R(C),c.shift(),c.length&&m(c[0][0],c[0][1])}},BT=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(h){return(a=!a)?{value:ci(n[l](h)),done:l==="return"}:c?c(h):h}:c}},HT=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 ku=="function"?ku(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(h){return new Promise(function(m,g){h=n[c](h),l(m,g,h.done,h.value)})}}function l(c,h,m,g){Promise.resolve(g).then(function(T){c({value:T,done:m})},h)}},zT=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};VT=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)&&Eu(s,n,a);return t(s,n),s},KT=function(n){return n&&n.__esModule?n:{default:n}},ZT=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)},XT=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},QT=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",AT),r("__assign",NT),r("__rest",CT),r("__decorate",IT),r("__param",FT),r("__metadata",LT),r("__awaiter",YT),r("__generator",UT),r("__exportStar",WT),r("__createBinding",Eu),r("__values",ku),r("__read",Eh),r("__spread",qT),r("__spreadArrays",jT),r("__spreadArray",$T),r("__await",ci),r("__asyncGenerator",GT),r("__asyncDelegator",BT),r("__asyncValues",HT),r("__makeTemplateObject",zT),r("__importStar",VT),r("__importDefault",KT),r("__classPrivateFieldGet",ZT),r("__classPrivateFieldSet",XT),r("__classPrivateFieldIn",QT)})});var Ub=O((Lb,Yb)=>{(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,h=a?o&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(y){var _=Object.getOwnPropertyNames(y);return _.push.apply(_,Object.getOwnPropertySymbols(y)),_}:Object.keys;function m(){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 D=new Error(w);D.name="MaxListenersExceededWarning",D.emitter=this,D.count=y,process.emitWarning(D)}else console.error(w),console.trace&&console.trace()}var S=function(y,_,w){var D=arguments.length;switch(D){case 0:return[];case 1:return[y];case 2:return[y,_];case 3:return[y,_,w];default:for(var E=new Array(D);D--;)E[D]=arguments[D];return E}};function v(y,_){for(var w={},D,E=y.length,M=_?_.length:0,k=0;k<E;k++)D=y[k],w[D]=k<M?_[k]:r;return w}function R(y,_,w){this._emitter=y,this._target=_,this._listeners={},this._listenersCount=0;var D,E;if((w.on||w.off)&&(D=w.on,E=w.off),_.addEventListener?(D=_.addEventListener,E=_.removeEventListener):_.addListener?(D=_.addListener,E=_.removeListener):_.on&&(D=_.on,E=_.off),!D&&!E)throw Error("target does not implement any known event API");if(typeof D!="function")throw TypeError("on method must be a function");if(typeof E!="function")throw TypeError("off method must be a function");this._on=D,this._off=E;var M=y._observers;M?M.push(this):y._observers=[this]}Object.assign(R.prototype,{subscribe:function(y,_,w){var D=this,E=this._target,M=this._emitter,k=this._listeners,I=function(){var A=S.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(k[y])throw Error("Event '"+y+"' is already listening");this._listenersCount++,M._newListener&&M._removeListener&&!D._onNewListener?(this._onNewListener=function(A){A===_&&k[y]===null&&(k[y]=I,D._on.call(E,y,I))},M.on("newListener",this._onNewListener),this._onRemoveListener=function(A){A===_&&!M.hasListeners(A)&&k[y]&&(k[y]=null,D._off.call(E,y,I))},k[y]=null,M.on("removeListener",this._onRemoveListener)):(k[y]=I,D._on.call(E,y,I))},unsubscribe:function(y){var _=this,w=this._listeners,D=this._emitter,E,M,k=this._off,I=this._target,A;if(y&&typeof y!="string")throw TypeError("event must be a string");function N(){_._onNewListener&&(D.off("newListener",_._onNewListener),D.off("removeListener",_._onRemoveListener),_._onNewListener=null,_._onRemoveListener=null);var j=be.call(D,_);D._observers.splice(j,1)}if(y){if(E=w[y],!E)return;k.call(I,y,E),delete w[y],--this._listenersCount||N()}else{for(M=h(w),A=M.length;A-- >0;)y=M[A],k.call(I,y,w[y]);this._listeners={},this._listenersCount=0,N()}}});function C(y,_,w,D){var E=Object.assign({},_);if(!y)return E;if(typeof y!="object")throw TypeError("options must be an object");var M=Object.keys(y),k=M.length,I,A,N;function j(pe){throw Error('Invalid "'+I+'" option value'+(pe?". Reason: "+pe:""))}for(var ke=0;ke<k;ke++){if(I=M[ke],!D&&!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,D=y[0],E=y[1];return w===1?function(M,k){if(typeof M===D)return M;k(_)}:w===2?function(M,k){var I=typeof M;if(I===D||I===E)return M;k(_)}:function(M,k){for(var I=typeof M,A=w;A-- >0;)if(I===y[A])return M;k(_)}}var W=B(["function"]),De=B(["object","function"]);function Te(y,_,w){var D,E,M=0,k,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}}),D=!w.overload&&typeof y.prototype.cancel=="function"&&typeof j=="function";function ke(){E&&(E=null),M&&(clearTimeout(M),M=0)}var pe=function(Ce){ke(),A(Ce)},le=function(Ce){ke(),N(Ce)};D?_(pe,le,j):(E=[function(Ce){le(Ce||Error("canceled"))}],_(pe,le,function(Ce){if(k)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Ce!="function")throw TypeError("onCancel callback must be a function");E.push(Ce)}),k=!0),w.timeout>0&&(M=setTimeout(function(){var Ce=Error("timeout");Ce.code="ETIMEDOUT",M=0,I.cancel(Ce),N(Ce)},w.timeout))});return D||(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,D=0;D<w;D++)if(_[D]._target===y)return D;return-1}function ee(y,_,w,D,E){if(!w)return null;if(D===0){var M=typeof _;if(M==="string"){var k,I,A=0,N=0,j=this.delimiter,ke=j.length;if((I=_.indexOf(j))!==-1){k=new Array(5);do k[A++]=_.slice(N,I),N=I+ke;while((I=_.indexOf(j,N))!==-1);k[A++]=_.slice(N),_=k,E=A}else _=[_],E=1}else M==="object"?E=_.length:(_=[_],E=1)}var pe=null,le,Ce,K,We,Xe,ct=_[D],Or=_[D+1],it,qe;if(D===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=h(w),I=it.length;I-- >0;)le=it[I],le!=="_listeners"&&(qe=ee(y,_,w[le],D+1,E),qe&&(pe?pe.push.apply(pe,qe):pe=qe));return pe}else if(ct==="**"){for(Xe=D+1===E||D+2===E&&Or==="*",Xe&&w._listeners&&(pe=ee(y,_,w,E,E)),it=h(w),I=it.length;I-- >0;)le=it[I],le!=="_listeners"&&(le==="*"||le==="**"?(w[le]._listeners&&!Xe&&(qe=ee(y,_,w[le],E,E),qe&&(pe?pe.push.apply(pe,qe):pe=qe)),qe=ee(y,_,w[le],D,E)):le===Or?qe=ee(y,_,w[le],D+2,E):qe=ee(y,_,w[le],D,E),qe&&(pe?pe.push.apply(pe,qe):pe=qe));return pe}else w[ct]&&(pe=ee(y,_,w[ct],D+1,E));if(Ce=w["*"],Ce&&ee(y,_,Ce,D+1,E),K=w["**"],K)if(D<E)for(K._listeners&&ee(y,_,K,E,E),it=h(K),I=it.length;I-- >0;)le=it[I],le!=="_listeners"&&(le===Or?ee(y,_,K[le],D+2,E):le===ct?ee(y,_,K[le],D+1,E):(We={},We[le]=K[le],ee(y,_,{"**":We},D+1,E)));else K._listeners?ee(y,_,K,E,E):K["*"]&&K["*"]._listeners&&ee(y,_,K["*"],E,E);return pe}function te(y,_,w){var D=0,E=0,M,k=this.delimiter,I=k.length,A;if(typeof y=="string")if((M=y.indexOf(k))!==-1){A=new Array(5);do A[D++]=y.slice(E,M),E=M+I;while((M=y.indexOf(k,E))!==-1);A[D++]=y.slice(E)}else A=[y],D=1;else A=y,D=y.length;if(D>1){for(M=0;M+1<D;M++)if(A[M]==="**"&&A[M+1]==="**")return}var N=this.listenerTree,j;for(M=0;M<D;M++)if(j=A[M],N=N[j]||(N[j]={}),M===D-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,D){for(var E=h(y),M=E.length,k,I,A,N=y._listeners,j;M-- >0;)I=E[M],k=y[I],I==="_listeners"?A=w:A=w?w.concat(I):[I],j=D||typeof I=="symbol",N&&_.push(j?A:A.join(this.delimiter)),typeof k=="object"&&It.call(this,k,_,A,j);return _}function yt(y){for(var _=h(y),w=_.length,D,E,M;w-- >0;)E=_[w],D=y[E],D&&(M=!0,E!=="_listeners"&&!yt(D)&&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)D=!0;else{if(!w||typeof w!="object")throw TypeError("options should be an object or true");var D=w.async,E=w.promisify,M=w.nextTick,k=w.objectify}if(D||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,ke=this.event;return E?M?Promise.resolve():new Promise(function(pe){c(pe)}).then(function(){return j.event=ke,I.apply(j,N)}):(M?process.nextTick:c)(function(){j.event=ke,I.apply(j,N)})},_._async=!0,_._origin=A}return[_,k?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 D=this;w=C(w,{on:r,off:r,reducers:r},{on:W,off:W,reducers:De});function E(M){if(typeof M!="object")throw TypeError("events must be an object");var k=w.reducers,I=be.call(D,y),A;I===-1?A=new R(D,y,w):A=D._observers[I];for(var N=h(M),j=N.length,ke,pe=typeof k=="function",le=0;le<j;le++)ke=N[le],A.subscribe(ke,M[ke]||ke,pe?k:k&&k[ke])}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 D=w.length,E,M=!1;if(y&&typeof y!="object")throw TypeError("target should be an object");for(;D-- >0;)E=w[D],(!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,D){return this._many(y,1,_,w,D)},P.prototype.many=function(y,_,w,D){return this._many(y,_,w,!1,D)},P.prototype.prependMany=function(y,_,w,D){return this._many(y,_,w,!0,D)},P.prototype._many=function(y,_,w,D,E){var M=this;if(typeof w!="function")throw new Error("many only accepts instances of Function");function k(){return--_===0&&M.off(y,k),w.apply(this,arguments)}return k._origin=w,this._on(y,k,D,E)},P.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||m.call(this);var y=arguments[0],_,w=this.wildcard,D,E,M,k,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(D=new Array(A-1),k=1;k<A;k++)D[k-1]=arguments[k];N.apply(this,D)}return!0}else N&&(N=N.slice());if(N&&N.length){if(A>3)for(D=new Array(A-1),k=1;k<A;k++)D[k-1]=arguments[k];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,D)}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||m.call(this);var y=arguments[0],_=this.wildcard,w,D,E,M,k,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(k=0;k<M;k++)if(typeof y[k]=="symbol"){D=!0;break}}D||(y=y.join(this.delimiter))}var A=[],N=arguments.length,j;if(this._all)for(k=0,M=this._all.length;k<M;k++)switch(this.event=y,N){case 1:A.push(this._all[k].call(this,y));break;case 2:A.push(this._all[k].call(this,y,arguments[1]));break;case 3:A.push(this._all[k].call(this,y,arguments[1],arguments[2]));break;default:A.push(this._all[k].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(k=0,M=j.length;k<M;k++)switch(this.event=y,N){case 1:A.push(j[k].call(this));break;case 2:A.push(j[k].call(this,arguments[1]));break;case 3:A.push(j[k].call(this,arguments[1],arguments[2]));break;default:A.push(j[k].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,D){if(typeof y=="function")return this._onAny(y,_),this;if(typeof _!="function")throw new Error("on only accepts instances of Function");this._events||m.call(this);var E=this,M;return D!==r&&(M=q.call(this,y,_,D),_=M[0],E=M[1]),this._newListener&&this.emit("newListener",y,_),this.wildcard?(te.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,D=[];if(this.wildcard){var E=typeof y=="string"?y.split(this.delimiter):y.slice();if(D=ee.call(this,null,E,this.listenerTree,0),!D)return this}else{if(!this._events[y])return this;w=this._events[y],D.push({_listeners:w})}for(var M=0;M<D.length;M++){var k=D[M];if(w=k._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?k._listeners.splice(I,1):this._events[y].splice(I,1),w.length===0&&(this.wildcard?delete k._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 k._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,D;if(y&&this._all&&this._all.length>0){for(D=this._all,_=0,w=D.length;_<w;_++)if(y===D[_])return D.splice(_,1),this._removeListener&&this.emit("removeListenerAny",y),this}else{if(D=this._all,this._removeListener)for(_=0,w=D.length;_<w;_++)this.emit("removeListenerAny",D[_]);this._all=[]}return this},P.prototype.removeListener=P.prototype.off,P.prototype.removeAllListeners=function(y){if(y===r)return!this._events||m.call(this),this;if(this.wildcard){var _=ee.call(this,null,y,this.listenerTree,0),w,D;if(!_)return this;for(D=0;D<_.length;D++)w=_[D],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,D,E,M,k;if(y===r){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!_)return[];for(w=h(_),M=w.length,E=[];M-- >0;)D=_[w[M]],typeof D=="function"?E.push(D):E.push.apply(E,D);return E}else{if(this.wildcard){if(k=this.listenerTree,!k)return[];var I=[],A=typeof y=="string"?y.split(this.delimiter):y.slice();return ee.call(this,I,A,k,0),I}return _?(D=_[y],D?typeof D=="function"?[D]:D:[]):[]}},P.prototype.eventNames=function(y){var _=this._events;return this.wildcard?It.call(this,this.listenerTree,[],null,y):_?h(_):[]},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 D=this._events,E=this._all;return!!(E&&E.length||D&&(y===r?h(D).length:D[y]))},P.prototype.listenersAny=function(){return this._all?this._all:[]},P.prototype.waitFor=function(y,_){var w=this,D=typeof _;return D==="number"?_={timeout:_}:D==="function"&&(_={filter:_}),_=C(_,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:W,Promise:$}),Te(_.Promise,function(E,M,k){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(S.apply(null,arguments).slice(1))}else E(S.apply(null,arguments))}k(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 D=w.Promise;return Te(D,function(E,M,k){var I;if(typeof y.addEventListener=="function"){I=function(){E(S.apply(null,arguments))},k(function(){y.removeEventListener(_,I)}),y.addEventListener(_,I,{once:!0});return}var A=function(){N&&y.removeListener("error",N),E(S.apply(null,arguments))},N;_!=="error"&&(N=function(j){y.removeListener(_,A),M(j)},y.once("error",N)),k(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 Lb=="object")Yb.exports=P;else{var oe=new Function("","return this")();oe.EventEmitter2=P}})()});var Qr=O(Qn=>{"use strict";Qn.__esModule=!0;var lF;(function(r){r.AND="AND",r.OR="OR",r.XOR="XOR",r.NOT="NOT"})(lF=Qn.Operators||(Qn.Operators={}));var cF;(function(r){r.OPEN_PARENTHESIS="(",r.CLOSE_PARENTHESIS=")"})(cF=Qn.StructuralCharacters||(Qn.StructuralCharacters={}));var dF;(function(r){r.IDENTIFIER="IDENTIFIER",r.OPERATOR="OPERATOR",r.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",r.EOF="EOF",r.COMMENT="COMMENT"})(dF=Qn.Tokens||(Qn.Tokens={}))});var tp=O(nl=>{"use strict";nl.__esModule=!0;var rt=Qr();nl.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};nl.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 rp=O(Dn=>{"use strict";Dn.__esModule=!0;var Oi=Qr();Dn.STRUCTURAL_CHARACTERS={"(":Oi.StructuralCharacters.OPEN_PARENTHESIS,")":Oi.StructuralCharacters.CLOSE_PARENTHESIS};Dn.OPERATORS={AND:Oi.Operators.AND,OR:Oi.Operators.OR,XOR:Oi.Operators.XOR,NOT:Oi.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 gv=O(kn=>{"use strict";var np=kn&&kn.__assign||function(){return np=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},np.apply(this,arguments)};kn.__esModule=!0;var yv=Qr(),As=rp();kn.createResult=function(r,e,t){return{token:np({name:r},e!==null?{value:e}:{}),remainingString:t}};kn.getComment=function(r){for(var e=r.length,t=0;t<r.length;t+=1){var n=r[t];if(n===As.EOL){e=t;break}}return kn.createResult(yv.Tokens.COMMENT,r.slice(0,e),r.slice(e+1))};kn.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===As.QUOTED_IDENTIFIER_DELIMITER?e?t=t.slice(-1)+As.QUOTED_IDENTIFIER_DELIMITER:n=s:(a===As.ESCAPE_CHARACTER?e=!0:e=!1,t=t+=a);else{if(!As.SEPARATORS.has(a)&&!As.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 "+As.QUOTED_IDENTIFIER_DELIMITER+" character");return kn.createResult(yv.Tokens.IDENTIFIER,t,r.slice(n+1))}});var _v=O(sp=>{"use strict";sp.__esModule=!0;var Mi=Qr(),ur=rp(),Ri=gv();sp.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(!ur.SEPARATORS.has(a)){var o=ur.STRUCTURAL_CHARACTERS[a];if(o){var l=r[s+1];if(o===Mi.StructuralCharacters.CLOSE_PARENTHESIS&&l&&!ur.SEPARATORS.has(l)&&l!==Mi.StructuralCharacters.CLOSE_PARENTHESIS)throw new Error("Unexpected character: "+l+". A closing parenthesis should be followed by another closing parenthesis or whitespace");return Ri.createResult(Mi.Tokens.STRUCTURAL_CHARACTER,ur.STRUCTURAL_CHARACTERS[a],r.slice(s+1))}if(a===ur.QUOTED_IDENTIFIER_DELIMITER)return Ri.getQuotedIdentifier(r.slice(s+1));if(a===ur.COMMENT_DELIMITER)return Ri.getComment(r.slice(s+1));e=s}}else if(ur.SEPARATORS.has(a)||ur.STRUCTURAL_CHARACTERS[a]){t=s,n=a;break}else if(a===ur.QUOTED_IDENTIFIER_DELIMITER||a===ur.COMMENT_DELIMITER)throw new Error("Unexpected character: "+a)}if(e!==null){t=t!=null?t:r.length;var c=r.slice(e,t),h=r.slice(t);if(ur.OPERATORS[c]){if(n&&!ur.SEPARATORS.has(n))throw new Error("Unexpected character: "+n+". Operators should be separated using whitespace");return Ri.createResult(Mi.Tokens.OPERATOR,ur.OPERATORS[c],h)}else return Ri.createResult(Mi.Tokens.IDENTIFIER,c,h)}return Ri.createResult(Mi.Tokens.EOF,null,"")}});var Tv=O(En=>{"use strict";var fF=En&&En.__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};En.__esModule=!0;var hF=_v(),xi=Qr(),sl=tp();En.newTokenGenerator=function(r){var e=r;return function(t,n){for(n===void 0&&(n=!1);;){var s=hF.lex(e),a=s.token,o=s.remainingString;if(e=o,a.name!==xi.Tokens.COMMENT)return En.validateToken(a,t,n),a}}};En.getValue=function(r,e){var t=r(sl.VALID_TOKENS.identifierOrNot),n=t.value===xi.Operators.NOT;n&&(t=r(sl.VALID_TOKENS.identifierOnly));var s=t.name===xi.Tokens.STRUCTURAL_CHARACTER?e(r,!0):[t];return n?fF(s,[{name:xi.Tokens.OPERATOR,value:xi.Operators.NOT}]):s};En.previousOperatorTakesPrecedent=function(r,e){return sl.OPERATOR_PRECEDENCE[r]<=sl.OPERATOR_PRECEDENCE[e]};En.validateToken=function(r,e,t){if(t===void 0&&(t=!1),r.name===xi.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 ap=O(oo=>{"use strict";var Pi=oo&&oo.__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};oo.__esModule=!0;var bv=Qr(),vv=tp(),il=Tv();oo.parse=function(r){if(typeof r!="string")throw new Error("Expected string but received "+typeof r);var e=il.newTokenGenerator(r);return ip(e)};var ip=function(r,e){e===void 0&&(e=!1);for(var t=Pi(il.getValue(r,ip)),n=[];;){var s=e?vv.VALID_TOKENS.binaryOperatorOrClose:vv.VALID_TOKENS.binaryOperator,a=r(s,!e);if(a.name===bv.Tokens.EOF||a.name===bv.Tokens.STRUCTURAL_CHARACTER)return Pi(t,Pi(n).reverse());for(;n.length;){var o=n[n.length-1]||null;if(o&&il.previousOperatorTakesPrecedent(o.value,a.value))t=Pi(t,[o]),n=n.slice(0,-1);else break}n=Pi(n,[a]),t=Pi(t,il.getValue(r,ip))}}});var op=O(Sn=>{"use strict";Sn.__esModule=!0;var wv=Qr();Sn.andUtil=function(r,e){return r&&e};Sn.orUtil=function(r,e){return r||e};Sn.xorUtil=function(r,e){return r!==e};Sn.notUtil=function(r){return!r};Sn.isIdentifier=function(r){var e=r.name,t=r.value;return e===wv.Tokens.IDENTIFIER&&typeof t=="string"};Sn.isOperator=function(r){var e=r.name,t=r.value;return e===wv.Tokens.OPERATOR&&typeof t=="string"};Sn.throwInvalidExpression=function(r){throw new TypeError("Invalid postfix expression: "+r)}});var Dv=O(cp=>{"use strict";var uo;cp.__esModule=!0;var up=Qr(),lp=op();cp.OPERATOR_MAP=(uo={},uo[up.Operators.AND]=lp.andUtil,uo[up.Operators.OR]=lp.orUtil,uo[up.Operators.XOR]=lp.xorUtil,uo)});var Ev=O(Cs=>{"use strict";var dp=Cs&&Cs.__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};Cs.__esModule=!0;var pF=ap(),kv=Qr(),mF=Dv(),Ns=op();Cs.getEvaluator=function(r){var e=pF.parse(r);return function(t){return Cs.evaluate(e,t)}};Cs.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&&(Ns.isIdentifier(s)||Ns.isOperator(s))))throw new Error("Invalid token: "+s+". Found in parsed expression at index "+a);if(s.name===kv.Tokens.IDENTIFIER)return dp(n,[Boolean(e[s.value])]);var o=n[n.length-2],l=n[n.length-1];if(s.value===kv.Operators.NOT)return l===void 0&&Ns.throwInvalidExpression("missing identifier"),dp(n.slice(0,-1),[Ns.notUtil(l)]);(l===void 0||o===void 0)&&Ns.throwInvalidExpression("missing identifier");var c=mF.OPERATOR_MAP[s.value];return c||Ns.throwInvalidExpression("unknown operator"),dp(n.slice(0,-2),[c(o,l)])},[]);return t.length!==1&&Ns.throwInvalidExpression("too many identifiers after evaluation"),t[0]}});var Ov=O(lo=>{"use strict";lo.__esModule=!0;var Sv=Ev();lo.getEvaluator=Sv.getEvaluator;lo.evaluate=Sv.evaluate;var yF=ap();lo.parse=yF.parse});var vF={};OD(vF,{default:()=>pl});module.exports=MD(vF);var Gv=require("obsidian");var mi=require("obsidian");var DF=new Error("timeout while waiting for mutex to become available"),kF=new Error("mutex already locked"),RD=new Error("request for lock canceled"),xD=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(m){try{h(n.next(m))}catch(g){o(g)}}function c(m){try{h(n.throw(m))}catch(g){o(g)}}function h(m){m.done?a(m.value):s(m.value).then(l,c)}h((n=n.apply(r,e||[])).next())})},Al=class{constructor(e,t=RD){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 xD(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]=[])}},PD=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(m){try{h(n.next(m))}catch(g){o(g)}}function c(m){try{h(n.throw(m))}catch(g){o(g)}}function h(m){m.done?a(m.value):s(m.value).then(l,c)}h((n=n.apply(r,e||[])).next())})},Mo=class{constructor(e){this._semaphore=new Al(1,e)}acquire(){return PD(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 vu=In(pt()),ui=In(bu());var Ts=In(bu()),sr=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 sr((0,Ts.default)().startOf(t).startOf("day"),(0,Ts.default)().endOf(t).startOf("day"))}static buildInvalid(){return new sr(Ts.default.invalid(),Ts.default.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(e){let t=Ts.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=Ts.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 wr=class{static parseDate(e,t=!1){return(0,ui.default)(vu.parseDate(e,void 0,{forwardDate:t})).startOf("day")}static parseDateRange(e){let t=[wr.parseRelativeDateRange,wr.parseNumberedDateRange,wr.parseAbsoluteDateRange];for(let n of t){let s=n(e);if(s.isValid())return s}return sr.buildInvalid()}static parseAbsoluteDateRange(e){let t=vu.parse(e,void 0,{forwardDate:!0});if(t.length===0)return sr.buildInvalid();let n=t[0].start,s=t[1]&&t[1].start?t[1].start:n,a=(0,ui.default)(n.date()),o=(0,ui.default)(s.date());return new sr(a,o)}static parseRelativeDateRange(e){let t=/(last|this|next) (week|month|quarter|year)/,n=e.match(t);if(n&&n.length===3){let s=n[1],a=n[2],o=sr.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return sr.buildInvalid()}static parseNumberedDateRange(e){let t=[[/^\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[n,s,a]of t){let o=e.match(n);if(o){let l=o[0].trim();return new sr((0,ui.default)(l,s).startOf(a),(0,ui.default)(l,s).endOf(a))}}return sr.buildInvalid()}};var KC={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"};function li(r){for(let[e,t]of Object.entries(KC))r=r.replace(RegExp(`\\b${e}\\s`,"i"),t);return r}var wu=["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(wu.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=wu[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},ir=function(r){return typeof r=="number"},kh=function(r){return typeof r=="string"&&wu.includes(r)},At=Array.isArray,Dr=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(At(r))for(;t<e;t++)n[t]=[].concat(r);else for(;t<e;t++)n[t]=r;return n},xT=function(r){return At(r)?r:[r]};function bs(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 PT=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},Du=function(r,e){return{div:Math.floor(r/e),mod:Lt(r,e)}},ar=function(r){return!He(r)||r.length===0},st=function(r){return!ar(r)},Ee=function(r,e){return st(r)&&r.indexOf(e)!==-1};var $n;(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[bs(n.getUTCFullYear().toString(),4,"0"),bs(n.getUTCMonth()+1,2,"0"),bs(n.getUTCDate(),2,"0"),"T",bs(n.getUTCHours(),2,"0"),bs(n.getUTCMinutes(),2,"0"),bs(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))}})($n||($n={}));var se=$n;var ZC=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=ZC;var eb=In(JT(),1),{__extends:di,__assign:Bt,__rest:cY,__decorate:dY,__param:fY,__metadata:hY,__awaiter:pY,__generator:mY,__exportStar:yY,__createBinding:gY,__values:_Y,__read:TY,__spread:bY,__spreadArrays:vY,__spreadArray:U,__await:wY,__asyncGenerator:DY,__asyncDelegator:kY,__asyncValues:EY,__makeTemplateObject:SY,__importStar:OY,__importDefault:MY,__classPrivateFieldGet:RY,__classPrivateFieldSet:xY,__classPrivateFieldIn:PY}=eb.default;var XC=function(r){di(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),Sh=XC;var QC={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}},vs=QC;var tb=function(r,e){return r.indexOf(e)!==-1},JC=function(r){return r.toString()},eI=function(r,e,t){return"".concat(e," ").concat(t,", ").concat(r)},tI=function(){function r(e,t,n,s){if(t===void 0&&(t=JC),n===void 0&&(n=vs),s===void 0&&(s=eI),this.text=[],this.language=n||vs,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(m,g){return m-g}),o.sort(function(m,g){return g-m}),this.bymonthday=a.concat(o),this.bymonthday.length||(this.bymonthday=null)}if(He(this.origOptions.byweekday)){var l=At(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],c=String(l);this.byweekday={allWeeks:l.filter(function(m){return!m.n}),someWeeks:l.filter(function(m){return Boolean(m.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 h=function(m,g){return m.weekday-g.weekday};this.byweekday.allWeeks.sort(h),this.byweekday.someWeeks.sort(h),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return 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(tb(["dtstart","wkst","freq"],n))return!0;if(!tb(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=ir(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=","),At(e)||(e=[e]);var o=function(c,h,m){for(var g="",T=0;T<c.length;T++)T!==0&&(T===c.length-1?g+=" "+m+" ":g+=h+" "),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=tI;var rI=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 Ga(r,e){e===void 0&&(e=vs);var t={},n=new rI(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 S=n.symbol.substr(0,2).toUpperCase();if(t.byweekday=[X[S]],!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()}m(),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"),S=n.accept("the");if(!!(T||S))do{var v=h(),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 S=n.acceptNumber();if(!S)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(t.byhour=[parseInt(S[0],10)];n.accept("comma");){if(S=n.acceptNumber(),!S)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");t.byhour.push(parseInt(S[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 h(){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 m(){n.accept("on"),n.accept("the");var T=h();if(!!T)for(t.bymonthday=[T],n.nextSymbol();n.accept("comma");){if(T=h(),!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 Ba(r){return r<_e.HOURLY}var rb=function(r,e){return e===void 0&&(e=vs),new X(Ga(r,e)||void 0)},fi=["count","until","interval","byweekday","bymonthday","bymonth"];Br.IMPLEMENTED=[];Br.IMPLEMENTED[_e.HOURLY]=fi;Br.IMPLEMENTED[_e.MINUTELY]=fi;Br.IMPLEMENTED[_e.DAILY]=["byhour"].concat(fi);Br.IMPLEMENTED[_e.WEEKLY]=fi;Br.IMPLEMENTED[_e.MONTHLY]=fi;Br.IMPLEMENTED[_e.YEARLY]=["byweekno","byyearday"].concat(fi);var nb=function(r,e,t,n){return new Br(r,e,t,n).toString()},sb=Br.isFullyConvertible;var hi=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 ib=function(r){di(e,r);function e(t,n,s,a,o,l,c){var h=r.call(this,a,o,l,c)||this;return h.year=t,h.month=n,h.day=s,h}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 $n.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=Du(this.hour,24),o=a.div,l=a.mod;if(o&&(this.hour=l,this.addDaily(o)),ar(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=Du(this.minute,60),l=o.div,c=o.mod;if(l&&(this.minute=c,this.addHours(l,!1,s)),(ar(s)||Ee(s,this.hour))&&(ar(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=Du(this.second,60),c=l.div,h=l.mod;if(c&&(this.second=h,this.addMinutes(c,!1,s,a)),(ar(s)||Ee(s,this.hour))&&(ar(a)||Ee(a,this.minute))&&(ar(o)||Ee(o,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var t=$n.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>$n.MAXYEAR))return;t=$n.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,h=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,h)}},e}(hi);function Oh(r){for(var e=[],t=Object.keys(r),n=0,s=t;n<s.length;n++){var a=s[n];Ee(ub,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 Bt({},r)}function ab(r){var e=Bt(Bt({},Ha),Oh(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)?ir(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=X.MO.weekday,He(e.bysetpos)){ir(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)&&!At(e.bymonth)&&(e.bymonth=[e.bymonth]),He(e.byyearday)&&!At(e.byyearday)&&ir(e.byyearday)&&(e.byyearday=[e.byyearday]),!He(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(At(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)&&!At(e.byweekno)&&(e.byweekno=[e.byweekno]),!He(e.byweekday))e.bynweekday=null;else if(ir(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(kh(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(ir(c)){o.push(c);continue}else if(kh(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)?ir(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<X.HOURLY?[e.dtstart.getUTCHours()]:null,He(e.byminute)?ir(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<X.MINUTELY?[e.dtstart.getUTCMinutes()]:null,He(e.bysecond)?ir(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<X.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function ob(r){var e=r.dtstart.getTime()%1e3;if(!Ba(r.freq))return[];var t=[];return r.byhour.forEach(function(n){r.byminute.forEach(function(s){r.bysecond.forEach(function(a){t.push(new hi(n,s,a,e))})})}),t}function Va(r){var e=r.split(`
`).map(nI).filter(function(t){return t!==null});return Bt(Bt({},e[0]),e[1])}function za(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 nI(r){if(r=r.replace(/^\s+|\s+$/,""),!r.length)return null;var e=/^([A-Z]+?)[:;]/.exec(r.toUpperCase());if(!e)return lb(r);var t=e[1];switch(t.toUpperCase()){case"RRULE":case"EXRULE":return lb(r);case"DTSTART":return za(r);default:throw new Error("Unsupported RFC prop ".concat(t," in ").concat(r))}}function lb(r){var e=r.replace(/^RRULE:/i,""),t=za(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=kr[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=sI(l),h=o.toLowerCase();t[h]=c;break;case"BYWEEKDAY":case"BYDAY":t.byweekday=iI(l);break;case"DTSTART":case"TZID":var m=za(r);t.tzid=m.tzid,t.dtstart=m.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 sI(r){if(r.indexOf(",")!==-1){var e=r.split(",");return e.map(cb)}return cb(r)}function cb(r){return/^[+-]?\d+$/.test(r)?Number(r):r}function iI(r){var e=r.split(",");return e.map(function(t){if(t.length===2)return kr[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=kr[a].weekday;return new lt(o,s)})}var ws=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 Ka(r){for(var e=[],t="",n=Object.keys(r),s=Object.keys(Ha),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)||At(l)&&!l.length)){switch(o){case"FREQ":c=X.FREQUENCIES[r.freq];break;case"WKST":ir(l)?c=new lt(l).toString():c=l.toString();break;case"BYWEEKDAY":o="BYDAY",c=xT(l).map(function(S){return S instanceof lt?S:At(S)?new lt(S[0],S[1]):new lt(S)}).toString();break;case"DTSTART":t=aI(l,r.tzid);break;case"UNTIL":c=se.timeToUntilString(l,!r.tzid);break;default:if(At(l)){for(var h=[],m=0;m<l.length;m++)h[m]=String(l[m]);c=h.toString()}else c=String(l)}c&&e.push([o,c])}}var g=e.map(function(S){var v=S[0],R=S[1];return"".concat(v,"=").concat(R.toString())}).join(";"),T="";return g!==""&&(T="RRULE:".concat(g)),[t,T].filter(function(S){return!!S}).join(`
`)}function aI(r,e){return r?"DTSTART"+new ws(new Date(r),e).toString():""}function oI(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 db=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(m){for(var g=0;g<s.length;g++){var T=s[g];if(!oI(t[T],m[T]))return!0}return!1},o=this[e];if(e==="all")n=this.all;else if(At(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 h=new _n(e,t),l=0;l<this.all.length&&h.accept(this.all[l]);l++);n=h.getValue(),this._cacheAdd(e,n,t)}return At(n)?se.cloneDates(n):n instanceof Date?se.clone(n):n},r}();var fb=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),hb=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),uI=Dr(1,29),lI=Dr(1,30),Gn=Dr(1,31),Yt=Dr(1,32),pb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Yt,!0),lI,!0),Yt,!0),Gn,!0),Yt,!0),Gn,!0),Yt,!0),Yt,!0),Gn,!0),Yt,!0),Gn,!0),Yt,!0),Yt.slice(0,7),!0),mb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Yt,!0),uI,!0),Yt,!0),Gn,!0),Yt,!0),Gn,!0),Yt,!0),Yt,!0),Gn,!0),Yt,!0),Gn,!0),Yt,!0),Yt.slice(0,7),!0),cI=Dr(-28,0),dI=Dr(-29,0),Bn=Dr(-30,0),Ut=Dr(-31,0),yb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Ut,!0),dI,!0),Ut,!0),Bn,!0),Ut,!0),Bn,!0),Ut,!0),Ut,!0),Bn,!0),Ut,!0),Bn,!0),Ut,!0),Ut.slice(0,7),!0),gb=U(U(U(U(U(U(U(U(U(U(U(U(U([],Ut,!0),cI,!0),Ut,!0),Bn,!0),Ut,!0),Bn,!0),Ut,!0),Ut,!0),Bn,!0),Ut,!0),Bn,!0),Ut,!0),Ut.slice(0,7),!0),_b=[0,31,60,91,121,152,182,213,244,274,305,335,366],Tb=[0,31,59,90,120,151,181,212,243,273,304,334,365],Mh=function(){for(var r=[],e=0;e<55;e++)r=r.concat(Dr(7));return r}();function bb(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=Bt(Bt({yearlen:n,nextyearlen:s,yearordinal:a,yearweekday:o},fI(r)),{wnomask:null});if(ar(e.byweekno))return l;l.wnomask=we(0,n+7);var c,h,m=c=Lt(7-o+e.wkst,7);m>=4?(m=0,h=l.yearlen+Lt(o-e.wkst,7)):h=n-m;for(var g=Math.floor(h/7),T=Lt(h,7),S=Math.floor(g+T/4),v=0;v<e.byweekno.length;v++){var R=e.byweekno[v];if(R<0&&(R+=S+1),R>0&&R<=S){var C=void 0;R>1?(C=m+(R-1)*7,m!==c&&(C-=7-c)):C=m;for(var $=0;$<7&&(l.wnomask[C]=1,C++,l.wdaymask[C]!==e.wkst);$++);}}if(Ee(e.byweekno,1)){var C=m+S*7;if(m!==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(m){var B=void 0;if(Ee(e.byweekno,-1))B=-1;else{var W=se.getWeekday(new Date(Date.UTC(r-1,0,1))),De=Lt(7-W.valueOf()+e.wkst,7),Te=se.isLeapYear(r-1)?366:365,be=void 0;De>=4?(De=0,be=Te+Lt(W-e.wkst,7)):be=n-m,B=Math.floor(52+Lt(be,7)/4)}if(Ee(e.byweekno,B))for(var C=0;C<m;C++)l.wnomask[C]=1}return l}function fI(r){var e=se.isLeapYear(r)?366:365,t=new Date(Date.UTC(r,0,1)),n=se.getWeekday(t);return e===365?{mmask:fb,mdaymask:mb,nmdaymask:gb,wdaymask:Mh.slice(n),mrange:Tb}:{mmask:hb,mdaymask:pb,nmdaymask:yb,wdaymask:Mh.slice(n),mrange:_b}}function vb(r,e,t,n,s,a){var o={lastyear:r,lastmonth:e,nwdaymask:[]},l=[];if(a.freq===X.YEARLY)if(ar(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(ar(l))return o;o.nwdaymask=we(0,t);for(var c=0;c<l.length;c++)for(var h=l[c],m=h[0],g=h[1]-1,T=0;T<a.bynweekday.length;T++){var S=void 0,v=a.bynweekday[T],R=v[0],C=v[1];C<0?(S=g+(C+1)*7,S-=Lt(s[S]-R,7)):(S=m+(C-1)*7,S+=Lt(7-s[S]+R,7)),m<=S&&S<=g&&(o.nwdaymask[S]=1)}return o}function wb(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),h=Math.floor(19*t+n-a-c+15)%30,m=Math.floor(s/4),g=s%4,T=Math.floor(32+2*o+2*m-h-g)%7,S=Math.floor((t+11*h+22*T)/451),v=Math.floor((h+T-7*S+114)/31),R=(h+T-7*S+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 hI=function(){function r(e){this.options=e}return r.prototype.rebuild=function(e,t){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=bb(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=vb(e,t,a,o,l,n)}He(n.byeaster)&&(this.eastermask=wb(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[Dr(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 hi(e,t,o,s)});return se.sort(a),a},r.prototype.stimeset=function(e,t,n,s){return[new hi(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}(),Db=hI;function kb(r,e,t,n,s,a){for(var o=[],l=0;l<r.length;l++){var c=void 0,h=void 0,m=r[l];m<0?(c=Math.floor(m/e.length),h=Lt(m,e.length)):(c=Math.floor((m-1)/e.length),h=Lt(m-1,e.length));for(var g=[],T=t;T<n;T++){var S=a[T];!He(S)||g.push(S)}var v=void 0;c<0?v=g.slice(c)[0]:v=g[c];var R=e[h],C=se.fromOrdinal(s.yearordinal+v),$=se.combine(C,R);Ee(o,$)||o.push($)}return se.sort(o),o}function Ou(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=ib.fromDate(t),h=new Db(e);h.rebuild(c.year,c.month);for(var m=yI(h,c,e);;){var g=h.getdayset(n)(c.year,c.month,c.day),T=g[0],S=g[1],v=g[2],R=mI(T,S,v,h,e);if(st(o))for(var C=kb(o,m,S,v,h,T),$=0;$<C.length;$++){var B=C[$];if(a&&B>a)return Tn(r);if(B>=t){var W=Eb(B,e);if(!r.accept(W)||l&&(--l,!l))return Tn(r)}}else for(var $=S;$<v;$++){var De=T[$];if(!!He(De))for(var Te=se.fromOrdinal(h.yearordinal+De),be=0;be<m.length;be++){var ee=m[be],B=se.combine(Te,ee);if(a&&B>a)return Tn(r);if(B>=t){var W=Eb(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);Ba(n)||(m=h.gettimeset(n)(c.hour,c.minute,c.second,0)),h.rebuild(c.year,c.month)}}function pI(r,e,t){var n=t.bymonth,s=t.byweekno,a=t.byweekday,o=t.byeaster,l=t.bymonthday,c=t.bynmonthday,h=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(h)&&(e<r.yearlen&&!Ee(h,e+1)&&!Ee(h,-r.yearlen+e)||e>=r.yearlen&&!Ee(h,e+1-r.yearlen)&&!Ee(h,-r.nextyearlen+e-r.yearlen))}function Eb(r,e){return new ws(r,e.tzid).rezonedDate()}function Tn(r){return r.getValue()}function mI(r,e,t,n,s){for(var a=!1,o=e;o<t;o++){var l=r[o];a=pI(n,l,s),a&&(r[l]=null)}return a}function yI(r,e,t){var n=t.freq,s=t.byhour,a=t.byminute,o=t.bysecond;return Ba(n)?ob(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 kr={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)},Ha={freq:_e.YEARLY,dtstart:null,interval:1,wkst:kr.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},ub=Object.keys(Ha),X=function(){function r(e,t){e===void 0&&(e={}),t===void 0&&(t=!1),this._cache=t?null:new db,this.origOptions=Oh(e);var n=ab(e).parsedOptions;this.options=n}return r.parseText=function(e,t){return Ga(e,t)},r.fromText=function(e,t){return rb(e,t)},r.fromString=function(e){return new r(r.parseString(e)||void 0)},r.prototype._iter=function(e){return Ou(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 Sh("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 Sh("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 Ka(this.origOptions)},r.prototype.toText=function(e,t,n){return nb(this,e,t,n)},r.prototype.isFullyConvertibleToText=function(){return sb(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=kr.MO,r.TU=kr.TU,r.WE=kr.WE,r.TH=kr.TH,r.FR=kr.FR,r.SA=kr.SA,r.SU=kr.SU,r.parseString=Va,r.optionsToString=Ka,r}();function Sb(r,e,t,n,s,a){var o={},l=r.accept;function c(T,S){t.forEach(function(v){v.between(T,S,!0).forEach(function(R){o[Number(R)]=!0})})}s.forEach(function(T){var S=new ws(T,a).rezonedDate();o[Number(S)]=!0}),r.accept=function(T){var S=Number(T);return isNaN(S)?l.call(this,T):!o[S]&&(c(new Date(S-1),new Date(S+1)),!o[S])?(o[S]=!0,l.call(this,T)):!0},r.method==="between"&&(c(r.args.after,r.args.before),r.accept=function(T){var S=Number(T);return o[S]?!0:(o[S]=!0,l.call(this,T))});for(var h=0;h<n.length;h++){var m=new ws(n[h],a).rezonedDate();if(!r.accept(new Date(m.getTime())))break}e.forEach(function(T){Ou(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 Ob={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function gI(r,e){var t=[],n=[],s=[],a=[],o=za(r),l=o.dtstart,c=o.tzid,h=wI(r,e.unfold);return h.forEach(function(m){var g;if(!!m){var T=vI(m),S=T.name,v=T.parms,R=T.value;switch(S.toUpperCase()){case"RRULE":if(v.length)throw new Error("unsupported RRULE parm: ".concat(v.join(",")));t.push(Va(m));break;case"RDATE":var C=(g=/RDATE(?:;TZID=([^:=]+))?/i.exec(m))!==null&&g!==void 0?g:[],$=C[1];$&&!c&&(c=$),n=n.concat(Mb(R,v));break;case"EXRULE":if(v.length)throw new Error("unsupported EXRULE parm: ".concat(v.join(",")));s.push(Va(R));break;case"EXDATE":a=a.concat(Mb(R,v));break;case"DTSTART":break;default:throw new Error("unsupported property: "+S)}}}),{dtstart:l,tzid:c,rrulevals:t,rdatevals:n,exrulevals:s,exdatevals:a}}function _I(r,e){var t=gI(r,e),n=t.rrulevals,s=t.rdatevals,a=t.exrulevals,o=t.exdatevals,l=t.dtstart,c=t.tzid,h=e.cache===!1;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||n.length>1||s.length||a.length||o.length){var m=new xh(h);return m.dtstart(l),m.tzid(c||void 0),n.forEach(function(T){m.rrule(new X(Rh(T,l,c),h))}),s.forEach(function(T){m.rdate(T)}),a.forEach(function(T){m.exrule(new X(Rh(T,l,c),h))}),o.forEach(function(T){m.exdate(T)}),e.compatible&&e.dtstart&&m.rdate(l),m}var g=n[0]||{};return new X(Rh(g,g.dtstart||e.dtstart||l,g.tzid||e.tzid||c),h)}function Mu(r,e){return e===void 0&&(e={}),_I(r,TI(e))}function Rh(r,e,t){return Bt(Bt({},r),{dtstart:e,tzid:t})}function TI(r){var e=[],t=Object.keys(r),n=Object.keys(Ob);if(t.forEach(function(s){Ee(n,s)||e.push(s)}),e.length)throw new Error("Invalid options: "+e.join(", "));return Bt(Bt({},Ob),r)}function bI(r){if(r.indexOf(":")===-1)return{name:"RRULE",value:r};var e=PT(r,":",1),t=e[0],n=e[1];return{name:t,value:n}}function vI(r){var e=bI(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 wI(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 DI(r){r.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function Mb(r,e){return DI(e),r.split(",").map(function(t){return se.untilStringToDate(t)})}function Rb(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 xh=function(r){di(e,r);function e(t){t===void 0&&(t=!1);var n=r.call(this,{},t)||this;return n.dtstart=Rb.apply(n,["dtstart"]),n.tzid=Rb.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(t){return Sb(t,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(t){xb(t,this._rrule)},e.prototype.exrule=function(t){xb(t,this._exrule)},e.prototype.rdate=function(t){Pb(t,this._rdate)},e.prototype.exdate=function(t){Pb(t,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(t){return Mu(t.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(t){return Mu(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(Ka({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(Ab("RDATE",this._rdate,this.tzid())),this._exdate.length&&t.push(Ab("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 xb(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 Pb(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 Ab(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 h=null;s?h=window.moment(s):n?h=window.moment(n):t&&(h=window.moment(t)),!l&&h!==null?c.dtstart=window.moment(h).startOf("day").utc(!0).toDate():c.dtstart=window.moment().startOf("day").utc(!0).toDate();let m=new X(c);return new St({rrule:m,baseOnToday:l,referenceDate:h,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(er(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 Nb(r){let e=`${r.startDateSymbol}${r.scheduledDateSymbol}${r.dueDateSymbol}`;return(t,n,s)=>{let a=[];a=a.concat(EI(t,n,s,e)),a=a.concat(SI(t,n,s,r.recurrenceSymbol));let o=kI(t,s,r),l=Ph(t,/([a-zA-Z'_-]*)/g,n),c=!1;if(l&&l.length>0){let h=l[0];if(h.length>=Math.max(1,s.autoSuggestMinMatch)){let m=o.filter(g=>g.displayText.toLowerCase().includes(h.toLowerCase()));for(let g of m)a.push({suggestionType:"match",displayText:g.displayText,appendText:g.appendText,insertAt:l.index,insertSkip:h.length}),c=!0}}return!c&&s.autoSuggestMinMatch===0&&(a=a.concat(o)),a.length>0&&!a.some(h=>h.suggestionType==="match")&&a.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:`
`}),a=a.slice(0,s.autoSuggestMaxItems),a}}function kI(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=wr.parseDate("today",!0).format(ie.dateFormat);s.push({displayText:`${t.createdDateSymbol} created today (${o})`,appendText:`${t.createdDateSymbol} ${o} `})}return s}function EI(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=Ph(r,o,e);if(l&&l.length>=2){let c=l[1],h=l[2];if(h.length<t.autoSuggestMinMatch)return[];let m=h&&h.length>1?wr.parseDate(li(h),!0):null;m&&m.isValid()&&a.push({displayText:`${m.format(ie.dateFormat)}`,appendText:`${c} ${m.format(ie.dateFormat)} `,insertAt:l.index,insertSkip:l[0].length});let g=1,T=5,S=s.filter(v=>h&&h.length>=g&&v.toLowerCase().includes(h.toLowerCase())).slice(0,T);S.length===0&&(S=s.slice(0,T));for(let v of S){let C=`${wr.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 SI(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=Ph(r,o,e);if(l&&l.length>=2){let h=l[1],m=l[2];if(m.length<t.autoSuggestMinMatch)return[];if(m.length>0){let v=(c=St.fromText({recurrenceRuleText:m,startDate:null,scheduledDate:null,dueDate:null}))==null?void 0:c.toText();if(v){let R=`${h} ${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,S=s.filter(v=>m&&m.length>=g&&v.toLowerCase().includes(m.toLowerCase())).slice(0,T);S.length===0&&m.trim().length===0&&(S=s.slice(0,T));for(let v of S)a.push({suggestionType:"match",displayText:`${v}`,appendText:`${h} ${v} `,insertAt:l.index,insertSkip:l[0].length})}return a}function Ph(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 Za=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}},Hn=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 Za,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 Ah={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}},Xa=class{constructor(e){this.symbols=e}serialize(e){let t=new Hn,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:h,dueDateSymbol:m}=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?" "+m:` ${m} ${e.dueDate.format(ie.dateFormat)}`:"";case"recurrenceRule":return e.recurrence?t.options.shortMode?" "+h:` ${h} ${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}'`)}}deserialize(e){let{prioritySymbols:t,TaskFormatRegularExpressions:n}=this.symbols,s,a="3",o=null,l=null,c=null,h=null,m=null,g="",T=null,S="",v=20,R=0;do{s=!1;let C=e.match(n.priorityRegex);if(C!==null){switch(C[1]){case t.Low:a="4";break;case t.Medium:a="2";break;case t.High:a="1";break}e=e.replace(n.priorityRegex,"").trim(),s=!0}let $=e.match(n.doneDateRegex);$!==null&&(h=window.moment($[1],ie.dateFormat),e=e.replace(n.doneDateRegex,"").trim(),s=!0);let B=e.match(n.dueDateRegex);B!==null&&(c=window.moment(B[1],ie.dateFormat),e=e.replace(n.dueDateRegex,"").trim(),s=!0);let W=e.match(n.scheduledDateRegex);W!==null&&(l=window.moment(W[1],ie.dateFormat),e=e.replace(n.scheduledDateRegex,"").trim(),s=!0);let De=e.match(n.startDateRegex);De!==null&&(o=window.moment(De[1],ie.dateFormat),e=e.replace(n.startDateRegex,"").trim(),s=!0);let Te=e.match(n.createdDateRegex);Te!==null&&(m=window.moment(Te[1],ie.dateFormat),e=e.replace(n.createdDateRegex,"").trim(),s=!0);let be=e.match(n.recurrenceRegex);be!==null&&(g=be[1].trim(),e=e.replace(n.recurrenceRegex,"").trim(),s=!0);let ee=e.match(ie.hashTagsFromEnd);if(ee!=null){e=e.replace(ie.hashTagsFromEnd,"").trim(),s=!0;let te=ee[0].trim();S=S.length>0?[te,S].join(" "):te}R++}while(s&&R<=v);return g.length>0&&(T=St.fromText({recurrenceRuleText:g,startDate:o,scheduledDate:l,dueDate:c})),S.length>0&&(e+=" "+S),{description:e,priority:a,startDate:o,createdDate:m,scheduledDate:l,dueDate:c,doneDate:h,recurrence:T,tags:$e.extractHashtags(e)}}};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 Zt=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 Zt(new Ot("x","Done"," ",!0,"DONE"))}static makeEmpty(){return new Zt(new Ot("","EMPTY","",!0,"EMPTY"))}static makeTodo(){return new Zt(new Ot(" ","Todo","x",!0,"TODO"))}static makeCancelled(){return new Zt(new Ot("-","Cancelled"," ",!0,"CANCELLED"))}static makeInProgress(){return new Zt(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 Zt(new Ot(e,"Unknown","x",!1,"TODO"))}static createFromImportedValue(e){let t=e[0],n=Zt.getTypeFromStatusTypeString(e[3]);return new Zt(new Ot(t,e[1],e[2],!1,n))}isCompleted(){return this.type==="DONE"}previewText(){let e="";return Zt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(e=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${e}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},fe=Zt;fe.DONE=Zt.makeDone(),fe.EMPTY=Zt.makeEmpty(),fe.TODO=Zt.makeTodo();var xu=class{constructor(e=!1,t=!1){this.ignoreSortInstructions=e,this.showTaskHiddenData=t}};var mt=class{constructor(){this.coreStatuses=[fe.makeTodo().configuration,fe.makeDone().configuration],this.customStatuses=[fe.makeInProgress().configuration,fe.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 fe(e);return t.findIndex(s=>new fe(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,fe.createFromImportedValue(s))}),n}static applyToStatusRegistry(e,t){t.clearStatuses(),e.coreStatuses.forEach(n=>{t.add(n)}),e.customStatuses.forEach(n=>{t.add(n)})}};var Cb=[{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 Cb.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 Pu(r){return r.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var Sr=class{static get(){let{globalFilter:e}=he();return e}static set(e){Nt({globalFilter:e})}static reset(){Nt({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)"+Pu(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}=he();return t?Sr.removeAsSubstringFrom(e):e}},Fe=Sr;Fe.empty="";var pi={tasksPluginEmoji:{displayName:"Default",taskSerializer:new Xa(Ah),buildSuggestions:Nb(Ah)}},MI={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 xu},zn=Ae({},MI),he=()=>{for(let r in zr.settingsFlags)zn.features[r]===void 0&&(zn.features[r]=zr.settingsFlags[r]);return zn.statusSettings.customStatuses.forEach((r,e,t)=>{var s,a;let n=fe.getTypeFromStatusTypeString(r.type);t[e]=new Ot((s=r.symbol)!=null?s:" ",r.name,(a=r.nextStatusSymbol)!=null?a:"x",r.availableAsCommand,n)}),Ae({},zn)},Nt=r=>(zn=Ae(Ae({},zn),r),he());var Ds=(r,e)=>(zn.generalSettings[r]=e,he()),Fb=r=>{var e;return(e=zn.features[r])!=null?e:!1};function Qa(){return pi[he().taskFormat]}var Ge=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:e})=>e!==fe.EMPTY.symbol)}static getInstance(){return Ge.instance||(Ge.instance=new Ge),Ge.instance}add(e){this.hasSymbol(e.symbol)||(e instanceof fe?this._registeredStatuses.push(e):this._registeredStatuses.push(new fe(e)))}bySymbol(e){return this.hasSymbol(e)?this.getSymbol(e):fe.EMPTY}bySymbolOrCreate(e){return this.hasSymbol(e)?this.getSymbol(e):fe.createUnknownStatus(e)}byName(e){return this._registeredStatuses.filter(({name:t})=>t===e).length>0?this._registeredStatuses.filter(({name:t})=>t===e)[0]:fe.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 fe.EMPTY}getNextStatusOrCreate(e){let t=this.getNextStatus(e);return t.type!=="EMPTY"?t:fe.createUnknownStatus(e.nextStatusSymbol)}findUnknownStatuses(e){let t=e.filter(a=>!this.hasSymbol(a.symbol)),n=new Ge,s=[];return t.forEach(a=>{if(n.hasSymbol(a.symbol))return;let o=Ge.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 fe(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(){[fe.makeTodo(),fe.makeInProgress(),fe.makeDone(),fe.makeCancelled()].forEach(t=>{this.add(t)})}};var vn=class{static calculate(e){let t=0;if(e.dueDate!==null){let n=Math.round(window.moment().diff(e.dueDate)/vn.milliSecondsPerDay),s;n>=7?s=1:n>=-14?s=(n+14)*.8/21+.2:s=.2,t+=s*vn.dueCoefficient}switch(e.scheduledDate!==null&&window.moment().isSameOrAfter(e.scheduledDate)&&(t+=1*vn.scheduledCoefficient),e.startDate!==null&&window.moment().isBefore(e.startDate)&&(t+=1*vn.startedCoefficient),e.priority){case"1":t+=1*vn.priorityCoefficient;break;case"2":t+=.65*vn.priorityCoefficient;break;case"3":t+=.325*vn.priorityCoefficient;break}return t}},bn=vn;bn.dueCoefficient=12,bn.scheduledCoefficient=5,bn.startedCoefficient=-3,bn.priorityCoefficient=6,bn.milliSecondsPerDay=1e3*60*60*24;var Bb=require("obsidian");var eo=require("obsidian");var Wb=In(bu()),RI=require("obsidian"),qb=In(Ub());var Nh=class extends qb.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 Ch(this,t,n)}onLogEntry(t){return this.on("log",t),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(t=>{let n=`[${(0,Wb.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)}},Au=new Nh,Ch=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 Fh,Lh,Yh,xI=["md"],Ja=Au.getLogger("tasks"),jb=({metadataCache:r,vault:e,workspace:t})=>{Fh=r,Lh=e,Yh=t},Nu=t=>J(void 0,[t],function*({originalTask:r,newTasks:e}){if(Lh===void 0||Fh===void 0||Yh===void 0){Uh("Tasks: cannot use File before initializing it.");return}Array.isArray(e)||(e=[e]),Ja.debug(`replaceTaskWithTasks entered. ${r.path}`),$b({originalTask:r,newTasks:e,vault:Lh,metadataCache:Fh,workspace:Yh,previousTries:0})});function Uh(r){console.error(r),new eo.Notice(r,15e3)}function Ih(r){console.warn(r),new eo.Notice(r,1e4)}function PI(r){Ja.debug(r)}var $b=o=>J(void 0,[o],function*({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a}){Ja.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.
`;Uh(C);return}let R=Math.min(Math.pow(10,a),100);Ja.debug(`timeout = ${R}`),setTimeout(()=>{$b({originalTask:r,newTasks:e,vault:t,metadataCache:n,workspace:s,previousTries:a+1})},R)},c=t.getAbstractFileByPath(r.path);if(!(c instanceof eo.TFile))return Ih(`Tasks: No file found for task ${r.description}. Retrying ...`),l();if(!xI.includes(c.extension)){Uh(`Tasks: Does not support files with the ${c.extension} file extension.`);return}let h=n.getFileCache(c);if(h==null||h===null)return Ih(`Tasks: No file cache found for file ${c.path}. Retrying ...`),l();let m=h.listItems;if(m===void 0||m.length===0)return Ih(`Tasks: No list items found in file cache of ${c.path}. Retrying ...`),l();let T=(yield t.read(c)).split(`
`),S=AI(r,T,m,PI);if(S===void 0)return l();let v=[...T.slice(0,S),...e.map(R=>R.toFileLineString()),...T.slice(S+1)];yield t.modify(c,v.join(`
`))});function Gb(r,e){return r<e.length}function AI(r,e,t,n){let s=NI(r,e);return s!==void 0||(s=CI(r,e),s!==void 0)?s:II(r,e,t,n)}function NI(r,e){let t=r.taskLocation.lineNumber;if(Gb(t,e)&&e[t]===r.originalMarkdown)return Ja.debug(`Found original markdown at original line number ${t}`),t}function CI(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 II(r,e,t,n){let s,a=0;for(let o of t){let l=o.position.start.line;if(!Gb(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 Vn={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:""},FI=7,LI="far";function YI(r,e,t){return J(this,null,function*(){yield Bb.MarkdownRenderer.renderMarkdown(r,e,t,null)})}function Hb(r,e,t=null){return J(this,null,function*(){var l;t||(t=YI);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 UI(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 h=r.toggle();Nu({originalTask:r,newTasks:h})}),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&&GI({task:r,element:s,isFilenameUnique:e.isFilenameUnique}),n})}function UI(r,e,t,n){return J(this,null,function*(){let s={},a=new Hn(e.layoutOptions),o=pi.tasksPluginEmoji.taskSerializer;for(let l of a.layoutComponents){let c=o.componentToString(r,a,l);if(c){l==="description"&&(c=Fe.removeAsSubstringFromDependingOnSettings(c));let h=document.createElement("span");if(t.appendChild(h),h){let m=document.createElement("span");h.appendChild(m),yield WI(m,c,l,r,n);let[g,T]=Wh(l,r);qI(l,m),h.classList.add(...g);for(let S in T)h.dataset[S]=T[S];s=Ae(Ae({},s),T)}}}for(let l of a.hiddenComponents){let[c,h]=Wh(l,r);s=Ae(Ae({},s),h)}if(s.taskPriority===void 0){let[l,c]=Wh("priority",r);s=Ae(Ae({},s),c)}return s})}function WI(r,e,t,n,s){return J(this,null,function*(){if(t==="description"){let{debugSettings:a}=he();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(h=>{h.hasChildNodes()||h.remove()}),r.querySelectorAll(".footnotes").forEach(h=>{h.remove()})}else r.innerHTML=e})}function Wh(r,e){let t=[],n={},s=(a,o)=>{let l=jI(a);l&&(n[o]=l)};switch(r){case"description":t.push(Vn.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(Vn.priority);break}case"createdDate":{let a=e.createdDate;a&&(t.push(Vn.createdDate),s(a,"taskCreated"));break}case"dueDate":{let a=e.dueDate;a&&(t.push(Vn.dueDate),s(a,"taskDue"));break}case"startDate":{let a=e.startDate;a&&(t.push(Vn.startDate),s(a,"taskStart"));break}case"scheduledDate":{let a=e.scheduledDate;a&&(t.push(Vn.scheduledDate),s(a,"taskScheduled"));break}case"doneDate":{let a=e.doneDate;a&&(t.push(Vn.doneDate),s(a,"taskDone"));break}case"recurrenceRule":{t.push(Vn.recurrenceRule);break}}return[t,n]}function qI(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=$I(s),o=t[n];a&&(o.dataset.tagName=a)}}}}function jI(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)<=FI?t+=Math.abs(n).toString()+"d":t+=LI,t)}function $I(r){let e=/["&\x00\r\n]/g,t=r.replace(e,"-");return t=t.replace(/^[-_]+/,""),t.length>0?t:null}function GI({task:r,element:e,isFilenameUnique:t}){let{recurrenceSymbol:n,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,dueDateSymbol:l,doneDateSymbol:c}=pi.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{let h=e.createDiv();h.addClasses(["tooltip","pop-up"]),r.recurrence&&h.createDiv().setText(`${n} ${r.recurrence.toText()}`),r.createdDate&&h.createDiv().setText(to({signifier:a,date:r.createdDate})),r.startDate&&h.createDiv().setText(to({signifier:s,date:r.startDate})),r.scheduledDate&&h.createDiv().setText(to({signifier:o,date:r.scheduledDate})),r.dueDate&&h.createDiv().setText(to({signifier:l,date:r.dueDate})),r.doneDate&&h.createDiv().setText(to({signifier:c,date:r.doneDate}));let m=r.getLinkText({isFilenameUnique:t});m&&h.createDiv().setText(`\u{1F517} ${m}`),e.addEventListener("mouseleave",()=>{h.remove()})})}function to({signifier:r,date:e}){return`${r} ${e.format(ie.dateFormat)} (${e.from(window.moment().startOf("day"))})`}var Xt=class{static fromPath(e){let{useFilenameAsScheduledDate:t,filenameAsDateFolders:n}=he();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 $e(er(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 $e(er(Ae({},s),{scheduledDateIsInferred:!1}))),s))}};var or=class{},ie=or;ie.dateFormat="YYYY-MM-DD",ie.indentationRegex=/^([\s\t>]*)/,ie.listMarkerRegex=/([-*]|[0-9]+\.)/,ie.checkboxRegex=/\[(.)\]/u,ie.afterCheckboxRegex=/ *(.*)/u,ie.taskRegex=new RegExp(or.indentationRegex.source+or.listMarkerRegex.source+" +"+or.checkboxRegex.source+or.afterCheckboxRegex.source,"u"),ie.nonTaskRegex=new RegExp(or.indentationRegex.source+or.listMarkerRegex.source+"? *("+or.checkboxRegex.source+")?"+or.afterCheckboxRegex.source,"u"),ie.listItemRegex=new RegExp(or.indentationRegex.source+or.listMarkerRegex.source),ie.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,ie.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]*/g,ie.hashTagsFromEnd=new RegExp(or.hashTags.source+"$");var $e=class{constructor({status:e,description:t,taskLocation:n,indentation:s,listMarker:a,priority:o,createdDate:l,startDate:c,scheduledDate:h,dueDate:m,doneDate:g,recurrence:T,blockLink:S,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=h,this.dueDate=m,this.doneDate=g,this.recurrence=T,this.blockLink=S,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],h=s[3],m=Ge.getInstance().bySymbolOrCreate(h),g=o.match(ie.blockLinkRegex),T=g!==null?g[0]:"";T!==""&&(o=o.replace(ie.blockLinkRegex,"").trim());let{taskSerializer:S}=Qa(),v=S.deserialize(o),R=!1;return Xt.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 $e(er(Ae({},v),{status:m,indentation:l,listMarker:c,taskLocation:t,blockLink:T,originalMarkdown:e,scheduledDateIsInferred:R}))}toLi(e){return J(this,null,function*(){return Hb(this,e)})}toString(){return Qa().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=Ge.getInstance().getNextStatusOrCreate(this.status),t=null,n=null;if(e.isCompleted()){let{setDoneDate:o}=he();o&&(t=window.moment()),this.recurrence!==null&&(n=this.recurrence.next())}let s=new $e(er(Ae({},this),{status:e,doneDate:t})),a=[];if(n!==null){let{setCreatedDate:o}=he(),l=null;o&&(l=window.moment());let c=Ge.getInstance().getNextStatusOrCreate(e),h=new $e(er(Ae(Ae({},this),n),{status:c,blockLink:"",createdDate:l}));a.push(h)}return a.push(s),a}get urgency(){return this._urgency===null&&(this._urgency=bn.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 ro=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 ks=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 Mo,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}=he(),t=this.vault.on("create",a=>{a instanceof mi.TFile&&this.tasksMutex.runExclusive(()=>{this.indexFile(a)})});this.vaultEventReferences.push(t);let n=this.vault.on("delete",a=>{a instanceof mi.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 mi.TFile&&this.tasksMutex.runExclusive(()=>{let l=new ro(()=>Xt.fromPath(a.path));this.tasks=this.tasks.map(c=>c.path===o?e?Xt.updateTaskPath(c,a.path,l.value):new $e(er(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)}$e.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 ro(()=>Xt.fromPath(s.path)),h=null,m=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((h===null||h.position.end.line<T)&&(h=ks.getSection(T,n.sections),m=0),h===null)continue;let S=o[T];if(S===void 0){console.log(`${s.path}: line ${T} - ignoring 'undefined' line.`);continue}let v;try{v=$e.fromLine({line:S,taskLocation:new Ct(s.path,T,h.position.start.line,m,ks.getPrecedingHeader(T,n.headings)),fallbackDate:c.value})}catch(R){this.reportTaskParsingErrorToUser(R,s,g,S);continue}v!==null&&(m++,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 mi.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 Xh=require("obsidian");var cv=require("obsidian");function Ss(){}function $h(r){return r()}function Vb(){return Object.create(null)}function Os(r){r.forEach($h)}function Zb(r){return typeof r=="function"}function Xb(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function Qb(r){return Object.keys(r).length===0}var Jb=!1;function BI(){Jb=!0}function HI(){Jb=!1}function L(r,e){r.appendChild(e)}function yi(r,e,t){r.insertBefore(e,t||null)}function Ms(r){r.parentNode.removeChild(r)}function Gh(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 Qt(r){return document.createTextNode(r)}function Se(){return Qt(" ")}function Ht(r,e,t,n){return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function ev(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 VI(r){return Array.from(r.childNodes)}function Bh(r,e){e=""+e,r.wholeText!==e&&(r.data=e)}function Fr(r,e){r.value=e==null?"":e}function Hh(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 tv(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 Es=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)yi(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(Ms)}};var io;function so(r){io=r}function KI(){if(!io)throw new Error("Function called outside component initialization");return io}function zh(r){KI().$$.on_mount.push(r)}var no=[];var Fu=[],Iu=[],Kb=[],ZI=Promise.resolve(),jh=!1;function XI(){jh||(jh=!0,ZI.then(rv))}function ao(r){Iu.push(r)}var qh=new Set,Cu=0;function rv(){let r=io;do{for(;Cu<no.length;){let e=no[Cu];Cu++,so(e),QI(e.$$)}for(so(null),no.length=0,Cu=0;Fu.length;)Fu.pop()();for(let e=0;e<Iu.length;e+=1){let t=Iu[e];qh.has(t)||(qh.add(t),t())}Iu.length=0}while(no.length);for(;Kb.length;)Kb.pop()();jh=!1,qh.clear(),so(r)}function QI(r){if(r.fragment!==null){r.update(),Os(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(ao)}}var JI=new Set;function eF(r,e){r&&r.i&&(JI.delete(r),r.i(e))}var yj=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function tF(r,e,t,n){let{fragment:s,on_mount:a,on_destroy:o,after_update:l}=r.$$;s&&s.m(e,t),n||ao(()=>{let c=a.map($h).filter(Zb);o?o.push(...c):Os(c),r.$$.on_mount=[]}),l.forEach(ao)}function nv(r,e){let t=r.$$;t.fragment!==null&&(Os(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function rF(r,e){r.$$.dirty[0]===-1&&(no.push(r),XI(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function sv(r,e,t,n,s,a,o,l=[-1]){let c=io;so(r);let h=r.$$={fragment:null,ctx:null,props:a,update:Ss,not_equal:s,bound:Vb(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Vb(),dirty:l,skip_bound:!1,root:e.target||c.$$.root};o&&o(h.root);let m=!1;if(h.ctx=t?t(r,e.props||{},(g,T,...S)=>{let v=S.length?S[0]:T;return h.ctx&&s(h.ctx[g],h.ctx[g]=v)&&(!h.skip_bound&&h.bound[g]&&h.bound[g](v),m&&rF(r,g)),T}):[],h.update(),m=!0,Os(h.before_update),h.fragment=n?n(h.ctx):!1,e.target){if(e.hydrate){BI();let g=VI(e.target);h.fragment&&h.fragment.l(g),g.forEach(Ms)}else h.fragment&&h.fragment.c();e.intro&&eF(r.$$.fragment),tF(r,e.target,e.anchor,e.customElement),HI(),rv()}so(c)}var nF;typeof HTMLElement=="function"&&(nF=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:r}=this.$$;this.$$.on_disconnect=r.map($h).filter(Zb);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(r,e,t){this[r]=t}disconnectedCallback(){Os(this.$$.on_disconnect)}$destroy(){nv(this,1),this.$destroy=Ss}$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&&!Qb(r)&&(this.$$.skip_bound=!0,this.$$set(r),this.$$.skip_bound=!1)}});var Lu=class{$destroy(){nv(this,1),this.$destroy=Ss}$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&&!Qb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Kh=In(pt());function iv(r,e,t){let n=r.slice();return n[45]=e[t],n}function av(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 sF(r){let e,t=r[50]+"",n;return{c(){e=ae("span"),n=Qt(t)},m(s,a){yi(s,e,a),L(e,n)},p:Ss,d(s){s&&Ms(e)}}}function ov(r){let e,t,n,s,a,o,l,c,h=r[49]+"",m,g,T=r[50]&&r[50].charCodeAt(0)>=256,S,v,R,C,$=T&&sF(r);return{c(){e=ae("span"),t=ae("input"),o=Se(),l=ae("label"),c=ae("span"),m=Qt(h),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",S="priority-"+r[48])},m(B,W){yi(B,e,W),L(e,t),t.checked=t.__value===r[1].priority,L(e,o),L(e,l),L(l,c),L(c,m),L(l,g),$&&$.m(l,null),L(e,v),R||(C=Ht(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&&Ms(e),r[33][0].splice(r[33][0].indexOf(t),1),$&&$.d(),R=!1,C()}}}function uv(r){let e,t=r[45].name+"",n,s,a=r[45].symbol+"",o,l,c;return{c(){e=ae("option"),n=Qt(t),s=Qt(" ["),o=Qt(a),l=Qt("]"),e.__value=c=r[45],e.value=e.__value},m(h,m){yi(h,e,m),L(e,n),L(e,s),L(e,o),L(e,l)},p(h,m){m[0]&1&&t!==(t=h[45].name+"")&&Bh(n,t),m[0]&1&&a!==(a=h[45].symbol+"")&&Bh(o,a),m[0]&1&&c!==(c=h[45])&&(e.__value=c,e.value=e.__value)},d(h){h&&Ms(e)}}}function iF(r){let e,t,n,s,a,o,l,c,h,m,g,T,S,v,R,C,$,B,W,De,Te,be,ee,te,It,yt,V,q,P,Q,Y,oe,y,_,w,D,E,M,k,I,A,N,j,ke,pe,le,Ce,K,We,Xe,ct,Or,it,qe,dt,gt,On,Ii,je,Ls,es,ft,ce,Jr,Mt,ts,fo,Ur,Mn,_t,Fi,cr,en,Le,Rn,Ys,rs,xn,ns,dr,Pn,ho,tn,po,fr,hr,H,Us,mo,ht,ss,Pe,pr=r[20],Ft=[];for(let G=0;G<pr.length;G+=1)Ft[G]=ov(av(r,pr,G));let et=r[0],Qe=[];for(let G=0;G<et.length;G+=1)Qe[G]=uv(iv(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(),h=ae("div"),m=ae("label"),g=Qt("Priority"),S=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"),De=Se(),Te=ae("code"),be=Qt(r[16]),ee=Se(),te=new Es(!1),It=Se(),yt=ae("label"),yt.textContent="Due",V=Se(),q=ae("input"),Q=Se(),Y=ae("code"),oe=Qt(r[19]),y=Se(),_=new Es(!1),w=Se(),D=ae("label"),D.textContent="Scheduled",E=Se(),M=ae("input"),I=Se(),A=ae("code"),N=Qt(r[18]),j=Se(),ke=new Es(!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=Qt(r[17]),it=Se(),qe=new Es(!1),dt=Se(),gt=ae("div"),On=ae("label"),On.innerHTML=`Only
<span class="accesskey-first">future</span> dates:`,Ii=Se(),je=ae("input"),es=Se(),ft=ae("div"),ce=ae("label"),ce.innerHTML='Stat<span class="accesskey">u</span>s',Jr=Se(),Mt=ae("select");for(let G=0;G<Qe.length;G+=1)Qe[G].c();fo=Se(),Ur=ae("div"),Mn=ae("div"),_t=ae("label"),_t.textContent="Completed:",Fi=Se(),cr=ae("input"),Le=Se(),Rn=ae("div"),Ys=ae("span"),Ys.textContent="Created on:",rs=Se(),xn=ae("code"),ns=Se(),dr=ae("div"),Pn=ae("span"),Pn.textContent="Done on:",ho=Se(),tn=ae("code"),po=Se(),fr=ae("div"),hr=ae("button"),H=Qt("Apply"),mo=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(m,"for",T="priority-"+r[1].priority),z(h,"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]),te.a=null,z(yt,"for","due"),z(yt,"class","accesskey-first"),z(q,"id","due"),z(q,"type","text"),z(q,"placeholder",Vh),z(q,"accesskey",P=r[15]("d")),Lr(q,"tasks-modal-error",!r[7]),_.a=null,z(D,"for","scheduled"),z(D,"class","accesskey-first"),z(M,"id","scheduled"),z(M,"type","text"),z(M,"placeholder",Vh),z(M,"accesskey",k=r[15]("s")),Lr(M,"tasks-modal-error",!r[5]),ke.a=null,z(le,"for","start"),z(K,"id","start"),z(K,"type","text"),z(K,"placeholder",Vh),z(K,"accesskey",We=r[15]("a")),Lr(K,"tasks-modal-error",!r[3]),qe.a=null,z(On,"for","forwardOnly"),z(je,"id","forwardOnly"),z(je,"type","checkbox"),z(je,"class","task-list-item-checkbox tasks-modal-checkbox"),z(je,"accesskey",Ls=r[15]("f")),z(R,"class","tasks-modal-section tasks-modal-dates"),z(ce,"for","status"),z(Mt,"id","status-type"),z(Mt,"class","dropdown"),z(Mt,"accesskey",ts=r[15]("u")),r[1].status===void 0&&ao(()=>r[39].call(Mt)),z(ft,"class","tasks-modal-section"),z(_t,"for","status"),z(cr,"id","status"),z(cr,"type","checkbox"),z(cr,"class","task-list-item-checkbox tasks-modal-checkbox"),cr.checked=en=r[1].status.isCompleted(),cr.disabled=!0,z(Ur,"class","tasks-modal-section tasks-modal-status"),hr.disabled=Us=!r[14],z(hr,"type","submit"),z(hr,"class","mod-cta"),z(ht,"type","button"),z(fr,"class","tasks-modal-section tasks-modal-buttons"),Lr(t,"with-accesskeys",r[9]),z(e,"class","tasks-modal")},m(G,ne){yi(G,e,ne),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,h),L(h,m),L(m,g),L(h,S);for(let ue=0;ue<Ft.length;ue+=1)Ft[ue].m(h,null);L(t,v),L(t,R),L(R,C),L(R,$),L(R,B),Fr(B,r[1].recurrenceRule),L(R,De),L(R,Te),L(Te,be),L(Te,ee),te.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,D),L(R,E),L(R,M),Fr(M,r[1].scheduledDate),L(R,I),L(R,A),L(A,N),L(A,j),ke.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),qe.m(r[2],ct),L(R,dt),L(R,gt),L(gt,On),L(gt,Ii),L(gt,je),je.checked=r[1].forwardOnly,L(t,es),L(t,ft),L(ft,ce),L(ft,Jr),L(ft,Mt);for(let ue=0;ue<Qe.length;ue+=1)Qe[ue].m(Mt,null);Hh(Mt,r[1].status),L(t,fo),L(t,Ur),L(Ur,Mn),L(Mn,_t),L(Mn,Fi),L(Mn,cr),L(Ur,Le),L(Ur,Rn),L(Rn,Ys),L(Rn,rs),L(Rn,xn),xn.innerHTML=r[11],L(Ur,ns),L(Ur,dr),L(dr,Pn),L(dr,ho),L(dr,tn),tn.innerHTML=r[13],L(t,po),L(t,fr),L(fr,hr),L(hr,H),L(fr,mo),L(fr,ht),ss||(Pe=[Ht(o,"input",r[30]),Ht(o,"keydown",r[23]),Ht(o,"paste",r[24]),Ht(o,"drop",r[24]),Ht(h,"keyup",r[21]),Ht(B,"input",r[34]),Ht(q,"input",r[35]),Ht(M,"input",r[36]),Ht(K,"input",r[37]),Ht(je,"change",r[38]),Ht(Mt,"change",r[39]),Ht(ht,"click",r[22]),Ht(t,"submit",ev(r[25]))],ss=!0)},p(G,ne){if(ne[0]&32768&&l!==(l=G[15]("t"))&&z(o,"accesskey",l),ne[0]&3&&Fr(o,G[1].description),ne[0]&3&&T!==(T="priority-"+G[1].priority)&&z(m,"for",T),ne[0]&1081346){pr=G[20];let ue;for(ue=0;ue<pr.length;ue+=1){let jt=av(G,pr,ue);Ft[ue]?Ft[ue].p(jt,ne):(Ft[ue]=ov(jt),Ft[ue].c(),Ft[ue].m(h,null))}for(;ue<Ft.length;ue+=1)Ft[ue].d(1);Ft.length=pr.length}if(ne[0]&32768&&W!==(W=G[15]("r"))&&z(B,"accesskey",W),ne[0]&3&&B.value!==G[1].recurrenceRule&&Fr(B,G[1].recurrenceRule),ne[0]&256&&Lr(B,"tasks-modal-error",!G[8]),ne[0]&4096&&te.p(G[12]),ne[0]&32768&&P!==(P=G[15]("d"))&&z(q,"accesskey",P),ne[0]&3&&q.value!==G[1].dueDate&&Fr(q,G[1].dueDate),ne[0]&128&&Lr(q,"tasks-modal-error",!G[7]),ne[0]&64&&_.p(G[6]),ne[0]&32768&&k!==(k=G[15]("s"))&&z(M,"accesskey",k),ne[0]&3&&M.value!==G[1].scheduledDate&&Fr(M,G[1].scheduledDate),ne[0]&32&&Lr(M,"tasks-modal-error",!G[5]),ne[0]&16&&ke.p(G[4]),ne[0]&32768&&We!==(We=G[15]("a"))&&z(K,"accesskey",We),ne[0]&3&&K.value!==G[1].startDate&&Fr(K,G[1].startDate),ne[0]&8&&Lr(K,"tasks-modal-error",!G[3]),ne[0]&4&&qe.p(G[2]),ne[0]&32768&&Ls!==(Ls=G[15]("f"))&&z(je,"accesskey",Ls),ne[0]&3&&(je.checked=G[1].forwardOnly),ne[0]&1){et=G[0];let ue;for(ue=0;ue<et.length;ue+=1){let jt=iv(G,et,ue);Qe[ue]?Qe[ue].p(jt,ne):(Qe[ue]=uv(jt),Qe[ue].c(),Qe[ue].m(Mt,null))}for(;ue<Qe.length;ue+=1)Qe[ue].d(1);Qe.length=et.length}ne[0]&32768&&ts!==(ts=G[15]("u"))&&z(Mt,"accesskey",ts),ne[0]&3&&Hh(Mt,G[1].status),ne[0]&3&&en!==(en=G[1].status.isCompleted())&&(cr.checked=en),ne[0]&2048&&(xn.innerHTML=G[11]),ne[0]&8192&&(tn.innerHTML=G[13]),ne[0]&16384&&Us!==(Us=!G[14])&&(hr.disabled=Us),ne[0]&512&&Lr(t,"with-accesskeys",G[9])},i:Ss,o:Ss,d(G){G&&Ms(e),r[31](null),Gh(Ft,G),Gh(Qe,G),ss=!1,Os(Pe)}}}var Vh="Try 'Monday' or 'tomorrow', or [td|tm|yd|tw|nw|we] then space.";function aF(r,e,t){let n;var s;let{task:a}=e,{onSubmit:o}=e,{statusOptions:l}=e,{prioritySymbols:c,recurrenceSymbol:h,startDateSymbol:m,scheduledDateSymbol:g,dueDateSymbol:T}=pi.tasksPluginEmoji.taskSerializer.symbols,S,v={description:"",status:fe.TODO,priority:"none",recurrenceRule:"",createdDate:"",startDate:"",scheduledDate:"",dueDate:"",doneDate:"",forwardOnly:!0},R=!0,C="",$="",B=!0,W="",De=!0,Te="",be=!0,ee="",te=!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,We,Xe=void 0){if(!We)return`<i>no ${K} date</i>`;let ct=Kh.parseDate(We,Xe,{forwardDate:Xe!=null});return ct!==null?window.moment(ct).format("YYYY-MM-DD"):`<i>invalid ${K} date</i>`}function Y(K,We){return Q(K,We,v.forwardOnly?new Date:void 0)}function oe(K){let We=null,Xe=Kh.parseDate(K,new Date,{forwardDate:v.forwardOnly});return Xe!==null&&(We=window.moment(Xe)),We}zh(()=>{let{provideAccessKeys:K}=he();t(9,V=K);let We=Fe.removeAsWordFrom(a.description);(We!=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:We,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(()=>{S.focus()},10)});let y=K=>{if(K.key&&!K.altKey&&!K.ctrlKey){let We=P.find(Xe=>Xe.label.charAt(0).toLowerCase()==K.key);We&&t(1,v.priority=We.value,v)}},_=()=>{o([])},w=K=>{K.key==="Enter"&&(K.preventDefault(),q&&E())},D=()=>{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 We=oe(v.startDate),Xe=oe(v.scheduledDate),ct=oe(v.dueDate),Or=null;v.recurrenceRule&&(Or=St.fromText({recurrenceRuleText:v.recurrenceRule,startDate:We,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 qe=new $e(Object.assign(Object.assign({},a),{description:K,status:v.status,priority:it,recurrence:Or,startDate:We,scheduledDate:Xe,dueDate:ct,doneDate:window.moment(v.doneDate,"YYYY-MM-DD").isValid()?window.moment(v.doneDate,"YYYY-MM-DD"):null}));o([qe])},M=[[]];function k(){v.description=this.value,t(1,v),t(6,Te),t(2,$),t(4,W),t(0,l)}function I(K){Fu[K?"unshift":"push"](()=>{S=K,t(10,S)})}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 ke(){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=tv(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=li(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=li(v.startDate),v),t(2,$=Y("start",v.startDate)),t(3,B=!$.includes("invalid"))}if(r.$$.dirty[0]&18){e:t(1,v.scheduledDate=li(v.scheduledDate),v),t(4,W=Y("scheduled",v.scheduledDate)),t(5,De=!W.includes("invalid"))}if(r.$$.dirty[0]&268435458){e:if(t(8,te=!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,te=!1))}}if(r.$$.dirty[0]&2){e:t(29,R=v.description.trim()!=="")}if(r.$$.dirty[0]&536871336){e:t(14,q=be&&te&&De&&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,De,Te,be,te,V,S,C,ee,It,q,n,h,m,g,T,P,y,_,w,D,E,a,o,s,R,k,I,A,M,N,j,ke,pe,le,Ce]}var Zh=class extends Lu{constructor(e){super(),sv(this,e,aF,iF,Xb,{task:26,onSubmit:27,statusOptions:0},null,[-1,-1])}},lv=Zh;var Kn=class extends cv.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 lv({target:t,props:{task:this.task,statusOptions:n,onSubmit:this.onSubmit}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=Ge.getInstance().registeredStatuses;return Ge.getInstance().bySymbol(this.task.status.symbol)===fe.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};var Yu=({line:r,path:e})=>{var v,R;let t=Xt.fromPath(e),n=$e.fromLine({line:r,taskLocation:Ct.fromUnknownPosition(e),fallbackDate:t});if(n!==null)return n;let{setCreatedDate:s}=he(),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 $e({status:fe.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:"-",h=(R=o[4])!=null?R:" ",m=Ge.getInstance().bySymbolOrCreate(h),g=o[5],T=r.match(ie.blockLinkRegex),S=T!==null?T[0]:"";return S!==""&&(g=g.replace(ie.blockLinkRegex,"")),new $e({status:m,description:g,taskLocation:Ct.fromUnknownPosition(e),indentation:l,listMarker:c,blockLink:S,priority:"3",createdDate:a,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,recurrence:null,tags:[],originalMarkdown:"",scheduledDateIsInferred:!1})};var dv=(r,e,t,n)=>{var g;if(r)return t instanceof Xh.MarkdownView;if(!(t instanceof Xh.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=Yu({line:l,path:s}),h=T=>{let S=Xt.removeInferredStatusIfNeeded(c,T).map(v=>v.toFileLineString()).join(`
`);e.setLine(o,S)};new Kn({app:n,task:c,onSubmit:h}).open()};var Qh=require("obsidian");var fv=(r,e,t)=>{var c;if(r)return t instanceof Qh.MarkdownView;if(!(t instanceof Qh.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=oF(o,n);e.setLine(a,l.text),e.setCursor(uF(s,l))},oF=(r,e)=>{let t=$e.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=Ge.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}}}}},uF=(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 Uu=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)=>dv(t,n,s,this.app)}),e.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:fv})}};var Wu=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 qu=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 h;let n=e.findAll(".task-list-item").filter(m=>{var S;let g=(S=m.textContent)==null?void 0:S.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 m=a.lineStart;m<=a.lineEnd;m++){let g=o[m];if(g===void 0)continue;let T=null,S=$e.fromLine({line:g,taskLocation:new Ct(s,m,a.lineStart,l,T),fallbackDate:null});S!==null&&(c.push(S),l++)}for(let m=0;m<n.length;m++){let g=c[m],T=n[m];if(g===void 0||T===void 0)continue;let S=(h=T.getAttr("data-line"))!=null?h:"0",v=Number.parseInt(S,10),R=yield g.toLi({parentUlElement:e,listIndex:v}),C=T.childNodes;for(let W=0;W<C.length;W=W+1){let De=C[W];De.nodeName.toLowerCase()==="div"?R.prepend(De):De.nodeName.toLowerCase()==="ul"&&R.append(De)}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 hv=require("@codemirror/view"),pv=require("obsidian");var mv=()=>hv.ViewPlugin.fromClass(Jh),Jh=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 pv.Notice(T,45e3)}return!1}let{state:s}=this.view,a=this.view.posAtDOM(t),o=s.doc.lineAt(a),l=$e.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 h=l.toggle().map(T=>T.toFileLineString()).join(s.lineBreak),m=s.update({changes:{from:o.from,to:o.to,insert:h}});this.view.dispatch(m);let g=t.checked;return setTimeout(()=>{t.checked=g},1),!0}};var fl=require("obsidian");var wn=class{constructor(e,t,n){this.property=e,this.comparator=wn.maybeReverse(n,t)}static maybeReverse(e,t){return e?wn.makeReversedComparator(t):t}static makeReversedComparator(e){return(t,n)=>e(t,n)*-1}};var Zn=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 Pu(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 wn(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 Zn(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 Jt=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 ju=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 Jt(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 ju(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 Xn=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 Xn{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=wr.parseDateRange(l);if(!c.isValid())s.error="do not understand "+this.fieldName()+" date";else{let h=this.buildFilterFunction(o,c),m=Wt.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),c);s.filter=new Jt(t,h,m)}}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 m=`${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(m,g)}break}let h=`${t} date is ${o} ${c}`;return s&&(h+=` OR no ${t} date`),new Ke(h)}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 gi=class extends Wt{fieldName(){return"due"}date(e){return e.dueDate}filterResultIfFieldMissing(){return!1}};var ep=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 Jt(e,l,new Ke(o))}else t.error="do not understand query filter (priority)";return t}fieldName(){return"priority"}filterRegExp(){return ep.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}`]}}},Rs=ep;Rs.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(low|none|medium|high))$/;var $u=class{constructor(e,t){this.nestingLevel=e,this.name=t}};var Gu=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 $u(n,s));for(let a=n;a<e.length;a++)this.lastHeadingAtLevel[a]="";this.lastHeadingAtLevel[n]=s}}return t}};var Bu=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 Hu=class extends Map{},zu=class extends Bu{},Vu=class{constructor(e,t){this.groups=new Hu;let n=this.buildGroupingTree(e,t);this.groups=n.generateAllPaths(),this.groups=this.getSortedGroups()}buildGroupingTree(e,t){let n=new zu(t),s=[n];for(let a of e){let o=[];for(let l of s)for(let c of l.values){let h=Zr.getGroupNamesForTask(a,c);for(let m of h){let g=l.children.get(m);g===void 0&&(g=new zu([]),l.children.set(m,g),o.push(g)),g.values.push(c)}}s=o}return n}getSortedGroups(){return new Hu([...this.groups.entries()].sort())}};var Ku=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 Zu=class{constructor(e,t){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=t.length;let n=new Vu(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 Gu(e.groups);for(let[n,s]of e.groups){let a=t.getHeadingsForTaskGroup(n),o=new Ku(n,a,s);this.add(o)}}add(e){this._groups.push(e)}};var _i=class{matchesAnyOf(e){return e.some(t=>this.matches(t))}};var Ti=class extends _i{constructor(t){super();this.stringToFind=t}matches(t){return Ti.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,n){return t.toLocaleLowerCase().includes(n.toLocaleLowerCase())}};var bi=class extends _i{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 bi(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 Ti(a);else if(s.includes("regex")&&(o=bi.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 Jt(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 vi=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 Zn(e,Xr.grouperForProperty(e))}static by(e,t){return new Zu(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 vi().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 wi=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 Di=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 ki=class{static by(e,t){let n=[new Di().comparator(),new Kr().comparator(),new gi().comparator(),new Rs().comparator(),new wi().comparator()],s=[];for(let a of e)s.push(a.comparator);return t.sort(ki.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 xs=class extends qt{fieldName(){return"description"}value(e){return Fe.removeAsSubstringFrom(e.description)}supportsSorting(){return!0}comparator(){return(e,t)=>{let n=xs.cleanDescription(e.description),s=xs.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 Xu=class extends Wt{fieldName(){return"created"}date(e){return e.createdDate}filterResultIfFieldMissing(){return!1}};var Qu=class extends Wt{fieldName(){return"done"}date(e){return e.doneDate}filterResultIfFieldMissing(){return!1}};var Ju=class extends Xn{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 el=class extends Wt{fieldName(){return"scheduled"}date(e){return e.scheduledDate}filterResultIfFieldMissing(){return!1}};var tl=class extends Wt{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(e){return e.startDate}filterResultIfFieldMissing(){return!0}};var Ei=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 Ei().dates(e).sort(Hr)[0]}filterResultIfFieldMissing(){return!1}getFilter(e){return t=>this.dates(t).some(n=>e(n))}};var rl=class extends Xn{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 Si=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 Zn(this.fieldNamePlural(),this.grouper())}};var Ps=class extends Si{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=Ps.makeCompareByTagComparator(a);return new wn(this.fieldNameSingular(),o,s)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/}comparator(){return Ps.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 Mv=In(Ov());var al=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,Mv.parse)(s);for(let c of a)if(c.name==="IDENTIFIER"&&c.value){let h=c.value.trim();if(!(h in this.subFields)){let m=ol(h);if(m===null)return n.error=`couldn't parse sub-expression '${h}'`,n;if(m.error)return n.error=`couldn't parse sub-expression '${h}': ${m.error}`,n;m.filter&&(this.subFields[h]=m.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 Jt(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 h=this.subFields[l.value.trim()].filterFunction(t);o.push(a(h))}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()),h=s(o.pop());o.push(a(c||h))}else if(l.value==="AND"){let c=s(o.pop()),h=s(o.pop());o.push(a(c&&h))}else if(l.value==="XOR"){let c=s(o.pop()),h=s(o.pop());o.push(a(c&&!h||!c&&h))}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 ul=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 ll=class extends qt{constructor(){super()}fieldName(){return"status.name"}value(e){return e.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};var Jn=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 Jt(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=Jn.groupName(e),s=Jn.groupName(t);return n.localeCompare(s,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>[Jn.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 cl=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 fp=[()=>new ll,()=>new Jn,()=>new Kr,()=>new rl,()=>new Rs,()=>new Ei,()=>new Xu,()=>new tl,()=>new el,()=>new gi,()=>new Qu,()=>new wi,()=>new xs,()=>new Ps,()=>new vi,()=>new Ju,()=>new al,()=>new ul,()=>new Di,()=>new cl];function ol(r){for(let e of fp){let t=e();if(t.canCreateFilterForLine(r))return t.createFilterOrErrorMessage(r)}return null}function Rv(r){let e=/^sort by /;if(r.match(e)===null)return null;for(let t of fp){let s=t().parseSortLine(r);if(s)return s}return null}function xv(r){let e=/^group by /;if(r.match(e)===null)return null;for(let t of fp){let n=t(),s=n.fieldNameSingular();if(n.supportsGrouping()&&(r===`group by ${s}`||n instanceof Si&&r===`group by ${n.fieldNamePlural()}`))return n.createGrouper()}return null}var Ai=class{constructor({source:e}){this._limit=void 0;this._layoutOptions=new Za;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}=he();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}=he(),s=(t.ignoreSortInstructions?e:ki.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=ol(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=Rv(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=xv(e);return t?(this._grouping.push(t),!0):!1}};var dl=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 hp({app:this.app,events:this.events,container:t,source:e,filePath:n.sourcePath}))})}},hp=class extends fl.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 Ai({source:a}),this.queryType="tasks";break;default:this.query=new Ai({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 Ai({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 h of l.groups){this.addGroupHeadings(a,h.groupHeadings);let{taskList:m}=yield this.createTasksList({tasks:h.tasks,content:a});a.appendChild(m)}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 Hn(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 h=0;h<a;h++){let m=t[h],g=this.isFilenameUnique({task:m}),T=yield m.toLi({parentUlElement:l,listIndex:h,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,m),this.query.layoutOptions.hideBacklinks||this.addBacklinks(R,m,v,g),this.query.layoutOptions.hideEditButton||this.addEditButton(R,m),l.appendChild(T)}return{taskList:l,tasksCount:a}})}addEditButton(t,n){t.createEl("a",{cls:"tasks-edit"}).onClickEvent(a=>{a.preventDefault();let o=c=>{Nu({originalTask:n,newTasks:Xt.removeInferredStatusIfNeeded(n,c)})};new Kn({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 fl.MarkdownRenderer.renderMarkdown(n.name,s,this.filePath,this)})}addBacklinks(t,n,s,a){var h;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 m=n.precedingHeader.replace(/#/g,"");l.href=l.href+"#"+m,l.setAttribute("data-href",l.getAttribute("data-href")+"#"+m)}let c;s?c=" \u{1F517}":c=(h=n.getLinkText({isFilenameUnique:a}))!=null?h:"",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 Be=require("obsidian");function Pv(){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 Av(){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 Nv(){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 Cv(){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 Iv(){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 Fv(){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 Lv(){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 Yv=[{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 Is=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=fe.createFromImportedValue(e).configuration;return o.push(...this.validateSymbolTypeConventions(l)),o.push(...this.validate(l)),o}validateSymbol(e){return Is.validateOneSymbol(e.symbol,"Task Status Symbol")}validateNextSymbol(e){return Is.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 Ge,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 Fs=new Is,lr=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(h=>{s=h,h.setValue(this.statusSymbol).onChange(m=>{this.statusSymbol=m,lr.setValid(h,Fs.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(h=>{lr.setValid(s,Fs.validateSymbol(this.statusConfiguration()))});let a;new Yr.Setting(n).setName("Task Status Name").setDesc("This is the friendly name of the task status.").addText(h=>{a=h,h.setValue(this.statusName).onChange(m=>{this.statusName=m,lr.setValid(h,Fs.validateName(this.statusConfiguration()))})}).then(h=>{lr.setValid(a,Fs.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(h=>{o=h,h.setValue(this.statusNextSymbol).onChange(m=>{this.statusNextSymbol=m,lr.setValid(h,Fs.validateNextSymbol(this.statusConfiguration()))})}).then(h=>{lr.setValid(o,Fs.validateNextSymbol(this.statusConfiguration()))}),new Yr.Setting(n).setName("Task Status Type").setDesc("Control how the status behaves for searching and toggling.").addDropdown(h=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(g=>{h.addOption(g,g)}),h.setValue(this.type).onChange(g=>{this.type=fe.getTypeFromStatusTypeString(g)})}),fe.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(h=>{h.setValue(this.statusAvailableAsCommand).onChange(m=>J(this,null,function*(){this.statusAvailableAsCommand=m}))});let l=t.createDiv(),c=new Yr.Setting(l);c.addButton(h=>(h.setTooltip("Save").setIcon("checkmark").onClick(()=>J(this,null,function*(){let m=Fs.validate(this.statusConfiguration());if(m.length>0){let g=m.join(`
`)+`
Fix errors before saving.`;new Yr.Notice(g);return}this.saved=!0,this.close()})),h)),c.addExtraButton(h=>(h.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),h))})}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?lr.removeValidationError(t):lr.setValidationError(t)}};var Ni=class extends Be.PluginSettingTab{constructor({plugin:t}){super(t.app,t);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=t}saveSettings(t){return 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:"Global filter Settings"}),new Be.Setting(t).setName("Global task filter").setDesc(Ni.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 Be.Setting(t).setName("Remove global filter from description").setDesc("Enabling this removes the string that you set as global filter from the task description when displaying a task.").addToggle(s=>{let a=he();s.setValue(a.removeGlobalFilter).onChange(o=>J(this,null,function*(){Nt({removeGlobalFilter:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Task Statuses"});let{headingOpened:n}=he();Yv.forEach(s=>{this.addOneSettingsBlock(t,s,n)}),t.createEl("h4",{text:"Date Settings"}),new Be.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=he();s.setValue(a.setCreatedDate).onChange(o=>J(this,null,function*(){Nt({setCreatedDate:o}),yield this.plugin.saveSettings()}))}),new Be.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=he();s.setValue(a.setDoneDate).onChange(o=>J(this,null,function*(){Nt({setDoneDate:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Use filename as Scheduled date for undated tasks").setDesc(Ni.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=he();s.setValue(a.useFilenameAsScheduledDate).onChange(o=>J(this,null,function*(){Nt({useFilenameAsScheduledDate:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Folders with default Scheduled dates").setDesc("Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.").addText(s=>J(this,null,function*(){let a=he();yield this.plugin.saveSettings(),s.setValue(Ni.renderFolderArray(a.filenameAsDateFolders)).onChange(o=>J(this,null,function*(){let l=Ni.parseCommaSeparatedFolders(o);Nt({filenameAsDateFolders:l}),yield this.plugin.saveSettings()}))})),t.createEl("h4",{text:"Auto-suggest Settings"}),new Be.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=he();s.setValue(a.autoSuggestInEditor).onChange(o=>J(this,null,function*(){Nt({autoSuggestInEditor:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Minimum match length for auto-suggest").setDesc("If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.").addSlider(s=>{let a=he();s.setLimits(0,3,1).setValue(a.autoSuggestMinMatch).setDynamicTooltip().onChange(o=>J(this,null,function*(){Nt({autoSuggestMinMatch:o}),yield this.plugin.saveSettings()}))}),new Be.Setting(t).setName("Maximum number of auto-suggestions to show").setDesc('How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).').addSlider(s=>{let a=he();s.setLimits(3,12,1).setValue(a.autoSuggestMaxItems).setDynamicTooltip().onChange(o=>J(this,null,function*(){Nt({autoSuggestMaxItems:o}),yield this.plugin.saveSettings()}))}),t.createEl("h4",{text:"Dialog Settings"}),new Be.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=he();s.setValue(a.provideAccessKeys).onChange(o=>J(this,null,function*(){Nt({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,Nt({headingOpened:s}),this.plugin.saveSettings()};let o=a.createEl("summary");if(new Be.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!==""&&!Fb(l.featureFlag))&&(l.type==="checkbox"?new Be.Setting(a).setName(l.name).setDesc(l.description).addToggle(c=>{let h=he();h.generalSettings[l.settingName]||Ds(l.settingName,l.initialValue),c.setValue(h.generalSettings[l.settingName]).onChange(m=>J(this,null,function*(){Ds(l.settingName,m),yield this.plugin.saveSettings()}))}):l.type==="text"?new Be.Setting(a).setName(l.name).setDesc(l.description).addText(c=>{let h=he();h.generalSettings[l.settingName]||Ds(l.settingName,l.initialValue);let m=g=>J(this,null,function*(){Ds(l.settingName,g),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(h.generalSettings[l.settingName].toString()).onChange((0,Be.debounce)(m,500,!0))}):l.type==="textarea"?new Be.Setting(a).setName(l.name).setDesc(l.description).addTextArea(c=>{let h=he();h.generalSettings[l.settingName]||Ds(l.settingName,l.initialValue);let m=g=>J(this,null,function*(){Ds(l.settingName,g),yield this.plugin.saveSettings()});c.setPlaceholder(l.placeholder.toString()).setValue(h.generalSettings[l.settingName].toString()).onChange((0,Be.debounce)(m,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}=he();s.coreStatuses.forEach(a=>{Uv(t,a,s.coreStatuses,s,n,n.plugin,!0)})}insertCustomTaskStatusSettings(t,n){let{statusSettings:s}=he();s.customStatuses.forEach(h=>{Uv(t,h,s.customStatuses,s,n,n.plugin,!1)}),t.createEl("div"),new Be.Setting(t).addButton(h=>{h.setButtonText("Add New Task Status").setCta().onClick(()=>J(this,null,function*(){mt.addStatus(s.customStatuses,new Ot("","","",!1,"TODO")),yield Ci(s,n)}))}).infoEl.remove();let o=[["AnuPpuccin Theme",Pv()],["Aura Theme",Av()],["Ebullientworks Theme",Nv()],["ITS Theme & SlRvb Checkboxes",Cv()],["Minimal Theme",Fv()],["Things Theme",Lv()],["LYT Mode Theme (Dark mode only)",Iv()]];for(let[h,m]of o)new Be.Setting(t).addButton(T=>{let S=`${h}: Add ${m.length} supported Statuses`;T.setButtonText(S).onClick(()=>J(this,null,function*(){yield bF(m,s,n)}))}).infoEl.remove();new Be.Setting(t).addButton(h=>{h.setButtonText("Add All Unknown Status Types").setCta().onClick(()=>J(this,null,function*(){let g=this.plugin.getTasks().map(S=>S.status),T=Ge.getInstance().findUnknownStatuses(g);T.length!==0&&(T.forEach(S=>{mt.addStatus(s.customStatuses,S)}),yield Ci(s,n))}))}).infoEl.remove(),new Be.Setting(t).addButton(h=>{h.setButtonText("Reset Custom Status Types to Defaults").setWarning().onClick(()=>J(this,null,function*(){mt.resetAllCustomStatuses(s),yield Ci(s,n)}))}).infoEl.remove()}},co=Ni;co.createFragmentWithHTML=t=>createFragment(n=>n.createDiv().innerHTML=t);function Uv(r,e,t,n,s,a,o){let l=r.createEl("pre");l.addClass("row-for-status"),l.textContent=new fe(e).previewText();let c=new Be.Setting(r);c.infoEl.replaceWith(l),o||c.addExtraButton(h=>{h.setIcon("cross").setTooltip("Delete").onClick(()=>J(this,null,function*(){mt.deleteStatus(t,e)&&(yield Ci(n,s))}))}),c.addExtraButton(h=>{h.setIcon("pencil").setTooltip("Edit").onClick(()=>J(this,null,function*(){let m=new lr(a,e,o);m.onClose=()=>J(this,null,function*(){m.saved&&mt.replaceStatus(t,e,m.statusConfiguration())&&(yield Ci(n,s))}),m.open()}))}),c.infoEl.remove()}function bF(r,e,t){return J(this,null,function*(){mt.bulkAddStatusCollection(e,r).forEach(s=>{new Be.Notice(s)}),yield Ci(e,t)})}function Ci(r,e){return J(this,null,function*(){Nt({statusSettings:r}),mt.applyToStatusRegistry(r,Ge.getInstance()),yield e.saveSettings(!0)})}var Wv=require("obsidian");var hl=class extends Wv.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=Qa()).buildSuggestions)==null?void 0:l.call(o,n,s.ch,this.settings))!=null?c:[]).map(h=>er(Ae({},h),{context:t}))}renderSuggestion(t,n){n.setText(t.displayText)}selectSuggestion(t,n){var c,h,m;let s=t.context.editor;if(t.suggestionType==="empty"){this.close();let g=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(h=(c=s==null?void 0:s.cm)==null?void 0:c.contentDOM)==null||h.dispatchEvent(g);return}let a=t.context.editor.getCursor(),o={line:a.line,ch:(m=t.insertAt)!=null?m: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 qv=(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 jv=(r,e)=>{let t=Yu({line:"",path:""});return new Kn({app:r,task:t,onSubmit:e})};var $v=r=>({createTaskLineModal:()=>qv(r,jv)});var pl=class extends Gv.Plugin{get apiV1(){return $v(app)}onload(){return J(this,null,function*(){Au.registerConsoleLogger(),console.log('loading plugin "tasks"'),yield this.loadSettings(),this.addSettingTab(new co({plugin:this})),jb({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let t=new Wu({obsidianEvents:this.app.workspace});this.cache=new ks({metadataCache:this.app.metadataCache,vault:this.app.vault,events:t}),this.inlineRenderer=new qu({plugin:this}),this.queryRenderer=new dl({plugin:this,events:t}),this.registerEditorExtension(mv()),this.registerEditorSuggest(new hl(this.app,he())),new Uu({plugin:this})})}loadTaskStatuses(){return J(this,null,function*(){let{statusSettings:t}=he();mt.applyToStatusRegistry(t,Ge.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();Nt(t),yield this.loadTaskStatuses()})}saveSettings(){return J(this,null,function*(){yield this.saveData(he())})}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