UNPKG

@bitrix24/b24jssdk

Version:
1 lines 323 kB
(function(R,I){typeof exports=="object"&&typeof module<"u"?I(exports):typeof define=="function"&&define.amd?define(["exports"],I):(R=typeof globalThis<"u"?globalThis:R||self,I(R.B24Js=R.B24Js||{}))})(this,(function(R){"use strict";var I=(r=>(r.desktop="desktop",r.log="log",r.info="info",r.warn="warn",r.error="error",r.trace="trace",r))(I||{});const je=new Map;je.set("title",["%c#title#","color: #959ca4; font-style: italic; padding: 0 6px; border-top: 1px solid #ccc; border-left: 1px solid #ccc; border-bottom: 1px solid #ccc"]),je.set("desktop",["%cDESKTOP","color: white; font-style: italic; background-color: #29619b; padding: 0 6px; border: 1px solid #29619b"]),je.set("log",["%cLOG","color: #2a323b; font-style: italic; background-color: #ccc; padding: 0 6px; border: 1px solid #ccc"]),je.set("info",["%cINFO","color: #fff; font-style: italic; background-color: #6b7f96; padding: 0 6px; border: 1px solid #6b7f96"]),je.set("warn",["%cWARNING","color: #f0a74f; font-style: italic; padding: 0 6px; border: 1px solid #f0a74f"]),je.set("error",["%cERROR","color: white; font-style: italic; background-color: #8a3232; padding: 0 6px; border: 1px solid #8a3232"]),je.set("trace",["%cTRACE","color: #2a323b; font-style: italic; background-color: #ccc; padding: 0 6px; border: 1px solid #ccc"]);class we{#e;#t={desktop:!0,log:!1,info:!1,warn:!1,error:!0,trace:!0};static build(e,t=!1){const n=new we(e);return t&&(n.enable("log"),n.enable("info"),n.enable("warn")),n}constructor(e){this.#e=e}#r(e){const t=[],n=[];if(je.has("title")){const s=je.get("title");s[0]&&(t.push(s[0].replace("#title#",this.#e)),n.push(s[1]||""))}if(je.has(e)){const s=je.get(e);s[0]&&(t.push(s[0]),n.push(s[1]||""))}return[t.join(""),...n]}setConfig(e){for(const t in e)this.#t[t]=e[t]}enable(e){return typeof this.#t[e]>"u"?!1:(this.#t[e]=!0,!0)}disable(e){return typeof this.#t[e]>"u"?!1:(this.#t[e]=!1,!0)}isEnabled(e){return this.#t[e]}desktop(...e){this.isEnabled("desktop")&&console.log(...this.#r("desktop"),...e)}log(...e){this.isEnabled("log")&&console.log(...this.#r("log"),...e)}info(...e){this.isEnabled("info")&&console.info(...this.#r("info"),...e)}warn(...e){this.isEnabled("warn")&&console.warn(...this.#r("warn"),...e)}error(...e){this.isEnabled("error")&&console.error(...this.#r("error"),...e)}trace(...e){this.isEnabled("trace")&&console.trace(...this.#r("trace"),...e)}}var Yn=(r=>(r.undefined="undefined",r.any="any",r.integer="integer",r.boolean="boolean",r.double="double",r.date="date",r.datetime="datetime",r.string="string",r.text="text",r.file="file",r.array="array",r.object="object",r.user="user",r.location="location",r.crmCategory="crm_category",r.crmStatus="crm_status",r.crmCurrency="crm_currency",r))(Yn||{});const aa=Function.prototype.toString.call(Object);class la{getTag(e){return Object.prototype.toString.call(e)}isString(e){return typeof e=="string"||e instanceof String}isStringFilled(e){return this.isString(e)&&e!==""}isFunction(e){return e===null?!1:typeof e=="function"||e instanceof Function}isObject(e){return!!e&&(typeof e=="object"||typeof e=="function")}isObjectLike(e){return!!e&&typeof e=="object"}isPlainObject(e){if(!this.isObjectLike(e)||this.getTag(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=t.hasOwnProperty("constructor")&&t.constructor;return typeof n=="function"&&Function.prototype.toString.call(n)===aa}isJsonRpcRequest(e){return typeof e=="object"&&e&&"jsonrpc"in e&&this.isStringFilled(e.jsonrpc)&&"method"in e&&this.isStringFilled(e.method)}isJsonRpcResponse(e){return typeof e=="object"&&e&&"jsonrpc"in e&&this.isStringFilled(e.jsonrpc)&&"id"in e&&("result"in e||"error"in e)}isBoolean(e){return e===!0||e===!1}isNumber(e){return typeof e=="number"&&!Number.isNaN(e)}isInteger(e){return Number.isInteger(e)}isFloat(e){return this.isNumber(e)&&!this.isInteger(e)}isNil(e){return e==null}isArray(e){return!this.isNil(e)&&Array.isArray(e)}isArrayFilled(e){return this.isArray(e)&&e.length>0}isArrayLike(e){return!this.isNil(e)&&!this.isFunction(e)&&e.length>-1&&e.length<=Number.MAX_SAFE_INTEGER}isDate(e){return e instanceof Date}isDomNode(e){return this.isObjectLike(e)&&!this.isPlainObject(e)&&"nodeType"in e}isElementNode(e){return this.isDomNode(e)&&e.nodeType===Node.ELEMENT_NODE}isTextNode(e){return this.isDomNode(e)&&e.nodeType===Node.TEXT_NODE}isMap(e){return this.isObjectLike(e)&&this.getTag(e)==="[object Map]"}isSet(e){return this.isObjectLike(e)&&this.getTag(e)==="[object Set]"}isWeakMap(e){return this.isObjectLike(e)&&this.getTag(e)==="[object WeakMap]"}isWeakSet(e){return this.isObjectLike(e)&&this.getTag(e)==="[object WeakSet]"}isPrototype(e){return(typeof(e&&e.constructor)=="function"&&e.constructor.prototype||Object.prototype)===e}isRegExp(e){return this.isObjectLike(e)&&this.getTag(e)==="[object RegExp]"}isNull(e){return e===null}isUndefined(e){return typeof e>"u"}isArrayBuffer(e){return this.isObjectLike(e)&&this.getTag(e)==="[object ArrayBuffer]"}isTypedArray(e){const t=/^\[object (?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)]$/;return this.isObjectLike(e)&&t.test(this.getTag(e))}isBlob(e){return this.isObjectLike(e)&&this.isNumber(e.size)&&this.isString(e.type)&&this.isFunction(e.slice)}isFile(e){return this.isBlob(e)&&this.isString(e.name)&&(this.isNumber(e.lastModified)||this.isObjectLike(e.lastModifiedDate))}isFormData(e){return typeof FormData<"u"&&e instanceof FormData?!0:this.isObjectLike(e)&&this.getTag(e)==="[object FormData]"}clone(e,t=!0){let n,s,i;if(this.isNil(e)||typeof e!="object")return e;if(this.isDomNode(e))n=e.cloneNode(t);else if(typeof e=="object")if(this.isArray(e))for(n=[],s=0,i=e.length;s<i;s++)typeof e[s]=="object"&&t?n[s]=this.clone(e[s],t):n[s]=e[s];else{n={},e.constructor&&(this.isDate(e)?n=new Date(e):n=new e.constructor);for(s in e)e.hasOwnProperty(s)&&(typeof e[s]=="object"&&t?n[s]=this.clone(e[s],t):n[s]=e[s])}else n=e;return n}}const C=new la;function ca(r,e){const t={};for(const n of e)t[n]=r[n];return t}function Kn(r,e){const t={...r};for(const n of e)delete t[n];return t}function ua(r){return Array.isArray(r[0])}function ha(r,e){return Object.values(r).includes(e)?e:void 0}class dt extends Error{}class fa extends dt{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class da extends dt{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class pa extends dt{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Et extends dt{}class Qn extends dt{constructor(e){super(`Invalid unit ${e}`)}}class be extends dt{}class at extends dt{constructor(){super("Zone is an abstract class")}}const N="numeric",Be="short",Ne="long",ar={year:N,month:N,day:N},Xn={year:N,month:Be,day:N},ga={year:N,month:Be,day:N,weekday:Be},es={year:N,month:Ne,day:N},ts={year:N,month:Ne,day:N,weekday:Ne},rs={hour:N,minute:N},ns={hour:N,minute:N,second:N},ss={hour:N,minute:N,second:N,timeZoneName:Be},is={hour:N,minute:N,second:N,timeZoneName:Ne},os={hour:N,minute:N,hourCycle:"h23"},as={hour:N,minute:N,second:N,hourCycle:"h23"},ls={hour:N,minute:N,second:N,hourCycle:"h23",timeZoneName:Be},cs={hour:N,minute:N,second:N,hourCycle:"h23",timeZoneName:Ne},us={year:N,month:N,day:N,hour:N,minute:N},hs={year:N,month:N,day:N,hour:N,minute:N,second:N},fs={year:N,month:Be,day:N,hour:N,minute:N},ds={year:N,month:Be,day:N,hour:N,minute:N,second:N},ma={year:N,month:Be,day:N,weekday:Be,hour:N,minute:N},ps={year:N,month:Ne,day:N,hour:N,minute:N,timeZoneName:Be},gs={year:N,month:Ne,day:N,hour:N,minute:N,second:N,timeZoneName:Be},ms={year:N,month:Ne,day:N,weekday:Ne,hour:N,minute:N,timeZoneName:Ne},ys={year:N,month:Ne,day:N,weekday:Ne,hour:N,minute:N,second:N,timeZoneName:Ne};class Wt{get type(){throw new at}get name(){throw new at}get ianaName(){return this.name}get isUniversal(){throw new at}offsetName(e,t){throw new at}formatOffset(e,t){throw new at}offset(e){throw new at}equals(e){throw new at}get isValid(){throw new at}}let $r=null;class lr extends Wt{static get instance(){return $r===null&&($r=new lr),$r}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Vs(e,t,n)}formatOffset(e,t){return Ht(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const Wr=new Map;function ya(r){let e=Wr.get(r);return e===void 0&&(e=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"}),Wr.set(r,e)),e}const wa={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ba(r,e){const t=r.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,i,o,l,a,u,c]=n;return[o,s,i,l,a,u,c]}function Sa(r,e){const t=r.formatToParts(e),n=[];for(let s=0;s<t.length;s++){const{type:i,value:o}=t[s],l=wa[i];i==="era"?n[l]=o:W(l)||(n[l]=parseInt(o,10))}return n}const Vr=new Map;class Qe extends Wt{static create(e){let t=Vr.get(e);return t===void 0&&Vr.set(e,t=new Qe(e)),t}static resetCache(){Vr.clear(),Wr.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=Qe.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Vs(e,t,n,this.name)}formatOffset(e,t){return Ht(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=ya(this.name);let[s,i,o,l,a,u,c]=n.formatToParts?Sa(n,t):ba(n,t);l==="BC"&&(s=-Math.abs(s)+1);const h=dr({year:s,month:i,day:o,hour:a===24?0:a,minute:u,second:c,millisecond:0});let p=+t;const d=p%1e3;return p-=d>=0?d:1e3+d,(h-p)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let ws={};function _a(r,e={}){const t=JSON.stringify([r,e]);let n=ws[t];return n||(n=new Intl.ListFormat(r,e),ws[t]=n),n}const qr=new Map;function zr(r,e={}){const t=JSON.stringify([r,e]);let n=qr.get(t);return n===void 0&&(n=new Intl.DateTimeFormat(r,e),qr.set(t,n)),n}const Hr=new Map;function ka(r,e={}){const t=JSON.stringify([r,e]);let n=Hr.get(t);return n===void 0&&(n=new Intl.NumberFormat(r,e),Hr.set(t,n)),n}const Jr=new Map;function va(r,e={}){const{base:t,...n}=e,s=JSON.stringify([r,n]);let i=Jr.get(s);return i===void 0&&(i=new Intl.RelativeTimeFormat(r,e),Jr.set(s,i)),i}let Vt=null;function Ea(){return Vt||(Vt=new Intl.DateTimeFormat().resolvedOptions().locale,Vt)}const Zr=new Map;function bs(r){let e=Zr.get(r);return e===void 0&&(e=new Intl.DateTimeFormat(r).resolvedOptions(),Zr.set(r,e)),e}const Gr=new Map;function Ta(r){let e=Gr.get(r);if(!e){const t=new Intl.Locale(r);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...Ss,...e}),Gr.set(r,e)}return e}function Oa(r){const e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));const t=r.indexOf("-u-");if(t===-1)return[r];{let n,s;try{n=zr(r).resolvedOptions(),s=r}catch{const a=r.substring(0,t);n=zr(a).resolvedOptions(),s=a}const{numberingSystem:i,calendar:o}=n;return[s,i,o]}}function Aa(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}function Ia(r){const e=[];for(let t=1;t<=12;t++){const n=U.utc(2009,t,1);e.push(r(n))}return e}function Ca(r){const e=[];for(let t=1;t<=7;t++){const n=U.utc(2016,11,13+t);e.push(r(n))}return e}function cr(r,e,t,n){const s=r.listingMode();return s==="error"?null:s==="en"?t(e):n(e)}function Na(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||bs(r.locale).numberingSystem==="latn"}class Ra{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:s,floor:i,...o}=n;if(!t||Object.keys(o).length>0){const l={useGrouping:!1,...n};n.padTo>0&&(l.minimumIntegerDigits=n.padTo),this.inf=ka(e,l)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):sn(e,3);return fe(t,this.padTo)}}}class La{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),l=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&Qe.create(l).valid?(s=l,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||s,this.dtf=zr(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:n}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Pa{constructor(e,t,n){this.opts={style:"long",...n},!t&&Bs()&&(this.rtf=va(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):tl(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const Ss={firstDay:1,minimalDays:4,weekend:[6,7]};class Q{static fromOpts(e){return Q.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,s,i=!1){const o=e||ae.defaultLocale,l=o||(i?"en-US":Ea()),a=t||ae.defaultNumberingSystem,u=n||ae.defaultOutputCalendar,c=rn(s)||ae.defaultWeekSettings;return new Q(l,a,u,c,o)}static resetCache(){Vt=null,qr.clear(),Hr.clear(),Jr.clear(),Zr.clear(),Gr.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:s}={}){return Q.create(e,t,n,s)}constructor(e,t,n,s,i){const[o,l,a]=Oa(e);this.locale=o,this.numberingSystem=t||l||null,this.outputCalendar=n||a||null,this.weekSettings=s,this.intl=Aa(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=Na(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Q.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,rn(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return cr(this,e,Hs,()=>{const n=this.intl==="ja"||this.intl.startsWith("ja-");t&=!n;const s=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const o=n?l=>this.dtFormatter(l,s).format():l=>this.extract(l,s,"month");this.monthsCache[i][e]=Ia(o)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return cr(this,e,Gs,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=Ca(i=>this.extract(i,n,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return cr(this,void 0,()=>Ys,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[U.utc(2016,11,13,9),U.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return cr(this,e,Ks,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[U.utc(-40,1,1),U.utc(2017,1,1)].map(n=>this.extract(n,t,"era"))),this.eraCache[e]})}extract(e,t,n){const s=this.dtFormatter(e,t),i=s.formatToParts(),o=i.find(l=>l.type.toLowerCase()===n);return o?o.value:null}numberFormatter(e={}){return new Ra(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new La(e,this.intl,t)}relFormatter(e={}){return new Pa(this.intl,this.isEnglish(),e)}listFormatter(e={}){return _a(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||bs(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Us()?Ta(this.locale):Ss}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 Yr=null;class Te extends Wt{static get utcInstance(){return Yr===null&&(Yr=new Te(0)),Yr}static instance(e){return e===0?Te.utcInstance:new Te(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Te(pr(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Ht(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Ht(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Ht(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Da extends Wt{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 lt(r,e){if(W(r)||r===null)return e;if(r instanceof Wt)return r;if(Ua(r)){const t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?lr.instance:t==="utc"||t==="gmt"?Te.utcInstance:Te.parseSpecifier(t)||Qe.create(r)}else return ct(r)?Te.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new Da(r)}const Kr={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},_s={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]},Ma=Kr.hanidec.replace(/[\[|\]]/g,"").split("");function Fa(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){const n=r.charCodeAt(t);if(r[t].search(Kr.hanidec)!==-1)e+=Ma.indexOf(r[t]);else for(const s in _s){const[i,o]=_s[s];n>=i&&n<=o&&(e+=n-i)}}return parseInt(e,10)}else return e}const Qr=new Map;function xa(){Qr.clear()}function Ue({numberingSystem:r},e=""){const t=r||"latn";let n=Qr.get(t);n===void 0&&(n=new Map,Qr.set(t,n));let s=n.get(e);return s===void 0&&(s=new RegExp(`${Kr[t]}${e}`),n.set(e,s)),s}let ks=()=>Date.now(),vs="system",Es=null,Ts=null,Os=null,As=60,Is,Cs=null;class ae{static get now(){return ks}static set now(e){ks=e}static set defaultZone(e){vs=e}static get defaultZone(){return lt(vs,lr.instance)}static get defaultLocale(){return Es}static set defaultLocale(e){Es=e}static get defaultNumberingSystem(){return Ts}static set defaultNumberingSystem(e){Ts=e}static get defaultOutputCalendar(){return Os}static set defaultOutputCalendar(e){Os=e}static get defaultWeekSettings(){return Cs}static set defaultWeekSettings(e){Cs=rn(e)}static get twoDigitCutoffYear(){return As}static set twoDigitCutoffYear(e){As=e%100}static get throwOnInvalid(){return Is}static set throwOnInvalid(e){Is=e}static resetCaches(){Q.resetCache(),Qe.resetCache(),U.resetCache(),xa()}}class $e{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ns=[0,31,59,90,120,151,181,212,243,273,304,334],Rs=[0,31,60,91,121,152,182,213,244,274,305,335];function De(r,e){return new $e("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}function Xr(r,e,t){const n=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const s=n.getUTCDay();return s===0?7:s}function Ls(r,e,t){return t+(qt(r)?Rs:Ns)[e-1]}function Ps(r,e){const t=qt(r)?Rs:Ns,n=t.findIndex(i=>i<e),s=e-t[n];return{month:n+1,day:s}}function en(r,e){return(r-e+7)%7+1}function ur(r,e=4,t=1){const{year:n,month:s,day:i}=r,o=Ls(n,s,i),l=en(Xr(n,s,i),t);let a=Math.floor((o-l+14-e)/7),u;return a<1?(u=n-1,a=zt(u,e,t)):a>zt(n,e,t)?(u=n+1,a=1):u=n,{weekYear:u,weekNumber:a,weekday:l,...mr(r)}}function Ds(r,e=4,t=1){const{weekYear:n,weekNumber:s,weekday:i}=r,o=en(Xr(n,1,e),t),l=Ot(n);let a=s*7+i-o-7+e,u;a<1?(u=n-1,a+=Ot(u)):a>l?(u=n+1,a-=Ot(n)):u=n;const{month:c,day:f}=Ps(u,a);return{year:u,month:c,day:f,...mr(r)}}function tn(r){const{year:e,month:t,day:n}=r,s=Ls(e,t,n);return{year:e,ordinal:s,...mr(r)}}function Ms(r){const{year:e,ordinal:t}=r,{month:n,day:s}=Ps(e,t);return{year:e,month:n,day:s,...mr(r)}}function Fs(r,e){if(!W(r.localWeekday)||!W(r.localWeekNumber)||!W(r.localWeekYear)){if(!W(r.weekday)||!W(r.weekNumber)||!W(r.weekYear))throw new Et("Cannot mix locale-based week fields with ISO-based week fields");return W(r.localWeekday)||(r.weekday=r.localWeekday),W(r.localWeekNumber)||(r.weekNumber=r.localWeekNumber),W(r.localWeekYear)||(r.weekYear=r.localWeekYear),delete r.localWeekday,delete r.localWeekNumber,delete r.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function ja(r,e=4,t=1){const n=hr(r.weekYear),s=Me(r.weekNumber,1,zt(r.weekYear,e,t)),i=Me(r.weekday,1,7);return n?s?i?!1:De("weekday",r.weekday):De("week",r.weekNumber):De("weekYear",r.weekYear)}function Ba(r){const e=hr(r.year),t=Me(r.ordinal,1,Ot(r.year));return e?t?!1:De("ordinal",r.ordinal):De("year",r.year)}function xs(r){const e=hr(r.year),t=Me(r.month,1,12),n=Me(r.day,1,fr(r.year,r.month));return e?t?n?!1:De("day",r.day):De("month",r.month):De("year",r.year)}function js(r){const{hour:e,minute:t,second:n,millisecond:s}=r,i=Me(e,0,23)||e===24&&t===0&&n===0&&s===0,o=Me(t,0,59),l=Me(n,0,59),a=Me(s,0,999);return i?o?l?a?!1:De("millisecond",s):De("second",n):De("minute",t):De("hour",e)}function W(r){return typeof r>"u"}function ct(r){return typeof r=="number"}function hr(r){return typeof r=="number"&&r%1===0}function Ua(r){return typeof r=="string"}function $a(r){return Object.prototype.toString.call(r)==="[object Date]"}function Bs(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Us(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Wa(r){return Array.isArray(r)?r:[r]}function $s(r,e,t){if(r.length!==0)return r.reduce((n,s)=>{const i=[e(s),s];return n&&t(n[0],i[0])===n[0]?n:i},null)[1]}function Va(r,e){return e.reduce((t,n)=>(t[n]=r[n],t),{})}function Tt(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function rn(r){if(r==null)return null;if(typeof r!="object")throw new be("Week settings must be an object");if(!Me(r.firstDay,1,7)||!Me(r.minimalDays,1,7)||!Array.isArray(r.weekend)||r.weekend.some(e=>!Me(e,1,7)))throw new be("Invalid week settings");return{firstDay:r.firstDay,minimalDays:r.minimalDays,weekend:Array.from(r.weekend)}}function Me(r,e,t){return hr(r)&&r>=e&&r<=t}function qa(r,e){return r-e*Math.floor(r/e)}function fe(r,e=2){const t=r<0;let n;return t?n="-"+(""+-r).padStart(e,"0"):n=(""+r).padStart(e,"0"),n}function ut(r){if(!(W(r)||r===null||r===""))return parseInt(r,10)}function pt(r){if(!(W(r)||r===null||r===""))return parseFloat(r)}function nn(r){if(!(W(r)||r===null||r==="")){const e=parseFloat("0."+r)*1e3;return Math.floor(e)}}function sn(r,e,t="round"){const n=10**e;switch(t){case"expand":return r>0?Math.ceil(r*n)/n:Math.floor(r*n)/n;case"trunc":return Math.trunc(r*n)/n;case"round":return Math.round(r*n)/n;case"floor":return Math.floor(r*n)/n;case"ceil":return Math.ceil(r*n)/n;default:throw new RangeError(`Value rounding ${t} is out of range`)}}function qt(r){return r%4===0&&(r%100!==0||r%400===0)}function Ot(r){return qt(r)?366:365}function fr(r,e){const t=qa(e-1,12)+1,n=r+(e-t)/12;return t===2?qt(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function dr(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}function Ws(r,e,t){return-en(Xr(r,1,e),t)+e-1}function zt(r,e=4,t=1){const n=Ws(r,e,t),s=Ws(r+1,e,t);return(Ot(r)-n+s)/7}function on(r){return r>99?r:r>ae.twoDigitCutoffYear?1900+r:2e3+r}function Vs(r,e,t,n=null){const s=new Date(r),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(i.timeZone=n);const o={timeZoneName:e,...i},l=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return l?l.value:null}function pr(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);const n=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-n:n;return t*60+s}function qs(r){const e=Number(r);if(typeof r=="boolean"||r===""||!Number.isFinite(e))throw new be(`Invalid unit value ${r}`);return e}function gr(r,e){const t={};for(const n in r)if(Tt(r,n)){const s=r[n];if(s==null)continue;t[e(n)]=qs(s)}return t}function Ht(r,e){const t=Math.trunc(Math.abs(r/60)),n=Math.trunc(Math.abs(r%60)),s=r>=0?"+":"-";switch(e){case"short":return`${s}${fe(t,2)}:${fe(n,2)}`;case"narrow":return`${s}${t}${n>0?`:${n}`:""}`;case"techie":return`${s}${fe(t,2)}${fe(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function mr(r){return Va(r,["hour","minute","second","millisecond"])}const za=["January","February","March","April","May","June","July","August","September","October","November","December"],zs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ha=["J","F","M","A","M","J","J","A","S","O","N","D"];function Hs(r){switch(r){case"narrow":return[...Ha];case"short":return[...zs];case"long":return[...za];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 Js=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Zs=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ja=["M","T","W","T","F","S","S"];function Gs(r){switch(r){case"narrow":return[...Ja];case"short":return[...Zs];case"long":return[...Js];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Ys=["AM","PM"],Za=["Before Christ","Anno Domini"],Ga=["BC","AD"],Ya=["B","A"];function Ks(r){switch(r){case"narrow":return[...Ya];case"short":return[...Ga];case"long":return[...Za];default:return null}}function Ka(r){return Ys[r.hour<12?0:1]}function Qa(r,e){return Gs(e)[r.weekday-1]}function Xa(r,e){return Hs(e)[r.month-1]}function el(r,e){return Ks(e)[r.year<0?0:1]}function tl(r,e,t="always",n=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&i){const f=r==="days";switch(e){case 1:return f?"tomorrow":`next ${s[r][0]}`;case-1:return f?"yesterday":`last ${s[r][0]}`;case 0:return f?"today":`this ${s[r][0]}`}}const o=Object.is(e,-0)||e<0,l=Math.abs(e),a=l===1,u=s[r],c=n?a?u[1]:u[2]||u[1]:a?s[r][0]:r;return o?`${l} ${c} ago`:`in ${l} ${c}`}function Qs(r,e){let t="";for(const n of r)n.literal?t+=n.val:t+=e(n.val);return t}const rl={D:ar,DD:Xn,DDD:es,DDDD:ts,t:rs,tt:ns,ttt:ss,tttt:is,T:os,TT:as,TTT:ls,TTTT:cs,f:us,ff:fs,fff:ps,ffff:ms,F:hs,FF:ds,FFF:gs,FFFF:ys};class Se{static create(e,t={}){return new Se(e,t)}static parseFormat(e){let t=null,n="",s=!1;const i=[];for(let o=0;o<e.length;o++){const l=e.charAt(o);l==="'"?((n.length>0||s)&&i.push({literal:s||/^\s+$/.test(n),val:n===""?"'":n}),t=null,n="",s=!s):s||l===t?n+=l:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=l,t=l)}return n.length>0&&i.push({literal:s||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return rl[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return fe(e,t);const s={...this.opts};return t>0&&(s.padTo=t),n&&(s.signDisplay=n),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,t){const n=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(p,d)=>this.loc.extract(e,p,d),o=p=>e.isOffsetFixed&&e.offset===0&&p.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,p.format):"",l=()=>n?Ka(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(p,d)=>n?Xa(e,p):i(d?{month:p}:{month:p,day:"numeric"},"month"),u=(p,d)=>n?Qa(e,p):i(d?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),c=p=>{const d=Se.macroTokenToFormatOpts(p);return d?this.formatWithSystemDefault(e,d):p},f=p=>n?el(e,p):i({era:p},"era"),h=p=>{switch(p){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 o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({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 l();case"d":return s?i({day:"numeric"},"day"):this.num(e.day);case"dd":return s?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?i({month:"numeric"},"month"):this.num(e.month);case"MM":return s?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?i({year:"numeric"},"year"):this.num(e.year);case"yy":return s?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("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 c(p)}};return Qs(Se.parseFormat(t),h)}formatDurationFromString(e,t){const n=this.opts.signMode==="negativeLargestOnly"?-1:1,s=c=>{switch(c[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=(c,f)=>h=>{const p=s(h);if(p){const d=f.isNegativeDuration&&p!==f.largestUnit?n:1;let g;return this.opts.signMode==="negativeLargestOnly"&&p!==f.largestUnit?g="never":this.opts.signMode==="all"?g="always":g="auto",this.num(c.get(p)*d,h.length,g)}else return h},o=Se.parseFormat(t),l=o.reduce((c,{literal:f,val:h})=>f?c:c.concat(h),[]),a=e.shiftTo(...l.map(s).filter(c=>c)),u={isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]};return Qs(o,i(a,u))}}const Xs=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function At(...r){const e=r.reduce((t,n)=>t+n.source,"");return RegExp(`^${e}$`)}function It(...r){return e=>r.reduce(([t,n,s],i)=>{const[o,l,a]=i(e,s);return[{...t,...o},l||n,a]},[{},null,1]).slice(0,2)}function Ct(r,...e){if(r==null)return[null,null];for(const[t,n]of e){const s=t.exec(r);if(s)return n(s)}return[null,null]}function ei(...r){return(e,t)=>{const n={};let s;for(s=0;s<r.length;s++)n[r[s]]=ut(e[t+s]);return[n,null,t+s]}}const ti=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,nl=`(?:${ti.source}?(?:\\[(${Xs.source})\\])?)?`,an=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,ri=RegExp(`${an.source}${nl}`),ln=RegExp(`(?:[Tt]${ri.source})?`),sl=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,il=/(\d{4})-?W(\d\d)(?:-?(\d))?/,ol=/(\d{4})-?(\d{3})/,al=ei("weekYear","weekNumber","weekDay"),ll=ei("year","ordinal"),cl=/(\d{4})-(\d\d)-(\d\d)/,ni=RegExp(`${an.source} ?(?:${ti.source}|(${Xs.source}))?`),ul=RegExp(`(?: ${ni.source})?`);function Nt(r,e,t){const n=r[e];return W(n)?t:ut(n)}function hl(r,e){return[{year:Nt(r,e),month:Nt(r,e+1,1),day:Nt(r,e+2,1)},null,e+3]}function Rt(r,e){return[{hours:Nt(r,e,0),minutes:Nt(r,e+1,0),seconds:Nt(r,e+2,0),milliseconds:nn(r[e+3])},null,e+4]}function Jt(r,e){const t=!r[e]&&!r[e+1],n=pr(r[e+1],r[e+2]),s=t?null:Te.instance(n);return[{},s,e+3]}function Zt(r,e){const t=r[e]?Qe.create(r[e]):null;return[{},t,e+1]}const fl=RegExp(`^T?${an.source}$`),dl=/^-?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 pl(r){const[e,t,n,s,i,o,l,a,u]=r,c=e[0]==="-",f=a&&a[0]==="-",h=(p,d=!1)=>p!==void 0&&(d||p&&c)?-p:p;return[{years:h(pt(t)),months:h(pt(n)),weeks:h(pt(s)),days:h(pt(i)),hours:h(pt(o)),minutes:h(pt(l)),seconds:h(pt(a),a==="-0"),milliseconds:h(nn(u),f)}]}const gl={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function cn(r,e,t,n,s,i,o){const l={year:e.length===2?on(ut(e)):ut(e),month:zs.indexOf(t)+1,day:ut(n),hour:ut(s),minute:ut(i)};return o&&(l.second=ut(o)),r&&(l.weekday=r.length>3?Js.indexOf(r)+1:Zs.indexOf(r)+1),l}const ml=/^(?:(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 yl(r){const[,e,t,n,s,i,o,l,a,u,c,f]=r,h=cn(e,s,n,t,i,o,l);let p;return a?p=gl[a]:u?p=0:p=pr(c,f),[h,new Te(p)]}function wl(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const bl=/^(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$/,Sl=/^(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$/,_l=/^(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 si(r){const[,e,t,n,s,i,o,l]=r;return[cn(e,s,n,t,i,o,l),Te.utcInstance]}function kl(r){const[,e,t,n,s,i,o,l]=r;return[cn(e,l,t,n,s,i,o),Te.utcInstance]}const vl=At(sl,ln),El=At(il,ln),Tl=At(ol,ln),Ol=At(ri),ii=It(hl,Rt,Jt,Zt),Al=It(al,Rt,Jt,Zt),Il=It(ll,Rt,Jt,Zt),Cl=It(Rt,Jt,Zt);function Nl(r){return Ct(r,[vl,ii],[El,Al],[Tl,Il],[Ol,Cl])}function Rl(r){return Ct(wl(r),[ml,yl])}function Ll(r){return Ct(r,[bl,si],[Sl,si],[_l,kl])}function Pl(r){return Ct(r,[dl,pl])}const Dl=It(Rt);function Ml(r){return Ct(r,[fl,Dl])}const Fl=At(cl,ul),xl=At(ni),jl=It(Rt,Jt,Zt);function Bl(r){return Ct(r,[Fl,ii],[xl,jl])}const oi="Invalid Duration",ai={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Ul={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:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...ai},Fe=146097/400,Lt=146097/4800,$l={years:{quarters:4,months:12,weeks:Fe/7,days:Fe,hours:Fe*24,minutes:Fe*24*60,seconds:Fe*24*60*60,milliseconds:Fe*24*60*60*1e3},quarters:{months:3,weeks:Fe/28,days:Fe/4,hours:Fe*24/4,minutes:Fe*24*60/4,seconds:Fe*24*60*60/4,milliseconds:Fe*24*60*60*1e3/4},months:{weeks:Lt/7,days:Lt,hours:Lt*24,minutes:Lt*24*60,seconds:Lt*24*60*60,milliseconds:Lt*24*60*60*1e3},...ai},gt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Wl=gt.slice(0).reverse();function Xe(r,e,t=!1){const n={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new G(n)}function li(r,e){let t=e.milliseconds??0;for(const n of Wl.slice(1))e[n]&&(t+=e[n]*r[n].milliseconds);return t}function ci(r,e){const t=li(r,e)<0?-1:1;gt.reduceRight((n,s)=>{if(W(e[s]))return n;if(n){const i=e[n]*t,o=r[s][n],l=Math.floor(i/o);e[s]+=l*t,e[n]-=l*o*t}return s},null),gt.reduce((n,s)=>{if(W(e[s]))return n;if(n){const i=e[n]%1;e[n]-=i,e[s]+=i*r[n][s]}return s},null)}function ui(r){const e={};for(const[t,n]of Object.entries(r))n!==0&&(e[t]=n);return e}class G{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let n=t?$l:Ul;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Q.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return G.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new be(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new G({values:gr(e,G.normalizeUnit),loc:Q.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(ct(e))return G.fromMillis(e);if(G.isDuration(e))return e;if(typeof e=="object")return G.fromObject(e);throw new be(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=Pl(e);return n?G.fromObject(n,t):G.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=Ml(e);return n?G.fromObject(n,t):G.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new be("need to specify a reason the Duration is invalid");const n=e instanceof $e?e:new $e(e,t);if(ae.throwOnInvalid)throw new pa(n);return new G({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()];if(!t)throw new Qn(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:t.round!==!1&&t.floor!==!1};return this.isValid?Se.create(this.loc,n).formatDurationFromString(this,e):oi}toHuman(e={}){if(!this.isValid)return oi;const t=e.showZeros!==!1,n=gt.map(s=>{const i=this.values[s];return W(i)||i===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:s.slice(0,-1)}).format(i)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}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+=sn(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},U.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?li(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=G.fromDurationLike(e),n={};for(const s of gt)(Tt(t.values,s)||Tt(this.values,s))&&(n[s]=t.get(s)+this.get(s));return Xe(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=G.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]=qs(e(this.values[n],n));return Xe(this,{values:t},!0)}get(e){return this[G.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...gr(e,G.normalizeUnit)};return Xe(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:s}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:n};return Xe(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return ci(this.matrix,e),Xe(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=ui(this.normalize().shiftToAll().toObject());return Xe(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>G.normalizeUnit(o));const t={},n={},s=this.toObject();let i;for(const o of gt)if(e.indexOf(o)>=0){i=o;let l=0;for(const u in n)l+=this.matrix[u][o]*n[u],n[u]=0;ct(s[o])&&(l+=s[o]);const a=Math.trunc(l);t[o]=a,n[o]=(l*1e3-a*1e3)/1e3}else ct(s[o])&&(n[o]=s[o]);for(const o in n)n[o]!==0&&(t[i]+=o===i?n[o]:n[o]/this.matrix[i][o]);return ci(this.matrix,t),Xe(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Xe(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=ui(this.values);return Xe(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(n,s){return n===void 0||n===0?s===void 0||s===0:n===s}for(const n of gt)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Pt="Invalid Interval";function Vl(r,e){return!r||!r.isValid?le.invalid("missing or invalid start"):!e||!e.isValid?le.invalid("missing or invalid end"):e<r?le.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}class le{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 be("need to specify a reason the Interval is invalid");const n=e instanceof $e?e:new $e(e,t);if(ae.throwOnInvalid)throw new da(n);return new le({invalid:n})}static fromDateTimes(e,t){const n=Kt(e),s=Kt(t),i=Vl(n,s);return i??new le({start:n,end:s})}static after(e,t){const n=G.fromDurationLike(t),s=Kt(e);return le.fromDateTimes(s,s.plus(n))}static before(e,t){const n=G.fromDurationLike(t),s=Kt(e);return le.fromDateTimes(s.minus(n),s)}static fromISO(e,t){const[n,s]=(e||"").split("/",2);if(n&&s){let i,o;try{i=U.fromISO(n,t),o=i.isValid}catch{o=!1}let l,a;try{l=U.fromISO(s,t),a=l.isValid}catch{a=!1}if(o&&a)return le.fromDateTimes(i,l);if(o){const u=G.fromISO(s,t);if(u.isValid)return le.after(i,u)}else if(a){const u=G.fromISO(n,t);if(u.isValid)return le.before(l,u)}}return le.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let s;return t?.useLocaleWeeks?s=this.end.reconfigure({locale:n.locale}):s=this.end,s=s.startOf(e,t),Math.floor(s.diff(n,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?le.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Kt).filter(o=>this.contains(o)).sort((o,l)=>o.toMillis()-l.toMillis()),n=[];let{s}=this,i=0;for(;s<this.e;){const o=t[i]||this.e,l=+o>+this.e?this.e:o;n.push(le.fromDateTimes(s,l)),s=l,i+=1}return n}splitBy(e){const t=G.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:n}=this,s=1,i;const o=[];for(;n<this.e;){const l=this.start.plus(t.mapUnits(a=>a*s));i=+l>+this.e?this.e:l,o.push(le.fromDateTimes(n,i)),n=i,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:le.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 le.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((s,i)=>s.s-i.s).reduce(([s,i],o)=>i?i.overlaps(o)||i.abutsStart(o)?[s,i.union(o)]:[s.concat([i]),o]:[s,o],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const s=[],i=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...i),l=o.sort((a,u)=>a.time-u.time);for(const a of l)n+=a.type==="s"?1:-1,n===1?t=a.time:(t&&+t!=+a.time&&s.push(le.fromDateTimes(t,a.time)),t=null);return le.merge(s)}difference(...e){return le.xor([this].c