@xiboplayer/pwa 0.1.0

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.
Files changed (34) hide show
  1. package/README.md +60 -0
  2. package/dist/assets/cache-proxy-Cx4Z8XMC.js +2 -0
  3. package/dist/assets/cache-proxy-Cx4Z8XMC.js.map +1 -0
  4. package/dist/assets/cms-api-kzy_Sw-u.js +2 -0
  5. package/dist/assets/cms-api-kzy_Sw-u.js.map +1 -0
  6. package/dist/assets/html2canvas.esm-CBrSDip1.js +23 -0
  7. package/dist/assets/html2canvas.esm-CBrSDip1.js.map +1 -0
  8. package/dist/assets/index-BEhNaWZ4.js +2 -0
  9. package/dist/assets/index-BEhNaWZ4.js.map +1 -0
  10. package/dist/assets/index-BPNsrSEv.js +2 -0
  11. package/dist/assets/index-BPNsrSEv.js.map +1 -0
  12. package/dist/assets/index-BY2j60YZ.js +2 -0
  13. package/dist/assets/index-BY2j60YZ.js.map +1 -0
  14. package/dist/assets/index-CTmjUTVM.js +8 -0
  15. package/dist/assets/index-CTmjUTVM.js.map +1 -0
  16. package/dist/assets/index-_q2HbdAU.js +2 -0
  17. package/dist/assets/index-_q2HbdAU.js.map +1 -0
  18. package/dist/assets/index-_uzldOpz.js +16 -0
  19. package/dist/assets/index-_uzldOpz.js.map +1 -0
  20. package/dist/assets/main-C4ABDfkq.js +27 -0
  21. package/dist/assets/main-C4ABDfkq.js.map +1 -0
  22. package/dist/assets/modulepreload-polyfill-B5Qt9EMX.js +2 -0
  23. package/dist/assets/modulepreload-polyfill-B5Qt9EMX.js.map +1 -0
  24. package/dist/assets/pdf-BnPRJEQ6.js +13 -0
  25. package/dist/assets/pdf-BnPRJEQ6.js.map +1 -0
  26. package/dist/assets/setup-rqZh5qYs.js +2 -0
  27. package/dist/assets/setup-rqZh5qYs.js.map +1 -0
  28. package/dist/index.html +130 -0
  29. package/dist/setup.html +371 -0
  30. package/dist/sw-pwa.js +2 -0
  31. package/dist/sw-pwa.js.map +1 -0
  32. package/dist/sw-utils.js +210 -0
  33. package/dist/sw.test.js +271 -0
  34. package/package.json +39 -0
