@xibosignage/xibo-communication-framework 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/modules/xmr/xmr.d.ts +2 -0
- package/dist/xibo-communication-framework.cjs +4 -0
- package/dist/xibo-communication-framework.cjs.map +1 -1
- package/dist/xibo-communication-framework.d.ts +2 -0
- package/dist/xibo-communication-framework.esm.js +4 -0
- package/dist/xibo-communication-framework.esm.js.map +1 -1
- package/dist/xibo-communication-framework.js +4 -0
- package/dist/xibo-communication-framework.min.js +1 -1
- package/dist/xibo-communication-framework.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -8511,6 +8511,10 @@ var XiboCommunicationFramework = (function (exports) {
|
|
|
8511
8511
|
_this2.emitter.emit('commandCodeReceived', message.commandCode);
|
|
8512
8512
|
} else if (message.action == 'dataUpdate') {
|
|
8513
8513
|
_this2.emitter.emit('dataUpdate', message.widgetId);
|
|
8514
|
+
} else if (message.action == 'purgeAll') {
|
|
8515
|
+
_this2.emitter.emit('purgeAll');
|
|
8516
|
+
} else if (message.action == 'clearStatsAndLogs') {
|
|
8517
|
+
_this2.emitter.emit('clearStatsAndLogs');
|
|
8514
8518
|
} else {
|
|
8515
8519
|
console.error('Xmr::message: unknown action: ' + message.action);
|
|
8516
8520
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var XiboCommunicationFramework=function(e){"use strict";function t(e,t,n,r,s,i,a){try{var o=e[i](a),u=o.value}catch(e){return void n(e)}o.done?t(u):Promise.resolve(u).then(r,s)}function n(e){return function(){var n=this,r=arguments;return new Promise(function(s,i){var a=e.apply(n,r);function o(e){t(a,s,i,o,u,"next",e)}function u(e){t(a,s,i,o,u,"throw",e)}o(void 0)})}}function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){
|
|
2
2
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
3
|
-
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function o(n,r,s,i){var o=r&&r.prototype instanceof l?r:l,c=Object.create(o.prototype);return a(c,"_invoke",function(n,r,s){var i,a,o,l=0,c=s||[],h=!1,d={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return i=t,a=0,o=e,d.n=n,u}};function m(n,r){for(a=n,o=r,t=0;!h&&l&&!s&&t<c.length;t++){var s,i=c[t],m=d.p,f=i[2];n>3?(s=f===r)&&(o=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=m&&((s=n<2&&m<i[1])?(a=0,d.v=r,d.n=i[1]):m<f&&(s=n<3||i[0]>r||r>f)&&(i[4]=n,i[5]=r,d.n=f,a=0))}if(s||n>1)return u;throw h=!0,r}return function(s,c,f){if(l>1)throw TypeError("Generator is already running");for(h&&1===c&&m(c,f),a=c,o=f;(t=a<2?e:o)||!h;){i||(a?a<3?(a>1&&(d.n=-1),m(a,o)):d.n=o:d.v=o);try{if(l=2,i){if(a||(s="next"),t=i[s]){if(!(t=t.call(i,o)))throw TypeError("iterator result is not an object");if(!t.done)return t;o=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(o=TypeError("The iterator does not provide a '"+s+"' method"),a=1);i=e}else if((t=(h=d.n<0)?o:n.call(r,d))!==u)break}catch(t){i=e,a=1,o=t}finally{l=1}}return{value:t,done:h}}}(n,s,i),!0),c}var u={};function l(){}function c(){}function h(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(a(t={},r,function(){return this}),t),m=h.prototype=l.prototype=Object.create(d);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,a(e,s,"GeneratorFunction")),e.prototype=Object.create(m),e}return c.prototype=h,a(m,"constructor",h),a(h,"constructor",c),c.displayName="GeneratorFunction",a(h,s,"GeneratorFunction"),a(m),a(m,s,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),(i=function(){return{w:o,m:f}})()}function a(e,t,n,r){var s=Object.defineProperty;try{s({},"",{})}catch(e){s=0}a=function(e,t,n,r){function i(t,n){a(e,t,function(e){return this._invoke(t,n,e)})}t?s?s(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},a(e,t,n,r)}function o(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}class u extends Error{}class l extends u{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class c extends u{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class h extends u{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class d extends u{}class m extends u{constructor(e){super(`Invalid unit ${e}`)}}class f extends u{}class y extends u{constructor(){super("Zone is an abstract class")}}const g="numeric",w="short",p="long",v={year:g,month:g,day:g},k={year:g,month:w,day:g},b={year:g,month:w,day:g,weekday:w},S={year:g,month:p,day:g},O={year:g,month:p,day:g,weekday:p},T={hour:g,minute:g},N={hour:g,minute:g,second:g},M={hour:g,minute:g,second:g,timeZoneName:w},D={hour:g,minute:g,second:g,timeZoneName:p},I={hour:g,minute:g,hourCycle:"h23"},V={hour:g,minute:g,second:g,hourCycle:"h23"},E={hour:g,minute:g,second:g,hourCycle:"h23",timeZoneName:w},x={hour:g,minute:g,second:g,hourCycle:"h23",timeZoneName:p},C={year:g,month:g,day:g,hour:g,minute:g},F={year:g,month:g,day:g,hour:g,minute:g,second:g},W={year:g,month:w,day:g,hour:g,minute:g},$={year:g,month:w,day:g,hour:g,minute:g,second:g},L={year:g,month:w,day:g,weekday:w,hour:g,minute:g},Z={year:g,month:p,day:g,hour:g,minute:g,timeZoneName:w},j={year:g,month:p,day:g,hour:g,minute:g,second:g,timeZoneName:w},z={year:g,month:p,day:g,weekday:p,hour:g,minute:g,timeZoneName:p},A={year:g,month:p,day:g,weekday:p,hour:g,minute:g,second:g,timeZoneName:p};class q{get type(){throw new y}get name(){throw new y}get ianaName(){return this.name}get isUniversal(){throw new y}offsetName(e,t){throw new y}formatOffset(e,t){throw new y}offset(e){throw new y}equals(e){throw new y}get isValid(){throw new y}}let U=null;class _ extends q{static get instance(){return null===U&&(U=new _),U}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return lt(e,t,n)}formatOffset(e,t){return mt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const R=new Map;const P={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};const Y=new Map;class H extends q{static create(e){let t=Y.get(e);return void 0===t&&Y.set(e,t=new H(e)),t}static resetCache(){Y.clear(),R.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=H.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return lt(e,t,n,this.name)}formatOffset(e,t){return mt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=R.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),R.set(e,t)),t}(this.name);let[r,s,i,a,o,u,l]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const{type:t,value:s}=n[e],i=P[t];"era"===t?r[i]=s:Ue(i)||(r[i]=parseInt(s,10))}return r}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,i,a,o,u,l,c]=r;return[a,s,i,o,u,l,c]}(n,t);"BC"===a&&(r=1-Math.abs(r));let c=+t;const h=c%1e3;return c-=h>=0?h:1e3+h,(it({year:r,month:s,day:i,hour:24===o?0:o,minute:u,second:l,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let J={};const G=new Map;function X(e,t={}){const n=JSON.stringify([e,t]);let r=G.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),G.set(n,r)),r}const B=new Map;const K=new Map;let Q=null;const ee=new Map;function te(e){let t=ee.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),ee.set(e,t)),t}const ne=new Map;function re(e,t,n,r){const s=e.listingMode();return"error"===s?null:"en"===s?n(t):r(t)}class se{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:s,...i}=n;if(!t||Object.keys(i).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=B.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),B.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Be(this.floor?Math.floor(e):tt(e,3),this.padTo)}}class ie{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&H.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||r,this.dtf=X(t,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class ae{constructor(e,t,n){this.opts={style:"long",...n},!t&&Pe()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,s=JSON.stringify([e,r]);let i=K.get(s);return void 0===i&&(i=new Intl.RelativeTimeFormat(e,t),K.set(s,i)),i}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${s[e][0]}`;case-1:return n?"yesterday":`last ${s[e][0]}`;case 0:return n?"today":`this ${s[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),u=1===o,l=s[e],c=r?u?l[1]:l[2]||l[1]:u?s[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const oe={firstDay:1,minimalDays:4,weekend:[6,7]};class ue{static fromOpts(e){return ue.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,s=!1){const i=e||Me.defaultLocale,a=i||(s?"en-US":Q||(Q=(new Intl.DateTimeFormat).resolvedOptions().locale,Q)),o=t||Me.defaultNumberingSystem,u=n||Me.defaultOutputCalendar,l=Ge(r)||Me.defaultWeekSettings;return new ue(a,o,u,l,i)}static resetCache(){Q=null,G.clear(),B.clear(),K.clear(),ee.clear(),ne.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return ue.create(e,t,n,r)}constructor(e,t,n,r,s){const[i,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=X(e).resolvedOptions(),r=e}catch(s){const i=e.substring(0,n);t=X(i).resolvedOptions(),r=i}const{numberingSystem:s,calendar:i}=t;return[r,s,i]}}(e);this.locale=i,this.numberingSystem=t||a||null,this.outputCalendar=n||o||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===te(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ue.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ge(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return re(this,e,pt,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";if(!this.monthsCache[s][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[s][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=Tr.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[s][e]})}weekdays(e,t=!1){return re(this,e,St,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=Tr.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return re(this,void 0,()=>Ot,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Tr.utc(2016,11,13,9),Tr.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return re(this,e,Dt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[Tr.utc(-40,1,1),Tr.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new se(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new ie(e,this.intl,t)}relFormatter(e={}){return new ae(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=J[n];return r||(r=new Intl.ListFormat(e,t),J[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||te(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ye()?function(e){let t=ne.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...oe,...t}),ne.set(e,t)}return t}(this.locale):oe}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let le=null;class ce extends q{static get utcInstance(){return null===le&&(le=new ce(0)),le}static instance(e){return 0===e?ce.utcInstance:new ce(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ce(ct(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${mt(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${mt(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return mt(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class he extends q{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function de(e,t){if(Ue(e)||null===e)return t;if(e instanceof q)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?_.instance:"utc"===n||"gmt"===n?ce.utcInstance:ce.parseSpecifier(n)||H.create(e)}return _e(e)?ce.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new he(e)}const me={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},fe={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ye=me.hanidec.replace(/[\[|\]]/g,"").split("");const ge=new Map;function we({numberingSystem:e},t=""){const n=e||"latn";let r=ge.get(n);void 0===r&&(r=new Map,ge.set(n,r));let s=r.get(t);return void 0===s&&(s=new RegExp(`${me[n]}${t}`),r.set(t,s)),s}let pe,ve=()=>Date.now(),ke="system",be=null,Se=null,Oe=null,Te=60,Ne=null;class Me{static get now(){return ve}static set now(e){ve=e}static set defaultZone(e){ke=e}static get defaultZone(){return de(ke,_.instance)}static get defaultLocale(){return be}static set defaultLocale(e){be=e}static get defaultNumberingSystem(){return Se}static set defaultNumberingSystem(e){Se=e}static get defaultOutputCalendar(){return Oe}static set defaultOutputCalendar(e){Oe=e}static get defaultWeekSettings(){return Ne}static set defaultWeekSettings(e){Ne=Ge(e)}static get twoDigitCutoffYear(){return Te}static set twoDigitCutoffYear(e){Te=e%100}static get throwOnInvalid(){return pe}static set throwOnInvalid(e){pe=e}static resetCaches(){ue.resetCache(),H.resetCache(),Tr.resetCache(),ge.clear()}}class De{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ie=[0,31,59,90,120,151,181,212,243,273,304,334],Ve=[0,31,60,91,121,152,182,213,244,274,305,335];function Ee(e,t){return new De("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function xe(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return 0===s?7:s}function Ce(e,t,n){return n+(nt(e)?Ve:Ie)[t-1]}function Fe(e,t){const n=nt(e)?Ve:Ie,r=n.findIndex(e=>e<t);return{month:r+1,day:t-n[r]}}function We(e,t){return(e-t+7)%7+1}function $e(e,t=4,n=1){const{year:r,month:s,day:i}=e,a=Ce(r,s,i),o=We(xe(r,s,i),n);let u,l=Math.floor((a-o+14-t)/7);return l<1?(u=r-1,l=ot(u,t,n)):l>ot(r,t,n)?(u=r+1,l=1):u=r,{weekYear:u,weekNumber:l,weekday:o,...ft(e)}}function Le(e,t=4,n=1){const{weekYear:r,weekNumber:s,weekday:i}=e,a=We(xe(r,1,t),n),o=rt(r);let u,l=7*s+i-a-7+t;l<1?(u=r-1,l+=rt(u)):l>o?(u=r+1,l-=rt(r)):u=r;const{month:c,day:h}=Fe(u,l);return{year:u,month:c,day:h,...ft(e)}}function Ze(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:Ce(t,n,r),...ft(e)}}function je(e){const{year:t,ordinal:n}=e,{month:r,day:s}=Fe(t,n);return{year:t,month:r,day:s,...ft(e)}}function ze(e,t){if(!Ue(e.localWeekday)||!Ue(e.localWeekNumber)||!Ue(e.localWeekYear)){if(!Ue(e.weekday)||!Ue(e.weekNumber)||!Ue(e.weekYear))throw new d("Cannot mix locale-based week fields with ISO-based week fields");return Ue(e.localWeekday)||(e.weekday=e.localWeekday),Ue(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Ue(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Ae(e){const t=Re(e.year),n=Xe(e.month,1,12),r=Xe(e.day,1,st(e.year,e.month));return t?n?!r&&Ee("day",e.day):Ee("month",e.month):Ee("year",e.year)}function qe(e){const{hour:t,minute:n,second:r,millisecond:s}=e,i=Xe(t,0,23)||24===t&&0===n&&0===r&&0===s,a=Xe(n,0,59),o=Xe(r,0,59),u=Xe(s,0,999);return i?a?o?!u&&Ee("millisecond",s):Ee("second",r):Ee("minute",n):Ee("hour",t)}function Ue(e){return void 0===e}function _e(e){return"number"==typeof e}function Re(e){return"number"==typeof e&&e%1==0}function Pe(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Ye(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function He(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{const s=[t(r),r];return e&&n(e[0],s[0])===e[0]?e:s},null)[1]}function Je(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ge(e){if(null==e)return null;if("object"!=typeof e)throw new f("Week settings must be an object");if(!Xe(e.firstDay,1,7)||!Xe(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Xe(e,1,7)))throw new f("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Xe(e,t,n){return Re(e)&&e>=t&&e<=n}function Be(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Ke(e){return Ue(e)||null===e||""===e?void 0:parseInt(e,10)}function Qe(e){return Ue(e)||null===e||""===e?void 0:parseFloat(e)}function et(e){if(!Ue(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function tt(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function nt(e){return e%4==0&&(e%100!=0||e%400==0)}function rt(e){return nt(e)?366:365}function st(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?nt(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function it(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function at(e,t,n){return-We(xe(e,1,t),n)+t-1}function ot(e,t=4,n=1){const r=at(e,t,n),s=at(e+1,t,n);return(rt(e)-r+s)/7}function ut(e){return e>99?e:e>Me.twoDigitCutoffYear?1900+e:2e3+e}function lt(e,t,n,r=null){const s=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},o=new Intl.DateTimeFormat(n,a).formatToParts(s).find(e=>"timezonename"===e.type.toLowerCase());return o?o.value:null}function ct(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function ht(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new f(`Invalid unit value ${e}`);return t}function dt(e,t){const n={};for(const r in e)if(Je(e,r)){const s=e[r];if(null==s)continue;n[t(r)]=ht(s)}return n}function mt(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Be(n,2)}:${Be(r,2)}`;case"narrow":return`${s}${n}${r>0?`:${r}`:""}`;case"techie":return`${s}${Be(n,2)}${Be(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ft(e){return function(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}(e,["hour","minute","second","millisecond"])}const yt=["January","February","March","April","May","June","July","August","September","October","November","December"],gt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wt=["J","F","M","A","M","J","J","A","S","O","N","D"];function pt(e){switch(e){case"narrow":return[...wt];case"short":return[...gt];case"long":return[...yt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const vt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],kt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],bt=["M","T","W","T","F","S","S"];function St(e){switch(e){case"narrow":return[...bt];case"short":return[...kt];case"long":return[...vt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Ot=["AM","PM"],Tt=["Before Christ","Anno Domini"],Nt=["BC","AD"],Mt=["B","A"];function Dt(e){switch(e){case"narrow":return[...Mt];case"short":return[...Nt];case"long":return[...Tt];default:return null}}function It(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Vt={D:v,DD:k,DDD:S,DDDD:O,t:T,tt:N,ttt:M,tttt:D,T:I,TT:V,TTT:E,TTTT:x,f:C,ff:W,fff:Z,ffff:z,F:F,FF:$,FFF:j,FFFF:A};class Et{static create(e,t={}){return new Et(e,t)}static parseFormat(e){let t=null,n="",r=!1;const s=[];for(let i=0;i<e.length;i++){const a=e.charAt(i);"'"===a?((n.length>0||r)&&s.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||a===t?n+=a:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&s.push({literal:r||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(e){return Vt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return Be(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(t,n)=>this.loc.extract(e,t,n),i=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=()=>n?function(e){return Ot[e.hour<12?0:1]}(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),o=(t,r)=>n?function(e,t){return pt(t)[e.month-1]}(e,t):s(r?{month:t}:{month:t,day:"numeric"},"month"),u=(t,r)=>n?function(e,t){return St(t)[e.weekday-1]}(e,t):s(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const n=Et.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},c=t=>n?function(e,t){return Dt(t)[e.year<0?0:1]}(e,t):s({era:t},"era");return It(Et.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return r?s({day:"numeric"},"day"):this.num(e.day);case"dd":return r?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return r?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return r?s({month:"numeric"},"month"):this.num(e.month);case"MM":return r?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return r?s({year:"numeric"},"year"):this.num(e.year);case"yy":return r?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},s=Et.parseFormat(t),i=s.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),a=e.shiftTo(...i.map(r).filter(e=>e));return It(s,((e,t)=>s=>{const i=r(s);if(i){const r=t.isNegativeDuration&&i!==t.largestUnit?n:1;let a;return a="negativeLargestOnly"===this.opts.signMode&&i!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(i)*r,s.length,a)}return s})(a,{isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]}))}}const xt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ct(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function Ft(...e){return t=>e.reduce(([e,n,r],s)=>{const[i,a,o]=s(t,r);return[{...e,...i},a||n,o]},[{},null,1]).slice(0,2)}function Wt(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function $t(...e){return(t,n)=>{const r={};let s;for(s=0;s<e.length;s++)r[e[s]]=Ke(t[n+s]);return[r,null,n+s]}}const Lt=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Zt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,jt=RegExp(`${Zt.source}${`(?:${Lt.source}?(?:\\[(${xt.source})\\])?)?`}`),zt=RegExp(`(?:[Tt]${jt.source})?`),At=$t("weekYear","weekNumber","weekDay"),qt=$t("year","ordinal"),Ut=RegExp(`${Zt.source} ?(?:${Lt.source}|(${xt.source}))?`),_t=RegExp(`(?: ${Ut.source})?`);function Rt(e,t,n){const r=e[t];return Ue(r)?n:Ke(r)}function Pt(e,t){return[{hours:Rt(e,t,0),minutes:Rt(e,t+1,0),seconds:Rt(e,t+2,0),milliseconds:et(e[t+3])},null,t+4]}function Yt(e,t){const n=!e[t]&&!e[t+1],r=ct(e[t+1],e[t+2]);return[{},n?null:ce.instance(r),t+3]}function Ht(e,t){return[{},e[t]?H.create(e[t]):null,t+1]}const Jt=RegExp(`^T?${Zt.source}$`),Gt=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Xt(e){const[t,n,r,s,i,a,o,u,l]=e,c="-"===t[0],h=u&&"-"===u[0],d=(e,t=!1)=>void 0!==e&&(t||e&&c)?-e:e;return[{years:d(Qe(n)),months:d(Qe(r)),weeks:d(Qe(s)),days:d(Qe(i)),hours:d(Qe(a)),minutes:d(Qe(o)),seconds:d(Qe(u),"-0"===u),milliseconds:d(et(l),h)}]}const Bt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Kt(e,t,n,r,s,i,a){const o={year:2===t.length?ut(Ke(t)):Ke(t),month:gt.indexOf(n)+1,day:Ke(r),hour:Ke(s),minute:Ke(i)};return a&&(o.second=Ke(a)),e&&(o.weekday=e.length>3?vt.indexOf(e)+1:kt.indexOf(e)+1),o}const Qt=/^(?:(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\d)(\d\d)))$/;function en(e){const[,t,n,r,s,i,a,o,u,l,c,h]=e,d=Kt(t,s,r,n,i,a,o);let m;return m=u?Bt[u]:l?0:ct(c,h),[d,new ce(m)]}const tn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,nn=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,rn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function sn(e){const[,t,n,r,s,i,a,o]=e;return[Kt(t,s,r,n,i,a,o),ce.utcInstance]}function an(e){const[,t,n,r,s,i,a,o]=e;return[Kt(t,o,n,r,s,i,a),ce.utcInstance]}const on=Ct(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,zt),un=Ct(/(\d{4})-?W(\d\d)(?:-?(\d))?/,zt),ln=Ct(/(\d{4})-?(\d{3})/,zt),cn=Ct(jt),hn=Ft(function(e,t){return[{year:Rt(e,t),month:Rt(e,t+1,1),day:Rt(e,t+2,1)},null,t+3]},Pt,Yt,Ht),dn=Ft(At,Pt,Yt,Ht),mn=Ft(qt,Pt,Yt,Ht),fn=Ft(Pt,Yt,Ht);const yn=Ft(Pt);const gn=Ct(/(\d{4})-(\d\d)-(\d\d)/,_t),wn=Ct(Ut),pn=Ft(Pt,Yt,Ht);const vn="Invalid Duration",kn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},bn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...kn},Sn=365.2425,On=30.436875,Tn={years:{quarters:4,months:12,weeks:52.1775,days:Sn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:On,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...kn},Nn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Mn=Nn.slice(0).reverse();function Dn(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new xn(r)}function In(e,t){let n=t.milliseconds??0;for(const r of Mn.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Vn(e,t){const n=In(e,t)<0?-1:1;Nn.reduceRight((r,s)=>{if(Ue(t[s]))return r;if(r){const i=t[r]*n,a=e[s][r],o=Math.floor(i/a);t[s]+=o*n,t[r]-=o*a*n}return s},null),Nn.reduce((n,r)=>{if(Ue(t[r]))return n;if(n){const s=t[n]%1;t[n]-=s,t[r]+=s*e[n][r]}return r},null)}function En(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class xn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?Tn:bn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||ue.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return xn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new f("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new xn({values:dt(e,xn.normalizeUnit),loc:ue.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(_e(e))return xn.fromMillis(e);if(xn.isDuration(e))return e;if("object"==typeof e)return xn.fromObject(e);throw new f(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Wt(e,[Gt,Xt])}(e);return n?xn.fromObject(n,t):xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Wt(e,[Jt,yn])}(e);return n?xn.fromObject(n,t):xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new f("need to specify a reason the Duration is invalid");const n=e instanceof De?e:new De(e,t);if(Me.throwOnInvalid)throw new h(n);return new xn({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new m(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Et.create(this.loc,n).formatDurationFromString(this,e):vn}toHuman(e={}){if(!this.isValid)return vn;const t=!1!==e.showZeros,n=Nn.map(n=>{const r=this.values[n];return Ue(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=tt(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return Tr.fromMillis(t,{zone:"UTC"}).toISOTime(e)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?In(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=xn.fromDurationLike(e),n={};for(const e of Nn)(Je(t.values,e)||Je(this.values,e))&&(n[e]=t.get(e)+this.get(e));return Dn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=xn.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=ht(e(this.values[n],n));return Dn(this,{values:t},!0)}get(e){return this[xn.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return Dn(this,{values:{...this.values,...dt(e,xn.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return Dn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Vn(this.matrix,e),Dn(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return Dn(this,{values:En(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>xn.normalizeUnit(e));const t={},n={},r=this.toObject();let s;for(const i of Nn)if(e.indexOf(i)>=0){s=i;let e=0;for(const t in n)e+=this.matrix[t][i]*n[t],n[t]=0;_e(r[i])&&(e+=r[i]);const a=Math.trunc(e);t[i]=a,n[i]=(1e3*e-1e3*a)/1e3}else _e(r[i])&&(n[i]=r[i]);for(const e in n)0!==n[e]&&(t[s]+=e===s?n[e]:n[e]/this.matrix[s][e]);return Vn(this.matrix,t),Dn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return Dn(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;return Dn(this,{values:En(this.values)},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of Nn)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Cn="Invalid Interval";class Fn{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new f("need to specify a reason the Interval is invalid");const n=e instanceof De?e:new De(e,t);if(Me.throwOnInvalid)throw new c(n);return new Fn({invalid:n})}static fromDateTimes(e,t){const n=Nr(e),r=Nr(t),s=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?Fn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:Fn.invalid("missing or invalid end"):Fn.invalid("missing or invalid start")}(n,r);return null==s?new Fn({start:n,end:r}):s}static after(e,t){const n=xn.fromDurationLike(t),r=Nr(e);return Fn.fromDateTimes(r,r.plus(n))}static before(e,t){const n=xn.fromDurationLike(t),r=Nr(e);return Fn.fromDateTimes(r.minus(n),r)}static fromISO(e,t){const[n,r]=(e||"").split("/",2);if(n&&r){let e,s,i,a;try{e=Tr.fromISO(n,t),s=e.isValid}catch(r){s=!1}try{i=Tr.fromISO(r,t),a=i.isValid}catch(r){a=!1}if(s&&a)return Fn.fromDateTimes(e,i);if(s){const n=xn.fromISO(r,t);if(n.isValid)return Fn.after(e,n)}else if(a){const e=xn.fromISO(n,t);if(e.isValid)return Fn.before(i,e)}}return Fn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let r;return r=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?Fn.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Nr).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:r}=this,s=0;for(;r<this.e;){const e=t[s]||this.e,i=+e>+this.e?this.e:e;n.push(Fn.fromDateTimes(r,i)),r=i,s+=1}return n}splitBy(e){const t=xn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,s=1;const i=[];for(;r<this.e;){const e=this.start.plus(t.mapUnits(e=>e*s));n=+e>+this.e?this.e:e,i.push(Fn.fromDateTimes(r,n)),r=n,s+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:Fn.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Fn.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],s=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),i=Array.prototype.concat(...s).sort((e,t)=>e.time-t.time);for(const e of i)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(Fn.fromDateTimes(t,e.time)),t=null);return Fn.merge(r)}difference(...e){return Fn.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Cn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=v,t={}){return this.isValid?Et.create(this.s.loc.clone(t),e).formatInterval(this):Cn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Cn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Cn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Cn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Cn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):xn.invalid(this.invalidReason)}mapEndpoints(e){return Fn.fromDateTimes(e(this.s),e(this.e))}}class Wn{static hasDST(e=Me.defaultZone){const t=Tr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return H.isValidZone(e)}static normalizeZone(e){return de(e,Me.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ue.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ue.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ue.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||ue.create(t,n,s)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||ue.create(t,n,s)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ue.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ue.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ue.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ue.create(t,null,"gregory").eras(e)}static features(){return{relative:Pe(),localeWeek:Ye()}}}function $n(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(xn.fromMillis(r).as("days"))}function Ln(e,t,n,r){let[s,i,a,o]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=$n(e,t);return(n-n%7)/7}],["days",$n]],s={},i=e;let a,o;for(const[u,l]of r)n.indexOf(u)>=0&&(a=u,s[u]=l(e,t),o=i.plus(s),o>t?(s[u]--,(e=i.plus(s))>t&&(o=e,s[u]--,e=i.plus(s))):e=o);return[e,s,o,a]}(e,t,n);const u=t-s,l=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===l.length&&(a<t&&(a=s.plus({[o]:1})),a!==s&&(i[o]=(i[o]||0)+u/(a-s)));const c=xn.fromObject(i,r);return l.length>0?xn.fromMillis(u,r).shiftTo(...l).plus(c):c}function Zn(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(-1!==e[n].search(me.hanidec))t+=ye.indexOf(e[n]);else for(const e in fe){const[n,s]=fe[e];r>=n&&r<=s&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const jn=`[ ${String.fromCharCode(160)}]`,zn=new RegExp(jn,"g");function An(e){return e.replace(/\./g,"\\.?").replace(zn,jn)}function qn(e){return e.replace(/\./g,"").replace(zn," ").toLowerCase()}function Un(e,t){return null===e?null:{regex:RegExp(e.map(An).join("|")),deser:([n])=>e.findIndex(e=>qn(n)===qn(e))+t}}function _n(e,t){return{regex:e,deser:([,e,t])=>ct(e,t),groups:t}}function Rn(e){return{regex:e,deser:([e])=>e}}const Pn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Yn=null;function Hn(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Xn(Et.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class Jn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Hn(Et.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=we(t),r=we(t,"{2}"),s=we(t,"{3}"),i=we(t,"{4}"),a=we(t,"{6}"),o=we(t,"{1,2}"),u=we(t,"{1,3}"),l=we(t,"{1,6}"),c=we(t,"{1,9}"),h=we(t,"{2,4}"),d=we(t,"{4,6}"),m=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},f=(f=>{if(e.literal)return m(f);switch(f.val){case"G":return Un(t.eras("short"),0);case"GG":return Un(t.eras("long"),0);case"y":return Zn(l);case"yy":case"kk":return Zn(h,ut);case"yyyy":case"kkkk":return Zn(i);case"yyyyy":return Zn(d);case"yyyyyy":return Zn(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Zn(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Zn(r);case"MMM":return Un(t.months("short",!0),1);case"MMMM":return Un(t.months("long",!0),1);case"LLL":return Un(t.months("short",!1),1);case"LLLL":return Un(t.months("long",!1),1);case"o":case"S":return Zn(u);case"ooo":case"SSS":return Zn(s);case"u":return Rn(c);case"uu":return Rn(o);case"uuu":case"E":case"c":return Zn(n);case"a":return Un(t.meridiems(),0);case"EEE":return Un(t.weekdays("short",!1),1);case"EEEE":return Un(t.weekdays("long",!1),1);case"ccc":return Un(t.weekdays("short",!0),1);case"cccc":return Un(t.weekdays("long",!0),1);case"Z":case"ZZ":return _n(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return _n(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return Rn(/[a-z_+-/]{1,256}?/i);case" ":return Rn(/[^\S\n\r]/);default:return m(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const s in n)if(Je(n,s)){const i=n[s],a=i.groups?i.groups+1:1;!i.literal&&i.token&&(e[i.token.val[0]]=i.deser(r.slice(t,t+a))),t+=a}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,s,i]=n?function(e){let t,n=null;return Ue(e.z)||(n=H.create(e.z)),Ue(e.Z)||(n||(n=new ce(e.Z)),t=e.Z),Ue(e.q)||(e.M=3*(e.q-1)+1),Ue(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Ue(e.u)||(e.S=et(e.u)),[Object.keys(e).reduce((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t},{}),n,t]}(n):[null,null,void 0];if(Je(n,"a")&&Je(n,"H"))throw new d("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:s,specificOffset:i}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Gn(e,t,n){return new Jn(e,n).explainFromTokens(t)}function Xn(e,t){if(!e)return null;const n=Et.create(t,e).dtFormatter((Yn||(Yn=Tr.fromMillis(1555555555555)),Yn)),r=n.formatToParts(),s=n.resolvedOptions();return r.map(t=>function(e,t,n){const{type:r,value:s}=e;if("literal"===r){const e=/^\s+$/.test(s);return{literal:!e,val:e?" ":s}}const i=t[r];let a=r;"hour"===r&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let o=Pn[a];if("object"==typeof o&&(o=o[i]),o)return{literal:!1,val:o}}(t,e,s))}const Bn="Invalid DateTime",Kn=864e13;function Qn(e){return new De("unsupported zone",`the zone "${e.name}" is not supported`)}function er(e){return null===e.weekData&&(e.weekData=$e(e.c)),e.weekData}function tr(e){return null===e.localWeekData&&(e.localWeekData=$e(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function nr(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Tr({...n,...t,old:n})}function rr(e,t,n){let r=e-60*t*1e3;const s=n.offset(r);if(t===s)return[r,t];r-=60*(s-t)*1e3;const i=n.offset(r);return s===i?[r,s]:[e-60*Math.min(s,i)*1e3,Math.max(s,i)]}function sr(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function ir(e,t,n){return rr(it(e),t,n)}function ar(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i={...e.c,year:r,month:s,day:Math.min(e.c.day,st(r,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=xn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=it(i);let[u,l]=rr(o,n,e.zone);return 0!==a&&(u+=a,l=e.zone.offset(u)),{ts:u,o:l}}function or(e,t,n,r,s,i){const{setZone:a,zone:o}=n;if(e&&0!==Object.keys(e).length||t){const r=t||o,s=Tr.fromObject(e,{...n,zone:r,specificOffset:i});return a?s:s.setZone(o)}return Tr.invalid(new De("unparsable",`the input "${s}" can't be parsed as ${r}`))}function ur(e,t,n=!0){return e.isValid?Et.create(ue.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function lr(e,t,n){const r=e.c.year>9999||e.c.year<0;let s="";if(r&&e.c.year>=0&&(s+="+"),s+=Be(e.c.year,r?6:4),"year"===n)return s;if(t){if(s+="-",s+=Be(e.c.month),"month"===n)return s;s+="-"}else if(s+=Be(e.c.month),"month"===n)return s;return s+=Be(e.c.day),s}function cr(e,t,n,r,s,i,a){let o=!n||0!==e.c.millisecond||0!==e.c.second,u="";switch(a){case"day":case"month":case"year":break;default:if(u+=Be(e.c.hour),"hour"===a)break;if(t){if(u+=":",u+=Be(e.c.minute),"minute"===a)break;o&&(u+=":",u+=Be(e.c.second))}else{if(u+=Be(e.c.minute),"minute"===a)break;o&&(u+=Be(e.c.second))}if("second"===a)break;!o||r&&0===e.c.millisecond||(u+=".",u+=Be(e.c.millisecond,3))}return s&&(e.isOffsetFixed&&0===e.offset&&!i?u+="Z":e.o<0?(u+="-",u+=Be(Math.trunc(-e.o/60)),u+=":",u+=Be(Math.trunc(-e.o%60))):(u+="+",u+=Be(Math.trunc(e.o/60)),u+=":",u+=Be(Math.trunc(e.o%60)))),i&&(u+="["+e.zone.ianaName+"]"),u}const hr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},dr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},mr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},fr=["year","month","day","hour","minute","second","millisecond"],yr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],gr=["year","ordinal","hour","minute","second","millisecond"];function wr(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new m(e);return t}function pr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return wr(e)}}function vr(e,t){const n=de(t.zone,Me.defaultZone);if(!n.isValid)return Tr.invalid(Qn(n));const r=ue.fromObject(t);let s,i;if(Ue(e.year))s=Me.now();else{for(const t of fr)Ue(e[t])&&(e[t]=hr[t]);const t=Ae(e)||qe(e);if(t)return Tr.invalid(t);const r=function(e){if(void 0===Sr&&(Sr=Me.now()),"iana"!==e.type)return e.offset(Sr);const t=e.name;let n=Or.get(t);return void 0===n&&(n=e.offset(Sr),Or.set(t,n)),n}(n);[s,i]=ir(e,r,n)}return new Tr({ts:s,zone:n,loc:r,o:i})}function kr(e,t,n){const r=!!Ue(n.round)||n.round,s=Ue(n.rounding)?"trunc":n.rounding,i=(e,i)=>{e=tt(e,r||n.calendary?0:2,n.calendary?"round":s);return t.loc.clone(n).relFormatter(n).format(e,i)},a=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return i(a(n.unit),n.unit);for(const e of n.units){const t=a(e);if(Math.abs(t)>=1)return i(t,e)}return i(e>t?-0:0,n.units[n.units.length-1])}function br(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let Sr;const Or=new Map;class Tr{constructor(e){const t=e.zone||Me.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new De("invalid input"):null)||(t.isValid?null:Qn(t));this.ts=Ue(e.ts)?Me.now():e.ts;let r=null,s=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,s]=[e.old.c,e.old.o];else{const i=_e(e.o)&&!e.old?e.o:t.offset(this.ts);r=sr(this.ts,i),n=Number.isNaN(r.year)?new De("invalid input"):null,r=n?null:r,s=n?null:i}}this._zone=t,this.loc=e.loc||ue.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=s,this.isLuxonDateTime=!0}static now(){return new Tr({})}static local(){const[e,t]=br(arguments),[n,r,s,i,a,o,u]=t;return vr({year:n,month:r,day:s,hour:i,minute:a,second:o,millisecond:u},e)}static utc(){const[e,t]=br(arguments),[n,r,s,i,a,o,u]=t;return e.zone=ce.utcInstance,vr({year:n,month:r,day:s,hour:i,minute:a,second:o,millisecond:u},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return Tr.invalid("invalid input");const s=de(t.zone,Me.defaultZone);return s.isValid?new Tr({ts:n,zone:s,loc:ue.fromObject(t)}):Tr.invalid(Qn(s))}static fromMillis(e,t={}){if(_e(e))return e<-Kn||e>Kn?Tr.invalid("Timestamp out of range"):new Tr({ts:e,zone:de(t.zone,Me.defaultZone),loc:ue.fromObject(t)});throw new f(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(_e(e))return new Tr({ts:1e3*e,zone:de(t.zone,Me.defaultZone),loc:ue.fromObject(t)});throw new f("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=de(t.zone,Me.defaultZone);if(!n.isValid)return Tr.invalid(Qn(n));const r=ue.fromObject(t),s=dt(e,pr),{minDaysInFirstWeek:i,startOfWeek:a}=ze(s,r),o=Me.now(),u=Ue(t.specificOffset)?n.offset(o):t.specificOffset,l=!Ue(s.ordinal),c=!Ue(s.year),h=!Ue(s.month)||!Ue(s.day),m=c||h,f=s.weekYear||s.weekNumber;if((m||l)&&f)throw new d("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&l)throw new d("Can't mix ordinal dates with month/day");const y=f||s.weekday&&!m;let g,w,p=sr(o,u);y?(g=yr,w=dr,p=$e(p,i,a)):l?(g=gr,w=mr,p=Ze(p)):(g=fr,w=hr);let v=!1;for(const e of g){Ue(s[e])?s[e]=v?w[e]:p[e]:v=!0}const k=y?function(e,t=4,n=1){const r=Re(e.weekYear),s=Xe(e.weekNumber,1,ot(e.weekYear,t,n)),i=Xe(e.weekday,1,7);return r?s?!i&&Ee("weekday",e.weekday):Ee("week",e.weekNumber):Ee("weekYear",e.weekYear)}(s,i,a):l?function(e){const t=Re(e.year),n=Xe(e.ordinal,1,rt(e.year));return t?!n&&Ee("ordinal",e.ordinal):Ee("year",e.year)}(s):Ae(s),b=k||qe(s);if(b)return Tr.invalid(b);const S=y?Le(s,i,a):l?je(s):s,[O,T]=ir(S,u,n),N=new Tr({ts:O,zone:n,o:T,loc:r});return s.weekday&&m&&e.weekday!==N.weekday?Tr.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${N.toISO()}`):N.isValid?N:Tr.invalid(N.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return Wt(e,[on,hn],[un,dn],[ln,mn],[cn,fn])}(e);return or(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return Wt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Qt,en])}(e);return or(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return Wt(e,[tn,sn],[nn,sn],[rn,an])}(e);return or(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Ue(e)||Ue(t))throw new f("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:s=null}=n,i=ue.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),[a,o,u,l]=function(e,t,n){const{result:r,zone:s,specificOffset:i,invalidReason:a}=Gn(e,t,n);return[r,s,i,a]}(i,e,t);return l?Tr.invalid(l):or(a,o,n,`format ${t}`,e,u)}static fromString(e,t,n={}){return Tr.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return Wt(e,[gn,hn],[wn,pn])}(e);return or(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new f("need to specify a reason the DateTime is invalid");const n=e instanceof De?e:new De(e,t);if(Me.throwOnInvalid)throw new l(n);return new Tr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Xn(e,ue.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Hn(Et.parseFormat(e),ue.fromObject(t)).map(e=>e.val).join("")}static resetCache(){Sr=void 0,Or.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?er(this).weekYear:NaN}get weekNumber(){return this.isValid?er(this).weekNumber:NaN}get weekday(){return this.isValid?er(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?tr(this).weekday:NaN}get localWeekNumber(){return this.isValid?tr(this).weekNumber:NaN}get localWeekYear(){return this.isValid?tr(this).weekYear:NaN}get ordinal(){return this.isValid?Ze(this.c).ordinal:NaN}get monthShort(){return this.isValid?Wn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Wn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Wn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Wn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=it(this.c),r=this.zone.offset(n-e),s=this.zone.offset(n+e),i=this.zone.offset(n-r*t),a=this.zone.offset(n-s*t);if(i===a)return[this];const o=n-i*t,u=n-a*t,l=sr(o,i),c=sr(u,a);return l.hour===c.hour&&l.minute===c.minute&&l.second===c.second&&l.millisecond===c.millisecond?[nr(this,{ts:o}),nr(this,{ts:u})]:[this]}get isInLeapYear(){return nt(this.year)}get daysInMonth(){return st(this.year,this.month)}get daysInYear(){return this.isValid?rt(this.year):NaN}get weeksInWeekYear(){return this.isValid?ot(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ot(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=Et.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(ce.instance(e),t)}toLocal(){return this.setZone(Me.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=de(e,Me.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=ir(n,t,e)}return nr(this,{ts:r,zone:e})}return Tr.invalid(Qn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return nr(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=dt(e,pr),{minDaysInFirstWeek:n,startOfWeek:r}=ze(t,this.loc),s=!Ue(t.weekYear)||!Ue(t.weekNumber)||!Ue(t.weekday),i=!Ue(t.ordinal),a=!Ue(t.year),o=!Ue(t.month)||!Ue(t.day),u=a||o,l=t.weekYear||t.weekNumber;if((u||i)&&l)throw new d("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&i)throw new d("Can't mix ordinal dates with month/day");let c;s?c=Le({...$e(this.c,n,r),...t},n,r):Ue(t.ordinal)?(c={...this.toObject(),...t},Ue(t.day)&&(c.day=Math.min(st(c.year,c.month),c.day))):c=je({...Ze(this.c),...t});const[h,m]=ir(c,this.o,this.zone);return nr(this,{ts:h,o:m})}plus(e){if(!this.isValid)return this;return nr(this,ar(this,xn.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return nr(this,ar(this,xn.fromDurationLike(e).negate()))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=xn.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;if("quarters"===r){const e=Math.ceil(this.month/3);n.month=3*(e-1)+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Et.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Bn}toLocaleString(e=v,t={}){return this.isValid?Et.create(this.loc.clone(t),e).formatDateTime(this):Bn}toLocaleParts(e={}){return this.isValid?Et.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:s=!1,precision:i="milliseconds"}={}){if(!this.isValid)return null;const a="extended"===e;let o=lr(this,a,i=wr(i));return fr.indexOf(i)>=3&&(o+="T"),o+=cr(this,a,t,n,r,s,i),o}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?lr(this,"extended"===e,wr(t)):null}toISOWeekDate(){return ur(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:s=!1,format:i="extended",precision:a="milliseconds"}={}){if(!this.isValid)return null;return a=wr(a),(r&&fr.indexOf(a)>=3?"T":"")+cr(this,"extended"===i,t,e,n,s,a)}toRFC2822(){return ur(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ur(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?lr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),ur(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Bn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return xn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},s=(o=t,Array.isArray(o)?o:[o]).map(xn.normalizeUnit),i=e.valueOf()>this.valueOf(),a=Ln(i?this:e,i?e:this,s,r);var o;return i?a.negate():a}diffNow(e="milliseconds",t={}){return this.diff(Tr.now(),e,t)}until(e){return this.isValid?Fn.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,n)<=r&&r<=s.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Tr.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(r=e.unit,s=void 0),kr(t,this.plus(n),{...e,numeric:"always",units:r,unit:s})}toRelativeCalendar(e={}){return this.isValid?kr(e.base||Tr.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Tr.isDateTime))throw new f("min requires all arguments be DateTimes");return He(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(Tr.isDateTime))throw new f("max requires all arguments be DateTimes");return He(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:s=null}=n;return Gn(ue.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return Tr.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,s=ue.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Jn(s,e)}static fromFormatParser(e,t,n={}){if(Ue(e)||Ue(t))throw new f("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:s=null}=n,i=ue.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});if(!i.equals(t.locale))throw new f(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${t.locale}`);const{result:a,zone:o,specificOffset:u,invalidReason:l}=t.explainFromTokens(e);return l?Tr.invalid(l):or(a,o,n,`format ${t.format}`,e,u)}static get DATE_SHORT(){return v}static get DATE_MED(){return k}static get DATE_MED_WITH_WEEKDAY(){return b}static get DATE_FULL(){return S}static get DATE_HUGE(){return O}static get TIME_SIMPLE(){return T}static get TIME_WITH_SECONDS(){return N}static get TIME_WITH_SHORT_OFFSET(){return M}static get TIME_WITH_LONG_OFFSET(){return D}static get TIME_24_SIMPLE(){return I}static get TIME_24_WITH_SECONDS(){return V}static get TIME_24_WITH_SHORT_OFFSET(){return E}static get TIME_24_WITH_LONG_OFFSET(){return x}static get DATETIME_SHORT(){return C}static get DATETIME_SHORT_WITH_SECONDS(){return F}static get DATETIME_MED(){return W}static get DATETIME_MED_WITH_SECONDS(){return $}static get DATETIME_MED_WITH_WEEKDAY(){return L}static get DATETIME_FULL(){return Z}static get DATETIME_FULL_WITH_SECONDS(){return j}static get DATETIME_HUGE(){return z}static get DATETIME_HUGE_WITH_SECONDS(){return A}}function Nr(e){if(Tr.isDateTime(e))return e;if(e&&e.valueOf&&_e(e.valueOf()))return Tr.fromJSDate(e);if(e&&"object"==typeof e)return Tr.fromObject(e);throw new f(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var Mr=function(){return r(function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"emitter",void 0),s(this,"url",void 0),s(this,"cmsKey",void 0),s(this,"channel",void 0),s(this,"socket",void 0),s(this,"isConnectionWanted",void 0),s(this,"isConnected",void 0),s(this,"lastMessageAt",void 0),s(this,"interval",void 0),this.emitter={emit:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var s=this.events[e]||[],i=0,a=s.length;i<a;i++)s[i].apply(s,n)},events:{},on:function(e,t){var n,r=this;return((n=this.events)[e]||(n[e]=[])).push(t),function(){var n;r.events[e]=null===(n=r.events[e])||void 0===n?void 0:n.filter(function(e){return t!==e})}}},this.url=null,this.cmsKey=null,this.channel=t,this.isConnected=!1,this.isConnectionWanted=!1,this.lastMessageAt=Tr.now().minus({year:1})},[{key:"on",value:function(e,t){return this.emitter.on(e,t)}},{key:"init",value:(a=n(i().m(function e(){var t=this;return i().w(function(e){for(;;)switch(e.n){case 0:this.interval=setInterval(function(){t.isConnectionWanted&&!t.isActive()&&(console.debug("Xmr::setInterval: should be active"),t.start(t.url||"DISABLED",t.cmsKey||"n/a"))},6e4);case 1:return e.a(2)}},e,this)})),function(){return a.apply(this,arguments)})},{key:"start",value:(t=n(i().m(function e(t,n){var r,s=this;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:if(this.channel&&"unknown"!==this.channel){e.n=1;break}return console.error("Xmr::start: channel unknown, XMR will be disabled"),e.a(2);case 1:if("DISABLED"!==this.url){e.n=2;break}return console.info("Xmr::start: XMR disabled"),this.isConnectionWanted=!1,this.isActive()&&stop(),e.a(2);case 2:if(this.isConnectionWanted=!0,!this.isActive()||this.url!==t){e.n=3;break}return console.debug("Xmr::start: already connected to this URL"),this.cmsKey=n,e.a(2);case 3:if(!this.isConnected){e.n=5;break}return console.debug("Xmr::start: already connected but not active, or a different URL"),e.n=4,this.stop();case 4:e.n=6;break;case 5:console.debug("Xmr::start: not connected yet");case 6:this.url=t,this.cmsKey=n,console.debug("Xmr::start: connecting to "+this.url),e.p=7,this.socket=new WebSocket(this.url),e.n=9;break;case 8:return e.p=8,r=e.v,console.debug("Xmr::start: failed connecting to "+this.url+", e = "+r),this.emitter.emit("error","Failed to connect"),e.a(2);case 9:this.socket.addEventListener("open",function(e){console.debug("Xmr::"+e.type),s.socket.readyState===WebSocket.OPEN?(s.socket.send(JSON.stringify({type:"init",key:s.cmsKey,channel:s.channel})),s.isConnected=!0,s.emitter.emit("connected")):console.info("Xmr::"+e.type+": not open yet")}),this.socket.addEventListener("close",function(e){console.debug("Xmr::"+e.type),s.isConnected=!1,s.emitter.emit("disconnected")}),this.socket.addEventListener("error",function(e){console.debug("Xmr::"+e.type),s.emitter.emit("error","error")}),this.socket.addEventListener("message",function(e){if(console.debug(e),s.lastMessageAt=Tr.now(),s.emitter.emit("statusChange",s.lastMessageAt.toISO()||""),"H"===e.data)console.debug("Xmr::message: Heartbeat...");else{var t=JSON.parse(e.data);console.debug("Xmr::message: action is "+t.action);var n=Tr.fromISO(t.createdDt).plus({seconds:parseInt(t.ttl)});n<Tr.now()?console.debug("Xmr::message: message expired at "+n.toString()):"collectNow"===t.action?s.emitter.emit("collectNow"):"screenShot"===t.action?s.emitter.emit("screenShot"):"licenceCheck"===t.action?s.emitter.emit("licenceCheck"):"criteriaUpdate"==t.action?s.emitter.emit("criteriaUpdate",t.criteriaUpdates):"commandAction"==t.action?s.emitter.emit("commandCodeReceived",t.commandCode):"dataUpdate"==t.action?s.emitter.emit("dataUpdate",t.widgetId):console.error("Xmr::message: unknown action: "+t.action)}});case 10:return e.a(2)}},e,this,[[7,8]])})),function(e,n){return t.apply(this,arguments)})},{key:"stop",value:(e=n(i().m(function e(){return i().w(function(e){for(;;)switch(e.n){case 0:console.debug("Xmr::stop"),this.socket&&(console.debug("Xmr::stop: closing active socket"),this.socket.close(),this.isConnected=!1);case 1:return e.a(2)}},e,this)})),function(){return e.apply(this,arguments)})},{key:"isActive",value:function(){return console.debug("Xmr::isActive: lastMessageAt: "+this.lastMessageAt.toString()),this.isConnected&&this.lastMessageAt>Tr.now().minus({minute:15})}}]);var e,t,a}();return e.Xmr=Mr,e}({});
|
|
3
|
+
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function o(n,r,s,i){var o=r&&r.prototype instanceof l?r:l,c=Object.create(o.prototype);return a(c,"_invoke",function(n,r,s){var i,a,o,l=0,c=s||[],h=!1,d={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return i=t,a=0,o=e,d.n=n,u}};function m(n,r){for(a=n,o=r,t=0;!h&&l&&!s&&t<c.length;t++){var s,i=c[t],m=d.p,f=i[2];n>3?(s=f===r)&&(o=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=m&&((s=n<2&&m<i[1])?(a=0,d.v=r,d.n=i[1]):m<f&&(s=n<3||i[0]>r||r>f)&&(i[4]=n,i[5]=r,d.n=f,a=0))}if(s||n>1)return u;throw h=!0,r}return function(s,c,f){if(l>1)throw TypeError("Generator is already running");for(h&&1===c&&m(c,f),a=c,o=f;(t=a<2?e:o)||!h;){i||(a?a<3?(a>1&&(d.n=-1),m(a,o)):d.n=o:d.v=o);try{if(l=2,i){if(a||(s="next"),t=i[s]){if(!(t=t.call(i,o)))throw TypeError("iterator result is not an object");if(!t.done)return t;o=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(o=TypeError("The iterator does not provide a '"+s+"' method"),a=1);i=e}else if((t=(h=d.n<0)?o:n.call(r,d))!==u)break}catch(t){i=e,a=1,o=t}finally{l=1}}return{value:t,done:h}}}(n,s,i),!0),c}var u={};function l(){}function c(){}function h(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(a(t={},r,function(){return this}),t),m=h.prototype=l.prototype=Object.create(d);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,a(e,s,"GeneratorFunction")),e.prototype=Object.create(m),e}return c.prototype=h,a(m,"constructor",h),a(h,"constructor",c),c.displayName="GeneratorFunction",a(h,s,"GeneratorFunction"),a(m),a(m,s,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),(i=function(){return{w:o,m:f}})()}function a(e,t,n,r){var s=Object.defineProperty;try{s({},"",{})}catch(e){s=0}a=function(e,t,n,r){function i(t,n){a(e,t,function(e){return this._invoke(t,n,e)})}t?s?s(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},a(e,t,n,r)}function o(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}class u extends Error{}class l extends u{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class c extends u{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class h extends u{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class d extends u{}class m extends u{constructor(e){super(`Invalid unit ${e}`)}}class f extends u{}class y extends u{constructor(){super("Zone is an abstract class")}}const g="numeric",w="short",p="long",v={year:g,month:g,day:g},k={year:g,month:w,day:g},b={year:g,month:w,day:g,weekday:w},S={year:g,month:p,day:g},O={year:g,month:p,day:g,weekday:p},T={hour:g,minute:g},N={hour:g,minute:g,second:g},M={hour:g,minute:g,second:g,timeZoneName:w},D={hour:g,minute:g,second:g,timeZoneName:p},I={hour:g,minute:g,hourCycle:"h23"},V={hour:g,minute:g,second:g,hourCycle:"h23"},E={hour:g,minute:g,second:g,hourCycle:"h23",timeZoneName:w},x={hour:g,minute:g,second:g,hourCycle:"h23",timeZoneName:p},C={year:g,month:g,day:g,hour:g,minute:g},F={year:g,month:g,day:g,hour:g,minute:g,second:g},W={year:g,month:w,day:g,hour:g,minute:g},$={year:g,month:w,day:g,hour:g,minute:g,second:g},L={year:g,month:w,day:g,weekday:w,hour:g,minute:g},Z={year:g,month:p,day:g,hour:g,minute:g,timeZoneName:w},j={year:g,month:p,day:g,hour:g,minute:g,second:g,timeZoneName:w},z={year:g,month:p,day:g,weekday:p,hour:g,minute:g,timeZoneName:p},A={year:g,month:p,day:g,weekday:p,hour:g,minute:g,second:g,timeZoneName:p};class q{get type(){throw new y}get name(){throw new y}get ianaName(){return this.name}get isUniversal(){throw new y}offsetName(e,t){throw new y}formatOffset(e,t){throw new y}offset(e){throw new y}equals(e){throw new y}get isValid(){throw new y}}let U=null;class _ extends q{static get instance(){return null===U&&(U=new _),U}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return lt(e,t,n)}formatOffset(e,t){return mt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const R=new Map;const P={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};const Y=new Map;class H extends q{static create(e){let t=Y.get(e);return void 0===t&&Y.set(e,t=new H(e)),t}static resetCache(){Y.clear(),R.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=H.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return lt(e,t,n,this.name)}formatOffset(e,t){return mt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=R.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),R.set(e,t)),t}(this.name);let[r,s,i,a,o,u,l]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const{type:t,value:s}=n[e],i=P[t];"era"===t?r[i]=s:Ue(i)||(r[i]=parseInt(s,10))}return r}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,i,a,o,u,l,c]=r;return[a,s,i,o,u,l,c]}(n,t);"BC"===a&&(r=1-Math.abs(r));let c=+t;const h=c%1e3;return c-=h>=0?h:1e3+h,(it({year:r,month:s,day:i,hour:24===o?0:o,minute:u,second:l,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let J={};const G=new Map;function X(e,t={}){const n=JSON.stringify([e,t]);let r=G.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),G.set(n,r)),r}const B=new Map;const K=new Map;let Q=null;const ee=new Map;function te(e){let t=ee.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),ee.set(e,t)),t}const ne=new Map;function re(e,t,n,r){const s=e.listingMode();return"error"===s?null:"en"===s?n(t):r(t)}class se{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:s,...i}=n;if(!t||Object.keys(i).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=B.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),B.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Be(this.floor?Math.floor(e):tt(e,3),this.padTo)}}class ie{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&H.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||r,this.dtf=X(t,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class ae{constructor(e,t,n){this.opts={style:"long",...n},!t&&Pe()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,s=JSON.stringify([e,r]);let i=K.get(s);return void 0===i&&(i=new Intl.RelativeTimeFormat(e,t),K.set(s,i)),i}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${s[e][0]}`;case-1:return n?"yesterday":`last ${s[e][0]}`;case 0:return n?"today":`this ${s[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),u=1===o,l=s[e],c=r?u?l[1]:l[2]||l[1]:u?s[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const oe={firstDay:1,minimalDays:4,weekend:[6,7]};class ue{static fromOpts(e){return ue.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,s=!1){const i=e||Me.defaultLocale,a=i||(s?"en-US":Q||(Q=(new Intl.DateTimeFormat).resolvedOptions().locale,Q)),o=t||Me.defaultNumberingSystem,u=n||Me.defaultOutputCalendar,l=Ge(r)||Me.defaultWeekSettings;return new ue(a,o,u,l,i)}static resetCache(){Q=null,G.clear(),B.clear(),K.clear(),ee.clear(),ne.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return ue.create(e,t,n,r)}constructor(e,t,n,r,s){const[i,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=X(e).resolvedOptions(),r=e}catch(s){const i=e.substring(0,n);t=X(i).resolvedOptions(),r=i}const{numberingSystem:s,calendar:i}=t;return[r,s,i]}}(e);this.locale=i,this.numberingSystem=t||a||null,this.outputCalendar=n||o||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===te(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?ue.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ge(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return re(this,e,pt,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";if(!this.monthsCache[s][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[s][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=Tr.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[s][e]})}weekdays(e,t=!1){return re(this,e,St,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=Tr.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return re(this,void 0,()=>Ot,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Tr.utc(2016,11,13,9),Tr.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return re(this,e,Dt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[Tr.utc(-40,1,1),Tr.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new se(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new ie(e,this.intl,t)}relFormatter(e={}){return new ae(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=J[n];return r||(r=new Intl.ListFormat(e,t),J[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||te(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ye()?function(e){let t=ne.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...oe,...t}),ne.set(e,t)}return t}(this.locale):oe}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let le=null;class ce extends q{static get utcInstance(){return null===le&&(le=new ce(0)),le}static instance(e){return 0===e?ce.utcInstance:new ce(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ce(ct(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${mt(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${mt(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return mt(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class he extends q{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function de(e,t){if(Ue(e)||null===e)return t;if(e instanceof q)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?_.instance:"utc"===n||"gmt"===n?ce.utcInstance:ce.parseSpecifier(n)||H.create(e)}return _e(e)?ce.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new he(e)}const me={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},fe={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ye=me.hanidec.replace(/[\[|\]]/g,"").split("");const ge=new Map;function we({numberingSystem:e},t=""){const n=e||"latn";let r=ge.get(n);void 0===r&&(r=new Map,ge.set(n,r));let s=r.get(t);return void 0===s&&(s=new RegExp(`${me[n]}${t}`),r.set(t,s)),s}let pe,ve=()=>Date.now(),ke="system",be=null,Se=null,Oe=null,Te=60,Ne=null;class Me{static get now(){return ve}static set now(e){ve=e}static set defaultZone(e){ke=e}static get defaultZone(){return de(ke,_.instance)}static get defaultLocale(){return be}static set defaultLocale(e){be=e}static get defaultNumberingSystem(){return Se}static set defaultNumberingSystem(e){Se=e}static get defaultOutputCalendar(){return Oe}static set defaultOutputCalendar(e){Oe=e}static get defaultWeekSettings(){return Ne}static set defaultWeekSettings(e){Ne=Ge(e)}static get twoDigitCutoffYear(){return Te}static set twoDigitCutoffYear(e){Te=e%100}static get throwOnInvalid(){return pe}static set throwOnInvalid(e){pe=e}static resetCaches(){ue.resetCache(),H.resetCache(),Tr.resetCache(),ge.clear()}}class De{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ie=[0,31,59,90,120,151,181,212,243,273,304,334],Ve=[0,31,60,91,121,152,182,213,244,274,305,335];function Ee(e,t){return new De("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function xe(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return 0===s?7:s}function Ce(e,t,n){return n+(nt(e)?Ve:Ie)[t-1]}function Fe(e,t){const n=nt(e)?Ve:Ie,r=n.findIndex(e=>e<t);return{month:r+1,day:t-n[r]}}function We(e,t){return(e-t+7)%7+1}function $e(e,t=4,n=1){const{year:r,month:s,day:i}=e,a=Ce(r,s,i),o=We(xe(r,s,i),n);let u,l=Math.floor((a-o+14-t)/7);return l<1?(u=r-1,l=ot(u,t,n)):l>ot(r,t,n)?(u=r+1,l=1):u=r,{weekYear:u,weekNumber:l,weekday:o,...ft(e)}}function Le(e,t=4,n=1){const{weekYear:r,weekNumber:s,weekday:i}=e,a=We(xe(r,1,t),n),o=rt(r);let u,l=7*s+i-a-7+t;l<1?(u=r-1,l+=rt(u)):l>o?(u=r+1,l-=rt(r)):u=r;const{month:c,day:h}=Fe(u,l);return{year:u,month:c,day:h,...ft(e)}}function Ze(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:Ce(t,n,r),...ft(e)}}function je(e){const{year:t,ordinal:n}=e,{month:r,day:s}=Fe(t,n);return{year:t,month:r,day:s,...ft(e)}}function ze(e,t){if(!Ue(e.localWeekday)||!Ue(e.localWeekNumber)||!Ue(e.localWeekYear)){if(!Ue(e.weekday)||!Ue(e.weekNumber)||!Ue(e.weekYear))throw new d("Cannot mix locale-based week fields with ISO-based week fields");return Ue(e.localWeekday)||(e.weekday=e.localWeekday),Ue(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Ue(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Ae(e){const t=Re(e.year),n=Xe(e.month,1,12),r=Xe(e.day,1,st(e.year,e.month));return t?n?!r&&Ee("day",e.day):Ee("month",e.month):Ee("year",e.year)}function qe(e){const{hour:t,minute:n,second:r,millisecond:s}=e,i=Xe(t,0,23)||24===t&&0===n&&0===r&&0===s,a=Xe(n,0,59),o=Xe(r,0,59),u=Xe(s,0,999);return i?a?o?!u&&Ee("millisecond",s):Ee("second",r):Ee("minute",n):Ee("hour",t)}function Ue(e){return void 0===e}function _e(e){return"number"==typeof e}function Re(e){return"number"==typeof e&&e%1==0}function Pe(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Ye(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function He(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{const s=[t(r),r];return e&&n(e[0],s[0])===e[0]?e:s},null)[1]}function Je(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ge(e){if(null==e)return null;if("object"!=typeof e)throw new f("Week settings must be an object");if(!Xe(e.firstDay,1,7)||!Xe(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Xe(e,1,7)))throw new f("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Xe(e,t,n){return Re(e)&&e>=t&&e<=n}function Be(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Ke(e){return Ue(e)||null===e||""===e?void 0:parseInt(e,10)}function Qe(e){return Ue(e)||null===e||""===e?void 0:parseFloat(e)}function et(e){if(!Ue(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function tt(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function nt(e){return e%4==0&&(e%100!=0||e%400==0)}function rt(e){return nt(e)?366:365}function st(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?nt(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function it(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function at(e,t,n){return-We(xe(e,1,t),n)+t-1}function ot(e,t=4,n=1){const r=at(e,t,n),s=at(e+1,t,n);return(rt(e)-r+s)/7}function ut(e){return e>99?e:e>Me.twoDigitCutoffYear?1900+e:2e3+e}function lt(e,t,n,r=null){const s=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},o=new Intl.DateTimeFormat(n,a).formatToParts(s).find(e=>"timezonename"===e.type.toLowerCase());return o?o.value:null}function ct(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function ht(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new f(`Invalid unit value ${e}`);return t}function dt(e,t){const n={};for(const r in e)if(Je(e,r)){const s=e[r];if(null==s)continue;n[t(r)]=ht(s)}return n}function mt(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Be(n,2)}:${Be(r,2)}`;case"narrow":return`${s}${n}${r>0?`:${r}`:""}`;case"techie":return`${s}${Be(n,2)}${Be(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ft(e){return function(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}(e,["hour","minute","second","millisecond"])}const yt=["January","February","March","April","May","June","July","August","September","October","November","December"],gt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wt=["J","F","M","A","M","J","J","A","S","O","N","D"];function pt(e){switch(e){case"narrow":return[...wt];case"short":return[...gt];case"long":return[...yt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const vt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],kt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],bt=["M","T","W","T","F","S","S"];function St(e){switch(e){case"narrow":return[...bt];case"short":return[...kt];case"long":return[...vt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Ot=["AM","PM"],Tt=["Before Christ","Anno Domini"],Nt=["BC","AD"],Mt=["B","A"];function Dt(e){switch(e){case"narrow":return[...Mt];case"short":return[...Nt];case"long":return[...Tt];default:return null}}function It(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Vt={D:v,DD:k,DDD:S,DDDD:O,t:T,tt:N,ttt:M,tttt:D,T:I,TT:V,TTT:E,TTTT:x,f:C,ff:W,fff:Z,ffff:z,F:F,FF:$,FFF:j,FFFF:A};class Et{static create(e,t={}){return new Et(e,t)}static parseFormat(e){let t=null,n="",r=!1;const s=[];for(let i=0;i<e.length;i++){const a=e.charAt(i);"'"===a?((n.length>0||r)&&s.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||a===t?n+=a:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&s.push({literal:r||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(e){return Vt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return Be(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(t,n)=>this.loc.extract(e,t,n),i=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=()=>n?function(e){return Ot[e.hour<12?0:1]}(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),o=(t,r)=>n?function(e,t){return pt(t)[e.month-1]}(e,t):s(r?{month:t}:{month:t,day:"numeric"},"month"),u=(t,r)=>n?function(e,t){return St(t)[e.weekday-1]}(e,t):s(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const n=Et.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},c=t=>n?function(e,t){return Dt(t)[e.year<0?0:1]}(e,t):s({era:t},"era");return It(Et.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return r?s({day:"numeric"},"day"):this.num(e.day);case"dd":return r?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return r?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return r?s({month:"numeric"},"month"):this.num(e.month);case"MM":return r?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return r?s({year:"numeric"},"year"):this.num(e.year);case"yy":return r?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},s=Et.parseFormat(t),i=s.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),a=e.shiftTo(...i.map(r).filter(e=>e));return It(s,((e,t)=>s=>{const i=r(s);if(i){const r=t.isNegativeDuration&&i!==t.largestUnit?n:1;let a;return a="negativeLargestOnly"===this.opts.signMode&&i!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(i)*r,s.length,a)}return s})(a,{isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]}))}}const xt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ct(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function Ft(...e){return t=>e.reduce(([e,n,r],s)=>{const[i,a,o]=s(t,r);return[{...e,...i},a||n,o]},[{},null,1]).slice(0,2)}function Wt(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function $t(...e){return(t,n)=>{const r={};let s;for(s=0;s<e.length;s++)r[e[s]]=Ke(t[n+s]);return[r,null,n+s]}}const Lt=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Zt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,jt=RegExp(`${Zt.source}${`(?:${Lt.source}?(?:\\[(${xt.source})\\])?)?`}`),zt=RegExp(`(?:[Tt]${jt.source})?`),At=$t("weekYear","weekNumber","weekDay"),qt=$t("year","ordinal"),Ut=RegExp(`${Zt.source} ?(?:${Lt.source}|(${xt.source}))?`),_t=RegExp(`(?: ${Ut.source})?`);function Rt(e,t,n){const r=e[t];return Ue(r)?n:Ke(r)}function Pt(e,t){return[{hours:Rt(e,t,0),minutes:Rt(e,t+1,0),seconds:Rt(e,t+2,0),milliseconds:et(e[t+3])},null,t+4]}function Yt(e,t){const n=!e[t]&&!e[t+1],r=ct(e[t+1],e[t+2]);return[{},n?null:ce.instance(r),t+3]}function Ht(e,t){return[{},e[t]?H.create(e[t]):null,t+1]}const Jt=RegExp(`^T?${Zt.source}$`),Gt=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Xt(e){const[t,n,r,s,i,a,o,u,l]=e,c="-"===t[0],h=u&&"-"===u[0],d=(e,t=!1)=>void 0!==e&&(t||e&&c)?-e:e;return[{years:d(Qe(n)),months:d(Qe(r)),weeks:d(Qe(s)),days:d(Qe(i)),hours:d(Qe(a)),minutes:d(Qe(o)),seconds:d(Qe(u),"-0"===u),milliseconds:d(et(l),h)}]}const Bt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Kt(e,t,n,r,s,i,a){const o={year:2===t.length?ut(Ke(t)):Ke(t),month:gt.indexOf(n)+1,day:Ke(r),hour:Ke(s),minute:Ke(i)};return a&&(o.second=Ke(a)),e&&(o.weekday=e.length>3?vt.indexOf(e)+1:kt.indexOf(e)+1),o}const Qt=/^(?:(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\d)(\d\d)))$/;function en(e){const[,t,n,r,s,i,a,o,u,l,c,h]=e,d=Kt(t,s,r,n,i,a,o);let m;return m=u?Bt[u]:l?0:ct(c,h),[d,new ce(m)]}const tn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,nn=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,rn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function sn(e){const[,t,n,r,s,i,a,o]=e;return[Kt(t,s,r,n,i,a,o),ce.utcInstance]}function an(e){const[,t,n,r,s,i,a,o]=e;return[Kt(t,o,n,r,s,i,a),ce.utcInstance]}const on=Ct(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,zt),un=Ct(/(\d{4})-?W(\d\d)(?:-?(\d))?/,zt),ln=Ct(/(\d{4})-?(\d{3})/,zt),cn=Ct(jt),hn=Ft(function(e,t){return[{year:Rt(e,t),month:Rt(e,t+1,1),day:Rt(e,t+2,1)},null,t+3]},Pt,Yt,Ht),dn=Ft(At,Pt,Yt,Ht),mn=Ft(qt,Pt,Yt,Ht),fn=Ft(Pt,Yt,Ht);const yn=Ft(Pt);const gn=Ct(/(\d{4})-(\d\d)-(\d\d)/,_t),wn=Ct(Ut),pn=Ft(Pt,Yt,Ht);const vn="Invalid Duration",kn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},bn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...kn},Sn=365.2425,On=30.436875,Tn={years:{quarters:4,months:12,weeks:52.1775,days:Sn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:On,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...kn},Nn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Mn=Nn.slice(0).reverse();function Dn(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new xn(r)}function In(e,t){let n=t.milliseconds??0;for(const r of Mn.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Vn(e,t){const n=In(e,t)<0?-1:1;Nn.reduceRight((r,s)=>{if(Ue(t[s]))return r;if(r){const i=t[r]*n,a=e[s][r],o=Math.floor(i/a);t[s]+=o*n,t[r]-=o*a*n}return s},null),Nn.reduce((n,r)=>{if(Ue(t[r]))return n;if(n){const s=t[n]%1;t[n]-=s,t[r]+=s*e[n][r]}return r},null)}function En(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class xn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?Tn:bn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||ue.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return xn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new f("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new xn({values:dt(e,xn.normalizeUnit),loc:ue.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(_e(e))return xn.fromMillis(e);if(xn.isDuration(e))return e;if("object"==typeof e)return xn.fromObject(e);throw new f(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Wt(e,[Gt,Xt])}(e);return n?xn.fromObject(n,t):xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Wt(e,[Jt,yn])}(e);return n?xn.fromObject(n,t):xn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new f("need to specify a reason the Duration is invalid");const n=e instanceof De?e:new De(e,t);if(Me.throwOnInvalid)throw new h(n);return new xn({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new m(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Et.create(this.loc,n).formatDurationFromString(this,e):vn}toHuman(e={}){if(!this.isValid)return vn;const t=!1!==e.showZeros,n=Nn.map(n=>{const r=this.values[n];return Ue(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=tt(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return Tr.fromMillis(t,{zone:"UTC"}).toISOTime(e)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?In(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=xn.fromDurationLike(e),n={};for(const e of Nn)(Je(t.values,e)||Je(this.values,e))&&(n[e]=t.get(e)+this.get(e));return Dn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=xn.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=ht(e(this.values[n],n));return Dn(this,{values:t},!0)}get(e){return this[xn.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return Dn(this,{values:{...this.values,...dt(e,xn.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return Dn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Vn(this.matrix,e),Dn(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return Dn(this,{values:En(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>xn.normalizeUnit(e));const t={},n={},r=this.toObject();let s;for(const i of Nn)if(e.indexOf(i)>=0){s=i;let e=0;for(const t in n)e+=this.matrix[t][i]*n[t],n[t]=0;_e(r[i])&&(e+=r[i]);const a=Math.trunc(e);t[i]=a,n[i]=(1e3*e-1e3*a)/1e3}else _e(r[i])&&(n[i]=r[i]);for(const e in n)0!==n[e]&&(t[s]+=e===s?n[e]:n[e]/this.matrix[s][e]);return Vn(this.matrix,t),Dn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return Dn(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;return Dn(this,{values:En(this.values)},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of Nn)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Cn="Invalid Interval";class Fn{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new f("need to specify a reason the Interval is invalid");const n=e instanceof De?e:new De(e,t);if(Me.throwOnInvalid)throw new c(n);return new Fn({invalid:n})}static fromDateTimes(e,t){const n=Nr(e),r=Nr(t),s=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?Fn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:Fn.invalid("missing or invalid end"):Fn.invalid("missing or invalid start")}(n,r);return null==s?new Fn({start:n,end:r}):s}static after(e,t){const n=xn.fromDurationLike(t),r=Nr(e);return Fn.fromDateTimes(r,r.plus(n))}static before(e,t){const n=xn.fromDurationLike(t),r=Nr(e);return Fn.fromDateTimes(r.minus(n),r)}static fromISO(e,t){const[n,r]=(e||"").split("/",2);if(n&&r){let e,s,i,a;try{e=Tr.fromISO(n,t),s=e.isValid}catch(r){s=!1}try{i=Tr.fromISO(r,t),a=i.isValid}catch(r){a=!1}if(s&&a)return Fn.fromDateTimes(e,i);if(s){const n=xn.fromISO(r,t);if(n.isValid)return Fn.after(e,n)}else if(a){const e=xn.fromISO(n,t);if(e.isValid)return Fn.before(i,e)}}return Fn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let r;return r=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?Fn.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Nr).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:r}=this,s=0;for(;r<this.e;){const e=t[s]||this.e,i=+e>+this.e?this.e:e;n.push(Fn.fromDateTimes(r,i)),r=i,s+=1}return n}splitBy(e){const t=xn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,s=1;const i=[];for(;r<this.e;){const e=this.start.plus(t.mapUnits(e=>e*s));n=+e>+this.e?this.e:e,i.push(Fn.fromDateTimes(r,n)),r=n,s+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:Fn.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Fn.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],s=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),i=Array.prototype.concat(...s).sort((e,t)=>e.time-t.time);for(const e of i)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(Fn.fromDateTimes(t,e.time)),t=null);return Fn.merge(r)}difference(...e){return Fn.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Cn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=v,t={}){return this.isValid?Et.create(this.s.loc.clone(t),e).formatInterval(this):Cn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Cn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Cn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Cn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Cn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):xn.invalid(this.invalidReason)}mapEndpoints(e){return Fn.fromDateTimes(e(this.s),e(this.e))}}class Wn{static hasDST(e=Me.defaultZone){const t=Tr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return H.isValidZone(e)}static normalizeZone(e){return de(e,Me.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ue.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ue.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ue.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||ue.create(t,n,s)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||ue.create(t,n,s)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ue.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ue.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ue.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ue.create(t,null,"gregory").eras(e)}static features(){return{relative:Pe(),localeWeek:Ye()}}}function $n(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(xn.fromMillis(r).as("days"))}function Ln(e,t,n,r){let[s,i,a,o]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=$n(e,t);return(n-n%7)/7}],["days",$n]],s={},i=e;let a,o;for(const[u,l]of r)n.indexOf(u)>=0&&(a=u,s[u]=l(e,t),o=i.plus(s),o>t?(s[u]--,(e=i.plus(s))>t&&(o=e,s[u]--,e=i.plus(s))):e=o);return[e,s,o,a]}(e,t,n);const u=t-s,l=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===l.length&&(a<t&&(a=s.plus({[o]:1})),a!==s&&(i[o]=(i[o]||0)+u/(a-s)));const c=xn.fromObject(i,r);return l.length>0?xn.fromMillis(u,r).shiftTo(...l).plus(c):c}function Zn(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(-1!==e[n].search(me.hanidec))t+=ye.indexOf(e[n]);else for(const e in fe){const[n,s]=fe[e];r>=n&&r<=s&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const jn=`[ ${String.fromCharCode(160)}]`,zn=new RegExp(jn,"g");function An(e){return e.replace(/\./g,"\\.?").replace(zn,jn)}function qn(e){return e.replace(/\./g,"").replace(zn," ").toLowerCase()}function Un(e,t){return null===e?null:{regex:RegExp(e.map(An).join("|")),deser:([n])=>e.findIndex(e=>qn(n)===qn(e))+t}}function _n(e,t){return{regex:e,deser:([,e,t])=>ct(e,t),groups:t}}function Rn(e){return{regex:e,deser:([e])=>e}}const Pn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Yn=null;function Hn(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Xn(Et.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class Jn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Hn(Et.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=we(t),r=we(t,"{2}"),s=we(t,"{3}"),i=we(t,"{4}"),a=we(t,"{6}"),o=we(t,"{1,2}"),u=we(t,"{1,3}"),l=we(t,"{1,6}"),c=we(t,"{1,9}"),h=we(t,"{2,4}"),d=we(t,"{4,6}"),m=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},f=(f=>{if(e.literal)return m(f);switch(f.val){case"G":return Un(t.eras("short"),0);case"GG":return Un(t.eras("long"),0);case"y":return Zn(l);case"yy":case"kk":return Zn(h,ut);case"yyyy":case"kkkk":return Zn(i);case"yyyyy":return Zn(d);case"yyyyyy":return Zn(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Zn(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Zn(r);case"MMM":return Un(t.months("short",!0),1);case"MMMM":return Un(t.months("long",!0),1);case"LLL":return Un(t.months("short",!1),1);case"LLLL":return Un(t.months("long",!1),1);case"o":case"S":return Zn(u);case"ooo":case"SSS":return Zn(s);case"u":return Rn(c);case"uu":return Rn(o);case"uuu":case"E":case"c":return Zn(n);case"a":return Un(t.meridiems(),0);case"EEE":return Un(t.weekdays("short",!1),1);case"EEEE":return Un(t.weekdays("long",!1),1);case"ccc":return Un(t.weekdays("short",!0),1);case"cccc":return Un(t.weekdays("long",!0),1);case"Z":case"ZZ":return _n(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return _n(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return Rn(/[a-z_+-/]{1,256}?/i);case" ":return Rn(/[^\S\n\r]/);default:return m(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const s in n)if(Je(n,s)){const i=n[s],a=i.groups?i.groups+1:1;!i.literal&&i.token&&(e[i.token.val[0]]=i.deser(r.slice(t,t+a))),t+=a}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,s,i]=n?function(e){let t,n=null;return Ue(e.z)||(n=H.create(e.z)),Ue(e.Z)||(n||(n=new ce(e.Z)),t=e.Z),Ue(e.q)||(e.M=3*(e.q-1)+1),Ue(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Ue(e.u)||(e.S=et(e.u)),[Object.keys(e).reduce((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t},{}),n,t]}(n):[null,null,void 0];if(Je(n,"a")&&Je(n,"H"))throw new d("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:s,specificOffset:i}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Gn(e,t,n){return new Jn(e,n).explainFromTokens(t)}function Xn(e,t){if(!e)return null;const n=Et.create(t,e).dtFormatter((Yn||(Yn=Tr.fromMillis(1555555555555)),Yn)),r=n.formatToParts(),s=n.resolvedOptions();return r.map(t=>function(e,t,n){const{type:r,value:s}=e;if("literal"===r){const e=/^\s+$/.test(s);return{literal:!e,val:e?" ":s}}const i=t[r];let a=r;"hour"===r&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let o=Pn[a];if("object"==typeof o&&(o=o[i]),o)return{literal:!1,val:o}}(t,e,s))}const Bn="Invalid DateTime",Kn=864e13;function Qn(e){return new De("unsupported zone",`the zone "${e.name}" is not supported`)}function er(e){return null===e.weekData&&(e.weekData=$e(e.c)),e.weekData}function tr(e){return null===e.localWeekData&&(e.localWeekData=$e(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function nr(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Tr({...n,...t,old:n})}function rr(e,t,n){let r=e-60*t*1e3;const s=n.offset(r);if(t===s)return[r,t];r-=60*(s-t)*1e3;const i=n.offset(r);return s===i?[r,s]:[e-60*Math.min(s,i)*1e3,Math.max(s,i)]}function sr(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function ir(e,t,n){return rr(it(e),t,n)}function ar(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i={...e.c,year:r,month:s,day:Math.min(e.c.day,st(r,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=xn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=it(i);let[u,l]=rr(o,n,e.zone);return 0!==a&&(u+=a,l=e.zone.offset(u)),{ts:u,o:l}}function or(e,t,n,r,s,i){const{setZone:a,zone:o}=n;if(e&&0!==Object.keys(e).length||t){const r=t||o,s=Tr.fromObject(e,{...n,zone:r,specificOffset:i});return a?s:s.setZone(o)}return Tr.invalid(new De("unparsable",`the input "${s}" can't be parsed as ${r}`))}function ur(e,t,n=!0){return e.isValid?Et.create(ue.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function lr(e,t,n){const r=e.c.year>9999||e.c.year<0;let s="";if(r&&e.c.year>=0&&(s+="+"),s+=Be(e.c.year,r?6:4),"year"===n)return s;if(t){if(s+="-",s+=Be(e.c.month),"month"===n)return s;s+="-"}else if(s+=Be(e.c.month),"month"===n)return s;return s+=Be(e.c.day),s}function cr(e,t,n,r,s,i,a){let o=!n||0!==e.c.millisecond||0!==e.c.second,u="";switch(a){case"day":case"month":case"year":break;default:if(u+=Be(e.c.hour),"hour"===a)break;if(t){if(u+=":",u+=Be(e.c.minute),"minute"===a)break;o&&(u+=":",u+=Be(e.c.second))}else{if(u+=Be(e.c.minute),"minute"===a)break;o&&(u+=Be(e.c.second))}if("second"===a)break;!o||r&&0===e.c.millisecond||(u+=".",u+=Be(e.c.millisecond,3))}return s&&(e.isOffsetFixed&&0===e.offset&&!i?u+="Z":e.o<0?(u+="-",u+=Be(Math.trunc(-e.o/60)),u+=":",u+=Be(Math.trunc(-e.o%60))):(u+="+",u+=Be(Math.trunc(e.o/60)),u+=":",u+=Be(Math.trunc(e.o%60)))),i&&(u+="["+e.zone.ianaName+"]"),u}const hr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},dr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},mr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},fr=["year","month","day","hour","minute","second","millisecond"],yr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],gr=["year","ordinal","hour","minute","second","millisecond"];function wr(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new m(e);return t}function pr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return wr(e)}}function vr(e,t){const n=de(t.zone,Me.defaultZone);if(!n.isValid)return Tr.invalid(Qn(n));const r=ue.fromObject(t);let s,i;if(Ue(e.year))s=Me.now();else{for(const t of fr)Ue(e[t])&&(e[t]=hr[t]);const t=Ae(e)||qe(e);if(t)return Tr.invalid(t);const r=function(e){if(void 0===Sr&&(Sr=Me.now()),"iana"!==e.type)return e.offset(Sr);const t=e.name;let n=Or.get(t);return void 0===n&&(n=e.offset(Sr),Or.set(t,n)),n}(n);[s,i]=ir(e,r,n)}return new Tr({ts:s,zone:n,loc:r,o:i})}function kr(e,t,n){const r=!!Ue(n.round)||n.round,s=Ue(n.rounding)?"trunc":n.rounding,i=(e,i)=>{e=tt(e,r||n.calendary?0:2,n.calendary?"round":s);return t.loc.clone(n).relFormatter(n).format(e,i)},a=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return i(a(n.unit),n.unit);for(const e of n.units){const t=a(e);if(Math.abs(t)>=1)return i(t,e)}return i(e>t?-0:0,n.units[n.units.length-1])}function br(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let Sr;const Or=new Map;class Tr{constructor(e){const t=e.zone||Me.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new De("invalid input"):null)||(t.isValid?null:Qn(t));this.ts=Ue(e.ts)?Me.now():e.ts;let r=null,s=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,s]=[e.old.c,e.old.o];else{const i=_e(e.o)&&!e.old?e.o:t.offset(this.ts);r=sr(this.ts,i),n=Number.isNaN(r.year)?new De("invalid input"):null,r=n?null:r,s=n?null:i}}this._zone=t,this.loc=e.loc||ue.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=s,this.isLuxonDateTime=!0}static now(){return new Tr({})}static local(){const[e,t]=br(arguments),[n,r,s,i,a,o,u]=t;return vr({year:n,month:r,day:s,hour:i,minute:a,second:o,millisecond:u},e)}static utc(){const[e,t]=br(arguments),[n,r,s,i,a,o,u]=t;return e.zone=ce.utcInstance,vr({year:n,month:r,day:s,hour:i,minute:a,second:o,millisecond:u},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return Tr.invalid("invalid input");const s=de(t.zone,Me.defaultZone);return s.isValid?new Tr({ts:n,zone:s,loc:ue.fromObject(t)}):Tr.invalid(Qn(s))}static fromMillis(e,t={}){if(_e(e))return e<-Kn||e>Kn?Tr.invalid("Timestamp out of range"):new Tr({ts:e,zone:de(t.zone,Me.defaultZone),loc:ue.fromObject(t)});throw new f(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(_e(e))return new Tr({ts:1e3*e,zone:de(t.zone,Me.defaultZone),loc:ue.fromObject(t)});throw new f("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=de(t.zone,Me.defaultZone);if(!n.isValid)return Tr.invalid(Qn(n));const r=ue.fromObject(t),s=dt(e,pr),{minDaysInFirstWeek:i,startOfWeek:a}=ze(s,r),o=Me.now(),u=Ue(t.specificOffset)?n.offset(o):t.specificOffset,l=!Ue(s.ordinal),c=!Ue(s.year),h=!Ue(s.month)||!Ue(s.day),m=c||h,f=s.weekYear||s.weekNumber;if((m||l)&&f)throw new d("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&l)throw new d("Can't mix ordinal dates with month/day");const y=f||s.weekday&&!m;let g,w,p=sr(o,u);y?(g=yr,w=dr,p=$e(p,i,a)):l?(g=gr,w=mr,p=Ze(p)):(g=fr,w=hr);let v=!1;for(const e of g){Ue(s[e])?s[e]=v?w[e]:p[e]:v=!0}const k=y?function(e,t=4,n=1){const r=Re(e.weekYear),s=Xe(e.weekNumber,1,ot(e.weekYear,t,n)),i=Xe(e.weekday,1,7);return r?s?!i&&Ee("weekday",e.weekday):Ee("week",e.weekNumber):Ee("weekYear",e.weekYear)}(s,i,a):l?function(e){const t=Re(e.year),n=Xe(e.ordinal,1,rt(e.year));return t?!n&&Ee("ordinal",e.ordinal):Ee("year",e.year)}(s):Ae(s),b=k||qe(s);if(b)return Tr.invalid(b);const S=y?Le(s,i,a):l?je(s):s,[O,T]=ir(S,u,n),N=new Tr({ts:O,zone:n,o:T,loc:r});return s.weekday&&m&&e.weekday!==N.weekday?Tr.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${N.toISO()}`):N.isValid?N:Tr.invalid(N.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return Wt(e,[on,hn],[un,dn],[ln,mn],[cn,fn])}(e);return or(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return Wt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Qt,en])}(e);return or(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return Wt(e,[tn,sn],[nn,sn],[rn,an])}(e);return or(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Ue(e)||Ue(t))throw new f("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:s=null}=n,i=ue.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),[a,o,u,l]=function(e,t,n){const{result:r,zone:s,specificOffset:i,invalidReason:a}=Gn(e,t,n);return[r,s,i,a]}(i,e,t);return l?Tr.invalid(l):or(a,o,n,`format ${t}`,e,u)}static fromString(e,t,n={}){return Tr.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return Wt(e,[gn,hn],[wn,pn])}(e);return or(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new f("need to specify a reason the DateTime is invalid");const n=e instanceof De?e:new De(e,t);if(Me.throwOnInvalid)throw new l(n);return new Tr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Xn(e,ue.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Hn(Et.parseFormat(e),ue.fromObject(t)).map(e=>e.val).join("")}static resetCache(){Sr=void 0,Or.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?er(this).weekYear:NaN}get weekNumber(){return this.isValid?er(this).weekNumber:NaN}get weekday(){return this.isValid?er(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?tr(this).weekday:NaN}get localWeekNumber(){return this.isValid?tr(this).weekNumber:NaN}get localWeekYear(){return this.isValid?tr(this).weekYear:NaN}get ordinal(){return this.isValid?Ze(this.c).ordinal:NaN}get monthShort(){return this.isValid?Wn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Wn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Wn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Wn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=it(this.c),r=this.zone.offset(n-e),s=this.zone.offset(n+e),i=this.zone.offset(n-r*t),a=this.zone.offset(n-s*t);if(i===a)return[this];const o=n-i*t,u=n-a*t,l=sr(o,i),c=sr(u,a);return l.hour===c.hour&&l.minute===c.minute&&l.second===c.second&&l.millisecond===c.millisecond?[nr(this,{ts:o}),nr(this,{ts:u})]:[this]}get isInLeapYear(){return nt(this.year)}get daysInMonth(){return st(this.year,this.month)}get daysInYear(){return this.isValid?rt(this.year):NaN}get weeksInWeekYear(){return this.isValid?ot(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ot(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=Et.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(ce.instance(e),t)}toLocal(){return this.setZone(Me.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=de(e,Me.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=ir(n,t,e)}return nr(this,{ts:r,zone:e})}return Tr.invalid(Qn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return nr(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=dt(e,pr),{minDaysInFirstWeek:n,startOfWeek:r}=ze(t,this.loc),s=!Ue(t.weekYear)||!Ue(t.weekNumber)||!Ue(t.weekday),i=!Ue(t.ordinal),a=!Ue(t.year),o=!Ue(t.month)||!Ue(t.day),u=a||o,l=t.weekYear||t.weekNumber;if((u||i)&&l)throw new d("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&i)throw new d("Can't mix ordinal dates with month/day");let c;s?c=Le({...$e(this.c,n,r),...t},n,r):Ue(t.ordinal)?(c={...this.toObject(),...t},Ue(t.day)&&(c.day=Math.min(st(c.year,c.month),c.day))):c=je({...Ze(this.c),...t});const[h,m]=ir(c,this.o,this.zone);return nr(this,{ts:h,o:m})}plus(e){if(!this.isValid)return this;return nr(this,ar(this,xn.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return nr(this,ar(this,xn.fromDurationLike(e).negate()))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=xn.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;if("quarters"===r){const e=Math.ceil(this.month/3);n.month=3*(e-1)+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Et.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Bn}toLocaleString(e=v,t={}){return this.isValid?Et.create(this.loc.clone(t),e).formatDateTime(this):Bn}toLocaleParts(e={}){return this.isValid?Et.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:s=!1,precision:i="milliseconds"}={}){if(!this.isValid)return null;const a="extended"===e;let o=lr(this,a,i=wr(i));return fr.indexOf(i)>=3&&(o+="T"),o+=cr(this,a,t,n,r,s,i),o}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?lr(this,"extended"===e,wr(t)):null}toISOWeekDate(){return ur(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:s=!1,format:i="extended",precision:a="milliseconds"}={}){if(!this.isValid)return null;return a=wr(a),(r&&fr.indexOf(a)>=3?"T":"")+cr(this,"extended"===i,t,e,n,s,a)}toRFC2822(){return ur(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ur(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?lr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),ur(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Bn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return xn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},s=(o=t,Array.isArray(o)?o:[o]).map(xn.normalizeUnit),i=e.valueOf()>this.valueOf(),a=Ln(i?this:e,i?e:this,s,r);var o;return i?a.negate():a}diffNow(e="milliseconds",t={}){return this.diff(Tr.now(),e,t)}until(e){return this.isValid?Fn.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,n)<=r&&r<=s.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Tr.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(r=e.unit,s=void 0),kr(t,this.plus(n),{...e,numeric:"always",units:r,unit:s})}toRelativeCalendar(e={}){return this.isValid?kr(e.base||Tr.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Tr.isDateTime))throw new f("min requires all arguments be DateTimes");return He(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(Tr.isDateTime))throw new f("max requires all arguments be DateTimes");return He(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:s=null}=n;return Gn(ue.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return Tr.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,s=ue.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Jn(s,e)}static fromFormatParser(e,t,n={}){if(Ue(e)||Ue(t))throw new f("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:s=null}=n,i=ue.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});if(!i.equals(t.locale))throw new f(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${t.locale}`);const{result:a,zone:o,specificOffset:u,invalidReason:l}=t.explainFromTokens(e);return l?Tr.invalid(l):or(a,o,n,`format ${t.format}`,e,u)}static get DATE_SHORT(){return v}static get DATE_MED(){return k}static get DATE_MED_WITH_WEEKDAY(){return b}static get DATE_FULL(){return S}static get DATE_HUGE(){return O}static get TIME_SIMPLE(){return T}static get TIME_WITH_SECONDS(){return N}static get TIME_WITH_SHORT_OFFSET(){return M}static get TIME_WITH_LONG_OFFSET(){return D}static get TIME_24_SIMPLE(){return I}static get TIME_24_WITH_SECONDS(){return V}static get TIME_24_WITH_SHORT_OFFSET(){return E}static get TIME_24_WITH_LONG_OFFSET(){return x}static get DATETIME_SHORT(){return C}static get DATETIME_SHORT_WITH_SECONDS(){return F}static get DATETIME_MED(){return W}static get DATETIME_MED_WITH_SECONDS(){return $}static get DATETIME_MED_WITH_WEEKDAY(){return L}static get DATETIME_FULL(){return Z}static get DATETIME_FULL_WITH_SECONDS(){return j}static get DATETIME_HUGE(){return z}static get DATETIME_HUGE_WITH_SECONDS(){return A}}function Nr(e){if(Tr.isDateTime(e))return e;if(e&&e.valueOf&&_e(e.valueOf()))return Tr.fromJSDate(e);if(e&&"object"==typeof e)return Tr.fromObject(e);throw new f(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var Mr=function(){return r(function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),s(this,"emitter",void 0),s(this,"url",void 0),s(this,"cmsKey",void 0),s(this,"channel",void 0),s(this,"socket",void 0),s(this,"isConnectionWanted",void 0),s(this,"isConnected",void 0),s(this,"lastMessageAt",void 0),s(this,"interval",void 0),this.emitter={emit:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var s=this.events[e]||[],i=0,a=s.length;i<a;i++)s[i].apply(s,n)},events:{},on:function(e,t){var n,r=this;return((n=this.events)[e]||(n[e]=[])).push(t),function(){var n;r.events[e]=null===(n=r.events[e])||void 0===n?void 0:n.filter(function(e){return t!==e})}}},this.url=null,this.cmsKey=null,this.channel=t,this.isConnected=!1,this.isConnectionWanted=!1,this.lastMessageAt=Tr.now().minus({year:1})},[{key:"on",value:function(e,t){return this.emitter.on(e,t)}},{key:"init",value:(a=n(i().m(function e(){var t=this;return i().w(function(e){for(;;)switch(e.n){case 0:this.interval=setInterval(function(){t.isConnectionWanted&&!t.isActive()&&(console.debug("Xmr::setInterval: should be active"),t.start(t.url||"DISABLED",t.cmsKey||"n/a"))},6e4);case 1:return e.a(2)}},e,this)})),function(){return a.apply(this,arguments)})},{key:"start",value:(t=n(i().m(function e(t,n){var r,s=this;return i().w(function(e){for(;;)switch(e.p=e.n){case 0:if(this.channel&&"unknown"!==this.channel){e.n=1;break}return console.error("Xmr::start: channel unknown, XMR will be disabled"),e.a(2);case 1:if("DISABLED"!==this.url){e.n=2;break}return console.info("Xmr::start: XMR disabled"),this.isConnectionWanted=!1,this.isActive()&&stop(),e.a(2);case 2:if(this.isConnectionWanted=!0,!this.isActive()||this.url!==t){e.n=3;break}return console.debug("Xmr::start: already connected to this URL"),this.cmsKey=n,e.a(2);case 3:if(!this.isConnected){e.n=5;break}return console.debug("Xmr::start: already connected but not active, or a different URL"),e.n=4,this.stop();case 4:e.n=6;break;case 5:console.debug("Xmr::start: not connected yet");case 6:this.url=t,this.cmsKey=n,console.debug("Xmr::start: connecting to "+this.url),e.p=7,this.socket=new WebSocket(this.url),e.n=9;break;case 8:return e.p=8,r=e.v,console.debug("Xmr::start: failed connecting to "+this.url+", e = "+r),this.emitter.emit("error","Failed to connect"),e.a(2);case 9:this.socket.addEventListener("open",function(e){console.debug("Xmr::"+e.type),s.socket.readyState===WebSocket.OPEN?(s.socket.send(JSON.stringify({type:"init",key:s.cmsKey,channel:s.channel})),s.isConnected=!0,s.emitter.emit("connected")):console.info("Xmr::"+e.type+": not open yet")}),this.socket.addEventListener("close",function(e){console.debug("Xmr::"+e.type),s.isConnected=!1,s.emitter.emit("disconnected")}),this.socket.addEventListener("error",function(e){console.debug("Xmr::"+e.type),s.emitter.emit("error","error")}),this.socket.addEventListener("message",function(e){if(console.debug(e),s.lastMessageAt=Tr.now(),s.emitter.emit("statusChange",s.lastMessageAt.toISO()||""),"H"===e.data)console.debug("Xmr::message: Heartbeat...");else{var t=JSON.parse(e.data);console.debug("Xmr::message: action is "+t.action);var n=Tr.fromISO(t.createdDt).plus({seconds:parseInt(t.ttl)});n<Tr.now()?console.debug("Xmr::message: message expired at "+n.toString()):"collectNow"===t.action?s.emitter.emit("collectNow"):"screenShot"===t.action?s.emitter.emit("screenShot"):"licenceCheck"===t.action?s.emitter.emit("licenceCheck"):"criteriaUpdate"==t.action?s.emitter.emit("criteriaUpdate",t.criteriaUpdates):"commandAction"==t.action?s.emitter.emit("commandCodeReceived",t.commandCode):"dataUpdate"==t.action?s.emitter.emit("dataUpdate",t.widgetId):"purgeAll"==t.action?s.emitter.emit("purgeAll"):"clearStatsAndLogs"==t.action?s.emitter.emit("clearStatsAndLogs"):console.error("Xmr::message: unknown action: "+t.action)}});case 10:return e.a(2)}},e,this,[[7,8]])})),function(e,n){return t.apply(this,arguments)})},{key:"stop",value:(e=n(i().m(function e(){return i().w(function(e){for(;;)switch(e.n){case 0:console.debug("Xmr::stop"),this.socket&&(console.debug("Xmr::stop: closing active socket"),this.socket.close(),this.isConnected=!1);case 1:return e.a(2)}},e,this)})),function(){return e.apply(this,arguments)})},{key:"isActive",value:function(){return console.debug("Xmr::isActive: lastMessageAt: "+this.lastMessageAt.toString()),this.isConnected&&this.lastMessageAt>Tr.now().minus({minute:15})}}]);var e,t,a}();return e.Xmr=Mr,e}({});
|
|
4
4
|
//# sourceMappingURL=xibo-communication-framework.min.js.map
|