aiware-js 1.0.0-master.493 → 1.0.0-master.495
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/js-core.esm.js +1 -1
- package/js-core.esm.js.gz +0 -0
- package/js-core.esm49.js +1 -1
- package/js-core.esm49.js.gz +0 -0
- package/js-core.esm67.js +2 -2
- package/js-core.esm67.js.gz +0 -0
- package/js-core.esm78.js +2 -2
- package/js-core.esm78.js.gz +0 -0
- package/js-core.umd.css +92 -92
- package/js-core.umd.css.gz +0 -0
- package/js-core.umd.js +18 -18
- package/js-core.umd.js.gz +0 -0
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
package/js-core.esm.js
CHANGED
|
@@ -1390,4 +1390,4 @@ createScheduledJob(input:{
|
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
|
-
`,graphEndpoint:e,token:t})}catch(e){return{success:!1}}});function*getCurrentUserSaga(){var e=yield select(graphEndpointSelector),t=yield select(sessionTokenSelector),e=yield call$f(getCurrentUserApi,e,t);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)&&(null==(t=e.errors[0].path)||!t.includes("userSettings"))?console.error("getCurrentUser error"):(t=Object.assign(Object.assign({},null==(t=null==e?void 0:e.data)?void 0:t.me),{organizationRole:{organizationId:get$3(e,"data.me.organization.id","")},organization:Object.assign({},null==(e=null==(t=null==e?void 0:e.data)?void 0:t.me)?void 0:e.organization)}),yield put(getCurrentUserSuccess(t)))}function*getCurrentApplicationInfoSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=e.payload["applicationId"],e=yield call$f(getApplicationInfo,e,t,n);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)?console.error("getCurrentApplicationInfo error"):yield put(getCurrentAppIconSuccess(null==(n=null==(t=null==e?void 0:e.data)?void 0:t.application)?void 0:n.iconUrl))}function*userSaga(){yield all([takeEvery$1(GET_CURRENT_USER,getCurrentUserSaga)]),yield all([takeEvery$1(GET_CURRENT_APP_ICON,getCurrentApplicationInfoSaga)])}function*bootFunction(){yield take(BOOTED)}function*booting(){yield takeEvery$1(BOOTING,bootFunction)}function*logoutListener(e){for(var t=e.payload;;)yield take(logout),t?null!=t&&t():yield put(logoutUser$1())}function*notificationActionClickedSaga(e){const t=e.payload;yield takeEvery$1(onNotificationActionClicked,function*(e){t&&(yield call$f(t,e.payload))})}function*handleAppSwitchListenerSetup(e){const t=e.payload;yield takeEvery$1(appSwitcherHandleClick,function*(e){e=e.payload;t?t(e):yield put(appSwitcherHandleClickAppNatively(e))})}function*rootSaga(){yield all([fork(userSaga),fork(booting),takeLatest$1(listenLogout,logoutListener),takeLatest$1(appSwitcherSetupListener,handleAppSwitchListenerSetup),takeLatest$1(initNotificationAction,notificationActionClickedSaga)])}function getAppbarModule(){return{id:"os-app-bar",reducerMap:{[nameSpace$1]:userReducer},sagas:[rootSaga],initialActions:[]}}function App(e){var{onLogout:t,onClickNotificationAction:n,onAppSwitch:r,onClickOrgIcon:i,showNotifications:o,applicationId:a,searchBarMountId:s}=e,e=__rest(e,["onLogout","onClickNotificationAction","onAppSwitch","onShowSettingPanel","onClickOrgIcon","onClickHelpIcon","showNotifications","applicationId","searchBarMountId"]);const l=useDispatch(),[c,u]=react.exports.useState(!1),[d,p]=react.exports.useState(!1),[f,h]=react.exports.useState(!1),[m,g]=react.exports.useState(!1),[v,y]=react.exports.useState(!1),[x,b]=react.exports.useState(!1);var C=(useSelector(userSelector)||{})["currentUser"];const{panels:$=[]}=useSelector(rootSelector);var S=useSelector(unseenNotificationSelector);const w=useSelector(notificationStatusSelector);var E=useSelector(betaFeaturesSelector),C=(C||{})["organization"];const T=useSelector(authSelector)["user"];var{application:_=[]}=useSelector(applicationSelector)||{};const[j,I]=react.exports.useState(!1);const R=useSelector(appIdSelector),O=useSelector(selectApplicationConfig),[L,M]=react.exports.useState(!1);var N=useSelector(selectHasUserCreateRootFolderPermission);const P=gqlIntrospection.isOperationValid("fileApplication","mutation")&&N;function A(){u(!1),h(!1),g(!1),p(!1),y(!1),b(!1)}function k(){null!==$&&void 0!==$&&$.forEach(e=>{l(hidePanel$1(e.panelId))})}return react.exports.useEffect(()=>{var e,t=window.location["search"];l(actions$2.userApplicationSettings.fetchApplicationConfigStart({appId:R})),"?panel=invite-requests"!==t||j||(I(!0),t={name:"INVITE_REQUESTS_PANEL",config:{name:"Invite Requests"}},e={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"medium",zIndex:1001,parentPanelId:null,dimmed:0,dimmedStatus:"dimParent",header:{title:"INVITE REQUESTS"}},l(mountPanel$1({panelId:"INVITE_REQUESTS_PANEL",microFrontend:t,panelConfig:e})))},[]),react.exports.useEffect(()=>{null!==O&&void 0!==O&&O.length&&M(!0)},[O]),react.exports.useEffect(()=>{"success"===w&&l(markAllNotificationsSeenRequest())},[w,l]),react.exports.useEffect(()=>{l(getCurrentUser()),a&&l(getCurrentAppIcon({applicationId:a}))},[l,a]),react.exports.useEffect(()=>{l({type:listenLogout().type,payload:t})},[l,t]),react.exports.useEffect(()=>{n&&l(initNotificationAction(n))},[l,n]),react.exports.useEffect(()=>{l({type:appSwitcherSetupListener().type,payload:r})},[l,r]),react.exports.useEffect(()=>{l(onBooted())},[l]),react.exports.useEffect(()=>{$&&0!==$.length||A()},[$]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAppbarModule(),getAppbarPanelModule(),getNotificationModule$1(),getEventsModule(),getUserApplicationSettingsModule()]},{children:jsxRuntime.exports.jsx("div",Object.assign({className:"App",id:"aiware-app-bar","data-testid":"aiware-app-bar"},{children:jsxRuntime.exports.jsx(NewAppBar,Object.assign({isEnableOrgPanel:!1,onCloseSetting:function(){k()},onOpenSetting:function(){var e,t;c?(u(!1),k()):(A(),u(!0),k(),e={name:"APP_BAR_PANEL",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:VERITONE_PANEL_ID,type:"TAB_TEMPLATE",marginTop:55,withTab:!0,width:80,zIndex:1004,userRoles:null===T||void 0===T?void 0:T.roles,header:{divider:!0,title:""},footer:{logo:!0},size:"xlarge",fullScreen:!1},l(mountPanel$1({panelId:VERITONE_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenHelpCenter:function(){var e,t;d?(p(!1),k()):(A(),k(),p(!0),e={name:"HELP_PANEL",config:{name:"Help panel",dataId:"helpDataId",type:"SIMPLE_PANEL"}},t={panelId:HELP_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,size:"large",header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.headerTitle.helpCenter",defaultMessage:"Help Center",description:"The header title for the help center."}),actions:[{iconUrl:img$Q,action:{type:"OPEN_HELP_LINK"}}]}},l(mountPanel$1({panelId:HELP_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenNotification:function(){var e,t;null!=o&&o(),v?(y(!1),k()):(A(),k(),y(!0),e={name:"NOTIFICATION_PANEL",config:{name:"Notification Panel",dataId:"notificationDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:413,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.panel.notifications",defaultMessage:"Notifications Center",description:"Title of the notifications center panel"}),actions:[]}},l(mountPanel$1({panelId:NOTIFICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenUserApplicationSettings:function(){var e,t;x?(b(!1),k()):(A(),k(),b(!0),e={name:"USER_APPLICATION_SETTINGS_PANEL",config:{name:"User application settings",dataId:"userApplicationSettingsDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:USER_APPLICATION_SETTINGS_PANEL,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:320,header:{divider:!1,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle.user-application-name-settings",defaultMessage:"Application Settings",description:"Title of user application name settings panel"})}},l(mountPanel$1({panelId:USER_APPLICATION_SETTINGS_PANEL,microFrontend:e,panelConfig:t})))},onDashboardClick:function(){console.log("HANDLE DASHBOARD CLICK!")},organization:C,onClickOrgIcon:function(){var e,t;null!=i&&i(),m?(g(!1),k()):(A(),k(),g(!0),e={name:"ORGANIZATION_PANEL",config:{name:"Veritone",tabId:TabId.ORGANIZATION_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:ORGANIZATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:420,header:{divider:!0,title:"ORGANIZATIONS"}},l(mountPanel$1({panelId:ORGANIZATION_PANEL_ID,microFrontend:e,panelConfig:t})))},panels:$,searchBarMountId:s,openSetting:{openHelpPanel:!1,openNotificationPanel:!1,openAppSwitchPanel:!1,openOrgSwitchPanel:!1,openVeritonePanel:!1,openUserApplicationSettingsPanel:!1},unseenCount:S,onClickAppSwitchIcon:function(){var e,t;f?(h(!1),k()):(A(),k(),h(!0),e={name:"APP_BAR_PANEL",config:{name:"APP_BAR_PANEL",tabId:TabId.APP_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:APPLICATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:720,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle-app-switcher",defaultMessage:"App Switcher",description:"Title of applications panel list"}),actions:P?[{action:{type:"user-app-group/createNewAppGroupPlaceholder"},label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header-action.new-app-group",defaultMessage:"New App Group",description:"New App Group action button"}),variant:"contained",size:"large",color:"primary",submit:!0}]:void 0}},l(mountPanel$1({panelId:APPLICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},applications:_,showDashboardIcon:E,userApplicationSettingsIcon:L},e))}))}))})})}const headerBarSelector=e=>null==e?void 0:e.aiWareHeaderBar,registry={[AvailableWidgets.APP_BAR]:App,[AvailableComponents.APP_BAR_PANEL]:SettingPanelComponent},registryLookup=n=>__awaiter$a(void 0,void 0,void 0,function*(){if(registry[n])return registry[n];let e,t=null;switch(n){case AvailableWidgets.SAMPLE_APP_BAR:e=yield import("./js-core.esm2.js"),t=e.SampleAppBar;break;case AvailableWidgets.RESET_PASSWORD:e=yield import("./js-core.esm4.js"),t=e.ResetPassword;break;case AvailableWidgets.FLOW_CENTER:e=yield import("./js-core.esm5.js"),t=e.App;break;case AvailableWidgets.FLOW_WIDGET:e=yield import("./js-core.esm7.js").then(function(e){return e.i}),t=e.App;break;case AvailableWidgets.ENGINE_CENTER_BROWSE:e=yield import("./js-core.esm19.js"),t=e.EngineCenterBrowse;break;case AvailablePanels.SIMPLE_PANEL:e=yield import("./js-core.esm39.js"),t=e.Panel;break;case AvailablePanels.APP_BAR_PANEL_TEMPLATE:e=yield import("./js-core.esm41.js"),t=e.AppbarPanel;break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=yield import("./js-core.esm41.js"),t=e.AppbarTabPanel;break;case AvailablePanels.TAB_TEMPLATE:e=yield import("./js-core.esm41.js"),t=e.TabPanel;break;case AvailableComponents.NOTIFICATION_PANEL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationPanel;break;case AvailableComponents.NOTIFICATION_DETAIL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationDetailPanel;break;case AvailableComponents.NOTIFICATION_SETTING:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationSetting;break;case AvailableComponents.NOTIFICATION_UTILITY:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationUtilityPanel;break;case AvailableComponents.NOTIFICATION_APPLICATION:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationApplication;break;case AvailableComponents.HELP_PANEL:e=yield Promise.resolve().then(function(){return index_esm}),t=e.HelpCenterPanel;break;case AvailableComponents.EDIT_PROFILE_PICTURE:e=yield Promise.resolve().then(function(){return index_esm$1}),t=e.EditProFilePicture;break;case AvailableComponents.TEST_COMPONENT:e=yield import("./js-core.esm39.js"),t=e.SamplePanel1;break;case AvailableComponents.TEST_COMPONENT2:e=yield import("./js-core.esm39.js"),t=e.SamplePanel2;break;case AvailableComponents.TEST_COMPONENT3:e=yield import("./js-core.esm39.js"),t=e.SamplePanel3;break;case AvailableComponents.SETTING_PREFERENCE:e=yield import("./js-core.esm45.js"),t=e.SettingsPreferencesPanel;break;case AvailableComponents.ORGANIZATION_PANEL:e=yield import("./js-core.esm42.js"),t=e.OrganizationPanel;break;case AvailableComponents.INVITE_USERS_PANEL:e=yield import("./js-core.esm42.js"),t=e.InviteUsersPanel;break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=yield import("./js-core.esm42.js"),t=e.InviteRequestsPanel;break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=yield import("./js-core.esm42.js"),t=e.ReviewRequestPanel;break;case AvailableComponents.ADD_APPLICATIONS:e=yield import("./js-core.esm42.js"),t=e.AddApplicationsPanel;break;case AvailableComponents.DATA_CENTER_BROWSE:e=yield import("./js-core.esm46.js"),t=e.DataCenterBrowse;break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=yield import("./js-core.esm46.js"),t=e.FoldersAndFilesPanel;break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=yield import("./js-core.esm46.js"),t=e.FileInfoPanel;break;case AvailableComponents.DATA_CENTER_IMPORTER:e=yield import("./js-core.esm57.js"),t=e.DataCenterImporter;break;case AvailableComponents.DATA_LABELER:e=yield import("./js-core.esm59.js"),t=e.DataLabelerPanel;break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=yield import("./js-core.esm60.js"),t=e.AdminCenterOpenId;break;case AvailableComponents.ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm61.js"),t=e.AdminCenterBrowse;break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=yield import("./js-core.esm65.js"),t=e.DataCenterProcessAI;break;case AvailableComponents.ENGINE_CENTER_NEW:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.EngineCenterNew;break;case AvailableComponents.ENGINE_CENTER_FILTER:e=yield import("./js-core.esm19.js"),t=e.EngineCenterFilter;break;case AvailableComponents.APP_CENTER_FILTER:e=yield import("./js-core.esm66.js"),t=e.AppCenterFilter;break;case AvailableComponents.ENGINE_CENTER_DETAILS:e=yield import("./js-core.esm19.js"),t=e.EngineDetails;break;case AvailableComponents.ENGINE_CENTER_NEW_BUILD:e=yield import("./js-core.esm19.js"),t=e.CreateNewBuildPanel;break;case AvailableComponents.ENGINE_CENTER_CUSTOM_FIELDS_FORM:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.EngineCenterCustomFieldsForm;break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.SchemasFormPanel;break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.InputTypeFlyout;break;case AvailableComponents.ENGINE_CENTER_EDIT_RELEASE_NOTES:e=yield import("./js-core.esm19.js"),t=e.EditReleaseNotes;break;case AvailableComponents.ENGINE_CENTER_VERSION_HISTORY_PANEL:e=yield import("./js-core.esm19.js"),t=e.VersionHistoryPanel;break;case AvailableComponents.SUPPORTED_FILE_TYPES:e=yield import("./js-core.esm57.js"),t=e.SupportedFileTypes;break;case AvailableComponents.EDIT_FILE_METADATA:e=yield import("./js-core.esm57.js"),t=e.EditFileMetadata;break;case AvailableWidgets.APP_CENTER_BROWSE:e=yield import("./js-core.esm66.js"),t=e.AppCenterBrowse;break;case AvailableComponents.APP_CENTER_NEW:e=yield import("./js-core.esm67.js"),t=e.AppCenterNew;break;case AvailableComponents.APP_CENTER_ADD_FLOW_PANEL:e=yield import("./js-core.esm67.js"),t=e.AppCenterAddFlowPanel;break;case AvailableComponents.APP_CENTER_ADD_SCHEMA_PANEL:e=yield import("./js-core.esm67.js"),t=e.AppCenterAddSchemaPanel;break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=yield import("./js-core.esm67.js"),t=e.AppCenterConfigFieldsForm;break;case AvailableComponents.APP_CENTER_CONTEXT_MENU_EXTENSIONS:e=yield import("./js-core.esm67.js"),t=e.AppCenterContextMenuExtensionPanel;break;case AvailableComponents.APP_CENTER_EVENT_PANEL:e=yield import("./js-core.esm67.js"),t=e.AppCenterEventPanel;break;case AvailableComponents.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL:e=yield import("./js-core.esm67.js"),t=e.AppCenterPaletteIntegrationPanel;break;case AvailableComponents.APP_CENTER_BROWSE:e=yield import("./js-core.esm66.js"),t=e.AppCenterBrowse;break;case AvailableComponents.APP_CENTER_DETAILS:e=yield import("./js-core.esm66.js"),t=e.AppCenterDetails;break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=yield import("./js-core.esm65.js"),t=e.DataCenterEngineSelection;break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=yield import("./js-core.esm54.js"),t=e.NewGroupPanel;break;case AvailableComponents.PERMISSIONS_PANEL:e=yield import("./js-core.esm48.js"),t=e.PermissionsPanel;break;case AvailableComponents.GROUP_INFO_PANEL:e=yield import("./js-core.esm48.js"),t=e.GroupInfoPanel;break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=yield import("./js-core.esm48.js"),t=e.NewPermissionSetPanel;break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=yield import("./js-core.esm48.js"),t=e.PermissionSetDetailsPanel;break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=yield import("./js-core.esm46.js"),t=e.MediaDetailsPanelIframe;break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=yield import("./js-core.esm46.js"),t=e.IngestionCreationPanel;break;case AvailableComponents.DATA_CENTER_SELECT_IMPORT_SOURCE:e=yield import("./js-core.esm46.js"),t=e.SelectImportSource;break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=yield import("./js-core.esm46.js"),t=e.SourceCreationPanel;break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=yield import("./js-core.esm54.js"),t=e.GroupDetailsPanel;break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=yield import("./js-core.esm54.js"),t=e.AddMemberPanel;break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=yield import("./js-core.esm62.js"),t=e.ApplicationDetailsPanel;break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=yield import("./js-core.esm68.js"),t=e.ProcessingCenterSources;break;case AvailableComponents.PROCESSING_CENTER_ERROR_DETAIL:e=yield import("./js-core.esm68.js"),t=e.ErrorDetailPanel;break;case AvailableComponents.USER_APPLICATION_SETTINGS_PANEL:e=yield Promise.resolve().then(function(){return index_esm$3}),t=e.UserApplicationSettingsPanel;break;case AvailableComponents.ADD_APPLICATION_USERS_PANEL:e=yield import("./js-core.esm62.js"),t=e.AddUsersPanel;break;case AvailableComponents.PROCESSING_CENTER_BROWSE:e=yield import("./js-core.esm71.js"),t=e.ProcessingCenterBrowse;break;case AvailableComponents.JOBS_TABLE_SETTINGS_PANEL:e=yield import("./js-core.esm72.js"),t=e.JobsTableSettingsPanel;break;case AvailableComponents.VERSION_PANEL:e=yield import("./js-core.esm41.js"),t=e.VersionPanel;break;case AvailableComponents.PROCESSING_CENTER_DAG_BUILDER:e=yield import("./js-core.esm74.js"),t=e.DagBuilder;break;case AvailableComponents.PROCESSING_CENTER_INGESTION:e=yield import("./js-core.esm75.js").then(function(e){return e.an}),t=e.ProcessingCenterIngestion;break;case AvailableComponents.PROCESSING_CENTER_ADVANCED_SETTINGS:e=yield import("./js-core.esm75.js").then(function(e){return e.an}),t=e.ProcessingCenterAdvancedSettings;break;case AvailableComponents.PROCESSING_CENTER_AFFILIATE_PANEL:e=yield import("./js-core.esm75.js").then(function(e){return e.an}),t=e.ProcessingCenterAffiliatePanel;break;case AvailableComponents.JOBS_DETAILS_PANEL:e=yield import("./js-core.esm72.js"),t=e.JobsDetailsPanel;break;case AvailableComponents.TASKS_TABLE_SETTINGS_PANEL:e=yield import("./js-core.esm73.js"),t=e.TasksTableSettingsPanel;break;case AvailableComponents.RESOURCE_CENTER_BROWSE:e=yield import("./js-core.esm76.js"),t=e.ResourceCenterBrowse;break;case AvailableComponents.PACKAGE_DETAILS_PANEL:e=yield import("./js-core.esm79.js"),t=e.PackageDetails;break;case AvailableComponents.INSTANCE_ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm80.js"),t=e.InstanceAdminCenterBrowse;break;case AvailableComponents.SCHEMA_DETAILS_PANEL:e=yield import("./js-core.esm78.js"),t=e.SchemaDetailsPanel}return registry[n]=t}),registerComponent=(e,t)=>{registry[e]=t},WIDGETS_FEATURE_KEY="widgets",initialState$1=(!function(e){e.idle="idle",e.mounting="mounting",e.unmounting="unmounting",e.error="error",e.eventing="eventing"}(WidgetsStatus=WidgetsStatus||{}),{value:[],status:WidgetsStatus.idle}),widgetsSelector=e=>e[name].value,callWidgetOnComplete=(e,t)=>{e=e.find(e=>e.widgetName===t);null!=e&&e.onComplete&&e.onComplete()},{name,reducer,actions:{mountWidget:mountWidget$1,mountWidgetSuccess,mountWidgetError,unmountWidget:unmountWidget$1,unmountWidgetSuccess,unmountWidgetFailure,triggerWidgetCallback,triggerWidgetCallbackSuccess}}=createSlice({name:WIDGETS_FEATURE_KEY,initialState:initialState$1,reducers:{mountWidget:(e,t)=>{e.value.push(t.payload),e.status=WidgetsStatus.mounting},mountWidgetSuccess:e=>{e.status=WidgetsStatus.idle},mountWidgetError:e=>{e.status=WidgetsStatus.error},triggerWidgetCallback:(e,t)=>{e.status=WidgetsStatus.eventing},triggerWidgetCallbackSuccess:e=>{e.status=WidgetsStatus.idle},unmountWidget:(e,t)=>{e.status=WidgetsStatus.unmounting},unmountWidgetSuccess:(e,t)=>{e.value=e.value.filter(e=>e.widgetId!==t.payload),e.status=WidgetsStatus.idle},unmountWidgetFailure:e=>{e.status=WidgetsStatus.error}}});function*mountWidgetListenerSaga(){let a;const s={};yield takeEvery$1(mountWidget$1({}).type,function*(e){try{var{widgetConfig:t={},widgetName:n,elementId:r}=null==e?void 0:e.payload,i=(yield call$f(registryLookup,n))||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),o=getElement(r,n);o.classList.add("aiware-el"),s[r]?a=s[r]:(a=client$1.createRoot(o),s[r]=a),a.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(i,Object.assign({},t))}))})}))),yield put(mountWidgetSuccess())}catch(e){yield put(mountWidgetError())}}),yield takeEvery$1(e=>/\/booted$/.test(e.type),function*(e){var[e]=e.type.split("/");yield put(triggerWidgetCallback(e))}),yield takeEvery$1(unmountWidget$1("").type,function*(t){try{const e=yield select(e=>{return(null==(e=widgetsSelector(e).find(e=>e.widgetId===t.payload))?void 0:e.elementId)||""});setTimeout(()=>{s[e]&&s[e].unmount(),delete s[e]}),yield put(unmountWidgetSuccess(t.payload))}catch(e){yield put(unmountWidgetFailure())}}),yield takeEvery$1(triggerWidgetCallback("").type,function*(e){var t=yield select(widgetsSelector);callWidgetOnComplete(t,e.payload),yield put(triggerWidgetCallbackSuccess())})}function getWidgetsModule(){return{id:name,reducerMap:{[name]:reducer},sagas:[mountWidgetListenerSaga],initialActions:[]}}function getDataModule(){return{id:"data",reducerMap:{data:(e,{type:t,payload:n})=>{return t===setData({}).type?[...e.filter(e=>e.id!==n.id),n]:e||[]}},sagas:[],initialActions:[]}}const useStyles$2=makeStyles()(e=>({sdkSnackbarContainer:{"& svg":{fill:"white"}}}));function CustomSnackbar(){const n=useDispatch(),[e,t]=react.exports.useState([]),[r,i]=react.exports.useState(!1),[o,a]=react.exports.useState(void 0),{message:s,duration:l}=useSelector(snackbarSelector);var c=useStyles$2()["classes"],u=(react.exports.useEffect(()=>{null!==s&&void 0!==s&&s.content&&t(e=>[...e,s])},[s]),react.exports.useEffect(()=>{e.length&&!o?(a(Object.assign({},e[0])),t(e=>e.slice(1)),i(!0)):e.length&&o&&r&&(n(clearMessage()),i(!1))},[e,o,r,n]),(e,t)=>{"clickaway"!==t&&(i(!1),n(clearMessage()))});return jsxRuntime.exports.jsx(Snackbar$1,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:r,autoHideDuration:l||3e3,onClose:u,TransitionProps:{onExited:()=>{a(void 0),n(clearMessage())}},className:c.sdkSnackbarContainer,"data-snackbarid":(null===o||void 0===o?void 0:o.key)||"na","data-testid":"snackbar.message."+((null===o||void 0===o?void 0:o.severity)||"na")},{children:jsxRuntime.exports.jsx(Alert$1,Object.assign({onClose:u,severity:null===o||void 0===o?void 0:o.severity,elevation:6,variant:"filled"},{children:null===o||void 0===o?void 0:o.content}))}),o?o.key:void 0)}function validateConfig(e){return e.applicationId||console.info("@aiware/js: applicationId is required. Go to developer app to find your application id."),e.baseUrl||console.info("@aiware/js: baseUrl is required. It defaults to the US Commercial environment which is https://api.us-1.veritone.com/v3/graphql"),!0}const ID="openSupportChatButton",DATA_ATTR="open-support-chat-button";var SupportCenterPixel=()=>jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsx("div",{id:ID,"data-veritone-element":DATA_ATTR,style:{width:1,height:1,position:"fixed",right:55,bottom:20}})});const nameSpace="@helpPanel",updateSelectedTab=createAction(nameSpace+"/UPDATE_SELECTED_TAB",function(e,t){return{payload:{selectedTabId:e,tabLink:t}}}),setCustomKnowledgeBaseUrl=createAction(nameSpace+"/SET_CUSTOM_KNOWLEDGE_BASE_URL",function(e){return{payload:{url:e}}}),setCustomDocsUrl=createAction(nameSpace+"/SET_CUSTOM_DOCS_URL",function(e){return{payload:{url:e}}}),initialState={selectedTabId:0,tabLink:"https://support.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState,e=>{e.addCase(updateSelectedTab,(e,t)=>Object.assign(Object.assign({},e),{tabLink:t.payload.tabLink,selectedTabId:t.payload.selectedTabId})),e.addCase(setCustomKnowledgeBaseUrl,(e,t)=>Object.assign(Object.assign({},e),{customKnowledgeBaseUrl:t.payload.url})),e.addCase(setCustomDocsUrl,(e,t)=>Object.assign(Object.assign({},e),{customDocsUrl:t.payload.url}))});function*helpSaga(){yield takeEvery$1("OPEN_HELP_LINK",function*(){var e=yield select(e=>e.helpPanel.tabLink);yield put(openLinkOnNewTab({url:e}))})}const namespace="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace]?e[namespace].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace]:getTabLinkReducer},sagas:[helpSaga],initialActions:[]}}var knowledgeBaseUrl$1="https://docs.veritone.com/help/index.html",documentUrl$1="https://docs.veritone.com",config={knowledgeBaseUrl:knowledgeBaseUrl$1,documentUrl:documentUrl$1};const useStyles$1=makeStyles()(e=>({root:{height:"calc(100% - 110px)",textAlign:"left","& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},tabs:{padding:e.spacing(2.4,6,0,6)},tabPanels:{width:"100%",height:"100%"},aiWareIcon:{position:"relative",maxHeight:50,opacity:"inherit",padding:e.spacing(4,3.2,0,3.2),display:"flex",justifyContent:"flex-end"},customTabs:{margin:e.spacing(0,4)},kbRoot:{height:"100%",textAlign:"left"},loadingContainer:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white"},kbToolBarBox:{padding:e.spacing(6,6,1.6,6)},kbTabContent:{height:"calc(100% - 92px)"},kbTabPanel:{padding:e.spacing(6)},dRoot:{height:"100%",width:"100%"},dNavBar:{height:"100%",overflow:"hidden",background:"#F4F4F4"},dTitle:{color:"#2A323C",fontWeight:600,fontSize:"18px",lineHeight:"24px",padding:e.spacing(3.2)},dContent:{height:"100%",width:"100%",position:"relative"},dMenu:{overflowY:"auto",height:"calc(100% - 52px)"},drawerContainer:{display:"flex",height:"100%",background:e.palette.background.default},tabContainer:{borderRight:"0.5px solid #D5DFE9",overflow:"hidden",height:"100%",width:"100%"},tabName:{borderBottom:"0.5px solid #D5DFE9",display:"flex",justifyContent:"space-between",alignItems:"center",height:"64px",padding:e.spacing(0,6)},actionIcons:{margin:e.spacing(-2.4)},tabContent:{height:"calc(100vh - 57px - 60px)",overflowY:"auto",overflowX:"hidden"}})),documentUrl=config.documentUrl,Documentation=({path:e=documentUrl})=>{var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(t.dRoot,"hide-in-percy")},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"docs-iframe",title:"Document Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){setTimeout(()=>{r(!1)},1e3)}})]}))},knowledgeBaseUrl=config["knowledgeBaseUrl"];function Knowledgebase({path:e=knowledgeBaseUrl}){var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.kbRoot},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"knowledgebase-iframe",title:"Knowledgebase Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){r(!1)}})]}))}const defaultLocale="en-us",tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.au1+VZ",defaultMessage:"Knowledgebase",description:"Help Panel: Knowledgebase tab label"}),disabled:!1,url:"https://support.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(){var e=useSelector(initialConfigSelector),t=useSelector(customKnowledgeBaseUrlSelector),n=useSelector(customDocsUrlSelector),r=useSelector(helpCenterSelectedTabIdSelector),i=useSelector(e=>null==e?void 0:e.panels),o=useStyles$1()["classes"],[a]=react.exports.useState(defaultLocale);const s=useDispatch();i=null==i?void 0:i.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),t=i&&t?t:e.knowledgeBaseURL,i=i&&n?n:e.docsURL;return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:a},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:o.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:r,onChangeTab:e=>{s(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:t})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:i})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$y,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var index_esm=Object.freeze({__proto__:null,HelpCenterPanel:HelpCenter,customDocsUrlSelector:customDocsUrlSelector,customKnowledgeBaseUrlSelector:customKnowledgeBaseUrlSelector,helpCenterSelectedTabIdSelector:helpCenterSelectedTabIdSelector,setCustomDocsUrl:setCustomDocsUrl,setCustomKnowledgeBaseUrl:setCustomKnowledgeBaseUrl,updateSelectedTab:updateSelectedTab});const useStyles=makeStyles()(()=>({dialog:{top:"125px",overflowX:"hidden",overflowY:"hidden",display:"flex",alignItems:"center",flexDirection:"column"},container:{borderRadius:"4px",backgroundColor:"#fff",width:"430px",overflow:"hidden",outline:0,boxShadow:"0px 0px 7px rgba(0, 0, 0, .25)"},header:{textTransform:"capitalize"},appListContainer:{width:"100%"},orgName:{fontWeight:"bold"}})),ApplicationDialog=()=>{const[e,t]=react.exports.useState(null),[n,r]=react.exports.useState(0);var i=useSelector(userSelector$2),o=useStyles()["classes"];const a=useSelector(initialConfigSelector),s=a.applicationId,l=useSelector(applicationSelector),c=useSelector(switchApiSelector);var u=(null===l||void 0===l?void 0:l.application)||[],d=null===l||void 0===l?void 0:l.status;var p=[...u].sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),f=u.findIndex(e=>e.id===s);useInterval(()=>{t(e=>e&&e-1)},e&&n<3?1e3:null),react.exports.useEffect(()=>{"success"!==(null===l||void 0===l?void 0:l.status)||1!==(null===l||void 0===l?void 0:l.application.length)||(null===l||void 0===l?void 0:l.application[0].id)===a.applicationId||e||(0===e?window.open(c+"/"+(null===l||void 0===l?void 0:l.application[0].id),"_self"):t(10))},[a,l,c,e]);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s)&&f<0&&"success"===d?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:o.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:o.header,variant:"h1",sx:{px:"30px",pt:"30px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-title",defaultMessage:"Application Not Available",description:"Title for modal"})})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"10px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message1",defaultMessage:"Looks like you switched organizations, your current application is not available in the current",description:"Description current application not available"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:o.orgName},{children:null!=(f=null==i?void 0:i.organization)&&f.organizationName?i.organization.organizationName:""}))," ",jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message2",defaultMessage:"organization you are viewing.",description:"Description current application not available"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message3",defaultMessage:"Please select from the available applications below to be redirected.",description:"Instructions for current application not available"})})),e&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"},onClick:()=>{r(e=>e+1)}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-countdown-message",defaultMessage:"You will be automatically forwarded to {appName} in {timeRemaining} seconds.",description:"Instructions for current application not available",values:{timeRemaining:e,appName:u[0].name}})})),jsxRuntime.exports.jsx("div",Object.assign({className:o.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(c+"/"+e,"_self")},applications:p,useGrid:!1,row:3})}))]}))})):null};class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}const rateLimiter=new RateLimiter;function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$4.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$4.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$4.dispatch(logout())},1e3)):store$4.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$4.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsxs(AIWareThemeProvider,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})}))),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$4.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$4.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$4.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$4.addModule(r),n},unmountPanel=e=>(store$4.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$4.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$4.dispatch(unmountAllPanel$1(""))};function init(e,t){validateConfig(e)&&store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{onComplete:t})))}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$4),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$4,window.aiWare_theme={darkTheme:darkTheme,lightTheme:lightTheme}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$4,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,version:"sdk_release_version",commit:"188a405b0",releaseDate:"sdk_release_date"});export{ListItem$1 as $,AIWareIntlProvider as A,Box$1 as B,interopRequireDefault as C,createAction as D,createReducer as E,FormattedMessage$1 as F,Grid$1 as G,createSlice as H,ENGINE_OWNER_TYPES as I,ENGINE_FILTER_TYPES as J,DynamicModuleLoader as K,LoadingButton$1 as L,preferredLanguageSelector as M,baseUrlSelector as N,rootApiSelector as O,Provider$2 as P,sessionTokenSelector as Q,graphEndpointSelector as R,Switch$1 as S,Typography$1 as T,controllerNodeRedImageSelector as U,controllerUrlSelector as V,automateControllerUrlSelector as W,automateUrlSelector as X,Portal$1 as Y,List$2 as Z,_extends as _,generateUtilityClasses as a,deleteEngine as a$,ListItemIcon$1 as a0,ListItemText$1 as a1,all as a2,img$m as a3,img$n as a4,img$p as a5,img$q as a6,Divider$1 as a7,Tooltip$1 as a8,IconButton$1 as a9,DialogTitle$1 as aA,DialogContent$1 as aB,DialogActions$1 as aC,TableContainer$1 as aD,Table$1 as aE,TableHead$1 as aF,TableRow$1 as aG,TableCell$1 as aH,TableSortLabel$1 as aI,TableBody$1 as aJ,img$f as aK,Popper$1 as aL,ClickAwayListener as aM,Fade$1 as aN,img$r as aO,img$o as aP,img$O as aQ,img$A as aR,Select$1 as aS,MenuItem$1 as aT,Snackbar$1 as aU,default_1 as aV,img$h as aW,img$j as aX,img$S as aY,Tabs$1 as aZ,Tab$1 as a_,img$g as aa,img$E as ab,Skeleton$1 as ac,takeLatest$1 as ad,fetchAllTags as ae,put as af,select as ag,fetchFlows as ah,call$f as ai,fetchTemplateGallery as aj,isRevisionsExistOnServerRequest as ak,FormLabel$1 as al,default_1$5 as am,FormGroup$1 as an,FormControlLabel$1 as ao,Checkbox$1 as ap,fetchTemplateGalleryFallback as aq,Button$1 as ar,Card$1 as as,img$k as at,flowStyles as au,NoResults as av,CircularProgress$1 as aw,img$a as ax,setApiEndpoint as ay,Dialog$1 as az,styled$1 as b,_createCompounder as b$,img$i as b0,AIWareFormatMessage as b1,FormattedDate as b2,fetchVeritoneGraphQLApi as b3,useTheme as b4,KeyboardArrowRight as b5,KeyboardArrowLeft as b6,useId as b7,InputUnstyled as b8,isHostComponent as b9,img$b as bA,isEmpty_1 as bB,Backdrop$1 as bC,getDefaultMiddleware as bD,isNil_1 as bE,UpDown as bF,Icon$1 as bG,get_1 as bH,map_1 as bI,keys_1 as bJ,RadioGroup$1 as bK,Avatar$1 as bL,img$u as bM,baseGraphQLApi as bN,FormHelperText$2 as bO,img$e as bP,StyledEngineProvider as bQ,ThemeProvider as bR,lightTheme as bS,CssBaseline as bT,Hide as bU,showMessage as bV,MessageSeverity as bW,Radio$2 as bX,fetchEngine as bY,createSvgIcon$2 as bZ,_hasPath as b_,getDefaultExportFromNamespaceIfNotNamed as ba,commonjsRequire as bb,_typeof$4 as bc,_inheritsLoose$2 as bd,_assertThisInitialized$1 as be,React as bf,hoistNonReactStatics_cjs as bg,_defineProperty$1 as bh,reactDom as bi,Transition$1 as bj,__awaiter$a as bk,__generator$2 as bl,__spread as bm,TransitionGroup$1 as bn,connect$1 as bo,Bookmark as bp,EngineFlagIcons as bq,createAsyncThunk as br,withStyles as bs,getConfigModule as bt,getAuthModule as bu,getSnackbarModule as bv,CacheProvider as bw,muiCache as bx,img$P as by,img$c as bz,Paper$1 as c,useIntl as c$,_baseIteratee as c0,isArrayLike_1 as c1,toInteger_1 as c2,_toPropertyKey as c3,_setPrototypeOf$3 as c4,commonjsGlobal$1 as c5,combineReducers as c6,createSelector$1 as c7,fork as c8,AIWareThemeProvider as c9,Add as cA,ExpandLess as cB,ExpandMore as cC,Collapse$1 as cD,img$14 as cE,Filter$1 as cF,DynamicTable as cG,useTheme$2 as cH,getThemeProps as cI,useEnhancedEffect$1 as cJ,React$1 as cK,_arrayPush as cL,isArray_1 as cM,_baseToString as cN,_baseTrim as cO,_castSlice as cP,_stringToArray as cQ,toString_1 as cR,ReactIs as cS,upperFirst_1 as cT,isString_1 as cU,_baseGet as cV,_baseSlice as cW,_castPath as cX,_toKey as cY,_isIndex as cZ,channel$1 as c_,Stack$4 as ca,Close$1 as cb,FullscreenExit as cc,Fullscreen as cd,TabPanel as ce,default_1$2 as cf,InputAdornment$1 as cg,unmountPanel$1 as ch,AvailableComponents as ci,delay$1 as cj,hidePanel$1 as ck,mountPanel$1 as cl,DialogContentText$1 as cm,userSelector$2 as cn,MoreVert as co,Menu$1 as cp,Edit as cq,Upload as cr,Delete as cs,CustomTabs as ct,useBackupImg as cu,img$1x as cv,validate as cw,configSelector as cx,baseGraphQLApiWithError as cy,VerifiedFilled as cz,capitalize$2 as d,_setToArray as d$,VideoCamera as d0,Image$1 as d1,Sound as d2,Description as d3,toNumber_1 as d4,ProgressStepper as d5,size_1 as d6,take as d7,CurlyBraces as d8,UnknownDocument as d9,_baseEach as dA,_arrayFilter as dB,_getNative as dC,eq_1 as dD,_root as dE,_Uint8Array as dF,_overArg as dG,_isPrototype as dH,isObjectLike_1 as dI,_baseGetTag as dJ,_arrayLikeKeys as dK,isArguments_1 as dL,isBuffer$3 as dM,isFunction_1 as dN,isTypedArray_1 as dO,_Stack as dP,_baseFor as dQ,identity_1 as dR,_isIterateeCall as dS,isSymbol_1 as dT,_baseMap as dU,_baseUnary as dV,memoizeOne as dW,isPlainObject$1 as dX,styled$2 as dY,_Symbol as dZ,_Set as d_,sdkEventManager as da,SdkEvents as db,SdkError as dc,EngineClassIcons as dd,Mode2 as de,EngineModeIcons as df,DeploymentModelIcons as dg,guid as dh,EditList as di,forceReflow as dj,getDefaultExportFromCjs as dk,alpha as dl,useControlled as dm,useEventCallback as dn,ButtonBase$1 as dp,useForkRef as dq,setRef as dr,inputClasses$1 as ds,inputBaseClasses$1 as dt,outlinedInputClasses$1 as du,filledInputClasses$1 as dv,ClearIcon as dw,ArrowDropDownIcon as dx,isObject_1 as dy,_arrayMap as dz,_objectWithoutPropertiesLoose$2 as e,img$1r as e$,_SetCache as e0,_cacheHas as e1,deepmerge as e2,useTheme$3 as e3,Slide$1 as e4,updatePanelMicroFrontendProps as e5,setData as e6,useIsFocusVisible as e7,ownerDocument as e8,appendOwnerState as e9,enableBetaFeatures as eA,Badge$1 as eB,openLinkOnNewTab as eC,orange$1 as eD,deepOrange$1 as eE,authSelector as eF,headerBarSelector as eG,getSortName as eH,img$7 as eI,InputLabel$1 as eJ,ListItemAvatar$1 as eK,OrganizationTabIcon as eL,ScopedCssBaseline$1 as eM,AlarmTwo as eN,getApplicationsApi as eO,ListItemSecondaryAction$1 as eP,updateTokenSuccess as eQ,postNotificationCommand as eR,aiwareEvent as eS,notificationCommands as eT,panelsSelector as eU,css as eV,avatarClasses as eW,img$L as eX,img$K as eY,img$1t as eZ,img$1s as e_,lighten as ea,darken as eb,slotShouldForwardProp as ec,shouldSpreadAdditionalProps$1 as ed,keyframes as ee,img$1u as ef,createTheme$1 as eg,injectIntl as eh,TabId as ei,PersonalProfile$1 as ej,Organizations as ek,DataCenter as el,Process as em,FlowCenter2 as en,DeveloperCenter as eo,Marketplace$1 as ep,LibraryCenter as eq,AdminCenter as er,AdminTabIcon as es,Resources$1 as et,DagBuilder as eu,img$R as ev,selectIsSuperAdmin as ew,img$3 as ex,img$y as ey,takeEvery$1 as ez,clsx as f,ConfirmationModal as f$,img$I as f0,img$1v as f1,img$H as f2,emphasize as f3,_arraySome as f4,ErrorBoundary$1 as f5,Information as f6,NewFolder as f7,SpecialFolder as f8,User as f9,FilterRemove as fA,CheckCircle as fB,FolderOpen as fC,Voice as fD,useDoubleClick as fE,FolderFilled as fF,Time as fG,img$w as fH,Undefined as fI,YoutubeSource as fJ,PodcastSource as fK,TVSource as fL,RadioSource as fM,selectOrgId as fN,selectIsUserAdmin as fO,ErrorState$1 as fP,StepConnector$1 as fQ,NullState$2 as fR,Group as fS,gqlIntrospection as fT,PermissionChangedAction as fU,Lock as fV,AddGroup as fW,StepperContext$1 as fX,StepContext$1 as fY,SvgIcon$1 as fZ,initialConfigSelector as f_,Source as fa,Search$1 as fb,selectIsOLPEnabled as fc,getLibraryModule as fd,selectApiConfigs$1 as fe,FullScreenContainer as ff,betaFeaturesSelector as fg,cmsUrlSelector as fh,UserAddFilled as fi,Popover$1 as fj,MenuList$1 as fk,MoveFolder as fl,Download as fm,img$8 as fn,selectPanelByPanelName as fo,EngineCategoryIcons as fp,Settings$2 as fq,Hamburger as fr,List as fs,EditAttributes as ft,MoreHor as fu,img$t as fv,img$v as fw,img$2 as fx,selectUserOrgEdgeVersion as fy,ProcessingDetail as fz,generateUtilityClass as g,EnumHelpers as g0,formatBytes as g1,NotInterested as g2,mountPanelForResponse$1 as g3,md5 as g4,AddUser as g5,Users as g6,ApplicationTabIcon as g7,SecurityGroup as g8,NoApps as g9,FormattedRelativeTime$1 as gA,Folder as gB,Hidden as gC,ArrowUp as gD,ArrowDown as gE,toFinite_1 as gF,_baseForOwn as gG,_arrayReduce as gH,hasIn_1 as gI,useSyncExternalStoreExports as gJ,Packages as gK,Engines as gL,actionChannel as gM,tabsClasses$1 as gN,PackagesAvatar as gO,registry as gP,registerComponent as gQ,AvailableWidgets as gR,root as gS,mountWidget as gT,unmountWidget as gU,mountPanel as gV,unmountPanel as gW,hidePanel as gX,unmountAllPanel as gY,init as gZ,green$1 as ga,selectors as gb,LibraryDropdown as gc,Remove as gd,Save as ge,Input$3 as gf,Copy as gg,ArrowForward as gh,Modal$1 as gi,_baseIsEqual as gj,Input$1 as gk,_getSymbols as gl,stubArray_1 as gm,_baseGetAllKeys as gn,_getTag as go,_nodeUtil as gp,_getAllKeys as gq,_castFunction as gr,Article as gs,Task as gt,View as gu,_objectSpread2 as gv,serialize$1 as gw,stringify$4 as gx,compile$1 as gy,Check as gz,composeClasses as h,useDispatch as i,jsxRuntime as j,useSelector as k,authStatusSelector as l,makeStyles as m,authContextSelector as n,AuthContext as o,lodash as p,Alert$1 as q,react as r,store$4 as s,authErrorMessage as t,useThemeProps as u,FormControl$1 as v,TextField$1 as w,classNames as x,resetPasswordRequest as y,createSvgIcon as z};
|
|
1393
|
+
`,graphEndpoint:e,token:t})}catch(e){return{success:!1}}});function*getCurrentUserSaga(){var e=yield select(graphEndpointSelector),t=yield select(sessionTokenSelector),e=yield call$f(getCurrentUserApi,e,t);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)&&(null==(t=e.errors[0].path)||!t.includes("userSettings"))?console.error("getCurrentUser error"):(t=Object.assign(Object.assign({},null==(t=null==e?void 0:e.data)?void 0:t.me),{organizationRole:{organizationId:get$3(e,"data.me.organization.id","")},organization:Object.assign({},null==(e=null==(t=null==e?void 0:e.data)?void 0:t.me)?void 0:e.organization)}),yield put(getCurrentUserSuccess(t)))}function*getCurrentApplicationInfoSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=e.payload["applicationId"],e=yield call$f(getApplicationInfo,e,t,n);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)?console.error("getCurrentApplicationInfo error"):yield put(getCurrentAppIconSuccess(null==(n=null==(t=null==e?void 0:e.data)?void 0:t.application)?void 0:n.iconUrl))}function*userSaga(){yield all([takeEvery$1(GET_CURRENT_USER,getCurrentUserSaga)]),yield all([takeEvery$1(GET_CURRENT_APP_ICON,getCurrentApplicationInfoSaga)])}function*bootFunction(){yield take(BOOTED)}function*booting(){yield takeEvery$1(BOOTING,bootFunction)}function*logoutListener(e){for(var t=e.payload;;)yield take(logout),t?null!=t&&t():yield put(logoutUser$1())}function*notificationActionClickedSaga(e){const t=e.payload;yield takeEvery$1(onNotificationActionClicked,function*(e){t&&(yield call$f(t,e.payload))})}function*handleAppSwitchListenerSetup(e){const t=e.payload;yield takeEvery$1(appSwitcherHandleClick,function*(e){e=e.payload;t?t(e):yield put(appSwitcherHandleClickAppNatively(e))})}function*rootSaga(){yield all([fork(userSaga),fork(booting),takeLatest$1(listenLogout,logoutListener),takeLatest$1(appSwitcherSetupListener,handleAppSwitchListenerSetup),takeLatest$1(initNotificationAction,notificationActionClickedSaga)])}function getAppbarModule(){return{id:"os-app-bar",reducerMap:{[nameSpace$1]:userReducer},sagas:[rootSaga],initialActions:[]}}function App(e){var{onLogout:t,onClickNotificationAction:n,onAppSwitch:r,onClickOrgIcon:i,showNotifications:o,applicationId:a,searchBarMountId:s}=e,e=__rest(e,["onLogout","onClickNotificationAction","onAppSwitch","onShowSettingPanel","onClickOrgIcon","onClickHelpIcon","showNotifications","applicationId","searchBarMountId"]);const l=useDispatch(),[c,u]=react.exports.useState(!1),[d,p]=react.exports.useState(!1),[f,h]=react.exports.useState(!1),[m,g]=react.exports.useState(!1),[v,y]=react.exports.useState(!1),[x,b]=react.exports.useState(!1);var C=(useSelector(userSelector)||{})["currentUser"];const{panels:$=[]}=useSelector(rootSelector);var S=useSelector(unseenNotificationSelector);const w=useSelector(notificationStatusSelector);var E=useSelector(betaFeaturesSelector),C=(C||{})["organization"];const T=useSelector(authSelector)["user"];var{application:_=[]}=useSelector(applicationSelector)||{};const[j,I]=react.exports.useState(!1);const R=useSelector(appIdSelector),O=useSelector(selectApplicationConfig),[L,M]=react.exports.useState(!1);var N=useSelector(selectHasUserCreateRootFolderPermission);const P=gqlIntrospection.isOperationValid("fileApplication","mutation")&&N;function A(){u(!1),h(!1),g(!1),p(!1),y(!1),b(!1)}function k(){null!==$&&void 0!==$&&$.forEach(e=>{l(hidePanel$1(e.panelId))})}return react.exports.useEffect(()=>{var e,t=window.location["search"];l(actions$2.userApplicationSettings.fetchApplicationConfigStart({appId:R})),"?panel=invite-requests"!==t||j||(I(!0),t={name:"INVITE_REQUESTS_PANEL",config:{name:"Invite Requests"}},e={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"medium",zIndex:1001,parentPanelId:null,dimmed:0,dimmedStatus:"dimParent",header:{title:"INVITE REQUESTS"}},l(mountPanel$1({panelId:"INVITE_REQUESTS_PANEL",microFrontend:t,panelConfig:e})))},[]),react.exports.useEffect(()=>{null!==O&&void 0!==O&&O.length&&M(!0)},[O]),react.exports.useEffect(()=>{"success"===w&&l(markAllNotificationsSeenRequest())},[w,l]),react.exports.useEffect(()=>{l(getCurrentUser()),a&&l(getCurrentAppIcon({applicationId:a}))},[l,a]),react.exports.useEffect(()=>{l({type:listenLogout().type,payload:t})},[l,t]),react.exports.useEffect(()=>{n&&l(initNotificationAction(n))},[l,n]),react.exports.useEffect(()=>{l({type:appSwitcherSetupListener().type,payload:r})},[l,r]),react.exports.useEffect(()=>{l(onBooted())},[l]),react.exports.useEffect(()=>{$&&0!==$.length||A()},[$]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAppbarModule(),getAppbarPanelModule(),getNotificationModule$1(),getEventsModule(),getUserApplicationSettingsModule()]},{children:jsxRuntime.exports.jsx("div",Object.assign({className:"App",id:"aiware-app-bar","data-testid":"aiware-app-bar"},{children:jsxRuntime.exports.jsx(NewAppBar,Object.assign({isEnableOrgPanel:!1,onCloseSetting:function(){k()},onOpenSetting:function(){var e,t;c?(u(!1),k()):(A(),u(!0),k(),e={name:"APP_BAR_PANEL",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:VERITONE_PANEL_ID,type:"TAB_TEMPLATE",marginTop:55,withTab:!0,width:80,zIndex:1004,userRoles:null===T||void 0===T?void 0:T.roles,header:{divider:!0,title:""},footer:{logo:!0},size:"xlarge",fullScreen:!1},l(mountPanel$1({panelId:VERITONE_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenHelpCenter:function(){var e,t;d?(p(!1),k()):(A(),k(),p(!0),e={name:"HELP_PANEL",config:{name:"Help panel",dataId:"helpDataId",type:"SIMPLE_PANEL"}},t={panelId:HELP_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,size:"large",header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.headerTitle.helpCenter",defaultMessage:"Help Center",description:"The header title for the help center."}),actions:[{iconUrl:img$Q,action:{type:"OPEN_HELP_LINK"}}]}},l(mountPanel$1({panelId:HELP_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenNotification:function(){var e,t;null!=o&&o(),v?(y(!1),k()):(A(),k(),y(!0),e={name:"NOTIFICATION_PANEL",config:{name:"Notification Panel",dataId:"notificationDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:413,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.panel.notifications",defaultMessage:"Notifications Center",description:"Title of the notifications center panel"}),actions:[]}},l(mountPanel$1({panelId:NOTIFICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenUserApplicationSettings:function(){var e,t;x?(b(!1),k()):(A(),k(),b(!0),e={name:"USER_APPLICATION_SETTINGS_PANEL",config:{name:"User application settings",dataId:"userApplicationSettingsDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:USER_APPLICATION_SETTINGS_PANEL,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:320,header:{divider:!1,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle.user-application-name-settings",defaultMessage:"Application Settings",description:"Title of user application name settings panel"})}},l(mountPanel$1({panelId:USER_APPLICATION_SETTINGS_PANEL,microFrontend:e,panelConfig:t})))},onDashboardClick:function(){console.log("HANDLE DASHBOARD CLICK!")},organization:C,onClickOrgIcon:function(){var e,t;null!=i&&i(),m?(g(!1),k()):(A(),k(),g(!0),e={name:"ORGANIZATION_PANEL",config:{name:"Veritone",tabId:TabId.ORGANIZATION_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:ORGANIZATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:420,header:{divider:!0,title:"ORGANIZATIONS"}},l(mountPanel$1({panelId:ORGANIZATION_PANEL_ID,microFrontend:e,panelConfig:t})))},panels:$,searchBarMountId:s,openSetting:{openHelpPanel:!1,openNotificationPanel:!1,openAppSwitchPanel:!1,openOrgSwitchPanel:!1,openVeritonePanel:!1,openUserApplicationSettingsPanel:!1},unseenCount:S,onClickAppSwitchIcon:function(){var e,t;f?(h(!1),k()):(A(),k(),h(!0),e={name:"APP_BAR_PANEL",config:{name:"APP_BAR_PANEL",tabId:TabId.APP_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:APPLICATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:720,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle-app-switcher",defaultMessage:"App Switcher",description:"Title of applications panel list"}),actions:P?[{action:{type:"user-app-group/createNewAppGroupPlaceholder"},label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header-action.new-app-group",defaultMessage:"New App Group",description:"New App Group action button"}),variant:"contained",size:"large",color:"primary",submit:!0}]:void 0}},l(mountPanel$1({panelId:APPLICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},applications:_,showDashboardIcon:E,userApplicationSettingsIcon:L},e))}))}))})})}const headerBarSelector=e=>null==e?void 0:e.aiWareHeaderBar,registry={[AvailableWidgets.APP_BAR]:App,[AvailableComponents.APP_BAR_PANEL]:SettingPanelComponent},registryLookup=n=>__awaiter$a(void 0,void 0,void 0,function*(){if(registry[n])return registry[n];let e,t=null;switch(n){case AvailableWidgets.SAMPLE_APP_BAR:e=yield import("./js-core.esm2.js"),t=e.SampleAppBar;break;case AvailableWidgets.RESET_PASSWORD:e=yield import("./js-core.esm4.js"),t=e.ResetPassword;break;case AvailableWidgets.FLOW_CENTER:e=yield import("./js-core.esm5.js"),t=e.App;break;case AvailableWidgets.FLOW_WIDGET:e=yield import("./js-core.esm7.js").then(function(e){return e.i}),t=e.App;break;case AvailableWidgets.ENGINE_CENTER_BROWSE:e=yield import("./js-core.esm19.js"),t=e.EngineCenterBrowse;break;case AvailablePanels.SIMPLE_PANEL:e=yield import("./js-core.esm39.js"),t=e.Panel;break;case AvailablePanels.APP_BAR_PANEL_TEMPLATE:e=yield import("./js-core.esm41.js"),t=e.AppbarPanel;break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=yield import("./js-core.esm41.js"),t=e.AppbarTabPanel;break;case AvailablePanels.TAB_TEMPLATE:e=yield import("./js-core.esm41.js"),t=e.TabPanel;break;case AvailableComponents.NOTIFICATION_PANEL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationPanel;break;case AvailableComponents.NOTIFICATION_DETAIL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationDetailPanel;break;case AvailableComponents.NOTIFICATION_SETTING:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationSetting;break;case AvailableComponents.NOTIFICATION_UTILITY:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationUtilityPanel;break;case AvailableComponents.NOTIFICATION_APPLICATION:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationApplication;break;case AvailableComponents.HELP_PANEL:e=yield Promise.resolve().then(function(){return index_esm}),t=e.HelpCenterPanel;break;case AvailableComponents.EDIT_PROFILE_PICTURE:e=yield Promise.resolve().then(function(){return index_esm$1}),t=e.EditProFilePicture;break;case AvailableComponents.TEST_COMPONENT:e=yield import("./js-core.esm39.js"),t=e.SamplePanel1;break;case AvailableComponents.TEST_COMPONENT2:e=yield import("./js-core.esm39.js"),t=e.SamplePanel2;break;case AvailableComponents.TEST_COMPONENT3:e=yield import("./js-core.esm39.js"),t=e.SamplePanel3;break;case AvailableComponents.SETTING_PREFERENCE:e=yield import("./js-core.esm45.js"),t=e.SettingsPreferencesPanel;break;case AvailableComponents.ORGANIZATION_PANEL:e=yield import("./js-core.esm42.js"),t=e.OrganizationPanel;break;case AvailableComponents.INVITE_USERS_PANEL:e=yield import("./js-core.esm42.js"),t=e.InviteUsersPanel;break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=yield import("./js-core.esm42.js"),t=e.InviteRequestsPanel;break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=yield import("./js-core.esm42.js"),t=e.ReviewRequestPanel;break;case AvailableComponents.ADD_APPLICATIONS:e=yield import("./js-core.esm42.js"),t=e.AddApplicationsPanel;break;case AvailableComponents.DATA_CENTER_BROWSE:e=yield import("./js-core.esm46.js"),t=e.DataCenterBrowse;break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=yield import("./js-core.esm46.js"),t=e.FoldersAndFilesPanel;break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=yield import("./js-core.esm46.js"),t=e.FileInfoPanel;break;case AvailableComponents.DATA_CENTER_IMPORTER:e=yield import("./js-core.esm57.js"),t=e.DataCenterImporter;break;case AvailableComponents.DATA_LABELER:e=yield import("./js-core.esm59.js"),t=e.DataLabelerPanel;break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=yield import("./js-core.esm60.js"),t=e.AdminCenterOpenId;break;case AvailableComponents.ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm61.js"),t=e.AdminCenterBrowse;break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=yield import("./js-core.esm65.js"),t=e.DataCenterProcessAI;break;case AvailableComponents.ENGINE_CENTER_NEW:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.EngineCenterNew;break;case AvailableComponents.ENGINE_CENTER_FILTER:e=yield import("./js-core.esm19.js"),t=e.EngineCenterFilter;break;case AvailableComponents.APP_CENTER_FILTER:e=yield import("./js-core.esm66.js"),t=e.AppCenterFilter;break;case AvailableComponents.ENGINE_CENTER_DETAILS:e=yield import("./js-core.esm19.js"),t=e.EngineDetails;break;case AvailableComponents.ENGINE_CENTER_NEW_BUILD:e=yield import("./js-core.esm19.js"),t=e.CreateNewBuildPanel;break;case AvailableComponents.ENGINE_CENTER_CUSTOM_FIELDS_FORM:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.EngineCenterCustomFieldsForm;break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.SchemasFormPanel;break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.InputTypeFlyout;break;case AvailableComponents.ENGINE_CENTER_EDIT_RELEASE_NOTES:e=yield import("./js-core.esm19.js"),t=e.EditReleaseNotes;break;case AvailableComponents.ENGINE_CENTER_VERSION_HISTORY_PANEL:e=yield import("./js-core.esm19.js"),t=e.VersionHistoryPanel;break;case AvailableComponents.SUPPORTED_FILE_TYPES:e=yield import("./js-core.esm57.js"),t=e.SupportedFileTypes;break;case AvailableComponents.EDIT_FILE_METADATA:e=yield import("./js-core.esm57.js"),t=e.EditFileMetadata;break;case AvailableWidgets.APP_CENTER_BROWSE:e=yield import("./js-core.esm66.js"),t=e.AppCenterBrowse;break;case AvailableComponents.APP_CENTER_NEW:e=yield import("./js-core.esm67.js"),t=e.AppCenterNew;break;case AvailableComponents.APP_CENTER_ADD_FLOW_PANEL:e=yield import("./js-core.esm67.js"),t=e.AppCenterAddFlowPanel;break;case AvailableComponents.APP_CENTER_ADD_SCHEMA_PANEL:e=yield import("./js-core.esm67.js"),t=e.AppCenterAddSchemaPanel;break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=yield import("./js-core.esm67.js"),t=e.AppCenterConfigFieldsForm;break;case AvailableComponents.APP_CENTER_CONTEXT_MENU_EXTENSIONS:e=yield import("./js-core.esm67.js"),t=e.AppCenterContextMenuExtensionPanel;break;case AvailableComponents.APP_CENTER_EVENT_PANEL:e=yield import("./js-core.esm67.js"),t=e.AppCenterEventPanel;break;case AvailableComponents.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL:e=yield import("./js-core.esm67.js"),t=e.AppCenterPaletteIntegrationPanel;break;case AvailableComponents.APP_CENTER_BROWSE:e=yield import("./js-core.esm66.js"),t=e.AppCenterBrowse;break;case AvailableComponents.APP_CENTER_DETAILS:e=yield import("./js-core.esm66.js"),t=e.AppCenterDetails;break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=yield import("./js-core.esm65.js"),t=e.DataCenterEngineSelection;break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=yield import("./js-core.esm54.js"),t=e.NewGroupPanel;break;case AvailableComponents.PERMISSIONS_PANEL:e=yield import("./js-core.esm48.js"),t=e.PermissionsPanel;break;case AvailableComponents.GROUP_INFO_PANEL:e=yield import("./js-core.esm48.js"),t=e.GroupInfoPanel;break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=yield import("./js-core.esm48.js"),t=e.NewPermissionSetPanel;break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=yield import("./js-core.esm48.js"),t=e.PermissionSetDetailsPanel;break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=yield import("./js-core.esm46.js"),t=e.MediaDetailsPanelIframe;break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=yield import("./js-core.esm46.js"),t=e.IngestionCreationPanel;break;case AvailableComponents.DATA_CENTER_SELECT_IMPORT_SOURCE:e=yield import("./js-core.esm46.js"),t=e.SelectImportSource;break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=yield import("./js-core.esm46.js"),t=e.SourceCreationPanel;break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=yield import("./js-core.esm54.js"),t=e.GroupDetailsPanel;break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=yield import("./js-core.esm54.js"),t=e.AddMemberPanel;break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=yield import("./js-core.esm62.js"),t=e.ApplicationDetailsPanel;break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=yield import("./js-core.esm68.js"),t=e.ProcessingCenterSources;break;case AvailableComponents.PROCESSING_CENTER_ERROR_DETAIL:e=yield import("./js-core.esm68.js"),t=e.ErrorDetailPanel;break;case AvailableComponents.USER_APPLICATION_SETTINGS_PANEL:e=yield Promise.resolve().then(function(){return index_esm$3}),t=e.UserApplicationSettingsPanel;break;case AvailableComponents.ADD_APPLICATION_USERS_PANEL:e=yield import("./js-core.esm62.js"),t=e.AddUsersPanel;break;case AvailableComponents.PROCESSING_CENTER_BROWSE:e=yield import("./js-core.esm71.js"),t=e.ProcessingCenterBrowse;break;case AvailableComponents.JOBS_TABLE_SETTINGS_PANEL:e=yield import("./js-core.esm72.js"),t=e.JobsTableSettingsPanel;break;case AvailableComponents.VERSION_PANEL:e=yield import("./js-core.esm41.js"),t=e.VersionPanel;break;case AvailableComponents.PROCESSING_CENTER_DAG_BUILDER:e=yield import("./js-core.esm74.js"),t=e.DagBuilder;break;case AvailableComponents.PROCESSING_CENTER_INGESTION:e=yield import("./js-core.esm75.js").then(function(e){return e.an}),t=e.ProcessingCenterIngestion;break;case AvailableComponents.PROCESSING_CENTER_ADVANCED_SETTINGS:e=yield import("./js-core.esm75.js").then(function(e){return e.an}),t=e.ProcessingCenterAdvancedSettings;break;case AvailableComponents.PROCESSING_CENTER_AFFILIATE_PANEL:e=yield import("./js-core.esm75.js").then(function(e){return e.an}),t=e.ProcessingCenterAffiliatePanel;break;case AvailableComponents.JOBS_DETAILS_PANEL:e=yield import("./js-core.esm72.js"),t=e.JobsDetailsPanel;break;case AvailableComponents.TASKS_TABLE_SETTINGS_PANEL:e=yield import("./js-core.esm73.js"),t=e.TasksTableSettingsPanel;break;case AvailableComponents.RESOURCE_CENTER_BROWSE:e=yield import("./js-core.esm76.js"),t=e.ResourceCenterBrowse;break;case AvailableComponents.PACKAGE_DETAILS_PANEL:e=yield import("./js-core.esm79.js"),t=e.PackageDetails;break;case AvailableComponents.INSTANCE_ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm80.js"),t=e.InstanceAdminCenterBrowse;break;case AvailableComponents.SCHEMA_DETAILS_PANEL:e=yield import("./js-core.esm78.js"),t=e.SchemaDetailsPanel}return registry[n]=t}),registerComponent=(e,t)=>{registry[e]=t},WIDGETS_FEATURE_KEY="widgets",initialState$1=(!function(e){e.idle="idle",e.mounting="mounting",e.unmounting="unmounting",e.error="error",e.eventing="eventing"}(WidgetsStatus=WidgetsStatus||{}),{value:[],status:WidgetsStatus.idle}),widgetsSelector=e=>e[name].value,callWidgetOnComplete=(e,t)=>{e=e.find(e=>e.widgetName===t);null!=e&&e.onComplete&&e.onComplete()},{name,reducer,actions:{mountWidget:mountWidget$1,mountWidgetSuccess,mountWidgetError,unmountWidget:unmountWidget$1,unmountWidgetSuccess,unmountWidgetFailure,triggerWidgetCallback,triggerWidgetCallbackSuccess}}=createSlice({name:WIDGETS_FEATURE_KEY,initialState:initialState$1,reducers:{mountWidget:(e,t)=>{e.value.push(t.payload),e.status=WidgetsStatus.mounting},mountWidgetSuccess:e=>{e.status=WidgetsStatus.idle},mountWidgetError:e=>{e.status=WidgetsStatus.error},triggerWidgetCallback:(e,t)=>{e.status=WidgetsStatus.eventing},triggerWidgetCallbackSuccess:e=>{e.status=WidgetsStatus.idle},unmountWidget:(e,t)=>{e.status=WidgetsStatus.unmounting},unmountWidgetSuccess:(e,t)=>{e.value=e.value.filter(e=>e.widgetId!==t.payload),e.status=WidgetsStatus.idle},unmountWidgetFailure:e=>{e.status=WidgetsStatus.error}}});function*mountWidgetListenerSaga(){let a;const s={};yield takeEvery$1(mountWidget$1({}).type,function*(e){try{var{widgetConfig:t={},widgetName:n,elementId:r}=null==e?void 0:e.payload,i=(yield call$f(registryLookup,n))||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),o=getElement(r,n);o.classList.add("aiware-el"),s[r]?a=s[r]:(a=client$1.createRoot(o),s[r]=a),a.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(i,Object.assign({},t))}))})}))),yield put(mountWidgetSuccess())}catch(e){yield put(mountWidgetError())}}),yield takeEvery$1(e=>/\/booted$/.test(e.type),function*(e){var[e]=e.type.split("/");yield put(triggerWidgetCallback(e))}),yield takeEvery$1(unmountWidget$1("").type,function*(t){try{const e=yield select(e=>{return(null==(e=widgetsSelector(e).find(e=>e.widgetId===t.payload))?void 0:e.elementId)||""});setTimeout(()=>{s[e]&&s[e].unmount(),delete s[e]}),yield put(unmountWidgetSuccess(t.payload))}catch(e){yield put(unmountWidgetFailure())}}),yield takeEvery$1(triggerWidgetCallback("").type,function*(e){var t=yield select(widgetsSelector);callWidgetOnComplete(t,e.payload),yield put(triggerWidgetCallbackSuccess())})}function getWidgetsModule(){return{id:name,reducerMap:{[name]:reducer},sagas:[mountWidgetListenerSaga],initialActions:[]}}function getDataModule(){return{id:"data",reducerMap:{data:(e,{type:t,payload:n})=>{return t===setData({}).type?[...e.filter(e=>e.id!==n.id),n]:e||[]}},sagas:[],initialActions:[]}}const useStyles$2=makeStyles()(e=>({sdkSnackbarContainer:{"& svg":{fill:"white"}}}));function CustomSnackbar(){const n=useDispatch(),[e,t]=react.exports.useState([]),[r,i]=react.exports.useState(!1),[o,a]=react.exports.useState(void 0),{message:s,duration:l}=useSelector(snackbarSelector);var c=useStyles$2()["classes"],u=(react.exports.useEffect(()=>{null!==s&&void 0!==s&&s.content&&t(e=>[...e,s])},[s]),react.exports.useEffect(()=>{e.length&&!o?(a(Object.assign({},e[0])),t(e=>e.slice(1)),i(!0)):e.length&&o&&r&&(n(clearMessage()),i(!1))},[e,o,r,n]),(e,t)=>{"clickaway"!==t&&(i(!1),n(clearMessage()))});return jsxRuntime.exports.jsx(Snackbar$1,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:r,autoHideDuration:l||3e3,onClose:u,TransitionProps:{onExited:()=>{a(void 0),n(clearMessage())}},className:c.sdkSnackbarContainer,"data-snackbarid":(null===o||void 0===o?void 0:o.key)||"na","data-testid":"snackbar.message."+((null===o||void 0===o?void 0:o.severity)||"na")},{children:jsxRuntime.exports.jsx(Alert$1,Object.assign({onClose:u,severity:null===o||void 0===o?void 0:o.severity,elevation:6,variant:"filled"},{children:null===o||void 0===o?void 0:o.content}))}),o?o.key:void 0)}function validateConfig(e){return e.applicationId||console.info("@aiware/js: applicationId is required. Go to developer app to find your application id."),e.baseUrl||console.info("@aiware/js: baseUrl is required. It defaults to the US Commercial environment which is https://api.us-1.veritone.com/v3/graphql"),!0}const ID="openSupportChatButton",DATA_ATTR="open-support-chat-button";var SupportCenterPixel=()=>jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsx("div",{id:ID,"data-veritone-element":DATA_ATTR,style:{width:1,height:1,position:"fixed",right:55,bottom:20}})});const nameSpace="@helpPanel",updateSelectedTab=createAction(nameSpace+"/UPDATE_SELECTED_TAB",function(e,t){return{payload:{selectedTabId:e,tabLink:t}}}),setCustomKnowledgeBaseUrl=createAction(nameSpace+"/SET_CUSTOM_KNOWLEDGE_BASE_URL",function(e){return{payload:{url:e}}}),setCustomDocsUrl=createAction(nameSpace+"/SET_CUSTOM_DOCS_URL",function(e){return{payload:{url:e}}}),initialState={selectedTabId:0,tabLink:"https://support.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState,e=>{e.addCase(updateSelectedTab,(e,t)=>Object.assign(Object.assign({},e),{tabLink:t.payload.tabLink,selectedTabId:t.payload.selectedTabId})),e.addCase(setCustomKnowledgeBaseUrl,(e,t)=>Object.assign(Object.assign({},e),{customKnowledgeBaseUrl:t.payload.url})),e.addCase(setCustomDocsUrl,(e,t)=>Object.assign(Object.assign({},e),{customDocsUrl:t.payload.url}))});function*helpSaga(){yield takeEvery$1("OPEN_HELP_LINK",function*(){var e=yield select(e=>e.helpPanel.tabLink);yield put(openLinkOnNewTab({url:e}))})}const namespace="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace]?e[namespace].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace]:getTabLinkReducer},sagas:[helpSaga],initialActions:[]}}var knowledgeBaseUrl$1="https://docs.veritone.com/help/index.html",documentUrl$1="https://docs.veritone.com",config={knowledgeBaseUrl:knowledgeBaseUrl$1,documentUrl:documentUrl$1};const useStyles$1=makeStyles()(e=>({root:{height:"calc(100% - 110px)",textAlign:"left","& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},tabs:{padding:e.spacing(2.4,6,0,6)},tabPanels:{width:"100%",height:"100%"},aiWareIcon:{position:"relative",maxHeight:50,opacity:"inherit",padding:e.spacing(4,3.2,0,3.2),display:"flex",justifyContent:"flex-end"},customTabs:{margin:e.spacing(0,4)},kbRoot:{height:"100%",textAlign:"left"},loadingContainer:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white"},kbToolBarBox:{padding:e.spacing(6,6,1.6,6)},kbTabContent:{height:"calc(100% - 92px)"},kbTabPanel:{padding:e.spacing(6)},dRoot:{height:"100%",width:"100%"},dNavBar:{height:"100%",overflow:"hidden",background:"#F4F4F4"},dTitle:{color:"#2A323C",fontWeight:600,fontSize:"18px",lineHeight:"24px",padding:e.spacing(3.2)},dContent:{height:"100%",width:"100%",position:"relative"},dMenu:{overflowY:"auto",height:"calc(100% - 52px)"},drawerContainer:{display:"flex",height:"100%",background:e.palette.background.default},tabContainer:{borderRight:"0.5px solid #D5DFE9",overflow:"hidden",height:"100%",width:"100%"},tabName:{borderBottom:"0.5px solid #D5DFE9",display:"flex",justifyContent:"space-between",alignItems:"center",height:"64px",padding:e.spacing(0,6)},actionIcons:{margin:e.spacing(-2.4)},tabContent:{height:"calc(100vh - 57px - 60px)",overflowY:"auto",overflowX:"hidden"}})),documentUrl=config.documentUrl,Documentation=({path:e=documentUrl})=>{var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(t.dRoot,"hide-in-percy")},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"docs-iframe",title:"Document Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){setTimeout(()=>{r(!1)},1e3)}})]}))},knowledgeBaseUrl=config["knowledgeBaseUrl"];function Knowledgebase({path:e=knowledgeBaseUrl}){var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.kbRoot},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"knowledgebase-iframe",title:"Knowledgebase Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){r(!1)}})]}))}const defaultLocale="en-us",tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.au1+VZ",defaultMessage:"Knowledgebase",description:"Help Panel: Knowledgebase tab label"}),disabled:!1,url:"https://support.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(){var e=useSelector(initialConfigSelector),t=useSelector(customKnowledgeBaseUrlSelector),n=useSelector(customDocsUrlSelector),r=useSelector(helpCenterSelectedTabIdSelector),i=useSelector(e=>null==e?void 0:e.panels),o=useStyles$1()["classes"],[a]=react.exports.useState(defaultLocale);const s=useDispatch();i=null==i?void 0:i.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),t=i&&t?t:e.knowledgeBaseURL,i=i&&n?n:e.docsURL;return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:a},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:o.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:r,onChangeTab:e=>{s(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:t})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:i})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$y,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var index_esm=Object.freeze({__proto__:null,HelpCenterPanel:HelpCenter,customDocsUrlSelector:customDocsUrlSelector,customKnowledgeBaseUrlSelector:customKnowledgeBaseUrlSelector,helpCenterSelectedTabIdSelector:helpCenterSelectedTabIdSelector,setCustomDocsUrl:setCustomDocsUrl,setCustomKnowledgeBaseUrl:setCustomKnowledgeBaseUrl,updateSelectedTab:updateSelectedTab});const useStyles=makeStyles()(()=>({dialog:{top:"125px",overflowX:"hidden",overflowY:"hidden",display:"flex",alignItems:"center",flexDirection:"column"},container:{borderRadius:"4px",backgroundColor:"#fff",width:"430px",overflow:"hidden",outline:0,boxShadow:"0px 0px 7px rgba(0, 0, 0, .25)"},header:{textTransform:"capitalize"},appListContainer:{width:"100%"},orgName:{fontWeight:"bold"}})),ApplicationDialog=()=>{const[e,t]=react.exports.useState(null),[n,r]=react.exports.useState(0);var i=useSelector(userSelector$2),o=useStyles()["classes"];const a=useSelector(initialConfigSelector),s=a.applicationId,l=useSelector(applicationSelector),c=useSelector(switchApiSelector);var u=(null===l||void 0===l?void 0:l.application)||[],d=null===l||void 0===l?void 0:l.status;var p=[...u].sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),f=u.findIndex(e=>e.id===s);useInterval(()=>{t(e=>e&&e-1)},e&&n<3?1e3:null),react.exports.useEffect(()=>{"success"!==(null===l||void 0===l?void 0:l.status)||1!==(null===l||void 0===l?void 0:l.application.length)||(null===l||void 0===l?void 0:l.application[0].id)===a.applicationId||e||(0===e?window.open(c+"/"+(null===l||void 0===l?void 0:l.application[0].id),"_self"):t(10))},[a,l,c,e]);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s)&&f<0&&"success"===d?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:o.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:o.header,variant:"h1",sx:{px:"30px",pt:"30px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-title",defaultMessage:"Application Not Available",description:"Title for modal"})})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"10px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message1",defaultMessage:"Looks like you switched organizations, your current application is not available in the current",description:"Description current application not available"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:o.orgName},{children:null!=(f=null==i?void 0:i.organization)&&f.organizationName?i.organization.organizationName:""}))," ",jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message2",defaultMessage:"organization you are viewing.",description:"Description current application not available"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message3",defaultMessage:"Please select from the available applications below to be redirected.",description:"Instructions for current application not available"})})),e&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"},onClick:()=>{r(e=>e+1)}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-countdown-message",defaultMessage:"You will be automatically forwarded to {appName} in {timeRemaining} seconds.",description:"Instructions for current application not available",values:{timeRemaining:e,appName:u[0].name}})})),jsxRuntime.exports.jsx("div",Object.assign({className:o.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(c+"/"+e,"_self")},applications:p,useGrid:!1,row:3})}))]}))})):null};class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}const rateLimiter=new RateLimiter;function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$4.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$4.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$4.dispatch(logout())},1e3)):store$4.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$4.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsxs(AIWareThemeProvider,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})}))),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$4.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$4.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$4.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$4.addModule(r),n},unmountPanel=e=>(store$4.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$4.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$4.dispatch(unmountAllPanel$1(""))};function init(e,t){validateConfig(e)&&store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{onComplete:t})))}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$4),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$4,window.aiWare_theme={darkTheme:darkTheme,lightTheme:lightTheme}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$4,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,version:"sdk_release_version",commit:"ce2832e3a",releaseDate:"sdk_release_date"});export{ListItem$1 as $,AIWareIntlProvider as A,Box$1 as B,interopRequireDefault as C,createAction as D,createReducer as E,FormattedMessage$1 as F,Grid$1 as G,createSlice as H,ENGINE_OWNER_TYPES as I,ENGINE_FILTER_TYPES as J,DynamicModuleLoader as K,LoadingButton$1 as L,preferredLanguageSelector as M,baseUrlSelector as N,rootApiSelector as O,Provider$2 as P,sessionTokenSelector as Q,graphEndpointSelector as R,Switch$1 as S,Typography$1 as T,controllerNodeRedImageSelector as U,controllerUrlSelector as V,automateControllerUrlSelector as W,automateUrlSelector as X,Portal$1 as Y,List$2 as Z,_extends as _,generateUtilityClasses as a,deleteEngine as a$,ListItemIcon$1 as a0,ListItemText$1 as a1,all as a2,img$m as a3,img$n as a4,img$p as a5,img$q as a6,Divider$1 as a7,Tooltip$1 as a8,IconButton$1 as a9,DialogTitle$1 as aA,DialogContent$1 as aB,DialogActions$1 as aC,TableContainer$1 as aD,Table$1 as aE,TableHead$1 as aF,TableRow$1 as aG,TableCell$1 as aH,TableSortLabel$1 as aI,TableBody$1 as aJ,img$f as aK,Popper$1 as aL,ClickAwayListener as aM,Fade$1 as aN,img$r as aO,img$o as aP,img$O as aQ,img$A as aR,Select$1 as aS,MenuItem$1 as aT,Snackbar$1 as aU,default_1 as aV,img$h as aW,img$j as aX,img$S as aY,Tabs$1 as aZ,Tab$1 as a_,img$g as aa,img$E as ab,Skeleton$1 as ac,takeLatest$1 as ad,fetchAllTags as ae,put as af,select as ag,fetchFlows as ah,call$f as ai,fetchTemplateGallery as aj,isRevisionsExistOnServerRequest as ak,FormLabel$1 as al,default_1$5 as am,FormGroup$1 as an,FormControlLabel$1 as ao,Checkbox$1 as ap,fetchTemplateGalleryFallback as aq,Button$1 as ar,Card$1 as as,img$k as at,flowStyles as au,NoResults as av,CircularProgress$1 as aw,img$a as ax,setApiEndpoint as ay,Dialog$1 as az,styled$1 as b,_createCompounder as b$,img$i as b0,AIWareFormatMessage as b1,FormattedDate as b2,fetchVeritoneGraphQLApi as b3,useTheme as b4,KeyboardArrowRight as b5,KeyboardArrowLeft as b6,useId as b7,InputUnstyled as b8,isHostComponent as b9,img$b as bA,isEmpty_1 as bB,Backdrop$1 as bC,getDefaultMiddleware as bD,isNil_1 as bE,UpDown as bF,Icon$1 as bG,get_1 as bH,map_1 as bI,keys_1 as bJ,RadioGroup$1 as bK,Avatar$1 as bL,img$u as bM,baseGraphQLApi as bN,FormHelperText$2 as bO,img$e as bP,StyledEngineProvider as bQ,ThemeProvider as bR,lightTheme as bS,CssBaseline as bT,Hide as bU,showMessage as bV,MessageSeverity as bW,Radio$2 as bX,fetchEngine as bY,createSvgIcon$2 as bZ,_hasPath as b_,getDefaultExportFromNamespaceIfNotNamed as ba,commonjsRequire as bb,_typeof$4 as bc,_inheritsLoose$2 as bd,_assertThisInitialized$1 as be,React as bf,hoistNonReactStatics_cjs as bg,_defineProperty$1 as bh,reactDom as bi,Transition$1 as bj,__awaiter$a as bk,__generator$2 as bl,__spread as bm,TransitionGroup$1 as bn,connect$1 as bo,Bookmark as bp,EngineFlagIcons as bq,createAsyncThunk as br,withStyles as bs,getConfigModule as bt,getAuthModule as bu,getSnackbarModule as bv,CacheProvider as bw,muiCache as bx,img$P as by,img$c as bz,Paper$1 as c,useIntl as c$,_baseIteratee as c0,isArrayLike_1 as c1,toInteger_1 as c2,_toPropertyKey as c3,_setPrototypeOf$3 as c4,commonjsGlobal$1 as c5,combineReducers as c6,createSelector$1 as c7,fork as c8,AIWareThemeProvider as c9,Add as cA,ExpandLess as cB,ExpandMore as cC,Collapse$1 as cD,img$14 as cE,Filter$1 as cF,DynamicTable as cG,useTheme$2 as cH,getThemeProps as cI,useEnhancedEffect$1 as cJ,React$1 as cK,_arrayPush as cL,isArray_1 as cM,_baseToString as cN,_baseTrim as cO,_castSlice as cP,_stringToArray as cQ,toString_1 as cR,ReactIs as cS,upperFirst_1 as cT,isString_1 as cU,_baseGet as cV,_baseSlice as cW,_castPath as cX,_toKey as cY,_isIndex as cZ,channel$1 as c_,Stack$4 as ca,Close$1 as cb,FullscreenExit as cc,Fullscreen as cd,TabPanel as ce,default_1$2 as cf,InputAdornment$1 as cg,unmountPanel$1 as ch,AvailableComponents as ci,delay$1 as cj,hidePanel$1 as ck,mountPanel$1 as cl,DialogContentText$1 as cm,userSelector$2 as cn,MoreVert as co,Menu$1 as cp,Edit as cq,Upload as cr,Delete as cs,CustomTabs as ct,useBackupImg as cu,img$1x as cv,validate as cw,configSelector as cx,baseGraphQLApiWithError as cy,VerifiedFilled as cz,capitalize$2 as d,_setToArray as d$,VideoCamera as d0,Image$1 as d1,Sound as d2,Description as d3,toNumber_1 as d4,ProgressStepper as d5,size_1 as d6,take as d7,CurlyBraces as d8,UnknownDocument as d9,_baseEach as dA,_arrayFilter as dB,_getNative as dC,eq_1 as dD,_root as dE,_Uint8Array as dF,_overArg as dG,_isPrototype as dH,isObjectLike_1 as dI,_baseGetTag as dJ,_arrayLikeKeys as dK,isArguments_1 as dL,isBuffer$3 as dM,isFunction_1 as dN,isTypedArray_1 as dO,_Stack as dP,_baseFor as dQ,identity_1 as dR,_isIterateeCall as dS,isSymbol_1 as dT,_baseMap as dU,_baseUnary as dV,memoizeOne as dW,isPlainObject$1 as dX,styled$2 as dY,_Symbol as dZ,_Set as d_,sdkEventManager as da,SdkEvents as db,SdkError as dc,EngineClassIcons as dd,Mode2 as de,EngineModeIcons as df,DeploymentModelIcons as dg,guid as dh,EditList as di,forceReflow as dj,getDefaultExportFromCjs as dk,alpha as dl,useControlled as dm,useEventCallback as dn,ButtonBase$1 as dp,useForkRef as dq,setRef as dr,inputClasses$1 as ds,inputBaseClasses$1 as dt,outlinedInputClasses$1 as du,filledInputClasses$1 as dv,ClearIcon as dw,ArrowDropDownIcon as dx,isObject_1 as dy,_arrayMap as dz,_objectWithoutPropertiesLoose$2 as e,img$1r as e$,_SetCache as e0,_cacheHas as e1,deepmerge as e2,useTheme$3 as e3,Slide$1 as e4,updatePanelMicroFrontendProps as e5,setData as e6,useIsFocusVisible as e7,ownerDocument as e8,appendOwnerState as e9,enableBetaFeatures as eA,Badge$1 as eB,openLinkOnNewTab as eC,orange$1 as eD,deepOrange$1 as eE,authSelector as eF,headerBarSelector as eG,getSortName as eH,img$7 as eI,InputLabel$1 as eJ,ListItemAvatar$1 as eK,OrganizationTabIcon as eL,ScopedCssBaseline$1 as eM,AlarmTwo as eN,getApplicationsApi as eO,ListItemSecondaryAction$1 as eP,updateTokenSuccess as eQ,postNotificationCommand as eR,aiwareEvent as eS,notificationCommands as eT,panelsSelector as eU,css as eV,avatarClasses as eW,img$L as eX,img$K as eY,img$1t as eZ,img$1s as e_,lighten as ea,darken as eb,slotShouldForwardProp as ec,shouldSpreadAdditionalProps$1 as ed,keyframes as ee,img$1u as ef,createTheme$1 as eg,injectIntl as eh,TabId as ei,PersonalProfile$1 as ej,Organizations as ek,DataCenter as el,Process as em,FlowCenter2 as en,DeveloperCenter as eo,Marketplace$1 as ep,LibraryCenter as eq,AdminCenter as er,AdminTabIcon as es,Resources$1 as et,DagBuilder as eu,img$R as ev,selectIsSuperAdmin as ew,img$3 as ex,img$y as ey,takeEvery$1 as ez,clsx as f,ConfirmationModal as f$,img$I as f0,img$1v as f1,img$H as f2,emphasize as f3,_arraySome as f4,ErrorBoundary$1 as f5,Information as f6,NewFolder as f7,SpecialFolder as f8,User as f9,FilterRemove as fA,CheckCircle as fB,FolderOpen as fC,Voice as fD,useDoubleClick as fE,FolderFilled as fF,Time as fG,img$w as fH,Undefined as fI,YoutubeSource as fJ,PodcastSource as fK,TVSource as fL,RadioSource as fM,selectOrgId as fN,selectIsUserAdmin as fO,ErrorState$1 as fP,StepConnector$1 as fQ,NullState$2 as fR,Group as fS,gqlIntrospection as fT,PermissionChangedAction as fU,Lock as fV,AddGroup as fW,StepperContext$1 as fX,StepContext$1 as fY,SvgIcon$1 as fZ,initialConfigSelector as f_,Source as fa,Search$1 as fb,selectIsOLPEnabled as fc,getLibraryModule as fd,selectApiConfigs$1 as fe,FullScreenContainer as ff,betaFeaturesSelector as fg,cmsUrlSelector as fh,UserAddFilled as fi,Popover$1 as fj,MenuList$1 as fk,MoveFolder as fl,Download as fm,img$8 as fn,selectPanelByPanelName as fo,EngineCategoryIcons as fp,Settings$2 as fq,Hamburger as fr,List as fs,EditAttributes as ft,MoreHor as fu,img$t as fv,img$v as fw,img$2 as fx,selectUserOrgEdgeVersion as fy,ProcessingDetail as fz,generateUtilityClass as g,EnumHelpers as g0,formatBytes as g1,NotInterested as g2,mountPanelForResponse$1 as g3,md5 as g4,AddUser as g5,Users as g6,ApplicationTabIcon as g7,SecurityGroup as g8,NoApps as g9,FormattedRelativeTime$1 as gA,Folder as gB,Hidden as gC,ArrowUp as gD,ArrowDown as gE,toFinite_1 as gF,_baseForOwn as gG,_arrayReduce as gH,hasIn_1 as gI,useSyncExternalStoreExports as gJ,Packages as gK,Engines as gL,actionChannel as gM,tabsClasses$1 as gN,PackagesAvatar as gO,registry as gP,registerComponent as gQ,AvailableWidgets as gR,root as gS,mountWidget as gT,unmountWidget as gU,mountPanel as gV,unmountPanel as gW,hidePanel as gX,unmountAllPanel as gY,init as gZ,green$1 as ga,selectors as gb,LibraryDropdown as gc,Remove as gd,Save as ge,Input$3 as gf,Copy as gg,ArrowForward as gh,Modal$1 as gi,_baseIsEqual as gj,Input$1 as gk,_getSymbols as gl,stubArray_1 as gm,_baseGetAllKeys as gn,_getTag as go,_nodeUtil as gp,_getAllKeys as gq,_castFunction as gr,Article as gs,Task as gt,View as gu,_objectSpread2 as gv,serialize$1 as gw,stringify$4 as gx,compile$1 as gy,Check as gz,composeClasses as h,useDispatch as i,jsxRuntime as j,useSelector as k,authStatusSelector as l,makeStyles as m,authContextSelector as n,AuthContext as o,lodash as p,Alert$1 as q,react as r,store$4 as s,authErrorMessage as t,useThemeProps as u,FormControl$1 as v,TextField$1 as w,classNames as x,resetPasswordRequest as y,createSvgIcon as z};
|
package/js-core.esm.js.gz
CHANGED
|
Binary file
|
package/js-core.esm49.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bZ as createSvgIcon,j as jsxRuntime,dy as isObject_1,d4 as toNumber_1,z as createSvgIcon$1,C as interopRequireDefault,m as makeStyles,B as Box,bG as Icon,fu as MoreHor,a7 as Divider,ez as takeEvery$1,H as createSlice,fp as EngineCategoryIcons,T as Typography,ag as select,fe as selectApiConfigs,ai as call,af as put,c$ as useIntl,r as react,v as FormControl,F as FormattedMessage,aS as Select,i as useDispatch,az as Dialog,aB as DialogContent,G as Grid,aC as DialogActions,ar as Button,cy as baseGraphQLApiWithError,aT as MenuItem,a8 as Tooltip,ca as Stack,L as LoadingButton,ac as Skeleton,eN as AlarmTwo}from"./js-core.esm.js";import{L as LocalizationProvider,A as AdapterDateFns,C as CalendarPicker}from"./js-core.esm23.js";import{A as AutoSizer,I as InfiniteLoader}from"./js-core.esm50.js";import{F as FixedSizeList}from"./js-core.esm32.js";import{n as now_1}from"./js-core.esm56.js";import{L as ListSubheader}from"./js-core.esm34.js";var ExpandLess=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),ExpandMore=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),TableView=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M19 7H9c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm0 2v2H9V9h10zm-6 6v-2h2v2h-2zm2 2v2h-2v-2h2zm-4-2H9v-2h2v2zm6-2h2v2h-2v-2zm-8 4h2v2H9v-2zm8 2v-2h2v2h-2zM6 17H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2v1h-2V5H5v10h1v2z"}),"TableView"),isObject=isObject_1,now=now_1,toNumber=toNumber_1,FUNC_ERROR_TEXT="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce(n,a,e){var i,r,s,o,l,d,u=0,m=!1,c=!1,t=!0;if("function"!=typeof n)throw new TypeError(FUNC_ERROR_TEXT);function h(e){var t=i,a=r;return i=r=void 0,u=e,o=n.apply(a,t)}function p(e){var t=e-d;return void 0===d||a<=t||t<0||c&&s<=e-u}function g(){var e,t=now();if(p(t))return x(t);l=setTimeout(g,(e=a-((t=t)-d),c?nativeMin(e,s-(t-u)):e))}function x(e){return l=void 0,t&&i?h(e):(i=r=void 0,o)}function f(){var e=now(),t=p(e);if(i=arguments,r=this,d=e,t){if(void 0===l)return u=e=d,l=setTimeout(g,a),m?h(e):o;if(c)return clearTimeout(l),l=setTimeout(g,a),h(d)}return void 0===l&&(l=setTimeout(g,a)),o}return a=toNumber(a)||0,isObject(e)&&(m=!!e.leading,c="maxWait"in e,s=c?nativeMax(toNumber(e.maxWait)||0,a):s,t="trailing"in e?!!e.trailing:t),f.cancel=function(){void 0!==l&&clearTimeout(l),i=d=r=l=void(u=0)},f.flush=function(){return void 0===l?o:x(now())},f}var debounce_1=debounce,SettingsApplications={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(SettingsApplications,"__esModule",{value:!0}),SettingsApplications.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon$1),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z"}),"SettingsApplications");function __awaiter(e,s,o,l){return new(o=o||Promise)(function(a,t){function n(e){try{r(l.next(e))}catch(e){t(e)}}function i(e){try{r(l.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?a(e.value):((t=e.value)instanceof o?t:new o(function(e){e(t)})).then(n,i)}r((l=l.apply(e,s||[])).next())})}function getEngines(n,i,r){return __awaiter(this,void 0,void 0,function*(){var e="getEngines",t="engines",a={edgeVersion:i},a=(r&&(a.state=r),yield baseGraphQLApiWithError(Object.assign({query:"\n query getEngines ($state: [EngineState], $edgeVersion: Int) {\n engines(\n offset: 0,\n limit: 500,\n state: $state,\n edgeVersion: $edgeVersion\n ) {\n count\n records {\n id\n name\n categoryId\n edgeVersion\n }\n }\n }\n ",variables:a,operationName:e},n)));return a[t]})}function getEngineCategories(a){return __awaiter(this,void 0,void 0,function*(){var e="getEngineCategories",t="engineCategories",e=yield baseGraphQLApiWithError(Object.assign({query:"\n query getEngineCategories {\n engineCategories(offset: 0, limit: 200) {\n count\n records {\n id\n name\n description\n }\n }\n }\n ",operationName:e},a));return e[t].records=e[t].records.map(e=>Object.assign(Object.assign({},e),{iconName:e.name.replace(/[^a-zA-Z]/g,"")})),e[t]})}var default_1=SettingsApplications.default=_default,enginesFilterApi=Object.freeze({__proto__:null,getEngines:getEngines,getEngineCategories:getEngineCategories});const useStyles$1=makeStyles()(e=>({dateRangeDisplay:{display:"flex",alignItems:"center",justifyContent:"start",fontWeight:400,fontSize:"10px",lineHeight:"16px",border:"1px solid #D5DFE9",borderRadius:"5px",padding:"0px 7px",boxSizing:"border-box",minWidth:"120px",minHeight:"28px",cursor:"pointer"},menuItem:{marginLeft:"25px"},subheader:{fontWeight:"bold"},tooltipList:{margin:0,padding:0,listStyle:"none"},formControl:{marginRight:"12px"},label:{fontWeight:700,fontSize:14,color:"#2A323C",marginBottom:0,display:"flex",justifyContent:"space-between"},selectField:{width:150,height:28,fontSize:"10px",lineHeight:"16px",fontWeight:400},title:{textTransform:"capitalize"},clearButton:{color:"#0C53B0",cursor:"pointer",fontWeight:"400",fontSize:"14px"},field:{width:150},clearBtn:{color:"#0C53B0",cursor:"pointer",fontWeight:400}})),muiSelectStyleOverrides={height:"28px",fontSize:"0.8em","& fieldset":{borderColor:"#D5DFE9",borderWidth:"2px",borderRadius:"6px"},"&:hover":{"&& fieldset":{borderColor:"rgba(42,50,60,0.5)"}}},AiEngineFilter=({id:e,label:t,items:a,selectedValue:n,onChange:i,engineList:r,entity:s="jobs"})=>{const o=useStyles$1()["classes"];var l=useIntl();const d={engine:l.formatMessage({id:"reusable-utils.engine-label",defaultMessage:[{type:0,value:"Engine"}]}),engines:l.formatMessage({id:"reusable-utils.engines-label",defaultMessage:[{type:0,value:"Engines"}]})},u=react.exports.useCallback(e=>{var e=e["target"]["value"];i&&i("string"==typeof e?e.split(","):e)},[i]);const m=()=>jsxRuntime.exports.jsx("ul",Object.assign({className:o.tooltipList},{children:n.map(e=>jsxRuntime.exports.jsx("li",{children:r[e].name}))}));return jsxRuntime.exports.jsxs(FormControl,Object.assign({size:"small",className:o.formControl},{children:[jsxRuntime.exports.jsxs("label",Object.assign({htmlFor:e,className:o.label},{children:[t," ",0<n.length&&jsxRuntime.exports.jsx("span",Object.assign({onClick:()=>{u({target:{value:[]}})},className:o.clearBtn},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"shared-ai-search-results-filter-input-clear-button",defaultMessage:"Clear",description:"Search Filter input Clear butoon"})}))]})),jsxRuntime.exports.jsx(Select,Object.assign({id:e,"data-test":s+"-engines-select",sx:muiSelectStyleOverrides,variant:"outlined",value:n,multiple:!0,displayEmpty:!0,className:o.field,onChange:u,renderValue:e=>{return 0===e.length?jsxRuntime.exports.jsx("div",{children:"All"}):(e=e["length"],jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(m,{})},{children:jsxRuntime.exports.jsxs("span",Object.assign({style:{display:"flex",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(default_1,{sx:{fontSize:"16px",fill:"#555F7C",marginRight:"3px"}})," ",e," ",1<e?d.engines:d.engine]}))})))},MenuProps:{sx:{maxHeight:"50vh"},className:"aiware-el"}},{children:a.map(e=>{return t=(e=e).engines.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({className:o.menuItem,value:e.engineId,"data-testid":`processing-center.${s}.engine-filter-option-`+e.engineId},{children:e.engineName}),e.engineId)),[jsxRuntime.exports.jsx(ListSubheader,Object.assign({className:o.subheader},{children:e.categoryName})),t];var t})}))]}))};var enginesFilterJsx=Object.freeze({__proto__:null,AiEngineFilter:AiEngineFilter});const engineListItems=(e,t,n,i)=>e.map((a,e)=>({categoryName:t[a].name,id:t[a].id,engines:n.filter((e,t)=>{if(i[e].categoryId===a)return e}).map((e,t)=>({engineId:i[e].id,engineName:i[e].name}))}));var enginesFilterHelpers=Object.freeze({__proto__:null,engineListItems:engineListItems});const formattedMessages=(e,t)=>({clearButtonLabel:e.formatMessage({id:"reusable-utils.filters.clear-button-label",defaultMessage:[{type:0,value:"Clear"}]}),statusFilterLabel:e.formatMessage({id:"reusable-utils.filters.status-label",defaultMessage:[{type:0,value:"Status"}]}),allLabel:e.formatMessage({id:"reusable-utils.filters.all-placeholder",defaultMessage:[{type:0,value:"All"}]}),okButtonLabel:e.formatMessage({id:"reusable-utils.filters.ok-button-label",defaultMessage:[{type:0,value:"OK"}]}),dateRangeFilterDefaultValueLabel:e.formatMessage({id:"reusable-utils.filters.any-time-label",defaultMessage:[{type:1,value:"days"},{type:0,value:" days"}]},{days:t||void 0}),userFilterLabel:e.formatMessage({id:"processing-center.jobs.user-label",defaultMessage:[{type:0,value:"Email"}]})}),StatusFilter=({entity:t,status:a,setFilterValue:e,filterLabel:n,defaultPlaceholder:i,clearBtnLabel:r})=>{var s="job"===t?["pending","running","complete","cancelled"]:["pending","running","complete","queued","accepted","failed","cancelled","standby_pending","waiting","resuming","aborted","paused"];const[o,l]=react.exports.useState([]),d=useStyles$1()["classes"];var u=useIntl();const m=useDispatch(),{statusFilterLabel:c,allLabel:h,clearButtonLabel:p}=formattedMessages(u);react.exports.useEffect(()=>{l(e=>0===e.length&&null===a||e.length===(null==a?void 0:a.length)?e:a||[])},[a]);return jsxRuntime.exports.jsxs(FormControl,Object.assign({size:"small",className:d.formControl},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",justifyContent:"space-between"}},{children:[jsxRuntime.exports.jsx("label",Object.assign({className:d.label},{children:n||c})),0<o.length&&jsxRuntime.exports.jsx("span",Object.assign({onClick:()=>{l([]),m(e({filter:"status",value:[]}))},className:d.clearButton},{children:r||p}))]})),jsxRuntime.exports.jsx(Select,Object.assign({multiple:!0,displayEmpty:!0,value:o,onChange:e=>{l(e.target.value)},onClose:()=>{m(e({filter:"status",value:o}))},variant:"outlined",renderValue:e=>{var t;return 0===e.length?jsxRuntime.exports.jsx("div",{children:i||h}):(t=e["length"],jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e.join(", "),className:d.title},{children:jsxRuntime.exports.jsx("span",Object.assign({className:d.title},{children:1===t?e[0]:t+" Statuses"}))})))},className:d.selectField,"data-test":t+"s-filter-status-input"},{children:s.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e,"data-test":t+"s-filter-status-input-option","data-value":e},{children:e.replace("_"," ")}),e))}))]}))};var statusFilterJsx=Object.freeze({__proto__:null,StatusFilter:StatusFilter});function buildFormatLongFn(t){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=e.width?String(e.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}function buildLocalizeFn(i){return function(e,t){t="formatting"===(null!=t&&t.context?String(t.context):"standalone")&&i.formattingValues?(n=i.defaultFormattingWidth||i.defaultWidth,a=null!=t&&t.width?String(t.width):n,i.formattingValues[a]||i.formattingValues[n]):(a=i.defaultWidth,n=null!=t&&t.width?String(t.width):i.defaultWidth,i.values[n]||i.values[a]);var a,n=i.argumentCallback?i.argumentCallback(e):e;return t[n]}}function buildMatchFn(r){return function(e){var t,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=a.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],i=e.match(i);return i?(t=i[0],i=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],n=Array.isArray(i)?findIndex(i,function(e){return e.test(t)}):findKey(i,function(e){return e.test(t)}),i=r.valueCallback?r.valueCallback(n):n,{value:i=a.valueCallback?a.valueCallback(i):i,rest:e.slice(t.length)}):null}}function findKey(e,t){for(var a in e)if(e.hasOwnProperty(a)&&t(e[a]))return a}function findIndex(e,t){for(var a=0;a<e.length;a++)if(t(e[a]))return a}function buildMatchPatternFn(i){return function(e){var t,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=e.match(i.matchPattern);return n&&(n=n[0],t=e.match(i.parsePattern))?(t=i.valueCallback?i.valueCallback(t[0]):t[0],{value:t=a.valueCallback?a.valueCallback(t):t,rest:e.slice(n.length)}):null}}var formatDistanceLocale$2={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance$4=function(e,t,a){e=formatDistanceLocale$2[e],e="string"==typeof e?e:1===t?e.one:e.other.replace("{{count}}",t.toString());return null!=a&&a.addSuffix?a.comparison&&0<a.comparison?"in "+e:e+" ago":e},formatDistance$5=formatDistance$4,dateFormats$2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats$2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats$2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$4={date:buildFormatLongFn({formats:dateFormats$2,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$2,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$2,defaultWidth:"full"})},formatLong$5=formatLong$4,formatRelativeLocale$2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative$4=function(e,t,a,n){return formatRelativeLocale$2[e]},formatRelative$5=formatRelative$4,eraValues$2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues$2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues$2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues$2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues$2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues$1={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber$2=function(e,t){var a=Number(e),e=a%100;if(20<e||e<10)switch(e%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},localize$4={ordinalNumber:ordinalNumber$2,era:buildLocalizeFn({values:eraValues$2,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$2,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:buildLocalizeFn({values:monthValues$2,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$2,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$2,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$1,defaultFormattingWidth:"wide"})},localize$5=localize$4,matchOrdinalNumberPattern$2=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern$2=/\d+/i,matchEraPatterns$2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns$2={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns$2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns$2={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns$2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$2={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns$2={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns$2={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns$2={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match$4={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$2,parsePattern:parseOrdinalNumberPattern$2,valueCallback:function(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$2,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$2,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$2,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$2,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$2,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$2,defaultParseWidth:"any"})},match$5=match$4,locale$2={code:"en-US",formatDistance:formatDistance$5,formatLong:formatLong$5,formatRelative:formatRelative$5,localize:localize$5,match:match$4,options:{weekStartsOn:0,firstWeekContainsDate:1}},enUS=locale$2,formatDistanceLocale$1={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},formatDistance$2=function(e,t,a){e=formatDistanceLocale$1[e],e="string"==typeof e?e:1===t?e.one:e.other.replace("{{count}}",t.toString());return null!=a&&a.addSuffix?a.comparison&&0<a.comparison?"en "+e:"hace "+e:e},formatDistance$3=formatDistance$2,dateFormats$1={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},timeFormats$1={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$1={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$2={date:buildFormatLongFn({formats:dateFormats$1,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$1,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$1,defaultWidth:"full"})},formatLong$3=formatLong$2,formatRelativeLocale$1={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},formatRelativeLocalePlural={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},formatRelative$2=function(e,t,a,n){return(1!==t.getUTCHours()?formatRelativeLocalePlural:formatRelativeLocale$1)[e]},formatRelative$3=formatRelative$2,eraValues$1={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},quarterValues$1={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},monthValues$1={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},dayValues$1={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},dayPeriodValues$1={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},ordinalNumber$1=function(e,t){return Number(e)+"º"},localize$2={ordinalNumber:ordinalNumber$1,era:buildLocalizeFn({values:eraValues$1,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$1,defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:buildLocalizeFn({values:monthValues$1,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$1,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$1,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})},localize$3=localize$2,matchOrdinalNumberPattern$1=/^(\d+)(º)?/i,parseOrdinalNumberPattern$1=/\d+/i,matchEraPatterns$1={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},parseEraPatterns$1={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},matchQuarterPatterns$1={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},parseQuarterPatterns$1={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$1={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},parseMonthPatterns$1={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},matchDayPatterns$1={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},parseDayPatterns$1={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},matchDayPeriodPatterns$1={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},parseDayPeriodPatterns$1={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},match$2={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$1,parsePattern:parseOrdinalNumberPattern$1,valueCallback:function(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$1,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$1,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$1,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$1,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$1,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$1,defaultParseWidth:"any"})},match$3=match$2,locale$1={code:"es",formatDistance:formatDistance$3,formatLong:formatLong$3,formatRelative:formatRelative$3,localize:localize$3,match:match$2,options:{weekStartsOn:1,firstWeekContainsDate:1}},es=locale$1,formatDistanceLocale={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},formatDistance=function(e,t,a){e=formatDistanceLocale[e],e="string"==typeof e?e:1===t?e.one:e.other.replace("{{count}}",String(t));return null!=a&&a.addSuffix?a.comparison&&0<a.comparison?"dans "+e:"il y a "+e:e},formatDistance$1=formatDistance,dateFormats={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},timeFormats={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})},formatLong$1=formatLong,formatRelativeLocale={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},formatRelative=function(e,t,a,n){return formatRelativeLocale[e]},formatRelative$1=formatRelative,eraValues={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},quarterValues={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},dayValues={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},dayPeriodValues={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},ordinalNumber=function(e,t){e=Number(e),t=null==t?void 0:t.unit;return 0===e?"0":e+(1===e?t&&["year","week","hour","minute","second"].includes(t)?"ère":"er":"ème")},localize={ordinalNumber:ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide"})},localize$1=localize,matchOrdinalNumberPattern=/^(\d+)(ième|ère|ème|er|e)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},parseEraPatterns={any:[/^av/i,/^ap/i]},matchQuarterPatterns={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},parseDayPatterns={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:function(e){return parseInt(e)}}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})},match$1=match,locale={code:"fr",formatDistance:formatDistance$1,formatLong:formatLong$1,formatRelative:formatRelative$1,localize:localize$1,match:match,options:{weekStartsOn:1,firstWeekContainsDate:4}},fr=locale;const locales={en:enUS,fr:locale,es:es},MAX_NUMBER_OF_DAYS=90,DAY_IN_MS=864e5,toDate=e=>void 0===e?e:new Date(e),DateRangeFilter=({entity:e="jobs",dateTimeFilter:t,setFilterValue:a,locale:n="en",dateRangeLimit:i=MAX_NUMBER_OF_DAYS})=>{const[r,s]=react.exports.useState(!1),[o,l]=react.exports.useState({startDate:toDate(t.fromDateTime),endDate:toDate(t.toDateTime)});var d=useIntl();const u=useDispatch();var m=useStyles$1()["classes"];const c=Math.floor(i);var{okButtonLabel:i,clearButtonLabel:h,dateRangeFilterDefaultValueLabel:p}=formattedMessages(d,c),g=()=>{var e;u(a({filter:"dateTimeFilter",value:{fromDateTime:null==(e=o.startDate)?void 0:e.toISOString(),toDateTime:null==(e=o.endDate)?void 0:e.toISOString(),field:"createdDateTime"}})),s(!1)},x=()=>{u(a({filter:"dateTimeFilter",value:{field:"createdDateTime"}})),l({}),s(!1)},d=t.fromDateTime||t.toDateTime?d.formatDate(t.fromDateTime)+" - "+d.formatDate(t.toDateTime):p;return jsxRuntime.exports.jsxs(FormControl,Object.assign({size:"small",className:m.formControl},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",justifyContent:"space-between"}},{children:[jsxRuntime.exports.jsx("label",Object.assign({htmlFor:e+"-filter-date-range",className:m.label},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"reusable-utils.filter-range-label",defaultMessage:"Date/time",description:"label for the jobs filter date range picker"})})),(t.fromDateTime||t.toDateTime)&&jsxRuntime.exports.jsx("span",Object.assign({className:m.clearButton,onClick:x},{children:h}))]})),jsxRuntime.exports.jsx("div",Object.assign({id:e+"-filter-date-range","data-test":e+"-filter-date-range-display",className:m.dateRangeDisplay,onClick:()=>{l({startDate:toDate(t.fromDateTime),endDate:toDate(t.toDateTime)}),s(!0)}},{children:d})),jsxRuntime.exports.jsxs(Dialog,Object.assign({open:r,disableEscapeKeyDown:!0,onClose:g,maxWidth:"md"},{children:[jsxRuntime.exports.jsx(DialogContent,Object.assign({"data-test":e+"-filter-date-range-dialog-content"},{children:jsxRuntime.exports.jsx(FormControl,Object.assign({variant:"standard"},{children:jsxRuntime.exports.jsx(LocalizationProvider,Object.assign({dateAdapter:AdapterDateFns,adapterLocale:locales[n]},{children:jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,spacing:3},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,md:6,"data-test":e+"-filter-date-range-start-calendar"},{children:jsxRuntime.exports.jsx(CalendarPicker,{date:o.startDate||null,onChange:e=>{const t=e;null!==t&&void 0!==t&&t.setHours(0,0,0,0),l(({endDate:e})=>{e=e||new Date;return t&&e.getTime()>t.getTime()+c*DAY_IN_MS&&e.setTime(t.getTime()+c*DAY_IN_MS),{startDate:t||void 0,endDate:e}})},maxDate:o.endDate||new Date,defaultCalendarMonth:o.startDate})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,md:6,"data-test":e+"-filter-date-range-end-calendar"},{children:jsxRuntime.exports.jsx(CalendarPicker,{date:o.endDate||null,onChange:e=>{const t=e;null!==t&&void 0!==t&&t.setHours(23,59,59),l(e=>Object.assign(Object.assign({},e),{endDate:t||void 0}))},maxDate:new Date,disabled:!o.startDate,defaultCalendarMonth:o.endDate})}))]}))}))}))})),jsxRuntime.exports.jsxs(DialogActions,Object.assign({"data-test":e+"-filter-date-range-dialog-actions"},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":e+"-filter-date-range-dialog-clear-button",onClick:x},{children:h})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":e+"-filter-date-range-dialog-ok-button",onClick:g},{children:i}))]}))]}))]}))};var dateRangeFilterJsx=Object.freeze({__proto__:null,DateRangeFilter:DateRangeFilter});const TableDebugMenu=e=>{const[t,a]=react.exports.useState(!0);var n=e=>jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:1,justifyContent:"space-between"},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{width:"50%"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({sx:{fontWeight:"bold"}},{children:null==e?void 0:e.label})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:null==e?void 0:e.description}))]})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{display:"grid",placeItems:"center",fontSize:"20px",fontWeight:"bold",color:"#0c53b0"}},{children:null==e?void 0:e.value}))]}));return jsxRuntime.exports.jsx(Box,Object.assign({sx:{position:"absolute",bottom:"0",right:"0",border:"2px solid #d7d7d7",margin:"25px",marginTop:"0",marginRight:"50px",boxSizing:"border-box",background:"#fff",borderRadius:"10px",boxShadow:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,rgba(0, 0, 0, 0.06) 0px 0px 0px 1px",display:"flex",flexDirection:"column",padding:"10px 30px"}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({width:"100%",spacing:2,divider:jsxRuntime.exports.jsx(Divider,{})},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",sx:{gap:"10px"},pt:"10px",pb:"10px",justifyContent:"space-between"},{children:[jsxRuntime.exports.jsx(()=>jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{alignItems:"center",background:"#e9f3fd",padding:"5px",borderRadius:"7px",color:"#0b53b0",gap:"5px",paddingRight:"10px"},direction:"row"},{children:[jsxRuntime.exports.jsx(TableView,{}),jsxRuntime.exports.jsx(Typography,Object.assign({align:"center",variant:"h2"},{children:"TableInfiniteScroll"}))]})),{}),jsxRuntime.exports.jsx(LoadingButton,Object.assign({variant:"outlined",onClick:null==e?void 0:e.fetchMore,loading:null==e?void 0:e.isLoading},{children:"Fetch More Items"})),jsxRuntime.exports.jsx(()=>jsxRuntime.exports.jsxs(Box,Object.assign({onClick:()=>a(e=>!e),sx:{width:"40px",display:"grid",placeItems:"center",color:"gray","&:hover":{background:"#f7f7f7",cursor:"pointer",borderRadius:"5px",color:"black"}}},{children:[!t&&jsxRuntime.exports.jsx(ExpandLess,{}),t&&jsxRuntime.exports.jsx(ExpandMore,{})]})),{})]})),t&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(n,{label:"isLoading",value:null!=e&&e.isLoading?jsxRuntime.exports.jsx(Typography,Object.assign({color:"green"},{children:"Loading More"})):"false"}),jsxRuntime.exports.jsx(n,{label:"hasMore",description:"Are there more items to fetch from the server?",value:null!=e&&e.hasMore?"true":"false"}),jsxRuntime.exports.jsx(n,{label:"offset",description:"This is the next GraphQL page starting offset",value:null==e?void 0:e.offset}),jsxRuntime.exports.jsx(n,{label:"items.length",description:"Total amount of items fetched",value:null==e?void 0:e.items.length}),jsxRuntime.exports.jsx(n,{label:"itemHeight",description:"This is the Pixel height of each row",value:`${null==e?void 0:e.itemHeight}px`}),jsxRuntime.exports.jsx(n,{label:"Header Component",description:"Is a component passed as a header?",value:null!=e&&e.hasHeader?"true":"false"}),(null==e?void 0:e.hasHeader)&&jsxRuntime.exports.jsx(n,{label:"adjustTableHeight",description:"If including a header, you need to adjust the container height with this prop.",value:`${null==e?void 0:e.adjustTableHeight}px`}),!(null==e||!e.adjustTableWidth)&&jsxRuntime.exports.jsx(n,{label:"adjustTableWidth",description:"You can adjust the container width with this prop.",value:`${null==e?void 0:e.adjustTableWidth}px`})]})]}))}))},TableLoadingState=({itemHeight:a,LoadingComponent:n})=>{const t={overflow:"hidden",width:"100%"},i=({containerHeight:e})=>{e=Math.ceil(e/a);return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:new Array(e).fill(null).map((e,t)=>jsxRuntime.exports.jsx(TableRowLoader,{LoadingComponent:n,height:a},t))})};return jsxRuntime.exports.jsx(Grid,Object.assign({sx:{position:"relative",height:"99%",overflow:"hidden"}},{children:jsxRuntime.exports.jsx(AutoSizer,Object.assign({style:{height:"auto",width:"auto"}},{children:({height:e})=>jsxRuntime.exports.jsx(Box,Object.assign({sx:Object.assign(Object.assign({},t),{height:e})},{children:jsxRuntime.exports.jsx(i,{containerHeight:e})}))}))}))},TableRowLoader=({height:e,LoadingComponent:t})=>{return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{height:e,display:"grid",placeItems:"center",overflow:"hidden"}},{children:[!t&&jsxRuntime.exports.jsx(Skeleton,{animation:"wave",sx:{transform:"none"},width:"99.5%",height:"90%"}),t&&jsxRuntime.exports.jsx(t,{})]}))};var img="data:image/svg+xml,%3csvg width='275' height='275' viewBox='0 0 275 275' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3ccircle cx='137.5' cy='137.5' r='127.5' fill='white' stroke='%23F9F9F9' stroke-width='20'/%3e %3cpath d='M181 134.5L138.5 120.5V170L181 134.5Z' fill='%23FE8D00'/%3e %3cpath d='M138.5 120.5L94.5 135L138.5 170.5V120.5Z' fill='%23FD9F00'/%3e %3cpath d='M137.5 204V149L181.5 134.5V188.5L137.5 204Z' fill='%23FDC000'/%3e %3cpath d='M137.5 149L94.5 134.5V188.5L137.5 204V149Z' fill='%23FDB200'/%3e %3cpath d='M121.5 171L137 149L94.5 146V167L121.5 171Z' fill='%23FE8D00'/%3e %3cpath d='M159.5 163L137.5 149L181 134.5L200.5 148.5L159.5 163Z' fill='%23FEECB2'/%3e %3cpath d='M116 162.5L137.5 149L94.5 135L74 148L116 162.5Z' fill='%23FED966'/%3e %3cpath d='M159 107L138.5 120.5L181 134.5L202.5 122L159 107Z' fill='%23FDC000'/%3e %3cpath d='M75 121.5L94.5 135L138.5 120.5L118 107L75 121.5Z' fill='%23FEECB2'/%3e %3cpath d='M136.598 140.5C129.265 137.5 117.398 129.4 128.598 121C142.598 110.5 146.598 105.5 143.598 99.5C140.598 93.5 131.098 96 132.598 104C134.098 112 144.598 119 155.598 111.5C166.598 104 166.598 81 148.598 73' stroke='%23B9D1E1' stroke-dasharray='2 2'/%3e %3cpath d='M152.5 72.5C152.5 72.7215 152.381 72.9602 152.114 73.1607C151.847 73.3612 151.455 73.5 151 73.5C150.545 73.5 150.153 73.3612 149.886 73.1607C149.619 72.9602 149.5 72.7215 149.5 72.5C149.5 72.2785 149.619 72.0398 149.886 71.8393C150.153 71.6388 150.545 71.5 151 71.5C151.455 71.5 151.847 71.6388 152.114 71.8393C152.381 72.0398 152.5 72.2785 152.5 72.5Z' stroke='%23839DAE'/%3e %3ccircle cx='148.5' cy='72.5' r='1.5' fill='%23B9D1E1'/%3e%3cpath d='M150.5 75C150.5 75.4546 150.361 75.8468 150.161 76.1142C149.96 76.3814 149.722 76.5 149.5 76.5C149.278 76.5 149.04 76.3814 148.839 76.1142C148.639 75.8468 148.5 75.4546 148.5 75C148.5 74.5454 148.639 74.1532 148.839 73.8858C149.04 73.6186 149.278 73.5 149.5 73.5C149.722 73.5 149.96 73.6186 150.161 73.8858C150.361 74.1532 150.5 74.5454 150.5 75Z' stroke='%23839DAE'/%3e%3c/svg%3e";const TableEmptyState=({EmptyStateComponent:e,CustomMessage:t})=>{return e?jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:e}):jsxRuntime.exports.jsx(Grid,Object.assign({sx:{position:"relative",height:"99%",overflow:"hidden"}},{children:jsxRuntime.exports.jsx(Box,Object.assign({sx:Object.assign({},{overflow:"hidden",width:"100%",display:"flex",justifyContent:"center",marginTop:"80px"})},{children:jsxRuntime.exports.jsx(()=>{var e=t?jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:t}):jsxRuntime.exports.jsx(FormattedMessage,{id:"shared-utils.table-infinite-scroll.empty-state-message",defaultMessage:"No items found",description:"Table empty state, nothing found message"});return jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:2,display:"flex",alignItems:"center"},{children:[jsxRuntime.exports.jsx("img",{width:"270px",draggable:"false",src:img,alt:"empty state image"}),jsxRuntime.exports.jsx(Typography,Object.assign({component:"div",fontWeight:"strong"},{children:e}))]}))},{})}))}))},TableErrorState=({ErrorStateComponent:e,CustomMessage:t,onRetry:a})=>{const n={overflow:"hidden",width:"100%",display:"grid",placeItems:"center"};if(e)return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:e});const i=()=>{var e=t?jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:t}):jsxRuntime.exports.jsx(FormattedMessage,{id:"shared-utils.table-infinite-scroll.error-state-message",defaultMessage:"Error Loading Items",description:"Table error state, unable to load items message"});return jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:2,display:"flex",alignItems:"center"},{children:[jsxRuntime.exports.jsx(AlarmTwo,{fontSize:"large"}),jsxRuntime.exports.jsx(Typography,Object.assign({fontWeight:"strong"},{children:e})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:a,variant:"contained"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"shared-utils.table-infinite-scroll.error-state-button",defaultMessage:"Retry",description:"Table error state, retry button"})}))]}))};return jsxRuntime.exports.jsx(Grid,Object.assign({sx:{position:"relative",height:"99%",overflow:"hidden"}},{children:jsxRuntime.exports.jsx(AutoSizer,Object.assign({style:{height:"auto",width:"auto"}},{children:({height:e})=>jsxRuntime.exports.jsx(Box,Object.assign({sx:Object.assign(Object.assign({},n),{height:e})},{children:jsxRuntime.exports.jsx(i,{})}))}))}))},TableInfiniteScroll=({hasMore:t,fetchMore:e,fetchOnMount:a=!1,offset:n,adjustTableHeight:i=0,adjustTableWidth:r=0,items:s,itemHeight:o,isLoading:l,error:d,onRetry:u,TableRowComponent:m,TableEmptyStateComponent:c,TableErrorStateComponent:h,TableHeaderComponent:p,TableRowLoadingComponent:g,sx:x={},testId:f="",showDebug:b=!1,FixedSizeListProps:j={},AutoSizerProps:v={},InfiniteLoaderProps:y={},ContainerProps:w={},RowContainerProps:S={},threshold:M=15,className:R="",MessageEmptyState:P,MessageErrorState:C})=>{const F=react.exports.useRef(null),[L,$]=react.exports.useState(null!=j&&j.initialScrollOffset?null==j?void 0:j.initialScrollOffset:0),D=t?s.length+1:s.length,O=e=>!t||e<s.length,T=()=>{l||e()};const E=debounce_1(e=>{$(e)},500),W=({index:e,style:t,isScrolling:a})=>{var n=s[e];return O(e)?jsxRuntime.exports.jsx(Box,Object.assign({"data-testid":"sdk-table-infinite-scroller-row-"+(e+1),style:t},S,{children:jsxRuntime.exports.jsx(m,{item:n,index:e,isScrolling:a})}),e):jsxRuntime.exports.jsx(Box,Object.assign({"data-testid":"sdk-table-infinite-scroller-row-loading-"+(e+1),style:t},S,{children:jsxRuntime.exports.jsx(TableRowLoader,{height:o,LoadingComponent:g})}))};return react.exports.useEffect(()=>{a&&e()},[]),react.exports.useEffect(()=>{const t=L;setTimeout(()=>{var e;return F&&(null==(e=F.current)?void 0:e._listRef.scrollToItem(t,"start"))},0)},[o]),d?jsxRuntime.exports.jsx(TableErrorState,{ErrorStateComponent:h,onRetry:()=>{(u||e)()},CustomMessage:C}):l&&!d&&0===s.length?jsxRuntime.exports.jsx(TableLoadingState,{itemHeight:o,LoadingComponent:g}):l||d||0!==s.length?jsxRuntime.exports.jsxs(Grid,Object.assign({"data-testid":f||"sdk-table-infinite-scroll-container",sx:Object.assign({position:"relative",height:"100%",overflow:"hidden"},x),className:R},w,{children:[p&&jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:p}),jsxRuntime.exports.jsx(AutoSizer,Object.assign({},v,{children:({height:a,width:n})=>jsxRuntime.exports.jsx(InfiniteLoader,Object.assign({ref:F,isItemLoaded:O,itemCount:D,loadMoreItems:T,threshold:M},y,{children:({onItemsRendered:t,ref:e})=>jsxRuntime.exports.jsx(FixedSizeList,Object.assign({ref:e,height:a+i,width:n+r,itemCount:s.length,itemSize:o,onItemsRendered:e=>{t(e),e=e.visibleStartIndex,l||E(e)},initialScrollOffset:0},j,{children:W}))}))})),b&&jsxRuntime.exports.jsx(TableDebugMenu,{adjustTableHeight:i,adjustTableWidth:r,hasMore:t,hasHeader:!!p,isLoading:l,items:s,itemHeight:o,fetchMore:e,offset:n})]})):jsxRuntime.exports.jsx(TableEmptyState,{EmptyStateComponent:c,CustomMessage:P})};var ELoadingStatus,tableInfiniteScrollJsx=Object.freeze({__proto__:null,TableInfiniteScroll:TableInfiniteScroll});!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending",e.Complete="complete"}(ELoadingStatus=ELoadingStatus||{});const useStyles=makeStyles()((e,t,a)=>({engineIconContainer:{background:"#EEF3F9",padding:"3px",borderRadius:"5px",marginRight:"3px",maxWidth:"20px",maxHeight:"20px",verticalAlign:"middle",display:"flex"},iconWrapper:{position:"relative",["&:hover > ."+a.enginesList]:{display:"block !important"},display:"flex",alignItems:"center"},tooltipCatName:{color:"white",paddingLeft:"5px",fontWeight:"900"},engineIcon:{width:"14px",height:"14px"},enginesList:{background:"rgba(0,0,0,.75)",padding:e.spacing(.6),borderRadius:"5px",marginRight:e.spacing(.6),position:"absolute",top:20,left:0,display:"none",zIndex:"999"},tooltipDivider:{marginTop:"3px"},enginesUL:{padding:"0 7px 0 20px",margin:"3px 0 !important",color:"white",overflow:"hidden",whiteSpace:"nowrap","& *":{color:"white"}},tooltipIcon:{fill:"white",width:"12px",height:"12px"},tooltipCatIconWrapper:{display:"flex",alignItems:"center",paddingLeft:"3px"},moreDivider:{borderTop:"2px solid white",marginBottom:"9px",marginTop:"6px"},moreIcon:{width:"12px",height:"12px"}})),engineIconHelper=e=>void 0!==e&&e?EngineCategoryIcons[e]:null,getCat=e=>{return null==(e=null==(e=null==(e=null==e?void 0:e.engine)?void 0:e.category)?void 0:e.name)?void 0:e.replace(/[^a-zA-Z]/g,"")},getTooltip=(e,t,a)=>t.length?jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:a.tooltipCatIconWrapper},{children:[jsxRuntime.exports.jsx(Icon,{component:engineIconHelper(e),className:a.tooltipIcon}),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:a.tooltipCatName},{children:e}))]})),jsxRuntime.exports.jsx(Divider,{className:a.tooltipDivider}),jsxRuntime.exports.jsx("ul",Object.assign({className:a.enginesUL},{children:t.map(e=>jsxRuntime.exports.jsx("li",{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:e}))},e))}))]}):null,EngineIconsRenderer=({tasks:e,iconsToRender:n=3,showMore:i=!1})=>{const a=useStyles()["classes"];e=e.filter(e=>{e=getCat(e);return engineIconHelper(e)});const r={},s={};return e&&e.forEach(e=>{var t,a=getCat(e);Object.keys(r).length<n?(a&&!r[a]&&(r[a]=[]),a&&null!=(t=null==e?void 0:e.engine)&&t.name&&r[a].push(null==(t=null==e?void 0:e.engine)?void 0:t.name)):i&&(a&&!s[a]&&(s[a]=[]),a)&&null!=(t=null==e?void 0:e.engine)&&t.name&&s[a].push(null==(t=null==e?void 0:e.engine)?void 0:t.name)}),jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[Object.keys(r).map(e=>jsxRuntime.exports.jsx(Box,Object.assign({className:a.engineIconContainer},{children:jsxRuntime.exports.jsxs(Box,Object.assign({className:a.iconWrapper},{children:[jsxRuntime.exports.jsx(Icon,{component:engineIconHelper(e),className:a.engineIcon},e),jsxRuntime.exports.jsx(Box,Object.assign({className:a.enginesList},{children:getTooltip(e,r[e],a)}))]}))}),e)),0<Object.keys(s).length&&jsxRuntime.exports.jsxs(Box,Object.assign({className:a.iconWrapper},{children:[jsxRuntime.exports.jsx(MoreHor,{className:a.moreIcon}),jsxRuntime.exports.jsx(Box,Object.assign({className:a.enginesList},{children:Object.keys(s).map((e,t)=>jsxRuntime.exports.jsxs(Box,{children:[getTooltip(e,s[e],a),t<Object.keys(s).length-1&&jsxRuntime.exports.jsx(Divider,{className:a.moreDivider})]},e+"-"+t))}))]}))]})},generateSagas=e=>{function*t(e){if(!d.create)throw new Error("No apiCalls.create was defined for this redux saga");try{var t=yield select(selectApiConfigs),a=d.getAdditionalSelectors?d.getAdditionalSelectors():{};for(const r of Object.keys(a)){var n=yield select(a[r]);r,n}var i=yield call(d.create,{apiConfigs:t,itemToCreate:e.payload});yield put(o.actions.createSucceeded(i))}catch(e){yield put(o.actions.createFailed(null))}}function*a(){if(!d.read)throw new Error("No apiCalls.read was defined for this redux saga");try{var e=yield select(selectApiConfigs),t=yield select(l.selectOffset),a=d.getAdditionalSelectors?d.getAdditionalSelectors():{},n={};for(const s of Object.keys(a)){var i=yield select(a[s]);n[s]=i}var r=yield call(d.read,{apiConfigs:e,offset:t,limit:u,additionalSelectors:n});yield put(o.actions.readSucceeded(r)),r.length===u?yield put(o.actions.setHasMore(!0)):yield put(o.actions.setHasMore(!1)),yield put(o.actions.setOffset(t+u))}catch(e){yield put(o.actions.readFailed(null))}}function*n(e){if(!d.update)throw new Error("No apiCalls.update was defined for this redux saga");try{var t=yield select(selectApiConfigs),a=d.getAdditionalSelectors?d.getAdditionalSelectors():{};for(const r of Object.keys(a)){var n=yield select(a[r]);r,n}var i=yield call(d.update,{apiConfigs:t,itemToUpdate:e.payload});yield put(o.actions.updateSucceeded(i))}catch(e){yield put(o.actions.updateFailed(null))}}function*i(e){if(!d.delete)throw new Error("No apiCalls.delete was defined for this redux saga");try{var t=yield select(selectApiConfigs),a=d.getAdditionalSelectors?d.getAdditionalSelectors():{};for(const r of Object.keys(a)){var n=yield select(a[r]);r,n}var i=yield call(d.delete,{apiConfigs:t,itemToDelete:e.payload});yield put(o.actions.deleteSucceeded(i))}catch(e){yield put(o.actions.deleteFailed(null))}}const{slice:o,selectors:l,apiCalls:d}=e,u=d.pageSize||30;return{watchCreate:function*(){yield takeEvery$1(o.actions.createStart,t)},watchRead:function*(){yield takeEvery$1(o.actions.readStart,a)},watchUpdate:function*(){yield takeEvery$1(o.actions.updateStart,n)},watchDelete:function*(){yield takeEvery$1(o.actions.deleteStart,i)}}},generateSelectors=({namespace:t,sliceName:a})=>{return{selectHasMore:e=>e[a][t].hasMore,selectItems:e=>e[a][t].items,selectOffset:e=>e[a][t].currentOffset,selectCreateStatus:e=>e[a][t].createStatus,selectReadStatus:e=>e[a][t].readStatus,selectUpdateStatus:e=>e[a][t].updateStatus,selectDeleteStatus:e=>e[a][t].deleteStatus}},generateSlice=e=>{const{sliceName:t,namespace:a,dedupeResponse:n}=e,i=e.dedupeIdProp||"id";e={createStatus:ELoadingStatus.Idle,readStatus:ELoadingStatus.Idle,updateStatus:ELoadingStatus.Idle,deleteStatus:ELoadingStatus.Idle,currentOffset:0,hasMore:!0,items:[]};return{slice:createSlice({name:t+"/"+a,initialState:e,reducers:{createStart(e,t){e.createStatus=ELoadingStatus.Pending},createSucceeded(e,t){e.items.push(t.payload),e.createStatus=ELoadingStatus.Idle},createFailed(e){e.createStatus=ELoadingStatus.Failed},readStart(e){e.readStatus=ELoadingStatus.Pending},readSucceeded(a,e){e.payload.forEach(t=>{var e;!n||-1===(e=a.items.findIndex(e=>t[i]===e[i]))?a.items.push(t):a.items[e]=t}),a.readStatus=ELoadingStatus.Idle},readFailed(e){e.readStatus=ELoadingStatus.Failed},updateStart(e,t){e.updateStatus=ELoadingStatus.Pending},updateSucceeded(e,t){var a=e.items.findIndex(e=>t.payload[i]===e[i]);-1!==a?e.items[a]=t.payload:console.warn("Couldn't replace existing item with updated version in redux state",t.payload),e.updateStatus=ELoadingStatus.Idle},updateFailed(e){e.updateStatus=ELoadingStatus.Failed},deleteStart(e,t){e.deleteStatus=ELoadingStatus.Pending},deleteSucceeded(e,t){var a=e.items.findIndex(e=>t.payload[i]===e[i]);-1!==a?e.items.splice(a,1):console.warn("Couldn't remove deleted item from redux state",t.payload),e.deleteStatus=ELoadingStatus.Idle},deleteFailed(e){e.deleteStatus=ELoadingStatus.Failed},setHasMore(e,t){e.hasMore=t.payload},setOffset(e,t){e.currentOffset=t.payload},resetList(e){e.items=[],e.currentOffset=0,e.hasMore=!0}}}),initialState:e}},generateState=e=>{var{sliceName:e,namespace:t,dedupeResponse:a,dedupeIdProp:n,apiCalls:i}=e,{slice:a,initialState:n}=generateSlice({sliceName:e,namespace:t,dedupeResponse:a,dedupeIdProp:n}),t=generateSelectors({namespace:t,sliceName:e});return{slice:a,selectors:t,sagas:generateSagas({slice:a,selectors:t,apiCalls:i}),initialState:n}},enginesFilter={api:enginesFilterApi,jsx:enginesFilterJsx,helpers:enginesFilterHelpers},statusFilter={jsx:statusFilterJsx},dateRangeFilter={jsx:dateRangeFilterJsx},tableInfiniteScroll={jsx:tableInfiniteScrollJsx};export{EngineIconsRenderer as E,dateRangeFilter as a,ELoadingStatus as b,debounce_1 as d,enginesFilter as e,generateState as g,statusFilter as s,tableInfiniteScroll as t};
|
|
1
|
+
import{bZ as createSvgIcon,j as jsxRuntime,dy as isObject_1,d4 as toNumber_1,z as createSvgIcon$1,C as interopRequireDefault,m as makeStyles,B as Box,bG as Icon,fu as MoreHor,a7 as Divider,ez as takeEvery$1,H as createSlice,fp as EngineCategoryIcons,T as Typography,ag as select,fe as selectApiConfigs,ai as call,af as put,c$ as useIntl,r as react,v as FormControl,F as FormattedMessage,aS as Select,i as useDispatch,az as Dialog,aB as DialogContent,G as Grid,aC as DialogActions,ar as Button,cy as baseGraphQLApiWithError,aT as MenuItem,a8 as Tooltip,ca as Stack,L as LoadingButton,ac as Skeleton,eN as AlarmTwo}from"./js-core.esm.js";import{L as LocalizationProvider,A as AdapterDateFns,C as CalendarPicker}from"./js-core.esm23.js";import{A as AutoSizer,I as InfiniteLoader}from"./js-core.esm50.js";import{F as FixedSizeList}from"./js-core.esm32.js";import{n as now_1}from"./js-core.esm56.js";import{L as ListSubheader}from"./js-core.esm34.js";var ExpandLess=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),ExpandMore=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),TableView=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M19 7H9c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm0 2v2H9V9h10zm-6 6v-2h2v2h-2zm2 2v2h-2v-2h2zm-4-2H9v-2h2v2zm6-2h2v2h-2v-2zm-8 4h2v2H9v-2zm8 2v-2h2v2h-2zM6 17H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2v1h-2V5H5v10h1v2z"}),"TableView"),isObject=isObject_1,now=now_1,toNumber=toNumber_1,FUNC_ERROR_TEXT="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce(n,a,e){var i,s,r,o,l,d,u=0,m=!1,c=!1,t=!0;if("function"!=typeof n)throw new TypeError(FUNC_ERROR_TEXT);function h(e){var t=i,a=s;return i=s=void 0,u=e,o=n.apply(a,t)}function p(e){var t=e-d;return void 0===d||a<=t||t<0||c&&r<=e-u}function g(){var e,t=now();if(p(t))return x(t);l=setTimeout(g,(e=a-((t=t)-d),c?nativeMin(e,r-(t-u)):e))}function x(e){return l=void 0,t&&i?h(e):(i=s=void 0,o)}function f(){var e=now(),t=p(e);if(i=arguments,s=this,d=e,t){if(void 0===l)return u=e=d,l=setTimeout(g,a),m?h(e):o;if(c)return clearTimeout(l),l=setTimeout(g,a),h(d)}return void 0===l&&(l=setTimeout(g,a)),o}return a=toNumber(a)||0,isObject(e)&&(m=!!e.leading,c="maxWait"in e,r=c?nativeMax(toNumber(e.maxWait)||0,a):r,t="trailing"in e?!!e.trailing:t),f.cancel=function(){void 0!==l&&clearTimeout(l),i=d=s=l=void(u=0)},f.flush=function(){return void 0===l?o:x(now())},f}var debounce_1=debounce,SettingsApplications={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(SettingsApplications,"__esModule",{value:!0}),SettingsApplications.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon$1),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z"}),"SettingsApplications");function __awaiter(e,r,o,l){return new(o=o||Promise)(function(a,t){function n(e){try{s(l.next(e))}catch(e){t(e)}}function i(e){try{s(l.throw(e))}catch(e){t(e)}}function s(e){var t;e.done?a(e.value):((t=e.value)instanceof o?t:new o(function(e){e(t)})).then(n,i)}s((l=l.apply(e,r||[])).next())})}function getEngines(n,i,s){return __awaiter(this,void 0,void 0,function*(){var e="getEngines",t="engines",a={edgeVersion:i},a=(s&&(a.state=s),yield baseGraphQLApiWithError(Object.assign({query:"\n query getEngines ($state: [EngineState], $edgeVersion: Int) {\n engines(\n offset: 0,\n limit: 500,\n state: $state,\n edgeVersion: $edgeVersion\n ) {\n count\n records {\n id\n name\n categoryId\n edgeVersion\n }\n }\n }\n ",variables:a,operationName:e},n)));return a[t]})}function getEngineCategories(a){return __awaiter(this,void 0,void 0,function*(){var e="getEngineCategories",t="engineCategories",e=yield baseGraphQLApiWithError(Object.assign({query:"\n query getEngineCategories {\n engineCategories(offset: 0, limit: 200) {\n count\n records {\n id\n name\n description\n }\n }\n }\n ",operationName:e},a));return e[t].records=e[t].records.map(e=>Object.assign(Object.assign({},e),{iconName:e.name.replace(/[^a-zA-Z]/g,"")})),e[t]})}var default_1=SettingsApplications.default=_default,enginesFilterApi=Object.freeze({__proto__:null,getEngines:getEngines,getEngineCategories:getEngineCategories});const useStyles$1=makeStyles()(e=>({dateRangeDisplay:{display:"flex",alignItems:"center",justifyContent:"start",fontWeight:400,fontSize:"10px",lineHeight:"16px",border:"1px solid #D5DFE9",borderRadius:"5px",padding:"0px 7px",boxSizing:"border-box",minWidth:"120px",minHeight:"28px",cursor:"pointer"},menuItem:{marginLeft:"25px"},subheader:{fontWeight:"bold"},tooltipList:{margin:0,padding:0,listStyle:"none"},formControl:{marginRight:"12px"},label:{fontWeight:700,fontSize:14,color:"#2A323C",marginBottom:0,display:"flex",justifyContent:"space-between"},selectField:{width:150,height:28,fontSize:"10px",lineHeight:"16px",fontWeight:400},title:{textTransform:"capitalize"},clearButton:{color:"#0C53B0",cursor:"pointer",fontWeight:"400",fontSize:"14px"},field:{width:150},clearBtn:{color:"#0C53B0",cursor:"pointer",fontWeight:400}})),muiSelectStyleOverrides={height:"28px",fontSize:"0.8em","& fieldset":{borderColor:"#D5DFE9",borderWidth:"2px",borderRadius:"6px"},"&:hover":{"&& fieldset":{borderColor:"rgba(42,50,60,0.5)"}}},AiEngineFilter=({id:e,label:t,items:a,selectedValue:n,onChange:i,engineList:s,entity:r="jobs"})=>{const o=useStyles$1()["classes"];var l=useIntl();const d={engine:l.formatMessage({id:"reusable-utils.engine-label",defaultMessage:[{type:0,value:"Engine"}]}),engines:l.formatMessage({id:"reusable-utils.engines-label",defaultMessage:[{type:0,value:"Engines"}]})},u=react.exports.useCallback(e=>{var e=e["target"]["value"];i&&i("string"==typeof e?e.split(","):e)},[i]);const m=()=>jsxRuntime.exports.jsx("ul",Object.assign({className:o.tooltipList},{children:n.map(e=>jsxRuntime.exports.jsx("li",{children:s[e].name}))}));return jsxRuntime.exports.jsxs(FormControl,Object.assign({size:"small",className:o.formControl},{children:[jsxRuntime.exports.jsxs("label",Object.assign({htmlFor:e,className:o.label},{children:[t," ",0<n.length&&jsxRuntime.exports.jsx("span",Object.assign({onClick:()=>{u({target:{value:[]}})},className:o.clearBtn},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"shared-ai-search-results-filter-input-clear-button",defaultMessage:"Clear",description:"Search Filter input Clear butoon"})}))]})),jsxRuntime.exports.jsx(Select,Object.assign({id:e,"data-test":r+"-engines-select",sx:muiSelectStyleOverrides,variant:"outlined",value:n,multiple:!0,displayEmpty:!0,className:o.field,onChange:u,renderValue:e=>{return 0===e.length?jsxRuntime.exports.jsx("div",{children:"All"}):(e=e["length"],jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(m,{})},{children:jsxRuntime.exports.jsxs("span",Object.assign({style:{display:"flex",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(default_1,{sx:{fontSize:"16px",fill:"#555F7C",marginRight:"3px"}})," ",e," ",1<e?d.engines:d.engine]}))})))},MenuProps:{sx:{maxHeight:"50vh"},className:"aiware-el"}},{children:a.map(e=>{return t=(e=e).engines.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({className:o.menuItem,value:e.engineId,"data-testid":`processing-center.${r}.engine-filter-option-`+e.engineId},{children:e.engineName}),e.engineId)),[jsxRuntime.exports.jsx(ListSubheader,Object.assign({className:o.subheader},{children:e.categoryName})),t];var t})}))]}))};var enginesFilterJsx=Object.freeze({__proto__:null,AiEngineFilter:AiEngineFilter});const engineListItems=(e,t,n,i)=>e.map((a,e)=>({categoryName:t[a].name,id:t[a].id,engines:n.filter((e,t)=>{if(i[e].categoryId===a)return e}).map((e,t)=>({engineId:i[e].id,engineName:i[e].name}))}));var enginesFilterHelpers=Object.freeze({__proto__:null,engineListItems:engineListItems});const formattedMessages=(e,t)=>({clearButtonLabel:e.formatMessage({id:"reusable-utils.filters.clear-button-label",defaultMessage:[{type:0,value:"Clear"}]}),statusFilterLabel:e.formatMessage({id:"reusable-utils.filters.status-label",defaultMessage:[{type:0,value:"Status"}]}),allLabel:e.formatMessage({id:"reusable-utils.filters.all-placeholder",defaultMessage:[{type:0,value:"All"}]}),okButtonLabel:e.formatMessage({id:"reusable-utils.filters.ok-button-label",defaultMessage:[{type:0,value:"OK"}]}),dateRangeFilterDefaultValueLabel:e.formatMessage({id:"reusable-utils.filters.any-time-label",defaultMessage:[{type:1,value:"days"},{type:0,value:" days"}]},{days:t||void 0}),userFilterLabel:e.formatMessage({id:"processing-center.jobs.user-label",defaultMessage:[{type:0,value:"Email"}]})}),StatusFilter=({entity:t,status:a,setFilterValue:e,filterLabel:n,defaultPlaceholder:i,clearBtnLabel:s})=>{var r="job"===t?["pending","running","complete","cancelled"]:["pending","running","complete","queued","accepted","failed","cancelled","standby_pending","waiting","resuming","aborted","paused"];const[o,l]=react.exports.useState([]),d=useStyles$1()["classes"];var u=useIntl();const m=useDispatch(),{statusFilterLabel:c,allLabel:h,clearButtonLabel:p}=formattedMessages(u);react.exports.useEffect(()=>{l(e=>0===e.length&&null===a||e.length===(null==a?void 0:a.length)?e:a||[])},[a]);return jsxRuntime.exports.jsxs(FormControl,Object.assign({size:"small",className:d.formControl},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",justifyContent:"space-between"}},{children:[jsxRuntime.exports.jsx("label",Object.assign({className:d.label},{children:n||c})),0<o.length&&jsxRuntime.exports.jsx("span",Object.assign({onClick:()=>{l([]),m(e({filter:"status",value:[]}))},className:d.clearButton},{children:s||p}))]})),jsxRuntime.exports.jsx(Select,Object.assign({multiple:!0,displayEmpty:!0,value:o,onChange:e=>{l(e.target.value)},onClose:()=>{m(e({filter:"status",value:o}))},variant:"outlined",renderValue:e=>{var t;return 0===e.length?jsxRuntime.exports.jsx("div",{children:i||h}):(t=e["length"],jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e.join(", "),className:d.title},{children:jsxRuntime.exports.jsx("span",Object.assign({className:d.title},{children:1===t?e[0]:t+" Statuses"}))})))},className:d.selectField,"data-test":t+"s-filter-status-input"},{children:r.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e,"data-test":t+"s-filter-status-input-option","data-value":e},{children:e.replace("_"," ")}),e))}))]}))};var statusFilterJsx=Object.freeze({__proto__:null,StatusFilter:StatusFilter});function buildFormatLongFn(t){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=e.width?String(e.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}function buildLocalizeFn(i){return function(e,t){t="formatting"===(null!=t&&t.context?String(t.context):"standalone")&&i.formattingValues?(n=i.defaultFormattingWidth||i.defaultWidth,a=null!=t&&t.width?String(t.width):n,i.formattingValues[a]||i.formattingValues[n]):(a=i.defaultWidth,n=null!=t&&t.width?String(t.width):i.defaultWidth,i.values[n]||i.values[a]);var a,n=i.argumentCallback?i.argumentCallback(e):e;return t[n]}}function buildMatchFn(s){return function(e){var t,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=a.width,i=n&&s.matchPatterns[n]||s.matchPatterns[s.defaultMatchWidth],i=e.match(i);return i?(t=i[0],i=n&&s.parsePatterns[n]||s.parsePatterns[s.defaultParseWidth],n=Array.isArray(i)?findIndex(i,function(e){return e.test(t)}):findKey(i,function(e){return e.test(t)}),i=s.valueCallback?s.valueCallback(n):n,{value:i=a.valueCallback?a.valueCallback(i):i,rest:e.slice(t.length)}):null}}function findKey(e,t){for(var a in e)if(e.hasOwnProperty(a)&&t(e[a]))return a}function findIndex(e,t){for(var a=0;a<e.length;a++)if(t(e[a]))return a}function buildMatchPatternFn(i){return function(e){var t,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=e.match(i.matchPattern);return n&&(n=n[0],t=e.match(i.parsePattern))?(t=i.valueCallback?i.valueCallback(t[0]):t[0],{value:t=a.valueCallback?a.valueCallback(t):t,rest:e.slice(n.length)}):null}}var formatDistanceLocale$2={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance$4=function(e,t,a){e=formatDistanceLocale$2[e],e="string"==typeof e?e:1===t?e.one:e.other.replace("{{count}}",t.toString());return null!=a&&a.addSuffix?a.comparison&&0<a.comparison?"in "+e:e+" ago":e},formatDistance$5=formatDistance$4,dateFormats$2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats$2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats$2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$4={date:buildFormatLongFn({formats:dateFormats$2,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$2,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$2,defaultWidth:"full"})},formatLong$5=formatLong$4,formatRelativeLocale$2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative$4=function(e,t,a,n){return formatRelativeLocale$2[e]},formatRelative$5=formatRelative$4,eraValues$2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues$2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues$2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues$2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues$2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues$1={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber$2=function(e,t){var a=Number(e),e=a%100;if(20<e||e<10)switch(e%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},localize$4={ordinalNumber:ordinalNumber$2,era:buildLocalizeFn({values:eraValues$2,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$2,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:buildLocalizeFn({values:monthValues$2,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$2,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$2,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$1,defaultFormattingWidth:"wide"})},localize$5=localize$4,matchOrdinalNumberPattern$2=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern$2=/\d+/i,matchEraPatterns$2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns$2={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns$2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns$2={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns$2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$2={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns$2={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns$2={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns$2={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match$4={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$2,parsePattern:parseOrdinalNumberPattern$2,valueCallback:function(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$2,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$2,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$2,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$2,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$2,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$2,defaultParseWidth:"any"})},match$5=match$4,locale$2={code:"en-US",formatDistance:formatDistance$5,formatLong:formatLong$5,formatRelative:formatRelative$5,localize:localize$5,match:match$4,options:{weekStartsOn:0,firstWeekContainsDate:1}},enUS=locale$2,formatDistanceLocale$1={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},formatDistance$2=function(e,t,a){e=formatDistanceLocale$1[e],e="string"==typeof e?e:1===t?e.one:e.other.replace("{{count}}",t.toString());return null!=a&&a.addSuffix?a.comparison&&0<a.comparison?"en "+e:"hace "+e:e},formatDistance$3=formatDistance$2,dateFormats$1={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},timeFormats$1={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$1={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$2={date:buildFormatLongFn({formats:dateFormats$1,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$1,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$1,defaultWidth:"full"})},formatLong$3=formatLong$2,formatRelativeLocale$1={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},formatRelativeLocalePlural={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},formatRelative$2=function(e,t,a,n){return(1!==t.getUTCHours()?formatRelativeLocalePlural:formatRelativeLocale$1)[e]},formatRelative$3=formatRelative$2,eraValues$1={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},quarterValues$1={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},monthValues$1={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},dayValues$1={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},dayPeriodValues$1={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},ordinalNumber$1=function(e,t){return Number(e)+"º"},localize$2={ordinalNumber:ordinalNumber$1,era:buildLocalizeFn({values:eraValues$1,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$1,defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:buildLocalizeFn({values:monthValues$1,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$1,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$1,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})},localize$3=localize$2,matchOrdinalNumberPattern$1=/^(\d+)(º)?/i,parseOrdinalNumberPattern$1=/\d+/i,matchEraPatterns$1={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},parseEraPatterns$1={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},matchQuarterPatterns$1={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},parseQuarterPatterns$1={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$1={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},parseMonthPatterns$1={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},matchDayPatterns$1={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},parseDayPatterns$1={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},matchDayPeriodPatterns$1={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},parseDayPeriodPatterns$1={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},match$2={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$1,parsePattern:parseOrdinalNumberPattern$1,valueCallback:function(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$1,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$1,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$1,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$1,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$1,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$1,defaultParseWidth:"any"})},match$3=match$2,locale$1={code:"es",formatDistance:formatDistance$3,formatLong:formatLong$3,formatRelative:formatRelative$3,localize:localize$3,match:match$2,options:{weekStartsOn:1,firstWeekContainsDate:1}},es=locale$1,formatDistanceLocale={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},formatDistance=function(e,t,a){e=formatDistanceLocale[e],e="string"==typeof e?e:1===t?e.one:e.other.replace("{{count}}",String(t));return null!=a&&a.addSuffix?a.comparison&&0<a.comparison?"dans "+e:"il y a "+e:e},formatDistance$1=formatDistance,dateFormats={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},timeFormats={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})},formatLong$1=formatLong,formatRelativeLocale={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},formatRelative=function(e,t,a,n){return formatRelativeLocale[e]},formatRelative$1=formatRelative,eraValues={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},quarterValues={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},dayValues={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},dayPeriodValues={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},ordinalNumber=function(e,t){e=Number(e),t=null==t?void 0:t.unit;return 0===e?"0":e+(1===e?t&&["year","week","hour","minute","second"].includes(t)?"ère":"er":"ème")},localize={ordinalNumber:ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide"})},localize$1=localize,matchOrdinalNumberPattern=/^(\d+)(ième|ère|ème|er|e)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},parseEraPatterns={any:[/^av/i,/^ap/i]},matchQuarterPatterns={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},parseDayPatterns={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:function(e){return parseInt(e)}}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})},match$1=match,locale={code:"fr",formatDistance:formatDistance$1,formatLong:formatLong$1,formatRelative:formatRelative$1,localize:localize$1,match:match,options:{weekStartsOn:1,firstWeekContainsDate:4}},fr=locale;const locales={en:enUS,fr:locale,es:es},MAX_NUMBER_OF_DAYS=90,DAY_IN_MS=864e5,toDate=e=>void 0===e?e:new Date(e),DateRangeFilter=({entity:e="jobs",dateTimeFilter:t,setFilterValue:a,locale:n="en",dateRangeLimit:i=MAX_NUMBER_OF_DAYS})=>{const[s,r]=react.exports.useState(!1),[o,l]=react.exports.useState({startDate:toDate(t.fromDateTime),endDate:toDate(t.toDateTime)});var d=useIntl();const u=useDispatch();var m=useStyles$1()["classes"];const c=Math.floor(i);var{okButtonLabel:i,clearButtonLabel:h,dateRangeFilterDefaultValueLabel:p}=formattedMessages(d,c),g=()=>{var e;u(a({filter:"dateTimeFilter",value:{fromDateTime:null==(e=o.startDate)?void 0:e.toISOString(),toDateTime:null==(e=o.endDate)?void 0:e.toISOString(),field:"createdDateTime"}})),r(!1)},x=()=>{u(a({filter:"dateTimeFilter",value:{field:"createdDateTime"}})),l({}),r(!1)},d=t.fromDateTime||t.toDateTime?d.formatDate(t.fromDateTime)+" - "+d.formatDate(t.toDateTime):p;return jsxRuntime.exports.jsxs(FormControl,Object.assign({size:"small",className:m.formControl},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",justifyContent:"space-between"}},{children:[jsxRuntime.exports.jsx("label",Object.assign({htmlFor:e+"-filter-date-range",className:m.label},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"reusable-utils.filter-range-label",defaultMessage:"Date/time",description:"label for the jobs filter date range picker"})})),(t.fromDateTime||t.toDateTime)&&jsxRuntime.exports.jsx("span",Object.assign({className:m.clearButton,onClick:x},{children:h}))]})),jsxRuntime.exports.jsx("div",Object.assign({id:e+"-filter-date-range","data-test":e+"-filter-date-range-display",className:m.dateRangeDisplay,onClick:()=>{l({startDate:toDate(t.fromDateTime),endDate:toDate(t.toDateTime)}),r(!0)}},{children:d})),jsxRuntime.exports.jsxs(Dialog,Object.assign({open:s,disableEscapeKeyDown:!0,onClose:g,maxWidth:"md"},{children:[jsxRuntime.exports.jsx(DialogContent,Object.assign({"data-test":e+"-filter-date-range-dialog-content"},{children:jsxRuntime.exports.jsx(FormControl,Object.assign({variant:"standard"},{children:jsxRuntime.exports.jsx(LocalizationProvider,Object.assign({dateAdapter:AdapterDateFns,adapterLocale:locales[n]},{children:jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,spacing:3},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,md:6,"data-test":e+"-filter-date-range-start-calendar"},{children:jsxRuntime.exports.jsx(CalendarPicker,{date:o.startDate||null,onChange:e=>{const t=e;null!==t&&void 0!==t&&t.setHours(0,0,0,0),l(({endDate:e})=>{e=e||new Date;return t&&e.getTime()>t.getTime()+c*DAY_IN_MS&&e.setTime(t.getTime()+c*DAY_IN_MS),{startDate:t||void 0,endDate:e}})},maxDate:o.endDate||new Date,defaultCalendarMonth:o.startDate})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,md:6,"data-test":e+"-filter-date-range-end-calendar"},{children:jsxRuntime.exports.jsx(CalendarPicker,{date:o.endDate||null,onChange:e=>{const t=e;null!==t&&void 0!==t&&t.setHours(23,59,59),l(e=>Object.assign(Object.assign({},e),{endDate:t||void 0}))},maxDate:new Date,disabled:!o.startDate,defaultCalendarMonth:o.endDate})}))]}))}))}))})),jsxRuntime.exports.jsxs(DialogActions,Object.assign({"data-test":e+"-filter-date-range-dialog-actions"},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":e+"-filter-date-range-dialog-clear-button",onClick:x},{children:h})),jsxRuntime.exports.jsx(Button,Object.assign({"data-test":e+"-filter-date-range-dialog-ok-button",onClick:g},{children:i}))]}))]}))]}))};var dateRangeFilterJsx=Object.freeze({__proto__:null,DateRangeFilter:DateRangeFilter});const TableDebugMenu=e=>{const[t,a]=react.exports.useState(!0);var n=e=>jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:1,justifyContent:"space-between"},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{width:"50%"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({sx:{fontWeight:"bold"}},{children:null==e?void 0:e.label})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:null==e?void 0:e.description}))]})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{display:"grid",placeItems:"center",fontSize:"20px",fontWeight:"bold",color:"#0c53b0"}},{children:null==e?void 0:e.value}))]}));return jsxRuntime.exports.jsx(Box,Object.assign({sx:{position:"absolute",bottom:"0",right:"0",border:"2px solid #d7d7d7",margin:"25px",marginTop:"0",marginRight:"50px",boxSizing:"border-box",background:"#fff",borderRadius:"10px",boxShadow:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,rgba(0, 0, 0, 0.06) 0px 0px 0px 1px",display:"flex",flexDirection:"column",padding:"10px 30px"}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({width:"100%",spacing:2,divider:jsxRuntime.exports.jsx(Divider,{})},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",sx:{gap:"10px"},pt:"10px",pb:"10px",justifyContent:"space-between"},{children:[jsxRuntime.exports.jsx(()=>jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{alignItems:"center",background:"#e9f3fd",padding:"5px",borderRadius:"7px",color:"#0b53b0",gap:"5px",paddingRight:"10px"},direction:"row"},{children:[jsxRuntime.exports.jsx(TableView,{}),jsxRuntime.exports.jsx(Typography,Object.assign({align:"center",variant:"h2"},{children:"TableInfiniteScroll"}))]})),{}),jsxRuntime.exports.jsx(LoadingButton,Object.assign({variant:"outlined",onClick:null==e?void 0:e.fetchMore,loading:null==e?void 0:e.isLoading},{children:"Fetch More Items"})),jsxRuntime.exports.jsx(()=>jsxRuntime.exports.jsxs(Box,Object.assign({onClick:()=>a(e=>!e),sx:{width:"40px",display:"grid",placeItems:"center",color:"gray","&:hover":{background:"#f7f7f7",cursor:"pointer",borderRadius:"5px",color:"black"}}},{children:[!t&&jsxRuntime.exports.jsx(ExpandLess,{}),t&&jsxRuntime.exports.jsx(ExpandMore,{})]})),{})]})),t&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(n,{label:"isLoading",value:null!=e&&e.isLoading?jsxRuntime.exports.jsx(Typography,Object.assign({color:"green"},{children:"Loading More"})):"false"}),jsxRuntime.exports.jsx(n,{label:"hasMore",description:"Are there more items to fetch from the server?",value:null!=e&&e.hasMore?"true":"false"}),jsxRuntime.exports.jsx(n,{label:"offset",description:"This is the next GraphQL page starting offset",value:null==e?void 0:e.offset}),jsxRuntime.exports.jsx(n,{label:"items.length",description:"Total amount of items fetched",value:null==e?void 0:e.items.length}),jsxRuntime.exports.jsx(n,{label:"itemHeight",description:"This is the Pixel height of each row",value:`${null==e?void 0:e.itemHeight}px`}),jsxRuntime.exports.jsx(n,{label:"Header Component",description:"Is a component passed as a header?",value:null!=e&&e.hasHeader?"true":"false"}),(null==e?void 0:e.hasHeader)&&jsxRuntime.exports.jsx(n,{label:"adjustTableHeight",description:"If including a header, you need to adjust the container height with this prop.",value:`${null==e?void 0:e.adjustTableHeight}px`}),!(null==e||!e.adjustTableWidth)&&jsxRuntime.exports.jsx(n,{label:"adjustTableWidth",description:"You can adjust the container width with this prop.",value:`${null==e?void 0:e.adjustTableWidth}px`})]})]}))}))},TableLoadingState=({itemHeight:a,LoadingComponent:n})=>{const t={overflow:"hidden",width:"100%"},i=({containerHeight:e})=>{e=Math.ceil(e/a);return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:new Array(e).fill(null).map((e,t)=>jsxRuntime.exports.jsx(TableRowLoader,{LoadingComponent:n,height:a},t))})};return jsxRuntime.exports.jsx(Grid,Object.assign({sx:{position:"relative",height:"99%",overflow:"hidden"}},{children:jsxRuntime.exports.jsx(AutoSizer,Object.assign({style:{height:"auto",width:"auto"}},{children:({height:e})=>jsxRuntime.exports.jsx(Box,Object.assign({sx:Object.assign(Object.assign({},t),{height:e})},{children:jsxRuntime.exports.jsx(i,{containerHeight:e})}))}))}))},TableRowLoader=({height:e,LoadingComponent:t})=>{return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{height:e,display:"grid",placeItems:"center",overflow:"hidden"}},{children:[!t&&jsxRuntime.exports.jsx(Skeleton,{animation:"wave",sx:{transform:"none"},width:"99.5%",height:"90%"}),t&&jsxRuntime.exports.jsx(t,{})]}))};var img="data:image/svg+xml,%3csvg width='275' height='275' viewBox='0 0 275 275' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3ccircle cx='137.5' cy='137.5' r='127.5' fill='white' stroke='%23F9F9F9' stroke-width='20'/%3e %3cpath d='M181 134.5L138.5 120.5V170L181 134.5Z' fill='%23FE8D00'/%3e %3cpath d='M138.5 120.5L94.5 135L138.5 170.5V120.5Z' fill='%23FD9F00'/%3e %3cpath d='M137.5 204V149L181.5 134.5V188.5L137.5 204Z' fill='%23FDC000'/%3e %3cpath d='M137.5 149L94.5 134.5V188.5L137.5 204V149Z' fill='%23FDB200'/%3e %3cpath d='M121.5 171L137 149L94.5 146V167L121.5 171Z' fill='%23FE8D00'/%3e %3cpath d='M159.5 163L137.5 149L181 134.5L200.5 148.5L159.5 163Z' fill='%23FEECB2'/%3e %3cpath d='M116 162.5L137.5 149L94.5 135L74 148L116 162.5Z' fill='%23FED966'/%3e %3cpath d='M159 107L138.5 120.5L181 134.5L202.5 122L159 107Z' fill='%23FDC000'/%3e %3cpath d='M75 121.5L94.5 135L138.5 120.5L118 107L75 121.5Z' fill='%23FEECB2'/%3e %3cpath d='M136.598 140.5C129.265 137.5 117.398 129.4 128.598 121C142.598 110.5 146.598 105.5 143.598 99.5C140.598 93.5 131.098 96 132.598 104C134.098 112 144.598 119 155.598 111.5C166.598 104 166.598 81 148.598 73' stroke='%23B9D1E1' stroke-dasharray='2 2'/%3e %3cpath d='M152.5 72.5C152.5 72.7215 152.381 72.9602 152.114 73.1607C151.847 73.3612 151.455 73.5 151 73.5C150.545 73.5 150.153 73.3612 149.886 73.1607C149.619 72.9602 149.5 72.7215 149.5 72.5C149.5 72.2785 149.619 72.0398 149.886 71.8393C150.153 71.6388 150.545 71.5 151 71.5C151.455 71.5 151.847 71.6388 152.114 71.8393C152.381 72.0398 152.5 72.2785 152.5 72.5Z' stroke='%23839DAE'/%3e %3ccircle cx='148.5' cy='72.5' r='1.5' fill='%23B9D1E1'/%3e%3cpath d='M150.5 75C150.5 75.4546 150.361 75.8468 150.161 76.1142C149.96 76.3814 149.722 76.5 149.5 76.5C149.278 76.5 149.04 76.3814 148.839 76.1142C148.639 75.8468 148.5 75.4546 148.5 75C148.5 74.5454 148.639 74.1532 148.839 73.8858C149.04 73.6186 149.278 73.5 149.5 73.5C149.722 73.5 149.96 73.6186 150.161 73.8858C150.361 74.1532 150.5 74.5454 150.5 75Z' stroke='%23839DAE'/%3e%3c/svg%3e";const TableEmptyState=({EmptyStateComponent:e,CustomMessage:t})=>{return e?jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:e}):jsxRuntime.exports.jsx(Grid,Object.assign({sx:{position:"relative",height:"99%",overflow:"hidden"}},{children:jsxRuntime.exports.jsx(Box,Object.assign({sx:Object.assign({},{overflow:"hidden",width:"100%",display:"flex",justifyContent:"center",marginTop:"80px"})},{children:jsxRuntime.exports.jsx(()=>{var e=t?jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:t}):jsxRuntime.exports.jsx(FormattedMessage,{id:"shared-utils.table-infinite-scroll.empty-state-message",defaultMessage:"No items found",description:"Table empty state, nothing found message"});return jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:2,display:"flex",alignItems:"center"},{children:[jsxRuntime.exports.jsx("img",{width:"270px",draggable:"false",src:img,alt:"empty state image"}),jsxRuntime.exports.jsx(Typography,Object.assign({component:"div",fontWeight:"strong"},{children:e}))]}))},{})}))}))},TableErrorState=({ErrorStateComponent:e,CustomMessage:t,onRetry:a})=>{const n={overflow:"hidden",width:"100%",display:"grid",placeItems:"center"};if(e)return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:e});const i=()=>{var e=t?jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:t}):jsxRuntime.exports.jsx(FormattedMessage,{id:"shared-utils.table-infinite-scroll.error-state-message",defaultMessage:"Error Loading Items",description:"Table error state, unable to load items message"});return jsxRuntime.exports.jsxs(Stack,Object.assign({spacing:2,display:"flex",alignItems:"center"},{children:[jsxRuntime.exports.jsx(AlarmTwo,{fontSize:"large"}),jsxRuntime.exports.jsx(Typography,Object.assign({fontWeight:"strong"},{children:e})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:a,variant:"contained"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"shared-utils.table-infinite-scroll.error-state-button",defaultMessage:"Retry",description:"Table error state, retry button"})}))]}))};return jsxRuntime.exports.jsx(Grid,Object.assign({sx:{position:"relative",height:"99%",overflow:"hidden"}},{children:jsxRuntime.exports.jsx(AutoSizer,Object.assign({style:{height:"auto",width:"auto"}},{children:({height:e})=>jsxRuntime.exports.jsx(Box,Object.assign({sx:Object.assign(Object.assign({},n),{height:e})},{children:jsxRuntime.exports.jsx(i,{})}))}))}))},TableInfiniteScroll=({hasMore:t,fetchMore:e,fetchOnMount:a=!1,offset:n,adjustTableHeight:i=0,adjustTableWidth:s=0,items:r,itemHeight:o,isLoading:l,error:d,onRetry:u,TableRowComponent:m,TableEmptyStateComponent:c,TableErrorStateComponent:h,TableHeaderComponent:p,TableRowLoadingComponent:g,sx:x={},testId:f="",showDebug:b=!1,FixedSizeListProps:j={},AutoSizerProps:v={},InfiniteLoaderProps:y={},ContainerProps:w={},RowContainerProps:S={},threshold:M=15,className:R="",MessageEmptyState:P,MessageErrorState:F})=>{const C=react.exports.useRef(null),[L,$]=react.exports.useState(null!=j&&j.initialScrollOffset?null==j?void 0:j.initialScrollOffset:0),D=t?r.length+1:r.length,O=e=>!t||e<r.length,T=()=>{l||e()};const E=debounce_1(e=>{$(e)},500),W=({index:e,style:t,isScrolling:a})=>{var n=r[e];return O(e)?jsxRuntime.exports.jsx(Box,Object.assign({"data-testid":"sdk-table-infinite-scroller-row-"+(e+1),style:t},S,{children:jsxRuntime.exports.jsx(m,{item:n,index:e,isScrolling:a})}),e):jsxRuntime.exports.jsx(Box,Object.assign({"data-testid":"sdk-table-infinite-scroller-row-loading-"+(e+1),style:t},S,{children:jsxRuntime.exports.jsx(TableRowLoader,{height:o,LoadingComponent:g})}))};return react.exports.useEffect(()=>{a&&e()},[]),react.exports.useEffect(()=>{const t=L;setTimeout(()=>{var e;return C&&(null==(e=C.current)?void 0:e._listRef.scrollToItem(t,"start"))},0)},[o]),d?jsxRuntime.exports.jsx(TableErrorState,{ErrorStateComponent:h,onRetry:()=>{(u||e)()},CustomMessage:F}):l&&!d&&0===r.length?jsxRuntime.exports.jsx(TableLoadingState,{itemHeight:o,LoadingComponent:g}):l||d||0!==r.length?jsxRuntime.exports.jsxs(Grid,Object.assign({"data-testid":f||"sdk-table-infinite-scroll-container",sx:Object.assign({position:"relative",height:"100%",overflow:"hidden"},x),className:R},w,{children:[p&&jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:p}),jsxRuntime.exports.jsx(AutoSizer,Object.assign({},v,{children:({height:a,width:n})=>jsxRuntime.exports.jsx(InfiniteLoader,Object.assign({ref:C,isItemLoaded:O,itemCount:D,loadMoreItems:T,threshold:M},y,{children:({onItemsRendered:t,ref:e})=>jsxRuntime.exports.jsx(FixedSizeList,Object.assign({ref:e,height:a+i,width:n+s,itemCount:r.length,itemSize:o,onItemsRendered:e=>{t(e),e=e.visibleStartIndex,l||E(e)},initialScrollOffset:0},j,{children:W}))}))})),b&&jsxRuntime.exports.jsx(TableDebugMenu,{adjustTableHeight:i,adjustTableWidth:s,hasMore:t,hasHeader:!!p,isLoading:l,items:r,itemHeight:o,fetchMore:e,offset:n})]})):jsxRuntime.exports.jsx(TableEmptyState,{EmptyStateComponent:c,CustomMessage:P})};var ELoadingStatus,tableInfiniteScrollJsx=Object.freeze({__proto__:null,TableInfiniteScroll:TableInfiniteScroll});!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending",e.Complete="complete"}(ELoadingStatus=ELoadingStatus||{});const useStyles=makeStyles()((e,t,a)=>({engineIconContainer:{background:"#EEF3F9",padding:"3px",borderRadius:"5px",marginRight:"3px",maxWidth:"20px",maxHeight:"20px",verticalAlign:"middle",display:"flex"},iconWrapper:{position:"relative",["&:hover > ."+a.enginesList]:{display:"block !important"},display:"flex",alignItems:"center"},tooltipCatName:{color:"white",paddingLeft:"5px",fontWeight:"900"},engineIcon:{width:"14px",height:"14px"},enginesList:{background:"rgba(0,0,0,.75)",padding:e.spacing(.6),borderRadius:"5px",marginRight:e.spacing(.6),position:"absolute",top:20,left:0,display:"none",zIndex:"999"},tooltipDivider:{marginTop:"3px"},enginesUL:{padding:"0 7px 0 20px",margin:"3px 0 !important",color:"white",overflow:"hidden",whiteSpace:"nowrap","& *":{color:"white"}},tooltipIcon:{fill:"white",width:"12px",height:"12px"},tooltipCatIconWrapper:{display:"flex",alignItems:"center",paddingLeft:"3px"},moreDivider:{borderTop:"2px solid white",marginBottom:"9px",marginTop:"6px"},moreIcon:{width:"12px",height:"12px"}})),engineIconHelper=e=>void 0!==e&&e?EngineCategoryIcons[e]:null,getCat=e=>{return null==(e=null==(e=null==(e=null==e?void 0:e.engine)?void 0:e.category)?void 0:e.name)?void 0:e.replace(/[^a-zA-Z]/g,"")},getTooltip=(e,t,a)=>t.length?jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:a.tooltipCatIconWrapper},{children:[jsxRuntime.exports.jsx(Icon,{component:engineIconHelper(e),className:a.tooltipIcon}),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:a.tooltipCatName},{children:e}))]})),jsxRuntime.exports.jsx(Divider,{className:a.tooltipDivider}),jsxRuntime.exports.jsx("ul",Object.assign({className:a.enginesUL},{children:t.map(e=>jsxRuntime.exports.jsx("li",{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:e}))},e))}))]}):null,EngineIconsRenderer=({tasks:e,iconsToRender:n=3,showMore:i=!1})=>{const a=useStyles()["classes"];e=e.filter(e=>{e=getCat(e);return engineIconHelper(e)});const s={},r={};return e&&e.forEach(e=>{var t,a=getCat(e);Object.keys(s).length<n?(a&&!s[a]&&(s[a]=[]),a&&null!=(t=null==e?void 0:e.engine)&&t.name&&s[a].push(null==(t=null==e?void 0:e.engine)?void 0:t.name)):i&&(a&&!r[a]&&(r[a]=[]),a)&&null!=(t=null==e?void 0:e.engine)&&t.name&&r[a].push(null==(t=null==e?void 0:e.engine)?void 0:t.name)}),jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[Object.keys(s).map(e=>jsxRuntime.exports.jsx(Box,Object.assign({className:a.engineIconContainer},{children:jsxRuntime.exports.jsxs(Box,Object.assign({className:a.iconWrapper},{children:[jsxRuntime.exports.jsx(Icon,{component:engineIconHelper(e),className:a.engineIcon},e),jsxRuntime.exports.jsx(Box,Object.assign({className:a.enginesList},{children:getTooltip(e,s[e],a)}))]}))}),e)),0<Object.keys(r).length&&jsxRuntime.exports.jsxs(Box,Object.assign({className:a.iconWrapper},{children:[jsxRuntime.exports.jsx(MoreHor,{className:a.moreIcon}),jsxRuntime.exports.jsx(Box,Object.assign({className:a.enginesList},{children:Object.keys(r).map((e,t)=>jsxRuntime.exports.jsxs(Box,{children:[getTooltip(e,r[e],a),t<Object.keys(r).length-1&&jsxRuntime.exports.jsx(Divider,{className:a.moreDivider})]},e+"-"+t))}))]}))]})},generateSagas=e=>{function*t(e){if(!d.create)throw new Error("No apiCalls.create was defined for this redux saga");try{var t=yield select(selectApiConfigs),a=d.getAdditionalSelectors?d.getAdditionalSelectors():{};for(const s of Object.keys(a)){var n=yield select(a[s]);s,n}var i=yield call(d.create,{apiConfigs:t,itemToCreate:e.payload});yield put(o.actions.createSucceeded(i))}catch(e){yield put(o.actions.createFailed(null))}}function*a(){if(!d.read)throw new Error("No apiCalls.read was defined for this redux saga");try{var e=yield select(selectApiConfigs),t=yield select(l.selectOffset),a=d.getAdditionalSelectors?d.getAdditionalSelectors():{},n={};for(const r of Object.keys(a)){var i=yield select(a[r]);n[r]=i}var s=yield call(d.read,{apiConfigs:e,offset:t,limit:u,additionalSelectors:n});yield put(o.actions.readSucceeded(s)),s.length===u?yield put(o.actions.setHasMore(!0)):yield put(o.actions.setHasMore(!1)),yield put(o.actions.setOffset(t+u))}catch(e){yield put(o.actions.readFailed(null))}}function*n(e){if(!d.update)throw new Error("No apiCalls.update was defined for this redux saga");try{var t=yield select(selectApiConfigs),a=d.getAdditionalSelectors?d.getAdditionalSelectors():{};for(const s of Object.keys(a)){var n=yield select(a[s]);s,n}var i=yield call(d.update,{apiConfigs:t,itemToUpdate:e.payload});yield put(o.actions.updateSucceeded(i))}catch(e){yield put(o.actions.updateFailed(null))}}function*i(e){if(!d.delete)throw new Error("No apiCalls.delete was defined for this redux saga");try{var t=yield select(selectApiConfigs),a=d.getAdditionalSelectors?d.getAdditionalSelectors():{};for(const s of Object.keys(a)){var n=yield select(a[s]);s,n}var i=yield call(d.delete,{apiConfigs:t,itemToDelete:e.payload});yield put(o.actions.deleteSucceeded(i))}catch(e){yield put(o.actions.deleteFailed(null))}}const{slice:o,selectors:l,apiCalls:d}=e,u=d.pageSize||30;return{watchCreate:function*(){yield takeEvery$1(o.actions.createStart,t)},watchRead:function*(){yield takeEvery$1(o.actions.readStart,a)},watchUpdate:function*(){yield takeEvery$1(o.actions.updateStart,n)},watchDelete:function*(){yield takeEvery$1(o.actions.deleteStart,i)}}},generateSelectors=({namespace:t,sliceName:a})=>{return{selectHasMore:e=>e[a][t].hasMore,selectItems:e=>e[a][t].items,selectOffset:e=>e[a][t].currentOffset,selectCreateStatus:e=>e[a][t].createStatus,selectReadStatus:e=>e[a][t].readStatus,selectUpdateStatus:e=>e[a][t].updateStatus,selectDeleteStatus:e=>e[a][t].deleteStatus}},generateSlice=e=>{const{sliceName:t,namespace:a,dedupeResponse:n}=e,i=e.dedupeIdProp||"id";e={createStatus:ELoadingStatus.Idle,readStatus:ELoadingStatus.Idle,updateStatus:ELoadingStatus.Idle,deleteStatus:ELoadingStatus.Idle,currentOffset:0,hasMore:!0,items:[],filters:[]};return{slice:createSlice({name:t+"/"+a,initialState:e,reducers:{createStart(e,t){e.createStatus=ELoadingStatus.Pending},createSucceeded(e,t){e.items.push(t.payload),e.createStatus=ELoadingStatus.Idle},createFailed(e){e.createStatus=ELoadingStatus.Failed},readStart(e){e.readStatus=ELoadingStatus.Pending},readSucceeded(a,e){e.payload.forEach(t=>{var e;!n||-1===(e=a.items.findIndex(e=>t[i]===e[i]))?a.items.push(t):a.items[e]=t}),a.readStatus=ELoadingStatus.Idle},readFailed(e){e.readStatus=ELoadingStatus.Failed},updateStart(e,t){e.updateStatus=ELoadingStatus.Pending},updateSucceeded(e,t){var a=e.items.findIndex(e=>t.payload[i]===e[i]);-1!==a?e.items[a]=t.payload:console.warn("Couldn't replace existing item with updated version in redux state",t.payload),e.updateStatus=ELoadingStatus.Idle},updateFailed(e){e.updateStatus=ELoadingStatus.Failed},deleteStart(e,t){e.deleteStatus=ELoadingStatus.Pending},deleteSucceeded(e,t){var a=e.items.findIndex(e=>t.payload[i]===e[i]);-1!==a?e.items.splice(a,1):console.warn("Couldn't remove deleted item from redux state",t.payload),e.deleteStatus=ELoadingStatus.Idle},deleteFailed(e){e.deleteStatus=ELoadingStatus.Failed},setHasMore(e,t){e.hasMore=t.payload},setOffset(e,t){e.currentOffset=t.payload},resetList(e){e.items=[],e.currentOffset=0,e.hasMore=!0},setFilter(e,t){var a=e.filters.findIndex(e=>e.type===t.payload.type);-1===a?e.filters.push(t.payload):0===t.payload.values.length?e.filters.splice(a,1):e.filters[a].values=t.payload.values},clearFilters(e){e.filters=[]}}}),initialState:e}},generateState=e=>{var{sliceName:e,namespace:t,dedupeResponse:a,dedupeIdProp:n,apiCalls:i}=e,{slice:a,initialState:n}=generateSlice({sliceName:e,namespace:t,dedupeResponse:a,dedupeIdProp:n}),t=generateSelectors({namespace:t,sliceName:e});return{slice:a,selectors:t,sagas:generateSagas({slice:a,selectors:t,apiCalls:i}),initialState:n}},enginesFilter={api:enginesFilterApi,jsx:enginesFilterJsx,helpers:enginesFilterHelpers},statusFilter={jsx:statusFilterJsx},dateRangeFilter={jsx:dateRangeFilterJsx},tableInfiniteScroll={jsx:tableInfiniteScrollJsx};export{EngineIconsRenderer as E,dateRangeFilter as a,ELoadingStatus as b,debounce_1 as d,enginesFilter as e,generateState as g,statusFilter as s,tableInfiniteScroll as t};
|
package/js-core.esm49.js.gz
CHANGED
|
Binary file
|