@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
1 lines • 68.9 kB
JavaScript
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6285],{96285:(e,t,n)=>{n.d(t,{c9:()=>dr,mQ:()=>re,oh:()=>U,bo:()=>Z});class r extends Error{}class s extends r{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class i extends r{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class a extends r{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class o extends r{}class u extends r{constructor(e){super(`Invalid unit ${e}`)}}class l extends r{}class c extends r{constructor(){super("Zone is an abstract class")}}const h="numeric",d="short",m="long",f={year:h,month:h,day:h},y={year:h,month:d,day:h},g={year:h,month:d,day:h,weekday:d},w={year:h,month:m,day:h},p={year:h,month:m,day:h,weekday:m},k={hour:h,minute:h},v={hour:h,minute:h,second:h},S={hour:h,minute:h,second:h,timeZoneName:d},T={hour:h,minute:h,second:h,timeZoneName:m},b={hour:h,minute:h,hourCycle:"h23"},O={hour:h,minute:h,second:h,hourCycle:"h23"},N={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:d},D={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:m},M={year:h,month:h,day:h,hour:h,minute:h},I={year:h,month:h,day:h,hour:h,minute:h,second:h},V={year:h,month:d,day:h,hour:h,minute:h},x={year:h,month:d,day:h,hour:h,minute:h,second:h},E={year:h,month:d,day:h,weekday:d,hour:h,minute:h},C={year:h,month:m,day:h,hour:h,minute:h,timeZoneName:d},F={year:h,month:m,day:h,hour:h,minute:h,second:h,timeZoneName:d},$={year:h,month:m,day:h,weekday:m,hour:h,minute:h,timeZoneName:m},W={year:h,month:m,day:h,weekday:m,hour:h,minute:h,second:h,timeZoneName:m};class Z{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}}let L=null;class z extends Z{static get instance(){return null===L&&(L=new z),L}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return nt(e,t,n)}formatOffset(e,t){return at(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let j={};const q={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let A={};class U extends Z{static create(e){return A[e]||(A[e]=new U(e)),A[e]}static resetCache(){A={},j={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=U.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return nt(e,t,n,this.name)}formatOffset(e,t){return at(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const n=(r=this.name,j[r]||(j[r]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),j[r]);var r;let[s,i,a,o,u,l,c]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const{type:t,value:s}=n[e],i=q[t];"era"===t?r[i]=s:We(i)||(r[i]=parseInt(s,10))}return r}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,i,a,o,u,l,c]=r;return[a,s,i,o,u,l,c]}(n,t);"BC"===o&&(s=1-Math.abs(s));let h=+t;const d=h%1e3;return h-=d>=0?d:1e3+d,(Ke({year:s,month:i,day:a,hour:24===u?0:u,minute:l,second:c,millisecond:0})-h)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let _={},Y={};function R(e,t={}){const n=JSON.stringify([e,t]);let r=Y[n];return r||(r=new Intl.DateTimeFormat(e,t),Y[n]=r),r}let H={},P={},J=null,G={};function B(e,t,n,r){const s=e.listingMode();return"error"===s?null:"en"===s?n(t):r(t)}class Q{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:s,...i}=n;if(!t||Object.keys(i).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=H[n];return r||(r=new Intl.NumberFormat(e,t),H[n]=r),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Ye(this.floor?Math.floor(e):Je(e,3),this.padTo)}}class K{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&U.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||r,this.dtf=R(t,s)}format(){return this.originalZone?this.formatToParts().map((({value:e})=>e)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map((e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e})):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class X{constructor(e,t,n){this.opts={style:"long",...n},!t&&ze()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,s=JSON.stringify([e,r]);let i=P[s];return i||(i=new Intl.RelativeTimeFormat(e,t),P[s]=i),i}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${s[e][0]}`;case-1:return n?"yesterday":`last ${s[e][0]}`;case 0:return n?"today":`this ${s[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),u=1===o,l=s[e],c=r?u?l[1]:l[2]||l[1]:u?s[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const ee={firstDay:1,minimalDays:4,weekend:[6,7]};class te{static fromOpts(e){return te.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,s=!1){const i=e||ke.defaultLocale,a=i||(s?"en-US":J||(J=(new Intl.DateTimeFormat).resolvedOptions().locale,J)),o=t||ke.defaultNumberingSystem,u=n||ke.defaultOutputCalendar,l=Ue(r)||ke.defaultWeekSettings;return new te(a,o,u,l,i)}static resetCache(){J=null,Y={},H={},P={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return te.create(e,t,n,r)}constructor(e,t,n,r,s){const[i,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=R(e).resolvedOptions(),r=e}catch(s){const i=e.substring(0,n);t=R(i).resolvedOptions(),r=i}const{numberingSystem:s,calendar:i}=t;return[r,s,i]}}(e);this.locale=i,this.numberingSystem=t||a||null,this.outputCalendar=n||o||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?te.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ue(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return B(this,e,ht,(()=>{const n=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";return this.monthsCache[r][e]||(this.monthsCache[r][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=dr.utc(2009,n,1);t.push(e(r))}return t}((e=>this.extract(e,n,"month")))),this.monthsCache[r][e]}))}weekdays(e,t=!1){return B(this,e,yt,(()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=dr.utc(2016,11,13+n);t.push(e(r))}return t}((e=>this.extract(e,n,"weekday")))),this.weekdaysCache[r][e]}))}meridiems(){return B(this,void 0,(()=>gt),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[dr.utc(2016,11,13,9),dr.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e){return B(this,e,vt,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[dr.utc(-40,1,1),dr.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===n));return r?r.value:null}numberFormatter(e={}){return new Q(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new K(e,this.intl,t)}relFormatter(e={}){return new X(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=_[n];return r||(r=new Intl.ListFormat(e,t),_[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:je()?function(e){let t=G[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,G[e]=t}return t}(this.locale):ee}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 ne=null;class re extends Z{static get utcInstance(){return null===ne&&(ne=new re(0)),ne}static instance(e){return 0===e?re.utcInstance:new re(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new re(rt(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${at(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${at(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return at(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class se extends Z{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 ie(e,t){if(We(e)||null===e)return t;if(e instanceof Z)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?z.instance:"utc"===n||"gmt"===n?re.utcInstance:re.parseSpecifier(n)||U.create(e)}return Ze(e)?re.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new se(e)}const ae={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},oe={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]},ue=ae.hanidec.replace(/[\[|\]]/g,"").split("");let le={};function ce({numberingSystem:e},t=""){const n=e||"latn";return le[n]||(le[n]={}),le[n][t]||(le[n][t]=new RegExp(`${ae[n]}${t}`)),le[n][t]}let he,de=()=>Date.now(),me="system",fe=null,ye=null,ge=null,we=60,pe=null;class ke{static get now(){return de}static set now(e){de=e}static set defaultZone(e){me=e}static get defaultZone(){return ie(me,z.instance)}static get defaultLocale(){return fe}static set defaultLocale(e){fe=e}static get defaultNumberingSystem(){return ye}static set defaultNumberingSystem(e){ye=e}static get defaultOutputCalendar(){return ge}static set defaultOutputCalendar(e){ge=e}static get defaultWeekSettings(){return pe}static set defaultWeekSettings(e){pe=Ue(e)}static get twoDigitCutoffYear(){return we}static set twoDigitCutoffYear(e){we=e%100}static get throwOnInvalid(){return he}static set throwOnInvalid(e){he=e}static resetCaches(){te.resetCache(),U.resetCache(),dr.resetCache(),le={}}}class ve{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Se=[0,31,59,90,120,151,181,212,243,273,304,334],Te=[0,31,60,91,121,152,182,213,244,274,305,335];function be(e,t){return new ve("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Oe(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return 0===s?7:s}function Ne(e,t,n){return n+(Ge(e)?Te:Se)[t-1]}function De(e,t){const n=Ge(e)?Te:Se,r=n.findIndex((e=>e<t));return{month:r+1,day:t-n[r]}}function Me(e,t){return(e-t+7)%7+1}function Ie(e,t=4,n=1){const{year:r,month:s,day:i}=e,a=Ne(r,s,i),o=Me(Oe(r,s,i),n);let u,l=Math.floor((a-o+14-t)/7);return l<1?(u=r-1,l=et(u,t,n)):l>et(r,t,n)?(u=r+1,l=1):u=r,{weekYear:u,weekNumber:l,weekday:o,...ot(e)}}function Ve(e,t=4,n=1){const{weekYear:r,weekNumber:s,weekday:i}=e,a=Me(Oe(r,1,t),n),o=Be(r);let u,l=7*s+i-a-7+t;l<1?(u=r-1,l+=Be(u)):l>o?(u=r+1,l-=Be(r)):u=r;const{month:c,day:h}=De(u,l);return{year:u,month:c,day:h,...ot(e)}}function xe(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:Ne(t,n,r),...ot(e)}}function Ee(e){const{year:t,ordinal:n}=e,{month:r,day:s}=De(t,n);return{year:t,month:r,day:s,...ot(e)}}function Ce(e,t){if(!We(e.localWeekday)||!We(e.localWeekNumber)||!We(e.localWeekYear)){if(!We(e.weekday)||!We(e.weekNumber)||!We(e.weekYear))throw new o("Cannot mix locale-based week fields with ISO-based week fields");return We(e.localWeekday)||(e.weekday=e.localWeekday),We(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),We(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Fe(e){const t=Le(e.year),n=_e(e.month,1,12),r=_e(e.day,1,Qe(e.year,e.month));return t?n?!r&&be("day",e.day):be("month",e.month):be("year",e.year)}function $e(e){const{hour:t,minute:n,second:r,millisecond:s}=e,i=_e(t,0,23)||24===t&&0===n&&0===r&&0===s,a=_e(n,0,59),o=_e(r,0,59),u=_e(s,0,999);return i?a?o?!u&&be("millisecond",s):be("second",r):be("minute",n):be("hour",t)}function We(e){return void 0===e}function Ze(e){return"number"==typeof e}function Le(e){return"number"==typeof e&&e%1==0}function ze(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function je(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function qe(e,t,n){if(0!==e.length)return e.reduce(((e,r)=>{const s=[t(r),r];return e&&n(e[0],s[0])===e[0]?e:s}),null)[1]}function Ae(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ue(e){if(null==e)return null;if("object"!=typeof e)throw new l("Week settings must be an object");if(!_e(e.firstDay,1,7)||!_e(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some((e=>!_e(e,1,7))))throw new l("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function _e(e,t,n){return Le(e)&&e>=t&&e<=n}function Ye(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Re(e){return We(e)||null===e||""===e?void 0:parseInt(e,10)}function He(e){return We(e)||null===e||""===e?void 0:parseFloat(e)}function Pe(e){if(!We(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Je(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function Ge(e){return e%4==0&&(e%100!=0||e%400==0)}function Be(e){return Ge(e)?366:365}function Qe(e,t){const n=(r=t-1)-12*Math.floor(r/12)+1;var r;return 2===n?Ge(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Ke(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Xe(e,t,n){return-Me(Oe(e,1,t),n)+t-1}function et(e,t=4,n=1){const r=Xe(e,t,n),s=Xe(e+1,t,n);return(Be(e)-r+s)/7}function tt(e){return e>99?e:e>ke.twoDigitCutoffYear?1900+e:2e3+e}function nt(e,t,n,r=null){const s=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},o=new Intl.DateTimeFormat(n,a).formatToParts(s).find((e=>"timezonename"===e.type.toLowerCase()));return o?o.value:null}function rt(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function st(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new l(`Invalid unit value ${e}`);return t}function it(e,t){const n={};for(const r in e)if(Ae(e,r)){const s=e[r];if(null==s)continue;n[t(r)]=st(s)}return n}function at(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Ye(n,2)}:${Ye(r,2)}`;case"narrow":return`${s}${n}${r>0?`:${r}`:""}`;case"techie":return`${s}${Ye(n,2)}${Ye(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ot(e){return function(e){return["hour","minute","second","millisecond"].reduce(((t,n)=>(t[n]=e[n],t)),{})}(e)}const ut=["January","February","March","April","May","June","July","August","September","October","November","December"],lt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ct=["J","F","M","A","M","J","J","A","S","O","N","D"];function ht(e){switch(e){case"narrow":return[...ct];case"short":return[...lt];case"long":return[...ut];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 dt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],mt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ft=["M","T","W","T","F","S","S"];function yt(e){switch(e){case"narrow":return[...ft];case"short":return[...mt];case"long":return[...dt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const gt=["AM","PM"],wt=["Before Christ","Anno Domini"],pt=["BC","AD"],kt=["B","A"];function vt(e){switch(e){case"narrow":return[...kt];case"short":return[...pt];case"long":return[...wt];default:return null}}function St(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Tt={D:f,DD:y,DDD:w,DDDD:p,t:k,tt:v,ttt:S,tttt:T,T:b,TT:O,TTT:N,TTTT:D,f:M,ff:V,fff:C,ffff:$,F:I,FF:x,FFF:F,FFFF:W};class bt{static create(e,t={}){return new bt(e,t)}static parseFormat(e){let t=null,n="",r=!1;const s=[];for(let i=0;i<e.length;i++){const a=e.charAt(i);"'"===a?(n.length>0&&s.push({literal:r||/^\s+$/.test(n),val:n}),t=null,n="",r=!r):r||a===t?n+=a:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&s.push({literal:r||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(e){return Tt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Ye(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(t,n)=>this.loc.extract(e,t,n),i=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=(t,r)=>n?function(e,t){return ht(t)[e.month-1]}(e,t):s(r?{month:t}:{month:t,day:"numeric"},"month"),o=(t,r)=>n?function(e,t){return yt(t)[e.weekday-1]}(e,t):s(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=bt.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},l=t=>n?function(e,t){return vt(t)[e.year<0?0:1]}(e,t):s({era:t},"era");return St(bt.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n?function(e){return gt[e.hour<12?0:1]}(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return r?s({day:"numeric"},"day"):this.num(e.day);case"dd":return r?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return o("short",!0);case"cccc":return o("long",!0);case"ccccc":return o("narrow",!0);case"EEE":return o("short",!1);case"EEEE":return o("long",!1);case"EEEEE":return o("narrow",!1);case"L":return r?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return r?s({month:"numeric"},"month"):this.num(e.month);case"MM":return r?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return r?s({year:"numeric"},"year"):this.num(e.year);case"yy":return r?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return l("short");case"GG":return l("long");case"GGGGG":return l("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 u(t)}}))}formatDurationFromString(e,t){const n=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=bt.parseFormat(t),s=r.reduce(((e,{literal:t,val:n})=>t?e:e.concat(n)),[]);return St(r,(e=>t=>{const r=n(t);return r?this.num(e.get(r),t.length):t})(e.shiftTo(...s.map(n).filter((e=>e)))))}}const Ot=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Nt(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function Dt(...e){return t=>e.reduce((([e,n,r],s)=>{const[i,a,o]=s(t,r);return[{...e,...i},a||n,o]}),[{},null,1]).slice(0,2)}function Mt(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function It(...e){return(t,n)=>{const r={};let s;for(s=0;s<e.length;s++)r[e[s]]=Re(t[n+s]);return[r,null,n+s]}}const Vt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,xt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Et=RegExp(`${xt.source}(?:${Vt.source}?(?:\\[(${Ot.source})\\])?)?`),Ct=RegExp(`(?:T${Et.source})?`),Ft=It("weekYear","weekNumber","weekDay"),$t=It("year","ordinal"),Wt=RegExp(`${xt.source} ?(?:${Vt.source}|(${Ot.source}))?`),Zt=RegExp(`(?: ${Wt.source})?`);function Lt(e,t,n){const r=e[t];return We(r)?n:Re(r)}function zt(e,t){return[{hours:Lt(e,t,0),minutes:Lt(e,t+1,0),seconds:Lt(e,t+2,0),milliseconds:Pe(e[t+3])},null,t+4]}function jt(e,t){const n=!e[t]&&!e[t+1],r=rt(e[t+1],e[t+2]);return[{},n?null:re.instance(r),t+3]}function qt(e,t){return[{},e[t]?U.create(e[t]):null,t+1]}const At=RegExp(`^T?${xt.source}$`),Ut=/^-?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 _t(e){const[t,n,r,s,i,a,o,u,l]=e,c="-"===t[0],h=u&&"-"===u[0],d=(e,t=!1)=>void 0!==e&&(t||e&&c)?-e:e;return[{years:d(He(n)),months:d(He(r)),weeks:d(He(s)),days:d(He(i)),hours:d(He(a)),minutes:d(He(o)),seconds:d(He(u),"-0"===u),milliseconds:d(Pe(l),h)}]}const Yt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Rt(e,t,n,r,s,i,a){const o={year:2===t.length?tt(Re(t)):Re(t),month:lt.indexOf(n)+1,day:Re(r),hour:Re(s),minute:Re(i)};return a&&(o.second=Re(a)),e&&(o.weekday=e.length>3?dt.indexOf(e)+1:mt.indexOf(e)+1),o}const Ht=/^(?:(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 Pt(e){const[,t,n,r,s,i,a,o,u,l,c,h]=e,d=Rt(t,s,r,n,i,a,o);let m;return m=u?Yt[u]:l?0:rt(c,h),[d,new re(m)]}const Jt=/^(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$/,Gt=/^(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$/,Bt=/^(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 Qt(e){const[,t,n,r,s,i,a,o]=e;return[Rt(t,s,r,n,i,a,o),re.utcInstance]}function Kt(e){const[,t,n,r,s,i,a,o]=e;return[Rt(t,o,n,r,s,i,a),re.utcInstance]}const Xt=Nt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ct),en=Nt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ct),tn=Nt(/(\d{4})-?(\d{3})/,Ct),nn=Nt(Et),rn=Dt((function(e,t){return[{year:Lt(e,t),month:Lt(e,t+1,1),day:Lt(e,t+2,1)},null,t+3]}),zt,jt,qt),sn=Dt(Ft,zt,jt,qt),an=Dt($t,zt,jt,qt),on=Dt(zt,jt,qt),un=Dt(zt),ln=Nt(/(\d{4})-(\d\d)-(\d\d)/,Zt),cn=Nt(Wt),hn=Dt(zt,jt,qt),dn="Invalid Duration",mn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},fn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...mn},yn={years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...mn},gn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],wn=gn.slice(0).reverse();function pn(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Sn(r)}function kn(e,t){let n=t.milliseconds??0;for(const r of wn.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function vn(e,t){const n=kn(e,t)<0?-1:1;gn.reduceRight(((r,s)=>{if(We(t[s]))return r;if(r){const i=t[r]*n,a=e[s][r],o=Math.floor(i/a);t[s]+=o*n,t[r]-=o*a*n}return s}),null),gn.reduce(((n,r)=>{if(We(t[r]))return n;if(n){const s=t[n]%1;t[n]-=s,t[r]+=s*e[n][r]}return r}),null)}class Sn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?yn:fn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||te.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Sn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new l("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Sn({values:it(e,Sn.normalizeUnit),loc:te.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Ze(e))return Sn.fromMillis(e);if(Sn.isDuration(e))return e;if("object"==typeof e)return Sn.fromObject(e);throw new l(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Mt(e,[Ut,_t])}(e);return n?Sn.fromObject(n,t):Sn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Mt(e,[At,un])}(e);return n?Sn.fromObject(n,t):Sn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the Duration is invalid");const n=e instanceof ve?e:new ve(e,t);if(ke.throwOnInvalid)throw new a(n);return new Sn({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new u(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?bt.create(this.loc,n).formatDurationFromString(this,e):dn}toHuman(e={}){if(!this.isValid)return dn;const t=gn.map((t=>{const n=this.values[t];return We(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(n)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Je(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},dr.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?kn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Sn.fromDurationLike(e),n={};for(const e of gn)(Ae(t.values,e)||Ae(this.values,e))&&(n[e]=t.get(e)+this.get(e));return pn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=Sn.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=st(e(this.values[n],n));return pn(this,{values:t},!0)}get(e){return this[Sn.normalizeUnit(e)]}set(e){return this.isValid?pn(this,{values:{...this.values,...it(e,Sn.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return pn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return vn(this.matrix,e),pn(this,{values:e},!0)}rescale(){return this.isValid?pn(this,{values:function(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>Sn.normalizeUnit(e)));const t={},n={},r=this.toObject();let s;for(const i of gn)if(e.indexOf(i)>=0){s=i;let e=0;for(const t in n)e+=this.matrix[t][i]*n[t],n[t]=0;Ze(r[i])&&(e+=r[i]);const a=Math.trunc(e);t[i]=a,n[i]=(1e3*e-1e3*a)/1e3}else Ze(r[i])&&(n[i]=r[i]);for(const e in n)0!==n[e]&&(t[s]+=e===s?n[e]:n[e]/this.matrix[s][e]);return vn(this.matrix,t),pn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return pn(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 null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const r of gn)if(t=this.values[r],n=e.values[r],!(void 0===t||0===t?void 0===n||0===n:t===n))return!1;var t,n;return!0}}const Tn="Invalid Interval";class bn{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new l("need to specify a reason the Interval is invalid");const n=e instanceof ve?e:new ve(e,t);if(ke.throwOnInvalid)throw new i(n);return new bn({invalid:n})}static fromDateTimes(e,t){const n=mr(e),r=mr(t),s=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?bn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:bn.invalid("missing or invalid end"):bn.invalid("missing or invalid start")}(n,r);return null==s?new bn({start:n,end:r}):s}static after(e,t){const n=Sn.fromDurationLike(t),r=mr(e);return bn.fromDateTimes(r,r.plus(n))}static before(e,t){const n=Sn.fromDurationLike(t),r=mr(e);return bn.fromDateTimes(r.minus(n),r)}static fromISO(e,t){const[n,r]=(e||"").split("/",2);if(n&&r){let e,s,i,a;try{e=dr.fromISO(n,t),s=e.isValid}catch(r){s=!1}try{i=dr.fromISO(r,t),a=i.isValid}catch(r){a=!1}if(s&&a)return bn.fromDateTimes(e,i);if(s){const n=Sn.fromISO(r,t);if(n.isValid)return bn.after(e,n)}else if(a){const e=Sn.fromISO(n,t);if(e.isValid)return bn.before(i,e)}}return bn.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 isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let r;return r=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&this.s<=e&&this.e>e}set({start:e,end:t}={}){return this.isValid?bn.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(mr).filter((e=>this.contains(e))).sort(((e,t)=>e.toMillis()-t.toMillis())),n=[];let{s:r}=this,s=0;for(;r<this.e;){const e=t[s]||this.e,i=+e>+this.e?this.e:e;n.push(bn.fromDateTimes(r,i)),r=i,s+=1}return n}splitBy(e){const t=Sn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,s=1;const i=[];for(;r<this.e;){const e=this.start.plus(t.mapUnits((e=>e*s)));n=+e>+this.e?this.e:e,i.push(bn.fromDateTimes(r,n)),r=n,s+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e==+e.s}abutsEnd(e){return!!this.isValid&&+e.e==+this.s}engulfs(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e}equals(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:bn.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return bn.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n]),[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],s=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),i=Array.prototype.concat(...s).sort(((e,t)=>e.time-t.time));for(const e of i)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!=+e.time&&r.push(bn.fromDateTimes(t,e.time)),t=null);return bn.merge(r)}difference(...e){return bn.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Tn}[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=f,t={}){return this.isValid?bt.create(this.s.loc.clone(t),e).formatInterval(this):Tn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Tn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Tn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Tn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Tn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Sn.invalid(this.invalidReason)}mapEndpoints(e){return bn.fromDateTimes(e(this.s),e(this.e))}}class On{static hasDST(e=ke.defaultZone){const t=dr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return U.isValidZone(e)}static normalizeZone(e){return ie(e,ke.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||te.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||te.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||te.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||te.create(t,n,s)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||te.create(t,n,s)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||te.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||te.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return te.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return te.create(t,null,"gregory").eras(e)}static features(){return{relative:ze(),localeWeek:je()}}}function Nn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Sn.fromMillis(r).as("days"))}function Dn(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(-1!==e[n].search(ae.hanidec))t+=ue.indexOf(e[n]);else for(const e in oe){const[n,s]=oe[e];r>=n&&r<=s&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const Mn=`[ ${String.fromCharCode(160)}]`,In=new RegExp(Mn,"g");function Vn(e){return e.replace(/\./g,"\\.?").replace(In,Mn)}function xn(e){return e.replace(/\./g,"").replace(In," ").toLowerCase()}function En(e,t){return null===e?null:{regex:RegExp(e.map(Vn).join("|")),deser:([n])=>e.findIndex((e=>xn(n)===xn(e)))+t}}function Cn(e,t){return{regex:e,deser:([,e,t])=>rt(e,t),groups:t}}function Fn(e){return{regex:e,deser:([e])=>e}}const $n={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Wn=null;function Zn(e,t){return Array.prototype.concat(...e.map((e=>function(e,t){if(e.literal)return e;const n=jn(bt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t))))}class Ln{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Zn(bt.parseFormat(t),e),this.units=this.tokens.map((t=>function(e,t){const n=ce(t),r=ce(t,"{2}"),s=ce(t,"{3}"),i=ce(t,"{4}"),a=ce(t,"{6}"),o=ce(t,"{1,2}"),u=ce(t,"{1,3}"),l=ce(t,"{1,6}"),c=ce(t,"{1,9}"),h=ce(t,"{2,4}"),d=ce(t,"{4,6}"),m=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},f=(f=>{if(e.literal)return m(f);switch(f.val){case"G":return En(t.eras("short"),0);case"GG":return En(t.eras("long"),0);case"y":return Dn(l);case"yy":case"kk":return Dn(h,tt);case"yyyy":case"kkkk":return Dn(i);case"yyyyy":return Dn(d);case"yyyyyy":return Dn(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Dn(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Dn(r);case"MMM":return En(t.months("short",!0),1);case"MMMM":return En(t.months("long",!0),1);case"LLL":return En(t.months("short",!1),1);case"LLLL":return En(t.months("long",!1),1);case"o":case"S":return Dn(u);case"ooo":case"SSS":return Dn(s);case"u":return Fn(c);case"uu":return Fn(o);case"uuu":case"E":case"c":return Dn(n);case"a":return En(t.meridiems(),0);case"EEE":return En(t.weekdays("short",!1),1);case"EEEE":return En(t.weekdays("long",!1),1);case"ccc":return En(t.weekdays("short",!0),1);case"cccc":return En(t.weekdays("long",!0),1);case"Z":case"ZZ":return Cn(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return Cn(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return Fn(/[a-z_+-/]{1,256}?/i);case" ":return Fn(/[^\S\n\r]/);default:return m(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e))),this.disqualifyingUnit=this.units.find((e=>e.invalidReason)),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const s in n)if(Ae(n,s)){const i=n[s],a=i.groups?i.groups+1:1;!i.literal&&i.token&&(e[i.token.val[0]]=i.deser(r.slice(t,t+a))),t+=a}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,s,i]=n?function(e){let t,n=null;return We(e.z)||(n=U.create(e.z)),We(e.Z)||(n||(n=new re(e.Z)),t=e.Z),We(e.q)||(e.M=3*(e.q-1)+1),We(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),We(e.u)||(e.S=Pe(e.u)),[Object.keys(e).reduce(((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t}),{}),n,t]}(n):[null,null,void 0];if(Ae(n,"a")&&Ae(n,"H"))throw new o("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:s,specificOffset:i}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function zn(e,t,n){return new Ln(e,n).explainFromTokens(t)}function jn(e,t){if(!e)return null;const n=bt.create(t,e).dtFormatter((Wn||(Wn=dr.fromMillis(1555555555555)),Wn)),r=n.formatToParts(),s=n.resolvedOptions();return r.map((t=>function(e,t,n){const{type:r,value:s}=e;if("literal"===r){const e=/^\s+$/.test(s);return{literal:!e,val:e?" ":s}}const i=t[r];let a=r;"hour"===r&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let o=$n[a];if("object"==typeof o&&(o=o[i]),o)return{literal:!1,val:o}}(t,e,s)))}const qn="Invalid DateTime",An=864e13;function Un(e){return new ve("unsupported zone",`the zone "${e.name}" is not supported`)}function _n(e){return null===e.weekData&&(e.weekData=Ie(e.c)),e.weekData}function Yn(e){return null===e.localWeekData&&(e.localWeekData=Ie(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Rn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new dr({...n,...t,old:n})}function Hn(e,t,n){let r=e-60*t*1e3;const s=n.offset(r);if(t===s)return[r,t];r-=60*(s-t)*1e3;const i=n.offset(r);return s===i?[r,s]:[e-60*Math.min(s,i)*1e3,Math.max(s,i)]}function Pn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Jn(e,t,n){return Hn(Ke(e),t,n)}function Gn(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i={...e.c,year:r,month:s,day:Math.min(e.c.day,Qe(r,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=Sn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=Ke(i);let[u,l]=Hn(o,n,e.z