@xiboplayer/pwa 0.5.16 → 0.5.17
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/README.md +14 -15
- package/dist/assets/index-6kr2gprc.js +2 -0
- package/dist/assets/{index-BDwvMqZ1.js.map → index-6kr2gprc.js.map} +1 -1
- package/dist/assets/{index-Ch_n3fWp.js → index-7JLjOkoa.js} +2 -2
- package/dist/assets/{index-Ch_n3fWp.js.map → index-7JLjOkoa.js.map} +1 -1
- package/dist/assets/{index-_YTKJAZL.js → index-Bxwd8e4f.js} +2 -2
- package/dist/assets/{index-_YTKJAZL.js.map → index-Bxwd8e4f.js.map} +1 -1
- package/dist/assets/{index-k1uGHwGZ.js → index-CBkgIk1G.js} +2 -2
- package/dist/assets/{index-k1uGHwGZ.js.map → index-CBkgIk1G.js.map} +1 -1
- package/dist/assets/{index-C3KbjRIB.js → index-CXcmzXoG.js} +2 -2
- package/dist/assets/{index-C3KbjRIB.js.map → index-CXcmzXoG.js.map} +1 -1
- package/dist/assets/{index-Dez-tVVX.js → index-CsRo4p5q.js} +2 -2
- package/dist/assets/{index-Dez-tVVX.js.map → index-CsRo4p5q.js.map} +1 -1
- package/dist/assets/{index-D1_BPEMd.js → index-D5Q6w3XT.js} +2 -2
- package/dist/assets/{index-D1_BPEMd.js.map → index-D5Q6w3XT.js.map} +1 -1
- package/dist/assets/{index-D26_6Bfz.js → index-DEL5maIo.js} +2 -2
- package/dist/assets/{index-D26_6Bfz.js.map → index-DEL5maIo.js.map} +1 -1
- package/dist/assets/{index-FUzvr3KK.js → index-r3JPyRh8.js} +2 -2
- package/dist/assets/{index-FUzvr3KK.js.map → index-r3JPyRh8.js.map} +1 -1
- package/dist/assets/main-DTNYBKS0.js +724 -0
- package/dist/assets/main-DTNYBKS0.js.map +1 -0
- package/dist/assets/{setup-A6nz6Q3q.js → setup-BksIK2Dv.js} +2 -2
- package/dist/assets/{setup-A6nz6Q3q.js.map → setup-BksIK2Dv.js.map} +1 -1
- package/dist/index.html +1 -5
- package/dist/setup.html +1 -1
- package/dist/sw-pwa.js +1 -1
- package/package.json +13 -13
- package/dist/assets/index-BDwvMqZ1.js +0 -2
- package/dist/assets/main-f6jdO5Uw.js +0 -724
- package/dist/assets/main-f6jdO5Uw.js.map +0 -1
package/README.md
CHANGED
|
@@ -21,24 +21,23 @@ Lightweight PWA Xibo digital signage player built on the [`@xiboplayer` SDK](htt
|
|
|
21
21
|
- **Log batching** — aggregated log submission aligned with CMS spec
|
|
22
22
|
- **Screenshots** — html2canvas-based capture for non-Electron browsers, Electron uses `capturePage()`
|
|
23
23
|
- **Screen Wake Lock** — prevents display from sleeping during playback
|
|
24
|
-
- **Configurable log levels** — `DEBUG`, `INFO`, `WARNING`, `ERROR`, `NONE` (via URL param or CMS settings)
|
|
24
|
+
- **Configurable log levels** — `DEBUG`, `INFO`, `WARNING`, `ERROR`, `NONE` (via URL param or CMS settings; log levels only affect verbosity, not overlays)
|
|
25
25
|
|
|
26
26
|
## Keyboard Shortcuts
|
|
27
27
|
|
|
28
|
-
All
|
|
28
|
+
All keyboard shortcuts and mouse hover are **disabled by default** for secure kiosk operation. Enable them via `controls` in the host player's `config.json` (Electron or Chromium). The config is injected into localStorage by `@xiboplayer/proxy`.
|
|
29
29
|
|
|
30
|
-
| Key | Action |
|
|
31
|
-
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `R` | Revert to scheduled layout
|
|
40
|
-
|
|
41
|
-
Timeline overlay also supports **click-to-skip** — click any layout in the timeline to jump directly to it.
|
|
30
|
+
| Key | Group | Action |
|
|
31
|
+
|-----|-------|--------|
|
|
32
|
+
| `D` | `debugOverlays` | Toggle download progress overlay |
|
|
33
|
+
| `T` | `debugOverlays` | Toggle timeline overlay (click-to-skip supported) |
|
|
34
|
+
| `S` | `setupKey` | Toggle CMS setup screen |
|
|
35
|
+
| `V` | `videoControls` | Toggle native `<video>` controls |
|
|
36
|
+
| `→` / `PageDown` | `playbackControl` | Skip to next layout |
|
|
37
|
+
| `←` / `PageUp` | `playbackControl` | Skip to previous layout |
|
|
38
|
+
| `Space` | `playbackControl` | Pause / resume playback |
|
|
39
|
+
| `R` | `playbackControl` | Revert to scheduled layout |
|
|
40
|
+
| Media keys | `playbackControl` | Next/prev/pause/play (MediaSession API) |
|
|
42
41
|
|
|
43
42
|
## Auto-authorize via CMS API (optional)
|
|
44
43
|
|
|
@@ -84,7 +83,7 @@ When using the Electron or Chromium shells, add the credentials to `config.json`
|
|
|
84
83
|
|
|
85
84
|
## Debug Overlays
|
|
86
85
|
|
|
87
|
-
Three toggleable overlays provide real-time insight into player operation without leaving the playback screen. All are
|
|
86
|
+
Three toggleable overlays provide real-time insight into player operation without leaving the playback screen. All are disabled by default — enable `controls.keyboard.debugOverlays` in the host player's `config.json`, then press the corresponding key to toggle. Overlays are independent of log level — `DEBUG` logging does not enable overlays.
|
|
88
87
|
|
|
89
88
|
### Timeline Overlay (`T`)
|
|
90
89
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{L as p,a as m,R as L}from"./main-DTNYBKS0.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./cms-api-CUQmnOOb.js";import"./widget-html-CgOIMExd.js";const o="0.5.17",r={version:o},a=r.version;export{p as LayoutPool,m as LayoutTranslator,L as RendererLite,a as VERSION};
|
|
2
|
+
//# sourceMappingURL=index-6kr2gprc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-6kr2gprc.js","sources":["../../../renderer/src/index.js"],"sourcesContent":["// @xiboplayer/renderer - Layout rendering\nimport pkg from '../package.json' with { type: 'json' };\nexport const VERSION = pkg.version;\nexport { RendererLite } from './renderer-lite.js';\nexport { LayoutPool } from './layout-pool.js';\nexport { LayoutTranslator } from './layout.js';\n"],"names":["VERSION","pkg"],"mappings":"iMAEaA,EAAUC,EAAI"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{R as p,X as i,p as a}from"./xmds-client-BIGYxnG-.js";import"./cms-api-CUQmnOOb.js";const s="0.5.
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{R as p,X as i,p as a}from"./xmds-client-BIGYxnG-.js";import"./cms-api-CUQmnOOb.js";const s="0.5.17",e={version:s},n=e.version;export{p as RestClient,n as VERSION,i as XmdsClient,a as parseScheduleResponse};
|
|
2
|
+
//# sourceMappingURL=index-7JLjOkoa.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-7JLjOkoa.js","sources":["../../../xmds/src/index.js"],"sourcesContent":["// @xiboplayer/xmds - XMDS clients (REST and SOAP)\nimport pkg from '../package.json' with { type: 'json' };\nexport const VERSION = pkg.version;\nexport { RestClient } from './rest-client.js';\nexport { XmdsClient } from './xmds-client.js';\nexport { parseScheduleResponse } from './schedule-parser.js';\n"],"names":["VERSION","pkg"],"mappings":"yHAEaA,EAAUC,EAAI"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as lr}from"./cms-api-CUQmnOOb.js";const cr="0.5.16",fr={version:cr};function Dt(n,e,t,r,s,i,a){try{var o=n[i](a),u=o.value}catch(l){return void t(l)}o.done?e(u):Promise.resolve(u).then(r,s)}function et(n){return function(){var e=this,t=arguments;return new Promise(function(r,s){var i=n.apply(e,t);function a(u){Dt(i,r,s,a,o,"next",u)}function o(u){Dt(i,r,s,a,o,"throw",u)}a(void 0)})}}function dr(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function hr(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,on(r.key),r)}}function mr(n,e,t){return e&&hr(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function _(n,e,t){return(e=on(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function oe(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,e,t=typeof Symbol=="function"?Symbol:{},r=t.iterator||"@@iterator",s=t.toStringTag||"@@toStringTag";function i(h,S,x,L){var X=S&&S.prototype instanceof o?S:o,B=Object.create(X.prototype);return W(B,"_invoke",function(Ce,Ke,Fe){var U,b,I,G=0,K=Fe||[],Q=!1,Y={p:0,n:0,v:n,a:We,f:We.bind(n,4),d:function(A,C){return U=A,b=0,I=n,Y.n=C,a}};function We(A,C){for(b=A,I=C,e=0;!Q&&G&&!ee&&e<K.length;e++){var ee,F=K[e],Qe=Y.p,Ve=F[2];A>3?(ee=Ve===C)&&(I=F[(b=F[4])?5:(b=3,3)],F[4]=F[5]=n):F[0]<=Qe&&((ee=A<2&&Qe<F[1])?(b=0,Y.v=C,Y.n=F[1]):Qe<Ve&&(ee=A<3||F[0]>C||C>Ve)&&(F[4]=A,F[5]=C,Y.n=Ve,b=0))}if(ee||A>1)return a;throw Q=!0,C}return function(A,C,ee){if(G>1)throw TypeError("Generator is already running");for(Q&&C===1&&We(C,ee),b=C,I=ee;(e=b<2?n:I)||!Q;){U||(b?b<3?(b>1&&(Y.n=-1),We(b,I)):Y.n=I:Y.v=I);try{if(G=2,U){if(b||(A="next"),e=U[A]){if(!(e=e.call(U,I)))throw TypeError("iterator result is not an object");if(!e.done)return e;I=e.value,b<2&&(b=0)}else b===1&&(e=U.return)&&e.call(U),b<2&&(I=TypeError("The iterator does not provide a '"+A+"' method"),b=1);U=n}else if((e=(Q=Y.n<0)?I:Ce.call(Ke,Y))!==a)break}catch(F){U=n,b=1,I=F}finally{G=1}}return{value:e,done:Q}}}(h,x,L),!0),B}var a={};function o(){}function u(){}function l(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(W(e={},r,function(){return this}),e),m=l.prototype=o.prototype=Object.create(f);function w(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,l):(h.__proto__=l,W(h,s,"GeneratorFunction")),h.prototype=Object.create(m),h}return u.prototype=l,W(m,"constructor",l),W(l,"constructor",u),u.displayName="GeneratorFunction",W(l,s,"GeneratorFunction"),W(m),W(m,s,"Generator"),W(m,r,function(){return this}),W(m,"toString",function(){return"[object Generator]"}),(oe=function(){return{w:i,m:w}})()}function W(n,e,t,r){var s=Object.defineProperty;try{s({},"",{})}catch{s=0}W=function(i,a,o,u){function l(f,m){W(i,f,function(w){return this._invoke(f,m,w)})}a?s?s(i,a,{value:o,enumerable:!u,configurable:!u,writable:!u}):i[a]=o:(l("next",0),l("throw",1),l("return",2))},W(n,e,t,r)}function yr(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}function on(n){var e=yr(n,"string");return typeof e=="symbol"?e:e+""}var gr=function(){return{emit:function(t){for(var r=arguments.length,s=new Array(r>1?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];for(var a=this.events[t]||[],o=0,u=a.length;o<u;o++)a[o].apply(a,s)},events:{},on:function(t,r){var s,i=this;return((s=this.events)[t]||(s[t]=[])).push(r),function(){var a;i.events[t]=(a=i.events[t])===null||a===void 0?void 0:a.filter(function(o){return r!==o})}}}};class le extends Error{}class wr extends le{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class pr extends le{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class kr extends le{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class he extends le{}class un extends le{constructor(e){super(`Invalid unit ${e}`)}}class N extends le{}class te extends le{constructor(){super("Zone is an abstract class")}}const c="numeric",P="short",V="long",He={year:c,month:c,day:c},ln={year:c,month:P,day:c},vr={year:c,month:P,day:c,weekday:P},cn={year:c,month:V,day:c},fn={year:c,month:V,day:c,weekday:V},dn={hour:c,minute:c},hn={hour:c,minute:c,second:c},mn={hour:c,minute:c,second:c,timeZoneName:P},yn={hour:c,minute:c,second:c,timeZoneName:V},gn={hour:c,minute:c,hourCycle:"h23"},wn={hour:c,minute:c,second:c,hourCycle:"h23"},pn={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:P},kn={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:V},vn={year:c,month:c,day:c,hour:c,minute:c},Sn={year:c,month:c,day:c,hour:c,minute:c,second:c},Tn={year:c,month:P,day:c,hour:c,minute:c},On={year:c,month:P,day:c,hour:c,minute:c,second:c},Sr={year:c,month:P,day:c,weekday:P,hour:c,minute:c},bn={year:c,month:V,day:c,hour:c,minute:c,timeZoneName:P},Mn={year:c,month:V,day:c,hour:c,minute:c,second:c,timeZoneName:P},Nn={year:c,month:V,day:c,weekday:V,hour:c,minute:c,timeZoneName:V},En={year:c,month:V,day:c,weekday:V,hour:c,minute:c,second:c,timeZoneName:V};class Ee{get type(){throw new te}get name(){throw new te}get ianaName(){return this.name}get isUniversal(){throw new te}offsetName(e,t){throw new te}formatOffset(e,t){throw new te}offset(e){throw new te}equals(e){throw new te}get isValid(){throw new te}}let tt=null;class _e extends Ee{static get instance(){return tt===null&&(tt=new _e),tt}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return Rn(e,t,r)}formatOffset(e,t){return Me(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const ct=new Map;function Tr(n){let e=ct.get(n);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),ct.set(n,e)),e}const Or={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function br(n,e){const t=n.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,i,a,o,u,l,f]=r;return[a,s,i,o,u,l,f]}function Mr(n,e){const t=n.formatToParts(e),r=[];for(let s=0;s<t.length;s++){const{type:i,value:a}=t[s],o=Or[i];i==="era"?r[o]=a:g(o)||(r[o]=parseInt(a,10))}return r}const nt=new Map;class J extends Ee{static create(e){let t=nt.get(e);return t===void 0&&nt.set(e,t=new J(e)),t}static resetCache(){nt.clear(),ct.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{return!1}}constructor(e){super(),this.zoneName=e,this.valid=J.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return Rn(e,t,r,this.name)}formatOffset(e,t){return Me(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const r=Tr(this.name);let[s,i,a,o,u,l,f]=r.formatToParts?Mr(r,t):br(r,t);o==="BC"&&(s=-Math.abs(s)+1);const w=Je({year:s,month:i,day:a,hour:u===24?0:u,minute:l,second:f,millisecond:0});let h=+t;const S=h%1e3;return h-=S>=0?S:1e3+S,(w-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let xt={};function Nr(n,e={}){const t=JSON.stringify([n,e]);let r=xt[t];return r||(r=new Intl.ListFormat(n,e),xt[t]=r),r}const ft=new Map;function dt(n,e={}){const t=JSON.stringify([n,e]);let r=ft.get(t);return r===void 0&&(r=new Intl.DateTimeFormat(n,e),ft.set(t,r)),r}const ht=new Map;function Er(n,e={}){const t=JSON.stringify([n,e]);let r=ht.get(t);return r===void 0&&(r=new Intl.NumberFormat(n,e),ht.set(t,r)),r}const mt=new Map;function Ir(n,e={}){const{base:t,...r}=e,s=JSON.stringify([n,r]);let i=mt.get(s);return i===void 0&&(i=new Intl.RelativeTimeFormat(n,e),mt.set(s,i)),i}let Te=null;function Dr(){return Te||(Te=new Intl.DateTimeFormat().resolvedOptions().locale,Te)}const yt=new Map;function In(n){let e=yt.get(n);return e===void 0&&(e=new Intl.DateTimeFormat(n).resolvedOptions(),yt.set(n,e)),e}const gt=new Map;function xr(n){let e=gt.get(n);if(!e){const t=new Intl.Locale(n);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...Dn,...e}),gt.set(n,e)}return e}function Cr(n){const e=n.indexOf("-x-");e!==-1&&(n=n.substring(0,e));const t=n.indexOf("-u-");if(t===-1)return[n];{let r,s;try{r=dt(n).resolvedOptions(),s=n}catch{const u=n.substring(0,t);r=dt(u).resolvedOptions(),s=u}const{numberingSystem:i,calendar:a}=r;return[s,i,a]}}function Fr(n,e,t){return(t||e)&&(n.includes("-u-")||(n+="-u"),t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function Wr(n){const e=[];for(let t=1;t<=12;t++){const r=y.utc(2009,t,1);e.push(n(r))}return e}function Vr(n){const e=[];for(let t=1;t<=7;t++){const r=y.utc(2016,11,13+t);e.push(n(r))}return e}function Le(n,e,t,r){const s=n.listingMode();return s==="error"?null:s==="en"?t(e):r(e)}function Lr(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||In(n.locale).numberingSystem==="latn"}class Ar{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:s,floor:i,...a}=r;if(!t||Object.keys(a).length>0){const o={useGrouping:!1,...r};r.padTo>0&&(o.minimumIntegerDigits=r.padTo),this.inf=Er(e,o)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):Mt(e,3);return M(t,this.padTo)}}}class $r{constructor(e,t,r){this.opts=r,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&J.create(o).valid?(s=o,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||s,this.dtf=dt(t,i)}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(t=>{if(t.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:r}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Rr{constructor(e,t,r){this.opts={style:"long",...r},!t&&An()&&(this.rtf=Ir(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):as(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const Dn={firstDay:1,minimalDays:4,weekend:[6,7]};class v{static fromOpts(e){return v.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,r,s,i=!1){const a=e||O.defaultLocale,o=a||(i?"en-US":Dr()),u=t||O.defaultNumberingSystem,l=r||O.defaultOutputCalendar,f=pt(s)||O.defaultWeekSettings;return new v(o,u,l,f,a)}static resetCache(){Te=null,ft.clear(),ht.clear(),mt.clear(),yt.clear(),gt.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:r,weekSettings:s}={}){return v.create(e,t,r,s)}constructor(e,t,r,s,i){const[a,o,u]=Cr(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=r||u||null,this.weekSettings=s,this.intl=Fr(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Lr(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:v.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,pt(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Le(this,e,zn,()=>{const r=this.intl==="ja"||this.intl.startsWith("ja-");t&=!r;const s=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const a=r?o=>this.dtFormatter(o,s).format():o=>this.extract(o,s,"month");this.monthsCache[i][e]=Wr(a)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Le(this,e,Pn,()=>{const r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=Vr(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return Le(this,void 0,()=>Gn,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[y.utc(2016,11,13,9),y.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Le(this,e,Yn,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[y.utc(-40,1,1),y.utc(2017,1,1)].map(r=>this.extract(r,t,"era"))),this.eraCache[e]})}extract(e,t,r){const s=this.dtFormatter(e,t),i=s.formatToParts(),a=i.find(o=>o.type.toLowerCase()===r);return a?a.value:null}numberFormatter(e={}){return new Ar(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new $r(e,this.intl,t)}relFormatter(e={}){return new Rr(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Nr(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||In(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:$n()?xr(this.locale):Dn}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 rt=null;class D extends Ee{static get utcInstance(){return rt===null&&(rt=new D(0)),rt}static instance(e){return e===0?D.utcInstance:new D(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new D(Xe(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Me(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Me(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Me(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Zr extends Ee{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 re(n,e){if(g(n)||n===null)return e;if(n instanceof Ee)return n;if(Gr(n)){const t=n.toLowerCase();return t==="default"?e:t==="local"||t==="system"?_e.instance:t==="utc"||t==="gmt"?D.utcInstance:D.parseSpecifier(t)||J.create(n)}else return se(n)?D.instance(n):typeof n=="object"&&"offset"in n&&typeof n.offset=="function"?n:new Zr(n)}const St={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Ct={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]},Ur=St.hanidec.replace(/[\[|\]]/g,"").split("");function zr(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t<n.length;t++){const r=n.charCodeAt(t);if(n[t].search(St.hanidec)!==-1)e+=Ur.indexOf(n[t]);else for(const s in Ct){const[i,a]=Ct[s];r>=i&&r<=a&&(e+=r-i)}}return parseInt(e,10)}else return e}const wt=new Map;function qr(){wt.clear()}function z({numberingSystem:n},e=""){const t=n||"latn";let r=wt.get(t);r===void 0&&(r=new Map,wt.set(t,r));let s=r.get(e);return s===void 0&&(s=new RegExp(`${St[t]}${e}`),r.set(e,s)),s}let Ft=()=>Date.now(),Wt="system",Vt=null,Lt=null,At=null,$t=60,Rt,Zt=null;class O{static get now(){return Ft}static set now(e){Ft=e}static set defaultZone(e){Wt=e}static get defaultZone(){return re(Wt,_e.instance)}static get defaultLocale(){return Vt}static set defaultLocale(e){Vt=e}static get defaultNumberingSystem(){return Lt}static set defaultNumberingSystem(e){Lt=e}static get defaultOutputCalendar(){return At}static set defaultOutputCalendar(e){At=e}static get defaultWeekSettings(){return Zt}static set defaultWeekSettings(e){Zt=pt(e)}static get twoDigitCutoffYear(){return $t}static set twoDigitCutoffYear(e){$t=e%100}static get throwOnInvalid(){return Rt}static set throwOnInvalid(e){Rt=e}static resetCaches(){v.resetCache(),J.resetCache(),y.resetCache(),qr()}}class H{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const xn=[0,31,59,90,120,151,181,212,243,273,304,334],Cn=[0,31,60,91,121,152,182,213,244,274,305,335];function R(n,e){return new H("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Tt(n,e,t){const r=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return s===0?7:s}function Fn(n,e,t){return t+(Ie(n)?Cn:xn)[e-1]}function Wn(n,e){const t=Ie(n)?Cn:xn,r=t.findIndex(i=>i<e),s=e-t[r];return{month:r+1,day:s}}function Ot(n,e){return(n-e+7)%7+1}function Pe(n,e=4,t=1){const{year:r,month:s,day:i}=n,a=Fn(r,s,i),o=Ot(Tt(r,s,i),t);let u=Math.floor((a-o+14-e)/7),l;return u<1?(l=r-1,u=Ne(l,e,t)):u>Ne(r,e,t)?(l=r+1,u=1):l=r,{weekYear:l,weekNumber:u,weekday:o,...Be(n)}}function Ut(n,e=4,t=1){const{weekYear:r,weekNumber:s,weekday:i}=n,a=Ot(Tt(r,1,e),t),o=me(r);let u=s*7+i-a-7+e,l;u<1?(l=r-1,u+=me(l)):u>o?(l=r+1,u-=me(r)):l=r;const{month:f,day:m}=Wn(l,u);return{year:l,month:f,day:m,...Be(n)}}function st(n){const{year:e,month:t,day:r}=n,s=Fn(e,t,r);return{year:e,ordinal:s,...Be(n)}}function zt(n){const{year:e,ordinal:t}=n,{month:r,day:s}=Wn(e,t);return{year:e,month:r,day:s,...Be(n)}}function qt(n,e){if(!g(n.localWeekday)||!g(n.localWeekNumber)||!g(n.localWeekYear)){if(!g(n.weekday)||!g(n.weekNumber)||!g(n.weekYear))throw new he("Cannot mix locale-based week fields with ISO-based week fields");return g(n.localWeekday)||(n.weekday=n.localWeekday),g(n.localWeekNumber)||(n.weekNumber=n.localWeekNumber),g(n.localWeekYear)||(n.weekYear=n.localWeekYear),delete n.localWeekday,delete n.localWeekNumber,delete n.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Hr(n,e=4,t=1){const r=je(n.weekYear),s=Z(n.weekNumber,1,Ne(n.weekYear,e,t)),i=Z(n.weekday,1,7);return r?s?i?!1:R("weekday",n.weekday):R("week",n.weekNumber):R("weekYear",n.weekYear)}function Pr(n){const e=je(n.year),t=Z(n.ordinal,1,me(n.year));return e?t?!1:R("ordinal",n.ordinal):R("year",n.year)}function Vn(n){const e=je(n.year),t=Z(n.month,1,12),r=Z(n.day,1,Ge(n.year,n.month));return e?t?r?!1:R("day",n.day):R("month",n.month):R("year",n.year)}function Ln(n){const{hour:e,minute:t,second:r,millisecond:s}=n,i=Z(e,0,23)||e===24&&t===0&&r===0&&s===0,a=Z(t,0,59),o=Z(r,0,59),u=Z(s,0,999);return i?a?o?u?!1:R("millisecond",s):R("second",r):R("minute",t):R("hour",e)}function g(n){return typeof n>"u"}function se(n){return typeof n=="number"}function je(n){return typeof n=="number"&&n%1===0}function Gr(n){return typeof n=="string"}function Yr(n){return Object.prototype.toString.call(n)==="[object Date]"}function An(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function $n(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function _r(n){return Array.isArray(n)?n:[n]}function Ht(n,e,t){if(n.length!==0)return n.reduce((r,s)=>{const i=[e(s),s];return r&&t(r[0],i[0])===r[0]?r:i},null)[1]}function jr(n,e){return e.reduce((t,r)=>(t[r]=n[r],t),{})}function ge(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function pt(n){if(n==null)return null;if(typeof n!="object")throw new N("Week settings must be an object");if(!Z(n.firstDay,1,7)||!Z(n.minimalDays,1,7)||!Array.isArray(n.weekend)||n.weekend.some(e=>!Z(e,1,7)))throw new N("Invalid week settings");return{firstDay:n.firstDay,minimalDays:n.minimalDays,weekend:Array.from(n.weekend)}}function Z(n,e,t){return je(n)&&n>=e&&n<=t}function Jr(n,e){return n-e*Math.floor(n/e)}function M(n,e=2){const t=n<0;let r;return t?r="-"+(""+-n).padStart(e,"0"):r=(""+n).padStart(e,"0"),r}function ne(n){if(!(g(n)||n===null||n===""))return parseInt(n,10)}function ie(n){if(!(g(n)||n===null||n===""))return parseFloat(n)}function bt(n){if(!(g(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function Mt(n,e,t="round"){const r=10**e;switch(t){case"expand":return n>0?Math.ceil(n*r)/r:Math.floor(n*r)/r;case"trunc":return Math.trunc(n*r)/r;case"round":return Math.round(n*r)/r;case"floor":return Math.floor(n*r)/r;case"ceil":return Math.ceil(n*r)/r;default:throw new RangeError(`Value rounding ${t} is out of range`)}}function Ie(n){return n%4===0&&(n%100!==0||n%400===0)}function me(n){return Ie(n)?366:365}function Ge(n,e){const t=Jr(e-1,12)+1,r=n+(e-t)/12;return t===2?Ie(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Je(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(n.year,n.month-1,n.day)),+e}function Pt(n,e,t){return-Ot(Tt(n,1,e),t)+e-1}function Ne(n,e=4,t=1){const r=Pt(n,e,t),s=Pt(n+1,e,t);return(me(n)-r+s)/7}function kt(n){return n>99?n:n>O.twoDigitCutoffYear?1900+n:2e3+n}function Rn(n,e,t,r=null){const s=new Date(n),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:e,...i},o=new Intl.DateTimeFormat(t,a).formatToParts(s).find(u=>u.type.toLowerCase()==="timezonename");return o?o.value:null}function Xe(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const r=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-r:r;return t*60+s}function Zn(n){const e=Number(n);if(typeof n=="boolean"||n===""||!Number.isFinite(e))throw new N(`Invalid unit value ${n}`);return e}function Ye(n,e){const t={};for(const r in n)if(ge(n,r)){const s=n[r];if(s==null)continue;t[e(r)]=Zn(s)}return t}function Me(n,e){const t=Math.trunc(Math.abs(n/60)),r=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${M(t,2)}:${M(r,2)}`;case"narrow":return`${s}${t}${r>0?`:${r}`:""}`;case"techie":return`${s}${M(t,2)}${M(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Be(n){return jr(n,["hour","minute","second","millisecond"])}const Xr=["January","February","March","April","May","June","July","August","September","October","November","December"],Un=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Br=["J","F","M","A","M","J","J","A","S","O","N","D"];function zn(n){switch(n){case"narrow":return[...Br];case"short":return[...Un];case"long":return[...Xr];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 qn=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Hn=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Kr=["M","T","W","T","F","S","S"];function Pn(n){switch(n){case"narrow":return[...Kr];case"short":return[...Hn];case"long":return[...qn];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Gn=["AM","PM"],Qr=["Before Christ","Anno Domini"],es=["BC","AD"],ts=["B","A"];function Yn(n){switch(n){case"narrow":return[...ts];case"short":return[...es];case"long":return[...Qr];default:return null}}function ns(n){return Gn[n.hour<12?0:1]}function rs(n,e){return Pn(e)[n.weekday-1]}function ss(n,e){return zn(e)[n.month-1]}function is(n,e){return Yn(e)[n.year<0?0:1]}function as(n,e,t="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=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&i){const m=n==="days";switch(e){case 1:return m?"tomorrow":`next ${s[n][0]}`;case-1:return m?"yesterday":`last ${s[n][0]}`;case 0:return m?"today":`this ${s[n][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),u=o===1,l=s[n],f=r?u?l[1]:l[2]||l[1]:u?s[n][0]:n;return a?`${o} ${f} ago`:`in ${o} ${f}`}function Gt(n,e){let t="";for(const r of n)r.literal?t+=r.val:t+=e(r.val);return t}const os={D:He,DD:ln,DDD:cn,DDDD:fn,t:dn,tt:hn,ttt:mn,tttt:yn,T:gn,TT:wn,TTT:pn,TTTT:kn,f:vn,ff:Tn,fff:bn,ffff:Nn,F:Sn,FF:On,FFF:Mn,FFFF:En};class E{static create(e,t={}){return new E(e,t)}static parseFormat(e){let t=null,r="",s=!1;const i=[];for(let a=0;a<e.length;a++){const o=e.charAt(a);o==="'"?((r.length>0||s)&&i.push({literal:s||/^\s+$/.test(r),val:r===""?"'":r}),t=null,r="",s=!s):s||o===t?r+=o:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=o,t=o)}return r.length>0&&i.push({literal:s||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(e){return os[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),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,r=void 0){if(this.opts.forceSimple)return M(e,t);const s={...this.opts};return t>0&&(s.padTo=t),r&&(s.signDisplay=r),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,t){const r=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(h,S)=>this.loc.extract(e,h,S),a=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",o=()=>r?ns(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(h,S)=>r?ss(e,h):i(S?{month:h}:{month:h,day:"numeric"},"month"),l=(h,S)=>r?rs(e,h):i(S?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const S=E.macroTokenToFormatOpts(h);return S?this.formatWithSystemDefault(e,S):h},m=h=>r?is(e,h):i({era:h},"era"),w=h=>{switch(h){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 a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({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 o();case"d":return s?i({day:"numeric"},"day"):this.num(e.day);case"dd":return s?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return s?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return s?i({month:"numeric"},"month"):this.num(e.month);case"MM":return s?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return s?i({year:"numeric"},"year"):this.num(e.year);case"yy":return s?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("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 f(h)}};return Gt(E.parseFormat(t),w)}formatDurationFromString(e,t){const r=this.opts.signMode==="negativeLargestOnly"?-1:1,s=f=>{switch(f[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}},i=(f,m)=>w=>{const h=s(w);if(h){const S=m.isNegativeDuration&&h!==m.largestUnit?r:1;let x;return this.opts.signMode==="negativeLargestOnly"&&h!==m.largestUnit?x="never":this.opts.signMode==="all"?x="always":x="auto",this.num(f.get(h)*S,w.length,x)}else return w},a=E.parseFormat(t),o=a.reduce((f,{literal:m,val:w})=>m?f:f.concat(w),[]),u=e.shiftTo(...o.map(s).filter(f=>f)),l={isNegativeDuration:u<0,largestUnit:Object.keys(u.values)[0]};return Gt(a,i(u,l))}}const _n=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function we(...n){const e=n.reduce((t,r)=>t+r.source,"");return RegExp(`^${e}$`)}function pe(...n){return e=>n.reduce(([t,r,s],i)=>{const[a,o,u]=i(e,s);return[{...t,...a},o||r,u]},[{},null,1]).slice(0,2)}function ke(n,...e){if(n==null)return[null,null];for(const[t,r]of e){const s=t.exec(n);if(s)return r(s)}return[null,null]}function jn(...n){return(e,t)=>{const r={};let s;for(s=0;s<n.length;s++)r[n[s]]=ne(e[t+s]);return[r,null,t+s]}}const Jn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,us=`(?:${Jn.source}?(?:\\[(${_n.source})\\])?)?`,Nt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Xn=RegExp(`${Nt.source}${us}`),Et=RegExp(`(?:[Tt]${Xn.source})?`),ls=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,cs=/(\d{4})-?W(\d\d)(?:-?(\d))?/,fs=/(\d{4})-?(\d{3})/,ds=jn("weekYear","weekNumber","weekDay"),hs=jn("year","ordinal"),ms=/(\d{4})-(\d\d)-(\d\d)/,Bn=RegExp(`${Nt.source} ?(?:${Jn.source}|(${_n.source}))?`),ys=RegExp(`(?: ${Bn.source})?`);function ye(n,e,t){const r=n[e];return g(r)?t:ne(r)}function gs(n,e){return[{year:ye(n,e),month:ye(n,e+1,1),day:ye(n,e+2,1)},null,e+3]}function ve(n,e){return[{hours:ye(n,e,0),minutes:ye(n,e+1,0),seconds:ye(n,e+2,0),milliseconds:bt(n[e+3])},null,e+4]}function De(n,e){const t=!n[e]&&!n[e+1],r=Xe(n[e+1],n[e+2]),s=t?null:D.instance(r);return[{},s,e+3]}function xe(n,e){const t=n[e]?J.create(n[e]):null;return[{},t,e+1]}const ws=RegExp(`^T?${Nt.source}$`),ps=/^-?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 ks(n){const[e,t,r,s,i,a,o,u,l]=n,f=e[0]==="-",m=u&&u[0]==="-",w=(h,S=!1)=>h!==void 0&&(S||h&&f)?-h:h;return[{years:w(ie(t)),months:w(ie(r)),weeks:w(ie(s)),days:w(ie(i)),hours:w(ie(a)),minutes:w(ie(o)),seconds:w(ie(u),u==="-0"),milliseconds:w(bt(l),m)}]}const vs={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function It(n,e,t,r,s,i,a){const o={year:e.length===2?kt(ne(e)):ne(e),month:Un.indexOf(t)+1,day:ne(r),hour:ne(s),minute:ne(i)};return a&&(o.second=ne(a)),n&&(o.weekday=n.length>3?qn.indexOf(n)+1:Hn.indexOf(n)+1),o}const Ss=/^(?:(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 Ts(n){const[,e,t,r,s,i,a,o,u,l,f,m]=n,w=It(e,s,r,t,i,a,o);let h;return u?h=vs[u]:l?h=0:h=Xe(f,m),[w,new D(h)]}function Os(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const bs=/^(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$/,Ms=/^(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$/,Ns=/^(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 Yt(n){const[,e,t,r,s,i,a,o]=n;return[It(e,s,r,t,i,a,o),D.utcInstance]}function Es(n){const[,e,t,r,s,i,a,o]=n;return[It(e,o,t,r,s,i,a),D.utcInstance]}const Is=we(ls,Et),Ds=we(cs,Et),xs=we(fs,Et),Cs=we(Xn),Kn=pe(gs,ve,De,xe),Fs=pe(ds,ve,De,xe),Ws=pe(hs,ve,De,xe),Vs=pe(ve,De,xe);function Ls(n){return ke(n,[Is,Kn],[Ds,Fs],[xs,Ws],[Cs,Vs])}function As(n){return ke(Os(n),[Ss,Ts])}function $s(n){return ke(n,[bs,Yt],[Ms,Yt],[Ns,Es])}function Rs(n){return ke(n,[ps,ks])}const Zs=pe(ve);function Us(n){return ke(n,[ws,Zs])}const zs=we(ms,ys),qs=we(Bn),Hs=pe(ve,De,xe);function Ps(n){return ke(n,[zs,Kn],[qs,Hs])}const _t="Invalid Duration",Qn={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Gs={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Qn},$=146097/400,ce=146097/4800,Ys={years:{quarters:4,months:12,weeks:$/7,days:$,hours:$*24,minutes:$*24*60,seconds:$*24*60*60,milliseconds:$*24*60*60*1e3},quarters:{months:3,weeks:$/28,days:$/4,hours:$*24/4,minutes:$*24*60/4,seconds:$*24*60*60/4,milliseconds:$*24*60*60*1e3/4},months:{weeks:ce/7,days:ce,hours:ce*24,minutes:ce*24*60,seconds:ce*24*60*60,milliseconds:ce*24*60*60*1e3},...Qn},ue=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],_s=ue.slice(0).reverse();function j(n,e,t=!1){const r={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy,matrix:e.matrix||n.matrix};return new p(r)}function er(n,e){let t=e.milliseconds??0;for(const r of _s.slice(1))e[r]&&(t+=e[r]*n[r].milliseconds);return t}function jt(n,e){const t=er(n,e)<0?-1:1;ue.reduceRight((r,s)=>{if(g(e[s]))return r;if(r){const i=e[r]*t,a=n[s][r],o=Math.floor(i/a);e[s]+=o*t,e[r]-=o*a*t}return s},null),ue.reduce((r,s)=>{if(g(e[s]))return r;if(r){const i=e[r]%1;e[r]-=i,e[s]+=i*n[r][s]}return s},null)}function Jt(n){const e={};for(const[t,r]of Object.entries(n))r!==0&&(e[t]=r);return e}class p{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let r=t?Ys:Gs;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||v.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,t){return p.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new N(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new p({values:Ye(e,p.normalizeUnit),loc:v.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(se(e))return p.fromMillis(e);if(p.isDuration(e))return e;if(typeof e=="object")return p.fromObject(e);throw new N(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[r]=Rs(e);return r?p.fromObject(r,t):p.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[r]=Us(e);return r?p.fromObject(r,t):p.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new N("need to specify a reason the Duration is invalid");const r=e instanceof H?e:new H(e,t);if(O.throwOnInvalid)throw new kr(r);return new p({invalid:r})}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()];if(!t)throw new un(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 r={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?E.create(this.loc,r).formatDurationFromString(this,e):_t}toHuman(e={}){if(!this.isValid)return _t;const t=e.showZeros!==!1,r=ue.map(s=>{const i=this.values[s];return g(i)||i===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:s.slice(0,-1)}).format(i)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Mt(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},y.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?er(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=p.fromDurationLike(e),r={};for(const s of ue)(ge(t.values,s)||ge(this.values,s))&&(r[s]=t.get(s)+this.get(s));return j(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=p.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=Zn(e(this.values[r],r));return j(this,{values:t},!0)}get(e){return this[p.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...Ye(e,p.normalizeUnit)};return j(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r,matrix:s}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:r};return j(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return jt(this.matrix,e),j(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Jt(this.normalize().shiftToAll().toObject());return j(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>p.normalizeUnit(a));const t={},r={},s=this.toObject();let i;for(const a of ue)if(e.indexOf(a)>=0){i=a;let o=0;for(const l in r)o+=this.matrix[l][a]*r[l],r[l]=0;se(s[a])&&(o+=s[a]);const u=Math.trunc(o);t[a]=u,r[a]=(o*1e3-u*1e3)/1e3}else se(s[a])&&(r[a]=s[a]);for(const a in r)r[a]!==0&&(t[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return jt(this.matrix,t),j(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]=this.values[t]===0?0:-this.values[t];return j(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=Jt(this.values);return j(this,{values:e},!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 this.invalid===null}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||!this.loc.equals(e.loc))return!1;function t(r,s){return r===void 0||r===0?s===void 0||s===0:r===s}for(const r of ue)if(!t(this.values[r],e.values[r]))return!1;return!0}}const fe="Invalid Interval";function js(n,e){return!n||!n.isValid?T.invalid("missing or invalid start"):!e||!e.isValid?T.invalid("missing or invalid end"):e<n?T.invalid("end before start",`The end of an interval must be after its start, but you had start=${n.toISO()} and end=${e.toISO()}`):null}class T{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 N("need to specify a reason the Interval is invalid");const r=e instanceof H?e:new H(e,t);if(O.throwOnInvalid)throw new pr(r);return new T({invalid:r})}static fromDateTimes(e,t){const r=Se(e),s=Se(t),i=js(r,s);return i??new T({start:r,end:s})}static after(e,t){const r=p.fromDurationLike(t),s=Se(e);return T.fromDateTimes(s,s.plus(r))}static before(e,t){const r=p.fromDurationLike(t),s=Se(e);return T.fromDateTimes(s.minus(r),s)}static fromISO(e,t){const[r,s]=(e||"").split("/",2);if(r&&s){let i,a;try{i=y.fromISO(r,t),a=i.isValid}catch{a=!1}let o,u;try{o=y.fromISO(s,t),u=o.isValid}catch{u=!1}if(a&&u)return T.fromDateTimes(i,o);if(a){const l=p.fromISO(s,t);if(l.isValid)return T.after(i,l)}else if(u){const l=p.fromISO(r,t);if(l.isValid)return T.before(o,l)}}return T.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 this.invalidReason===null}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 r=this.start.startOf(e,t);let s;return t!=null&&t.useLocaleWeeks?s=this.end.reconfigure({locale:r.locale}):s=this.end,s=s.startOf(e,t),Math.floor(s.diff(r,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?T.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Se).filter(a=>this.contains(a)).sort((a,o)=>a.toMillis()-o.toMillis()),r=[];let{s}=this,i=0;for(;s<this.e;){const a=t[i]||this.e,o=+a>+this.e?this.e:a;r.push(T.fromDateTimes(s,o)),s=o,i+=1}return r}splitBy(e){const t=p.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:r}=this,s=1,i;const a=[];for(;r<this.e;){const o=this.start.plus(t.mapUnits(u=>u*s));i=+o>+this.e?this.e:o,a.push(T.fromDateTimes(r,i)),r=i,s+=1}return a}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:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1: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,r=this.e<e.e?this.e:e.e;return t>=r?null:T.fromDateTimes(t,r)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return T.fromDateTimes(t,r)}static merge(e){const[t,r]=e.sort((s,i)=>s.s-i.s).reduce(([s,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[s,i.union(a)]:[s.concat([i]),a]:[s,a],[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const s=[],i=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),o=a.sort((u,l)=>u.time-l.time);for(const u of o)r+=u.type==="s"?1:-1,r===1?t=u.time:(t&&+t!=+u.time&&s.push(T.fromDateTimes(t,u.time)),t=null);return T.merge(s)}difference(...e){return T.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:fe}[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=He,t={}){return this.isValid?E.create(this.s.loc.clone(t),e).formatInterval(this):fe}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:fe}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:fe}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:fe}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:fe}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):p.invalid(this.invalidReason)}mapEndpoints(e){return T.fromDateTimes(e(this.s),e(this.e))}}class Ae{static hasDST(e=O.defaultZone){const t=y.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return J.isValidZone(e)}static normalizeZone(e){return re(e,O.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||v.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||v.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||v.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||v.create(t,r,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||v.create(t,r,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null}={}){return(s||v.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null}={}){return(s||v.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return v.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return v.create(t,null,"gregory").eras(e)}static features(){return{relative:An(),localeWeek:$n()}}}function Xt(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=t(e)-t(n);return Math.floor(p.fromMillis(r).as("days"))}function Js(n,e,t){const r=[["years",(u,l)=>l.year-u.year],["quarters",(u,l)=>l.quarter-u.quarter+(l.year-u.year)*4],["months",(u,l)=>l.month-u.month+(l.year-u.year)*12],["weeks",(u,l)=>{const f=Xt(u,l);return(f-f%7)/7}],["days",Xt]],s={},i=n;let a,o;for(const[u,l]of r)t.indexOf(u)>=0&&(a=u,s[u]=l(n,e),o=i.plus(s),o>e?(s[u]--,n=i.plus(s),n>e&&(o=n,s[u]--,n=i.plus(s))):n=o);return[n,s,o,a]}function Xs(n,e,t,r){let[s,i,a,o]=Js(n,e,t);const u=e-s,l=t.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);l.length===0&&(a<e&&(a=s.plus({[o]:1})),a!==s&&(i[o]=(i[o]||0)+u/(a-s)));const f=p.fromObject(i,r);return l.length>0?p.fromMillis(u,r).shiftTo(...l).plus(f):f}const Bs="missing Intl.DateTimeFormat.formatToParts support";function k(n,e=t=>t){return{regex:n,deser:([t])=>e(zr(t))}}const Ks=" ",tr=`[ ${Ks}]`,nr=new RegExp(tr,"g");function Qs(n){return n.replace(/\./g,"\\.?").replace(nr,tr)}function Bt(n){return n.replace(/\./g,"").replace(nr," ").toLowerCase()}function q(n,e){return n===null?null:{regex:RegExp(n.map(Qs).join("|")),deser:([t])=>n.findIndex(r=>Bt(t)===Bt(r))+e}}function Kt(n,e){return{regex:n,deser:([,t,r])=>Xe(t,r),groups:e}}function $e(n){return{regex:n,deser:([e])=>e}}function ei(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ti(n,e){const t=z(e),r=z(e,"{2}"),s=z(e,"{3}"),i=z(e,"{4}"),a=z(e,"{6}"),o=z(e,"{1,2}"),u=z(e,"{1,3}"),l=z(e,"{1,6}"),f=z(e,"{1,9}"),m=z(e,"{2,4}"),w=z(e,"{4,6}"),h=L=>({regex:RegExp(ei(L.val)),deser:([X])=>X,literal:!0}),x=(L=>{if(n.literal)return h(L);switch(L.val){case"G":return q(e.eras("short"),0);case"GG":return q(e.eras("long"),0);case"y":return k(l);case"yy":return k(m,kt);case"yyyy":return k(i);case"yyyyy":return k(w);case"yyyyyy":return k(a);case"M":return k(o);case"MM":return k(r);case"MMM":return q(e.months("short",!0),1);case"MMMM":return q(e.months("long",!0),1);case"L":return k(o);case"LL":return k(r);case"LLL":return q(e.months("short",!1),1);case"LLLL":return q(e.months("long",!1),1);case"d":return k(o);case"dd":return k(r);case"o":return k(u);case"ooo":return k(s);case"HH":return k(r);case"H":return k(o);case"hh":return k(r);case"h":return k(o);case"mm":return k(r);case"m":return k(o);case"q":return k(o);case"qq":return k(r);case"s":return k(o);case"ss":return k(r);case"S":return k(u);case"SSS":return k(s);case"u":return $e(f);case"uu":return $e(o);case"uuu":return k(t);case"a":return q(e.meridiems(),0);case"kkkk":return k(i);case"kk":return k(m,kt);case"W":return k(o);case"WW":return k(r);case"E":case"c":return k(t);case"EEE":return q(e.weekdays("short",!1),1);case"EEEE":return q(e.weekdays("long",!1),1);case"ccc":return q(e.weekdays("short",!0),1);case"cccc":return q(e.weekdays("long",!0),1);case"Z":case"ZZ":return Kt(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return Kt(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return $e(/[a-z_+-/]{1,256}?/i);case" ":return $e(/[^\S\n\r]/);default:return h(L)}})(n)||{invalidReason:Bs};return x.token=n,x}const ni={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"}};function ri(n,e,t){const{type:r,value:s}=n;if(r==="literal"){const u=/^\s+$/.test(s);return{literal:!u,val:u?" ":s}}const i=e[r];let a=r;r==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=t.hour12?"hour12":"hour24");let o=ni[a];if(typeof o=="object"&&(o=o[i]),o)return{literal:!1,val:o}}function si(n){return[`^${n.map(t=>t.regex).reduce((t,r)=>`${t}(${r.source})`,"")}$`,n]}function ii(n,e,t){const r=n.match(e);if(r){const s={};let i=1;for(const a in t)if(ge(t,a)){const o=t[a],u=o.groups?o.groups+1:1;!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(r.slice(i,i+u))),i+=u}return[r,s]}else return[r,{}]}function ai(n){const e=i=>{switch(i){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}};let t=null,r;return g(n.z)||(t=J.create(n.z)),g(n.Z)||(t||(t=new D(n.Z)),r=n.Z),g(n.q)||(n.M=(n.q-1)*3+1),g(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),g(n.u)||(n.S=bt(n.u)),[Object.keys(n).reduce((i,a)=>{const o=e(a);return o&&(i[o]=n[a]),i},{}),t,r]}let it=null;function oi(){return it||(it=y.fromMillis(1555555555555)),it}function ui(n,e){if(n.literal)return n;const t=E.macroTokenToFormatOpts(n.val),r=ar(t,e);return r==null||r.includes(void 0)?n:r}function rr(n,e){return Array.prototype.concat(...n.map(t=>ui(t,e)))}class sr{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=rr(E.parseFormat(t),e),this.units=this.tokens.map(r=>ti(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,s]=si(this.units);this.regex=RegExp(r,"i"),this.handlers=s}}explainFromTokens(e){if(this.isValid){const[t,r]=ii(e,this.regex,this.handlers),[s,i,a]=r?ai(r):[null,null,void 0];if(ge(r,"a")&&ge(r,"H"))throw new he("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:r,result:s,zone:i,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ir(n,e,t){return new sr(n,t).explainFromTokens(e)}function li(n,e,t){const{result:r,zone:s,specificOffset:i,invalidReason:a}=ir(n,e,t);return[r,s,i,a]}function ar(n,e){if(!n)return null;const r=E.create(e,n).dtFormatter(oi()),s=r.formatToParts(),i=r.resolvedOptions();return s.map(a=>ri(a,n,i))}const at="Invalid DateTime",Qt=864e13;function Oe(n){return new H("unsupported zone",`the zone "${n.name}" is not supported`)}function ot(n){return n.weekData===null&&(n.weekData=Pe(n.c)),n.weekData}function ut(n){return n.localWeekData===null&&(n.localWeekData=Pe(n.c,n.loc.getMinDaysInFirstWeek(),n.loc.getStartOfWeek())),n.localWeekData}function ae(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new y({...t,...e,old:t})}function or(n,e,t){let r=n-e*60*1e3;const s=t.offset(r);if(e===s)return[r,e];r-=(s-e)*60*1e3;const i=t.offset(r);return s===i?[r,s]:[n-Math.min(s,i)*60*1e3,Math.max(s,i)]}function Re(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function Ue(n,e,t){return or(Je(n),e,t)}function en(n,e){const t=n.o,r=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...n.c,year:r,month:s,day:Math.min(n.c.day,Ge(r,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=p.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=Je(i);let[u,l]=or(o,t,n.zone);return a!==0&&(u+=a,l=n.zone.offset(u)),{ts:u,o:l}}function de(n,e,t,r,s,i){const{setZone:a,zone:o}=t;if(n&&Object.keys(n).length!==0||e){const u=e||o,l=y.fromObject(n,{...t,zone:u,specificOffset:i});return a?l:l.setZone(o)}else return y.invalid(new H("unparsable",`the input "${s}" can't be parsed as ${r}`))}function Ze(n,e,t=!0){return n.isValid?E.create(v.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function lt(n,e,t){const r=n.c.year>9999||n.c.year<0;let s="";if(r&&n.c.year>=0&&(s+="+"),s+=M(n.c.year,r?6:4),t==="year")return s;if(e){if(s+="-",s+=M(n.c.month),t==="month")return s;s+="-"}else if(s+=M(n.c.month),t==="month")return s;return s+=M(n.c.day),s}function tn(n,e,t,r,s,i,a){let o=!t||n.c.millisecond!==0||n.c.second!==0,u="";switch(a){case"day":case"month":case"year":break;default:if(u+=M(n.c.hour),a==="hour")break;if(e){if(u+=":",u+=M(n.c.minute),a==="minute")break;o&&(u+=":",u+=M(n.c.second))}else{if(u+=M(n.c.minute),a==="minute")break;o&&(u+=M(n.c.second))}if(a==="second")break;o&&(!r||n.c.millisecond!==0)&&(u+=".",u+=M(n.c.millisecond,3))}return s&&(n.isOffsetFixed&&n.offset===0&&!i?u+="Z":n.o<0?(u+="-",u+=M(Math.trunc(-n.o/60)),u+=":",u+=M(Math.trunc(-n.o%60))):(u+="+",u+=M(Math.trunc(n.o/60)),u+=":",u+=M(Math.trunc(n.o%60)))),i&&(u+="["+n.zone.ianaName+"]"),u}const ur={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ci={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},fi={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ze=["year","month","day","hour","minute","second","millisecond"],di=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],hi=["year","ordinal","hour","minute","second","millisecond"];function qe(n){const e={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"}[n.toLowerCase()];if(!e)throw new un(n);return e}function nn(n){switch(n.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return qe(n)}}function mi(n){if(be===void 0&&(be=O.now()),n.type!=="iana")return n.offset(be);const e=n.name;let t=vt.get(e);return t===void 0&&(t=n.offset(be),vt.set(e,t)),t}function rn(n,e){const t=re(e.zone,O.defaultZone);if(!t.isValid)return y.invalid(Oe(t));const r=v.fromObject(e);let s,i;if(g(n.year))s=O.now();else{for(const u of ze)g(n[u])&&(n[u]=ur[u]);const a=Vn(n)||Ln(n);if(a)return y.invalid(a);const o=mi(t);[s,i]=Ue(n,o,t)}return new y({ts:s,zone:t,loc:r,o:i})}function sn(n,e,t){const r=g(t.round)?!0:t.round,s=g(t.rounding)?"trunc":t.rounding,i=(o,u)=>(o=Mt(o,r||t.calendary?0:2,t.calendary?"round":s),e.loc.clone(t).relFormatter(t).format(o,u)),a=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return i(a(t.unit),t.unit);for(const o of t.units){const u=a(o);if(Math.abs(u)>=1)return i(u,o)}return i(n>e?-0:0,t.units[t.units.length-1])}function an(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}let be;const vt=new Map;class y{constructor(e){const t=e.zone||O.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new H("invalid input"):null)||(t.isValid?null:Oe(t));this.ts=g(e.ts)?O.now():e.ts;let s=null,i=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,i]=[e.old.c,e.old.o];else{const o=se(e.o)&&!e.old?e.o:t.offset(this.ts);s=Re(this.ts,o),r=Number.isNaN(s.year)?new H("invalid input"):null,s=r?null:s,i=r?null:o}this._zone=t,this.loc=e.loc||v.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=s,this.o=i,this.isLuxonDateTime=!0}static now(){return new y({})}static local(){const[e,t]=an(arguments),[r,s,i,a,o,u,l]=t;return rn({year:r,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static utc(){const[e,t]=an(arguments),[r,s,i,a,o,u,l]=t;return e.zone=D.utcInstance,rn({year:r,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static fromJSDate(e,t={}){const r=Yr(e)?e.valueOf():NaN;if(Number.isNaN(r))return y.invalid("invalid input");const s=re(t.zone,O.defaultZone);return s.isValid?new y({ts:r,zone:s,loc:v.fromObject(t)}):y.invalid(Oe(s))}static fromMillis(e,t={}){if(se(e))return e<-Qt||e>Qt?y.invalid("Timestamp out of range"):new y({ts:e,zone:re(t.zone,O.defaultZone),loc:v.fromObject(t)});throw new N(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(se(e))return new y({ts:e*1e3,zone:re(t.zone,O.defaultZone),loc:v.fromObject(t)});throw new N("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const r=re(t.zone,O.defaultZone);if(!r.isValid)return y.invalid(Oe(r));const s=v.fromObject(t),i=Ye(e,nn),{minDaysInFirstWeek:a,startOfWeek:o}=qt(i,s),u=O.now(),l=g(t.specificOffset)?r.offset(u):t.specificOffset,f=!g(i.ordinal),m=!g(i.year),w=!g(i.month)||!g(i.day),h=m||w,S=i.weekYear||i.weekNumber;if((h||f)&&S)throw new he("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(w&&f)throw new he("Can't mix ordinal dates with month/day");const x=S||i.weekday&&!h;let L,X,B=Re(u,l);x?(L=di,X=ci,B=Pe(B,a,o)):f?(L=hi,X=fi,B=st(B)):(L=ze,X=ur);let Ce=!1;for(const K of L){const Q=i[K];g(Q)?Ce?i[K]=X[K]:i[K]=B[K]:Ce=!0}const Ke=x?Hr(i,a,o):f?Pr(i):Vn(i),Fe=Ke||Ln(i);if(Fe)return y.invalid(Fe);const U=x?Ut(i,a,o):f?zt(i):i,[b,I]=Ue(U,l,r),G=new y({ts:b,zone:r,o:I,loc:s});return i.weekday&&h&&e.weekday!==G.weekday?y.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${G.toISO()}`):G.isValid?G:y.invalid(G.invalid)}static fromISO(e,t={}){const[r,s]=Ls(e);return de(r,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,s]=As(e);return de(r,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,s]=$s(e);return de(r,s,t,"HTTP",t)}static fromFormat(e,t,r={}){if(g(e)||g(t))throw new N("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:i=null}=r,a=v.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0}),[o,u,l,f]=li(a,e,t);return f?y.invalid(f):de(o,u,r,`format ${t}`,e,l)}static fromString(e,t,r={}){return y.fromFormat(e,t,r)}static fromSQL(e,t={}){const[r,s]=Ps(e);return de(r,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new N("need to specify a reason the DateTime is invalid");const r=e instanceof H?e:new H(e,t);if(O.throwOnInvalid)throw new wr(r);return new y({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const r=ar(e,v.fromObject(t));return r?r.map(s=>s?s.val:null).join(""):null}static expandFormat(e,t={}){return rr(E.parseFormat(e),v.fromObject(t)).map(s=>s.val).join("")}static resetCache(){be=void 0,vt.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}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?ot(this).weekYear:NaN}get weekNumber(){return this.isValid?ot(this).weekNumber:NaN}get weekday(){return this.isValid?ot(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?ut(this).weekday:NaN}get localWeekNumber(){return this.isValid?ut(this).weekNumber:NaN}get localWeekYear(){return this.isValid?ut(this).weekYear:NaN}get ordinal(){return this.isValid?st(this.c).ordinal:NaN}get monthShort(){return this.isValid?Ae.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Ae.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Ae.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Ae.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?!1: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,r=Je(this.c),s=this.zone.offset(r-e),i=this.zone.offset(r+e),a=this.zone.offset(r-s*t),o=this.zone.offset(r-i*t);if(a===o)return[this];const u=r-a*t,l=r-o*t,f=Re(u,a),m=Re(l,o);return f.hour===m.hour&&f.minute===m.minute&&f.second===m.second&&f.millisecond===m.millisecond?[ae(this,{ts:u}),ae(this,{ts:l})]:[this]}get isInLeapYear(){return Ie(this.year)}get daysInMonth(){return Ge(this.year,this.month)}get daysInYear(){return this.isValid?me(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ne(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ne(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:r,calendar:s}=E.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(D.instance(e),t)}toLocal(){return this.setZone(O.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:r=!1}={}){if(e=re(e,O.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||r){const i=e.offset(this.ts),a=this.toObject();[s]=Ue(a,i,e)}return ae(this,{ts:s,zone:e})}else return y.invalid(Oe(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r});return ae(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=Ye(e,nn),{minDaysInFirstWeek:r,startOfWeek:s}=qt(t,this.loc),i=!g(t.weekYear)||!g(t.weekNumber)||!g(t.weekday),a=!g(t.ordinal),o=!g(t.year),u=!g(t.month)||!g(t.day),l=o||u,f=t.weekYear||t.weekNumber;if((l||a)&&f)throw new he("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new he("Can't mix ordinal dates with month/day");let m;i?m=Ut({...Pe(this.c,r,s),...t},r,s):g(t.ordinal)?(m={...this.toObject(),...t},g(t.day)&&(m.day=Math.min(Ge(m.year,m.month),m.day))):m=zt({...st(this.c),...t});const[w,h]=Ue(m,this.o,this.zone);return ae(this,{ts:w,o:h})}plus(e){if(!this.isValid)return this;const t=p.fromDurationLike(e);return ae(this,en(this,t))}minus(e){if(!this.isValid)return this;const t=p.fromDurationLike(e).negate();return ae(this,en(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const r={},s=p.normalizeUnit(e);switch(s){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(s==="weeks")if(t){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(s==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?E.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):at}toLocaleString(e=He,t={}){return this.isValid?E.create(this.loc.clone(t),e).formatDateTime(this):at}toLocaleParts(e={}){return this.isValid?E.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:r=!1,includeOffset:s=!0,extendedZone:i=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;a=qe(a);const o=e==="extended";let u=lt(this,o,a);return ze.indexOf(a)>=3&&(u+="T"),u+=tn(this,o,t,r,s,i,a),u}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?lt(this,e==="extended",qe(t)):null}toISOWeekDate(){return Ze(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:r=!0,includePrefix:s=!1,extendedZone:i=!1,format:a="extended",precision:o="milliseconds"}={}){return this.isValid?(o=qe(o),(s&&ze.indexOf(o)>=3?"T":"")+tn(this,a==="extended",t,e,r,i,o)):null}toRFC2822(){return Ze(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ze(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?lt(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:r=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(r&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Ze(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():at}[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",r={}){if(!this.isValid||!e.isValid)return p.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=_r(t).map(p.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,u=a?e:this,l=Xs(o,u,i,s);return a?l.negate():l}diffNow(e="milliseconds",t={}){return this.diff(y.now(),e,t)}until(e){return this.isValid?T.fromDateTimes(this,e):this}hasSame(e,t,r){if(!this.isValid)return!1;const s=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,r)<=s&&s<=i.endOf(t,r)}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||y.fromObject({},{zone:this.zone}),r=e.padding?this<t?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(s=e.unit,i=void 0),sn(t,this.plus(r),{...e,numeric:"always",units:s,unit:i})}toRelativeCalendar(e={}){return this.isValid?sn(e.base||y.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(y.isDateTime))throw new N("min requires all arguments be DateTimes");return Ht(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(y.isDateTime))throw new N("max requires all arguments be DateTimes");return Ht(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,r={}){const{locale:s=null,numberingSystem:i=null}=r,a=v.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});return ir(a,e,t)}static fromStringExplain(e,t,r={}){return y.fromFormatExplain(e,t,r)}static buildFormatParser(e,t={}){const{locale:r=null,numberingSystem:s=null}=t,i=v.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});return new sr(i,e)}static fromFormatParser(e,t,r={}){if(g(e)||g(t))throw new N("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:i=null}=r,a=v.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});if(!a.equals(t.locale))throw new N(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);const{result:o,zone:u,specificOffset:l,invalidReason:f}=t.explainFromTokens(e);return f?y.invalid(f):de(o,u,r,`format ${t.format}`,e,l)}static get DATE_SHORT(){return He}static get DATE_MED(){return ln}static get DATE_MED_WITH_WEEKDAY(){return vr}static get DATE_FULL(){return cn}static get DATE_HUGE(){return fn}static get TIME_SIMPLE(){return dn}static get TIME_WITH_SECONDS(){return hn}static get TIME_WITH_SHORT_OFFSET(){return mn}static get TIME_WITH_LONG_OFFSET(){return yn}static get TIME_24_SIMPLE(){return gn}static get TIME_24_WITH_SECONDS(){return wn}static get TIME_24_WITH_SHORT_OFFSET(){return pn}static get TIME_24_WITH_LONG_OFFSET(){return kn}static get DATETIME_SHORT(){return vn}static get DATETIME_SHORT_WITH_SECONDS(){return Sn}static get DATETIME_MED(){return Tn}static get DATETIME_MED_WITH_SECONDS(){return On}static get DATETIME_MED_WITH_WEEKDAY(){return Sr}static get DATETIME_FULL(){return bn}static get DATETIME_FULL_WITH_SECONDS(){return Mn}static get DATETIME_HUGE(){return Nn}static get DATETIME_HUGE_WITH_SECONDS(){return En}}function Se(n){if(y.isDateTime(n))return n;if(n&&n.valueOf&&se(n.valueOf()))return y.fromJSDate(n);if(n&&typeof n=="object")return y.fromObject(n);throw new N(`Unknown datetime argument: ${n}, of type ${typeof n}`)}var yi=function(){function n(e){dr(this,n),_(this,"emitter",void 0),_(this,"url",void 0),_(this,"cmsKey",void 0),_(this,"channel",void 0),_(this,"socket",void 0),_(this,"isConnectionWanted",void 0),_(this,"isConnected",void 0),_(this,"lastMessageAt",void 0),_(this,"interval",void 0),this.emitter=gr(),this.url=null,this.cmsKey=null,this.channel=e,this.isConnected=!1,this.isConnectionWanted=!1,this.lastMessageAt=y.now().minus({year:1})}return mr(n,[{key:"on",value:function(t,r){return this.emitter.on(t,r)}},{key:"init",value:function(){var e=et(oe().m(function r(){var s=this;return oe().w(function(i){for(;;)switch(i.n){case 0:this.interval=setInterval(function(){s.isConnectionWanted&&!s.isActive()&&(console.debug("Xmr::setInterval: should be active"),s.start(s.url||"DISABLED",s.cmsKey||"n/a"))},6e4);case 1:return i.a(2)}},r,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:"start",value:function(){var e=et(oe().m(function r(s,i){var a=this,o;return oe().w(function(u){for(;;)switch(u.p=u.n){case 0:if(!(!this.channel||this.channel==="unknown")){u.n=1;break}return console.error("Xmr::start: channel unknown, XMR will be disabled"),u.a(2);case 1:if(this.url!=="DISABLED"){u.n=2;break}return console.info("Xmr::start: XMR disabled"),this.isConnectionWanted=!1,this.isActive()&&stop(),u.a(2);case 2:if(this.isConnectionWanted=!0,!(this.isActive()&&this.url===s)){u.n=3;break}return console.debug("Xmr::start: already connected to this URL"),this.cmsKey=i,u.a(2);case 3:if(!this.isConnected){u.n=5;break}return console.debug("Xmr::start: already connected but not active, or a different URL"),u.n=4,this.stop();case 4:u.n=6;break;case 5:console.debug("Xmr::start: not connected yet");case 6:this.url=s,this.cmsKey=i,console.debug("Xmr::start: connecting to "+this.url),u.p=7,this.socket=new WebSocket(this.url),u.n=9;break;case 8:return u.p=8,o=u.v,console.debug("Xmr::start: failed connecting to "+this.url+", e = "+o),this.emitter.emit("error","Failed to connect"),u.a(2);case 9:this.socket.addEventListener("open",function(l){if(console.debug("Xmr::"+l.type),a.socket.readyState!==WebSocket.OPEN){console.info("Xmr::"+l.type+": not open yet");return}a.socket.send(JSON.stringify({type:"init",key:a.cmsKey,channel:a.channel})),a.isConnected=!0,a.emitter.emit("connected")}),this.socket.addEventListener("close",function(l){console.debug("Xmr::"+l.type),a.isConnected=!1,a.emitter.emit("disconnected")}),this.socket.addEventListener("error",function(l){console.debug("Xmr::"+l.type),a.emitter.emit("error","error")}),this.socket.addEventListener("message",function(l){if(console.debug(l),a.lastMessageAt=y.now(),a.emitter.emit("statusChange",a.lastMessageAt.toISO()||""),l.data==="H")console.debug("Xmr::message: Heartbeat...");else{var f=JSON.parse(l.data);console.debug("Xmr::message: action is "+f.action);var m=y.fromISO(f.createdDt).plus({seconds:parseInt(f.ttl)});if(m<y.now())console.debug("Xmr::message: message expired at "+m.toString());else if(f.action==="collectNow")a.emitter.emit("collectNow");else if(f.action==="screenShot")a.emitter.emit("screenShot");else if(f.action==="licenceCheck")a.emitter.emit("licenceCheck");else if(f.action=="commandAction"&&f.commandCode.startsWith("showStatusWindow")){var w=f.commandCode.split("|");a.emitter.emit("showStatusWindow",parseInt(w[1])||60)}else f.action=="commandAction"&&f.commandCode.startsWith("forceUpdateChromeOS")?a.emitter.emit("forceUpdateChromeOS"):f.action=="commandAction"&&f.commandCode.startsWith("currentGeoLocation")?a.emitter.emit("currentGeoLocation"):f.action=="criteriaUpdate"?a.emitter.emit("criteriaUpdate",f.criteriaUpdates):console.error("Xmr::message: unknown action: "+f.action)}});case 10:return u.a(2)}},r,this,[[7,8]])}));function t(r,s){return e.apply(this,arguments)}return t}()},{key:"stop",value:function(){var e=et(oe().m(function r(){return oe().w(function(s){for(;;)switch(s.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 s.a(2)}},r,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:"isActive",value:function(){return console.debug("Xmr::isActive: lastMessageAt: "+this.lastMessageAt.toString()),this.isConnected&&this.lastMessageAt>y.now().minus({minute:15})}}])}();const d=lr("XMR");class wi{constructor(e,t){this.config=e,this.player=t,this.xmr=null,this.connected=!1,this.reconnectAttempts=0,this.maxReconnectAttempts=10,this.reconnectDelay=5e3,this.lastXmrUrl=null,this.lastCmsKey=null,this.reconnectTimer=null,this.intentionalShutdown=!1}async start(e,t){try{if(d.info("Initializing connection to:",e),this.intentionalShutdown=!1,this.lastXmrUrl=e,this.lastCmsKey=t,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),!this.xmr){const r=this.config.xmrChannel||`player-${this.config.hardwareKey}`;this.xmr=new yi(r),this.setupEventHandlers()}return await this.xmr.init(),await this.xmr.start(e,t),this.connected=!0,this.reconnectAttempts=0,d.info("Connected successfully"),!0}catch(r){return d.warn("Failed to start:",r.message),d.info("Continuing in polling mode (XMDS only)"),this.scheduleReconnect(e,t),!1}}setupEventHandlers(){this.xmr&&(this.xmr.on("connected",()=>{var e,t;d.info("WebSocket connected"),this.connected=!0,this.reconnectAttempts=0,(t=(e=this.player).updateStatus)==null||t.call(e,"XMR connected")}),this.xmr.on("disconnected",()=>{var e,t;d.warn("WebSocket disconnected"),this.connected=!1,(t=(e=this.player).updateStatus)==null||t.call(e,"XMR disconnected (polling mode)"),this.lastXmrUrl&&this.lastCmsKey&&!this.intentionalShutdown&&(d.info("Connection lost, scheduling reconnection..."),this.scheduleReconnect(this.lastXmrUrl,this.lastCmsKey))}),this.xmr.on("error",e=>{d.error("WebSocket error:",e)}),this.xmr.on("collectNow",async()=>{d.info("Received collectNow command from CMS");try{await this.player.collect(),d.debug("collectNow completed successfully")}catch(e){d.error("collectNow failed:",e)}}),this.xmr.on("screenShot",async()=>{d.info("Received screenShot command from CMS");try{await this.player.captureScreenshot(),d.debug("screenShot completed successfully")}catch(e){d.error("screenShot failed:",e)}}),this.xmr.on("licenceCheck",()=>{d.debug("Received licenceCheck (no-op for Linux client)")}),this.xmr.on("changeLayout",async e=>{const t=typeof e=="object"&&e.layoutId||e,r=typeof e=="object"&&parseInt(e.duration)||0,s=typeof e=="object"&&e.changeMode||"replace";d.info("Received changeLayout command:",t,r?`duration=${r}s`:"",s!=="replace"?`mode=${s}`:"");try{typeof e=="object"&&e.downloadRequired===!0&&(d.info("changeLayout: downloadRequired — triggering collection first"),await this.player.collect()),await this.player.changeLayout(t,{duration:r,changeMode:s}),d.debug("changeLayout completed successfully")}catch(i){d.error("changeLayout failed:",i)}}),this.xmr.on("overlayLayout",async e=>{const t=typeof e=="object"&&e.layoutId||e,r=typeof e=="object"&&parseInt(e.duration)||0;d.info("Received overlayLayout command:",t,r?`duration=${r}s`:"");try{typeof e=="object"&&e.downloadRequired===!0&&(d.info("overlayLayout: downloadRequired — triggering collection first"),await this.player.collect()),await this.player.overlayLayout(t,{duration:r}),d.debug("overlayLayout completed successfully")}catch(s){d.error("overlayLayout failed:",s)}}),this.xmr.on("revertToSchedule",async()=>{d.info("Received revertToSchedule command");try{await this.player.revertToSchedule(),d.debug("revertToSchedule completed successfully")}catch(e){d.error("revertToSchedule failed:",e)}}),this.xmr.on("purgeAll",async()=>{d.info("Received purgeAll command");try{await this.player.purgeAll(),d.debug("purgeAll completed successfully")}catch(e){d.error("purgeAll failed:",e)}}),this.xmr.on("commandAction",async e=>{const t=(e==null?void 0:e.commandCode)||e;d.info("Received commandAction command:",t);try{const r=this.player.displayCommands||(e==null?void 0:e.commands);await this.player.executeCommand(t,r),d.debug("commandAction completed successfully")}catch(r){d.error("commandAction failed:",r)}}),this.xmr.on("triggerWebhook",async e=>{d.info("Received triggerWebhook command:",e);try{this.player.triggerWebhook((e==null?void 0:e.triggerCode)||e),d.debug("triggerWebhook completed successfully")}catch(t){d.error("triggerWebhook failed:",t)}}),this.xmr.on("dataUpdate",async()=>{d.info("Received dataUpdate command");try{this.player.refreshDataConnectors(),d.debug("dataUpdate completed successfully")}catch(e){d.error("dataUpdate failed:",e)}}),this.xmr.on("rekeyAction",async()=>{d.info("Received rekeyAction command - rotating RSA key pair");try{this.config.data.xmrPubKey="",this.config.data.xmrPrivKey="",await this.config.ensureXmrKeyPair(),await this.player.collect(),d.info("RSA key pair rotated successfully")}catch(e){d.error("Key rotation failed:",e)}}),this.xmr.on("screenshot",async()=>{d.info("Received screenshot command from CMS");try{await this.player.captureScreenshot()}catch(e){d.error("screenshot failed:",e)}}),this.xmr.on("criteriaUpdate",async e=>{d.info("Received criteriaUpdate command:",e);try{await this.player.collect(),d.debug("criteriaUpdate completed successfully")}catch(t){d.error("criteriaUpdate failed:",t)}}),this.xmr.on("currentGeoLocation",async e=>{d.info("Received currentGeoLocation command:",e);try{e&&e.latitude!=null&&e.longitude!=null?this.player.reportGeoLocation?(this.player.reportGeoLocation(e),d.debug("currentGeoLocation: coordinates applied")):d.warn("Geo location reporting not implemented in player"):this.player.requestGeoLocation?(await this.player.requestGeoLocation(),d.debug("currentGeoLocation: browser location requested")):d.warn("Geo location request not implemented in player")}catch(t){d.error("currentGeoLocation failed:",t)}}))}scheduleReconnect(e,t){if(this.reconnectAttempts>=this.maxReconnectAttempts){d.warn("Max reconnection attempts reached, giving up"),d.info("Will retry on next collection cycle");return}this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectAttempts++;const r=this.reconnectDelay*this.reconnectAttempts;d.debug(`Scheduling reconnect attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts} in ${r}ms`),this.reconnectTimer=setTimeout(()=>{d.debug("Attempting to reconnect..."),this.reconnectTimer=null,this.start(e,t)},r)}async stop(){if(this.intentionalShutdown=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),!!this.xmr)try{await this.xmr.stop(),this.connected=!1,d.info("Stopped")}catch(e){d.error("Error stopping:",e)}}isConnected(){return this.connected}async send(e,t){if(!this.connected||!this.xmr)return d.warn("Cannot send - not connected"),!1;try{return await this.xmr.send(e,t),!0}catch(r){return d.error("Error sending:",r),!1}}}const pi=fr.version;export{pi as VERSION,wi as XmrWrapper};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{c as lr}from"./cms-api-CUQmnOOb.js";const cr="0.5.17",fr={version:cr};function Dt(n,e,t,r,s,i,a){try{var o=n[i](a),u=o.value}catch(l){return void t(l)}o.done?e(u):Promise.resolve(u).then(r,s)}function et(n){return function(){var e=this,t=arguments;return new Promise(function(r,s){var i=n.apply(e,t);function a(u){Dt(i,r,s,a,o,"next",u)}function o(u){Dt(i,r,s,a,o,"throw",u)}a(void 0)})}}function dr(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function hr(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,on(r.key),r)}}function mr(n,e,t){return e&&hr(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function _(n,e,t){return(e=on(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function oe(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,e,t=typeof Symbol=="function"?Symbol:{},r=t.iterator||"@@iterator",s=t.toStringTag||"@@toStringTag";function i(h,S,x,L){var X=S&&S.prototype instanceof o?S:o,B=Object.create(X.prototype);return W(B,"_invoke",function(Ce,Ke,Fe){var U,b,I,G=0,K=Fe||[],Q=!1,Y={p:0,n:0,v:n,a:We,f:We.bind(n,4),d:function(A,C){return U=A,b=0,I=n,Y.n=C,a}};function We(A,C){for(b=A,I=C,e=0;!Q&&G&&!ee&&e<K.length;e++){var ee,F=K[e],Qe=Y.p,Ve=F[2];A>3?(ee=Ve===C)&&(I=F[(b=F[4])?5:(b=3,3)],F[4]=F[5]=n):F[0]<=Qe&&((ee=A<2&&Qe<F[1])?(b=0,Y.v=C,Y.n=F[1]):Qe<Ve&&(ee=A<3||F[0]>C||C>Ve)&&(F[4]=A,F[5]=C,Y.n=Ve,b=0))}if(ee||A>1)return a;throw Q=!0,C}return function(A,C,ee){if(G>1)throw TypeError("Generator is already running");for(Q&&C===1&&We(C,ee),b=C,I=ee;(e=b<2?n:I)||!Q;){U||(b?b<3?(b>1&&(Y.n=-1),We(b,I)):Y.n=I:Y.v=I);try{if(G=2,U){if(b||(A="next"),e=U[A]){if(!(e=e.call(U,I)))throw TypeError("iterator result is not an object");if(!e.done)return e;I=e.value,b<2&&(b=0)}else b===1&&(e=U.return)&&e.call(U),b<2&&(I=TypeError("The iterator does not provide a '"+A+"' method"),b=1);U=n}else if((e=(Q=Y.n<0)?I:Ce.call(Ke,Y))!==a)break}catch(F){U=n,b=1,I=F}finally{G=1}}return{value:e,done:Q}}}(h,x,L),!0),B}var a={};function o(){}function u(){}function l(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(W(e={},r,function(){return this}),e),m=l.prototype=o.prototype=Object.create(f);function w(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,l):(h.__proto__=l,W(h,s,"GeneratorFunction")),h.prototype=Object.create(m),h}return u.prototype=l,W(m,"constructor",l),W(l,"constructor",u),u.displayName="GeneratorFunction",W(l,s,"GeneratorFunction"),W(m),W(m,s,"Generator"),W(m,r,function(){return this}),W(m,"toString",function(){return"[object Generator]"}),(oe=function(){return{w:i,m:w}})()}function W(n,e,t,r){var s=Object.defineProperty;try{s({},"",{})}catch{s=0}W=function(i,a,o,u){function l(f,m){W(i,f,function(w){return this._invoke(f,m,w)})}a?s?s(i,a,{value:o,enumerable:!u,configurable:!u,writable:!u}):i[a]=o:(l("next",0),l("throw",1),l("return",2))},W(n,e,t,r)}function yr(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}function on(n){var e=yr(n,"string");return typeof e=="symbol"?e:e+""}var gr=function(){return{emit:function(t){for(var r=arguments.length,s=new Array(r>1?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];for(var a=this.events[t]||[],o=0,u=a.length;o<u;o++)a[o].apply(a,s)},events:{},on:function(t,r){var s,i=this;return((s=this.events)[t]||(s[t]=[])).push(r),function(){var a;i.events[t]=(a=i.events[t])===null||a===void 0?void 0:a.filter(function(o){return r!==o})}}}};class le extends Error{}class wr extends le{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class pr extends le{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class kr extends le{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class he extends le{}class un extends le{constructor(e){super(`Invalid unit ${e}`)}}class N extends le{}class te extends le{constructor(){super("Zone is an abstract class")}}const c="numeric",P="short",V="long",He={year:c,month:c,day:c},ln={year:c,month:P,day:c},vr={year:c,month:P,day:c,weekday:P},cn={year:c,month:V,day:c},fn={year:c,month:V,day:c,weekday:V},dn={hour:c,minute:c},hn={hour:c,minute:c,second:c},mn={hour:c,minute:c,second:c,timeZoneName:P},yn={hour:c,minute:c,second:c,timeZoneName:V},gn={hour:c,minute:c,hourCycle:"h23"},wn={hour:c,minute:c,second:c,hourCycle:"h23"},pn={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:P},kn={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:V},vn={year:c,month:c,day:c,hour:c,minute:c},Sn={year:c,month:c,day:c,hour:c,minute:c,second:c},Tn={year:c,month:P,day:c,hour:c,minute:c},On={year:c,month:P,day:c,hour:c,minute:c,second:c},Sr={year:c,month:P,day:c,weekday:P,hour:c,minute:c},bn={year:c,month:V,day:c,hour:c,minute:c,timeZoneName:P},Mn={year:c,month:V,day:c,hour:c,minute:c,second:c,timeZoneName:P},Nn={year:c,month:V,day:c,weekday:V,hour:c,minute:c,timeZoneName:V},En={year:c,month:V,day:c,weekday:V,hour:c,minute:c,second:c,timeZoneName:V};class Ee{get type(){throw new te}get name(){throw new te}get ianaName(){return this.name}get isUniversal(){throw new te}offsetName(e,t){throw new te}formatOffset(e,t){throw new te}offset(e){throw new te}equals(e){throw new te}get isValid(){throw new te}}let tt=null;class _e extends Ee{static get instance(){return tt===null&&(tt=new _e),tt}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return Rn(e,t,r)}formatOffset(e,t){return Me(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const ct=new Map;function Tr(n){let e=ct.get(n);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),ct.set(n,e)),e}const Or={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function br(n,e){const t=n.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,i,a,o,u,l,f]=r;return[a,s,i,o,u,l,f]}function Mr(n,e){const t=n.formatToParts(e),r=[];for(let s=0;s<t.length;s++){const{type:i,value:a}=t[s],o=Or[i];i==="era"?r[o]=a:g(o)||(r[o]=parseInt(a,10))}return r}const nt=new Map;class J extends Ee{static create(e){let t=nt.get(e);return t===void 0&&nt.set(e,t=new J(e)),t}static resetCache(){nt.clear(),ct.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{return!1}}constructor(e){super(),this.zoneName=e,this.valid=J.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return Rn(e,t,r,this.name)}formatOffset(e,t){return Me(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const r=Tr(this.name);let[s,i,a,o,u,l,f]=r.formatToParts?Mr(r,t):br(r,t);o==="BC"&&(s=-Math.abs(s)+1);const w=Je({year:s,month:i,day:a,hour:u===24?0:u,minute:l,second:f,millisecond:0});let h=+t;const S=h%1e3;return h-=S>=0?S:1e3+S,(w-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let xt={};function Nr(n,e={}){const t=JSON.stringify([n,e]);let r=xt[t];return r||(r=new Intl.ListFormat(n,e),xt[t]=r),r}const ft=new Map;function dt(n,e={}){const t=JSON.stringify([n,e]);let r=ft.get(t);return r===void 0&&(r=new Intl.DateTimeFormat(n,e),ft.set(t,r)),r}const ht=new Map;function Er(n,e={}){const t=JSON.stringify([n,e]);let r=ht.get(t);return r===void 0&&(r=new Intl.NumberFormat(n,e),ht.set(t,r)),r}const mt=new Map;function Ir(n,e={}){const{base:t,...r}=e,s=JSON.stringify([n,r]);let i=mt.get(s);return i===void 0&&(i=new Intl.RelativeTimeFormat(n,e),mt.set(s,i)),i}let Te=null;function Dr(){return Te||(Te=new Intl.DateTimeFormat().resolvedOptions().locale,Te)}const yt=new Map;function In(n){let e=yt.get(n);return e===void 0&&(e=new Intl.DateTimeFormat(n).resolvedOptions(),yt.set(n,e)),e}const gt=new Map;function xr(n){let e=gt.get(n);if(!e){const t=new Intl.Locale(n);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...Dn,...e}),gt.set(n,e)}return e}function Cr(n){const e=n.indexOf("-x-");e!==-1&&(n=n.substring(0,e));const t=n.indexOf("-u-");if(t===-1)return[n];{let r,s;try{r=dt(n).resolvedOptions(),s=n}catch{const u=n.substring(0,t);r=dt(u).resolvedOptions(),s=u}const{numberingSystem:i,calendar:a}=r;return[s,i,a]}}function Fr(n,e,t){return(t||e)&&(n.includes("-u-")||(n+="-u"),t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function Wr(n){const e=[];for(let t=1;t<=12;t++){const r=y.utc(2009,t,1);e.push(n(r))}return e}function Vr(n){const e=[];for(let t=1;t<=7;t++){const r=y.utc(2016,11,13+t);e.push(n(r))}return e}function Le(n,e,t,r){const s=n.listingMode();return s==="error"?null:s==="en"?t(e):r(e)}function Lr(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||In(n.locale).numberingSystem==="latn"}class Ar{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:s,floor:i,...a}=r;if(!t||Object.keys(a).length>0){const o={useGrouping:!1,...r};r.padTo>0&&(o.minimumIntegerDigits=r.padTo),this.inf=Er(e,o)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):Mt(e,3);return M(t,this.padTo)}}}class $r{constructor(e,t,r){this.opts=r,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&J.create(o).valid?(s=o,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||s,this.dtf=dt(t,i)}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(t=>{if(t.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:r}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Rr{constructor(e,t,r){this.opts={style:"long",...r},!t&&An()&&(this.rtf=Ir(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):as(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const Dn={firstDay:1,minimalDays:4,weekend:[6,7]};class v{static fromOpts(e){return v.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,r,s,i=!1){const a=e||O.defaultLocale,o=a||(i?"en-US":Dr()),u=t||O.defaultNumberingSystem,l=r||O.defaultOutputCalendar,f=pt(s)||O.defaultWeekSettings;return new v(o,u,l,f,a)}static resetCache(){Te=null,ft.clear(),ht.clear(),mt.clear(),yt.clear(),gt.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:r,weekSettings:s}={}){return v.create(e,t,r,s)}constructor(e,t,r,s,i){const[a,o,u]=Cr(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=r||u||null,this.weekSettings=s,this.intl=Fr(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Lr(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:v.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,pt(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Le(this,e,zn,()=>{const r=this.intl==="ja"||this.intl.startsWith("ja-");t&=!r;const s=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const a=r?o=>this.dtFormatter(o,s).format():o=>this.extract(o,s,"month");this.monthsCache[i][e]=Wr(a)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Le(this,e,Pn,()=>{const r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=Vr(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return Le(this,void 0,()=>Gn,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[y.utc(2016,11,13,9),y.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Le(this,e,Yn,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[y.utc(-40,1,1),y.utc(2017,1,1)].map(r=>this.extract(r,t,"era"))),this.eraCache[e]})}extract(e,t,r){const s=this.dtFormatter(e,t),i=s.formatToParts(),a=i.find(o=>o.type.toLowerCase()===r);return a?a.value:null}numberFormatter(e={}){return new Ar(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new $r(e,this.intl,t)}relFormatter(e={}){return new Rr(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Nr(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||In(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:$n()?xr(this.locale):Dn}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 rt=null;class D extends Ee{static get utcInstance(){return rt===null&&(rt=new D(0)),rt}static instance(e){return e===0?D.utcInstance:new D(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new D(Xe(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Me(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Me(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Me(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Zr extends Ee{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 re(n,e){if(g(n)||n===null)return e;if(n instanceof Ee)return n;if(Gr(n)){const t=n.toLowerCase();return t==="default"?e:t==="local"||t==="system"?_e.instance:t==="utc"||t==="gmt"?D.utcInstance:D.parseSpecifier(t)||J.create(n)}else return se(n)?D.instance(n):typeof n=="object"&&"offset"in n&&typeof n.offset=="function"?n:new Zr(n)}const St={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Ct={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]},Ur=St.hanidec.replace(/[\[|\]]/g,"").split("");function zr(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t<n.length;t++){const r=n.charCodeAt(t);if(n[t].search(St.hanidec)!==-1)e+=Ur.indexOf(n[t]);else for(const s in Ct){const[i,a]=Ct[s];r>=i&&r<=a&&(e+=r-i)}}return parseInt(e,10)}else return e}const wt=new Map;function qr(){wt.clear()}function z({numberingSystem:n},e=""){const t=n||"latn";let r=wt.get(t);r===void 0&&(r=new Map,wt.set(t,r));let s=r.get(e);return s===void 0&&(s=new RegExp(`${St[t]}${e}`),r.set(e,s)),s}let Ft=()=>Date.now(),Wt="system",Vt=null,Lt=null,At=null,$t=60,Rt,Zt=null;class O{static get now(){return Ft}static set now(e){Ft=e}static set defaultZone(e){Wt=e}static get defaultZone(){return re(Wt,_e.instance)}static get defaultLocale(){return Vt}static set defaultLocale(e){Vt=e}static get defaultNumberingSystem(){return Lt}static set defaultNumberingSystem(e){Lt=e}static get defaultOutputCalendar(){return At}static set defaultOutputCalendar(e){At=e}static get defaultWeekSettings(){return Zt}static set defaultWeekSettings(e){Zt=pt(e)}static get twoDigitCutoffYear(){return $t}static set twoDigitCutoffYear(e){$t=e%100}static get throwOnInvalid(){return Rt}static set throwOnInvalid(e){Rt=e}static resetCaches(){v.resetCache(),J.resetCache(),y.resetCache(),qr()}}class H{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const xn=[0,31,59,90,120,151,181,212,243,273,304,334],Cn=[0,31,60,91,121,152,182,213,244,274,305,335];function R(n,e){return new H("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Tt(n,e,t){const r=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return s===0?7:s}function Fn(n,e,t){return t+(Ie(n)?Cn:xn)[e-1]}function Wn(n,e){const t=Ie(n)?Cn:xn,r=t.findIndex(i=>i<e),s=e-t[r];return{month:r+1,day:s}}function Ot(n,e){return(n-e+7)%7+1}function Pe(n,e=4,t=1){const{year:r,month:s,day:i}=n,a=Fn(r,s,i),o=Ot(Tt(r,s,i),t);let u=Math.floor((a-o+14-e)/7),l;return u<1?(l=r-1,u=Ne(l,e,t)):u>Ne(r,e,t)?(l=r+1,u=1):l=r,{weekYear:l,weekNumber:u,weekday:o,...Be(n)}}function Ut(n,e=4,t=1){const{weekYear:r,weekNumber:s,weekday:i}=n,a=Ot(Tt(r,1,e),t),o=me(r);let u=s*7+i-a-7+e,l;u<1?(l=r-1,u+=me(l)):u>o?(l=r+1,u-=me(r)):l=r;const{month:f,day:m}=Wn(l,u);return{year:l,month:f,day:m,...Be(n)}}function st(n){const{year:e,month:t,day:r}=n,s=Fn(e,t,r);return{year:e,ordinal:s,...Be(n)}}function zt(n){const{year:e,ordinal:t}=n,{month:r,day:s}=Wn(e,t);return{year:e,month:r,day:s,...Be(n)}}function qt(n,e){if(!g(n.localWeekday)||!g(n.localWeekNumber)||!g(n.localWeekYear)){if(!g(n.weekday)||!g(n.weekNumber)||!g(n.weekYear))throw new he("Cannot mix locale-based week fields with ISO-based week fields");return g(n.localWeekday)||(n.weekday=n.localWeekday),g(n.localWeekNumber)||(n.weekNumber=n.localWeekNumber),g(n.localWeekYear)||(n.weekYear=n.localWeekYear),delete n.localWeekday,delete n.localWeekNumber,delete n.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Hr(n,e=4,t=1){const r=je(n.weekYear),s=Z(n.weekNumber,1,Ne(n.weekYear,e,t)),i=Z(n.weekday,1,7);return r?s?i?!1:R("weekday",n.weekday):R("week",n.weekNumber):R("weekYear",n.weekYear)}function Pr(n){const e=je(n.year),t=Z(n.ordinal,1,me(n.year));return e?t?!1:R("ordinal",n.ordinal):R("year",n.year)}function Vn(n){const e=je(n.year),t=Z(n.month,1,12),r=Z(n.day,1,Ge(n.year,n.month));return e?t?r?!1:R("day",n.day):R("month",n.month):R("year",n.year)}function Ln(n){const{hour:e,minute:t,second:r,millisecond:s}=n,i=Z(e,0,23)||e===24&&t===0&&r===0&&s===0,a=Z(t,0,59),o=Z(r,0,59),u=Z(s,0,999);return i?a?o?u?!1:R("millisecond",s):R("second",r):R("minute",t):R("hour",e)}function g(n){return typeof n>"u"}function se(n){return typeof n=="number"}function je(n){return typeof n=="number"&&n%1===0}function Gr(n){return typeof n=="string"}function Yr(n){return Object.prototype.toString.call(n)==="[object Date]"}function An(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function $n(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function _r(n){return Array.isArray(n)?n:[n]}function Ht(n,e,t){if(n.length!==0)return n.reduce((r,s)=>{const i=[e(s),s];return r&&t(r[0],i[0])===r[0]?r:i},null)[1]}function jr(n,e){return e.reduce((t,r)=>(t[r]=n[r],t),{})}function ge(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function pt(n){if(n==null)return null;if(typeof n!="object")throw new N("Week settings must be an object");if(!Z(n.firstDay,1,7)||!Z(n.minimalDays,1,7)||!Array.isArray(n.weekend)||n.weekend.some(e=>!Z(e,1,7)))throw new N("Invalid week settings");return{firstDay:n.firstDay,minimalDays:n.minimalDays,weekend:Array.from(n.weekend)}}function Z(n,e,t){return je(n)&&n>=e&&n<=t}function Jr(n,e){return n-e*Math.floor(n/e)}function M(n,e=2){const t=n<0;let r;return t?r="-"+(""+-n).padStart(e,"0"):r=(""+n).padStart(e,"0"),r}function ne(n){if(!(g(n)||n===null||n===""))return parseInt(n,10)}function ie(n){if(!(g(n)||n===null||n===""))return parseFloat(n)}function bt(n){if(!(g(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function Mt(n,e,t="round"){const r=10**e;switch(t){case"expand":return n>0?Math.ceil(n*r)/r:Math.floor(n*r)/r;case"trunc":return Math.trunc(n*r)/r;case"round":return Math.round(n*r)/r;case"floor":return Math.floor(n*r)/r;case"ceil":return Math.ceil(n*r)/r;default:throw new RangeError(`Value rounding ${t} is out of range`)}}function Ie(n){return n%4===0&&(n%100!==0||n%400===0)}function me(n){return Ie(n)?366:365}function Ge(n,e){const t=Jr(e-1,12)+1,r=n+(e-t)/12;return t===2?Ie(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Je(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(n.year,n.month-1,n.day)),+e}function Pt(n,e,t){return-Ot(Tt(n,1,e),t)+e-1}function Ne(n,e=4,t=1){const r=Pt(n,e,t),s=Pt(n+1,e,t);return(me(n)-r+s)/7}function kt(n){return n>99?n:n>O.twoDigitCutoffYear?1900+n:2e3+n}function Rn(n,e,t,r=null){const s=new Date(n),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:e,...i},o=new Intl.DateTimeFormat(t,a).formatToParts(s).find(u=>u.type.toLowerCase()==="timezonename");return o?o.value:null}function Xe(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const r=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-r:r;return t*60+s}function Zn(n){const e=Number(n);if(typeof n=="boolean"||n===""||!Number.isFinite(e))throw new N(`Invalid unit value ${n}`);return e}function Ye(n,e){const t={};for(const r in n)if(ge(n,r)){const s=n[r];if(s==null)continue;t[e(r)]=Zn(s)}return t}function Me(n,e){const t=Math.trunc(Math.abs(n/60)),r=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${M(t,2)}:${M(r,2)}`;case"narrow":return`${s}${t}${r>0?`:${r}`:""}`;case"techie":return`${s}${M(t,2)}${M(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Be(n){return jr(n,["hour","minute","second","millisecond"])}const Xr=["January","February","March","April","May","June","July","August","September","October","November","December"],Un=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Br=["J","F","M","A","M","J","J","A","S","O","N","D"];function zn(n){switch(n){case"narrow":return[...Br];case"short":return[...Un];case"long":return[...Xr];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 qn=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Hn=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Kr=["M","T","W","T","F","S","S"];function Pn(n){switch(n){case"narrow":return[...Kr];case"short":return[...Hn];case"long":return[...qn];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Gn=["AM","PM"],Qr=["Before Christ","Anno Domini"],es=["BC","AD"],ts=["B","A"];function Yn(n){switch(n){case"narrow":return[...ts];case"short":return[...es];case"long":return[...Qr];default:return null}}function ns(n){return Gn[n.hour<12?0:1]}function rs(n,e){return Pn(e)[n.weekday-1]}function ss(n,e){return zn(e)[n.month-1]}function is(n,e){return Yn(e)[n.year<0?0:1]}function as(n,e,t="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=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&i){const m=n==="days";switch(e){case 1:return m?"tomorrow":`next ${s[n][0]}`;case-1:return m?"yesterday":`last ${s[n][0]}`;case 0:return m?"today":`this ${s[n][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),u=o===1,l=s[n],f=r?u?l[1]:l[2]||l[1]:u?s[n][0]:n;return a?`${o} ${f} ago`:`in ${o} ${f}`}function Gt(n,e){let t="";for(const r of n)r.literal?t+=r.val:t+=e(r.val);return t}const os={D:He,DD:ln,DDD:cn,DDDD:fn,t:dn,tt:hn,ttt:mn,tttt:yn,T:gn,TT:wn,TTT:pn,TTTT:kn,f:vn,ff:Tn,fff:bn,ffff:Nn,F:Sn,FF:On,FFF:Mn,FFFF:En};class E{static create(e,t={}){return new E(e,t)}static parseFormat(e){let t=null,r="",s=!1;const i=[];for(let a=0;a<e.length;a++){const o=e.charAt(a);o==="'"?((r.length>0||s)&&i.push({literal:s||/^\s+$/.test(r),val:r===""?"'":r}),t=null,r="",s=!s):s||o===t?r+=o:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=o,t=o)}return r.length>0&&i.push({literal:s||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(e){return os[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),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,r=void 0){if(this.opts.forceSimple)return M(e,t);const s={...this.opts};return t>0&&(s.padTo=t),r&&(s.signDisplay=r),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,t){const r=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(h,S)=>this.loc.extract(e,h,S),a=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",o=()=>r?ns(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(h,S)=>r?ss(e,h):i(S?{month:h}:{month:h,day:"numeric"},"month"),l=(h,S)=>r?rs(e,h):i(S?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const S=E.macroTokenToFormatOpts(h);return S?this.formatWithSystemDefault(e,S):h},m=h=>r?is(e,h):i({era:h},"era"),w=h=>{switch(h){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 a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({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 o();case"d":return s?i({day:"numeric"},"day"):this.num(e.day);case"dd":return s?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return s?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return s?i({month:"numeric"},"month"):this.num(e.month);case"MM":return s?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return s?i({year:"numeric"},"year"):this.num(e.year);case"yy":return s?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("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 f(h)}};return Gt(E.parseFormat(t),w)}formatDurationFromString(e,t){const r=this.opts.signMode==="negativeLargestOnly"?-1:1,s=f=>{switch(f[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}},i=(f,m)=>w=>{const h=s(w);if(h){const S=m.isNegativeDuration&&h!==m.largestUnit?r:1;let x;return this.opts.signMode==="negativeLargestOnly"&&h!==m.largestUnit?x="never":this.opts.signMode==="all"?x="always":x="auto",this.num(f.get(h)*S,w.length,x)}else return w},a=E.parseFormat(t),o=a.reduce((f,{literal:m,val:w})=>m?f:f.concat(w),[]),u=e.shiftTo(...o.map(s).filter(f=>f)),l={isNegativeDuration:u<0,largestUnit:Object.keys(u.values)[0]};return Gt(a,i(u,l))}}const _n=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function we(...n){const e=n.reduce((t,r)=>t+r.source,"");return RegExp(`^${e}$`)}function pe(...n){return e=>n.reduce(([t,r,s],i)=>{const[a,o,u]=i(e,s);return[{...t,...a},o||r,u]},[{},null,1]).slice(0,2)}function ke(n,...e){if(n==null)return[null,null];for(const[t,r]of e){const s=t.exec(n);if(s)return r(s)}return[null,null]}function jn(...n){return(e,t)=>{const r={};let s;for(s=0;s<n.length;s++)r[n[s]]=ne(e[t+s]);return[r,null,t+s]}}const Jn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,us=`(?:${Jn.source}?(?:\\[(${_n.source})\\])?)?`,Nt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Xn=RegExp(`${Nt.source}${us}`),Et=RegExp(`(?:[Tt]${Xn.source})?`),ls=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,cs=/(\d{4})-?W(\d\d)(?:-?(\d))?/,fs=/(\d{4})-?(\d{3})/,ds=jn("weekYear","weekNumber","weekDay"),hs=jn("year","ordinal"),ms=/(\d{4})-(\d\d)-(\d\d)/,Bn=RegExp(`${Nt.source} ?(?:${Jn.source}|(${_n.source}))?`),ys=RegExp(`(?: ${Bn.source})?`);function ye(n,e,t){const r=n[e];return g(r)?t:ne(r)}function gs(n,e){return[{year:ye(n,e),month:ye(n,e+1,1),day:ye(n,e+2,1)},null,e+3]}function ve(n,e){return[{hours:ye(n,e,0),minutes:ye(n,e+1,0),seconds:ye(n,e+2,0),milliseconds:bt(n[e+3])},null,e+4]}function De(n,e){const t=!n[e]&&!n[e+1],r=Xe(n[e+1],n[e+2]),s=t?null:D.instance(r);return[{},s,e+3]}function xe(n,e){const t=n[e]?J.create(n[e]):null;return[{},t,e+1]}const ws=RegExp(`^T?${Nt.source}$`),ps=/^-?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 ks(n){const[e,t,r,s,i,a,o,u,l]=n,f=e[0]==="-",m=u&&u[0]==="-",w=(h,S=!1)=>h!==void 0&&(S||h&&f)?-h:h;return[{years:w(ie(t)),months:w(ie(r)),weeks:w(ie(s)),days:w(ie(i)),hours:w(ie(a)),minutes:w(ie(o)),seconds:w(ie(u),u==="-0"),milliseconds:w(bt(l),m)}]}const vs={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function It(n,e,t,r,s,i,a){const o={year:e.length===2?kt(ne(e)):ne(e),month:Un.indexOf(t)+1,day:ne(r),hour:ne(s),minute:ne(i)};return a&&(o.second=ne(a)),n&&(o.weekday=n.length>3?qn.indexOf(n)+1:Hn.indexOf(n)+1),o}const Ss=/^(?:(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 Ts(n){const[,e,t,r,s,i,a,o,u,l,f,m]=n,w=It(e,s,r,t,i,a,o);let h;return u?h=vs[u]:l?h=0:h=Xe(f,m),[w,new D(h)]}function Os(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const bs=/^(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$/,Ms=/^(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$/,Ns=/^(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 Yt(n){const[,e,t,r,s,i,a,o]=n;return[It(e,s,r,t,i,a,o),D.utcInstance]}function Es(n){const[,e,t,r,s,i,a,o]=n;return[It(e,o,t,r,s,i,a),D.utcInstance]}const Is=we(ls,Et),Ds=we(cs,Et),xs=we(fs,Et),Cs=we(Xn),Kn=pe(gs,ve,De,xe),Fs=pe(ds,ve,De,xe),Ws=pe(hs,ve,De,xe),Vs=pe(ve,De,xe);function Ls(n){return ke(n,[Is,Kn],[Ds,Fs],[xs,Ws],[Cs,Vs])}function As(n){return ke(Os(n),[Ss,Ts])}function $s(n){return ke(n,[bs,Yt],[Ms,Yt],[Ns,Es])}function Rs(n){return ke(n,[ps,ks])}const Zs=pe(ve);function Us(n){return ke(n,[ws,Zs])}const zs=we(ms,ys),qs=we(Bn),Hs=pe(ve,De,xe);function Ps(n){return ke(n,[zs,Kn],[qs,Hs])}const _t="Invalid Duration",Qn={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Gs={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Qn},$=146097/400,ce=146097/4800,Ys={years:{quarters:4,months:12,weeks:$/7,days:$,hours:$*24,minutes:$*24*60,seconds:$*24*60*60,milliseconds:$*24*60*60*1e3},quarters:{months:3,weeks:$/28,days:$/4,hours:$*24/4,minutes:$*24*60/4,seconds:$*24*60*60/4,milliseconds:$*24*60*60*1e3/4},months:{weeks:ce/7,days:ce,hours:ce*24,minutes:ce*24*60,seconds:ce*24*60*60,milliseconds:ce*24*60*60*1e3},...Qn},ue=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],_s=ue.slice(0).reverse();function j(n,e,t=!1){const r={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy,matrix:e.matrix||n.matrix};return new p(r)}function er(n,e){let t=e.milliseconds??0;for(const r of _s.slice(1))e[r]&&(t+=e[r]*n[r].milliseconds);return t}function jt(n,e){const t=er(n,e)<0?-1:1;ue.reduceRight((r,s)=>{if(g(e[s]))return r;if(r){const i=e[r]*t,a=n[s][r],o=Math.floor(i/a);e[s]+=o*t,e[r]-=o*a*t}return s},null),ue.reduce((r,s)=>{if(g(e[s]))return r;if(r){const i=e[r]%1;e[r]-=i,e[s]+=i*n[r][s]}return s},null)}function Jt(n){const e={};for(const[t,r]of Object.entries(n))r!==0&&(e[t]=r);return e}class p{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let r=t?Ys:Gs;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||v.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,t){return p.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new N(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new p({values:Ye(e,p.normalizeUnit),loc:v.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(se(e))return p.fromMillis(e);if(p.isDuration(e))return e;if(typeof e=="object")return p.fromObject(e);throw new N(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[r]=Rs(e);return r?p.fromObject(r,t):p.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[r]=Us(e);return r?p.fromObject(r,t):p.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new N("need to specify a reason the Duration is invalid");const r=e instanceof H?e:new H(e,t);if(O.throwOnInvalid)throw new kr(r);return new p({invalid:r})}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()];if(!t)throw new un(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 r={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?E.create(this.loc,r).formatDurationFromString(this,e):_t}toHuman(e={}){if(!this.isValid)return _t;const t=e.showZeros!==!1,r=ue.map(s=>{const i=this.values[s];return g(i)||i===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:s.slice(0,-1)}).format(i)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Mt(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},y.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?er(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=p.fromDurationLike(e),r={};for(const s of ue)(ge(t.values,s)||ge(this.values,s))&&(r[s]=t.get(s)+this.get(s));return j(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=p.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=Zn(e(this.values[r],r));return j(this,{values:t},!0)}get(e){return this[p.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...Ye(e,p.normalizeUnit)};return j(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r,matrix:s}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:r};return j(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return jt(this.matrix,e),j(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Jt(this.normalize().shiftToAll().toObject());return j(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>p.normalizeUnit(a));const t={},r={},s=this.toObject();let i;for(const a of ue)if(e.indexOf(a)>=0){i=a;let o=0;for(const l in r)o+=this.matrix[l][a]*r[l],r[l]=0;se(s[a])&&(o+=s[a]);const u=Math.trunc(o);t[a]=u,r[a]=(o*1e3-u*1e3)/1e3}else se(s[a])&&(r[a]=s[a]);for(const a in r)r[a]!==0&&(t[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return jt(this.matrix,t),j(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]=this.values[t]===0?0:-this.values[t];return j(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=Jt(this.values);return j(this,{values:e},!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 this.invalid===null}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||!this.loc.equals(e.loc))return!1;function t(r,s){return r===void 0||r===0?s===void 0||s===0:r===s}for(const r of ue)if(!t(this.values[r],e.values[r]))return!1;return!0}}const fe="Invalid Interval";function js(n,e){return!n||!n.isValid?T.invalid("missing or invalid start"):!e||!e.isValid?T.invalid("missing or invalid end"):e<n?T.invalid("end before start",`The end of an interval must be after its start, but you had start=${n.toISO()} and end=${e.toISO()}`):null}class T{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 N("need to specify a reason the Interval is invalid");const r=e instanceof H?e:new H(e,t);if(O.throwOnInvalid)throw new pr(r);return new T({invalid:r})}static fromDateTimes(e,t){const r=Se(e),s=Se(t),i=js(r,s);return i??new T({start:r,end:s})}static after(e,t){const r=p.fromDurationLike(t),s=Se(e);return T.fromDateTimes(s,s.plus(r))}static before(e,t){const r=p.fromDurationLike(t),s=Se(e);return T.fromDateTimes(s.minus(r),s)}static fromISO(e,t){const[r,s]=(e||"").split("/",2);if(r&&s){let i,a;try{i=y.fromISO(r,t),a=i.isValid}catch{a=!1}let o,u;try{o=y.fromISO(s,t),u=o.isValid}catch{u=!1}if(a&&u)return T.fromDateTimes(i,o);if(a){const l=p.fromISO(s,t);if(l.isValid)return T.after(i,l)}else if(u){const l=p.fromISO(r,t);if(l.isValid)return T.before(o,l)}}return T.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 this.invalidReason===null}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 r=this.start.startOf(e,t);let s;return t!=null&&t.useLocaleWeeks?s=this.end.reconfigure({locale:r.locale}):s=this.end,s=s.startOf(e,t),Math.floor(s.diff(r,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?T.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Se).filter(a=>this.contains(a)).sort((a,o)=>a.toMillis()-o.toMillis()),r=[];let{s}=this,i=0;for(;s<this.e;){const a=t[i]||this.e,o=+a>+this.e?this.e:a;r.push(T.fromDateTimes(s,o)),s=o,i+=1}return r}splitBy(e){const t=p.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:r}=this,s=1,i;const a=[];for(;r<this.e;){const o=this.start.plus(t.mapUnits(u=>u*s));i=+o>+this.e?this.e:o,a.push(T.fromDateTimes(r,i)),r=i,s+=1}return a}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:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1: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,r=this.e<e.e?this.e:e.e;return t>=r?null:T.fromDateTimes(t,r)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return T.fromDateTimes(t,r)}static merge(e){const[t,r]=e.sort((s,i)=>s.s-i.s).reduce(([s,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[s,i.union(a)]:[s.concat([i]),a]:[s,a],[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const s=[],i=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),o=a.sort((u,l)=>u.time-l.time);for(const u of o)r+=u.type==="s"?1:-1,r===1?t=u.time:(t&&+t!=+u.time&&s.push(T.fromDateTimes(t,u.time)),t=null);return T.merge(s)}difference(...e){return T.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:fe}[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=He,t={}){return this.isValid?E.create(this.s.loc.clone(t),e).formatInterval(this):fe}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:fe}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:fe}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:fe}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:fe}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):p.invalid(this.invalidReason)}mapEndpoints(e){return T.fromDateTimes(e(this.s),e(this.e))}}class Ae{static hasDST(e=O.defaultZone){const t=y.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return J.isValidZone(e)}static normalizeZone(e){return re(e,O.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||v.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||v.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||v.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||v.create(t,r,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||v.create(t,r,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null}={}){return(s||v.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null}={}){return(s||v.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return v.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return v.create(t,null,"gregory").eras(e)}static features(){return{relative:An(),localeWeek:$n()}}}function Xt(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=t(e)-t(n);return Math.floor(p.fromMillis(r).as("days"))}function Js(n,e,t){const r=[["years",(u,l)=>l.year-u.year],["quarters",(u,l)=>l.quarter-u.quarter+(l.year-u.year)*4],["months",(u,l)=>l.month-u.month+(l.year-u.year)*12],["weeks",(u,l)=>{const f=Xt(u,l);return(f-f%7)/7}],["days",Xt]],s={},i=n;let a,o;for(const[u,l]of r)t.indexOf(u)>=0&&(a=u,s[u]=l(n,e),o=i.plus(s),o>e?(s[u]--,n=i.plus(s),n>e&&(o=n,s[u]--,n=i.plus(s))):n=o);return[n,s,o,a]}function Xs(n,e,t,r){let[s,i,a,o]=Js(n,e,t);const u=e-s,l=t.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);l.length===0&&(a<e&&(a=s.plus({[o]:1})),a!==s&&(i[o]=(i[o]||0)+u/(a-s)));const f=p.fromObject(i,r);return l.length>0?p.fromMillis(u,r).shiftTo(...l).plus(f):f}const Bs="missing Intl.DateTimeFormat.formatToParts support";function k(n,e=t=>t){return{regex:n,deser:([t])=>e(zr(t))}}const Ks=" ",tr=`[ ${Ks}]`,nr=new RegExp(tr,"g");function Qs(n){return n.replace(/\./g,"\\.?").replace(nr,tr)}function Bt(n){return n.replace(/\./g,"").replace(nr," ").toLowerCase()}function q(n,e){return n===null?null:{regex:RegExp(n.map(Qs).join("|")),deser:([t])=>n.findIndex(r=>Bt(t)===Bt(r))+e}}function Kt(n,e){return{regex:n,deser:([,t,r])=>Xe(t,r),groups:e}}function $e(n){return{regex:n,deser:([e])=>e}}function ei(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ti(n,e){const t=z(e),r=z(e,"{2}"),s=z(e,"{3}"),i=z(e,"{4}"),a=z(e,"{6}"),o=z(e,"{1,2}"),u=z(e,"{1,3}"),l=z(e,"{1,6}"),f=z(e,"{1,9}"),m=z(e,"{2,4}"),w=z(e,"{4,6}"),h=L=>({regex:RegExp(ei(L.val)),deser:([X])=>X,literal:!0}),x=(L=>{if(n.literal)return h(L);switch(L.val){case"G":return q(e.eras("short"),0);case"GG":return q(e.eras("long"),0);case"y":return k(l);case"yy":return k(m,kt);case"yyyy":return k(i);case"yyyyy":return k(w);case"yyyyyy":return k(a);case"M":return k(o);case"MM":return k(r);case"MMM":return q(e.months("short",!0),1);case"MMMM":return q(e.months("long",!0),1);case"L":return k(o);case"LL":return k(r);case"LLL":return q(e.months("short",!1),1);case"LLLL":return q(e.months("long",!1),1);case"d":return k(o);case"dd":return k(r);case"o":return k(u);case"ooo":return k(s);case"HH":return k(r);case"H":return k(o);case"hh":return k(r);case"h":return k(o);case"mm":return k(r);case"m":return k(o);case"q":return k(o);case"qq":return k(r);case"s":return k(o);case"ss":return k(r);case"S":return k(u);case"SSS":return k(s);case"u":return $e(f);case"uu":return $e(o);case"uuu":return k(t);case"a":return q(e.meridiems(),0);case"kkkk":return k(i);case"kk":return k(m,kt);case"W":return k(o);case"WW":return k(r);case"E":case"c":return k(t);case"EEE":return q(e.weekdays("short",!1),1);case"EEEE":return q(e.weekdays("long",!1),1);case"ccc":return q(e.weekdays("short",!0),1);case"cccc":return q(e.weekdays("long",!0),1);case"Z":case"ZZ":return Kt(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return Kt(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return $e(/[a-z_+-/]{1,256}?/i);case" ":return $e(/[^\S\n\r]/);default:return h(L)}})(n)||{invalidReason:Bs};return x.token=n,x}const ni={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"}};function ri(n,e,t){const{type:r,value:s}=n;if(r==="literal"){const u=/^\s+$/.test(s);return{literal:!u,val:u?" ":s}}const i=e[r];let a=r;r==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=t.hour12?"hour12":"hour24");let o=ni[a];if(typeof o=="object"&&(o=o[i]),o)return{literal:!1,val:o}}function si(n){return[`^${n.map(t=>t.regex).reduce((t,r)=>`${t}(${r.source})`,"")}$`,n]}function ii(n,e,t){const r=n.match(e);if(r){const s={};let i=1;for(const a in t)if(ge(t,a)){const o=t[a],u=o.groups?o.groups+1:1;!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(r.slice(i,i+u))),i+=u}return[r,s]}else return[r,{}]}function ai(n){const e=i=>{switch(i){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}};let t=null,r;return g(n.z)||(t=J.create(n.z)),g(n.Z)||(t||(t=new D(n.Z)),r=n.Z),g(n.q)||(n.M=(n.q-1)*3+1),g(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),g(n.u)||(n.S=bt(n.u)),[Object.keys(n).reduce((i,a)=>{const o=e(a);return o&&(i[o]=n[a]),i},{}),t,r]}let it=null;function oi(){return it||(it=y.fromMillis(1555555555555)),it}function ui(n,e){if(n.literal)return n;const t=E.macroTokenToFormatOpts(n.val),r=ar(t,e);return r==null||r.includes(void 0)?n:r}function rr(n,e){return Array.prototype.concat(...n.map(t=>ui(t,e)))}class sr{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=rr(E.parseFormat(t),e),this.units=this.tokens.map(r=>ti(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,s]=si(this.units);this.regex=RegExp(r,"i"),this.handlers=s}}explainFromTokens(e){if(this.isValid){const[t,r]=ii(e,this.regex,this.handlers),[s,i,a]=r?ai(r):[null,null,void 0];if(ge(r,"a")&&ge(r,"H"))throw new he("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:r,result:s,zone:i,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ir(n,e,t){return new sr(n,t).explainFromTokens(e)}function li(n,e,t){const{result:r,zone:s,specificOffset:i,invalidReason:a}=ir(n,e,t);return[r,s,i,a]}function ar(n,e){if(!n)return null;const r=E.create(e,n).dtFormatter(oi()),s=r.formatToParts(),i=r.resolvedOptions();return s.map(a=>ri(a,n,i))}const at="Invalid DateTime",Qt=864e13;function Oe(n){return new H("unsupported zone",`the zone "${n.name}" is not supported`)}function ot(n){return n.weekData===null&&(n.weekData=Pe(n.c)),n.weekData}function ut(n){return n.localWeekData===null&&(n.localWeekData=Pe(n.c,n.loc.getMinDaysInFirstWeek(),n.loc.getStartOfWeek())),n.localWeekData}function ae(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new y({...t,...e,old:t})}function or(n,e,t){let r=n-e*60*1e3;const s=t.offset(r);if(e===s)return[r,e];r-=(s-e)*60*1e3;const i=t.offset(r);return s===i?[r,s]:[n-Math.min(s,i)*60*1e3,Math.max(s,i)]}function Re(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function Ue(n,e,t){return or(Je(n),e,t)}function en(n,e){const t=n.o,r=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...n.c,year:r,month:s,day:Math.min(n.c.day,Ge(r,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=p.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=Je(i);let[u,l]=or(o,t,n.zone);return a!==0&&(u+=a,l=n.zone.offset(u)),{ts:u,o:l}}function de(n,e,t,r,s,i){const{setZone:a,zone:o}=t;if(n&&Object.keys(n).length!==0||e){const u=e||o,l=y.fromObject(n,{...t,zone:u,specificOffset:i});return a?l:l.setZone(o)}else return y.invalid(new H("unparsable",`the input "${s}" can't be parsed as ${r}`))}function Ze(n,e,t=!0){return n.isValid?E.create(v.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function lt(n,e,t){const r=n.c.year>9999||n.c.year<0;let s="";if(r&&n.c.year>=0&&(s+="+"),s+=M(n.c.year,r?6:4),t==="year")return s;if(e){if(s+="-",s+=M(n.c.month),t==="month")return s;s+="-"}else if(s+=M(n.c.month),t==="month")return s;return s+=M(n.c.day),s}function tn(n,e,t,r,s,i,a){let o=!t||n.c.millisecond!==0||n.c.second!==0,u="";switch(a){case"day":case"month":case"year":break;default:if(u+=M(n.c.hour),a==="hour")break;if(e){if(u+=":",u+=M(n.c.minute),a==="minute")break;o&&(u+=":",u+=M(n.c.second))}else{if(u+=M(n.c.minute),a==="minute")break;o&&(u+=M(n.c.second))}if(a==="second")break;o&&(!r||n.c.millisecond!==0)&&(u+=".",u+=M(n.c.millisecond,3))}return s&&(n.isOffsetFixed&&n.offset===0&&!i?u+="Z":n.o<0?(u+="-",u+=M(Math.trunc(-n.o/60)),u+=":",u+=M(Math.trunc(-n.o%60))):(u+="+",u+=M(Math.trunc(n.o/60)),u+=":",u+=M(Math.trunc(n.o%60)))),i&&(u+="["+n.zone.ianaName+"]"),u}const ur={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ci={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},fi={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ze=["year","month","day","hour","minute","second","millisecond"],di=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],hi=["year","ordinal","hour","minute","second","millisecond"];function qe(n){const e={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"}[n.toLowerCase()];if(!e)throw new un(n);return e}function nn(n){switch(n.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return qe(n)}}function mi(n){if(be===void 0&&(be=O.now()),n.type!=="iana")return n.offset(be);const e=n.name;let t=vt.get(e);return t===void 0&&(t=n.offset(be),vt.set(e,t)),t}function rn(n,e){const t=re(e.zone,O.defaultZone);if(!t.isValid)return y.invalid(Oe(t));const r=v.fromObject(e);let s,i;if(g(n.year))s=O.now();else{for(const u of ze)g(n[u])&&(n[u]=ur[u]);const a=Vn(n)||Ln(n);if(a)return y.invalid(a);const o=mi(t);[s,i]=Ue(n,o,t)}return new y({ts:s,zone:t,loc:r,o:i})}function sn(n,e,t){const r=g(t.round)?!0:t.round,s=g(t.rounding)?"trunc":t.rounding,i=(o,u)=>(o=Mt(o,r||t.calendary?0:2,t.calendary?"round":s),e.loc.clone(t).relFormatter(t).format(o,u)),a=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return i(a(t.unit),t.unit);for(const o of t.units){const u=a(o);if(Math.abs(u)>=1)return i(u,o)}return i(n>e?-0:0,t.units[t.units.length-1])}function an(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}let be;const vt=new Map;class y{constructor(e){const t=e.zone||O.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new H("invalid input"):null)||(t.isValid?null:Oe(t));this.ts=g(e.ts)?O.now():e.ts;let s=null,i=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,i]=[e.old.c,e.old.o];else{const o=se(e.o)&&!e.old?e.o:t.offset(this.ts);s=Re(this.ts,o),r=Number.isNaN(s.year)?new H("invalid input"):null,s=r?null:s,i=r?null:o}this._zone=t,this.loc=e.loc||v.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=s,this.o=i,this.isLuxonDateTime=!0}static now(){return new y({})}static local(){const[e,t]=an(arguments),[r,s,i,a,o,u,l]=t;return rn({year:r,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static utc(){const[e,t]=an(arguments),[r,s,i,a,o,u,l]=t;return e.zone=D.utcInstance,rn({year:r,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static fromJSDate(e,t={}){const r=Yr(e)?e.valueOf():NaN;if(Number.isNaN(r))return y.invalid("invalid input");const s=re(t.zone,O.defaultZone);return s.isValid?new y({ts:r,zone:s,loc:v.fromObject(t)}):y.invalid(Oe(s))}static fromMillis(e,t={}){if(se(e))return e<-Qt||e>Qt?y.invalid("Timestamp out of range"):new y({ts:e,zone:re(t.zone,O.defaultZone),loc:v.fromObject(t)});throw new N(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(se(e))return new y({ts:e*1e3,zone:re(t.zone,O.defaultZone),loc:v.fromObject(t)});throw new N("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const r=re(t.zone,O.defaultZone);if(!r.isValid)return y.invalid(Oe(r));const s=v.fromObject(t),i=Ye(e,nn),{minDaysInFirstWeek:a,startOfWeek:o}=qt(i,s),u=O.now(),l=g(t.specificOffset)?r.offset(u):t.specificOffset,f=!g(i.ordinal),m=!g(i.year),w=!g(i.month)||!g(i.day),h=m||w,S=i.weekYear||i.weekNumber;if((h||f)&&S)throw new he("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(w&&f)throw new he("Can't mix ordinal dates with month/day");const x=S||i.weekday&&!h;let L,X,B=Re(u,l);x?(L=di,X=ci,B=Pe(B,a,o)):f?(L=hi,X=fi,B=st(B)):(L=ze,X=ur);let Ce=!1;for(const K of L){const Q=i[K];g(Q)?Ce?i[K]=X[K]:i[K]=B[K]:Ce=!0}const Ke=x?Hr(i,a,o):f?Pr(i):Vn(i),Fe=Ke||Ln(i);if(Fe)return y.invalid(Fe);const U=x?Ut(i,a,o):f?zt(i):i,[b,I]=Ue(U,l,r),G=new y({ts:b,zone:r,o:I,loc:s});return i.weekday&&h&&e.weekday!==G.weekday?y.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${G.toISO()}`):G.isValid?G:y.invalid(G.invalid)}static fromISO(e,t={}){const[r,s]=Ls(e);return de(r,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,s]=As(e);return de(r,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,s]=$s(e);return de(r,s,t,"HTTP",t)}static fromFormat(e,t,r={}){if(g(e)||g(t))throw new N("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:i=null}=r,a=v.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0}),[o,u,l,f]=li(a,e,t);return f?y.invalid(f):de(o,u,r,`format ${t}`,e,l)}static fromString(e,t,r={}){return y.fromFormat(e,t,r)}static fromSQL(e,t={}){const[r,s]=Ps(e);return de(r,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new N("need to specify a reason the DateTime is invalid");const r=e instanceof H?e:new H(e,t);if(O.throwOnInvalid)throw new wr(r);return new y({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const r=ar(e,v.fromObject(t));return r?r.map(s=>s?s.val:null).join(""):null}static expandFormat(e,t={}){return rr(E.parseFormat(e),v.fromObject(t)).map(s=>s.val).join("")}static resetCache(){be=void 0,vt.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}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?ot(this).weekYear:NaN}get weekNumber(){return this.isValid?ot(this).weekNumber:NaN}get weekday(){return this.isValid?ot(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?ut(this).weekday:NaN}get localWeekNumber(){return this.isValid?ut(this).weekNumber:NaN}get localWeekYear(){return this.isValid?ut(this).weekYear:NaN}get ordinal(){return this.isValid?st(this.c).ordinal:NaN}get monthShort(){return this.isValid?Ae.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Ae.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Ae.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Ae.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?!1: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,r=Je(this.c),s=this.zone.offset(r-e),i=this.zone.offset(r+e),a=this.zone.offset(r-s*t),o=this.zone.offset(r-i*t);if(a===o)return[this];const u=r-a*t,l=r-o*t,f=Re(u,a),m=Re(l,o);return f.hour===m.hour&&f.minute===m.minute&&f.second===m.second&&f.millisecond===m.millisecond?[ae(this,{ts:u}),ae(this,{ts:l})]:[this]}get isInLeapYear(){return Ie(this.year)}get daysInMonth(){return Ge(this.year,this.month)}get daysInYear(){return this.isValid?me(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ne(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ne(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:r,calendar:s}=E.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(D.instance(e),t)}toLocal(){return this.setZone(O.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:r=!1}={}){if(e=re(e,O.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||r){const i=e.offset(this.ts),a=this.toObject();[s]=Ue(a,i,e)}return ae(this,{ts:s,zone:e})}else return y.invalid(Oe(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r});return ae(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=Ye(e,nn),{minDaysInFirstWeek:r,startOfWeek:s}=qt(t,this.loc),i=!g(t.weekYear)||!g(t.weekNumber)||!g(t.weekday),a=!g(t.ordinal),o=!g(t.year),u=!g(t.month)||!g(t.day),l=o||u,f=t.weekYear||t.weekNumber;if((l||a)&&f)throw new he("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new he("Can't mix ordinal dates with month/day");let m;i?m=Ut({...Pe(this.c,r,s),...t},r,s):g(t.ordinal)?(m={...this.toObject(),...t},g(t.day)&&(m.day=Math.min(Ge(m.year,m.month),m.day))):m=zt({...st(this.c),...t});const[w,h]=Ue(m,this.o,this.zone);return ae(this,{ts:w,o:h})}plus(e){if(!this.isValid)return this;const t=p.fromDurationLike(e);return ae(this,en(this,t))}minus(e){if(!this.isValid)return this;const t=p.fromDurationLike(e).negate();return ae(this,en(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const r={},s=p.normalizeUnit(e);switch(s){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(s==="weeks")if(t){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(s==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?E.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):at}toLocaleString(e=He,t={}){return this.isValid?E.create(this.loc.clone(t),e).formatDateTime(this):at}toLocaleParts(e={}){return this.isValid?E.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:r=!1,includeOffset:s=!0,extendedZone:i=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;a=qe(a);const o=e==="extended";let u=lt(this,o,a);return ze.indexOf(a)>=3&&(u+="T"),u+=tn(this,o,t,r,s,i,a),u}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?lt(this,e==="extended",qe(t)):null}toISOWeekDate(){return Ze(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:r=!0,includePrefix:s=!1,extendedZone:i=!1,format:a="extended",precision:o="milliseconds"}={}){return this.isValid?(o=qe(o),(s&&ze.indexOf(o)>=3?"T":"")+tn(this,a==="extended",t,e,r,i,o)):null}toRFC2822(){return Ze(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ze(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?lt(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:r=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(r&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Ze(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():at}[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",r={}){if(!this.isValid||!e.isValid)return p.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=_r(t).map(p.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,u=a?e:this,l=Xs(o,u,i,s);return a?l.negate():l}diffNow(e="milliseconds",t={}){return this.diff(y.now(),e,t)}until(e){return this.isValid?T.fromDateTimes(this,e):this}hasSame(e,t,r){if(!this.isValid)return!1;const s=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,r)<=s&&s<=i.endOf(t,r)}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||y.fromObject({},{zone:this.zone}),r=e.padding?this<t?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(s=e.unit,i=void 0),sn(t,this.plus(r),{...e,numeric:"always",units:s,unit:i})}toRelativeCalendar(e={}){return this.isValid?sn(e.base||y.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(y.isDateTime))throw new N("min requires all arguments be DateTimes");return Ht(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(y.isDateTime))throw new N("max requires all arguments be DateTimes");return Ht(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,r={}){const{locale:s=null,numberingSystem:i=null}=r,a=v.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});return ir(a,e,t)}static fromStringExplain(e,t,r={}){return y.fromFormatExplain(e,t,r)}static buildFormatParser(e,t={}){const{locale:r=null,numberingSystem:s=null}=t,i=v.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});return new sr(i,e)}static fromFormatParser(e,t,r={}){if(g(e)||g(t))throw new N("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:i=null}=r,a=v.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});if(!a.equals(t.locale))throw new N(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);const{result:o,zone:u,specificOffset:l,invalidReason:f}=t.explainFromTokens(e);return f?y.invalid(f):de(o,u,r,`format ${t.format}`,e,l)}static get DATE_SHORT(){return He}static get DATE_MED(){return ln}static get DATE_MED_WITH_WEEKDAY(){return vr}static get DATE_FULL(){return cn}static get DATE_HUGE(){return fn}static get TIME_SIMPLE(){return dn}static get TIME_WITH_SECONDS(){return hn}static get TIME_WITH_SHORT_OFFSET(){return mn}static get TIME_WITH_LONG_OFFSET(){return yn}static get TIME_24_SIMPLE(){return gn}static get TIME_24_WITH_SECONDS(){return wn}static get TIME_24_WITH_SHORT_OFFSET(){return pn}static get TIME_24_WITH_LONG_OFFSET(){return kn}static get DATETIME_SHORT(){return vn}static get DATETIME_SHORT_WITH_SECONDS(){return Sn}static get DATETIME_MED(){return Tn}static get DATETIME_MED_WITH_SECONDS(){return On}static get DATETIME_MED_WITH_WEEKDAY(){return Sr}static get DATETIME_FULL(){return bn}static get DATETIME_FULL_WITH_SECONDS(){return Mn}static get DATETIME_HUGE(){return Nn}static get DATETIME_HUGE_WITH_SECONDS(){return En}}function Se(n){if(y.isDateTime(n))return n;if(n&&n.valueOf&&se(n.valueOf()))return y.fromJSDate(n);if(n&&typeof n=="object")return y.fromObject(n);throw new N(`Unknown datetime argument: ${n}, of type ${typeof n}`)}var yi=function(){function n(e){dr(this,n),_(this,"emitter",void 0),_(this,"url",void 0),_(this,"cmsKey",void 0),_(this,"channel",void 0),_(this,"socket",void 0),_(this,"isConnectionWanted",void 0),_(this,"isConnected",void 0),_(this,"lastMessageAt",void 0),_(this,"interval",void 0),this.emitter=gr(),this.url=null,this.cmsKey=null,this.channel=e,this.isConnected=!1,this.isConnectionWanted=!1,this.lastMessageAt=y.now().minus({year:1})}return mr(n,[{key:"on",value:function(t,r){return this.emitter.on(t,r)}},{key:"init",value:function(){var e=et(oe().m(function r(){var s=this;return oe().w(function(i){for(;;)switch(i.n){case 0:this.interval=setInterval(function(){s.isConnectionWanted&&!s.isActive()&&(console.debug("Xmr::setInterval: should be active"),s.start(s.url||"DISABLED",s.cmsKey||"n/a"))},6e4);case 1:return i.a(2)}},r,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:"start",value:function(){var e=et(oe().m(function r(s,i){var a=this,o;return oe().w(function(u){for(;;)switch(u.p=u.n){case 0:if(!(!this.channel||this.channel==="unknown")){u.n=1;break}return console.error("Xmr::start: channel unknown, XMR will be disabled"),u.a(2);case 1:if(this.url!=="DISABLED"){u.n=2;break}return console.info("Xmr::start: XMR disabled"),this.isConnectionWanted=!1,this.isActive()&&stop(),u.a(2);case 2:if(this.isConnectionWanted=!0,!(this.isActive()&&this.url===s)){u.n=3;break}return console.debug("Xmr::start: already connected to this URL"),this.cmsKey=i,u.a(2);case 3:if(!this.isConnected){u.n=5;break}return console.debug("Xmr::start: already connected but not active, or a different URL"),u.n=4,this.stop();case 4:u.n=6;break;case 5:console.debug("Xmr::start: not connected yet");case 6:this.url=s,this.cmsKey=i,console.debug("Xmr::start: connecting to "+this.url),u.p=7,this.socket=new WebSocket(this.url),u.n=9;break;case 8:return u.p=8,o=u.v,console.debug("Xmr::start: failed connecting to "+this.url+", e = "+o),this.emitter.emit("error","Failed to connect"),u.a(2);case 9:this.socket.addEventListener("open",function(l){if(console.debug("Xmr::"+l.type),a.socket.readyState!==WebSocket.OPEN){console.info("Xmr::"+l.type+": not open yet");return}a.socket.send(JSON.stringify({type:"init",key:a.cmsKey,channel:a.channel})),a.isConnected=!0,a.emitter.emit("connected")}),this.socket.addEventListener("close",function(l){console.debug("Xmr::"+l.type),a.isConnected=!1,a.emitter.emit("disconnected")}),this.socket.addEventListener("error",function(l){console.debug("Xmr::"+l.type),a.emitter.emit("error","error")}),this.socket.addEventListener("message",function(l){if(console.debug(l),a.lastMessageAt=y.now(),a.emitter.emit("statusChange",a.lastMessageAt.toISO()||""),l.data==="H")console.debug("Xmr::message: Heartbeat...");else{var f=JSON.parse(l.data);console.debug("Xmr::message: action is "+f.action);var m=y.fromISO(f.createdDt).plus({seconds:parseInt(f.ttl)});if(m<y.now())console.debug("Xmr::message: message expired at "+m.toString());else if(f.action==="collectNow")a.emitter.emit("collectNow");else if(f.action==="screenShot")a.emitter.emit("screenShot");else if(f.action==="licenceCheck")a.emitter.emit("licenceCheck");else if(f.action=="commandAction"&&f.commandCode.startsWith("showStatusWindow")){var w=f.commandCode.split("|");a.emitter.emit("showStatusWindow",parseInt(w[1])||60)}else f.action=="commandAction"&&f.commandCode.startsWith("forceUpdateChromeOS")?a.emitter.emit("forceUpdateChromeOS"):f.action=="commandAction"&&f.commandCode.startsWith("currentGeoLocation")?a.emitter.emit("currentGeoLocation"):f.action=="criteriaUpdate"?a.emitter.emit("criteriaUpdate",f.criteriaUpdates):console.error("Xmr::message: unknown action: "+f.action)}});case 10:return u.a(2)}},r,this,[[7,8]])}));function t(r,s){return e.apply(this,arguments)}return t}()},{key:"stop",value:function(){var e=et(oe().m(function r(){return oe().w(function(s){for(;;)switch(s.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 s.a(2)}},r,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:"isActive",value:function(){return console.debug("Xmr::isActive: lastMessageAt: "+this.lastMessageAt.toString()),this.isConnected&&this.lastMessageAt>y.now().minus({minute:15})}}])}();const d=lr("XMR");class wi{constructor(e,t){this.config=e,this.player=t,this.xmr=null,this.connected=!1,this.reconnectAttempts=0,this.maxReconnectAttempts=10,this.reconnectDelay=5e3,this.lastXmrUrl=null,this.lastCmsKey=null,this.reconnectTimer=null,this.intentionalShutdown=!1}async start(e,t){try{if(d.info("Initializing connection to:",e),this.intentionalShutdown=!1,this.lastXmrUrl=e,this.lastCmsKey=t,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),!this.xmr){const r=this.config.xmrChannel||`player-${this.config.hardwareKey}`;this.xmr=new yi(r),this.setupEventHandlers()}return await this.xmr.init(),await this.xmr.start(e,t),this.connected=!0,this.reconnectAttempts=0,d.info("Connected successfully"),!0}catch(r){return d.warn("Failed to start:",r.message),d.info("Continuing in polling mode (XMDS only)"),this.scheduleReconnect(e,t),!1}}setupEventHandlers(){this.xmr&&(this.xmr.on("connected",()=>{var e,t;d.info("WebSocket connected"),this.connected=!0,this.reconnectAttempts=0,(t=(e=this.player).updateStatus)==null||t.call(e,"XMR connected")}),this.xmr.on("disconnected",()=>{var e,t;d.warn("WebSocket disconnected"),this.connected=!1,(t=(e=this.player).updateStatus)==null||t.call(e,"XMR disconnected (polling mode)"),this.lastXmrUrl&&this.lastCmsKey&&!this.intentionalShutdown&&(d.info("Connection lost, scheduling reconnection..."),this.scheduleReconnect(this.lastXmrUrl,this.lastCmsKey))}),this.xmr.on("error",e=>{d.error("WebSocket error:",e)}),this.xmr.on("collectNow",async()=>{d.info("Received collectNow command from CMS");try{await this.player.collect(),d.debug("collectNow completed successfully")}catch(e){d.error("collectNow failed:",e)}}),this.xmr.on("screenShot",async()=>{d.info("Received screenShot command from CMS");try{await this.player.captureScreenshot(),d.debug("screenShot completed successfully")}catch(e){d.error("screenShot failed:",e)}}),this.xmr.on("licenceCheck",()=>{d.debug("Received licenceCheck (no-op for Linux client)")}),this.xmr.on("changeLayout",async e=>{const t=typeof e=="object"&&e.layoutId||e,r=typeof e=="object"&&parseInt(e.duration)||0,s=typeof e=="object"&&e.changeMode||"replace";d.info("Received changeLayout command:",t,r?`duration=${r}s`:"",s!=="replace"?`mode=${s}`:"");try{typeof e=="object"&&e.downloadRequired===!0&&(d.info("changeLayout: downloadRequired — triggering collection first"),await this.player.collect()),await this.player.changeLayout(t,{duration:r,changeMode:s}),d.debug("changeLayout completed successfully")}catch(i){d.error("changeLayout failed:",i)}}),this.xmr.on("overlayLayout",async e=>{const t=typeof e=="object"&&e.layoutId||e,r=typeof e=="object"&&parseInt(e.duration)||0;d.info("Received overlayLayout command:",t,r?`duration=${r}s`:"");try{typeof e=="object"&&e.downloadRequired===!0&&(d.info("overlayLayout: downloadRequired — triggering collection first"),await this.player.collect()),await this.player.overlayLayout(t,{duration:r}),d.debug("overlayLayout completed successfully")}catch(s){d.error("overlayLayout failed:",s)}}),this.xmr.on("revertToSchedule",async()=>{d.info("Received revertToSchedule command");try{await this.player.revertToSchedule(),d.debug("revertToSchedule completed successfully")}catch(e){d.error("revertToSchedule failed:",e)}}),this.xmr.on("purgeAll",async()=>{d.info("Received purgeAll command");try{await this.player.purgeAll(),d.debug("purgeAll completed successfully")}catch(e){d.error("purgeAll failed:",e)}}),this.xmr.on("commandAction",async e=>{const t=(e==null?void 0:e.commandCode)||e;d.info("Received commandAction command:",t);try{const r=this.player.displayCommands||(e==null?void 0:e.commands);await this.player.executeCommand(t,r),d.debug("commandAction completed successfully")}catch(r){d.error("commandAction failed:",r)}}),this.xmr.on("triggerWebhook",async e=>{d.info("Received triggerWebhook command:",e);try{this.player.triggerWebhook((e==null?void 0:e.triggerCode)||e),d.debug("triggerWebhook completed successfully")}catch(t){d.error("triggerWebhook failed:",t)}}),this.xmr.on("dataUpdate",async()=>{d.info("Received dataUpdate command");try{this.player.refreshDataConnectors(),d.debug("dataUpdate completed successfully")}catch(e){d.error("dataUpdate failed:",e)}}),this.xmr.on("rekeyAction",async()=>{d.info("Received rekeyAction command - rotating RSA key pair");try{this.config.data.xmrPubKey="",this.config.data.xmrPrivKey="",await this.config.ensureXmrKeyPair(),await this.player.collect(),d.info("RSA key pair rotated successfully")}catch(e){d.error("Key rotation failed:",e)}}),this.xmr.on("screenshot",async()=>{d.info("Received screenshot command from CMS");try{await this.player.captureScreenshot()}catch(e){d.error("screenshot failed:",e)}}),this.xmr.on("criteriaUpdate",async e=>{d.info("Received criteriaUpdate command:",e);try{await this.player.collect(),d.debug("criteriaUpdate completed successfully")}catch(t){d.error("criteriaUpdate failed:",t)}}),this.xmr.on("currentGeoLocation",async e=>{d.info("Received currentGeoLocation command:",e);try{e&&e.latitude!=null&&e.longitude!=null?this.player.reportGeoLocation?(this.player.reportGeoLocation(e),d.debug("currentGeoLocation: coordinates applied")):d.warn("Geo location reporting not implemented in player"):this.player.requestGeoLocation?(await this.player.requestGeoLocation(),d.debug("currentGeoLocation: browser location requested")):d.warn("Geo location request not implemented in player")}catch(t){d.error("currentGeoLocation failed:",t)}}))}scheduleReconnect(e,t){if(this.reconnectAttempts>=this.maxReconnectAttempts){d.warn("Max reconnection attempts reached, giving up"),d.info("Will retry on next collection cycle");return}this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectAttempts++;const r=this.reconnectDelay*this.reconnectAttempts;d.debug(`Scheduling reconnect attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts} in ${r}ms`),this.reconnectTimer=setTimeout(()=>{d.debug("Attempting to reconnect..."),this.reconnectTimer=null,this.start(e,t)},r)}async stop(){if(this.intentionalShutdown=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),!!this.xmr)try{await this.xmr.stop(),this.connected=!1,d.info("Stopped")}catch(e){d.error("Error stopping:",e)}}isConnected(){return this.connected}async send(e,t){if(!this.connected||!this.xmr)return d.warn("Cannot send - not connected"),!1;try{return await this.xmr.send(e,t),!0}catch(r){return d.error("Error sending:",r),!1}}}const pi=fr.version;export{pi as VERSION,wi as XmrWrapper};
|
|
2
|
+
//# sourceMappingURL=index-Bxwd8e4f.js.map
|