aiware-js 1.0.0-master.776 → 1.0.0-master.778

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
@@ -1515,4 +1515,4 @@ createScheduledJob(input:{
1515
1515
  }
1516
1516
  `)}),n},[]).join("\r\n")}
1517
1517
  }
1518
- `,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,e=validateConfig(e);e?(n=e["authToken"],n=checkAndDecodeBase64String(n||""),store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{authToken:n,onComplete:t})))):console.error("@aiware/js initialization failed. Please pass valid configuration object.")}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:"060d9115f",releaseDate:"2023-08-11T20:11:53.459Z"});export{createAction as $,AIWareIntlProvider as A,Box$1 as B,authErrorMessage as C,FormControl$1 as D,TextField$1 as E,FormattedMessage$1 as F,Grid$1 as G,classNames as H,resetPasswordRequest as I,InputLabel$1 as J,InputAdornment$1 as K,LoadingButton$1 as L,IconButton$1 as M,Select$1 as N,OutlinedInput$1 as O,Provider$2 as P,Location as Q,Routes as R,Switch$1 as S,Typography$1 as T,MenuItem$1 as U,Button$1 as V,Divider$1 as W,createTheme$1 as X,systemStyled as Y,useThemeProps$1 as Z,_extends$3 as _,generateUtilityClasses as a,default_1 as a$,createReducer as a0,createSlice as a1,ENGINE_OWNER_TYPES as a2,ENGINE_FILTER_TYPES as a3,DynamicModuleLoader as a4,preferredLanguageSelector as a5,baseUrlSelector as a6,rootApiSelector as a7,sessionTokenSelector as a8,graphEndpointSelector as a9,call$i as aA,fetchTemplateGallery as aB,isRevisionsExistOnServerRequest as aC,FormLabel$1 as aD,default_1$d as aE,FormGroup$1 as aF,FormControlLabel$1 as aG,Checkbox$1 as aH,fetchTemplateGalleryFallback as aI,Card$1 as aJ,CardContent$1 as aK,img$m as aL,CardActions$1 as aM,flowStyles as aN,NoResults as aO,CircularProgress$1 as aP,img$c as aQ,Dialog$1 as aR,setApiEndpoint as aS,TableContainer$1 as aT,Table$1 as aU,TableHead$1 as aV,TableRow$1 as aW,TableCell$1 as aX,TableSortLabel$1 as aY,TableBody$1 as aZ,img$h as a_,controllerNodeRedImageSelector as aa,controllerUrlSelector as ab,automateControllerUrlSelector as ac,flowCenterDialogSelector as ad,automateUrlSelector as ae,Portal$1 as af,flowCenterDialogReducer as ag,List$2 as ah,ListItem$1 as ai,ListItemIcon$1 as aj,ListItemText$1 as ak,flowCenterDialogAction as al,all as am,img$o as an,img$p as ao,img$r as ap,img$s as aq,Tooltip$1 as ar,img$i as as,img$H as at,Skeleton$1 as au,takeLatest$1 as av,fetchAllTags as aw,put as ax,select as ay,fetchFlows as az,styled$1 as b,img$x as b$,Popper$1 as b0,ClickAwayListener as b1,Fade$1 as b2,img$t as b3,img$q as b4,img$R as b5,img$D as b6,DialogTitle$1 as b7,DialogContent$1 as b8,DialogActions$1 as b9,__generator$2 as bA,__spread as bB,React5 as bC,TransitionGroup$1 as bD,connect$1 as bE,Bookmark as bF,EngineFlagIcons as bG,createAsyncThunk as bH,withStyles as bI,getConfigModule as bJ,getAuthModule as bK,getSnackbarModule as bL,AIWareCacheProvider as bM,img$S as bN,img$e as bO,img$d as bP,isEmpty_1 as bQ,Backdrop$1 as bR,getDefaultMiddleware as bS,isNil_1 as bT,UpDown as bU,Icon$1 as bV,get_1 as bW,map_1 as bX,keys_1 as bY,RadioGroup$1 as bZ,Avatar$1 as b_,Snackbar$1 as ba,default_1$6 as bb,Search$1 as bc,img$j as bd,img$l as be,img$V as bf,Tabs$2 as bg,Tab$2 as bh,deleteEngine as bi,fetchEngine as bj,img$k as bk,AIWareFormatMessage as bl,FormattedDate as bm,fetchVeritoneGraphQLApi as bn,useTheme as bo,KeyboardArrowRight as bp,KeyboardArrowLeft as bq,useId as br,InputUnstyled as bs,isHostComponent as bt,getDefaultExportFromNamespaceIfNotNamed as bu,commonjsRequire as bv,reactDom as bw,Transition$1 as bx,_defineProperty$x as by,__awaiter$e as bz,Paper$1 as c,DynamicTable as c$,baseGraphQLApi as c0,FormHelperText$2 as c1,img$g as c2,StyledEngineProvider as c3,ThemeProvider as c4,lightTheme$1 as c5,CssBaseline as c6,Hide as c7,has_1 as c8,showMessage as c9,TabPanel as cA,default_1$8 as cB,unmountPanel$1 as cC,AvailableComponents as cD,delay$1 as cE,hidePanel$1 as cF,mountPanel$1 as cG,DialogContentText$1 as cH,userSelector$2 as cI,MoreVert$1 as cJ,Menu$1 as cK,Edit as cL,Upload as cM,Delete$1 as cN,CustomTabs as cO,useBackupImg as cP,img$1A as cQ,validate as cR,configSelector as cS,baseGraphQLApiWithError as cT,VerifiedFilled as cU,Add as cV,ExpandLess$1 as cW,ExpandMore$1 as cX,Collapse$1 as cY,img$17 as cZ,Filter$1 as c_,MessageSeverity as ca,Radio$2 as cb,createSvgIcon$2 as cc,_createCompounder as cd,_baseIteratee as ce,isArrayLike_1 as cf,toInteger_1 as cg,_typeof$D as ch,_assertThisInitialized$x as ci,_setPrototypeOf$z as cj,_toPropertyKey as ck,_inheritsLoose$2 as cl,hoistNonReactStatics_cjs as cm,commonjsGlobal$1 as cn,combineReducers as co,createSelector$1 as cp,fork as cq,statusPill as cr,AIWareThemeProvider$1 as cs,LocalizationProvider as ct,AdapterDateFns as cu,CalendarPicker as cv,Stack$4 as cw,Close$1 as cx,FullscreenExit as cy,Fullscreen as cz,capitalize$2 as d,eq_1 as d$,useTheme$3 as d0,getThemeProps as d1,useEnhancedEffect$3 as d2,React as d3,_arrayPush as d4,isArray_1 as d5,_baseToString as d6,_baseTrim as d7,_castSlice as d8,_stringToArray as d9,EngineClassIcons as dA,Mode2 as dB,EngineModeIcons as dC,DeploymentModelIcons as dD,ListSubheader$1 as dE,guid as dF,EditList as dG,Chip$1 as dH,useControlled$1 as dI,usePreviousProps$1 as dJ,useEventCallback as dK,setRef as dL,inputClasses$1 as dM,inputBaseClasses$1 as dN,outlinedInputClasses$1 as dO,filledInputClasses$1 as dP,alpha as dQ,ClearIcon as dR,ArrowDropDownIcon as dS,ButtonBase$1 as dT,isObject_1 as dU,_arrayMap as dV,_Symbol as dW,isArguments_1 as dX,_baseEach as dY,_arrayFilter as dZ,_getNative as d_,toString_1 as da,ReactIs as db,upperFirst_1 as dc,isString_1 as dd,_baseGet as de,_baseSlice as df,_castPath as dg,_toKey as dh,_isIndex as di,channel$1 as dj,useIntl as dk,VideoCamera as dl,Image$1 as dm,Sound as dn,Description as dp,toNumber_1 as dq,ProgressStepper as dr,size_1 as ds,take as dt,CurlyBraces as du,UnknownDocument as dv,VariableSizeList as dw,sdkEventManager as dx,SdkEvents as dy,SdkError as dz,_objectWithoutPropertiesLoose$2 as e,MoveFolder as e$,_root as e0,_Uint8Array as e1,_overArg as e2,_isPrototype as e3,isObjectLike_1 as e4,_baseGetTag as e5,_arrayLikeKeys as e6,isBuffer$4 as e7,isFunction_1 as e8,isTypedArray_1 as e9,EntityType as eA,generateState as eB,injectIntl as eC,ErrorBoundary$1 as eD,EPermissionAction as eE,Process as eF,Information as eG,Download as eH,NewFolder as eI,SpecialFolder as eJ,User as eK,Source as eL,Search$2 as eM,selectIsOLPEnabled as eN,ListItemSecondaryAction$1 as eO,getLibraryModule as eP,cmsUrlSelector as eQ,debounce_1 as eR,SearchStructuredData as eS,Grow$1 as eT,index as eU,betaFeaturesSelector as eV,actions as eW,hasPermission as eX,UserAddFilled as eY,Popover$1 as eZ,MenuList$1 as e_,_Stack as ea,_baseFor as eb,identity_1 as ec,_isIterateeCall as ed,isSymbol_1 as ee,_baseMap as ef,_baseUnary as eg,createBox$1 as eh,_Set as ei,_setToArray as ej,_SetCache as ek,_cacheHas as el,img$O as em,img$N as en,img$1w as eo,img$1v as ep,img$1u as eq,img$L as er,img$1y as es,img$K as et,authSelector as eu,ListItemAvatar$1 as ev,takeEvery$1 as ew,emphasize as ex,useSlotProps as ey,_arraySome as ez,clsx as f,LinearProgress$1 as f$,EAuthResourceType as f0,Slide$1 as f1,img$a as f2,selectApiConfigs$2 as f3,selectPanelByPanelName as f4,FullScreenContainer as f5,EngineCategoryIcons as f6,isPermissionLoading as f7,Settings$2 as f8,Hamburger as f9,Undefined as fA,PodcastSource as fB,YoutubeSource as fC,TVSource as fD,RadioSource as fE,selectOrgId as fF,navSectionStyles as fG,selectIsUserAdmin as fH,AvatarGroup$1 as fI,index$1 as fJ,ErrorState$2 as fK,Stepper$1 as fL,StepConnector$1 as fM,Step$1 as fN,StepLabel$1 as fO,isEqual_1 as fP,NullState$2 as fQ,Group as fR,PermissionChangedAction as fS,Lock as fT,useOrganizationPermissions as fU,EAuthSubResourceType as fV,AddGroup as fW,initialConfigSelector as fX,ConfirmationModal as fY,EnumHelpers as fZ,formatBytes as f_,List as fa,enginesFilter as fb,panelsSelector as fc,Badge$1 as fd,MoreHor as fe,convertEntityToAuthResource as ff,AutoSizer as fg,InfiniteLoader as fh,FixedSizeList as fi,selectUserOrgEdgeVersion as fj,EditAttributes as fk,gqlIntrospection as fl,ProcessingDetail as fm,img$w as fn,img$y as fo,img$4 as fp,FilterRemove as fq,AlarmTwo as fr,tableInfiniteScroll as fs,CheckCircle as ft,FolderOpen as fu,Voice as fv,useDoubleClick as fw,FolderFilled as fx,Time as fy,img$z as fz,generateUtilityClass as g,createStack as g$,NotInterested as g0,mountPanelForResponse$1 as g1,default_1$9 as g2,tableStyles as g3,ArrowDown as g4,ArrowUp as g5,useInterval as g6,Iam as g7,safeFormatMessage as g8,contextMenuStyles as g9,stubArray_1 as gA,_baseGetAllKeys as gB,_getTag as gC,_nodeUtil as gD,_getAllKeys as gE,_castFunction as gF,Article as gG,Task as gH,View as gI,_objectSpread2 as gJ,serialize as gK,stringify$2 as gL,compile as gM,Check as gN,EngineIconsRenderer as gO,FormattedRelativeTime$1 as gP,BottomQueue as gQ,TopQueue as gR,Pause as gS,Cancel as gT,Folder as gU,Hidden as gV,dateRangeFilter as gW,statusFilter as gX,TableLoadingState as gY,setDuration as gZ,resetDuration as g_,Users as ga,SecurityGroup as gb,getOrganizationPanelModule as gc,Lock2 as gd,EApplicationConfigLevel as ge,NoApps as gf,EApplicationConfigType as gg,green$1 as gh,md5 as gi,selectIsSuperAdmin as gj,organizations_selector as gk,actions$5 as gl,AddUser as gm,selectors as gn,LibraryDropdown as go,Remove as gp,Save as gq,Input$3 as gr,getElement as gs,client$1 as gt,Copy as gu,ArrowForward as gv,Modal$1 as gw,Slider$1 as gx,getDefaultExportFromCjs as gy,_getSymbols as gz,composeClasses as h,toFinite_1 as h0,_baseForOwn as h1,_arrayReduce as h2,hasIn_1 as h3,now_1 as h4,useSyncExternalStoreExports as h5,imageUpload as h6,characterCountTextField as h7,Engines as h8,tabsClasses$1 as h9,unmountWidget as hA,mountPanel as hB,unmountPanel as hC,hidePanel as hD,unmountAllPanel as hE,init as hF,aiwareEvents as hG,Packages as ha,Resources$1 as hb,selectUserCanCreatePackage as hc,PackagesAvatar as hd,actionChannel as he,cancelled as hf,flush$3 as hg,cancel as hh,tableSearchComponents as hi,Node as hj,FlowCenter2 as hk,ArrowBack as hl,Schema as hm,FlowTemplate as hn,panelComponents as ho,img$v as hp,Clear as hq,ExpandLess as hr,ExpandMore as hs,registry as ht,registerComponent as hu,AvailableWidgets as hv,updatePanelMicroFrontendProps as hw,setData as hx,root as hy,mountWidget as hz,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,devErrorLogger as y,useLocation as z};
1518
+ `,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,e=validateConfig(e);e?(n=e["authToken"],n=checkAndDecodeBase64String(n||""),store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{authToken:n,onComplete:t})))):console.error("@aiware/js initialization failed. Please pass valid configuration object.")}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:"07c1bab0f",releaseDate:"2023-08-14T21:01:01.249Z"});export{createAction as $,AIWareIntlProvider as A,Box$1 as B,authErrorMessage as C,FormControl$1 as D,TextField$1 as E,FormattedMessage$1 as F,Grid$1 as G,classNames as H,resetPasswordRequest as I,InputLabel$1 as J,InputAdornment$1 as K,LoadingButton$1 as L,IconButton$1 as M,Select$1 as N,OutlinedInput$1 as O,Provider$2 as P,Location as Q,Routes as R,Switch$1 as S,Typography$1 as T,MenuItem$1 as U,Button$1 as V,Divider$1 as W,createTheme$1 as X,systemStyled as Y,useThemeProps$1 as Z,_extends$3 as _,generateUtilityClasses as a,default_1 as a$,createReducer as a0,createSlice as a1,ENGINE_OWNER_TYPES as a2,ENGINE_FILTER_TYPES as a3,DynamicModuleLoader as a4,preferredLanguageSelector as a5,baseUrlSelector as a6,rootApiSelector as a7,sessionTokenSelector as a8,graphEndpointSelector as a9,call$i as aA,fetchTemplateGallery as aB,isRevisionsExistOnServerRequest as aC,FormLabel$1 as aD,default_1$d as aE,FormGroup$1 as aF,FormControlLabel$1 as aG,Checkbox$1 as aH,fetchTemplateGalleryFallback as aI,Card$1 as aJ,CardContent$1 as aK,img$m as aL,CardActions$1 as aM,flowStyles as aN,NoResults as aO,CircularProgress$1 as aP,img$c as aQ,Dialog$1 as aR,setApiEndpoint as aS,TableContainer$1 as aT,Table$1 as aU,TableHead$1 as aV,TableRow$1 as aW,TableCell$1 as aX,TableSortLabel$1 as aY,TableBody$1 as aZ,img$h as a_,controllerNodeRedImageSelector as aa,controllerUrlSelector as ab,automateControllerUrlSelector as ac,flowCenterDialogSelector as ad,automateUrlSelector as ae,Portal$1 as af,flowCenterDialogReducer as ag,List$2 as ah,ListItem$1 as ai,ListItemIcon$1 as aj,ListItemText$1 as ak,flowCenterDialogAction as al,all as am,img$o as an,img$p as ao,img$r as ap,img$s as aq,Tooltip$1 as ar,img$i as as,img$H as at,Skeleton$1 as au,takeLatest$1 as av,fetchAllTags as aw,put as ax,select as ay,fetchFlows as az,styled$1 as b,img$x as b$,Popper$1 as b0,ClickAwayListener as b1,Fade$1 as b2,img$t as b3,img$q as b4,img$R as b5,img$D as b6,DialogTitle$1 as b7,DialogContent$1 as b8,DialogActions$1 as b9,__generator$2 as bA,__spread as bB,React5 as bC,TransitionGroup$1 as bD,connect$1 as bE,Bookmark as bF,EngineFlagIcons as bG,createAsyncThunk as bH,withStyles as bI,getConfigModule as bJ,getAuthModule as bK,getSnackbarModule as bL,AIWareCacheProvider as bM,img$S as bN,img$e as bO,img$d as bP,isEmpty_1 as bQ,Backdrop$1 as bR,getDefaultMiddleware as bS,isNil_1 as bT,UpDown as bU,Icon$1 as bV,get_1 as bW,map_1 as bX,keys_1 as bY,RadioGroup$1 as bZ,Avatar$1 as b_,Snackbar$1 as ba,default_1$6 as bb,Search$1 as bc,img$j as bd,img$l as be,img$V as bf,Tabs$2 as bg,Tab$2 as bh,deleteEngine as bi,fetchEngine as bj,img$k as bk,AIWareFormatMessage as bl,FormattedDate as bm,fetchVeritoneGraphQLApi as bn,useTheme as bo,KeyboardArrowRight as bp,KeyboardArrowLeft as bq,useId as br,InputUnstyled as bs,isHostComponent as bt,getDefaultExportFromNamespaceIfNotNamed as bu,commonjsRequire as bv,reactDom as bw,Transition$1 as bx,_defineProperty$x as by,__awaiter$e as bz,Paper$1 as c,DynamicTable as c$,baseGraphQLApi as c0,FormHelperText$2 as c1,img$g as c2,StyledEngineProvider as c3,ThemeProvider as c4,lightTheme$1 as c5,CssBaseline as c6,Hide as c7,has_1 as c8,showMessage as c9,TabPanel as cA,default_1$8 as cB,unmountPanel$1 as cC,AvailableComponents as cD,delay$1 as cE,hidePanel$1 as cF,mountPanel$1 as cG,DialogContentText$1 as cH,userSelector$2 as cI,MoreVert$1 as cJ,Menu$1 as cK,Edit as cL,Upload as cM,Delete$1 as cN,CustomTabs as cO,useBackupImg as cP,img$1A as cQ,validate as cR,configSelector as cS,baseGraphQLApiWithError as cT,VerifiedFilled as cU,Add as cV,ExpandLess$1 as cW,ExpandMore$1 as cX,Collapse$1 as cY,img$17 as cZ,Filter$1 as c_,MessageSeverity as ca,Radio$2 as cb,createSvgIcon$2 as cc,_createCompounder as cd,_baseIteratee as ce,isArrayLike_1 as cf,toInteger_1 as cg,_typeof$D as ch,_assertThisInitialized$x as ci,_setPrototypeOf$z as cj,_toPropertyKey as ck,_inheritsLoose$2 as cl,hoistNonReactStatics_cjs as cm,commonjsGlobal$1 as cn,combineReducers as co,createSelector$1 as cp,fork as cq,statusPill as cr,AIWareThemeProvider$1 as cs,LocalizationProvider as ct,AdapterDateFns as cu,CalendarPicker as cv,Stack$4 as cw,Close$1 as cx,FullscreenExit as cy,Fullscreen as cz,capitalize$2 as d,eq_1 as d$,useTheme$3 as d0,getThemeProps as d1,useEnhancedEffect$3 as d2,React as d3,_arrayPush as d4,isArray_1 as d5,_baseToString as d6,_baseTrim as d7,_castSlice as d8,_stringToArray as d9,EngineClassIcons as dA,Mode2 as dB,EngineModeIcons as dC,DeploymentModelIcons as dD,ListSubheader$1 as dE,guid as dF,EditList as dG,Chip$1 as dH,useControlled$1 as dI,usePreviousProps$1 as dJ,useEventCallback as dK,setRef as dL,inputClasses$1 as dM,inputBaseClasses$1 as dN,outlinedInputClasses$1 as dO,filledInputClasses$1 as dP,alpha as dQ,ClearIcon as dR,ArrowDropDownIcon as dS,ButtonBase$1 as dT,isObject_1 as dU,_arrayMap as dV,_Symbol as dW,isArguments_1 as dX,_baseEach as dY,_arrayFilter as dZ,_getNative as d_,toString_1 as da,ReactIs as db,upperFirst_1 as dc,isString_1 as dd,_baseGet as de,_baseSlice as df,_castPath as dg,_toKey as dh,_isIndex as di,channel$1 as dj,useIntl as dk,VideoCamera as dl,Image$1 as dm,Sound as dn,Description as dp,toNumber_1 as dq,ProgressStepper as dr,size_1 as ds,take as dt,CurlyBraces as du,UnknownDocument as dv,VariableSizeList as dw,sdkEventManager as dx,SdkEvents as dy,SdkError as dz,_objectWithoutPropertiesLoose$2 as e,MoveFolder as e$,_root as e0,_Uint8Array as e1,_overArg as e2,_isPrototype as e3,isObjectLike_1 as e4,_baseGetTag as e5,_arrayLikeKeys as e6,isBuffer$4 as e7,isFunction_1 as e8,isTypedArray_1 as e9,EntityType as eA,generateState as eB,injectIntl as eC,ErrorBoundary$1 as eD,EPermissionAction as eE,Process as eF,Information as eG,Download as eH,NewFolder as eI,SpecialFolder as eJ,User as eK,Source as eL,Search$2 as eM,selectIsOLPEnabled as eN,ListItemSecondaryAction$1 as eO,getLibraryModule as eP,cmsUrlSelector as eQ,debounce_1 as eR,SearchStructuredData as eS,Grow$1 as eT,index as eU,betaFeaturesSelector as eV,actions as eW,hasPermission as eX,UserAddFilled as eY,Popover$1 as eZ,MenuList$1 as e_,_Stack as ea,_baseFor as eb,identity_1 as ec,_isIterateeCall as ed,isSymbol_1 as ee,_baseMap as ef,_baseUnary as eg,createBox$1 as eh,_Set as ei,_setToArray as ej,_SetCache as ek,_cacheHas as el,img$O as em,img$N as en,img$1w as eo,img$1v as ep,img$1u as eq,img$L as er,img$1y as es,img$K as et,authSelector as eu,ListItemAvatar$1 as ev,takeEvery$1 as ew,emphasize as ex,useSlotProps as ey,_arraySome as ez,clsx as f,LinearProgress$1 as f$,EAuthResourceType as f0,Slide$1 as f1,img$a as f2,selectApiConfigs$2 as f3,selectPanelByPanelName as f4,FullScreenContainer as f5,EngineCategoryIcons as f6,isPermissionLoading as f7,Settings$2 as f8,Hamburger as f9,Undefined as fA,PodcastSource as fB,YoutubeSource as fC,TVSource as fD,RadioSource as fE,selectOrgId as fF,navSectionStyles as fG,selectIsUserAdmin as fH,AvatarGroup$1 as fI,index$1 as fJ,ErrorState$2 as fK,Stepper$1 as fL,StepConnector$1 as fM,Step$1 as fN,StepLabel$1 as fO,isEqual_1 as fP,NullState$2 as fQ,Group as fR,PermissionChangedAction as fS,Lock as fT,useOrganizationPermissions as fU,EAuthSubResourceType as fV,AddGroup as fW,initialConfigSelector as fX,ConfirmationModal as fY,EnumHelpers as fZ,formatBytes as f_,List as fa,enginesFilter as fb,panelsSelector as fc,Badge$1 as fd,MoreHor as fe,convertEntityToAuthResource as ff,AutoSizer as fg,InfiniteLoader as fh,FixedSizeList as fi,selectUserOrgEdgeVersion as fj,EditAttributes as fk,gqlIntrospection as fl,ProcessingDetail as fm,img$w as fn,img$y as fo,img$4 as fp,FilterRemove as fq,AlarmTwo as fr,tableInfiniteScroll as fs,CheckCircle as ft,FolderOpen as fu,Voice as fv,useDoubleClick as fw,FolderFilled as fx,Time as fy,img$z as fz,generateUtilityClass as g,createStack as g$,NotInterested as g0,mountPanelForResponse$1 as g1,default_1$9 as g2,tableStyles as g3,ArrowDown as g4,ArrowUp as g5,useInterval as g6,Iam as g7,safeFormatMessage as g8,contextMenuStyles as g9,stubArray_1 as gA,_baseGetAllKeys as gB,_getTag as gC,_nodeUtil as gD,_getAllKeys as gE,_castFunction as gF,Article as gG,Task as gH,View as gI,_objectSpread2 as gJ,serialize as gK,stringify$2 as gL,compile as gM,Check as gN,EngineIconsRenderer as gO,FormattedRelativeTime$1 as gP,BottomQueue as gQ,TopQueue as gR,Pause as gS,Cancel as gT,Folder as gU,Hidden as gV,dateRangeFilter as gW,statusFilter as gX,TableLoadingState as gY,setDuration as gZ,resetDuration as g_,Users as ga,SecurityGroup as gb,getOrganizationPanelModule as gc,Lock2 as gd,EApplicationConfigLevel as ge,NoApps as gf,EApplicationConfigType as gg,green$1 as gh,md5 as gi,selectIsSuperAdmin as gj,organizations_selector as gk,actions$5 as gl,AddUser as gm,selectors as gn,LibraryDropdown as go,Remove as gp,Save as gq,Input$3 as gr,getElement as gs,client$1 as gt,Copy as gu,ArrowForward as gv,Modal$1 as gw,Slider$1 as gx,getDefaultExportFromCjs as gy,_getSymbols as gz,composeClasses as h,toFinite_1 as h0,_baseForOwn as h1,_arrayReduce as h2,hasIn_1 as h3,now_1 as h4,useSyncExternalStoreExports as h5,imageUpload as h6,characterCountTextField as h7,Engines as h8,tabsClasses$1 as h9,unmountWidget as hA,mountPanel as hB,unmountPanel as hC,hidePanel as hD,unmountAllPanel as hE,init as hF,aiwareEvents as hG,Packages as ha,Resources$1 as hb,selectUserCanCreatePackage as hc,PackagesAvatar as hd,actionChannel as he,cancelled as hf,flush$3 as hg,cancel as hh,tableSearchComponents as hi,Node as hj,FlowCenter2 as hk,ArrowBack as hl,Schema as hm,FlowTemplate as hn,panelComponents as ho,img$v as hp,Clear as hq,ExpandLess as hr,ExpandMore as hs,registry as ht,registerComponent as hu,AvailableWidgets as hv,updatePanelMicroFrontendProps as hw,setData as hx,root as hy,mountWidget as hz,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,devErrorLogger as y,useLocation as z};
package/js-core.esm.js.gz CHANGED
Binary file
package/js-core.esm43.js CHANGED
@@ -1 +1 @@
1
- import{m as makeStyles,a1 as createSlice,co as combineReducers,j as jsxRuntime,F as FormattedMessage,ga as Users,fT as Lock,gb as SecurityGroup,fR as Group,cs as AIWareThemeProvider,a4 as DynamicModuleLoader,gc as getOrganizationPanelModule,A as AIWareIntlProvider,o as useSelector,f3 as selectApiConfigs,n as useDispatch,fU as useOrganizationPermissions,f0 as EAuthResourceType,r as react,am as all,fc as panelsSelector,ar as Tooltip,M as IconButton,f9 as Hamburger,T as Typography,cy as FullscreenExit,cz as Fullscreen,c7 as Hide,ew as takeEvery$1,eV as betaFeaturesSelector,fl as gqlIntrospection,gd as Lock2,g7 as Iam,bg as Tabs,H as classNames,bh as Tab,af as Portal,ay as select,aA as call,ax as put,cT as baseGraphQLApiWithError}from"./js-core.esm.js";import{GroupsPanel,getAdminCenterGroupsModule}from"./js-core.esm38.js";import{PermissionSets,AccessControl,getAdminCenterPermissionsModule}from"./js-core.esm35.js";import{getAdminCenterApplicationsModule}from"./js-core.esm44.js";import{UsersPanel,getAdminCenterUsersModule}from"./js-core.esm45.js";import{ApiTokensTab}from"./js-core.esm46.js";import{IamTab}from"./js-core.esm41.js";import"./js-core.esm9.js";import"./js-core.esm24.js";import"./js-core.esm6.js";import"./js-core.esm42.js";import"./js-core.esm31.js";import"./js-core.esm37.js";const useStyles$2=makeStyles()((e,{height:t})=>({header:{alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider,display:"flex",height:t,padding:e.spacing(2),position:"relative"},title:{minWidth:"126px"},marginRight:{marginRight:e.spacing(2)},navigationToggle:{marginRight:e.spacing(1)},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},verticalDivider:{borderRight:".5px solid "+e.palette.divider,height:"70%",margin:"0 "+e.spacing(1)}})),Header=({hidePanel:e,isNavExpanded:t,onLeftNavigationToggle:s,onFullScreenToggle:a,isFullScreen:i,height:n})=>{n=useStyles$2({height:n}).classes;return jsxRuntime.exports.jsxs("header",Object.assign({className:n.header,"data-test":"ac-header"},{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.navigation.menu",defaultMessage:"Toggle Navigation Menu",description:"Toggle Navigation Menu"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({sx:{mr:1},onClick:s,"aria-expanded":t,"aria-labelledby":"ac-header-toggle-nav","data-test":"ac-header-toggle-nav",size:"large"},{children:jsxRuntime.exports.jsx(Hamburger,{})}))})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",className:n.title,"data-test":"ac-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.header.title",defaultMessage:"Admin Center",description:"Panel header of the admin center"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.headerActionContainer},{children:[jsxRuntime.exports.jsx("div",{className:n.verticalDivider}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:i?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.close.full.screen",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.open.full.screen",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:a,"aria-labelledby":"ac-toggle-fullscreen","data-test":"ac-fullscreen-toggle",size:"large"},{children:i?jsxRuntime.exports.jsx(FullscreenExit,{}):jsxRuntime.exports.jsx(Fullscreen,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.close.panel",defaultMessage:"Close Panel",description:"Close Panel"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:e,"aria-labelledby":"ac-close-panel","data-test-id":"ac-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]}))]}))};function __rest(e,t){var s={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(s[i[a]]=e[i[a]]);return s}function __awaiter(e,r,o,l){return new(o=o||Promise)(function(s,t){function a(e){try{n(l.next(e))}catch(e){t(e)}}function i(e){try{n(l.throw(e))}catch(e){t(e)}}function n(e){var t;e.done?s(e.value):((t=e.value)instanceof o?t:new o(function(e){e(t)})).then(a,i)}n((l=l.apply(e,r||[])).next())})}var AdminCenterView;!function(e){e.users="users",e.permissionSets="permissionSets",e.accessControl="accessControl",e.groups="groups",e.apiTokens="apiTokens",e.iam="iam"}(AdminCenterView=AdminCenterView||{});const SLICE_NAME="browse",namespace="browseDetail",initialState={status:"idle",olpFeature:"disabled"},browseSlice=createSlice({name:SLICE_NAME+"/"+namespace,initialState:initialState,reducers:{fetchOlpAvailabilityStart(e){e.status="loading"},fetchOlpAvailabilitySuccess(e,t){e.status="success",e.olpFeature=t.payload},fetchOlpAvailabilityFailure(e){e.status="failure"}}}),actions=browseSlice.actions;var browse_state=browseSlice.reducer;const rootReducer=combineReducers({[namespace]:browse_state});function checkOlpAvailability(t){return __awaiter(this,void 0,void 0,function*(){var e="checkOlpAvailability";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query checkOlpAvailability {\n me {\n organization { \n jsondata \n } \n }\n }\n ",operationName:e},t))).me.organization.jsondata.features.enableRBACFeature})}function*fetchOlpAvailabilitySaga(e){try{var t=yield select(selectApiConfigs),s=yield call(checkOlpAvailability,t);yield put(actions.fetchOlpAvailabilitySuccess(s||"disabled"))}catch(e){yield put(actions.fetchOlpAvailabilityFailure()),console.log(e)}}function*fetchOlpAvailabilityWatcher(){yield takeEvery$1(actions.fetchOlpAvailabilityStart.type,fetchOlpAvailabilitySaga)}function*rootSaga(){yield all([fetchOlpAvailabilityWatcher()])}const selectOlpAvailability=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace])?void 0:e.olpFeature};function getAdminCenterBrowseModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const tabWidth=197,useStyles$1=makeStyles()((e,{height:t},s)=>({root:{display:"flex",flexGrow:1,height:t,position:"relative"},tabs:{borderRight:".5px solid "+e.palette.divider,transition:".2s ease",width:e.spacing(14),minWidth:e.spacing(14),padding:e.spacing(1.6)+" "+e.spacing(2.5),boxSizing:"border-box"},tabsContainer:{alignItems:"center"},tabIndicator:{background:"transparent"},tabRoot:{opacity:1,borderRadius:4,fontSize:"14px",marginBottom:e.spacing(1),minHeight:e.spacing(9),minWidth:e.spacing(9),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),width:"100%","&:hover":{background:"#F2F5F9"}},tabsExpanded:{width:tabWidth,minWidth:tabWidth,paddingRight:e.spacing(2),paddingLeft:e.spacing(2),["& "+s.tabRoot]:{width:`calc(${tabWidth}px - ${e.spacing(3)})`,flexDirection:"row",textTransform:"capitalize","& svg":{marginRight:e.spacing(2),marginBottom:"0"}}},tabExpandedWrapper:{flexDirection:"row",display:"flex",justifyContent:"flex-start","& svg":{marginBottom:"0 !important",marginRight:e.spacing(2)}},tabSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg":{marginBottom:"0 !important",marginRight:"0",color:e.palette.primary.main}},contentPanel:{flexGrow:1},tabExpandedSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg":{marginBottom:"0 !important",marginRight:e.spacing(2),color:e.palette.primary.main}},tabWrapper:{flexDirection:"row",display:"flex",justifyContent:"center","& svg":{marginBottom:"0 !important",marginRight:"0"}}})),navListTop=[{id:AdminCenterView.users,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.users.view",defaultMessage:"Users",description:"The label of users tab button."}),testLabel:"ac-users-view",icon:jsxRuntime.exports.jsx(Users,{}),content:e=>jsxRuntime.exports.jsx(UsersPanel,{isPanelFullScreen:e})}],olpNavList=[{id:AdminCenterView.permissionSets,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.permission-sets.view",defaultMessage:"Permission Sets",description:"The label for Permission Sets view"}),testLabel:"ac-permission-sets-view",icon:jsxRuntime.exports.jsx(Lock,{}),content:e=>jsxRuntime.exports.jsx(PermissionSets,{isPanelFullScreen:e})},{id:AdminCenterView.accessControl,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.system-access.view",defaultMessage:"System Access",description:"The label of access control tab button."}),testLabel:"ac-access-control-view",icon:jsxRuntime.exports.jsx(SecurityGroup,{style:{transform:"translate(4px, 0px)"}}),content:e=>jsxRuntime.exports.jsx(AccessControl,{isPanelFullScreen:e})},{id:AdminCenterView.groups,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.groups.view",defaultMessage:"Groups",description:"The label of groups tab button."}),testLabel:"ac-groups-view",icon:jsxRuntime.exports.jsx(Group,{style:{transform:"translate(2px, 0px)"}}),content:e=>jsxRuntime.exports.jsx(GroupsPanel,{isPanelFullScreen:e})}],getTabId=(e,t)=>e[t].id,MainTabPanel=({currentView:t,setCurrentView:s,isNavExpanded:a,isFullScreen:i,height:e})=>{const n=useStyles$1({height:e})["classes"],[r,o]=react.exports.useState(navListTop),l=useSelector(selectOlpAvailability),c=useSelector(betaFeaturesSelector);return react.exports.useEffect(()=>{var e=gqlIntrospection.getQueries().find(e=>"apiTokens"===e.name),t={id:AdminCenterView.apiTokens,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.api-tokens.view",defaultMessage:"API Tokens",description:"The label for API Tokens view"}),testLabel:"ac-api-tokens-view",icon:jsxRuntime.exports.jsx(Lock2,{style:{transform:"translate(4px, 0px)"}}),content:e=>jsxRuntime.exports.jsx(ApiTokensTab,{})};const s=[];e&&c&&s.push(t),s.push({id:AdminCenterView.iam,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.iam.view",defaultMessage:"IAM",description:"The label for the IAM view"}),testLabel:"ac-iam-view",icon:jsxRuntime.exports.jsx(Iam,{style:{transform:"translate(4px, 0px)"}}),content:e=>jsxRuntime.exports.jsx(IamTab,{isPanelFullScreen:e})}),o(e=>"enabled"===l?[...navListTop,...olpNavList,...s]:"disabled"===l?[...navListTop,...s]:e)},[l,c]),jsxRuntime.exports.jsxs("div",Object.assign({className:n.root},{children:[jsxRuntime.exports.jsx(Tabs,Object.assign({id:"adminCenterViewTabs",orientation:"vertical",value:t,onChange:(e,t)=>{s(getTabId(r,t))},className:classNames(n.tabs,{[n.tabsExpanded]:a}),classes:{flexContainer:n.tabsContainer,indicator:n.tabIndicator},"aria-label":"admin center tabs","data-test":"ac-nav-tabs-container"},{children:r.map(e=>jsxRuntime.exports.jsx(Tooltip,Object.assign({placement:"right",title:a?"":e.label,"data-test":"ac-nav-tab-"+e.testLabel},{children:jsxRuntime.exports.jsx(Tab,Object.assign({wrapped:!0},a11yProps(e.id),{label:a?e.label:"",icon:e.icon,classes:{root:n.tabRoot,wrapped:a?n.tabExpandedWrapper:n.tabWrapper,selected:a?n.tabExpandedSelected:n.tabSelected}}))}),e.id))})),r.map(e=>jsxRuntime.exports.jsx(TabPanel,Object.assign({selected:t,value:e.id,className:n.contentPanel},{children:e.content(i)}),e.id))]}))};function TabPanel(e){var{children:t,selected:s,value:a}=e,e=__rest(e,["children","selected","value"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",hidden:s!==a,id:"admin-center-tabpanel-"+a,"aria-labelledby":"admin-center-tab-"+a},e,{children:s===a&&t}))}function a11yProps(e){return{id:"admin-center-tab-"+e,"aria-controls":"admin-center-tabpanel-"+e}}const Container=({fullScreen:e,classes:t,dimmed:s,children:a})=>e?jsxRuntime.exports.jsx(Portal,{children:jsxRuntime.exports.jsxs("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classNames(t.panel,t.fullScreen)},{children:[s&&jsxRuntime.exports.jsx("div",{className:t.overlay}),a]}))}):jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classNames(t.root,t.panel)},{children:a})),appBarHeight=55,headerHeight=64,borderBottom=5,useStyles=makeStyles()(e=>({root:{width:1020,position:"relative"},panel:{backgroundColor:e.palette.background.paper,boxShadow:"0px 0px 12px rgba(0, 0, 0, 0.25)",height:"100%"},fullScreen:{position:"fixed",width:"100%",height:"100vh",top:0,left:0,right:0,bottom:0,zIndex:1004},overlay:{backgroundColor:e.palette.grey[50],opacity:"0.5 !important",height:"100%",position:"absolute",top:0,width:"100%",zIndex:1001}})),MainLayout=({hidePanel:e})=>{const[t,s]=react.exports.useState(!0),[a,i]=react.exports.useState(!1);var[n,r]=react.exports.useState(AdminCenterView.users),o=useStyles()["classes"],l=(useSelector(panelsSelector)||[]).find(e=>"ADMIN_CENTER_BROWSE"===e.panelId)||{panelConfig:{dimmed:0}},l=0<(null==(l=null===l?void 0:l.panelConfig)?void 0:l.dimmed),c=`calc(100vh - ${a?25:appBarHeight+borderBottom}px - ${headerHeight}px)`;return jsxRuntime.exports.jsxs(Container,Object.assign({dimmed:l,fullScreen:a,classes:o},{children:[jsxRuntime.exports.jsx(Header,{height:headerHeight,hidePanel:e,isNavExpanded:t,onLeftNavigationToggle:()=>{s(!t)},isFullScreen:a,onFullScreenToggle:()=>{i(!a)}}),jsxRuntime.exports.jsx(MainTabPanel,{currentView:n,setCurrentView:r,height:c,isNavExpanded:t,isFullScreen:a})]}))},Content=e=>{var{apiRoot:t,graphQLEndpoint:s,token:a}=useSelector(selectApiConfigs);const i=useDispatch();return useOrganizationPermissions(EAuthResourceType.Job),react.exports.useEffect(()=>{i(actions.fetchOlpAvailabilityStart())},[i]),t&&s&&a?jsxRuntime.exports.jsx(MainLayout,Object.assign({},e)):null},AdminCenterBrowse=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAdminCenterUsersModule(),getAdminCenterGroupsModule(),getAdminCenterPermissionsModule(),getAdminCenterApplicationsModule(),getAdminCenterBrowseModule(),getOrganizationPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(Content,Object.assign({},e))})}))});export{AdminCenterBrowse};
1
+ import{m as makeStyles,a1 as createSlice,co as combineReducers,n as useDispatch,o as useSelector,j as jsxRuntime,F as FormattedMessage,r as react,T as Typography,am as all,fJ as index,bW as get_1,G as Grid,g5 as ArrowUp,g4 as ArrowDown,W as Divider,ew as takeEvery$1,V as Button,ay as select,a5 as preferredLanguageSelector,f3 as selectApiConfigs,aA as call$7,ax as put,y as devErrorLogger,c9 as showMessage,fP as isEqual_1,ca as MessageSeverity,bl as AIWareFormatMessage,c0 as baseGraphQLApi,ga as Users,fT as Lock,gb as SecurityGroup,fR as Group,eG as Information,cs as AIWareThemeProvider,a4 as DynamicModuleLoader,gc as getOrganizationPanelModule,A as AIWareIntlProvider,fU as useOrganizationPermissions,f0 as EAuthResourceType,fc as panelsSelector,ar as Tooltip,M as IconButton,f9 as Hamburger,cy as FullscreenExit,cz as Fullscreen,c7 as Hide,eV as betaFeaturesSelector,fl as gqlIntrospection,gd as Lock2,g7 as Iam,bg as Tabs,H as classNames,bh as Tab,af as Portal,cT as baseGraphQLApiWithError}from"./js-core.esm.js";import{GroupsPanel,getAdminCenterGroupsModule}from"./js-core.esm38.js";import{PermissionSets,AccessControl,getAdminCenterPermissionsModule}from"./js-core.esm35.js";import{getAdminCenterApplicationsModule}from"./js-core.esm44.js";import{UsersPanel,getAdminCenterUsersModule}from"./js-core.esm45.js";import{ApiTokensTab}from"./js-core.esm46.js";import{IamTab}from"./js-core.esm41.js";import{B as Box}from"./js-core.esm31.js";import"./js-core.esm9.js";import"./js-core.esm24.js";import"./js-core.esm6.js";import"./js-core.esm42.js";import"./js-core.esm37.js";var match,version,store,wmget,wmhas,wmset,set,get,has,STATE,commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},check=function(e){return e&&e.Math==Math&&e},global$b=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$d=function(e){try{return!!e()}catch(e){return!0}},fails$c=fails$d,descriptors=!fails$d(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$b=fails$d,functionBindNative=!fails$d(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$1=functionBindNative,call$6=Function.prototype.call,functionCall=NATIVE_BIND$1?call$6.bind(call$6):function(){return call$6.apply(call$6,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$1&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$4=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$1(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND=functionBindNative,FunctionPrototype$1=Function.prototype,bind=FunctionPrototype$1.bind,call$5=FunctionPrototype$1.call,uncurryThis$c=NATIVE_BIND&&bind.bind(call$5,call$5),functionUncurryThis=NATIVE_BIND?function(e){return e&&uncurryThis$c(e)}:function(e){return e&&function(){return call$5.apply(e,arguments)}},uncurryThis$b=functionUncurryThis,toString$3=uncurryThis$b({}.toString),stringSlice=uncurryThis$b("".slice),classofRaw$1=function(e){return stringSlice(toString$3(e),8,-1)},uncurryThis$a=functionUncurryThis,fails$a=fails$d,classof$2=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$a(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"==classof$2(e)?split(e,""):$Object$4(e)}:$Object$4,$TypeError$7=TypeError,requireObjectCoercible$2=function(e){if(null==e)throw $TypeError$7("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$1=requireObjectCoercible$2,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$1(e))},isCallable$f=function(e){return"function"==typeof e},isCallable$e=isCallable$f,isObject$5=function(e){return"object"==typeof e?null!==e:isCallable$e(e)},global$a=global$b,isCallable$d=isCallable$f,aFunction=function(e){return isCallable$d(e)?e:void 0},getBuiltIn$4=function(e,t){return arguments.length<2?aFunction(global$a[e]):global$a[e]&&global$a[e][t]},uncurryThis$9=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$3=getBuiltIn$4,engineUserAgent=getBuiltIn$4("navigator","userAgent")||"",global$9=global$b,userAgent$2=engineUserAgent,process=global$9.process,Deno=global$9.Deno,versions=process&&process.versions||Deno&&Deno.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent$2&&(!(match=userAgent$2.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent$2.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION=engineV8Version,fails$9=fails$d,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$9(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$1=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$2=getBuiltIn$4,isCallable$c=isCallable$f,isPrototypeOf=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$2("Symbol");return isCallable$c(t)&&isPrototypeOf(t.prototype,$Object$3(e))},$String$3=String,tryToString$2=function(e){try{return $String$3(e)}catch(e){return"Object"}},isCallable$b=isCallable$f,tryToString$1=tryToString$2,$TypeError$6=TypeError,aCallable$2=function(e){if(isCallable$b(e))return e;throw $TypeError$6(tryToString$1(e)+" is not a function")},aCallable$1=aCallable$2,getMethod$1=function(e,t){e=e[t];return null==e?void 0:aCallable$1(e)},call$4=functionCall,isCallable$a=isCallable$f,isObject$4=isObject$5,$TypeError$5=TypeError,ordinaryToPrimitive$1=function(e,t){var r,n;if("string"===t&&isCallable$a(r=e.toString)&&!isObject$4(n=call$4(r,e)))return n;if(isCallable$a(r=e.valueOf)&&!isObject$4(n=call$4(r,e)))return n;if("string"!==t&&isCallable$a(r=e.toString)&&!isObject$4(n=call$4(r,e)))return n;throw $TypeError$5("Can't convert object to primitive value")},shared$3={exports:{}},global$8=global$b,defineProperty$5=Object.defineProperty,defineGlobalProperty$3=function(t,r){try{defineProperty$5(global$8,t,{value:r,configurable:!0,writable:!0})}catch(e){global$8[t]=r}return r},global$7=global$b,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$b[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible=((shared$3.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),requireObjectCoercible$2),$Object$2=Object,toObject$4=function(e){return $Object$2(requireObjectCoercible(e))},uncurryThis$8=functionUncurryThis,toObject$3=toObject$4,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$3(e),t)},uncurryThis$7=functionUncurryThis,id=0,postfix=Math.random(),toString$2=uncurryThis$7(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$2(++id+postfix,36)},global$6=global$b,shared$2=shared$3.exports,hasOwn$8=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$2("wks"),Symbol$1=global$6.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$8=function(e){var t;return hasOwn$8(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL&&hasOwn$8(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},call$3=functionCall,isObject$3=isObject$5,isSymbol$1=isSymbol$2,getMethod=getMethod$1,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$7=wellKnownSymbol$8,$TypeError$4=TypeError,TO_PRIMITIVE=wellKnownSymbol$8("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$3(e)||isSymbol$1(e))return e;var r=getMethod(e,TO_PRIMITIVE);if(r){if(r=call$3(r,e,t=void 0===t?"default":t),!isObject$3(r)||isSymbol$1(r))return r;throw $TypeError$4("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$3=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$5=global$b,isObject$2=isObject$5,document$1=global$b.document,EXISTS$1=isObject$2(document$1)&&isObject$2(document$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1.createElement(e):{}},DESCRIPTORS$9=descriptors,fails$8=fails$d,createElement=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$d(function(){return 7!=Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$8=descriptors,call$2=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$3=createPropertyDescriptor$4,toIndexedObject$4=toIndexedObject$5,toPropertyKey$2=toPropertyKey$3,hasOwn$7=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$8?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$2(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$7(e,t))return createPropertyDescriptor$3(!call$2(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$7=descriptors,fails$7=fails$d,v8PrototypeDefineBug=descriptors&&fails$d(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$1=isObject$5,$String$2=String,$TypeError$3=TypeError,anObject$5=function(e){if(isObject$1(e))return e;throw $TypeError$3($String$2(e)+" is not an object")},DESCRIPTORS$6=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$4=anObject$5,toPropertyKey$1=toPropertyKey$3,$TypeError$2=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$5=(objectDefineProperty.f=DESCRIPTORS$6?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,r){var n;return anObject$4(e),t=toPropertyKey$1(t),anObject$4(r),"function"==typeof e&&"prototype"===t&&"value"in r&&WRITABLE in r&&!r[WRITABLE]&&(n=$getOwnPropertyDescriptor(e,t))&&n[WRITABLE]&&(e[t]=r.value,r={configurable:(CONFIGURABLE$1 in r?r:n)[CONFIGURABLE$1],enumerable:(ENUMERABLE in r?r:n)[ENUMERABLE],writable:!1}),$defineProperty(e,t,r)}:$defineProperty:function(e,t,r){if(anObject$4(e),t=toPropertyKey$1(t),anObject$4(r),IE8_DOM_DEFINE)try{return $defineProperty(e,t,r)}catch(e){}if("get"in r||"set"in r)throw $TypeError$2("Accessors not supported");return"value"in r&&(e[t]=r.value),e},descriptors),definePropertyModule$4=objectDefineProperty,createPropertyDescriptor$2=createPropertyDescriptor$4,createNonEnumerableProperty$4=DESCRIPTORS$5?function(e,t,r){return definePropertyModule$4.f(e,t,createPropertyDescriptor$2(1,r))}:function(e,t,r){return e[t]=r,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$4=descriptors,hasOwn$6=hasOwnProperty_1,FunctionPrototype=Function.prototype,getDescriptor=DESCRIPTORS$4&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$6(FunctionPrototype,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$4||getDescriptor(FunctionPrototype,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$6=functionUncurryThis,isCallable$9=isCallable$f,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$2=(isCallable$9(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$4=global$b,isCallable$8=isCallable$f,inspectSource$1=inspectSource$2,WeakMap$1=global$b.WeakMap,nativeWeakMap=isCallable$8(WeakMap$1)&&/native code/.test(inspectSource$1(WeakMap$1)),shared$1=shared$3.exports,uid=uid$2,keys=shared$1("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$3=global$b,uncurryThis$5=functionUncurryThis,isObject=isObject$5,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$5=hasOwnProperty_1,shared=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$1=global$3.TypeError,WeakMap=global$3.WeakMap,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(t){return function(e){if(isObject(e)&&(e=get(e)).type===t)return e;throw TypeError$1("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared.state?(store=shared.state||(shared.state=new WeakMap),wmget=uncurryThis$5(store.get),wmhas=uncurryThis$5(store.has),wmset=uncurryThis$5(store.set),set=function(e,t){if(wmhas(store,e))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset(store,e,t),t},get=function(e){return wmget(store,e)||{}},function(e){return wmhas(store,e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set=function(e,t){if(hasOwn$5(e,STATE))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$5(e,STATE)?e[STATE]:{}},function(e){return hasOwn$5(e,STATE)}),{set:set,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$6=fails$d,isCallable$7=isCallable$f,hasOwn$4=hasOwnProperty_1,DESCRIPTORS$3=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource=inspectSource$2,InternalStateModule$1=internalState,enforceInternalState=InternalStateModule$1.enforce,getInternalState$1=InternalStateModule$1.get,defineProperty$4=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$3&&!fails$6(function(){return 8!==defineProperty$4(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!hasOwn$4(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$3?defineProperty$4(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&r&&hasOwn$4(r,"arity")&&e.length!==r.arity&&defineProperty$4(e,"length",{value:r.arity});try{r&&hasOwn$4(r,"constructor")&&r.constructor?DESCRIPTORS$3&&defineProperty$4(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=enforceInternalState(e);return hasOwn$4(r,"source")||(r.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$6=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$7(this)&&getInternalState$1(this).source||inspectSource(this)},"toString"),isCallable$f),definePropertyModule$3=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$3=function(e,t,r,n){var o=(n=n||{}).enumerable,s=void 0!==n.name?n.name:t;if(isCallable$6(r)&&makeBuiltIn(r,s,n),n.global)o?e[t]=r:defineGlobalProperty$1(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:definePropertyModule$3.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor$1=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor$1:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$2=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$1=toIntegerOrInfinity$2,max$1=Math.max,min$1=Math.min,toAbsoluteIndex$2=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max$1(e+t,0):min$1(e,t)},toIntegerOrInfinity=toIntegerOrInfinity$2,min=Math.min,toLength$1=function(e){return 0<e?min(toIntegerOrInfinity(e),9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$3=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex$1=toAbsoluteIndex$2,lengthOfArrayLike$2=lengthOfArrayLike$3,createMethod=function(a){return function(e,t,r){var n,o=toIndexedObject$3(e),s=lengthOfArrayLike$2(o),i=toAbsoluteIndex$1(r,s);if(a&&t!=t){for(;i<s;)if((n=o[i++])!=n)return!0}else for(;i<s;i++)if((a||i in o)&&o[i]===t)return a||i||0;return!a&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},uncurryThis$4=functionUncurryThis,hasOwn$3=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$1=uncurryThis$4([].push),objectKeysInternal=function(e,t){var r,n=toIndexedObject$2(e),o=0,s=[];for(r in n)!hasOwn$3(hiddenKeys$2,r)&&hasOwn$3(n,r)&&push$1(s,r);for(;t.length>o;)!hasOwn$3(n,r=t[o++])||~indexOf(s,r)||push$1(s,r);return s},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)},{}),getBuiltIn$1=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$4),uncurryThis$3=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$3=anObject$5,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$1("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$3(e)),r=getOwnPropertySymbolsModule$1.f;return r?concat$1(t,r(e)):t},hasOwn$2=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$2=objectDefineProperty,copyConstructorProperties$1=function(e,t,r){for(var n=ownKeys(t),o=definePropertyModule$2.f,s=getOwnPropertyDescriptorModule.f,i=0;i<n.length;i++){var a=n[i];hasOwn$2(e,a)||r&&hasOwn$2(r,a)||o(e,a,s(t,a))}},fails$5=fails$d,isCallable$5=isCallable$f,replacement=/#|\.prototype\./,isForced$1=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$5(t)?fails$5(t):!!t)},normalize=isForced$1.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$2=global$b,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$2=defineBuiltIn$3,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced=isForced_1,_export=function(e,t){var r,n,o,s=e.target,i=e.global,a=e.stat,l=i?global$2:a?global$2[s]||defineGlobalProperty(s,{}):(global$2[s]||{}).prototype;if(l)for(r in t){if(n=t[r],o=e.dontCallGetSet?(o=getOwnPropertyDescriptor(l,r))&&o.value:l[r],!isForced(i?r:s+(a?".":"#")+r,e.forced)&&void 0!==o){if(typeof n==typeof o)continue;copyConstructorProperties(n,o)}(e.sham||o&&o.sham)&&createNonEnumerableProperty$2(n,"sham",!0),defineBuiltIn$2(l,r,n,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$2=descriptors,uncurryThis$2=functionUncurryThis,call$1=functionCall,fails$4=fails$d,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$2=toObject$4,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$3=Object.defineProperty,concat=uncurryThis$2([].concat),objectAssign=!$assign||fails$4(function(){var e,t,r,n;return!(!DESCRIPTORS$2||1===$assign({b:1},$assign(defineProperty$3({},"a",{enumerable:!0,get:function(){defineProperty$3(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},n="abcdefghijklmnopqrst",(e={})[r=Symbol()]=7,n.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[r])||objectKeys$1($assign({},t)).join("")!=n})?function(e,t){for(var r=toObject$2(e),n=arguments.length,o=1,s=getOwnPropertySymbolsModule.f,i=propertyIsEnumerableModule.f;o<n;)for(var a,l=IndexedObject(arguments[o++]),c=s?concat(objectKeys$1(l),s(l)):objectKeys$1(l),u=c.length,p=0;p<u;)a=c[p++],DESCRIPTORS$2&&!call$1(i,l,a)||(r[a]=l[a]);return r}:$assign,$$2=_export,assign=objectAssign;_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign});const useStyles$1$1=makeStyles()(()=>({headerContainer:{padding:"20px 15px",borderBottom:".5px solid #D9E2EB"}})),SystemInfoHeader=()=>{var e=useStyles$1$1()["classes"];return jsxRuntime.exports.jsxs(Box,Object.assign({className:e.headerContainer},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.tab-title",defaultMessage:"System Information",description:"System Information label"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.tab-description",defaultMessage:"View Instance information and historical version updates for this environment.",description:"System Information description text"})}))]}))},useStyles$3=makeStyles()(()=>({tile:{marginRight:"12px",width:"257px",height:"96px",borderRadius:"4px",border:"1px solid #DADFE8",background:"rgba(255, 253, 249, 0.80)",display:"flex",justifyContent:"center",alignItems:"center"}})),SystemInfoTile=({title:e,content:t})=>{var r=useStyles$3()["classes"];return jsxRuntime.exports.jsx(Box,Object.assign({className:r.tile},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:{textAlign:"center"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{fontWeight:700}},{children:e})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2"},{children:t}))]}))}))},SLICE_NAME$1="adminCenterSystemInfo",namespace$1="systemInfo",initialState$1={status:"idle",versionInfo:null},adminCenterSystemInfoSlice=createSlice({name:SLICE_NAME$1+"/"+namespace$1,initialState:initialState$1,reducers:{fetchVersionInfoStart(e){e.status="pending"},fetchVersionInfoSuccess(e,t){e.status="success",e.versionInfo=t.payload},fetchVersionInfoFailure(e){e.status="failure",e.versionInfo=null}}}),actions$1=adminCenterSystemInfoSlice.actions;var systemInfo_state=adminCenterSystemInfoSlice.reducer;const rootReducer$1=combineReducers({[namespace$1]:systemInfo_state});function __awaiter$1(e,i,a,l){return new(a=a||Promise)(function(r,t){function n(e){try{s(l.next(e))}catch(e){t(e)}}function o(e){try{s(l.throw(e))}catch(e){t(e)}}function s(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}s((l=l.apply(e,i||[])).next())})}const fetchPlatformInfo=(n,o)=>__awaiter$1(void 0,void 0,void 0,function*(){var e="platformInfo";try{var{data:t,errors:r}=yield baseGraphQLApi({query:"query platformInfo {\n platformInfo { \n aiWAREVersion {\n currentVersion {\n version\n }\n }\n properties\n aiWAREVersionHistory {\n platformVersion {\n version\n id\n manifestUrl\n createdAt\n installedAt\n }\n }\n }\n }",graphEndpoint:n,token:o,operationName:e,variables:void 0,extraHeaders:void 0});if(!r&&t&&null!=t&&t.platformInfo)return t.platformInfo;throw new Error("Fetching Platform Info failed. Please try again later")}catch(e){return devErrorLogger(e),e}});function*fetchPlatformInfoSaga(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var{graphQLEndpoint:r,token:n}=yield select(selectApiConfigs),o=yield call$7(fetchPlatformInfo,r,n);if(o instanceof Error)throw new Error(o.message);yield put(actions$1.fetchVersionInfoSuccess(o))}catch(e){devErrorLogger(JSON.stringify(e)),yield put(actions$1.fetchVersionInfoFailure()),yield put(showMessage({content:isEqual_1("production","development")?"Operation fetchPlatformInfo has failed. Please try again later":t({id:"system-info.fetch-info-failed",defaultMessage:[{type:0,value:"Operation fetchPlatformInfo has failed. Please try again later"}]}),severity:MessageSeverity.Error}))}}function*fetchVersionInfoWatcher(){yield takeEvery$1(actions$1.fetchVersionInfoStart.type,fetchPlatformInfoSaga)}function*rootSaga$1(){yield all([fetchVersionInfoWatcher()])}const selectVersionHistory=e=>{return null==(e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$1])?void 0:e.versionInfo)?void 0:e.aiWAREVersionHistory},selectCurrentVersion=e=>{return null==(e=null==(e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$1])?void 0:e.versionInfo)?void 0:e.aiWAREVersion)?void 0:e.currentVersion},selectPlatformProperties=e=>{return null==(e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$1])?void 0:e.versionInfo)?void 0:e.properties};function getPlatformInfoModule(){return{id:SLICE_NAME$1,reducerMap:{[SLICE_NAME$1]:rootReducer$1},sagas:[rootSaga$1],initialActions:[]}}var activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,objectDefineProperties={},DESCRIPTORS$1=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$1=objectDefineProperty,anObject$2=anObject$5,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn=(objectDefineProperties.f=DESCRIPTORS$1&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$2(e);for(var r,n=toIndexedObject$1(t),o=objectKeys(t),s=o.length,i=0;i<s;)definePropertyModule$1.f(e,r=o[i++],n[r]);return e},getBuiltIn$4),html$1=getBuiltIn$4("document","documentElement"),anObject$1=anObject$5,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html=html$1,documentCreateElement$1=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=documentCreateElement$1("iframe"),t="java"+SCRIPT+":";return e.style.display="none",html.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"==typeof document||document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()},objectCreate=(hiddenKeys[IE_PROTO$1]=!0,Object.create||function(e,t){var r;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$1(e),r=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,r[IE_PROTO$1]=e):r=NullProtoObject(),void 0===t?r:definePropertiesModule.f(r,t)}),wellKnownSymbol$6=wellKnownSymbol$8,create$1=objectCreate,defineProperty$2=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$6("unscopables"),ArrayPrototype=Array.prototype,addToUnscopables$1=(null==ArrayPrototype[UNSCOPABLES]&&defineProperty$2(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype[UNSCOPABLES][e]=!0}),iterators={},fails$3=fails$d,correctPrototypeGetter=!fails$d(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$1=hasOwnProperty_1,isCallable$4=isCallable$f,toObject$1=toObject$4,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){var t,e=toObject$1(e);return hasOwn$1(e,IE_PROTO)?e[IE_PROTO]:(t=e.constructor,isCallable$4(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null)},fails$2=fails$d,isCallable$3=isCallable$f,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$1=defineBuiltIn$3,wellKnownSymbol$5=wellKnownSymbol$8,ITERATOR$2=wellKnownSymbol$8("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,NEW_ITERATOR_PROTOTYPE=([].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0),null==IteratorPrototype$2||fails$2(function(){var e={};return IteratorPrototype$2[ITERATOR$2].call(e)!==e})),iteratorsCore=(isCallable$3((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$2])||defineBuiltIn$1(IteratorPrototype$2,ITERATOR$2,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$1=objectDefineProperty.f,hasOwn=hasOwnProperty_1,wellKnownSymbol$4=wellKnownSymbol$8,TO_STRING_TAG$3=wellKnownSymbol$8("toStringTag"),setToStringTag$2=function(e,t,r){(e=e&&!r?e.prototype:e)&&!hasOwn(e,TO_STRING_TAG$3)&&defineProperty$1(e,TO_STRING_TAG$3,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor$1=createPropertyDescriptor$4,setToStringTag$1=setToStringTag$2,Iterators$2=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,r,n){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor$1(+!n,r)}),setToStringTag$1(e,t,!1),Iterators$2[t]=returnThis$1,e},isCallable$2=isCallable$f,$String$1=String,$TypeError$1=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$2(e))return e;throw $TypeError$1("Can't set "+$String$1(e)+" as a prototype")},uncurryThis$1=functionUncurryThis,anObject=anObject$5,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return anObject(e),aPossiblePrototype(t),n?r(e,t):e.__proto__=t,e}}():void 0),$$1=_export,call=functionCall,FunctionName=functionName,isCallable$1=isCallable$f,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$2,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn=defineBuiltIn$3,wellKnownSymbol$3=wellKnownSymbol$8,Iterators$1=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$1=wellKnownSymbol$3("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,r,n,o,s,i){createIteratorConstructor(r,t,n);function a(e){if(e===o&&y)return y;if(!BUGGY_SAFARI_ITERATORS&&e in p)return p[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new r(this,e)}}return function(){return new r(this)}}var l,c,n=t+" Iterator",u=!1,p=e.prototype,d=p[ITERATOR$1]||p["@@iterator"]||o&&p[o],y=!BUGGY_SAFARI_ITERATORS&&d||a(o),f="Array"==t&&p.entries||d;if(f&&(f=getPrototypeOf(f.call(new e)))!==Object.prototype&&f.next&&(getPrototypeOf(f)!==IteratorPrototype&&(setPrototypeOf?setPrototypeOf(f,IteratorPrototype):isCallable$1(f[ITERATOR$1])||defineBuiltIn(f,ITERATOR$1,returnThis)),setToStringTag(f,n,!0)),PROPER_FUNCTION_NAME&&o==VALUES&&d&&d.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(p,"name",VALUES):(u=!0,y=function(){return call(d,this)})),o)if(l={values:a(VALUES),keys:s?y:a(KEYS),entries:a(ENTRIES)},i)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in p||defineBuiltIn(p,c,l[c]);else $$1({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return p[ITERATOR$1]!==y&&defineBuiltIn(p,ITERATOR$1,y,{name:o}),Iterators$1[t]=y,l},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators=iterators,InternalStateModule=internalState,defineProperty=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),values=Iterators.Arguments=Iterators.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS&&"values"!==values.name)try{defineProperty(values,"name",{value:"values"})}catch(e){}var COLLECTION_NAME,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement$2("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,global$1=global$b,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol$2=wellKnownSymbol$8,ITERATOR=wellKnownSymbol$2("iterator"),TO_STRING_TAG$2=wellKnownSymbol$2("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR,ArrayValues)}catch(e){t[ITERATOR]=ArrayValues}if(t[TO_STRING_TAG$2]||createNonEnumerableProperty(t,TO_STRING_TAG$2,e),DOMIterables[e])for(var r in ArrayIteratorMethods)if(t[r]!==ArrayIteratorMethods[r])try{createNonEnumerableProperty(t,r,ArrayIteratorMethods[r])}catch(e){t[r]=ArrayIteratorMethods[r]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$1[COLLECTION_NAME]&&global$1[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var AdminCenterView,tryToString=tryToString$2,$TypeError=TypeError,deletePropertyOrThrow$1=function(e,t){if(!delete e[t])throw $TypeError("Cannot delete property "+tryToString(t)+" of "+tryToString(e))},wellKnownSymbol$1=wellKnownSymbol$8,TO_STRING_TAG$1=wellKnownSymbol$8("toStringTag"),test$1={},toStringTagSupport=(test$1[TO_STRING_TAG$1]="z","[object z]"===String(test$1)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable=isCallable$f,classofRaw=classofRaw$1,wellKnownSymbol=wellKnownSymbol$8,TO_STRING_TAG=wellKnownSymbol$8("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$1=TO_STRING_TAG_SUPPORT?classofRaw:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw(e):"Object"==(t=classofRaw(e))&&isCallable(e.callee)?"Arguments":t},classof=classof$1,$String=String,toString$1=function(e){if("Symbol"===classof(e))throw TypeError("Cannot convert a Symbol value to a string");return $String(e)},toPropertyKey=toPropertyKey$3,definePropertyModule=objectDefineProperty,createPropertyDescriptor=createPropertyDescriptor$4,createProperty$1=function(e,t,r){t=toPropertyKey(t);t in e?definePropertyModule.f(e,t,createPropertyDescriptor(0,r)):e[t]=r},toAbsoluteIndex=toAbsoluteIndex$2,lengthOfArrayLike$1=lengthOfArrayLike$3,createProperty=createProperty$1,$Array=Array,max=Math.max,arraySliceSimple=function(e,t,r){for(var n=lengthOfArrayLike$1(e),o=toAbsoluteIndex(t,n),s=toAbsoluteIndex(void 0===r?n:r,n),i=$Array(max(s-o,0)),a=0;o<s;o++,a++)createProperty(i,a,e[o]);return i.length=a,i},arraySlice=arraySliceSimple,floor=Math.floor,mergeSort=function(e,t){var r=e.length,n=floor(r/2);return r<8?insertionSort(e,t):merge(e,mergeSort(arraySlice(e,0,n),t),mergeSort(arraySlice(e,n),t),t)},insertionSort=function(e,t){for(var r,n,o=e.length,s=1;s<o;){for(r=e[n=s];n&&0<t(e[n-1],r);)e[n]=e[--n];n!==s++&&(e[n]=r)}return e},merge=function(e,t,r,n){for(var o=t.length,s=r.length,i=0,a=0;i<o||a<s;)e[i+a]=i<o&&a<s?n(t[i],r[a])<=0?t[i++]:r[a++]:i<o?t[i++]:r[a++];return e},arraySort=mergeSort,fails$1=fails$d,arrayMethodIsStrict$1=function(e,t){var r=[][e];return!!r&&fails$1(function(){r.call(null,t||function(){return 1},1)})},userAgent$1=engineUserAgent,firefox=engineUserAgent.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],UA=engineUserAgent,engineIsIeOrEdge=/MSIE|Trident/.test(UA),userAgent=engineUserAgent,webkit=engineUserAgent.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],$=_export,uncurryThis=functionUncurryThis,aCallable=aCallable$2,toObject=toObject$4,lengthOfArrayLike=lengthOfArrayLike$3,deletePropertyOrThrow=deletePropertyOrThrow$1,toString=toString$1,fails=fails$d,internalSort=arraySort,arrayMethodIsStrict=arrayMethodIsStrict$1,FF=engineFfVersion,IE_OR_EDGE=engineIsIeOrEdge,V8=engineV8Version,WEBKIT=engineWebkitVersion,test=[],un$Sort=uncurryThis(test.sort),push=uncurryThis(test.push),FAILS_ON_UNDEFINED=fails(function(){test.sort(void 0)}),FAILS_ON_NULL=fails(function(){test.sort(null)}),STRICT_METHOD=arrayMethodIsStrict("sort"),STABLE_SORT=!fails(function(){if(V8)return V8<70;if(!(FF&&3<FF)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;for(var e,t,r,n="",o=65;o<76;o++){switch(e=String.fromCharCode(o),o){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)test.push({k:e+r,v:t})}for(test.sort(function(e,t){return t.v-e.v}),r=0;r<test.length;r++)e=test[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}}),FORCED=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD||!STABLE_SORT,getSortCompare=function(r){return function(e,t){return void 0===t?-1:void 0===e?1:void 0!==r?+r(e,t)||0:toString(e)>toString(t)?1:-1}};$({target:"Array",proto:!0,forced:FORCED},{sort:function(e){void 0!==e&&aCallable(e);var t=toObject(this);if(STABLE_SORT)return void 0===e?un$Sort(t):un$Sort(t,e);for(var r,n=[],o=lengthOfArrayLike(t),s=0;s<o;s++)s in t&&push(n,t[s]);for(internalSort(n,getSortCompare(e)),r=n.length,s=0;s<r;)t[s]=n[s++];for(;s<o;)deletePropertyOrThrow(t,s++);return t}});const formatter=e=>e?jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"body2"},{children:[new Date(e).getMonth()+1,"/",new Date(e).getDay(),"/",new Date(e).getFullYear()]})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:new Date(e).toLocaleTimeString("en",{timeStyle:"short",hour12:!0})}))]}):"--/--/--",VersionRows=({versions:e})=>{const o=(useSelector(selectCurrentVersion)||{})["version"];return jsxRuntime.exports.jsx(Box,Object.assign({sx:{height:"calc(100vh - 55px - 64px - 85px - 120px - 118px)",overflowY:"scroll"}},{children:null==e?void 0:e.map(e=>{var{version:e,id:t,createdAt:r,installedAt:n}=e["platformVersion"];return jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,xs:12,sx:{padding:"20px 15px",display:"flex",alignItems:"center"}},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:4,sx:{display:"flex",justifyContent:"space-between"}},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",alignItems:"center"}},{children:["v",index.truncatedString(e,9)]})),o===e?jsxRuntime.exports.jsx(Box,Object.assign({sx:{background:"#465364",borderRadius:"4px",color:"white",padding:"2px 10px",marginRight:"40px",fontWeight:700,fontSize:"12px"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.current-label",defaultMessage:"CURRENT",description:"Current label"})})):null]})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:2,sx:{pl:"3px"}},{children:formatter(r)})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:2,sx:{pl:"5px"}},{children:formatter(n)})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:4,sx:{textAlign:"right"}},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(Button,Object.assign({variant:"text",sx:{fontWeight:400}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.release-notes",defaultMessage:"Release Notes",description:"Release Notes label"})}))}))}))]}),t)})}))},VersionsList=()=>{const e=useSelector(selectVersionHistory),[t,r]=react.exports.useState([]),[n,o]=react.exports.useState("desc"),s={asc:"desc",desc:"asc"},[i,a]=react.exports.useState("installedAt"),l=(react.exports.useEffect(()=>{e&&r(e)},[e]),e=>{i===e?o(s[n]):(a(e),"asc"===n&&o("desc"))}),c=index.usePrevious(n),u=index.usePrevious(i);return react.exports.useEffect(()=>{var e;(c&&u&&c!==n||u!==i)&&((e=[...t]).sort(({platformVersion:e},{platformVersion:t})=>get_1(e,i)<get_1(t,i)?"asc"===n?-1:1:get_1(e,i)>get_1(t,i)?"asc"===n?1:-1:0),r(e))},[n,i]),jsxRuntime.exports.jsxs(Box,Object.assign({sx:{padding:"20px 15px"}},{children:[jsxRuntime.exports.jsx(Box,Object.assign({sx:{marginBottom:"20px"}},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.versions-title",defaultMessage:"Versions",description:"Versions label"})}))})),jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsx(Box,Object.assign({sx:{padding:"0px 15px"}},{children:jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,xs:12,sx:{marginBottom:"5px"}},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:4,onClick:()=>l("version"),sx:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:[jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.version-title",defaultMessage:"Version",description:"Version label"})," ","#"]})),"version"===i?"asc"===n?jsxRuntime.exports.jsx(ArrowUp,{}):jsxRuntime.exports.jsx(ArrowDown,{}):null]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:2,onClick:()=>l("createdAt"),sx:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.release-date-title",defaultMessage:"Release Date",description:"Release Date label"})})),"createdAt"===i?"asc"===n?jsxRuntime.exports.jsx(ArrowUp,{}):jsxRuntime.exports.jsx(ArrowDown,{}):null]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:2,onClick:()=>l("installedAt"),sx:{display:"flex",alignItems:"center",cursor:"pointer"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.upgrade-date-title",defaultMessage:"Upgrade Date",description:"Upgrade Date label"})})),"installedAt"===i?"asc"===n?jsxRuntime.exports.jsx(ArrowUp,{}):jsxRuntime.exports.jsx(ArrowDown,{}):null]})),jsxRuntime.exports.jsx(Grid,{item:!0,xs:4})]}))})),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(VersionRows,{versions:t})]})]}))},SystemInfo=({})=>{const e=useDispatch(),r=useSelector(selectPlatformProperties),n={Size:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.cluster-size",defaultMessage:"Size",description:"Size label"}),Environment:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.environment",defaultMessage:"Environment",description:"Environment label"})};return react.exports.useEffect(()=>{e(actions$1.fetchVersionInfoStart())},[]),jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SystemInfoHeader,{}),r&&0<Object.keys(r).length&&jsxRuntime.exports.jsx(Box,Object.assign({sx:{p:"12px",display:"flex"}},{children:Object.keys(r).filter(e=>n[e]).map(e=>{var t=r[e];return jsxRuntime.exports.jsx(SystemInfoTile,{title:n[e],content:t.charAt(0).toUpperCase()+t.slice(1)},t)})})),jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(VersionsList,{})})]})},useStyles$2=makeStyles()((e,{height:t})=>({header:{alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider,display:"flex",height:t,padding:e.spacing(2),position:"relative"},title:{minWidth:"126px"},marginRight:{marginRight:e.spacing(2)},navigationToggle:{marginRight:e.spacing(1)},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},verticalDivider:{borderRight:".5px solid "+e.palette.divider,height:"70%",margin:"0 "+e.spacing(1)}})),Header=({hidePanel:e,isNavExpanded:t,onLeftNavigationToggle:r,onFullScreenToggle:n,isFullScreen:o,height:s})=>{s=useStyles$2({height:s}).classes;return jsxRuntime.exports.jsxs("header",Object.assign({className:s.header,"data-test":"ac-header"},{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.navigation.menu",defaultMessage:"Toggle Navigation Menu",description:"Toggle Navigation Menu"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({sx:{mr:1},onClick:r,"aria-expanded":t,"aria-labelledby":"ac-header-toggle-nav","data-test":"ac-header-toggle-nav",size:"large"},{children:jsxRuntime.exports.jsx(Hamburger,{})}))})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",className:s.title,"data-test":"ac-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.header.title",defaultMessage:"Admin Center",description:"Panel header of the admin center"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.headerActionContainer},{children:[jsxRuntime.exports.jsx("div",{className:s.verticalDivider}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:o?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.close.full.screen",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.open.full.screen",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:n,"aria-labelledby":"ac-toggle-fullscreen","data-test":"ac-fullscreen-toggle",size:"large"},{children:o?jsxRuntime.exports.jsx(FullscreenExit,{}):jsxRuntime.exports.jsx(Fullscreen,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.close.panel",defaultMessage:"Close Panel",description:"Close Panel"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:e,"aria-labelledby":"ac-close-panel","data-test-id":"ac-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]}))]}))};function __rest(e,t){var r={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function __awaiter(e,i,a,l){return new(a=a||Promise)(function(r,t){function n(e){try{s(l.next(e))}catch(e){t(e)}}function o(e){try{s(l.throw(e))}catch(e){t(e)}}function s(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}s((l=l.apply(e,i||[])).next())})}!function(e){e.users="users",e.permissionSets="permissionSets",e.accessControl="accessControl",e.groups="groups",e.apiTokens="apiTokens",e.iam="iam",e.systemInfo="systemInfo"}(AdminCenterView=AdminCenterView||{});const SLICE_NAME="browse",namespace="browseDetail",initialState={status:"idle",olpFeature:"disabled"},browseSlice=createSlice({name:SLICE_NAME+"/"+namespace,initialState:initialState,reducers:{fetchOlpAvailabilityStart(e){e.status="loading"},fetchOlpAvailabilitySuccess(e,t){e.status="success",e.olpFeature=t.payload},fetchOlpAvailabilityFailure(e){e.status="failure"}}}),actions=browseSlice.actions;var browse_state=browseSlice.reducer;const rootReducer=combineReducers({[namespace]:browse_state});function checkOlpAvailability(t){return __awaiter(this,void 0,void 0,function*(){var e="checkOlpAvailability";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query checkOlpAvailability {\n me {\n organization { \n jsondata \n } \n }\n }\n ",operationName:e},t))).me.organization.jsondata.features.enableRBACFeature})}function*fetchOlpAvailabilitySaga(e){try{var t=yield select(selectApiConfigs),r=yield call$7(checkOlpAvailability,t);yield put(actions.fetchOlpAvailabilitySuccess(r||"disabled"))}catch(e){yield put(actions.fetchOlpAvailabilityFailure()),console.log(e)}}function*fetchOlpAvailabilityWatcher(){yield takeEvery$1(actions.fetchOlpAvailabilityStart.type,fetchOlpAvailabilitySaga)}function*rootSaga(){yield all([fetchOlpAvailabilityWatcher()])}const selectOlpAvailability=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace])?void 0:e.olpFeature};function getAdminCenterBrowseModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const tabWidth=197,useStyles$1=makeStyles()((e,{height:t},r)=>({root:{display:"flex",flexGrow:1,height:t,position:"relative"},tabs:{borderRight:".5px solid "+e.palette.divider,transition:".2s ease",width:e.spacing(14),minWidth:e.spacing(14),padding:e.spacing(1.6)+" "+e.spacing(2.5),boxSizing:"border-box"},tabsContainer:{alignItems:"center"},tabIndicator:{background:"transparent"},tabRoot:{opacity:1,borderRadius:4,fontSize:"14px",marginBottom:e.spacing(1),minHeight:e.spacing(9),minWidth:e.spacing(9),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),width:"100%","&:hover":{background:"#F2F5F9"}},tabsExpanded:{width:tabWidth,minWidth:tabWidth,paddingRight:e.spacing(2),paddingLeft:e.spacing(2),["& "+r.tabRoot]:{width:`calc(${tabWidth}px - ${e.spacing(3)})`,flexDirection:"row",textTransform:"capitalize","& svg":{marginRight:e.spacing(2),marginBottom:"0"}}},tabExpandedWrapper:{flexDirection:"row",display:"flex",justifyContent:"flex-start","& svg":{marginBottom:"0 !important",marginRight:e.spacing(2)}},tabSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg":{marginBottom:"0 !important",marginRight:"0",color:e.palette.primary.main}},contentPanel:{flexGrow:1},tabExpandedSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg":{marginBottom:"0 !important",marginRight:e.spacing(2),color:e.palette.primary.main}},tabWrapper:{flexDirection:"row",display:"flex",justifyContent:"center","& svg":{marginBottom:"0 !important",marginRight:"0"}}})),navListTop=[{id:AdminCenterView.users,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.users.view",defaultMessage:"Users",description:"The label of users tab button."}),testLabel:"ac-users-view",icon:jsxRuntime.exports.jsx(Users,{}),content:e=>jsxRuntime.exports.jsx(UsersPanel,{isPanelFullScreen:e})}],olpNavList=[{id:AdminCenterView.permissionSets,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.permission-sets.view",defaultMessage:"Permission Sets",description:"The label for Permission Sets view"}),testLabel:"ac-permission-sets-view",icon:jsxRuntime.exports.jsx(Lock,{}),content:e=>jsxRuntime.exports.jsx(PermissionSets,{isPanelFullScreen:e})},{id:AdminCenterView.accessControl,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.system-access.view",defaultMessage:"System Access",description:"The label of access control tab button."}),testLabel:"ac-access-control-view",icon:jsxRuntime.exports.jsx(SecurityGroup,{style:{transform:"translate(4px, 0px)"}}),content:e=>jsxRuntime.exports.jsx(AccessControl,{isPanelFullScreen:e})},{id:AdminCenterView.groups,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.groups.view",defaultMessage:"Groups",description:"The label of groups tab button."}),testLabel:"ac-groups-view",icon:jsxRuntime.exports.jsx(Group,{style:{transform:"translate(2px, 0px)"}}),content:e=>jsxRuntime.exports.jsx(GroupsPanel,{isPanelFullScreen:e})}],systemInfoNav={id:AdminCenterView.systemInfo,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.system-info.view",defaultMessage:"System Info",description:"The label for System Info view"}),testLabel:"ac-system-info-view",icon:jsxRuntime.exports.jsx(Information,{}),content:e=>jsxRuntime.exports.jsx(SystemInfo,{isFullScreen:e})},getTabId=(e,t)=>e[t].id,MainTabPanel=({currentView:t,setCurrentView:r,isNavExpanded:n,isFullScreen:o,height:e})=>{const s=useStyles$1({height:e})["classes"],[i,a]=react.exports.useState(navListTop),l=useSelector(selectOlpAvailability),c=useSelector(betaFeaturesSelector);return react.exports.useEffect(()=>{var e=gqlIntrospection.getQueries().find(e=>"apiTokens"===e.name),t={id:AdminCenterView.apiTokens,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.api-tokens.view",defaultMessage:"API Tokens",description:"The label for API Tokens view"}),testLabel:"ac-api-tokens-view",icon:jsxRuntime.exports.jsx(Lock2,{style:{transform:"translate(4px, 0px)"}}),content:e=>jsxRuntime.exports.jsx(ApiTokensTab,{})};const r=[];e&&c&&r.push(t),r.push({id:AdminCenterView.iam,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.iam.view",defaultMessage:"IAM",description:"The label for the IAM view"}),testLabel:"ac-iam-view",icon:jsxRuntime.exports.jsx(Iam,{style:{transform:"translate(4px, 0px)"}}),content:e=>jsxRuntime.exports.jsx(IamTab,{isPanelFullScreen:e})}),c&&r.push(systemInfoNav),a(e=>"enabled"===l?[...navListTop,...olpNavList,...r]:"disabled"===l?[...navListTop,...r]:e)},[l,c]),jsxRuntime.exports.jsxs("div",Object.assign({className:s.root},{children:[jsxRuntime.exports.jsx(Tabs,Object.assign({id:"adminCenterViewTabs",orientation:"vertical",value:t,onChange:(e,t)=>{r(getTabId(i,t))},className:classNames(s.tabs,{[s.tabsExpanded]:n}),classes:{flexContainer:s.tabsContainer,indicator:s.tabIndicator},"aria-label":"admin center tabs","data-test":"ac-nav-tabs-container"},{children:i.map(e=>jsxRuntime.exports.jsx(Tooltip,Object.assign({placement:"right",title:n?"":e.label,"data-test":"ac-nav-tab-"+e.testLabel},{children:jsxRuntime.exports.jsx(Tab,Object.assign({wrapped:!0},a11yProps(e.id),{label:n?e.label:"",icon:e.icon,classes:{root:s.tabRoot,wrapped:n?s.tabExpandedWrapper:s.tabWrapper,selected:n?s.tabExpandedSelected:s.tabSelected}}))}),e.id))})),i.map(e=>jsxRuntime.exports.jsx(TabPanel,Object.assign({selected:t,value:e.id,className:s.contentPanel},{children:e.content(o)}),e.id))]}))};function TabPanel(e){var{children:t,selected:r,value:n}=e,e=__rest(e,["children","selected","value"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",hidden:r!==n,id:"admin-center-tabpanel-"+n,"aria-labelledby":"admin-center-tab-"+n},e,{children:r===n&&t}))}function a11yProps(e){return{id:"admin-center-tab-"+e,"aria-controls":"admin-center-tabpanel-"+e}}const Container=({fullScreen:e,classes:t,dimmed:r,children:n})=>e?jsxRuntime.exports.jsx(Portal,{children:jsxRuntime.exports.jsxs("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classNames(t.panel,t.fullScreen)},{children:[r&&jsxRuntime.exports.jsx("div",{className:t.overlay}),n]}))}):jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classNames(t.root,t.panel)},{children:n})),appBarHeight=55,headerHeight=64,borderBottom=5,useStyles=makeStyles()(e=>({root:{width:1020,position:"relative"},panel:{backgroundColor:e.palette.background.paper,boxShadow:"0px 0px 12px rgba(0, 0, 0, 0.25)",height:"100%"},fullScreen:{position:"fixed",width:"100%",height:"100vh",top:0,left:0,right:0,bottom:0,zIndex:1004},overlay:{backgroundColor:e.palette.grey[50],opacity:"0.5 !important",height:"100%",position:"absolute",top:0,width:"100%",zIndex:1001}})),MainLayout=({hidePanel:e})=>{const[t,r]=react.exports.useState(!0),[n,o]=react.exports.useState(!1);var[s,i]=react.exports.useState(AdminCenterView.users),a=useStyles()["classes"],l=(useSelector(panelsSelector)||[]).find(e=>"ADMIN_CENTER_BROWSE"===e.panelId)||{panelConfig:{dimmed:0}},l=0<(null==(l=null===l?void 0:l.panelConfig)?void 0:l.dimmed),c=`calc(100vh - ${n?25:appBarHeight+borderBottom}px - ${headerHeight}px)`;return jsxRuntime.exports.jsxs(Container,Object.assign({dimmed:l,fullScreen:n,classes:a},{children:[jsxRuntime.exports.jsx(Header,{height:headerHeight,hidePanel:e,isNavExpanded:t,onLeftNavigationToggle:()=>{r(!t)},isFullScreen:n,onFullScreenToggle:()=>{o(!n)}}),jsxRuntime.exports.jsx(MainTabPanel,{currentView:s,setCurrentView:i,height:c,isNavExpanded:t,isFullScreen:n})]}))},Content=e=>{var{apiRoot:t,graphQLEndpoint:r,token:n}=useSelector(selectApiConfigs);const o=useDispatch();return useOrganizationPermissions(EAuthResourceType.Job),react.exports.useEffect(()=>{o(actions.fetchOlpAvailabilityStart())},[o]),t&&r&&n?jsxRuntime.exports.jsx(MainLayout,Object.assign({},e)):null},AdminCenterBrowse=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAdminCenterUsersModule(),getAdminCenterGroupsModule(),getAdminCenterPermissionsModule(),getAdminCenterApplicationsModule(),getAdminCenterBrowseModule(),getOrganizationPanelModule(),getPlatformInfoModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(Content,Object.assign({},e))})}))});export{AdminCenterBrowse};
Binary file