aiware-js 1.0.0-master.531 → 1.0.0-master.533

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.
Files changed (158) hide show
  1. package/index.esm.js +1 -1
  2. package/index.esm.js.gz +0 -0
  3. package/js-core.esm.js +8 -8
  4. package/js-core.esm.js.gz +0 -0
  5. package/js-core.esm10.js +1 -1
  6. package/js-core.esm10.js.gz +0 -0
  7. package/js-core.esm11.js +1 -1
  8. package/js-core.esm11.js.gz +0 -0
  9. package/js-core.esm13.js +1 -1
  10. package/js-core.esm13.js.gz +0 -0
  11. package/js-core.esm14.js +1 -1
  12. package/js-core.esm14.js.gz +0 -0
  13. package/js-core.esm15.js +1 -1
  14. package/js-core.esm15.js.gz +0 -0
  15. package/js-core.esm16.js +1 -1
  16. package/js-core.esm16.js.gz +0 -0
  17. package/js-core.esm17.js +1 -1
  18. package/js-core.esm17.js.gz +0 -0
  19. package/js-core.esm19.js +1 -1
  20. package/js-core.esm19.js.gz +0 -0
  21. package/js-core.esm20.js +1 -1
  22. package/js-core.esm20.js.gz +0 -0
  23. package/js-core.esm21.js +1 -1
  24. package/js-core.esm21.js.gz +0 -0
  25. package/js-core.esm23.js +1 -1
  26. package/js-core.esm23.js.gz +0 -0
  27. package/js-core.esm24.js +1 -1
  28. package/js-core.esm24.js.gz +0 -0
  29. package/js-core.esm26.js +1 -1
  30. package/js-core.esm26.js.gz +0 -0
  31. package/js-core.esm27.js +1 -1
  32. package/js-core.esm27.js.gz +0 -0
  33. package/js-core.esm28.js +1 -1
  34. package/js-core.esm28.js.gz +0 -0
  35. package/js-core.esm29.js +1 -1
  36. package/js-core.esm29.js.gz +0 -0
  37. package/js-core.esm30.js +1 -1
  38. package/js-core.esm30.js.gz +0 -0
  39. package/js-core.esm32.js +1 -1
  40. package/js-core.esm32.js.gz +0 -0
  41. package/js-core.esm33.js +1 -1
  42. package/js-core.esm33.js.gz +0 -0
  43. package/js-core.esm35.js +1 -1
  44. package/js-core.esm35.js.gz +0 -0
  45. package/js-core.esm36.js +1 -1
  46. package/js-core.esm36.js.gz +0 -0
  47. package/js-core.esm37.js +1 -1
  48. package/js-core.esm37.js.gz +0 -0
  49. package/js-core.esm38.js +1 -1
  50. package/js-core.esm38.js.gz +0 -0
  51. package/js-core.esm39.js +1 -1
  52. package/js-core.esm39.js.gz +0 -0
  53. package/js-core.esm40.js +1 -1
  54. package/js-core.esm40.js.gz +0 -0
  55. package/js-core.esm41.js +1 -1
  56. package/js-core.esm41.js.gz +0 -0
  57. package/js-core.esm42.js +1 -1
  58. package/js-core.esm42.js.gz +0 -0
  59. package/js-core.esm43.js +1 -1
  60. package/js-core.esm43.js.gz +0 -0
  61. package/js-core.esm44.js +1 -1
  62. package/js-core.esm44.js.gz +0 -0
  63. package/js-core.esm45.js +1 -1
  64. package/js-core.esm45.js.gz +0 -0
  65. package/js-core.esm47.js +2 -2
  66. package/js-core.esm47.js.gz +0 -0
  67. package/js-core.esm48.js +1 -1
  68. package/js-core.esm48.js.gz +0 -0
  69. package/js-core.esm5.js +13 -4
  70. package/js-core.esm5.js.gz +0 -0
  71. package/js-core.esm50.js +1 -1
  72. package/js-core.esm50.js.gz +0 -0
  73. package/js-core.esm51.js +1 -1
  74. package/js-core.esm51.js.gz +0 -0
  75. package/js-core.esm52.js +1 -1
  76. package/js-core.esm52.js.gz +0 -0
  77. package/js-core.esm53.js +1 -1
  78. package/js-core.esm53.js.gz +0 -0
  79. package/js-core.esm54.js +1 -1
  80. package/js-core.esm54.js.gz +0 -0
  81. package/js-core.esm55.js +1 -1
  82. package/js-core.esm55.js.gz +0 -0
  83. package/js-core.esm57.js +1 -1
  84. package/js-core.esm57.js.gz +0 -0
  85. package/js-core.esm58.js +1 -1
  86. package/js-core.esm58.js.gz +0 -0
  87. package/js-core.esm59.js +1 -1
  88. package/js-core.esm59.js.gz +0 -0
  89. package/js-core.esm60.js +1 -1
  90. package/js-core.esm60.js.gz +0 -0
  91. package/js-core.esm61.js +1 -1
  92. package/js-core.esm61.js.gz +0 -0
  93. package/js-core.esm62.js +1 -1
  94. package/js-core.esm62.js.gz +0 -0
  95. package/js-core.esm63.js +1 -1
  96. package/js-core.esm63.js.gz +0 -0
  97. package/js-core.esm64.js +1 -1
  98. package/js-core.esm64.js.gz +0 -0
  99. package/js-core.esm65.js +1 -1
  100. package/js-core.esm65.js.gz +0 -0
  101. package/js-core.esm66.js +1 -1
  102. package/js-core.esm66.js.gz +0 -0
  103. package/js-core.esm67.js +1 -1
  104. package/js-core.esm67.js.gz +0 -0
  105. package/js-core.esm68.js +1 -1
  106. package/js-core.esm68.js.gz +0 -0
  107. package/js-core.esm69.js +1 -1
  108. package/js-core.esm69.js.gz +0 -0
  109. package/js-core.esm7.js +6 -5
  110. package/js-core.esm7.js.gz +0 -0
  111. package/js-core.esm70.js +1 -1
  112. package/js-core.esm70.js.gz +0 -0
  113. package/js-core.esm71.js +1 -1
  114. package/js-core.esm71.js.gz +0 -0
  115. package/js-core.esm72.js +1 -1
  116. package/js-core.esm72.js.gz +0 -0
  117. package/js-core.esm73.js +1 -1
  118. package/js-core.esm73.js.gz +0 -0
  119. package/js-core.esm74.js +2 -2
  120. package/js-core.esm74.js.gz +0 -0
  121. package/js-core.esm75.js +1 -1
  122. package/js-core.esm75.js.gz +0 -0
  123. package/js-core.esm76.js +1 -1
  124. package/js-core.esm76.js.gz +0 -0
  125. package/js-core.esm77.js +1 -1
  126. package/js-core.esm77.js.gz +0 -0
  127. package/js-core.esm79.js +1 -1
  128. package/js-core.esm79.js.gz +0 -0
  129. package/js-core.esm81.js +1 -1
  130. package/js-core.esm81.js.gz +0 -0
  131. package/js-core.esm82.js +1 -1
  132. package/js-core.esm82.js.gz +0 -0
  133. package/js-core.esm83.js +1 -1
  134. package/js-core.esm83.js.gz +0 -0
  135. package/js-core.esm85.js +1 -1
  136. package/js-core.esm85.js.gz +0 -0
  137. package/js-core.esm86.js +1 -1
  138. package/js-core.esm86.js.gz +0 -0
  139. package/js-core.esm87.js +1 -1
  140. package/js-core.esm87.js.gz +0 -0
  141. package/js-core.esm88.js +1 -1
  142. package/js-core.esm88.js.gz +0 -0
  143. package/js-core.esm89.js +1 -1
  144. package/js-core.esm89.js.gz +0 -0
  145. package/js-core.esm90.js +1 -1
  146. package/js-core.esm90.js.gz +0 -0
  147. package/js-core.esm91.js +1 -1
  148. package/js-core.esm91.js.gz +0 -0
  149. package/js-core.esm93.js +1 -1
  150. package/js-core.esm93.js.gz +0 -0
  151. package/js-core.umd.css +92 -92
  152. package/js-core.umd.css.gz +0 -0
  153. package/js-core.umd.js +190 -180
  154. package/js-core.umd.js.gz +0 -0
  155. package/locales/en.json +1 -1
  156. package/locales/es.json +1 -1
  157. package/locales/fr.json +1 -1
  158. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -1 +1 @@
1
- export{gU as AvailableWidgets,g_ as hidePanel,ck as hidePanelAction,h0 as init,gY as mountPanel,cl as mountPanelAction,gW as mountWidget,gT as registerComponent,gS as registry,gV as root,e6 as setData,s as store,g$ as unmountAllPanel,gZ as unmountPanel,ch as unmountPanelAction,gX as unmountWidget,e5 as updatePanelMicroFrontendPropsAction}from"./js-core.esm.js";
1
+ export{gX as AvailableWidgets,h1 as hidePanel,cn as hidePanelAction,h3 as init,g$ as mountPanel,co as mountPanelAction,gZ as mountWidget,gW as registerComponent,gV as registry,gY as root,e9 as setData,s as store,h2 as unmountAllPanel,h0 as unmountPanel,ck as unmountPanelAction,g_ as unmountWidget,e8 as updatePanelMicroFrontendPropsAction}from"./js-core.esm.js";
package/index.esm.js.gz CHANGED
Binary file
package/js-core.esm.js CHANGED
@@ -931,7 +931,7 @@ createScheduledJob(input:{
931
931
  }
932
932
  }
933
933
  }
