@nodeblocks/frontend-list-users-block 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("@mui/icons-material"),n=require("@mui/material"),r=require("react"),i=require("@mui/material/useMediaQuery"),s=require("@mui/material/styles");class a extends Error{}class o extends a{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class l extends a{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class u extends a{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class c extends a{}class d extends a{constructor(e){super(`Invalid unit ${e}`)}}class h extends a{}class m extends a{constructor(){super("Zone is an abstract class")}}const f="numeric",y="short",g="long",p={year:f,month:f,day:f},b={year:f,month:y,day:f},w={year:f,month:y,day:f,weekday:y},v={year:f,month:g,day:f},k={year:f,month:g,day:f,weekday:g},x={hour:f,minute:f},S={hour:f,minute:f,second:f},T={hour:f,minute:f,second:f,timeZoneName:y},M={hour:f,minute:f,second:f,timeZoneName:g},O={hour:f,minute:f,hourCycle:"h23"},C={hour:f,minute:f,second:f,hourCycle:"h23"},N={hour:f,minute:f,second:f,hourCycle:"h23",timeZoneName:y},I={hour:f,minute:f,second:f,hourCycle:"h23",timeZoneName:g},D={year:f,month:f,day:f,hour:f,minute:f},j={year:f,month:f,day:f,hour:f,minute:f,second:f},A={year:f,month:y,day:f,hour:f,minute:f},E={year:f,month:y,day:f,hour:f,minute:f,second:f},V={year:f,month:y,day:f,weekday:y,hour:f,minute:f},F={year:f,month:g,day:f,hour:f,minute:f,timeZoneName:y},L={year:f,month:g,day:f,hour:f,minute:f,second:f,timeZoneName:y},$={year:f,month:g,day:f,weekday:g,hour:f,minute:f,timeZoneName:g},W={year:f,month:g,day:f,weekday:g,hour:f,minute:f,second:f,timeZoneName:g};class z{get type(){throw new m}get name(){throw new m}get ianaName(){return this.name}get isUniversal(){throw new m}offsetName(e,t){throw new m}formatOffset(e,t){throw new m}offset(e){throw new m}equals(e){throw new m}get isValid(){throw new m}}let R=null;class Z extends z{static get instance(){return null===R&&(R=new Z),R}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return ot(e,t,n)}formatOffset(e,t){return dt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const P=new Map,B={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},q=new Map;class U extends z{static create(e){let t=q.get(e);return void 0===t&&q.set(e,t=new U(e)),t}static resetCache(){q.clear(),P.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(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 ot(e,t,n,this.name)}formatOffset(e,t){return dt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=P.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),P.set(e,t)),t}(this.name);let[r,i,s,a,o,l,u]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){const{type:t,value:i}=n[e],s=B[t];"era"===t?r[s]=i:Re(s)||(r[s]=parseInt(i,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),[,i,s,a,o,l,u,c]=r;return[a,i,s,o,l,u,c]}(n,t);"BC"===a&&(r=1-Math.abs(r));let c=+t;const d=c%1e3;return c-=d>=0?d:1e3+d,(rt({year:r,month:i,day:s,hour:24===o?0:o,minute:l,second:u,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let H={};const _=new Map;function Y(e,t={}){const n=JSON.stringify([e,t]);let r=_.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),_.set(n,r)),r}const J=new Map,G=new Map;let Q=null;const K=new Map;function X(e){let t=K.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),K.set(e,t)),t}const ee=new Map;function te(e,t,n,r){const i=e.listingMode();return"error"===i?null:"en"===i?n(t):r(t)}class ne{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:i,...s}=n;if(!t||Object.keys(s).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=J.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),J.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Je(this.floor?Math.floor(e):Xe(e,3),this.padTo)}}class re{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 i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=Y(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(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 ie{constructor(e,t,n){this.opts={style:"long",...n},!t&&Be()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,i=JSON.stringify([e,r]);let s=G.get(i);return void 0===s&&(s=new Intl.RelativeTimeFormat(e,t),G.set(i,s)),s}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const i={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."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&s){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${i[e][0]}`;case-1:return n?"yesterday":`last ${i[e][0]}`;case 0:return n?"today":`this ${i[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),l=1===o,u=i[e],c=r?l?u[1]:u[2]||u[1]:l?i[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 se={firstDay:1,minimalDays:4,weekend:[6,7]};class ae{static fromOpts(e){return ae.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,i=!1){const s=e||Te.defaultLocale,a=s||(i?"en-US":Q||(Q=(new Intl.DateTimeFormat).resolvedOptions().locale,Q)),o=t||Te.defaultNumberingSystem,l=n||Te.defaultOutputCalendar,u=_e(r)||Te.defaultWeekSettings;return new ae(a,o,l,u,s)}static resetCache(){Q=null,_.clear(),J.clear(),G.clear(),K.clear(),ee.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return ae.create(e,t,n,r)}constructor(e,t,n,r,i){const[s,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=Y(e).resolvedOptions(),r=e}catch(i){const s=e.substring(0,n);t=Y(s).resolvedOptions(),r=s}const{numberingSystem:i,calendar:s}=t;return[r,i,s]}}(e);this.locale=s,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=i,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"===X(e.locale).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?ae.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,_e(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 te(this,e,gt,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[i][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=wr.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return te(this,e,vt,()=>{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=wr.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return te(this,void 0,()=>kt,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[wr.utc(2016,11,13,9),wr.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return te(this,e,Mt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[wr.utc(-40,1,1),wr.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 ne(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new re(e,this.intl,t)}relFormatter(e={}){return new ie(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=H[n];return r||(r=new Intl.ListFormat(e,t),H[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||X(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:qe()?function(e){let t=ee.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...se,...t}),ee.set(e,t)}return t}(this.locale):se}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 oe=null;class le extends z{static get utcInstance(){return null===oe&&(oe=new le(0)),oe}static instance(e){return 0===e?le.utcInstance:new le(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new le(lt(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${dt(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${dt(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return dt(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 ue 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 ce(e,t){if(Re(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?le.utcInstance:le.parseSpecifier(n)||U.create(e)}return Ze(e)?le.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ue(e)}const de={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},he={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]},me=de.hanidec.replace(/[\[|\]]/g,"").split(""),fe=new Map;function ye({numberingSystem:e},t=""){const n=e||"latn";let r=fe.get(n);void 0===r&&(r=new Map,fe.set(n,r));let i=r.get(t);return void 0===i&&(i=new RegExp(`${de[n]}${t}`),r.set(t,i)),i}let ge,pe=()=>Date.now(),be="system",we=null,ve=null,ke=null,xe=60,Se=null;class Te{static get now(){return pe}static set now(e){pe=e}static set defaultZone(e){be=e}static get defaultZone(){return ce(be,Z.instance)}static get defaultLocale(){return we}static set defaultLocale(e){we=e}static get defaultNumberingSystem(){return ve}static set defaultNumberingSystem(e){ve=e}static get defaultOutputCalendar(){return ke}static set defaultOutputCalendar(e){ke=e}static get defaultWeekSettings(){return Se}static set defaultWeekSettings(e){Se=_e(e)}static get twoDigitCutoffYear(){return xe}static set twoDigitCutoffYear(e){xe=e%100}static get throwOnInvalid(){return ge}static set throwOnInvalid(e){ge=e}static resetCaches(){ae.resetCache(),U.resetCache(),wr.resetCache(),fe.clear()}}class Me{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Oe=[0,31,59,90,120,151,181,212,243,273,304,334],Ce=[0,31,60,91,121,152,182,213,244,274,305,335];function Ne(e,t){return new Me("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Ie(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return 0===i?7:i}function De(e,t,n){return n+(et(e)?Ce:Oe)[t-1]}function je(e,t){const n=et(e)?Ce:Oe,r=n.findIndex(e=>e<t);return{month:r+1,day:t-n[r]}}function Ae(e,t){return(e-t+7)%7+1}function Ee(e,t=4,n=1){const{year:r,month:i,day:s}=e,a=De(r,i,s),o=Ae(Ie(r,i,s),n);let l,u=Math.floor((a-o+14-t)/7);return u<1?(l=r-1,u=st(l,t,n)):u>st(r,t,n)?(l=r+1,u=1):l=r,{weekYear:l,weekNumber:u,weekday:o,...ht(e)}}function Ve(e,t=4,n=1){const{weekYear:r,weekNumber:i,weekday:s}=e,a=Ae(Ie(r,1,t),n),o=tt(r);let l,u=7*i+s-a-7+t;u<1?(l=r-1,u+=tt(l)):u>o?(l=r+1,u-=tt(r)):l=r;const{month:c,day:d}=je(l,u);return{year:l,month:c,day:d,...ht(e)}}function Fe(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:De(t,n,r),...ht(e)}}function Le(e){const{year:t,ordinal:n}=e,{month:r,day:i}=je(t,n);return{year:t,month:r,day:i,...ht(e)}}function $e(e,t){if(!Re(e.localWeekday)||!Re(e.localWeekNumber)||!Re(e.localWeekYear)){if(!Re(e.weekday)||!Re(e.weekNumber)||!Re(e.weekYear))throw new c("Cannot mix locale-based week fields with ISO-based week fields");return Re(e.localWeekday)||(e.weekday=e.localWeekday),Re(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Re(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 We(e){const t=Pe(e.year),n=Ye(e.month,1,12),r=Ye(e.day,1,nt(e.year,e.month));return t?n?!r&&Ne("day",e.day):Ne("month",e.month):Ne("year",e.year)}function ze(e){const{hour:t,minute:n,second:r,millisecond:i}=e,s=Ye(t,0,23)||24===t&&0===n&&0===r&&0===i,a=Ye(n,0,59),o=Ye(r,0,59),l=Ye(i,0,999);return s?a?o?!l&&Ne("millisecond",i):Ne("second",r):Ne("minute",n):Ne("hour",t)}function Re(e){return void 0===e}function Ze(e){return"number"==typeof e}function Pe(e){return"number"==typeof e&&e%1==0}function Be(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function qe(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ue(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{const i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function He(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _e(e){if(null==e)return null;if("object"!=typeof e)throw new h("Week settings must be an object");if(!Ye(e.firstDay,1,7)||!Ye(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Ye(e,1,7)))throw new h("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Ye(e,t,n){return Pe(e)&&e>=t&&e<=n}function Je(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Ge(e){return Re(e)||null===e||""===e?void 0:parseInt(e,10)}function Qe(e){return Re(e)||null===e||""===e?void 0:parseFloat(e)}function Ke(e){if(!Re(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Xe(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function et(e){return e%4==0&&(e%100!=0||e%400==0)}function tt(e){return et(e)?366:365}function nt(e,t){const n=(r=t-1)-12*Math.floor(r/12)+1;var r;return 2===n?et(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function rt(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 it(e,t,n){return-Ae(Ie(e,1,t),n)+t-1}function st(e,t=4,n=1){const r=it(e,t,n),i=it(e+1,t,n);return(tt(e)-r+i)/7}function at(e){return e>99?e:e>Te.twoDigitCutoffYear?1900+e:2e3+e}function ot(e,t,n,r=null){const i=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);const a={timeZoneName:t,...s},o=new Intl.DateTimeFormat(n,a).formatToParts(i).find(e=>"timezonename"===e.type.toLowerCase());return o?o.value:null}function lt(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 ut(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new h(`Invalid unit value ${e}`);return t}function ct(e,t){const n={};for(const r in e)if(He(e,r)){const i=e[r];if(null==i)continue;n[t(r)]=ut(i)}return n}function dt(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${Je(n,2)}:${Je(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${Je(n,2)}${Je(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ht(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,n)=>(t[n]=e[n],t),{})}(e)}const mt=["January","February","March","April","May","June","July","August","September","October","November","December"],ft=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yt=["J","F","M","A","M","J","J","A","S","O","N","D"];function gt(e){switch(e){case"narrow":return[...yt];case"short":return[...ft];case"long":return[...mt];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 pt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],bt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],wt=["M","T","W","T","F","S","S"];function vt(e){switch(e){case"narrow":return[...wt];case"short":return[...bt];case"long":return[...pt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const kt=["AM","PM"],xt=["Before Christ","Anno Domini"],St=["BC","AD"],Tt=["B","A"];function Mt(e){switch(e){case"narrow":return[...Tt];case"short":return[...St];case"long":return[...xt];default:return null}}function Ot(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Ct={D:p,DD:b,DDD:v,DDDD:k,t:x,tt:S,ttt:T,tttt:M,T:O,TT:C,TTT:N,TTTT:I,f:D,ff:A,fff:F,ffff:$,F:j,FF:E,FFF:L,FFFF:W};class Nt{static create(e,t={}){return new Nt(e,t)}static parseFormat(e){let t=null,n="",r=!1;const i=[];for(let s=0;s<e.length;s++){const a=e.charAt(s);"'"===a?((n.length>0||r)&&i.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||a===t?n+=a:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return Ct[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,n=void 0){if(this.opts.forceSimple)return Je(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(t,n)=>this.loc.extract(e,t,n),s=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 gt(t)[e.month-1]}(e,t):i(r?{month:t}:{month:t,day:"numeric"},"month"),o=(t,r)=>n?function(e,t){return vt(t)[e.weekday-1]}(e,t):i(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const n=Nt.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},u=t=>n?function(e,t){return Mt(t)[e.year<0?0:1]}(e,t):i({era:t},"era");return Ot(Nt.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 s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({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 kt[e.hour<12?0:1]}(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":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?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("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 l(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[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=Nt.parseFormat(t),s=i.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),a=e.shiftTo(...s.map(r).filter(e=>e));return Ot(i,((e,t)=>i=>{const s=r(i);if(s){const r=t.isNegativeDuration&&s!==t.largestUnit?n:1;let a;return a="negativeLargestOnly"===this.opts.signMode&&s!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(s)*r,i.length,a)}return i})(a,{isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]}))}}const It=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Dt(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function jt(...e){return t=>e.reduce(([e,n,r],i)=>{const[s,a,o]=i(t,r);return[{...e,...s},a||n,o]},[{},null,1]).slice(0,2)}function At(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 Et(...e){return(t,n)=>{const r={};let i;for(i=0;i<e.length;i++)r[e[i]]=Ge(t[n+i]);return[r,null,n+i]}}const Vt=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Ft=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Lt=RegExp(`${Ft.source}(?:${Vt.source}?(?:\\[(${It.source})\\])?)?`),$t=RegExp(`(?:[Tt]${Lt.source})?`),Wt=Et("weekYear","weekNumber","weekDay"),zt=Et("year","ordinal"),Rt=RegExp(`${Ft.source} ?(?:${Vt.source}|(${It.source}))?`),Zt=RegExp(`(?: ${Rt.source})?`);function Pt(e,t,n){const r=e[t];return Re(r)?n:Ge(r)}function Bt(e,t){return[{hours:Pt(e,t,0),minutes:Pt(e,t+1,0),seconds:Pt(e,t+2,0),milliseconds:Ke(e[t+3])},null,t+4]}function qt(e,t){const n=!e[t]&&!e[t+1],r=lt(e[t+1],e[t+2]);return[{},n?null:le.instance(r),t+3]}function Ut(e,t){return[{},e[t]?U.create(e[t]):null,t+1]}const Ht=RegExp(`^T?${Ft.source}$`),_t=/^-?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 Yt(e){const[t,n,r,i,s,a,o,l,u]=e,c="-"===t[0],d=l&&"-"===l[0],h=(e,t=!1)=>void 0!==e&&(t||e&&c)?-e:e;return[{years:h(Qe(n)),months:h(Qe(r)),weeks:h(Qe(i)),days:h(Qe(s)),hours:h(Qe(a)),minutes:h(Qe(o)),seconds:h(Qe(l),"-0"===l),milliseconds:h(Ke(u),d)}]}const Jt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Gt(e,t,n,r,i,s,a){const o={year:2===t.length?at(Ge(t)):Ge(t),month:ft.indexOf(n)+1,day:Ge(r),hour:Ge(i),minute:Ge(s)};return a&&(o.second=Ge(a)),e&&(o.weekday=e.length>3?pt.indexOf(e)+1:bt.indexOf(e)+1),o}const Qt=/^(?:(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 Kt(e){const[,t,n,r,i,s,a,o,l,u,c,d]=e,h=Gt(t,i,r,n,s,a,o);let m;return m=l?Jt[l]:u?0:lt(c,d),[h,new le(m)]}const Xt=/^(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$/,en=/^(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$/,tn=/^(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 nn(e){const[,t,n,r,i,s,a,o]=e;return[Gt(t,i,r,n,s,a,o),le.utcInstance]}function rn(e){const[,t,n,r,i,s,a,o]=e;return[Gt(t,o,n,r,i,s,a),le.utcInstance]}const sn=Dt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,$t),an=Dt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,$t),on=Dt(/(\d{4})-?(\d{3})/,$t),ln=Dt(Lt),un=jt(function(e,t){return[{year:Pt(e,t),month:Pt(e,t+1,1),day:Pt(e,t+2,1)},null,t+3]},Bt,qt,Ut),cn=jt(Wt,Bt,qt,Ut),dn=jt(zt,Bt,qt,Ut),hn=jt(Bt,qt,Ut),mn=jt(Bt),fn=Dt(/(\d{4})-(\d\d)-(\d\d)/,Zt),yn=Dt(Rt),gn=jt(Bt,qt,Ut),pn="Invalid Duration",bn={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}},wn={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},...bn},vn={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},...bn},kn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],xn=kn.slice(0).reverse();function Sn(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 Cn(r)}function Tn(e,t){let n=t.milliseconds??0;for(const r of xn.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Mn(e,t){const n=Tn(e,t)<0?-1:1;kn.reduceRight((r,i)=>{if(Re(t[i]))return r;if(r){const s=t[r]*n,a=e[i][r],o=Math.floor(s/a);t[i]+=o*n,t[r]-=o*a*n}return i},null),kn.reduce((n,r)=>{if(Re(t[r]))return n;if(n){const i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function On(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class Cn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?vn:wn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||ae.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Cn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new h("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Cn({values:ct(e,Cn.normalizeUnit),loc:ae.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Ze(e))return Cn.fromMillis(e);if(Cn.isDuration(e))return e;if("object"==typeof e)return Cn.fromObject(e);throw new h(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return At(e,[_t,Yt])}(e);return n?Cn.fromObject(n,t):Cn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return At(e,[Ht,mn])}(e);return n?Cn.fromObject(n,t):Cn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new h("need to specify a reason the Duration is invalid");const n=e instanceof Me?e:new Me(e,t);if(Te.throwOnInvalid)throw new u(n);return new Cn({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 d(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?Nt.create(this.loc,n).formatDurationFromString(this,e):pn}toHuman(e={}){if(!this.isValid)return pn;const t=!1!==e.showZeros,n=kn.map(n=>{const r=this.values[n];return Re(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);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 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+=Xe(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},wr.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?Tn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Cn.fromDurationLike(e),n={};for(const e of kn)(He(t.values,e)||He(this.values,e))&&(n[e]=t.get(e)+this.get(e));return Sn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=Cn.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]=ut(e(this.values[n],n));return Sn(this,{values:t},!0)}get(e){return this[Cn.normalizeUnit(e)]}set(e){return this.isValid?Sn(this,{values:{...this.values,...ct(e,Cn.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return Sn(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 Mn(this.matrix,e),Sn(this,{values:e},!0)}rescale(){return this.isValid?Sn(this,{values:On(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>Cn.normalizeUnit(e));const t={},n={},r=this.toObject();let i;for(const s of kn)if(e.indexOf(s)>=0){i=s;let e=0;for(const t in n)e+=this.matrix[t][s]*n[t],n[t]=0;Ze(r[s])&&(e+=r[s]);const a=Math.trunc(e);t[s]=a,n[s]=(1e3*e-1e3*a)/1e3}else Ze(r[s])&&(n[s]=r[s]);for(const e in n)0!==n[e]&&(t[i]+=e===i?n[e]:n[e]/this.matrix[i][e]);return Mn(this.matrix,t),Sn(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 Sn(this,{values:e},!0)}removeZeros(){return this.isValid?Sn(this,{values:On(this.values)},!0):this}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;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of kn)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Nn="Invalid Interval";class In{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 h("need to specify a reason the Interval is invalid");const n=e instanceof Me?e:new Me(e,t);if(Te.throwOnInvalid)throw new l(n);return new In({invalid:n})}static fromDateTimes(e,t){const n=vr(e),r=vr(t),i=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?In.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:In.invalid("missing or invalid end"):In.invalid("missing or invalid start")}(n,r);return null==i?new In({start:n,end:r}):i}static after(e,t){const n=Cn.fromDurationLike(t),r=vr(e);return In.fromDateTimes(r,r.plus(n))}static before(e,t){const n=Cn.fromDurationLike(t),r=vr(e);return In.fromDateTimes(r.minus(n),r)}static fromISO(e,t){const[n,r]=(e||"").split("/",2);if(n&&r){let e,i,s,a;try{e=wr.fromISO(n,t),i=e.isValid}catch(r){i=!1}try{s=wr.fromISO(r,t),a=s.isValid}catch(r){a=!1}if(i&&a)return In.fromDateTimes(e,s);if(i){const n=Cn.fromISO(r,t);if(n.isValid)return In.after(e,n)}else if(a){const e=Cn.fromISO(n,t);if(e.isValid)return In.before(s,e)}}return In.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 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?In.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(vr).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:r}=this,i=0;for(;r<this.e;){const e=t[i]||this.e,s=+e>+this.e?this.e:e;n.push(In.fromDateTimes(r,s)),r=s,i+=1}return n}splitBy(e){const t=Cn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,i=1;const s=[];for(;r<this.e;){const e=this.start.plus(t.mapUnits(e=>e*i));n=+e>+this.e?this.e:e,s.push(In.fromDateTimes(r,n)),r=n,i+=1}return s}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:In.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 In.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=[],i=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),s=Array.prototype.concat(...i).sort((e,t)=>e.time-t.time);for(const e of s)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(In.fromDateTimes(t,e.time)),t=null);return In.merge(r)}difference(...e){return In.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Nn}[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=p,t={}){return this.isValid?Nt.create(this.s.loc.clone(t),e).formatInterval(this):Nn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Nn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Nn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Nn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Nn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Cn.invalid(this.invalidReason)}mapEndpoints(e){return In.fromDateTimes(e(this.s),e(this.e))}}class Dn{static hasDST(e=Te.defaultZone){const t=wr.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 ce(e,Te.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ae.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ae.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ae.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ae.create(t,n,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||ae.create(t,n,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ae.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||ae.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ae.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ae.create(t,null,"gregory").eras(e)}static features(){return{relative:Be(),localeWeek:qe()}}}function jn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Cn.fromMillis(r).as("days"))}function An(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(de.hanidec))t+=me.indexOf(e[n]);else for(const e in he){const[n,i]=he[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const En=`[ ${String.fromCharCode(160)}]`,Vn=new RegExp(En,"g");function Fn(e){return e.replace(/\./g,"\\.?").replace(Vn,En)}function Ln(e){return e.replace(/\./g,"").replace(Vn," ").toLowerCase()}function $n(e,t){return null===e?null:{regex:RegExp(e.map(Fn).join("|")),deser:([n])=>e.findIndex(e=>Ln(n)===Ln(e))+t}}function Wn(e,t){return{regex:e,deser:([,e,t])=>lt(e,t),groups:t}}function zn(e){return{regex:e,deser:([e])=>e}}const Rn={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 Zn=null;function Pn(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Un(Nt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class Bn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Pn(Nt.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=ye(t),r=ye(t,"{2}"),i=ye(t,"{3}"),s=ye(t,"{4}"),a=ye(t,"{6}"),o=ye(t,"{1,2}"),l=ye(t,"{1,3}"),u=ye(t,"{1,6}"),c=ye(t,"{1,9}"),d=ye(t,"{2,4}"),h=ye(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 $n(t.eras("short"),0);case"GG":return $n(t.eras("long"),0);case"y":return An(u);case"yy":case"kk":return An(d,at);case"yyyy":case"kkkk":return An(s);case"yyyyy":return An(h);case"yyyyyy":return An(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return An(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return An(r);case"MMM":return $n(t.months("short",!0),1);case"MMMM":return $n(t.months("long",!0),1);case"LLL":return $n(t.months("short",!1),1);case"LLLL":return $n(t.months("long",!1),1);case"o":case"S":return An(l);case"ooo":case"SSS":return An(i);case"u":return zn(c);case"uu":return zn(o);case"uuu":case"E":case"c":return An(n);case"a":return $n(t.meridiems(),0);case"EEE":return $n(t.weekdays("short",!1),1);case"EEEE":return $n(t.weekdays("long",!1),1);case"ccc":return $n(t.weekdays("short",!0),1);case"cccc":return $n(t.weekdays("long",!0),1);case"Z":case"ZZ":return Wn(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return Wn(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return zn(/[a-z_+-/]{1,256}?/i);case" ":return zn(/[^\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 i in n)if(He(n,i)){const s=n[i],a=s.groups?s.groups+1:1;!s.literal&&s.token&&(e[s.token.val[0]]=s.deser(r.slice(t,t+a))),t+=a}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,i,s]=n?function(e){let t,n=null;return Re(e.z)||(n=U.create(e.z)),Re(e.Z)||(n||(n=new le(e.Z)),t=e.Z),Re(e.q)||(e.M=3*(e.q-1)+1),Re(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),Re(e.u)||(e.S=Ke(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(He(n,"a")&&He(n,"H"))throw new c("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:i,specificOffset:s}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function qn(e,t,n){return new Bn(e,n).explainFromTokens(t)}function Un(e,t){if(!e)return null;const n=Nt.create(t,e).dtFormatter((Zn||(Zn=wr.fromMillis(1555555555555)),Zn)),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>function(e,t,n){const{type:r,value:i}=e;if("literal"===r){const e=/^\s+$/.test(i);return{literal:!e,val:e?" ":i}}const s=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=Rn[a];if("object"==typeof o&&(o=o[s]),o)return{literal:!1,val:o}}(t,e,i))}const Hn="Invalid DateTime",_n=864e13;function Yn(e){return new Me("unsupported zone",`the zone "${e.name}" is not supported`)}function Jn(e){return null===e.weekData&&(e.weekData=Ee(e.c)),e.weekData}function Gn(e){return null===e.localWeekData&&(e.localWeekData=Ee(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Qn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new wr({...n,...t,old:n})}function Kn(e,t,n){let r=e-60*t*1e3;const i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;const s=n.offset(r);return i===s?[r,i]:[e-60*Math.min(i,s)*1e3,Math.max(i,s)]}function Xn(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 er(e,t,n){return Kn(rt(e),t,n)}function tr(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s={...e.c,year:r,month:i,day:Math.min(e.c.day,nt(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=Cn.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=rt(s);let[l,u]=Kn(o,n,e.zone);return 0!==a&&(l+=a,u=e.zone.offset(l)),{ts:l,o:u}}function nr(e,t,n,r,i,s){const{setZone:a,zone:o}=n;if(e&&0!==Object.keys(e).length||t){const r=t||o,i=wr.fromObject(e,{...n,zone:r,specificOffset:s});return a?i:i.setZone(o)}return wr.invalid(new Me("unparsable",`the input "${i}" can't be parsed as ${r}`))}function rr(e,t,n=!0){return e.isValid?Nt.create(ae.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ir(e,t,n){const r=e.c.year>9999||e.c.year<0;let i="";if(r&&e.c.year>=0&&(i+="+"),i+=Je(e.c.year,r?6:4),"year"===n)return i;if(t){if(i+="-",i+=Je(e.c.month),"month"===n)return i;i+="-"}else if(i+=Je(e.c.month),"month"===n)return i;return i+=Je(e.c.day),i}function sr(e,t,n,r,i,s,a){let o=!n||0!==e.c.millisecond||0!==e.c.second,l="";switch(a){case"day":case"month":case"year":break;default:if(l+=Je(e.c.hour),"hour"===a)break;if(t){if(l+=":",l+=Je(e.c.minute),"minute"===a)break;o&&(l+=":",l+=Je(e.c.second))}else{if(l+=Je(e.c.minute),"minute"===a)break;o&&(l+=Je(e.c.second))}if("second"===a)break;!o||r&&0===e.c.millisecond||(l+=".",l+=Je(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&0===e.offset&&!s?l+="Z":e.o<0?(l+="-",l+=Je(Math.trunc(-e.o/60)),l+=":",l+=Je(Math.trunc(-e.o%60))):(l+="+",l+=Je(Math.trunc(e.o/60)),l+=":",l+=Je(Math.trunc(e.o%60)))),s&&(l+="["+e.zone.ianaName+"]"),l}const ar={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},or={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},lr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ur=["year","month","day","hour","minute","second","millisecond"],cr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],dr=["year","ordinal","hour","minute","second","millisecond"];function hr(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new d(e);return t}function mr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return hr(e)}}function fr(e,t){const n=ce(t.zone,Te.defaultZone);if(!n.isValid)return wr.invalid(Yn(n));const r=ae.fromObject(t);let i,s;if(Re(e.year))i=Te.now();else{for(const t of ur)Re(e[t])&&(e[t]=ar[t]);const t=We(e)||ze(e);if(t)return wr.invalid(t);const r=function(e){if(void 0===pr&&(pr=Te.now()),"iana"!==e.type)return e.offset(pr);const t=e.name;let n=br.get(t);return void 0===n&&(n=e.offset(pr),br.set(t,n)),n}(n);[i,s]=er(e,r,n)}return new wr({ts:i,zone:n,loc:r,o:s})}function yr(e,t,n){const r=!!Re(n.round)||n.round,i=Re(n.rounding)?"trunc":n.rounding,s=(e,s)=>(e=Xe(e,r||n.calendary?0:2,n.calendary?"round":i),t.loc.clone(n).relFormatter(n).format(e,s)),a=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return s(a(n.unit),n.unit);for(const e of n.units){const t=a(e);if(Math.abs(t)>=1)return s(t,e)}return s(e>t?-0:0,n.units[n.units.length-1])}function gr(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let pr;const br=new Map;class wr{constructor(e){const t=e.zone||Te.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Me("invalid input"):null)||(t.isValid?null:Yn(t));this.ts=Re(e.ts)?Te.now():e.ts;let r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{const s=Ze(e.o)&&!e.old?e.o:t.offset(this.ts);r=Xn(this.ts,s),n=Number.isNaN(r.year)?new Me("invalid input"):null,r=n?null:r,i=n?null:s}this._zone=t,this.loc=e.loc||ae.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new wr({})}static local(){const[e,t]=gr(arguments),[n,r,i,s,a,o,l]=t;return fr({year:n,month:r,day:i,hour:s,minute:a,second:o,millisecond:l},e)}static utc(){const[e,t]=gr(arguments),[n,r,i,s,a,o,l]=t;return e.zone=le.utcInstance,fr({year:n,month:r,day:i,hour:s,minute:a,second:o,millisecond:l},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return wr.invalid("invalid input");const i=ce(t.zone,Te.defaultZone);return i.isValid?new wr({ts:n,zone:i,loc:ae.fromObject(t)}):wr.invalid(Yn(i))}static fromMillis(e,t={}){if(Ze(e))return e<-_n||e>_n?wr.invalid("Timestamp out of range"):new wr({ts:e,zone:ce(t.zone,Te.defaultZone),loc:ae.fromObject(t)});throw new h(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ze(e))return new wr({ts:1e3*e,zone:ce(t.zone,Te.defaultZone),loc:ae.fromObject(t)});throw new h("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=ce(t.zone,Te.defaultZone);if(!n.isValid)return wr.invalid(Yn(n));const r=ae.fromObject(t),i=ct(e,mr),{minDaysInFirstWeek:s,startOfWeek:a}=$e(i,r),o=Te.now(),l=Re(t.specificOffset)?n.offset(o):t.specificOffset,u=!Re(i.ordinal),d=!Re(i.year),h=!Re(i.month)||!Re(i.day),m=d||h,f=i.weekYear||i.weekNumber;if((m||u)&&f)throw new c("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new c("Can't mix ordinal dates with month/day");const y=f||i.weekday&&!m;let g,p,b=Xn(o,l);y?(g=cr,p=or,b=Ee(b,s,a)):u?(g=dr,p=lr,b=Fe(b)):(g=ur,p=ar);let w=!1;for(const e of g)Re(i[e])?i[e]=w?p[e]:b[e]:w=!0;const v=y?function(e,t=4,n=1){const r=Pe(e.weekYear),i=Ye(e.weekNumber,1,st(e.weekYear,t,n)),s=Ye(e.weekday,1,7);return r?i?!s&&Ne("weekday",e.weekday):Ne("week",e.weekNumber):Ne("weekYear",e.weekYear)}(i,s,a):u?function(e){const t=Pe(e.year),n=Ye(e.ordinal,1,tt(e.year));return t?!n&&Ne("ordinal",e.ordinal):Ne("year",e.year)}(i):We(i),k=v||ze(i);if(k)return wr.invalid(k);const x=y?Ve(i,s,a):u?Le(i):i,[S,T]=er(x,l,n),M=new wr({ts:S,zone:n,o:T,loc:r});return i.weekday&&m&&e.weekday!==M.weekday?wr.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${M.toISO()}`):M.isValid?M:wr.invalid(M.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return At(e,[sn,un],[an,cn],[on,dn],[ln,hn])}(e);return nr(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return At(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Qt,Kt])}(e);return nr(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return At(e,[Xt,nn],[en,nn],[tn,rn])}(e);return nr(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Re(e)||Re(t))throw new h("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=n,s=ae.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[a,o,l,u]=function(e,t,n){const{result:r,zone:i,specificOffset:s,invalidReason:a}=qn(e,t,n);return[r,i,s,a]}(s,e,t);return u?wr.invalid(u):nr(a,o,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return wr.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return At(e,[fn,un],[yn,gn])}(e);return nr(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new h("need to specify a reason the DateTime is invalid");const n=e instanceof Me?e:new Me(e,t);if(Te.throwOnInvalid)throw new o(n);return new wr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Un(e,ae.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Pn(Nt.parseFormat(e),ae.fromObject(t)).map(e=>e.val).join("")}static resetCache(){pr=void 0,br.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Jn(this).weekYear:NaN}get weekNumber(){return this.isValid?Jn(this).weekNumber:NaN}get weekday(){return this.isValid?Jn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Gn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Gn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Gn(this).weekYear:NaN}get ordinal(){return this.isValid?Fe(this.c).ordinal:NaN}get monthShort(){return this.isValid?Dn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Dn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Dn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Dn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=rt(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),s=this.zone.offset(n-r*t),a=this.zone.offset(n-i*t);if(s===a)return[this];const o=n-s*t,l=n-a*t,u=Xn(o,s),c=Xn(l,a);return u.hour===c.hour&&u.minute===c.minute&&u.second===c.second&&u.millisecond===c.millisecond?[Qn(this,{ts:o}),Qn(this,{ts:l})]:[this]}get isInLeapYear(){return et(this.year)}get daysInMonth(){return nt(this.year,this.month)}get daysInYear(){return this.isValid?tt(this.year):NaN}get weeksInWeekYear(){return this.isValid?st(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?st(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=Nt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(le.instance(e),t)}toLocal(){return this.setZone(Te.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=ce(e,Te.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=er(n,t,e)}return Qn(this,{ts:r,zone:e})}return wr.invalid(Yn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Qn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=ct(e,mr),{minDaysInFirstWeek:n,startOfWeek:r}=$e(t,this.loc),i=!Re(t.weekYear)||!Re(t.weekNumber)||!Re(t.weekday),s=!Re(t.ordinal),a=!Re(t.year),o=!Re(t.month)||!Re(t.day),l=a||o,u=t.weekYear||t.weekNumber;if((l||s)&&u)throw new c("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new c("Can't mix ordinal dates with month/day");let d;i?d=Ve({...Ee(this.c,n,r),...t},n,r):Re(t.ordinal)?(d={...this.toObject(),...t},Re(t.day)&&(d.day=Math.min(nt(d.year,d.month),d.day))):d=Le({...Fe(this.c),...t});const[h,m]=er(d,this.o,this.zone);return Qn(this,{ts:h,o:m})}plus(e){return this.isValid?Qn(this,tr(this,Cn.fromDurationLike(e))):this}minus(e){return this.isValid?Qn(this,tr(this,Cn.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=Cn.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;if("quarters"===r){const e=Math.ceil(this.month/3);n.month=3*(e-1)+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Nt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Hn}toLocaleString(e=p,t={}){return this.isValid?Nt.create(this.loc.clone(t),e).formatDateTime(this):Hn}toLocaleParts(e={}){return this.isValid?Nt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1,precision:s="milliseconds"}={}){if(!this.isValid)return null;const a="extended"===e;let o=ir(this,a,s=hr(s));return ur.indexOf(s)>=3&&(o+="T"),o+=sr(this,a,t,n,r,i,s),o}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?ir(this,"extended"===e,hr(t)):null}toISOWeekDate(){return rr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:s="extended",precision:a="milliseconds"}={}){return this.isValid?(a=hr(a),(r&&ur.indexOf(a)>=3?"T":"")+sr(this,"extended"===s,t,e,n,i,a)):null}toRFC2822(){return rr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return rr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ir(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),rr(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Hn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return Cn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=(o=t,Array.isArray(o)?o:[o]).map(Cn.normalizeUnit),s=e.valueOf()>this.valueOf(),a=function(e,t,n,r){let[i,s,a,o]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=jn(e,t);return(n-n%7)/7}],["days",jn]],i={},s=e;let a,o;for(const[l,u]of r)n.indexOf(l)>=0&&(a=l,i[l]=u(e,t),o=s.plus(i),o>t?(i[l]--,(e=s.plus(i))>t&&(o=e,i[l]--,e=s.plus(i))):e=o);return[e,i,o,a]}(e,t,n);const l=t-i,u=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===u.length&&(a<t&&(a=i.plus({[o]:1})),a!==i&&(s[o]=(s[o]||0)+l/(a-i)));const c=Cn.fromObject(s,r);return u.length>0?Cn.fromMillis(l,r).shiftTo(...u).plus(c):c}(s?this:e,s?e:this,i,r);var o;return s?a.negate():a}diffNow(e="milliseconds",t={}){return this.diff(wr.now(),e,t)}until(e){return this.isValid?In.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||wr.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),yr(t,this.plus(n),{...e,numeric:"always",units:r,unit:i})}toRelativeCalendar(e={}){return this.isValid?yr(e.base||wr.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(wr.isDateTime))throw new h("min requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(wr.isDateTime))throw new h("max requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:i=null}=n;return qn(ae.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return wr.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,i=ae.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Bn(i,e)}static fromFormatParser(e,t,n={}){if(Re(e)||Re(t))throw new h("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=n,s=ae.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!s.equals(t.locale))throw new h(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${t.locale}`);const{result:a,zone:o,specificOffset:l,invalidReason:u}=t.explainFromTokens(e);return u?wr.invalid(u):nr(a,o,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return p}static get DATE_MED(){return b}static get DATE_MED_WITH_WEEKDAY(){return w}static get DATE_FULL(){return v}static get DATE_HUGE(){return k}static get TIME_SIMPLE(){return x}static get TIME_WITH_SECONDS(){return S}static get TIME_WITH_SHORT_OFFSET(){return T}static get TIME_WITH_LONG_OFFSET(){return M}static get TIME_24_SIMPLE(){return O}static get TIME_24_WITH_SECONDS(){return C}static get TIME_24_WITH_SHORT_OFFSET(){return N}static get TIME_24_WITH_LONG_OFFSET(){return I}static get DATETIME_SHORT(){return D}static get DATETIME_SHORT_WITH_SECONDS(){return j}static get DATETIME_MED(){return A}static get DATETIME_MED_WITH_SECONDS(){return E}static get DATETIME_MED_WITH_WEEKDAY(){return V}static get DATETIME_FULL(){return F}static get DATETIME_FULL_WITH_SECONDS(){return L}static get DATETIME_HUGE(){return $}static get DATETIME_HUGE_WITH_SECONDS(){return W}}function vr(e){if(wr.isDateTime(e))return e;if(e&&e.valueOf&&Ze(e.valueOf()))return wr.fromJSDate(e);if(e&&"object"==typeof e)return wr.fromObject(e);throw new h(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const kr=r.createContext(void 0),xr=({children:t,...n})=>e.jsx(kr.Provider,{value:n,children:t}),Sr=()=>{const e=r.useContext(kr);if(!e)throw new Error("useBaseTableContext must be used within a BaseTableProvider");return e};function Tr(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,r.createElement(t,{key:e})]))}function Mr({blocksOverride:e,defaultBlocks:t,defaultBlockOrder:n,children:r}){if(void 0===e)return r({blocks:t,blockOrder:n});if("function"==typeof e){const{blocks:i,blockOrder:s}=e({defaultBlocks:t,defaultBlockOrder:n});return r({blocks:i,blockOrder:s})}return e}function Or(e,t){const n={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}function Cr(...e){return e.flat().filter(Boolean).join(" ")}function Nr(e,...t){const n={...e};for(const e of t)delete n[e];return n}const Ir=["isLoading","headerTitle","headerActions","searchChipsTitle","searchChips","onSearchChipDelete","tabs","activeTab","onTabChange","columns","rows","actionColumn","rowActions","pagination","noRowsOverlay","onRowClick","getRowId"];function Dr(t,i,s){const a=i[t.field],o={row:i,rowIndex:s,column:t};if(t.renderCell)return t.renderCell(a,o);const l=t.valueFormatter?t.valueFormatter(a,o):a;return e.jsx(n.Typography,{variant:"body2",children:(u=l,null==u?"":"string"==typeof u||"number"==typeof u||"boolean"==typeof u?String(u):r.isValidElement(u)?u:"")});var u}function jr(e){return e.width??180}function Ar(e,t){return e?.pin?{position:"sticky",..."left"===e.pin?{left:e.left??0}:{right:e.right??0},zIndex:t?12:4,isolation:"isolate",...t?{backgroundColor:"common.white",backgroundImage:"none",backgroundClip:"padding-box",opacity:1,"&::before":{content:'""',position:"absolute",inset:0,zIndex:-1,backgroundColor:e=>e.palette.common.white}}:{},...t?{}:{backgroundColor:"inherit"},...e.isLeftBoundary?{borderRight:e=>`1px solid ${e.palette.divider}`}:{},...e.isRightBoundary?{borderLeft:e=>`1px solid ${e.palette.divider}`}:{}}:{}}function Er(e,t,n){const r="left"===e;return{position:"absolute",top:0,bottom:0,...r?{left:t}:{right:t},width:0,pointerEvents:"none",zIndex:7,"&::after":{content:'""',position:"absolute",top:0,bottom:0,...r?{left:0}:{right:0},width:8,background:r?"linear-gradient(to right, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0))":"linear-gradient(to left, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0))",opacity:n?1:0,transition:e=>e.transitions.create("opacity",{duration:160})}}}function Vr(e,t,n){return r.isValidElement(e)?r.cloneElement(e,void 0===n?t:{key:n,...t}):e}function Fr(t,n){return n.map(e=>({key:String(e),block:t[String(e)]})).filter(({block:e})=>void 0!==e).map(({key:t,block:n})=>e.jsx(r.Fragment,{children:n},t))}const Lr=t=>{const r=Sr(),{headerTitle:i}=r,{children:s,className:a,component:o="h1",variant:l="h4",...u}=t;return s||i?e.jsx(n.Typography,{component:o,variant:l,className:Cr("nbb-base-table-header-title",a),...u,children:s||i}):null},$r=t=>{const{headerActions:r}=Sr(),{children:i,className:s,sx:a=[],...o}=t;return i||r?e.jsx(n.Stack,{direction:"row",className:Cr("nbb-base-table-header-actions",s),sx:[{alignItems:"center"},...Array.isArray(a)?a:[a]],...o,children:i||r}):null},Wr=Tr({title:Lr,actions:$r}),zr=t=>{const{headerTitle:r,headerActions:i}=Sr(),{children:s,className:a,sx:o=[],...l}=t;return s||r||i?e.jsx(n.Stack,{direction:"row",className:Cr("nbb-base-table-header",a),sx:[{justifyContent:"space-between",alignItems:"center"},...Array.isArray(o)?o:[o]],...l,children:e.jsx(Mr,{defaultBlocks:Wr,defaultBlockOrder:Object.keys(Wr),blocksOverride:s,children:({blocks:e,blockOrder:t})=>Fr(e,t)})}):null},Rr=t=>{const{children:r,className:i,sx:s=[],...a}=t;return e.jsx(n.Stack,{className:Cr("nbb-base-table-content-loader",i),sx:[{alignItems:"center",justifyContent:"center",width:"100%",height:e=>e.spacing(18.25)},...Array.isArray(s)?s:[s]],...a,children:r||e.jsx(n.CircularProgress,{})})},Zr=t=>{const{tabs:r,activeTab:i,onTabChange:s}=Sr(),{children:a,className:o,value:l,onChange:u,variant:c,sx:d,tabProps:h,centered:m=!1,...f}=t,{sx:y,...g}=h??{},p=void 0===d?[]:Array.isArray(d)?d:[d],b=void 0===y?[]:Array.isArray(y)?y:[y],w=l??i,v=c??"scrollable",k=u??((e,t)=>{s?.(t)});return r&&0!==r.length&&void 0!==w?e.jsx(n.Tabs,{value:w,onChange:k,variant:v,scrollButtons:"auto",allowScrollButtonsMobile:!0,centered:m,className:Cr("nbb-base-table-tabs",o),sx:[{minHeight:44,position:"relative",width:"100%",overflow:"hidden","& .MuiTabs-scroller":{overflowX:"auto"},"& .MuiTabs-list, & .MuiTabs-flexContainer":{minWidth:"max-content",justifyContent:"flex-start",margin:0},"& .MuiTabs-scrollButtons":{position:"absolute",top:0,bottom:0,zIndex:2,width:32,backgroundColor:"background.paper",opacity:1,visibility:"visible",transition:"opacity 160ms ease, visibility 160ms ease"},"& .MuiTabs-scrollButtons:first-of-type":{left:0,borderRight:e=>`1px solid ${e.palette.divider}`},"& .MuiTabs-scrollButtons:last-of-type":{right:0,borderLeft:e=>`1px solid ${e.palette.divider}`},"& .MuiTabs-scrollButtons.Mui-disabled":{opacity:0,visibility:"hidden",pointerEvents:"none"}},...p],...f,children:a||r.map(t=>e.jsx(n.Tab,{value:t.value,...void 0!==t.disabled?{disabled:t.disabled}:{},sx:[{minHeight:44,minWidth:{xs:130,sm:182},flex:"0 0 auto",textTransform:"none"},...b],label:t.label,...g},String(t.value)))}):null},Pr=r=>{const i=Sr(),{searchChipsTitle:s,searchChips:a,onSearchChipDelete:o}=Or(i,r),{children:l,className:u,sx:c=[],...d}=r,h=a??[];return l||0!==h.length?e.jsx(n.Stack,{className:Cr("nbb-base-table-search-chips",u),sx:[{width:"100%",minWidth:0,gap:{xs:1,sm:3}},...Array.isArray(c)?c:[c]],...Nr(d,...Ir),children:l||e.jsxs(e.Fragment,{children:[s&&e.jsx(n.Typography,{sx:e=>({fontSize:{xs:e.typography.body1.fontSize,sm:e.typography.h6.fontSize},fontWeight:600}),children:s}),e.jsx(n.Stack,{direction:"row",spacing:{xs:1,sm:2},useFlexGap:!0,flexWrap:"wrap",children:h.map((r,i)=>e.jsx(n.Chip,{label:r.label,deleteIcon:e.jsx(t.CloseOutlined,{fontSize:"inherit"}),...o&&{onDelete:e=>o(r,i,e)},sx:e=>({height:"auto",borderRadius:1.5,bgcolor:e.palette.grey[50],py:e.spacing(1.25),px:{xs:e.spacing(1.5),sm:e.spacing(2)},"& .MuiChip-label":{px:0,fontSize:{xs:e.typography.body2.fontSize,sm:e.typography.body1.fontSize},lineHeight:1.75},"& .MuiChip-deleteIcon":{m:0,ml:e.spacing(1),fontSize:e.typography.body1.fontSize,color:e.palette.text.secondary}})},r.key))})]})}):null},Br=t=>{const{className:r,column:i,pinMeta:s,labelProps:a,children:o,sx:l,...u}=t,{className:c,sx:d,...h}=a??{},m=void 0===l?[]:Array.isArray(l)?l:[l],f=void 0===d?[]:Array.isArray(d)?d:[d],y=i.width??(s?.pin?jr(i):void 0);return e.jsx(n.TableCell,{className:Cr("nbb-base-table-content-grid-head-cell",r),...s?.pin?{"data-pinned":s.pin}:{},...s?.isLeftBoundary?{"data-pinned-boundary":"left"}:{},...s?.isRightBoundary?{"data-pinned-boundary":"right"}:{},...i.align?{align:i.align}:{},sx:[{py:1,verticalAlign:"middle",position:"relative",zIndex:10,backgroundColor:"common.white",backgroundImage:"none",opacity:1,...y?{width:y,minWidth:y}:{},...Ar(s,!0)},...m],...u,children:o||e.jsx(n.Typography,{variant:"body2",color:"text.secondary",...void 0!==c?{className:c}:{},sx:[{fontWeight:"bold"},...f],...h,children:i.headLabel})})},qr=t=>{const{className:r,column:i,pinMeta:s,row:a,rowIndex:o,children:l,sx:u,...c}=t,d=void 0===u?[]:Array.isArray(u)?u:[u],h=i.width??(s?.pin?jr(i):void 0);return e.jsx(n.TableCell,{className:Cr("nbb-base-table-content-grid-body-cell",r),...s?.pin?{"data-pinned":s.pin}:{},...s?.isLeftBoundary?{"data-pinned-boundary":"left"}:{},...s?.isRightBoundary?{"data-pinned-boundary":"right"}:{},...i.align?{align:i.align}:{},sx:[{py:1,height:72,verticalAlign:"middle",wordBreak:"break-word",...h?{width:h,minWidth:h}:{},...Ar(s,!1)},...d],...c,children:l||Dr(i,a,o)})},Ur=t=>{const{className:r,children:i,pinMeta:s,sx:a,...o}=t,l=void 0===a?[]:Array.isArray(a)?a:[a];return e.jsx(n.TableCell,{className:Cr("nbb-base-table-content-grid-head-action-cell",r),...s?.pin?{"data-pinned":s.pin}:{},...s?.isLeftBoundary?{"data-pinned-boundary":"left"}:{},...s?.isRightBoundary?{"data-pinned-boundary":"right"}:{},sx:[{width:56,py:1,verticalAlign:"middle",position:"relative",zIndex:10,backgroundColor:"common.white",backgroundImage:"none",opacity:1},Ar(s,!0),...l],...o,children:i})},Hr=r=>{const{className:i,row:s,showActionMenu:a,pinMeta:o,onOpenRowMenu:l,iconButtonProps:u,icon:c,children:d,sx:h,...m}=r,{sx:f,...y}=u??{},g=void 0===h?[]:Array.isArray(h)?h:[h],p=void 0===f?[]:Array.isArray(f)?f:[f],b=a&&Boolean(l);return e.jsx(n.TableCell,{className:Cr("nbb-base-table-content-grid-body-action-cell",i),...o?.pin?{"data-pinned":o.pin}:{},...o?.isLeftBoundary?{"data-pinned-boundary":"left"}:{},...o?.isRightBoundary?{"data-pinned-boundary":"right"}:{},sx:[{width:56,py:1,height:72,verticalAlign:"middle",textAlign:"right",...Ar(o,!1)},...g],...m,children:d||e.jsx(n.IconButton,{"aria-label":"row action",size:"small",sx:[{color:"text.secondary",visibility:b?"visible":"hidden"},...p],onClick:e=>{l&&a&&l(e,s)},disabled:!b,tabIndex:b?0:-1,...y,children:c||e.jsx(t.MoreVertOutlined,{})})})},_r=Tr({cell:Br,actionCell:Ur}),Yr=t=>{const{className:i,children:s,columns:a,rowActions:o,headCell:l,actionHeadCell:u,columnPinMeta:c,actionColumnPinMeta:d,sx:h,...m}=t,f=void 0===h?[]:Array.isArray(h)?h:[h];return e.jsx(n.TableRow,{className:Cr("nbb-base-table-content-grid-head-row",i),sx:[{backgroundColor:"background.paper"},...f],...m,children:e.jsx(Mr,{defaultBlocks:_r,defaultBlockOrder:Object.keys(_r),blocksOverride:s,children:({blocks:t})=>{const n=t.cell,i=t.actionCell;return e.jsxs(e.Fragment,{children:[a.map((t,i)=>{const s=c?.[i],a="function"==typeof l?l({column:t,columnIndex:i,...void 0!==s?{pinMeta:s}:{}}):l;return e.jsx(r.Fragment,{children:a??Vr(n,{column:t,...void 0!==s?{pinMeta:s}:{}},`cell-${String(t.field)}-${i}`)},`${String(t.field)}-${i}`)}),o&&(("function"==typeof u?u({rowActions:o,...void 0!==d?{actionColumnPinMeta:d}:{}}):u)??Vr(i,{...void 0!==d?{pinMeta:d}:{}},"action-cell"))]})}})})},Jr=Tr({cell:qr,actionCell:Hr}),Gr=t=>{const{className:i,children:s,row:a,rowIndex:o,columns:l,rowActions:u,onRowClick:c,onOpenRowMenu:d,bodyCell:h,actionBodyCell:m,columnPinMeta:f,actionColumnPinMeta:y,sx:g,onClick:p,hover:b,...w}=t,v=void 0===g?[]:Array.isArray(g)?g:[g],k=(u?.(a)??[]).length>0,x=b??Boolean(c),S=c?e=>{p?.(e),e.defaultPrevented||c(a)}:p;return e.jsx(n.TableRow,{className:Cr("nbb-base-table-content-grid-body-row",i),hover:!1,sx:[{backgroundColor:"common.white","& > .MuiTableCell-root":{backgroundColor:"inherit",transition:e=>e.transitions.create("background-color",{duration:120})}},...x?[{...c?{cursor:"pointer"}:{},"&:hover":{backgroundColor:e=>e.palette.grey[100]||e.palette.action.hover},"&:hover > .MuiTableCell-root":{backgroundColor:"inherit"},"&:hover > .MuiTableCell-root[data-pinned]":{backgroundColor:"inherit"},"&.MuiTableRow-hover:hover":{backgroundColor:e=>e.palette.grey[100]||e.palette.action.hover},"&.MuiTableRow-hover:hover > .MuiTableCell-root":{backgroundColor:"inherit"},"&.MuiTableRow-hover:hover > .MuiTableCell-root[data-pinned]":{backgroundColor:"inherit"}}]:[],...v],onClick:S,...w,children:e.jsx(Mr,{defaultBlocks:Jr,defaultBlockOrder:Object.keys(Jr),blocksOverride:s,children:({blocks:t})=>{const n=t.cell,i=t.actionCell;return e.jsxs(e.Fragment,{children:[l.map((t,i)=>e.jsx(r.Fragment,{children:(()=>{const e=f?.[i];return"function"==typeof h?h({column:t,columnIndex:i,...void 0!==e?{pinMeta:e}:{},row:a,rowIndex:o}):h})()??Vr(n,{column:t,...void 0!==f?.[i]?{pinMeta:f[i]}:{},row:a,rowIndex:o},`cell-${String(t.field)}-${i}`)},`${String(t.field)}-${i}`)),u&&(("function"==typeof m?m({row:a,rowIndex:o,showActionMenu:k,...void 0!==y?{actionColumnPinMeta:y}:{},onOpenRowMenu:d}):m)??Vr(i,{row:a,showActionMenu:k,...void 0!==y?{pinMeta:y}:{},onOpenRowMenu:d},"action-cell"))]})}})})},Qr=Tr({row:Yr}),Kr=t=>{const{className:r,children:i,columns:s,rowActions:a,headRow:o,headCell:l,actionHeadCell:u,columnPinMeta:c,actionColumnPinMeta:d,sx:h,...m}=t,f=void 0===h?[]:Array.isArray(h)?h:[h],y="function"==typeof o?o({columns:s,rowActions:a,...void 0!==c?{columnPinMeta:c}:{},...void 0!==d?{actionColumnPinMeta:d}:{}}):o;return e.jsx(n.TableHead,{className:Cr("nbb-base-table-content-grid-head",r),sx:[{width:"100%",minWidth:0,backgroundColor:"common.white",backgroundImage:"none","& .MuiTableCell-root":{backgroundColor:"common.white",backgroundImage:"none",backgroundClip:"padding-box",opacity:1},position:"relative",zIndex:6},...f],...m,children:e.jsx(Mr,{defaultBlocks:Qr,defaultBlockOrder:Object.keys(Qr),blocksOverride:i,children:({blocks:e})=>y??Vr(e.row,{columns:s,rowActions:a,headCell:l,actionHeadCell:u,...void 0!==c?{columnPinMeta:c}:{},...void 0!==d?{actionColumnPinMeta:d}:{}})})})},Xr=Tr({row:Gr}),ei=t=>{const{className:i,children:s,columns:a,rows:o,rowActions:l,onRowClick:u,getRowId:c,onOpenRowMenu:d,bodyRow:h,bodyCell:m,actionBodyCell:f,columnPinMeta:y,actionColumnPinMeta:g,sx:p,...b}=t,w=void 0===p?[]:Array.isArray(p)?p:[p];return e.jsx(n.TableBody,{className:Cr("nbb-base-table-content-grid-body",i),sx:w,...b,children:e.jsx(Mr,{defaultBlocks:Xr,defaultBlockOrder:Object.keys(Xr),blocksOverride:s,children:({blocks:t})=>{const n=t.row;return o.map((t,i)=>{const s=c?.(t,i)??t.id??i,o="function"==typeof h?h({row:t,rowIndex:i,columns:a,rowActions:l,onRowClick:u,onOpenRowMenu:d,...void 0!==y?{columnPinMeta:y}:{},...void 0!==g?{actionColumnPinMeta:g}:{}}):h;return e.jsx(r.Fragment,{children:o??Vr(n,{row:t,rowIndex:i,columns:a,rowActions:l,onRowClick:u,onOpenRowMenu:d,bodyCell:m,actionBodyCell:f,...void 0!==y?{columnPinMeta:y}:{},...void 0!==g?{actionColumnPinMeta:g}:{}},`row-${String(s)}`)},String(s))})}})})},ti=t=>{const{className:r,children:i,menuAnchorEl:s,menuRow:a,menuActions:o,onClose:l,anchorOrigin:u={vertical:"bottom",horizontal:"right"},transformOrigin:c={vertical:"top",horizontal:"right"},...d}=t;return e.jsx(n.Menu,{className:Cr("nbb-base-table-content-grid-row-menu",r),anchorEl:s,open:Boolean(s&&a),onClose:l,anchorOrigin:u,transformOrigin:c,...d,children:i||o.map((t,r)=>e.jsxs(n.MenuItem,{...void 0!==t.disabled?{disabled:t.disabled}:{},onClick:e=>{e.stopPropagation(),a&&t.onClick(a),l()},children:[t.icon&&e.jsx(n.ListItemIcon,{children:t.icon}),t.label]},`${String(t.label)}-${r}`))})},ni=r=>{const{noRowsOverlay:i}=Or(Sr(),r),{children:s,className:a,sx:o,...l}=r,u=void 0===o?[]:Array.isArray(o)?o:[o],c={icon:e.jsx(t.PersonOutlined,{}),title:"No Item",...i};return e.jsx(n.Box,{className:Cr("nbb-base-table-content-empty-state",a),sx:[e=>({alignItems:"center",backgroundColor:e.palette.grey[50]||e.palette.background.default,borderRadius:e.spacing(1),boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",padding:`${e.spacing(4.375)} 0`,width:"100%",minHeight:e.spacing(18.25),gap:e.spacing(1)}),...u],...Nr(l,...Ir),children:s||e.jsxs(e.Fragment,{children:[e.jsx(n.Box,{sx:{"& .MuiSvgIcon-root":{fontSize:e=>e.spacing(5),color:"text.disabled"}},children:c.icon}),e.jsx(n.Typography,{variant:"body1",sx:{fontWeight:e=>e.typography.h6.fontWeight,color:"text.disabled"},children:c.title}),c.description&&e.jsx(n.Typography,{variant:"body2",color:"text.secondary",children:c.description}),c.action&&e.jsx(n.Button,{variant:"outlined",size:"small",onClick:c.action.onClick,startIcon:c.action.icon,...void 0!==c.action.disabled?{disabled:c.action.disabled}:{},children:c.action.label})]})})},ri=t=>{const{className:i,children:s,tableProps:a,onPinnedShadowChange:o,onHorizontalOverflowChange:l,showLeftPinnedShadow:u=!1,showRightPinnedShadow:c=!1,sx:d,...h}=t,{sx:m,...f}=a??{},y=r.useRef(null),g=r.useRef(null),[p,b]=r.useState({left:null,right:null}),w=void 0===d?[]:Array.isArray(d)?d:[d],v=r.useCallback(()=>{const e=y.current,t=g.current;if(!e||!t)return;const n=Math.max(0,t.scrollWidth-t.clientWidth),r=n>1;l?.(r);const i=r&&t.scrollLeft>1,s=r&&t.scrollLeft<n-1;o?.({left:i,right:s});const a=e.getBoundingClientRect(),u=t.querySelector('[data-pinned-boundary="left"]'),c=t.querySelector('[data-pinned-boundary="right"]'),d=u?Math.max(0,Math.round(u.getBoundingClientRect().right-a.left)):null,h=c?Math.max(0,Math.round(a.right-c.getBoundingClientRect().left)):null;b(e=>e.left===d&&e.right===h?e:{left:d,right:h})},[l,o]);return r.useEffect(()=>{const e=g.current;if(!e)return;v(),e.addEventListener("scroll",v,{passive:!0});const t=new ResizeObserver(v);return t.observe(e),()=>{e.removeEventListener("scroll",v),t.disconnect()}},[v]),r.useEffect(()=>{v()},[s,v]),e.jsxs(n.Box,{ref:y,sx:{position:"relative",width:"100%",minWidth:0},children:[null!==p.left&&e.jsx(n.Box,{sx:Er("left",Math.max(0,p.left),u)}),null!==p.right&&e.jsx(n.Box,{sx:Er("right",Math.max(0,p.right),c)}),e.jsx(n.TableContainer,{ref:g,component:n.Paper,elevation:0,className:Cr("nbb-base-table-content-grid-table",i),sx:[{width:"100%",overflowX:"auto",overflowY:"hidden",backgroundColor:"background.paper"},...w],...h,children:e.jsx(n.Table,{sx:[{backgroundColor:"common.white"},...void 0===m?[]:Array.isArray(m)?m:[m]],...f,children:s})})]})},ii=Tr({table:ri,head:Kr,body:ei,rowMenu:ti,emptyState:ni}),si=t=>{const i=Sr(),{columns:s,rows:a,actionColumn:o,rowActions:l,noRowsOverlay:u,onRowClick:c,getRowId:d}=Or(i,t),{className:h,children:m,emptyState:f,head:y,body:g,rowMenu:p,headRow:b,headCell:w,actionHeadCell:v,bodyRow:k,bodyCell:x,actionBodyCell:S,sx:T,...M}=t,O=void 0===T?[]:Array.isArray(T)?T:[T],[C,N]=r.useState(null),[I,D]=r.useState(null),[j,A]=r.useState(!1),[E,V]=r.useState({left:!1,right:!1}),F=r.useCallback(e=>{A(t=>t===e?t:e)},[]),L=r.useCallback(e=>{V(t=>t.left===e.left&&t.right===e.right?t:e)},[]),$=r.useMemo(()=>j?s:s.map(e=>{const{pin:t,...n}=e;return n}),[s,j]),W=j&&"right"===o?.pin?"right":void 0,z=r.useMemo(()=>{const e=function(e){const t=e.map(()=>({})),n=[],r=[];let i=0;e.forEach((e,r)=>{"left"===e.pin&&(t[r]={pin:"left",left:i},i+=jr(e),n.push(r))});let s=0;for(let n=e.length-1;n>=0;n-=1){const i=e[n];"right"===i?.pin&&(t[n]={pin:"right",right:s},s+=jr(i),r.push(n))}const a=n[n.length-1];void 0!==a&&(t[a]={...t[a],isLeftBoundary:!0});const o=r[r.length-1];return void 0!==o&&(t[o]={...t[o],isRightBoundary:!0}),t}($),t=Boolean(l)&&"right"===W?56:0;return e.map(e=>{const n="left"===e.pin?e:"right"===e.pin?{...e,right:(e.right??0)+t}:e;return"left"===n.pin&&n.isLeftBoundary?{...n,showBoundaryShadow:E.left}:"right"===n.pin&&n.isRightBoundary?{...n,showBoundaryShadow:E.right}:n})},[E.left,E.right,W,$,l]),R=r.useMemo(()=>{if(l&&"right"===W){const e=!$.some(e=>"right"===e.pin);return{pin:"right",right:0,isRightBoundary:e,showBoundaryShadow:e&&E.right}}},[E.right,W,$,l]),Z=r.useMemo(()=>I&&l?l(I):[],[I,l]),P=(e,t)=>{e.stopPropagation(),N(e.currentTarget),D(t)},B=()=>{N(null),D(null)},q="function"==typeof y?y({columns:$,rowActions:l,columnPinMeta:z,...void 0!==R?{actionColumnPinMeta:R}:{},headRow:b,headCell:w,actionHeadCell:v}):y,U="function"==typeof g?g({columns:$,rows:a,rowActions:l,onRowClick:c,getRowId:d,onOpenRowMenu:P,columnPinMeta:z,...void 0!==R?{actionColumnPinMeta:R}:{},bodyRow:k,bodyCell:x,actionBodyCell:S}):g,H="function"==typeof p?p({menuAnchorEl:C,menuRow:I,menuActions:Z,onClose:B}):p;return e.jsx(n.Stack,{className:Cr("nbb-base-table-content-grid",h),sx:[{width:"100%",minWidth:0},...O],...Nr(M,...Ir),children:e.jsx(Mr,{defaultBlocks:ii,defaultBlockOrder:Object.keys(ii),blocksOverride:m,children:({blocks:t})=>{const n=t;if(0===a.length)return f??Vr(n.emptyState,{...void 0!==u?{noRowsOverlay:u}:{}},"empty-state");const r=q??Vr(n.head,{columns:$,rowActions:l,...void 0!==z?{columnPinMeta:z}:{},...void 0!==R?{actionColumnPinMeta:R}:{},headRow:b,headCell:w,actionHeadCell:v},"grid-head"),i=U??Vr(n.body,{columns:$,rows:a,rowActions:l,onRowClick:c,getRowId:d,onOpenRowMenu:P,...void 0!==z?{columnPinMeta:z}:{},...void 0!==R?{actionColumnPinMeta:R}:{},bodyRow:k,bodyCell:x,actionBodyCell:S},"grid-body"),s=Vr(n.table,{onHorizontalOverflowChange:F,onPinnedShadowChange:L,showLeftPinnedShadow:E.left,showRightPinnedShadow:E.right,children:e.jsxs(e.Fragment,{children:[r,i]})},"grid-table"),o=H??Vr(n.rowMenu,{menuAnchorEl:C,menuRow:I,menuActions:Z,onClose:B},"grid-row-menu");return e.jsxs(e.Fragment,{children:[s,o]})}})})},ai=Tr({loader:Rr,emptyState:ni,grid:si}),oi=t=>{const{isLoading:r,rows:i}=Or(Sr(),t),{children:s,className:a,...o}=t;return e.jsx(n.Box,{className:Cr("nbb-base-table-content",a),...Nr(o,...Ir),children:e.jsx(Mr,{defaultBlocks:ai,defaultBlockOrder:Object.keys(ai),blocksOverride:s,children:({blocks:e})=>{const t=e;return r?Vr(t.loader,{},"content-loader"):i&&0!==i.length?Vr(t.grid,{},"content-grid"):Vr(t.emptyState,{},"content-empty-state")}})})},li=t=>{const{pagination:r,rows:a,isLoading:o}=Or(Sr(),t),{children:l,className:u,sx:c=[],...d}=t,h=s.useTheme(),m=i(h.breakpoints.down("sm")),f=i(h.breakpoints.down("md"));if(!r||o||!a||0===a.length)return null;const y=m?0:1,g=m||f?0:1;return e.jsx(n.Stack,{className:Cr("nbb-base-table-pagination",u),sx:[{alignItems:"center",width:"100%"},...Array.isArray(c)?c:[c]],...Nr(d,...Ir),children:l||e.jsx(n.Pagination,{count:Math.max(1,Math.ceil(r.total/r.pageSize)),page:r.page,onChange:(e,t)=>r.onPageChange(t),variant:"outlined",color:"primary",shape:"rounded",boundaryCount:y,siblingCount:g,sx:{maxWidth:"100%","& .MuiPagination-ul":{flexWrap:"nowrap",justifyContent:"center"}}})})},ui=Tr({header:zr,tabs:Zr,searchChips:Pr,content:oi,pagination:li}),ci=({sx:t,spacing:i=3,className:s,children:a,...o})=>{const l=function(e,...t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}(o,...Ir),u=Nr(o,...Ir),{tabs:c,activeTab:d,onTabChange:h}=l,[m,f]=r.useState(c?.[0]?.value);r.useEffect(()=>{c?.length&&f(e=>void 0!==e&&c.some(t=>t.value===e)?e:c[0]?.value)},[c]);const y=void 0!==d?d:m,g={...l,...void 0!==y?{activeTab:y}:{},onTabChange:e=>{void 0===d&&f(e),h?.(e)}};return e.jsx(n.Stack,{className:Cr("nbb-base-table",s),spacing:i,sx:[{p:2,width:"100%",maxWidth:"100%",boxSizing:"border-box"},...Array.isArray(t)?t:[t]],...u,children:e.jsx(xr,{...g,children:e.jsx(Mr,{defaultBlocks:ui,defaultBlockOrder:Object.keys(ui),blocksOverride:a,children:({blocks:e,blockOrder:t})=>Fr(e,t)})})})},di=zr;di.Title=Lr,di.Actions=$r;const hi=Pr,mi=Kr;mi.Row=Yr,mi.Cell=Br,mi.ActionCell=Ur;const fi=ei;fi.Row=Gr,fi.Cell=qr,fi.ActionCell=Hr;const yi=si;yi.Table=ri,yi.Head=mi,yi.Body=fi,yi.RowMenu=ti;const gi=oi;function pi(...e){return e.flat().filter(Boolean).join(" ")}function bi({labels:r,searchValue:i,onSearchFieldChange:s,onSearchSubmit:a}){return e.jsx(n.TextField,{type:"search",variant:"outlined",placeholder:r.searchFieldPlaceholder,onChange:e=>s?.(e.target.value),onKeyDown:e=>{a&&"Enter"===e.key&&!e.nativeEvent.isComposing&&e.target instanceof HTMLInputElement&&(e.preventDefault(),a())},...void 0!==i?{value:i}:{},sx:e=>({width:{xs:"100%",md:e.spacing(44.75)},"& .MuiOutlinedInput-root":{pr:1.5,"& .MuiOutlinedInput-input":{pl:1.5,pt:1.625,pb:1.625,fontSize:e.typography.body2.fontSize}}}),slotProps:{input:{endAdornment:e.jsx(n.InputAdornment,{position:"end",children:e.jsx(n.IconButton,{"aria-label":"Search",edge:"end",size:"small",...a?{onClick:a}:{},children:e.jsx(t.Search,{fontSize:"small"})})})}}})}function wi(n){return{icon:e.jsx(t.PersonOutlined,{}),title:n.emptyStateMessage}}function vi(n,r,i,s,a){if(!a||!n.rowActions)return;const o=n.rowActions;return n=>{if(s&&!s(n))return[];const l=a(n);return l&&0!==l.length?l.flatMap(s=>"activate"===s?r?[{label:o.activate,icon:e.jsx(t.Loop,{sx:e=>({fontSize:e.typography.h5.fontSize})}),onClick:()=>r(n.id)}]:[]:"deactivate"===s&&i?[{label:o.deactivate,icon:e.jsx(t.BlockOutlined,{sx:e=>({fontSize:e.typography.h5.fontSize})}),onClick:()=>i(n.id)}]:[]):[]}}function ki(t,r){return[{field:"name",headLabel:t.headerRow.name,width:180},{field:"createdAt",headLabel:t.headerRow.createdAt,width:180,valueFormatter:t=>{const r=function(e){if(!e)return null;const t=wr.fromISO(e);return t.isValid?t:null}("string"==typeof t?t:void 0),i=r?.toFormat("yyyy/MM/dd")??"N/A",s=r?.toLocaleString(wr.DATETIME_FULL)??"N/A";return e.jsx(n.Tooltip,{title:s,children:e.jsx("span",{children:i})})}},{field:"status",headLabel:t.headerRow.status,width:180,valueFormatter:(e,{row:n})=>n.status===r.inUse?t.cellData.statusActive:n.status===r.notInUse?t.cellData.statusInactive:n.status}]}function xi(e){return{page:e.currentPage,pageSize:1,total:e.totalPages,onPageChange:e.onPageChange}}function Si(t,n){return n.filter(e=>e in t).map(n=>e.jsx(r.Fragment,{children:t[n]},String(n)))}gi.Loader=Rr,gi.EmptyState=ni,gi.Grid=yi,ci.Header=di,ci.Tabs=Zr,ci.SearchChips=hi,ci.Content=gi,ci.Pagination=li;const Ti=({className:t,children:r,listUsersTitle:i,labels:s,searchValue:a,onSearchFieldChange:o,onSearchSubmit:l,onItemActivate:u,onItemDeactivate:c,shouldShowDropdownMenu:d,resolveRowAction:h,statusMatch:m={inUse:"active",notInUse:"inactive"},onNavigate:f,pagination:y,data:g,rowHref:p,tabs:b,currentTab:w,onTabChange:v,...k})=>{const x=ki(s,m),S=b&&function(t){return t.map(t=>({value:t.key,disabled:Boolean(t.isDisabled),label:e.jsxs(e.Fragment,{children:[t.label,t.subtitle&&e.jsx(n.Typography,{component:"span",variant:"body2",color:"text.secondary",children:t.subtitle})]})}))}(b),T=y&&xi(y),M=vi(s,u,c,d,h),O=bi({labels:s,searchValue:a,onSearchFieldChange:o,onSearchSubmit:l}),C=e.jsx(Ti.Title,{}),N=e.jsx(Ti.Action,{}),I=e.jsxs(Ti.Header,{children:[C,N]}),D=e.jsx(Ti.Loader,{}),j=e.jsx(Ti.Tabs,{}),A=e.jsx(Ti.SearchChips,{}),E=e.jsx(Ti.Table,{}),V=e.jsx(Ti.Pagination,{...y?{pagination:y}:{},data:g,...void 0!==k.isLoading?{isLoading:k.isLoading}:{}}),F={title:C,action:N,header:I,loader:D,content:e.jsx(Ti.Content,{}),tabs:j,searchChips:A,table:E,pagination:V},L=["header","searchChips","content","pagination"],$=void 0===r?Si(F,L):"function"==typeof r?(()=>{const{blocks:e,blockOrder:t}=r({defaultBlocks:F,defaultBlockOrder:L});return Si(e,t)})():r;return e.jsx(ci,{className:pi("nbb-list-users-container",t),headerTitle:i,headerActions:O,columns:x,rows:g,...M?{rowActions:M,actionColumn:{pin:"right"}}:{},noRowsOverlay:wi(s),...S?{tabs:S}:{},...void 0!==w?{activeTab:w}:{},...v?{onTabChange:v}:{},...T?{pagination:T}:{},...p&&f?{onRowClick:e=>{const t=p(e);t&&f(t)}}:{},...k,children:$})};Ti.Title=({listUsersTitle:t,children:n,className:r,...i})=>e.jsx(ci.Header.Title,{className:pi("nbb-list-users-title",r),...i,children:n||t}),Ti.Header=({children:t,className:n,sx:r=[],...i})=>e.jsx(ci.Header,{className:pi("nbb-list-users-header",n),sx:[{flexWrap:{xs:"wrap",md:"nowrap"},alignItems:{xs:"flex-start",md:"center"},columnGap:2,rowGap:2},...Array.isArray(r)?r:[r]],...i,children:t}),Ti.Action=({children:t,className:n,labels:r,searchValue:i,onSearchFieldChange:s,onSearchSubmit:a,sx:o=[],...l})=>{const u=t||(r?bi({labels:r,searchValue:i,onSearchFieldChange:s,onSearchSubmit:a}):void 0);return e.jsx(ci.Header.Actions,{className:pi("nbb-list-users-actions",n),sx:[{width:{xs:"100%",md:"auto"},justifyContent:{xs:"flex-start",md:"flex-end"}},...Array.isArray(o)?o:[o]],...l,children:u})},Ti.Loader=({children:t,className:n,...r})=>e.jsx(ci.Content.Loader,{className:pi("nbb-list-users-loader",n),...r,children:t}),Ti.Content=({children:t,className:n,...r})=>e.jsx(ci.Content,{className:pi("nbb-list-users-content",n),...r,children:t}),Ti.Tabs=({children:t,className:n,...r})=>e.jsx(ci.Tabs,{className:pi("nbb-list-users-tabs",n),...r,children:t}),Ti.SearchChips=({className:t,...n})=>e.jsx(ci.SearchChips,{className:pi("nbb-list-users-search-chips",t),...n}),Ti.Pagination=({className:t,pagination:n,data:r,isLoading:i,...s})=>{const a=n&&xi(n),o=pi("nbb-list-users-pagination",n?.className,t);return e.jsx(ci.Pagination,{className:o,...a?{pagination:a}:{},...r?{rows:r}:{},...void 0!==i?{isLoading:i}:{},...s})},Ti.Table=({className:t,labels:n,data:r,onItemActivate:i,onItemDeactivate:s,shouldShowDropdownMenu:a,resolveRowAction:o,rowHref:l,onNavigate:u,statusMatch:c={inUse:"active",notInUse:"inactive"},...d})=>{const h=n&&ki(n,c),m=n&&wi(n),f=n?vi(n,i,s,a,o):void 0,y=l&&u?e=>{const t=l(e);t&&u(t)}:void 0;return e.jsx(ci.Content.Grid,{className:pi("nbb-list-users-table",t),...h?{columns:h}:{},...r?{rows:r}:{},...m?{noRowsOverlay:m}:{},...f?{rowActions:f,actionColumn:{pin:"right"}}:{},...y?{onRowClick:y}:{},...d})},exports.ListUsers=Ti;
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@mui/icons-material"),n=require("@mui/material"),r=require("react"),s=require("@mui/material/useMediaQuery"),i=require("@mui/material/styles");class o extends Error{}class a extends o{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class l extends o{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class c extends o{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class u extends o{}class d extends o{constructor(e){super(`Invalid unit ${e}`)}}class h extends o{}class m extends o{constructor(){super("Zone is an abstract class")}}const f="numeric",y="short",g="long",p={year:f,month:f,day:f},b={year:f,month:y,day:f},w={year:f,month:y,day:f,weekday:y},v={year:f,month:g,day:f},k={year:f,month:g,day:f,weekday:g},x={hour:f,minute:f},S={hour:f,minute:f,second:f},T={hour:f,minute:f,second:f,timeZoneName:y},C={hour:f,minute:f,second:f,timeZoneName:g},O={hour:f,minute:f,hourCycle:"h23"},M={hour:f,minute:f,second:f,hourCycle:"h23"},N={hour:f,minute:f,second:f,hourCycle:"h23",timeZoneName:y},I={hour:f,minute:f,second:f,hourCycle:"h23",timeZoneName:g},j={year:f,month:f,day:f,hour:f,minute:f},D={year:f,month:f,day:f,hour:f,minute:f,second:f},A={year:f,month:y,day:f,hour:f,minute:f},V={year:f,month:y,day:f,hour:f,minute:f,second:f},E={year:f,month:y,day:f,weekday:y,hour:f,minute:f},F={year:f,month:g,day:f,hour:f,minute:f,timeZoneName:y},L={year:f,month:g,day:f,hour:f,minute:f,second:f,timeZoneName:y},W={year:f,month:g,day:f,weekday:g,hour:f,minute:f,timeZoneName:g},$={year:f,month:g,day:f,weekday:g,hour:f,minute:f,second:f,timeZoneName:g};class z{get type(){throw new m}get name(){throw new m}get ianaName(){return this.name}get isUniversal(){throw new m}offsetName(e,t){throw new m}formatOffset(e,t){throw new m}offset(e){throw new m}equals(e){throw new m}get isValid(){throw new m}}let R=null;class Z extends z{static get instance(){return null===R&&(R=new Z),R}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return at(e,t,n)}formatOffset(e,t){return dt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const B=new Map,P={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},q=new Map;class U extends z{static create(e){let t=q.get(e);return void 0===t&&q.set(e,t=new U(e)),t}static resetCache(){q.clear(),B.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(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 at(e,t,n,this.name)}formatOffset(e,t){return dt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=B.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),B.set(e,t)),t}(this.name);let[r,s,i,o,a,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=P[t];"era"===t?r[i]=s:Re(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,o,a,l,c,u]=r;return[o,s,i,a,l,c,u]}(n,t);"BC"===o&&(r=1-Math.abs(r));let u=+t;const d=u%1e3;return u-=d>=0?d:1e3+d,(rt({year:r,month:s,day:i,hour:24===a?0:a,minute:l,second:c,millisecond:0})-u)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let H={};const _=new Map;function Y(e,t={}){const n=JSON.stringify([e,t]);let r=_.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),_.set(n,r)),r}const J=new Map,G=new Map;let Q=null;const K=new Map;function X(e){let t=K.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),K.set(e,t)),t}const ee=new Map;function te(e,t,n,r){const s=e.listingMode();return"error"===s?null:"en"===s?n(t):r(t)}class ne{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=J.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),J.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Je(this.floor?Math.floor(e):Xe(e,3),this.padTo)}}class re{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=Y(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 se{constructor(e,t,n){this.opts={style:"long",...n},!t&&Pe()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,s=JSON.stringify([e,r]);let i=G.get(s);return void 0===i&&(i=new Intl.RelativeTimeFormat(e,t),G.set(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 o=Object.is(t,-0)||t<0,a=Math.abs(t),l=1===a,c=s[e],u=r?l?c[1]:c[2]||c[1]:l?s[e][0]:e;return o?`${a} ${u} ago`:`in ${a} ${u}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const ie={firstDay:1,minimalDays:4,weekend:[6,7]};class oe{static fromOpts(e){return oe.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,s=!1){const i=e||Te.defaultLocale,o=i||(s?"en-US":Q||(Q=(new Intl.DateTimeFormat).resolvedOptions().locale,Q)),a=t||Te.defaultNumberingSystem,l=n||Te.defaultOutputCalendar,c=_e(r)||Te.defaultWeekSettings;return new oe(o,a,l,c,i)}static resetCache(){Q=null,_.clear(),J.clear(),G.clear(),K.clear(),ee.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return oe.create(e,t,n,r)}constructor(e,t,n,r,s){const[i,o,a]=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=Y(e).resolvedOptions(),r=e}catch(s){const i=e.substring(0,n);t=Y(i).resolvedOptions(),r=i}const{numberingSystem:s,calendar:i}=t;return[r,s,i]}}(e);this.locale=i,this.numberingSystem=t||o||null,this.outputCalendar=n||a||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"===X(e.locale).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?oe.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,_e(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 te(this,e,gt,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";if(!this.monthsCache[s][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[s][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=wr.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[s][e]})}weekdays(e,t=!1){return te(this,e,vt,()=>{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=wr.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return te(this,void 0,()=>kt,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[wr.utc(2016,11,13,9),wr.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return te(this,e,Ct,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[wr.utc(-40,1,1),wr.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 ne(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new re(e,this.intl,t)}relFormatter(e={}){return new se(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=H[n];return r||(r=new Intl.ListFormat(e,t),H[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||X(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:qe()?function(e){let t=ee.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...ie,...t}),ee.set(e,t)}return t}(this.locale):ie}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 ae=null;class le extends z{static get utcInstance(){return null===ae&&(ae=new le(0)),ae}static instance(e){return 0===e?le.utcInstance:new le(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new le(lt(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${dt(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${dt(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return dt(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 ce 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 ue(e,t){if(Re(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?le.utcInstance:le.parseSpecifier(n)||U.create(e)}return Ze(e)?le.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new ce(e)}const de={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},he={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]},me=de.hanidec.replace(/[\[|\]]/g,"").split(""),fe=new Map;function ye({numberingSystem:e},t=""){const n=e||"latn";let r=fe.get(n);void 0===r&&(r=new Map,fe.set(n,r));let s=r.get(t);return void 0===s&&(s=new RegExp(`${de[n]}${t}`),r.set(t,s)),s}let ge,pe=()=>Date.now(),be="system",we=null,ve=null,ke=null,xe=60,Se=null;class Te{static get now(){return pe}static set now(e){pe=e}static set defaultZone(e){be=e}static get defaultZone(){return ue(be,Z.instance)}static get defaultLocale(){return we}static set defaultLocale(e){we=e}static get defaultNumberingSystem(){return ve}static set defaultNumberingSystem(e){ve=e}static get defaultOutputCalendar(){return ke}static set defaultOutputCalendar(e){ke=e}static get defaultWeekSettings(){return Se}static set defaultWeekSettings(e){Se=_e(e)}static get twoDigitCutoffYear(){return xe}static set twoDigitCutoffYear(e){xe=e%100}static get throwOnInvalid(){return ge}static set throwOnInvalid(e){ge=e}static resetCaches(){oe.resetCache(),U.resetCache(),wr.resetCache(),fe.clear()}}class Ce{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Oe=[0,31,59,90,120,151,181,212,243,273,304,334],Me=[0,31,60,91,121,152,182,213,244,274,305,335];function Ne(e,t){return new Ce("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Ie(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 je(e,t,n){return n+(et(e)?Me:Oe)[t-1]}function De(e,t){const n=et(e)?Me:Oe,r=n.findIndex(e=>e<t);return{month:r+1,day:t-n[r]}}function Ae(e,t){return(e-t+7)%7+1}function Ve(e,t=4,n=1){const{year:r,month:s,day:i}=e,o=je(r,s,i),a=Ae(Ie(r,s,i),n);let l,c=Math.floor((o-a+14-t)/7);return c<1?(l=r-1,c=it(l,t,n)):c>it(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:a,...ht(e)}}function Ee(e,t=4,n=1){const{weekYear:r,weekNumber:s,weekday:i}=e,o=Ae(Ie(r,1,t),n),a=tt(r);let l,c=7*s+i-o-7+t;c<1?(l=r-1,c+=tt(l)):c>a?(l=r+1,c-=tt(r)):l=r;const{month:u,day:d}=De(l,c);return{year:l,month:u,day:d,...ht(e)}}function Fe(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:je(t,n,r),...ht(e)}}function Le(e){const{year:t,ordinal:n}=e,{month:r,day:s}=De(t,n);return{year:t,month:r,day:s,...ht(e)}}function We(e,t){if(!Re(e.localWeekday)||!Re(e.localWeekNumber)||!Re(e.localWeekYear)){if(!Re(e.weekday)||!Re(e.weekNumber)||!Re(e.weekYear))throw new u("Cannot mix locale-based week fields with ISO-based week fields");return Re(e.localWeekday)||(e.weekday=e.localWeekday),Re(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Re(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 $e(e){const t=Be(e.year),n=Ye(e.month,1,12),r=Ye(e.day,1,nt(e.year,e.month));return t?n?!r&&Ne("day",e.day):Ne("month",e.month):Ne("year",e.year)}function ze(e){const{hour:t,minute:n,second:r,millisecond:s}=e,i=Ye(t,0,23)||24===t&&0===n&&0===r&&0===s,o=Ye(n,0,59),a=Ye(r,0,59),l=Ye(s,0,999);return i?o?a?!l&&Ne("millisecond",s):Ne("second",r):Ne("minute",n):Ne("hour",t)}function Re(e){return void 0===e}function Ze(e){return"number"==typeof e}function Be(e){return"number"==typeof e&&e%1==0}function Pe(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function qe(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ue(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 He(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _e(e){if(null==e)return null;if("object"!=typeof e)throw new h("Week settings must be an object");if(!Ye(e.firstDay,1,7)||!Ye(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Ye(e,1,7)))throw new h("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Ye(e,t,n){return Be(e)&&e>=t&&e<=n}function Je(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Ge(e){return Re(e)||null===e||""===e?void 0:parseInt(e,10)}function Qe(e){return Re(e)||null===e||""===e?void 0:parseFloat(e)}function Ke(e){if(!Re(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Xe(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function et(e){return e%4==0&&(e%100!=0||e%400==0)}function tt(e){return et(e)?366:365}function nt(e,t){const n=(r=t-1)-12*Math.floor(r/12)+1;var r;return 2===n?et(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function rt(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 st(e,t,n){return-Ae(Ie(e,1,t),n)+t-1}function it(e,t=4,n=1){const r=st(e,t,n),s=st(e+1,t,n);return(tt(e)-r+s)/7}function ot(e){return e>99?e:e>Te.twoDigitCutoffYear?1900+e:2e3+e}function at(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 o={timeZoneName:t,...i},a=new Intl.DateTimeFormat(n,o).formatToParts(s).find(e=>"timezonename"===e.type.toLowerCase());return a?a.value:null}function lt(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 ct(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new h(`Invalid unit value ${e}`);return t}function ut(e,t){const n={};for(const r in e)if(He(e,r)){const s=e[r];if(null==s)continue;n[t(r)]=ct(s)}return n}function dt(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}${Je(n,2)}:${Je(r,2)}`;case"narrow":return`${s}${n}${r>0?`:${r}`:""}`;case"techie":return`${s}${Je(n,2)}${Je(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ht(e){return function(e){return["hour","minute","second","millisecond"].reduce((t,n)=>(t[n]=e[n],t),{})}(e)}const mt=["January","February","March","April","May","June","July","August","September","October","November","December"],ft=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yt=["J","F","M","A","M","J","J","A","S","O","N","D"];function gt(e){switch(e){case"narrow":return[...yt];case"short":return[...ft];case"long":return[...mt];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 pt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],bt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],wt=["M","T","W","T","F","S","S"];function vt(e){switch(e){case"narrow":return[...wt];case"short":return[...bt];case"long":return[...pt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const kt=["AM","PM"],xt=["Before Christ","Anno Domini"],St=["BC","AD"],Tt=["B","A"];function Ct(e){switch(e){case"narrow":return[...Tt];case"short":return[...St];case"long":return[...xt];default:return null}}function Ot(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Mt={D:p,DD:b,DDD:v,DDDD:k,t:x,tt:S,ttt:T,tttt:C,T:O,TT:M,TTT:N,TTTT:I,f:j,ff:A,fff:F,ffff:W,F:D,FF:V,FFF:L,FFFF:$};class Nt{static create(e,t={}){return new Nt(e,t)}static parseFormat(e){let t=null,n="",r=!1;const s=[];for(let i=0;i<e.length;i++){const o=e.charAt(i);"'"===o?((n.length>0||r)&&s.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||o===t?n+=o:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&s.push({literal:r||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(e){return Mt[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,n=void 0){if(this.opts.forceSimple)return Je(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).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):"",o=(t,r)=>n?function(e,t){return gt(t)[e.month-1]}(e,t):s(r?{month:t}:{month:t,day:"numeric"},"month"),a=(t,r)=>n?function(e,t){return vt(t)[e.weekday-1]}(e,t):s(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const n=Nt.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},c=t=>n?function(e,t){return Ct(t)[e.year<0?0:1]}(e,t):s({era:t},"era");return Ot(Nt.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 kt[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 a("short",!0);case"cccc":return a("long",!0);case"ccccc":return a("narrow",!0);case"EEE":return a("short",!1);case"EEEE":return a("long",!1);case"EEEEE":return a("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 o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("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 o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("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 c("short");case"GG":return c("long");case"GGGGG":return c("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 l(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[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}},s=Nt.parseFormat(t),i=s.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),o=e.shiftTo(...i.map(r).filter(e=>e));return Ot(s,((e,t)=>s=>{const i=r(s);if(i){const r=t.isNegativeDuration&&i!==t.largestUnit?n:1;let o;return o="negativeLargestOnly"===this.opts.signMode&&i!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(i)*r,s.length,o)}return s})(o,{isNegativeDuration:o<0,largestUnit:Object.keys(o.values)[0]}))}}const It=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function jt(...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,o,a]=s(t,r);return[{...e,...i},o||n,a]},[{},null,1]).slice(0,2)}function At(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 Vt(...e){return(t,n)=>{const r={};let s;for(s=0;s<e.length;s++)r[e[s]]=Ge(t[n+s]);return[r,null,n+s]}}const Et=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Ft=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Lt=RegExp(`${Ft.source}(?:${Et.source}?(?:\\[(${It.source})\\])?)?`),Wt=RegExp(`(?:[Tt]${Lt.source})?`),$t=Vt("weekYear","weekNumber","weekDay"),zt=Vt("year","ordinal"),Rt=RegExp(`${Ft.source} ?(?:${Et.source}|(${It.source}))?`),Zt=RegExp(`(?: ${Rt.source})?`);function Bt(e,t,n){const r=e[t];return Re(r)?n:Ge(r)}function Pt(e,t){return[{hours:Bt(e,t,0),minutes:Bt(e,t+1,0),seconds:Bt(e,t+2,0),milliseconds:Ke(e[t+3])},null,t+4]}function qt(e,t){const n=!e[t]&&!e[t+1],r=lt(e[t+1],e[t+2]);return[{},n?null:le.instance(r),t+3]}function Ut(e,t){return[{},e[t]?U.create(e[t]):null,t+1]}const Ht=RegExp(`^T?${Ft.source}$`),_t=/^-?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 Yt(e){const[t,n,r,s,i,o,a,l,c]=e,u="-"===t[0],d=l&&"-"===l[0],h=(e,t=!1)=>void 0!==e&&(t||e&&u)?-e:e;return[{years:h(Qe(n)),months:h(Qe(r)),weeks:h(Qe(s)),days:h(Qe(i)),hours:h(Qe(o)),minutes:h(Qe(a)),seconds:h(Qe(l),"-0"===l),milliseconds:h(Ke(c),d)}]}const Jt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Gt(e,t,n,r,s,i,o){const a={year:2===t.length?ot(Ge(t)):Ge(t),month:ft.indexOf(n)+1,day:Ge(r),hour:Ge(s),minute:Ge(i)};return o&&(a.second=Ge(o)),e&&(a.weekday=e.length>3?pt.indexOf(e)+1:bt.indexOf(e)+1),a}const Qt=/^(?:(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 Kt(e){const[,t,n,r,s,i,o,a,l,c,u,d]=e,h=Gt(t,s,r,n,i,o,a);let m;return m=l?Jt[l]:c?0:lt(u,d),[h,new le(m)]}const Xt=/^(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$/,en=/^(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$/,tn=/^(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 nn(e){const[,t,n,r,s,i,o,a]=e;return[Gt(t,s,r,n,i,o,a),le.utcInstance]}function rn(e){const[,t,n,r,s,i,o,a]=e;return[Gt(t,a,n,r,s,i,o),le.utcInstance]}const sn=jt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Wt),on=jt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Wt),an=jt(/(\d{4})-?(\d{3})/,Wt),ln=jt(Lt),cn=Dt(function(e,t){return[{year:Bt(e,t),month:Bt(e,t+1,1),day:Bt(e,t+2,1)},null,t+3]},Pt,qt,Ut),un=Dt($t,Pt,qt,Ut),dn=Dt(zt,Pt,qt,Ut),hn=Dt(Pt,qt,Ut),mn=Dt(Pt),fn=jt(/(\d{4})-(\d\d)-(\d\d)/,Zt),yn=jt(Rt),gn=Dt(Pt,qt,Ut),pn="Invalid Duration",bn={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}},wn={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},...bn},vn={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},...bn},kn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],xn=kn.slice(0).reverse();function Sn(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 Mn(r)}function Tn(e,t){let n=t.milliseconds??0;for(const r of xn.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Cn(e,t){const n=Tn(e,t)<0?-1:1;kn.reduceRight((r,s)=>{if(Re(t[s]))return r;if(r){const i=t[r]*n,o=e[s][r],a=Math.floor(i/o);t[s]+=a*n,t[r]-=a*o*n}return s},null),kn.reduce((n,r)=>{if(Re(t[r]))return n;if(n){const s=t[n]%1;t[n]-=s,t[r]+=s*e[n][r]}return r},null)}function On(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class Mn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?vn:wn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||oe.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Mn.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new h("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Mn({values:ut(e,Mn.normalizeUnit),loc:oe.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Ze(e))return Mn.fromMillis(e);if(Mn.isDuration(e))return e;if("object"==typeof e)return Mn.fromObject(e);throw new h(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return At(e,[_t,Yt])}(e);return n?Mn.fromObject(n,t):Mn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return At(e,[Ht,mn])}(e);return n?Mn.fromObject(n,t):Mn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new h("need to specify a reason the Duration is invalid");const n=e instanceof Ce?e:new Ce(e,t);if(Te.throwOnInvalid)throw new c(n);return new Mn({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 d(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?Nt.create(this.loc,n).formatDurationFromString(this,e):pn}toHuman(e={}){if(!this.isValid)return pn;const t=!1!==e.showZeros,n=kn.map(n=>{const r=this.values[n];return Re(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);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 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+=Xe(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},wr.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?Tn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Mn.fromDurationLike(e),n={};for(const e of kn)(He(t.values,e)||He(this.values,e))&&(n[e]=t.get(e)+this.get(e));return Sn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=Mn.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]=ct(e(this.values[n],n));return Sn(this,{values:t},!0)}get(e){return this[Mn.normalizeUnit(e)]}set(e){return this.isValid?Sn(this,{values:{...this.values,...ut(e,Mn.normalizeUnit)}}):this}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return Sn(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 Cn(this.matrix,e),Sn(this,{values:e},!0)}rescale(){return this.isValid?Sn(this,{values:On(this.normalize().shiftToAll().toObject())},!0):this}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>Mn.normalizeUnit(e));const t={},n={},r=this.toObject();let s;for(const i of kn)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 o=Math.trunc(e);t[i]=o,n[i]=(1e3*e-1e3*o)/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 Cn(this.matrix,t),Sn(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 Sn(this,{values:e},!0)}removeZeros(){return this.isValid?Sn(this,{values:On(this.values)},!0):this}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;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of kn)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Nn="Invalid Interval";class In{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 h("need to specify a reason the Interval is invalid");const n=e instanceof Ce?e:new Ce(e,t);if(Te.throwOnInvalid)throw new l(n);return new In({invalid:n})}static fromDateTimes(e,t){const n=vr(e),r=vr(t),s=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?In.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:In.invalid("missing or invalid end"):In.invalid("missing or invalid start")}(n,r);return null==s?new In({start:n,end:r}):s}static after(e,t){const n=Mn.fromDurationLike(t),r=vr(e);return In.fromDateTimes(r,r.plus(n))}static before(e,t){const n=Mn.fromDurationLike(t),r=vr(e);return In.fromDateTimes(r.minus(n),r)}static fromISO(e,t){const[n,r]=(e||"").split("/",2);if(n&&r){let e,s,i,o;try{e=wr.fromISO(n,t),s=e.isValid}catch(r){s=!1}try{i=wr.fromISO(r,t),o=i.isValid}catch(r){o=!1}if(s&&o)return In.fromDateTimes(e,i);if(s){const n=Mn.fromISO(r,t);if(n.isValid)return In.after(e,n)}else if(o){const e=Mn.fromISO(n,t);if(e.isValid)return In.before(i,e)}}return In.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 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?In.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(vr).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(In.fromDateTimes(r,i)),r=i,s+=1}return n}splitBy(e){const t=Mn.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(In.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:In.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 In.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(In.fromDateTimes(t,e.time)),t=null);return In.merge(r)}difference(...e){return In.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Nn}[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=p,t={}){return this.isValid?Nt.create(this.s.loc.clone(t),e).formatInterval(this):Nn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Nn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Nn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Nn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Nn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Mn.invalid(this.invalidReason)}mapEndpoints(e){return In.fromDateTimes(e(this.s),e(this.e))}}class jn{static hasDST(e=Te.defaultZone){const t=wr.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 ue(e,Te.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||oe.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||oe.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||oe.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||oe.create(t,n,s)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||oe.create(t,n,s)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||oe.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||oe.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return oe.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return oe.create(t,null,"gregory").eras(e)}static features(){return{relative:Pe(),localeWeek:qe()}}}function Dn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Mn.fromMillis(r).as("days"))}function An(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(de.hanidec))t+=me.indexOf(e[n]);else for(const e in he){const[n,s]=he[e];r>=n&&r<=s&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const Vn=`[ ${String.fromCharCode(160)}]`,En=new RegExp(Vn,"g");function Fn(e){return e.replace(/\./g,"\\.?").replace(En,Vn)}function Ln(e){return e.replace(/\./g,"").replace(En," ").toLowerCase()}function Wn(e,t){return null===e?null:{regex:RegExp(e.map(Fn).join("|")),deser:([n])=>e.findIndex(e=>Ln(n)===Ln(e))+t}}function $n(e,t){return{regex:e,deser:([,e,t])=>lt(e,t),groups:t}}function zn(e){return{regex:e,deser:([e])=>e}}const Rn={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 Zn=null;function Bn(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Un(Nt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class Pn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Bn(Nt.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=ye(t),r=ye(t,"{2}"),s=ye(t,"{3}"),i=ye(t,"{4}"),o=ye(t,"{6}"),a=ye(t,"{1,2}"),l=ye(t,"{1,3}"),c=ye(t,"{1,6}"),u=ye(t,"{1,9}"),d=ye(t,"{2,4}"),h=ye(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 Wn(t.eras("short"),0);case"GG":return Wn(t.eras("long"),0);case"y":return An(c);case"yy":case"kk":return An(d,ot);case"yyyy":case"kkkk":return An(i);case"yyyyy":return An(h);case"yyyyyy":return An(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return An(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return An(r);case"MMM":return Wn(t.months("short",!0),1);case"MMMM":return Wn(t.months("long",!0),1);case"LLL":return Wn(t.months("short",!1),1);case"LLLL":return Wn(t.months("long",!1),1);case"o":case"S":return An(l);case"ooo":case"SSS":return An(s);case"u":return zn(u);case"uu":return zn(a);case"uuu":case"E":case"c":return An(n);case"a":return Wn(t.meridiems(),0);case"EEE":return Wn(t.weekdays("short",!1),1);case"EEEE":return Wn(t.weekdays("long",!1),1);case"ccc":return Wn(t.weekdays("short",!0),1);case"cccc":return Wn(t.weekdays("long",!0),1);case"Z":case"ZZ":return $n(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return $n(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return zn(/[a-z_+-/]{1,256}?/i);case" ":return zn(/[^\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(He(n,s)){const i=n[s],o=i.groups?i.groups+1:1;!i.literal&&i.token&&(e[i.token.val[0]]=i.deser(r.slice(t,t+o))),t+=o}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,s,i]=n?function(e){let t,n=null;return Re(e.z)||(n=U.create(e.z)),Re(e.Z)||(n||(n=new le(e.Z)),t=e.Z),Re(e.q)||(e.M=3*(e.q-1)+1),Re(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),Re(e.u)||(e.S=Ke(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(He(n,"a")&&He(n,"H"))throw new u("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 qn(e,t,n){return new Pn(e,n).explainFromTokens(t)}function Un(e,t){if(!e)return null;const n=Nt.create(t,e).dtFormatter((Zn||(Zn=wr.fromMillis(1555555555555)),Zn)),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 o=r;"hour"===r&&(o=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=Rn[o];if("object"==typeof a&&(a=a[i]),a)return{literal:!1,val:a}}(t,e,s))}const Hn="Invalid DateTime",_n=864e13;function Yn(e){return new Ce("unsupported zone",`the zone "${e.name}" is not supported`)}function Jn(e){return null===e.weekData&&(e.weekData=Ve(e.c)),e.weekData}function Gn(e){return null===e.localWeekData&&(e.localWeekData=Ve(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Qn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new wr({...n,...t,old:n})}function Kn(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 Xn(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 er(e,t,n){return Kn(rt(e),t,n)}function tr(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,nt(r,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},o=Mn.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"),a=rt(i);let[l,c]=Kn(a,n,e.zone);return 0!==o&&(l+=o,c=e.zone.offset(l)),{ts:l,o:c}}function nr(e,t,n,r,s,i){const{setZone:o,zone:a}=n;if(e&&0!==Object.keys(e).length||t){const r=t||a,s=wr.fromObject(e,{...n,zone:r,specificOffset:i});return o?s:s.setZone(a)}return wr.invalid(new Ce("unparsable",`the input "${s}" can't be parsed as ${r}`))}function rr(e,t,n=!0){return e.isValid?Nt.create(oe.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function sr(e,t,n){const r=e.c.year>9999||e.c.year<0;let s="";if(r&&e.c.year>=0&&(s+="+"),s+=Je(e.c.year,r?6:4),"year"===n)return s;if(t){if(s+="-",s+=Je(e.c.month),"month"===n)return s;s+="-"}else if(s+=Je(e.c.month),"month"===n)return s;return s+=Je(e.c.day),s}function ir(e,t,n,r,s,i,o){let a=!n||0!==e.c.millisecond||0!==e.c.second,l="";switch(o){case"day":case"month":case"year":break;default:if(l+=Je(e.c.hour),"hour"===o)break;if(t){if(l+=":",l+=Je(e.c.minute),"minute"===o)break;a&&(l+=":",l+=Je(e.c.second))}else{if(l+=Je(e.c.minute),"minute"===o)break;a&&(l+=Je(e.c.second))}if("second"===o)break;!a||r&&0===e.c.millisecond||(l+=".",l+=Je(e.c.millisecond,3))}return s&&(e.isOffsetFixed&&0===e.offset&&!i?l+="Z":e.o<0?(l+="-",l+=Je(Math.trunc(-e.o/60)),l+=":",l+=Je(Math.trunc(-e.o%60))):(l+="+",l+=Je(Math.trunc(e.o/60)),l+=":",l+=Je(Math.trunc(e.o%60)))),i&&(l+="["+e.zone.ianaName+"]"),l}const or={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ar={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},lr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},cr=["year","month","day","hour","minute","second","millisecond"],ur=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],dr=["year","ordinal","hour","minute","second","millisecond"];function hr(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new d(e);return t}function mr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return hr(e)}}function fr(e,t){const n=ue(t.zone,Te.defaultZone);if(!n.isValid)return wr.invalid(Yn(n));const r=oe.fromObject(t);let s,i;if(Re(e.year))s=Te.now();else{for(const t of cr)Re(e[t])&&(e[t]=or[t]);const t=$e(e)||ze(e);if(t)return wr.invalid(t);const r=function(e){if(void 0===pr&&(pr=Te.now()),"iana"!==e.type)return e.offset(pr);const t=e.name;let n=br.get(t);return void 0===n&&(n=e.offset(pr),br.set(t,n)),n}(n);[s,i]=er(e,r,n)}return new wr({ts:s,zone:n,loc:r,o:i})}function yr(e,t,n){const r=!!Re(n.round)||n.round,s=Re(n.rounding)?"trunc":n.rounding,i=(e,i)=>(e=Xe(e,r||n.calendary?0:2,n.calendary?"round":s),t.loc.clone(n).relFormatter(n).format(e,i)),o=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return i(o(n.unit),n.unit);for(const e of n.units){const t=o(e);if(Math.abs(t)>=1)return i(t,e)}return i(e>t?-0:0,n.units[n.units.length-1])}function gr(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let pr;const br=new Map;class wr{constructor(e){const t=e.zone||Te.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Ce("invalid input"):null)||(t.isValid?null:Yn(t));this.ts=Re(e.ts)?Te.now():e.ts;let r=null,s=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,s]=[e.old.c,e.old.o];else{const i=Ze(e.o)&&!e.old?e.o:t.offset(this.ts);r=Xn(this.ts,i),n=Number.isNaN(r.year)?new Ce("invalid input"):null,r=n?null:r,s=n?null:i}this._zone=t,this.loc=e.loc||oe.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=s,this.isLuxonDateTime=!0}static now(){return new wr({})}static local(){const[e,t]=gr(arguments),[n,r,s,i,o,a,l]=t;return fr({year:n,month:r,day:s,hour:i,minute:o,second:a,millisecond:l},e)}static utc(){const[e,t]=gr(arguments),[n,r,s,i,o,a,l]=t;return e.zone=le.utcInstance,fr({year:n,month:r,day:s,hour:i,minute:o,second:a,millisecond:l},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return wr.invalid("invalid input");const s=ue(t.zone,Te.defaultZone);return s.isValid?new wr({ts:n,zone:s,loc:oe.fromObject(t)}):wr.invalid(Yn(s))}static fromMillis(e,t={}){if(Ze(e))return e<-_n||e>_n?wr.invalid("Timestamp out of range"):new wr({ts:e,zone:ue(t.zone,Te.defaultZone),loc:oe.fromObject(t)});throw new h(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ze(e))return new wr({ts:1e3*e,zone:ue(t.zone,Te.defaultZone),loc:oe.fromObject(t)});throw new h("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=ue(t.zone,Te.defaultZone);if(!n.isValid)return wr.invalid(Yn(n));const r=oe.fromObject(t),s=ut(e,mr),{minDaysInFirstWeek:i,startOfWeek:o}=We(s,r),a=Te.now(),l=Re(t.specificOffset)?n.offset(a):t.specificOffset,c=!Re(s.ordinal),d=!Re(s.year),h=!Re(s.month)||!Re(s.day),m=d||h,f=s.weekYear||s.weekNumber;if((m||c)&&f)throw new u("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&c)throw new u("Can't mix ordinal dates with month/day");const y=f||s.weekday&&!m;let g,p,b=Xn(a,l);y?(g=ur,p=ar,b=Ve(b,i,o)):c?(g=dr,p=lr,b=Fe(b)):(g=cr,p=or);let w=!1;for(const e of g)Re(s[e])?s[e]=w?p[e]:b[e]:w=!0;const v=y?function(e,t=4,n=1){const r=Be(e.weekYear),s=Ye(e.weekNumber,1,it(e.weekYear,t,n)),i=Ye(e.weekday,1,7);return r?s?!i&&Ne("weekday",e.weekday):Ne("week",e.weekNumber):Ne("weekYear",e.weekYear)}(s,i,o):c?function(e){const t=Be(e.year),n=Ye(e.ordinal,1,tt(e.year));return t?!n&&Ne("ordinal",e.ordinal):Ne("year",e.year)}(s):$e(s),k=v||ze(s);if(k)return wr.invalid(k);const x=y?Ee(s,i,o):c?Le(s):s,[S,T]=er(x,l,n),C=new wr({ts:S,zone:n,o:T,loc:r});return s.weekday&&m&&e.weekday!==C.weekday?wr.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${C.toISO()}`):C.isValid?C:wr.invalid(C.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return At(e,[sn,cn],[on,un],[an,dn],[ln,hn])}(e);return nr(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return At(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Qt,Kt])}(e);return nr(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return At(e,[Xt,nn],[en,nn],[tn,rn])}(e);return nr(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Re(e)||Re(t))throw new h("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:s=null}=n,i=oe.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),[o,a,l,c]=function(e,t,n){const{result:r,zone:s,specificOffset:i,invalidReason:o}=qn(e,t,n);return[r,s,i,o]}(i,e,t);return c?wr.invalid(c):nr(o,a,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return wr.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return At(e,[fn,cn],[yn,gn])}(e);return nr(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new h("need to specify a reason the DateTime is invalid");const n=e instanceof Ce?e:new Ce(e,t);if(Te.throwOnInvalid)throw new a(n);return new wr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Un(e,oe.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Bn(Nt.parseFormat(e),oe.fromObject(t)).map(e=>e.val).join("")}static resetCache(){pr=void 0,br.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Jn(this).weekYear:NaN}get weekNumber(){return this.isValid?Jn(this).weekNumber:NaN}get weekday(){return this.isValid?Jn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Gn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Gn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Gn(this).weekYear:NaN}get ordinal(){return this.isValid?Fe(this.c).ordinal:NaN}get monthShort(){return this.isValid?jn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?jn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?jn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?jn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=rt(this.c),r=this.zone.offset(n-e),s=this.zone.offset(n+e),i=this.zone.offset(n-r*t),o=this.zone.offset(n-s*t);if(i===o)return[this];const a=n-i*t,l=n-o*t,c=Xn(a,i),u=Xn(l,o);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[Qn(this,{ts:a}),Qn(this,{ts:l})]:[this]}get isInLeapYear(){return et(this.year)}get daysInMonth(){return nt(this.year,this.month)}get daysInYear(){return this.isValid?tt(this.year):NaN}get weeksInWeekYear(){return this.isValid?it(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?it(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=Nt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(le.instance(e),t)}toLocal(){return this.setZone(Te.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=ue(e,Te.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=er(n,t,e)}return Qn(this,{ts:r,zone:e})}return wr.invalid(Yn(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Qn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=ut(e,mr),{minDaysInFirstWeek:n,startOfWeek:r}=We(t,this.loc),s=!Re(t.weekYear)||!Re(t.weekNumber)||!Re(t.weekday),i=!Re(t.ordinal),o=!Re(t.year),a=!Re(t.month)||!Re(t.day),l=o||a,c=t.weekYear||t.weekNumber;if((l||i)&&c)throw new u("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&i)throw new u("Can't mix ordinal dates with month/day");let d;s?d=Ee({...Ve(this.c,n,r),...t},n,r):Re(t.ordinal)?(d={...this.toObject(),...t},Re(t.day)&&(d.day=Math.min(nt(d.year,d.month),d.day))):d=Le({...Fe(this.c),...t});const[h,m]=er(d,this.o,this.zone);return Qn(this,{ts:h,o:m})}plus(e){return this.isValid?Qn(this,tr(this,Mn.fromDurationLike(e))):this}minus(e){return this.isValid?Qn(this,tr(this,Mn.fromDurationLike(e).negate())):this}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=Mn.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;if("quarters"===r){const e=Math.ceil(this.month/3);n.month=3*(e-1)+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Nt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Hn}toLocaleString(e=p,t={}){return this.isValid?Nt.create(this.loc.clone(t),e).formatDateTime(this):Hn}toLocaleParts(e={}){return this.isValid?Nt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:s=!1,precision:i="milliseconds"}={}){if(!this.isValid)return null;const o="extended"===e;let a=sr(this,o,i=hr(i));return cr.indexOf(i)>=3&&(a+="T"),a+=ir(this,o,t,n,r,s,i),a}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?sr(this,"extended"===e,hr(t)):null}toISOWeekDate(){return rr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:s=!1,format:i="extended",precision:o="milliseconds"}={}){return this.isValid?(o=hr(o),(r&&cr.indexOf(o)>=3?"T":"")+ir(this,"extended"===i,t,e,n,s,o)):null}toRFC2822(){return rr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return rr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?sr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),rr(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Hn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return Mn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},s=(a=t,Array.isArray(a)?a:[a]).map(Mn.normalizeUnit),i=e.valueOf()>this.valueOf(),o=function(e,t,n,r){let[s,i,o,a]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Dn(e,t);return(n-n%7)/7}],["days",Dn]],s={},i=e;let o,a;for(const[l,c]of r)n.indexOf(l)>=0&&(o=l,s[l]=c(e,t),a=i.plus(s),a>t?(s[l]--,(e=i.plus(s))>t&&(a=e,s[l]--,e=i.plus(s))):e=a);return[e,s,a,o]}(e,t,n);const l=t-s,c=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===c.length&&(o<t&&(o=s.plus({[a]:1})),o!==s&&(i[a]=(i[a]||0)+l/(o-s)));const u=Mn.fromObject(i,r);return c.length>0?Mn.fromMillis(l,r).shiftTo(...c).plus(u):u}(i?this:e,i?e:this,s,r);var a;return i?o.negate():o}diffNow(e="milliseconds",t={}){return this.diff(wr.now(),e,t)}until(e){return this.isValid?In.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,n)<=r&&r<=s.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||wr.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(r=e.unit,s=void 0),yr(t,this.plus(n),{...e,numeric:"always",units:r,unit:s})}toRelativeCalendar(e={}){return this.isValid?yr(e.base||wr.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(wr.isDateTime))throw new h("min requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(wr.isDateTime))throw new h("max requires all arguments be DateTimes");return Ue(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:s=null}=n;return qn(oe.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return wr.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,s=oe.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Pn(s,e)}static fromFormatParser(e,t,n={}){if(Re(e)||Re(t))throw new h("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:s=null}=n,i=oe.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});if(!i.equals(t.locale))throw new h(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${t.locale}`);const{result:o,zone:a,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?wr.invalid(c):nr(o,a,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return p}static get DATE_MED(){return b}static get DATE_MED_WITH_WEEKDAY(){return w}static get DATE_FULL(){return v}static get DATE_HUGE(){return k}static get TIME_SIMPLE(){return x}static get TIME_WITH_SECONDS(){return S}static get TIME_WITH_SHORT_OFFSET(){return T}static get TIME_WITH_LONG_OFFSET(){return C}static get TIME_24_SIMPLE(){return O}static get TIME_24_WITH_SECONDS(){return M}static get TIME_24_WITH_SHORT_OFFSET(){return N}static get TIME_24_WITH_LONG_OFFSET(){return I}static get DATETIME_SHORT(){return j}static get DATETIME_SHORT_WITH_SECONDS(){return D}static get DATETIME_MED(){return A}static get DATETIME_MED_WITH_SECONDS(){return V}static get DATETIME_MED_WITH_WEEKDAY(){return E}static get DATETIME_FULL(){return F}static get DATETIME_FULL_WITH_SECONDS(){return L}static get DATETIME_HUGE(){return W}static get DATETIME_HUGE_WITH_SECONDS(){return $}}function vr(e){if(wr.isDateTime(e))return e;if(e&&e.valueOf&&Ze(e.valueOf()))return wr.fromJSDate(e);if(e&&"object"==typeof e)return wr.fromObject(e);throw new h(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const kr=r.createContext(void 0),xr=({children:t,...n})=>e.jsx(kr.Provider,{value:n,children:t}),Sr=()=>{const e=r.useContext(kr);if(!e)throw new Error("useBaseTableContext must be used within a BaseTableProvider");return e};function Tr(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,r.createElement(t,{key:e})]))}function Cr({blocksOverride:e,defaultBlocks:t,defaultBlockOrder:n,children:r}){if(void 0===e)return r({blocks:t,blockOrder:n});if("function"==typeof e){const{blocks:s,blockOrder:i}=e({defaultBlocks:t,defaultBlockOrder:n});return r({blocks:s,blockOrder:i})}return e}function Or(e,t){const n={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}function Mr(...e){return e.flat().filter(Boolean).join(" ")}function Nr(e,...t){const n={...e};for(const e of t)delete n[e];return n}const Ir=["isLoading","headerTitle","headerActions","searchChipsTitle","searchChips","onSearchChipDelete","tabs","activeTab","onTabChange","columns","rows","actionColumn","rowActions","pagination","noRowsOverlay","onRowClick","getRowId"];function jr(t,s,i){const o=s[t.field],a={row:s,rowIndex:i,column:t};if(t.renderCell)return t.renderCell(o,a);const l=t.valueFormatter?t.valueFormatter(o,a):o;return e.jsx(n.Typography,{variant:"body2",children:(c=l,null==c?"":"string"==typeof c||"number"==typeof c||"boolean"==typeof c?String(c):r.isValidElement(c)?c:"")});var c}function Dr(e){return e.width??180}const Ar=["xs","sm","md","lg","xl"];function Vr(e,t){if(void 0===e||"string"==typeof e)return e;for(let n=Ar.indexOf(t);n>=0;n-=1){const t=e[Ar[n]];if(void 0!==t)return t??void 0}}function Er(e,t){return e?.pin?{position:"sticky",..."left"===e.pin?{left:e.left??0}:{right:e.right??0},zIndex:t?12:4,isolation:"isolate",...t?{backgroundColor:"common.white",backgroundImage:"none",backgroundClip:"padding-box",opacity:1,"&::before":{content:'""',position:"absolute",inset:0,zIndex:-1,backgroundColor:e=>e.palette.common.white}}:{},...t?{}:{backgroundColor:"inherit"},...e.isLeftBoundary?{borderRight:e=>`1px solid ${e.palette.divider}`}:{},...e.isRightBoundary?{borderLeft:e=>`1px solid ${e.palette.divider}`}:{}}:{}}function Fr(e,t,n){const r="left"===e;return{position:"absolute",top:0,bottom:0,...r?{left:t}:{right:t},width:0,pointerEvents:"none",zIndex:7,"&::after":{content:'""',position:"absolute",top:0,bottom:0,...r?{left:0}:{right:0},width:8,background:r?"linear-gradient(to right, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0))":"linear-gradient(to left, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0))",opacity:n?1:0,transition:e=>e.transitions.create("opacity",{duration:160})}}}function Lr(e,t,n){return r.isValidElement(e)?r.cloneElement(e,void 0===n?t:{key:n,...t}):e}function Wr(t,n){return n.map(e=>({key:String(e),block:t[String(e)]})).filter(({block:e})=>void 0!==e).map(({key:t,block:n})=>e.jsx(r.Fragment,{children:n},t))}const $r=t=>{const r=Sr(),{headerTitle:s}=r,{children:i,className:o,component:a="h1",sx:l=[],...c}=t;return i||s?e.jsx(n.Typography,{component:a,className:Mr("nbb-base-table-header-title",o),sx:[{fontSize:{xs:"subtitle1.fontSize",sm:"h4.fontSize"},fontWeight:"fontWeightBold"},...Array.isArray(l)?l:[l]],...c,children:i||s}):null},zr=t=>{const{headerActions:r}=Sr(),{children:s,className:i,sx:o=[],...a}=t;return s||r?e.jsx(n.Stack,{direction:"row",className:Mr("nbb-base-table-header-actions",i),sx:[{alignItems:"center"},...Array.isArray(o)?o:[o]],...a,children:s||r}):null},Rr=Tr({title:$r,actions:zr}),Zr=t=>{const{headerTitle:r,headerActions:s}=Sr(),{children:i,className:o,sx:a=[],...l}=t;return i||r||s?e.jsx(n.Stack,{direction:"row",className:Mr("nbb-base-table-header",o),sx:[{justifyContent:"space-between",alignItems:"center"},...Array.isArray(a)?a:[a]],...l,children:e.jsx(Cr,{defaultBlocks:Rr,defaultBlockOrder:Object.keys(Rr),blocksOverride:i,children:({blocks:e,blockOrder:t})=>Wr(e,t)})}):null},Br=t=>{const{children:r,className:s,sx:i=[],...o}=t;return e.jsx(n.Stack,{className:Mr("nbb-base-table-content-loader",s),sx:[{alignItems:"center",justifyContent:"center",width:"100%",height:e=>e.spacing(18.25)},...Array.isArray(i)?i:[i]],...o,children:r||e.jsx(n.CircularProgress,{})})},Pr=t=>{const{tabs:r,activeTab:s,onTabChange:i}=Sr(),{children:o,className:a,value:l,onChange:c,variant:u,sx:d,tabProps:h,centered:m=!1,...f}=t,{sx:y,...g}=h??{},p=void 0===d?[]:Array.isArray(d)?d:[d],b=void 0===y?[]:Array.isArray(y)?y:[y],w=l??s,v=u??"scrollable",k=c??((e,t)=>{i?.(t)});return r&&0!==r.length&&void 0!==w?e.jsx(n.Tabs,{value:w,onChange:k,variant:v,scrollButtons:"auto",allowScrollButtonsMobile:!0,centered:m,className:Mr("nbb-base-table-tabs",a),sx:[e=>({minHeight:44,position:"relative",width:"100%",overflow:"hidden","&::before":{content:'""',position:"absolute",bottom:0,left:0,width:"100%",height:"1px",backgroundColor:e.palette.divider},"& .MuiTabs-scroller":{overflowX:"auto"},"& .MuiTabs-list, & .MuiTabs-flexContainer":{minWidth:"max-content",justifyContent:"flex-start",margin:0},"& .MuiTabs-scrollButtons":{position:"absolute",top:0,bottom:0,zIndex:2,width:32,backgroundColor:"background.paper",opacity:1,visibility:"visible",transition:"opacity 160ms ease, visibility 160ms ease"},"& .MuiTabs-scrollButtons:first-of-type":{left:0,borderRight:e=>`1px solid ${e.palette.divider}`},"& .MuiTabs-scrollButtons:last-of-type":{right:0,borderLeft:e=>`1px solid ${e.palette.divider}`},"& .MuiTabs-scrollButtons.Mui-disabled":{opacity:0,visibility:"hidden",pointerEvents:"none"}}),...p],...f,children:o||r.map(t=>e.jsx(n.Tab,{value:t.value,...void 0!==t.disabled?{disabled:t.disabled}:{},sx:[{minHeight:44,minWidth:{xs:130,sm:182},flex:"0 0 auto",textTransform:"none"},...b],label:t.label,...g},String(t.value)))}):null},qr=r=>{const s=Sr(),{searchChipsTitle:i,searchChips:o,onSearchChipDelete:a}=Or(s,r),{children:l,className:c,sx:u=[],...d}=r,h=o??[];return l||0!==h.length?e.jsx(n.Stack,{className:Mr("nbb-base-table-search-chips",c),sx:[{width:"100%",minWidth:0,gap:{xs:1,sm:3}},...Array.isArray(u)?u:[u]],...Nr(d,...Ir),children:l||e.jsxs(e.Fragment,{children:[i&&e.jsx(n.Typography,{sx:e=>({fontSize:{xs:e.typography.body1.fontSize,sm:e.typography.h6.fontSize},fontWeight:600}),children:i}),e.jsx(n.Stack,{direction:"row",spacing:{xs:1,sm:2},useFlexGap:!0,flexWrap:"wrap",children:h.map((r,s)=>e.jsx(n.Chip,{label:r.label,deleteIcon:e.jsx(t.CloseOutlined,{fontSize:"inherit"}),...a&&{onDelete:e=>a(r,s,e)},sx:e=>({height:"auto",borderRadius:1.5,bgcolor:e.palette.grey[50],py:e.spacing(1.25),px:{xs:e.spacing(1.5),sm:e.spacing(2)},"& .MuiChip-label":{px:0,fontSize:{xs:e.typography.body2.fontSize,sm:e.typography.body1.fontSize},lineHeight:1.75},"& .MuiChip-deleteIcon":{m:0,ml:e.spacing(1),fontSize:e.typography.body1.fontSize,color:e.palette.text.secondary}})},r.key))})]})}):null},Ur=t=>{const{className:r,column:s,pinMeta:i,labelProps:o,children:a,sx:l,...c}=t,{className:u,sx:d,...h}=o??{},m=void 0===l?[]:Array.isArray(l)?l:[l],f=void 0===d?[]:Array.isArray(d)?d:[d],y=s.width??(i?.pin?Dr(s):void 0);return e.jsx(n.TableCell,{className:Mr("nbb-base-table-content-grid-head-cell",r),...i?.pin?{"data-pinned":i.pin}:{},...i?.isLeftBoundary?{"data-pinned-boundary":"left"}:{},...i?.isRightBoundary?{"data-pinned-boundary":"right"}:{},...s.align?{align:s.align}:{},sx:[{py:1,verticalAlign:"middle",position:"relative",zIndex:10,backgroundColor:"common.white",backgroundImage:"none",opacity:1,...y?{width:y,minWidth:y}:{},...Er(i,!0)},...m],...c,children:a||e.jsx(n.Typography,{variant:"body2",color:"text.secondary",...void 0!==u?{className:u}:{},sx:[{fontWeight:"bold"},...f],...h,children:s.headLabel})})},Hr=t=>{const{className:r,column:s,pinMeta:i,row:o,rowIndex:a,children:l,sx:c,...u}=t,d=void 0===c?[]:Array.isArray(c)?c:[c],h=s.width??(i?.pin?Dr(s):void 0);return e.jsx(n.TableCell,{className:Mr("nbb-base-table-content-grid-body-cell",r),...i?.pin?{"data-pinned":i.pin}:{},...i?.isLeftBoundary?{"data-pinned-boundary":"left"}:{},...i?.isRightBoundary?{"data-pinned-boundary":"right"}:{},...s.align?{align:s.align}:{},sx:[{py:1,height:72,verticalAlign:"middle",wordBreak:"break-word",...h?{width:h,minWidth:h}:{},...Er(i,!1)},...d],...u,children:l||jr(s,o,a)})},_r=t=>{const{className:r,children:s,pinMeta:i,sx:o,...a}=t,l=void 0===o?[]:Array.isArray(o)?o:[o];return e.jsx(n.TableCell,{className:Mr("nbb-base-table-content-grid-head-action-cell",r),...i?.pin?{"data-pinned":i.pin}:{},...i?.isLeftBoundary?{"data-pinned-boundary":"left"}:{},...i?.isRightBoundary?{"data-pinned-boundary":"right"}:{},sx:[{width:56,py:1,verticalAlign:"middle",position:"relative",zIndex:10,backgroundColor:"common.white",backgroundImage:"none",opacity:1},Er(i,!0),...l],...a,children:s})},Yr=r=>{const{className:s,row:i,showActionMenu:o,pinMeta:a,onOpenRowMenu:l,iconButtonProps:c,icon:u,children:d,sx:h,...m}=r,{sx:f,...y}=c??{},g=void 0===h?[]:Array.isArray(h)?h:[h],p=void 0===f?[]:Array.isArray(f)?f:[f],b=o&&Boolean(l);return e.jsx(n.TableCell,{className:Mr("nbb-base-table-content-grid-body-action-cell",s),...a?.pin?{"data-pinned":a.pin}:{},...a?.isLeftBoundary?{"data-pinned-boundary":"left"}:{},...a?.isRightBoundary?{"data-pinned-boundary":"right"}:{},sx:[{width:56,py:1,height:72,verticalAlign:"middle",textAlign:"right",...Er(a,!1)},...g],...m,children:d||e.jsx(n.IconButton,{"aria-label":"row action",size:"small",sx:[{color:"text.secondary",visibility:b?"visible":"hidden"},...p],onClick:e=>{l&&o&&l(e,i)},disabled:!b,tabIndex:b?0:-1,...y,children:u||e.jsx(t.MoreVertOutlined,{})})})},Jr=Tr({cell:Ur,actionCell:_r}),Gr=t=>{const{className:s,children:i,columns:o,rowActions:a,headCell:l,actionHeadCell:c,columnPinMeta:u,actionColumnPinMeta:d,sx:h,...m}=t,f=void 0===h?[]:Array.isArray(h)?h:[h];return e.jsx(n.TableRow,{className:Mr("nbb-base-table-content-grid-head-row",s),sx:[{backgroundColor:"background.paper"},...f],...m,children:e.jsx(Cr,{defaultBlocks:Jr,defaultBlockOrder:Object.keys(Jr),blocksOverride:i,children:({blocks:t})=>{const n=t.cell,s=t.actionCell;return e.jsxs(e.Fragment,{children:[o.map((t,s)=>{const i=u?.[s],o="function"==typeof l?l({column:t,columnIndex:s,...void 0!==i?{pinMeta:i}:{}}):l;return e.jsx(r.Fragment,{children:o??Lr(n,{column:t,...void 0!==i?{pinMeta:i}:{}},`cell-${String(t.field)}-${s}`)},`${String(t.field)}-${s}`)}),a&&(("function"==typeof c?c({rowActions:a,...void 0!==d?{actionColumnPinMeta:d}:{}}):c)??Lr(s,{...void 0!==d?{pinMeta:d}:{}},"action-cell"))]})}})})},Qr=Tr({cell:Hr,actionCell:Yr}),Kr=t=>{const{className:s,children:i,row:o,rowIndex:a,columns:l,rowActions:c,onRowClick:u,onOpenRowMenu:d,bodyCell:h,actionBodyCell:m,columnPinMeta:f,actionColumnPinMeta:y,sx:g,onClick:p,hover:b,...w}=t,v=void 0===g?[]:Array.isArray(g)?g:[g],k=(c?.(o)??[]).length>0,x=b??Boolean(u),S=u?e=>{p?.(e),e.defaultPrevented||u(o)}:p;return e.jsx(n.TableRow,{className:Mr("nbb-base-table-content-grid-body-row",s),hover:!1,sx:[{backgroundColor:"common.white","& > .MuiTableCell-root":{backgroundColor:"inherit",transition:e=>e.transitions.create("background-color",{duration:120})}},...x?[{...u?{cursor:"pointer"}:{},"&:hover":{backgroundColor:e=>e.palette.grey[100]||e.palette.action.hover},"&:hover > .MuiTableCell-root":{backgroundColor:"inherit"},"&:hover > .MuiTableCell-root[data-pinned]":{backgroundColor:"inherit"},"&.MuiTableRow-hover:hover":{backgroundColor:e=>e.palette.grey[100]||e.palette.action.hover},"&.MuiTableRow-hover:hover > .MuiTableCell-root":{backgroundColor:"inherit"},"&.MuiTableRow-hover:hover > .MuiTableCell-root[data-pinned]":{backgroundColor:"inherit"}}]:[],...v],onClick:S,...w,children:e.jsx(Cr,{defaultBlocks:Qr,defaultBlockOrder:Object.keys(Qr),blocksOverride:i,children:({blocks:t})=>{const n=t.cell,s=t.actionCell;return e.jsxs(e.Fragment,{children:[l.map((t,s)=>e.jsx(r.Fragment,{children:(()=>{const e=f?.[s];return"function"==typeof h?h({column:t,columnIndex:s,...void 0!==e?{pinMeta:e}:{},row:o,rowIndex:a}):h})()??Lr(n,{column:t,...void 0!==f?.[s]?{pinMeta:f[s]}:{},row:o,rowIndex:a},`cell-${String(t.field)}-${s}`)},`${String(t.field)}-${s}`)),c&&(("function"==typeof m?m({row:o,rowIndex:a,showActionMenu:k,...void 0!==y?{actionColumnPinMeta:y}:{},onOpenRowMenu:d}):m)??Lr(s,{row:o,showActionMenu:k,...void 0!==y?{pinMeta:y}:{},onOpenRowMenu:d},"action-cell"))]})}})})},Xr=Tr({row:Gr}),es=t=>{const{className:r,children:s,columns:i,rowActions:o,headRow:a,headCell:l,actionHeadCell:c,columnPinMeta:u,actionColumnPinMeta:d,sx:h,...m}=t,f=void 0===h?[]:Array.isArray(h)?h:[h],y="function"==typeof a?a({columns:i,rowActions:o,...void 0!==u?{columnPinMeta:u}:{},...void 0!==d?{actionColumnPinMeta:d}:{}}):a;return e.jsx(n.TableHead,{className:Mr("nbb-base-table-content-grid-head",r),sx:[{width:"100%",minWidth:0,backgroundColor:"common.white",backgroundImage:"none","& .MuiTableCell-root":{backgroundColor:"common.white",backgroundImage:"none",backgroundClip:"padding-box",opacity:1},position:"relative",zIndex:6},...f],...m,children:e.jsx(Cr,{defaultBlocks:Xr,defaultBlockOrder:Object.keys(Xr),blocksOverride:s,children:({blocks:e})=>y??Lr(e.row,{columns:i,rowActions:o,headCell:l,actionHeadCell:c,...void 0!==u?{columnPinMeta:u}:{},...void 0!==d?{actionColumnPinMeta:d}:{}})})})},ts=Tr({row:Kr}),ns=t=>{const{className:s,children:i,columns:o,rows:a,rowActions:l,onRowClick:c,getRowId:u,onOpenRowMenu:d,bodyRow:h,bodyCell:m,actionBodyCell:f,columnPinMeta:y,actionColumnPinMeta:g,sx:p,...b}=t,w=void 0===p?[]:Array.isArray(p)?p:[p];return e.jsx(n.TableBody,{className:Mr("nbb-base-table-content-grid-body",s),sx:w,...b,children:e.jsx(Cr,{defaultBlocks:ts,defaultBlockOrder:Object.keys(ts),blocksOverride:i,children:({blocks:t})=>{const n=t.row;return a.map((t,s)=>{const i=u?.(t,s)??t.id??s,a="function"==typeof h?h({row:t,rowIndex:s,columns:o,rowActions:l,onRowClick:c,onOpenRowMenu:d,...void 0!==y?{columnPinMeta:y}:{},...void 0!==g?{actionColumnPinMeta:g}:{}}):h;return e.jsx(r.Fragment,{children:a??Lr(n,{row:t,rowIndex:s,columns:o,rowActions:l,onRowClick:c,onOpenRowMenu:d,bodyCell:m,actionBodyCell:f,...void 0!==y?{columnPinMeta:y}:{},...void 0!==g?{actionColumnPinMeta:g}:{}},`row-${String(i)}`)},String(i))})}})})},rs=t=>{const{className:r,children:s,menuAnchorEl:i,menuRow:o,menuActions:a,onClose:l,anchorOrigin:c={vertical:"bottom",horizontal:"right"},transformOrigin:u={vertical:"top",horizontal:"right"},...d}=t;return e.jsx(n.Menu,{className:Mr("nbb-base-table-content-grid-row-menu",r),anchorEl:i,open:Boolean(i&&o),onClose:l,anchorOrigin:c,transformOrigin:u,...d,children:s||a.map((t,r)=>e.jsxs(n.MenuItem,{...void 0!==t.disabled?{disabled:t.disabled}:{},onClick:e=>{e.stopPropagation(),o&&t.onClick(o),l()},children:[t.icon&&e.jsx(n.ListItemIcon,{children:t.icon}),t.label]},`${String(t.label)}-${r}`))})},ss=r=>{const{noRowsOverlay:s}=Or(Sr(),r),{children:i,className:o,sx:a,...l}=r,c=void 0===a?[]:Array.isArray(a)?a:[a],u={icon:e.jsx(t.PersonOutlined,{}),title:"No Item",...s};return e.jsx(n.Box,{className:Mr("nbb-base-table-content-empty-state",o),sx:[e=>({alignItems:"center",backgroundColor:e.palette.grey[50]||e.palette.background.default,borderRadius:e.spacing(1),boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",padding:`${e.spacing(4.375)} 0`,width:"100%",minHeight:e.spacing(18.25),gap:e.spacing(1)}),...c],...Nr(l,...Ir),children:i||e.jsxs(e.Fragment,{children:[e.jsx(n.Box,{sx:{"& .MuiSvgIcon-root":{fontSize:e=>e.spacing(5),color:"text.disabled"}},children:u.icon}),e.jsx(n.Typography,{variant:"body1",sx:{fontWeight:e=>e.typography.h6.fontWeight,color:"text.disabled"},children:u.title}),u.description&&e.jsx(n.Typography,{variant:"body2",color:"text.secondary",children:u.description}),u.action&&e.jsx(n.Button,{variant:"outlined",size:"small",onClick:u.action.onClick,startIcon:u.action.icon,...void 0!==u.action.disabled?{disabled:u.action.disabled}:{},children:u.action.label})]})})},is=t=>{const{className:s,children:i,tableProps:o,onPinnedShadowChange:a,onHorizontalOverflowChange:l,showLeftPinnedShadow:c=!1,showRightPinnedShadow:u=!1,sx:d,...h}=t,{sx:m,...f}=o??{},y=r.useRef(null),g=r.useRef(null),[p,b]=r.useState({left:null,right:null}),w=void 0===d?[]:Array.isArray(d)?d:[d],v=r.useCallback(()=>{const e=y.current,t=g.current;if(!e||!t)return;const n=Math.max(0,t.scrollWidth-t.clientWidth),r=n>1;l?.(r);const s=r&&t.scrollLeft>1,i=r&&t.scrollLeft<n-1;a?.({left:s,right:i});const o=e.getBoundingClientRect(),c=t.querySelector('[data-pinned-boundary="left"]'),u=t.querySelector('[data-pinned-boundary="right"]'),d=c?Math.max(0,Math.round(c.getBoundingClientRect().right-o.left)):null,h=u?Math.max(0,Math.round(o.right-u.getBoundingClientRect().left)):null;b(e=>e.left===d&&e.right===h?e:{left:d,right:h})},[l,a]);return r.useEffect(()=>{const e=g.current;if(!e)return;v(),e.addEventListener("scroll",v,{passive:!0});const t=new ResizeObserver(v);return t.observe(e),()=>{e.removeEventListener("scroll",v),t.disconnect()}},[v]),r.useEffect(()=>{v()},[i,v]),e.jsxs(n.Box,{ref:y,sx:{position:"relative",width:"100%",minWidth:0},children:[null!==p.left&&e.jsx(n.Box,{sx:Fr("left",Math.max(0,p.left),c)}),null!==p.right&&e.jsx(n.Box,{sx:Fr("right",Math.max(0,p.right),u)}),e.jsx(n.TableContainer,{ref:g,component:n.Paper,elevation:0,className:Mr("nbb-base-table-content-grid-table",s),sx:[{width:"100%",overflowX:"auto",overflowY:"hidden",backgroundColor:"background.paper"},...w],...h,children:e.jsx(n.Table,{sx:[{backgroundColor:"common.white"},...void 0===m?[]:Array.isArray(m)?m:[m]],...f,children:i})})]})},os=Tr({table:is,head:es,body:ns,rowMenu:rs,emptyState:ss}),as=t=>{const o=Sr(),{columns:a,rows:l,actionColumn:c,rowActions:u,noRowsOverlay:d,onRowClick:h,getRowId:m}=Or(o,t),{className:f,children:y,emptyState:g,head:p,body:b,rowMenu:w,headRow:v,headCell:k,actionHeadCell:x,bodyRow:S,bodyCell:T,actionBodyCell:C,sx:O,...M}=t,N=void 0===O?[]:Array.isArray(O)?O:[O],[I,j]=r.useState(null),[D,A]=r.useState(null),[V,E]=r.useState(!1),[F,L]=r.useState({left:!1,right:!1}),W=(()=>{const e=i.useTheme(),t=s(e.breakpoints.up("sm")),n=s(e.breakpoints.up("md")),r=s(e.breakpoints.up("lg"));return s(e.breakpoints.up("xl"))?"xl":r?"lg":n?"md":t?"sm":"xs"})(),$=r.useCallback(e=>{E(t=>t===e?t:e)},[]),z=r.useCallback(e=>{L(t=>t.left===e.left&&t.right===e.right?t:e)},[]),R=r.useMemo(()=>V?a.map(e=>{const t=Vr(e.pin,W);if(void 0===t){const{pin:t,...n}=e;return n}return{...e,pin:t}}):a.map(e=>{const{pin:t,...n}=e;return n}),[a,V,V&&W]),Z=V&&"right"===Vr(c?.pin,W)?"right":void 0,B=r.useMemo(()=>{const e=function(e){const t=e.map(()=>({})),n=[],r=[];let s=0;e.forEach((e,r)=>{"left"===e.pin&&(t[r]={pin:"left",left:s},s+=Dr(e),n.push(r))});let i=0;for(let n=e.length-1;n>=0;n-=1){const s=e[n];"right"===s?.pin&&(t[n]={pin:"right",right:i},i+=Dr(s),r.push(n))}const o=n[n.length-1];void 0!==o&&(t[o]={...t[o],isLeftBoundary:!0});const a=r[r.length-1];return void 0!==a&&(t[a]={...t[a],isRightBoundary:!0}),t}(R),t=Boolean(u)&&"right"===Z?56:0;return e.map(e=>{const n="left"===e.pin?e:"right"===e.pin?{...e,right:(e.right??0)+t}:e;return"left"===n.pin&&n.isLeftBoundary?{...n,showBoundaryShadow:F.left}:"right"===n.pin&&n.isRightBoundary?{...n,showBoundaryShadow:F.right}:n})},[F.left,F.right,Z,R,u]),P=r.useMemo(()=>{if(u&&"right"===Z){const e=!R.some(e=>"right"===e.pin);return{pin:"right",right:0,isRightBoundary:e,showBoundaryShadow:e&&F.right}}},[F.right,Z,R,u]),q=r.useMemo(()=>D&&u?u(D):[],[D,u]),U=(e,t)=>{e.stopPropagation(),j(e.currentTarget),A(t)},H=()=>{j(null),A(null)},_="function"==typeof p?p({columns:R,rowActions:u,columnPinMeta:B,...void 0!==P?{actionColumnPinMeta:P}:{},headRow:v,headCell:k,actionHeadCell:x}):p,Y="function"==typeof b?b({columns:R,rows:l,rowActions:u,onRowClick:h,getRowId:m,onOpenRowMenu:U,columnPinMeta:B,...void 0!==P?{actionColumnPinMeta:P}:{},bodyRow:S,bodyCell:T,actionBodyCell:C}):b,J="function"==typeof w?w({menuAnchorEl:I,menuRow:D,menuActions:q,onClose:H}):w;return e.jsx(n.Stack,{className:Mr("nbb-base-table-content-grid",f),sx:[{width:"100%",minWidth:0},...N],...Nr(M,...Ir),children:e.jsx(Cr,{defaultBlocks:os,defaultBlockOrder:Object.keys(os),blocksOverride:y,children:({blocks:t})=>{const n=t;if(0===l.length)return g??Lr(n.emptyState,{...void 0!==d?{noRowsOverlay:d}:{}},"empty-state");const r=_??Lr(n.head,{columns:R,rowActions:u,...void 0!==B?{columnPinMeta:B}:{},...void 0!==P?{actionColumnPinMeta:P}:{},headRow:v,headCell:k,actionHeadCell:x},"grid-head"),s=Y??Lr(n.body,{columns:R,rows:l,rowActions:u,onRowClick:h,getRowId:m,onOpenRowMenu:U,...void 0!==B?{columnPinMeta:B}:{},...void 0!==P?{actionColumnPinMeta:P}:{},bodyRow:S,bodyCell:T,actionBodyCell:C},"grid-body"),i=Lr(n.table,{onHorizontalOverflowChange:$,onPinnedShadowChange:z,showLeftPinnedShadow:F.left,showRightPinnedShadow:F.right,children:e.jsxs(e.Fragment,{children:[r,s]})},"grid-table"),o=J??Lr(n.rowMenu,{menuAnchorEl:I,menuRow:D,menuActions:q,onClose:H},"grid-row-menu");return e.jsxs(e.Fragment,{children:[i,o]})}})})},ls=Tr({loader:Br,emptyState:ss,grid:as}),cs=t=>{const{isLoading:r,rows:s}=Or(Sr(),t),{children:i,className:o,...a}=t;return e.jsx(n.Box,{className:Mr("nbb-base-table-content",o),...Nr(a,...Ir),children:e.jsx(Cr,{defaultBlocks:ls,defaultBlockOrder:Object.keys(ls),blocksOverride:i,children:({blocks:e})=>{const t=e;return r?Lr(t.loader,{},"content-loader"):s&&0!==s.length?Lr(t.grid,{},"content-grid"):Lr(t.emptyState,{},"content-empty-state")}})})},us=t=>{const{pagination:r,rows:o,isLoading:a}=Or(Sr(),t),{children:l,className:c,sx:u=[],...d}=t,h=i.useTheme(),m=s(h.breakpoints.down("sm")),f=s(h.breakpoints.down("md"));if(!r||a||!o||0===o.length)return null;const y=m?0:1,g=m||f?0:1;return e.jsx(n.Stack,{className:Mr("nbb-base-table-pagination",c),sx:[{alignItems:"center",width:"100%"},...Array.isArray(u)?u:[u]],...Nr(d,...Ir),children:l||e.jsx(n.Pagination,{count:Math.max(1,Math.ceil(r.total/r.pageSize)),page:r.page,onChange:(e,t)=>r.onPageChange(t),variant:"outlined",color:"primary",shape:"rounded",boundaryCount:y,siblingCount:g,sx:{maxWidth:"100%","& .MuiPagination-ul":{flexWrap:"nowrap",justifyContent:"center"}}})})},ds=Tr({header:Zr,tabs:Pr,searchChips:qr,content:cs,pagination:us}),hs=({sx:t,spacing:s=3,className:i,children:o,...a})=>{const l=function(e,...t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}(a,...Ir),c=Nr(a,...Ir),{tabs:u,activeTab:d,onTabChange:h}=l,[m,f]=r.useState(u?.[0]?.value);r.useEffect(()=>{u?.length&&f(e=>void 0!==e&&u.some(t=>t.value===e)?e:u[0]?.value)},[u]);const y=void 0!==d?d:m,g={...l,...void 0!==y?{activeTab:y}:{},onTabChange:e=>{void 0===d&&f(e),h?.(e)}};return e.jsx(n.Stack,{className:Mr("nbb-base-table",i),spacing:s,sx:[{p:2,width:"100%",maxWidth:"100%",boxSizing:"border-box"},...Array.isArray(t)?t:[t]],...c,children:e.jsx(xr,{...g,children:e.jsx(Cr,{defaultBlocks:ds,defaultBlockOrder:Object.keys(ds),blocksOverride:o,children:({blocks:e,blockOrder:t})=>Wr(e,t)})})})},ms=Zr;ms.Title=$r,ms.Actions=zr;const fs=qr,ys=es;ys.Row=Gr,ys.Cell=Ur,ys.ActionCell=_r;const gs=ns;gs.Row=Kr,gs.Cell=Hr,gs.ActionCell=Yr;const ps=as;ps.Table=is,ps.Head=ys,ps.Body=gs,ps.RowMenu=rs;const bs=cs;bs.Loader=Br,bs.EmptyState=ss,bs.Grid=ps,hs.Header=ms,hs.Tabs=Pr,hs.SearchChips=fs,hs.Content=bs,hs.Pagination=us;const ws=["labels","headerAction","layout","data"],vs=r.createContext(void 0),ks=()=>{const e=r.useContext(vs);if(!e)throw new Error("useBaseViewListContext must be used within a BaseViewListProvider");return e};function xs(e){return"[object Object]"===Object.prototype.toString.call(e)&&!r.isValidElement(e)}const Ss=new Set(["__proto__","prototype","constructor"]);function Ts(e,t){const n={...e};for(const e of Reflect.ownKeys(t)){if(Ss.has(e))continue;const r=n[e],s=t[e];xs(r)&&xs(s)?n[e]=Ts(r,s):n[e]=s}return n}function Cs(...e){return e.flat().filter(Boolean).join(" ")}function Os(e,...t){const n={...e};for(const e of t)delete n[e];return n}const Ms=({children:t,className:r,onClick:s,...i})=>{const{labels:o,headerAction:a}=Ts(ks(),i),{headerActionButton:l}=o??{};return e.jsx(n.Button,{variant:"outlined",size:"medium",className:Cs("nbb-base-view-list-header-action-button",r),...(s??a)&&{onClick:s??a},...Os(i,...ws),children:t??l})},Ns=({sx:t,className:r,...s})=>{const{layout:i}=Ts(ks(),s),o="two-column"===i;return e.jsx(n.Typography,{component:"dt",variant:"subtitle1",sx:[e=>({display:"inline-flex",alignItems:"center",px:2,py:3,flexShrink:0,width:{xs:96,sm:204},fontWeight:e.typography.fontWeightBold,...o?{}:{p:0}}),...Array.isArray(t)?t:[t]],className:Cs("nbb-base-view-list-item-key",r),...Os(s,...ws)})},Is=({sx:t,className:r,...s})=>{const{layout:i}=Ts(ks(),s);return e.jsx(n.Typography,{component:"dd",variant:"body2",sx:[{display:"inline-flex",alignItems:"center",px:2,py:3,..."two-column"===i?{}:{p:0}},...Array.isArray(t)?t:[t]],className:Cs("nbb-base-view-list-item-value",r),...Os(s,...ws)})},js=({sx:t,className:r,...s})=>{const{layout:i}=Ts(ks(),s),o="two-column"===i;return e.jsx(n.ListItem,{divider:!0,sx:[e=>({display:"flex",flexDirection:o?"row":"column",alignItems:o?"center":"flex-start",...o?{p:0}:{px:2,py:3},"&:first-of-type":{borderTopColor:e.palette.divider,borderTopWidth:1,borderTopStyle:"solid"}}),...Array.isArray(t)?t:[t]],className:Cs("nbb-base-view-list-item",r),...Os(s,...ws)})};var Ds;function As(...e){return e.flat().filter(Boolean).join(" ")}function Vs({labels:r,searchValue:s,onSearchFieldChange:i,onSearchSubmit:o}){return e.jsx(n.TextField,{type:"search",variant:"outlined",placeholder:r.searchFieldPlaceholder,onChange:e=>i?.(e.target.value),onKeyDown:e=>{o&&"Enter"===e.key&&!e.nativeEvent.isComposing&&e.target instanceof HTMLInputElement&&(e.preventDefault(),o())},...void 0!==s?{value:s}:{},sx:e=>({width:{xs:"100%",md:e.spacing(44.75)},"& .MuiOutlinedInput-root":{pr:1.5,"& .MuiOutlinedInput-input":{pl:1.5,pt:1.625,pb:1.625,fontSize:e.typography.body2.fontSize}}}),slotProps:{input:{endAdornment:e.jsx(n.InputAdornment,{position:"end",children:e.jsx(n.IconButton,{"aria-label":"Search",edge:"end",size:"small",...o?{onClick:o}:{},children:e.jsx(t.Search,{fontSize:"small"})})})}}})}function Es(n){return{icon:e.jsx(t.PersonOutlined,{}),title:n.emptyStateMessage}}function Fs(n,r,s,i,o){if(!o||!n.rowActions)return;const a=n.rowActions;return n=>{if(i&&!i(n))return[];const l=o(n);return l&&0!==l.length?l.flatMap(i=>"activate"===i?r?[{label:a.activate,icon:e.jsx(t.Loop,{sx:e=>({fontSize:e.typography.h5.fontSize})}),onClick:()=>r(n.id)}]:[]:"deactivate"===i&&s?[{label:a.deactivate,icon:e.jsx(t.BlockOutlined,{sx:e=>({fontSize:e.typography.h5.fontSize})}),onClick:()=>s(n.id)}]:[]):[]}}function Ls(t,r){return[{field:"name",headLabel:t.headerRow.name,pin:{sm:"left"},width:180},{field:"createdAt",headLabel:t.headerRow.createdAt,width:180,valueFormatter:t=>{const r=function(e){if(!e)return null;const t=wr.fromISO(e);return t.isValid?t:null}("string"==typeof t?t:void 0),s=r?.toFormat("yyyy/MM/dd")??"N/A",i=r?.toLocaleString(wr.DATETIME_FULL)??"N/A";return e.jsx(n.Tooltip,{title:i,children:e.jsx("span",{children:s})})}},{field:"status",headLabel:t.headerRow.status,width:180,valueFormatter:(e,{row:n})=>n.status===r.inUse?t.cellData.statusActive:n.status===r.notInUse?t.cellData.statusInactive:n.status}]}function Ws(e){return{page:e.currentPage,pageSize:1,total:e.totalPages,onPageChange:e.onPageChange}}function $s(t,n){return n.filter(e=>e in t).map(n=>e.jsx(r.Fragment,{children:t[n]},String(n)))}js.Key=Ns,js.Value=Is,Ds={header:({children:t,className:r,sx:s,...i})=>{const{labels:o,headerAction:a}=Ts(ks(),i),{headerTitle:l,headerActionButton:c}=o??{};return(l??c??t??null)&&e.jsx(n.Stack,{direction:"row",className:Cs("nbb-base-view-list-header",r),sx:[{columnGap:2,justifyContent:"space-between",alignItems:"center"},...Array.isArray(s)?s:[s]],...Os(i,...ws),children:t??e.jsxs(e.Fragment,{children:[e.jsx(n.Typography,{component:"div",sx:{typography:{xs:"h6",sm:"h4"},fontWeight:"bold",flex:"1 1 auto",minWidth:0},children:l}),c||a?e.jsx(n.Box,{sx:{flexShrink:0},children:e.jsx(Ms,{...o&&{labels:o},...a&&{headerAction:a}})}):null]})})},subheader:({children:t,className:r,sx:s,...i})=>{const{labels:o}=Ts(ks(),i),{subheaderTitle:a,headerTitle:l,headerActionButton:c}=o??{};return(a??t??null)&&e.jsx(n.Stack,{direction:"row",className:Cs("nbb-base-view-list-subheader",r),sx:[{columnGap:2,justifyContent:"space-between",alignItems:"center",...l||c?{"&&":{mt:{xs:2,sm:4}}}:{}},...Array.isArray(s)?s:[s]],...Os(i,...ws),children:t??e.jsx(n.Typography,{component:"div",typography:"body2",sx:e=>({color:e.palette.secondary.main,flex:"1 1 auto",minWidth:0}),children:a})})},itemList:({children:t,sx:r,className:s,...i})=>{const{data:o}=Ts(ks(),i);return e.jsx(n.List,{component:"dl",sx:[{m:0,p:0},...Array.isArray(r)?r:[r]],className:Cs("nbb-base-view-list-item-list",s),...Os(i,...ws),children:t??(void 0===o?null:Array.isArray(o)?o.map((t,n)=>e.jsx(js,{children:e.jsx(js.Value,{children:t})},`${n}-${String(t)}`)):Object.entries(o).map(([t,n])=>e.jsxs(js,{children:[e.jsx(js.Key,{children:t}),e.jsx(js.Value,{children:n})]},t)))})},item:js,itemKey:Ns,itemValue:Is},Object.fromEntries(Object.entries(Ds).map(([e,t])=>[e,r.createElement(t,{key:e})]));const zs=({className:t,children:r,listUsersTitle:s,labels:i,searchValue:o,onSearchFieldChange:a,onSearchSubmit:l,onItemActivate:c,onItemDeactivate:u,shouldShowDropdownMenu:d,resolveRowAction:h,statusMatch:m={inUse:"active",notInUse:"inactive"},onNavigate:f,pagination:y,data:g,rowHref:p,tabs:b,currentTab:w,onTabChange:v,...k})=>{const x=Ls(i,m),S=b&&function(t){return t.map(t=>({value:t.key,disabled:Boolean(t.isDisabled),label:e.jsxs(e.Fragment,{children:[t.label,t.subtitle&&e.jsx(n.Typography,{component:"span",variant:"body2",color:"text.secondary",children:t.subtitle})]})}))}(b),T=y&&Ws(y),C=Fs(i,c,u,d,h),O=Vs({labels:i,searchValue:o,onSearchFieldChange:a,onSearchSubmit:l}),M=e.jsx(zs.Title,{}),N=e.jsx(zs.Action,{}),I=e.jsxs(zs.Header,{children:[M,N]}),j=e.jsx(zs.Loader,{}),D=e.jsx(zs.Tabs,{}),A=e.jsx(zs.SearchChips,{}),V=e.jsx(zs.Table,{}),E=e.jsx(zs.Pagination,{...y?{pagination:y}:{},data:g,...void 0!==k.isLoading?{isLoading:k.isLoading}:{}}),F={title:M,action:N,header:I,loader:j,content:e.jsx(zs.Content,{}),tabs:D,searchChips:A,table:V,pagination:E},L=["header","searchChips","content","pagination"],W=void 0===r?$s(F,L):"function"==typeof r?(()=>{const{blocks:e,blockOrder:t}=r({defaultBlocks:F,defaultBlockOrder:L});return $s(e,t)})():r;return e.jsx(hs,{className:As("nbb-list-users-container",t),headerTitle:s,headerActions:O,columns:x,rows:g,...C?{rowActions:C,actionColumn:{pin:"right"}}:{},noRowsOverlay:Es(i),...S?{tabs:S}:{},...void 0!==w?{activeTab:w}:{},...v?{onTabChange:v}:{},...T?{pagination:T}:{},...p&&f?{onRowClick:e=>{const t=p(e);t&&f(t)}}:{},...k,children:W})};zs.Title=({listUsersTitle:t,children:n,className:r,...s})=>e.jsx(hs.Header.Title,{className:As("nbb-list-users-title",r),...s,children:n||t}),zs.Header=({children:t,className:n,sx:r=[],...s})=>e.jsx(hs.Header,{className:As("nbb-list-users-header",n),sx:[{flexWrap:{xs:"wrap",md:"nowrap"},alignItems:{xs:"flex-start",md:"center"},columnGap:2,rowGap:2},...Array.isArray(r)?r:[r]],...s,children:t}),zs.Action=({children:t,className:n,labels:r,searchValue:s,onSearchFieldChange:i,onSearchSubmit:o,sx:a=[],...l})=>{const c=t||(r?Vs({labels:r,searchValue:s,onSearchFieldChange:i,onSearchSubmit:o}):void 0);return e.jsx(hs.Header.Actions,{className:As("nbb-list-users-actions",n),sx:[{width:{xs:"100%",md:"auto"},justifyContent:{xs:"flex-start",md:"flex-end"}},...Array.isArray(a)?a:[a]],...l,children:c})},zs.Loader=({children:t,className:n,...r})=>e.jsx(hs.Content.Loader,{className:As("nbb-list-users-loader",n),...r,children:t}),zs.Content=({children:t,className:n,...r})=>e.jsx(hs.Content,{className:As("nbb-list-users-content",n),...r,children:t}),zs.Tabs=({children:t,className:n,...r})=>e.jsx(hs.Tabs,{className:As("nbb-list-users-tabs",n),...r,children:t}),zs.SearchChips=({className:t,...n})=>e.jsx(hs.SearchChips,{className:As("nbb-list-users-search-chips",t),...n}),zs.Pagination=({className:t,pagination:n,data:r,isLoading:s,...i})=>{const o=n&&Ws(n),a=As("nbb-list-users-pagination",n?.className,t);return e.jsx(hs.Pagination,{className:a,...o?{pagination:o}:{},...r?{rows:r}:{},...void 0!==s?{isLoading:s}:{},...i})},zs.Table=({className:t,labels:n,data:r,columns:s,rowActions:i,actionColumn:o,onRowClick:a,onItemActivate:l,onItemDeactivate:c,shouldShowDropdownMenu:u,resolveRowAction:d,rowHref:h,onNavigate:m,statusMatch:f={inUse:"active",notInUse:"inactive"},...y})=>{const g=s??(n?Ls(n,f):void 0),p=n?Es(n):void 0,b=n?Fs(n,l,c,u,d):void 0,w=void 0!==i?i:b,v=o??(w?{pin:"right"}:void 0),k=a??(h&&m?e=>{const t=h(e);t&&m(t)}:void 0);return e.jsx(hs.Content.Grid,{className:As("nbb-list-users-table",t),...g?{columns:g}:{},...r?{rows:r}:{},...p?{noRowsOverlay:p}:{},...w?{rowActions:w}:{},...v?{actionColumn:v}:{},...k?{onRowClick:k}:{},...y})},exports.ListUsers=zs;