@andrey4emk/npm-app-front-b24 0.1.17 → 0.1.18
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.
|
@@ -5502,7 +5502,7 @@ const si = (t, e) => {
|
|
|
5502
5502
|
computed: {},
|
|
5503
5503
|
methods: {
|
|
5504
5504
|
formatDate(t) {
|
|
5505
|
-
return t ? y.fromISO(t).toFormat("dd.MM HH:mm:ss
|
|
5505
|
+
return t ? y.fromISO(t).toFormat("dd.MM HH:mm:ss") : "";
|
|
5506
5506
|
},
|
|
5507
5507
|
pause(t) {
|
|
5508
5508
|
return new Promise((e) => setTimeout(e, t));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(U,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(U=typeof globalThis<"u"?globalThis:U||self,u(U.NpmAppFrontB24={},U.Vue))})(this,function(U,u){"use strict";class H extends Error{}class Pn extends H{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Bn extends H{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class Gn extends H{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class J extends H{}class dt extends H{constructor(e){super(`Invalid unit ${e}`)}}class D extends H{}class _ extends H{constructor(){super("Zone is an abstract class")}}const d="numeric",F="short",M="long",Te={year:d,month:d,day:d},ft={year:d,month:F,day:d},Jn={year:d,month:F,day:d,weekday:F},ht={year:d,month:M,day:d},mt={year:d,month:M,day:d,weekday:M},yt={hour:d,minute:d},gt={hour:d,minute:d,second:d},wt={hour:d,minute:d,second:d,timeZoneName:F},Et={hour:d,minute:d,second:d,timeZoneName:M},kt={hour:d,minute:d,hourCycle:"h23"},Tt={hour:d,minute:d,second:d,hourCycle:"h23"},pt={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:F},St={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:M},Nt={year:d,month:d,day:d,hour:d,minute:d},Ot={year:d,month:d,day:d,hour:d,minute:d,second:d},Dt={year:d,month:F,day:d,hour:d,minute:d},It={year:d,month:F,day:d,hour:d,minute:d,second:d},jn={year:d,month:F,day:d,weekday:F,hour:d,minute:d},bt={year:d,month:M,day:d,hour:d,minute:d,timeZoneName:F},Mt={year:d,month:M,day:d,hour:d,minute:d,second:d,timeZoneName:F},Vt={year:d,month:M,day:d,weekday:M,hour:d,minute:d,timeZoneName:M},xt={year:d,month:M,day:d,weekday:M,hour:d,minute:d,second:d,timeZoneName:M};class oe{get type(){throw new _}get name(){throw new _}get ianaName(){return this.name}get isUniversal(){throw new _}offsetName(e,n){throw new _}formatOffset(e,n){throw new _}offset(e){throw new _}equals(e){throw new _}get isValid(){throw new _}}let $e=null;class pe extends oe{static get instance(){return $e===null&&($e=new pe),$e}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:s}){return nn(e,n,s)}formatOffset(e,n){return de(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const Ze=new Map;function Qn(t){let e=Ze.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Ze.set(t,e)),e}const Kn={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Xn(t,e){const n=t.format(e).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,i,a,o,l,c,f]=s;return[a,r,i,o,l,c,f]}function es(t,e){const n=t.formatToParts(e),s=[];for(let r=0;r<n.length;r++){const{type:i,value:a}=n[r],o=Kn[i];i==="era"?s[o]=a:m(o)||(s[o]=parseInt(a,10))}return s}const Re=new Map;class Z extends oe{static create(e){let n=Re.get(e);return n===void 0&&Re.set(e,n=new Z(e)),n}static resetCache(){Re.clear(),Ze.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=Z.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:s}){return nn(e,n,s,this.name)}formatOffset(e,n){return de(this.offset(e),n)}offset(e){if(!this.valid)return NaN;const n=new Date(e);if(isNaN(n))return NaN;const s=Qn(this.name);let[r,i,a,o,l,c,f]=s.formatToParts?es(s,n):Xn(s,n);o==="BC"&&(r=-Math.abs(r)+1);const T=Ie({year:r,month:i,day:a,hour:l===24?0:l,minute:c,second:f,millisecond:0});let h=+n;const O=h%1e3;return h-=O>=0?O:1e3+O,(T-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Ct={};function ts(t,e={}){const n=JSON.stringify([t,e]);let s=Ct[n];return s||(s=new Intl.ListFormat(t,e),Ct[n]=s),s}const Ue=new Map;function _e(t,e={}){const n=JSON.stringify([t,e]);let s=Ue.get(n);return s===void 0&&(s=new Intl.DateTimeFormat(t,e),Ue.set(n,s)),s}const ze=new Map;function ns(t,e={}){const n=JSON.stringify([t,e]);let s=ze.get(n);return s===void 0&&(s=new Intl.NumberFormat(t,e),ze.set(n,s)),s}const qe=new Map;function ss(t,e={}){const{base:n,...s}=e,r=JSON.stringify([t,s]);let i=qe.get(r);return i===void 0&&(i=new Intl.RelativeTimeFormat(t,e),qe.set(r,i)),i}let le=null;function rs(){return le||(le=new Intl.DateTimeFormat().resolvedOptions().locale,le)}const Ye=new Map;function Ft(t){let e=Ye.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),Ye.set(t,e)),e}const He=new Map;function is(t){let e=He.get(t);if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in e||(e={...vt,...e}),He.set(t,e)}return e}function as(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let s,r;try{s=_e(t).resolvedOptions(),r=t}catch{const l=t.substring(0,n);s=_e(l).resolvedOptions(),r=l}const{numberingSystem:i,calendar:a}=s;return[r,i,a]}}function os(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function ls(t){const e=[];for(let n=1;n<=12;n++){const s=y.utc(2009,n,1);e.push(t(s))}return e}function us(t){const e=[];for(let n=1;n<=7;n++){const s=y.utc(2016,11,13+n);e.push(t(s))}return e}function Se(t,e,n,s){const r=t.listingMode();return r==="error"?null:r==="en"?n(e):s(e)}function cs(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||Ft(t.locale).numberingSystem==="latn"}class ds{constructor(e,n,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;const{padTo:r,floor:i,...a}=s;if(!n||Object.keys(a).length>0){const o={useGrouping:!1,...s};s.padTo>0&&(o.minimumIntegerDigits=s.padTo),this.inf=ns(e,o)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):et(e,3);return N(n,this.padTo)}}}class fs{constructor(e,n,s){this.opts=s,this.originalZone=void 0;let r;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&&Z.create(o).valid?(r=o,this.dt=e):(r="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,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=_e(n,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(n=>{if(n.type==="timeZoneName"){const s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:s}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class hs{constructor(e,n,s){this.opts={style:"long",...s},!n&&Kt()&&(this.rtf=ss(e,s))}format(e,n){return this.rtf?this.rtf.format(e,n):As(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const vt={firstDay:1,minimalDays:4,weekend:[6,7]};class k{static fromOpts(e){return k.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,s,r,i=!1){const a=e||p.defaultLocale,o=a||(i?"en-US":rs()),l=n||p.defaultNumberingSystem,c=s||p.defaultOutputCalendar,f=Ke(r)||p.defaultWeekSettings;return new k(o,l,c,f,a)}static resetCache(){le=null,Ue.clear(),ze.clear(),qe.clear(),Ye.clear(),He.clear()}static fromObject({locale:e,numberingSystem:n,outputCalendar:s,weekSettings:r}={}){return k.create(e,n,s,r)}constructor(e,n,s,r,i){const[a,o,l]=as(e);this.locale=a,this.numberingSystem=n||o||null,this.outputCalendar=s||l||null,this.weekSettings=r,this.intl=os(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=cs(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:k.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ke(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,n=!1){return Se(this,e,an,()=>{const s=this.intl==="ja"||this.intl.startsWith("ja-");n&=!s;const r=n?{month:e,day:"numeric"}:{month:e},i=n?"format":"standalone";if(!this.monthsCache[i][e]){const a=s?o=>this.dtFormatter(o,r).format():o=>this.extract(o,r,"month");this.monthsCache[i][e]=ls(a)}return this.monthsCache[i][e]})}weekdays(e,n=!1){return Se(this,e,un,()=>{const s=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=n?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=us(i=>this.extract(i,s,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return Se(this,void 0,()=>cn,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[y.utc(2016,11,13,9),y.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Se(this,e,dn,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[y.utc(-40,1,1),y.utc(2017,1,1)].map(s=>this.extract(s,n,"era"))),this.eraCache[e]})}extract(e,n,s){const r=this.dtFormatter(e,n),i=r.formatToParts(),a=i.find(o=>o.type.toLowerCase()===s);return a?a.value:null}numberFormatter(e={}){return new ds(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new fs(e,this.intl,n)}relFormatter(e={}){return new hs(this.intl,this.isEnglish(),e)}listFormatter(e={}){return ts(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Ft(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Xt()?is(this.locale):vt}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 Pe=null;class b extends oe{static get utcInstance(){return Pe===null&&(Pe=new b(0)),Pe}static instance(e){return e===0?b.utcInstance:new b(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new b(be(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${de(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${de(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return de(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class ms extends oe{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 z(t,e){if(m(t)||t===null)return e;if(t instanceof oe)return t;if(Ts(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?pe.instance:n==="utc"||n==="gmt"?b.utcInstance:b.parseSpecifier(n)||Z.create(t)}else return q(t)?b.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new ms(t)}const Be={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Lt={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]},ys=Be.hanidec.replace(/[\[|\]]/g,"").split("");function gs(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const s=t.charCodeAt(n);if(t[n].search(Be.hanidec)!==-1)e+=ys.indexOf(t[n]);else for(const r in Lt){const[i,a]=Lt[r];s>=i&&s<=a&&(e+=s-i)}}return parseInt(e,10)}else return e}const Ge=new Map;function ws(){Ge.clear()}function v({numberingSystem:t},e=""){const n=t||"latn";let s=Ge.get(n);s===void 0&&(s=new Map,Ge.set(n,s));let r=s.get(e);return r===void 0&&(r=new RegExp(`${Be[n]}${e}`),s.set(e,r)),r}let At=()=>Date.now(),Wt="system",$t=null,Zt=null,Rt=null,Ut=60,_t,zt=null;class p{static get now(){return At}static set now(e){At=e}static set defaultZone(e){Wt=e}static get defaultZone(){return z(Wt,pe.instance)}static get defaultLocale(){return $t}static set defaultLocale(e){$t=e}static get defaultNumberingSystem(){return Zt}static set defaultNumberingSystem(e){Zt=e}static get defaultOutputCalendar(){return Rt}static set defaultOutputCalendar(e){Rt=e}static get defaultWeekSettings(){return zt}static set defaultWeekSettings(e){zt=Ke(e)}static get twoDigitCutoffYear(){return Ut}static set twoDigitCutoffYear(e){Ut=e%100}static get throwOnInvalid(){return _t}static set throwOnInvalid(e){_t=e}static resetCaches(){k.resetCache(),Z.resetCache(),y.resetCache(),ws()}}class L{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const qt=[0,31,59,90,120,151,181,212,243,273,304,334],Yt=[0,31,60,91,121,152,182,213,244,274,305,335];function V(t,e){return new L("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Je(t,e,n){const s=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const r=s.getUTCDay();return r===0?7:r}function Ht(t,e,n){return n+(ue(t)?Yt:qt)[e-1]}function Pt(t,e){const n=ue(t)?Yt:qt,s=n.findIndex(i=>i<e),r=e-n[s];return{month:s+1,day:r}}function je(t,e){return(t-e+7)%7+1}function Ne(t,e=4,n=1){const{year:s,month:r,day:i}=t,a=Ht(s,r,i),o=je(Je(s,r,i),n);let l=Math.floor((a-o+14-e)/7),c;return l<1?(c=s-1,l=ce(c,e,n)):l>ce(s,e,n)?(c=s+1,l=1):c=s,{weekYear:c,weekNumber:l,weekday:o,...Ve(t)}}function Bt(t,e=4,n=1){const{weekYear:s,weekNumber:r,weekday:i}=t,a=je(Je(s,1,e),n),o=Q(s);let l=r*7+i-a-7+e,c;l<1?(c=s-1,l+=Q(c)):l>o?(c=s+1,l-=Q(s)):c=s;const{month:f,day:g}=Pt(c,l);return{year:c,month:f,day:g,...Ve(t)}}function Qe(t){const{year:e,month:n,day:s}=t,r=Ht(e,n,s);return{year:e,ordinal:r,...Ve(t)}}function Gt(t){const{year:e,ordinal:n}=t,{month:s,day:r}=Pt(e,n);return{year:e,month:s,day:r,...Ve(t)}}function Jt(t,e){if(!m(t.localWeekday)||!m(t.localWeekNumber)||!m(t.localWeekYear)){if(!m(t.weekday)||!m(t.weekNumber)||!m(t.weekYear))throw new J("Cannot mix locale-based week fields with ISO-based week fields");return m(t.localWeekday)||(t.weekday=t.localWeekday),m(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),m(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Es(t,e=4,n=1){const s=Oe(t.weekYear),r=x(t.weekNumber,1,ce(t.weekYear,e,n)),i=x(t.weekday,1,7);return s?r?i?!1:V("weekday",t.weekday):V("week",t.weekNumber):V("weekYear",t.weekYear)}function ks(t){const e=Oe(t.year),n=x(t.ordinal,1,Q(t.year));return e?n?!1:V("ordinal",t.ordinal):V("year",t.year)}function jt(t){const e=Oe(t.year),n=x(t.month,1,12),s=x(t.day,1,De(t.year,t.month));return e?n?s?!1:V("day",t.day):V("month",t.month):V("year",t.year)}function Qt(t){const{hour:e,minute:n,second:s,millisecond:r}=t,i=x(e,0,23)||e===24&&n===0&&s===0&&r===0,a=x(n,0,59),o=x(s,0,59),l=x(r,0,999);return i?a?o?l?!1:V("millisecond",r):V("second",s):V("minute",n):V("hour",e)}function m(t){return typeof t>"u"}function q(t){return typeof t=="number"}function Oe(t){return typeof t=="number"&&t%1===0}function Ts(t){return typeof t=="string"}function ps(t){return Object.prototype.toString.call(t)==="[object Date]"}function Kt(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Xt(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Ss(t){return Array.isArray(t)?t:[t]}function en(t,e,n){if(t.length!==0)return t.reduce((s,r)=>{const i=[e(r),r];return s&&n(s[0],i[0])===s[0]?s:i},null)[1]}function Ns(t,e){return e.reduce((n,s)=>(n[s]=t[s],n),{})}function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Ke(t){if(t==null)return null;if(typeof t!="object")throw new D("Week settings must be an object");if(!x(t.firstDay,1,7)||!x(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!x(e,1,7)))throw new D("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function x(t,e,n){return Oe(t)&&t>=e&&t<=n}function Os(t,e){return t-e*Math.floor(t/e)}function N(t,e=2){const n=t<0;let s;return n?s="-"+(""+-t).padStart(e,"0"):s=(""+t).padStart(e,"0"),s}function Y(t){if(!(m(t)||t===null||t===""))return parseInt(t,10)}function P(t){if(!(m(t)||t===null||t===""))return parseFloat(t)}function Xe(t){if(!(m(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function et(t,e,n="round"){const s=10**e;switch(n){case"expand":return t>0?Math.ceil(t*s)/s:Math.floor(t*s)/s;case"trunc":return Math.trunc(t*s)/s;case"round":return Math.round(t*s)/s;case"floor":return Math.floor(t*s)/s;case"ceil":return Math.ceil(t*s)/s;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function ue(t){return t%4===0&&(t%100!==0||t%400===0)}function Q(t){return ue(t)?366:365}function De(t,e){const n=Os(e-1,12)+1,s=t+(e-n)/12;return n===2?ue(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Ie(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function tn(t,e,n){return-je(Je(t,1,e),n)+e-1}function ce(t,e=4,n=1){const s=tn(t,e,n),r=tn(t+1,e,n);return(Q(t)-s+r)/7}function tt(t){return t>99?t:t>p.twoDigitCutoffYear?1900+t:2e3+t}function nn(t,e,n,s=null){const r=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const a={timeZoneName:e,...i},o=new Intl.DateTimeFormat(n,a).formatToParts(r).find(l=>l.type.toLowerCase()==="timezonename");return o?o.value:null}function be(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const s=parseInt(e,10)||0,r=n<0||Object.is(n,-0)?-s:s;return n*60+r}function sn(t){const e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new D(`Invalid unit value ${t}`);return e}function Me(t,e){const n={};for(const s in t)if(j(t,s)){const r=t[s];if(r==null)continue;n[e(s)]=sn(r)}return n}function de(t,e){const n=Math.trunc(Math.abs(t/60)),s=Math.trunc(Math.abs(t%60)),r=t>=0?"+":"-";switch(e){case"short":return`${r}${N(n,2)}:${N(s,2)}`;case"narrow":return`${r}${n}${s>0?`:${s}`:""}`;case"techie":return`${r}${N(n,2)}${N(s,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ve(t){return Ns(t,["hour","minute","second","millisecond"])}const Ds=["January","February","March","April","May","June","July","August","September","October","November","December"],rn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Is=["J","F","M","A","M","J","J","A","S","O","N","D"];function an(t){switch(t){case"narrow":return[...Is];case"short":return[...rn];case"long":return[...Ds];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 on=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ln=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],bs=["M","T","W","T","F","S","S"];function un(t){switch(t){case"narrow":return[...bs];case"short":return[...ln];case"long":return[...on];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const cn=["AM","PM"],Ms=["Before Christ","Anno Domini"],Vs=["BC","AD"],xs=["B","A"];function dn(t){switch(t){case"narrow":return[...xs];case"short":return[...Vs];case"long":return[...Ms];default:return null}}function Cs(t){return cn[t.hour<12?0:1]}function Fs(t,e){return un(e)[t.weekday-1]}function vs(t,e){return an(e)[t.month-1]}function Ls(t,e){return dn(e)[t.year<0?0:1]}function As(t,e,n="always",s=!1){const r={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(t)===-1;if(n==="auto"&&i){const g=t==="days";switch(e){case 1:return g?"tomorrow":`next ${r[t][0]}`;case-1:return g?"yesterday":`last ${r[t][0]}`;case 0:return g?"today":`this ${r[t][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),l=o===1,c=r[t],f=s?l?c[1]:c[2]||c[1]:l?r[t][0]:t;return a?`${o} ${f} ago`:`in ${o} ${f}`}function fn(t,e){let n="";for(const s of t)s.literal?n+=s.val:n+=e(s.val);return n}const Ws={D:Te,DD:ft,DDD:ht,DDDD:mt,t:yt,tt:gt,ttt:wt,tttt:Et,T:kt,TT:Tt,TTT:pt,TTTT:St,f:Nt,ff:Dt,fff:bt,ffff:Vt,F:Ot,FF:It,FFF:Mt,FFFF:xt};class I{static create(e,n={}){return new I(e,n)}static parseFormat(e){let n=null,s="",r=!1;const i=[];for(let a=0;a<e.length;a++){const o=e.charAt(a);o==="'"?((s.length>0||r)&&i.push({literal:r||/^\s+$/.test(s),val:s===""?"'":s}),n=null,s="",r=!r):r||o===n?s+=o:(s.length>0&&i.push({literal:/^\s+$/.test(s),val:s}),s=o,n=o)}return s.length>0&&i.push({literal:r||/^\s+$/.test(s),val:s}),i}static macroTokenToFormatOpts(e){return Ws[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0,s=void 0){if(this.opts.forceSimple)return N(e,n);const r={...this.opts};return n>0&&(r.padTo=n),s&&(r.signDisplay=s),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){const s=this.loc.listingMode()==="en",r=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(h,O)=>this.loc.extract(e,h,O),a=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",o=()=>s?Cs(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(h,O)=>s?vs(e,h):i(O?{month:h}:{month:h,day:"numeric"},"month"),c=(h,O)=>s?Fs(e,h):i(O?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const O=I.macroTokenToFormatOpts(h);return O?this.formatWithSystemDefault(e,O):h},g=h=>s?Ls(e,h):i({era:h},"era"),T=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 r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return g("short");case"GG":return g("long");case"GGGGG":return g("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 fn(I.parseFormat(n),T)}formatDurationFromString(e,n){const s=this.opts.signMode==="negativeLargestOnly"?-1:1,r=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,g)=>T=>{const h=r(T);if(h){const O=g.isNegativeDuration&&h!==g.largestUnit?s:1;let W;return this.opts.signMode==="negativeLargestOnly"&&h!==g.largestUnit?W="never":this.opts.signMode==="all"?W="always":W="auto",this.num(f.get(h)*O,T.length,W)}else return T},a=I.parseFormat(n),o=a.reduce((f,{literal:g,val:T})=>g?f:f.concat(T),[]),l=e.shiftTo(...o.map(r).filter(f=>f)),c={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return fn(a,i(l,c))}}const hn=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function K(...t){const e=t.reduce((n,s)=>n+s.source,"");return RegExp(`^${e}$`)}function X(...t){return e=>t.reduce(([n,s,r],i)=>{const[a,o,l]=i(e,r);return[{...n,...a},o||s,l]},[{},null,1]).slice(0,2)}function ee(t,...e){if(t==null)return[null,null];for(const[n,s]of e){const r=n.exec(t);if(r)return s(r)}return[null,null]}function mn(...t){return(e,n)=>{const s={};let r;for(r=0;r<t.length;r++)s[t[r]]=Y(e[n+r]);return[s,null,n+r]}}const yn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,$s=`(?:${yn.source}?(?:\\[(${hn.source})\\])?)?`,nt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,gn=RegExp(`${nt.source}${$s}`),st=RegExp(`(?:[Tt]${gn.source})?`),Zs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Rs=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Us=/(\d{4})-?(\d{3})/,_s=mn("weekYear","weekNumber","weekDay"),zs=mn("year","ordinal"),qs=/(\d{4})-(\d\d)-(\d\d)/,wn=RegExp(`${nt.source} ?(?:${yn.source}|(${hn.source}))?`),Ys=RegExp(`(?: ${wn.source})?`);function te(t,e,n){const s=t[e];return m(s)?n:Y(s)}function Hs(t,e){return[{year:te(t,e),month:te(t,e+1,1),day:te(t,e+2,1)},null,e+3]}function ne(t,e){return[{hours:te(t,e,0),minutes:te(t,e+1,0),seconds:te(t,e+2,0),milliseconds:Xe(t[e+3])},null,e+4]}function fe(t,e){const n=!t[e]&&!t[e+1],s=be(t[e+1],t[e+2]),r=n?null:b.instance(s);return[{},r,e+3]}function he(t,e){const n=t[e]?Z.create(t[e]):null;return[{},n,e+1]}const Ps=RegExp(`^T?${nt.source}$`),Bs=/^-?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 Gs(t){const[e,n,s,r,i,a,o,l,c]=t,f=e[0]==="-",g=l&&l[0]==="-",T=(h,O=!1)=>h!==void 0&&(O||h&&f)?-h:h;return[{years:T(P(n)),months:T(P(s)),weeks:T(P(r)),days:T(P(i)),hours:T(P(a)),minutes:T(P(o)),seconds:T(P(l),l==="-0"),milliseconds:T(Xe(c),g)}]}const Js={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 rt(t,e,n,s,r,i,a){const o={year:e.length===2?tt(Y(e)):Y(e),month:rn.indexOf(n)+1,day:Y(s),hour:Y(r),minute:Y(i)};return a&&(o.second=Y(a)),t&&(o.weekday=t.length>3?on.indexOf(t)+1:ln.indexOf(t)+1),o}const js=/^(?:(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 Qs(t){const[,e,n,s,r,i,a,o,l,c,f,g]=t,T=rt(e,r,s,n,i,a,o);let h;return l?h=Js[l]:c?h=0:h=be(f,g),[T,new b(h)]}function Ks(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Xs=/^(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$/,er=/^(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$/,tr=/^(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 En(t){const[,e,n,s,r,i,a,o]=t;return[rt(e,r,s,n,i,a,o),b.utcInstance]}function nr(t){const[,e,n,s,r,i,a,o]=t;return[rt(e,o,n,s,r,i,a),b.utcInstance]}const sr=K(Zs,st),rr=K(Rs,st),ir=K(Us,st),ar=K(gn),kn=X(Hs,ne,fe,he),or=X(_s,ne,fe,he),lr=X(zs,ne,fe,he),ur=X(ne,fe,he);function cr(t){return ee(t,[sr,kn],[rr,or],[ir,lr],[ar,ur])}function dr(t){return ee(Ks(t),[js,Qs])}function fr(t){return ee(t,[Xs,En],[er,En],[tr,nr])}function hr(t){return ee(t,[Bs,Gs])}const mr=X(ne);function yr(t){return ee(t,[Ps,mr])}const gr=K(qs,Ys),wr=K(wn),Er=X(ne,fe,he);function kr(t){return ee(t,[gr,kn],[wr,Er])}const Tn="Invalid Duration",pn={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}},Tr={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},...pn},C=146097/400,se=146097/4800,pr={years:{quarters:4,months:12,weeks:C/7,days:C,hours:C*24,minutes:C*24*60,seconds:C*24*60*60,milliseconds:C*24*60*60*1e3},quarters:{months:3,weeks:C/28,days:C/4,hours:C*24/4,minutes:C*24*60/4,seconds:C*24*60*60/4,milliseconds:C*24*60*60*1e3/4},months:{weeks:se/7,days:se,hours:se*24,minutes:se*24*60,seconds:se*24*60*60,milliseconds:se*24*60*60*1e3},...pn},B=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Sr=B.slice(0).reverse();function R(t,e,n=!1){const s={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new w(s)}function Sn(t,e){let n=e.milliseconds??0;for(const s of Sr.slice(1))e[s]&&(n+=e[s]*t[s].milliseconds);return n}function Nn(t,e){const n=Sn(t,e)<0?-1:1;B.reduceRight((s,r)=>{if(m(e[r]))return s;if(s){const i=e[s]*n,a=t[r][s],o=Math.floor(i/a);e[r]+=o*n,e[s]-=o*a*n}return r},null),B.reduce((s,r)=>{if(m(e[r]))return s;if(s){const i=e[s]%1;e[s]-=i,e[r]+=i*t[s][r]}return r},null)}function On(t){const e={};for(const[n,s]of Object.entries(t))s!==0&&(e[n]=s);return e}class w{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let s=n?pr:Tr;e.matrix&&(s=e.matrix),this.values=e.values,this.loc=e.loc||k.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(e,n){return w.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new D(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new w({values:Me(e,w.normalizeUnit),loc:k.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(q(e))return w.fromMillis(e);if(w.isDuration(e))return e;if(typeof e=="object")return w.fromObject(e);throw new D(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[s]=hr(e);return s?w.fromObject(s,n):w.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[s]=yr(e);return s?w.fromObject(s,n):w.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new D("need to specify a reason the Duration is invalid");const s=e instanceof L?e:new L(e,n);if(p.throwOnInvalid)throw new Gn(s);return new w({invalid:s})}static normalizeUnit(e){const n={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(!n)throw new dt(e);return n}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,n={}){const s={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?I.create(this.loc,s).formatDurationFromString(this,e):Tn}toHuman(e={}){if(!this.isValid)return Tn;const n=e.showZeros!==!1,s=B.map(r=>{const i=this.values[r];return m(i)||i===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(i)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(s)}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+=et(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},y.fromMillis(n,{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?Sn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=w.fromDurationLike(e),s={};for(const r of B)(j(n.values,r)||j(this.values,r))&&(s[r]=n.get(r)+this.get(r));return R(this,{values:s},!0)}minus(e){if(!this.isValid)return this;const n=w.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const s of Object.keys(this.values))n[s]=sn(e(this.values[s],s));return R(this,{values:n},!0)}get(e){return this[w.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...Me(e,w.normalizeUnit)};return R(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:s,matrix:r}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:r,conversionAccuracy:s};return R(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Nn(this.matrix,e),R(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=On(this.normalize().shiftToAll().toObject());return R(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>w.normalizeUnit(a));const n={},s={},r=this.toObject();let i;for(const a of B)if(e.indexOf(a)>=0){i=a;let o=0;for(const c in s)o+=this.matrix[c][a]*s[c],s[c]=0;q(r[a])&&(o+=r[a]);const l=Math.trunc(o);n[a]=l,s[a]=(o*1e3-l*1e3)/1e3}else q(r[a])&&(s[a]=r[a]);for(const a in s)s[a]!==0&&(n[i]+=a===i?s[a]:s[a]/this.matrix[i][a]);return Nn(this.matrix,n),R(this,{values:n},!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 n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return R(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=On(this.values);return R(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 n(s,r){return s===void 0||s===0?r===void 0||r===0:s===r}for(const s of B)if(!n(this.values[s],e.values[s]))return!1;return!0}}const re="Invalid Interval";function Nr(t,e){return!t||!t.isValid?S.invalid("missing or invalid start"):!e||!e.isValid?S.invalid("missing or invalid end"):e<t?S.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class S{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new D("need to specify a reason the Interval is invalid");const s=e instanceof L?e:new L(e,n);if(p.throwOnInvalid)throw new Bn(s);return new S({invalid:s})}static fromDateTimes(e,n){const s=ge(e),r=ge(n),i=Nr(s,r);return i??new S({start:s,end:r})}static after(e,n){const s=w.fromDurationLike(n),r=ge(e);return S.fromDateTimes(r,r.plus(s))}static before(e,n){const s=w.fromDurationLike(n),r=ge(e);return S.fromDateTimes(r.minus(s),r)}static fromISO(e,n){const[s,r]=(e||"").split("/",2);if(s&&r){let i,a;try{i=y.fromISO(s,n),a=i.isValid}catch{a=!1}let o,l;try{o=y.fromISO(r,n),l=o.isValid}catch{l=!1}if(a&&l)return S.fromDateTimes(i,o);if(a){const c=w.fromISO(r,n);if(c.isValid)return S.after(i,c)}else if(l){const c=w.fromISO(s,n);if(c.isValid)return S.before(o,c)}}return S.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",n){if(!this.isValid)return NaN;const s=this.start.startOf(e,n);let r;return n!=null&&n.useLocaleWeeks?r=this.end.reconfigure({locale:s.locale}):r=this.end,r=r.startOf(e,n),Math.floor(r.diff(s,e).get(e))+(r.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:n}={}){return this.isValid?S.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(ge).filter(a=>this.contains(a)).sort((a,o)=>a.toMillis()-o.toMillis()),s=[];let{s:r}=this,i=0;for(;r<this.e;){const a=n[i]||this.e,o=+a>+this.e?this.e:a;s.push(S.fromDateTimes(r,o)),r=o,i+=1}return s}splitBy(e){const n=w.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s}=this,r=1,i;const a=[];for(;s<this.e;){const o=this.start.plus(n.mapUnits(l=>l*r));i=+o>+this.e?this.e:o,a.push(S.fromDateTimes(s,i)),s=i,r+=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 n=this.s>e.s?this.s:e.s,s=this.e<e.e?this.e:e.e;return n>=s?null:S.fromDateTimes(n,s)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,s=this.e>e.e?this.e:e.e;return S.fromDateTimes(n,s)}static merge(e){const[n,s]=e.sort((r,i)=>r.s-i.s).reduce(([r,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[r,i.union(a)]:[r.concat([i]),a]:[r,a],[[],null]);return s&&n.push(s),n}static xor(e){let n=null,s=0;const r=[],i=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...i),o=a.sort((l,c)=>l.time-c.time);for(const l of o)s+=l.type==="s"?1:-1,s===1?n=l.time:(n&&+n!=+l.time&&r.push(S.fromDateTimes(n,l.time)),n=null);return S.merge(r)}difference(...e){return S.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:re}[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=Te,n={}){return this.isValid?I.create(this.s.loc.clone(n),e).formatInterval(this):re}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:re}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:re}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:re}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:re}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):w.invalid(this.invalidReason)}mapEndpoints(e){return S.fromDateTimes(e(this.s),e(this.e))}}class xe{static hasDST(e=p.defaultZone){const n=y.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return Z.isValidZone(e)}static normalizeZone(e){return z(e,p.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||k.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||k.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||k.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||k.create(n,s,i)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||k.create(n,s,i)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null}={}){return(r||k.create(n,s,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null}={}){return(r||k.create(n,s,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return k.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return k.create(n,null,"gregory").eras(e)}static features(){return{relative:Kt(),localeWeek:Xt()}}}function Dn(t,e){const n=r=>r.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=n(e)-n(t);return Math.floor(w.fromMillis(s).as("days"))}function Or(t,e,n){const s=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const f=Dn(l,c);return(f-f%7)/7}],["days",Dn]],r={},i=t;let a,o;for(const[l,c]of s)n.indexOf(l)>=0&&(a=l,r[l]=c(t,e),o=i.plus(r),o>e?(r[l]--,t=i.plus(r),t>e&&(o=t,r[l]--,t=i.plus(r))):t=o);return[t,r,o,a]}function Dr(t,e,n,s){let[r,i,a,o]=Or(t,e,n);const l=e-r,c=n.filter(g=>["hours","minutes","seconds","milliseconds"].indexOf(g)>=0);c.length===0&&(a<e&&(a=r.plus({[o]:1})),a!==r&&(i[o]=(i[o]||0)+l/(a-r)));const f=w.fromObject(i,s);return c.length>0?w.fromMillis(l,s).shiftTo(...c).plus(f):f}const Ir="missing Intl.DateTimeFormat.formatToParts support";function E(t,e=n=>n){return{regex:t,deser:([n])=>e(gs(n))}}const In="[ ]",bn=new RegExp(In,"g");function br(t){return t.replace(/\./g,"\\.?").replace(bn,In)}function Mn(t){return t.replace(/\./g,"").replace(bn," ").toLowerCase()}function A(t,e){return t===null?null:{regex:RegExp(t.map(br).join("|")),deser:([n])=>t.findIndex(s=>Mn(n)===Mn(s))+e}}function Vn(t,e){return{regex:t,deser:([,n,s])=>be(n,s),groups:e}}function Ce(t){return{regex:t,deser:([e])=>e}}function Mr(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Vr(t,e){const n=v(e),s=v(e,"{2}"),r=v(e,"{3}"),i=v(e,"{4}"),a=v(e,"{6}"),o=v(e,"{1,2}"),l=v(e,"{1,3}"),c=v(e,"{1,6}"),f=v(e,"{1,9}"),g=v(e,"{2,4}"),T=v(e,"{4,6}"),h=$=>({regex:RegExp(Mr($.val)),deser:([ae])=>ae,literal:!0}),W=($=>{if(t.literal)return h($);switch($.val){case"G":return A(e.eras("short"),0);case"GG":return A(e.eras("long"),0);case"y":return E(c);case"yy":return E(g,tt);case"yyyy":return E(i);case"yyyyy":return E(T);case"yyyyyy":return E(a);case"M":return E(o);case"MM":return E(s);case"MMM":return A(e.months("short",!0),1);case"MMMM":return A(e.months("long",!0),1);case"L":return E(o);case"LL":return E(s);case"LLL":return A(e.months("short",!1),1);case"LLLL":return A(e.months("long",!1),1);case"d":return E(o);case"dd":return E(s);case"o":return E(l);case"ooo":return E(r);case"HH":return E(s);case"H":return E(o);case"hh":return E(s);case"h":return E(o);case"mm":return E(s);case"m":return E(o);case"q":return E(o);case"qq":return E(s);case"s":return E(o);case"ss":return E(s);case"S":return E(l);case"SSS":return E(r);case"u":return Ce(f);case"uu":return Ce(o);case"uuu":return E(n);case"a":return A(e.meridiems(),0);case"kkkk":return E(i);case"kk":return E(g,tt);case"W":return E(o);case"WW":return E(s);case"E":case"c":return E(n);case"EEE":return A(e.weekdays("short",!1),1);case"EEEE":return A(e.weekdays("long",!1),1);case"ccc":return A(e.weekdays("short",!0),1);case"cccc":return A(e.weekdays("long",!0),1);case"Z":case"ZZ":return Vn(new RegExp(`([+-]${o.source})(?::(${s.source}))?`),2);case"ZZZ":return Vn(new RegExp(`([+-]${o.source})(${s.source})?`),2);case"z":return Ce(/[a-z_+-/]{1,256}?/i);case" ":return Ce(/[^\S\n\r]/);default:return h($)}})(t)||{invalidReason:Ir};return W.token=t,W}const xr={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 Cr(t,e,n){const{type:s,value:r}=t;if(s==="literal"){const l=/^\s+$/.test(r);return{literal:!l,val:l?" ":r}}const i=e[s];let a=s;s==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let o=xr[a];if(typeof o=="object"&&(o=o[i]),o)return{literal:!1,val:o}}function Fr(t){return[`^${t.map(n=>n.regex).reduce((n,s)=>`${n}(${s.source})`,"")}$`,t]}function vr(t,e,n){const s=t.match(e);if(s){const r={};let i=1;for(const a in n)if(j(n,a)){const o=n[a],l=o.groups?o.groups+1:1;!o.literal&&o.token&&(r[o.token.val[0]]=o.deser(s.slice(i,i+l))),i+=l}return[s,r]}else return[s,{}]}function Lr(t){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 n=null,s;return m(t.z)||(n=Z.create(t.z)),m(t.Z)||(n||(n=new b(t.Z)),s=t.Z),m(t.q)||(t.M=(t.q-1)*3+1),m(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),m(t.u)||(t.S=Xe(t.u)),[Object.keys(t).reduce((i,a)=>{const o=e(a);return o&&(i[o]=t[a]),i},{}),n,s]}let it=null;function Ar(){return it||(it=y.fromMillis(1555555555555)),it}function Wr(t,e){if(t.literal)return t;const n=I.macroTokenToFormatOpts(t.val),s=vn(n,e);return s==null||s.includes(void 0)?t:s}function xn(t,e){return Array.prototype.concat(...t.map(n=>Wr(n,e)))}class Cn{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=xn(I.parseFormat(n),e),this.units=this.tokens.map(s=>Vr(s,e)),this.disqualifyingUnit=this.units.find(s=>s.invalidReason),!this.disqualifyingUnit){const[s,r]=Fr(this.units);this.regex=RegExp(s,"i"),this.handlers=r}}explainFromTokens(e){if(this.isValid){const[n,s]=vr(e,this.regex,this.handlers),[r,i,a]=s?Lr(s):[null,null,void 0];if(j(s,"a")&&j(s,"H"))throw new J("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:s,result:r,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 Fn(t,e,n){return new Cn(t,n).explainFromTokens(e)}function $r(t,e,n){const{result:s,zone:r,specificOffset:i,invalidReason:a}=Fn(t,e,n);return[s,r,i,a]}function vn(t,e){if(!t)return null;const s=I.create(e,t).dtFormatter(Ar()),r=s.formatToParts(),i=s.resolvedOptions();return r.map(a=>Cr(a,t,i))}const at="Invalid DateTime",Ln=864e13;function me(t){return new L("unsupported zone",`the zone "${t.name}" is not supported`)}function ot(t){return t.weekData===null&&(t.weekData=Ne(t.c)),t.weekData}function lt(t){return t.localWeekData===null&&(t.localWeekData=Ne(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function G(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new y({...n,...e,old:n})}function An(t,e,n){let s=t-e*60*1e3;const r=n.offset(s);if(e===r)return[s,e];s-=(r-e)*60*1e3;const i=n.offset(s);return r===i?[s,r]:[t-Math.min(r,i)*60*1e3,Math.max(r,i)]}function Fe(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function ve(t,e,n){return An(Ie(t),e,n)}function Wn(t,e){const n=t.o,s=t.c.year+Math.trunc(e.years),r=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...t.c,year:s,month:r,day:Math.min(t.c.day,De(s,r))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=w.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=Ie(i);let[l,c]=An(o,n,t.zone);return a!==0&&(l+=a,c=t.zone.offset(l)),{ts:l,o:c}}function ie(t,e,n,s,r,i){const{setZone:a,zone:o}=n;if(t&&Object.keys(t).length!==0||e){const l=e||o,c=y.fromObject(t,{...n,zone:l,specificOffset:i});return a?c:c.setZone(o)}else return y.invalid(new L("unparsable",`the input "${r}" can't be parsed as ${s}`))}function Le(t,e,n=!0){return t.isValid?I.create(k.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function ut(t,e,n){const s=t.c.year>9999||t.c.year<0;let r="";if(s&&t.c.year>=0&&(r+="+"),r+=N(t.c.year,s?6:4),n==="year")return r;if(e){if(r+="-",r+=N(t.c.month),n==="month")return r;r+="-"}else if(r+=N(t.c.month),n==="month")return r;return r+=N(t.c.day),r}function $n(t,e,n,s,r,i,a){let o=!n||t.c.millisecond!==0||t.c.second!==0,l="";switch(a){case"day":case"month":case"year":break;default:if(l+=N(t.c.hour),a==="hour")break;if(e){if(l+=":",l+=N(t.c.minute),a==="minute")break;o&&(l+=":",l+=N(t.c.second))}else{if(l+=N(t.c.minute),a==="minute")break;o&&(l+=N(t.c.second))}if(a==="second")break;o&&(!s||t.c.millisecond!==0)&&(l+=".",l+=N(t.c.millisecond,3))}return r&&(t.isOffsetFixed&&t.offset===0&&!i?l+="Z":t.o<0?(l+="-",l+=N(Math.trunc(-t.o/60)),l+=":",l+=N(Math.trunc(-t.o%60))):(l+="+",l+=N(Math.trunc(t.o/60)),l+=":",l+=N(Math.trunc(t.o%60)))),i&&(l+="["+t.zone.ianaName+"]"),l}const Zn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Zr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Rr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ae=["year","month","day","hour","minute","second","millisecond"],Ur=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],_r=["year","ordinal","hour","minute","second","millisecond"];function We(t){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"}[t.toLowerCase()];if(!e)throw new dt(t);return e}function Rn(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return We(t)}}function zr(t){if(ye===void 0&&(ye=p.now()),t.type!=="iana")return t.offset(ye);const e=t.name;let n=ct.get(e);return n===void 0&&(n=t.offset(ye),ct.set(e,n)),n}function Un(t,e){const n=z(e.zone,p.defaultZone);if(!n.isValid)return y.invalid(me(n));const s=k.fromObject(e);let r,i;if(m(t.year))r=p.now();else{for(const l of Ae)m(t[l])&&(t[l]=Zn[l]);const a=jt(t)||Qt(t);if(a)return y.invalid(a);const o=zr(n);[r,i]=ve(t,o,n)}return new y({ts:r,zone:n,loc:s,o:i})}function _n(t,e,n){const s=m(n.round)?!0:n.round,r=m(n.rounding)?"trunc":n.rounding,i=(o,l)=>(o=et(o,s||n.calendary?0:2,n.calendary?"round":r),e.loc.clone(n).relFormatter(n).format(o,l)),a=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return i(a(n.unit),n.unit);for(const o of n.units){const l=a(o);if(Math.abs(l)>=1)return i(l,o)}return i(t>e?-0:0,n.units[n.units.length-1])}function zn(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}let ye;const ct=new Map;class y{constructor(e){const n=e.zone||p.defaultZone;let s=e.invalid||(Number.isNaN(e.ts)?new L("invalid input"):null)||(n.isValid?null:me(n));this.ts=m(e.ts)?p.now():e.ts;let r=null,i=null;if(!s)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[r,i]=[e.old.c,e.old.o];else{const o=q(e.o)&&!e.old?e.o:n.offset(this.ts);r=Fe(this.ts,o),s=Number.isNaN(r.year)?new L("invalid input"):null,r=s?null:r,i=s?null:o}this._zone=n,this.loc=e.loc||k.create(),this.invalid=s,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new y({})}static local(){const[e,n]=zn(arguments),[s,r,i,a,o,l,c]=n;return Un({year:s,month:r,day:i,hour:a,minute:o,second:l,millisecond:c},e)}static utc(){const[e,n]=zn(arguments),[s,r,i,a,o,l,c]=n;return e.zone=b.utcInstance,Un({year:s,month:r,day:i,hour:a,minute:o,second:l,millisecond:c},e)}static fromJSDate(e,n={}){const s=ps(e)?e.valueOf():NaN;if(Number.isNaN(s))return y.invalid("invalid input");const r=z(n.zone,p.defaultZone);return r.isValid?new y({ts:s,zone:r,loc:k.fromObject(n)}):y.invalid(me(r))}static fromMillis(e,n={}){if(q(e))return e<-Ln||e>Ln?y.invalid("Timestamp out of range"):new y({ts:e,zone:z(n.zone,p.defaultZone),loc:k.fromObject(n)});throw new D(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(q(e))return new y({ts:e*1e3,zone:z(n.zone,p.defaultZone),loc:k.fromObject(n)});throw new D("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const s=z(n.zone,p.defaultZone);if(!s.isValid)return y.invalid(me(s));const r=k.fromObject(n),i=Me(e,Rn),{minDaysInFirstWeek:a,startOfWeek:o}=Jt(i,r),l=p.now(),c=m(n.specificOffset)?s.offset(l):n.specificOffset,f=!m(i.ordinal),g=!m(i.year),T=!m(i.month)||!m(i.day),h=g||T,O=i.weekYear||i.weekNumber;if((h||f)&&O)throw new J("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(T&&f)throw new J("Can't mix ordinal dates with month/day");const W=O||i.weekday&&!h;let $,ae,we=Fe(l,c);W?($=Ur,ae=Zr,we=Ne(we,a,o)):f?($=_r,ae=Rr,we=Qe(we)):($=Ae,ae=Zn);let Yn=!1;for(const ke of $){const wi=i[ke];m(wi)?Yn?i[ke]=ae[ke]:i[ke]=we[ke]:Yn=!0}const hi=W?Es(i,a,o):f?ks(i):jt(i),Hn=hi||Qt(i);if(Hn)return y.invalid(Hn);const mi=W?Bt(i,a,o):f?Gt(i):i,[yi,gi]=ve(mi,c,s),Ee=new y({ts:yi,zone:s,o:gi,loc:r});return i.weekday&&h&&e.weekday!==Ee.weekday?y.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${Ee.toISO()}`):Ee.isValid?Ee:y.invalid(Ee.invalid)}static fromISO(e,n={}){const[s,r]=cr(e);return ie(s,r,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[s,r]=dr(e);return ie(s,r,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[s,r]=fr(e);return ie(s,r,n,"HTTP",n)}static fromFormat(e,n,s={}){if(m(e)||m(n))throw new D("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=s,a=k.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[o,l,c,f]=$r(a,e,n);return f?y.invalid(f):ie(o,l,s,`format ${n}`,e,c)}static fromString(e,n,s={}){return y.fromFormat(e,n,s)}static fromSQL(e,n={}){const[s,r]=kr(e);return ie(s,r,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new D("need to specify a reason the DateTime is invalid");const s=e instanceof L?e:new L(e,n);if(p.throwOnInvalid)throw new Pn(s);return new y({invalid:s})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const s=vn(e,k.fromObject(n));return s?s.map(r=>r?r.val:null).join(""):null}static expandFormat(e,n={}){return xn(I.parseFormat(e),k.fromObject(n)).map(r=>r.val).join("")}static resetCache(){ye=void 0,ct.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?lt(this).weekday:NaN}get localWeekNumber(){return this.isValid?lt(this).weekNumber:NaN}get localWeekYear(){return this.isValid?lt(this).weekYear:NaN}get ordinal(){return this.isValid?Qe(this.c).ordinal:NaN}get monthShort(){return this.isValid?xe.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?xe.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?xe.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?xe.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,n=6e4,s=Ie(this.c),r=this.zone.offset(s-e),i=this.zone.offset(s+e),a=this.zone.offset(s-r*n),o=this.zone.offset(s-i*n);if(a===o)return[this];const l=s-a*n,c=s-o*n,f=Fe(l,a),g=Fe(c,o);return f.hour===g.hour&&f.minute===g.minute&&f.second===g.second&&f.millisecond===g.millisecond?[G(this,{ts:l}),G(this,{ts:c})]:[this]}get isInLeapYear(){return ue(this.year)}get daysInMonth(){return De(this.year,this.month)}get daysInYear(){return this.isValid?Q(this.year):NaN}get weeksInWeekYear(){return this.isValid?ce(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ce(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:s,calendar:r}=I.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:s,outputCalendar:r}}toUTC(e=0,n={}){return this.setZone(b.instance(e),n)}toLocal(){return this.setZone(p.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:s=!1}={}){if(e=z(e,p.defaultZone),e.equals(this.zone))return this;if(e.isValid){let r=this.ts;if(n||s){const i=e.offset(this.ts),a=this.toObject();[r]=ve(a,i,e)}return G(this,{ts:r,zone:e})}else return y.invalid(me(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:s}={}){const r=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:s});return G(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=Me(e,Rn),{minDaysInFirstWeek:s,startOfWeek:r}=Jt(n,this.loc),i=!m(n.weekYear)||!m(n.weekNumber)||!m(n.weekday),a=!m(n.ordinal),o=!m(n.year),l=!m(n.month)||!m(n.day),c=o||l,f=n.weekYear||n.weekNumber;if((c||a)&&f)throw new J("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new J("Can't mix ordinal dates with month/day");let g;i?g=Bt({...Ne(this.c,s,r),...n},s,r):m(n.ordinal)?(g={...this.toObject(),...n},m(n.day)&&(g.day=Math.min(De(g.year,g.month),g.day))):g=Gt({...Qe(this.c),...n});const[T,h]=ve(g,this.o,this.zone);return G(this,{ts:T,o:h})}plus(e){if(!this.isValid)return this;const n=w.fromDurationLike(e);return G(this,Wn(this,n))}minus(e){if(!this.isValid)return this;const n=w.fromDurationLike(e).negate();return G(this,Wn(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const s={},r=w.normalizeUnit(e);switch(r){case"years":s.month=1;case"quarters":case"months":s.day=1;case"weeks":case"days":s.hour=0;case"hours":s.minute=0;case"minutes":s.second=0;case"seconds":s.millisecond=0;break}if(r==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(s.weekNumber=this.weekNumber-1),s.weekday=i}else s.weekday=1;if(r==="quarters"){const i=Math.ceil(this.month/3);s.month=(i-1)*3+1}return this.set(s)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?I.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):at}toLocaleString(e=Te,n={}){return this.isValid?I.create(this.loc.clone(n),e).formatDateTime(this):at}toLocaleParts(e={}){return this.isValid?I.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:s=!1,includeOffset:r=!0,extendedZone:i=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;a=We(a);const o=e==="extended";let l=ut(this,o,a);return Ae.indexOf(a)>=3&&(l+="T"),l+=$n(this,o,n,s,r,i,a),l}toISODate({format:e="extended",precision:n="day"}={}){return this.isValid?ut(this,e==="extended",We(n)):null}toISOWeekDate(){return Le(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:s=!0,includePrefix:r=!1,extendedZone:i=!1,format:a="extended",precision:o="milliseconds"}={}){return this.isValid?(o=We(o),(r&&Ae.indexOf(o)>=3?"T":"")+$n(this,a==="extended",n,e,s,i,o)):null}toRFC2822(){return Le(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Le(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ut(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:s=!0}={}){let r="HH:mm:ss.SSS";return(n||e)&&(s&&(r+=" "),n?r+="z":e&&(r+="ZZ")),Le(this,r,!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 n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",s={}){if(!this.isValid||!e.isValid)return w.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...s},i=Ss(n).map(w.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,l=a?e:this,c=Dr(o,l,i,r);return a?c.negate():c}diffNow(e="milliseconds",n={}){return this.diff(y.now(),e,n)}until(e){return this.isValid?S.fromDateTimes(this,e):this}hasSame(e,n,s){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(n,s)<=r&&r<=i.endOf(n,s)}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 n=e.base||y.fromObject({},{zone:this.zone}),s=e.padding?this<n?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),_n(n,this.plus(s),{...e,numeric:"always",units:r,unit:i})}toRelativeCalendar(e={}){return this.isValid?_n(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 D("min requires all arguments be DateTimes");return en(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(y.isDateTime))throw new D("max requires all arguments be DateTimes");return en(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,s={}){const{locale:r=null,numberingSystem:i=null}=s,a=k.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return Fn(a,e,n)}static fromStringExplain(e,n,s={}){return y.fromFormatExplain(e,n,s)}static buildFormatParser(e,n={}){const{locale:s=null,numberingSystem:r=null}=n,i=k.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0});return new Cn(i,e)}static fromFormatParser(e,n,s={}){if(m(e)||m(n))throw new D("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=s,a=k.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!a.equals(n.locale))throw new D(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`);const{result:o,zone:l,specificOffset:c,invalidReason:f}=n.explainFromTokens(e);return f?y.invalid(f):ie(o,l,s,`format ${n.format}`,e,c)}static get DATE_SHORT(){return Te}static get DATE_MED(){return ft}static get DATE_MED_WITH_WEEKDAY(){return Jn}static get DATE_FULL(){return ht}static get DATE_HUGE(){return mt}static get TIME_SIMPLE(){return yt}static get TIME_WITH_SECONDS(){return gt}static get TIME_WITH_SHORT_OFFSET(){return wt}static get TIME_WITH_LONG_OFFSET(){return Et}static get TIME_24_SIMPLE(){return kt}static get TIME_24_WITH_SECONDS(){return Tt}static get TIME_24_WITH_SHORT_OFFSET(){return pt}static get TIME_24_WITH_LONG_OFFSET(){return St}static get DATETIME_SHORT(){return Nt}static get DATETIME_SHORT_WITH_SECONDS(){return Ot}static get DATETIME_MED(){return Dt}static get DATETIME_MED_WITH_SECONDS(){return It}static get DATETIME_MED_WITH_WEEKDAY(){return jn}static get DATETIME_FULL(){return bt}static get DATETIME_FULL_WITH_SECONDS(){return Mt}static get DATETIME_HUGE(){return Vt}static get DATETIME_HUGE_WITH_SECONDS(){return xt}}function ge(t){if(y.isDateTime(t))return t;if(t&&t.valueOf&&q(t.valueOf()))return y.fromJSDate(t);if(t&&typeof t=="object")return y.fromObject(t);throw new D(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const qr=(t,e)=>{const n=t.__vccOpts||t;for(const[s,r]of e)n[s]=r;return n},Yr={name:"Subscriptions",data(){return{events:[],subscribedEvents:[],entities:{list:[],total:0},autoRefresh:!0,auth_connector:""}},computed:{},methods:{formatDate(t){return t?y.fromISO(t).toFormat("dd.MM HH:mm:ss.SS"):""},pause(t){return new Promise(e=>setTimeout(e,t))},async eventsList(){console.log("Запускаем eventsList");try{let t=await $b24.callMethod("events",{});this.events=t.getData().result}catch(t){console.error("Ошибка при получении списка событий:",t)}},async subscribeToEvents(t){try{await $b24.callMethod("event.bind",{event:t,event_type:"offline",auth_connector:this.auth_connector}),console.log(`Подписались на событие ${t}.`)}catch(e){console.error("Ошибка при подписке на события:",e)}await this.pause(1e3),await this.getSubscribedEvents()},async getSubscribedEvents(){try{let t=await $b24.callMethod("event.get",{});this.subscribedEvents=t.getData().result,console.log("Подписанные события:",this.subscribedEvents)}catch(t){console.error("Ошибка при получении подписанных событий:",t)}},async unbindSubscribedEvents(t){try{await $b24.callMethod("event.unbind",{event:t.event,event_type:t.offline==1?"offline":"online",auth_connector:t.connector_id}),await this.pause(1e3),await this.getSubscribedEvents()}catch(e){console.error("Ошибка при отписке от событий:",e)}},async loadOfflineEntitiesList(){let e=await $b24.callListMethod("event.offline.list",{start:0,auth_connector:this.auth_connector});this.entities.list=e.getData(),this.entities.total=e.getData().length},async deleteOfflineEntities(t){let e=await $b24.callMethod("event.offline.clear",{process_id:t.PROCESS_ID,id:[t.ID],auth_connector:this.auth_connector});console.log("Удалили сущности из оффлан событий:",e.getData()),await this.pause(1e3),await this.loadOfflineEntitiesList()},async deleteOfflineEntitiesAll(){if(!confirm("Вы уверены, что хотите удалить все НЕ обработанные сущности? Это действие необратимо!"))return;let t=this.entities.total/50+1;console.log("Всего страниц для удаления:",t);for(let e=1;e<=t;e++){let s=(await $b24.callMethod("event.offline.list",{start:0})).getData().result.map(a=>a.PROCESS_ID).filter(a=>a);console.log("PROCESS_ID для удаления:",s);let r={};s.forEach((a,o)=>{r[`clear_${o}`]={method:"event.offline.clear",params:{process_id:a}}}),console.log("batchCommands:",r);let i=await $b24.callBatch(r);console.log("Результат batch удаления сущностей:",i.getData())}await this.pause(500),await this.loadOfflineEntitiesList()},async deleteOfflineEntitiesAllEmpty(){if(!confirm("Вы уверены, что хотите удалить все пустые НЕ обработанные сущности? Это действие необратимо!"))return;let t=await $b24.callMethod("event.offline.clear",{process_id:""});console.log("Результат удаления сущностей с пустым PROCESS_ID:",t.getData())},isSubscribed(t){return this.subscribedEvents.some(e=>e.event==t)},autoRefreshEntities(){this.autoRefresh&&setTimeout(async()=>{await this.loadOfflineEntitiesList(),this.autoRefreshEntities()},3e3)},async entityUpdate(t){var n,s,r,i,a,o,l;let e=!1;console.log("Запущена функция entityUpdate для изменения сущности с ID:",(n=t.EVENT_DATA.FIELDS)==null?void 0:n.ID);try{if((s=t.EVENT_DATA.FIELDS)!=null&&s.ENTITY_TYPE_ID&&((r=t.EVENT_DATA.FIELDS)==null?void 0:r.ENTITY_TYPE_ID)>0){let c=await $b24.callMethod("crm.item.get",{entityTypeId:t.EVENT_DATA.FIELDS.ENTITY_TYPE_ID,id:t.EVENT_DATA.FIELDS.ID});if(c=c.getData().result.item,console.log("Данные смарт процесса до изменения:",c),c.id==((i=t.EVENT_DATA.FIELDS)==null?void 0:i.ID)){let f=await $b24.callMethod("crm.item.update",{entityTypeId:t.EVENT_DATA.FIELDS.ENTITY_TYPE_ID,id:t.EVENT_DATA.FIELDS.ID,fields:{title:c.title+"123"}});console.log("Результат обновления смарт процесса:",f.getData()),f.id===c.id?(console.log("Сущность успешно обновлена."),e=!0):(console.error("Ошибка при обновлении сущности."),e=!0)}else e=!0}else{let c=await $b24.callMethod("crm.deal.get",{id:(a=t.EVENT_DATA.FIELDS)==null?void 0:a.ID});if(c=c.getData().result,console.log("Данные сделки до изменения:",c),c.ID==((o=t.EVENT_DATA.FIELDS)==null?void 0:o.ID)){let f=await $b24.callMethod("crm.deal.update",{id:(l=t.EVENT_DATA.FIELDS)==null?void 0:l.ID,fields:{TITLE:c.TITLE}});console.log("Результат обновления сделки:",f.getData()),f=f.getData().result,f===!0?console.log("Сущность успешно обновлена."):(console.error("Ошибка при обновлении сущности."),e=!0)}else e=!0}}catch(c){console.error("Ошибка при обновлении сущности:",c),c=!0}e||await this.deleteOfflineEntities(t)}},watch:{},mounted(){this.getSubscribedEvents(),this.eventsList(),this.loadOfflineEntitiesList(),this.autoRefreshEntities()}},Hr={class:"Subscriptions"},Pr={key:0},Br=["disabled"],Gr={class:"switch tooltipParent",style:{top:"12px"}},Jr={key:0},jr={key:0,class:"main"},Qr=["onClick"],Kr=["onClick"],Xr=["href"],ei={class:"tooltipParent",style:{}},ti={class:"tooltip"},ni={key:1},si={key:1},ri={key:0,class:"main"},ii=["onClick"],ai={key:1},oi={key:0,class:"main"},li=["onClick","disabled"],ui={key:1},ci={key:2};function di(t,e,n,s,r,i){return u.openBlock(),u.createElementBlock("div",Hr,[e[15]||(e[15]=u.createElementVNode("h1",null,"Страница подписок",-1)),u.createElementVNode("button",{onClick:e[0]||(e[0]=a=>t.selectTab("tab1"))},"Сущности"),u.createElementVNode("button",{onClick:e[1]||(e[1]=a=>t.selectTab("tab2"))},"События"),e[16]||(e[16]=u.createElementVNode("br",null,null,-1)),e[17]||(e[17]=u.createElementVNode("br",null,null,-1)),e[18]||(e[18]=u.createElementVNode("br",null,null,-1)),t.tabs.tab1?(u.openBlock(),u.createElementBlock("div",Pr,[u.createElementVNode("div",null,[u.createElementVNode("button",{onClick:e[2]||(e[2]=(...a)=>i.loadOfflineEntitiesList&&i.loadOfflineEntitiesList(...a)),disabled:t.loading},"Обновить",8,Br),u.createElementVNode("label",Gr,[u.withDirectives(u.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=a=>r.autoRefresh=a),onChange:e[4]||(e[4]=(...a)=>i.autoRefreshEntities&&i.autoRefreshEntities(...a))},null,544),[[u.vModelCheckbox,r.autoRefresh]]),e[7]||(e[7]=u.createElementVNode("span",{class:"slider"},null,-1)),e[8]||(e[8]=u.createElementVNode("span",{class:"tooltip"},"Автообновление каждые 3 секунды",-1))])]),r.entities.list.length>0?(u.openBlock(),u.createElementBlock("div",Jr,[u.createElementVNode("p",null,[u.createElementVNode("button",{onClick:e[5]||(e[5]=(...a)=>i.deleteOfflineEntitiesAll&&i.deleteOfflineEntitiesAll(...a))},"Удалить все"),u.createElementVNode("button",{onClick:e[6]||(e[6]=(...a)=>i.deleteOfflineEntitiesAllEmpty&&i.deleteOfflineEntitiesAllEmpty(...a))},"Удалить все пустые"),u.createTextVNode(" Всего измененных сущностей "+u.toDisplayString(r.entities.total),1)]),r.entities.list.length?(u.openBlock(),u.createElementBlock("table",jr,[e[10]||(e[10]=u.createElementVNode("thead",null,[u.createElementVNode("tr",null,[u.createElementVNode("th",null,"#"),u.createElementVNode("th",null,"Удалить"),u.createElementVNode("th",null,"Обновить"),u.createElementVNode("th",null,"Дата"),u.createElementVNode("th",null,"PROCESS_ID"),u.createElementVNode("th",null,"EVENT_NAME"),u.createElementVNode("th",null,"Ссылка"),u.createElementVNode("th",null,"EVENT_DATA"),u.createElementVNode("th",null,"who_update"),u.createElementVNode("th",null,"entity")])],-1)),u.createElementVNode("tbody",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.entities.list,(a,o)=>{var l,c,f,g;return u.openBlock(),u.createElementBlock("tr",{key:a.PROCESS_ID+"-"+a.ID},[u.createElementVNode("td",null,u.toDisplayString(o+1),1),u.createElementVNode("td",null,[u.createElementVNode("button",{onClick:T=>i.deleteOfflineEntities(a)},"Удалить",8,Qr)]),u.createElementVNode("td",null,[(l=a.EVENT_DATA.FIELDS)!=null&&l.ID&&(a.EVENT_NAME=="ONCRMDEALUPDATE"||a.EVENT_NAME.includes("ONCRMDYNAMICITEMUPDATE_"))?(u.openBlock(),u.createElementBlock("button",{key:0,onClick:T=>i.entityUpdate(a)},"Изменить",8,Kr)):u.createCommentVNode("",!0)]),u.createElementVNode("td",null,u.toDisplayString(i.formatDate(a.TIMESTAMP_X)),1),u.createElementVNode("td",null,u.toDisplayString(a.PROCESS_ID),1),u.createElementVNode("td",null,u.toDisplayString(a.EVENT_NAME),1),u.createElementVNode("td",null,[(c=a.EVENT_DATA.FIELDS)!=null&&c.ID&&a.EVENT_NAME=="ONCRMDEALUPDATE"?(u.openBlock(),u.createElementBlock("a",{key:0,href:"https://repacheb.bitrix24.ru/crm/deal/details/"+((f=a.EVENT_DATA.FIELDS)==null?void 0:f.ID)+"/",target:"_blank",rel:"noopener noreferrer"},u.toDisplayString((g=a.EVENT_DATA.FIELDS)==null?void 0:g.ID),9,Xr)):u.createCommentVNode("",!0)]),u.createElementVNode("td",null,u.toDisplayString(a.EVENT_DATA),1),u.createElementVNode("td",null,u.toDisplayString(a.EVENT_ADDITIONAL.user_id),1),u.createElementVNode("td",ei,[e[9]||(e[9]=u.createElementVNode("span",null,"Подробней",-1)),u.createElementVNode("span",ti,u.toDisplayString(a),1)])])}),128))])])):u.createCommentVNode("",!0)])):(u.openBlock(),u.createElementBlock("div",ni,"Список сущностей пуст."))])):u.createCommentVNode("",!0),t.tabs.tab2?(u.openBlock(),u.createElementBlock("div",si,[u.createElementVNode("div",null,[e[12]||(e[12]=u.createElementVNode("h3",null,"Подписаны на события:",-1)),r.subscribedEvents.length?(u.openBlock(),u.createElementBlock("table",ri,[e[11]||(e[11]=u.createElementVNode("thead",null,[u.createElementVNode("tr",null,[u.createElementVNode("th",null,"Событие"),u.createElementVNode("th",null,"connector_id"),u.createElementVNode("th",null,"offline"),u.createElementVNode("th",null,"Отписаться")])],-1)),u.createElementVNode("tbody",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.subscribedEvents,a=>(u.openBlock(),u.createElementBlock("tr",{key:a.id},[u.createElementVNode("td",null,u.toDisplayString(a.event),1),u.createElementVNode("td",null,u.toDisplayString(a.connector_id),1),u.createElementVNode("td",null,u.toDisplayString(a.offline),1),u.createElementVNode("td",null,[u.createElementVNode("button",{onClick:o=>i.unbindSubscribedEvents(a)},"Отписаться от событий",8,ii)])]))),128))])])):(u.openBlock(),u.createElementBlock("p",ai,"Подписок на события нет."))]),u.createElementVNode("div",null,[e[14]||(e[14]=u.createElementVNode("h3",null,"На какие события можно подписаться:",-1)),r.events.length?(u.openBlock(),u.createElementBlock("table",oi,[e[13]||(e[13]=u.createElementVNode("thead",null,[u.createElementVNode("tr",null,[u.createElementVNode("th",null,"Событие"),u.createElementVNode("th",null,"Подписаться")])],-1)),u.createElementVNode("tbody",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.events,a=>(u.openBlock(),u.createElementBlock("tr",{key:a},[u.createElementVNode("td",null,u.toDisplayString(a),1),u.createElementVNode("td",null,[u.createElementVNode("button",{onClick:o=>i.subscribeToEvents(a),disabled:i.isSubscribed(a),class:u.normalizeClass({"disabled-button":i.isSubscribed(a)})},"Подписаться",10,li)])]))),128))])])):(u.openBlock(),u.createElementBlock("p",ui,"Список событий пуст."))])])):u.createCommentVNode("",!0),t.tabs.tab3?(u.openBlock(),u.createElementBlock("div",ci)):u.createCommentVNode("",!0)])}const qn=qr(Yr,[["render",di]]),fi={install(t,e={}){t.component("Subscriptions",qn),e.b24&&(t.config.globalProperties.$b24=e.b24)}};U.Subscriptions=qn,U.default=fi,Object.defineProperties(U,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(U,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(U=typeof globalThis<"u"?globalThis:U||self,u(U.NpmAppFrontB24={},U.Vue))})(this,function(U,u){"use strict";class H extends Error{}class Pn extends H{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Bn extends H{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class Gn extends H{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class J extends H{}class dt extends H{constructor(e){super(`Invalid unit ${e}`)}}class D extends H{}class _ extends H{constructor(){super("Zone is an abstract class")}}const d="numeric",F="short",M="long",Te={year:d,month:d,day:d},ft={year:d,month:F,day:d},Jn={year:d,month:F,day:d,weekday:F},ht={year:d,month:M,day:d},mt={year:d,month:M,day:d,weekday:M},yt={hour:d,minute:d},gt={hour:d,minute:d,second:d},wt={hour:d,minute:d,second:d,timeZoneName:F},Et={hour:d,minute:d,second:d,timeZoneName:M},kt={hour:d,minute:d,hourCycle:"h23"},Tt={hour:d,minute:d,second:d,hourCycle:"h23"},pt={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:F},St={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:M},Nt={year:d,month:d,day:d,hour:d,minute:d},Ot={year:d,month:d,day:d,hour:d,minute:d,second:d},Dt={year:d,month:F,day:d,hour:d,minute:d},It={year:d,month:F,day:d,hour:d,minute:d,second:d},jn={year:d,month:F,day:d,weekday:F,hour:d,minute:d},bt={year:d,month:M,day:d,hour:d,minute:d,timeZoneName:F},Mt={year:d,month:M,day:d,hour:d,minute:d,second:d,timeZoneName:F},Vt={year:d,month:M,day:d,weekday:M,hour:d,minute:d,timeZoneName:M},xt={year:d,month:M,day:d,weekday:M,hour:d,minute:d,second:d,timeZoneName:M};class oe{get type(){throw new _}get name(){throw new _}get ianaName(){return this.name}get isUniversal(){throw new _}offsetName(e,n){throw new _}formatOffset(e,n){throw new _}offset(e){throw new _}equals(e){throw new _}get isValid(){throw new _}}let $e=null;class pe extends oe{static get instance(){return $e===null&&($e=new pe),$e}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:s}){return nn(e,n,s)}formatOffset(e,n){return de(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const Ze=new Map;function Qn(t){let e=Ze.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Ze.set(t,e)),e}const Kn={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Xn(t,e){const n=t.format(e).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,i,a,o,l,c,f]=s;return[a,r,i,o,l,c,f]}function es(t,e){const n=t.formatToParts(e),s=[];for(let r=0;r<n.length;r++){const{type:i,value:a}=n[r],o=Kn[i];i==="era"?s[o]=a:m(o)||(s[o]=parseInt(a,10))}return s}const Re=new Map;class Z extends oe{static create(e){let n=Re.get(e);return n===void 0&&Re.set(e,n=new Z(e)),n}static resetCache(){Re.clear(),Ze.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=Z.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:s}){return nn(e,n,s,this.name)}formatOffset(e,n){return de(this.offset(e),n)}offset(e){if(!this.valid)return NaN;const n=new Date(e);if(isNaN(n))return NaN;const s=Qn(this.name);let[r,i,a,o,l,c,f]=s.formatToParts?es(s,n):Xn(s,n);o==="BC"&&(r=-Math.abs(r)+1);const T=Ie({year:r,month:i,day:a,hour:l===24?0:l,minute:c,second:f,millisecond:0});let h=+n;const O=h%1e3;return h-=O>=0?O:1e3+O,(T-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Ct={};function ts(t,e={}){const n=JSON.stringify([t,e]);let s=Ct[n];return s||(s=new Intl.ListFormat(t,e),Ct[n]=s),s}const Ue=new Map;function _e(t,e={}){const n=JSON.stringify([t,e]);let s=Ue.get(n);return s===void 0&&(s=new Intl.DateTimeFormat(t,e),Ue.set(n,s)),s}const ze=new Map;function ns(t,e={}){const n=JSON.stringify([t,e]);let s=ze.get(n);return s===void 0&&(s=new Intl.NumberFormat(t,e),ze.set(n,s)),s}const qe=new Map;function ss(t,e={}){const{base:n,...s}=e,r=JSON.stringify([t,s]);let i=qe.get(r);return i===void 0&&(i=new Intl.RelativeTimeFormat(t,e),qe.set(r,i)),i}let le=null;function rs(){return le||(le=new Intl.DateTimeFormat().resolvedOptions().locale,le)}const Ye=new Map;function Ft(t){let e=Ye.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),Ye.set(t,e)),e}const He=new Map;function is(t){let e=He.get(t);if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in e||(e={...vt,...e}),He.set(t,e)}return e}function as(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let s,r;try{s=_e(t).resolvedOptions(),r=t}catch{const l=t.substring(0,n);s=_e(l).resolvedOptions(),r=l}const{numberingSystem:i,calendar:a}=s;return[r,i,a]}}function os(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function ls(t){const e=[];for(let n=1;n<=12;n++){const s=y.utc(2009,n,1);e.push(t(s))}return e}function us(t){const e=[];for(let n=1;n<=7;n++){const s=y.utc(2016,11,13+n);e.push(t(s))}return e}function Se(t,e,n,s){const r=t.listingMode();return r==="error"?null:r==="en"?n(e):s(e)}function cs(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||Ft(t.locale).numberingSystem==="latn"}class ds{constructor(e,n,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;const{padTo:r,floor:i,...a}=s;if(!n||Object.keys(a).length>0){const o={useGrouping:!1,...s};s.padTo>0&&(o.minimumIntegerDigits=s.padTo),this.inf=ns(e,o)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):et(e,3);return N(n,this.padTo)}}}class fs{constructor(e,n,s){this.opts=s,this.originalZone=void 0;let r;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&&Z.create(o).valid?(r=o,this.dt=e):(r="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,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=_e(n,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(n=>{if(n.type==="timeZoneName"){const s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:s}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class hs{constructor(e,n,s){this.opts={style:"long",...s},!n&&Kt()&&(this.rtf=ss(e,s))}format(e,n){return this.rtf?this.rtf.format(e,n):As(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const vt={firstDay:1,minimalDays:4,weekend:[6,7]};class k{static fromOpts(e){return k.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,s,r,i=!1){const a=e||p.defaultLocale,o=a||(i?"en-US":rs()),l=n||p.defaultNumberingSystem,c=s||p.defaultOutputCalendar,f=Ke(r)||p.defaultWeekSettings;return new k(o,l,c,f,a)}static resetCache(){le=null,Ue.clear(),ze.clear(),qe.clear(),Ye.clear(),He.clear()}static fromObject({locale:e,numberingSystem:n,outputCalendar:s,weekSettings:r}={}){return k.create(e,n,s,r)}constructor(e,n,s,r,i){const[a,o,l]=as(e);this.locale=a,this.numberingSystem=n||o||null,this.outputCalendar=s||l||null,this.weekSettings=r,this.intl=os(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=cs(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:k.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ke(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,n=!1){return Se(this,e,an,()=>{const s=this.intl==="ja"||this.intl.startsWith("ja-");n&=!s;const r=n?{month:e,day:"numeric"}:{month:e},i=n?"format":"standalone";if(!this.monthsCache[i][e]){const a=s?o=>this.dtFormatter(o,r).format():o=>this.extract(o,r,"month");this.monthsCache[i][e]=ls(a)}return this.monthsCache[i][e]})}weekdays(e,n=!1){return Se(this,e,un,()=>{const s=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=n?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=us(i=>this.extract(i,s,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return Se(this,void 0,()=>cn,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[y.utc(2016,11,13,9),y.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Se(this,e,dn,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[y.utc(-40,1,1),y.utc(2017,1,1)].map(s=>this.extract(s,n,"era"))),this.eraCache[e]})}extract(e,n,s){const r=this.dtFormatter(e,n),i=r.formatToParts(),a=i.find(o=>o.type.toLowerCase()===s);return a?a.value:null}numberFormatter(e={}){return new ds(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new fs(e,this.intl,n)}relFormatter(e={}){return new hs(this.intl,this.isEnglish(),e)}listFormatter(e={}){return ts(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Ft(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Xt()?is(this.locale):vt}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 Pe=null;class b extends oe{static get utcInstance(){return Pe===null&&(Pe=new b(0)),Pe}static instance(e){return e===0?b.utcInstance:new b(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new b(be(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${de(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${de(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return de(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class ms extends oe{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 z(t,e){if(m(t)||t===null)return e;if(t instanceof oe)return t;if(Ts(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?pe.instance:n==="utc"||n==="gmt"?b.utcInstance:b.parseSpecifier(n)||Z.create(t)}else return q(t)?b.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new ms(t)}const Be={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Lt={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]},ys=Be.hanidec.replace(/[\[|\]]/g,"").split("");function gs(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const s=t.charCodeAt(n);if(t[n].search(Be.hanidec)!==-1)e+=ys.indexOf(t[n]);else for(const r in Lt){const[i,a]=Lt[r];s>=i&&s<=a&&(e+=s-i)}}return parseInt(e,10)}else return e}const Ge=new Map;function ws(){Ge.clear()}function v({numberingSystem:t},e=""){const n=t||"latn";let s=Ge.get(n);s===void 0&&(s=new Map,Ge.set(n,s));let r=s.get(e);return r===void 0&&(r=new RegExp(`${Be[n]}${e}`),s.set(e,r)),r}let At=()=>Date.now(),Wt="system",$t=null,Zt=null,Rt=null,Ut=60,_t,zt=null;class p{static get now(){return At}static set now(e){At=e}static set defaultZone(e){Wt=e}static get defaultZone(){return z(Wt,pe.instance)}static get defaultLocale(){return $t}static set defaultLocale(e){$t=e}static get defaultNumberingSystem(){return Zt}static set defaultNumberingSystem(e){Zt=e}static get defaultOutputCalendar(){return Rt}static set defaultOutputCalendar(e){Rt=e}static get defaultWeekSettings(){return zt}static set defaultWeekSettings(e){zt=Ke(e)}static get twoDigitCutoffYear(){return Ut}static set twoDigitCutoffYear(e){Ut=e%100}static get throwOnInvalid(){return _t}static set throwOnInvalid(e){_t=e}static resetCaches(){k.resetCache(),Z.resetCache(),y.resetCache(),ws()}}class L{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const qt=[0,31,59,90,120,151,181,212,243,273,304,334],Yt=[0,31,60,91,121,152,182,213,244,274,305,335];function V(t,e){return new L("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Je(t,e,n){const s=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const r=s.getUTCDay();return r===0?7:r}function Ht(t,e,n){return n+(ue(t)?Yt:qt)[e-1]}function Pt(t,e){const n=ue(t)?Yt:qt,s=n.findIndex(i=>i<e),r=e-n[s];return{month:s+1,day:r}}function je(t,e){return(t-e+7)%7+1}function Ne(t,e=4,n=1){const{year:s,month:r,day:i}=t,a=Ht(s,r,i),o=je(Je(s,r,i),n);let l=Math.floor((a-o+14-e)/7),c;return l<1?(c=s-1,l=ce(c,e,n)):l>ce(s,e,n)?(c=s+1,l=1):c=s,{weekYear:c,weekNumber:l,weekday:o,...Ve(t)}}function Bt(t,e=4,n=1){const{weekYear:s,weekNumber:r,weekday:i}=t,a=je(Je(s,1,e),n),o=Q(s);let l=r*7+i-a-7+e,c;l<1?(c=s-1,l+=Q(c)):l>o?(c=s+1,l-=Q(s)):c=s;const{month:f,day:g}=Pt(c,l);return{year:c,month:f,day:g,...Ve(t)}}function Qe(t){const{year:e,month:n,day:s}=t,r=Ht(e,n,s);return{year:e,ordinal:r,...Ve(t)}}function Gt(t){const{year:e,ordinal:n}=t,{month:s,day:r}=Pt(e,n);return{year:e,month:s,day:r,...Ve(t)}}function Jt(t,e){if(!m(t.localWeekday)||!m(t.localWeekNumber)||!m(t.localWeekYear)){if(!m(t.weekday)||!m(t.weekNumber)||!m(t.weekYear))throw new J("Cannot mix locale-based week fields with ISO-based week fields");return m(t.localWeekday)||(t.weekday=t.localWeekday),m(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),m(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Es(t,e=4,n=1){const s=Oe(t.weekYear),r=x(t.weekNumber,1,ce(t.weekYear,e,n)),i=x(t.weekday,1,7);return s?r?i?!1:V("weekday",t.weekday):V("week",t.weekNumber):V("weekYear",t.weekYear)}function ks(t){const e=Oe(t.year),n=x(t.ordinal,1,Q(t.year));return e?n?!1:V("ordinal",t.ordinal):V("year",t.year)}function jt(t){const e=Oe(t.year),n=x(t.month,1,12),s=x(t.day,1,De(t.year,t.month));return e?n?s?!1:V("day",t.day):V("month",t.month):V("year",t.year)}function Qt(t){const{hour:e,minute:n,second:s,millisecond:r}=t,i=x(e,0,23)||e===24&&n===0&&s===0&&r===0,a=x(n,0,59),o=x(s,0,59),l=x(r,0,999);return i?a?o?l?!1:V("millisecond",r):V("second",s):V("minute",n):V("hour",e)}function m(t){return typeof t>"u"}function q(t){return typeof t=="number"}function Oe(t){return typeof t=="number"&&t%1===0}function Ts(t){return typeof t=="string"}function ps(t){return Object.prototype.toString.call(t)==="[object Date]"}function Kt(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Xt(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Ss(t){return Array.isArray(t)?t:[t]}function en(t,e,n){if(t.length!==0)return t.reduce((s,r)=>{const i=[e(r),r];return s&&n(s[0],i[0])===s[0]?s:i},null)[1]}function Ns(t,e){return e.reduce((n,s)=>(n[s]=t[s],n),{})}function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Ke(t){if(t==null)return null;if(typeof t!="object")throw new D("Week settings must be an object");if(!x(t.firstDay,1,7)||!x(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!x(e,1,7)))throw new D("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function x(t,e,n){return Oe(t)&&t>=e&&t<=n}function Os(t,e){return t-e*Math.floor(t/e)}function N(t,e=2){const n=t<0;let s;return n?s="-"+(""+-t).padStart(e,"0"):s=(""+t).padStart(e,"0"),s}function Y(t){if(!(m(t)||t===null||t===""))return parseInt(t,10)}function P(t){if(!(m(t)||t===null||t===""))return parseFloat(t)}function Xe(t){if(!(m(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function et(t,e,n="round"){const s=10**e;switch(n){case"expand":return t>0?Math.ceil(t*s)/s:Math.floor(t*s)/s;case"trunc":return Math.trunc(t*s)/s;case"round":return Math.round(t*s)/s;case"floor":return Math.floor(t*s)/s;case"ceil":return Math.ceil(t*s)/s;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function ue(t){return t%4===0&&(t%100!==0||t%400===0)}function Q(t){return ue(t)?366:365}function De(t,e){const n=Os(e-1,12)+1,s=t+(e-n)/12;return n===2?ue(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Ie(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function tn(t,e,n){return-je(Je(t,1,e),n)+e-1}function ce(t,e=4,n=1){const s=tn(t,e,n),r=tn(t+1,e,n);return(Q(t)-s+r)/7}function tt(t){return t>99?t:t>p.twoDigitCutoffYear?1900+t:2e3+t}function nn(t,e,n,s=null){const r=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const a={timeZoneName:e,...i},o=new Intl.DateTimeFormat(n,a).formatToParts(r).find(l=>l.type.toLowerCase()==="timezonename");return o?o.value:null}function be(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const s=parseInt(e,10)||0,r=n<0||Object.is(n,-0)?-s:s;return n*60+r}function sn(t){const e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new D(`Invalid unit value ${t}`);return e}function Me(t,e){const n={};for(const s in t)if(j(t,s)){const r=t[s];if(r==null)continue;n[e(s)]=sn(r)}return n}function de(t,e){const n=Math.trunc(Math.abs(t/60)),s=Math.trunc(Math.abs(t%60)),r=t>=0?"+":"-";switch(e){case"short":return`${r}${N(n,2)}:${N(s,2)}`;case"narrow":return`${r}${n}${s>0?`:${s}`:""}`;case"techie":return`${r}${N(n,2)}${N(s,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ve(t){return Ns(t,["hour","minute","second","millisecond"])}const Ds=["January","February","March","April","May","June","July","August","September","October","November","December"],rn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Is=["J","F","M","A","M","J","J","A","S","O","N","D"];function an(t){switch(t){case"narrow":return[...Is];case"short":return[...rn];case"long":return[...Ds];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 on=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ln=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],bs=["M","T","W","T","F","S","S"];function un(t){switch(t){case"narrow":return[...bs];case"short":return[...ln];case"long":return[...on];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const cn=["AM","PM"],Ms=["Before Christ","Anno Domini"],Vs=["BC","AD"],xs=["B","A"];function dn(t){switch(t){case"narrow":return[...xs];case"short":return[...Vs];case"long":return[...Ms];default:return null}}function Cs(t){return cn[t.hour<12?0:1]}function Fs(t,e){return un(e)[t.weekday-1]}function vs(t,e){return an(e)[t.month-1]}function Ls(t,e){return dn(e)[t.year<0?0:1]}function As(t,e,n="always",s=!1){const r={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(t)===-1;if(n==="auto"&&i){const g=t==="days";switch(e){case 1:return g?"tomorrow":`next ${r[t][0]}`;case-1:return g?"yesterday":`last ${r[t][0]}`;case 0:return g?"today":`this ${r[t][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),l=o===1,c=r[t],f=s?l?c[1]:c[2]||c[1]:l?r[t][0]:t;return a?`${o} ${f} ago`:`in ${o} ${f}`}function fn(t,e){let n="";for(const s of t)s.literal?n+=s.val:n+=e(s.val);return n}const Ws={D:Te,DD:ft,DDD:ht,DDDD:mt,t:yt,tt:gt,ttt:wt,tttt:Et,T:kt,TT:Tt,TTT:pt,TTTT:St,f:Nt,ff:Dt,fff:bt,ffff:Vt,F:Ot,FF:It,FFF:Mt,FFFF:xt};class I{static create(e,n={}){return new I(e,n)}static parseFormat(e){let n=null,s="",r=!1;const i=[];for(let a=0;a<e.length;a++){const o=e.charAt(a);o==="'"?((s.length>0||r)&&i.push({literal:r||/^\s+$/.test(s),val:s===""?"'":s}),n=null,s="",r=!r):r||o===n?s+=o:(s.length>0&&i.push({literal:/^\s+$/.test(s),val:s}),s=o,n=o)}return s.length>0&&i.push({literal:r||/^\s+$/.test(s),val:s}),i}static macroTokenToFormatOpts(e){return Ws[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0,s=void 0){if(this.opts.forceSimple)return N(e,n);const r={...this.opts};return n>0&&(r.padTo=n),s&&(r.signDisplay=s),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){const s=this.loc.listingMode()==="en",r=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(h,O)=>this.loc.extract(e,h,O),a=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",o=()=>s?Cs(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(h,O)=>s?vs(e,h):i(O?{month:h}:{month:h,day:"numeric"},"month"),c=(h,O)=>s?Fs(e,h):i(O?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const O=I.macroTokenToFormatOpts(h);return O?this.formatWithSystemDefault(e,O):h},g=h=>s?Ls(e,h):i({era:h},"era"),T=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 r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return g("short");case"GG":return g("long");case"GGGGG":return g("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 fn(I.parseFormat(n),T)}formatDurationFromString(e,n){const s=this.opts.signMode==="negativeLargestOnly"?-1:1,r=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,g)=>T=>{const h=r(T);if(h){const O=g.isNegativeDuration&&h!==g.largestUnit?s:1;let W;return this.opts.signMode==="negativeLargestOnly"&&h!==g.largestUnit?W="never":this.opts.signMode==="all"?W="always":W="auto",this.num(f.get(h)*O,T.length,W)}else return T},a=I.parseFormat(n),o=a.reduce((f,{literal:g,val:T})=>g?f:f.concat(T),[]),l=e.shiftTo(...o.map(r).filter(f=>f)),c={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return fn(a,i(l,c))}}const hn=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function K(...t){const e=t.reduce((n,s)=>n+s.source,"");return RegExp(`^${e}$`)}function X(...t){return e=>t.reduce(([n,s,r],i)=>{const[a,o,l]=i(e,r);return[{...n,...a},o||s,l]},[{},null,1]).slice(0,2)}function ee(t,...e){if(t==null)return[null,null];for(const[n,s]of e){const r=n.exec(t);if(r)return s(r)}return[null,null]}function mn(...t){return(e,n)=>{const s={};let r;for(r=0;r<t.length;r++)s[t[r]]=Y(e[n+r]);return[s,null,n+r]}}const yn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,$s=`(?:${yn.source}?(?:\\[(${hn.source})\\])?)?`,nt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,gn=RegExp(`${nt.source}${$s}`),st=RegExp(`(?:[Tt]${gn.source})?`),Zs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Rs=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Us=/(\d{4})-?(\d{3})/,_s=mn("weekYear","weekNumber","weekDay"),zs=mn("year","ordinal"),qs=/(\d{4})-(\d\d)-(\d\d)/,wn=RegExp(`${nt.source} ?(?:${yn.source}|(${hn.source}))?`),Ys=RegExp(`(?: ${wn.source})?`);function te(t,e,n){const s=t[e];return m(s)?n:Y(s)}function Hs(t,e){return[{year:te(t,e),month:te(t,e+1,1),day:te(t,e+2,1)},null,e+3]}function ne(t,e){return[{hours:te(t,e,0),minutes:te(t,e+1,0),seconds:te(t,e+2,0),milliseconds:Xe(t[e+3])},null,e+4]}function fe(t,e){const n=!t[e]&&!t[e+1],s=be(t[e+1],t[e+2]),r=n?null:b.instance(s);return[{},r,e+3]}function he(t,e){const n=t[e]?Z.create(t[e]):null;return[{},n,e+1]}const Ps=RegExp(`^T?${nt.source}$`),Bs=/^-?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 Gs(t){const[e,n,s,r,i,a,o,l,c]=t,f=e[0]==="-",g=l&&l[0]==="-",T=(h,O=!1)=>h!==void 0&&(O||h&&f)?-h:h;return[{years:T(P(n)),months:T(P(s)),weeks:T(P(r)),days:T(P(i)),hours:T(P(a)),minutes:T(P(o)),seconds:T(P(l),l==="-0"),milliseconds:T(Xe(c),g)}]}const Js={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 rt(t,e,n,s,r,i,a){const o={year:e.length===2?tt(Y(e)):Y(e),month:rn.indexOf(n)+1,day:Y(s),hour:Y(r),minute:Y(i)};return a&&(o.second=Y(a)),t&&(o.weekday=t.length>3?on.indexOf(t)+1:ln.indexOf(t)+1),o}const js=/^(?:(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 Qs(t){const[,e,n,s,r,i,a,o,l,c,f,g]=t,T=rt(e,r,s,n,i,a,o);let h;return l?h=Js[l]:c?h=0:h=be(f,g),[T,new b(h)]}function Ks(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Xs=/^(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$/,er=/^(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$/,tr=/^(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 En(t){const[,e,n,s,r,i,a,o]=t;return[rt(e,r,s,n,i,a,o),b.utcInstance]}function nr(t){const[,e,n,s,r,i,a,o]=t;return[rt(e,o,n,s,r,i,a),b.utcInstance]}const sr=K(Zs,st),rr=K(Rs,st),ir=K(Us,st),ar=K(gn),kn=X(Hs,ne,fe,he),or=X(_s,ne,fe,he),lr=X(zs,ne,fe,he),ur=X(ne,fe,he);function cr(t){return ee(t,[sr,kn],[rr,or],[ir,lr],[ar,ur])}function dr(t){return ee(Ks(t),[js,Qs])}function fr(t){return ee(t,[Xs,En],[er,En],[tr,nr])}function hr(t){return ee(t,[Bs,Gs])}const mr=X(ne);function yr(t){return ee(t,[Ps,mr])}const gr=K(qs,Ys),wr=K(wn),Er=X(ne,fe,he);function kr(t){return ee(t,[gr,kn],[wr,Er])}const Tn="Invalid Duration",pn={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}},Tr={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},...pn},C=146097/400,se=146097/4800,pr={years:{quarters:4,months:12,weeks:C/7,days:C,hours:C*24,minutes:C*24*60,seconds:C*24*60*60,milliseconds:C*24*60*60*1e3},quarters:{months:3,weeks:C/28,days:C/4,hours:C*24/4,minutes:C*24*60/4,seconds:C*24*60*60/4,milliseconds:C*24*60*60*1e3/4},months:{weeks:se/7,days:se,hours:se*24,minutes:se*24*60,seconds:se*24*60*60,milliseconds:se*24*60*60*1e3},...pn},B=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Sr=B.slice(0).reverse();function R(t,e,n=!1){const s={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new w(s)}function Sn(t,e){let n=e.milliseconds??0;for(const s of Sr.slice(1))e[s]&&(n+=e[s]*t[s].milliseconds);return n}function Nn(t,e){const n=Sn(t,e)<0?-1:1;B.reduceRight((s,r)=>{if(m(e[r]))return s;if(s){const i=e[s]*n,a=t[r][s],o=Math.floor(i/a);e[r]+=o*n,e[s]-=o*a*n}return r},null),B.reduce((s,r)=>{if(m(e[r]))return s;if(s){const i=e[s]%1;e[s]-=i,e[r]+=i*t[s][r]}return r},null)}function On(t){const e={};for(const[n,s]of Object.entries(t))s!==0&&(e[n]=s);return e}class w{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let s=n?pr:Tr;e.matrix&&(s=e.matrix),this.values=e.values,this.loc=e.loc||k.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(e,n){return w.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new D(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new w({values:Me(e,w.normalizeUnit),loc:k.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(q(e))return w.fromMillis(e);if(w.isDuration(e))return e;if(typeof e=="object")return w.fromObject(e);throw new D(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[s]=hr(e);return s?w.fromObject(s,n):w.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[s]=yr(e);return s?w.fromObject(s,n):w.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new D("need to specify a reason the Duration is invalid");const s=e instanceof L?e:new L(e,n);if(p.throwOnInvalid)throw new Gn(s);return new w({invalid:s})}static normalizeUnit(e){const n={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(!n)throw new dt(e);return n}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,n={}){const s={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?I.create(this.loc,s).formatDurationFromString(this,e):Tn}toHuman(e={}){if(!this.isValid)return Tn;const n=e.showZeros!==!1,s=B.map(r=>{const i=this.values[r];return m(i)||i===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(i)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(s)}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+=et(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},y.fromMillis(n,{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?Sn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=w.fromDurationLike(e),s={};for(const r of B)(j(n.values,r)||j(this.values,r))&&(s[r]=n.get(r)+this.get(r));return R(this,{values:s},!0)}minus(e){if(!this.isValid)return this;const n=w.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const s of Object.keys(this.values))n[s]=sn(e(this.values[s],s));return R(this,{values:n},!0)}get(e){return this[w.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...Me(e,w.normalizeUnit)};return R(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:s,matrix:r}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:r,conversionAccuracy:s};return R(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Nn(this.matrix,e),R(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=On(this.normalize().shiftToAll().toObject());return R(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>w.normalizeUnit(a));const n={},s={},r=this.toObject();let i;for(const a of B)if(e.indexOf(a)>=0){i=a;let o=0;for(const c in s)o+=this.matrix[c][a]*s[c],s[c]=0;q(r[a])&&(o+=r[a]);const l=Math.trunc(o);n[a]=l,s[a]=(o*1e3-l*1e3)/1e3}else q(r[a])&&(s[a]=r[a]);for(const a in s)s[a]!==0&&(n[i]+=a===i?s[a]:s[a]/this.matrix[i][a]);return Nn(this.matrix,n),R(this,{values:n},!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 n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return R(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=On(this.values);return R(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 n(s,r){return s===void 0||s===0?r===void 0||r===0:s===r}for(const s of B)if(!n(this.values[s],e.values[s]))return!1;return!0}}const re="Invalid Interval";function Nr(t,e){return!t||!t.isValid?S.invalid("missing or invalid start"):!e||!e.isValid?S.invalid("missing or invalid end"):e<t?S.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class S{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new D("need to specify a reason the Interval is invalid");const s=e instanceof L?e:new L(e,n);if(p.throwOnInvalid)throw new Bn(s);return new S({invalid:s})}static fromDateTimes(e,n){const s=ge(e),r=ge(n),i=Nr(s,r);return i??new S({start:s,end:r})}static after(e,n){const s=w.fromDurationLike(n),r=ge(e);return S.fromDateTimes(r,r.plus(s))}static before(e,n){const s=w.fromDurationLike(n),r=ge(e);return S.fromDateTimes(r.minus(s),r)}static fromISO(e,n){const[s,r]=(e||"").split("/",2);if(s&&r){let i,a;try{i=y.fromISO(s,n),a=i.isValid}catch{a=!1}let o,l;try{o=y.fromISO(r,n),l=o.isValid}catch{l=!1}if(a&&l)return S.fromDateTimes(i,o);if(a){const c=w.fromISO(r,n);if(c.isValid)return S.after(i,c)}else if(l){const c=w.fromISO(s,n);if(c.isValid)return S.before(o,c)}}return S.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",n){if(!this.isValid)return NaN;const s=this.start.startOf(e,n);let r;return n!=null&&n.useLocaleWeeks?r=this.end.reconfigure({locale:s.locale}):r=this.end,r=r.startOf(e,n),Math.floor(r.diff(s,e).get(e))+(r.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:n}={}){return this.isValid?S.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(ge).filter(a=>this.contains(a)).sort((a,o)=>a.toMillis()-o.toMillis()),s=[];let{s:r}=this,i=0;for(;r<this.e;){const a=n[i]||this.e,o=+a>+this.e?this.e:a;s.push(S.fromDateTimes(r,o)),r=o,i+=1}return s}splitBy(e){const n=w.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s}=this,r=1,i;const a=[];for(;s<this.e;){const o=this.start.plus(n.mapUnits(l=>l*r));i=+o>+this.e?this.e:o,a.push(S.fromDateTimes(s,i)),s=i,r+=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 n=this.s>e.s?this.s:e.s,s=this.e<e.e?this.e:e.e;return n>=s?null:S.fromDateTimes(n,s)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,s=this.e>e.e?this.e:e.e;return S.fromDateTimes(n,s)}static merge(e){const[n,s]=e.sort((r,i)=>r.s-i.s).reduce(([r,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[r,i.union(a)]:[r.concat([i]),a]:[r,a],[[],null]);return s&&n.push(s),n}static xor(e){let n=null,s=0;const r=[],i=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...i),o=a.sort((l,c)=>l.time-c.time);for(const l of o)s+=l.type==="s"?1:-1,s===1?n=l.time:(n&&+n!=+l.time&&r.push(S.fromDateTimes(n,l.time)),n=null);return S.merge(r)}difference(...e){return S.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:re}[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=Te,n={}){return this.isValid?I.create(this.s.loc.clone(n),e).formatInterval(this):re}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:re}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:re}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:re}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:re}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):w.invalid(this.invalidReason)}mapEndpoints(e){return S.fromDateTimes(e(this.s),e(this.e))}}class xe{static hasDST(e=p.defaultZone){const n=y.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return Z.isValidZone(e)}static normalizeZone(e){return z(e,p.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||k.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||k.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||k.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||k.create(n,s,i)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||k.create(n,s,i)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null}={}){return(r||k.create(n,s,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null}={}){return(r||k.create(n,s,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return k.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return k.create(n,null,"gregory").eras(e)}static features(){return{relative:Kt(),localeWeek:Xt()}}}function Dn(t,e){const n=r=>r.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=n(e)-n(t);return Math.floor(w.fromMillis(s).as("days"))}function Or(t,e,n){const s=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const f=Dn(l,c);return(f-f%7)/7}],["days",Dn]],r={},i=t;let a,o;for(const[l,c]of s)n.indexOf(l)>=0&&(a=l,r[l]=c(t,e),o=i.plus(r),o>e?(r[l]--,t=i.plus(r),t>e&&(o=t,r[l]--,t=i.plus(r))):t=o);return[t,r,o,a]}function Dr(t,e,n,s){let[r,i,a,o]=Or(t,e,n);const l=e-r,c=n.filter(g=>["hours","minutes","seconds","milliseconds"].indexOf(g)>=0);c.length===0&&(a<e&&(a=r.plus({[o]:1})),a!==r&&(i[o]=(i[o]||0)+l/(a-r)));const f=w.fromObject(i,s);return c.length>0?w.fromMillis(l,s).shiftTo(...c).plus(f):f}const Ir="missing Intl.DateTimeFormat.formatToParts support";function E(t,e=n=>n){return{regex:t,deser:([n])=>e(gs(n))}}const In="[ ]",bn=new RegExp(In,"g");function br(t){return t.replace(/\./g,"\\.?").replace(bn,In)}function Mn(t){return t.replace(/\./g,"").replace(bn," ").toLowerCase()}function A(t,e){return t===null?null:{regex:RegExp(t.map(br).join("|")),deser:([n])=>t.findIndex(s=>Mn(n)===Mn(s))+e}}function Vn(t,e){return{regex:t,deser:([,n,s])=>be(n,s),groups:e}}function Ce(t){return{regex:t,deser:([e])=>e}}function Mr(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Vr(t,e){const n=v(e),s=v(e,"{2}"),r=v(e,"{3}"),i=v(e,"{4}"),a=v(e,"{6}"),o=v(e,"{1,2}"),l=v(e,"{1,3}"),c=v(e,"{1,6}"),f=v(e,"{1,9}"),g=v(e,"{2,4}"),T=v(e,"{4,6}"),h=$=>({regex:RegExp(Mr($.val)),deser:([ae])=>ae,literal:!0}),W=($=>{if(t.literal)return h($);switch($.val){case"G":return A(e.eras("short"),0);case"GG":return A(e.eras("long"),0);case"y":return E(c);case"yy":return E(g,tt);case"yyyy":return E(i);case"yyyyy":return E(T);case"yyyyyy":return E(a);case"M":return E(o);case"MM":return E(s);case"MMM":return A(e.months("short",!0),1);case"MMMM":return A(e.months("long",!0),1);case"L":return E(o);case"LL":return E(s);case"LLL":return A(e.months("short",!1),1);case"LLLL":return A(e.months("long",!1),1);case"d":return E(o);case"dd":return E(s);case"o":return E(l);case"ooo":return E(r);case"HH":return E(s);case"H":return E(o);case"hh":return E(s);case"h":return E(o);case"mm":return E(s);case"m":return E(o);case"q":return E(o);case"qq":return E(s);case"s":return E(o);case"ss":return E(s);case"S":return E(l);case"SSS":return E(r);case"u":return Ce(f);case"uu":return Ce(o);case"uuu":return E(n);case"a":return A(e.meridiems(),0);case"kkkk":return E(i);case"kk":return E(g,tt);case"W":return E(o);case"WW":return E(s);case"E":case"c":return E(n);case"EEE":return A(e.weekdays("short",!1),1);case"EEEE":return A(e.weekdays("long",!1),1);case"ccc":return A(e.weekdays("short",!0),1);case"cccc":return A(e.weekdays("long",!0),1);case"Z":case"ZZ":return Vn(new RegExp(`([+-]${o.source})(?::(${s.source}))?`),2);case"ZZZ":return Vn(new RegExp(`([+-]${o.source})(${s.source})?`),2);case"z":return Ce(/[a-z_+-/]{1,256}?/i);case" ":return Ce(/[^\S\n\r]/);default:return h($)}})(t)||{invalidReason:Ir};return W.token=t,W}const xr={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 Cr(t,e,n){const{type:s,value:r}=t;if(s==="literal"){const l=/^\s+$/.test(r);return{literal:!l,val:l?" ":r}}const i=e[s];let a=s;s==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let o=xr[a];if(typeof o=="object"&&(o=o[i]),o)return{literal:!1,val:o}}function Fr(t){return[`^${t.map(n=>n.regex).reduce((n,s)=>`${n}(${s.source})`,"")}$`,t]}function vr(t,e,n){const s=t.match(e);if(s){const r={};let i=1;for(const a in n)if(j(n,a)){const o=n[a],l=o.groups?o.groups+1:1;!o.literal&&o.token&&(r[o.token.val[0]]=o.deser(s.slice(i,i+l))),i+=l}return[s,r]}else return[s,{}]}function Lr(t){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 n=null,s;return m(t.z)||(n=Z.create(t.z)),m(t.Z)||(n||(n=new b(t.Z)),s=t.Z),m(t.q)||(t.M=(t.q-1)*3+1),m(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),m(t.u)||(t.S=Xe(t.u)),[Object.keys(t).reduce((i,a)=>{const o=e(a);return o&&(i[o]=t[a]),i},{}),n,s]}let it=null;function Ar(){return it||(it=y.fromMillis(1555555555555)),it}function Wr(t,e){if(t.literal)return t;const n=I.macroTokenToFormatOpts(t.val),s=vn(n,e);return s==null||s.includes(void 0)?t:s}function xn(t,e){return Array.prototype.concat(...t.map(n=>Wr(n,e)))}class Cn{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=xn(I.parseFormat(n),e),this.units=this.tokens.map(s=>Vr(s,e)),this.disqualifyingUnit=this.units.find(s=>s.invalidReason),!this.disqualifyingUnit){const[s,r]=Fr(this.units);this.regex=RegExp(s,"i"),this.handlers=r}}explainFromTokens(e){if(this.isValid){const[n,s]=vr(e,this.regex,this.handlers),[r,i,a]=s?Lr(s):[null,null,void 0];if(j(s,"a")&&j(s,"H"))throw new J("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:s,result:r,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 Fn(t,e,n){return new Cn(t,n).explainFromTokens(e)}function $r(t,e,n){const{result:s,zone:r,specificOffset:i,invalidReason:a}=Fn(t,e,n);return[s,r,i,a]}function vn(t,e){if(!t)return null;const s=I.create(e,t).dtFormatter(Ar()),r=s.formatToParts(),i=s.resolvedOptions();return r.map(a=>Cr(a,t,i))}const at="Invalid DateTime",Ln=864e13;function me(t){return new L("unsupported zone",`the zone "${t.name}" is not supported`)}function ot(t){return t.weekData===null&&(t.weekData=Ne(t.c)),t.weekData}function lt(t){return t.localWeekData===null&&(t.localWeekData=Ne(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function G(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new y({...n,...e,old:n})}function An(t,e,n){let s=t-e*60*1e3;const r=n.offset(s);if(e===r)return[s,e];s-=(r-e)*60*1e3;const i=n.offset(s);return r===i?[s,r]:[t-Math.min(r,i)*60*1e3,Math.max(r,i)]}function Fe(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function ve(t,e,n){return An(Ie(t),e,n)}function Wn(t,e){const n=t.o,s=t.c.year+Math.trunc(e.years),r=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...t.c,year:s,month:r,day:Math.min(t.c.day,De(s,r))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=w.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=Ie(i);let[l,c]=An(o,n,t.zone);return a!==0&&(l+=a,c=t.zone.offset(l)),{ts:l,o:c}}function ie(t,e,n,s,r,i){const{setZone:a,zone:o}=n;if(t&&Object.keys(t).length!==0||e){const l=e||o,c=y.fromObject(t,{...n,zone:l,specificOffset:i});return a?c:c.setZone(o)}else return y.invalid(new L("unparsable",`the input "${r}" can't be parsed as ${s}`))}function Le(t,e,n=!0){return t.isValid?I.create(k.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function ut(t,e,n){const s=t.c.year>9999||t.c.year<0;let r="";if(s&&t.c.year>=0&&(r+="+"),r+=N(t.c.year,s?6:4),n==="year")return r;if(e){if(r+="-",r+=N(t.c.month),n==="month")return r;r+="-"}else if(r+=N(t.c.month),n==="month")return r;return r+=N(t.c.day),r}function $n(t,e,n,s,r,i,a){let o=!n||t.c.millisecond!==0||t.c.second!==0,l="";switch(a){case"day":case"month":case"year":break;default:if(l+=N(t.c.hour),a==="hour")break;if(e){if(l+=":",l+=N(t.c.minute),a==="minute")break;o&&(l+=":",l+=N(t.c.second))}else{if(l+=N(t.c.minute),a==="minute")break;o&&(l+=N(t.c.second))}if(a==="second")break;o&&(!s||t.c.millisecond!==0)&&(l+=".",l+=N(t.c.millisecond,3))}return r&&(t.isOffsetFixed&&t.offset===0&&!i?l+="Z":t.o<0?(l+="-",l+=N(Math.trunc(-t.o/60)),l+=":",l+=N(Math.trunc(-t.o%60))):(l+="+",l+=N(Math.trunc(t.o/60)),l+=":",l+=N(Math.trunc(t.o%60)))),i&&(l+="["+t.zone.ianaName+"]"),l}const Zn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Zr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Rr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ae=["year","month","day","hour","minute","second","millisecond"],Ur=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],_r=["year","ordinal","hour","minute","second","millisecond"];function We(t){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"}[t.toLowerCase()];if(!e)throw new dt(t);return e}function Rn(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return We(t)}}function zr(t){if(ye===void 0&&(ye=p.now()),t.type!=="iana")return t.offset(ye);const e=t.name;let n=ct.get(e);return n===void 0&&(n=t.offset(ye),ct.set(e,n)),n}function Un(t,e){const n=z(e.zone,p.defaultZone);if(!n.isValid)return y.invalid(me(n));const s=k.fromObject(e);let r,i;if(m(t.year))r=p.now();else{for(const l of Ae)m(t[l])&&(t[l]=Zn[l]);const a=jt(t)||Qt(t);if(a)return y.invalid(a);const o=zr(n);[r,i]=ve(t,o,n)}return new y({ts:r,zone:n,loc:s,o:i})}function _n(t,e,n){const s=m(n.round)?!0:n.round,r=m(n.rounding)?"trunc":n.rounding,i=(o,l)=>(o=et(o,s||n.calendary?0:2,n.calendary?"round":r),e.loc.clone(n).relFormatter(n).format(o,l)),a=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return i(a(n.unit),n.unit);for(const o of n.units){const l=a(o);if(Math.abs(l)>=1)return i(l,o)}return i(t>e?-0:0,n.units[n.units.length-1])}function zn(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}let ye;const ct=new Map;class y{constructor(e){const n=e.zone||p.defaultZone;let s=e.invalid||(Number.isNaN(e.ts)?new L("invalid input"):null)||(n.isValid?null:me(n));this.ts=m(e.ts)?p.now():e.ts;let r=null,i=null;if(!s)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[r,i]=[e.old.c,e.old.o];else{const o=q(e.o)&&!e.old?e.o:n.offset(this.ts);r=Fe(this.ts,o),s=Number.isNaN(r.year)?new L("invalid input"):null,r=s?null:r,i=s?null:o}this._zone=n,this.loc=e.loc||k.create(),this.invalid=s,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new y({})}static local(){const[e,n]=zn(arguments),[s,r,i,a,o,l,c]=n;return Un({year:s,month:r,day:i,hour:a,minute:o,second:l,millisecond:c},e)}static utc(){const[e,n]=zn(arguments),[s,r,i,a,o,l,c]=n;return e.zone=b.utcInstance,Un({year:s,month:r,day:i,hour:a,minute:o,second:l,millisecond:c},e)}static fromJSDate(e,n={}){const s=ps(e)?e.valueOf():NaN;if(Number.isNaN(s))return y.invalid("invalid input");const r=z(n.zone,p.defaultZone);return r.isValid?new y({ts:s,zone:r,loc:k.fromObject(n)}):y.invalid(me(r))}static fromMillis(e,n={}){if(q(e))return e<-Ln||e>Ln?y.invalid("Timestamp out of range"):new y({ts:e,zone:z(n.zone,p.defaultZone),loc:k.fromObject(n)});throw new D(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(q(e))return new y({ts:e*1e3,zone:z(n.zone,p.defaultZone),loc:k.fromObject(n)});throw new D("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const s=z(n.zone,p.defaultZone);if(!s.isValid)return y.invalid(me(s));const r=k.fromObject(n),i=Me(e,Rn),{minDaysInFirstWeek:a,startOfWeek:o}=Jt(i,r),l=p.now(),c=m(n.specificOffset)?s.offset(l):n.specificOffset,f=!m(i.ordinal),g=!m(i.year),T=!m(i.month)||!m(i.day),h=g||T,O=i.weekYear||i.weekNumber;if((h||f)&&O)throw new J("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(T&&f)throw new J("Can't mix ordinal dates with month/day");const W=O||i.weekday&&!h;let $,ae,we=Fe(l,c);W?($=Ur,ae=Zr,we=Ne(we,a,o)):f?($=_r,ae=Rr,we=Qe(we)):($=Ae,ae=Zn);let Yn=!1;for(const ke of $){const wi=i[ke];m(wi)?Yn?i[ke]=ae[ke]:i[ke]=we[ke]:Yn=!0}const hi=W?Es(i,a,o):f?ks(i):jt(i),Hn=hi||Qt(i);if(Hn)return y.invalid(Hn);const mi=W?Bt(i,a,o):f?Gt(i):i,[yi,gi]=ve(mi,c,s),Ee=new y({ts:yi,zone:s,o:gi,loc:r});return i.weekday&&h&&e.weekday!==Ee.weekday?y.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${Ee.toISO()}`):Ee.isValid?Ee:y.invalid(Ee.invalid)}static fromISO(e,n={}){const[s,r]=cr(e);return ie(s,r,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[s,r]=dr(e);return ie(s,r,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[s,r]=fr(e);return ie(s,r,n,"HTTP",n)}static fromFormat(e,n,s={}){if(m(e)||m(n))throw new D("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=s,a=k.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[o,l,c,f]=$r(a,e,n);return f?y.invalid(f):ie(o,l,s,`format ${n}`,e,c)}static fromString(e,n,s={}){return y.fromFormat(e,n,s)}static fromSQL(e,n={}){const[s,r]=kr(e);return ie(s,r,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new D("need to specify a reason the DateTime is invalid");const s=e instanceof L?e:new L(e,n);if(p.throwOnInvalid)throw new Pn(s);return new y({invalid:s})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const s=vn(e,k.fromObject(n));return s?s.map(r=>r?r.val:null).join(""):null}static expandFormat(e,n={}){return xn(I.parseFormat(e),k.fromObject(n)).map(r=>r.val).join("")}static resetCache(){ye=void 0,ct.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?lt(this).weekday:NaN}get localWeekNumber(){return this.isValid?lt(this).weekNumber:NaN}get localWeekYear(){return this.isValid?lt(this).weekYear:NaN}get ordinal(){return this.isValid?Qe(this.c).ordinal:NaN}get monthShort(){return this.isValid?xe.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?xe.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?xe.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?xe.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,n=6e4,s=Ie(this.c),r=this.zone.offset(s-e),i=this.zone.offset(s+e),a=this.zone.offset(s-r*n),o=this.zone.offset(s-i*n);if(a===o)return[this];const l=s-a*n,c=s-o*n,f=Fe(l,a),g=Fe(c,o);return f.hour===g.hour&&f.minute===g.minute&&f.second===g.second&&f.millisecond===g.millisecond?[G(this,{ts:l}),G(this,{ts:c})]:[this]}get isInLeapYear(){return ue(this.year)}get daysInMonth(){return De(this.year,this.month)}get daysInYear(){return this.isValid?Q(this.year):NaN}get weeksInWeekYear(){return this.isValid?ce(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ce(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:s,calendar:r}=I.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:s,outputCalendar:r}}toUTC(e=0,n={}){return this.setZone(b.instance(e),n)}toLocal(){return this.setZone(p.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:s=!1}={}){if(e=z(e,p.defaultZone),e.equals(this.zone))return this;if(e.isValid){let r=this.ts;if(n||s){const i=e.offset(this.ts),a=this.toObject();[r]=ve(a,i,e)}return G(this,{ts:r,zone:e})}else return y.invalid(me(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:s}={}){const r=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:s});return G(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=Me(e,Rn),{minDaysInFirstWeek:s,startOfWeek:r}=Jt(n,this.loc),i=!m(n.weekYear)||!m(n.weekNumber)||!m(n.weekday),a=!m(n.ordinal),o=!m(n.year),l=!m(n.month)||!m(n.day),c=o||l,f=n.weekYear||n.weekNumber;if((c||a)&&f)throw new J("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new J("Can't mix ordinal dates with month/day");let g;i?g=Bt({...Ne(this.c,s,r),...n},s,r):m(n.ordinal)?(g={...this.toObject(),...n},m(n.day)&&(g.day=Math.min(De(g.year,g.month),g.day))):g=Gt({...Qe(this.c),...n});const[T,h]=ve(g,this.o,this.zone);return G(this,{ts:T,o:h})}plus(e){if(!this.isValid)return this;const n=w.fromDurationLike(e);return G(this,Wn(this,n))}minus(e){if(!this.isValid)return this;const n=w.fromDurationLike(e).negate();return G(this,Wn(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const s={},r=w.normalizeUnit(e);switch(r){case"years":s.month=1;case"quarters":case"months":s.day=1;case"weeks":case"days":s.hour=0;case"hours":s.minute=0;case"minutes":s.second=0;case"seconds":s.millisecond=0;break}if(r==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(s.weekNumber=this.weekNumber-1),s.weekday=i}else s.weekday=1;if(r==="quarters"){const i=Math.ceil(this.month/3);s.month=(i-1)*3+1}return this.set(s)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?I.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):at}toLocaleString(e=Te,n={}){return this.isValid?I.create(this.loc.clone(n),e).formatDateTime(this):at}toLocaleParts(e={}){return this.isValid?I.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:s=!1,includeOffset:r=!0,extendedZone:i=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;a=We(a);const o=e==="extended";let l=ut(this,o,a);return Ae.indexOf(a)>=3&&(l+="T"),l+=$n(this,o,n,s,r,i,a),l}toISODate({format:e="extended",precision:n="day"}={}){return this.isValid?ut(this,e==="extended",We(n)):null}toISOWeekDate(){return Le(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:s=!0,includePrefix:r=!1,extendedZone:i=!1,format:a="extended",precision:o="milliseconds"}={}){return this.isValid?(o=We(o),(r&&Ae.indexOf(o)>=3?"T":"")+$n(this,a==="extended",n,e,s,i,o)):null}toRFC2822(){return Le(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Le(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ut(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:s=!0}={}){let r="HH:mm:ss.SSS";return(n||e)&&(s&&(r+=" "),n?r+="z":e&&(r+="ZZ")),Le(this,r,!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 n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",s={}){if(!this.isValid||!e.isValid)return w.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...s},i=Ss(n).map(w.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,l=a?e:this,c=Dr(o,l,i,r);return a?c.negate():c}diffNow(e="milliseconds",n={}){return this.diff(y.now(),e,n)}until(e){return this.isValid?S.fromDateTimes(this,e):this}hasSame(e,n,s){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(n,s)<=r&&r<=i.endOf(n,s)}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 n=e.base||y.fromObject({},{zone:this.zone}),s=e.padding?this<n?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),_n(n,this.plus(s),{...e,numeric:"always",units:r,unit:i})}toRelativeCalendar(e={}){return this.isValid?_n(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 D("min requires all arguments be DateTimes");return en(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(y.isDateTime))throw new D("max requires all arguments be DateTimes");return en(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,s={}){const{locale:r=null,numberingSystem:i=null}=s,a=k.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return Fn(a,e,n)}static fromStringExplain(e,n,s={}){return y.fromFormatExplain(e,n,s)}static buildFormatParser(e,n={}){const{locale:s=null,numberingSystem:r=null}=n,i=k.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0});return new Cn(i,e)}static fromFormatParser(e,n,s={}){if(m(e)||m(n))throw new D("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=s,a=k.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!a.equals(n.locale))throw new D(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`);const{result:o,zone:l,specificOffset:c,invalidReason:f}=n.explainFromTokens(e);return f?y.invalid(f):ie(o,l,s,`format ${n.format}`,e,c)}static get DATE_SHORT(){return Te}static get DATE_MED(){return ft}static get DATE_MED_WITH_WEEKDAY(){return Jn}static get DATE_FULL(){return ht}static get DATE_HUGE(){return mt}static get TIME_SIMPLE(){return yt}static get TIME_WITH_SECONDS(){return gt}static get TIME_WITH_SHORT_OFFSET(){return wt}static get TIME_WITH_LONG_OFFSET(){return Et}static get TIME_24_SIMPLE(){return kt}static get TIME_24_WITH_SECONDS(){return Tt}static get TIME_24_WITH_SHORT_OFFSET(){return pt}static get TIME_24_WITH_LONG_OFFSET(){return St}static get DATETIME_SHORT(){return Nt}static get DATETIME_SHORT_WITH_SECONDS(){return Ot}static get DATETIME_MED(){return Dt}static get DATETIME_MED_WITH_SECONDS(){return It}static get DATETIME_MED_WITH_WEEKDAY(){return jn}static get DATETIME_FULL(){return bt}static get DATETIME_FULL_WITH_SECONDS(){return Mt}static get DATETIME_HUGE(){return Vt}static get DATETIME_HUGE_WITH_SECONDS(){return xt}}function ge(t){if(y.isDateTime(t))return t;if(t&&t.valueOf&&q(t.valueOf()))return y.fromJSDate(t);if(t&&typeof t=="object")return y.fromObject(t);throw new D(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const qr=(t,e)=>{const n=t.__vccOpts||t;for(const[s,r]of e)n[s]=r;return n},Yr={name:"Subscriptions",data(){return{events:[],subscribedEvents:[],entities:{list:[],total:0},autoRefresh:!0,auth_connector:""}},computed:{},methods:{formatDate(t){return t?y.fromISO(t).toFormat("dd.MM HH:mm:ss"):""},pause(t){return new Promise(e=>setTimeout(e,t))},async eventsList(){console.log("Запускаем eventsList");try{let t=await $b24.callMethod("events",{});this.events=t.getData().result}catch(t){console.error("Ошибка при получении списка событий:",t)}},async subscribeToEvents(t){try{await $b24.callMethod("event.bind",{event:t,event_type:"offline",auth_connector:this.auth_connector}),console.log(`Подписались на событие ${t}.`)}catch(e){console.error("Ошибка при подписке на события:",e)}await this.pause(1e3),await this.getSubscribedEvents()},async getSubscribedEvents(){try{let t=await $b24.callMethod("event.get",{});this.subscribedEvents=t.getData().result,console.log("Подписанные события:",this.subscribedEvents)}catch(t){console.error("Ошибка при получении подписанных событий:",t)}},async unbindSubscribedEvents(t){try{await $b24.callMethod("event.unbind",{event:t.event,event_type:t.offline==1?"offline":"online",auth_connector:t.connector_id}),await this.pause(1e3),await this.getSubscribedEvents()}catch(e){console.error("Ошибка при отписке от событий:",e)}},async loadOfflineEntitiesList(){let e=await $b24.callListMethod("event.offline.list",{start:0,auth_connector:this.auth_connector});this.entities.list=e.getData(),this.entities.total=e.getData().length},async deleteOfflineEntities(t){let e=await $b24.callMethod("event.offline.clear",{process_id:t.PROCESS_ID,id:[t.ID],auth_connector:this.auth_connector});console.log("Удалили сущности из оффлан событий:",e.getData()),await this.pause(1e3),await this.loadOfflineEntitiesList()},async deleteOfflineEntitiesAll(){if(!confirm("Вы уверены, что хотите удалить все НЕ обработанные сущности? Это действие необратимо!"))return;let t=this.entities.total/50+1;console.log("Всего страниц для удаления:",t);for(let e=1;e<=t;e++){let s=(await $b24.callMethod("event.offline.list",{start:0})).getData().result.map(a=>a.PROCESS_ID).filter(a=>a);console.log("PROCESS_ID для удаления:",s);let r={};s.forEach((a,o)=>{r[`clear_${o}`]={method:"event.offline.clear",params:{process_id:a}}}),console.log("batchCommands:",r);let i=await $b24.callBatch(r);console.log("Результат batch удаления сущностей:",i.getData())}await this.pause(500),await this.loadOfflineEntitiesList()},async deleteOfflineEntitiesAllEmpty(){if(!confirm("Вы уверены, что хотите удалить все пустые НЕ обработанные сущности? Это действие необратимо!"))return;let t=await $b24.callMethod("event.offline.clear",{process_id:""});console.log("Результат удаления сущностей с пустым PROCESS_ID:",t.getData())},isSubscribed(t){return this.subscribedEvents.some(e=>e.event==t)},autoRefreshEntities(){this.autoRefresh&&setTimeout(async()=>{await this.loadOfflineEntitiesList(),this.autoRefreshEntities()},3e3)},async entityUpdate(t){var n,s,r,i,a,o,l;let e=!1;console.log("Запущена функция entityUpdate для изменения сущности с ID:",(n=t.EVENT_DATA.FIELDS)==null?void 0:n.ID);try{if((s=t.EVENT_DATA.FIELDS)!=null&&s.ENTITY_TYPE_ID&&((r=t.EVENT_DATA.FIELDS)==null?void 0:r.ENTITY_TYPE_ID)>0){let c=await $b24.callMethod("crm.item.get",{entityTypeId:t.EVENT_DATA.FIELDS.ENTITY_TYPE_ID,id:t.EVENT_DATA.FIELDS.ID});if(c=c.getData().result.item,console.log("Данные смарт процесса до изменения:",c),c.id==((i=t.EVENT_DATA.FIELDS)==null?void 0:i.ID)){let f=await $b24.callMethod("crm.item.update",{entityTypeId:t.EVENT_DATA.FIELDS.ENTITY_TYPE_ID,id:t.EVENT_DATA.FIELDS.ID,fields:{title:c.title+"123"}});console.log("Результат обновления смарт процесса:",f.getData()),f.id===c.id?(console.log("Сущность успешно обновлена."),e=!0):(console.error("Ошибка при обновлении сущности."),e=!0)}else e=!0}else{let c=await $b24.callMethod("crm.deal.get",{id:(a=t.EVENT_DATA.FIELDS)==null?void 0:a.ID});if(c=c.getData().result,console.log("Данные сделки до изменения:",c),c.ID==((o=t.EVENT_DATA.FIELDS)==null?void 0:o.ID)){let f=await $b24.callMethod("crm.deal.update",{id:(l=t.EVENT_DATA.FIELDS)==null?void 0:l.ID,fields:{TITLE:c.TITLE}});console.log("Результат обновления сделки:",f.getData()),f=f.getData().result,f===!0?console.log("Сущность успешно обновлена."):(console.error("Ошибка при обновлении сущности."),e=!0)}else e=!0}}catch(c){console.error("Ошибка при обновлении сущности:",c),c=!0}e||await this.deleteOfflineEntities(t)}},watch:{},mounted(){this.getSubscribedEvents(),this.eventsList(),this.loadOfflineEntitiesList(),this.autoRefreshEntities()}},Hr={class:"Subscriptions"},Pr={key:0},Br=["disabled"],Gr={class:"switch tooltipParent",style:{top:"12px"}},Jr={key:0},jr={key:0,class:"main"},Qr=["onClick"],Kr=["onClick"],Xr=["href"],ei={class:"tooltipParent",style:{}},ti={class:"tooltip"},ni={key:1},si={key:1},ri={key:0,class:"main"},ii=["onClick"],ai={key:1},oi={key:0,class:"main"},li=["onClick","disabled"],ui={key:1},ci={key:2};function di(t,e,n,s,r,i){return u.openBlock(),u.createElementBlock("div",Hr,[e[15]||(e[15]=u.createElementVNode("h1",null,"Страница подписок",-1)),u.createElementVNode("button",{onClick:e[0]||(e[0]=a=>t.selectTab("tab1"))},"Сущности"),u.createElementVNode("button",{onClick:e[1]||(e[1]=a=>t.selectTab("tab2"))},"События"),e[16]||(e[16]=u.createElementVNode("br",null,null,-1)),e[17]||(e[17]=u.createElementVNode("br",null,null,-1)),e[18]||(e[18]=u.createElementVNode("br",null,null,-1)),t.tabs.tab1?(u.openBlock(),u.createElementBlock("div",Pr,[u.createElementVNode("div",null,[u.createElementVNode("button",{onClick:e[2]||(e[2]=(...a)=>i.loadOfflineEntitiesList&&i.loadOfflineEntitiesList(...a)),disabled:t.loading},"Обновить",8,Br),u.createElementVNode("label",Gr,[u.withDirectives(u.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=a=>r.autoRefresh=a),onChange:e[4]||(e[4]=(...a)=>i.autoRefreshEntities&&i.autoRefreshEntities(...a))},null,544),[[u.vModelCheckbox,r.autoRefresh]]),e[7]||(e[7]=u.createElementVNode("span",{class:"slider"},null,-1)),e[8]||(e[8]=u.createElementVNode("span",{class:"tooltip"},"Автообновление каждые 3 секунды",-1))])]),r.entities.list.length>0?(u.openBlock(),u.createElementBlock("div",Jr,[u.createElementVNode("p",null,[u.createElementVNode("button",{onClick:e[5]||(e[5]=(...a)=>i.deleteOfflineEntitiesAll&&i.deleteOfflineEntitiesAll(...a))},"Удалить все"),u.createElementVNode("button",{onClick:e[6]||(e[6]=(...a)=>i.deleteOfflineEntitiesAllEmpty&&i.deleteOfflineEntitiesAllEmpty(...a))},"Удалить все пустые"),u.createTextVNode(" Всего измененных сущностей "+u.toDisplayString(r.entities.total),1)]),r.entities.list.length?(u.openBlock(),u.createElementBlock("table",jr,[e[10]||(e[10]=u.createElementVNode("thead",null,[u.createElementVNode("tr",null,[u.createElementVNode("th",null,"#"),u.createElementVNode("th",null,"Удалить"),u.createElementVNode("th",null,"Обновить"),u.createElementVNode("th",null,"Дата"),u.createElementVNode("th",null,"PROCESS_ID"),u.createElementVNode("th",null,"EVENT_NAME"),u.createElementVNode("th",null,"Ссылка"),u.createElementVNode("th",null,"EVENT_DATA"),u.createElementVNode("th",null,"who_update"),u.createElementVNode("th",null,"entity")])],-1)),u.createElementVNode("tbody",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.entities.list,(a,o)=>{var l,c,f,g;return u.openBlock(),u.createElementBlock("tr",{key:a.PROCESS_ID+"-"+a.ID},[u.createElementVNode("td",null,u.toDisplayString(o+1),1),u.createElementVNode("td",null,[u.createElementVNode("button",{onClick:T=>i.deleteOfflineEntities(a)},"Удалить",8,Qr)]),u.createElementVNode("td",null,[(l=a.EVENT_DATA.FIELDS)!=null&&l.ID&&(a.EVENT_NAME=="ONCRMDEALUPDATE"||a.EVENT_NAME.includes("ONCRMDYNAMICITEMUPDATE_"))?(u.openBlock(),u.createElementBlock("button",{key:0,onClick:T=>i.entityUpdate(a)},"Изменить",8,Kr)):u.createCommentVNode("",!0)]),u.createElementVNode("td",null,u.toDisplayString(i.formatDate(a.TIMESTAMP_X)),1),u.createElementVNode("td",null,u.toDisplayString(a.PROCESS_ID),1),u.createElementVNode("td",null,u.toDisplayString(a.EVENT_NAME),1),u.createElementVNode("td",null,[(c=a.EVENT_DATA.FIELDS)!=null&&c.ID&&a.EVENT_NAME=="ONCRMDEALUPDATE"?(u.openBlock(),u.createElementBlock("a",{key:0,href:"https://repacheb.bitrix24.ru/crm/deal/details/"+((f=a.EVENT_DATA.FIELDS)==null?void 0:f.ID)+"/",target:"_blank",rel:"noopener noreferrer"},u.toDisplayString((g=a.EVENT_DATA.FIELDS)==null?void 0:g.ID),9,Xr)):u.createCommentVNode("",!0)]),u.createElementVNode("td",null,u.toDisplayString(a.EVENT_DATA),1),u.createElementVNode("td",null,u.toDisplayString(a.EVENT_ADDITIONAL.user_id),1),u.createElementVNode("td",ei,[e[9]||(e[9]=u.createElementVNode("span",null,"Подробней",-1)),u.createElementVNode("span",ti,u.toDisplayString(a),1)])])}),128))])])):u.createCommentVNode("",!0)])):(u.openBlock(),u.createElementBlock("div",ni,"Список сущностей пуст."))])):u.createCommentVNode("",!0),t.tabs.tab2?(u.openBlock(),u.createElementBlock("div",si,[u.createElementVNode("div",null,[e[12]||(e[12]=u.createElementVNode("h3",null,"Подписаны на события:",-1)),r.subscribedEvents.length?(u.openBlock(),u.createElementBlock("table",ri,[e[11]||(e[11]=u.createElementVNode("thead",null,[u.createElementVNode("tr",null,[u.createElementVNode("th",null,"Событие"),u.createElementVNode("th",null,"connector_id"),u.createElementVNode("th",null,"offline"),u.createElementVNode("th",null,"Отписаться")])],-1)),u.createElementVNode("tbody",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.subscribedEvents,a=>(u.openBlock(),u.createElementBlock("tr",{key:a.id},[u.createElementVNode("td",null,u.toDisplayString(a.event),1),u.createElementVNode("td",null,u.toDisplayString(a.connector_id),1),u.createElementVNode("td",null,u.toDisplayString(a.offline),1),u.createElementVNode("td",null,[u.createElementVNode("button",{onClick:o=>i.unbindSubscribedEvents(a)},"Отписаться от событий",8,ii)])]))),128))])])):(u.openBlock(),u.createElementBlock("p",ai,"Подписок на события нет."))]),u.createElementVNode("div",null,[e[14]||(e[14]=u.createElementVNode("h3",null,"На какие события можно подписаться:",-1)),r.events.length?(u.openBlock(),u.createElementBlock("table",oi,[e[13]||(e[13]=u.createElementVNode("thead",null,[u.createElementVNode("tr",null,[u.createElementVNode("th",null,"Событие"),u.createElementVNode("th",null,"Подписаться")])],-1)),u.createElementVNode("tbody",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.events,a=>(u.openBlock(),u.createElementBlock("tr",{key:a},[u.createElementVNode("td",null,u.toDisplayString(a),1),u.createElementVNode("td",null,[u.createElementVNode("button",{onClick:o=>i.subscribeToEvents(a),disabled:i.isSubscribed(a),class:u.normalizeClass({"disabled-button":i.isSubscribed(a)})},"Подписаться",10,li)])]))),128))])])):(u.openBlock(),u.createElementBlock("p",ui,"Список событий пуст."))])])):u.createCommentVNode("",!0),t.tabs.tab3?(u.openBlock(),u.createElementBlock("div",ci)):u.createCommentVNode("",!0)])}const qn=qr(Yr,[["render",di]]),fi={install(t,e={}){t.component("Subscriptions",qn),e.b24&&(t.config.globalProperties.$b24=e.b24)}};U.Subscriptions=qn,U.default=fi,Object.defineProperties(U,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED