@uxland/primary-shell 5.3.1 → 5.3.2
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.js +51 -36
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +18 -21
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/domain/business-rules.d.ts +3 -0
- package/package.json +1 -1
- package/src/internal-plugins/activity-history/activity-history-item/domain/business-rules.ts +5 -0
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/activity-history-timeline.ts +5 -0
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/template.ts +32 -17
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/activity-history-timeline.d.ts +0 -17
package/dist/index.umd.cjs
CHANGED
|
@@ -317,11 +317,7 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
317
317
|
${template$f(this)}
|
|
318
318
|
`}static get styles(){return i$A`
|
|
319
319
|
${r$I(styles$f)}
|
|
320
|
-
`}handleTest(){console.log(this.selectedPeriodDate)}};__decorateClass$k([n$v()],ExportPdfModal.prototype,"selectedRadioOption",2),__decorateClass$k([n$v()],ExportPdfModal.prototype,"text",2),__decorateClass$k([n$v()],ExportPdfModal.prototype,"selectedVisibilityLevelElement",2),__decorateClass$k([n$v()],ExportPdfModal.prototype,"selectedPeriodDate",2),__decorateClass$k([n$v({type:Array})],ExportPdfModal.prototype,"arrayElements",2),ExportPdfModal=__decorateClass$k([t$j("export-pdf-modal")],ExportPdfModal);class ExportToPdfHandler extends ApiBaseHandler{async handle(){try{this.api.interactionService.confirm(void 0,ExportPdfModal,{title:translate("modal.selectExportOption"),confirmButtonText:"Exportar",cancelButtonText:"Cancelar"})}catch(W){this._notifyError(W.message)}}_notifyError(W){this.api.notificationService.error(W||"actions.delete.error")}}class ExportPdf{}let request$9;const bootstrapExportPdf=X=>{request$9=X.registerRequest(ExportPdf,ExportToPdfHandler)},teardownExportPdf=()=>{request$9==null||request$9.dispose()},{addActivityHistoryItems}=activityHistoryCollectionsSlice.actions;class AddHistoryItemsHandler extends StoreBaseHandler{async handle(W){try{const J=validateAndFilterItems(W.items);this.store.dispatch(addActivityHistoryItems({id:W.entityId,items:J,componentFactory:W.componentFactory,searchPredicate:W.searchPredicate}))}catch(J){console.log(J.message)}}}let request$8;const bootstrapAddHistoryItems=X=>{request$8=X.registerRequest(addHistoryItemsCommand,AddHistoryItemsHandler)},teardownAddHistoryItems=()=>{request$8==null||request$8.dispose()},{updateActivityHistoryItem}=activityHistoryCollectionsSlice.actions;class UpdateHistoryItemHandler extends StoreBaseHandler{async handle(W){try{ensureAreValidActivityHistoryItems([W.item]),this.store.dispatch(updateActivityHistoryItem({id:W.entityId,item:W.item}))}catch(J){console.log(J.message)}}}const updateHistoryItemCommand="update_history_item_request";let request$7;const bootstrapUpdateHistoryItem=X=>{request$7=X.registerRequest(updateHistoryItemCommand,UpdateHistoryItemHandler)},teardownUpdateHistoryItem=()=>{request$7==null||request$7.dispose()};function connectedProperty(X,W={}){return createConnectedProperty(store)(X,W)}const activityHistorySearchStringSelector=X=>X.activityHistoryFilters.searchString,isAnyCollectionBusySelector=X=>X.activityHistoryCollections.busy.length>0,isAnyCollectionLoadingWithoutAnyLoaded=X=>{const W=Object.values(X.activityHistoryCollections.collections);return!(W!=null&&W.length)&&isAnyCollectionBusySelector(X)},isSomeCollectionLoadedAndOtherLoading=X=>Object.values(X.activityHistoryCollections.collections)&&isAnyCollectionBusySelector(X);function getUniqueObjects(X,W,J){return Array.from(X.map(te=>({id:W.reduce((re,ne)=>re==null?void 0:re[ne],te),description:J.reduce((re,ne)=>re==null?void 0:re[ne],te)})).filter(te=>typeof te.id=="string"&&typeof te.description=="string").reduce((te,re)=>te.set(re.id,re),new Map).values())}class TrueSpec extends Spec{isSatisfiedBy(){return!0}}class CommonFilterSpec extends Spec{constructor(W){super(),this.commonFilters=W}isSatisfiedBy(W){return this.commonFilters.filter(re=>re.enabled).reduce((re,ne)=>re.and(new ne.spec),new TrueSpec).isSatisfiedBy(W)}}class FalseSpec extends Spec{isSatisfiedBy(){return!1}}class PropPathSpec extends Spec{constructor(W,J){super(),this.propPath=W,this.value=J}isSatisfiedBy(W){return this.propPath.reduce((te,re)=>te==null?void 0:te[re],W)===this.value}}class CustomFilterSpec extends Spec{constructor(W){super(),this.filters=W}isSatisfiedBy(W){const J=this.filters.filter(te=>te.enabled);return J.length===0?!0:J.every(te=>{if(!this.belongsToGroup(W,te))return!0;const re=te.filters.filter(ne=>ne.enabled||ne.singleOption);return re.length===0?!0:re.every(ne=>ne.singleOption?ne.enabled?!0:new PropPathSpec(ne.propPathValue,!1).isSatisfiedBy(W):!ne.enabledValues||ne.enabledValues.length===0?!0:ne.enabledValues.reduce((de,he)=>de.or(new PropPathSpec(ne.propPathValue,he)),new FalseSpec).isSatisfiedBy(W))})}belongsToGroup(W,J){return W.type===J.id}}const normalizeStringToNFD=X=>X==null?"":String(X).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase(),propContainsString=(X,W)=>{const J=normalizeStringToNFD(X),te=normalizeStringToNFD(W);return J.toString().toLowerCase().indexOf(te)!==-1||J.toString().indexOf(te)!==-1},commonFieldsSearchPredicate=(X,W)=>{var he,ce,ue,pe,fe,ge,me;const J=((he=X.professional)==null?void 0:he.name)&&propContainsString((ce=X.professional)==null?void 0:ce.name,W),te=X.center.description&&propContainsString(X.center.description,W),re=((ue=X.professional)==null?void 0:ue.speciality.description)&&propContainsString((pe=X.professional)==null?void 0:pe.speciality.description,W),ne=((fe=X.professional)==null?void 0:fe.role.description)&&propContainsString((ge=X.professional)==null?void 0:ge.role.description,W),oe=X.service.description&&propContainsString(X.service.description,W),de=(me=X.diagnostics)==null?void 0:me.some(ve=>propContainsString(ve.id,W)||propContainsString(ve.description,W));return J||te||re||ne||oe||de};class SearchStringSpec extends Spec{constructor(W,J){super(),this.searchString=W,this.searchPredicate=J}isSatisfiedBy(W){var re;if(!((re=this.searchString)!=null&&re.trim()))return!0;const J=commonFieldsSearchPredicate(W,this.searchString),te=this.searchPredicate?this.searchPredicate(this.searchString.toLowerCase(),W):!1;return!!(J||te)}}class TypeSpec extends Spec{constructor(W){super(),this.itemType=W}isSatisfiedBy(W){return(W==null?void 0:W.type)===this.itemType}}class ComposedTypeSpec extends Spec{constructor(W){super(),this.filters=W}isSatisfiedBy(W){return this.filters.filter(re=>re.enabled).map(re=>re.id).reduce((re,ne)=>re.or(new TypeSpec(ne)),new FalseSpec).isSatisfiedBy(W)}}const activityHistoryFiltersSelector=X=>X.activityHistoryFilters.filters,activityHistoryCommonFiltersSelector=createSelector(activityHistoryFiltersSelector,X=>{var W;return((W=X.find(isCommonFilterGroup))==null?void 0:W.filters)||[]}),activityHistoryEnabledCommonFiltersSelector=createSelector(activityHistoryCommonFiltersSelector,X=>X.filter(W=>W.enabled)),areCommonFiltersActive=createSelector(activityHistoryEnabledCommonFiltersSelector,X=>!!X.length),activityHistoryCustomFilterGroupsSelector=createSelector(activityHistoryFiltersSelector,X=>X.filter(isNotCommonFilterGroup).sort(sortBySortProperty)),sortBySortProperty=(X,W)=>Number(X.sort)-Number(W.sort),areCustomFiltersActive=createSelector(activityHistoryCustomFilterGroupsSelector,X=>X.some(W=>W.filters.some(J=>{var te;return(te=J.enabledValues)==null?void 0:te.length}))),activeGroupsWithEnabledFilters=createSelector(activityHistoryCustomFilterGroupsSelector,X=>X.filter(W=>W.enabled).map(({id:W,title:J,enabled:te,sort:re,filters:ne})=>({id:W,title:J,enabled:te,sort:re,filters:ne.filter(oe=>{var de;return(de=oe.enabledValues)==null?void 0:de.length})})).filter(W=>W.filters.length>0)),isSameVisit=(X,W)=>{var ne,oe,de,he,ce,ue,pe,fe,ge,me,ve,be,ye,we;const J=((ne=X.professional)==null?void 0:ne.id)===((oe=W.professional)==null?void 0:oe.id)&&((de=X.professional)==null?void 0:de.role.id)===((he=W.professional)==null?void 0:he.role.id)&&((ce=X.professional)==null?void 0:ce.speciality.id)===((ue=W.professional)==null?void 0:ue.speciality.id),te=((pe=X.ep)==null?void 0:pe.id)===((fe=W.ep)==null?void 0:fe.id)&&((ge=X.up)==null?void 0:ge.id)===((me=W.up)==null?void 0:me.id)&&((ve=X.center)==null?void 0:ve.id)===((be=W.center)==null?void 0:be.id)&&((ye=X.service)==null?void 0:ye.id)===((we=W.service)==null?void 0:we.id),re=new Date(X.date).toDateString()===new Date(W.date).toDateString();return J&&te&&re},withinEightHours=(X,W)=>Math.abs(new Date(X).getTime()-new Date(W).getTime())<=8*60*60*1e3,areSameDiagnostics=(X,W)=>{if(X.length!==W.length)return!1;const J=X.map(re=>re.id).sort(),te=W.map(re=>re.id).sort();return J.every((re,ne)=>re===te[ne])},groupActivityHistoryItems=X=>{const W=[];return X==null||X.forEach(J=>{let te=!1;for(const re of W){const ne=re.items[0],oe=re.items[re.items.length-1];if(isSameVisit(ne,J)&&withinEightHours(ne.date,J.date)&&withinEightHours(oe.date,J.date)){re.items.push(J),te=!0;break}}te||W.push({idGroup:Math.random().toString(36).substr(2,9),items:[J]})}),W.forEach(J=>{const te=[],re=[];J.items.forEach(ne=>{var oe;if(((oe=ne.diagnostics)==null?void 0:oe.length)>0){let de=!1;for(const he of te){const ce=he.items[0];if(areSameDiagnostics(ce.diagnostics,ne.diagnostics)){he.items.push(ne),de=!0;break}}de||te.push({idSubGroup:Math.random().toString(36).substr(2,9),items:[ne]})}else re.push(ne)}),J.items=re,J.subGroups=te}),W},sortGroupsByMostRecentDate=X=>{const W=re=>re.reduce((ne,oe)=>{const de=new Date(oe.date);return de>ne?de:ne},new Date(0)),J=re=>re.sort((ne,oe)=>new Date(oe.date)-new Date(ne.date)),te=re=>{let ne=[];return re.items.length>0&&ne.push(W(re.items)),re.subGroups.forEach(oe=>{oe.items.length>0&&ne.push(W(oe.items))}),ne.length>0?new Date(Math.max(...ne)):new Date(0)};return X.forEach(re=>{re.items=J(re.items),re.subGroups.forEach(ne=>{ne.items=J(ne.items)})}),X.sort((re,ne)=>te(ne)-te(re))},activityHistoryCollectionsSelector=X=>X.activityHistoryCollections.collections,mapItemsWithMetadata=(X,W,J,te)=>X.map(re=>({...re,searchPredicate:te,componentFactory:W,type:J})),activityHistoryMappedItems=createSelector(activityHistoryCollectionsSelector,X=>Object.values(X).flatMap(W=>mapItemsWithMetadata(W.items,W.componentFactory,W.id,W.searchPredicate))),customFilterGroupsWithOptionsSelector=createSelector(activityHistoryCustomFilterGroupsSelector,activityHistoryCollectionsSelector,(X,W)=>X.map(te=>{const re=W[te.id];return{...te,filters:te.filters.map(ne=>({...ne,options:(ne.singleOption?[]:getUniqueObjects(re.items,ne.propPathValue,ne.propsPathDescription))||[]}))}})),activityHistoryGroupedItems=createSelector(activityHistoryMappedItems,activityHistorySearchStringSelector,activityHistoryCommonFiltersSelector,activityHistoryCustomFilterGroupsSelector,(X,W,J,te)=>{const re=X.filter(de=>new SearchStringSpec(W,de.searchPredicate).and(new CommonFilterSpec(J)).and(new ComposedTypeSpec(te)).and(new CustomFilterSpec(te)).isSatisfiedBy(de)),ne=groupActivityHistoryItems(re);return sortGroupsByMostRecentDate(ne)}),styles$e=":host{min-height:1px;height:100%}.virtualizer{height:100%;padding-inline:16px}.container{min-height:1px;height:100%}.visit:first-child{margin-top:var(--dss-spacing-md)}.visit{width:calc(100% - var(--dss-spacing-md) - var(--dss-spacing-md));display:flex;flex-direction:column;gap:var(--dss-spacing-md);background-color:#fff;border-radius:var(--dss-radius-sm);padding:var(--dss-spacing-sm);margin-bottom:var(--dss-spacing-md)}.visit .visit__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit .visit__header .title{flex:1;font-size:14px;line-height:24px;display:flex;flex-direction:row;gap:12px;color:var(--color-neutral-800)}.visit .visit__header .title-date{font-weight:700}.visit .visit__header .title-description{font-weight:600;display:flex;flex-direction:row;gap:4px}.visit .visit__header .highlight{background-color:#ff0;font-weight:700}.visit .visit__items{display:flex;flex-direction:column;gap:16px}.visit .visit__items .item{border-bottom:var(--dss-border-width-sm) solid va(--color-neutral-200)}.visit .visit__items .item:last-of-type{border:none}.visit .diagnostics{display:flex;flex-direction:column;gap:16px}.visit .diagnostics .diagnostics__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit .diagnostics .diagnostics__items{display:flex;flex-direction:column}.visit .diagnostics .diagnostics__items .item{border-bottom:var(--dss-border-width-sm) solid va(--color-neutral-200)}.visit .diagnostics .diagnostics__items .item:last-of-type{border:none}.feedback{width:100%;height:100%;display:flex;align-items:center;justify-content:center}";function toDate(X){const W=Object.prototype.toString.call(X);return X instanceof Date||typeof X=="object"&&W==="[object Date]"?new X.constructor(+X):typeof X=="number"||W==="[object Number]"||typeof X=="string"||W==="[object String]"?new Date(X):new Date(NaN)}function constructFrom(X,W){return X instanceof Date?new X.constructor(W):new Date(W)}function addDays(X,W){const J=toDate(X);return isNaN(W)?constructFrom(X,NaN):(W&&J.setDate(J.getDate()+W),J)}const millisecondsInWeek=6048e5,millisecondsInDay=864e5,millisecondsInMinute=6e4,millisecondsInHour=36e5,millisecondsInSecond=1e3;let defaultOptions={};function getDefaultOptions$1(){return defaultOptions}function startOfWeek(X,W){var de,he,ce,ue;const J=getDefaultOptions$1(),te=(W==null?void 0:W.weekStartsOn)??((he=(de=W==null?void 0:W.locale)==null?void 0:de.options)==null?void 0:he.weekStartsOn)??J.weekStartsOn??((ue=(ce=J.locale)==null?void 0:ce.options)==null?void 0:ue.weekStartsOn)??0,re=toDate(X),ne=re.getDay(),oe=(ne<te?7:0)+ne-te;return re.setDate(re.getDate()-oe),re.setHours(0,0,0,0),re}function startOfISOWeek(X){return startOfWeek(X,{weekStartsOn:1})}function getISOWeekYear(X){const W=toDate(X),J=W.getFullYear(),te=constructFrom(X,0);te.setFullYear(J+1,0,4),te.setHours(0,0,0,0);const re=startOfISOWeek(te),ne=constructFrom(X,0);ne.setFullYear(J,0,4),ne.setHours(0,0,0,0);const oe=startOfISOWeek(ne);return W.getTime()>=re.getTime()?J+1:W.getTime()>=oe.getTime()?J:J-1}function startOfDay(X){const W=toDate(X);return W.setHours(0,0,0,0),W}function getTimezoneOffsetInMilliseconds(X){const W=toDate(X),J=new Date(Date.UTC(W.getFullYear(),W.getMonth(),W.getDate(),W.getHours(),W.getMinutes(),W.getSeconds(),W.getMilliseconds()));return J.setUTCFullYear(W.getFullYear()),+X-+J}function differenceInCalendarDays(X,W){const J=startOfDay(X),te=startOfDay(W),re=+J-getTimezoneOffsetInMilliseconds(J),ne=+te-getTimezoneOffsetInMilliseconds(te);return Math.round((re-ne)/millisecondsInDay)}function startOfISOWeekYear(X){const W=getISOWeekYear(X),J=constructFrom(X,0);return J.setFullYear(W,0,4),J.setHours(0,0,0,0),startOfISOWeek(J)}function isDate(X){return X instanceof Date||typeof X=="object"&&Object.prototype.toString.call(X)==="[object Date]"}function isValid(X){if(!isDate(X)&&typeof X!="number")return!1;const W=toDate(X);return!isNaN(Number(W))}function endOfMonth(X){const W=toDate(X),J=W.getMonth();return W.setFullYear(W.getFullYear(),J+1,0),W.setHours(23,59,59,999),W}function eachDayOfInterval(X,W){const J=toDate(X.start),te=toDate(X.end);let re=+J>+te;const ne=re?+J:+te,oe=re?te:J;oe.setHours(0,0,0,0);let de=1;const he=[];for(;+oe<=ne;)he.push(toDate(oe)),oe.setDate(oe.getDate()+de),oe.setHours(0,0,0,0);return re?he.reverse():he}function startOfMonth(X){const W=toDate(X);return W.setDate(1),W.setHours(0,0,0,0),W}function startOfYear(X){const W=toDate(X),J=constructFrom(X,0);return J.setFullYear(W.getFullYear(),0,1),J.setHours(0,0,0,0),J}const formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance=(X,W,J)=>{let te;const re=formatDistanceLocale[X];return typeof re=="string"?te=re:W===1?te=re.one:te=re.other.replace("{{count}}",W.toString()),J!=null&&J.addSuffix?J.comparison&&J.comparison>0?"in "+te:te+" ago":te};function buildFormatLongFn(X){return(W={})=>{const J=W.width?String(W.width):X.defaultWidth;return X.formats[J]||X.formats[X.defaultWidth]}}const dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})},formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative=(X,W,J,te)=>formatRelativeLocale[X];function buildLocalizeFn(X){return(W,J)=>{const te=J!=null&&J.context?String(J.context):"standalone";let re;if(te==="formatting"&&X.formattingValues){const oe=X.defaultFormattingWidth||X.defaultWidth,de=J!=null&&J.width?String(J.width):oe;re=X.formattingValues[de]||X.formattingValues[oe]}else{const oe=X.defaultWidth,de=J!=null&&J.width?String(J.width):X.defaultWidth;re=X.values[de]||X.values[oe]}const ne=X.argumentCallback?X.argumentCallback(W):W;return re[ne]}}const eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber=(X,W)=>{const J=Number(X),te=J%100;if(te>20||te<10)switch(te%10){case 1:return J+"st";case 2:return J+"nd";case 3:return J+"rd"}return J+"th"},localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:X=>X-1}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};function buildMatchFn(X){return(W,J={})=>{const te=J.width,re=te&&X.matchPatterns[te]||X.matchPatterns[X.defaultMatchWidth],ne=W.match(re);if(!ne)return null;const oe=ne[0],de=te&&X.parsePatterns[te]||X.parsePatterns[X.defaultParseWidth],he=Array.isArray(de)?findIndex(de,pe=>pe.test(oe)):findKey(de,pe=>pe.test(oe));let ce;ce=X.valueCallback?X.valueCallback(he):he,ce=J.valueCallback?J.valueCallback(ce):ce;const ue=W.slice(oe.length);return{value:ce,rest:ue}}}function findKey(X,W){for(const J in X)if(Object.prototype.hasOwnProperty.call(X,J)&&W(X[J]))return J}function findIndex(X,W){for(let J=0;J<X.length;J++)if(W(X[J]))return J}function buildMatchPatternFn(X){return(W,J={})=>{const te=W.match(X.matchPattern);if(!te)return null;const re=te[0],ne=W.match(X.parsePattern);if(!ne)return null;let oe=X.valueCallback?X.valueCallback(ne[0]):ne[0];oe=J.valueCallback?J.valueCallback(oe):oe;const de=W.slice(re.length);return{value:oe,rest:de}}}const matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:X=>parseInt(X,10)}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:X=>X+1}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})},enUS={code:"en-US",formatDistance,formatLong,formatRelative,localize,match,options:{weekStartsOn:0,firstWeekContainsDate:1}};function getDayOfYear(X){const W=toDate(X);return differenceInCalendarDays(W,startOfYear(W))+1}function getISOWeek(X){const W=toDate(X),J=+startOfISOWeek(W)-+startOfISOWeekYear(W);return Math.round(J/millisecondsInWeek)+1}function getWeekYear(X,W){var ue,pe,fe,ge;const J=toDate(X),te=J.getFullYear(),re=getDefaultOptions$1(),ne=(W==null?void 0:W.firstWeekContainsDate)??((pe=(ue=W==null?void 0:W.locale)==null?void 0:ue.options)==null?void 0:pe.firstWeekContainsDate)??re.firstWeekContainsDate??((ge=(fe=re.locale)==null?void 0:fe.options)==null?void 0:ge.firstWeekContainsDate)??1,oe=constructFrom(X,0);oe.setFullYear(te+1,0,ne),oe.setHours(0,0,0,0);const de=startOfWeek(oe,W),he=constructFrom(X,0);he.setFullYear(te,0,ne),he.setHours(0,0,0,0);const ce=startOfWeek(he,W);return J.getTime()>=de.getTime()?te+1:J.getTime()>=ce.getTime()?te:te-1}function startOfWeekYear(X,W){var de,he,ce,ue;const J=getDefaultOptions$1(),te=(W==null?void 0:W.firstWeekContainsDate)??((he=(de=W==null?void 0:W.locale)==null?void 0:de.options)==null?void 0:he.firstWeekContainsDate)??J.firstWeekContainsDate??((ue=(ce=J.locale)==null?void 0:ce.options)==null?void 0:ue.firstWeekContainsDate)??1,re=getWeekYear(X,W),ne=constructFrom(X,0);return ne.setFullYear(re,0,te),ne.setHours(0,0,0,0),startOfWeek(ne,W)}function getWeek(X,W){const J=toDate(X),te=+startOfWeek(J,W)-+startOfWeekYear(J,W);return Math.round(te/millisecondsInWeek)+1}function addLeadingZeros(X,W){const J=X<0?"-":"",te=Math.abs(X).toString().padStart(W,"0");return J+te}const lightFormatters={y(X,W){const J=X.getFullYear(),te=J>0?J:1-J;return addLeadingZeros(W==="yy"?te%100:te,W.length)},M(X,W){const J=X.getMonth();return W==="M"?String(J+1):addLeadingZeros(J+1,2)},d(X,W){return addLeadingZeros(X.getDate(),W.length)},a(X,W){const J=X.getHours()/12>=1?"pm":"am";switch(W){case"a":case"aa":return J.toUpperCase();case"aaa":return J;case"aaaaa":return J[0];case"aaaa":default:return J==="am"?"a.m.":"p.m."}},h(X,W){return addLeadingZeros(X.getHours()%12||12,W.length)},H(X,W){return addLeadingZeros(X.getHours(),W.length)},m(X,W){return addLeadingZeros(X.getMinutes(),W.length)},s(X,W){return addLeadingZeros(X.getSeconds(),W.length)},S(X,W){const J=W.length,te=X.getMilliseconds(),re=Math.trunc(te*Math.pow(10,J-3));return addLeadingZeros(re,W.length)}},dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function(X,W,J){const te=X.getFullYear()>0?1:0;switch(W){case"G":case"GG":case"GGG":return J.era(te,{width:"abbreviated"});case"GGGGG":return J.era(te,{width:"narrow"});case"GGGG":default:return J.era(te,{width:"wide"})}},y:function(X,W,J){if(W==="yo"){const te=X.getFullYear(),re=te>0?te:1-te;return J.ordinalNumber(re,{unit:"year"})}return lightFormatters.y(X,W)},Y:function(X,W,J,te){const re=getWeekYear(X,te),ne=re>0?re:1-re;if(W==="YY"){const oe=ne%100;return addLeadingZeros(oe,2)}return W==="Yo"?J.ordinalNumber(ne,{unit:"year"}):addLeadingZeros(ne,W.length)},R:function(X,W){const J=getISOWeekYear(X);return addLeadingZeros(J,W.length)},u:function(X,W){const J=X.getFullYear();return addLeadingZeros(J,W.length)},Q:function(X,W,J){const te=Math.ceil((X.getMonth()+1)/3);switch(W){case"Q":return String(te);case"QQ":return addLeadingZeros(te,2);case"Qo":return J.ordinalNumber(te,{unit:"quarter"});case"QQQ":return J.quarter(te,{width:"abbreviated",context:"formatting"});case"QQQQQ":return J.quarter(te,{width:"narrow",context:"formatting"});case"QQQQ":default:return J.quarter(te,{width:"wide",context:"formatting"})}},q:function(X,W,J){const te=Math.ceil((X.getMonth()+1)/3);switch(W){case"q":return String(te);case"qq":return addLeadingZeros(te,2);case"qo":return J.ordinalNumber(te,{unit:"quarter"});case"qqq":return J.quarter(te,{width:"abbreviated",context:"standalone"});case"qqqqq":return J.quarter(te,{width:"narrow",context:"standalone"});case"qqqq":default:return J.quarter(te,{width:"wide",context:"standalone"})}},M:function(X,W,J){const te=X.getMonth();switch(W){case"M":case"MM":return lightFormatters.M(X,W);case"Mo":return J.ordinalNumber(te+1,{unit:"month"});case"MMM":return J.month(te,{width:"abbreviated",context:"formatting"});case"MMMMM":return J.month(te,{width:"narrow",context:"formatting"});case"MMMM":default:return J.month(te,{width:"wide",context:"formatting"})}},L:function(X,W,J){const te=X.getMonth();switch(W){case"L":return String(te+1);case"LL":return addLeadingZeros(te+1,2);case"Lo":return J.ordinalNumber(te+1,{unit:"month"});case"LLL":return J.month(te,{width:"abbreviated",context:"standalone"});case"LLLLL":return J.month(te,{width:"narrow",context:"standalone"});case"LLLL":default:return J.month(te,{width:"wide",context:"standalone"})}},w:function(X,W,J,te){const re=getWeek(X,te);return W==="wo"?J.ordinalNumber(re,{unit:"week"}):addLeadingZeros(re,W.length)},I:function(X,W,J){const te=getISOWeek(X);return W==="Io"?J.ordinalNumber(te,{unit:"week"}):addLeadingZeros(te,W.length)},d:function(X,W,J){return W==="do"?J.ordinalNumber(X.getDate(),{unit:"date"}):lightFormatters.d(X,W)},D:function(X,W,J){const te=getDayOfYear(X);return W==="Do"?J.ordinalNumber(te,{unit:"dayOfYear"}):addLeadingZeros(te,W.length)},E:function(X,W,J){const te=X.getDay();switch(W){case"E":case"EE":case"EEE":return J.day(te,{width:"abbreviated",context:"formatting"});case"EEEEE":return J.day(te,{width:"narrow",context:"formatting"});case"EEEEEE":return J.day(te,{width:"short",context:"formatting"});case"EEEE":default:return J.day(te,{width:"wide",context:"formatting"})}},e:function(X,W,J,te){const re=X.getDay(),ne=(re-te.weekStartsOn+8)%7||7;switch(W){case"e":return String(ne);case"ee":return addLeadingZeros(ne,2);case"eo":return J.ordinalNumber(ne,{unit:"day"});case"eee":return J.day(re,{width:"abbreviated",context:"formatting"});case"eeeee":return J.day(re,{width:"narrow",context:"formatting"});case"eeeeee":return J.day(re,{width:"short",context:"formatting"});case"eeee":default:return J.day(re,{width:"wide",context:"formatting"})}},c:function(X,W,J,te){const re=X.getDay(),ne=(re-te.weekStartsOn+8)%7||7;switch(W){case"c":return String(ne);case"cc":return addLeadingZeros(ne,W.length);case"co":return J.ordinalNumber(ne,{unit:"day"});case"ccc":return J.day(re,{width:"abbreviated",context:"standalone"});case"ccccc":return J.day(re,{width:"narrow",context:"standalone"});case"cccccc":return J.day(re,{width:"short",context:"standalone"});case"cccc":default:return J.day(re,{width:"wide",context:"standalone"})}},i:function(X,W,J){const te=X.getDay(),re=te===0?7:te;switch(W){case"i":return String(re);case"ii":return addLeadingZeros(re,W.length);case"io":return J.ordinalNumber(re,{unit:"day"});case"iii":return J.day(te,{width:"abbreviated",context:"formatting"});case"iiiii":return J.day(te,{width:"narrow",context:"formatting"});case"iiiiii":return J.day(te,{width:"short",context:"formatting"});case"iiii":default:return J.day(te,{width:"wide",context:"formatting"})}},a:function(X,W,J){const re=X.getHours()/12>=1?"pm":"am";switch(W){case"a":case"aa":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"aaa":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return J.dayPeriod(re,{width:"narrow",context:"formatting"});case"aaaa":default:return J.dayPeriod(re,{width:"wide",context:"formatting"})}},b:function(X,W,J){const te=X.getHours();let re;switch(te===12?re=dayPeriodEnum.noon:te===0?re=dayPeriodEnum.midnight:re=te/12>=1?"pm":"am",W){case"b":case"bb":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"bbb":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return J.dayPeriod(re,{width:"narrow",context:"formatting"});case"bbbb":default:return J.dayPeriod(re,{width:"wide",context:"formatting"})}},B:function(X,W,J){const te=X.getHours();let re;switch(te>=17?re=dayPeriodEnum.evening:te>=12?re=dayPeriodEnum.afternoon:te>=4?re=dayPeriodEnum.morning:re=dayPeriodEnum.night,W){case"B":case"BB":case"BBB":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"BBBBB":return J.dayPeriod(re,{width:"narrow",context:"formatting"});case"BBBB":default:return J.dayPeriod(re,{width:"wide",context:"formatting"})}},h:function(X,W,J){if(W==="ho"){let te=X.getHours()%12;return te===0&&(te=12),J.ordinalNumber(te,{unit:"hour"})}return lightFormatters.h(X,W)},H:function(X,W,J){return W==="Ho"?J.ordinalNumber(X.getHours(),{unit:"hour"}):lightFormatters.H(X,W)},K:function(X,W,J){const te=X.getHours()%12;return W==="Ko"?J.ordinalNumber(te,{unit:"hour"}):addLeadingZeros(te,W.length)},k:function(X,W,J){let te=X.getHours();return te===0&&(te=24),W==="ko"?J.ordinalNumber(te,{unit:"hour"}):addLeadingZeros(te,W.length)},m:function(X,W,J){return W==="mo"?J.ordinalNumber(X.getMinutes(),{unit:"minute"}):lightFormatters.m(X,W)},s:function(X,W,J){return W==="so"?J.ordinalNumber(X.getSeconds(),{unit:"second"}):lightFormatters.s(X,W)},S:function(X,W){return lightFormatters.S(X,W)},X:function(X,W,J){const te=X.getTimezoneOffset();if(te===0)return"Z";switch(W){case"X":return formatTimezoneWithOptionalMinutes(te);case"XXXX":case"XX":return formatTimezone(te);case"XXXXX":case"XXX":default:return formatTimezone(te,":")}},x:function(X,W,J){const te=X.getTimezoneOffset();switch(W){case"x":return formatTimezoneWithOptionalMinutes(te);case"xxxx":case"xx":return formatTimezone(te);case"xxxxx":case"xxx":default:return formatTimezone(te,":")}},O:function(X,W,J){const te=X.getTimezoneOffset();switch(W){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(te,":");case"OOOO":default:return"GMT"+formatTimezone(te,":")}},z:function(X,W,J){const te=X.getTimezoneOffset();switch(W){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(te,":");case"zzzz":default:return"GMT"+formatTimezone(te,":")}},t:function(X,W,J){const te=Math.trunc(X.getTime()/1e3);return addLeadingZeros(te,W.length)},T:function(X,W,J){const te=X.getTime();return addLeadingZeros(te,W.length)}};function formatTimezoneShort(X,W=""){const J=X>0?"-":"+",te=Math.abs(X),re=Math.trunc(te/60),ne=te%60;return ne===0?J+String(re):J+String(re)+W+addLeadingZeros(ne,2)}function formatTimezoneWithOptionalMinutes(X,W){return X%60===0?(X>0?"-":"+")+addLeadingZeros(Math.abs(X)/60,2):formatTimezone(X,W)}function formatTimezone(X,W=""){const J=X>0?"-":"+",te=Math.abs(X),re=addLeadingZeros(Math.trunc(te/60),2),ne=addLeadingZeros(te%60,2);return J+re+W+ne}const dateLongFormatter=(X,W)=>{switch(X){case"P":return W.date({width:"short"});case"PP":return W.date({width:"medium"});case"PPP":return W.date({width:"long"});case"PPPP":default:return W.date({width:"full"})}},timeLongFormatter=(X,W)=>{switch(X){case"p":return W.time({width:"short"});case"pp":return W.time({width:"medium"});case"ppp":return W.time({width:"long"});case"pppp":default:return W.time({width:"full"})}},dateTimeLongFormatter=(X,W)=>{const J=X.match(/(P+)(p+)?/)||[],te=J[1],re=J[2];if(!re)return dateLongFormatter(X,W);let ne;switch(te){case"P":ne=W.dateTime({width:"short"});break;case"PP":ne=W.dateTime({width:"medium"});break;case"PPP":ne=W.dateTime({width:"long"});break;case"PPPP":default:ne=W.dateTime({width:"full"});break}return ne.replace("{{date}}",dateLongFormatter(te,W)).replace("{{time}}",timeLongFormatter(re,W))},longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter},dayOfYearTokenRE=/^D+$/,weekYearTokenRE=/^Y+$/,throwTokens=["D","DD","YY","YYYY"];function isProtectedDayOfYearToken(X){return dayOfYearTokenRE.test(X)}function isProtectedWeekYearToken(X){return weekYearTokenRE.test(X)}function warnOrThrowProtectedError(X,W,J){const te=message(X,W,J);if(console.warn(te),throwTokens.includes(X))throw new RangeError(te)}function message(X,W,J){const te=X[0]==="Y"?"years":"days of the month";return`Use \`${X.toLowerCase()}\` instead of \`${X}\` (in \`${W}\`) for formatting ${te} to the input \`${J}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const formattingTokensRegExp$1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp$1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp$1=/^'([^]*?)'?$/,doubleQuoteRegExp$1=/''/g,unescapedLatinCharacterRegExp$1=/[a-zA-Z]/;function format(X,W,J){var ue,pe,fe,ge;const te=getDefaultOptions$1(),re=te.locale??enUS,ne=te.firstWeekContainsDate??((pe=(ue=te.locale)==null?void 0:ue.options)==null?void 0:pe.firstWeekContainsDate)??1,oe=te.weekStartsOn??((ge=(fe=te.locale)==null?void 0:fe.options)==null?void 0:ge.weekStartsOn)??0,de=toDate(X);if(!isValid(de))throw new RangeError("Invalid time value");let he=W.match(longFormattingTokensRegExp$1).map(me=>{const ve=me[0];if(ve==="p"||ve==="P"){const be=longFormatters[ve];return be(me,re.formatLong)}return me}).join("").match(formattingTokensRegExp$1).map(me=>{if(me==="''")return{isToken:!1,value:"'"};const ve=me[0];if(ve==="'")return{isToken:!1,value:cleanEscapedString$1(me)};if(formatters[ve])return{isToken:!0,value:me};if(ve.match(unescapedLatinCharacterRegExp$1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ve+"`");return{isToken:!1,value:me}});re.localize.preprocessor&&(he=re.localize.preprocessor(de,he));const ce={firstWeekContainsDate:ne,weekStartsOn:oe,locale:re};return he.map(me=>{if(!me.isToken)return me.value;const ve=me.value;(isProtectedWeekYearToken(ve)||isProtectedDayOfYearToken(ve))&&warnOrThrowProtectedError(ve,W,String(X));const be=formatters[ve[0]];return be(de,ve,re.localize,ce)}).join("")}function cleanEscapedString$1(X){const W=X.match(escapedStringRegExp$1);return W?W[1].replace(doubleQuoteRegExp$1,"'"):X}function getDay(X){return toDate(X).getDay()}function getDefaultOptions(){return Object.assign({},getDefaultOptions$1())}function getISODay(X){let J=toDate(X).getDay();return J===0&&(J=7),J}function transpose(X,W){const J=W instanceof Date?constructFrom(W,0):new W(0);return J.setFullYear(X.getFullYear(),X.getMonth(),X.getDate()),J.setHours(X.getHours(),X.getMinutes(),X.getSeconds(),X.getMilliseconds()),J}const TIMEZONE_UNIT_PRIORITY=10;class Setter{constructor(){Ft(this,"subPriority",0)}validate(W,J){return!0}}class ValueSetter extends Setter{constructor(W,J,te,re,ne){super(),this.value=W,this.validateValue=J,this.setValue=te,this.priority=re,ne&&(this.subPriority=ne)}validate(W,J){return this.validateValue(W,this.value,J)}set(W,J,te){return this.setValue(W,J,this.value,te)}}class DateToSystemTimezoneSetter extends Setter{constructor(){super(...arguments);Ft(this,"priority",TIMEZONE_UNIT_PRIORITY);Ft(this,"subPriority",-1)}set(J,te){return te.timestampIsSet?J:constructFrom(J,transpose(J,Date))}}class Parser{run(W,J,te,re){const ne=this.parse(W,J,te,re);return ne?{setter:new ValueSetter(ne.value,this.validate,this.set,this.priority,this.subPriority),rest:ne.rest}:null}validate(W,J,te){return!0}}class EraParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",140);Ft(this,"incompatibleTokens",["R","u","t","T"])}parse(J,te,re){switch(te){case"G":case"GG":case"GGG":return re.era(J,{width:"abbreviated"})||re.era(J,{width:"narrow"});case"GGGGG":return re.era(J,{width:"narrow"});case"GGGG":default:return re.era(J,{width:"wide"})||re.era(J,{width:"abbreviated"})||re.era(J,{width:"narrow"})}}set(J,te,re){return te.era=re,J.setFullYear(re,0,1),J.setHours(0,0,0,0),J}}const numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mapValue(X,W){return X&&{value:W(X.value),rest:X.rest}}function parseNumericPattern(X,W){const J=W.match(X);return J?{value:parseInt(J[0],10),rest:W.slice(J[0].length)}:null}function parseTimezonePattern(X,W){const J=W.match(X);if(!J)return null;if(J[0]==="Z")return{value:0,rest:W.slice(1)};const te=J[1]==="+"?1:-1,re=J[2]?parseInt(J[2],10):0,ne=J[3]?parseInt(J[3],10):0,oe=J[5]?parseInt(J[5],10):0;return{value:te*(re*millisecondsInHour+ne*millisecondsInMinute+oe*millisecondsInSecond),rest:W.slice(J[0].length)}}function parseAnyDigitsSigned(X){return parseNumericPattern(numericPatterns.anyDigitsSigned,X)}function parseNDigits(X,W){switch(X){case 1:return parseNumericPattern(numericPatterns.singleDigit,W);case 2:return parseNumericPattern(numericPatterns.twoDigits,W);case 3:return parseNumericPattern(numericPatterns.threeDigits,W);case 4:return parseNumericPattern(numericPatterns.fourDigits,W);default:return parseNumericPattern(new RegExp("^\\d{1,"+X+"}"),W)}}function parseNDigitsSigned(X,W){switch(X){case 1:return parseNumericPattern(numericPatterns.singleDigitSigned,W);case 2:return parseNumericPattern(numericPatterns.twoDigitsSigned,W);case 3:return parseNumericPattern(numericPatterns.threeDigitsSigned,W);case 4:return parseNumericPattern(numericPatterns.fourDigitsSigned,W);default:return parseNumericPattern(new RegExp("^-?\\d{1,"+X+"}"),W)}}function dayPeriodEnumToHours(X){switch(X){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function normalizeTwoDigitYear(X,W){const J=W>0,te=J?W:1-W;let re;if(te<=50)re=X||100;else{const ne=te+50,oe=Math.trunc(ne/100)*100,de=X>=ne%100;re=X+oe-(de?100:0)}return J?re:1-re}function isLeapYearIndex(X){return X%400===0||X%4===0&&X%100!==0}class YearParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",130);Ft(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(J,te,re){const ne=oe=>({year:oe,isTwoDigitYear:te==="yy"});switch(te){case"y":return mapValue(parseNDigits(4,J),ne);case"yo":return mapValue(re.ordinalNumber(J,{unit:"year"}),ne);default:return mapValue(parseNDigits(te.length,J),ne)}}validate(J,te){return te.isTwoDigitYear||te.year>0}set(J,te,re){const ne=J.getFullYear();if(re.isTwoDigitYear){const de=normalizeTwoDigitYear(re.year,ne);return J.setFullYear(de,0,1),J.setHours(0,0,0,0),J}const oe=!("era"in te)||te.era===1?re.year:1-re.year;return J.setFullYear(oe,0,1),J.setHours(0,0,0,0),J}}class LocalWeekYearParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",130);Ft(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(J,te,re){const ne=oe=>({year:oe,isTwoDigitYear:te==="YY"});switch(te){case"Y":return mapValue(parseNDigits(4,J),ne);case"Yo":return mapValue(re.ordinalNumber(J,{unit:"year"}),ne);default:return mapValue(parseNDigits(te.length,J),ne)}}validate(J,te){return te.isTwoDigitYear||te.year>0}set(J,te,re,ne){const oe=getWeekYear(J,ne);if(re.isTwoDigitYear){const he=normalizeTwoDigitYear(re.year,oe);return J.setFullYear(he,0,ne.firstWeekContainsDate),J.setHours(0,0,0,0),startOfWeek(J,ne)}const de=!("era"in te)||te.era===1?re.year:1-re.year;return J.setFullYear(de,0,ne.firstWeekContainsDate),J.setHours(0,0,0,0),startOfWeek(J,ne)}}class ISOWeekYearParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",130);Ft(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(J,te){return parseNDigitsSigned(te==="R"?4:te.length,J)}set(J,te,re){const ne=constructFrom(J,0);return ne.setFullYear(re,0,4),ne.setHours(0,0,0,0),startOfISOWeek(ne)}}class ExtendedYearParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",130);Ft(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(J,te){return parseNDigitsSigned(te==="u"?4:te.length,J)}set(J,te,re){return J.setFullYear(re,0,1),J.setHours(0,0,0,0),J}}class QuarterParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",120);Ft(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"Q":case"QQ":return parseNDigits(te.length,J);case"Qo":return re.ordinalNumber(J,{unit:"quarter"});case"QQQ":return re.quarter(J,{width:"abbreviated",context:"formatting"})||re.quarter(J,{width:"narrow",context:"formatting"});case"QQQQQ":return re.quarter(J,{width:"narrow",context:"formatting"});case"QQQQ":default:return re.quarter(J,{width:"wide",context:"formatting"})||re.quarter(J,{width:"abbreviated",context:"formatting"})||re.quarter(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=1&&te<=4}set(J,te,re){return J.setMonth((re-1)*3,1),J.setHours(0,0,0,0),J}}class StandAloneQuarterParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",120);Ft(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"q":case"qq":return parseNDigits(te.length,J);case"qo":return re.ordinalNumber(J,{unit:"quarter"});case"qqq":return re.quarter(J,{width:"abbreviated",context:"standalone"})||re.quarter(J,{width:"narrow",context:"standalone"});case"qqqqq":return re.quarter(J,{width:"narrow",context:"standalone"});case"qqqq":default:return re.quarter(J,{width:"wide",context:"standalone"})||re.quarter(J,{width:"abbreviated",context:"standalone"})||re.quarter(J,{width:"narrow",context:"standalone"})}}validate(J,te){return te>=1&&te<=4}set(J,te,re){return J.setMonth((re-1)*3,1),J.setHours(0,0,0,0),J}}class MonthParser extends Parser{constructor(){super(...arguments);Ft(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);Ft(this,"priority",110)}parse(J,te,re){const ne=oe=>oe-1;switch(te){case"M":return mapValue(parseNumericPattern(numericPatterns.month,J),ne);case"MM":return mapValue(parseNDigits(2,J),ne);case"Mo":return mapValue(re.ordinalNumber(J,{unit:"month"}),ne);case"MMM":return re.month(J,{width:"abbreviated",context:"formatting"})||re.month(J,{width:"narrow",context:"formatting"});case"MMMMM":return re.month(J,{width:"narrow",context:"formatting"});case"MMMM":default:return re.month(J,{width:"wide",context:"formatting"})||re.month(J,{width:"abbreviated",context:"formatting"})||re.month(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=0&&te<=11}set(J,te,re){return J.setMonth(re,1),J.setHours(0,0,0,0),J}}class StandAloneMonthParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",110);Ft(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(J,te,re){const ne=oe=>oe-1;switch(te){case"L":return mapValue(parseNumericPattern(numericPatterns.month,J),ne);case"LL":return mapValue(parseNDigits(2,J),ne);case"Lo":return mapValue(re.ordinalNumber(J,{unit:"month"}),ne);case"LLL":return re.month(J,{width:"abbreviated",context:"standalone"})||re.month(J,{width:"narrow",context:"standalone"});case"LLLLL":return re.month(J,{width:"narrow",context:"standalone"});case"LLLL":default:return re.month(J,{width:"wide",context:"standalone"})||re.month(J,{width:"abbreviated",context:"standalone"})||re.month(J,{width:"narrow",context:"standalone"})}}validate(J,te){return te>=0&&te<=11}set(J,te,re){return J.setMonth(re,1),J.setHours(0,0,0,0),J}}function setWeek(X,W,J){const te=toDate(X),re=getWeek(te,J)-W;return te.setDate(te.getDate()-re*7),te}class LocalWeekParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",100);Ft(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(J,te,re){switch(te){case"w":return parseNumericPattern(numericPatterns.week,J);case"wo":return re.ordinalNumber(J,{unit:"week"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=53}set(J,te,re,ne){return startOfWeek(setWeek(J,re,ne),ne)}}function setISOWeek(X,W){const J=toDate(X),te=getISOWeek(J)-W;return J.setDate(J.getDate()-te*7),J}class ISOWeekParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",100);Ft(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(J,te,re){switch(te){case"I":return parseNumericPattern(numericPatterns.week,J);case"Io":return re.ordinalNumber(J,{unit:"week"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=53}set(J,te,re){return startOfISOWeek(setISOWeek(J,re))}}const DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP_YEAR=[31,29,31,30,31,30,31,31,30,31,30,31];class DateParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",90);Ft(this,"subPriority",1);Ft(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"d":return parseNumericPattern(numericPatterns.date,J);case"do":return re.ordinalNumber(J,{unit:"date"});default:return parseNDigits(te.length,J)}}validate(J,te){const re=J.getFullYear(),ne=isLeapYearIndex(re),oe=J.getMonth();return ne?te>=1&&te<=DAYS_IN_MONTH_LEAP_YEAR[oe]:te>=1&&te<=DAYS_IN_MONTH[oe]}set(J,te,re){return J.setDate(re),J.setHours(0,0,0,0),J}}class DayOfYearParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",90);Ft(this,"subpriority",1);Ft(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(J,te,re){switch(te){case"D":case"DD":return parseNumericPattern(numericPatterns.dayOfYear,J);case"Do":return re.ordinalNumber(J,{unit:"date"});default:return parseNDigits(te.length,J)}}validate(J,te){const re=J.getFullYear();return isLeapYearIndex(re)?te>=1&&te<=366:te>=1&&te<=365}set(J,te,re){return J.setMonth(0,re),J.setHours(0,0,0,0),J}}function setDay(X,W,J){var pe,fe,ge,me;const te=getDefaultOptions$1(),re=(J==null?void 0:J.weekStartsOn)??((fe=(pe=J==null?void 0:J.locale)==null?void 0:pe.options)==null?void 0:fe.weekStartsOn)??te.weekStartsOn??((me=(ge=te.locale)==null?void 0:ge.options)==null?void 0:me.weekStartsOn)??0,ne=toDate(X),oe=ne.getDay(),he=(W%7+7)%7,ce=7-re,ue=W<0||W>6?W-(oe+ce)%7:(he+ce)%7-(oe+ce)%7;return addDays(ne,ue)}class DayParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",90);Ft(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"E":case"EE":case"EEE":return re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"EEEEE":return re.day(J,{width:"narrow",context:"formatting"});case"EEEEEE":return re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"EEEE":default:return re.day(J,{width:"wide",context:"formatting"})||re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=0&&te<=6}set(J,te,re,ne){return J=setDay(J,re,ne),J.setHours(0,0,0,0),J}}class LocalDayParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",90);Ft(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(J,te,re,ne){const oe=de=>{const he=Math.floor((de-1)/7)*7;return(de+ne.weekStartsOn+6)%7+he};switch(te){case"e":case"ee":return mapValue(parseNDigits(te.length,J),oe);case"eo":return mapValue(re.ordinalNumber(J,{unit:"day"}),oe);case"eee":return re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"eeeee":return re.day(J,{width:"narrow",context:"formatting"});case"eeeeee":return re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"eeee":default:return re.day(J,{width:"wide",context:"formatting"})||re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=0&&te<=6}set(J,te,re,ne){return J=setDay(J,re,ne),J.setHours(0,0,0,0),J}}class StandAloneLocalDayParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",90);Ft(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(J,te,re,ne){const oe=de=>{const he=Math.floor((de-1)/7)*7;return(de+ne.weekStartsOn+6)%7+he};switch(te){case"c":case"cc":return mapValue(parseNDigits(te.length,J),oe);case"co":return mapValue(re.ordinalNumber(J,{unit:"day"}),oe);case"ccc":return re.day(J,{width:"abbreviated",context:"standalone"})||re.day(J,{width:"short",context:"standalone"})||re.day(J,{width:"narrow",context:"standalone"});case"ccccc":return re.day(J,{width:"narrow",context:"standalone"});case"cccccc":return re.day(J,{width:"short",context:"standalone"})||re.day(J,{width:"narrow",context:"standalone"});case"cccc":default:return re.day(J,{width:"wide",context:"standalone"})||re.day(J,{width:"abbreviated",context:"standalone"})||re.day(J,{width:"short",context:"standalone"})||re.day(J,{width:"narrow",context:"standalone"})}}validate(J,te){return te>=0&&te<=6}set(J,te,re,ne){return J=setDay(J,re,ne),J.setHours(0,0,0,0),J}}function setISODay(X,W){const J=toDate(X),te=getISODay(J),re=W-te;return addDays(J,re)}class ISODayParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",90);Ft(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(J,te,re){const ne=oe=>oe===0?7:oe;switch(te){case"i":case"ii":return parseNDigits(te.length,J);case"io":return re.ordinalNumber(J,{unit:"day"});case"iii":return mapValue(re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"}),ne);case"iiiii":return mapValue(re.day(J,{width:"narrow",context:"formatting"}),ne);case"iiiiii":return mapValue(re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"}),ne);case"iiii":default:return mapValue(re.day(J,{width:"wide",context:"formatting"})||re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"}),ne)}}validate(J,te){return te>=1&&te<=7}set(J,te,re){return J=setISODay(J,re),J.setHours(0,0,0,0),J}}class AMPMParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",80);Ft(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(J,te,re){switch(te){case"a":case"aa":case"aaa":return re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"});case"aaaaa":return re.dayPeriod(J,{width:"narrow",context:"formatting"});case"aaaa":default:return re.dayPeriod(J,{width:"wide",context:"formatting"})||re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"})}}set(J,te,re){return J.setHours(dayPeriodEnumToHours(re),0,0,0),J}}class AMPMMidnightParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",80);Ft(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(J,te,re){switch(te){case"b":case"bb":case"bbb":return re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"});case"bbbbb":return re.dayPeriod(J,{width:"narrow",context:"formatting"});case"bbbb":default:return re.dayPeriod(J,{width:"wide",context:"formatting"})||re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"})}}set(J,te,re){return J.setHours(dayPeriodEnumToHours(re),0,0,0),J}}class DayPeriodParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",80);Ft(this,"incompatibleTokens",["a","b","t","T"])}parse(J,te,re){switch(te){case"B":case"BB":case"BBB":return re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"});case"BBBBB":return re.dayPeriod(J,{width:"narrow",context:"formatting"});case"BBBB":default:return re.dayPeriod(J,{width:"wide",context:"formatting"})||re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"})}}set(J,te,re){return J.setHours(dayPeriodEnumToHours(re),0,0,0),J}}class Hour1to12Parser extends Parser{constructor(){super(...arguments);Ft(this,"priority",70);Ft(this,"incompatibleTokens",["H","K","k","t","T"])}parse(J,te,re){switch(te){case"h":return parseNumericPattern(numericPatterns.hour12h,J);case"ho":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=12}set(J,te,re){const ne=J.getHours()>=12;return ne&&re<12?J.setHours(re+12,0,0,0):!ne&&re===12?J.setHours(0,0,0,0):J.setHours(re,0,0,0),J}}class Hour0to23Parser extends Parser{constructor(){super(...arguments);Ft(this,"priority",70);Ft(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(J,te,re){switch(te){case"H":return parseNumericPattern(numericPatterns.hour23h,J);case"Ho":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=23}set(J,te,re){return J.setHours(re,0,0,0),J}}class Hour0To11Parser extends Parser{constructor(){super(...arguments);Ft(this,"priority",70);Ft(this,"incompatibleTokens",["h","H","k","t","T"])}parse(J,te,re){switch(te){case"K":return parseNumericPattern(numericPatterns.hour11h,J);case"Ko":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=11}set(J,te,re){return J.getHours()>=12&&re<12?J.setHours(re+12,0,0,0):J.setHours(re,0,0,0),J}}class Hour1To24Parser extends Parser{constructor(){super(...arguments);Ft(this,"priority",70);Ft(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(J,te,re){switch(te){case"k":return parseNumericPattern(numericPatterns.hour24h,J);case"ko":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=24}set(J,te,re){const ne=re<=24?re%24:re;return J.setHours(ne,0,0,0),J}}class MinuteParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",60);Ft(this,"incompatibleTokens",["t","T"])}parse(J,te,re){switch(te){case"m":return parseNumericPattern(numericPatterns.minute,J);case"mo":return re.ordinalNumber(J,{unit:"minute"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=59}set(J,te,re){return J.setMinutes(re,0,0),J}}class SecondParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",50);Ft(this,"incompatibleTokens",["t","T"])}parse(J,te,re){switch(te){case"s":return parseNumericPattern(numericPatterns.second,J);case"so":return re.ordinalNumber(J,{unit:"second"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=59}set(J,te,re){return J.setSeconds(re,0),J}}class FractionOfSecondParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",30);Ft(this,"incompatibleTokens",["t","T"])}parse(J,te){const re=ne=>Math.trunc(ne*Math.pow(10,-te.length+3));return mapValue(parseNDigits(te.length,J),re)}set(J,te,re){return J.setMilliseconds(re),J}}class ISOTimezoneWithZParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",10);Ft(this,"incompatibleTokens",["t","T","x"])}parse(J,te){switch(te){case"X":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,J);case"XX":return parseTimezonePattern(timezonePatterns.basic,J);case"XXXX":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,J);case"XXXXX":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,J);case"XXX":default:return parseTimezonePattern(timezonePatterns.extended,J)}}set(J,te,re){return te.timestampIsSet?J:constructFrom(J,J.getTime()-getTimezoneOffsetInMilliseconds(J)-re)}}class ISOTimezoneParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",10);Ft(this,"incompatibleTokens",["t","T","X"])}parse(J,te){switch(te){case"x":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,J);case"xx":return parseTimezonePattern(timezonePatterns.basic,J);case"xxxx":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,J);case"xxxxx":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,J);case"xxx":default:return parseTimezonePattern(timezonePatterns.extended,J)}}set(J,te,re){return te.timestampIsSet?J:constructFrom(J,J.getTime()-getTimezoneOffsetInMilliseconds(J)-re)}}class TimestampSecondsParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",40);Ft(this,"incompatibleTokens","*")}parse(J){return parseAnyDigitsSigned(J)}set(J,te,re){return[constructFrom(J,re*1e3),{timestampIsSet:!0}]}}class TimestampMillisecondsParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",20);Ft(this,"incompatibleTokens","*")}parse(J){return parseAnyDigitsSigned(J)}set(J,te,re){return[constructFrom(J,re),{timestampIsSet:!0}]}}const parsers={G:new EraParser,y:new YearParser,Y:new LocalWeekYearParser,R:new ISOWeekYearParser,u:new ExtendedYearParser,Q:new QuarterParser,q:new StandAloneQuarterParser,M:new MonthParser,L:new StandAloneMonthParser,w:new LocalWeekParser,I:new ISOWeekParser,d:new DateParser,D:new DayOfYearParser,E:new DayParser,e:new LocalDayParser,c:new StandAloneLocalDayParser,i:new ISODayParser,a:new AMPMParser,b:new AMPMMidnightParser,B:new DayPeriodParser,h:new Hour1to12Parser,H:new Hour0to23Parser,K:new Hour0To11Parser,k:new Hour1To24Parser,m:new MinuteParser,s:new SecondParser,S:new FractionOfSecondParser,X:new ISOTimezoneWithZParser,x:new ISOTimezoneParser,t:new TimestampSecondsParser,T:new TimestampMillisecondsParser},formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,notWhitespaceRegExp=/\S/,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function parse(X,W,J,te){var ve,be,ye,we;const re=getDefaultOptions(),ne=re.locale??enUS,oe=re.firstWeekContainsDate??((be=(ve=re.locale)==null?void 0:ve.options)==null?void 0:be.firstWeekContainsDate)??1,de=re.weekStartsOn??((we=(ye=re.locale)==null?void 0:ye.options)==null?void 0:we.weekStartsOn)??0,he={firstWeekContainsDate:oe,weekStartsOn:de,locale:ne},ce=[new DateToSystemTimezoneSetter],ue=W.match(longFormattingTokensRegExp).map(Se=>{const _e=Se[0];if(_e in longFormatters){const Ce=longFormatters[_e];return Ce(Se,ne.formatLong)}return Se}).join("").match(formattingTokensRegExp),pe=[];for(let Se of ue){isProtectedWeekYearToken(Se)&&warnOrThrowProtectedError(Se,W,X),isProtectedDayOfYearToken(Se)&&warnOrThrowProtectedError(Se,W,X);const _e=Se[0],Ce=parsers[_e];if(Ce){const{incompatibleTokens:Le}=Ce;if(Array.isArray(Le)){const Ie=pe.find(ze=>Le.includes(ze.token)||ze.token===_e);if(Ie)throw new RangeError(`The format string mustn't contain \`${Ie.fullToken}\` and \`${Se}\` at the same time`)}else if(Ce.incompatibleTokens==="*"&&pe.length>0)throw new RangeError(`The format string mustn't contain \`${Se}\` and any other token at the same time`);pe.push({token:_e,fullToken:Se});const Pe=Ce.run(X,Se,ne.match,he);if(!Pe)return constructFrom(J,NaN);ce.push(Pe.setter),X=Pe.rest}else{if(_e.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_e+"`");if(Se==="''"?Se="'":_e==="'"&&(Se=cleanEscapedString(Se)),X.indexOf(Se)===0)X=X.slice(Se.length);else return constructFrom(J,NaN)}}if(X.length>0&¬WhitespaceRegExp.test(X))return constructFrom(J,NaN);const fe=ce.map(Se=>Se.priority).sort((Se,_e)=>_e-Se).filter((Se,_e,Ce)=>Ce.indexOf(Se)===_e).map(Se=>ce.filter(_e=>_e.priority===Se).sort((_e,Ce)=>Ce.subPriority-_e.subPriority)).map(Se=>Se[0]);let ge=toDate(J);if(isNaN(ge.getTime()))return constructFrom(J,NaN);const me={};for(const Se of fe){if(!Se.validate(ge,he))return constructFrom(J,NaN);const _e=Se.set(ge,me,he);Array.isArray(_e)?(ge=_e[0],Object.assign(me,_e[1])):ge=_e}return constructFrom(J,ge)}function cleanEscapedString(X){return X.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp,"'")}/**
|
|
321
|
-
* @license
|
|
322
|
-
* Copyright 2017 Google LLC
|
|
323
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
324
|
-
*/class le extends i$x{constructor(W){if(super(W),this.it=D$1,W.type!==t$g.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(W){if(W===D$1||W==null)return this._t=void 0,this.it=W;if(W===R)return W;if(typeof W!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(W===this.it)return this._t;this.it=W;const J=[W];return J.raw=J,this._t={_$litType$:this.constructor.resultType,strings:J,values:[]}}}le.directiveName="unsafeHTML",le.resultType=1;const ae=e$I(le),notFound="data:image/svg+xml,%3csvg%20width='215'%20height='150'%20viewBox='0%200%20215%20150'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.9'%20d='M135.132%2057.43C96.9221%2047.658%2083.3815%20-29.7048%2026.9734%2012.5083C-13.0511%2042.4595%2011.4691%20115.499%2061.6878%20107.019C92.0822%20101.867%2087.3917%20101.341%20113.129%20115.244C139.231%20129.308%20167.972%20136.397%20195.855%20111.436C210.28%2098.5179%20215.939%2067.0352%20201.939%2050.7417C184.388%2030.3592%20158.485%2063.4098%20135.132%2057.43Z'%20fill='%23EFF7FF'/%3e%3cellipse%20cx='120.5'%20cy='143.5'%20rx='52.5'%20ry='3.5'%20fill='%23F5F5F5'/%3e%3cpath%20d='M121.387%2080.2184C121.995%2079.5948%20122.563%2078.953%20123.09%2078.2959L134.396%2089.3383C135.09%2090.0177%20134.851%2091.389%20133.861%2092.4024C132.872%2093.4159%20131.505%2093.6888%20130.811%2093.0094L119.505%2081.967C120.148%2081.424%20120.777%2080.8407%20121.385%2080.2171L121.387%2080.2184Z'%20fill='%231D1D1D'/%3e%3cpath%20opacity='0.6'%20d='M121.127%2079.9896C132.157%2068.6986%20131.888%2050.5485%20120.527%2039.4502C109.166%2028.3519%2091.0149%2028.5081%2079.9849%2039.799C68.955%2051.09%2069.2233%2069.2401%2080.5843%2080.3385C91.9453%2091.4368%20110.097%2091.2806%20121.127%2079.9896Z'%20fill='%238FC2F5'/%3e%3cpath%20d='M78.0382%2083.0622C90.8729%2095.6382%20111.378%2095.4578%20123.835%2082.6609C136.293%2069.8625%20135.986%2049.2932%20123.15%2036.7173C110.316%2024.1413%2089.8107%2024.3217%2077.3538%2037.1186C64.8956%2049.9169%2065.2022%2070.4862%2078.0382%2083.0622ZM80.642%2080.387C69.289%2069.264%2069.0172%2051.0692%2080.037%2039.749C91.0569%2028.4288%20109.194%2028.2694%20120.547%2039.3938C131.9%2050.5182%20132.171%2068.713%20121.152%2080.0332C110.132%2091.3534%2091.9949%2091.5128%2080.642%2080.3884V80.387Z'%20fill='%237BACFC'/%3e%3cpath%20d='M169.953%20128.522L171.714%20126.696C173.474%20124.871%20173.421%20121.964%20171.595%20120.205L135.013%2084.9265C133.187%2083.1661%20130.281%2083.2205%20128.522%2085.0451L126.761%2086.8711C125.001%2088.6957%20125.055%2091.6028%20126.88%2093.3619L163.462%20128.64C165.287%20130.401%20168.194%20130.346%20169.953%20128.522Z'%20fill='%23656565'/%3e%3cpath%20opacity='0.35'%20d='M88.8399%2071.2315C96.506%2079.2245%20101.258%2078.1642%20100.757%2082.4547C100.256%2086.7452%2091.398%2085.7448%2082.7698%2076.0396C74.1415%2066.3344%2075.0893%2054.9166%2079.8491%2055.2485C84.6089%2055.5803%2080.129%2062.1492%2088.8399%2071.2315Z'%20fill='white'/%3e%3c/svg%3e";/**
|
|
320
|
+
`}handleTest(){console.log(this.selectedPeriodDate)}};__decorateClass$k([n$v()],ExportPdfModal.prototype,"selectedRadioOption",2),__decorateClass$k([n$v()],ExportPdfModal.prototype,"text",2),__decorateClass$k([n$v()],ExportPdfModal.prototype,"selectedVisibilityLevelElement",2),__decorateClass$k([n$v()],ExportPdfModal.prototype,"selectedPeriodDate",2),__decorateClass$k([n$v({type:Array})],ExportPdfModal.prototype,"arrayElements",2),ExportPdfModal=__decorateClass$k([t$j("export-pdf-modal")],ExportPdfModal);class ExportToPdfHandler extends ApiBaseHandler{async handle(){try{this.api.interactionService.confirm(void 0,ExportPdfModal,{title:translate("modal.selectExportOption"),confirmButtonText:"Exportar",cancelButtonText:"Cancelar"})}catch(W){this._notifyError(W.message)}}_notifyError(W){this.api.notificationService.error(W||"actions.delete.error")}}class ExportPdf{}let request$9;const bootstrapExportPdf=X=>{request$9=X.registerRequest(ExportPdf,ExportToPdfHandler)},teardownExportPdf=()=>{request$9==null||request$9.dispose()},{addActivityHistoryItems}=activityHistoryCollectionsSlice.actions;class AddHistoryItemsHandler extends StoreBaseHandler{async handle(W){try{const J=validateAndFilterItems(W.items);this.store.dispatch(addActivityHistoryItems({id:W.entityId,items:J,componentFactory:W.componentFactory,searchPredicate:W.searchPredicate}))}catch(J){console.log(J.message)}}}let request$8;const bootstrapAddHistoryItems=X=>{request$8=X.registerRequest(addHistoryItemsCommand,AddHistoryItemsHandler)},teardownAddHistoryItems=()=>{request$8==null||request$8.dispose()},{updateActivityHistoryItem}=activityHistoryCollectionsSlice.actions;class UpdateHistoryItemHandler extends StoreBaseHandler{async handle(W){try{ensureAreValidActivityHistoryItems([W.item]),this.store.dispatch(updateActivityHistoryItem({id:W.entityId,item:W.item}))}catch(J){console.log(J.message)}}}const updateHistoryItemCommand="update_history_item_request";let request$7;const bootstrapUpdateHistoryItem=X=>{request$7=X.registerRequest(updateHistoryItemCommand,UpdateHistoryItemHandler)},teardownUpdateHistoryItem=()=>{request$7==null||request$7.dispose()};function connectedProperty(X,W={}){return createConnectedProperty(store)(X,W)}const activityHistorySearchStringSelector=X=>X.activityHistoryFilters.searchString,isAnyCollectionBusySelector=X=>X.activityHistoryCollections.busy.length>0,isAnyCollectionLoadingWithoutAnyLoaded=X=>{const W=Object.values(X.activityHistoryCollections.collections);return!(W!=null&&W.length)&&isAnyCollectionBusySelector(X)},isSomeCollectionLoadedAndOtherLoading=X=>Object.values(X.activityHistoryCollections.collections)&&isAnyCollectionBusySelector(X);function getUniqueObjects(X,W,J){return Array.from(X.map(te=>({id:W.reduce((re,ne)=>re==null?void 0:re[ne],te),description:J.reduce((re,ne)=>re==null?void 0:re[ne],te)})).filter(te=>typeof te.id=="string"&&typeof te.description=="string").reduce((te,re)=>te.set(re.id,re),new Map).values())}class TrueSpec extends Spec{isSatisfiedBy(){return!0}}class CommonFilterSpec extends Spec{constructor(W){super(),this.commonFilters=W}isSatisfiedBy(W){return this.commonFilters.filter(re=>re.enabled).reduce((re,ne)=>re.and(new ne.spec),new TrueSpec).isSatisfiedBy(W)}}class FalseSpec extends Spec{isSatisfiedBy(){return!1}}class PropPathSpec extends Spec{constructor(W,J){super(),this.propPath=W,this.value=J}isSatisfiedBy(W){return this.propPath.reduce((te,re)=>te==null?void 0:te[re],W)===this.value}}class CustomFilterSpec extends Spec{constructor(W){super(),this.filters=W}isSatisfiedBy(W){const J=this.filters.filter(te=>te.enabled);return J.length===0?!0:J.every(te=>{if(!this.belongsToGroup(W,te))return!0;const re=te.filters.filter(ne=>ne.enabled||ne.singleOption);return re.length===0?!0:re.every(ne=>ne.singleOption?ne.enabled?!0:new PropPathSpec(ne.propPathValue,!1).isSatisfiedBy(W):!ne.enabledValues||ne.enabledValues.length===0?!0:ne.enabledValues.reduce((de,he)=>de.or(new PropPathSpec(ne.propPathValue,he)),new FalseSpec).isSatisfiedBy(W))})}belongsToGroup(W,J){return W.type===J.id}}const normalizeStringToNFD=X=>X==null?"":String(X).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLocaleLowerCase(),propContainsString=(X,W)=>{const J=normalizeStringToNFD(X),te=normalizeStringToNFD(W);return J.toString().toLowerCase().indexOf(te)!==-1||J.toString().indexOf(te)!==-1},commonFieldsSearchPredicate=(X,W)=>{var he,ce,ue,pe,fe,ge,me;const J=((he=X.professional)==null?void 0:he.name)&&propContainsString((ce=X.professional)==null?void 0:ce.name,W),te=X.center.description&&propContainsString(X.center.description,W),re=((ue=X.professional)==null?void 0:ue.speciality.description)&&propContainsString((pe=X.professional)==null?void 0:pe.speciality.description,W),ne=((fe=X.professional)==null?void 0:fe.role.description)&&propContainsString((ge=X.professional)==null?void 0:ge.role.description,W),oe=X.service.description&&propContainsString(X.service.description,W),de=(me=X.diagnostics)==null?void 0:me.some(ve=>propContainsString(ve.id,W)||propContainsString(ve.description,W));return J||te||re||ne||oe||de};class SearchStringSpec extends Spec{constructor(W,J){super(),this.searchString=W,this.searchPredicate=J}isSatisfiedBy(W){var re;if(!((re=this.searchString)!=null&&re.trim()))return!0;const J=commonFieldsSearchPredicate(W,this.searchString),te=this.searchPredicate?this.searchPredicate(this.searchString.toLowerCase(),W):!1;return!!(J||te)}}class TypeSpec extends Spec{constructor(W){super(),this.itemType=W}isSatisfiedBy(W){return(W==null?void 0:W.type)===this.itemType}}class ComposedTypeSpec extends Spec{constructor(W){super(),this.filters=W}isSatisfiedBy(W){return this.filters.filter(re=>re.enabled).map(re=>re.id).reduce((re,ne)=>re.or(new TypeSpec(ne)),new FalseSpec).isSatisfiedBy(W)}}const activityHistoryFiltersSelector=X=>X.activityHistoryFilters.filters,activityHistoryCommonFiltersSelector=createSelector(activityHistoryFiltersSelector,X=>{var W;return((W=X.find(isCommonFilterGroup))==null?void 0:W.filters)||[]}),activityHistoryEnabledCommonFiltersSelector=createSelector(activityHistoryCommonFiltersSelector,X=>X.filter(W=>W.enabled)),areCommonFiltersActive=createSelector(activityHistoryEnabledCommonFiltersSelector,X=>!!X.length),activityHistoryCustomFilterGroupsSelector=createSelector(activityHistoryFiltersSelector,X=>X.filter(isNotCommonFilterGroup).sort(sortBySortProperty)),sortBySortProperty=(X,W)=>Number(X.sort)-Number(W.sort),areCustomFiltersActive=createSelector(activityHistoryCustomFilterGroupsSelector,X=>X.some(W=>W.filters.some(J=>{var te;return(te=J.enabledValues)==null?void 0:te.length}))),activeGroupsWithEnabledFilters=createSelector(activityHistoryCustomFilterGroupsSelector,X=>X.filter(W=>W.enabled).map(({id:W,title:J,enabled:te,sort:re,filters:ne})=>({id:W,title:J,enabled:te,sort:re,filters:ne.filter(oe=>{var de;return(de=oe.enabledValues)==null?void 0:de.length})})).filter(W=>W.filters.length>0)),isSameVisit=(X,W)=>{var ne,oe,de,he,ce,ue,pe,fe,ge,me,ve,be,ye,we;const J=((ne=X.professional)==null?void 0:ne.id)===((oe=W.professional)==null?void 0:oe.id)&&((de=X.professional)==null?void 0:de.role.id)===((he=W.professional)==null?void 0:he.role.id)&&((ce=X.professional)==null?void 0:ce.speciality.id)===((ue=W.professional)==null?void 0:ue.speciality.id),te=((pe=X.ep)==null?void 0:pe.id)===((fe=W.ep)==null?void 0:fe.id)&&((ge=X.up)==null?void 0:ge.id)===((me=W.up)==null?void 0:me.id)&&((ve=X.center)==null?void 0:ve.id)===((be=W.center)==null?void 0:be.id)&&((ye=X.service)==null?void 0:ye.id)===((we=W.service)==null?void 0:we.id),re=new Date(X.date).toDateString()===new Date(W.date).toDateString();return J&&te&&re},withinEightHours=(X,W)=>Math.abs(new Date(X).getTime()-new Date(W).getTime())<=8*60*60*1e3,areSameDiagnostics=(X,W)=>{if(X.length!==W.length)return!1;const J=X.map(re=>re.id).sort(),te=W.map(re=>re.id).sort();return J.every((re,ne)=>re===te[ne])},groupActivityHistoryItems=X=>{const W=[];return X==null||X.forEach(J=>{let te=!1;for(const re of W){const ne=re.items[0],oe=re.items[re.items.length-1];if(isSameVisit(ne,J)&&withinEightHours(ne.date,J.date)&&withinEightHours(oe.date,J.date)){re.items.push(J),te=!0;break}}te||W.push({idGroup:Math.random().toString(36).substr(2,9),items:[J]})}),W.forEach(J=>{const te=[],re=[];J.items.forEach(ne=>{var oe;if(((oe=ne.diagnostics)==null?void 0:oe.length)>0){let de=!1;for(const he of te){const ce=he.items[0];if(areSameDiagnostics(ce.diagnostics,ne.diagnostics)){he.items.push(ne),de=!0;break}}de||te.push({idSubGroup:Math.random().toString(36).substr(2,9),items:[ne]})}else re.push(ne)}),J.items=re,J.subGroups=te}),W},sortGroupsByMostRecentDate=X=>{const W=re=>re.reduce((ne,oe)=>{const de=new Date(oe.date);return de>ne?de:ne},new Date(0)),J=re=>re.sort((ne,oe)=>new Date(oe.date)-new Date(ne.date)),te=re=>{let ne=[];return re.items.length>0&&ne.push(W(re.items)),re.subGroups.forEach(oe=>{oe.items.length>0&&ne.push(W(oe.items))}),ne.length>0?new Date(Math.max(...ne)):new Date(0)};return X.forEach(re=>{re.items=J(re.items),re.subGroups.forEach(ne=>{ne.items=J(ne.items)})}),X.sort((re,ne)=>te(ne)-te(re))},activityHistoryCollectionsSelector=X=>X.activityHistoryCollections.collections,mapItemsWithMetadata=(X,W,J,te)=>X.map(re=>({...re,searchPredicate:te,componentFactory:W,type:J})),activityHistoryMappedItems=createSelector(activityHistoryCollectionsSelector,X=>Object.values(X).flatMap(W=>mapItemsWithMetadata(W.items,W.componentFactory,W.id,W.searchPredicate))),customFilterGroupsWithOptionsSelector=createSelector(activityHistoryCustomFilterGroupsSelector,activityHistoryCollectionsSelector,(X,W)=>X.map(te=>{const re=W[te.id];return{...te,filters:te.filters.map(ne=>({...ne,options:(ne.singleOption?[]:getUniqueObjects(re.items,ne.propPathValue,ne.propsPathDescription))||[]}))}})),activityHistoryGroupedItems=createSelector(activityHistoryMappedItems,activityHistorySearchStringSelector,activityHistoryCommonFiltersSelector,activityHistoryCustomFilterGroupsSelector,(X,W,J,te)=>{const re=X.filter(de=>new SearchStringSpec(W,de.searchPredicate).and(new CommonFilterSpec(J)).and(new ComposedTypeSpec(te)).and(new CustomFilterSpec(te)).isSatisfiedBy(de)),ne=groupActivityHistoryItems(re);return sortGroupsByMostRecentDate(ne)}),styles$e=":host{min-height:1px;height:100%}.virtualizer{height:100%;padding-inline:16px}.container{min-height:1px;height:100%}.visit:first-child{margin-top:var(--dss-spacing-md)}.visit{width:calc(100% - var(--dss-spacing-md) - var(--dss-spacing-md));display:flex;flex-direction:column;gap:var(--dss-spacing-md);background-color:#fff;border-radius:var(--dss-radius-sm);padding:var(--dss-spacing-sm);margin-bottom:var(--dss-spacing-md)}.visit .visit__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit .visit__header .title{flex:1;font-size:14px;line-height:24px;display:flex;flex-direction:row;gap:12px;color:var(--color-neutral-800)}.visit .visit__header .title-date{font-weight:700}.visit .visit__header .title-description{font-weight:600;display:flex;flex-direction:row;gap:4px}.visit .visit__header .highlight{background-color:#ff0;font-weight:700}.visit .visit__items{display:flex;flex-direction:column;gap:16px}.visit .visit__items .item{border-bottom:var(--dss-border-width-sm) solid va(--color-neutral-200)}.visit .visit__items .item:last-of-type{border:none}.visit .diagnostics{display:flex;flex-direction:column;gap:16px}.visit .diagnostics .diagnostics__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit .diagnostics .diagnostics__items{display:flex;flex-direction:column}.visit .diagnostics .diagnostics__items .item{border-bottom:var(--dss-border-width-sm) solid va(--color-neutral-200)}.visit .diagnostics .diagnostics__items .item:last-of-type{border:none}.feedback{width:100%;height:100%;display:flex;align-items:center;justify-content:center}";function toDate(X){const W=Object.prototype.toString.call(X);return X instanceof Date||typeof X=="object"&&W==="[object Date]"?new X.constructor(+X):typeof X=="number"||W==="[object Number]"||typeof X=="string"||W==="[object String]"?new Date(X):new Date(NaN)}function constructFrom(X,W){return X instanceof Date?new X.constructor(W):new Date(W)}function addDays(X,W){const J=toDate(X);return isNaN(W)?constructFrom(X,NaN):(W&&J.setDate(J.getDate()+W),J)}const millisecondsInWeek=6048e5,millisecondsInDay=864e5,millisecondsInMinute=6e4,millisecondsInHour=36e5,millisecondsInSecond=1e3;let defaultOptions={};function getDefaultOptions$1(){return defaultOptions}function startOfWeek(X,W){var de,he,ce,ue;const J=getDefaultOptions$1(),te=(W==null?void 0:W.weekStartsOn)??((he=(de=W==null?void 0:W.locale)==null?void 0:de.options)==null?void 0:he.weekStartsOn)??J.weekStartsOn??((ue=(ce=J.locale)==null?void 0:ce.options)==null?void 0:ue.weekStartsOn)??0,re=toDate(X),ne=re.getDay(),oe=(ne<te?7:0)+ne-te;return re.setDate(re.getDate()-oe),re.setHours(0,0,0,0),re}function startOfISOWeek(X){return startOfWeek(X,{weekStartsOn:1})}function getISOWeekYear(X){const W=toDate(X),J=W.getFullYear(),te=constructFrom(X,0);te.setFullYear(J+1,0,4),te.setHours(0,0,0,0);const re=startOfISOWeek(te),ne=constructFrom(X,0);ne.setFullYear(J,0,4),ne.setHours(0,0,0,0);const oe=startOfISOWeek(ne);return W.getTime()>=re.getTime()?J+1:W.getTime()>=oe.getTime()?J:J-1}function startOfDay(X){const W=toDate(X);return W.setHours(0,0,0,0),W}function getTimezoneOffsetInMilliseconds(X){const W=toDate(X),J=new Date(Date.UTC(W.getFullYear(),W.getMonth(),W.getDate(),W.getHours(),W.getMinutes(),W.getSeconds(),W.getMilliseconds()));return J.setUTCFullYear(W.getFullYear()),+X-+J}function differenceInCalendarDays(X,W){const J=startOfDay(X),te=startOfDay(W),re=+J-getTimezoneOffsetInMilliseconds(J),ne=+te-getTimezoneOffsetInMilliseconds(te);return Math.round((re-ne)/millisecondsInDay)}function startOfISOWeekYear(X){const W=getISOWeekYear(X),J=constructFrom(X,0);return J.setFullYear(W,0,4),J.setHours(0,0,0,0),startOfISOWeek(J)}function isDate(X){return X instanceof Date||typeof X=="object"&&Object.prototype.toString.call(X)==="[object Date]"}function isValid(X){if(!isDate(X)&&typeof X!="number")return!1;const W=toDate(X);return!isNaN(Number(W))}function endOfMonth(X){const W=toDate(X),J=W.getMonth();return W.setFullYear(W.getFullYear(),J+1,0),W.setHours(23,59,59,999),W}function eachDayOfInterval(X,W){const J=toDate(X.start),te=toDate(X.end);let re=+J>+te;const ne=re?+J:+te,oe=re?te:J;oe.setHours(0,0,0,0);let de=1;const he=[];for(;+oe<=ne;)he.push(toDate(oe)),oe.setDate(oe.getDate()+de),oe.setHours(0,0,0,0);return re?he.reverse():he}function startOfMonth(X){const W=toDate(X);return W.setDate(1),W.setHours(0,0,0,0),W}function startOfYear(X){const W=toDate(X),J=constructFrom(X,0);return J.setFullYear(W.getFullYear(),0,1),J.setHours(0,0,0,0),J}const formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance=(X,W,J)=>{let te;const re=formatDistanceLocale[X];return typeof re=="string"?te=re:W===1?te=re.one:te=re.other.replace("{{count}}",W.toString()),J!=null&&J.addSuffix?J.comparison&&J.comparison>0?"in "+te:te+" ago":te};function buildFormatLongFn(X){return(W={})=>{const J=W.width?String(W.width):X.defaultWidth;return X.formats[J]||X.formats[X.defaultWidth]}}const dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})},formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative=(X,W,J,te)=>formatRelativeLocale[X];function buildLocalizeFn(X){return(W,J)=>{const te=J!=null&&J.context?String(J.context):"standalone";let re;if(te==="formatting"&&X.formattingValues){const oe=X.defaultFormattingWidth||X.defaultWidth,de=J!=null&&J.width?String(J.width):oe;re=X.formattingValues[de]||X.formattingValues[oe]}else{const oe=X.defaultWidth,de=J!=null&&J.width?String(J.width):X.defaultWidth;re=X.values[de]||X.values[oe]}const ne=X.argumentCallback?X.argumentCallback(W):W;return re[ne]}}const eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber=(X,W)=>{const J=Number(X),te=J%100;if(te>20||te<10)switch(te%10){case 1:return J+"st";case 2:return J+"nd";case 3:return J+"rd"}return J+"th"},localize={ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:X=>X-1}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};function buildMatchFn(X){return(W,J={})=>{const te=J.width,re=te&&X.matchPatterns[te]||X.matchPatterns[X.defaultMatchWidth],ne=W.match(re);if(!ne)return null;const oe=ne[0],de=te&&X.parsePatterns[te]||X.parsePatterns[X.defaultParseWidth],he=Array.isArray(de)?findIndex(de,pe=>pe.test(oe)):findKey(de,pe=>pe.test(oe));let ce;ce=X.valueCallback?X.valueCallback(he):he,ce=J.valueCallback?J.valueCallback(ce):ce;const ue=W.slice(oe.length);return{value:ce,rest:ue}}}function findKey(X,W){for(const J in X)if(Object.prototype.hasOwnProperty.call(X,J)&&W(X[J]))return J}function findIndex(X,W){for(let J=0;J<X.length;J++)if(W(X[J]))return J}function buildMatchPatternFn(X){return(W,J={})=>{const te=W.match(X.matchPattern);if(!te)return null;const re=te[0],ne=W.match(X.parsePattern);if(!ne)return null;let oe=X.valueCallback?X.valueCallback(ne[0]):ne[0];oe=J.valueCallback?J.valueCallback(oe):oe;const de=W.slice(re.length);return{value:oe,rest:de}}}const matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:X=>parseInt(X,10)}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:X=>X+1}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})},enUS={code:"en-US",formatDistance,formatLong,formatRelative,localize,match,options:{weekStartsOn:0,firstWeekContainsDate:1}};function getDayOfYear(X){const W=toDate(X);return differenceInCalendarDays(W,startOfYear(W))+1}function getISOWeek(X){const W=toDate(X),J=+startOfISOWeek(W)-+startOfISOWeekYear(W);return Math.round(J/millisecondsInWeek)+1}function getWeekYear(X,W){var ue,pe,fe,ge;const J=toDate(X),te=J.getFullYear(),re=getDefaultOptions$1(),ne=(W==null?void 0:W.firstWeekContainsDate)??((pe=(ue=W==null?void 0:W.locale)==null?void 0:ue.options)==null?void 0:pe.firstWeekContainsDate)??re.firstWeekContainsDate??((ge=(fe=re.locale)==null?void 0:fe.options)==null?void 0:ge.firstWeekContainsDate)??1,oe=constructFrom(X,0);oe.setFullYear(te+1,0,ne),oe.setHours(0,0,0,0);const de=startOfWeek(oe,W),he=constructFrom(X,0);he.setFullYear(te,0,ne),he.setHours(0,0,0,0);const ce=startOfWeek(he,W);return J.getTime()>=de.getTime()?te+1:J.getTime()>=ce.getTime()?te:te-1}function startOfWeekYear(X,W){var de,he,ce,ue;const J=getDefaultOptions$1(),te=(W==null?void 0:W.firstWeekContainsDate)??((he=(de=W==null?void 0:W.locale)==null?void 0:de.options)==null?void 0:he.firstWeekContainsDate)??J.firstWeekContainsDate??((ue=(ce=J.locale)==null?void 0:ce.options)==null?void 0:ue.firstWeekContainsDate)??1,re=getWeekYear(X,W),ne=constructFrom(X,0);return ne.setFullYear(re,0,te),ne.setHours(0,0,0,0),startOfWeek(ne,W)}function getWeek(X,W){const J=toDate(X),te=+startOfWeek(J,W)-+startOfWeekYear(J,W);return Math.round(te/millisecondsInWeek)+1}function addLeadingZeros(X,W){const J=X<0?"-":"",te=Math.abs(X).toString().padStart(W,"0");return J+te}const lightFormatters={y(X,W){const J=X.getFullYear(),te=J>0?J:1-J;return addLeadingZeros(W==="yy"?te%100:te,W.length)},M(X,W){const J=X.getMonth();return W==="M"?String(J+1):addLeadingZeros(J+1,2)},d(X,W){return addLeadingZeros(X.getDate(),W.length)},a(X,W){const J=X.getHours()/12>=1?"pm":"am";switch(W){case"a":case"aa":return J.toUpperCase();case"aaa":return J;case"aaaaa":return J[0];case"aaaa":default:return J==="am"?"a.m.":"p.m."}},h(X,W){return addLeadingZeros(X.getHours()%12||12,W.length)},H(X,W){return addLeadingZeros(X.getHours(),W.length)},m(X,W){return addLeadingZeros(X.getMinutes(),W.length)},s(X,W){return addLeadingZeros(X.getSeconds(),W.length)},S(X,W){const J=W.length,te=X.getMilliseconds(),re=Math.trunc(te*Math.pow(10,J-3));return addLeadingZeros(re,W.length)}},dayPeriodEnum={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function(X,W,J){const te=X.getFullYear()>0?1:0;switch(W){case"G":case"GG":case"GGG":return J.era(te,{width:"abbreviated"});case"GGGGG":return J.era(te,{width:"narrow"});case"GGGG":default:return J.era(te,{width:"wide"})}},y:function(X,W,J){if(W==="yo"){const te=X.getFullYear(),re=te>0?te:1-te;return J.ordinalNumber(re,{unit:"year"})}return lightFormatters.y(X,W)},Y:function(X,W,J,te){const re=getWeekYear(X,te),ne=re>0?re:1-re;if(W==="YY"){const oe=ne%100;return addLeadingZeros(oe,2)}return W==="Yo"?J.ordinalNumber(ne,{unit:"year"}):addLeadingZeros(ne,W.length)},R:function(X,W){const J=getISOWeekYear(X);return addLeadingZeros(J,W.length)},u:function(X,W){const J=X.getFullYear();return addLeadingZeros(J,W.length)},Q:function(X,W,J){const te=Math.ceil((X.getMonth()+1)/3);switch(W){case"Q":return String(te);case"QQ":return addLeadingZeros(te,2);case"Qo":return J.ordinalNumber(te,{unit:"quarter"});case"QQQ":return J.quarter(te,{width:"abbreviated",context:"formatting"});case"QQQQQ":return J.quarter(te,{width:"narrow",context:"formatting"});case"QQQQ":default:return J.quarter(te,{width:"wide",context:"formatting"})}},q:function(X,W,J){const te=Math.ceil((X.getMonth()+1)/3);switch(W){case"q":return String(te);case"qq":return addLeadingZeros(te,2);case"qo":return J.ordinalNumber(te,{unit:"quarter"});case"qqq":return J.quarter(te,{width:"abbreviated",context:"standalone"});case"qqqqq":return J.quarter(te,{width:"narrow",context:"standalone"});case"qqqq":default:return J.quarter(te,{width:"wide",context:"standalone"})}},M:function(X,W,J){const te=X.getMonth();switch(W){case"M":case"MM":return lightFormatters.M(X,W);case"Mo":return J.ordinalNumber(te+1,{unit:"month"});case"MMM":return J.month(te,{width:"abbreviated",context:"formatting"});case"MMMMM":return J.month(te,{width:"narrow",context:"formatting"});case"MMMM":default:return J.month(te,{width:"wide",context:"formatting"})}},L:function(X,W,J){const te=X.getMonth();switch(W){case"L":return String(te+1);case"LL":return addLeadingZeros(te+1,2);case"Lo":return J.ordinalNumber(te+1,{unit:"month"});case"LLL":return J.month(te,{width:"abbreviated",context:"standalone"});case"LLLLL":return J.month(te,{width:"narrow",context:"standalone"});case"LLLL":default:return J.month(te,{width:"wide",context:"standalone"})}},w:function(X,W,J,te){const re=getWeek(X,te);return W==="wo"?J.ordinalNumber(re,{unit:"week"}):addLeadingZeros(re,W.length)},I:function(X,W,J){const te=getISOWeek(X);return W==="Io"?J.ordinalNumber(te,{unit:"week"}):addLeadingZeros(te,W.length)},d:function(X,W,J){return W==="do"?J.ordinalNumber(X.getDate(),{unit:"date"}):lightFormatters.d(X,W)},D:function(X,W,J){const te=getDayOfYear(X);return W==="Do"?J.ordinalNumber(te,{unit:"dayOfYear"}):addLeadingZeros(te,W.length)},E:function(X,W,J){const te=X.getDay();switch(W){case"E":case"EE":case"EEE":return J.day(te,{width:"abbreviated",context:"formatting"});case"EEEEE":return J.day(te,{width:"narrow",context:"formatting"});case"EEEEEE":return J.day(te,{width:"short",context:"formatting"});case"EEEE":default:return J.day(te,{width:"wide",context:"formatting"})}},e:function(X,W,J,te){const re=X.getDay(),ne=(re-te.weekStartsOn+8)%7||7;switch(W){case"e":return String(ne);case"ee":return addLeadingZeros(ne,2);case"eo":return J.ordinalNumber(ne,{unit:"day"});case"eee":return J.day(re,{width:"abbreviated",context:"formatting"});case"eeeee":return J.day(re,{width:"narrow",context:"formatting"});case"eeeeee":return J.day(re,{width:"short",context:"formatting"});case"eeee":default:return J.day(re,{width:"wide",context:"formatting"})}},c:function(X,W,J,te){const re=X.getDay(),ne=(re-te.weekStartsOn+8)%7||7;switch(W){case"c":return String(ne);case"cc":return addLeadingZeros(ne,W.length);case"co":return J.ordinalNumber(ne,{unit:"day"});case"ccc":return J.day(re,{width:"abbreviated",context:"standalone"});case"ccccc":return J.day(re,{width:"narrow",context:"standalone"});case"cccccc":return J.day(re,{width:"short",context:"standalone"});case"cccc":default:return J.day(re,{width:"wide",context:"standalone"})}},i:function(X,W,J){const te=X.getDay(),re=te===0?7:te;switch(W){case"i":return String(re);case"ii":return addLeadingZeros(re,W.length);case"io":return J.ordinalNumber(re,{unit:"day"});case"iii":return J.day(te,{width:"abbreviated",context:"formatting"});case"iiiii":return J.day(te,{width:"narrow",context:"formatting"});case"iiiiii":return J.day(te,{width:"short",context:"formatting"});case"iiii":default:return J.day(te,{width:"wide",context:"formatting"})}},a:function(X,W,J){const re=X.getHours()/12>=1?"pm":"am";switch(W){case"a":case"aa":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"aaa":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return J.dayPeriod(re,{width:"narrow",context:"formatting"});case"aaaa":default:return J.dayPeriod(re,{width:"wide",context:"formatting"})}},b:function(X,W,J){const te=X.getHours();let re;switch(te===12?re=dayPeriodEnum.noon:te===0?re=dayPeriodEnum.midnight:re=te/12>=1?"pm":"am",W){case"b":case"bb":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"bbb":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return J.dayPeriod(re,{width:"narrow",context:"formatting"});case"bbbb":default:return J.dayPeriod(re,{width:"wide",context:"formatting"})}},B:function(X,W,J){const te=X.getHours();let re;switch(te>=17?re=dayPeriodEnum.evening:te>=12?re=dayPeriodEnum.afternoon:te>=4?re=dayPeriodEnum.morning:re=dayPeriodEnum.night,W){case"B":case"BB":case"BBB":return J.dayPeriod(re,{width:"abbreviated",context:"formatting"});case"BBBBB":return J.dayPeriod(re,{width:"narrow",context:"formatting"});case"BBBB":default:return J.dayPeriod(re,{width:"wide",context:"formatting"})}},h:function(X,W,J){if(W==="ho"){let te=X.getHours()%12;return te===0&&(te=12),J.ordinalNumber(te,{unit:"hour"})}return lightFormatters.h(X,W)},H:function(X,W,J){return W==="Ho"?J.ordinalNumber(X.getHours(),{unit:"hour"}):lightFormatters.H(X,W)},K:function(X,W,J){const te=X.getHours()%12;return W==="Ko"?J.ordinalNumber(te,{unit:"hour"}):addLeadingZeros(te,W.length)},k:function(X,W,J){let te=X.getHours();return te===0&&(te=24),W==="ko"?J.ordinalNumber(te,{unit:"hour"}):addLeadingZeros(te,W.length)},m:function(X,W,J){return W==="mo"?J.ordinalNumber(X.getMinutes(),{unit:"minute"}):lightFormatters.m(X,W)},s:function(X,W,J){return W==="so"?J.ordinalNumber(X.getSeconds(),{unit:"second"}):lightFormatters.s(X,W)},S:function(X,W){return lightFormatters.S(X,W)},X:function(X,W,J){const te=X.getTimezoneOffset();if(te===0)return"Z";switch(W){case"X":return formatTimezoneWithOptionalMinutes(te);case"XXXX":case"XX":return formatTimezone(te);case"XXXXX":case"XXX":default:return formatTimezone(te,":")}},x:function(X,W,J){const te=X.getTimezoneOffset();switch(W){case"x":return formatTimezoneWithOptionalMinutes(te);case"xxxx":case"xx":return formatTimezone(te);case"xxxxx":case"xxx":default:return formatTimezone(te,":")}},O:function(X,W,J){const te=X.getTimezoneOffset();switch(W){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(te,":");case"OOOO":default:return"GMT"+formatTimezone(te,":")}},z:function(X,W,J){const te=X.getTimezoneOffset();switch(W){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(te,":");case"zzzz":default:return"GMT"+formatTimezone(te,":")}},t:function(X,W,J){const te=Math.trunc(X.getTime()/1e3);return addLeadingZeros(te,W.length)},T:function(X,W,J){const te=X.getTime();return addLeadingZeros(te,W.length)}};function formatTimezoneShort(X,W=""){const J=X>0?"-":"+",te=Math.abs(X),re=Math.trunc(te/60),ne=te%60;return ne===0?J+String(re):J+String(re)+W+addLeadingZeros(ne,2)}function formatTimezoneWithOptionalMinutes(X,W){return X%60===0?(X>0?"-":"+")+addLeadingZeros(Math.abs(X)/60,2):formatTimezone(X,W)}function formatTimezone(X,W=""){const J=X>0?"-":"+",te=Math.abs(X),re=addLeadingZeros(Math.trunc(te/60),2),ne=addLeadingZeros(te%60,2);return J+re+W+ne}const dateLongFormatter=(X,W)=>{switch(X){case"P":return W.date({width:"short"});case"PP":return W.date({width:"medium"});case"PPP":return W.date({width:"long"});case"PPPP":default:return W.date({width:"full"})}},timeLongFormatter=(X,W)=>{switch(X){case"p":return W.time({width:"short"});case"pp":return W.time({width:"medium"});case"ppp":return W.time({width:"long"});case"pppp":default:return W.time({width:"full"})}},dateTimeLongFormatter=(X,W)=>{const J=X.match(/(P+)(p+)?/)||[],te=J[1],re=J[2];if(!re)return dateLongFormatter(X,W);let ne;switch(te){case"P":ne=W.dateTime({width:"short"});break;case"PP":ne=W.dateTime({width:"medium"});break;case"PPP":ne=W.dateTime({width:"long"});break;case"PPPP":default:ne=W.dateTime({width:"full"});break}return ne.replace("{{date}}",dateLongFormatter(te,W)).replace("{{time}}",timeLongFormatter(re,W))},longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter},dayOfYearTokenRE=/^D+$/,weekYearTokenRE=/^Y+$/,throwTokens=["D","DD","YY","YYYY"];function isProtectedDayOfYearToken(X){return dayOfYearTokenRE.test(X)}function isProtectedWeekYearToken(X){return weekYearTokenRE.test(X)}function warnOrThrowProtectedError(X,W,J){const te=message(X,W,J);if(console.warn(te),throwTokens.includes(X))throw new RangeError(te)}function message(X,W,J){const te=X[0]==="Y"?"years":"days of the month";return`Use \`${X.toLowerCase()}\` instead of \`${X}\` (in \`${W}\`) for formatting ${te} to the input \`${J}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const formattingTokensRegExp$1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp$1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp$1=/^'([^]*?)'?$/,doubleQuoteRegExp$1=/''/g,unescapedLatinCharacterRegExp$1=/[a-zA-Z]/;function format(X,W,J){var ue,pe,fe,ge;const te=getDefaultOptions$1(),re=te.locale??enUS,ne=te.firstWeekContainsDate??((pe=(ue=te.locale)==null?void 0:ue.options)==null?void 0:pe.firstWeekContainsDate)??1,oe=te.weekStartsOn??((ge=(fe=te.locale)==null?void 0:fe.options)==null?void 0:ge.weekStartsOn)??0,de=toDate(X);if(!isValid(de))throw new RangeError("Invalid time value");let he=W.match(longFormattingTokensRegExp$1).map(me=>{const ve=me[0];if(ve==="p"||ve==="P"){const be=longFormatters[ve];return be(me,re.formatLong)}return me}).join("").match(formattingTokensRegExp$1).map(me=>{if(me==="''")return{isToken:!1,value:"'"};const ve=me[0];if(ve==="'")return{isToken:!1,value:cleanEscapedString$1(me)};if(formatters[ve])return{isToken:!0,value:me};if(ve.match(unescapedLatinCharacterRegExp$1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ve+"`");return{isToken:!1,value:me}});re.localize.preprocessor&&(he=re.localize.preprocessor(de,he));const ce={firstWeekContainsDate:ne,weekStartsOn:oe,locale:re};return he.map(me=>{if(!me.isToken)return me.value;const ve=me.value;(isProtectedWeekYearToken(ve)||isProtectedDayOfYearToken(ve))&&warnOrThrowProtectedError(ve,W,String(X));const be=formatters[ve[0]];return be(de,ve,re.localize,ce)}).join("")}function cleanEscapedString$1(X){const W=X.match(escapedStringRegExp$1);return W?W[1].replace(doubleQuoteRegExp$1,"'"):X}function getDay(X){return toDate(X).getDay()}function getDefaultOptions(){return Object.assign({},getDefaultOptions$1())}function getISODay(X){let J=toDate(X).getDay();return J===0&&(J=7),J}function transpose(X,W){const J=W instanceof Date?constructFrom(W,0):new W(0);return J.setFullYear(X.getFullYear(),X.getMonth(),X.getDate()),J.setHours(X.getHours(),X.getMinutes(),X.getSeconds(),X.getMilliseconds()),J}const TIMEZONE_UNIT_PRIORITY=10;class Setter{constructor(){Ft(this,"subPriority",0)}validate(W,J){return!0}}class ValueSetter extends Setter{constructor(W,J,te,re,ne){super(),this.value=W,this.validateValue=J,this.setValue=te,this.priority=re,ne&&(this.subPriority=ne)}validate(W,J){return this.validateValue(W,this.value,J)}set(W,J,te){return this.setValue(W,J,this.value,te)}}class DateToSystemTimezoneSetter extends Setter{constructor(){super(...arguments);Ft(this,"priority",TIMEZONE_UNIT_PRIORITY);Ft(this,"subPriority",-1)}set(J,te){return te.timestampIsSet?J:constructFrom(J,transpose(J,Date))}}class Parser{run(W,J,te,re){const ne=this.parse(W,J,te,re);return ne?{setter:new ValueSetter(ne.value,this.validate,this.set,this.priority,this.subPriority),rest:ne.rest}:null}validate(W,J,te){return!0}}class EraParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",140);Ft(this,"incompatibleTokens",["R","u","t","T"])}parse(J,te,re){switch(te){case"G":case"GG":case"GGG":return re.era(J,{width:"abbreviated"})||re.era(J,{width:"narrow"});case"GGGGG":return re.era(J,{width:"narrow"});case"GGGG":default:return re.era(J,{width:"wide"})||re.era(J,{width:"abbreviated"})||re.era(J,{width:"narrow"})}}set(J,te,re){return te.era=re,J.setFullYear(re,0,1),J.setHours(0,0,0,0),J}}const numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function mapValue(X,W){return X&&{value:W(X.value),rest:X.rest}}function parseNumericPattern(X,W){const J=W.match(X);return J?{value:parseInt(J[0],10),rest:W.slice(J[0].length)}:null}function parseTimezonePattern(X,W){const J=W.match(X);if(!J)return null;if(J[0]==="Z")return{value:0,rest:W.slice(1)};const te=J[1]==="+"?1:-1,re=J[2]?parseInt(J[2],10):0,ne=J[3]?parseInt(J[3],10):0,oe=J[5]?parseInt(J[5],10):0;return{value:te*(re*millisecondsInHour+ne*millisecondsInMinute+oe*millisecondsInSecond),rest:W.slice(J[0].length)}}function parseAnyDigitsSigned(X){return parseNumericPattern(numericPatterns.anyDigitsSigned,X)}function parseNDigits(X,W){switch(X){case 1:return parseNumericPattern(numericPatterns.singleDigit,W);case 2:return parseNumericPattern(numericPatterns.twoDigits,W);case 3:return parseNumericPattern(numericPatterns.threeDigits,W);case 4:return parseNumericPattern(numericPatterns.fourDigits,W);default:return parseNumericPattern(new RegExp("^\\d{1,"+X+"}"),W)}}function parseNDigitsSigned(X,W){switch(X){case 1:return parseNumericPattern(numericPatterns.singleDigitSigned,W);case 2:return parseNumericPattern(numericPatterns.twoDigitsSigned,W);case 3:return parseNumericPattern(numericPatterns.threeDigitsSigned,W);case 4:return parseNumericPattern(numericPatterns.fourDigitsSigned,W);default:return parseNumericPattern(new RegExp("^-?\\d{1,"+X+"}"),W)}}function dayPeriodEnumToHours(X){switch(X){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function normalizeTwoDigitYear(X,W){const J=W>0,te=J?W:1-W;let re;if(te<=50)re=X||100;else{const ne=te+50,oe=Math.trunc(ne/100)*100,de=X>=ne%100;re=X+oe-(de?100:0)}return J?re:1-re}function isLeapYearIndex(X){return X%400===0||X%4===0&&X%100!==0}class YearParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",130);Ft(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(J,te,re){const ne=oe=>({year:oe,isTwoDigitYear:te==="yy"});switch(te){case"y":return mapValue(parseNDigits(4,J),ne);case"yo":return mapValue(re.ordinalNumber(J,{unit:"year"}),ne);default:return mapValue(parseNDigits(te.length,J),ne)}}validate(J,te){return te.isTwoDigitYear||te.year>0}set(J,te,re){const ne=J.getFullYear();if(re.isTwoDigitYear){const de=normalizeTwoDigitYear(re.year,ne);return J.setFullYear(de,0,1),J.setHours(0,0,0,0),J}const oe=!("era"in te)||te.era===1?re.year:1-re.year;return J.setFullYear(oe,0,1),J.setHours(0,0,0,0),J}}class LocalWeekYearParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",130);Ft(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(J,te,re){const ne=oe=>({year:oe,isTwoDigitYear:te==="YY"});switch(te){case"Y":return mapValue(parseNDigits(4,J),ne);case"Yo":return mapValue(re.ordinalNumber(J,{unit:"year"}),ne);default:return mapValue(parseNDigits(te.length,J),ne)}}validate(J,te){return te.isTwoDigitYear||te.year>0}set(J,te,re,ne){const oe=getWeekYear(J,ne);if(re.isTwoDigitYear){const he=normalizeTwoDigitYear(re.year,oe);return J.setFullYear(he,0,ne.firstWeekContainsDate),J.setHours(0,0,0,0),startOfWeek(J,ne)}const de=!("era"in te)||te.era===1?re.year:1-re.year;return J.setFullYear(de,0,ne.firstWeekContainsDate),J.setHours(0,0,0,0),startOfWeek(J,ne)}}class ISOWeekYearParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",130);Ft(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(J,te){return parseNDigitsSigned(te==="R"?4:te.length,J)}set(J,te,re){const ne=constructFrom(J,0);return ne.setFullYear(re,0,4),ne.setHours(0,0,0,0),startOfISOWeek(ne)}}class ExtendedYearParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",130);Ft(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(J,te){return parseNDigitsSigned(te==="u"?4:te.length,J)}set(J,te,re){return J.setFullYear(re,0,1),J.setHours(0,0,0,0),J}}class QuarterParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",120);Ft(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"Q":case"QQ":return parseNDigits(te.length,J);case"Qo":return re.ordinalNumber(J,{unit:"quarter"});case"QQQ":return re.quarter(J,{width:"abbreviated",context:"formatting"})||re.quarter(J,{width:"narrow",context:"formatting"});case"QQQQQ":return re.quarter(J,{width:"narrow",context:"formatting"});case"QQQQ":default:return re.quarter(J,{width:"wide",context:"formatting"})||re.quarter(J,{width:"abbreviated",context:"formatting"})||re.quarter(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=1&&te<=4}set(J,te,re){return J.setMonth((re-1)*3,1),J.setHours(0,0,0,0),J}}class StandAloneQuarterParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",120);Ft(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"q":case"qq":return parseNDigits(te.length,J);case"qo":return re.ordinalNumber(J,{unit:"quarter"});case"qqq":return re.quarter(J,{width:"abbreviated",context:"standalone"})||re.quarter(J,{width:"narrow",context:"standalone"});case"qqqqq":return re.quarter(J,{width:"narrow",context:"standalone"});case"qqqq":default:return re.quarter(J,{width:"wide",context:"standalone"})||re.quarter(J,{width:"abbreviated",context:"standalone"})||re.quarter(J,{width:"narrow",context:"standalone"})}}validate(J,te){return te>=1&&te<=4}set(J,te,re){return J.setMonth((re-1)*3,1),J.setHours(0,0,0,0),J}}class MonthParser extends Parser{constructor(){super(...arguments);Ft(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);Ft(this,"priority",110)}parse(J,te,re){const ne=oe=>oe-1;switch(te){case"M":return mapValue(parseNumericPattern(numericPatterns.month,J),ne);case"MM":return mapValue(parseNDigits(2,J),ne);case"Mo":return mapValue(re.ordinalNumber(J,{unit:"month"}),ne);case"MMM":return re.month(J,{width:"abbreviated",context:"formatting"})||re.month(J,{width:"narrow",context:"formatting"});case"MMMMM":return re.month(J,{width:"narrow",context:"formatting"});case"MMMM":default:return re.month(J,{width:"wide",context:"formatting"})||re.month(J,{width:"abbreviated",context:"formatting"})||re.month(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=0&&te<=11}set(J,te,re){return J.setMonth(re,1),J.setHours(0,0,0,0),J}}class StandAloneMonthParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",110);Ft(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(J,te,re){const ne=oe=>oe-1;switch(te){case"L":return mapValue(parseNumericPattern(numericPatterns.month,J),ne);case"LL":return mapValue(parseNDigits(2,J),ne);case"Lo":return mapValue(re.ordinalNumber(J,{unit:"month"}),ne);case"LLL":return re.month(J,{width:"abbreviated",context:"standalone"})||re.month(J,{width:"narrow",context:"standalone"});case"LLLLL":return re.month(J,{width:"narrow",context:"standalone"});case"LLLL":default:return re.month(J,{width:"wide",context:"standalone"})||re.month(J,{width:"abbreviated",context:"standalone"})||re.month(J,{width:"narrow",context:"standalone"})}}validate(J,te){return te>=0&&te<=11}set(J,te,re){return J.setMonth(re,1),J.setHours(0,0,0,0),J}}function setWeek(X,W,J){const te=toDate(X),re=getWeek(te,J)-W;return te.setDate(te.getDate()-re*7),te}class LocalWeekParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",100);Ft(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(J,te,re){switch(te){case"w":return parseNumericPattern(numericPatterns.week,J);case"wo":return re.ordinalNumber(J,{unit:"week"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=53}set(J,te,re,ne){return startOfWeek(setWeek(J,re,ne),ne)}}function setISOWeek(X,W){const J=toDate(X),te=getISOWeek(J)-W;return J.setDate(J.getDate()-te*7),J}class ISOWeekParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",100);Ft(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(J,te,re){switch(te){case"I":return parseNumericPattern(numericPatterns.week,J);case"Io":return re.ordinalNumber(J,{unit:"week"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=53}set(J,te,re){return startOfISOWeek(setISOWeek(J,re))}}const DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],DAYS_IN_MONTH_LEAP_YEAR=[31,29,31,30,31,30,31,31,30,31,30,31];class DateParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",90);Ft(this,"subPriority",1);Ft(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"d":return parseNumericPattern(numericPatterns.date,J);case"do":return re.ordinalNumber(J,{unit:"date"});default:return parseNDigits(te.length,J)}}validate(J,te){const re=J.getFullYear(),ne=isLeapYearIndex(re),oe=J.getMonth();return ne?te>=1&&te<=DAYS_IN_MONTH_LEAP_YEAR[oe]:te>=1&&te<=DAYS_IN_MONTH[oe]}set(J,te,re){return J.setDate(re),J.setHours(0,0,0,0),J}}class DayOfYearParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",90);Ft(this,"subpriority",1);Ft(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(J,te,re){switch(te){case"D":case"DD":return parseNumericPattern(numericPatterns.dayOfYear,J);case"Do":return re.ordinalNumber(J,{unit:"date"});default:return parseNDigits(te.length,J)}}validate(J,te){const re=J.getFullYear();return isLeapYearIndex(re)?te>=1&&te<=366:te>=1&&te<=365}set(J,te,re){return J.setMonth(0,re),J.setHours(0,0,0,0),J}}function setDay(X,W,J){var pe,fe,ge,me;const te=getDefaultOptions$1(),re=(J==null?void 0:J.weekStartsOn)??((fe=(pe=J==null?void 0:J.locale)==null?void 0:pe.options)==null?void 0:fe.weekStartsOn)??te.weekStartsOn??((me=(ge=te.locale)==null?void 0:ge.options)==null?void 0:me.weekStartsOn)??0,ne=toDate(X),oe=ne.getDay(),he=(W%7+7)%7,ce=7-re,ue=W<0||W>6?W-(oe+ce)%7:(he+ce)%7-(oe+ce)%7;return addDays(ne,ue)}class DayParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",90);Ft(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(J,te,re){switch(te){case"E":case"EE":case"EEE":return re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"EEEEE":return re.day(J,{width:"narrow",context:"formatting"});case"EEEEEE":return re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"EEEE":default:return re.day(J,{width:"wide",context:"formatting"})||re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=0&&te<=6}set(J,te,re,ne){return J=setDay(J,re,ne),J.setHours(0,0,0,0),J}}class LocalDayParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",90);Ft(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(J,te,re,ne){const oe=de=>{const he=Math.floor((de-1)/7)*7;return(de+ne.weekStartsOn+6)%7+he};switch(te){case"e":case"ee":return mapValue(parseNDigits(te.length,J),oe);case"eo":return mapValue(re.ordinalNumber(J,{unit:"day"}),oe);case"eee":return re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"eeeee":return re.day(J,{width:"narrow",context:"formatting"});case"eeeeee":return re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"});case"eeee":default:return re.day(J,{width:"wide",context:"formatting"})||re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"})}}validate(J,te){return te>=0&&te<=6}set(J,te,re,ne){return J=setDay(J,re,ne),J.setHours(0,0,0,0),J}}class StandAloneLocalDayParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",90);Ft(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(J,te,re,ne){const oe=de=>{const he=Math.floor((de-1)/7)*7;return(de+ne.weekStartsOn+6)%7+he};switch(te){case"c":case"cc":return mapValue(parseNDigits(te.length,J),oe);case"co":return mapValue(re.ordinalNumber(J,{unit:"day"}),oe);case"ccc":return re.day(J,{width:"abbreviated",context:"standalone"})||re.day(J,{width:"short",context:"standalone"})||re.day(J,{width:"narrow",context:"standalone"});case"ccccc":return re.day(J,{width:"narrow",context:"standalone"});case"cccccc":return re.day(J,{width:"short",context:"standalone"})||re.day(J,{width:"narrow",context:"standalone"});case"cccc":default:return re.day(J,{width:"wide",context:"standalone"})||re.day(J,{width:"abbreviated",context:"standalone"})||re.day(J,{width:"short",context:"standalone"})||re.day(J,{width:"narrow",context:"standalone"})}}validate(J,te){return te>=0&&te<=6}set(J,te,re,ne){return J=setDay(J,re,ne),J.setHours(0,0,0,0),J}}function setISODay(X,W){const J=toDate(X),te=getISODay(J),re=W-te;return addDays(J,re)}class ISODayParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",90);Ft(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(J,te,re){const ne=oe=>oe===0?7:oe;switch(te){case"i":case"ii":return parseNDigits(te.length,J);case"io":return re.ordinalNumber(J,{unit:"day"});case"iii":return mapValue(re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"}),ne);case"iiiii":return mapValue(re.day(J,{width:"narrow",context:"formatting"}),ne);case"iiiiii":return mapValue(re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"}),ne);case"iiii":default:return mapValue(re.day(J,{width:"wide",context:"formatting"})||re.day(J,{width:"abbreviated",context:"formatting"})||re.day(J,{width:"short",context:"formatting"})||re.day(J,{width:"narrow",context:"formatting"}),ne)}}validate(J,te){return te>=1&&te<=7}set(J,te,re){return J=setISODay(J,re),J.setHours(0,0,0,0),J}}class AMPMParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",80);Ft(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(J,te,re){switch(te){case"a":case"aa":case"aaa":return re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"});case"aaaaa":return re.dayPeriod(J,{width:"narrow",context:"formatting"});case"aaaa":default:return re.dayPeriod(J,{width:"wide",context:"formatting"})||re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"})}}set(J,te,re){return J.setHours(dayPeriodEnumToHours(re),0,0,0),J}}class AMPMMidnightParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",80);Ft(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(J,te,re){switch(te){case"b":case"bb":case"bbb":return re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"});case"bbbbb":return re.dayPeriod(J,{width:"narrow",context:"formatting"});case"bbbb":default:return re.dayPeriod(J,{width:"wide",context:"formatting"})||re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"})}}set(J,te,re){return J.setHours(dayPeriodEnumToHours(re),0,0,0),J}}class DayPeriodParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",80);Ft(this,"incompatibleTokens",["a","b","t","T"])}parse(J,te,re){switch(te){case"B":case"BB":case"BBB":return re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"});case"BBBBB":return re.dayPeriod(J,{width:"narrow",context:"formatting"});case"BBBB":default:return re.dayPeriod(J,{width:"wide",context:"formatting"})||re.dayPeriod(J,{width:"abbreviated",context:"formatting"})||re.dayPeriod(J,{width:"narrow",context:"formatting"})}}set(J,te,re){return J.setHours(dayPeriodEnumToHours(re),0,0,0),J}}class Hour1to12Parser extends Parser{constructor(){super(...arguments);Ft(this,"priority",70);Ft(this,"incompatibleTokens",["H","K","k","t","T"])}parse(J,te,re){switch(te){case"h":return parseNumericPattern(numericPatterns.hour12h,J);case"ho":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=12}set(J,te,re){const ne=J.getHours()>=12;return ne&&re<12?J.setHours(re+12,0,0,0):!ne&&re===12?J.setHours(0,0,0,0):J.setHours(re,0,0,0),J}}class Hour0to23Parser extends Parser{constructor(){super(...arguments);Ft(this,"priority",70);Ft(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(J,te,re){switch(te){case"H":return parseNumericPattern(numericPatterns.hour23h,J);case"Ho":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=23}set(J,te,re){return J.setHours(re,0,0,0),J}}class Hour0To11Parser extends Parser{constructor(){super(...arguments);Ft(this,"priority",70);Ft(this,"incompatibleTokens",["h","H","k","t","T"])}parse(J,te,re){switch(te){case"K":return parseNumericPattern(numericPatterns.hour11h,J);case"Ko":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=11}set(J,te,re){return J.getHours()>=12&&re<12?J.setHours(re+12,0,0,0):J.setHours(re,0,0,0),J}}class Hour1To24Parser extends Parser{constructor(){super(...arguments);Ft(this,"priority",70);Ft(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(J,te,re){switch(te){case"k":return parseNumericPattern(numericPatterns.hour24h,J);case"ko":return re.ordinalNumber(J,{unit:"hour"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=1&&te<=24}set(J,te,re){const ne=re<=24?re%24:re;return J.setHours(ne,0,0,0),J}}class MinuteParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",60);Ft(this,"incompatibleTokens",["t","T"])}parse(J,te,re){switch(te){case"m":return parseNumericPattern(numericPatterns.minute,J);case"mo":return re.ordinalNumber(J,{unit:"minute"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=59}set(J,te,re){return J.setMinutes(re,0,0),J}}class SecondParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",50);Ft(this,"incompatibleTokens",["t","T"])}parse(J,te,re){switch(te){case"s":return parseNumericPattern(numericPatterns.second,J);case"so":return re.ordinalNumber(J,{unit:"second"});default:return parseNDigits(te.length,J)}}validate(J,te){return te>=0&&te<=59}set(J,te,re){return J.setSeconds(re,0),J}}class FractionOfSecondParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",30);Ft(this,"incompatibleTokens",["t","T"])}parse(J,te){const re=ne=>Math.trunc(ne*Math.pow(10,-te.length+3));return mapValue(parseNDigits(te.length,J),re)}set(J,te,re){return J.setMilliseconds(re),J}}class ISOTimezoneWithZParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",10);Ft(this,"incompatibleTokens",["t","T","x"])}parse(J,te){switch(te){case"X":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,J);case"XX":return parseTimezonePattern(timezonePatterns.basic,J);case"XXXX":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,J);case"XXXXX":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,J);case"XXX":default:return parseTimezonePattern(timezonePatterns.extended,J)}}set(J,te,re){return te.timestampIsSet?J:constructFrom(J,J.getTime()-getTimezoneOffsetInMilliseconds(J)-re)}}class ISOTimezoneParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",10);Ft(this,"incompatibleTokens",["t","T","X"])}parse(J,te){switch(te){case"x":return parseTimezonePattern(timezonePatterns.basicOptionalMinutes,J);case"xx":return parseTimezonePattern(timezonePatterns.basic,J);case"xxxx":return parseTimezonePattern(timezonePatterns.basicOptionalSeconds,J);case"xxxxx":return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds,J);case"xxx":default:return parseTimezonePattern(timezonePatterns.extended,J)}}set(J,te,re){return te.timestampIsSet?J:constructFrom(J,J.getTime()-getTimezoneOffsetInMilliseconds(J)-re)}}class TimestampSecondsParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",40);Ft(this,"incompatibleTokens","*")}parse(J){return parseAnyDigitsSigned(J)}set(J,te,re){return[constructFrom(J,re*1e3),{timestampIsSet:!0}]}}class TimestampMillisecondsParser extends Parser{constructor(){super(...arguments);Ft(this,"priority",20);Ft(this,"incompatibleTokens","*")}parse(J){return parseAnyDigitsSigned(J)}set(J,te,re){return[constructFrom(J,re),{timestampIsSet:!0}]}}const parsers={G:new EraParser,y:new YearParser,Y:new LocalWeekYearParser,R:new ISOWeekYearParser,u:new ExtendedYearParser,Q:new QuarterParser,q:new StandAloneQuarterParser,M:new MonthParser,L:new StandAloneMonthParser,w:new LocalWeekParser,I:new ISOWeekParser,d:new DateParser,D:new DayOfYearParser,E:new DayParser,e:new LocalDayParser,c:new StandAloneLocalDayParser,i:new ISODayParser,a:new AMPMParser,b:new AMPMMidnightParser,B:new DayPeriodParser,h:new Hour1to12Parser,H:new Hour0to23Parser,K:new Hour0To11Parser,k:new Hour1To24Parser,m:new MinuteParser,s:new SecondParser,S:new FractionOfSecondParser,X:new ISOTimezoneWithZParser,x:new ISOTimezoneParser,t:new TimestampSecondsParser,T:new TimestampMillisecondsParser},formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,notWhitespaceRegExp=/\S/,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function parse(X,W,J,te){var ve,be,ye,we;const re=getDefaultOptions(),ne=re.locale??enUS,oe=re.firstWeekContainsDate??((be=(ve=re.locale)==null?void 0:ve.options)==null?void 0:be.firstWeekContainsDate)??1,de=re.weekStartsOn??((we=(ye=re.locale)==null?void 0:ye.options)==null?void 0:we.weekStartsOn)??0,he={firstWeekContainsDate:oe,weekStartsOn:de,locale:ne},ce=[new DateToSystemTimezoneSetter],ue=W.match(longFormattingTokensRegExp).map(Se=>{const _e=Se[0];if(_e in longFormatters){const Ce=longFormatters[_e];return Ce(Se,ne.formatLong)}return Se}).join("").match(formattingTokensRegExp),pe=[];for(let Se of ue){isProtectedWeekYearToken(Se)&&warnOrThrowProtectedError(Se,W,X),isProtectedDayOfYearToken(Se)&&warnOrThrowProtectedError(Se,W,X);const _e=Se[0],Ce=parsers[_e];if(Ce){const{incompatibleTokens:Le}=Ce;if(Array.isArray(Le)){const Ie=pe.find(ze=>Le.includes(ze.token)||ze.token===_e);if(Ie)throw new RangeError(`The format string mustn't contain \`${Ie.fullToken}\` and \`${Se}\` at the same time`)}else if(Ce.incompatibleTokens==="*"&&pe.length>0)throw new RangeError(`The format string mustn't contain \`${Se}\` and any other token at the same time`);pe.push({token:_e,fullToken:Se});const Pe=Ce.run(X,Se,ne.match,he);if(!Pe)return constructFrom(J,NaN);ce.push(Pe.setter),X=Pe.rest}else{if(_e.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_e+"`");if(Se==="''"?Se="'":_e==="'"&&(Se=cleanEscapedString(Se)),X.indexOf(Se)===0)X=X.slice(Se.length);else return constructFrom(J,NaN)}}if(X.length>0&¬WhitespaceRegExp.test(X))return constructFrom(J,NaN);const fe=ce.map(Se=>Se.priority).sort((Se,_e)=>_e-Se).filter((Se,_e,Ce)=>Ce.indexOf(Se)===_e).map(Se=>ce.filter(_e=>_e.priority===Se).sort((_e,Ce)=>Ce.subPriority-_e.subPriority)).map(Se=>Se[0]);let ge=toDate(J);if(isNaN(ge.getTime()))return constructFrom(J,NaN);const me={};for(const Se of fe){if(!Se.validate(ge,he))return constructFrom(J,NaN);const _e=Se.set(ge,me,he);Array.isArray(_e)?(ge=_e[0],Object.assign(me,_e[1])):ge=_e}return constructFrom(J,ge)}function cleanEscapedString(X){return X.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp,"'")}const notFound="data:image/svg+xml,%3csvg%20width='215'%20height='150'%20viewBox='0%200%20215%20150'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.9'%20d='M135.132%2057.43C96.9221%2047.658%2083.3815%20-29.7048%2026.9734%2012.5083C-13.0511%2042.4595%2011.4691%20115.499%2061.6878%20107.019C92.0822%20101.867%2087.3917%20101.341%20113.129%20115.244C139.231%20129.308%20167.972%20136.397%20195.855%20111.436C210.28%2098.5179%20215.939%2067.0352%20201.939%2050.7417C184.388%2030.3592%20158.485%2063.4098%20135.132%2057.43Z'%20fill='%23EFF7FF'/%3e%3cellipse%20cx='120.5'%20cy='143.5'%20rx='52.5'%20ry='3.5'%20fill='%23F5F5F5'/%3e%3cpath%20d='M121.387%2080.2184C121.995%2079.5948%20122.563%2078.953%20123.09%2078.2959L134.396%2089.3383C135.09%2090.0177%20134.851%2091.389%20133.861%2092.4024C132.872%2093.4159%20131.505%2093.6888%20130.811%2093.0094L119.505%2081.967C120.148%2081.424%20120.777%2080.8407%20121.385%2080.2171L121.387%2080.2184Z'%20fill='%231D1D1D'/%3e%3cpath%20opacity='0.6'%20d='M121.127%2079.9896C132.157%2068.6986%20131.888%2050.5485%20120.527%2039.4502C109.166%2028.3519%2091.0149%2028.5081%2079.9849%2039.799C68.955%2051.09%2069.2233%2069.2401%2080.5843%2080.3385C91.9453%2091.4368%20110.097%2091.2806%20121.127%2079.9896Z'%20fill='%238FC2F5'/%3e%3cpath%20d='M78.0382%2083.0622C90.8729%2095.6382%20111.378%2095.4578%20123.835%2082.6609C136.293%2069.8625%20135.986%2049.2932%20123.15%2036.7173C110.316%2024.1413%2089.8107%2024.3217%2077.3538%2037.1186C64.8956%2049.9169%2065.2022%2070.4862%2078.0382%2083.0622ZM80.642%2080.387C69.289%2069.264%2069.0172%2051.0692%2080.037%2039.749C91.0569%2028.4288%20109.194%2028.2694%20120.547%2039.3938C131.9%2050.5182%20132.171%2068.713%20121.152%2080.0332C110.132%2091.3534%2091.9949%2091.5128%2080.642%2080.3884V80.387Z'%20fill='%237BACFC'/%3e%3cpath%20d='M169.953%20128.522L171.714%20126.696C173.474%20124.871%20173.421%20121.964%20171.595%20120.205L135.013%2084.9265C133.187%2083.1661%20130.281%2083.2205%20128.522%2085.0451L126.761%2086.8711C125.001%2088.6957%20125.055%2091.6028%20126.88%2093.3619L163.462%20128.64C165.287%20130.401%20168.194%20130.346%20169.953%20128.522Z'%20fill='%23656565'/%3e%3cpath%20opacity='0.35'%20d='M88.8399%2071.2315C96.506%2079.2245%20101.258%2078.1642%20100.757%2082.4547C100.256%2086.7452%2091.398%2085.7448%2082.7698%2076.0396C74.1415%2066.3344%2075.0893%2054.9166%2079.8491%2055.2485C84.6089%2055.5803%2080.129%2062.1492%2088.8399%2071.2315Z'%20fill='white'/%3e%3c/svg%3e";/**
|
|
325
321
|
* @license
|
|
326
322
|
* Copyright 2018 Google LLC
|
|
327
323
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -345,7 +341,7 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
345
341
|
* @license
|
|
346
342
|
* Copyright 2021 Google LLC
|
|
347
343
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
348
|
-
*/const defaultKeyFunction=X=>X,defaultRenderItem=(X,W)=>ke$1`${W}: ${JSON.stringify(X,null,2)}`;class VirtualizeDirective extends $t{constructor(W){if(super(W),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(J,te)=>defaultRenderItem(J,te+this._first),this._keyFunction=(J,te)=>defaultKeyFunction(J,te+this._first),this._items=[],W.type!==t$g.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(W){W&&this._setFunctions(W);const J=[];if(this._first>=0&&this._last>=this._first)for(let te=this._first;te<=this._last;te++)J.push(this._items[te]);return Qt(J,this._keyFunction,this._renderItem)}update(W,[J]){this._setFunctions(J);const te=this._items!==J.items;return this._items=J.items||[],this._virtualizer?this._updateVirtualizerConfig(W,J):this._initialize(W,J),te?R:this.render()}async _updateVirtualizerConfig(W,J){if(!await this._virtualizer.updateLayoutConfig(J.layout||{})){const re=W.parentNode;this._makeVirtualizer(re,J)}this._virtualizer.items=this._items}_setFunctions(W){const{renderItem:J,keyFunction:te}=W;J&&(this._renderItem=(re,ne)=>J(re,ne+this._first)),te&&(this._keyFunction=(re,ne)=>te(re,ne+this._first))}_makeVirtualizer(W,J){this._virtualizer&&this._virtualizer.disconnected();const{layout:te,scroller:re,items:ne}=J;this._virtualizer=new Virtualizer({hostElement:W,layout:te,scroller:re}),this._virtualizer.items=ne,this._virtualizer.connected()}_initialize(W,J){const te=W.parentNode;te&&te.nodeType===1&&(te.addEventListener("rangeChanged",re=>{this._first=re.first,this._last=re.last,this.setValue(this.render())}),this._makeVirtualizer(te,J))}disconnected(){var W;(W=this._virtualizer)==null||W.disconnected()}reconnected(){var W;(W=this._virtualizer)==null||W.connected()}}const virtualize=e$I(VirtualizeDirective)
|
|
344
|
+
*/const defaultKeyFunction=X=>X,defaultRenderItem=(X,W)=>ke$1`${W}: ${JSON.stringify(X,null,2)}`;class VirtualizeDirective extends $t{constructor(W){if(super(W),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(J,te)=>defaultRenderItem(J,te+this._first),this._keyFunction=(J,te)=>defaultKeyFunction(J,te+this._first),this._items=[],W.type!==t$g.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(W){W&&this._setFunctions(W);const J=[];if(this._first>=0&&this._last>=this._first)for(let te=this._first;te<=this._last;te++)J.push(this._items[te]);return Qt(J,this._keyFunction,this._renderItem)}update(W,[J]){this._setFunctions(J);const te=this._items!==J.items;return this._items=J.items||[],this._virtualizer?this._updateVirtualizerConfig(W,J):this._initialize(W,J),te?R:this.render()}async _updateVirtualizerConfig(W,J){if(!await this._virtualizer.updateLayoutConfig(J.layout||{})){const re=W.parentNode;this._makeVirtualizer(re,J)}this._virtualizer.items=this._items}_setFunctions(W){const{renderItem:J,keyFunction:te}=W;J&&(this._renderItem=(re,ne)=>J(re,ne+this._first)),te&&(this._keyFunction=(re,ne)=>te(re,ne+this._first))}_makeVirtualizer(W,J){this._virtualizer&&this._virtualizer.disconnected();const{layout:te,scroller:re,items:ne}=J;this._virtualizer=new Virtualizer({hostElement:W,layout:te,scroller:re}),this._virtualizer.items=ne,this._virtualizer.connected()}_initialize(W,J){const te=W.parentNode;te&&te.nodeType===1&&(te.addEventListener("rangeChanged",re=>{this._first=re.first,this._last=re.last,this.setValue(this.render())}),this._makeVirtualizer(te,J))}disconnected(){var W;(W=this._virtualizer)==null||W.disconnected()}reconnected(){var W;(W=this._virtualizer)==null||W.connected()}}const virtualize=e$I(VirtualizeDirective);function shouldShowRole(X){return!X.professional.speciality.description}const template$e=X=>{var W;return X._hasUpdatedOnce?ke$1`
|
|
349
345
|
<div class="container">
|
|
350
346
|
${((W=X.historyGroups)==null?void 0:W.length)>0?ke$1`
|
|
351
347
|
<div class="virtualizer">
|
|
@@ -368,28 +364,29 @@ Registered bindings:`,re.forEach(function(ne){var oe="Object";ne.implementationT
|
|
|
368
364
|
</div>
|
|
369
365
|
`:!X.isAnyCollectionLoadingWithoutAnyLoaded&&!X.isSomeCollectionLoadedAndOtherLoading?ke$1`<dss-user-feedback class="feedback" imagesrc=${notFound} title=${translate("noResults")}></dss-user-feedback>`:D$1}
|
|
370
366
|
</div>
|
|
371
|
-
`:ke$1`<div class="container"></div>`},visitHeaderTemplate=(X,W)=>W
|
|
372
|
-
<div class="visit__header">
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
${ae(X.highlightMatch(W.center.description,X.searchString))} |
|
|
382
|
-
${ae(X.highlightMatch(W.professional.speciality.description,X.searchString))}
|
|
367
|
+
`:ke$1`<div class="container"></div>`},visitHeaderTemplate=(X,W)=>W?ke$1`
|
|
368
|
+
<div class="visit__header">
|
|
369
|
+
<div class="title">
|
|
370
|
+
<div class="title-date">
|
|
371
|
+
<div>${format(new Date(W.date),"dd/MM/yyyy")}</div>
|
|
372
|
+
</div>
|
|
373
|
+
<div class="title-description">
|
|
374
|
+
<div>
|
|
375
|
+
${renderProfessionalValues(X,W)}
|
|
376
|
+
</div>
|
|
383
377
|
</div>
|
|
384
378
|
</div>
|
|
385
379
|
</div>
|
|
386
|
-
|
|
387
|
-
`,diagnosticHeaderTemplate=X=>X&&ke$1`
|
|
380
|
+
`:D$1,renderProfessionalValues=(X,W)=>{const J=shouldShowRole(W),te=[X.highlighted(W.professional.name),J?X.highlighted(W.professional.role.description):null,X.highlighted(W.center.description),X.highlighted(W.professional.speciality.description)].filter(Boolean);return te.map((ne,oe)=>ke$1`${ne}${oe<te.length-1?" | ":""}`)},diagnosticHeaderTemplate=X=>X&&ke$1`
|
|
388
381
|
<div class="diagnostics__header">
|
|
389
382
|
|
|
390
383
|
${X.diagnostics.filter(W=>W.description!=null&&W.description.trim()!=="").map(W=>{var J;return ke$1`<dss-badge text=${(J=W.description)==null?void 0:J.toUpperCase()} state="info" size="sm" outlined></dss-badge>`})}
|
|
391
384
|
</div>
|
|
392
|
-
|
|
385
|
+
`;/**
|
|
386
|
+
* @license
|
|
387
|
+
* Copyright 2017 Google LLC
|
|
388
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
389
|
+
*/class le extends i$x{constructor(W){if(super(W),this.it=D$1,W.type!==t$g.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(W){if(W===D$1||W==null)return this._t=void 0,this.it=W;if(W===R)return W;if(typeof W!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(W===this.it)return this._t;this.it=W;const J=[W];return J.raw=J,this._t={_$litType$:this.constructor.resultType,strings:J,values:[]}}}le.directiveName="unsafeHTML",le.resultType=1;const ae=e$I(le);var __defProp$j=Object.defineProperty,__getOwnPropDesc$b=Object.getOwnPropertyDescriptor,__decorateClass$j=(X,W,J,te)=>{for(var re=te>1?void 0:te?__getOwnPropDesc$b(W,J):W,ne=X.length-1,oe;ne>=0;ne--)(oe=X[ne])&&(re=(te?oe(W,J,re):oe(re))||re);return te&&re&&__defProp$j(W,J,re),re};let ActivityHistoryTimeline=class extends h$q{constructor(){super(...arguments),this._hasUpdatedOnce=!1}render(){return ke$1`${template$e(this)}`}firstUpdated(){this._hasUpdatedOnce=!0}async updated(X){var W;X.has("historyGroups")&&((W=this.historyGroups)!=null&&W.length)&&await this.prepareComponents(this.historyGroups)}async prepareComponents(X){for(const W of X){W.items=await Promise.all(W.items.map(async J=>({...J,component:await J.componentFactory({item:J})})));for(const J of W.subGroups)J.items=await Promise.all(J.items.map(async te=>({...te,component:await te.componentFactory({item:te})})))}this.requestUpdate()}highlightMatch(X,W){if(!this.searchString||this.searchString.length<2)return X;const J=new RegExp(`(${W})`,"gi");return X.replace(J,'<span class="highlight">$1</span>')}highlighted(X){return X?ae(this.highlightMatch(X,this.searchString)):null}_scrollIntoDate(X){let W=null,J=Number.POSITIVE_INFINITY;this.shadowRoot.querySelectorAll(".visit").forEach(te=>{const re=new Date(te.dataset.date).getTime(),ne=Math.abs(re-X);ne<J&&(J=ne,W=te)}),W&&W.scrollIntoView({behavior:"smooth",block:"start"})}};ActivityHistoryTimeline.styles=i$A`
|
|
393
390
|
${r$I(styles$e)}
|
|
394
391
|
`,__decorateClass$j([connectedProperty(activityHistoryGroupedItems)],ActivityHistoryTimeline.prototype,"historyGroups",2),__decorateClass$j([connectedProperty(isAnyCollectionLoadingWithoutAnyLoaded)],ActivityHistoryTimeline.prototype,"isAnyCollectionLoadingWithoutAnyLoaded",2),__decorateClass$j([connectedProperty(isSomeCollectionLoadedAndOtherLoading)],ActivityHistoryTimeline.prototype,"isSomeCollectionLoadedAndOtherLoading",2),__decorateClass$j([connectedProperty(activityHistorySearchStringSelector)],ActivityHistoryTimeline.prototype,"searchString",2),ActivityHistoryTimeline=__decorateClass$j([t$j("activity-history-timeline")],ActivityHistoryTimeline);/**
|
|
395
392
|
* @license
|