From b9eb80f1f9ce1f2701bab4fa1246f5a3d1aaf9ad Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Thu, 20 Jul 2023 04:45:12 -0400 Subject: [PATCH] build(striker-ui): rebuild --- .../out/_next/static/5ghPCXPyYH0fSHU4ACt4F/_buildManifest.js | 1 + .../_middlewareManifest.js | 0 .../_ssgManifest.js | 0 .../out/_next/static/80gKnCQuMqHJTSo3gTfw0/_buildManifest.js | 1 - striker-ui/out/_next/static/chunks/116-dfb7b81f7280bb6d.js | 1 - striker-ui/out/_next/static/chunks/203-2f903a41f9b4e31e.js | 1 - striker-ui/out/_next/static/chunks/62-532ed713980da8db.js | 1 + striker-ui/out/_next/static/chunks/665.ae67dcf3c1b6f7f6.js | 1 + striker-ui/out/_next/static/chunks/665.b5fa539eea66745a.js | 1 - striker-ui/out/_next/static/chunks/746-a9b6e396d532b9a2.js | 1 - striker-ui/out/_next/static/chunks/780-e8b3396d257460a4.js | 1 + striker-ui/out/_next/static/chunks/825-d34974d169ea09cc.js | 1 + striker-ui/out/_next/static/chunks/906-86856e16ad160b72.js | 1 - striker-ui/out/_next/static/chunks/94-72a91d19236239d0.js | 1 + .../out/_next/static/chunks/pages/anvil-c1177b17efcafc34.js | 1 + .../out/_next/static/chunks/pages/anvil-fbef5033b416c0dd.js | 1 - .../{config-0381f0311f2b572a.js => config-0ecdb2b2b3f8c089.js} | 2 +- ...ger-21a667deb0a17960.js => file-manager-1a707639a4834587.js} | 2 +- .../{index-2eaaa0d56c4c4f15.js => index-1f8f0ad3b3894dbc.js} | 2 +- .../{init-e60db40234cb8025.js => init-ae1befa8975f7914.js} | 2 +- .../{login-398afa43b3c54927.js => login-b5de0cd2f49998d6.js} | 2 +- ...t-79adadce1efb772f.js => manage-element-2b1d8792c2a5bf47.js} | 2 +- .../out/_next/static/chunks/pages/server-bf2d408a68a09e13.js | 1 - .../out/_next/static/chunks/pages/server-db52258419acacf3.js | 1 + ...{webpack-387b178bb4c5665f.js => webpack-b267a65404defb57.js} | 2 +- striker-ui/out/anvil.html | 2 +- striker-ui/out/config.html | 2 +- striker-ui/out/file-manager.html | 2 +- striker-ui/out/index.html | 2 +- striker-ui/out/init.html | 2 +- striker-ui/out/login.html | 2 +- striker-ui/out/manage-element.html | 2 +- striker-ui/out/server.html | 2 +- 33 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 striker-ui/out/_next/static/5ghPCXPyYH0fSHU4ACt4F/_buildManifest.js rename striker-ui/out/_next/static/{80gKnCQuMqHJTSo3gTfw0 => 5ghPCXPyYH0fSHU4ACt4F}/_middlewareManifest.js (100%) rename striker-ui/out/_next/static/{80gKnCQuMqHJTSo3gTfw0 => 5ghPCXPyYH0fSHU4ACt4F}/_ssgManifest.js (100%) delete mode 100644 striker-ui/out/_next/static/80gKnCQuMqHJTSo3gTfw0/_buildManifest.js delete mode 100644 striker-ui/out/_next/static/chunks/116-dfb7b81f7280bb6d.js delete mode 100644 striker-ui/out/_next/static/chunks/203-2f903a41f9b4e31e.js create mode 100644 striker-ui/out/_next/static/chunks/62-532ed713980da8db.js create mode 100644 striker-ui/out/_next/static/chunks/665.ae67dcf3c1b6f7f6.js delete mode 100644 striker-ui/out/_next/static/chunks/665.b5fa539eea66745a.js delete mode 100644 striker-ui/out/_next/static/chunks/746-a9b6e396d532b9a2.js create mode 100644 striker-ui/out/_next/static/chunks/780-e8b3396d257460a4.js create mode 100644 striker-ui/out/_next/static/chunks/825-d34974d169ea09cc.js delete mode 100644 striker-ui/out/_next/static/chunks/906-86856e16ad160b72.js create mode 100644 striker-ui/out/_next/static/chunks/94-72a91d19236239d0.js create mode 100644 striker-ui/out/_next/static/chunks/pages/anvil-c1177b17efcafc34.js delete mode 100644 striker-ui/out/_next/static/chunks/pages/anvil-fbef5033b416c0dd.js rename striker-ui/out/_next/static/chunks/pages/{config-0381f0311f2b572a.js => config-0ecdb2b2b3f8c089.js} (99%) rename striker-ui/out/_next/static/chunks/pages/{file-manager-21a667deb0a17960.js => file-manager-1a707639a4834587.js} (99%) rename striker-ui/out/_next/static/chunks/pages/{index-2eaaa0d56c4c4f15.js => index-1f8f0ad3b3894dbc.js} (96%) rename striker-ui/out/_next/static/chunks/pages/{init-e60db40234cb8025.js => init-ae1befa8975f7914.js} (99%) rename striker-ui/out/_next/static/chunks/pages/{login-398afa43b3c54927.js => login-b5de0cd2f49998d6.js} (98%) rename striker-ui/out/_next/static/chunks/pages/{manage-element-79adadce1efb772f.js => manage-element-2b1d8792c2a5bf47.js} (99%) delete mode 100644 striker-ui/out/_next/static/chunks/pages/server-bf2d408a68a09e13.js create mode 100644 striker-ui/out/_next/static/chunks/pages/server-db52258419acacf3.js rename striker-ui/out/_next/static/chunks/{webpack-387b178bb4c5665f.js => webpack-b267a65404defb57.js} (96%) diff --git a/striker-ui/out/_next/static/5ghPCXPyYH0fSHU4ACt4F/_buildManifest.js b/striker-ui/out/_next/static/5ghPCXPyYH0fSHU4ACt4F/_buildManifest.js new file mode 100644 index 00000000..0aeb4cb4 --- /dev/null +++ b/striker-ui/out/_next/static/5ghPCXPyYH0fSHU4ACt4F/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST=function(s,c,a,e,t,n,i,f,d,u,k,b,h,j,r,g){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,a,e,i,f,b,"static/chunks/717-8bd60b96d67fd464.js",c,t,n,d,h,j,"static/chunks/pages/index-1f8f0ad3b3894dbc.js"],"/_error":["static/chunks/pages/_error-2280fa386d040b66.js"],"/anvil":[s,a,e,i,f,b,c,t,n,d,h,"static/chunks/pages/anvil-c1177b17efcafc34.js"],"/config":[s,a,e,u,c,t,n,k,"static/chunks/pages/config-0ecdb2b2b3f8c089.js"],"/file-manager":[s,a,e,i,"static/chunks/768-9ee3dcb62beecb53.js",c,t,"static/chunks/pages/file-manager-1a707639a4834587.js"],"/init":[s,a,i,f,u,r,c,t,n,d,g,"static/chunks/pages/init-ae1befa8975f7914.js"],"/login":[s,a,e,c,t,n,k,"static/chunks/pages/login-b5de0cd2f49998d6.js"],"/manage-element":[s,a,e,i,f,u,r,"static/chunks/195-d5fd184cc249f755.js",c,t,n,d,k,g,"static/chunks/pages/manage-element-2b1d8792c2a5bf47.js"],"/server":[s,e,"static/chunks/227-a3756585a7ef09ae.js",c,j,"static/chunks/pages/server-db52258419acacf3.js"],sortedPages:["/","/_app","/_error","/anvil","/config","/file-manager","/init","/login","/manage-element","/server"]}}("static/chunks/382-f51344f6f9208507.js","static/chunks/62-532ed713980da8db.js","static/chunks/483-f8013e38dca1620d.js","static/chunks/894-e57948de523bcf96.js","static/chunks/780-e8b3396d257460a4.js","static/chunks/899-83e9de2a35c6bcf0.js","static/chunks/182-08683bbe95fbb010.js","static/chunks/614-0ce04fd295045ffe.js","static/chunks/140-ec935fb15330b98a.js","static/chunks/644-c7c6e21c71345aed.js","static/chunks/903-dc2a40be612a10c3.js","static/chunks/485-77798bccc4308d0e.js","static/chunks/825-d34974d169ea09cc.js","static/chunks/94-72a91d19236239d0.js","static/chunks/676-6159ce853338cc1f.js","static/chunks/692-59a4ae2829590f4c.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/striker-ui/out/_next/static/80gKnCQuMqHJTSo3gTfw0/_middlewareManifest.js b/striker-ui/out/_next/static/5ghPCXPyYH0fSHU4ACt4F/_middlewareManifest.js similarity index 100% rename from striker-ui/out/_next/static/80gKnCQuMqHJTSo3gTfw0/_middlewareManifest.js rename to striker-ui/out/_next/static/5ghPCXPyYH0fSHU4ACt4F/_middlewareManifest.js diff --git a/striker-ui/out/_next/static/80gKnCQuMqHJTSo3gTfw0/_ssgManifest.js b/striker-ui/out/_next/static/5ghPCXPyYH0fSHU4ACt4F/_ssgManifest.js similarity index 100% rename from striker-ui/out/_next/static/80gKnCQuMqHJTSo3gTfw0/_ssgManifest.js rename to striker-ui/out/_next/static/5ghPCXPyYH0fSHU4ACt4F/_ssgManifest.js diff --git a/striker-ui/out/_next/static/80gKnCQuMqHJTSo3gTfw0/_buildManifest.js b/striker-ui/out/_next/static/80gKnCQuMqHJTSo3gTfw0/_buildManifest.js deleted file mode 100644 index 2c93cfc3..00000000 --- a/striker-ui/out/_next/static/80gKnCQuMqHJTSo3gTfw0/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST=function(s,a,c,e,t,n,i,d,f,u,k,b,h,j,r,g){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,c,e,i,d,b,"static/chunks/717-8bd60b96d67fd464.js",a,t,n,f,h,j,"static/chunks/pages/index-2eaaa0d56c4c4f15.js"],"/_error":["static/chunks/pages/_error-2280fa386d040b66.js"],"/anvil":[s,c,e,i,d,b,a,t,n,f,h,"static/chunks/pages/anvil-fbef5033b416c0dd.js"],"/config":[s,c,e,u,a,t,n,k,"static/chunks/pages/config-0381f0311f2b572a.js"],"/file-manager":[s,c,e,i,"static/chunks/768-9ee3dcb62beecb53.js",a,t,"static/chunks/pages/file-manager-21a667deb0a17960.js"],"/init":[s,c,i,d,u,r,a,t,n,f,g,"static/chunks/pages/init-e60db40234cb8025.js"],"/login":[s,c,e,a,t,n,k,"static/chunks/pages/login-398afa43b3c54927.js"],"/manage-element":[s,c,e,i,d,u,r,"static/chunks/195-d5fd184cc249f755.js",a,t,n,f,k,g,"static/chunks/pages/manage-element-79adadce1efb772f.js"],"/server":[s,e,"static/chunks/227-a3756585a7ef09ae.js",a,j,"static/chunks/pages/server-bf2d408a68a09e13.js"],sortedPages:["/","/_app","/_error","/anvil","/config","/file-manager","/init","/login","/manage-element","/server"]}}("static/chunks/382-f51344f6f9208507.js","static/chunks/746-a9b6e396d532b9a2.js","static/chunks/483-f8013e38dca1620d.js","static/chunks/894-e57948de523bcf96.js","static/chunks/203-2f903a41f9b4e31e.js","static/chunks/899-83e9de2a35c6bcf0.js","static/chunks/182-08683bbe95fbb010.js","static/chunks/614-0ce04fd295045ffe.js","static/chunks/140-ec935fb15330b98a.js","static/chunks/644-c7c6e21c71345aed.js","static/chunks/903-dc2a40be612a10c3.js","static/chunks/485-77798bccc4308d0e.js","static/chunks/116-dfb7b81f7280bb6d.js","static/chunks/906-86856e16ad160b72.js","static/chunks/676-6159ce853338cc1f.js","static/chunks/692-59a4ae2829590f4c.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/116-dfb7b81f7280bb6d.js b/striker-ui/out/_next/static/chunks/116-dfb7b81f7280bb6d.js deleted file mode 100644 index da0064cf..00000000 --- a/striker-ui/out/_next/static/chunks/116-dfb7b81f7280bb6d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[116],{4594:function(e,n,t){var r=t(5893),o=t(6514),i=t(5113),a=t(4656),s=t(482),l=t(2994),u=t(7357),c=t(9890),p=t(7169),d=t(1363),f=t(6284);function v(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function m(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var g=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,m({},e))})};n.Z=function(e){var n=e.componentsProps,t=e.extendRenderInput,o=e.label,i=e.messageBoxProps,h=e.renderInput,b=e.sx,y=x(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),U=m({paper:{sx:{backgroundColor:p.lD}}},n),S=null!==h&&void 0!==h?h:function(e){var n=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,s=e.inputProps,l={formControlProps:{fullWidth:n,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:s,startAdornment:i.startAdornment},label:o};return null===t||void 0===t||t.call(null,l,e),(0,r.jsx)(f.Z,m({},l))},j=m(v({},"& .".concat(a.Z.root," .").concat(s.Z.endAdornment),v({right:"7px"},"& .".concat(l.Z.root),{color:p.s7})),b);return(0,r.jsxs)(u.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(c.Z,m({PaperComponent:g},y,{componentsProps:U,renderInput:S,sx:j})),(0,r.jsx)(d.Z,m({},i))]})}},5521:function(e,n,t){t.d(n,{Z:function(){return E}});var r=t(5893),o=t(1113),i=t(1496),a=t(2293),s=t(7357),l=t(2992),u=t(4799),c=t(7294),p=t(7169),d=t(4433),f=t(9029),v=t(7533),m=t(8462),x=t(7212),g=t(8619),h=[{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/manage-element"},{text:"Files",image:"/pngs/files_on.png",uri:"/file-manager"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/config"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],b={width:"40em",height:"40em"},y=t(4390),U=t(582),S=t(4690),j=t(1770),I=t(7750),P=t(1081);function D(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return t["".concat(n).concat(e)]}),[t]),i=(0,c.useCallback)((function(){return o("user")}),[o]);return(0,c.useEffect)((function(){if(e){var n=document.cookie.split(/\s*;\s*/);r(n.reduce((function(e,n){var t,r=w(n.split("=",2),2),o=r[0],i=r[1],a=decodeURIComponent(i);if(a.startsWith("j:"))try{t=JSON.parse(a.substring(2))}catch(s){t=i}else t=i;return e[o]=t,e}),{}))}}),[e]),{cookieJar:t,getCookie:o,getSessionUser:i}};function O(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function A(e){for(var n=1;n0)},ref:n})]})}},4968:function(e,n,t){t.d(n,{Z:function(){return Ue}});var r=t(5893),o=t(7294),a=t(7357),s=t(6886),l=t(8262),u=t(5537),c=t(5934),p=t(7169),d=t(4390),f=t(4594),v=t(157),m=t(4825),x=t(5737),g=t(1706),h=t(8187),b=t(6284),y=t(7120),U=t(4656),S=t(1363),j=t(7783);function I(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function P(e){for(var n=1;n :first-child":{flexGrow:1},"& > :not(:last-child)":{marginRight:".5em"}},"&:hover\n .".concat(y.Z.root,"\n .").concat(U.Z.root,"\n .").concat(U.Z.notchedOutline),{borderColor:p.s7}),children:[(0,r.jsx)(b.Z,P({id:n,label:t},i)),(0,r.jsx)(j.Z,P({formControlProps:{fullWidth:!1},id:"".concat(n,"-nested-select"),selectItems:u},d))]}),(0,r.jsx)(S.Z,P({},l))]})};w.defaultProps=D;var Z=w,O=t(3679),A=t(3640),C=t(6727),M=t(1184),k=t(9),G=t(192),B=t(7750);function z(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function E(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"===typeof e)return z(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return z(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var W={inputLabelProps:{},isAllowTextInput:!1,labelId:"",messageBoxProps:{},sliderProps:{}},V={root:"".concat("SliderInputLabelDecorator","-root")},R=function(e){var n=e.isFocused,t=e.label,o=p.s7,i="solid",s="0",l="0 .6em 0 .4em",u="1px 0 0 0",c="0.3";return n&&(s="-1px",l="0 1em 0 1em",u="2px 0 0 0",c="1"),(0,r.jsxs)(a.Z,{className:V.root,sx:{display:"flex",flexDirection:"row",position:"absolute",top:s,width:"calc(100% - 6px)","> :last-child":{flexGrow:1}},children:[(0,r.jsx)(a.Z,{sx:{borderColor:o,borderStyle:i,borderWidth:u,content:'""',opacity:c,width:".6em"}}),(0,r.jsx)(B.Ac,{sx:{fontSize:".75em",margin:l,visibility:"hidden"},text:t}),(0,r.jsx)(a.Z,{sx:{borderColor:o,borderStyle:i,borderWidth:u,content:'""',opacity:c}})]})},_=function(e,n){var t=Number.parseFloat(e);return Number.isNaN(t)?n:t},Q=function(e){return N(e,Array)?e.map((function(e){return String(e)})):[String(e)]},q=function(e){var n,t=e.messageBoxProps,i=void 0===t?W.messageBoxProps:t,s=e.isAllowTextInput,l=void 0===s?W.isAllowTextInput:s,u=e.label,c=e.labelId,d=void 0===c?W.labelId:c,f=e.inputLabelProps,v=void 0===f?W.inputLabelProps:f,m=e.sliderProps,x=void 0===m?W.sliderProps:m,g=e.value,h=x.max,b=x.min,y=x.onChange,j=x.sx,I=x.valueLabelDisplay,P=g,D=(0,o.useState)({range:Q(g)}),w=D[0],Z=D[1],O=(0,o.useState)(!1),B=O[0],z=O[1],q=function(){z(!1)},H=function(){z(!0)},J=function(){P=function(e,n){return N(n,Array)?e.map((function(e,t){return _(e,n[t])})):_(e[0],n)}(w.range,P),null===y||void 0===y||y.call(null,P)};return(0,r.jsxs)(A.Z,{sx:{display:"flex",flexDirection:"column","&:hover":(n={},T(n,"& .".concat(V.root," div"),{opacity:1}),T(n,"& .".concat(U.Z.notchedOutline),{borderColor:p.s7}),n)},children:[(0,r.jsx)(G.Z,F({className:B?C.Z.focused:"",id:d,shrink:!0},v,{children:u})),R({isFocused:B,label:u}),(0,r.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row","> :first-child":{flexGrow:1}},children:[(0,r.jsx)(M.ZP,{"aria-labelledby":d,max:h,min:b,onBlur:q,onChange:function(e,n){Z({range:Q(n)}),null===y||void 0===y||y.call(null,n)},onFocus:H,sx:F(T({color:p.s7,marginLeft:"1em",marginRight:"1em"},"& .".concat(M.TW.thumb),{borderRadius:p.n_,transform:"translate(-50%, -50%) rotate(45deg)"}),j),value:P,valueLabelDisplay:I}),w.range.map((function(e,n){return function(e){var n=e.key,t=e.isFocused,o=L(e,["key","isFocused"]);return(0,r.jsx)(k.Z,F({key:n,className:t?U.Z.focused:"",type:"number"},o))}({key:"slider-nested-text-input-".concat(n),inputProps:{max:h,min:b},isFocused:B,onBlur:q,onChange:function(){for(var e=arguments.length,t=new Array(e),r=0;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function oe(e,n){return K(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}}(e,n)||se(e,n)||ne()}function ie(e){return K(e)||ee(e)||se(e,i)||ne()}function ae(e){return function(e){if(Array.isArray(e))return Y(e)}(e)||ee(e)||se(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function se(e,n){if(e){if("string"===typeof e)return Y(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Y(e,n):void 0}}var le,ue,ce=BigInt(0),pe=[{value:"B"},{value:"KiB"},{value:"MiB"},{value:"GiB"},{value:"TiB"}],de="GiB",fe=BigInt(65536),ve=BigInt(104857600),me={backgroundColor:p.Ej,color:p.lD,"&:hover":{backgroundColor:p.Ej}},xe=function(e,n){var t=n.onButtonClick;return(0,r.jsx)(m.Z,{disabled:void 0===t,onClick:t,sx:{minWidth:"unset",whiteSpace:"nowrap"},children:"Max: ".concat(e)})},ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.endAdornment,t=e.mainLabel,o=e.subLabel;return(0,r.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row",width:"100%","& > :first-child":{flexGrow:1}},children:[(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:[t&&(0,r.jsx)(B.Ac,{inverted:!0,text:t}),o&&(0,r.jsx)(B.Ac,{inverted:!0,text:o})]}),n]})},he=function(e,n,t,r,o,i,a){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=s.includeAnvilUUIDs,u=void 0===l?[]:l,c=s.includeFileUUIDs,p=void 0===c?[]:c,d=s.includeStorageGroupUUIDs,f=void 0===d?[]:d,v=function(){return!0},m=function(){return!0},x=function(){return!0};u.length>0&&(v=function(e){return u.includes(e)}),p.length>0&&(m=function(e){return p.includes(e)}),f.length>0&&(x=function(e){return f.includes(e)});var g={},h=i.reduce((function(e,n,t){var r,i=null!==(r=o[t])&&void 0!==r?r:ce;return e.all+=i,""===n||(void 0===e[n]&&(e[n]=ce),e[n]+=i),e}),{all:ce}),b=e.reduce((function(e,s){var l=s.anvilUUID;if(v(l)){var u,c=s.anvilTotalCPUCores,p=s.anvilTotalAvailableMemory,d=s.files,f=s.fileUUIDs,b=s.storageGroups,y=[],U=ce,S=ce;if(b.forEach((function(e){var n=e.storageGroupUUID,t=e.storageGroupFree;x(n)&&(y.push(n),S+=t,t>U&&(U=t))})),[function(){return b.length>0},function(){return t<=c},function(){return r<=p},function(){return i.every((function(e,t){var r,i=null!==(r=o[t])&&void 0!==r?r:ce,a=!0,s=i<=U;return""!==e&&(a=y.includes(e),s=i<=n[e].storageGroupFree),a&&s}))},function(){return Object.entries(h).every((function(e){var t=oe(e,2),r=t[0],o=t[1];return"all"===r?o<=S:o<=n[r].storageGroupFree}))},function(){return a.every((function(e){return""===e||f.includes(e)}))}].every((function(e){return e()})))e.anvils.push(s),e.anvilUUIDs.push(l),e.maxCPUCores=Math.max(c,e.maxCPUCores),p>e.maxMemory&&(e.maxMemory=p),d.forEach((function(e){var n=e.fileUUID;m(n)&&(g[n]=!0)})),(u=e.storageGroupUUIDs).push.apply(u,ae(y)),e.maxVirtualDiskSizes.fill(U)}return e}),{anvils:[],anvilUUIDs:[],fileUUIDs:[],maxCPUCores:0,maxMemory:ce,maxVirtualDiskSizes:i.map((function(){return ce})),storageGroupUUIDs:[]});return b.fileUUIDs=Object.keys(g),i.forEach((function(e,t){""!==e&&(b.maxVirtualDiskSizes[t]=n[e].storageGroupFree)})),b},be=function(e){return e.filter((function(e){return""!==e}))},ye=function(e){return{fromUnit:"B",onSuccess:{string:e},precision:0,toUnit:"ibyte"}};(0,x.Bh)(fe,ye((function(e,n){le="".concat(e," ").concat(n)}))),(0,x.Bh)(ve,ye((function(e,n){ue="".concat(e," ").concat(n)})));var Ue=function(e){var n=e.dialogProps.open,t=e.onClose,i=(0,o.useState)([]),y=i[0],U=i[1],S=(0,o.useState)({}),I=S[0],P=S[1],D=(0,o.useState)({}),w=D[0],A=D[1],C=(0,o.useState)({}),M=C[0],k=C[1],G=(0,o.useState)({}),z=G[0],T=G[1],N=(0,o.useState)([]),F=N[0],L=N[1],E=(0,o.useState)([]),W=E[0],V=E[1],R=(0,o.useState)([]),_=R[0],Q=R[1],q=(0,o.useState)([]),Y=q[0],K=q[1],ee=(0,o.useState)(""),ne=ee[0],se=ee[1],ye=(0,o.useState)(),Ue=ye[0],Se=ye[1],je=(0,o.useState)(1),Ie=je[0],Pe=je[1],De=(0,o.useState)(0),we=De[0],Ze=De[1],Oe=(0,o.useState)(),Ae=Oe[0],Ce=Oe[1],Me=(0,o.useState)(ce),ke=Me[0],Ge=Me[1],Be=(0,o.useState)(ce),ze=Be[0],Te=Be[1],Ne=(0,o.useState)(),Fe=Ne[0],Le=Ne[1],Ee=(0,o.useState)("0"),We=Ee[0],Ve=Ee[1],Re=(0,o.useState)(""),_e=Re[0],Qe=Re[1],qe=(0,o.useState)(de),He=qe[0],Je=qe[1],$e=(0,o.useState)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.existingVirtualDisks,t=void 0===n?{stateIds:[],inputMaxes:[],inputSizeMessages:[],inputSizes:[],inputStorageGroupUUIDMessages:[],inputStorageGroupUUIDs:[],inputUnits:[],maxes:[],sizes:[]}:n,r=e.stateId,o=void 0===r?(0,c.Z)():r,i=e.inputMax,a=void 0===i?"0":i,s=e.inputSize,l=void 0===s?"":s,u=e.inputSizeMessage,p=void 0===u?void 0:u,d=e.inputStorageGroupUUID,f=void 0===d?"":d,v=e.inputStorageGroupUUIDMessage,m=void 0===v?void 0:v,x=e.inputUnit,g=void 0===x?de:x,h=e.max,b=void 0===h?ce:h,y=e.setVirtualDisks,U=e.size,S=void 0===U?ce:U,j=t.stateIds,I=t.inputMaxes,P=t.inputSizeMessages,D=t.inputSizes,w=t.inputStorageGroupUUIDMessages,Z=t.inputStorageGroupUUIDs,O=t.inputUnits,A=t.maxes,C=t.sizes;return j.push(o),I.push(a),P.push(p),D.push(l),w.push(m),Z.push(f),O.push(g),A.push(b),C.push(S),null===y||void 0===y||y.call(null,te({},t)),t}()),Ye=$e[0],Ke=$e[1],Xe=(0,o.useState)(""),en=Xe[0],nn=Xe[1],tn=(0,o.useState)(),rn=tn[0],on=tn[1],an=(0,o.useState)(""),sn=an[0],ln=an[1],un=(0,o.useState)()[0],cn=(0,o.useState)(""),pn=cn[0],dn=cn[1],fn=(0,o.useState)(),vn=fn[0],mn=fn[1],xn=(0,o.useState)(null),gn=xn[0],hn=xn[1],bn=(0,o.useState)(),yn=bn[0],Un=bn[1],Sn=(0,o.useState)([]),jn=Sn[0],In=Sn[1],Pn=(0,o.useState)([]),Dn=Pn[0],wn=Pn[1],Zn=(0,o.useState)([]),On=Zn[0],An=Zn[1],Cn=(0,o.useState)(!1),Mn=Cn[0],kn=Cn[1],Gn=(0,o.useState)(!1),Bn=Gn[0],zn=Gn[1],Tn=(0,o.useState)(!1),Nn=Tn[0],Fn=Tn[1],Ln=(0,o.useState)(0),En=Ln[0],Wn=Ln[1],Vn={serverName:{defaults:{onSuccess:function(){Se(void 0)},value:ne},tests:[{onFailure:function(){Se({text:"The server name length must be 1 to 16 characters.",type:"warning"})},test:function(e){var n=e.value.length;return n>=1&&n<=16}},{onFailure:function(){Se({text:"The server name is expected to only contain alphanumeric, hyphen, or underscore characters.",type:"warning"})},test:function(e){var n=e.value;return/^[a-zA-Z0-9_-]+$/.test(n)}},{onFailure:function(){Se({text:"This server name already exists, please choose another name.",type:"warning"})},test:function(e){var n=e.value;return void 0===M[n]}}]},cpuCores:{defaults:{max:we,min:1,onSuccess:function(){Ce(void 0)},value:Ie},tests:[{onFailure:function(){Ce({text:"Non available.",type:"warning"})},test:$.X7},{onFailure:function(e){var n=e.displayMax,t=e.displayMin;Ce({text:"The number of CPU cores is expected to be between ".concat(t," and ").concat(n,"."),type:"warning"})},test:$.SQ}]},memory:{defaults:{displayMax:"".concat(We," ").concat(He),displayMin:le,max:ze,min:fe,onSuccess:function(){Le(void 0)},value:ke},tests:[{onFailure:function(){Le({text:"Non available.",type:"warning"})},test:$.X7},{onFailure:function(e){var n=e.displayMax,t=e.displayMin;Le({text:"Memory is expected to be between ".concat(t," and ").concat(n,"."),type:"warning"})},test:$.SQ}]},installISO:{defaults:{onSuccess:function(){on(void 0)},value:en},tests:[{test:$.HJ}]},anvil:{defaults:{onSuccess:function(){mn(void 0)},value:pn},tests:[{test:$.HJ}]},optimizeForOS:{defaults:{onSuccess:function(){Un(void 0)},value:null===gn||void 0===gn?void 0:gn.key},tests:[{test:$.HJ}]}};Ye.inputSizeMessages.forEach((function(e,n){Vn["vd".concat(n,"Size")]={defaults:{displayMax:"".concat(Ye.inputMaxes[n]," ").concat(Ye.inputUnits[n]),displayMin:ue,max:Ye.maxes[n],min:ve,onSuccess:function(){Ye.inputSizeMessages[n]=void 0},value:Ye.sizes[n]},onFinishBatch:function(){Ke(te({},Ye))},tests:[{onFailure:function(){Ye.inputSizeMessages[n]={text:"Non available.",type:"warning"}},test:$.X7},{onFailure:function(e){var t=e.displayMax,r=e.displayMin;Ye.inputSizeMessages[n]={text:"Virtual disk ".concat(n," size is expected to be between ").concat(r," and ").concat(t,"."),type:"warning"}},test:$.SQ}]},Vn["vd".concat(n,"StorageGroup")]={defaults:{onSuccess:function(){Ye.inputStorageGroupUUIDMessages[n]=void 0},value:Ye.inputStorageGroupUUIDs[n]},onFinishBatch:function(){Ke(te({},Ye))},tests:[{test:$.HJ}]}}));var Rn,_n,Qn,qn,Hn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.allAnvils,t=void 0===n?y:n,r=e.cpuCores,o=void 0===r?Ie:r,i=e.fileUUIDs,a=void 0===i?[en,sn]:i,s=e.includeAnvilUUIDs,l=void 0===s?be([pn]):s,u=e.includeFileUUIDs,c=e.includeStorageGroupUUIDs,p=e.inputMemoryUnit,d=void 0===p?He:p,f=e.memory,v=void 0===f?ke:f,m=e.storageGroupUUIDMapToData,g=void 0===m?z:m,h=e.virtualDisks,b=void 0===h?Ye:h,U=he(t,g,o,v,b.sizes,b.inputStorageGroupUUIDs,a,{includeAnvilUUIDs:l,includeFileUUIDs:u,includeStorageGroupUUIDs:c}),S=U.anvilUUIDs,j=U.fileUUIDs,I=U.maxCPUCores,P=U.maxMemory,D=U.maxVirtualDiskSizes,w=U.storageGroupUUIDs;Ze(I),Te(P);var Z=[];b.maxes=D,b.maxes.forEach((function(e,n){(0,x.Bh)(e,{fromUnit:"B",onSuccess:{string:function(e,t){b.inputMaxes[n]=e,Z[n]="".concat(e," ").concat(t)}},toUnit:b.inputUnits[n]})})),Ke(te({},b)),In(S),wn(j),An(w);var O="";return(0,x.Bh)(P,{fromUnit:"B",onSuccess:{string:function(e,n){Ve(e),O="".concat(e," ").concat(n)}},toUnit:d}),{formattedMaxMemory:O,formattedMaxVDSizes:Z,maxCPUCores:I,maxMemory:P,maxVirtualDiskSizes:D}},Jn=(0,o.useCallback)(Hn,[]),$n=function(){for(var e=arguments.length,n=new Array(e),t=0;t0&&void 0!==arguments[0]?arguments[0]:{},n=e.cmValue,t=void 0===n?ce:n,r=e.cmUnit,o=void 0===r?He:r;Ge(t);var i=Hn({inputMemoryUnit:o,memory:t}),a=i.formattedMaxMemory,s=i.maxMemory;$n({inputs:{memory:{displayMax:a,max:s,value:t}}})},Kn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.value,t=void 0===n?_e:n,r=e.unit,o=void 0===r?He:r;t!==_e&&Qe(t),o!==He&&Je(o),(0,x.KY)(t,o,(function(e){return Yn({cmValue:e,cmUnit:o})}),(function(){return Yn({cmUnit:o})}))},Xn=function(e){nn(e),Hn({fileUUIDs:[e,sn]})},et=function(e){ln(e),Hn({fileUUIDs:[en,e]})},nt=function(e){var n=be([e]);dn(e),Hn({includeAnvilUUIDs:n})};return(0,o.useEffect)((function(){d.Z.get("/anvil",{params:{anvilUUIDs:"all",isForProvisionServer:!0}}).then((function(e){var n=e.data,t=function(e){var n={},t=e.reduce((function(e,t){var o=t.anvilUUID,i=t.anvilName,s=t.anvilTotalMemory,l=t.anvilTotalAllocatedMemory,u=t.anvilTotalAvailableMemory,c=t.hosts,p=t.servers,d=t.storageGroups,f=t.files,v=d.reduce((function(n,t){var a=te({},t,{anvilUUID:o,anvilName:i,storageGroupSize:BigInt(t.storageGroupSize),storageGroupFree:BigInt(t.storageGroupFree),humanizedStorageGroupFree:""});return(0,x.Bh)(t.storageGroupFree,{fromUnit:"B",onSuccess:{string:function(e,n){a.humanizedStorageGroupFree="".concat(e," ").concat(n)}},precision:0,toUnit:"ibyte"}),n.anvilStorageGroupUUIDs.push(t.storageGroupUUID),n.anvilStorageGroups.push(a),e.storageGroups.push(a),e.storageGroupSelectItems.push({displayValue:ge({endAdornment:(0,r.jsx)(B.Ac,{inverted:!0,text:"~".concat(a.humanizedStorageGroupFree," free")}),mainLabel:t.storageGroupName,subLabel:i}),value:t.storageGroupUUID}),e.storageGroupUUIDMapToData[t.storageGroupUUID]=a,n}),{anvilStorageGroups:[],anvilStorageGroupUUIDs:[]}),m=v.anvilStorageGroups,g=v.anvilStorageGroupUUIDs,h=[];f.forEach((function(e){var t=e.fileUUID;h.push(t),n[t]=e}));var b=te({},t,{anvilTotalMemory:BigInt(s),anvilTotalAllocatedMemory:BigInt(l),anvilTotalAvailableMemory:BigInt(u),humanizedAnvilTotalAvailableMemory:"",hosts:c.map((function(e){return te({},e,{hostMemory:BigInt(e.hostMemory)})})),servers:p.map((function(n){var t=n.serverMemory,r=n.serverName,o=te({},re(n,["serverMemory","serverName"]),{serverMemory:BigInt(t),serverName:r});return e.serverNameMapToData[r]=o,o})),storageGroupUUIDs:g,storageGroups:m,fileUUIDs:h});return(0,x.Bh)(u,{fromUnit:"B",onSuccess:{string:function(e,n){b.humanizedAnvilTotalAvailableMemory="".concat(e," ").concat(n)}},precision:0,toUnit:"ibyte"}),e.anvils.push(b),e.anvilSelectItems.push({displayValue:ge({endAdornment:(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",width:"8rem"},children:[(0,r.jsx)(B.Ac,{inverted:!0,text:"CPU: ".concat(b.anvilTotalCPUCores," cores")}),(0,r.jsx)(B.Ac,{inverted:!0,text:"Memory: ~".concat(b.humanizedAnvilTotalAvailableMemory)})]}),mainLabel:b.anvilName,subLabel:b.anvilDescription}),value:o}),e.anvilUUIDMapToData[o]=b,e}),{anvils:[],anvilSelectItems:[],anvilUUIDMapToData:{},files:[],fileSelectItems:[],fileUUIDMapToData:{},serverNameMapToData:{},storageGroups:[],storageGroupSelectItems:[],storageGroupUUIDMapToData:{}});return Object.values(n).forEach((function(e){t.files.push(e),t.fileSelectItems.push({displayValue:e.fileName,value:e.fileUUID}),t.fileUUIDMapToData[e.fileUUID]=e})),t}(n.anvils),o=t.anvils,i=t.anvilSelectItems,s=t.anvilUUIDMapToData,l=t.fileSelectItems,u=t.fileUUIDMapToData,c=t.serverNameMapToData,p=t.storageGroupSelectItems,d=t.storageGroupUUIDMapToData;U(o),P(s),A(u),k(c),T(d),L(i),V(l),K(p),Jn({allAnvils:o,storageGroupUUIDMapToData:d}),Q(n.osList.map((function(e){var n=oe(e.replace(/^key=([^\s]+),name=['"](.*)['"]$/,"$1,$2").split(","),2),t=n[0];return{label:n[1],key:t}}))),kn(!0)}))}),[Jn]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(l.Z,{fullWidth:!0,maxWidth:"sm",open:n,PaperComponent:O.s_,PaperProps:{sx:{overflow:"visible"}},children:[(0,r.jsxs)(O.V9,{children:[(0,r.jsx)(B.z,{text:"Provision a Server"}),(0,r.jsx)(g.Z,{onClick:t,sx:{backgroundColor:p.hM,color:p.lD,"&:hover":{backgroundColor:p.hM}},children:(0,r.jsx)(u.Z,{})})]}),Mn?(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",maxHeight:"50vh",overflowY:"scroll",paddingTop:".6em","& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(b.Z,{id:"ps-server-name",label:"Server name",inputProps:{onChange:function(e){var n=e.target.value;se(n),$n({inputs:{serverName:{value:n}}})},value:ne},inputLabelProps:{isNotifyRequired:0===ne.length},messageBoxProps:Ue})}),(Rn="ps-cpu-cores",_n="CPU cores",Qn=Ie,qn={messageBoxProps:Ae,sliderProps:{onChange:function(e){var n=e;if(n!==Ie){Pe(n);var t=Hn({cpuCores:n}).maxCPUCores;$n({inputs:{cpuCores:{max:t,value:n}}})}},max:we,min:1}},(0,r.jsx)(H,te({isAllowTextInput:!0,label:_n,labelId:"".concat(Rn,"-label"),value:Qn},qn))),(0,r.jsx)(Z,{id:"ps-memory",label:"Memory",messageBoxProps:Fe,inputWithLabelProps:{inputProps:{endAdornment:xe("".concat(We," ").concat(He),{onButtonClick:function(){Qe(We),Yn({cmValue:ze})}}),onChange:function(e){var n=e.target.value;Kn({value:n})},type:"number",value:_e},inputLabelProps:{isNotifyRequired:ke===ce}},selectItems:pe,selectWithLabelProps:{selectProps:{onChange:function(e){var n=e.target.value;Kn({unit:n})},value:He}}}),Ye.stateIds.map((function(e,n){return function(e,n,t,o,i,s,l,u){var c=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;return e[t][r]},p=function(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;e[r][i]=o,t(te({},e))},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce;p("sizes",t);var r=s({virtualDisks:e}),o=r.formattedMaxVDSizes,i=r.maxVirtualDiskSizes;u({inputs:X({},"vd".concat(n,"Size"),{displayMax:"".concat(o[n]),max:i[n],value:t})})},f=function(e){var n=e.value,t=void 0===n?c("inputSizes"):n,r=e.unit,o=void 0===r?c("inputUnits"):r;t!==c("inputSizes")&&p("inputSizes",t),o!==c("inputUnits")&&p("inputUnits",o),(0,x.KY)(t,o,(function(e){return d(e)}),(function(){return d()}))},v=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c("inputStorageGroupUUIDs");n!==c("inputStorageGroupUUIDs")&&p("inputStorageGroupUUIDs",n),s({virtualDisks:e})};return(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column","& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(Z,{id:"ps-virtual-disk-size-".concat(n),label:"Virtual disk size",messageBoxProps:c("inputSizeMessages"),inputWithLabelProps:{inputProps:{endAdornment:xe("".concat(c("inputMaxes")," ").concat(c("inputUnits")),{onButtonClick:function(){p("inputSizes",c("inputMaxes")),d(c("maxes"))}}),onChange:function(e){var n=e.target.value;f({value:n})},type:"number",value:c("inputSizes")},inputLabelProps:{isNotifyRequired:c("sizes")===ce}},selectItems:pe,selectWithLabelProps:{selectProps:{onChange:function(e){var n=e.target.value;f({unit:n})},value:c("inputUnits")}}})}),(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(j.Z,{id:"ps-storage-group-".concat(n),label:"Storage group",disableItem:function(e){return!(i.includes(e)&&c("sizes")<=l[e].storageGroupFree)},inputLabelProps:{isNotifyRequired:0===c("inputStorageGroupUUIDs").length},messageBoxProps:c("inputStorageGroupUUIDMessages"),selectItems:o,selectProps:{onChange:function(e){var n=e.target.value;v(n)},onClearIndicatorClick:function(){return v("")},renderValue:function(e){var n,t=null!==(n=l[e])&&void 0!==n?n:{},r=t.anvilName,o=void 0===r?"?":r,i=t.storageGroupName,a=void 0===i?"Unknown (".concat(e,")"):i;return"".concat(a," (").concat(o,")")},value:c("inputStorageGroupUUIDs")}})})]},"ps-virtual-disk-".concat(c("stateIds")))}(Ye,n,Ke,Y,On,Hn,z,$n)})),(0,r.jsx)(j.Z,{disableItem:function(e){return e===sn},hideItem:function(e){return!Dn.includes(e)},id:"ps-install-image",inputLabelProps:{isNotifyRequired:0===en.length},label:"Install ISO",messageBoxProps:rn,selectItems:W,selectProps:{onChange:function(e){var n=e.target.value;Xn(n)},onClearIndicatorClick:function(){return Xn("")},value:en}}),(0,r.jsx)(j.Z,{disableItem:function(e){return e===en},hideItem:function(e){return!Dn.includes(e)},id:"ps-driver-image",label:"Driver ISO",messageBoxProps:un,selectItems:W,selectProps:{onChange:function(e){var n=e.target.value;et(n)},onClearIndicatorClick:function(){return et("")},value:sn}}),(0,r.jsx)(j.Z,{disableItem:function(e){return!jn.includes(e)},id:"ps-anvil",inputLabelProps:{isNotifyRequired:0===pn.length},label:"Anvil node pair",messageBoxProps:vn,selectItems:F,selectProps:{onChange:function(e){var n=e.target.value;nt(n)},onClearIndicatorClick:function(){return nt("")},renderValue:function(e){var n,t=(null!==(n=I[e])&&void 0!==n?n:{}).anvilName;return void 0===t?"Unknown ".concat(e):t},value:pn}}),(0,r.jsx)(f.Z,{id:"ps-optimize-for-os",extendRenderInput:function(e){var n=e.inputLabelProps;(void 0===n?{}:n).isNotifyRequired=null===gn},isOptionEqualToValue:function(e,n){return e.key===n.key},label:"Optimize for OS",messageBoxProps:yn,noOptionsText:"No matching OS",onChange:function(e,n){hn(n)},openOnFocus:!0,options:_,renderOption:function(e,n){return(0,o.createElement)("li",te({},e,{key:"ps-optimize-for-os-".concat(n.key),children:[n.label," (",n.key,")"]}))},value:gn})]}):(0,r.jsx)(J.Z,{}),(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",marginTop:"1em","& > :not(:first-child)":{marginTop:"1em"}},children:[En>0&&(0,r.jsx)(h.Z,{isAllowClose:!0,text:"Provision server job registered. You can provision another server, or exit; it won't affect the registered job."}),Nn?(0,r.jsx)(J.Z,{mt:0}):(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"100%"},children:(0,r.jsx)(m.Z,{disabled:!$n({isIgnoreOnCallbacks:!0}),onClick:function(){zn(!0)},sx:me,children:"Provision"})})]})]}),Bn&&(0,r.jsx)(v.Z,{actionProceedText:"Provision",content:(0,r.jsxs)(s.ZP,{container:!0,columns:8,direction:"column",children:[(0,r.jsx)(s.ZP,{direction:"row",item:!0,xs:8,children:(0,r.jsxs)(B.Ac,{children:["Server ",(0,r.jsx)(B.Q0,{text:ne})," will be created on anvil node pair"," ",(0,r.jsx)(B.Q0,{text:I[pn].anvilName})," ","with the following properties:"]})}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"CPU"})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:Ie})," core(s)"]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:we})," core(s) available"]})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Memory"})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsx)(B.Q0,{text:"".concat(_e," ").concat(He)})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(We," ").concat(He)})," ","available"]})})]}),Ye.stateIds.map((function(e,n){var t=Ye.inputMaxes[n],o=Ye.inputSizes[n],i=Ye.inputUnits[n],a=z[Ye.inputStorageGroupUUIDs[n]].storageGroupName;return(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsxs)(B.Ac,{children:["Virtual disk ",(0,r.jsx)(B.Q0,{text:n})]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(o," ").concat(i)})," on"," ",a]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(t," ").concat(i)})," ","available"]})})]},"ps-virtual-disk-".concat(e,"-summary"))})),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Install ISO"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Q0,{text:w[en].fileName})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Driver ISO"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:w[sn]?(0,r.jsx)(B.Q0,{text:w[sn].fileName}):(0,r.jsx)(B.Ac,{text:"none"})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Optimize for OS"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Ac,{text:"".concat(null===gn||void 0===gn?void 0:gn.label)})})]})]}),dialogProps:{open:Bn},onCancelAppend:function(){zn(!1)},onProceedAppend:function(){var e={serverName:ne,cpuCores:Ie,memory:ke.toString(),virtualDisks:Ye.stateIds.map((function(e,n){return{storageSize:Ye.sizes[n].toString(),storageGroupUUID:Ye.inputStorageGroupUUIDs[n]}})),installISOFileUUID:en,driverISOFileUUID:sn,anvilUUID:pn,optimizeForOS:null===gn||void 0===gn?void 0:gn.key};Fn(!0),d.Z.post("/server",e).then((function(){Fn(!1),Wn(En+1)})),zn(!1)},proceedButtonProps:{sx:me},titleText:"Provision ".concat(ne,"?")})]})}},1081:function(e,n,t){var r=t(7294);n.Z=function(){var e=(0,r.useRef)(!0);return e.current?(e.current=!1,!0):e.current}},8336:function(e,n){n.Z=function(e,n){return fetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}},5737:function(e,n,t){t.d(n,{Bh:function(){return o},KY:function(){return i},MU:function(){return a}});var r=t(4490),o=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.fromUnit,o=n.onFailure,i=n.onSuccess,a=n.precision,s=n.toUnit,l=(0,r.gO)(e,{fromUnit:t,precision:a,toUnit:s});if(l){var u=l.value,c=l.unit;try{var p,d,f;null===i||void 0===i||null===(p=i.bigint)||void 0===p||p.call(null,BigInt(u),c),null===i||void 0===i||null===(d=i.number)||void 0===d||d.call(null,parseFloat(u),c),null===i||void 0===i||null===(f=i.string)||void 0===f||f.call(null,u,c)}catch(v){null===o||void 0===o||o.call(null,v,u,c)}}else null===o||void 0===o||o.call(null)},i=function(e,n,t,r){o(e,{fromUnit:n,onFailure:r,onSuccess:{bigint:t},precision:0,toUnit:"B"})},a=function(e){return(0,r._d)(e,{toUnit:"ibyte"})}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/203-2f903a41f9b4e31e.js b/striker-ui/out/_next/static/chunks/203-2f903a41f9b4e31e.js deleted file mode 100644 index 7a26e220..00000000 --- a/striker-ui/out/_next/static/chunks/203-2f903a41f9b4e31e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[203],{8187:function(r,n,e){var t=e(5893),o=e(7294),i=e(7357),l=e(4799),c=e(6576),a=e(238),u=e(6195),s=e(5537),f=e(7169),d=e(7750);function p(r,n){(null==n||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e=0||(o[e]=r[e]);return o}(r,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(r,e)&&(o[e]=r[e])}return o}function v(r){return function(r){if(Array.isArray(r))return p(r)}(r)||function(r){if("undefined"!==typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,n){if(!r)return;if("string"===typeof r)return p(r,n);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return p(r,n)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g="MessageBox",h={error:"".concat(g,"-error"),info:"".concat(g,"-info"),warning:"".concat(g,"-warning")},O={error:(0,t.jsx)(c.Z,{}),info:(0,t.jsx)(a.Z,{}),warning:(0,t.jsx)(u.Z,{})},j={isShowInitially:!0,isAllowClose:!1,onClose:void 0,onCloseAppend:void 0,text:void 0,type:"info"},w=function(r){var n=r.children,e=r.isAllowClose,c=void 0===e?j.isAllowClose:e,a=r.isShowInitially,u=void 0===a?j.isShowInitially:a,p=r.onClose,g=r.onCloseAppend,w=r.type,x=void 0===w?j.type:w,Z=r.text,A=m(r,["children","isAllowClose","isShowInitially","onClose","onCloseAppend","type","text"]),S=A.sx,P=(0,o.useState)(u),C=P[0],k=P[1],I=(0,o.useMemo)((function(){return c||void 0!==p||void 0!==g}),[c,p,g]),E=(0,o.useCallback)((function(r){return h[r]}),[]),M=(0,o.useCallback)((function(r){return void 0===O[r]?O.info:O[r]}),[]),D=(0,o.useCallback)((function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;return(0,t.jsx)(d.Ac,{inverted:"info"===r,children:e})}),[n]),R=(0,o.useMemo)((function(){var r;return b((y(r={alignItems:"center",borderRadius:f.n_,display:"flex",flexDirection:"row",padding:".3em .6em","& > *":{color:f.lD},"& > :first-child":{marginRight:".3em"},"& > :nth-child(2)":{flexGrow:1}},"&.".concat(h.error),{backgroundColor:f.hM}),y(r,"&.".concat(h.info),{backgroundColor:f.s7,"& > *":{color:"".concat(f.E5)}}),y(r,"&.".concat(h.warning),{backgroundColor:f.Wd}),r),S)}),[S]);return C?(0,t.jsxs)(i.Z,b({},A,{className:E(x),sx:R,children:[M(x),D(x,Z),I&&(0,t.jsx)(l.Z,{onClick:null!==p&&void 0!==p?p:function(){for(var r=arguments.length,n=new Array(r),e=0;er.length)&&(n=r.length);for(var e=0,t=new Array(n);e=0||(o[e]=r[e]);return o}(r,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(r,e)&&(o[e]=r[e])}return o}function m(r){return function(r){if(Array.isArray(r))return d(r)}(r)||function(r){if("undefined"!==typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,n){if(!r)return;if("string"===typeof r)return d(r,n);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return d(r,n)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var v=function(r){var n=r.endAdornment,e=r.label,d=r.onPasswordVisibilityAppend,v=r.sx,g=r.inputProps,h=(void 0===g?{}:g).type,O=r.type,j=void 0===O?h:O,w=b(r.inputProps,["type"]),x=b(r,["endAdornment","label","onPasswordVisibilityAppend","sx","inputProps","type"]),Z=(0,u.useState)(j),A=Z[0],S=Z[1],P=(0,u.useMemo)((function(){var r=j===f.Z.password,n=A===f.Z.password;return(0,t.jsx)(t.Fragment,{children:r&&(0,t.jsx)(l.Z,{onClick:function(){for(var r=arguments.length,e=new Array(r),t=0;t=0||(o[e]=r[e]);return o}(r,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(r,e)&&(o[e]=r[e])}return o}var p=function(r){var n,e=r.children,p=r.isNotifyRequired,y=r.sx,b=r.variant,m=void 0===b?"outlined":b,v=d(r,["children","isNotifyRequired","sx","variant"]),g=f((s(n={color:"".concat(u.s7,"9F")},"& .".concat(i.Z.root),{color:u.s7}),s(n,"&.".concat(l.Z.focused),{backgroundColor:u.s7,borderRadius:u.n_,color:u.E5,padding:".1em .6em"}),s(n,"&.".concat(l.Z.shrink," .").concat(i.Z.root),{display:"none"}),n),y);return(0,t.jsx)(c.Z,f({variant:m},v,{sx:g,children:(0,t.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row"},children:[p&&(0,t.jsx)(o.Z,{sx:{marginLeft:"-.2rem",marginRight:".4rem"}}),e]})}))}},4188:function(r,n){n.Z={number:"number",password:"password",text:"text"}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/62-532ed713980da8db.js b/striker-ui/out/_next/static/chunks/62-532ed713980da8db.js new file mode 100644 index 00000000..ad6fab6e --- /dev/null +++ b/striker-ui/out/_next/static/chunks/62-532ed713980da8db.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[62],{9297:function(e,r,n){n.d(r,{C:function(){return d},k:function(){return v}});var t=n(5893),o=n(1458),i=n(1496),c=n(7169),a=(0,i.ZP)(o.Z)({height:"1em",borderRadius:c.n_,backgroundColor:c.v9});function l(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var u="AllocationBar",s={barOk:"".concat(u,"-barOk"),barWarning:"".concat(u,"-barWarning"),barAlert:"".concat(u,"-barAlert"),underline:"".concat(u,"-underline")},f=(0,i.ZP)("div")((function(){var e;return l(e={},"& .".concat(s.barOk),{backgroundColor:c.Ej}),l(e,"& .".concat(s.barWarning),{backgroundColor:c.Wd}),l(e,"& .".concat(s.barAlert),{backgroundColor:c.hM}),l(e,"& .".concat(s.underline),{borderRadius:c.n_}),e})),d=function(e){var r=e.allocated;return(0,t.jsxs)(f,{children:[(0,t.jsx)(a,{classes:{bar:r>70?r>90?s.barAlert:s.barWarning:s.barOk},variant:"determinate",value:r}),(0,t.jsx)(o.Z,{className:s.underline,variant:"determinate",value:0})]})};function p(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var b="ProgressBar",m={barOk:"".concat(b,"-barOk"),barInProgress:"".concat(b,"-barInProgress"),underline:"".concat(b,"-underline")},y=(0,i.ZP)("div")((function(){var e;return p(e={},"& .".concat(m.barOk),{backgroundColor:c.Ej}),p(e,"& .".concat(m.barInProgress),{backgroundColor:c.Wd}),p(e,"& .".concat(m.underline),{borderRadius:c.n_}),e})),v=function(e){var r=e.progressPercentage;return(0,t.jsxs)(y,{children:[(0,t.jsx)(a,{classes:{bar:r<100?m.barInProgress:m.barOk},variant:"determinate",value:r}),(0,t.jsx)(o.Z,{className:m.underline,variant:"determinate",value:0})]})}},2349:function(e,r,n){var t=n(5893),o=n(8128),i=n(3631),c=n(7169);function a(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function l(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}r.Z=function(e){var r=e.sx,n=u(e,["sx"]);return(0,t.jsx)(o.Z,l({},n,{sx:l(a({color:c.s7},"&.".concat(i.Z.checked),{color:c.s7}),r)}))}},582:function(e,r,n){var t=n(1496),o=n(7720),i=n(7169),c=(0,t.ZP)(o.Z)({backgroundColor:i.d});r.Z=c},4690:function(e,r,n){var t=n(5893),o=n(7357),i=n(7294);function c(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function a(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u={columnSpacing:void 0,fullWidth:!1,growFirst:!1,row:!1,rowSpacing:void 0,lg:void 0,md:void 0,sm:void 0,spacing:"1em",xl:void 0,xs:"column"},s=function(e){var r=e.fullWidth,n=e.growFirst,c=e.lg,s=void 0===c?u.lg:c,f=e.md,d=void 0===f?u.md:f,p=e.row,b=e.sm,m=void 0===b?u.sm:b,y=e.spacing,v=void 0===y?u.spacing:y,g=e.sx,h=e.xl,O=void 0===h?u.xl:h,j=e.xs,x=void 0===j?u.xs:j,w=e.columnSpacing,P=void 0===w?v:w,S=e.rowSpacing,Z=void 0===S?v:S,I=l(e,["fullWidth","growFirst","lg","md","row","sm","spacing","sx","xl","xs","columnSpacing","rowSpacing"]),k=(0,i.useMemo)((function(){return p?"row":x}),[x,p]),A=(0,i.useMemo)((function(){return m||k}),[m,k]),C=(0,i.useMemo)((function(){return d||A}),[d,A]),E=(0,i.useMemo)((function(){return s||C}),[s,C]),M=(0,i.useMemo)((function(){return O||E}),[O,E]),T=(0,i.useMemo)((function(){return{column:{alignItems:"normal",marginLeft:0,marginTop:P},row:{alignItems:"center",marginLeft:Z,marginTop:0}}}),[P,Z]),R=(0,i.useMemo)((function(){return n?1:void 0}),[n]),D=(0,i.useMemo)((function(){return r?"100%":void 0}),[r]);return(0,t.jsx)(o.Z,a({},I,{sx:a({alignItems:{xs:T[k].alignItems,sm:T[A].alignItems,md:T[C].alignItems,lg:T[E].alignItems,xl:T[M].alignItems},display:"flex",flexDirection:{xs:k,sm:A,md:C,lg:E,xl:M},width:D,"& > :first-child":{flexGrow:R},"& > :not(:first-child)":{marginLeft:{xs:T[k].marginLeft,sm:T[A].marginLeft,md:T[C].marginLeft,lg:T[E].marginLeft,xl:T[M].marginLeft},marginTop:{xs:T[k].marginTop,sm:T[A].marginTop,md:T[C].marginTop,lg:T[E].marginTop,xl:T[M].marginTop}}},g)}))};s.defaultProps=u,r.Z=s},1706:function(e,r,n){n.d(r,{Z:function(){return P}});var t=n(2428),o=n(5537),i=n(6761),c=n(1797),a=n(6059),l=n(1370),u=n(2186),s=n(5697),f=n(1496),d=n(4799),p=n(7021),b=n(7294),m=n(7169);function y(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function v(e,r){if(null==e)return{};var n,t,o=function(e,r){if(null==e)return{};var n,t,o={},i=Object.keys(e);for(t=0;t=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g=(0,f.ZP)(d.Z)(y({borderRadius:m.n_,backgroundColor:m.s7,color:m.E5,"&:hover":{backgroundColor:"".concat(m.s7,"F0")}},"&.".concat(p.Z.disabled),{backgroundColor:m.rr})),h=(0,f.ZP)(g)({backgroundColor:m.hM,color:m.s7,"&:hover":{backgroundColor:"".concat(m.hM,"F0")}}),O=(0,f.ZP)(d.Z)({color:m.s7}),j={add:{none:{iconType:t.Z}},close:{none:{iconType:o.Z}},delete:{none:{iconType:i.Z}},edit:{false:{iconType:c.Z},true:{iconType:a.Z,iconProps:{sx:{color:m.Ej}}}},play:{none:{iconType:l.Z}},visibility:{false:{iconType:u.Z},true:{iconType:s.Z}}},x={contained:g,normal:O,redcontained:h},w=function(e){var r=e.children,n=e.defaultIcon,t=e.iconProps,o=e.mapPreset,i=e.mapToIcon,c=e.state,a=void 0===c?"none":c,l=e.variant,u=void 0===l?"contained":l,s=v(e,["children","defaultIcon","iconProps","mapPreset","mapToIcon","state","variant"]),f=(0,b.useMemo)((function(){return null!==i&&void 0!==i?i:o&&j[o]}),[i,o]),d=(0,b.useMemo)((function(){var e;if(f){var o,i=null!==(o=f[a])&&void 0!==o?o:{iconType:n},c=i.iconType,l=i.iconProps;c&&(e=(0,b.createElement)(c,function(e){for(var r=1;re.length)&&(r=e.length);for(var n=0,t=new Array(r);n=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(t=n.next()).done)&&(i.push(t.value),!r||i.length!==r);c=!0);}catch(l){a=!0,o=l}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,r)||function(e,r){if(!e)return;if("string"===typeof e)return f(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var y="1.7em",v={iconProps:{},indicatorProps:{},indicatorTextProps:{},initialIndicatorValue:!1},g="24%",h="50%",O=".1rem",j="0rem",x=(0,i.forwardRef)((function(e,r){var n=e.icon,f=e.iconProps,d=(void 0===f?v.iconProps:f).sx,x=e.indicatorProps,w=(void 0===x?v.indicatorProps:x).sx,P=e.indicatorTextProps,S=(void 0===P?v.indicatorTextProps:P).sx,Z=e.initialIndicatorValue,I=void 0===Z?v.initialIndicatorValue:Z,k=e.sx,A=b(e.iconProps,["sx"]),C=b(e.indicatorProps,["sx"]),E=b(e.indicatorTextProps,["sx"]),M=(0,u.Z)().protect,T=m((0,s.Z)(I,M),2),R=T[0],D=T[1],W=(0,i.useCallback)((function(e,r,n){return(0,t.jsx)(a.Z,p({row:!0},C,{sx:p({backgroundColor:c.Ej,borderColor:c.E5,borderRadius:"50%",borderStyle:"solid",borderWidth:".1em",bottom:n,boxSizing:"content-box",height:0,justifyContent:"center",paddingBottom:r,position:"absolute",right:n,width:r},w),children:e}))}),[w,C]),L=(0,i.useCallback)((function(e){return(0,t.jsx)(l.Ac,p({},E,{sx:p({fontWeight:"500",paddingTop:"100%"},S),children:e>9?"".concat(9,"+"):e}))}),[S,E]),N=(0,i.useMemo)((function(){var e;if(R){var r,n=g,t=O;Number.isFinite(R)&&(r=L(R),n=h,t=j),e=W(r,n,t)}return e}),[W,L,R]);return(0,i.useImperativeHandle)(r,(function(){return{indicate:function(e){return D(e)}}}),[D]),(0,t.jsxs)(o.Z,{sx:p({height:y,width:y,position:"relative"},k),children:[(0,i.createElement)(n,p({},A,{sx:p({height:"100%",width:"100%"},d)})),N]})}));x.defaultProps=v,x.displayName="IconWithIndicator",r.Z=x},2444:function(e,r,n){var t=n(5893),o=n(8333),i=n(7294),c=n(2029),a=n(9297),l=n(4690),u=n(6125),s=n(1905),f=n(7750),d=n(2749);function p(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);ne.length)&&(r=e.length);for(var n=0,t=new Array(r);n=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function S(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(t=n.next()).done)&&(i.push(t.value),!r||i.length!==r);c=!0);}catch(l){a=!0,o=l}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,r)||I(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,r){if(e){if("string"===typeof e)return j(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,r):void 0}}var k=(0,o.forwardRef)((function(e){var r=e.allowCheckAll,n=void 0!==r&&r,j=e.allowEdit,x=void 0!==j&&j,I=e.allowItemButton,k=void 0!==I&&I,A=e.disableDelete,C=void 0!==A&&A,E=e.edit,M=void 0!==E&&E,T=e.flexBoxProps,R=e.getListCheckboxProps,D=e.getListItemCheckboxProps,W=e.header,L=e.headerSpacing,N=void 0===L?".3em":L,q=e.insertHeader,_=void 0===q||q,F=e.listEmpty,B=e.listItemIconMinWidth,U=void 0===B?"56px":B,H=e.listItemKeyPrefix,z=void 0===H?(0,b.Z)():H,$=e.listItemProps,J=(void 0===$?{}:$).sx,G=e.listItems,V=e.listProps,X=(void 0===V?{}:V).sx,Y=e.onAdd,K=e.onDelete,Q=e.onEdit,ee=e.onAllCheckboxChange,re=e.onItemCheckboxChange,ne=e.onItemClick,te=e.renderListItem,oe=void 0===te?function(e){return(0,t.jsx)(O.Ac,{children:e})}:te,ie=e.renderListItemCheckboxState,ce=e.scroll,ae=void 0!==ce&&ce,le=e.allowAddItem,ue=void 0===le?x:le,se=e.allowCheckItem,fe=void 0===se?x:se,de=e.allowDelete,pe=void 0===de?x:de,be=e.allowEditItem,me=void 0===be?x:be,ye=P(e.listItemProps,["sx"]),ve=P(e.listProps,["sx"]),ge=(0,o.useMemo)((function(){return"calc(".concat(U," - ").concat(N,")")}),[N,U]),he=(0,o.useMemo)((function(){return ue?(0,t.jsx)(h.Z,{onClick:Y,size:"small",children:(0,t.jsx)(i.Z,{})}):void 0}),[ue,Y]),Oe=(0,o.useMemo)((function(){return M&&pe?(0,t.jsx)(h.Z,{disabled:C,onClick:K,size:"small",sx:{backgroundColor:m.hM,color:m.s7,"&:hover":{backgroundColor:"".concat(m.hM,"F0")}},children:(0,t.jsx)(c.Z,{})}):void 0}),[C,pe,M,K]),je=(0,o.useMemo)((function(){if(me)return(0,t.jsx)(h.Z,{onClick:Q,size:"small",children:M?(0,t.jsx)(a.Z,{sx:{color:m.Ej}}):(0,t.jsx)(l.Z,{})})}),[me,M,Q]),xe=(0,o.useMemo)((function(){var e;return M&&fe&&(e=n?(0,t.jsx)(u.Z,{sx:{minWidth:ge},children:(0,t.jsx)(y.Z,w({edge:"start",onChange:ee},null===R||void 0===R?void 0:R.call(null)))}):(0,t.jsx)(v.Z,{sx:{minWidth:ge}})),e}),[ge,R,n,fe,M,ee]),we=(0,o.useMemo)((function(){var e,r="undefined"===typeof W?"undefined":(e=W)&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e;return _&&W?(0,t.jsxs)(g.Z,{row:!0,spacing:N,sx:{height:"2.4em"},children:[xe,["boolean","string"].includes(r)?(0,t.jsxs)(t.Fragment,{children:["string"===r&&(0,t.jsx)(O.Ac,{children:W}),(0,t.jsx)(v.Z,{sx:{flexGrow:1}})]}):W,Oe,je,he]}):W}),[he,xe,Oe,je,W,N,_]),Pe=(0,o.useMemo)((function(){return"string"===typeof F?(0,t.jsx)(O.Ac,{align:"center",children:F}):F}),[F]),Se=(0,o.useCallback)((function(e,r,n){return M&&fe?(0,t.jsx)(s.Z,{sx:{minWidth:U},children:(0,t.jsx)(y.Z,w({checked:r,edge:"start",onChange:function(){for(var r=arguments.length,n=new Array(r),t=0;t0&&(e=r.map((function(e){var r=S(e,2),n=r[0],i=r[1],c=oe(n,i);return(0,o.createElement)(f.ZP,w({},ye,{key:"".concat(z,"-").concat(n),sx:w({paddingLeft:0,paddingRight:0},J),children:[Se(n,null===ie||void 0===ie?void 0:ie.call(null,n,i),null===D||void 0===D?void 0:D.call(null,n,i)),k?(0,t.jsx)(d.Z,{onClick:function(){for(var e=arguments.length,r=new Array(e),t=0;t=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var b=function(e){var r=e.headerMarginOffset,n=void 0===r?".3em":r,o=e.ml,i=e.mv,c=void 0===i?"1.4em":i,s=e.sx,f=e.mb,b=void 0===f?c:f,m=e.mt,y=void 0===m?c:m,v=p(e,["headerMarginOffset","ml","mv","sx","mb","mt"]),g=(0,l.useMemo)((function(){return o?"calc(".concat(o," + ").concat(n,")"):n}),[n,o]),h=(0,l.useMemo)((function(){var e="number"===typeof y?"".concat(y,"px"):y;return"calc(".concat(e," + ").concat(n,")")}),[n,y]),O=(0,l.useMemo)((function(){return d({borderWidth:"1px",borderRadius:u.n_,borderStyle:"solid",borderColor:u.d,paddingBottom:0,position:"relative"},s)}),[s]);return(0,t.jsx)(a.Z,d({mb:b,ml:g,mt:h},v,{sx:O}))};function m(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function y(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g=function(e){var r=e.sx,n=v(e,["sx"]),o=(0,l.useMemo)((function(){return y({position:"relative",zIndex:20},r)}),[r]);return(0,t.jsx)(a.Z,y({padding:".3em .7em"},n,{sx:o}))},h=function(e){var r=e.children;return(0,t.jsxs)(a.Z,{sx:{position:"relative",whiteSpace:"pre-wrap"},children:[(0,t.jsx)(a.Z,{sx:{alignItems:"center",borderColor:u.d,borderRadius:u.n_,borderStyle:"solid",borderWidth:"1px",display:"flex",left:"-.3em",paddingBottom:".2em",paddingLeft:"1em",paddingRight:".7em",paddingTop:".4em",position:"absolute",top:"-.3em",width:"100%",zIndex:"10","& > :first-child":{flexGrow:1}},children:r}),(0,t.jsx)(a.Z,{sx:{display:"flex",paddingBottom:".4em",paddingRight:"1.7em",visibility:"hidden"},children:r})]})},O=n(2152),j=n(7750);function x(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var w="1.2em",P=function(e){var r=e.children,n=e.expandInitially,f=void 0!==n&&n,d=e.header,p=e.loading,m=void 0!==p&&p,y=e.panelProps,v=e.showHeaderSpinner,P=void 0!==v&&v,S=(0,l.useState)(f),Z=S[0],I=S[1],k=(0,l.useMemo)((function(){return Z?(0,t.jsx)(o.Z,{}):(0,t.jsx)(i.Z,{})}),[Z]),A=(0,l.useMemo)((function(){return Z?"auto":".2em"}),[Z]),C=(0,l.useMemo)((function(){return"string"===typeof d?(0,t.jsx)(j.Ac,{children:d}):d}),[d]),E=(0,l.useMemo)((function(){return P&&!Z&&m?(0,t.jsx)(O.Z,{progressProps:{style:{height:w,width:w}}}):void 0}),[Z,m,P]),M=(0,l.useMemo)((function(){return Z&&m?(0,t.jsx)(O.Z,{sx:{margin:"1em 0"}}):(0,t.jsx)(g,{children:r})}),[r,Z,m]);return(0,t.jsxs)(b,function(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var C="Panel",E={paper:"".concat(C,"-paper"),square:"".concat(C,"-square"),topSquare:"".concat(C,"-topSquare"),bottomSquare:"".concat(C,"-bottomSquare")},M=(0,S.ZP)(a.Z)((function(){var e;return I(e={margin:"1em",position:"relative"},"& .".concat(E.paper),{backgroundColor:u.v9,height:"100%",opacity:.8,padding:"2.1em",position:"relative",width:"100%",zIndex:10}),I(e,"& .".concat(E.square),{content:'""',position:"absolute",width:"2.1em",height:"2.1em",border:"1px",borderColor:u.lD,borderWidth:"1px",borderRadius:u.n_,borderStyle:"solid",padding:0,margin:0}),I(e,"& .".concat(E.topSquare),{top:"-.3em",left:"-.3em"}),I(e,"& .".concat(E.bottomSquare),{bottom:"-.3em",right:"-.3em"}),e})),T={paperProps:{}},R=(0,t.jsx)(Z.Z,{styles:{"*::-webkit-scrollbar":{width:".6em"},"*::-webkit-scrollbar-track":{backgroundColor:u.v9},"*::-webkit-scrollbar-thumb":{backgroundColor:u.lD,outline:"1px solid transparent",borderRadius:u.n_}}}),D=function(e){var r=e.children,n=e.classes,o=e.className,i=e.paperProps,c=(void 0===i?T.paperProps:i).className,l=e.sx,u=A(e.paperProps,["className"]),s=A(e,["children","classes","className","paperProps","sx"]);return(0,t.jsxs)(M,k({classes:n,className:o,sx:l},s,{children:[R,(0,t.jsx)(a.Z,{className:"".concat(E.square," ").concat(E.topSquare)}),(0,t.jsx)(a.Z,{className:"".concat(E.square," ").concat(E.bottomSquare)}),(0,t.jsx)(a.Z,k({},u,{className:"".concat(E.paper," ").concat(c),children:r}))]}))};D.defaultProps=T;var W=D,L=(0,S.ZP)(a.Z)({alignItems:"center",display:"flex",flexDirection:"row",marginBottom:"1em",width:"100%","& > :first-child":{flexGrow:1},"& > :not(:first-child, :last-child)":{marginRight:".3em"}})},2152:function(e,r,n){var t=n(5893),o=n(7357),i=n(2346),c=n(6489),a=n(7169);function l(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function u(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var f={progressProps:{}},d=function(e){var r=e.mt,n=void 0===r?"3em":r,d=e.progressProps,p=void 0===d?f.progressProps:d,b=e.sx,m=s(e,["mt","progressProps","sx"]);return(0,t.jsx)(o.Z,u({},m,{sx:u(l({alignItems:"center",display:"flex",justifyContent:"center",marginTop:n},"& .".concat(i.Z.root),{color:a.lD}),b),children:(0,t.jsx)(c.Z,u({},p,{variant:"indeterminate"}))}))};d.defaultProps=f,r.Z=d},7750:function(e,r,n){n.d(r,{Ac:function(){return b},z:function(){return O},Q0:function(){return I},$_:function(){return E},PJ:function(){return N},KI:function(){return w}});var t=n(5893),o=n(7294),i=n(5861),c=n(7169);function a(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function l(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s="BodyText",f={inheritColour:!1,inline:!1,inverted:!1,monospaced:!1,selected:!0,text:null},d={inheritColour:"".concat(s,"-inherit-colour"),inverted:"".concat(s,"-inverted"),monospaced:"".concat(s,"-monospaced"),selected:"".concat(s,"-selected"),unselected:"".concat(s,"-unselected")},p=function(e){var r,n=e.children,s=e.className,p=e.inheritColour,b=void 0===p?f.inheritColour:p,m=e.inline,y=void 0===m?f.inline:m,v=e.inverted,g=void 0===v?f.inverted:v,h=e.monospaced,O=void 0===h?f.monospaced:h,j=e.selected,x=void 0===j?f.selected:j,w=e.sx,P=e.text,S=void 0===P?f.text:P,Z=u(e,["children","className","inheritColour","inline","inverted","monospaced","selected","sx","text"]),I=(0,o.useMemo)((function(){return y?"inline":void 0}),[y]),k=(0,o.useMemo)((function(){return function(e){var r=e.isInheritColour,n=e.isInvert,t=e.isMonospace,o=e.isSelect,i=[];return r?i.push(d.inheritColour):n?i.push(d.inverted):o?i.push(d.selected):i.push(d.unselected),t&&i.push(d.monospaced),i.join(" ")}({isInheritColour:b,isInvert:g,isMonospace:O,isSelect:x})}),[b,g,O,x]),A=(0,o.useMemo)((function(){return null!==S&&void 0!==S?S:n}),[n,S]);return(0,t.jsx)(i.Z,l({className:"".concat(k," ").concat(s),variant:"subtitle1"},Z,{sx:l((r={display:I},a(r,"&.".concat(d.inverted),{color:c.E5}),a(r,"&.".concat(d.monospaced),{fontFamily:"Source Code Pro",fontWeight:400}),a(r,"&.".concat(d.selected),{color:c.lD}),a(r,"&.".concat(d.unselected),{color:c.UZ}),r),w),children:A}))};p.defaultProps=f;var b=p,m=n(1496);function y(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function v(e,r){if(null==e)return{};var n,t,o=function(e,r){if(null==e)return{};var n,t,o={},i=Object.keys(e);for(t=0;t=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g=(0,m.ZP)(i.Z)({color:c.lD}),h=function(e){var r=e.children,n=e.text,i=v(e,["children","text"]),c=(0,o.useMemo)((function(){return null!==r&&void 0!==r?r:n}),[r,n]);return(0,t.jsx)(g,function(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var I=function(e){var r=e.sx,n=Z(e,["sx"]);return(0,t.jsx)(w,S({},n,{monospaced:!0,sx:S({display:"inline",padding:".1rem .3rem"},r)}))};function k(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function A(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(e){var r=e.sx,n=C(e,["sx"]);return(0,t.jsx)(w,A({monospaced:!0,sx:A({alignItems:"center",display:"flex",height:"100%"},r)},n))},M=n(2992),T=n(4690),R=n(1706);function D(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function W(e){for(var r=1;re.length)&&(r=e.length);for(var n=0,t=new Array(r);n1?n-1:0),o=1;oe.length)&&(r=e.length);for(var n=0,t=new Array(r);ne.length)&&(r=e.length);for(var n=0,t=new Array(r);n1&&void 0!==arguments[1]?arguments[1]:{},n=r.refreshInterval,i=void 0===n?5e3:n,c=r.onSuccess,a=(0,t.ZP)(e,o.Z,{refreshInterval:i,onSuccess:c}),l=a.data,u=a.error;return{data:l,isLoading:!u&&!l,error:u}}},1770:function(e,r){r.Z=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.onRequestError,t=void 0===n?function(e){return{children:"Incomplete request; reason: ".concat(e,"."),type:"error"}}:n,o=r.onResponseErrorAppend,i=r.onSetupError,c=void 0===i?function(e){return{children:"Failed to setup request; reason: ".concat(e,"."),type:"error"}}:i,a=r.onResponseError,l=void 0===a?function(e){var r,n,t=e.status,i=e.statusText;500===t?r={children:"The API encountered a problem: ".concat(t," (").concat(i,")! Please check its systemd service logs."),type:"error"}:r=null!==(n=null===o||void 0===o?void 0:o.call(null,e))&&void 0!==n?n:{children:"API responded with ".concat(t," (").concat(i,")."),type:"warning"};return r}:a,u=e.request,s=e.response,f=e.message;return s?l(s):u?t(u):c(f)}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/665.ae67dcf3c1b6f7f6.js b/striker-ui/out/_next/static/chunks/665.ae67dcf3c1b6f7f6.js new file mode 100644 index 00000000..aec6c003 --- /dev/null +++ b/striker-ui/out/_next/static/chunks/665.ae67dcf3c1b6f7f6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[665],{4665:function(e,n,r){r.r(n);var t=r(5893),o=r(4460),c=r(7294);function i(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}var u=function(e){(null===e||void 0===e?void 0:e.current)&&(e.current.disconnect(),e.current=null)},l=function(e){var n=e.onConnect,r=e.onDisconnect,l=e.rfb,s=e.rfbConnectArgs,f=e.rfbScreen,v=e.url;(0,c.useEffect)((function(){if(s){var e=s.url,t=void 0===e?v:e;if(!t)return;var c=function(e){for(var n=1;n70?r>90?s.barAlert:s.barWarning:s.barOk},variant:"determinate",value:r}),(0,t.jsx)(o.Z,{className:s.underline,variant:"determinate",value:0})]})};function p(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var b="ProgressBar",m={barOk:"".concat(b,"-barOk"),barInProgress:"".concat(b,"-barInProgress"),underline:"".concat(b,"-underline")},y=(0,i.ZP)("div")((function(){var e;return p(e={},"& .".concat(m.barOk),{backgroundColor:c.Ej}),p(e,"& .".concat(m.barInProgress),{backgroundColor:c.Wd}),p(e,"& .".concat(m.underline),{borderRadius:c.n_}),e})),v=function(e){var r=e.progressPercentage;return(0,t.jsxs)(y,{children:[(0,t.jsx)(a,{classes:{bar:r<100?m.barInProgress:m.barOk},variant:"determinate",value:r}),(0,t.jsx)(o.Z,{className:m.underline,variant:"determinate",value:0})]})}},2349:function(e,r,n){var t=n(5893),o=n(8128),i=n(3631),c=n(7169);function a(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function l(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}r.Z=function(e){var r=e.sx,n=u(e,["sx"]);return(0,t.jsx)(o.Z,l({},n,{sx:l(a({color:c.s7},"&.".concat(i.Z.checked),{color:c.s7}),r)}))}},4825:function(e,r,n){var t=n(5893),o=n(7933),i=n(2992),c=n(7294),a=n(7169);function l(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function u(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}r.Z=function(e){var r=e.sx,n=s(e,["sx"]),f=(0,c.useMemo)((function(){return u(l({backgroundColor:a.s7,color:a.E5,textTransform:"none","&:hover":{backgroundColor:"".concat(a.s7,"F0")}},"&.".concat(o.Z.disabled),{backgroundColor:a.rr}),r)}),[r]);return(0,t.jsx)(i.Z,u({variant:"contained"},n,{sx:f}))}},582:function(e,r,n){var t=n(1496),o=n(7720),i=n(7169),c=(0,t.ZP)(o.Z)({backgroundColor:i.d});r.Z=c},4690:function(e,r,n){var t=n(5893),o=n(7357),i=n(7294);function c(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function a(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u={columnSpacing:void 0,fullWidth:!1,growFirst:!1,row:!1,rowSpacing:void 0,lg:void 0,md:void 0,sm:void 0,spacing:"1em",xl:void 0,xs:"column"},s=function(e){var r=e.fullWidth,n=e.growFirst,c=e.lg,s=void 0===c?u.lg:c,f=e.md,d=void 0===f?u.md:f,p=e.row,b=e.sm,m=void 0===b?u.sm:b,y=e.spacing,v=void 0===y?u.spacing:y,g=e.sx,h=e.xl,O=void 0===h?u.xl:h,j=e.xs,x=void 0===j?u.xs:j,w=e.columnSpacing,P=void 0===w?v:w,S=e.rowSpacing,Z=void 0===S?v:S,I=l(e,["fullWidth","growFirst","lg","md","row","sm","spacing","sx","xl","xs","columnSpacing","rowSpacing"]),k=(0,i.useMemo)((function(){return p?"row":x}),[x,p]),C=(0,i.useMemo)((function(){return m||k}),[m,k]),A=(0,i.useMemo)((function(){return d||C}),[d,C]),E=(0,i.useMemo)((function(){return s||A}),[s,A]),M=(0,i.useMemo)((function(){return O||E}),[O,E]),T=(0,i.useMemo)((function(){return{column:{alignItems:"normal",marginLeft:0,marginTop:P},row:{alignItems:"center",marginLeft:Z,marginTop:0}}}),[P,Z]),D=(0,i.useMemo)((function(){return n?1:void 0}),[n]),R=(0,i.useMemo)((function(){return r?"100%":void 0}),[r]);return(0,t.jsx)(o.Z,a({},I,{sx:a({alignItems:{xs:T[k].alignItems,sm:T[C].alignItems,md:T[A].alignItems,lg:T[E].alignItems,xl:T[M].alignItems},display:"flex",flexDirection:{xs:k,sm:C,md:A,lg:E,xl:M},width:R,"& > :first-child":{flexGrow:D},"& > :not(:first-child)":{marginLeft:{xs:T[k].marginLeft,sm:T[C].marginLeft,md:T[A].marginLeft,lg:T[E].marginLeft,xl:T[M].marginLeft},marginTop:{xs:T[k].marginTop,sm:T[C].marginTop,md:T[A].marginTop,lg:T[E].marginTop,xl:T[M].marginTop}}},g)}))};s.defaultProps=u,r.Z=s},1706:function(e,r,n){n.d(r,{Z:function(){return P}});var t=n(2428),o=n(5537),i=n(6761),c=n(1797),a=n(6059),l=n(1370),u=n(2186),s=n(5697),f=n(1496),d=n(4799),p=n(7021),b=n(7294),m=n(7169);function y(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function v(e,r){if(null==e)return{};var n,t,o=function(e,r){if(null==e)return{};var n,t,o={},i=Object.keys(e);for(t=0;t=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g=(0,f.ZP)(d.Z)(y({borderRadius:m.n_,backgroundColor:m.s7,color:m.E5,"&:hover":{backgroundColor:"".concat(m.s7,"F0")}},"&.".concat(p.Z.disabled),{backgroundColor:m.rr})),h=(0,f.ZP)(g)({backgroundColor:m.hM,color:m.s7,"&:hover":{backgroundColor:"".concat(m.hM,"F0")}}),O=(0,f.ZP)(d.Z)({color:m.s7}),j={add:{none:{iconType:t.Z}},close:{none:{iconType:o.Z}},delete:{none:{iconType:i.Z}},edit:{false:{iconType:c.Z},true:{iconType:a.Z,iconProps:{sx:{color:m.Ej}}}},play:{none:{iconType:l.Z}},visibility:{false:{iconType:u.Z},true:{iconType:s.Z}}},x={contained:g,normal:O,redcontained:h},w=function(e){var r=e.children,n=e.defaultIcon,t=e.iconProps,o=e.mapPreset,i=e.mapToIcon,c=e.state,a=void 0===c?"none":c,l=e.variant,u=void 0===l?"contained":l,s=v(e,["children","defaultIcon","iconProps","mapPreset","mapToIcon","state","variant"]),f=(0,b.useMemo)((function(){return null!==i&&void 0!==i?i:o&&j[o]}),[i,o]),d=(0,b.useMemo)((function(){var e;if(f){var o,i=null!==(o=f[a])&&void 0!==o?o:{iconType:n},c=i.iconType,l=i.iconProps;c&&(e=(0,b.createElement)(c,function(e){for(var r=1;re.length)&&(r=e.length);for(var n=0,t=new Array(r);n=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(t=n.next()).done)&&(i.push(t.value),!r||i.length!==r);c=!0);}catch(l){a=!0,o=l}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,r)||function(e,r){if(!e)return;if("string"===typeof e)return f(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var y="1.7em",v={iconProps:{},indicatorProps:{},indicatorTextProps:{},initialIndicatorValue:!1},g="24%",h="50%",O=".1rem",j="0rem",x=(0,i.forwardRef)((function(e,r){var n=e.icon,f=e.iconProps,d=(void 0===f?v.iconProps:f).sx,x=e.indicatorProps,w=(void 0===x?v.indicatorProps:x).sx,P=e.indicatorTextProps,S=(void 0===P?v.indicatorTextProps:P).sx,Z=e.initialIndicatorValue,I=void 0===Z?v.initialIndicatorValue:Z,k=e.sx,C=b(e.iconProps,["sx"]),A=b(e.indicatorProps,["sx"]),E=b(e.indicatorTextProps,["sx"]),M=(0,u.Z)().protect,T=m((0,s.Z)(I,M),2),D=T[0],R=T[1],W=(0,i.useCallback)((function(e,r,n){return(0,t.jsx)(a.Z,p({row:!0},A,{sx:p({backgroundColor:c.Ej,borderColor:c.E5,borderRadius:"50%",borderStyle:"solid",borderWidth:".1em",bottom:n,boxSizing:"content-box",height:0,justifyContent:"center",paddingBottom:r,position:"absolute",right:n,width:r},w),children:e}))}),[w,A]),L=(0,i.useCallback)((function(e){return(0,t.jsx)(l.Ac,p({},E,{sx:p({fontWeight:"500",paddingTop:"100%"},S),children:e>9?"".concat(9,"+"):e}))}),[S,E]),N=(0,i.useMemo)((function(){var e;if(D){var r,n=g,t=O;Number.isFinite(D)&&(r=L(D),n=h,t=j),e=W(r,n,t)}return e}),[W,L,D]);return(0,i.useImperativeHandle)(r,(function(){return{indicate:function(e){return R(e)}}}),[R]),(0,t.jsxs)(o.Z,{sx:p({height:y,width:y,position:"relative"},k),children:[(0,i.createElement)(n,p({},C,{sx:p({height:"100%",width:"100%"},d)})),N]})}));x.defaultProps=v,x.displayName="IconWithIndicator",r.Z=x},2444:function(e,r,n){var t=n(5893),o=n(8333),i=n(7294),c=n(2029),a=n(9297),l=n(4690),u=n(6125),s=n(1905),f=n(7750),d=n(2749);function p(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);ne.length)&&(r=e.length);for(var n=0,t=new Array(r);n=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function S(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,o,i=[],c=!0,a=!1;try{for(n=n.call(e);!(c=(t=n.next()).done)&&(i.push(t.value),!r||i.length!==r);c=!0);}catch(l){a=!0,o=l}finally{try{c||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,r)||I(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,r){if(e){if("string"===typeof e)return j(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,r):void 0}}var k=(0,o.forwardRef)((function(e){var r=e.allowCheckAll,n=void 0!==r&&r,j=e.allowEdit,x=void 0!==j&&j,I=e.allowItemButton,k=void 0!==I&&I,C=e.disableDelete,A=void 0!==C&&C,E=e.edit,M=void 0!==E&&E,T=e.flexBoxProps,D=e.getListCheckboxProps,R=e.getListItemCheckboxProps,W=e.header,L=e.headerSpacing,N=void 0===L?".3em":L,q=e.insertHeader,_=void 0===q||q,F=e.listEmpty,B=e.listItemIconMinWidth,U=void 0===B?"56px":B,H=e.listItemKeyPrefix,z=void 0===H?(0,b.Z)():H,$=e.listItemProps,J=(void 0===$?{}:$).sx,G=e.listItems,V=e.listProps,X=(void 0===V?{}:V).sx,Y=e.onAdd,K=e.onDelete,Q=e.onEdit,ee=e.onAllCheckboxChange,re=e.onItemCheckboxChange,ne=e.onItemClick,te=e.renderListItem,oe=void 0===te?function(e){return(0,t.jsx)(O.Ac,{children:e})}:te,ie=e.renderListItemCheckboxState,ce=e.scroll,ae=void 0!==ce&&ce,le=e.allowAddItem,ue=void 0===le?x:le,se=e.allowCheckItem,fe=void 0===se?x:se,de=e.allowDelete,pe=void 0===de?x:de,be=e.allowEditItem,me=void 0===be?x:be,ye=P(e.listItemProps,["sx"]),ve=P(e.listProps,["sx"]),ge=(0,o.useMemo)((function(){return"calc(".concat(U," - ").concat(N,")")}),[N,U]),he=(0,o.useMemo)((function(){return ue?(0,t.jsx)(h.Z,{onClick:Y,size:"small",children:(0,t.jsx)(i.Z,{})}):void 0}),[ue,Y]),Oe=(0,o.useMemo)((function(){return M&&pe?(0,t.jsx)(h.Z,{disabled:A,onClick:K,size:"small",sx:{backgroundColor:m.hM,color:m.s7,"&:hover":{backgroundColor:"".concat(m.hM,"F0")}},children:(0,t.jsx)(c.Z,{})}):void 0}),[A,pe,M,K]),je=(0,o.useMemo)((function(){if(me)return(0,t.jsx)(h.Z,{onClick:Q,size:"small",children:M?(0,t.jsx)(a.Z,{sx:{color:m.Ej}}):(0,t.jsx)(l.Z,{})})}),[me,M,Q]),xe=(0,o.useMemo)((function(){var e;return M&&fe&&(e=n?(0,t.jsx)(u.Z,{sx:{minWidth:ge},children:(0,t.jsx)(y.Z,w({edge:"start",onChange:ee},null===D||void 0===D?void 0:D.call(null)))}):(0,t.jsx)(v.Z,{sx:{minWidth:ge}})),e}),[ge,D,n,fe,M,ee]),we=(0,o.useMemo)((function(){var e,r="undefined"===typeof W?"undefined":(e=W)&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e;return _&&W?(0,t.jsxs)(g.Z,{row:!0,spacing:N,sx:{height:"2.4em"},children:[xe,["boolean","string"].includes(r)?(0,t.jsxs)(t.Fragment,{children:["string"===r&&(0,t.jsx)(O.Ac,{children:W}),(0,t.jsx)(v.Z,{sx:{flexGrow:1}})]}):W,Oe,je,he]}):W}),[he,xe,Oe,je,W,N,_]),Pe=(0,o.useMemo)((function(){return"string"===typeof F?(0,t.jsx)(O.Ac,{align:"center",children:F}):F}),[F]),Se=(0,o.useCallback)((function(e,r,n){return M&&fe?(0,t.jsx)(s.Z,{sx:{minWidth:U},children:(0,t.jsx)(y.Z,w({checked:r,edge:"start",onChange:function(){for(var r=arguments.length,n=new Array(r),t=0;t0&&(e=r.map((function(e){var r=S(e,2),n=r[0],i=r[1],c=oe(n,i);return(0,o.createElement)(f.ZP,w({},ye,{key:"".concat(z,"-").concat(n),sx:w({paddingLeft:0,paddingRight:0},J),children:[Se(n,null===ie||void 0===ie?void 0:ie.call(null,n,i),null===R||void 0===R?void 0:R.call(null,n,i)),k?(0,t.jsx)(d.Z,{onClick:function(){for(var e=arguments.length,r=new Array(e),t=0;t=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var b=function(e){var r=e.headerMarginOffset,n=void 0===r?".3em":r,o=e.ml,i=e.mv,c=void 0===i?"1.4em":i,s=e.sx,f=e.mb,b=void 0===f?c:f,m=e.mt,y=void 0===m?c:m,v=p(e,["headerMarginOffset","ml","mv","sx","mb","mt"]),g=(0,l.useMemo)((function(){return o?"calc(".concat(o," + ").concat(n,")"):n}),[n,o]),h=(0,l.useMemo)((function(){var e="number"===typeof y?"".concat(y,"px"):y;return"calc(".concat(e," + ").concat(n,")")}),[n,y]),O=(0,l.useMemo)((function(){return d({borderWidth:"1px",borderRadius:u.n_,borderStyle:"solid",borderColor:u.d,paddingBottom:0,position:"relative"},s)}),[s]);return(0,t.jsx)(a.Z,d({mb:b,ml:g,mt:h},v,{sx:O}))};function m(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function y(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g=function(e){var r=e.sx,n=v(e,["sx"]),o=(0,l.useMemo)((function(){return y({position:"relative",zIndex:20},r)}),[r]);return(0,t.jsx)(a.Z,y({padding:".3em .7em"},n,{sx:o}))},h=function(e){var r=e.children;return(0,t.jsxs)(a.Z,{sx:{position:"relative",whiteSpace:"pre-wrap"},children:[(0,t.jsx)(a.Z,{sx:{alignItems:"center",borderColor:u.d,borderRadius:u.n_,borderStyle:"solid",borderWidth:"1px",display:"flex",left:"-.3em",paddingBottom:".2em",paddingLeft:"1em",paddingRight:".7em",paddingTop:".4em",position:"absolute",top:"-.3em",width:"100%",zIndex:"10","& > :first-child":{flexGrow:1}},children:r}),(0,t.jsx)(a.Z,{sx:{display:"flex",paddingBottom:".4em",paddingRight:"1.7em",visibility:"hidden"},children:r})]})},O=n(2152),j=n(7750);function x(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var w="1.2em",P=function(e){var r=e.children,n=e.expandInitially,f=void 0!==n&&n,d=e.header,p=e.loading,m=void 0!==p&&p,y=e.panelProps,v=e.showHeaderSpinner,P=void 0!==v&&v,S=(0,l.useState)(f),Z=S[0],I=S[1],k=(0,l.useMemo)((function(){return Z?(0,t.jsx)(o.Z,{}):(0,t.jsx)(i.Z,{})}),[Z]),C=(0,l.useMemo)((function(){return Z?"auto":".2em"}),[Z]),A=(0,l.useMemo)((function(){return"string"===typeof d?(0,t.jsx)(j.Ac,{children:d}):d}),[d]),E=(0,l.useMemo)((function(){return P&&!Z&&m?(0,t.jsx)(O.Z,{progressProps:{style:{height:w,width:w}}}):void 0}),[Z,m,P]),M=(0,l.useMemo)((function(){return Z&&m?(0,t.jsx)(O.Z,{sx:{margin:"1em 0"}}):(0,t.jsx)(g,{children:r})}),[r,Z,m]);return(0,t.jsxs)(b,function(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var A="Panel",E={paper:"".concat(A,"-paper"),square:"".concat(A,"-square"),topSquare:"".concat(A,"-topSquare"),bottomSquare:"".concat(A,"-bottomSquare")},M=(0,S.ZP)(a.Z)((function(){var e;return I(e={margin:"1em",position:"relative"},"& .".concat(E.paper),{backgroundColor:u.v9,height:"100%",opacity:.8,padding:"2.1em",position:"relative",width:"100%",zIndex:10}),I(e,"& .".concat(E.square),{content:'""',position:"absolute",width:"2.1em",height:"2.1em",border:"1px",borderColor:u.lD,borderWidth:"1px",borderRadius:u.n_,borderStyle:"solid",padding:0,margin:0}),I(e,"& .".concat(E.topSquare),{top:"-.3em",left:"-.3em"}),I(e,"& .".concat(E.bottomSquare),{bottom:"-.3em",right:"-.3em"}),e})),T={paperProps:{}},D=(0,t.jsx)(Z.Z,{styles:{"*::-webkit-scrollbar":{width:".6em"},"*::-webkit-scrollbar-track":{backgroundColor:u.v9},"*::-webkit-scrollbar-thumb":{backgroundColor:u.lD,outline:"1px solid transparent",borderRadius:u.n_}}}),R=function(e){var r=e.children,n=e.classes,o=e.className,i=e.paperProps,c=(void 0===i?T.paperProps:i).className,l=e.sx,u=C(e.paperProps,["className"]),s=C(e,["children","classes","className","paperProps","sx"]);return(0,t.jsxs)(M,k({classes:n,className:o,sx:l},s,{children:[D,(0,t.jsx)(a.Z,{className:"".concat(E.square," ").concat(E.topSquare)}),(0,t.jsx)(a.Z,{className:"".concat(E.square," ").concat(E.bottomSquare)}),(0,t.jsx)(a.Z,k({},u,{className:"".concat(E.paper," ").concat(c),children:r}))]}))};R.defaultProps=T;var W=R,L=(0,S.ZP)(a.Z)({alignItems:"center",display:"flex",flexDirection:"row",marginBottom:"1em",width:"100%","& > :first-child":{flexGrow:1},"& > :not(:first-child, :last-child)":{marginRight:".3em"}})},2152:function(e,r,n){var t=n(5893),o=n(7357),i=n(2346),c=n(6489),a=n(7169);function l(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function u(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var f={progressProps:{}},d=function(e){var r=e.mt,n=void 0===r?"3em":r,d=e.progressProps,p=void 0===d?f.progressProps:d,b=e.sx,m=s(e,["mt","progressProps","sx"]);return(0,t.jsx)(o.Z,u({},m,{sx:u(l({alignItems:"center",display:"flex",justifyContent:"center",marginTop:n},"& .".concat(i.Z.root),{color:a.lD}),b),children:(0,t.jsx)(c.Z,u({},p,{variant:"indeterminate"}))}))};d.defaultProps=f,r.Z=d},7750:function(e,r,n){n.d(r,{Ac:function(){return b},z:function(){return O},Q0:function(){return I},$_:function(){return E},PJ:function(){return N},KI:function(){return w}});var t=n(5893),o=n(7294),i=n(5861),c=n(7169);function a(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function l(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s="BodyText",f={inheritColour:!1,inline:!1,inverted:!1,monospaced:!1,selected:!0,text:null},d={inheritColour:"".concat(s,"-inherit-colour"),inverted:"".concat(s,"-inverted"),monospaced:"".concat(s,"-monospaced"),selected:"".concat(s,"-selected"),unselected:"".concat(s,"-unselected")},p=function(e){var r,n=e.children,s=e.className,p=e.inheritColour,b=void 0===p?f.inheritColour:p,m=e.inline,y=void 0===m?f.inline:m,v=e.inverted,g=void 0===v?f.inverted:v,h=e.monospaced,O=void 0===h?f.monospaced:h,j=e.selected,x=void 0===j?f.selected:j,w=e.sx,P=e.text,S=void 0===P?f.text:P,Z=u(e,["children","className","inheritColour","inline","inverted","monospaced","selected","sx","text"]),I=(0,o.useMemo)((function(){return y?"inline":void 0}),[y]),k=(0,o.useMemo)((function(){return function(e){var r=e.isInheritColour,n=e.isInvert,t=e.isMonospace,o=e.isSelect,i=[];return r?i.push(d.inheritColour):n?i.push(d.inverted):o?i.push(d.selected):i.push(d.unselected),t&&i.push(d.monospaced),i.join(" ")}({isInheritColour:b,isInvert:g,isMonospace:O,isSelect:x})}),[b,g,O,x]),C=(0,o.useMemo)((function(){return null!==S&&void 0!==S?S:n}),[n,S]);return(0,t.jsx)(i.Z,l({className:"".concat(k," ").concat(s),variant:"subtitle1"},Z,{sx:l((r={display:I},a(r,"&.".concat(d.inverted),{color:c.E5}),a(r,"&.".concat(d.monospaced),{fontFamily:"Source Code Pro",fontWeight:400}),a(r,"&.".concat(d.selected),{color:c.lD}),a(r,"&.".concat(d.unselected),{color:c.UZ}),r),w),children:C}))};p.defaultProps=f;var b=p,m=n(1496);function y(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function v(e,r){if(null==e)return{};var n,t,o=function(e,r){if(null==e)return{};var n,t,o={},i=Object.keys(e);for(t=0;t=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g=(0,m.ZP)(i.Z)({color:c.lD}),h=function(e){var r=e.children,n=e.text,i=v(e,["children","text"]),c=(0,o.useMemo)((function(){return null!==r&&void 0!==r?r:n}),[r,n]);return(0,t.jsx)(g,function(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var I=function(e){var r=e.sx,n=Z(e,["sx"]);return(0,t.jsx)(w,S({},n,{monospaced:!0,sx:S({display:"inline",padding:".1rem .3rem"},r)}))};function k(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function C(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(e){var r=e.sx,n=A(e,["sx"]);return(0,t.jsx)(w,C({monospaced:!0,sx:C({alignItems:"center",display:"flex",height:"100%"},r)},n))},M=n(2992),T=n(4690),D=n(1706);function R(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function W(e){for(var r=1;re.length)&&(r=e.length);for(var n=0,t=new Array(r);n1?n-1:0),o=1;oe.length)&&(r=e.length);for(var n=0,t=new Array(r);ne.length)&&(r=e.length);for(var n=0,t=new Array(r);n1&&void 0!==arguments[1]?arguments[1]:{},n=r.refreshInterval,i=void 0===n?5e3:n,c=r.onSuccess,a=(0,t.ZP)(e,o.Z,{refreshInterval:i,onSuccess:c}),l=a.data,u=a.error;return{data:l,isLoading:!u&&!l,error:u}}},1770:function(e,r){r.Z=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.onRequestError,t=void 0===n?function(e){return{children:"Incomplete request; reason: ".concat(e,"."),type:"error"}}:n,o=r.onResponseErrorAppend,i=r.onSetupError,c=void 0===i?function(e){return{children:"Failed to setup request; reason: ".concat(e,"."),type:"error"}}:i,a=r.onResponseError,l=void 0===a?function(e){var r,n,t=e.status,i=e.statusText;500===t?r={children:"The API encountered a problem: ".concat(t," (").concat(i,")! Please check its systemd service logs."),type:"error"}:r=null!==(n=null===o||void 0===o?void 0:o.call(null,e))&&void 0!==n?n:{children:"API responded with ".concat(t," (").concat(i,")."),type:"warning"};return r}:a,u=e.request,s=e.response,f=e.message;return s?l(s):u?t(u):c(f)}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/780-e8b3396d257460a4.js b/striker-ui/out/_next/static/chunks/780-e8b3396d257460a4.js new file mode 100644 index 00000000..ca5eacde --- /dev/null +++ b/striker-ui/out/_next/static/chunks/780-e8b3396d257460a4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[780],{4825:function(r,n,e){var t=e(5893),o=e(7933),i=e(2992),l=e(7294),c=e(7169);function a(r,n,e){return n in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function u(r){for(var n=1;n=0||(o[e]=r[e]);return o}(r,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(r,e)&&(o[e]=r[e])}return o}n.Z=function(r){var n=r.sx,e=s(r,["sx"]),f=(0,l.useMemo)((function(){return u(a({backgroundColor:c.s7,color:c.E5,textTransform:"none","&:hover":{backgroundColor:"".concat(c.s7,"F0")}},"&.".concat(o.Z.disabled),{backgroundColor:c.rr}),n)}),[n]);return(0,t.jsx)(i.Z,u({variant:"contained"},e,{sx:f}))}},8187:function(r,n,e){var t=e(5893),o=e(7294),i=e(7357),l=e(4799),c=e(6576),a=e(238),u=e(6195),s=e(5537),f=e(7169),d=e(7750);function p(r,n){(null==n||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e=0||(o[e]=r[e]);return o}(r,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(r,e)&&(o[e]=r[e])}return o}function v(r){return function(r){if(Array.isArray(r))return p(r)}(r)||function(r){if("undefined"!==typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,n){if(!r)return;if("string"===typeof r)return p(r,n);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return p(r,n)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g="MessageBox",O={error:"".concat(g,"-error"),info:"".concat(g,"-info"),warning:"".concat(g,"-warning")},h={error:(0,t.jsx)(c.Z,{}),info:(0,t.jsx)(a.Z,{}),warning:(0,t.jsx)(u.Z,{})},j={isShowInitially:!0,isAllowClose:!1,onClose:void 0,onCloseAppend:void 0,text:void 0,type:"info"},w=function(r){var n=r.children,e=r.isAllowClose,c=void 0===e?j.isAllowClose:e,a=r.isShowInitially,u=void 0===a?j.isShowInitially:a,p=r.onClose,g=r.onCloseAppend,w=r.type,x=void 0===w?j.type:w,Z=r.text,P=m(r,["children","isAllowClose","isShowInitially","onClose","onCloseAppend","type","text"]),S=P.sx,A=(0,o.useState)(u),C=A[0],k=A[1],E=(0,o.useMemo)((function(){return c||void 0!==p||void 0!==g}),[c,p,g]),I=(0,o.useCallback)((function(r){return O[r]}),[]),M=(0,o.useCallback)((function(r){return void 0===h[r]?h.info:h[r]}),[]),D=(0,o.useCallback)((function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;return(0,t.jsx)(d.Ac,{inverted:"info"===r,children:e})}),[n]),R=(0,o.useMemo)((function(){var r;return y((b(r={alignItems:"center",borderRadius:f.n_,display:"flex",flexDirection:"row",padding:".3em .6em","& > *":{color:f.lD},"& > :first-child":{marginRight:".3em"},"& > :nth-child(2)":{flexGrow:1}},"&.".concat(O.error),{backgroundColor:f.hM}),b(r,"&.".concat(O.info),{backgroundColor:f.s7,"& > *":{color:"".concat(f.E5)}}),b(r,"&.".concat(O.warning),{backgroundColor:f.Wd}),r),S)}),[S]);return C?(0,t.jsxs)(i.Z,y({},P,{className:I(x),sx:R,children:[M(x),D(x,Z),E&&(0,t.jsx)(l.Z,{onClick:null!==p&&void 0!==p?p:function(){for(var r=arguments.length,n=new Array(r),e=0;er.length)&&(n=r.length);for(var e=0,t=new Array(n);e=0||(o[e]=r[e]);return o}(r,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(r,e)&&(o[e]=r[e])}return o}function m(r){return function(r){if(Array.isArray(r))return d(r)}(r)||function(r){if("undefined"!==typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,n){if(!r)return;if("string"===typeof r)return d(r,n);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return d(r,n)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var v=function(r){var n=r.endAdornment,e=r.label,d=r.onPasswordVisibilityAppend,v=r.sx,g=r.inputProps,O=(void 0===g?{}:g).type,h=r.type,j=void 0===h?O:h,w=y(r.inputProps,["type"]),x=y(r,["endAdornment","label","onPasswordVisibilityAppend","sx","inputProps","type"]),Z=(0,u.useState)(j),P=Z[0],S=Z[1],A=(0,u.useMemo)((function(){var r=j===f.Z.password,n=P===f.Z.password;return(0,t.jsx)(t.Fragment,{children:r&&(0,t.jsx)(l.Z,{onClick:function(){for(var r=arguments.length,e=new Array(r),t=0;t=0||(o[e]=r[e]);return o}(r,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(r,e)&&(o[e]=r[e])}return o}var p=function(r){var n,e=r.children,p=r.isNotifyRequired,b=r.sx,y=r.variant,m=void 0===y?"outlined":y,v=d(r,["children","isNotifyRequired","sx","variant"]),g=f((s(n={color:"".concat(u.s7,"9F")},"& .".concat(i.Z.root),{color:u.s7}),s(n,"&.".concat(l.Z.focused),{backgroundColor:u.s7,borderRadius:u.n_,color:u.E5,padding:".1em .6em"}),s(n,"&.".concat(l.Z.shrink," .").concat(i.Z.root),{display:"none"}),n),b);return(0,t.jsx)(c.Z,f({variant:m},v,{sx:g,children:(0,t.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row"},children:[p&&(0,t.jsx)(o.Z,{sx:{marginLeft:"-.2rem",marginRight:".4rem"}}),e]})}))}},4188:function(r,n){n.Z={number:"number",password:"password",text:"text"}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/825-d34974d169ea09cc.js b/striker-ui/out/_next/static/chunks/825-d34974d169ea09cc.js new file mode 100644 index 00000000..3e01f672 --- /dev/null +++ b/striker-ui/out/_next/static/chunks/825-d34974d169ea09cc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[825],{4594:function(e,t,n){var r=n(5893),o=n(6514),i=n(5113),a=n(4656),s=n(482),l=n(2994),u=n(7357),c=n(9890),p=n(7169),d=n(1363),f=n(6284);function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var g=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,m({},e))})};t.Z=function(e){var t=e.componentsProps,n=e.extendRenderInput,o=e.label,i=e.messageBoxProps,h=e.renderInput,b=e.sx,y=x(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),U=m({paper:{sx:{backgroundColor:p.lD}}},t),S=null!==h&&void 0!==h?h:function(e){var t=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,s=e.inputProps,l={formControlProps:{fullWidth:t,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:s,startAdornment:i.startAdornment},label:o};return null===n||void 0===n||n.call(null,l,e),(0,r.jsx)(f.Z,m({},l))},j=m(v({},"& .".concat(a.Z.root," .").concat(s.Z.endAdornment),v({right:"7px"},"& .".concat(l.Z.root),{color:p.s7})),b);return(0,r.jsxs)(u.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(c.Z,m({PaperComponent:g},y,{componentsProps:U,renderInput:S,sx:j})),(0,r.jsx)(d.Z,m({},i))]})}},5521:function(e,t,n){n.d(t,{Z:function(){return E}});var r=n(5893),o=n(1113),i=n(1496),a=n(2293),s=n(7357),l=n(2992),u=n(4799),c=n(7294),p=n(7169),d=n(4433),f=n(9029),v=n(7533),m=n(8462),x=n(7212),g=n(8619),h=[{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/manage-element"},{text:"Files",image:"/pngs/files_on.png",uri:"/file-manager"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/config"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],b={width:"40em",height:"40em"},y=n(4390),U=n(582),S=n(4690),j=n(1770),I=n(7750),P=n(1081);function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return n["".concat(t).concat(e)]}),[n]),i=(0,c.useCallback)((function(){return o("user")}),[o]);return(0,c.useEffect)((function(){if(e){var t=document.cookie.split(/\s*;\s*/);r(t.reduce((function(e,t){var n,r=w(t.split("=",2),2),o=r[0],i=r[1],a=decodeURIComponent(i);if(a.startsWith("j:"))try{n=JSON.parse(a.substring(2))}catch(s){n=i}else n=i;return e[o]=n,e}),{}))}}),[e]),{cookieJar:n,getCookie:o,getSessionUser:i}};function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){for(var t=1;t0)},ref:t})]})}},4968:function(e,t,n){n.d(t,{Z:function(){return Ue}});var r=n(5893),o=n(7294),a=n(7357),s=n(6886),l=n(8262),u=n(5537),c=n(5934),p=n(7169),d=n(4390),f=n(4594),v=n(157),m=n(4825),x=n(5737),g=n(1706),h=n(8187),b=n(6284),y=n(7120),U=n(4656),S=n(1363),j=n(7783);function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){for(var t=1;t :first-child":{flexGrow:1},"& > :not(:last-child)":{marginRight:".5em"}},"&:hover\n .".concat(y.Z.root,"\n .").concat(U.Z.root,"\n .").concat(U.Z.notchedOutline),{borderColor:p.s7}),children:[(0,r.jsx)(b.Z,P({id:t,label:n},i)),(0,r.jsx)(j.Z,P({formControlProps:{fullWidth:!1},id:"".concat(t,"-nested-select"),selectItems:u},d))]}),(0,r.jsx)(S.Z,P({},l))]})};w.defaultProps=D;var Z=w,O=n(3679),A=n(3640),M=n(6727),C=n(1184),k=n(9),G=n(192),B=n(7750);function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function E(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var W={inputLabelProps:{},isAllowTextInput:!1,labelId:"",messageBoxProps:{},sliderProps:{}},V={root:"".concat("SliderInputLabelDecorator","-root")},R=function(e){var t=e.isFocused,n=e.label,o=p.s7,i="solid",s="0",l="0 .6em 0 .4em",u="1px 0 0 0",c="0.3";return t&&(s="-1px",l="0 1em 0 1em",u="2px 0 0 0",c="1"),(0,r.jsxs)(a.Z,{className:V.root,sx:{display:"flex",flexDirection:"row",position:"absolute",top:s,width:"calc(100% - 6px)","> :last-child":{flexGrow:1}},children:[(0,r.jsx)(a.Z,{sx:{borderColor:o,borderStyle:i,borderWidth:u,content:'""',opacity:c,width:".6em"}}),(0,r.jsx)(B.Ac,{sx:{fontSize:".75em",margin:l,visibility:"hidden"},text:n}),(0,r.jsx)(a.Z,{sx:{borderColor:o,borderStyle:i,borderWidth:u,content:'""',opacity:c}})]})},_=function(e,t){var n=Number.parseFloat(e);return Number.isNaN(n)?t:n},Q=function(e){return N(e,Array)?e.map((function(e){return String(e)})):[String(e)]},q=function(e){var t,n=e.messageBoxProps,i=void 0===n?W.messageBoxProps:n,s=e.isAllowTextInput,l=void 0===s?W.isAllowTextInput:s,u=e.label,c=e.labelId,d=void 0===c?W.labelId:c,f=e.inputLabelProps,v=void 0===f?W.inputLabelProps:f,m=e.sliderProps,x=void 0===m?W.sliderProps:m,g=e.value,h=x.max,b=x.min,y=x.onChange,j=x.sx,I=x.valueLabelDisplay,P=g,D=(0,o.useState)({range:Q(g)}),w=D[0],Z=D[1],O=(0,o.useState)(!1),B=O[0],z=O[1],q=function(){z(!1)},H=function(){z(!0)},$=function(){P=function(e,t){return N(t,Array)?e.map((function(e,n){return _(e,t[n])})):_(e[0],t)}(w.range,P),null===y||void 0===y||y.call(null,P)};return(0,r.jsxs)(A.Z,{sx:{display:"flex",flexDirection:"column","&:hover":(t={},T(t,"& .".concat(V.root," div"),{opacity:1}),T(t,"& .".concat(U.Z.notchedOutline),{borderColor:p.s7}),t)},children:[(0,r.jsx)(G.Z,F({className:B?M.Z.focused:"",id:d,shrink:!0},v,{children:u})),R({isFocused:B,label:u}),(0,r.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row","> :first-child":{flexGrow:1}},children:[(0,r.jsx)(C.ZP,{"aria-labelledby":d,max:h,min:b,onBlur:q,onChange:function(e,t){Z({range:Q(t)}),null===y||void 0===y||y.call(null,t)},onFocus:H,sx:F(T({color:p.s7,marginLeft:"1em",marginRight:"1em"},"& .".concat(C.TW.thumb),{borderRadius:p.n_,transform:"translate(-50%, -50%) rotate(45deg)"}),j),value:P,valueLabelDisplay:I}),w.range.map((function(e,t){return function(e){var t=e.key,n=e.isFocused,o=L(e,["key","isFocused"]);return(0,r.jsx)(k.Z,F({key:t,className:n?U.Z.focused:"",type:"number"},o))}({key:"slider-nested-text-input-".concat(t),inputProps:{max:h,min:b},isFocused:B,onBlur:q,onChange:function(){for(var e=arguments.length,n=new Array(e),r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function oe(e,t){return K(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||se(e,t)||te()}function ie(e){return K(e)||ee(e)||se(e,i)||te()}function ae(e){return function(e){if(Array.isArray(e))return Y(e)}(e)||ee(e)||se(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function se(e,t){if(e){if("string"===typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}var le,ue,ce=BigInt(0),pe=[{value:"B"},{value:"KiB"},{value:"MiB"},{value:"GiB"},{value:"TiB"}],de="GiB",fe=BigInt(65536),ve=BigInt(104857600),me={backgroundColor:p.Ej,color:p.lD,"&:hover":{backgroundColor:p.Ej}},xe=function(e,t){var n=t.onButtonClick;return(0,r.jsx)(m.Z,{disabled:void 0===n,onClick:n,sx:{minWidth:"unset",whiteSpace:"nowrap"},children:"Max: ".concat(e)})},ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.endAdornment,n=e.mainLabel,o=e.subLabel;return(0,r.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row",width:"100%","& > :first-child":{flexGrow:1}},children:[(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:[n&&(0,r.jsx)(B.Ac,{inverted:!0,text:n}),o&&(0,r.jsx)(B.Ac,{inverted:!0,text:o})]}),t]})},he=function(e,t,n,r,o,i,a){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=s.includeAnvilUUIDs,u=void 0===l?[]:l,c=s.includeFileUUIDs,p=void 0===c?[]:c,d=s.includeStorageGroupUUIDs,f=void 0===d?[]:d,v=function(){return!0},m=function(){return!0},x=function(){return!0};u.length>0&&(v=function(e){return u.includes(e)}),p.length>0&&(m=function(e){return p.includes(e)}),f.length>0&&(x=function(e){return f.includes(e)});var g={},h=i.reduce((function(e,t,n){var r,i=null!==(r=o[n])&&void 0!==r?r:ce;return e.all+=i,""===t||(void 0===e[t]&&(e[t]=ce),e[t]+=i),e}),{all:ce}),b=e.reduce((function(e,s){var l=s.anvilUUID;if(v(l)){var u,c=s.anvilTotalCPUCores,p=s.anvilTotalAvailableMemory,d=s.files,f=s.fileUUIDs,b=s.storageGroups,y=[],U=ce,S=ce;if(b.forEach((function(e){var t=e.storageGroupUUID,n=e.storageGroupFree;x(t)&&(y.push(t),S+=n,n>U&&(U=n))})),[function(){return b.length>0},function(){return n<=c},function(){return r<=p},function(){return i.every((function(e,n){var r,i=null!==(r=o[n])&&void 0!==r?r:ce,a=!0,s=i<=U;return""!==e&&(a=y.includes(e),s=i<=t[e].storageGroupFree),a&&s}))},function(){return Object.entries(h).every((function(e){var n=oe(e,2),r=n[0],o=n[1];return"all"===r?o<=S:o<=t[r].storageGroupFree}))},function(){return a.every((function(e){return""===e||f.includes(e)}))}].every((function(e){return e()})))e.anvils.push(s),e.anvilUUIDs.push(l),e.maxCPUCores=Math.max(c,e.maxCPUCores),p>e.maxMemory&&(e.maxMemory=p),d.forEach((function(e){var t=e.fileUUID;m(t)&&(g[t]=!0)})),(u=e.storageGroupUUIDs).push.apply(u,ae(y)),e.maxVirtualDiskSizes.fill(U)}return e}),{anvils:[],anvilUUIDs:[],fileUUIDs:[],maxCPUCores:0,maxMemory:ce,maxVirtualDiskSizes:i.map((function(){return ce})),storageGroupUUIDs:[]});return b.fileUUIDs=Object.keys(g),i.forEach((function(e,n){""!==e&&(b.maxVirtualDiskSizes[n]=t[e].storageGroupFree)})),b},be=function(e){return e.filter((function(e){return""!==e}))},ye=function(e){return{fromUnit:"B",onSuccess:{string:e},precision:0,toUnit:"ibyte"}};(0,x.Bh)(fe,ye((function(e,t){le="".concat(e," ").concat(t)}))),(0,x.Bh)(ve,ye((function(e,t){ue="".concat(e," ").concat(t)})));var Ue=function(e){var t=e.dialogProps.open,n=e.onClose,i=(0,o.useState)([]),y=i[0],U=i[1],S=(0,o.useState)({}),I=S[0],P=S[1],D=(0,o.useState)({}),w=D[0],A=D[1],M=(0,o.useState)({}),C=M[0],k=M[1],G=(0,o.useState)({}),z=G[0],T=G[1],N=(0,o.useState)([]),F=N[0],L=N[1],E=(0,o.useState)([]),W=E[0],V=E[1],R=(0,o.useState)([]),_=R[0],Q=R[1],q=(0,o.useState)([]),Y=q[0],K=q[1],ee=(0,o.useState)(""),te=ee[0],se=ee[1],ye=(0,o.useState)(),Ue=ye[0],Se=ye[1],je=(0,o.useState)(1),Ie=je[0],Pe=je[1],De=(0,o.useState)(0),we=De[0],Ze=De[1],Oe=(0,o.useState)(),Ae=Oe[0],Me=Oe[1],Ce=(0,o.useState)(ce),ke=Ce[0],Ge=Ce[1],Be=(0,o.useState)(ce),ze=Be[0],Te=Be[1],Ne=(0,o.useState)(),Fe=Ne[0],Le=Ne[1],Ee=(0,o.useState)("0"),We=Ee[0],Ve=Ee[1],Re=(0,o.useState)(""),_e=Re[0],Qe=Re[1],qe=(0,o.useState)(de),He=qe[0],$e=qe[1],Je=(0,o.useState)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.existingVirtualDisks,n=void 0===t?{stateIds:[],inputMaxes:[],inputSizeMessages:[],inputSizes:[],inputStorageGroupUUIDMessages:[],inputStorageGroupUUIDs:[],inputUnits:[],maxes:[],sizes:[]}:t,r=e.stateId,o=void 0===r?(0,c.Z)():r,i=e.inputMax,a=void 0===i?"0":i,s=e.inputSize,l=void 0===s?"":s,u=e.inputSizeMessage,p=void 0===u?void 0:u,d=e.inputStorageGroupUUID,f=void 0===d?"":d,v=e.inputStorageGroupUUIDMessage,m=void 0===v?void 0:v,x=e.inputUnit,g=void 0===x?de:x,h=e.max,b=void 0===h?ce:h,y=e.setVirtualDisks,U=e.size,S=void 0===U?ce:U,j=n.stateIds,I=n.inputMaxes,P=n.inputSizeMessages,D=n.inputSizes,w=n.inputStorageGroupUUIDMessages,Z=n.inputStorageGroupUUIDs,O=n.inputUnits,A=n.maxes,M=n.sizes;return j.push(o),I.push(a),P.push(p),D.push(l),w.push(m),Z.push(f),O.push(g),A.push(b),M.push(S),null===y||void 0===y||y.call(null,ne({},n)),n}()),Ye=Je[0],Ke=Je[1],Xe=(0,o.useState)(""),et=Xe[0],tt=Xe[1],nt=(0,o.useState)(),rt=nt[0],ot=nt[1],it=(0,o.useState)(""),at=it[0],st=it[1],lt=(0,o.useState)()[0],ut=(0,o.useState)(""),ct=ut[0],pt=ut[1],dt=(0,o.useState)(),ft=dt[0],vt=dt[1],mt=(0,o.useState)(null),xt=mt[0],gt=mt[1],ht=(0,o.useState)(),bt=ht[0],yt=ht[1],Ut=(0,o.useState)([]),St=Ut[0],jt=Ut[1],It=(0,o.useState)([]),Pt=It[0],Dt=It[1],wt=(0,o.useState)([]),Zt=wt[0],Ot=wt[1],At=(0,o.useState)(!1),Mt=At[0],Ct=At[1],kt=(0,o.useState)(!1),Gt=kt[0],Bt=kt[1],zt=(0,o.useState)(!1),Tt=zt[0],Nt=zt[1],Ft=(0,o.useState)(0),Lt=Ft[0],Et=Ft[1],Wt={serverName:{defaults:{onSuccess:function(){Se(void 0)},value:te},tests:[{onFailure:function(){Se({text:"The server name length must be 1 to 16 characters.",type:"warning"})},test:function(e){var t=e.value.length;return t>=1&&t<=16}},{onFailure:function(){Se({text:"The server name is expected to only contain alphanumeric, hyphen, or underscore characters.",type:"warning"})},test:function(e){var t=e.value;return/^[a-zA-Z0-9_-]+$/.test(t)}},{onFailure:function(){Se({text:"This server name already exists, please choose another name.",type:"warning"})},test:function(e){var t=e.value;return void 0===C[t]}}]},cpuCores:{defaults:{max:we,min:1,onSuccess:function(){Me(void 0)},value:Ie},tests:[{onFailure:function(){Me({text:"Non available.",type:"warning"})},test:J.X7},{onFailure:function(e){var t=e.displayMax,n=e.displayMin;Me({text:"The number of CPU cores is expected to be between ".concat(n," and ").concat(t,"."),type:"warning"})},test:J.SQ}]},memory:{defaults:{displayMax:"".concat(We," ").concat(He),displayMin:le,max:ze,min:fe,onSuccess:function(){Le(void 0)},value:ke},tests:[{onFailure:function(){Le({text:"Non available.",type:"warning"})},test:J.X7},{onFailure:function(e){var t=e.displayMax,n=e.displayMin;Le({text:"Memory is expected to be between ".concat(n," and ").concat(t,"."),type:"warning"})},test:J.SQ}]},installISO:{defaults:{onSuccess:function(){ot(void 0)},value:et},tests:[{test:J.HJ}]},anvil:{defaults:{onSuccess:function(){vt(void 0)},value:ct},tests:[{test:J.HJ}]},optimizeForOS:{defaults:{onSuccess:function(){yt(void 0)},value:null===xt||void 0===xt?void 0:xt.key},tests:[{test:J.HJ}]}};Ye.inputSizeMessages.forEach((function(e,t){Wt["vd".concat(t,"Size")]={defaults:{displayMax:"".concat(Ye.inputMaxes[t]," ").concat(Ye.inputUnits[t]),displayMin:ue,max:Ye.maxes[t],min:ve,onSuccess:function(){Ye.inputSizeMessages[t]=void 0},value:Ye.sizes[t]},onFinishBatch:function(){Ke(ne({},Ye))},tests:[{onFailure:function(){Ye.inputSizeMessages[t]={text:"Non available.",type:"warning"}},test:J.X7},{onFailure:function(e){var n=e.displayMax,r=e.displayMin;Ye.inputSizeMessages[t]={text:"Virtual disk ".concat(t," size is expected to be between ").concat(r," and ").concat(n,"."),type:"warning"}},test:J.SQ}]},Wt["vd".concat(t,"StorageGroup")]={defaults:{onSuccess:function(){Ye.inputStorageGroupUUIDMessages[t]=void 0},value:Ye.inputStorageGroupUUIDs[t]},onFinishBatch:function(){Ke(ne({},Ye))},tests:[{test:J.HJ}]}}));var Vt,Rt,_t,Qt,qt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.allAnvils,n=void 0===t?y:t,r=e.cpuCores,o=void 0===r?Ie:r,i=e.fileUUIDs,a=void 0===i?[et,at]:i,s=e.includeAnvilUUIDs,l=void 0===s?be([ct]):s,u=e.includeFileUUIDs,c=e.includeStorageGroupUUIDs,p=e.inputMemoryUnit,d=void 0===p?He:p,f=e.memory,v=void 0===f?ke:f,m=e.storageGroupUUIDMapToData,g=void 0===m?z:m,h=e.virtualDisks,b=void 0===h?Ye:h,U=he(n,g,o,v,b.sizes,b.inputStorageGroupUUIDs,a,{includeAnvilUUIDs:l,includeFileUUIDs:u,includeStorageGroupUUIDs:c}),S=U.anvilUUIDs,j=U.fileUUIDs,I=U.maxCPUCores,P=U.maxMemory,D=U.maxVirtualDiskSizes,w=U.storageGroupUUIDs;Ze(I),Te(P);var Z=[];b.maxes=D,b.maxes.forEach((function(e,t){(0,x.Bh)(e,{fromUnit:"B",onSuccess:{string:function(e,n){b.inputMaxes[t]=e,Z[t]="".concat(e," ").concat(n)}},toUnit:b.inputUnits[t]})})),Ke(ne({},b)),jt(S),Dt(j),Ot(w);var O="";return(0,x.Bh)(P,{fromUnit:"B",onSuccess:{string:function(e,t){Ve(e),O="".concat(e," ").concat(t)}},toUnit:d}),{formattedMaxMemory:O,formattedMaxVDSizes:Z,maxCPUCores:I,maxMemory:P,maxVirtualDiskSizes:D}},Ht=(0,o.useCallback)(qt,[]),$t=function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.cmValue,n=void 0===t?ce:t,r=e.cmUnit,o=void 0===r?He:r;Ge(n);var i=qt({inputMemoryUnit:o,memory:n}),a=i.formattedMaxMemory,s=i.maxMemory;$t({inputs:{memory:{displayMax:a,max:s,value:n}}})},Yt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.value,n=void 0===t?_e:t,r=e.unit,o=void 0===r?He:r;n!==_e&&Qe(n),o!==He&&$e(o),(0,x.KY)(n,o,(function(e){return Jt({cmValue:e,cmUnit:o})}),(function(){return Jt({cmUnit:o})}))},Kt=function(e){tt(e),qt({fileUUIDs:[e,at]})},Xt=function(e){st(e),qt({fileUUIDs:[et,e]})},en=function(e){var t=be([e]);pt(e),qt({includeAnvilUUIDs:t})};return(0,o.useEffect)((function(){d.Z.get("/anvil",{params:{anvilUUIDs:"all",isForProvisionServer:!0}}).then((function(e){var t=e.data,n=function(e){var t={},n=e.reduce((function(e,n){var o=n.anvilUUID,i=n.anvilName,s=n.anvilTotalMemory,l=n.anvilTotalAllocatedMemory,u=n.anvilTotalAvailableMemory,c=n.hosts,p=n.servers,d=n.storageGroups,f=n.files,v=d.reduce((function(t,n){var a=ne({},n,{anvilUUID:o,anvilName:i,storageGroupSize:BigInt(n.storageGroupSize),storageGroupFree:BigInt(n.storageGroupFree),humanizedStorageGroupFree:""});return(0,x.Bh)(n.storageGroupFree,{fromUnit:"B",onSuccess:{string:function(e,t){a.humanizedStorageGroupFree="".concat(e," ").concat(t)}},precision:0,toUnit:"ibyte"}),t.anvilStorageGroupUUIDs.push(n.storageGroupUUID),t.anvilStorageGroups.push(a),e.storageGroups.push(a),e.storageGroupSelectItems.push({displayValue:ge({endAdornment:(0,r.jsx)(B.Ac,{inverted:!0,text:"~".concat(a.humanizedStorageGroupFree," free")}),mainLabel:n.storageGroupName,subLabel:i}),value:n.storageGroupUUID}),e.storageGroupUUIDMapToData[n.storageGroupUUID]=a,t}),{anvilStorageGroups:[],anvilStorageGroupUUIDs:[]}),m=v.anvilStorageGroups,g=v.anvilStorageGroupUUIDs,h=[];f.forEach((function(e){var n=e.fileUUID;h.push(n),t[n]=e}));var b=ne({},n,{anvilTotalMemory:BigInt(s),anvilTotalAllocatedMemory:BigInt(l),anvilTotalAvailableMemory:BigInt(u),humanizedAnvilTotalAvailableMemory:"",hosts:c.map((function(e){return ne({},e,{hostMemory:BigInt(e.hostMemory)})})),servers:p.map((function(t){var n=t.serverMemory,r=t.serverName,o=ne({},re(t,["serverMemory","serverName"]),{serverMemory:BigInt(n),serverName:r});return e.serverNameMapToData[r]=o,o})),storageGroupUUIDs:g,storageGroups:m,fileUUIDs:h});return(0,x.Bh)(u,{fromUnit:"B",onSuccess:{string:function(e,t){b.humanizedAnvilTotalAvailableMemory="".concat(e," ").concat(t)}},precision:0,toUnit:"ibyte"}),e.anvils.push(b),e.anvilSelectItems.push({displayValue:ge({endAdornment:(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",width:"8rem"},children:[(0,r.jsx)(B.Ac,{inverted:!0,text:"CPU: ".concat(b.anvilTotalCPUCores," cores")}),(0,r.jsx)(B.Ac,{inverted:!0,text:"Memory: ~".concat(b.humanizedAnvilTotalAvailableMemory)})]}),mainLabel:b.anvilName,subLabel:b.anvilDescription}),value:o}),e.anvilUUIDMapToData[o]=b,e}),{anvils:[],anvilSelectItems:[],anvilUUIDMapToData:{},files:[],fileSelectItems:[],fileUUIDMapToData:{},serverNameMapToData:{},storageGroups:[],storageGroupSelectItems:[],storageGroupUUIDMapToData:{}});return Object.values(t).forEach((function(e){n.files.push(e),n.fileSelectItems.push({displayValue:e.fileName,value:e.fileUUID}),n.fileUUIDMapToData[e.fileUUID]=e})),n}(t.anvils),o=n.anvils,i=n.anvilSelectItems,s=n.anvilUUIDMapToData,l=n.fileSelectItems,u=n.fileUUIDMapToData,c=n.serverNameMapToData,p=n.storageGroupSelectItems,d=n.storageGroupUUIDMapToData;U(o),P(s),A(u),k(c),T(d),L(i),V(l),K(p),Ht({allAnvils:o,storageGroupUUIDMapToData:d}),Q(t.osList.map((function(e){var t=oe(e.replace(/^key=([^\s]+),name=['"](.*)['"]$/,"$1,$2").split(","),2),n=t[0];return{label:t[1],key:n}}))),Ct(!0)}))}),[Ht]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(l.Z,{fullWidth:!0,maxWidth:"sm",open:t,PaperComponent:O.s_,PaperProps:{sx:{overflow:"visible"}},children:[(0,r.jsxs)(O.V9,{children:[(0,r.jsx)(B.z,{text:"Provision a Server"}),(0,r.jsx)(g.Z,{onClick:n,sx:{backgroundColor:p.hM,color:p.lD,"&:hover":{backgroundColor:p.hM}},children:(0,r.jsx)(u.Z,{})})]}),Mt?(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",maxHeight:"50vh",overflowY:"scroll",paddingTop:".6em","& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(b.Z,{id:"ps-server-name",label:"Server name",inputProps:{onChange:function(e){var t=e.target.value;se(t),$t({inputs:{serverName:{value:t}}})},value:te},inputLabelProps:{isNotifyRequired:0===te.length},messageBoxProps:Ue})}),(Vt="ps-cpu-cores",Rt="CPU cores",_t=Ie,Qt={messageBoxProps:Ae,sliderProps:{onChange:function(e){var t=e;if(t!==Ie){Pe(t);var n=qt({cpuCores:t}).maxCPUCores;$t({inputs:{cpuCores:{max:n,value:t}}})}},max:we,min:1}},(0,r.jsx)(H,ne({isAllowTextInput:!0,label:Rt,labelId:"".concat(Vt,"-label"),value:_t},Qt))),(0,r.jsx)(Z,{id:"ps-memory",label:"Memory",messageBoxProps:Fe,inputWithLabelProps:{inputProps:{endAdornment:xe("".concat(We," ").concat(He),{onButtonClick:function(){Qe(We),Jt({cmValue:ze})}}),onChange:function(e){var t=e.target.value;Yt({value:t})},type:"number",value:_e},inputLabelProps:{isNotifyRequired:ke===ce}},selectItems:pe,selectWithLabelProps:{selectProps:{onChange:function(e){var t=e.target.value;Yt({unit:t})},value:He}}}),Ye.stateIds.map((function(e,t){return function(e,t,n,o,i,s,l,u){var c=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return e[n][r]},p=function(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;e[r][i]=o,n(ne({},e))},d=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce;p("sizes",n);var r=s({virtualDisks:e}),o=r.formattedMaxVDSizes,i=r.maxVirtualDiskSizes;u({inputs:X({},"vd".concat(t,"Size"),{displayMax:"".concat(o[t]),max:i[t],value:n})})},f=function(e){var t=e.value,n=void 0===t?c("inputSizes"):t,r=e.unit,o=void 0===r?c("inputUnits"):r;n!==c("inputSizes")&&p("inputSizes",n),o!==c("inputUnits")&&p("inputUnits",o),(0,x.KY)(n,o,(function(e){return d(e)}),(function(){return d()}))},v=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c("inputStorageGroupUUIDs");t!==c("inputStorageGroupUUIDs")&&p("inputStorageGroupUUIDs",t),s({virtualDisks:e})};return(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column","& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(Z,{id:"ps-virtual-disk-size-".concat(t),label:"Virtual disk size",messageBoxProps:c("inputSizeMessages"),inputWithLabelProps:{inputProps:{endAdornment:xe("".concat(c("inputMaxes")," ").concat(c("inputUnits")),{onButtonClick:function(){p("inputSizes",c("inputMaxes")),d(c("maxes"))}}),onChange:function(e){var t=e.target.value;f({value:t})},type:"number",value:c("inputSizes")},inputLabelProps:{isNotifyRequired:c("sizes")===ce}},selectItems:pe,selectWithLabelProps:{selectProps:{onChange:function(e){var t=e.target.value;f({unit:t})},value:c("inputUnits")}}})}),(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(j.Z,{id:"ps-storage-group-".concat(t),label:"Storage group",disableItem:function(e){return!(i.includes(e)&&c("sizes")<=l[e].storageGroupFree)},inputLabelProps:{isNotifyRequired:0===c("inputStorageGroupUUIDs").length},messageBoxProps:c("inputStorageGroupUUIDMessages"),selectItems:o,selectProps:{onChange:function(e){var t=e.target.value;v(t)},onClearIndicatorClick:function(){return v("")},renderValue:function(e){var t,n=null!==(t=l[e])&&void 0!==t?t:{},r=n.anvilName,o=void 0===r?"?":r,i=n.storageGroupName,a=void 0===i?"Unknown (".concat(e,")"):i;return"".concat(a," (").concat(o,")")},value:c("inputStorageGroupUUIDs")}})})]},"ps-virtual-disk-".concat(c("stateIds")))}(Ye,t,Ke,Y,Zt,qt,z,$t)})),(0,r.jsx)(j.Z,{disableItem:function(e){return e===at},hideItem:function(e){return!Pt.includes(e)},id:"ps-install-image",inputLabelProps:{isNotifyRequired:0===et.length},label:"Install ISO",messageBoxProps:rt,selectItems:W,selectProps:{onChange:function(e){var t=e.target.value;Kt(t)},onClearIndicatorClick:function(){return Kt("")},value:et}}),(0,r.jsx)(j.Z,{disableItem:function(e){return e===et},hideItem:function(e){return!Pt.includes(e)},id:"ps-driver-image",label:"Driver ISO",messageBoxProps:lt,selectItems:W,selectProps:{onChange:function(e){var t=e.target.value;Xt(t)},onClearIndicatorClick:function(){return Xt("")},value:at}}),(0,r.jsx)(j.Z,{disableItem:function(e){return!St.includes(e)},id:"ps-anvil",inputLabelProps:{isNotifyRequired:0===ct.length},label:"Anvil node pair",messageBoxProps:ft,selectItems:F,selectProps:{onChange:function(e){var t=e.target.value;en(t)},onClearIndicatorClick:function(){return en("")},renderValue:function(e){var t,n=(null!==(t=I[e])&&void 0!==t?t:{}).anvilName;return void 0===n?"Unknown ".concat(e):n},value:ct}}),(0,r.jsx)(f.Z,{id:"ps-optimize-for-os",extendRenderInput:function(e){var t=e.inputLabelProps;(void 0===t?{}:t).isNotifyRequired=null===xt},isOptionEqualToValue:function(e,t){return e.key===t.key},label:"Optimize for OS",messageBoxProps:bt,noOptionsText:"No matching OS",onChange:function(e,t){gt(t)},openOnFocus:!0,options:_,renderOption:function(e,t){return(0,o.createElement)("li",ne({},e,{key:"ps-optimize-for-os-".concat(t.key),children:[t.label," (",t.key,")"]}))},value:xt})]}):(0,r.jsx)($.Z,{}),(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",marginTop:"1em","& > :not(:first-child)":{marginTop:"1em"}},children:[Lt>0&&(0,r.jsx)(h.Z,{isAllowClose:!0,text:"Provision server job registered. You can provision another server, or exit; it won't affect the registered job."}),Tt?(0,r.jsx)($.Z,{mt:0}):(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"100%"},children:(0,r.jsx)(m.Z,{disabled:!$t({isIgnoreOnCallbacks:!0}),onClick:function(){Bt(!0)},sx:me,children:"Provision"})})]})]}),Gt&&(0,r.jsx)(v.Z,{actionProceedText:"Provision",content:(0,r.jsxs)(s.ZP,{container:!0,columns:8,direction:"column",children:[(0,r.jsx)(s.ZP,{direction:"row",item:!0,xs:8,children:(0,r.jsxs)(B.Ac,{children:["Server ",(0,r.jsx)(B.Q0,{text:te})," will be created on anvil node pair"," ",(0,r.jsx)(B.Q0,{text:I[ct].anvilName})," ","with the following properties:"]})}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"CPU"})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:Ie})," core(s)"]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:we})," core(s) available"]})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Memory"})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsx)(B.Q0,{text:"".concat(_e," ").concat(He)})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(We," ").concat(He)})," ","available"]})})]}),Ye.stateIds.map((function(e,t){var n=Ye.inputMaxes[t],o=Ye.inputSizes[t],i=Ye.inputUnits[t],a=z[Ye.inputStorageGroupUUIDs[t]].storageGroupName;return(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsxs)(B.Ac,{children:["Virtual disk ",(0,r.jsx)(B.Q0,{text:t})]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(o," ").concat(i)})," on"," ",a]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(n," ").concat(i)})," ","available"]})})]},"ps-virtual-disk-".concat(e,"-summary"))})),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Install ISO"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Q0,{text:w[et].fileName})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Driver ISO"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:w[at]?(0,r.jsx)(B.Q0,{text:w[at].fileName}):(0,r.jsx)(B.Ac,{text:"none"})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Optimize for OS"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Ac,{text:"".concat(null===xt||void 0===xt?void 0:xt.label)})})]})]}),dialogProps:{open:Gt},onCancelAppend:function(){Bt(!1)},onProceedAppend:function(){var e={serverName:te,cpuCores:Ie,memory:ke.toString(),virtualDisks:Ye.stateIds.map((function(e,t){return{storageSize:Ye.sizes[t].toString(),storageGroupUUID:Ye.inputStorageGroupUUIDs[t]}})),installISOFileUUID:et,driverISOFileUUID:at,anvilUUID:ct,optimizeForOS:null===xt||void 0===xt?void 0:xt.key};Nt(!0),d.Z.post("/server",e).then((function(){Nt(!1),Et(Lt+1)})),Bt(!1)},proceedButtonProps:{sx:me},titleText:"Provision ".concat(te,"?")})]})}},1081:function(e,t,n){var r=n(7294);t.Z=function(){var e=(0,r.useRef)(!0);return e.current?(e.current=!1,!0):e.current}},5737:function(e,t,n){n.d(t,{Bh:function(){return o},KY:function(){return i},MU:function(){return a}});var r=n(4490),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fromUnit,o=t.onFailure,i=t.onSuccess,a=t.precision,s=t.toUnit,l=(0,r.gO)(e,{fromUnit:n,precision:a,toUnit:s});if(l){var u=l.value,c=l.unit;try{var p,d,f;null===i||void 0===i||null===(p=i.bigint)||void 0===p||p.call(null,BigInt(u),c),null===i||void 0===i||null===(d=i.number)||void 0===d||d.call(null,parseFloat(u),c),null===i||void 0===i||null===(f=i.string)||void 0===f||f.call(null,u,c)}catch(v){null===o||void 0===o||o.call(null,v,u,c)}}else null===o||void 0===o||o.call(null)},i=function(e,t,n,r){o(e,{fromUnit:t,onFailure:r,onSuccess:{bigint:n},precision:0,toUnit:"B"})},a=function(e){return(0,r._d)(e,{toUnit:"ibyte"})}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/906-86856e16ad160b72.js b/striker-ui/out/_next/static/chunks/906-86856e16ad160b72.js deleted file mode 100644 index b80fb496..00000000 --- a/striker-ui/out/_next/static/chunks/906-86856e16ad160b72.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[906],{7906:function(e,n,t){t.d(n,{S:function(){return G},M:function(){return Y}});var r=t(4051),o=t.n(r),s=t(5893),c=t(5537),a=t(791),i=t(1496),l=t(7357),u=t(4799),d=t(8333),f=t(9309),h=t(5861),v=t(7294),x=t(5152),p=t(2029),m=t(7169),y=t(4825),w=t(7750),b="0xffe3",g="0xffe9",j=[{keys:"Ctrl + Alt + Delete",scans:[]},{keys:"Ctrl + Alt + F1",scans:[b,g,"0xffbe"]},{keys:"Ctrl + Alt + F2",scans:[b,g,"0xffbf"]},{keys:"Ctrl + Alt + F3",scans:[b,g,"0xffc0"]},{keys:"Ctrl + Alt + F4",scans:[b,g,"0xffc1"]},{keys:"Ctrl + Alt + F5",scans:[b,g,"0xffc2"]},{keys:"Ctrl + Alt + F6",scans:[b,g,"0xffc3"]},{keys:"Ctrl + Alt + F7",scans:[b,g,"0xffc4"]},{keys:"Ctrl + Alt + F8",scans:[b,g,"0xffc5"]},{keys:"Ctrl + Alt + F9",scans:[b,g,"0xffc6"]}],k=t(3679),C=t(8336);function B(e,n,t,r,o,s,c){try{var a=e[s](c),i=a.value}catch(l){return void t(l)}a.done?n(i):Promise.resolve(i).then(r,o)}var Z=function(){var e,n=(e=o().mark((function e(n,t,r){var s,c,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=new AbortController,c=setTimeout((function(){return s.abort()}),r),e.next=4,fetch(n,{method:"PUT",headers:{"Content-Type":"application/json","Keep-Alive":"timeout=120"},signal:s.signal,body:JSON.stringify(t)});case 4:return a=e.sent,clearTimeout(c),e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)})),function(){var n=this,t=arguments;return new Promise((function(r,o){var s=e.apply(n,t);function c(e){B(s,r,o,c,a,"next",e)}function a(e){B(s,r,o,c,a,"throw",e)}c(void 0)}))});return function(e,t,r){return n.apply(this,arguments)}}(),P=Z,A=t(2152),S=t(2749);function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0;t-=1)b.current.sendKey(e[t],0)}else b.current.sendCtrlAltDel();p(null)}}(t)},className:z.keysItem,children:(0,s.jsx)(h.Z,{variant:"subtitle1",children:n})},n)}))})]})]})]}):(0,s.jsx)(l.Z,{display:"flex",className:z.spinnerBox,children:L?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.Z,{style:{paddingBottom:"2em"},children:(0,s.jsx)(w.z,{text:"There was a problem connecting to the server, please try again"})}),(0,s.jsx)(y.Z,{onClick:function(){G(!1)},children:"Reconnect"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.z,{text:"Establishing connection with ".concat(r)}),(0,s.jsx)(w.z,{text:"This may take a few minutes"}),(0,s.jsx)(A.Z,{})]})})]})})};L.defaultProps={onClickCloseButton:void 0};var G=L,V=t(9628),K=t(2787),q=t(4690),H=t(1706);function J(e,n,t,r,o,s,c){try{var a=e[s](c),i=a.value}catch(l){return void t(l)}a.done?n(i):Promise.resolve(i).then(r,o)}var $={externalPreview:"",headerEndAdornment:null,isExternalPreviewStale:!1,isFetchPreview:!0,isShowControls:!0,isUseInnerPanel:!1,onClickConnectButton:void 0,onClickPreview:void 0,serverName:""},Q=function(e){var n=e.children;return e.isUseInnerPanel?(0,s.jsx)(k.Lg,{children:n}):(0,s.jsx)(k.s_,{children:n})},W=function(e){var n=e.children,t=e.isUseInnerPanel,r=e.text;return t?(0,s.jsxs)(k.CH,{children:[r?(0,s.jsx)(w.Ac,{text:r}):(0,s.jsx)(s.Fragment,{}),n]}):(0,s.jsxs)(k.V9,{children:[r?(0,s.jsx)(w.z,{text:r}):(0,s.jsx)(s.Fragment,{}),n]})},X=function(e){var n=e.externalPreview,t=void 0===n?$.externalPreview:n,r=e.headerEndAdornment,c=e.isExternalPreviewStale,a=void 0===c?$.isExternalPreviewStale:c,i=e.isFetchPreview,d=void 0===i?$.isFetchPreview:i,f=e.isShowControls,h=void 0===f?$.isShowControls:f,x=e.isUseInnerPanel,y=void 0===x?$.isUseInnerPanel:x,w=e.onClickPreview,b=e.serverName,g=e.serverUUID,j=e.onClickConnectButton,k=void 0===j?w:j,C=(0,v.useState)(!0),B=C[0],Z=C[1],P=(0,v.useState)(!1),S=P[0],I=P[1],F=(0,v.useState)(""),E=F[0],U=F[1],N=(0,v.useMemo)((function(){return E?(0,s.jsx)(l.Z,{alt:"",component:"img",src:"data:image/png;base64,".concat(E),sx:{height:"100%",opacity:S?"0.4":"1",padding:y?".2em":0,width:"100%"}}):(0,s.jsx)(V.Z,{sx:{height:"100%",width:"100%"}})}),[S,y,E]);return(0,v.useEffect)((function(){var e;d?(e=o().mark((function e(){var n,t,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat(p.Z,"/server/").concat(g,"?ss"),{method:"GET",headers:{"Content-Type":"application/json"}});case 3:return n=e.sent,e.next=6,n.json();case 6:t=e.sent,r=t.screenshot,U(r),I(!1),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),I(!0);case 15:return e.prev=15,Z(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[0,12,15,18]])})),function(){var n=this,t=arguments;return new Promise((function(r,o){var s=e.apply(n,t);function c(e){J(s,r,o,c,a,"next",e)}function a(e){J(s,r,o,c,a,"throw",e)}c(void 0)}))})():t&&(U(t),I(a),Z(!1))}),[t,a,d,g]),(0,s.jsxs)(Q,{isUseInnerPanel:y,children:[(0,s.jsx)(W,{isUseInnerPanel:y,text:b,children:r}),(0,s.jsxs)(q.Z,{row:!0,sx:{"& > :first-child":{flexGrow:1}},children:[(0,s.jsx)(l.Z,{children:B?(0,s.jsx)(A.Z,{mt:"1em",mb:"1em"}):(0,s.jsx)(u.Z,{component:"span",onClick:w,sx:{borderRadius:m.n_,color:m.s7,padding:0},children:N})}),h&&(0,s.jsx)(q.Z,{children:(0,s.jsx)(H.Z,{onClick:k,children:(0,s.jsx)(K.Z,{})})})]})]})};X.defaultProps=$;var Y=X}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/94-72a91d19236239d0.js b/striker-ui/out/_next/static/chunks/94-72a91d19236239d0.js new file mode 100644 index 00000000..a6e14ec2 --- /dev/null +++ b/striker-ui/out/_next/static/chunks/94-72a91d19236239d0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[94],{5094:function(e,n,t){t.d(n,{S:function(){return Z},M:function(){return O}});var r=t(5893),s=t(791),c=t(5537),i=t(1496),o=t(7357),l=t(8333),a=t(5861),u=t(5152),f=t(7294),d=t(1706),x="0xffe3",h="0xffe9",v=[{keys:"Ctrl + Alt + Delete",scans:[]},{keys:"Ctrl + Alt + F1",scans:[x,h,"0xffbe"]},{keys:"Ctrl + Alt + F2",scans:[x,h,"0xffbf"]},{keys:"Ctrl + Alt + F3",scans:[x,h,"0xffc0"]},{keys:"Ctrl + Alt + F4",scans:[x,h,"0xffc1"]},{keys:"Ctrl + Alt + F5",scans:[x,h,"0xffc2"]},{keys:"Ctrl + Alt + F6",scans:[x,h,"0xffc3"]},{keys:"Ctrl + Alt + F7",scans:[x,h,"0xffc4"]},{keys:"Ctrl + Alt + F8",scans:[x,h,"0xffc5"]},{keys:"Ctrl + Alt + F9",scans:[x,h,"0xffc6"]}],m=t(4427),p=t(3679),j=t(2152),C=t(7750),y=t(1081);function w(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0;t-=1)R.current.sendKey(e[t],0)}else R.current.sendCtrlAltDel();g(null)}}(t)},children:(0,r.jsx)(a.Z,{variant:"subtitle1",children:n})},n)}))})]})}),[b]),W=(0,f.useMemo)((function(){return(0,r.jsx)(d.Z,{onClick:function(){for(var e=arguments.length,t=new Array(e),r=0;r :first-child":{flexGrow:1}},children:[(0,r.jsx)(o.Z,{children:k?(0,r.jsx)(j.Z,{mt:"1em",mb:"1em"}):(0,r.jsx)(U.Z,{component:"span",onClick:m,sx:{borderRadius:N.n_,color:N.s7,padding:0},children:O})}),x&&(0,r.jsx)(_.Z,{children:(0,r.jsx)(d.Z,{onClick:w,children:(0,r.jsx)(B.Z,{})})})]})]})};G.defaultProps=D;var O=G}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/anvil-c1177b17efcafc34.js b/striker-ui/out/_next/static/chunks/pages/anvil-c1177b17efcafc34.js new file mode 100644 index 00000000..d0fbcdeb --- /dev/null +++ b/striker-ui/out/_next/static/chunks/pages/anvil-c1177b17efcafc34.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[817],{2852:function(e,t,n){"use strict";var r=n(3366),o=n(7462),i=n(7294),a=n(6010),c=n(7192),s=n(1796),l=n(8216),d=n(1964),u=n(3616),h=n(1496),f=n(9632),x=n(5893);const m=["className","color","edge","size","sx"],v=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,l.Z)(n.edge)}`],t[`size${(0,l.Z)(n.size)}`]]}})((({ownerState:e})=>(0,o.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===e.edge&&{marginLeft:-8},"end"===e.edge&&{marginRight:-8},"small"===e.size&&{width:40,height:24,padding:7,[`& .${f.Z.thumb}`]:{width:16,height:16},[`& .${f.Z.switchBase}`]:{padding:4,[`&.${f.Z.checked}`]:{transform:"translateX(16px)"}}}))),p=(0,h.ZP)(d.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${f.Z.input}`]:t.input},"default"!==n.color&&t[`color${(0,l.Z)(n.color)}`]]}})((({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${f.Z.checked}`]:{transform:"translateX(20px)"},[`&.${f.Z.disabled}`]:{color:"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]},[`&.${f.Z.checked} + .${f.Z.track}`]:{opacity:.5},[`&.${f.Z.disabled} + .${f.Z.track}`]:{opacity:"light"===e.palette.mode?.12:.2},[`& .${f.Z.input}`]:{left:"-100%",width:"300%"}})),(({theme:e,ownerState:t})=>(0,o.Z)({"&:hover":{backgroundColor:(0,s.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${f.Z.checked}`]:{color:e.palette[t.color].main,"&:hover":{backgroundColor:(0,s.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${f.Z.disabled}`]:{color:"light"===e.palette.mode?(0,s.$n)(e.palette[t.color].main,.62):(0,s._j)(e.palette[t.color].main,.55)}},[`&.${f.Z.checked} + .${f.Z.track}`]:{backgroundColor:e.palette[t.color].main}}))),g=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.mode?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.mode?.38:.3}))),j=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e})=>({boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),b=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiSwitch"}),{className:i,color:s="primary",edge:d=!1,size:h="medium",sx:b}=n,Z=(0,r.Z)(n,m),w=(0,o.Z)({},n,{color:s,edge:d,size:h}),y=(e=>{const{classes:t,edge:n,size:r,color:i,checked:a,disabled:s}=e,d={root:["root",n&&`edge${(0,l.Z)(n)}`,`size${(0,l.Z)(r)}`],switchBase:["switchBase",`color${(0,l.Z)(i)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=(0,c.Z)(d,f.H,t);return(0,o.Z)({},t,u)})(w),k=(0,x.jsx)(j,{className:y.thumb,ownerState:w});return(0,x.jsxs)(v,{className:(0,a.Z)(y.root,i),sx:b,ownerState:w,children:[(0,x.jsx)(p,(0,o.Z)({type:"checkbox",icon:k,checkedIcon:k,ref:t,ownerState:w},Z,{classes:(0,o.Z)({},y,{root:y.switchBase})})),(0,x.jsx)(g,{className:y.track,ownerState:w})]})}));t.Z=b},6069:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/anvil",function(){return n(6478)}])},1939:function(e,t,n){"use strict";var r=n(5893),o=n(7357),i=n(7169);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l="Decorator",d={ok:"".concat(l,"-ok"),warning:"".concat(l,"-warning"),error:"".concat(l,"-error"),off:"".concat(l,"-off")};t.Z=function(e){var t,n=e.colour,l=e.sx,u=s(e,["colour","sx"]);return(0,r.jsx)(o.Z,c({},u,{className:d[n],sx:c((t={borderRadius:i.n_,height:"100%",width:"1.4em"},a(t,"&.".concat(d.ok),{backgroundColor:i.Ej}),a(t,"&.".concat(d.warning),{backgroundColor:i.Wd}),a(t,"&.".concat(d.error),{backgroundColor:i.hM}),a(t,"&.".concat(d.off),{backgroundColor:i.s7}),t),l)}))}},6632:function(e,t,n){"use strict";var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.actionProceedText,n=void 0===t?"":t,o=e.content,c=void 0===o?"":o,s=e.titleText,l=void 0===s?"":s,d=a(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:n,content:c,titleText:l},d))}},6478:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return tt}});var r=n(5893),o=n(1496),i=n(7357),a=n(9008),c=n(1163),s=n(7294),l=n(2029),d=n(7169),u={uuid:"",setAnvilUuid:function(){return null}},h=(0,s.createContext)(u),f=function(e){var t=e.children,n=(0,s.useState)(""),o=n[0],i=n[1];return(0,r.jsx)(h.Provider,{value:{uuid:o,setAnvilUuid:function(e){i(e)}},children:t})},x=n(3679),m=n(1905),v=n(2852),p=new Map([["optimal","Optimal"],["not_ready","Not Ready"],["degraded","Degraded"]]),g=n(1939),j=function(e,t){return fetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},b=n(7750);function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w={anvilName:"".concat("SelectedAnvil","-anvilName")},y=(0,o.ZP)(i.Z)((function(){return Z({display:"flex",flexDirection:"row",width:"100%"},"& .".concat(w.anvilName),{paddingLeft:0})})),k=function(e){switch(e){case"optimal":return"ok";case"not_ready":return"warning";default:return"error"}},_=function(e){return!(-1===e.hosts.findIndex((function(e){return"offline"!==e.state})))},S=function(e){var t=e.list,n=(0,s.useContext)(h).uuid,o=t.findIndex((function(e){return e.anvil_uuid===n}));return(0,r.jsx)(y,Z({},"children",""!==n&&(0,r.jsxs)(r.Fragment,Z({},"children",[(0,r.jsx)(i.Z,{p:1,children:(0,r.jsx)(g.Z,{colour:k(t[o].anvil_state)})}),(0,r.jsxs)(i.Z,{p:1,flexGrow:1,className:w.anvilName,children:[(0,r.jsx)(b.z,{text:t[o].anvil_name}),(0,r.jsx)(b.z,{text:p.get(t[o].anvil_state)||"State unavailable"})]}),(0,r.jsx)(i.Z,Z({p:1},"children",(0,r.jsx)(v.Z,Z({checked:_(t[o])},"onChange",(function(){var e=t[o],n=e.anvil_uuid;j("".concat(l.Z,"/command/").concat(_(e)?"stop-an":"start-an","/").concat(n),{})})))))]))))},O=n(8462),P=n(7720),A=n(7212),N=function(e){var t=e.anvil;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Ac,{text:t.anvil_name}),(0,r.jsx)(b.Ac,{text:p.get(t.anvil_state)||"State unavailable"})]})};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.hosts[1].link.link_speed?1:0;e.bond_speed=e.hosts[t].link.link_speed,e.bond_state=e.hosts[t].link.link_state})),n},ae=n(2749);function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nd.li?(0,r.jsxs)(i.Z,{className:Ye.container,children:[(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(z,{list:g}),(0,r.jsx)(ne,{anvil:g.anvils})]}),(0,r.jsx)(i.Z,{className:Ye.server,children:(0,r.jsx)(Re,{anvil:g.anvils})}),(0,r.jsx)(i.Z,{className:Ye.child,children:(0,r.jsx)(Xe,{})}),(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(xe,{}),(0,r.jsx)(G,{}),(0,r.jsx)(oe,{})]})]}):(0,r.jsxs)(i.Z,{className:Ye.container,children:[(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(Re,{anvil:g.anvils}),(0,r.jsx)(z,{list:g}),(0,r.jsx)(ne,{anvil:g.anvils})]}),(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(xe,{}),(0,r.jsx)(Xe,{}),(0,r.jsx)(G,{}),(0,r.jsx)(oe,{})]})]})),e}),[g,t]),Z=(0,s.useMemo)((function(){return j?(0,r.jsx)(x.s_,{sx:{marginLeft:{xs:"1em",sm:"auto"},marginRight:{xs:"1em",sm:"auto"},marginTop:"calc(50vh - 10em)",maxWidth:{xs:void 0,sm:"60%",md:"50%",lg:"40%"},minWidth:"fit-content"},children:(0,r.jsx)(F.Z,{sx:{margin:"2em 2.4em"}})}):b}),[b,j]);return(0,s.useEffect)((function(){""===u&&v((null===n||void 0===n?void 0:n.toString())||"")}),[u,n,v]),(0,r.jsxs)(et,{children:[(0,r.jsx)(a.default,{children:(0,r.jsx)("title",{children:"Anvil"})}),(0,r.jsxs)(f,{children:[(0,r.jsx)(H.Z,{}),Z]})]})}}},function(e){e.O(0,[382,483,894,182,614,485,62,780,899,140,825,774,888,179],(function(){return t=6069,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/anvil-fbef5033b416c0dd.js b/striker-ui/out/_next/static/chunks/pages/anvil-fbef5033b416c0dd.js deleted file mode 100644 index afa736ee..00000000 --- a/striker-ui/out/_next/static/chunks/pages/anvil-fbef5033b416c0dd.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[817],{2852:function(e,t,n){"use strict";var r=n(3366),o=n(7462),i=n(7294),a=n(6010),c=n(7192),s=n(1796),l=n(8216),d=n(1964),u=n(3616),h=n(1496),f=n(9632),x=n(5893);const m=["className","color","edge","size","sx"],v=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,l.Z)(n.edge)}`],t[`size${(0,l.Z)(n.size)}`]]}})((({ownerState:e})=>(0,o.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===e.edge&&{marginLeft:-8},"end"===e.edge&&{marginRight:-8},"small"===e.size&&{width:40,height:24,padding:7,[`& .${f.Z.thumb}`]:{width:16,height:16},[`& .${f.Z.switchBase}`]:{padding:4,[`&.${f.Z.checked}`]:{transform:"translateX(16px)"}}}))),p=(0,h.ZP)(d.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${f.Z.input}`]:t.input},"default"!==n.color&&t[`color${(0,l.Z)(n.color)}`]]}})((({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${f.Z.checked}`]:{transform:"translateX(20px)"},[`&.${f.Z.disabled}`]:{color:"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]},[`&.${f.Z.checked} + .${f.Z.track}`]:{opacity:.5},[`&.${f.Z.disabled} + .${f.Z.track}`]:{opacity:"light"===e.palette.mode?.12:.2},[`& .${f.Z.input}`]:{left:"-100%",width:"300%"}})),(({theme:e,ownerState:t})=>(0,o.Z)({"&:hover":{backgroundColor:(0,s.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${f.Z.checked}`]:{color:e.palette[t.color].main,"&:hover":{backgroundColor:(0,s.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${f.Z.disabled}`]:{color:"light"===e.palette.mode?(0,s.$n)(e.palette[t.color].main,.62):(0,s._j)(e.palette[t.color].main,.55)}},[`&.${f.Z.checked} + .${f.Z.track}`]:{backgroundColor:e.palette[t.color].main}}))),g=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.mode?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.mode?.38:.3}))),j=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e})=>({boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),b=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiSwitch"}),{className:i,color:s="primary",edge:d=!1,size:h="medium",sx:b}=n,Z=(0,r.Z)(n,m),w=(0,o.Z)({},n,{color:s,edge:d,size:h}),y=(e=>{const{classes:t,edge:n,size:r,color:i,checked:a,disabled:s}=e,d={root:["root",n&&`edge${(0,l.Z)(n)}`,`size${(0,l.Z)(r)}`],switchBase:["switchBase",`color${(0,l.Z)(i)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=(0,c.Z)(d,f.H,t);return(0,o.Z)({},t,u)})(w),k=(0,x.jsx)(j,{className:y.thumb,ownerState:w});return(0,x.jsxs)(v,{className:(0,a.Z)(y.root,i),sx:b,ownerState:w,children:[(0,x.jsx)(p,(0,o.Z)({type:"checkbox",icon:k,checkedIcon:k,ref:t,ownerState:w},Z,{classes:(0,o.Z)({},y,{root:y.switchBase})})),(0,x.jsx)(g,{className:y.track,ownerState:w})]})}));t.Z=b},6069:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/anvil",function(){return n(1692)}])},1939:function(e,t,n){"use strict";var r=n(5893),o=n(7357),i=n(7169);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l="Decorator",d={ok:"".concat(l,"-ok"),warning:"".concat(l,"-warning"),error:"".concat(l,"-error"),off:"".concat(l,"-off")};t.Z=function(e){var t,n=e.colour,l=e.sx,u=s(e,["colour","sx"]);return(0,r.jsx)(o.Z,c({},u,{className:d[n],sx:c((t={borderRadius:i.n_,height:"100%",width:"1.4em"},a(t,"&.".concat(d.ok),{backgroundColor:i.Ej}),a(t,"&.".concat(d.warning),{backgroundColor:i.Wd}),a(t,"&.".concat(d.error),{backgroundColor:i.hM}),a(t,"&.".concat(d.off),{backgroundColor:i.s7}),t),l)}))}},6632:function(e,t,n){"use strict";var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.actionProceedText,n=void 0===t?"":t,o=e.content,c=void 0===o?"":o,s=e.titleText,l=void 0===s?"":s,d=a(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:n,content:c,titleText:l},d))}},1692:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return tt}});var r=n(5893),o=n(1496),i=n(7357),a=n(9008),c=n(1163),s=n(7294),l=n(2029),d=n(7169),u={uuid:"",setAnvilUuid:function(){return null}},h=(0,s.createContext)(u),f=function(e){var t=e.children,n=(0,s.useState)(""),o=n[0],i=n[1];return(0,r.jsx)(h.Provider,{value:{uuid:o,setAnvilUuid:function(e){i(e)}},children:t})},x=n(3679),m=n(1905),v=n(2852),p=new Map([["optimal","Optimal"],["not_ready","Not Ready"],["degraded","Degraded"]]),g=n(1939),j=n(8336),b=n(7750);function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w={anvilName:"".concat("SelectedAnvil","-anvilName")},y=(0,o.ZP)(i.Z)((function(){return Z({display:"flex",flexDirection:"row",width:"100%"},"& .".concat(w.anvilName),{paddingLeft:0})})),k=function(e){switch(e){case"optimal":return"ok";case"not_ready":return"warning";default:return"error"}},_=function(e){return!(-1===e.hosts.findIndex((function(e){return"offline"!==e.state})))},S=function(e){var t=e.list,n=(0,s.useContext)(h).uuid,o=t.findIndex((function(e){return e.anvil_uuid===n}));return(0,r.jsx)(y,Z({},"children",""!==n&&(0,r.jsxs)(r.Fragment,Z({},"children",[(0,r.jsx)(i.Z,{p:1,children:(0,r.jsx)(g.Z,{colour:k(t[o].anvil_state)})}),(0,r.jsxs)(i.Z,{p:1,flexGrow:1,className:w.anvilName,children:[(0,r.jsx)(b.z,{text:t[o].anvil_name}),(0,r.jsx)(b.z,{text:p.get(t[o].anvil_state)||"State unavailable"})]}),(0,r.jsx)(i.Z,Z({p:1},"children",(0,r.jsx)(v.Z,Z({checked:_(t[o])},"onChange",(function(){var e=t[o],n=e.anvil_uuid;(0,j.Z)("".concat(l.Z,"/command/").concat(_(e)?"stop-an":"start-an","/").concat(n),{})})))))]))))},O=n(8462),P=n(7720),A=n(7212),N=function(e){var t=e.anvil;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Ac,{text:t.anvil_name}),(0,r.jsx)(b.Ac,{text:p.get(t.anvil_state)||"State unavailable"})]})};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.hosts[1].link.link_speed?1:0;e.bond_speed=e.hosts[t].link.link_speed,e.bond_state=e.hosts[t].link.link_state})),n},ae=n(2749);function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nd.li?(0,r.jsxs)(i.Z,{className:Ye.container,children:[(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(z,{list:g}),(0,r.jsx)(ne,{anvil:g.anvils})]}),(0,r.jsx)(i.Z,{className:Ye.server,children:(0,r.jsx)(Re,{anvil:g.anvils})}),(0,r.jsx)(i.Z,{className:Ye.child,children:(0,r.jsx)(Xe,{})}),(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(xe,{}),(0,r.jsx)(G,{}),(0,r.jsx)(oe,{})]})]}):(0,r.jsxs)(i.Z,{className:Ye.container,children:[(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(Re,{anvil:g.anvils}),(0,r.jsx)(z,{list:g}),(0,r.jsx)(ne,{anvil:g.anvils})]}),(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(xe,{}),(0,r.jsx)(Xe,{}),(0,r.jsx)(G,{}),(0,r.jsx)(oe,{})]})]})),e}),[g,t]),Z=(0,s.useMemo)((function(){return j?(0,r.jsx)(x.s_,{sx:{marginLeft:{xs:"1em",sm:"auto"},marginRight:{xs:"1em",sm:"auto"},marginTop:"calc(50vh - 10em)",maxWidth:{xs:void 0,sm:"60%",md:"50%",lg:"40%"},minWidth:"fit-content"},children:(0,r.jsx)(F.Z,{sx:{margin:"2em 2.4em"}})}):b}),[b,j]);return(0,s.useEffect)((function(){""===u&&v((null===n||void 0===n?void 0:n.toString())||"")}),[u,n,v]),(0,r.jsxs)(et,{children:[(0,r.jsx)(a.default,{children:(0,r.jsx)("title",{children:"Anvil"})}),(0,r.jsxs)(f,{children:[(0,r.jsx)(H.Z,{}),Z]})]})}}},function(e){e.O(0,[382,483,894,182,614,485,746,203,899,140,116,774,888,179],(function(){return t=6069,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/config-0381f0311f2b572a.js b/striker-ui/out/_next/static/chunks/pages/config-0ecdb2b2b3f8c089.js similarity index 99% rename from striker-ui/out/_next/static/chunks/pages/config-0381f0311f2b572a.js rename to striker-ui/out/_next/static/chunks/pages/config-0ecdb2b2b3f8c089.js index a507b78c..f1f59323 100644 --- a/striker-ui/out/_next/static/chunks/pages/config-0381f0311f2b572a.js +++ b/striker-ui/out/_next/static/chunks/pages/config-0ecdb2b2b3f8c089.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[490],{5685:function(e,n,t){"use strict";var r=t(7892),o=t(5893);n.Z=(0,r.Z)((0,o.jsx)("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15zM14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2z"}),"QuestionMark")},8262:function(e,n,t){"use strict";t.d(n,{Z:function(){return A}});var r=t(3366),o=t(7462),i=t(7294),l=t(6010),c=t(7192),a=t(7579),s=t(8216),u=t(9964),d=t(6628),f=t(5113),p=t(3616),h=t(1496),m=t(8979);function y(e){return(0,m.Z)("MuiDialog",e)}var b=(0,t(6087).Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var v=(0,i.createContext)({}),g=t(7227),x=t(2734),j=t(5893);const w=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],P=(0,h.ZP)(g.Z,{name:"MuiDialog",slot:"Backdrop",overrides:(e,n)=>n.backdrop})({zIndex:-1}),Z=(0,h.ZP)(u.Z,{name:"MuiDialog",slot:"Root",overridesResolver:(e,n)=>n.root})({"@media print":{position:"absolute !important"}}),O=(0,h.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.container,n[`scroll${(0,s.Z)(t.scroll)}`]]}})((({ownerState:e})=>(0,o.Z)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),S=(0,h.ZP)(f.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.paper,n[`scrollPaper${(0,s.Z)(t.scroll)}`],n[`paperWidth${(0,s.Z)(String(t.maxWidth))}`],t.fullWidth&&n.paperFullWidth,t.fullScreen&&n.paperFullScreen]}})((({theme:e,ownerState:n})=>(0,o.Z)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`${e.breakpoints.values.xs}${e.breakpoints.unit}`,[`&.${b.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},"xs"!==n.maxWidth&&{maxWidth:`${e.breakpoints.values[n.maxWidth]}${e.breakpoints.unit}`,[`&.${b.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[n.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${b.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})));var A=i.forwardRef((function(e,n){const t=(0,p.Z)({props:e,name:"MuiDialog"}),u=(0,x.Z)(),h={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{"aria-describedby":m,"aria-labelledby":b,BackdropComponent:g,BackdropProps:A,children:k,className:C,disableEscapeKeyDown:I=!1,fullScreen:T=!1,fullWidth:E=!1,maxWidth:M="sm",onBackdropClick:D,onClose:F,open:B,PaperComponent:W=f.Z,PaperProps:R={},scroll:U="paper",TransitionComponent:N=d.Z,transitionDuration:L=h,TransitionProps:$}=t,_=(0,r.Z)(t,w),H=(0,o.Z)({},t,{disableEscapeKeyDown:I,fullScreen:T,fullWidth:E,maxWidth:M,scroll:U}),V=(e=>{const{classes:n,scroll:t,maxWidth:r,fullWidth:o,fullScreen:i}=e,l={root:["root"],container:["container",`scroll${(0,s.Z)(t)}`],paper:["paper",`paperScroll${(0,s.Z)(t)}`,`paperWidth${(0,s.Z)(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return(0,c.Z)(l,y,n)})(H),z=i.useRef(),G=(0,a.Z)(b),K=i.useMemo((()=>({titleId:G})),[G]);return(0,j.jsx)(Z,(0,o.Z)({className:(0,l.Z)(V.root,C),BackdropProps:(0,o.Z)({transitionDuration:L,as:g},A),closeAfterTransition:!0,BackdropComponent:P,disableEscapeKeyDown:I,onClose:F,open:B,ref:n,onClick:e=>{z.current&&(z.current=null,D&&D(e),F&&F(e,"backdropClick"))},ownerState:H},_,{children:(0,j.jsx)(N,(0,o.Z)({appear:!0,in:B,timeout:L,role:"presentation"},$,{children:(0,j.jsx)(O,{className:(0,l.Z)(V.container),onMouseDown:e=>{z.current=e.target===e.currentTarget},ownerState:H,children:(0,j.jsx)(S,(0,o.Z)({as:W,elevation:24,role:"dialog","aria-describedby":m,"aria-labelledby":G},R,{className:(0,l.Z)(V.paper,R.className),ownerState:H,children:(0,j.jsx)(v.Provider,{value:K,children:k})}))})}))}))}))},7579:function(e,n,t){"use strict";var r;t.d(n,{Z:function(){return c}});var o=t(7294);let i=0;const l=(r||(r=t.t(o,2))).useId;function c(e){if(void 0!==l){const n=l();return null!=e?e:n}return function(e){const[n,t]=o.useState(e),r=e||n;return o.useEffect((()=>{null==n&&(i+=1,t(`mui-${i}`))}),[n]),r}(e)}},329:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/config",function(){return t(6028)}])},157:function(e,n,t){"use strict";var r=t(5893),o=t(7357),i=t(8262),l=t(7294),c=t(7169),a=t(4825),s=t(4690),u=t(3679),d=t(2152),f=t(7750);function p(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function b(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"===typeof e)return p(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return p(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var v={blue:c.Ej,red:c.hM},g=(0,l.forwardRef)((function(e,n){var t=e.actionCancelText,p=void 0===t?"Cancel":t,h=e.actionProceedText,g=e.contentContainerProps,x=void 0===g?{}:g,j=e.closeOnProceed,w=void 0!==j&&j,P=e.content,Z=e.dialogProps,O=void 0===Z?{}:Z,S=O.open,A=void 0!==S&&S,k=O.PaperProps,C=void 0===k?{}:k,I=e.disableProceed,T=e.formContent,E=e.loading,M=void 0!==E&&E,D=e.loadingAction,F=void 0!==D&&D,B=e.onActionAppend,W=e.onCancelAppend,R=e.onProceedAppend,U=e.onSubmitAppend,N=e.openInitially,L=void 0!==N&&N,$=e.preActionArea,_=e.proceedButtonProps,H=void 0===_?{}:_,V=e.proceedColour,z=void 0===V?"blue":V,G=e.scrollContent,K=void 0!==G&&G,q=e.scrollBoxProps,X=(void 0===q?{}:q).sx,Y=e.titleText,J=y(e.dialogProps,["open","PaperProps"]),Q=y(e.scrollBoxProps,["sx"]),ee=C.sx,ne=y(C,["sx"]),te=H.disabled,re=void 0===te?I:te,oe=H.sx,ie=y(H,["disabled","sx"]),le=(0,l.useState)(L),ce=le[0],ae=le[1],se=(0,l.useMemo)((function(){return n?ce:A}),[A,ce,n]),ue=(0,l.useMemo)((function(){return v[z]}),[z]),de=(0,l.useMemo)((function(){var e,n,t,r=function(){for(var e=arguments.length,n=new Array(e),t=0;t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(e){var n=e.children,t=e.sx,a=u(e,["children","sx"]);return(0,r.jsx)(i.Z,s({underline:"hover",variant:"subtitle1"},a,{sx:s({color:l.lD,textDecorationColor:l.s7},t),children:(0,r.jsxs)(c.Z,{row:!0,children:[n,(0,r.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},3906:function(e,n,t){"use strict";var r=t(5893),o=t(7294),i=t(6607),l=t(8610);function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e){for(var n=1;n0}),[f.length]),m=(0,o.useMemo)((function(){return d.length>1}),[d.length]),y=(0,o.useCallback)((function(e){var n=e.confirmDialogProps,t=void 0===n?{}:n,o=e.formSummaryProps,i=void 0===o?{}:o,c=e.getConfirmDialogTitle,u=e.onProceedAppend,d=e.renderEntry;return a({actionProceedText:"Delete",content:(0,r.jsx)(l.Z,a({entries:s,maxDepth:0,renderEntry:d},i)),onProceedAppend:u,proceedColour:"red",titleText:c(f.length)},t)}),[s,f.length]),b=(0,o.useCallback)((function(e){return s[e]}),[s]),v=(0,o.useCallback)((function(e){return u(d.reduce((function(n,t){return e&&(n[t]=e),n}),{}))}),[d]),g=(0,o.useCallback)((function(e,n){return u((0,i.ZP)(e,n||void 0))}),[]);return{buildDeleteDialogProps:y,checklist:s,checks:f,getCheck:b,hasAllChecks:p,hasChecks:h,multipleItems:m,setAllChecks:v,setCheck:g}}},6632:function(e,n,t){"use strict";var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.actionProceedText,t=void 0===n?"":n,o=e.content,c=void 0===o?"":o,a=e.titleText,s=void 0===a?"":a,u=l(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:t,content:c,titleText:s},u))}},3106:function(e,n){"use strict";n.Z={bcn:"Back-Channel Network",ifn:"Internet-Facing Network",mn:"Migration Network",sn:"Storage Network"}},6028:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Je}});var r=t(5893),o=t(6886),i=t(9008),l=t(7294),c=t(2029),a=t(157),s=t(5521),u=t(1905),d=t(3106),f=t(4188),p=t(4390);function h(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t3&&void 0!==arguments[3]?arguments[3]:e,o=function(t){var r;null===(r=n.current.setMessage)||void 0===r||r.call(null,e,t)};return t&&(t[r]=o),o},b=function(e,n){var t,r,o={};return t=e,o=(null!=(r=Array)&&"undefined"!==typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](t):t instanceof r)?e.reduce((function(e,t){return y(t,n,e),e}),o):Object.entries(e).reduce((function(e,t){var r=m(t,2),o=r[0],i=r[1];return y(i,n,e,o),e}),o)},v=t(4894),g=t(6607),x=t(480),j=t(2349),w=t(7750);function P(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Z(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&(g({actionProceedText:"Delete",content:"The peer relationship between this striker and the selected ".concat(t," host(s) will terminate. The removed peer(s) can be re-added later."),onProceedAppend:function(){p.Z.delete("/host/connection",{data:n}).catch((function(e){var n=(0,k.Z)(e);n.children="Failed to delete peer connection(s). ".concat(n.children),y(n)}))},proceedColour:"red",titleText:"Delete ".concat(t," peer(s) from this striker?")}),null===(e=f.current.setOpen)||void 0===e||e.call(null,!0))},onEdit:function(){A((function(e){return!e}))},onItemCheckboxChange:function(e,n,t){I[e].isChecked=t,T((function(e){return oe({},e)}))},renderListItem:function(e,n){var t=n.isPingTest,o=void 0!==t&&t;return(0,r.jsx)(S.Z,{row:!0,spacing:0,children:(0,r.jsxs)(S.Z,{spacing:0,children:[(0,r.jsx)(w.$_,{children:e}),(0,r.jsx)(ne,{label:"Ping",state:o})]})})}})}),E]})}),(0,r.jsx)(V,{ref:s}),(0,r.jsx)(a.Z,oe({closeOnProceed:!0},v,{ref:f}))]})},ce=t(582),ae=t(5741),se=t(3906);function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1}),[y]),M=(0,u.Z)("".concat(c.Z,"/ssh-key/conflict"),{onError:function(e){h({children:"Failed to fetch SSH key conflicts. Error: ".concat(e),type:"error"})},onSuccess:function(e){b((function(n){return Object.values(e).reduce((function(e,t){return Object.values(t).forEach((function(t){var r=t.hostName,o=t.hostUUID,i=t.ipAddress,l=t.stateUUID;e[l]=fe({},n[l],{hostName:r,hostUUID:o,ipAddress:i})})),e}),{})}))},refreshInterval:i}).isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(K.TZ,{header:"Manage changed SSH keys",loading:M,children:[(0,r.jsxs)(S.Z,{spacing:".2em",children:[(0,r.jsx)(w.Ac,{children:"The identity of the following targets have unexpectedly changed."}),(0,r.jsxs)(G.Z,{type:"warning",isAllowClose:!0,children:["If you haven't rebuilt the listed targets, then you could be experiencing a"," ",(0,r.jsx)(ae.Z,{href:t,sx:{display:"inline-flex"},target:"_blank",children:'"Man In The Middle"'})," ","attack. Please verify the targets have changed for a known reason before proceeding to remove the broken keys."]}),(0,r.jsx)(z.Z,{header:(0,r.jsxs)(S.Z,{row:!0,spacing:".3em",sx:{width:"100%","& > :not(:last-child)":{display:{xs:"none",sm:"flex"}},"& > :last-child":{display:{xs:"initial",sm:"none"},marginLeft:0}},children:[(0,r.jsxs)(S.Z,{row:!0,spacing:".3em",sx:{flexBasis:"calc(50% + 1em)"},children:[(0,r.jsx)(w.Ac,{children:"Host name"}),(0,r.jsx)(ce.Z,{sx:{flexGrow:1}})]}),(0,r.jsxs)(S.Z,{row:!0,spacing:".3em",sx:{flexGrow:1},children:[(0,r.jsx)(w.Ac,{children:"IP address"}),(0,r.jsx)(ce.Z,{sx:{flexGrow:1}})]}),(0,r.jsx)(ce.Z,{sx:{flexGrow:1}})]}),allowCheckAll:E,allowCheckItem:!0,allowDelete:!0,allowEdit:!1,disableDelete:!A,edit:!0,getListCheckboxProps:function(){return{checked:O}},listEmpty:(0,r.jsx)(w.Ac,{align:"center",children:"No conflicting keys found."}),listItems:y,onAllCheckboxChange:function(e,n){C(n)},onDelete:function(){var e,n=P.reduce((function(e,n){if(!Z(n))return e;var t=y[n].hostUUID;return e[t]||(e[t]=[]),e[t].push(n),e}),{});x({actionProceedText:"Delete",content:"Resolve ".concat(P.length," SSH key conflicts. Please make sure the identity change(s) are expected to avoid MITM attacks."),onProceedAppend:function(){p.Z.delete("/ssh-key/conflict",{data:n}).catch((function(e){var n=(0,k.Z)(e);n.children="Failed to delete selected SSH key conflicts. ".concat(n.children),h(n)}))},proceedColour:"red",titleText:"Delete ".concat(P.length," conflicting SSH keys?")}),null===(e=s.current.setOpen)||void 0===e||e.call(null,!0)},onItemCheckboxChange:function(e,n,t){I(e,t)},renderListItem:function(e,n){var t=n.hostName,o=n.ipAddress;return(0,r.jsxs)(S.Z,{spacing:0,sm:"row",sx:{width:"100%","& > *":{flexBasis:"50%"}},xs:"column",children:[(0,r.jsx)(w.Ac,{children:t}),(0,r.jsx)(w.Ac,{children:o})]})},renderListItemCheckboxState:function(e){return Z(e)}})]}),T]}),(0,r.jsx)(a.Z,fe({closeOnProceed:!0},g,{ref:s}))]})};function me(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ye(e){for(var n=1;n0),c(be,t===(null===(n=y.current.getValue)||void 0===n?void 0:n.call(null)))},onFirstRender:o(ge),ref:m,required:p})},"common-user-input-cell-confirm-password":{children:(0,r.jsx)(C.Z,{input:(0,r.jsx)(T.Z,{id:be,inputProps:{readOnly:!v},label:"Confirm password",type:f.Z.password}),inputTestBatch:{defaults:{onSuccess:function(){i(be)}},onFinishBatch:t(be),tests:[{test:E.HJ},{onFailure:function(){i(be,{children:"The passwords do not match."})},test:function(e){var n;return e.value===(null===(n=m.current.getValue)||void 0===n?void 0:n.call(null))}}]},onFirstRender:o(be),ref:y,required:v})}}:void 0}),[t,o,v,p,i,c,h]);return(0,r.jsx)(A.Z,{columns:{xs:1,sm:2,md:3},layout:ye({"common-user-input-cell-name":{children:(0,r.jsx)(C.Z,{input:(0,r.jsx)(T.Z,{id:ve,inputProps:{readOnly:u},label:xe,value:s}),inputTestBatch:(0,E.Gn)(xe,(function(){i(ve)}),{onFinishBatch:t(ve)},(function(e){i(ve,{children:e})})),onFirstRender:o(ve),required:!0}),md:1,sm:2}},x),spacing:"1em"})},Pe=t(2545),Ze=t(8610),Oe=t(6632),Se=t(8859);function Ae(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function qe(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],l=!0,c=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);l=!0);}catch(a){c=!0,o=a}finally{try{l||null==t.return||t.return()}finally{if(c)throw o}}return i}}(e,n)||Ye(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xe(e){return function(e){if(Array.isArray(e))return Ve(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ye(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ye(e,n){if(e){if("string"===typeof e)return Ve(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ve(e,n):void 0}}var Je=function(e){var n=e.refreshInterval,t=void 0===n?6e4:n,d=(0,M.Z)().protect,f=(0,l.useState)(!1),p=f[0],h=f[1],m=(0,l.useState)({actionProceedText:"",closeOnProceed:!0,content:"",dialogProps:{open:p},onCancelAppend:function(){h(!1)},onProceedAppend:function(){h(!1)},titleText:""}),y=m[0],b=m[1],v=qe((0,D.Z)(void 0,d),2),g=v[0],x=v[1],j=qe((0,D.Z)("",d),2),w=j[0],P=j[1],Z=(0,u.Z)("".concat(c.Z,"/host/local"),{onError:function(){P("Unknown")},onSuccess:function(e){var n=e.installTarget,t=e.shortHostName;x(n),P(t)},refreshInterval:t}),O=Z.data,S=Z.isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.default,{children:(0,r.jsx)("title",{children:S?"Loading...":"".concat(null===O||void 0===O?void 0:O.shortHostName," Config")})}),(0,r.jsx)(s.Z,{}),(0,r.jsxs)(o.ZP,{container:!0,columns:{xs:1,md:3,lg:4},children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(He,{installTarget:g,onSubmit:function(e){var n=e.onProceedAppend,t=Ke(e,["onProceedAppend"]);b((function(e){return Ge({},e,t,{onProceedAppend:function(){for(var e=arguments.length,t=new Array(e),r=0;rn.backdrop})({zIndex:-1}),Z=(0,h.ZP)(u.Z,{name:"MuiDialog",slot:"Root",overridesResolver:(e,n)=>n.root})({"@media print":{position:"absolute !important"}}),O=(0,h.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.container,n[`scroll${(0,s.Z)(t.scroll)}`]]}})((({ownerState:e})=>(0,o.Z)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===e.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===e.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}))),S=(0,h.ZP)(f.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.paper,n[`scrollPaper${(0,s.Z)(t.scroll)}`],n[`paperWidth${(0,s.Z)(String(t.maxWidth))}`],t.fullWidth&&n.paperFullWidth,t.fullScreen&&n.paperFullScreen]}})((({theme:e,ownerState:n})=>(0,o.Z)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`${e.breakpoints.values.xs}${e.breakpoints.unit}`,[`&.${b.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},"xs"!==n.maxWidth&&{maxWidth:`${e.breakpoints.values[n.maxWidth]}${e.breakpoints.unit}`,[`&.${b.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[n.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${b.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})));var A=i.forwardRef((function(e,n){const t=(0,p.Z)({props:e,name:"MuiDialog"}),u=(0,x.Z)(),h={enter:u.transitions.duration.enteringScreen,exit:u.transitions.duration.leavingScreen},{"aria-describedby":m,"aria-labelledby":b,BackdropComponent:g,BackdropProps:A,children:k,className:C,disableEscapeKeyDown:I=!1,fullScreen:T=!1,fullWidth:E=!1,maxWidth:M="sm",onBackdropClick:D,onClose:F,open:B,PaperComponent:W=f.Z,PaperProps:R={},scroll:U="paper",TransitionComponent:N=d.Z,transitionDuration:L=h,TransitionProps:$}=t,_=(0,r.Z)(t,w),H=(0,o.Z)({},t,{disableEscapeKeyDown:I,fullScreen:T,fullWidth:E,maxWidth:M,scroll:U}),V=(e=>{const{classes:n,scroll:t,maxWidth:r,fullWidth:o,fullScreen:i}=e,l={root:["root"],container:["container",`scroll${(0,s.Z)(t)}`],paper:["paper",`paperScroll${(0,s.Z)(t)}`,`paperWidth${(0,s.Z)(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return(0,c.Z)(l,y,n)})(H),z=i.useRef(),G=(0,a.Z)(b),K=i.useMemo((()=>({titleId:G})),[G]);return(0,j.jsx)(Z,(0,o.Z)({className:(0,l.Z)(V.root,C),BackdropProps:(0,o.Z)({transitionDuration:L,as:g},A),closeAfterTransition:!0,BackdropComponent:P,disableEscapeKeyDown:I,onClose:F,open:B,ref:n,onClick:e=>{z.current&&(z.current=null,D&&D(e),F&&F(e,"backdropClick"))},ownerState:H},_,{children:(0,j.jsx)(N,(0,o.Z)({appear:!0,in:B,timeout:L,role:"presentation"},$,{children:(0,j.jsx)(O,{className:(0,l.Z)(V.container),onMouseDown:e=>{z.current=e.target===e.currentTarget},ownerState:H,children:(0,j.jsx)(S,(0,o.Z)({as:W,elevation:24,role:"dialog","aria-describedby":m,"aria-labelledby":G},R,{className:(0,l.Z)(V.paper,R.className),ownerState:H,children:(0,j.jsx)(v.Provider,{value:K,children:k})}))})}))}))}))},7579:function(e,n,t){"use strict";var r;t.d(n,{Z:function(){return c}});var o=t(7294);let i=0;const l=(r||(r=t.t(o,2))).useId;function c(e){if(void 0!==l){const n=l();return null!=e?e:n}return function(e){const[n,t]=o.useState(e),r=e||n;return o.useEffect((()=>{null==n&&(i+=1,t(`mui-${i}`))}),[n]),r}(e)}},329:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/config",function(){return t(6028)}])},157:function(e,n,t){"use strict";var r=t(5893),o=t(7357),i=t(8262),l=t(7294),c=t(7169),a=t(4825),s=t(4690),u=t(3679),d=t(2152),f=t(7750);function p(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function b(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"===typeof e)return p(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return p(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var v={blue:c.Ej,red:c.hM},g=(0,l.forwardRef)((function(e,n){var t=e.actionCancelText,p=void 0===t?"Cancel":t,h=e.actionProceedText,g=e.contentContainerProps,x=void 0===g?{}:g,j=e.closeOnProceed,w=void 0!==j&&j,P=e.content,Z=e.dialogProps,O=void 0===Z?{}:Z,S=O.open,A=void 0!==S&&S,k=O.PaperProps,C=void 0===k?{}:k,I=e.disableProceed,T=e.formContent,E=e.loading,M=void 0!==E&&E,D=e.loadingAction,F=void 0!==D&&D,B=e.onActionAppend,W=e.onCancelAppend,R=e.onProceedAppend,U=e.onSubmitAppend,N=e.openInitially,L=void 0!==N&&N,$=e.preActionArea,_=e.proceedButtonProps,H=void 0===_?{}:_,V=e.proceedColour,z=void 0===V?"blue":V,G=e.scrollContent,K=void 0!==G&&G,q=e.scrollBoxProps,X=(void 0===q?{}:q).sx,Y=e.titleText,J=y(e.dialogProps,["open","PaperProps"]),Q=y(e.scrollBoxProps,["sx"]),ee=C.sx,ne=y(C,["sx"]),te=H.disabled,re=void 0===te?I:te,oe=H.sx,ie=y(H,["disabled","sx"]),le=(0,l.useState)(L),ce=le[0],ae=le[1],se=(0,l.useMemo)((function(){return n?ce:A}),[A,ce,n]),ue=(0,l.useMemo)((function(){return v[z]}),[z]),de=(0,l.useMemo)((function(){var e,n,t,r=function(){for(var e=arguments.length,n=new Array(e),t=0;t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(e){var n=e.children,t=e.sx,a=u(e,["children","sx"]);return(0,r.jsx)(i.Z,s({underline:"hover",variant:"subtitle1"},a,{sx:s({color:l.lD,textDecorationColor:l.s7},t),children:(0,r.jsxs)(c.Z,{row:!0,children:[n,(0,r.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},3906:function(e,n,t){"use strict";var r=t(5893),o=t(7294),i=t(6607),l=t(8610);function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e){for(var n=1;n0}),[f.length]),m=(0,o.useMemo)((function(){return d.length>1}),[d.length]),y=(0,o.useCallback)((function(e){var n=e.confirmDialogProps,t=void 0===n?{}:n,o=e.formSummaryProps,i=void 0===o?{}:o,c=e.getConfirmDialogTitle,u=e.onProceedAppend,d=e.renderEntry;return a({actionProceedText:"Delete",content:(0,r.jsx)(l.Z,a({entries:s,maxDepth:0,renderEntry:d},i)),onProceedAppend:u,proceedColour:"red",titleText:c(f.length)},t)}),[s,f.length]),b=(0,o.useCallback)((function(e){return s[e]}),[s]),v=(0,o.useCallback)((function(e){return u(d.reduce((function(n,t){return e&&(n[t]=e),n}),{}))}),[d]),g=(0,o.useCallback)((function(e,n){return u((0,i.ZP)(e,n||void 0))}),[]);return{buildDeleteDialogProps:y,checklist:s,checks:f,getCheck:b,hasAllChecks:p,hasChecks:h,multipleItems:m,setAllChecks:v,setCheck:g}}},6632:function(e,n,t){"use strict";var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.actionProceedText,t=void 0===n?"":n,o=e.content,c=void 0===o?"":o,a=e.titleText,s=void 0===a?"":a,u=l(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:t,content:c,titleText:s},u))}},3106:function(e,n){"use strict";n.Z={bcn:"Back-Channel Network",ifn:"Internet-Facing Network",mn:"Migration Network",sn:"Storage Network"}},6028:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Je}});var r=t(5893),o=t(6886),i=t(9008),l=t(7294),c=t(2029),a=t(157),s=t(5521),u=t(1905),d=t(3106),f=t(4188),p=t(4390);function h(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t3&&void 0!==arguments[3]?arguments[3]:e,o=function(t){var r;null===(r=n.current.setMessage)||void 0===r||r.call(null,e,t)};return t&&(t[r]=o),o},b=function(e,n){var t,r,o={};return t=e,o=(null!=(r=Array)&&"undefined"!==typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](t):t instanceof r)?e.reduce((function(e,t){return y(t,n,e),e}),o):Object.entries(e).reduce((function(e,t){var r=m(t,2),o=r[0],i=r[1];return y(i,n,e,o),e}),o)},v=t(4894),g=t(6607),x=t(480),j=t(2349),w=t(7750);function P(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Z(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&(g({actionProceedText:"Delete",content:"The peer relationship between this striker and the selected ".concat(t," host(s) will terminate. The removed peer(s) can be re-added later."),onProceedAppend:function(){p.Z.delete("/host/connection",{data:n}).catch((function(e){var n=(0,k.Z)(e);n.children="Failed to delete peer connection(s). ".concat(n.children),y(n)}))},proceedColour:"red",titleText:"Delete ".concat(t," peer(s) from this striker?")}),null===(e=f.current.setOpen)||void 0===e||e.call(null,!0))},onEdit:function(){A((function(e){return!e}))},onItemCheckboxChange:function(e,n,t){I[e].isChecked=t,T((function(e){return oe({},e)}))},renderListItem:function(e,n){var t=n.isPingTest,o=void 0!==t&&t;return(0,r.jsx)(S.Z,{row:!0,spacing:0,children:(0,r.jsxs)(S.Z,{spacing:0,children:[(0,r.jsx)(w.$_,{children:e}),(0,r.jsx)(ne,{label:"Ping",state:o})]})})}})}),E]})}),(0,r.jsx)(V,{ref:s}),(0,r.jsx)(a.Z,oe({closeOnProceed:!0},v,{ref:f}))]})},ce=t(582),ae=t(5741),se=t(3906);function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1}),[y]),M=(0,u.Z)("".concat(c.Z,"/ssh-key/conflict"),{onError:function(e){h({children:"Failed to fetch SSH key conflicts. Error: ".concat(e),type:"error"})},onSuccess:function(e){b((function(n){return Object.values(e).reduce((function(e,t){return Object.values(t).forEach((function(t){var r=t.hostName,o=t.hostUUID,i=t.ipAddress,l=t.stateUUID;e[l]=fe({},n[l],{hostName:r,hostUUID:o,ipAddress:i})})),e}),{})}))},refreshInterval:i}).isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(K.TZ,{header:"Manage changed SSH keys",loading:M,children:[(0,r.jsxs)(S.Z,{spacing:".2em",children:[(0,r.jsx)(w.Ac,{children:"The identity of the following targets have unexpectedly changed."}),(0,r.jsxs)(G.Z,{type:"warning",isAllowClose:!0,children:["If you haven't rebuilt the listed targets, then you could be experiencing a"," ",(0,r.jsx)(ae.Z,{href:t,sx:{display:"inline-flex"},target:"_blank",children:'"Man In The Middle"'})," ","attack. Please verify the targets have changed for a known reason before proceeding to remove the broken keys."]}),(0,r.jsx)(z.Z,{header:(0,r.jsxs)(S.Z,{row:!0,spacing:".3em",sx:{width:"100%","& > :not(:last-child)":{display:{xs:"none",sm:"flex"}},"& > :last-child":{display:{xs:"initial",sm:"none"},marginLeft:0}},children:[(0,r.jsxs)(S.Z,{row:!0,spacing:".3em",sx:{flexBasis:"calc(50% + 1em)"},children:[(0,r.jsx)(w.Ac,{children:"Host name"}),(0,r.jsx)(ce.Z,{sx:{flexGrow:1}})]}),(0,r.jsxs)(S.Z,{row:!0,spacing:".3em",sx:{flexGrow:1},children:[(0,r.jsx)(w.Ac,{children:"IP address"}),(0,r.jsx)(ce.Z,{sx:{flexGrow:1}})]}),(0,r.jsx)(ce.Z,{sx:{flexGrow:1}})]}),allowCheckAll:E,allowCheckItem:!0,allowDelete:!0,allowEdit:!1,disableDelete:!A,edit:!0,getListCheckboxProps:function(){return{checked:O}},listEmpty:(0,r.jsx)(w.Ac,{align:"center",children:"No conflicting keys found."}),listItems:y,onAllCheckboxChange:function(e,n){C(n)},onDelete:function(){var e,n=P.reduce((function(e,n){if(!Z(n))return e;var t=y[n].hostUUID;return e[t]||(e[t]=[]),e[t].push(n),e}),{});x({actionProceedText:"Delete",content:"Resolve ".concat(P.length," SSH key conflicts. Please make sure the identity change(s) are expected to avoid MITM attacks."),onProceedAppend:function(){p.Z.delete("/ssh-key/conflict",{data:n}).catch((function(e){var n=(0,k.Z)(e);n.children="Failed to delete selected SSH key conflicts. ".concat(n.children),h(n)}))},proceedColour:"red",titleText:"Delete ".concat(P.length," conflicting SSH keys?")}),null===(e=s.current.setOpen)||void 0===e||e.call(null,!0)},onItemCheckboxChange:function(e,n,t){I(e,t)},renderListItem:function(e,n){var t=n.hostName,o=n.ipAddress;return(0,r.jsxs)(S.Z,{spacing:0,sm:"row",sx:{width:"100%","& > *":{flexBasis:"50%"}},xs:"column",children:[(0,r.jsx)(w.Ac,{children:t}),(0,r.jsx)(w.Ac,{children:o})]})},renderListItemCheckboxState:function(e){return Z(e)}})]}),T]}),(0,r.jsx)(a.Z,fe({closeOnProceed:!0},g,{ref:s}))]})};function me(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ye(e){for(var n=1;n0),c(be,t===(null===(n=y.current.getValue)||void 0===n?void 0:n.call(null)))},onFirstRender:o(ge),ref:m,required:p})},"common-user-input-cell-confirm-password":{children:(0,r.jsx)(C.Z,{input:(0,r.jsx)(T.Z,{id:be,inputProps:{readOnly:!v},label:"Confirm password",type:f.Z.password}),inputTestBatch:{defaults:{onSuccess:function(){i(be)}},onFinishBatch:t(be),tests:[{test:E.HJ},{onFailure:function(){i(be,{children:"The passwords do not match."})},test:function(e){var n;return e.value===(null===(n=m.current.getValue)||void 0===n?void 0:n.call(null))}}]},onFirstRender:o(be),ref:y,required:v})}}:void 0}),[t,o,v,p,i,c,h]);return(0,r.jsx)(A.Z,{columns:{xs:1,sm:2,md:3},layout:ye({"common-user-input-cell-name":{children:(0,r.jsx)(C.Z,{input:(0,r.jsx)(T.Z,{id:ve,inputProps:{readOnly:u},label:xe,value:s}),inputTestBatch:(0,E.Gn)(xe,(function(){i(ve)}),{onFinishBatch:t(ve)},(function(e){i(ve,{children:e})})),onFirstRender:o(ve),required:!0}),md:1,sm:2}},x),spacing:"1em"})},Pe=t(2545),Ze=t(8610),Oe=t(6632),Se=t(8859);function Ae(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function qe(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],l=!0,c=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);l=!0);}catch(a){c=!0,o=a}finally{try{l||null==t.return||t.return()}finally{if(c)throw o}}return i}}(e,n)||Ye(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xe(e){return function(e){if(Array.isArray(e))return Ve(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ye(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ye(e,n){if(e){if("string"===typeof e)return Ve(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ve(e,n):void 0}}var Je=function(e){var n=e.refreshInterval,t=void 0===n?6e4:n,d=(0,M.Z)().protect,f=(0,l.useState)(!1),p=f[0],h=f[1],m=(0,l.useState)({actionProceedText:"",closeOnProceed:!0,content:"",dialogProps:{open:p},onCancelAppend:function(){h(!1)},onProceedAppend:function(){h(!1)},titleText:""}),y=m[0],b=m[1],v=qe((0,D.Z)(void 0,d),2),g=v[0],x=v[1],j=qe((0,D.Z)("",d),2),w=j[0],P=j[1],Z=(0,u.Z)("".concat(c.Z,"/host/local"),{onError:function(){P("Unknown")},onSuccess:function(e){var n=e.installTarget,t=e.shortHostName;x(n),P(t)},refreshInterval:t}),O=Z.data,S=Z.isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.default,{children:(0,r.jsx)("title",{children:S?"Loading...":"".concat(null===O||void 0===O?void 0:O.shortHostName," Config")})}),(0,r.jsx)(s.Z,{}),(0,r.jsxs)(o.ZP,{container:!0,columns:{xs:1,md:3,lg:4},children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(He,{installTarget:g,onSubmit:function(e){var n=e.onProceedAppend,t=Ke(e,["onProceedAppend"]);b((function(e){return Ge({},e,t,{onProceedAppend:function(){for(var e=arguments.length,t=new Array(e),r=0;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function x(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"===typeof e)return p(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return p(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g={blue:c.Ej,red:c.hM},y=(0,l.forwardRef)((function(e,n){var t=e.actionCancelText,p=void 0===t?"Cancel":t,m=e.actionProceedText,y=e.contentContainerProps,b=void 0===y?{}:y,j=e.closeOnProceed,w=void 0!==j&&j,Z=e.content,O=e.dialogProps,P=void 0===O?{}:O,S=P.open,C=void 0!==S&&S,A=P.PaperProps,k=void 0===A?{}:A,I=e.disableProceed,U=e.formContent,D=e.loading,E=void 0!==D&&D,F=e.loadingAction,L=void 0!==F&&F,T=e.onActionAppend,N=e.onCancelAppend,M=e.onProceedAppend,B=e.onSubmitAppend,_=e.openInitially,R=void 0!==_&&_,W=e.preActionArea,H=e.proceedButtonProps,V=void 0===H?{}:H,z=e.proceedColour,G=void 0===z?"blue":z,$=e.scrollContent,X=void 0!==$&&$,J=e.scrollBoxProps,Y=(void 0===J?{}:J).sx,q=e.titleText,K=v(e.dialogProps,["open","PaperProps"]),Q=v(e.scrollBoxProps,["sx"]),ee=k.sx,ne=v(k,["sx"]),te=V.disabled,re=void 0===te?I:te,oe=V.sx,ie=v(V,["disabled","sx"]),le=(0,l.useState)(R),ce=le[0],ae=le[1],ue=(0,l.useMemo)((function(){return n?ce:C}),[C,ce,n]),se=(0,l.useMemo)((function(){return g[G]}),[G]),fe=(0,l.useMemo)((function(){var e,n,t,r=function(){for(var e=arguments.length,n=new Array(e),t=0;t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return t["".concat(n).concat(e)]}),[t]),i=(0,s.useCallback)((function(){return o("user")}),[o]);return(0,s.useEffect)((function(){if(e){var n=document.cookie.split(/\s*;\s*/);r(n.reduce((function(e,n){var t,r=C(n.split("=",2),2),o=r[0],i=r[1],l=decodeURIComponent(i);if(l.startsWith("j:"))try{t=JSON.parse(l.substring(2))}catch(c){t=i}else t=i;return e[o]=t,e}),{}))}}),[e]),{cookieJar:t,getCookie:o,getSessionUser:i}};function k(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function I(e){for(var n=1;n0)},ref:n})]})}},4427:function(e,n,t){"use strict";var r=t(5893),o=t(2429),i=t(9309),l=t(7169);function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(e){var n=e.onClearIndicatorClick,t=v(e,["onClearIndicatorClick"]),x=t.sx,g=t.value,y=v(t,["sx","value"]),b=(0,d.useMemo)((function(){var e;return h((m(e={},"& .".concat(i.Z.icon),{color:p.s7}),m(e,"& .".concat(l.Z.root),{marginRight:".8em"}),m(e,"& .".concat(c.Z.root),{color:p.s7,visibility:"hidden"}),m(e,"&:hover .".concat(l.Z.root," .").concat(c.Z.root,",\n &.").concat(a.Z.focused," .").concat(l.Z.root," .").concat(c.Z.root),{visibility:"visible"}),e),x)}),[x]),j=(0,d.useMemo)((function(){return String(g).length>0&&n&&(0,r.jsx)(u.Z,{position:"end",children:(0,r.jsx)(s.Z,{onClick:n,children:(0,r.jsx)(o.Z,{fontSize:"small"})})})}),[n,g]);return(0,r.jsx)(f.Z,h({endAdornment:j,value:g},y,{sx:b}))}},1081:function(e,n,t){"use strict";var r=t(7294);n.Z=function(){var e=(0,r.useRef)(!0);return e.current?(e.current=!1,!0):e.current}},7241:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ie}});var r=t(5893),o=t(9008),i=t(4051),l=t.n(i),c=t(7294),a=t(7357),u=t(2428),s=t(2026),f=t(1797),d=t(5293),p=t.n(d),m=t(2029),h=t(7169),v=t(8128),x=t(3631),g=t(4390),y=t(157),b=t(4825),j=t(1496),w=t(3457),Z=t(3640),O=t(6886),P=t(480),S=t(267),C=t(1925),A=t(5934),k=[["iso",["application/x-cd-image","ISO (optical disc)"]],["other",["text/plain","Other file type"]],["script",["text/plain","Script (program)"]]],I=new Map(k),U=t(6125),D=t(4427),E=t(9),F=t(192),L=t(3679),T=t(2879);function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:W,n=e.fileName,t=e.fileType,o=e.fileLocations,i=e.isReadonly,l=e.onChange,a=(0,A.Z)(),u="file-name-".concat(a),s="File name",f="file-type-".concat(a),d="File type",p=(0,c.useMemo)((function(){return o.reduce((function(e,n){var t=n.anvilDescription,r=n.anvilName,o=n.anvilUUID;return e[o]||(e[o]={anvilDescription:t,anvilName:r,anvilUUID:o,flocs:[]}),e[o].flocs.push(n),e}),{})}),[o]);return(0,r.jsxs)(w.Z,{sx:{"> :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(F.Z,{htmlFor:u,children:s}),(0,r.jsx)(E.Z,{defaultValue:n,disabled:i,id:u,label:s,onChange:function(e){var t=e.target.value;null===l||void 0===l||l.call(null,{fileName:t===n?void 0:t})}})]}),t&&(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(F.Z,{htmlFor:f,children:d}),(0,r.jsx)(T.Z,{defaultValue:t,disabled:i,id:f,input:(0,r.jsx)(E.Z,{label:d}),onChange:function(e){var n=e.target.value;null===l||void 0===l||l.call(null,{fileType:n===t?void 0:n})},children:k.map((function(e){var n=M(e,2),t=n[0],o=M(n[1],2)[1];return(0,r.jsx)(D.Z,{value:t,children:o},t)}))})]}),(0,r.jsx)(U.Z,{listItems:p,listProps:{dense:!0,disablePadding:!0},renderListItem:function(e,n){var t=n.anvilDescription,c=n.anvilName,a=n.flocs;return(0,r.jsx)(L.TZ,{header:"".concat(c,": ").concat(t),panelProps:{padding:0,width:"100%"},children:(0,r.jsx)(L.bc,{children:(0,r.jsx)(O.ZP,{columns:{xs:1,sm:2,md:3,lg:4,xl:5},columnSpacing:"1em",container:!0,direction:"row",children:a.map((function(n){var t=n.fileLocationUUID,c=n.hostName,a=n.hostUUID,u=n.isFileLocationActive;return(0,r.jsx)(O.ZP,{item:!0,xs:1,children:(0,r.jsx)(P.Z,{control:(0,r.jsx)(H,{checkedIcon:(0,r.jsx)(S.Z,{}),defaultChecked:u,disabled:i,edge:"start",icon:(0,r.jsx)(C.Z,{}),onChange:function(e){var n=e.target.checked;null===l||void 0===l||l.call(null,{isFileLocationActive:n===u?void 0:n},{fileLocationIndex:o.findIndex((function(e){var n=e.fileLocationUUID;return t===n}))})}}),label:c,sx:{color:h.lD},value:"".concat(a,"-sync")})},"floc-".concat(e,"-").concat(a))}))})})})}})]})};V.defaultProps=W;var z=V,G=t(2152),$=t(1200);function X(e,n,t,r,o,i,l){try{var c=e[i](l),a=c.value}catch(u){return void t(u)}c.done?n(a):Promise.resolve(a).then(r,o)}function J(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function l(e){X(i,r,o,l,c,"next",e)}function c(e){X(i,r,o,l,c,"throw",e)}l(void 0)}))}}function Y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function q(e){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:K,n=e.filesOverview,t=e.onEditFilesComplete,o=e.onPurgeFilesComplete,i=(0,c.useState)([]),u=i[0],s=i[1],f=(0,c.useState)([]),d=f[0],p=f[1],j=(0,c.useState)(!1),w=j[0],Z=j[1],O=(0,c.useState)(!1),P=O[0],S=O[1],C=(0,c.useState)(0),A=C[0],k=C[1],I={backgroundColor:h.hM,color:h.lD,"&:hover":{backgroundColor:h.hM}},U=function(e){return function(n){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fileLocationIndex;void 0!==t?u[e].fileLocations[t]=q({},u[e].fileLocations[t],n):u[e]=q({},u[e],n)}},D=function(e){e.preventDefault(),Z(!0);var n=u.reduce((function(e,n){var t=n.fileLocations,r=n.fileName,o=n.fileType,i=n.fileUUID,l={};void 0!==r&&(l.fileName=r),void 0!==o&&(l.fileType=o);var c=t.reduce((function(e,n){var t=n.fileLocationUUID,r=n.isFileLocationActive;return void 0!==r&&e.push({fileLocationUUID:t,isFileLocationActive:r}),e}),[]);return c.length>0&&(l.fileLocations=c),Object.keys(l).length>0&&e.push(g.Z.put("/file/".concat(i),l)),e}),[]);Promise.all(n).then((function(){Z(!1)})).then(t)},E=function(){S(!1),Z(!0);var e=d.filter((function(e){return e.isSelected})).map((function(e){var n=e.fileUUID;return g.Z.delete("/file/".concat(n))}));Promise.all(e).then((function(){Z(!1)})).then(o)},F=function(){S(!1)},L=function(){var e=d.filter((function(e){return e.isSelected})).length;k(e),e>0&&S(!0)};return(0,c.useEffect)((function(){Z(!0),Promise.all(n.map(function(){var e=J(l().mark((function e(n){var t,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=q({},n,{fileLocations:[]}),e.prev=1,e.next=4,(0,$.Z)("".concat(m.Z,"/file/").concat(n.fileUUID));case 4:r=e.sent,t.fileLocations=r.map((function(e){var n=e[5],t=e[6],r=e[7],o=e[8],i=e[9],l=e[10];return{anvilDescription:i,anvilName:o,anvilUUID:r,fileLocationUUID:n,hostName:e[11],hostUUID:l,isFileLocationActive:1===parseInt(t,10)}})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),t.dataIncompleteError=e.t0;case 11:return e.abrupt("return",t);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(n){return e.apply(this,arguments)}}())).then((function(e){p(e);for(var n=[],t=0;t :not(:first-child)":{marginTop:"1em"}},children:[d.map((function(e,n){var t=e.fileName,o=e.fileLocations,i=e.fileType,l=e.fileUUID;return(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"row","& > :last-child":{flexGrow:1}},children:[(0,r.jsx)(a.Z,{sx:{marginTop:".4em"},children:(0,r.jsx)(v.Z,{onChange:function(e){var t=e.target.checked;d[n].isSelected=t},sx:Y({color:h.s7},"&.".concat(x.Z.checked),{color:h.lD})})}),(0,r.jsx)(z,{fileName:t,fileType:i,fileLocations:o,onChange:U(n)})]},"file-edit-".concat(l))})),d.length>0&&(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end","& > :not(:last-child)":{marginRight:".5em"}},children:[(0,r.jsx)(b.Z,{onClick:L,sx:I,children:"Purge"}),(0,r.jsx)(b.Z,{type:"submit",children:"Update"})]})]}),(0,r.jsx)(y.Z,{actionProceedText:"Purge",content:"".concat(A," files will be removed from the system. You cannot undo this purge."),dialogProps:{open:P},onCancelAppend:F,onProceedAppend:E,proceedButtonProps:{sx:I},titleText:"Are you sure you want to purge ".concat(A," selected files? ")})]})})};Q.defaultProps=K;var ee=Q,ne=t(8462),te=t(7212),re=t(7720),oe=t(8600),ie=t.n(oe),le=t(7750),ce=function(e){var n=e.filesOverview;return(0,r.jsx)(ne.Z,{children:n.map((function(e){var n,t,o=e.fileChecksum,i=e.fileName,l=e.fileSizeInBytes,c=e.fileType,u=e.fileUUID,s=ie()(l,{binary:!0});return(0,r.jsx)(te.ZP,{sx:{padding:".6em 0"},children:(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%"},children:[(0,r.jsxs)(a.Z,{sx:{flexGrow:1},children:[(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"row"},children:[(0,r.jsx)(le.Ac,{sx:{fontFamily:"Source Code Pro",fontWeight:400},text:i}),(0,r.jsx)(re.Z,{flexItem:!0,orientation:"vertical",sx:{backgroundColor:h.d,marginLeft:".5em",marginRight:".5em"}}),(0,r.jsx)(le.Ac,{text:null!==(t=null===(n=I.get(c))||void 0===n?void 0:n[1])&&void 0!==t?t:""})]}),(0,r.jsx)(le.Ac,{text:s})]}),(0,r.jsx)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row"},children:(0,r.jsx)(le.Ac,{sx:{fontFamily:"Source Code Pro",fontWeight:400},text:o})})]})},u)}))})},ae=t(76),ue=t(9332),se=t(9297),fe=t(8187);function de(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:ge,n=e.onFileUploadComplete,t=e.eventEmitter,o=(0,c.useRef)(),i=(0,c.useState)([]),l=i[0],u=i[1],s=(0,c.useState)([]),f=s[0],d=s[1],p=function(e){var n,t=I.entries();do{var r=t.next();if(r.value){var o=he(r.value,2),i=o[0];e===he(o[1],1)[0]&&(n=i)}else n="other"}while(!n);return n},m=function(e){var n=e.target.files;n&&u(Array.from(n).map((function(e){return{file:e,fileName:e.name,fileLocations:[],fileType:p(e.type)}})))},h=function(e){return function(n){l[e]=me({},l[e],n)}},v=function(e){for(e.preventDefault();l.length>0;){var t=l.shift();if(t){var r=t.file,o=t.fileName,i=new FormData;i.append("file",new File([r],o,me({},r)));var c={fileName:o,progressValue:0};f.push(c),g.Z.post("/file",i,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:function(e){var n=e.loaded,t=e.total;c.progressValue=Math.round(n/t*100),d(ve(f))}}).then((function(){null===n||void 0===n||n.call(null),f.splice(f.indexOf(c),1),d(ve(f))}))}}u([]),d(ve(f))};return(0,c.useEffect)((function(){null===t||void 0===t||t.addListener("openFilePicker",(function(){var e;null===(e=o.current)||void 0===e||e.click()})),null===t||void 0===t||t.addListener("clearSelectedFiles",(function(){u([])}))}),[t]),(0,r.jsxs)("form",{onSubmit:v,children:[(0,r.jsx)(ae.Z,{htmlFor:"select-file",children:(0,r.jsx)(ue.Z,{id:"select-file",inputProps:{multiple:!0},onChange:m,ref:o,sx:{display:"none"},type:"file"})}),(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:f.map((function(e){var n=e.fileName,t=e.progressValue;return(0,r.jsxs)(a.Z,{sx:{alignItems:{md:"center"},display:"flex",flexDirection:{xs:"column",md:"row"},"& > :first-child":{minWidth:100,overflow:"hidden",overflowWrap:"normal",textOverflow:"ellipsis",whiteSpace:"nowrap",width:{xs:"100%",md:200},wordBreak:"keep-all"},"& > :last-child":{flexGrow:1}},children:[(0,r.jsx)(le.Ac,{text:n}),(0,r.jsx)(se.k,{progressPercentage:t})]},"in-upload-".concat(n))}))}),(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column","& > :not(:first-child)":{marginTop:"1em"}},children:[l.length>0&&(0,r.jsx)(fe.Z,{text:"Uploaded files will be listed automatically, but it may take a while for larger files to appear.",type:"info"}),l.map((function(e,n){var t=e.file.name,r=e.fileName,o=e.fileLocations;return(0,c.createElement)(z,{fileName:r,fileLocations:o,key:"selected-".concat(t),onChange:h(n)})})),l.length>0&&(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end"},children:(0,r.jsx)(b.Z,{type:"submit",children:"Upload"})})]})]})};ye.defaultProps=ge;var be=ye,je=t(1706),we=t(1905);function Ze(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t :first-child":{flexGrow:1},"& > :not(:first-child, :last-child)":{marginRight:".3em"}},children:[(0,r.jsx)(le.z,{text:"Files"}),!y&&(0,r.jsx)(je.Z,{onClick:function(){j.emit("openFilePicker")},children:(0,r.jsx)(u.Z,{})}),(0,r.jsx)(je.Z,{onClick:function(){j.emit("clearSelectedFiles"),b(!y)},children:y?(0,r.jsx)(s.Z,{sx:{color:h.Ej}}):(0,r.jsx)(f.Z,{})})]}),i&&(0,r.jsx)(fe.Z,{text:i,type:"error"}),(0,r.jsx)(be,{eventEmitter:j,onFileUploadComplete:w}),function(){var e;if(v)e=(0,r.jsx)(G.Z,{});else{var t=n.map((function(e){var n=Pe(e,5),t=n[0],r=n[1],o=n[2],i=n[3];return{fileChecksum:n[4],fileName:r,fileSizeInBytes:parseInt(o,10),fileType:i,fileUUID:t}}));e=y?(0,r.jsx)(ee,{filesOverview:t,onEditFilesComplete:w,onPurgeFilesComplete:w}):(0,r.jsx)(ce,{filesOverview:t})}return e}()]})},Ae=Ce,ke=t(5521),Ie=function(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.default,{children:(0,r.jsx)("title",{children:"File Manager"})}),(0,r.jsx)(ke.Z,{}),(0,r.jsx)(Ae,{})]})}}},function(e){e.O(0,[382,483,894,182,768,746,203,774,888,179],(function(){return n=8283,e(e.s=n);var n}));var n=e.O();_N_E=n}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[941],{8283:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/file-manager",function(){return t(7241)}])},157:function(e,n,t){"use strict";var r=t(5893),o=t(7357),i=t(8262),l=t(7294),c=t(7169),a=t(4825),u=t(4690),s=t(3679),f=t(2152),d=t(7750);function p(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function x(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"===typeof e)return p(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return p(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g={blue:c.Ej,red:c.hM},y=(0,l.forwardRef)((function(e,n){var t=e.actionCancelText,p=void 0===t?"Cancel":t,m=e.actionProceedText,y=e.contentContainerProps,b=void 0===y?{}:y,j=e.closeOnProceed,w=void 0!==j&&j,Z=e.content,O=e.dialogProps,P=void 0===O?{}:O,S=P.open,C=void 0!==S&&S,A=P.PaperProps,k=void 0===A?{}:A,I=e.disableProceed,U=e.formContent,D=e.loading,E=void 0!==D&&D,F=e.loadingAction,L=void 0!==F&&F,T=e.onActionAppend,N=e.onCancelAppend,M=e.onProceedAppend,B=e.onSubmitAppend,_=e.openInitially,R=void 0!==_&&_,W=e.preActionArea,H=e.proceedButtonProps,V=void 0===H?{}:H,z=e.proceedColour,G=void 0===z?"blue":z,$=e.scrollContent,X=void 0!==$&&$,J=e.scrollBoxProps,Y=(void 0===J?{}:J).sx,q=e.titleText,K=v(e.dialogProps,["open","PaperProps"]),Q=v(e.scrollBoxProps,["sx"]),ee=k.sx,ne=v(k,["sx"]),te=V.disabled,re=void 0===te?I:te,oe=V.sx,ie=v(V,["disabled","sx"]),le=(0,l.useState)(R),ce=le[0],ae=le[1],ue=(0,l.useMemo)((function(){return n?ce:C}),[C,ce,n]),se=(0,l.useMemo)((function(){return g[G]}),[G]),fe=(0,l.useMemo)((function(){var e,n,t,r=function(){for(var e=arguments.length,n=new Array(e),t=0;t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return t["".concat(n).concat(e)]}),[t]),i=(0,s.useCallback)((function(){return o("user")}),[o]);return(0,s.useEffect)((function(){if(e){var n=document.cookie.split(/\s*;\s*/);r(n.reduce((function(e,n){var t,r=C(n.split("=",2),2),o=r[0],i=r[1],l=decodeURIComponent(i);if(l.startsWith("j:"))try{t=JSON.parse(l.substring(2))}catch(c){t=i}else t=i;return e[o]=t,e}),{}))}}),[e]),{cookieJar:t,getCookie:o,getSessionUser:i}};function k(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function I(e){for(var n=1;n0)},ref:n})]})}},4427:function(e,n,t){"use strict";var r=t(5893),o=t(2429),i=t(9309),l=t(7169);function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(e){var n=e.onClearIndicatorClick,t=v(e,["onClearIndicatorClick"]),x=t.sx,g=t.value,y=v(t,["sx","value"]),b=(0,d.useMemo)((function(){var e;return h((m(e={},"& .".concat(i.Z.icon),{color:p.s7}),m(e,"& .".concat(l.Z.root),{marginRight:".8em"}),m(e,"& .".concat(c.Z.root),{color:p.s7,visibility:"hidden"}),m(e,"&:hover .".concat(l.Z.root," .").concat(c.Z.root,",\n &.").concat(a.Z.focused," .").concat(l.Z.root," .").concat(c.Z.root),{visibility:"visible"}),e),x)}),[x]),j=(0,d.useMemo)((function(){return String(g).length>0&&n&&(0,r.jsx)(u.Z,{position:"end",children:(0,r.jsx)(s.Z,{onClick:n,children:(0,r.jsx)(o.Z,{fontSize:"small"})})})}),[n,g]);return(0,r.jsx)(f.Z,h({endAdornment:j,value:g},y,{sx:b}))}},1081:function(e,n,t){"use strict";var r=t(7294);n.Z=function(){var e=(0,r.useRef)(!0);return e.current?(e.current=!1,!0):e.current}},7241:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ie}});var r=t(5893),o=t(9008),i=t(4051),l=t.n(i),c=t(7294),a=t(7357),u=t(2428),s=t(2026),f=t(1797),d=t(5293),p=t.n(d),m=t(2029),h=t(7169),v=t(8128),x=t(3631),g=t(4390),y=t(157),b=t(4825),j=t(1496),w=t(3457),Z=t(3640),O=t(6886),P=t(480),S=t(267),C=t(1925),A=t(5934),k=[["iso",["application/x-cd-image","ISO (optical disc)"]],["other",["text/plain","Other file type"]],["script",["text/plain","Script (program)"]]],I=new Map(k),U=t(6125),D=t(4427),E=t(9),F=t(192),L=t(3679),T=t(2879);function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:W,n=e.fileName,t=e.fileType,o=e.fileLocations,i=e.isReadonly,l=e.onChange,a=(0,A.Z)(),u="file-name-".concat(a),s="File name",f="file-type-".concat(a),d="File type",p=(0,c.useMemo)((function(){return o.reduce((function(e,n){var t=n.anvilDescription,r=n.anvilName,o=n.anvilUUID;return e[o]||(e[o]={anvilDescription:t,anvilName:r,anvilUUID:o,flocs:[]}),e[o].flocs.push(n),e}),{})}),[o]);return(0,r.jsxs)(w.Z,{sx:{"> :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(F.Z,{htmlFor:u,children:s}),(0,r.jsx)(E.Z,{defaultValue:n,disabled:i,id:u,label:s,onChange:function(e){var t=e.target.value;null===l||void 0===l||l.call(null,{fileName:t===n?void 0:t})}})]}),t&&(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(F.Z,{htmlFor:f,children:d}),(0,r.jsx)(T.Z,{defaultValue:t,disabled:i,id:f,input:(0,r.jsx)(E.Z,{label:d}),onChange:function(e){var n=e.target.value;null===l||void 0===l||l.call(null,{fileType:n===t?void 0:n})},children:k.map((function(e){var n=M(e,2),t=n[0],o=M(n[1],2)[1];return(0,r.jsx)(D.Z,{value:t,children:o},t)}))})]}),(0,r.jsx)(U.Z,{listItems:p,listProps:{dense:!0,disablePadding:!0},renderListItem:function(e,n){var t=n.anvilDescription,c=n.anvilName,a=n.flocs;return(0,r.jsx)(L.TZ,{header:"".concat(c,": ").concat(t),panelProps:{padding:0,width:"100%"},children:(0,r.jsx)(L.bc,{children:(0,r.jsx)(O.ZP,{columns:{xs:1,sm:2,md:3,lg:4,xl:5},columnSpacing:"1em",container:!0,direction:"row",children:a.map((function(n){var t=n.fileLocationUUID,c=n.hostName,a=n.hostUUID,u=n.isFileLocationActive;return(0,r.jsx)(O.ZP,{item:!0,xs:1,children:(0,r.jsx)(P.Z,{control:(0,r.jsx)(H,{checkedIcon:(0,r.jsx)(S.Z,{}),defaultChecked:u,disabled:i,edge:"start",icon:(0,r.jsx)(C.Z,{}),onChange:function(e){var n=e.target.checked;null===l||void 0===l||l.call(null,{isFileLocationActive:n===u?void 0:n},{fileLocationIndex:o.findIndex((function(e){var n=e.fileLocationUUID;return t===n}))})}}),label:c,sx:{color:h.lD},value:"".concat(a,"-sync")})},"floc-".concat(e,"-").concat(a))}))})})})}})]})};V.defaultProps=W;var z=V,G=t(2152),$=t(1200);function X(e,n,t,r,o,i,l){try{var c=e[i](l),a=c.value}catch(u){return void t(u)}c.done?n(a):Promise.resolve(a).then(r,o)}function J(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function l(e){X(i,r,o,l,c,"next",e)}function c(e){X(i,r,o,l,c,"throw",e)}l(void 0)}))}}function Y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function q(e){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:K,n=e.filesOverview,t=e.onEditFilesComplete,o=e.onPurgeFilesComplete,i=(0,c.useState)([]),u=i[0],s=i[1],f=(0,c.useState)([]),d=f[0],p=f[1],j=(0,c.useState)(!1),w=j[0],Z=j[1],O=(0,c.useState)(!1),P=O[0],S=O[1],C=(0,c.useState)(0),A=C[0],k=C[1],I={backgroundColor:h.hM,color:h.lD,"&:hover":{backgroundColor:h.hM}},U=function(e){return function(n){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).fileLocationIndex;void 0!==t?u[e].fileLocations[t]=q({},u[e].fileLocations[t],n):u[e]=q({},u[e],n)}},D=function(e){e.preventDefault(),Z(!0);var n=u.reduce((function(e,n){var t=n.fileLocations,r=n.fileName,o=n.fileType,i=n.fileUUID,l={};void 0!==r&&(l.fileName=r),void 0!==o&&(l.fileType=o);var c=t.reduce((function(e,n){var t=n.fileLocationUUID,r=n.isFileLocationActive;return void 0!==r&&e.push({fileLocationUUID:t,isFileLocationActive:r}),e}),[]);return c.length>0&&(l.fileLocations=c),Object.keys(l).length>0&&e.push(g.Z.put("/file/".concat(i),l)),e}),[]);Promise.all(n).then((function(){Z(!1)})).then(t)},E=function(){S(!1),Z(!0);var e=d.filter((function(e){return e.isSelected})).map((function(e){var n=e.fileUUID;return g.Z.delete("/file/".concat(n))}));Promise.all(e).then((function(){Z(!1)})).then(o)},F=function(){S(!1)},L=function(){var e=d.filter((function(e){return e.isSelected})).length;k(e),e>0&&S(!0)};return(0,c.useEffect)((function(){Z(!0),Promise.all(n.map(function(){var e=J(l().mark((function e(n){var t,r;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=q({},n,{fileLocations:[]}),e.prev=1,e.next=4,(0,$.Z)("".concat(m.Z,"/file/").concat(n.fileUUID));case 4:r=e.sent,t.fileLocations=r.map((function(e){var n=e[5],t=e[6],r=e[7],o=e[8],i=e[9],l=e[10];return{anvilDescription:i,anvilName:o,anvilUUID:r,fileLocationUUID:n,hostName:e[11],hostUUID:l,isFileLocationActive:1===parseInt(t,10)}})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),t.dataIncompleteError=e.t0;case 11:return e.abrupt("return",t);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(n){return e.apply(this,arguments)}}())).then((function(e){p(e);for(var n=[],t=0;t :not(:first-child)":{marginTop:"1em"}},children:[d.map((function(e,n){var t=e.fileName,o=e.fileLocations,i=e.fileType,l=e.fileUUID;return(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"row","& > :last-child":{flexGrow:1}},children:[(0,r.jsx)(a.Z,{sx:{marginTop:".4em"},children:(0,r.jsx)(v.Z,{onChange:function(e){var t=e.target.checked;d[n].isSelected=t},sx:Y({color:h.s7},"&.".concat(x.Z.checked),{color:h.lD})})}),(0,r.jsx)(z,{fileName:t,fileType:i,fileLocations:o,onChange:U(n)})]},"file-edit-".concat(l))})),d.length>0&&(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end","& > :not(:last-child)":{marginRight:".5em"}},children:[(0,r.jsx)(b.Z,{onClick:L,sx:I,children:"Purge"}),(0,r.jsx)(b.Z,{type:"submit",children:"Update"})]})]}),(0,r.jsx)(y.Z,{actionProceedText:"Purge",content:"".concat(A," files will be removed from the system. You cannot undo this purge."),dialogProps:{open:P},onCancelAppend:F,onProceedAppend:E,proceedButtonProps:{sx:I},titleText:"Are you sure you want to purge ".concat(A," selected files? ")})]})})};Q.defaultProps=K;var ee=Q,ne=t(8462),te=t(7212),re=t(7720),oe=t(8600),ie=t.n(oe),le=t(7750),ce=function(e){var n=e.filesOverview;return(0,r.jsx)(ne.Z,{children:n.map((function(e){var n,t,o=e.fileChecksum,i=e.fileName,l=e.fileSizeInBytes,c=e.fileType,u=e.fileUUID,s=ie()(l,{binary:!0});return(0,r.jsx)(te.ZP,{sx:{padding:".6em 0"},children:(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},width:"100%"},children:[(0,r.jsxs)(a.Z,{sx:{flexGrow:1},children:[(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"row"},children:[(0,r.jsx)(le.Ac,{sx:{fontFamily:"Source Code Pro",fontWeight:400},text:i}),(0,r.jsx)(re.Z,{flexItem:!0,orientation:"vertical",sx:{backgroundColor:h.d,marginLeft:".5em",marginRight:".5em"}}),(0,r.jsx)(le.Ac,{text:null!==(t=null===(n=I.get(c))||void 0===n?void 0:n[1])&&void 0!==t?t:""})]}),(0,r.jsx)(le.Ac,{text:s})]}),(0,r.jsx)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row"},children:(0,r.jsx)(le.Ac,{sx:{fontFamily:"Source Code Pro",fontWeight:400},text:o})})]})},u)}))})},ae=t(76),ue=t(9332),se=t(9297),fe=t(8187);function de(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:ge,n=e.onFileUploadComplete,t=e.eventEmitter,o=(0,c.useRef)(),i=(0,c.useState)([]),l=i[0],u=i[1],s=(0,c.useState)([]),f=s[0],d=s[1],p=function(e){var n,t=I.entries();do{var r=t.next();if(r.value){var o=he(r.value,2),i=o[0];e===he(o[1],1)[0]&&(n=i)}else n="other"}while(!n);return n},m=function(e){var n=e.target.files;n&&u(Array.from(n).map((function(e){return{file:e,fileName:e.name,fileLocations:[],fileType:p(e.type)}})))},h=function(e){return function(n){l[e]=me({},l[e],n)}},v=function(e){for(e.preventDefault();l.length>0;){var t=l.shift();if(t){var r=t.file,o=t.fileName,i=new FormData;i.append("file",new File([r],o,me({},r)));var c={fileName:o,progressValue:0};f.push(c),g.Z.post("/file",i,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:function(e){var n=e.loaded,t=e.total;c.progressValue=Math.round(n/t*100),d(ve(f))}}).then((function(){null===n||void 0===n||n.call(null),f.splice(f.indexOf(c),1),d(ve(f))}))}}u([]),d(ve(f))};return(0,c.useEffect)((function(){null===t||void 0===t||t.addListener("openFilePicker",(function(){var e;null===(e=o.current)||void 0===e||e.click()})),null===t||void 0===t||t.addListener("clearSelectedFiles",(function(){u([])}))}),[t]),(0,r.jsxs)("form",{onSubmit:v,children:[(0,r.jsx)(ae.Z,{htmlFor:"select-file",children:(0,r.jsx)(ue.Z,{id:"select-file",inputProps:{multiple:!0},onChange:m,ref:o,sx:{display:"none"},type:"file"})}),(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:f.map((function(e){var n=e.fileName,t=e.progressValue;return(0,r.jsxs)(a.Z,{sx:{alignItems:{md:"center"},display:"flex",flexDirection:{xs:"column",md:"row"},"& > :first-child":{minWidth:100,overflow:"hidden",overflowWrap:"normal",textOverflow:"ellipsis",whiteSpace:"nowrap",width:{xs:"100%",md:200},wordBreak:"keep-all"},"& > :last-child":{flexGrow:1}},children:[(0,r.jsx)(le.Ac,{text:n}),(0,r.jsx)(se.k,{progressPercentage:t})]},"in-upload-".concat(n))}))}),(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column","& > :not(:first-child)":{marginTop:"1em"}},children:[l.length>0&&(0,r.jsx)(fe.Z,{text:"Uploaded files will be listed automatically, but it may take a while for larger files to appear.",type:"info"}),l.map((function(e,n){var t=e.file.name,r=e.fileName,o=e.fileLocations;return(0,c.createElement)(z,{fileName:r,fileLocations:o,key:"selected-".concat(t),onChange:h(n)})})),l.length>0&&(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end"},children:(0,r.jsx)(b.Z,{type:"submit",children:"Upload"})})]})]})};ye.defaultProps=ge;var be=ye,je=t(1706),we=t(1905);function Ze(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t :first-child":{flexGrow:1},"& > :not(:first-child, :last-child)":{marginRight:".3em"}},children:[(0,r.jsx)(le.z,{text:"Files"}),!y&&(0,r.jsx)(je.Z,{onClick:function(){j.emit("openFilePicker")},children:(0,r.jsx)(u.Z,{})}),(0,r.jsx)(je.Z,{onClick:function(){j.emit("clearSelectedFiles"),b(!y)},children:y?(0,r.jsx)(s.Z,{sx:{color:h.Ej}}):(0,r.jsx)(f.Z,{})})]}),i&&(0,r.jsx)(fe.Z,{text:i,type:"error"}),(0,r.jsx)(be,{eventEmitter:j,onFileUploadComplete:w}),function(){var e;if(v)e=(0,r.jsx)(G.Z,{});else{var t=n.map((function(e){var n=Pe(e,5),t=n[0],r=n[1],o=n[2],i=n[3];return{fileChecksum:n[4],fileName:r,fileSizeInBytes:parseInt(o,10),fileType:i,fileUUID:t}}));e=y?(0,r.jsx)(ee,{filesOverview:t,onEditFilesComplete:w,onPurgeFilesComplete:w}):(0,r.jsx)(ce,{filesOverview:t})}return e}()]})},Ae=Ce,ke=t(5521),Ie=function(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.default,{children:(0,r.jsx)("title",{children:"File Manager"})}),(0,r.jsx)(ke.Z,{}),(0,r.jsx)(Ae,{})]})}}},function(e){e.O(0,[382,483,894,182,768,62,780,774,888,179],(function(){return n=8283,e(e.s=n);var n}));var n=e.O();_N_E=n}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/index-2eaaa0d56c4c4f15.js b/striker-ui/out/_next/static/chunks/pages/index-1f8f0ad3b3894dbc.js similarity index 96% rename from striker-ui/out/_next/static/chunks/pages/index-2eaaa0d56c4c4f15.js rename to striker-ui/out/_next/static/chunks/pages/index-1f8f0ad3b3894dbc.js index bdb0a0be..2209d661 100644 --- a/striker-ui/out/_next/static/chunks/pages/index-2eaaa0d56c4c4f15.js +++ b/striker-ui/out/_next/static/chunks/pages/index-1f8f0ad3b3894dbc.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{5301:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(5075)}])},5741:function(e,r,n){"use strict";var t=n(5893),o=n(1714),c=n(122),i=n(7169),u=n(4690);function s(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function a(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}r.Z=function(e){var r=e.children,n=e.sx,s=l(e,["children","sx"]);return(0,t.jsx)(c.Z,a({underline:"hover",variant:"subtitle1"},s,{sx:a({color:i.lD,textDecorationColor:i.s7},n),children:(0,t.jsxs)(u.Z,{row:!0,children:[r,(0,t.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},5075:function(e,r,n){"use strict";n.r(r);var t=n(5893),o=n(9008),c=n(1163),i=n(7294),u=n(7357),s=n(7720),a=n(2428),l=n(2029),f=n(7169),v=n(7906),d=n(1200),h=n(5521),p=n(1706),b=n(5741),y=n(9),m=n(3679),x=n(1905),j=n(4968),g=n(2152);function w(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n *":{width:{xs:"20em",md:"24em"}},"& > :not(:last-child)":{marginRight:"2em"}},children:e.map((function(e){var n=e.anvilName,o=e.anvilUUID,c=e.isScreenshotStale,i=e.screenshot,u=e.serverName,s=e.serverUUID;return(0,t.jsx)(v.M,{externalPreview:i,headerEndAdornment:[(0,t.jsx)(b.Z,{href:"/server?uuid=".concat(s,"&server_name=").concat(u),children:u},"server_list_to_server_".concat(s)),(0,t.jsx)(b.Z,{href:"/anvil?anvil_uuid=".concat(o),sx:{opacity:.7},children:n},"server_list_server_".concat(s,"_to_anvil_").concat(o))],isExternalPreviewStale:c,isFetchPreview:!1,isShowControls:!1,isUseInnerPanel:!0,onClickPreview:function(){r.push("/server?uuid=".concat(s,"&server_name=").concat(u,"&vnc=1"))},serverUUID:s},"server-preview-".concat(s))}))})},P=function(e,r){return""===r?{exclude:e,include:[]}:e.reduce((function(e,n){return n.serverName.includes(r)?e.include.push(n):e.exclude.push(n),e}),{exclude:[],include:[]})};r.default=function(){var e=(0,i.useRef)(!0),r=(0,c.useRouter)(),n=(0,i.useState)([]),v=n[0],b=n[1],w=(0,i.useState)([]),O=w[0],E=w[1],U=(0,i.useState)([]),D=U[0],I=U[1],k=(0,i.useState)(""),C=k[0],A=k[1],N=(0,i.useState)(!1),R=N[0],T=N[1],F=function(){for(var r=arguments.length,n=new Array(r),t=0;t0&&void 0!==arguments[0]?arguments[0]:[],n=r.map((function(r){var t,o=r.serverUUID,c=S({},r,{screenshot:(null===(t=v.find((function(e){return e.serverUUID===o})))||void 0===t?void 0:t.screenshot)||""});return(0,d.Z)("".concat(l.Z,"/server/").concat(o,"?ss")).then((function(r){var t=r.screenshot;c.screenshot=t,c.isScreenshotStale=!1;var o=_(n);e.current&&b(o)})).catch((function(){c.isScreenshotStale=!0})),c}));b(n),F(n,C)},refreshInterval:6e4}).isLoading;return(0,i.useEffect)((function(){return function(){e.current=!1}}),[]),(0,t.jsxs)(u.Z,{children:[(0,t.jsx)(o.default,{children:(0,t.jsx)("title",{children:"Dashboard"})}),(0,t.jsx)(h.Z,{}),(0,t.jsx)(m.s_,{children:L?(0,t.jsx)(g.Z,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(m.V9,{children:[(0,t.jsx)(y.Z,{placeholder:"Search by server name",onChange:function(e){var r=e.target.value;A(r),F(v,r)},sx:{marginRight:".6em"},value:C}),(0,t.jsx)(p.Z,{onClick:function(){return T(!0)},children:(0,t.jsx)(a.Z,{})})]}),Z(D,r),D.length>0&&(0,t.jsx)(s.Z,{sx:{backgroundColor:f.d}}),Z(O,r)]})}),(0,t.jsx)(j.Z,{dialogProps:{open:R},onClose:function(){T(!1)}})]})}}},function(e){e.O(0,[382,483,894,182,614,485,717,746,203,899,140,116,906,774,888,179],(function(){return r=5301,e(e.s=r);var r}));var r=e.O();_N_E=r}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{5301:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(5075)}])},5741:function(e,r,n){"use strict";var t=n(5893),o=n(1714),c=n(122),i=n(7169),u=n(4690);function s(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function a(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}r.Z=function(e){var r=e.children,n=e.sx,s=l(e,["children","sx"]);return(0,t.jsx)(c.Z,a({underline:"hover",variant:"subtitle1"},s,{sx:a({color:i.lD,textDecorationColor:i.s7},n),children:(0,t.jsxs)(u.Z,{row:!0,children:[r,(0,t.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},5075:function(e,r,n){"use strict";n.r(r);var t=n(5893),o=n(9008),c=n(1163),i=n(7294),u=n(7357),s=n(7720),a=n(2428),l=n(2029),f=n(7169),v=n(5094),d=n(1200),h=n(5521),p=n(1706),b=n(5741),y=n(9),m=n(3679),x=n(1905),j=n(4968),g=n(2152);function w(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n *":{width:{xs:"20em",md:"24em"}},"& > :not(:last-child)":{marginRight:"2em"}},children:e.map((function(e){var n=e.anvilName,o=e.anvilUUID,c=e.isScreenshotStale,i=e.screenshot,u=e.serverName,s=e.serverUUID;return(0,t.jsx)(v.M,{externalPreview:i,headerEndAdornment:[(0,t.jsx)(b.Z,{href:"/server?uuid=".concat(s,"&server_name=").concat(u),children:u},"server_list_to_server_".concat(s)),(0,t.jsx)(b.Z,{href:"/anvil?anvil_uuid=".concat(o),sx:{opacity:.7},children:n},"server_list_server_".concat(s,"_to_anvil_").concat(o))],isExternalPreviewStale:c,isFetchPreview:!1,isShowControls:!1,isUseInnerPanel:!0,onClickPreview:function(){r.push("/server?uuid=".concat(s,"&server_name=").concat(u,"&vnc=1"))},serverUUID:s},"server-preview-".concat(s))}))})},P=function(e,r){return""===r?{exclude:e,include:[]}:e.reduce((function(e,n){return n.serverName.includes(r)?e.include.push(n):e.exclude.push(n),e}),{exclude:[],include:[]})};r.default=function(){var e=(0,i.useRef)(!0),r=(0,c.useRouter)(),n=(0,i.useState)([]),v=n[0],b=n[1],w=(0,i.useState)([]),O=w[0],E=w[1],U=(0,i.useState)([]),D=U[0],I=U[1],k=(0,i.useState)(""),C=k[0],A=k[1],N=(0,i.useState)(!1),R=N[0],T=N[1],F=function(){for(var r=arguments.length,n=new Array(r),t=0;t0&&void 0!==arguments[0]?arguments[0]:[],n=r.map((function(r){var t,o=r.serverUUID,c=S({},r,{screenshot:(null===(t=v.find((function(e){return e.serverUUID===o})))||void 0===t?void 0:t.screenshot)||""});return(0,d.Z)("".concat(l.Z,"/server/").concat(o,"?ss")).then((function(r){var t=r.screenshot;c.screenshot=t,c.isScreenshotStale=!1;var o=_(n);e.current&&b(o)})).catch((function(){c.isScreenshotStale=!0})),c}));b(n),F(n,C)},refreshInterval:6e4}).isLoading;return(0,i.useEffect)((function(){return function(){e.current=!1}}),[]),(0,t.jsxs)(u.Z,{children:[(0,t.jsx)(o.default,{children:(0,t.jsx)("title",{children:"Dashboard"})}),(0,t.jsx)(h.Z,{}),(0,t.jsx)(m.s_,{children:L?(0,t.jsx)(g.Z,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(m.V9,{children:[(0,t.jsx)(y.Z,{placeholder:"Search by server name",onChange:function(e){var r=e.target.value;A(r),F(v,r)},sx:{marginRight:".6em"},value:C}),(0,t.jsx)(p.Z,{onClick:function(){return T(!0)},children:(0,t.jsx)(a.Z,{})})]}),Z(D,r),D.length>0&&(0,t.jsx)(s.Z,{sx:{backgroundColor:f.d}}),Z(O,r)]})}),(0,t.jsx)(j.Z,{dialogProps:{open:R},onClose:function(){T(!1)}})]})}}},function(e){e.O(0,[382,483,894,182,614,485,717,62,780,899,140,825,94,774,888,179],(function(){return r=5301,e(e.s=r);var r}));var r=e.O();_N_E=r}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/init-e60db40234cb8025.js b/striker-ui/out/_next/static/chunks/pages/init-ae1befa8975f7914.js similarity index 99% rename from striker-ui/out/_next/static/chunks/pages/init-e60db40234cb8025.js rename to striker-ui/out/_next/static/chunks/pages/init-ae1befa8975f7914.js index a67788d6..82aff03a 100644 --- a/striker-ui/out/_next/static/chunks/pages/init-e60db40234cb8025.js +++ b/striker-ui/out/_next/static/chunks/pages/init-ae1befa8975f7914.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[464],{593:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/init",function(){return t(8616)}])},9099:function(e,n,t){"use strict";t.d(n,{Z:function(){return x}});var r=t(7294),i={boolean:function(e){return Boolean(e)},number:function(e){return parseInt(String(e),10)||0},string:function(e){return String(e)}},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.postSet,t=e.preSet,r=e.set,l=e.setType,o=void 0===l?"string":l,u=e.valueKey,a=void 0===u?"value":u;return function(e){var l=e.target[a],u=i[o](l);null===t||void 0===t||t.call(null,e),null===r||void 0===r||r.call(null,u),null===n||void 0===n||n.call(null,e)}},o=t(7987);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"===typeof e)return u(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){var n=function(e,n){if("object"!==v(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===v(n)?n:String(n)}var v=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var p="input",m={boolean:!1,number:0,string:""},h={createInputOnChangeHandlerOptions:{},required:!1,valueType:"string"},g=(0,r.forwardRef)((function(e,n){var t=e.input,i=e.inputTestBatch,u=e.onBlurAppend,v=e.onFirstRender,g=e.onFocusAppend,x=e.onUnmount,y=e.required,b=void 0===y?h.required:y,j=e.valueKey,w=e.valueType,P=void 0===w?h.valueType:w,S=e.createInputOnChangeHandlerOptions,k=void 0===S?h.createInputOnChangeHandlerOptions:S,O=k.postSet,Z=k.valueKey,C=void 0===Z?j:Z,A=s(e.createInputOnChangeHandlerOptions,["postSet","valueKey"]),I=t.props,N=(0,r.useMemo)((function(){return null!==C&&void 0!==C?C:"checked"in I?"checked":"value"}),[I,C]),V=I.onBlur,R=I.onChange,M=I.onFocus,F=I[N],H=void 0===F?m[P]:F,T=s(I,["onBlur","onChange","onFocus",N].map(f)),E=(0,r.useState)(H),z=E[0],D=E[1],B=(0,r.useState)(!1),_=B[0],L=B[1],U=(0,r.useState)(!1),q=U[0],$=U[1],Q=(0,r.useCallback)((function(e){D(e)}),[]),J=(0,r.useMemo)((function(){var e;return i&&(i.isRequired=b,e=(0,o.LT)(a({},p,i))),e}),[i,b]),G=(0,r.useMemo)((function(){return null!==V&&void 0!==V?V:J&&function(){for(var e=arguments.length,n=new Array(e),t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function a(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,l=[],o=!0,u=!1;try{for(t=t.call(e);!(o=(r=t.next()).done)&&(l.push(r.value),!n||l.length!==n);o=!0);}catch(a){u=!0,i=a}finally{try{o||null==t.return||t.return()}finally{if(u)throw i}}return l}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return o(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){var n=function(e,n){if("object"!==s(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===s(n)?n:String(n)}var s=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var d={count:0,defaultMessageType:"info",onSet:void 0,usePlaceholder:!0},f=(0,i.forwardRef)((function(e,n){var t=e.count,o=void 0===t?d.count:t,s=e.defaultMessageType,f=void 0===s?d.defaultMessageType:s,v=e.onSet,p=e.usePlaceholder,m=void 0===p?d.usePlaceholder:p,h=(0,i.useState)({}),g=h[0],x=h[1],y=(0,i.useCallback)((function(e){return void 0!==g[e]}),[g]),b=(0,i.useCallback)((function(e,n){var t=0;x((function(r){r[e];var i=u(r,[e].map(c));return n&&(i[e]=n),t=Object.keys(i).length,i})),null===v||void 0===v||v.call(null,t)}),[v]),j=(0,i.useCallback)((function(e,n){var t=0,r=n?function(e,r){e[r]=n,t+=1}:void 0;x((function(n){var i={};return Object.keys(n).forEach((function(l){e.test(l)?null===r||void 0===r||r.call(null,i,l):(i[l]=n[l],t+=1)})),i})),null===v||void 0===v||v.call(null,t)}),[v]),w=(0,i.useMemo)((function(){var e=Object.entries(g),n=o>0,t=n?o:e.length,i=[];if(e.every((function(e){var n=a(e,2),o=n[0],u=n[1],c=u.children,s=u.type,d=void 0===s?f:s;return i.push((0,r.jsx)(l.Z,{type:d,children:c},"message-".concat(o))),i.length1&&void 0!==arguments[1]?arguments[1]:{},t=n.fillString,r=void 0===t?"0":t,i=n.maxLength,l=void 0===i?2:i,o=n.which,u=void 0===o?"Start":o;return String(e)["pad".concat(u)](l,r)};function P(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function S(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var k={show:!0},O=function(e){var n=e.onClick,t=e.show,i=void 0===t?k.show:t,l=S(e,["onClick","show"]);return i?(0,r.jsx)(v.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:"",n=e.split(/\s/).filter((function(e){return!/and|of/.test(e)})).slice(0,5),t=n.length>1?2:n.length;return _[t](n)},U=function(e){var n=e.organizationPrefix,t=e.hostNumber,r=e.domainName;return[n,t,r].every((function(e){return Boolean(e)}))?"".concat(n,"-striker").concat(w(t),".").concat(r):""},q=(0,a.forwardRef)((function(e,n){var t,i,l,u,c=e.expectHostDetail,s=void 0!==c&&c,d=e.hostDetail,f=e.toggleSubmitDisabled,v=(0,a.useState)(),w=v[0],P=v[1],S=(0,a.useState)(!1),k=S[0],O=S[1],I=(0,a.useState)(!1),V=I[0],M=I[1],_=(0,a.useState)(!0),q=_[0],$=_[1],Q=(0,a.useState)(!0),J=Q[0],G=Q[1],K=(0,a.useRef)(!0),W=(0,a.useRef)({}),X=(0,a.useRef)({}),Y=(0,a.useRef)({}),ee=(0,a.useRef)({}),ne=(0,a.useRef)({}),te=(0,a.useRef)({}),re=(0,a.useRef)({}),ie=(0,a.useRef)({}),le=(0,a.useCallback)((function(e){var n;return null===(n=ie.current.setMessage)||void 0===n?void 0:n.call(null,B,e)}),[]),oe=(0,a.useCallback)((function(e){var n;return null===(n=ie.current.setMessage)||void 0===n?void 0:n.call(null,z,e)}),[]),ue=(0,a.useCallback)((function(e){var n;return null===(n=ie.current.setMessage)||void 0===n?void 0:n.call(null,T,e)}),[]),ae=(0,a.useCallback)((function(e){var n;return null===(n=ie.current.setMessage)||void 0===n?void 0:n.call(null,E,e)}),[]),ce=(0,a.useCallback)((function(e){var n;return null===(n=ie.current.setMessage)||void 0===n?void 0:n.call(null,F,e)}),[]),se=(0,a.useCallback)((function(e){var n;return null===(n=ie.current.setMessage)||void 0===n?void 0:n.call(null,H,e)}),[]),de=(0,a.useMemo)((function(){var e;return N(e={},F,{defaults:{getValue:function(){var e;return null===(e=W.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){ce(void 0)}},tests:[{onFailure:function(){ce({children:(0,r.jsxs)(r.Fragment,{children:["Admin password cannot contain single-quote (",(0,r.jsx)(A.Q0,{text:"'"}),"), double-quote (",(0,r.jsx)(A.Q0,{text:'"'}),"), slash (",(0,r.jsx)(A.Q0,{text:"/"}),"), backslash (",(0,r.jsx)(A.Q0,{text:"\\"}),"), angle brackets (",(0,r.jsx)(A.Q0,{text:"<>"}),"), curly brackets (",(0,r.jsx)(A.Q0,{text:"{}"}),")."]})})},test:function(e){var n=e.value;return!/['"/\\><}{]/g.test(n)}},{test:C.HJ}]}),N(e,H,{defaults:{getValue:function(){var e,n;return null===(e=X.current)||void 0===e||null===(n=e.getValue)||void 0===n?void 0:n.call(null)},onSuccess:function(){se(void 0)}},tests:[{onFailure:function(){se({children:"Confirmation doesn't match admin password."})},test:function(e){var n;return e.value===(null===(n=W.current.getValue)||void 0===n?void 0:n.call(null))}},{test:C.HJ}]}),N(e,T,{defaults:{compare:[!J],getValue:function(){var e;return null===(e=ne.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){ue(void 0)}},tests:[{onFailure:function(){ue({children:(0,r.jsxs)(r.Fragment,{children:["Domain name can only contain lowercase alphanumeric, hyphen (",(0,r.jsx)(A.Q0,{text:"-"}),"), and dot (",(0,r.jsx)(A.Q0,{text:"."}),") characters."]})})},test:function(e){var n=e.compare,t=e.value;return n[0]||g.FZ.test(t)}},{test:C.HJ}]}),N(e,E,{defaults:{compare:[!J],getValue:function(){var e;return null===(e=re.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){ae(void 0)}},tests:[{onFailure:function(){ae({children:(0,r.jsxs)(r.Fragment,{children:["Host name can only contain lowercase alphanumeric, hyphen (",(0,r.jsx)(A.Q0,{text:"-"}),"), and dot (",(0,r.jsx)(A.Q0,{text:"."}),") characters."]})})},test:function(e){var n=e.compare,t=e.value;return n[0]||g.FZ.test(t)}},{test:C.HJ}]}),N(e,z,{defaults:{getValue:function(){var e;return null===(e=te.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){oe(void 0)}},tests:[{onFailure:function(){oe({children:"Striker number can only contain digits."})},test:function(e){var n=e.value;return/^\d+$/.test(n)}},{test:C.HJ}]}),N(e,D,{defaults:{getValue:function(){var e;return null===(e=Y.current.getValue)||void 0===e?void 0:e.call(null)}},tests:[{test:C.HJ}]}),N(e,B,{defaults:{getValue:function(){var e;return null===(e=ee.current.getValue)||void 0===e?void 0:e.call(null)},max:5,min:1,onSuccess:function(){le(void 0)}},tests:[{onFailure:function(e){var n=e.max,t=e.min;le({children:"Organization prefix must be ".concat(t," to ").concat(n," lowercase alphanumeric characters.")})},test:function(e){var n=e.max,t=e.min,r=e.value;return RegExp("^[a-z0-9]{".concat(t,",").concat(n,"}$")).test(r)}}]}),e}),[J,ce,se,ue,ae,oe,le]),fe=(0,a.useMemo)((function(){return(0,C.LT)(de)}),[de]),ve=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.excludeTestIds,t=void 0===n?[]:n,r=e.inputs,i=e.isContinueOnFailure,l=e.isExcludeConfirmAdminPassword,o=void 0===l?!q:l;o&&t.push(H),null===f||void 0===f||f.call(null,fe({excludeTestIds:t,inputs:r,isContinueOnFailure:i,isIgnoreOnCallbacks:!0,isTestAll:!0}))}),[q,fe,f]),pe=(0,a.useCallback)((function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.organizationName,i=void 0===r?null===(t=Y.current.getValue)||void 0===t?void 0:t.call(null):r,l=L(i);return null===(e=ee.current.setValue)||void 0===e||e.call(null,l),ve({inputs:N({},B,{isIgnoreOnCallbacks:!1,value:l}),isContinueOnFailure:!0}),l}),[ve]),me=(0,a.useCallback)((function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.organizationPrefix,r=void 0===t?null===(i=ee.current.getValue)||void 0===i?void 0:i.call(null):t,o=n.hostNumber,a=void 0===o?null===(l=te.current.getValue)||void 0===l?void 0:l.call(null):o,c=n.domainName,s=void 0===c?null===(u=ne.current.getValue)||void 0===u?void 0:u.call(null):c,d=U({organizationPrefix:r,hostNumber:a,domainName:s});return null===(e=re.current.setValue)||void 0===e||e.call(null,d),ve({inputs:N({},E,{isIgnoreOnCallbacks:!1,value:d}),isContinueOnFailure:!0}),d}),[ve]),he=(0,a.useCallback)((function(){var e;return Boolean(null===(e=Y.current.getValue)||void 0===e?void 0:e.call(null))}),[]),ge=(0,a.useCallback)((function(){var e,n,t;return[null===(e=ee.current.getValue)||void 0===e?void 0:e.call(null),null===(n=te.current.getValue)||void 0===n?void 0:n.call(null),null===(t=ne.current.getValue)||void 0===t?void 0:t.call(null)].every((function(e){return Boolean(e)}))}),[]),xe=(0,a.useCallback)((function(){var e;(null===(e=ee.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))?O(he()):pe()}),[he,pe]),ye=(0,a.useCallback)((function(){var e;(null===(e=re.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))?M(ge()):me()}),[ge,me]),be=(0,a.useCallback)((function(){var e,n=pe();(null===(e=re.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))||me({organizationPrefix:n})}),[me,pe]),je=(0,a.useCallback)((function(){me()}),[me]),we=(0,a.useCallback)((function(e){return function(n){return n===e?void 0:e}}),[]),Pe=(0,a.useMemo)((function(){return(0,r.jsx)(m.Z,{checked:J,onChange:function(e,n){var t;G(n),ve({inputs:(t={},N(t,T,{compare:[!n],isIgnoreOnCallbacks:!1}),N(t,E,{compare:[!n],isIgnoreOnCallbacks:!1}),t),isContinueOnFailure:!0})},sx:{padding:".2em"}})}),[J,ve]);return(0,a.useEffect)((function(){if([s,d,K.current,ne.current,re.current,te.current,Y.current,ee.current].every((function(e){return Boolean(e)}))){var e,n,t,r,i;K.current=!1;var l=d.domain,o=d.hostName,u=d.organization,a=d.prefix,c=d.sequence;null===(e=ne.current.setValue)||void 0===e||e.call(null,l),null===(n=re.current.setValue)||void 0===n||n.call(null,o),null===(t=te.current.setValue)||void 0===t||t.call(null,c),null===(r=Y.current.setValue)||void 0===r||r.call(null,u),null===(i=ee.current.setValue)||void 0===i||i.call(null,a),ve()}}),[s,d,ve]),(0,a.useImperativeHandle)(n,(function(){return{get:function(){var e,n,t,r,i,l;return{adminPassword:null===(e=W.current.getValue)||void 0===e?void 0:e.call(null),organizationName:null===(n=Y.current.getValue)||void 0===n?void 0:n.call(null),organizationPrefix:null===(t=ee.current.getValue)||void 0===t?void 0:t.call(null),domainName:null===(r=ne.current.getValue)||void 0===r?void 0:r.call(null),hostNumber:null===(i=te.current.getValue)||void 0===i?void 0:i.call(null),hostName:null===(l=re.current.getValue)||void 0===l?void 0:l.call(null)}}}})),(0,r.jsxs)(p.Z,{children:[(0,r.jsxs)(o.ZP,{columns:{xs:1,sm:2,md:3},container:!0,spacing:"1em",children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(x.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-organization-name",inputProps:{onBlur:xe},inputLabelProps:{isNotifyRequired:!0},label:"Organization name",onChange:function(){ve()},onHelp:function(){P(we("Name of the organization that maintains this Anvil! system. You can enter anything that makes sense to you."))}}),ref:Y}),(0,r.jsxs)(p.Z,{row:!0,sx:{"& > :first-child":{flexGrow:1}},children:[(0,r.jsx)(x.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-organization-prefix",inputProps:{endAdornment:(0,r.jsx)(Z,{show:k,onClick:be}),inputProps:{maxLength:5,sx:{minWidth:"2.5em"}},onBlur:function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r1?n-1:0),r=1;r * > *":{width:"100%"}},children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(x.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-admin-password",inputProps:{inputProps:{type:h.Z.password},onBlur:function(e){var n=e.target.value;fe({inputs:N({},F,{value:n})})},onPasswordVisibilityAppend:function(e){var n=e===h.Z.password;ve({isExcludeConfirmAdminPassword:!n}),$(n),se()}},inputLabelProps:{isNotifyRequired:!0},label:"Admin password",onChange:function(e){var n=e.target.value;ve({inputs:N({},F,{value:n})}),ce()},onHelp:function(){P(we("Password use to login to this Striker and connect to its database. Don't provide an used password here because it'll be stored as plaintext."))}}),ref:W})}),q&&(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(x.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-confirm-admin-password",inputProps:{inputProps:{type:h.Z.password},onBlur:function(e){var n=e.target.value;fe({inputs:N({},H,{value:n})})}},inputLabelProps:{isNotifyRequired:q},label:"Confirm password",onChange:function(e){var n=e.target.value;ve({inputs:N({},H,{value:n})}),se()}}),ref:X})})]})})]}),(0,r.jsx)(b.Z,{count:1,defaultMessageType:"warning",ref:ie}),(0,r.jsx)(y.Z,{children:(0,r.jsxs)(p.Z,{row:!0,sx:{"& > :last-child":{flexGrow:1}},children:[Pe,(0,r.jsx)(A.Ac,{inverted:!0,children:J?"Uncheck to skip domain and host name pattern validation.":"Check to re-enable domain and host name pattern validation."})]})}),w&&(0,r.jsx)(y.Z,{onClose:function(){P(void 0)},children:w})]})}));q.defaultProps={expectHostDetail:!1,hostDetail:void 0,toggleSubmitDisabled:void 0},q.displayName="GeneralInitForm";var $=q,Q=t(1770),J=t(1706),G=t(3377),K=t(2444),W=t(5741),X=t(8461),Y=t(3679),ee=t(2152),ne=t(2749);function te(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:{},n=e.postSet,t=e.preSet,r=e.set,l=e.setType,o=void 0===l?"string":l,u=e.valueKey,a=void 0===u?"value":u;return function(e){var l=e.target[a],u=i[o](l);null===t||void 0===t||t.call(null,e),null===r||void 0===r||r.call(null,u),null===n||void 0===n||n.call(null,e)}},o=t(7987);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"===typeof e)return u(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){var n=function(e,n){if("object"!==v(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===v(n)?n:String(n)}var v=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var p="input",m={boolean:!1,number:0,string:""},h={createInputOnChangeHandlerOptions:{},required:!1,valueType:"string"},g=(0,r.forwardRef)((function(e,n){var t=e.input,i=e.inputTestBatch,u=e.onBlurAppend,v=e.onFirstRender,g=e.onFocusAppend,x=e.onUnmount,y=e.required,b=void 0===y?h.required:y,j=e.valueKey,w=e.valueType,P=void 0===w?h.valueType:w,S=e.createInputOnChangeHandlerOptions,k=void 0===S?h.createInputOnChangeHandlerOptions:S,O=k.postSet,Z=k.valueKey,C=void 0===Z?j:Z,A=s(e.createInputOnChangeHandlerOptions,["postSet","valueKey"]),I=t.props,N=(0,r.useMemo)((function(){return null!==C&&void 0!==C?C:"checked"in I?"checked":"value"}),[I,C]),V=I.onBlur,R=I.onChange,M=I.onFocus,F=I[N],H=void 0===F?m[P]:F,T=s(I,["onBlur","onChange","onFocus",N].map(f)),E=(0,r.useState)(H),z=E[0],D=E[1],B=(0,r.useState)(!1),_=B[0],L=B[1],U=(0,r.useState)(!1),q=U[0],$=U[1],Q=(0,r.useCallback)((function(e){D(e)}),[]),J=(0,r.useMemo)((function(){var e;return i&&(i.isRequired=b,e=(0,o.LT)(a({},p,i))),e}),[i,b]),G=(0,r.useMemo)((function(){return null!==V&&void 0!==V?V:J&&function(){for(var e=arguments.length,n=new Array(e),t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function a(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,l=[],o=!0,u=!1;try{for(t=t.call(e);!(o=(r=t.next()).done)&&(l.push(r.value),!n||l.length!==n);o=!0);}catch(a){u=!0,i=a}finally{try{o||null==t.return||t.return()}finally{if(u)throw i}}return l}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return o(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){var n=function(e,n){if("object"!==s(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===s(n)?n:String(n)}var s=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var d={count:0,defaultMessageType:"info",onSet:void 0,usePlaceholder:!0},f=(0,i.forwardRef)((function(e,n){var t=e.count,o=void 0===t?d.count:t,s=e.defaultMessageType,f=void 0===s?d.defaultMessageType:s,v=e.onSet,p=e.usePlaceholder,m=void 0===p?d.usePlaceholder:p,h=(0,i.useState)({}),g=h[0],x=h[1],y=(0,i.useCallback)((function(e){return void 0!==g[e]}),[g]),b=(0,i.useCallback)((function(e,n){var t=0;x((function(r){r[e];var i=u(r,[e].map(c));return n&&(i[e]=n),t=Object.keys(i).length,i})),null===v||void 0===v||v.call(null,t)}),[v]),j=(0,i.useCallback)((function(e,n){var t=0,r=n?function(e,r){e[r]=n,t+=1}:void 0;x((function(n){var i={};return Object.keys(n).forEach((function(l){e.test(l)?null===r||void 0===r||r.call(null,i,l):(i[l]=n[l],t+=1)})),i})),null===v||void 0===v||v.call(null,t)}),[v]),w=(0,i.useMemo)((function(){var e=Object.entries(g),n=o>0,t=n?o:e.length,i=[];if(e.every((function(e){var n=a(e,2),o=n[0],u=n[1],c=u.children,s=u.type,d=void 0===s?f:s;return i.push((0,r.jsx)(l.Z,{type:d,children:c},"message-".concat(o))),i.length1&&void 0!==arguments[1]?arguments[1]:{},t=n.fillString,r=void 0===t?"0":t,i=n.maxLength,l=void 0===i?2:i,o=n.which,u=void 0===o?"Start":o;return String(e)["pad".concat(u)](l,r)};function P(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function S(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},l=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var k={show:!0},O=function(e){var n=e.onClick,t=e.show,i=void 0===t?k.show:t,l=S(e,["onClick","show"]);return i?(0,r.jsx)(v.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:"",n=e.split(/\s/).filter((function(e){return!/and|of/.test(e)})).slice(0,5),t=n.length>1?2:n.length;return _[t](n)},U=function(e){var n=e.organizationPrefix,t=e.hostNumber,r=e.domainName;return[n,t,r].every((function(e){return Boolean(e)}))?"".concat(n,"-striker").concat(w(t),".").concat(r):""},q=(0,a.forwardRef)((function(e,n){var t,i,l,u,c=e.expectHostDetail,s=void 0!==c&&c,d=e.hostDetail,f=e.toggleSubmitDisabled,v=(0,a.useState)(),w=v[0],P=v[1],S=(0,a.useState)(!1),k=S[0],O=S[1],I=(0,a.useState)(!1),V=I[0],M=I[1],_=(0,a.useState)(!0),q=_[0],$=_[1],Q=(0,a.useState)(!0),J=Q[0],G=Q[1],K=(0,a.useRef)(!0),W=(0,a.useRef)({}),X=(0,a.useRef)({}),Y=(0,a.useRef)({}),ee=(0,a.useRef)({}),ne=(0,a.useRef)({}),te=(0,a.useRef)({}),re=(0,a.useRef)({}),ie=(0,a.useRef)({}),le=(0,a.useCallback)((function(e){var n;return null===(n=ie.current.setMessage)||void 0===n?void 0:n.call(null,B,e)}),[]),oe=(0,a.useCallback)((function(e){var n;return null===(n=ie.current.setMessage)||void 0===n?void 0:n.call(null,z,e)}),[]),ue=(0,a.useCallback)((function(e){var n;return null===(n=ie.current.setMessage)||void 0===n?void 0:n.call(null,T,e)}),[]),ae=(0,a.useCallback)((function(e){var n;return null===(n=ie.current.setMessage)||void 0===n?void 0:n.call(null,E,e)}),[]),ce=(0,a.useCallback)((function(e){var n;return null===(n=ie.current.setMessage)||void 0===n?void 0:n.call(null,F,e)}),[]),se=(0,a.useCallback)((function(e){var n;return null===(n=ie.current.setMessage)||void 0===n?void 0:n.call(null,H,e)}),[]),de=(0,a.useMemo)((function(){var e;return N(e={},F,{defaults:{getValue:function(){var e;return null===(e=W.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){ce(void 0)}},tests:[{onFailure:function(){ce({children:(0,r.jsxs)(r.Fragment,{children:["Admin password cannot contain single-quote (",(0,r.jsx)(A.Q0,{text:"'"}),"), double-quote (",(0,r.jsx)(A.Q0,{text:'"'}),"), slash (",(0,r.jsx)(A.Q0,{text:"/"}),"), backslash (",(0,r.jsx)(A.Q0,{text:"\\"}),"), angle brackets (",(0,r.jsx)(A.Q0,{text:"<>"}),"), curly brackets (",(0,r.jsx)(A.Q0,{text:"{}"}),")."]})})},test:function(e){var n=e.value;return!/['"/\\><}{]/g.test(n)}},{test:C.HJ}]}),N(e,H,{defaults:{getValue:function(){var e,n;return null===(e=X.current)||void 0===e||null===(n=e.getValue)||void 0===n?void 0:n.call(null)},onSuccess:function(){se(void 0)}},tests:[{onFailure:function(){se({children:"Confirmation doesn't match admin password."})},test:function(e){var n;return e.value===(null===(n=W.current.getValue)||void 0===n?void 0:n.call(null))}},{test:C.HJ}]}),N(e,T,{defaults:{compare:[!J],getValue:function(){var e;return null===(e=ne.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){ue(void 0)}},tests:[{onFailure:function(){ue({children:(0,r.jsxs)(r.Fragment,{children:["Domain name can only contain lowercase alphanumeric, hyphen (",(0,r.jsx)(A.Q0,{text:"-"}),"), and dot (",(0,r.jsx)(A.Q0,{text:"."}),") characters."]})})},test:function(e){var n=e.compare,t=e.value;return n[0]||g.FZ.test(t)}},{test:C.HJ}]}),N(e,E,{defaults:{compare:[!J],getValue:function(){var e;return null===(e=re.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){ae(void 0)}},tests:[{onFailure:function(){ae({children:(0,r.jsxs)(r.Fragment,{children:["Host name can only contain lowercase alphanumeric, hyphen (",(0,r.jsx)(A.Q0,{text:"-"}),"), and dot (",(0,r.jsx)(A.Q0,{text:"."}),") characters."]})})},test:function(e){var n=e.compare,t=e.value;return n[0]||g.FZ.test(t)}},{test:C.HJ}]}),N(e,z,{defaults:{getValue:function(){var e;return null===(e=te.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){oe(void 0)}},tests:[{onFailure:function(){oe({children:"Striker number can only contain digits."})},test:function(e){var n=e.value;return/^\d+$/.test(n)}},{test:C.HJ}]}),N(e,D,{defaults:{getValue:function(){var e;return null===(e=Y.current.getValue)||void 0===e?void 0:e.call(null)}},tests:[{test:C.HJ}]}),N(e,B,{defaults:{getValue:function(){var e;return null===(e=ee.current.getValue)||void 0===e?void 0:e.call(null)},max:5,min:1,onSuccess:function(){le(void 0)}},tests:[{onFailure:function(e){var n=e.max,t=e.min;le({children:"Organization prefix must be ".concat(t," to ").concat(n," lowercase alphanumeric characters.")})},test:function(e){var n=e.max,t=e.min,r=e.value;return RegExp("^[a-z0-9]{".concat(t,",").concat(n,"}$")).test(r)}}]}),e}),[J,ce,se,ue,ae,oe,le]),fe=(0,a.useMemo)((function(){return(0,C.LT)(de)}),[de]),ve=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.excludeTestIds,t=void 0===n?[]:n,r=e.inputs,i=e.isContinueOnFailure,l=e.isExcludeConfirmAdminPassword,o=void 0===l?!q:l;o&&t.push(H),null===f||void 0===f||f.call(null,fe({excludeTestIds:t,inputs:r,isContinueOnFailure:i,isIgnoreOnCallbacks:!0,isTestAll:!0}))}),[q,fe,f]),pe=(0,a.useCallback)((function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.organizationName,i=void 0===r?null===(t=Y.current.getValue)||void 0===t?void 0:t.call(null):r,l=L(i);return null===(e=ee.current.setValue)||void 0===e||e.call(null,l),ve({inputs:N({},B,{isIgnoreOnCallbacks:!1,value:l}),isContinueOnFailure:!0}),l}),[ve]),me=(0,a.useCallback)((function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.organizationPrefix,r=void 0===t?null===(i=ee.current.getValue)||void 0===i?void 0:i.call(null):t,o=n.hostNumber,a=void 0===o?null===(l=te.current.getValue)||void 0===l?void 0:l.call(null):o,c=n.domainName,s=void 0===c?null===(u=ne.current.getValue)||void 0===u?void 0:u.call(null):c,d=U({organizationPrefix:r,hostNumber:a,domainName:s});return null===(e=re.current.setValue)||void 0===e||e.call(null,d),ve({inputs:N({},E,{isIgnoreOnCallbacks:!1,value:d}),isContinueOnFailure:!0}),d}),[ve]),he=(0,a.useCallback)((function(){var e;return Boolean(null===(e=Y.current.getValue)||void 0===e?void 0:e.call(null))}),[]),ge=(0,a.useCallback)((function(){var e,n,t;return[null===(e=ee.current.getValue)||void 0===e?void 0:e.call(null),null===(n=te.current.getValue)||void 0===n?void 0:n.call(null),null===(t=ne.current.getValue)||void 0===t?void 0:t.call(null)].every((function(e){return Boolean(e)}))}),[]),xe=(0,a.useCallback)((function(){var e;(null===(e=ee.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))?O(he()):pe()}),[he,pe]),ye=(0,a.useCallback)((function(){var e;(null===(e=re.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))?M(ge()):me()}),[ge,me]),be=(0,a.useCallback)((function(){var e,n=pe();(null===(e=re.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))||me({organizationPrefix:n})}),[me,pe]),je=(0,a.useCallback)((function(){me()}),[me]),we=(0,a.useCallback)((function(e){return function(n){return n===e?void 0:e}}),[]),Pe=(0,a.useMemo)((function(){return(0,r.jsx)(m.Z,{checked:J,onChange:function(e,n){var t;G(n),ve({inputs:(t={},N(t,T,{compare:[!n],isIgnoreOnCallbacks:!1}),N(t,E,{compare:[!n],isIgnoreOnCallbacks:!1}),t),isContinueOnFailure:!0})},sx:{padding:".2em"}})}),[J,ve]);return(0,a.useEffect)((function(){if([s,d,K.current,ne.current,re.current,te.current,Y.current,ee.current].every((function(e){return Boolean(e)}))){var e,n,t,r,i;K.current=!1;var l=d.domain,o=d.hostName,u=d.organization,a=d.prefix,c=d.sequence;null===(e=ne.current.setValue)||void 0===e||e.call(null,l),null===(n=re.current.setValue)||void 0===n||n.call(null,o),null===(t=te.current.setValue)||void 0===t||t.call(null,c),null===(r=Y.current.setValue)||void 0===r||r.call(null,u),null===(i=ee.current.setValue)||void 0===i||i.call(null,a),ve()}}),[s,d,ve]),(0,a.useImperativeHandle)(n,(function(){return{get:function(){var e,n,t,r,i,l;return{adminPassword:null===(e=W.current.getValue)||void 0===e?void 0:e.call(null),organizationName:null===(n=Y.current.getValue)||void 0===n?void 0:n.call(null),organizationPrefix:null===(t=ee.current.getValue)||void 0===t?void 0:t.call(null),domainName:null===(r=ne.current.getValue)||void 0===r?void 0:r.call(null),hostNumber:null===(i=te.current.getValue)||void 0===i?void 0:i.call(null),hostName:null===(l=re.current.getValue)||void 0===l?void 0:l.call(null)}}}})),(0,r.jsxs)(p.Z,{children:[(0,r.jsxs)(o.ZP,{columns:{xs:1,sm:2,md:3},container:!0,spacing:"1em",children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(x.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-organization-name",inputProps:{onBlur:xe},inputLabelProps:{isNotifyRequired:!0},label:"Organization name",onChange:function(){ve()},onHelp:function(){P(we("Name of the organization that maintains this Anvil! system. You can enter anything that makes sense to you."))}}),ref:Y}),(0,r.jsxs)(p.Z,{row:!0,sx:{"& > :first-child":{flexGrow:1}},children:[(0,r.jsx)(x.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-organization-prefix",inputProps:{endAdornment:(0,r.jsx)(Z,{show:k,onClick:be}),inputProps:{maxLength:5,sx:{minWidth:"2.5em"}},onBlur:function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r1?n-1:0),r=1;r * > *":{width:"100%"}},children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(x.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-admin-password",inputProps:{inputProps:{type:h.Z.password},onBlur:function(e){var n=e.target.value;fe({inputs:N({},F,{value:n})})},onPasswordVisibilityAppend:function(e){var n=e===h.Z.password;ve({isExcludeConfirmAdminPassword:!n}),$(n),se()}},inputLabelProps:{isNotifyRequired:!0},label:"Admin password",onChange:function(e){var n=e.target.value;ve({inputs:N({},F,{value:n})}),ce()},onHelp:function(){P(we("Password use to login to this Striker and connect to its database. Don't provide an used password here because it'll be stored as plaintext."))}}),ref:W})}),q&&(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(x.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-confirm-admin-password",inputProps:{inputProps:{type:h.Z.password},onBlur:function(e){var n=e.target.value;fe({inputs:N({},H,{value:n})})}},inputLabelProps:{isNotifyRequired:q},label:"Confirm password",onChange:function(e){var n=e.target.value;ve({inputs:N({},H,{value:n})}),se()}}),ref:X})})]})})]}),(0,r.jsx)(b.Z,{count:1,defaultMessageType:"warning",ref:ie}),(0,r.jsx)(y.Z,{children:(0,r.jsxs)(p.Z,{row:!0,sx:{"& > :last-child":{flexGrow:1}},children:[Pe,(0,r.jsx)(A.Ac,{inverted:!0,children:J?"Uncheck to skip domain and host name pattern validation.":"Check to re-enable domain and host name pattern validation."})]})}),w&&(0,r.jsx)(y.Z,{onClose:function(){P(void 0)},children:w})]})}));q.defaultProps={expectHostDetail:!1,hostDetail:void 0,toggleSubmitDisabled:void 0},q.displayName="GeneralInitForm";var $=q,Q=t(1770),J=t(1706),G=t(3377),K=t(2444),W=t(5741),X=t(8461),Y=t(3679),ee=t(2152),ne=t(2749);function te(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);tn.length)&&(e=n.length);for(var t=0,r=new Array(e);t=0||(i[t]=n[t]);return i}(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function j(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,i,o=[],u=!0,a=!1;try{for(t=t.call(n);!(u=(r=t.next()).done)&&(o.push(r.value),!e||o.length!==e);u=!0);}catch(l){a=!0,i=l}finally{try{u||null==t.return||t.return()}finally{if(a)throw i}}return o}}(n,e)||P(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(n){return function(n){if(Array.isArray(n))return v(n)}(n)||function(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||P(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(n,e){if(n){if("string"===typeof n)return v(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(n,e):void 0}}var O={width:"100%"},I="gate-input",Z="".concat(I,"-credential-id"),S="".concat(I,"-credential-passphrase"),A="access",L=(0,o.forwardRef)((function(n,e){var t,v,y=n.formContainer,P=void 0===y||y,I=n.gridProps,L=void 0===I?{}:I,C=L.columns,_=void 0===C?{xs:1,sm:2}:C,F=(L.layout,L.spacing),E=void 0===F?"1em":F,M=n.identifierId,R=void 0===M?Z:M,T=n.identifierInputTestBatchBuilder,B=void 0===T?m.Gn:T,k=n.identifierLabel,N=n.identifierOutlinedInputWithLabelProps,U=void 0===N?{}:N,W=U.formControlProps,G=void 0===W?{}:W,q=U.inputProps,z=n.onIdentifierBlurAppend,D=n.onSubmit,V=n.onSubmitAppend,X=n.passphraseId,H=void 0===X?S:X,Q=n.passphraseLabel,$=n.passphraseOutlinedInputWithLabelProps,J=void 0===$?{}:$,K=J.formControlProps,Y=void 0===K?{}:K,nn=J.inputProps,en=n.submitLabel,tn=n.allowSubmit,rn=void 0===tn?P:tn,on=x(n.gridProps,["columns","layout","spacing"]),un=x(n.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),an=x(n.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ln=G.sx,sn=x(G,["sx"]),cn=Y.sx,pn=x(Y,["sx"]),dn=(0,o.useRef)({}),fn=(0,o.useRef)({}),mn=(0,o.useRef)({}),hn=j((0,b.Z)(!1),2),bn=hn[0],vn=hn[1],yn=(0,h.Z)([Z,S],mn),gn=yn.buildFinishInputTestBatchFunction,xn=yn.buildInputFirstRenderFunction,jn=yn.buildInputUnmountFunction,wn=yn.isFormInvalid,Pn=yn.setMessage,On=(0,o.useMemo)((function(){return null!==D&&void 0!==D?D:function(){for(var n=arguments.length,e=new Array(n),t=0;tn.length)&&(e=n.length);for(var t=0,r=new Array(e);t=0||(i[t]=n[t]);return i}(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function j(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,i,o=[],u=!0,a=!1;try{for(t=t.call(n);!(u=(r=t.next()).done)&&(o.push(r.value),!e||o.length!==e);u=!0);}catch(l){a=!0,i=l}finally{try{u||null==t.return||t.return()}finally{if(a)throw i}}return o}}(n,e)||P(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(n){return function(n){if(Array.isArray(n))return v(n)}(n)||function(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||P(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(n,e){if(n){if("string"===typeof n)return v(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(n,e):void 0}}var O={width:"100%"},I="gate-input",Z="".concat(I,"-credential-id"),S="".concat(I,"-credential-passphrase"),A="access",L=(0,o.forwardRef)((function(n,e){var t,v,y=n.formContainer,P=void 0===y||y,I=n.gridProps,L=void 0===I?{}:I,C=L.columns,_=void 0===C?{xs:1,sm:2}:C,F=(L.layout,L.spacing),E=void 0===F?"1em":F,M=n.identifierId,R=void 0===M?Z:M,T=n.identifierInputTestBatchBuilder,B=void 0===T?m.Gn:T,k=n.identifierLabel,N=n.identifierOutlinedInputWithLabelProps,U=void 0===N?{}:N,W=U.formControlProps,G=void 0===W?{}:W,q=U.inputProps,z=n.onIdentifierBlurAppend,D=n.onSubmit,V=n.onSubmitAppend,X=n.passphraseId,H=void 0===X?S:X,Q=n.passphraseLabel,$=n.passphraseOutlinedInputWithLabelProps,J=void 0===$?{}:$,K=J.formControlProps,Y=void 0===K?{}:K,nn=J.inputProps,en=n.submitLabel,tn=n.allowSubmit,rn=void 0===tn?P:tn,on=x(n.gridProps,["columns","layout","spacing"]),un=x(n.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),an=x(n.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ln=G.sx,sn=x(G,["sx"]),cn=Y.sx,pn=x(Y,["sx"]),dn=(0,o.useRef)({}),fn=(0,o.useRef)({}),mn=(0,o.useRef)({}),hn=j((0,b.Z)(!1),2),bn=hn[0],vn=hn[1],yn=(0,h.Z)([Z,S],mn),gn=yn.buildFinishInputTestBatchFunction,xn=yn.buildInputFirstRenderFunction,jn=yn.buildInputUnmountFunction,wn=yn.isFormInvalid,Pn=yn.setMessage,On=(0,o.useMemo)((function(){return null!==D&&void 0!==D?D:function(){for(var n=arguments.length,e=new Array(n),t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var y=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,h({},e))})};n.Z=function(e){var n=e.componentsProps,t=e.extendRenderInput,o=e.label,i=e.messageBoxProps,b=e.renderInput,g=e.sx,j=v(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),x=h({paper:{sx:{backgroundColor:d.lD}}},n),w=null!==b&&void 0!==b?b:function(e){var n=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,u=e.inputProps,c={formControlProps:{fullWidth:n,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:u,startAdornment:i.startAdornment},label:o};return null===t||void 0===t||t.call(null,c,e),(0,r.jsx)(p.Z,h({},c))},O=h(m({},"& .".concat(a.Z.root," .").concat(u.Z.endAdornment),m({right:"7px"},"& .".concat(c.Z.root),{color:d.s7})),g);return(0,r.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(s.Z,h({PaperComponent:y},j,{componentsProps:x,renderInput:w,sx:O})),(0,r.jsx)(f.Z,h({},i))]})}},2545:function(e,n,t){"use strict";var r=t(5893),o=t(7294),i=t(157);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var u=(0,o.forwardRef)((function(e,n){var t=e.scrollContent,u=(0,o.useMemo)((function(){return t?".5em":void 0}),[t]);return(0,r.jsx)(i.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function x(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||O(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,n){if(e){if("string"===typeof e)return y(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?y(e,n):void 0}}var k={width:"100%"},P="gate-input",I="".concat(P,"-credential-id"),Z="".concat(P,"-credential-passphrase"),S="access",A=(0,i.forwardRef)((function(e,n){var t,y,b=e.formContainer,O=void 0===b||b,P=e.gridProps,A=void 0===P?{}:P,M=A.columns,T=void 0===M?{xs:1,sm:2}:M,F=(A.layout,A.spacing),C=void 0===F?"1em":F,U=e.identifierId,E=void 0===U?I:U,N=e.identifierInputTestBatchBuilder,R=void 0===N?m.Gn:N,B=e.identifierLabel,D=e.identifierOutlinedInputWithLabelProps,L=void 0===D?{}:D,q=L.formControlProps,_=void 0===q?{}:q,H=L.inputProps,V=e.onIdentifierBlurAppend,$=e.onSubmit,G=e.onSubmitAppend,z=e.passphraseId,W=void 0===z?Z:z,Q=e.passphraseLabel,K=e.passphraseOutlinedInputWithLabelProps,J=void 0===K?{}:K,X=J.formControlProps,Y=void 0===X?{}:X,ee=J.inputProps,ne=e.submitLabel,te=e.allowSubmit,re=void 0===te?O:te,oe=j(e.gridProps,["columns","layout","spacing"]),ie=j(e.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ae=j(e.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ue=_.sx,ce=j(_,["sx"]),le=Y.sx,se=j(Y,["sx"]),de=(0,i.useRef)({}),fe=(0,i.useRef)({}),pe=(0,i.useRef)({}),me=x((0,v.Z)(!1),2),he=me[0],ve=me[1],ye=(0,h.Z)([I,Z],pe),be=ye.buildFinishInputTestBatchFunction,ge=ye.buildInputFirstRenderFunction,je=ye.buildInputUnmountFunction,xe=ye.isFormInvalid,we=ye.setMessage,Oe=(0,i.useMemo)((function(){return null!==$&&void 0!==$?$:function(){for(var e=arguments.length,n=new Array(e),t=0;t0}),[f.length]),h=(0,o.useMemo)((function(){return d.length>1}),[d.length]),v=(0,o.useCallback)((function(e){var n=e.confirmDialogProps,t=void 0===n?{}:n,o=e.formSummaryProps,i=void 0===o?{}:o,u=e.getConfirmDialogTitle,s=e.onProceedAppend,d=e.renderEntry;return c({actionProceedText:"Delete",content:(0,r.jsx)(a.Z,c({entries:l,maxDepth:0,renderEntry:d},i)),onProceedAppend:s,proceedColour:"red",titleText:u(f.length)},t)}),[l,f.length]),y=(0,o.useCallback)((function(e){return l[e]}),[l]),b=(0,o.useCallback)((function(e){return s(d.reduce((function(n,t){return e&&(n[t]=e),n}),{}))}),[d]),g=(0,o.useCallback)((function(e,n){return s((0,i.ZP)(e,n||void 0))}),[]);return{buildDeleteDialogProps:v,checklist:l,checks:f,getCheck:y,hasAllChecks:p,hasChecks:m,multipleItems:h,setAllChecks:b,setCheck:g}}},6632:function(e,n,t){"use strict";var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.actionProceedText,t=void 0===n?"":n,o=e.content,u=void 0===o?"":o,c=e.titleText,l=void 0===c?"":c,s=a(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:t,content:u,titleText:l},s))}},8938:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Cr}});var r=t(5893),o=t(9008),i=t(1163),a=t(7294),u=t(4390);function c(e,n){return null!=n&&"undefined"!==typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](e):e instanceof n}var l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.fallbackValue,r=void 0===t?"":t,o=n.joinSeparator,i=void 0===o?"":o,a=n.limit,u=void 0===a?1:a;return c(e,Array)?e.slice(0,u).join(i):null!==e&&void 0!==e?e:r},s=t(7504),d=t(1770),f=t(5521),p=t(2029),m=t(7357),h=t(4594),v=t(1496),y=t(4386),b=t(4188),g=t(4690),j=t(9099),x=t(6284),w=t(3679),O=t(7783),k=t(480),P=t(2852),I=t(7169),Z=t(7750);function S(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function A(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);tE(n,1)[0]?1:-1})).reduce((function(e,o){var a=E(o,2),u=a[0],c=a[1],l=c.content_type,s=c.default,d=c.deprecated,p=c.description,h=c.options,v=c.required;if("1"===String(d))return e;var b,g,j=e.optional,x=e.required,w=null!==(b=D[l])&&void 0!==b?b:D.string,O=L(n,u),k=null!==(g=f[O])&&void 0!==g?g:s,P="1"===String(v),I=/passw/i.test(u),S=w({formUtils:i,id:O,isChecked:N.includes(k),isRequired:P,isSensitive:I,label:u,selectOptions:h,value:k}),A=(0,r.jsx)(y.Z,function(e){for(var n=1;n div:first-child":{marginTop:0},"& > div":{marginBottom:0}},children:[(0,r.jsx)(w.TZ,{expandInitially:!0,header:"Required parameters",children:(0,r.jsxs)(q,{children:[(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:b,label:O,name:b,value:u}),inputTestBatch:(0,F.Gn)(O,(function(){d(b)}),{onFinishBatch:l(b)},(function(e){d(b,{children:e})})),onFirstRender:s(b),required:!0},"".concat(b,"-wrapper")),v]})}),(0,r.jsx)(w.TZ,{header:"Optional parameters",children:(0,r.jsx)(q,{children:h})})]})}return e}),[l,s,n,t,o,i,u,c,d]);return(0,r.jsx)(r.Fragment,{children:f})},H=t(2152),V=t(1081);function $(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);tz(n,1)[0]?1:-1})).map((function(e){var n=z(e,2),t=n[0],r=n[1].description;return{fenceDescription:"string"===typeof r?r:"No description.",fenceId:t,label:t}})):[]}),[n]),f=(0,a.useMemo)((function(){return(0,r.jsx)(h.Z,{id:W,isOptionEqualToValue:function(e,n){return e.fenceId===n.fenceId},label:"Fence device type",onChange:function(e,n){i(W,null!==n),s(n)},openOnFocus:!0,options:d,renderOption:function(e,n,t){var o=n.fenceDescription,i=n.fenceId,a=t.selected;return(0,r.jsxs)(m.Z,function(e){for(var n=1;n *":{width:"100%"}}},e,{children:[(0,r.jsx)(Z.Ac,{inverted:!0,sx:{fontSize:"1.2em",fontWeight:a?400:void 0},children:i}),(0,r.jsx)(Z.Ac,{selected:!1,children:o})]}))},sx:{marginTop:".3em"},value:l})}),[d,l,i]),p=(0,a.useMemo)((function(){return(0,r.jsx)(_,{fenceId:null===l||void 0===l?void 0:l.fenceId,fenceTemplate:n,formUtils:t})}),[n,null===l||void 0===l?void 0:l.fenceId,t]),v=(0,a.useMemo)((function(){return o?(0,r.jsx)(H.Z,{}):(0,r.jsxs)(g.Z,{children:[f,p]})}),[f,p,o]);return(0,a.useEffect)((function(){u&&i(W,null!==l)}),[l,u,i]),(0,r.jsx)(r.Fragment,{children:v})},K=t(157),J=function(e){var n=e.fenceId,t=e.fenceTemplate,o=e.formUtils,i=e.loading,u=e.previousFenceName,c=e.previousFenceParameters,l=(0,a.useMemo)((function(){return i?(0,r.jsx)(H.Z,{}):(0,r.jsx)(_,{fenceId:n,fenceTemplate:t,formUtils:o,previousFenceName:u,previousFenceParameters:c})}),[t,n,o,i,u,c]);return(0,r.jsx)(r.Fragment,{children:l})},X=t(2545),Y=t(8610),ee=t(6125),ne=t(7869),te=t(1905),re=t(3906),oe=t(6632),ie=t(8859),ae=t(2749);function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:{},r=n.input,o=void 0===r?t:r,i=n.end,a=void 0===i?t.length:i,u=a-1,c=0;return o.every((function(n,t){return tn(n,2)[1].networkType===e&&(c+=1),t0&&void 0!==arguments[0]?arguments[0]:{},n=e.networkMinIp,t=void 0===n?"":n,r=e.networkSubnetMask,o=void 0===r?"":r,i=e.networkType,a=void 0===i?"ifn":i,u=e.networkGateway,c=void 0===u?sn(a)?"":void 0:u,l=e.networkNumber,s=void 0===l?y(a)+1:l;return{network:{networkGateway:c,networkMinIp:t,networkNumber:s,networkSubnetMask:o,networkType:a},networkId:(0,_e.Z)()}}),[y]),w=(0,a.useCallback)((function(e,n){return f((0,Xe.ZP)(e,n))}),[f]),O=(0,a.useCallback)((function(e,n){var r=e.networkId,o=e.networkType,i=n.target.value,a=String(i),u=!1,c=0,l=t.reduce((function(e,n){var t=tn(n,2),i=t[0],l=t[1],s=l.networkNumber,d=l.networkType;i===r&&(u=!0,d=a,v(RegExp(i)));var f=d===a;return f&&(c+=1),u?(f?s=c:d===o&&(s-=1),e[i]=nn({},l,{networkNumber:s,networkType:d})):e[i]=l,e}),{});f(l)}),[t,v,f]),k=(0,a.useCallback)((function(e){var n=e.networkId,r=e.networkType,o=!1,i=0,a=t.reduce((function(e,t){var a=tn(t,2),u=a[0],c=a[1];u===n?o=!0:(c.networkType===r&&(i+=1),e[u]=o?nn({},c,{networkNumber:i}):c);return e}),{});f(a)}),[t,f]),P=(0,a.useMemo)((function(){var e={};return e=t.reduce((function(e,t){var o=tn(t,2),i=o[0],a=o[1],u=a.networkGateway,c=a.networkMinIp,l=a.networkNumber,s=a.networkSubnetMask,d=a.networkType,f="".concat(on,"-").concat(i),p=1===l,m=sn(d),h="mn"===d||!p;return e[f]={children:(0,r.jsx)(Je,{formUtils:n,networkId:i,networkNumber:l,networkType:d,networkTypeOptions:b,onClose:k,onNetworkTypeChange:O,previous:{gateway:u,minIp:c,subnetMask:s},readonlyNetworkName:!h,showCloseButton:h,showGateway:m}),md:3,sm:2},e}),e)}),[n,t,b,k,O]);return(0,r.jsx)(s.Z,{columns:{xs:1,sm:2,md:3},layout:nn({},P,{"an-network-config-cell-add-network":{children:(0,r.jsx)(Ve.Z,{mapPreset:"add",onClick:function(){var e=g(),n=e.network,t=e.networkId;w(t,n)}}),display:"flex",justifyContent:"center",md:3,sm:2},"an-network-config-input-cell-dns":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:an,label:"DNS",value:c}),inputTestBatch:(0,F.dg)("DNS",(function(){h(an)}),{onFinishBatch:p(an)},(function(e){h(an,{children:e})})),onFirstRender:m(an),required:!0})},"an-network-config-input-cell-ntp":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:cn,label:"NTP",value:d}),inputTestBatch:(0,F.dg)("NTP",(function(){h(cn)}),{onFinishBatch:p(cn)},(function(e){h(cn,{children:e})})),onFirstRender:m(cn)})},"an-network-config-input-cell-mtu":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:un,inputProps:{placeholder:"1500"},label:"MTU",value:l}),inputTestBatch:(0,F.qY)("MTU",(function(){h(un)}),{onFinishBatch:p(un)},(function(e){h(un,{children:e})})),onFirstRender:m(un),valueType:"number"})}}),spacing:"1em"})};function fn(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var pn={bcn1:{networkMinIp:"10.201.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"bcn"},sn1:{networkMinIp:"10.101.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"sn"},ifn1:{networkMinIp:"",networkNumber:1,networkSubnetMask:"",networkType:"ifn"}},mn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous,u=void 0===i?{}:i,c=u.hostConfig,l=u.networkConfig,s=void 0===l?{}:l,d=fn(e.previous,["hostConfig","networkConfig"]),f=s.networks,p=void 0===f?pn:f,m=(0,a.useState)(p),h=m[0],v=m[1],y=(0,a.useMemo)((function(){return Object.entries(h)}),[h]);return(0,r.jsxs)(g.Z,{children:[(0,r.jsx)(qe,{formUtils:n,previous:d}),(0,r.jsx)(dn,{formUtils:n,networkListEntries:y,previous:s,setNetworkList:v}),(0,r.jsx)(Ce,{formUtils:n,knownFences:t,knownUpses:o,networkListEntries:y,previous:c})]})},hn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous;return(0,r.jsx)(mn,{formUtils:n,knownFences:t,knownUpses:o,previous:i})};function vn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function xt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return yt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return yt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var wt=function(e){var n=e.formControlProps,t=e.formControlLabelProps,o=e.formLabelProps,i=e.id,u=e.label,c=e.onChange,l=e.radioItems,s=e.radioProps,d=(void 0===s?{}:s).sx,f=e.radioGroupProps,p=jt(e.radioProps,["sx"]),m=(0,a.useMemo)((function(){return"string"===typeof u?(0,r.jsx)(Z.Ac,{children:u}):u}),[u]),h=(0,a.useMemo)((function(){return Object.entries(l).map((function(e){var n=xt(e,2),o=n[0],a=n[1],u=a.label,c=a.value,l="string"===typeof u?(0,r.jsx)(Z.Ac,{children:u}):u;return(0,r.jsx)(k.Z,gt({control:(0,r.jsx)(ft.Z,gt({},p,{sx:gt(bt({},"&.".concat(pt.Z.root),{color:I.s7}),d)})),value:c,label:l},t),"".concat(i,"-").concat(o))}))}),[t,i,l,d,p]);return(0,r.jsxs)(mt.Z,gt({},n,{children:[(0,r.jsx)(ht.Z,gt({},o,{children:m})),(0,r.jsx)(vt.Z,gt({onChange:c,row:!0},f,{children:h}))]}))},Ot=t(3144);function kt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Ht(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||$t(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e){return function(e){if(Array.isArray(e))return Dt(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$t(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $t(e,n){if(e){if("string"===typeof e)return Dt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Dt(e,n):void 0}}var Gt="prepare-network-host-name-input",zt="prepare-network-netconf-input-group",Wt="Host name",Qt=function(e){for(var n=e.netconf,t=arguments.length,r=new Array(t>1?t-1:0),o=1;o=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var tr=function(e){var n=e.label,t=nr(e,["label"]),o=(0,a.useMemo)((function(){return"string"===typeof n?(0,r.jsx)(Z.Ac,{inheritColour:!0,children:n}):n}),[n]);return(0,r.jsx)(Xt.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function dr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return cr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var fr="1.8em",pr=function(e){var n,t,o=e.orientation,i=e.variant,u=void 0===i?"fullWidth":i,c=sr(e,["orientation","variant"]),l=(0,or.Z)(),s=(0,a.useCallback)((function(e){return l.breakpoints.up(e)}),[l]),d=(0,ir.Z)(s("xs")),f=(0,ir.Z)(s("sm")),p=(0,ir.Z)(s("md")),m=(0,ir.Z)(s("lg")),h=(0,ir.Z)(s("xl")),v=(0,a.useMemo)((function(){return[["xs",d],["sm",f],["md",p],["lg",m],["xl",h]]}),[m,p,f,h,d]),y=(0,a.useMemo)((function(){var e;return"object"===typeof o?v.some((function(n){var t=dr(n,2),r=t[0],i=t[1];return i&&o[r]&&(e=o[r]),!i})):e=o,e}),[v,o]);return(0,r.jsx)(ar.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var y=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,h({},e))})};n.Z=function(e){var n=e.componentsProps,t=e.extendRenderInput,o=e.label,i=e.messageBoxProps,b=e.renderInput,g=e.sx,j=v(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),x=h({paper:{sx:{backgroundColor:d.lD}}},n),w=null!==b&&void 0!==b?b:function(e){var n=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,u=e.inputProps,c={formControlProps:{fullWidth:n,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:u,startAdornment:i.startAdornment},label:o};return null===t||void 0===t||t.call(null,c,e),(0,r.jsx)(p.Z,h({},c))},O=h(m({},"& .".concat(a.Z.root," .").concat(u.Z.endAdornment),m({right:"7px"},"& .".concat(c.Z.root),{color:d.s7})),g);return(0,r.jsxs)(l.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(s.Z,h({PaperComponent:y},j,{componentsProps:x,renderInput:w,sx:O})),(0,r.jsx)(f.Z,h({},i))]})}},2545:function(e,n,t){"use strict";var r=t(5893),o=t(7294),i=t(157);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var u=(0,o.forwardRef)((function(e,n){var t=e.scrollContent,u=(0,o.useMemo)((function(){return t?".5em":void 0}),[t]);return(0,r.jsx)(i.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function x(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||O(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,n){if(e){if("string"===typeof e)return y(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?y(e,n):void 0}}var k={width:"100%"},P="gate-input",I="".concat(P,"-credential-id"),Z="".concat(P,"-credential-passphrase"),S="access",A=(0,i.forwardRef)((function(e,n){var t,y,b=e.formContainer,O=void 0===b||b,P=e.gridProps,A=void 0===P?{}:P,M=A.columns,T=void 0===M?{xs:1,sm:2}:M,F=(A.layout,A.spacing),C=void 0===F?"1em":F,U=e.identifierId,E=void 0===U?I:U,N=e.identifierInputTestBatchBuilder,R=void 0===N?m.Gn:N,B=e.identifierLabel,D=e.identifierOutlinedInputWithLabelProps,L=void 0===D?{}:D,q=L.formControlProps,_=void 0===q?{}:q,H=L.inputProps,V=e.onIdentifierBlurAppend,$=e.onSubmit,G=e.onSubmitAppend,z=e.passphraseId,W=void 0===z?Z:z,Q=e.passphraseLabel,K=e.passphraseOutlinedInputWithLabelProps,J=void 0===K?{}:K,X=J.formControlProps,Y=void 0===X?{}:X,ee=J.inputProps,ne=e.submitLabel,te=e.allowSubmit,re=void 0===te?O:te,oe=j(e.gridProps,["columns","layout","spacing"]),ie=j(e.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ae=j(e.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ue=_.sx,ce=j(_,["sx"]),le=Y.sx,se=j(Y,["sx"]),de=(0,i.useRef)({}),fe=(0,i.useRef)({}),pe=(0,i.useRef)({}),me=x((0,v.Z)(!1),2),he=me[0],ve=me[1],ye=(0,h.Z)([I,Z],pe),be=ye.buildFinishInputTestBatchFunction,ge=ye.buildInputFirstRenderFunction,je=ye.buildInputUnmountFunction,xe=ye.isFormInvalid,we=ye.setMessage,Oe=(0,i.useMemo)((function(){return null!==$&&void 0!==$?$:function(){for(var e=arguments.length,n=new Array(e),t=0;t0}),[f.length]),h=(0,o.useMemo)((function(){return d.length>1}),[d.length]),v=(0,o.useCallback)((function(e){var n=e.confirmDialogProps,t=void 0===n?{}:n,o=e.formSummaryProps,i=void 0===o?{}:o,u=e.getConfirmDialogTitle,s=e.onProceedAppend,d=e.renderEntry;return c({actionProceedText:"Delete",content:(0,r.jsx)(a.Z,c({entries:l,maxDepth:0,renderEntry:d},i)),onProceedAppend:s,proceedColour:"red",titleText:u(f.length)},t)}),[l,f.length]),y=(0,o.useCallback)((function(e){return l[e]}),[l]),b=(0,o.useCallback)((function(e){return s(d.reduce((function(n,t){return e&&(n[t]=e),n}),{}))}),[d]),g=(0,o.useCallback)((function(e,n){return s((0,i.ZP)(e,n||void 0))}),[]);return{buildDeleteDialogProps:v,checklist:l,checks:f,getCheck:y,hasAllChecks:p,hasChecks:m,multipleItems:h,setAllChecks:b,setCheck:g}}},6632:function(e,n,t){"use strict";var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.actionProceedText,t=void 0===n?"":n,o=e.content,u=void 0===o?"":o,c=e.titleText,l=void 0===c?"":c,s=a(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:t,content:u,titleText:l},s))}},8938:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Cr}});var r=t(5893),o=t(9008),i=t(1163),a=t(7294),u=t(4390);function c(e,n){return null!=n&&"undefined"!==typeof Symbol&&n[Symbol.hasInstance]?n[Symbol.hasInstance](e):e instanceof n}var l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.fallbackValue,r=void 0===t?"":t,o=n.joinSeparator,i=void 0===o?"":o,a=n.limit,u=void 0===a?1:a;return c(e,Array)?e.slice(0,u).join(i):null!==e&&void 0!==e?e:r},s=t(7504),d=t(1770),f=t(5521),p=t(2029),m=t(7357),h=t(4594),v=t(1496),y=t(4386),b=t(4188),g=t(4690),j=t(9099),x=t(6284),w=t(3679),O=t(7783),k=t(480),P=t(2852),I=t(7169),Z=t(7750);function S(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function A(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);tE(n,1)[0]?1:-1})).reduce((function(e,o){var a=E(o,2),u=a[0],c=a[1],l=c.content_type,s=c.default,d=c.deprecated,p=c.description,h=c.options,v=c.required;if("1"===String(d))return e;var b,g,j=e.optional,x=e.required,w=null!==(b=D[l])&&void 0!==b?b:D.string,O=L(n,u),k=null!==(g=f[O])&&void 0!==g?g:s,P="1"===String(v),I=/passw/i.test(u),S=w({formUtils:i,id:O,isChecked:N.includes(k),isRequired:P,isSensitive:I,label:u,selectOptions:h,value:k}),A=(0,r.jsx)(y.Z,function(e){for(var n=1;n div:first-child":{marginTop:0},"& > div":{marginBottom:0}},children:[(0,r.jsx)(w.TZ,{expandInitially:!0,header:"Required parameters",children:(0,r.jsxs)(q,{children:[(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:b,label:O,name:b,value:u}),inputTestBatch:(0,F.Gn)(O,(function(){d(b)}),{onFinishBatch:l(b)},(function(e){d(b,{children:e})})),onFirstRender:s(b),required:!0},"".concat(b,"-wrapper")),v]})}),(0,r.jsx)(w.TZ,{header:"Optional parameters",children:(0,r.jsx)(q,{children:h})})]})}return e}),[l,s,n,t,o,i,u,c,d]);return(0,r.jsx)(r.Fragment,{children:f})},H=t(2152),V=t(1081);function $(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);tz(n,1)[0]?1:-1})).map((function(e){var n=z(e,2),t=n[0],r=n[1].description;return{fenceDescription:"string"===typeof r?r:"No description.",fenceId:t,label:t}})):[]}),[n]),f=(0,a.useMemo)((function(){return(0,r.jsx)(h.Z,{id:W,isOptionEqualToValue:function(e,n){return e.fenceId===n.fenceId},label:"Fence device type",onChange:function(e,n){i(W,null!==n),s(n)},openOnFocus:!0,options:d,renderOption:function(e,n,t){var o=n.fenceDescription,i=n.fenceId,a=t.selected;return(0,r.jsxs)(m.Z,function(e){for(var n=1;n *":{width:"100%"}}},e,{children:[(0,r.jsx)(Z.Ac,{inverted:!0,sx:{fontSize:"1.2em",fontWeight:a?400:void 0},children:i}),(0,r.jsx)(Z.Ac,{selected:!1,children:o})]}))},sx:{marginTop:".3em"},value:l})}),[d,l,i]),p=(0,a.useMemo)((function(){return(0,r.jsx)(_,{fenceId:null===l||void 0===l?void 0:l.fenceId,fenceTemplate:n,formUtils:t})}),[n,null===l||void 0===l?void 0:l.fenceId,t]),v=(0,a.useMemo)((function(){return o?(0,r.jsx)(H.Z,{}):(0,r.jsxs)(g.Z,{children:[f,p]})}),[f,p,o]);return(0,a.useEffect)((function(){u&&i(W,null!==l)}),[l,u,i]),(0,r.jsx)(r.Fragment,{children:v})},K=t(157),J=function(e){var n=e.fenceId,t=e.fenceTemplate,o=e.formUtils,i=e.loading,u=e.previousFenceName,c=e.previousFenceParameters,l=(0,a.useMemo)((function(){return i?(0,r.jsx)(H.Z,{}):(0,r.jsx)(_,{fenceId:n,fenceTemplate:t,formUtils:o,previousFenceName:u,previousFenceParameters:c})}),[t,n,o,i,u,c]);return(0,r.jsx)(r.Fragment,{children:l})},X=t(2545),Y=t(8610),ee=t(6125),ne=t(7869),te=t(1905),re=t(3906),oe=t(6632),ie=t(8859),ae=t(2749);function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:{},r=n.input,o=void 0===r?t:r,i=n.end,a=void 0===i?t.length:i,u=a-1,c=0;return o.every((function(n,t){return tn(n,2)[1].networkType===e&&(c+=1),t0&&void 0!==arguments[0]?arguments[0]:{},n=e.networkMinIp,t=void 0===n?"":n,r=e.networkSubnetMask,o=void 0===r?"":r,i=e.networkType,a=void 0===i?"ifn":i,u=e.networkGateway,c=void 0===u?sn(a)?"":void 0:u,l=e.networkNumber,s=void 0===l?y(a)+1:l;return{network:{networkGateway:c,networkMinIp:t,networkNumber:s,networkSubnetMask:o,networkType:a},networkId:(0,_e.Z)()}}),[y]),w=(0,a.useCallback)((function(e,n){return f((0,Xe.ZP)(e,n))}),[f]),O=(0,a.useCallback)((function(e,n){var r=e.networkId,o=e.networkType,i=n.target.value,a=String(i),u=!1,c=0,l=t.reduce((function(e,n){var t=tn(n,2),i=t[0],l=t[1],s=l.networkNumber,d=l.networkType;i===r&&(u=!0,d=a,v(RegExp(i)));var f=d===a;return f&&(c+=1),u?(f?s=c:d===o&&(s-=1),e[i]=nn({},l,{networkNumber:s,networkType:d})):e[i]=l,e}),{});f(l)}),[t,v,f]),k=(0,a.useCallback)((function(e){var n=e.networkId,r=e.networkType,o=!1,i=0,a=t.reduce((function(e,t){var a=tn(t,2),u=a[0],c=a[1];u===n?o=!0:(c.networkType===r&&(i+=1),e[u]=o?nn({},c,{networkNumber:i}):c);return e}),{});f(a)}),[t,f]),P=(0,a.useMemo)((function(){var e={};return e=t.reduce((function(e,t){var o=tn(t,2),i=o[0],a=o[1],u=a.networkGateway,c=a.networkMinIp,l=a.networkNumber,s=a.networkSubnetMask,d=a.networkType,f="".concat(on,"-").concat(i),p=1===l,m=sn(d),h="mn"===d||!p;return e[f]={children:(0,r.jsx)(Je,{formUtils:n,networkId:i,networkNumber:l,networkType:d,networkTypeOptions:b,onClose:k,onNetworkTypeChange:O,previous:{gateway:u,minIp:c,subnetMask:s},readonlyNetworkName:!h,showCloseButton:h,showGateway:m}),md:3,sm:2},e}),e)}),[n,t,b,k,O]);return(0,r.jsx)(s.Z,{columns:{xs:1,sm:2,md:3},layout:nn({},P,{"an-network-config-cell-add-network":{children:(0,r.jsx)(Ve.Z,{mapPreset:"add",onClick:function(){var e=g(),n=e.network,t=e.networkId;w(t,n)}}),display:"flex",justifyContent:"center",md:3,sm:2},"an-network-config-input-cell-dns":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:an,label:"DNS",value:c}),inputTestBatch:(0,F.dg)("DNS",(function(){h(an)}),{onFinishBatch:p(an)},(function(e){h(an,{children:e})})),onFirstRender:m(an),required:!0})},"an-network-config-input-cell-ntp":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:cn,label:"NTP",value:d}),inputTestBatch:(0,F.dg)("NTP",(function(){h(cn)}),{onFinishBatch:p(cn)},(function(e){h(cn,{children:e})})),onFirstRender:m(cn)})},"an-network-config-input-cell-mtu":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:un,inputProps:{placeholder:"1500"},label:"MTU",value:l}),inputTestBatch:(0,F.qY)("MTU",(function(){h(un)}),{onFinishBatch:p(un)},(function(e){h(un,{children:e})})),onFirstRender:m(un),valueType:"number"})}}),spacing:"1em"})};function fn(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var pn={bcn1:{networkMinIp:"10.201.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"bcn"},sn1:{networkMinIp:"10.101.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"sn"},ifn1:{networkMinIp:"",networkNumber:1,networkSubnetMask:"",networkType:"ifn"}},mn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous,u=void 0===i?{}:i,c=u.hostConfig,l=u.networkConfig,s=void 0===l?{}:l,d=fn(e.previous,["hostConfig","networkConfig"]),f=s.networks,p=void 0===f?pn:f,m=(0,a.useState)(p),h=m[0],v=m[1],y=(0,a.useMemo)((function(){return Object.entries(h)}),[h]);return(0,r.jsxs)(g.Z,{children:[(0,r.jsx)(qe,{formUtils:n,previous:d}),(0,r.jsx)(dn,{formUtils:n,networkListEntries:y,previous:s,setNetworkList:v}),(0,r.jsx)(Ce,{formUtils:n,knownFences:t,knownUpses:o,networkListEntries:y,previous:c})]})},hn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous;return(0,r.jsx)(mn,{formUtils:n,knownFences:t,knownUpses:o,previous:i})};function vn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function xt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return yt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return yt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var wt=function(e){var n=e.formControlProps,t=e.formControlLabelProps,o=e.formLabelProps,i=e.id,u=e.label,c=e.onChange,l=e.radioItems,s=e.radioProps,d=(void 0===s?{}:s).sx,f=e.radioGroupProps,p=jt(e.radioProps,["sx"]),m=(0,a.useMemo)((function(){return"string"===typeof u?(0,r.jsx)(Z.Ac,{children:u}):u}),[u]),h=(0,a.useMemo)((function(){return Object.entries(l).map((function(e){var n=xt(e,2),o=n[0],a=n[1],u=a.label,c=a.value,l="string"===typeof u?(0,r.jsx)(Z.Ac,{children:u}):u;return(0,r.jsx)(k.Z,gt({control:(0,r.jsx)(ft.Z,gt({},p,{sx:gt(bt({},"&.".concat(pt.Z.root),{color:I.s7}),d)})),value:c,label:l},t),"".concat(i,"-").concat(o))}))}),[t,i,l,d,p]);return(0,r.jsxs)(mt.Z,gt({},n,{children:[(0,r.jsx)(ht.Z,gt({},o,{children:m})),(0,r.jsx)(vt.Z,gt({onChange:c,row:!0},f,{children:h}))]}))},Ot=t(3144);function kt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Ht(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||$t(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e){return function(e){if(Array.isArray(e))return Dt(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$t(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $t(e,n){if(e){if("string"===typeof e)return Dt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Dt(e,n):void 0}}var Gt="prepare-network-host-name-input",zt="prepare-network-netconf-input-group",Wt="Host name",Qt=function(e){for(var n=e.netconf,t=arguments.length,r=new Array(t>1?t-1:0),o=1;o=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var tr=function(e){var n=e.label,t=nr(e,["label"]),o=(0,a.useMemo)((function(){return"string"===typeof n?(0,r.jsx)(Z.Ac,{inheritColour:!0,children:n}):n}),[n]);return(0,r.jsx)(Xt.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function dr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return cr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var fr="1.8em",pr=function(e){var n,t,o=e.orientation,i=e.variant,u=void 0===i?"fullWidth":i,c=sr(e,["orientation","variant"]),l=(0,or.Z)(),s=(0,a.useCallback)((function(e){return l.breakpoints.up(e)}),[l]),d=(0,ir.Z)(s("xs")),f=(0,ir.Z)(s("sm")),p=(0,ir.Z)(s("md")),m=(0,ir.Z)(s("lg")),h=(0,ir.Z)(s("xl")),v=(0,a.useMemo)((function(){return[["xs",d],["sm",f],["md",p],["lg",m],["xl",h]]}),[m,p,f,h,d]),y=(0,a.useMemo)((function(){var e;return"object"===typeof o?v.some((function(n){var t=dr(n,2),r=t[0],i=t[1];return i&&o[r]&&(e=o[r]),!i})):e=o,e}),[v,o]);return(0,r.jsx)(ar.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);tn.length)&&(e=n.length);for(var t=0,r=new Array(e);t1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return t["".concat(e).concat(n)]}),[t]),o=(0,u.useCallback)((function(){return i("user")}),[i]);return(0,u.useEffect)((function(){if(n){var e=document.cookie.split(/\s*;\s*/);r(e.reduce((function(n,e){var t,r=C(e.split("=",2),2),i=r[0],o=r[1],c=decodeURIComponent(o);if(c.startsWith("j:"))try{t=JSON.parse(c.substring(2))}catch(a){t=o}else t=o;return n[i]=t,n}),{}))}}),[n]),{cookieJar:t,getCookie:i,getSessionUser:o}};function P(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function N(n){for(var e=1;e0)},ref:e})]})}},1081:function(n,e,t){"use strict";var r=t(7294);e.Z=function(){var n=(0,r.useRef)(!0);return n.current?(n.current=!1,!0):n.current}},8336:function(n,e){"use strict";e.Z=function(n,e){return fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}},1142:function(n,e,t){"use strict";t.r(e);var r=t(5893),i=t(7294),o=t(1163),c=t(9008),a=t(7357),l=t(1496),s=t(7906),u=t(5521);function f(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var d="Server",p={preview:"".concat(d,"-preview"),fullView:"".concat(d,"-fullView")},h=(0,l.ZP)("div")((function(n){var e,t=n.theme;return f(e={},"& .".concat(p.preview),f({width:"25%",height:"100%"},t.breakpoints.down("md"),{width:"100%"})),f(e,"& .".concat(p.fullView),{display:"flex",flexDirection:"row",width:"100%",justifyContent:"center"}),e}));e.default=function(){var n=(0,i.useState)(!0),e=n[0],t=n[1],l=(0,o.useRouter)().query,f=l.server_name,d=l.uuid,g=l.vnc,m=((null===g||void 0===g?void 0:g.toString())||"").length>0,v=(null===d||void 0===d?void 0:d.toString())||"",x=(null===f||void 0===f?void 0:f.toString())||"";return(0,i.useEffect)((function(){m&&t(!1)}),[m]),(0,r.jsxs)(h,{children:[(0,r.jsx)(c.default,{children:(0,r.jsx)("title",{children:x})}),(0,r.jsx)(u.Z,{}),e?(0,r.jsx)(a.Z,{className:p.preview,children:(0,r.jsx)(s.M,{onClickPreview:function(){t(!1)},serverName:x,serverUUID:v})}):(0,r.jsx)(a.Z,{className:p.fullView,children:(0,r.jsx)(s.S,{onClickCloseButton:function(){t(!0)},serverUUID:v,serverName:x})})]})}}},function(n){n.O(0,[382,894,227,746,906,774,888,179],(function(){return e=8954,n(n.s=e);var e}));var e=n.O();_N_E=e}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/server-db52258419acacf3.js b/striker-ui/out/_next/static/chunks/pages/server-db52258419acacf3.js new file mode 100644 index 00000000..dfd23bbd --- /dev/null +++ b/striker-ui/out/_next/static/chunks/pages/server-db52258419acacf3.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[753],{8954:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/server",function(){return t(1142)}])},5521:function(n,e,t){"use strict";t.d(e,{Z:function(){return F}});var r=t(5893),o=t(1113),i=t(1496),c=t(2293),a=t(7357),l=t(2992),s=t(4799),u=t(7294),f=t(7169),d=t(4433),p=t(9029),h=t(7533),g=t(8462),m=t(7212),v=t(8619),b=[{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/manage-element"},{text:"Files",image:"/pngs/files_on.png",uri:"/file-manager"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/config"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],x={width:"40em",height:"40em"},j=t(4390),w=t(582),y=t(4690),Z=t(1770),k=t(7750),O=t(1081);function C(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return t["".concat(e).concat(n)]}),[t]),i=(0,u.useCallback)((function(){return o("user")}),[o]);return(0,u.useEffect)((function(){if(n){var e=document.cookie.split(/\s*;\s*/);r(e.reduce((function(n,e){var t,r=S(e.split("=",2),2),o=r[0],i=r[1],c=decodeURIComponent(i);if(c.startsWith("j:"))try{t=JSON.parse(c.substring(2))}catch(a){t=i}else t=i;return n[o]=t,n}),{}))}}),[n]),{cookieJar:t,getCookie:o,getSessionUser:i}};function P(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function A(n){for(var e=1;e0)},ref:e})]})}},4427:function(n,e,t){"use strict";var r=t(5893),o=t(2429),i=t(9309),c=t(7169);function a(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function l(n){for(var e=1;e0,v=(null===d||void 0===d?void 0:d.toString())||"",b=(null===f||void 0===f?void 0:f.toString())||"";return(0,l.useEffect)((function(){m&&t(!1)}),[m]),(0,r.jsxs)(h,{children:[(0,r.jsx)(c.default,{children:(0,r.jsx)("title",{children:b})}),(0,r.jsx)(u.Z,{}),e?(0,r.jsx)(i.Z,{className:p.preview,children:(0,r.jsx)(s.M,{onClickPreview:function(){t(!1)},serverName:b,serverUUID:v})}):(0,r.jsx)(i.Z,{className:p.fullView,children:(0,r.jsx)(s.S,{onClickCloseButton:function(){t(!0)},serverUUID:v,serverName:b})})]})}}},function(n){n.O(0,[382,894,227,62,94,774,888,179],(function(){return e=8954,n(n.s=e);var e}));var e=n.O();_N_E=e}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/webpack-387b178bb4c5665f.js b/striker-ui/out/_next/static/chunks/webpack-b267a65404defb57.js similarity index 96% rename from striker-ui/out/_next/static/chunks/webpack-387b178bb4c5665f.js rename to striker-ui/out/_next/static/chunks/webpack-b267a65404defb57.js index 3068f88a..534e2805 100644 --- a/striker-ui/out/_next/static/chunks/webpack-387b178bb4c5665f.js +++ b/striker-ui/out/_next/static/chunks/webpack-b267a65404defb57.js @@ -1 +1 @@ -!function(){"use strict";var e={},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var u=t[r]={exports:{}},i=!0;try{e[r].call(u.exports,u,u.exports,n),i=!1}finally{i&&delete t[r]}return u.exports}n.m=e,function(){var e=[];n.O=function(t,r,o,u){if(!r){var i=1/0;for(l=0;l=u)&&Object.keys(n.O).every((function(e){return n.O[e](r[c])}))?r.splice(c--,1):(f=!1,u0&&e[l-1][2]>u;l--)e[l]=e[l-1];e[l]=[r,o,u]}}(),n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var u=Object.create(null);n.r(u);var i={};e=e||[null,t({}),t([]),t(t)];for(var f=2&o&&r;"object"==typeof f&&!~e.indexOf(f);f=t(f))Object.getOwnPropertyNames(f).forEach((function(e){i[e]=function(){return r[e]}}));return i.default=function(){return r},n.d(u,i),u}}(),n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/chunks/"+e+"."+{460:"91d31c8392f2cdc4",665:"b5fa539eea66745a"}[e]+".js"},n.miniCssF=function(e){return"static/css/fc4c5db74ac4baf3.css"},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="_N_E:";n.l=function(r,o,u,i){if(e[r])e[r].push(o);else{var f,c;if(void 0!==u)for(var a=document.getElementsByTagName("script"),l=0;l=u)&&Object.keys(n.O).every((function(e){return n.O[e](r[c])}))?r.splice(c--,1):(f=!1,u0&&e[l-1][2]>u;l--)e[l]=e[l-1];e[l]=[r,o,u]}}(),n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var u=Object.create(null);n.r(u);var i={};e=e||[null,t({}),t([]),t(t)];for(var f=2&o&&r;"object"==typeof f&&!~e.indexOf(f);f=t(f))Object.getOwnPropertyNames(f).forEach((function(e){i[e]=function(){return r[e]}}));return i.default=function(){return r},n.d(u,i),u}}(),n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/chunks/"+e+"."+{460:"91d31c8392f2cdc4",665:"ae67dcf3c1b6f7f6"}[e]+".js"},n.miniCssF=function(e){return"static/css/fc4c5db74ac4baf3.css"},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="_N_E:";n.l=function(r,o,u,i){if(e[r])e[r].push(o);else{var f,c;if(void 0!==u)for(var a=document.getElementsByTagName("script"),l=0;lAnvil
\ No newline at end of file +Anvil
\ No newline at end of file diff --git a/striker-ui/out/config.html b/striker-ui/out/config.html index 72382a52..4432b891 100644 --- a/striker-ui/out/config.html +++ b/striker-ui/out/config.html @@ -1 +1 @@ -Loading...
Install target
Configure striker peers
Configure striker peers
Inbound connections

    No inbound connections found.
Peer connections

    No peer connections found.
Manage changed SSH keys
Manage changed SSH keys
The identity of the following targets have unexpectedly changed.
If you haven't rebuilt the listed targets, then you could be experiencing a
"Man In The Middle"
attack. Please verify the targets have changed for a known reason before proceeding to remove the broken keys.

Host name

IP address


    No conflicting keys found.
Manage users
Manage users

    No users found.
\ No newline at end of file +Loading...
Install target
Configure striker peers
Configure striker peers
Inbound connections

    No inbound connections found.
Peer connections

    No peer connections found.
Manage changed SSH keys
Manage changed SSH keys
The identity of the following targets have unexpectedly changed.
If you haven't rebuilt the listed targets, then you could be experiencing a
"Man In The Middle"
attack. Please verify the targets have changed for a known reason before proceeding to remove the broken keys.

Host name

IP address


    No conflicting keys found.
Manage users
Manage users

    No users found.
\ No newline at end of file diff --git a/striker-ui/out/file-manager.html b/striker-ui/out/file-manager.html index 8fb49405..26740812 100644 --- a/striker-ui/out/file-manager.html +++ b/striker-ui/out/file-manager.html @@ -1 +1 @@ -File Manager

Files

    \ No newline at end of file +File Manager

    Files

      \ No newline at end of file diff --git a/striker-ui/out/index.html b/striker-ui/out/index.html index 58a66368..23b6bb06 100644 --- a/striker-ui/out/index.html +++ b/striker-ui/out/index.html @@ -1 +1 @@ -Dashboard
      \ No newline at end of file +Dashboard
      \ No newline at end of file diff --git a/striker-ui/out/init.html b/striker-ui/out/init.html index c18255cd..4682b992 100644 --- a/striker-ui/out/init.html +++ b/striker-ui/out/init.html @@ -1 +1 @@ -

      Loading...

      Placeholder
      Uncheck to skip domain and host name pattern validation.
      \ No newline at end of file +

      Loading...

      Placeholder
      Uncheck to skip domain and host name pattern validation.
      \ No newline at end of file diff --git a/striker-ui/out/login.html b/striker-ui/out/login.html index 624233dd..1c162778 100644 --- a/striker-ui/out/login.html +++ b/striker-ui/out/login.html @@ -1 +1 @@ -Login
      Placeholder
      \ No newline at end of file +Login
      Placeholder
      \ No newline at end of file diff --git a/striker-ui/out/manage-element.html b/striker-ui/out/manage-element.html index e6b0c7d2..47a1da63 100644 --- a/striker-ui/out/manage-element.html +++ b/striker-ui/out/manage-element.html @@ -1 +1 @@ -Loading
      \ No newline at end of file +Loading
      \ No newline at end of file diff --git a/striker-ui/out/server.html b/striker-ui/out/server.html index c7227b91..bf52bb4d 100644 --- a/striker-ui/out/server.html +++ b/striker-ui/out/server.html @@ -1 +1 @@ -
      \ No newline at end of file +
      \ No newline at end of file