(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/domain/list"],{765:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useAddDomainFormInDrawer:()=>I});var a=n(153),o=n.n(a),i=n(154),l=n(261),r=n.n(l),s=n(302),m=n(405),d=n(556),c=n(144),p=n(155),u=n(766),g=n(722),b=n(767),f=n(576),E=n(769),h=n(770),w=n(772);const S=s.gql`
    query GetWebspaceIpAddress($id: ID!) {
        domain: node(id: $id) {
            ... on Domain {
                ipAddresses {
                    ipAddress(publicIp: true)
                }
            }
        }
    }
`,y=c.Locale.getSection("smb.components.forms.web.add-domain"),v=c.Locale.getTranslate("smb.components.forms.web.add-domain"),T=c.Locale.getTranslate("smb.components.forms.domain-info-section"),k=c.Locale.getTranslate("components.forms.ip-addresses-selector"),C=c.Locale.getTranslate("smb.components.forms.web._shared"),D=c.Locale.getTranslate("smb.components.forms.web.seo-settings"),N=c.Locale.getTranslate("admin.components.forms.admin-panel.form.contact-info"),F=c.Locale.getTranslate("components.buttons"),P=({id:e,showDomainRegistrationPromo:t,ipAddresses:a,allowCustomerCreation:l,allowWebspaceCreation:r,subscriptionsLookUpParams:s,canManageMailSettings:h,maxSysnameSize:P,isWindows:I,techDomain:x,settingsEnabled:A,settingsCollapsed:H,applicationWizardConfig:R,embeddedForms:q,applicationWizardEmbeddedForms:U,cancelLink:$,className:B,render:L,onProcess:O,onStepPropsChange:_,status:V,...z})=>{var M;const j=(0,m.useApolloClient)(),W=(0,d.useHistory)(),[J,Y]=(0,i.useState)(z.values),[G,Z]=(0,i.useState)(Boolean(z.values.hostingSettings.root)),[K,Q]=(0,i.useState)(!z.values.domainInfo),[X,ee]=(0,i.useState)(z.webspaceIpAddress),[te,ne]=(0,i.useState)(null);(0,i.useEffect)((()=>{if(G)return;let e=/^[a-zA-Z0-9\.\-\*]+$/.match(J.domainName.name)?J.domainName.name.replace(/\*/g,"_"):"";-1!==J.hostingSettings.rootPattern.indexOf("<domain>")&&(e=J.hostingSettings.rootPattern.replace("<domain>",e)),Y((0,p.setIn)(J,"hostingSettings[root]",e))}),[J.domainName.name]),(0,i.useEffect)((()=>{J.domainName.webspace&&"new"!==J.domainName.webspace.id&&j.query({query:S,variables:{id:btoa(`Domain:${J.domainName.webspace.id}`)}}).then((({data:{domain:{ipAddresses:e}}})=>{ee(e[0].ipAddress)}))}),[J.domainName.webspace]);const ae=(e,t)=>{switch(Y((n=>{if(n=(0,p.setIn)(n,e,t),"domainName[name]"===e&&!K){let e=/^[a-zA-Z0-9_.\-]+$/.match(t)?n.domainName.type===u.TYPE_TECH?t.split(".")[0]:t:"";e=e.toLowerCase().substr(0,P),I&&"."===e.substr(-1)&&(e=e.substr(0,e.length-1)),n=(0,p.setIn)(n,"domainInfo[userName]",e||z.values.domainInfo.userName)}return n})),["domainInfo[ipSelector][ipv4]","domainInfo[ipSelector][ipv6]","domainInfo[userName]","domainInfo[password]"].includes(e)&&c.UAT.dispatchAction("CUSTOM-VALUE",{name:e}),e){case"hostingSettings[root]":Z(!0);break;case"domainInfo[userName]":Q(!0)}},oe="1"===J.domainName.assignToCustomer||void 0!==J.domainName.targetWebspace||J.domainName.webspace&&"new"===J.domainName.webspace.id,ie=oe||!X?Object.keys(a).map((e=>{const t=J.domainInfo.ipSelector[e];return"none"===t?null:a[e][t].split(" ")[0]})).filter(Boolean)[0]:X;(0,i.useEffect)((()=>{R.enabled||null==_||_({sideBanner:n(777),sideBannerContainer:{background:"#faf5f7"}})}),[R.enabled]);const le=R.enabled?w.default:g.default;return(0,i.createElement)(le,{vertical:!0,id:e,className:B,render:L,values:J,onFieldChange:ae,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:e=>{ne(e),null==O||O(e),null==_||_({sideBanner:n(779),sideBannerContainer:{background:"#e0f3f9"}})},onStepChange:e=>{te||null==_||_("chooseApplicationStep"===e?{sideBanner:n(778),sideBannerContainer:{background:"#f3f4f5"}}:{sideBanner:n(777),sideBannerContainer:{background:"#faf5f7"}})},embeddedForms:q,wizardConfig:R,wizardEmbeddedForms:U,submitButton:{id:"btn-send",children:(0,i.createElement)(v,{content:"buttonAddDomain"})},applyButton:!1,cancelButton:!!$&&{id:"btn-cancel",children:(0,i.createElement)(F,{content:"cancel"}),onClick:()=>{W.push($)}}},(V||[]).filter((({status:e})=>"warning"===e)).map((({content:e})=>(0,i.createElement)(p.StatusMessage,{intent:"warning",key:e},e))),t?(0,i.createElement)(f.default,null,(()=>new Jsw.Panel({cls:"tools-box",items:[{componentType:"Jsw.Hint",hint:y.lmsg("formRegistrationHint",{link:`<a href="${(0,c.prepareUrl)("/mpc/register-domains")}" target="_blank">${y.lmsg("portalLink")}</a>`})}]}))):null,(0,i.createElement)(u.default,o()({isEnabled:void 0!==J.domainName.type,isDefault:J.domainName.type===u.TYPE_TECH,typeName:"domainName[type]",name:"domainName[name]",ipAddress:ie,onTypeChange:e=>ae("domainName[type]",e),onDomainNameChange:e=>ae("domainName[name]",e)},x)),void 0===J.domainName.assignToCustomer?null:(0,i.createElement)(p.Section,null,(0,i.createElement)(p.FormFieldCheckbox,{name:"domainName[assignToCustomer]",label:(0,i.createElement)(v,{content:"assignToCustomer"}),checkedValue:"1",uncheckedValue:"0"}),"1"===J.domainName.assignToCustomer?(0,i.createElement)(p.Section,{collapsible:!0},void 0===J.domainName.customer?null:(0,i.createElement)(b.default,{name:"domainName[customer]",label:(0,i.createElement)(v,{content:"customer"}),dataUrl:"/admin/customer/look-up",newItemValue:l?{id:"new",title:y.lmsg("createNewCustomer")}:null,locale:{label:y.lmsg("selectExistingCustomer")},required:!0}),void 0===J.domainName.customer||"new"===(null===(M=J.domainName.customer)||void 0===M?void 0:M.id)?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(p.FormFieldText,{name:"customerInfo[customerContactInfo][contactName]",label:(0,i.createElement)(N,{content:"contactName"}),required:!0}),(0,i.createElement)(p.FormFieldText,{name:"customerInfo[customerContactInfo][email]",label:(0,i.createElement)(N,{content:"email"}),required:!0}),(0,i.createElement)("br",null),(0,i.createElement)(p.Heading,{level:"4"},(0,i.createElement)(v,{content:"customerLoginInfoHint"})),(0,i.createElement)(E.default,{prefix:"customerInfo[customerLoginInfo]"})):null):null),void 0===J.domainName.webspace||"1"===J.domainName.assignToCustomer?null:(0,i.createElement)(p.Section,null,(0,i.createElement)(b.default,{name:"domainName[webspace]",label:(0,i.createElement)(v,{content:"target"}),dataUrl:"/smb/web/subscription-look-up",newItemValue:r?{id:"new",title:y.lmsg("createNewTarget")}:null,locale:{label:y.lmsg("selectExistingTarget")},lookUpParams:s,required:!0})),oe?A?(0,i.createElement)(p.Section,{id:"domainInfo",title:(0,i.createElement)(v,{content:"webspaceLegend"}),collapsible:!0,collapsed:H},Object.keys(a).map((e=>(0,i.createElement)(p.FormFieldSelect,{key:e,name:`domainInfo[ipSelector][${e}]`,label:(0,i.createElement)(k,{content:Object.keys(a).length>1?`${e}Address`:"ipAddress"}),required:!0},Object.keys(a[e]).map((t=>(0,i.createElement)(p.SelectOption,{key:t,value:t},a[e][t])))))),(0,i.createElement)("br",null),(0,i.createElement)(p.Heading,{level:"4"},(0,i.createElement)(v,{content:"credentials"})),(0,i.createElement)(p.Text,{component:"p",intent:"muted"},(0,i.createElement)(v,{content:I?"credentialsHintWin":"credentialsHint"})),(0,i.createElement)(p.FormFieldText,{name:"domainInfo[userName]",label:(0,i.createElement)(T,{content:"userName"}),required:!0}),(0,i.createElement)(p.FormFieldPassword,{name:"domainInfo[password]",label:(0,i.createElement)(T,{content:"password"}),required:!0})):null:(0,i.createElement)(p.Section,null,(0,i.createElement)(p.FormFieldSelect,{name:"hostingType[hosting]",label:(0,i.createElement)(v,{content:"hostingManagementOptions"})},(0,i.createElement)(p.SelectOption,{value:"hosting",label:"hosting"},(0,i.createElement)(v,{content:"websiteHosting"})),(0,i.createElement)(p.SelectOption,{value:"forwarding",label:"forwarding"},(0,i.createElement)(v,{content:"websiteForwarding"})),(0,i.createElement)(p.SelectOption,{value:"none",label:"none"},(0,i.createElement)(v,{content:"websiteNoHosting"}))),void 0===J.dnsSettings?null:(0,i.createElement)(p.FormFieldCheckbox,{name:"dnsSettings[dns]",label:(0,i.createElement)(v,{content:"dns"}),description:(0,i.createElement)(v,{content:"dnsHint"}),disabled:J.domainName.type===u.TYPE_TECH,checkedValue:J.domainName.type===u.TYPE_TECH?null:"master",uncheckedValue:J.domainName.type===u.TYPE_TECH?null:"none"}),void 0===J.mailSettings?null:(0,i.createElement)(p.FormFieldCheckbox,{name:"mailSettings[mail]",label:(0,i.createElement)(v,{content:"mail"}),description:h?(0,i.createElement)(v,{content:"mailHint"}):(0,i.createElement)(v,{content:"mailHintNoPermission"}),disabled:J.domainName.type===u.TYPE_TECH,checkedValue:J.domainName.type===u.TYPE_TECH?null:"1",uncheckedValue:J.domainName.type===u.TYPE_TECH?null:"0"}),"hosting"===J.hostingType.hosting?(0,i.createElement)(p.Section,{id:"hostingSettings",title:(0,i.createElement)(v,{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)(D,{content:"seoRedirectDirection"}),description:(0,i.createElement)(D,{content:"seoRedirectDirectionHint"}),required:!0,options:[{value:"www",label:`www.${J.domainName.name||"<your_domain>"}`},{value:"non-www",label:J.domainName.name||"<your_domain>"},{value:"none",label:(0,i.createElement)(D,{content:"seoRedirectDirectionNone"})}]})):null,"forwarding"===J.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))};P.propTypes={id:r().string.isRequired,showDomainRegistrationPromo:r().bool,values:r().object.isRequired,ipAddresses:r().shape({ipv4:r().object,ipv6:r().object}).isRequired,allowCustomerCreation:r().bool,allowWebspaceCreation:r().bool,subscriptionsLookUpParams:r().object,webspaceIpAddress:r().string,canManageMailSettings:r().bool,maxSysnameSize:r().number.isRequired,isWindows:r().bool.isRequired,techDomain:r().object.isRequired,settingsEnabled:r().bool,settingsCollapsed:r().bool,applicationWizardConfig:r().object,cancelLink:r().string,embeddedForms:r().array,applicationWizardEmbeddedForms:r().array,className:r().string,render:r().func,onProcess:r().func,onStepPropsChange:r().func,status:r().array},P.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,onStepPropsChange:void 0,status:void 0};const I=(e,t)=>(0,h.default)(P,"add-domain",e,t);t.default=P},772:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(261),r=n.n(l),s=n(144),m=n(773),d=n(774);const c=s.Locale.getTranslate("components.domain-applications.applications"),p=({onFieldChange:e,onStepChange:t,formPrefix:a,wizardConfig:l,embeddedForms:r,wizardEmbeddedForms:s,values:p,children:u,...g})=>{const[b,f]=(0,i.useState)([]),E=t=>{e("applicationName",t),f([...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}]})))])},h=[l.blankSite&&{name:"blank-site",icon:n(775),title:(0,i.createElement)(c,{content:"blank-site.title"}),description:(0,i.createElement)(c,{content:"blank-site.description"})},l.uploadFiles&&{name:"upload-files",icon:n(776),title:(0,i.createElement)(c,{content:"upload-files.title"}),description:(0,i.createElement)(c,{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),w=[h.length>1&&{key:"chooseApplicationStep",children:(0,i.createElement)(m.default,{onApplicationSelect:E,applicationsList:h}),nextButton:!1},{key:"addDomainStep",formPrefix:a,children:u,embeddedForms:r}].filter(Boolean);(0,i.useEffect)((()=>{if(0===h.length&&E("blank-site"),1===h.length){const[{name:e}]=h;E(e)}}),[]);const S=p.applicationName&&1!==w.length?1:0;return(0,i.useEffect)((()=>{null==t||t(w[S].key)}),[S]),(0,i.createElement)(d.default,o()({},g,{values:p,onFieldChange:e,onStepChange:(t,n)=>0===n&&w.length>1?(e("applicationName",null),f([]),t):n,step:S,steps:[...w,...b]}))};p.propTypes={values:r().object.isRequired,onFieldChange:r().func.isRequired,onStepChange:r().func,children:r().node,formPrefix:r().string,wizardConfig:r().shape({enabled:r().bool,blankSite:r().bool,uploadFiles:r().bool}),embeddedForms:r().array,wizardEmbeddedForms:r().array},p.defaultProps={children:null,onStepChange:void 0,formPrefix:"",wizardConfig:{enabled:!0,blankSite:!0,uploadFiles:!0},embeddedForms:[],wizardEmbeddedForms:[]},t.default=p},773:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(155),i=n(261),l=n.n(i);const r=n(144).Locale.getTranslate("components.domain-applications"),s=({onApplicationSelect:e,applicationsList:t})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.Heading,{level:"3"},(0,a.createElement)(r,{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))))));s.propTypes={onApplicationSelect:l().func.isRequired,applicationsList:l().arrayOf(l().shape({name:l().string.isRequired,icon:l().string.isRequired,title:l().node,description:l().node}))},s.defaultProps={applicationsList:[]},t.default=s},780:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n(556),l=n(144),r=n(576),s=n(582),m=n(781);const d=l.Locale.getSection("admin.components.lists.domains"),c=l.Locale.getSection("components.icp-permit"),p=({action:e}={})=>{const t=window.location.pathname.split("/");return e&&(t[3]=e),t.join("/")},u=({data:e,searchFilters:t,dataAction:o,deleteAction:u,allowCreateDomain:g,allowManageSubdomain:b,allowManageDomainAliases:f,showDeleteButton:E,isHomonymSearchEnabled:h,showOwnerName:w,showExpirationDate:S,userId:y,icpPermitSupported:v,icpPermitLink:T})=>{const k=(0,i.useHistory)(),C=(0,s.createNavigateHandler)(k);return(0,a.createElement)(r.default,null,(()=>new l.Panel({cls:"list-box",items:[new l.List({id:"domains-list",data:e,dataUrl:p({action:o}),searchFilters:t,searchOveral:"domainName",disabledSelectHint:d.lmsg("disabledSelectHint"),operations:[g?{componentType:l.SmallButton,id:"buttonAddDomain",cls:"s-btn sb-new-domain",title:d.lmsg("buttonAddDomain"),description:d.lmsg("hintAddDomain"),href:p({action:"add-domain"}),handler:C}:null,b?{componentType:l.SmallButton,id:"buttonAddSubDomain",cls:"s-btn sb-new-subdomain",title:d.lmsg("buttonAddSubdomain"),description:d.lmsg("hintAddSubdomain"),href:p({action:"add-subdomain"})}:null,f?{componentType:l.SmallButton,id:"buttonAddDomainAlias",cls:"s-btn sb-new-domain-alias",title:d.lmsg("buttonAddDomainAlias"),description:d.lmsg("hintAddDomainAlias"),href:p({action:"add-domain-alias"})}:null,g||b||f?{componentType:l.bar.Separator}:null,{componentType:l.list.AdditionalActions,title:d.lmsg("buttonChangeStatus"),operations:[{componentType:l.SmallButton,id:"buttonSuspendDomains",title:d.lmsg("buttonSuspendDomains"),description:d.lmsg("hintSuspendDomains"),addCls:"sb-suspend",cls:"sb-btn",handler(){(0,l.getComponent)("domains-list").execGroupOperation({url:`/domain/suspend/?redirect=${p()}`,skipConfirmation:!0})}},{componentType:l.SmallButton,id:"buttonDisableDomains",title:d.lmsg("buttonDisableDomains"),description:d.lmsg("hintDisableDomains"),addCls:"sb-turn-off",cls:"sb-btn",handler(){(0,l.getComponent)("domains-list").execGroupOperation({url:`/domain/disable/?redirect=${p()}`,skipConfirmation:!0})}},{componentType:l.SmallButton,id:"buttonActivateDomains",title:d.lmsg("buttonActivateDomains"),description:d.lmsg("hintActivateDomains"),addCls:"sb-activate",cls:"sb-btn",handler(){(0,l.getComponent)("domains-list").execGroupOperation({url:`/domain/activate/?redirect=${p()}`,skipConfirmation:!0})}}]},E?{componentType:l.bar.Separator}:null,E?{componentType:l.SmallButton,id:"buttonRemoveSite",title:l.Locale.getSection("components.buttons").lmsg("remove"),description:d.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:p({action:u}),subtype:l.messageBox.SUBTYPE_DELETE,mouseEvent:e,text:d.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?d.lmsg("removeConfirmationSubscription",{domains:a.join(", ")}).replace(/\n/gm,"<br>"):"",isAjax:h,requestUrl:p({action:"search-homonym-data"}),loadingTitle:l.Locale.getSection("components.homonyms").lmsg("loading")})}}:null].filter(Boolean),columns:[l.list.COLUMN_SELECTION,{header:d.lmsg("domainName"),sortable:!0,dataIndex:"domainDisplayName",renderer(e){const t=e.overviewUrl?(0,l.createElement)("a",{href:(0,l.prepareUrl)(e.overviewUrl),onclick:C},(0,l.escapeHtml)(e.domainDisplayName)):(0,l.escapeHtml)(e.domainDisplayName);if(parseInt(e.domainStatus)){const a="suspend"===e.turnOffAction,o=a?d.lmsg("statusSuspended"):d.lmsg("statusDisabled"),i=n(a?782:783),r=a?"suspended":"disabled";return(0,l.createElement)(".b-indent",[(0,l.createElement)("span.b-indent-icon",(0,l.createElement)("span",[(0,l.createElement)("span.tooltipData",o),(0,l.createElement)("img",{src:i,alt:r,title:""})])),t,...(0,m.default)(e,d)])}return(0,l.createElement)(".",[t,...(0,m.default)(e,d)])}},v?{header:c.lmsg("icpPermit"),sortable:!0,dataIndex:"icpStatus",renderer({icpStatus:e,icpPermit:t}){const a=1==e?c.lmsg("icpStatusAllowedDescription"):c.lmsg("icpStatusNotAllowedDescription"),o=n(1==e?784:785);let i=t?(0,l.escapeHtml)(t):1==e?"":c.lmsg("icpStatusNotAllowed");return T&&(i=`<a href="${T}" target="_blank">${i}</a>`),`<span class="tooltipData">${a}</span><img src="${o}" alt="" /> ${i}`}}:null,{header:d.lmsg("hostingType"),sortable:!0,dataIndex:"hostingType",renderer(e){let t="";return"alias"===e.hostingType?t=`<img src="${n(786)}"/> ${d.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(787)}"/> ${d.lmsg(e.parentDomainId>0?"subdomainWebsite":"website")}`:"none"===e.hostingType?t=`<img src="${n(788)}"/><em class="hint">${d.lmsg("noHosting")}</em>`:"frm_fwd"!==e.hostingType&&"std_fwd"!==e.hostingType||(t=`<img src="${n(789)}"/> ${d.lmsg("forwardingTo")} <a href="${(0,l.escapeHtml)(e.forwardingUrl)}" target="_blank">${(0,l.escapeHtml)(e.forwardingDisplayUrl)}</a>`),t}},w?{header:d.lmsg("ownerName"),sortable:!0,dataIndex:"ownerName",renderer({ownerId:e,ownerType:t,ownerName:n,ownerCompanyName:a}){let o=null;return parseInt(e)!==y&&("client"===t?o=`/admin/customer/overview/id/${e}`:"reseller"===t&&(o=`/admin/reseller/overview/id/${e}`)),[o?(0,l.createElement)("a",{href:o,onclick:C},(0,l.escapeHtml)(n)):(0,l.escapeHtml)(n),a?`, ${(0,l.escapeHtml)(a)}`:null]}}:null,S?{header:d.lmsg("expirationDate"),sortable:!1,dataIndex:"expirationDate",renderer:({expirationDateString:e})=>e?(0,l.escapeHtml)(e):"&mdash;"}:null,{header:d.lmsg("diskUsage"),sortable:!0,dataIndex:"realSize",renderer:({diskUsage:e})=>(0,l.escapeHtml)(e)},{header:d.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",d.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",d.lmsg("previewSite")))}},{header:"",sortable:!1,renderer({manageUrl:e,ownerId:t,ownerType:n}){if(!e||parseInt(t)===y)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",d.lmsg("reseller"===n?"manageInResellerPanel":"manageInCustomerPanel")))}}].filter(Boolean)})]})))};u.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},u.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=u},771:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(155),r=n(144),s=n(261),m=n.n(s),d=n(615),c=n(635),p=n(582);const u="running",g=()=>(0,r.getComponent)("asyncProgressBarWrapper"),b=({children:e,dataType:t,isOpen:n,onClose:a,task:s,history:m,pageUrl:b,...f})=>{const[E,h]=(0,i.useState)([]),[w,S]=(0,i.useState)(null),[y,v]=(0,i.useState)(null),[T,k]=(0,i.useState)(null),C=s?s.id:null,{addToast:D}=(0,c.useToaster)(),N=()=>m&&y&&(0,p.isMatch)(y)&&!((e,t)=>{if(e===t)return!0;try{const n=new URLSearchParams(new URL(e,window.location.origin).search);return n.get("returnUrl")===t||n.get("pageUrl")===t}catch(e){}return!0})(y,b),F=({id:e,steps:t,status:a,errors:o,output:l,progressValue:s,progressTitle:m,progressTitleHtml:d})=>{if(!n||C!==e)return;const c=d||m,p=r.Task.STATUS_STARTED===a?u:a,g=e=>(e||[]).map((e=>(0,i.createElement)("div",{key:e},e)));k(p),t&&t.length?(S(c),h(t.map((({errors:e,...t})=>({children:g(e),...t}))))):h([{title:c,status:p,progress:Number(s),children:(0,i.createElement)(i.Fragment,null,g(o),g(l))}])};(0,i.useEffect)((()=>{const e=g();n?(null==e||e.hide(),h([]),S(null),v(null),k(null)):(async()=>{P()||await I(),null==e||e.show()})()}),[n]),(0,i.useEffect)((()=>{var e;C&&(null===(e=g())||void 0===e||e.update(),F(s))}),[C,s]),(0,d.default)("plesk:taskStepUpdate",F,r.Observer),(0,d.default)("plesk:taskComplete",(({id:e,redirect:t,status:a})=>{n&&C===e&&r.Task.STATUS_DONE===a&&v(t.url||t)}),r.Observer);const P=()=>r.Task.STATUS_NOT_STARTED===T||u===T,I=()=>{var e,t;return C&&(null===(e=g())||void 0===e||null===(t=e.getItems().find((e=>e.getId()===C)))||void 0===t?void 0:t.remove())};return(0,i.createElement)(l.Drawer,o()({"data-type":t,isOpen:n,onClose:()=>{y?N()?m.push(y,{reload:!0}):(0,r.redirect)(y):a()},progress:E.length?{cancelable:!1,title:w,steps:E,onFinish:()=>{I(),D({intent:"success",message:w||E[0].title})},autoCloseTimeout:1}:null,hideButton:P()},f),e)};b.propTypes={children:m().node,dataType:m().string.isRequired,isOpen:m().bool,onClose:m().func.isRequired,task:m().shape({id:m().string.isRequired,steps:m().array,status:m().string,progressTitle:m().string,progressTitleHtml:m().string}),history:m().object,pageUrl:m().string},b.defaultProps={children:null,isOpen:!1,task:null,history:null,pageUrl:null},t.default=b},767:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n.n(o),l=n(155),r=n(768);const s=n(144).Locale.getSection("components.elements.lookup"),m=({data:e,dataUrl:t,lookUpParams:n,newItemValue:o,locale:i,placeholder:m,...d})=>(0,a.createElement)(l.FormField,d,(({getId:l,getName:d,getValue:c,setValue:p,isDisabled:u})=>(0,a.createElement)(r.default,{id:l(),name:d(),value:c(),onChange:e=>p(e),data:e,dataUrl:t,lookUpParams:n,newItemValue:o,locale:{...s.messages,...i},disabled:u(),placeholder:m})));m.propTypes={locale:i().object,data:i().array,dataUrl:i().string,lookUpParams:i().object,newItemValue:i().object,placeholder:i().string},m.defaultProps={locale:void 0,data:void 0,dataUrl:void 0,lookUpParams:void 0,newItemValue:void 0,placeholder:void 0},t.default=m},768:(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}},774:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(155),l=n(154),r=n(722),s=n(144),m=n(261),d=n.n(m);const c=s.Locale.getTranslate("components.buttons"),p=({step:e,steps:t,onStepChange:n,onSubmit:a,submitButton:s,cancelButton:m,...d})=>{const p=(0,l.useRef)(),[u,g]=(0,l.useState)(0),b=u+e,{children:f,formPrefix:E,embeddedForms:h,backButton:w,nextButton:S}={backButton:{},nextButton:{},...t[b]},y=b===t.length-1,v=0===b,T=()=>{p.current.handleEmbeddedFormValues(),g((t=>n(t+e,t+e+1)-e))};return(0,l.createElement)(r.default,o()({},d,{ref:p,additionalButtons:[v&&m&&(0,l.createElement)(i.Button,o()({key:"cancel",children:(0,l.createElement)(c,{content:"cancel"})},m)),!v&&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)(c,{content:"back"})},w)),!y&&S&&(0,l.createElement)(i.Button,o()({key:"next",intent:"primary",onClick:T,arrow:"forward",children:(0,l.createElement)(c,{content:"nextWithoutArrow"})},S)),y&&s&&(0,l.createElement)(i.Button,o()({key:"submit",intent:"primary",arrow:"forward",onClick:()=>p.current.submit(),children:(0,l.createElement)(c,{content:"ok"})},s))],onSubmit:y?a:T,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:E,embeddedForms:h}),f)};p.propTypes={step:d().number,steps:d().arrayOf(d().shape({formPrefix:d().string,embeddedForms:d().array,children:d().node,nextButton:d().bool,backButton:d().bool})),onStepChange:d().func,onSubmit:d().func,submitButton:d().object,cancelButton:d().object},p.defaultProps={step:0,steps:[],onStepChange:(e,t)=>t,onSubmit:void 0,submitButton:{},cancelButton:{}},t.default=p},769:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(155),i=n(144),l=n(261),r=n.n(l);const s=i.Locale.getTranslate("admin.components.forms.admin-panel.form.login-info"),m=({prefix:e})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.FormFieldText,{name:"".concat(e,"[userName]"),label:(0,a.createElement)(s,{content:"userName"}),required:!0,autoComplete:"off"}),(0,a.createElement)(o.FormFieldPassword,{name:"".concat(e,"[password]"),label:(0,a.createElement)(s,{content:"password"}),required:!0,autoComplete:"off"}),(0,a.createElement)(o.FormFieldCheckbox,{name:"".concat(e,"[isActivationRequired]"),label:(0,a.createElement)(s,{content:"emailActivation"}),description:(0,a.createElement)(s,{content:"emailActivationHint"}),checkedValue:"1",uncheckedValue:"0"}));m.propTypes={prefix:r().string.isRequired},t.default=m},781:(e,t,n)=>{"use strict";n.r(t);var a=n(144);t.default=({adminDescription:e,resellerDescription:t,ownerDescription:n,hideResellerTitleDescription:o,hideOwnerTitleDescription:i},l,r="hint")=>[e?(0,a.createElement)(`.${r}`,[(0,a.escapeHtml)(e.truncate(50,"...")),(0,a.createElement)("span.tooltipData",(0,a.escapeHtml)(e))]):"",t?(0,a.createElement)(`.${r}`,[`${o?"":`${l.lmsg("resellerDescription")}: `}${(0,a.escapeHtml)(t.truncate(50,"..."))}`,(0,a.createElement)("span.tooltipData",(0,a.escapeHtml)(t))]):"",n?(0,a.createElement)(`.${r}`,[`${i?"":`${l.lmsg("ownerDescription")}: `}${(0,a.escapeHtml)(n.truncate(50,"..."))}`,(0,a.createElement)("span.tooltipData",(0,a.escapeHtml)(n))]):""]},766:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TYPE_TECH:()=>d,TYPE_CUSTOM:()=>c});var a=n(153),o=n.n(a),i=n(155),l=n(154),r=n(261),s=n.n(r),m=n(144);const d="tech",c="custom",p=m.Locale.getTranslate("components.forms.domain.tech-domain-name"),u=({isEnabled:e,isDefault:t,url:n,vendor:a,typeName:o,name:r,ipAddress:s,onDomainNameChange:m,onTypeChange:u})=>{const[f,E]=(0,l.useState)(e&&t?d:c);if(!e)return(0,l.createElement)(g,{name:r,isEnabled:!1,onDomainNameChange:m});const h=[{key:c,icon:(0,l.createElement)(i.Icon,{name:"ribbon",intent:"success"})},{key:d,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=>{E(e),u(e),m("")})(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}))))),f===d?(0,l.createElement)(b,{name:r,ipAddress:s,url:n,vendor:a,onDomainNameChange:m}):(0,l.createElement)(g,{name:r,isEnabled:!0,onDomainNameChange:m}))},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:s().string.isRequired,isEnabled:s().bool.isRequired,onDomainNameChange:s().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)(f,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:s().string.isRequired,onDomainNameChange:s().func.isRequired};const f=({id:e,name:t,ipAddress:n,url:a,vendor:o,getValue:r,setValue:s})=>{const[m,d]=(0,l.useState)(!1),[c,u]=(0,l.useState)(n),[g,b]=(0,l.useState)({}),f=(0,l.useCallback)((async()=>{if(b({}),!r()||n!==c)if(n){d(!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"})});s(t),u(n)}catch{b({error:(0,l.createElement)(p,{content:"error"})})}finally{d(!1)}}else b({noIpAddress:(0,l.createElement)(p,{content:"errorNoIpAddress"})})}),[r,s,n,c,a,o]);return(0,l.useEffect)((()=>{f()}),[n]),(0,l.createElement)(l.Fragment,null,m?(0,l.createElement)(i.Status,{progress:!0},(0,l.createElement)(p,{content:"generating"})):(0,l.createElement)(i.Text,{bold:!0},r()),(0,l.createElement)("input",{hidden:!0,id:e,name:t,value:r(),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]))))};f.propTypes={id:s().string.isRequired,name:s().string.isRequired,ipAddress:s().string,url:s().string.isRequired,vendor:s().string.isRequired,getValue:s().func.isRequired,setValue:s().func.isRequired},f.defaultProps={ipAddress:null},u.propTypes={isEnabled:s().bool.isRequired,isDefault:s().bool.isRequired,url:s().string.isRequired,vendor:s().string.isRequired,typeName:s().string.isRequired,name:s().string.isRequired,ipAddress:s().string,onDomainNameChange:s().func.isRequired,onTypeChange:s().func.isRequired},u.defaultProps={ipAddress:null},t.default=u},770:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(302),r=n(405),s=n(556),m=n(155),d=n(144),c=n(771);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,r.useApolloClient)(),u=!!(0,s.useRouteMatch)(a),g=(0,s.useHistory)(),[b,f]=(0,i.useState)(null),[E,h]=(0,i.useState)(null),[w,S]=(0,i.useState)(null);(0,i.useEffect)((()=>{u&&(f(null),h(null),Promise.all([d.api.get(a),l.query({query:p})]).then((([e,{data:{config:t}}])=>{e.redirect?(0,d.redirect)(e.redirect):f({...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 y=()=>{g.push(n)};return[(0,i.createElement)(c.default,o()({dataType:t,title:b?b.pageTitle:"",size:"sm",isOpen:u,onClose:y,form:b?(0,i.createElement)(e,o()({onCancel:y,onProcess:h,onStepPropsChange:S},b)):null,task:E,history:g,pageUrl:n},w),b?null:(0,i.createElement)(m.ContentLoader,null))]}},764:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(261),r=n.n(l),s=n(144),m=n(602),d=n(648),c=n(765),p=n(780),u=n(576);const g=s.Locale.getSection("admin.controllers.domain.list"),b=e=>{const[t]=(0,c.useAddDomainFormInDrawer)("/admin/domain/list","/admin/domain/add-domain");return(0,i.createElement)(i.Fragment,null,t,(0,i.createElement)(u.default,null,(()=>new s.Hint({hint:g.lmsg("hint")}))),(0,i.createElement)(p.default,o()({dataAction:"list-data",deleteAction:"delete",showOwnerName:!0,showExpirationDate:!0},e)))};b.propTypes={tabs:r().array.isRequired},t.default=(0,m.withPageLayout)((0,d.withPageContent)(b))},763:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a.default});var a=n(764)},785:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/att-tr.png?f00bf7056f997d02b1565fff15ed7ab7"},786:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/dns.png?d10cfc4afe5c5c040eaf99c3ea14429d"},789:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/forward-to-dom.png?761778de5722f4bb1f3611d27968cb0f"},783:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/off.png?84d64d1bd3267c21795505b7daa43800"},788:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/spacer.png?4710d0e07ee1a4d7ebdb1972701168fa"},784:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/subscription-status-ok.png?6d52f91c87cbdc73b4ef0b5ded92c441"},782:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/subscription-status-suspended.png?7968ea094f0aa3fdced5d59b0c7f3196"},787:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/website.png?ac6aa9eaf06048cbd5799a61daad9766"},779:e=>{e.exports=Jsw.skinUrl+"/images/add-domain/process.svg?2cd8b0c86019c2d951acd8c173a6974f"},778:e=>{e.exports=Jsw.skinUrl+"/images/add-domain/step1.svg?cdb98922dc6afaf36776f30b81762d6d"},777:e=>{e.exports=Jsw.skinUrl+"/images/add-domain/step2.svg?5c9d5f36abe3d2707367cb8a7f9e432a"},775:e=>{e.exports=Jsw.skinUrl+"/images/code.svg?e9fb9feb605b8cf334414f688a603918"},776:e=>{e.exports=Jsw.skinUrl+"/images/upload-files.svg?e6091d3474a27a3eafe63b2d09b1b943"}}]);
//# sourceMappingURL=list.js.map?30f82dbe835c819b8b32