From 266ec85e20cded41399a6c0026f268e5ff2db6ea Mon Sep 17 00:00:00 2001 From: trallard Date: Thu, 12 Sep 2024 08:56:13 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20conda-in?= =?UTF-8?q?cubator/conda-store-ui@d0ad03eb14d116e34377874c4f2561a0e95b40dd?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 727.782828f0.iframe.bundle.js | 1 - 727.968ed270.iframe.bundle.js | 1 + iframe.html | 2 +- project.json | 2 +- ...b.iframe.bundle.js => runtime~main.527c38c8.iframe.bundle.js | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 727.782828f0.iframe.bundle.js create mode 100644 727.968ed270.iframe.bundle.js rename runtime~main.aada21fb.iframe.bundle.js => runtime~main.527c38c8.iframe.bundle.js (99%) diff --git a/727.782828f0.iframe.bundle.js b/727.782828f0.iframe.bundle.js deleted file mode 100644 index beca036e..00000000 --- a/727.782828f0.iframe.bundle.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_conda_store_conda_store_ui=self.webpackChunk_conda_store_conda_store_ui||[]).push([[727],{"./src/components/Dialog.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{L:()=>AlertDialog});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_mui_material_Button__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@mui/material/Button/Button.js"),_mui_material_Dialog__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mui/material/Dialog/Dialog.js"),_mui_material_DialogActions__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@mui/material/DialogActions/DialogActions.js"),_mui_material_DialogContent__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@mui/material/DialogContent/DialogContent.js"),_mui_material_DialogContentText__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@mui/material/DialogContentText/DialogContentText.js"),_mui_material_DialogTitle__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@mui/material/DialogTitle/DialogTitle.js"),_styles__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/styles/index.tsx");const AlertDialog=({title,description,isOpen,closeAction,confirmAction,confirmText="Delete"})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_Dialog__WEBPACK_IMPORTED_MODULE_2__.A,{open:isOpen,onClose:closeAction},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_DialogTitle__WEBPACK_IMPORTED_MODULE_3__.A,{sx:{fontFamily:'"Inter", sans-serif',fontSize:"16px",color:"#333",fontWeight:600}},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_DialogContent__WEBPACK_IMPORTED_MODULE_4__.A,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_DialogContentText__WEBPACK_IMPORTED_MODULE_5__.A,{sx:{fontSize:"13px",fontFamily:'"Inter", sans-serif',color:"#333"}},description)),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_DialogActions__WEBPACK_IMPORTED_MODULE_6__.A,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_7__.A,{color:"secondary",onClick:closeAction},"Cancel"),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_styles__WEBPACK_IMPORTED_MODULE_1__.OV,{color:"primary",onClick:()=>confirmAction(),sx:{textTransform:"uppercase"}},confirmText)));AlertDialog.__docgenInfo={description:"",methods:[],displayName:"AlertDialog",props:{title:{required:!0,tsType:{name:"string"},description:""},description:{required:!0,tsType:{name:"string"},description:""},isOpen:{required:!0,tsType:{name:"boolean"},description:""},closeAction:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},confirmAction:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},confirmText:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"Delete"',computed:!1}}}}},"./src/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Lt:()=>Dialog.L,HK:()=>ArrowIcon,ZO:()=>BlockContainer,Kl:()=>BlockContainerEditMode,vP:()=>BookIcon,F4:()=>ChannelIcon,lo:()=>CodeIcon,Bz:()=>CondaLogo,K7:()=>ConstraintSelect,AE:()=>DeleteIconAlt,Cy:()=>GroupIconAlt,zD:()=>Popup,Li:()=>SearchIconAlt,JM:()=>UploadIcon,t7:()=>VersionSelect});var Select=__webpack_require__("./node_modules/@mui/material/Select/Select.js"),MenuItem=__webpack_require__("./node_modules/@mui/material/MenuItem/MenuItem.js"),react=__webpack_require__("./node_modules/react/index.js");const ConstraintSelect=({constraint,onUpdate=value=>{}})=>{const selectedConstraint="=="===constraint?"=":constraint;return react.createElement(Select.A,{defaultValue:selectedConstraint,IconComponent:()=>null,onChange:e=>{e.target.value&&onUpdate(e.target.value)},sx:{borderRadius:"0px",width:"44px"},notched:!1,inputProps:{sx:{padding:"7px 9px !important",borderRadius:"0px","&::placeholder":{fontSize:"14px",fontWeight:400}},"data-testid":"ConstraintSelectTest"}},["=",">","<",">=","<="].map((constraint=>react.createElement(MenuItem.A,{key:constraint,value:constraint},constraint))))};ConstraintSelect.__docgenInfo={description:"",methods:[],displayName:"ConstraintSelect",props:{constraint:{required:!0,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"@param constraint package version constraint"},onUpdate:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:"",defaultValue:{value:"(value: string) => {}",computed:!1}}}};var useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js"),ArrowDropDown=__webpack_require__("./node_modules/@mui/icons-material/ArrowDropDown.js"),IconButton=__webpack_require__("./node_modules/@mui/material/IconButton/IconButton.js"),esm=__webpack_require__("./node_modules/compare-versions/lib/esm/index.js"),semver=__webpack_require__("./node_modules/semver/index.js");const requestedPackageVersionApiSlice=__webpack_require__("./src/features/api/index.ts").l.injectEndpoints({endpoints:builder=>({getPackageVersionSuggestions:builder.query({query:dto=>`api/v1/package/?search=${dto.search}&exact=true&distinct_on=version&page=${dto.page}&order=desc&sort_by=version`})})}),{useLazyGetPackageVersionSuggestionsQuery}=requestedPackageVersionApiSlice;var reducer=__webpack_require__("./src/features/requestedPackages/reducer.ts"),hooks=__webpack_require__("./src/hooks.ts"),requestedPackages=__webpack_require__("./src/features/requestedPackages/index.tsx"),helpers=__webpack_require__("./src/utils/helpers/index.ts");const VersionSelect=({version,name,onUpdate=value=>{}})=>{const{palette}=(0,useTheme.A)(),reduxDispatch=(0,hooks.j)(),{buildPackagesCache}=(0,hooks.G)((state=>state.requestedPackages)),[open,setOpen]=(0,react.useState)(!1),[value,setValue]=(0,react.useState)(version??""),[state,dispatch]=(0,react.useReducer)(reducer.CZ,reducer.ue),[triggerQuery]=useLazyGetPackageVersionSuggestionsQuery(),iconStyles=(0,helpers.xs)({backgroundColor:"#ECECEC",height:"37px",borderLeft:`2px solid ${palette.primary.main}`},{backgroundColor:"#fff",height:"37px",borderLeft:"1px solid #BCBFC4"});(0,react.useEffect)((()=>{(async()=>{if(buildPackagesCache[name])return void dispatch({type:reducer.Q3.DATA_FETCHED,payload:{data:buildPackagesCache[name].packages,count:buildPackagesCache[name].count}});dispatch({type:reducer.Q3.LOADING,payload:{loading:!0}});const{data}=await triggerQuery({page:state.page,search:name.trim()});data&&(dispatch({type:reducer.Q3.DATA_FETCHED,payload:{data:data.data,count:data.count}}),reduxDispatch((0,requestedPackages.Sf)({pkgName:name,packages:data.data,count:data.count}))),dispatch({type:reducer.Q3.LOADING,payload:{loading:!1}})})()}),[]);const versionsList=(0,react.useMemo)((()=>{const uniqueVersions=new Set,result=[];let sortedVersions=[];state.data.forEach((packageVersions=>{const packageVersion=packageVersions.version;uniqueVersions.has(packageVersion)||(result.push(packageVersion),uniqueVersions.add(packageVersion))}));return sortedVersions=result.sort(((v1,v2)=>{const safeV1=((0,semver.coerce)(v1)||"").toString(),safeV2=((0,semver.coerce)(v2)||"").toString();return safeV1&&safeV2?(0,esm.Zy)(safeV1,safeV2):1})),sortedVersions.forEach((v=>{""!==v&&""!==value&&v===value&&setValue(v)})),sortedVersions.reverse()}),[state.data]);return react.createElement(Select.A,{value:versionsList.length>0?value:"",open,onClose:()=>setOpen(!1),onOpen:()=>setOpen(!0),onChange:e=>{onUpdate(e.target.value),setValue(e.target.value)},IconComponent:()=>react.createElement(IconButton.A,{sx:{padding:"0px"},onClick:()=>setOpen((currState=>!currState))},react.createElement(ArrowDropDown.A,{sx:iconStyles})),MenuProps:{PaperProps:{sx:{maxHeight:200}}},notched:!1,sx:{borderRadius:"0px",width:"110px",border:"none"},inputProps:{sx:{padding:"7px 9px !important",backgroundColor:palette.common.white,borderRadius:"0px",fontFamily:"monospace",fontSize:"13px"},"data-testid":"VersionSelectTest"}},react.createElement(MenuItem.A,{key:"empty",value:"",sx:{height:"30px"}}," "),versionsList.map((v=>react.createElement(MenuItem.A,{key:v,value:v,sx:{fontFamily:"monospace",fontSize:"13px"}},v))))};VersionSelect.__docgenInfo={description:"",methods:[],displayName:"VersionSelect",props:{version:{required:!0,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"@param version package version\n@param name package name"},name:{required:!0,tsType:{name:"string"},description:""},onUpdate:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:"",defaultValue:{value:"(value: string) => {}",computed:!1}}}};var Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js");const BlockContainer=({title,children})=>react.createElement(Box.A,{sx:{border:"1px solid #E0E0E0",paddingBottom:"15px"}},react.createElement(Box.A,{sx:{padding:"10px 15px",borderBottom:"1px solid #E0E0E0"}},react.createElement(Typography.A,{"data-testid":"block-container-title",sx:{fontSize:"14px",fontWeight:600,color:"#333"}},title)),react.createElement(Box.A,{sx:{padding:"15px 15px 0 15px"}},children));BlockContainer.__docgenInfo={description:"",methods:[],displayName:"BlockContainer",props:{title:{required:!0,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};var Grid=__webpack_require__("./node_modules/@mui/material/Grid/Grid.js"),styles=__webpack_require__("./src/styles/index.tsx"),Button=__webpack_require__("./node_modules/@mui/material/Button/Button.js"),UploadFileRounded=__webpack_require__("./node_modules/@mui/icons-material/UploadFileRounded.js");const BlockContainerEditMode=({title,children,onToggleEditMode,isEditMode,setShowDialog})=>react.createElement(Box.A,{sx:{border:"1px solid #E0E0E0",paddingBottom:"15px"}},react.createElement(Box.A,{sx:{padding:"10px 15px",borderBottom:"1px solid #E0E0E0"}},react.createElement(Box.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"}},react.createElement(Typography.A,{"data-testid":"block-container-title",sx:{fontSize:"14px",fontWeight:600,color:"#333"}},title),react.createElement(Box.A,{display:"flex",alignItems:"center"},react.createElement(Button.A,{variant:"outlined",color:"secondary",size:"small",startIcon:react.createElement(UploadFileRounded.A,null),onClick:()=>setShowDialog(!0),sx:{mx:"1em"}},"Switch to Conda Lockfile Upload")," ",react.createElement(Grid.Ay,{component:"label",container:!0,spacing:1,justifyContent:"center",sx:{width:"auto"}},react.createElement(Grid.Ay,{item:!0,sx:{alignSelf:"baseline"}},react.createElement(Typography.A,{"data-testid":"block-container-title",sx:{fontSize:"14px",color:"#333",fontWeight:isEditMode?"400":"600"}},"GUI")),react.createElement(Grid.Ay,{item:!0,sx:{alignSelf:"baseline"}},react.createElement(styles.Yu,{checked:isEditMode,onClick:e=>onToggleEditMode(!isEditMode),icon:react.createElement(CodeIcon,null),checkedIcon:react.createElement(CodeIcon,null)})),react.createElement(Grid.Ay,{item:!0,sx:{alignSelf:"baseline"}},react.createElement(Typography.A,{"data-testid":"block-container-title",sx:{fontSize:"14px",color:"#333",fontWeight:isEditMode?"600":"400"}},"YAML")))))),react.createElement(Box.A,{sx:{padding:"15px 15px 0 15px"}},children));BlockContainerEditMode.__docgenInfo={description:"",methods:[],displayName:"BlockContainerEditMode",props:{title:{required:!0,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},onToggleEditMode:{required:!0,tsType:{name:"signature",type:"function",raw:"(show: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"show"}],return:{name:"void"}}},description:""},isEditMode:{required:!0,tsType:{name:"boolean"},description:""},setShowDialog:{required:!0,tsType:{name:"signature",type:"function",raw:"(show: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"show"}],return:{name:"void"}}},description:""}}};var Alert=__webpack_require__("./node_modules/@mui/material/Alert/Alert.js"),Snackbar=__webpack_require__("./node_modules/@mui/material/Snackbar/Snackbar.js");const Popup=({description,isVisible,onClose})=>{const handleClose=()=>{onClose({show:!isVisible,description:null})};return react.createElement(Snackbar.A,{anchorOrigin:{vertical:"bottom",horizontal:"right"},autoHideDuration:3e3,open:isVisible,onClose:handleClose},react.createElement(Alert.A,{severity:"success",sx:{width:"100%"},onClose:handleClose},description))};Popup.__docgenInfo={description:"",methods:[],displayName:"Popup",props:{description:{required:!0,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},isVisible:{required:!0,tsType:{name:"boolean"},description:""},onClose:{required:!0,tsType:{name:"signature",type:"function",raw:"(notification: any) => void",signature:{arguments:[{type:{name:"any"},name:"notification"}],return:{name:"void"}}},description:""}}};var preferences=__webpack_require__("./src/preferences.tsx");const CondaLogo=props=>{const isGrayscaleStyleType="grayscale"===react.useContext(preferences.be).styleType,colorTheme_gray=["#CCCFD2","#E4E4E5"],colorTheme_green=["#33A852","#B9D9BD"];return react.createElement("svg",{width:"inherit",height:"inherit",viewBox:"0 0 233 266",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props},react.createElement("path",{d:"M104.02 145.337c-29.376-16.22-58.646-32.615-87.987-48.905-9.366-5.2-15.938-1.338-15.95 9.33-.035 16.783-.011 33.566-.011 50.36 0 16.783.117 33.578-.07 50.361-.06 5.727 1.947 9.424 7.205 12.064 29.693 14.929 59.257 30.116 88.89 45.162 8.122 4.119 14.648.035 14.648-9.166.035-32.627-.071-65.242.094-97.869.035-5.469-2.16-8.767-6.819-11.337z",fill:isGrayscaleStyleType?colorTheme_gray[0]:colorTheme_green[0]}),react.createElement("path",{d:"M128.877 145.337c29.376-16.22 58.646-32.615 87.987-48.905 9.365-5.2 15.937-1.338 15.949 9.33.035 16.783.012 33.566.012 50.36 0 16.783-.117 33.578.07 50.361.059 5.727-1.948 9.424-7.206 12.064-29.692 14.929-59.256 30.116-88.89 45.162-8.122 4.119-14.647.035-14.647-9.166-.035-32.627.07-65.242-.094-97.869-.035-5.469 2.16-8.767 6.819-11.337zM174.25 15.487h-18.203v10.035h18.203s-3.134-3.556-3.333-4.695c-.2-1.138 3.333-5.34 3.333-5.34z",fill:isGrayscaleStyleType?colorTheme_gray[1]:colorTheme_green[1]}),react.createElement("path",{d:"M153.312 58.289c-1.526-1.96-4.178-4.002-7.957-6.103-3.779-2.1-7.054-3.709-9.812-4.8-2.769-1.092-7.053-2.723-12.863-4.906-5.668-2.183-9.776-4.107-12.323-5.774-2.546-1.667-3.814-3.52-3.814-5.563 0-2.617 1.091-4.612 3.274-5.997 2.089-1.326 4.39-1.995 6.89-2.054v-.082c10.374.692 22.557 1.901 32.626 2.5 1.808.105 2.183-.376 2.078-2.066-.751-12.37-10.129-20.515-22.346-22.534a50.123 50.123 0 00-3.462-.422c-7.429-.939-12.406-.282-14.096-.012-8.438.892-15.62 3.732-21.547 8.532-7.277 5.892-10.903 13.556-10.903 23.003 0 9.307 2.875 16.537 8.614 21.7 5.74 5.165 13.767 9.484 24.095 12.981 7.417 2.324 12.499 4.296 15.269 5.892 2.758 1.596 4.142 3.568 4.142 5.891 0 2.618-1.161 4.73-3.497 6.326-2.324 1.596-5.528 2.394-9.6 2.394a41.42 41.42 0 01-5.141-.328c-11.29-.822-19.834-2.054-31.124-2.934-1.55-.118-1.948.234-1.925 1.76.188 11.913 9.26 21.196 21.102 22.827 2.171.294 7.699 1.385 12.358 1.432 1.491.094 2.993.141 4.518.141 13.521 0 23.802-3.052 30.855-9.154 7.054-6.103 10.575-14.096 10.575-23.99 0-4.06-.623-7.698-1.855-10.902-1.22-3.216-2.605-5.798-4.131-7.758zM131.494 7.647c2.653.13 4.589 2.242 4.472 4.87-.118 2.641-2.254 4.578-4.894 4.46-2.606-.117-4.624-2.3-4.519-4.882.118-2.57 2.336-4.565 4.941-4.448z",fill:isGrayscaleStyleType?colorTheme_gray[0]:colorTheme_green[0]}))};CondaLogo.__docgenInfo={description:"",methods:[],displayName:"CondaLogo"};const GroupIconAlt=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...props},react.createElement("circle",{cx:"12",cy:"8",r:"2.5",stroke:theme.palette.secondary[500],strokeLinecap:"round"}),react.createElement("path",{d:"M13.7679 6.5C13.9657 6.15743 14.2607 5.88121 14.6154 5.70625C14.9702 5.5313 15.3689 5.46548 15.7611 5.51711C16.1532 5.56874 16.5213 5.73551 16.8187 5.99632C17.1161 6.25713 17.3295 6.60028 17.4319 6.98236C17.5342 7.36445 17.521 7.76831 17.3939 8.14288C17.2667 8.51745 17.0313 8.8459 16.7175 9.08671C16.4037 9.32751 16.0255 9.46985 15.6308 9.49572C15.2361 9.52159 14.8426 9.42983 14.5 9.23205",stroke:theme.palette.secondary[500]}),react.createElement("path",{d:"M10.2321 6.5C10.0343 6.15743 9.73935 5.88121 9.38458 5.70625C9.02981 5.5313 8.63113 5.46548 8.23895 5.51711C7.84677 5.56874 7.47871 5.73551 7.18131 5.99632C6.88391 6.25713 6.67053 6.60028 6.56815 6.98236C6.46577 7.36445 6.47899 7.76831 6.60614 8.14288C6.73329 8.51745 6.96866 8.8459 7.28248 9.08671C7.5963 9.32751 7.97448 9.46985 8.36919 9.49572C8.76391 9.52159 9.15743 9.42983 9.5 9.23205",stroke:theme.palette.secondary[500]}),react.createElement("path",{d:"M12 12.5C16.0802 12.5 17.1335 15.8022 17.4054 17.507C17.4924 18.0524 17.0523 18.5 16.5 18.5H7.5C6.94771 18.5 6.50763 18.0524 6.59461 17.507C6.86649 15.8022 7.91976 12.5 12 12.5Z",stroke:theme.palette.secondary[500],strokeLinecap:"round"}),react.createElement("path",{d:"M19.2964 15.4162L18.8113 15.5377L19.2964 15.4162ZM13.0869 12.5859L12.7177 12.2488L12.0972 12.9283L13.0049 13.0791L13.0869 12.5859ZM17.1811 16.5L16.7008 16.639L16.8053 17H17.1811V16.5ZM15.4998 12C16.5275 12 17.2493 12.5027 17.7781 13.2069C18.3175 13.9253 18.6343 14.8306 18.8113 15.5377L19.7814 15.2948C19.5902 14.5315 19.2327 13.4787 18.5778 12.6065C17.9124 11.7203 16.92 11 15.4998 11V12ZM13.4562 12.923C13.9565 12.375 14.6105 12 15.4998 12V11C14.2826 11 13.3734 11.5306 12.7177 12.2488L13.4562 12.923ZM13.0049 13.0791C15.3055 13.4614 16.2788 15.1801 16.7008 16.639L17.6614 16.361C17.1903 14.7326 16.0188 12.5663 13.1689 12.0927L13.0049 13.0791ZM18.3948 16H17.1811V17H18.3948V16ZM18.8113 15.5377C18.8651 15.7526 18.7073 16 18.3948 16V17C19.2655 17 20.015 16.2277 19.7814 15.2948L18.8113 15.5377Z",fill:theme.palette.secondary[500]}),react.createElement("path",{d:"M10.913 12.5859L10.995 13.0791L11.9027 12.9283L11.2823 12.2488L10.913 12.5859ZM4.70355 15.4162L5.18857 15.5377L4.70355 15.4162ZM6.8188 16.5V17H7.19465L7.2991 16.639L6.8188 16.5ZM8.50011 12C9.38944 12 10.0434 12.375 10.5438 12.923L11.2823 12.2488C10.6266 11.5306 9.71735 11 8.50011 11V12ZM5.18857 15.5377C5.36566 14.8306 5.6824 13.9253 6.22179 13.2069C6.7506 12.5027 7.47238 12 8.50011 12V11C7.07993 11 6.08755 11.7203 5.42211 12.6065C4.76725 13.4787 4.40968 14.5315 4.21853 15.2948L5.18857 15.5377ZM5.6051 16C5.29259 16 5.13477 15.7526 5.18857 15.5377L4.21853 15.2948C3.9849 16.2277 4.73436 17 5.6051 17V16ZM6.8188 16H5.6051V17H6.8188V16ZM7.2991 16.639C7.72116 15.1801 8.69448 13.4614 10.995 13.0791L10.831 12.0927C7.98113 12.5663 6.80962 14.7326 6.3385 16.361L7.2991 16.639Z",fill:theme.palette.secondary[500]}))};GroupIconAlt.__docgenInfo={description:"",methods:[],displayName:"GroupIconAlt"};const ArrowIcon=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{width:7,height:13,viewBox:"0 0 7 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props},react.createElement("path",{d:"M0 12.82l6.29-6.41L0 0v12.82z",fill:theme.palette.secondary.dark}))};ArrowIcon.__docgenInfo={description:"",methods:[],displayName:"ArrowIcon"};const SearchIconAlt=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props},react.createElement("path",{d:"M13.09 12.64L17.53 17M7.77 15A7.06 7.06 0 10.66 7.94 7.08 7.08 0 007.77 15v0z",stroke:theme.palette.primary.main,strokeMiterlimit:10}))};SearchIconAlt.__docgenInfo={description:"",methods:[],displayName:"SearchIconAlt"};const DeleteIconAlt=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{width:14,height:16,viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props},react.createElement("path",{d:"M5.088 1h4.094M5.088 1h4.094M1 1.819h12.232M5.48 5.09v6.55M8.755 5.09v6.55",stroke:theme.palette.primary.main,strokeLinecap:"square"}),react.createElement("path",{clipRule:"evenodd",d:"M2.243 2.004v11.688c.072.595.338.892.798.892h8.188c.57.056.855-.242.855-.892V2.004H2.243z",stroke:theme.palette.primary.main}))};DeleteIconAlt.__docgenInfo={description:"",methods:[],displayName:"DeleteIconAlt"};const UploadIcon=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{width:12,height:16,viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props},react.createElement("path",{d:"M5.998 10.817V1m0 .09L2.343 4.745M5.998 1.09l3.656 3.655M10.907 14.688H1",stroke:theme.palette.primary.main,strokeLinecap:"round",strokeLinejoin:"round"}))};UploadIcon.__docgenInfo={description:"",methods:[],displayName:"UploadIcon"};const ChannelIcon=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{width:12,height:15,viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{marginRight:"10px",marginLeft:"5px"},...props},react.createElement("path",{d:"M3.95 0H1.17A1.17 1.17 0 000 1.17v6.26C0 8.076.524 8.6 1.17 8.6h2.78a1.17 1.17 0 001.17-1.17V1.17A1.17 1.17 0 003.95 0zM3.95 10.07H1.17A1.17 1.17 0 000 11.24v1.96c0 .646.524 1.17 1.17 1.17h2.78a1.17 1.17 0 001.17-1.17v-1.96a1.17 1.17 0 00-1.17-1.17zM7.76 14.38h2.78a1.17 1.17 0 001.17-1.17V6.95a1.17 1.17 0 00-1.17-1.17H7.76a1.17 1.17 0 00-1.17 1.17v6.26c0 .646.524 1.17 1.17 1.17zM7.76 4.31h2.78a1.17 1.17 0 001.17-1.17V1.18A1.17 1.17 0 0010.54.01H7.76a1.17 1.17 0 00-1.17 1.17v1.96c0 .646.524 1.17 1.17 1.17z",fill:theme.palette.primary.main}))};ChannelIcon.__docgenInfo={description:"",methods:[],displayName:"ChannelIcon"};const CodeIcon=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...props},react.createElement("path",{d:"m8 18l-6-6l6-6l1.425 1.425l-4.6 4.6L9.4 16.6L8 18Zm8 0l-1.425-1.425l4.6-4.6L14.6 7.4L16 6l6 6l-6 6Z",fill:theme.palette.primary.contrastText}))};CodeIcon.__docgenInfo={description:"",methods:[],displayName:"CodeIcon"};const BookIcon=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...props},react.createElement("path",{d:"M8 4.3335V12.3335",stroke:theme.palette.secondary.main,strokeLinecap:"round"}),react.createElement("path",{d:"M13.667 4.3335V12.3335",stroke:theme.palette.secondary.main,strokeLinecap:"round"}),react.createElement("path",{d:"M2.33301 4.3335V12.3335",stroke:theme.palette.secondary.main,strokeLinecap:"round"}),react.createElement("path",{d:"M13.6667 12.3333C13.6667 12.3333 13 11 10.6667 11C8.33333 11 8 12.3333 8 12.3333",stroke:theme.palette.secondary.main,strokeLinecap:"round"}),react.createElement("path",{d:"M2.33333 12.3333C2.33333 12.3333 3 11 5.33333 11C7.66667 11 8 12.3333 8 12.3333",stroke:theme.palette.secondary.main,strokeLinecap:"round"}),react.createElement("path",{d:"M13.6667 4.33333C13.6667 4.33333 13 3 10.6667 3C8.33333 3 8 4.33333 8 4.33333",stroke:theme.palette.secondary.main,strokeLinecap:"round"}),react.createElement("path",{d:"M2.33333 4.33333C2.33333 4.33333 3 3 5.33333 3C7.66667 3 8 4.33333 8 4.33333",stroke:theme.palette.secondary.main,strokeLinecap:"round"}))};BookIcon.__docgenInfo={description:"",methods:[],displayName:"BookIcon"};var Dialog=__webpack_require__("./src/components/Dialog.tsx")},"./src/features/api/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{l:()=>apiSlice});var rtk_query_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/query/rtk-query.esm.js"),rtk_query_react_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/query/react/rtk-query-react.esm.js"),preferences=__webpack_require__("./src/preferences.tsx");const apiSlice=(0,rtk_query_react_esm.xP)({baseQuery:async(args,WebApi,extraOptions)=>{const baseUrl=preferences.jI.apiUrl;return(0,rtk_query_esm.cw)({baseUrl,credentials:"include",prepareHeaders:headers=>("token"===preferences.jI.authMethod&&preferences.jI.authToken&&headers.set("Authorization",`Bearer ${preferences.jI.authToken}`),headers)})(args,WebApi,extraOptions)},endpoints:builder=>({}),reducerPath:"api",refetchOnMountOrArgChange:!0,tagTypes:[]})},"./src/features/artifacts/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{W:()=>ArtifactItem,V:()=>ArtifactList});var Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),Link=__webpack_require__("./node_modules/@mui/material/Link/Link.js"),react=__webpack_require__("./node_modules/react/index.js"),OpenInNew=__webpack_require__("./node_modules/@mui/icons-material/OpenInNew.js"),useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js"),preferences=__webpack_require__("./src/preferences.tsx"),helpers=__webpack_require__("./src/utils/helpers/index.ts");const ArtifactItem=({artifact})=>{const pref=react.useContext(preferences.be),url=(0,helpers.LK)(pref.apiUrl,window.location.origin),route=new URL(artifact.route,url).toString(),theme=(0,useTheme.A)();return react.createElement(Box.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around","&:hover":{borderBottom:"1px solid"},"&:focus":{borderBottom:`1px solid ${theme.palette.primary.main}`,backgroundColor:theme.palette.primary[50],color:theme.palette.primary[600]}}},react.createElement(OpenInNew.A,null),react.createElement(Link.A,{href:route,color:"secondary",underline:"none",sx:{fontSize:"14px",marginLeft:"5px","&:focus":{color:theme.palette.primary[600]}},target:"_blank"},artifact.name))};ArtifactItem.__docgenInfo={description:"",methods:[],displayName:"ArtifactItem",props:{artifact:{required:!0,tsType:{name:"signature",type:"object",raw:"{\n name: string;\n route: string;\n}",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"route",value:{name:"string",required:!0}}]}},description:"@param artifact type with the name and route properties"}}};var CircularProgress=__webpack_require__("./node_modules/@mui/material/CircularProgress/CircularProgress.js"),ListItem=__webpack_require__("./node_modules/@mui/material/ListItem/ListItem.js"),components=__webpack_require__("./src/components/index.tsx");const ArtifactList=({artifacts})=>{const{typography}=(0,useTheme.A)();return artifacts&&(artifacts=(artifact_list=>{const ordered_list=[];for(let i=0;ireact.createElement(ListItem.Ay,{key:link.name,sx:{padding:"0",marginBottom:index===artifacts.length-1?"0px":"15px",fontFamily:typography.fontFamily}},react.createElement(ArtifactItem,{artifact:link}))))):react.createElement(CircularProgress.A,{size:20}))};ArtifactList.__docgenInfo={description:"",methods:[],displayName:"ArtifactList",props:{artifacts:{required:!0,tsType:{name:"union",raw:"Artifact[] | never[]",elements:[{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n name: string;\n route: string;\n}",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"route",value:{name:"string",required:!0}}]}}],raw:"Artifact[]"},{name:"Array",elements:[{name:"never"}],raw:"never[]"}]},description:"@param artifacts list of artifacts"}}}},"./src/features/channels/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{h6:()=>ChannelsEdit,hY:()=>ChannelsList});var Accordion=__webpack_require__("./node_modules/@mui/material/Accordion/Accordion.js"),Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),react=__webpack_require__("./node_modules/react/index.js"),Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js");const Channel=({channelName})=>react.createElement(Box.A,{className:"box",sx:{display:"flex",alignItems:"center"}},react.createElement(Typography.A,{className:"typography",sx:{color:"#333",fontSize:"13px"}},channelName));Channel.__docgenInfo={description:"",methods:[],displayName:"Channel",props:{channelName:{required:!0,tsType:{name:"string"},description:"@param channelName name of the channel"}}};var styles=__webpack_require__("./src/styles/index.tsx"),components=__webpack_require__("./src/components/index.tsx");const ChannelsList=({channelList})=>react.createElement(Accordion.A,{sx:{maxWidth:420,boxShadow:"none"},disableGutters:!0,defaultExpanded:!0},react.createElement(styles.Ql,{expandIcon:react.createElement(components.HK,null)},react.createElement(styles.AM,{sx:{color:"primary.main"}},"Channels")),react.createElement(styles.uV,{sx:{padding:0}},channelList.map(((channel,index)=>react.createElement(Box.A,{key:channel,sx:{padding:"16px"}},react.createElement(Channel,{channelName:channel}))))));ChannelsList.__docgenInfo={description:"",methods:[],displayName:"ChannelsList",props:{channelList:{required:!0,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:"@param channelList list of channels"}}};var useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js"),AccordionDetails=__webpack_require__("./node_modules/@mui/material/AccordionDetails/AccordionDetails.js"),react_beautiful_dnd_esm=__webpack_require__("./node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js"),Close=__webpack_require__("./node_modules/@mui/icons-material/Close.js"),TextField=__webpack_require__("./node_modules/@mui/material/TextField/TextField.js");const AddChannel=({onCancel,onSubmit})=>{const[name,setName]=(0,react.useState)(""),handleSubmit=()=>{name&&(onSubmit(name),onCancel())};return react.createElement(Box.A,{sx:{marginBottom:"20px",display:"flex",alignItems:"center"}},react.createElement(TextField.A,{autoFocus:!0,label:"Enter channel",size:"small",onChange:e=>setName(e.target.value),onKeyDown:e=>{"Enter"===e.key&&handleSubmit()},onBlur:handleSubmit,sx:{marginRight:"15px",width:"207px",height:"34px"}}),react.createElement(styles.Bj,{onClick:onCancel},react.createElement(Close.default,{sx:{marginTop:"5px"}})))};AddChannel.__docgenInfo={description:"",methods:[],displayName:"AddChannel",props:{onCancel:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"@param onCancel handler that will run when close icon is clicked\n@param onSubmit handler that will run when the input looses focus or when enter key is pressed"},onSubmit:{required:!0,tsType:{name:"signature",type:"function",raw:"(channelName: string) => void",signature:{arguments:[{type:{name:"string"},name:"channelName"}],return:{name:"void"}}},description:""}}};var helpers=__webpack_require__("./src/utils/helpers/index.ts");const BaseChannelsEditItem=({channelName,onRemove,onEdit})=>{const[name,setName]=(0,react.useState)(channelName),[isEditing,setIsEditing]=(0,react.useState)(!1),{palette}=(0,useTheme.A)(),dragIcon=(0,helpers.CD)(react.createElement(components.F4,{color:"#C4C7CC"}),react.createElement(components.F4,{color:"#A8DAB5"})),boxStyles=(0,helpers.xs)({height:"100%",width:"10px",backgroundColor:"#C4C7CC",display:"inline-block",marginLeft:"-1px",borderRight:"1px solid #F1F1F1",borderLeft:"1px solid #F1F1F1"}),containerStyles=(0,helpers.xs)({height:"32px",width:"205px",backgroundColor:"#F1F1F1",border:"1px solid #BCBFC4",display:"flex",alignItems:"center"}),handleSubmit=()=>{name&&onEdit(channelName,name),setIsEditing(!1)};return react.createElement(Box.A,{sx:{display:"flex",alignItems:"center"}},react.createElement(Box.A,{sx:containerStyles},react.createElement(Box.A,{sx:boxStyles}),dragIcon,!isEditing&&react.createElement(Box.A,{onClick:()=>setIsEditing(!0),sx:{"&:hover":{cursor:"pointer"}}},react.createElement(Typography.A,{sx:{fontSize:"13px",color:palette.common.black}},channelName)),isEditing&&react.createElement(TextField.A,{autoFocus:!0,size:"small",sx:{width:"140px"},inputProps:{style:{padding:"0px 5px"}},onBlur:handleSubmit,value:name,onKeyDown:e=>{"Enter"===e.key&&handleSubmit()},onChange:e=>setName(e.target.value)})),react.createElement(styles.Bj,{sx:{marginLeft:"15px"},onClick:()=>onRemove(channelName),"data-testid":"DeleteIcon"},react.createElement(components.AE,null)))},ChannelsEditItem=(0,react.memo)(BaseChannelsEditItem);BaseChannelsEditItem.__docgenInfo={description:"",methods:[],displayName:"BaseChannelsEditItem",props:{channelName:{required:!0,tsType:{name:"string"},description:"@param channelName list of channels\n@param onRemove handler that will run when delete button is clicked\n@param onEdit handler that will run when editing is finished"},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"(channelName: string) => void",signature:{arguments:[{type:{name:"string"},name:"channelName"}],return:{name:"void"}}},description:""},onEdit:{required:!0,tsType:{name:"signature",type:"function",raw:"(channelName: string, newChannelName: string) => void",signature:{arguments:[{type:{name:"string"},name:"channelName"},{type:{name:"string"},name:"newChannelName"}],return:{name:"void"}}},description:""}}};const BaseChannelsEdit=({channelsList,updateChannels,maxWidth=420})=>{const listLength=channelsList.length,{palette}=(0,useTheme.A)(),expandedRef=(0,react.useRef)(listLength>0),[isAdding,setIsAdding]=(0,react.useState)(!1),addNewChannel=channelName=>{updateChannels([...channelsList,channelName])},removeChannel=channelName=>{updateChannels(channelsList.filter((item=>item!==channelName)))},editChannel=(channelName,newChannelName)=>{const newChannelsList=channelsList.map((channel=>channel===channelName?newChannelName:channel));updateChannels(newChannelsList)};return react.createElement(Accordion.A,{defaultExpanded:expandedRef.current,sx:{maxWidth,boxShadow:"none"},disableGutters:!0},react.createElement(styles.Ql,{expandIcon:react.createElement(components.HK,null)},react.createElement(styles.AM,{sx:{color:"primary.main"}},"Channels")),react.createElement(react_beautiful_dnd_esm.JY,{onDragEnd:result=>{if(!result.destination)return;const{destination,source}=result,reorderedArray=(0,helpers.Pj)({list:channelsList,startIndex:source.index,endIndex:destination.index});updateChannels(reorderedArray)}},react.createElement(react_beautiful_dnd_esm.gL,{droppableId:"channels-edit-list"},(provided=>react.createElement(styles.uV,{...provided.droppableProps,ref:provided.innerRef,sx:{padding:"18px 20px",paddingBottom:""+(0===listLength?"20px":"0px"),borderRadius:"0px"}},channelsList.map(((channel,index)=>react.createElement(react_beautiful_dnd_esm.sx,{key:channel,draggableId:channel,index},(provided=>react.createElement(Box.A,{...provided.draggableProps,...provided.dragHandleProps,ref:provided.innerRef,sx:{marginBottom:"20px",width:"247px"}},react.createElement(ChannelsEditItem,{onRemove:removeChannel,channelName:channel,onEdit:editChannel})))))),provided.placeholder,react.createElement(Box.A,null,isAdding&&react.createElement(AddChannel,{onSubmit:addNewChannel,onCancel:()=>setIsAdding(!1)})))))),react.createElement(AccordionDetails.A,{sx:{border:`1px solid ${palette.secondary.light}`,borderTop:"0px",borderRadius:"0px",padding:"15px 21px",display:"flex",justifyContent:"flex-start"}},react.createElement(styles.OV,{color:"secondary",variant:"contained",onClick:()=>setIsAdding(!0)},"+ Add Channel")))},compareProps=(prevProps,nextProps)=>{const isSameArray=JSON.stringify(prevProps.channelsList)===JSON.stringify(nextProps.channelsList),isSameFunc=prevProps.updateChannels===nextProps.updateChannels;return isSameArray&&isSameFunc},ChannelsEdit=(0,react.memo)(BaseChannelsEdit,compareProps);BaseChannelsEdit.__docgenInfo={description:"",methods:[],displayName:"BaseChannelsEdit",props:{channelsList:{required:!0,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:"@param channelsList list of channels\n@param updateChannels handler that will update the channels list"},updateChannels:{required:!0,tsType:{name:"signature",type:"function",raw:"(channels: string[]) => void",signature:{arguments:[{type:{name:"Array",elements:[{name:"string"}],raw:"string[]"},name:"channels"}],return:{name:"void"}}},description:""},maxWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"420",computed:!1}}}}},"./src/features/channels/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{h6:()=>components.h6,hY:()=>components.hY,BC:()=>channelsSlice,sB:()=>updateChannels});var components=__webpack_require__("./src/features/channels/components/index.tsx"),redux_toolkit_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),environmentDetails=__webpack_require__("./src/features/environmentDetails/index.tsx");const channelsSlice=(0,redux_toolkit_esm.Z0)({name:"channels",initialState:{channels:[]},reducers:{updateChannels:(state,action)=>{const channels=action.payload;state.channels=channels}},extraReducers:builder=>{builder.addMatcher(environmentDetails.yX.endpoints.getBuild.matchFulfilled,((state,{payload:{data:{specification:{spec}}}})=>{let channels=[];spec.channels?channels=spec.channels:spec.lockfile?.metadata?.channels&&(channels=spec.lockfile.metadata.channels.map((channel=>channel.url))),state.channels=channels}))}}),{updateChannels}=channelsSlice.actions},"./src/features/dependencies/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{i:()=>Dependencies});var react=__webpack_require__("./node_modules/react/index.js"),Accordion=__webpack_require__("./node_modules/@mui/material/Accordion/Accordion.js"),Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),TableContainer=__webpack_require__("./node_modules/@mui/material/TableContainer/TableContainer.js"),Table=__webpack_require__("./node_modules/@mui/material/Table/Table.js"),TableHead=__webpack_require__("./node_modules/@mui/material/TableHead/TableHead.js"),TableBody=__webpack_require__("./node_modules/@mui/material/TableBody/TableBody.js"),TableRow=__webpack_require__("./node_modules/@mui/material/TableRow/TableRow.js"),TableCell=__webpack_require__("./node_modules/@mui/material/TableCell/TableCell.js"),CircularProgress=__webpack_require__("./node_modules/@mui/material/CircularProgress/CircularProgress.js"),Tooltip=__webpack_require__("./node_modules/@mui/material/Tooltip/Tooltip.js"),InfoOutlined=__webpack_require__("./node_modules/@mui/icons-material/InfoOutlined.js"),index_es=__webpack_require__("./node_modules/react-infinite-scroll-component/dist/index.es.js"),styles=__webpack_require__("./src/styles/index.tsx"),Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js"),components=__webpack_require__("./src/components/index.tsx");const BaseDependenciesItem=({dependency,mode,isLast,handleClick,sx={}})=>{const{name,version}=dependency,isEditMode="edit"===mode;return react.createElement(react.Fragment,null,react.createElement(TableRow.A,{sx},react.createElement(TableCell.A,{sx:{fontSize:"13px",color:"#333",borderBottom:isLast?"none":void 0}},name),react.createElement(TableCell.A,{sx:{textAlign:"right",borderBottom:isLast?"none":void 0}},react.createElement(Typography.A,{sx:{color:"#333",fontSize:"13px",fontFamily:"monospace"}},version,isEditMode&&react.createElement(react.Fragment,null," ",react.createElement(Tooltip.A,{title:"Promote as requested package",placement:"right-start"},react.createElement(styles.Bj,{onClick:handleClick,"data-testid":"PromoteIcon"},react.createElement(components.JM,null))))))))},compareProps=(prevProps,nextProps)=>prevProps.dependency.id===nextProps.dependency.id,DependenciesItem=(0,react.memo)(BaseDependenciesItem,compareProps);BaseDependenciesItem.__docgenInfo={description:"",methods:[],displayName:"BaseDependenciesItem",props:{dependency:{required:!0,tsType:{name:"signature",type:"object",raw:"{\n id: number;\n channel: {\n id: number;\n name: string;\n last_update: Date | null;\n };\n build: string;\n license: string;\n sha256: string;\n name: string;\n version: string;\n summary: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"channel",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n last_update: Date | null;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"last_update",value:{name:"union",raw:"Date | null",elements:[{name:"Date"},{name:"null"}],required:!0}}]},required:!0}},{key:"build",value:{name:"string",required:!0}},{key:"license",value:{name:"string",required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"version",value:{name:"string",required:!0}},{key:"summary",value:{name:"string",required:!0}}]}},description:"@param dependency single dependency\n@param mode change whether we are only able to read this dependency or edit it\n@param handleClick click handler"},mode:{required:!0,tsType:{name:"union",raw:'"read-only" | "edit"',elements:[{name:"literal",value:'"read-only"'},{name:"literal",value:'"edit"'}]},description:""},isLast:{required:!0,tsType:{name:"boolean"},description:""},handleClick:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},sx:{required:!1,tsType:{name:"any"},description:"",defaultValue:{value:"{}",computed:!1}}}};var hooks=__webpack_require__("./src/hooks.ts"),requestedPackages=__webpack_require__("./src/features/requestedPackages/index.tsx");const Dependencies=({mode,dependencies,hasMore,next=()=>null,maxWidth=420})=>{const dispatch=(0,hooks.j)(),{selectedEnvironment}=(0,hooks.G)((state=>state.tabs)),listLength=dependencies.length,scrollRef=(0,react.useRef)(null);return(0,react.useEffect)((()=>{scrollRef.current?.scrollTo(0,0)}),[selectedEnvironment?.id]),react.createElement(Accordion.A,{sx:{maxWidth,boxShadow:"none"},disableGutters:!0,defaultExpanded:!0},react.createElement(styles.Ql,{expandIcon:react.createElement(components.HK,null)},react.createElement(styles.AM,{sx:{color:"primary.main"}},"Installed Packages"," ",react.createElement(Tooltip.A,{title:"Includes requested packages and their dependencies",tabIndex:0},react.createElement(InfoOutlined.A,{sx:{fontSize:"20px",verticalAlign:"top",color:"secondary.main"}})))),react.createElement(styles.uV,{id:"infScroll",sx:{padding:0,maxHeight:"300px"},ref:scrollRef},react.createElement(index_es.A,{hasMore,loader:react.createElement(Box.A,{sx:{display:"flex",justifyContent:"center",marginTop:"10px"}},react.createElement(CircularProgress.A,null)),dataLength:listLength,next,scrollableTarget:"infScroll",style:{overflow:"hidden"}},dependencies.length?react.createElement(TableContainer.A,null,react.createElement(Table.A,{sx:{width:"100%",tableLayout:"fixed"}},react.createElement(TableHead.A,null,react.createElement(TableRow.A,null,react.createElement(TableCell.A,{sx:{fontSize:"13px"}},"Package"),react.createElement(TableCell.A,{sx:{fontSize:"13px",textAlign:"right"}},"Installed Version"))),react.createElement(TableBody.A,null,dependencies.map(((dependency,index)=>react.createElement(DependenciesItem,{key:dependency.id,sx:{backgroundColor:index%2?"secondary.50":"transparent"},mode,dependency,handleClick:()=>dispatch((0,requestedPackages.gj)(dependency)),isLast:index===dependencies.length-1})))))):react.createElement(Box.A,{sx:{display:"flex",justifyContent:"center",padding:"10px"}},react.createElement(CircularProgress.A,{size:20})))))};Dependencies.__docgenInfo={description:"",methods:[],displayName:"Dependencies",props:{dependencies:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n channel: {\n id: number;\n name: string;\n last_update: Date | null;\n };\n build: string;\n license: string;\n sha256: string;\n name: string;\n version: string;\n summary: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"channel",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n last_update: Date | null;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"last_update",value:{name:"union",raw:"Date | null",elements:[{name:"Date"},{name:"null"}],required:!0}}]},required:!0}},{key:"build",value:{name:"string",required:!0}},{key:"license",value:{name:"string",required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"version",value:{name:"string",required:!0}},{key:"summary",value:{name:"string",required:!0}}]}}],raw:"Dependency[]"},description:"@param dependencies list of dependencies\n@param mode change whether the component only displays the list or we are able to edit it\n@param hasMore needed for infinite scroll, if this is true next function will be called\n@param next handler which will be called when we scoll at the current bottom of the infinite scroll lists"},mode:{required:!0,tsType:{name:"union",raw:'"read-only" | "edit"',elements:[{name:"literal",value:'"read-only"'},{name:"literal",value:'"edit"'}]},description:""},hasMore:{required:!0,tsType:{name:"boolean"},description:""},next:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"() => null",computed:!1}},maxWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"420",computed:!1}}}}},"./src/features/dependencies/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{im:()=>components.i,Ac:()=>dependenciesApiSlice,iv:()=>dependenciesSlice,EC:()=>pageChanged,vm:()=>useGetBuildPackagesQuery,n9:()=>useLazyGetBuildPackagesQuery});var components=__webpack_require__("./src/features/dependencies/components/index.tsx");const dependenciesApiSlice=__webpack_require__("./src/features/api/index.ts").l.injectEndpoints({endpoints:builder=>({getBuildPackages:builder.query({query:dto=>`/api/v1/build/${dto.buildId}/packages/?page=${dto.page}&size=${dto.size}`,keepUnusedDataFor:0})})}),{useGetBuildPackagesQuery,useLazyGetBuildPackagesQuery}=dependenciesApiSlice;var redux_toolkit_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),tabs=__webpack_require__("./src/features/tabs/index.tsx");const dependenciesSlice=(0,redux_toolkit_esm.Z0)({name:"dependencies",initialState:{dependencies:[],page:1,count:0,size:0},reducers:{updateDependencies:(state,action)=>{const dependencies=action.payload;state.dependencies=dependencies},pageChanged:(state,action)=>{state.page=action.payload}},extraReducers:builder=>{builder.addCase(tabs.K2.type,(state=>{state.page=1})),builder.addMatcher(dependenciesApiSlice.endpoints.getBuildPackages.matchFulfilled,((state,{payload:{data,size,count,page}})=>{1===page?state.dependencies=data:state.dependencies.push(...data),state.size=size,state.count=count}))}}),{pageChanged,updateDependencies}=dependenciesSlice.actions},"./src/features/environmentDetails/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{C6:()=>EnvironmentDetailsModes,yX:()=>environmentDetailsApiSlice,Or:()=>environmentDetailsSlice,eD:()=>modeChanged,Lw:()=>useCreateOrUpdateMutation,BB:()=>useDeleteEnvironmentMutation,bj:()=>useUpdateBuildIdMutation});var redux_toolkit_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),api=__webpack_require__("./src/features/api/index.ts");const environmentDetailsApiSlice=api.l.injectEndpoints({endpoints:builder=>({getBuild:builder.query({query:buildId=>`/api/v1/build/${buildId}/`,keepUnusedDataFor:0}),createOrUpdate:builder.mutation({query:code=>({url:"/api/v1/specification/",method:"POST",body:code})}),updateBuildId:builder.mutation({query:({namespace,environment,buildId})=>({url:`/api/v1/environment/${namespace}/${environment}/`,method:"PUT",body:{build_id:buildId}})}),deleteEnvironment:builder.mutation({query:({namespace,environment})=>({url:`/api/v1/environment/${namespace}/${environment}/`,method:"DELETE"})})})}),{useGetBuildQuery,useCreateOrUpdateMutation,useUpdateBuildIdMutation,useDeleteEnvironmentMutation}=environmentDetailsApiSlice;var EnvironmentDetailsModes;!function(EnvironmentDetailsModes){EnvironmentDetailsModes.CREATE="create",EnvironmentDetailsModes.READ="read-only",EnvironmentDetailsModes.EDIT="edit"}(EnvironmentDetailsModes||(EnvironmentDetailsModes={}));const environmentDetailsSlice=(0,redux_toolkit_esm.Z0)({name:"environmentDetails",initialState:{mode:"read-only",name:"",prefix:null,isFromLockfile:null},reducers:{modeChanged:(state,action)=>{state.mode=action.payload}},extraReducers:builder=>{builder.addMatcher(environmentDetailsApiSlice.endpoints.getBuild.matchFulfilled,((state,{payload:{data:{specification:{spec:{name,prefix,lockfile}}}}})=>{state.name=name,state.prefix=prefix,state.isFromLockfile=Boolean(lockfile)}))}}),{modeChanged}=environmentDetailsSlice.actions;var react=__webpack_require__("./node_modules/react/index.js"),dist=__webpack_require__("./node_modules/mui-file-dropzone/dist/index.js"),Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),Button=__webpack_require__("./node_modules/@mui/material/Button/Button.js"),Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js"),CodeOutlined=__webpack_require__("./node_modules/@mui/icons-material/CodeOutlined.js"),lodash=__webpack_require__("./node_modules/lodash/lodash.js"),browser=__webpack_require__("./node_modules/yaml/browser/index.js"),components=__webpack_require__("./src/components/index.tsx"),features_channels=__webpack_require__("./src/features/channels/index.tsx"),features_environmentVariables=__webpack_require__("./src/features/environmentVariables/index.tsx"),features_dependencies=__webpack_require__("./src/features/dependencies/index.tsx"),features_requestedPackages=__webpack_require__("./src/features/requestedPackages/index.tsx"),language_dist=__webpack_require__("./node_modules/@codemirror/language/dist/index.js"),yaml=__webpack_require__("./node_modules/@codemirror/legacy-modes/mode/yaml.js"),Alert=__webpack_require__("./node_modules/@mui/material/Alert/Alert.js"),esm=__webpack_require__("./node_modules/@uiw/react-codemirror/esm/index.js"),codemirror_themes_esm=__webpack_require__("./node_modules/@uiw/codemirror-themes/esm/index.js"),highlight_dist=__webpack_require__("./node_modules/@lezer/highlight/dist/index.js");const greenAccentTheme=(0,codemirror_themes_esm.A)({theme:"light",settings:{background:"#ffffff",foreground:"#0A3069",caret:"#cf080c",selection:"#F1F1F1",selectionMatch:"#F1F1F1",lineHighlight:"#8a91991a",gutterBackground:"#fff",gutterForeground:"#57606A",gutterBorder:"transparent"},styles:[{tag:highlight_dist._A.keyword,color:"#116329"}]});var preferences=__webpack_require__("./src/preferences.tsx"),styles=__webpack_require__("./src/styles/index.tsx"),Link=__webpack_require__("./node_modules/@mui/material/Link/Link.js");const CodeEditor=({code,onChangeEditor})=>{const isGrayscaleStyleType="grayscale"===react.useContext(preferences.be).styleType,[isError,setIsError]=(0,react.useState)(!1);return react.createElement(react.Fragment,null,isError&&react.createElement(Alert.A,{severity:"error",sx:{mb:"20px"}},"You have an error in your yaml syntax"),react.createElement(esm.Ay,{value:code,height:"200px",theme:isGrayscaleStyleType?void 0:greenAccentTheme,extensions:[language_dist.Tg.define(yaml.o)],onChange:e=>(e=>{try{setIsError(!1),onChangeEditor((0,browser.qg)(e))}catch(e){setIsError(!0)}})(e)}),react.createElement(Box.A,{sx:{mb:"20px"}},react.createElement(styles.SW,null,react.createElement(Typography.A,{sx:{fontSize:"12px"}},"We currently only support the"," ",react.createElement(Link.A,{href:"https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-file-manually",target:"_blank",rel:"noreferrer"},"Conda environment.yml")," ","format. Other environment specification file formats are not supported."))))};CodeEditor.__docgenInfo={description:"",methods:[],displayName:"CodeEditor",props:{code:{required:!0,tsType:{name:"any"},description:""},onChangeEditor:{required:!0,tsType:{name:"signature",type:"function",raw:"(code: {\n channels: string[];\n dependencies: string[];\n variables: Record;\n}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{\n channels: string[];\n dependencies: string[];\n variables: Record;\n}",signature:{properties:[{key:"channels",value:{name:"Array",elements:[{name:"string"}],raw:"string[]",required:!0}},{key:"dependencies",value:{name:"Array",elements:[{name:"string"}],raw:"string[]",required:!0}},{key:"variables",value:{name:"Record",elements:[{name:"string"},{name:"string"}],raw:"Record",required:!0}}]}},name:"code"}],return:{name:"void"}}},description:""}}};var hooks=__webpack_require__("./src/hooks.ts");const LockfileSupportInfo=()=>react.createElement(Typography.A,{sx:{fontSize:"12px"}},"We currently only support the"," ",react.createElement("a",{href:"https://conda.github.io/conda-lock/",target:"_blank",rel:"noreferrer"},"Conda lockfile")," ","format. Other lockfile formats such as Poetry are not supported."),components_LockfileSupportInfo=LockfileSupportInfo;LockfileSupportInfo.__docgenInfo={description:"",methods:[],displayName:"LockfileSupportInfo"};const SpecificationEdit=({descriptionUpdated,defaultEnvVersIsChanged,onSpecificationIsChanged,onDefaultEnvIsChanged,onUpdateEnvironment,onShowDialogAlert,isFromLockfile})=>{const{channels}=(0,hooks.G)((state=>state.channels)),{requestedPackages}=(0,hooks.G)((state=>state.requestedPackages)),{environmentVariables}=(0,hooks.G)((state=>state.environmentVariables)),{dependencies,size,count,page}=(0,hooks.G)((state=>state.dependencies)),hasMore=size*page<=count,dispatch=(0,hooks.j)(),[show,setShow]=(0,react.useState)(!1),[code,setCode]=(0,react.useState)({dependencies:requestedPackages,variables:environmentVariables,channels}),[envIsUpdated,setEnvIsUpdated]=(0,react.useState)(!1),initialChannels=(0,react.useRef)((0,lodash.cloneDeep)(channels)),initialPackages=(0,react.useRef)((0,lodash.cloneDeep)(requestedPackages)),initialEnvironmentVariables=(0,react.useRef)((0,lodash.cloneDeep)(environmentVariables)),stringifiedInitialChannels=(0,react.useMemo)((()=>JSON.stringify(initialChannels.current)),[initialChannels.current]),stringifiedInitialPackages=(0,react.useMemo)((()=>JSON.stringify(initialPackages.current)),[initialPackages.current]),stringifiedInitialEnvironmentVariables=(0,react.useMemo)((()=>JSON.stringify(initialEnvironmentVariables.current)),[initialEnvironmentVariables.current]),onUpdateChannels=(0,react.useCallback)((channels=>{dispatch((0,features_channels.sB)(channels)),onDefaultEnvIsChanged(!1)}),[]),onUpdateDefaultEnvironment=isChanged=>{onDefaultEnvIsChanged(isChanged),onSpecificationIsChanged(!isChanged)},onUpdateEditor=(0,lodash.debounce)((({channels,dependencies,variables})=>{const code={dependencies,channels,variables},isDifferentChannels=JSON.stringify(code.channels)!==stringifiedInitialChannels,isDifferentPackages=JSON.stringify(code.dependencies)!==stringifiedInitialPackages,isDifferentEnvironmentVariables=JSON.stringify(code.variables)!==stringifiedInitialEnvironmentVariables;channels&&0!==channels.length||(code.channels=[]),dependencies&&0!==dependencies.length||(code.dependencies=[]),variables&&0!==Object.keys(variables).length||(code.variables={}),(isDifferentChannels||isDifferentPackages||isDifferentEnvironmentVariables)&&(setEnvIsUpdated(!0),onUpdateDefaultEnvironment(!1),onSpecificationIsChanged(!0)),setCode(code)}),200);(0,react.useEffect)((()=>{descriptionUpdated&&setEnvIsUpdated(!0);const isDifferentChannels=JSON.stringify(channels)!==stringifiedInitialChannels,isDifferentPackages=JSON.stringify(requestedPackages)!==stringifiedInitialPackages,isDifferentEnvironmentVariables=JSON.stringify(environmentVariables)!==stringifiedInitialEnvironmentVariables;defaultEnvVersIsChanged?setEnvIsUpdated(!1):(isDifferentChannels||isDifferentPackages||isDifferentEnvironmentVariables)&&setEnvIsUpdated(!0)}),[channels,requestedPackages,environmentVariables,descriptionUpdated]);const[mode,setMode]=react.useState(isFromLockfile?1:0),[showDialog,setShowDialog]=react.useState(!1),[files,setFiles]=react.useState([]);return react.createElement(Box.A,null,0===mode?react.createElement(components.Kl,{title:"Specification",onToggleEditMode:value=>{show?(dispatch((0,features_requestedPackages.$R)(code.dependencies)),dispatch((0,features_channels.sB)(code.channels)),dispatch((0,features_environmentVariables.E)(code.variables))):setCode({dependencies:requestedPackages,variables:environmentVariables,channels}),setShow(value)},isEditMode:show,setShowDialog},react.createElement(Box.A,null,show?react.createElement(CodeEditor,{code:(0,browser.As)({channels,dependencies:requestedPackages,variables:environmentVariables}),onChangeEditor:onUpdateEditor}):react.createElement(react.Fragment,null,react.createElement(Box.A,{sx:{marginBottom:"30px"}},react.createElement(features_requestedPackages.gC,{packageList:requestedPackages,onDefaultEnvIsChanged:onUpdateDefaultEnvironment})),!isFromLockfile&&react.createElement(Box.A,{sx:{marginBottom:"30px"}},react.createElement(features_dependencies.im,{mode:"edit",dependencies,hasMore,next:()=>dispatch((0,features_dependencies.EC)(page+1)),maxWidth:500})),react.createElement(Box.A,{sx:{marginBottom:"30px"}},react.createElement(features_channels.h6,{channelsList:channels,updateChannels:onUpdateChannels,maxWidth:500}))))):react.createElement(Box.A,{sx:{border:"1px solid #E0E0E0",paddingBottom:"15px"}},react.createElement(Box.A,{sx:{padding:"10px 15px",borderBottom:"1px solid #E0E0E0"}},react.createElement(Box.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"}},react.createElement(Typography.A,{"data-testid":"block-container-title",sx:{fontSize:"14px",fontWeight:600,color:"#333"}},"Conda Lockfile Upload"),react.createElement(Button.A,{variant:"outlined",color:"secondary",size:"small",startIcon:react.createElement(CodeOutlined.A,null),onClick:()=>setShowDialog(!0)},"Switch to Specification"))),react.createElement(Box.A,{sx:{padding:"15px 15px 0 15px"}},react.createElement(dist.DropzoneArea,{fileObjects:files,onChange:async files=>setFiles(files),filesLimit:1,showPreviews:!0,showPreviewsInDropzone:!1,showFileNamesInPreview:!0,previewText:""}),react.createElement(Box.A,null,react.createElement(components_LockfileSupportInfo,null)))),react.createElement(components.Lt,{title:"Switch to "+(0===mode?"Conda Lockfile Upload":"Specification"),description:`If you switch to ${0===mode?"Conda Lockfile Upload":"Specification"}, you ${0===mode?"may":"will"} lose your work in this section of the form.`,isOpen:showDialog,closeAction:()=>setShowDialog(!1),confirmAction:()=>{setMode(0===mode?1:0),setShowDialog(!1)},confirmText:"Continue"}),react.createElement(Box.A,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"flex-end",gap:"30px",marginTop:"45px",marginBottom:"10px"}},react.createElement(Typography.A,{sx:{fontSize:"13px",color:"#333",textDecoration:"underline",cursor:"pointer"},onClick:()=>onShowDialogAlert(!0)},"Delete environment"),react.createElement(styles.OV,{color:"primary",sx:{padding:"5px 48px"},onClick:()=>{setEnvIsUpdated(!1),onSpecificationIsChanged(!1),dispatch(modeChanged(EnvironmentDetailsModes.READ)),dispatch((0,features_requestedPackages.$R)(initialPackages.current)),dispatch((0,features_channels.sB)(initialChannels.current)),dispatch((0,features_environmentVariables.E)(initialEnvironmentVariables.current))}},"Cancel"),react.createElement(styles.OV,{color:"primary",sx:{padding:"5px 48px"},onClick:async()=>{if(0===mode){onUpdateEnvironment(show?code:{dependencies:requestedPackages,variables:environmentVariables,channels})}else if(files.length){const text=await files[0].text();onUpdateEnvironment(text)}},disabled:0===mode?!envIsUpdated:!files?.length},"Save")))};SpecificationEdit.__docgenInfo={description:"",methods:[],displayName:"SpecificationEdit",props:{descriptionUpdated:{required:!0,tsType:{name:"boolean"},description:""},defaultEnvVersIsChanged:{required:!0,tsType:{name:"boolean"},description:""},onSpecificationIsChanged:{required:!0,tsType:{name:"signature",type:"function",raw:"(specificationIsChanged: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"specificationIsChanged"}],return:{name:"void"}}},description:""},onDefaultEnvIsChanged:{required:!0,tsType:{name:"signature",type:"function",raw:"(defaultEnvVersIsChanged: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"defaultEnvVersIsChanged"}],return:{name:"void"}}},description:""},onUpdateEnvironment:{required:!0,tsType:{name:"signature",type:"function",raw:"(specification: any) => void",signature:{arguments:[{type:{name:"any"},name:"specification"}],return:{name:"void"}}},description:""},onShowDialogAlert:{required:!0,tsType:{name:"signature",type:"function",raw:"(showDialog: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"showDialog"}],return:{name:"void"}}},description:""},isFromLockfile:{required:!0,tsType:{name:"boolean"},description:""}}};var artifacts_components=__webpack_require__("./src/features/artifacts/components/index.tsx");const artifactsApiSlice=api.l.injectEndpoints({endpoints:builder=>({getArtifacts:builder.query({query:buildId=>`/api/v1/build/${buildId}/`,transformResponse:response=>response.data.build_artifacts.map((artifact=>artifact.artifact_type))})})}),{useLazyGetArtifactsQuery}=artifactsApiSlice,SpecificationReadOnly=({isFromLockfile,lockfileUrl})=>{const{requestedPackages}=(0,hooks.G)((state=>state.requestedPackages)),{channels}=(0,hooks.G)((state=>state.channels)),{dependencies,size,count,page}=(0,hooks.G)((state=>state.dependencies)),dispatch=(0,hooks.j)(),hasMore=size*page<=count;return react.createElement(components.ZO,{title:isFromLockfile?"Conda Lockfile":"Specification"},!isFromLockfile&&react.createElement(Box.A,{sx:{marginBottom:"30px"}},react.createElement(features_requestedPackages.ft,{packageList:requestedPackages})),react.createElement(Box.A,{sx:{marginBottom:"30px"}},isFromLockfile&&lockfileUrl&&react.createElement(Box.A,{sx:{display:"flex",fontFamily:"fontFamily",marginBottom:"30px"}},react.createElement(artifacts_components.W,{artifact:{name:"Show .conda-lock.yml file",route:lockfileUrl}})),react.createElement(features_dependencies.im,{mode:"read-only",dependencies,hasMore,next:()=>dispatch((0,features_dependencies.EC)(page+1))})),react.createElement(Box.A,{sx:{marginBottom:"30px"}},react.createElement(features_channels.hY,{channelList:channels})))};SpecificationReadOnly.__docgenInfo={description:"",methods:[],displayName:"SpecificationReadOnly",props:{isFromLockfile:{required:!1,tsType:{name:"boolean"},description:""},lockfileUrl:{required:!1,tsType:{name:"string"},description:""}}};var rtk_query_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/query/rtk-query.esm.js"),react_router_dist=__webpack_require__("./node_modules/react-router/dist/index.js"),parseArtifactList=__webpack_require__("./src/utils/helpers/parseArtifactList.ts"),TextField=__webpack_require__("./node_modules/@mui/material/TextField/TextField.js"),useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js");const EnvironmentDetailsHeader=({envName="",namespace,onUpdateName,showEditButton=!0})=>{const{mode}=(0,hooks.G)((state=>state.environmentDetails)),dispatch=(0,hooks.j)(),{palette}=(0,useTheme.A)();return react.createElement(Box.A,{sx:{display:"flex",alignItems:"center",justifyContent:mode===EnvironmentDetailsModes.CREATE?"start":"space-between",marginBottom:"15px"}},(mode===EnvironmentDetailsModes.READ||mode===EnvironmentDetailsModes.EDIT)&&react.createElement(react.Fragment,null,react.createElement(Typography.A,{sx:{fontSize:"16px",color:palette.common.black,fontWeight:600}},envName),mode===EnvironmentDetailsModes.READ&&react.createElement(styles.OV,{color:"primary",disabled:!showEditButton,onClick:()=>dispatch(modeChanged(EnvironmentDetailsModes.EDIT))},"Edit")),mode===EnvironmentDetailsModes.CREATE&&react.createElement(react.Fragment,null,namespace&&react.createElement(react.Fragment,null,react.createElement(TextField.A,{label:"Namespace",value:namespace,disabled:!0,size:"small"}),react.createElement("div",{"aria-hidden":!0,style:{borderRight:`2px solid ${palette.secondary.main}`,transform:"skew(-15deg)",margin:"0 1rem",height:"1.6rem"}})),react.createElement(TextField.A,{autoFocus:!0,label:"Environment name",sx:{backgroundColor:palette.grey[100],minWidth:"450px","&:hover fieldset":{borderColor:palette.secondary.main}},inputProps:{style:{color:palette.common.black}},size:"small",onChange:e=>onUpdateName(e.target.value)})))};EnvironmentDetailsHeader.__docgenInfo={description:"",methods:[],displayName:"EnvironmentDetailsHeader",props:{envName:{required:!1,tsType:{name:"string"},description:"@param envName name of the selected environment\n@param namespace namespace of the environment\n@param onUpdateName change environment name",defaultValue:{value:'""',computed:!1}},namespace:{required:!1,tsType:{name:"string"},description:""},showEditButton:{required:!1,tsType:{name:"union",raw:"boolean | undefined",elements:[{name:"boolean"},{name:"undefined"}]},description:"",defaultValue:{value:"true",computed:!1}},onUpdateName:{required:!0,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""}}};var tabs=__webpack_require__("./src/features/tabs/index.tsx"),metadata=__webpack_require__("./src/features/metadata/index.tsx"),artifact=__webpack_require__("./src/utils/helpers/artifact.ts");function createLabel(name,type){return{create:`The environment ${name} is being created`,update:`The environment ${name} has been updated`,updateBuild:`The environment ${name} has been updated with the selected build`,delete:`The environment ${name} has been deleted`,error:"An error occurred while processing your request",confirm:`Are you sure you want to delete the environment: ${name}?`}[type]}var Dialog=__webpack_require__("./src/components/Dialog.tsx"),helpers=__webpack_require__("./src/utils/helpers/index.ts"),notificationSlice=__webpack_require__("./src/features/notification/notificationSlice.ts");__webpack_require__("./src/features/environments/components/index.tsx"),__webpack_require__("./src/features/environments/environmentsApiSlice.ts");(()=>{const dispatch=(0,hooks.j)(),{namespaceName,environmentName}=(0,react_router_dist.g)(),namespace=(0,hooks.G)((state=>state.namespaces.data)).find((({name})=>name===namespaceName)),environment=(0,hooks.G)((state=>state.environments.data)).find((environment=>environment.namespace.name===namespaceName&&environment.name===environmentName));(0,react.useEffect)((()=>{namespace&&environment&&(dispatch((0,tabs.tj)({environment,canUpdate:namespace.canUpdate})),dispatch(modeChanged(EnvironmentDetailsModes.READ)),dispatch((0,tabs.Ho)(!1)))}),[namespace&&namespace.name,environment&&environment.name]);const navigate=(0,react_router_dist.Zp)(),{mode}=(0,hooks.G)((state=>state.environmentDetails)),{page,dependencies}=(0,hooks.G)((state=>state.dependencies)),{selectedEnvironment}=(0,hooks.G)((state=>state.tabs)),{currentBuild}=(0,hooks.G)((state=>state.enviroments)),{isFromLockfile}=(0,hooks.G)((state=>state.environmentDetails)),[name,setName]=(0,react.useState)(selectedEnvironment?.name||""),scrollRef=function useScrollRef(){return(0,react_router_dist.KC)()}(),[descriptionIsUpdated,setDescriptionIsUpdated]=(0,react.useState)(!1),[description,setDescription]=(0,react.useState)(selectedEnvironment?selectedEnvironment.description:void 0),[currentBuildId,setCurrentBuildId]=(0,react.useState)(selectedEnvironment?.current_build_id),[artifactType,setArtifactType]=(0,react.useState)([]),[showDialog,setShowDialog]=(0,react.useState)(!1),[defaultEnvVersIsChanged,setDefaultEnvVersIsChanged]=(0,react.useState)(!1),[specificationIsChanged,setSpecificationIsChanged]=(0,react.useState)(!1),[error,setError]=(0,react.useState)({message:"",visible:!1}),[triggerQuery]=useLazyGetArtifactsQuery(),[triggerBuildPackages]=(0,features_dependencies.n9)(),[createOrUpdate]=useCreateOrUpdateMutation(),[updateBuildId]=useUpdateBuildIdMutation(),[deleteEnvironment]=useDeleteEnvironmentMutation();(0,metadata.Wc)(selectedEnvironment??rtk_query_esm.hT,{pollingInterval:5e3});const{isFetching}=useGetBuildQuery(currentBuildId,{skip:!currentBuildId});(0,features_dependencies.vm)({buildId:currentBuildId,page,size:100},{skip:isFetching||!currentBuildId});const updateDefaultEnvironmentVersion=isChanged=>{setDefaultEnvVersIsChanged(isChanged)};(0,react.useEffect)((()=>{setName(selectedEnvironment?.name||""),setDescription(selectedEnvironment?.description||""),setCurrentBuildId(selectedEnvironment?.current_build_id),setError({message:"",visible:!1}),setDescriptionIsUpdated(!1),setArtifactType([])}),[selectedEnvironment]),(0,react.useEffect)((()=>{currentBuild.id&&(setCurrentBuildId(currentBuild.id),setArtifactType([]))}),[currentBuild]);return(0,helpers.$$)((async()=>{(async()=>{(async()=>{if(!currentBuildId||artifactType.includes("DOCKER_MANIFEST"))return;const{data}=await triggerQuery(currentBuildId),apiArtifactTypes=(0,parseArtifactList.n)(data);setArtifactType(apiArtifactTypes)})(),(async()=>{currentBuildId&&!dependencies.length&&await triggerBuildPackages({buildId:currentBuildId,page,size:100})})()})()}),5e3),selectedEnvironment?react.createElement(Box.A,{sx:{padding:"15px 12px"}},react.createElement(EnvironmentDetailsHeader,{envName:name,namespace:namespace?.name,onUpdateName:setName,showEditButton:selectedEnvironment?.canUpdate}),error.visible&&react.createElement(Alert.A,{severity:"error",sx:{mb:"20px"}},error.message),react.createElement(Box.A,{sx:{marginBottom:"30px"}},react.createElement(metadata.fn,{mode,currentBuildId:selectedEnvironment?.current_build_id,selectedBuildId:currentBuildId,description,specificationIsChanged,onDefaultEnvIsChanged:updateDefaultEnvironmentVersion,onUpdateDescription:description=>{setDescription(description),setDescriptionIsUpdated(!0)},onUpdateBuildId:async buildId=>{if(selectedEnvironment)try{await updateBuildId({namespace:selectedEnvironment.namespace.name,environment:selectedEnvironment.name,buildId}).unwrap(),dispatch((0,tabs.ww)(buildId)),dispatch((0,notificationSlice.Ds)(createLabel(selectedEnvironment.name,"updateBuild")))}catch(e){setError({message:createLabel(void 0,"error"),visible:!0})}}})),react.createElement(Box.A,{sx:{marginBottom:"30px"}},"read-only"===mode&&react.createElement(SpecificationReadOnly,{isFromLockfile:Boolean(isFromLockfile),lockfileUrl:`api/v1/build/${currentBuildId}/lockfile`}),"edit"===mode&&!isFetching&&react.createElement(SpecificationEdit,{descriptionUpdated:descriptionIsUpdated,defaultEnvVersIsChanged,onSpecificationIsChanged:isChanged=>{setSpecificationIsChanged(isChanged)},onDefaultEnvIsChanged:updateDefaultEnvironmentVersion,onUpdateEnvironment:async code=>{if(!selectedEnvironment)return;const namespace=selectedEnvironment.namespace.name,environment=selectedEnvironment.name;let environmentInfo;environmentInfo="string"==typeof code?{namespace,specification:code,environment_name:environment,environment_description:description,is_lockfile:!0}:{specification:`${(0,browser.As)(code)}\ndescription: ${description}\nname: ${environment}\nprefix: null`,namespace};try{const{data}=await createOrUpdate(environmentInfo).unwrap();dispatch(modeChanged(EnvironmentDetailsModes.READ)),setCurrentBuildId(data.build_id),dispatch((0,metadata.rP)(data.build_id)),dispatch((0,notificationSlice.Ds)(createLabel(environment,"update")))}catch(e){setError({message:e?.data?.message??e.error??e.status??createLabel(void 0,"error"),visible:!0})}scrollRef.current?.scrollTo(0,0)},onShowDialogAlert:showDialog=>setShowDialog(showDialog),isFromLockfile:Boolean(isFromLockfile),key:currentBuildId})),"read-only"===mode&&react.createElement(Box.A,null,react.createElement(artifacts_components.V,{artifacts:(0,artifact.A)(currentBuildId,artifactType)})),selectedEnvironment&&react.createElement(Dialog.L,{title:"Delete Environment",description:createLabel(selectedEnvironment.name,"confirm"),isOpen:showDialog,closeAction:()=>setShowDialog(!1),confirmAction:async()=>{if(selectedEnvironment){try{await deleteEnvironment({namespace:selectedEnvironment.namespace.name,environment:selectedEnvironment.name}).unwrap(),dispatch(modeChanged(EnvironmentDetailsModes.READ)),dispatch((0,tabs.yF)({envId:selectedEnvironment.id,selectedEnvironmentId:selectedEnvironment.id})),dispatch((0,notificationSlice.Ds)(createLabel(selectedEnvironment.name,"delete"))),navigate("/")}catch(e){setError({message:createLabel(void 0,"error"),visible:!0})}scrollRef.current?.scrollTo(0,0),setShowDialog(!1)}}})):null}).__docgenInfo={description:"",methods:[],displayName:"EnvironmentDetails"}},"./src/features/environmentVariables/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{l:()=>environmentVariablesSlice,E:()=>updateEnvironmentVariables});var redux_toolkit_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),environmentDetails=__webpack_require__("./src/features/environmentDetails/index.tsx");const environmentVariablesSlice=(0,redux_toolkit_esm.Z0)({name:"environmentVariables",initialState:{environmentVariables:{}},reducers:{updateEnvironmentVariables:(state,action)=>{const environmentVariables=action.payload;state.environmentVariables=environmentVariables}},extraReducers:builder=>{builder.addMatcher(environmentDetails.yX.endpoints.getBuild.matchFulfilled,((state,{payload:{data:{specification:{spec}}}})=>{const environmentVariables=spec?.variables??[];state.environmentVariables=environmentVariables}))}}),{updateEnvironmentVariables}=environmentVariablesSlice.actions},"./src/features/environments/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{B5:()=>Environments});var react=__webpack_require__("./node_modules/react/index.js"),Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js"),Link=__webpack_require__("./node_modules/@mui/material/Link/Link.js"),useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js"),CircularProgress=__webpack_require__("./node_modules/@mui/material/CircularProgress/CircularProgress.js"),index_es=__webpack_require__("./node_modules/react-infinite-scroll-component/dist/index.es.js"),styles=__webpack_require__("./src/styles/index.tsx");const PERMISSIONS_environmentUpdate="environment::update",PERMISSIONS_namespaceCreate="namespace::create",isNamespaceListed=(list,primaryNamespace)=>!("default"!==primaryNamespace.name&&!list.some((item=>item.name===primaryNamespace.name))),checkMyPrimaryNamespace=(list,primaryNamespace)=>list.map((item=>item.name===primaryNamespace.name?{...item,isPrimary:"default"!==primaryNamespace.name,canUpdate:!0,canCreate:!0}:item));var components=__webpack_require__("./src/components/index.tsx"),dist=__webpack_require__("./node_modules/react-router-dom/dist/index.js"),Accordion=__webpack_require__("./node_modules/@mui/material/Accordion/Accordion.js"),Add=__webpack_require__("./node_modules/@mui/icons-material/Add.js"),Tooltip=__webpack_require__("./node_modules/@mui/material/Tooltip/Tooltip.js"),AccordionDetails=__webpack_require__("./node_modules/@mui/material/AccordionDetails/AccordionDetails.js"),List=__webpack_require__("./node_modules/@mui/material/List/List.js"),ListItem=__webpack_require__("./node_modules/@mui/material/ListItem/ListItem.js"),Circle=__webpack_require__("./node_modules/@mui/icons-material/Circle.js"),ListItemIcon=__webpack_require__("./node_modules/@mui/material/ListItemIcon/ListItemIcon.js"),Button=__webpack_require__("./node_modules/@mui/material/Button/Button.js");const Environment=({environment,selectedEnvironmentId})=>{const isSelected=selectedEnvironmentId===environment.id,theme=(0,useTheme.A)();return react.createElement(react.Fragment,null,react.createElement(ListItemIcon.A,{sx:{width:"5px",minWidth:"auto",marginRight:"12px"}},react.createElement(Circle.A,{sx:{width:"5px",height:"5px",color:isSelected?theme.palette.primary.main:theme.palette.common.black}})),react.createElement(Button.A,{component:dist.N_,to:`/${environment.namespace.name}/${environment.name}`,sx:{color:isSelected?theme.palette.primary.main:theme.palette.common.black,backgroundColor:isSelected?theme.palette.primary[50]:"none",borderRadius:"0px",padding:"0px",minWidth:"auto",textTransform:"none",fontSize:"13px",fontWeight:isSelected?600:400,textDecoration:isSelected?"underline":"none",textUnderlineOffset:"0.3em",":hover":{boxShadow:"none",textDecoration:"underline",textUnderlineOffset:"0.3em"}}},environment.name))};Environment.__docgenInfo={description:"",methods:[],displayName:"Environment",props:{environment:{required:!0,tsType:{name:"signature",type:"object",raw:"{\n id: number;\n namespace: { id: number; name: string };\n name: string;\n current_build_id: number;\n current_build: number | null;\n description: string;\n canUpdate?: boolean;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"namespace",value:{name:"signature",type:"object",raw:"{ id: number; name: string }",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}}]},required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"current_build_id",value:{name:"number",required:!0}},{key:"current_build",value:{name:"union",raw:"number | null",elements:[{name:"number"},{name:"null"}],required:!0}},{key:"description",value:{name:"string",required:!0}},{key:"canUpdate",value:{name:"boolean",required:!1}}]}},description:"@param environment environment\n@param onClick click handler\n@param selectedEnvironmentId id of the currently selected environment"},selectedEnvironmentId:{required:!0,tsType:{name:"union",raw:"number | undefined",elements:[{name:"number"},{name:"undefined"}]},description:""}}};var hooks=__webpack_require__("./src/hooks.ts");const EnvironmentDropdown=({data:{namespace,environments,canCreate,canUpdate}})=>{const{selectedEnvironment}=(0,hooks.G)((state=>state.tabs)),[isExpanded,setIsExpanded]=(0,react.useState)(!1),{palette}=(0,useTheme.A)();return react.createElement(Accordion.A,{sx:{border:"none",position:"initial",backgroundColor:"transparent"},elevation:0,expanded:isExpanded,disableGutters:!0,onChange:()=>setIsExpanded(!isExpanded)},react.createElement(styles.Ql,{sx:{flexDirection:"row-reverse",border:"none",paddingRight:"1px"},expandIcon:react.createElement(components.HK,null)},react.createElement(Box.A,{sx:{width:"100%",marginLeft:"15px",display:"flex",alignItems:"center",justifyContent:"space-between"}},react.createElement(Typography.A,{sx:{fontWeight:600,fontSize:"14px",color:palette.common.black}},namespace),react.createElement(Tooltip.A,{title:canCreate?`Create a new environment in the ${namespace} namespace`:`You do not have permission to create an environment in the ${namespace} namespace`},react.createElement(styles.Bj,{component:dist.N_,to:`/${namespace}/new-environment`,style:{textTransform:"none",paddingRight:"0.4rem"},onClick:event=>{canCreate?isExpanded&&event.stopPropagation():(event.preventDefault(),event.stopPropagation())},"aria-disabled":!canCreate},react.createElement(Add.A,null)," New")))),react.createElement(AccordionDetails.A,{sx:{paddingLeft:"30px",paddingTop:"5px",paddingBottom:"0px"}},react.createElement(List.A,{sx:{padding:"0px"}},environments.map((environment=>react.createElement(ListItem.Ay,{key:environment.id,disablePadding:!0,sx:{marginBottom:"20px"}},react.createElement(Environment,{environment,selectedEnvironmentId:selectedEnvironment?.id})))))))};EnvironmentDropdown.__docgenInfo={description:"",methods:[],displayName:"EnvironmentDropdown",props:{data:{required:!0,tsType:{name:"INamespaceEnvironments"},description:"@param data object containing the namespace information and the list of environments that belong to it"}}};const EnvironmentsList=({environmentsList,namespacesList,hasMore,next,search})=>{const scrollRef=(0,react.useRef)(null),{palette}=(0,useTheme.A)(),{primaryNamespace,sharedNamespaces}=(0,react.useMemo)((()=>{const envsGroupedByNamespace=((environmentsList,namespacesList)=>{const environments=(environmentsList=>environmentsList.reduce(((acc,curr)=>(acc[curr.namespace.name]||(acc[curr.namespace.name]=[]),acc[curr.namespace.name]=[...acc[curr.namespace.name],curr],acc)),{}))(environmentsList);return namespacesList.map((namespace=>({namespace:namespace.name,environments:environments[namespace.name]??[],isPrimary:!!namespace.isPrimary,canCreate:namespace.canCreate,canUpdate:namespace.canUpdate})))})(environmentsList,namespacesList),primaryNamespace=(namespaces=envsGroupedByNamespace,Object.values(namespaces).find((namespace=>{if(namespace.isPrimary)return{namespace:namespace.namespace,environments:namespace.environments}})));var namespaces;const sharedNamespaces=(namespaces=>Object.values(namespaces).filter((namespace=>{if(!namespace.isPrimary)return{namespace:namespace.namespace,environments:namespace.environments}})))(envsGroupedByNamespace);return{primaryNamespace,sharedNamespaces}}),[environmentsList,namespacesList]);return(0,react.useEffect)((()=>{scrollRef.current?.scrollTo(0,0)}),[search]),react.createElement(styles.so,{id:"environmentsScroll",ref:scrollRef},react.createElement(index_es.A,{scrollableTarget:"environmentsScroll",style:{overflow:"hidden",paddingBottom:"25px"},dataLength:environmentsList.length,hasMore,next,loader:react.createElement(Box.A,{sx:{display:"flex",justifyContent:"center",marginTop:"10px"}},react.createElement(CircularProgress.A,null))},primaryNamespace&&react.createElement(Box.A,{sx:{minHeight:"50px",margin:"-5px 0 5px 0px"}},react.createElement(EnvironmentDropdown,{data:primaryNamespace})),react.createElement(Box.A,{sx:{display:"flex",alignItems:"center",margin:"0 0 5px 12px",paddingTop:"20px"}},react.createElement(components.Cy,{style:{marginRight:"10px",width:"27"}}),react.createElement(Typography.A,{sx:{fontWeight:600,marginRight:"10px",fontSize:"15px",color:palette.grey[700]}},"Shared Environments")),sharedNamespaces&&sharedNamespaces.map((namespace=>react.createElement(EnvironmentDropdown,{key:namespace.namespace,data:namespace})))))};EnvironmentsList.__docgenInfo={description:"",methods:[],displayName:"EnvironmentsList",props:{environmentsList:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n namespace: { id: number; name: string };\n name: string;\n current_build_id: number;\n current_build: number | null;\n description: string;\n canUpdate?: boolean;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"namespace",value:{name:"signature",type:"object",raw:"{ id: number; name: string }",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}}]},required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"current_build_id",value:{name:"number",required:!0}},{key:"current_build",value:{name:"union",raw:"number | null",elements:[{name:"number"},{name:"null"}],required:!0}},{key:"description",value:{name:"string",required:!0}},{key:"canUpdate",value:{name:"boolean",required:!1}}]}}],raw:"Environment[]"},description:"@param environmentsList environments list\n@param namespacesList namespaces list\n@param hasMore indicates whether there are more items to fetch\n@param next function that will run on the bottom of the inf scroll\n@param search current search"},namespacesList:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number | undefined;\n name: string;\n isPrimary?: boolean;\n canUpdate?: boolean;\n canCreate?: boolean;\n}",signature:{properties:[{key:"id",value:{name:"union",raw:"number | undefined",elements:[{name:"number"},{name:"undefined"}],required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"isPrimary",value:{name:"boolean",required:!1}},{key:"canUpdate",value:{name:"boolean",required:!1}},{key:"canCreate",value:{name:"boolean",required:!1}}]}}],raw:"Namespace[]"},description:""},hasMore:{required:!0,tsType:{name:"boolean"},description:""},next:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},search:{required:!0,tsType:{name:"string"},description:""}}};var lodash=__webpack_require__("./node_modules/lodash/lodash.js"),OutlinedInput=__webpack_require__("./node_modules/@mui/material/OutlinedInput/OutlinedInput.js"),InputAdornment=__webpack_require__("./node_modules/@mui/material/InputAdornment/InputAdornment.js"),preferences=__webpack_require__("./src/preferences.tsx"),api=__webpack_require__("./src/features/api/index.ts");const authApiSlice=api.l.injectEndpoints({endpoints:builder=>({getAuth:builder.query({query:()=>"/api/v1/permission/"}),logout:builder.mutation({query:logoutUrl=>({url:logoutUrl,method:"POST"})}),login:builder.mutation({query:loginUrl=>({url:loginUrl,method:"GET"})})})}),{useLazyGetAuthQuery,useLogoutMutation,useLoginMutation}=authApiSlice,AuthButton=()=>{const prefs=react.useContext(preferences.be),authUrl=prefs.loginUrl,pageUrl=window.location.href,loginPageUrl=`${authUrl}${pageUrl}`,logoutUrl=prefs.logoutUrl,[triggerAuthQuery]=useLazyGetAuthQuery(),[triggerLogout]=useLogoutMutation(),[triggerLogin]=useLoginMutation(),[authenticated,setAuthenticated]=(0,react.useState)(!1),handleOnClick=()=>{authenticated?(async()=>{await triggerLogout(logoutUrl),setAuthenticated(!1),window.location.href=pageUrl})():(async()=>{await triggerLogin(loginPageUrl),setAuthenticated(!0),window.location.href=loginPageUrl})()};return(0,react.useEffect)((()=>{(async()=>{(async()=>{const{data:permissions}=await triggerAuthQuery();setAuthenticated(permissions.data.authenticated)})()})()}),[]),react.createElement(styles.OV,{color:"primary",onClick:()=>{handleOnClick()},sx:{position:"absolute",top:14,right:18}},authenticated?"Log out":"Log in")};AuthButton.__docgenInfo={description:"",methods:[],displayName:"AuthButton"};const EnvironmentsSearch=({onChange})=>{const prefs=react.useContext(preferences.be),{palette}=(0,useTheme.A)(),showAuthButton=prefs.showAuthButton,isCookieAuthMethod="cookie"===prefs.authMethod;let authButton;return showAuthButton&&isCookieAuthMethod&&(authButton=react.createElement(AuthButton,null)),react.createElement(Box.A,{sx:{padding:"15px 12px",position:"relative"}},react.createElement(Box.A,{sx:{position:"absolute",top:14,height:35,width:"auto"}},react.createElement(components.Bz,{transform:"0.5"})),authButton,react.createElement(Typography.A,{"data-testid":"env-search-title",sx:{marginBottom:"14px",textAlign:"left",color:palette.common.black,fontWeight:600,fontSize:"14px",marginTop:"55px"}},"Package Manager"),react.createElement(OutlinedInput.A,{onChange,size:"small",notched:!1,endAdornment:react.createElement(InputAdornment.A,{position:"end"},react.createElement(components.Li,{style:{marginRight:"5px"}})),placeholder:"Search for environment",sx:{borderRadius:"15px",paddingRight:"10px",width:"100%","&::placeholder":{fontSize:"14px",fontWeight:400}},inputProps:{style:{padding:"7px",paddingLeft:"15px",fontSize:"14px"}}}))};EnvironmentsSearch.__docgenInfo={description:"",methods:[],displayName:"EnvironmentsSearch",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(e: React.ChangeEvent) => void",signature:{arguments:[{type:{name:"ReactChangeEvent",raw:"React.ChangeEvent",elements:[{name:"HTMLInputElement"}]},name:"e"}],return:{name:"void"}}},description:"@param onChange change handler that will trigger when we search for an environment"}}};var environmentsApiSlice=__webpack_require__("./src/features/environments/environmentsApiSlice.ts");const namespacesApiSlice=api.l.injectEndpoints({endpoints:builder=>({fetchNamespaces:builder.query({query:dto=>`/api/v1/namespace/?page=${dto.page}&size=${dto.size}`}),fetchPrimaryNamespace:builder.query({query:()=>"/api/v1/permission/"})})}),{useLazyFetchNamespacesQuery,useLazyFetchPrimaryNamespaceQuery}=namespacesApiSlice;var reducer=__webpack_require__("./src/features/environments/reducer.ts"),namespaces_reducer=__webpack_require__("./src/features/namespaces/reducer.ts"),process=__webpack_require__("./node_modules/process/browser.js");const BaseEnvironments=({refreshEnvironments,onUpdateRefreshEnvironments})=>{const{palette}=(0,useTheme.A)(),version=process.env.REACT_APP_VERSION,environmentsState=(0,hooks.G)((state=>state.environments)),namespacesState=(0,hooks.G)((state=>state.namespaces)),dispatch=(0,hooks.j)(),[triggerNamespacesQuery]=useLazyFetchNamespacesQuery(),[triggerPrimaryNamespace]=useLazyFetchPrimaryNamespaceQuery(),[triggerQuery]=(0,environmentsApiSlice.W)(),getNamespaces=async()=>{const{data:namespacesData}=await triggerNamespacesQuery({page:namespacesState.page,size:100});if(namespacesData){const{primaryNamespace,namespaces}=await getNamespacesData(namespacesData.data);dispatch((0,namespaces_reducer.K7)({data:isNamespaceListed(namespaces,primaryNamespace)?checkMyPrimaryNamespace(namespaces,primaryNamespace):[...namespaces,{...primaryNamespace,isPrimary:!0}],count:namespacesData.count})),await getEnvironments()}},getNamespacesData=async namespaces=>{try{const{data:permissions}=await triggerPrimaryNamespace(),namespacesWithPermissions=((namespaces,permissions)=>namespaces.map((namespace=>{const entity=`${namespace.name}/*`,allPermissions=permissions.data.entity_permissions["*/*"],namespacePermissions=permissions.data.entity_permissions[entity]??[];return{id:namespace.id,name:namespace.name,canCreate:Boolean(!!allPermissions||namespacePermissions.includes(PERMISSIONS_namespaceCreate)),canUpdate:Boolean(!!allPermissions||namespacePermissions.includes(PERMISSIONS_environmentUpdate))}})))(namespaces,permissions);return{namespaces:namespacesWithPermissions,primaryNamespace:{id:void 0,name:permissions.data.primary_namespace,canCreate:!0,canUpdate:!0}}}catch(e){return{namespaces:[],primaryNamespace:{id:void 0,name:"default",canCreate:!0,canUpdate:!0}}}},getEnvironments=async()=>{const{data:environmentsData}=await triggerQuery({page:environmentsState.page,size:100,search:environmentsState.search});environmentsData&&dispatch(reducer.bC.actions.dataFetched({data:environmentsData.data,count:environmentsData.count}))},handleChange=(0,lodash.debounce)((async value=>{const{data}=await triggerQuery({page:1,size:100,search:value});data&&dispatch(reducer.bC.actions.searched({data:data.data,count:data.count,search:value}))}),500);return(0,react.useEffect)((()=>{(async()=>{getNamespaces()})()}),[]),(0,react.useEffect)((()=>{(async()=>{refreshEnvironments&&(getNamespaces(),onUpdateRefreshEnvironments(!1))})()}),[refreshEnvironments]),react.createElement(Box.A,{sx:{width:"100%",borderRight:`1px solid ${palette.secondary.light}`,display:"flex",flexDirection:"column",justifyContent:"space-between"}},react.createElement(Box.A,{sx:{borderBottom:`1px solid ${palette.secondary.light}`}},react.createElement(EnvironmentsSearch,{onChange:e=>handleChange(e.target.value)})),react.createElement(Box.A,{sx:{zIndex:"1",paddingTop:"15px",flex:4,overflowY:"auto"}},environmentsState.data&&react.createElement(EnvironmentsList,{next:async()=>{const{data}=await triggerQuery({page:environmentsState.page+1,size:100,search:environmentsState.search});data&&dispatch(reducer.bC.actions.nextFetched({data:data.data,count:data.count}))},hasMore:100*environmentsState.page void",signature:{arguments:[{type:{name:"boolean"},name:"isUpdated"}],return:{name:"void"}}},description:""}}}},"./src/features/environments/environmentsApiSlice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{W:()=>useLazyFetchEnvironmentsQuery});const environmentsApiSlice=__webpack_require__("./src/features/api/index.ts").l.injectEndpoints({endpoints:builder=>({fetchEnvironments:builder.query({query:dto=>`/api/v1/environment/?page=${dto.page}&size=${dto.size}&search=${dto.search}`})})}),{useLazyFetchEnvironmentsQuery}=environmentsApiSlice},"./src/features/environments/reducer.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{bC:()=>environmentsSlice});const environmentsSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"environments",initialState:{page:1,data:[],count:0,search:""},reducers:{dataFetched:(state,action)=>{const{count,data}=action.payload;return{...state,count,data}},searched:(state,action)=>({...action.payload,page:1}),nextFetched:(state,action)=>{const{data,count}=action.payload,newData=state.data?.concat(data),nextPage=state.page+1;return{...state,data:newData,count,page:nextPage}}}}),{dataFetched,searched,nextFetched}=environmentsSlice.actions},"./src/features/metadata/components/EnvBuildStatus.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{c:()=>EnvBuildStatus});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_mui_material__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js"),_mui_material__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/@mui/material/CircularProgress/CircularProgress.js"),_mui_material_Link__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@mui/material/Link/Link.js"),_mui_icons_material_OpenInNew__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@mui/icons-material/OpenInNew.js"),_preferences__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/preferences.tsx"),_styles_StyledMetadataItem__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/styles/StyledMetadataItem.tsx"),_utils_helpers_artifact__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/utils/helpers/artifact.ts"),_utils_helpers_parseArtifactList__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/helpers/parseArtifactList.ts"),_utils_helpers_buildMapper__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/utils/helpers/buildMapper.ts");const LogLink=({logArtifact})=>{const pref=react__WEBPACK_IMPORTED_MODULE_0__.useContext(_preferences__WEBPACK_IMPORTED_MODULE_1__.be),url=new URL(logArtifact.route,(0,_utils_helpers_parseArtifactList__WEBPACK_IMPORTED_MODULE_4__.L)(pref.apiUrl,window.location.origin));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_5__.A,{href:url.toString(),target:"_blank",sx:{display:"inline-flex",verticalAlign:"bottom",alignItems:"center"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_icons_material_OpenInNew__WEBPACK_IMPORTED_MODULE_6__.A,{sx:{mr:.5},fontSize:"inherit"}),"Log")},EnvBuildStatus=({build})=>{const logArtifact=(0,_utils_helpers_artifact__WEBPACK_IMPORTED_MODULE_7__.A)(build.id,["LOGS"])[0];return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_styles_StyledMetadataItem__WEBPACK_IMPORTED_MODULE_2__.S,{sx:{marginTop:"0",fontSize:"13px",fontWeight:500,paddingBottom:"0"},"data-testid":"build-status"},"Status: ","",react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__.A,{component:"span",sx:{fontSize:"13px"}},(0,_utils_helpers_buildMapper__WEBPACK_IMPORTED_MODULE_3__.B)(build),build.status_info&&` (${build.status_info})`,"BUILDING"===build.status||"QUEUED"===build.status?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__.A,{size:10,sx:{marginLeft:"8px"}}):"FAILED"===build.status&&logArtifact&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,". ",react__WEBPACK_IMPORTED_MODULE_0__.createElement(LogLink,{logArtifact}))))};EnvBuildStatus.__docgenInfo={description:"",methods:[],displayName:"EnvBuildStatus",props:{build:{required:!0,tsType:{name:"signature",type:"object",raw:"{\n id: number;\n environment_id: number;\n specification: {\n id: number;\n name: string;\n spec: CondaSpecification;\n sha256: string;\n created_on: string;\n };\n packages: BuildPackage[];\n status: string;\n status_info: string | null;\n size: number;\n scheduled_on: string;\n started_on: string;\n ended_on: string | null;\n build_artifacts: BuildArtifact[];\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"environment_id",value:{name:"number",required:!0}},{key:"specification",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n spec: CondaSpecification;\n sha256: string;\n created_on: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"spec",value:{name:"signature",type:"object",raw:"{\n name: string;\n channels: string[];\n dependencies: (string | CondaSpecificationPip)[];\n variables: Record;\n prefix?: string | null;\n lockfile?: Lockfile;\n}",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"channels",value:{name:"Array",elements:[{name:"string"}],raw:"string[]",required:!0}},{key:"dependencies",value:{name:"Array",elements:[{name:"unknown"}],raw:"(string | CondaSpecificationPip)[]",required:!0}},{key:"variables",value:{name:"Record",elements:[{name:"string"},{name:"string"}],raw:"Record",required:!0}},{key:"prefix",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!1}},{key:"lockfile",value:{name:"Record",elements:[{name:"string"},{name:"any"}],raw:"Record",required:!1}}]},required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"created_on",value:{name:"string",required:!0}}]},required:!0}},{key:"packages",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n channel: {\n id: number;\n name: string;\n last_update: string;\n };\n build: string;\n license: string;\n sha256: string;\n name: string;\n version: string;\n summary: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"channel",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n last_update: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"last_update",value:{name:"string",required:!0}}]},required:!0}},{key:"build",value:{name:"string",required:!0}},{key:"license",value:{name:"string",required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"version",value:{name:"string",required:!0}},{key:"summary",value:{name:"string",required:!0}}]}}],raw:"BuildPackage[]",required:!0}},{key:"status",value:{name:"string",required:!0}},{key:"status_info",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"size",value:{name:"number",required:!0}},{key:"scheduled_on",value:{name:"string",required:!0}},{key:"started_on",value:{name:"string",required:!0}},{key:"ended_on",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"build_artifacts",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ id: number; artifact_type: string; key: string }",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"artifact_type",value:{name:"string",required:!0}},{key:"key",value:{name:"string",required:!0}}]}}],raw:"BuildArtifact[]",required:!0}}]}},description:""}}}},"./src/features/metadata/components/EnvBuilds.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{F:()=>EnvBuilds});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_mui_material__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@mui/material/CircularProgress/CircularProgress.js"),_styles_StyledMetadataItem__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/styles/StyledMetadataItem.tsx"),_features_metadata_components__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/features/metadata/components/index.tsx"),_EnvBuildStatus__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/features/metadata/components/EnvBuildStatus.tsx");const EnvBuilds=({currentBuildId,selectedBuildId,builds,mode})=>{const selectedBuild=builds.find((build=>build.id===selectedBuildId));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_styles_StyledMetadataItem__WEBPACK_IMPORTED_MODULE_1__.S,{sx:{fontWeight:500,paddingBottom:"5px"}},"edit"===mode?"Change active environment version:":"Builds:"),selectedBuild?react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_features_metadata_components__WEBPACK_IMPORTED_MODULE_2__.S3,{builds,currentBuildId,selectedBuildId}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_EnvBuildStatus__WEBPACK_IMPORTED_MODULE_3__.c,{build:selectedBuild})):react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__.A,{size:20,sx:{marginLeft:"15px",marginTop:"6px",marginBottom:"7px"}}))};EnvBuilds.__docgenInfo={description:"",methods:[],displayName:"EnvBuilds",props:{currentBuildId:{required:!0,tsType:{name:"number"},description:""},selectedBuildId:{required:!0,tsType:{name:"number"},description:""},builds:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n environment_id: number;\n specification: {\n id: number;\n name: string;\n spec: CondaSpecification;\n sha256: string;\n created_on: string;\n };\n packages: BuildPackage[];\n status: string;\n status_info: string | null;\n size: number;\n scheduled_on: string;\n started_on: string;\n ended_on: string | null;\n build_artifacts: BuildArtifact[];\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"environment_id",value:{name:"number",required:!0}},{key:"specification",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n spec: CondaSpecification;\n sha256: string;\n created_on: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"spec",value:{name:"signature",type:"object",raw:"{\n name: string;\n channels: string[];\n dependencies: (string | CondaSpecificationPip)[];\n variables: Record;\n prefix?: string | null;\n lockfile?: Lockfile;\n}",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"channels",value:{name:"Array",elements:[{name:"string"}],raw:"string[]",required:!0}},{key:"dependencies",value:{name:"Array",elements:[{name:"unknown"}],raw:"(string | CondaSpecificationPip)[]",required:!0}},{key:"variables",value:{name:"Record",elements:[{name:"string"},{name:"string"}],raw:"Record",required:!0}},{key:"prefix",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!1}},{key:"lockfile",value:{name:"Record",elements:[{name:"string"},{name:"any"}],raw:"Record",required:!1}}]},required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"created_on",value:{name:"string",required:!0}}]},required:!0}},{key:"packages",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n channel: {\n id: number;\n name: string;\n last_update: string;\n };\n build: string;\n license: string;\n sha256: string;\n name: string;\n version: string;\n summary: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"channel",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n last_update: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"last_update",value:{name:"string",required:!0}}]},required:!0}},{key:"build",value:{name:"string",required:!0}},{key:"license",value:{name:"string",required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"version",value:{name:"string",required:!0}},{key:"summary",value:{name:"string",required:!0}}]}}],raw:"BuildPackage[]",required:!0}},{key:"status",value:{name:"string",required:!0}},{key:"status_info",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"size",value:{name:"number",required:!0}},{key:"scheduled_on",value:{name:"string",required:!0}},{key:"started_on",value:{name:"string",required:!0}},{key:"ended_on",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"build_artifacts",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ id: number; artifact_type: string; key: string }",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"artifact_type",value:{name:"string",required:!0}},{key:"key",value:{name:"string",required:!0}}]}}],raw:"BuildArtifact[]",required:!0}}]}}],raw:"IBuild[]"},description:""},mode:{required:!0,tsType:{name:"union",raw:'"create" | "read-only" | "edit"',elements:[{name:"literal",value:'"create"'},{name:"literal",value:'"read-only"'},{name:"literal",value:'"edit"'}]},description:""}}}},"./src/features/metadata/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{S3:()=>BuildDropdown,VY:()=>Description,FG:()=>EnvBuilds.F,fn:()=>EnvMetadata});var EnvironmentDetailsModes,react=__webpack_require__("./node_modules/react/index.js"),hooks=__webpack_require__("./src/hooks.ts"),components=__webpack_require__("./src/components/index.tsx"),styles=__webpack_require__("./src/styles/index.tsx");!function(EnvironmentDetailsModes){EnvironmentDetailsModes.CREATE="create",EnvironmentDetailsModes.READ="read-only",EnvironmentDetailsModes.EDIT="edit"}(EnvironmentDetailsModes||(EnvironmentDetailsModes={}));const EnvMetadata=({mode,description="",currentBuildId,selectedBuildId,specificationIsChanged,onDefaultEnvIsChanged,onUpdateDescription,onUpdateBuildId})=>{const{builds,newCurrentBuild}=(0,hooks.G)((state=>state.enviroments));return react.createElement(components.ZO,{title:"Environment Metadata"},react.createElement(Description,{mode,description:description||void 0,onChangeDescription:onUpdateDescription}),react.createElement("div",{style:{display:"flex",alignItems:"center",gap:"15px"}},"create"!==mode&¤tBuildId&&selectedBuildId&&react.createElement("div",null,react.createElement(EnvBuilds.F,{currentBuildId,selectedBuildId,builds,mode})),"edit"===mode&&newCurrentBuild&¤tBuildId!==newCurrentBuild&&react.createElement(styles.OV,{color:"primary",variant:"contained",onClick:()=>(newCurrentBuild=>{onUpdateBuildId(newCurrentBuild),onDefaultEnvIsChanged&&onDefaultEnvIsChanged(!0)})(newCurrentBuild),disabled:specificationIsChanged||!1},"Change environment version")))};EnvMetadata.__docgenInfo={description:"",methods:[],displayName:"EnvMetadata",props:{description:{required:!1,tsType:{name:"any"},description:"@param mode change whether the component only displays the list of builds, edit the environment description or create a new description\n@param onUpdateDescription change environment description",defaultValue:{value:'""',computed:!1}},mode:{required:!0,tsType:{name:"union",raw:'"create" | "read-only" | "edit"',elements:[{name:"literal",value:'"create"'},{name:"literal",value:'"read-only"'},{name:"literal",value:'"edit"'}]},description:""},currentBuildId:{required:!1,tsType:{name:"union",raw:"number | undefined",elements:[{name:"number"},{name:"undefined"}]},description:""},selectedBuildId:{required:!1,tsType:{name:"number"},description:""},defaultEnvVersIsChanged:{required:!1,tsType:{name:"boolean"},description:""},specificationIsChanged:{required:!1,tsType:{name:"boolean"},description:""},onDefaultEnvIsChanged:{required:!1,tsType:{name:"signature",type:"function",raw:"(defaultEnvVersIsChanged: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"defaultEnvVersIsChanged"}],return:{name:"void"}}},description:""},onUpdateDescription:{required:!0,tsType:{name:"signature",type:"function",raw:"(description: string) => void",signature:{arguments:[{type:{name:"string"},name:"description"}],return:{name:"void"}}},description:""},onUpdateBuildId:{required:!0,tsType:{name:"signature",type:"function",raw:"(buildId: number) => void",signature:{arguments:[{type:{name:"number"},name:"buildId"}],return:{name:"void"}}},description:""}}};var Select=__webpack_require__("./node_modules/@mui/material/Select/Select.js"),MenuItem=__webpack_require__("./node_modules/@mui/material/MenuItem/MenuItem.js"),useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js"),ArrowDropDown=__webpack_require__("./node_modules/@mui/icons-material/ArrowDropDown.js"),IconButton=__webpack_require__("./node_modules/@mui/material/IconButton/IconButton.js"),metadata=__webpack_require__("./src/features/metadata/index.tsx"),buildMapper=__webpack_require__("./src/utils/helpers/buildMapper.ts");const BuildDropdown=({builds,currentBuildId,selectedBuildId})=>{const dispatch=(0,hooks.j)(),{palette}=(0,useTheme.A)(),[open,setOpen]=(0,react.useState)(!1);return react.createElement(Select.A,{open,onClose:()=>setOpen(!1),onOpen:()=>setOpen(!0),sx:{borderRadius:"0px",marginBottom:"10px",backgroundColor:open?palette.primary[50]:"initial"},MenuProps:{PaperProps:{style:{backgroundColor:palette.primary[50],padding:"0px",boxShadow:"none",borderRadius:"0px",border:`1px solid ${palette.secondary.light}`}},MenuListProps:{style:{padding:"0px"}}},value:selectedBuildId,onChange:e=>{const newCurrentBuild=builds.find((build=>build.id===Number(e.target.value)));newCurrentBuild&&dispatch((0,metadata.rP)(newCurrentBuild.id))},IconComponent:()=>react.createElement(IconButton.A,{sx:{padding:"0px"},onClick:()=>setOpen((currState=>!currState)),size:"large"},react.createElement(ArrowDropDown.A,{sx:{height:"37px",borderLeft:`1px solid ${palette.primary.main}`}})),inputProps:{"data-testid":"test-select",sx:{padding:"7px 9px !important",fontSize:"13px",background:palette.common.white}}},react.createElement(MenuItem.A,{key:"empty",value:"",sx:{display:"none"}}," "),builds?builds.map((build=>react.createElement(MenuItem.A,{key:build.id,value:build.id},(0,buildMapper.Q)(build,currentBuildId)))):null)};BuildDropdown.__docgenInfo={description:"",methods:[],displayName:"BuildDropdown",props:{builds:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n environment_id: number;\n specification: {\n id: number;\n name: string;\n spec: CondaSpecification;\n sha256: string;\n created_on: string;\n };\n packages: BuildPackage[];\n status: string;\n status_info: string | null;\n size: number;\n scheduled_on: string;\n started_on: string;\n ended_on: string | null;\n build_artifacts: BuildArtifact[];\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"environment_id",value:{name:"number",required:!0}},{key:"specification",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n spec: CondaSpecification;\n sha256: string;\n created_on: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"spec",value:{name:"signature",type:"object",raw:"{\n name: string;\n channels: string[];\n dependencies: (string | CondaSpecificationPip)[];\n variables: Record;\n prefix?: string | null;\n lockfile?: Lockfile;\n}",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"channels",value:{name:"Array",elements:[{name:"string"}],raw:"string[]",required:!0}},{key:"dependencies",value:{name:"Array",elements:[{name:"unknown"}],raw:"(string | CondaSpecificationPip)[]",required:!0}},{key:"variables",value:{name:"Record",elements:[{name:"string"},{name:"string"}],raw:"Record",required:!0}},{key:"prefix",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!1}},{key:"lockfile",value:{name:"Record",elements:[{name:"string"},{name:"any"}],raw:"Record",required:!1}}]},required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"created_on",value:{name:"string",required:!0}}]},required:!0}},{key:"packages",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n channel: {\n id: number;\n name: string;\n last_update: string;\n };\n build: string;\n license: string;\n sha256: string;\n name: string;\n version: string;\n summary: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"channel",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n last_update: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"last_update",value:{name:"string",required:!0}}]},required:!0}},{key:"build",value:{name:"string",required:!0}},{key:"license",value:{name:"string",required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"version",value:{name:"string",required:!0}},{key:"summary",value:{name:"string",required:!0}}]}}],raw:"BuildPackage[]",required:!0}},{key:"status",value:{name:"string",required:!0}},{key:"status_info",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"size",value:{name:"number",required:!0}},{key:"scheduled_on",value:{name:"string",required:!0}},{key:"started_on",value:{name:"string",required:!0}},{key:"ended_on",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"build_artifacts",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ id: number; artifact_type: string; key: string }",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"artifact_type",value:{name:"string",required:!0}},{key:"key",value:{name:"string",required:!0}}]}}],raw:"BuildArtifact[]",required:!0}}]}}],raw:"Build[]"},description:"@param builds list of builds\n@param currentBuildId id of the current build\n@param selectedBuildId id of the build selected from the dropdown"},currentBuildId:{required:!0,tsType:{name:"number"},description:""},selectedBuildId:{required:!0,tsType:{name:"number"},description:""}}};var Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),TextField=__webpack_require__("./node_modules/@mui/material/TextField/TextField.js"),StyledMetadataItem=__webpack_require__("./src/styles/StyledMetadataItem.tsx"),environmentDetails=__webpack_require__("./src/features/environmentDetails/index.tsx");const Description=({mode,description,onChangeDescription})=>{const{palette}=(0,useTheme.A)();return react.createElement(Box.A,null,mode===environmentDetails.C6.READ&&description&&react.createElement(StyledMetadataItem.S,null,description),mode!==environmentDetails.C6.READ&&react.createElement(react.Fragment,null,react.createElement(StyledMetadataItem.S,{sx:{fontWeight:500}},"Description:"),react.createElement(Box.A,null,react.createElement(TextField.A,{multiline:!0,value:description,placeholder:"Enter here the description of your environment",sx:{backgroundColor:palette.grey[100],width:"100%",marginBottom:"10px"},inputProps:{style:{fontSize:"13px"}},onChange:e=>onChangeDescription(e.target.value)}))))};Description.__docgenInfo={description:"",methods:[],displayName:"Description",props:{mode:{required:!0,tsType:{name:"union",raw:'"create" | "read-only" | "edit"',elements:[{name:"literal",value:'"create"'},{name:"literal",value:'"read-only"'},{name:"literal",value:'"edit"'}]},description:"@param mode change whether the component only displays the list or we are able to edit it"},description:{required:!0,tsType:{name:"string"},description:""},onChangeDescription:{required:!0,tsType:{name:"signature",type:"function",raw:"(description: string) => void",signature:{arguments:[{type:{name:"string"},name:"description"}],return:{name:"void"}}},description:""}}};var EnvBuilds=__webpack_require__("./src/features/metadata/components/EnvBuilds.tsx");__webpack_require__("./src/features/metadata/components/EnvBuildStatus.tsx")},"./src/features/metadata/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{fn:()=>components.fn,rP:()=>currentBuildIdChanged,DX:()=>enviromentsSlice,Wc:()=>useGetEnviromentBuildsQuery});var redux_toolkit_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");const environmentsApiSlice=__webpack_require__("./src/features/api/index.ts").l.injectEndpoints({endpoints:builder=>({getEnviroments:builder.query({query:()=>"/api/v1/build/"}),getEnviromentBuild:builder.query({query:environmentId=>`/api/v1/build/${environmentId}/`}),getEnviroment:builder.query({query:env=>`/api/v1/environment/${env.namespace.name}/${env.name}/`}),getEnviromentBuilds:builder.query({query:env=>`/api/v1/build/?namespace=${env.namespace.name}&name=${env.name}&order=desc&sort_by=scheduled_on`,keepUnusedDataFor:0})})}),{useGetEnviromentsQuery,useGetEnviromentQuery,useGetEnviromentBuildsQuery,useGetEnviromentBuildQuery,useLazyGetEnviromentBuildQuery}=environmentsApiSlice,initialState={enviroments:[],builds:[],page:1,count:0,size:0,currentBuild:{id:void 0},newCurrentBuild:void 0},enviromentsSlice=(0,redux_toolkit_esm.Z0)({name:"environments",initialState,reducers:{currentBuildIdChanged:(state,action)=>{const newBuildId=action.payload;state.currentBuild.id=newBuildId;const build=state.builds.find((build=>build.id===newBuildId));state.newCurrentBuild=build&&"COMPLETED"===build.status?build.id:void 0},updateBuilds:(state,action)=>{state.builds=action.payload}},extraReducers:builder=>{builder.addMatcher(environmentsApiSlice.endpoints.getEnviroments.matchFulfilled,((state,{payload:{data}})=>{state.enviroments.push(...data)})),builder.addMatcher(environmentsApiSlice.endpoints.getEnviromentBuilds.matchFulfilled,((state,{payload:{data}})=>{state.builds=data}))}}),{currentBuildIdChanged,updateBuilds}=enviromentsSlice.actions;var components=__webpack_require__("./src/features/metadata/components/index.tsx")},"./src/features/namespaces/reducer.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{K7:()=>dataFetched,to:()=>namespacesSlice});const namespacesSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"namespaces",initialState:{page:1,data:[],count:0},reducers:{dataFetched:(state,action)=>{const{count,data}=action.payload;return{...state,count,data}}}}),{dataFetched}=namespacesSlice.actions},"./src/features/notification/notificationSlice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Ds:()=>showNotification,ui:()=>closeNotification,yg:()=>notificationSlice});const notificationSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"notification",initialState:{show:!1,description:""},reducers:{showNotification:(state,action)=>({...state,show:!0,description:action.payload}),closeNotification:state=>({...state,show:!1})}}),{showNotification,closeNotification}=notificationSlice.actions},"./src/features/requestedPackages/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{J:()=>RequestedPackage,ft:()=>RequestedPackageList,gC:()=>RequestedPackagesEdit});var Accordion=__webpack_require__("./node_modules/@mui/material/Accordion/Accordion.js"),Table=__webpack_require__("./node_modules/@mui/material/Table/Table.js"),TableBody=__webpack_require__("./node_modules/@mui/material/TableBody/TableBody.js"),TableCell=__webpack_require__("./node_modules/@mui/material/TableCell/TableCell.js"),TableContainer=__webpack_require__("./node_modules/@mui/material/TableContainer/TableContainer.js"),TableHead=__webpack_require__("./node_modules/@mui/material/TableHead/TableHead.js"),TableRow=__webpack_require__("./node_modules/@mui/material/TableRow/TableRow.js"),react=__webpack_require__("./node_modules/react/index.js"),components=__webpack_require__("./src/components/index.tsx"),styles=__webpack_require__("./src/styles/index.tsx");const RequestedPackageList=({packageList})=>{const filteredPackageList=(0,react.useMemo)((()=>packageList.filter((item=>"object"!=typeof item))),[packageList]),listLength=filteredPackageList.length;return react.createElement(Accordion.A,{sx:{maxWidth:420,boxShadow:"none"},disableGutters:!0,defaultExpanded:!0},react.createElement(styles.Ql,{expandIcon:react.createElement(components.HK,null)},react.createElement(styles.AM,{sx:{color:"primary.main"}},"Requested Packages")),react.createElement(styles.uV,{sx:{padding:0}},react.createElement(TableContainer.A,null,react.createElement(Table.A,{sx:{width:"420px",tableLayout:"fixed"}},react.createElement(TableHead.A,null,react.createElement(TableRow.A,null,react.createElement(TableCell.A,{sx:{fontSize:"13px"}},"Package"),react.createElement(TableCell.A,{sx:{fontSize:"13px",textAlign:"right"}},"Requested Version"))),react.createElement(TableBody.A,null,filteredPackageList.map(((item,index)=>react.createElement(TableRow.A,{key:String(item),sx:{backgroundColor:index%2?"secondary.50":"transparent"}},react.createElement(RequestedPackage,{requestedPackage:String(item),isLast:index===listLength-1})))))))))};RequestedPackageList.__docgenInfo={description:"",methods:[],displayName:"RequestedPackageList",props:{packageList:{required:!0,tsType:{name:"Array",elements:[{name:"unknown"}],raw:"(string | CondaSpecificationPip)[]"},description:"@param packageList list of packages that we get from the API"}}};var Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js"),helpers=__webpack_require__("./src/utils/helpers/index.ts");const RequestedPackage=({requestedPackage,isLast})=>{const{constraint,name,version}=(0,helpers.uP)(requestedPackage);return react.createElement(react.Fragment,null,react.createElement(TableCell.A,{sx:{display:"flex",alignItems:"center",borderBottom:isLast?"none":void 0}},react.createElement(Typography.A,{sx:{width:190,fontSize:"13px",color:"#333"}},name)),react.createElement(TableCell.A,{sx:{textAlign:"right",borderBottom:isLast?"none":void 0}},react.createElement(Typography.A,{sx:{fontSize:"13px",fontFamily:"latest"===constraint?"inherit":"monospace",fontStyle:"latest"===constraint?"italic":"normal",color:"#333"}},"latest"===constraint?"(no version requested)":`${constraint.replace("==","=")}${version}`)))};RequestedPackage.__docgenInfo={description:"",methods:[],displayName:"RequestedPackage",props:{requestedPackage:{required:!0,tsType:{name:"string"},description:"@param requestedPackage requested package"},isLast:{required:!0,tsType:{name:"boolean"},description:""}}};var AccordionDetails=__webpack_require__("./node_modules/@mui/material/AccordionDetails/AccordionDetails.js"),Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js"),hooks=__webpack_require__("./src/hooks.ts"),requestedPackagesSlice=__webpack_require__("./src/features/requestedPackages/requestedPackagesSlice.ts");const BaseRequestedPackagesTableRow=({requestedPackage,onDefaultEnvIsChanged})=>{const dispatch=(0,hooks.j)(),{versionsWithoutConstraints,versionsWithConstraints}=(0,hooks.G)((state=>state.requestedPackages)),result=(0,helpers.uP)(requestedPackage);let{version}=result;const{constraint,name}=result;"latest"===constraint&&(version=versionsWithoutConstraints[name]);const onUpdateDefaultEnvironment=isChanged=>{onDefaultEnvIsChanged&&onDefaultEnvIsChanged(isChanged)};return react.createElement(TableRow.A,null,react.createElement(styles.bv,{align:"left"},react.createElement(Typography.A,{sx:{fontSize:"13px",fontWeight:400,color:"#000"}},name)),react.createElement(styles.bv,{align:"left"},react.createElement(Box.A,{sx:{display:"flex",alignItems:"center"}},react.createElement(components.K7,{onUpdate:value=>{const updatedPackage=`${name}${value}${version||""}`;dispatch((0,requestedPackagesSlice.WL)({currentPackage:requestedPackage,updatedPackage})),onUpdateDefaultEnvironment(!1)},constraint:"latest"===constraint?"":constraint}),react.createElement(components.t7,{onUpdate:value=>{let pkgConstraint="latest"===constraint?">=":constraint;""===value&&(pkgConstraint="");const updatedPackage=`${name}${pkgConstraint}${value}`;dispatch((0,requestedPackagesSlice.WL)({currentPackage:requestedPackage,updatedPackage})),onUpdateDefaultEnvironment(!1)},version:"latest"===constraint?"":version,name}))),react.createElement(styles.bv,{align:"right"},react.createElement(Typography.A,{sx:{fontFamily:"monospace",fontSize:"13px",fontWeight:400,color:"#676666"}},versionsWithConstraints[name]??versionsWithoutConstraints[name]," ",react.createElement(styles.Bj,{onClick:()=>{dispatch((0,requestedPackagesSlice.x_)(requestedPackage)),onUpdateDefaultEnvironment(!1)},"data-testid":"RemovePackageTest"},react.createElement(components.AE,null)))))},RequestedPackagesTableRow=(0,react.memo)(BaseRequestedPackagesTableRow);BaseRequestedPackagesTableRow.__docgenInfo={description:"",methods:[],displayName:"BaseRequestedPackagesTableRow",props:{requestedPackage:{required:!0,tsType:{name:"string"},description:"@param requestedPackage requested package"},onDefaultEnvIsChanged:{required:!1,tsType:{name:"signature",type:"function",raw:"(isChanged: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"isChanged"}],return:{name:"void"}}},description:""}}};var Autocomplete=__webpack_require__("./node_modules/@mui/material/Autocomplete/Autocomplete.js"),TextField=__webpack_require__("./node_modules/@mui/material/TextField/TextField.js");const requestedPackagesApiSlice=__webpack_require__("./src/features/api/index.ts").l.injectEndpoints({endpoints:builder=>({getPackageSuggestions:builder.query({query:dto=>`api/v1/package/?search=${dto.search}&page=${dto.page}&size=${dto.size}&distinct_on=name`})})}),{useLazyGetPackageSuggestionsQuery}=requestedPackagesApiSlice;var lodash=__webpack_require__("./node_modules/lodash/lodash.js"),match_sorter_esm=__webpack_require__("./node_modules/match-sorter/dist/match-sorter.esm.js"),CircularProgress=__webpack_require__("./node_modules/@mui/material/CircularProgress/CircularProgress.js"),reducer=__webpack_require__("./src/features/requestedPackages/reducer.ts");const AddRequestedPackage=({onCancel,onSubmit,isCreating})=>{const theme=(0,useTheme.A)(),[state,dispatch]=(0,react.useReducer)(reducer.CZ,reducer.ue),[triggerQuery]=useLazyGetPackageSuggestionsQuery(),uniquePackageNamesList=(0,react.useMemo)((()=>{const packageNames=new Set,result=[];return state.data.forEach((buildPackage=>{const packageName=buildPackage.name;packageNames.has(packageName)||(result.push(packageName),packageNames.add(packageName))})),(0,match_sorter_esm.Ht)(result,state.name)}),[state.data]),handleSearch=(0,lodash.debounce)((async value=>{if(value.length<2)return;dispatch({type:reducer.Q3.LOADING,payload:{loading:!0}});const{data}=await triggerQuery({page:state.page,size:100,search:value});data&&dispatch({type:reducer.Q3.SEARCHED,payload:{data:data.data,count:data.count,name:value}}),dispatch({type:reducer.Q3.LOADING,payload:{loading:!1}})}),200);return react.createElement(Box.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"15px",width:isCreating?360:"100%"}},react.createElement(Box.A,null,react.createElement(Autocomplete.A,{freeSolo:!0,selectOnFocus:!0,sx:{width:"140px",color:theme.palette.secondary.main},options:uniquePackageNamesList,onChange:(event,value)=>(value=>{value&&(onSubmit(value),onCancel(!1))})(value),ListboxProps:{onScroll:async event=>{const listboxNode=event.currentTarget;if(listboxNode.scrollTop+listboxNode.clientHeight+2>=listboxNode.scrollHeight){if(!(100*state.page<=state.count))return;dispatch({type:reducer.Q3.LOADING,payload:{loading:!0}});const{data}=await triggerQuery({page:state.page+1,size:100,search:state.name});data&&dispatch({type:reducer.Q3.NEXT_FETCHED,payload:{data:data.data,count:data.count}}),dispatch({type:reducer.Q3.LOADING,payload:{loading:!1}})}}},onInputChange:(event,value,reason)=>{"clear"!==reason?handleSearch(value):dispatch({type:reducer.Q3.CLEARED})},renderInput:params=>react.createElement(TextField.A,{label:"Enter package",autoFocus:!0,...params,size:"small",sx:{borderColor:theme.palette.secondary.main},InputProps:{...params.InputProps,endAdornment:react.createElement(react.Fragment,null,state.loading?react.createElement(CircularProgress.A,{color:"inherit",size:10,sx:{marginRight:"7px"}}):params.InputProps.endAdornment)}})})),react.createElement(Box.A,{sx:{marginRight:"16px"}},react.createElement(styles.Bj,{onClick:()=>onCancel(!1),"data-testid":"cancelIcon"},react.createElement(components.AE,null))))};AddRequestedPackage.__docgenInfo={description:"",methods:[],displayName:"AddRequestedPackage",props:{onCancel:{required:!0,tsType:{name:"ReactDispatch",raw:"React.Dispatch>",elements:[{name:"ReactSetStateAction",raw:"React.SetStateAction",elements:[{name:"boolean"}]}]},description:"@param onCancel handler that will run when delete icon is clicked\n@param onSubmit handler that will run when input losses focus\n@param isCreating notify the component if it's being used for creating or editing environment"},onSubmit:{required:!0,tsType:{name:"signature",type:"function",raw:"(packageName: string) => void",signature:{arguments:[{type:{name:"string"},name:"packageName"}],return:{name:"void"}}},description:""},isCreating:{required:!0,tsType:{name:"boolean"},description:""}}};const RequestedPackagesEdit=({packageList,onDefaultEnvIsChanged})=>{const dispatch=(0,hooks.j)(),[isAdding,setIsAdding]=(0,react.useState)(!1),{palette}=(0,useTheme.A)(),onUpdateDefaultEnvironment=isChanged=>{onDefaultEnvIsChanged&&onDefaultEnvIsChanged(isChanged)},filteredPackageList=(0,react.useMemo)((()=>packageList.filter((item=>"object"!=typeof item))),[packageList]);return react.createElement(Accordion.A,{sx:{maxWidth:500,boxShadow:"none"},defaultExpanded:!0,disableGutters:!0},react.createElement(styles.Ql,{expandIcon:react.createElement(components.HK,null)},react.createElement(styles.AM,{sx:{color:"primary.main"}},"Requested Packages")),react.createElement(styles.uV,{sx:{borderRadius:"0px",padding:0}},react.createElement(TableContainer.A,null,react.createElement(Table.A,{"aria-label":"requested packages"},react.createElement(TableHead.A,{sx:{border:"none"}},react.createElement(TableRow.A,null,react.createElement(TableCell.A,{align:"left",sx:{width:"120px"}},react.createElement(Typography.A,{component:"p",sx:{fontSize:"13px",fontWeight:500}},"Name")),react.createElement(TableCell.A,{align:"left"},react.createElement(Typography.A,{component:"p",sx:{fontSize:"13px",fontWeight:500}},"Version Constraint")),react.createElement(TableCell.A,{align:"right",sx:{width:"180px"}},react.createElement(Typography.A,{component:"p",sx:{fontSize:"13px",fontWeight:500}},"Installed Version")))),react.createElement(TableBody.A,null,filteredPackageList.map(((requestedPackage,index)=>react.createElement(RequestedPackagesTableRow,{key:requestedPackage,requestedPackage,onDefaultEnvIsChanged:onUpdateDefaultEnvironment})))))),isAdding&&react.createElement(Box.A,{sx:{padding:"0 0 16px 16px"}},react.createElement(AddRequestedPackage,{onSubmit:packageName=>{dispatch((0,requestedPackagesSlice.T)(packageName)),onDefaultEnvIsChanged&&onUpdateDefaultEnvironment(!1)},onCancel:setIsAdding,isCreating:!1}))),react.createElement(AccordionDetails.A,{sx:{border:`1px solid ${palette.secondary.light}`,borderTop:"0px",borderRadius:"0px",padding:"15px 21px",display:"flex",justifyContent:"flex-start"}},react.createElement(styles.OV,{color:"secondary",variant:"contained",onClick:()=>setIsAdding(!0)},"+ Add Package")))};RequestedPackagesEdit.__docgenInfo={description:"",methods:[],displayName:"RequestedPackagesEdit",props:{packageList:{required:!0,tsType:{name:"Array",elements:[{name:"unknown"}],raw:"(string | CondaSpecificationPip)[]"},description:"@param packageList list of packages that we get from the API"},onDefaultEnvIsChanged:{required:!1,tsType:{name:"signature",type:"function",raw:"(isChanged: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"isChanged"}],return:{name:"void"}}},description:""}}}},"./src/features/requestedPackages/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{$R:()=>_requestedPackagesSlice__WEBPACK_IMPORTED_MODULE_1__.$R,Sf:()=>_requestedPackagesSlice__WEBPACK_IMPORTED_MODULE_1__.Sf,Yh:()=>_requestedPackagesSlice__WEBPACK_IMPORTED_MODULE_1__.Yh,ft:()=>_components__WEBPACK_IMPORTED_MODULE_0__.ft,gC:()=>_components__WEBPACK_IMPORTED_MODULE_0__.gC,gj:()=>_requestedPackagesSlice__WEBPACK_IMPORTED_MODULE_1__.gj});var _components__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/features/requestedPackages/components/index.tsx"),_requestedPackagesSlice__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/features/requestedPackages/requestedPackagesSlice.ts")},"./src/features/requestedPackages/reducer.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var ActionTypes;__webpack_require__.d(__webpack_exports__,{CZ:()=>requestedPackagesReducer,Q3:()=>ActionTypes,ue:()=>initialState}),function(ActionTypes){ActionTypes.DATA_FETCHED="requestedPackages/data_fetched",ActionTypes.SEARCHED="requestedPackages/searched",ActionTypes.NEXT_FETCHED="requestedPackages/next_fetched",ActionTypes.LOADING="requestedPackages/loading",ActionTypes.CLEARED="requestedPackages/cleared"}(ActionTypes||(ActionTypes={}));const initialState={page:1,data:[],count:0,name:"",loading:!1},requestedPackagesReducer=(state,action)=>{switch(action.type){case"requestedPackages/data_fetched":{const{count,data}=action.payload;return{...state,count,data}}case"requestedPackages/searched":return{...state,...action.payload,page:1};case"requestedPackages/next_fetched":{const{data,count}=action.payload,newData=state.data?.concat(data),nextPage=state.page+1;return{...state,data:newData,count,page:nextPage}}case"requestedPackages/loading":return{...state,loading:action.payload.loading};case"requestedPackages/cleared":return{...state,name:"",page:1}}}},"./src/features/requestedPackages/requestedPackagesSlice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{$R:()=>updatePackages,Sf:()=>buildPackagesCacheAdded,T:()=>packageAdded,WL:()=>packageUpdated,Yh:()=>requestedPackagesSlice,gj:()=>dependencyPromoted,x_:()=>packageRemoved});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_utils_helpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/helpers/index.ts"),_dependencies__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/features/dependencies/index.tsx"),_environmentDetails__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/features/environmentDetails/index.tsx");const requestedPackagesSlice=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_3__.Z0)({name:"requestedPackages",initialState:{requestedPackages:[],versionsWithoutConstraints:{},versionsWithConstraints:{},packagesWithLatestVersions:{},buildPackagesCache:{}},reducers:{updatePackages:(state,action)=>{const packages=action.payload;state.requestedPackages=packages},dependencyPromoted:(state,action)=>{const newRequestedPackage=`${action.payload.name}==${action.payload.version}`;state.requestedPackages.push(newRequestedPackage)},packageUpdated:(state,action)=>{const{currentPackage,updatedPackage}=action.payload;state.requestedPackages=state.requestedPackages.map((p=>p===currentPackage?updatedPackage:p))},packageRemoved:(state,action)=>{state.requestedPackages=state.requestedPackages.filter((p=>p!==action.payload))},packageAdded:(state,action)=>{state.requestedPackages.push(action.payload)},buildPackagesCacheAdded:(state,action)=>{const{pkgName,packages,count}=action.payload;state.buildPackagesCache[pkgName]={packages,count}}},extraReducers:builder=>{builder.addMatcher(_environmentDetails__WEBPACK_IMPORTED_MODULE_2__.yX.endpoints.getBuild.matchFulfilled,((state,{payload:{data:{specification:{spec}}}})=>{let dependencies=[];spec.dependencies&&(dependencies=spec.dependencies),state.requestedPackages=dependencies,state.packagesWithLatestVersions={},state.versionsWithConstraints={},dependencies.forEach((dep=>{if("string"==typeof dep){const{constraint,name,version}=(0,_utils_helpers__WEBPACK_IMPORTED_MODULE_0__.uP)(dep);version&&(state.versionsWithConstraints[name]=version),"latest"===constraint&&(state.packagesWithLatestVersions[name]=dep)}}))})),builder.addMatcher(_dependencies__WEBPACK_IMPORTED_MODULE_1__.Ac.endpoints.getBuildPackages.matchFulfilled,((state,{payload:{data,size,count,page}})=>{state.versionsWithoutConstraints={},data.forEach((dep=>{state.packagesWithLatestVersions[dep.name]&&(state.versionsWithoutConstraints[dep.name]=dep.version)}))}))}}),{updatePackages,dependencyPromoted,packageUpdated,packageRemoved,packageAdded,buildPackagesCacheAdded}=requestedPackagesSlice.actions},"./src/features/tabs/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{yF:()=>environmentClosed,tj:()=>environmentOpened,K2:()=>tabChanged,rV:()=>tabsSlice,Ho:()=>toggleNewEnvironmentView,ww:()=>updateEnvironmentBuildId});const tabsSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"tabs",initialState:{selectedEnvironments:[],selectedEnvironment:null,value:0,newEnvironment:{isOpen:!1,isActive:!1,namespace:""}},reducers:{environmentOpened:(state,action)=>{const environments=state.selectedEnvironments,openedEnvironment=action.payload.environment;state.selectedEnvironment={...openedEnvironment,canUpdate:action.payload.canUpdate},state.value=openedEnvironment.id,environments.some((env=>env.id===openedEnvironment.id))||(state.selectedEnvironments[0]=openedEnvironment)},environmentClosed:(state,action)=>{const closedEnvironmentId=action.payload.envId,index=state.selectedEnvironments.findIndex((env=>env.id===closedEnvironmentId)),listLength=state.selectedEnvironments.length;if(action.payload.selectedEnvironmentId===closedEnvironmentId)if(listLength>1){const rightItem=state.selectedEnvironments[index+1],leftItem=state.selectedEnvironments[index-1];state.selectedEnvironment=rightItem??leftItem,state.value=state.selectedEnvironment.id,state.newEnvironment.isActive=!1}else 1===listLength&&state.newEnvironment.isOpen?(state.value="create",state.selectedEnvironment=null,state.newEnvironment.isActive=!0):(state.selectedEnvironment=null,state.value=0);state.selectedEnvironments=state.selectedEnvironments.filter((env=>env.id!==closedEnvironmentId))},tabChanged:(state,action)=>{const tabValue=action.payload,environment=state.selectedEnvironments.find((env=>env.id===tabValue));state.value=tabValue,environment&&(state.selectedEnvironment=environment)},openCreateNewEnvironmentTab:(state,action)=>{state.newEnvironment.namespace=action.payload,state.value="create",state.selectedEnvironment=null,state.newEnvironment.isOpen=!0,state.newEnvironment.isActive=!0},closeCreateNewEnvironmentTab:state=>{const listLength=state.selectedEnvironments.length,lastEnv=state.selectedEnvironments[listLength-1];state.value=lastEnv?lastEnv.id:0,state.selectedEnvironment=lastEnv||null,state.newEnvironment.isOpen=!1,state.newEnvironment.isActive=!1},toggleNewEnvironmentView:(state,action)=>{action.payload&&(state.value="create",state.selectedEnvironment=null),state.newEnvironment.isActive=action.payload},updateEnvironmentBuildId:(state,action)=>{state.selectedEnvironment&&(state.selectedEnvironment.current_build_id=action.payload)}}}),{environmentOpened,environmentClosed,tabChanged,openCreateNewEnvironmentTab,closeCreateNewEnvironmentTab,toggleNewEnvironmentView,updateEnvironmentBuildId}=tabsSlice.actions},"./src/hooks.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{G:()=>useAppSelector,j:()=>useAppDispatch});var react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js");const useAppDispatch=react_redux__WEBPACK_IMPORTED_MODULE_0__.wA,useAppSelector=react_redux__WEBPACK_IMPORTED_MODULE_0__.d4},"./src/preferences.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{be:()=>PrefContext,jI:()=>prefGlobal});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),process=__webpack_require__("./node_modules/process/browser.js");const{condaStoreConfig={}}="undefined"!=typeof window&&window,prefDefault={apiUrl:process.env.REACT_APP_API_URL??condaStoreConfig.REACT_APP_API_URL??"http://localhost:8080/conda-store/",authMethod:process.env.REACT_APP_AUTH_METHOD??condaStoreConfig.REACT_APP_AUTH_METHOD??"cookie",authToken:process.env.REACT_APP_AUTH_TOKEN??condaStoreConfig.REACT_APP_AUTH_TOKEN??"",loginUrl:process.env.REACT_APP_LOGIN_PAGE_URL??condaStoreConfig.REACT_APP_LOGIN_PAGE_URL??"http://localhost:8080/conda-store/login?next=",styleType:process.env.REACT_APP_STYLE_TYPE??condaStoreConfig.REACT_APP_STYLE_TYPE??"green-accent",showAuthButton:process.env.REACT_APP_SHOW_AUTH_BUTTON?JSON.parse(process.env.REACT_APP_SHOW_AUTH_BUTTON):void 0===condaStoreConfig||void 0===condaStoreConfig.REACT_APP_SHOW_AUTH_BUTTON||JSON.parse(condaStoreConfig.REACT_APP_SHOW_AUTH_BUTTON),logoutUrl:process.env.REACT_APP_LOGOUT_PAGE_URL??condaStoreConfig.REACT_APP_LOGOUT_PAGE_URL??"http://localhost:8080/conda-store/logout?next=/"};const prefGlobal=new class Preferences{constructor(pref=prefDefault){this.set(pref)}get apiUrl(){return this._apiUrl}get authMethod(){return this._authMethod}get authToken(){return this._authToken}get loginUrl(){return this._loginUrl}get styleType(){return this._styleType}get showAuthButton(){return this._showAuthButton}get logoutUrl(){return this._logoutUrl}set(pref){this._apiUrl=pref.apiUrl,this._authMethod=pref.authMethod,this._authToken=pref.authToken,this._loginUrl=pref.loginUrl,this._styleType=pref.styleType,this._showAuthButton=pref.showAuthButton,this._logoutUrl=pref.logoutUrl}_apiUrl;_authMethod;_authToken;_loginUrl;_styleType;_showAuthButton;_logoutUrl},PrefContext=react__WEBPACK_IMPORTED_MODULE_0__.createContext(prefDefault)},"./src/styles/StyledMetadataItem.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{S:()=>StyledMetadataItem});var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js");const StyledMetadataItem=(0,__webpack_require__("./node_modules/@mui/system/esm/styled.js").A)(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__.A)((({theme})=>({padding:"0 0 10px 0",fontSize:"13px",fontFamily:'"Inter", sans-serif',color:"#333"})))},"./src/styles/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{uV:()=>StyledAccordionDetails,Ql:()=>StyledAccordionSummary,AM:()=>StyledAccordionTitle,OV:()=>StyledButton,Bj:()=>StyledIconButton,SW:()=>StyledMetadataItem.S,bv:()=>StyledRequestedPackagesTableCell,so:()=>StyledScrollContainer,Yu:()=>StyledSwitch});var react=__webpack_require__("./node_modules/react/index.js"),AccordionSummary=__webpack_require__("./node_modules/@mui/material/AccordionSummary/AccordionSummary.js"),styled=__webpack_require__("./node_modules/@mui/system/esm/styled.js"),preferences=__webpack_require__("./src/preferences.tsx");const StyledAccordionSummary=(0,styled.A)(AccordionSummary.A,{shouldForwardProp:prop=>"styleType"!==prop})((({theme:{palette},styleType=react.useContext(preferences.be).styleType})=>({paddingLeft:"15px",paddingRight:"14px",height:40,border:"grayscale"===styleType?`1px solid ${palette.secondary.light}`:"1px solid #BCBFC4",borderRadius:"grayscale"===styleType?"5px":"0px","&.Mui-expanded":{minHeight:40,maxHeight:40,margin:"0px",borderRadius:"0",".MuiAccordionSummary-expandIconWrapper":{transform:"rotate(90deg)"}}})));var AccordionDetails=__webpack_require__("./node_modules/@mui/material/AccordionDetails/AccordionDetails.js");const StyledAccordionDetails=(0,styled.A)(AccordionDetails.A,{shouldForwardProp:prop=>"styleType"!==prop})((({theme:{palette},styleType=react.useContext(preferences.be).styleType})=>({border:"grayscale"===styleType?`1px solid ${palette.secondary.light}`:"1px solid #BCBFC4",borderTop:"none",borderRadius:"grayscale"===styleType?"0px 0px 5px 5px":"Opx",overflowY:"scroll","&::-webkit-scrollbar-thumb":{backgroundColor:"grayscale"===styleType?"#EBECEE":"#DADCE0",borderRadius:"5px",border:"grayscale"===styleType?"1px solid #666666":"none"}})));var Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js");const StyledAccordionTitle=(0,styled.A)(Typography.A,{shouldForwardProp:prop=>"styleType"!==prop})((({theme})=>({fontSize:"13px",fontWeight:500,color:"#333"})));var Button=__webpack_require__("./node_modules/@mui/material/Button/Button.js");const StyledButton=(0,styled.A)(Button.A,{shouldForwardProp:prop=>"styleType"!==prop,overridesResolver:(props,styles)=>[styles.root,"primary"===props.color&&styles.primary,"secondary"===props.color&&styles.secondary]})((({theme,color="primary"})=>{const palette=theme.palette[color],{palette:{secondary}}=theme;return{padding:"4px 12px 4px 12px",border:palette.main,fontSize:"14px",color:palette.contrastText,textTransform:"none",backgroundColor:palette.main,boxShadow:"none",borderRadius:"4px",gap:"6px",":hover":{boxShadow:"none",color:palette.contrastText,backgroundColor:palette.dark,textDecoration:"underline",textUnderlineOffset:"0.3em"},"&:focus":{outlineColor:palette.main,outlineStyle:"auto",outlineOffset:"4px",outlineWidth:"medium",transition:"none"},"&:disabled":{backgroundColor:secondary[100],border:"none",color:secondary.light}}}));var TableCell=__webpack_require__("./node_modules/@mui/material/TableCell/TableCell.js");const StyledRequestedPackagesTableCell=(0,styled.A)(TableCell.A)((({theme})=>({borderBottom:"0px"}))),StyledIconButton=(0,styled.A)(Button.A)((({theme})=>({color:theme.palette.primary.main,borderRadius:"0px",padding:"0px",minWidth:"auto",":hover":{boxShadow:"none",color:theme.palette.primary.main,backgroundColor:theme.palette.primary[50]},"&:focus":{outlineColor:theme.palette.primary.main,backgroundColor:theme.palette.primary[50],outlineStyle:"auto",outlineWidth:"medium",transition:"none"},'&[aria-disabled="true"]':{backgroundColor:theme.palette.secondary[100],border:"none",color:theme.palette.secondary[300]}})));var ArrowRightRounded=__webpack_require__("./node_modules/@mui/icons-material/ArrowRightRounded.js");(0,styled.A)(ArrowRightRounded.A)((({theme:{palette}})=>({width:51,height:55,color:palette.secondary.main})));var Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js");const StyledScrollContainer=(0,styled.A)(Box.A,{shouldForwardProp:prop=>"styleType"!==prop})((({theme:{palette}})=>({height:"100%",overflowY:"scroll",overflowX:"hidden",paddingRight:"0px","&::-webkit-scrollbar":{width:"10px"},"&::-webkit-scrollbar-track":{backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:palette.secondary.light,borderRadius:"5px",border:"none"}})));(0,styled.A)(Box.A,{shouldForwardProp:prop=>"styleType"!==prop})((({theme,styleType=react.useContext(preferences.be).styleType})=>({border:"1px solid #E0E0E0",marginTop:"25px",boxShadow:"none",backgroundColor:"grayscale"===styleType?"#EBECEE":"#E6F4EA"})));var StyledMetadataItem=__webpack_require__("./src/styles/StyledMetadataItem.tsx"),Switch=__webpack_require__("./node_modules/@mui/material/Switch/Switch.js");const StyledSwitch=(0,styled.A)(Switch.A,{shouldForwardProp:prop=>"styleType"!==prop})((({theme:{palette}})=>({width:62,"& .MuiSwitch-switchBase":{padding:"1px",margin:"6px",backgroundColor:palette.primary.main,"&.Mui-checked":{backgroundColor:palette.primary.main,"& + .MuiSwitch-track":{opacity:1,backgroundColor:palette.secondary.light},":hover":{boxShadow:`0px 0px 10px ${palette.primary.light}`,backgroundColor:palette.primary.main},":focus":{boxShadow:`0px 0px 10px ${palette.primary.light}`,backgroundColor:palette.primary.main}},":hover":{boxShadow:`0px 0px 10px ${palette.primary.light}`,backgroundColor:palette.primary.main},":focus":{boxShadow:`0px 0px 10px ${palette.primary.light}`,backgroundColor:palette.primary.main}},"& .MuiSwitch-thumb":{backgroundColor:palette.primary.main},"& .MuiSwitch-track":{opacity:1,backgroundColor:palette.secondary.light}})));(0,styled.A)(Button.A)((({theme})=>({color:theme.palette.common.black,borderRadius:"0px",padding:"0px",minWidth:"auto",":hover":{boxShadow:"none",textDecoration:"underline",textUnderlineOffset:"0.3em"}})))},"./src/utils/helpers/artifact.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=(currentBuildId,apiArtifactTypes)=>{if(!currentBuildId)return[];const artifact_map={LOCKFILE:{name:"Show lockfile",route:`api/v1/build/${currentBuildId}/lockfile/`},YAML:{name:"Show yml file",route:`api/v1/build/${currentBuildId}/yaml/`},LOGS:{name:`Show Conda environment ${currentBuildId} log`,route:`api/v1/build/${currentBuildId}/logs/`},DOCKER_MANIFEST:{name:"Show Docker image",route:`api/v1/build/${currentBuildId}/docker/`},CONDA_PACK:{name:"Download archive",route:`api/v1/build/${currentBuildId}/archive/`}};return apiArtifactTypes.reduce(((acc,cur)=>acc.concat(artifact_map[cur])),[])}},"./src/utils/helpers/buildMapper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{B:()=>buildStatus,Q:()=>buildDatetimeStatus});var date_fns_tz__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/date-fns-tz/index.js");const STATUS_OPTIONS={COMPLETED:"Available",QUEUED:"Queued",FAILED:"Failed",BUILDING:"Building"},TIMEZONE=Intl.DateTimeFormat().resolvedOptions().timeZone,dateToTimezone=date=>{if(!date)return"";const zonedDate=(0,date_fns_tz__WEBPACK_IMPORTED_MODULE_0__.utcToZonedTime)(`${date}Z`,TIMEZONE);return(0,date_fns_tz__WEBPACK_IMPORTED_MODULE_0__.format)(zonedDate,"MMMM do, yyyy - h:mm a",{timeZone:TIMEZONE})},buildDatetimeStatus=({id,status,ended_on,scheduled_on},currentBuildId)=>id===currentBuildId?`${dateToTimezone(ended_on??scheduled_on)} - Active`:"BUILDING"===status?`${dateToTimezone(scheduled_on)} - Building`:"QUEUED"===status?`${dateToTimezone(scheduled_on)} - Queued`:`${dateToTimezone(ended_on??scheduled_on)} - ${STATUS_OPTIONS[status]}`,buildStatus=({status,ended_on,scheduled_on})=>{if("COMPLETED"===status){if(ended_on&&scheduled_on){const startTime=new Date(scheduled_on);let duration=(new Date(ended_on).valueOf()-startTime.valueOf())/6e4;if(duration=Math.round(duration),duration>0)return`Completed in ${duration} min`}return"Completed"}return STATUS_OPTIONS[status]}},"./src/utils/helpers/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{LK:()=>parseArtifactList.L,CD:()=>getIconForStyleType,xs:()=>getStylesForStyleType,Pj:()=>reorderArray,uP:()=>requestedPackageParser,$$:()=>useInterval});const reorderArray=({list,startIndex,endIndex})=>{const result=JSON.parse(JSON.stringify(list)),[removed]=result.splice(startIndex,1);return result.splice(endIndex,0,removed),result},requestedPackageParser=requestedPackageName=>{const splittedPackageName=requestedPackageName.split(/(>=|<=|<|>|==|=)/g),name=splittedPackageName[0];let version="",constraint="latest";return splittedPackageName.length>1&&(constraint=splittedPackageName[1],version=splittedPackageName[2]),{name,version,constraint}};__webpack_require__("./src/utils/helpers/buildMapper.ts");var parseArtifactList=__webpack_require__("./src/utils/helpers/parseArtifactList.ts"),react=__webpack_require__("./node_modules/react/index.js"),preferences=__webpack_require__("./src/preferences.tsx");const getStylesForStyleType=(grayscaleStyles,greenAccentStyles)=>{if(!greenAccentStyles)return grayscaleStyles;return"grayscale"===react.useContext(preferences.be).styleType?grayscaleStyles:greenAccentStyles},getIconForStyleType=(grayscaleIcon,greenAccentIcon)=>{if(!greenAccentIcon)return grayscaleIcon;return"grayscale"===react.useContext(preferences.be).styleType?grayscaleIcon:greenAccentIcon},useInterval=(callback,delay)=>{const savedCallback=(0,react.useRef)();(0,react.useEffect)((()=>{savedCallback.current=callback}),[callback]),(0,react.useEffect)((()=>{const tick=()=>{savedCallback.current()};if(tick(),delay){const id=setInterval(tick,delay);return()=>clearInterval(id)}}),[delay])}},"./src/utils/helpers/parseArtifactList.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{L:()=>artifactBaseUrl,n:()=>parseArtifacts});const artifacts=["LOGS","LOCKFILE","CONDA_PACK","YAML","DOCKER_MANIFEST"],parseArtifacts=artifact_list=>artifact_list?.length?artifacts.filter((artifact=>artifact_list.includes(artifact))):[],artifactBaseUrl=(apiUrl,baseUrl)=>{return path=apiUrl,new RegExp("^(?:[a-z]+:)?//","i").test(path)?apiUrl:`${baseUrl}${apiUrl}`;var path}}}]); \ No newline at end of file diff --git a/727.968ed270.iframe.bundle.js b/727.968ed270.iframe.bundle.js new file mode 100644 index 00000000..caf17821 --- /dev/null +++ b/727.968ed270.iframe.bundle.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_conda_store_conda_store_ui=self.webpackChunk_conda_store_conda_store_ui||[]).push([[727],{"./src/components/Dialog.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{L:()=>AlertDialog});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_mui_material_Button__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@mui/material/Button/Button.js"),_mui_material_Dialog__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mui/material/Dialog/Dialog.js"),_mui_material_DialogActions__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@mui/material/DialogActions/DialogActions.js"),_mui_material_DialogContent__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@mui/material/DialogContent/DialogContent.js"),_mui_material_DialogContentText__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@mui/material/DialogContentText/DialogContentText.js"),_mui_material_DialogTitle__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@mui/material/DialogTitle/DialogTitle.js"),_styles__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/styles/index.tsx");const AlertDialog=({title,description,isOpen,closeAction,confirmAction,confirmText="Delete"})=>react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_Dialog__WEBPACK_IMPORTED_MODULE_2__.A,{open:isOpen,onClose:closeAction},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_DialogTitle__WEBPACK_IMPORTED_MODULE_3__.A,{sx:{fontFamily:'"Inter", sans-serif',fontSize:"16px",color:"#333",fontWeight:600}},title),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_DialogContent__WEBPACK_IMPORTED_MODULE_4__.A,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_DialogContentText__WEBPACK_IMPORTED_MODULE_5__.A,{sx:{fontSize:"13px",fontFamily:'"Inter", sans-serif',color:"#333"}},description)),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_DialogActions__WEBPACK_IMPORTED_MODULE_6__.A,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_7__.A,{color:"secondary",onClick:closeAction},"Cancel"),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_styles__WEBPACK_IMPORTED_MODULE_1__.OV,{color:"primary",onClick:()=>confirmAction(),sx:{textTransform:"uppercase"}},confirmText)));AlertDialog.__docgenInfo={description:"",methods:[],displayName:"AlertDialog",props:{title:{required:!0,tsType:{name:"string"},description:""},description:{required:!0,tsType:{name:"string"},description:""},isOpen:{required:!0,tsType:{name:"boolean"},description:""},closeAction:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},confirmAction:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},confirmText:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"Delete"',computed:!1}}}}},"./src/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Lt:()=>Dialog.L,HK:()=>ArrowIcon,ZO:()=>BlockContainer,Kl:()=>BlockContainerEditMode,vP:()=>BookIcon,F4:()=>ChannelIcon,lo:()=>CodeIcon,Bz:()=>CondaLogo,K7:()=>ConstraintSelect,AE:()=>DeleteIconAlt,Cy:()=>GroupIconAlt,zD:()=>Popup,Li:()=>SearchIconAlt,JM:()=>UploadIcon,t7:()=>VersionSelect});var Select=__webpack_require__("./node_modules/@mui/material/Select/Select.js"),MenuItem=__webpack_require__("./node_modules/@mui/material/MenuItem/MenuItem.js"),react=__webpack_require__("./node_modules/react/index.js");const ConstraintSelect=({constraint,onUpdate=value=>{}})=>{const selectedConstraint="=="===constraint?"=":constraint;return react.createElement(Select.A,{defaultValue:selectedConstraint,IconComponent:()=>null,onChange:e=>{e.target.value&&onUpdate(e.target.value)},sx:{borderRadius:"0px",width:"44px"},notched:!1,inputProps:{sx:{padding:"7px 9px !important",borderRadius:"0px","&::placeholder":{fontSize:"14px",fontWeight:400}},"data-testid":"ConstraintSelectTest"}},["=",">","<",">=","<="].map((constraint=>react.createElement(MenuItem.A,{key:constraint,value:constraint},constraint))))};ConstraintSelect.__docgenInfo={description:"",methods:[],displayName:"ConstraintSelect",props:{constraint:{required:!0,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"@param constraint package version constraint"},onUpdate:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:"",defaultValue:{value:"(value: string) => {}",computed:!1}}}};var useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js"),ArrowDropDown=__webpack_require__("./node_modules/@mui/icons-material/ArrowDropDown.js"),IconButton=__webpack_require__("./node_modules/@mui/material/IconButton/IconButton.js"),esm=__webpack_require__("./node_modules/compare-versions/lib/esm/index.js"),semver=__webpack_require__("./node_modules/semver/index.js");const requestedPackageVersionApiSlice=__webpack_require__("./src/features/api/index.ts").l.injectEndpoints({endpoints:builder=>({getPackageVersionSuggestions:builder.query({query:dto=>`api/v1/package/?search=${dto.search}&exact=true&distinct_on=version&page=${dto.page}&order=desc&sort_by=version`})})}),{useLazyGetPackageVersionSuggestionsQuery}=requestedPackageVersionApiSlice;var reducer=__webpack_require__("./src/features/requestedPackages/reducer.ts"),hooks=__webpack_require__("./src/hooks.ts"),requestedPackages=__webpack_require__("./src/features/requestedPackages/index.tsx"),helpers=__webpack_require__("./src/utils/helpers/index.ts");const VersionSelect=({version,name,onUpdate=value=>{}})=>{const{palette}=(0,useTheme.A)(),reduxDispatch=(0,hooks.j)(),{buildPackagesCache}=(0,hooks.G)((state=>state.requestedPackages)),[open,setOpen]=(0,react.useState)(!1),[value,setValue]=(0,react.useState)(version??""),[state,dispatch]=(0,react.useReducer)(reducer.CZ,reducer.ue),[triggerQuery]=useLazyGetPackageVersionSuggestionsQuery(),iconStyles=(0,helpers.xs)({backgroundColor:"#ECECEC",height:"37px",borderLeft:`2px solid ${palette.primary.main}`},{backgroundColor:"#fff",height:"37px",borderLeft:"1px solid #BCBFC4"});(0,react.useEffect)((()=>{(async()=>{if(buildPackagesCache[name])return void dispatch({type:reducer.Q3.DATA_FETCHED,payload:{data:buildPackagesCache[name].packages,count:buildPackagesCache[name].count}});dispatch({type:reducer.Q3.LOADING,payload:{loading:!0}});const{data}=await triggerQuery({page:state.page,search:name.trim()});data&&(dispatch({type:reducer.Q3.DATA_FETCHED,payload:{data:data.data,count:data.count}}),reduxDispatch((0,requestedPackages.Sf)({pkgName:name,packages:data.data,count:data.count}))),dispatch({type:reducer.Q3.LOADING,payload:{loading:!1}})})()}),[]);const versionsList=(0,react.useMemo)((()=>{const uniqueVersions=new Set,result=[];let sortedVersions=[];state.data.forEach((packageVersions=>{const packageVersion=packageVersions.version;uniqueVersions.has(packageVersion)||(result.push(packageVersion),uniqueVersions.add(packageVersion))}));return sortedVersions=result.sort(((v1,v2)=>{const safeV1=((0,semver.coerce)(v1)||"").toString(),safeV2=((0,semver.coerce)(v2)||"").toString();return safeV1&&safeV2?(0,esm.Zy)(safeV1,safeV2):1})),sortedVersions.forEach((v=>{""!==v&&""!==value&&v===value&&setValue(v)})),sortedVersions.reverse()}),[state.data]);return react.createElement(Select.A,{value:versionsList.length>0?value:"",open,onClose:()=>setOpen(!1),onOpen:()=>setOpen(!0),onChange:e=>{onUpdate(e.target.value),setValue(e.target.value)},IconComponent:()=>react.createElement(IconButton.A,{sx:{padding:"0px"},onClick:()=>setOpen((currState=>!currState))},react.createElement(ArrowDropDown.A,{sx:iconStyles})),MenuProps:{PaperProps:{sx:{maxHeight:200}}},notched:!1,sx:{borderRadius:"0px",width:"110px",border:"none"},inputProps:{sx:{padding:"7px 9px !important",backgroundColor:palette.common.white,borderRadius:"0px",fontFamily:"monospace",fontSize:"13px"},"data-testid":"VersionSelectTest"}},react.createElement(MenuItem.A,{key:"empty",value:"",sx:{height:"30px"}}," "),versionsList.map((v=>react.createElement(MenuItem.A,{key:v,value:v,sx:{fontFamily:"monospace",fontSize:"13px"}},v))))};VersionSelect.__docgenInfo={description:"",methods:[],displayName:"VersionSelect",props:{version:{required:!0,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"@param version package version\n@param name package name"},name:{required:!0,tsType:{name:"string"},description:""},onUpdate:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:"",defaultValue:{value:"(value: string) => {}",computed:!1}}}};var Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js");const BlockContainer=({title,children})=>react.createElement(Box.A,{sx:{border:"1px solid #E0E0E0",paddingBottom:"15px"}},react.createElement(Box.A,{sx:{padding:"10px 15px",borderBottom:"1px solid #E0E0E0"}},react.createElement(Typography.A,{"data-testid":"block-container-title",sx:{fontSize:"14px",fontWeight:600,color:"#333"}},title)),react.createElement(Box.A,{sx:{padding:"15px 15px 0 15px"}},children));BlockContainer.__docgenInfo={description:"",methods:[],displayName:"BlockContainer",props:{title:{required:!0,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};var Grid=__webpack_require__("./node_modules/@mui/material/Grid/Grid.js"),styles=__webpack_require__("./src/styles/index.tsx"),Button=__webpack_require__("./node_modules/@mui/material/Button/Button.js"),UploadFileRounded=__webpack_require__("./node_modules/@mui/icons-material/UploadFileRounded.js");const BlockContainerEditMode=({title,children,onToggleEditMode,isEditMode,setShowDialog})=>react.createElement(Box.A,{sx:{border:"1px solid #E0E0E0",paddingBottom:"15px"}},react.createElement(Box.A,{sx:{padding:"10px 15px",borderBottom:"1px solid #E0E0E0"}},react.createElement(Box.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"}},react.createElement(Typography.A,{"data-testid":"block-container-title",sx:{fontSize:"14px",fontWeight:600,color:"#333"}},title),react.createElement(Box.A,{display:"flex",alignItems:"center"},react.createElement(Button.A,{variant:"outlined",color:"secondary",size:"small",startIcon:react.createElement(UploadFileRounded.A,null),onClick:()=>setShowDialog(!0),sx:{mx:"1em"}},"Switch to Conda Lockfile Upload")," ",react.createElement(Grid.Ay,{component:"label",container:!0,spacing:1,justifyContent:"center",sx:{width:"auto"}},react.createElement(Grid.Ay,{item:!0,sx:{alignSelf:"baseline"}},react.createElement(Typography.A,{"data-testid":"block-container-title",sx:{fontSize:"14px",color:"#333",fontWeight:isEditMode?"400":"600"}},"GUI")),react.createElement(Grid.Ay,{item:!0,sx:{alignSelf:"baseline"}},react.createElement(styles.Yu,{checked:isEditMode,onClick:e=>onToggleEditMode(!isEditMode),icon:react.createElement(CodeIcon,null),checkedIcon:react.createElement(CodeIcon,null)})),react.createElement(Grid.Ay,{item:!0,sx:{alignSelf:"baseline"}},react.createElement(Typography.A,{"data-testid":"block-container-title",sx:{fontSize:"14px",color:"#333",fontWeight:isEditMode?"600":"400"}},"YAML")))))),react.createElement(Box.A,{sx:{padding:"15px 15px 0 15px"}},children));BlockContainerEditMode.__docgenInfo={description:"",methods:[],displayName:"BlockContainerEditMode",props:{title:{required:!0,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},onToggleEditMode:{required:!0,tsType:{name:"signature",type:"function",raw:"(show: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"show"}],return:{name:"void"}}},description:""},isEditMode:{required:!0,tsType:{name:"boolean"},description:""},setShowDialog:{required:!0,tsType:{name:"signature",type:"function",raw:"(show: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"show"}],return:{name:"void"}}},description:""}}};var Alert=__webpack_require__("./node_modules/@mui/material/Alert/Alert.js"),Snackbar=__webpack_require__("./node_modules/@mui/material/Snackbar/Snackbar.js");const Popup=({description,isVisible,onClose})=>{const handleClose=()=>{onClose({show:!isVisible,description:null})};return react.createElement(Snackbar.A,{anchorOrigin:{vertical:"bottom",horizontal:"right"},autoHideDuration:3e3,open:isVisible,onClose:handleClose},react.createElement(Alert.A,{severity:"success",sx:{width:"100%"},onClose:handleClose},description))};Popup.__docgenInfo={description:"",methods:[],displayName:"Popup",props:{description:{required:!0,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},isVisible:{required:!0,tsType:{name:"boolean"},description:""},onClose:{required:!0,tsType:{name:"signature",type:"function",raw:"(notification: any) => void",signature:{arguments:[{type:{name:"any"},name:"notification"}],return:{name:"void"}}},description:""}}};var preferences=__webpack_require__("./src/preferences.tsx");const CondaLogo=props=>{const isGrayscaleStyleType="grayscale"===react.useContext(preferences.be).styleType,colorTheme_gray=["#CCCFD2","#E4E4E5"],colorTheme_green=["#33A852","#B9D9BD"];return react.createElement("svg",{width:"inherit",height:"inherit",viewBox:"0 0 233 266",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props},react.createElement("path",{d:"M104.02 145.337c-29.376-16.22-58.646-32.615-87.987-48.905-9.366-5.2-15.938-1.338-15.95 9.33-.035 16.783-.011 33.566-.011 50.36 0 16.783.117 33.578-.07 50.361-.06 5.727 1.947 9.424 7.205 12.064 29.693 14.929 59.257 30.116 88.89 45.162 8.122 4.119 14.648.035 14.648-9.166.035-32.627-.071-65.242.094-97.869.035-5.469-2.16-8.767-6.819-11.337z",fill:isGrayscaleStyleType?colorTheme_gray[0]:colorTheme_green[0]}),react.createElement("path",{d:"M128.877 145.337c29.376-16.22 58.646-32.615 87.987-48.905 9.365-5.2 15.937-1.338 15.949 9.33.035 16.783.012 33.566.012 50.36 0 16.783-.117 33.578.07 50.361.059 5.727-1.948 9.424-7.206 12.064-29.692 14.929-59.256 30.116-88.89 45.162-8.122 4.119-14.647.035-14.647-9.166-.035-32.627.07-65.242-.094-97.869-.035-5.469 2.16-8.767 6.819-11.337zM174.25 15.487h-18.203v10.035h18.203s-3.134-3.556-3.333-4.695c-.2-1.138 3.333-5.34 3.333-5.34z",fill:isGrayscaleStyleType?colorTheme_gray[1]:colorTheme_green[1]}),react.createElement("path",{d:"M153.312 58.289c-1.526-1.96-4.178-4.002-7.957-6.103-3.779-2.1-7.054-3.709-9.812-4.8-2.769-1.092-7.053-2.723-12.863-4.906-5.668-2.183-9.776-4.107-12.323-5.774-2.546-1.667-3.814-3.52-3.814-5.563 0-2.617 1.091-4.612 3.274-5.997 2.089-1.326 4.39-1.995 6.89-2.054v-.082c10.374.692 22.557 1.901 32.626 2.5 1.808.105 2.183-.376 2.078-2.066-.751-12.37-10.129-20.515-22.346-22.534a50.123 50.123 0 00-3.462-.422c-7.429-.939-12.406-.282-14.096-.012-8.438.892-15.62 3.732-21.547 8.532-7.277 5.892-10.903 13.556-10.903 23.003 0 9.307 2.875 16.537 8.614 21.7 5.74 5.165 13.767 9.484 24.095 12.981 7.417 2.324 12.499 4.296 15.269 5.892 2.758 1.596 4.142 3.568 4.142 5.891 0 2.618-1.161 4.73-3.497 6.326-2.324 1.596-5.528 2.394-9.6 2.394a41.42 41.42 0 01-5.141-.328c-11.29-.822-19.834-2.054-31.124-2.934-1.55-.118-1.948.234-1.925 1.76.188 11.913 9.26 21.196 21.102 22.827 2.171.294 7.699 1.385 12.358 1.432 1.491.094 2.993.141 4.518.141 13.521 0 23.802-3.052 30.855-9.154 7.054-6.103 10.575-14.096 10.575-23.99 0-4.06-.623-7.698-1.855-10.902-1.22-3.216-2.605-5.798-4.131-7.758zM131.494 7.647c2.653.13 4.589 2.242 4.472 4.87-.118 2.641-2.254 4.578-4.894 4.46-2.606-.117-4.624-2.3-4.519-4.882.118-2.57 2.336-4.565 4.941-4.448z",fill:isGrayscaleStyleType?colorTheme_gray[0]:colorTheme_green[0]}))};CondaLogo.__docgenInfo={description:"",methods:[],displayName:"CondaLogo"};const GroupIconAlt=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",...props},react.createElement("circle",{cx:"12",cy:"8",r:"2.5",stroke:theme.palette.secondary[500],strokeLinecap:"round"}),react.createElement("path",{d:"M13.7679 6.5C13.9657 6.15743 14.2607 5.88121 14.6154 5.70625C14.9702 5.5313 15.3689 5.46548 15.7611 5.51711C16.1532 5.56874 16.5213 5.73551 16.8187 5.99632C17.1161 6.25713 17.3295 6.60028 17.4319 6.98236C17.5342 7.36445 17.521 7.76831 17.3939 8.14288C17.2667 8.51745 17.0313 8.8459 16.7175 9.08671C16.4037 9.32751 16.0255 9.46985 15.6308 9.49572C15.2361 9.52159 14.8426 9.42983 14.5 9.23205",stroke:theme.palette.secondary[500]}),react.createElement("path",{d:"M10.2321 6.5C10.0343 6.15743 9.73935 5.88121 9.38458 5.70625C9.02981 5.5313 8.63113 5.46548 8.23895 5.51711C7.84677 5.56874 7.47871 5.73551 7.18131 5.99632C6.88391 6.25713 6.67053 6.60028 6.56815 6.98236C6.46577 7.36445 6.47899 7.76831 6.60614 8.14288C6.73329 8.51745 6.96866 8.8459 7.28248 9.08671C7.5963 9.32751 7.97448 9.46985 8.36919 9.49572C8.76391 9.52159 9.15743 9.42983 9.5 9.23205",stroke:theme.palette.secondary[500]}),react.createElement("path",{d:"M12 12.5C16.0802 12.5 17.1335 15.8022 17.4054 17.507C17.4924 18.0524 17.0523 18.5 16.5 18.5H7.5C6.94771 18.5 6.50763 18.0524 6.59461 17.507C6.86649 15.8022 7.91976 12.5 12 12.5Z",stroke:theme.palette.secondary[500],strokeLinecap:"round"}),react.createElement("path",{d:"M19.2964 15.4162L18.8113 15.5377L19.2964 15.4162ZM13.0869 12.5859L12.7177 12.2488L12.0972 12.9283L13.0049 13.0791L13.0869 12.5859ZM17.1811 16.5L16.7008 16.639L16.8053 17H17.1811V16.5ZM15.4998 12C16.5275 12 17.2493 12.5027 17.7781 13.2069C18.3175 13.9253 18.6343 14.8306 18.8113 15.5377L19.7814 15.2948C19.5902 14.5315 19.2327 13.4787 18.5778 12.6065C17.9124 11.7203 16.92 11 15.4998 11V12ZM13.4562 12.923C13.9565 12.375 14.6105 12 15.4998 12V11C14.2826 11 13.3734 11.5306 12.7177 12.2488L13.4562 12.923ZM13.0049 13.0791C15.3055 13.4614 16.2788 15.1801 16.7008 16.639L17.6614 16.361C17.1903 14.7326 16.0188 12.5663 13.1689 12.0927L13.0049 13.0791ZM18.3948 16H17.1811V17H18.3948V16ZM18.8113 15.5377C18.8651 15.7526 18.7073 16 18.3948 16V17C19.2655 17 20.015 16.2277 19.7814 15.2948L18.8113 15.5377Z",fill:theme.palette.secondary[500]}),react.createElement("path",{d:"M10.913 12.5859L10.995 13.0791L11.9027 12.9283L11.2823 12.2488L10.913 12.5859ZM4.70355 15.4162L5.18857 15.5377L4.70355 15.4162ZM6.8188 16.5V17H7.19465L7.2991 16.639L6.8188 16.5ZM8.50011 12C9.38944 12 10.0434 12.375 10.5438 12.923L11.2823 12.2488C10.6266 11.5306 9.71735 11 8.50011 11V12ZM5.18857 15.5377C5.36566 14.8306 5.6824 13.9253 6.22179 13.2069C6.7506 12.5027 7.47238 12 8.50011 12V11C7.07993 11 6.08755 11.7203 5.42211 12.6065C4.76725 13.4787 4.40968 14.5315 4.21853 15.2948L5.18857 15.5377ZM5.6051 16C5.29259 16 5.13477 15.7526 5.18857 15.5377L4.21853 15.2948C3.9849 16.2277 4.73436 17 5.6051 17V16ZM6.8188 16H5.6051V17H6.8188V16ZM7.2991 16.639C7.72116 15.1801 8.69448 13.4614 10.995 13.0791L10.831 12.0927C7.98113 12.5663 6.80962 14.7326 6.3385 16.361L7.2991 16.639Z",fill:theme.palette.secondary[500]}))};GroupIconAlt.__docgenInfo={description:"",methods:[],displayName:"GroupIconAlt"};const ArrowIcon=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{width:7,height:13,viewBox:"0 0 7 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props},react.createElement("path",{d:"M0 12.82l6.29-6.41L0 0v12.82z",fill:theme.palette.secondary.dark}))};ArrowIcon.__docgenInfo={description:"",methods:[],displayName:"ArrowIcon"};const SearchIconAlt=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props},react.createElement("path",{d:"M13.09 12.64L17.53 17M7.77 15A7.06 7.06 0 10.66 7.94 7.08 7.08 0 007.77 15v0z",stroke:theme.palette.primary.main,strokeMiterlimit:10}))};SearchIconAlt.__docgenInfo={description:"",methods:[],displayName:"SearchIconAlt"};const DeleteIconAlt=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{width:14,height:16,viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props},react.createElement("path",{d:"M5.088 1h4.094M5.088 1h4.094M1 1.819h12.232M5.48 5.09v6.55M8.755 5.09v6.55",stroke:theme.palette.primary.main,strokeLinecap:"square"}),react.createElement("path",{clipRule:"evenodd",d:"M2.243 2.004v11.688c.072.595.338.892.798.892h8.188c.57.056.855-.242.855-.892V2.004H2.243z",stroke:theme.palette.primary.main}))};DeleteIconAlt.__docgenInfo={description:"",methods:[],displayName:"DeleteIconAlt"};const UploadIcon=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{width:12,height:16,viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props},react.createElement("path",{d:"M5.998 10.817V1m0 .09L2.343 4.745M5.998 1.09l3.656 3.655M10.907 14.688H1",stroke:theme.palette.primary.main,strokeLinecap:"round",strokeLinejoin:"round"}))};UploadIcon.__docgenInfo={description:"",methods:[],displayName:"UploadIcon"};const ChannelIcon=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{width:12,height:15,viewBox:"0 0 12 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{marginRight:"10px",marginLeft:"5px"},...props},react.createElement("path",{d:"M3.95 0H1.17A1.17 1.17 0 000 1.17v6.26C0 8.076.524 8.6 1.17 8.6h2.78a1.17 1.17 0 001.17-1.17V1.17A1.17 1.17 0 003.95 0zM3.95 10.07H1.17A1.17 1.17 0 000 11.24v1.96c0 .646.524 1.17 1.17 1.17h2.78a1.17 1.17 0 001.17-1.17v-1.96a1.17 1.17 0 00-1.17-1.17zM7.76 14.38h2.78a1.17 1.17 0 001.17-1.17V6.95a1.17 1.17 0 00-1.17-1.17H7.76a1.17 1.17 0 00-1.17 1.17v6.26c0 .646.524 1.17 1.17 1.17zM7.76 4.31h2.78a1.17 1.17 0 001.17-1.17V1.18A1.17 1.17 0 0010.54.01H7.76a1.17 1.17 0 00-1.17 1.17v1.96c0 .646.524 1.17 1.17 1.17z",fill:theme.palette.primary.main}))};ChannelIcon.__docgenInfo={description:"",methods:[],displayName:"ChannelIcon"};const CodeIcon=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...props},react.createElement("path",{d:"m8 18l-6-6l6-6l1.425 1.425l-4.6 4.6L9.4 16.6L8 18Zm8 0l-1.425-1.425l4.6-4.6L14.6 7.4L16 6l6 6l-6 6Z",fill:theme.palette.primary.contrastText}))};CodeIcon.__docgenInfo={description:"",methods:[],displayName:"CodeIcon"};const BookIcon=props=>{const theme=(0,useTheme.A)();return react.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...props},react.createElement("path",{d:"M8 4.3335V12.3335",stroke:theme.palette.secondary.main,strokeLinecap:"round"}),react.createElement("path",{d:"M13.667 4.3335V12.3335",stroke:theme.palette.secondary.main,strokeLinecap:"round"}),react.createElement("path",{d:"M2.33301 4.3335V12.3335",stroke:theme.palette.secondary.main,strokeLinecap:"round"}),react.createElement("path",{d:"M13.6667 12.3333C13.6667 12.3333 13 11 10.6667 11C8.33333 11 8 12.3333 8 12.3333",stroke:theme.palette.secondary.main,strokeLinecap:"round"}),react.createElement("path",{d:"M2.33333 12.3333C2.33333 12.3333 3 11 5.33333 11C7.66667 11 8 12.3333 8 12.3333",stroke:theme.palette.secondary.main,strokeLinecap:"round"}),react.createElement("path",{d:"M13.6667 4.33333C13.6667 4.33333 13 3 10.6667 3C8.33333 3 8 4.33333 8 4.33333",stroke:theme.palette.secondary.main,strokeLinecap:"round"}),react.createElement("path",{d:"M2.33333 4.33333C2.33333 4.33333 3 3 5.33333 3C7.66667 3 8 4.33333 8 4.33333",stroke:theme.palette.secondary.main,strokeLinecap:"round"}))};BookIcon.__docgenInfo={description:"",methods:[],displayName:"BookIcon"};var Dialog=__webpack_require__("./src/components/Dialog.tsx")},"./src/features/api/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{l:()=>apiSlice});var rtk_query_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/query/rtk-query.esm.js"),rtk_query_react_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/query/react/rtk-query-react.esm.js"),preferences=__webpack_require__("./src/preferences.tsx");const apiSlice=(0,rtk_query_react_esm.xP)({baseQuery:async(args,WebApi,extraOptions)=>{const baseUrl=preferences.jI.apiUrl;return(0,rtk_query_esm.cw)({baseUrl,credentials:"include",prepareHeaders:headers=>("token"===preferences.jI.authMethod&&preferences.jI.authToken&&headers.set("Authorization",`Bearer ${preferences.jI.authToken}`),headers)})(args,WebApi,extraOptions)},endpoints:builder=>({}),reducerPath:"api",refetchOnMountOrArgChange:!0,tagTypes:[]})},"./src/features/artifacts/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{W:()=>ArtifactItem,V:()=>ArtifactList});var Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),Link=__webpack_require__("./node_modules/@mui/material/Link/Link.js"),react=__webpack_require__("./node_modules/react/index.js"),OpenInNew=__webpack_require__("./node_modules/@mui/icons-material/OpenInNew.js"),useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js"),preferences=__webpack_require__("./src/preferences.tsx"),helpers=__webpack_require__("./src/utils/helpers/index.ts");const ArtifactItem=({artifact})=>{const pref=react.useContext(preferences.be),url=(0,helpers.LK)(pref.apiUrl,window.location.origin),route=new URL(artifact.route,url).toString(),theme=(0,useTheme.A)();return react.createElement(Box.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around","&:hover":{borderBottom:"1px solid"},"&:focus":{borderBottom:`1px solid ${theme.palette.primary.main}`,backgroundColor:theme.palette.primary[50],color:theme.palette.primary[600]}}},react.createElement(OpenInNew.A,null),react.createElement(Link.A,{href:route,color:"secondary",underline:"none",sx:{fontSize:"14px",marginLeft:"5px","&:focus":{color:theme.palette.primary[600]}},target:"_blank"},artifact.name))};ArtifactItem.__docgenInfo={description:"",methods:[],displayName:"ArtifactItem",props:{artifact:{required:!0,tsType:{name:"signature",type:"object",raw:"{\n name: string;\n route: string;\n}",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"route",value:{name:"string",required:!0}}]}},description:"@param artifact type with the name and route properties"}}};var CircularProgress=__webpack_require__("./node_modules/@mui/material/CircularProgress/CircularProgress.js"),ListItem=__webpack_require__("./node_modules/@mui/material/ListItem/ListItem.js"),components=__webpack_require__("./src/components/index.tsx");const ArtifactList=({artifacts})=>{const{typography}=(0,useTheme.A)();return artifacts&&(artifacts=(artifact_list=>{const ordered_list=[];for(let i=0;ireact.createElement(ListItem.Ay,{key:link.name,sx:{padding:"0",marginBottom:index===artifacts.length-1?"0px":"15px",fontFamily:typography.fontFamily}},react.createElement(ArtifactItem,{artifact:link}))))):react.createElement(CircularProgress.A,{size:20}))};ArtifactList.__docgenInfo={description:"",methods:[],displayName:"ArtifactList",props:{artifacts:{required:!0,tsType:{name:"union",raw:"Artifact[] | never[]",elements:[{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n name: string;\n route: string;\n}",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"route",value:{name:"string",required:!0}}]}}],raw:"Artifact[]"},{name:"Array",elements:[{name:"never"}],raw:"never[]"}]},description:"@param artifacts list of artifacts"}}}},"./src/features/channels/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{h6:()=>ChannelsEdit,hY:()=>ChannelsList});var Accordion=__webpack_require__("./node_modules/@mui/material/Accordion/Accordion.js"),Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),react=__webpack_require__("./node_modules/react/index.js"),Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js");const Channel=({channelName})=>react.createElement(Box.A,{className:"box",sx:{display:"flex",alignItems:"center"}},react.createElement(Typography.A,{className:"typography",sx:{color:"#333",fontSize:"13px"}},channelName));Channel.__docgenInfo={description:"",methods:[],displayName:"Channel",props:{channelName:{required:!0,tsType:{name:"string"},description:"@param channelName name of the channel"}}};var styles=__webpack_require__("./src/styles/index.tsx"),components=__webpack_require__("./src/components/index.tsx");const ChannelsList=({channelList})=>react.createElement(Accordion.A,{sx:{maxWidth:420,boxShadow:"none"},disableGutters:!0,defaultExpanded:!0},react.createElement(styles.Ql,{expandIcon:react.createElement(components.HK,null)},react.createElement(styles.AM,{sx:{color:"primary.main"}},"Channels")),react.createElement(styles.uV,{sx:{padding:0}},channelList.map(((channel,index)=>react.createElement(Box.A,{key:channel,sx:{padding:"16px"}},react.createElement(Channel,{channelName:channel}))))));ChannelsList.__docgenInfo={description:"",methods:[],displayName:"ChannelsList",props:{channelList:{required:!0,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:"@param channelList list of channels"}}};var useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js"),AccordionDetails=__webpack_require__("./node_modules/@mui/material/AccordionDetails/AccordionDetails.js"),react_beautiful_dnd_esm=__webpack_require__("./node_modules/react-beautiful-dnd/dist/react-beautiful-dnd.esm.js"),Close=__webpack_require__("./node_modules/@mui/icons-material/Close.js"),TextField=__webpack_require__("./node_modules/@mui/material/TextField/TextField.js");const AddChannel=({onCancel,onSubmit})=>{const[name,setName]=(0,react.useState)(""),handleSubmit=()=>{name&&(onSubmit(name),onCancel())};return react.createElement(Box.A,{sx:{marginBottom:"20px",display:"flex",alignItems:"center"}},react.createElement(TextField.A,{autoFocus:!0,label:"Enter channel",size:"small",onChange:e=>setName(e.target.value),onKeyDown:e=>{"Enter"===e.key&&handleSubmit()},onBlur:handleSubmit,sx:{marginRight:"15px",width:"207px",height:"34px"}}),react.createElement(styles.Bj,{onClick:onCancel},react.createElement(Close.default,{sx:{marginTop:"5px"}})))};AddChannel.__docgenInfo={description:"",methods:[],displayName:"AddChannel",props:{onCancel:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"@param onCancel handler that will run when close icon is clicked\n@param onSubmit handler that will run when the input looses focus or when enter key is pressed"},onSubmit:{required:!0,tsType:{name:"signature",type:"function",raw:"(channelName: string) => void",signature:{arguments:[{type:{name:"string"},name:"channelName"}],return:{name:"void"}}},description:""}}};var helpers=__webpack_require__("./src/utils/helpers/index.ts");const BaseChannelsEditItem=({channelName,onRemove,onEdit})=>{const[name,setName]=(0,react.useState)(channelName),[isEditing,setIsEditing]=(0,react.useState)(!1),{palette}=(0,useTheme.A)(),dragIcon=(0,helpers.CD)(react.createElement(components.F4,{color:"#C4C7CC"}),react.createElement(components.F4,{color:"#A8DAB5"})),boxStyles=(0,helpers.xs)({height:"100%",width:"10px",backgroundColor:"#C4C7CC",display:"inline-block",marginLeft:"-1px",borderRight:"1px solid #F1F1F1",borderLeft:"1px solid #F1F1F1"}),containerStyles=(0,helpers.xs)({height:"32px",width:"205px",backgroundColor:"#F1F1F1",border:"1px solid #BCBFC4",display:"flex",alignItems:"center"}),handleSubmit=()=>{name&&onEdit(channelName,name),setIsEditing(!1)};return react.createElement(Box.A,{sx:{display:"flex",alignItems:"center"}},react.createElement(Box.A,{sx:containerStyles},react.createElement(Box.A,{sx:boxStyles}),dragIcon,!isEditing&&react.createElement(Box.A,{onClick:()=>setIsEditing(!0),sx:{"&:hover":{cursor:"pointer"}}},react.createElement(Typography.A,{sx:{fontSize:"13px",color:palette.common.black}},channelName)),isEditing&&react.createElement(TextField.A,{autoFocus:!0,size:"small",sx:{width:"140px"},inputProps:{style:{padding:"0px 5px"}},onBlur:handleSubmit,value:name,onKeyDown:e=>{"Enter"===e.key&&handleSubmit()},onChange:e=>setName(e.target.value)})),react.createElement(styles.Bj,{sx:{marginLeft:"15px"},onClick:()=>onRemove(channelName),"data-testid":"DeleteIcon"},react.createElement(components.AE,null)))},ChannelsEditItem=(0,react.memo)(BaseChannelsEditItem);BaseChannelsEditItem.__docgenInfo={description:"",methods:[],displayName:"BaseChannelsEditItem",props:{channelName:{required:!0,tsType:{name:"string"},description:"@param channelName list of channels\n@param onRemove handler that will run when delete button is clicked\n@param onEdit handler that will run when editing is finished"},onRemove:{required:!0,tsType:{name:"signature",type:"function",raw:"(channelName: string) => void",signature:{arguments:[{type:{name:"string"},name:"channelName"}],return:{name:"void"}}},description:""},onEdit:{required:!0,tsType:{name:"signature",type:"function",raw:"(channelName: string, newChannelName: string) => void",signature:{arguments:[{type:{name:"string"},name:"channelName"},{type:{name:"string"},name:"newChannelName"}],return:{name:"void"}}},description:""}}};const BaseChannelsEdit=({channelsList,updateChannels,maxWidth=420})=>{const listLength=channelsList.length,{palette}=(0,useTheme.A)(),expandedRef=(0,react.useRef)(listLength>0),[isAdding,setIsAdding]=(0,react.useState)(!1),addNewChannel=channelName=>{updateChannels([...channelsList,channelName])},removeChannel=channelName=>{updateChannels(channelsList.filter((item=>item!==channelName)))},editChannel=(channelName,newChannelName)=>{const newChannelsList=channelsList.map((channel=>channel===channelName?newChannelName:channel));updateChannels(newChannelsList)};return react.createElement(Accordion.A,{defaultExpanded:expandedRef.current,sx:{maxWidth,boxShadow:"none"},disableGutters:!0},react.createElement(styles.Ql,{expandIcon:react.createElement(components.HK,null)},react.createElement(styles.AM,{sx:{color:"primary.main"}},"Channels")),react.createElement(react_beautiful_dnd_esm.JY,{onDragEnd:result=>{if(!result.destination)return;const{destination,source}=result,reorderedArray=(0,helpers.Pj)({list:channelsList,startIndex:source.index,endIndex:destination.index});updateChannels(reorderedArray)}},react.createElement(react_beautiful_dnd_esm.gL,{droppableId:"channels-edit-list"},(provided=>react.createElement(styles.uV,{...provided.droppableProps,ref:provided.innerRef,sx:{padding:"18px 20px",paddingBottom:""+(0===listLength?"20px":"0px"),borderRadius:"0px"}},channelsList.map(((channel,index)=>react.createElement(react_beautiful_dnd_esm.sx,{key:channel,draggableId:channel,index},(provided=>react.createElement(Box.A,{...provided.draggableProps,...provided.dragHandleProps,ref:provided.innerRef,sx:{marginBottom:"20px",width:"247px"}},react.createElement(ChannelsEditItem,{onRemove:removeChannel,channelName:channel,onEdit:editChannel})))))),provided.placeholder,react.createElement(Box.A,null,isAdding&&react.createElement(AddChannel,{onSubmit:addNewChannel,onCancel:()=>setIsAdding(!1)})))))),react.createElement(AccordionDetails.A,{sx:{border:`1px solid ${palette.secondary.light}`,borderTop:"0px",borderRadius:"0px",padding:"15px 21px",display:"flex",justifyContent:"flex-start"}},react.createElement(styles.OV,{color:"secondary",variant:"contained",onClick:()=>setIsAdding(!0)},"+ Add Channel")))},compareProps=(prevProps,nextProps)=>{const isSameArray=JSON.stringify(prevProps.channelsList)===JSON.stringify(nextProps.channelsList),isSameFunc=prevProps.updateChannels===nextProps.updateChannels;return isSameArray&&isSameFunc},ChannelsEdit=(0,react.memo)(BaseChannelsEdit,compareProps);BaseChannelsEdit.__docgenInfo={description:"",methods:[],displayName:"BaseChannelsEdit",props:{channelsList:{required:!0,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:"@param channelsList list of channels\n@param updateChannels handler that will update the channels list"},updateChannels:{required:!0,tsType:{name:"signature",type:"function",raw:"(channels: string[]) => void",signature:{arguments:[{type:{name:"Array",elements:[{name:"string"}],raw:"string[]"},name:"channels"}],return:{name:"void"}}},description:""},maxWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"420",computed:!1}}}}},"./src/features/channels/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{h6:()=>components.h6,hY:()=>components.hY,BC:()=>channelsSlice,sB:()=>updateChannels});var components=__webpack_require__("./src/features/channels/components/index.tsx"),redux_toolkit_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),environmentDetails=__webpack_require__("./src/features/environmentDetails/index.tsx");const channelsSlice=(0,redux_toolkit_esm.Z0)({name:"channels",initialState:{channels:[]},reducers:{updateChannels:(state,action)=>{const channels=action.payload;state.channels=channels}},extraReducers:builder=>{builder.addMatcher(environmentDetails.yX.endpoints.getBuild.matchFulfilled,((state,{payload:{data:{specification:{spec}}}})=>{let channels=[];spec.channels?channels=spec.channels:spec.lockfile?.metadata?.channels&&(channels=spec.lockfile.metadata.channels.map((channel=>channel.url))),state.channels=channels}))}}),{updateChannels}=channelsSlice.actions},"./src/features/dependencies/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{i:()=>Dependencies});var react=__webpack_require__("./node_modules/react/index.js"),Accordion=__webpack_require__("./node_modules/@mui/material/Accordion/Accordion.js"),Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),TableContainer=__webpack_require__("./node_modules/@mui/material/TableContainer/TableContainer.js"),Table=__webpack_require__("./node_modules/@mui/material/Table/Table.js"),TableHead=__webpack_require__("./node_modules/@mui/material/TableHead/TableHead.js"),TableBody=__webpack_require__("./node_modules/@mui/material/TableBody/TableBody.js"),TableRow=__webpack_require__("./node_modules/@mui/material/TableRow/TableRow.js"),TableCell=__webpack_require__("./node_modules/@mui/material/TableCell/TableCell.js"),CircularProgress=__webpack_require__("./node_modules/@mui/material/CircularProgress/CircularProgress.js"),Tooltip=__webpack_require__("./node_modules/@mui/material/Tooltip/Tooltip.js"),InfoOutlined=__webpack_require__("./node_modules/@mui/icons-material/InfoOutlined.js"),index_es=__webpack_require__("./node_modules/react-infinite-scroll-component/dist/index.es.js"),styles=__webpack_require__("./src/styles/index.tsx"),Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js"),components=__webpack_require__("./src/components/index.tsx");const BaseDependenciesItem=({dependency,mode,isLast,handleClick,sx={}})=>{const{name,version}=dependency,isEditMode="edit"===mode;return react.createElement(react.Fragment,null,react.createElement(TableRow.A,{sx},react.createElement(TableCell.A,{sx:{fontSize:"13px",color:"#333",borderBottom:isLast?"none":void 0}},name),react.createElement(TableCell.A,{sx:{textAlign:"right",borderBottom:isLast?"none":void 0}},react.createElement(Typography.A,{sx:{color:"#333",fontSize:"13px",fontFamily:"monospace"}},version,isEditMode&&react.createElement(react.Fragment,null," ",react.createElement(Tooltip.A,{title:"Promote as requested package",placement:"right-start"},react.createElement(styles.Bj,{onClick:handleClick,"data-testid":"PromoteIcon"},react.createElement(components.JM,null))))))))},compareProps=(prevProps,nextProps)=>prevProps.dependency.id===nextProps.dependency.id,DependenciesItem=(0,react.memo)(BaseDependenciesItem,compareProps);BaseDependenciesItem.__docgenInfo={description:"",methods:[],displayName:"BaseDependenciesItem",props:{dependency:{required:!0,tsType:{name:"signature",type:"object",raw:"{\n id: number;\n channel: {\n id: number;\n name: string;\n last_update: Date | null;\n };\n build: string;\n license: string;\n sha256: string;\n name: string;\n version: string;\n summary: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"channel",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n last_update: Date | null;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"last_update",value:{name:"union",raw:"Date | null",elements:[{name:"Date"},{name:"null"}],required:!0}}]},required:!0}},{key:"build",value:{name:"string",required:!0}},{key:"license",value:{name:"string",required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"version",value:{name:"string",required:!0}},{key:"summary",value:{name:"string",required:!0}}]}},description:"@param dependency single dependency\n@param mode change whether we are only able to read this dependency or edit it\n@param handleClick click handler"},mode:{required:!0,tsType:{name:"union",raw:'"read-only" | "edit"',elements:[{name:"literal",value:'"read-only"'},{name:"literal",value:'"edit"'}]},description:""},isLast:{required:!0,tsType:{name:"boolean"},description:""},handleClick:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},sx:{required:!1,tsType:{name:"any"},description:"",defaultValue:{value:"{}",computed:!1}}}};var hooks=__webpack_require__("./src/hooks.ts"),requestedPackages=__webpack_require__("./src/features/requestedPackages/index.tsx");const Dependencies=({mode,dependencies,hasMore,next=()=>null,maxWidth=420})=>{const dispatch=(0,hooks.j)(),{selectedEnvironment}=(0,hooks.G)((state=>state.tabs)),listLength=dependencies.length,scrollRef=(0,react.useRef)(null);return(0,react.useEffect)((()=>{scrollRef.current?.scrollTo(0,0)}),[selectedEnvironment?.id]),react.createElement(Accordion.A,{sx:{maxWidth,boxShadow:"none"},disableGutters:!0,defaultExpanded:!0},react.createElement(styles.Ql,{expandIcon:react.createElement(components.HK,null)},react.createElement(styles.AM,{sx:{color:"primary.main"}},"Installed Packages"," ",react.createElement(Tooltip.A,{title:"Includes requested packages and their dependencies",tabIndex:0},react.createElement(InfoOutlined.A,{sx:{fontSize:"20px",verticalAlign:"top",color:"secondary.main"}})))),react.createElement(styles.uV,{id:"infScroll",sx:{padding:0,maxHeight:"300px"},ref:scrollRef},react.createElement(index_es.A,{hasMore,loader:react.createElement(Box.A,{sx:{display:"flex",justifyContent:"center",marginTop:"10px"}},react.createElement(CircularProgress.A,null)),dataLength:listLength,next,scrollableTarget:"infScroll",style:{overflow:"hidden"}},dependencies.length?react.createElement(TableContainer.A,null,react.createElement(Table.A,{sx:{width:"100%",tableLayout:"fixed"}},react.createElement(TableHead.A,null,react.createElement(TableRow.A,null,react.createElement(TableCell.A,{sx:{fontSize:"13px"}},"Package"),react.createElement(TableCell.A,{sx:{fontSize:"13px",textAlign:"right"}},"Installed Version"))),react.createElement(TableBody.A,null,dependencies.map(((dependency,index)=>react.createElement(DependenciesItem,{key:dependency.id,sx:{backgroundColor:index%2?"secondary.50":"transparent"},mode,dependency,handleClick:()=>dispatch((0,requestedPackages.gj)(dependency)),isLast:index===dependencies.length-1})))))):react.createElement(Box.A,{sx:{display:"flex",justifyContent:"center",padding:"10px"}},react.createElement(CircularProgress.A,{size:20})))))};Dependencies.__docgenInfo={description:"",methods:[],displayName:"Dependencies",props:{dependencies:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n channel: {\n id: number;\n name: string;\n last_update: Date | null;\n };\n build: string;\n license: string;\n sha256: string;\n name: string;\n version: string;\n summary: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"channel",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n last_update: Date | null;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"last_update",value:{name:"union",raw:"Date | null",elements:[{name:"Date"},{name:"null"}],required:!0}}]},required:!0}},{key:"build",value:{name:"string",required:!0}},{key:"license",value:{name:"string",required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"version",value:{name:"string",required:!0}},{key:"summary",value:{name:"string",required:!0}}]}}],raw:"Dependency[]"},description:"@param dependencies list of dependencies\n@param mode change whether the component only displays the list or we are able to edit it\n@param hasMore needed for infinite scroll, if this is true next function will be called\n@param next handler which will be called when we scoll at the current bottom of the infinite scroll lists"},mode:{required:!0,tsType:{name:"union",raw:'"read-only" | "edit"',elements:[{name:"literal",value:'"read-only"'},{name:"literal",value:'"edit"'}]},description:""},hasMore:{required:!0,tsType:{name:"boolean"},description:""},next:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"() => null",computed:!1}},maxWidth:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"420",computed:!1}}}}},"./src/features/dependencies/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{im:()=>components.i,Ac:()=>dependenciesApiSlice,iv:()=>dependenciesSlice,EC:()=>pageChanged,vm:()=>useGetBuildPackagesQuery,n9:()=>useLazyGetBuildPackagesQuery});var components=__webpack_require__("./src/features/dependencies/components/index.tsx");const dependenciesApiSlice=__webpack_require__("./src/features/api/index.ts").l.injectEndpoints({endpoints:builder=>({getBuildPackages:builder.query({query:dto=>`/api/v1/build/${dto.buildId}/packages/?page=${dto.page}&size=${dto.size}`,keepUnusedDataFor:0})})}),{useGetBuildPackagesQuery,useLazyGetBuildPackagesQuery}=dependenciesApiSlice;var redux_toolkit_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),tabs=__webpack_require__("./src/features/tabs/index.tsx");const dependenciesSlice=(0,redux_toolkit_esm.Z0)({name:"dependencies",initialState:{dependencies:[],page:1,count:0,size:0},reducers:{updateDependencies:(state,action)=>{const dependencies=action.payload;state.dependencies=dependencies},pageChanged:(state,action)=>{state.page=action.payload}},extraReducers:builder=>{builder.addCase(tabs.K2.type,(state=>{state.page=1})),builder.addMatcher(dependenciesApiSlice.endpoints.getBuildPackages.matchFulfilled,((state,{payload:{data,size,count,page}})=>{1===page?state.dependencies=data:state.dependencies.push(...data),state.size=size,state.count=count}))}}),{pageChanged,updateDependencies}=dependenciesSlice.actions},"./src/features/environmentDetails/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{C6:()=>EnvironmentDetailsModes,yX:()=>environmentDetailsApiSlice,Or:()=>environmentDetailsSlice,eD:()=>modeChanged,Lw:()=>useCreateOrUpdateMutation,BB:()=>useDeleteEnvironmentMutation,bj:()=>useUpdateBuildIdMutation});var redux_toolkit_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),api=__webpack_require__("./src/features/api/index.ts");const environmentDetailsApiSlice=api.l.injectEndpoints({endpoints:builder=>({getBuild:builder.query({query:buildId=>`/api/v1/build/${buildId}/`,keepUnusedDataFor:0}),createOrUpdate:builder.mutation({query:code=>({url:"/api/v1/specification/",method:"POST",body:code})}),updateBuildId:builder.mutation({query:({namespace,environment,buildId})=>({url:`/api/v1/environment/${namespace}/${environment}/`,method:"PUT",body:{build_id:buildId}})}),deleteEnvironment:builder.mutation({query:({namespace,environment})=>({url:`/api/v1/environment/${namespace}/${environment}/`,method:"DELETE"})})})}),{useGetBuildQuery,useCreateOrUpdateMutation,useUpdateBuildIdMutation,useDeleteEnvironmentMutation}=environmentDetailsApiSlice;var EnvironmentDetailsModes;!function(EnvironmentDetailsModes){EnvironmentDetailsModes.CREATE="create",EnvironmentDetailsModes.READ="read-only",EnvironmentDetailsModes.EDIT="edit"}(EnvironmentDetailsModes||(EnvironmentDetailsModes={}));const environmentDetailsSlice=(0,redux_toolkit_esm.Z0)({name:"environmentDetails",initialState:{mode:"read-only",name:"",prefix:null,isFromLockfile:null},reducers:{modeChanged:(state,action)=>{state.mode=action.payload}},extraReducers:builder=>{builder.addMatcher(environmentDetailsApiSlice.endpoints.getBuild.matchFulfilled,((state,{payload:{data:{specification:{spec:{name,prefix,lockfile}}}}})=>{state.name=name,state.prefix=prefix,state.isFromLockfile=Boolean(lockfile)}))}}),{modeChanged}=environmentDetailsSlice.actions;var react=__webpack_require__("./node_modules/react/index.js"),dist=__webpack_require__("./node_modules/mui-file-dropzone/dist/index.js"),Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),Button=__webpack_require__("./node_modules/@mui/material/Button/Button.js"),Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js"),CodeOutlined=__webpack_require__("./node_modules/@mui/icons-material/CodeOutlined.js"),lodash=__webpack_require__("./node_modules/lodash/lodash.js"),browser=__webpack_require__("./node_modules/yaml/browser/index.js"),components=__webpack_require__("./src/components/index.tsx"),features_channels=__webpack_require__("./src/features/channels/index.tsx"),features_environmentVariables=__webpack_require__("./src/features/environmentVariables/index.tsx"),features_dependencies=__webpack_require__("./src/features/dependencies/index.tsx"),features_requestedPackages=__webpack_require__("./src/features/requestedPackages/index.tsx"),language_dist=__webpack_require__("./node_modules/@codemirror/language/dist/index.js"),yaml=__webpack_require__("./node_modules/@codemirror/legacy-modes/mode/yaml.js"),Alert=__webpack_require__("./node_modules/@mui/material/Alert/Alert.js"),esm=__webpack_require__("./node_modules/@uiw/react-codemirror/esm/index.js"),codemirror_themes_esm=__webpack_require__("./node_modules/@uiw/codemirror-themes/esm/index.js"),highlight_dist=__webpack_require__("./node_modules/@lezer/highlight/dist/index.js");const greenAccentTheme=(0,codemirror_themes_esm.A)({theme:"light",settings:{background:"#ffffff",foreground:"#0A3069",caret:"#cf080c",selection:"#F1F1F1",selectionMatch:"#F1F1F1",lineHighlight:"#8a91991a",gutterBackground:"#fff",gutterForeground:"#57606A",gutterBorder:"transparent"},styles:[{tag:highlight_dist._A.keyword,color:"#116329"}]});var preferences=__webpack_require__("./src/preferences.tsx"),styles=__webpack_require__("./src/styles/index.tsx"),Link=__webpack_require__("./node_modules/@mui/material/Link/Link.js");const CodeEditor=({code,onChangeEditor})=>{const isGrayscaleStyleType="grayscale"===react.useContext(preferences.be).styleType,[isError,setIsError]=(0,react.useState)(!1);return react.createElement(react.Fragment,null,isError&&react.createElement(Alert.A,{severity:"error",sx:{mb:"20px"}},"You have an error in your yaml syntax"),react.createElement(esm.Ay,{value:code,height:"200px",theme:isGrayscaleStyleType?void 0:greenAccentTheme,extensions:[language_dist.Tg.define(yaml.o)],onChange:e=>(e=>{try{setIsError(!1),onChangeEditor((0,browser.qg)(e)||{})}catch(e){setIsError(!0)}})(e),"data-testid":"yaml-editor"}),react.createElement(Box.A,{sx:{mb:"20px"}},react.createElement(styles.SW,null,react.createElement(Typography.A,{sx:{fontSize:"12px"}},"We currently only support the"," ",react.createElement(Link.A,{href:"https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-file-manually",target:"_blank",rel:"noreferrer"},"Conda environment.yml")," ","format. Other environment specification file formats are not supported."))))};CodeEditor.__docgenInfo={description:"",methods:[],displayName:"CodeEditor",props:{code:{required:!0,tsType:{name:"any"},description:""},onChangeEditor:{required:!0,tsType:{name:"signature",type:"function",raw:"(code: {\n channels: string[];\n dependencies: string[];\n variables: Record;\n}) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:"{\n channels: string[];\n dependencies: string[];\n variables: Record;\n}",signature:{properties:[{key:"channels",value:{name:"Array",elements:[{name:"string"}],raw:"string[]",required:!0}},{key:"dependencies",value:{name:"Array",elements:[{name:"string"}],raw:"string[]",required:!0}},{key:"variables",value:{name:"Record",elements:[{name:"string"},{name:"string"}],raw:"Record",required:!0}}]}},name:"code"}],return:{name:"void"}}},description:""}}};var hooks=__webpack_require__("./src/hooks.ts");const LockfileSupportInfo=()=>react.createElement(Typography.A,{sx:{fontSize:"12px"}},"We currently only support the"," ",react.createElement("a",{href:"https://conda.github.io/conda-lock/",target:"_blank",rel:"noreferrer"},"Conda lockfile")," ","format. Other lockfile formats such as Poetry are not supported."),components_LockfileSupportInfo=LockfileSupportInfo;LockfileSupportInfo.__docgenInfo={description:"",methods:[],displayName:"LockfileSupportInfo"};const SpecificationEdit=({descriptionUpdated,defaultEnvVersIsChanged,onSpecificationIsChanged,onDefaultEnvIsChanged,onUpdateEnvironment,onShowDialogAlert,isFromLockfile})=>{const{channels}=(0,hooks.G)((state=>state.channels)),{requestedPackages}=(0,hooks.G)((state=>state.requestedPackages)),{environmentVariables}=(0,hooks.G)((state=>state.environmentVariables)),{dependencies,size,count,page}=(0,hooks.G)((state=>state.dependencies)),hasMore=size*page<=count,dispatch=(0,hooks.j)(),[show,setShow]=(0,react.useState)(!1),[code,setCode]=(0,react.useState)({dependencies:requestedPackages,variables:environmentVariables,channels}),[envIsUpdated,setEnvIsUpdated]=(0,react.useState)(!1),initialChannels=(0,react.useRef)((0,lodash.cloneDeep)(channels)),initialPackages=(0,react.useRef)((0,lodash.cloneDeep)(requestedPackages)),initialEnvironmentVariables=(0,react.useRef)((0,lodash.cloneDeep)(environmentVariables)),stringifiedInitialChannels=(0,react.useMemo)((()=>JSON.stringify(initialChannels.current)),[initialChannels.current]),stringifiedInitialPackages=(0,react.useMemo)((()=>JSON.stringify(initialPackages.current)),[initialPackages.current]),stringifiedInitialEnvironmentVariables=(0,react.useMemo)((()=>JSON.stringify(initialEnvironmentVariables.current)),[initialEnvironmentVariables.current]),onUpdateChannels=(0,react.useCallback)((channels=>{dispatch((0,features_channels.sB)(channels)),onDefaultEnvIsChanged(!1)}),[]),onUpdateDefaultEnvironment=isChanged=>{onDefaultEnvIsChanged(isChanged),onSpecificationIsChanged(!isChanged)},onUpdateEditor=(0,lodash.debounce)((({channels,dependencies,variables})=>{const code={dependencies,channels,variables},isDifferentChannels=JSON.stringify(code.channels)!==stringifiedInitialChannels,isDifferentPackages=JSON.stringify(code.dependencies)!==stringifiedInitialPackages,isDifferentEnvironmentVariables=JSON.stringify(code.variables)!==stringifiedInitialEnvironmentVariables;channels&&0!==channels.length||(code.channels=[]),dependencies&&0!==dependencies.length||(code.dependencies=[]),variables&&0!==Object.keys(variables).length||(code.variables={}),(isDifferentChannels||isDifferentPackages||isDifferentEnvironmentVariables)&&(setEnvIsUpdated(!0),onUpdateDefaultEnvironment(!1),onSpecificationIsChanged(!0)),setCode(code)}),200);(0,react.useEffect)((()=>{descriptionUpdated&&setEnvIsUpdated(!0);const isDifferentChannels=JSON.stringify(channels)!==stringifiedInitialChannels,isDifferentPackages=JSON.stringify(requestedPackages)!==stringifiedInitialPackages,isDifferentEnvironmentVariables=JSON.stringify(environmentVariables)!==stringifiedInitialEnvironmentVariables;defaultEnvVersIsChanged?setEnvIsUpdated(!1):(isDifferentChannels||isDifferentPackages||isDifferentEnvironmentVariables)&&setEnvIsUpdated(!0)}),[channels,requestedPackages,environmentVariables,descriptionUpdated]);const[mode,setMode]=react.useState(isFromLockfile?1:0),[showDialog,setShowDialog]=react.useState(!1),[files,setFiles]=react.useState([]);return react.createElement(Box.A,null,0===mode?react.createElement(components.Kl,{title:"Specification",onToggleEditMode:value=>{show?(dispatch((0,features_requestedPackages.$R)(code.dependencies)),dispatch((0,features_channels.sB)(code.channels)),dispatch((0,features_environmentVariables.E)(code.variables))):setCode({dependencies:requestedPackages,variables:environmentVariables,channels}),setShow(value)},isEditMode:show,setShowDialog},react.createElement(Box.A,null,show?react.createElement(CodeEditor,{code:(0,browser.As)({channels,dependencies:requestedPackages,variables:environmentVariables}),onChangeEditor:onUpdateEditor}):react.createElement(react.Fragment,null,react.createElement(Box.A,{sx:{marginBottom:"30px"}},react.createElement(features_requestedPackages.gC,{packageList:requestedPackages,onDefaultEnvIsChanged:onUpdateDefaultEnvironment})),!isFromLockfile&&react.createElement(Box.A,{sx:{marginBottom:"30px"}},react.createElement(features_dependencies.im,{mode:"edit",dependencies,hasMore,next:()=>dispatch((0,features_dependencies.EC)(page+1)),maxWidth:500})),react.createElement(Box.A,{sx:{marginBottom:"30px"}},react.createElement(features_channels.h6,{channelsList:channels,updateChannels:onUpdateChannels,maxWidth:500}))))):react.createElement(Box.A,{sx:{border:"1px solid #E0E0E0",paddingBottom:"15px"}},react.createElement(Box.A,{sx:{padding:"10px 15px",borderBottom:"1px solid #E0E0E0"}},react.createElement(Box.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"}},react.createElement(Typography.A,{"data-testid":"block-container-title",sx:{fontSize:"14px",fontWeight:600,color:"#333"}},"Conda Lockfile Upload"),react.createElement(Button.A,{variant:"outlined",color:"secondary",size:"small",startIcon:react.createElement(CodeOutlined.A,null),onClick:()=>setShowDialog(!0)},"Switch to Specification"))),react.createElement(Box.A,{sx:{padding:"15px 15px 0 15px"}},react.createElement(dist.DropzoneArea,{fileObjects:files,onChange:async files=>setFiles(files),filesLimit:1,showPreviews:!0,showPreviewsInDropzone:!1,showFileNamesInPreview:!0,previewText:""}),react.createElement(Box.A,null,react.createElement(components_LockfileSupportInfo,null)))),react.createElement(components.Lt,{title:"Switch to "+(0===mode?"Conda Lockfile Upload":"Specification"),description:`If you switch to ${0===mode?"Conda Lockfile Upload":"Specification"}, you ${0===mode?"may":"will"} lose your work in this section of the form.`,isOpen:showDialog,closeAction:()=>setShowDialog(!1),confirmAction:()=>{setMode(0===mode?1:0),setShowDialog(!1)},confirmText:"Continue"}),react.createElement(Box.A,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"flex-end",gap:"30px",marginTop:"45px",marginBottom:"10px"}},react.createElement(Typography.A,{sx:{fontSize:"13px",color:"#333",textDecoration:"underline",cursor:"pointer"},onClick:()=>onShowDialogAlert(!0)},"Delete environment"),react.createElement(styles.OV,{color:"primary",sx:{padding:"5px 48px"},onClick:()=>{setEnvIsUpdated(!1),onSpecificationIsChanged(!1),dispatch(modeChanged(EnvironmentDetailsModes.READ)),dispatch((0,features_requestedPackages.$R)(initialPackages.current)),dispatch((0,features_channels.sB)(initialChannels.current)),dispatch((0,features_environmentVariables.E)(initialEnvironmentVariables.current))}},"Cancel"),react.createElement(styles.OV,{color:"primary",sx:{padding:"5px 48px"},onClick:async()=>{if(0===mode){onUpdateEnvironment(show?code:{dependencies:requestedPackages,variables:environmentVariables,channels})}else if(files.length){const text=await files[0].text();onUpdateEnvironment(text)}},disabled:0===mode?!envIsUpdated:!files?.length},"Save")))};SpecificationEdit.__docgenInfo={description:"",methods:[],displayName:"SpecificationEdit",props:{descriptionUpdated:{required:!0,tsType:{name:"boolean"},description:""},defaultEnvVersIsChanged:{required:!0,tsType:{name:"boolean"},description:""},onSpecificationIsChanged:{required:!0,tsType:{name:"signature",type:"function",raw:"(specificationIsChanged: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"specificationIsChanged"}],return:{name:"void"}}},description:""},onDefaultEnvIsChanged:{required:!0,tsType:{name:"signature",type:"function",raw:"(defaultEnvVersIsChanged: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"defaultEnvVersIsChanged"}],return:{name:"void"}}},description:""},onUpdateEnvironment:{required:!0,tsType:{name:"signature",type:"function",raw:"(specification: any) => void",signature:{arguments:[{type:{name:"any"},name:"specification"}],return:{name:"void"}}},description:""},onShowDialogAlert:{required:!0,tsType:{name:"signature",type:"function",raw:"(showDialog: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"showDialog"}],return:{name:"void"}}},description:""},isFromLockfile:{required:!0,tsType:{name:"boolean"},description:""}}};var artifacts_components=__webpack_require__("./src/features/artifacts/components/index.tsx");const artifactsApiSlice=api.l.injectEndpoints({endpoints:builder=>({getArtifacts:builder.query({query:buildId=>`/api/v1/build/${buildId}/`,transformResponse:response=>response.data.build_artifacts.map((artifact=>artifact.artifact_type))})})}),{useLazyGetArtifactsQuery}=artifactsApiSlice,SpecificationReadOnly=({isFromLockfile,lockfileUrl})=>{const{requestedPackages}=(0,hooks.G)((state=>state.requestedPackages)),{channels}=(0,hooks.G)((state=>state.channels)),{dependencies,size,count,page}=(0,hooks.G)((state=>state.dependencies)),dispatch=(0,hooks.j)(),hasMore=size*page<=count;return react.createElement(components.ZO,{title:isFromLockfile?"Conda Lockfile":"Specification"},!isFromLockfile&&react.createElement(Box.A,{sx:{marginBottom:"30px"}},react.createElement(features_requestedPackages.ft,{packageList:requestedPackages})),react.createElement(Box.A,{sx:{marginBottom:"30px"}},isFromLockfile&&lockfileUrl&&react.createElement(Box.A,{sx:{display:"flex",fontFamily:"fontFamily",marginBottom:"30px"}},react.createElement(artifacts_components.W,{artifact:{name:"Show .conda-lock.yml file",route:lockfileUrl}})),react.createElement(features_dependencies.im,{mode:"read-only",dependencies,hasMore,next:()=>dispatch((0,features_dependencies.EC)(page+1))})),react.createElement(Box.A,{sx:{marginBottom:"30px"}},react.createElement(features_channels.hY,{channelList:channels})))};SpecificationReadOnly.__docgenInfo={description:"",methods:[],displayName:"SpecificationReadOnly",props:{isFromLockfile:{required:!1,tsType:{name:"boolean"},description:""},lockfileUrl:{required:!1,tsType:{name:"string"},description:""}}};var rtk_query_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/query/rtk-query.esm.js"),react_router_dist=__webpack_require__("./node_modules/react-router/dist/index.js"),parseArtifactList=__webpack_require__("./src/utils/helpers/parseArtifactList.ts"),TextField=__webpack_require__("./node_modules/@mui/material/TextField/TextField.js"),useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js");const EnvironmentDetailsHeader=({envName="",namespace,onUpdateName,showEditButton=!0})=>{const{mode}=(0,hooks.G)((state=>state.environmentDetails)),dispatch=(0,hooks.j)(),{palette}=(0,useTheme.A)();return react.createElement(Box.A,{sx:{display:"flex",alignItems:"center",justifyContent:mode===EnvironmentDetailsModes.CREATE?"start":"space-between",marginBottom:"15px"}},(mode===EnvironmentDetailsModes.READ||mode===EnvironmentDetailsModes.EDIT)&&react.createElement(react.Fragment,null,react.createElement(Typography.A,{sx:{fontSize:"16px",color:palette.common.black,fontWeight:600}},envName),mode===EnvironmentDetailsModes.READ&&react.createElement(styles.OV,{color:"primary",disabled:!showEditButton,onClick:()=>dispatch(modeChanged(EnvironmentDetailsModes.EDIT))},"Edit")),mode===EnvironmentDetailsModes.CREATE&&react.createElement(react.Fragment,null,namespace&&react.createElement(react.Fragment,null,react.createElement(TextField.A,{label:"Namespace",value:namespace,disabled:!0,size:"small"}),react.createElement("div",{"aria-hidden":!0,style:{borderRight:`2px solid ${palette.secondary.main}`,transform:"skew(-15deg)",margin:"0 1rem",height:"1.6rem"}})),react.createElement(TextField.A,{autoFocus:!0,label:"Environment name",sx:{backgroundColor:palette.grey[100],minWidth:"450px","&:hover fieldset":{borderColor:palette.secondary.main}},inputProps:{style:{color:palette.common.black}},size:"small",onChange:e=>onUpdateName(e.target.value)})))};EnvironmentDetailsHeader.__docgenInfo={description:"",methods:[],displayName:"EnvironmentDetailsHeader",props:{envName:{required:!1,tsType:{name:"string"},description:"@param envName name of the selected environment\n@param namespace namespace of the environment\n@param onUpdateName change environment name",defaultValue:{value:'""',computed:!1}},namespace:{required:!1,tsType:{name:"string"},description:""},showEditButton:{required:!1,tsType:{name:"union",raw:"boolean | undefined",elements:[{name:"boolean"},{name:"undefined"}]},description:"",defaultValue:{value:"true",computed:!1}},onUpdateName:{required:!0,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""}}};var tabs=__webpack_require__("./src/features/tabs/index.tsx"),metadata=__webpack_require__("./src/features/metadata/index.tsx"),artifact=__webpack_require__("./src/utils/helpers/artifact.ts");function createLabel(name,type){return{create:`The environment ${name} is being created`,update:`The environment ${name} has been updated`,updateBuild:`The environment ${name} has been updated with the selected build`,delete:`The environment ${name} has been deleted`,error:"An error occurred while processing your request",confirm:`Are you sure you want to delete the environment: ${name}?`}[type]}var Dialog=__webpack_require__("./src/components/Dialog.tsx"),helpers=__webpack_require__("./src/utils/helpers/index.ts"),notificationSlice=__webpack_require__("./src/features/notification/notificationSlice.ts");__webpack_require__("./src/features/environments/components/index.tsx"),__webpack_require__("./src/features/environments/environmentsApiSlice.ts");(()=>{const dispatch=(0,hooks.j)(),{namespaceName,environmentName}=(0,react_router_dist.g)(),namespace=(0,hooks.G)((state=>state.namespaces.data)).find((({name})=>name===namespaceName)),environment=(0,hooks.G)((state=>state.environments.data)).find((environment=>environment.namespace.name===namespaceName&&environment.name===environmentName));(0,react.useEffect)((()=>{namespace&&environment&&(dispatch((0,tabs.tj)({environment,canUpdate:namespace.canUpdate})),dispatch(modeChanged(EnvironmentDetailsModes.READ)),dispatch((0,tabs.Ho)(!1)))}),[namespace&&namespace.name,environment&&environment.name]);const navigate=(0,react_router_dist.Zp)(),{mode}=(0,hooks.G)((state=>state.environmentDetails)),{page,dependencies}=(0,hooks.G)((state=>state.dependencies)),{selectedEnvironment}=(0,hooks.G)((state=>state.tabs)),{currentBuild}=(0,hooks.G)((state=>state.enviroments)),{isFromLockfile}=(0,hooks.G)((state=>state.environmentDetails)),[name,setName]=(0,react.useState)(selectedEnvironment?.name||""),scrollRef=function useScrollRef(){return(0,react_router_dist.KC)()}(),[descriptionIsUpdated,setDescriptionIsUpdated]=(0,react.useState)(!1),[description,setDescription]=(0,react.useState)(selectedEnvironment?selectedEnvironment.description:void 0),[currentBuildId,setCurrentBuildId]=(0,react.useState)(selectedEnvironment?.current_build_id),[artifactType,setArtifactType]=(0,react.useState)([]),[showDialog,setShowDialog]=(0,react.useState)(!1),[defaultEnvVersIsChanged,setDefaultEnvVersIsChanged]=(0,react.useState)(!1),[specificationIsChanged,setSpecificationIsChanged]=(0,react.useState)(!1),[error,setError]=(0,react.useState)({message:"",visible:!1}),[triggerQuery]=useLazyGetArtifactsQuery(),[triggerBuildPackages]=(0,features_dependencies.n9)(),[createOrUpdate]=useCreateOrUpdateMutation(),[updateBuildId]=useUpdateBuildIdMutation(),[deleteEnvironment]=useDeleteEnvironmentMutation();(0,metadata.Wc)(selectedEnvironment??rtk_query_esm.hT,{pollingInterval:5e3});const{isFetching}=useGetBuildQuery(currentBuildId,{skip:!currentBuildId});(0,features_dependencies.vm)({buildId:currentBuildId,page,size:100},{skip:isFetching||!currentBuildId});const updateDefaultEnvironmentVersion=isChanged=>{setDefaultEnvVersIsChanged(isChanged)};(0,react.useEffect)((()=>{setName(selectedEnvironment?.name||""),setDescription(selectedEnvironment?.description||""),setCurrentBuildId(selectedEnvironment?.current_build_id),setError({message:"",visible:!1}),setDescriptionIsUpdated(!1),setArtifactType([])}),[selectedEnvironment]),(0,react.useEffect)((()=>{currentBuild.id&&(setCurrentBuildId(currentBuild.id),setArtifactType([]))}),[currentBuild]);return(0,helpers.$$)((async()=>{(async()=>{(async()=>{if(!currentBuildId||artifactType.includes("DOCKER_MANIFEST"))return;const{data}=await triggerQuery(currentBuildId),apiArtifactTypes=(0,parseArtifactList.n)(data);setArtifactType(apiArtifactTypes)})(),(async()=>{currentBuildId&&!dependencies.length&&await triggerBuildPackages({buildId:currentBuildId,page,size:100})})()})()}),5e3),selectedEnvironment?react.createElement(Box.A,{sx:{padding:"15px 12px"}},react.createElement(EnvironmentDetailsHeader,{envName:name,namespace:namespace?.name,onUpdateName:setName,showEditButton:selectedEnvironment?.canUpdate}),error.visible&&react.createElement(Alert.A,{severity:"error",sx:{mb:"20px"}},error.message),react.createElement(Box.A,{sx:{marginBottom:"30px"}},react.createElement(metadata.fn,{mode,currentBuildId:selectedEnvironment?.current_build_id,selectedBuildId:currentBuildId,description,specificationIsChanged,onDefaultEnvIsChanged:updateDefaultEnvironmentVersion,onUpdateDescription:description=>{setDescription(description),setDescriptionIsUpdated(!0)},onUpdateBuildId:async buildId=>{if(selectedEnvironment)try{await updateBuildId({namespace:selectedEnvironment.namespace.name,environment:selectedEnvironment.name,buildId}).unwrap(),dispatch((0,tabs.ww)(buildId)),dispatch((0,notificationSlice.Ds)(createLabel(selectedEnvironment.name,"updateBuild")))}catch(e){setError({message:createLabel(void 0,"error"),visible:!0})}}})),react.createElement(Box.A,{sx:{marginBottom:"30px"}},"read-only"===mode&&react.createElement(SpecificationReadOnly,{isFromLockfile:Boolean(isFromLockfile),lockfileUrl:`api/v1/build/${currentBuildId}/lockfile`}),"edit"===mode&&!isFetching&&react.createElement(SpecificationEdit,{descriptionUpdated:descriptionIsUpdated,defaultEnvVersIsChanged,onSpecificationIsChanged:isChanged=>{setSpecificationIsChanged(isChanged)},onDefaultEnvIsChanged:updateDefaultEnvironmentVersion,onUpdateEnvironment:async code=>{if(!selectedEnvironment)return;const namespace=selectedEnvironment.namespace.name,environment=selectedEnvironment.name;let environmentInfo;environmentInfo="string"==typeof code?{namespace,specification:code,environment_name:environment,environment_description:description,is_lockfile:!0}:{specification:`${(0,browser.As)(code)}\ndescription: ${description}\nname: ${environment}\nprefix: null`,namespace};try{const{data}=await createOrUpdate(environmentInfo).unwrap();dispatch(modeChanged(EnvironmentDetailsModes.READ)),setCurrentBuildId(data.build_id),dispatch((0,metadata.rP)(data.build_id)),dispatch((0,notificationSlice.Ds)(createLabel(environment,"update")))}catch(e){setError({message:e?.data?.message??e.error??e.status??createLabel(void 0,"error"),visible:!0})}scrollRef.current?.scrollTo(0,0)},onShowDialogAlert:showDialog=>setShowDialog(showDialog),isFromLockfile:Boolean(isFromLockfile),key:currentBuildId})),"read-only"===mode&&react.createElement(Box.A,null,react.createElement(artifacts_components.V,{artifacts:(0,artifact.A)(currentBuildId,artifactType)})),selectedEnvironment&&react.createElement(Dialog.L,{title:"Delete Environment",description:createLabel(selectedEnvironment.name,"confirm"),isOpen:showDialog,closeAction:()=>setShowDialog(!1),confirmAction:async()=>{if(selectedEnvironment){try{await deleteEnvironment({namespace:selectedEnvironment.namespace.name,environment:selectedEnvironment.name}).unwrap(),dispatch(modeChanged(EnvironmentDetailsModes.READ)),dispatch((0,tabs.yF)({envId:selectedEnvironment.id,selectedEnvironmentId:selectedEnvironment.id})),dispatch((0,notificationSlice.Ds)(createLabel(selectedEnvironment.name,"delete"))),navigate("/")}catch(e){setError({message:createLabel(void 0,"error"),visible:!0})}scrollRef.current?.scrollTo(0,0),setShowDialog(!1)}}})):null}).__docgenInfo={description:"",methods:[],displayName:"EnvironmentDetails"}},"./src/features/environmentVariables/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{l:()=>environmentVariablesSlice,E:()=>updateEnvironmentVariables});var redux_toolkit_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),environmentDetails=__webpack_require__("./src/features/environmentDetails/index.tsx");const environmentVariablesSlice=(0,redux_toolkit_esm.Z0)({name:"environmentVariables",initialState:{environmentVariables:{}},reducers:{updateEnvironmentVariables:(state,action)=>{const environmentVariables=action.payload;state.environmentVariables=environmentVariables}},extraReducers:builder=>{builder.addMatcher(environmentDetails.yX.endpoints.getBuild.matchFulfilled,((state,{payload:{data:{specification:{spec}}}})=>{const environmentVariables=spec?.variables??[];state.environmentVariables=environmentVariables}))}}),{updateEnvironmentVariables}=environmentVariablesSlice.actions},"./src/features/environments/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{B5:()=>Environments});var react=__webpack_require__("./node_modules/react/index.js"),Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js"),Link=__webpack_require__("./node_modules/@mui/material/Link/Link.js"),useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js"),CircularProgress=__webpack_require__("./node_modules/@mui/material/CircularProgress/CircularProgress.js"),index_es=__webpack_require__("./node_modules/react-infinite-scroll-component/dist/index.es.js"),styles=__webpack_require__("./src/styles/index.tsx");const PERMISSIONS_environmentUpdate="environment::update",PERMISSIONS_namespaceCreate="namespace::create",isNamespaceListed=(list,primaryNamespace)=>!("default"!==primaryNamespace.name&&!list.some((item=>item.name===primaryNamespace.name))),checkMyPrimaryNamespace=(list,primaryNamespace)=>list.map((item=>item.name===primaryNamespace.name?{...item,isPrimary:"default"!==primaryNamespace.name,canUpdate:!0,canCreate:!0}:item));var components=__webpack_require__("./src/components/index.tsx"),dist=__webpack_require__("./node_modules/react-router-dom/dist/index.js"),Accordion=__webpack_require__("./node_modules/@mui/material/Accordion/Accordion.js"),Add=__webpack_require__("./node_modules/@mui/icons-material/Add.js"),Tooltip=__webpack_require__("./node_modules/@mui/material/Tooltip/Tooltip.js"),AccordionDetails=__webpack_require__("./node_modules/@mui/material/AccordionDetails/AccordionDetails.js"),List=__webpack_require__("./node_modules/@mui/material/List/List.js"),ListItem=__webpack_require__("./node_modules/@mui/material/ListItem/ListItem.js"),Circle=__webpack_require__("./node_modules/@mui/icons-material/Circle.js"),ListItemIcon=__webpack_require__("./node_modules/@mui/material/ListItemIcon/ListItemIcon.js"),Button=__webpack_require__("./node_modules/@mui/material/Button/Button.js");const Environment=({environment,selectedEnvironmentId})=>{const isSelected=selectedEnvironmentId===environment.id,theme=(0,useTheme.A)();return react.createElement(react.Fragment,null,react.createElement(ListItemIcon.A,{sx:{width:"5px",minWidth:"auto",marginRight:"12px"}},react.createElement(Circle.A,{sx:{width:"5px",height:"5px",color:isSelected?theme.palette.primary.main:theme.palette.common.black}})),react.createElement(Button.A,{component:dist.N_,to:`/${environment.namespace.name}/${environment.name}`,sx:{color:isSelected?theme.palette.primary.main:theme.palette.common.black,backgroundColor:isSelected?theme.palette.primary[50]:"none",borderRadius:"0px",padding:"0px",minWidth:"auto",textTransform:"none",fontSize:"13px",fontWeight:isSelected?600:400,textDecoration:isSelected?"underline":"none",textUnderlineOffset:"0.3em",":hover":{boxShadow:"none",textDecoration:"underline",textUnderlineOffset:"0.3em"}}},environment.name))};Environment.__docgenInfo={description:"",methods:[],displayName:"Environment",props:{environment:{required:!0,tsType:{name:"signature",type:"object",raw:"{\n id: number;\n namespace: { id: number; name: string };\n name: string;\n current_build_id: number;\n current_build: number | null;\n description: string;\n canUpdate?: boolean;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"namespace",value:{name:"signature",type:"object",raw:"{ id: number; name: string }",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}}]},required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"current_build_id",value:{name:"number",required:!0}},{key:"current_build",value:{name:"union",raw:"number | null",elements:[{name:"number"},{name:"null"}],required:!0}},{key:"description",value:{name:"string",required:!0}},{key:"canUpdate",value:{name:"boolean",required:!1}}]}},description:"@param environment environment\n@param onClick click handler\n@param selectedEnvironmentId id of the currently selected environment"},selectedEnvironmentId:{required:!0,tsType:{name:"union",raw:"number | undefined",elements:[{name:"number"},{name:"undefined"}]},description:""}}};var hooks=__webpack_require__("./src/hooks.ts");const EnvironmentDropdown=({data:{namespace,environments,canCreate,canUpdate}})=>{const{selectedEnvironment}=(0,hooks.G)((state=>state.tabs)),[isExpanded,setIsExpanded]=(0,react.useState)(!1),{palette}=(0,useTheme.A)();return react.createElement(Accordion.A,{sx:{border:"none",position:"initial",backgroundColor:"transparent"},elevation:0,expanded:isExpanded,disableGutters:!0,onChange:()=>setIsExpanded(!isExpanded)},react.createElement(styles.Ql,{sx:{flexDirection:"row-reverse",border:"none",paddingRight:"1px"},expandIcon:react.createElement(components.HK,null)},react.createElement(Box.A,{sx:{width:"100%",marginLeft:"15px",display:"flex",alignItems:"center",justifyContent:"space-between"}},react.createElement(Typography.A,{sx:{fontWeight:600,fontSize:"14px",color:palette.common.black}},namespace),react.createElement(Tooltip.A,{title:canCreate?`Create a new environment in the ${namespace} namespace`:`You do not have permission to create an environment in the ${namespace} namespace`},react.createElement(styles.Bj,{component:dist.N_,to:`/${namespace}/new-environment`,style:{textTransform:"none",paddingRight:"0.4rem"},onClick:event=>{canCreate?isExpanded&&event.stopPropagation():(event.preventDefault(),event.stopPropagation())},"aria-disabled":!canCreate},react.createElement(Add.A,null)," New")))),react.createElement(AccordionDetails.A,{sx:{paddingLeft:"30px",paddingTop:"5px",paddingBottom:"0px"}},react.createElement(List.A,{sx:{padding:"0px"}},environments.map((environment=>react.createElement(ListItem.Ay,{key:environment.id,disablePadding:!0,sx:{marginBottom:"20px"}},react.createElement(Environment,{environment,selectedEnvironmentId:selectedEnvironment?.id})))))))};EnvironmentDropdown.__docgenInfo={description:"",methods:[],displayName:"EnvironmentDropdown",props:{data:{required:!0,tsType:{name:"INamespaceEnvironments"},description:"@param data object containing the namespace information and the list of environments that belong to it"}}};const EnvironmentsList=({environmentsList,namespacesList,hasMore,next,search})=>{const scrollRef=(0,react.useRef)(null),{palette}=(0,useTheme.A)(),{primaryNamespace,sharedNamespaces}=(0,react.useMemo)((()=>{const envsGroupedByNamespace=((environmentsList,namespacesList)=>{const environments=(environmentsList=>environmentsList.reduce(((acc,curr)=>(acc[curr.namespace.name]||(acc[curr.namespace.name]=[]),acc[curr.namespace.name]=[...acc[curr.namespace.name],curr],acc)),{}))(environmentsList);return namespacesList.map((namespace=>({namespace:namespace.name,environments:environments[namespace.name]??[],isPrimary:!!namespace.isPrimary,canCreate:namespace.canCreate,canUpdate:namespace.canUpdate})))})(environmentsList,namespacesList),primaryNamespace=(namespaces=envsGroupedByNamespace,Object.values(namespaces).find((namespace=>{if(namespace.isPrimary)return{namespace:namespace.namespace,environments:namespace.environments}})));var namespaces;const sharedNamespaces=(namespaces=>Object.values(namespaces).filter((namespace=>{if(!namespace.isPrimary)return{namespace:namespace.namespace,environments:namespace.environments}})))(envsGroupedByNamespace);return{primaryNamespace,sharedNamespaces}}),[environmentsList,namespacesList]);return(0,react.useEffect)((()=>{scrollRef.current?.scrollTo(0,0)}),[search]),react.createElement(styles.so,{id:"environmentsScroll",ref:scrollRef},react.createElement(index_es.A,{scrollableTarget:"environmentsScroll",style:{overflow:"hidden",paddingBottom:"25px"},dataLength:environmentsList.length,hasMore,next,loader:react.createElement(Box.A,{sx:{display:"flex",justifyContent:"center",marginTop:"10px"}},react.createElement(CircularProgress.A,null))},primaryNamespace&&react.createElement(Box.A,{sx:{minHeight:"50px",margin:"-5px 0 5px 0px"}},react.createElement(EnvironmentDropdown,{data:primaryNamespace})),react.createElement(Box.A,{sx:{display:"flex",alignItems:"center",margin:"0 0 5px 12px",paddingTop:"20px"}},react.createElement(components.Cy,{style:{marginRight:"10px",width:"27"}}),react.createElement(Typography.A,{sx:{fontWeight:600,marginRight:"10px",fontSize:"15px",color:palette.grey[700]}},"Shared Environments")),sharedNamespaces&&sharedNamespaces.map((namespace=>react.createElement(EnvironmentDropdown,{key:namespace.namespace,data:namespace})))))};EnvironmentsList.__docgenInfo={description:"",methods:[],displayName:"EnvironmentsList",props:{environmentsList:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n namespace: { id: number; name: string };\n name: string;\n current_build_id: number;\n current_build: number | null;\n description: string;\n canUpdate?: boolean;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"namespace",value:{name:"signature",type:"object",raw:"{ id: number; name: string }",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}}]},required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"current_build_id",value:{name:"number",required:!0}},{key:"current_build",value:{name:"union",raw:"number | null",elements:[{name:"number"},{name:"null"}],required:!0}},{key:"description",value:{name:"string",required:!0}},{key:"canUpdate",value:{name:"boolean",required:!1}}]}}],raw:"Environment[]"},description:"@param environmentsList environments list\n@param namespacesList namespaces list\n@param hasMore indicates whether there are more items to fetch\n@param next function that will run on the bottom of the inf scroll\n@param search current search"},namespacesList:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number | undefined;\n name: string;\n isPrimary?: boolean;\n canUpdate?: boolean;\n canCreate?: boolean;\n}",signature:{properties:[{key:"id",value:{name:"union",raw:"number | undefined",elements:[{name:"number"},{name:"undefined"}],required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"isPrimary",value:{name:"boolean",required:!1}},{key:"canUpdate",value:{name:"boolean",required:!1}},{key:"canCreate",value:{name:"boolean",required:!1}}]}}],raw:"Namespace[]"},description:""},hasMore:{required:!0,tsType:{name:"boolean"},description:""},next:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},search:{required:!0,tsType:{name:"string"},description:""}}};var lodash=__webpack_require__("./node_modules/lodash/lodash.js"),OutlinedInput=__webpack_require__("./node_modules/@mui/material/OutlinedInput/OutlinedInput.js"),InputAdornment=__webpack_require__("./node_modules/@mui/material/InputAdornment/InputAdornment.js"),preferences=__webpack_require__("./src/preferences.tsx"),api=__webpack_require__("./src/features/api/index.ts");const authApiSlice=api.l.injectEndpoints({endpoints:builder=>({getAuth:builder.query({query:()=>"/api/v1/permission/"}),logout:builder.mutation({query:logoutUrl=>({url:logoutUrl,method:"POST"})}),login:builder.mutation({query:loginUrl=>({url:loginUrl,method:"GET"})})})}),{useLazyGetAuthQuery,useLogoutMutation,useLoginMutation}=authApiSlice,AuthButton=()=>{const prefs=react.useContext(preferences.be),authUrl=prefs.loginUrl,pageUrl=window.location.href,loginPageUrl=`${authUrl}${pageUrl}`,logoutUrl=prefs.logoutUrl,[triggerAuthQuery]=useLazyGetAuthQuery(),[triggerLogout]=useLogoutMutation(),[triggerLogin]=useLoginMutation(),[authenticated,setAuthenticated]=(0,react.useState)(!1),handleOnClick=()=>{authenticated?(async()=>{await triggerLogout(logoutUrl),setAuthenticated(!1),window.location.href=pageUrl})():(async()=>{await triggerLogin(loginPageUrl),setAuthenticated(!0),window.location.href=loginPageUrl})()};return(0,react.useEffect)((()=>{(async()=>{(async()=>{const{data:permissions}=await triggerAuthQuery();setAuthenticated(permissions.data.authenticated)})()})()}),[]),react.createElement(styles.OV,{color:"primary",onClick:()=>{handleOnClick()},sx:{position:"absolute",top:14,right:18}},authenticated?"Log out":"Log in")};AuthButton.__docgenInfo={description:"",methods:[],displayName:"AuthButton"};const EnvironmentsSearch=({onChange})=>{const prefs=react.useContext(preferences.be),{palette}=(0,useTheme.A)(),showAuthButton=prefs.showAuthButton,isCookieAuthMethod="cookie"===prefs.authMethod;let authButton;return showAuthButton&&isCookieAuthMethod&&(authButton=react.createElement(AuthButton,null)),react.createElement(Box.A,{sx:{padding:"15px 12px",position:"relative"}},react.createElement(Box.A,{sx:{position:"absolute",top:14,height:35,width:"auto"}},react.createElement(components.Bz,{transform:"0.5"})),authButton,react.createElement(Typography.A,{"data-testid":"env-search-title",sx:{marginBottom:"14px",textAlign:"left",color:palette.common.black,fontWeight:600,fontSize:"14px",marginTop:"55px"}},"Package Manager"),react.createElement(OutlinedInput.A,{onChange,size:"small",notched:!1,endAdornment:react.createElement(InputAdornment.A,{position:"end"},react.createElement(components.Li,{style:{marginRight:"5px"}})),placeholder:"Search for environment",sx:{borderRadius:"15px",paddingRight:"10px",width:"100%","&::placeholder":{fontSize:"14px",fontWeight:400}},inputProps:{style:{padding:"7px",paddingLeft:"15px",fontSize:"14px"}}}))};EnvironmentsSearch.__docgenInfo={description:"",methods:[],displayName:"EnvironmentsSearch",props:{onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(e: React.ChangeEvent) => void",signature:{arguments:[{type:{name:"ReactChangeEvent",raw:"React.ChangeEvent",elements:[{name:"HTMLInputElement"}]},name:"e"}],return:{name:"void"}}},description:"@param onChange change handler that will trigger when we search for an environment"}}};var environmentsApiSlice=__webpack_require__("./src/features/environments/environmentsApiSlice.ts");const namespacesApiSlice=api.l.injectEndpoints({endpoints:builder=>({fetchNamespaces:builder.query({query:dto=>`/api/v1/namespace/?page=${dto.page}&size=${dto.size}`}),fetchPrimaryNamespace:builder.query({query:()=>"/api/v1/permission/"})})}),{useLazyFetchNamespacesQuery,useLazyFetchPrimaryNamespaceQuery}=namespacesApiSlice;var reducer=__webpack_require__("./src/features/environments/reducer.ts"),namespaces_reducer=__webpack_require__("./src/features/namespaces/reducer.ts"),process=__webpack_require__("./node_modules/process/browser.js");const BaseEnvironments=({refreshEnvironments,onUpdateRefreshEnvironments})=>{const{palette}=(0,useTheme.A)(),version=process.env.REACT_APP_VERSION,environmentsState=(0,hooks.G)((state=>state.environments)),namespacesState=(0,hooks.G)((state=>state.namespaces)),dispatch=(0,hooks.j)(),[triggerNamespacesQuery]=useLazyFetchNamespacesQuery(),[triggerPrimaryNamespace]=useLazyFetchPrimaryNamespaceQuery(),[triggerQuery]=(0,environmentsApiSlice.W)(),getNamespaces=async()=>{const{data:namespacesData}=await triggerNamespacesQuery({page:namespacesState.page,size:100});if(namespacesData){const{primaryNamespace,namespaces}=await getNamespacesData(namespacesData.data);dispatch((0,namespaces_reducer.K7)({data:isNamespaceListed(namespaces,primaryNamespace)?checkMyPrimaryNamespace(namespaces,primaryNamespace):[...namespaces,{...primaryNamespace,isPrimary:!0}],count:namespacesData.count})),await getEnvironments()}},getNamespacesData=async namespaces=>{try{const{data:permissions}=await triggerPrimaryNamespace(),namespacesWithPermissions=((namespaces,permissions)=>namespaces.map((namespace=>{const entity=`${namespace.name}/*`,allPermissions=permissions.data.entity_permissions["*/*"],namespacePermissions=permissions.data.entity_permissions[entity]??[];return{id:namespace.id,name:namespace.name,canCreate:Boolean(!!allPermissions||namespacePermissions.includes(PERMISSIONS_namespaceCreate)),canUpdate:Boolean(!!allPermissions||namespacePermissions.includes(PERMISSIONS_environmentUpdate))}})))(namespaces,permissions);return{namespaces:namespacesWithPermissions,primaryNamespace:{id:void 0,name:permissions.data.primary_namespace,canCreate:!0,canUpdate:!0}}}catch(e){return{namespaces:[],primaryNamespace:{id:void 0,name:"default",canCreate:!0,canUpdate:!0}}}},getEnvironments=async()=>{const{data:environmentsData}=await triggerQuery({page:environmentsState.page,size:100,search:environmentsState.search});environmentsData&&dispatch(reducer.bC.actions.dataFetched({data:environmentsData.data,count:environmentsData.count}))},handleChange=(0,lodash.debounce)((async value=>{const{data}=await triggerQuery({page:1,size:100,search:value});data&&dispatch(reducer.bC.actions.searched({data:data.data,count:data.count,search:value}))}),500);return(0,react.useEffect)((()=>{(async()=>{getNamespaces()})()}),[]),(0,react.useEffect)((()=>{(async()=>{refreshEnvironments&&(getNamespaces(),onUpdateRefreshEnvironments(!1))})()}),[refreshEnvironments]),react.createElement(Box.A,{sx:{width:"100%",borderRight:`1px solid ${palette.secondary.light}`,display:"flex",flexDirection:"column",justifyContent:"space-between"}},react.createElement(Box.A,{sx:{borderBottom:`1px solid ${palette.secondary.light}`}},react.createElement(EnvironmentsSearch,{onChange:e=>handleChange(e.target.value)})),react.createElement(Box.A,{sx:{zIndex:"1",paddingTop:"15px",flex:4,overflowY:"auto"}},environmentsState.data&&react.createElement(EnvironmentsList,{next:async()=>{const{data}=await triggerQuery({page:environmentsState.page+1,size:100,search:environmentsState.search});data&&dispatch(reducer.bC.actions.nextFetched({data:data.data,count:data.count}))},hasMore:100*environmentsState.page void",signature:{arguments:[{type:{name:"boolean"},name:"isUpdated"}],return:{name:"void"}}},description:""}}}},"./src/features/environments/environmentsApiSlice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{W:()=>useLazyFetchEnvironmentsQuery});const environmentsApiSlice=__webpack_require__("./src/features/api/index.ts").l.injectEndpoints({endpoints:builder=>({fetchEnvironments:builder.query({query:dto=>`/api/v1/environment/?page=${dto.page}&size=${dto.size}&search=${dto.search}`})})}),{useLazyFetchEnvironmentsQuery}=environmentsApiSlice},"./src/features/environments/reducer.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{bC:()=>environmentsSlice});const environmentsSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"environments",initialState:{page:1,data:[],count:0,search:""},reducers:{dataFetched:(state,action)=>{const{count,data}=action.payload;return{...state,count,data}},searched:(state,action)=>({...action.payload,page:1}),nextFetched:(state,action)=>{const{data,count}=action.payload,newData=state.data?.concat(data),nextPage=state.page+1;return{...state,data:newData,count,page:nextPage}}}}),{dataFetched,searched,nextFetched}=environmentsSlice.actions},"./src/features/metadata/components/EnvBuildStatus.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{c:()=>EnvBuildStatus});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_mui_material__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js"),_mui_material__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/@mui/material/CircularProgress/CircularProgress.js"),_mui_material_Link__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@mui/material/Link/Link.js"),_mui_icons_material_OpenInNew__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@mui/icons-material/OpenInNew.js"),_preferences__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/preferences.tsx"),_styles_StyledMetadataItem__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/styles/StyledMetadataItem.tsx"),_utils_helpers_artifact__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/utils/helpers/artifact.ts"),_utils_helpers_parseArtifactList__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/helpers/parseArtifactList.ts"),_utils_helpers_buildMapper__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/utils/helpers/buildMapper.ts");const LogLink=({logArtifact})=>{const pref=react__WEBPACK_IMPORTED_MODULE_0__.useContext(_preferences__WEBPACK_IMPORTED_MODULE_1__.be),url=new URL(logArtifact.route,(0,_utils_helpers_parseArtifactList__WEBPACK_IMPORTED_MODULE_4__.L)(pref.apiUrl,window.location.origin));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_5__.A,{href:url.toString(),target:"_blank",sx:{display:"inline-flex",verticalAlign:"bottom",alignItems:"center"}},react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_icons_material_OpenInNew__WEBPACK_IMPORTED_MODULE_6__.A,{sx:{mr:.5},fontSize:"inherit"}),"Log")},EnvBuildStatus=({build})=>{const logArtifact=(0,_utils_helpers_artifact__WEBPACK_IMPORTED_MODULE_7__.A)(build.id,["LOGS"])[0];return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_styles_StyledMetadataItem__WEBPACK_IMPORTED_MODULE_2__.S,{sx:{marginTop:"0",fontSize:"13px",fontWeight:500,paddingBottom:"0"},"data-testid":"build-status"},"Status: ","",react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_8__.A,{component:"span",sx:{fontSize:"13px"}},(0,_utils_helpers_buildMapper__WEBPACK_IMPORTED_MODULE_3__.B)(build),build.status_info&&` (${build.status_info})`,"BUILDING"===build.status||"QUEUED"===build.status?react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_9__.A,{size:10,sx:{marginLeft:"8px"}}):"FAILED"===build.status&&logArtifact&&react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,". ",react__WEBPACK_IMPORTED_MODULE_0__.createElement(LogLink,{logArtifact}))))};EnvBuildStatus.__docgenInfo={description:"",methods:[],displayName:"EnvBuildStatus",props:{build:{required:!0,tsType:{name:"signature",type:"object",raw:"{\n id: number;\n environment_id: number;\n specification: {\n id: number;\n name: string;\n spec: CondaSpecification;\n sha256: string;\n created_on: string;\n };\n packages: BuildPackage[];\n status: string;\n status_info: string | null;\n size: number;\n scheduled_on: string;\n started_on: string;\n ended_on: string | null;\n build_artifacts: BuildArtifact[];\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"environment_id",value:{name:"number",required:!0}},{key:"specification",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n spec: CondaSpecification;\n sha256: string;\n created_on: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"spec",value:{name:"signature",type:"object",raw:"{\n name: string;\n channels: string[];\n dependencies: (string | CondaSpecificationPip)[];\n variables: Record;\n prefix?: string | null;\n lockfile?: Lockfile;\n}",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"channels",value:{name:"Array",elements:[{name:"string"}],raw:"string[]",required:!0}},{key:"dependencies",value:{name:"Array",elements:[{name:"unknown"}],raw:"(string | CondaSpecificationPip)[]",required:!0}},{key:"variables",value:{name:"Record",elements:[{name:"string"},{name:"string"}],raw:"Record",required:!0}},{key:"prefix",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!1}},{key:"lockfile",value:{name:"Record",elements:[{name:"string"},{name:"any"}],raw:"Record",required:!1}}]},required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"created_on",value:{name:"string",required:!0}}]},required:!0}},{key:"packages",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n channel: {\n id: number;\n name: string;\n last_update: string;\n };\n build: string;\n license: string;\n sha256: string;\n name: string;\n version: string;\n summary: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"channel",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n last_update: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"last_update",value:{name:"string",required:!0}}]},required:!0}},{key:"build",value:{name:"string",required:!0}},{key:"license",value:{name:"string",required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"version",value:{name:"string",required:!0}},{key:"summary",value:{name:"string",required:!0}}]}}],raw:"BuildPackage[]",required:!0}},{key:"status",value:{name:"string",required:!0}},{key:"status_info",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"size",value:{name:"number",required:!0}},{key:"scheduled_on",value:{name:"string",required:!0}},{key:"started_on",value:{name:"string",required:!0}},{key:"ended_on",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"build_artifacts",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ id: number; artifact_type: string; key: string }",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"artifact_type",value:{name:"string",required:!0}},{key:"key",value:{name:"string",required:!0}}]}}],raw:"BuildArtifact[]",required:!0}}]}},description:""}}}},"./src/features/metadata/components/EnvBuilds.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{F:()=>EnvBuilds});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_mui_material__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@mui/material/CircularProgress/CircularProgress.js"),_styles_StyledMetadataItem__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/styles/StyledMetadataItem.tsx"),_features_metadata_components__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/features/metadata/components/index.tsx"),_EnvBuildStatus__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/features/metadata/components/EnvBuildStatus.tsx");const EnvBuilds=({currentBuildId,selectedBuildId,builds,mode})=>{const selectedBuild=builds.find((build=>build.id===selectedBuildId));return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_styles_StyledMetadataItem__WEBPACK_IMPORTED_MODULE_1__.S,{sx:{fontWeight:500,paddingBottom:"5px"}},"edit"===mode?"Change active environment version:":"Builds:"),selectedBuild?react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0__.createElement(_features_metadata_components__WEBPACK_IMPORTED_MODULE_2__.S3,{builds,currentBuildId,selectedBuildId}),react__WEBPACK_IMPORTED_MODULE_0__.createElement(_EnvBuildStatus__WEBPACK_IMPORTED_MODULE_3__.c,{build:selectedBuild})):react__WEBPACK_IMPORTED_MODULE_0__.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__.A,{size:20,sx:{marginLeft:"15px",marginTop:"6px",marginBottom:"7px"}}))};EnvBuilds.__docgenInfo={description:"",methods:[],displayName:"EnvBuilds",props:{currentBuildId:{required:!0,tsType:{name:"number"},description:""},selectedBuildId:{required:!0,tsType:{name:"number"},description:""},builds:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n environment_id: number;\n specification: {\n id: number;\n name: string;\n spec: CondaSpecification;\n sha256: string;\n created_on: string;\n };\n packages: BuildPackage[];\n status: string;\n status_info: string | null;\n size: number;\n scheduled_on: string;\n started_on: string;\n ended_on: string | null;\n build_artifacts: BuildArtifact[];\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"environment_id",value:{name:"number",required:!0}},{key:"specification",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n spec: CondaSpecification;\n sha256: string;\n created_on: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"spec",value:{name:"signature",type:"object",raw:"{\n name: string;\n channels: string[];\n dependencies: (string | CondaSpecificationPip)[];\n variables: Record;\n prefix?: string | null;\n lockfile?: Lockfile;\n}",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"channels",value:{name:"Array",elements:[{name:"string"}],raw:"string[]",required:!0}},{key:"dependencies",value:{name:"Array",elements:[{name:"unknown"}],raw:"(string | CondaSpecificationPip)[]",required:!0}},{key:"variables",value:{name:"Record",elements:[{name:"string"},{name:"string"}],raw:"Record",required:!0}},{key:"prefix",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!1}},{key:"lockfile",value:{name:"Record",elements:[{name:"string"},{name:"any"}],raw:"Record",required:!1}}]},required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"created_on",value:{name:"string",required:!0}}]},required:!0}},{key:"packages",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n channel: {\n id: number;\n name: string;\n last_update: string;\n };\n build: string;\n license: string;\n sha256: string;\n name: string;\n version: string;\n summary: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"channel",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n last_update: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"last_update",value:{name:"string",required:!0}}]},required:!0}},{key:"build",value:{name:"string",required:!0}},{key:"license",value:{name:"string",required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"version",value:{name:"string",required:!0}},{key:"summary",value:{name:"string",required:!0}}]}}],raw:"BuildPackage[]",required:!0}},{key:"status",value:{name:"string",required:!0}},{key:"status_info",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"size",value:{name:"number",required:!0}},{key:"scheduled_on",value:{name:"string",required:!0}},{key:"started_on",value:{name:"string",required:!0}},{key:"ended_on",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"build_artifacts",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ id: number; artifact_type: string; key: string }",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"artifact_type",value:{name:"string",required:!0}},{key:"key",value:{name:"string",required:!0}}]}}],raw:"BuildArtifact[]",required:!0}}]}}],raw:"IBuild[]"},description:""},mode:{required:!0,tsType:{name:"union",raw:'"create" | "read-only" | "edit"',elements:[{name:"literal",value:'"create"'},{name:"literal",value:'"read-only"'},{name:"literal",value:'"edit"'}]},description:""}}}},"./src/features/metadata/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{S3:()=>BuildDropdown,VY:()=>Description,FG:()=>EnvBuilds.F,fn:()=>EnvMetadata});var EnvironmentDetailsModes,react=__webpack_require__("./node_modules/react/index.js"),hooks=__webpack_require__("./src/hooks.ts"),components=__webpack_require__("./src/components/index.tsx"),styles=__webpack_require__("./src/styles/index.tsx");!function(EnvironmentDetailsModes){EnvironmentDetailsModes.CREATE="create",EnvironmentDetailsModes.READ="read-only",EnvironmentDetailsModes.EDIT="edit"}(EnvironmentDetailsModes||(EnvironmentDetailsModes={}));const EnvMetadata=({mode,description="",currentBuildId,selectedBuildId,specificationIsChanged,onDefaultEnvIsChanged,onUpdateDescription,onUpdateBuildId})=>{const{builds,newCurrentBuild}=(0,hooks.G)((state=>state.enviroments));return react.createElement(components.ZO,{title:"Environment Metadata"},react.createElement(Description,{mode,description:description||void 0,onChangeDescription:onUpdateDescription}),react.createElement("div",{style:{display:"flex",alignItems:"center",gap:"15px"}},"create"!==mode&¤tBuildId&&selectedBuildId&&react.createElement("div",null,react.createElement(EnvBuilds.F,{currentBuildId,selectedBuildId,builds,mode})),"edit"===mode&&newCurrentBuild&¤tBuildId!==newCurrentBuild&&react.createElement(styles.OV,{color:"primary",variant:"contained",onClick:()=>(newCurrentBuild=>{onUpdateBuildId(newCurrentBuild),onDefaultEnvIsChanged&&onDefaultEnvIsChanged(!0)})(newCurrentBuild),disabled:specificationIsChanged||!1},"Change environment version")))};EnvMetadata.__docgenInfo={description:"",methods:[],displayName:"EnvMetadata",props:{description:{required:!1,tsType:{name:"any"},description:"@param mode change whether the component only displays the list of builds, edit the environment description or create a new description\n@param onUpdateDescription change environment description",defaultValue:{value:'""',computed:!1}},mode:{required:!0,tsType:{name:"union",raw:'"create" | "read-only" | "edit"',elements:[{name:"literal",value:'"create"'},{name:"literal",value:'"read-only"'},{name:"literal",value:'"edit"'}]},description:""},currentBuildId:{required:!1,tsType:{name:"union",raw:"number | undefined",elements:[{name:"number"},{name:"undefined"}]},description:""},selectedBuildId:{required:!1,tsType:{name:"number"},description:""},defaultEnvVersIsChanged:{required:!1,tsType:{name:"boolean"},description:""},specificationIsChanged:{required:!1,tsType:{name:"boolean"},description:""},onDefaultEnvIsChanged:{required:!1,tsType:{name:"signature",type:"function",raw:"(defaultEnvVersIsChanged: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"defaultEnvVersIsChanged"}],return:{name:"void"}}},description:""},onUpdateDescription:{required:!0,tsType:{name:"signature",type:"function",raw:"(description: string) => void",signature:{arguments:[{type:{name:"string"},name:"description"}],return:{name:"void"}}},description:""},onUpdateBuildId:{required:!0,tsType:{name:"signature",type:"function",raw:"(buildId: number) => void",signature:{arguments:[{type:{name:"number"},name:"buildId"}],return:{name:"void"}}},description:""}}};var Select=__webpack_require__("./node_modules/@mui/material/Select/Select.js"),MenuItem=__webpack_require__("./node_modules/@mui/material/MenuItem/MenuItem.js"),useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js"),ArrowDropDown=__webpack_require__("./node_modules/@mui/icons-material/ArrowDropDown.js"),IconButton=__webpack_require__("./node_modules/@mui/material/IconButton/IconButton.js"),metadata=__webpack_require__("./src/features/metadata/index.tsx"),buildMapper=__webpack_require__("./src/utils/helpers/buildMapper.ts");const BuildDropdown=({builds,currentBuildId,selectedBuildId})=>{const dispatch=(0,hooks.j)(),{palette}=(0,useTheme.A)(),[open,setOpen]=(0,react.useState)(!1);return react.createElement(Select.A,{open,onClose:()=>setOpen(!1),onOpen:()=>setOpen(!0),sx:{borderRadius:"0px",marginBottom:"10px",backgroundColor:open?palette.primary[50]:"initial"},MenuProps:{PaperProps:{style:{backgroundColor:palette.primary[50],padding:"0px",boxShadow:"none",borderRadius:"0px",border:`1px solid ${palette.secondary.light}`}},MenuListProps:{style:{padding:"0px"}}},value:selectedBuildId,onChange:e=>{const newCurrentBuild=builds.find((build=>build.id===Number(e.target.value)));newCurrentBuild&&dispatch((0,metadata.rP)(newCurrentBuild.id))},IconComponent:()=>react.createElement(IconButton.A,{sx:{padding:"0px"},onClick:()=>setOpen((currState=>!currState)),size:"large"},react.createElement(ArrowDropDown.A,{sx:{height:"37px",borderLeft:`1px solid ${palette.primary.main}`}})),inputProps:{"data-testid":"test-select",sx:{padding:"7px 9px !important",fontSize:"13px",background:palette.common.white}}},react.createElement(MenuItem.A,{key:"empty",value:"",sx:{display:"none"}}," "),builds?builds.map((build=>react.createElement(MenuItem.A,{key:build.id,value:build.id},(0,buildMapper.Q)(build,currentBuildId)))):null)};BuildDropdown.__docgenInfo={description:"",methods:[],displayName:"BuildDropdown",props:{builds:{required:!0,tsType:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n environment_id: number;\n specification: {\n id: number;\n name: string;\n spec: CondaSpecification;\n sha256: string;\n created_on: string;\n };\n packages: BuildPackage[];\n status: string;\n status_info: string | null;\n size: number;\n scheduled_on: string;\n started_on: string;\n ended_on: string | null;\n build_artifacts: BuildArtifact[];\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"environment_id",value:{name:"number",required:!0}},{key:"specification",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n spec: CondaSpecification;\n sha256: string;\n created_on: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"spec",value:{name:"signature",type:"object",raw:"{\n name: string;\n channels: string[];\n dependencies: (string | CondaSpecificationPip)[];\n variables: Record;\n prefix?: string | null;\n lockfile?: Lockfile;\n}",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"channels",value:{name:"Array",elements:[{name:"string"}],raw:"string[]",required:!0}},{key:"dependencies",value:{name:"Array",elements:[{name:"unknown"}],raw:"(string | CondaSpecificationPip)[]",required:!0}},{key:"variables",value:{name:"Record",elements:[{name:"string"},{name:"string"}],raw:"Record",required:!0}},{key:"prefix",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!1}},{key:"lockfile",value:{name:"Record",elements:[{name:"string"},{name:"any"}],raw:"Record",required:!1}}]},required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"created_on",value:{name:"string",required:!0}}]},required:!0}},{key:"packages",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{\n id: number;\n channel: {\n id: number;\n name: string;\n last_update: string;\n };\n build: string;\n license: string;\n sha256: string;\n name: string;\n version: string;\n summary: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"channel",value:{name:"signature",type:"object",raw:"{\n id: number;\n name: string;\n last_update: string;\n}",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"last_update",value:{name:"string",required:!0}}]},required:!0}},{key:"build",value:{name:"string",required:!0}},{key:"license",value:{name:"string",required:!0}},{key:"sha256",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"version",value:{name:"string",required:!0}},{key:"summary",value:{name:"string",required:!0}}]}}],raw:"BuildPackage[]",required:!0}},{key:"status",value:{name:"string",required:!0}},{key:"status_info",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"size",value:{name:"number",required:!0}},{key:"scheduled_on",value:{name:"string",required:!0}},{key:"started_on",value:{name:"string",required:!0}},{key:"ended_on",value:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}],required:!0}},{key:"build_artifacts",value:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ id: number; artifact_type: string; key: string }",signature:{properties:[{key:"id",value:{name:"number",required:!0}},{key:"artifact_type",value:{name:"string",required:!0}},{key:"key",value:{name:"string",required:!0}}]}}],raw:"BuildArtifact[]",required:!0}}]}}],raw:"Build[]"},description:"@param builds list of builds\n@param currentBuildId id of the current build\n@param selectedBuildId id of the build selected from the dropdown"},currentBuildId:{required:!0,tsType:{name:"number"},description:""},selectedBuildId:{required:!0,tsType:{name:"number"},description:""}}};var Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),TextField=__webpack_require__("./node_modules/@mui/material/TextField/TextField.js"),StyledMetadataItem=__webpack_require__("./src/styles/StyledMetadataItem.tsx"),environmentDetails=__webpack_require__("./src/features/environmentDetails/index.tsx");const Description=({mode,description,onChangeDescription})=>{const{palette}=(0,useTheme.A)();return react.createElement(Box.A,null,mode===environmentDetails.C6.READ&&description&&react.createElement(StyledMetadataItem.S,null,description),mode!==environmentDetails.C6.READ&&react.createElement(react.Fragment,null,react.createElement(StyledMetadataItem.S,{sx:{fontWeight:500}},"Description:"),react.createElement(Box.A,null,react.createElement(TextField.A,{multiline:!0,value:description,placeholder:"Enter here the description of your environment",sx:{backgroundColor:palette.grey[100],width:"100%",marginBottom:"10px"},inputProps:{style:{fontSize:"13px"}},onChange:e=>onChangeDescription(e.target.value)}))))};Description.__docgenInfo={description:"",methods:[],displayName:"Description",props:{mode:{required:!0,tsType:{name:"union",raw:'"create" | "read-only" | "edit"',elements:[{name:"literal",value:'"create"'},{name:"literal",value:'"read-only"'},{name:"literal",value:'"edit"'}]},description:"@param mode change whether the component only displays the list or we are able to edit it"},description:{required:!0,tsType:{name:"string"},description:""},onChangeDescription:{required:!0,tsType:{name:"signature",type:"function",raw:"(description: string) => void",signature:{arguments:[{type:{name:"string"},name:"description"}],return:{name:"void"}}},description:""}}};var EnvBuilds=__webpack_require__("./src/features/metadata/components/EnvBuilds.tsx");__webpack_require__("./src/features/metadata/components/EnvBuildStatus.tsx")},"./src/features/metadata/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{fn:()=>components.fn,rP:()=>currentBuildIdChanged,DX:()=>enviromentsSlice,Wc:()=>useGetEnviromentBuildsQuery});var redux_toolkit_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");const environmentsApiSlice=__webpack_require__("./src/features/api/index.ts").l.injectEndpoints({endpoints:builder=>({getEnviroments:builder.query({query:()=>"/api/v1/build/"}),getEnviromentBuild:builder.query({query:environmentId=>`/api/v1/build/${environmentId}/`}),getEnviroment:builder.query({query:env=>`/api/v1/environment/${env.namespace.name}/${env.name}/`}),getEnviromentBuilds:builder.query({query:env=>`/api/v1/build/?namespace=${env.namespace.name}&name=${env.name}&order=desc&sort_by=scheduled_on`,keepUnusedDataFor:0})})}),{useGetEnviromentsQuery,useGetEnviromentQuery,useGetEnviromentBuildsQuery,useGetEnviromentBuildQuery,useLazyGetEnviromentBuildQuery}=environmentsApiSlice,initialState={enviroments:[],builds:[],page:1,count:0,size:0,currentBuild:{id:void 0},newCurrentBuild:void 0},enviromentsSlice=(0,redux_toolkit_esm.Z0)({name:"environments",initialState,reducers:{currentBuildIdChanged:(state,action)=>{const newBuildId=action.payload;state.currentBuild.id=newBuildId;const build=state.builds.find((build=>build.id===newBuildId));state.newCurrentBuild=build&&"COMPLETED"===build.status?build.id:void 0},updateBuilds:(state,action)=>{state.builds=action.payload}},extraReducers:builder=>{builder.addMatcher(environmentsApiSlice.endpoints.getEnviroments.matchFulfilled,((state,{payload:{data}})=>{state.enviroments.push(...data)})),builder.addMatcher(environmentsApiSlice.endpoints.getEnviromentBuilds.matchFulfilled,((state,{payload:{data}})=>{state.builds=data}))}}),{currentBuildIdChanged,updateBuilds}=enviromentsSlice.actions;var components=__webpack_require__("./src/features/metadata/components/index.tsx")},"./src/features/namespaces/reducer.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{K7:()=>dataFetched,to:()=>namespacesSlice});const namespacesSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"namespaces",initialState:{page:1,data:[],count:0},reducers:{dataFetched:(state,action)=>{const{count,data}=action.payload;return{...state,count,data}}}}),{dataFetched}=namespacesSlice.actions},"./src/features/notification/notificationSlice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Ds:()=>showNotification,ui:()=>closeNotification,yg:()=>notificationSlice});const notificationSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"notification",initialState:{show:!1,description:""},reducers:{showNotification:(state,action)=>({...state,show:!0,description:action.payload}),closeNotification:state=>({...state,show:!1})}}),{showNotification,closeNotification}=notificationSlice.actions},"./src/features/requestedPackages/components/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{J:()=>RequestedPackage,ft:()=>RequestedPackageList,gC:()=>RequestedPackagesEdit});var Accordion=__webpack_require__("./node_modules/@mui/material/Accordion/Accordion.js"),Table=__webpack_require__("./node_modules/@mui/material/Table/Table.js"),TableBody=__webpack_require__("./node_modules/@mui/material/TableBody/TableBody.js"),TableCell=__webpack_require__("./node_modules/@mui/material/TableCell/TableCell.js"),TableContainer=__webpack_require__("./node_modules/@mui/material/TableContainer/TableContainer.js"),TableHead=__webpack_require__("./node_modules/@mui/material/TableHead/TableHead.js"),TableRow=__webpack_require__("./node_modules/@mui/material/TableRow/TableRow.js"),react=__webpack_require__("./node_modules/react/index.js"),components=__webpack_require__("./src/components/index.tsx"),styles=__webpack_require__("./src/styles/index.tsx");const RequestedPackageList=({packageList})=>{const filteredPackageList=(0,react.useMemo)((()=>packageList.filter((item=>"object"!=typeof item))),[packageList]),listLength=filteredPackageList.length;return react.createElement(Accordion.A,{sx:{maxWidth:420,boxShadow:"none"},disableGutters:!0,defaultExpanded:!0},react.createElement(styles.Ql,{expandIcon:react.createElement(components.HK,null)},react.createElement(styles.AM,{sx:{color:"primary.main"}},"Requested Packages")),react.createElement(styles.uV,{sx:{padding:0}},react.createElement(TableContainer.A,null,react.createElement(Table.A,{sx:{width:"420px",tableLayout:"fixed"}},react.createElement(TableHead.A,null,react.createElement(TableRow.A,null,react.createElement(TableCell.A,{sx:{fontSize:"13px"}},"Package"),react.createElement(TableCell.A,{sx:{fontSize:"13px",textAlign:"right"}},"Requested Version"))),react.createElement(TableBody.A,null,filteredPackageList.map(((item,index)=>react.createElement(TableRow.A,{key:String(item),sx:{backgroundColor:index%2?"secondary.50":"transparent"}},react.createElement(RequestedPackage,{requestedPackage:String(item),isLast:index===listLength-1})))))))))};RequestedPackageList.__docgenInfo={description:"",methods:[],displayName:"RequestedPackageList",props:{packageList:{required:!0,tsType:{name:"Array",elements:[{name:"unknown"}],raw:"(string | CondaSpecificationPip)[]"},description:"@param packageList list of packages that we get from the API"}}};var Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js"),helpers=__webpack_require__("./src/utils/helpers/index.ts");const RequestedPackage=({requestedPackage,isLast})=>{const{constraint,name,version}=(0,helpers.uP)(requestedPackage);return react.createElement(react.Fragment,null,react.createElement(TableCell.A,{sx:{display:"flex",alignItems:"center",borderBottom:isLast?"none":void 0}},react.createElement(Typography.A,{sx:{width:190,fontSize:"13px",color:"#333"}},name)),react.createElement(TableCell.A,{sx:{textAlign:"right",borderBottom:isLast?"none":void 0}},react.createElement(Typography.A,{sx:{fontSize:"13px",fontFamily:"latest"===constraint?"inherit":"monospace",fontStyle:"latest"===constraint?"italic":"normal",color:"#333"}},"latest"===constraint?"(no version requested)":`${constraint.replace("==","=")}${version}`)))};RequestedPackage.__docgenInfo={description:"",methods:[],displayName:"RequestedPackage",props:{requestedPackage:{required:!0,tsType:{name:"string"},description:"@param requestedPackage requested package"},isLast:{required:!0,tsType:{name:"boolean"},description:""}}};var AccordionDetails=__webpack_require__("./node_modules/@mui/material/AccordionDetails/AccordionDetails.js"),Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js"),useTheme=__webpack_require__("./node_modules/@mui/material/styles/useTheme.js"),hooks=__webpack_require__("./src/hooks.ts"),requestedPackagesSlice=__webpack_require__("./src/features/requestedPackages/requestedPackagesSlice.ts");const BaseRequestedPackagesTableRow=({requestedPackage,onDefaultEnvIsChanged})=>{const dispatch=(0,hooks.j)(),{versionsWithoutConstraints,versionsWithConstraints}=(0,hooks.G)((state=>state.requestedPackages)),result=(0,helpers.uP)(requestedPackage);let{version}=result;const{constraint,name}=result;"latest"===constraint&&(version=versionsWithoutConstraints[name]);const onUpdateDefaultEnvironment=isChanged=>{onDefaultEnvIsChanged&&onDefaultEnvIsChanged(isChanged)};return react.createElement(TableRow.A,null,react.createElement(styles.bv,{align:"left"},react.createElement(Typography.A,{sx:{fontSize:"13px",fontWeight:400,color:"#000"}},name)),react.createElement(styles.bv,{align:"left"},react.createElement(Box.A,{sx:{display:"flex",alignItems:"center"}},react.createElement(components.K7,{onUpdate:value=>{const updatedPackage=`${name}${value}${version||""}`;dispatch((0,requestedPackagesSlice.WL)({currentPackage:requestedPackage,updatedPackage})),onUpdateDefaultEnvironment(!1)},constraint:"latest"===constraint?"":constraint}),react.createElement(components.t7,{onUpdate:value=>{let pkgConstraint="latest"===constraint?">=":constraint;""===value&&(pkgConstraint="");const updatedPackage=`${name}${pkgConstraint}${value}`;dispatch((0,requestedPackagesSlice.WL)({currentPackage:requestedPackage,updatedPackage})),onUpdateDefaultEnvironment(!1)},version:"latest"===constraint?"":version,name}))),react.createElement(styles.bv,{align:"right"},react.createElement(Typography.A,{sx:{fontFamily:"monospace",fontSize:"13px",fontWeight:400,color:"#676666"}},versionsWithConstraints[name]??versionsWithoutConstraints[name]," ",react.createElement(styles.Bj,{onClick:()=>{dispatch((0,requestedPackagesSlice.x_)(requestedPackage)),onUpdateDefaultEnvironment(!1)},"data-testid":"RemovePackageTest"},react.createElement(components.AE,null)))))},RequestedPackagesTableRow=(0,react.memo)(BaseRequestedPackagesTableRow);BaseRequestedPackagesTableRow.__docgenInfo={description:"",methods:[],displayName:"BaseRequestedPackagesTableRow",props:{requestedPackage:{required:!0,tsType:{name:"string"},description:"@param requestedPackage requested package"},onDefaultEnvIsChanged:{required:!1,tsType:{name:"signature",type:"function",raw:"(isChanged: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"isChanged"}],return:{name:"void"}}},description:""}}};var Autocomplete=__webpack_require__("./node_modules/@mui/material/Autocomplete/Autocomplete.js"),TextField=__webpack_require__("./node_modules/@mui/material/TextField/TextField.js");const requestedPackagesApiSlice=__webpack_require__("./src/features/api/index.ts").l.injectEndpoints({endpoints:builder=>({getPackageSuggestions:builder.query({query:dto=>`api/v1/package/?search=${dto.search}&page=${dto.page}&size=${dto.size}&distinct_on=name`})})}),{useLazyGetPackageSuggestionsQuery}=requestedPackagesApiSlice;var lodash=__webpack_require__("./node_modules/lodash/lodash.js"),match_sorter_esm=__webpack_require__("./node_modules/match-sorter/dist/match-sorter.esm.js"),CircularProgress=__webpack_require__("./node_modules/@mui/material/CircularProgress/CircularProgress.js"),reducer=__webpack_require__("./src/features/requestedPackages/reducer.ts");const AddRequestedPackage=({onCancel,onSubmit,isCreating})=>{const theme=(0,useTheme.A)(),[state,dispatch]=(0,react.useReducer)(reducer.CZ,reducer.ue),[triggerQuery]=useLazyGetPackageSuggestionsQuery(),uniquePackageNamesList=(0,react.useMemo)((()=>{const packageNames=new Set,result=[];return state.data.forEach((buildPackage=>{const packageName=buildPackage.name;packageNames.has(packageName)||(result.push(packageName),packageNames.add(packageName))})),(0,match_sorter_esm.Ht)(result,state.name)}),[state.data]),handleSearch=(0,lodash.debounce)((async value=>{if(value.length<2)return;dispatch({type:reducer.Q3.LOADING,payload:{loading:!0}});const{data}=await triggerQuery({page:state.page,size:100,search:value});data&&dispatch({type:reducer.Q3.SEARCHED,payload:{data:data.data,count:data.count,name:value}}),dispatch({type:reducer.Q3.LOADING,payload:{loading:!1}})}),200);return react.createElement(Box.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"15px",width:isCreating?360:"100%"}},react.createElement(Box.A,null,react.createElement(Autocomplete.A,{freeSolo:!0,selectOnFocus:!0,sx:{width:"140px",color:theme.palette.secondary.main},options:uniquePackageNamesList,onChange:(event,value)=>(value=>{value&&(onSubmit(value),onCancel(!1))})(value),ListboxProps:{onScroll:async event=>{const listboxNode=event.currentTarget;if(listboxNode.scrollTop+listboxNode.clientHeight+2>=listboxNode.scrollHeight){if(!(100*state.page<=state.count))return;dispatch({type:reducer.Q3.LOADING,payload:{loading:!0}});const{data}=await triggerQuery({page:state.page+1,size:100,search:state.name});data&&dispatch({type:reducer.Q3.NEXT_FETCHED,payload:{data:data.data,count:data.count}}),dispatch({type:reducer.Q3.LOADING,payload:{loading:!1}})}}},onInputChange:(event,value,reason)=>{"clear"!==reason?handleSearch(value):dispatch({type:reducer.Q3.CLEARED})},renderInput:params=>react.createElement(TextField.A,{label:"Enter package",autoFocus:!0,...params,size:"small",sx:{borderColor:theme.palette.secondary.main},InputProps:{...params.InputProps,endAdornment:react.createElement(react.Fragment,null,state.loading?react.createElement(CircularProgress.A,{color:"inherit",size:10,sx:{marginRight:"7px"}}):params.InputProps.endAdornment)}})})),react.createElement(Box.A,{sx:{marginRight:"16px"}},react.createElement(styles.Bj,{onClick:()=>onCancel(!1),"data-testid":"cancelIcon"},react.createElement(components.AE,null))))};AddRequestedPackage.__docgenInfo={description:"",methods:[],displayName:"AddRequestedPackage",props:{onCancel:{required:!0,tsType:{name:"ReactDispatch",raw:"React.Dispatch>",elements:[{name:"ReactSetStateAction",raw:"React.SetStateAction",elements:[{name:"boolean"}]}]},description:"@param onCancel handler that will run when delete icon is clicked\n@param onSubmit handler that will run when input losses focus\n@param isCreating notify the component if it's being used for creating or editing environment"},onSubmit:{required:!0,tsType:{name:"signature",type:"function",raw:"(packageName: string) => void",signature:{arguments:[{type:{name:"string"},name:"packageName"}],return:{name:"void"}}},description:""},isCreating:{required:!0,tsType:{name:"boolean"},description:""}}};const RequestedPackagesEdit=({packageList,onDefaultEnvIsChanged})=>{const dispatch=(0,hooks.j)(),[isAdding,setIsAdding]=(0,react.useState)(!1),{palette}=(0,useTheme.A)(),onUpdateDefaultEnvironment=isChanged=>{onDefaultEnvIsChanged&&onDefaultEnvIsChanged(isChanged)},filteredPackageList=(0,react.useMemo)((()=>packageList.filter((item=>"object"!=typeof item))),[packageList]);return react.createElement(Accordion.A,{sx:{maxWidth:500,boxShadow:"none"},defaultExpanded:!0,disableGutters:!0},react.createElement(styles.Ql,{expandIcon:react.createElement(components.HK,null)},react.createElement(styles.AM,{sx:{color:"primary.main"}},"Requested Packages")),react.createElement(styles.uV,{sx:{borderRadius:"0px",padding:0}},react.createElement(TableContainer.A,null,react.createElement(Table.A,{"aria-label":"requested packages"},react.createElement(TableHead.A,{sx:{border:"none"}},react.createElement(TableRow.A,null,react.createElement(TableCell.A,{align:"left",sx:{width:"120px"}},react.createElement(Typography.A,{component:"p",sx:{fontSize:"13px",fontWeight:500}},"Name")),react.createElement(TableCell.A,{align:"left"},react.createElement(Typography.A,{component:"p",sx:{fontSize:"13px",fontWeight:500}},"Version Constraint")),react.createElement(TableCell.A,{align:"right",sx:{width:"180px"}},react.createElement(Typography.A,{component:"p",sx:{fontSize:"13px",fontWeight:500}},"Installed Version")))),react.createElement(TableBody.A,null,filteredPackageList.map(((requestedPackage,index)=>react.createElement(RequestedPackagesTableRow,{key:requestedPackage,requestedPackage,onDefaultEnvIsChanged:onUpdateDefaultEnvironment})))))),isAdding&&react.createElement(Box.A,{sx:{padding:"0 0 16px 16px"}},react.createElement(AddRequestedPackage,{onSubmit:packageName=>{dispatch((0,requestedPackagesSlice.T)(packageName)),onDefaultEnvIsChanged&&onUpdateDefaultEnvironment(!1)},onCancel:setIsAdding,isCreating:!1}))),react.createElement(AccordionDetails.A,{sx:{border:`1px solid ${palette.secondary.light}`,borderTop:"0px",borderRadius:"0px",padding:"15px 21px",display:"flex",justifyContent:"flex-start"}},react.createElement(styles.OV,{color:"secondary",variant:"contained",onClick:()=>setIsAdding(!0)},"+ Add Package")))};RequestedPackagesEdit.__docgenInfo={description:"",methods:[],displayName:"RequestedPackagesEdit",props:{packageList:{required:!0,tsType:{name:"Array",elements:[{name:"unknown"}],raw:"(string | CondaSpecificationPip)[]"},description:"@param packageList list of packages that we get from the API"},onDefaultEnvIsChanged:{required:!1,tsType:{name:"signature",type:"function",raw:"(isChanged: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"isChanged"}],return:{name:"void"}}},description:""}}}},"./src/features/requestedPackages/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{$R:()=>_requestedPackagesSlice__WEBPACK_IMPORTED_MODULE_1__.$R,Sf:()=>_requestedPackagesSlice__WEBPACK_IMPORTED_MODULE_1__.Sf,Yh:()=>_requestedPackagesSlice__WEBPACK_IMPORTED_MODULE_1__.Yh,ft:()=>_components__WEBPACK_IMPORTED_MODULE_0__.ft,gC:()=>_components__WEBPACK_IMPORTED_MODULE_0__.gC,gj:()=>_requestedPackagesSlice__WEBPACK_IMPORTED_MODULE_1__.gj});var _components__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/features/requestedPackages/components/index.tsx"),_requestedPackagesSlice__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/features/requestedPackages/requestedPackagesSlice.ts")},"./src/features/requestedPackages/reducer.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var ActionTypes;__webpack_require__.d(__webpack_exports__,{CZ:()=>requestedPackagesReducer,Q3:()=>ActionTypes,ue:()=>initialState}),function(ActionTypes){ActionTypes.DATA_FETCHED="requestedPackages/data_fetched",ActionTypes.SEARCHED="requestedPackages/searched",ActionTypes.NEXT_FETCHED="requestedPackages/next_fetched",ActionTypes.LOADING="requestedPackages/loading",ActionTypes.CLEARED="requestedPackages/cleared"}(ActionTypes||(ActionTypes={}));const initialState={page:1,data:[],count:0,name:"",loading:!1},requestedPackagesReducer=(state,action)=>{switch(action.type){case"requestedPackages/data_fetched":{const{count,data}=action.payload;return{...state,count,data}}case"requestedPackages/searched":return{...state,...action.payload,page:1};case"requestedPackages/next_fetched":{const{data,count}=action.payload,newData=state.data?.concat(data),nextPage=state.page+1;return{...state,data:newData,count,page:nextPage}}case"requestedPackages/loading":return{...state,loading:action.payload.loading};case"requestedPackages/cleared":return{...state,name:"",page:1}}}},"./src/features/requestedPackages/requestedPackagesSlice.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{$R:()=>updatePackages,Sf:()=>buildPackagesCacheAdded,T:()=>packageAdded,WL:()=>packageUpdated,Yh:()=>requestedPackagesSlice,gj:()=>dependencyPromoted,x_:()=>packageRemoved});var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),_utils_helpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/utils/helpers/index.ts"),_dependencies__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/features/dependencies/index.tsx"),_environmentDetails__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/features/environmentDetails/index.tsx");const requestedPackagesSlice=(0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_3__.Z0)({name:"requestedPackages",initialState:{requestedPackages:[],versionsWithoutConstraints:{},versionsWithConstraints:{},packagesWithLatestVersions:{},buildPackagesCache:{}},reducers:{updatePackages:(state,action)=>{const packages=action.payload;state.requestedPackages=packages},dependencyPromoted:(state,action)=>{const newRequestedPackage=`${action.payload.name}==${action.payload.version}`;state.requestedPackages.push(newRequestedPackage)},packageUpdated:(state,action)=>{const{currentPackage,updatedPackage}=action.payload;state.requestedPackages=state.requestedPackages.map((p=>p===currentPackage?updatedPackage:p))},packageRemoved:(state,action)=>{state.requestedPackages=state.requestedPackages.filter((p=>p!==action.payload))},packageAdded:(state,action)=>{state.requestedPackages.push(action.payload)},buildPackagesCacheAdded:(state,action)=>{const{pkgName,packages,count}=action.payload;state.buildPackagesCache[pkgName]={packages,count}}},extraReducers:builder=>{builder.addMatcher(_environmentDetails__WEBPACK_IMPORTED_MODULE_2__.yX.endpoints.getBuild.matchFulfilled,((state,{payload:{data:{specification:{spec}}}})=>{let dependencies=[];spec.dependencies&&(dependencies=spec.dependencies),state.requestedPackages=dependencies,state.packagesWithLatestVersions={},state.versionsWithConstraints={},dependencies.forEach((dep=>{if("string"==typeof dep){const{constraint,name,version}=(0,_utils_helpers__WEBPACK_IMPORTED_MODULE_0__.uP)(dep);version&&(state.versionsWithConstraints[name]=version),"latest"===constraint&&(state.packagesWithLatestVersions[name]=dep)}}))})),builder.addMatcher(_dependencies__WEBPACK_IMPORTED_MODULE_1__.Ac.endpoints.getBuildPackages.matchFulfilled,((state,{payload:{data,size,count,page}})=>{state.versionsWithoutConstraints={},data.forEach((dep=>{state.packagesWithLatestVersions[dep.name]&&(state.versionsWithoutConstraints[dep.name]=dep.version)}))}))}}),{updatePackages,dependencyPromoted,packageUpdated,packageRemoved,packageAdded,buildPackagesCacheAdded}=requestedPackagesSlice.actions},"./src/features/tabs/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{yF:()=>environmentClosed,tj:()=>environmentOpened,K2:()=>tabChanged,rV:()=>tabsSlice,Ho:()=>toggleNewEnvironmentView,ww:()=>updateEnvironmentBuildId});const tabsSlice=(0,__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js").Z0)({name:"tabs",initialState:{selectedEnvironments:[],selectedEnvironment:null,value:0,newEnvironment:{isOpen:!1,isActive:!1,namespace:""}},reducers:{environmentOpened:(state,action)=>{const environments=state.selectedEnvironments,openedEnvironment=action.payload.environment;state.selectedEnvironment={...openedEnvironment,canUpdate:action.payload.canUpdate},state.value=openedEnvironment.id,environments.some((env=>env.id===openedEnvironment.id))||(state.selectedEnvironments[0]=openedEnvironment)},environmentClosed:(state,action)=>{const closedEnvironmentId=action.payload.envId,index=state.selectedEnvironments.findIndex((env=>env.id===closedEnvironmentId)),listLength=state.selectedEnvironments.length;if(action.payload.selectedEnvironmentId===closedEnvironmentId)if(listLength>1){const rightItem=state.selectedEnvironments[index+1],leftItem=state.selectedEnvironments[index-1];state.selectedEnvironment=rightItem??leftItem,state.value=state.selectedEnvironment.id,state.newEnvironment.isActive=!1}else 1===listLength&&state.newEnvironment.isOpen?(state.value="create",state.selectedEnvironment=null,state.newEnvironment.isActive=!0):(state.selectedEnvironment=null,state.value=0);state.selectedEnvironments=state.selectedEnvironments.filter((env=>env.id!==closedEnvironmentId))},tabChanged:(state,action)=>{const tabValue=action.payload,environment=state.selectedEnvironments.find((env=>env.id===tabValue));state.value=tabValue,environment&&(state.selectedEnvironment=environment)},openCreateNewEnvironmentTab:(state,action)=>{state.newEnvironment.namespace=action.payload,state.value="create",state.selectedEnvironment=null,state.newEnvironment.isOpen=!0,state.newEnvironment.isActive=!0},closeCreateNewEnvironmentTab:state=>{const listLength=state.selectedEnvironments.length,lastEnv=state.selectedEnvironments[listLength-1];state.value=lastEnv?lastEnv.id:0,state.selectedEnvironment=lastEnv||null,state.newEnvironment.isOpen=!1,state.newEnvironment.isActive=!1},toggleNewEnvironmentView:(state,action)=>{action.payload&&(state.value="create",state.selectedEnvironment=null),state.newEnvironment.isActive=action.payload},updateEnvironmentBuildId:(state,action)=>{state.selectedEnvironment&&(state.selectedEnvironment.current_build_id=action.payload)}}}),{environmentOpened,environmentClosed,tabChanged,openCreateNewEnvironmentTab,closeCreateNewEnvironmentTab,toggleNewEnvironmentView,updateEnvironmentBuildId}=tabsSlice.actions},"./src/hooks.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{G:()=>useAppSelector,j:()=>useAppDispatch});var react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js");const useAppDispatch=react_redux__WEBPACK_IMPORTED_MODULE_0__.wA,useAppSelector=react_redux__WEBPACK_IMPORTED_MODULE_0__.d4},"./src/preferences.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{be:()=>PrefContext,jI:()=>prefGlobal});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),process=__webpack_require__("./node_modules/process/browser.js");const{condaStoreConfig={}}="undefined"!=typeof window&&window,prefDefault={apiUrl:process.env.REACT_APP_API_URL??condaStoreConfig.REACT_APP_API_URL??"http://localhost:8080/conda-store/",authMethod:process.env.REACT_APP_AUTH_METHOD??condaStoreConfig.REACT_APP_AUTH_METHOD??"cookie",authToken:process.env.REACT_APP_AUTH_TOKEN??condaStoreConfig.REACT_APP_AUTH_TOKEN??"",loginUrl:process.env.REACT_APP_LOGIN_PAGE_URL??condaStoreConfig.REACT_APP_LOGIN_PAGE_URL??"http://localhost:8080/conda-store/login?next=",styleType:process.env.REACT_APP_STYLE_TYPE??condaStoreConfig.REACT_APP_STYLE_TYPE??"green-accent",showAuthButton:process.env.REACT_APP_SHOW_AUTH_BUTTON?JSON.parse(process.env.REACT_APP_SHOW_AUTH_BUTTON):void 0===condaStoreConfig||void 0===condaStoreConfig.REACT_APP_SHOW_AUTH_BUTTON||JSON.parse(condaStoreConfig.REACT_APP_SHOW_AUTH_BUTTON),logoutUrl:process.env.REACT_APP_LOGOUT_PAGE_URL??condaStoreConfig.REACT_APP_LOGOUT_PAGE_URL??"http://localhost:8080/conda-store/logout?next=/"};const prefGlobal=new class Preferences{constructor(pref=prefDefault){this.set(pref)}get apiUrl(){return this._apiUrl}get authMethod(){return this._authMethod}get authToken(){return this._authToken}get loginUrl(){return this._loginUrl}get styleType(){return this._styleType}get showAuthButton(){return this._showAuthButton}get logoutUrl(){return this._logoutUrl}set(pref){this._apiUrl=pref.apiUrl,this._authMethod=pref.authMethod,this._authToken=pref.authToken,this._loginUrl=pref.loginUrl,this._styleType=pref.styleType,this._showAuthButton=pref.showAuthButton,this._logoutUrl=pref.logoutUrl}_apiUrl;_authMethod;_authToken;_loginUrl;_styleType;_showAuthButton;_logoutUrl},PrefContext=react__WEBPACK_IMPORTED_MODULE_0__.createContext(prefDefault)},"./src/styles/StyledMetadataItem.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{S:()=>StyledMetadataItem});var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js");const StyledMetadataItem=(0,__webpack_require__("./node_modules/@mui/system/esm/styled.js").A)(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__.A)((({theme})=>({padding:"0 0 10px 0",fontSize:"13px",fontFamily:'"Inter", sans-serif',color:"#333"})))},"./src/styles/index.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{uV:()=>StyledAccordionDetails,Ql:()=>StyledAccordionSummary,AM:()=>StyledAccordionTitle,OV:()=>StyledButton,Bj:()=>StyledIconButton,SW:()=>StyledMetadataItem.S,bv:()=>StyledRequestedPackagesTableCell,so:()=>StyledScrollContainer,Yu:()=>StyledSwitch});var react=__webpack_require__("./node_modules/react/index.js"),AccordionSummary=__webpack_require__("./node_modules/@mui/material/AccordionSummary/AccordionSummary.js"),styled=__webpack_require__("./node_modules/@mui/system/esm/styled.js"),preferences=__webpack_require__("./src/preferences.tsx");const StyledAccordionSummary=(0,styled.A)(AccordionSummary.A,{shouldForwardProp:prop=>"styleType"!==prop})((({theme:{palette},styleType=react.useContext(preferences.be).styleType})=>({paddingLeft:"15px",paddingRight:"14px",height:40,border:"grayscale"===styleType?`1px solid ${palette.secondary.light}`:"1px solid #BCBFC4",borderRadius:"grayscale"===styleType?"5px":"0px","&.Mui-expanded":{minHeight:40,maxHeight:40,margin:"0px",borderRadius:"0",".MuiAccordionSummary-expandIconWrapper":{transform:"rotate(90deg)"}}})));var AccordionDetails=__webpack_require__("./node_modules/@mui/material/AccordionDetails/AccordionDetails.js");const StyledAccordionDetails=(0,styled.A)(AccordionDetails.A,{shouldForwardProp:prop=>"styleType"!==prop})((({theme:{palette},styleType=react.useContext(preferences.be).styleType})=>({border:"grayscale"===styleType?`1px solid ${palette.secondary.light}`:"1px solid #BCBFC4",borderTop:"none",borderRadius:"grayscale"===styleType?"0px 0px 5px 5px":"Opx",overflowY:"scroll","&::-webkit-scrollbar-thumb":{backgroundColor:"grayscale"===styleType?"#EBECEE":"#DADCE0",borderRadius:"5px",border:"grayscale"===styleType?"1px solid #666666":"none"}})));var Typography=__webpack_require__("./node_modules/@mui/material/Typography/Typography.js");const StyledAccordionTitle=(0,styled.A)(Typography.A,{shouldForwardProp:prop=>"styleType"!==prop})((({theme})=>({fontSize:"13px",fontWeight:500,color:"#333"})));var Button=__webpack_require__("./node_modules/@mui/material/Button/Button.js");const StyledButton=(0,styled.A)(Button.A,{shouldForwardProp:prop=>"styleType"!==prop,overridesResolver:(props,styles)=>[styles.root,"primary"===props.color&&styles.primary,"secondary"===props.color&&styles.secondary]})((({theme,color="primary"})=>{const palette=theme.palette[color],{palette:{secondary}}=theme;return{padding:"4px 12px 4px 12px",border:palette.main,fontSize:"14px",color:palette.contrastText,textTransform:"none",backgroundColor:palette.main,boxShadow:"none",borderRadius:"4px",gap:"6px",":hover":{boxShadow:"none",color:palette.contrastText,backgroundColor:palette.dark,textDecoration:"underline",textUnderlineOffset:"0.3em"},"&:focus":{outlineColor:palette.main,outlineStyle:"auto",outlineOffset:"4px",outlineWidth:"medium",transition:"none"},"&:disabled":{backgroundColor:secondary[100],border:"none",color:secondary.light}}}));var TableCell=__webpack_require__("./node_modules/@mui/material/TableCell/TableCell.js");const StyledRequestedPackagesTableCell=(0,styled.A)(TableCell.A)((({theme})=>({borderBottom:"0px"}))),StyledIconButton=(0,styled.A)(Button.A)((({theme})=>({color:theme.palette.primary.main,borderRadius:"0px",padding:"0px",minWidth:"auto",":hover":{boxShadow:"none",color:theme.palette.primary.main,backgroundColor:theme.palette.primary[50]},"&:focus":{outlineColor:theme.palette.primary.main,backgroundColor:theme.palette.primary[50],outlineStyle:"auto",outlineWidth:"medium",transition:"none"},'&[aria-disabled="true"]':{backgroundColor:theme.palette.secondary[100],border:"none",color:theme.palette.secondary[300]}})));var ArrowRightRounded=__webpack_require__("./node_modules/@mui/icons-material/ArrowRightRounded.js");(0,styled.A)(ArrowRightRounded.A)((({theme:{palette}})=>({width:51,height:55,color:palette.secondary.main})));var Box=__webpack_require__("./node_modules/@mui/material/Box/Box.js");const StyledScrollContainer=(0,styled.A)(Box.A,{shouldForwardProp:prop=>"styleType"!==prop})((({theme:{palette}})=>({height:"100%",overflowY:"scroll",overflowX:"hidden",paddingRight:"0px","&::-webkit-scrollbar":{width:"10px"},"&::-webkit-scrollbar-track":{backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:palette.secondary.light,borderRadius:"5px",border:"none"}})));(0,styled.A)(Box.A,{shouldForwardProp:prop=>"styleType"!==prop})((({theme,styleType=react.useContext(preferences.be).styleType})=>({border:"1px solid #E0E0E0",marginTop:"25px",boxShadow:"none",backgroundColor:"grayscale"===styleType?"#EBECEE":"#E6F4EA"})));var StyledMetadataItem=__webpack_require__("./src/styles/StyledMetadataItem.tsx"),Switch=__webpack_require__("./node_modules/@mui/material/Switch/Switch.js");const StyledSwitch=(0,styled.A)(Switch.A,{shouldForwardProp:prop=>"styleType"!==prop})((({theme:{palette}})=>({width:62,"& .MuiSwitch-switchBase":{padding:"1px",margin:"6px",backgroundColor:palette.primary.main,"&.Mui-checked":{backgroundColor:palette.primary.main,"& + .MuiSwitch-track":{opacity:1,backgroundColor:palette.secondary.light},":hover":{boxShadow:`0px 0px 10px ${palette.primary.light}`,backgroundColor:palette.primary.main},":focus":{boxShadow:`0px 0px 10px ${palette.primary.light}`,backgroundColor:palette.primary.main}},":hover":{boxShadow:`0px 0px 10px ${palette.primary.light}`,backgroundColor:palette.primary.main},":focus":{boxShadow:`0px 0px 10px ${palette.primary.light}`,backgroundColor:palette.primary.main}},"& .MuiSwitch-thumb":{backgroundColor:palette.primary.main},"& .MuiSwitch-track":{opacity:1,backgroundColor:palette.secondary.light}})));(0,styled.A)(Button.A)((({theme})=>({color:theme.palette.common.black,borderRadius:"0px",padding:"0px",minWidth:"auto",":hover":{boxShadow:"none",textDecoration:"underline",textUnderlineOffset:"0.3em"}})))},"./src/utils/helpers/artifact.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=(currentBuildId,apiArtifactTypes)=>{if(!currentBuildId)return[];const artifact_map={LOCKFILE:{name:"Show lockfile",route:`api/v1/build/${currentBuildId}/lockfile/`},YAML:{name:"Show yml file",route:`api/v1/build/${currentBuildId}/yaml/`},LOGS:{name:`Show Conda environment ${currentBuildId} log`,route:`api/v1/build/${currentBuildId}/logs/`},DOCKER_MANIFEST:{name:"Show Docker image",route:`api/v1/build/${currentBuildId}/docker/`},CONDA_PACK:{name:"Download archive",route:`api/v1/build/${currentBuildId}/archive/`}};return apiArtifactTypes.reduce(((acc,cur)=>acc.concat(artifact_map[cur])),[])}},"./src/utils/helpers/buildMapper.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{B:()=>buildStatus,Q:()=>buildDatetimeStatus});var date_fns_tz__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/date-fns-tz/index.js");const STATUS_OPTIONS={COMPLETED:"Available",QUEUED:"Queued",FAILED:"Failed",BUILDING:"Building"},TIMEZONE=Intl.DateTimeFormat().resolvedOptions().timeZone,dateToTimezone=date=>{if(!date)return"";const zonedDate=(0,date_fns_tz__WEBPACK_IMPORTED_MODULE_0__.utcToZonedTime)(`${date}Z`,TIMEZONE);return(0,date_fns_tz__WEBPACK_IMPORTED_MODULE_0__.format)(zonedDate,"MMMM do, yyyy - h:mm a",{timeZone:TIMEZONE})},buildDatetimeStatus=({id,status,ended_on,scheduled_on},currentBuildId)=>id===currentBuildId?`${dateToTimezone(ended_on??scheduled_on)} - Active`:"BUILDING"===status?`${dateToTimezone(scheduled_on)} - Building`:"QUEUED"===status?`${dateToTimezone(scheduled_on)} - Queued`:`${dateToTimezone(ended_on??scheduled_on)} - ${STATUS_OPTIONS[status]}`,buildStatus=({status,ended_on,scheduled_on})=>{if("COMPLETED"===status){if(ended_on&&scheduled_on){const startTime=new Date(scheduled_on);let duration=(new Date(ended_on).valueOf()-startTime.valueOf())/6e4;if(duration=Math.round(duration),duration>0)return`Completed in ${duration} min`}return"Completed"}return STATUS_OPTIONS[status]}},"./src/utils/helpers/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{LK:()=>parseArtifactList.L,CD:()=>getIconForStyleType,xs:()=>getStylesForStyleType,Pj:()=>reorderArray,uP:()=>requestedPackageParser,$$:()=>useInterval});const reorderArray=({list,startIndex,endIndex})=>{const result=JSON.parse(JSON.stringify(list)),[removed]=result.splice(startIndex,1);return result.splice(endIndex,0,removed),result},requestedPackageParser=requestedPackageName=>{const splittedPackageName=requestedPackageName.split(/(>=|<=|<|>|==|=)/g),name=splittedPackageName[0];let version="",constraint="latest";return splittedPackageName.length>1&&(constraint=splittedPackageName[1],version=splittedPackageName[2]),{name,version,constraint}};__webpack_require__("./src/utils/helpers/buildMapper.ts");var parseArtifactList=__webpack_require__("./src/utils/helpers/parseArtifactList.ts"),react=__webpack_require__("./node_modules/react/index.js"),preferences=__webpack_require__("./src/preferences.tsx");const getStylesForStyleType=(grayscaleStyles,greenAccentStyles)=>{if(!greenAccentStyles)return grayscaleStyles;return"grayscale"===react.useContext(preferences.be).styleType?grayscaleStyles:greenAccentStyles},getIconForStyleType=(grayscaleIcon,greenAccentIcon)=>{if(!greenAccentIcon)return grayscaleIcon;return"grayscale"===react.useContext(preferences.be).styleType?grayscaleIcon:greenAccentIcon},useInterval=(callback,delay)=>{const savedCallback=(0,react.useRef)();(0,react.useEffect)((()=>{savedCallback.current=callback}),[callback]),(0,react.useEffect)((()=>{const tick=()=>{savedCallback.current()};if(tick(),delay){const id=setInterval(tick,delay);return()=>clearInterval(id)}}),[delay])}},"./src/utils/helpers/parseArtifactList.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{L:()=>artifactBaseUrl,n:()=>parseArtifacts});const artifacts=["LOGS","LOCKFILE","CONDA_PACK","YAML","DOCKER_MANIFEST"],parseArtifacts=artifact_list=>artifact_list?.length?artifacts.filter((artifact=>artifact_list.includes(artifact))):[],artifactBaseUrl=(apiUrl,baseUrl)=>{return path=apiUrl,new RegExp("^(?:[a-z]+:)?//","i").test(path)?apiUrl:`${baseUrl}${apiUrl}`;var path}}}]); \ No newline at end of file diff --git a/iframe.html b/iframe.html index 7ae54657..5a4563a0 100644 --- a/iframe.html +++ b/iframe.html @@ -504,7 +504,7 @@ window['TAGS_OPTIONS'] = {"dev-only":{"excludeFromDocsStories":true},"docs-only":{"excludeFromSidebar":true},"test-only":{"excludeFromSidebar":true,"excludeFromDocsStories":true}};