934
- }`,graphEndpoint:i,token:o})).errors||(e=null==(s=null==n?void 0:n.data)?void 0:s.__type)&&(n=e["name"],(n={name:n,fields:[]}).fields=(e.fields||[]).map(e=>({name:e.name,args:e.args.map(e=>({name:e.name,type:this.typeBuilder(e.type)})),type:this.typeBuilder(null==e?void 0:e.type)})),this.types.push(n),e=n),a){const r=[];return null!==e&&void 0!==e&&e.fields.forEach(t=>{a.find(e=>t.name===e)&&r.push(t)}),r}return null===e||void 0===e?void 0:e.fields}})}typeBuilder(e){if(e.name)return e.name;let t="";return t=e.kind&&("NON_NULL"===e.kind&&(t=this.typeBuilder(e.ofType)+"!"),"LIST"===e.kind)?"["+this.typeBuilder(e.ofType)+"]":t}getQueries(){return this.query}getMutations(){return this.mutation}getTypes(){return this.types}isOperationValid(t,e){return e?!!this[e].find(e=>e.name===t):!!this.query.find(e=>e.name===t)||!!this.mutation.find(e=>e.name===t)}indentationChecker(e){let t=0,n=0;for(;" "===e[n];)t+=1,n+=1;return t}nestingChecker(e){let t=0;for(;t<e.length;)"{"===e[t][e[t].length-1]&&e[t+1]&&"}"===e[t+1][e[t+1].length-1]?e.splice(t,2):t+=1;if(2===e.length)throw new Error("Provided operation payload is not supported");return e}recursiveFieldCheck(d,p,f,h,m=[],g,n=1,v=2){var y;return __awaiter$7(this,void 0,void 0,function*(){let e=" ",r="",t=v;for(;t-1;)e+=" ",r+=" ",--t;!this.types.find(e=>e.name===p)&&p&&(yield this.getAvailableFields(f,h,p));let i=n;for(;i<d.length;){let n;const l=d[i].includes("...");l?(n=d[i].split("on")[1].split("{")[0].trim(),yield this.getAvailableFields(f,h,n)):n=d[i].trim().split("(")[0].trim().split("{")[0].trim();let t;t=n.includes(":")?n.split(":")[1]:n;var o=this.types.find(e=>l?e.name===n:e.name===(p||"").replace(/[\[\]!]+/g,""));if(o||"}"===n||l){var a=l?o:null==o?void 0:o.fields.find(e=>e.name===t);if(a||"}"===n){let t="";if(d[i].includes("(")&&a){var s=this.getParameters(d,i),s=this.paramsParser(s,g);if(s.length){const c=[],u=(null==(y=null==o?void 0:o.fields.find(e=>e.name===n))?void 0:y.args)||[];s.forEach(t=>{var e,n=u.find(e=>e.name in t&&t[e.name]===e.type);n&&(-1!==(e=this.params.findIndex(e=>t.field in e))&&(this.params[e].validated=!0),c.push(Object.assign(Object.assign({},n),{field:t.field})))}),c.length&&(t+="(",c.forEach(e=>t+=`${e.name}: ${e.field} `),t+=")")}}if(d[i].includes("{")&&a||l){l?m.push(`${e}... on ${n} ${t}{`):m.push(""+e+n+` ${t}{`);o=l?n:(null==a?void 0:a.type)||null;i=yield this.recursiveFieldCheck(d,o,f,h,m,g,i+1,v+1)}else{if(d[i].includes("}"))return m.push(r+"}"),i===d.length-1?this.nestingChecker(m).join("\n"):i;m.push(""+e+n)}}else if(d[i].includes("{")){let e=1;for(;e;)i+=1,d[i].includes("{")&&(e+=1),d[i].includes("}")&&--e}}i+=1}})}getParameters(e,t){return e[t].split("(")[1].split(")")[0].trim().replace(/:\s/g,":")}paramsParser(e,n){e=e.split(":");const r=[];e.forEach(e=>{e=e.trim();let t;e.includes(" ")&&(t=e.split(" ")),(t=e.includes(",")?e.split(","):t)?t.forEach(e=>r.push(e.trim())):r.push(e)});var i=[];for(let t=0;t<r.length-1;t++){var o=n.find(e=>r[t+1]in e);o&&(o={[r[t]]:o[r[t+1]],field:r[t+1],validated:!1},i.push(o)),t+=1}return i}queryParser(g,v,y){return __awaiter$7(this,void 0,void 0,function*(){this.params=[];try{this.initialized||(yield this.initialize(g,v,!1));var o=y.split("\n");let i,e="",t="";o[0].includes("(")?(1<(i=o[0].split("(")[0].trim()).split(" ").length&&([i,e]=i.split(" ")),(t=(t=(t=(t=this.getParameters(o,0)).includes(",")?t.split(",").join(""):t).split("$")).filter(e=>!!e)).forEach(e=>"$"+e.trim()),this.params=t.map(e=>{var[e,t]=e.split(":");return{["$"+e]:t.trim(),validated:!1}})):i=o[0].split("{")[0].trim(),i=(i=i.includes(" ")?i.split(" ")[0]:i)||"query";var a,n=o[1],s=this.indentationChecker(n),l=[];for(let r=1;r<o.length;r++){let n="";if(s===this.indentationChecker(o[r])){let t;let e;if(o[r].includes("(")?(t=o[r].split("(")[0].trim(),a=o[r].split("(")[1].split(")")[0].trim(),e=this.paramsParser(a,this.params)):t=o[r].split("{")[0].trim(),"}"!==t){const h=this[i].find(e=>e.name===t);if(e){const m=[];e.forEach(t=>{var e,n=h.args.find(e=>e.name in t&&t[e.name]===e.type);n&&(-1!==(e=this.params.findIndex(e=>t.field in e))&&(this.params[e].validated=!0),m.push(Object.assign(Object.assign({},n),{field:t.field})))}),m.length&&(n+="(",m.forEach(e=>n+=`${e.name}: ${e.field} `),n+=")")}l.push({operation:t,line:r,type:null===h||void 0===h?void 0:h.type,args:n})}}}let r="";for(let t=0;t<l.length;t++){var c=(l[t+1]||{}).line||o.length-1,u=l[t].type,d=o.slice(l[t].line,c),p=md5(d.join("").replace(/\s/g,""));let e;if("string"!=typeof(e=this.hashMap[p]?(console.log(`returning ${l[t].operation} from memory`),this.hashMap[p]):yield this.recursiveFieldCheck(d,u,g,v,[` ${l[t].operation} ${l[t].args} {`],this.params)))throw new Error("Introspection utility failed while validating operation");this.hashMap[p]=e,r+="\n"+e+"\n"}if(r){let n="";if(this.params.forEach(e=>{var t;e.validated&&([e,t]=Object.entries(e)[0],n+=e+`: ${t} `)}),this.params.length&&!n)throw new Error("No valid parameters found");n=n&&"("+n+")",r=`${i} ${e} ${n} {`+r+"}";var f=this.params.filter(e=>!e.validated).map(e=>{var{}=e,e=__rest$4(e,["validated"]);return Object.keys(e)[0].replace("$","")});return{query:r,unsupportedArgs:f}}if(this.safety)throw new Error("Instrospection utility failed. Safety is ON");return console.log("Instrospection utility failed. Safety is OFF. Proceeding with original operation payload"),{query:y}}catch(e){if(console.log(e),!this.safety)return{query:y}}})}}var AuthContext,Status,MessageSeverity,gqlIntrospection=new GqlInstrospection;(AuthContext=AuthContext||{}).ResetPassword="ResetPassword",function(e){e.idle="idle",e.loading="loading",e.success="success",e.failure="failure",e.skipped="skipped",e.ready="ready"}(Status=Status||{});const namespace$3$1="auth",initialState$3$1={oAuthToken:"",oAuthStatus:Status.idle,initStatus:Status.idle,userId:"",sessionToken:"",user:{},status:Status.idle,authContext:null,errorMessage:null,userIsActive:!0},authSlice=createSlice({name:namespace$3$1,initialState:initialState$3$1,reducers:{fetchUserRequest(e){e.status=Status.loading},fetchUserSuccess(e,t){var n;e.sessionToken=null==(n=t.payload)?void 0:n.token,e.userId=null==(n=t.payload)?void 0:n.userId,e.user=Object.assign({},t.payload),e.status=Status.success},fetchUserError(e){e.status=Status.failure},updateTokenRequest(e,t){e.status=Status.idle},updateTokenSuccess(e,t){t=t.payload.token;e.sessionToken=t,e.user.token=t,e.status=Status.success},updateTokenError(e){e.sessionToken="",e.status=Status.failure},updateUserLanguageStart(e,t){e.status=Status.loading},updateUserLanguageSuccess(e,t){e.user.preferredLanguage=t.payload,e.status=Status.success},refreshTokenRequest(e,t){e.status=Status.loading},refreshTokenSuccess(e,t){e.sessionToken=null==(t=null==(t=t.payload)?void 0:t.refreshToken)?void 0:t.token,e.status=Status.success},extendTokenRequest(e,t){e.status=Status.loading},extendTokenSuccess(e,t){e.sessionToken!==t.payload.token&&(e.sessionToken=t.payload.token),e.status=Status.success},setTokenExpiration(e,t){e.user=Object.assign(Object.assign({},e.user),{tokenExpiration:null==(e=t.payload)?void 0:e.expirationTime})},logoutRequest(e,t){e.status=Status.loading},logoutSuccess(e){e.status=Status.success},logoutError(e){e.status=Status.failure},resetPasswordRequest(e,t){e.status=Status.loading,e.errorMessage=null,e.authContext=AuthContext.ResetPassword},resetPasswordError(e,t){t=t.payload;e.status=Status.failure,e.errorMessage=t.message},resetPasswordSuccess(e){e.status=Status.success,e.errorMessage=null},oAuthGrantReadyToStart(e){e.oAuthStatus=Status.ready},oAuthGrantStart(e){e.oAuthStatus=Status.loading},oAuthGrantSkip(e){e.oAuthStatus=Status.skipped},oAuthGrantSuccess(e,t){e.oAuthToken=t.payload,e.oAuthStatus=Status.success},oAuthGrantFailure(e){e.oAuthStatus=Status.failure},sdkInitSuccess(e){e.initStatus=Status.success},sdkInitFailure(e){e.initStatus=Status.failure},updateUserRecentApplicationsStart(e,t){e.status=Status.loading},updateUserRecentApplicationsSuccess(e,t){e.user.recentApplications=t.payload,e.status=Status.success}}}),{fetchUserRequest,fetchUserSuccess,fetchUserError,refreshTokenRequest,refreshTokenSuccess,extendTokenRequest,extendTokenSuccess,setTokenExpiration,logoutRequest,logoutSuccess,logoutError,updateTokenRequest,updateTokenSuccess,updateTokenError,updateUserLanguageStart,updateUserLanguageSuccess,resetPasswordRequest,resetPasswordError,resetPasswordSuccess,oAuthGrantStart,oAuthGrantReadyToStart,oAuthGrantSkip,oAuthGrantSuccess,oAuthGrantFailure,sdkInitSuccess,sdkInitFailure,updateUserRecentApplicationsStart,updateUserRecentApplicationsSuccess}=authSlice.actions,authReducer=authSlice.reducer,namespace$2$1="configs",initialState$2$2={initConfig:{},config:null,status:"idle"},configsSlice=createSlice({name:namespace$2$1,initialState:initialState$2$2,reducers:{getInitConfig(e,t){e.initConfig=t.payload,e.status="loading"},getSessionTimeout(e,t){e.status="loading"},setSessionTimeout(e,t){e.status="success",e.config.sessionTimeout=t.payload},getConfigFail(e){e.status="failure"},getConfigSuccess(e,t){e.status="success",e.config=t.payload},enableBetaFeatures(e){e.initConfig=Object.assign(Object.assign({},e.initConfig),{betaFeatures:!0})},disableBetaFeatures(e){e.initConfig=Object.assign(Object.assign({},e.initConfig),{betaFeatures:!1})}}}),{getInitConfig,getConfigFail,getConfigSuccess,enableBetaFeatures,disableBetaFeatures,getSessionTimeout,setSessionTimeout}=configsSlice.actions,configsReducer=configsSlice.reducer,sessionTokenSelector=e=>{return null==(e=e[namespace$3$1])?void 0:e.sessionToken},authSelector=e=>(null==e?void 0:e[namespace$3$1])||{},userSelector$2=e=>{return null==(e=e[namespace$3$1])?void 0:e.user},selectHasUserCreateRootFolderPermission=e=>{return((null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.myRights)||[]).some(e=>["collections.collections.create","cms.media.create","veritone.superadmin"].includes(e))},selectIsSuperAdmin=e=>{return((null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.myRights)||[]).some(e=>["superadmin","veritone.superadmin"].includes(e))},selectOrgId=e=>{return null==(e=null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.organization)?void 0:e.organizationId},authErrorMessage=e=>{return null==(e=e[namespace$3$1])?void 0:e.errorMessage},selectIsOLPEnabled=e=>{return"enabled"===(null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.enableRBACFeature)},selectUserOrgEdgeVersion=e=>{return null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.edgeVersion},selectUserOrgHideCmsFromAppList=e=>{return!0===(null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.hideCMSFromAppList)},authContextSelector=e=>{return null==(e=e[namespace$3$1])?void 0:e.authContext},authStatusSelector=e=>{return null==(e=e[namespace$3$1])?void 0:e.status},preferredLanguageSelector=e=>{var t;return null!=(t=null==(t=e[namespace$3$1])?void 0:t.user)&&t.preferredLanguage?null==(e=null==(t=e[namespace$3$1])?void 0:t.user)?void 0:e.preferredLanguage:"en"},selectIsUserAdmin=e=>{return null==(e=null==(e=null==(e=e[namespace$3$1])?void 0:e.user)?void 0:e.roles)?void 0:e.includes("superadmin")},oAuthTokenSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.oAuthToken},oAuthStatusSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.oAuthStatus},initStatusSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.initStatus},userRecentApplicationsSelector=e=>{var t;return null!=(t=null==(t=e[namespace$3$1])?void 0:t.user)&&t.recentApplications?JSON.parse(null==(e=null==(t=e[namespace$3$1])?void 0:t.user)?void 0:e.recentApplications):[]},rootApiSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.apiRoot},configSelector=e=>{return null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config},switchApiSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.switchAppUrl},cmsUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.cmsAppUrl},graphEndpointSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.graphEndpoint},loginUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.loginUrl},logoutUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.logoutUrl},hidePasswordResetSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.hidePasswordReset},logoutRedirectUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.logoutRedirectUrl},controllerNodeRedImageSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.controllerNodeRedImage},controllerUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.controllerUrl},automateControllerUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.automateControllerUrl},automateUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.automateUrl},baseUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.baseUrl},initialConfigSelector=e=>{return null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig},sessionTimeoutSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.config)?void 0:e.sessionTimeout},betaFeaturesSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.betaFeatures},appIdSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.applicationId},oauthRedirectUriSelector=e=>{return(null==(e=null==(e=null==e?void 0:e[namespace$2$1])?void 0:e.initConfig)?void 0:e.oAuthRedirectUri)||window.location.protocol+"//"+window.location.hostname},selectApiConfigs$1=createSelector$1([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,n)=>({apiRoot:e,graphQLEndpoint:t,token:n})),getAppConfig=(e,t)=>__awaiter$7(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`query {
934
+ }`,graphEndpoint:i,token:o})).errors||(e=null==(s=null==n?void 0:n.data)?void 0:s.__type)&&(n=e["name"],(n={name:n,fields:[]}).fields=(e.fields||[]).map(e=>({name:e.name,args:e.args.map(e=>({name:e.name,type:this.typeBuilder(e.type)})),type:this.typeBuilder(null==e?void 0:e.type)})),this.types.push(n),e=n),a){const r=[];return null!==e&&void 0!==e&&e.fields.forEach(t=>{a.find(e=>t.name===e)&&r.push(t)}),r}return null===e||void 0===e?void 0:e.fields}})}typeBuilder(e){if(e.name)return e.name;let t="";return t=e.kind&&("NON_NULL"===e.kind&&(t=this.typeBuilder(e.ofType)+"!"),"LIST"===e.kind)?"["+this.typeBuilder(e.ofType)+"]":t}getQueries(){return this.query}getMutations(){return this.mutation}getTypes(){return this.types}isOperationValid(t,e){return e?!!this[e].find(e=>e.name===t):!!this.query.find(e=>e.name===t)||!!this.mutation.find(e=>e.name===t)}indentationChecker(e){let t=0,n=0;for(;" "===e[n];)t+=1,n+=1;return t}nestingChecker(e){let t=0;for(;t<e.length;)"{"===e[t][e[t].length-1]&&e[t+1]&&"}"===e[t+1][e[t+1].length-1]?e.splice(t,2):t+=1;if(2===e.length)throw new Error("Provided operation payload is not supported");return e}recursiveFieldCheck(d,p,f,h,m=[],g,n=1,v=2){var y;return __awaiter$7(this,void 0,void 0,function*(){let e=" ",r="",t=v;for(;t-1;)e+=" ",r+=" ",--t;!this.types.find(e=>e.name===p)&&p&&(yield this.getAvailableFields(f,h,p));let i=n;for(;i<d.length;){let n;const l=d[i].includes("...");l?(n=d[i].split("on")[1].split("{")[0].trim(),yield this.getAvailableFields(f,h,n)):n=d[i].trim().split("(")[0].trim().split("{")[0].trim();let t;t=n.includes(":")?n.split(":")[1]:n;var o=this.types.find(e=>l?e.name===n:e.name===(p||"").replace(/[\[\]!]+/g,""));if(o||"}"===n||l){var a=l?o:null==o?void 0:o.fields.find(e=>e.name===t);if(a||"}"===n){let t="";if(d[i].includes("(")&&a){var s=this.getParameters(d,i),s=this.paramsParser(s,g);if(s.length){const c=[],u=(null==(y=null==o?void 0:o.fields.find(e=>e.name===n))?void 0:y.args)||[];s.forEach(t=>{var e,n=u.find(e=>e.name in t&&t[e.name]===e.type);n&&(-1!==(e=this.params.findIndex(e=>t.field in e))&&(this.params[e].validated=!0),c.push(Object.assign(Object.assign({},n),{field:t.field})))}),c.length&&(t+="(",c.forEach(e=>t+=`${e.name}: ${e.field} `),t+=")")}}if(d[i].includes("{")&&a||l){l?m.push(`${e}... on ${n} ${t}{`):m.push(""+e+n+` ${t}{`);o=l?n:(null==a?void 0:a.type)||null;i=yield this.recursiveFieldCheck(d,o,f,h,m,g,i+1,v+1)}else{if(d[i].includes("}"))return m.push(r+"}"),i===d.length-1?this.nestingChecker(m).join("\n"):i;m.push(""+e+n)}}else if(d[i].includes("{")){let e=1;for(;e;)i+=1,d[i].includes("{")&&(e+=1),d[i].includes("}")&&--e}}i+=1}})}getParameters(e,t){return e[t].split("(")[1].split(")")[0].trim().replace(/:\s/g,":")}paramsParser(e,n){e=e.split(":");const r=[];e.forEach(e=>{e=e.trim();let t;e.includes(" ")&&(t=e.split(" ")),(t=e.includes(",")?e.split(","):t)?t.forEach(e=>r.push(e.trim())):r.push(e)});var i=[];for(let t=0;t<r.length-1;t++){var o=n.find(e=>r[t+1]in e);o&&(o={[r[t]]:o[r[t+1]],field:r[t+1],validated:!1},i.push(o)),t+=1}return i}queryParser(g,v,y){return __awaiter$7(this,void 0,void 0,function*(){this.params=[];try{this.initialized||(yield this.initialize(g,v,!1));var o=y.split("\n");let i,e="",t="";o[0].includes("(")?(1<(i=o[0].split("(")[0].trim()).split(" ").length&&([i,e]=i.split(" ")),(t=(t=(t=(t=this.getParameters(o,0)).includes(",")?t.split(",").join(""):t).split("$")).filter(e=>!!e)).forEach(e=>"$"+e.trim()),this.params=t.map(e=>{var[e,t]=e.split(":");return{["$"+e]:t.trim(),validated:!1}})):i=o[0].split("{")[0].trim(),i=(i=i.includes(" ")?i.split(" ")[0]:i)||"query";var a,n=o[1],s=this.indentationChecker(n),l=[];for(let r=1;r<o.length;r++){let n="";if(s===this.indentationChecker(o[r])){let t;let e;if(o[r].includes("(")?(t=o[r].split("(")[0].trim(),a=o[r].split("(")[1].split(")")[0].trim(),e=this.paramsParser(a,this.params)):t=o[r].split("{")[0].trim(),"}"!==t){const h=this[i].find(e=>e.name===t);if(e){const m=[];e.forEach(t=>{var e,n=h.args.find(e=>e.name in t&&t[e.name]===e.type);n&&(-1!==(e=this.params.findIndex(e=>t.field in e))&&(this.params[e].validated=!0),m.push(Object.assign(Object.assign({},n),{field:t.field})))}),m.length&&(n+="(",m.forEach(e=>n+=`${e.name}: ${e.field} `),n+=")")}l.push({operation:t,line:r,type:null===h||void 0===h?void 0:h.type,args:n})}}}let r="";for(let t=0;t<l.length;t++){var c=(l[t+1]||{}).line||o.length-1,u=l[t].type,d=o.slice(l[t].line,c),p=md5(d.join("").replace(/\s/g,""));let e;if("string"!=typeof(e=this.hashMap[p]?(console.log(`returning ${l[t].operation} from memory`),this.hashMap[p]):yield this.recursiveFieldCheck(d,u,g,v,[` ${l[t].operation} ${l[t].args} {`],this.params)))throw new Error("Introspection utility failed while validating operation");this.hashMap[p]=e,r+="\n"+e+"\n"}if(r){let n="";if(this.params.forEach(e=>{var t;e.validated&&([e,t]=Object.entries(e)[0],n+=e+`: ${t} `)}),this.params.length&&!n)throw new Error("No valid parameters found");n=n&&"("+n+")",r=`${i} ${e} ${n} {`+r+"}";var f=this.params.filter(e=>!e.validated).map(e=>{var{}=e,e=__rest$4(e,["validated"]);return Object.keys(e)[0].replace("$","")});return{query:r,unsupportedArgs:f}}if(this.safety)throw new Error("Instrospection utility failed. Safety is ON");return console.log("Instrospection utility failed. Safety is OFF. Proceeding with original operation payload"),{query:y}}catch(e){if(console.log(e),!this.safety)return{query:y}}})}}var AuthContext,Status,MessageSeverity,gqlIntrospection=new GqlInstrospection;(AuthContext=AuthContext||{}).ResetPassword="ResetPassword",function(e){e.idle="idle",e.loading="loading",e.success="success",e.failure="failure",e.skipped="skipped",e.ready="ready"}(Status=Status||{});const namespace$4$1="auth",initialState$4$1={oAuthToken:"",oAuthStatus:Status.idle,initStatus:Status.idle,userId:"",sessionToken:"",user:{},status:Status.idle,authContext:null,errorMessage:null,userIsActive:!0},authSlice=createSlice({name:namespace$4$1,initialState:initialState$4$1,reducers:{fetchUserRequest(e){e.status=Status.loading},fetchUserSuccess(e,t){var n;e.sessionToken=null==(n=t.payload)?void 0:n.token,e.userId=null==(n=t.payload)?void 0:n.userId,e.user=Object.assign({},t.payload),e.status=Status.success},fetchUserError(e){e.status=Status.failure},updateTokenRequest(e,t){e.status=Status.idle},updateTokenSuccess(e,t){t=t.payload.token;e.sessionToken=t,e.user.token=t,e.status=Status.success},updateTokenError(e){e.sessionToken="",e.status=Status.failure},updateUserLanguageStart(e,t){e.status=Status.loading},updateUserLanguageSuccess(e,t){e.user.preferredLanguage=t.payload,e.status=Status.success},refreshTokenRequest(e,t){e.status=Status.loading},refreshTokenSuccess(e,t){e.sessionToken=null==(t=null==(t=t.payload)?void 0:t.refreshToken)?void 0:t.token,e.status=Status.success},extendTokenRequest(e,t){e.status=Status.loading},extendTokenSuccess(e,t){e.sessionToken!==t.payload.token&&(e.sessionToken=t.payload.token),e.status=Status.success},setTokenExpiration(e,t){e.user=Object.assign(Object.assign({},e.user),{tokenExpiration:null==(e=t.payload)?void 0:e.expirationTime})},logoutRequest(e,t){e.status=Status.loading},logoutSuccess(e){e.status=Status.success},logoutError(e){e.status=Status.failure},resetPasswordRequest(e,t){e.status=Status.loading,e.errorMessage=null,e.authContext=AuthContext.ResetPassword},resetPasswordError(e,t){t=t.payload;e.status=Status.failure,e.errorMessage=t.message},resetPasswordSuccess(e){e.status=Status.success,e.errorMessage=null},oAuthGrantReadyToStart(e){e.oAuthStatus=Status.ready},oAuthGrantStart(e){e.oAuthStatus=Status.loading},oAuthGrantSkip(e){e.oAuthStatus=Status.skipped},oAuthGrantSuccess(e,t){e.oAuthToken=t.payload,e.oAuthStatus=Status.success},oAuthGrantFailure(e){e.oAuthStatus=Status.failure},sdkInitSuccess(e){e.initStatus=Status.success},sdkInitFailure(e){e.initStatus=Status.failure},updateUserRecentApplicationsStart(e,t){e.status=Status.loading},updateUserRecentApplicationsSuccess(e,t){e.user.recentApplications=t.payload,e.status=Status.success}}}),{fetchUserRequest,fetchUserSuccess,fetchUserError,refreshTokenRequest,refreshTokenSuccess,extendTokenRequest,extendTokenSuccess,setTokenExpiration,logoutRequest,logoutSuccess,logoutError,updateTokenRequest,updateTokenSuccess,updateTokenError,updateUserLanguageStart,updateUserLanguageSuccess,resetPasswordRequest,resetPasswordError,resetPasswordSuccess,oAuthGrantStart,oAuthGrantReadyToStart,oAuthGrantSkip,oAuthGrantSuccess,oAuthGrantFailure,sdkInitSuccess,sdkInitFailure,updateUserRecentApplicationsStart,updateUserRecentApplicationsSuccess}=authSlice.actions,authReducer=authSlice.reducer,namespace$3$1="configs",initialState$3$1={initConfig:{},config:null,status:"idle"},configsSlice=createSlice({name:namespace$3$1,initialState:initialState$3$1,reducers:{getInitConfig(e,t){e.initConfig=t.payload,e.status="loading"},getSessionTimeout(e,t){e.status="loading"},setSessionTimeout(e,t){e.status="success",e.config.sessionTimeout=t.payload},getConfigFail(e){e.status="failure"},getConfigSuccess(e,t){e.status="success",e.config=t.payload},enableBetaFeatures(e){e.initConfig=Object.assign(Object.assign({},e.initConfig),{betaFeatures:!0})},disableBetaFeatures(e){e.initConfig=Object.assign(Object.assign({},e.initConfig),{betaFeatures:!1})}}}),{getInitConfig,getConfigFail,getConfigSuccess,enableBetaFeatures,disableBetaFeatures,getSessionTimeout,setSessionTimeout}=configsSlice.actions,configsReducer=configsSlice.reducer,sessionTokenSelector=e=>{return null==(e=e[namespace$4$1])?void 0:e.sessionToken},authSelector=e=>(null==e?void 0:e[namespace$4$1])||{},userSelector$2=e=>{return null==(e=e[namespace$4$1])?void 0:e.user},selectHasUserCreateRootFolderPermission=e=>{return((null==(e=null==(e=e[namespace$4$1])?void 0:e.user)?void 0:e.myRights)||[]).some(e=>["collections.collections.create","cms.media.create","veritone.superadmin"].includes(e))},selectIsSuperAdmin=e=>{return((null==(e=null==(e=e[namespace$4$1])?void 0:e.user)?void 0:e.myRights)||[]).some(e=>["superadmin","veritone.superadmin"].includes(e))},selectOrgId=e=>{return null==(e=null==(e=null==(e=e[namespace$4$1])?void 0:e.user)?void 0:e.organization)?void 0:e.organizationId},authErrorMessage=e=>{return null==(e=e[namespace$4$1])?void 0:e.errorMessage},selectIsOLPEnabled=e=>{return"enabled"===(null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$4$1])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.enableRBACFeature)},selectUserOrgEdgeVersion=e=>{return null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$4$1])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.edgeVersion},selectUserOrgHideCmsFromAppList=e=>{return!0===(null==(e=null==(e=null==(e=null==(e=null==(e=e[namespace$4$1])?void 0:e.user)?void 0:e.organization)?void 0:e.kvp)?void 0:e.features)?void 0:e.hideCMSFromAppList)},authContextSelector=e=>{return null==(e=e[namespace$4$1])?void 0:e.authContext},authStatusSelector=e=>{return null==(e=e[namespace$4$1])?void 0:e.status},preferredLanguageSelector=e=>{var t;return null!=(t=null==(t=e[namespace$4$1])?void 0:t.user)&&t.preferredLanguage?null==(e=null==(t=e[namespace$4$1])?void 0:t.user)?void 0:e.preferredLanguage:"en"},selectIsUserAdmin=e=>{return null==(e=null==(e=null==(e=e[namespace$4$1])?void 0:e.user)?void 0:e.roles)?void 0:e.includes("superadmin")},oAuthTokenSelector=e=>{return null==(e=null==e?void 0:e[namespace$4$1])?void 0:e.oAuthToken},oAuthStatusSelector=e=>{return null==(e=null==e?void 0:e[namespace$4$1])?void 0:e.oAuthStatus},initStatusSelector=e=>{return null==(e=null==e?void 0:e[namespace$4$1])?void 0:e.initStatus},userRecentApplicationsSelector=e=>{var t;return null!=(t=null==(t=e[namespace$4$1])?void 0:t.user)&&t.recentApplications?JSON.parse(null==(e=null==(t=e[namespace$4$1])?void 0:t.user)?void 0:e.recentApplications):[]},rootApiSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.config)?void 0:e.apiRoot},configSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.config},switchApiSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.config)?void 0:e.switchAppUrl},cmsUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.config)?void 0:e.cmsAppUrl},graphEndpointSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.config)?void 0:e.graphEndpoint},loginUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.config)?void 0:e.loginUrl},logoutUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.config)?void 0:e.logoutUrl},hidePasswordResetSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.initConfig)?void 0:e.hidePasswordReset},logoutRedirectUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.initConfig)?void 0:e.logoutRedirectUrl},controllerNodeRedImageSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.config)?void 0:e.controllerNodeRedImage},controllerUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.config)?void 0:e.controllerUrl},automateControllerUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.config)?void 0:e.automateControllerUrl},automateUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.config)?void 0:e.automateUrl},baseUrlSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.initConfig)?void 0:e.baseUrl},initialConfigSelector=e=>{return null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.initConfig},sessionTimeoutSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.config)?void 0:e.sessionTimeout},betaFeaturesSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.initConfig)?void 0:e.betaFeatures},appIdSelector=e=>{return null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.initConfig)?void 0:e.applicationId},oauthRedirectUriSelector=e=>{return(null==(e=null==(e=null==e?void 0:e[namespace$3$1])?void 0:e.initConfig)?void 0:e.oAuthRedirectUri)||window.location.protocol+"//"+window.location.hostname},selectApiConfigs$1=createSelector$1([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,n)=>({apiRoot:e,graphQLEndpoint:t,token:n})),getAppConfig=(e,t)=>__awaiter$7(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`query {
935
935
  staticAppConfig {
936
936
  apiRoot
937
937
  switchAppUrl
@@ -944,7 +944,7 @@ createScheduledJob(input:{
944
944
  automateControllerUrl
945
945
  controllerNodeRedImage
946
946
  }
947
- }`,graphEndpoint:e,token:t})}catch(e){return{success:!1}}}),getEnvironmentConfig=(t="https://api.us-1.veritone.com/v3/graphql")=>{return Object.values(config$2).find(e=>e.graphEndpoint===t)||config$2["prod-us-1"]};function*handleAuth(e){e?yield put(oAuthGrantReadyToStart()):yield put(oAuthGrantSkip())}function*getConfigsSaga(e){var t,n,r=yield select(baseUrlSelector),i=e.payload.authToken,o=(i&&(yield put(updateTokenRequest({token:i}))),getEnvironmentConfig(r));if(o.graphEndpoint===r)yield put(getConfigSuccess(Object.assign({},o))),yield put(sdkInitSuccess()),yield call$f(handleAuth,!!e.payload.handleAuth);else{yield call$f(handleAuth,!!e.payload.handleAuth);try{var a=yield getAppConfig(r,i);if(null==(t=null==a?void 0:a.data)||!t.staticAppConfig)throw new Error("Failed to get app config from core-graphql");yield put(getConfigSuccess(Object.assign({},null==(n=null==a?void 0:a.data)?void 0:n.staticAppConfig))),yield put(sdkInitSuccess())}catch(e){console.log(e);o=getEnvironmentConfig(r);yield put(getConfigSuccess(Object.assign({},o))),yield put(sdkInitFailure())}}}function*getSessionTimeoutSaga(e){var t,n;let r=["us-fed-1","us-fed-2","us-gov-1","us-gov-2"].find(e=>window.location.href.includes(e))?15:60;try{var i=yield select(baseUrlSelector),o=e.payload,a=yield getAppConfig(i,o);r=(null==(n=null==(t=null==a?void 0:a.data)?void 0:t.staticAppConfig)?void 0:n.sessionTimeout)||r,yield put(setSessionTimeout(r))}catch(e){console.log(e),yield put(setSessionTimeout(r))}}function*configsSaga(){yield all([takeEvery$1(getInitConfig.type,getConfigsSaga)])}function*watchSessionTimeout(){yield takeLatest$1(getSessionTimeout.type,getSessionTimeoutSaga)}function getConfigModule(){return{id:namespace$2$1,reducerMap:{[namespace$2$1]:configsReducer},sagas:[configsSaga,watchSessionTimeout],initialActions:[]}}const handleFetchUserRequest=(e,t)=>__awaiter$7(void 0,void 0,void 0,function*(){try{return yield(yield fetch(e+"/v1/admin/current-user",{credentials:"include",method:"GET",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t})})).json()}catch(e){console.error(e)}}),handleRefreshTokenRequest=(t,n)=>__awaiter$7(void 0,void 0,void 0,function*(){var e=`
947
+ }`,graphEndpoint:e,token:t})}catch(e){return{success:!1}}}),getEnvironmentConfig=(t="https://api.us-1.veritone.com/v3/graphql")=>{return Object.values(config$2).find(e=>e.graphEndpoint===t)||config$2["prod-us-1"]};function*handleAuth(e){e?yield put(oAuthGrantReadyToStart()):yield put(oAuthGrantSkip())}function*getConfigsSaga(e){var t,n,r=yield select(baseUrlSelector),i=e.payload.authToken,o=(i&&(yield put(updateTokenRequest({token:i}))),getEnvironmentConfig(r));if(o.graphEndpoint===r)yield put(getConfigSuccess(Object.assign({},o))),yield put(sdkInitSuccess()),yield call$f(handleAuth,!!e.payload.handleAuth);else{yield call$f(handleAuth,!!e.payload.handleAuth);try{var a=yield getAppConfig(r,i);if(null==(t=null==a?void 0:a.data)||!t.staticAppConfig)throw new Error("Failed to get app config from core-graphql");yield put(getConfigSuccess(Object.assign({},null==(n=null==a?void 0:a.data)?void 0:n.staticAppConfig))),yield put(sdkInitSuccess())}catch(e){console.log(e);o=getEnvironmentConfig(r);yield put(getConfigSuccess(Object.assign({},o))),yield put(sdkInitFailure())}}}function*getSessionTimeoutSaga(e){var t,n;let r=["us-fed-1","us-fed-2","us-gov-1","us-gov-2"].find(e=>window.location.href.includes(e))?15:60;try{var i=yield select(baseUrlSelector),o=e.payload,a=yield getAppConfig(i,o);r=(null==(n=null==(t=null==a?void 0:a.data)?void 0:t.staticAppConfig)?void 0:n.sessionTimeout)||r,yield put(setSessionTimeout(r))}catch(e){console.log(e),yield put(setSessionTimeout(r))}}function*configsSaga(){yield all([takeEvery$1(getInitConfig.type,getConfigsSaga)])}function*watchSessionTimeout(){yield takeLatest$1(getSessionTimeout.type,getSessionTimeoutSaga)}function getConfigModule(){return{id:namespace$3$1,reducerMap:{[namespace$3$1]:configsReducer},sagas:[configsSaga,watchSessionTimeout],initialActions:[]}}const handleFetchUserRequest=(e,t)=>__awaiter$7(void 0,void 0,void 0,function*(){try{return yield(yield fetch(e+"/v1/admin/current-user",{credentials:"include",method:"GET",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t})})).json()}catch(e){console.error(e)}}),handleRefreshTokenRequest=(t,n)=>__awaiter$7(void 0,void 0,void 0,function*(){var e=`
948
948
  mutation {
949
949
  refreshToken(token: "${t}") {
950
950
  apiToken
@@ -971,7 +971,7 @@ createScheduledJob(input:{
971
971
  operations
972
972
  }
973
973
  }
974
- `,graphEndpoint:e,token:t})}catch(e){console.error(e)}}),namespace$1$3="events",initialState$1$3={isIdle:!1,callLogout:!1,clickedLogout:!1,callResetIdleTimer:!1,resetIdleTimerCallCounter:0,reloadPage:!1},eventsSlice=createSlice({name:namespace$1$3,initialState:initialState$1$3,reducers:{setIsIdle(e,t){e.isIdle=t.payload},setCallLogout(e,t){e.callLogout=t.payload},setClickedLogout(e,t){e.clickedLogout=t.payload},setCallResetIdleTimer(e,t){e.callResetIdleTimer=t.payload,e.resetIdleTimerCallCounter=t.payload?1:0},setReloadPage(e,t){e.reloadPage=t.payload},postNotificationCommand(e,t){},subscribeToEventsWebsocket(e){}}}),{setIsIdle,setCallLogout,setClickedLogout,setCallResetIdleTimer,setReloadPage,postNotificationCommand,subscribeToEventsWebsocket}=eventsSlice.actions,eventsReducer=eventsSlice.reducer,links={},getMailboxSessionLink=e=>links[e],setMailboxSessionLink=(e,t,n)=>(links[e]={link:t,token:n},links[e]),extractSessionLink=(e,t)=>{var{link:e,token:n}=e;if(t===n||""===t)return e},createSessionLink=(e,t,n)=>new WebSocketLink({uri:e,options:{reconnect:!0,connectionParams:{authorization:"Bearer "+n,mailboxId:t}}}),setSessionLink=(e,t,n)=>{let r;var i=getMailboxSessionLink(t);return r=(r=i?extractSessionLink(i,n):r)||createSessionLink(e,t,n),setMailboxSessionLink(t,r,n)},createApolloClient=e=>new ApolloClient({link:e,cache:new InMemoryCache}),createApolloWs=(e,t,n)=>{return setSessionLink(e,n,t).link},notificationCommands={setIsIdle:"set_is_idle",setCallLogout:"set_call_logout",setClickedLogout:"set_clicked_logout",setCallResetIdleTimer:"set_call_reset_idle_timer",goToLoginPage:"go_to_login_page",refreshPage:"refreshPage"},postNotificationApi=(t,n,r={},i=!1,o="text",a,s)=>__awaiter$7(void 0,void 0,void 0,function*(){var e={body:JSON.stringify(r),userId:n,ephemeral:i,contentType:o,eventType:a};try{return yield baseGraphQLApi({query:`
974
+ `,graphEndpoint:e,token:t})}catch(e){console.error(e)}}),namespace$2$1="events",initialState$2$2={isIdle:!1,callLogout:!1,clickedLogout:!1,callResetIdleTimer:!1,resetIdleTimerCallCounter:0,reloadPage:!1},eventsSlice=createSlice({name:namespace$2$1,initialState:initialState$2$2,reducers:{setIsIdle(e,t){e.isIdle=t.payload},setCallLogout(e,t){e.callLogout=t.payload},setClickedLogout(e,t){e.clickedLogout=t.payload},setCallResetIdleTimer(e,t){e.callResetIdleTimer=t.payload,e.resetIdleTimerCallCounter=t.payload?1:0},setReloadPage(e,t){e.reloadPage=t.payload},postNotificationCommand(e,t){},subscribeToEventsWebsocket(e){}}}),{setIsIdle,setCallLogout,setClickedLogout,setCallResetIdleTimer,setReloadPage,postNotificationCommand,subscribeToEventsWebsocket}=eventsSlice.actions,eventsReducer=eventsSlice.reducer,links={},getMailboxSessionLink=e=>links[e],setMailboxSessionLink=(e,t,n)=>(links[e]={link:t,token:n},links[e]),extractSessionLink=(e,t)=>{var{link:e,token:n}=e;if(t===n||""===t)return e},createSessionLink=(e,t,n)=>new WebSocketLink({uri:e,options:{reconnect:!0,connectionParams:{authorization:"Bearer "+n,mailboxId:t}}}),setSessionLink=(e,t,n)=>{let r;var i=getMailboxSessionLink(t);return r=(r=i?extractSessionLink(i,n):r)||createSessionLink(e,t,n),setMailboxSessionLink(t,r,n)},createApolloClient=e=>new ApolloClient({link:e,cache:new InMemoryCache}),createApolloWs=(e,t,n)=>{return setSessionLink(e,n,t).link},notificationCommands={setIsIdle:"set_is_idle",setCallLogout:"set_call_logout",setClickedLogout:"set_clicked_logout",setCallResetIdleTimer:"set_call_reset_idle_timer",goToLoginPage:"go_to_login_page",refreshPage:"refreshPage"},postNotificationApi=(t,n,r={},i=!1,o="text",a,s)=>__awaiter$7(void 0,void 0,void 0,function*(){var e={body:JSON.stringify(r),userId:n,ephemeral:i,contentType:o,eventType:a};try{return yield baseGraphQLApi({query:`
975
975
  mutation ($body: String!, $userId: ID!, $ephemeral: Boolean!, $contentType: String!, $eventType: String){
976
976
  notificationPost(
977
977
  input: {
@@ -989,7 +989,7 @@ createScheduledJob(input:{
989
989
  contentType
990
990
  createdDateTime
991
991
  }
992
- }`,variables:e,graphEndpoint:t,token:s})}catch(e){return{success:!1}}}),aiwareEvent="AIWARE_JS_SYSTEM_EVENT",namespace$8="snackbar",initialState$a={message:{},duration:3e3},snackbarSlice=createSlice({name:namespace$8,initialState:initialState$a,reducers:{showMessage(e,t){e.message=Object.assign({key:(new Date).getTime()},t.payload)},clearMessage:()=>initialState$a,setDuration(e,t){e.duration=t.payload},resetDuration(e){e.duration=initialState$a.duration}}}),{showMessage,clearMessage,setDuration,resetDuration}=snackbarSlice.actions,snackbarReducer=snackbarSlice.reducer,snackbarSelector=e=>(null==e?void 0:e[namespace$8])||{};function getSnackbarModule(){return{id:namespace$8,reducerMap:{[namespace$8]:snackbarReducer},sagas:[],initialActions:[]}}!function(e){e.Success="success",e.Info="info",e.Warning="warning",e.Error="error"}(MessageSeverity=MessageSeverity||{});let _$1=e=>e,_t$1;function goToPage$1(e){window.location.href=e}let subscriptionTask$1;class SubscriptionAttemptsLimiter{constructor(e){this.limit=e&&0<e&&e<=5?e:5,this.attempts=0}recordAttempt(){this.attempts+=1}canRetry(){return this.recordAttempt(),!(this.attempts>this.limit)}}const wsAttemptsLimiter=new SubscriptionAttemptsLimiter;function*websocketInitChannel$1(){if(wsAttemptsLimiter.canRetry()){var e=yield select(authSelector);const i=null==e?void 0:e.userId,o=yield select(sessionTokenSelector),s=(yield select(configSelector))["graphEndpointWS"],l=yield select(loginUrlSelector),c=yield select(logoutRedirectUrlSelector);return eventChannel(a=>{const e=[],t=[];var n=gql(_t$1=_t$1||_$1`
992
+ }`,variables:e,graphEndpoint:t,token:s})}catch(e){return{success:!1}}}),aiwareEvent="AIWARE_JS_SYSTEM_EVENT",namespace$1$3="snackbar",initialState$1$3={message:{},duration:3e3},snackbarSlice=createSlice({name:namespace$1$3,initialState:initialState$1$3,reducers:{showMessage(e,t){e.message=Object.assign({key:(new Date).getTime()},t.payload)},clearMessage:()=>initialState$1$3,setDuration(e,t){e.duration=t.payload},resetDuration(e){e.duration=initialState$1$3.duration}}}),{showMessage,clearMessage,setDuration,resetDuration}=snackbarSlice.actions,snackbarReducer=snackbarSlice.reducer,snackbarSelector=e=>(null==e?void 0:e[namespace$1$3])||{};function getSnackbarModule(){return{id:namespace$1$3,reducerMap:{[namespace$1$3]:snackbarReducer},sagas:[],initialActions:[]}}!function(e){e.Success="success",e.Info="info",e.Warning="warning",e.Error="error"}(MessageSeverity=MessageSeverity||{});let _$1=e=>e,_t$1;function goToPage$1(e){window.location.href=e}let subscriptionTask$1;class SubscriptionAttemptsLimiter{constructor(e){this.limit=e&&0<e&&e<=5?e:5,this.attempts=0}recordAttempt(){this.attempts+=1}canRetry(){return this.recordAttempt(),!(this.attempts>this.limit)}}const wsAttemptsLimiter=new SubscriptionAttemptsLimiter;function*websocketInitChannel$1(){if(wsAttemptsLimiter.canRetry()){var e=yield select(authSelector);const i=null==e?void 0:e.userId,o=yield select(sessionTokenSelector),s=(yield select(configSelector))["graphEndpointWS"],l=yield select(loginUrlSelector),c=yield select(logoutRedirectUrlSelector);return eventChannel(a=>{const e=[],t=[];var n=gql(_t$1=_t$1||_$1`
993
993
  subscription {
994
994
  notificationPosted(notificationMailboxId:"${0}") {
995
995
  id
@@ -1001,7 +1001,7 @@ createScheduledJob(input:{
1001
1001
  updatedDateTime
1002
1002
  eventType
1003
1003
  }
1004
- }`,i),r=createApolloWs(s,o,i),r=createApolloClient(r),n=r.subscribe({query:n}).subscribe({next(e){var t=(null==(t=null==(t=null==e?void 0:e.data)?void 0:t.notificationPosted)?void 0:t.body)||"{}",n=(null==(n=null==(n=null==e?void 0:e.data)?void 0:n.notificationPosted)?void 0:n.eventType)||"";if("json"===(null==(e=null==(e=null==e?void 0:e.data)?void 0:e.notificationPosted)?void 0:e.contentType))try{var r=JSON.parse(t);if(n&&n===aiwareEvent){var i=null==r?void 0:r.command,o=null==r?void 0:r.value;switch(i){case notificationCommands.setIsIdle:a(setIsIdle(o));break;case notificationCommands.setCallLogout:a(setCallLogout(o));break;case notificationCommands.setClickedLogout:a(setClickedLogout(o));break;case notificationCommands.setCallResetIdleTimer:a(setCallResetIdleTimer(o));break;case notificationCommands.goToLoginPage:window.__logout_requested||o!==window.navigator.userAgent||goToPage$1(c||l);break;case notificationCommands.refreshPage:a(setReloadPage(o))}}}catch(e){console.log("Expecting JSON",{error:e},{eventMessage:t})}}});return e.push(r),t.push(n),()=>{t.forEach(e=>e.unsubscribe()),e.forEach(e=>e.stop())}})}e=yield select(preferredLanguageSelector),e=AIWareFormatMessage(e);yield put(showMessage({content:e({id:"ws-connection-attempt-limit-error",defaultMessage:[{type:0,value:"SDK could not establish websocket connection. Please check with your org admin"}]}),severity:MessageSeverity.Error}))}function*performSubscriptionTask(){for(var e=yield call$f(websocketInitChannel$1);;)yield put(yield take(e))}function*websocketSagas$1(){subscriptionTask$1&&(yield cancel(subscriptionTask$1));var e=yield fork(performSubscriptionTask);subscriptionTask$1=e}function*postNotification(e){var t=yield select(graphEndpointSelector),n=yield select(authSelector),r=yield select(sessionTokenSelector),n=null==n?void 0:n.userId,e=(null==e?void 0:e.payload)||{},{ephemeral:i,contentType:o,eventType:a}=e,e=__rest$4(e,["ephemeral","contentType","eventType"]);postNotificationApi(t,n,e,i,o,a,r)}function*eventsSaga(){yield all([takeLatest$1(subscribeToEventsWebsocket.type,websocketSagas$1),takeLatest$1(postNotificationCommand.type,postNotification)])}const isIdleSelector=e=>{return null==(e=e[namespace$1$3])?void 0:e.isIdle},callLogoutSelector=e=>{return null==(e=e[namespace$1$3])?void 0:e.callLogout},clickedLogoutSelector=e=>{return null==(e=e[namespace$1$3])?void 0:e.clickedLogout},callResetIdleTimerSelector=e=>{return null==(e=e[namespace$1$3])?void 0:e.callResetIdleTimer},resetIdleTimerCallCounterSelector=e=>{return null==(e=e[namespace$1$3])?void 0:e.resetIdleTimerCallCounter},reloadPageSelector=e=>{return null==(e=e[namespace$1$3])?void 0:e.reloadPage};function getEventsModule(){return{id:namespace$1$3,reducerMap:{[namespace$1$3]:eventsReducer},sagas:[eventsSaga]}}function baseGraphQLApiWithError({graphQLEndpoint:e,token:t,query:n,variables:r,operationName:i,rethrowOriginalError:o}){n={query:n};return r&&(n.variables=r),i&&(n.operationName=i),fetch(e,{method:"post",headers:{Authorization:"bearer "+t,"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).then(e=>e.json()).then(e=>{if(lodash.exports.isEmpty(e.errors))return e.data;throw o?new Error((null==(e=((null==e?void 0:e.errors)||[])[0])?void 0:e.message)||"Error"):new Error(i||"Error")})}const getCurrentUserGraphQLApi=(e,t)=>__awaiter$7(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`{
1004
+ }`,i),r=createApolloWs(s,o,i),r=createApolloClient(r),n=r.subscribe({query:n}).subscribe({next(e){var t=(null==(t=null==(t=null==e?void 0:e.data)?void 0:t.notificationPosted)?void 0:t.body)||"{}",n=(null==(n=null==(n=null==e?void 0:e.data)?void 0:n.notificationPosted)?void 0:n.eventType)||"";if("json"===(null==(e=null==(e=null==e?void 0:e.data)?void 0:e.notificationPosted)?void 0:e.contentType))try{var r=JSON.parse(t);if(n&&n===aiwareEvent){var i=null==r?void 0:r.command,o=null==r?void 0:r.value;switch(i){case notificationCommands.setIsIdle:a(setIsIdle(o));break;case notificationCommands.setCallLogout:a(setCallLogout(o));break;case notificationCommands.setClickedLogout:a(setClickedLogout(o));break;case notificationCommands.setCallResetIdleTimer:a(setCallResetIdleTimer(o));break;case notificationCommands.goToLoginPage:window.__logout_requested||o!==window.navigator.userAgent||goToPage$1(c||l);break;case notificationCommands.refreshPage:a(setReloadPage(o))}}}catch(e){console.log("Expecting JSON",{error:e},{eventMessage:t})}}});return e.push(r),t.push(n),()=>{t.forEach(e=>e.unsubscribe()),e.forEach(e=>e.stop())}})}e=yield select(preferredLanguageSelector),e=AIWareFormatMessage(e);yield put(showMessage({content:e({id:"ws-connection-attempt-limit-error",defaultMessage:[{type:0,value:"SDK could not establish websocket connection. Please check with your org admin"}]}),severity:MessageSeverity.Error}))}function*performSubscriptionTask(){for(var e=yield call$f(websocketInitChannel$1);;)yield put(yield take(e))}function*websocketSagas$1(){subscriptionTask$1&&(yield cancel(subscriptionTask$1));var e=yield fork(performSubscriptionTask);subscriptionTask$1=e}function*postNotification(e){var t=yield select(graphEndpointSelector),n=yield select(authSelector),r=yield select(sessionTokenSelector),n=null==n?void 0:n.userId,e=(null==e?void 0:e.payload)||{},{ephemeral:i,contentType:o,eventType:a}=e,e=__rest$4(e,["ephemeral","contentType","eventType"]);postNotificationApi(t,n,e,i,o,a,r)}function*eventsSaga(){yield all([takeLatest$1(subscribeToEventsWebsocket.type,websocketSagas$1),takeLatest$1(postNotificationCommand.type,postNotification)])}const isIdleSelector=e=>{return null==(e=e[namespace$2$1])?void 0:e.isIdle},callLogoutSelector=e=>{return null==(e=e[namespace$2$1])?void 0:e.callLogout},clickedLogoutSelector=e=>{return null==(e=e[namespace$2$1])?void 0:e.clickedLogout},callResetIdleTimerSelector=e=>{return null==(e=e[namespace$2$1])?void 0:e.callResetIdleTimer},resetIdleTimerCallCounterSelector=e=>{return null==(e=e[namespace$2$1])?void 0:e.resetIdleTimerCallCounter},reloadPageSelector=e=>{return null==(e=e[namespace$2$1])?void 0:e.reloadPage};function getEventsModule(){return{id:namespace$2$1,reducerMap:{[namespace$2$1]:eventsReducer},sagas:[eventsSaga]}}function baseGraphQLApiWithError({graphQLEndpoint:e,token:t,query:n,variables:r,operationName:i,rethrowOriginalError:o}){n={query:n};return r&&(n.variables=r),i&&(n.operationName=i),fetch(e,{method:"post",headers:{Authorization:"bearer "+t,"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).then(e=>e.json()).then(e=>{if(lodash.exports.isEmpty(e.errors))return e.data;throw o?new Error((null==(e=((null==e?void 0:e.errors)||[])[0])?void 0:e.message)||"Error"):new Error(i||"Error")})}const getCurrentUserGraphQLApi=(e,t)=>__awaiter$7(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`{
1005
1005
  myRights{
1006
1006
  operations
1007
1007
  }
@@ -1067,7 +1067,7 @@ createScheduledJob(input:{
1067
1067
  mutation logout($token: String!) {
1068
1068
  userLogout(token: $token )
1069
1069
  }
1070
- `,variables:e,graphEndpoint:n,token:t})}catch(e){return{success:!1}}});let _authWindow=null,_authWindowListener=null,_OAuthToken=null;const _POLL_TIME=500,cleanupAuthWindow=()=>{_authWindow&&_authWindow.close&&_authWindow.close(),_authWindow=null},removeAuthWindowListener=()=>{_authWindowListener&&(window.removeEventListener("message",_authWindowListener),_authWindowListener=null)},createAuthWindowListener=(e,r,i)=>(removeAuthWindowListener(),function(e){var t,n=new URL(window.location.href);null!=(t=e.origin)&&t.startsWith(n.protocol+"//"+n.hostname)&&(null!=(t=e.data)&&t.error?(removeAuthWindowListener(),cleanupAuthWindow(),i(new Error("Veritone OAuth2 Error: "+t.error))):null!=t&&t.OAuthToken&&(_OAuthToken=t.OAuthToken,removeAuthWindowListener(),cleanupAuthWindow(),r({OAuthToken:_OAuthToken})))}),askOAuthServerForToken=(e,t,n)=>{setTimeout(()=>{_OAuthToken||(_authWindow&&_authWindow.postMessage("getOAuthToken","*"),_authWindow&&!_authWindow.closed?askOAuthServerForToken(e,t,n):_authWindow&&_authWindow.closed?(_authWindow=null,n(new Error("User cancelled OAuth flow"))):(removeAuthWindowListener(),cleanupAuthWindow()))},_POLL_TIME)},login=n=>__awaiter$7(void 0,void 0,void 0,function*(){if(n)return _OAuthToken&&(yield logout$1()),window.location.replace(n),new Promise((e,t)=>{_authWindowListener=createAuthWindowListener(n,e,t),window.addEventListener("message",_authWindowListener),askOAuthServerForToken(n,e,t)});throw new Error("Missing parameter: Need to include the backend OAuth2 URI")}),logout$1=()=>__awaiter$7(void 0,void 0,void 0,function*(){return new Promise(e=>{removeAuthWindowListener(),cleanupAuthWindow(),e(!(_OAuthToken=null))})}),handleImplicitRedirect=(e=window.location.hash||"",t=window.opener)=>{let n,r,i;try{n=e.match(/access_token=(.+)$/)[1].split("&")[0]}catch(e){}if(!n)try{r=e.match(/error=(.+)$/)[1].split("&")[0],i=e.match(/error_description=(.+)$/)[1].split("&")[0]}catch(e){}t.postMessage({OAuthToken:n,error:r,errorDescription:i},window.origin)};function*handleFetchUserSaga(){var e=yield select(rootApiSelector);if(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=yield call$f(handleFetchUserRequest,e,n),t=yield call$f(getUserRightRequest,t,n);if(e)if(null!=e&&e.errors||t.errors)yield put(fetchUserError());else{var r=null==(i=null==(i=null==(i=null==t?void 0:t.data)?void 0:i.me)?void 0:i.roles)?void 0:i.map(e=>e.appName).filter((e,t,n)=>n.indexOf(e)===t);if(r.includes("admin"))for(const a of null==(i=null==(i=null==t?void 0:t.data)?void 0:i.myRights)?void 0:i.operations)if(a.includes("superadmin")){r.push("superadmin");break}var i=null==(i=null==(i=null==t?void 0:t.data)?void 0:i.me)?void 0:i.userSettings.find(e=>"preferredLanguage"===e.key),o=null==(o=null==(o=null==t?void 0:t.data)?void 0:o.me)?void 0:o.userSettings.find(e=>"recentApplications"===e.key),i=null==i?void 0:i.value,o=null==o?void 0:o.value;e.preferredLanguage=i||"en",e.recentApplications=o||"",yield put(fetchUserSuccess(Object.assign(Object.assign({},e),{roles:r,token:e.token||n,myRights:null==(o=null==(i=null==t?void 0:t.data)?void 0:i.myRights)?void 0:o.operations}))),yield put(subscribeToEventsWebsocket())}else yield put(fetchUserError())}else yield take(getConfigSuccess.type),yield put(fetchUserRequest())}function*logoutHelper(e){var t=yield select(graphEndpointSelector),n=yield select(authSelector);yield call$f(postNotificationApi,t,null==n?void 0:n.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.setCallLogout,value:!0,ephemeral:!0,contentType:"json"},!0,"json",aiwareEvent,e)}function*handleRefreshTokenSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"];try{var n,r,i=yield call$f(handleRefreshTokenRequest,e,t);null!=i&&i.errors?(n=yield select(preferredLanguageSelector),r=AIWareFormatMessage(n),((null==i?void 0:i.errors)||[]).find(e=>{return((null==(e=null==e?void 0:e.data)?void 0:e.serviceMessage)||"").includes("40")})?(yield put(setDuration(1e4)),yield put(showMessage({content:r({id:"shared-redux.refresh-token-failure.4xx",defaultMessage:[{type:0,value:"Could not refresh session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(e)):yield put(showMessage({content:r({id:"shared-redux.refresh-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not refresh session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))):(yield put(refreshTokenSuccess(Object.assign({},i.data))),yield put(fetchUserRequest()))}catch(e){console.log(e)}}function*handleExtendTokenSaga(t){t=t.payload.token;try{var n=yield select(rootApiSelector),r=yield call$f(handleExtendTokenRequest,t,n);null!=r&&r.errors||(yield put(extendTokenSuccess({token:r.token})))}catch(e){n=yield select(preferredLanguageSelector),r=AIWareFormatMessage(n);e instanceof CustomError&&e.isAuthErr?(yield put(setDuration(1e4)),yield put(showMessage({content:r({id:"shared-redux.extend-token-failure.4xx",defaultMessage:[{type:0,value:"Could not extend session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(t)):yield put(showMessage({content:r({id:"shared-redux.extend-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not extend session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))}}function*handleLogoutSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"],e=yield call$f(handleLogoutRequest,e,t);null!=e&&e.errors?yield put(logoutError()):yield put(logoutSuccess())}function*handleUpdateSessionToken(e){e=e.payload.token;e&&"string"==typeof e?yield put(updateTokenSuccess({token:e})):yield put(updateTokenError())}function*handleUpdateUserLanguage(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n,r,i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=(yield select(userSelector$2))["userId"];a?(n=e.payload,r=yield call$f(updateUserSettingsApi,i,o,a,"preferredLanguage",n),sdkEventManager.dispatch(SdkEvents.languageChange,null,{preferredLanguage:r}),yield put(updateUserLanguageSuccess(r))):(sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed, user id is required"),null),yield put(showMessage({content:t({id:"shared-redux.snackbar.languageSelectionError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})))}catch(e){sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed"),null),yield put(showMessage({content:t({id:"shared-redux.snackbar.languageSelectionChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*handleResetPasswordSaga(e){var t,n,r=yield select(preferredLanguageSelector),r=AIWareFormatMessage(r);try{var{resetToken:i,password:o,username:a,organizationInviteId:s}=e.payload,l=yield select(rootApiSelector),c=yield call$f(handleResetPasswordApi,l,{resetToken:i,username:a,password:o,organizationInviteId:s});if(null!=c&&c.success)yield put(resetPasswordSuccess());else{let e=r({id:"os-auth.reset-password.internalServerError",defaultMessage:[{type:0,value:"An error has occurred."}]});401===c.status&&"PasswordResetTokenExpired"===(null==(t=c.result)?void 0:t.errorCode)?e=r({id:"os-auth.reset-password.expireMessageDescriptive",defaultMessage:[{type:0,value:'The password reset link you used has expired. Please click the "Forgot Password" link on the login page to generate a new link.'}]}):403===c.status?e=(null==(n=c.result)?void 0:n.message)||e:404===c.status&&(e=r({id:"os-auth.reset-password.expireMessage",defaultMessage:[{type:0,value:"An error has occurred. The reset link might be expired."}]})),yield put(resetPasswordError({message:e}))}}catch(e){console.log(e),yield put(resetPasswordError({message:r({id:"os-auth.reset-password.internalError",defaultMessage:[{type:0,value:"Could not reset your password."}]})}))}}function*requestOAuthGrant(){var e=yield select(appIdSelector),t=(yield select(selectApiConfigs$1))["apiRoot"],n=yield select(sessionTokenSelector),r=yield select(oauthRedirectUriSelector);if(n)yield put(oAuthGrantSuccess(n));else try{n=(yield call$f(login,t+`/v1/admin/oauth/authorize?response_type=token&client_id=${e}&redirect_uri=${r}&scope=all`)).OAuthToken;yield put(oAuthGrantSuccess(n))}catch(e){console.log("oauth flow error",e),yield put(oAuthGrantFailure())}}function*callSdkInitCompleteCallbackOnError(){var e,t=yield select(initialConfigSelector),n=yield select(preferredLanguageSelector),n=AIWareFormatMessage(n);null!=(e=null==t?void 0:t.onComplete)&&e.call(t,n({id:"shared-redux.auth-saga.sdk-init-error-message",defaultMessage:[{type:0,value:"An error occurred during initialization."}]}))}function*watchOAuthReadiness(){for(;;){yield take([oAuthGrantReadyToStart.type,fetchUserSuccess.type,fetchUserError.type]);var e=yield select(oAuthStatusSelector),t=yield select(authStatusSelector);if(t!==Status.loading&&e===Status.ready)switch(t){case Status.success:yield put(oAuthGrantSkip());break;case Status.failure:yield put(oAuthGrantStart())}}}function*handleUpdateUserRecentApplications(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n,r,i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=(yield select(userSelector$2))["userId"],s=yield select(userRecentApplicationsSelector);a?(n=slice$2(uniq([e.payload,...s]),0,6),r=yield call$f(updateUserSettingsApi,i,o,a,"recentApplications",JSON.stringify(n)),yield put(updateUserRecentApplicationsSuccess(r))):yield put(showMessage({content:t({id:"shared-redux.snackbar.updateRecentApplicationsError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error}))}catch(e){yield put(showMessage({content:t({id:"shared-redux.snackbar.updatingRecentApplicationsChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*watchInitAndAuthStatus(){for(var e,t,n;;){yield take([oAuthGrantSuccess.type,oAuthGrantSkip.type,oAuthGrantFailure.type,sdkInitSuccess.type,fetchUserSuccess.type,fetchUserError.type]);var r=yield select(initialConfigSelector),i=yield select(oAuthTokenSelector),o=yield select(oAuthStatusSelector),a=yield select(initStatusSelector),s=yield select(authStatusSelector),l=yield select(sessionTokenSelector),c=yield select(preferredLanguageSelector),u=AIWareFormatMessage(c);if(s!==Status.loading)if(s===Status.success)switch(o){case Status.loading:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l),yield put(oAuthGrantSuccess(l));break;case Status.skipped:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l)}else if(a===Status.success)switch(o){case Status.skipped:null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,l);break;case Status.success:null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,i),s===Status.failure&&(yield put(fetchUserRequest()));break;case Status.failure:null!=(n=null==r?void 0:r.onComplete)&&n.call(r,u({id:"shared-redux.auth-saga.oauth-error-message",defaultMessage:[{type:0,value:"An error occurred during authentication."}]}))}}}function*authSaga(){yield all([takeLatest$1(fetchUserRequest.type,handleFetchUserSaga),takeLatest$1(updateTokenRequest.type,handleUpdateSessionToken),takeLatest$1(resetPasswordRequest.type,handleResetPasswordSaga),takeEvery$1(refreshTokenRequest.type,handleRefreshTokenSaga),takeEvery$1(extendTokenRequest.type,handleExtendTokenSaga),takeEvery$1(logoutRequest.type,handleLogoutSaga),takeEvery$1(updateUserLanguageStart.type,handleUpdateUserLanguage),takeEvery$1(oAuthGrantStart.type,requestOAuthGrant),takeEvery$1(sdkInitFailure.type,callSdkInitCompleteCallbackOnError),takeEvery$1(updateUserRecentApplicationsStart.type,handleUpdateUserRecentApplications),watchOAuthReadiness(),watchInitAndAuthStatus()])}function getAuthModule(){return{id:namespace$3$1,reducerMap:{[namespace$3$1]:authReducer},sagas:[authSaga],initialActions:[fetchUserRequest()]}}var NotificationFlag,CreateModes,TabId,EUserStatus,AvailableWidgets,AvailablePanels,AvailableComponents,userActivityEvents={records:[{id:"ff9272fe-5e98-4ffb-96b6-5df2918d9b2b",event:"login_succeeded",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d",userName:"sys_graphql_citest_superadmin@veritone.com",organizationId:"7682",applicationId:"123",createdDateTime:"2020-10-26T06:40:12.928Z",payload:{organizationId:12333,organizationName:"name",userName:"user",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d"}}]},mockData={userActivityEvents:userActivityEvents};const fakeAPI=()=>new Promise((e,t)=>{setTimeout(()=>e({success:!0,data:mockData}),500)}),getActivityApi=()=>__awaiter$7(void 0,void 0,void 0,function*(){try{var{success:e,data:t}=yield fakeAPI();return e&&t.userActivityEvents?{data:t.userActivityEvents,success:!0}:{success:!1,data:null}}catch(e){return{success:!1,data:null,message:e}}}),getApplicationsApi=(e,t)=>__awaiter$7(void 0,void 0,void 0,function*(){try{return(yield fetch(e+"/v1/admin/current-user/applications",{method:"GET",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t}),credentials:"include"})).json()}catch(e){console.error(e)}}),getApplicationLogo=(r,i)=>__awaiter$7(void 0,void 0,void 0,function*(){var e=`query ($limit: Int $owned: Boolean) {
1070
+ `,variables:e,graphEndpoint:n,token:t})}catch(e){return{success:!1}}});let _authWindow=null,_authWindowListener=null,_OAuthToken=null;const _POLL_TIME=500,cleanupAuthWindow=()=>{_authWindow&&_authWindow.close&&_authWindow.close(),_authWindow=null},removeAuthWindowListener=()=>{_authWindowListener&&(window.removeEventListener("message",_authWindowListener),_authWindowListener=null)},createAuthWindowListener=(e,r,i)=>(removeAuthWindowListener(),function(e){var t,n=new URL(window.location.href);null!=(t=e.origin)&&t.startsWith(n.protocol+"//"+n.hostname)&&(null!=(t=e.data)&&t.error?(removeAuthWindowListener(),cleanupAuthWindow(),i(new Error("Veritone OAuth2 Error: "+t.error))):null!=t&&t.OAuthToken&&(_OAuthToken=t.OAuthToken,removeAuthWindowListener(),cleanupAuthWindow(),r({OAuthToken:_OAuthToken})))}),askOAuthServerForToken=(e,t,n)=>{setTimeout(()=>{_OAuthToken||(_authWindow&&_authWindow.postMessage("getOAuthToken","*"),_authWindow&&!_authWindow.closed?askOAuthServerForToken(e,t,n):_authWindow&&_authWindow.closed?(_authWindow=null,n(new Error("User cancelled OAuth flow"))):(removeAuthWindowListener(),cleanupAuthWindow()))},_POLL_TIME)},login=n=>__awaiter$7(void 0,void 0,void 0,function*(){if(n)return _OAuthToken&&(yield logout$1()),window.location.replace(n),new Promise((e,t)=>{_authWindowListener=createAuthWindowListener(n,e,t),window.addEventListener("message",_authWindowListener),askOAuthServerForToken(n,e,t)});throw new Error("Missing parameter: Need to include the backend OAuth2 URI")}),logout$1=()=>__awaiter$7(void 0,void 0,void 0,function*(){return new Promise(e=>{removeAuthWindowListener(),cleanupAuthWindow(),e(!(_OAuthToken=null))})}),handleImplicitRedirect=(e=window.location.hash||"",t=window.opener)=>{let n,r,i;try{n=e.match(/access_token=(.+)$/)[1].split("&")[0]}catch(e){}if(!n)try{r=e.match(/error=(.+)$/)[1].split("&")[0],i=e.match(/error_description=(.+)$/)[1].split("&")[0]}catch(e){}t.postMessage({OAuthToken:n,error:r,errorDescription:i},window.origin)};function*handleFetchUserSaga(){var e=yield select(rootApiSelector);if(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=yield call$f(handleFetchUserRequest,e,n),t=yield call$f(getUserRightRequest,t,n);if(e)if(null!=e&&e.errors||t.errors)yield put(fetchUserError());else{var r=null==(i=null==(i=null==(i=null==t?void 0:t.data)?void 0:i.me)?void 0:i.roles)?void 0:i.map(e=>e.appName).filter((e,t,n)=>n.indexOf(e)===t);if(r.includes("admin"))for(const a of null==(i=null==(i=null==t?void 0:t.data)?void 0:i.myRights)?void 0:i.operations)if(a.includes("superadmin")){r.push("superadmin");break}var i=null==(i=null==(i=null==t?void 0:t.data)?void 0:i.me)?void 0:i.userSettings.find(e=>"preferredLanguage"===e.key),o=null==(o=null==(o=null==t?void 0:t.data)?void 0:o.me)?void 0:o.userSettings.find(e=>"recentApplications"===e.key),i=null==i?void 0:i.value,o=null==o?void 0:o.value;e.preferredLanguage=i||"en",e.recentApplications=o||"",yield put(fetchUserSuccess(Object.assign(Object.assign({},e),{roles:r,token:e.token||n,myRights:null==(o=null==(i=null==t?void 0:t.data)?void 0:i.myRights)?void 0:o.operations}))),yield put(subscribeToEventsWebsocket())}else yield put(fetchUserError())}else yield take(getConfigSuccess.type),yield put(fetchUserRequest())}function*logoutHelper(e){var t=yield select(graphEndpointSelector),n=yield select(authSelector);yield call$f(postNotificationApi,t,null==n?void 0:n.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.setCallLogout,value:!0,ephemeral:!0,contentType:"json"},!0,"json",aiwareEvent,e)}function*handleRefreshTokenSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"];try{var n,r,i=yield call$f(handleRefreshTokenRequest,e,t);null!=i&&i.errors?(n=yield select(preferredLanguageSelector),r=AIWareFormatMessage(n),((null==i?void 0:i.errors)||[]).find(e=>{return((null==(e=null==e?void 0:e.data)?void 0:e.serviceMessage)||"").includes("40")})?(yield put(setDuration(1e4)),yield put(showMessage({content:r({id:"shared-redux.refresh-token-failure.4xx",defaultMessage:[{type:0,value:"Could not refresh session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(e)):yield put(showMessage({content:r({id:"shared-redux.refresh-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not refresh session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))):(yield put(refreshTokenSuccess(Object.assign({},i.data))),yield put(fetchUserRequest()))}catch(e){console.log(e)}}function*handleExtendTokenSaga(t){t=t.payload.token;try{var n=yield select(rootApiSelector),r=yield call$f(handleExtendTokenRequest,t,n);null!=r&&r.errors||(yield put(extendTokenSuccess({token:r.token})))}catch(e){n=yield select(preferredLanguageSelector),r=AIWareFormatMessage(n);e instanceof CustomError&&e.isAuthErr?(yield put(setDuration(1e4)),yield put(showMessage({content:r({id:"shared-redux.extend-token-failure.4xx",defaultMessage:[{type:0,value:"Could not extend session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(t)):yield put(showMessage({content:r({id:"shared-redux.extend-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not extend session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))}}function*handleLogoutSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"],e=yield call$f(handleLogoutRequest,e,t);null!=e&&e.errors?yield put(logoutError()):yield put(logoutSuccess())}function*handleUpdateSessionToken(e){e=e.payload.token;e&&"string"==typeof e?yield put(updateTokenSuccess({token:e})):yield put(updateTokenError())}function*handleUpdateUserLanguage(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n,r,i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=(yield select(userSelector$2))["userId"];a?(n=e.payload,r=yield call$f(updateUserSettingsApi,i,o,a,"preferredLanguage",n),sdkEventManager.dispatch(SdkEvents.languageChange,null,{preferredLanguage:r}),yield put(updateUserLanguageSuccess(r))):(sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed, user id is required"),null),yield put(showMessage({content:t({id:"shared-redux.snackbar.languageSelectionError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})))}catch(e){sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed"),null),yield put(showMessage({content:t({id:"shared-redux.snackbar.languageSelectionChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*handleResetPasswordSaga(e){var t,n,r=yield select(preferredLanguageSelector),r=AIWareFormatMessage(r);try{var{resetToken:i,password:o,username:a,organizationInviteId:s}=e.payload,l=yield select(rootApiSelector),c=yield call$f(handleResetPasswordApi,l,{resetToken:i,username:a,password:o,organizationInviteId:s});if(null!=c&&c.success)yield put(resetPasswordSuccess());else{let e=r({id:"os-auth.reset-password.internalServerError",defaultMessage:[{type:0,value:"An error has occurred."}]});401===c.status&&"PasswordResetTokenExpired"===(null==(t=c.result)?void 0:t.errorCode)?e=r({id:"os-auth.reset-password.expireMessageDescriptive",defaultMessage:[{type:0,value:'The password reset link you used has expired. Please click the "Forgot Password" link on the login page to generate a new link.'}]}):403===c.status?e=(null==(n=c.result)?void 0:n.message)||e:404===c.status&&(e=r({id:"os-auth.reset-password.expireMessage",defaultMessage:[{type:0,value:"An error has occurred. The reset link might be expired."}]})),yield put(resetPasswordError({message:e}))}}catch(e){console.log(e),yield put(resetPasswordError({message:r({id:"os-auth.reset-password.internalError",defaultMessage:[{type:0,value:"Could not reset your password."}]})}))}}function*requestOAuthGrant(){var e=yield select(appIdSelector),t=(yield select(selectApiConfigs$1))["apiRoot"],n=yield select(sessionTokenSelector),r=yield select(oauthRedirectUriSelector);if(n)yield put(oAuthGrantSuccess(n));else try{n=(yield call$f(login,t+`/v1/admin/oauth/authorize?response_type=token&client_id=${e}&redirect_uri=${r}&scope=all`)).OAuthToken;yield put(oAuthGrantSuccess(n))}catch(e){console.log("oauth flow error",e),yield put(oAuthGrantFailure())}}function*callSdkInitCompleteCallbackOnError(){var e,t=yield select(initialConfigSelector),n=yield select(preferredLanguageSelector),n=AIWareFormatMessage(n);null!=(e=null==t?void 0:t.onComplete)&&e.call(t,n({id:"shared-redux.auth-saga.sdk-init-error-message",defaultMessage:[{type:0,value:"An error occurred during initialization."}]}))}function*watchOAuthReadiness(){for(;;){yield take([oAuthGrantReadyToStart.type,fetchUserSuccess.type,fetchUserError.type]);var e=yield select(oAuthStatusSelector),t=yield select(authStatusSelector);if(t!==Status.loading&&e===Status.ready)switch(t){case Status.success:yield put(oAuthGrantSkip());break;case Status.failure:yield put(oAuthGrantStart())}}}function*handleUpdateUserRecentApplications(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n,r,i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=(yield select(userSelector$2))["userId"],s=yield select(userRecentApplicationsSelector);a?(n=slice$2(uniq([e.payload,...s]),0,6),r=yield call$f(updateUserSettingsApi,i,o,a,"recentApplications",JSON.stringify(n)),yield put(updateUserRecentApplicationsSuccess(r))):yield put(showMessage({content:t({id:"shared-redux.snackbar.updateRecentApplicationsError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error}))}catch(e){yield put(showMessage({content:t({id:"shared-redux.snackbar.updatingRecentApplicationsChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*watchInitAndAuthStatus(){for(var e,t,n;;){yield take([oAuthGrantSuccess.type,oAuthGrantSkip.type,oAuthGrantFailure.type,sdkInitSuccess.type,fetchUserSuccess.type,fetchUserError.type]);var r=yield select(initialConfigSelector),i=yield select(oAuthTokenSelector),o=yield select(oAuthStatusSelector),a=yield select(initStatusSelector),s=yield select(authStatusSelector),l=yield select(sessionTokenSelector),c=yield select(preferredLanguageSelector),u=AIWareFormatMessage(c);if(s!==Status.loading)if(s===Status.success)switch(o){case Status.loading:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l),yield put(oAuthGrantSuccess(l));break;case Status.skipped:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l)}else if(a===Status.success)switch(o){case Status.skipped:null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,l);break;case Status.success:null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,i),s===Status.failure&&(yield put(fetchUserRequest()));break;case Status.failure:null!=(n=null==r?void 0:r.onComplete)&&n.call(r,u({id:"shared-redux.auth-saga.oauth-error-message",defaultMessage:[{type:0,value:"An error occurred during authentication."}]}))}}}function*authSaga(){yield all([takeLatest$1(fetchUserRequest.type,handleFetchUserSaga),takeLatest$1(updateTokenRequest.type,handleUpdateSessionToken),takeLatest$1(resetPasswordRequest.type,handleResetPasswordSaga),takeEvery$1(refreshTokenRequest.type,handleRefreshTokenSaga),takeEvery$1(extendTokenRequest.type,handleExtendTokenSaga),takeEvery$1(logoutRequest.type,handleLogoutSaga),takeEvery$1(updateUserLanguageStart.type,handleUpdateUserLanguage),takeEvery$1(oAuthGrantStart.type,requestOAuthGrant),takeEvery$1(sdkInitFailure.type,callSdkInitCompleteCallbackOnError),takeEvery$1(updateUserRecentApplicationsStart.type,handleUpdateUserRecentApplications),watchOAuthReadiness(),watchInitAndAuthStatus()])}function getAuthModule(){return{id:namespace$4$1,reducerMap:{[namespace$4$1]:authReducer},sagas:[authSaga],initialActions:[fetchUserRequest()]}}var NotificationFlag,CreateModes,TabId,EUserStatus,AvailableWidgets,AvailablePanels,AvailableComponents,userActivityEvents={records:[{id:"ff9272fe-5e98-4ffb-96b6-5df2918d9b2b",event:"login_succeeded",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d",userName:"sys_graphql_citest_superadmin@veritone.com",organizationId:"7682",applicationId:"123",createdDateTime:"2020-10-26T06:40:12.928Z",payload:{organizationId:12333,organizationName:"name",userName:"user",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d"}}]},mockData={userActivityEvents:userActivityEvents};const fakeAPI=()=>new Promise((e,t)=>{setTimeout(()=>e({success:!0,data:mockData}),500)}),getActivityApi=()=>__awaiter$7(void 0,void 0,void 0,function*(){try{var{success:e,data:t}=yield fakeAPI();return e&&t.userActivityEvents?{data:t.userActivityEvents,success:!0}:{success:!1,data:null}}catch(e){return{success:!1,data:null,message:e}}}),getApplicationsApi=(e,t)=>__awaiter$7(void 0,void 0,void 0,function*(){try{return(yield fetch(e+"/v1/admin/current-user/applications",{method:"GET",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t}),credentials:"include"})).json()}catch(e){console.error(e)}}),getApplicationLogo=(r,i)=>__awaiter$7(void 0,void 0,void 0,function*(){var e=`query ($limit: Int $owned: Boolean) {
1071
1071
  applications (limit: $limit owned: $owned) {
1072
1072
  records {
1073
1073
  id
@@ -1075,7 +1075,7 @@ createScheduledJob(input:{
1075
1075
  signedIconUrl
1076
1076
  }
1077
1077
  }
1078
- }`;let t;var n=yield gqlIntrospection.queryParser(r,i,e);t=n&&null!=n&&n.query?n.query:e;try{return yield baseGraphQLApi({query:t,graphEndpoint:r,token:i,variables:{limit:1e3,owned:!1}})}catch(e){console.error(e)}});function __awaiter$6(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}const AIWareIntlProvider=e=>{const n=useSelector(preferredLanguageSelector)||"en";var t=e.style;const[r,i]=react.exports.useState({});return react.exports.useEffect(()=>{__awaiter$6(void 0,void 0,void 0,function*(){try{if(!r[n]){const t=yield fetchTranslationJson(n);i(e=>Object.assign(Object.assign({},e),{[n]:t}))}}catch(e){console.log(e),i(e=>Object.assign(Object.assign({},e),{[n]:{}}))}})},[n,r]),jsxRuntime.exports.jsx(IntlProvider,Object.assign({messages:r[n],locale:n,defaultLocale:"en"},{children:jsxRuntime.exports.jsx("div",Object.assign({style:t},{children:e.children}))}))},setData=(!function(e){e.unread="unread",e.read="read",e.actionPending="actionPending",e.actionDone="actionDone",e.seen="seen",e.unseen="unseen",e.starred="starred"}(NotificationFlag=NotificationFlag||{}),!function(e){e[e.ADD=0]="ADD",e[e.STACK=1]="STACK",e[e.SLIDE_MORE=2]="SLIDE_MORE",e[e.OVERLAY_OVER_PARENT=3]="OVERLAY_OVER_PARENT"}(CreateModes=CreateModes||{}),!function(e){e.APP_PANEL="APP_PANEL",e.PERSONAL_PANEL="PERSONAL_PANEL",e.ORGANIZATION_PANEL="ORGANIZATION_PANEL",e.MARKET_PANEL="MARKET_PANEL",e.SETTING_PREFERENCE_PANEL="SETTING_PREFERENCE_PANEL",e.ACTIVITY_PANEL="ACTIVITY_PANEL",e.PERFORMANCE_MONITOR="PERFORMANCE_MONITOR",e.CMS_SHORTCUT="CMS_SHORTCUT",e.FLOW_CENTER="FLOW_CENTER",e.ADMIN_SHORTCUT="ADMIN_CENTER_BROWSE",e.DATA_CENTER="DATA_CENTER",e.RESOURCE_CENTER="RESOURCE_CENTER",e.ENGINE_CENTER="ENGINE_CENTER",e.LIBRARY_CENTER="LIBRARY_CENTER",e.MARKETPLACE_CENTER="MARKETPLACE_CENTER",e.PROCESSING_CENTER_BROWSE="PROCESSING_CENTER_BROWSE",e.PROCESSING_CENTER_DAG_BUILDER="PROCESSING_CENTER_DAG_BUILDER",e.INSTANCE_ADMIN_CENTER_BROWSE="INSTANCE_ADMIN_CENTER_BROWSE"}(TabId=TabId||{}),!function(e){e.active="active",e.suspended="suspended",e.deleted="deleted",e.deactivated="deactivated"}(EUserStatus=EUserStatus||{}),!function(e){e.SAMPLE_APP_BAR="SAMPLE_APP_BAR",e.APP_BAR="APP_BAR",e.FLOW_CENTER="FLOW_CENTER",e.FLOW_WIDGET="FLOW_WIDGET",e.ENGINE_CENTER_BROWSE="ENGINE_CENTER_BROWSE",e.APP_CENTER_BROWSE="APP_CENTER_BROWSE",e.RESET_PASSWORD="RESET_PASSWORD"}(AvailableWidgets=AvailableWidgets||{}),!function(e){e.SIMPLE_PANEL="SIMPLE_PANEL",e.APP_BAR_PANEL_TEMPLATE="APP_BAR_PANEL_TEMPLATE",e.APP_BAR_TAB_PANEL_TEMPLATE="APP_BAR_TAB_PANEL_TEMPLATE",e.TAB_TEMPLATE="TAB_TEMPLATE"}(AvailablePanels=AvailablePanels||{}),!function(e){e.TEST_COMPONENT="TEST_COMPONENT",e.TEST_COMPONENT2="TEST_COMPONENT2",e.TEST_COMPONENT3="TEST_COMPONENT3",e.HELP_PANEL="HELP_PANEL",e.NOTIFICATION_PANEL="NOTIFICATION_PANEL",e.USER_APPLICATION_SETTINGS_PANEL="USER_APPLICATION_SETTINGS_PANEL",e.APP_BAR_PANEL="APP_BAR_PANEL",e.NOTIFICATION_DETAIL="NOTIFICATION_DETAIL",e.EDIT_PROFILE_PICTURE="EDIT_PROFILE_PICTURE",e.NOTIFICATION_SETTING="NOTIFICATION_SETTING",e.NOTIFICATION_UTILITY="NOTIFICATION_UTILITY",e.NOTIFICATION_APPLICATION="NOTIFICATION_APPLICATION",e.SETTING_PREFERENCE="SETTING_PREFERENCE",e.ORGANIZATION_PANEL="ORGANIZATION_PANEL",e.DATA_CENTER_BROWSE="DATA_CENTER_BROWSE",e.DATA_CENTER_FOLDERS_AND_FILES="DATA_CENTER_FOLDERS_AND_FILES",e.DATA_CENTER_SELECT_IMPORT_SOURCE="DATA_CENTER_SELECT_IMPORT_SOURCE",e.DATA_CENTER_IMPORTER="DATA_CENTER_IMPORTER",e.DATA_LABELER="DATA_LABELER",e.ADMIN_CENTER_OPEN_ID="ADMIN_CENTER_OPEN_ID",e.ADMIN_CENTER_BROWSE="ADMIN_CENTER_BROWSE",e.RESOURCE_CENTER_BROWSE="RESOURCE_CENTER_BROWSE",e.DATA_CENTER_PROCESS_AI="DATA_CENTER_PROCESS_AI",e.ENGINE_CENTER_NEW="ENGINE_CENTER_NEW",e.ENGINE_CENTER_FILTER="ENGINE_CENTER_FILTER",e.APP_CENTER_FILTER="APP_CENTER_FILTER",e.ENGINE_CENTER_DETAILS="ENGINE_CENTER_DETAILS",e.ENGINE_CENTER_NEW_BUILD="ENGINE_CENTER_NEW_BUILD",e.ENGINE_CENTER_CUSTOM_FIELDS_FORM="ENGINE_CENTER_CUSTOM_FIELDS_FORM",e.ENGINE_CENTER_INPUT_TYPE_FLYOUT="ENGINE_CENTER_INPUT_TYPE_FLYOUT",e.ENGINE_CENTER_EDIT_RELEASE_NOTES="ENGINE_CENTER_EDIT_RELEASE_NOTES",e.ENGINE_CENTER_SCHEMAS_FORM_PANEL="ENGINE_CENTER_SCHEMAS_FORM_PANEL",e.ENGINE_CENTER_VERSION_HISTORY_PANEL="ENGINE_CENTER_VERSION_HISTORY_PANEL",e.SUPPORTED_FILE_TYPES="SUPPORTED_FILE_TYPES",e.EDIT_FILE_METADATA="EDIT_FILE_METADATA",e.APP_CENTER_NEW="APP_CENTER_NEW",e.APP_CENTER_ADD_FLOW_PANEL="APP_CENTER_ADD_FLOW_PANEL",e.APP_CENTER_ADD_SCHEMA_PANEL="APP_CENTER_ADD_SCHEMA_PANEL",e.APP_CENTER_CONFIG_FIELDS_FORM="APP_CENTER_CONFIG_FIELDS_FORM",e.APP_CENTER_CONTEXT_MENU_EXTENSIONS="APP_CENTER_CONTEXT_MENU_EXTENSIONS",e.APP_CENTER_EVENT_PANEL="APP_CENTER_EVENT_PANEL",e.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL="APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL",e.APP_CENTER_BROWSE="APP_CENTER_BROWSE",e.APP_CENTER_DETAILS="APP_CENTER_DETAILS",e.DATA_CENTER_ENGINE_SELECTION="DATA_CENTER_ENGINE_SELECTION",e.INVITE_USERS_PANEL="INVITE_USERS_PANEL",e.INVITE_REQUESTS_PANEL="INVITE_REQUESTS_PANEL",e.REVIEW_ORG_INVITE_PANEL="REVIEW_ORG_INVITE_PANEL",e.ADD_APPLICATIONS="ADD_APPLICATIONS",e.ADMIN_CENTER_NEW_GROUP_PANEL="ADMIN_CENTER_NEW_GROUP_PANEL",e.PERMISSIONS_PANEL="PERMISSIONS_PANEL",e.NEW_PERMISSION_SET_PANEL="NEW_PERMISSION_SET_PANEL",e.DATA_CENTER_MDP_IFRAME_PANEL="DATA_CENTER_MDP_IFRAME_PANEL",e.DATA_CENTER_INGESTION_CREATION_PANEL="DATA_CENTER_INGESTION_CREATION_PANEL",e.DATA_CENTER_SOURCE_CREATION_PANEL="DATA_CENTER_SOURCE_CREATION_PANEL",e.DATA_CENTER_FILE_INFO_PANEL="DATA_CENTER_FILE_INFO_PANEL",e.ADMIN_CENTER_GROUP_DETAILS_PANEL="ADMIN_CENTER_GROUP_DETAILS_PANEL",e.ADMIN_CENTER_ADD_MEMBER_PANEL="ADMIN_CENTER_ADD_MEMBER_PANEL",e.GROUP_INFO_PANEL="GROUP_INFO_PANEL",e.APPLICATION_DETAILS_PANEL="APPLICATION_DETAILS_PANEL",e.PERMISSION_SET_DETAILS_PANEL="PERMISSION_SET_DETAILS_PANEL",e.PROCESSING_CENTER_SOURCES="PROCESSING_CENTER_SOURCES",e.ADD_APPLICATION_USERS_PANEL="ADD_APPLICATION_USERS_PANEL",e.PROCESSING_CENTER_BROWSE="PROCESSING_CENTER_BROWSE",e.PROCESSING_CENTER_JOBS="PROCESSING_CENTER_JOBS",e.JOBS_TABLE_SETTINGS_PANEL="JOBS_TABLE_SETTINGS_PANEL",e.PROCESSING_CENTER_ERROR_DETAIL="PROCESSING_CENTER_ERROR_DETAIL",e.VERSION_PANEL="VERSION_PANEL",e.PROCESSING_CENTER_DAG_BUILDER="PROCESSING_CENTER_DAG_BUILDER",e.PROCESSING_CENTER_INGESTION="PROCESSING_CENTER_INGESTION",e.PROCESSING_CENTER_ADVANCED_SETTINGS="PROCESSING_CENTER_ADVANCED_SETTINGS",e.PROCESSING_CENTER_AFFILIATE_PANEL="PROCESSING_CENTER_AFFILIATE_PANEL",e.JOBS_DETAILS_PANEL="JOBS_DETAILS_PANEL",e.TASKS_TABLE_SETTINGS_PANEL="TASKS_TABLE_SETTINGS_PANEL",e.PACKAGE_DETAILS_PANEL="PACKAGE_DETAILS_PANEL",e.INSTANCE_ADMIN_CENTER_BROWSE="INSTANCE_ADMIN_CENTER_BROWSE",e.USER_DETAILS_PANEL="USER_DETAILS_PANEL",e.MANAGE_GRANTS="MANAGE_GRANTS",e.SCHEMA_DETAILS_PANEL="SCHEMA_DETAILS_PANEL"}(AvailableComponents=AvailableComponents||{}),createAction("Set Data")),logout=createAction("os-app-bar-panel/logout"),logoutUser$1=createAction("os-app-bar-panel/users/logout"),listenLogout=createAction("logoutListener"),updateActivityStatus$1=createAction("os-app-bar-panel/users/updateActivityStatus"),appSwitcherSetupListener=createAction("aiware/set up app switch listener"),appSwitcherHandleClick=createAction("aiware/handle app switch"),appSwitcherHandleClickAppNatively=createAction("aiware/applications/get handle click app"),nameSpace$4="mailbox",mailboxIdSelector=e=>{return null==(e=e[nameSpace$4])?void 0:e.mailBoxIds},unseenNotificationSelector=e=>{e=null==(e=null==e?void 0:e[nameSpace$4])?void 0:e.mailbox;return null==e?void 0:e.reduce((e,t)=>e+t.unseenCount,0)},panelSelector=e=>e.panels||[],SUBSCRIBER_MAILBOX=nameSpace$4+"/SUBSCRIBER_MAILBOX",SUBSCRIBER_MAILBOX_START=nameSpace$4+"/SUBSCRIBER_MAILBOX_START",UPDATE_MAILBOX_DATA=nameSpace$4+"/UPDATE_MAILBOX_DATA",SUBSCRIBING_MAILBOX=nameSpace$4+"/SUBSCRIBING_MAILBOX",SUBSCRIBER_MAILBOX_SUCCESS=nameSpace$4+"/SUBSCRIBER_MAILBOX_SUCCESS",SUBSCRIBER_MAILBOX_ERROR=nameSpace$4+"/SUBSCRIBER_MAILBOX_ERROR",UPDATE_UNSEEN_COUNT=nameSpace$4+"/UPDATE_UNSEEN_COUNT",MARK_ALL_NOTIFICATIONS_SEEN=nameSpace$4+"/MARK_ALL_NOTIFICATIONS_SEEN",MARK_ALL_NOTIFICATIONS_SEEN_REQUEST=nameSpace$4+"/MARK_ALL_NOTIFICATIONS_SEEN_REQUEST",MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS=nameSpace$4+"/MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS",MARK_ALL_NOTIFICATIONS_SEEN_FAIL=nameSpace$4+"/MARK_ALL_NOTIFICATIONS_SEEN_FAIL",SUBSCRIBE_DEFAULT_MAILBOX_REQUEST=nameSpace$4+"/SUBSCRIBE_DEFAULT_MAILBOX_REQUEST",PUSH_NOTIFICATION=nameSpace$4+"/PUSH_NOTIFICATION",PUSH_DEFAULT_MAILBOX=nameSpace$4+"/PUSH_DEFAULT_MAILBOX",requestSubscriber=createAction(SUBSCRIBER_MAILBOX),subscriberStart=createAction(SUBSCRIBER_MAILBOX_START),setMailboxData=createAction(UPDATE_MAILBOX_DATA,function(e){return{payload:e}}),subscriberSuccess=createAction(SUBSCRIBER_MAILBOX_SUCCESS,function(e){return{payload:e}}),subscriberError=createAction(SUBSCRIBER_MAILBOX_ERROR,function(e){return{payload:e}}),subscribing=createAction(SUBSCRIBING_MAILBOX),pushNotification=createAction(PUSH_NOTIFICATION,function(e){return{payload:e}}),pushDefaultMailBox=createAction(PUSH_DEFAULT_MAILBOX,function(e){return{payload:e}}),updateUnseenCount=createAction(UPDATE_UNSEEN_COUNT,function(e){return{payload:e}}),markAllNotificationsSeenRequest=createAction(MARK_ALL_NOTIFICATIONS_SEEN_REQUEST),markAllNotificationsSeenSuccess=createAction(MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS),markAllNotificationsSeenFail=createAction(MARK_ALL_NOTIFICATIONS_SEEN_FAIL),subscribeDefaultMailboxRequest=createAction(SUBSCRIBE_DEFAULT_MAILBOX_REQUEST),initialState$9={mailBoxIds:[],mailbox:[],status:"idle",failureMessage:""},mailboxReducer=createReducer(initialState$9,e=>{e.addCase(subscriberStart,e=>Object.assign(Object.assign({},e),{status:"loading"})).addCase(subscriberSuccess,e=>Object.assign(Object.assign({},e),{status:"subscribing"})).addCase(setMailboxData,(e,t)=>Object.assign(Object.assign({},e),{mailbox:[...t.payload],mailBoxIds:[...t.payload.map(e=>e.id)]})).addCase(subscriberError,(e,t)=>Object.assign(Object.assign({},e),{status:"failure",failureMessage:t.payload})).addCase(updateUnseenCount,(e,n)=>Object.assign(Object.assign({},e),{mailbox:e.mailbox.map(t=>{var e;return Object.assign(Object.assign({},t),{unseenCount:null==(e=null==(e=n.payload.notificationMailboxes)?void 0:e.find(e=>e.id===t.id))?void 0:e.unseenCount})})})).addCase(markAllNotificationsSeenRequest,e=>Object.assign({},e)).addCase(markAllNotificationsSeenSuccess,e=>Object.assign(Object.assign({},e),{mailbox:e.mailbox.map(e=>Object.assign(Object.assign({},e),{unseenCount:0}))})).addCase(markAllNotificationsSeenFail,e=>Object.assign(Object.assign({},e),{status:"failure"}))});function __awaiter$5(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}const getMailboxApi=(e,t)=>__awaiter$5(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`
1078
+ }`;let t;var n=yield gqlIntrospection.queryParser(r,i,e);t=n&&null!=n&&n.query?n.query:e;try{return yield baseGraphQLApi({query:t,graphEndpoint:r,token:i,variables:{limit:1e3,owned:!1}})}catch(e){console.error(e)}}),namespace$8="flowCenterDialog",initialState$a={flowCenterDialog:{open:!1,component:"",props:{}}},flowCenterDialogSlice=createSlice({name:namespace$8,initialState:initialState$a,reducers:{flowCenterDialogAction(e,t){e.flowCenterDialog=t.payload}}}),flowCenterDialogSelector=e=>(null==e?void 0:e[namespace$8])||null,flowCenterDialogAction=flowCenterDialogSlice.actions["flowCenterDialogAction"],flowCenterDialogReducer=flowCenterDialogSlice.reducer;function __awaiter$6(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}const AIWareIntlProvider=e=>{const n=useSelector(preferredLanguageSelector)||"en";var t=e.style;const[r,i]=react.exports.useState({});return react.exports.useEffect(()=>{__awaiter$6(void 0,void 0,void 0,function*(){try{if(!r[n]){const t=yield fetchTranslationJson(n);i(e=>Object.assign(Object.assign({},e),{[n]:t}))}}catch(e){console.log(e),i(e=>Object.assign(Object.assign({},e),{[n]:{}}))}})},[n,r]),jsxRuntime.exports.jsx(IntlProvider,Object.assign({messages:r[n],locale:n,defaultLocale:"en"},{children:jsxRuntime.exports.jsx("div",Object.assign({style:t},{children:e.children}))}))},setData=(!function(e){e.unread="unread",e.read="read",e.actionPending="actionPending",e.actionDone="actionDone",e.seen="seen",e.unseen="unseen",e.starred="starred"}(NotificationFlag=NotificationFlag||{}),!function(e){e[e.ADD=0]="ADD",e[e.STACK=1]="STACK",e[e.SLIDE_MORE=2]="SLIDE_MORE",e[e.OVERLAY_OVER_PARENT=3]="OVERLAY_OVER_PARENT"}(CreateModes=CreateModes||{}),!function(e){e.APP_PANEL="APP_PANEL",e.PERSONAL_PANEL="PERSONAL_PANEL",e.ORGANIZATION_PANEL="ORGANIZATION_PANEL",e.MARKET_PANEL="MARKET_PANEL",e.SETTING_PREFERENCE_PANEL="SETTING_PREFERENCE_PANEL",e.ACTIVITY_PANEL="ACTIVITY_PANEL",e.PERFORMANCE_MONITOR="PERFORMANCE_MONITOR",e.CMS_SHORTCUT="CMS_SHORTCUT",e.FLOW_CENTER="FLOW_CENTER",e.ADMIN_SHORTCUT="ADMIN_CENTER_BROWSE",e.DATA_CENTER="DATA_CENTER",e.RESOURCE_CENTER="RESOURCE_CENTER",e.ENGINE_CENTER="ENGINE_CENTER",e.LIBRARY_CENTER="LIBRARY_CENTER",e.MARKETPLACE_CENTER="MARKETPLACE_CENTER",e.PROCESSING_CENTER_BROWSE="PROCESSING_CENTER_BROWSE",e.PROCESSING_CENTER_DAG_BUILDER="PROCESSING_CENTER_DAG_BUILDER",e.INSTANCE_ADMIN_CENTER_BROWSE="INSTANCE_ADMIN_CENTER_BROWSE"}(TabId=TabId||{}),!function(e){e.active="active",e.suspended="suspended",e.deleted="deleted",e.deactivated="deactivated"}(EUserStatus=EUserStatus||{}),!function(e){e.SAMPLE_APP_BAR="SAMPLE_APP_BAR",e.APP_BAR="APP_BAR",e.FLOW_CENTER="FLOW_CENTER",e.FLOW_WIDGET="FLOW_WIDGET",e.ENGINE_CENTER_BROWSE="ENGINE_CENTER_BROWSE",e.APP_CENTER_BROWSE="APP_CENTER_BROWSE",e.RESET_PASSWORD="RESET_PASSWORD"}(AvailableWidgets=AvailableWidgets||{}),!function(e){e.SIMPLE_PANEL="SIMPLE_PANEL",e.APP_BAR_PANEL_TEMPLATE="APP_BAR_PANEL_TEMPLATE",e.APP_BAR_TAB_PANEL_TEMPLATE="APP_BAR_TAB_PANEL_TEMPLATE",e.TAB_TEMPLATE="TAB_TEMPLATE"}(AvailablePanels=AvailablePanels||{}),!function(e){e.TEST_COMPONENT="TEST_COMPONENT",e.TEST_COMPONENT2="TEST_COMPONENT2",e.TEST_COMPONENT3="TEST_COMPONENT3",e.HELP_PANEL="HELP_PANEL",e.NOTIFICATION_PANEL="NOTIFICATION_PANEL",e.USER_APPLICATION_SETTINGS_PANEL="USER_APPLICATION_SETTINGS_PANEL",e.APP_BAR_PANEL="APP_BAR_PANEL",e.NOTIFICATION_DETAIL="NOTIFICATION_DETAIL",e.EDIT_PROFILE_PICTURE="EDIT_PROFILE_PICTURE",e.NOTIFICATION_SETTING="NOTIFICATION_SETTING",e.NOTIFICATION_UTILITY="NOTIFICATION_UTILITY",e.NOTIFICATION_APPLICATION="NOTIFICATION_APPLICATION",e.SETTING_PREFERENCE="SETTING_PREFERENCE",e.ORGANIZATION_PANEL="ORGANIZATION_PANEL",e.DATA_CENTER_BROWSE="DATA_CENTER_BROWSE",e.DATA_CENTER_FOLDERS_AND_FILES="DATA_CENTER_FOLDERS_AND_FILES",e.DATA_CENTER_SELECT_IMPORT_SOURCE="DATA_CENTER_SELECT_IMPORT_SOURCE",e.DATA_CENTER_IMPORTER="DATA_CENTER_IMPORTER",e.DATA_LABELER="DATA_LABELER",e.ADMIN_CENTER_OPEN_ID="ADMIN_CENTER_OPEN_ID",e.ADMIN_CENTER_BROWSE="ADMIN_CENTER_BROWSE",e.RESOURCE_CENTER_BROWSE="RESOURCE_CENTER_BROWSE",e.DATA_CENTER_PROCESS_AI="DATA_CENTER_PROCESS_AI",e.ENGINE_CENTER_NEW="ENGINE_CENTER_NEW",e.ENGINE_CENTER_FILTER="ENGINE_CENTER_FILTER",e.APP_CENTER_FILTER="APP_CENTER_FILTER",e.ENGINE_CENTER_DETAILS="ENGINE_CENTER_DETAILS",e.ENGINE_CENTER_NEW_BUILD="ENGINE_CENTER_NEW_BUILD",e.ENGINE_CENTER_CUSTOM_FIELDS_FORM="ENGINE_CENTER_CUSTOM_FIELDS_FORM",e.ENGINE_CENTER_INPUT_TYPE_FLYOUT="ENGINE_CENTER_INPUT_TYPE_FLYOUT",e.ENGINE_CENTER_EDIT_RELEASE_NOTES="ENGINE_CENTER_EDIT_RELEASE_NOTES",e.ENGINE_CENTER_SCHEMAS_FORM_PANEL="ENGINE_CENTER_SCHEMAS_FORM_PANEL",e.ENGINE_CENTER_VERSION_HISTORY_PANEL="ENGINE_CENTER_VERSION_HISTORY_PANEL",e.SUPPORTED_FILE_TYPES="SUPPORTED_FILE_TYPES",e.EDIT_FILE_METADATA="EDIT_FILE_METADATA",e.APP_CENTER_NEW="APP_CENTER_NEW",e.APP_CENTER_ADD_FLOW_PANEL="APP_CENTER_ADD_FLOW_PANEL",e.APP_CENTER_ADD_SCHEMA_PANEL="APP_CENTER_ADD_SCHEMA_PANEL",e.APP_CENTER_CONFIG_FIELDS_FORM="APP_CENTER_CONFIG_FIELDS_FORM",e.APP_CENTER_CONTEXT_MENU_EXTENSIONS="APP_CENTER_CONTEXT_MENU_EXTENSIONS",e.APP_CENTER_EVENT_PANEL="APP_CENTER_EVENT_PANEL",e.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL="APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL",e.APP_CENTER_BROWSE="APP_CENTER_BROWSE",e.APP_CENTER_DETAILS="APP_CENTER_DETAILS",e.DATA_CENTER_ENGINE_SELECTION="DATA_CENTER_ENGINE_SELECTION",e.INVITE_USERS_PANEL="INVITE_USERS_PANEL",e.INVITE_REQUESTS_PANEL="INVITE_REQUESTS_PANEL",e.REVIEW_ORG_INVITE_PANEL="REVIEW_ORG_INVITE_PANEL",e.ADD_APPLICATIONS="ADD_APPLICATIONS",e.ADMIN_CENTER_NEW_GROUP_PANEL="ADMIN_CENTER_NEW_GROUP_PANEL",e.PERMISSIONS_PANEL="PERMISSIONS_PANEL",e.NEW_PERMISSION_SET_PANEL="NEW_PERMISSION_SET_PANEL",e.DATA_CENTER_MDP_IFRAME_PANEL="DATA_CENTER_MDP_IFRAME_PANEL",e.DATA_CENTER_INGESTION_CREATION_PANEL="DATA_CENTER_INGESTION_CREATION_PANEL",e.DATA_CENTER_SOURCE_CREATION_PANEL="DATA_CENTER_SOURCE_CREATION_PANEL",e.DATA_CENTER_FILE_INFO_PANEL="DATA_CENTER_FILE_INFO_PANEL",e.ADMIN_CENTER_GROUP_DETAILS_PANEL="ADMIN_CENTER_GROUP_DETAILS_PANEL",e.ADMIN_CENTER_ADD_MEMBER_PANEL="ADMIN_CENTER_ADD_MEMBER_PANEL",e.GROUP_INFO_PANEL="GROUP_INFO_PANEL",e.APPLICATION_DETAILS_PANEL="APPLICATION_DETAILS_PANEL",e.PERMISSION_SET_DETAILS_PANEL="PERMISSION_SET_DETAILS_PANEL",e.PROCESSING_CENTER_SOURCES="PROCESSING_CENTER_SOURCES",e.ADD_APPLICATION_USERS_PANEL="ADD_APPLICATION_USERS_PANEL",e.PROCESSING_CENTER_BROWSE="PROCESSING_CENTER_BROWSE",e.PROCESSING_CENTER_JOBS="PROCESSING_CENTER_JOBS",e.JOBS_TABLE_SETTINGS_PANEL="JOBS_TABLE_SETTINGS_PANEL",e.PROCESSING_CENTER_ERROR_DETAIL="PROCESSING_CENTER_ERROR_DETAIL",e.VERSION_PANEL="VERSION_PANEL",e.PROCESSING_CENTER_DAG_BUILDER="PROCESSING_CENTER_DAG_BUILDER",e.PROCESSING_CENTER_INGESTION="PROCESSING_CENTER_INGESTION",e.PROCESSING_CENTER_ADVANCED_SETTINGS="PROCESSING_CENTER_ADVANCED_SETTINGS",e.PROCESSING_CENTER_AFFILIATE_PANEL="PROCESSING_CENTER_AFFILIATE_PANEL",e.JOBS_DETAILS_PANEL="JOBS_DETAILS_PANEL",e.TASKS_TABLE_SETTINGS_PANEL="TASKS_TABLE_SETTINGS_PANEL",e.PACKAGE_DETAILS_PANEL="PACKAGE_DETAILS_PANEL",e.INSTANCE_ADMIN_CENTER_BROWSE="INSTANCE_ADMIN_CENTER_BROWSE",e.USER_DETAILS_PANEL="USER_DETAILS_PANEL",e.MANAGE_GRANTS="MANAGE_GRANTS",e.SCHEMA_DETAILS_PANEL="SCHEMA_DETAILS_PANEL"}(AvailableComponents=AvailableComponents||{}),createAction("Set Data")),logout=createAction("os-app-bar-panel/logout"),logoutUser$1=createAction("os-app-bar-panel/users/logout"),listenLogout=createAction("logoutListener"),updateActivityStatus$1=createAction("os-app-bar-panel/users/updateActivityStatus"),appSwitcherSetupListener=createAction("aiware/set up app switch listener"),appSwitcherHandleClick=createAction("aiware/handle app switch"),appSwitcherHandleClickAppNatively=createAction("aiware/applications/get handle click app"),nameSpace$4="mailbox",mailboxIdSelector=e=>{return null==(e=e[nameSpace$4])?void 0:e.mailBoxIds},unseenNotificationSelector=e=>{e=null==(e=null==e?void 0:e[nameSpace$4])?void 0:e.mailbox;return null==e?void 0:e.reduce((e,t)=>e+t.unseenCount,0)},panelSelector=e=>e.panels||[],SUBSCRIBER_MAILBOX=nameSpace$4+"/SUBSCRIBER_MAILBOX",SUBSCRIBER_MAILBOX_START=nameSpace$4+"/SUBSCRIBER_MAILBOX_START",UPDATE_MAILBOX_DATA=nameSpace$4+"/UPDATE_MAILBOX_DATA",SUBSCRIBING_MAILBOX=nameSpace$4+"/SUBSCRIBING_MAILBOX",SUBSCRIBER_MAILBOX_SUCCESS=nameSpace$4+"/SUBSCRIBER_MAILBOX_SUCCESS",SUBSCRIBER_MAILBOX_ERROR=nameSpace$4+"/SUBSCRIBER_MAILBOX_ERROR",UPDATE_UNSEEN_COUNT=nameSpace$4+"/UPDATE_UNSEEN_COUNT",MARK_ALL_NOTIFICATIONS_SEEN=nameSpace$4+"/MARK_ALL_NOTIFICATIONS_SEEN",MARK_ALL_NOTIFICATIONS_SEEN_REQUEST=nameSpace$4+"/MARK_ALL_NOTIFICATIONS_SEEN_REQUEST",MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS=nameSpace$4+"/MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS",MARK_ALL_NOTIFICATIONS_SEEN_FAIL=nameSpace$4+"/MARK_ALL_NOTIFICATIONS_SEEN_FAIL",SUBSCRIBE_DEFAULT_MAILBOX_REQUEST=nameSpace$4+"/SUBSCRIBE_DEFAULT_MAILBOX_REQUEST",PUSH_NOTIFICATION=nameSpace$4+"/PUSH_NOTIFICATION",PUSH_DEFAULT_MAILBOX=nameSpace$4+"/PUSH_DEFAULT_MAILBOX",requestSubscriber=createAction(SUBSCRIBER_MAILBOX),subscriberStart=createAction(SUBSCRIBER_MAILBOX_START),setMailboxData=createAction(UPDATE_MAILBOX_DATA,function(e){return{payload:e}}),subscriberSuccess=createAction(SUBSCRIBER_MAILBOX_SUCCESS,function(e){return{payload:e}}),subscriberError=createAction(SUBSCRIBER_MAILBOX_ERROR,function(e){return{payload:e}}),subscribing=createAction(SUBSCRIBING_MAILBOX),pushNotification=createAction(PUSH_NOTIFICATION,function(e){return{payload:e}}),pushDefaultMailBox=createAction(PUSH_DEFAULT_MAILBOX,function(e){return{payload:e}}),updateUnseenCount=createAction(UPDATE_UNSEEN_COUNT,function(e){return{payload:e}}),markAllNotificationsSeenRequest=createAction(MARK_ALL_NOTIFICATIONS_SEEN_REQUEST),markAllNotificationsSeenSuccess=createAction(MARK_ALL_NOTIFICATIONS_SEEN_SUCCESS),markAllNotificationsSeenFail=createAction(MARK_ALL_NOTIFICATIONS_SEEN_FAIL),subscribeDefaultMailboxRequest=createAction(SUBSCRIBE_DEFAULT_MAILBOX_REQUEST),initialState$9={mailBoxIds:[],mailbox:[],status:"idle",failureMessage:""},mailboxReducer=createReducer(initialState$9,e=>{e.addCase(subscriberStart,e=>Object.assign(Object.assign({},e),{status:"loading"})).addCase(subscriberSuccess,e=>Object.assign(Object.assign({},e),{status:"subscribing"})).addCase(setMailboxData,(e,t)=>Object.assign(Object.assign({},e),{mailbox:[...t.payload],mailBoxIds:[...t.payload.map(e=>e.id)]})).addCase(subscriberError,(e,t)=>Object.assign(Object.assign({},e),{status:"failure",failureMessage:t.payload})).addCase(updateUnseenCount,(e,n)=>Object.assign(Object.assign({},e),{mailbox:e.mailbox.map(t=>{var e;return Object.assign(Object.assign({},t),{unseenCount:null==(e=null==(e=n.payload.notificationMailboxes)?void 0:e.find(e=>e.id===t.id))?void 0:e.unseenCount})})})).addCase(markAllNotificationsSeenRequest,e=>Object.assign({},e)).addCase(markAllNotificationsSeenSuccess,e=>Object.assign(Object.assign({},e),{mailbox:e.mailbox.map(e=>Object.assign(Object.assign({},e),{unseenCount:0}))})).addCase(markAllNotificationsSeenFail,e=>Object.assign(Object.assign({},e),{status:"failure"}))});function __awaiter$5(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}const getMailboxApi=(e,t)=>__awaiter$5(void 0,void 0,void 0,function*(){try{return yield baseGraphQLApi({query:`
1079
1079
  {
1080
1080
  notificationMailboxes {
1081
1081
  id
@@ -1390,4 +1390,4 @@ createScheduledJob(input:{
1390
1390
  }
1391
1391
  }
1392
1392
  }
1393
- `,graphEndpoint:e,token:t})}catch(e){return{success:!1}}});function*getCurrentUserSaga(){var e=yield select(graphEndpointSelector),t=yield select(sessionTokenSelector),e=yield call$f(getCurrentUserApi,e,t);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)&&(null==(t=e.errors[0].path)||!t.includes("userSettings"))?console.error("getCurrentUser error"):(t=Object.assign(Object.assign({},null==(t=null==e?void 0:e.data)?void 0:t.me),{organizationRole:{organizationId:get$3(e,"data.me.organization.id","")},organization:Object.assign({},null==(e=null==(t=null==e?void 0:e.data)?void 0:t.me)?void 0:e.organization)}),yield put(getCurrentUserSuccess(t)))}function*getCurrentApplicationInfoSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=e.payload["applicationId"],e=yield call$f(getApplicationInfo,e,t,n);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)?console.error("getCurrentApplicationInfo error"):yield put(getCurrentAppIconSuccess(null==(n=null==(t=null==e?void 0:e.data)?void 0:t.application)?void 0:n.iconUrl))}function*userSaga(){yield all([takeEvery$1(GET_CURRENT_USER,getCurrentUserSaga)]),yield all([takeEvery$1(GET_CURRENT_APP_ICON,getCurrentApplicationInfoSaga)])}function*bootFunction(){yield take(BOOTED)}function*booting(){yield takeEvery$1(BOOTING,bootFunction)}function*logoutListener(e){for(var t=e.payload;;)yield take(logout),t?null!=t&&t():yield put(logoutUser$1())}function*notificationActionClickedSaga(e){const t=e.payload;yield takeEvery$1(onNotificationActionClicked,function*(e){t&&(yield call$f(t,e.payload))})}function*handleAppSwitchListenerSetup(e){const t=e.payload;yield takeEvery$1(appSwitcherHandleClick,function*(e){e=e.payload;t?t(e):yield put(appSwitcherHandleClickAppNatively(e))})}function*rootSaga(){yield all([fork(userSaga),fork(booting),takeLatest$1(listenLogout,logoutListener),takeLatest$1(appSwitcherSetupListener,handleAppSwitchListenerSetup),takeLatest$1(initNotificationAction,notificationActionClickedSaga)])}function getAppbarModule(){return{id:"os-app-bar",reducerMap:{[nameSpace$1]:userReducer},sagas:[rootSaga],initialActions:[]}}function App(e){var{onLogout:t,onClickNotificationAction:n,onAppSwitch:r,onClickOrgIcon:i,showNotifications:o,applicationId:a,searchBarMountId:s}=e,e=__rest(e,["onLogout","onClickNotificationAction","onAppSwitch","onShowSettingPanel","onClickOrgIcon","onClickHelpIcon","showNotifications","applicationId","searchBarMountId"]);const l=useDispatch(),[c,u]=react.exports.useState(!1),[d,p]=react.exports.useState(!1),[f,h]=react.exports.useState(!1),[m,g]=react.exports.useState(!1),[v,y]=react.exports.useState(!1),[x,b]=react.exports.useState(!1);var C=(useSelector(userSelector)||{})["currentUser"];const{panels:$=[]}=useSelector(rootSelector);var S=useSelector(unseenNotificationSelector);const w=useSelector(notificationStatusSelector);var E=useSelector(betaFeaturesSelector),C=(C||{})["organization"];const _=useSelector(authSelector)["user"];var{application:T=[]}=useSelector(applicationSelector)||{};const[j,I]=react.exports.useState(!1);const R=useSelector(appIdSelector),O=useSelector(selectApplicationConfig),[L,A]=react.exports.useState(!1);var N=useSelector(selectHasUserCreateRootFolderPermission);const P=gqlIntrospection.isOperationValid("fileApplication","mutation")&&N;function M(){u(!1),h(!1),g(!1),p(!1),y(!1),b(!1)}function k(){null!==$&&void 0!==$&&$.forEach(e=>{l(hidePanel$1(e.panelId))})}return react.exports.useEffect(()=>{var e,t=window.location["search"];l(actions$2.userApplicationSettings.fetchApplicationConfigStart({appId:R})),"?panel=invite-requests"!==t||j||(I(!0),t={name:"INVITE_REQUESTS_PANEL",config:{name:"Invite Requests"}},e={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"medium",zIndex:1001,parentPanelId:null,dimmed:0,dimmedStatus:"dimParent",header:{title:"INVITE REQUESTS"}},l(mountPanel$1({panelId:"INVITE_REQUESTS_PANEL",microFrontend:t,panelConfig:e})))},[]),react.exports.useEffect(()=>{null!==O&&void 0!==O&&O.length&&A(!0)},[O]),react.exports.useEffect(()=>{"success"===w&&l(markAllNotificationsSeenRequest())},[w,l]),react.exports.useEffect(()=>{l(getCurrentUser()),a&&l(getCurrentAppIcon({applicationId:a}))},[l,a]),react.exports.useEffect(()=>{l({type:listenLogout().type,payload:t})},[l,t]),react.exports.useEffect(()=>{n&&l(initNotificationAction(n))},[l,n]),react.exports.useEffect(()=>{l({type:appSwitcherSetupListener().type,payload:r})},[l,r]),react.exports.useEffect(()=>{l(onBooted())},[l]),react.exports.useEffect(()=>{$&&0!==$.length||M()},[$]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAppbarModule(),getAppbarPanelModule(),getNotificationModule$1(),getEventsModule(),getUserApplicationSettingsModule()]},{children:jsxRuntime.exports.jsx("div",Object.assign({className:"App",id:"aiware-app-bar","data-testid":"aiware-app-bar"},{children:jsxRuntime.exports.jsx(NewAppBar,Object.assign({isEnableOrgPanel:!1,onCloseSetting:function(){k()},onOpenSetting:function(){var e,t;c?(u(!1),k()):(M(),u(!0),k(),e={name:"APP_BAR_PANEL",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:VERITONE_PANEL_ID,type:"TAB_TEMPLATE",marginTop:55,withTab:!0,width:80,zIndex:1004,userRoles:null===_||void 0===_?void 0:_.roles,header:{divider:!0,title:""},footer:{logo:!0},size:"xlarge",fullScreen:!1},l(mountPanel$1({panelId:VERITONE_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenHelpCenter:function(){var e,t;d?(p(!1),k()):(M(),k(),p(!0),e={name:"HELP_PANEL",config:{name:"Help panel",dataId:"helpDataId",type:"SIMPLE_PANEL"}},t={panelId:HELP_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,size:"large",header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.headerTitle.helpCenter",defaultMessage:"Help Center",description:"The header title for the help center."}),actions:[{iconUrl:img$R,action:{type:"OPEN_HELP_LINK"}}]}},l(mountPanel$1({panelId:HELP_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenNotification:function(){var e,t;null!=o&&o(),v?(y(!1),k()):(M(),k(),y(!0),e={name:"NOTIFICATION_PANEL",config:{name:"Notification Panel",dataId:"notificationDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:413,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.panel.notifications",defaultMessage:"Notifications Center",description:"Title of the notifications center panel"}),actions:[]}},l(mountPanel$1({panelId:NOTIFICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenUserApplicationSettings:function(){var e,t;x?(b(!1),k()):(M(),k(),b(!0),e={name:"USER_APPLICATION_SETTINGS_PANEL",config:{name:"User application settings",dataId:"userApplicationSettingsDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:USER_APPLICATION_SETTINGS_PANEL,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:320,header:{divider:!1,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle.user-application-name-settings",defaultMessage:"Application Settings",description:"Title of user application name settings panel"})}},l(mountPanel$1({panelId:USER_APPLICATION_SETTINGS_PANEL,microFrontend:e,panelConfig:t})))},onDashboardClick:function(){console.log("HANDLE DASHBOARD CLICK!")},organization:C,onClickOrgIcon:function(){var e,t;null!=i&&i(),m?(g(!1),k()):(M(),k(),g(!0),e={name:"ORGANIZATION_PANEL",config:{name:"Veritone",tabId:TabId.ORGANIZATION_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:ORGANIZATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:420,header:{divider:!0,title:"ORGANIZATIONS"}},l(mountPanel$1({panelId:ORGANIZATION_PANEL_ID,microFrontend:e,panelConfig:t})))},panels:$,searchBarMountId:s,openSetting:{openHelpPanel:!1,openNotificationPanel:!1,openAppSwitchPanel:!1,openOrgSwitchPanel:!1,openVeritonePanel:!1,openUserApplicationSettingsPanel:!1},unseenCount:S,onClickAppSwitchIcon:function(){var e,t;f?(h(!1),k()):(M(),k(),h(!0),e={name:"APP_BAR_PANEL",config:{name:"APP_BAR_PANEL",tabId:TabId.APP_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:APPLICATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:720,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle-app-switcher",defaultMessage:"App Switcher",description:"Title of applications panel list"}),actions:P?[{action:{type:"user-app-group/createNewAppGroupPlaceholder"},label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header-action.new-app-group",defaultMessage:"New App Group",description:"New App Group action button"}),variant:"contained",size:"large",color:"primary",submit:!0}]:void 0}},l(mountPanel$1({panelId:APPLICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},applications:T,showDashboardIcon:E,userApplicationSettingsIcon:L},e))}))}))})})}const headerBarSelector=e=>null==e?void 0:e.aiWareHeaderBar,registry={[AvailableWidgets.APP_BAR]:App,[AvailableComponents.APP_BAR_PANEL]:SettingPanelComponent},registryLookup=n=>__awaiter$a(void 0,void 0,void 0,function*(){if(registry[n])return registry[n];let e,t=null;switch(n){case AvailableWidgets.SAMPLE_APP_BAR:e=yield import("./js-core.esm2.js"),t=e.SampleAppBar;break;case AvailableWidgets.RESET_PASSWORD:e=yield import("./js-core.esm4.js"),t=e.ResetPassword;break;case AvailableWidgets.FLOW_CENTER:e=yield import("./js-core.esm5.js"),t=e.App;break;case AvailableWidgets.FLOW_WIDGET:e=yield import("./js-core.esm7.js").then(function(e){return e.i}),t=e.App;break;case AvailableWidgets.ENGINE_CENTER_BROWSE:e=yield import("./js-core.esm19.js"),t=e.EngineCenterBrowse;break;case AvailablePanels.SIMPLE_PANEL:e=yield import("./js-core.esm38.js"),t=e.Panel;break;case AvailablePanels.APP_BAR_PANEL_TEMPLATE:e=yield import("./js-core.esm40.js"),t=e.AppbarPanel;break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=yield import("./js-core.esm40.js"),t=e.AppbarTabPanel;break;case AvailablePanels.TAB_TEMPLATE:e=yield import("./js-core.esm40.js"),t=e.TabPanel;break;case AvailableComponents.NOTIFICATION_PANEL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationPanel;break;case AvailableComponents.NOTIFICATION_DETAIL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationDetailPanel;break;case AvailableComponents.NOTIFICATION_SETTING:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationSetting;break;case AvailableComponents.NOTIFICATION_UTILITY:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationUtilityPanel;break;case AvailableComponents.NOTIFICATION_APPLICATION:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationApplication;break;case AvailableComponents.HELP_PANEL:e=yield Promise.resolve().then(function(){return index_esm}),t=e.HelpCenterPanel;break;case AvailableComponents.EDIT_PROFILE_PICTURE:e=yield Promise.resolve().then(function(){return index_esm$1}),t=e.EditProFilePicture;break;case AvailableComponents.TEST_COMPONENT:e=yield import("./js-core.esm38.js"),t=e.SamplePanel1;break;case AvailableComponents.TEST_COMPONENT2:e=yield import("./js-core.esm38.js"),t=e.SamplePanel2;break;case AvailableComponents.TEST_COMPONENT3:e=yield import("./js-core.esm38.js"),t=e.SamplePanel3;break;case AvailableComponents.SETTING_PREFERENCE:e=yield import("./js-core.esm44.js"),t=e.SettingsPreferencesPanel;break;case AvailableComponents.ORGANIZATION_PANEL:e=yield import("./js-core.esm41.js"),t=e.OrganizationPanel;break;case AvailableComponents.INVITE_USERS_PANEL:e=yield import("./js-core.esm41.js"),t=e.InviteUsersPanel;break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=yield import("./js-core.esm41.js"),t=e.InviteRequestsPanel;break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=yield import("./js-core.esm41.js"),t=e.ReviewRequestPanel;break;case AvailableComponents.ADD_APPLICATIONS:e=yield import("./js-core.esm41.js"),t=e.AddApplicationsPanel;break;case AvailableComponents.DATA_CENTER_BROWSE:e=yield import("./js-core.esm45.js"),t=e.DataCenterBrowse;break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=yield import("./js-core.esm45.js"),t=e.FoldersAndFilesPanel;break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=yield import("./js-core.esm45.js"),t=e.FileInfoPanel;break;case AvailableComponents.DATA_CENTER_IMPORTER:e=yield import("./js-core.esm55.js"),t=e.DataCenterImporter;break;case AvailableComponents.DATA_LABELER:e=yield import("./js-core.esm57.js"),t=e.DataLabelerPanel;break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=yield import("./js-core.esm58.js"),t=e.AdminCenterOpenId;break;case AvailableComponents.ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm59.js"),t=e.AdminCenterBrowse;break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=yield import("./js-core.esm64.js"),t=e.DataCenterProcessAI;break;case AvailableComponents.ENGINE_CENTER_NEW:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.EngineCenterNew;break;case AvailableComponents.ENGINE_CENTER_FILTER:e=yield import("./js-core.esm19.js"),t=e.EngineCenterFilter;break;case AvailableComponents.APP_CENTER_FILTER:e=yield import("./js-core.esm65.js"),t=e.AppCenterFilter;break;case AvailableComponents.ENGINE_CENTER_DETAILS:e=yield import("./js-core.esm19.js"),t=e.EngineDetails;break;case AvailableComponents.ENGINE_CENTER_NEW_BUILD:e=yield import("./js-core.esm19.js"),t=e.CreateNewBuildPanel;break;case AvailableComponents.ENGINE_CENTER_CUSTOM_FIELDS_FORM:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.EngineCenterCustomFieldsForm;break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.SchemasFormPanel;break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.InputTypeFlyout;break;case AvailableComponents.ENGINE_CENTER_EDIT_RELEASE_NOTES:e=yield import("./js-core.esm19.js"),t=e.EditReleaseNotes;break;case AvailableComponents.ENGINE_CENTER_VERSION_HISTORY_PANEL:e=yield import("./js-core.esm19.js"),t=e.VersionHistoryPanel;break;case AvailableComponents.SUPPORTED_FILE_TYPES:e=yield import("./js-core.esm55.js"),t=e.SupportedFileTypes;break;case AvailableComponents.EDIT_FILE_METADATA:e=yield import("./js-core.esm55.js"),t=e.EditFileMetadata;break;case AvailableWidgets.APP_CENTER_BROWSE:e=yield import("./js-core.esm65.js"),t=e.AppCenterBrowse;break;case AvailableComponents.APP_CENTER_NEW:e=yield import("./js-core.esm66.js"),t=e.AppCenterNew;break;case AvailableComponents.APP_CENTER_ADD_FLOW_PANEL:e=yield import("./js-core.esm66.js"),t=e.AppCenterAddFlowPanel;break;case AvailableComponents.APP_CENTER_ADD_SCHEMA_PANEL:e=yield import("./js-core.esm66.js"),t=e.AppCenterAddSchemaPanel;break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=yield import("./js-core.esm66.js"),t=e.AppCenterConfigFieldsForm;break;case AvailableComponents.APP_CENTER_CONTEXT_MENU_EXTENSIONS:e=yield import("./js-core.esm66.js"),t=e.AppCenterContextMenuExtensionPanel;break;case AvailableComponents.APP_CENTER_EVENT_PANEL:e=yield import("./js-core.esm66.js"),t=e.AppCenterEventPanel;break;case AvailableComponents.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL:e=yield import("./js-core.esm66.js"),t=e.AppCenterPaletteIntegrationPanel;break;case AvailableComponents.APP_CENTER_BROWSE:e=yield import("./js-core.esm65.js"),t=e.AppCenterBrowse;break;case AvailableComponents.APP_CENTER_DETAILS:e=yield import("./js-core.esm65.js"),t=e.AppCenterDetails;break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=yield import("./js-core.esm64.js"),t=e.DataCenterEngineSelection;break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=yield import("./js-core.esm52.js"),t=e.NewGroupPanel;break;case AvailableComponents.PERMISSIONS_PANEL:e=yield import("./js-core.esm47.js"),t=e.PermissionsPanel;break;case AvailableComponents.GROUP_INFO_PANEL:e=yield import("./js-core.esm47.js"),t=e.GroupInfoPanel;break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=yield import("./js-core.esm47.js"),t=e.NewPermissionSetPanel;break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=yield import("./js-core.esm47.js"),t=e.PermissionSetDetailsPanel;break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=yield import("./js-core.esm45.js"),t=e.MediaDetailsPanelIframe;break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=yield import("./js-core.esm45.js"),t=e.IngestionCreationPanel;break;case AvailableComponents.DATA_CENTER_SELECT_IMPORT_SOURCE:e=yield import("./js-core.esm45.js"),t=e.SelectImportSource;break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=yield import("./js-core.esm45.js"),t=e.SourceCreationPanel;break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=yield import("./js-core.esm52.js"),t=e.GroupDetailsPanel;break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=yield import("./js-core.esm52.js"),t=e.AddMemberPanel;break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=yield import("./js-core.esm60.js"),t=e.ApplicationDetailsPanel;break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=yield import("./js-core.esm67.js"),t=e.ProcessingCenterSources;break;case AvailableComponents.PROCESSING_CENTER_ERROR_DETAIL:e=yield import("./js-core.esm67.js"),t=e.ErrorDetailPanel;break;case AvailableComponents.USER_APPLICATION_SETTINGS_PANEL:e=yield Promise.resolve().then(function(){return index_esm$3}),t=e.UserApplicationSettingsPanel;break;case AvailableComponents.ADD_APPLICATION_USERS_PANEL:e=yield import("./js-core.esm60.js"),t=e.AddUsersPanel;break;case AvailableComponents.PROCESSING_CENTER_BROWSE:e=yield import("./js-core.esm70.js"),t=e.ProcessingCenterBrowse;break;case AvailableComponents.JOBS_TABLE_SETTINGS_PANEL:e=yield import("./js-core.esm71.js"),t=e.JobsTableSettingsPanel;break;case AvailableComponents.VERSION_PANEL:e=yield import("./js-core.esm40.js"),t=e.VersionPanel;break;case AvailableComponents.PROCESSING_CENTER_DAG_BUILDER:e=yield import("./js-core.esm73.js"),t=e.DagBuilder;break;case AvailableComponents.PROCESSING_CENTER_INGESTION:e=yield import("./js-core.esm74.js").then(function(e){return e.an}),t=e.ProcessingCenterIngestion;break;case AvailableComponents.PROCESSING_CENTER_ADVANCED_SETTINGS:e=yield import("./js-core.esm74.js").then(function(e){return e.an}),t=e.ProcessingCenterAdvancedSettings;break;case AvailableComponents.PROCESSING_CENTER_AFFILIATE_PANEL:e=yield import("./js-core.esm74.js").then(function(e){return e.an}),t=e.ProcessingCenterAffiliatePanel;break;case AvailableComponents.JOBS_DETAILS_PANEL:e=yield import("./js-core.esm71.js"),t=e.JobsDetailsPanel;break;case AvailableComponents.TASKS_TABLE_SETTINGS_PANEL:e=yield import("./js-core.esm72.js"),t=e.TasksTableSettingsPanel;break;case AvailableComponents.RESOURCE_CENTER_BROWSE:e=yield import("./js-core.esm75.js"),t=e.ResourceCenterBrowse;break;case AvailableComponents.PACKAGE_DETAILS_PANEL:e=yield import("./js-core.esm78.js"),t=e.PackageDetails;break;case AvailableComponents.INSTANCE_ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm79.js"),t=e.InstanceAdminCenterBrowse;break;case AvailableComponents.MANAGE_GRANTS:e=yield import("./js-core.esm78.js"),t=e.ManageGrantsPanel;break;case AvailableComponents.SCHEMA_DETAILS_PANEL:e=yield import("./js-core.esm80.js"),t=e.SchemaDetailsPanel;break;case AvailableComponents.USER_DETAILS_PANEL:e=yield import("./js-core.esm61.js"),t=e.UserDetailsPanel}return registry[n]=t}),registerComponent=(e,t)=>{registry[e]=t},WIDGETS_FEATURE_KEY="widgets",initialState$1=(!function(e){e.idle="idle",e.mounting="mounting",e.unmounting="unmounting",e.error="error",e.eventing="eventing"}(WidgetsStatus=WidgetsStatus||{}),{value:[],status:WidgetsStatus.idle}),widgetsSelector=e=>e[name].value,callWidgetOnComplete=(e,t)=>{e=e.find(e=>e.widgetName===t);null!=e&&e.onComplete&&e.onComplete()},{name,reducer,actions:{mountWidget:mountWidget$1,mountWidgetSuccess,mountWidgetError,unmountWidget:unmountWidget$1,unmountWidgetSuccess,unmountWidgetFailure,triggerWidgetCallback,triggerWidgetCallbackSuccess}}=createSlice({name:WIDGETS_FEATURE_KEY,initialState:initialState$1,reducers:{mountWidget:(e,t)=>{e.value.push(t.payload),e.status=WidgetsStatus.mounting},mountWidgetSuccess:e=>{e.status=WidgetsStatus.idle},mountWidgetError:e=>{e.status=WidgetsStatus.error},triggerWidgetCallback:(e,t)=>{e.status=WidgetsStatus.eventing},triggerWidgetCallbackSuccess:e=>{e.status=WidgetsStatus.idle},unmountWidget:(e,t)=>{e.status=WidgetsStatus.unmounting},unmountWidgetSuccess:(e,t)=>{e.value=e.value.filter(e=>e.widgetId!==t.payload),e.status=WidgetsStatus.idle},unmountWidgetFailure:e=>{e.status=WidgetsStatus.error}}});function*mountWidgetListenerSaga(){let a;const s={};yield takeEvery$1(mountWidget$1({}).type,function*(e){try{var{widgetConfig:t={},widgetName:n,elementId:r}=null==e?void 0:e.payload,i=(yield call$f(registryLookup,n))||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),o=getElement(r,n);o.classList.add("aiware-el"),s[r]?a=s[r]:(a=client$1.createRoot(o),s[r]=a),a.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(i,Object.assign({},t))}))})}))),yield put(mountWidgetSuccess())}catch(e){yield put(mountWidgetError())}}),yield takeEvery$1(e=>/\/booted$/.test(e.type),function*(e){var[e]=e.type.split("/");yield put(triggerWidgetCallback(e))}),yield takeEvery$1(unmountWidget$1("").type,function*(t){try{const e=yield select(e=>{return(null==(e=widgetsSelector(e).find(e=>e.widgetId===t.payload))?void 0:e.elementId)||""});setTimeout(()=>{s[e]&&s[e].unmount(),delete s[e]}),yield put(unmountWidgetSuccess(t.payload))}catch(e){yield put(unmountWidgetFailure())}}),yield takeEvery$1(triggerWidgetCallback("").type,function*(e){var t=yield select(widgetsSelector);callWidgetOnComplete(t,e.payload),yield put(triggerWidgetCallbackSuccess())})}function getWidgetsModule(){return{id:name,reducerMap:{[name]:reducer},sagas:[mountWidgetListenerSaga],initialActions:[]}}function getDataModule(){return{id:"data",reducerMap:{data:(e,{type:t,payload:n})=>{return t===setData({}).type?[...e.filter(e=>e.id!==n.id),n]:e||[]}},sagas:[],initialActions:[]}}const useStyles$2=makeStyles()(e=>({sdkSnackbarContainer:{"& svg":{fill:"white"}}}));function CustomSnackbar(){const n=useDispatch(),[e,t]=react.exports.useState([]),[r,i]=react.exports.useState(!1),[o,a]=react.exports.useState(void 0),{message:s,duration:l}=useSelector(snackbarSelector);var c=useStyles$2()["classes"],u=(react.exports.useEffect(()=>{null!==s&&void 0!==s&&s.content&&t(e=>[...e,s])},[s]),react.exports.useEffect(()=>{e.length&&!o?(a(Object.assign({},e[0])),t(e=>e.slice(1)),i(!0)):e.length&&o&&r&&(n(clearMessage()),i(!1))},[e,o,r,n]),(e,t)=>{"clickaway"!==t&&(i(!1),n(clearMessage()))});return jsxRuntime.exports.jsx(Snackbar$1,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:r,autoHideDuration:l||3e3,onClose:u,TransitionProps:{onExited:()=>{a(void 0),n(clearMessage())}},className:c.sdkSnackbarContainer,"data-snackbarid":(null===o||void 0===o?void 0:o.key)||"na","data-testid":"snackbar.message."+((null===o||void 0===o?void 0:o.severity)||"na")},{children:jsxRuntime.exports.jsx(Alert$1,Object.assign({onClose:u,severity:null===o||void 0===o?void 0:o.severity,elevation:6,variant:"filled"},{children:null===o||void 0===o?void 0:o.content}))}),o?o.key:void 0)}function validateConfig(e){return e.applicationId||console.info("@aiware/js: applicationId is required. Go to developer app to find your application id."),e.baseUrl||console.info("@aiware/js: baseUrl is required. It defaults to the US Commercial environment which is https://api.us-1.veritone.com/v3/graphql"),!0}const ID="openSupportChatButton",DATA_ATTR="open-support-chat-button";var SupportCenterPixel=()=>jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsx("div",{id:ID,"data-veritone-element":DATA_ATTR,style:{width:1,height:1,position:"fixed",right:55,bottom:20}})});const nameSpace="@helpPanel",updateSelectedTab=createAction(nameSpace+"/UPDATE_SELECTED_TAB",function(e,t){return{payload:{selectedTabId:e,tabLink:t}}}),setCustomKnowledgeBaseUrl=createAction(nameSpace+"/SET_CUSTOM_KNOWLEDGE_BASE_URL",function(e){return{payload:{url:e}}}),setCustomDocsUrl=createAction(nameSpace+"/SET_CUSTOM_DOCS_URL",function(e){return{payload:{url:e}}}),initialState={selectedTabId:0,tabLink:"https://support.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState,e=>{e.addCase(updateSelectedTab,(e,t)=>Object.assign(Object.assign({},e),{tabLink:t.payload.tabLink,selectedTabId:t.payload.selectedTabId})),e.addCase(setCustomKnowledgeBaseUrl,(e,t)=>Object.assign(Object.assign({},e),{customKnowledgeBaseUrl:t.payload.url})),e.addCase(setCustomDocsUrl,(e,t)=>Object.assign(Object.assign({},e),{customDocsUrl:t.payload.url}))});function*helpSaga(){yield takeEvery$1("OPEN_HELP_LINK",function*(){var e=yield select(e=>e.helpPanel.tabLink);yield put(openLinkOnNewTab({url:e}))})}const namespace="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace]?e[namespace].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace]:getTabLinkReducer},sagas:[helpSaga],initialActions:[]}}var knowledgeBaseUrl$1="https://docs.veritone.com/help/index.html",documentUrl$1="https://docs.veritone.com",config={knowledgeBaseUrl:knowledgeBaseUrl$1,documentUrl:documentUrl$1};const useStyles$1=makeStyles()(e=>({root:{height:"calc(100% - 110px)",textAlign:"left","& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},tabs:{padding:e.spacing(2.4,6,0,6)},tabPanels:{width:"100%",height:"100%"},aiWareIcon:{position:"relative",maxHeight:50,opacity:"inherit",padding:e.spacing(4,3.2,0,3.2),display:"flex",justifyContent:"flex-end"},customTabs:{margin:e.spacing(0,4)},kbRoot:{height:"100%",textAlign:"left"},loadingContainer:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white"},kbToolBarBox:{padding:e.spacing(6,6,1.6,6)},kbTabContent:{height:"calc(100% - 92px)"},kbTabPanel:{padding:e.spacing(6)},dRoot:{height:"100%",width:"100%"},dNavBar:{height:"100%",overflow:"hidden",background:"#F4F4F4"},dTitle:{color:"#2A323C",fontWeight:600,fontSize:"18px",lineHeight:"24px",padding:e.spacing(3.2)},dContent:{height:"100%",width:"100%",position:"relative"},dMenu:{overflowY:"auto",height:"calc(100% - 52px)"},drawerContainer:{display:"flex",height:"100%",background:e.palette.background.default},tabContainer:{borderRight:"0.5px solid #D5DFE9",overflow:"hidden",height:"100%",width:"100%"},tabName:{borderBottom:"0.5px solid #D5DFE9",display:"flex",justifyContent:"space-between",alignItems:"center",height:"64px",padding:e.spacing(0,6)},actionIcons:{margin:e.spacing(-2.4)},tabContent:{height:"calc(100vh - 57px - 60px)",overflowY:"auto",overflowX:"hidden"}})),documentUrl=config.documentUrl,Documentation=({path:e=documentUrl})=>{var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(t.dRoot,"hide-in-percy")},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"docs-iframe",title:"Document Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){setTimeout(()=>{r(!1)},1e3)}})]}))},knowledgeBaseUrl=config["knowledgeBaseUrl"];function Knowledgebase({path:e=knowledgeBaseUrl}){var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.kbRoot},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"knowledgebase-iframe",title:"Knowledgebase Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){r(!1)}})]}))}const defaultLocale="en-us",tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.au1+VZ",defaultMessage:"Knowledgebase",description:"Help Panel: Knowledgebase tab label"}),disabled:!1,url:"https://support.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(){var e=useSelector(initialConfigSelector),t=useSelector(customKnowledgeBaseUrlSelector),n=useSelector(customDocsUrlSelector),r=useSelector(helpCenterSelectedTabIdSelector),i=useSelector(e=>null==e?void 0:e.panels),o=useStyles$1()["classes"],[a]=react.exports.useState(defaultLocale);const s=useDispatch();i=null==i?void 0:i.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),t=i&&t?t:e.knowledgeBaseURL,i=i&&n?n:e.docsURL;return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:a},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:o.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:r,onChangeTab:e=>{s(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:t})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:i})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$z,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var index_esm=Object.freeze({__proto__:null,HelpCenterPanel:HelpCenter,customDocsUrlSelector:customDocsUrlSelector,customKnowledgeBaseUrlSelector:customKnowledgeBaseUrlSelector,helpCenterSelectedTabIdSelector:helpCenterSelectedTabIdSelector,setCustomDocsUrl:setCustomDocsUrl,setCustomKnowledgeBaseUrl:setCustomKnowledgeBaseUrl,updateSelectedTab:updateSelectedTab});const useStyles=makeStyles()(()=>({dialog:{top:"125px",overflowX:"hidden",overflowY:"hidden",display:"flex",alignItems:"center",flexDirection:"column"},container:{borderRadius:"4px",backgroundColor:"#fff",width:"430px",overflow:"hidden",outline:0,boxShadow:"0px 0px 7px rgba(0, 0, 0, .25)"},header:{textTransform:"capitalize"},appListContainer:{width:"100%"},orgName:{fontWeight:"bold"}})),ApplicationDialog=()=>{const[e,t]=react.exports.useState(null),[n,r]=react.exports.useState(0);var i=useSelector(userSelector$2),o=useStyles()["classes"];const a=useSelector(initialConfigSelector),s=a.applicationId,l=useSelector(applicationSelector),c=useSelector(switchApiSelector);var u=(null===l||void 0===l?void 0:l.application)||[],d=null===l||void 0===l?void 0:l.status;var p=[...u].sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),f=u.findIndex(e=>e.id===s);useInterval(()=>{t(e=>e&&e-1)},e&&n<3?1e3:null),react.exports.useEffect(()=>{"success"!==(null===l||void 0===l?void 0:l.status)||1!==(null===l||void 0===l?void 0:l.application.length)||(null===l||void 0===l?void 0:l.application[0].id)===a.applicationId||e||(0===e?window.open(c+"/"+(null===l||void 0===l?void 0:l.application[0].id),"_self"):t(10))},[a,l,c,e]);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s)&&f<0&&"success"===d?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:o.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:o.header,variant:"h1",sx:{px:"30px",pt:"30px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-title",defaultMessage:"Application Not Available",description:"Title for modal"})})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"10px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message1",defaultMessage:"Looks like you switched organizations, your current application is not available in the current",description:"Description current application not available"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:o.orgName},{children:null!=(f=null==i?void 0:i.organization)&&f.organizationName?i.organization.organizationName:""}))," ",jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message2",defaultMessage:"organization you are viewing.",description:"Description current application not available"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message3",defaultMessage:"Please select from the available applications below to be redirected.",description:"Instructions for current application not available"})})),e&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"},onClick:()=>{r(e=>e+1)}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-countdown-message",defaultMessage:"You will be automatically forwarded to {appName} in {timeRemaining} seconds.",description:"Instructions for current application not available",values:{timeRemaining:e,appName:u[0].name}})})),jsxRuntime.exports.jsx("div",Object.assign({className:o.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(c+"/"+e,"_self")},applications:p,useGrid:!1,row:3})}))]}))})):null};class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}const rateLimiter=new RateLimiter;function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$4.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$4.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$4.dispatch(logout())},1e3)):store$4.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$4.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsxs(AIWareThemeProvider,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})}))),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$4.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$4.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$4.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$4.addModule(r),n},unmountPanel=e=>(store$4.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$4.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$4.dispatch(unmountAllPanel$1(""))};function init(e,t){validateConfig(e)&&store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{onComplete:t})))}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$4),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$4,window.aiWare_theme={darkTheme:darkTheme,lightTheme:lightTheme}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$4,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,version:"sdk_release_version",commit:"457c283d9",releaseDate:"sdk_release_date"});export{ListItem$1 as $,AIWareIntlProvider as A,Box$1 as B,interopRequireDefault as C,createAction as D,createReducer as E,FormattedMessage$1 as F,Grid$1 as G,createSlice as H,ENGINE_OWNER_TYPES as I,ENGINE_FILTER_TYPES as J,DynamicModuleLoader as K,LoadingButton$1 as L,preferredLanguageSelector as M,baseUrlSelector as N,rootApiSelector as O,Provider$2 as P,sessionTokenSelector as Q,graphEndpointSelector as R,Switch$1 as S,Typography$1 as T,controllerNodeRedImageSelector as U,controllerUrlSelector as V,automateControllerUrlSelector as W,automateUrlSelector as X,Portal$1 as Y,List$2 as Z,_extends as _,generateUtilityClasses as a,deleteEngine as a$,ListItemIcon$1 as a0,ListItemText$1 as a1,all as a2,img$n as a3,img$o as a4,img$q as a5,img$r as a6,Divider$1 as a7,Tooltip$1 as a8,IconButton$1 as a9,DialogTitle$1 as aA,DialogContent$1 as aB,DialogActions$1 as aC,TableContainer$1 as aD,Table$1 as aE,TableHead$1 as aF,TableRow$1 as aG,TableCell$1 as aH,TableSortLabel$1 as aI,TableBody$1 as aJ,img$g as aK,Popper$1 as aL,ClickAwayListener as aM,Fade$1 as aN,img$s as aO,img$p as aP,img$P as aQ,img$B as aR,Select$1 as aS,MenuItem$1 as aT,Snackbar$1 as aU,default_1 as aV,img$i as aW,img$k as aX,img$T as aY,Tabs$1 as aZ,Tab$1 as a_,img$h as aa,img$F as ab,Skeleton$1 as ac,takeLatest$1 as ad,fetchAllTags as ae,put as af,select as ag,fetchFlows as ah,call$f as ai,fetchTemplateGallery as aj,isRevisionsExistOnServerRequest as ak,FormLabel$1 as al,default_1$5 as am,FormGroup$1 as an,FormControlLabel$1 as ao,Checkbox$1 as ap,fetchTemplateGalleryFallback as aq,Button$1 as ar,Card$1 as as,img$l as at,flowStyles as au,NoResults as av,CircularProgress$1 as aw,img$b as ax,setApiEndpoint as ay,Dialog$1 as az,styled$1 as b,_createCompounder as b$,img$j as b0,AIWareFormatMessage as b1,FormattedDate as b2,fetchVeritoneGraphQLApi as b3,useTheme as b4,KeyboardArrowRight as b5,KeyboardArrowLeft as b6,useId as b7,InputUnstyled as b8,isHostComponent as b9,img$c as bA,isEmpty_1 as bB,Backdrop$1 as bC,getDefaultMiddleware as bD,isNil_1 as bE,UpDown as bF,Icon$1 as bG,get_1 as bH,map_1 as bI,keys_1 as bJ,RadioGroup$1 as bK,Avatar$1 as bL,img$v as bM,baseGraphQLApi as bN,FormHelperText$2 as bO,img$f as bP,StyledEngineProvider as bQ,ThemeProvider as bR,lightTheme as bS,CssBaseline as bT,Hide as bU,showMessage as bV,MessageSeverity as bW,Radio$2 as bX,fetchEngine as bY,createSvgIcon$2 as bZ,_hasPath as b_,getDefaultExportFromNamespaceIfNotNamed as ba,commonjsRequire as bb,_typeof$4 as bc,_inheritsLoose$2 as bd,_assertThisInitialized$1 as be,React as bf,hoistNonReactStatics_cjs as bg,_defineProperty$1 as bh,reactDom as bi,Transition$1 as bj,__awaiter$a as bk,__generator$2 as bl,__spread as bm,TransitionGroup$1 as bn,connect$1 as bo,Bookmark as bp,EngineFlagIcons as bq,createAsyncThunk as br,withStyles as bs,getConfigModule as bt,getAuthModule as bu,getSnackbarModule as bv,CacheProvider as bw,muiCache as bx,img$Q as by,img$d as bz,Paper$1 as c,useIntl as c$,_baseIteratee as c0,isArrayLike_1 as c1,toInteger_1 as c2,_toPropertyKey as c3,_setPrototypeOf$3 as c4,commonjsGlobal$1 as c5,combineReducers as c6,createSelector$1 as c7,fork as c8,AIWareThemeProvider as c9,Add as cA,ExpandLess as cB,ExpandMore as cC,Collapse$1 as cD,img$15 as cE,Filter$1 as cF,DynamicTable as cG,useTheme$2 as cH,getThemeProps as cI,useEnhancedEffect$1 as cJ,React$1 as cK,_arrayPush as cL,isArray_1 as cM,_baseToString as cN,_baseTrim as cO,_castSlice as cP,_stringToArray as cQ,toString_1 as cR,ReactIs as cS,upperFirst_1 as cT,isString_1 as cU,_baseGet as cV,_baseSlice as cW,_castPath as cX,_toKey as cY,_isIndex as cZ,channel$1 as c_,Stack$4 as ca,Close$1 as cb,FullscreenExit as cc,Fullscreen as cd,TabPanel as ce,default_1$2 as cf,InputAdornment$1 as cg,unmountPanel$1 as ch,AvailableComponents as ci,delay$1 as cj,hidePanel$1 as ck,mountPanel$1 as cl,DialogContentText$1 as cm,userSelector$2 as cn,MoreVert as co,Menu$1 as cp,Edit as cq,Upload as cr,Delete as cs,CustomTabs as ct,useBackupImg as cu,img$1y as cv,validate as cw,configSelector as cx,baseGraphQLApiWithError as cy,VerifiedFilled as cz,capitalize$2 as d,_Symbol as d$,VideoCamera as d0,Image$1 as d1,Sound as d2,Description as d3,toNumber_1 as d4,ProgressStepper as d5,size_1 as d6,take as d7,CurlyBraces as d8,UnknownDocument as d9,_baseEach as dA,_arrayFilter as dB,_getNative as dC,eq_1 as dD,_root as dE,_Uint8Array as dF,_overArg as dG,_isPrototype as dH,isObjectLike_1 as dI,_baseGetTag as dJ,_arrayLikeKeys as dK,isArguments_1 as dL,isBuffer$3 as dM,isFunction_1 as dN,isTypedArray_1 as dO,_Stack as dP,_baseFor as dQ,identity_1 as dR,_isIterateeCall as dS,isSymbol_1 as dT,_baseMap as dU,_baseUnary as dV,deepmerge as dW,useTheme$3 as dX,memoizeOne as dY,isPlainObject$1 as dZ,styled$2 as d_,sdkEventManager as da,SdkEvents as db,SdkError as dc,EngineClassIcons as dd,Mode2 as de,EngineModeIcons as df,DeploymentModelIcons as dg,guid as dh,EditList as di,forceReflow as dj,getDefaultExportFromCjs as dk,alpha as dl,useControlled as dm,useEventCallback as dn,ButtonBase$1 as dp,useForkRef as dq,setRef as dr,inputClasses$1 as ds,inputBaseClasses$1 as dt,outlinedInputClasses$1 as du,filledInputClasses$1 as dv,ClearIcon as dw,ArrowDropDownIcon as dx,isObject_1 as dy,_arrayMap as dz,_objectWithoutPropertiesLoose$2 as e,img$1s as e$,_Set as e0,_setToArray as e1,_SetCache as e2,_cacheHas as e3,Slide$1 as e4,updatePanelMicroFrontendProps as e5,setData as e6,useIsFocusVisible as e7,ownerDocument as e8,appendOwnerState as e9,enableBetaFeatures as eA,Badge$1 as eB,openLinkOnNewTab as eC,orange$1 as eD,deepOrange$1 as eE,authSelector as eF,headerBarSelector as eG,getSortName as eH,img$8 as eI,InputLabel$1 as eJ,ListItemAvatar$1 as eK,OrganizationTabIcon as eL,ScopedCssBaseline$1 as eM,AlarmTwo as eN,getApplicationsApi as eO,ListItemSecondaryAction$1 as eP,updateTokenSuccess as eQ,postNotificationCommand as eR,aiwareEvent as eS,notificationCommands as eT,panelsSelector as eU,css as eV,avatarClasses as eW,img$M as eX,img$L as eY,img$1u as eZ,img$1t as e_,lighten as ea,darken as eb,slotShouldForwardProp as ec,shouldSpreadAdditionalProps$1 as ed,keyframes as ee,img$1v as ef,createTheme$1 as eg,injectIntl as eh,TabId as ei,PersonalProfile$1 as ej,Organizations as ek,DataCenter as el,Process as em,FlowCenter2 as en,DeveloperCenter as eo,Marketplace$1 as ep,LibraryCenter as eq,AdminCenter as er,AdminTabIcon as es,Resources$1 as et,DagBuilder as eu,img$S as ev,selectIsSuperAdmin as ew,img$4 as ex,img$z as ey,takeEvery$1 as ez,clsx as f,ConfirmationModal as f$,img$J as f0,img$1w as f1,img$I as f2,emphasize as f3,_arraySome as f4,ErrorBoundary$1 as f5,Information as f6,NewFolder as f7,SpecialFolder as f8,User as f9,FilterRemove as fA,CheckCircle as fB,FolderOpen as fC,Voice as fD,useDoubleClick as fE,FolderFilled as fF,Time as fG,img$x as fH,Undefined as fI,YoutubeSource as fJ,PodcastSource as fK,TVSource as fL,RadioSource as fM,selectOrgId as fN,selectIsUserAdmin as fO,ErrorState$1 as fP,StepConnector$1 as fQ,NullState$2 as fR,Group as fS,gqlIntrospection as fT,PermissionChangedAction as fU,Lock as fV,AddGroup as fW,StepperContext$1 as fX,StepContext$1 as fY,SvgIcon$1 as fZ,initialConfigSelector as f_,Source as fa,Search$1 as fb,selectIsOLPEnabled as fc,getLibraryModule as fd,selectApiConfigs$1 as fe,FullScreenContainer as ff,betaFeaturesSelector as fg,cmsUrlSelector as fh,UserAddFilled as fi,Popover$1 as fj,MenuList$1 as fk,MoveFolder as fl,Download as fm,img$9 as fn,selectPanelByPanelName as fo,EngineCategoryIcons as fp,Settings$2 as fq,Hamburger as fr,List as fs,EditAttributes as ft,MoreHor as fu,img$u as fv,img$w as fw,img$3 as fx,selectUserOrgEdgeVersion as fy,ProcessingDetail as fz,generateUtilityClass as g,unmountAllPanel as g$,EnumHelpers as g0,formatBytes as g1,NotInterested as g2,mountPanelForResponse$1 as g3,Users as g4,ApplicationTabIcon as g5,SecurityGroup as g6,NoApps as g7,green$1 as g8,md5 as g9,FormattedRelativeTime$1 as gA,Folder as gB,Hidden as gC,ArrowUp as gD,ArrowDown as gE,toFinite_1 as gF,_baseForOwn as gG,_arrayReduce as gH,hasIn_1 as gI,useSyncExternalStoreExports as gJ,Packages as gK,Engines as gL,PackagesAvatar as gM,actionChannel as gN,cancelled as gO,flush$3 as gP,cancel as gQ,tabsClasses$1 as gR,registry as gS,registerComponent as gT,AvailableWidgets as gU,root as gV,mountWidget as gW,unmountWidget as gX,mountPanel as gY,unmountPanel as gZ,hidePanel as g_,AddUser as ga,selectors as gb,LibraryDropdown as gc,Remove as gd,Save as ge,Input$3 as gf,Copy as gg,ArrowForward as gh,Modal$1 as gi,_baseIsEqual as gj,OutlinedInput$1 as gk,_getSymbols as gl,stubArray_1 as gm,_baseGetAllKeys as gn,_getTag as go,_nodeUtil as gp,_getAllKeys as gq,_castFunction as gr,Article as gs,Task as gt,View as gu,_objectSpread2 as gv,serialize$1 as gw,stringify$4 as gx,compile$1 as gy,Check as gz,composeClasses as h,init as h0,useDispatch as i,jsxRuntime as j,useSelector as k,authStatusSelector as l,makeStyles as m,authContextSelector as n,AuthContext as o,lodash as p,Alert$1 as q,react as r,store$4 as s,authErrorMessage as t,useThemeProps as u,FormControl$1 as v,TextField$1 as w,classNames as x,resetPasswordRequest as y,createSvgIcon$1 as z};
1393
+ `,graphEndpoint:e,token:t})}catch(e){return{success:!1}}});function*getCurrentUserSaga(){var e=yield select(graphEndpointSelector),t=yield select(sessionTokenSelector),e=yield call$f(getCurrentUserApi,e,t);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)&&(null==(t=e.errors[0].path)||!t.includes("userSettings"))?console.error("getCurrentUser error"):(t=Object.assign(Object.assign({},null==(t=null==e?void 0:e.data)?void 0:t.me),{organizationRole:{organizationId:get$3(e,"data.me.organization.id","")},organization:Object.assign({},null==(e=null==(t=null==e?void 0:e.data)?void 0:t.me)?void 0:e.organization)}),yield put(getCurrentUserSuccess(t)))}function*getCurrentApplicationInfoSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=e.payload["applicationId"],e=yield call$f(getApplicationInfo,e,t,n);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)?console.error("getCurrentApplicationInfo error"):yield put(getCurrentAppIconSuccess(null==(n=null==(t=null==e?void 0:e.data)?void 0:t.application)?void 0:n.iconUrl))}function*userSaga(){yield all([takeEvery$1(GET_CURRENT_USER,getCurrentUserSaga)]),yield all([takeEvery$1(GET_CURRENT_APP_ICON,getCurrentApplicationInfoSaga)])}function*bootFunction(){yield take(BOOTED)}function*booting(){yield takeEvery$1(BOOTING,bootFunction)}function*logoutListener(e){for(var t=e.payload;;)yield take(logout),t?null!=t&&t():yield put(logoutUser$1())}function*notificationActionClickedSaga(e){const t=e.payload;yield takeEvery$1(onNotificationActionClicked,function*(e){t&&(yield call$f(t,e.payload))})}function*handleAppSwitchListenerSetup(e){const t=e.payload;yield takeEvery$1(appSwitcherHandleClick,function*(e){e=e.payload;t?t(e):yield put(appSwitcherHandleClickAppNatively(e))})}function*rootSaga(){yield all([fork(userSaga),fork(booting),takeLatest$1(listenLogout,logoutListener),takeLatest$1(appSwitcherSetupListener,handleAppSwitchListenerSetup),takeLatest$1(initNotificationAction,notificationActionClickedSaga)])}function getAppbarModule(){return{id:"os-app-bar",reducerMap:{[nameSpace$1]:userReducer},sagas:[rootSaga],initialActions:[]}}function App(e){var{onLogout:t,onClickNotificationAction:n,onAppSwitch:r,onClickOrgIcon:i,showNotifications:o,applicationId:a,searchBarMountId:s}=e,e=__rest(e,["onLogout","onClickNotificationAction","onAppSwitch","onShowSettingPanel","onClickOrgIcon","onClickHelpIcon","showNotifications","applicationId","searchBarMountId"]);const l=useDispatch(),[c,u]=react.exports.useState(!1),[d,p]=react.exports.useState(!1),[f,h]=react.exports.useState(!1),[m,g]=react.exports.useState(!1),[v,y]=react.exports.useState(!1),[x,b]=react.exports.useState(!1);var C=(useSelector(userSelector)||{})["currentUser"];const{panels:$=[]}=useSelector(rootSelector);var S=useSelector(unseenNotificationSelector);const w=useSelector(notificationStatusSelector);var E=useSelector(betaFeaturesSelector),C=(C||{})["organization"];const _=useSelector(authSelector)["user"];var{application:T=[]}=useSelector(applicationSelector)||{};const[j,I]=react.exports.useState(!1);const R=useSelector(appIdSelector),O=useSelector(selectApplicationConfig),[L,A]=react.exports.useState(!1);var N=useSelector(selectHasUserCreateRootFolderPermission);const P=gqlIntrospection.isOperationValid("fileApplication","mutation")&&N;function M(){u(!1),h(!1),g(!1),p(!1),y(!1),b(!1)}function k(){null!==$&&void 0!==$&&$.forEach(e=>{l(hidePanel$1(e.panelId))})}return react.exports.useEffect(()=>{var e,t=window.location["search"];l(actions$2.userApplicationSettings.fetchApplicationConfigStart({appId:R})),"?panel=invite-requests"!==t||j||(I(!0),t={name:"INVITE_REQUESTS_PANEL",config:{name:"Invite Requests"}},e={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"medium",zIndex:1001,parentPanelId:null,dimmed:0,dimmedStatus:"dimParent",header:{title:"INVITE REQUESTS"}},l(mountPanel$1({panelId:"INVITE_REQUESTS_PANEL",microFrontend:t,panelConfig:e})))},[]),react.exports.useEffect(()=>{null!==O&&void 0!==O&&O.length&&A(!0)},[O]),react.exports.useEffect(()=>{"success"===w&&l(markAllNotificationsSeenRequest())},[w,l]),react.exports.useEffect(()=>{l(getCurrentUser()),a&&l(getCurrentAppIcon({applicationId:a}))},[l,a]),react.exports.useEffect(()=>{l({type:listenLogout().type,payload:t})},[l,t]),react.exports.useEffect(()=>{n&&l(initNotificationAction(n))},[l,n]),react.exports.useEffect(()=>{l({type:appSwitcherSetupListener().type,payload:r})},[l,r]),react.exports.useEffect(()=>{l(onBooted())},[l]),react.exports.useEffect(()=>{$&&0!==$.length||M()},[$]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAppbarModule(),getAppbarPanelModule(),getNotificationModule$1(),getEventsModule(),getUserApplicationSettingsModule()]},{children:jsxRuntime.exports.jsx("div",Object.assign({className:"App",id:"aiware-app-bar","data-testid":"aiware-app-bar"},{children:jsxRuntime.exports.jsx(NewAppBar,Object.assign({isEnableOrgPanel:!1,onCloseSetting:function(){k()},onOpenSetting:function(){var e,t;c?(u(!1),k()):(M(),u(!0),k(),e={name:"APP_BAR_PANEL",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:VERITONE_PANEL_ID,type:"TAB_TEMPLATE",marginTop:55,withTab:!0,width:80,zIndex:1004,userRoles:null===_||void 0===_?void 0:_.roles,header:{divider:!0,title:""},footer:{logo:!0},size:"xlarge",fullScreen:!1},l(mountPanel$1({panelId:VERITONE_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenHelpCenter:function(){var e,t;d?(p(!1),k()):(M(),k(),p(!0),e={name:"HELP_PANEL",config:{name:"Help panel",dataId:"helpDataId",type:"SIMPLE_PANEL"}},t={panelId:HELP_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,size:"large",header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.headerTitle.helpCenter",defaultMessage:"Help Center",description:"The header title for the help center."}),actions:[{iconUrl:img$R,action:{type:"OPEN_HELP_LINK"}}]}},l(mountPanel$1({panelId:HELP_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenNotification:function(){var e,t;null!=o&&o(),v?(y(!1),k()):(M(),k(),y(!0),e={name:"NOTIFICATION_PANEL",config:{name:"Notification Panel",dataId:"notificationDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:413,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.panel.notifications",defaultMessage:"Notifications Center",description:"Title of the notifications center panel"}),actions:[]}},l(mountPanel$1({panelId:NOTIFICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenUserApplicationSettings:function(){var e,t;x?(b(!1),k()):(M(),k(),b(!0),e={name:"USER_APPLICATION_SETTINGS_PANEL",config:{name:"User application settings",dataId:"userApplicationSettingsDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:USER_APPLICATION_SETTINGS_PANEL,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:320,header:{divider:!1,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle.user-application-name-settings",defaultMessage:"Application Settings",description:"Title of user application name settings panel"})}},l(mountPanel$1({panelId:USER_APPLICATION_SETTINGS_PANEL,microFrontend:e,panelConfig:t})))},onDashboardClick:function(){console.log("HANDLE DASHBOARD CLICK!")},organization:C,onClickOrgIcon:function(){var e,t;null!=i&&i(),m?(g(!1),k()):(M(),k(),g(!0),e={name:"ORGANIZATION_PANEL",config:{name:"Veritone",tabId:TabId.ORGANIZATION_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:ORGANIZATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:420,header:{divider:!0,title:"ORGANIZATIONS"}},l(mountPanel$1({panelId:ORGANIZATION_PANEL_ID,microFrontend:e,panelConfig:t})))},panels:$,searchBarMountId:s,openSetting:{openHelpPanel:!1,openNotificationPanel:!1,openAppSwitchPanel:!1,openOrgSwitchPanel:!1,openVeritonePanel:!1,openUserApplicationSettingsPanel:!1},unseenCount:S,onClickAppSwitchIcon:function(){var e,t;f?(h(!1),k()):(M(),k(),h(!0),e={name:"APP_BAR_PANEL",config:{name:"APP_BAR_PANEL",tabId:TabId.APP_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:APPLICATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:720,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle-app-switcher",defaultMessage:"App Switcher",description:"Title of applications panel list"}),actions:P?[{action:{type:"user-app-group/createNewAppGroupPlaceholder"},label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header-action.new-app-group",defaultMessage:"New App Group",description:"New App Group action button"}),variant:"contained",size:"large",color:"primary",submit:!0}]:void 0}},l(mountPanel$1({panelId:APPLICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},applications:T,showDashboardIcon:E,userApplicationSettingsIcon:L},e))}))}))})})}const headerBarSelector=e=>null==e?void 0:e.aiWareHeaderBar,registry={[AvailableWidgets.APP_BAR]:App,[AvailableComponents.APP_BAR_PANEL]:SettingPanelComponent},registryLookup=n=>__awaiter$a(void 0,void 0,void 0,function*(){if(registry[n])return registry[n];let e,t=null;switch(n){case AvailableWidgets.SAMPLE_APP_BAR:e=yield import("./js-core.esm2.js"),t=e.SampleAppBar;break;case AvailableWidgets.RESET_PASSWORD:e=yield import("./js-core.esm4.js"),t=e.ResetPassword;break;case AvailableWidgets.FLOW_CENTER:e=yield import("./js-core.esm5.js"),t=e.App;break;case AvailableWidgets.FLOW_WIDGET:e=yield import("./js-core.esm7.js").then(function(e){return e.i}),t=e.App;break;case AvailableWidgets.ENGINE_CENTER_BROWSE:e=yield import("./js-core.esm19.js"),t=e.EngineCenterBrowse;break;case AvailablePanels.SIMPLE_PANEL:e=yield import("./js-core.esm38.js"),t=e.Panel;break;case AvailablePanels.APP_BAR_PANEL_TEMPLATE:e=yield import("./js-core.esm40.js"),t=e.AppbarPanel;break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=yield import("./js-core.esm40.js"),t=e.AppbarTabPanel;break;case AvailablePanels.TAB_TEMPLATE:e=yield import("./js-core.esm40.js"),t=e.TabPanel;break;case AvailableComponents.NOTIFICATION_PANEL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationPanel;break;case AvailableComponents.NOTIFICATION_DETAIL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationDetailPanel;break;case AvailableComponents.NOTIFICATION_SETTING:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationSetting;break;case AvailableComponents.NOTIFICATION_UTILITY:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationUtilityPanel;break;case AvailableComponents.NOTIFICATION_APPLICATION:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationApplication;break;case AvailableComponents.HELP_PANEL:e=yield Promise.resolve().then(function(){return index_esm}),t=e.HelpCenterPanel;break;case AvailableComponents.EDIT_PROFILE_PICTURE:e=yield Promise.resolve().then(function(){return index_esm$1}),t=e.EditProFilePicture;break;case AvailableComponents.TEST_COMPONENT:e=yield import("./js-core.esm38.js"),t=e.SamplePanel1;break;case AvailableComponents.TEST_COMPONENT2:e=yield import("./js-core.esm38.js"),t=e.SamplePanel2;break;case AvailableComponents.TEST_COMPONENT3:e=yield import("./js-core.esm38.js"),t=e.SamplePanel3;break;case AvailableComponents.SETTING_PREFERENCE:e=yield import("./js-core.esm44.js"),t=e.SettingsPreferencesPanel;break;case AvailableComponents.ORGANIZATION_PANEL:e=yield import("./js-core.esm41.js"),t=e.OrganizationPanel;break;case AvailableComponents.INVITE_USERS_PANEL:e=yield import("./js-core.esm41.js"),t=e.InviteUsersPanel;break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=yield import("./js-core.esm41.js"),t=e.InviteRequestsPanel;break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=yield import("./js-core.esm41.js"),t=e.ReviewRequestPanel;break;case AvailableComponents.ADD_APPLICATIONS:e=yield import("./js-core.esm41.js"),t=e.AddApplicationsPanel;break;case AvailableComponents.DATA_CENTER_BROWSE:e=yield import("./js-core.esm45.js"),t=e.DataCenterBrowse;break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=yield import("./js-core.esm45.js"),t=e.FoldersAndFilesPanel;break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=yield import("./js-core.esm45.js"),t=e.FileInfoPanel;break;case AvailableComponents.DATA_CENTER_IMPORTER:e=yield import("./js-core.esm55.js"),t=e.DataCenterImporter;break;case AvailableComponents.DATA_LABELER:e=yield import("./js-core.esm57.js"),t=e.DataLabelerPanel;break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=yield import("./js-core.esm58.js"),t=e.AdminCenterOpenId;break;case AvailableComponents.ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm59.js"),t=e.AdminCenterBrowse;break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=yield import("./js-core.esm64.js"),t=e.DataCenterProcessAI;break;case AvailableComponents.ENGINE_CENTER_NEW:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.EngineCenterNew;break;case AvailableComponents.ENGINE_CENTER_FILTER:e=yield import("./js-core.esm19.js"),t=e.EngineCenterFilter;break;case AvailableComponents.APP_CENTER_FILTER:e=yield import("./js-core.esm65.js"),t=e.AppCenterFilter;break;case AvailableComponents.ENGINE_CENTER_DETAILS:e=yield import("./js-core.esm19.js"),t=e.EngineDetails;break;case AvailableComponents.ENGINE_CENTER_NEW_BUILD:e=yield import("./js-core.esm19.js"),t=e.CreateNewBuildPanel;break;case AvailableComponents.ENGINE_CENTER_CUSTOM_FIELDS_FORM:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.EngineCenterCustomFieldsForm;break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.SchemasFormPanel;break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.InputTypeFlyout;break;case AvailableComponents.ENGINE_CENTER_EDIT_RELEASE_NOTES:e=yield import("./js-core.esm19.js"),t=e.EditReleaseNotes;break;case AvailableComponents.ENGINE_CENTER_VERSION_HISTORY_PANEL:e=yield import("./js-core.esm19.js"),t=e.VersionHistoryPanel;break;case AvailableComponents.SUPPORTED_FILE_TYPES:e=yield import("./js-core.esm55.js"),t=e.SupportedFileTypes;break;case AvailableComponents.EDIT_FILE_METADATA:e=yield import("./js-core.esm55.js"),t=e.EditFileMetadata;break;case AvailableWidgets.APP_CENTER_BROWSE:e=yield import("./js-core.esm65.js"),t=e.AppCenterBrowse;break;case AvailableComponents.APP_CENTER_NEW:e=yield import("./js-core.esm66.js"),t=e.AppCenterNew;break;case AvailableComponents.APP_CENTER_ADD_FLOW_PANEL:e=yield import("./js-core.esm66.js"),t=e.AppCenterAddFlowPanel;break;case AvailableComponents.APP_CENTER_ADD_SCHEMA_PANEL:e=yield import("./js-core.esm66.js"),t=e.AppCenterAddSchemaPanel;break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=yield import("./js-core.esm66.js"),t=e.AppCenterConfigFieldsForm;break;case AvailableComponents.APP_CENTER_CONTEXT_MENU_EXTENSIONS:e=yield import("./js-core.esm66.js"),t=e.AppCenterContextMenuExtensionPanel;break;case AvailableComponents.APP_CENTER_EVENT_PANEL:e=yield import("./js-core.esm66.js"),t=e.AppCenterEventPanel;break;case AvailableComponents.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL:e=yield import("./js-core.esm66.js"),t=e.AppCenterPaletteIntegrationPanel;break;case AvailableComponents.APP_CENTER_BROWSE:e=yield import("./js-core.esm65.js"),t=e.AppCenterBrowse;break;case AvailableComponents.APP_CENTER_DETAILS:e=yield import("./js-core.esm65.js"),t=e.AppCenterDetails;break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=yield import("./js-core.esm64.js"),t=e.DataCenterEngineSelection;break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=yield import("./js-core.esm52.js"),t=e.NewGroupPanel;break;case AvailableComponents.PERMISSIONS_PANEL:e=yield import("./js-core.esm47.js"),t=e.PermissionsPanel;break;case AvailableComponents.GROUP_INFO_PANEL:e=yield import("./js-core.esm47.js"),t=e.GroupInfoPanel;break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=yield import("./js-core.esm47.js"),t=e.NewPermissionSetPanel;break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=yield import("./js-core.esm47.js"),t=e.PermissionSetDetailsPanel;break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=yield import("./js-core.esm45.js"),t=e.MediaDetailsPanelIframe;break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=yield import("./js-core.esm45.js"),t=e.IngestionCreationPanel;break;case AvailableComponents.DATA_CENTER_SELECT_IMPORT_SOURCE:e=yield import("./js-core.esm45.js"),t=e.SelectImportSource;break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=yield import("./js-core.esm45.js"),t=e.SourceCreationPanel;break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=yield import("./js-core.esm52.js"),t=e.GroupDetailsPanel;break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=yield import("./js-core.esm52.js"),t=e.AddMemberPanel;break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=yield import("./js-core.esm60.js"),t=e.ApplicationDetailsPanel;break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=yield import("./js-core.esm67.js"),t=e.ProcessingCenterSources;break;case AvailableComponents.PROCESSING_CENTER_ERROR_DETAIL:e=yield import("./js-core.esm67.js"),t=e.ErrorDetailPanel;break;case AvailableComponents.USER_APPLICATION_SETTINGS_PANEL:e=yield Promise.resolve().then(function(){return index_esm$3}),t=e.UserApplicationSettingsPanel;break;case AvailableComponents.ADD_APPLICATION_USERS_PANEL:e=yield import("./js-core.esm60.js"),t=e.AddUsersPanel;break;case AvailableComponents.PROCESSING_CENTER_BROWSE:e=yield import("./js-core.esm70.js"),t=e.ProcessingCenterBrowse;break;case AvailableComponents.JOBS_TABLE_SETTINGS_PANEL:e=yield import("./js-core.esm71.js"),t=e.JobsTableSettingsPanel;break;case AvailableComponents.VERSION_PANEL:e=yield import("./js-core.esm40.js"),t=e.VersionPanel;break;case AvailableComponents.PROCESSING_CENTER_DAG_BUILDER:e=yield import("./js-core.esm73.js"),t=e.DagBuilder;break;case AvailableComponents.PROCESSING_CENTER_INGESTION:e=yield import("./js-core.esm74.js").then(function(e){return e.an}),t=e.ProcessingCenterIngestion;break;case AvailableComponents.PROCESSING_CENTER_ADVANCED_SETTINGS:e=yield import("./js-core.esm74.js").then(function(e){return e.an}),t=e.ProcessingCenterAdvancedSettings;break;case AvailableComponents.PROCESSING_CENTER_AFFILIATE_PANEL:e=yield import("./js-core.esm74.js").then(function(e){return e.an}),t=e.ProcessingCenterAffiliatePanel;break;case AvailableComponents.JOBS_DETAILS_PANEL:e=yield import("./js-core.esm71.js"),t=e.JobsDetailsPanel;break;case AvailableComponents.TASKS_TABLE_SETTINGS_PANEL:e=yield import("./js-core.esm72.js"),t=e.TasksTableSettingsPanel;break;case AvailableComponents.RESOURCE_CENTER_BROWSE:e=yield import("./js-core.esm75.js"),t=e.ResourceCenterBrowse;break;case AvailableComponents.PACKAGE_DETAILS_PANEL:e=yield import("./js-core.esm78.js"),t=e.PackageDetails;break;case AvailableComponents.INSTANCE_ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm79.js"),t=e.InstanceAdminCenterBrowse;break;case AvailableComponents.MANAGE_GRANTS:e=yield import("./js-core.esm78.js"),t=e.ManageGrantsPanel;break;case AvailableComponents.SCHEMA_DETAILS_PANEL:e=yield import("./js-core.esm80.js"),t=e.SchemaDetailsPanel;break;case AvailableComponents.USER_DETAILS_PANEL:e=yield import("./js-core.esm61.js"),t=e.UserDetailsPanel}return registry[n]=t}),registerComponent=(e,t)=>{registry[e]=t},WIDGETS_FEATURE_KEY="widgets",initialState$1=(!function(e){e.idle="idle",e.mounting="mounting",e.unmounting="unmounting",e.error="error",e.eventing="eventing"}(WidgetsStatus=WidgetsStatus||{}),{value:[],status:WidgetsStatus.idle}),widgetsSelector=e=>e[name].value,callWidgetOnComplete=(e,t)=>{e=e.find(e=>e.widgetName===t);null!=e&&e.onComplete&&e.onComplete()},{name,reducer,actions:{mountWidget:mountWidget$1,mountWidgetSuccess,mountWidgetError,unmountWidget:unmountWidget$1,unmountWidgetSuccess,unmountWidgetFailure,triggerWidgetCallback,triggerWidgetCallbackSuccess}}=createSlice({name:WIDGETS_FEATURE_KEY,initialState:initialState$1,reducers:{mountWidget:(e,t)=>{e.value.push(t.payload),e.status=WidgetsStatus.mounting},mountWidgetSuccess:e=>{e.status=WidgetsStatus.idle},mountWidgetError:e=>{e.status=WidgetsStatus.error},triggerWidgetCallback:(e,t)=>{e.status=WidgetsStatus.eventing},triggerWidgetCallbackSuccess:e=>{e.status=WidgetsStatus.idle},unmountWidget:(e,t)=>{e.status=WidgetsStatus.unmounting},unmountWidgetSuccess:(e,t)=>{e.value=e.value.filter(e=>e.widgetId!==t.payload),e.status=WidgetsStatus.idle},unmountWidgetFailure:e=>{e.status=WidgetsStatus.error}}});function*mountWidgetListenerSaga(){let a;const s={};yield takeEvery$1(mountWidget$1({}).type,function*(e){try{var{widgetConfig:t={},widgetName:n,elementId:r}=null==e?void 0:e.payload,i=(yield call$f(registryLookup,n))||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),o=getElement(r,n);o.classList.add("aiware-el"),s[r]?a=s[r]:(a=client$1.createRoot(o),s[r]=a),a.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(i,Object.assign({},t))}))})}))),yield put(mountWidgetSuccess())}catch(e){yield put(mountWidgetError())}}),yield takeEvery$1(e=>/\/booted$/.test(e.type),function*(e){var[e]=e.type.split("/");yield put(triggerWidgetCallback(e))}),yield takeEvery$1(unmountWidget$1("").type,function*(t){try{const e=yield select(e=>{return(null==(e=widgetsSelector(e).find(e=>e.widgetId===t.payload))?void 0:e.elementId)||""});setTimeout(()=>{s[e]&&s[e].unmount(),delete s[e]}),yield put(unmountWidgetSuccess(t.payload))}catch(e){yield put(unmountWidgetFailure())}}),yield takeEvery$1(triggerWidgetCallback("").type,function*(e){var t=yield select(widgetsSelector);callWidgetOnComplete(t,e.payload),yield put(triggerWidgetCallbackSuccess())})}function getWidgetsModule(){return{id:name,reducerMap:{[name]:reducer},sagas:[mountWidgetListenerSaga],initialActions:[]}}function getDataModule(){return{id:"data",reducerMap:{data:(e,{type:t,payload:n})=>{return t===setData({}).type?[...e.filter(e=>e.id!==n.id),n]:e||[]}},sagas:[],initialActions:[]}}const useStyles$2=makeStyles()(e=>({sdkSnackbarContainer:{"& svg":{fill:"white"}}}));function CustomSnackbar(){const n=useDispatch(),[e,t]=react.exports.useState([]),[r,i]=react.exports.useState(!1),[o,a]=react.exports.useState(void 0),{message:s,duration:l}=useSelector(snackbarSelector);var c=useStyles$2()["classes"],u=(react.exports.useEffect(()=>{null!==s&&void 0!==s&&s.content&&t(e=>[...e,s])},[s]),react.exports.useEffect(()=>{e.length&&!o?(a(Object.assign({},e[0])),t(e=>e.slice(1)),i(!0)):e.length&&o&&r&&(n(clearMessage()),i(!1))},[e,o,r,n]),(e,t)=>{"clickaway"!==t&&(i(!1),n(clearMessage()))});return jsxRuntime.exports.jsx(Snackbar$1,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:r,autoHideDuration:l||3e3,onClose:u,TransitionProps:{onExited:()=>{a(void 0),n(clearMessage())}},className:c.sdkSnackbarContainer,"data-snackbarid":(null===o||void 0===o?void 0:o.key)||"na","data-testid":"snackbar.message."+((null===o||void 0===o?void 0:o.severity)||"na")},{children:jsxRuntime.exports.jsx(Alert$1,Object.assign({onClose:u,severity:null===o||void 0===o?void 0:o.severity,elevation:6,variant:"filled"},{children:null===o||void 0===o?void 0:o.content}))}),o?o.key:void 0)}function validateConfig(e){return e.applicationId||console.info("@aiware/js: applicationId is required. Go to developer app to find your application id."),e.baseUrl||console.info("@aiware/js: baseUrl is required. It defaults to the US Commercial environment which is https://api.us-1.veritone.com/v3/graphql"),!0}const ID="openSupportChatButton",DATA_ATTR="open-support-chat-button";var SupportCenterPixel=()=>jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsx("div",{id:ID,"data-veritone-element":DATA_ATTR,style:{width:1,height:1,position:"fixed",right:55,bottom:20}})});const nameSpace="@helpPanel",updateSelectedTab=createAction(nameSpace+"/UPDATE_SELECTED_TAB",function(e,t){return{payload:{selectedTabId:e,tabLink:t}}}),setCustomKnowledgeBaseUrl=createAction(nameSpace+"/SET_CUSTOM_KNOWLEDGE_BASE_URL",function(e){return{payload:{url:e}}}),setCustomDocsUrl=createAction(nameSpace+"/SET_CUSTOM_DOCS_URL",function(e){return{payload:{url:e}}}),initialState={selectedTabId:0,tabLink:"https://support.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState,e=>{e.addCase(updateSelectedTab,(e,t)=>Object.assign(Object.assign({},e),{tabLink:t.payload.tabLink,selectedTabId:t.payload.selectedTabId})),e.addCase(setCustomKnowledgeBaseUrl,(e,t)=>Object.assign(Object.assign({},e),{customKnowledgeBaseUrl:t.payload.url})),e.addCase(setCustomDocsUrl,(e,t)=>Object.assign(Object.assign({},e),{customDocsUrl:t.payload.url}))});function*helpSaga(){yield takeEvery$1("OPEN_HELP_LINK",function*(){var e=yield select(e=>e.helpPanel.tabLink);yield put(openLinkOnNewTab({url:e}))})}const namespace="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace]?e[namespace].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace]:getTabLinkReducer},sagas:[helpSaga],initialActions:[]}}var knowledgeBaseUrl$1="https://docs.veritone.com/help/index.html",documentUrl$1="https://docs.veritone.com",config={knowledgeBaseUrl:knowledgeBaseUrl$1,documentUrl:documentUrl$1};const useStyles$1=makeStyles()(e=>({root:{height:"calc(100% - 110px)",textAlign:"left","& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},tabs:{padding:e.spacing(2.4,6,0,6)},tabPanels:{width:"100%",height:"100%"},aiWareIcon:{position:"relative",maxHeight:50,opacity:"inherit",padding:e.spacing(4,3.2,0,3.2),display:"flex",justifyContent:"flex-end"},customTabs:{margin:e.spacing(0,4)},kbRoot:{height:"100%",textAlign:"left"},loadingContainer:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white"},kbToolBarBox:{padding:e.spacing(6,6,1.6,6)},kbTabContent:{height:"calc(100% - 92px)"},kbTabPanel:{padding:e.spacing(6)},dRoot:{height:"100%",width:"100%"},dNavBar:{height:"100%",overflow:"hidden",background:"#F4F4F4"},dTitle:{color:"#2A323C",fontWeight:600,fontSize:"18px",lineHeight:"24px",padding:e.spacing(3.2)},dContent:{height:"100%",width:"100%",position:"relative"},dMenu:{overflowY:"auto",height:"calc(100% - 52px)"},drawerContainer:{display:"flex",height:"100%",background:e.palette.background.default},tabContainer:{borderRight:"0.5px solid #D5DFE9",overflow:"hidden",height:"100%",width:"100%"},tabName:{borderBottom:"0.5px solid #D5DFE9",display:"flex",justifyContent:"space-between",alignItems:"center",height:"64px",padding:e.spacing(0,6)},actionIcons:{margin:e.spacing(-2.4)},tabContent:{height:"calc(100vh - 57px - 60px)",overflowY:"auto",overflowX:"hidden"}})),documentUrl=config.documentUrl,Documentation=({path:e=documentUrl})=>{var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(t.dRoot,"hide-in-percy")},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"docs-iframe",title:"Document Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){setTimeout(()=>{r(!1)},1e3)}})]}))},knowledgeBaseUrl=config["knowledgeBaseUrl"];function Knowledgebase({path:e=knowledgeBaseUrl}){var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.kbRoot},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"knowledgebase-iframe",title:"Knowledgebase Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){r(!1)}})]}))}const defaultLocale="en-us",tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.au1+VZ",defaultMessage:"Knowledgebase",description:"Help Panel: Knowledgebase tab label"}),disabled:!1,url:"https://support.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(){var e=useSelector(initialConfigSelector),t=useSelector(customKnowledgeBaseUrlSelector),n=useSelector(customDocsUrlSelector),r=useSelector(helpCenterSelectedTabIdSelector),i=useSelector(e=>null==e?void 0:e.panels),o=useStyles$1()["classes"],[a]=react.exports.useState(defaultLocale);const s=useDispatch();i=null==i?void 0:i.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),t=i&&t?t:e.knowledgeBaseURL,i=i&&n?n:e.docsURL;return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:a},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:o.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:r,onChangeTab:e=>{s(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:t})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:i})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$z,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var index_esm=Object.freeze({__proto__:null,HelpCenterPanel:HelpCenter,customDocsUrlSelector:customDocsUrlSelector,customKnowledgeBaseUrlSelector:customKnowledgeBaseUrlSelector,helpCenterSelectedTabIdSelector:helpCenterSelectedTabIdSelector,setCustomDocsUrl:setCustomDocsUrl,setCustomKnowledgeBaseUrl:setCustomKnowledgeBaseUrl,updateSelectedTab:updateSelectedTab});const useStyles=makeStyles()(()=>({dialog:{top:"125px",overflowX:"hidden",overflowY:"hidden",display:"flex",alignItems:"center",flexDirection:"column"},container:{borderRadius:"4px",backgroundColor:"#fff",width:"430px",overflow:"hidden",outline:0,boxShadow:"0px 0px 7px rgba(0, 0, 0, .25)"},header:{textTransform:"capitalize"},appListContainer:{width:"100%"},orgName:{fontWeight:"bold"}})),ApplicationDialog=()=>{const[e,t]=react.exports.useState(null),[n,r]=react.exports.useState(0);var i=useSelector(userSelector$2),o=useStyles()["classes"];const a=useSelector(initialConfigSelector),s=a.applicationId,l=useSelector(applicationSelector),c=useSelector(switchApiSelector);var u=(null===l||void 0===l?void 0:l.application)||[],d=null===l||void 0===l?void 0:l.status;var p=[...u].sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),f=u.findIndex(e=>e.id===s);useInterval(()=>{t(e=>e&&e-1)},e&&n<3?1e3:null),react.exports.useEffect(()=>{"success"!==(null===l||void 0===l?void 0:l.status)||1!==(null===l||void 0===l?void 0:l.application.length)||(null===l||void 0===l?void 0:l.application[0].id)===a.applicationId||e||(0===e?window.open(c+"/"+(null===l||void 0===l?void 0:l.application[0].id),"_self"):t(10))},[a,l,c,e]);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s)&&f<0&&"success"===d?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:o.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:o.header,variant:"h1",sx:{px:"30px",pt:"30px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-title",defaultMessage:"Application Not Available",description:"Title for modal"})})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"10px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message1",defaultMessage:"Looks like you switched organizations, your current application is not available in the current",description:"Description current application not available"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:o.orgName},{children:null!=(f=null==i?void 0:i.organization)&&f.organizationName?i.organization.organizationName:""}))," ",jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message2",defaultMessage:"organization you are viewing.",description:"Description current application not available"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message3",defaultMessage:"Please select from the available applications below to be redirected.",description:"Instructions for current application not available"})})),e&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"},onClick:()=>{r(e=>e+1)}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-countdown-message",defaultMessage:"You will be automatically forwarded to {appName} in {timeRemaining} seconds.",description:"Instructions for current application not available",values:{timeRemaining:e,appName:u[0].name}})})),jsxRuntime.exports.jsx("div",Object.assign({className:o.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(c+"/"+e,"_self")},applications:p,useGrid:!1,row:3})}))]}))})):null};class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}const rateLimiter=new RateLimiter;function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$4.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$4.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$4.dispatch(logout())},1e3)):store$4.dispatch(logout())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$4.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsxs(AIWareThemeProvider,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})}))),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$4.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$4.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$4.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$4.addModule(r),n},unmountPanel=e=>(store$4.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$4.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$4.dispatch(unmountAllPanel$1(""))};function init(e,t){validateConfig(e)&&store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{onComplete:t})))}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$4),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$4,window.aiWare_theme={darkTheme:darkTheme,lightTheme:lightTheme}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$4,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,version:"sdk_release_version",commit:"6370902b6",releaseDate:"sdk_release_date"});export{flowCenterDialogReducer as $,AIWareIntlProvider as A,Box$1 as B,interopRequireDefault as C,createAction as D,createReducer as E,FormattedMessage$1 as F,Grid$1 as G,createSlice as H,ENGINE_OWNER_TYPES as I,ENGINE_FILTER_TYPES as J,DynamicModuleLoader as K,LoadingButton$1 as L,preferredLanguageSelector as M,baseUrlSelector as N,rootApiSelector as O,Provider$2 as P,sessionTokenSelector as Q,graphEndpointSelector as R,Switch$1 as S,Typography$1 as T,controllerNodeRedImageSelector as U,controllerUrlSelector as V,automateControllerUrlSelector as W,flowCenterDialogSelector as X,automateUrlSelector as Y,Portal$1 as Z,_extends as _,generateUtilityClasses as a,img$T as a$,List$2 as a0,ListItem$1 as a1,ListItemIcon$1 as a2,ListItemText$1 as a3,flowCenterDialogAction as a4,all as a5,img$n as a6,img$o as a7,img$q as a8,img$r as a9,img$b as aA,Dialog$1 as aB,setApiEndpoint as aC,TableContainer$1 as aD,Table$1 as aE,TableHead$1 as aF,TableRow$1 as aG,TableCell$1 as aH,TableSortLabel$1 as aI,TableBody$1 as aJ,img$g as aK,Popper$1 as aL,ClickAwayListener as aM,Fade$1 as aN,img$s as aO,img$p as aP,img$P as aQ,img$B as aR,DialogTitle$1 as aS,DialogContent$1 as aT,DialogActions$1 as aU,Select$1 as aV,MenuItem$1 as aW,Snackbar$1 as aX,default_1 as aY,img$i as aZ,img$k as a_,Divider$1 as aa,Tooltip$1 as ab,IconButton$1 as ac,img$h as ad,img$F as ae,Skeleton$1 as af,takeLatest$1 as ag,fetchAllTags as ah,put as ai,select as aj,fetchFlows as ak,call$f as al,fetchTemplateGallery as am,isRevisionsExistOnServerRequest as an,FormLabel$1 as ao,default_1$5 as ap,FormGroup$1 as aq,FormControlLabel$1 as ar,Checkbox$1 as as,fetchTemplateGalleryFallback as at,Button$1 as au,Card$1 as av,img$l as aw,flowStyles as ax,NoResults as ay,CircularProgress$1 as az,styled$1 as b,fetchEngine as b$,Tabs$1 as b0,Tab$1 as b1,deleteEngine as b2,img$j as b3,AIWareFormatMessage as b4,FormattedDate as b5,fetchVeritoneGraphQLApi as b6,useTheme as b7,KeyboardArrowRight as b8,KeyboardArrowLeft as b9,muiCache as bA,img$Q as bB,img$d as bC,img$c as bD,isEmpty_1 as bE,Backdrop$1 as bF,getDefaultMiddleware as bG,isNil_1 as bH,UpDown as bI,Icon$1 as bJ,get_1 as bK,map_1 as bL,keys_1 as bM,RadioGroup$1 as bN,Avatar$1 as bO,img$v as bP,baseGraphQLApi as bQ,FormHelperText$2 as bR,img$f as bS,StyledEngineProvider as bT,ThemeProvider as bU,lightTheme as bV,CssBaseline as bW,Hide as bX,showMessage as bY,MessageSeverity as bZ,Radio$2 as b_,useId as ba,InputUnstyled as bb,isHostComponent as bc,getDefaultExportFromNamespaceIfNotNamed as bd,commonjsRequire as be,_typeof$4 as bf,_inheritsLoose$2 as bg,_assertThisInitialized$1 as bh,React as bi,hoistNonReactStatics_cjs as bj,_defineProperty$1 as bk,reactDom as bl,Transition$1 as bm,__awaiter$a as bn,__generator$2 as bo,__spread as bp,TransitionGroup$1 as bq,connect$1 as br,Bookmark as bs,EngineFlagIcons as bt,createAsyncThunk as bu,withStyles as bv,getConfigModule as bw,getAuthModule as bx,getSnackbarModule as by,CacheProvider as bz,Paper$1 as c,_toKey as c$,createSvgIcon$2 as c0,_hasPath as c1,_createCompounder as c2,_baseIteratee as c3,isArrayLike_1 as c4,toInteger_1 as c5,_toPropertyKey as c6,_setPrototypeOf$3 as c7,commonjsGlobal$1 as c8,combineReducers as c9,configSelector as cA,baseGraphQLApiWithError as cB,VerifiedFilled as cC,Add as cD,ExpandLess as cE,ExpandMore as cF,Collapse$1 as cG,img$15 as cH,Filter$1 as cI,DynamicTable as cJ,useTheme$2 as cK,getThemeProps as cL,useEnhancedEffect$1 as cM,React$1 as cN,_arrayPush as cO,isArray_1 as cP,_baseToString as cQ,_baseTrim as cR,_castSlice as cS,_stringToArray as cT,toString_1 as cU,ReactIs as cV,upperFirst_1 as cW,isString_1 as cX,_baseGet as cY,_baseSlice as cZ,_castPath as c_,createSelector$1 as ca,fork as cb,AIWareThemeProvider as cc,Stack$4 as cd,Close$1 as ce,FullscreenExit as cf,Fullscreen as cg,TabPanel as ch,default_1$2 as ci,InputAdornment$1 as cj,unmountPanel$1 as ck,AvailableComponents as cl,delay$1 as cm,hidePanel$1 as cn,mountPanel$1 as co,DialogContentText$1 as cp,userSelector$2 as cq,MoreVert as cr,Menu$1 as cs,Edit as ct,Upload as cu,Delete as cv,CustomTabs as cw,useBackupImg as cx,img$1y as cy,validate as cz,capitalize$2 as d,memoizeOne as d$,_isIndex as d0,channel$1 as d1,useIntl as d2,VideoCamera as d3,Image$1 as d4,Sound as d5,Description as d6,toNumber_1 as d7,ProgressStepper as d8,size_1 as d9,ArrowDropDownIcon as dA,isObject_1 as dB,_arrayMap as dC,_baseEach as dD,_arrayFilter as dE,_getNative as dF,eq_1 as dG,_root as dH,_Uint8Array as dI,_overArg as dJ,_isPrototype as dK,isObjectLike_1 as dL,_baseGetTag as dM,_arrayLikeKeys as dN,isArguments_1 as dO,isBuffer$3 as dP,isFunction_1 as dQ,isTypedArray_1 as dR,_Stack as dS,_baseFor as dT,identity_1 as dU,_isIterateeCall as dV,isSymbol_1 as dW,_baseMap as dX,_baseUnary as dY,deepmerge as dZ,useTheme$3 as d_,take as da,CurlyBraces as db,UnknownDocument as dc,sdkEventManager as dd,SdkEvents as de,SdkError as df,EngineClassIcons as dg,Mode2 as dh,EngineModeIcons as di,DeploymentModelIcons as dj,guid as dk,EditList as dl,forceReflow as dm,getDefaultExportFromCjs as dn,alpha as dp,useControlled as dq,useEventCallback as dr,ButtonBase$1 as ds,useForkRef as dt,setRef as du,inputClasses$1 as dv,inputBaseClasses$1 as dw,outlinedInputClasses$1 as dx,filledInputClasses$1 as dy,ClearIcon as dz,_objectWithoutPropertiesLoose$2 as e,img$L as e$,isPlainObject$1 as e0,styled$2 as e1,_Symbol as e2,_Set as e3,_setToArray as e4,_SetCache as e5,_cacheHas as e6,Slide$1 as e7,updatePanelMicroFrontendProps as e8,setData as e9,img$4 as eA,img$z as eB,takeEvery$1 as eC,enableBetaFeatures as eD,Badge$1 as eE,openLinkOnNewTab as eF,orange$1 as eG,deepOrange$1 as eH,authSelector as eI,headerBarSelector as eJ,getSortName as eK,img$8 as eL,InputLabel$1 as eM,ListItemAvatar$1 as eN,OrganizationTabIcon as eO,ScopedCssBaseline$1 as eP,AlarmTwo as eQ,getApplicationsApi as eR,ListItemSecondaryAction$1 as eS,updateTokenSuccess as eT,postNotificationCommand as eU,aiwareEvent as eV,notificationCommands as eW,panelsSelector as eX,css as eY,avatarClasses as eZ,img$M as e_,useIsFocusVisible as ea,ownerDocument as eb,appendOwnerState as ec,lighten as ed,darken as ee,slotShouldForwardProp as ef,shouldSpreadAdditionalProps$1 as eg,keyframes as eh,img$1v as ei,createTheme$1 as ej,injectIntl as ek,TabId as el,PersonalProfile$1 as em,Organizations as en,DataCenter as eo,Process as ep,FlowCenter2 as eq,DeveloperCenter as er,Marketplace$1 as es,LibraryCenter as et,AdminCenter as eu,AdminTabIcon as ev,Resources$1 as ew,DagBuilder as ex,img$S as ey,selectIsSuperAdmin as ez,clsx as f,StepContext$1 as f$,img$1u as f0,img$1t as f1,img$1s as f2,img$J as f3,img$1w as f4,img$I as f5,emphasize as f6,_arraySome as f7,ErrorBoundary$1 as f8,Information as f9,img$3 as fA,selectUserOrgEdgeVersion as fB,ProcessingDetail as fC,FilterRemove as fD,CheckCircle as fE,FolderOpen as fF,Voice as fG,useDoubleClick as fH,FolderFilled as fI,Time as fJ,img$x as fK,Undefined as fL,YoutubeSource as fM,PodcastSource as fN,TVSource as fO,RadioSource as fP,selectOrgId as fQ,selectIsUserAdmin as fR,ErrorState$1 as fS,StepConnector$1 as fT,NullState$2 as fU,Group as fV,gqlIntrospection as fW,PermissionChangedAction as fX,Lock as fY,AddGroup as fZ,StepperContext$1 as f_,NewFolder as fa,SpecialFolder as fb,User as fc,Source as fd,Search$1 as fe,selectIsOLPEnabled as ff,getLibraryModule as fg,selectApiConfigs$1 as fh,FullScreenContainer as fi,betaFeaturesSelector as fj,cmsUrlSelector as fk,UserAddFilled as fl,Popover$1 as fm,MenuList$1 as fn,MoveFolder as fo,Download as fp,img$9 as fq,selectPanelByPanelName as fr,EngineCategoryIcons as fs,Settings$2 as ft,Hamburger as fu,List as fv,EditAttributes as fw,MoreHor as fx,img$u as fy,img$w as fz,generateUtilityClass as g,mountPanel as g$,SvgIcon$1 as g0,initialConfigSelector as g1,ConfirmationModal as g2,EnumHelpers as g3,formatBytes as g4,NotInterested as g5,mountPanelForResponse$1 as g6,Users as g7,ApplicationTabIcon as g8,SecurityGroup as g9,stringify$4 as gA,compile$1 as gB,Check as gC,FormattedRelativeTime$1 as gD,Folder as gE,Hidden as gF,ArrowUp as gG,ArrowDown as gH,toFinite_1 as gI,_baseForOwn as gJ,_arrayReduce as gK,hasIn_1 as gL,useSyncExternalStoreExports as gM,tabsClasses$1 as gN,Packages as gO,Engines as gP,PackagesAvatar as gQ,actionChannel as gR,cancelled as gS,flush$3 as gT,cancel as gU,registry as gV,registerComponent as gW,AvailableWidgets as gX,root as gY,mountWidget as gZ,unmountWidget as g_,NoApps as ga,green$1 as gb,md5 as gc,AddUser as gd,selectors as ge,LibraryDropdown as gf,Remove as gg,Save as gh,Input$3 as gi,Copy as gj,ArrowForward as gk,Modal$1 as gl,_baseIsEqual as gm,OutlinedInput$1 as gn,_getSymbols as go,stubArray_1 as gp,_baseGetAllKeys as gq,_getTag as gr,_nodeUtil as gs,_getAllKeys as gt,_castFunction as gu,Article as gv,Task as gw,View as gx,_objectSpread2 as gy,serialize$1 as gz,composeClasses as h,unmountPanel as h0,hidePanel as h1,unmountAllPanel as h2,init as h3,useDispatch as i,jsxRuntime as j,useSelector as k,authStatusSelector as l,makeStyles as m,authContextSelector as n,AuthContext as o,lodash as p,Alert$1 as q,react as r,store$4 as s,authErrorMessage as t,useThemeProps as u,FormControl$1 as v,TextField$1 as w,classNames as x,resetPasswordRequest as y,createSvgIcon$1 as z};
package/js-core.esm.js.gz CHANGED
Binary file
package/js-core.esm10.js CHANGED
@@ -1 +1 @@
1
- import{bZ as createSvgIcon,j as jsxRuntime}from"./js-core.esm.js";var Search=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");export{Search as S};
1
+ import{c0 as createSvgIcon,j as jsxRuntime}from"./js-core.esm.js";var Search=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");export{Search as S};
Binary file
package/js-core.esm11.js CHANGED
@@ -1 +1 @@
1
- import{bZ as createSvgIcon,j as jsxRuntime}from"./js-core.esm.js";var Close=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");export{Close as C};
1
+ import{c0 as createSvgIcon,j as jsxRuntime}from"./js-core.esm.js";var Close=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");export{Close as C};
Binary file
package/js-core.esm13.js CHANGED
@@ -1 +1 @@
1
- import{b_ as _hasPath}from"./js-core.esm.js";var objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function baseHas$1(a,s){return null!=a&&hasOwnProperty.call(a,s)}var _baseHas=baseHas$1,baseHas=baseHas$1,hasPath=_hasPath;function has(a,s){return null!=a&&hasPath(a,s,baseHas)}var has_1=has;export{has_1 as h};
1
+ import{c1 as _hasPath}from"./js-core.esm.js";var objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function baseHas$1(a,s){return null!=a&&hasOwnProperty.call(a,s)}var _baseHas=baseHas$1,baseHas=baseHas$1,hasPath=_hasPath;function has(a,s){return null!=a&&hasPath(a,s,baseHas)}var has_1=has;export{has_1 as h};
Binary file