aiware-js 1.0.0-master.1368 → 1.0.0-master.1369

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js-core.esm126.js CHANGED
@@ -1 +1 @@
1
- import{j as jsxRuntimeExports,c as createAction,L as createReducer,a0 as createSlice,bp as store,P as Provider,u as useSelector,ah as preferredLanguageSelector,b$ as baseUrlSelector,af as rootApiSelector,a4 as sessionTokenSelector,a5 as graphEndpointSelector,aY as controllerNodeRedImageSelector,a_ as controllerUrlSelector,aZ as automateControllerUrlSelector,c0 as flowCenterDialogSelector,bR as automateUrlSelector,at as betaFeaturesSelector,r as reactExports,c1 as ENGINE_OWNER_TYPES,ai as lodashExports,B as Box,c2 as flowCenterDialogReducer,c3 as flowCenterDialogAction,c4 as img$D,c5 as img$E,c6 as img$A,c7 as img$B,c8 as ENGINE_FILTER_TYPES,c9 as img$u,ca as img$Z,cb as setApiEndpoint,_ as all,cc as fetchTemplateGallery,cd as img$y,C as CircularProgress,ce as img$o,bS as img$t,cf as ClickAwayListener,cg as img$F,ch as img$C,ci as img$17,cj as img$9,ck as img$a,cl as img$V,cm as img$v,cn as img$x,co as img$1b,cp as deleteEngine,cq as fetchEngine,cr as img$w,al as AIWareFormatMessage,cs as FormattedDate,am as takeLatest$1,N as put,ct as fetchAllTags,cu as fetchFlows$1,K as select,a2 as call,cv as isRevisionsExistOnServerRequest,cw as fetchVeritoneGraphQLApi}from"./js-core.esm4.js";import{aS as requireCreateSvgIcon,aT as interopRequireDefaultExports,m as makeStyles,D as DynamicModuleLoader,A as AIWareIntlProvider,P as Portal,L as List,T as Typography,M as MemoizedFormattedMessage,p as Divider,F as FormControl,a7 as default_1$6,B as Button,G as Grid,C as Card,bS as flowStyles,bT as NoResults,ad as TableContainer,ae as Table,ai as TableHead,af as TableBody,w as Dialog,k as TableRow,l as TableCell,a6 as TableSortLabel,b5 as Fade,a as Paper,x as DialogTitle,y as DialogContent,J as DialogActions,S as Select,e as MenuItem,am as Tabs,an as Tab}from"./js-core.esm7.js";import{d as default_1$5}from"./js-core.esm76.js";import{ai as ListItemIcon,T as Tooltip,I as IconButton,e as Skeleton,a0 as FormLabel,$ as FormGroup,Y as FormControlLabel,Z as Checkbox,o as devErrorLogger,aC as Popper,a as Snackbar,H as Search,a_ as Close$1,y as DateTime_1,c as TextField}from"./js-core.esm9.js";import{C as CardContent,c as CardActions,f as default_1$8,h as default_1$9,d as default_1$a}from"./js-core.esm26.js";import{T as Toolbar$1,A as App$1,a as TablePagination,S as StatusPill,g as getFlowStatus}from"./js-core.esm127.js";import{d as default_1$7}from"./js-core.esm51.js";import{I as IFlowWidgetTabs,a as IFlowWidgetActivityTabs}from"./js-core.esm20.js";import{L as ListItem,c as ListItemText}from"./js-core.esm8.js";import{A as AppBar}from"./js-core.esm109.js";import{u as useDispatch}from"./js-core.esm14.js";import"./js-core.esm21.js";import"./js-core.esm41.js";import"./js-core.esm121.js";import"./js-core.esm40.js";var WorkOutlineOutlined={},_interopRequireDefault$4=interopRequireDefaultExports,default_1$4=(Object.defineProperty(WorkOutlineOutlined,"__esModule",{value:!0}),WorkOutlineOutlined.default=void 0),_createSvgIcon$4=_interopRequireDefault$4(requireCreateSvgIcon()),_jsxRuntime$4=jsxRuntimeExports,_default$4=(0,_createSvgIcon$4.default)((0,_jsxRuntime$4.jsx)("path",{d:"M14 6V4h-4v2h4zM4 8v11h16V8H4zm16-2c1.11 0 2 .89 2 2v11c0 1.11-.89 2-2 2H4c-1.11 0-2-.89-2-2l.01-11c0-1.11.88-2 1.99-2h4V4c0-1.11.89-2 2-2h4c1.11 0 2 .89 2 2v2h4z"}),"WorkOutlineOutlined"),default_1$4=WorkOutlineOutlined.default=_default$4,PeopleAltOutlined={},_interopRequireDefault$3=interopRequireDefaultExports,default_1$3=(Object.defineProperty(PeopleAltOutlined,"__esModule",{value:!0}),PeopleAltOutlined.default=void 0),_createSvgIcon$3=_interopRequireDefault$3(requireCreateSvgIcon()),_jsxRuntime$3=jsxRuntimeExports,_default$3=(0,_createSvgIcon$3.default)((0,_jsxRuntime$3.jsx)("path",{d:"M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87zM15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24C14.5 5.27 15 6.58 15 8s-.5 2.73-1.33 3.76c.42.14.86.24 1.33.24zm-6 0c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm6 5H3v-.99C3.2 16.29 6.3 15 9 15s5.8 1.29 6 2v1z"}),"PeopleAltOutlined"),default_1$3=PeopleAltOutlined.default=_default$3,PersonOutlineOutlined={},_interopRequireDefault$2=interopRequireDefaultExports,default_1$2=(Object.defineProperty(PersonOutlineOutlined,"__esModule",{value:!0}),PersonOutlineOutlined.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(requireCreateSvgIcon()),_jsxRuntime$2=jsxRuntimeExports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"}),"PersonOutlineOutlined"),default_1$2=PersonOutlineOutlined.default=_default$2,HistoryOutlined={},_interopRequireDefault$1=interopRequireDefaultExports,default_1$1=(Object.defineProperty(HistoryOutlined,"__esModule",{value:!0}),HistoryOutlined.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(requireCreateSvgIcon()),_jsxRuntime$1=jsxRuntimeExports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z"}),"HistoryOutlined"),default_1$1=HistoryOutlined.default=_default$1,FilterListOutlined={},_interopRequireDefault=interopRequireDefaultExports,default_1=(Object.defineProperty(FilterListOutlined,"__esModule",{value:!0}),FilterListOutlined.default=void 0),_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=jsxRuntimeExports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterListOutlined");function _array_like_to_array$9(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_without_holes$2(e){if(Array.isArray(e))return _array_like_to_array$9(e)}function _define_property$6(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _iterable_to_array$2(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread$2(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$5(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):n).forEach(function(e){_define_property$6(t,e,o[e])})}return t}function ownKeys$1(e,t){var o=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),o.push.apply(o,e)),o}function _object_spread_props$1(t,o){return o=null!=o?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ownKeys$1(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}),t}function _to_consumable_array$2(e){return _array_without_holes$2(e)||_iterable_to_array$2(e)||_unsupported_iterable_to_array$9(e)||_non_iterable_spread$2()}function _unsupported_iterable_to_array$9(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$9(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$9(e,t):void 0}function _ts_generator$4(n,r){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(o){return function(e){var t=[o,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var _obj,default_1=FilterListOutlined.default=_default,FETCH_FLOWS="flow-center/FETCH_FLOWS",ADD_NEW_FLOW="flow-center/ADD_NEW_FLOW",IS_REVISIONS_EXIST_ON_SERVER="flow-center/IS_REVISIONS_EXIST_ON_SERVER",SET_IS_REVISIONS_EXIST_ON_SERVER="flow-center/SET_IS_REVISIONS_EXIST_ON_SERVER",SET_FETCHING_FLOWS="flow-center/SET_FETCHING_FLOWS",SET_OPEN_TEMPLATE="flow-center/SET_OPEN_TEMPLATE",SET_TEMPLATE_SELECTED="flow-center/SET_TEMPLATE_SELECTED",SET_TEMPLATES="flow-center/SET_TEMPLATES",SET_FILTERED_TEMPLATES_ACTION="flow-center/SET_FILTERED_TEMPLATES_ACTION",FETCH_TAGS="flow-center/FETCH_TAGS",SET_TAGS="flow-center/SET_TAGS",SET_TAGS_TO_STORE="flow-center/SET_TAGS_TO_STORE",SET_CATEGORIES="flow-center/SET_CATEGORIES",SET_TEMPLATES_AUTHORS="flow-center/SET_TEMPLATES_AUTHORS",SET_SELECTED_FILTERS="flow-center/SET_SELECTED_FILTERS",SET_TAG="flow-center/SET_TAG",SET_FLOWS="flow-center/SET_FLOWS",SET_NOTEBOOKS="flow-center/SET_NOTEBOOKS",FETCH_NOTEBOOKS="flow-center/FETCH_NOTEBOOKS",TOGGLE_IS_SEARCHING="flow-center/TOGGLE_IS_SEARCHING",TOGGLE_IS_SEARCHING_LOADING="flow-center/TOGGLE_IS_SEARCHING_LOADING",SEARCH_TEMPLATES="flow-center/SEARCH_TEMPLATES",SET_SEARCHED="flow-center/SET_SEARCHED",SET_SEARCHED_TEMPLATES="flow-center/SET_SEARCHED_TEMPLATES",SET_CONFIG="flow-center/SET_CONFIG",TOGGLE_STATE_CREATE_NEW_FLOW="flow-center/TOGGLE_STATE_CREATE_NEW_FLOW",SET_SHOULD_CREATE_INITIAL_FLOWS="flow-center/SET_SHOULD_CREATE_INITIAL_FLOWS",GET_NODE_RED_VERSION_EDGE="flow-center/GET_NODE_RED_VERSION_EDGE",setFetchingFlows=createAction(SET_FETCHING_FLOWS),isRevisionsExistOnServer=createAction(IS_REVISIONS_EXIST_ON_SERVER),setOpenTemplate=createAction(SET_OPEN_TEMPLATE),setTemplateSelected=createAction(SET_TEMPLATE_SELECTED),setTemplatesAction=createAction(SET_TEMPLATES),setFilteredTemplatesAction=createAction(SET_FILTERED_TEMPLATES_ACTION),setTags=(createAction(FETCH_TAGS),createAction(SET_TAGS)),setTagsToStore=createAction(SET_TAGS_TO_STORE),setCategories=createAction(SET_CATEGORIES),setTemplatesAuthors=createAction(SET_TEMPLATES_AUTHORS),setSelectedFilters=createAction(SET_SELECTED_FILTERS),fetchFlows=(createAction(SET_TAG),createAction(FETCH_FLOWS)),fetchNotebooks=createAction(FETCH_NOTEBOOKS),setFlows=createAction(SET_FLOWS),setNotebooks=createAction(SET_NOTEBOOKS),addNewFlow=createAction(ADD_NEW_FLOW),toggleIsSearching=createAction(TOGGLE_IS_SEARCHING),toggleIsSearchingLoading=createAction(TOGGLE_IS_SEARCHING_LOADING),searchTemplates=createAction(SEARCH_TEMPLATES),setSearched=createAction(SET_SEARCHED),setSearchedTemplates=createAction(SET_SEARCHED_TEMPLATES),setFlowCenterConfig=createAction(SET_CONFIG),toggleStateCreateNewFlow=createAction(TOGGLE_STATE_CREATE_NEW_FLOW),setShouldCreateInitialFlows=createAction(SET_SHOULD_CREATE_INITIAL_FLOWS),flowsReducer=(createAction(GET_NODE_RED_VERSION_EDGE),createReducer({flows:[],notebooks:[],shouldCreateInitialFlows:!1,fetchingFlows:!1,templateToOpen:{},isTemplateSelected:!1,tags:[],categories:[],templatesAuthors:[],templates:[],filteredTemplates:[],selectedFilters:{},isSearching:!1,isSearchingLoading:!1,searched:"",searchedTemplates:null,config:{isFullScreen:!1,automateFullScreen:!1,zIndex:0,graphQLEndpoint:"",defaultCluster:""},isLoadingCreateNewFlow:!1,isRevisionsExistOnServer:!1},(_define_property$6(_obj={},FETCH_FLOWS,function(e){return _object_spread$5({},e)}),_define_property$6(_obj,ADD_NEW_FLOW,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{flows:[t].concat(_to_consumable_array$2(e.flows))})}),_define_property$6(_obj,SET_FETCHING_FLOWS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{fetchingFlows:t})}),_define_property$6(_obj,SET_OPEN_TEMPLATE,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{templateToOpen:t})}),_define_property$6(_obj,SET_TEMPLATE_SELECTED,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{isTemplateSelected:t})}),_define_property$6(_obj,SET_TAGS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{tags:t})}),_define_property$6(_obj,SET_TAGS_TO_STORE,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{tags:t})}),_define_property$6(_obj,SET_CATEGORIES,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{categories:t})}),_define_property$6(_obj,SET_TEMPLATES_AUTHORS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{templatesAuthors:t})}),_define_property$6(_obj,SET_SELECTED_FILTERS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{selectedFilters:t})}),_define_property$6(_obj,SET_TEMPLATES,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{templates:t})}),_define_property$6(_obj,SET_FILTERED_TEMPLATES_ACTION,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{filteredTemplates:t})}),_define_property$6(_obj,SET_TAG,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{tag:t})}),_define_property$6(_obj,SET_FLOWS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{flows:t})}),_define_property$6(_obj,SET_NOTEBOOKS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{notebooks:t})}),_define_property$6(_obj,TOGGLE_IS_SEARCHING,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{isSearching:t})}),_define_property$6(_obj,TOGGLE_IS_SEARCHING_LOADING,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{isSearchingLoading:t})}),_define_property$6(_obj,SET_SEARCHED,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{searched:t})}),_define_property$6(_obj,SET_SEARCHED_TEMPLATES,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{searchedTemplates:t})}),_define_property$6(_obj,SET_CONFIG,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{config:t})}),_define_property$6(_obj,TOGGLE_STATE_CREATE_NEW_FLOW,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{isLoadingCreateNewFlow:t})}),_define_property$6(_obj,SET_IS_REVISIONS_EXIST_ON_SERVER,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{isRevisionsExistOnServer:t})}),_define_property$6(_obj,SET_SHOULD_CREATE_INITIAL_FLOWS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{shouldCreateInitialFlows:t})}),_obj))),namespace$2="flows";function fetchTagsSaga(){return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(FETCH_TAGS,function(t){var o;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,fetchAllTags(t.payload.ids)];case 1:return void 0===(o=e.sent())?[3,3]:[4,put(setTags(o))];case 2:e.sent(),e.label=3;case 3:return[2]}})})];case 1:return e.sent(),[2]}})}function fetchFlowsSaga(){return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(FETCH_FLOWS,function(t){var o,n,r;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,put(setFetchingFlows(!0))];case 1:return e.sent(),[4,select(sessionTokenSelector)];case 2:switch(o=e.sent(),r=300,t.payload.ownerType){case ENGINE_OWNER_TYPES.ORGANIZATION:return[3,3];case ENGINE_OWNER_TYPES.MINE:return[3,5];case ENGINE_OWNER_TYPES.SHARED:return[3,7];case ENGINE_OWNER_TYPES.NOTEBOOKS:return[3,9]}return[3,11];case 3:return[4,fetchFlows$1({name:t.payload.name,owned:!1,offset:0,limit:r,authToken:o})];case 4:return n=e.sent(),[3,12];case 5:return[4,fetchFlows$1({name:t.payload.name,owned:!0,offset:0,limit:r,authToken:o})];case 6:return n=e.sent(),[3,12];case 7:return[4,fetchFlows$1({name:t.payload.name,owned:!1,offset:0,limit:r,authToken:o})];case 8:return n=e.sent(),[3,12];case 9:return[4,fetchFlows$1({name:t.payload.name,owned:!0,offset:0,limit:r,authToken:o,isNotebook:!0})];case 10:return n=e.sent(),[3,12];case 11:return[3,12];case 12:return void 0!==n&&n?0!==n.data.engines.records.length||t.payload.name?[3,14]:[4,put(setShouldCreateInitialFlows(!0))]:[3,18];case 13:e.sent(),e.label=14;case 14:return t.payload.ownerType!==ENGINE_OWNER_TYPES.NOTEBOOKS?[3,16]:[4,put(setNotebooks(n.data.engines.records))];case 15:return e.sent(),[3,18];case 16:return[4,put(setFlows(n.data.engines.records))];case 17:e.sent(),e.label=18;case 18:return[4,put(toggleIsSearchingLoading(!1))];case 19:return e.sent(),[4,put(setFetchingFlows(!1))];case 20:return e.sent(),[2]}})})];case 1:return e.sent(),[2]}})}function fetchNotebooksSaga(){return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(FETCH_NOTEBOOKS,function(t){var o;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:return o=e.sent(),[4,fetchFlows$1({name:t.payload.name,owned:!0,offset:0,limit:300,authToken:o,isNotebook:!0})];case 2:return void 0!==(o=e.sent())&&o?[4,put(setNotebooks(o.data.engines.records))]:[3,4];case 3:e.sent(),e.label=4;case 4:return[4,put(toggleIsSearchingLoading(!1))];case 5:return e.sent(),[2]}})})];case 1:return e.sent(),[2]}})}function searchTemplatesSaga(){return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(SEARCH_TEMPLATES,function(){var t,o;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:return t=e.sent(),[4,call(fetchTemplateGallery,t,{isPublic:!0,limit:200})];case 2:return(o=e.sent())&&o.data&&o.data.flowTemplates&&o.data.flowTemplates.records&&0<o.data.flowTemplates.records.length?[4,put(setTemplatesAction(o.data.flowTemplates.records))]:[3,5];case 3:return e.sent(),[4,put(setFilteredTemplatesAction(o.data.flowTemplates.records))];case 4:e.sent(),e.label=5;case 5:return[2]}})})];case 1:return e.sent(),[2]}})}function isRevisionsExistOnServerSaga(){return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(IS_REVISIONS_EXIST_ON_SERVER,function(){var t,o;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:o=e.sent(),e.label=2;case 2:return e.trys.push([2,4,,6]),[4,call(isRevisionsExistOnServerRequest,o)];case 3:return t=e.sent(),[3,6];case 4:return e.sent(),[4,put({type:SET_IS_REVISIONS_EXIST_ON_SERVER,payload:!1})];case 5:return e.sent(),[3,6];case 6:return lodashExports.get(t,"data.flowRevisions","")?[4,put({type:SET_IS_REVISIONS_EXIST_ON_SERVER,payload:!0})]:[3,8];case 7:e.sent(),e.label=8;case 8:return[2]}})})];case 1:return e.sent(),[2]}})}function flowsSaga(){return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,all([fetchTagsSaga(),fetchNotebooksSaga(),fetchFlowsSaga(),searchTemplatesSaga(),isRevisionsExistOnServerSaga()])];case 1:return e.sent(),[2]}})}function _ts_generator$3(n,r){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(o){return function(e){var t=[o,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function flowCenterRootSaga(){return _ts_generator$3(this,function(e){switch(e.label){case 0:return[4,all([flowsSaga()])];case 1:return e.sent(),[2]}})}var namespace$1="newFlowClusterID",initialState$1={newFlowClusterID:""},newFlowClusterIDSlice=createSlice({name:namespace$1,initialState:initialState$1,reducers:{newFlowClusterIDAction:function(e,t){e.newFlowClusterID=t.payload}}}),newFlowClusterIDSelector=function(e){return(null==e?void 0:e[namespace$1])||null},newFlowClusterIDAction=newFlowClusterIDSlice.actions.newFlowClusterIDAction,newFlowClusterIDnReducer=newFlowClusterIDSlice.reducer,namespace="engineDistributionType",initialState={engineDistributionType:"instance_locked"},engineDistributionSlice=createSlice({name:namespace,initialState:initialState,reducers:{engineDistributionTypeAction:function(e,t){e.engineDistributionType=t.payload}}}),engineDistributionTypeSelector=function(e){return(null==e?void 0:e[namespace])||null},engineDistributionTypeReducer=(engineDistributionSlice.actions.engineDistributionTypeAction,engineDistributionSlice.reducer);function _define_property$5(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var newFlowClusterIDNameSpace="newFlowClusterID",engineDistributionTypeNameSpace="engineDistributionType",flowCenterDialogNameSpace="flowCenterDialog";function getFlowCenterModule(){var e;return{id:"flow-center",reducerMap:(_define_property$5(e={},namespace$2,flowsReducer),_define_property$5(e,newFlowClusterIDNameSpace,newFlowClusterIDnReducer),_define_property$5(e,engineDistributionTypeNameSpace,engineDistributionTypeReducer),_define_property$5(e,flowCenterDialogNameSpace,flowCenterDialogReducer),e),sagas:[flowCenterRootSaga],initialActions:[]}}function _array_like_to_array$8(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$8(e){if(Array.isArray(e))return e}function _array_without_holes$1(e){if(Array.isArray(e))return _array_like_to_array$8(e)}function _define_property$4(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _iterable_to_array$1(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit$8(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$8(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread$1(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$4(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):n).forEach(function(e){_define_property$4(t,e,o[e])})}return t}function _sliced_to_array$8(e,t){return _array_with_holes$8(e)||_iterable_to_array_limit$8(e,t)||_unsupported_iterable_to_array$8(e,t)||_non_iterable_rest$8()}function _to_consumable_array$1(e){return _array_without_holes$1(e)||_iterable_to_array$1(e)||_unsupported_iterable_to_array$8(e)||_non_iterable_spread$1()}function _unsupported_iterable_to_array$8(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$8(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$8(e,t):void 0}store.addModules([getFlowCenterModule()]);var useStyles$d=makeStyles()(function(){return{icon:{fontSize:"16px!important",minWidth:"0px!important",paddingLeft:"8px!important",paddingRight:"8px!important","& svg":{fill:"#555F7C!important"}},text:{fontSize:"14px!important"},listItemText:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important"},listItemTextFilters:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",wordBreak:"break-word"},category:{fontFamily:"Nunito",fontStyle:"normal!important",color:"#2A323C!important",fontSize:"14px!important",marginright:"6px!important",fontWeight:"500!important",paddingLeft:"8px!important"},formControl:{marginBottom:"10px!important",marginTop:"10px!important"},marginLeft:{paddingLeft:"8px!important",paddingRight:"8px!important"},boxBackground:{height:"100%!important"},paddingLeft:{paddingLeft:"0px!important",minWidth:"0px!important",borderRadius:"4px!important"},fullScreenMode:{marginTop:"64.5px!important"},selectedPaddingLeft:{background:"#F2F5F9 !important",color:"#1871E8 !important"},group:{paddingLeft:"8px!important"},filterTitleContainer:{display:"flex",alignItems:"center!important"},expandIconClass:{display:"flex",paddingLeft:"5px!important","&:hover":{cursor:"pointer!important"}},scroll:{overflowY:"auto",overflowX:"hidden"}}});function Navigation(e){var t=e.categories,o=e.filterers,n=e.screen,r=e.onSetType,a=e.showNavigation,s=e.fullScreen,e=e.automateFullScreen,i=useStyles$d().classes,l=useDispatch(),c=_sliced_to_array$8(reactExports.useState([]),2),u=c[0],p=c[1],d=useSelector(function(e){return e.flows.selectedFilters}),m=useSelector(function(e){return e.flows.isSearching});var f=function(t){var o=u.indexOf(t);p(-1===o?function(e){return e.push(t),_to_consumable_array$1(e)}:function(e){return e.splice(o,1),_to_consumable_array$1(e)})},x=function(e,t){var o=_object_spread$4({},d),n=d[e];o[e]=[],n&&(o[e]=_to_consumable_array$1(n)),o[e].includes(t)?o[e].splice(o[e].indexOf(t),1):o[e].push(t),0===o[e].length&&delete o[e],l(setSelectedFilters(o))};reactExports.useEffect(function(){x(ENGINE_FILTER_TYPES.PUBLIC,"1")},[]);return jsxRuntimeExports.jsx(Box,{className:i.boxBackground,children:jsxRuntimeExports.jsxs(Box,{className:i.marginLeft,children:[jsxRuntimeExports.jsx(List,{className:e?i.fullScreenMode:"",children:t.map(function(e){var t=e.key,e=e.text;return jsxRuntimeExports.jsxs(ListItem,{id:"flow-center-navigation-listItem-conatiner","data-test":"flow-center-navigation-tabs-".concat(t),button:!0,disableRipple:!0,selected:n.toLowerCase()===t&&!m,onClick:function(){return e=t,l(toggleIsSearching(!1)),l(toggleIsSearchingLoading(!1)),l(setSearched("")),l(setSearchedTemplates(null)),l(fetchFlows("notebooks"===e?{name:"",ownerType:ENGINE_OWNER_TYPES.NOTEBOOKS}:{name:"",ownerType:ENGINE_OWNER_TYPES.MINE})),void r(e);var e},className:i.paddingLeft,classes:{selected:i.selectedPaddingLeft},children:[jsxRuntimeExports.jsx(ListItemIcon,{className:i.icon,children:(e=>{switch(e){case"mine":return n.toLowerCase()!==e||m?jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$E,alt:"myFlowsBlue"}):jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$D,alt:"myFlows"});case"templates":return n.toLowerCase()!==e||m?jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$B,alt:"templatesBlue"}):jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$A,alt:"templates"});case"notebooks":return n.toLowerCase()!==e||m?jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$E,alt:"myFlowsBlue"}):jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$D,alt:"myFlows"});case"WorkOutlineOutlinedIcon":return jsxRuntimeExports.jsx(default_1$4,{});case"PeopleAltOutlinedIcon":return jsxRuntimeExports.jsx(default_1$3,{});case"PersonOutlineOutlinedIcon":return jsxRuntimeExports.jsx(default_1$2,{});default:return jsxRuntimeExports.jsx(default_1$1,{})}})(t)}),jsxRuntimeExports.jsx(ListItemText,{"data-test":"flow-center-navigation-listItemText",className:"flow-center-navigation-listItemText",primary:e,classes:{primary:i.listItemText}})]},t)})}),a&&(c=e?"calc(100vh - 64px - 16px - 86px - 8px - 54px":"calc(100vh - 64px - 16px - 86px - 8px - ".concat(s?"0px":"54px",")"),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider,{}),jsxRuntimeExports.jsx("div",{className:i.scroll,style:{height:c},children:o.map(function(e,n){var t=e.text,r=e.group,e=e.options;return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(FormControl,{component:"fieldset",className:i.formControl,"data-test":"flow-center-".concat(r,"-container"),id:"flow-center-".concat(r,"-container"),children:[jsxRuntimeExports.jsxs("div",{className:i.filterTitleContainer,children:[jsxRuntimeExports.jsx(FormLabel,{className:i.category,component:"legend",children:t}),jsxRuntimeExports.jsx("div",{className:i.expandIconClass,onClick:function(){return f(n)},children:u.includes(n)?jsxRuntimeExports.jsx(default_1$5,{fontSize:"small",style:{fill:"#555F7C",width:"18px!important",height:"18px!important"}}):jsxRuntimeExports.jsx(default_1$6,{fontSize:"small",style:{fill:"#555F7C",width:"18px!important",height:"18px!important"}})})]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(FormGroup,{className:i.group,children:e.map(function(e){var t=e.text,o=e.value;if(!u.includes(n))return jsxRuntimeExports.jsx(FormControlLabel,{control:jsxRuntimeExports.jsx(Checkbox,{checked:d[r]&&d[r].includes(o),name:o,color:"primary",onClick:function(){return x(r,o)}}),label:jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-table-optionText",className:i.listItemTextFilters,children:t}),"data-test":"flow-center-filter-item",id:"flow-center-filter-item"},"".concat(r,"-").concat(o))})})})]},r+n)},r+n)})})]}))]})})}function _array_like_to_array$7(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$7(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$7(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$7(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$7(e,t){return _array_with_holes$7(e)||_iterable_to_array_limit$7(e,t)||_unsupported_iterable_to_array$7(e,t)||_non_iterable_rest$7()}function _unsupported_iterable_to_array$7(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$7(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$7(e,t):void 0}var MIN_NUM_ITEM_ON_ROW=3,useStyles$c=makeStyles()(function(e){return{container:{marginLeft:"12px!important"},cardRoot:{display:"flex",flexDirection:"column",justifyContent:"center!important",border:"0.5px solid #D5DFE9!important",boxShadow:"none!important",borderRadius:"4px!important",marginRight:"10px!important"},cardContainer:{marginTop:"20px!important",marginLeft:"20px!important",marginBottom:"15px!important",marginRight:"20px!important",maxHeight:"150px",minHeight:"150px",display:"flex",flexDirection:"column"},title:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",wordBreak:"break-word!important",cursor:"pointer",color:"#2A323C!important"},subtitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:500,fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",wordWrap:"break-word!important"},veritoneCertifiedContainer:{display:"flex",marginTop:"10px!important"},veritoneCertified:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:500,fontSize:"10px!important",lineHeight:"18px!important",letterSpacing:"-1.30385e-09px!important",wordWrap:"break-word!important",color:"#2A323C!important",marginLeft:"4px!important"},pos:{marginBottom:12},centerButton:{justifyContent:"center!important"},cardContent:{padding:"0px!important",height:"120px!important",textOverflow:"ellipsis!important"},titleContent:{height:"82px!important",overflow:"auto"},bottomButton:{marginTop:"10px",padding:"0px!important",display:"flex",height:"30px!important"},box:{display:"flex",marginTop:e.spacing(3.2),marginBottom:e.spacing(3.2)},viewAllButton:{color:"#6098D1!important",textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"12px!important",lineHeight:"16px!important",marginRight:"24px!important",letterSpacing:"-1.30385e-09px!important"},createFlowButton:{textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"12px!important",lineHeight:"16px!important",marginLeft:"0px!important",padding:"6px 12px 6px 12px!important",background:e.palette.background.paper,color:"#1871E8!important",letterSpacing:"0.02857em"},viewDetailsButton:{textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"12px!important",lineHeight:"16px!important",background:e.palette.background.paper,color:"#6098D1!important",letterSpacing:"0.02857em"},createBlankFlowButton:{display:"flex",justifyContent:"center!important","& svg":{fill:"#555F7C!important"}},createBlankFlowLayout:{display:"flex",flexDirection:"column"},lowercaseButton:{textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important"},text:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:400,fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important"}}}),TemplateGallery=function(e){function t(e,t){e.data[t].records&&p(e.data[t].records),m(Math.min(MIN_NUM_ITEM_ON_ROW,e.data[t].records.length))}function o(e){s(ENGINE_OWNER_TYPES.TEMPLATES),l(setOpenTemplate({id:e.id,title:e.title})),i(!0)}function n(e){a(e)}var r=e.goToTemplateList,a=e.handleOpenFlowNameDialog,s=e.setScreen,i=e.handleOpenTemplateDetails,l=useDispatch(),c=useStyles$c().classes,e=_sliced_to_array$7(reactExports.useState([]),2),u=e[0],p=e[1],e=_sliced_to_array$7(reactExports.useState(0),2),d=e[0],m=e[1],f=useSelector(sessionTokenSelector),e=_sliced_to_array$7(reactExports.useState(!0),2),x=e[0],g=e[1];reactExports.useEffect(function(){u.length?setTimeout(function(){g(!1)},3e3):fetchTemplateGallery(f,{isPublic:!0}).then(function(e){setTimeout(function(){g(!1)},3e3),t(e,"flowTemplates")}).catch(function(e){devErrorLogger("error fetching flow templates: ".concat(JSON.stringify(e)))})},[t]);return jsxRuntimeExports.jsxs("div",{className:c.container,children:[jsxRuntimeExports.jsxs(Box,{mt:2,mb:2,className:c.box,children:[jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-table-populatTemplates",className:c.text,style:{flexGrow:1},children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.1v6wsw",defaultMessage:"Popular Templates",description:"Templates screen"})}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-gallery-viewAllTemplates",size:"small",className:c.viewAllButton,onClick:r,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.viewall",defaultMessage:"View All",description:"View All Templates Button"})})]}),jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templates-on-flows-page",container:!0,id:"flow-center-templates",children:u.slice(0,d).map(function(e,t){return jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templatesGallery",item:!0,xs:4,children:jsxRuntimeExports.jsx(Card,{className:c.cardRoot,id:"flow-center-template-card",children:jsxRuntimeExports.jsxs("div",{className:c.cardContainer,children:[jsxRuntimeExports.jsxs(CardContent,{className:c.cardContent,children:[jsxRuntimeExports.jsxs("div",{className:c.titleContent,children:[x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:80,height:15}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateGallery-title",className:c.title,gutterBottom:!0,onClick:function(){return o(e)},children:null==e?void 0:e.title}),x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:80,height:15,sx:{mt:"5px"}}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateGallery-subtitle",className:c.subtitle,"aria-multiline":!0,variant:"body2",component:"p",children:e.subtitle})]}),jsxRuntimeExports.jsx("div",{className:c.veritoneCertifiedContainer,children:x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:120,height:15}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("img",{src:img$y,alt:"veritoneCertifiedIcon"}),jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateGallery-veritoneCertified",className:c.veritoneCertified,component:"p",children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.veritonecertified",defaultMessage:"Veritone Certified",description:"Veritone Certified Template Text"})})]})})]}),jsxRuntimeExports.jsxs(CardActions,{className:c.bottomButton,children:[x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:120,height:20}):jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-gallery-createFlowFromTemplate-".concat(t),onClick:function(){return n(e.id)},id:"flow-center-create-flow-btn-".concat(t),size:"small",variant:"outlined",color:"primary",className:c.createFlowButton,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.createflow",defaultMessage:"Create Flow",description:"Complete Flow Button Text"})}),x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:120,height:15}):jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-gallery-viewDetailsForTemplate-".concat(t),onClick:function(){return o(e)},size:"small",color:"primary",className:c.viewDetailsButton,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.viewdetails",defaultMessage:"View Details",description:"View Details Button Text"})})]})]})})},e.title+t)})})]})},SHARED_MESSAGES={noTags:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.ImtbH0",defaultMessage:"No Tags",description:"No Tags"})},createFlowFromTemplate:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.CNPhK1",defaultMessage:"Create Flow From Template",description:"Create Flow From Template"})},overview:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.6+BhsD",defaultMessage:"Overview",description:"Overview"})},developer:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.GKqAH1",defaultMessage:"Developer",description:"Developer"})},certified:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.1tTedK",defaultMessage:"Certified",description:"Certified"})},yes:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.9U4lyw",defaultMessage:"Yes",description:"Yes"})},category:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.RYa6+l",defaultMessage:"Category",description:"Category"})},tags:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.ImtbH1",defaultMessage:"Tags",description:"Tags"})},active:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.UkeQP9",defaultMessage:"Active",description:"Active"})},ready:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.readymessage",defaultMessage:"Ready",description:"Ready"})},pending:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.pendingmessage",defaultMessage:"Pending",description:"Pending"})},draft:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.draftonotactive",defaultMessage:"Not active",description:"Draft to not active translation"})},viewDetails:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.yFa4dd",defaultMessage:"View Details",description:"View Details"})},version:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.i8EBVW",defaultMessage:"Version",description:"Version"})},openFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.IEIrEm",defaultMessage:"Open Flow",description:"Open Flow"})},alwaysUpFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.TYFJtu",defaultMessage:"Schedule Always Up Flow",description:"Schedule Always Up Flow"})},createFlowTemplate:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.XSJ4Aa",defaultMessage:"Create Flow Template",description:"Create Flow Template"})},openFlowAdv:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.IEIfEt",defaultMessage:"Open With Cluster",description:"Open With Cluster"})},deleteFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.MPiXf5",defaultMessage:"Delete Flow",description:"Delete Flow"})},confirmDelete:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.mPEQWb",defaultMessage:"Confirm Delete",description:"Confirm Delete"})},exitFullScreen:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.awe7uYa",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"})},enterFullScreen:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.stiZt+d",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"})},closePanel:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"})},copyFlowID:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.1mDYO7",defaultMessage:"Copy Flow ID",description:"Copy Flow ID"})},hideFilters:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.Iy59d3",defaultMessage:"Hide Filter",description:"Hide Filter"})},showFilters:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.g5zZtA",defaultMessage:"Show Filter",description:"Show Filter"})},showMoreInformation:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.ParFja",defaultMessage:"More Information",description:"More Information"})},hideMoreInformation:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.DXuAKS",defaultMessage:"Close More Information",description:"Close More Information"})},engineIdHasBeenCopied:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.CRvRbB",defaultMessage:"Engine ID has been copied",description:"copy of the engine id"})},cancel:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.6PdOcy",defaultMessage:"Cancel",description:"Cancel"})},delete:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.qviIFp",defaultMessage:"Delete",description:"Delete"})},noFlowsFound:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.WX6wfG",defaultMessage:"No Flows Found",description:"No Flows Found"})},noFlowsFoundSubtitle:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.54mq63",defaultMessage:"Click the ‘Create New Flow’ button below to create your first flow",description:"Click the ‘Create New Flow’ button below to create your first flow"})},createNewFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.54mq64",defaultMessage:"Create New Flow",description:"Create New Flow"})},chooseATemplate:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.jhiPmN",defaultMessage:"Choose a Template",description:"Choose a Template"})},newFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.54mq65",defaultMessage:"New Flow",description:"New Flow"})},newNotebook:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.newNotebookButton",defaultMessage:"New Notebook",description:"New Notebook"})},noSearchResultsFound:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.OYovRP",defaultMessage:"No results found",description:"No results found"})},noSearchResultsFoundSubtitle:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.No+Hwv",defaultMessage:"Sorry, there are no results for this search. Please try another search.",description:"Sorry, there are no results for this search. Please try another search."})},flowsCount:function(e){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.flowscount",defaultMessage:"Flows {flowsCount}",description:"Flows Count",values:{flowsCount:e}})},templatesCount:function(e){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.templatescount",defaultMessage:"Templates {templatesCount}",description:"Templates Count",values:{templatesCount:e}})},notebookCount:function(e){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.notebookCount",defaultMessage:"Notebooks {notebookCount}",description:"Notebook Count",values:{notebookCount:e}})}},useCommonStyles=makeStyles()(function(e){return{title:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:600,fontSize:"18px!important",lineHeight:"24px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",paddingBottom:"2px!important",paddingLeft:"0px!important",paddingRight:"0px!important",paddingTop:"0px!important"},content:{fontFamily:"Nunito",fontWeight:"normal",fontStyle:"normal",fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",paddingLeft:"0px!important",paddingRight:"0px!important",paddingBottom:"0px!important"},cancelButton:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",padding:"8px 15px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",textTransform:"none"},confirmationButton:{textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",background:"#0D62D2!important",color:e.palette.background.paper,padding:"8px 15px!important",marginLeft:"22px!important"},disabledButton:{background:"#efefef4d!important",color:"#00000042",textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",padding:"8px 15px!important",marginLeft:"22px!important"},actions:{padding:"0px!important",marginTop:"30px!important"},container:{padding:"30px!important"},active:{margin:"auto 10px",fontSize:"15px!important",color:"".concat(e.palette.success.main," !important"),lineHeight:"18px"},inactive:{margin:"auto 10px",fontSize:"15px!important",color:"".concat(e.palette.error.main," !important"),lineHeight:"18px"}}}),SHARED_DATE_TIME={getDate:function(e){return jsxRuntimeExports.jsx(FormattedDate,{value:e,day:"2-digit",month:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}};function _array_like_to_array$6(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$6(e){if(Array.isArray(e))return e}function asyncGeneratorStep$2(e,t,o,n,r,a,s){try{var i=e[a](s),l=i.value}catch(e){return void o(e)}i.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator$2(i){return function(){var e=this,s=arguments;return new Promise(function(t,o){var n=i.apply(e,s);function r(e){asyncGeneratorStep$2(n,t,o,r,a,"next",e)}function a(e){asyncGeneratorStep$2(n,t,o,r,a,"throw",e)}r(void 0)})}}function _define_property$3(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _iterable_to_array_limit$6(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$6(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$3(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):n).forEach(function(e){_define_property$3(t,e,o[e])})}return t}function ownKeys(e,t){var o=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),o.push.apply(o,e)),o}function _object_spread_props(t,o){return o=null!=o?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}),t}function _sliced_to_array$6(e,t){return _array_with_holes$6(e)||_iterable_to_array_limit$6(e,t)||_unsupported_iterable_to_array$6(e,t)||_non_iterable_rest$6()}function _unsupported_iterable_to_array$6(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$6(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$6(e,t):void 0}function _ts_generator$2(n,r){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(o){return function(e){var t=[o,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var useStyles$b=makeStyles()(function(){return{disabledButton:{background:"#efefef4d!important",color:"#00000042"},fullWidth:{width:"100%"},paddingDiv:{paddingTop:"20px"},buttonDiv:{display:"flex"}}}),FlowList=function(e){function t(e){return jsxRuntimeExports.jsx(TableSortLabel,{active:y===e,IconComponent:default_1$6,direction:y===e?j:"asc",onClick:function(){return le(e)},classes:{icon:x.sortIcon}})}function o(e){X(!1),e&&deleteEngine(b,_).then(function(t){var e,o;t.data&&t.data.deleteEngine&&t.data.deleteEngine.id?(e=lodashExports.findIndex(E,function(e){return e.id===t.data.deleteEngine.id}),(o=JSON.parse(JSON.stringify(E))).splice(e,1),f(setFlows(o)),F("FLOW_DELETED_SUCCESS")):(v(""),F("FLOW_DELETED_FAIL"))}).catch(function(e){e.message.includes("engine state")?fetchEngine(b,1,_).then(function(e){v(e.data.engine.state),F("FLOW_DELETED_FAIL")}).catch(function(e){v(""),F("FLOW_DELETED_FAIL")}):(v(""),F("FLOW_DELETED_FAIL"))}).finally(function(){T(!0)})}function n(){T(!1)}function i(e){var e=e||b,t=h?"latest":ue(e),o="".concat(w,"/flow/").concat(e,"/").concat(t);s&&(o="".concat(w,"/notebook/").concat(e,"/").concat(t)),window.open(o,"_blank","noopener,noreferrer")}function l(e){return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography,{"data-test":"flow-widget-executions-table-time",className:x.dateTime,children:e?SHARED_DATE_TIME.getDate(e):null}),jsxRuntimeExports.jsx(Typography,{"data-test":"flow-widget-executions-table-time-caption",variant:"caption",className:x.dateTimeSmall,children:e?DateTime_1.fromISO(e).toLocaleString(DateTime_1.TIME_SIMPLE):null})]})}function D(e,t){te(t)}function L(e){oe(parseInt(e.target.value,10)),te(0)}var r,a,c=e.onSelectFlow,k=e.simpleMode,P=e.screenName,u=e.selectedFlowId,s=e.notebooks,B=e.setFirstFlowId,G=e.zIndex,p=e.showTitle,p=void 0===p||p,W=e.setOpenFlowDetails,d=e.createFlowTemplate,m=e.setOpenAlwaysUpFlow,z=e.betaFeatures,f=useDispatch(),x=flowStyles().classes,g=useCommonStyles().classes,e=useStyles$b().classes,_=useSelector(sessionTokenSelector),E=useSelector(function(e){return s?e.flows.notebooks:e.flows.flows}),w=useSelector(automateUrlSelector),h=useSelector(function(e){return e.flows.isRevisionsExistOnServer}),S=_sliced_to_array$6(reactExports.useState(null),2),H=S[0],U=S[1],S=_sliced_to_array$6(reactExports.useState("desc"),2),j=S[0],Y=S[1],S=_sliced_to_array$6(reactExports.useState("modifiedDateTime"),2),y=S[0],V=S[1],S=_sliced_to_array$6(reactExports.useState(!1),2),q=S[0],K=S[1],S=_sliced_to_array$6(reactExports.useState(""),2),b=S[0],Q=S[1],S=_sliced_to_array$6(reactExports.useState(!1),2),J=S[0],X=S[1],S=_sliced_to_array$6(reactExports.useState(!1),2),Z=S[0],T=S[1],S=_sliced_to_array$6(reactExports.useState(""),2),ee=S[0],F=S[1],S=_sliced_to_array$6(reactExports.useState(""),2),R=S[0],v=S[1],S=_sliced_to_array$6(reactExports.useState(0),2),N=S[0],te=S[1],S=_sliced_to_array$6(reactExports.useState(100),2),C=S[0],oe=S[1],I=useSelector(newFlowClusterIDSelector)||null,S=_sliced_to_array$6(reactExports.useState([]),2),S=S[0],A=_sliced_to_array$6(reactExports.useState(!1),2),ne=A[0],re=A[1],A=_sliced_to_array$6(reactExports.useState(!1),2),ae=A[0],se=A[1],O=useSelector(controllerUrlSelector),A=useSelector(automateControllerUrlSelector),O=O||A.replace("automate-",""),ie=(r=_async_to_generator$2(function(t,o,n){var r;return _ts_generator$2(this,function(e){switch(e.label){case 0:return r="".concat(t,"/edge/v1/flow/").concat(n,"/always-up/api/status"),[4,getFlowStatus(r,o)];case 1:return(r=e.sent())&&"started"===r.status?se(!0):se(!1),[2]}})}),function(e,t,o){return r.apply(this,arguments)}),M=(reactExports.useEffect(function(){ie(O,_,b)},[b,_,O]),function(){re(!1),f(newFlowClusterIDAction(""))}),A={EMPTY:null,ENGINE_COPIED:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.sGx+Oj",defaultMessage:"Engine ID has been copied",description:"msg delete flow"}),FLOW_DELETED_SUCCESS:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.2Trjxv",defaultMessage:"Flow has been successfully deleted",description:"msg delete flow"}),FLOW_DELETED_FAIL:R?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.himmqH1",defaultMessage:"Flow has not been deleted. Invalid Delete State: {flowState}. Pause the flow and try again.",description:"msg delete flow failed from invalid state",values:{flowState:R}}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.himmqH",defaultMessage:"Flow has not been deleted",description:"msg delete flow failed"})},R={OPEN_FLOW_SETTINGS:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.hirqzH",defaultMessage:"Flow Settings",description:"msg flow settings"}),CANCEL_SELECT_CLUSTER:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.hiqxrt",defaultMessage:"Cancel",description:"msg cancel select cluster"}),OPEN_FLOW:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jbxqqH",defaultMessage:"Open Flow",description:"msg open flow"}),CREATE_FLOW_ADVANCED:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jbxqty",defaultMessage:"Create Flow Advanced",description:"msg create flow Advanced"})},le=function(e){Y(y===e&&"asc"===j?"desc":"asc"),V(e)},ce=function(e,t,o){return t[o]<e[o]?-1:e[o]<t[o]?1:0},ue=function(t){var e=E.find(function(e){return e.id===t});if(e)return(e=e.builds).records.length?null==(e=e.records[0])?void 0:e.id:"latest"},$=E.find(function(e){return e.id===b});return E&&0===E.length?jsxRuntimeExports.jsx(NoResults,{}):jsxRuntimeExports.jsxs(Box,{mt:p?2:0,children:[p&&jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-screenName",className:x.text,style:{flexGrow:1},children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.+YGVPH",defaultMessage:"Screen Name: {screenName}",description:"{screenName}",values:{screenName:P}})}),jsxRuntimeExports.jsx(TableContainer,{id:"flow-center-flows-table","data-test":"flow-center-flows-table",children:jsxRuntimeExports.jsxs(Table,{className:x.table,children:[jsxRuntimeExports.jsx(TableHead,{children:jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.firstTitle," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.n60v17",defaultMessage:"Flow Name",description:"Flow Name"}),jsxRuntimeExports.jsx(TableSortLabel,{active:"name"===y,direction:"name"===y?j:"asc",onClick:function(){return le("name")},IconComponent:default_1$6,classes:{icon:x.sortIcon}})]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.w+rzfS",defaultMessage:"Status",description:"Status"}),t("state")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.Pzb4Cj",defaultMessage:"Last Updated",description:"Last Updated"}),t("modifiedDateTime")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.Dj0J2e",defaultMessage:"Date Created",description:"Date Created"}),t("createdDateTime")]}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader)})]})}),jsxRuntimeExports.jsx(TableBody,{children:E&&((e,n)=>((e=e.map(function(e,t){return[e,t]})).sort(function(e,t){var o=n(e[0],t[0]);return 0!==o?o:e[1]-t[1]}),null!=e&&e.length&&B(e[0][0].id),e.map(function(e){return e[0]})))(E,(a=y,"desc"===j?function(e,t){return ce(e,t,a)}:function(e,t){return-ce(e,t,a)})).slice(N*C,N*C+C).map(function(e,t){var o=e.name,n=e.state,r=e.modifiedDateTime,a=e.createdDateTime,s=e.id,e=e.builds;return jsxRuntimeExports.jsxs(TableRow,{id:"flow-center-flow-item","data-test":"flow-center-flow-item",hover:!0,className:"".concat(u===s?x.tableRowClass:""," ").concat(x.tableRow," ").concat(x.borderBottomLineRow),classes:{selected:x.tableRowSelected},selected:u===s||b===s,onClick:function(e){k?c(s,!1):i(s)},children:[jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsxs("div",{className:"".concat(x.boxCell," ").concat(x.firstColumn),children:[jsxRuntimeExports.jsx("p",{className:x.flowName,children:o}),jsxRuntimeExports.jsxs("div",{className:x.boxSubtitle,children:[jsxRuntimeExports.jsx(Tooltip,{title:SHARED_MESSAGES.copyFlowID(),children:jsxRuntimeExports.jsx("img",{src:img$t,alt:"copyID",draggable:"false",onClick:function(e){var t=s;e.stopPropagation(),(e=document.createElement("textarea")).value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),T(!0),F("ENGINE_COPIED"),setTimeout(function(){T(!1),F("EMPTY")},2e3)}})}),(e=e,jsxRuntimeExports.jsxs("p",{className:x.flowVersion,children:[SHARED_MESSAGES.version()," ",lodashExports.get(e,"records[0].version",0)]}))]})]})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsx(StatusPill,{dataTest:"flow-center-flows-table-state",state:n,colorSelector:void 0,backgroundSelector:void 0})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:a&&l(r)}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:a&&l(a)}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsx(IconButton,{className:x.moreActionsBtn,"data-test":"flow-center-action-btn-toggleOpenMenu",onClick:function(e){return t=s,(e=e).stopPropagation(),K(!0),U(e.currentTarget),void Q(t);var t},size:"large",children:jsxRuntimeExports.jsx(default_1$8,{})})})]},"".concat(o," + ").concat(t))})})]})}),jsxRuntimeExports.jsx(TablePagination,{className:x.title,rowsPerPageOptions:[10,25,50,100,200],component:"div",count:E.length,rowsPerPage:C,page:N,onPageChange:D,onRowsPerPageChange:L}),jsxRuntimeExports.jsx(Popper,{disablePortal:!0,style:{zIndex:G},open:q,anchorEl:H,transition:!0,placement:"bottom-end",children:function(e){e=e.TransitionProps;return jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:function(){K(!1),c("",!1),Q(""),W(!1),m(!1)},children:jsxRuntimeExports.jsx(Fade,_object_spread_props(_object_spread$3({},e),{timeout:350,children:jsxRuntimeExports.jsxs(Paper,{className:x.paperContainer,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-viewDetails",onClick:function(){c(b,!1)},startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$F,alt:"openInNewIcon"}),className:x.popperBtns,children:SHARED_MESSAGES.viewDetails()}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-viewRunningInstances",onClick:function(){c(b,!0)},startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$C,alt:"openInNewIcon"}),className:x.popperBtns,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"fc.flowList.runningInstances",defaultMessage:"View Running Instances",description:"View Running Instances"})}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-openFlow",className:x.popperBtns,startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$17,alt:"openInNewIcon"}),onClick:function(e){i()},children:SHARED_MESSAGES.openFlow()}),z&&jsxRuntimeExports.jsxs(Button,{"data-test":"flow-center-flow-list-always-up-flow",onClick:function(){m(!0,b)},startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$9,alt:"alwaysUpFlow"}),className:x.popperBtns,children:[SHARED_MESSAGES.alwaysUpFlow(),jsxRuntimeExports.jsx(Tooltip,{title:"Changes can take up to 5 min to enact.",placement:"bottom",children:jsxRuntimeExports.jsx(default_1$9,{className:ae?g.active:g.inactive})})]}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-createFlowTemplate",className:x.popperBtns,startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$a,alt:"openInNewIcon"}),onClick:function(e){var t;t=b,d&&d(t||b)},children:SHARED_MESSAGES.createFlowTemplate()}),jsxRuntimeExports.jsx("hr",{className:x.popperHr}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-open-deleteFlow",className:x.popperBtns,startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$V,alt:"deleteIcon"}),onClick:function(){X(!0)},children:SHARED_MESSAGES.deleteFlow()})]})}))})}}),$&&jsxRuntimeExports.jsxs(Dialog,{role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:J,classes:{paper:g.container},onClose:function(){return o(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[jsxRuntimeExports.jsx(DialogTitle,{className:g.title,children:SHARED_MESSAGES.confirmDelete()}),jsxRuntimeExports.jsx(DialogContent,{className:g.content,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.jFIlbR",defaultMessage:"Are you sure you want to delete {flowName}? This action can not be undone.",description:"Are you sure you want to delete [Engine_Name]? This action can not be undone.”",values:{flowName:(null==$?void 0:$.name)||""}})}),jsxRuntimeExports.jsxs(DialogActions,{className:g.actions,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-cancelDeleteFlow",onClick:function(){return o(!1)},className:g.cancelButton,children:SHARED_MESSAGES.cancel()}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-submitDeleteFlow",onClick:function(){return o(!0)},className:g.confirmationButton,autoFocus:!0,children:SHARED_MESSAGES.delete()})]})]}),$&&ne&&jsxRuntimeExports.jsxs(Dialog,{role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:ne,classes:{paper:g.container},onClose:function(){return M()},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[jsxRuntimeExports.jsx(DialogTitle,{className:g.title,children:R.OPEN_FLOW_SETTINGS}),jsxRuntimeExports.jsxs(DialogContent,{className:g.content,children:[jsxRuntimeExports.jsx("div",{className:"".concat(e.paddingDiv),children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jFdgxR",defaultMessage:"Select an edge cluster to be used to run your flow",description:"Select an edge cluster to be used to run your flow"})}),jsxRuntimeExports.jsx("div",{className:"".concat(e.paddingDiv),children:jsxRuntimeExports.jsx(Select,{id:"os-flow-center-header-cluster-select.hGcgxR",value:I.newFlowClusterID,onChange:function(e){f(newFlowClusterIDAction(e.target.value))},className:"".concat(e.fullWidth),children:null==S?void 0:S.map(function(e){return jsxRuntimeExports.jsx(MenuItem,{value:null==e?void 0:e.id,children:null==e?void 0:e.name},null==e?void 0:e.id)})})})]}),jsxRuntimeExports.jsxs(DialogActions,{className:g.actions,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-cancelSelectCluster",onClick:function(){return M()},className:g.cancelButton,children:R.CANCEL_SELECT_CLUSTER}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-openFlowAdvDialog",onClick:function(){return e=(e=null==$?void 0:$.id)||b,t=h?"latest":ue(e),o="".concat(w,"/flow/").concat(e,"/").concat(t),s&&(o="".concat(w,"/notebook/").concat(e,"/").concat(t)),I.newFlowClusterID?(window.open("".concat(w,"/flow/").concat(e,"/").concat(t,"/").concat(I.newFlowClusterID,"/default-cluster"),"_blank","noopener"),f(newFlowClusterIDAction(""))):window.open(o,"_blank","noopener,noreferrer"),void M();var e,t,o},className:g.confirmationButton,autoFocus:!0,children:R.OPEN_FLOW})]})]}),jsxRuntimeExports.jsx(Snackbar,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:Z,autoHideDuration:6e3,onClose:n,message:A[ee],action:jsxRuntimeExports.jsx(IconButton,{size:"small","aria-label":"close",color:"inherit","data-test":"flow-center-action-btn-close",onClick:n,children:jsxRuntimeExports.jsx(default_1$a,{fontSize:"small"})})})]})};function _array_like_to_array$5(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$5(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$5(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$5(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$5(e,t){return _array_with_holes$5(e)||_iterable_to_array_limit$5(e,t)||_unsupported_iterable_to_array$5(e,t)||_non_iterable_rest$5()}function _unsupported_iterable_to_array$5(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$5(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$5(e,t):void 0}var useStyles$a=makeStyles()(function(e){return{typography:{marginBottom:"25px!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"24px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important",display:"flex!important"},firstColumn:{paddingLeft:"12px!important"},bold:{fontWeight:600,color:"#2A323C!important",minWidth:"110px!important"},borderRight:{borderWidth:"0px!important",borderRightWidth:"1px!important",borderColor:"#aaa!important",borderStyle:"solid!important"},boxSubtitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontSize:"16px!important",lineHeight:"22px!important",color:"#5C6269!important",fontWeight:400,letterSpacing:"-1.30385e-09px!important"},boxEngineTitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:500,fontSize:"18px!important",lineHeight:"24px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important",marginBottom:"10px!important"},engineTitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:400,fontSize:"16px!important",lineHeight:"22px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important"},boxTitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"28px!important",lineHeight:"22px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important"},button:{textTransform:"none!important",marginTop:"17px!important",marginBottom:"12px!important",border:"1px solid #1871E8!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important",background:e.palette.background.paper,color:"#1871E8!important",padding:"6px 10px!important"},enginesAndFlowWidgetContainer:{display:"flex",width:"100%!important",height:"100%!important"},flowWidgetContainer:{flex:"0 0 720px!important",borderLeft:"0.5px solid #D5DFE9!important",overflowY:"auto!important"},enginesContainer:{width:"100%!important",overflowY:"auto!important"},table:{border:"none!important"},tableRow:{"&:hover":{cursor:"pointer",backgroundColor:"#EEF3F9!important","& td":{backgroundColor:"#EEF3F9!important"}}},boxCell:{marginTop:"20px!important",marginBottom:"20px!important"},borderBottomLine:{padding:"0px!important",paddingLeft:"16px!important"},tableRowClass:{backgroundColor:"#F2F5F9!important"},templateSelected:{background:"#F2F5F9!important",borderRadius:"4px!important",borderTop:"3px solid #F2F5F9!important",borderBottom:"3px solid #F2F5F9!important"},infoValue:{width:"80%",borderBottom:"0.5px solid #D5DFE9!important",paddingBottom:"22px!important",color:"#2A323C!important",fontWeight:"normal!important","& div":{marginLeft:"8px!important"}},infoValueContainer:{display:"flex",alignItems:"center","& img":{marginLeft:"8px!important"}},lastUpdated:{marginTop:"3px!important",fontFamily:"Nunito",fontSize:"12px!important",lineHeight:"18px!important",display:"flex!important",color:"#5C6269!important"},wrapperOverview:{marginTop:"15px!important",marginBottom:"21px!important"},flowWidgetContent:{height:"100%!important",marginTop:e.spacing(6.4),marginLeft:e.spacing(6.4)},title:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important"}}}),TemplateList=function(e){function n(){return f.findIndex(function(e){return e.id===u.id})}function r(e){return e.filter(function(e){return!e.tags||!e.tags.includes("Alteryx")})}function a(t){var o=[];return f.map(function(e){e[t]&&e[t].length&&e[t].forEach(function(e){o.includes(e)||""===e||o.push(e)})}),o}var t=e.handleOpenFlowNameDialog,o=e.openFirstTemplate,s=e.onSelectedTemplate,i=e.isDeselectedTemplate,l=useDispatch(),c=useStyles$a().classes,u=useSelector(function(e){return e.flows.templateToOpen}),e=useSelector(function(e){return e.flows.searchedTemplates}),p=useSelector(function(e){return e.flows.isSearching}),d=useSelector(sessionTokenSelector),m=_sliced_to_array$5(reactExports.useState([]),2),f=m[0],x=m[1],m=_sliced_to_array$5(reactExports.useState([]),2),g=m[0],_=m[1],m=_sliced_to_array$5(reactExports.useState({}),2),E=(m[0],m[1]),m=_sliced_to_array$5(reactExports.useState(n()),2),w=m[0],h=m[1],m=useSelector(function(e){return e.flows.filteredTemplates}),S=_sliced_to_array$5(reactExports.useState(0),2),j=S[0],y=S[1],S=_sliced_to_array$5(reactExports.useState(100),2),b=S[0],T=S[1],F=function(e){t(e)},R=(reactExports.useEffect(function(){f.length||fetchTemplateGallery(d,{isPublic:!0,limit:300}).then(function(e){var t=e,o="flowTemplates";t=e.data[o].records,o=r(t),x(o),setFilteredTemplatesAction(o),h(n())}).catch(function(e){devErrorLogger("error fetching flow templates: ".concat(JSON.stringify(e)))})},[f]),reactExports.useEffect(function(){h(n())},[f,n]),reactExports.useEffect(function(){lodashExports.isEmpty(u)&&(o?null!=f&&f.length&&(E(f[0]),h(0),l(setOpenTemplate({id:f[0].id,title:f[0].title}))):(h(-1),l(setOpenTemplate({id:null,title:null}))))},[l,o,f,u]),reactExports.useEffect(function(){!w||i||u||(h(-1),l(setOpenTemplate({id:null,title:null})))},[i,l,w]),useSelector(function(e){return e.flows.selectedFilters})),S=(reactExports.useEffect(function(){var e,t,o,n;f&&0<f.length&&(e=a("tags"),t=a("categories"),n=[],f.map(function(e){e.author&&(e=e.author.trim(),n.includes(e)||""===e||n.push(e))}),o=n,l(setTagsToStore(e)),l(setCategories(t)),l(setTemplatesAuthors(o))),l(setTemplatesAction(f))},[f,l]),reactExports.useEffect(function(){var e={isPublic:!(!R.public||"1"!==R.public[0]),categories:null==R?void 0:R.categories,tags:null==R?void 0:R.tags,developers:null==R?void 0:R.author,limit:300};fetchTemplateGallery(d,e).then(function(e){e=e.data.flowTemplates.records,e=r(e);setFilteredTemplatesAction(e),_(e)}).catch(function(e){devErrorLogger("error fetching flow templates: ".concat(JSON.stringify(e)))})},[l,R]),reactExports.useEffect(function(){l(setFilteredTemplatesAction(g.filter(function(e){return null!=e})))},[j,b,g]),[]),S=p?e:m,v=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TableContainer,{children:jsxRuntimeExports.jsxs(Table,{className:c.table,children:[jsxRuntimeExports.jsx(TableHead,{}),jsxRuntimeExports.jsx(TableBody,{children:S&&S.slice(j*b,j*b+b).map(function(e,t){return o=e,n=t,jsxRuntimeExports.jsx(TableRow,{hover:!0,className:"".concat(n===w?c.tableRowClass:""," ").concat(c.tableRow),selected:n===w,id:"flow-center-templates-list-item","data-test":"flow-center-templates-list-item",children:jsxRuntimeExports.jsx(TableCell,{className:c.borderBottomLine,onClick:function(){E(o),h(n),l(setOpenTemplate({id:o.id,title:o.title})),s(!0)},children:jsxRuntimeExports.jsx(Box,{className:"".concat(c.boxCell," ").concat(c.firstColumn),children:jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateList-title",className:c.engineTitle,children:o.title})})})},"".concat(o.id,"-").concat(n));var o,n})})]})}),jsxRuntimeExports.jsx(TablePagination,{className:c.title,rowsPerPageOptions:[10,25,50,100,200],component:"div",count:m.length,rowsPerPage:b,page:j,onPageChange:function(e,t){y(t)},onRowsPerPageChange:function(e){T(parseInt(e.target.value,10)),y(0)}})]}),p=function(){return jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templates-list-container",container:!0,id:"flow-center-templates-list-container",children:jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templates-list-subcontainer",item:!0,xs:12,children:jsxRuntimeExports.jsx(Box,{children:v})})})},S=function(){var e;return jsxRuntimeExports.jsxs("div",{className:c.enginesAndFlowWidgetContainer,children:[jsxRuntimeExports.jsx("div",{className:c.enginesContainer,children:jsxRuntimeExports.jsx(Box,{className:-1===w?c.borderRight:"",children:v})}),jsxRuntimeExports.jsx("div",{"data-test":"flow-center-flows-templateList-selected-container",className:c.flowWidgetContainer,children:jsxRuntimeExports.jsxs(Box,{mt:4,ml:4,className:c.flowWidgetContent,children:[jsxRuntimeExports.jsx(Box,{display:"flex",alignItems:"center",children:jsxRuntimeExports.jsx(Box,{id:"template-widget-title","data-test":"template-widget-title",children:jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateList-selectedTitle",className:c.boxTitle,children:null==(e=f[w])?void 0:e.title})})}),jsxRuntimeExports.jsx(Box,{m:1,ml:0,mb:0,children:jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-list-createFlowFromTemplate-".concat(null==(e=f[w])?void 0:e.title),color:"primary",onClick:function(){return F?F(f[w].id):""},className:c.button,startIcon:jsxRuntimeExports.jsx("img",{src:img$w,alt:"plus icon"}),children:SHARED_MESSAGES.createFlowFromTemplate()})}),jsxRuntimeExports.jsxs(Box,{my:4,children:[jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-overview",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.overview(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:null==(e=f[w])?void 0:e.subtitle})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-developer",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.developer(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:null==(e=f[w])?void 0:e.author})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-certified",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.certified(),":"]}),jsxRuntimeExports.jsxs("div",{className:"".concat(c.infoValue," ").concat(c.infoValueContainer),children:[jsxRuntimeExports.jsx("div",{children:SHARED_MESSAGES.yes()}),jsxRuntimeExports.jsx("img",{src:img$y,alt:"veritoneCertifiedIcon"})]})]}),f[w]&&f[w].categories&&f[w].categories.length&&""!==f[w].categories[0]&&jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-category",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.category(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:null==(e=f[w])?void 0:e.categories.join(", ")})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-tags",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.tags(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:(null==(e=f[w])||null==(e=e.tags)?void 0:e.join(", "))||SHARED_MESSAGES.noTags()})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-infoValue",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.active(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:SHARED_MESSAGES.yes()})})]})]}),jsxRuntimeExports.jsx("img",{style:{width:"100%"},src:null==(e=f[w])?void 0:e.image,alt:""})]})})]})};return e&&0===e.length?jsxRuntimeExports.jsx(NoResults,{}):(-1===w?p:S)()},useSharedStyles=makeStyles()(function(e){return{actionIcon:{padding:"10px!important",marginRight:"-8px!important","& svg":{fill:"#555F7C!important"}},actionIconClose:{padding:"10px!important",backgroundColor:"#EEF3F9!important",marginRight:"-8px!important","& svg":{fill:"#555F7C!important"}}}});function FiltersControl(e){var t=useSharedStyles().classes;return jsxRuntimeExports.jsx(Tooltip,{title:e.showNavigation?SHARED_MESSAGES.hideFilters():SHARED_MESSAGES.showFilters(),children:jsxRuntimeExports.jsx(IconButton,{"data-test":"flow-center-action-btn-toggleNavigation",onClick:function(){return e.setShowNavigation(!e.showNavigation)},className:"".concat(e.showNavigation?t.actionIconClose:t.actionIcon),size:"large",children:e.showNavigation?jsxRuntimeExports.jsx("img",{width:24,height:24,src:img$u,alt:"filterCloseIcon",draggable:"false"}):jsxRuntimeExports.jsx(default_1,{})})})}var useStyles$9=makeStyles()(function(){return{iconDistance:{marginLeft:"8px!important"}}});function MoreInfControl(e){var t=useStyles$9().classes,o=useSharedStyles().classes;return jsxRuntimeExports.jsx(Tooltip,{title:e.openFlowDetails?SHARED_MESSAGES.hideMoreInformation():SHARED_MESSAGES.showMoreInformation(),children:jsxRuntimeExports.jsx(IconButton,{"data-test":"flow-center-action-btn-openFlowWidget",onClick:function(){return e.setOpenFlowDetails()},className:"".concat(t.iconDistance," ").concat(e.openFlowDetails?o.actionIconClose:o.actionIcon),size:"large",children:jsxRuntimeExports.jsx("img",{width:24,height:24,src:img$Z,alt:"filterCloseIcon",draggable:"false"})})})}var useStyles$8=makeStyles()(function(e){return{grow:{flex:1,maxWidth:"unset!important"},flowsLength:{marginLeft:"6px!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"400!important",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"0px!important",color:"#5C6269!important"},toolbar:{position:"sticky!important",top:"0!important",zIndex:"1!important",backgroundColor:"white!important",marginLeft:0,paddingLeft:"12px!important",borderBottom:"0.5px solid #D5DFE9",paddingRight:"24px!important"},searchResultLength:{paddingLeft:"26px!important"},title:{display:"flex",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"600!important",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"0px!important",color:"#2A323C!important"},additionalOptBtn:{padding:e.spacing(1)+"px!important"}}});function Toolbar(e){var t=e.header,o=e.setShowNavigation,n=e.showNavigation,r=e.setOpenFlowDetails,a=e.openFlowDetails,e=e.screen,s=useStyles$8().classes,i=useSelector(function(e){return e.flows.flows}),l=useSelector(function(e){return e.flows.notebooks}),c=useSelector(function(e){return e.flows.isSearching}),u=useSelector(function(e){return e.flows.fetchingFlows}),p=useSelector(function(e){return e.flows.isSearchingLoading}),d=useSelector(function(e){return e.flows.filteredTemplates})||[],m=useSelector(function(e){return e.flows.searchedTemplates})||[];return jsxRuntimeExports.jsxs(Toolbar$1,{className:"".concat(s.toolbar," ").concat(c?s.searchResultLength:""),id:"flow-center-toolbar-id",children:[jsxRuntimeExports.jsxs(Typography,{className:s.title,children:[c?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.eHPGww",defaultMessage:"Search Results",description:"flow-center-header-title"}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.vYqggl",defaultMessage:"{defaultMessage}",description:"flow-center-header-title",values:{defaultMessage:null==t?void 0:t.text}}),(()=>{if(c)return jsxRuntimeExports.jsx("div",{children:p?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:40,height:18,sx:{marginLeft:"10px"}}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-searchResultsLength",className:s.flowsLength,children:i.length+m.length+l.length})});switch(null==t?void 0:t.key){case ENGINE_OWNER_TYPES.MINE:return jsxRuntimeExports.jsx("div",{children:u?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:40,height:18,sx:{marginLeft:"10px"}}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-flowLength",className:s.flowsLength,children:i.length})});case ENGINE_OWNER_TYPES.TEMPLATES:return jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-filteredTemplatesLength",className:s.flowsLength,children:d.length});case ENGINE_OWNER_TYPES.NOTEBOOKS:return jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-flowLength",className:s.flowsLength,children:l.length});default:return jsxRuntimeExports.jsx("div",{})}})()]}),jsxRuntimeExports.jsx("div",{className:s.grow}),(null==t?void 0:t.key)===ENGINE_OWNER_TYPES.TEMPLATES&&jsxRuntimeExports.jsx(FiltersControl,{setShowNavigation:o,showNavigation:n}),(0!==i.length||e===ENGINE_OWNER_TYPES.TEMPLATES)&&jsxRuntimeExports.jsx(MoreInfControl,{setOpenFlowDetails:r,openFlowDetails:a})]})}var useStyles$7=makeStyles()(function(e){return{title:{alignSelf:"center",flexBasis:"200px!important",fontFamily:"Dosis!important",fontStyle:"normal!important",fontWeight:"600!important",fontSize:"18px!important",lineHeight:"23px!important",letterSpacing:"0.25px!important",textTransform:"uppercase!important",color:"#5C6269!important"}}});function HeaderBarTitle(e){var t=useStyles$7().classes;return jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-headerbar-title",className:t.title,noWrap:!0,id:"flow-center-headerbar-title",children:e.title})}function _array_like_to_array$4(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$4(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$4(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$4(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$4(e,t){return _array_with_holes$4(e)||_iterable_to_array_limit$4(e,t)||_unsupported_iterable_to_array$4(e,t)||_non_iterable_rest$4()}function _unsupported_iterable_to_array$4(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$4(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$4(e,t):void 0}var useStyles$6=makeStyles()(function(e){return{root:{},container:{width:"570px",background:"#fff",borderRadius:"50px"},searchInputContainer:{width:"100%",borderRadius:"50px",display:"flex",alignItems:"center",padding:"7px"},searchInputContainerDefault:{backgroundColor:"#fff",border:"0.5px solid #D5DFE9"},searchInputContainerHover:{border:"0.5px solid #A8B2BC","& input::placeholder":{opacity:"1!important",color:"#2A323C!important"}},searchInputContainerActive:{border:"0.5px solid #0D62D2"},input:{},searchInput:{border:"0",outline:"none",background:"transparent !important",width:"100%",fontSize:"15px","&::placeholder":{opacity:"0.4"},"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #FFF inset"}},searchIconContainer:{padding:"0px 7px",display:"flex",alignItems:"center",justifyContent:"center"},closeIcon:{fill:"#555F7C!important",cursor:"pointer!important",width:e.spacing(2)+"px!important",height:e.spacing(2)+"px!important"},grow:{flexGrow:1},setDisplay:{display:"none"}}});function HeaderBarSearchBar(o){function e(e){var t=""!==e.target.value;n(toggleIsSearching(t)),n(toggleIsSearchingLoading(!0)),n(fetchFlows({name:e.target.value,ownerType:ENGINE_OWNER_TYPES.MINE})),o.enableNotebooks&&n(fetchNotebooks({name:e.target.value,ownerType:ENGINE_OWNER_TYPES.NOTEBOOKS})),n(setSearched(e.target.value))}var t=useStyles$6().classes,n=useDispatch(),r=_sliced_to_array$4(reactExports.useState(!1),2),a=r[0],s=r[1],r=_sliced_to_array$4(reactExports.useState(!1),2),i=r[0],l=r[1],r=useSelector(function(e){return e.flows.searched}),c=useSelector(preferredLanguageSelector)||"en",c=AIWareFormatMessage(c);return o.showSearchBar?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{id:"flow-center-headerbar-searchbar-id",className:t.container,onMouseEnter:function(){return s(!0)},onMouseLeave:function(){s(!1)},children:jsxRuntimeExports.jsxs("div",{className:"".concat(t.searchInputContainer," ").concat(a||i?a&&!i?t.searchInputContainerHover:i?t.searchInputContainerActive:void 0:t.searchInputContainerDefault),children:[jsxRuntimeExports.jsx("div",{className:t.searchIconContainer,children:jsxRuntimeExports.jsx(Search,{fontSize:"small",sx:{color:a||i?"#555F7C":"#555F7C99"}})}),jsxRuntimeExports.jsx("input",{id:"flow-center-headerbar-searchbar","data-test":"flow-center-headerbar-searchbar",value:r,onFocus:function(){return l(!0)},onBlur:function(){return l(!1)},placeholder:c({id:"os-flow-center.searchflowcenter1",defaultMessage:"Search the flow center",description:"Placeholder for search flow center search box."}),className:t.searchInput,onChange:e}),r&&jsxRuntimeExports.jsx(Close$1,{fontSize:"small",sx:{color:a||i?"#555F7C":"#555F7C99"},onClick:function(){n(toggleIsSearching(!1)),n(toggleIsSearchingLoading(!1)),n(setSearched("")),n(setSearchedTemplates(null)),n(fetchFlows({name:"",ownerType:ENGINE_OWNER_TYPES.MINE}))}})]})}),jsxRuntimeExports.jsx("div",{className:t.grow}),jsxRuntimeExports.jsx("div",{})]}):jsxRuntimeExports.jsx("div",{})}var useStyles$5=makeStyles()(function(e){return{buttonFlowCenter:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important","&&":{borderTopRightRadius:0,borderBottomRightRadius:0}},buttonFlowCenterAdvanceDisabled:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important"},buttonAddNew:{background:"#0D62D2!important",color:e.palette.background.paper},marginRight:{marginRight:"".concat(e.spacing(0),"!important"),padding:"".concat(e.spacing(1.6)," ").concat(e.spacing(2.8)," !important"),marginLeft:"8px!important"},btnWidth:{width:"134px!important",marginTop:"18px!important",display:"flex!important",justifyContent:"center!important"},btnWidthAdvanceDisabled:{width:"171px!important",marginTop:"18px!important",display:"flex!important",justifyContent:"center!important"},backdrop:{zIndex:e.zIndex.drawer+1,color:"#fff"},flowIconAdd:{fill:"#fff"},flowIconAddAdvanced:{fill:"#fff",minWidth:"20px!important",maxHeight:"20px!important"},loadingBarcontainer:{width:"20px!important",height:"20px!important",display:"flex",justifyContent:"center",color:"#00000042"},disabledButton:{background:"#efefef4d!important",color:"#00000042"},fullWidth:{width:"100%"},paddingDiv:{paddingTop:"20px"},buttonDiv:{display:"flex"},iconButton:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"center!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important",background:"#0D62D2!important",color:e.palette.background.paper,minWidth:"14px!important",maxWidth:"34px!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},iconButtonDisabled:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"center!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important",background:"#efefef4d!important",color:"#00000042",minWidth:"14px!important",maxWidth:"34px!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},iconButtonFullScreen:{marginRight:"24px!important",background:"#0D62D2!important",color:e.palette.background.paper,minWidth:"14px!important",maxWidth:"37px!important",marginTop:"18px!important",justifyContent:"center!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},iconButtonFullScreenDisabled:{marginRight:"24px!important",background:"#efefef4d!important",color:"#00000042",minWidth:"14px!important",maxWidth:"37px!important",marginTop:"18px!important",justifyContent:"center!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},flowName:{width:"449px"}}});function HeaderBarButtons(e){var t=useStyles$5().classes,o=useSelector(function(e){return e.flows.isLoadingCreateNewFlow});return jsxRuntimeExports.jsxs("div",{className:t.buttonDiv,children:["notebooks"!==e.screen&&jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-header-onCreateNewFlowButton",id:"flow-center-header-onCreateNewFlowButton",variant:"outlined",disabled:o,startIcon:o?jsxRuntimeExports.jsx(CircularProgress,{className:t.loadingBarcontainer}):jsxRuntimeExports.jsx(default_1$7,{className:t.flowIconAdd}),className:"".concat(t.buttonFlowCenterAdvanceDisabled," ").concat(t.buttonAddNew,"\n ").concat(o?t.disabledButton:"","\n ").concat(e.showAdditionalOptionButton?t.marginRight:""," ").concat(e.automateFullScreen?t.btnWidthAdvanceDisabled:""),onClick:function(){return e.handleOpenFlowNameDialog("",!1)},children:SHARED_MESSAGES.newFlow()}),e.enableNotebooks&&"notebooks"===e.screen&&jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-header-onCreateNewFlowButton",id:"flow-center-header-onCreateNewFlowButton",variant:"outlined",disabled:o,startIcon:o?jsxRuntimeExports.jsx(CircularProgress,{className:t.loadingBarcontainer}):jsxRuntimeExports.jsx(default_1$7,{className:t.flowIconAdd}),className:"".concat(t.buttonFlowCenterAdvanceDisabled," ").concat(t.buttonAddNew,"\n ").concat(o?t.disabledButton:"","\n ").concat(e.showAdditionalOptionButton?t.marginRight:""," ").concat(e.automateFullScreen?t.btnWidthAdvanceDisabled:""),onClick:function(){return e.handleOpenFlowNameDialog("",!0)},children:SHARED_MESSAGES.newNotebook()})]})}var useStyles$4=makeStyles()(function(e){return{additionalOptionsContainer:{borderLeft:"0.5px solid #D9E2EB!important",paddingLeft:e.spacing(1.6)+"px!important"},additionalOptBtn:{padding:e.spacing(1.6)+"px!important"}}});function HeaderBarControlButtons(e){var t=useStyles$4().classes;return e.showAdditionalOptionButton?jsxRuntimeExports.jsxs("div",{className:t.additionalOptionsContainer,children:[e.showFullScreenButton&&jsxRuntimeExports.jsx(Tooltip,{title:e.fullScreen?SHARED_MESSAGES.exitFullScreen():SHARED_MESSAGES.enterFullScreen(),children:jsxRuntimeExports.jsx(IconButton,{className:t.additionalOptBtn,"data-test":"flow-center-action-btn-toggleFullScreen",onClick:function(){e.setFullScreen(!e.fullScreen)},size:"large",children:jsxRuntimeExports.jsx("img",{src:e.fullScreen?img$v:img$x,alt:"fullscreen-icon",draggable:"false"})})}),e.showCollapseButton&&jsxRuntimeExports.jsx(Tooltip,{title:SHARED_MESSAGES.closePanel(),children:jsxRuntimeExports.jsx(IconButton,{"data-test":"flow-center-action-btn-closePanel",className:t.additionalOptBtn,onClick:function(){e.hidePanel&&e.hidePanel()},size:"large",children:jsxRuntimeExports.jsx("img",{src:img$1b,alt:"collapseicon",draggable:"false"})})})]}):jsxRuntimeExports.jsx("div",{})}function _array_like_to_array$3(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$3(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$3(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$3(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$3(e,t){return _array_with_holes$3(e)||_iterable_to_array_limit$3(e,t)||_unsupported_iterable_to_array$3(e,t)||_non_iterable_rest$3()}function _unsupported_iterable_to_array$3(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$3(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$3(e,t):void 0}var useStyles$3=makeStyles()(function(e){return{root:{backgroundColor:"#FAFAFA",paddingRight:14,display:"flex!important",alignItems:"center!important",paddingLeft:24},headerbarContainer:{position:"fixed!important",width:"inherit!important",zIndex:"99!important","& header":{boxShadow:"none!important"}},headerbarContainerBorder:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)!important"},fullScreenState:{zIndex:"1!important","& header":{boxShadow:"none!important"}},header:{padding:"0px!important"}}});function Headerbar(e){var t=e.options,o=e.handleOpenFlowNameDialog,n=e.collapseFlowCenter,r=e.setFullScreen,a=e.setScreen,s=e.fullScreen,i=e.hidePanel,l=e.zIndex,c=e.automateFullScreen,u=e.enableNotebooks,e=e.screen,p=useStyles$3().classes,d=_sliced_to_array$3(reactExports.useState(!1),2),m=d[0],d=d[1];return jsxRuntimeExports.jsx("div",{className:"".concat(p.headerbarContainer," ").concat(c?m?null:p.fullScreenState:p.headerbarContainerBorder),id:"flow-center-headerbar-container","data-test":"flow-center-headerbar-container",children:c?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(HeaderBarSearchBar,{showSearchBar:t.showSearchBar,isFullScreen:s,setScreen:a,automateFullScreen:c,enableNotebooks:u}),jsxRuntimeExports.jsx(HeaderBarButtons,{showAdditionalOptionButton:t.showAdditionalOptionButton,showCreateNewFlow:t.showCreateNewFlow,showNewFromTemplate:t.showNewFromTemplate,isFullScreen:s,handleOpenFlowNameDialog:o,zIndex:l,automateFullScreen:c,openClusterDialog:m,setOpenClusterDialog:d,enableNotebooks:u,screen:e})]}):jsxRuntimeExports.jsx(AppBar,{position:"static",color:"transparent",className:p.header,children:jsxRuntimeExports.jsxs(Toolbar$1,{className:p.root,children:[jsxRuntimeExports.jsx(HeaderBarTitle,{title:t.title}),jsxRuntimeExports.jsx(HeaderBarSearchBar,{showSearchBar:t.showSearchBar,setScreen:a,automateFullScreen:c,enableNotebooks:u}),jsxRuntimeExports.jsx(HeaderBarButtons,{showAdditionalOptionButton:t.showAdditionalOptionButton,showCreateNewFlow:t.showCreateNewFlow,showNewFromTemplate:t.showNewFromTemplate,handleOpenFlowNameDialog:o,zIndex:l,automateFullScreen:c,openClusterDialog:m,setOpenClusterDialog:d,enableNotebooks:u,screen:e}),jsxRuntimeExports.jsx(HeaderBarControlButtons,{showAdditionalOptionButton:t.showAdditionalOptionButton,showFullScreenButton:t.showFullScreenButton,showCollapseButton:t.showCollapseButton,collapseFlowCenter:n,setFullScreen:r,fullScreen:s,hidePanel:i})]})})})}var DEFAULT_FILTERS_FOR_TAB_TEMPLATES=[ENGINE_FILTER_TYPES.TAGS,ENGINE_FILTER_TYPES.CATEGORIES,"author",ENGINE_FILTER_TYPES.PUBLIC],DEFAULT_FILTERS_FOR_TAB_MY_FLOWS=[],DEFAULT_TABS=[ENGINE_OWNER_TYPES.MINE,ENGINE_OWNER_TYPES.TEMPLATES],BETA_TABS=[ENGINE_OWNER_TYPES.NOTEBOOKS],DEFAULT_FILTERS=[ENGINE_FILTER_TYPES.TAGS],ALL_TABS=[{key:ENGINE_OWNER_TYPES.ORGANIZATION,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.organizationcategory",defaultMessage:"My Organization",description:"My Organization Category"}),icon:default_1$4},{key:ENGINE_OWNER_TYPES.MINE,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.orgflows",defaultMessage:"Org Flows",description:"Org Flows Category"}),icon:default_1$2},{key:ENGINE_OWNER_TYPES.SHARED,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.sharedwmecategory",defaultMessage:"Shared w/ me",description:"Shared with me Category"}),icon:default_1$3},{key:ENGINE_OWNER_TYPES.TEMPLATES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.templatescategory",defaultMessage:"Templates",description:"Templates Category"}),icon:default_1$1},{key:ENGINE_OWNER_TYPES.NOTEBOOKS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.notebookscategory",defaultMessage:"Notebooks",description:"Noteboks Category"}),icon:default_1$2}],ALL_FILTERS=[{group:ENGINE_FILTER_TYPES.CERTIFIED,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.certified",defaultMessage:"Certified",description:"Flow Center Certified Filter"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.veritonecertified.filter",defaultMessage:"Veritone Certified",description:"Veritone Certified Filter"}),value:"veritone_certified"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.verified",defaultMessage:"Verified Publisher",description:"Verified Publisher filter"}),value:"verified_publisher"}]},{group:ENGINE_FILTER_TYPES.CATEGORIES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.categories",defaultMessage:"Categories",description:"Flow Center filter Categories"}),options:[]},{group:ENGINE_FILTER_TYPES.INDUSTRIES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.industries",defaultMessage:"Industries",description:"Flow Center filter Industries"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.hitech",defaultMessage:"Hi Tech",description:"Flow Center filter option value Hi Tech"}),value:"Hi Tech"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.medicine",defaultMessage:"Medicine",description:"Flow Center filter option value Medicine"}),value:"Medicine"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.law",defaultMessage:"Law",description:"Flow Center filter option value Law"}),value:"Law"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.government",defaultMessage:"Government",description:"Flow Center filter option value Government"}),value:"Government"}]},{group:ENGINE_FILTER_TYPES.APPLICATIONS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.applications",defaultMessage:"Applications",description:"Flow Center filter Applications"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.testapp",defaultMessage:"Test",description:"Flow Center filter option value Test"}),value:"Test"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.speach",defaultMessage:"Speach",description:"Flow Center filter option value Speach"}),value:"Speach"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.videoprocessing",defaultMessage:"Video processing",description:"Flow Center filter option value Video Processing"}),value:"Video processing"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.smssender",defaultMessage:"Sms sender",description:"Flow Center filter option value Sms sender"}),value:"Sms sender"}]},{group:ENGINE_FILTER_TYPES.CLASSES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.classes",defaultMessage:"Classes",description:"Flow Center filter Classes"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.networkisolated",defaultMessage:"Network isolated",description:"Flow Center filter option value Network Isolated"}),value:"Network isolated"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.publicaccess",defaultMessage:"Public Access",description:"Flow Center filter option value Public Access"}),value:"Public Access"}]},{group:ENGINE_FILTER_TYPES.NOTEWORTHY,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.noteworthy",defaultMessage:"Noteworthy",description:"Flow Center filter Noteworthy"}),options:[]},{group:ENGINE_FILTER_TYPES.TAGS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.tags",defaultMessage:"Tags",description:"Flow Center filter Tags"}),options:[]},{group:"author",text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.developer",defaultMessage:"Developer",description:"Flow Center filter Developer"}),options:[]},{group:ENGINE_FILTER_TYPES.PRICE,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.price",defaultMessage:"Price",description:"Flow Center filter Price"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.under25",defaultMessage:"Under $25",description:"Flow Center filter option value Under $25"}),value:"Under $25"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.25to50",defaultMessage:"$25 to $50",description:"Flow Center filter option value $25 to $50"}),value:"$25 to $50"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.50to100",defaultMessage:"$50 to $100",description:"Flow Center filter option value $50 to $100"}),value:"$50 to $100"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.100to200",defaultMessage:"$100 to $200",description:"Flow Center filter option value $100 to $200"}),value:"$100 to $200"}]},{group:ENGINE_FILTER_TYPES.PUBLIC,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.tags",defaultMessage:"Type",description:"Flow Center filter Is Public"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.is_public",defaultMessage:"Is Public",description:"Flow Center filter is public option value"}),value:"1"}]}],DEFAULT_GRAPHQL_ENDPOINT="v3/graphql",DEFAULT_CLUSTER="prd5-21xbyq0x-4h0s-o685-snas-oovhdai552v9",useStyles$2=makeStyles()(function(e){return{container:{minHeight:"calc(100vh - 64px - 64px - 54px)"},contentContainer:{justifyContent:"center",alignItems:"center",display:"flex",flexDirection:"column"},textContainer:{marginTop:26,display:"flex",flexDirection:"column",alignItems:"center"},title:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"18px!important",lineHeight:"24px!important",letterSpacing:"-1.30385e-09px!important",color:"#1B1D1F!important"},subtitle:{marginTop:12,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",textAlign:"center"},buttonContainer:{marginTop:30,display:"flex",width:"100%",justifyContent:"space-evenly"},icon:{width:235,height:235},commonBtn:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",textTransform:"none",boxSizing:"border-box",borderRadius:"4px",paddingLeft:10,paddingRight:10,"&:hover":{background:"none",backgroundColor:"none"},background:"#FFFFFF",border:"1px solid #1871E8",color:"#1871E8!important"}}});function NoFlowsFound(e){var t=useStyles$2().classes;return jsxRuntimeExports.jsx(Grid,{container:!0,spacing:0,direction:"column",alignItems:"center",justifyContent:"center",className:t.container,children:jsxRuntimeExports.jsxs(Grid,{item:!0,xs:4,className:t.contentContainer,children:[jsxRuntimeExports.jsx("img",{className:t.icon,src:img$o,alt:"noFlowsFoundIcon"}),jsxRuntimeExports.jsxs("div",{className:t.textContainer,children:[jsxRuntimeExports.jsx(Typography,{className:t.title,children:SHARED_MESSAGES.noFlowsFound()}),jsxRuntimeExports.jsx(Typography,{className:t.subtitle,children:SHARED_MESSAGES.noFlowsFoundSubtitle()}),jsxRuntimeExports.jsxs(Box,{className:t.buttonContainer,children:[jsxRuntimeExports.jsx(Button,{className:t.commonBtn,onClick:function(){return e.handleOpenFlowNameDialog("")},children:SHARED_MESSAGES.createNewFlow()}),jsxRuntimeExports.jsx(Button,{className:t.commonBtn,onClick:function(){e.setScreen(ENGINE_OWNER_TYPES.TEMPLATES)},children:SHARED_MESSAGES.chooseATemplate()})]})]})]})})}var useStyles$1=makeStyles()(function(){return{tabsContainer:{paddingLeft:"18px",borderBottom:"0.5px solid #D5DFE9","& div > span:last-child":{backgroundColor:"black"}},tab:{fontFamily:"Nunito!important",fontWeight:400,fontStyle:"normal !important",fontSize:14,lineHeight:"18px",color:"#2A323C",textTransform:"none"}}});function TabsContainer(e){var t=useStyles$1().classes,o=e.selectedTab,n=e.handleChange,r=useSelector(function(e){return e.flows.flows}),a=useSelector(function(e){return e.flows.notebooks}),s=useSelector(function(e){return e.flows.filteredTemplates})||[],i=useSelector(function(e){return e.flows.searchedTemplates})||[],l=useSelector(function(e){return e.flows.isSearching});return jsxRuntimeExports.jsx(AppBar,{className:t.tabsContainer,position:"static",color:"transparent",elevation:0,children:jsxRuntimeExports.jsxs(Tabs,{value:o,onChange:n,"aria-label":"search-results-tabs",children:[jsxRuntimeExports.jsx(Tab,{id:"flow-center-searchResults-flows","data-test":"flow-center-searchResults-flows",className:t.tab,label:SHARED_MESSAGES.flowsCount(r.length)}),jsxRuntimeExports.jsx(Tab,{id:"flow-center-searchResults-templates","data-test":"flow-center-searchResults-templates",className:t.tab,label:SHARED_MESSAGES.templatesCount((l?i:s).length)}),e.notebookEnabled&&jsxRuntimeExports.jsx(Tab,{id:"flow-center-searchResults-notebooks","data-test":"flow-center-searchResults-notebooks",className:t.tab,label:SHARED_MESSAGES.notebookCount(a.length)})]})})}var getContentHeight=function(){var e=useSelector(function(e){return e.flows.config.isFullScreen});return useSelector(function(e){return e.flows.config.automateFullScreen})?"calc(100vh - 64px - 54px)":"calc(100vh - 64px - 64px - ".concat(e?"0px":"62px",")")},getFlowCenterConfig=function(){return{isFullScreen:useSelector(function(e){return e.flows.config.isFullScreen}),automateFullScreen:useSelector(function(e){return e.flows.config.automateFullScreen}),zIndex:useSelector(function(e){return e.flows.config.zIndex}),graphQLEndpoint:useSelector(function(e){return e.flows.config.graphQLEndpoint}),defaultCluster:useSelector(function(e){return e.flows.config.defaultCluster})}};function ResultsContainer(o){function e(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return(""==n?function(){return jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:o.createFlowTemplate,simpleMode:o.simpleMode,selectedFlowId:n,onSelectFlow:o.onSelectFlow,setFirstFlowId:o.setFirstFlowId,screenName:o.screenName,zIndex:l.zIndex,showTitle:!1,setOpenFlowDetails:o.setOpenFlowDetails,setOpenAlwaysUpFlow:o.setOpenAlwaysUpFlow,notebooks:0<arguments.length&&void 0!==arguments[0]&&arguments[0],betaFeatures:o.betaFeatures})}:function(){return jsxRuntimeExports.jsxs("div",{className:r.enginesAndFlowWidgetContainer,children:[jsxRuntimeExports.jsx("div",{className:r.enginesContainer,children:jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:o.createFlowTemplate,simpleMode:""!==n,selectedFlowId:n,setFirstFlowId:function(e){a&&o.setSelectedFlowId(e)},onSelectFlow:function(e){o.scrollContainerToTop(),o.setSelectedFlowId(e),o.setAllowSetFirstFlowId(!1)},screenName:o.screenName,zIndex:l.zIndex,setOpenAlwaysUpFlow:function(e,t){o.scrollContainerToTop(),o.setOpenFlowRunningInstances(!1),o.setOpenFlowDetails(!1),t&&o.setSelectedFlowId(t),o.setOpenAlwaysUpFlow(e)},setOpenFlowDetails:function(e){o.setOpenFlowDetails(e)},notebooks:0<arguments.length&&void 0!==arguments[0]&&arguments[0],betaFeatures:o.betaFeatures})}),jsxRuntimeExports.jsx("div",{className:r.flowWidgetContainer,children:jsxRuntimeExports.jsx("div",{className:r.flowWidgetContainer,children:jsxRuntimeExports.jsx(App$1,{engineId:n,openFlowRunningInstances:o.openFlowRunningInstances,openAlwaysUpFlow:o.openAlwaysUpFlow,locale:i,openTab:o.openTabFlowWidget,config:{apiRoot:u,graphQLEndpoint:c,controllerUrl:d,defaultCluster:l.defaultCluster,controllerNodeRedImage:p,controllerFlowPath:s},tabs:[IFlowWidgetTabs.Overview,IFlowWidgetTabs.Versions,IFlowWidgetTabs.Activity,IFlowWidgetTabs.DistributionSettings],activityTabs:[IFlowWidgetActivityTabs.Jobs,IFlowWidgetActivityTabs.ScheduledJobs],onExitClicked:function(){o.setSelectedFlowId(""),o.setOpenFlowRunningInstances(!1),o.setOpenAlwaysUpFlow(!1),o.setOpenFlowDetails(!1)},onDeleteFlow:function(){setTimeout(function(){o.setUpdateFlowList(n),o.setSelectedFlowId(""),o.setUpdateFlowList("")},2e3)}})})})]})})(e)}var t=o.selectedTab,n=o.selectedFlowId,r=o.classes,a=o.allowSetFirstFlowId,s=o.controllerFlowPath,i=useSelector(preferredLanguageSelector)||"en",l=getFlowCenterConfig(),c=useSelector(graphEndpointSelector),u=useSelector(rootApiSelector),p=useSelector(controllerNodeRedImageSelector),d=useSelector(controllerUrlSelector);return jsxRuntimeExports.jsx(Box,{ml:3,children:0===t?e():1===t?jsxRuntimeExports.jsx(TemplateList,{handleOpenFlowNameDialog:o.handleOpenFlowNameDialog,openFirstTemplate:o.openFirstTemplate,isDeselectedTemplate:o.isDeselectedTemplate,onSelectedTemplate:o.onSelectedTemplate}):e(!0)})}function _array_like_to_array$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$2(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$2(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$2(e,t){return _array_with_holes$2(e)||_iterable_to_array_limit$2(e,t)||_unsupported_iterable_to_array$2(e,t)||_non_iterable_rest$2()}function _unsupported_iterable_to_array$2(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$2(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$2(e,t):void 0}var useStyles=makeStyles()(function(e){return{container:{width:"100%",overflowY:"auto"},tabsContainer:{paddingLeft:18,borderBottom:"0.5px solid #D5DFE9","& div > span:last-child":{backgroundColor:"black"}}}});function SearchResultsPage(e){var t=useStyles().classes,o=useDispatch(),n=useSelector(function(e){return e.flows.searched}),r=useSelector(function(e){return e.flows.isSearchingLoading}),a=useSelector(function(e){return e.flows.searchedTemplates||[]}),s=useSelector(function(e){return e.flows.filteredTemplates})||[],i=useSelector(function(e){return e.flows.flows}),l=_sliced_to_array$2(reactExports.useState(0),2),c=l[0],u=l[1],l=(reactExports.useEffect(function(){var t,e;return s&&0!==s.length&&(t=new RegExp(n,"gi"),e=s.filter(function(e){return t.lastIndex=0,t.test(e.title)}),o(setSearchedTemplates(e))),function(){o(setSearchedTemplates(null))}},[s,n]),function(e,t){u(t)}),p=getContentHeight();return r?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem}),jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem}),jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem})]}):!!a.length||!!i.length?jsxRuntimeExports.jsxs("div",{className:t.container,style:{height:p},children:[jsxRuntimeExports.jsx(TabsContainer,{selectedTab:c,handleChange:l,notebookEnabled:e.betaFeatures}),jsxRuntimeExports.jsx(ResultsContainer,{createFlowTemplate:e.createFlowTemplate,selectedTab:c,openFlowRunningInstances:e.openFlowRunningInstances,simpleMode:e.simpleMode,selectedFlowId:e.selectedFlowId,onSelectFlow:e.onSelectFlow,setFirstFlowId:e.setFirstFlowId,screenName:e.screenName,handleOpenFlowNameDialog:e.handleOpenFlowNameDialog,openFirstTemplate:e.openFirstTemplate,isDeselectedTemplate:e.isDeselectedTemplate,onSelectedTemplate:e.onSelectedTemplate,classes:e.classes,allowSetFirstFlowId:e.allowSetFirstFlowId,setSelectedFlowId:e.setSelectedFlowId,setOpenFlowRunningInstances:e.setOpenFlowRunningInstances,setOpenFlowDetails:e.setOpenFlowDetails,scrollContainerToTop:e.scrollContainerToTop,setAllowSetFirstFlowId:e.setAllowSetFirstFlowId,openTabFlowWidget:e.openTabFlowWidget,setUpdateFlowList:e.setUpdateFlowList,controllerFlowPath:e.controllerFlowPath,openAlwaysUpFlow:e.openAlwaysUpFlow,setOpenAlwaysUpFlow:e.setOpenAlwaysUpFlow,betaFeatures:e.betaFeatures})]}):jsxRuntimeExports.jsx(NoResults,{})}var createUniqueEngineMutation$1="mutation($name: String!, $templateId: ID!) {\n createFlow(input: { name: $name, templateId: $templateId} ) {\n id\n builds{\n records {\n id\n engineId\n name\n createdDateTime\n manifest\n runtime\n }\n }\n }\n}\n",createNotebookMutation="mutation($name: String!, $templateId: ID!) {\n createNotebook(input: { name: $name, templateId: $templateId} ) {\n id\n builds{\n records {\n id\n engineId\n name\n createdDateTime\n manifest\n runtime\n }\n }\n }\n}\n",createAutomateFlowMutation$1="mutation($name: String!, $templateId: ID!) {\n createAutomateFlow(input: { name: $name, templateId: $templateId} ) {\n engineId\n build {\n id\n engineId\n name\n createdDateTime\n manifest\n runtime\n }\n }\n}\n",getFlow$1="query getFlow($flowId: ID!) {\n engine(id: $flowId) {\n name\n state\n modifiedDateTime\n createdDateTime\n id\n manifest\n ownerOrganization{\n id\n name\n }\n builds {\n records {\n id\n version\n }\n }\n }\n} ",copyFlowMutation$1="\nmutation copyFlow($flowRevisionId: ID, $flowId: ID, $name: String){\n copyFlow(input: { \n flowId: $flowId,\n flowRevisionId:$flowRevisionId,\n name: $name,\n }) {\n id\n }\n}";function asyncGeneratorStep$1(e,t,o,n,r,a,s){try{var i=e[a](s),l=i.value}catch(e){return void o(e)}i.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator$1(i){return function(){var e=this,s=arguments;return new Promise(function(t,o){var n=i.apply(e,s);function r(e){asyncGeneratorStep$1(n,t,o,r,a,"next",e)}function a(e){asyncGeneratorStep$1(n,t,o,r,a,"throw",e)}r(void 0)})}}function _define_property$2(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _object_spread$2(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):n).forEach(function(e){_define_property$2(t,e,o[e])})}return t}function _ts_generator$1(n,r){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(o){return function(e){var t=[o,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var fetchVeritoneGraphQLApiCustomErrorHandling=(()=>{var a=_async_to_generator$1(function(t,o,n,r,a){return _ts_generator$1(this,function(e){return[2,fetch(t,{method:"POST",headers:_object_spread$2({"Content-Type":"application/json"},o&&{Authorization:"Bearer ".concat(o)}),credentials:"include",body:JSON.stringify({query:n,variables:r,operationName:a})}).then(function(e){return e.json()}).then(function(e){var t;return e.errors&&(t="GraphQL Errors:\n".concat(e.errors.map(function(e){return"".concat(e.name,": ").concat(e.message,"\n")})),console.error("GraphQL Errors",e.errors),console.error("Error Message",t)),e}).catch(function(e){console.error("Error",e)})]})});return function(e,t,o,n,r){return a.apply(this,arguments)}})(),createUniqueEngineMutation=function(e,t,o,n){return fetchVeritoneGraphQLApiCustomErrorHandling(n,o,createUniqueEngineMutation$1,{name:e,templateId:t})},createNotebook=function(e,t,o,n){return fetchVeritoneGraphQLApiCustomErrorHandling(n,o,createNotebookMutation,{name:e,templateId:t})},createAutomateFlowMutation=function(e,t,o,n){return fetchVeritoneGraphQLApiCustomErrorHandling(n,o,createAutomateFlowMutation$1,{name:e,templateId:t})},getFlow=(()=>{var n=_async_to_generator$1(function(t,o,n){return _ts_generator$1(this,function(e){switch(e.label){case 0:return[4,fetchVeritoneGraphQLApi(n,o,getFlow$1,{flowId:t})];case 1:return[2,e.sent()]}})});return function(e,t,o){return n.apply(this,arguments)}})(),copyFlowMutation=function(e,t,o,n,r){return fetchVeritoneGraphQLApiCustomErrorHandling(r,n,copyFlowMutation$1,{flowId:o,flowRevisionId:t,name:e})};function _array_like_to_array$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$1(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,o,n,r,a,s){try{var i=e[a](s),l=i.value}catch(e){return void o(e)}i.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator(i){return function(){var e=this,s=arguments;return new Promise(function(t,o){var n=i.apply(e,s);function r(e){asyncGeneratorStep(n,t,o,r,a,"next",e)}function a(e){asyncGeneratorStep(n,t,o,r,a,"throw",e)}r(void 0)})}}function _iterable_to_array_limit$1(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$1(e,t){return _array_with_holes$1(e)||_iterable_to_array_limit$1(e,t)||_unsupported_iterable_to_array$1(e,t)||_non_iterable_rest$1()}function _unsupported_iterable_to_array$1(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$1(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$1(e,t):void 0}function _ts_generator(n,r){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(o){return function(e){var t=[o,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var DialogFormattedMessages={CREATE_FLOW:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-create-flow.jbxxqH",defaultMessage:"Create Flow",description:"msg create flow"}),CREATE_FLOW_UNIQUE_NAME:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jbttty",defaultMessage:"Name Your Flow",description:"msg create flow with unique name"}),CREATE_NOTEBOOK_UNIQUE_NAME:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.uniqueNotebookName",defaultMessage:"Name Your Notebook",description:"msg create flow with unique name"}),CANCEL_FLOW_UNIQUE_NAME:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.hittrt",defaultMessage:"Cancel",description:"msg cancel naming flow"}),COPY_FLOW:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-copy-flow.jbxxqH",defaultMessage:"Copy Flow",description:"msg copy flow"}),CREATE_NOTEBOOK:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-create-flow.createNotebookButton",defaultMessage:"Create Notebook",description:"msg create Notebook"})};function FlowNameDialog(t){function l(){u(""),d(""),f(""),s(flowCenterDialogAction({open:!1,component:"",props:{}}))}var n,o,r,a,s=useDispatch(),e=useCommonStyles().classes,i=_sliced_to_array$1(reactExports.useState(""),2),c=i[0],u=i[1],i=_sliced_to_array$1(reactExports.useState(""),2),p=i[0],d=i[1],i=_sliced_to_array$1(reactExports.useState(t.templateId||""),2),m=i[0],f=i[1],i=useSelector(controllerUrlSelector),x=useSelector(automateControllerUrlSelector),g=(i||x.replace("automate-",""),useSelector(automateUrlSelector)),_=useSelector(sessionTokenSelector),E=useSelector(graphEndpointSelector),w=useSelector(function(e){return e.flows.isRevisionsExistOnServer}),i=makeStyles()(function(e){return{paddingDiv:{paddingTop:"20px"},flowName:{width:"449px"}}})().classes,h=(n=_async_to_generator(function(t,o,n){var r;return _ts_generator(this,function(e){switch(e.label){case 0:return[4,getFlow(t,o,n)];case 1:if((r=e.sent()).errors&&0<r.errors.length)throw new Error("Error while getting new engine");return s(addNewFlow(r.data.engine)),[2]}})}),function(e,t,o){return n.apply(this,arguments)}),S=(o=_async_to_generator(function(t){var o,n,r,a,s,i;return _ts_generator(this,function(e){switch(e.label){case 0:return(o='Field "templateId" is not defined by type "CreateFlow".',n=c.trim(),r=m||"",t)?[4,createNotebook(n,r,_,E)]:[3,2];case 1:if((i=e.sent())&&i.errors&&0<i.errors.length)throw d(i.errors[0].message),new Error("Error while creating new flow");return l(),a=i&&i.data.createNotebook.id,s=i&&i.data.createNotebook.builds.records[0].id,[3,6];case 2:return[4,createUniqueEngineMutation(n,r,_,E)];case 3:return(i=e.sent()).errors&&0<i.errors.length&&i.errors[0].message===o?[4,createAutomateFlowMutation(n,r,_,E)]:[3,5];case 4:i=e.sent(),e.label=5;case 5:if(i&&i.errors&&0<i.errors.length)throw d(i.errors[0].message),new Error("Error while creating new flow");l(),a=i&&i.data.createFlow.id,s=i&&i.data.createFlow.builds.records[0].id,e.label=6;case 6:return[2,{engineId:a,engineBuildId:s}]}})}),function(e){return o.apply(this,arguments)}),j=(r=_async_to_generator(function(t){var o,n,r,a=arguments;return _ts_generator(this,function(e){switch(e.label){case 0:o=1<a.length&&void 0!==a[1]&&a[1],s(toggleStateCreateNewFlow(!0)),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,S(t)];case 2:return n=e.sent(),r=n.engineId,n=n.engineBuildId,h(r,_,E).catch(function(e){devErrorLogger("Error while adding flow: ".concat(JSON.stringify(e)))}),n=w?"latest":n,s(toggleStateCreateNewFlow(!1)),console.log("REDIRECT: ",o),o?s(setShouldCreateInitialFlows(!1)):(t&&window.open("".concat(g,"/notebook/").concat(r,"/").concat(n),"_blank","noopener"),window.open("".concat(g,"/flow/").concat(r,"/").concat(n),"_blank","noopener")),[3,5];case 3:return r=e.sent(),devErrorLogger(r),[3,5];case 4:return s(toggleStateCreateNewFlow(!1)),[7];case 5:return[2]}})}),function(e){return r.apply(this,arguments)}),y=(a=_async_to_generator(function(t){var o,n,r,a=arguments;return _ts_generator(this,function(e){switch(e.label){case 0:o=1<a.length&&void 0!==a[1]&&a[1],s(toggleStateCreateNewFlow(!0)),e.label=1;case 1:return e.trys.push([1,3,4,5]),n=c.trim(),[4,copyFlowMutation(n,t.flowRevisionId||"",t.flowId||"",_,E)];case 2:if((n=e.sent()).errors&&0<n.errors.length)throw d(n.errors[0].message),new Error("Error while copying flow");return l(),r=n&&n.data.copyFlow.id,h(r,_,E).catch(function(e){devErrorLogger("Error while adding flow: ".concat(JSON.stringify(e)))}),s(toggleStateCreateNewFlow(!1)),o?s(setShouldCreateInitialFlows(!1)):window.open("".concat(g,"/flow/").concat(r,"/latest"),"_blank","noopener"),[3,5];case 3:return r=e.sent(),devErrorLogger(r),[3,5];case 4:return s(toggleStateCreateNewFlow(!1)),[7];case 5:return[2]}})}),function(e){return a.apply(this,arguments)});return jsxRuntimeExports.jsxs("div",{className:e.container,children:[jsxRuntimeExports.jsx(DialogTitle,{className:e.title,children:t.isNotebook?DialogFormattedMessages.CREATE_NOTEBOOK_UNIQUE_NAME:DialogFormattedMessages.CREATE_FLOW_UNIQUE_NAME}),jsxRuntimeExports.jsxs(DialogContent,{className:e.content,children:[jsxRuntimeExports.jsx("div",{className:"".concat(i.paddingDiv),children:t.isNotebook?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-flow-name-dialog.notebookMustUnique",defaultMessage:"Your notebooks's name must be unique",description:"Your notebook's name must be unique"}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-flow-name-dialog.jFggxR",defaultMessage:"Your flow's name must be unique",description:"Your flow's name must be unique"})}),jsxRuntimeExports.jsx("div",{className:"".concat(i.paddingDiv),children:jsxRuntimeExports.jsx(TextField,{id:"os-flow-center-header-flow-name-dialog-textfield.jFtfxR",className:i.flowName,label:t.isNotebook?"Notebook Name":"Flow Name",onChange:function(e){e=e.target.value;u(e)},variant:"outlined",value:c,error:!!p,helperText:p||null})})]}),jsxRuntimeExports.jsxs(DialogActions,{className:e.actions,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-cancelCreateFlowWithName",onClick:function(){l()},className:e.cancelButton,children:DialogFormattedMessages.CANCEL_FLOW_UNIQUE_NAME}),jsxRuntimeExports.jsx(Button,{disabled:!c,"data-test":"flow-center-flow-list-createFlowWithName",onClick:function(){var e;(e=t).isCopyFlow?y(e).catch(function(e){devErrorLogger("Error copying flow: ".concat(JSON.stringify(e)))}):e.isNotebook?j(!0).catch(function(e){devErrorLogger("Error creating flow: ".concat(JSON.stringify(e)))}):j(!1).catch(function(e){devErrorLogger("Error creating flow: ".concat(JSON.stringify(e)))})},className:c?e.confirmationButton:e.disabledButton,autoFocus:!0,children:t.isNotebook?DialogFormattedMessages.CREATE_NOTEBOOK:!0===t.isCopyFlow?DialogFormattedMessages.COPY_FLOW:DialogFormattedMessages.CREATE_FLOW})]})]})}function _define_property$1(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _object_spread$1(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):n).forEach(function(e){_define_property$1(t,e,o[e])})}return t}function UniversalDialog(){var o=useSelector(flowCenterDialogSelector)||null,e=useDispatch(),n=[{name:"FlowNameDialog",component:FlowNameDialog}];return jsxRuntimeExports.jsx(Dialog,{open:o.flowCenterDialog.open,onClose:function(){e(flowCenterDialogAction({open:!1,component:"",props:{}}))},children:jsxRuntimeExports.jsx("div",{children:o.flowCenterDialog.component&&jsxRuntimeExports.jsx(function(){var t,e=(t=o.flowCenterDialog.component)?n.filter(function(e){return e.name===t})[0].component:null;return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(CircularProgress,{}),children:jsxRuntimeExports.jsx(e,_object_spread$1({},o.flowCenterDialog.props))})},{})})})}function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array(e,t):void 0}var mainContainerId="flow-center-container",FlowCenter=function(e){function D(){var e,t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],o=(we(DEFAULT_FILTERS_FOR_TAB_MY_FLOWS),l?"calc(100vh - 64px - 54px)":"calc(100vh - 64px - 64px - ".concat(j?"0px":"62px",")"));return jsxRuntimeExports.jsxs("div",{style:{height:o},className:O.flowsMainContainer,id:"flows-main-container",children:[u&&u.flowCenterDialog.open&&jsxRuntimeExports.jsx(UniversalDialog,{}),!t&&jsxRuntimeExports.jsx(TemplateGallery,{handleOpenFlowNameDialog:M,setScreen:f,goToTemplateList:function(){return f(ENGINE_OWNER_TYPES.TEMPLATES)},handleOpenTemplateDetails:function(){_(!0),R(!0),T(!0)}}),jsxRuntimeExports.jsx("div",{children:le?Ee(25):v&&v.length?""===x?jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:B,simpleMode:""!==x,selectedFlowId:x,notebooks:t,onSelectFlow:function(e,t){$(),t?(h(!0),E(!1)):_(!0),g(e),S(!1)},setFirstFlowId:function(e){Z(e)},screenName:(null==(e=N([m]))||null==(e=e.pop())?void 0:e.text)||"",zIndex:i,setOpenFlowDetails:function(e){_(e)},setOpenAlwaysUpFlow:function(e,t){$(),h(!1),_(!1),t&&(g(t),S(!1)),e?(E(!0),h(!1)):_(!0)},betaFeatures:p}):jsxRuntimeExports.jsxs("div",{className:O.enginesAndFlowWidgetContainer,children:[jsxRuntimeExports.jsx("div",{className:O.enginesContainer,children:jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:B,simpleMode:""!==x,selectedFlowId:x,notebooks:t,setFirstFlowId:function(e){ee&&g(e)},onSelectFlow:function(e){$(),g(e),S(!1)},screenName:(null==(e=N([m]))||null==(t=e.pop())?void 0:t.text)||"",zIndex:i,setOpenFlowDetails:function(e){_(e)},betaFeatures:p,setOpenAlwaysUpFlow:function(e,t){$(),h(!1),_(!1),t&&g(t),E(e)}})}),!w&&jsxRuntimeExports.jsx("div",{className:O.flowWidgetContainer,children:jsxRuntimeExports.jsx("div",{"data-test":"flow-center-flow-widget-container",className:O.flowWidgetContent,children:jsxRuntimeExports.jsx(_e,{})})})]}):jsxRuntimeExports.jsxs("div",{style:{height:o},id:"flows-main-container-no-flows-found",children:[u&&u.flowCenterDialog.open&&jsxRuntimeExports.jsx(UniversalDialog,{}),jsxRuntimeExports.jsx("div",{style:{height:o},id:"flows-main-container",children:jsxRuntimeExports.jsx(NoFlowsFound,{setScreen:f,handleOpenFlowNameDialog:M})})]})})]})}var t=e.graphQLEndpoint,o=void 0===t?DEFAULT_GRAPHQL_ENDPOINT:t,t=e.defaultCluster,L=void 0===t?DEFAULT_CLUSTER:t,t=e.defaultScreen,t=void 0===t?ENGINE_OWNER_TYPES.MINE:t,n=e.tabs,r=void 0===n?DEFAULT_TABS:n,n=e.filters,n=void 0===n?DEFAULT_FILTERS:n,a=e.options,k=void 0===a?{header:{title:"FLOW CENTER",showSearchBar:!0,showNewFromTemplate:!0,showCreateNewFlow:!0,showAdditionalOptionButton:!0,showCollapseButton:!0,showFullScreenButton:!0},controllerFlowPath:"flow"}:a,a=e.openTabFlowWidget,P=void 0===a?0:a,a=e.collapseFlowCenter,B=e.createFlowTemplate,G=e.isFullScreen,W=void 0!==G&&G,G=e.hidePanel,z=e.marginTop,z=void 0===z?0:z,s=e.zIndex,i=void 0===s?0:s,s=e.automateFullScreen,l=void 0!==s&&s,c=useDispatch(),H=(useCommonStyles().classes,useSelector(preferredLanguageSelector)||"en"),U=useSelector(baseUrlSelector),Y=useSelector(rootApiSelector),V=(useSelector(sessionTokenSelector),useSelector(graphEndpointSelector),useSelector(controllerNodeRedImageSelector)),q=useSelector(controllerUrlSelector),e=useSelector(automateControllerUrlSelector),u=(useSelector(engineDistributionTypeSelector),useSelector(newFlowClusterIDSelector),useSelector(flowCenterDialogSelector)||null),q=q||e.replace("automate-",""),p=(useSelector(automateUrlSelector),useSelector(betaFeaturesSelector)),s=(useSelector(function(e){return e.flows.isRevisionsExistOnServer}),setApiEndpoint(U),reactExports.useEffect(function(){setApiEndpoint(U)},[U]),reactExports.useEffect(function(){c(setFlowCenterConfig({isFullScreen:W,automateFullScreen:l,zIndex:i,graphQLEndpoint:o,defaultCluster:L}))},[W,l,i,o,L]),_sliced_to_array(reactExports.useState(""),2)),d=s[0],K=s[1],e=_sliced_to_array(reactExports.useState(t),2),m=e[0],f=e[1],s=_sliced_to_array(reactExports.useState(""),2),x=s[0],g=s[1],t=_sliced_to_array(reactExports.useState(!0),2),e=t[0],s=t[1],t=_sliced_to_array(reactExports.useState(!1),2),Q=t[0],_=t[1],t=_sliced_to_array(reactExports.useState(!1),2),J=t[0],E=t[1],t=_sliced_to_array(reactExports.useState(!1),2),w=t[0],h=t[1],t=_sliced_to_array(reactExports.useState(""),2),X=t[0],Z=t[1],t=_sliced_to_array(reactExports.useState(!0),2),ee=t[0],S=t[1],t=_sliced_to_array(reactExports.useState(W),2),j=t[0],t=t[1],y=_sliced_to_array(reactExports.useState(!1),2),b=y[0],T=y[1],y=_sliced_to_array(reactExports.useState(!1),2),F=y[0],R=y[1],y=_sliced_to_array(reactExports.useState(""),2),te=y[0],oe=y[1],y=_sliced_to_array(reactExports.useState(!0),2),ne=y[0],re=y[1],v=useSelector(function(e){return e.flows.flows}),ae=useSelector(function(e){return e.flows.shouldCreateInitialFlows}),se=useSelector(function(e){return e.flows.isSearching}),ie=useSelector(function(e){return e.flows.searched}),le=useSelector(function(e){return e.flows.fetchingFlows}),y=(reactExports.useEffect(function(){K(ie)},[ie]),reactExports.useEffect(function(){c(isRevisionsExistOnServer())},[c]),reactExports.useEffect(function(){m===ENGINE_OWNER_TYPES.TEMPLATES?c(fetchFlows({name:d,ownerType:ENGINE_OWNER_TYPES.MINE})):c(fetchFlows({name:d,ownerType:m})),null!=v&&v.length||ne||re(!0)},[d,c,m]),reactExports.useEffect(function(){ae||c(fetchFlows({name:d,ownerType:m}))},[ae]),reactExports.useEffect(function(){var e,t;te&&-1<(e=lodashExports.findIndex(v,function(e){return e.id===te}))&&((t=JSON.parse(JSON.stringify(v))).splice(e,1),c(setFlows(t)),re(!1))},[c,v,te]),reactExports.useEffect(function(){var e=document.querySelector("#".concat(mainContainerId));e&&(e.parentElement.style.overflowY="hidden")},[]),reactExports.useEffect(function(){c(searchTemplates())},[]),reactExports.useRef(null)),ce=reactExports.useRef(null),ue=useSelector(function(e){return e.flows.templateToOpen}),pe=useSelector(function(e){return e.flows.tags}),de=useSelector(function(e){return e.flows.categories}),me=useSelector(function(e){return e.flows.templatesAuthors}),N=function(t){return ALL_TABS.filter(function(e){return t.includes(e.key)})},fe=function(t){return ALL_FILTERS.filter(function(e){return t.includes(null==e?void 0:e.group)})},C=_sliced_to_array(reactExports.useState(N(_to_consumable_array(r))),2),xe=C[0],ge=C[1],C=(reactExports.useEffect(function(){ge(N(p?_to_consumable_array(r).concat(_to_consumable_array(BETA_TABS)):r))},[p,r]),_sliced_to_array(reactExports.useState(fe(n)),2)),I=C[0],A=C[1],O=(reactExports.useEffect(function(){var e=I.map(function(e){return"tags"===e.group&&(e.options=pe.map(function(e){return{text:e,value:e}})),e});A(e)},[pe]),reactExports.useEffect(function(){var e=I.map(function(e){return"categories"===e.group&&(e.options=de.map(function(e){return{text:e,value:e}})),e});A(e)},[de]),reactExports.useEffect(function(){var e=I.map(function(e){return"author"===e.group&&(e.options=me.map(function(e){return{text:e,value:e}})),e});A(e)},[me]),makeStyles()(function(e){return{fullScreenClass:{width:"100%"},main:{height:"100%",minHeight:"1000px",width:"1280px",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper},wideMain:{minHeight:"100%",width:"100%",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,overflowY:"auto",position:"fixed",top:0,left:0},fullHeight:{height:"100%"},fixedHeight:{height:"800px"},scrollY:{height:"100%",overflowY:"scroll"},container:{display:"flex",minHeight:"100%!important",position:"relative"},containerHeight:{height:"100%!important"},navigationContainer:{minWidth:"187px!important",maxWidth:"187px!important",width:"187px!important",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),transform:"translateX(0px)",position:"fixed!important",height:"100%!important",borderRight:"0.5px solid #D5DFE9 !important"},noNavigationContainer:{width:0,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),transform:"translateX(-187px)"},wrapperHeaderBar:{width:"inherit!important",cursor:"default"},contentContainer:{marginLeft:"188px!important",flex:"1 1 auto!important",backgroundColor:e.palette.background.paper,cursor:"default"},enginesAndFlowWidgetContainer:{height:"100%!important"},flowWidgetContainer:{position:"absolute",top:0,right:"1px",height:"100%",minWidth:720,width:720,zIndex:2,transitionTimingFunction:"ease-in-out !important",borderLeft:"0.5px solid #D5DFE9",background:e.palette.background.paper},flowWidgetContent:{height:"100%"},enginesContainer:{width:"100%!important",overflowY:"auto!important"},marginTop:{marginTop:"64px!important"},wrapperContainer:{},wrapperContainerWithHiddenOverflow:{overflowY:"hidden"},flowsMainContainer:{overflowY:"auto"},lineItem:{flexDirection:"row",margin:e.spacing(),borderRadius:e.spacing(.5),height:e.spacing(6)},paddingDiv:{paddingTop:"20px"},flowName:{width:"449px"}}})().classes),_e=function(){var e=k.controllerFlowPath;return jsxRuntimeExports.jsx(App$1,{engineId:x,openFlowRunningInstances:w,openAlwaysUpFlow:J,locale:H,openTab:P,config:{apiRoot:Y,graphQLEndpoint:o,controllerUrl:q,defaultCluster:L,controllerNodeRedImage:V,controllerFlowPath:e},tabs:[IFlowWidgetTabs.Overview,IFlowWidgetTabs.Versions,IFlowWidgetTabs.Activity],activityTabs:[IFlowWidgetActivityTabs.Jobs,IFlowWidgetActivityTabs.ScheduledJobs],onExitClicked:function(){g(""),_(!1),h(!1),E(!1)},onDeleteFlow:function(){setTimeout(function(){oe(x),g(""),oe("")},2e3)}})},M=function(e){c(flowCenterDialogAction({open:!0,component:"FlowNameDialog",props:{templateId:e,isCopyFlow:!1,isNotebook:1<arguments.length&&void 0!==arguments[1]&&arguments[1]}}))},Ee=function(e){e=Array(e);return jsxRuntimeExports.jsx("div",{children:Array.from(e).map(function(e,t){return jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",height:35,sx:{m:"8px"}},"skeleton_"+t)})})},we=function(e){var t=I,e=fe(e);lodashExports.isEqual(t,e)||A(e)},$=function(){var e=document.getElementById("flow-center-box-container");e&&(e.scrollTop=0)};return jsxRuntimeExports.jsxs(Container,{fullScreen:j,classes:O,main:ce,marginTop:z,zIndex:i,children:[jsxRuntimeExports.jsx("div",{ref:y,className:O.wrapperHeaderBar,children:jsxRuntimeExports.jsx(Headerbar,{options:k.header,handleOpenFlowNameDialog:M,collapseFlowCenter:a,setFullScreen:t,fullScreen:j,setScreen:f,hidePanel:G,zIndex:i,automateFullScreen:l,enableNotebooks:p,screen:m})}),jsxRuntimeExports.jsx(Box,{id:"flow-center-box-container",className:"".concat(l?O.wrapperContainer:O.marginTop," ").concat(""!==x||b?O.wrapperContainerWithHiddenOverflow:O.wrapperContainer),children:jsxRuntimeExports.jsxs("div",{className:"".concat(O.container," ").concat(F||x?O.containerHeight:""),children:[""!==x&&w&&jsxRuntimeExports.jsx("div",{className:O.flowWidgetContainer,children:jsxRuntimeExports.jsx("div",{"data-test":"flow-center-flow-widget-container",className:O.flowWidgetContent,children:jsxRuntimeExports.jsx(_e,{})})}),jsxRuntimeExports.jsx("div",{className:O.navigationContainer,children:jsxRuntimeExports.jsx(Navigation,{categories:xe,filterers:I,screen:m,tags:pe,onSetType:function(e){switch(g(""),_(!1),h(!1),E(!1),R(!1),T(!1),e){case"organization":f(ENGINE_OWNER_TYPES.ORGANIZATION);break;case"shared":f(ENGINE_OWNER_TYPES.SHARED);break;case"templates":f(ENGINE_OWNER_TYPES.TEMPLATES);break;case"mine":c(setTemplateSelected(!1)),f(ENGINE_OWNER_TYPES.MINE);break;case"notebooks":c(setTemplateSelected(!1)),f(ENGINE_OWNER_TYPES.NOTEBOOKS)}},type:"",showNavigation:e,fullScreen:j,automateFullScreen:l})}),jsxRuntimeExports.jsxs("div",{className:O.contentContainer,children:[jsxRuntimeExports.jsx(Toolbar,{header:null==(n=N([m]))?void 0:n.pop(),showNavigation:e,screen:m,setShowNavigation:s,openFlowDetails:Q,setOpenFlowDetails:function(){$(),c(setOpenTemplate({})),"templates"===m?(R(!F),T(!b)):(R(!1),T(!1)),_(!Q),h(!1),E(!1),g(Q?"":X)}}),(()=>{var e,t;if(se)return jsxRuntimeExports.jsx(SearchResultsPage,{createFlowTemplate:B,openFlowRunningInstances:w,simpleMode:""!==x,selectedFlowId:x,onSelectFlow:function(e,t){$(),(t?h:_)(!0),g(e),S(!1)},setFirstFlowId:function(e){Z(e)},screenName:(null==(e=N([m]))||null==(e=e.pop())?void 0:e.text)||"",handleOpenFlowNameDialog:M,openFirstTemplate:b,isDeselectedTemplate:F,onSelectedTemplate:function(){$(),R(!0),_(!0),T(!0)},classes:O,allowSetFirstFlowId:ee,setSelectedFlowId:g,setOpenFlowRunningInstances:h,setOpenFlowDetails:_,scrollContainerToTop:$,setAllowSetFirstFlowId:S,openTabFlowWidget:P,setUpdateFlowList:oe,controllerFlowPath:k.controllerFlowPath,openAlwaysUpFlow:J,setOpenAlwaysUpFlow:E,betaFeatures:p});switch(m!==ENGINE_OWNER_TYPES.TEMPLATES&&ue.id&&c(setOpenTemplate({})),m){case ENGINE_OWNER_TYPES.TEMPLATES:return we(DEFAULT_FILTERS_FOR_TAB_TEMPLATES),t=l?"calc(100vh - 64px - 54px)":"calc(100vh - 64px - 64px - ".concat(j?"0px":"62px",")"),jsxRuntimeExports.jsxs("div",{style:{height:t},className:O.flowsMainContainer,id:"templates-main-container",children:[u&&u.flowCenterDialog.open&&jsxRuntimeExports.jsx(UniversalDialog,{}),jsxRuntimeExports.jsx(TemplateList,{handleOpenFlowNameDialog:M,openFirstTemplate:b,isDeselectedTemplate:F,onSelectedTemplate:function(){$(),R(!0),_(!0),T(!0)}})]});case ENGINE_OWNER_TYPES.MINE:return D();case ENGINE_OWNER_TYPES.NOTEBOOKS:return D(!0);default:return}})()]})]})})]})},Container=function(e){var t=e.fullScreen,o=e.classes,n=e.main,r=e.marginTop,a=e.zIndex,e=e.children;return t?jsxRuntimeExports.jsx(Portal,{children:jsxRuntimeExports.jsx("div",{role:"presentation","data-test":"flow-center-widget-main-conatiner","data-cy":"flow-center-widget-fullscreen",ref:n,id:mainContainerId,className:o.wideMain,style:{top:r,zIndex:a},children:e})}):jsxRuntimeExports.jsx("div",{role:"presentation","data-test":"flow-center-widget-main-conatiner","data-cy":"flow-center-widget-notfullscreen",ref:n,id:"flow-center-container",className:o.main,style:{top:r,zIndex:a},children:e})};function _define_property(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _object_spread(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):n).forEach(function(e){_define_property(t,e,o[e])})}return t}var App=function(e){return jsxRuntimeExports.jsx(Provider,{store:store,children:jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getFlowCenterModule()],children:jsxRuntimeExports.jsx(AIWareIntlProvider,{children:jsxRuntimeExports.jsx(FlowCenter,_object_spread({},e))})})})};export{App,useCommonStyles};
1
+ import{j as jsxRuntimeExports,c as createAction,L as createReducer,a0 as createSlice,bp as store,P as Provider,u as useSelector,ah as preferredLanguageSelector,b$ as baseUrlSelector,af as rootApiSelector,a4 as sessionTokenSelector,a5 as graphEndpointSelector,aY as controllerNodeRedImageSelector,a_ as controllerUrlSelector,aZ as automateControllerUrlSelector,c0 as flowCenterDialogSelector,bR as automateUrlSelector,at as betaFeaturesSelector,r as reactExports,c1 as ENGINE_OWNER_TYPES,ai as lodashExports,B as Box,c2 as flowCenterDialogReducer,c3 as flowCenterDialogAction,c4 as img$D,c5 as img$E,c6 as img$A,c7 as img$B,c8 as ENGINE_FILTER_TYPES,c9 as img$u,ca as img$Z,cb as setApiEndpoint,_ as all,cc as fetchTemplateGallery,cd as img$y,C as CircularProgress,ce as img$o,bS as img$t,cf as ClickAwayListener,cg as img$F,ch as img$C,ci as img$17,cj as img$9,ck as img$a,cl as img$V,cm as img$v,cn as img$x,co as img$1b,cp as deleteEngine,cq as fetchEngine,cr as img$w,al as AIWareFormatMessage,cs as FormattedDate,am as takeLatest$1,N as put,ct as fetchAllTags,K as select,cu as fetchFlows$1,a2 as call,cv as isRevisionsExistOnServerRequest,cw as fetchVeritoneGraphQLApi}from"./js-core.esm4.js";import{aS as requireCreateSvgIcon,aT as interopRequireDefaultExports,m as makeStyles,D as DynamicModuleLoader,A as AIWareIntlProvider,P as Portal,L as List,T as Typography,M as MemoizedFormattedMessage,p as Divider,F as FormControl,a7 as default_1$6,B as Button,G as Grid,C as Card,bS as flowStyles,bT as NoResults,ad as TableContainer,ae as Table,ai as TableHead,af as TableBody,w as Dialog,k as TableRow,l as TableCell,a6 as TableSortLabel,b5 as Fade,a as Paper,x as DialogTitle,y as DialogContent,J as DialogActions,S as Select,e as MenuItem,am as Tabs,an as Tab}from"./js-core.esm7.js";import{d as default_1$5}from"./js-core.esm76.js";import{ai as ListItemIcon,T as Tooltip,I as IconButton,e as Skeleton,a0 as FormLabel,$ as FormGroup,Y as FormControlLabel,Z as Checkbox,o as devErrorLogger,aC as Popper,a as Snackbar,H as Search,a_ as Close$1,y as DateTime_1,c as TextField}from"./js-core.esm9.js";import{C as CardContent,c as CardActions,f as default_1$8,h as default_1$9,d as default_1$a}from"./js-core.esm26.js";import{T as Toolbar$1,A as App$1,a as TablePagination,S as StatusPill,g as getFlowStatus}from"./js-core.esm127.js";import{d as default_1$7}from"./js-core.esm51.js";import{I as IFlowWidgetTabs,a as IFlowWidgetActivityTabs}from"./js-core.esm20.js";import{L as ListItem,c as ListItemText}from"./js-core.esm8.js";import{A as AppBar}from"./js-core.esm109.js";import{u as useDispatch}from"./js-core.esm14.js";import"./js-core.esm21.js";import"./js-core.esm41.js";import"./js-core.esm121.js";import"./js-core.esm40.js";var WorkOutlineOutlined={},_interopRequireDefault$4=interopRequireDefaultExports,default_1$4=(Object.defineProperty(WorkOutlineOutlined,"__esModule",{value:!0}),WorkOutlineOutlined.default=void 0),_createSvgIcon$4=_interopRequireDefault$4(requireCreateSvgIcon()),_jsxRuntime$4=jsxRuntimeExports,_default$4=(0,_createSvgIcon$4.default)((0,_jsxRuntime$4.jsx)("path",{d:"M14 6V4h-4v2h4zM4 8v11h16V8H4zm16-2c1.11 0 2 .89 2 2v11c0 1.11-.89 2-2 2H4c-1.11 0-2-.89-2-2l.01-11c0-1.11.88-2 1.99-2h4V4c0-1.11.89-2 2-2h4c1.11 0 2 .89 2 2v2h4z"}),"WorkOutlineOutlined"),default_1$4=WorkOutlineOutlined.default=_default$4,PeopleAltOutlined={},_interopRequireDefault$3=interopRequireDefaultExports,default_1$3=(Object.defineProperty(PeopleAltOutlined,"__esModule",{value:!0}),PeopleAltOutlined.default=void 0),_createSvgIcon$3=_interopRequireDefault$3(requireCreateSvgIcon()),_jsxRuntime$3=jsxRuntimeExports,_default$3=(0,_createSvgIcon$3.default)((0,_jsxRuntime$3.jsx)("path",{d:"M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87zM15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24C14.5 5.27 15 6.58 15 8s-.5 2.73-1.33 3.76c.42.14.86.24 1.33.24zm-6 0c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm6 5H3v-.99C3.2 16.29 6.3 15 9 15s5.8 1.29 6 2v1z"}),"PeopleAltOutlined"),default_1$3=PeopleAltOutlined.default=_default$3,PersonOutlineOutlined={},_interopRequireDefault$2=interopRequireDefaultExports,default_1$2=(Object.defineProperty(PersonOutlineOutlined,"__esModule",{value:!0}),PersonOutlineOutlined.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(requireCreateSvgIcon()),_jsxRuntime$2=jsxRuntimeExports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"}),"PersonOutlineOutlined"),default_1$2=PersonOutlineOutlined.default=_default$2,HistoryOutlined={},_interopRequireDefault$1=interopRequireDefaultExports,default_1$1=(Object.defineProperty(HistoryOutlined,"__esModule",{value:!0}),HistoryOutlined.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(requireCreateSvgIcon()),_jsxRuntime$1=jsxRuntimeExports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z"}),"HistoryOutlined"),default_1$1=HistoryOutlined.default=_default$1,FilterListOutlined={},_interopRequireDefault=interopRequireDefaultExports,default_1=(Object.defineProperty(FilterListOutlined,"__esModule",{value:!0}),FilterListOutlined.default=void 0),_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=jsxRuntimeExports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterListOutlined");function _array_like_to_array$9(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_without_holes$2(e){if(Array.isArray(e))return _array_like_to_array$9(e)}function _define_property$6(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _iterable_to_array$2(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread$2(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$5(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):n).forEach(function(e){_define_property$6(t,e,o[e])})}return t}function ownKeys$1(e,t){var o=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),o.push.apply(o,e)),o}function _object_spread_props$1(t,o){return o=null!=o?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ownKeys$1(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}),t}function _to_consumable_array$2(e){return _array_without_holes$2(e)||_iterable_to_array$2(e)||_unsupported_iterable_to_array$9(e)||_non_iterable_spread$2()}function _unsupported_iterable_to_array$9(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$9(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$9(e,t):void 0}function _ts_generator$4(n,r){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(o){return function(e){var t=[o,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var _obj,default_1=FilterListOutlined.default=_default,FETCH_FLOWS="flow-center/FETCH_FLOWS",ADD_NEW_FLOW="flow-center/ADD_NEW_FLOW",IS_REVISIONS_EXIST_ON_SERVER="flow-center/IS_REVISIONS_EXIST_ON_SERVER",SET_IS_REVISIONS_EXIST_ON_SERVER="flow-center/SET_IS_REVISIONS_EXIST_ON_SERVER",SET_FETCHING_FLOWS="flow-center/SET_FETCHING_FLOWS",SET_OPEN_TEMPLATE="flow-center/SET_OPEN_TEMPLATE",SET_TEMPLATE_SELECTED="flow-center/SET_TEMPLATE_SELECTED",SET_TEMPLATES="flow-center/SET_TEMPLATES",SET_FILTERED_TEMPLATES_ACTION="flow-center/SET_FILTERED_TEMPLATES_ACTION",FETCH_TAGS="flow-center/FETCH_TAGS",SET_TAGS="flow-center/SET_TAGS",SET_TAGS_TO_STORE="flow-center/SET_TAGS_TO_STORE",SET_CATEGORIES="flow-center/SET_CATEGORIES",SET_TEMPLATES_AUTHORS="flow-center/SET_TEMPLATES_AUTHORS",SET_SELECTED_FILTERS="flow-center/SET_SELECTED_FILTERS",SET_TAG="flow-center/SET_TAG",SET_FLOWS="flow-center/SET_FLOWS",SET_NOTEBOOKS="flow-center/SET_NOTEBOOKS",FETCH_NOTEBOOKS="flow-center/FETCH_NOTEBOOKS",TOGGLE_IS_SEARCHING="flow-center/TOGGLE_IS_SEARCHING",TOGGLE_IS_SEARCHING_LOADING="flow-center/TOGGLE_IS_SEARCHING_LOADING",SEARCH_TEMPLATES="flow-center/SEARCH_TEMPLATES",SET_SEARCHED="flow-center/SET_SEARCHED",SET_SEARCHED_TEMPLATES="flow-center/SET_SEARCHED_TEMPLATES",SET_CONFIG="flow-center/SET_CONFIG",TOGGLE_STATE_CREATE_NEW_FLOW="flow-center/TOGGLE_STATE_CREATE_NEW_FLOW",SET_SHOULD_CREATE_INITIAL_FLOWS="flow-center/SET_SHOULD_CREATE_INITIAL_FLOWS",GET_NODE_RED_VERSION_EDGE="flow-center/GET_NODE_RED_VERSION_EDGE",setFetchingFlows=createAction(SET_FETCHING_FLOWS),isRevisionsExistOnServer=createAction(IS_REVISIONS_EXIST_ON_SERVER),setOpenTemplate=createAction(SET_OPEN_TEMPLATE),setTemplateSelected=createAction(SET_TEMPLATE_SELECTED),setTemplatesAction=createAction(SET_TEMPLATES),setFilteredTemplatesAction=createAction(SET_FILTERED_TEMPLATES_ACTION),setTags=(createAction(FETCH_TAGS),createAction(SET_TAGS)),setTagsToStore=createAction(SET_TAGS_TO_STORE),setCategories=createAction(SET_CATEGORIES),setTemplatesAuthors=createAction(SET_TEMPLATES_AUTHORS),setSelectedFilters=createAction(SET_SELECTED_FILTERS),fetchFlows=(createAction(SET_TAG),createAction(FETCH_FLOWS)),fetchNotebooks=createAction(FETCH_NOTEBOOKS),setFlows=createAction(SET_FLOWS),setNotebooks=createAction(SET_NOTEBOOKS),addNewFlow=createAction(ADD_NEW_FLOW),toggleIsSearching=createAction(TOGGLE_IS_SEARCHING),toggleIsSearchingLoading=createAction(TOGGLE_IS_SEARCHING_LOADING),searchTemplates=createAction(SEARCH_TEMPLATES),setSearched=createAction(SET_SEARCHED),setSearchedTemplates=createAction(SET_SEARCHED_TEMPLATES),setFlowCenterConfig=createAction(SET_CONFIG),toggleStateCreateNewFlow=createAction(TOGGLE_STATE_CREATE_NEW_FLOW),setShouldCreateInitialFlows=createAction(SET_SHOULD_CREATE_INITIAL_FLOWS),flowsReducer=(createAction(GET_NODE_RED_VERSION_EDGE),createReducer({flows:[],notebooks:[],shouldCreateInitialFlows:!1,fetchingFlows:!1,templateToOpen:{},isTemplateSelected:!1,tags:[],categories:[],templatesAuthors:[],templates:[],filteredTemplates:[],selectedFilters:{},isSearching:!1,isSearchingLoading:!1,searched:"",searchedTemplates:null,config:{isFullScreen:!1,automateFullScreen:!1,zIndex:0,graphQLEndpoint:"",defaultCluster:""},isLoadingCreateNewFlow:!1,isRevisionsExistOnServer:!1},(_define_property$6(_obj={},FETCH_FLOWS,function(e){return _object_spread$5({},e)}),_define_property$6(_obj,ADD_NEW_FLOW,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{flows:[t].concat(_to_consumable_array$2(e.flows))})}),_define_property$6(_obj,SET_FETCHING_FLOWS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{fetchingFlows:t})}),_define_property$6(_obj,SET_OPEN_TEMPLATE,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{templateToOpen:t})}),_define_property$6(_obj,SET_TEMPLATE_SELECTED,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{isTemplateSelected:t})}),_define_property$6(_obj,SET_TAGS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{tags:t})}),_define_property$6(_obj,SET_TAGS_TO_STORE,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{tags:t})}),_define_property$6(_obj,SET_CATEGORIES,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{categories:t})}),_define_property$6(_obj,SET_TEMPLATES_AUTHORS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{templatesAuthors:t})}),_define_property$6(_obj,SET_SELECTED_FILTERS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{selectedFilters:t})}),_define_property$6(_obj,SET_TEMPLATES,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{templates:t})}),_define_property$6(_obj,SET_FILTERED_TEMPLATES_ACTION,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{filteredTemplates:t})}),_define_property$6(_obj,SET_TAG,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{tag:t})}),_define_property$6(_obj,SET_FLOWS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{flows:t})}),_define_property$6(_obj,SET_NOTEBOOKS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{notebooks:t})}),_define_property$6(_obj,TOGGLE_IS_SEARCHING,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{isSearching:t})}),_define_property$6(_obj,TOGGLE_IS_SEARCHING_LOADING,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{isSearchingLoading:t})}),_define_property$6(_obj,SET_SEARCHED,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{searched:t})}),_define_property$6(_obj,SET_SEARCHED_TEMPLATES,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{searchedTemplates:t})}),_define_property$6(_obj,SET_CONFIG,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{config:t})}),_define_property$6(_obj,TOGGLE_STATE_CREATE_NEW_FLOW,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{isLoadingCreateNewFlow:t})}),_define_property$6(_obj,SET_IS_REVISIONS_EXIST_ON_SERVER,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{isRevisionsExistOnServer:t})}),_define_property$6(_obj,SET_SHOULD_CREATE_INITIAL_FLOWS,function(e,t){t=t.payload;return _object_spread_props$1(_object_spread$5({},e),{shouldCreateInitialFlows:t})}),_obj))),namespace$2="flows";function fetchTagsSaga(){var n;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:return n=e.sent(),[4,takeLatest$1(FETCH_TAGS,function(t){var o;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,fetchAllTags(t.payload.ids,n)];case 1:return void 0===(o=e.sent())?[3,3]:[4,put(setTags(o))];case 2:e.sent(),e.label=3;case 3:return[2]}})})];case 2:return e.sent(),[2]}})}function fetchFlowsSaga(){return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(FETCH_FLOWS,function(t){var o,n,r;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,put(setFetchingFlows(!0))];case 1:return e.sent(),[4,select(sessionTokenSelector)];case 2:switch(o=e.sent(),r=300,t.payload.ownerType){case ENGINE_OWNER_TYPES.ORGANIZATION:return[3,3];case ENGINE_OWNER_TYPES.MINE:return[3,5];case ENGINE_OWNER_TYPES.SHARED:return[3,7];case ENGINE_OWNER_TYPES.NOTEBOOKS:return[3,9]}return[3,11];case 3:return[4,fetchFlows$1({name:t.payload.name,owned:!1,offset:0,limit:r,authToken:o})];case 4:return n=e.sent(),[3,12];case 5:return[4,fetchFlows$1({name:t.payload.name,owned:!0,offset:0,limit:r,authToken:o})];case 6:return n=e.sent(),[3,12];case 7:return[4,fetchFlows$1({name:t.payload.name,owned:!1,offset:0,limit:r,authToken:o})];case 8:return n=e.sent(),[3,12];case 9:return[4,fetchFlows$1({name:t.payload.name,owned:!0,offset:0,limit:r,authToken:o,isNotebook:!0})];case 10:return n=e.sent(),[3,12];case 11:return[3,12];case 12:return void 0!==n&&n?0!==n.data.engines.records.length||t.payload.name?[3,14]:[4,put(setShouldCreateInitialFlows(!0))]:[3,18];case 13:e.sent(),e.label=14;case 14:return t.payload.ownerType!==ENGINE_OWNER_TYPES.NOTEBOOKS?[3,16]:[4,put(setNotebooks(n.data.engines.records))];case 15:return e.sent(),[3,18];case 16:return[4,put(setFlows(n.data.engines.records))];case 17:e.sent(),e.label=18;case 18:return[4,put(toggleIsSearchingLoading(!1))];case 19:return e.sent(),[4,put(setFetchingFlows(!1))];case 20:return e.sent(),[2]}})})];case 1:return e.sent(),[2]}})}function fetchNotebooksSaga(){return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(FETCH_NOTEBOOKS,function(t){var o;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:return o=e.sent(),[4,fetchFlows$1({name:t.payload.name,owned:!0,offset:0,limit:300,authToken:o,isNotebook:!0})];case 2:return void 0!==(o=e.sent())&&o?[4,put(setNotebooks(o.data.engines.records))]:[3,4];case 3:e.sent(),e.label=4;case 4:return[4,put(toggleIsSearchingLoading(!1))];case 5:return e.sent(),[2]}})})];case 1:return e.sent(),[2]}})}function searchTemplatesSaga(){return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(SEARCH_TEMPLATES,function(){var t,o;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:return t=e.sent(),[4,call(fetchTemplateGallery,t,{isPublic:!0,limit:200})];case 2:return(o=e.sent())&&o.data&&o.data.flowTemplates&&o.data.flowTemplates.records&&0<o.data.flowTemplates.records.length?[4,put(setTemplatesAction(o.data.flowTemplates.records))]:[3,5];case 3:return e.sent(),[4,put(setFilteredTemplatesAction(o.data.flowTemplates.records))];case 4:e.sent(),e.label=5;case 5:return[2]}})})];case 1:return e.sent(),[2]}})}function isRevisionsExistOnServerSaga(){return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(IS_REVISIONS_EXIST_ON_SERVER,function(){var t,o;return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,select(sessionTokenSelector)];case 1:o=e.sent(),e.label=2;case 2:return e.trys.push([2,4,,6]),[4,call(isRevisionsExistOnServerRequest,o)];case 3:return t=e.sent(),[3,6];case 4:return e.sent(),[4,put({type:SET_IS_REVISIONS_EXIST_ON_SERVER,payload:!1})];case 5:return e.sent(),[3,6];case 6:return lodashExports.get(t,"data.flowRevisions","")?[4,put({type:SET_IS_REVISIONS_EXIST_ON_SERVER,payload:!0})]:[3,8];case 7:e.sent(),e.label=8;case 8:return[2]}})})];case 1:return e.sent(),[2]}})}function flowsSaga(){return _ts_generator$4(this,function(e){switch(e.label){case 0:return[4,all([fetchTagsSaga(),fetchNotebooksSaga(),fetchFlowsSaga(),searchTemplatesSaga(),isRevisionsExistOnServerSaga()])];case 1:return e.sent(),[2]}})}function _ts_generator$3(n,r){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(o){return function(e){var t=[o,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function flowCenterRootSaga(){return _ts_generator$3(this,function(e){switch(e.label){case 0:return[4,all([flowsSaga()])];case 1:return e.sent(),[2]}})}var namespace$1="newFlowClusterID",initialState$1={newFlowClusterID:""},newFlowClusterIDSlice=createSlice({name:namespace$1,initialState:initialState$1,reducers:{newFlowClusterIDAction:function(e,t){e.newFlowClusterID=t.payload}}}),newFlowClusterIDSelector=function(e){return(null==e?void 0:e[namespace$1])||null},newFlowClusterIDAction=newFlowClusterIDSlice.actions.newFlowClusterIDAction,newFlowClusterIDnReducer=newFlowClusterIDSlice.reducer,namespace="engineDistributionType",initialState={engineDistributionType:"instance_locked"},engineDistributionSlice=createSlice({name:namespace,initialState:initialState,reducers:{engineDistributionTypeAction:function(e,t){e.engineDistributionType=t.payload}}}),engineDistributionTypeSelector=function(e){return(null==e?void 0:e[namespace])||null},engineDistributionTypeReducer=(engineDistributionSlice.actions.engineDistributionTypeAction,engineDistributionSlice.reducer);function _define_property$5(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var newFlowClusterIDNameSpace="newFlowClusterID",engineDistributionTypeNameSpace="engineDistributionType",flowCenterDialogNameSpace="flowCenterDialog";function getFlowCenterModule(){var e;return{id:"flow-center",reducerMap:(_define_property$5(e={},namespace$2,flowsReducer),_define_property$5(e,newFlowClusterIDNameSpace,newFlowClusterIDnReducer),_define_property$5(e,engineDistributionTypeNameSpace,engineDistributionTypeReducer),_define_property$5(e,flowCenterDialogNameSpace,flowCenterDialogReducer),e),sagas:[flowCenterRootSaga],initialActions:[]}}function _array_like_to_array$8(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$8(e){if(Array.isArray(e))return e}function _array_without_holes$1(e){if(Array.isArray(e))return _array_like_to_array$8(e)}function _define_property$4(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _iterable_to_array$1(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit$8(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$8(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread$1(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$4(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):n).forEach(function(e){_define_property$4(t,e,o[e])})}return t}function _sliced_to_array$8(e,t){return _array_with_holes$8(e)||_iterable_to_array_limit$8(e,t)||_unsupported_iterable_to_array$8(e,t)||_non_iterable_rest$8()}function _to_consumable_array$1(e){return _array_without_holes$1(e)||_iterable_to_array$1(e)||_unsupported_iterable_to_array$8(e)||_non_iterable_spread$1()}function _unsupported_iterable_to_array$8(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$8(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$8(e,t):void 0}store.addModules([getFlowCenterModule()]);var useStyles$d=makeStyles()(function(){return{icon:{fontSize:"16px!important",minWidth:"0px!important",paddingLeft:"8px!important",paddingRight:"8px!important","& svg":{fill:"#555F7C!important"}},text:{fontSize:"14px!important"},listItemText:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important"},listItemTextFilters:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",wordBreak:"break-word"},category:{fontFamily:"Nunito",fontStyle:"normal!important",color:"#2A323C!important",fontSize:"14px!important",marginright:"6px!important",fontWeight:"500!important",paddingLeft:"8px!important"},formControl:{marginBottom:"10px!important",marginTop:"10px!important"},marginLeft:{paddingLeft:"8px!important",paddingRight:"8px!important"},boxBackground:{height:"100%!important"},paddingLeft:{paddingLeft:"0px!important",minWidth:"0px!important",borderRadius:"4px!important"},fullScreenMode:{marginTop:"64.5px!important"},selectedPaddingLeft:{background:"#F2F5F9 !important",color:"#1871E8 !important"},group:{paddingLeft:"8px!important"},filterTitleContainer:{display:"flex",alignItems:"center!important"},expandIconClass:{display:"flex",paddingLeft:"5px!important","&:hover":{cursor:"pointer!important"}},scroll:{overflowY:"auto",overflowX:"hidden"}}});function Navigation(e){var t=e.categories,o=e.filterers,n=e.screen,r=e.onSetType,a=e.showNavigation,s=e.fullScreen,e=e.automateFullScreen,i=useStyles$d().classes,l=useDispatch(),c=_sliced_to_array$8(reactExports.useState([]),2),u=c[0],p=c[1],d=useSelector(function(e){return e.flows.selectedFilters}),m=useSelector(function(e){return e.flows.isSearching});var f=function(t){var o=u.indexOf(t);p(-1===o?function(e){return e.push(t),_to_consumable_array$1(e)}:function(e){return e.splice(o,1),_to_consumable_array$1(e)})},x=function(e,t){var o=_object_spread$4({},d),n=d[e];o[e]=[],n&&(o[e]=_to_consumable_array$1(n)),o[e].includes(t)?o[e].splice(o[e].indexOf(t),1):o[e].push(t),0===o[e].length&&delete o[e],l(setSelectedFilters(o))};reactExports.useEffect(function(){x(ENGINE_FILTER_TYPES.PUBLIC,"1")},[]);return jsxRuntimeExports.jsx(Box,{className:i.boxBackground,children:jsxRuntimeExports.jsxs(Box,{className:i.marginLeft,children:[jsxRuntimeExports.jsx(List,{className:e?i.fullScreenMode:"",children:t.map(function(e){var t=e.key,e=e.text;return jsxRuntimeExports.jsxs(ListItem,{id:"flow-center-navigation-listItem-conatiner","data-test":"flow-center-navigation-tabs-".concat(t),button:!0,disableRipple:!0,selected:n.toLowerCase()===t&&!m,onClick:function(){return e=t,l(toggleIsSearching(!1)),l(toggleIsSearchingLoading(!1)),l(setSearched("")),l(setSearchedTemplates(null)),l(fetchFlows("notebooks"===e?{name:"",ownerType:ENGINE_OWNER_TYPES.NOTEBOOKS}:{name:"",ownerType:ENGINE_OWNER_TYPES.MINE})),void r(e);var e},className:i.paddingLeft,classes:{selected:i.selectedPaddingLeft},children:[jsxRuntimeExports.jsx(ListItemIcon,{className:i.icon,children:(e=>{switch(e){case"mine":return n.toLowerCase()!==e||m?jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$E,alt:"myFlowsBlue"}):jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$D,alt:"myFlows"});case"templates":return n.toLowerCase()!==e||m?jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$B,alt:"templatesBlue"}):jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$A,alt:"templates"});case"notebooks":return n.toLowerCase()!==e||m?jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$E,alt:"myFlowsBlue"}):jsxRuntimeExports.jsx("img",{width:"24px",height:"24px",src:img$D,alt:"myFlows"});case"WorkOutlineOutlinedIcon":return jsxRuntimeExports.jsx(default_1$4,{});case"PeopleAltOutlinedIcon":return jsxRuntimeExports.jsx(default_1$3,{});case"PersonOutlineOutlinedIcon":return jsxRuntimeExports.jsx(default_1$2,{});default:return jsxRuntimeExports.jsx(default_1$1,{})}})(t)}),jsxRuntimeExports.jsx(ListItemText,{"data-test":"flow-center-navigation-listItemText",className:"flow-center-navigation-listItemText",primary:e,classes:{primary:i.listItemText}})]},t)})}),a&&(c=e?"calc(100vh - 64px - 16px - 86px - 8px - 54px":"calc(100vh - 64px - 16px - 86px - 8px - ".concat(s?"0px":"54px",")"),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Divider,{}),jsxRuntimeExports.jsx("div",{className:i.scroll,style:{height:c},children:o.map(function(e,n){var t=e.text,r=e.group,e=e.options;return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs(FormControl,{component:"fieldset",className:i.formControl,"data-test":"flow-center-".concat(r,"-container"),id:"flow-center-".concat(r,"-container"),children:[jsxRuntimeExports.jsxs("div",{className:i.filterTitleContainer,children:[jsxRuntimeExports.jsx(FormLabel,{className:i.category,component:"legend",children:t}),jsxRuntimeExports.jsx("div",{className:i.expandIconClass,onClick:function(){return f(n)},children:u.includes(n)?jsxRuntimeExports.jsx(default_1$5,{fontSize:"small",style:{fill:"#555F7C",width:"18px!important",height:"18px!important"}}):jsxRuntimeExports.jsx(default_1$6,{fontSize:"small",style:{fill:"#555F7C",width:"18px!important",height:"18px!important"}})})]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(FormGroup,{className:i.group,children:e.map(function(e){var t=e.text,o=e.value;if(!u.includes(n))return jsxRuntimeExports.jsx(FormControlLabel,{control:jsxRuntimeExports.jsx(Checkbox,{checked:d[r]&&d[r].includes(o),name:o,color:"primary",onClick:function(){return x(r,o)}}),label:jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-table-optionText",className:i.listItemTextFilters,children:t}),"data-test":"flow-center-filter-item",id:"flow-center-filter-item"},"".concat(r,"-").concat(o))})})})]},r+n)},r+n)})})]}))]})})}function _array_like_to_array$7(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$7(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$7(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$7(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$7(e,t){return _array_with_holes$7(e)||_iterable_to_array_limit$7(e,t)||_unsupported_iterable_to_array$7(e,t)||_non_iterable_rest$7()}function _unsupported_iterable_to_array$7(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$7(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$7(e,t):void 0}var MIN_NUM_ITEM_ON_ROW=3,useStyles$c=makeStyles()(function(e){return{container:{marginLeft:"12px!important"},cardRoot:{display:"flex",flexDirection:"column",justifyContent:"center!important",border:"0.5px solid #D5DFE9!important",boxShadow:"none!important",borderRadius:"4px!important",marginRight:"10px!important"},cardContainer:{marginTop:"20px!important",marginLeft:"20px!important",marginBottom:"15px!important",marginRight:"20px!important",maxHeight:"150px",minHeight:"150px",display:"flex",flexDirection:"column"},title:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",wordBreak:"break-word!important",cursor:"pointer",color:"#2A323C!important"},subtitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:500,fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",wordWrap:"break-word!important"},veritoneCertifiedContainer:{display:"flex",marginTop:"10px!important"},veritoneCertified:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:500,fontSize:"10px!important",lineHeight:"18px!important",letterSpacing:"-1.30385e-09px!important",wordWrap:"break-word!important",color:"#2A323C!important",marginLeft:"4px!important"},pos:{marginBottom:12},centerButton:{justifyContent:"center!important"},cardContent:{padding:"0px!important",height:"120px!important",textOverflow:"ellipsis!important"},titleContent:{height:"82px!important",overflow:"auto"},bottomButton:{marginTop:"10px",padding:"0px!important",display:"flex",height:"30px!important"},box:{display:"flex",marginTop:e.spacing(3.2),marginBottom:e.spacing(3.2)},viewAllButton:{color:"#6098D1!important",textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"12px!important",lineHeight:"16px!important",marginRight:"24px!important",letterSpacing:"-1.30385e-09px!important"},createFlowButton:{textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"12px!important",lineHeight:"16px!important",marginLeft:"0px!important",padding:"6px 12px 6px 12px!important",background:e.palette.background.paper,color:"#1871E8!important",letterSpacing:"0.02857em"},viewDetailsButton:{textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"12px!important",lineHeight:"16px!important",background:e.palette.background.paper,color:"#6098D1!important",letterSpacing:"0.02857em"},createBlankFlowButton:{display:"flex",justifyContent:"center!important","& svg":{fill:"#555F7C!important"}},createBlankFlowLayout:{display:"flex",flexDirection:"column"},lowercaseButton:{textTransform:"none!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important"},text:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:400,fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important"}}}),TemplateGallery=function(e){function t(e,t){e.data[t].records&&p(e.data[t].records),m(Math.min(MIN_NUM_ITEM_ON_ROW,e.data[t].records.length))}function o(e){s(ENGINE_OWNER_TYPES.TEMPLATES),l(setOpenTemplate({id:e.id,title:e.title})),i(!0)}function n(e){a(e)}var r=e.goToTemplateList,a=e.handleOpenFlowNameDialog,s=e.setScreen,i=e.handleOpenTemplateDetails,l=useDispatch(),c=useStyles$c().classes,e=_sliced_to_array$7(reactExports.useState([]),2),u=e[0],p=e[1],e=_sliced_to_array$7(reactExports.useState(0),2),d=e[0],m=e[1],f=useSelector(sessionTokenSelector),e=_sliced_to_array$7(reactExports.useState(!0),2),x=e[0],g=e[1];reactExports.useEffect(function(){u.length?setTimeout(function(){g(!1)},3e3):fetchTemplateGallery(f,{isPublic:!0}).then(function(e){setTimeout(function(){g(!1)},3e3),t(e,"flowTemplates")}).catch(function(e){devErrorLogger("error fetching flow templates: ".concat(JSON.stringify(e)))})},[t]);return jsxRuntimeExports.jsxs("div",{className:c.container,children:[jsxRuntimeExports.jsxs(Box,{mt:2,mb:2,className:c.box,children:[jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-table-populatTemplates",className:c.text,style:{flexGrow:1},children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.1v6wsw",defaultMessage:"Popular Templates",description:"Templates screen"})}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-gallery-viewAllTemplates",size:"small",className:c.viewAllButton,onClick:r,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.viewall",defaultMessage:"View All",description:"View All Templates Button"})})]}),jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templates-on-flows-page",container:!0,id:"flow-center-templates",children:u.slice(0,d).map(function(e,t){return jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templatesGallery",item:!0,xs:4,children:jsxRuntimeExports.jsx(Card,{className:c.cardRoot,id:"flow-center-template-card",children:jsxRuntimeExports.jsxs("div",{className:c.cardContainer,children:[jsxRuntimeExports.jsxs(CardContent,{className:c.cardContent,children:[jsxRuntimeExports.jsxs("div",{className:c.titleContent,children:[x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:80,height:15}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateGallery-title",className:c.title,gutterBottom:!0,onClick:function(){return o(e)},children:null==e?void 0:e.title}),x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:80,height:15,sx:{mt:"5px"}}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateGallery-subtitle",className:c.subtitle,"aria-multiline":!0,variant:"body2",component:"p",children:e.subtitle})]}),jsxRuntimeExports.jsx("div",{className:c.veritoneCertifiedContainer,children:x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:120,height:15}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("img",{src:img$y,alt:"veritoneCertifiedIcon"}),jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateGallery-veritoneCertified",className:c.veritoneCertified,component:"p",children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.veritonecertified",defaultMessage:"Veritone Certified",description:"Veritone Certified Template Text"})})]})})]}),jsxRuntimeExports.jsxs(CardActions,{className:c.bottomButton,children:[x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:120,height:20}):jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-gallery-createFlowFromTemplate-".concat(t),onClick:function(){return n(e.id)},id:"flow-center-create-flow-btn-".concat(t),size:"small",variant:"outlined",color:"primary",className:c.createFlowButton,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.createflow",defaultMessage:"Create Flow",description:"Complete Flow Button Text"})}),x?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:120,height:15}):jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-gallery-viewDetailsForTemplate-".concat(t),onClick:function(){return o(e)},size:"small",color:"primary",className:c.viewDetailsButton,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.viewdetails",defaultMessage:"View Details",description:"View Details Button Text"})})]})]})})},e.title+t)})})]})},SHARED_MESSAGES={noTags:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.ImtbH0",defaultMessage:"No Tags",description:"No Tags"})},createFlowFromTemplate:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.CNPhK1",defaultMessage:"Create Flow From Template",description:"Create Flow From Template"})},overview:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.6+BhsD",defaultMessage:"Overview",description:"Overview"})},developer:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.GKqAH1",defaultMessage:"Developer",description:"Developer"})},certified:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.1tTedK",defaultMessage:"Certified",description:"Certified"})},yes:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.9U4lyw",defaultMessage:"Yes",description:"Yes"})},category:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.RYa6+l",defaultMessage:"Category",description:"Category"})},tags:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.ImtbH1",defaultMessage:"Tags",description:"Tags"})},active:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.UkeQP9",defaultMessage:"Active",description:"Active"})},ready:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.readymessage",defaultMessage:"Ready",description:"Ready"})},pending:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.pendingmessage",defaultMessage:"Pending",description:"Pending"})},draft:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.draftonotactive",defaultMessage:"Not active",description:"Draft to not active translation"})},viewDetails:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.yFa4dd",defaultMessage:"View Details",description:"View Details"})},version:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.i8EBVW",defaultMessage:"Version",description:"Version"})},openFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.IEIrEm",defaultMessage:"Open Flow",description:"Open Flow"})},alwaysUpFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.TYFJtu",defaultMessage:"Schedule Always Up Flow",description:"Schedule Always Up Flow"})},createFlowTemplate:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.XSJ4Aa",defaultMessage:"Create Flow Template",description:"Create Flow Template"})},openFlowAdv:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.IEIfEt",defaultMessage:"Open With Cluster",description:"Open With Cluster"})},deleteFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.MPiXf5",defaultMessage:"Delete Flow",description:"Delete Flow"})},confirmDelete:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.mPEQWb",defaultMessage:"Confirm Delete",description:"Confirm Delete"})},exitFullScreen:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.awe7uYa",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"})},enterFullScreen:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.stiZt+d",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"})},closePanel:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"})},copyFlowID:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.1mDYO7",defaultMessage:"Copy Flow ID",description:"Copy Flow ID"})},hideFilters:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.Iy59d3",defaultMessage:"Hide Filter",description:"Hide Filter"})},showFilters:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.g5zZtA",defaultMessage:"Show Filter",description:"Show Filter"})},showMoreInformation:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.ParFja",defaultMessage:"More Information",description:"More Information"})},hideMoreInformation:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.DXuAKS",defaultMessage:"Close More Information",description:"Close More Information"})},engineIdHasBeenCopied:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.CRvRbB",defaultMessage:"Engine ID has been copied",description:"copy of the engine id"})},cancel:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.6PdOcy",defaultMessage:"Cancel",description:"Cancel"})},delete:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.qviIFp",defaultMessage:"Delete",description:"Delete"})},noFlowsFound:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.WX6wfG",defaultMessage:"No Flows Found",description:"No Flows Found"})},noFlowsFoundSubtitle:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.54mq63",defaultMessage:"Click the ‘Create New Flow’ button below to create your first flow",description:"Click the ‘Create New Flow’ button below to create your first flow"})},createNewFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.54mq64",defaultMessage:"Create New Flow",description:"Create New Flow"})},chooseATemplate:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.jhiPmN",defaultMessage:"Choose a Template",description:"Choose a Template"})},newFlow:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.54mq65",defaultMessage:"New Flow",description:"New Flow"})},newNotebook:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.newNotebookButton",defaultMessage:"New Notebook",description:"New Notebook"})},noSearchResultsFound:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.OYovRP",defaultMessage:"No results found",description:"No results found"})},noSearchResultsFoundSubtitle:function(){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.No+Hwv",defaultMessage:"Sorry, there are no results for this search. Please try another search.",description:"Sorry, there are no results for this search. Please try another search."})},flowsCount:function(e){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.flowscount",defaultMessage:"Flows {flowsCount}",description:"Flows Count",values:{flowsCount:e}})},templatesCount:function(e){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.templatescount",defaultMessage:"Templates {templatesCount}",description:"Templates Count",values:{templatesCount:e}})},notebookCount:function(e){return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.notebookCount",defaultMessage:"Notebooks {notebookCount}",description:"Notebook Count",values:{notebookCount:e}})}},useCommonStyles=makeStyles()(function(e){return{title:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:600,fontSize:"18px!important",lineHeight:"24px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",paddingBottom:"2px!important",paddingLeft:"0px!important",paddingRight:"0px!important",paddingTop:"0px!important"},content:{fontFamily:"Nunito",fontWeight:"normal",fontStyle:"normal",fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",paddingLeft:"0px!important",paddingRight:"0px!important",paddingBottom:"0px!important"},cancelButton:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",padding:"8px 15px!important",letterSpacing:"-1.30385e-09px!important",color:"#2A323C!important",textTransform:"none"},confirmationButton:{textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",background:"#0D62D2!important",color:e.palette.background.paper,padding:"8px 15px!important",marginLeft:"22px!important"},disabledButton:{background:"#efefef4d!important",color:"#00000042",textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",padding:"8px 15px!important",marginLeft:"22px!important"},actions:{padding:"0px!important",marginTop:"30px!important"},container:{padding:"30px!important"},active:{margin:"auto 10px",fontSize:"15px!important",color:"".concat(e.palette.success.main," !important"),lineHeight:"18px"},inactive:{margin:"auto 10px",fontSize:"15px!important",color:"".concat(e.palette.error.main," !important"),lineHeight:"18px"}}}),SHARED_DATE_TIME={getDate:function(e){return jsxRuntimeExports.jsx(FormattedDate,{value:e,day:"2-digit",month:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})}};function _array_like_to_array$6(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$6(e){if(Array.isArray(e))return e}function asyncGeneratorStep$2(e,t,o,n,r,a,s){try{var i=e[a](s),l=i.value}catch(e){return void o(e)}i.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator$2(i){return function(){var e=this,s=arguments;return new Promise(function(t,o){var n=i.apply(e,s);function r(e){asyncGeneratorStep$2(n,t,o,r,a,"next",e)}function a(e){asyncGeneratorStep$2(n,t,o,r,a,"throw",e)}r(void 0)})}}function _define_property$3(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _iterable_to_array_limit$6(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$6(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread$3(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):n).forEach(function(e){_define_property$3(t,e,o[e])})}return t}function ownKeys(e,t){var o=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),o.push.apply(o,e)),o}function _object_spread_props(t,o){return o=null!=o?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}),t}function _sliced_to_array$6(e,t){return _array_with_holes$6(e)||_iterable_to_array_limit$6(e,t)||_unsupported_iterable_to_array$6(e,t)||_non_iterable_rest$6()}function _unsupported_iterable_to_array$6(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$6(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$6(e,t):void 0}function _ts_generator$2(n,r){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(o){return function(e){var t=[o,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var useStyles$b=makeStyles()(function(){return{disabledButton:{background:"#efefef4d!important",color:"#00000042"},fullWidth:{width:"100%"},paddingDiv:{paddingTop:"20px"},buttonDiv:{display:"flex"}}}),FlowList=function(e){function t(e){return jsxRuntimeExports.jsx(TableSortLabel,{active:y===e,IconComponent:default_1$6,direction:y===e?j:"asc",onClick:function(){return le(e)},classes:{icon:x.sortIcon}})}function o(e){X(!1),e&&deleteEngine(b,_).then(function(t){var e,o;t.data&&t.data.deleteEngine&&t.data.deleteEngine.id?(e=lodashExports.findIndex(E,function(e){return e.id===t.data.deleteEngine.id}),(o=JSON.parse(JSON.stringify(E))).splice(e,1),f(setFlows(o)),F("FLOW_DELETED_SUCCESS")):(v(""),F("FLOW_DELETED_FAIL"))}).catch(function(e){e.message.includes("engine state")?fetchEngine(b,1,_).then(function(e){v(e.data.engine.state),F("FLOW_DELETED_FAIL")}).catch(function(e){v(""),F("FLOW_DELETED_FAIL")}):(v(""),F("FLOW_DELETED_FAIL"))}).finally(function(){T(!0)})}function n(){T(!1)}function i(e){var e=e||b,t=h?"latest":ue(e),o="".concat(w,"/flow/").concat(e,"/").concat(t);s&&(o="".concat(w,"/notebook/").concat(e,"/").concat(t)),window.open(o,"_blank","noopener,noreferrer")}function l(e){return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Typography,{"data-test":"flow-widget-executions-table-time",className:x.dateTime,children:e?SHARED_DATE_TIME.getDate(e):null}),jsxRuntimeExports.jsx(Typography,{"data-test":"flow-widget-executions-table-time-caption",variant:"caption",className:x.dateTimeSmall,children:e?DateTime_1.fromISO(e).toLocaleString(DateTime_1.TIME_SIMPLE):null})]})}function D(e,t){te(t)}function L(e){oe(parseInt(e.target.value,10)),te(0)}var r,a,c=e.onSelectFlow,k=e.simpleMode,P=e.screenName,u=e.selectedFlowId,s=e.notebooks,B=e.setFirstFlowId,G=e.zIndex,p=e.showTitle,p=void 0===p||p,W=e.setOpenFlowDetails,d=e.createFlowTemplate,m=e.setOpenAlwaysUpFlow,z=e.betaFeatures,f=useDispatch(),x=flowStyles().classes,g=useCommonStyles().classes,e=useStyles$b().classes,_=useSelector(sessionTokenSelector),E=useSelector(function(e){return s?e.flows.notebooks:e.flows.flows}),w=useSelector(automateUrlSelector),h=useSelector(function(e){return e.flows.isRevisionsExistOnServer}),S=_sliced_to_array$6(reactExports.useState(null),2),H=S[0],U=S[1],S=_sliced_to_array$6(reactExports.useState("desc"),2),j=S[0],Y=S[1],S=_sliced_to_array$6(reactExports.useState("modifiedDateTime"),2),y=S[0],V=S[1],S=_sliced_to_array$6(reactExports.useState(!1),2),q=S[0],K=S[1],S=_sliced_to_array$6(reactExports.useState(""),2),b=S[0],Q=S[1],S=_sliced_to_array$6(reactExports.useState(!1),2),J=S[0],X=S[1],S=_sliced_to_array$6(reactExports.useState(!1),2),Z=S[0],T=S[1],S=_sliced_to_array$6(reactExports.useState(""),2),ee=S[0],F=S[1],S=_sliced_to_array$6(reactExports.useState(""),2),R=S[0],v=S[1],S=_sliced_to_array$6(reactExports.useState(0),2),N=S[0],te=S[1],S=_sliced_to_array$6(reactExports.useState(100),2),C=S[0],oe=S[1],I=useSelector(newFlowClusterIDSelector)||null,S=_sliced_to_array$6(reactExports.useState([]),2),S=S[0],A=_sliced_to_array$6(reactExports.useState(!1),2),ne=A[0],re=A[1],A=_sliced_to_array$6(reactExports.useState(!1),2),ae=A[0],se=A[1],O=useSelector(controllerUrlSelector),A=useSelector(automateControllerUrlSelector),O=O||A.replace("automate-",""),ie=(r=_async_to_generator$2(function(t,o,n){var r;return _ts_generator$2(this,function(e){switch(e.label){case 0:return r="".concat(t,"/edge/v1/flow/").concat(n,"/always-up/api/status"),[4,getFlowStatus(r,o)];case 1:return(r=e.sent())&&"started"===r.status?se(!0):se(!1),[2]}})}),function(e,t,o){return r.apply(this,arguments)}),M=(reactExports.useEffect(function(){ie(O,_,b)},[b,_,O]),function(){re(!1),f(newFlowClusterIDAction(""))}),A={EMPTY:null,ENGINE_COPIED:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.sGx+Oj",defaultMessage:"Engine ID has been copied",description:"msg delete flow"}),FLOW_DELETED_SUCCESS:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.2Trjxv",defaultMessage:"Flow has been successfully deleted",description:"msg delete flow"}),FLOW_DELETED_FAIL:R?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.himmqH1",defaultMessage:"Flow has not been deleted. Invalid Delete State: {flowState}. Pause the flow and try again.",description:"msg delete flow failed from invalid state",values:{flowState:R}}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.himmqH",defaultMessage:"Flow has not been deleted",description:"msg delete flow failed"})},R={OPEN_FLOW_SETTINGS:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.hirqzH",defaultMessage:"Flow Settings",description:"msg flow settings"}),CANCEL_SELECT_CLUSTER:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.hiqxrt",defaultMessage:"Cancel",description:"msg cancel select cluster"}),OPEN_FLOW:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jbxqqH",defaultMessage:"Open Flow",description:"msg open flow"}),CREATE_FLOW_ADVANCED:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jbxqty",defaultMessage:"Create Flow Advanced",description:"msg create flow Advanced"})},le=function(e){Y(y===e&&"asc"===j?"desc":"asc"),V(e)},ce=function(e,t,o){return t[o]<e[o]?-1:e[o]<t[o]?1:0},ue=function(t){var e=E.find(function(e){return e.id===t});if(e)return(e=e.builds).records.length?null==(e=e.records[0])?void 0:e.id:"latest"},$=E.find(function(e){return e.id===b});return E&&0===E.length?jsxRuntimeExports.jsx(NoResults,{}):jsxRuntimeExports.jsxs(Box,{mt:p?2:0,children:[p&&jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-screenName",className:x.text,style:{flexGrow:1},children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.+YGVPH",defaultMessage:"Screen Name: {screenName}",description:"{screenName}",values:{screenName:P}})}),jsxRuntimeExports.jsx(TableContainer,{id:"flow-center-flows-table","data-test":"flow-center-flows-table",children:jsxRuntimeExports.jsxs(Table,{className:x.table,children:[jsxRuntimeExports.jsx(TableHead,{children:jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.firstTitle," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.n60v17",defaultMessage:"Flow Name",description:"Flow Name"}),jsxRuntimeExports.jsx(TableSortLabel,{active:"name"===y,direction:"name"===y?j:"asc",onClick:function(){return le("name")},IconComponent:default_1$6,classes:{icon:x.sortIcon}})]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.w+rzfS",defaultMessage:"Status",description:"Status"}),t("state")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.Pzb4Cj",defaultMessage:"Last Updated",description:"Last Updated"}),t("modifiedDateTime")]}),jsxRuntimeExports.jsxs(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader),children:[jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.Dj0J2e",defaultMessage:"Date Created",description:"Date Created"}),t("createdDateTime")]}),jsxRuntimeExports.jsx(TableCell,{className:"".concat(x.title," ").concat(x.borderBottomLineHeader)})]})}),jsxRuntimeExports.jsx(TableBody,{children:E&&((e,n)=>((e=e.map(function(e,t){return[e,t]})).sort(function(e,t){var o=n(e[0],t[0]);return 0!==o?o:e[1]-t[1]}),null!=e&&e.length&&B(e[0][0].id),e.map(function(e){return e[0]})))(E,(a=y,"desc"===j?function(e,t){return ce(e,t,a)}:function(e,t){return-ce(e,t,a)})).slice(N*C,N*C+C).map(function(e,t){var o=e.name,n=e.state,r=e.modifiedDateTime,a=e.createdDateTime,s=e.id,e=e.builds;return jsxRuntimeExports.jsxs(TableRow,{id:"flow-center-flow-item","data-test":"flow-center-flow-item",hover:!0,className:"".concat(u===s?x.tableRowClass:""," ").concat(x.tableRow," ").concat(x.borderBottomLineRow),classes:{selected:x.tableRowSelected},selected:u===s||b===s,onClick:function(e){k?c(s,!1):i(s)},children:[jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsxs("div",{className:"".concat(x.boxCell," ").concat(x.firstColumn),children:[jsxRuntimeExports.jsx("p",{className:x.flowName,children:o}),jsxRuntimeExports.jsxs("div",{className:x.boxSubtitle,children:[jsxRuntimeExports.jsx(Tooltip,{title:SHARED_MESSAGES.copyFlowID(),children:jsxRuntimeExports.jsx("img",{src:img$t,alt:"copyID",draggable:"false",onClick:function(e){var t=s;e.stopPropagation(),(e=document.createElement("textarea")).value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),T(!0),F("ENGINE_COPIED"),setTimeout(function(){T(!1),F("EMPTY")},2e3)}})}),(e=e,jsxRuntimeExports.jsxs("p",{className:x.flowVersion,children:[SHARED_MESSAGES.version()," ",lodashExports.get(e,"records[0].version",0)]}))]})]})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsx(StatusPill,{dataTest:"flow-center-flows-table-state",state:n,colorSelector:void 0,backgroundSelector:void 0})}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:a&&l(r)}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:a&&l(a)}),jsxRuntimeExports.jsx(TableCell,{className:x.borderBottomLine,children:jsxRuntimeExports.jsx(IconButton,{className:x.moreActionsBtn,"data-test":"flow-center-action-btn-toggleOpenMenu",onClick:function(e){return t=s,(e=e).stopPropagation(),K(!0),U(e.currentTarget),void Q(t);var t},size:"large",children:jsxRuntimeExports.jsx(default_1$8,{})})})]},"".concat(o," + ").concat(t))})})]})}),jsxRuntimeExports.jsx(TablePagination,{className:x.title,rowsPerPageOptions:[10,25,50,100,200],component:"div",count:E.length,rowsPerPage:C,page:N,onPageChange:D,onRowsPerPageChange:L}),jsxRuntimeExports.jsx(Popper,{disablePortal:!0,style:{zIndex:G},open:q,anchorEl:H,transition:!0,placement:"bottom-end",children:function(e){e=e.TransitionProps;return jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:function(){K(!1),c("",!1),Q(""),W(!1),m(!1)},children:jsxRuntimeExports.jsx(Fade,_object_spread_props(_object_spread$3({},e),{timeout:350,children:jsxRuntimeExports.jsxs(Paper,{className:x.paperContainer,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-viewDetails",onClick:function(){c(b,!1)},startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$F,alt:"openInNewIcon"}),className:x.popperBtns,children:SHARED_MESSAGES.viewDetails()}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-viewRunningInstances",onClick:function(){c(b,!0)},startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$C,alt:"openInNewIcon"}),className:x.popperBtns,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"fc.flowList.runningInstances",defaultMessage:"View Running Instances",description:"View Running Instances"})}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-openFlow",className:x.popperBtns,startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$17,alt:"openInNewIcon"}),onClick:function(e){i()},children:SHARED_MESSAGES.openFlow()}),z&&jsxRuntimeExports.jsxs(Button,{"data-test":"flow-center-flow-list-always-up-flow",onClick:function(){m(!0,b)},startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$9,alt:"alwaysUpFlow"}),className:x.popperBtns,children:[SHARED_MESSAGES.alwaysUpFlow(),jsxRuntimeExports.jsx(Tooltip,{title:"Changes can take up to 5 min to enact.",placement:"bottom",children:jsxRuntimeExports.jsx(default_1$9,{className:ae?g.active:g.inactive})})]}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-createFlowTemplate",className:x.popperBtns,startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$a,alt:"openInNewIcon"}),onClick:function(e){var t;t=b,d&&d(t||b)},children:SHARED_MESSAGES.createFlowTemplate()}),jsxRuntimeExports.jsx("hr",{className:x.popperHr}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-open-deleteFlow",className:x.popperBtns,startIcon:jsxRuntimeExports.jsx("img",{className:x.popperIcon,src:img$V,alt:"deleteIcon"}),onClick:function(){X(!0)},children:SHARED_MESSAGES.deleteFlow()})]})}))})}}),$&&jsxRuntimeExports.jsxs(Dialog,{role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:J,classes:{paper:g.container},onClose:function(){return o(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[jsxRuntimeExports.jsx(DialogTitle,{className:g.title,children:SHARED_MESSAGES.confirmDelete()}),jsxRuntimeExports.jsx(DialogContent,{className:g.content,children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.jFIlbR",defaultMessage:"Are you sure you want to delete {flowName}? This action can not be undone.",description:"Are you sure you want to delete [Engine_Name]? This action can not be undone.”",values:{flowName:(null==$?void 0:$.name)||""}})}),jsxRuntimeExports.jsxs(DialogActions,{className:g.actions,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-cancelDeleteFlow",onClick:function(){return o(!1)},className:g.cancelButton,children:SHARED_MESSAGES.cancel()}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-submitDeleteFlow",onClick:function(){return o(!0)},className:g.confirmationButton,autoFocus:!0,children:SHARED_MESSAGES.delete()})]})]}),$&&ne&&jsxRuntimeExports.jsxs(Dialog,{role:"presentation",disablePortal:!0,disableEscapeKeyDown:!0,open:ne,classes:{paper:g.container},onClose:function(){return M()},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[jsxRuntimeExports.jsx(DialogTitle,{className:g.title,children:R.OPEN_FLOW_SETTINGS}),jsxRuntimeExports.jsxs(DialogContent,{className:g.content,children:[jsxRuntimeExports.jsx("div",{className:"".concat(e.paddingDiv),children:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jFdgxR",defaultMessage:"Select an edge cluster to be used to run your flow",description:"Select an edge cluster to be used to run your flow"})}),jsxRuntimeExports.jsx("div",{className:"".concat(e.paddingDiv),children:jsxRuntimeExports.jsx(Select,{id:"os-flow-center-header-cluster-select.hGcgxR",value:I.newFlowClusterID,onChange:function(e){f(newFlowClusterIDAction(e.target.value))},className:"".concat(e.fullWidth),children:null==S?void 0:S.map(function(e){return jsxRuntimeExports.jsx(MenuItem,{value:null==e?void 0:e.id,children:null==e?void 0:e.name},null==e?void 0:e.id)})})})]}),jsxRuntimeExports.jsxs(DialogActions,{className:g.actions,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-cancelSelectCluster",onClick:function(){return M()},className:g.cancelButton,children:R.CANCEL_SELECT_CLUSTER}),jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-openFlowAdvDialog",onClick:function(){return e=(e=null==$?void 0:$.id)||b,t=h?"latest":ue(e),o="".concat(w,"/flow/").concat(e,"/").concat(t),s&&(o="".concat(w,"/notebook/").concat(e,"/").concat(t)),I.newFlowClusterID?(window.open("".concat(w,"/flow/").concat(e,"/").concat(t,"/").concat(I.newFlowClusterID,"/default-cluster"),"_blank","noopener"),f(newFlowClusterIDAction(""))):window.open(o,"_blank","noopener,noreferrer"),void M();var e,t,o},className:g.confirmationButton,autoFocus:!0,children:R.OPEN_FLOW})]})]}),jsxRuntimeExports.jsx(Snackbar,{anchorOrigin:{vertical:"bottom",horizontal:"left"},open:Z,autoHideDuration:6e3,onClose:n,message:A[ee],action:jsxRuntimeExports.jsx(IconButton,{size:"small","aria-label":"close",color:"inherit","data-test":"flow-center-action-btn-close",onClick:n,children:jsxRuntimeExports.jsx(default_1$a,{fontSize:"small"})})})]})};function _array_like_to_array$5(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$5(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$5(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$5(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$5(e,t){return _array_with_holes$5(e)||_iterable_to_array_limit$5(e,t)||_unsupported_iterable_to_array$5(e,t)||_non_iterable_rest$5()}function _unsupported_iterable_to_array$5(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$5(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$5(e,t):void 0}var useStyles$a=makeStyles()(function(e){return{typography:{marginBottom:"25px!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"24px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important",display:"flex!important"},firstColumn:{paddingLeft:"12px!important"},bold:{fontWeight:600,color:"#2A323C!important",minWidth:"110px!important"},borderRight:{borderWidth:"0px!important",borderRightWidth:"1px!important",borderColor:"#aaa!important",borderStyle:"solid!important"},boxSubtitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontSize:"16px!important",lineHeight:"22px!important",color:"#5C6269!important",fontWeight:400,letterSpacing:"-1.30385e-09px!important"},boxEngineTitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:500,fontSize:"18px!important",lineHeight:"24px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important",marginBottom:"10px!important"},engineTitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:400,fontSize:"16px!important",lineHeight:"22px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important"},boxTitle:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"28px!important",lineHeight:"22px!important",color:"#2A323C!important",letterSpacing:"-1.30385e-09px!important"},button:{textTransform:"none!important",marginTop:"17px!important",marginBottom:"12px!important",border:"1px solid #1871E8!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important",background:e.palette.background.paper,color:"#1871E8!important",padding:"6px 10px!important"},enginesAndFlowWidgetContainer:{display:"flex",width:"100%!important",height:"100%!important"},flowWidgetContainer:{flex:"0 0 720px!important",borderLeft:"0.5px solid #D5DFE9!important",overflowY:"auto!important"},enginesContainer:{width:"100%!important",overflowY:"auto!important"},table:{border:"none!important"},tableRow:{"&:hover":{cursor:"pointer",backgroundColor:"#EEF3F9!important","& td":{backgroundColor:"#EEF3F9!important"}}},boxCell:{marginTop:"20px!important",marginBottom:"20px!important"},borderBottomLine:{padding:"0px!important",paddingLeft:"16px!important"},tableRowClass:{backgroundColor:"#F2F5F9!important"},templateSelected:{background:"#F2F5F9!important",borderRadius:"4px!important",borderTop:"3px solid #F2F5F9!important",borderBottom:"3px solid #F2F5F9!important"},infoValue:{width:"80%",borderBottom:"0.5px solid #D5DFE9!important",paddingBottom:"22px!important",color:"#2A323C!important",fontWeight:"normal!important","& div":{marginLeft:"8px!important"}},infoValueContainer:{display:"flex",alignItems:"center","& img":{marginLeft:"8px!important"}},lastUpdated:{marginTop:"3px!important",fontFamily:"Nunito",fontSize:"12px!important",lineHeight:"18px!important",display:"flex!important",color:"#5C6269!important"},wrapperOverview:{marginTop:"15px!important",marginBottom:"21px!important"},flowWidgetContent:{height:"100%!important",marginTop:e.spacing(6.4),marginLeft:e.spacing(6.4)},title:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:"normal",fontSize:"12px!important",lineHeight:"16px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important"}}}),TemplateList=function(e){function n(){return f.findIndex(function(e){return e.id===u.id})}function r(e){return e.filter(function(e){return!e.tags||!e.tags.includes("Alteryx")})}function a(t){var o=[];return f.map(function(e){e[t]&&e[t].length&&e[t].forEach(function(e){o.includes(e)||""===e||o.push(e)})}),o}var t=e.handleOpenFlowNameDialog,o=e.openFirstTemplate,s=e.onSelectedTemplate,i=e.isDeselectedTemplate,l=useDispatch(),c=useStyles$a().classes,u=useSelector(function(e){return e.flows.templateToOpen}),e=useSelector(function(e){return e.flows.searchedTemplates}),p=useSelector(function(e){return e.flows.isSearching}),d=useSelector(sessionTokenSelector),m=_sliced_to_array$5(reactExports.useState([]),2),f=m[0],x=m[1],m=_sliced_to_array$5(reactExports.useState([]),2),g=m[0],_=m[1],m=_sliced_to_array$5(reactExports.useState({}),2),E=(m[0],m[1]),m=_sliced_to_array$5(reactExports.useState(n()),2),w=m[0],h=m[1],m=useSelector(function(e){return e.flows.filteredTemplates}),S=_sliced_to_array$5(reactExports.useState(0),2),j=S[0],y=S[1],S=_sliced_to_array$5(reactExports.useState(100),2),b=S[0],T=S[1],F=function(e){t(e)},R=(reactExports.useEffect(function(){f.length||fetchTemplateGallery(d,{isPublic:!0,limit:300}).then(function(e){var t=e,o="flowTemplates";t=e.data[o].records,o=r(t),x(o),setFilteredTemplatesAction(o),h(n())}).catch(function(e){devErrorLogger("error fetching flow templates: ".concat(JSON.stringify(e)))})},[f]),reactExports.useEffect(function(){h(n())},[f,n]),reactExports.useEffect(function(){lodashExports.isEmpty(u)&&(o?null!=f&&f.length&&(E(f[0]),h(0),l(setOpenTemplate({id:f[0].id,title:f[0].title}))):(h(-1),l(setOpenTemplate({id:null,title:null}))))},[l,o,f,u]),reactExports.useEffect(function(){!w||i||u||(h(-1),l(setOpenTemplate({id:null,title:null})))},[i,l,w]),useSelector(function(e){return e.flows.selectedFilters})),S=(reactExports.useEffect(function(){var e,t,o,n;f&&0<f.length&&(e=a("tags"),t=a("categories"),n=[],f.map(function(e){e.author&&(e=e.author.trim(),n.includes(e)||""===e||n.push(e))}),o=n,l(setTagsToStore(e)),l(setCategories(t)),l(setTemplatesAuthors(o))),l(setTemplatesAction(f))},[f,l]),reactExports.useEffect(function(){var e={isPublic:!(!R.public||"1"!==R.public[0]),categories:null==R?void 0:R.categories,tags:null==R?void 0:R.tags,developers:null==R?void 0:R.author,limit:300};fetchTemplateGallery(d,e).then(function(e){e=e.data.flowTemplates.records,e=r(e);setFilteredTemplatesAction(e),_(e)}).catch(function(e){devErrorLogger("error fetching flow templates: ".concat(JSON.stringify(e)))})},[l,R]),reactExports.useEffect(function(){l(setFilteredTemplatesAction(g.filter(function(e){return null!=e})))},[j,b,g]),[]),S=p?e:m,v=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TableContainer,{children:jsxRuntimeExports.jsxs(Table,{className:c.table,children:[jsxRuntimeExports.jsx(TableHead,{}),jsxRuntimeExports.jsx(TableBody,{children:S&&S.slice(j*b,j*b+b).map(function(e,t){return o=e,n=t,jsxRuntimeExports.jsx(TableRow,{hover:!0,className:"".concat(n===w?c.tableRowClass:""," ").concat(c.tableRow),selected:n===w,id:"flow-center-templates-list-item","data-test":"flow-center-templates-list-item",children:jsxRuntimeExports.jsx(TableCell,{className:c.borderBottomLine,onClick:function(){E(o),h(n),l(setOpenTemplate({id:o.id,title:o.title})),s(!0)},children:jsxRuntimeExports.jsx(Box,{className:"".concat(c.boxCell," ").concat(c.firstColumn),children:jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateList-title",className:c.engineTitle,children:o.title})})})},"".concat(o.id,"-").concat(n));var o,n})})]})}),jsxRuntimeExports.jsx(TablePagination,{className:c.title,rowsPerPageOptions:[10,25,50,100,200],component:"div",count:m.length,rowsPerPage:b,page:j,onPageChange:function(e,t){y(t)},onRowsPerPageChange:function(e){T(parseInt(e.target.value,10)),y(0)}})]}),p=function(){return jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templates-list-container",container:!0,id:"flow-center-templates-list-container",children:jsxRuntimeExports.jsx(Grid,{"data-test":"flow-center-templates-list-subcontainer",item:!0,xs:12,children:jsxRuntimeExports.jsx(Box,{children:v})})})},S=function(){var e;return jsxRuntimeExports.jsxs("div",{className:c.enginesAndFlowWidgetContainer,children:[jsxRuntimeExports.jsx("div",{className:c.enginesContainer,children:jsxRuntimeExports.jsx(Box,{className:-1===w?c.borderRight:"",children:v})}),jsxRuntimeExports.jsx("div",{"data-test":"flow-center-flows-templateList-selected-container",className:c.flowWidgetContainer,children:jsxRuntimeExports.jsxs(Box,{mt:4,ml:4,className:c.flowWidgetContent,children:[jsxRuntimeExports.jsx(Box,{display:"flex",alignItems:"center",children:jsxRuntimeExports.jsx(Box,{id:"template-widget-title","data-test":"template-widget-title",children:jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-flows-templateList-selectedTitle",className:c.boxTitle,children:null==(e=f[w])?void 0:e.title})})}),jsxRuntimeExports.jsx(Box,{m:1,ml:0,mb:0,children:jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-template-list-createFlowFromTemplate-".concat(null==(e=f[w])?void 0:e.title),color:"primary",onClick:function(){return F?F(f[w].id):""},className:c.button,startIcon:jsxRuntimeExports.jsx("img",{src:img$w,alt:"plus icon"}),children:SHARED_MESSAGES.createFlowFromTemplate()})}),jsxRuntimeExports.jsxs(Box,{my:4,children:[jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-overview",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.overview(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:null==(e=f[w])?void 0:e.subtitle})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-developer",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.developer(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:null==(e=f[w])?void 0:e.author})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-certified",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.certified(),":"]}),jsxRuntimeExports.jsxs("div",{className:"".concat(c.infoValue," ").concat(c.infoValueContainer),children:[jsxRuntimeExports.jsx("div",{children:SHARED_MESSAGES.yes()}),jsxRuntimeExports.jsx("img",{src:img$y,alt:"veritoneCertifiedIcon"})]})]}),f[w]&&f[w].categories&&f[w].categories.length&&""!==f[w].categories[0]&&jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-category",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.category(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:null==(e=f[w])?void 0:e.categories.join(", ")})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-tags",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.tags(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:(null==(e=f[w])||null==(e=e.tags)?void 0:e.join(", "))||SHARED_MESSAGES.noTags()})})]}),jsxRuntimeExports.jsxs(Typography,{"data-test":"flow-center-flows-templateList-infoValue",variant:"subtitle1",className:c.typography,children:[jsxRuntimeExports.jsxs("span",{className:c.bold,children:[SHARED_MESSAGES.active(),":"]}),jsxRuntimeExports.jsx("div",{className:c.infoValue,children:jsxRuntimeExports.jsx("div",{children:SHARED_MESSAGES.yes()})})]})]}),jsxRuntimeExports.jsx("img",{style:{width:"100%"},src:null==(e=f[w])?void 0:e.image,alt:""})]})})]})};return e&&0===e.length?jsxRuntimeExports.jsx(NoResults,{}):(-1===w?p:S)()},useSharedStyles=makeStyles()(function(e){return{actionIcon:{padding:"10px!important",marginRight:"-8px!important","& svg":{fill:"#555F7C!important"}},actionIconClose:{padding:"10px!important",backgroundColor:"#EEF3F9!important",marginRight:"-8px!important","& svg":{fill:"#555F7C!important"}}}});function FiltersControl(e){var t=useSharedStyles().classes;return jsxRuntimeExports.jsx(Tooltip,{title:e.showNavigation?SHARED_MESSAGES.hideFilters():SHARED_MESSAGES.showFilters(),children:jsxRuntimeExports.jsx(IconButton,{"data-test":"flow-center-action-btn-toggleNavigation",onClick:function(){return e.setShowNavigation(!e.showNavigation)},className:"".concat(e.showNavigation?t.actionIconClose:t.actionIcon),size:"large",children:e.showNavigation?jsxRuntimeExports.jsx("img",{width:24,height:24,src:img$u,alt:"filterCloseIcon",draggable:"false"}):jsxRuntimeExports.jsx(default_1,{})})})}var useStyles$9=makeStyles()(function(){return{iconDistance:{marginLeft:"8px!important"}}});function MoreInfControl(e){var t=useStyles$9().classes,o=useSharedStyles().classes;return jsxRuntimeExports.jsx(Tooltip,{title:e.openFlowDetails?SHARED_MESSAGES.hideMoreInformation():SHARED_MESSAGES.showMoreInformation(),children:jsxRuntimeExports.jsx(IconButton,{"data-test":"flow-center-action-btn-openFlowWidget",onClick:function(){return e.setOpenFlowDetails()},className:"".concat(t.iconDistance," ").concat(e.openFlowDetails?o.actionIconClose:o.actionIcon),size:"large",children:jsxRuntimeExports.jsx("img",{width:24,height:24,src:img$Z,alt:"filterCloseIcon",draggable:"false"})})})}var useStyles$8=makeStyles()(function(e){return{grow:{flex:1,maxWidth:"unset!important"},flowsLength:{marginLeft:"6px!important",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"400!important",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"0px!important",color:"#5C6269!important"},toolbar:{position:"sticky!important",top:"0!important",zIndex:"1!important",backgroundColor:"white!important",marginLeft:0,paddingLeft:"12px!important",borderBottom:"0.5px solid #D5DFE9",paddingRight:"24px!important"},searchResultLength:{paddingLeft:"26px!important"},title:{display:"flex",fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"600!important",fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"0px!important",color:"#2A323C!important"},additionalOptBtn:{padding:e.spacing(1)+"px!important"}}});function Toolbar(e){var t=e.header,o=e.setShowNavigation,n=e.showNavigation,r=e.setOpenFlowDetails,a=e.openFlowDetails,e=e.screen,s=useStyles$8().classes,i=useSelector(function(e){return e.flows.flows}),l=useSelector(function(e){return e.flows.notebooks}),c=useSelector(function(e){return e.flows.isSearching}),u=useSelector(function(e){return e.flows.fetchingFlows}),p=useSelector(function(e){return e.flows.isSearchingLoading}),d=useSelector(function(e){return e.flows.filteredTemplates})||[],m=useSelector(function(e){return e.flows.searchedTemplates})||[];return jsxRuntimeExports.jsxs(Toolbar$1,{className:"".concat(s.toolbar," ").concat(c?s.searchResultLength:""),id:"flow-center-toolbar-id",children:[jsxRuntimeExports.jsxs(Typography,{className:s.title,children:[c?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.eHPGww",defaultMessage:"Search Results",description:"flow-center-header-title"}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.vYqggl",defaultMessage:"{defaultMessage}",description:"flow-center-header-title",values:{defaultMessage:null==t?void 0:t.text}}),(()=>{if(c)return jsxRuntimeExports.jsx("div",{children:p?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:40,height:18,sx:{marginLeft:"10px"}}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-searchResultsLength",className:s.flowsLength,children:i.length+m.length+l.length})});switch(null==t?void 0:t.key){case ENGINE_OWNER_TYPES.MINE:return jsxRuntimeExports.jsx("div",{children:u?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:40,height:18,sx:{marginLeft:"10px"}}):jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-flowLength",className:s.flowsLength,children:i.length})});case ENGINE_OWNER_TYPES.TEMPLATES:return jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-filteredTemplatesLength",className:s.flowsLength,children:d.length});case ENGINE_OWNER_TYPES.NOTEBOOKS:return jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-toolbar-flowLength",className:s.flowsLength,children:l.length});default:return jsxRuntimeExports.jsx("div",{})}})()]}),jsxRuntimeExports.jsx("div",{className:s.grow}),(null==t?void 0:t.key)===ENGINE_OWNER_TYPES.TEMPLATES&&jsxRuntimeExports.jsx(FiltersControl,{setShowNavigation:o,showNavigation:n}),(0!==i.length||e===ENGINE_OWNER_TYPES.TEMPLATES)&&jsxRuntimeExports.jsx(MoreInfControl,{setOpenFlowDetails:r,openFlowDetails:a})]})}var useStyles$7=makeStyles()(function(e){return{title:{alignSelf:"center",flexBasis:"200px!important",fontFamily:"Dosis!important",fontStyle:"normal!important",fontWeight:"600!important",fontSize:"18px!important",lineHeight:"23px!important",letterSpacing:"0.25px!important",textTransform:"uppercase!important",color:"#5C6269!important"}}});function HeaderBarTitle(e){var t=useStyles$7().classes;return jsxRuntimeExports.jsx(Typography,{"data-test":"flow-center-headerbar-title",className:t.title,noWrap:!0,id:"flow-center-headerbar-title",children:e.title})}function _array_like_to_array$4(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$4(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$4(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$4(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$4(e,t){return _array_with_holes$4(e)||_iterable_to_array_limit$4(e,t)||_unsupported_iterable_to_array$4(e,t)||_non_iterable_rest$4()}function _unsupported_iterable_to_array$4(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$4(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$4(e,t):void 0}var useStyles$6=makeStyles()(function(e){return{root:{},container:{width:"570px",background:"#fff",borderRadius:"50px"},searchInputContainer:{width:"100%",borderRadius:"50px",display:"flex",alignItems:"center",padding:"7px"},searchInputContainerDefault:{backgroundColor:"#fff",border:"0.5px solid #D5DFE9"},searchInputContainerHover:{border:"0.5px solid #A8B2BC","& input::placeholder":{opacity:"1!important",color:"#2A323C!important"}},searchInputContainerActive:{border:"0.5px solid #0D62D2"},input:{},searchInput:{border:"0",outline:"none",background:"transparent !important",width:"100%",fontSize:"15px","&::placeholder":{opacity:"0.4"},"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #FFF inset"}},searchIconContainer:{padding:"0px 7px",display:"flex",alignItems:"center",justifyContent:"center"},closeIcon:{fill:"#555F7C!important",cursor:"pointer!important",width:e.spacing(2)+"px!important",height:e.spacing(2)+"px!important"},grow:{flexGrow:1},setDisplay:{display:"none"}}});function HeaderBarSearchBar(o){function e(e){var t=""!==e.target.value;n(toggleIsSearching(t)),n(toggleIsSearchingLoading(!0)),n(fetchFlows({name:e.target.value,ownerType:ENGINE_OWNER_TYPES.MINE})),o.enableNotebooks&&n(fetchNotebooks({name:e.target.value,ownerType:ENGINE_OWNER_TYPES.NOTEBOOKS})),n(setSearched(e.target.value))}var t=useStyles$6().classes,n=useDispatch(),r=_sliced_to_array$4(reactExports.useState(!1),2),a=r[0],s=r[1],r=_sliced_to_array$4(reactExports.useState(!1),2),i=r[0],l=r[1],r=useSelector(function(e){return e.flows.searched}),c=useSelector(preferredLanguageSelector)||"en",c=AIWareFormatMessage(c);return o.showSearchBar?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{id:"flow-center-headerbar-searchbar-id",className:t.container,onMouseEnter:function(){return s(!0)},onMouseLeave:function(){s(!1)},children:jsxRuntimeExports.jsxs("div",{className:"".concat(t.searchInputContainer," ").concat(a||i?a&&!i?t.searchInputContainerHover:i?t.searchInputContainerActive:void 0:t.searchInputContainerDefault),children:[jsxRuntimeExports.jsx("div",{className:t.searchIconContainer,children:jsxRuntimeExports.jsx(Search,{fontSize:"small",sx:{color:a||i?"#555F7C":"#555F7C99"}})}),jsxRuntimeExports.jsx("input",{id:"flow-center-headerbar-searchbar","data-test":"flow-center-headerbar-searchbar",value:r,onFocus:function(){return l(!0)},onBlur:function(){return l(!1)},placeholder:c({id:"os-flow-center.searchflowcenter1",defaultMessage:"Search the flow center",description:"Placeholder for search flow center search box."}),className:t.searchInput,onChange:e}),r&&jsxRuntimeExports.jsx(Close$1,{fontSize:"small",sx:{color:a||i?"#555F7C":"#555F7C99"},onClick:function(){n(toggleIsSearching(!1)),n(toggleIsSearchingLoading(!1)),n(setSearched("")),n(setSearchedTemplates(null)),n(fetchFlows({name:"",ownerType:ENGINE_OWNER_TYPES.MINE}))}})]})}),jsxRuntimeExports.jsx("div",{className:t.grow}),jsxRuntimeExports.jsx("div",{})]}):jsxRuntimeExports.jsx("div",{})}var useStyles$5=makeStyles()(function(e){return{buttonFlowCenter:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important","&&":{borderTopRightRadius:0,borderBottomRightRadius:0}},buttonFlowCenterAdvanceDisabled:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"start!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important"},buttonAddNew:{background:"#0D62D2!important",color:e.palette.background.paper},marginRight:{marginRight:"".concat(e.spacing(0),"!important"),padding:"".concat(e.spacing(1.6)," ").concat(e.spacing(2.8)," !important"),marginLeft:"8px!important"},btnWidth:{width:"134px!important",marginTop:"18px!important",display:"flex!important",justifyContent:"center!important"},btnWidthAdvanceDisabled:{width:"171px!important",marginTop:"18px!important",display:"flex!important",justifyContent:"center!important"},backdrop:{zIndex:e.zIndex.drawer+1,color:"#fff"},flowIconAdd:{fill:"#fff"},flowIconAddAdvanced:{fill:"#fff",minWidth:"20px!important",maxHeight:"20px!important"},loadingBarcontainer:{width:"20px!important",height:"20px!important",display:"flex",justifyContent:"center",color:"#00000042"},disabledButton:{background:"#efefef4d!important",color:"#00000042"},fullWidth:{width:"100%"},paddingDiv:{paddingTop:"20px"},buttonDiv:{display:"flex"},iconButton:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"center!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important",background:"#0D62D2!important",color:e.palette.background.paper,minWidth:"14px!important",maxWidth:"34px!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},iconButtonDisabled:{margin:e.spacing(1)+"px!important",textTransform:"none!important",justifyContent:"center!important",borderRadius:e.shape.borderRadius,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"19px!important",letterSpacing:"-1.30385e-09px!important",background:"#efefef4d!important",color:"#00000042",minWidth:"14px!important",maxWidth:"34px!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},iconButtonFullScreen:{marginRight:"24px!important",background:"#0D62D2!important",color:e.palette.background.paper,minWidth:"14px!important",maxWidth:"37px!important",marginTop:"18px!important",justifyContent:"center!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},iconButtonFullScreenDisabled:{marginRight:"24px!important",background:"#efefef4d!important",color:"#00000042",minWidth:"14px!important",maxWidth:"37px!important",marginTop:"18px!important",justifyContent:"center!important","&&":{borderTopLeftRadius:0,borderBottomLeftRadius:0}},flowName:{width:"449px"}}});function HeaderBarButtons(e){var t=useStyles$5().classes,o=useSelector(function(e){return e.flows.isLoadingCreateNewFlow});return jsxRuntimeExports.jsxs("div",{className:t.buttonDiv,children:["notebooks"!==e.screen&&jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-header-onCreateNewFlowButton",id:"flow-center-header-onCreateNewFlowButton",variant:"outlined",disabled:o,startIcon:o?jsxRuntimeExports.jsx(CircularProgress,{className:t.loadingBarcontainer}):jsxRuntimeExports.jsx(default_1$7,{className:t.flowIconAdd}),className:"".concat(t.buttonFlowCenterAdvanceDisabled," ").concat(t.buttonAddNew,"\n ").concat(o?t.disabledButton:"","\n ").concat(e.showAdditionalOptionButton?t.marginRight:""," ").concat(e.automateFullScreen?t.btnWidthAdvanceDisabled:""),onClick:function(){return e.handleOpenFlowNameDialog("",!1)},children:SHARED_MESSAGES.newFlow()}),e.enableNotebooks&&"notebooks"===e.screen&&jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-header-onCreateNewFlowButton",id:"flow-center-header-onCreateNewFlowButton",variant:"outlined",disabled:o,startIcon:o?jsxRuntimeExports.jsx(CircularProgress,{className:t.loadingBarcontainer}):jsxRuntimeExports.jsx(default_1$7,{className:t.flowIconAdd}),className:"".concat(t.buttonFlowCenterAdvanceDisabled," ").concat(t.buttonAddNew,"\n ").concat(o?t.disabledButton:"","\n ").concat(e.showAdditionalOptionButton?t.marginRight:""," ").concat(e.automateFullScreen?t.btnWidthAdvanceDisabled:""),onClick:function(){return e.handleOpenFlowNameDialog("",!0)},children:SHARED_MESSAGES.newNotebook()})]})}var useStyles$4=makeStyles()(function(e){return{additionalOptionsContainer:{borderLeft:"0.5px solid #D9E2EB!important",paddingLeft:e.spacing(1.6)+"px!important"},additionalOptBtn:{padding:e.spacing(1.6)+"px!important"}}});function HeaderBarControlButtons(e){var t=useStyles$4().classes;return e.showAdditionalOptionButton?jsxRuntimeExports.jsxs("div",{className:t.additionalOptionsContainer,children:[e.showFullScreenButton&&jsxRuntimeExports.jsx(Tooltip,{title:e.fullScreen?SHARED_MESSAGES.exitFullScreen():SHARED_MESSAGES.enterFullScreen(),children:jsxRuntimeExports.jsx(IconButton,{className:t.additionalOptBtn,"data-test":"flow-center-action-btn-toggleFullScreen",onClick:function(){e.setFullScreen(!e.fullScreen)},size:"large",children:jsxRuntimeExports.jsx("img",{src:e.fullScreen?img$v:img$x,alt:"fullscreen-icon",draggable:"false"})})}),e.showCollapseButton&&jsxRuntimeExports.jsx(Tooltip,{title:SHARED_MESSAGES.closePanel(),children:jsxRuntimeExports.jsx(IconButton,{"data-test":"flow-center-action-btn-closePanel",className:t.additionalOptBtn,onClick:function(){e.hidePanel&&e.hidePanel()},size:"large",children:jsxRuntimeExports.jsx("img",{src:img$1b,alt:"collapseicon",draggable:"false"})})})]}):jsxRuntimeExports.jsx("div",{})}function _array_like_to_array$3(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$3(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$3(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$3(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$3(e,t){return _array_with_holes$3(e)||_iterable_to_array_limit$3(e,t)||_unsupported_iterable_to_array$3(e,t)||_non_iterable_rest$3()}function _unsupported_iterable_to_array$3(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$3(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$3(e,t):void 0}var useStyles$3=makeStyles()(function(e){return{root:{backgroundColor:"#FAFAFA",paddingRight:14,display:"flex!important",alignItems:"center!important",paddingLeft:24},headerbarContainer:{position:"fixed!important",width:"inherit!important",zIndex:"99!important","& header":{boxShadow:"none!important"}},headerbarContainerBorder:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)!important"},fullScreenState:{zIndex:"1!important","& header":{boxShadow:"none!important"}},header:{padding:"0px!important"}}});function Headerbar(e){var t=e.options,o=e.handleOpenFlowNameDialog,n=e.collapseFlowCenter,r=e.setFullScreen,a=e.setScreen,s=e.fullScreen,i=e.hidePanel,l=e.zIndex,c=e.automateFullScreen,u=e.enableNotebooks,e=e.screen,p=useStyles$3().classes,d=_sliced_to_array$3(reactExports.useState(!1),2),m=d[0],d=d[1];return jsxRuntimeExports.jsx("div",{className:"".concat(p.headerbarContainer," ").concat(c?m?null:p.fullScreenState:p.headerbarContainerBorder),id:"flow-center-headerbar-container","data-test":"flow-center-headerbar-container",children:c?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(HeaderBarSearchBar,{showSearchBar:t.showSearchBar,isFullScreen:s,setScreen:a,automateFullScreen:c,enableNotebooks:u}),jsxRuntimeExports.jsx(HeaderBarButtons,{showAdditionalOptionButton:t.showAdditionalOptionButton,showCreateNewFlow:t.showCreateNewFlow,showNewFromTemplate:t.showNewFromTemplate,isFullScreen:s,handleOpenFlowNameDialog:o,zIndex:l,automateFullScreen:c,openClusterDialog:m,setOpenClusterDialog:d,enableNotebooks:u,screen:e})]}):jsxRuntimeExports.jsx(AppBar,{position:"static",color:"transparent",className:p.header,children:jsxRuntimeExports.jsxs(Toolbar$1,{className:p.root,children:[jsxRuntimeExports.jsx(HeaderBarTitle,{title:t.title}),jsxRuntimeExports.jsx(HeaderBarSearchBar,{showSearchBar:t.showSearchBar,setScreen:a,automateFullScreen:c,enableNotebooks:u}),jsxRuntimeExports.jsx(HeaderBarButtons,{showAdditionalOptionButton:t.showAdditionalOptionButton,showCreateNewFlow:t.showCreateNewFlow,showNewFromTemplate:t.showNewFromTemplate,handleOpenFlowNameDialog:o,zIndex:l,automateFullScreen:c,openClusterDialog:m,setOpenClusterDialog:d,enableNotebooks:u,screen:e}),jsxRuntimeExports.jsx(HeaderBarControlButtons,{showAdditionalOptionButton:t.showAdditionalOptionButton,showFullScreenButton:t.showFullScreenButton,showCollapseButton:t.showCollapseButton,collapseFlowCenter:n,setFullScreen:r,fullScreen:s,hidePanel:i})]})})})}var DEFAULT_FILTERS_FOR_TAB_TEMPLATES=[ENGINE_FILTER_TYPES.TAGS,ENGINE_FILTER_TYPES.CATEGORIES,"author",ENGINE_FILTER_TYPES.PUBLIC],DEFAULT_FILTERS_FOR_TAB_MY_FLOWS=[],DEFAULT_TABS=[ENGINE_OWNER_TYPES.MINE,ENGINE_OWNER_TYPES.TEMPLATES],BETA_TABS=[ENGINE_OWNER_TYPES.NOTEBOOKS],DEFAULT_FILTERS=[ENGINE_FILTER_TYPES.TAGS],ALL_TABS=[{key:ENGINE_OWNER_TYPES.ORGANIZATION,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.organizationcategory",defaultMessage:"My Organization",description:"My Organization Category"}),icon:default_1$4},{key:ENGINE_OWNER_TYPES.MINE,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.orgflows",defaultMessage:"Org Flows",description:"Org Flows Category"}),icon:default_1$2},{key:ENGINE_OWNER_TYPES.SHARED,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.sharedwmecategory",defaultMessage:"Shared w/ me",description:"Shared with me Category"}),icon:default_1$3},{key:ENGINE_OWNER_TYPES.TEMPLATES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.templatescategory",defaultMessage:"Templates",description:"Templates Category"}),icon:default_1$1},{key:ENGINE_OWNER_TYPES.NOTEBOOKS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.notebookscategory",defaultMessage:"Notebooks",description:"Noteboks Category"}),icon:default_1$2}],ALL_FILTERS=[{group:ENGINE_FILTER_TYPES.CERTIFIED,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.certified",defaultMessage:"Certified",description:"Flow Center Certified Filter"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.veritonecertified.filter",defaultMessage:"Veritone Certified",description:"Veritone Certified Filter"}),value:"veritone_certified"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.verified",defaultMessage:"Verified Publisher",description:"Verified Publisher filter"}),value:"verified_publisher"}]},{group:ENGINE_FILTER_TYPES.CATEGORIES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.categories",defaultMessage:"Categories",description:"Flow Center filter Categories"}),options:[]},{group:ENGINE_FILTER_TYPES.INDUSTRIES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.industries",defaultMessage:"Industries",description:"Flow Center filter Industries"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.hitech",defaultMessage:"Hi Tech",description:"Flow Center filter option value Hi Tech"}),value:"Hi Tech"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.medicine",defaultMessage:"Medicine",description:"Flow Center filter option value Medicine"}),value:"Medicine"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.law",defaultMessage:"Law",description:"Flow Center filter option value Law"}),value:"Law"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.government",defaultMessage:"Government",description:"Flow Center filter option value Government"}),value:"Government"}]},{group:ENGINE_FILTER_TYPES.APPLICATIONS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.applications",defaultMessage:"Applications",description:"Flow Center filter Applications"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.testapp",defaultMessage:"Test",description:"Flow Center filter option value Test"}),value:"Test"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.speach",defaultMessage:"Speach",description:"Flow Center filter option value Speach"}),value:"Speach"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.videoprocessing",defaultMessage:"Video processing",description:"Flow Center filter option value Video Processing"}),value:"Video processing"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.smssender",defaultMessage:"Sms sender",description:"Flow Center filter option value Sms sender"}),value:"Sms sender"}]},{group:ENGINE_FILTER_TYPES.CLASSES,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.classes",defaultMessage:"Classes",description:"Flow Center filter Classes"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.networkisolated",defaultMessage:"Network isolated",description:"Flow Center filter option value Network Isolated"}),value:"Network isolated"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.publicaccess",defaultMessage:"Public Access",description:"Flow Center filter option value Public Access"}),value:"Public Access"}]},{group:ENGINE_FILTER_TYPES.NOTEWORTHY,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.noteworthy",defaultMessage:"Noteworthy",description:"Flow Center filter Noteworthy"}),options:[]},{group:ENGINE_FILTER_TYPES.TAGS,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.tags",defaultMessage:"Tags",description:"Flow Center filter Tags"}),options:[]},{group:"author",text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.developer",defaultMessage:"Developer",description:"Flow Center filter Developer"}),options:[]},{group:ENGINE_FILTER_TYPES.PRICE,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.price",defaultMessage:"Price",description:"Flow Center filter Price"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.under25",defaultMessage:"Under $25",description:"Flow Center filter option value Under $25"}),value:"Under $25"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.25to50",defaultMessage:"$25 to $50",description:"Flow Center filter option value $25 to $50"}),value:"$25 to $50"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.50to100",defaultMessage:"$50 to $100",description:"Flow Center filter option value $50 to $100"}),value:"$50 to $100"},{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.100to200",defaultMessage:"$100 to $200",description:"Flow Center filter option value $100 to $200"}),value:"$100 to $200"}]},{group:ENGINE_FILTER_TYPES.PUBLIC,text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.tags",defaultMessage:"Type",description:"Flow Center filter Is Public"}),options:[{text:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center.is_public",defaultMessage:"Is Public",description:"Flow Center filter is public option value"}),value:"1"}]}],DEFAULT_GRAPHQL_ENDPOINT="v3/graphql",DEFAULT_CLUSTER="prd5-21xbyq0x-4h0s-o685-snas-oovhdai552v9",useStyles$2=makeStyles()(function(e){return{container:{minHeight:"calc(100vh - 64px - 64px - 54px)"},contentContainer:{justifyContent:"center",alignItems:"center",display:"flex",flexDirection:"column"},textContainer:{marginTop:26,display:"flex",flexDirection:"column",alignItems:"center"},title:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:"normal!important",fontSize:"18px!important",lineHeight:"24px!important",letterSpacing:"-1.30385e-09px!important",color:"#1B1D1F!important"},subtitle:{marginTop:12,fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"16px!important",lineHeight:"22px!important",letterSpacing:"-1.30385e-09px!important",color:"#5C6269!important",textAlign:"center"},buttonContainer:{marginTop:30,display:"flex",width:"100%",justifyContent:"space-evenly"},icon:{width:235,height:235},commonBtn:{fontFamily:"Nunito",fontStyle:"normal!important",fontWeight:600,fontSize:"14px!important",lineHeight:"20px!important",letterSpacing:"-1.30385e-09px!important",textTransform:"none",boxSizing:"border-box",borderRadius:"4px",paddingLeft:10,paddingRight:10,"&:hover":{background:"none",backgroundColor:"none"},background:"#FFFFFF",border:"1px solid #1871E8",color:"#1871E8!important"}}});function NoFlowsFound(e){var t=useStyles$2().classes;return jsxRuntimeExports.jsx(Grid,{container:!0,spacing:0,direction:"column",alignItems:"center",justifyContent:"center",className:t.container,children:jsxRuntimeExports.jsxs(Grid,{item:!0,xs:4,className:t.contentContainer,children:[jsxRuntimeExports.jsx("img",{className:t.icon,src:img$o,alt:"noFlowsFoundIcon"}),jsxRuntimeExports.jsxs("div",{className:t.textContainer,children:[jsxRuntimeExports.jsx(Typography,{className:t.title,children:SHARED_MESSAGES.noFlowsFound()}),jsxRuntimeExports.jsx(Typography,{className:t.subtitle,children:SHARED_MESSAGES.noFlowsFoundSubtitle()}),jsxRuntimeExports.jsxs(Box,{className:t.buttonContainer,children:[jsxRuntimeExports.jsx(Button,{className:t.commonBtn,onClick:function(){return e.handleOpenFlowNameDialog("")},children:SHARED_MESSAGES.createNewFlow()}),jsxRuntimeExports.jsx(Button,{className:t.commonBtn,onClick:function(){e.setScreen(ENGINE_OWNER_TYPES.TEMPLATES)},children:SHARED_MESSAGES.chooseATemplate()})]})]})]})})}var useStyles$1=makeStyles()(function(){return{tabsContainer:{paddingLeft:"18px",borderBottom:"0.5px solid #D5DFE9","& div > span:last-child":{backgroundColor:"black"}},tab:{fontFamily:"Nunito!important",fontWeight:400,fontStyle:"normal !important",fontSize:14,lineHeight:"18px",color:"#2A323C",textTransform:"none"}}});function TabsContainer(e){var t=useStyles$1().classes,o=e.selectedTab,n=e.handleChange,r=useSelector(function(e){return e.flows.flows}),a=useSelector(function(e){return e.flows.notebooks}),s=useSelector(function(e){return e.flows.filteredTemplates})||[],i=useSelector(function(e){return e.flows.searchedTemplates})||[],l=useSelector(function(e){return e.flows.isSearching});return jsxRuntimeExports.jsx(AppBar,{className:t.tabsContainer,position:"static",color:"transparent",elevation:0,children:jsxRuntimeExports.jsxs(Tabs,{value:o,onChange:n,"aria-label":"search-results-tabs",children:[jsxRuntimeExports.jsx(Tab,{id:"flow-center-searchResults-flows","data-test":"flow-center-searchResults-flows",className:t.tab,label:SHARED_MESSAGES.flowsCount(r.length)}),jsxRuntimeExports.jsx(Tab,{id:"flow-center-searchResults-templates","data-test":"flow-center-searchResults-templates",className:t.tab,label:SHARED_MESSAGES.templatesCount((l?i:s).length)}),e.notebookEnabled&&jsxRuntimeExports.jsx(Tab,{id:"flow-center-searchResults-notebooks","data-test":"flow-center-searchResults-notebooks",className:t.tab,label:SHARED_MESSAGES.notebookCount(a.length)})]})})}var getContentHeight=function(){var e=useSelector(function(e){return e.flows.config.isFullScreen});return useSelector(function(e){return e.flows.config.automateFullScreen})?"calc(100vh - 64px - 54px)":"calc(100vh - 64px - 64px - ".concat(e?"0px":"62px",")")},getFlowCenterConfig=function(){return{isFullScreen:useSelector(function(e){return e.flows.config.isFullScreen}),automateFullScreen:useSelector(function(e){return e.flows.config.automateFullScreen}),zIndex:useSelector(function(e){return e.flows.config.zIndex}),graphQLEndpoint:useSelector(function(e){return e.flows.config.graphQLEndpoint}),defaultCluster:useSelector(function(e){return e.flows.config.defaultCluster})}};function ResultsContainer(o){function e(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return(""==n?function(){return jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:o.createFlowTemplate,simpleMode:o.simpleMode,selectedFlowId:n,onSelectFlow:o.onSelectFlow,setFirstFlowId:o.setFirstFlowId,screenName:o.screenName,zIndex:l.zIndex,showTitle:!1,setOpenFlowDetails:o.setOpenFlowDetails,setOpenAlwaysUpFlow:o.setOpenAlwaysUpFlow,notebooks:0<arguments.length&&void 0!==arguments[0]&&arguments[0],betaFeatures:o.betaFeatures})}:function(){return jsxRuntimeExports.jsxs("div",{className:r.enginesAndFlowWidgetContainer,children:[jsxRuntimeExports.jsx("div",{className:r.enginesContainer,children:jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:o.createFlowTemplate,simpleMode:""!==n,selectedFlowId:n,setFirstFlowId:function(e){a&&o.setSelectedFlowId(e)},onSelectFlow:function(e){o.scrollContainerToTop(),o.setSelectedFlowId(e),o.setAllowSetFirstFlowId(!1)},screenName:o.screenName,zIndex:l.zIndex,setOpenAlwaysUpFlow:function(e,t){o.scrollContainerToTop(),o.setOpenFlowRunningInstances(!1),o.setOpenFlowDetails(!1),t&&o.setSelectedFlowId(t),o.setOpenAlwaysUpFlow(e)},setOpenFlowDetails:function(e){o.setOpenFlowDetails(e)},notebooks:0<arguments.length&&void 0!==arguments[0]&&arguments[0],betaFeatures:o.betaFeatures})}),jsxRuntimeExports.jsx("div",{className:r.flowWidgetContainer,children:jsxRuntimeExports.jsx("div",{className:r.flowWidgetContainer,children:jsxRuntimeExports.jsx(App$1,{engineId:n,openFlowRunningInstances:o.openFlowRunningInstances,openAlwaysUpFlow:o.openAlwaysUpFlow,locale:i,openTab:o.openTabFlowWidget,config:{apiRoot:u,graphQLEndpoint:c,controllerUrl:d,defaultCluster:l.defaultCluster,controllerNodeRedImage:p,controllerFlowPath:s},tabs:[IFlowWidgetTabs.Overview,IFlowWidgetTabs.Versions,IFlowWidgetTabs.Activity,IFlowWidgetTabs.DistributionSettings],activityTabs:[IFlowWidgetActivityTabs.Jobs,IFlowWidgetActivityTabs.ScheduledJobs],onExitClicked:function(){o.setSelectedFlowId(""),o.setOpenFlowRunningInstances(!1),o.setOpenAlwaysUpFlow(!1),o.setOpenFlowDetails(!1)},onDeleteFlow:function(){setTimeout(function(){o.setUpdateFlowList(n),o.setSelectedFlowId(""),o.setUpdateFlowList("")},2e3)}})})})]})})(e)}var t=o.selectedTab,n=o.selectedFlowId,r=o.classes,a=o.allowSetFirstFlowId,s=o.controllerFlowPath,i=useSelector(preferredLanguageSelector)||"en",l=getFlowCenterConfig(),c=useSelector(graphEndpointSelector),u=useSelector(rootApiSelector),p=useSelector(controllerNodeRedImageSelector),d=useSelector(controllerUrlSelector);return jsxRuntimeExports.jsx(Box,{ml:3,children:0===t?e():1===t?jsxRuntimeExports.jsx(TemplateList,{handleOpenFlowNameDialog:o.handleOpenFlowNameDialog,openFirstTemplate:o.openFirstTemplate,isDeselectedTemplate:o.isDeselectedTemplate,onSelectedTemplate:o.onSelectedTemplate}):e(!0)})}function _array_like_to_array$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$2(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$2(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$2(e,t){return _array_with_holes$2(e)||_iterable_to_array_limit$2(e,t)||_unsupported_iterable_to_array$2(e,t)||_non_iterable_rest$2()}function _unsupported_iterable_to_array$2(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$2(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$2(e,t):void 0}var useStyles=makeStyles()(function(e){return{container:{width:"100%",overflowY:"auto"},tabsContainer:{paddingLeft:18,borderBottom:"0.5px solid #D5DFE9","& div > span:last-child":{backgroundColor:"black"}}}});function SearchResultsPage(e){var t=useStyles().classes,o=useDispatch(),n=useSelector(function(e){return e.flows.searched}),r=useSelector(function(e){return e.flows.isSearchingLoading}),a=useSelector(function(e){return e.flows.searchedTemplates||[]}),s=useSelector(function(e){return e.flows.filteredTemplates})||[],i=useSelector(function(e){return e.flows.flows}),l=_sliced_to_array$2(reactExports.useState(0),2),c=l[0],u=l[1],l=(reactExports.useEffect(function(){var t,e;return s&&0!==s.length&&(t=new RegExp(n,"gi"),e=s.filter(function(e){return t.lastIndex=0,t.test(e.title)}),o(setSearchedTemplates(e))),function(){o(setSearchedTemplates(null))}},[s,n]),function(e,t){u(t)}),p=getContentHeight();return r?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem}),jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem}),jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",className:e.classes.lineItem})]}):!!a.length||!!i.length?jsxRuntimeExports.jsxs("div",{className:t.container,style:{height:p},children:[jsxRuntimeExports.jsx(TabsContainer,{selectedTab:c,handleChange:l,notebookEnabled:e.betaFeatures}),jsxRuntimeExports.jsx(ResultsContainer,{createFlowTemplate:e.createFlowTemplate,selectedTab:c,openFlowRunningInstances:e.openFlowRunningInstances,simpleMode:e.simpleMode,selectedFlowId:e.selectedFlowId,onSelectFlow:e.onSelectFlow,setFirstFlowId:e.setFirstFlowId,screenName:e.screenName,handleOpenFlowNameDialog:e.handleOpenFlowNameDialog,openFirstTemplate:e.openFirstTemplate,isDeselectedTemplate:e.isDeselectedTemplate,onSelectedTemplate:e.onSelectedTemplate,classes:e.classes,allowSetFirstFlowId:e.allowSetFirstFlowId,setSelectedFlowId:e.setSelectedFlowId,setOpenFlowRunningInstances:e.setOpenFlowRunningInstances,setOpenFlowDetails:e.setOpenFlowDetails,scrollContainerToTop:e.scrollContainerToTop,setAllowSetFirstFlowId:e.setAllowSetFirstFlowId,openTabFlowWidget:e.openTabFlowWidget,setUpdateFlowList:e.setUpdateFlowList,controllerFlowPath:e.controllerFlowPath,openAlwaysUpFlow:e.openAlwaysUpFlow,setOpenAlwaysUpFlow:e.setOpenAlwaysUpFlow,betaFeatures:e.betaFeatures})]}):jsxRuntimeExports.jsx(NoResults,{})}var createUniqueEngineMutation$1="mutation($name: String!, $templateId: ID!) {\n createFlow(input: { name: $name, templateId: $templateId} ) {\n id\n builds{\n records {\n id\n engineId\n name\n createdDateTime\n manifest\n runtime\n }\n }\n }\n}\n",createNotebookMutation="mutation($name: String!, $templateId: ID!) {\n createNotebook(input: { name: $name, templateId: $templateId} ) {\n id\n builds{\n records {\n id\n engineId\n name\n createdDateTime\n manifest\n runtime\n }\n }\n }\n}\n",createAutomateFlowMutation$1="mutation($name: String!, $templateId: ID!) {\n createAutomateFlow(input: { name: $name, templateId: $templateId} ) {\n engineId\n build {\n id\n engineId\n name\n createdDateTime\n manifest\n runtime\n }\n }\n}\n",getFlow$1="query getFlow($flowId: ID!) {\n engine(id: $flowId) {\n name\n state\n modifiedDateTime\n createdDateTime\n id\n manifest\n ownerOrganization{\n id\n name\n }\n builds {\n records {\n id\n version\n }\n }\n }\n} ",copyFlowMutation$1="\nmutation copyFlow($flowRevisionId: ID, $flowId: ID, $name: String){\n copyFlow(input: { \n flowId: $flowId,\n flowRevisionId:$flowRevisionId,\n name: $name,\n }) {\n id\n }\n}";function asyncGeneratorStep$1(e,t,o,n,r,a,s){try{var i=e[a](s),l=i.value}catch(e){return void o(e)}i.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator$1(i){return function(){var e=this,s=arguments;return new Promise(function(t,o){var n=i.apply(e,s);function r(e){asyncGeneratorStep$1(n,t,o,r,a,"next",e)}function a(e){asyncGeneratorStep$1(n,t,o,r,a,"throw",e)}r(void 0)})}}function _define_property$2(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _object_spread$2(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):n).forEach(function(e){_define_property$2(t,e,o[e])})}return t}function _ts_generator$1(n,r){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(o){return function(e){var t=[o,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var fetchVeritoneGraphQLApiCustomErrorHandling=(()=>{var a=_async_to_generator$1(function(t,o,n,r,a){return _ts_generator$1(this,function(e){return[2,fetch(t,{method:"POST",headers:_object_spread$2({"Content-Type":"application/json"},o&&{Authorization:"Bearer ".concat(o)}),credentials:"include",body:JSON.stringify({query:n,variables:r,operationName:a})}).then(function(e){return e.json()}).then(function(e){var t;return e.errors&&(t="GraphQL Errors:\n".concat(e.errors.map(function(e){return"".concat(e.name,": ").concat(e.message,"\n")})),console.error("GraphQL Errors",e.errors),console.error("Error Message",t)),e}).catch(function(e){console.error("Error",e)})]})});return function(e,t,o,n,r){return a.apply(this,arguments)}})(),createUniqueEngineMutation=function(e,t,o,n){return fetchVeritoneGraphQLApiCustomErrorHandling(n,o,createUniqueEngineMutation$1,{name:e,templateId:t})},createNotebook=function(e,t,o,n){return fetchVeritoneGraphQLApiCustomErrorHandling(n,o,createNotebookMutation,{name:e,templateId:t})},createAutomateFlowMutation=function(e,t,o,n){return fetchVeritoneGraphQLApiCustomErrorHandling(n,o,createAutomateFlowMutation$1,{name:e,templateId:t})},getFlow=(()=>{var n=_async_to_generator$1(function(t,o,n){return _ts_generator$1(this,function(e){switch(e.label){case 0:return[4,fetchVeritoneGraphQLApi(n,o,getFlow$1,{flowId:t})];case 1:return[2,e.sent()]}})});return function(e,t,o){return n.apply(this,arguments)}})(),copyFlowMutation=function(e,t,o,n,r){return fetchVeritoneGraphQLApiCustomErrorHandling(r,n,copyFlowMutation$1,{flowId:o,flowRevisionId:t,name:e})};function _array_like_to_array$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes$1(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,o,n,r,a,s){try{var i=e[a](s),l=i.value}catch(e){return void o(e)}i.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator(i){return function(){var e=this,s=arguments;return new Promise(function(t,o){var n=i.apply(e,s);function r(e){asyncGeneratorStep(n,t,o,r,a,"next",e)}function a(e){asyncGeneratorStep(n,t,o,r,a,"throw",e)}r(void 0)})}}function _iterable_to_array_limit$1(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$1(e,t){return _array_with_holes$1(e)||_iterable_to_array_limit$1(e,t)||_unsupported_iterable_to_array$1(e,t)||_non_iterable_rest$1()}function _unsupported_iterable_to_array$1(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array$1(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array$1(e,t):void 0}function _ts_generator(n,r){var a,s,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(o){return function(e){var t=[o,e];if(a)throw new TypeError("Generator is already executing.");for(;l;)try{if(a=1,s&&(i=2&t[0]?s.return:t[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,t[1])).done)return i;switch(s=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))l.label=t[1];else if(6===t[0]&&l.label<i[1])l.label=i[1],i=t;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{a=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var DialogFormattedMessages={CREATE_FLOW:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-create-flow.jbxxqH",defaultMessage:"Create Flow",description:"msg create flow"}),CREATE_FLOW_UNIQUE_NAME:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.jbttty",defaultMessage:"Name Your Flow",description:"msg create flow with unique name"}),CREATE_NOTEBOOK_UNIQUE_NAME:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.uniqueNotebookName",defaultMessage:"Name Your Notebook",description:"msg create flow with unique name"}),CANCEL_FLOW_UNIQUE_NAME:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header.hittrt",defaultMessage:"Cancel",description:"msg cancel naming flow"}),COPY_FLOW:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-copy-flow.jbxxqH",defaultMessage:"Copy Flow",description:"msg copy flow"}),CREATE_NOTEBOOK:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-create-flow.createNotebookButton",defaultMessage:"Create Notebook",description:"msg create Notebook"})};function FlowNameDialog(t){function l(){u(""),d(""),f(""),s(flowCenterDialogAction({open:!1,component:"",props:{}}))}var n,o,r,a,s=useDispatch(),e=useCommonStyles().classes,i=_sliced_to_array$1(reactExports.useState(""),2),c=i[0],u=i[1],i=_sliced_to_array$1(reactExports.useState(""),2),p=i[0],d=i[1],i=_sliced_to_array$1(reactExports.useState(t.templateId||""),2),m=i[0],f=i[1],i=useSelector(controllerUrlSelector),x=useSelector(automateControllerUrlSelector),g=(i||x.replace("automate-",""),useSelector(automateUrlSelector)),_=useSelector(sessionTokenSelector),E=useSelector(graphEndpointSelector),w=useSelector(function(e){return e.flows.isRevisionsExistOnServer}),i=makeStyles()(function(e){return{paddingDiv:{paddingTop:"20px"},flowName:{width:"449px"}}})().classes,h=(n=_async_to_generator(function(t,o,n){var r;return _ts_generator(this,function(e){switch(e.label){case 0:return[4,getFlow(t,o,n)];case 1:if((r=e.sent()).errors&&0<r.errors.length)throw new Error("Error while getting new engine");return s(addNewFlow(r.data.engine)),[2]}})}),function(e,t,o){return n.apply(this,arguments)}),S=(o=_async_to_generator(function(t){var o,n,r,a,s,i;return _ts_generator(this,function(e){switch(e.label){case 0:return(o='Field "templateId" is not defined by type "CreateFlow".',n=c.trim(),r=m||"",t)?[4,createNotebook(n,r,_,E)]:[3,2];case 1:if((i=e.sent())&&i.errors&&0<i.errors.length)throw d(i.errors[0].message),new Error("Error while creating new flow");return l(),a=i&&i.data.createNotebook.id,s=i&&i.data.createNotebook.builds.records[0].id,[3,6];case 2:return[4,createUniqueEngineMutation(n,r,_,E)];case 3:return(i=e.sent()).errors&&0<i.errors.length&&i.errors[0].message===o?[4,createAutomateFlowMutation(n,r,_,E)]:[3,5];case 4:i=e.sent(),e.label=5;case 5:if(i&&i.errors&&0<i.errors.length)throw d(i.errors[0].message),new Error("Error while creating new flow");l(),a=i&&i.data.createFlow.id,s=i&&i.data.createFlow.builds.records[0].id,e.label=6;case 6:return[2,{engineId:a,engineBuildId:s}]}})}),function(e){return o.apply(this,arguments)}),j=(r=_async_to_generator(function(t){var o,n,r,a=arguments;return _ts_generator(this,function(e){switch(e.label){case 0:o=1<a.length&&void 0!==a[1]&&a[1],s(toggleStateCreateNewFlow(!0)),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,S(t)];case 2:return n=e.sent(),r=n.engineId,n=n.engineBuildId,h(r,_,E).catch(function(e){devErrorLogger("Error while adding flow: ".concat(JSON.stringify(e)))}),n=w?"latest":n,s(toggleStateCreateNewFlow(!1)),console.log("REDIRECT: ",o),o?s(setShouldCreateInitialFlows(!1)):(t&&window.open("".concat(g,"/notebook/").concat(r,"/").concat(n),"_blank","noopener"),window.open("".concat(g,"/flow/").concat(r,"/").concat(n),"_blank","noopener")),[3,5];case 3:return r=e.sent(),devErrorLogger(r),[3,5];case 4:return s(toggleStateCreateNewFlow(!1)),[7];case 5:return[2]}})}),function(e){return r.apply(this,arguments)}),y=(a=_async_to_generator(function(t){var o,n,r,a=arguments;return _ts_generator(this,function(e){switch(e.label){case 0:o=1<a.length&&void 0!==a[1]&&a[1],s(toggleStateCreateNewFlow(!0)),e.label=1;case 1:return e.trys.push([1,3,4,5]),n=c.trim(),[4,copyFlowMutation(n,t.flowRevisionId||"",t.flowId||"",_,E)];case 2:if((n=e.sent()).errors&&0<n.errors.length)throw d(n.errors[0].message),new Error("Error while copying flow");return l(),r=n&&n.data.copyFlow.id,h(r,_,E).catch(function(e){devErrorLogger("Error while adding flow: ".concat(JSON.stringify(e)))}),s(toggleStateCreateNewFlow(!1)),o?s(setShouldCreateInitialFlows(!1)):window.open("".concat(g,"/flow/").concat(r,"/latest"),"_blank","noopener"),[3,5];case 3:return r=e.sent(),devErrorLogger(r),[3,5];case 4:return s(toggleStateCreateNewFlow(!1)),[7];case 5:return[2]}})}),function(e){return a.apply(this,arguments)});return jsxRuntimeExports.jsxs("div",{className:e.container,children:[jsxRuntimeExports.jsx(DialogTitle,{className:e.title,children:t.isNotebook?DialogFormattedMessages.CREATE_NOTEBOOK_UNIQUE_NAME:DialogFormattedMessages.CREATE_FLOW_UNIQUE_NAME}),jsxRuntimeExports.jsxs(DialogContent,{className:e.content,children:[jsxRuntimeExports.jsx("div",{className:"".concat(i.paddingDiv),children:t.isNotebook?jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-flow-name-dialog.notebookMustUnique",defaultMessage:"Your notebooks's name must be unique",description:"Your notebook's name must be unique"}):jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-flow-center-header-flow-name-dialog.jFggxR",defaultMessage:"Your flow's name must be unique",description:"Your flow's name must be unique"})}),jsxRuntimeExports.jsx("div",{className:"".concat(i.paddingDiv),children:jsxRuntimeExports.jsx(TextField,{id:"os-flow-center-header-flow-name-dialog-textfield.jFtfxR",className:i.flowName,label:t.isNotebook?"Notebook Name":"Flow Name",onChange:function(e){e=e.target.value;u(e)},variant:"outlined",value:c,error:!!p,helperText:p||null})})]}),jsxRuntimeExports.jsxs(DialogActions,{className:e.actions,children:[jsxRuntimeExports.jsx(Button,{"data-test":"flow-center-flow-list-cancelCreateFlowWithName",onClick:function(){l()},className:e.cancelButton,children:DialogFormattedMessages.CANCEL_FLOW_UNIQUE_NAME}),jsxRuntimeExports.jsx(Button,{disabled:!c,"data-test":"flow-center-flow-list-createFlowWithName",onClick:function(){var e;(e=t).isCopyFlow?y(e).catch(function(e){devErrorLogger("Error copying flow: ".concat(JSON.stringify(e)))}):e.isNotebook?j(!0).catch(function(e){devErrorLogger("Error creating flow: ".concat(JSON.stringify(e)))}):j(!1).catch(function(e){devErrorLogger("Error creating flow: ".concat(JSON.stringify(e)))})},className:c?e.confirmationButton:e.disabledButton,autoFocus:!0,children:t.isNotebook?DialogFormattedMessages.CREATE_NOTEBOOK:!0===t.isCopyFlow?DialogFormattedMessages.COPY_FLOW:DialogFormattedMessages.CREATE_FLOW})]})]})}function _define_property$1(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _object_spread$1(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):n).forEach(function(e){_define_property$1(t,e,o[e])})}return t}function UniversalDialog(){var o=useSelector(flowCenterDialogSelector)||null,e=useDispatch(),n=[{name:"FlowNameDialog",component:FlowNameDialog}];return jsxRuntimeExports.jsx(Dialog,{open:o.flowCenterDialog.open,onClose:function(){e(flowCenterDialogAction({open:!1,component:"",props:{}}))},children:jsxRuntimeExports.jsx("div",{children:o.flowCenterDialog.component&&jsxRuntimeExports.jsx(function(){var t,e=(t=o.flowCenterDialog.component)?n.filter(function(e){return e.name===t})[0].component:null;return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(CircularProgress,{}),children:jsxRuntimeExports.jsx(e,_object_spread$1({},o.flowCenterDialog.props))})},{})})})}function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,a=[],s=!0,i=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw r}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){var o;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_array_like_to_array(e,t):void 0}var mainContainerId="flow-center-container",FlowCenter=function(e){function D(){var e,t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],o=(we(DEFAULT_FILTERS_FOR_TAB_MY_FLOWS),l?"calc(100vh - 64px - 54px)":"calc(100vh - 64px - 64px - ".concat(j?"0px":"62px",")"));return jsxRuntimeExports.jsxs("div",{style:{height:o},className:O.flowsMainContainer,id:"flows-main-container",children:[u&&u.flowCenterDialog.open&&jsxRuntimeExports.jsx(UniversalDialog,{}),!t&&jsxRuntimeExports.jsx(TemplateGallery,{handleOpenFlowNameDialog:M,setScreen:f,goToTemplateList:function(){return f(ENGINE_OWNER_TYPES.TEMPLATES)},handleOpenTemplateDetails:function(){_(!0),R(!0),T(!0)}}),jsxRuntimeExports.jsx("div",{children:le?Ee(25):v&&v.length?""===x?jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:B,simpleMode:""!==x,selectedFlowId:x,notebooks:t,onSelectFlow:function(e,t){$(),t?(h(!0),E(!1)):_(!0),g(e),S(!1)},setFirstFlowId:function(e){Z(e)},screenName:(null==(e=N([m]))||null==(e=e.pop())?void 0:e.text)||"",zIndex:i,setOpenFlowDetails:function(e){_(e)},setOpenAlwaysUpFlow:function(e,t){$(),h(!1),_(!1),t&&(g(t),S(!1)),e?(E(!0),h(!1)):_(!0)},betaFeatures:p}):jsxRuntimeExports.jsxs("div",{className:O.enginesAndFlowWidgetContainer,children:[jsxRuntimeExports.jsx("div",{className:O.enginesContainer,children:jsxRuntimeExports.jsx(FlowList,{createFlowTemplate:B,simpleMode:""!==x,selectedFlowId:x,notebooks:t,setFirstFlowId:function(e){ee&&g(e)},onSelectFlow:function(e){$(),g(e),S(!1)},screenName:(null==(e=N([m]))||null==(t=e.pop())?void 0:t.text)||"",zIndex:i,setOpenFlowDetails:function(e){_(e)},betaFeatures:p,setOpenAlwaysUpFlow:function(e,t){$(),h(!1),_(!1),t&&g(t),E(e)}})}),!w&&jsxRuntimeExports.jsx("div",{className:O.flowWidgetContainer,children:jsxRuntimeExports.jsx("div",{"data-test":"flow-center-flow-widget-container",className:O.flowWidgetContent,children:jsxRuntimeExports.jsx(_e,{})})})]}):jsxRuntimeExports.jsxs("div",{style:{height:o},id:"flows-main-container-no-flows-found",children:[u&&u.flowCenterDialog.open&&jsxRuntimeExports.jsx(UniversalDialog,{}),jsxRuntimeExports.jsx("div",{style:{height:o},id:"flows-main-container",children:jsxRuntimeExports.jsx(NoFlowsFound,{setScreen:f,handleOpenFlowNameDialog:M})})]})})]})}var t=e.graphQLEndpoint,o=void 0===t?DEFAULT_GRAPHQL_ENDPOINT:t,t=e.defaultCluster,L=void 0===t?DEFAULT_CLUSTER:t,t=e.defaultScreen,t=void 0===t?ENGINE_OWNER_TYPES.MINE:t,n=e.tabs,r=void 0===n?DEFAULT_TABS:n,n=e.filters,n=void 0===n?DEFAULT_FILTERS:n,a=e.options,k=void 0===a?{header:{title:"FLOW CENTER",showSearchBar:!0,showNewFromTemplate:!0,showCreateNewFlow:!0,showAdditionalOptionButton:!0,showCollapseButton:!0,showFullScreenButton:!0},controllerFlowPath:"flow"}:a,a=e.openTabFlowWidget,P=void 0===a?0:a,a=e.collapseFlowCenter,B=e.createFlowTemplate,G=e.isFullScreen,W=void 0!==G&&G,G=e.hidePanel,z=e.marginTop,z=void 0===z?0:z,s=e.zIndex,i=void 0===s?0:s,s=e.automateFullScreen,l=void 0!==s&&s,c=useDispatch(),H=(useCommonStyles().classes,useSelector(preferredLanguageSelector)||"en"),U=useSelector(baseUrlSelector),Y=useSelector(rootApiSelector),V=(useSelector(sessionTokenSelector),useSelector(graphEndpointSelector),useSelector(controllerNodeRedImageSelector)),q=useSelector(controllerUrlSelector),e=useSelector(automateControllerUrlSelector),u=(useSelector(engineDistributionTypeSelector),useSelector(newFlowClusterIDSelector),useSelector(flowCenterDialogSelector)||null),q=q||e.replace("automate-",""),p=(useSelector(automateUrlSelector),useSelector(betaFeaturesSelector)),s=(useSelector(function(e){return e.flows.isRevisionsExistOnServer}),setApiEndpoint(U),reactExports.useEffect(function(){setApiEndpoint(U)},[U]),reactExports.useEffect(function(){c(setFlowCenterConfig({isFullScreen:W,automateFullScreen:l,zIndex:i,graphQLEndpoint:o,defaultCluster:L}))},[W,l,i,o,L]),_sliced_to_array(reactExports.useState(""),2)),d=s[0],K=s[1],e=_sliced_to_array(reactExports.useState(t),2),m=e[0],f=e[1],s=_sliced_to_array(reactExports.useState(""),2),x=s[0],g=s[1],t=_sliced_to_array(reactExports.useState(!0),2),e=t[0],s=t[1],t=_sliced_to_array(reactExports.useState(!1),2),Q=t[0],_=t[1],t=_sliced_to_array(reactExports.useState(!1),2),J=t[0],E=t[1],t=_sliced_to_array(reactExports.useState(!1),2),w=t[0],h=t[1],t=_sliced_to_array(reactExports.useState(""),2),X=t[0],Z=t[1],t=_sliced_to_array(reactExports.useState(!0),2),ee=t[0],S=t[1],t=_sliced_to_array(reactExports.useState(W),2),j=t[0],t=t[1],y=_sliced_to_array(reactExports.useState(!1),2),b=y[0],T=y[1],y=_sliced_to_array(reactExports.useState(!1),2),F=y[0],R=y[1],y=_sliced_to_array(reactExports.useState(""),2),te=y[0],oe=y[1],y=_sliced_to_array(reactExports.useState(!0),2),ne=y[0],re=y[1],v=useSelector(function(e){return e.flows.flows}),ae=useSelector(function(e){return e.flows.shouldCreateInitialFlows}),se=useSelector(function(e){return e.flows.isSearching}),ie=useSelector(function(e){return e.flows.searched}),le=useSelector(function(e){return e.flows.fetchingFlows}),y=(reactExports.useEffect(function(){K(ie)},[ie]),reactExports.useEffect(function(){c(isRevisionsExistOnServer())},[c]),reactExports.useEffect(function(){m===ENGINE_OWNER_TYPES.TEMPLATES?c(fetchFlows({name:d,ownerType:ENGINE_OWNER_TYPES.MINE})):c(fetchFlows({name:d,ownerType:m})),null!=v&&v.length||ne||re(!0)},[d,c,m]),reactExports.useEffect(function(){ae||c(fetchFlows({name:d,ownerType:m}))},[ae]),reactExports.useEffect(function(){var e,t;te&&-1<(e=lodashExports.findIndex(v,function(e){return e.id===te}))&&((t=JSON.parse(JSON.stringify(v))).splice(e,1),c(setFlows(t)),re(!1))},[c,v,te]),reactExports.useEffect(function(){var e=document.querySelector("#".concat(mainContainerId));e&&(e.parentElement.style.overflowY="hidden")},[]),reactExports.useEffect(function(){c(searchTemplates())},[]),reactExports.useRef(null)),ce=reactExports.useRef(null),ue=useSelector(function(e){return e.flows.templateToOpen}),pe=useSelector(function(e){return e.flows.tags}),de=useSelector(function(e){return e.flows.categories}),me=useSelector(function(e){return e.flows.templatesAuthors}),N=function(t){return ALL_TABS.filter(function(e){return t.includes(e.key)})},fe=function(t){return ALL_FILTERS.filter(function(e){return t.includes(null==e?void 0:e.group)})},C=_sliced_to_array(reactExports.useState(N(_to_consumable_array(r))),2),xe=C[0],ge=C[1],C=(reactExports.useEffect(function(){ge(N(p?_to_consumable_array(r).concat(_to_consumable_array(BETA_TABS)):r))},[p,r]),_sliced_to_array(reactExports.useState(fe(n)),2)),I=C[0],A=C[1],O=(reactExports.useEffect(function(){var e=I.map(function(e){return"tags"===e.group&&(e.options=pe.map(function(e){return{text:e,value:e}})),e});A(e)},[pe]),reactExports.useEffect(function(){var e=I.map(function(e){return"categories"===e.group&&(e.options=de.map(function(e){return{text:e,value:e}})),e});A(e)},[de]),reactExports.useEffect(function(){var e=I.map(function(e){return"author"===e.group&&(e.options=me.map(function(e){return{text:e,value:e}})),e});A(e)},[me]),makeStyles()(function(e){return{fullScreenClass:{width:"100%"},main:{height:"100%",minHeight:"1000px",width:"1280px",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper},wideMain:{minHeight:"100%",width:"100%",display:"flex",flexDirection:"column",backgroundColor:e.palette.background.paper,overflowY:"auto",position:"fixed",top:0,left:0},fullHeight:{height:"100%"},fixedHeight:{height:"800px"},scrollY:{height:"100%",overflowY:"scroll"},container:{display:"flex",minHeight:"100%!important",position:"relative"},containerHeight:{height:"100%!important"},navigationContainer:{minWidth:"187px!important",maxWidth:"187px!important",width:"187px!important",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),transform:"translateX(0px)",position:"fixed!important",height:"100%!important",borderRight:"0.5px solid #D5DFE9 !important"},noNavigationContainer:{width:0,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),transform:"translateX(-187px)"},wrapperHeaderBar:{width:"inherit!important",cursor:"default"},contentContainer:{marginLeft:"188px!important",flex:"1 1 auto!important",backgroundColor:e.palette.background.paper,cursor:"default"},enginesAndFlowWidgetContainer:{height:"100%!important"},flowWidgetContainer:{position:"absolute",top:0,right:"1px",height:"100%",minWidth:720,width:720,zIndex:2,transitionTimingFunction:"ease-in-out !important",borderLeft:"0.5px solid #D5DFE9",background:e.palette.background.paper},flowWidgetContent:{height:"100%"},enginesContainer:{width:"100%!important",overflowY:"auto!important"},marginTop:{marginTop:"64px!important"},wrapperContainer:{},wrapperContainerWithHiddenOverflow:{overflowY:"hidden"},flowsMainContainer:{overflowY:"auto"},lineItem:{flexDirection:"row",margin:e.spacing(),borderRadius:e.spacing(.5),height:e.spacing(6)},paddingDiv:{paddingTop:"20px"},flowName:{width:"449px"}}})().classes),_e=function(){var e=k.controllerFlowPath;return jsxRuntimeExports.jsx(App$1,{engineId:x,openFlowRunningInstances:w,openAlwaysUpFlow:J,locale:H,openTab:P,config:{apiRoot:Y,graphQLEndpoint:o,controllerUrl:q,defaultCluster:L,controllerNodeRedImage:V,controllerFlowPath:e},tabs:[IFlowWidgetTabs.Overview,IFlowWidgetTabs.Versions,IFlowWidgetTabs.Activity],activityTabs:[IFlowWidgetActivityTabs.Jobs,IFlowWidgetActivityTabs.ScheduledJobs],onExitClicked:function(){g(""),_(!1),h(!1),E(!1)},onDeleteFlow:function(){setTimeout(function(){oe(x),g(""),oe("")},2e3)}})},M=function(e){c(flowCenterDialogAction({open:!0,component:"FlowNameDialog",props:{templateId:e,isCopyFlow:!1,isNotebook:1<arguments.length&&void 0!==arguments[1]&&arguments[1]}}))},Ee=function(e){e=Array(e);return jsxRuntimeExports.jsx("div",{children:Array.from(e).map(function(e,t){return jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:"wave",height:35,sx:{m:"8px"}},"skeleton_"+t)})})},we=function(e){var t=I,e=fe(e);lodashExports.isEqual(t,e)||A(e)},$=function(){var e=document.getElementById("flow-center-box-container");e&&(e.scrollTop=0)};return jsxRuntimeExports.jsxs(Container,{fullScreen:j,classes:O,main:ce,marginTop:z,zIndex:i,children:[jsxRuntimeExports.jsx("div",{ref:y,className:O.wrapperHeaderBar,children:jsxRuntimeExports.jsx(Headerbar,{options:k.header,handleOpenFlowNameDialog:M,collapseFlowCenter:a,setFullScreen:t,fullScreen:j,setScreen:f,hidePanel:G,zIndex:i,automateFullScreen:l,enableNotebooks:p,screen:m})}),jsxRuntimeExports.jsx(Box,{id:"flow-center-box-container",className:"".concat(l?O.wrapperContainer:O.marginTop," ").concat(""!==x||b?O.wrapperContainerWithHiddenOverflow:O.wrapperContainer),children:jsxRuntimeExports.jsxs("div",{className:"".concat(O.container," ").concat(F||x?O.containerHeight:""),children:[""!==x&&w&&jsxRuntimeExports.jsx("div",{className:O.flowWidgetContainer,children:jsxRuntimeExports.jsx("div",{"data-test":"flow-center-flow-widget-container",className:O.flowWidgetContent,children:jsxRuntimeExports.jsx(_e,{})})}),jsxRuntimeExports.jsx("div",{className:O.navigationContainer,children:jsxRuntimeExports.jsx(Navigation,{categories:xe,filterers:I,screen:m,tags:pe,onSetType:function(e){switch(g(""),_(!1),h(!1),E(!1),R(!1),T(!1),e){case"organization":f(ENGINE_OWNER_TYPES.ORGANIZATION);break;case"shared":f(ENGINE_OWNER_TYPES.SHARED);break;case"templates":f(ENGINE_OWNER_TYPES.TEMPLATES);break;case"mine":c(setTemplateSelected(!1)),f(ENGINE_OWNER_TYPES.MINE);break;case"notebooks":c(setTemplateSelected(!1)),f(ENGINE_OWNER_TYPES.NOTEBOOKS)}},type:"",showNavigation:e,fullScreen:j,automateFullScreen:l})}),jsxRuntimeExports.jsxs("div",{className:O.contentContainer,children:[jsxRuntimeExports.jsx(Toolbar,{header:null==(n=N([m]))?void 0:n.pop(),showNavigation:e,screen:m,setShowNavigation:s,openFlowDetails:Q,setOpenFlowDetails:function(){$(),c(setOpenTemplate({})),"templates"===m?(R(!F),T(!b)):(R(!1),T(!1)),_(!Q),h(!1),E(!1),g(Q?"":X)}}),(()=>{var e,t;if(se)return jsxRuntimeExports.jsx(SearchResultsPage,{createFlowTemplate:B,openFlowRunningInstances:w,simpleMode:""!==x,selectedFlowId:x,onSelectFlow:function(e,t){$(),(t?h:_)(!0),g(e),S(!1)},setFirstFlowId:function(e){Z(e)},screenName:(null==(e=N([m]))||null==(e=e.pop())?void 0:e.text)||"",handleOpenFlowNameDialog:M,openFirstTemplate:b,isDeselectedTemplate:F,onSelectedTemplate:function(){$(),R(!0),_(!0),T(!0)},classes:O,allowSetFirstFlowId:ee,setSelectedFlowId:g,setOpenFlowRunningInstances:h,setOpenFlowDetails:_,scrollContainerToTop:$,setAllowSetFirstFlowId:S,openTabFlowWidget:P,setUpdateFlowList:oe,controllerFlowPath:k.controllerFlowPath,openAlwaysUpFlow:J,setOpenAlwaysUpFlow:E,betaFeatures:p});switch(m!==ENGINE_OWNER_TYPES.TEMPLATES&&ue.id&&c(setOpenTemplate({})),m){case ENGINE_OWNER_TYPES.TEMPLATES:return we(DEFAULT_FILTERS_FOR_TAB_TEMPLATES),t=l?"calc(100vh - 64px - 54px)":"calc(100vh - 64px - 64px - ".concat(j?"0px":"62px",")"),jsxRuntimeExports.jsxs("div",{style:{height:t},className:O.flowsMainContainer,id:"templates-main-container",children:[u&&u.flowCenterDialog.open&&jsxRuntimeExports.jsx(UniversalDialog,{}),jsxRuntimeExports.jsx(TemplateList,{handleOpenFlowNameDialog:M,openFirstTemplate:b,isDeselectedTemplate:F,onSelectedTemplate:function(){$(),R(!0),_(!0),T(!0)}})]});case ENGINE_OWNER_TYPES.MINE:return D();case ENGINE_OWNER_TYPES.NOTEBOOKS:return D(!0);default:return}})()]})]})})]})},Container=function(e){var t=e.fullScreen,o=e.classes,n=e.main,r=e.marginTop,a=e.zIndex,e=e.children;return t?jsxRuntimeExports.jsx(Portal,{children:jsxRuntimeExports.jsx("div",{role:"presentation","data-test":"flow-center-widget-main-conatiner","data-cy":"flow-center-widget-fullscreen",ref:n,id:mainContainerId,className:o.wideMain,style:{top:r,zIndex:a},children:e})}):jsxRuntimeExports.jsx("div",{role:"presentation","data-test":"flow-center-widget-main-conatiner","data-cy":"flow-center-widget-notfullscreen",ref:n,id:"flow-center-container",className:o.main,style:{top:r,zIndex:a},children:e})};function _define_property(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _object_spread(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{},n=Object.keys(o);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})):n).forEach(function(e){_define_property(t,e,o[e])})}return t}var App=function(e){return jsxRuntimeExports.jsx(Provider,{store:store,children:jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getFlowCenterModule()],children:jsxRuntimeExports.jsx(AIWareIntlProvider,{children:jsxRuntimeExports.jsx(FlowCenter,_object_spread({},e))})})})};export{App,useCommonStyles};