"use strict";(self.webpackChunktransfer_cpanel_account=self.webpackChunktransfer_cpanel_account||[]).push([[179],{4474:(v,F,d)=>{var T=d(1481),e=d(1657),u=d(4719),a=d(6895),Z=d(7564),L=d(348),l=d(3063),U=d(5419),k=d(269),q=d(8635);const M=window&&window.PAGE?window.PAGE.base:"",w=(!(!window||!window.PAGE)&&window,window&&window.PAGE?window.PAGE.cp_security_token:""),H=!(!window||!window.PAGE)&&"0"!==window.PAGE.dedicated_ip_available,E=window&&window.PAGE?window.PAGE.pending_sessions:[],J=window&&window.PAGE?window.PAGE.transfer_states:[],R=!(!window||!window.PAGE)&&(0,q.s)(window.PAGE.does_license_disable_form),S=window&&window.PAGE?0===window.PAGE.license_disable_form_level?"partial":"full":"";var _=d(2502),c=(()=>{return(s=c||(c={})).fromLocalFile="transferFromLocalFile",s.fromUpload="transferFromUploadFile",s.fromRemote="transferFromRemoteAccount",c;var s})(),g=(()=>{return(s=g||(g={})).none="NONE",s.attemptAccount="ATTEMPT_ACCOUNT",g;var s})(),m=(()=>{return(s=m||(m={})).all="all",s.cpanelOnly="basic",m;var s})(),b=d(4850),Q=d(7709),O=d(8946);let P=(()=>{class s{constructor(t,o,r){this._whmApiClient=t,this._http=o,this._location=r,this._securityToken=w}createLocalRestoreSession(t){const o=this._apiCall("start_local_cpmove_restore",{cpmovepath:t.cpMovePath,overwrite:t.overwrite?"1":"0",dedicated_ip:t.dedicatedIP?"1":"0",restricted:t.restrictedRestore?"1":"0",update_a_records:t.updateARecords,mail_location:t.mailNode});return this._whmApiClient.post(o).pipe((0,b.U)(r=>{if(1===r.status)return r.data.transfer_session_id;throw r.messages.pop()}))}createRemoteTransferSession(t){const o=this._apiCall("create_remote_user_transfer_session",{host:t.hostname,password:t.password,unrestricted_restore:t.restrictedRestore?0:1});return this._whmApiClient.post(o).pipe((0,b.U)(r=>{if(1===r.status)return r.data.transfer_session_id;throw r.messages.pop()}))}createUploadRestoreSession(t){const r=this._location.prepareExternalUrl(`${this._securityToken}/scripts5/upload_and_restore_cpmove`);return this._http.post(r,t,{responseType:"text"})}enqueueTransfer(t,o){const r=this._apiCall("enqueue_transfer_item",{module:"AccountRemoteUser",transfer_session_id:o,ip:t.dedicatedIP?1:0,user:t.username,localuser:t.username,skipres:1,mail_location:t.mailNode});return this._whmApiClient.post(r).pipe((0,b.U)(n=>{if(1===n.status)return!0;throw n.messages.pop()}))}getArchiveFiles(){const t=this._apiCall("list_cparchive_files");return this._whmApiClient.post(t).pipe((0,b.U)(o=>o.data.sort((r,n)=>r.user<n.user?-1:r.user>n.user?1:0)))}getLinkedMailNodes(){const t=this._apiCall("list_linked_server_nodes");return this._whmApiClient.post(t).pipe((0,b.U)(o=>(o.data=o.data.filter(r=>r.worker_capabilities.Mail||"Mail"===r.worker_capabilities),o.data)))}_apiCall(t,o){const r=o?Object.keys(o).map(n=>new Q.h(n,o[n])):[];return new O.r(O.N.JsonApi,{method:t,arguments:r})}}return s.\u0275fac=function(t){return new(t||s)(e.LFG(U.A4),e.LFG(Z.eN),e.LFG(a.Ye))},s.\u0275prov=e.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})();const D=s=>{const i=[new RegExp("(?:.*)(?:.tar.gz)$"),new RegExp("(?:.*)(?:.tar)$"),new RegExp("^(?:cpmove-)(?:.*)")],t=new RegExp("^(?:C:\\\\fakepath\\\\cpmove-)(?:.*)");return o=>{const r=o.value.file?o.value.file:o.value,n=i.slice();return o.value.file||n.push(t),n.every(p=>!p.test(r))?{cpmoveFileValidator:{value:r,message:s}}:null}},Y=[[["","form-group-label",""]],[["","form-group-control",""]]],G=["[form-group-label]","[form-group-control]"];let V=(()=>{class s{constructor(){}hasErrors(){return this.control.invalid}hasChanged(){return this.control.dirty||this.control.touched}hasValidators(){return!!this.control.validator||!!this.control.asyncValidator}getFieldErrors(){return Object.keys(this.control.errors).map(t=>({key:t,message:this.control.errors[t].message}))}getFieldStateClasses(){return this.hasValidators()&&this.hasChanged()?this.hasErrors()?"has-error":"has-success":""}ngOnInit(){this.id=`formGroup_${this.for}`,this.labelID=`${this.id}_formLabel`,this.validationContainerID=`${this.id}_validationContainer`}}return s.\u0275fac=function(t){return new(t||s)},s.\u0275cmp=e.Xpm({type:s,selectors:[["app-whm-transfer-cp-acct-form-grp"]],inputs:{for:"for",label:"label",control:"control",showAllHelp:"showAllHelp"},ngContentSelectors:G,decls:11,vars:8,consts:[[1,"form-group",3,"ngClass"],[1,"row"],[1,"col-xs-12"],[3,"id","for","labelText","showInfoBlock"],[3,"id","control"]],template:function(t,o){1&t&&(e.F$t(Y),e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"cp-form-label",3),e.Hsn(4),e.qZA()()(),e.TgZ(5,"div",1)(6,"div",2),e.Hsn(7,1),e.qZA()(),e.TgZ(8,"div",1)(9,"div",2),e._UZ(10,"cp-validation-container",4),e.qZA()()()),2&t&&(e.Q6J("ngClass",o.getFieldStateClasses()),e.uIk("id",o.id),e.xp6(3),e.Q6J("id",o.labelID)("for",o.for)("labelText",o.label)("showInfoBlock",o.showAllHelp),e.xp6(7),e.Q6J("id",o.validationContainerID)("control",o.control))},directives:[a.mk,l._P,l.fm],encapsulation:2}),s})();const j=["uploadedFile"];function $(s,i){1&s&&e._UZ(0,"cp-loading-spinner",2)}function B(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"label",37)(1,"input",38),e.NdJ("click",function(){e.CHM(t);const r=e.oxw().$implicit;return e.oxw(2).patchTransferOption(r.type)}),e.qZA(),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&s){const t=e.oxw().$implicit;e.MGl("for","transferOption_",t.id,""),e.xp6(1),e.MGl("id","transferOption_",t.id,""),e.Q6J("value",t.type),e.xp6(2),e.Oqu(t.label)}}function z(s,i){if(1&s&&(e.ynx(0),e.YNc(1,B,4,4,"label",35),e.TgZ(2,"span",36),e._uU(3),e.qZA(),e.BQk()),2&s){const t=i.$implicit;e.xp6(1),e.Q6J("ngIf",!t.optionHidden),e.xp6(2),e.Oqu(t.description)}}function X(s,i){if(1&s&&(e.TgZ(0,"span",48),e._uU(1),e.qZA()),2&s){const t=e.oxw(3);e.xp6(1),e.hij(" ",t.performSearchIconLabel," ")}}function K(s,i){if(1&s&&(e.TgZ(0,"span",48),e._uU(1),e.qZA()),2&s){const t=e.oxw(3);e.xp6(1),e.hij(" ",t.clearSearchIconLabel," ")}}function W(s,i){if(1&s&&(e.ynx(0),e.TgZ(1,"option",49),e._uU(2),e.qZA(),e.BQk()),2&s){const t=i.$implicit,o=e.oxw(3);e.xp6(1),e.s9C("value",t.file),e.xp6(1),e.HOy(" ",o.locale.maketext("User"),": ",t.user," ",o.locale.maketext("File"),": ",t.file," ")}}function ee(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"section",39)(1,"app-whm-transfer-cp-acct-form-grp",40)(2,"div",21),e._uU(3),e.qZA(),e.TgZ(4,"div",22)(5,"div",41)(6,"input",42),e.NdJ("keyup.esc",function(){return e.CHM(t),e.oxw(2).clearSearchValue()}),e.qZA(),e.TgZ(7,"span",43)(8,"button",44),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).clearSearchValue()}),e._UZ(9,"span",45),e.YNc(10,X,2,1,"span",46),e.YNc(11,K,2,1,"span",46),e.qZA()()(),e.TgZ(12,"datalist",47)(13,"select"),e.YNc(14,W,3,5,"ng-container",24),e.qZA()()()()()}if(2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("showAllHelp",t.showAllHelp)("control",t.selectedUserFile)("label",t.locale.maketext("Select a File")),e.xp6(2),e.hij(" ",t.locale.maketext("Select the file on the server to use for the restoration.")," "),e.xp6(3),e.s9C("placeholder",t.locale.maketext("Search for or select the [asis,cpmove] restoration file.")),e.xp6(3),e.Q6J("ngClass",t.selectedUserFile.value.length>0?"fas fa-times":"fas fa-search"),e.xp6(1),e.Q6J("ngIf",0===t.selectedUserFile.value.length),e.xp6(1),e.Q6J("ngIf",t.selectedUserFile.value.length>0),e.xp6(3),e.Q6J("ngForOf",t.archiveFiles)}}function te(s,i){if(1&s&&(e.TgZ(0,"section",50)(1,"app-whm-transfer-cp-acct-form-grp",40)(2,"div",21),e._uU(3),e.qZA(),e.TgZ(4,"div",22)(5,"label"),e._UZ(6,"input",51,52),e.qZA()()()()),2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("showAllHelp",t.showAllHelp)("control",t.selectedUserFile)("label",t.locale.maketext("Upload File")),e.xp6(2),e.hij(" ",t.locale.maketext("Select a [asis,cpmove] file to upload.")," ")}}function se(s,i){if(1&s&&(e.TgZ(0,"section",53)(1,"app-whm-transfer-cp-acct-form-grp",54)(2,"div",21),e._uU(3),e.qZA(),e._UZ(4,"input",55),e.qZA(),e.TgZ(5,"app-whm-transfer-cp-acct-form-grp",56)(6,"div",21),e._uU(7),e.qZA(),e._UZ(8,"input",57),e.qZA(),e.TgZ(9,"app-whm-transfer-cp-acct-form-grp",58)(10,"div",21),e._uU(11),e.qZA(),e._UZ(12,"input",59),e.qZA()()),2&s){const t=e.oxw(2);e.xp6(1),e.s9C("label",t.locale.maketext("Remote Server:")),e.Q6J("control",t.hostname)("showAllHelp",t.showAllHelp),e.xp6(2),e.hij(" ",t.locale.maketext("If the site is not reachable and the server is online, this should be the address of the server that contains the account.")," "),e.xp6(1),e.s9C("placeholder",t.locale.maketext("192.0.2.100 or host.example.com")),e.uIk("aria-label",t.locale.maketext("Remote Server:")),e.xp6(1),e.s9C("label",t.locale.maketext("Remote username:")),e.Q6J("control",t.username)("showAllHelp",t.showAllHelp),e.xp6(2),e.hij(" ",t.locale.maketext("The username of the [asis,cPanel] account to transfer.")," "),e.xp6(1),e.uIk("aria-label",t.locale.maketext("Remote username:")),e.xp6(1),e.s9C("label",t.locale.maketext("Remote password:")),e.Q6J("control",t.password)("showAllHelp",t.showAllHelp),e.xp6(2),e.hij(" ",t.locale.maketext("The password of the [asis,cPanel] account to transfer.")," "),e.xp6(1),e.uIk("aria-label",t.locale.maketext("Remote password:"))}}function oe(s,i){if(1&s&&(e.TgZ(0,"section",60)(1,"app-whm-transfer-cp-acct-form-grp",61)(2,"div",21),e._uU(3),e.qZA(),e.TgZ(4,"div",62),e._UZ(5,"input",63),e._uU(6),e.qZA()()()),2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("showAllHelp",t.showAllHelp)("control",t.overwriteExisting)("label",t.locale.maketext("Overwrite Existing")),e.xp6(2),e.hij(" ",t.locale.maketext("Select this option to overwrite any [asis,cPanel] accounts with the same username.")," "),e.xp6(3),e.hij(" ",t.locale.maketext("Overwrite if the [asis,cPanel] user already exists.")," ")}}function re(s,i){if(1&s){const t=e.EpF();e.ynx(0),e.TgZ(1,"label")(2,"input",66),e.NdJ("click",function(){const n=e.CHM(t).$implicit;return e.oxw(3).patchMigrateAOption(n.type)}),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()(),e.TgZ(5,"span",36),e._uU(6),e.qZA(),e.BQk()}if(2&s){const t=i.$implicit;e.xp6(2),e.Q6J("id",t.id)("value",t.type),e.xp6(2),e.Oqu(t.label),e.xp6(2),e.Oqu(t.description)}}function ne(s,i){if(1&s&&(e.TgZ(0,"section",64)(1,"h4",12),e._uU(2),e.qZA(),e.TgZ(3,"app-whm-transfer-cp-acct-form-grp",65)(4,"div",21),e._uU(5),e.qZA(),e.TgZ(6,"div",22)(7,"div",23),e.YNc(8,re,7,4,"ng-container",24),e.qZA()()()()),2&s){const t=e.oxw(2);e.xp6(2),e.hij(" ",t.locale.maketext("[asis,A] Records")," "),e.xp6(1),e.Q6J("showAllHelp",t.showAllHelp)("control",t.migrateARecord)("label",t.locale.maketext("Migrate [asis,A] Records")),e.xp6(2),e.hij(" ",t.locale.maketext("Replace either all or some of the [asis,A] records upon restoration for the [asis,cPanel] account.")," "),e.xp6(3),e.Q6J("ngForOf",t.migrateARecordOptions)}}function ie(s,i){if(1&s&&(e.TgZ(0,"option",75),e._uU(1),e.qZA()),2&s){const t=i.$implicit;e.Q6J("ngValue",t),e.xp6(1),e.AsE(" ",t.alias," (",t.hostname,") ")}}const ae=function(s){return{"margin-top":s}};function le(s,i){if(1&s&&(e.TgZ(0,"section",39)(1,"h4",12),e._uU(2),e.qZA(),e.TgZ(3,"app-whm-transfer-cp-acct-form-grp",67)(4,"div",21)(5,"p",68),e._uU(6),e.qZA()(),e.TgZ(7,"div",69)(8,"span",70),e._uU(9),e.qZA(),e.TgZ(10,"select",71)(11,"option",72),e._uU(12),e.qZA(),e.TgZ(13,"option",73),e._uU(14),e.qZA(),e.YNc(15,ie,2,3,"option",74),e.qZA()()()()),2&s){const t=e.oxw(2);e.xp6(2),e.hij(" ",t.locale.maketext("Linked Nodes")," "),e.xp6(1),e.Q6J("showAllHelp",t.showAllHelp)("control",t.mailNodeOption)("label",t.locale.maketext("Linked Node Options")),e.xp6(2),e.Q6J("ngStyle",e.VKq(10,ae,t.warningLabelMargin)),e.xp6(1),e.hij(" ",t.locale.maketext("Select whether to link to a child node. Select the \u201cUse the archive file\u2019s stored configuration.\u201d setting to use the archive file\u2019s stored configuration. If the archive file indicates the use of one of the local server\u2019s linked nodes, the system will attempt to use that linked node. Otherwise, the account will restore to the local server.")," "),e.xp6(3),e.Oqu(t.locale.maketext("Mail")),e.xp6(3),e.hij(" ",t.locale.maketext("Use the archive file\u2019s stored configuration.")," "),e.xp6(2),e.hij(" ",t.locale.maketext("Use only this server. Transfer or restore locally.")," "),e.xp6(1),e.Q6J("ngForOf",t.linkedMailNodes)}}const ce=function(s){return{"margin-left":s}};function pe(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"form",3)(1,"div",4)(2,"div",5)(3,"div",6),e._uU(4),e.qZA(),e.TgZ(5,"div",7)(6,"button",8),e.NdJ("click",function(){return e.CHM(t),e.oxw().toggleHelp()}),e._uU(7),e._UZ(8,"i",9),e.qZA()(),e._UZ(9,"div",10),e.qZA(),e.TgZ(10,"div",11)(11,"h4",12),e._uU(12),e.qZA(),e.TgZ(13,"section",13)(14,"div",14)(15,"cp-form-label",15),e._uU(16),e.qZA(),e.TgZ(17,"div",16)(18,"label"),e._UZ(19,"input",17),e.TgZ(20,"span"),e._uU(21),e.qZA(),e.TgZ(22,"span",18),e._uU(23),e.qZA()()()()(),e.TgZ(24,"h4",12),e._uU(25),e.qZA(),e.TgZ(26,"section",19)(27,"app-whm-transfer-cp-acct-form-grp",20)(28,"div",21),e._uU(29),e.qZA(),e.TgZ(30,"div",22)(31,"div",23),e.YNc(32,z,4,2,"ng-container",24),e.qZA()()()(),e.YNc(33,ee,15,9,"section",25),e.YNc(34,te,8,4,"section",26),e.YNc(35,se,13,16,"section",27),e.YNc(36,oe,7,5,"section",28),e.YNc(37,ne,9,6,"section",29),e.TgZ(38,"section",30)(39,"h4",12),e._uU(40),e.qZA(),e.TgZ(41,"div",14)(42,"cp-form-label",31),e._uU(43),e.qZA(),e.TgZ(44,"div",16)(45,"label"),e._UZ(46,"input",32),e.TgZ(47,"span"),e._uU(48),e.qZA()()()()(),e.YNc(49,le,16,12,"section",25),e.qZA(),e.TgZ(50,"div",33)(51,"cp-action-button",34),e.NdJ("click",function(){return e.CHM(t),e.oxw().submitForm()}),e._uU(52),e.qZA()()()()}if(2&s){const t=e.oxw();e.Q6J("formGroup",t.transferAcctForm),e.xp6(4),e.hij(" ",t.locale.maketext("Transfer or Restore a [asis,cPanel] Account")," "),e.xp6(3),e.hij(" ",t.toggleHelpLabel," "),e.xp6(5),e.Oqu(t.locale.maketext("Security")),e.xp6(3),e.Q6J("showInfoBlock",t.showAllHelp),e.xp6(1),e.hij(" ",t.locale.maketext("The Restricted Restore feature performs extra security checks on the backup file. If part of the backup file has a security issue, the system will not restore that part of the backup.")," "),e.xp6(5),e.Oqu(t.locale.maketext("Enable Restricted Restore.")),e.xp6(1),e.Q6J("ngStyle",e.VKq(29,ce,t.warningLabelMargin)),e.xp6(1),e.Oqu(t.locale.maketext("Experimental")),e.xp6(2),e.hij(" ",t.locale.maketext("Transfer Options")," "),e.xp6(2),e.Q6J("showAllHelp",t.showAllHelp)("control",t.transferOption)("label",t.locale.maketext("Transfer Options")),e.xp6(2),e.hij(" ",t.locale.maketext("Select the transfer or restoration method.")," "),e.xp6(3),e.Q6J("ngForOf",t.transferOptions),e.xp6(1),e.Q6J("ngIf",t.showTransferOptionSection("transferFromLocalFile",!0)),e.xp6(1),e.Q6J("ngIf",t.showTransferOptionSection("transferFromUploadFile",!0)),e.xp6(1),e.Q6J("ngIf",t.showTransferOptionSection("transferFromRemoteAccount",!0)),e.xp6(1),e.Q6J("ngIf",t.showTransferOptionSection("transferFromRemoteAccount",!1)),e.xp6(1),e.Q6J("ngIf",t.showTransferOptionSection("transferFromRemoteAccount",!1)),e.xp6(3),e.hij(" ",t.locale.maketext("[asis,IP] Address")," "),e.xp6(2),e.Q6J("showInfoBlock",t.showAllHelp)("labelText",t.locale.maketext("Dedicated [asis,IP] Address")),e.xp6(1),e.hij(" ",t.locale.maketext("Assign a dedicated [asis,IP] address to the new [asis,cPanel] account.")," "),e.xp6(5),e.Oqu(t.locale.maketext("Dedicated [asis,IP] Address")),e.xp6(1),e.Q6J("ngIf",t.isLinkedNodesAvailable),e.xp6(2),e.Q6J("buttonClass",t.buttonClass)("buttonState",t.buttonState),e.xp6(1),e.hij(" ",t.submitBtnText," ")}}let de=(()=>{class s{constructor(t,o,r,n,p,f){this._alertService=t,this._formBuilder=o,this.locale=r,this._location=n,this._locationStrategy=p,this._transferService=f,this.showAllHelp=!0,this.doesLicenseCheckDisableForm=R,this.licenseCheckFormDisableLevel=S,this.loading=!0,this._linkedMailNodes=[],this._securityToken=w,this._submitBtnConfig={buttonClass:"btn-primary",buttonState:l.FP.enabled}}get buttonClass(){return this._submitBtnConfig.buttonClass}get dedicatedIP(){return this.transferAcctForm.get("dedicatedIP")}get hostname(){return this.transferAcctForm.get("hostname")}get isFormValid(){return this.transferAcctForm.valid}get isLinkedNodesAvailable(){return this.linkedMailNodes.length>0}get isTransferOptionHidden(){return this.doesLicenseCheckDisableForm&&"partial"===this.licenseCheckFormDisableLevel}get mailNode(){let t;return t=this.mailNodeOption.value===g.none?".local":this.mailNodeOption.value===g.attemptAccount?".existing":"",t||(t=this.mailNodeOption.value.alias),t}get mailNodeOption(){return this.transferAcctForm.get("mailNodeOption")}get migrateARecord(){return this.transferAcctForm.get("migrateARecord")}get migrateARecordOptions(){return[{id:"ALL",type:m.all,label:this.locale.maketext("Replace All Matching [asis,A] Records."),description:this.locale.maketext("Replace all instances of the original server\u2019s IP address with the new IP address, such as in custom A records (default).")},{id:"CPANEL_ONLY",type:m.cpanelOnly,label:this.locale.maketext("[asis,cPanel]-provided [asis,A] Records."),description:this.locale.maketext("Only replace basic [asis,cPanel]-provided [asis,A] records in zone files.")}]}get overwriteExisting(){return this.transferAcctForm.get("overwriteExisting")}get password(){return this.transferAcctForm.get("password")}get restrictedRestore(){return this.transferAcctForm.get("restrictedRestore")}get selectedUserFile(){return this.transferAcctForm.get("selectedUserFile")}get submitBtnText(){return this.locale.maketext(this.transferOption.value===c.fromRemote?"Transfer":"Restore")}get toggleHelpLabel(){return this.locale.maketext(this.showAllHelp?"Hide Help Text":"Show Help Text")}get transferOption(){return this.transferAcctForm.get("transferOption")}get transferOptions(){return[{id:"FROM_LOCAL_FILE",optionHidden:!1,type:c.fromLocalFile,label:this.locale.maketext("Restore from a local [asis,cpmove] file."),description:this.locale.maketext("Select this option if the [asis,cpmove] file already exists on the server in one of the predefined locations.")},{id:"FROM_UPLOAD",optionHidden:!1,type:c.fromUpload,label:this.locale.maketext("Upload a file to restore."),description:this.locale.maketext("Select this option if you want to upload the [asis,cpmove] file to the server.")},{id:"FROM_REMOTE",optionHidden:this.isTransferOptionHidden,type:c.fromRemote,label:this.locale.maketext("Transfer from Remote [asis,cPanel] Account."),description:this.locale.maketext("Select this option if you want to transfer a [asis,cPanel] account from a remote server.")}]}get username(){return this.transferAcctForm.get("username")}get warningLabelMargin(){return"5px"}get archiveFiles(){return this._archiveFiles}set archiveFiles(t){this._archiveFiles=t}get buttonState(){return this._submitBtnConfig.buttonState}set buttonState(t){this._submitBtnConfig.buttonState=t}get hasIPsAvailable(){return this._hasIPsAvailable}set hasIPsAvailable(t){this._hasIPsAvailable=t}get linkedMailNodes(){return this._linkedMailNodes}set linkedMailNodes(t){this._linkedMailNodes=t}get localFormData(){return this._localFormData}set localFormData(t){this._localFormData=t}get redirectURL(){return this._redirectURL}set redirectURL(t){this._redirectURL=this._location.prepareExternalUrl(`${this._securityToken}/scripts5/${t}`)}get remoteFormData(){return this._remoteFormData}set remoteFormData(t){this._remoteFormData=t}get uploadFormData(){return this._uploadFormData}set uploadFormData(t){this._uploadFormData=t}clearSearchValue(){this.selectedUserFile.patchValue("")}patchMigrateAOption(t){t===m.all?this.transferAcctForm.patchValue({migrateARecord:m.all}):t===m.cpanelOnly&&this.transferAcctForm.patchValue({migrateARecord:m.cpanelOnly})}patchTransferOption(t){this._resetFormControls(),t===c.fromLocalFile?this.transferOption.patchValue(c.fromLocalFile):t===c.fromUpload?this.transferOption.patchValue(c.fromUpload):t===c.fromRemote&&this.transferOption.patchValue(c.fromRemote),this._setFormValidators(),this._doLicenseCheck()}showTransferOptionSection(t,o){return o?this.transferOption.value===t:this.transferOption.value!==t}submitForm(){this.isFormValid?(this.transferAcctForm.disable(),this.buttonState=l.FP.loading,this.transferOption.value===c.fromRemote?(this.remoteFormData=this._setRemoteDataInterface(),this._createRemoteTransferSession(this.remoteFormData)):this.transferOption.value===c.fromLocalFile?(this.localFormData=this._setLocalDataInterface(),this.localFormData.cpMovePath?this._createLocalRestoreSession(this.localFormData):(this.selectedUserFile.patchValue(""),this.selectedUserFile.updateValueAndValidity(),this._checkForm())):(this.uploadFormData=this._setUploadFormDataInterface(),this._createUploadRestoreSession(this.uploadFormData))):this._markFormDirty()}toggleHelp(){this.showAllHelp=!this.showAllHelp}ngOnInit(){_.uZ.locale=this.locale,this.hasIPsAvailable=H,this.clearSearchIconLabel=this.locale.maketext("Clear Input"),this.performSearchIconLabel=this.locale.maketext("Search Input"),this._initializeAsyncData(),this.transferAcctForm=this._formBuilder.group({restrictedRestore:[!0],transferOption:[c.fromLocalFile],selectedUserFile:[""],hostname:[""],username:[""],password:[""],migrateARecord:[m.all],overwriteExisting:[!1],dedicatedIP:[{value:!1,disabled:!this.hasIPsAvailable}],mailNodeOption:[g.attemptAccount]}),this._setFormValidators(),this._doLicenseCheck()}ngOnDestroy(){this._archiveFilesSubscription.unsubscribe(),this._enqueuedSubscription.unsubscribe(),this._localRestoreSubscription.unsubscribe(),this._mailNodesSubscription.unsubscribe(),this._remoteTransferSession.unsubscribe(),this._uploadRestoreSubscription.unsubscribe()}_buildURL(t){return this._location.prepareExternalUrl(`${this._securityToken}/scripts5/transfer_session?transfer_session_id=${t}&action=start`)}_checkForm(){this.buttonState=l.FP.enabled,this.transferAcctForm.enable()}_createLocalRestoreSession(t){const o=this._transferService.createLocalRestoreSession(t);let r;this._localRestoreSubscription=o.subscribe({error:n=>{this._alertService.error(n.message),this._checkForm()},next:n=>{r=this._buildURL(n)},complete:()=>{window.location.href=r}})}_createRemoteTransferSession(t){const o=this._transferService.createRemoteTransferSession(t);let r;this._remoteTransferSession=o.subscribe({error:n=>{this._alertService.error(n.message),this._checkForm()},next:n=>{r=n},complete:()=>{this._enqueueTransfer(t,r)}})}_createUploadRestoreSession(t){const o=this._transferService.createUploadRestoreSession(t);let r,n;this._uploadRestoreSubscription=o.subscribe({next:p=>{const A=new RegExp('(?:.*)<script .*>window.location.href=\\"(.*)\\";<\/script>(?:.*)').exec(p);A?n=`${w}/scripts5/${A[1]}`:r=this._parseResponseErrors(p)},complete:()=>{r?this._alertService.error(r):window.location.href=this._location.prepareExternalUrl(n)}})}_doLicenseCheck(){this.doesLicenseCheckDisableForm&&("full"===this.licenseCheckFormDisableLevel?(this.transferAcctForm.disable(),this.buttonState=l.FP.disabled):"partial"===this.licenseCheckFormDisableLevel&&(this.overwriteExisting.patchValue(!0),this.overwriteExisting.disable()))}_enqueueTransfer(t,o){const r=this._transferService.enqueueTransfer(t,o);let n;this._enqueuedSubscription=r.subscribe({error:p=>{this._alertService.error(p.message)},next:p=>{n=this._buildURL(o)},complete:()=>{window.location.href=n}})}_getcPArchiveFiles(){const t=this._transferService.getArchiveFiles();let o;this._archiveFilesSubscription=t.subscribe({error:r=>{this._alertService.error(r)},next:r=>{o=r},complete:()=>{this.archiveFiles=this._transformArchiveFiles(o),this.loading=!1}})}_getLinkedMailNodes(){const t=this._transferService.getLinkedMailNodes();let o;this._mailNodesSubscription=t.subscribe({error:r=>{this._alertService.error(r)},next:r=>{o=r},complete:()=>{this.linkedMailNodes=this._transformMailNodes(o)}})}_initializeAsyncData(){this._getLinkedMailNodes(),this._getcPArchiveFiles()}_markFormDirty(){Object.keys(this.transferAcctForm.controls).forEach(t=>{this.transferAcctForm.controls[t].markAsTouched(),this.transferAcctForm.controls[t].updateValueAndValidity()})}_parseResponseErrors(t){const Oe=[/(.*)(\[invalid_format_error])([^]+)/,/(.*)(\[free_space_error])([^]+)/,/(.*)(\[unspecified_error])([^]+)/,/(.*)(\[user_exists_error])([^]+)/,/(.*)(\[missing_archives_error])([^]+)/];let y,N;for(const I of Oe)if(y=I.exec(t),null!==y)return N=t.replace(I,"$1"),N}_resetFormControls(){this.transferAcctForm.reset({restrictedRestore:!0,selectedUserFile:"",hostname:"",username:"",password:"",migrateARecord:m.all,overwriteExisting:!1,dedicatedIP:!1,mailNodeOption:g.attemptAccount},{onlySelf:!0})}_setFormValidators(){const t=this.transferOption.value;Object.keys(this.transferAcctForm.controls).forEach(o=>{this.transferAcctForm.controls[o].setValidators(null)}),t===c.fromLocalFile||t===c.fromUpload?this.transferAcctForm.controls.selectedUserFile.setValidators([_.dt.required(this.locale.maketext("You [output,strong,must] select a file to transfer.")),D(this.locale.maketext("Your file [output,strong,must] match the naming schema."))]):t===c.fromRemote&&(this.transferAcctForm.controls.hostname.setValidators([_.dt.required(this.locale.maketext("You [output,strong,must] enter a hostname or [asis,IP] address.")),_.Xz.validDomainLength(),_.Xz.fqdnOrIP()]),this.transferAcctForm.controls.username.setValidators(_.dt.required(this.locale.maketext("You [output,strong,must] enter a username."))),this.transferAcctForm.controls.password.setValidators(_.dt.required(this.locale.maketext("You [output,strong,must] enter a password.")))),Object.keys(this.transferAcctForm.controls).forEach(o=>{this.transferAcctForm.controls[o].updateValueAndValidity()})}_setLocalDataInterface(){let t;return this.archiveFiles.forEach(n=>{n.file===this.selectedUserFile.value&&(t=n)}),{cpMovePath:t?t.value:"",overwrite:this.overwriteExisting.value,dedicatedIP:this.dedicatedIP.value,restrictedRestore:this.restrictedRestore.value,updateARecords:this.migrateARecord.value,transferType:this.transferOption.value,username:t?t.user:"",mailNode:this.mailNode}}_setRemoteDataInterface(){return{restrictedRestore:this.restrictedRestore.value,hostname:this.hostname.value,username:this.username.value,password:this.password.value,dedicatedIP:this.dedicatedIP.value,mailNode:this.mailNode,transferType:this.transferOption.value}}_setUploadFormDataInterface(){const t=new FormData,o=this.overwriteExisting.value?"1":"0",r=this.restrictedRestore.value?"0":"1",p=this.migrateARecord.value,f=this.dedicatedIP.value?"1":"0",A=this.uploadedFile?this.uploadedFile.nativeElement.files[0]:new File([""],"testfile");return t.set("restorePackage",A,A.name),t.set("filepath","1"),t.set("force_overwrite",o),t.set("unrestricted_restore",r),t.set("replaceip",p),t.set("mail_location",this.mailNode),t.set("ip",f),t}_transformArchiveFiles(t){let o;const r=[];return t.forEach(n=>{o={file:n.file,path:n.path,user:n.user,value:`${n.path}/${n.file}`},r.push(o)}),r}_transformMailNodes(t){let o;const r=[];return t.forEach(n=>{o={alias:n.alias,hostname:n.hostname},r.push(o)}),r}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(l.c9),e.Y36(u.qu),e.Y36(k.g),e.Y36(a.Ye),e.Y36(a.S$),e.Y36(P))},s.\u0275cmp=e.Xpm({type:s,selectors:[["app-whm-transfer-cpanel-account"]],viewQuery:function(t,o){if(1&t&&e.Gf(j,5),2&t){let r;e.iGM(r=e.CRH())&&(o.uploadedFile=r.first)}},inputs:{showAllHelp:"showAllHelp"},features:[e._Bn([P])],decls:2,vars:2,consts:[["id","loadingSpinner",4,"ngIf"],["id","transfercPanelAcctForm","name","transfercPanelAcctForm",3,"formGroup",4,"ngIf"],["id","loadingSpinner"],["id","transfercPanelAcctForm","name","transfercPanelAcctForm",3,"formGroup"],[1,"panel","panel-default"],[1,"panel-heading"],[1,"widget-title","pull-left","flip"],[1,"pull-right","flip"],["type","button","id","transferAcctShowHideHelp",1,"btn","btn-default","btn-xs",3,"click"],[1,"far","fa-question-circle","form-info-sign"],[1,"clearfix"],[1,"panel-body"],[1,"widget-title"],[1,"security-section"],[1,"form-group"],["id","transferRestrictedRestoreLabel","for","transferRestrictedRestore","labelText","Restricted Restore",3,"showInfoBlock"],[1,"checkbox"],["id","transferRestrictedRestoreCheck","name","transferRestrictedRestore","type","checkbox","formControlName","restrictedRestore"],[1,"label","label-warning",3,"ngStyle"],[1,"transfer-option-section"],["for","transferOption",3,"showAllHelp","control","label"],["form-group-label",""],["form-group-control",""],[1,"radio"],[4,"ngFor","ngForOf"],["class","local-file-section",4,"ngIf"],["class","file-upload-section",4,"ngIf"],["class","remote-account-section",4,"ngIf"],["class","overwrite-existing-section",4,"ngIf"],["class","migrate-a-records-section",4,"ngIf"],[1,"ip-section"],["id","transferAcctDedIPCheckLabel","for","transferAcctDedIP",3,"showInfoBlock","labelText"],["form-group-control","","id","transferAcctDedIPCheck","name","transferAcctDedIP","type","checkbox","formControlName","dedicatedIP"],[1,"panel-footer"],["id","transferAcctButton","type","submit","name","submitButton",3,"buttonClass","buttonState","click"],[3,"for",4,"ngIf"],[1,"help-block"],[3,"for"],["type","radio","name","transferOption","formControlName","transferOption",3,"id","value","click"],[1,"local-file-section"],["for","selectedUserFile",3,"showAllHelp","control","label"],["role","search",1,"input-group"],["id","cparchive-search-input","list","cparchiveFileList","type","search","formControlName","selectedUserFile","name","selectedUserFile","spellcheck","false","aria-label","locale.maketext('Select a File')",1,"form-control",3,"placeholder","keyup.esc"],[1,"input-group-btn"],["role","button","id","cparchive-search-input-button",1,"btn","btn-default",3,"click"],["aria-hidden","true","id","cparchive-search-input-icon",3,"ngClass"],["class","sr-only",4,"ngIf"],["id","cparchiveFileList"],[1,"sr-only"],[3,"value"],[1,"file-upload-section"],["type","file","accept","application/*","name","selectedUserFile","id","transferOption_file_upload","formControlName","selectedUserFile","attr.aria-required","true"],["uploadedFile",""],[1,"remote-account-section"],["for","transferAcctDomain",3,"label","control","showAllHelp"],["form-group-control","","autocomplete","off","id","transferAcctDomainInput","name","transferAcctDomain","type","text","formControlName","hostname",1,"form-control",3,"placeholder"],["for","transferAcctUsername",3,"label","control","showAllHelp"],["form-group-control","","autocomplete","off","type","text","id","transferAcctUsernameInput","name","transferAcctUsername","formControlName","username",1,"form-control"],["for","transferAcctPwd",3,"label","control","showAllHelp"],["form-group-control","","autocomplete","off","type","password","id","transferAcctPwdInput","name","transferAcctPwd","formControlName","password",1,"form-control"],[1,"overwrite-existing-section"],["for","overwriteExisting",3,"showAllHelp","control","label"],["form-group-control","",1,"checkbox"],["type","checkbox","id","overwriteExisting","formControlName","overwriteExisting"],[1,"migrate-a-records-section"],["for","migrateARecord",3,"showAllHelp","control","label"],["type","radio","name","migrateARecord","formControlName","migrateARecord",3,"id","value","click"],["for","mailNodeOption",3,"showAllHelp","control","label"],[3,"ngStyle"],["form-group-control","",1,"input-group"],[1,"input-group-addon"],["attr.aria-required","true","name","mailNodeOption","formControlName","mailNodeOption","aria-label","locale.maketext('Linked Node Options')",1,"form-control"],["value","ATTEMPT_ACCOUNT"],["value","NONE"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"]],template:function(t,o){1&t&&(e.YNc(0,$,1,0,"cp-loading-spinner",0),e.YNc(1,pe,53,31,"form",1)),2&t&&(e.Q6J("ngIf",o.loading),e.xp6(1),e.Q6J("ngIf",!o.loading))},directives:[a.O5,l.go,u._Y,u.JL,u.sg,l._P,u.Wl,u.JJ,u.u,a.PC,V,a.sg,u._,u.Fj,a.mk,u.YN,u.Kr,u.EJ,l.xV],encapsulation:2}),s})();var h=(()=>{return(s=h||(h={})).view="view",s.resume="resume",s.abort="abort",h;var s})(),x=(()=>{return(s=x||(x={})).paused="PAUSED",s.pausing="PAUSING",s.running="RUNNING",x;var s})();function ue(s,i){if(1&s&&(e.TgZ(0,"th",9),e._uU(1),e.qZA()),2&s){const t=i.$implicit;e.MGl("id","table_header_",t,""),e.xp6(1),e.hij(" ",t," ")}}const C=function(s){return{display:s}};function me(s,i){if(1&s&&(e.TgZ(0,"a",10),e._uU(1),e.qZA()),2&s){const t=e.oxw().$implicit,o=e.oxw(2);e.s9C("href",t.resume_link,e.LSH),e.MGl("id","resume_",t.session_id,"_link"),e.Q6J("ngStyle",e.VKq(4,C,o.linkDisplayStyle)),e.xp6(1),e.hij(" ",o.locale.maketext("Resume")," ")}}function he(s,i){if(1&s&&(e.TgZ(0,"a",10),e._uU(1),e.qZA()),2&s){const t=e.oxw().$implicit,o=e.oxw(2);e.s9C("href",t.abort_link,e.LSH),e.MGl("id","abort_",t.session_id,"_link"),e.Q6J("ngStyle",e.VKq(4,C,o.linkDisplayStyle)),e.xp6(1),e.hij(" ",o.locale.maketext("Abort")," ")}}function fe(s,i){if(1&s&&(e.ynx(0),e.TgZ(1,"tr",9)(2,"td",9),e._uU(3),e.qZA(),e.TgZ(4,"td",9),e._uU(5),e.qZA(),e.TgZ(6,"td",9),e._uU(7),e.qZA(),e.TgZ(8,"td",9),e._uU(9),e.qZA(),e.TgZ(10,"td",9)(11,"a",10),e._uU(12),e.qZA(),e.YNc(13,me,2,6,"a",11),e.YNc(14,he,2,6,"a",11),e.qZA()(),e.BQk()),2&s){const t=i.$implicit,o=e.oxw(2);e.xp6(1),e.MGl("id","table_row_",t.session_id,""),e.xp6(1),e.MGl("id","session_id_",t.session_id,""),e.xp6(1),e.hij(" ",t.session_id," "),e.xp6(1),e.MGl("id","source_host_",t.session_id,""),e.xp6(1),e.hij(" ",t.source_host," "),e.xp6(1),e.MGl("id","start_time_",t.session_id,""),e.xp6(1),e.hij(" ",t.start_time," "),e.xp6(1),e.MGl("id","session_state_",t.session_id,""),e.xp6(1),e.hij(" ",t.state," "),e.xp6(1),e.MGl("id","session_actions_",t.session_id,""),e.xp6(1),e.s9C("href",t.view_link,e.LSH),e.MGl("id","view_",t.session_id,"_link"),e.Q6J("ngStyle",e.VKq(16,C,o.linkDisplayStyle)),e.xp6(1),e.hij(" ",o.locale.maketext("View")," "),e.xp6(1),e.Q6J("ngIf",o.showResumeLink(t.state)),e.xp6(1),e.Q6J("ngIf",o.showAbortLink(t.state))}}function _e(s,i){if(1&s&&(e.TgZ(0,"div",1)(1,"div",2)(2,"div",3),e._uU(3),e.qZA(),e._UZ(4,"div",4),e.qZA(),e.TgZ(5,"div",5)(6,"table",6)(7,"thead")(8,"tr"),e.YNc(9,ue,2,2,"th",7),e.qZA()(),e.TgZ(10,"tbody"),e.YNc(11,fe,15,18,"ng-container",8),e.qZA()()()()),2&s){const t=e.oxw();e.xp6(3),e.hij(" ",t.locale.maketext("Sessions in Progress")," "),e.xp6(6),e.Q6J("ngForOf",t.tableHeaders),e.xp6(2),e.Q6J("ngForOf",t.pendingSessions)}}let ge=(()=>{class s{constructor(t,o,r){this.locale=t,this._location=o,this._locationStrategy=r,this.linkDisplayStyle="block",this.rawPendingSessions=E,this._securityToken=w,this._transferStates=J}get isTableVisible(){return!!(this.pendingSessions&&this.pendingSessions.length>0)}get pendingSessions(){return this._pendingSessions}set pendingSessions(t){this._pendingSessions=t}get transferStates(){return this._transferStates}set transferStates(t){this._transferStates=t}showAbortLink(t){return t===x.paused||t===x.pausing||t===x.running}showResumeLink(t){return t===x.paused}ngOnInit(){this.tableHeaders=[this.locale.maketext("Session"),this.locale.maketext("Source Host"),this.locale.maketext("Start Time"),this.locale.maketext("State"),this.locale.maketext("Actions")],this.tableTitle=this.locale.maketext("Sessions in Progress"),this.pendingSessions=this._transformData(this.rawPendingSessions)}_buildURL(t,o){let r=`${this._securityToken}/scripts5/transfer_session?transfer_session_id=${o.sessionid}`;switch(t){case h.view:return this._location.prepareExternalUrl(r);case h.resume:return r=`${r}&action=resume`,this._location.prepareExternalUrl(r);case h.abort:return r=`${r}&action=abort`,this._location.prepareExternalUrl(r)}}_transformData(t){const o=[];let r,n,p;for(const f in t)t[f]&&(n=t[f],r=n.state.toString(),p={session_id:n.sessionid,source_host:n.source_host,start_time:n.starttime,state:this.transferStates[r]?this.transferStates[r]:this.locale.maketext("UNKNOWN: [_1]",n.state),view_link:this._buildURL(h.view,n),resume_link:this._buildURL(h.resume,n),abort_link:this._buildURL(h.abort,n)},o.push(p));return o}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(k.g),e.Y36(a.Ye),e.Y36(a.S$))},s.\u0275cmp=e.Xpm({type:s,selectors:[["app-pending-transfers-table"]],decls:1,vars:1,consts:[["id","transfer_cp_acct_pending_sessions","class","panel panel-default",4,"ngIf"],["id","transfer_cp_acct_pending_sessions",1,"panel","panel-default"],[1,"panel-heading"],[1,"widget-title","pull-left","flip"],[1,"clearfix"],[1,"table-responsive"],["id","pending_sessions_table",1,"table","table-striped"],[3,"id",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[3,"id"],["target","_blank",3,"href","id","ngStyle"],["target","_blank",3,"href","id","ngStyle",4,"ngIf"]],template:function(t,o){1&t&&e.YNc(0,_e,12,3,"div",0),2&t&&e.Q6J("ngIf",o.isTableVisible)},directives:[a.O5,a.sg,a.PC],encapsulation:2}),s})();function xe(s,i){1&s&&e._UZ(0,"cp-alert-list",5)}function Ae(s,i){1&s&&e.GkF(0)}function ve(s,i){if(1&s&&(e.TgZ(0,"div",10)(1,"div",13),e.YNc(2,Ae,1,0,"ng-container",14),e.qZA()()),2&s){const t=e.oxw(2),o=e.MAs(3);e.Q6J("ngClass",t.sidePanelClasses),e.xp6(2),e.Q6J("ngTemplateOutlet",o)("ngTemplateOutletContext",t.viewContextDefault)}}function we(s,i){1&s&&e.GkF(0)}function be(s,i){1&s&&e.GkF(0)}function Te(s,i){1&s&&e.GkF(0)}function ke(s,i){if(1&s&&(e.TgZ(0,"div",15)(1,"div",13),e.YNc(2,Te,1,0,"ng-container",14),e.qZA()()),2&s){const t=e.oxw(2),o=e.MAs(3);e.xp6(2),e.Q6J("ngTemplateOutlet",o)("ngTemplateOutletContext",t.viewContextMobile)}}function Ce(s,i){if(1&s&&(e.TgZ(0,"div",6)(1,"div")(2,"div",7)(3,"div",8),e.YNc(4,ve,3,3,"div",9),e.TgZ(5,"div",10),e.YNc(6,we,1,0,"ng-container",11),e.qZA(),e.TgZ(7,"div",10),e.YNc(8,be,1,0,"ng-container",11),e.qZA(),e.YNc(9,ke,3,2,"div",12),e.qZA()()()()),2&s){const t=e.oxw(),o=e.MAs(7),r=e.MAs(5);e.xp6(4),e.Q6J("ngIf",t.showResourcePanel),e.xp6(1),e.Q6J("ngClass",t.mainPanelClasses),e.xp6(1),e.Q6J("ngTemplateOutlet",o),e.xp6(1),e.Q6J("ngClass",t.mainPanelClasses),e.xp6(1),e.Q6J("ngTemplateOutlet",r),e.xp6(1),e.Q6J("ngIf",t.showResourcePanel)}}function Fe(s,i){if(1&s&&(e.TgZ(0,"section",16)(1,"h3",17),e._uU(2),e.qZA(),e.TgZ(3,"ul")(4,"li")(5,"a",18),e._UZ(6,"i",19),e._uU(7),e.qZA()(),e.TgZ(8,"li")(9,"a",20),e._UZ(10,"i",19),e._uU(11),e.qZA()()()(),e.TgZ(12,"section",16)(13,"h3",17),e._uU(14),e.qZA(),e.TgZ(15,"ul")(16,"li")(17,"a",21),e._UZ(18,"i",19),e._uU(19),e.qZA()(),e.TgZ(20,"li")(21,"a",21),e._UZ(22,"i",19),e._uU(23),e.qZA()()()()),2&s){const t=i.viewContext,o=e.oxw();e.xp6(2),e.Oqu(o.locale.maketext("Need Help?")),e.xp6(3),e.MGl("id","xferOrRestoreAboutTheInterface_",t,""),e.s9C("title",o.locale.maketext("Need help? Click here to read more about this interface.")),e.xp6(2),e.hij(" ",o.locale.maketext("About This Interface")," "),e.xp6(2),e.MGl("id","xferOrRestoreAboutRestrictedRestore_",t,""),e.s9C("title",o.locale.maketext("Need help? Click here to read more about the Restricted Restore feature.")),e.xp6(2),e.hij(" ",o.locale.maketext("About Restricted Restore")," "),e.xp6(3),e.hij(" ",o.locale.maketext("Related Interfaces")," "),e.xp6(3),e.s9C("href",o.restoreModulesLink,e.LSH),e.MGl("id","xferOrRestoreRestoreModules_",t,""),e.s9C("title",o.locale.maketext("Navigate to the Restore Modules Summary interface.")),e.xp6(2),e.hij(" ",o.locale.maketext("Restore Modules Summary")," "),e.xp6(2),e.s9C("href",o.transferToolLink,e.LSH),e.MGl("id","xferOrRestoreTransferTool_",t,""),e.s9C("title",o.locale.maketext("Navigate to the Transfer Tool interface.")),e.xp6(2),e.hij(" ",o.locale.maketext("Transfer Tool")," ")}}function Ze(s,i){1&s&&e._UZ(0,"app-whm-transfer-cpanel-account")}function Ue(s,i){1&s&&e._UZ(0,"app-pending-transfers-table")}let Re=(()=>{class s{constructor(t,o){this.locale=t,this._location=o,this.showResourcePanel=!0,this.viewContextDefault={viewContext:"default"},this.viewContextMobile={viewContext:"mobile"},this._securityToken=w}get isUIHidden(){return R&&"full"===S}ngOnInit(){this.transferToolLink=this._createTransferToolLink(),this.restoreModulesLink=this._createRestoreModulesLink(),this._updatePanelClasses()}_createRestoreModulesLink(){let t=`${this._securityToken}/scripts5/restore_modules_summary`;return t=this._location.prepareExternalUrl(t),t}_createTransferToolLink(){let t=`${this._securityToken}/scripts5/account_copy_input`;return t=this._location.prepareExternalUrl(t),t}_updatePanelClasses(){this.sidePanelClasses="col-md-4 hidden-xs hidden-sm",this.sidePanelClasses+=" ",this.sidePanelClasses+="pull-right",this.mainPanelClasses=this.showResourcePanel?"col-xs-12 col-sm-12 col-md-8 pull-left":"col-xs-12"}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(k.g),e.Y36(a.Ye))},s.\u0275cmp=e.Xpm({type:s,selectors:[["app-root"]],decls:8,vars:2,consts:[["position","top-right",4,"ngIf"],["id","content",4,"ngIf"],["resourceTemplate",""],["transfercPanelAcctForm",""],["pendingTransfersTable",""],["position","top-right"],["id","content"],[1,"row"],[1,"col-xs-12","col-lg-10"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[4,"ngTemplateOutlet"],["class","col-xs-12 hidden-lg hidden-md",4,"ngIf"],[1,"section"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"col-xs-12","hidden-lg","hidden-md"],[1,"widget"],[1,"widget-title"],["href","https://go.cpanel.net/whmdocsTransferorRestoreacPanelAccount","target","whm_documentation",3,"id","title"],["aria-hidden","true",1,"fas","fa-fw","fa-external-link-alt"],["href","https://go.cpanel.net/restrictedrestore","target","whm_documentation",3,"id","title"],["target","whm_documentation",3,"href","id","title"]],template:function(t,o){1&t&&(e.YNc(0,xe,1,0,"cp-alert-list",0),e.YNc(1,Ce,10,6,"div",1),e.YNc(2,Fe,24,16,"ng-template",null,2,e.W1O),e.YNc(4,Ze,1,0,"ng-template",null,3,e.W1O),e.YNc(6,Ue,1,0,"ng-template",null,4,e.W1O)),2&t&&(e.Q6J("ngIf",!o.isUIHidden),e.xp6(1),e.Q6J("ngIf",!o.isUIHidden))},directives:[a.O5,l.hF,a.mk,a.tP,de,ge],encapsulation:2}),s})(),Se=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s,bootstrap:[Re]}),s.\u0275inj=e.cJS({providers:[l.c9,a.Ye,{provide:a.mr,useValue:M},{provide:a.S$,useClass:a.b0}],imports:[[T.b2,a.ez,u.UX,l.kM,l.wL,l.df,U.au,l.nM,l.CQ,l.zr,Z.JF,l.zf,L.m]]}),s})();(0,e.G48)(),T.q6().bootstrapModule(Se).catch(s=>console.error(s))}},v=>{v.O(0,[736],()=>v(v.s=4474)),v.O()}]);