@@ -0,0 +1,2 @@
1
+ import{c as lr}from"./cms-api-kzy_Sw-u.js";function It(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){It(i,r,s,a,o,"next",u)}function o(u){It(i,r,s,a,o,"throw",u)}a(void 0)})}}function cr(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function fr(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 dr(n,e,t){return e&&fr(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(d,S,x,L){var j=S&&S.prototype instanceof o?S:o,B=Object.create(j.prototype);return W(B,"_invoke",function(Ce,Ke,Fe){var U,M,D,Y=0,K=Fe||[],Q=!1,G={p:0,n:0,v:n,a:We,f:We.bind(n,4),d:function(A,C){return U=A,M=0,D=n,G.n=C,a}};function We(A,C){for(M=A,D=C,e=0;!Q&&Y&&!ee&&e<K.length;e++){var ee,F=K[e],Qe=G.p,Ve=F[2];A>3?(ee=Ve===C)&&(D=F[(M=F[4])?5:(M=3,3)],F[4]=F[5]=n):F[0]<=Qe&&((ee=A<2&&Qe<F[1])?(M=0,G.v=C,G.n=F[1]):Qe<Ve&&(ee=A<3||F[0]>C||C>Ve)&&(F[4]=A,F[5]=C,G.n=Ve,M=0))}if(ee||A>1)return a;throw Q=!0,C}return function(A,C,ee){if(Y>1)throw TypeError("Generator is already running");for(Q&&C===1&&We(C,ee),M=C,D=ee;(e=M<2?n:D)||!Q;){U||(M?M<3?(M>1&&(G.n=-1),We(M,D)):G.n=D:G.v=D);try{if(Y=2,U){if(M||(A="next"),e=U[A]){if(!(e=e.call(U,D)))throw TypeError("iterator result is not an object");if(!e.done)return e;D=e.value,M<2&&(M=0)}else M===1&&(e=U.return)&&e.call(U),M<2&&(D=TypeError("The iterator does not provide a '"+A+"' method"),M=1);U=n}else if((e=(Q=G.n<0)?D:Ce.call(Ke,G))!==a)break}catch(F){U=n,M=1,D=F}finally{Y=1}}return{value:e,done:Q}}}(d,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(d){return Object.setPrototypeOf?Object.setPrototypeOf(d,l):(d.__proto__=l,W(d,s,"GeneratorFunction")),d.prototype=Object.create(m),d}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 hr(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=hr(n,"string");return typeof e=="symbol"?e:e+""}var mr=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 yr extends le{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class gr extends le{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class wr 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},pr={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},kr={year:c,month:P,day:c,weekday:P,hour:c,minute:c},Mn={year:c,month:V,day:c,hour:c,minute:c,timeZoneName:P},bn={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 be(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 vr(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 Sr={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Tr(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 Or(n,e){const t=n.formatToParts(e),r=[];for(let s=0;s<t.length;s++){const{type:i,value:a}=t[s],o=Sr[i];i==="era"?r[o]=a:g(o)||(r[o]=parseInt(a,10))}return r}const nt=new Map;class X extends Ee{static create(e){let t=nt.get(e);return t===void 0&&nt.set(e,t=new X(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=X.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 be(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const r=vr(this.name);let[s,i,a,o,u,l,f]=r.formatToParts?Or(r,t):Tr(r,t);o==="BC"&&(s=-Math.abs(s)+1);const w=Xe({year:s,month:i,day:a,hour:u===24?0:u,minute:l,second:f,millisecond:0});let d=+t;const S=d%1e3;return d-=S>=0?S:1e3+S,(w-d)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let xt={};function Mr(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 br(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 Nr(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 Er(){return Te||(Te=new Intl.DateTimeFormat().resolvedOptions().locale,Te)}const yt=new Map;function Dn(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 Dr(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={...In,...e}),gt.set(n,e)}return e}function Ir(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 xr(n,e,t){return(t||e)&&(n.includes("-u-")||(n+="-u"),t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function Cr(n){const e=[];for(let t=1;t<=12;t++){const r=y.utc(2009,t,1);e.push(n(r))}return e}function Fr(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 Wr(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||Dn(n.locale).numberingSystem==="latn"}class Vr{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=br(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):bt(e,3);return b(t,this.padTo)}}}class Lr{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&&X.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 Ar{constructor(e,t,r){this.opts={style:"long",...r},!t&&An()&&(this.rtf=Nr(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):ss(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const In={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":Er()),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]=Ir(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=r||u||null,this.weekSettings=s,this.intl=xr(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=Wr(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]=Cr(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]=Fr(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return Le(this,void 0,()=>Yn,()=>{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,Gn,()=>{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 Vr(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Lr(e,this.intl,t)}relFormatter(e={}){return new Ar(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Mr(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Dn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:$n()?Dr(this.locale):In}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 I extends Ee{static get utcInstance(){return rt===null&&(rt=new I(0)),rt}static instance(e){return e===0?I.utcInstance:new I(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new I(je(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${be(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${be(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return be(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 $r 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(Hr(n)){const t=n.toLowerCase();return t==="default"?e:t==="local"||t==="system"?_e.instance:t==="utc"||t==="gmt"?I.utcInstance:I.parseSpecifier(t)||X.create(n)}else return se(n)?I.instance(n):typeof n=="object"&&"offset"in n&&typeof n.offset=="function"?n:new $r(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]},Rr=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+=Rr.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 Ur(){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(),X.resetCache(),y.resetCache(),Ur()}}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+(De(n)?Cn:xn)[e-1]}function Wn(n,e){const t=De(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 zr(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 qr(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,Ye(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 Hr(n){return typeof n=="string"}function Pr(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 Yr(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 Gr(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 _r(n,e){return n-e*Math.floor(n/e)}function b(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 Mt(n){if(!(g(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function bt(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 De(n){return n%4===0&&(n%100!==0||n%400===0)}function me(n){return De(n)?366:365}function Ye(n,e){const t=_r(e-1,12)+1,r=n+(e-t)/12;return t===2?De(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Xe(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 je(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 Ge(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 be(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}${b(t,2)}:${b(r,2)}`;case"narrow":return`${s}${t}${r>0?`:${r}`:""}`;case"techie":return`${s}${b(t,2)}${b(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Be(n){return Gr(n,["hour","minute","second","millisecond"])}const Jr=["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"],Xr=["J","F","M","A","M","J","J","A","S","O","N","D"];function zn(n){switch(n){case"narrow":return[...Xr];case"short":return[...Un];case"long":return[...Jr];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"],jr=["M","T","W","T","F","S","S"];function Pn(n){switch(n){case"narrow":return[...jr];case"short":return[...Hn];case"long":return[...qn];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Yn=["AM","PM"],Br=["Before Christ","Anno Domini"],Kr=["BC","AD"],Qr=["B","A"];function Gn(n){switch(n){case"narrow":return[...Qr];case"short":return[...Kr];case"long":return[...Br];default:return null}}function es(n){return Yn[n.hour<12?0:1]}function ts(n,e){return Pn(e)[n.weekday-1]}function ns(n,e){return zn(e)[n.month-1]}function rs(n,e){return Gn(e)[n.year<0?0:1]}function ss(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 Yt(n,e){let t="";for(const r of n)r.literal?t+=r.val:t+=e(r.val);return t}const is={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:Mn,ffff:Nn,F:Sn,FF:On,FFF:bn,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 is[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 b(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=(d,S)=>this.loc.extract(e,d,S),a=d=>e.isOffsetFixed&&e.offset===0&&d.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,d.format):"",o=()=>r?es(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(d,S)=>r?ns(e,d):i(S?{month:d}:{month:d,day:"numeric"},"month"),l=(d,S)=>r?ts(e,d):i(S?{weekday:d}:{weekday:d,month:"long",day:"numeric"},"weekday"),f=d=>{const S=E.macroTokenToFormatOpts(d);return S?this.formatWithSystemDefault(e,S):d},m=d=>r?rs(e,d):i({era:d},"era"),w=d=>{switch(d){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(d)}};return Yt(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 d=s(w);if(d){const S=m.isNegativeDuration&&d!==m.largestUnit?r:1;let x;return this.opts.signMode==="negativeLargestOnly"&&d!==m.largestUnit?x="never":this.opts.signMode==="all"?x="always":x="auto",this.num(f.get(d)*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 Yt(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 Xn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,as=`(?:${Xn.source}?(?:\\[(${_n.source})\\])?)?`,Nt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,jn=RegExp(`${Nt.source}${as}`),Et=RegExp(`(?:[Tt]${jn.source})?`),os=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,us=/(\d{4})-?W(\d\d)(?:-?(\d))?/,ls=/(\d{4})-?(\d{3})/,cs=Jn("weekYear","weekNumber","weekDay"),fs=Jn("year","ordinal"),ds=/(\d{4})-(\d\d)-(\d\d)/,Bn=RegExp(`${Nt.source} ?(?:${Xn.source}|(${_n.source}))?`),hs=RegExp(`(?: ${Bn.source})?`);function ye(n,e,t){const r=n[e];return g(r)?t:ne(r)}function ms(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:Mt(n[e+3])},null,e+4]}function Ie(n,e){const t=!n[e]&&!n[e+1],r=je(n[e+1],n[e+2]),s=t?null:I.instance(r);return[{},s,e+3]}function xe(n,e){const t=n[e]?X.create(n[e]):null;return[{},t,e+1]}const ys=RegExp(`^T?${Nt.source}$`),gs=/^-?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 ws(n){const[e,t,r,s,i,a,o,u,l]=n,f=e[0]==="-",m=u&&u[0]==="-",w=(d,S=!1)=>d!==void 0&&(S||d&&f)?-d:d;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(Mt(l),m)}]}const ps={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 Dt(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 ks=/^(?:(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 vs(n){const[,e,t,r,s,i,a,o,u,l,f,m]=n,w=Dt(e,s,r,t,i,a,o);let d;return u?d=ps[u]:l?d=0:d=je(f,m),[w,new I(d)]}function Ss(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Ts=/^(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$/,Os=/^(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$/,Ms=/^(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 Gt(n){const[,e,t,r,s,i,a,o]=n;return[Dt(e,s,r,t,i,a,o),I.utcInstance]}function bs(n){const[,e,t,r,s,i,a,o]=n;return[Dt(e,o,t,r,s,i,a),I.utcInstance]}const Ns=we(os,Et),Es=we(us,Et),Ds=we(ls,Et),Is=we(jn),Kn=pe(ms,ve,Ie,xe),xs=pe(cs,ve,Ie,xe),Cs=pe(fs,ve,Ie,xe),Fs=pe(ve,Ie,xe);function Ws(n){return ke(n,[Ns,Kn],[Es,xs],[Ds,Cs],[Is,Fs])}function Vs(n){return ke(Ss(n),[ks,vs])}function Ls(n){return ke(n,[Ts,Gt],[Os,Gt],[Ms,bs])}function As(n){return ke(n,[gs,ws])}const $s=pe(ve);function Rs(n){return ke(n,[ys,$s])}const Zs=we(ds,hs),Us=we(Bn),zs=pe(ve,Ie,xe);function qs(n){return ke(n,[Zs,Kn],[Us,zs])}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}},Hs={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,Ps={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"],Ys=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 Ys.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 Xt(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?Ps:Hs;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:Ge(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]=As(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]=Rs(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 wr(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+=bt(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,...Ge(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=Xt(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=Xt(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 Gs(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 gr(r);return new T({invalid:r})}static fromDateTimes(e,t){const r=Se(e),s=Se(t),i=Gs(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 X.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 jt(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 _s(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=jt(u,l);return(f-f%7)/7}],["days",jt]],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 Js(n,e,t,r){let[s,i,a,o]=_s(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 Xs="missing Intl.DateTimeFormat.formatToParts support";function k(n,e=t=>t){return{regex:n,deser:([t])=>e(Zr(t))}}const js=" ",tr=`[ ${js}]`,nr=new RegExp(tr,"g");function Bs(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(Bs).join("|")),deser:([t])=>n.findIndex(r=>Bt(t)===Bt(r))+e}}function Kt(n,e){return{regex:n,deser:([,t,r])=>je(t,r),groups:e}}function $e(n){return{regex:n,deser:([e])=>e}}function Ks(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Qs(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}"),d=L=>({regex:RegExp(Ks(L.val)),deser:([j])=>j,literal:!0}),x=(L=>{if(n.literal)return d(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 d(L)}})(n)||{invalidReason:Xs};return x.token=n,x}const ei={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 ti(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=ei[a];if(typeof o=="object"&&(o=o[i]),o)return{literal:!1,val:o}}function ni(n){return[`^${n.map(t=>t.regex).reduce((t,r)=>`${t}(${r.source})`,"")}$`,n]}function ri(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 si(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=X.create(n.z)),g(n.Z)||(t||(t=new I(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=Mt(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 ii(){return it||(it=y.fromMillis(1555555555555)),it}function ai(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=>ai(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=>Qs(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,s]=ni(this.units);this.regex=RegExp(r,"i"),this.handlers=s}}explainFromTokens(e){if(this.isValid){const[t,r]=ri(e,this.regex,this.handlers),[s,i,a]=r?si(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 oi(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(ii()),s=r.formatToParts(),i=r.resolvedOptions();return s.map(a=>ti(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(Xe(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,Ye(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=Xe(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+=b(n.c.year,r?6:4),t==="year")return s;if(e){if(s+="-",s+=b(n.c.month),t==="month")return s;s+="-"}else if(s+=b(n.c.month),t==="month")return s;return s+=b(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+=b(n.c.hour),a==="hour")break;if(e){if(u+=":",u+=b(n.c.minute),a==="minute")break;o&&(u+=":",u+=b(n.c.second))}else{if(u+=b(n.c.minute),a==="minute")break;o&&(u+=b(n.c.second))}if(a==="second")break;o&&(!r||n.c.millisecond!==0)&&(u+=".",u+=b(n.c.millisecond,3))}return s&&(n.isOffsetFixed&&n.offset===0&&!i?u+="Z":n.o<0?(u+="-",u+=b(Math.trunc(-n.o/60)),u+=":",u+=b(Math.trunc(-n.o%60))):(u+="+",u+=b(Math.trunc(n.o/60)),u+=":",u+=b(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},ui={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},li={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ze=["year","month","day","hour","minute","second","millisecond"],ci=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],fi=["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 di(n){if(Me===void 0&&(Me=O.now()),n.type!=="iana")return n.offset(Me);const e=n.name;let t=vt.get(e);return t===void 0&&(t=n.offset(Me),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=di(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=bt(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 Me;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=I.utcInstance,rn({year:r,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static fromJSDate(e,t={}){const r=Pr(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=Ge(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),d=m||w,S=i.weekYear||i.weekNumber;if((d||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&&!d;let L,j,B=Re(u,l);x?(L=ci,j=ui,B=Pe(B,a,o)):f?(L=fi,j=li,B=st(B)):(L=ze,j=ur);let Ce=!1;for(const K of L){const Q=i[K];g(Q)?Ce?i[K]=j[K]:i[K]=B[K]:Ce=!0}const Ke=x?zr(i,a,o):f?qr(i):Vn(i),Fe=Ke||Ln(i);if(Fe)return y.invalid(Fe);const U=x?Ut(i,a,o):f?zt(i):i,[M,D]=Ue(U,l,r),Y=new y({ts:M,zone:r,o:D,loc:s});return i.weekday&&d&&e.weekday!==Y.weekday?y.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${Y.toISO()}`):Y.isValid?Y:y.invalid(Y.invalid)}static fromISO(e,t={}){const[r,s]=Ws(e);return de(r,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,s]=Vs(e);return de(r,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,s]=Ls(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]=oi(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]=qs(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 yr(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(){Me=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=Xe(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 De(this.year)}get daysInMonth(){return Ye(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(I.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=Ge(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(Ye(m.year,m.month),m.day))):m=zt({...st(this.c),...t});const[w,d]=Ue(m,this.o,this.zone);return ae(this,{ts:w,o:d})}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=Yr(t).map(p.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,u=a?e:this,l=Js(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 pr}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 kr}static get DATETIME_FULL(){return Mn}static get DATETIME_FULL_WITH_SECONDS(){return bn}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 hi=function(){function n(e){cr(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=mr(),this.url=null,this.cmsKey=null,this.channel=e,this.isConnected=!1,this.isConnectionWanted=!1,this.lastMessageAt=y.now().minus({year:1})}return dr(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 h=lr("XMR");class yi{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(h.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 hi(r),this.setupEventHandlers()}return await this.xmr.init(),await this.xmr.start(e,t),this.connected=!0,this.reconnectAttempts=0,h.info("Connected successfully"),!0}catch(r){return h.warn("Failed to start:",r.message),h.info("Continuing in polling mode (XMDS only)"),this.scheduleReconnect(e,t),!1}}setupEventHandlers(){this.xmr&&(this.xmr.on("connected",()=>{var e,t;h.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;h.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&&(h.info("Connection lost, scheduling reconnection..."),this.scheduleReconnect(this.lastXmrUrl,this.lastCmsKey))}),this.xmr.on("error",e=>{h.error("WebSocket error:",e)}),this.xmr.on("collectNow",async()=>{h.info("Received collectNow command from CMS");try{await this.player.collect(),h.debug("collectNow completed successfully")}catch(e){h.error("collectNow failed:",e)}}),this.xmr.on("screenShot",async()=>{h.info("Received screenShot command from CMS");try{await this.player.captureScreenshot(),h.debug("screenShot completed successfully")}catch(e){h.error("screenShot failed:",e)}}),this.xmr.on("licenceCheck",()=>{h.debug("Received licenceCheck (no-op for Linux client)")}),this.xmr.on("changeLayout",async e=>{h.info("Received changeLayout command:",e);try{await this.player.changeLayout(e),h.debug("changeLayout completed successfully")}catch(t){h.error("changeLayout failed:",t)}}),this.xmr.on("overlayLayout",async e=>{h.info("Received overlayLayout command:",e);try{await this.player.overlayLayout(e),h.debug("overlayLayout completed successfully")}catch(t){h.error("overlayLayout failed:",t)}}),this.xmr.on("revertToSchedule",async()=>{h.info("Received revertToSchedule command");try{await this.player.revertToSchedule(),h.debug("revertToSchedule completed successfully")}catch(e){h.error("revertToSchedule failed:",e)}}),this.xmr.on("purgeAll",async()=>{h.info("Received purgeAll command");try{await this.player.purgeAll(),h.debug("purgeAll completed successfully")}catch(e){h.error("purgeAll failed:",e)}}),this.xmr.on("commandAction",async e=>{h.info("Received commandAction command:",e);try{await this.player.executeCommand((e==null?void 0:e.commandCode)||e,e==null?void 0:e.commands),h.debug("commandAction completed successfully")}catch(t){h.error("commandAction failed:",t)}}),this.xmr.on("triggerWebhook",async e=>{h.info("Received triggerWebhook command:",e);try{this.player.triggerWebhook((e==null?void 0:e.triggerCode)||e),h.debug("triggerWebhook completed successfully")}catch(t){h.error("triggerWebhook failed:",t)}}),this.xmr.on("dataUpdate",async()=>{h.info("Received dataUpdate command");try{this.player.refreshDataConnectors(),h.debug("dataUpdate completed successfully")}catch(e){h.error("dataUpdate failed:",e)}}),this.xmr.on("rekey",()=>{h.debug("Received rekey command (pubKey rotation)")}),this.xmr.on("screenshot",async()=>{h.info("Received screenshot command from CMS");try{await this.player.captureScreenshot()}catch(e){h.error("screenshot failed:",e)}}),this.xmr.on("criteriaUpdate",async e=>{h.info("Received criteriaUpdate command:",e);try{await this.player.collect(),h.debug("criteriaUpdate completed successfully")}catch(t){h.error("criteriaUpdate failed:",t)}}),this.xmr.on("currentGeoLocation",async e=>{h.info("Received currentGeoLocation command:",e);try{this.player.reportGeoLocation?(await this.player.reportGeoLocation(e),h.debug("currentGeoLocation completed successfully")):h.warn("Geo location reporting not implemented in player")}catch(t){h.error("currentGeoLocation failed:",t)}}))}scheduleReconnect(e,t){if(this.reconnectAttempts>=this.maxReconnectAttempts){h.warn("Max reconnection attempts reached, giving up"),h.info("Will retry on next collection cycle");return}this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectAttempts++;const r=this.reconnectDelay*this.reconnectAttempts;h.debug(`Scheduling reconnect attempt ${this.reconnectAttempts}/${this.maxReconnectAttempts} in ${r}ms`),this.reconnectTimer=setTimeout(()=>{h.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,h.info("Stopped")}catch(e){h.error("Error stopping:",e)}}isConnected(){return this.connected}async send(e,t){if(!this.connected||!this.xmr)return h.warn("Cannot send - not connected"),!1;try{return await this.xmr.send(e,t),!0}catch(r){return h.error("Error sending:",r),!1}}}export{yi as XmrWrapper};
2
+ //# sourceMappingURL=index-_q2HbdAU.js.map