(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/setup/progress"],{891:(e,s,r)=>{"use strict";r.r(s),r.d(s,{default:()=>g,withInitLayout:()=>u});var t=r(231),n=r(233),a=r.n(n),i=r(232),c=r(85),l=r(748),d=r(750),o=r(282);const p=c.Locale.getTranslate("components.shortcuts"),h=({banner:e,children:s})=>{const{logo:r}=(0,o.usePageData)();return(0,t.useLayoutEffect)((()=>{(0,c.getComponent)("asyncProgressBarWrapper")?.hide()}),[]),(0,t.jsxs)("div",{className:"init-page",children:[(0,t.jsx)(d.default,{layoutType:"simplified"}),(0,t.jsx)(i.Layout,{type:"simplified",className:"init-page__inner",header:(0,t.jsxs)("div",{className:"init-page-header",children:[r?(0,t.jsx)("div",{className:"init-page-header__brand",children:(0,t.jsx)(l.default,{...r})}):null,(0,t.jsx)("div",{className:"init-page-header__actions",children:(0,t.jsxs)("a",{className:"init-page-header__action",href:"/logout.php","data-type":"link-logout",children:[(0,t.jsx)("span",{className:"icon",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,t.jsx)("path",{fill:"currentColor",d:"M13,16H6v3.573c0,0.078-0.045,0.148-0.115,0.181s-0.153,0.022-0.213-0.027l-4.75-3.958 c-0.228-0.19-0.36-0.471-0.36-0.768c0-0.297,0.132-0.578,0.36-0.768l4.75-3.958c0.06-0.05,0.143-0.06,0.213-0.028 C5.955,10.279,6,10.349,6,10.427V14h7c0.552,0,1,0.448,1,1C14,15.552,13.552,16,13,16z M32,2v21.13c0,0.538-0.288,1.035-0.756,1.302 l-11,6.286c-0.231,0.132-0.487,0.198-0.744,0.198c-0.26,0-0.52-0.068-0.753-0.203C18.285,30.444,18,29.95,18,29.415V26h-4 c-1.105,0-2-0.895-2-2v-3.5c0-0.276,0.224-0.5,0.5-0.5h1c0.276,0,0.5,0.224,0.5,0.5V24h4V8.87c0-0.538,0.288-1.035,0.756-1.302 L28.5,2H14v7.5c0,0.276-0.224,0.5-0.5,0.5h-1C12.224,10,12,9.776,12,9.5V2c0-1.105,0.895-2,2-2h16C31.105,0,32,0.895,32,2z  M30,3.446L20,9.161V24v2v2.554l10-5.714V3.446z"})})}),(0,t.jsx)(p,{content:"logOut"})]})})]}),contentAddon:e?(0,t.jsx)("div",{className:"init-page__banner",children:(0,t.jsx)("img",{className:"init-page__banner-image",src:e,alt:""})}):null,children:(0,t.jsx)("div",{id:"main",className:"init-page__content",children:s})})]})};h.propTypes={children:a().any,banner:a().any},h.defaultProps={children:void 0,banner:void 0};const u=(e,{banner:s})=>{const r=r=>(0,t.jsx)(h,{banner:s,children:(0,t.jsx)(e,{...r})});return r.displayName=`withInitLayout(${e.displayName||e.name||"Component"})`,r.WrappedComponent=e,r},g=h},890:(e,s,r)=>{"use strict";r.r(s),r.d(s,{default:()=>o});var t=r(232),n=r(231),a=r(233),i=r.n(a),c=r(85),l=r(891);const d=({task:e})=>{const[s,r]=(0,n.useState)(e.steps);return(0,n.useEffect)((()=>{const s=({id:s})=>{s===e.id&&(0,c.redirect)("/")},t=()=>(0,c.redirect)("/");return c.Observer.append((({id:s,steps:t})=>{s===e.id&&r(t)}),"plesk:taskStepUpdate"),c.Observer.append(s,"plesk:taskComplete"),window.addEventListener("error",t),()=>{c.Observer.remove(s,"plesk:taskStepUpdate"),c.Observer.remove(s,"plesk:taskComplete"),window.removeEventListener("error",t)}}),[e]),(0,n.useEffect)((()=>{const e=s.find((({status:e})=>"running"===e));if(!e)return;const{blocking:r}=e;r||(0,c.redirect)("/")}),[s]),(0,n.jsx)(t.Progress,{children:s.map((({title:e,status:s,progress:r,errors:a})=>(0,n.jsx)(t.ProgressStep,{title:e,status:s,progress:r,children:Array.isArray(a)&&a.map((e=>(0,n.jsx)("div",{children:e},e)))},e)))})};d.propTypes={task:i().shape({id:i().string,steps:i().array.isRequired}).isRequired};const o=(0,l.withInitLayout)(d,{banner:r(892)})},892:e=>{e.exports=Jsw.skinUrl+"/images/postinstall-progress.png?b3c516bcb0cce9e3c3d5c6198bffc2a7"}}]);
//# sourceMappingURL=progress.js.map?f47fd745c62e3fbf2cb4