(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/customer/domains"],{763:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useAddDomainFormInDrawer:()=>P});var a=n(153),o=n.n(a),i=n(154),l=n(261),s=n.n(l),r=n(302),c=n(405),m=n(556),d=n(144),p=n(155),u=n(764),g=n(720),b=n(765),E=n(576),f=n(767),h=n(768),w=n(770);const v=r.gql`
    query GetWebspaceIpAddress($id: ID!) {
        domain: node(id: $id) {
            ... on Domain {
                ipAddresses {
                    ipAddress(publicIp: true)
                }
            }
        }
    }
`,y=d.Locale.getSection("smb.components.forms.web.add-domain"),T=d.Locale.getTranslate("smb.components.forms.web.add-domain"),S=d.Locale.getTranslate("smb.components.forms.domain-info-section"),k=d.Locale.getTranslate("components.forms.ip-addresses-selector"),C=d.Locale.getTranslate("smb.components.forms.web._shared"),N=d.Locale.getTranslate("smb.components.forms.web.seo-settings"),A=d.Locale.getTranslate("admin.components.forms.admin-panel.form.contact-info"),D=d.Locale.getTranslate("components.buttons"),x=({id:e,showDomainRegistrationPromo:t,ipAddresses:n,allowCustomerCreation:a,allowWebspaceCreation:l,subscriptionsLookUpParams:s,canManageMailSettings:r,maxSysnameSize:h,isWindows:x,techDomain:P,settingsEnabled:R,settingsCollapsed:I,applicationWizardConfig:F,embeddedForms:q,applicationWizardEmbeddedForms:H,cancelLink:$,className:_,render:L,onProcess:B,...U})=>{var O;const j=(0,c.useApolloClient)(),z=(0,m.useHistory)(),[V,M]=(0,i.useState)(U.values),[J,W]=(0,i.useState)(Boolean(U.values.hostingSettings.root)),[Y,G]=(0,i.useState)(!U.values.domainInfo),[Z,K]=(0,i.useState)(U.webspaceIpAddress);(0,i.useEffect)((()=>{if(J)return;let e=/^[a-zA-Z0-9\.\-\*]+$/.match(V.domainName.name)?V.domainName.name.replace(/\*/g,"_"):"";-1!==V.hostingSettings.rootPattern.indexOf("<domain>")&&(e=V.hostingSettings.rootPattern.replace("<domain>",e)),M((0,p.setIn)(V,"hostingSettings[root]",e))}),[V.domainName.name]),(0,i.useEffect)((()=>{V.domainName.webspace&&"new"!==V.domainName.webspace.id&&j.query({query:v,variables:{id:btoa(`Domain:${V.domainName.webspace.id}`)}}).then((({data:{domain:{ipAddresses:e}}})=>{K(e[0].ipAddress)}))}),[V.domainName.webspace]);const Q=(e,t)=>{switch(M((n=>{if(n=(0,p.setIn)(n,e,t),"domainName[name]"===e&&!Y){let e=/^[a-zA-Z0-9_.\-]+$/.match(t)?n.domainName.type===u.TYPE_TECH?t.split(".")[0]:t:"";e=e.toLowerCase().substr(0,h),x&&"."===e.substr(-1)&&(e=e.substr(0,e.length-1)),n=(0,p.setIn)(n,"domainInfo[userName]",e||U.values.domainInfo.userName)}return n})),["domainInfo[ipSelector][ipv4]","domainInfo[ipSelector][ipv6]","domainInfo[userName]","domainInfo[password]"].includes(e)&&d.UAT.dispatchAction("CUSTOM-VALUE",{name:e}),e){case"hostingSettings[root]":W(!0);break;case"domainInfo[userName]":G(!0)}},X="1"===V.domainName.assignToCustomer||void 0!==V.domainName.targetWebspace||void 0!==V.domainName.webspace&&(null===V.domainName.webspace||"new"===V.domainName.webspace.id),ee=X||!Z?Object.keys(n).map((e=>{const t=V.domainInfo.ipSelector[e];return"none"===t?null:n[e][t].split(" ")[0]})).filter(Boolean)[0]:Z,te=F.enabled?w.default:g.default;return(0,i.createElement)(te,{vertical:!0,id:e,className:_,render:L,values:V,onFieldChange:Q,onSubmit:e=>(e.domainName.customer&&(e=(0,p.setIn)(e,"domainName[customer]",e.domainName.customer.id)),e.domainName.webspace&&(e=(0,p.setIn)(e,"domainName[webspace]",e.domainName.webspace.id)),e),onLongTask:B,embeddedForms:q,wizardConfig:F,wizardEmbeddedForms:H,submitButton:{id:"btn-send",children:(0,i.createElement)(T,{content:"buttonAddDomain"})},applyButton:!1,cancelButton:!!$&&{id:"btn-cancel",children:(0,i.createElement)(D,{content:"cancel"}),onClick:()=>{z.push($)}}},t?(0,i.createElement)(E.default,null,(()=>new Jsw.Panel({cls:"tools-box",items:[{componentType:"Jsw.Hint",hint:y.lmsg("formRegistrationHint",{link:`<a href="${(0,d.prepareUrl)("/mpc/register-domains")}" target="_blank">${y.lmsg("portalLink")}</a>`})}]}))):null,(0,i.createElement)(u.default,o()({isEnabled:void 0!==V.domainName.type,isDefault:V.domainName.type===u.TYPE_TECH,typeName:"domainName[type]",name:"domainName[name]",ipAddress:ee,onTypeChange:e=>Q("domainName[type]",e),onDomainNameChange:e=>Q("domainName[name]",e)},P)),void 0===V.domainName.assignToCustomer?null:(0,i.createElement)(p.Section,null,(0,i.createElement)(p.FormFieldCheckbox,{name:"domainName[assignToCustomer]",label:(0,i.createElement)(T,{content:"assignToCustomer"}),checkedValue:"1",uncheckedValue:"0"}),"1"===V.domainName.assignToCustomer?(0,i.createElement)(p.Section,{collapsible:!0},void 0===V.domainName.customer?null:(0,i.createElement)(b.default,{name:"domainName[customer]",label:(0,i.createElement)(T,{content:"customer"}),dataUrl:"/admin/customer/look-up",newItemValue:a?{id:"new",title:y.lmsg("createNewCustomer")}:null,locale:{label:y.lmsg("selectExistingCustomer")},required:!0}),void 0===V.domainName.customer||"new"===(null===(O=V.domainName.customer)||void 0===O?void 0:O.id)?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(p.FormFieldText,{name:"customerInfo[customerContactInfo][contactName]",label:(0,i.createElement)(A,{content:"contactName"}),required:!0}),(0,i.createElement)(p.FormFieldText,{name:"customerInfo[customerContactInfo][email]",label:(0,i.createElement)(A,{content:"email"}),required:!0}),(0,i.createElement)("br",null),(0,i.createElement)(p.Heading,{level:"4"},(0,i.createElement)(T,{content:"customerLoginInfoHint"})),(0,i.createElement)(f.default,{prefix:"customerInfo[customerLoginInfo]"})):null):null),void 0===V.domainName.webspace||"1"===V.domainName.assignToCustomer?null:(0,i.createElement)(p.Section,null,(0,i.createElement)(b.default,{name:"domainName[webspace]",label:(0,i.createElement)(T,{content:"target"}),dataUrl:"/smb/web/subscription-look-up",newItemValue:l?{id:"new",title:y.lmsg("createNewTarget")}:null,locale:{label:y.lmsg("selectExistingTarget")},lookUpParams:s,required:!0})),X?R?(0,i.createElement)(p.Section,{id:"domainInfo",title:(0,i.createElement)(T,{content:"webspaceLegend"}),collapsible:!0,collapsed:I},Object.keys(n).map((e=>(0,i.createElement)(p.FormFieldSelect,{key:e,name:`domainInfo[ipSelector][${e}]`,label:(0,i.createElement)(k,{content:Object.keys(n).length>1?`${e}Address`:"ipAddress"}),required:!0},Object.keys(n[e]).map((t=>(0,i.createElement)(p.SelectOption,{key:t,value:t},n[e][t])))))),(0,i.createElement)("br",null),(0,i.createElement)(p.Heading,{level:"4"},(0,i.createElement)(T,{content:"credentials"})),(0,i.createElement)(p.Text,{component:"p",intent:"muted"},(0,i.createElement)(T,{content:"credentialsHint"})),(0,i.createElement)(p.FormFieldText,{name:"domainInfo[userName]",label:(0,i.createElement)(S,{content:"userName"}),required:!0}),(0,i.createElement)(p.FormFieldPassword,{name:"domainInfo[password]",label:(0,i.createElement)(S,{content:"password"}),required:!0})):null:(0,i.createElement)(p.Section,null,(0,i.createElement)(p.FormFieldSelect,{name:"hostingType[hosting]",label:(0,i.createElement)(T,{content:"hostingManagementOptions"})},(0,i.createElement)(p.SelectOption,{value:"hosting",label:"hosting"},(0,i.createElement)(T,{content:"websiteHosting"})),(0,i.createElement)(p.SelectOption,{value:"forwarding",label:"forwarding"},(0,i.createElement)(T,{content:"websiteForwarding"})),(0,i.createElement)(p.SelectOption,{value:"none",label:"none"},(0,i.createElement)(T,{content:"websiteNoHosting"}))),void 0===V.dnsSettings?null:(0,i.createElement)(p.FormFieldCheckbox,{name:"dnsSettings[dns]",label:(0,i.createElement)(T,{content:"dns"}),description:(0,i.createElement)(T,{content:"dnsHint"}),disabled:V.domainName.type===u.TYPE_TECH,checkedValue:"master",uncheckedValue:"none"}),void 0===V.mailSettings?null:(0,i.createElement)(p.FormFieldCheckbox,{name:"mailSettings[mail]",label:(0,i.createElement)(T,{content:"mail"}),description:r?(0,i.createElement)(T,{content:"mailHint"}):(0,i.createElement)(T,{content:"mailHintNoPermission"}),disabled:V.domainName.type===u.TYPE_TECH,checkedValue:"1",uncheckedValue:"0"}),"hosting"===V.hostingType.hosting?(0,i.createElement)(p.Section,{id:"hostingSettings",title:(0,i.createElement)(T,{content:"hostingSettingsSectionLegend"}),collapsible:!0,collapsed:!0},(0,i.createElement)(p.FormField,{name:"hostingSettings[root]",label:(0,i.createElement)(C,{content:"documentRoot"}),description:(0,i.createElement)(C,{content:"documentRootHint"}),required:!0},(({getId:e,getName:t,getValue:n,setValue:a})=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)(p.Icon,{name:"home"})," / ",(0,i.createElement)(p.Input,{id:e(),name:t(),value:n(),onChange:({target:e})=>a(e.value)})))),(0,i.createElement)(p.FormFieldRadioButtons,{name:"hostingSettings[seoRedirectDirection]",label:(0,i.createElement)(N,{content:"seoRedirectDirection"}),description:(0,i.createElement)(N,{content:"seoRedirectDirectionHint"}),required:!0,options:[{value:"www",label:`www.${V.domainName.name||"<your_domain>"}`},{value:"non-www",label:V.domainName.name||"<your_domain>"},{value:"none",label:(0,i.createElement)(N,{content:"seoRedirectDirectionNone"})}]})):null,"forwarding"===V.hostingType.hosting?(0,i.createElement)(p.Section,{id:"forwardingSettings",title:(0,i.createElement)(C,{content:"forwardingSettingsSectionLegend"}),collapsible:!0,collapsed:!0},(0,i.createElement)(p.FormFieldText,{name:"forwardingSettings[forwardTo]",label:(0,i.createElement)(C,{content:"forwardDestination"}),description:(0,i.createElement)(C,{content:"forwardDestinationHint"}),required:!0}),(0,i.createElement)(p.FormFieldRadioButtons,{name:"forwardingSettings[forwardingType]",label:(0,i.createElement)(C,{content:"forwardingTypeOptions"}),options:[{value:"std_fwd301",label:(0,i.createElement)(C,{content:"forwardingHttpCode301"}),description:(0,i.createElement)(C,{content:"forwardingHttpCode301Hint"})},{value:"std_fwd302",label:(0,i.createElement)(C,{content:"forwardingHttpCode302"}),description:(0,i.createElement)(C,{content:"forwardingHttpCode302Hint"})},{value:"frm_fwd",label:(0,i.createElement)(C,{content:"forwardingFrame"}),description:(0,i.createElement)(C,{content:"forwardingFrameHint"})}]})):null))};x.propTypes={id:s().string.isRequired,showDomainRegistrationPromo:s().bool,values:s().object.isRequired,ipAddresses:s().shape({ipv4:s().object,ipv6:s().object}).isRequired,allowCustomerCreation:s().bool,allowWebspaceCreation:s().bool,subscriptionsLookUpParams:s().object,webspaceIpAddress:s().string,canManageMailSettings:s().bool,maxSysnameSize:s().number.isRequired,isWindows:s().bool.isRequired,techDomain:s().object.isRequired,settingsEnabled:s().bool,settingsCollapsed:s().bool,applicationWizardConfig:s().object,cancelLink:s().string,embeddedForms:s().array,applicationWizardEmbeddedForms:s().array,className:s().string,render:s().func,onProcess:s().func},x.defaultProps={showDomainRegistrationPromo:!1,allowCustomerCreation:!1,allowWebspaceCreation:!1,subscriptionsLookUpParams:null,webspaceIpAddress:null,canManageMailSettings:!1,settingsEnabled:!1,settingsCollapsed:!1,applicationWizardConfig:{},cancelLink:null,embeddedForms:void 0,applicationWizardEmbeddedForms:void 0,className:void 0,render:void 0,onProcess:void 0};const P=(e,t)=>(0,h.default)(x,"add-domain",e,t);t.default=x},770:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(261),s=n.n(l),r=n(144),c=n(771),m=n(772);const d=r.Locale.getTranslate("components.domain-applications.applications"),p=({onFieldChange:e,formPrefix:t,wizardConfig:a,embeddedForms:l,wizardEmbeddedForms:s,values:r,children:p,...u})=>{const[g,b]=(0,i.useState)([]),E=t=>{e("applicationName",t),b([...s.filter((({ext:e,name:n})=>t===`ext-${e}-${n}`)).filter((({content:e})=>Boolean(e))).map((({ext:e,name:t,...n})=>({key:`ext-${e}-${t}`,children:"",embeddedForms:[{name:t,...n}]})))])},f=[a.blankSite&&{name:"blank-site",icon:n(773),title:(0,i.createElement)(d,{content:"blank-site.title"}),description:(0,i.createElement)(d,{content:"blank-site.description"})},a.uploadFiles&&{name:"upload-files",icon:n(774),title:(0,i.createElement)(d,{content:"upload-files.title"}),description:(0,i.createElement)(d,{content:"upload-files.description"})},...s.map((({ext:e,name:t,title:n,icon:a,description:o})=>({name:`ext-${e}-${t}`,icon:a,title:n,description:o})))].filter(Boolean),h=[f.length>1&&{key:"chooseApplicationStep",children:(0,i.createElement)(c.default,{onApplicationSelect:E,applicationsList:f}),nextButton:!1},{key:"addDomainStep",formPrefix:t,children:p,embeddedForms:l}].filter(Boolean);return(0,i.useEffect)((()=>{if(0===f.length&&E("blank-site"),1===f.length){const[{name:e}]=f;E(e)}}),[]),(0,i.createElement)(m.default,o()({},u,{values:r,onFieldChange:e,onStepChange:(t,n)=>0===n&&h.length>1?(e("applicationName",null),b([]),t):n,step:r.applicationName&&1!==h.length?1:0,steps:[...h,...g]}))};p.propTypes={values:s().object.isRequired,onFieldChange:s().func.isRequired,children:s().node,formPrefix:s().string,wizardConfig:s().shape({enabled:s().bool,blankSite:s().bool,uploadFiles:s().bool}),embeddedForms:s().array,wizardEmbeddedForms:s().array},p.defaultProps={children:null,formPrefix:"",wizardConfig:{enabled:!0,blankSite:!0,uploadFiles:!0},embeddedForms:[],wizardEmbeddedForms:[]},t.default=p},771:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(155),i=n(261),l=n.n(i);const s=n(144).Locale.getTranslate("components.domain-applications"),r=({onApplicationSelect:e,applicationsList:t})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.Heading,{level:"3"},(0,a.createElement)(s,{content:"title"})),(0,a.createElement)(o.ItemList,{minColumnWidth:220,gap:"xs",selectable:!0},t.map((({name:t,icon:n,title:i,description:l})=>(0,a.createElement)(o.Item,{"data-action":t,key:t,icon:(0,a.createElement)(o.Icon,{src:n,intent:"info",size:"64"}),title:(0,a.createElement)(o.Heading,{level:"4"},i),onClick:()=>e(t)},(0,a.createElement)(o.Paragraph,null,l))))));r.propTypes={onApplicationSelect:l().func,applicationsList:l().arrayOf(l().shape({name:l().string.isRequired,icon:l().string.isRequired,title:l().node,description:l().node}))},r.defaultProps={onApplicationSelect:null,applicationsList:[]},t.default=r},775:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n(556),l=n(144),s=n(576),r=n(582);const c=l.Locale.getSection("admin.components.lists.domains"),m=l.Locale.getSection("components.icp-permit"),d=({action:e}={})=>{const t=window.location.pathname.split("/");return e&&(t[3]=e),t.join("/")},p=({data:e,searchFilters:t,dataAction:o,deleteAction:p,allowCreateDomain:u,allowManageSubdomain:g,allowManageDomainAliases:b,showDeleteButton:E,isHomonymSearchEnabled:f,showOwnerName:h,showExpirationDate:w,userId:v,icpPermitSupported:y,icpPermitLink:T})=>{const S=(0,i.useHistory)(),k=(0,r.createNavigateHandler)(S);return(0,a.createElement)(s.default,null,(()=>new l.Panel({cls:"list-box",items:[new l.List({id:"domains-list",data:e,dataUrl:d({action:o}),searchFilters:t,searchOveral:"domainName",disabledSelectHint:c.lmsg("disabledSelectHint"),operations:[u?{componentType:l.SmallButton,id:"buttonAddDomain",cls:"s-btn sb-new-domain",title:c.lmsg("buttonAddDomain"),description:c.lmsg("hintAddDomain"),href:d({action:"add-domain"}),handler:k}:null,g?{componentType:l.SmallButton,id:"buttonAddSubDomain",cls:"s-btn sb-new-subdomain",title:c.lmsg("buttonAddSubdomain"),description:c.lmsg("hintAddSubdomain"),href:d({action:"add-subdomain"})}:null,b?{componentType:l.SmallButton,id:"buttonAddDomainAlias",cls:"s-btn sb-new-domain-alias",title:c.lmsg("buttonAddDomainAlias"),description:c.lmsg("hintAddDomainAlias"),href:d({action:"add-domain-alias"})}:null,u||g||b?{componentType:l.bar.Separator}:null,{componentType:l.list.AdditionalActions,title:c.lmsg("buttonChangeStatus"),operations:[{componentType:l.SmallButton,id:"buttonSuspendDomains",title:c.lmsg("buttonSuspendDomains"),description:c.lmsg("hintSuspendDomains"),addCls:"sb-suspend",cls:"sb-btn",handler(){(0,l.getComponent)("domains-list").execGroupOperation({url:`/domain/suspend/?redirect=${d()}`,skipConfirmation:!0})}},{componentType:l.SmallButton,id:"buttonDisableDomains",title:c.lmsg("buttonDisableDomains"),description:c.lmsg("hintDisableDomains"),addCls:"sb-turn-off",cls:"sb-btn",handler(){(0,l.getComponent)("domains-list").execGroupOperation({url:`/domain/disable/?redirect=${d()}`,skipConfirmation:!0})}},{componentType:l.SmallButton,id:"buttonActivateDomains",title:c.lmsg("buttonActivateDomains"),description:c.lmsg("hintActivateDomains"),addCls:"sb-activate",cls:"sb-btn",handler(){(0,l.getComponent)("domains-list").execGroupOperation({url:`/domain/activate/?redirect=${d()}`,skipConfirmation:!0})}}]},E?{componentType:l.bar.Separator}:null,E?{componentType:l.SmallButton,id:"buttonRemoveSite",title:l.Locale.getSection("components.buttons").lmsg("remove"),description:c.lmsg("hintRemove"),cls:"s-btn sb-remove-selected",handler(e){var t;const n=(0,l.getComponent)("domains-list").getSelectedItems(),a=n.reduce(((e,{relatedDomains:t})=>e.concat(t)),[]).filter((e=>n.every((({domainDisplayName:t})=>t!==e))));(0,l.getComponent)("domains-list").execGroupOperation({url:d({action:p}),subtype:l.messageBox.SUBTYPE_DELETE,mouseEvent:e,text:c.formatMessage("removeConfirmation",{name:`<b>${(0,l.escapeHtml)(null===(t=n[0])||void 0===t?void 0:t.domainDisplayName)}</b>`,count:n.length}),description:a.length?c.lmsg("removeConfirmationSubscription",{domains:a.join(", ")}).replace(/\n/gm,"<br>"):"",isAjax:f,requestUrl:d({action:"search-homonym-data"}),loadingTitle:l.Locale.getSection("components.homonyms").lmsg("loading")})}}:null].filter(Boolean),columns:[l.list.COLUMN_SELECTION,{header:c.lmsg("domainName"),sortable:!0,dataIndex:"domainDisplayName",renderer(e){let t="";if(parseInt(e.domainStatus)){let a=c.lmsg("statusDisabled"),o=n(776),i="disabled";"suspend"===e.turnOffAction&&(a=c.lmsg("statusSuspended"),o=n(777),i="suspended"),t+=`<div class="b-indent"><span class="b-indent-icon"><span><span class="tooltipData">${a}</span><img src="${o}" alt="${i}" title=""></span>`}t+=e.overviewUrl?`<a href="${(0,l.prepareUrl)(e.overviewUrl)}">${(0,l.escapeHtml)(e.domainDisplayName)}</a>`:(0,l.escapeHtml)(e.domainDisplayName),parseInt(e.domainStatus)&&(t+="</span></div>");let a="";if(e.adminDescription&&(a+=`<div class="hint">${(0,l.escapeHtml)(e.adminDescription.truncate(50,"..."))}<span class="tooltipData">${(0,l.escapeHtml)(e.adminDescription)}</span></div>`),e.resellerDescription){a+=`<div class="hint">${e.hideResellerTitleDescription?"":`${c.lmsg("resellerDescription")}: `}${(0,l.escapeHtml)(e.resellerDescription.truncate(50,"..."))}<span class="tooltipData">${(0,l.escapeHtml)(e.resellerDescription)}</span></div>`}return e.ownerDescription&&(a+=`<div class="hint">${c.lmsg("ownerDescription")}: ${(0,l.escapeHtml)(e.ownerDescription.truncate(50,"..."))}<span class="tooltipData">${(0,l.escapeHtml)(e.ownerDescription)}</span></div>`),t+=a,t}},y?{header:m.lmsg("icpPermit"),sortable:!0,dataIndex:"icpStatus",renderer({icpStatus:e,icpPermit:t}){const a=1==e?m.lmsg("icpStatusAllowedDescription"):m.lmsg("icpStatusNotAllowedDescription"),o=n(1==e?778:779);let i=t?(0,l.escapeHtml)(t):1==e?"":m.lmsg("icpStatusNotAllowed");return T&&(i=`<a href="${T}" target="_blank">${i}</a>`),`<span class="tooltipData">${a}</span><img src="${o}" alt="" /> ${i}`}}:null,{header:c.lmsg("hostingType"),sortable:!0,dataIndex:"hostingType",renderer(e){let t="";return"alias"===e.hostingType?t=`<img src="${n(780)}"/> ${c.lmsg("aliasFor")} <a href="http://${(0,l.escapeHtml)(e.realDomainName)}" target="_blank">${(0,l.escapeHtml)(e.realDomainDisplayName)}</a>`:"vrt_hst"===e.hostingType?t=`<img src="${n(781)}"/> ${c.lmsg(e.parentDomainId>0?"subdomainWebsite":"website")}`:"none"===e.hostingType?t=`<img src="${n(782)}"/><em class="hint">${c.lmsg("noHosting")}</em>`:"frm_fwd"!==e.hostingType&&"std_fwd"!==e.hostingType||(t=`<img src="${n(783)}"/> ${c.lmsg("forwardingTo")} <a href="${(0,l.escapeHtml)(e.forwardingUrl)}" target="_blank">${(0,l.escapeHtml)(e.forwardingDisplayUrl)}</a>`),t}},h?{header:c.lmsg("ownerName"),sortable:!0,dataIndex:"ownerName",renderer({ownerId:e,ownerType:t,ownerName:n,ownerCompanyName:a}){let o=null;return parseInt(e)!==v&&("client"===t?o=`/admin/customer/overview/id/${e}`:"reseller"===t&&(o=`/admin/reseller/overview/id/${e}`)),[o?(0,l.createElement)("a",{href:o,onclick:k},(0,l.escapeHtml)(n)):(0,l.escapeHtml)(n),a?`, ${(0,l.escapeHtml)(a)}`:null]}}:null,w?{header:c.lmsg("expirationDate"),sortable:!1,dataIndex:"expirationDate",renderer:({expirationDateString:e})=>e?(0,l.escapeHtml)(e):"&mdash;"}:null,{header:c.lmsg("diskUsage"),sortable:!0,dataIndex:"realSize",renderer:({diskUsage:e})=>(0,l.escapeHtml)(e)},{header:c.lmsg("traffic"),sortable:!0,dataIndex:"traffic"},{header:"",sortable:!1,renderer:({hostingType:e,siteUrl:t})=>"none"===e?"":(0,l.createElement)("a.s-btn.sb-publish",{href:t,target:"_blank"},(0,l.createElement)("span",c.lmsg("openSite")))},{header:"",sortable:!1,renderer({previewSupported:e,domainId:t}){if(!e)return"";const n=`/admin/domain/preview?domainId=${t}`;return(0,l.createElement)("a.s-btn.sb-view-site",{href:n,target:"_blank"},(0,l.createElement)("span",c.lmsg("previewSite")))}},{header:"",sortable:!1,renderer({manageUrl:e,ownerId:t,ownerType:n}){if(!e||parseInt(t)===v)return"";const a=`/admin${"reseller"===n?"/reseller":"/customer"}/login/id/${t}?pageUrl=${encodeURIComponent(e)}`;return(0,l.createElement)("a.s-btn.sb-login",{href:a},(0,l.createElement)("span",c.lmsg("reseller"===n?"manageInResellerPanel":"manageInCustomerPanel")))}}].filter(Boolean)})]})))};p.propTypes={data:o.PropTypes.object.isRequired,searchFilters:o.PropTypes.object.isRequired,dataAction:o.PropTypes.string.isRequired,deleteAction:o.PropTypes.string.isRequired,allowCreateDomain:o.PropTypes.bool,allowManageSubdomain:o.PropTypes.bool,allowManageDomainAliases:o.PropTypes.bool,showDeleteButton:o.PropTypes.bool,isHomonymSearchEnabled:o.PropTypes.bool,showOwnerName:o.PropTypes.bool,showExpirationDate:o.PropTypes.bool,userId:o.PropTypes.number,icpPermitSupported:o.PropTypes.bool,icpPermitLink:o.PropTypes.string},p.defaultProps={allowCreateDomain:!1,allowManageSubdomain:!1,allowManageDomainAliases:!1,showDeleteButton:!1,isHomonymSearchEnabled:!1,showOwnerName:!1,showExpirationDate:!1,userId:void 0,icpPermitSupported:!1,icpPermitLink:void 0},t.default=p},769:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(155),s=n(144),r=n(261),c=n.n(r),m=n(615),d=n(635);const p="running",u=()=>(0,s.getComponent)("asyncProgressBarWrapper"),g=({children:e,dataType:t,isOpen:n,onClose:a,task:r,...c})=>{const[g,b]=(0,i.useState)([]),[E,f]=(0,i.useState)(null),[h,w]=(0,i.useState)(null),[v,y]=(0,i.useState)(null),T=r?r.id:null,{addToast:S}=(0,d.useToaster)(),k=({id:e,steps:t,status:a,errors:o,output:l,progressValue:r,progressTitle:c,progressTitleHtml:m})=>{if(!n||T!==e)return;const d=m||c,u=s.Task.STATUS_STARTED===a?p:a,g=e=>(e||[]).map((e=>(0,i.createElement)("div",{key:e},e)));y(u),t&&t.length?(f(d),b(t.map((({errors:e,...t})=>({children:g(e),...t}))))):b([{title:d,status:u,progress:Number(r),children:(0,i.createElement)(i.Fragment,null,g(o),g(l))}])};(0,i.useEffect)((()=>{const e=u();n?(null==e||e.hide(),b([]),f(null),w(null),y(null)):(async()=>{C()||await N(),null==e||e.show()})()}),[n]),(0,i.useEffect)((()=>{var e;T&&(null===(e=u())||void 0===e||e.update(),k(r))}),[T,r]),(0,m.default)("plesk:taskStepUpdate",k,s.Observer),(0,m.default)("plesk:taskComplete",(({id:e,redirect:t,status:a})=>{n&&T===e&&s.Task.STATUS_DONE===a&&w(t)}),s.Observer);const C=()=>s.Task.STATUS_NOT_STARTED===v||p===v,N=()=>{var e,t;return T&&(null===(e=u())||void 0===e||null===(t=e.getItems().find((e=>e.getId()===T)))||void 0===t?void 0:t.remove())};return(0,i.createElement)(l.Drawer,o()({"data-type":t,isOpen:n,onClose:()=>{h?(0,s.redirect)(h):a()},progress:g.length?{cancelable:!1,title:E,steps:g,onFinish:()=>{N(),S({intent:"success",message:E||g[0].title})}}:null,hideButton:C()},c),e)};g.propTypes={children:c().node,dataType:c().string.isRequired,isOpen:c().bool,onClose:c().func.isRequired,task:c().shape({id:c().string.isRequired,steps:c().array,status:c().string,progressTitle:c().string,progressTitleHtml:c().string})},g.defaultProps={children:null,isOpen:!1,task:null},t.default=g},765:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n.n(o),l=n(155),s=n(766);const r=n(144).Locale.getSection("components.elements.lookup"),c=({data:e,dataUrl:t,lookUpParams:n,newItemValue:o,locale:i,placeholder:c,...m})=>(0,a.createElement)(l.FormField,m,(({getId:l,getName:m,getValue:d,setValue:p,isDisabled:u})=>(0,a.createElement)(s.default,{id:l(),name:m(),value:d(),onChange:e=>p(e),data:e,dataUrl:t,lookUpParams:n,newItemValue:o,locale:{...r.messages,...i},disabled:u(),placeholder:c})));c.propTypes={locale:i().object,data:i().array,dataUrl:i().string,lookUpParams:i().object,newItemValue:i().object,placeholder:i().string},c.defaultProps={locale:void 0,data:void 0,dataUrl:void 0,lookUpParams:void 0,newItemValue:void 0,placeholder:void 0},t.default=c},766:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(144),i=n(576);t.default=e=>{const[t,n]=(0,a.useState)(null);return(0,a.useEffect)((()=>{const t=new o.LookUp(e);return n(t),()=>{t.remove(),n(null)}}),[]),t?(0,a.createElement)(i.default,null,t):null}},772:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(155),l=n(154),s=n(720),r=n(144),c=n(261),m=n.n(c);const d=r.Locale.getTranslate("components.buttons"),p=({step:e,steps:t,onStepChange:n,onSubmit:a,submitButton:r,cancelButton:c,...m})=>{const p=(0,l.useRef)(),[u,g]=(0,l.useState)(0),b=u+e,{children:E,formPrefix:f,embeddedForms:h,backButton:w,nextButton:v}={backButton:{},nextButton:{},...t[b]},y=b===t.length-1,T=0===b,S=()=>{p.current.handleEmbeddedFormValues(),g((t=>n(t+e,t+e+1)-e))};return(0,l.createElement)(s.default,o()({},m,{ref:p,additionalButtons:[T&&c&&(0,l.createElement)(i.Button,o()({key:"cancel",children:(0,l.createElement)(d,{content:"cancel"})},c)),!T&&w&&(0,l.createElement)(i.Button,o()({key:"back",arrow:"backward",onClick:()=>{p.current.handleEmbeddedFormValues(),g((t=>n(t+e,t+e-1)-e))},children:(0,l.createElement)(d,{content:"back"})},w)),!y&&v&&(0,l.createElement)(i.Button,o()({key:"next",intent:"primary",onClick:S,arrow:"forward",children:(0,l.createElement)(d,{content:"nextWithoutArrow"})},v)),y&&r&&(0,l.createElement)(i.Button,o()({key:"submit",intent:"primary",arrow:"forward",onClick:()=>p.current.submit(),children:(0,l.createElement)(d,{content:"ok"})},r))],onSubmit:y?a:S,onError:a=>{const o=t.findIndex((({formPrefix:e})=>""===e)),i=Object.keys(a).map((e=>{const n=t.findIndex((({formPrefix:t,embeddedForms:n=[]})=>t===e||n.any((({name:t})=>t===e))));return n>=0?n:o}));g(n(b,i.length>0?Math.min(...i):e)-e)},applyButton:!1,submitButton:!1,cancelButton:!1,formPrefix:f,embeddedForms:h}),E)};p.propTypes={step:m().number,steps:m().arrayOf(m().shape({formPrefix:m().string,embeddedForms:m().array,children:m().node,nextButton:m().bool,backButton:m().bool})),onStepChange:m().func,onSubmit:m().func,submitButton:m().object,cancelButton:m().object},p.defaultProps={step:0,steps:[],onStepChange:(e,t)=>t,onSubmit:void 0,submitButton:{},cancelButton:{}},t.default=p},767:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(155),i=n(144),l=n(261),s=n.n(l);const r=i.Locale.getTranslate("admin.components.forms.admin-panel.form.login-info"),c=({prefix:e})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.FormFieldText,{name:"".concat(e,"[userName]"),label:(0,a.createElement)(r,{content:"userName"}),required:!0,autoComplete:"off"}),(0,a.createElement)(o.FormFieldPassword,{name:"".concat(e,"[password]"),label:(0,a.createElement)(r,{content:"password"}),required:!0,autoComplete:"off"}),(0,a.createElement)(o.FormFieldCheckbox,{name:"".concat(e,"[isActivationRequired]"),label:(0,a.createElement)(r,{content:"emailActivation"}),description:(0,a.createElement)(r,{content:"emailActivationHint"}),checkedValue:"1",uncheckedValue:"0"}));c.propTypes={prefix:s().string.isRequired},t.default=c},791:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n.n(o),l=n(155),s=n(144),r=n(582);const c=({items:e})=>(0,a.createElement)(l.Tabs,{active:e.findIndex((({containerCls:e})=>"active"===e))+1},e.map((({title:e,href:t},n)=>(0,a.createElement)(l.Tab,{key:n,title:e,component:r.default,to:(0,s.prepareUrl)(t)}))));c.propTypes={items:i().arrayOf(i().shape({title:i().string.isRequired,href:i().string.isRequired,containerCls:i().string.isRequired})).isRequired},t.default=c},764:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TYPE_TECH:()=>m,TYPE_CUSTOM:()=>d});var a=n(153),o=n.n(a),i=n(155),l=n(154),s=n(261),r=n.n(s),c=n(144);const m="tech",d="custom",p=c.Locale.getTranslate("components.forms.domain.tech-domain-name"),u=({isEnabled:e,isDefault:t,url:n,vendor:a,typeName:o,name:s,ipAddress:r,onDomainNameChange:c,onTypeChange:u})=>{const[E,f]=(0,l.useState)(e&&t?m:d);if(!e)return(0,l.createElement)(g,{name:s,isEnabled:!1,onDomainNameChange:c});const h=[{key:d,icon:(0,l.createElement)(i.Icon,{name:"ribbon",intent:"success"})},{key:m,icon:(0,l.createElement)(i.Icon,{name:"rocket",intent:"info"})}];return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(i.Section,{title:(0,l.createElement)(p,{content:"title"}),vertical:!0},(0,l.createElement)(i.FormField,{name:o,onChange:e=>(e=>{f(e),u(e),c("")})(e)},(({getId:e,getName:t,getValue:n,setValue:a,isDisabled:o})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(i.ItemList,{stretchable:!0,selectable:!0,minColumnWidth:270,gap:"sm",value:n(),onSelect:e=>a(e)},h.map((({key:e,icon:t})=>(0,l.createElement)(i.Item,{icon:t,key:e,value:e,"data-action":`use-${e}-domain`,title:(0,l.createElement)(i.Heading,{level:"4"},(0,l.createElement)(i.Paragraph,null,(0,l.createElement)(p,{content:`${e}DomainTitle`}))),disabled:o()},(0,l.createElement)(i.Text,{fontSize:"md"},(0,l.createElement)(p,{content:`${e}DomainText`})))))),(0,l.createElement)("input",{hidden:!0,id:e(),name:t(),value:n(),readOnly:!0}))))),E===m?(0,l.createElement)(b,{name:s,ipAddress:r,url:n,vendor:a,onDomainNameChange:c}):(0,l.createElement)(g,{name:s,isEnabled:!0,onDomainNameChange:c}))},g=({name:e,isEnabled:t,onDomainNameChange:n})=>(0,l.createElement)(i.Section,{vertical:!0},(0,l.createElement)(i.FormField,{name:e,label:t?(0,l.createElement)(p,{content:"customDomain"}):(0,l.createElement)(p,{content:"domainName"}),onChange:e=>n(e),required:!0},(({getId:e,getName:t,getValue:n,setValue:a,isDisabled:o})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)("span",{dir:"ltr"},"www. ",(0,l.createElement)(i.Input,{id:e(),name:t(),value:n(),placeholder:"domain.name",size:"lg",onChange:e=>a(e.target.value),disabled:o()}))))));g.propTypes={name:r().string.isRequired,isEnabled:r().bool.isRequired,onDomainNameChange:r().func.isRequired};const b=({name:e,onDomainNameChange:t,...n})=>(0,l.createElement)(i.Section,{vertical:!0},(0,l.createElement)(l.Fragment,null,(0,l.createElement)(i.FormField,{label:(0,l.createElement)(p,{content:"techDomain"}),name:e,onChange:e=>t(e)},(({getId:e,getName:t,...a})=>(0,l.createElement)(E,o()({id:e(),name:t()},a,n)))),(0,l.createElement)(i.Cuttable,{maxHeight:24},(0,l.createElement)(i.Paragraph,null,(0,l.createElement)(p,{content:"techDomainDesc"})),(0,l.createElement)("ul",null,(0,l.createElement)("li",null,(0,l.createElement)(p,{content:"techDomainRandom"})),(0,l.createElement)("li",null,(0,l.createElement)(p,{content:"techDomainDns"})),(0,l.createElement)("li",null,(0,l.createElement)(p,{content:"techDomainMail"}))),(0,l.createElement)(i.Paragraph,null,(0,l.createElement)(p,{content:"techDomainSwitch"})))));b.propTypes={name:r().string.isRequired,onDomainNameChange:r().func.isRequired};const E=({id:e,name:t,ipAddress:n,url:a,vendor:o,getValue:s,setValue:r})=>{const[c,m]=(0,l.useState)(!1),[d,u]=(0,l.useState)(n),[g,b]=(0,l.useState)({}),E=(0,l.useCallback)((async()=>{if(b({}),!s()||n!==d)if(n){m(!0);try{const e=await fetch(a,{method:"POST",body:JSON.stringify({ip_address:n,vendor:o})}),{subdomain:t}=await e.json();if(!t)return void b({error:(0,l.createElement)(p,{content:"error"})});r(t),u(n)}catch{b({error:(0,l.createElement)(p,{content:"error"})})}finally{m(!1)}}else b({noIpAddress:(0,l.createElement)(p,{content:"errorNoIpAddress"})})}),[s,r,n,d,a,o]);return(0,l.useEffect)((()=>{E()}),[n]),(0,l.createElement)(l.Fragment,null,c?(0,l.createElement)(i.Status,{progress:!0},(0,l.createElement)(p,{content:"generating"})):(0,l.createElement)(i.Text,{bold:!0},s()),(0,l.createElement)("input",{hidden:!0,id:e,name:t,value:s(),readOnly:!0}),Object.keys(g).map((e=>(0,l.createElement)(i.Alert,{key:e,intent:"danger"},(0,l.createElement)(i.Icon,{name:"exclamation-mark-circle-filled",intent:"danger"})," ",g[e]))))};E.propTypes={id:r().string.isRequired,name:r().string.isRequired,ipAddress:r().string,url:r().string.isRequired,vendor:r().string.isRequired,getValue:r().func.isRequired,setValue:r().func.isRequired},E.defaultProps={ipAddress:null},u.propTypes={isEnabled:r().bool.isRequired,isDefault:r().bool.isRequired,url:r().string.isRequired,vendor:r().string.isRequired,typeName:r().string.isRequired,name:r().string.isRequired,ipAddress:r().string,onDomainNameChange:r().func.isRequired,onTypeChange:r().func.isRequired},u.defaultProps={ipAddress:null},t.default=u},768:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(302),s=n(405),r=n(556),c=n(155),m=n(144),d=n(769);const p=l.gql`
    query GetAddDomainData {
        config {
            domainManagement {
                settings {
                    enabled
                    collapsed
                }
                applicationWizard {
                    enabled
                    blankSite
                    uploadFiles
                }
            }
            techDomain {
                url
                vendor
            }
        }
    }
`;t.default=(e,t,n,a)=>{const l=(0,s.useApolloClient)(),u=!!(0,r.useRouteMatch)(a),g=(0,r.useHistory)(),[b,E]=(0,i.useState)(null),[f,h]=(0,i.useState)(null);(0,i.useEffect)((()=>{u&&(E(null),h(null),Promise.all([m.api.get(a),l.query({query:p})]).then((([e,{data:{config:t}}])=>{e.redirect?(0,m.redirect)(e.redirect):E({...e,techDomain:{url:`${t.techDomain.url}/api/subdomain`,vendor:t.techDomain.vendor},settingsEnabled:t.domainManagement.settings.enabled,settingsCollapsed:t.domainManagement.settings.collapsed,applicationWizardConfig:t.domainManagement.applicationWizard})})))}),[u,a,l]);const w=()=>{g.push(n)};return[(0,i.createElement)(d.default,{dataType:t,title:b?b.pageTitle:"",size:"sm",isOpen:u,onClose:w,form:b?(0,i.createElement)(e,o()({onCancel:w,onProcess:h},b)):null,task:f},b?null:(0,i.createElement)(c.ContentLoader,null))]}},792:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n.n(o),l=n(155),s=n(144),r=n(582),c=n(793),m=n(794);const d=s.Locale.getSection("admin.components.customer-sidebar"),p=s.Locale.getTranslate("admin.components.customer-sidebar"),u=s.Locale.getTranslate("admin.components.elements.status"),g=({id:e,canCreateClients:t,contactName:o,companyName:i,emailAddress:g,setupDate:b,isAdmin:E,resellersSupport:f,hasLegacyResources:h,isActive:w,username:v,allowLogIn:y,provider:T,hasResellers:S,hasResellerCustomers:k,description:C,isIisAppPoolsPolicyMixed:N})=>{const A=(t,n)=>{s.messageBox.show({type:s.messageBox.TYPE_YESNO,subtype:s.messageBox.SUBTYPE_TOGGLE,text:d.lmsg("applyConfirmation"),onYesClick(){(0,s.redirectPost)(`/business-model-upgrade/manual-customer-solution/solution/${n}`,{redirect:`/customer/overview/id/${e}`,ids:[e]})},needAttention:!0,needAttentionText:t,needAttentionBlockSubmit:!0})};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(c.default,{id:"panel-customer-overviewSection"},(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"contactName"}),":")," ",(0,a.createElement)("b",null,o)),i?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"companyName"}),":")," ",(0,a.createElement)("b",null,i)):null,g?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"emailAddress"}),":")," ",(0,a.createElement)("b",null,(0,a.createElement)("a",{href:`mailto:${g}`},g))):null,(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonEditContactHint"})},(0,a.createElement)(l.Action,{id:"buttonEditContactInfo",icon:{src:n(795)},href:`/admin/customer/personal-info/id/${e}`},(0,a.createElement)(p,{content:"buttonEditContact"})))),E&&f?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonConvertToResellerHint"})},(0,a.createElement)(l.Action,{id:"buttonConvertToReseller",icon:{src:n(796)},onClick:async()=>{new(await Plesk.require("app/convert-customers-to-resellers"))({id:"convertCustomersToReseller",cls:"popup-panel",prepareUrl:"/admin/customer/prepare-convert/",handlerUrl:"/admin/customer/convert-to-reseller/?redirect=/customer/list/",ids:[e]})}},(0,a.createElement)(p,{content:"buttonConvertToReseller"})))):null,h?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Popover,{title:(0,a.createElement)(l.Heading,{level:5},(0,a.createElement)(p,{content:"bunchSolutionsAction"})),target:(0,a.createElement)("a",{id:"bunchSolutionsLink"},(0,a.createElement)(p,{content:"bunchSolutions"})),placement:"left",className:"side-panel-popover"},(0,a.createElement)("div",{className:"side-panel-popover__item"},(0,a.createElement)(l.Action,{id:"t1s1ApplyButton",icon:{src:n(797)},onClick:()=>A(d.lmsg("t1s1ApplyHint"),"t1s1")},(0,a.createElement)(p,{content:"t1s1ApplyButton"}))),(0,a.createElement)("div",{className:"side-panel-popover__item"},(0,a.createElement)(l.Action,{id:"t1s2ApplyButton",icon:{src:n(798)},onClick:()=>A(d.lmsg("t2s1ApplyHint"),"t1s2")},(0,a.createElement)(p,{content:"t1s2ApplyButton"}))),(0,a.createElement)("div",{className:"side-panel-popover__item"},(0,a.createElement)(l.Action,{id:"t1s3ApplyButton",icon:{src:n(799)},onClick:()=>A(d.lmsg("t1s3ApplyHint"),"t1s3")},(0,a.createElement)(p,{content:"t1s3ApplyButton"}))),(0,a.createElement)("div",{className:"side-panel-popover__item"},(0,a.createElement)(l.Action,{id:"t1s6cApplyButton",icon:{src:n(797)},onClick:()=>A(d.lmsg("t1s6cApplyHint"),"t1s6c")},(0,a.createElement)(p,{content:"t1s6cApplyButton"}))),"admin"===(null==T?void 0:T.type)?(0,a.createElement)("div",{className:"side-panel-popover__item"},(0,a.createElement)(l.Action,{id:"t1s6rApplyButton",icon:{src:n(800)},onClick:()=>A(d.lmsg("t1s6rApplyHint"),"t1s6r")},(0,a.createElement)(p,{content:"t1s6rApplyButton"}))):null)):null,(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"setupDate"}),":")," ",(0,a.createElement)("b",null,b)),(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"status"}),":")," ",(0,a.createElement)("b",null,(0,a.createElement)(l.Status,{intent:w?"success":"danger"},w?(0,a.createElement)(u,{content:"onStateCustomer"}):(0,a.createElement)(u,{content:"offStateCustomer"})))," ",(0,a.createElement)(l.AuxiliaryActions,null,(0,a.createElement)(l.Tooltip,{title:w?(0,a.createElement)(p,{content:"buttonSuspendHint"}):(0,a.createElement)(p,{content:"buttonActivateHint"})},(0,a.createElement)("a",{id:"buttonToggle",onClick:()=>{(0,s.redirectPost)(`/admin/customer/toggle/id/${e}`)}},w?(0,a.createElement)(p,{content:"buttonSuspend"}):(0,a.createElement)(p,{content:"buttonActivate"}))))),T?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"provider"}),":")," ",(0,a.createElement)("b",null,"reseller"===T.type&&f?(0,a.createElement)(r.default,{to:`/admin/reseller/overview/id/${T.id}`},T.name):T.name)," ",E&&S&&(f||k)?(0,a.createElement)(l.AuxiliaryActions,null,(0,a.createElement)("a",{id:"buttonChangeOwner",onClick:async()=>{new(await Plesk.require("app/change-customers-owner"))({id:"changeOwner",cls:"popup-panel",prepareUrl:"/admin/customer/prepare-change-owner/",handlerUrl:`/admin/customer/change-owner/?redirect=/customer/overview/id/${e}`,ids:[e]})}},(0,a.createElement)(p,{content:"buttonChangeOwner"}))):null):null,(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"username"}),":")," ",(0,a.createElement)("b",null,v)),(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonChangePasswordHint"})},(0,a.createElement)(l.Action,{id:"buttonChangePassword",icon:{src:n(801)},href:`/admin/customer/login-info/id/${e}`},(0,a.createElement)(p,{content:"buttonChangePassword"})))),y?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonLoginAsCustomerHint"})},(0,a.createElement)(l.Action,{id:"buttonLogin",icon:{src:n(802)},href:`/admin/customer/login/id/${e}`},(0,a.createElement)(p,{content:"buttonLoginAsCustomer"})))):null,(0,a.createElement)(m.default,{url:`/admin/customer/edit-description/id/${e}`,data:{owner:C},object:o,objectType:"customer"})),N?(0,a.createElement)(c.default,{id:"panel-customer-iisAppPoolSection"},(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonIisAppPoolHint"})},(0,a.createElement)(l.Action,{id:"buttonIisAppPool",icon:{src:n(803)},href:`/admin/iis-app-pool/settings/id/${e}`},(0,a.createElement)(p,{content:"buttonIisAppPool"}))))):null,t?(0,a.createElement)(c.default,{id:"panel-customer-removeSection"},(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonRemoveHint"})},(0,a.createElement)(l.Action,{id:"buttonRemove",icon:{src:n(804)},onClick:()=>{s.messageBox.show({type:s.messageBox.TYPE_YESNO,subtype:s.messageBox.SUBTYPE_DELETE,text:d.lmsg("buttonRemoveCustomerConfirmationTitle",{name:`<b>${o}</b>`}),description:d.lmsg("buttonRemoveCustomerConfirmationDescription"),onYesClick(){(0,s.redirectPost)(`/customer/delete-current/id/${e}`)}})}},(0,a.createElement)(p,{content:"buttonRemove"}))))):null)};g.propTypes={id:i().number.isRequired,canCreateClients:i().bool.isRequired,contactName:i().string.isRequired,companyName:i().string.isRequired,emailAddress:i().string.isRequired,setupDate:i().string.isRequired,isAdmin:i().bool.isRequired,resellersSupport:i().bool.isRequired,hasLegacyResources:i().bool.isRequired,isActive:i().bool.isRequired,username:i().string.isRequired,allowLogIn:i().bool.isRequired,provider:i().shape({id:i().number.isRequired,type:i().string.isRequired,name:i().string.isRequired}),hasResellers:i().bool.isRequired,hasResellerCustomers:i().bool.isRequired,description:i().string.isRequired,isIisAppPoolsPolicyMixed:i().bool},g.defaultProps={provider:void 0,isIisAppPoolsPolicyMixed:!1},t.default=g},793:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(261),s=n.n(l),r=n(578),c=n.n(r),m=n(613),d=n(155);const p=({baseClassName:e,className:t,id:n,title:a,children:l,...s})=>{const[r,p]=(0,m.useLocalStorage)("".concat(n,"-hidden"));return(0,i.createElement)(d.Panel,o()({className:c()(e,t),id:n,title:a?(0,i.createElement)(d.Heading,{level:4},a):null,collapsible:!!n,collapsed:!!a&&"true"===r,onToggle:()=>p("true"===r?"false":"true")},s),l)};p.propTypes={id:s().string,title:s().any,children:s().any.isRequired,className:s().string,baseClassName:s().string},p.defaultProps={id:void 0,title:void 0,className:void 0,baseClassName:"side-panel"},t.default=p},794:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n.n(o),l=n(155),s=n(144);const r=s.Locale.getSection("components.forms.admin-info"),c=s.Locale.getTranslate("components.forms.admin-info"),m=s.Locale.getSection("components.buttons"),d=({url:e,data:t,objectType:n,object:o})=>Object.keys(t).map((i=>(0,a.createElement)("div",{className:"side-panel__item",key:i},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(c,{content:"description".concat(i.capitalize())}),":")," ",(0,a.createElement)("b",null,(0,a.createElement)("span",{id:"".concat(i,"-description")},t[i]))," ",(0,a.createElement)(l.AuxiliaryActions,null,(0,a.createElement)(l.Link,{id:"".concat(i,"-description-edit"),onClick:()=>((t,a)=>{new s.CustomDescription.PopupForm({id:"editDescription",cls:"popup-panel",hint:r.lmsg("popupHint".concat(t.capitalize())),value:a,locale:{popupTitle:r.lmsg("popupTitle".concat(n.capitalize()),{descriptionType:r.lmsg("description".concat(t.capitalize())),name:o}),buttonOk:m.lmsg("save"),buttonCancel:m.lmsg("cancel")},handler(n){(0,s.redirectPost)(e,{type:t,description:n})}})})(i,t[i])},t[i]?(0,a.createElement)(c,{content:"edit"}):(0,a.createElement)(c,{content:"add"})),t[i]?(0,a.createElement)(l.Link,{id:"".concat(i,"-description-remove"),onClick:()=>(t=>{s.messageBox.show({type:Jsw.messageBox.TYPE_YESNO,subtype:"delete",buttonTitles:{yes:m.lmsg("yes"),no:m.lmsg("no"),wait:m.lmsg("wait")},text:r.lmsg("confirmOnRemove"),onYesClick(){(0,s.redirectPost)(e,{type:t,description:""})}})})(i)},(0,a.createElement)(c,{content:"remove"})):null))));d.propTypes={url:i().string.isRequired,data:i().shape({admin:i().string,reseller:i().string,owner:i().string}).isRequired,objectType:i().oneOf(["reseller","customer","subscription"]).isRequired,object:i().string.isRequired},t.default=d},790:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(261),s=n.n(l),r=n(144),c=n(602),m=n(647),d=n(763),p=n(775),u=n(576),g=n(791),b=n(792);const E=r.Locale.getSection("admin.controllers.customer.domains"),f=({tabs:e,id:t,...n})=>{const[a]=(0,d.useAddDomainFormInDrawer)(`/admin/customer/domains/id/${t}`,`/admin/customer/add-domain/id/${t}`);return(0,i.createElement)(i.Fragment,null,a,(0,i.createElement)(g.default,{items:e}),(0,i.createElement)(u.default,null,(()=>new r.Hint({hint:E.lmsg("hint")}))),(0,i.createElement)(p.default,o()({dataAction:"domains-list-data",deleteAction:"delete-domain"},n)))};f.propTypes={id:s().number.isRequired,tabs:s().array.isRequired},t.default=(0,c.withPageLayout)((0,m.withPageContent)(f),(({sidebarProps:e})=>({secondary:(0,i.createElement)(b.default,e)})))},789:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a.default});var a=n(790)},779:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/att-tr.png?f00bf7056f997d02b1565fff15ed7ab7"},801:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/change-password.png?54304f321bc897402075b73230593f04"},796:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/convert-to-reseller.png?92f150ae967d586471eabfbb347d4dfd"},804:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/delete.png?27d654be29d57ad05641c2ff392035fa"},780:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/dns.png?d10cfc4afe5c5c040eaf99c3ea14429d"},795:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/edit-contact-info.png?052e4fc494a39464dad26f4f40e38eaf"},783:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/forward-to-dom.png?761778de5722f4bb1f3611d27968cb0f"},803:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/iis-app-pool.png?1bcf2ef7b099732f96f82bfb815c5146"},798:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/inherits-from-client.png?a22fe751c94ac0dc04f942415c0e8865"},799:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/inherits-from-domain.png?386f7e5dc544dc203b31ce3934eb982d"},797:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/inherits-the-lesser.png?6a711e632da0050efe725b03bca9aeb4"},802:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/login-as-customer.png?f61b4adc663106baef7704c16dd4d207"},776:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/off.png?84d64d1bd3267c21795505b7daa43800"},782:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/spacer.png?4710d0e07ee1a4d7ebdb1972701168fa"},778:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/subscription-status-ok.png?6d52f91c87cbdc73b4ef0b5ded92c441"},777:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/subscription-status-suspended.png?7968ea094f0aa3fdced5d59b0c7f3196"},800:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/upgrade-to-reseller.png?ad970c843c70a8c819528d90d01395b0"},781:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/website.png?ac6aa9eaf06048cbd5799a61daad9766"},773:e=>{e.exports=Jsw.skinUrl+"/images/code.svg?e9fb9feb605b8cf334414f688a603918"},774:e=>{e.exports=Jsw.skinUrl+"/images/upload-files.svg?e6091d3474a27a3eafe63b2d09b1b943"}}]);
//# sourceMappingURL=domains.js.map?45264dadfc882d17260b