aiware-js 2.12.0 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +1 -1
- package/js-core.esm.js +10 -10
- package/js-core.esm11.js +1 -1
- package/js-core.esm14.js +1 -1
- package/js-core.esm15.js +22 -1
- package/js-core.esm16.js +1 -22
- package/js-core.esm17.js +595 -1
- package/js-core.esm18.js +1 -595
- package/js-core.esm19.js +1 -1
- package/js-core.esm2.js +1 -1
- package/js-core.esm20.js +1 -1
- package/js-core.esm21.js +1 -1
- package/js-core.esm23.js +1 -1
- package/js-core.esm24.js +1 -1
- package/js-core.esm25.js +1 -1
- package/js-core.esm27.js +2 -2
- package/js-core.esm28.js +5 -5
- package/js-core.esm29.js +1 -1
- package/js-core.esm30.js +1 -1
- package/js-core.esm31.js +1 -1
- package/js-core.esm32.js +1 -1
- package/js-core.esm33.js +1 -14
- package/js-core.esm34.js +14 -12
- package/js-core.esm35.js +12 -54
- package/js-core.esm36.js +54 -1
- package/js-core.esm37.js +1 -88
- package/js-core.esm38.js +71 -209
- package/js-core.esm39.js +202 -12
- package/js-core.esm40.js +35 -1
- package/js-core.esm41.js +1 -1
- package/js-core.esm42.js +1 -1
- package/js-core.esm43.js +1 -1
- package/js-core.esm44.js +1 -31
- package/js-core.esm45.js +31 -1
- package/js-core.esm46.js +1 -1
- package/js-core.esm47.js +1 -1
- package/js-core.esm48.js +1 -0
- package/js-core.esm6.js +2 -2
- package/js-core.esm7.js +3 -3
- package/js-core.umd.css +92 -92
- package/js-core.umd.js +113 -96
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +2 -2
package/js-core.esm7.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aI as __rest,aJ as invariant,r as react,aK as __assign,aL as useIntl,aM as createAction,aN as createReducer,as as all,au as takeLatest$1,aw as takeEvery$1,aE as select,aF as graphEndpointSelector,a9 as sessionTokenSelector,aB as call,az as put,ax as take,at as fork,aO as delay,a8 as userSelector,aP as configSelector,aQ as eventChannel,aR as gql,aS as createApolloWs,aT as createApolloClient,aU as fetchUserSuccess,aV as cancel,aH as baseGraphQLApi,p as createSvgIcon,q as interopRequireDefault,j as jsxRuntime,aW as createSvgIcon$1,aX as createSelector,aY as img$D,aZ as img$1c,a_ as img$1a,a$ as img$1b,b0 as img$C,b1 as img$B,b2 as img$A,m as makeStyles,G as useDispatch,H as useSelector,A as AIWareIntlProvider,b3 as Notifications,T as Typography,F as FormattedMessage,ar as Button,b4 as img$1i,b5 as img$1h,b6 as img$1g,b7 as img$1e,b8 as img$1f,b9 as img$1d,ba as NotificationFlag,Q as lib,bb as CircularProgress,bc as Filter,bd as Email,be as HelpCenter,bf as Banner,a6 as Divider,bg as FormControl,bh as Box,a3 as List,bi as img$E,bj as unmountPanel,L as mountPanel,a4 as ListItem,W as classNames,bk as ListItemAvatar,Z as Avatar,a5 as ListItemText,bl as img$1n,bm as img$1m,bn as img$1l,bo as TableContainer,bp as Table,bq as TableHead,br as TableRow,bs as TableCell,bt as TableBody,bu as Icon,bv as img$1k,bw as img$1j}from"./js-core.esm.js";import{R as RadioGroup,a as Radio}from"./js-core.esm10.js";import{F as FormControlLabel}from"./js-core.esm11.js";import{S as Switch}from"./js-core.esm4.js";import{C as Checkbox}from"./js-core.esm12.js";var MINUTE=60,HOUR=3600,DAY=86400;function selectUnit(e){e=Math.abs(e);return e<MINUTE?"second":e<HOUR?"minute":e<DAY?"hour":"day"}function getDurationInSeconds(e){switch(e){case"second":return 1;case"minute":return MINUTE;case"hour":return HOUR;default:return DAY}}function valueToSeconds(e,t){if(!e)return 0;switch(t){case"second":return e;case"minute":return e*MINUTE;default:return e*HOUR}}var INCREMENTABLE_UNITS=["second","minute","hour"];function canIncrement(e){return-1<INCREMENTABLE_UNITS.indexOf(e=void 0===e?"second":e)}var SimpleFormattedRelativeTime=function(e){var t=useIntl(),n=t.formatRelativeTime,t=t.textComponent,i=e.children,n=n(e.value||0,e.unit,__rest(e,["children","value","unit"]));return"function"==typeof i?i(n):t?react.exports.createElement(t,null,n):react.exports.createElement(react.exports.Fragment,null,n)},FormattedRelativeTime=function(e){var a,t=e.value,o=e.unit,r=e.updateIntervalInSeconds,e=__rest(e,["value","unit","updateIntervalInSeconds"]),n=(invariant(!r||!(!r||!canIncrement(o)),"Cannot schedule update with unit longer than hour"),react.exports.useState()),i=n[0],n=n[1],s=react.exports.useState(0),l=s[0],s=s[1],c=react.exports.useState(0),u=c[0],d=c[1],c=(o===i&&t===l||(s(t||0),n(o),d(canIncrement(o)?valueToSeconds(t,o):0)),react.exports.useEffect(function(){function e(){clearTimeout(a)}if(e(),!r||!canIncrement(o))return e;var t=u-r,n=selectUnit(t);if("day"===n)return e;var n=getDurationInSeconds(n),t=t-t%n,i=u<=t?t-n:t,n=Math.abs(i-u);return u!==i&&(a=setTimeout(function(){return d(i)},1e3*n)),e},[u,r,o]),t||0),i=o;return canIncrement(o)&&"number"==typeof u&&r&&(l=getDurationInSeconds(i=selectUnit(u)),c=Math.round(u/l)),react.exports.createElement(SimpleFormattedRelativeTime,__assign({value:c,unit:i},e))},FormattedRelativeTime$1=(FormattedRelativeTime.displayName="FormattedRelativeTime",FormattedRelativeTime.defaultProps={value:0,unit:"second"},FormattedRelativeTime);!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const nameSpace$1="mailbox",mailboxIdSelector=e=>{return null==(e=e[nameSpace$1])?void 0:e.mailBoxIds},unseenNotificationSelector=e=>{const t=null==(e=null==e?void 0:e[nameSpace$1])?void 0:e.mailbox;return null===t||void 0===t?void 0:t.reduce((e,t)=>e+t.unseenCount,0)},panelSelector=e=>e.panels||[],SUBSCRIBER_MAILBOX=nameSpace$1+"/SUBSCRIBER_MAILBOX",SUBSCRIBER_MAILBOX_START=nameSpace$1+"/SUBSCRIBER_MAILBOX_START",UPDATE_MAILBOX_DATA=nameSpace$1+"/UPDATE_MAILBOX_DATA",SUBSCRIBING_MAILBOX=nameSpace$1+"/SUBSCRIBING_MAILBOX",SUBSCRIBER_MAILBOX_SUCCESS=nameSpace$1+"/SUBSCRIBER_MAILBOX_SUCCESS",SUBSCRIBER_MAILBOX_ERROR=nameSpace$1+"/SUBSCRIBER_MAILBOX_ERROR",UPDATE_UNSEEN_COUNT=nameSpace$1+"/UPDATE_UNSEEN_COUNT",MARK_ALL_NOTIFICATIONS_SEEN=nameSpace$1+"/MARK_ALL_NOTIFICATIONS_SEEN",MARK_ALL_NOTIFICATIONS_SEEN_REQUEST=nameSpace$1+"/MARK_ALL_NOTIFICATIONS_SEEN_REQUEST",MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS=nameSpace$1+"/MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS",MARK_ALL_NOTIFICATIONS_SEEN_FAIL=nameSpace$1+"/MARK_ALL_NOTIFICATIONS_SEEN_FAIL",SUBSCRIBE_DEFAULT_MAILBOX_REQUEST=nameSpace$1+"/SUBSCRIBE_DEFAULT_MAILBOX_REQUEST",PUSH_NOTIFICATION=nameSpace$1+"/PUSH_NOTIFICATION",PUSH_DEFAULT_MAILBOX=nameSpace$1+"/PUSH_DEFAULT_MAILBOX",requestSubscriber=createAction(SUBSCRIBER_MAILBOX),subscriberStart=createAction(SUBSCRIBER_MAILBOX_START),setMailboxData=createAction(UPDATE_MAILBOX_DATA,function(e){return{payload:e}}),subscriberSuccess=createAction(SUBSCRIBER_MAILBOX_SUCCESS,function(e){return{payload:e}}),subscriberError=createAction(SUBSCRIBER_MAILBOX_ERROR,function(e){return{payload:e}}),subscribing=createAction(SUBSCRIBING_MAILBOX),pushNotification=createAction(PUSH_NOTIFICATION,function(e){return{payload:e}}),pushDefaultMailBox=createAction(PUSH_DEFAULT_MAILBOX,function(e){return{payload:e}}),updateUnseenCount=createAction(UPDATE_UNSEEN_COUNT,function(e){return{payload:e}}),markAllNotificationsSeenRequest=createAction(MARK_ALL_NOTIFICATIONS_SEEN_REQUEST),markAllNotificationsSeenSuccess=createAction(MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS),markAllNotificationsSeenFail=createAction(MARK_ALL_NOTIFICATIONS_SEEN_FAIL),subscribeDefaultMailboxRequest=createAction(SUBSCRIBE_DEFAULT_MAILBOX_REQUEST),initialState$1={mailBoxIds:[],mailbox:[],status:"idle",failureMessage:""},mailboxReducer=createReducer(initialState$1,e=>{e.addCase(subscriberStart,e=>Object.assign(Object.assign({},e),{status:"loading"})).addCase(subscriberSuccess,e=>Object.assign(Object.assign({},e),{status:"subscribing"})).addCase(setMailboxData,(e,t)=>Object.assign(Object.assign({},e),{mailbox:[...t.payload],mailBoxIds:[...t.payload.map(e=>e.id)]})).addCase(subscriberError,(e,t)=>Object.assign(Object.assign({},e),{status:"failure",failureMessage:t.payload})).addCase(updateUnseenCount,(e,n)=>Object.assign(Object.assign({},e),{mailbox:e.mailbox.map(t=>{var e;return Object.assign(Object.assign({},t),{unseenCount:null==(e=null==(e=n.payload.notificationMailboxes)?void 0:e.find(e=>e.id===t.id))?void 0:e.unseenCount})})})).addCase(markAllNotificationsSeenRequest,e=>Object.assign({},e)).addCase(markAllNotificationsSeenSuccess,e=>Object.assign(Object.assign({},e),{mailbox:e.mailbox.map(e=>Object.assign(Object.assign({},e),{unseenCount:0}))})).addCase(markAllNotificationsSeenFail,e=>Object.assign(Object.assign({},e),{status:"failure"}))});function __awaiter$1(e,r,s,l){return new(s=s||Promise)(function(n,t){function i(e){try{o(l.next(e))}catch(e){t(e)}}function a(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(i,a)}o((l=l.apply(e,r||[])).next())})}const getMailboxApi=(e,t)=>__awaiter$1(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`
|
|
1
|
+
import{aI as __rest,aJ as invariant,r as react,aK as __assign,aL as useIntl,aM as createAction,aN as createReducer,as as all,au as takeLatest$1,aw as takeEvery$1,aE as select,aF as graphEndpointSelector,a9 as sessionTokenSelector,aB as call,az as put,ax as take,at as fork,aO as delay,a8 as userSelector,aP as configSelector,aQ as eventChannel,aR as gql,aS as createApolloWs,aT as createApolloClient,aU as fetchUserSuccess,aV as cancel,aH as baseGraphQLApi,p as createSvgIcon,q as interopRequireDefault,j as jsxRuntime,aW as createSvgIcon$1,aX as createSelector,aY as img$D,aZ as img$1c,a_ as img$1a,a$ as img$1b,b0 as img$C,b1 as img$B,b2 as img$A,m as makeStyles,G as useDispatch,H as useSelector,A as AIWareIntlProvider,b3 as Notifications,T as Typography$1,F as FormattedMessage,ar as Button,b4 as img$1i,b5 as img$1h,b6 as img$1g,b7 as img$1e,b8 as img$1f,b9 as img$1d,ba as NotificationFlag,Q as lib,bb as CircularProgress,bc as Filter,bd as Email,be as HelpCenter,bf as Banner,a6 as Divider,bg as FormControl,bh as Box$1,a3 as List,bi as img$E,bj as unmountPanel,L as mountPanel,a4 as ListItem,W as classNames,bk as ListItemAvatar,Z as Avatar,a5 as ListItemText,bl as img$1n,bm as img$1m,bn as img$1l,bo as TableContainer,bp as Table,bq as TableHead,br as TableRow,bs as TableCell,bt as TableBody,bu as Icon,bv as img$1k,bw as img$1j}from"./js-core.esm.js";import{R as RadioGroup,a as Radio}from"./js-core.esm10.js";import{F as FormControlLabel$1}from"./js-core.esm11.js";import{S as Switch}from"./js-core.esm4.js";import{C as Checkbox}from"./js-core.esm12.js";var MINUTE=60,HOUR=3600,DAY=86400;function selectUnit(e){e=Math.abs(e);return e<MINUTE?"second":e<HOUR?"minute":e<DAY?"hour":"day"}function getDurationInSeconds(e){switch(e){case"second":return 1;case"minute":return MINUTE;case"hour":return HOUR;default:return DAY}}function valueToSeconds(e,t){if(!e)return 0;switch(t){case"second":return e;case"minute":return e*MINUTE;default:return e*HOUR}}var INCREMENTABLE_UNITS=["second","minute","hour"];function canIncrement(e){return-1<INCREMENTABLE_UNITS.indexOf(e=void 0===e?"second":e)}var SimpleFormattedRelativeTime=function(e){var t=useIntl(),n=t.formatRelativeTime,t=t.textComponent,i=e.children,n=n(e.value||0,e.unit,__rest(e,["children","value","unit"]));return"function"==typeof i?i(n):t?react.exports.createElement(t,null,n):react.exports.createElement(react.exports.Fragment,null,n)},FormattedRelativeTime=function(e){var a,t=e.value,o=e.unit,r=e.updateIntervalInSeconds,e=__rest(e,["value","unit","updateIntervalInSeconds"]),n=(invariant(!r||!(!r||!canIncrement(o)),"Cannot schedule update with unit longer than hour"),react.exports.useState()),i=n[0],n=n[1],s=react.exports.useState(0),l=s[0],s=s[1],c=react.exports.useState(0),u=c[0],d=c[1],c=(o===i&&t===l||(s(t||0),n(o),d(canIncrement(o)?valueToSeconds(t,o):0)),react.exports.useEffect(function(){function e(){clearTimeout(a)}if(e(),!r||!canIncrement(o))return e;var t=u-r,n=selectUnit(t);if("day"===n)return e;var n=getDurationInSeconds(n),t=t-t%n,i=u<=t?t-n:t,n=Math.abs(i-u);return u!==i&&(a=setTimeout(function(){return d(i)},1e3*n)),e},[u,r,o]),t||0),i=o;return canIncrement(o)&&"number"==typeof u&&r&&(l=getDurationInSeconds(i=selectUnit(u)),c=Math.round(u/l)),react.exports.createElement(SimpleFormattedRelativeTime,__assign({value:c,unit:i},e))},FormattedRelativeTime$1=(FormattedRelativeTime.displayName="FormattedRelativeTime",FormattedRelativeTime.defaultProps={value:0,unit:"second"},FormattedRelativeTime);!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const nameSpace$1="mailbox",mailboxIdSelector=e=>{return null==(e=e[nameSpace$1])?void 0:e.mailBoxIds},unseenNotificationSelector=e=>{const t=null==(e=null==e?void 0:e[nameSpace$1])?void 0:e.mailbox;return null===t||void 0===t?void 0:t.reduce((e,t)=>e+t.unseenCount,0)},panelSelector=e=>e.panels||[],SUBSCRIBER_MAILBOX=nameSpace$1+"/SUBSCRIBER_MAILBOX",SUBSCRIBER_MAILBOX_START=nameSpace$1+"/SUBSCRIBER_MAILBOX_START",UPDATE_MAILBOX_DATA=nameSpace$1+"/UPDATE_MAILBOX_DATA",SUBSCRIBING_MAILBOX=nameSpace$1+"/SUBSCRIBING_MAILBOX",SUBSCRIBER_MAILBOX_SUCCESS=nameSpace$1+"/SUBSCRIBER_MAILBOX_SUCCESS",SUBSCRIBER_MAILBOX_ERROR=nameSpace$1+"/SUBSCRIBER_MAILBOX_ERROR",UPDATE_UNSEEN_COUNT=nameSpace$1+"/UPDATE_UNSEEN_COUNT",MARK_ALL_NOTIFICATIONS_SEEN=nameSpace$1+"/MARK_ALL_NOTIFICATIONS_SEEN",MARK_ALL_NOTIFICATIONS_SEEN_REQUEST=nameSpace$1+"/MARK_ALL_NOTIFICATIONS_SEEN_REQUEST",MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS=nameSpace$1+"/MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS",MARK_ALL_NOTIFICATIONS_SEEN_FAIL=nameSpace$1+"/MARK_ALL_NOTIFICATIONS_SEEN_FAIL",SUBSCRIBE_DEFAULT_MAILBOX_REQUEST=nameSpace$1+"/SUBSCRIBE_DEFAULT_MAILBOX_REQUEST",PUSH_NOTIFICATION=nameSpace$1+"/PUSH_NOTIFICATION",PUSH_DEFAULT_MAILBOX=nameSpace$1+"/PUSH_DEFAULT_MAILBOX",requestSubscriber=createAction(SUBSCRIBER_MAILBOX),subscriberStart=createAction(SUBSCRIBER_MAILBOX_START),setMailboxData=createAction(UPDATE_MAILBOX_DATA,function(e){return{payload:e}}),subscriberSuccess=createAction(SUBSCRIBER_MAILBOX_SUCCESS,function(e){return{payload:e}}),subscriberError=createAction(SUBSCRIBER_MAILBOX_ERROR,function(e){return{payload:e}}),subscribing=createAction(SUBSCRIBING_MAILBOX),pushNotification=createAction(PUSH_NOTIFICATION,function(e){return{payload:e}}),pushDefaultMailBox=createAction(PUSH_DEFAULT_MAILBOX,function(e){return{payload:e}}),updateUnseenCount=createAction(UPDATE_UNSEEN_COUNT,function(e){return{payload:e}}),markAllNotificationsSeenRequest=createAction(MARK_ALL_NOTIFICATIONS_SEEN_REQUEST),markAllNotificationsSeenSuccess=createAction(MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS),markAllNotificationsSeenFail=createAction(MARK_ALL_NOTIFICATIONS_SEEN_FAIL),subscribeDefaultMailboxRequest=createAction(SUBSCRIBE_DEFAULT_MAILBOX_REQUEST),initialState$1={mailBoxIds:[],mailbox:[],status:"idle",failureMessage:""},mailboxReducer=createReducer(initialState$1,e=>{e.addCase(subscriberStart,e=>Object.assign(Object.assign({},e),{status:"loading"})).addCase(subscriberSuccess,e=>Object.assign(Object.assign({},e),{status:"subscribing"})).addCase(setMailboxData,(e,t)=>Object.assign(Object.assign({},e),{mailbox:[...t.payload],mailBoxIds:[...t.payload.map(e=>e.id)]})).addCase(subscriberError,(e,t)=>Object.assign(Object.assign({},e),{status:"failure",failureMessage:t.payload})).addCase(updateUnseenCount,(e,n)=>Object.assign(Object.assign({},e),{mailbox:e.mailbox.map(t=>{var e;return Object.assign(Object.assign({},t),{unseenCount:null==(e=null==(e=n.payload.notificationMailboxes)?void 0:e.find(e=>e.id===t.id))?void 0:e.unseenCount})})})).addCase(markAllNotificationsSeenRequest,e=>Object.assign({},e)).addCase(markAllNotificationsSeenSuccess,e=>Object.assign(Object.assign({},e),{mailbox:e.mailbox.map(e=>Object.assign(Object.assign({},e),{unseenCount:0}))})).addCase(markAllNotificationsSeenFail,e=>Object.assign(Object.assign({},e),{status:"failure"}))});function __awaiter$1(e,r,s,l){return new(s=s||Promise)(function(n,t){function i(e){try{o(l.next(e))}catch(e){t(e)}}function a(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(i,a)}o((l=l.apply(e,r||[])).next())})}const getMailboxApi=(e,t)=>__awaiter$1(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`
|
|
2
2
|
{
|
|
3
3
|
notificationMailboxes {
|
|
4
4
|
id
|
|
@@ -70,7 +70,7 @@ import{aI as __rest,aJ as invariant,r as react,aK as __assign,aL as useIntl,aM a
|
|
|
70
70
|
title
|
|
71
71
|
contentType
|
|
72
72
|
}
|
|
73
|
-
}`,o),t=createApolloWs(s,r,o);const n=createApolloClient(t),a=n.subscribe({query:e}).subscribe({next(e){var t,n;"json"!==(null==(t=null==(t=null==e?void 0:e.data)?void 0:t.notificationPosted)?void 0:t.contentType)&&({title:t,body:n}=e.data.notificationPosted,t===MARK_ALL_NOTIFICATIONS_SEEN&&n===o?i(markAllNotificationsSeenSuccess()):i(pushDefaultMailBox(e.data.notificationPosted)))}});return()=>{a.unsubscribe(),n.stop()}})}function*websocketSagas(){subscriptionTask&&(yield cancel(subscriptionTask)),subscriptionTask=yield fork(function*(){for(var e=yield call(websocketInitChannel);;){var t=yield take(e);yield put(t)}})}function*defaultMailboxSagas(){mailboxSubscription&&(yield cancel(mailboxSubscription)),mailboxSubscription=yield fork(function*(){for(var e=yield call(defaultMailboxChannel);;){var t=yield take(e);yield put(t)}})}function*updateMailboxSetting(){yield websocketSagas()}function*updateUnseenCountSaga(e){var t,n=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);const a=yield select(panelSelector);var o=a.find(e=>e.panelId===notificationPanelId);try{o&&(yield delay(1e3),yield markAllNotificationsSeenSaga()),yield delay(2e3);var r=yield call(getUnseenCountApi,n,i),s=e.payload["mailboxId"];yield put(updateUnseenCount({notificationMailboxes:null==(t=null==r?void 0:r.data)?void 0:t.notificationMailboxes,mailboxId:s}))}catch(e){yield put(markAllNotificationsSeenFail())}}function*markAllNotificationsSeenSaga(){var e=yield select(mailboxIdSelector),t=(yield select(userSelector))["userId"],n=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);if(0<(null==e?void 0:e.length))try{(yield call(handleMarkAllNotificationsSeen,e,n,i)).error?yield put(markAllNotificationsSeenFail()):(yield put(markAllNotificationsSeenSuccess()),yield call(pushDefaultMailboxNotification,t,MARK_ALL_NOTIFICATIONS_SEEN,n,i))}catch(e){yield put(markAllNotificationsSeenFail())}}function*mailboxSaga(){yield all([takeLatest$1(requestSubscriber.type,subscriberSaga),takeLatest$1(setMailboxData.type,websocketSagas),takeLatest$1("UPDATE_MAILBOX_SETTING",updateMailboxSetting),takeEvery$1(pushNotification.type,updateUnseenCountSaga),takeEvery$1(subscribeDefaultMailboxRequest.type,defaultMailboxSagas),takeLatest$1(markAllNotificationsSeenRequest.type,markAllNotificationsSeenSaga)])}function getNotificationModule$1(){return{id:"mailbox-subscription",reducerMap:{[nameSpace$1]:mailboxReducer},sagas:[mailboxSaga],initialActions:[requestSubscriber(),subscribeDefaultMailboxRequest()]}}var FiberManualRecord={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(FiberManualRecord,"__esModule",{value:!0}),FiberManualRecord.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),default_1$1=FiberManualRecord.default=_default$1,RadioButtonUnchecked={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(RadioButtonUnchecked,"__esModule",{value:!0}),RadioButtonUnchecked.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),default_1=RadioButtonUnchecked.default=_default,CheckCircle=createSvgIcon$1(jsxRuntime.exports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const nameSpace="osNotificationPanel",mailbox="mailbox",mailBoxSelector=e=>null!=e&&e[mailbox]?null==e?void 0:e[mailbox]:{},notificationSelector=e=>null!=e&&e[nameSpace]?e[nameSpace]:{},notificationSettingSelector=e=>{var t;return null!=(t=null==e?void 0:e[nameSpace])&&t.settings?null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings:{}},notificationUtilitiesSelector=e=>{var t;return null!=(t=null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings)&&t.utility?null==(e=null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings)?void 0:e.utility:[]},notificationApplicationsSelector=e=>{var t;return null!=(t=null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings)&&t.application?null==(e=null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings)?void 0:e.application:{}},notificationApplicationSelector=n=>e=>{var t;return null!=(t=null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings)&&t.application.byId[n]?null==(e=null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings)?void 0:e.application.byId[n]:{}},notificationListSelector=e=>{return(null==(e=null==e?void 0:e[nameSpace])?void 0:e.notifications)||[]},filterSelector=e=>{return null==(e=null==e?void 0:e[nameSpace])?void 0:e.filter},applicationFilterSelector=e=>{const t=(null==(e=null==e?void 0:e.mailbox)?void 0:e.mailbox)||[];return t.map(e=>{var t;return{value:(null==(t=null==e?void 0:e.application)?void 0:t.applicationId)||"",title:(null==(t=null==e?void 0:e.application)?void 0:t.name)||""}}).filter((t,e,n)=>{return e===n.findIndex(e=>e.value===t.value)})},notificationDetailSelector=n=>e=>{const t=null==(e=null==e?void 0:e[nameSpace])?void 0:e.notifications;return t.find(e=>e.id===n)},notificationWithFilterSelector=createSelector(filterSelector,notificationListSelector,(t,e)=>e.filter(e=>"all"===t||e.appId===t));var luxon={};function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);t=new(Function.bind.apply(e,i));return n&&_setPrototypeOf(t,n.prototype),t}).apply(null,arguments)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(t,e)})(e)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};for(var n,i={},a=Object.keys(e),o=0;o<a.length;o++)n=a[o],0<=t.indexOf(n)||(i[n]=e[n]);return i}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _createForOfIteratorHelperLoose(e){var t=0;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(t=e[Symbol.iterator]()).next.bind(t);if(Array.isArray(e)||(e=_unsupportedIterableToArray(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(luxon,"__esModule",{value:!0});var LuxonError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(_wrapNativeSuper(Error)),InvalidDateTimeError=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidIntervalError=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidDurationError=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),ConflictingSpecificationError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),InvalidUnitError=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidArgumentError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),ZoneIsAbstractError=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return _inheritsLoose(t,e),t}(LuxonError),n="numeric",s="short",l="long",DATE_SHORT={year:n,month:n,day:n},DATE_MED={year:n,month:s,day:n},DATE_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s},DATE_FULL={year:n,month:l,day:n},DATE_HUGE={year:n,month:l,day:n,weekday:l},TIME_SIMPLE={hour:n,minute:n},TIME_WITH_SECONDS={hour:n,minute:n,second:n},TIME_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,timeZoneName:s},TIME_WITH_LONG_OFFSET={hour:n,minute:n,second:n,timeZoneName:l},TIME_24_SIMPLE={hour:n,minute:n,hour12:!1},TIME_24_WITH_SECONDS={hour:n,minute:n,second:n,hour12:!1},TIME_24_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:s},TIME_24_WITH_LONG_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:l},DATETIME_SHORT={year:n,month:n,day:n,hour:n,minute:n},DATETIME_SHORT_WITH_SECONDS={year:n,month:n,day:n,hour:n,minute:n,second:n},DATETIME_MED={year:n,month:s,day:n,hour:n,minute:n},DATETIME_MED_WITH_SECONDS={year:n,month:s,day:n,hour:n,minute:n,second:n},DATETIME_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s,hour:n,minute:n},DATETIME_FULL={year:n,month:l,day:n,hour:n,minute:n,timeZoneName:s},DATETIME_FULL_WITH_SECONDS={year:n,month:l,day:n,hour:n,minute:n,second:n,timeZoneName:s},DATETIME_HUGE={year:n,month:l,day:n,weekday:l,hour:n,minute:n,timeZoneName:l},DATETIME_HUGE_WITH_SECONDS={year:n,month:l,day:n,weekday:l,hour:n,minute:n,second:n,timeZoneName:l};function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e}function isInteger(e){return"number"==typeof e&&e%1==0}function isString(e){return"string"==typeof e}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}function hasIntl(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function hasFormatToParts(){return!isUndefined(Intl.DateTimeFormat.prototype.formatToParts)}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function maybeArray(e){return Array.isArray(e)?e:[e]}function bestBy(e,n,i){if(0!==e.length)return e.reduce(function(e,t){t=[n(t),t];return e&&i(e[0],t[0])===e[0]?e:t},null)[1]}function pick(n,e){return e.reduce(function(e,t){return e[t]=n[t],e},{})}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function integerBetween(e,t,n){return isInteger(e)&&t<=e&&e<=n}function floorMod(e,t){return e-t*Math.floor(e/t)}function padStart(e,t){void 0===t&&(t=2);var n=e<0?"-":"",e=n?-1*e:e,t=e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString();return n+t}function parseInteger(e){if(!isUndefined(e)&&null!==e&&""!==e)return parseInt(e,10)}function parseMillis(e){if(!isUndefined(e)&&null!==e&&""!==e)return e=1e3*parseFloat("0."+e),Math.floor(e)}function roundTo(e,t,n){void 0===n&&(n=!1);t=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*t)/t}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){var n=floorMod(t-1,12)+1;return 2===n?isLeapYear(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function objToLocalTS(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function weeksInWeekYear(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,e=e-1,e=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4==t||3==e?53:52}function untruncateYear(e){return 99<e?e:60<e?1900+e:2e3+e}function parseZoneInfo(e,t,n,i){void 0===i&&(i=null);var a,e=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},i=(i&&(o.timeZone=i),Object.assign({timeZoneName:t},o)),t=hasIntl();return t&&hasFormatToParts()?(a=new Intl.DateTimeFormat(n,i).formatToParts(e).find(function(e){return"timezonename"===e.type.toLowerCase()}))?a.value:null:t?(a=new Intl.DateTimeFormat(n,o).format(e),new Intl.DateTimeFormat(n,i).format(e).substring(a.length).replace(/^[, \u200e]+/,"")):null}function signedOffset(e,t){e=parseInt(e,10),Number.isNaN(e)&&(e=0),t=parseInt(t,10)||0;return 60*e+(e<0||Object.is(e,-0)?-t:t)}function asNumber(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new InvalidArgumentError("Invalid unit value "+e);return t}function normalizeObject(e,t,n){var i,a,o={};for(i in e)!hasOwnProperty(e,i)||0<=n.indexOf(i)||null!=(a=e[i])&&(o[t(i)]=asNumber(a));return o}function formatOffset(e,t){var n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),a=0<=e?"+":"-";switch(t){case"short":return a+padStart(n,2)+":"+padStart(i,2);case"narrow":return a+n+(0<i?":"+i:"");case"techie":return a+padStart(n,2)+padStart(i,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function timeObject(e){return pick(e,["hour","minute","second","millisecond"])}var ianaRegex=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function stringify(e){return JSON.stringify(e,Object.keys(e).sort())}var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsNarrow=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[].concat(monthsNarrow);case"short":return[].concat(monthsShort);case"long":return[].concat(monthsLong);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var weekdaysLong=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekdaysShort=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],weekdaysNarrow=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[].concat(weekdaysNarrow);case"short":return[].concat(weekdaysShort);case"long":return[].concat(weekdaysLong);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var meridiems=["AM","PM"],erasLong=["Before Christ","Anno Domini"],erasShort=["BC","AD"],erasNarrow=["B","A"];function eras(e){switch(e){case"narrow":return[].concat(erasNarrow);case"short":return[].concat(erasShort);case"long":return[].concat(erasLong);default:return null}}function meridiemForDateTime(e){return meridiems[e.hour<12?0:1]}function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}function monthForDateTime(e,t){return months(t)[e.month-1]}function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}function formatRelativeTime(e,t,n,i){void 0===n&&(n="always"),void 0===i&&(i=!1);var a={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var r="days"===e;switch(t){case 1:return r?"tomorrow":"next "+a[e][0];case-1:return r?"yesterday":"last "+a[e][0];case 0:return r?"today":"this "+a[e][0]}}var n=Object.is(t,-0)||t<0,o=Math.abs(t),t=1===o,s=a[e],i=i?!t&&s[2]||s[1]:t?a[e][0]:e;return n?o+" "+i+" ago":"in "+o+" "+i}function formatString(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(stringify(pick(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case stringify(DATE_SHORT):return"M/d/yyyy";case stringify(DATE_MED):return"LLL d, yyyy";case stringify(DATE_MED_WITH_WEEKDAY):return"EEE, LLL d, yyyy";case stringify(DATE_FULL):return"LLLL d, yyyy";case stringify(DATE_HUGE):return"EEEE, LLLL d, yyyy";case stringify(TIME_SIMPLE):return"h:mm a";case stringify(TIME_WITH_SECONDS):return"h:mm:ss a";case stringify(TIME_WITH_SHORT_OFFSET):case stringify(TIME_WITH_LONG_OFFSET):return"h:mm a";case stringify(TIME_24_SIMPLE):return"HH:mm";case stringify(TIME_24_WITH_SECONDS):return"HH:mm:ss";case stringify(TIME_24_WITH_SHORT_OFFSET):case stringify(TIME_24_WITH_LONG_OFFSET):return"HH:mm";case stringify(DATETIME_SHORT):return"M/d/yyyy, h:mm a";case stringify(DATETIME_MED):return"LLL d, yyyy, h:mm a";case stringify(DATETIME_FULL):return"LLLL d, yyyy, h:mm a";case stringify(DATETIME_HUGE):return t;case stringify(DATETIME_SHORT_WITH_SECONDS):return"M/d/yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_SECONDS):return"LLL d, yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_WEEKDAY):return"EEE, d LLL yyyy, h:mm a";case stringify(DATETIME_FULL_WITH_SECONDS):return"LLLL d, yyyy, h:mm:ss a";case stringify(DATETIME_HUGE_WITH_SECONDS):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}function stringifyTokens(e,t){for(var n="",i=_createForOfIteratorHelperLoose(e);!(a=i()).done;){var a=a.value;a.literal?n+=a.val:n+=t(a.val)}return n}var _macroTokenToFormatOpts={D:DATE_SHORT,DD:DATE_MED,DDD:DATE_FULL,DDDD:DATE_HUGE,t:TIME_SIMPLE,tt:TIME_WITH_SECONDS,ttt:TIME_WITH_SHORT_OFFSET,tttt:TIME_WITH_LONG_OFFSET,T:TIME_24_SIMPLE,TT:TIME_24_WITH_SECONDS,TTT:TIME_24_WITH_SHORT_OFFSET,TTTT:TIME_24_WITH_LONG_OFFSET,f:DATETIME_SHORT,ff:DATETIME_MED,fff:DATETIME_FULL,ffff:DATETIME_HUGE,F:DATETIME_SHORT_WITH_SECONDS,FF:DATETIME_MED_WITH_SECONDS,FFF:DATETIME_FULL_WITH_SECONDS,FFFF:DATETIME_HUGE_WITH_SECONDS},Formatter=function(){function f(e,t){this.opts=t,this.loc=e,this.systemLoc=null}f.create=function(e,t){return new f(e,t=void 0===t?{}:t)},f.parseFormat=function(e){for(var t=null,n="",i=!1,a=[],o=0;o<e.length;o++){var r=e.charAt(o);"'"===r?(0<n.length&&a.push({literal:i,val:n}),t=null,n="",i=!i):i||r===t?n+=r:(0<n.length&&a.push({literal:!1,val:n}),t=n=r)}return 0<n.length&&a.push({literal:i,val:n}),a},f.macroTokenToFormatOpts=function(e){return _macroTokenToFormatOpts[e]};var e=f.prototype;return e.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},e.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},e.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return padStart(e,t);var n=Object.assign({},this.opts);return 0<t&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},e.formatDateTimeFromString=function(n,e){var i=this,a="en"===this.loc.listingMode(),t=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&hasFormatToParts(),o=function(e,t){return i.loc.extract(n,e,t)},r=function(e){return n.isOffsetFixed&&0===n.offset&&e.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,e.format):""},s=function(){return a?meridiemForDateTime(n):o({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,t){return a?monthForDateTime(n,e):o(t?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,t){return a?weekdayForDateTime(n,e):o(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},u=function(e){var t=f.macroTokenToFormatOpts(e);return t?i.formatWithSystemDefault(n,t):e},d=function(e){return a?eraForDateTime(n,e):o({era:e},"era")};return stringifyTokens(f.parseFormat(e),function(e){switch(e){case"S":return i.num(n.millisecond);case"u":case"SSS":return i.num(n.millisecond,3);case"s":return i.num(n.second);case"ss":return i.num(n.second,2);case"m":return i.num(n.minute);case"mm":return i.num(n.minute,2);case"h":return i.num(n.hour%12==0?12:n.hour%12);case"hh":return i.num(n.hour%12==0?12:n.hour%12,2);case"H":return i.num(n.hour);case"HH":return i.num(n.hour,2);case"Z":return r({format:"narrow",allowZ:i.opts.allowZ});case"ZZ":return r({format:"short",allowZ:i.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:i.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:i.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:i.loc.locale});case"z":return n.zoneName;case"a":return s();case"d":return t?o({day:"numeric"},"day"):i.num(n.day);case"dd":return t?o({day:"2-digit"},"day"):i.num(n.day,2);case"c":return i.num(n.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return i.num(n.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return t?o({month:"numeric",day:"numeric"},"month"):i.num(n.month);case"LL":return t?o({month:"2-digit",day:"numeric"},"month"):i.num(n.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return t?o({month:"numeric"},"month"):i.num(n.month);case"MM":return t?o({month:"2-digit"},"month"):i.num(n.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return t?o({year:"numeric"},"year"):i.num(n.year);case"yy":return t?o({year:"2-digit"},"year"):i.num(n.year.toString().slice(-2),2);case"yyyy":return t?o({year:"numeric"},"year"):i.num(n.year,4);case"yyyyyy":return t?o({year:"numeric"},"year"):i.num(n.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return i.num(n.weekYear.toString().slice(-2),2);case"kkkk":return i.num(n.weekYear,4);case"W":return i.num(n.weekNumber);case"WW":return i.num(n.weekNumber,2);case"o":return i.num(n.ordinal);case"ooo":return i.num(n.ordinal,3);case"q":return i.num(n.quarter);case"qq":return i.num(n.quarter,2);case"X":return i.num(Math.floor(n.ts/1e3));case"x":return i.num(n.ts);default:return u(e)}})},e.formatDurationFromString=function(e,t){var n,i=this,a=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},t=f.parseFormat(t),o=t.reduce(function(e,t){var n=t.literal,t=t.val;return n?e:e.concat(t)},[]),e=e.shiftTo.apply(e,o.map(a).filter(function(e){return e}));return stringifyTokens(t,(n=e,function(e){var t=a(e);return t?i.num(n.get(t),e.length):e}))},f}(),Invalid=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Zone=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new ZoneIsAbstractError},t.formatOffset=function(e,t){throw new ZoneIsAbstractError},t.offset=function(e){throw new ZoneIsAbstractError},t.equals=function(e){throw new ZoneIsAbstractError},_createClass(e,[{key:"type",get:function(){throw new ZoneIsAbstractError}},{key:"name",get:function(){throw new ZoneIsAbstractError}},{key:"universal",get:function(){throw new ZoneIsAbstractError}},{key:"isValid",get:function(){throw new ZoneIsAbstractError}}]),e}(),singleton=null,LocalZone=function(e){function t(){return e.apply(this,arguments)||this}_inheritsLoose(t,e);var n=t.prototype;return n.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale)},n.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},_createClass(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return hasIntl()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return singleton=null===singleton?new t:singleton}}]),t}(Zone),matchingRegex=RegExp("^"+ianaRegex.source+"$"),dtfCache={};function makeDTF(e){return dtfCache[e]||(dtfCache[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),dtfCache[e]}var typeToPos={year:0,month:1,day:2,hour:3,minute:4,second:5};function hackyOffset(e,t){var e=e.format(t).replace(/\u200E/g,""),t=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e),e=t[1],n=t[2];return[t[3],e,n,t[4],t[5],t[6]]}function partsOffset(e,t){for(var n=e.formatToParts(t),i=[],a=0;a<n.length;a++){var o=n[a],r=o.type,o=o.value,r=typeToPos[r];isUndefined(r)||(i[r]=parseInt(o,10))}return i}var ianaZoneCache={},IANAZone=function(n){function i(e){var t=n.call(this)||this;return t.zoneName=e,t.valid=i.isValidZone(e),t}_inheritsLoose(i,n),i.create=function(e){return ianaZoneCache[e]||(ianaZoneCache[e]=new i(e)),ianaZoneCache[e]},i.resetCache=function(){ianaZoneCache={},dtfCache={}},i.isValidSpecifier=function(e){return!(!e||!e.match(matchingRegex))},i.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},i.parseGMTOffset=function(e){if(e){e=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(e)return-60*parseInt(e[1])}return null};var e=i.prototype;return e.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale,this.name)},e.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},e.offset=function(e){e=new Date(e);if(isNaN(e))return NaN;var t=makeDTF(this.name),t=(t.formatToParts?partsOffset:hackyOffset)(t,e),n=t[0],i=t[1],a=t[2],o=t[3],e=+e,r=e%1e3;return(objToLocalTS({year:n,month:i,day:a,hour:24===o?0:o,minute:t[4],second:t[5],millisecond:0})-(e-=0<=r?r:1e3+r))/6e4},e.equals=function(e){return"iana"===e.type&&e.name===this.name},_createClass(i,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),i}(Zone),singleton$1=null,FixedOffsetZone=function(n){function t(e){var t=n.call(this)||this;return t.fixed=e,t}_inheritsLoose(t,n),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){e=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new t(signedOffset(e[1],e[2]))}return null},_createClass(t,null,[{key:"utcInstance",get:function(){return singleton$1=null===singleton$1?new t(0):singleton$1}}]);var e=t.prototype;return e.offsetName=function(){return this.name},e.formatOffset=function(e,t){return formatOffset(this.fixed,t)},e.offset=function(){return this.fixed},e.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},_createClass(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+formatOffset(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Zone),InvalidZone=function(n){function e(e){var t=n.call(this)||this;return t.zoneName=e,t}_inheritsLoose(e,n);var t=e.prototype;return t.offsetName=function(){return null},t.formatOffset=function(){return""},t.offset=function(){return NaN},t.equals=function(){return!1},_createClass(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(Zone);function normalizeZone(e,t){var n;return isUndefined(e)||null===e?t:e instanceof Zone?e:isString(e)?"local"===(n=e.toLowerCase())?t:"utc"===n||"gmt"===n?FixedOffsetZone.utcInstance:null!=(t=IANAZone.parseGMTOffset(e))?FixedOffsetZone.instance(t):IANAZone.isValidSpecifier(n)?IANAZone.create(e):FixedOffsetZone.parseSpecifier(n)||new InvalidZone(e):isNumber(e)?FixedOffsetZone.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new InvalidZone(e)}var now=function(){return Date.now()},defaultZone=null,defaultLocale=null,defaultNumberingSystem=null,defaultOutputCalendar=null,throwOnInvalid=!1,Settings=function(){function e(){}return e.resetCaches=function(){Locale.resetCache(),IANAZone.resetCache()},_createClass(e,null,[{key:"now",get:function(){return now},set:function(e){now=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){defaultZone=e?normalizeZone(e):null}},{key:"defaultZone",get:function(){return defaultZone||LocalZone.instance}},{key:"defaultLocale",get:function(){return defaultLocale},set:function(e){defaultLocale=e}},{key:"defaultNumberingSystem",get:function(){return defaultNumberingSystem},set:function(e){defaultNumberingSystem=e}},{key:"defaultOutputCalendar",get:function(){return defaultOutputCalendar},set:function(e){defaultOutputCalendar=e}},{key:"throwOnInvalid",get:function(){return throwOnInvalid},set:function(e){throwOnInvalid=e}}]),e}(),intlDTCache={};function getCachedDTF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=intlDTCache[n];return i||(i=new Intl.DateTimeFormat(e,t),intlDTCache[n]=i),i}var intlNumCache={};function getCachedINF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=intlNumCache[n];return i||(i=new Intl.NumberFormat(e,t),intlNumCache[n]=i),i}var intlRelCache={};function getCachedRTF(e,t){var n=t=void 0===t?{}:t,n=(n.base,_objectWithoutPropertiesLoose(n,["base"])),n=JSON.stringify([e,n]),i=intlRelCache[n];return i||(i=new Intl.RelativeTimeFormat(e,t),intlRelCache[n]=i),i}var sysLocaleCache=null;function systemLocale(){var e;return sysLocaleCache=sysLocaleCache||(hasIntl()?(e=(new Intl.DateTimeFormat).resolvedOptions().locale)&&"und"!==e?e:"en-US":"en-US")}function parseLocaleString(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,t=e.substring(0,t);try{n=getCachedDTF(e).resolvedOptions()}catch(e){n=getCachedDTF(t).resolvedOptions()}e=n;return[t,e.numberingSystem,e.calendar]}function intlConfigString(e,t,n){return hasIntl()?((n||t)&&(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t)),e):[]}function mapMonths(e){for(var t=[],n=1;n<=12;n++){var i=DateTime.utc(2016,n,1);t.push(e(i))}return t}function mapWeekdays(e){for(var t=[],n=1;n<=7;n++){var i=DateTime.utc(2016,11,13+n);t.push(e(i))}return t}function listStuff(e,t,n,i,a){e=e.listingMode(n);return"error"===e?null:("en"===e?i:a)(t)}function supportsFastNumbers(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||hasIntl()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}var PolyNumberFormatter=function(){function e(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&hasIntl()&&(t={useGrouping:!1},0<n.padTo&&(t.minimumIntegerDigits=n.padTo),this.inf=getCachedINF(e,t))}return e.prototype.format=function(e){var t;return this.inf?(t=this.floor?Math.floor(e):e,this.inf.format(t)):padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)},e}(),PolyDateFormatter=function(){function e(e,t,n){var i,a,o;this.opts=n,this.hasIntl=hasIntl(),e.zone.universal&&this.hasIntl?(a=e.offset/60*-1,o=IANAZone.isValidZone(a=0<=a?"Etc/GMT+"+a:"Etc/GMT"+a),0!==e.offset&&o?(i=a,this.dt=e):(i="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:DateTime.fromMillis(e.ts+60*e.offset*1e3))):"local"===e.zone.type?this.dt=e:i=(this.dt=e).zone.name,this.hasIntl&&(o=Object.assign({},this.opts),i&&(o.timeZone=i),this.dtf=getCachedDTF(t,o))}var t=e.prototype;return t.format=function(){var e,t;return this.hasIntl?this.dtf.format(this.dt.toJSDate()):(e=formatString(this.opts),t=Locale.create("en-US"),Formatter.create(t).formatDateTimeFromString(this.dt,e))},t.formatToParts=function(){return this.hasIntl&&hasFormatToParts()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),PolyRelFormatter=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&hasRelative()&&(this.rtf=getCachedRTF(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):formatRelativeTime(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),Locale=function(){function a(e,t,n,i){var e=parseLocaleString(e),a=e[0],o=e[1],e=e[2];this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||e||null,this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}a.fromOpts=function(e){return a.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},a.create=function(e,t,n,i){void 0===i&&(i=!1);e=e||Settings.defaultLocale;return new a(e||(i?"en-US":systemLocale()),t||Settings.defaultNumberingSystem,n||Settings.defaultOutputCalendar,e)},a.resetCache=function(){sysLocaleCache=null,intlDTCache={},intlNumCache={},intlRelCache={}},a.fromObject=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar;return a.create(t,n,e)};var e=a.prototype;return e.listingMode=function(e){void 0===e&&(e=!0);var t=hasIntl()&&hasFormatToParts(),n=this.isEnglish(),i=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&i||e?!t||n&&i?"en":"intl":"error"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?a.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},e.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},e.months=function(n,i,e){var a=this;return void 0===i&&(i=!1),listStuff(this,n,e=void 0===e?!0:e,months,function(){var t=i?{month:n,day:"numeric"}:{month:n},e=i?"format":"standalone";return a.monthsCache[e][n]||(a.monthsCache[e][n]=mapMonths(function(e){return a.extract(e,t,"month")})),a.monthsCache[e][n]})},e.weekdays=function(n,i,e){var a=this;return void 0===i&&(i=!1),listStuff(this,n,e=void 0===e?!0:e,weekdays,function(){var t=i?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},e=i?"format":"standalone";return a.weekdaysCache[e][n]||(a.weekdaysCache[e][n]=mapWeekdays(function(e){return a.extract(e,t,"weekday")})),a.weekdaysCache[e][n]})},e.meridiems=function(e){var n=this;return listStuff(this,void 0,e=void 0===e?!0:e,function(){return meridiems},function(){var t;return n.meridiemCache||(t={hour:"numeric",hour12:!0},n.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map(function(e){return n.extract(e,t,"dayperiod")})),n.meridiemCache})},e.eras=function(e,t){var n=this;return listStuff(this,e,t=void 0===t?!0:t,eras,function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map(function(e){return n.extract(e,t,"era")})),n.eraCache[e]})},e.extract=function(e,t,n){e=this.dtFormatter(e,t).formatToParts().find(function(e){return e.type.toLowerCase()===n});return e?e.value:null},e.numberFormatter=function(e){return new PolyNumberFormatter(this.intl,(e=void 0===e?{}:e).forceSimple||this.fastNumbers,e)},e.dtFormatter=function(e,t){return new PolyDateFormatter(e,this.intl,t=void 0===t?{}:t)},e.relFormatter=function(e){return void 0===e&&(e={}),new PolyRelFormatter(this.intl,this.isEnglish(),e)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||hasIntl()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},_createClass(a,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=supportsFastNumbers(this)),this.fastNumbersCached}}]),a}();function combineRegexes(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce(function(e,t){return e+t.source},"");return RegExp("^"+i+"$")}function combineExtractors(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(o){return t.reduce(function(e,t){var n=e[0],i=e[1],e=e[2],t=t(o,e),e=t[0],a=t[1],t=t[2];return[Object.assign(n,e),i||a,t]},[{},null,1]).slice(0,2)}}function parse(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(var a=0,o=n;a<o.length;a++){var r=o[a],s=r[0],r=r[1],s=s.exec(e);if(s)return r(s)}return[null,null]}function simpleParse(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];return function(e,t){for(var n={},i=0;i<a.length;i++)n[a[i]]=parseInteger(e[t+i]);return[n,null,t+i]}}var offsetRegex=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,isoTimeBaseRegex=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,isoTimeRegex=RegExp(""+isoTimeBaseRegex.source+offsetRegex.source+"?"),isoTimeExtensionRegex=RegExp("(?:T"+isoTimeRegex.source+")?"),isoYmdRegex=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,isoWeekRegex=/(\d{4})-?W(\d\d)(?:-?(\d))?/,isoOrdinalRegex=/(\d{4})-?(\d{3})/,extractISOWeekData=simpleParse("weekYear","weekNumber","weekDay"),extractISOOrdinalData=simpleParse("year","ordinal"),sqlYmdRegex=/(\d{4})-(\d\d)-(\d\d)/,sqlTimeRegex=RegExp(isoTimeBaseRegex.source+" ?(?:"+offsetRegex.source+"|("+ianaRegex.source+"))?"),sqlTimeExtensionRegex=RegExp("(?: "+sqlTimeRegex.source+")?");function int(e,t,n){e=e[t];return isUndefined(e)?n:parseInteger(e)}function extractISOYmd(e,t){return[{year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)},null,t+3]}function extractISOTime(e,t){return[{hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){var n=!e[t]&&!e[t+1],e=signedOffset(e[t+1],e[t+2]);return[{},n?null:FixedOffsetZone.instance(e),t+3]}function extractIANAZone(e,t){return[{},e[t]?IANAZone.create(e[t]):null,t+1]}var isoTimeOnly=RegExp("^T?"+isoTimeBaseRegex.source+"$"),isoDuration=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function extractISODuration(e){function t(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&u)?-e:e}var n=e[0],i=e[1],a=e[2],o=e[3],r=e[4],s=e[5],l=e[6],c=e[7],e=e[8],u="-"===n[0],n=c&&"-"===c[0];return[{years:t(parseInteger(i)),months:t(parseInteger(a)),weeks:t(parseInteger(o)),days:t(parseInteger(r)),hours:t(parseInteger(s)),minutes:t(parseInteger(l)),seconds:t(parseInteger(c),"-0"===c),milliseconds:t(parseMillis(e),n)}]}var obsOffsets={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,n,i,a,o,r){t={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:monthsShort.indexOf(n)+1,day:parseInteger(i),hour:parseInteger(a),minute:parseInteger(o)};return r&&(t.second=parseInteger(r)),e&&(t.weekday=3<e.length?weekdaysLong.indexOf(e)+1:weekdaysShort.indexOf(e)+1),t}var rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){var t=e[1],n=e[2],i=e[3],a=e[4],o=e[5],r=e[6],s=e[7],l=e[8],c=e[9],u=e[10],e=e[11],t=fromStrings(t,a,i,n,o,r,s),a=l?obsOffsets[l]:c?0:signedOffset(u,e);return[t,new FixedOffsetZone(a)]}function preprocessRFC2822(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var rfc1123=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rfc850=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ascii=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){var t=e[1],n=e[2],i=e[3];return[fromStrings(t,e[4],i,n,e[5],e[6],e[7]),FixedOffsetZone.utcInstance]}function extractASCII(e){var t=e[1],n=e[2],i=e[3],a=e[4],o=e[5],r=e[6];return[fromStrings(t,e[7],n,i,a,o,r),FixedOffsetZone.utcInstance]}var isoYmdWithTimeExtensionRegex=combineRegexes(isoYmdRegex,isoTimeExtensionRegex),isoWeekWithTimeExtensionRegex=combineRegexes(isoWeekRegex,isoTimeExtensionRegex),isoOrdinalWithTimeExtensionRegex=combineRegexes(isoOrdinalRegex,isoTimeExtensionRegex),isoTimeCombinedRegex=combineRegexes(isoTimeRegex),extractISOYmdTimeAndOffset=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset),extractISOWeekTimeAndOffset=combineExtractors(extractISOWeekData,extractISOTime,extractISOOffset),extractISOOrdinalDateAndTime=combineExtractors(extractISOOrdinalData,extractISOTime,extractISOOffset),extractISOTimeAndOffset=combineExtractors(extractISOTime,extractISOOffset);function parseISODate(e){return parse(e,[isoYmdWithTimeExtensionRegex,extractISOYmdTimeAndOffset],[isoWeekWithTimeExtensionRegex,extractISOWeekTimeAndOffset],[isoOrdinalWithTimeExtensionRegex,extractISOOrdinalDateAndTime],[isoTimeCombinedRegex,extractISOTimeAndOffset])}function parseRFC2822Date(e){return parse(preprocessRFC2822(e),[rfc2822,extractRFC2822])}function parseHTTPDate(e){return parse(e,[rfc1123,extractRFC1123Or850],[rfc850,extractRFC1123Or850],[ascii,extractASCII])}function parseISODuration(e){return parse(e,[isoDuration,extractISODuration])}var extractISOTimeOnly=combineExtractors(extractISOTime);function parseISOTimeOnly(e){return parse(e,[isoTimeOnly,extractISOTimeOnly])}var sqlYmdWithTimeExtensionRegex=combineRegexes(sqlYmdRegex,sqlTimeExtensionRegex),sqlTimeCombinedRegex=combineRegexes(sqlTimeRegex),extractISOYmdTimeOffsetAndIANAZone=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),extractISOTimeOffsetAndIANAZone=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(e){return parse(e,[sqlYmdWithTimeExtensionRegex,extractISOYmdTimeOffsetAndIANAZone],[sqlTimeCombinedRegex,extractISOTimeOffsetAndIANAZone])}var INVALID="Invalid Duration",lowOrderMatrix={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},casualMatrix=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},lowOrderMatrix),daysInYearAccurate=365.2425,daysInMonthAccurate=30.436875,accurateMatrix=Object.assign({years:{quarters:4,months:12,weeks:daysInYearAccurate/7,days:daysInYearAccurate,hours:24*daysInYearAccurate,minutes:24*daysInYearAccurate*60,seconds:24*daysInYearAccurate*60*60,milliseconds:24*daysInYearAccurate*60*60*1e3},quarters:{months:3,weeks:daysInYearAccurate/28,days:daysInYearAccurate/4,hours:24*daysInYearAccurate/4,minutes:24*daysInYearAccurate*60/4,seconds:24*daysInYearAccurate*60*60/4,milliseconds:24*daysInYearAccurate*60*60*1e3/4},months:{weeks:daysInMonthAccurate/7,days:daysInMonthAccurate,hours:24*daysInMonthAccurate,minutes:24*daysInMonthAccurate*60,seconds:24*daysInMonthAccurate*60*60,milliseconds:24*daysInMonthAccurate*60*60*1e3}},lowOrderMatrix),orderedUnits=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],reverseUnits=orderedUnits.slice(0).reverse();function clone(e,t,n){n={values:(n=void 0===n?!1:n)?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Duration(n)}function antiTrunc(e){return e<0?Math.floor(e):Math.ceil(e)}function convert(e,t,n,i,a){var e=e[a][n],o=t[n]/e,o=!(Math.sign(o)===Math.sign(i[a]))&&0!==i[a]&&Math.abs(o)<=1?antiTrunc(o):Math.trunc(o);i[a]+=o,t[n]-=o*e}function normalizeValues(n,i){reverseUnits.reduce(function(e,t){return isUndefined(i[t])?e:(e&&convert(n,i,e,i,t),t)},null)}var Duration=function(){function p(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Locale.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?accurateMatrix:casualMatrix,this.isLuxonDuration=!0}p.fromMillis=function(e,t){return p.fromObject(Object.assign({milliseconds:e},t))},p.fromObject=function(e){if(null==e||"object"!=typeof e)throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new p({values:normalizeObject(e,p.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Locale.fromObject(e),conversionAccuracy:e.conversionAccuracy})},p.fromISO=function(e,t){var n=parseISODuration(e)[0];return n?(n=Object.assign(n,t),p.fromObject(n)):p.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},p.fromISOTime=function(e,t){var n=parseISOTimeOnly(e)[0];return n?(n=Object.assign(n,t),p.fromObject(n)):p.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},p.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Duration is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDurationError(e);return new p({invalid:e})},p.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)},p.isDuration=function(e){return e&&e.isLuxonDuration||!1};var e=p.prototype;return e.toFormat=function(e,t){void 0===t&&(t={});t=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Formatter.create(this.loc,t).formatDurationFromString(this,e):INVALID},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},e.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||864e5<=t)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var t=this.shiftTo("hours","minutes","seconds","milliseconds"),n="basic"===e.format?"hhmm":"hh:mm",t=(e.suppressSeconds&&0===t.seconds&&0===t.milliseconds||(n+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===t.milliseconds||(n+=".SSS")),t.toFormat(n));return t=e.includePrefix?"T"+t:t},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(e){if(!this.isValid)return this;for(var t=friendlyDuration(e),n={},i=_createForOfIteratorHelperLoose(orderedUnits);!(a=i()).done;){var a=a.value;(hasOwnProperty(t.values,a)||hasOwnProperty(this.values,a))&&(n[a]=t.get(a)+this.get(a))}return clone(this,{values:n},!0)},e.minus=function(e){if(!this.isValid)return this;e=friendlyDuration(e);return this.plus(e.negate())},e.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,i=Object.keys(this.values);n<i.length;n++){var a=i[n];t[a]=asNumber(e(this.values[a],a))}return clone(this,{values:t},!0)},e.get=function(e){return this[p.normalizeUnit(e)]},e.set=function(e){return this.isValid?clone(this,{values:Object.assign(this.values,normalizeObject(e,p.normalizeUnit,[]))}):this},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.conversionAccuracy,t={loc:this.loc.clone({locale:t,numberingSystem:n})};return e&&(t.conversionAccuracy=e),clone(this,t)},e.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},e.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return normalizeValues(this.matrix,e),clone(this,{values:e},!0)},e.shiftTo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!this.isValid)return this;if(0===t.length)return this;for(var i,t=t.map(function(e){return p.normalizeUnit(e)}),a={},o={},r=this.toObject(),s=_createForOfIteratorHelperLoose(orderedUnits);!(m=s()).done;){var l=m.value;if(0<=t.indexOf(l)){var c,u=l,d=0;for(c in o)d+=this.matrix[c][l]*o[c],o[c]=0;isNumber(r[l])&&(d+=r[l]);var f,m=Math.trunc(d);for(f in a[l]=m,o[l]=d-m,r)orderedUnits.indexOf(f)>orderedUnits.indexOf(l)&&convert(this.matrix,r,f,a,l)}else isNumber(r[l])&&(o[l]=r[l])}for(i in o)0!==o[i]&&(a[u]+=i===u?o[i]:o[i]/this.matrix[u][i]);return clone(this,{values:a},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var i=n[t];e[i]=-this.values[i]}return clone(this,{values:e},!0)},e.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=_createForOfIteratorHelperLoose(orderedUnits);!(i=n()).done;){var i=i.value;if(t=this.values[i],i=e.values[i],!(void 0===t||0===t?void 0===i||0===i:t===i))return!1}return!0},_createClass(p,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),p}();function friendlyDuration(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if("object"==typeof e)return Duration.fromObject(e);throw new InvalidArgumentError("Unknown duration argument "+e+" of type "+typeof e)}var INVALID$1="Invalid Interval";function validateStartEnd(e,t){return e&&e.isValid?t&&t.isValid?t<e?Interval.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:Interval.invalid("missing or invalid end"):Interval.invalid("missing or invalid start")}var Interval=function(){function c(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}c.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Interval is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidIntervalError(e);return new c({invalid:e})},c.fromDateTimes=function(e,t){var e=friendlyDateTime(e),t=friendlyDateTime(t),n=validateStartEnd(e,t);return null==n?new c({start:e,end:t}):n},c.after=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e,e.plus(t))},c.before=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e.minus(t),e)},c.fromISO=function(e,t){var n,i,a,o=(e||"").split("/",2),r=o[0],s=o[1];if(r&&s){try{l=(n=DateTime.fromISO(r,t)).isValid}catch(s){l=!1}try{a=(i=DateTime.fromISO(s,t)).isValid}catch(s){a=!1}if(l&&a)return c.fromDateTimes(n,i);if(l){o=Duration.fromISO(s,t);if(o.isValid)return c.after(n,o)}else if(a){var l=Duration.fromISO(r,t);if(l.isValid)return c.before(i,l)}}return c.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},c.isInterval=function(e){return e&&e.isLuxonInterval||!1};var e=c.prototype;return e.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},e.count=function(e){if(!this.isValid)return NaN;var t=this.start.startOf(e=void 0===e?"milliseconds":e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},e.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},e.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function(e){return!!this.isValid&&this.s>e},e.isBefore=function(e){return!!this.isValid&&this.e<=e},e.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},e.set=function(e){var e=void 0===e?{}:e,t=e.start,e=e.end;return this.isValid?c.fromDateTimes(t||this.s,e||this.e):this},e.splitAt=function(){var t=this;if(!this.isValid)return[];for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];for(var a=n.map(friendlyDateTime).filter(function(e){return t.contains(e)}).sort(),o=[],r=this.s,s=0;r<this.e;){var l=a[s]||this.e,l=+l>+this.e?this.e:l;o.push(c.fromDateTimes(r,l)),r=l,s+=1}return o},e.splitBy=function(e){var t=friendlyDuration(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];for(var n=this.s,i=1,a=[];n<this.e;){var o=this.start.plus(t.mapUnits(function(e){return e*i})),o=+o>+this.e?this.e:o;a.push(c.fromDateTimes(n,o)),n=o,i+=1}return a},e.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},e.overlaps=function(e){return this.e>e.s&&this.s<e.e},e.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},e.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},e.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},e.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},e.intersection=function(e){if(!this.isValid)return this;var t=(this.s>e.s?this:e).s,e=(this.e<e.e?this:e).e;return e<=t?null:c.fromDateTimes(t,e)},e.union=function(e){if(!this.isValid)return this;var t=(this.s<e.s?this:e).s,e=(this.e>e.e?this:e).e;return c.fromDateTimes(t,e)},c.merge=function(e){var e=e.sort(function(e,t){return e.s-t.s}).reduce(function(e,t){var n=e[0],e=e[1];return e?e.overlaps(t)||e.abutsStart(t)?[n,e.union(t)]:[n.concat([e]),t]:[n,t]},[[],null]),t=e[0],e=e[1];return e&&t.push(e),t},c.xor=function(e){for(var t,n=null,i=0,a=[],e=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),o=_createForOfIteratorHelperLoose((t=Array.prototype).concat.apply(t,e).sort(function(e,t){return e.time-t.time}));!(r=o()).done;)var r=r.value,n=1===(i+="s"===r.type?1:-1)?r.time:(n&&+n!=+r.time&&a.push(c.fromDateTimes(n,r.time)),null);return c.merge(a)},e.difference=function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return c.xor([this].concat(n)).map(function(e){return t.intersection(e)}).filter(function(e){return e&&!e.isEmpty()})},e.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":INVALID$1},e.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):INVALID$1},e.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():INVALID$1},e.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):INVALID$1},e.toFormat=function(e,t){t=(void 0===t?{}:t).separator,t=void 0===t?" – ":t;return this.isValid?""+this.s.toFormat(e)+t+this.e.toFormat(e):INVALID$1},e.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Duration.invalid(this.invalidReason)},e.mapEndpoints=function(e){return c.fromDateTimes(e(this.s),e(this.e))},_createClass(c,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),c}(),Info=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Settings.defaultZone);var t=DateTime.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return IANAZone.isValidSpecifier(e)&&IANAZone.isValidZone(e)},e.normalizeZone=function(e){return normalizeZone(e,Settings.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,i=t.numberingSystem,a=t.locObj,a=void 0===a?null:a,t=t.outputCalendar;return(a||Locale.create(void 0===n?null:n,void 0===i?null:i,void 0===t?"gregory":t)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,i=t.numberingSystem,a=t.locObj,a=void 0===a?null:a,t=t.outputCalendar;return(a||Locale.create(void 0===n?null:n,void 0===i?null:i,void 0===t?"gregory":t)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,i=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===i?null:i,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,i=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===i?null:i,null)).weekdays(e,!0)},e.meridiems=function(e){e=(void 0===e?{}:e).locale;return Locale.create(void 0===e?null:e).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");t=(void 0===t?{}:t).locale;return Locale.create(void 0===t?null:t,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,i=!1;if(hasIntl()){e=!0,t=hasFormatToParts(),i=hasRelative();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:i}},e}();function dayDiff(e,t){function n(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()}t=n(t)-n(e);return Math.floor(Duration.fromMillis(t).as("days"))}function highOrderDiffs(e,t,n){for(var i={},a=0,o=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){e=dayDiff(e,t);return(e-e%7)/7}],["days",dayDiff]];a<o.length;a++){var r,s,l,c=o[a],u=c[0],c=c[1];0<=n.indexOf(u)&&(r=u,c=c(e,t),t<(l=e.plus(((s={})[u]=c,s)))?(e=e.plus(((s={})[u]=c-1,s)),--c):e=l,i[u]=c)}return[e,i,l,r]}function _diff(e,t,n,i){var e=highOrderDiffs(e,t,n),a=e[0],o=e[1],r=e[2],e=e[3],s=t-a,n=n.filter(function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}),t=(0===n.length&&(r=r<t?a.plus(((t={})[e]=1,t)):r)!==a&&(o[e]=(o[e]||0)+s/(r-a)),Duration.fromObject(Object.assign(o,i)));return 0<n.length?(e=Duration.fromMillis(s,i)).shiftTo.apply(e,n).plus(t):t}var numberingSystems={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},numberingSystemsUTF16={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},hanidecChars=numberingSystems.hanidec.replace(/[\[|\]]/g,"").split("");function parseDigits(e){var t=parseInt(e,10);if(isNaN(t)){for(var t="",n=0;n<e.length;n++){var i=e.charCodeAt(n);if(-1!==e[n].search(numberingSystems.hanidec))t+=hanidecChars.indexOf(e[n]);else for(var a in numberingSystemsUTF16){var a=numberingSystemsUTF16[a],o=a[0],a=a[1];o<=i&&i<=a&&(t+=i-o)}}return parseInt(t,10)}return t}function digitRegex(e,t){e=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+numberingSystems[e||"latn"]+t)}var MISSING_FTP="missing Intl.DateTimeFormat.formatToParts support";function intUnit(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){e=e[0];return t(parseDigits(e))}}}var NBSP=String.fromCharCode(160),spaceOrNBSP="( |"+NBSP+")",spaceOrNBSPRegExp=new RegExp(spaceOrNBSP,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(spaceOrNBSPRegExp,spaceOrNBSP)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(spaceOrNBSPRegExp," ").toLowerCase()}function oneOf(n,i){return null===n?null:{regex:RegExp(n.map(fixListRegex).join("|")),deser:function(e){var t=e[0];return n.findIndex(function(e){return stripInsensitivities(t)===stripInsensitivities(e)})+i}}}function offset(e,t){return{regex:e,deser:function(e){return signedOffset(e[1],e[2])},groups:t}}function simple(e){return{regex:e,deser:function(e){return e[0]}}}function escapeToken(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function unitForToken(t,n){function i(e){return{regex:RegExp(escapeToken(e.val)),deser:function(e){return e[0]},literal:!0}}var a=digitRegex(n),o=digitRegex(n,"{2}"),r=digitRegex(n,"{3}"),s=digitRegex(n,"{4}"),l=digitRegex(n,"{6}"),c=digitRegex(n,"{1,2}"),u=digitRegex(n,"{1,3}"),d=digitRegex(n,"{1,6}"),f=digitRegex(n,"{1,9}"),m=digitRegex(n,"{2,4}"),p=digitRegex(n,"{4,6}"),e=function(e){if(t.literal)return i(e);switch(e.val){case"G":return oneOf(n.eras("short",!1),0);case"GG":return oneOf(n.eras("long",!1),0);case"y":return intUnit(d);case"yy":return intUnit(m,untruncateYear);case"yyyy":return intUnit(s);case"yyyyy":return intUnit(p);case"yyyyyy":return intUnit(l);case"M":return intUnit(c);case"MM":return intUnit(o);case"MMM":return oneOf(n.months("short",!0,!1),1);case"MMMM":return oneOf(n.months("long",!0,!1),1);case"L":return intUnit(c);case"LL":return intUnit(o);case"LLL":return oneOf(n.months("short",!1,!1),1);case"LLLL":return oneOf(n.months("long",!1,!1),1);case"d":return intUnit(c);case"dd":return intUnit(o);case"o":return intUnit(u);case"ooo":return intUnit(r);case"HH":return intUnit(o);case"H":return intUnit(c);case"hh":return intUnit(o);case"h":return intUnit(c);case"mm":return intUnit(o);case"m":case"q":return intUnit(c);case"qq":return intUnit(o);case"s":return intUnit(c);case"ss":return intUnit(o);case"S":return intUnit(u);case"SSS":return intUnit(r);case"u":return simple(f);case"a":return oneOf(n.meridiems(),0);case"kkkk":return intUnit(s);case"kk":return intUnit(m,untruncateYear);case"W":return intUnit(c);case"WW":return intUnit(o);case"E":case"c":return intUnit(a);case"EEE":return oneOf(n.weekdays("short",!1,!1),1);case"EEEE":return oneOf(n.weekdays("long",!1,!1),1);case"ccc":return oneOf(n.weekdays("short",!0,!1),1);case"cccc":return oneOf(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp("([+-]"+c.source+")(?::("+o.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+c.source+")("+o.source+")?"),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return i(e)}}(t)||{invalidReason:MISSING_FTP};return e.token=t,e}var partTypeStyleToTokenVal={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function tokenForPart(e,t,n){var i=e.type,e=e.value;if("literal"===i)return{literal:!0,val:e};e=n[i],n=partTypeStyleToTokenVal[i];return(n="object"==typeof n?n[e]:n)?{literal:!1,val:n}:void 0}function buildRegex(e){return["^"+e.map(function(e){return e.regex}).reduce(function(e,t){return e+"("+t.source+")"},"")+"$",e]}function match(e,t,n){var i=e.match(t);if(i){var a,o,r,s={},l=1;for(a in n)hasOwnProperty(n,a)&&(r=(o=n[a]).groups?o.groups+1:1,!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(i.slice(l,l+r))),l+=r);return[i,s]}return[i,{}]}function dateTimeFromMatches(i){var e=isUndefined(i.Z)?isUndefined(i.z)?null:IANAZone.create(i.z):new FixedOffsetZone(i.Z);return isUndefined(i.q)||(i.M=3*(i.q-1)+1),isUndefined(i.h)||(i.h<12&&1===i.a?i.h+=12:12===i.h&&0===i.a&&(i.h=0)),0===i.G&&i.y&&(i.y=-i.y),isUndefined(i.u)||(i.S=parseMillis(i.u)),[Object.keys(i).reduce(function(e,t){var n=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(t);return n&&(e[n]=i[t]),e},{}),e]}var dummyDateTimeCache=null;function getDummyDateTime(){return dummyDateTimeCache=dummyDateTimeCache||DateTime.fromMillis(1555555555555)}function maybeExpandMacroToken(e,t){if(e.literal)return e;var n=Formatter.macroTokenToFormatOpts(e.val);if(!n)return e;var i=Formatter.create(t,n).formatDateTimeParts(getDummyDateTime()).map(function(e){return tokenForPart(e,t,n)});return i.includes(void 0)?e:i}function expandMacroTokens(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map(function(e){return maybeExpandMacroToken(e,t)}))}function explainFromTokens(t,e,n){var n=expandMacroTokens(Formatter.parseFormat(n),t),i=n.map(function(e){return unitForToken(e,t)}),a=i.find(function(e){return e.invalidReason});if(a)return{input:e,tokens:n,invalidReason:a.invalidReason};var a=buildRegex(i),i=a[0],a=a[1],i=RegExp(i,"i"),a=match(e,i,a),o=a[0],a=a[1],r=a?dateTimeFromMatches(a):[null,null],s=r[0],r=r[1];if(hasOwnProperty(a,"a")&&hasOwnProperty(a,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:i,rawMatches:o,matches:a,result:s,zone:r}}function parseFromTokens(e,t,n){e=explainFromTokens(e,t,n);return[e.result,e.zone,e.invalidReason]}var nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function dayOfWeek(e,t,n){e=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===e?7:e}function computeOrdinal(e,t,n){return n+(isLeapYear(e)?leapLadder:nonLeapLadder)[t-1]}function uncomputeOrdinal(e,t){var e=isLeapYear(e)?leapLadder:nonLeapLadder,n=e.findIndex(function(e){return e<t});return{month:n+1,day:t-e[n]}}function gregorianToWeek(e){var t,n=e.year,i=e.month,a=e.day,o=computeOrdinal(n,i,a),i=dayOfWeek(n,i,a),a=Math.floor((o-i+10)/7);return a<1?a=weeksInWeekYear(t=n-1):a>weeksInWeekYear(n)?(t=n+1,a=1):t=n,Object.assign({weekYear:t,weekNumber:a,weekday:i},timeObject(e))}function weekToGregorian(e){var t,n=e.weekYear,i=e.weekNumber,a=e.weekday,o=dayOfWeek(n,1,4),r=daysInYear(n),i=7*i+a-o-3,a=(i<1?i+=daysInYear(t=n-1):r<i?(t=n+1,i-=daysInYear(n)):t=n,uncomputeOrdinal(t,i)),o=a.month,r=a.day;return Object.assign({year:t,month:o,day:r},timeObject(e))}function gregorianToOrdinal(e){var t=e.year,n=computeOrdinal(t,e.month,e.day);return Object.assign({year:t,ordinal:n},timeObject(e))}function ordinalToGregorian(e){var t=e.year,n=uncomputeOrdinal(t,e.ordinal),i=n.month,n=n.day;return Object.assign({year:t,month:i,day:n},timeObject(e))}function hasInvalidWeekData(e){var t=isInteger(e.weekYear),n=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear)),i=integerBetween(e.weekday,1,7);return t?n?!i&&unitOutOfRange("weekday",e.weekday):unitOutOfRange("week",e.week):unitOutOfRange("weekYear",e.weekYear)}function hasInvalidOrdinalData(e){var t=isInteger(e.year),n=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!n&&unitOutOfRange("ordinal",e.ordinal):unitOutOfRange("year",e.year)}function hasInvalidGregorianData(e){var t=isInteger(e.year),n=integerBetween(e.month,1,12),i=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?n?!i&&unitOutOfRange("day",e.day):unitOutOfRange("month",e.month):unitOutOfRange("year",e.year)}function hasInvalidTimeData(e){var t=e.hour,n=e.minute,i=e.second,e=e.millisecond,a=integerBetween(t,0,23)||24===t&&0===n&&0===i&&0===e,o=integerBetween(n,0,59),r=integerBetween(i,0,59),s=integerBetween(e,0,999);return a?o?r?!s&&unitOutOfRange("millisecond",e):unitOutOfRange("second",i):unitOutOfRange("minute",n):unitOutOfRange("hour",t)}var INVALID$2="Invalid DateTime",MAX_DATE=864e13;function unsupportedZone(e){return new Invalid("unsupported zone",'the zone "'+e.name+'" is not supported')}function possiblyCachedWeekData(e){return null===e.weekData&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function clone$1(e,t){e={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new DateTime(Object.assign({},e,t,{old:e}))}function fixOffset(e,t,n){var i=e-60*t*1e3,a=n.offset(i);if(t===a)return[i,t];n=n.offset(i-=60*(a-t)*1e3);return a===n?[i,a]:[e-60*Math.min(a,n)*1e3,Math.max(a,n)]}function tsToObj(e,t){e+=60*t*1e3;t=new Date(e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function objToTS(e,t,n){return fixOffset(objToLocalTS(e),t,n)}function adjustTime(e,t){var n=e.o,i=e.c.year+Math.trunc(t.years),a=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i=Object.assign({},e.c,{year:i,month:a,day:Math.min(e.c.day,daysInMonth(i,a))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),a=Duration.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),t=fixOffset(objToLocalTS(i),n,e.zone),i=t[0],n=t[1];return 0!==a&&(n=e.zone.offset(i+=a)),{ts:i,o:n}}function parseDataToDateTime(e,t,n,i,a){var o=n.setZone,r=n.zone;return e&&0!==Object.keys(e).length?(e=DateTime.fromObject(Object.assign(e,n,{zone:t||r,setZone:void 0})),o?e:e.setZone(r)):DateTime.invalid(new Invalid("unparsable",'the input "'+a+"\" can't be parsed as "+i))}function toTechFormat(e,t,n){return void 0===n&&(n=!0),e.isValid?Formatter.create(Locale.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function toTechTimeFormat(e,t){var n=t.suppressSeconds,i=t.suppressMilliseconds,a=t.includeOffset,o=t.includePrefix,o=void 0!==o&&o,r=t.includeZone,r=void 0!==r&&r,s=t.spaceZone,t=t.format,t=void 0===t?"extended":t,l="basic"===t?"HHmm":"HH:mm",n=(void 0!==n&&n&&0===e.second&&0===e.millisecond||(l+="basic"===t?"ss":":ss",void 0!==i&&i&&0===e.millisecond||(l+=".SSS")),(r||a)&&(void 0!==s&&s)&&(l+=" "),r?l+="z":a&&(l+="basic"===t?"ZZZ":"ZZ"),toTechFormat(e,l));return n=o?"T"+n:n}var defaultUnitValues={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},defaultWeekUnitValues={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},defaultOrdinalUnitValues={ordinal:1,hour:0,minute:0,second:0,millisecond:0},orderedUnits$1=["year","month","day","hour","minute","second","millisecond"],orderedWeekUnits=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],orderedOrdinalUnits=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)}function quickDT(e,t){for(var n=_createForOfIteratorHelperLoose(orderedUnits$1);!(i=n()).done;){var i=i.value;isUndefined(e[i])&&(e[i]=defaultUnitValues[i])}var a=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(a)return DateTime.invalid(a);var a=Settings.now(),a=objToTS(e,t.offset(a),t),o=a[0],a=a[1];return new DateTime({ts:o,zone:t,o:a})}function diffRelative(t,n,i){function e(e,t){return e=roundTo(e,o||i.calendary?0:2,!0),n.loc.clone(i).relFormatter(i).format(e,t)}function a(e){return i.calendary?n.hasSame(t,e)?0:n.startOf(e).diff(t.startOf(e),e).get(e):n.diff(t,e).get(e)}var o=!!isUndefined(i.round)||i.round;if(i.unit)return e(a(i.unit),i.unit);for(var r=_createForOfIteratorHelperLoose(i.units);!(s=r()).done;){var s=s.value,l=a(s);if(1<=Math.abs(l))return e(l,s)}return e(n<t?-0:0,i.units[i.units.length-1])}var DateTime=function(){function y(e){var t,n=e.zone||Settings.defaultZone,i=e.invalid||(Number.isNaN(e.ts)?new Invalid("invalid input"):null)||(n.isValid?null:unsupportedZone(n)),a=(this.ts=isUndefined(e.ts)?Settings.now():e.ts,null),o=null;i||(o=e.old&&e.old.ts===this.ts&&e.old.zone.equals(n)?(a=(t=[e.old.c,e.old.o])[0],t[1]):(t=n.offset(this.ts),a=tsToObj(this.ts,t),a=(i=Number.isNaN(a.year)?new Invalid("invalid input"):null)?null:a,i?null:t)),this._zone=n,this.loc=e.loc||Locale.create(),this.invalid=i,this.weekData=null,this.c=a,this.o=o,this.isLuxonDateTime=!0}y.now=function(){return new y({})},y.local=function(e,t,n,i,a,o,r){return isUndefined(e)?y.now():quickDT({year:e,month:t,day:n,hour:i,minute:a,second:o,millisecond:r},Settings.defaultZone)},y.utc=function(e,t,n,i,a,o,r){return isUndefined(e)?new y({ts:Settings.now(),zone:FixedOffsetZone.utcInstance}):quickDT({year:e,month:t,day:n,hour:i,minute:a,second:o,millisecond:r},FixedOffsetZone.utcInstance)},y.fromJSDate=function(e,t){void 0===t&&(t={});e=isDate(e)?e.valueOf():NaN;if(Number.isNaN(e))return y.invalid("invalid input");var n=normalizeZone(t.zone,Settings.defaultZone);return n.isValid?new y({ts:e,zone:n,loc:Locale.fromObject(t)}):y.invalid(unsupportedZone(n))},y.fromMillis=function(e,t){if(void 0===t&&(t={}),isNumber(e))return e<-MAX_DATE||MAX_DATE<e?y.invalid("Timestamp out of range"):new y({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},y.fromSeconds=function(e,t){if(void 0===t&&(t={}),isNumber(e))return new y({ts:1e3*e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromSeconds requires a numerical input")},y.fromObject=function(e){var t=normalizeZone(e.zone,Settings.defaultZone);if(!t.isValid)return y.invalid(unsupportedZone(t));var n=Settings.now(),i=t.offset(n),a=normalizeObject(e,normalizeUnit,["zone","locale","outputCalendar","numberingSystem"]),o=!isUndefined(a.ordinal),r=!isUndefined(a.year),s=!isUndefined(a.month)||!isUndefined(a.day),r=r||s,l=a.weekYear||a.weekNumber,c=Locale.fromObject(e);if((r||o)&&l)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&o)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");for(var u,s=l||a.weekday&&!r,d=tsToObj(n,i),f=(s?(h=orderedWeekUnits,u=defaultWeekUnitValues,d=gregorianToWeek(d)):o?(h=orderedOrdinalUnits,u=defaultOrdinalUnitValues,d=gregorianToOrdinal(d)):(h=orderedUnits$1,u=defaultUnitValues),!1),m=_createForOfIteratorHelperLoose(h);!(p=m()).done;){var p=p.value;isUndefined(a[p])?a[p]=(f?u:d)[p]:f=!0}l=(s?hasInvalidWeekData:o?hasInvalidOrdinalData:hasInvalidGregorianData)(a)||hasInvalidTimeData(a);if(l)return y.invalid(l);var n=objToTS(s?weekToGregorian(a):o?ordinalToGregorian(a):a,i,t),h=new y({ts:n[0],zone:t,o:n[1],loc:c});return a.weekday&&r&&e.weekday!==h.weekday?y.invalid("mismatched weekday","you can't specify both a weekday of "+a.weekday+" and a date of "+h.toISO()):h},y.fromISO=function(e,t){void 0===t&&(t={});var n=parseISODate(e);return parseDataToDateTime(n[0],n[1],t,"ISO 8601",e)},y.fromRFC2822=function(e,t){void 0===t&&(t={});var n=parseRFC2822Date(e);return parseDataToDateTime(n[0],n[1],t,"RFC 2822",e)},y.fromHTTP=function(e,t){void 0===t&&(t={});e=parseHTTPDate(e);return parseDataToDateTime(e[0],e[1],t,"HTTP",t)},y.fromFormat=function(e,t,n){if(void 0===n&&(n={}),isUndefined(e)||isUndefined(t))throw new InvalidArgumentError("fromFormat requires an input string and a format");var i=n,a=i.locale,i=i.numberingSystem,a=parseFromTokens(Locale.fromOpts({locale:void 0===a?null:a,numberingSystem:void 0===i?null:i,defaultToEN:!0}),e,t),i=a[0],o=a[1],a=a[2];return a?y.invalid(a):parseDataToDateTime(i,o,n,"format "+t,e)},y.fromString=function(e,t,n){return y.fromFormat(e,t,n=void 0===n?{}:n)},y.fromSQL=function(e,t){void 0===t&&(t={});var n=parseSQL(e);return parseDataToDateTime(n[0],n[1],t,"SQL",e)},y.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDateTimeError(e);return new y({invalid:e})},y.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var e=y.prototype;return e.get=function(e){return this[e]},e.resolvedLocaleOpts=function(e){e=Formatter.create(this.loc.clone(e=void 0===e?{}:e),e).resolvedOptions(this);return{locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.calendar}},e.toUTC=function(e,t){return void 0===t&&(t={}),this.setZone(FixedOffsetZone.instance(e=void 0===e?0:e),t)},e.toLocal=function(){return this.setZone(Settings.defaultZone)},e.setZone=function(e,t){var n,t=void 0===t?{}:t,i=t.keepLocalTime,i=void 0!==i&&i,t=t.keepCalendarTime,t=void 0!==t&&t;return(e=normalizeZone(e,Settings.defaultZone)).equals(this.zone)?this:e.isValid?(n=this.ts,(i||t)&&(i=e.offset(this.ts),n=objToTS(this.toObject(),i,e)[0]),clone$1(this,{ts:n,zone:e})):y.invalid(unsupportedZone(e))},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar,t=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:e});return clone$1(this,{loc:t})},e.setLocale=function(e){return this.reconfigure({locale:e})},e.set=function(e){if(!this.isValid)return this;var t,e=normalizeObject(e,normalizeUnit,[]),n=!isUndefined(e.weekYear)||!isUndefined(e.weekNumber)||!isUndefined(e.weekday),i=!isUndefined(e.ordinal),a=!isUndefined(e.year),o=!isUndefined(e.month)||!isUndefined(e.day),r=e.weekYear||e.weekNumber;if((a||o||i)&&r)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&i)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");n?t=weekToGregorian(Object.assign(gregorianToWeek(this.c),e)):isUndefined(e.ordinal)?(t=Object.assign(this.toObject(),e),isUndefined(e.day)&&(t.day=Math.min(daysInMonth(t.year,t.month),t.day))):t=ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c),e));a=objToTS(t,this.o,this.zone);return clone$1(this,{ts:a[0],o:a[1]})},e.plus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e))):this},e.minus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e).negate())):this},e.startOf=function(e){if(!this.isValid)return this;var t={},e=Duration.normalizeUnit(e);switch(e){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}return"weeks"===e&&(t.weekday=1),"quarters"===e&&(e=Math.ceil(this.month/3),t.month=3*(e-1)+1),this.set(t)},e.endOf=function(e){var t;return this.isValid?this.plus(((t={})[e]=1,t)).startOf(e).minus(1):this},e.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Formatter.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):INVALID$2},e.toLocaleString=function(e){return void 0===e&&(e=DATE_SHORT),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTime(this):INVALID$2},e.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},e.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},e.toISODate=function(e){e=(void 0===e?{}:e).format,e="basic"===(void 0===e?"extended":e)?"yyyyMMdd":"yyyy-MM-dd";return toTechFormat(this,e=9999<this.year?"+"+e:e)},e.toISOWeekDate=function(){return toTechFormat(this,"kkkk-'W'WW-c")},e.toISOTime=function(e){var e=void 0===e?{}:e,t=e.suppressMilliseconds,n=e.suppressSeconds,i=e.includeOffset,a=e.includePrefix,e=e.format;return toTechTimeFormat(this,{suppressSeconds:void 0!==n&&n,suppressMilliseconds:void 0!==t&&t,includeOffset:void 0===i||i,includePrefix:void 0!==a&&a,format:void 0===e?"extended":e})},e.toRFC2822=function(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return toTechFormat(this,"yyyy-MM-dd")},e.toSQLTime=function(e){var e=void 0===e?{}:e,t=e.includeOffset,e=e.includeZone;return toTechTimeFormat(this,{includeOffset:void 0===t||t,includeZone:void 0!==e&&e,spaceZone:!0})},e.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},e.toString=function(){return this.isValid?this.toISO():INVALID$2},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return Duration.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var n=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),t=maybeArray(t).map(Duration.normalizeUnit),i=e.valueOf()>this.valueOf(),e=_diff(i?this:e,i?e:this,t,n);return i?e.negate():e},e.diffNow=function(e,t){return void 0===e&&(e="milliseconds"),void 0===t&&(t={}),this.diff(y.now(),e,t)},e.until=function(e){return this.isValid?Interval.fromDateTimes(this,e):this},e.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),e=this.setZone(e.zone,{keepLocalTime:!0});return e.startOf(t)<=n&&n<=e.endOf(t)},e.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},e.toRelative=function(e){if(!this.isValid)return null;var t=(e=void 0===e?{}:e).base||y.fromObject({zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(i=e.unit,a=void 0),diffRelative(t,this.plus(n),Object.assign(e,{numeric:"always",units:i,unit:a}))},e.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?diffRelative(e.base||y.fromObject({zone:this.zone}),this,Object.assign(e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},y.min=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(y.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.min);throw new InvalidArgumentError("min requires all arguments be DateTimes")},y.max=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(y.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.max);throw new InvalidArgumentError("max requires all arguments be DateTimes")},y.fromFormatExplain=function(e,t,n){var n=n=void 0===n?{}:n,i=n.locale,n=n.numberingSystem;return explainFromTokens(Locale.fromOpts({locale:void 0===i?null:i,numberingSystem:void 0===n?null:n,defaultToEN:!0}),e,t)},y.fromStringExplain=function(e,t,n){return y.fromFormatExplain(e,t,n=void 0===n?{}:n)},_createClass(y,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Info.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Info.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Info.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Info.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return isLeapYear(this.year)}},{key:"daysInMonth",get:function(){return daysInMonth(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?daysInYear(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return DATE_SHORT}},{key:"DATE_MED",get:function(){return DATE_MED}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return DATE_MED_WITH_WEEKDAY}},{key:"DATE_FULL",get:function(){return DATE_FULL}},{key:"DATE_HUGE",get:function(){return DATE_HUGE}},{key:"TIME_SIMPLE",get:function(){return TIME_SIMPLE}},{key:"TIME_WITH_SECONDS",get:function(){return TIME_WITH_SECONDS}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return TIME_WITH_SHORT_OFFSET}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return TIME_WITH_LONG_OFFSET}},{key:"TIME_24_SIMPLE",get:function(){return TIME_24_SIMPLE}},{key:"TIME_24_WITH_SECONDS",get:function(){return TIME_24_WITH_SECONDS}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return TIME_24_WITH_SHORT_OFFSET}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return TIME_24_WITH_LONG_OFFSET}},{key:"DATETIME_SHORT",get:function(){return DATETIME_SHORT}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return DATETIME_SHORT_WITH_SECONDS}},{key:"DATETIME_MED",get:function(){return DATETIME_MED}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return DATETIME_MED_WITH_SECONDS}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return DATETIME_MED_WITH_WEEKDAY}},{key:"DATETIME_FULL",get:function(){return DATETIME_FULL}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return DATETIME_FULL_WITH_SECONDS}},{key:"DATETIME_HUGE",get:function(){return DATETIME_HUGE}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return DATETIME_HUGE_WITH_SECONDS}}]),y}();function friendlyDateTime(e){if(DateTime.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return DateTime.fromJSDate(e);if(e&&"object"==typeof e)return DateTime.fromObject(e);throw new InvalidArgumentError("Unknown datetime argument: "+e+", of type "+typeof e)}var INotificationType,VERSION="1.28.0",DateTime_1=luxon.DateTime=DateTime;function convertHTMLEntities(i){if(!i)return"";const a={">":">","<":"<","&":"&","'":"'",""":'"'};return[">","<","&","'","""].reduce((e,t)=>{var n;return i.includes(t)&&(n=new RegExp(t,"g"),e=e.replace(n,a[t])),e},i)}function generateEpochTime(e){const t=DateTime_1.local();var n=t.toMillis();return DateTime_1.fromMillis(n-24*e*3600*1e3).toISO()}function getRelativeValue(e){var t=(new Date).getTime();return((e?new Date(e):new Date).getTime()-t)/1e3/60}luxon.Duration=Duration,luxon.FixedOffsetZone=FixedOffsetZone,luxon.IANAZone=IANAZone,luxon.Info=Info,luxon.Interval=Interval,luxon.InvalidZone=InvalidZone,luxon.LocalZone=LocalZone,luxon.Settings=Settings,luxon.VERSION=VERSION,luxon.Zone=Zone,DateTime_1.local().toISO(),generateEpochTime(1),generateEpochTime(3),generateEpochTime(4),generateEpochTime(4),generateEpochTime(5),generateEpochTime(.25),generateEpochTime(.25),generateEpochTime(2),generateEpochTime(.5),generateEpochTime(3),generateEpochTime(.2),generateEpochTime(10),generateEpochTime(18),generateEpochTime(22),generateEpochTime(40);const useStyles$c=makeStyles()(e=>({notiDetailContainer:{},root:{textAlign:"left",position:"relative"},header:{margin:"20px 30px"},mainTitle:{marginBottom:e.spacing(5),display:"flex",justifyContent:"space-between"},actionIcons:{margin:e.spacing(-2.5)},actionableBtnContainer:{padding:e.spacing(4.8,6,0,6),textAlign:"justify"},actionableBtn:{textTransform:"none",color:"#2A323C",fontSize:e.spacing(2.8),marginRight:e.spacing(2),"&:hover":{color:"#1B1D1F",backgroundColor:"#F2F5F9","& > span":{color:"#1B1D1F"}},"& > span":{color:"#555F7C"}},textTitle:{color:"#2A323C",fontWeight:400},content:{padding:e.spacing(0,6),textAlign:"justify"},actiondiv:{display:"flex",margin:e.spacing(1.4,6,5,6),alignItems:"center"},divider:{margin:e.spacing(4,6,0,6),height:"0.5px"},appName:{padding:e.spacing(0,2.4)},appNameTitle:{color:e.palette.text.primary},deleteIcon:{padding:e.spacing(1.6),marginLeft:e.spacing(2)},gradient:{zIndex:1,width:"calc(100% - 30px)",height:"111px",position:"absolute",bottom:0},iconImg:{width:24,height:24}})),GET_NOTIFICATION="os-notification-panel/GET_NOTIFICATION",GET_NOTIFICATION_START="os-notification-panel/GET_NOTIFICATION_START",GET_NOTIFICATION_SUCCESS="os-notification-panel/GET_NOTIFICATION_SUCCESS",GET_NOTIFICATION_ERROR="os-notification-panel/GET_NOTIFICATION_ERROR",GET_NOTIFICATION_ACTION_REQUEST="os-notification-panel/GET_NOTIFICATION_ACTION_REQUEST",GET_NOTIFICATION_ACTION_SUCCESS="os-notification-panel/GET_NOTIFICATION_ACTION_SUCCESS",GET_NOTIFICATION_ACTION_ERROR="os-notification-panel/GET_NOTIFICATION_ACTION_ERROR",UPDATE_FILTER="os-notification-panel/UPDATE_FILTER",UPDATE_BANNER_STYLE="os-notification-panel/UPDATE_BANNER_STYLE",UPDATE_APPLICATION_SETTING="os-notification-panel/UPDATE_APPLICATION_SETTING",UPDATE_APP_ALLOW_NOTIFICATION="os-notification-panel/UPDATE_APP_ALLOW_NOTIFICATION",GET_NOTIFICATION_LIST_REQUEST="os-notification-panel/GET_NOTIFICATION_LIST_REQUEST",GET_NOTIFICATION_LIST_SUCCESS="os-notification-panel/GET_NOTIFICATION_LIST_SUCCESS",GET_NOTIFICATION_LIST_FAIL="os-notification-panel/GET_NOTIFICATION_LIST_FAIL",UPDATE_NOTIFICATION_LIST="os-notification-panel/UPDATE_NOTIFICATION_LIST",UPDATE_NOTIFICATION_READ_REQUEST="os-notification-panel/UPDATE_NOTIFICATION_READ_REQUEST",UPDATE_NOTIFICATION_READ_SUCCESS="os-notification-panel/UPDATE_NOTIFICATION_READ_SUCCESS",UPDATE_NOTIFICATION_READ_FAIL="os-notification-panel/UPDATE_NOTIFICATION_READ_FAIL",ON_NOTIFICATION_ACTION_CLICKED="os-notification-panel/ON_NOTIFICATION_ACTION_CLICKED",INIT_NOTIFICATION_ACTION="os-notification-panel/INIT_NOTIFICATION_ACTION",MARK_ALL_READ_NOTIFICATION_REQUEST="os-notification-panel/MARK_ALL_READ_NOTIFICATION_REQUEST",MARK_ALL_READ_NOTIFICATION_SUCCESS="os-notification-panel/MARK_ALL_READ_NOTIFICATION_SUCCESS",MARK_ALL_READ_NOTIFICATION_FAIL="os-notification-panel/MARK_ALL_READ_NOTIFICATION_FAIL",getNotification=createAction(GET_NOTIFICATION,function(e,t,n){return{payload:{limit:t,offset:e,callback:n}}}),getNotificationStart=createAction(GET_NOTIFICATION_START,function(e,t){return{payload:{limit:t,offset:e}}}),initNotificationAction=createAction(INIT_NOTIFICATION_ACTION,function(e){return{payload:e}}),getNotificationSuccess=createAction(GET_NOTIFICATION_SUCCESS,function(e){return{payload:e}}),getNotificationError=createAction(GET_NOTIFICATION_ERROR,function(e){return{payload:e}}),getNotificationAction=createAction(GET_NOTIFICATION_ACTION_REQUEST,function(e){return{payload:e}}),getNotificationActionSuccess=createAction(GET_NOTIFICATION_ACTION_SUCCESS,function(e,t){return{payload:{notificationId:e,notificationActions:t}}}),getNotificationActionError=createAction(GET_NOTIFICATION_ACTION_ERROR),updateFilterValue=createAction(UPDATE_FILTER,function(e){return{payload:e}}),updateAppAllowNotification=createAction(UPDATE_APP_ALLOW_NOTIFICATION,function(e,t){return{payload:{appId:e,isAllowed:t}}}),updateBannerStyle=createAction(UPDATE_BANNER_STYLE,function(e){return{payload:e}}),updateUtilitySetting=createAction("os-notification-panel/UPDATE_UTILITY_SETTING",function(e){return{payload:e}}),updateApplicationSetting=createAction(UPDATE_APPLICATION_SETTING,function(e){return{payload:e}}),updateNotificationSetting=createAction("os-notification-panel/UPDATE_NOTI_SETTING",function(e){return{payload:e}}),updateAppActionAllowNotification=createAction("UPDATE_APP_ACTION_ALLOW_NOTIFICATION",function(e,t,n,i){return{payload:{appId:e,id:t,value:n,key:i}}}),getNotificationListByMailBoxRequest=createAction(GET_NOTIFICATION_LIST_REQUEST,function(e){return{payload:{mailBoxIds:e}}}),getNotificationListByMailBoxSuccess=createAction(GET_NOTIFICATION_LIST_SUCCESS,function(e){return{payload:e}}),getNotificationListByMailBoxFail=createAction(GET_NOTIFICATION_LIST_FAIL),updateNotificationList=createAction(UPDATE_NOTIFICATION_LIST,function(e){return{payload:e}}),updateNotificationReadRequest=createAction(UPDATE_NOTIFICATION_READ_REQUEST,function(e){return{payload:e}}),updateNotificationReadSuccess=createAction(UPDATE_NOTIFICATION_READ_SUCCESS,function(e){return{payload:e}}),updateNotificationReadFail=createAction(UPDATE_NOTIFICATION_READ_FAIL),onNotificationActionClicked=createAction(ON_NOTIFICATION_ACTION_CLICKED,function(e){return{payload:e}}),markAllReadNotificationRequest=createAction(MARK_ALL_READ_NOTIFICATION_REQUEST),markAllReadNotificationSuccess=createAction(MARK_ALL_READ_NOTIFICATION_SUCCESS),markAllReadNotificationFail=createAction(MARK_ALL_READ_NOTIFICATION_FAIL),MODE={ACTION:"actionable",INFO:"informational"};function NotificationDetailPanel({id:e,mode:t}){const a=useDispatch(),n=useStyles$c()["classes"];var i=useSelector(notificationDetailSelector(e));react.exports.useEffect(()=>{a(getNotificationAction(e))},[a,e]);return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx("div",Object.assign({className:n.notiDetailContainer,"data-testid":"notification-detail-panel"},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:n.root},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:n.actiondiv},{children:[null!=i&&i.icon?jsxRuntime.exports.jsx("img",{className:n.iconImg,src:null==i?void 0:i.icon,draggable:"false",alt:"icon"}):jsxRuntime.exports.jsx(Notifications,{}),jsxRuntime.exports.jsx("div",Object.assign({className:n.appName},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:n.appNameTitle},{children:(null==i?void 0:i.appName)||""}))})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedRelativeTime$1,{value:getRelativeValue(i.createdDateTime),updateIntervalInSeconds:60,unit:"minute",children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.mvPoLJ",defaultMessage:"Just now",description:"the time label of notification that received on 1 minute"}):react.exports.createElement("span",{},e)})}))})]})),jsxRuntime.exports.jsx("div",Object.assign({className:n.header},{children:jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",className:n.textTitle,"data-test":"notification-title","data-testid":"notification-title"},{children:convertHTMLEntities(null==i?void 0:i.title)}))})})),jsxRuntime.exports.jsx("div",Object.assign({className:n.content},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2"},{children:convertHTMLEntities(null==i?void 0:i.body)}))})),t===MODE.ACTION&&(null==i?void 0:i.actions)&&0<(null==(t=null==i?void 0:i.actions)?void 0:t.length)&&jsxRuntime.exports.jsx("div",Object.assign({className:n.actionableBtnContainer},{children:null==(t=null==i?void 0:i.actions)?void 0:t.map(e=>jsxRuntime.exports.jsx(Button,Object.assign({startIcon:jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:"button icon",width:"18px",height:"18px"}),className:n.actionableBtn,variant:e.variant,size:e.size,onClick:(i=>e=>{var t;if(null!=i&&i.url&&""!==(null==i?void 0:i.url)){const n=document.createElement("a");n.target="_blank",n.href=i.url,n.click()}else null!=(t=null==i?void 0:i.onClick)&&t.call(i,e),a(onNotificationActionClicked(i))})(e)},{children:e.label}),e.label))}))]}))}))})}!function(e){e.EMAIL="Email",e.NOTIFICATION_CENTER="Notification Center",e.BANNER="Banners"}(INotificationType=INotificationType||{});const filterAll="all",filters=[{value:filterAll,title:"All Applications"}],utilityNotificationSettingData=[{id:"notification-finder",type:"finder",title:"Data Center",iconUrl:img$1i,allow:!0,allowType:[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER],action:[{id:"shared-file",title:"Shared File",allow:!0,allowType:[]},{id:"shared-source",title:"Shared Source or Stream",allow:!1,allowType:[]},{id:"shared-folder",title:"Shared Folder",allow:!1,allowType:[]}]},{id:"notification-importer",type:"importer_tool",title:"Importer Tool",iconUrl:img$1h,allow:!0,allowType:[INotificationType.EMAIL,INotificationType.BANNER],action:[{id:"shared-file",title:"Shared File",allow:!0,allowType:[]},{id:"shared-source",title:"Shared Source or Stream",allow:!0,allowType:[]},{id:"shared-folder",title:"Shared Folder",allow:!0,allowType:[]}]},{id:"notification-engine",type:"engine_toolkit",title:"Engine Toolkit",iconUrl:img$1g,allow:!1,allowType:[],action:[{id:"shared-file",title:"Shared File",allow:!1,allowType:[]},{id:"shared-source",title:"Shared Source or Stream",allow:!1,allowType:[]},{id:"shared-folder",title:"Shared Folder",allow:!0,allowType:[]}]}],applicationNotificationSettingData={byId:{"notification-app-automate":{name:"Automate",iconUrl:img$1e,description:"Chose which events you’d like to be notified about.",allow:!1,allowType:[],action:{byId:{1:{title:"Completed Processes",allowType:[INotificationType.NOTIFICATION_CENTER],allow:!0},2:{title:"Processing Updated",allowType:[],allow:!1}},allIds:["1","2"]}},"notification-app-illuminate":{name:"Illuminate",iconUrl:img$1f,description:"Chose which events you’d like to be notified about.",allow:!0,allowType:[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER],action:{byId:{1:{title:"Error",allowType:[INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER,INotificationType.EMAIL],allow:!0}},allIds:["1"]}},"notification-app-redact":{name:"Redact",iconUrl:img$1d,description:"Chose which events you’d like to be notified about.",allow:!0,allowType:[INotificationType.EMAIL],action:{byId:{1:{title:"Processing Updated",allowType:[],allow:!1},2:{title:"Error",allowType:[INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER,INotificationType.EMAIL],allow:!1}},allIds:["1","2"]}}},allIds:["notification-app-automate","notification-app-illuminate","notification-app-redact"]},initialState={notifications:[],availableMailBoxes:0,limit:0,offset:0,status:"idle",filter:filterAll,failureMessage:"",paused:!1,settings:{allow:!0,allowType:[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER],bannerStyle:"temporary",enableUtilityNotification:!0,enableApplicationNotification:!0,utility:utilityNotificationSettingData,application:applicationNotificationSettingData}},notificationReducer=createReducer(initialState,e=>{e.addCase(getNotificationStart,(e,t)=>{var{limit:t,offset:n}=t.payload;return Object.assign(Object.assign({},e),{status:0===n?"loading":e.status,limit:t,offset:n})}).addCase(getNotificationSuccess,(e,t)=>Object.assign(Object.assign({},e),{status:"success",notifications:t.payload})).addCase(getNotificationError,(e,t)=>Object.assign(Object.assign({},e),{failureMessage:t.payload,status:"failure"})).addCase(updateFilterValue,(e,t)=>Object.assign(Object.assign({},e),{filter:t.payload})).addCase(updateAppAllowNotification,(e,t)=>{var{appId:t,isAllowed:n}=t.payload;return Object.assign(Object.assign({},e),{settings:Object.assign(Object.assign({},e.settings),{application:Object.assign(Object.assign({},e.settings.application),{byId:Object.assign(Object.assign({},e.settings.application.byId),{[t]:Object.assign(Object.assign({},e.settings.application.byId[t]),{allow:n})})})})})}).addCase(updateBannerStyle,(e,t)=>Object.assign(Object.assign({},e),{settings:Object.assign(Object.assign({},e.settings),{bannerStyle:t.payload})})).addCase(updateUtilitySetting,(e,t)=>Object.assign(Object.assign({},e),{settings:Object.assign(Object.assign({},e.settings),{utility:t.payload})})).addCase(updateNotificationSetting,(e,t)=>Object.assign(Object.assign({},e),{settings:t.payload})).addCase(updateAppActionAllowNotification,(e,t)=>{var{appId:t,id:n,value:i,key:a}=t.payload;return Object.assign(Object.assign({},e),{settings:Object.assign(Object.assign({},e.settings),{application:Object.assign(Object.assign({},e.settings.application),{byId:Object.assign(Object.assign({},e.settings.application.byId),{[t]:Object.assign(Object.assign({},e.settings.application.byId[t]),{action:Object.assign(Object.assign({},e.settings.application.byId[t].action),{byId:Object.assign(Object.assign({},e.settings.application.byId[t].action.byId),{[n]:Object.assign(Object.assign({},e.settings.application.byId[t].action.byId[n]),{[a]:i})})})})})})})})}).addCase(updateApplicationSetting,(e,t)=>Object.assign(Object.assign({},e),{settings:Object.assign(Object.assign({},e.settings),{application:t.payload})})).addCase(getNotificationListByMailBoxSuccess,(e,t)=>{var{data:t,limit:n,offset:i,availableMailBoxes:a}=t.payload;return Object.assign(Object.assign({},e),{status:"success",notifications:[...t,...e.notifications].sort((e,t)=>{e=new Date(e.createdDateTime).getTime();return new Date(t.createdDateTime).getTime()-e})||[],offset:i,limit:n,availableMailBoxes:a})}).addCase(getNotificationListByMailBoxFail,(e,t)=>Object.assign(Object.assign({},e),{status:"failure"})).addCase(updateNotificationList,(e,t)=>{t=t.payload;return Object.assign(Object.assign({},e),{notifications:[t,...e.notifications]})}).addCase(updateNotificationReadRequest,(e,t)=>Object.assign({},e)).addCase(updateNotificationReadSuccess,(e,t)=>{const{id:n,flags:i}=null==(t=null==(t=null==t?void 0:t.payload)?void 0:t.data)?void 0:t.setNotificationFlag;t=e.notifications.map(e=>e.id===n?Object.assign(Object.assign({},e),{flags:i}):e);return Object.assign(Object.assign({},e),{notifications:t})}).addCase(updateNotificationReadFail,(e,t)=>Object.assign({},e)).addCase(markAllReadNotificationRequest,(e,t)=>Object.assign({},e)).addCase(markAllReadNotificationSuccess,(e,t)=>Object.assign(Object.assign({},e),{notifications:e.notifications.map(e=>{return Object.assign(Object.assign({},e),{flags:null==(e=e.flags)?void 0:e.map(e=>e===NotificationFlag.unread?NotificationFlag.read:e)})})})).addCase(markAllReadNotificationFail,(e,t)=>Object.assign({},e)).addCase(getNotificationAction,(e,t)=>Object.assign({},e)).addCase(getNotificationActionSuccess,(e,t)=>{const{notificationId:n,notificationActions:i}=t.payload,a=i.map(e=>({iconUrl:e.icon,label:e.actionName,variant:"contained",size:"medium",color:"default",url:e.urlTemplate}));return Object.assign(Object.assign({},e),{notifications:e.notifications.map(e=>e.id!==n?e:Object.assign(Object.assign({},e),{actions:a}))})})});function __awaiter(e,r,s,l){return new(s=s||Promise)(function(n,t){function i(e){try{o(l.next(e))}catch(e){t(e)}}function a(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(i,a)}o((l=l.apply(e,r||[])).next())})}const handleNotificationListByMailBox=(t,n,i,a,o)=>__awaiter(void 0,void 0,void 0,function*(){var e={mailBoxIds:i,offset:a,limit:o};try{return yield baseGraphQLApi({query:`
|
|
73
|
+
}`,o),t=createApolloWs(s,r,o);const n=createApolloClient(t),a=n.subscribe({query:e}).subscribe({next(e){var t,n;"json"!==(null==(t=null==(t=null==e?void 0:e.data)?void 0:t.notificationPosted)?void 0:t.contentType)&&({title:t,body:n}=e.data.notificationPosted,t===MARK_ALL_NOTIFICATIONS_SEEN&&n===o?i(markAllNotificationsSeenSuccess()):i(pushDefaultMailBox(e.data.notificationPosted)))}});return()=>{a.unsubscribe(),n.stop()}})}function*websocketSagas(){subscriptionTask&&(yield cancel(subscriptionTask)),subscriptionTask=yield fork(function*(){for(var e=yield call(websocketInitChannel);;){var t=yield take(e);yield put(t)}})}function*defaultMailboxSagas(){mailboxSubscription&&(yield cancel(mailboxSubscription)),mailboxSubscription=yield fork(function*(){for(var e=yield call(defaultMailboxChannel);;){var t=yield take(e);yield put(t)}})}function*updateMailboxSetting(){yield websocketSagas()}function*updateUnseenCountSaga(e){var t,n=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);const a=yield select(panelSelector);var o=a.find(e=>e.panelId===notificationPanelId);try{o&&(yield delay(1e3),yield markAllNotificationsSeenSaga()),yield delay(2e3);var r=yield call(getUnseenCountApi,n,i),s=e.payload["mailboxId"];yield put(updateUnseenCount({notificationMailboxes:null==(t=null==r?void 0:r.data)?void 0:t.notificationMailboxes,mailboxId:s}))}catch(e){yield put(markAllNotificationsSeenFail())}}function*markAllNotificationsSeenSaga(){var e=yield select(mailboxIdSelector),t=(yield select(userSelector))["userId"],n=yield select(graphEndpointSelector),i=yield select(sessionTokenSelector);if(0<(null==e?void 0:e.length))try{(yield call(handleMarkAllNotificationsSeen,e,n,i)).error?yield put(markAllNotificationsSeenFail()):(yield put(markAllNotificationsSeenSuccess()),yield call(pushDefaultMailboxNotification,t,MARK_ALL_NOTIFICATIONS_SEEN,n,i))}catch(e){yield put(markAllNotificationsSeenFail())}}function*mailboxSaga(){yield all([takeLatest$1(requestSubscriber.type,subscriberSaga),takeLatest$1(setMailboxData.type,websocketSagas),takeLatest$1("UPDATE_MAILBOX_SETTING",updateMailboxSetting),takeEvery$1(pushNotification.type,updateUnseenCountSaga),takeEvery$1(subscribeDefaultMailboxRequest.type,defaultMailboxSagas),takeLatest$1(markAllNotificationsSeenRequest.type,markAllNotificationsSeenSaga)])}function getNotificationModule$1(){return{id:"mailbox-subscription",reducerMap:{[nameSpace$1]:mailboxReducer},sagas:[mailboxSaga],initialActions:[requestSubscriber(),subscribeDefaultMailboxRequest()]}}var FiberManualRecord={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(FiberManualRecord,"__esModule",{value:!0}),FiberManualRecord.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("circle",{cx:"12",cy:"12",r:"8"}),"FiberManualRecord"),default_1$1=FiberManualRecord.default=_default$1,RadioButtonUnchecked={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(RadioButtonUnchecked,"__esModule",{value:!0}),RadioButtonUnchecked.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),default_1=RadioButtonUnchecked.default=_default,CheckCircle=createSvgIcon$1(jsxRuntime.exports.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const nameSpace="osNotificationPanel",mailbox="mailbox",mailBoxSelector=e=>null!=e&&e[mailbox]?null==e?void 0:e[mailbox]:{},notificationSelector=e=>null!=e&&e[nameSpace]?e[nameSpace]:{},notificationSettingSelector=e=>{var t;return null!=(t=null==e?void 0:e[nameSpace])&&t.settings?null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings:{}},notificationUtilitiesSelector=e=>{var t;return null!=(t=null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings)&&t.utility?null==(e=null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings)?void 0:e.utility:[]},notificationApplicationsSelector=e=>{var t;return null!=(t=null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings)&&t.application?null==(e=null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings)?void 0:e.application:{}},notificationApplicationSelector=n=>e=>{var t;return null!=(t=null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings)&&t.application.byId[n]?null==(e=null==(t=null==e?void 0:e[nameSpace])?void 0:t.settings)?void 0:e.application.byId[n]:{}},notificationListSelector=e=>{return(null==(e=null==e?void 0:e[nameSpace])?void 0:e.notifications)||[]},filterSelector=e=>{return null==(e=null==e?void 0:e[nameSpace])?void 0:e.filter},applicationFilterSelector=e=>{const t=(null==(e=null==e?void 0:e.mailbox)?void 0:e.mailbox)||[];return t.map(e=>{var t;return{value:(null==(t=null==e?void 0:e.application)?void 0:t.applicationId)||"",title:(null==(t=null==e?void 0:e.application)?void 0:t.name)||""}}).filter((t,e,n)=>{return e===n.findIndex(e=>e.value===t.value)})},notificationDetailSelector=n=>e=>{const t=null==(e=null==e?void 0:e[nameSpace])?void 0:e.notifications;return t.find(e=>e.id===n)},notificationWithFilterSelector=createSelector(filterSelector,notificationListSelector,(t,e)=>e.filter(e=>"all"===t||e.appId===t));var luxon={};function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);t=new(Function.bind.apply(e,i));return n&&_setPrototypeOf(t,n.prototype),t}).apply(null,arguments)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(t,e)})(e)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};for(var n,i={},a=Object.keys(e),o=0;o<a.length;o++)n=a[o],0<=t.indexOf(n)||(i[n]=e[n]);return i}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _createForOfIteratorHelperLoose(e){var t=0;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(t=e[Symbol.iterator]()).next.bind(t);if(Array.isArray(e)||(e=_unsupportedIterableToArray(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(luxon,"__esModule",{value:!0});var LuxonError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(_wrapNativeSuper(Error)),InvalidDateTimeError=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidIntervalError=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidDurationError=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),ConflictingSpecificationError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),InvalidUnitError=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidArgumentError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),ZoneIsAbstractError=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return _inheritsLoose(t,e),t}(LuxonError),n="numeric",s="short",l="long",DATE_SHORT={year:n,month:n,day:n},DATE_MED={year:n,month:s,day:n},DATE_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s},DATE_FULL={year:n,month:l,day:n},DATE_HUGE={year:n,month:l,day:n,weekday:l},TIME_SIMPLE={hour:n,minute:n},TIME_WITH_SECONDS={hour:n,minute:n,second:n},TIME_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,timeZoneName:s},TIME_WITH_LONG_OFFSET={hour:n,minute:n,second:n,timeZoneName:l},TIME_24_SIMPLE={hour:n,minute:n,hour12:!1},TIME_24_WITH_SECONDS={hour:n,minute:n,second:n,hour12:!1},TIME_24_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:s},TIME_24_WITH_LONG_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:l},DATETIME_SHORT={year:n,month:n,day:n,hour:n,minute:n},DATETIME_SHORT_WITH_SECONDS={year:n,month:n,day:n,hour:n,minute:n,second:n},DATETIME_MED={year:n,month:s,day:n,hour:n,minute:n},DATETIME_MED_WITH_SECONDS={year:n,month:s,day:n,hour:n,minute:n,second:n},DATETIME_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s,hour:n,minute:n},DATETIME_FULL={year:n,month:l,day:n,hour:n,minute:n,timeZoneName:s},DATETIME_FULL_WITH_SECONDS={year:n,month:l,day:n,hour:n,minute:n,second:n,timeZoneName:s},DATETIME_HUGE={year:n,month:l,day:n,weekday:l,hour:n,minute:n,timeZoneName:l},DATETIME_HUGE_WITH_SECONDS={year:n,month:l,day:n,weekday:l,hour:n,minute:n,second:n,timeZoneName:l};function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e}function isInteger(e){return"number"==typeof e&&e%1==0}function isString(e){return"string"==typeof e}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}function hasIntl(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function hasFormatToParts(){return!isUndefined(Intl.DateTimeFormat.prototype.formatToParts)}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function maybeArray(e){return Array.isArray(e)?e:[e]}function bestBy(e,n,i){if(0!==e.length)return e.reduce(function(e,t){t=[n(t),t];return e&&i(e[0],t[0])===e[0]?e:t},null)[1]}function pick(n,e){return e.reduce(function(e,t){return e[t]=n[t],e},{})}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function integerBetween(e,t,n){return isInteger(e)&&t<=e&&e<=n}function floorMod(e,t){return e-t*Math.floor(e/t)}function padStart(e,t){void 0===t&&(t=2);var n=e<0?"-":"",e=n?-1*e:e,t=e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString();return n+t}function parseInteger(e){if(!isUndefined(e)&&null!==e&&""!==e)return parseInt(e,10)}function parseMillis(e){if(!isUndefined(e)&&null!==e&&""!==e)return e=1e3*parseFloat("0."+e),Math.floor(e)}function roundTo(e,t,n){void 0===n&&(n=!1);t=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*t)/t}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){var n=floorMod(t-1,12)+1;return 2===n?isLeapYear(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function objToLocalTS(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function weeksInWeekYear(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,e=e-1,e=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4==t||3==e?53:52}function untruncateYear(e){return 99<e?e:60<e?1900+e:2e3+e}function parseZoneInfo(e,t,n,i){void 0===i&&(i=null);var a,e=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},i=(i&&(o.timeZone=i),Object.assign({timeZoneName:t},o)),t=hasIntl();return t&&hasFormatToParts()?(a=new Intl.DateTimeFormat(n,i).formatToParts(e).find(function(e){return"timezonename"===e.type.toLowerCase()}))?a.value:null:t?(a=new Intl.DateTimeFormat(n,o).format(e),new Intl.DateTimeFormat(n,i).format(e).substring(a.length).replace(/^[, \u200e]+/,"")):null}function signedOffset(e,t){e=parseInt(e,10),Number.isNaN(e)&&(e=0),t=parseInt(t,10)||0;return 60*e+(e<0||Object.is(e,-0)?-t:t)}function asNumber(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new InvalidArgumentError("Invalid unit value "+e);return t}function normalizeObject(e,t,n){var i,a,o={};for(i in e)!hasOwnProperty(e,i)||0<=n.indexOf(i)||null!=(a=e[i])&&(o[t(i)]=asNumber(a));return o}function formatOffset(e,t){var n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),a=0<=e?"+":"-";switch(t){case"short":return a+padStart(n,2)+":"+padStart(i,2);case"narrow":return a+n+(0<i?":"+i:"");case"techie":return a+padStart(n,2)+padStart(i,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function timeObject(e){return pick(e,["hour","minute","second","millisecond"])}var ianaRegex=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function stringify(e){return JSON.stringify(e,Object.keys(e).sort())}var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsNarrow=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[].concat(monthsNarrow);case"short":return[].concat(monthsShort);case"long":return[].concat(monthsLong);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var weekdaysLong=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekdaysShort=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],weekdaysNarrow=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[].concat(weekdaysNarrow);case"short":return[].concat(weekdaysShort);case"long":return[].concat(weekdaysLong);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var meridiems=["AM","PM"],erasLong=["Before Christ","Anno Domini"],erasShort=["BC","AD"],erasNarrow=["B","A"];function eras(e){switch(e){case"narrow":return[].concat(erasNarrow);case"short":return[].concat(erasShort);case"long":return[].concat(erasLong);default:return null}}function meridiemForDateTime(e){return meridiems[e.hour<12?0:1]}function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}function monthForDateTime(e,t){return months(t)[e.month-1]}function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}function formatRelativeTime(e,t,n,i){void 0===n&&(n="always"),void 0===i&&(i=!1);var a={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var r="days"===e;switch(t){case 1:return r?"tomorrow":"next "+a[e][0];case-1:return r?"yesterday":"last "+a[e][0];case 0:return r?"today":"this "+a[e][0]}}var n=Object.is(t,-0)||t<0,o=Math.abs(t),t=1===o,s=a[e],i=i?!t&&s[2]||s[1]:t?a[e][0]:e;return n?o+" "+i+" ago":"in "+o+" "+i}function formatString(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(stringify(pick(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case stringify(DATE_SHORT):return"M/d/yyyy";case stringify(DATE_MED):return"LLL d, yyyy";case stringify(DATE_MED_WITH_WEEKDAY):return"EEE, LLL d, yyyy";case stringify(DATE_FULL):return"LLLL d, yyyy";case stringify(DATE_HUGE):return"EEEE, LLLL d, yyyy";case stringify(TIME_SIMPLE):return"h:mm a";case stringify(TIME_WITH_SECONDS):return"h:mm:ss a";case stringify(TIME_WITH_SHORT_OFFSET):case stringify(TIME_WITH_LONG_OFFSET):return"h:mm a";case stringify(TIME_24_SIMPLE):return"HH:mm";case stringify(TIME_24_WITH_SECONDS):return"HH:mm:ss";case stringify(TIME_24_WITH_SHORT_OFFSET):case stringify(TIME_24_WITH_LONG_OFFSET):return"HH:mm";case stringify(DATETIME_SHORT):return"M/d/yyyy, h:mm a";case stringify(DATETIME_MED):return"LLL d, yyyy, h:mm a";case stringify(DATETIME_FULL):return"LLLL d, yyyy, h:mm a";case stringify(DATETIME_HUGE):return t;case stringify(DATETIME_SHORT_WITH_SECONDS):return"M/d/yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_SECONDS):return"LLL d, yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_WEEKDAY):return"EEE, d LLL yyyy, h:mm a";case stringify(DATETIME_FULL_WITH_SECONDS):return"LLLL d, yyyy, h:mm:ss a";case stringify(DATETIME_HUGE_WITH_SECONDS):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}function stringifyTokens(e,t){for(var n="",i=_createForOfIteratorHelperLoose(e);!(a=i()).done;){var a=a.value;a.literal?n+=a.val:n+=t(a.val)}return n}var _macroTokenToFormatOpts={D:DATE_SHORT,DD:DATE_MED,DDD:DATE_FULL,DDDD:DATE_HUGE,t:TIME_SIMPLE,tt:TIME_WITH_SECONDS,ttt:TIME_WITH_SHORT_OFFSET,tttt:TIME_WITH_LONG_OFFSET,T:TIME_24_SIMPLE,TT:TIME_24_WITH_SECONDS,TTT:TIME_24_WITH_SHORT_OFFSET,TTTT:TIME_24_WITH_LONG_OFFSET,f:DATETIME_SHORT,ff:DATETIME_MED,fff:DATETIME_FULL,ffff:DATETIME_HUGE,F:DATETIME_SHORT_WITH_SECONDS,FF:DATETIME_MED_WITH_SECONDS,FFF:DATETIME_FULL_WITH_SECONDS,FFFF:DATETIME_HUGE_WITH_SECONDS},Formatter=function(){function f(e,t){this.opts=t,this.loc=e,this.systemLoc=null}f.create=function(e,t){return new f(e,t=void 0===t?{}:t)},f.parseFormat=function(e){for(var t=null,n="",i=!1,a=[],o=0;o<e.length;o++){var r=e.charAt(o);"'"===r?(0<n.length&&a.push({literal:i,val:n}),t=null,n="",i=!i):i||r===t?n+=r:(0<n.length&&a.push({literal:!1,val:n}),t=n=r)}return 0<n.length&&a.push({literal:i,val:n}),a},f.macroTokenToFormatOpts=function(e){return _macroTokenToFormatOpts[e]};var e=f.prototype;return e.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},e.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},e.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return padStart(e,t);var n=Object.assign({},this.opts);return 0<t&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},e.formatDateTimeFromString=function(n,e){var i=this,a="en"===this.loc.listingMode(),t=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&hasFormatToParts(),o=function(e,t){return i.loc.extract(n,e,t)},r=function(e){return n.isOffsetFixed&&0===n.offset&&e.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,e.format):""},s=function(){return a?meridiemForDateTime(n):o({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,t){return a?monthForDateTime(n,e):o(t?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,t){return a?weekdayForDateTime(n,e):o(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},u=function(e){var t=f.macroTokenToFormatOpts(e);return t?i.formatWithSystemDefault(n,t):e},d=function(e){return a?eraForDateTime(n,e):o({era:e},"era")};return stringifyTokens(f.parseFormat(e),function(e){switch(e){case"S":return i.num(n.millisecond);case"u":case"SSS":return i.num(n.millisecond,3);case"s":return i.num(n.second);case"ss":return i.num(n.second,2);case"m":return i.num(n.minute);case"mm":return i.num(n.minute,2);case"h":return i.num(n.hour%12==0?12:n.hour%12);case"hh":return i.num(n.hour%12==0?12:n.hour%12,2);case"H":return i.num(n.hour);case"HH":return i.num(n.hour,2);case"Z":return r({format:"narrow",allowZ:i.opts.allowZ});case"ZZ":return r({format:"short",allowZ:i.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:i.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:i.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:i.loc.locale});case"z":return n.zoneName;case"a":return s();case"d":return t?o({day:"numeric"},"day"):i.num(n.day);case"dd":return t?o({day:"2-digit"},"day"):i.num(n.day,2);case"c":return i.num(n.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return i.num(n.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return t?o({month:"numeric",day:"numeric"},"month"):i.num(n.month);case"LL":return t?o({month:"2-digit",day:"numeric"},"month"):i.num(n.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return t?o({month:"numeric"},"month"):i.num(n.month);case"MM":return t?o({month:"2-digit"},"month"):i.num(n.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return t?o({year:"numeric"},"year"):i.num(n.year);case"yy":return t?o({year:"2-digit"},"year"):i.num(n.year.toString().slice(-2),2);case"yyyy":return t?o({year:"numeric"},"year"):i.num(n.year,4);case"yyyyyy":return t?o({year:"numeric"},"year"):i.num(n.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return i.num(n.weekYear.toString().slice(-2),2);case"kkkk":return i.num(n.weekYear,4);case"W":return i.num(n.weekNumber);case"WW":return i.num(n.weekNumber,2);case"o":return i.num(n.ordinal);case"ooo":return i.num(n.ordinal,3);case"q":return i.num(n.quarter);case"qq":return i.num(n.quarter,2);case"X":return i.num(Math.floor(n.ts/1e3));case"x":return i.num(n.ts);default:return u(e)}})},e.formatDurationFromString=function(e,t){var n,i=this,a=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},t=f.parseFormat(t),o=t.reduce(function(e,t){var n=t.literal,t=t.val;return n?e:e.concat(t)},[]),e=e.shiftTo.apply(e,o.map(a).filter(function(e){return e}));return stringifyTokens(t,(n=e,function(e){var t=a(e);return t?i.num(n.get(t),e.length):e}))},f}(),Invalid=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Zone=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new ZoneIsAbstractError},t.formatOffset=function(e,t){throw new ZoneIsAbstractError},t.offset=function(e){throw new ZoneIsAbstractError},t.equals=function(e){throw new ZoneIsAbstractError},_createClass(e,[{key:"type",get:function(){throw new ZoneIsAbstractError}},{key:"name",get:function(){throw new ZoneIsAbstractError}},{key:"universal",get:function(){throw new ZoneIsAbstractError}},{key:"isValid",get:function(){throw new ZoneIsAbstractError}}]),e}(),singleton=null,LocalZone=function(e){function t(){return e.apply(this,arguments)||this}_inheritsLoose(t,e);var n=t.prototype;return n.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale)},n.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},_createClass(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return hasIntl()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return singleton=null===singleton?new t:singleton}}]),t}(Zone),matchingRegex=RegExp("^"+ianaRegex.source+"$"),dtfCache={};function makeDTF(e){return dtfCache[e]||(dtfCache[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),dtfCache[e]}var typeToPos={year:0,month:1,day:2,hour:3,minute:4,second:5};function hackyOffset(e,t){var e=e.format(t).replace(/\u200E/g,""),t=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e),e=t[1],n=t[2];return[t[3],e,n,t[4],t[5],t[6]]}function partsOffset(e,t){for(var n=e.formatToParts(t),i=[],a=0;a<n.length;a++){var o=n[a],r=o.type,o=o.value,r=typeToPos[r];isUndefined(r)||(i[r]=parseInt(o,10))}return i}var ianaZoneCache={},IANAZone=function(n){function i(e){var t=n.call(this)||this;return t.zoneName=e,t.valid=i.isValidZone(e),t}_inheritsLoose(i,n),i.create=function(e){return ianaZoneCache[e]||(ianaZoneCache[e]=new i(e)),ianaZoneCache[e]},i.resetCache=function(){ianaZoneCache={},dtfCache={}},i.isValidSpecifier=function(e){return!(!e||!e.match(matchingRegex))},i.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},i.parseGMTOffset=function(e){if(e){e=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(e)return-60*parseInt(e[1])}return null};var e=i.prototype;return e.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale,this.name)},e.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},e.offset=function(e){e=new Date(e);if(isNaN(e))return NaN;var t=makeDTF(this.name),t=(t.formatToParts?partsOffset:hackyOffset)(t,e),n=t[0],i=t[1],a=t[2],o=t[3],e=+e,r=e%1e3;return(objToLocalTS({year:n,month:i,day:a,hour:24===o?0:o,minute:t[4],second:t[5],millisecond:0})-(e-=0<=r?r:1e3+r))/6e4},e.equals=function(e){return"iana"===e.type&&e.name===this.name},_createClass(i,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),i}(Zone),singleton$1=null,FixedOffsetZone=function(n){function t(e){var t=n.call(this)||this;return t.fixed=e,t}_inheritsLoose(t,n),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){e=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new t(signedOffset(e[1],e[2]))}return null},_createClass(t,null,[{key:"utcInstance",get:function(){return singleton$1=null===singleton$1?new t(0):singleton$1}}]);var e=t.prototype;return e.offsetName=function(){return this.name},e.formatOffset=function(e,t){return formatOffset(this.fixed,t)},e.offset=function(){return this.fixed},e.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},_createClass(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+formatOffset(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Zone),InvalidZone=function(n){function e(e){var t=n.call(this)||this;return t.zoneName=e,t}_inheritsLoose(e,n);var t=e.prototype;return t.offsetName=function(){return null},t.formatOffset=function(){return""},t.offset=function(){return NaN},t.equals=function(){return!1},_createClass(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(Zone);function normalizeZone(e,t){var n;return isUndefined(e)||null===e?t:e instanceof Zone?e:isString(e)?"local"===(n=e.toLowerCase())?t:"utc"===n||"gmt"===n?FixedOffsetZone.utcInstance:null!=(t=IANAZone.parseGMTOffset(e))?FixedOffsetZone.instance(t):IANAZone.isValidSpecifier(n)?IANAZone.create(e):FixedOffsetZone.parseSpecifier(n)||new InvalidZone(e):isNumber(e)?FixedOffsetZone.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new InvalidZone(e)}var now=function(){return Date.now()},defaultZone=null,defaultLocale=null,defaultNumberingSystem=null,defaultOutputCalendar=null,throwOnInvalid=!1,Settings=function(){function e(){}return e.resetCaches=function(){Locale.resetCache(),IANAZone.resetCache()},_createClass(e,null,[{key:"now",get:function(){return now},set:function(e){now=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){defaultZone=e?normalizeZone(e):null}},{key:"defaultZone",get:function(){return defaultZone||LocalZone.instance}},{key:"defaultLocale",get:function(){return defaultLocale},set:function(e){defaultLocale=e}},{key:"defaultNumberingSystem",get:function(){return defaultNumberingSystem},set:function(e){defaultNumberingSystem=e}},{key:"defaultOutputCalendar",get:function(){return defaultOutputCalendar},set:function(e){defaultOutputCalendar=e}},{key:"throwOnInvalid",get:function(){return throwOnInvalid},set:function(e){throwOnInvalid=e}}]),e}(),intlDTCache={};function getCachedDTF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=intlDTCache[n];return i||(i=new Intl.DateTimeFormat(e,t),intlDTCache[n]=i),i}var intlNumCache={};function getCachedINF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),i=intlNumCache[n];return i||(i=new Intl.NumberFormat(e,t),intlNumCache[n]=i),i}var intlRelCache={};function getCachedRTF(e,t){var n=t=void 0===t?{}:t,n=(n.base,_objectWithoutPropertiesLoose(n,["base"])),n=JSON.stringify([e,n]),i=intlRelCache[n];return i||(i=new Intl.RelativeTimeFormat(e,t),intlRelCache[n]=i),i}var sysLocaleCache=null;function systemLocale(){var e;return sysLocaleCache=sysLocaleCache||(hasIntl()?(e=(new Intl.DateTimeFormat).resolvedOptions().locale)&&"und"!==e?e:"en-US":"en-US")}function parseLocaleString(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,t=e.substring(0,t);try{n=getCachedDTF(e).resolvedOptions()}catch(e){n=getCachedDTF(t).resolvedOptions()}e=n;return[t,e.numberingSystem,e.calendar]}function intlConfigString(e,t,n){return hasIntl()?((n||t)&&(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t)),e):[]}function mapMonths(e){for(var t=[],n=1;n<=12;n++){var i=DateTime.utc(2016,n,1);t.push(e(i))}return t}function mapWeekdays(e){for(var t=[],n=1;n<=7;n++){var i=DateTime.utc(2016,11,13+n);t.push(e(i))}return t}function listStuff(e,t,n,i,a){e=e.listingMode(n);return"error"===e?null:("en"===e?i:a)(t)}function supportsFastNumbers(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||hasIntl()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}var PolyNumberFormatter=function(){function e(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&hasIntl()&&(t={useGrouping:!1},0<n.padTo&&(t.minimumIntegerDigits=n.padTo),this.inf=getCachedINF(e,t))}return e.prototype.format=function(e){var t;return this.inf?(t=this.floor?Math.floor(e):e,this.inf.format(t)):padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)},e}(),PolyDateFormatter=function(){function e(e,t,n){var i,a,o;this.opts=n,this.hasIntl=hasIntl(),e.zone.universal&&this.hasIntl?(a=e.offset/60*-1,o=IANAZone.isValidZone(a=0<=a?"Etc/GMT+"+a:"Etc/GMT"+a),0!==e.offset&&o?(i=a,this.dt=e):(i="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:DateTime.fromMillis(e.ts+60*e.offset*1e3))):"local"===e.zone.type?this.dt=e:i=(this.dt=e).zone.name,this.hasIntl&&(o=Object.assign({},this.opts),i&&(o.timeZone=i),this.dtf=getCachedDTF(t,o))}var t=e.prototype;return t.format=function(){var e,t;return this.hasIntl?this.dtf.format(this.dt.toJSDate()):(e=formatString(this.opts),t=Locale.create("en-US"),Formatter.create(t).formatDateTimeFromString(this.dt,e))},t.formatToParts=function(){return this.hasIntl&&hasFormatToParts()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),PolyRelFormatter=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&hasRelative()&&(this.rtf=getCachedRTF(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):formatRelativeTime(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),Locale=function(){function a(e,t,n,i){var e=parseLocaleString(e),a=e[0],o=e[1],e=e[2];this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||e||null,this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}a.fromOpts=function(e){return a.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},a.create=function(e,t,n,i){void 0===i&&(i=!1);e=e||Settings.defaultLocale;return new a(e||(i?"en-US":systemLocale()),t||Settings.defaultNumberingSystem,n||Settings.defaultOutputCalendar,e)},a.resetCache=function(){sysLocaleCache=null,intlDTCache={},intlNumCache={},intlRelCache={}},a.fromObject=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar;return a.create(t,n,e)};var e=a.prototype;return e.listingMode=function(e){void 0===e&&(e=!0);var t=hasIntl()&&hasFormatToParts(),n=this.isEnglish(),i=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&i||e?!t||n&&i?"en":"intl":"error"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?a.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},e.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},e.months=function(n,i,e){var a=this;return void 0===i&&(i=!1),listStuff(this,n,e=void 0===e?!0:e,months,function(){var t=i?{month:n,day:"numeric"}:{month:n},e=i?"format":"standalone";return a.monthsCache[e][n]||(a.monthsCache[e][n]=mapMonths(function(e){return a.extract(e,t,"month")})),a.monthsCache[e][n]})},e.weekdays=function(n,i,e){var a=this;return void 0===i&&(i=!1),listStuff(this,n,e=void 0===e?!0:e,weekdays,function(){var t=i?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},e=i?"format":"standalone";return a.weekdaysCache[e][n]||(a.weekdaysCache[e][n]=mapWeekdays(function(e){return a.extract(e,t,"weekday")})),a.weekdaysCache[e][n]})},e.meridiems=function(e){var n=this;return listStuff(this,void 0,e=void 0===e?!0:e,function(){return meridiems},function(){var t;return n.meridiemCache||(t={hour:"numeric",hour12:!0},n.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map(function(e){return n.extract(e,t,"dayperiod")})),n.meridiemCache})},e.eras=function(e,t){var n=this;return listStuff(this,e,t=void 0===t?!0:t,eras,function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map(function(e){return n.extract(e,t,"era")})),n.eraCache[e]})},e.extract=function(e,t,n){e=this.dtFormatter(e,t).formatToParts().find(function(e){return e.type.toLowerCase()===n});return e?e.value:null},e.numberFormatter=function(e){return new PolyNumberFormatter(this.intl,(e=void 0===e?{}:e).forceSimple||this.fastNumbers,e)},e.dtFormatter=function(e,t){return new PolyDateFormatter(e,this.intl,t=void 0===t?{}:t)},e.relFormatter=function(e){return void 0===e&&(e={}),new PolyRelFormatter(this.intl,this.isEnglish(),e)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||hasIntl()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},_createClass(a,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=supportsFastNumbers(this)),this.fastNumbersCached}}]),a}();function combineRegexes(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce(function(e,t){return e+t.source},"");return RegExp("^"+i+"$")}function combineExtractors(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(o){return t.reduce(function(e,t){var n=e[0],i=e[1],e=e[2],t=t(o,e),e=t[0],a=t[1],t=t[2];return[Object.assign(n,e),i||a,t]},[{},null,1]).slice(0,2)}}function parse(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(var a=0,o=n;a<o.length;a++){var r=o[a],s=r[0],r=r[1],s=s.exec(e);if(s)return r(s)}return[null,null]}function simpleParse(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];return function(e,t){for(var n={},i=0;i<a.length;i++)n[a[i]]=parseInteger(e[t+i]);return[n,null,t+i]}}var offsetRegex=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,isoTimeBaseRegex=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,isoTimeRegex=RegExp(""+isoTimeBaseRegex.source+offsetRegex.source+"?"),isoTimeExtensionRegex=RegExp("(?:T"+isoTimeRegex.source+")?"),isoYmdRegex=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,isoWeekRegex=/(\d{4})-?W(\d\d)(?:-?(\d))?/,isoOrdinalRegex=/(\d{4})-?(\d{3})/,extractISOWeekData=simpleParse("weekYear","weekNumber","weekDay"),extractISOOrdinalData=simpleParse("year","ordinal"),sqlYmdRegex=/(\d{4})-(\d\d)-(\d\d)/,sqlTimeRegex=RegExp(isoTimeBaseRegex.source+" ?(?:"+offsetRegex.source+"|("+ianaRegex.source+"))?"),sqlTimeExtensionRegex=RegExp("(?: "+sqlTimeRegex.source+")?");function int(e,t,n){e=e[t];return isUndefined(e)?n:parseInteger(e)}function extractISOYmd(e,t){return[{year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)},null,t+3]}function extractISOTime(e,t){return[{hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){var n=!e[t]&&!e[t+1],e=signedOffset(e[t+1],e[t+2]);return[{},n?null:FixedOffsetZone.instance(e),t+3]}function extractIANAZone(e,t){return[{},e[t]?IANAZone.create(e[t]):null,t+1]}var isoTimeOnly=RegExp("^T?"+isoTimeBaseRegex.source+"$"),isoDuration=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function extractISODuration(e){function t(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&u)?-e:e}var n=e[0],i=e[1],a=e[2],o=e[3],r=e[4],s=e[5],l=e[6],c=e[7],e=e[8],u="-"===n[0],n=c&&"-"===c[0];return[{years:t(parseInteger(i)),months:t(parseInteger(a)),weeks:t(parseInteger(o)),days:t(parseInteger(r)),hours:t(parseInteger(s)),minutes:t(parseInteger(l)),seconds:t(parseInteger(c),"-0"===c),milliseconds:t(parseMillis(e),n)}]}var obsOffsets={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,n,i,a,o,r){t={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:monthsShort.indexOf(n)+1,day:parseInteger(i),hour:parseInteger(a),minute:parseInteger(o)};return r&&(t.second=parseInteger(r)),e&&(t.weekday=3<e.length?weekdaysLong.indexOf(e)+1:weekdaysShort.indexOf(e)+1),t}var rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){var t=e[1],n=e[2],i=e[3],a=e[4],o=e[5],r=e[6],s=e[7],l=e[8],c=e[9],u=e[10],e=e[11],t=fromStrings(t,a,i,n,o,r,s),a=l?obsOffsets[l]:c?0:signedOffset(u,e);return[t,new FixedOffsetZone(a)]}function preprocessRFC2822(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var rfc1123=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rfc850=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ascii=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){var t=e[1],n=e[2],i=e[3];return[fromStrings(t,e[4],i,n,e[5],e[6],e[7]),FixedOffsetZone.utcInstance]}function extractASCII(e){var t=e[1],n=e[2],i=e[3],a=e[4],o=e[5],r=e[6];return[fromStrings(t,e[7],n,i,a,o,r),FixedOffsetZone.utcInstance]}var isoYmdWithTimeExtensionRegex=combineRegexes(isoYmdRegex,isoTimeExtensionRegex),isoWeekWithTimeExtensionRegex=combineRegexes(isoWeekRegex,isoTimeExtensionRegex),isoOrdinalWithTimeExtensionRegex=combineRegexes(isoOrdinalRegex,isoTimeExtensionRegex),isoTimeCombinedRegex=combineRegexes(isoTimeRegex),extractISOYmdTimeAndOffset=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset),extractISOWeekTimeAndOffset=combineExtractors(extractISOWeekData,extractISOTime,extractISOOffset),extractISOOrdinalDateAndTime=combineExtractors(extractISOOrdinalData,extractISOTime,extractISOOffset),extractISOTimeAndOffset=combineExtractors(extractISOTime,extractISOOffset);function parseISODate(e){return parse(e,[isoYmdWithTimeExtensionRegex,extractISOYmdTimeAndOffset],[isoWeekWithTimeExtensionRegex,extractISOWeekTimeAndOffset],[isoOrdinalWithTimeExtensionRegex,extractISOOrdinalDateAndTime],[isoTimeCombinedRegex,extractISOTimeAndOffset])}function parseRFC2822Date(e){return parse(preprocessRFC2822(e),[rfc2822,extractRFC2822])}function parseHTTPDate(e){return parse(e,[rfc1123,extractRFC1123Or850],[rfc850,extractRFC1123Or850],[ascii,extractASCII])}function parseISODuration(e){return parse(e,[isoDuration,extractISODuration])}var extractISOTimeOnly=combineExtractors(extractISOTime);function parseISOTimeOnly(e){return parse(e,[isoTimeOnly,extractISOTimeOnly])}var sqlYmdWithTimeExtensionRegex=combineRegexes(sqlYmdRegex,sqlTimeExtensionRegex),sqlTimeCombinedRegex=combineRegexes(sqlTimeRegex),extractISOYmdTimeOffsetAndIANAZone=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),extractISOTimeOffsetAndIANAZone=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(e){return parse(e,[sqlYmdWithTimeExtensionRegex,extractISOYmdTimeOffsetAndIANAZone],[sqlTimeCombinedRegex,extractISOTimeOffsetAndIANAZone])}var INVALID="Invalid Duration",lowOrderMatrix={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},casualMatrix=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},lowOrderMatrix),daysInYearAccurate=365.2425,daysInMonthAccurate=30.436875,accurateMatrix=Object.assign({years:{quarters:4,months:12,weeks:daysInYearAccurate/7,days:daysInYearAccurate,hours:24*daysInYearAccurate,minutes:24*daysInYearAccurate*60,seconds:24*daysInYearAccurate*60*60,milliseconds:24*daysInYearAccurate*60*60*1e3},quarters:{months:3,weeks:daysInYearAccurate/28,days:daysInYearAccurate/4,hours:24*daysInYearAccurate/4,minutes:24*daysInYearAccurate*60/4,seconds:24*daysInYearAccurate*60*60/4,milliseconds:24*daysInYearAccurate*60*60*1e3/4},months:{weeks:daysInMonthAccurate/7,days:daysInMonthAccurate,hours:24*daysInMonthAccurate,minutes:24*daysInMonthAccurate*60,seconds:24*daysInMonthAccurate*60*60,milliseconds:24*daysInMonthAccurate*60*60*1e3}},lowOrderMatrix),orderedUnits=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],reverseUnits=orderedUnits.slice(0).reverse();function clone(e,t,n){n={values:(n=void 0===n?!1:n)?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Duration(n)}function antiTrunc(e){return e<0?Math.floor(e):Math.ceil(e)}function convert(e,t,n,i,a){var e=e[a][n],o=t[n]/e,o=!(Math.sign(o)===Math.sign(i[a]))&&0!==i[a]&&Math.abs(o)<=1?antiTrunc(o):Math.trunc(o);i[a]+=o,t[n]-=o*e}function normalizeValues(n,i){reverseUnits.reduce(function(e,t){return isUndefined(i[t])?e:(e&&convert(n,i,e,i,t),t)},null)}var Duration=function(){function p(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Locale.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?accurateMatrix:casualMatrix,this.isLuxonDuration=!0}p.fromMillis=function(e,t){return p.fromObject(Object.assign({milliseconds:e},t))},p.fromObject=function(e){if(null==e||"object"!=typeof e)throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new p({values:normalizeObject(e,p.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Locale.fromObject(e),conversionAccuracy:e.conversionAccuracy})},p.fromISO=function(e,t){var n=parseISODuration(e)[0];return n?(n=Object.assign(n,t),p.fromObject(n)):p.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},p.fromISOTime=function(e,t){var n=parseISOTimeOnly(e)[0];return n?(n=Object.assign(n,t),p.fromObject(n)):p.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},p.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Duration is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDurationError(e);return new p({invalid:e})},p.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)},p.isDuration=function(e){return e&&e.isLuxonDuration||!1};var e=p.prototype;return e.toFormat=function(e,t){void 0===t&&(t={});t=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Formatter.create(this.loc,t).formatDurationFromString(this,e):INVALID},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},e.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||864e5<=t)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var t=this.shiftTo("hours","minutes","seconds","milliseconds"),n="basic"===e.format?"hhmm":"hh:mm",t=(e.suppressSeconds&&0===t.seconds&&0===t.milliseconds||(n+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===t.milliseconds||(n+=".SSS")),t.toFormat(n));return t=e.includePrefix?"T"+t:t},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(e){if(!this.isValid)return this;for(var t=friendlyDuration(e),n={},i=_createForOfIteratorHelperLoose(orderedUnits);!(a=i()).done;){var a=a.value;(hasOwnProperty(t.values,a)||hasOwnProperty(this.values,a))&&(n[a]=t.get(a)+this.get(a))}return clone(this,{values:n},!0)},e.minus=function(e){if(!this.isValid)return this;e=friendlyDuration(e);return this.plus(e.negate())},e.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,i=Object.keys(this.values);n<i.length;n++){var a=i[n];t[a]=asNumber(e(this.values[a],a))}return clone(this,{values:t},!0)},e.get=function(e){return this[p.normalizeUnit(e)]},e.set=function(e){return this.isValid?clone(this,{values:Object.assign(this.values,normalizeObject(e,p.normalizeUnit,[]))}):this},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.conversionAccuracy,t={loc:this.loc.clone({locale:t,numberingSystem:n})};return e&&(t.conversionAccuracy=e),clone(this,t)},e.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},e.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return normalizeValues(this.matrix,e),clone(this,{values:e},!0)},e.shiftTo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!this.isValid)return this;if(0===t.length)return this;for(var i,t=t.map(function(e){return p.normalizeUnit(e)}),a={},o={},r=this.toObject(),s=_createForOfIteratorHelperLoose(orderedUnits);!(m=s()).done;){var l=m.value;if(0<=t.indexOf(l)){var c,u=l,d=0;for(c in o)d+=this.matrix[c][l]*o[c],o[c]=0;isNumber(r[l])&&(d+=r[l]);var f,m=Math.trunc(d);for(f in a[l]=m,o[l]=d-m,r)orderedUnits.indexOf(f)>orderedUnits.indexOf(l)&&convert(this.matrix,r,f,a,l)}else isNumber(r[l])&&(o[l]=r[l])}for(i in o)0!==o[i]&&(a[u]+=i===u?o[i]:o[i]/this.matrix[u][i]);return clone(this,{values:a},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var i=n[t];e[i]=-this.values[i]}return clone(this,{values:e},!0)},e.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=_createForOfIteratorHelperLoose(orderedUnits);!(i=n()).done;){var i=i.value;if(t=this.values[i],i=e.values[i],!(void 0===t||0===t?void 0===i||0===i:t===i))return!1}return!0},_createClass(p,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),p}();function friendlyDuration(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if("object"==typeof e)return Duration.fromObject(e);throw new InvalidArgumentError("Unknown duration argument "+e+" of type "+typeof e)}var INVALID$1="Invalid Interval";function validateStartEnd(e,t){return e&&e.isValid?t&&t.isValid?t<e?Interval.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:Interval.invalid("missing or invalid end"):Interval.invalid("missing or invalid start")}var Interval=function(){function c(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}c.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Interval is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidIntervalError(e);return new c({invalid:e})},c.fromDateTimes=function(e,t){var e=friendlyDateTime(e),t=friendlyDateTime(t),n=validateStartEnd(e,t);return null==n?new c({start:e,end:t}):n},c.after=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e,e.plus(t))},c.before=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e.minus(t),e)},c.fromISO=function(e,t){var n,i,a,o=(e||"").split("/",2),r=o[0],s=o[1];if(r&&s){try{l=(n=DateTime.fromISO(r,t)).isValid}catch(s){l=!1}try{a=(i=DateTime.fromISO(s,t)).isValid}catch(s){a=!1}if(l&&a)return c.fromDateTimes(n,i);if(l){o=Duration.fromISO(s,t);if(o.isValid)return c.after(n,o)}else if(a){var l=Duration.fromISO(r,t);if(l.isValid)return c.before(i,l)}}return c.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},c.isInterval=function(e){return e&&e.isLuxonInterval||!1};var e=c.prototype;return e.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},e.count=function(e){if(!this.isValid)return NaN;var t=this.start.startOf(e=void 0===e?"milliseconds":e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},e.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},e.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function(e){return!!this.isValid&&this.s>e},e.isBefore=function(e){return!!this.isValid&&this.e<=e},e.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},e.set=function(e){var e=void 0===e?{}:e,t=e.start,e=e.end;return this.isValid?c.fromDateTimes(t||this.s,e||this.e):this},e.splitAt=function(){var t=this;if(!this.isValid)return[];for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];for(var a=n.map(friendlyDateTime).filter(function(e){return t.contains(e)}).sort(),o=[],r=this.s,s=0;r<this.e;){var l=a[s]||this.e,l=+l>+this.e?this.e:l;o.push(c.fromDateTimes(r,l)),r=l,s+=1}return o},e.splitBy=function(e){var t=friendlyDuration(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];for(var n=this.s,i=1,a=[];n<this.e;){var o=this.start.plus(t.mapUnits(function(e){return e*i})),o=+o>+this.e?this.e:o;a.push(c.fromDateTimes(n,o)),n=o,i+=1}return a},e.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},e.overlaps=function(e){return this.e>e.s&&this.s<e.e},e.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},e.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},e.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},e.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},e.intersection=function(e){if(!this.isValid)return this;var t=(this.s>e.s?this:e).s,e=(this.e<e.e?this:e).e;return e<=t?null:c.fromDateTimes(t,e)},e.union=function(e){if(!this.isValid)return this;var t=(this.s<e.s?this:e).s,e=(this.e>e.e?this:e).e;return c.fromDateTimes(t,e)},c.merge=function(e){var e=e.sort(function(e,t){return e.s-t.s}).reduce(function(e,t){var n=e[0],e=e[1];return e?e.overlaps(t)||e.abutsStart(t)?[n,e.union(t)]:[n.concat([e]),t]:[n,t]},[[],null]),t=e[0],e=e[1];return e&&t.push(e),t},c.xor=function(e){for(var t,n=null,i=0,a=[],e=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),o=_createForOfIteratorHelperLoose((t=Array.prototype).concat.apply(t,e).sort(function(e,t){return e.time-t.time}));!(r=o()).done;)var r=r.value,n=1===(i+="s"===r.type?1:-1)?r.time:(n&&+n!=+r.time&&a.push(c.fromDateTimes(n,r.time)),null);return c.merge(a)},e.difference=function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return c.xor([this].concat(n)).map(function(e){return t.intersection(e)}).filter(function(e){return e&&!e.isEmpty()})},e.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":INVALID$1},e.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):INVALID$1},e.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():INVALID$1},e.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):INVALID$1},e.toFormat=function(e,t){t=(void 0===t?{}:t).separator,t=void 0===t?" – ":t;return this.isValid?""+this.s.toFormat(e)+t+this.e.toFormat(e):INVALID$1},e.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Duration.invalid(this.invalidReason)},e.mapEndpoints=function(e){return c.fromDateTimes(e(this.s),e(this.e))},_createClass(c,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),c}(),Info=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Settings.defaultZone);var t=DateTime.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return IANAZone.isValidSpecifier(e)&&IANAZone.isValidZone(e)},e.normalizeZone=function(e){return normalizeZone(e,Settings.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,i=t.numberingSystem,a=t.locObj,a=void 0===a?null:a,t=t.outputCalendar;return(a||Locale.create(void 0===n?null:n,void 0===i?null:i,void 0===t?"gregory":t)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,i=t.numberingSystem,a=t.locObj,a=void 0===a?null:a,t=t.outputCalendar;return(a||Locale.create(void 0===n?null:n,void 0===i?null:i,void 0===t?"gregory":t)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,i=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===i?null:i,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,i=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===i?null:i,null)).weekdays(e,!0)},e.meridiems=function(e){e=(void 0===e?{}:e).locale;return Locale.create(void 0===e?null:e).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");t=(void 0===t?{}:t).locale;return Locale.create(void 0===t?null:t,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,i=!1;if(hasIntl()){e=!0,t=hasFormatToParts(),i=hasRelative();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:i}},e}();function dayDiff(e,t){function n(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()}t=n(t)-n(e);return Math.floor(Duration.fromMillis(t).as("days"))}function highOrderDiffs(e,t,n){for(var i={},a=0,o=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){e=dayDiff(e,t);return(e-e%7)/7}],["days",dayDiff]];a<o.length;a++){var r,s,l,c=o[a],u=c[0],c=c[1];0<=n.indexOf(u)&&(r=u,c=c(e,t),t<(l=e.plus(((s={})[u]=c,s)))?(e=e.plus(((s={})[u]=c-1,s)),--c):e=l,i[u]=c)}return[e,i,l,r]}function _diff(e,t,n,i){var e=highOrderDiffs(e,t,n),a=e[0],o=e[1],r=e[2],e=e[3],s=t-a,n=n.filter(function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}),t=(0===n.length&&(r=r<t?a.plus(((t={})[e]=1,t)):r)!==a&&(o[e]=(o[e]||0)+s/(r-a)),Duration.fromObject(Object.assign(o,i)));return 0<n.length?(e=Duration.fromMillis(s,i)).shiftTo.apply(e,n).plus(t):t}var numberingSystems={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},numberingSystemsUTF16={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},hanidecChars=numberingSystems.hanidec.replace(/[\[|\]]/g,"").split("");function parseDigits(e){var t=parseInt(e,10);if(isNaN(t)){for(var t="",n=0;n<e.length;n++){var i=e.charCodeAt(n);if(-1!==e[n].search(numberingSystems.hanidec))t+=hanidecChars.indexOf(e[n]);else for(var a in numberingSystemsUTF16){var a=numberingSystemsUTF16[a],o=a[0],a=a[1];o<=i&&i<=a&&(t+=i-o)}}return parseInt(t,10)}return t}function digitRegex(e,t){e=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+numberingSystems[e||"latn"]+t)}var MISSING_FTP="missing Intl.DateTimeFormat.formatToParts support";function intUnit(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){e=e[0];return t(parseDigits(e))}}}var NBSP=String.fromCharCode(160),spaceOrNBSP="( |"+NBSP+")",spaceOrNBSPRegExp=new RegExp(spaceOrNBSP,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(spaceOrNBSPRegExp,spaceOrNBSP)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(spaceOrNBSPRegExp," ").toLowerCase()}function oneOf(n,i){return null===n?null:{regex:RegExp(n.map(fixListRegex).join("|")),deser:function(e){var t=e[0];return n.findIndex(function(e){return stripInsensitivities(t)===stripInsensitivities(e)})+i}}}function offset(e,t){return{regex:e,deser:function(e){return signedOffset(e[1],e[2])},groups:t}}function simple(e){return{regex:e,deser:function(e){return e[0]}}}function escapeToken(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function unitForToken(t,n){function i(e){return{regex:RegExp(escapeToken(e.val)),deser:function(e){return e[0]},literal:!0}}var a=digitRegex(n),o=digitRegex(n,"{2}"),r=digitRegex(n,"{3}"),s=digitRegex(n,"{4}"),l=digitRegex(n,"{6}"),c=digitRegex(n,"{1,2}"),u=digitRegex(n,"{1,3}"),d=digitRegex(n,"{1,6}"),f=digitRegex(n,"{1,9}"),m=digitRegex(n,"{2,4}"),p=digitRegex(n,"{4,6}"),e=function(e){if(t.literal)return i(e);switch(e.val){case"G":return oneOf(n.eras("short",!1),0);case"GG":return oneOf(n.eras("long",!1),0);case"y":return intUnit(d);case"yy":return intUnit(m,untruncateYear);case"yyyy":return intUnit(s);case"yyyyy":return intUnit(p);case"yyyyyy":return intUnit(l);case"M":return intUnit(c);case"MM":return intUnit(o);case"MMM":return oneOf(n.months("short",!0,!1),1);case"MMMM":return oneOf(n.months("long",!0,!1),1);case"L":return intUnit(c);case"LL":return intUnit(o);case"LLL":return oneOf(n.months("short",!1,!1),1);case"LLLL":return oneOf(n.months("long",!1,!1),1);case"d":return intUnit(c);case"dd":return intUnit(o);case"o":return intUnit(u);case"ooo":return intUnit(r);case"HH":return intUnit(o);case"H":return intUnit(c);case"hh":return intUnit(o);case"h":return intUnit(c);case"mm":return intUnit(o);case"m":case"q":return intUnit(c);case"qq":return intUnit(o);case"s":return intUnit(c);case"ss":return intUnit(o);case"S":return intUnit(u);case"SSS":return intUnit(r);case"u":return simple(f);case"a":return oneOf(n.meridiems(),0);case"kkkk":return intUnit(s);case"kk":return intUnit(m,untruncateYear);case"W":return intUnit(c);case"WW":return intUnit(o);case"E":case"c":return intUnit(a);case"EEE":return oneOf(n.weekdays("short",!1,!1),1);case"EEEE":return oneOf(n.weekdays("long",!1,!1),1);case"ccc":return oneOf(n.weekdays("short",!0,!1),1);case"cccc":return oneOf(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp("([+-]"+c.source+")(?::("+o.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+c.source+")("+o.source+")?"),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return i(e)}}(t)||{invalidReason:MISSING_FTP};return e.token=t,e}var partTypeStyleToTokenVal={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function tokenForPart(e,t,n){var i=e.type,e=e.value;if("literal"===i)return{literal:!0,val:e};e=n[i],n=partTypeStyleToTokenVal[i];return(n="object"==typeof n?n[e]:n)?{literal:!1,val:n}:void 0}function buildRegex(e){return["^"+e.map(function(e){return e.regex}).reduce(function(e,t){return e+"("+t.source+")"},"")+"$",e]}function match(e,t,n){var i=e.match(t);if(i){var a,o,r,s={},l=1;for(a in n)hasOwnProperty(n,a)&&(r=(o=n[a]).groups?o.groups+1:1,!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(i.slice(l,l+r))),l+=r);return[i,s]}return[i,{}]}function dateTimeFromMatches(i){var e=isUndefined(i.Z)?isUndefined(i.z)?null:IANAZone.create(i.z):new FixedOffsetZone(i.Z);return isUndefined(i.q)||(i.M=3*(i.q-1)+1),isUndefined(i.h)||(i.h<12&&1===i.a?i.h+=12:12===i.h&&0===i.a&&(i.h=0)),0===i.G&&i.y&&(i.y=-i.y),isUndefined(i.u)||(i.S=parseMillis(i.u)),[Object.keys(i).reduce(function(e,t){var n=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(t);return n&&(e[n]=i[t]),e},{}),e]}var dummyDateTimeCache=null;function getDummyDateTime(){return dummyDateTimeCache=dummyDateTimeCache||DateTime.fromMillis(1555555555555)}function maybeExpandMacroToken(e,t){if(e.literal)return e;var n=Formatter.macroTokenToFormatOpts(e.val);if(!n)return e;var i=Formatter.create(t,n).formatDateTimeParts(getDummyDateTime()).map(function(e){return tokenForPart(e,t,n)});return i.includes(void 0)?e:i}function expandMacroTokens(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map(function(e){return maybeExpandMacroToken(e,t)}))}function explainFromTokens(t,e,n){var n=expandMacroTokens(Formatter.parseFormat(n),t),i=n.map(function(e){return unitForToken(e,t)}),a=i.find(function(e){return e.invalidReason});if(a)return{input:e,tokens:n,invalidReason:a.invalidReason};var a=buildRegex(i),i=a[0],a=a[1],i=RegExp(i,"i"),a=match(e,i,a),o=a[0],a=a[1],r=a?dateTimeFromMatches(a):[null,null],s=r[0],r=r[1];if(hasOwnProperty(a,"a")&&hasOwnProperty(a,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:i,rawMatches:o,matches:a,result:s,zone:r}}function parseFromTokens(e,t,n){e=explainFromTokens(e,t,n);return[e.result,e.zone,e.invalidReason]}var nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function dayOfWeek(e,t,n){e=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===e?7:e}function computeOrdinal(e,t,n){return n+(isLeapYear(e)?leapLadder:nonLeapLadder)[t-1]}function uncomputeOrdinal(e,t){var e=isLeapYear(e)?leapLadder:nonLeapLadder,n=e.findIndex(function(e){return e<t});return{month:n+1,day:t-e[n]}}function gregorianToWeek(e){var t,n=e.year,i=e.month,a=e.day,o=computeOrdinal(n,i,a),i=dayOfWeek(n,i,a),a=Math.floor((o-i+10)/7);return a<1?a=weeksInWeekYear(t=n-1):a>weeksInWeekYear(n)?(t=n+1,a=1):t=n,Object.assign({weekYear:t,weekNumber:a,weekday:i},timeObject(e))}function weekToGregorian(e){var t,n=e.weekYear,i=e.weekNumber,a=e.weekday,o=dayOfWeek(n,1,4),r=daysInYear(n),i=7*i+a-o-3,a=(i<1?i+=daysInYear(t=n-1):r<i?(t=n+1,i-=daysInYear(n)):t=n,uncomputeOrdinal(t,i)),o=a.month,r=a.day;return Object.assign({year:t,month:o,day:r},timeObject(e))}function gregorianToOrdinal(e){var t=e.year,n=computeOrdinal(t,e.month,e.day);return Object.assign({year:t,ordinal:n},timeObject(e))}function ordinalToGregorian(e){var t=e.year,n=uncomputeOrdinal(t,e.ordinal),i=n.month,n=n.day;return Object.assign({year:t,month:i,day:n},timeObject(e))}function hasInvalidWeekData(e){var t=isInteger(e.weekYear),n=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear)),i=integerBetween(e.weekday,1,7);return t?n?!i&&unitOutOfRange("weekday",e.weekday):unitOutOfRange("week",e.week):unitOutOfRange("weekYear",e.weekYear)}function hasInvalidOrdinalData(e){var t=isInteger(e.year),n=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!n&&unitOutOfRange("ordinal",e.ordinal):unitOutOfRange("year",e.year)}function hasInvalidGregorianData(e){var t=isInteger(e.year),n=integerBetween(e.month,1,12),i=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?n?!i&&unitOutOfRange("day",e.day):unitOutOfRange("month",e.month):unitOutOfRange("year",e.year)}function hasInvalidTimeData(e){var t=e.hour,n=e.minute,i=e.second,e=e.millisecond,a=integerBetween(t,0,23)||24===t&&0===n&&0===i&&0===e,o=integerBetween(n,0,59),r=integerBetween(i,0,59),s=integerBetween(e,0,999);return a?o?r?!s&&unitOutOfRange("millisecond",e):unitOutOfRange("second",i):unitOutOfRange("minute",n):unitOutOfRange("hour",t)}var INVALID$2="Invalid DateTime",MAX_DATE=864e13;function unsupportedZone(e){return new Invalid("unsupported zone",'the zone "'+e.name+'" is not supported')}function possiblyCachedWeekData(e){return null===e.weekData&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function clone$1(e,t){e={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new DateTime(Object.assign({},e,t,{old:e}))}function fixOffset(e,t,n){var i=e-60*t*1e3,a=n.offset(i);if(t===a)return[i,t];n=n.offset(i-=60*(a-t)*1e3);return a===n?[i,a]:[e-60*Math.min(a,n)*1e3,Math.max(a,n)]}function tsToObj(e,t){e+=60*t*1e3;t=new Date(e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function objToTS(e,t,n){return fixOffset(objToLocalTS(e),t,n)}function adjustTime(e,t){var n=e.o,i=e.c.year+Math.trunc(t.years),a=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i=Object.assign({},e.c,{year:i,month:a,day:Math.min(e.c.day,daysInMonth(i,a))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),a=Duration.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),t=fixOffset(objToLocalTS(i),n,e.zone),i=t[0],n=t[1];return 0!==a&&(n=e.zone.offset(i+=a)),{ts:i,o:n}}function parseDataToDateTime(e,t,n,i,a){var o=n.setZone,r=n.zone;return e&&0!==Object.keys(e).length?(e=DateTime.fromObject(Object.assign(e,n,{zone:t||r,setZone:void 0})),o?e:e.setZone(r)):DateTime.invalid(new Invalid("unparsable",'the input "'+a+"\" can't be parsed as "+i))}function toTechFormat(e,t,n){return void 0===n&&(n=!0),e.isValid?Formatter.create(Locale.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function toTechTimeFormat(e,t){var n=t.suppressSeconds,i=t.suppressMilliseconds,a=t.includeOffset,o=t.includePrefix,o=void 0!==o&&o,r=t.includeZone,r=void 0!==r&&r,s=t.spaceZone,t=t.format,t=void 0===t?"extended":t,l="basic"===t?"HHmm":"HH:mm",n=(void 0!==n&&n&&0===e.second&&0===e.millisecond||(l+="basic"===t?"ss":":ss",void 0!==i&&i&&0===e.millisecond||(l+=".SSS")),(r||a)&&(void 0!==s&&s)&&(l+=" "),r?l+="z":a&&(l+="basic"===t?"ZZZ":"ZZ"),toTechFormat(e,l));return n=o?"T"+n:n}var defaultUnitValues={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},defaultWeekUnitValues={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},defaultOrdinalUnitValues={ordinal:1,hour:0,minute:0,second:0,millisecond:0},orderedUnits$1=["year","month","day","hour","minute","second","millisecond"],orderedWeekUnits=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],orderedOrdinalUnits=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)}function quickDT(e,t){for(var n=_createForOfIteratorHelperLoose(orderedUnits$1);!(i=n()).done;){var i=i.value;isUndefined(e[i])&&(e[i]=defaultUnitValues[i])}var a=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(a)return DateTime.invalid(a);var a=Settings.now(),a=objToTS(e,t.offset(a),t),o=a[0],a=a[1];return new DateTime({ts:o,zone:t,o:a})}function diffRelative(t,n,i){function e(e,t){return e=roundTo(e,o||i.calendary?0:2,!0),n.loc.clone(i).relFormatter(i).format(e,t)}function a(e){return i.calendary?n.hasSame(t,e)?0:n.startOf(e).diff(t.startOf(e),e).get(e):n.diff(t,e).get(e)}var o=!!isUndefined(i.round)||i.round;if(i.unit)return e(a(i.unit),i.unit);for(var r=_createForOfIteratorHelperLoose(i.units);!(s=r()).done;){var s=s.value,l=a(s);if(1<=Math.abs(l))return e(l,s)}return e(n<t?-0:0,i.units[i.units.length-1])}var DateTime=function(){function y(e){var t,n=e.zone||Settings.defaultZone,i=e.invalid||(Number.isNaN(e.ts)?new Invalid("invalid input"):null)||(n.isValid?null:unsupportedZone(n)),a=(this.ts=isUndefined(e.ts)?Settings.now():e.ts,null),o=null;i||(o=e.old&&e.old.ts===this.ts&&e.old.zone.equals(n)?(a=(t=[e.old.c,e.old.o])[0],t[1]):(t=n.offset(this.ts),a=tsToObj(this.ts,t),a=(i=Number.isNaN(a.year)?new Invalid("invalid input"):null)?null:a,i?null:t)),this._zone=n,this.loc=e.loc||Locale.create(),this.invalid=i,this.weekData=null,this.c=a,this.o=o,this.isLuxonDateTime=!0}y.now=function(){return new y({})},y.local=function(e,t,n,i,a,o,r){return isUndefined(e)?y.now():quickDT({year:e,month:t,day:n,hour:i,minute:a,second:o,millisecond:r},Settings.defaultZone)},y.utc=function(e,t,n,i,a,o,r){return isUndefined(e)?new y({ts:Settings.now(),zone:FixedOffsetZone.utcInstance}):quickDT({year:e,month:t,day:n,hour:i,minute:a,second:o,millisecond:r},FixedOffsetZone.utcInstance)},y.fromJSDate=function(e,t){void 0===t&&(t={});e=isDate(e)?e.valueOf():NaN;if(Number.isNaN(e))return y.invalid("invalid input");var n=normalizeZone(t.zone,Settings.defaultZone);return n.isValid?new y({ts:e,zone:n,loc:Locale.fromObject(t)}):y.invalid(unsupportedZone(n))},y.fromMillis=function(e,t){if(void 0===t&&(t={}),isNumber(e))return e<-MAX_DATE||MAX_DATE<e?y.invalid("Timestamp out of range"):new y({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},y.fromSeconds=function(e,t){if(void 0===t&&(t={}),isNumber(e))return new y({ts:1e3*e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromSeconds requires a numerical input")},y.fromObject=function(e){var t=normalizeZone(e.zone,Settings.defaultZone);if(!t.isValid)return y.invalid(unsupportedZone(t));var n=Settings.now(),i=t.offset(n),a=normalizeObject(e,normalizeUnit,["zone","locale","outputCalendar","numberingSystem"]),o=!isUndefined(a.ordinal),r=!isUndefined(a.year),s=!isUndefined(a.month)||!isUndefined(a.day),r=r||s,l=a.weekYear||a.weekNumber,c=Locale.fromObject(e);if((r||o)&&l)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&o)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");for(var u,s=l||a.weekday&&!r,d=tsToObj(n,i),f=(s?(h=orderedWeekUnits,u=defaultWeekUnitValues,d=gregorianToWeek(d)):o?(h=orderedOrdinalUnits,u=defaultOrdinalUnitValues,d=gregorianToOrdinal(d)):(h=orderedUnits$1,u=defaultUnitValues),!1),m=_createForOfIteratorHelperLoose(h);!(p=m()).done;){var p=p.value;isUndefined(a[p])?a[p]=(f?u:d)[p]:f=!0}l=(s?hasInvalidWeekData:o?hasInvalidOrdinalData:hasInvalidGregorianData)(a)||hasInvalidTimeData(a);if(l)return y.invalid(l);var n=objToTS(s?weekToGregorian(a):o?ordinalToGregorian(a):a,i,t),h=new y({ts:n[0],zone:t,o:n[1],loc:c});return a.weekday&&r&&e.weekday!==h.weekday?y.invalid("mismatched weekday","you can't specify both a weekday of "+a.weekday+" and a date of "+h.toISO()):h},y.fromISO=function(e,t){void 0===t&&(t={});var n=parseISODate(e);return parseDataToDateTime(n[0],n[1],t,"ISO 8601",e)},y.fromRFC2822=function(e,t){void 0===t&&(t={});var n=parseRFC2822Date(e);return parseDataToDateTime(n[0],n[1],t,"RFC 2822",e)},y.fromHTTP=function(e,t){void 0===t&&(t={});e=parseHTTPDate(e);return parseDataToDateTime(e[0],e[1],t,"HTTP",t)},y.fromFormat=function(e,t,n){if(void 0===n&&(n={}),isUndefined(e)||isUndefined(t))throw new InvalidArgumentError("fromFormat requires an input string and a format");var i=n,a=i.locale,i=i.numberingSystem,a=parseFromTokens(Locale.fromOpts({locale:void 0===a?null:a,numberingSystem:void 0===i?null:i,defaultToEN:!0}),e,t),i=a[0],o=a[1],a=a[2];return a?y.invalid(a):parseDataToDateTime(i,o,n,"format "+t,e)},y.fromString=function(e,t,n){return y.fromFormat(e,t,n=void 0===n?{}:n)},y.fromSQL=function(e,t){void 0===t&&(t={});var n=parseSQL(e);return parseDataToDateTime(n[0],n[1],t,"SQL",e)},y.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDateTimeError(e);return new y({invalid:e})},y.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var e=y.prototype;return e.get=function(e){return this[e]},e.resolvedLocaleOpts=function(e){e=Formatter.create(this.loc.clone(e=void 0===e?{}:e),e).resolvedOptions(this);return{locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.calendar}},e.toUTC=function(e,t){return void 0===t&&(t={}),this.setZone(FixedOffsetZone.instance(e=void 0===e?0:e),t)},e.toLocal=function(){return this.setZone(Settings.defaultZone)},e.setZone=function(e,t){var n,t=void 0===t?{}:t,i=t.keepLocalTime,i=void 0!==i&&i,t=t.keepCalendarTime,t=void 0!==t&&t;return(e=normalizeZone(e,Settings.defaultZone)).equals(this.zone)?this:e.isValid?(n=this.ts,(i||t)&&(i=e.offset(this.ts),n=objToTS(this.toObject(),i,e)[0]),clone$1(this,{ts:n,zone:e})):y.invalid(unsupportedZone(e))},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar,t=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:e});return clone$1(this,{loc:t})},e.setLocale=function(e){return this.reconfigure({locale:e})},e.set=function(e){if(!this.isValid)return this;var t,e=normalizeObject(e,normalizeUnit,[]),n=!isUndefined(e.weekYear)||!isUndefined(e.weekNumber)||!isUndefined(e.weekday),i=!isUndefined(e.ordinal),a=!isUndefined(e.year),o=!isUndefined(e.month)||!isUndefined(e.day),r=e.weekYear||e.weekNumber;if((a||o||i)&&r)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&i)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");n?t=weekToGregorian(Object.assign(gregorianToWeek(this.c),e)):isUndefined(e.ordinal)?(t=Object.assign(this.toObject(),e),isUndefined(e.day)&&(t.day=Math.min(daysInMonth(t.year,t.month),t.day))):t=ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c),e));a=objToTS(t,this.o,this.zone);return clone$1(this,{ts:a[0],o:a[1]})},e.plus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e))):this},e.minus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e).negate())):this},e.startOf=function(e){if(!this.isValid)return this;var t={},e=Duration.normalizeUnit(e);switch(e){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}return"weeks"===e&&(t.weekday=1),"quarters"===e&&(e=Math.ceil(this.month/3),t.month=3*(e-1)+1),this.set(t)},e.endOf=function(e){var t;return this.isValid?this.plus(((t={})[e]=1,t)).startOf(e).minus(1):this},e.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Formatter.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):INVALID$2},e.toLocaleString=function(e){return void 0===e&&(e=DATE_SHORT),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTime(this):INVALID$2},e.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},e.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},e.toISODate=function(e){e=(void 0===e?{}:e).format,e="basic"===(void 0===e?"extended":e)?"yyyyMMdd":"yyyy-MM-dd";return toTechFormat(this,e=9999<this.year?"+"+e:e)},e.toISOWeekDate=function(){return toTechFormat(this,"kkkk-'W'WW-c")},e.toISOTime=function(e){var e=void 0===e?{}:e,t=e.suppressMilliseconds,n=e.suppressSeconds,i=e.includeOffset,a=e.includePrefix,e=e.format;return toTechTimeFormat(this,{suppressSeconds:void 0!==n&&n,suppressMilliseconds:void 0!==t&&t,includeOffset:void 0===i||i,includePrefix:void 0!==a&&a,format:void 0===e?"extended":e})},e.toRFC2822=function(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return toTechFormat(this,"yyyy-MM-dd")},e.toSQLTime=function(e){var e=void 0===e?{}:e,t=e.includeOffset,e=e.includeZone;return toTechTimeFormat(this,{includeOffset:void 0===t||t,includeZone:void 0!==e&&e,spaceZone:!0})},e.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},e.toString=function(){return this.isValid?this.toISO():INVALID$2},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return Duration.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var n=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),t=maybeArray(t).map(Duration.normalizeUnit),i=e.valueOf()>this.valueOf(),e=_diff(i?this:e,i?e:this,t,n);return i?e.negate():e},e.diffNow=function(e,t){return void 0===e&&(e="milliseconds"),void 0===t&&(t={}),this.diff(y.now(),e,t)},e.until=function(e){return this.isValid?Interval.fromDateTimes(this,e):this},e.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),e=this.setZone(e.zone,{keepLocalTime:!0});return e.startOf(t)<=n&&n<=e.endOf(t)},e.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},e.toRelative=function(e){if(!this.isValid)return null;var t=(e=void 0===e?{}:e).base||y.fromObject({zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(i=e.unit,a=void 0),diffRelative(t,this.plus(n),Object.assign(e,{numeric:"always",units:i,unit:a}))},e.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?diffRelative(e.base||y.fromObject({zone:this.zone}),this,Object.assign(e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},y.min=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(y.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.min);throw new InvalidArgumentError("min requires all arguments be DateTimes")},y.max=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(y.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.max);throw new InvalidArgumentError("max requires all arguments be DateTimes")},y.fromFormatExplain=function(e,t,n){var n=n=void 0===n?{}:n,i=n.locale,n=n.numberingSystem;return explainFromTokens(Locale.fromOpts({locale:void 0===i?null:i,numberingSystem:void 0===n?null:n,defaultToEN:!0}),e,t)},y.fromStringExplain=function(e,t,n){return y.fromFormatExplain(e,t,n=void 0===n?{}:n)},_createClass(y,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Info.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Info.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Info.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Info.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return isLeapYear(this.year)}},{key:"daysInMonth",get:function(){return daysInMonth(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?daysInYear(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return DATE_SHORT}},{key:"DATE_MED",get:function(){return DATE_MED}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return DATE_MED_WITH_WEEKDAY}},{key:"DATE_FULL",get:function(){return DATE_FULL}},{key:"DATE_HUGE",get:function(){return DATE_HUGE}},{key:"TIME_SIMPLE",get:function(){return TIME_SIMPLE}},{key:"TIME_WITH_SECONDS",get:function(){return TIME_WITH_SECONDS}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return TIME_WITH_SHORT_OFFSET}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return TIME_WITH_LONG_OFFSET}},{key:"TIME_24_SIMPLE",get:function(){return TIME_24_SIMPLE}},{key:"TIME_24_WITH_SECONDS",get:function(){return TIME_24_WITH_SECONDS}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return TIME_24_WITH_SHORT_OFFSET}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return TIME_24_WITH_LONG_OFFSET}},{key:"DATETIME_SHORT",get:function(){return DATETIME_SHORT}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return DATETIME_SHORT_WITH_SECONDS}},{key:"DATETIME_MED",get:function(){return DATETIME_MED}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return DATETIME_MED_WITH_SECONDS}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return DATETIME_MED_WITH_WEEKDAY}},{key:"DATETIME_FULL",get:function(){return DATETIME_FULL}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return DATETIME_FULL_WITH_SECONDS}},{key:"DATETIME_HUGE",get:function(){return DATETIME_HUGE}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return DATETIME_HUGE_WITH_SECONDS}}]),y}();function friendlyDateTime(e){if(DateTime.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return DateTime.fromJSDate(e);if(e&&"object"==typeof e)return DateTime.fromObject(e);throw new InvalidArgumentError("Unknown datetime argument: "+e+", of type "+typeof e)}var INotificationType,VERSION="1.28.0",DateTime_1=luxon.DateTime=DateTime;function convertHTMLEntities(i){if(!i)return"";const a={">":">","<":"<","&":"&","'":"'",""":'"'};return[">","<","&","'","""].reduce((e,t)=>{var n;return i.includes(t)&&(n=new RegExp(t,"g"),e=e.replace(n,a[t])),e},i)}function generateEpochTime(e){const t=DateTime_1.local();var n=t.toMillis();return DateTime_1.fromMillis(n-24*e*3600*1e3).toISO()}function getRelativeValue(e){var t=(new Date).getTime();return((e?new Date(e):new Date).getTime()-t)/1e3/60}luxon.Duration=Duration,luxon.FixedOffsetZone=FixedOffsetZone,luxon.IANAZone=IANAZone,luxon.Info=Info,luxon.Interval=Interval,luxon.InvalidZone=InvalidZone,luxon.LocalZone=LocalZone,luxon.Settings=Settings,luxon.VERSION=VERSION,luxon.Zone=Zone,DateTime_1.local().toISO(),generateEpochTime(1),generateEpochTime(3),generateEpochTime(4),generateEpochTime(4),generateEpochTime(5),generateEpochTime(.25),generateEpochTime(.25),generateEpochTime(2),generateEpochTime(.5),generateEpochTime(3),generateEpochTime(.2),generateEpochTime(10),generateEpochTime(18),generateEpochTime(22),generateEpochTime(40);const useStyles$c=makeStyles()(e=>({notiDetailContainer:{},root:{textAlign:"left",position:"relative"},header:{margin:"20px 30px"},mainTitle:{marginBottom:e.spacing(5),display:"flex",justifyContent:"space-between"},actionIcons:{margin:e.spacing(-2.5)},actionableBtnContainer:{padding:e.spacing(4.8,6,0,6),textAlign:"justify"},actionableBtn:{textTransform:"none",color:"#2A323C",fontSize:e.spacing(2.8),marginRight:e.spacing(2),"&:hover":{color:"#1B1D1F",backgroundColor:"#F2F5F9","& > span":{color:"#1B1D1F"}},"& > span":{color:"#555F7C"}},textTitle:{color:"#2A323C",fontWeight:400},content:{padding:e.spacing(0,6),textAlign:"justify"},actiondiv:{display:"flex",margin:e.spacing(1.4,6,5,6),alignItems:"center"},divider:{margin:e.spacing(4,6,0,6),height:"0.5px"},appName:{padding:e.spacing(0,2.4)},appNameTitle:{color:e.palette.text.primary},deleteIcon:{padding:e.spacing(1.6),marginLeft:e.spacing(2)},gradient:{zIndex:1,width:"calc(100% - 30px)",height:"111px",position:"absolute",bottom:0},iconImg:{width:24,height:24}})),GET_NOTIFICATION="os-notification-panel/GET_NOTIFICATION",GET_NOTIFICATION_START="os-notification-panel/GET_NOTIFICATION_START",GET_NOTIFICATION_SUCCESS="os-notification-panel/GET_NOTIFICATION_SUCCESS",GET_NOTIFICATION_ERROR="os-notification-panel/GET_NOTIFICATION_ERROR",GET_NOTIFICATION_ACTION_REQUEST="os-notification-panel/GET_NOTIFICATION_ACTION_REQUEST",GET_NOTIFICATION_ACTION_SUCCESS="os-notification-panel/GET_NOTIFICATION_ACTION_SUCCESS",GET_NOTIFICATION_ACTION_ERROR="os-notification-panel/GET_NOTIFICATION_ACTION_ERROR",UPDATE_FILTER="os-notification-panel/UPDATE_FILTER",UPDATE_BANNER_STYLE="os-notification-panel/UPDATE_BANNER_STYLE",UPDATE_APPLICATION_SETTING="os-notification-panel/UPDATE_APPLICATION_SETTING",UPDATE_APP_ALLOW_NOTIFICATION="os-notification-panel/UPDATE_APP_ALLOW_NOTIFICATION",GET_NOTIFICATION_LIST_REQUEST="os-notification-panel/GET_NOTIFICATION_LIST_REQUEST",GET_NOTIFICATION_LIST_SUCCESS="os-notification-panel/GET_NOTIFICATION_LIST_SUCCESS",GET_NOTIFICATION_LIST_FAIL="os-notification-panel/GET_NOTIFICATION_LIST_FAIL",UPDATE_NOTIFICATION_LIST="os-notification-panel/UPDATE_NOTIFICATION_LIST",UPDATE_NOTIFICATION_READ_REQUEST="os-notification-panel/UPDATE_NOTIFICATION_READ_REQUEST",UPDATE_NOTIFICATION_READ_SUCCESS="os-notification-panel/UPDATE_NOTIFICATION_READ_SUCCESS",UPDATE_NOTIFICATION_READ_FAIL="os-notification-panel/UPDATE_NOTIFICATION_READ_FAIL",ON_NOTIFICATION_ACTION_CLICKED="os-notification-panel/ON_NOTIFICATION_ACTION_CLICKED",INIT_NOTIFICATION_ACTION="os-notification-panel/INIT_NOTIFICATION_ACTION",MARK_ALL_READ_NOTIFICATION_REQUEST="os-notification-panel/MARK_ALL_READ_NOTIFICATION_REQUEST",MARK_ALL_READ_NOTIFICATION_SUCCESS="os-notification-panel/MARK_ALL_READ_NOTIFICATION_SUCCESS",MARK_ALL_READ_NOTIFICATION_FAIL="os-notification-panel/MARK_ALL_READ_NOTIFICATION_FAIL",getNotification=createAction(GET_NOTIFICATION,function(e,t,n){return{payload:{limit:t,offset:e,callback:n}}}),getNotificationStart=createAction(GET_NOTIFICATION_START,function(e,t){return{payload:{limit:t,offset:e}}}),initNotificationAction=createAction(INIT_NOTIFICATION_ACTION,function(e){return{payload:e}}),getNotificationSuccess=createAction(GET_NOTIFICATION_SUCCESS,function(e){return{payload:e}}),getNotificationError=createAction(GET_NOTIFICATION_ERROR,function(e){return{payload:e}}),getNotificationAction=createAction(GET_NOTIFICATION_ACTION_REQUEST,function(e){return{payload:e}}),getNotificationActionSuccess=createAction(GET_NOTIFICATION_ACTION_SUCCESS,function(e,t){return{payload:{notificationId:e,notificationActions:t}}}),getNotificationActionError=createAction(GET_NOTIFICATION_ACTION_ERROR),updateFilterValue=createAction(UPDATE_FILTER,function(e){return{payload:e}}),updateAppAllowNotification=createAction(UPDATE_APP_ALLOW_NOTIFICATION,function(e,t){return{payload:{appId:e,isAllowed:t}}}),updateBannerStyle=createAction(UPDATE_BANNER_STYLE,function(e){return{payload:e}}),updateUtilitySetting=createAction("os-notification-panel/UPDATE_UTILITY_SETTING",function(e){return{payload:e}}),updateApplicationSetting=createAction(UPDATE_APPLICATION_SETTING,function(e){return{payload:e}}),updateNotificationSetting=createAction("os-notification-panel/UPDATE_NOTI_SETTING",function(e){return{payload:e}}),updateAppActionAllowNotification=createAction("UPDATE_APP_ACTION_ALLOW_NOTIFICATION",function(e,t,n,i){return{payload:{appId:e,id:t,value:n,key:i}}}),getNotificationListByMailBoxRequest=createAction(GET_NOTIFICATION_LIST_REQUEST,function(e){return{payload:{mailBoxIds:e}}}),getNotificationListByMailBoxSuccess=createAction(GET_NOTIFICATION_LIST_SUCCESS,function(e){return{payload:e}}),getNotificationListByMailBoxFail=createAction(GET_NOTIFICATION_LIST_FAIL),updateNotificationList=createAction(UPDATE_NOTIFICATION_LIST,function(e){return{payload:e}}),updateNotificationReadRequest=createAction(UPDATE_NOTIFICATION_READ_REQUEST,function(e){return{payload:e}}),updateNotificationReadSuccess=createAction(UPDATE_NOTIFICATION_READ_SUCCESS,function(e){return{payload:e}}),updateNotificationReadFail=createAction(UPDATE_NOTIFICATION_READ_FAIL),onNotificationActionClicked=createAction(ON_NOTIFICATION_ACTION_CLICKED,function(e){return{payload:e}}),markAllReadNotificationRequest=createAction(MARK_ALL_READ_NOTIFICATION_REQUEST),markAllReadNotificationSuccess=createAction(MARK_ALL_READ_NOTIFICATION_SUCCESS),markAllReadNotificationFail=createAction(MARK_ALL_READ_NOTIFICATION_FAIL),MODE={ACTION:"actionable",INFO:"informational"};function NotificationDetailPanel({id:e,mode:t}){const a=useDispatch(),n=useStyles$c()["classes"];var i=useSelector(notificationDetailSelector(e));react.exports.useEffect(()=>{a(getNotificationAction(e))},[a,e]);return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx("div",Object.assign({className:n.notiDetailContainer,"data-testid":"notification-detail-panel"},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:n.root},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:n.actiondiv},{children:[null!=i&&i.icon?jsxRuntime.exports.jsx("img",{className:n.iconImg,src:null==i?void 0:i.icon,draggable:"false",alt:"icon"}):jsxRuntime.exports.jsx(Notifications,{}),jsxRuntime.exports.jsx("div",Object.assign({className:n.appName},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:n.appNameTitle},{children:(null==i?void 0:i.appName)||""}))})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedRelativeTime$1,{value:getRelativeValue(i.createdDateTime),updateIntervalInSeconds:60,unit:"minute",children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.mvPoLJ",defaultMessage:"Just now",description:"the time label of notification that received on 1 minute"}):react.exports.createElement("span",{},e)})}))})]})),jsxRuntime.exports.jsx("div",Object.assign({className:n.header},{children:jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:n.textTitle,"data-test":"notification-title","data-testid":"notification-title"},{children:convertHTMLEntities(null==i?void 0:i.title)}))})})),jsxRuntime.exports.jsx("div",Object.assign({className:n.content},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2"},{children:convertHTMLEntities(null==i?void 0:i.body)}))})),t===MODE.ACTION&&(null==i?void 0:i.actions)&&0<(null==(t=null==i?void 0:i.actions)?void 0:t.length)&&jsxRuntime.exports.jsx("div",Object.assign({className:n.actionableBtnContainer},{children:null==(t=null==i?void 0:i.actions)?void 0:t.map(e=>jsxRuntime.exports.jsx(Button,Object.assign({startIcon:jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:"button icon",width:"18px",height:"18px"}),className:n.actionableBtn,variant:e.variant,size:e.size,onClick:(i=>e=>{var t;if(null!=i&&i.url&&""!==(null==i?void 0:i.url)){const n=document.createElement("a");n.target="_blank",n.href=i.url,n.click()}else null!=(t=null==i?void 0:i.onClick)&&t.call(i,e),a(onNotificationActionClicked(i))})(e)},{children:e.label}),e.label))}))]}))}))})}!function(e){e.EMAIL="Email",e.NOTIFICATION_CENTER="Notification Center",e.BANNER="Banners"}(INotificationType=INotificationType||{});const filterAll="all",filters=[{value:filterAll,title:"All Applications"}],utilityNotificationSettingData=[{id:"notification-finder",type:"finder",title:"Data Center",iconUrl:img$1i,allow:!0,allowType:[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER],action:[{id:"shared-file",title:"Shared File",allow:!0,allowType:[]},{id:"shared-source",title:"Shared Source or Stream",allow:!1,allowType:[]},{id:"shared-folder",title:"Shared Folder",allow:!1,allowType:[]}]},{id:"notification-importer",type:"importer_tool",title:"Importer Tool",iconUrl:img$1h,allow:!0,allowType:[INotificationType.EMAIL,INotificationType.BANNER],action:[{id:"shared-file",title:"Shared File",allow:!0,allowType:[]},{id:"shared-source",title:"Shared Source or Stream",allow:!0,allowType:[]},{id:"shared-folder",title:"Shared Folder",allow:!0,allowType:[]}]},{id:"notification-engine",type:"engine_toolkit",title:"Engine Toolkit",iconUrl:img$1g,allow:!1,allowType:[],action:[{id:"shared-file",title:"Shared File",allow:!1,allowType:[]},{id:"shared-source",title:"Shared Source or Stream",allow:!1,allowType:[]},{id:"shared-folder",title:"Shared Folder",allow:!0,allowType:[]}]}],applicationNotificationSettingData={byId:{"notification-app-automate":{name:"Automate",iconUrl:img$1e,description:"Chose which events you’d like to be notified about.",allow:!1,allowType:[],action:{byId:{1:{title:"Completed Processes",allowType:[INotificationType.NOTIFICATION_CENTER],allow:!0},2:{title:"Processing Updated",allowType:[],allow:!1}},allIds:["1","2"]}},"notification-app-illuminate":{name:"Illuminate",iconUrl:img$1f,description:"Chose which events you’d like to be notified about.",allow:!0,allowType:[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER],action:{byId:{1:{title:"Error",allowType:[INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER,INotificationType.EMAIL],allow:!0}},allIds:["1"]}},"notification-app-redact":{name:"Redact",iconUrl:img$1d,description:"Chose which events you’d like to be notified about.",allow:!0,allowType:[INotificationType.EMAIL],action:{byId:{1:{title:"Processing Updated",allowType:[],allow:!1},2:{title:"Error",allowType:[INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER,INotificationType.EMAIL],allow:!1}},allIds:["1","2"]}}},allIds:["notification-app-automate","notification-app-illuminate","notification-app-redact"]},initialState={notifications:[],availableMailBoxes:0,limit:0,offset:0,status:"idle",filter:filterAll,failureMessage:"",paused:!1,settings:{allow:!0,allowType:[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER],bannerStyle:"temporary",enableUtilityNotification:!0,enableApplicationNotification:!0,utility:utilityNotificationSettingData,application:applicationNotificationSettingData}},notificationReducer=createReducer(initialState,e=>{e.addCase(getNotificationStart,(e,t)=>{var{limit:t,offset:n}=t.payload;return Object.assign(Object.assign({},e),{status:0===n?"loading":e.status,limit:t,offset:n})}).addCase(getNotificationSuccess,(e,t)=>Object.assign(Object.assign({},e),{status:"success",notifications:t.payload})).addCase(getNotificationError,(e,t)=>Object.assign(Object.assign({},e),{failureMessage:t.payload,status:"failure"})).addCase(updateFilterValue,(e,t)=>Object.assign(Object.assign({},e),{filter:t.payload})).addCase(updateAppAllowNotification,(e,t)=>{var{appId:t,isAllowed:n}=t.payload;return Object.assign(Object.assign({},e),{settings:Object.assign(Object.assign({},e.settings),{application:Object.assign(Object.assign({},e.settings.application),{byId:Object.assign(Object.assign({},e.settings.application.byId),{[t]:Object.assign(Object.assign({},e.settings.application.byId[t]),{allow:n})})})})})}).addCase(updateBannerStyle,(e,t)=>Object.assign(Object.assign({},e),{settings:Object.assign(Object.assign({},e.settings),{bannerStyle:t.payload})})).addCase(updateUtilitySetting,(e,t)=>Object.assign(Object.assign({},e),{settings:Object.assign(Object.assign({},e.settings),{utility:t.payload})})).addCase(updateNotificationSetting,(e,t)=>Object.assign(Object.assign({},e),{settings:t.payload})).addCase(updateAppActionAllowNotification,(e,t)=>{var{appId:t,id:n,value:i,key:a}=t.payload;return Object.assign(Object.assign({},e),{settings:Object.assign(Object.assign({},e.settings),{application:Object.assign(Object.assign({},e.settings.application),{byId:Object.assign(Object.assign({},e.settings.application.byId),{[t]:Object.assign(Object.assign({},e.settings.application.byId[t]),{action:Object.assign(Object.assign({},e.settings.application.byId[t].action),{byId:Object.assign(Object.assign({},e.settings.application.byId[t].action.byId),{[n]:Object.assign(Object.assign({},e.settings.application.byId[t].action.byId[n]),{[a]:i})})})})})})})})}).addCase(updateApplicationSetting,(e,t)=>Object.assign(Object.assign({},e),{settings:Object.assign(Object.assign({},e.settings),{application:t.payload})})).addCase(getNotificationListByMailBoxSuccess,(e,t)=>{var{data:t,limit:n,offset:i,availableMailBoxes:a}=t.payload;return Object.assign(Object.assign({},e),{status:"success",notifications:[...t,...e.notifications].sort((e,t)=>{e=new Date(e.createdDateTime).getTime();return new Date(t.createdDateTime).getTime()-e})||[],offset:i,limit:n,availableMailBoxes:a})}).addCase(getNotificationListByMailBoxFail,(e,t)=>Object.assign(Object.assign({},e),{status:"failure"})).addCase(updateNotificationList,(e,t)=>{t=t.payload;return Object.assign(Object.assign({},e),{notifications:[t,...e.notifications]})}).addCase(updateNotificationReadRequest,(e,t)=>Object.assign({},e)).addCase(updateNotificationReadSuccess,(e,t)=>{const{id:n,flags:i}=null==(t=null==(t=null==t?void 0:t.payload)?void 0:t.data)?void 0:t.setNotificationFlag;t=e.notifications.map(e=>e.id===n?Object.assign(Object.assign({},e),{flags:i}):e);return Object.assign(Object.assign({},e),{notifications:t})}).addCase(updateNotificationReadFail,(e,t)=>Object.assign({},e)).addCase(markAllReadNotificationRequest,(e,t)=>Object.assign({},e)).addCase(markAllReadNotificationSuccess,(e,t)=>Object.assign(Object.assign({},e),{notifications:e.notifications.map(e=>{return Object.assign(Object.assign({},e),{flags:null==(e=e.flags)?void 0:e.map(e=>e===NotificationFlag.unread?NotificationFlag.read:e)})})})).addCase(markAllReadNotificationFail,(e,t)=>Object.assign({},e)).addCase(getNotificationAction,(e,t)=>Object.assign({},e)).addCase(getNotificationActionSuccess,(e,t)=>{const{notificationId:n,notificationActions:i}=t.payload,a=i.map(e=>({iconUrl:e.icon,label:e.actionName,variant:"contained",size:"medium",color:"default",url:e.urlTemplate}));return Object.assign(Object.assign({},e),{notifications:e.notifications.map(e=>e.id!==n?e:Object.assign(Object.assign({},e),{actions:a}))})})});function __awaiter(e,r,s,l){return new(s=s||Promise)(function(n,t){function i(e){try{o(l.next(e))}catch(e){t(e)}}function a(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(i,a)}o((l=l.apply(e,r||[])).next())})}const handleNotificationListByMailBox=(t,n,i,a,o)=>__awaiter(void 0,void 0,void 0,function*(){var e={mailBoxIds:i,offset:a,limit:o};try{return yield baseGraphQLApi({query:`
|
|
74
74
|
query notificationMailboxes($mailBoxIds: [ID!],$offset: Int, $limit: Int){
|
|
75
75
|
notificationMailboxes(ids: $mailBoxIds){
|
|
76
76
|
id
|
|
@@ -133,4 +133,4 @@ import{aI as __rest,aJ as invariant,r as react,aK as __assign,aL as useIntl,aM a
|
|
|
133
133
|
unreadCount
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
`,variables:e,graphEndpoint:n,token:i})}catch(e){return{success:!1}}});function*refetchNotificationSetting(){yield put(getNotification(0,30))}function*getNotificationListByMailBoxSaga(e){const{status:t,mailBoxIds:n,mailbox:i}=yield select(mailBoxSelector),{limit:a,offset:o,callback:r}=e.payload;var e=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector),l="success"===t||"failure"===t;if(0!==Object.keys(i).length||l){yield put(getNotificationStart(o,a));l=yield call(handleNotificationListByMailBox,e,s,n,o,a);if(null!==r&&void 0!==r&&r(),0<(null==(e=null==l?void 0:l.errors)?void 0:e.length))yield put(getNotificationListByMailBoxFail());else{let n=0;const c=null==(e=null==(s=null==l?void 0:l.data)?void 0:s.notificationMailboxes)?void 0:e.map(t=>{var e;return 0<(null==(e=null==t?void 0:t.notifications)?void 0:e.count)?(e=null==(e=null==(e=null==t?void 0:t.notifications)?void 0:e.records)?void 0:e.map(e=>Object.assign(Object.assign({},e),{mailboxId:t.id})),n++,e):[]}),u=(null===c||void 0===c?void 0:c.flat())||[];l=u.map(t=>{var e,n=i.find(e=>e.id===t.mailboxId);return Object.assign(Object.assign({},t),{appId:(null==(e=null==n?void 0:n.application)?void 0:e.applicationId)||"",appName:(null==(e=null==n?void 0:n.application)?void 0:e.name)||"",eventNames:(null==(e=null==n?void 0:n.eventFilter)?void 0:e.eventNames)||[],icon:(null==(e=null==n?void 0:n.application)?void 0:e.icon)||"",title:t.title||""})});yield put(getNotificationListByMailBoxSuccess({offset:o,limit:a,availableMailBoxes:n,data:l}))}}else yield take(subscriberSuccess({}).type)}function*listenToPushNotificationSaga(e){var t;const n=(yield select(mailBoxSelector))["mailbox"],i=e["payload"];e=n.find(e=>e.id===i.mailboxId);yield put(updateNotificationList(Object.assign(Object.assign({},i),{appId:(null==(t=null==e?void 0:e.application)?void 0:t.applicationId)||"",appName:(null==(t=null==e?void 0:e.application)?void 0:t.name)||"",icon:(null==(t=null==e?void 0:e.application)?void 0:t.icon)||""})))}function*updateNotificationReadSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);try{var i=yield call(handleUpdateNotificationRead,t,n,e.payload);return null!=i&&i.error?void(yield put(updateNotificationReadFail())):void(yield put(updateNotificationReadSuccess(Object.assign({},i))))}catch(e){yield put(updateNotificationReadFail())}}function*updateMarkAllReadNotificationSaga(){var e=(yield select(mailBoxSelector))["mailBoxIds"],t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);if(0<(null==e?void 0:e.length))try{(yield call(handleMarkAllReadNotification,e,t,n)).error?yield put(markAllReadNotificationFail()):yield put(markAllReadNotificationSuccess())}catch(e){yield put(markAllReadNotificationFail())}}function*getNotificationActionSaga(e){var t,n,{eventType:i,appId:a,eventName:o}=yield select(notificationDetailSelector(e.payload)),r=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector);try{var l,c=yield call(handleGetNotificationAction,o,i,a,r,s);c.error?yield put(getNotificationActionError()):(l=(null==(n=null==(t=null==c?void 0:c.data)?void 0:t.notificationActions)?void 0:n.records)||[],yield put(getNotificationActionSuccess(e.payload,l)))}catch(e){yield put(getNotificationActionError())}}function*notificationSaga(){yield all([takeEvery$1(getNotification.type,getNotificationListByMailBoxSaga),takeLatest$1(updateUtilitySetting.type,refetchNotificationSetting),takeEvery$1(getNotificationListByMailBoxRequest.type,getNotificationListByMailBoxSaga),takeEvery$1("mailbox/PUSH_NOTIFICATION",listenToPushNotificationSaga),takeEvery$1(updateNotificationReadRequest.type,updateNotificationReadSaga),takeEvery$1(GET_NOTIFICATION_ACTION_REQUEST,getNotificationActionSaga),takeLatest$1(markAllReadNotificationRequest.type,updateMarkAllReadNotificationSaga)])}function getNotificationModule(){return{id:"os-notification-panel",reducerMap:{[nameSpace]:notificationReducer},sagas:[notificationSaga],initialActions:[],retained:!0}}const useStyles$b=makeStyles()(e=>({root:{width:"100%",height:"100%"},noData:{paddingTop:66,display:"flex",justifyContent:"center"},iconNoData:{width:235,height:235,display:"flex",justifyContent:"center",borderRadius:"50%",padding:"20px",border:"20px solid #F9F9F9"},noDataDescription:{display:"flex",justifyContent:"center",marginTop:66},noDataDescriptionText:{fontSize:"18px",lineHeight:"23px",textTransform:"uppercase",color:e.palette.secondary.main}}));function NotificationContent(){var e=useStyles$b()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:e.root,"data-testid":"notification-content"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:e.noData},{children:jsxRuntime.exports.jsx("div",Object.assign({className:e.iconNoData},{children:jsxRuntime.exports.jsx("img",{src:img$E,draggable:"false",alt:"noNotification"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:e.noDataDescription},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1","data-test":"no-notification",className:e.noDataDescriptionText},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.pBrbyj",defaultMessage:"You don’t have any notifications!",description:"Notification panel: no notification message"})}))}))]}))}const useStyles$a=makeStyles()(e=>({cardContainer:{width:"100%","&:hover":{backgroundColor:"#EEF3F9"}},rootCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer"},unreadCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer",paddingLeft:e.spacing(2)},iconCard:{marginTop:e.spacing(-.4)},leftContent:{width:"345px",padding:e.spacing(0,6,0,3)},titleCard:{display:"flex"},appsCard:{fontSize:"14px",fontWeight:600},timestampCard:{fontSize:"12px",paddingLeft:e.spacing(3),color:e.palette.text.secondary},contentCard:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:e.palette.text.secondary},dividerCard:{margin:e.spacing(0,6),height:"0.5px"},notificationIcon:{width:24,height:24},unread:{width:"auto",marginRight:e.spacing(2.4),fontSize:"unset"},unreadIcon:{width:8,height:8,color:e.palette.primary.main},appName:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"calc(100% - 85px)"}})),NotificationCard=react.exports.forwardRef(({data:e,onViewDetail:t},n)=>{var i=useStyles$a()["classes"];const a=useDispatch(),[o,r]=react.exports.useState(!1);const{createdDateTime:s,icon:l,title:c,appName:u,body:d,id:f,flags:m}=e;return jsxRuntime.exports.jsxs("div",Object.assign({ref:n,className:i.cardContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({onClick:t,className:null!==m&&void 0!==m&&m.includes(NotificationFlag.unread)?i.unreadCard:i.rootCard},{children:[(null===m||void 0===m?void 0:m.includes(NotificationFlag.unread))&&jsxRuntime.exports.jsx(Icon,{"data-test":"notification-unread-icon","data-testid":"notification-unread-icon",className:i.unread,children:jsxRuntime.exports.jsx(default_1$1,{className:i.unreadIcon}),onClick:function(e){e.stopPropagation(),a(updateNotificationReadRequest(f))}}),jsxRuntime.exports.jsx("div",Object.assign({className:i.iconCard},{children:l&&!o?jsxRuntime.exports.jsx("img",{src:l,className:i.notificationIcon,draggable:"false",alt:"notification-card-icon",onError:function(){r(!0)}}):jsxRuntime.exports.jsx(Notifications,{})})),jsxRuntime.exports.jsxs("div",Object.assign({className:i.leftContent},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:i.titleCard},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:i.appName},{children:null!==m&&void 0!==m&&m.includes(NotificationFlag.unread)?jsxRuntime.exports.jsx("strong",{children:u}):u})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:i.timestampCard},{children:jsxRuntime.exports.jsx(FormattedRelativeTime$1,{value:getRelativeValue(s),unit:"minute",updateIntervalInSeconds:60,children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.mvPoLJ",defaultMessage:"Just now",description:"the time label of notification that received on 1 minute"}):react.exports.createElement("span",{},e)})}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:i.contentCard},{children:convertHTMLEntities(c||d)}))})]}))]})),jsxRuntime.exports.jsx(Divider,{className:i.dividerCard})]}))}),useStyles$9=makeStyles()(e=>({header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(6,6,4,6),position:"sticky",width:"fit-content",fontSize:"14px",fontWeight:400,top:0},scrollContent:{overflow:"hidden"},infinityLoading:{display:"flex",justifyContent:"center",padding:e.spacing(4)}}));function NotificationList({title:e,data:n,loading:t,handleGetNotification:i,onOpenNotificationDetail:a}){var o=useStyles$9()["classes"];const r=react.exports.useRef(),s=react.exports.useCallback(e=>{t||(r.current&&r.current.disconnect(),console.log(IntersectionObserver),r.current=new IntersectionObserver(e=>{e[0].isIntersecting&&i()}),e&&r.current.observe(e))},[i,t]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.header},{children:e.toUpperCase()})),jsxRuntime.exports.jsxs("div",Object.assign({className:o.scrollContent},{children:[n.map((e,t)=>n.length===t+1?jsxRuntime.exports.jsx(NotificationCard,{ref:s,onViewDetail:()=>null==a?void 0:a(e),data:e},t):jsxRuntime.exports.jsx(NotificationCard,{onViewDetail:()=>null==a?void 0:a(e),data:e},t)),t&&jsxRuntime.exports.jsx("div",Object.assign({className:o.infinityLoading},{children:jsxRuntime.exports.jsx(CircularProgress,{size:30})}))]}))]})}const useStyles$8=makeStyles()(e=>({loadingContainer:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},filterContainer:{position:"absolute",top:e.spacing(12.4),right:0,paddingTop:e.spacing(3),paddingRight:e.spacing(6),paddingBottom:e.spacing(2),width:"100%",display:"flex",justifyContent:"flex-end",backgroundColor:e.palette.background.default},markAllReadButton:{cursor:"pointer",marginRight:e.spacing(4),backgroundColor:e.palette.background.default,textTransform:"capitalize"}})),NotificationPanel=()=>{const i=useDispatch();var e=useStyles$8()["classes"],t=useSelector(applicationFilterSelector)||[];const[n,a]=react.exports.useState(!1),o=useSelector(mailboxIdSelector);var r=useSelector(notificationWithFilterSelector);const{filter:s,status:l,notifications:c,availableMailBoxes:u,offset:d,limit:f}=useSelector(notificationSelector),m=e=>Math.max(Math.ceil(50/e),5);react.exports.useEffect(()=>{var e=(null===o||void 0===o?void 0:o.length)||0;0<e&&0===f&&(e=m(e),i(getNotification(0,e)))},[i,f,o]);var p=react.exports.useCallback(()=>{var e;0<u&&(a(!0),e=m(u),i(getNotification(d+f,e,()=>{a(!1)})))},[u,i,f,d]);return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getNotificationModule()]},{children:0===r.length&&"success"!==l&&"failure"!==l&&0<o.length?jsxRuntime.exports.jsx("div",Object.assign({className:e.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress,{})})):0<(null==c?void 0:c.length)?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.filterContainer,id:"notification-list-header"},{children:[jsxRuntime.exports.jsx(Button,Object.assign({onClick:function(){i(markAllReadNotificationRequest())},className:e.markAllReadButton,"data-test":"notification-mark-all-read-button","data-testid":"notification-mark-all-read-button"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",color:"primary"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.PtPIns",defaultMessage:"Mark All Read",description:"label of Mark All Read button"})}))})),jsxRuntime.exports.jsx(Filter,{data:[...filters,...t],filter:s,onFilter:function(e){e=e.target.value,i(updateFilterValue(e))}})]})),jsxRuntime.exports.jsx(NotificationList,{title:"All time",onOpenNotificationDetail:function(e){var t="DETAIL_PANEL_ID",n={name:"NOTIFICATION_DETAIL",config:{mode:"actionable",id:e.id,data:Object.assign({},e),actionIconButtons:null!=(n=e.actions)?n:[],onClose:()=>{console.log("onClose")}}};i(unmountPanel(t)),i(mountPanel({panelId:t,microFrontend:n,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:413,width:420,header:{title:"Notification detail"},dimmed:0,parentPanelId:"NOTIFICATION_PANEL_ID"}})),i(updateNotificationReadRequest(e.id))},data:r,loading:n,handleGetNotification:p})]}):jsxRuntime.exports.jsx(NotificationContent,{})}))})};function CustomWorkFlow(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center","data-testid":"custom-workflow-box"},{children:[jsxRuntime.exports.jsx(Typography,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.1+8+OX",defaultMessage:"Custom Workflows",description:"custom-workflows"})}),jsxRuntime.exports.jsx(Button,{variant:"outlined",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.gAFAOA",defaultMessage:"Create New",description:"creat-new-btn"}),color:"primary"})]})),jsxRuntime.exports.jsx(Typography,{style:{fontSize:14,marginTop:20},children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.9+Qhjr",defaultMessage:"You don’t have any custom workflows yet. Get started by clicking the Create New button above!",description:"text"})})]})}const useStyles$7=makeStyles()(e=>({dividerSmallMargin:{marginTop:e.spacing(3.6),marginBottom:e.spacing(4)},utilityItem:{padding:0,cursor:"pointer"},utilityItemHover:{padding:e.spacing(2,0),"&:hover":{backgroundColor:e.palette.background.paper}},utilityDetail:{fontSize:12}}));function NotificationSettingItem(e){const{imgSrc:t,primaryText:n,secondaryText:i,bigSize:a,onOpenUtility:o,onOpenApplication:r,hideDivider:s,applicationId:l,applicationTitle:c,utilityId:u="",utilityTitle:d="Finder",disabled:f,isHover:m}=e;e=useStyles$7().classes;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem,Object.assign({className:classNames(e.utilityItem,m?e.utilityItemHover:""),onClick:function(){null!==o&&void 0!==o&&o(u,d),null!==r&&void 0!==r&&r(l,c)},disabled:f,"data-testid":"notification-setting-item"},{children:[jsxRuntime.exports.jsx(ListItemAvatar,{children:jsxRuntime.exports.jsx(Avatar,{style:{width:a?60:40,height:a?60:40,borderRadius:"50%",marginRight:19},src:t})}),jsxRuntime.exports.jsx(ListItemText,{primary:jsxRuntime.exports.jsx(Typography,{variant:a?"h3":"body2",children:n}),secondary:jsxRuntime.exports.jsx(Typography,{variant:a?"body2":"caption",children:i})})]})),!s&&jsxRuntime.exports.jsx(Divider,{className:m?"":e.dividerSmallMargin})]})}const useStyles$6=makeStyles()(e=>({notificationTypeItemBox:{background:e.palette.background.paper,borderRadius:e.shape.borderRadius,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",padding:e.spacing(4,1,1),height:"100%",fontSize:10,lineHeight:"16px",justifyContent:"center"},disableType:{color:e.palette.grey[500]}}));function NotificationTypeItem(e){const{notificationTypeIcon:t,notificationTypeName:n,defaultSelected:i,onSelectNotificationType:a,notificationTypeId:o,isDisabled:r}=e,[s,l]=react.exports.useState(i);e=useStyles$6().classes;return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(e.notificationTypeItemBox,r?e.disableType:""),"data-testid":"notification-type-item"},{children:[jsxRuntime.exports.jsx("div",{children:"string"==typeof t?jsxRuntime.exports.jsx("img",{src:t,alt:"icon",draggable:"false"}):t}),jsxRuntime.exports.jsx("div",{children:n}),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Checkbox,{icon:jsxRuntime.exports.jsx("img",{src:img$1k,alt:"uncheck icon",draggable:"false"}),checkedIcon:jsxRuntime.exports.jsx("img",{src:img$1j,alt:"checked icon",draggable:"false"}),checked:s,onChange:function(){l(e=>(null!==a&&void 0!==a&&a(o,!e),!e))},disabled:!!r})})]}))}const useStyles$5=makeStyles()(e=>({notificationTypeBox:{paddingBottom:e.spacing(0)},notificationTypeHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:16,lineHeight:"22px",fontWeight:600,marginBottom:e.spacing(2)},notificationList:{display:"inline-grid",gridColumnGap:e.spacing(2.8),gridTemplateColumns:"1fr 1fr 1fr",width:"100%",marginBottom:e.spacing(4.4)},divider:{marginTop:e.spacing(4),marginBottom:e.spacing(4.4)},dividerWithoutDescription:{marginBottom:e.spacing(3)}})),defaultNotificationTypeList=[{id:INotificationType.EMAIL,notificationTypeIcon:jsxRuntime.exports.jsx(Email,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.rTFvFj",defaultMessage:"Email",description:"allow notification types: email"}),isSelected:!0},{id:INotificationType.NOTIFICATION_CENTER,notificationTypeIcon:jsxRuntime.exports.jsx(HelpCenter,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.SmyvFq",defaultMessage:"Notification Center",description:"allow notification types: Notification Center"}),isSelected:!0},{id:INotificationType.BANNER,notificationTypeIcon:jsxRuntime.exports.jsx(Banner,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.r7Whww",defaultMessage:"Banners",description:"allow notification types: Banners"}),isSelected:!0}];function NotificationType(e){const{notificationTypeTitle:t,children:n,description:i,allowTypes:a=[],allowNotification:o,onChangeAllowType:r,hideDivider:s,onChangeNotificationType:l,disabledTypes:c=[]}=e,[u,d]=react.exports.useState(!!o),[f,m]=react.exports.useState(defaultNotificationTypeList);e=useStyles$5().classes;const p=[...a],[h,y]=react.exports.useState(a);var g=t||"Allow Notifications";return react.exports.useEffect(()=>{var e=defaultNotificationTypeList.map(t=>{var e=-1!==h.findIndex(e=>e===t.id),n=-1!==c.findIndex(e=>e===t.id);return Object.assign(Object.assign({},t),{isSelected:e,isDisabled:n})});m(e)},[p.join(", "),h]),react.exports.useEffect(()=>{null!==r&&void 0!==r&&r(u),u?0===h.length&&u&&y([INotificationType.EMAIL]):y([])},[u]),jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeBox},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeHeader},{children:[jsxRuntime.exports.jsx(Typography,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.8Z0yyD",defaultMessage:"{title}",description:"notification setting: allow notification types",values:{title:g}})}),jsxRuntime.exports.jsx(Switch,{checked:u,onChange:function(){d(e=>!e)},color:"primary",name:"notificationTypeChecked","data-testid":"notification-type-switch"})]})),n,jsxRuntime.exports.jsx("div",Object.assign({className:e.notificationList},{children:f.map(t=>{var e=-1!==c.findIndex(e=>e===t.id)||!u;return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationTypeItem,{notificationTypeIcon:t.notificationTypeIcon,notificationTypeName:t.notificationTypeName,defaultSelected:t.isSelected,onSelectNotificationType:l,notificationTypeId:t.id,isDisabled:e})},t.id+"-"+t.isSelected)})})),i,!s&&jsxRuntime.exports.jsx(Divider,{className:i?e.divider:e.dividerWithoutDescription})]}))}const useStyles$4=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},itemCell:{padding:0,"& > span":{padding:e.spacing(0,2)}},eventNameContainer:{display:"flex",alignItems:"center"},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0},customLineHeight:{lineHeight:e.spacing(8)},disabledCheckBox:{"& svg":{color:"green"}}}));function NotificationUtilityActionItem(e){const{events:t,disabled:n}=e,i=useStyles$4()["classes"],a=[{type:INotificationType.EMAIL,iconUrl:img$1n},{type:INotificationType.NOTIFICATION_CENTER,iconUrl:img$1m},{type:INotificationType.BANNER,iconUrl:img$1l}];return jsxRuntime.exports.jsx(TableContainer,{children:jsxRuntime.exports.jsxs(Table,Object.assign({"aria-label":"customized table"},{children:[jsxRuntime.exports.jsx(TableHead,{children:jsxRuntime.exports.jsxs(TableRow,{children:[jsxRuntime.exports.jsx(TableCell,Object.assign({className:i.tableCell},{children:jsxRuntime.exports.jsx(Typography,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),a.map(e=>jsxRuntime.exports.jsx(TableCell,Object.assign({align:"center",className:i.itemCell},{children:jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:e.type})}),e.type))]})}),jsxRuntime.exports.jsx(TableBody,{children:null===t||void 0===t?void 0:t.map(t=>jsxRuntime.exports.jsxs(TableRow,{children:[jsxRuntime.exports.jsxs(TableCell,Object.assign({className:classNames(i.eventNameContainer,i.tableCell)},{children:[jsxRuntime.exports.jsx(Checkbox,{id:t.id,disabled:n,className:i.tableRowCheckbox}),jsxRuntime.exports.jsx(ListItemText,{children:jsxRuntime.exports.jsx(Typography,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.VNVmyk",defaultMessage:"{defaultMessage}",description:"Finder notifications: {defaultMessage}",values:{defaultMessage:t.title,id:t.id}})})})]})),a.map(e=>jsxRuntime.exports.jsx(TableCell,Object.assign({className:i.itemCell},{children:jsxRuntime.exports.jsx(Checkbox,{id:"checkbox-"+t.id,icon:jsxRuntime.exports.jsx(default_1,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{})})}),e.type+"-type"))]},t.id))})]}))})}const useStyles$3=makeStyles()(e=>({finderNotification:{padding:e.spacing(4,6),maxHeight:"100%",overflow:"auto"},buttonBox:{display:"flex",justifyContent:"flex-end",marginTop:e.spacing(8)},buttonLeft:{marginRight:e.spacing(4)},settingItem:{marginBottom:e.spacing(6)},sharedItem:{padding:0}}));function NotificationUtilityPanel(e){const t=e["dataId"];e=useStyles$3().classes;const n=useSelector(notificationSelector).settings,i=n.utility;var a=null===i||void 0===i?void 0:i.find(e=>e.id===t);const[o,r]=react.exports.useState(a||{}),s=[],l=[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER];return l.forEach(t=>{-1===n.allowType.findIndex(e=>e===t)&&s.push(t)}),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.finderNotification},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null==o?void 0:o.allowType,allowNotification:null==o?void 0:o.allow,onChangeAllowType:function(i){r(e=>{var t=i?[...e.allowType]:[],n=i?[...e.action]:[...e.action].map(e=>Object.assign(Object.assign({},e),{allow:!1}));return Object.assign(Object.assign({},e),{allow:i,allowType:t,action:n})})},onChangeNotificationType:function(i,a){r(e=>{const t=[...e.allowType];var n=t.indexOf(i);return-1===n||a?t.push(i):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})},disabledTypes:s,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==o?void 0:o.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.ubNxKs",defaultMessage:"{utilityTitle}",description:"title of notification utility: {utilityTitle}",values:{id:null==o?void 0:o.id,utilityTitle:null==o?void 0:o.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.XkH621",defaultMessage:"Chose which events you’d like to be notified about.",description:"content of notification utility description"}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography,{variant:"caption",children:"Banner previews are being set at the parent level"})}),jsxRuntime.exports.jsx(NotificationUtilityActionItem,{events:null==o?void 0:o.action,onSelectAction:function(i){r(e=>{const t=[...e.action];var n=t.findIndex(e=>e.id===i.id);return t[n]=i,Object.assign(Object.assign({},e),{action:t})})},disabled:!o.allow}),jsxRuntime.exports.jsx(Divider,{style:{marginBottom:20,marginTop:15}}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}const useStyles$2=makeStyles()(e=>({notificationSetting:{padding:e.spacing(3,6,4.4),overflowY:"scroll",height:"100%"},appAllowTitle:{paddingTop:e.spacing(2.4)},dividerBigMargin:{marginTop:e.spacing(2.4),marginBottom:e.spacing(3)},notificationSettingItem:{padding:0},bannerStyleLabel:{fontWeight:"normal"}}));function NotificationSetting(e){var t=useStyles$2()["classes"];const a=useDispatch(),[n,i]=react.exports.useState(!0),[o,r]=react.exports.useState(!0);var s=useSelector(notificationSettingSelector);const[l,c]=react.exports.useState(s.bannerStyle),u=useSelector(notificationUtilitiesSelector),d=useSelector(notificationApplicationsSelector),[f,m]=react.exports.useState(null==s?void 0:s.allow),[p,h]=react.exports.useState(s);var s=-1!==(null==(s=null===p||void 0===p?void 0:p.allowType)?void 0:s.findIndex(e=>e===INotificationType.BANNER));const[y,g]=react.exports.useState(s);function T(e,t){var n={name:"NOTIFICATION_UTILITY",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},i={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"finder notifications"}};a(mountPanel({panelId:e||"",microFrontend:n,panelConfig:i}))}function v(e,t){var n={name:"NOTIFICATION_APPLICATION",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},i={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"app notifications"}};a(mountPanel({panelId:e||"",microFrontend:n,panelConfig:i}))}return react.exports.useEffect(()=>{a(updateNotificationSetting(p))},[p,a]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.notificationSetting},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null===p||void 0===p?void 0:p.allowType,allowNotification:null===p||void 0===p?void 0:p.allow,onChangeAllowType:function(n){m(n),n||(i(n),r(n)),h(e=>{var t=n?[...e.allowType]:[];return Object.assign(Object.assign({},e),{allow:n,allowType:t})})},hideDivider:y,onChangeNotificationType:function(i,a){i===INotificationType.BANNER&&g(a),h(e=>{const t=[...e.allowType];var n=t.indexOf(i);return-1===n||a?t.push(i):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})}}),f&&y&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography,{variant:"body2",children:"Banner Style"}),jsxRuntime.exports.jsx(FormControl,Object.assign({component:"fieldset"},{children:jsxRuntime.exports.jsxs(RadioGroup,Object.assign({"aria-label":"bannerStyle",name:"bannerStyle",value:l,onChange:e=>{c(e.target.value),a(updateBannerStyle(e.target.value))},row:!0},{children:[jsxRuntime.exports.jsx(FormControlLabel,{value:"temporary",control:jsxRuntime.exports.jsx(Radio,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography,{variant:"body2",children:"Temporary"})})}),jsxRuntime.exports.jsx(FormControlLabel,{value:"persistent",control:jsxRuntime.exports.jsx(Radio,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography,{variant:"body2",children:"Persistent"})})})]}))})),jsxRuntime.exports.jsx(Divider,{className:t.dividerBigMargin})]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.qJ0Sxo",defaultMessage:"Allow Utility Notifications",description:"allow-utility-notification"})}),jsxRuntime.exports.jsx(Switch,{checked:n,onChange:e=>{e=e.target.checked;i(e)},color:"primary",name:"enableUtilityNotification",disabled:!f})]})),jsxRuntime.exports.jsx(List,Object.assign({className:t.notificationSettingItem},{children:null===u||void 0===u?void 0:u.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:e.iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.tadsU0",defaultMessage:"{defaultMessage}",description:"title of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.allowType.join(", ")}}),onOpenUtility:T,utilityId:e.id,utilityTitle:e.title,disabled:!n},e.id))}))]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",className:t.appAllowTitle},{children:[jsxRuntime.exports.jsx(Typography,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.swIpqY",defaultMessage:"Allow Application Notifications",description:"allow-application-notification"})}),jsxRuntime.exports.jsx(Switch,{checked:o,onChange:e=>{e=e.target.checked;r(e)},color:"primary",name:"checkedB",disabled:!f})]})),jsxRuntime.exports.jsx(List,Object.assign({className:t.notificationSettingItem},{children:null==(s=null===d||void 0===d?void 0:d.allIds)?void 0:s.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:null===d||void 0===d?void 0:d.byId[e].iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.JvsYLn",defaultMessage:"{defaultMessage}",description:"title of notification application: {defaultMessage}",values:{idMessage:e,defaultMessage:null===d||void 0===d?void 0:d.byId[e].name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e,defaultMessage:null===d||void 0===d?void 0:d.byId[e].allowType.join(", ")}}),onOpenApplication:v,applicationId:e,applicationTitle:null===d||void 0===d?void 0:d.byId[e].name,disabled:!o},e))}))]})]}))})}const useStyles$1=makeStyles()(e=>({appNoti:{padding:e.spacing(6),paddingTop:e.spacing(4.4),overflowY:"scroll",height:"100%"}})),useStyles=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0,paddingTop:0,paddingBottom:0,height:"20px"},disabledCheckBox:{"& svg":{color:"green"}},firstColumn:{paddingRight:e.spacing(2)},secondColumn:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},thirdColumn:{paddingLeft:e.spacing(2)}}));function NotificationAllowCell(e){const{id:t,type:n,allowType:i,currentApplicationAllowType:a,isLineEnable:o,onChangeAppAction:r}=e,s=useStyles()["classes"];e=(e,t)=>{switch(t){case"email":return e.includes(INotificationType.EMAIL);case"banners":return e.includes(INotificationType.BANNER);case"notification-center":return e.includes(INotificationType.NOTIFICATION_CENTER)}};return jsxRuntime.exports.jsx(TableCell,Object.assign({align:"center",className:s.tableCell+" "+(()=>{switch(t){case"email":return s.firstColumn;case"notification-center":return s.secondColumn;case"banners":return s.thirdColumn;default:return""}})()},{children:jsxRuntime.exports.jsx(Checkbox,{id:"checkbox-"+t,checked:e(i,t),disabled:!e(a,t)||!o,icon:jsxRuntime.exports.jsx(default_1,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{color:e(a,t)&&o?"primary":"disabled"}),onChange:e=>{r(e,n)}})}))}function NotificationAllowRow(e){const{allowNotificationTitle:t,checked:n,allowType:i,appId:a,id:o}=e;e=useStyles().classes;const r=useDispatch();var s=useSelector(notificationApplicationSelector(a));const[l,c]=react.exports.useState(n),u=null==s?void 0:s.allowType,[d,f]=react.exports.useState(i),m=[{id:"email",type:INotificationType.EMAIL},{id:"notification-center",type:INotificationType.NOTIFICATION_CENTER},{id:"banners",type:INotificationType.BANNER}];const p=(e,t)=>{let n;n=e.currentTarget.checked?[...d,t]:d.filter(e=>e!==t),f(n),r(updateAppActionAllowNotification(a,o,n,"allowType"))};return jsxRuntime.exports.jsxs(TableRow,{children:[jsxRuntime.exports.jsx(TableCell,Object.assign({component:"th",scope:"row",className:e.tableCell},{children:jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Checkbox,{"data-test":"row-check-"+o,"data-testid":"row-check-"+o,className:e.rowCheckbox,checked:l,onChange:e=>{e=e.currentTarget.checked;c(e),r(updateAppActionAllowNotification(a,o,e,"allow"))}}),jsxRuntime.exports.jsx(Typography,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.tSG+Bv",defaultMessage:"{text}",description:"allow-notification-table-{text}",values:{text:t}})})]}))})),m.map(e=>jsxRuntime.exports.jsx(NotificationAllowCell,{id:e.id,type:e.type,allowType:i,currentApplicationAllowType:u,isLineEnable:l,onChangeAppAction:p},e.id))]})}function NotificationAllowTable(e){const{action:n,appId:i}=e;var e=useStyles()["classes"],t=classNames(e.tableCell,e.firstColumn),a=classNames(e.tableCell,e.secondColumn),o=classNames(e.tableCell,e.thirdColumn);return jsxRuntime.exports.jsx(TableContainer,{children:jsxRuntime.exports.jsxs(Table,Object.assign({"aria-label":"notification-table"},{children:[jsxRuntime.exports.jsx(TableHead,{children:jsxRuntime.exports.jsxs(TableRow,{children:[jsxRuntime.exports.jsx(TableCell,Object.assign({className:e.tableCell},{children:jsxRuntime.exports.jsx(Typography,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),jsxRuntime.exports.jsx(TableCell,Object.assign({align:"center",className:t},{children:jsxRuntime.exports.jsx("img",{src:img$1n,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell,Object.assign({align:"center",className:a},{children:jsxRuntime.exports.jsx("img",{src:img$1m,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell,Object.assign({align:"center",className:o},{children:jsxRuntime.exports.jsx("img",{src:img$1l,alt:"img-icon"})}))]})}),jsxRuntime.exports.jsx(TableBody,{children:null==(e=null===n||void 0===n?void 0:n.allIds)?void 0:e.map(e=>{var t;return jsxRuntime.exports.jsx(NotificationAllowRow,{allowNotificationTitle:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.title,checked:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allow,allowType:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allowType,appId:i,id:e},e)})})]}))})}function NotificationApplication(e){const o=e["dataId"];var e=useStyles$1()["classes"];const t=useDispatch();var n=useSelector(notificationApplicationsSelector);const[i,r]=react.exports.useState(n),a=useSelector(notificationSelector).settings;var s=useSelector(notificationApplicationSelector(o));react.exports.useEffect(()=>{t(updateApplicationSetting(i))},[i]);const l=[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER],c=[];l.forEach(t=>{-1===(null===a||void 0===a?void 0:a.allowType.findIndex(e=>e===t))&&c.push(t)});return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.appNoti},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationType,{notificationTypeTitle:"Allow Notifications",allowNotification:null==n?void 0:n.byId[o].allow,allowTypes:null==(e=null==n?void 0:n.byId[o])?void 0:e.allowType,disabledTypes:c,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==(e=null==n?void 0:n.byId[o])?void 0:e.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.OR1ivL",defaultMessage:"{text}",description:"notification-app-id",values:{text:null==s?void 0:s.name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.QgzNQa",defaultMessage:"{text}",description:"notification application detail text",values:{text:null==s?void 0:s.description}}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography,{variant:"caption",children:"Banner previews are being set at the parent level"}),onChangeNotificationType:function(i,a){r(e=>{const t=[...e.byId[o].allowType];var n=t.indexOf(i);return a&&-1===n?t.push(i):t.splice(n,1),Object.assign(Object.assign({},e),{byId:Object.assign(Object.assign({},e.byId),{[o]:Object.assign(Object.assign({},e.byId[o]),{allowType:t})})})})},onChangeAllowType:e=>{t(updateAppAllowNotification(o,e))}})}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(NotificationAllowTable,{action:null==(e=null==n?void 0:n.byId[o])?void 0:e.action,appId:o}),jsxRuntime.exports.jsx(Divider,{style:{marginBottom:20,marginTop:15}})]}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}var index_esm=Object.freeze({__proto__:null,NotificationApplication:NotificationApplication,NotificationDetailPanel:NotificationDetailPanel,NotificationPanel:NotificationPanel,NotificationSetting:NotificationSetting,NotificationUtilityPanel:NotificationUtilityPanel,initNotificationAction:initNotificationAction,onNotificationActionClicked:onNotificationActionClicked});export{index_esm as a,getNotificationModule$1 as g,initNotificationAction as i,markAllNotificationsSeenRequest as m,onNotificationActionClicked as o,unseenNotificationSelector as u};
|
|
136
|
+
`,variables:e,graphEndpoint:n,token:i})}catch(e){return{success:!1}}});function*refetchNotificationSetting(){yield put(getNotification(0,30))}function*getNotificationListByMailBoxSaga(e){const{status:t,mailBoxIds:n,mailbox:i}=yield select(mailBoxSelector),{limit:a,offset:o,callback:r}=e.payload;var e=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector),l="success"===t||"failure"===t;if(0!==Object.keys(i).length||l){yield put(getNotificationStart(o,a));l=yield call(handleNotificationListByMailBox,e,s,n,o,a);if(null!==r&&void 0!==r&&r(),0<(null==(e=null==l?void 0:l.errors)?void 0:e.length))yield put(getNotificationListByMailBoxFail());else{let n=0;const c=null==(e=null==(s=null==l?void 0:l.data)?void 0:s.notificationMailboxes)?void 0:e.map(t=>{var e;return 0<(null==(e=null==t?void 0:t.notifications)?void 0:e.count)?(e=null==(e=null==(e=null==t?void 0:t.notifications)?void 0:e.records)?void 0:e.map(e=>Object.assign(Object.assign({},e),{mailboxId:t.id})),n++,e):[]}),u=(null===c||void 0===c?void 0:c.flat())||[];l=u.map(t=>{var e,n=i.find(e=>e.id===t.mailboxId);return Object.assign(Object.assign({},t),{appId:(null==(e=null==n?void 0:n.application)?void 0:e.applicationId)||"",appName:(null==(e=null==n?void 0:n.application)?void 0:e.name)||"",eventNames:(null==(e=null==n?void 0:n.eventFilter)?void 0:e.eventNames)||[],icon:(null==(e=null==n?void 0:n.application)?void 0:e.icon)||"",title:t.title||""})});yield put(getNotificationListByMailBoxSuccess({offset:o,limit:a,availableMailBoxes:n,data:l}))}}else yield take(subscriberSuccess({}).type)}function*listenToPushNotificationSaga(e){var t;const n=(yield select(mailBoxSelector))["mailbox"],i=e["payload"];e=n.find(e=>e.id===i.mailboxId);yield put(updateNotificationList(Object.assign(Object.assign({},i),{appId:(null==(t=null==e?void 0:e.application)?void 0:t.applicationId)||"",appName:(null==(t=null==e?void 0:e.application)?void 0:t.name)||"",icon:(null==(t=null==e?void 0:e.application)?void 0:t.icon)||""})))}function*updateNotificationReadSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);try{var i=yield call(handleUpdateNotificationRead,t,n,e.payload);return null!=i&&i.error?void(yield put(updateNotificationReadFail())):void(yield put(updateNotificationReadSuccess(Object.assign({},i))))}catch(e){yield put(updateNotificationReadFail())}}function*updateMarkAllReadNotificationSaga(){var e=(yield select(mailBoxSelector))["mailBoxIds"],t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);if(0<(null==e?void 0:e.length))try{(yield call(handleMarkAllReadNotification,e,t,n)).error?yield put(markAllReadNotificationFail()):yield put(markAllReadNotificationSuccess())}catch(e){yield put(markAllReadNotificationFail())}}function*getNotificationActionSaga(e){var t,n,{eventType:i,appId:a,eventName:o}=yield select(notificationDetailSelector(e.payload)),r=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector);try{var l,c=yield call(handleGetNotificationAction,o,i,a,r,s);c.error?yield put(getNotificationActionError()):(l=(null==(n=null==(t=null==c?void 0:c.data)?void 0:t.notificationActions)?void 0:n.records)||[],yield put(getNotificationActionSuccess(e.payload,l)))}catch(e){yield put(getNotificationActionError())}}function*notificationSaga(){yield all([takeEvery$1(getNotification.type,getNotificationListByMailBoxSaga),takeLatest$1(updateUtilitySetting.type,refetchNotificationSetting),takeEvery$1(getNotificationListByMailBoxRequest.type,getNotificationListByMailBoxSaga),takeEvery$1("mailbox/PUSH_NOTIFICATION",listenToPushNotificationSaga),takeEvery$1(updateNotificationReadRequest.type,updateNotificationReadSaga),takeEvery$1(GET_NOTIFICATION_ACTION_REQUEST,getNotificationActionSaga),takeLatest$1(markAllReadNotificationRequest.type,updateMarkAllReadNotificationSaga)])}function getNotificationModule(){return{id:"os-notification-panel",reducerMap:{[nameSpace]:notificationReducer},sagas:[notificationSaga],initialActions:[],retained:!0}}const useStyles$b=makeStyles()(e=>({root:{width:"100%",height:"100%"},noData:{paddingTop:66,display:"flex",justifyContent:"center"},iconNoData:{width:235,height:235,display:"flex",justifyContent:"center",borderRadius:"50%",padding:"20px",border:"20px solid #F9F9F9"},noDataDescription:{display:"flex",justifyContent:"center",marginTop:66},noDataDescriptionText:{fontSize:"18px",lineHeight:"23px",textTransform:"uppercase",color:e.palette.secondary.main}}));function NotificationContent(){var e=useStyles$b()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:e.root,"data-testid":"notification-content"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:e.noData},{children:jsxRuntime.exports.jsx("div",Object.assign({className:e.iconNoData},{children:jsxRuntime.exports.jsx("img",{src:img$E,draggable:"false",alt:"noNotification"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:e.noDataDescription},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-test":"no-notification",className:e.noDataDescriptionText},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.pBrbyj",defaultMessage:"You don’t have any notifications!",description:"Notification panel: no notification message"})}))}))]}))}const useStyles$a=makeStyles()(e=>({cardContainer:{width:"100%","&:hover":{backgroundColor:"#EEF3F9"}},rootCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer"},unreadCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer",paddingLeft:e.spacing(2)},iconCard:{marginTop:e.spacing(-.4)},leftContent:{width:"345px",padding:e.spacing(0,6,0,3)},titleCard:{display:"flex"},appsCard:{fontSize:"14px",fontWeight:600},timestampCard:{fontSize:"12px",paddingLeft:e.spacing(3),color:e.palette.text.secondary},contentCard:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:e.palette.text.secondary},dividerCard:{margin:e.spacing(0,6),height:"0.5px"},notificationIcon:{width:24,height:24},unread:{width:"auto",marginRight:e.spacing(2.4),fontSize:"unset"},unreadIcon:{width:8,height:8,color:e.palette.primary.main},appName:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"calc(100% - 85px)"}})),NotificationCard=react.exports.forwardRef(({data:e,onViewDetail:t},n)=>{var i=useStyles$a()["classes"];const a=useDispatch(),[o,r]=react.exports.useState(!1);const{createdDateTime:s,icon:l,title:c,appName:u,body:d,id:f,flags:m}=e;return jsxRuntime.exports.jsxs("div",Object.assign({ref:n,className:i.cardContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({onClick:t,className:null!==m&&void 0!==m&&m.includes(NotificationFlag.unread)?i.unreadCard:i.rootCard},{children:[(null===m||void 0===m?void 0:m.includes(NotificationFlag.unread))&&jsxRuntime.exports.jsx(Icon,{"data-test":"notification-unread-icon","data-testid":"notification-unread-icon",className:i.unread,children:jsxRuntime.exports.jsx(default_1$1,{className:i.unreadIcon}),onClick:function(e){e.stopPropagation(),a(updateNotificationReadRequest(f))}}),jsxRuntime.exports.jsx("div",Object.assign({className:i.iconCard},{children:l&&!o?jsxRuntime.exports.jsx("img",{src:l,className:i.notificationIcon,draggable:"false",alt:"notification-card-icon",onError:function(){r(!0)}}):jsxRuntime.exports.jsx(Notifications,{})})),jsxRuntime.exports.jsxs("div",Object.assign({className:i.leftContent},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:i.titleCard},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.appName},{children:null!==m&&void 0!==m&&m.includes(NotificationFlag.unread)?jsxRuntime.exports.jsx("strong",{children:u}):u})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.timestampCard},{children:jsxRuntime.exports.jsx(FormattedRelativeTime$1,{value:getRelativeValue(s),unit:"minute",updateIntervalInSeconds:60,children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.mvPoLJ",defaultMessage:"Just now",description:"the time label of notification that received on 1 minute"}):react.exports.createElement("span",{},e)})}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.contentCard},{children:convertHTMLEntities(c||d)}))})]}))]})),jsxRuntime.exports.jsx(Divider,{className:i.dividerCard})]}))}),useStyles$9=makeStyles()(e=>({header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(6,6,4,6),position:"sticky",width:"fit-content",fontSize:"14px",fontWeight:400,top:0},scrollContent:{overflow:"hidden"},infinityLoading:{display:"flex",justifyContent:"center",padding:e.spacing(4)}}));function NotificationList({title:e,data:n,loading:t,handleGetNotification:i,onOpenNotificationDetail:a}){var o=useStyles$9()["classes"];const r=react.exports.useRef(),s=react.exports.useCallback(e=>{t||(r.current&&r.current.disconnect(),console.log(IntersectionObserver),r.current=new IntersectionObserver(e=>{e[0].isIntersecting&&i()}),e&&r.current.observe(e))},[i,t]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.header},{children:e.toUpperCase()})),jsxRuntime.exports.jsxs("div",Object.assign({className:o.scrollContent},{children:[n.map((e,t)=>n.length===t+1?jsxRuntime.exports.jsx(NotificationCard,{ref:s,onViewDetail:()=>null==a?void 0:a(e),data:e},t):jsxRuntime.exports.jsx(NotificationCard,{onViewDetail:()=>null==a?void 0:a(e),data:e},t)),t&&jsxRuntime.exports.jsx("div",Object.assign({className:o.infinityLoading},{children:jsxRuntime.exports.jsx(CircularProgress,{size:30})}))]}))]})}const useStyles$8=makeStyles()(e=>({loadingContainer:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},filterContainer:{position:"absolute",top:e.spacing(12.4),right:0,paddingTop:e.spacing(3),paddingRight:e.spacing(6),paddingBottom:e.spacing(2),width:"100%",display:"flex",justifyContent:"flex-end",backgroundColor:e.palette.background.default},markAllReadButton:{cursor:"pointer",marginRight:e.spacing(4),backgroundColor:e.palette.background.default,textTransform:"capitalize"}})),NotificationPanel=()=>{const i=useDispatch();var e=useStyles$8()["classes"],t=useSelector(applicationFilterSelector)||[];const[n,a]=react.exports.useState(!1),o=useSelector(mailboxIdSelector);var r=useSelector(notificationWithFilterSelector);const{filter:s,status:l,notifications:c,availableMailBoxes:u,offset:d,limit:f}=useSelector(notificationSelector),m=e=>Math.max(Math.ceil(50/e),5);react.exports.useEffect(()=>{var e=(null===o||void 0===o?void 0:o.length)||0;0<e&&0===f&&(e=m(e),i(getNotification(0,e)))},[i,f,o]);var p=react.exports.useCallback(()=>{var e;0<u&&(a(!0),e=m(u),i(getNotification(d+f,e,()=>{a(!1)})))},[u,i,f,d]);return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getNotificationModule()]},{children:0===r.length&&"success"!==l&&"failure"!==l&&0<o.length?jsxRuntime.exports.jsx("div",Object.assign({className:e.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress,{})})):0<(null==c?void 0:c.length)?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.filterContainer,id:"notification-list-header"},{children:[jsxRuntime.exports.jsx(Button,Object.assign({onClick:function(){i(markAllReadNotificationRequest())},className:e.markAllReadButton,"data-test":"notification-mark-all-read-button","data-testid":"notification-mark-all-read-button"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",color:"primary"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.PtPIns",defaultMessage:"Mark All Read",description:"label of Mark All Read button"})}))})),jsxRuntime.exports.jsx(Filter,{data:[...filters,...t],filter:s,onFilter:function(e){e=e.target.value,i(updateFilterValue(e))}})]})),jsxRuntime.exports.jsx(NotificationList,{title:"All time",onOpenNotificationDetail:function(e){var t="DETAIL_PANEL_ID",n={name:"NOTIFICATION_DETAIL",config:{mode:"actionable",id:e.id,data:Object.assign({},e),actionIconButtons:null!=(n=e.actions)?n:[],onClose:()=>{console.log("onClose")}}};i(unmountPanel(t)),i(mountPanel({panelId:t,microFrontend:n,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:413,width:420,header:{title:"Notification detail"},dimmed:0,parentPanelId:"NOTIFICATION_PANEL_ID"}})),i(updateNotificationReadRequest(e.id))},data:r,loading:n,handleGetNotification:p})]}):jsxRuntime.exports.jsx(NotificationContent,{})}))})};function CustomWorkFlow(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center","data-testid":"custom-workflow-box"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.1+8+OX",defaultMessage:"Custom Workflows",description:"custom-workflows"})}),jsxRuntime.exports.jsx(Button,{variant:"outlined",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.gAFAOA",defaultMessage:"Create New",description:"creat-new-btn"}),color:"primary"})]})),jsxRuntime.exports.jsx(Typography$1,{style:{fontSize:14,marginTop:20},children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.9+Qhjr",defaultMessage:"You don’t have any custom workflows yet. Get started by clicking the Create New button above!",description:"text"})})]})}const useStyles$7=makeStyles()(e=>({dividerSmallMargin:{marginTop:e.spacing(3.6),marginBottom:e.spacing(4)},utilityItem:{padding:0,cursor:"pointer"},utilityItemHover:{padding:e.spacing(2,0),"&:hover":{backgroundColor:e.palette.background.paper}},utilityDetail:{fontSize:12}}));function NotificationSettingItem(e){const{imgSrc:t,primaryText:n,secondaryText:i,bigSize:a,onOpenUtility:o,onOpenApplication:r,hideDivider:s,applicationId:l,applicationTitle:c,utilityId:u="",utilityTitle:d="Finder",disabled:f,isHover:m}=e;e=useStyles$7().classes;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem,Object.assign({className:classNames(e.utilityItem,m?e.utilityItemHover:""),onClick:function(){null!==o&&void 0!==o&&o(u,d),null!==r&&void 0!==r&&r(l,c)},disabled:f,"data-testid":"notification-setting-item"},{children:[jsxRuntime.exports.jsx(ListItemAvatar,{children:jsxRuntime.exports.jsx(Avatar,{style:{width:a?60:40,height:a?60:40,borderRadius:"50%",marginRight:19},src:t})}),jsxRuntime.exports.jsx(ListItemText,{primary:jsxRuntime.exports.jsx(Typography$1,{variant:a?"h3":"body2",children:n}),secondary:jsxRuntime.exports.jsx(Typography$1,{variant:a?"body2":"caption",children:i})})]})),!s&&jsxRuntime.exports.jsx(Divider,{className:m?"":e.dividerSmallMargin})]})}const useStyles$6=makeStyles()(e=>({notificationTypeItemBox:{background:e.palette.background.paper,borderRadius:e.shape.borderRadius,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",padding:e.spacing(4,1,1),height:"100%",fontSize:10,lineHeight:"16px",justifyContent:"center"},disableType:{color:e.palette.grey[500]}}));function NotificationTypeItem(e){const{notificationTypeIcon:t,notificationTypeName:n,defaultSelected:i,onSelectNotificationType:a,notificationTypeId:o,isDisabled:r}=e,[s,l]=react.exports.useState(i);e=useStyles$6().classes;return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(e.notificationTypeItemBox,r?e.disableType:""),"data-testid":"notification-type-item"},{children:[jsxRuntime.exports.jsx("div",{children:"string"==typeof t?jsxRuntime.exports.jsx("img",{src:t,alt:"icon",draggable:"false"}):t}),jsxRuntime.exports.jsx("div",{children:n}),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Checkbox,{icon:jsxRuntime.exports.jsx("img",{src:img$1k,alt:"uncheck icon",draggable:"false"}),checkedIcon:jsxRuntime.exports.jsx("img",{src:img$1j,alt:"checked icon",draggable:"false"}),checked:s,onChange:function(){l(e=>(null!==a&&void 0!==a&&a(o,!e),!e))},disabled:!!r})})]}))}const useStyles$5=makeStyles()(e=>({notificationTypeBox:{paddingBottom:e.spacing(0)},notificationTypeHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:16,lineHeight:"22px",fontWeight:600,marginBottom:e.spacing(2)},notificationList:{display:"inline-grid",gridColumnGap:e.spacing(2.8),gridTemplateColumns:"1fr 1fr 1fr",width:"100%",marginBottom:e.spacing(4.4)},divider:{marginTop:e.spacing(4),marginBottom:e.spacing(4.4)},dividerWithoutDescription:{marginBottom:e.spacing(3)}})),defaultNotificationTypeList=[{id:INotificationType.EMAIL,notificationTypeIcon:jsxRuntime.exports.jsx(Email,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.rTFvFj",defaultMessage:"Email",description:"allow notification types: email"}),isSelected:!0},{id:INotificationType.NOTIFICATION_CENTER,notificationTypeIcon:jsxRuntime.exports.jsx(HelpCenter,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.SmyvFq",defaultMessage:"Notification Center",description:"allow notification types: Notification Center"}),isSelected:!0},{id:INotificationType.BANNER,notificationTypeIcon:jsxRuntime.exports.jsx(Banner,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.r7Whww",defaultMessage:"Banners",description:"allow notification types: Banners"}),isSelected:!0}];function NotificationType(e){const{notificationTypeTitle:t,children:n,description:i,allowTypes:a=[],allowNotification:o,onChangeAllowType:r,hideDivider:s,onChangeNotificationType:l,disabledTypes:c=[]}=e,[u,d]=react.exports.useState(!!o),[f,m]=react.exports.useState(defaultNotificationTypeList);e=useStyles$5().classes;const p=[...a],[h,y]=react.exports.useState(a);var g=t||"Allow Notifications";return react.exports.useEffect(()=>{var e=defaultNotificationTypeList.map(t=>{var e=-1!==h.findIndex(e=>e===t.id),n=-1!==c.findIndex(e=>e===t.id);return Object.assign(Object.assign({},t),{isSelected:e,isDisabled:n})});m(e)},[p.join(", "),h]),react.exports.useEffect(()=>{null!==r&&void 0!==r&&r(u),u?0===h.length&&u&&y([INotificationType.EMAIL]):y([])},[u]),jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeBox},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeHeader},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.8Z0yyD",defaultMessage:"{title}",description:"notification setting: allow notification types",values:{title:g}})}),jsxRuntime.exports.jsx(Switch,{checked:u,onChange:function(){d(e=>!e)},color:"primary",name:"notificationTypeChecked","data-testid":"notification-type-switch"})]})),n,jsxRuntime.exports.jsx("div",Object.assign({className:e.notificationList},{children:f.map(t=>{var e=-1!==c.findIndex(e=>e===t.id)||!u;return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationTypeItem,{notificationTypeIcon:t.notificationTypeIcon,notificationTypeName:t.notificationTypeName,defaultSelected:t.isSelected,onSelectNotificationType:l,notificationTypeId:t.id,isDisabled:e})},t.id+"-"+t.isSelected)})})),i,!s&&jsxRuntime.exports.jsx(Divider,{className:i?e.divider:e.dividerWithoutDescription})]}))}const useStyles$4=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},itemCell:{padding:0,"& > span":{padding:e.spacing(0,2)}},eventNameContainer:{display:"flex",alignItems:"center"},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0},customLineHeight:{lineHeight:e.spacing(8)},disabledCheckBox:{"& svg":{color:"green"}}}));function NotificationUtilityActionItem(e){const{events:t,disabled:n}=e,i=useStyles$4()["classes"],a=[{type:INotificationType.EMAIL,iconUrl:img$1n},{type:INotificationType.NOTIFICATION_CENTER,iconUrl:img$1m},{type:INotificationType.BANNER,iconUrl:img$1l}];return jsxRuntime.exports.jsx(TableContainer,{children:jsxRuntime.exports.jsxs(Table,Object.assign({"aria-label":"customized table"},{children:[jsxRuntime.exports.jsx(TableHead,{children:jsxRuntime.exports.jsxs(TableRow,{children:[jsxRuntime.exports.jsx(TableCell,Object.assign({className:i.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),a.map(e=>jsxRuntime.exports.jsx(TableCell,Object.assign({align:"center",className:i.itemCell},{children:jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:e.type})}),e.type))]})}),jsxRuntime.exports.jsx(TableBody,{children:null===t||void 0===t?void 0:t.map(t=>jsxRuntime.exports.jsxs(TableRow,{children:[jsxRuntime.exports.jsxs(TableCell,Object.assign({className:classNames(i.eventNameContainer,i.tableCell)},{children:[jsxRuntime.exports.jsx(Checkbox,{id:t.id,disabled:n,className:i.tableRowCheckbox}),jsxRuntime.exports.jsx(ListItemText,{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.VNVmyk",defaultMessage:"{defaultMessage}",description:"Finder notifications: {defaultMessage}",values:{defaultMessage:t.title,id:t.id}})})})]})),a.map(e=>jsxRuntime.exports.jsx(TableCell,Object.assign({className:i.itemCell},{children:jsxRuntime.exports.jsx(Checkbox,{id:"checkbox-"+t.id,icon:jsxRuntime.exports.jsx(default_1,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{})})}),e.type+"-type"))]},t.id))})]}))})}const useStyles$3=makeStyles()(e=>({finderNotification:{padding:e.spacing(4,6),maxHeight:"100%",overflow:"auto"},buttonBox:{display:"flex",justifyContent:"flex-end",marginTop:e.spacing(8)},buttonLeft:{marginRight:e.spacing(4)},settingItem:{marginBottom:e.spacing(6)},sharedItem:{padding:0}}));function NotificationUtilityPanel(e){const t=e["dataId"];e=useStyles$3().classes;const n=useSelector(notificationSelector).settings,i=n.utility;var a=null===i||void 0===i?void 0:i.find(e=>e.id===t);const[o,r]=react.exports.useState(a||{}),s=[],l=[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER];return l.forEach(t=>{-1===n.allowType.findIndex(e=>e===t)&&s.push(t)}),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.finderNotification},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null==o?void 0:o.allowType,allowNotification:null==o?void 0:o.allow,onChangeAllowType:function(i){r(e=>{var t=i?[...e.allowType]:[],n=i?[...e.action]:[...e.action].map(e=>Object.assign(Object.assign({},e),{allow:!1}));return Object.assign(Object.assign({},e),{allow:i,allowType:t,action:n})})},onChangeNotificationType:function(i,a){r(e=>{const t=[...e.allowType];var n=t.indexOf(i);return-1===n||a?t.push(i):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})},disabledTypes:s,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==o?void 0:o.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.ubNxKs",defaultMessage:"{utilityTitle}",description:"title of notification utility: {utilityTitle}",values:{id:null==o?void 0:o.id,utilityTitle:null==o?void 0:o.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.XkH621",defaultMessage:"Chose which events you’d like to be notified about.",description:"content of notification utility description"}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"})}),jsxRuntime.exports.jsx(NotificationUtilityActionItem,{events:null==o?void 0:o.action,onSelectAction:function(i){r(e=>{const t=[...e.action];var n=t.findIndex(e=>e.id===i.id);return t[n]=i,Object.assign(Object.assign({},e),{action:t})})},disabled:!o.allow}),jsxRuntime.exports.jsx(Divider,{style:{marginBottom:20,marginTop:15}}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}const useStyles$2=makeStyles()(e=>({notificationSetting:{padding:e.spacing(3,6,4.4),overflowY:"scroll",height:"100%"},appAllowTitle:{paddingTop:e.spacing(2.4)},dividerBigMargin:{marginTop:e.spacing(2.4),marginBottom:e.spacing(3)},notificationSettingItem:{padding:0},bannerStyleLabel:{fontWeight:"normal"}}));function NotificationSetting(e){var t=useStyles$2()["classes"];const a=useDispatch(),[n,i]=react.exports.useState(!0),[o,r]=react.exports.useState(!0);var s=useSelector(notificationSettingSelector);const[l,c]=react.exports.useState(s.bannerStyle),u=useSelector(notificationUtilitiesSelector),d=useSelector(notificationApplicationsSelector),[f,m]=react.exports.useState(null==s?void 0:s.allow),[p,h]=react.exports.useState(s);var s=-1!==(null==(s=null===p||void 0===p?void 0:p.allowType)?void 0:s.findIndex(e=>e===INotificationType.BANNER));const[y,g]=react.exports.useState(s);function T(e,t){var n={name:"NOTIFICATION_UTILITY",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},i={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"finder notifications"}};a(mountPanel({panelId:e||"",microFrontend:n,panelConfig:i}))}function v(e,t){var n={name:"NOTIFICATION_APPLICATION",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},i={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"app notifications"}};a(mountPanel({panelId:e||"",microFrontend:n,panelConfig:i}))}return react.exports.useEffect(()=>{a(updateNotificationSetting(p))},[p,a]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.notificationSetting},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null===p||void 0===p?void 0:p.allowType,allowNotification:null===p||void 0===p?void 0:p.allow,onChangeAllowType:function(n){m(n),n||(i(n),r(n)),h(e=>{var t=n?[...e.allowType]:[];return Object.assign(Object.assign({},e),{allow:n,allowType:t})})},hideDivider:y,onChangeNotificationType:function(i,a){i===INotificationType.BANNER&&g(a),h(e=>{const t=[...e.allowType];var n=t.indexOf(i);return-1===n||a?t.push(i):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})}}),f&&y&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Banner Style"}),jsxRuntime.exports.jsx(FormControl,Object.assign({component:"fieldset"},{children:jsxRuntime.exports.jsxs(RadioGroup,Object.assign({"aria-label":"bannerStyle",name:"bannerStyle",value:l,onChange:e=>{c(e.target.value),a(updateBannerStyle(e.target.value))},row:!0},{children:[jsxRuntime.exports.jsx(FormControlLabel$1,{value:"temporary",control:jsxRuntime.exports.jsx(Radio,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Temporary"})})}),jsxRuntime.exports.jsx(FormControlLabel$1,{value:"persistent",control:jsxRuntime.exports.jsx(Radio,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Persistent"})})})]}))})),jsxRuntime.exports.jsx(Divider,{className:t.dividerBigMargin})]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.qJ0Sxo",defaultMessage:"Allow Utility Notifications",description:"allow-utility-notification"})}),jsxRuntime.exports.jsx(Switch,{checked:n,onChange:e=>{e=e.target.checked;i(e)},color:"primary",name:"enableUtilityNotification",disabled:!f})]})),jsxRuntime.exports.jsx(List,Object.assign({className:t.notificationSettingItem},{children:null===u||void 0===u?void 0:u.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:e.iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.tadsU0",defaultMessage:"{defaultMessage}",description:"title of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.allowType.join(", ")}}),onOpenUtility:T,utilityId:e.id,utilityTitle:e.title,disabled:!n},e.id))}))]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",className:t.appAllowTitle},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.swIpqY",defaultMessage:"Allow Application Notifications",description:"allow-application-notification"})}),jsxRuntime.exports.jsx(Switch,{checked:o,onChange:e=>{e=e.target.checked;r(e)},color:"primary",name:"checkedB",disabled:!f})]})),jsxRuntime.exports.jsx(List,Object.assign({className:t.notificationSettingItem},{children:null==(s=null===d||void 0===d?void 0:d.allIds)?void 0:s.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:null===d||void 0===d?void 0:d.byId[e].iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.JvsYLn",defaultMessage:"{defaultMessage}",description:"title of notification application: {defaultMessage}",values:{idMessage:e,defaultMessage:null===d||void 0===d?void 0:d.byId[e].name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e,defaultMessage:null===d||void 0===d?void 0:d.byId[e].allowType.join(", ")}}),onOpenApplication:v,applicationId:e,applicationTitle:null===d||void 0===d?void 0:d.byId[e].name,disabled:!o},e))}))]})]}))})}const useStyles$1=makeStyles()(e=>({appNoti:{padding:e.spacing(6),paddingTop:e.spacing(4.4),overflowY:"scroll",height:"100%"}})),useStyles=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0,paddingTop:0,paddingBottom:0,height:"20px"},disabledCheckBox:{"& svg":{color:"green"}},firstColumn:{paddingRight:e.spacing(2)},secondColumn:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},thirdColumn:{paddingLeft:e.spacing(2)}}));function NotificationAllowCell(e){const{id:t,type:n,allowType:i,currentApplicationAllowType:a,isLineEnable:o,onChangeAppAction:r}=e,s=useStyles()["classes"];e=(e,t)=>{switch(t){case"email":return e.includes(INotificationType.EMAIL);case"banners":return e.includes(INotificationType.BANNER);case"notification-center":return e.includes(INotificationType.NOTIFICATION_CENTER)}};return jsxRuntime.exports.jsx(TableCell,Object.assign({align:"center",className:s.tableCell+" "+(()=>{switch(t){case"email":return s.firstColumn;case"notification-center":return s.secondColumn;case"banners":return s.thirdColumn;default:return""}})()},{children:jsxRuntime.exports.jsx(Checkbox,{id:"checkbox-"+t,checked:e(i,t),disabled:!e(a,t)||!o,icon:jsxRuntime.exports.jsx(default_1,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{color:e(a,t)&&o?"primary":"disabled"}),onChange:e=>{r(e,n)}})}))}function NotificationAllowRow(e){const{allowNotificationTitle:t,checked:n,allowType:i,appId:a,id:o}=e;e=useStyles().classes;const r=useDispatch();var s=useSelector(notificationApplicationSelector(a));const[l,c]=react.exports.useState(n),u=null==s?void 0:s.allowType,[d,f]=react.exports.useState(i),m=[{id:"email",type:INotificationType.EMAIL},{id:"notification-center",type:INotificationType.NOTIFICATION_CENTER},{id:"banners",type:INotificationType.BANNER}];const p=(e,t)=>{let n;n=e.currentTarget.checked?[...d,t]:d.filter(e=>e!==t),f(n),r(updateAppActionAllowNotification(a,o,n,"allowType"))};return jsxRuntime.exports.jsxs(TableRow,{children:[jsxRuntime.exports.jsx(TableCell,Object.assign({component:"th",scope:"row",className:e.tableCell},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Checkbox,{"data-test":"row-check-"+o,"data-testid":"row-check-"+o,className:e.rowCheckbox,checked:l,onChange:e=>{e=e.currentTarget.checked;c(e),r(updateAppActionAllowNotification(a,o,e,"allow"))}}),jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.tSG+Bv",defaultMessage:"{text}",description:"allow-notification-table-{text}",values:{text:t}})})]}))})),m.map(e=>jsxRuntime.exports.jsx(NotificationAllowCell,{id:e.id,type:e.type,allowType:i,currentApplicationAllowType:u,isLineEnable:l,onChangeAppAction:p},e.id))]})}function NotificationAllowTable(e){const{action:n,appId:i}=e;var e=useStyles()["classes"],t=classNames(e.tableCell,e.firstColumn),a=classNames(e.tableCell,e.secondColumn),o=classNames(e.tableCell,e.thirdColumn);return jsxRuntime.exports.jsx(TableContainer,{children:jsxRuntime.exports.jsxs(Table,Object.assign({"aria-label":"notification-table"},{children:[jsxRuntime.exports.jsx(TableHead,{children:jsxRuntime.exports.jsxs(TableRow,{children:[jsxRuntime.exports.jsx(TableCell,Object.assign({className:e.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),jsxRuntime.exports.jsx(TableCell,Object.assign({align:"center",className:t},{children:jsxRuntime.exports.jsx("img",{src:img$1n,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell,Object.assign({align:"center",className:a},{children:jsxRuntime.exports.jsx("img",{src:img$1m,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell,Object.assign({align:"center",className:o},{children:jsxRuntime.exports.jsx("img",{src:img$1l,alt:"img-icon"})}))]})}),jsxRuntime.exports.jsx(TableBody,{children:null==(e=null===n||void 0===n?void 0:n.allIds)?void 0:e.map(e=>{var t;return jsxRuntime.exports.jsx(NotificationAllowRow,{allowNotificationTitle:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.title,checked:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allow,allowType:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allowType,appId:i,id:e},e)})})]}))})}function NotificationApplication(e){const o=e["dataId"];var e=useStyles$1()["classes"];const t=useDispatch();var n=useSelector(notificationApplicationsSelector);const[i,r]=react.exports.useState(n),a=useSelector(notificationSelector).settings;var s=useSelector(notificationApplicationSelector(o));react.exports.useEffect(()=>{t(updateApplicationSetting(i))},[i]);const l=[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER],c=[];l.forEach(t=>{-1===(null===a||void 0===a?void 0:a.allowType.findIndex(e=>e===t))&&c.push(t)});return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.appNoti},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationType,{notificationTypeTitle:"Allow Notifications",allowNotification:null==n?void 0:n.byId[o].allow,allowTypes:null==(e=null==n?void 0:n.byId[o])?void 0:e.allowType,disabledTypes:c,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==(e=null==n?void 0:n.byId[o])?void 0:e.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.OR1ivL",defaultMessage:"{text}",description:"notification-app-id",values:{text:null==s?void 0:s.name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-notification-panel.QgzNQa",defaultMessage:"{text}",description:"notification application detail text",values:{text:null==s?void 0:s.description}}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"}),onChangeNotificationType:function(i,a){r(e=>{const t=[...e.byId[o].allowType];var n=t.indexOf(i);return a&&-1===n?t.push(i):t.splice(n,1),Object.assign(Object.assign({},e),{byId:Object.assign(Object.assign({},e.byId),{[o]:Object.assign(Object.assign({},e.byId[o]),{allowType:t})})})})},onChangeAllowType:e=>{t(updateAppAllowNotification(o,e))}})}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(NotificationAllowTable,{action:null==(e=null==n?void 0:n.byId[o])?void 0:e.action,appId:o}),jsxRuntime.exports.jsx(Divider,{style:{marginBottom:20,marginTop:15}})]}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}var index_esm=Object.freeze({__proto__:null,NotificationApplication:NotificationApplication,NotificationDetailPanel:NotificationDetailPanel,NotificationPanel:NotificationPanel,NotificationSetting:NotificationSetting,NotificationUtilityPanel:NotificationUtilityPanel,initNotificationAction:initNotificationAction,onNotificationActionClicked:onNotificationActionClicked});export{index_esm as a,getNotificationModule$1 as g,initNotificationAction as i,markAllNotificationsSeenRequest as m,onNotificationActionClicked as o,unseenNotificationSelector as u};
|