aiware-js 1.0.0-master.716 → 1.0.0-master.717

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 CHANGED
@@ -1128,7 +1128,7 @@ createScheduledJob(input:{
1128
1128
  mutation logout($token: String!) {
1129
1129
  userLogout(token: $token )
1130
1130
  }
1131
- `,variables:e,graphEndpoint:n,token:t})}catch(e){return{success:!1}}}),MAX_EXTEND_ATTEMPTS=2,MAX_FETCH_USER_ATTEMPTS=3,isTokenJwt=(e="")=>{e=e.split(".");return 3===e.length&&e.reduce((e,t,n)=>{if(2===n)return 0<t.length;try{return window.atob(t.replace(/-/g,"+").replace(/_/g,"/")),!0}catch(e){return!1}},!0)};function*handleRetries(t,n,e,...r){let i=0,o=!1,a={};for(;!o&&i<t;)try{!(a=yield call$i(e,...r)).errors||(i++,a.errors===UNAUTHORIZED_401)?o=!0:i<t&&(yield delay$1(n))}catch(e){a.errors=e,++i<t&&(yield delay$1(n))}return a}function*handleFetchUserSaga(){var t=yield select(rootApiSelector);if(t){var n=yield select(graphEndpointSelector),r=yield select(sessionTokenSelector),i=yield select(preferredLanguageSelector),i=AIWareFormatMessage(i),t=yield call$i(handleRetries,MAX_FETCH_USER_ATTEMPTS,2e3,handleFetchUserRequest,t,r);let e={};if(t.errors!==UNAUTHORIZED_401&&(e=yield call$i(handleRetries,MAX_FETCH_USER_ATTEMPTS,2e3,getUserRightRequest,n,r)),t.errors||e.errors)yield put(fetchUserError()),stashTokenInSession(SESSION_TOKEN_PREVENT_STASH_VALUE),t.errors!==UNAUTHORIZED_401&&(yield put(showMessage({content:i({id:"shared-redux.fetch-user.failure-message",defaultMessage:[{type:0,value:"It looks like our servers are having issues. Please refresh your page."}]}),severity:MessageSeverity.Error})));else{var o=null==(n=null==(i=null==(n=null===e||void 0===e?void 0:e.data)?void 0:n.me)?void 0:i.roles)?void 0:n.map(e=>e.appName).filter((e,t,n)=>n.indexOf(e)===t);if(null!=o&&o.includes("admin"))for(const a of(null==(n=null==(i=null===e||void 0===e?void 0:e.data)?void 0:i.myRights)?void 0:n.operations)||[])if(a.includes("superadmin")){o.push("superadmin");break}var n=null==(i=null==(n=null==(i=null===e||void 0===e?void 0:e.data)?void 0:i.me)?void 0:n.userSettings)?void 0:i.find(e=>"preferredLanguage"===e.key),i=null==(i=null==(i=null==(i=null===e||void 0===e?void 0:e.data)?void 0:i.me)?void 0:i.userSettings)?void 0:i.find(e=>"recentApplications"===e.key),n=null==n?void 0:n.value,i=null==i?void 0:i.value;t.preferredLanguage=n||"en",t.recentApplications=i||"",yield put(fetchUserSuccess(Object.assign(Object.assign({},t),{roles:o,token:t.token||r,myRights:null==(i=null==(n=null===e||void 0===e?void 0:e.data)?void 0:n.myRights)?void 0:i.operations,userSettings:(null==(r=null==(t=null===e||void 0===e?void 0:e.data)?void 0:t.me)?void 0:r.userSettings)||[]}))),yield put(subscribeToEventsWebsocket())}}else yield take(getConfigSuccess.type),yield put(fetchUserRequest())}function*logoutHelper(e){var t=yield select(graphEndpointSelector),n=yield select(authSelector);yield call$i(stashTokenInSession,SESSION_TOKEN_PREVENT_STASH_VALUE),yield call$i(postNotificationApi,t,null==n?void 0:n.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.setCallLogout,value:!0,ephemeral:!0,contentType:"json"},!0,"json",aiwareEvent,e)}function*handleRefreshTokenSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"];try{var n,r,i=yield call$i(handleRefreshTokenRequest,e,t);null!=i&&i.errors?(n=yield select(preferredLanguageSelector),r=AIWareFormatMessage(n),((null==i?void 0:i.errors)||[]).find(e=>{return((null==(e=null==e?void 0:e.data)?void 0:e.serviceMessage)||"").includes("40")})?(yield put(setDuration(1e4)),yield put(showMessage({content:r({id:"shared-redux.refresh-token-failure.4xx",defaultMessage:[{type:0,value:"Could not refresh session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(e)):yield put(showMessage({content:r({id:"shared-redux.refresh-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not refresh session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))):(yield put(refreshTokenSuccess(Object.assign({},i.data))),yield put(fetchUserRequest()))}catch(e){console.log(e)}}function*handleUuidTokenOnlySaga(e,t,n,r,i,o){let a=0,s=!1,l,c,u=e;for(var d;!s&&a<r;)if((d=!isTokenJwt(u))||u===e)if(d)try{c=yield call$i(n,u,t),s=!0}catch(e){l=e,++a<r&&(yield delay$1(5e3))}else try{var p=yield call$i(handleFetchUserRequest,t);"string"==typeof(null==p?void 0:p.token)?(yield put(updateTokenSuccess({token:p.token})),yield call$i(n,p.token,t),u=p.token):(yield put(showMessage({content:i,severity:MessageSeverity.Error})),s=!0)}catch(e){yield put(showMessage({content:i,severity:MessageSeverity.Error})),s=!0}else s=!0;return l&&(yield call$i(o,u,l)),c}function*handleExtendTokenErrors(e,t){var n=yield select(preferredLanguageSelector),n=AIWareFormatMessage(n);t instanceof CustomError&&t.isAuthErr?(yield put(setDuration(1e4)),yield put(showMessage({content:n({id:"shared-redux.extend-token-failure.4xx",defaultMessage:[{type:0,value:"Could not extend session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(e)):(console.log("ERR! Could not extend session. Service temporarily unavailable"),yield put(showMessage({content:n({id:"shared-redux.extend-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not extend session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error})),yield delay$1(2e3))}function*handleExtendTokenSaga(e){var e=e.payload["token"],t=yield select(rootApiSelector),n=yield select(preferredLanguageSelector),n=AIWareFormatMessage(n)({id:"shared-redux.extend-token-failure.jwt",defaultMessage:[{type:0,value:"Could not extend session. JWT tokens cannot be extended."}]}),e=yield call$i(handleUuidTokenOnlySaga,e,t,handleExtendTokenRequest,MAX_EXTEND_ATTEMPTS,n,handleExtendTokenErrors);e&&!e.errors&&(yield put(extendTokenSuccess({token:e.token})),yield put(setTokenExpiration({expirationTime:e.tokenExpiration})),stashTokenInSession(e.token))}function*handleLogoutSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"],e=(yield call$i(stashTokenInSession,SESSION_TOKEN_PREVENT_STASH_VALUE),yield call$i(handleLogoutRequest,e,t));null!=e&&e.errors?yield put(logoutError()):yield put(logoutSuccess())}function*handleUpdateSessionToken(e){e=e.payload.token;e?yield put(updateTokenSuccess({token:e})):yield put(updateTokenError())}function*handleUpdateUserLanguage(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n,r,i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=(yield select(userSelector$2))["userId"];a?(n=e.payload,r=yield call$i(updateUserSettingsApi,i,o,a,"preferredLanguage",n),sdkEventManager.dispatch(SdkEvents.languageChange,null,{preferredLanguage:r}),yield put(updateUserLanguageSuccess(r))):(sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed, user id is required"),null),yield put(showMessage({content:t({id:"shared-redux.snackbar.languageSelectionError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})))}catch(e){sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed"),null),yield put(showMessage({content:t({id:"shared-redux.snackbar.languageSelectionChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*handleResetPasswordSaga(e){var t,n,r=yield select(preferredLanguageSelector),r=AIWareFormatMessage(r);try{var{resetToken:i,password:o,username:a,organizationInviteId:s,apiUrl:l}=e.payload,c=l||(yield select(rootApiSelector)),u=yield call$i(handleResetPasswordApi,c,{resetToken:i,username:a,password:o,organizationInviteId:s});if(null!=u&&u.success)yield put(resetPasswordSuccess());else{let e=r({id:"os-auth.reset-password.internalServerError",defaultMessage:[{type:0,value:"An error has occurred."}]});401===u.status&&"PasswordResetTokenExpired"===(null==(t=u.result)?void 0:t.errorCode)?e=r({id:"os-auth.reset-password.expireMessageDescriptive",defaultMessage:[{type:0,value:'The password reset link you used has expired. Please click the "Forgot Password" link on the login page to generate a new link.'}]}):403===u.status?e=(null==(n=u.result)?void 0:n.message)||e:404===u.status&&(e=r({id:"os-auth.reset-password.expireMessage",defaultMessage:[{type:0,value:"An error has occurred. The reset link might be expired."}]})),yield put(resetPasswordError({message:e}))}}catch(e){console.log(e),yield put(resetPasswordError({message:r({id:"os-auth.reset-password.internalError",defaultMessage:[{type:0,value:"Could not reset your password."}]})}))}}function*requestOAuthGrant(){var e=yield select(appIdSelector),t=(yield select(selectApiConfigs$2))["apiRoot"],n=yield select(sessionTokenSelector),r=yield select(oauthRedirectUriSelector);if(n)yield put(oAuthGrantSuccess(n)),yield put(fetchUserRequest());else try{n=(yield call$i(login,t+`/v1/admin/oauth/authorize?response_type=token&client_id=${e}&redirect_uri=${r}&scope=all`)).OAuthToken;yield put(oAuthGrantSuccess(n)),yield put(fetchUserRequest())}catch(e){console.log("oauth flow error",e),yield put(oAuthGrantFailure())}}function*callSdkInitCompleteCallbackOnError(){var e,t=yield select(initialConfigSelector),n=yield select(preferredLanguageSelector),n=AIWareFormatMessage(n);null!=(e=null==t?void 0:t.onComplete)&&e.call(t,n({id:"shared-redux.auth-saga.sdk-init-error-message",defaultMessage:[{type:0,value:"An error occurred during initialization."}]}))}function*watchOAuthReadiness(){for(;;){yield take([oAuthGrantReadyToStart.type,fetchUserSuccess.type,fetchUserError.type]);var e=yield select(oAuthStatusSelector),t=yield select(authStatusSelector);if(t!==Status.loading&&e===Status.ready)switch(t){case Status.success:yield put(oAuthGrantSkip());break;case Status.failure:yield put(oAuthGrantStart())}}}function*handleUpdateUserRecentApplications(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n,r,i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=(yield select(userSelector$2))["userId"],s=yield select(userRecentApplicationsSelector);a?(n=slice$4(uniq([e.payload,...s]),0,6),r=yield call$i(updateUserSettingsApi,i,o,a,"recentApplications",JSON.stringify(n)),yield put(updateUserRecentApplicationsSuccess(r))):yield put(showMessage({content:t({id:"shared-redux.snackbar.updateRecentApplicationsError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error}))}catch(e){yield put(showMessage({content:t({id:"shared-redux.snackbar.updatingRecentApplicationsChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*watchInitAndAuthStatus(){for(var e,t,n;;){yield take([oAuthGrantSuccess.type,oAuthGrantSkip.type,oAuthGrantFailure.type,sdkInitSuccess.type,fetchUserSuccess.type,fetchUserError.type]);var r=yield select(initialConfigSelector),i=yield select(oAuthTokenSelector),o=yield select(oAuthStatusSelector),a=yield select(initStatusSelector),s=yield select(authStatusSelector),l=yield select(sessionTokenSelector),c=yield select(preferredLanguageSelector),u=AIWareFormatMessage(c);if(s!==Status.loading)if(s===Status.success)switch(o){case Status.loading:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l),yield put(oAuthGrantSuccess(l));break;case Status.skipped:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l)}else if(a===Status.success)switch(o){case Status.skipped:s===Status.failure?null!=(t=null==r?void 0:r.onComplete)&&t.call(r,u({id:"shared-redux.auth-saga.auth-error-message",defaultMessage:[{type:0,value:"An error occurred during authentication."}]})):null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,l);break;case Status.success:null!=(n=null==r?void 0:r.onComplete)&&n.call(r,null,i);break;case Status.failure:null!=(n=null==r?void 0:r.onComplete)&&n.call(r,u({id:"shared-redux.auth-saga.oauth-error-message",defaultMessage:[{type:0,value:"An error occurred during authentication."}]}))}}}function*watchTokenChanges(){for(;;){yield take([fetchUserSuccess.type,updateTokenSuccess.type,updateTokenError.type,refreshTokenSuccess.type,setTokenExpiration.type,fetchUserSuccess.type,fetchUserError.type]);var e=yield select(sessionTokenSelector),t=(yield select(userSelector$2))["tokenExpiration"],n=yield select(authStatusSelector),r=yield select(oAuthStatusSelector);n===Status.failure&&r!==Status.ready?sdkEventManager.dispatch(SdkEvents.tokenUpdated,new SdkError("An error occurred during the update of the session token.")):sdkEventManager.dispatch(SdkEvents.tokenUpdated,null,{token:e,tokenExpiration:t})}}function*authSaga(){yield all([takeLatest$1(fetchUserRequest.type,handleFetchUserSaga),takeLatest$1(updateTokenRequest.type,handleUpdateSessionToken),takeLatest$1(resetPasswordRequest.type,handleResetPasswordSaga),takeEvery$1(refreshTokenRequest.type,handleRefreshTokenSaga),takeEvery$1(extendTokenRequest.type,handleExtendTokenSaga),takeEvery$1(logoutRequest.type,handleLogoutSaga),takeEvery$1(updateUserLanguageStart.type,handleUpdateUserLanguage),takeEvery$1(oAuthGrantStart.type,requestOAuthGrant),takeEvery$1(sdkInitFailure.type,callSdkInitCompleteCallbackOnError),takeEvery$1(updateUserRecentApplicationsStart.type,handleUpdateUserRecentApplications),watchOAuthReadiness(),watchInitAndAuthStatus(),watchTokenChanges()])}function getAuthModule(){return{id:namespace$4$2,reducerMap:{[namespace$4$2]:authReducer},sagas:[authSaga],initialActions:[fetchUserRequest()]}}var userActivityEvents={records:[{id:"ff9272fe-5e98-4ffb-96b6-5df2918d9b2b",event:"login_succeeded",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d",userName:"sys_graphql_citest_superadmin@veritone.com",organizationId:"7682",applicationId:"123",createdDateTime:"2020-10-26T06:40:12.928Z",payload:{organizationId:12333,organizationName:"name",userName:"user",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d"}}]},mockData={userActivityEvents:userActivityEvents};const fakeAPI=()=>new Promise((e,t)=>{setTimeout(()=>e({success:!0,data:mockData}),500)}),getActivityApi=()=>__awaiter$a(void 0,void 0,void 0,function*(){try{var{success:e,data:t}=yield fakeAPI();return e&&t.userActivityEvents?{data:t.userActivityEvents,success:!0}:{success:!1,data:null}}catch(e){return{success:!1,data:null,message:e}}}),getApplicationsApi=(e,t)=>__awaiter$a(void 0,void 0,void 0,function*(){try{return(yield fetch(e+"/v1/admin/current-user/applications",{method:"GET",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t}),credentials:"include"})).json()}catch(e){console.error(e)}}),getApplicationLogo=(r,i)=>__awaiter$a(void 0,void 0,void 0,function*(){var e=`query ($limit: Int $owned: Boolean) {
1131
+ `,variables:e,graphEndpoint:n,token:t})}catch(e){return{success:!1}}}),MAX_EXTEND_ATTEMPTS=2,MAX_FETCH_USER_ATTEMPTS=3,isTokenJwt=(e="")=>{e=e.split(".");return 3===e.length&&e.reduce((e,t,n)=>{if(2===n)return 0<t.length;try{return window.atob(t.replace(/-/g,"+").replace(/_/g,"/")),!0}catch(e){return!1}},!0)};function*handleRetries(t,n,e,...r){let i=0,o=!1,a={};for(;!o&&i<t;)try{!(a=yield call$i(e,...r)).errors||(i++,a.errors===UNAUTHORIZED_401)?o=!0:i<t&&(yield delay$1(n))}catch(e){a.errors=e,++i<t&&(yield delay$1(n))}return a}function*handleFetchUserSaga(){var t=yield select(rootApiSelector);if(t){var n=yield select(graphEndpointSelector),r=yield select(sessionTokenSelector),i=yield select(preferredLanguageSelector),i=AIWareFormatMessage(i),t=yield call$i(handleRetries,MAX_FETCH_USER_ATTEMPTS,2e3,handleFetchUserRequest,t,r);let e={};if(t.errors!==UNAUTHORIZED_401&&(e=yield call$i(handleRetries,MAX_FETCH_USER_ATTEMPTS,2e3,getUserRightRequest,n,r)),t.errors||e.errors)yield put(fetchUserError()),stashTokenInSession(SESSION_TOKEN_PREVENT_STASH_VALUE),t.errors!==UNAUTHORIZED_401&&(yield put(showMessage({content:i({id:"shared-redux.fetch-user.failure-message",defaultMessage:[{type:0,value:"It looks like our servers are having issues. Please refresh your page."}]}),severity:MessageSeverity.Error})));else{var o=null==(n=null==(i=null==(n=null===e||void 0===e?void 0:e.data)?void 0:n.me)?void 0:i.roles)?void 0:n.map(e=>e.appName).filter((e,t,n)=>n.indexOf(e)===t);if(null!=o&&o.includes("admin"))for(const a of(null==(n=null==(i=null===e||void 0===e?void 0:e.data)?void 0:i.myRights)?void 0:n.operations)||[])if(a.includes("superadmin")){o.push("superadmin");break}var n=null==(i=null==(n=null==(i=null===e||void 0===e?void 0:e.data)?void 0:i.me)?void 0:n.userSettings)?void 0:i.find(e=>"preferredLanguage"===e.key),i=null==(i=null==(i=null==(i=null===e||void 0===e?void 0:e.data)?void 0:i.me)?void 0:i.userSettings)?void 0:i.find(e=>"recentApplications"===e.key),n=null==n?void 0:n.value,i=null==i?void 0:i.value;t.preferredLanguage=n||"en",t.recentApplications=i||"",yield put(fetchUserSuccess(Object.assign(Object.assign({},t),{roles:o,token:t.token||r,myRights:null==(i=null==(n=null===e||void 0===e?void 0:e.data)?void 0:n.myRights)?void 0:i.operations,userSettings:(null==(r=null==(t=null===e||void 0===e?void 0:e.data)?void 0:t.me)?void 0:r.userSettings)||[]}))),yield put(subscribeToEventsWebsocket())}}else yield take(getConfigSuccess.type),yield put(fetchUserRequest())}function*logoutHelper(e){var t=yield select(graphEndpointSelector),n=yield select(authSelector);yield call$i(stashTokenInSession,SESSION_TOKEN_PREVENT_STASH_VALUE),yield call$i(postNotificationApi,t,null==n?void 0:n.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.setCallLogout,value:!0,ephemeral:!0,contentType:"json"},!0,"json",aiwareEvent,e)}function*handleRefreshTokenSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"];try{var n,r,i=yield call$i(handleRefreshTokenRequest,e,t);null!=i&&i.errors?(n=yield select(preferredLanguageSelector),r=AIWareFormatMessage(n),((null==i?void 0:i.errors)||[]).find(e=>{return((null==(e=null==e?void 0:e.data)?void 0:e.serviceMessage)||"").includes("40")})?(yield put(setDuration(1e4)),yield put(showMessage({content:r({id:"shared-redux.refresh-token-failure.4xx",defaultMessage:[{type:0,value:"Could not refresh session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(e)):yield put(showMessage({content:r({id:"shared-redux.refresh-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not refresh session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))):(yield put(refreshTokenSuccess(Object.assign({},i.data))),yield put(fetchUserRequest()))}catch(e){console.log(e)}}function*handleUuidTokenOnlySaga(e,t,n,r,i,o){let a=0,s=!1,l,c,u=e;for(var d;!s&&a<r;)if((d=!isTokenJwt(u))||u===e)if(d)try{c=yield call$i(n,u,t),s=!0}catch(e){l=e,++a<r&&(yield delay$1(5e3))}else try{var p=yield call$i(handleFetchUserRequest,t);"string"==typeof(null==p?void 0:p.token)?(yield put(updateTokenSuccess({token:p.token})),yield call$i(n,p.token,t),u=p.token):(yield put(showMessage({content:i,severity:MessageSeverity.Error})),s=!0)}catch(e){yield put(showMessage({content:i,severity:MessageSeverity.Error})),s=!0}else s=!0;return l&&(yield call$i(o,u,l)),c}function*handleExtendTokenErrors(e,t){var n=yield select(preferredLanguageSelector),n=AIWareFormatMessage(n);t instanceof CustomError&&t.isAuthErr?(yield put(setDuration(1e4)),yield put(showMessage({content:n({id:"shared-redux.extend-token-failure.4xx",defaultMessage:[{type:0,value:"Could not extend session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(e)):(console.log("ERR! Could not extend session. Service temporarily unavailable"),yield put(showMessage({content:n({id:"shared-redux.extend-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not extend session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error})),yield delay$1(2e3))}function*handleExtendTokenSaga(e){var e=e.payload["token"],t=yield select(rootApiSelector),n=yield select(preferredLanguageSelector),n=AIWareFormatMessage(n)({id:"shared-redux.extend-token-failure.jwt",defaultMessage:[{type:0,value:"Could not extend session. JWT tokens cannot be extended."}]}),e=yield call$i(handleUuidTokenOnlySaga,e,t,handleExtendTokenRequest,MAX_EXTEND_ATTEMPTS,n,handleExtendTokenErrors);e&&!e.errors&&(yield put(extendTokenSuccess({token:e.token})),yield put(setTokenExpiration({expirationTime:e.tokenExpiration})),stashTokenInSession(e.token))}function*handleLogoutSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"],e=(yield call$i(stashTokenInSession,SESSION_TOKEN_PREVENT_STASH_VALUE),yield call$i(handleLogoutRequest,e,t));null!=e&&e.errors?yield put(logoutError()):yield put(logoutSuccess())}function*handleUpdateSessionToken(e){e=e.payload.token;e?yield put(updateTokenSuccess({token:e})):yield put(updateTokenError())}function*handleUpdateUserLanguage(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n,r,i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=(yield select(userSelector$2))["userId"];a?(n=e.payload,r=yield call$i(updateUserSettingsApi,i,o,a,"preferredLanguage",n),sdkEventManager.dispatch(SdkEvents.languageChange,null,{preferredLanguage:r}),yield put(updateUserLanguageSuccess(r))):(sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed, user id is required"),null),yield put(showMessage({content:t({id:"shared-redux.snackbar.languageSelectionError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})))}catch(e){sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed"),null),yield put(showMessage({content:t({id:"shared-redux.snackbar.languageSelectionChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*handleResetPasswordSaga(e){var n,r,i,o,a=yield select(preferredLanguageSelector),a=AIWareFormatMessage(a);try{var{resetToken:t,password:s,username:l,organizationInviteId:c,apiUrl:u}=e.payload,d=u||(yield select(rootApiSelector)),p=yield call$i(handleResetPasswordApi,d,{resetToken:t,username:l,password:s,organizationInviteId:c});if(null!=p&&p.success)yield put(resetPasswordSuccess());else{var f=(null==(n=null==p?void 0:p.result)?void 0:n.message)||"";let t="";try{t=null==(r=JSON.parse(f))?void 0:r.description}catch(e){t=a({id:"os-auth.reset-password.internalServerError",defaultMessage:[{type:0,value:"An error has occurred."}]})||"An error has occurred."}401===p.status&&"PasswordResetTokenExpired"===(null==(i=p.result)?void 0:i.errorCode)?t=a({id:"os-auth.reset-password.expireMessageDescriptive",defaultMessage:[{type:0,value:'The password reset link you used has expired. Please click the "Forgot Password" link on the login page to generate a new link.'}]})||'The password reset link you used has expired. Please click the "Forgot Password" link on the login page to generate a new link.':403===p.status?t=(null==(o=p.result)?void 0:o.message)||t:404===p.status&&(t=a({id:"os-auth.reset-password.expireMessage",defaultMessage:[{type:0,value:"An error has occurred. The reset link might be expired."}]})||"An error has occurred. The reset link might be expired';"),yield put(resetPasswordError({message:t}))}}catch(e){console.log(e),yield put(resetPasswordError({message:a({id:"os-auth.reset-password.internalError",defaultMessage:[{type:0,value:"Could not reset your password."}]})||"Could not reset your password."}))}}function*requestOAuthGrant(){var e=yield select(appIdSelector),t=(yield select(selectApiConfigs$2))["apiRoot"],n=yield select(sessionTokenSelector),r=yield select(oauthRedirectUriSelector);if(n)yield put(oAuthGrantSuccess(n)),yield put(fetchUserRequest());else try{n=(yield call$i(login,t+`/v1/admin/oauth/authorize?response_type=token&client_id=${e}&redirect_uri=${r}&scope=all`)).OAuthToken;yield put(oAuthGrantSuccess(n)),yield put(fetchUserRequest())}catch(e){console.log("oauth flow error",e),yield put(oAuthGrantFailure())}}function*callSdkInitCompleteCallbackOnError(){var e,t=yield select(initialConfigSelector),n=yield select(preferredLanguageSelector),n=AIWareFormatMessage(n);null!=(e=null==t?void 0:t.onComplete)&&e.call(t,n({id:"shared-redux.auth-saga.sdk-init-error-message",defaultMessage:[{type:0,value:"An error occurred during initialization."}]}))}function*watchOAuthReadiness(){for(;;){yield take([oAuthGrantReadyToStart.type,fetchUserSuccess.type,fetchUserError.type]);var e=yield select(oAuthStatusSelector),t=yield select(authStatusSelector);if(t!==Status.loading&&e===Status.ready)switch(t){case Status.success:yield put(oAuthGrantSkip());break;case Status.failure:yield put(oAuthGrantStart())}}}function*handleUpdateUserRecentApplications(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n,r,i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=(yield select(userSelector$2))["userId"],s=yield select(userRecentApplicationsSelector);a?(n=slice$4(uniq([e.payload,...s]),0,6),r=yield call$i(updateUserSettingsApi,i,o,a,"recentApplications",JSON.stringify(n)),yield put(updateUserRecentApplicationsSuccess(r))):yield put(showMessage({content:t({id:"shared-redux.snackbar.updateRecentApplicationsError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error}))}catch(e){yield put(showMessage({content:t({id:"shared-redux.snackbar.updatingRecentApplicationsChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*watchInitAndAuthStatus(){for(var e,t,n;;){yield take([oAuthGrantSuccess.type,oAuthGrantSkip.type,oAuthGrantFailure.type,sdkInitSuccess.type,fetchUserSuccess.type,fetchUserError.type]);var r=yield select(initialConfigSelector),i=yield select(oAuthTokenSelector),o=yield select(oAuthStatusSelector),a=yield select(initStatusSelector),s=yield select(authStatusSelector),l=yield select(sessionTokenSelector),c=yield select(preferredLanguageSelector),u=AIWareFormatMessage(c);if(s!==Status.loading)if(s===Status.success)switch(o){case Status.loading:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l),yield put(oAuthGrantSuccess(l));break;case Status.skipped:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l)}else if(a===Status.success)switch(o){case Status.skipped:s===Status.failure?null!=(t=null==r?void 0:r.onComplete)&&t.call(r,u({id:"shared-redux.auth-saga.auth-error-message",defaultMessage:[{type:0,value:"An error occurred during authentication."}]})):null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,l);break;case Status.success:null!=(n=null==r?void 0:r.onComplete)&&n.call(r,null,i);break;case Status.failure:null!=(n=null==r?void 0:r.onComplete)&&n.call(r,u({id:"shared-redux.auth-saga.oauth-error-message",defaultMessage:[{type:0,value:"An error occurred during authentication."}]}))}}}function*watchTokenChanges(){for(;;){yield take([fetchUserSuccess.type,updateTokenSuccess.type,updateTokenError.type,refreshTokenSuccess.type,setTokenExpiration.type,fetchUserSuccess.type,fetchUserError.type]);var e=yield select(sessionTokenSelector),t=(yield select(userSelector$2))["tokenExpiration"],n=yield select(authStatusSelector),r=yield select(oAuthStatusSelector);n===Status.failure&&r!==Status.ready?sdkEventManager.dispatch(SdkEvents.tokenUpdated,new SdkError("An error occurred during the update of the session token.")):sdkEventManager.dispatch(SdkEvents.tokenUpdated,null,{token:e,tokenExpiration:t})}}function*authSaga(){yield all([takeLatest$1(fetchUserRequest.type,handleFetchUserSaga),takeLatest$1(updateTokenRequest.type,handleUpdateSessionToken),takeLatest$1(resetPasswordRequest.type,handleResetPasswordSaga),takeEvery$1(refreshTokenRequest.type,handleRefreshTokenSaga),takeEvery$1(extendTokenRequest.type,handleExtendTokenSaga),takeEvery$1(logoutRequest.type,handleLogoutSaga),takeEvery$1(updateUserLanguageStart.type,handleUpdateUserLanguage),takeEvery$1(oAuthGrantStart.type,requestOAuthGrant),takeEvery$1(sdkInitFailure.type,callSdkInitCompleteCallbackOnError),takeEvery$1(updateUserRecentApplicationsStart.type,handleUpdateUserRecentApplications),watchOAuthReadiness(),watchInitAndAuthStatus(),watchTokenChanges()])}function getAuthModule(){return{id:namespace$4$2,reducerMap:{[namespace$4$2]:authReducer},sagas:[authSaga],initialActions:[fetchUserRequest()]}}var userActivityEvents={records:[{id:"ff9272fe-5e98-4ffb-96b6-5df2918d9b2b",event:"login_succeeded",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d",userName:"sys_graphql_citest_superadmin@veritone.com",organizationId:"7682",applicationId:"123",createdDateTime:"2020-10-26T06:40:12.928Z",payload:{organizationId:12333,organizationName:"name",userName:"user",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d"}}]},mockData={userActivityEvents:userActivityEvents};const fakeAPI=()=>new Promise((e,t)=>{setTimeout(()=>e({success:!0,data:mockData}),500)}),getActivityApi=()=>__awaiter$a(void 0,void 0,void 0,function*(){try{var{success:e,data:t}=yield fakeAPI();return e&&t.userActivityEvents?{data:t.userActivityEvents,success:!0}:{success:!1,data:null}}catch(e){return{success:!1,data:null,message:e}}}),getApplicationsApi=(e,t)=>__awaiter$a(void 0,void 0,void 0,function*(){try{return(yield fetch(e+"/v1/admin/current-user/applications",{method:"GET",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t}),credentials:"include"})).json()}catch(e){console.error(e)}}),getApplicationLogo=(r,i)=>__awaiter$a(void 0,void 0,void 0,function*(){var e=`query ($limit: Int $owned: Boolean) {
1132
1132
  applications (limit: $limit owned: $owned) {
1133
1133
  records {
1134
1134
  id
@@ -1483,4 +1483,4 @@ createScheduledJob(input:{
1483
1483
  }
1484
1484
  `)}),n},[]).join("\r\n")}
1485
1485
  }
1486
- `,l={entityId:t,entityType:e};try{a=yield baseGraphQLApi({query:s,operationName:n,variables:l,graphEndpoint:u,token:d})}catch(e){i=!0}if(a.errors){if(0===(o=a.errors.filter(({message:e})=>e.includes(' does not exist in "AuthPermissionType" enum.')).map(({message:e})=>{var t='Value "',n=e.substring(t.length).indexOf('"');return e.substring(t.length,t.length+n)})).length)throw i=!0,a={},new Error((null==(f=(a.errors||[])[0])?void 0:f.message)||"Error")}else i=!0}const c=a.data||{};return Object.keys(c).map(e=>{var t=e.split("__");return 3===t.length?{fetchedTargetEntityType:t[0],fetchedTargetGroupType:t[1],fetchedTargetAction:t[2],hasPermission:c[e][0].hasPermission}:{fetchedTargetEntityType:t[0],fetchedTargetAction:t[1],hasPermission:c[e][0].hasPermission}}).reduce((e,t)=>{var n=t.fetchedTargetGroupType||t.fetchedTargetEntityType;return t.hasPermission&&(e[n]||(e[n]={}),e[n][t.fetchedTargetAction]=t.hasPermission),e},{})})}function getMyRights(t){return __awaiter(this,void 0,void 0,function*(){var e="getMyRights";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getMyRights {\n myRights {\n operations\n }\n }\n ",operationName:e},t))).myRights.operations})}const selectPermissionsByEntity=(t,n,r)=>e=>{return t&&n&&(e=e[namespace].permissionsByObject[t])&&e[n]?e[n][r||t]:void 0},selectMyRights=e=>e[namespace].rights;var index=Object.freeze({__proto__:null,selectPermissionsByEntity:selectPermissionsByEntity,selectMyRights:selectMyRights});function*fetchObjectPermissions(t){var{entityId:t,entityType:n}=t.payload,i=yield select(selectApiConfigs$2),e=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=yield select(selectIsOLPEnabled),r=yield select(selectPermissionsByEntity(n,t));if(!r||"success"!==r.status&&"pending"!==r.status){yield put(actions.fetchObjectPermissionsStarted({entityId:t,entityType:n}));try{let r={};if(a)r=yield call$i(getObjectPermissions,e,o,{entityType:n,entityId:t});else{let e=yield select(selectMyRights);if("success"!==e.status&&"pending"!==e.status){yield put(actions.fetchMyRightsStarted);try{var s=yield call$i(getMyRights,i);yield put(actions.fetchMyRightsSucceeded(s)),e=yield select(selectMyRights)}catch(e){throw yield put(actions.fetchMyRightsFailed),e}}else"pending"===e.status&&(yield take([actions.fetchMyRightsFailed,actions.fetchMyRightsSucceeded]),e=yield select(selectMyRights));const l=e["myRights"];getPermissionTypesToQuery(n).forEach(n=>{var{action:e,resource:t}=n.targetActions.reduce((e,t)=>(e.action[t.targetAction]=convertPermissionsToRights(t.resource||n.targetObjectType,t.targetAction,l),e.resource=t.resource,e),{action:{}});r[t||n.targetObjectType]=e})}yield put(actions.fetchObjectPermissionsSucceeded({entityId:t,entityType:n,permissions:r}))}catch(e){actions.fetchObjectPermissionsFailed({entityId:t,entityType:n})}}}function*watchPermissionsStart(){yield takeEvery$1(actions.fetchObjectPermissionsStart.type,fetchObjectPermissions)}function*rootSaga(){yield all([watchPermissionsStart()])}function getPermissionsModule(){return{id:namespace,reducerMap:{[namespace]:permissionsReducer},sagas:[rootSaga],initialActions:[]}}const useOrganizationPermissions=e=>{const t=react.exports.useRef(),n=useDispatch(),r=null==(o=useSelector(userSelector$2).organization)?void 0:o.organizationId,i=useSelector(selectPermissionsByEntity(EAuthResourceType.Organization,String(r),e));react.exports.useEffect(()=>{!r||i&&"failure"!==i.status&&"idle"!==i.status&&t.current===r||(t.current=r,n(actions.fetchObjectPermissionsStart({entityType:EAuthResourceType.Organization,entityId:String(r)})))},[n,r,i]);var o=react.exports.useCallback(e=>{return!isPermissionLoading(i)&&hasPermission(i,e)},[i]);return{permissions:i,hasPermission:o}},rateLimiter=new RateLimiter,checkAndDecodeBase64String=t=>{if(null==t||!t.trim())return t;try{return window.btoa(window.atob(t))==t?window.atob(t):t}catch(e){return t}};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(),getPermissionsModule()]);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(AIWareCacheProvider,{children:jsxRuntime.exports.jsxs(AIWareThemeProvider$1,{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){var n;validateConfig(e)&&(n=e["authToken"],n=checkAndDecodeBase64String(n||""),store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{authToken:n,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$1,lightTheme:lightTheme$1}},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:"9458af8f7",releaseDate:"2023-07-13T00:34:02.877Z"});export{createReducer as $,AIWareIntlProvider as A,Box$1 as B,FormControl$1 as C,TextField$1 as D,classNames as E,FormattedMessage$1 as F,Grid$1 as G,resetPasswordRequest as H,InputLabel$1 as I,InputAdornment$1 as J,IconButton$1 as K,LoadingButton$1 as L,Select$1 as M,Location as N,OutlinedInput$1 as O,Provider$2 as P,MenuItem$1 as Q,Routes as R,Switch$1 as S,Typography$1 as T,Button$1 as U,Divider$1 as V,createTheme$1 as W,systemStyled as X,useThemeProps$1 as Y,createAction as Z,_extends$2 as _,generateUtilityClasses as a,Popper$1 as a$,createSlice as a0,ENGINE_OWNER_TYPES as a1,ENGINE_FILTER_TYPES as a2,DynamicModuleLoader as a3,preferredLanguageSelector as a4,baseUrlSelector as a5,rootApiSelector as a6,sessionTokenSelector as a7,graphEndpointSelector as a8,controllerNodeRedImageSelector as a9,fetchTemplateGallery as aA,isRevisionsExistOnServerRequest as aB,FormLabel$1 as aC,default_1$b as aD,FormGroup$1 as aE,FormControlLabel$1 as aF,Checkbox$1 as aG,fetchTemplateGalleryFallback as aH,Card$1 as aI,CardContent$1 as aJ,img$m as aK,CardActions$1 as aL,flowStyles as aM,NoResults as aN,CircularProgress$1 as aO,img$c as aP,Dialog$1 as aQ,setApiEndpoint as aR,TableContainer$1 as aS,Table$1 as aT,TableHead$1 as aU,TableRow$1 as aV,TableCell$1 as aW,TableSortLabel$1 as aX,TableBody$1 as aY,img$h as aZ,default_1 as a_,controllerUrlSelector as aa,automateControllerUrlSelector as ab,flowCenterDialogSelector as ac,automateUrlSelector as ad,Portal$1 as ae,flowCenterDialogReducer as af,List$2 as ag,ListItem$1 as ah,ListItemIcon$1 as ai,ListItemText$1 as aj,flowCenterDialogAction as ak,all as al,img$o as am,img$p as an,img$r as ao,img$s as ap,Tooltip$1 as aq,img$i as ar,img$G as as,Skeleton$1 as at,takeLatest$1 as au,fetchAllTags as av,put as aw,select as ax,fetchFlows as ay,call$i as az,styled$1 as b,RadioGroup$1 as b$,ClickAwayListener as b0,Fade$1 as b1,img$t as b2,img$q as b3,img$Q as b4,img$C as b5,DialogTitle$1 as b6,DialogContent$1 as b7,DialogActions$1 as b8,Snackbar$1 as b9,reactDom as bA,Transition$1 as bB,__awaiter$d as bC,__generator$2 as bD,__spread as bE,TransitionGroup$1 as bF,connect$1 as bG,Bookmark as bH,EngineFlagIcons as bI,createAsyncThunk as bJ,withStyles as bK,getConfigModule as bL,getAuthModule as bM,getSnackbarModule as bN,AIWareCacheProvider as bO,img$R as bP,img$e as bQ,img$d as bR,isEmpty_1 as bS,Backdrop$1 as bT,getDefaultMiddleware as bU,isNil_1 as bV,UpDown as bW,Icon$1 as bX,get_1 as bY,map_1 as bZ,keys_1 as b_,default_1$6 as ba,img$j as bb,img$l as bc,img$U as bd,Tabs$2 as be,Tab$2 as bf,deleteEngine as bg,fetchEngine as bh,img$k as bi,AIWareFormatMessage as bj,FormattedDate as bk,fetchVeritoneGraphQLApi as bl,useTheme as bm,KeyboardArrowRight as bn,KeyboardArrowLeft as bo,useId as bp,InputUnstyled as bq,isHostComponent as br,getDefaultExportFromNamespaceIfNotNamed as bs,commonjsRequire as bt,_typeof$4 as bu,_inheritsLoose$2 as bv,_assertThisInitialized$1 as bw,React as bx,hoistNonReactStatics_cjs as by,_defineProperty$1 as bz,Paper$1 as c,isArray_1 as c$,Avatar$1 as c0,img$w as c1,baseGraphQLApi as c2,FormHelperText$2 as c3,img$g as c4,StyledEngineProvider as c5,ThemeProvider as c6,lightTheme$1 as c7,CssBaseline as c8,Hide as c9,mountPanel$1 as cA,DialogContentText$1 as cB,userSelector$2 as cC,MoreVert$1 as cD,Menu$1 as cE,Edit as cF,Upload as cG,Delete as cH,CustomTabs as cI,useBackupImg as cJ,img$1z as cK,validate as cL,configSelector as cM,baseGraphQLApiWithError as cN,VerifiedFilled as cO,Add as cP,ExpandLess as cQ,ExpandMore as cR,Collapse$1 as cS,img$16 as cT,Filter$1 as cU,DynamicTable as cV,useTheme$3 as cW,getThemeProps as cX,useEnhancedEffect$1 as cY,React$1 as cZ,_arrayPush as c_,has_1 as ca,showMessage as cb,MessageSeverity as cc,Radio$2 as cd,createSvgIcon$2 as ce,_createCompounder as cf,_baseIteratee as cg,isArrayLike_1 as ch,toInteger_1 as ci,_toPropertyKey as cj,_setPrototypeOf$3 as ck,commonjsGlobal$1 as cl,combineReducers as cm,createSelector$1 as cn,fork as co,AIWareThemeProvider$1 as cp,Stack$4 as cq,Close$1 as cr,FullscreenExit as cs,Fullscreen as ct,TabPanel as cu,default_1$8 as cv,unmountPanel$1 as cw,AvailableComponents as cx,delay$1 as cy,hidePanel$1 as cz,capitalize$2 as d,_baseEach as d$,_baseToString as d0,_baseTrim as d1,_castSlice as d2,_stringToArray as d3,toString_1 as d4,ReactIs as d5,upperFirst_1 as d6,isString_1 as d7,_baseGet as d8,_baseSlice as d9,useTheme$2 as dA,useControlled as dB,useEventCallback as dC,ButtonBase$1 as dD,useForkRef as dE,getDefaultExportFromCjs as dF,isObject_1 as dG,MoreHor as dH,takeEvery$1 as dI,EngineCategoryIcons as dJ,selectApiConfigs$2 as dK,panelsSelector as dL,tabsClasses$1 as dM,AlarmTwo as dN,EditList as dO,Chip$1 as dP,usePreviousProps$1 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,_arrayMap as dY,_Symbol as dZ,isArguments_1 as d_,_castPath as da,_toKey as db,_isIndex as dc,channel$1 as dd,useIntl as de,VideoCamera as df,Image$1 as dg,Sound as dh,Description as di,toNumber_1 as dj,ProgressStepper as dk,size_1 as dl,take as dm,CurlyBraces as dn,UnknownDocument as dp,sdkEventManager as dq,SdkEvents as dr,SdkError as ds,EngineClassIcons as dt,Mode2 as du,EngineModeIcons as dv,DeploymentModelIcons as dw,guid as dx,forceReflow as dy,alpha as dz,_objectWithoutPropertiesLoose$2 as e,hasPermission as e$,_arrayFilter as e0,_getNative as e1,eq_1 as e2,_root as e3,_Uint8Array as e4,_overArg as e5,_isPrototype as e6,isObjectLike_1 as e7,_baseGetTag as e8,_arrayLikeKeys as e9,img$1x as eA,img$J as eB,authSelector as eC,ListItemAvatar$1 as eD,emphasize as eE,useSlotProps as eF,_arraySome as eG,EntityType as eH,injectIntl as eI,ErrorBoundary$1 as eJ,EPermissionAction as eK,Process as eL,Information as eM,NewFolder as eN,SpecialFolder as eO,User as eP,Source as eQ,Search$1 as eR,selectIsOLPEnabled as eS,ListItemSecondaryAction$1 as eT,getLibraryModule as eU,cmsUrlSelector as eV,betaFeaturesSelector as eW,SearchStructuredData as eX,Grow$1 as eY,index as eZ,actions as e_,isBuffer$3 as ea,isFunction_1 as eb,isTypedArray_1 as ec,_Stack as ed,_baseFor as ee,identity_1 as ef,_isIterateeCall as eg,isSymbol_1 as eh,_baseMap as ei,_baseUnary as ej,memoizeOne as ek,createBox$1 as el,StepperContext$1 as em,StepContext$1 as en,SvgIcon$1 as eo,StepConnector$1 as ep,_Set as eq,_setToArray as er,_SetCache as es,_cacheHas as et,img$N as eu,img$M as ev,img$1v as ew,img$1u as ex,img$1t as ey,img$K as ez,clsx as f,green$1 as f$,UserAddFilled as f0,Popover$1 as f1,MenuList$1 as f2,MoveFolder as f3,EAuthResourceType as f4,Slide$1 as f5,img$a as f6,selectPanelByPanelName as f7,FullScreenContainer as f8,isPermissionLoading as f9,selectOrgId as fA,selectIsUserAdmin as fB,AvatarGroup$1 as fC,ErrorState$2 as fD,NullState$2 as fE,Group as fF,PermissionChangedAction as fG,Lock as fH,useOrganizationPermissions as fI,EAuthSubResourceType as fJ,AddGroup as fK,initialConfigSelector as fL,ConfirmationModal as fM,EnumHelpers as fN,formatBytes as fO,LinearProgress$1 as fP,NotInterested as fQ,mountPanelForResponse$1 as fR,ArrowDown as fS,ArrowUp as fT,useInterval as fU,Iam as fV,Users as fW,SecurityGroup as fX,getOrganizationPanelModule as fY,Lock2 as fZ,NoApps as f_,Settings$2 as fa,Hamburger as fb,List as fc,Download as fd,Badge$1 as fe,convertEntityToAuthResource as ff,selectUserOrgEdgeVersion as fg,EditAttributes as fh,gqlIntrospection as fi,ProcessingDetail as fj,img$v as fk,img$x as fl,img$4 as fm,FilterRemove as fn,CheckCircle as fo,FolderOpen as fp,Voice as fq,useDoubleClick as fr,FolderFilled as fs,Time as ft,img$y as fu,Undefined as fv,PodcastSource as fw,YoutubeSource as fx,TVSource as fy,RadioSource as fz,generateUtilityClass as g,unmountAllPanel as g$,md5 as g0,selectIsSuperAdmin as g1,organizations_selector as g2,actions$5 as g3,AddUser as g4,selectors as g5,LibraryDropdown as g6,Remove as g7,Save as g8,Input$3 as g9,Hidden as gA,toFinite_1 as gB,_baseForOwn as gC,_arrayReduce as gD,hasIn_1 as gE,useSyncExternalStoreExports as gF,Packages as gG,Resources$1 as gH,selectUserCanCreatePackage as gI,Engines as gJ,PackagesAvatar as gK,actionChannel as gL,cancelled as gM,flush$3 as gN,cancel as gO,FlowCenter2 as gP,registry as gQ,registerComponent as gR,AvailableWidgets as gS,updatePanelMicroFrontendProps as gT,setData as gU,root as gV,mountWidget as gW,unmountWidget as gX,mountPanel as gY,unmountPanel as gZ,hidePanel as g_,Copy as ga,ArrowForward as gb,Modal$1 as gc,_baseIsEqual as gd,Slider$1 as ge,_getSymbols as gf,stubArray_1 as gg,_baseGetAllKeys as gh,_getTag as gi,_nodeUtil as gj,_getAllKeys as gk,_castFunction as gl,Article as gm,Task as gn,View as go,_objectSpread2 as gp,serialize as gq,stringify$2 as gr,compile as gs,Check as gt,FormattedRelativeTime$1 as gu,BottomQueue as gv,TopQueue as gw,Pause as gx,Cancel as gy,Folder as gz,composeClasses as h,init as h0,aiwareEvents as h1,createSvgIcon$1 as i,jsxRuntime as j,interopRequireDefault as k,Route as l,makeStyles as m,useDispatch as n,useSelector as o,authStatusSelector as p,authContextSelector as q,react as r,store$4 as s,AuthContext as t,useThemeProps as u,lodash as v,Alert$1 as w,useNavigate as x,useLocation as y,authErrorMessage as z};
1486
+ `,l={entityId:t,entityType:e};try{a=yield baseGraphQLApi({query:s,operationName:n,variables:l,graphEndpoint:u,token:d})}catch(e){i=!0}if(a.errors){if(0===(o=a.errors.filter(({message:e})=>e.includes(' does not exist in "AuthPermissionType" enum.')).map(({message:e})=>{var t='Value "',n=e.substring(t.length).indexOf('"');return e.substring(t.length,t.length+n)})).length)throw i=!0,a={},new Error((null==(f=(a.errors||[])[0])?void 0:f.message)||"Error")}else i=!0}const c=a.data||{};return Object.keys(c).map(e=>{var t=e.split("__");return 3===t.length?{fetchedTargetEntityType:t[0],fetchedTargetGroupType:t[1],fetchedTargetAction:t[2],hasPermission:c[e][0].hasPermission}:{fetchedTargetEntityType:t[0],fetchedTargetAction:t[1],hasPermission:c[e][0].hasPermission}}).reduce((e,t)=>{var n=t.fetchedTargetGroupType||t.fetchedTargetEntityType;return t.hasPermission&&(e[n]||(e[n]={}),e[n][t.fetchedTargetAction]=t.hasPermission),e},{})})}function getMyRights(t){return __awaiter(this,void 0,void 0,function*(){var e="getMyRights";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getMyRights {\n myRights {\n operations\n }\n }\n ",operationName:e},t))).myRights.operations})}const selectPermissionsByEntity=(t,n,r)=>e=>{return t&&n&&(e=e[namespace].permissionsByObject[t])&&e[n]?e[n][r||t]:void 0},selectMyRights=e=>e[namespace].rights;var index=Object.freeze({__proto__:null,selectPermissionsByEntity:selectPermissionsByEntity,selectMyRights:selectMyRights});function*fetchObjectPermissions(t){var{entityId:t,entityType:n}=t.payload,i=yield select(selectApiConfigs$2),e=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=yield select(selectIsOLPEnabled),r=yield select(selectPermissionsByEntity(n,t));if(!r||"success"!==r.status&&"pending"!==r.status){yield put(actions.fetchObjectPermissionsStarted({entityId:t,entityType:n}));try{let r={};if(a)r=yield call$i(getObjectPermissions,e,o,{entityType:n,entityId:t});else{let e=yield select(selectMyRights);if("success"!==e.status&&"pending"!==e.status){yield put(actions.fetchMyRightsStarted);try{var s=yield call$i(getMyRights,i);yield put(actions.fetchMyRightsSucceeded(s)),e=yield select(selectMyRights)}catch(e){throw yield put(actions.fetchMyRightsFailed),e}}else"pending"===e.status&&(yield take([actions.fetchMyRightsFailed,actions.fetchMyRightsSucceeded]),e=yield select(selectMyRights));const l=e["myRights"];getPermissionTypesToQuery(n).forEach(n=>{var{action:e,resource:t}=n.targetActions.reduce((e,t)=>(e.action[t.targetAction]=convertPermissionsToRights(t.resource||n.targetObjectType,t.targetAction,l),e.resource=t.resource,e),{action:{}});r[t||n.targetObjectType]=e})}yield put(actions.fetchObjectPermissionsSucceeded({entityId:t,entityType:n,permissions:r}))}catch(e){actions.fetchObjectPermissionsFailed({entityId:t,entityType:n})}}}function*watchPermissionsStart(){yield takeEvery$1(actions.fetchObjectPermissionsStart.type,fetchObjectPermissions)}function*rootSaga(){yield all([watchPermissionsStart()])}function getPermissionsModule(){return{id:namespace,reducerMap:{[namespace]:permissionsReducer},sagas:[rootSaga],initialActions:[]}}const useOrganizationPermissions=e=>{const t=react.exports.useRef(),n=useDispatch(),r=null==(o=useSelector(userSelector$2).organization)?void 0:o.organizationId,i=useSelector(selectPermissionsByEntity(EAuthResourceType.Organization,String(r),e));react.exports.useEffect(()=>{!r||i&&"failure"!==i.status&&"idle"!==i.status&&t.current===r||(t.current=r,n(actions.fetchObjectPermissionsStart({entityType:EAuthResourceType.Organization,entityId:String(r)})))},[n,r,i]);var o=react.exports.useCallback(e=>{return!isPermissionLoading(i)&&hasPermission(i,e)},[i]);return{permissions:i,hasPermission:o}},rateLimiter=new RateLimiter,checkAndDecodeBase64String=t=>{if(null==t||!t.trim())return t;try{return window.btoa(window.atob(t))==t?window.atob(t):t}catch(e){return t}};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(),getPermissionsModule()]);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(AIWareCacheProvider,{children:jsxRuntime.exports.jsxs(AIWareThemeProvider$1,{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){var n;validateConfig(e)&&(n=e["authToken"],n=checkAndDecodeBase64String(n||""),store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{authToken:n,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$1,lightTheme:lightTheme$1}},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:"24ee7bfbc",releaseDate:"2023-07-13T00:57:59.063Z"});export{createReducer as $,AIWareIntlProvider as A,Box$1 as B,FormControl$1 as C,TextField$1 as D,classNames as E,FormattedMessage$1 as F,Grid$1 as G,resetPasswordRequest as H,InputLabel$1 as I,InputAdornment$1 as J,IconButton$1 as K,LoadingButton$1 as L,Select$1 as M,Location as N,OutlinedInput$1 as O,Provider$2 as P,MenuItem$1 as Q,Routes as R,Switch$1 as S,Typography$1 as T,Button$1 as U,Divider$1 as V,createTheme$1 as W,systemStyled as X,useThemeProps$1 as Y,createAction as Z,_extends$2 as _,generateUtilityClasses as a,Popper$1 as a$,createSlice as a0,ENGINE_OWNER_TYPES as a1,ENGINE_FILTER_TYPES as a2,DynamicModuleLoader as a3,preferredLanguageSelector as a4,baseUrlSelector as a5,rootApiSelector as a6,sessionTokenSelector as a7,graphEndpointSelector as a8,controllerNodeRedImageSelector as a9,fetchTemplateGallery as aA,isRevisionsExistOnServerRequest as aB,FormLabel$1 as aC,default_1$b as aD,FormGroup$1 as aE,FormControlLabel$1 as aF,Checkbox$1 as aG,fetchTemplateGalleryFallback as aH,Card$1 as aI,CardContent$1 as aJ,img$m as aK,CardActions$1 as aL,flowStyles as aM,NoResults as aN,CircularProgress$1 as aO,img$c as aP,Dialog$1 as aQ,setApiEndpoint as aR,TableContainer$1 as aS,Table$1 as aT,TableHead$1 as aU,TableRow$1 as aV,TableCell$1 as aW,TableSortLabel$1 as aX,TableBody$1 as aY,img$h as aZ,default_1 as a_,controllerUrlSelector as aa,automateControllerUrlSelector as ab,flowCenterDialogSelector as ac,automateUrlSelector as ad,Portal$1 as ae,flowCenterDialogReducer as af,List$2 as ag,ListItem$1 as ah,ListItemIcon$1 as ai,ListItemText$1 as aj,flowCenterDialogAction as ak,all as al,img$o as am,img$p as an,img$r as ao,img$s as ap,Tooltip$1 as aq,img$i as ar,img$G as as,Skeleton$1 as at,takeLatest$1 as au,fetchAllTags as av,put as aw,select as ax,fetchFlows as ay,call$i as az,styled$1 as b,RadioGroup$1 as b$,ClickAwayListener as b0,Fade$1 as b1,img$t as b2,img$q as b3,img$Q as b4,img$C as b5,DialogTitle$1 as b6,DialogContent$1 as b7,DialogActions$1 as b8,Snackbar$1 as b9,reactDom as bA,Transition$1 as bB,__awaiter$d as bC,__generator$2 as bD,__spread as bE,TransitionGroup$1 as bF,connect$1 as bG,Bookmark as bH,EngineFlagIcons as bI,createAsyncThunk as bJ,withStyles as bK,getConfigModule as bL,getAuthModule as bM,getSnackbarModule as bN,AIWareCacheProvider as bO,img$R as bP,img$e as bQ,img$d as bR,isEmpty_1 as bS,Backdrop$1 as bT,getDefaultMiddleware as bU,isNil_1 as bV,UpDown as bW,Icon$1 as bX,get_1 as bY,map_1 as bZ,keys_1 as b_,default_1$6 as ba,img$j as bb,img$l as bc,img$U as bd,Tabs$2 as be,Tab$2 as bf,deleteEngine as bg,fetchEngine as bh,img$k as bi,AIWareFormatMessage as bj,FormattedDate as bk,fetchVeritoneGraphQLApi as bl,useTheme as bm,KeyboardArrowRight as bn,KeyboardArrowLeft as bo,useId as bp,InputUnstyled as bq,isHostComponent as br,getDefaultExportFromNamespaceIfNotNamed as bs,commonjsRequire as bt,_typeof$4 as bu,_inheritsLoose$2 as bv,_assertThisInitialized$1 as bw,React as bx,hoistNonReactStatics_cjs as by,_defineProperty$1 as bz,Paper$1 as c,isArray_1 as c$,Avatar$1 as c0,img$w as c1,baseGraphQLApi as c2,FormHelperText$2 as c3,img$g as c4,StyledEngineProvider as c5,ThemeProvider as c6,lightTheme$1 as c7,CssBaseline as c8,Hide as c9,mountPanel$1 as cA,DialogContentText$1 as cB,userSelector$2 as cC,MoreVert$1 as cD,Menu$1 as cE,Edit as cF,Upload as cG,Delete as cH,CustomTabs as cI,useBackupImg as cJ,img$1z as cK,validate as cL,configSelector as cM,baseGraphQLApiWithError as cN,VerifiedFilled as cO,Add as cP,ExpandLess as cQ,ExpandMore as cR,Collapse$1 as cS,img$16 as cT,Filter$1 as cU,DynamicTable as cV,useTheme$3 as cW,getThemeProps as cX,useEnhancedEffect$1 as cY,React$1 as cZ,_arrayPush as c_,has_1 as ca,showMessage as cb,MessageSeverity as cc,Radio$2 as cd,createSvgIcon$2 as ce,_createCompounder as cf,_baseIteratee as cg,isArrayLike_1 as ch,toInteger_1 as ci,_toPropertyKey as cj,_setPrototypeOf$3 as ck,commonjsGlobal$1 as cl,combineReducers as cm,createSelector$1 as cn,fork as co,AIWareThemeProvider$1 as cp,Stack$4 as cq,Close$1 as cr,FullscreenExit as cs,Fullscreen as ct,TabPanel as cu,default_1$8 as cv,unmountPanel$1 as cw,AvailableComponents as cx,delay$1 as cy,hidePanel$1 as cz,capitalize$2 as d,_baseEach as d$,_baseToString as d0,_baseTrim as d1,_castSlice as d2,_stringToArray as d3,toString_1 as d4,ReactIs as d5,upperFirst_1 as d6,isString_1 as d7,_baseGet as d8,_baseSlice as d9,useTheme$2 as dA,useControlled as dB,useEventCallback as dC,ButtonBase$1 as dD,useForkRef as dE,getDefaultExportFromCjs as dF,isObject_1 as dG,MoreHor as dH,takeEvery$1 as dI,EngineCategoryIcons as dJ,selectApiConfigs$2 as dK,panelsSelector as dL,tabsClasses$1 as dM,AlarmTwo as dN,EditList as dO,Chip$1 as dP,usePreviousProps$1 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,_arrayMap as dY,_Symbol as dZ,isArguments_1 as d_,_castPath as da,_toKey as db,_isIndex as dc,channel$1 as dd,useIntl as de,VideoCamera as df,Image$1 as dg,Sound as dh,Description as di,toNumber_1 as dj,ProgressStepper as dk,size_1 as dl,take as dm,CurlyBraces as dn,UnknownDocument as dp,sdkEventManager as dq,SdkEvents as dr,SdkError as ds,EngineClassIcons as dt,Mode2 as du,EngineModeIcons as dv,DeploymentModelIcons as dw,guid as dx,forceReflow as dy,alpha as dz,_objectWithoutPropertiesLoose$2 as e,hasPermission as e$,_arrayFilter as e0,_getNative as e1,eq_1 as e2,_root as e3,_Uint8Array as e4,_overArg as e5,_isPrototype as e6,isObjectLike_1 as e7,_baseGetTag as e8,_arrayLikeKeys as e9,img$1x as eA,img$J as eB,authSelector as eC,ListItemAvatar$1 as eD,emphasize as eE,useSlotProps as eF,_arraySome as eG,EntityType as eH,injectIntl as eI,ErrorBoundary$1 as eJ,EPermissionAction as eK,Process as eL,Information as eM,NewFolder as eN,SpecialFolder as eO,User as eP,Source as eQ,Search$1 as eR,selectIsOLPEnabled as eS,ListItemSecondaryAction$1 as eT,getLibraryModule as eU,cmsUrlSelector as eV,betaFeaturesSelector as eW,SearchStructuredData as eX,Grow$1 as eY,index as eZ,actions as e_,isBuffer$3 as ea,isFunction_1 as eb,isTypedArray_1 as ec,_Stack as ed,_baseFor as ee,identity_1 as ef,_isIterateeCall as eg,isSymbol_1 as eh,_baseMap as ei,_baseUnary as ej,memoizeOne as ek,createBox$1 as el,StepperContext$1 as em,StepContext$1 as en,SvgIcon$1 as eo,StepConnector$1 as ep,_Set as eq,_setToArray as er,_SetCache as es,_cacheHas as et,img$N as eu,img$M as ev,img$1v as ew,img$1u as ex,img$1t as ey,img$K as ez,clsx as f,green$1 as f$,UserAddFilled as f0,Popover$1 as f1,MenuList$1 as f2,MoveFolder as f3,EAuthResourceType as f4,Slide$1 as f5,img$a as f6,selectPanelByPanelName as f7,FullScreenContainer as f8,isPermissionLoading as f9,selectOrgId as fA,selectIsUserAdmin as fB,AvatarGroup$1 as fC,ErrorState$2 as fD,NullState$2 as fE,Group as fF,PermissionChangedAction as fG,Lock as fH,useOrganizationPermissions as fI,EAuthSubResourceType as fJ,AddGroup as fK,initialConfigSelector as fL,ConfirmationModal as fM,EnumHelpers as fN,formatBytes as fO,LinearProgress$1 as fP,NotInterested as fQ,mountPanelForResponse$1 as fR,ArrowDown as fS,ArrowUp as fT,useInterval as fU,Iam as fV,Users as fW,SecurityGroup as fX,getOrganizationPanelModule as fY,Lock2 as fZ,NoApps as f_,Settings$2 as fa,Hamburger as fb,List as fc,Download as fd,Badge$1 as fe,convertEntityToAuthResource as ff,selectUserOrgEdgeVersion as fg,EditAttributes as fh,gqlIntrospection as fi,ProcessingDetail as fj,img$v as fk,img$x as fl,img$4 as fm,FilterRemove as fn,CheckCircle as fo,FolderOpen as fp,Voice as fq,useDoubleClick as fr,FolderFilled as fs,Time as ft,img$y as fu,Undefined as fv,PodcastSource as fw,YoutubeSource as fx,TVSource as fy,RadioSource as fz,generateUtilityClass as g,unmountAllPanel as g$,md5 as g0,selectIsSuperAdmin as g1,organizations_selector as g2,actions$5 as g3,AddUser as g4,selectors as g5,LibraryDropdown as g6,Remove as g7,Save as g8,Input$3 as g9,Hidden as gA,toFinite_1 as gB,_baseForOwn as gC,_arrayReduce as gD,hasIn_1 as gE,useSyncExternalStoreExports as gF,Packages as gG,Resources$1 as gH,selectUserCanCreatePackage as gI,Engines as gJ,PackagesAvatar as gK,actionChannel as gL,cancelled as gM,flush$3 as gN,cancel as gO,FlowCenter2 as gP,registry as gQ,registerComponent as gR,AvailableWidgets as gS,updatePanelMicroFrontendProps as gT,setData as gU,root as gV,mountWidget as gW,unmountWidget as gX,mountPanel as gY,unmountPanel as gZ,hidePanel as g_,Copy as ga,ArrowForward as gb,Modal$1 as gc,_baseIsEqual as gd,Slider$1 as ge,_getSymbols as gf,stubArray_1 as gg,_baseGetAllKeys as gh,_getTag as gi,_nodeUtil as gj,_getAllKeys as gk,_castFunction as gl,Article as gm,Task as gn,View as go,_objectSpread2 as gp,serialize as gq,stringify$2 as gr,compile as gs,Check as gt,FormattedRelativeTime$1 as gu,BottomQueue as gv,TopQueue as gw,Pause as gx,Cancel as gy,Folder as gz,composeClasses as h,init as h0,aiwareEvents as h1,createSvgIcon$1 as i,jsxRuntime as j,interopRequireDefault as k,Route as l,makeStyles as m,useDispatch as n,useSelector as o,authStatusSelector as p,authContextSelector as q,react as r,store$4 as s,AuthContext as t,useThemeProps as u,lodash as v,Alert$1 as w,useNavigate as x,useLocation as y,authErrorMessage as z};
package/js-core.esm.js.gz CHANGED
Binary file
package/js-core.umd.css CHANGED
@@ -288,6 +288,98 @@
288
288
  background-color: #fff;
289
289
  }
290
290
 
291
+ /* dosis-200normal - latin */
292
+ @font-face {
293
+ font-family: 'Dosis';
294
+ font-style: normal;
295
+ font-display: swap;
296
+ font-weight: 200;
297
+ src:
298
+ local('Dosis Extra Light '),
299
+ local('Dosis-Extra Light'),
300
+ url('./files/dosis-latin-200.woff2') format('woff2'), /* Super Modern Browsers */
301
+ url('./files/dosis-latin-200.woff') format('woff'); /* Modern Browsers */
302
+ }
303
+
304
+ /* dosis-300normal - latin */
305
+ @font-face {
306
+ font-family: 'Dosis';
307
+ font-style: normal;
308
+ font-display: swap;
309
+ font-weight: 300;
310
+ src:
311
+ local('Dosis Light '),
312
+ local('Dosis-Light'),
313
+ url('./files/dosis-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
314
+ url('./files/dosis-latin-300.woff') format('woff'); /* Modern Browsers */
315
+ }
316
+
317
+ /* dosis-400normal - latin */
318
+ @font-face {
319
+ font-family: 'Dosis';
320
+ font-style: normal;
321
+ font-display: swap;
322
+ font-weight: 400;
323
+ src:
324
+ local('Dosis Regular '),
325
+ local('Dosis-Regular'),
326
+ url('./files/dosis-latin-400.woff2') format('woff2'), /* Super Modern Browsers */
327
+ url('./files/dosis-latin-400.woff') format('woff'); /* Modern Browsers */
328
+ }
329
+
330
+ /* dosis-500normal - latin */
331
+ @font-face {
332
+ font-family: 'Dosis';
333
+ font-style: normal;
334
+ font-display: swap;
335
+ font-weight: 500;
336
+ src:
337
+ local('Dosis Medium '),
338
+ local('Dosis-Medium'),
339
+ url('./files/dosis-latin-500.woff2') format('woff2'), /* Super Modern Browsers */
340
+ url('./files/dosis-latin-500.woff') format('woff'); /* Modern Browsers */
341
+ }
342
+
343
+ /* dosis-600normal - latin */
344
+ @font-face {
345
+ font-family: 'Dosis';
346
+ font-style: normal;
347
+ font-display: swap;
348
+ font-weight: 600;
349
+ src:
350
+ local('Dosis SemiBold '),
351
+ local('Dosis-SemiBold'),
352
+ url('./files/dosis-latin-600.woff2') format('woff2'), /* Super Modern Browsers */
353
+ url('./files/dosis-latin-600.woff') format('woff'); /* Modern Browsers */
354
+ }
355
+
356
+ /* dosis-700normal - latin */
357
+ @font-face {
358
+ font-family: 'Dosis';
359
+ font-style: normal;
360
+ font-display: swap;
361
+ font-weight: 700;
362
+ src:
363
+ local('Dosis Bold '),
364
+ local('Dosis-Bold'),
365
+ url('./files/dosis-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
366
+ url('./files/dosis-latin-700.woff') format('woff'); /* Modern Browsers */
367
+ }
368
+
369
+ /* dosis-800normal - latin */
370
+ @font-face {
371
+ font-family: 'Dosis';
372
+ font-style: normal;
373
+ font-display: swap;
374
+ font-weight: 800;
375
+ src:
376
+ local('Dosis ExtraBold '),
377
+ local('Dosis-ExtraBold'),
378
+ url('./files/dosis-latin-800.woff2') format('woff2'), /* Super Modern Browsers */
379
+ url('./files/dosis-latin-800.woff') format('woff'); /* Modern Browsers */
380
+ }
381
+
382
+
291
383
  /* nunito-200normal - latin */
292
384
  @font-face {
293
385
  font-family: 'Nunito';
@@ -471,98 +563,6 @@
471
563
  }
472
564
 
473
565
 
474
- /* dosis-200normal - latin */
475
- @font-face {
476
- font-family: 'Dosis';
477
- font-style: normal;
478
- font-display: swap;
479
- font-weight: 200;
480
- src:
481
- local('Dosis Extra Light '),
482
- local('Dosis-Extra Light'),
483
- url('./files/dosis-latin-200.woff2') format('woff2'), /* Super Modern Browsers */
484
- url('./files/dosis-latin-200.woff') format('woff'); /* Modern Browsers */
485
- }
486
-
487
- /* dosis-300normal - latin */
488
- @font-face {
489
- font-family: 'Dosis';
490
- font-style: normal;
491
- font-display: swap;
492
- font-weight: 300;
493
- src:
494
- local('Dosis Light '),
495
- local('Dosis-Light'),
496
- url('./files/dosis-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
497
- url('./files/dosis-latin-300.woff') format('woff'); /* Modern Browsers */
498
- }
499
-
500
- /* dosis-400normal - latin */
501
- @font-face {
502
- font-family: 'Dosis';
503
- font-style: normal;
504
- font-display: swap;
505
- font-weight: 400;
506
- src:
507
- local('Dosis Regular '),
508
- local('Dosis-Regular'),
509
- url('./files/dosis-latin-400.woff2') format('woff2'), /* Super Modern Browsers */
510
- url('./files/dosis-latin-400.woff') format('woff'); /* Modern Browsers */
511
- }
512
-
513
- /* dosis-500normal - latin */
514
- @font-face {
515
- font-family: 'Dosis';
516
- font-style: normal;
517
- font-display: swap;
518
- font-weight: 500;
519
- src:
520
- local('Dosis Medium '),
521
- local('Dosis-Medium'),
522
- url('./files/dosis-latin-500.woff2') format('woff2'), /* Super Modern Browsers */
523
- url('./files/dosis-latin-500.woff') format('woff'); /* Modern Browsers */
524
- }
525
-
526
- /* dosis-600normal - latin */
527
- @font-face {
528
- font-family: 'Dosis';
529
- font-style: normal;
530
- font-display: swap;
531
- font-weight: 600;
532
- src:
533
- local('Dosis SemiBold '),
534
- local('Dosis-SemiBold'),
535
- url('./files/dosis-latin-600.woff2') format('woff2'), /* Super Modern Browsers */
536
- url('./files/dosis-latin-600.woff') format('woff'); /* Modern Browsers */
537
- }
538
-
539
- /* dosis-700normal - latin */
540
- @font-face {
541
- font-family: 'Dosis';
542
- font-style: normal;
543
- font-display: swap;
544
- font-weight: 700;
545
- src:
546
- local('Dosis Bold '),
547
- local('Dosis-Bold'),
548
- url('./files/dosis-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
549
- url('./files/dosis-latin-700.woff') format('woff'); /* Modern Browsers */
550
- }
551
-
552
- /* dosis-800normal - latin */
553
- @font-face {
554
- font-family: 'Dosis';
555
- font-style: normal;
556
- font-display: swap;
557
- font-weight: 800;
558
- src:
559
- local('Dosis ExtraBold '),
560
- local('Dosis-ExtraBold'),
561
- url('./files/dosis-latin-800.woff2') format('woff2'), /* Super Modern Browsers */
562
- url('./files/dosis-latin-800.woff') format('woff'); /* Modern Browsers */
563
- }
564
-
565
-
566
566
  /*!
567
567
  * Cropper.js v1.5.9
568
568
  * https://fengyuanchen.github.io/cropperjs
Binary file