Viewing File: /usr/local/cpanel/base/frontend/jupiter/sitejet/main.3af9a323acb6c4b1.js
"use strict";(self.webpackChunksitejet=self.webpackChunksitejet||[]).push([[179],{9557:(I,nt,c)=>{var Z=c(4497),t=c(2560),it=c(6079),N=c(3278),g=c(5456),d=c(4666),bt=c(8987),x=c(2508),Mt=c(9906),wt=c(3371),a=c(3712),Pt=c(8716),H=c(3366),Ot=c(2184),ot=c(8528),st=c(1526),_=c(124),b=c(3160),w=c(4661),l=(()=>{return(i=l||(l={})).details="details",i.list="list",i.create="create",i.createAI="createAI",i.pleskPublish="publish",i.pleskBack="back",i.view="view",i.error="error",l;var i})(),L=c(4505),at=c(3491),Q=c(6942),j=c(5921);let J=(()=>{class i{constructor(e){this.locale=e,this.loading$=new L.X(!1),this.loadingText$=new L.X("")}startLoading(){this.loading$.next(!0)}stopLoading(){this.loading$.next(!1)}displayLoadingMessages(e){return e.messages||(e.messages=[this.locale.maketext("Loading \u2026"),this.locale.maketext("Processing your request \u2026"),this.locale.maketext("Fetching your data \u2026"),this.locale.maketext("Verifying data \u2026"),this.locale.maketext("Loading resources \u2026"),this.locale.maketext("Gathering resources \u2026"),this.locale.maketext("Retrieving assets \u2026"),this.locale.maketext("Loading content \u2026"),this.locale.maketext("Building content \u2026"),this.locale.maketext("Loading data \u2026")]),(0,at.F)(e.displayIntervalMs).pipe((0,Q.U)(()=>this.getRandomElement(e.messages)),(0,j.R)(e.complete$))}getRandomElement(e){return e[Math.floor(Math.random()*e.length)]}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(b.g))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var xt=c(6587),C=c(3910),T=c(1133);const rt=new t.OlP("sitejetApiToken"),F=new t.OlP("domainInfo"),lt=new t.OlP("homeDir"),q=new t.OlP("deprefix"),ct=new t.OlP("domainsApp"),dt=new t.OlP("showSitejetDomains"),pt=new t.OlP("canCreateDomains");var v=c(488),h=c(6996),u=c(2137);class vt{constructor(o){this.domain=o.domain,this.metadata={...o.metadata},this.shared_doc_root=(0,u.s)(o.shared_doc_root),this.redirection_enabled=(0,u.s)(o.redirection_enabled),this.is_restore_point_available=(0,u.s)(o.is_restore_point_available),this.is_temporary_domain=(0,u.s)(o.is_temporary_domain),void 0!==this.metadata.fullcms&&(this.metadata.fullcms=(0,u.s)(this.metadata.fullcms)),this.quota={available_space:o.quota.available_space,can_backup:(0,u.s)(o.quota.can_backup),is_docroot_empty:(0,u.s)(o.quota.is_docroot_empty),required_space:o.quota.required_space},this.status={has_sitejet_published:(0,u.s)(o.status.has_sitejet_published),has_sitejet_website:(0,u.s)(o.status.has_sitejet_website),is_sitejet:(0,u.s)(o.status.is_sitejet),ssl_status:(0,u.s)(o.status.ssl_status)}}}var f=(()=>{return(i=f||(f={})).PROMPT="prompt",i.AI="ai",i.NONE="",f;var i})(),St=c(1480);const S="Sitejet",k=(0,Q.U)(i=>{if(1===i.status)return i;throw i.errors.pop()});let Y=(()=>{class i{constructor(e,n,s){this.domainInfo=e,this.http=n,this.window=s}createAccount(){const e=new v.j({namespace:S,method:"create_account"});return this.http.post(e).pipe(k)}createWebsite(e,n=this.domainInfo.main_domain){const s=new v.j({namespace:S,method:"create_website",arguments:[new h.h("company",e),new h.h("domain",n)]});return this.http.post(s).pipe(k)}getSsoLink(e=this.domainInfo.main_domain,n=f.NONE){const s=[new h.h("domain",e),new h.h("referrer",`${this.window.location.origin}${this.window.location.pathname}#`)];void 0!==n&&s.push(new h.h("ui_mode",n));const r=new v.j({namespace:S,method:"get_sso_link",arguments:s});return this.http.post(r).pipe(k)}getAllSitejetInfo(e){const n=new v.j({namespace:S,method:"get_all_user_sitejet_info",...e?.tableMetadata});return e?.domain&&n.addArgument(this.getDomainArgument(e.domain)),this.http.get(n).pipe(k,(0,Q.U)(s=>({processedData:s.data.map(r=>new vt(r)),meta:s.meta})))}startPublish(e,n=!1){const s=new v.j({namespace:S,method:"start_publish",arguments:[new h.h("domain",e),new h.h("cleanup",(0,u.O)(n))]});return this.http.post(s).pipe(k)}pollPublish(e,n){const s=new v.j({namespace:S,method:"poll_publish",arguments:[new h.h("pid",e),new h.h("file_name",n)]});return this.http.post(s).pipe(k)}createRestorePoint(e){const n=new v.j({namespace:S,method:"create_restore_point",arguments:[new h.h("domain",e)]});return this.http.get(n).pipe(k)}restore(e){const n=new v.j({namespace:S,method:"restore_document_root",arguments:[new h.h("domain",e)]});return this.http.get(n).pipe(k)}getDomainArgument(e){return new h.h("domain",e)}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(F),t.LFG(St.Tr),t.LFG(Window))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),E=(()=>{class i{constructor(e,n,s,r){this.apiService=e,this.router=n,this.notificationService=s,this.window=r,this._aiOption=f.NONE}hasApiToken(e){return Boolean(e||this.window.PAGE.sitejetApiToken)}setApiToken(e){this.window.PAGE.sitejetApiToken=e,this.apiService.tempApiToken=e}createAccount(){return this.apiService.createAccount().pipe((0,C.q)(1))}fetchAllWebsiteData(e){return this.apiService.getAllSitejetInfo(e).pipe((0,C.q)(1))}createWebsiteAndGetSsoLink(e,n){return this.apiService.createWebsite(e,e).pipe((0,T.b)(()=>this.apiService.getSsoLink(e,n)))}handleError(e){return this.notificationService.add({type:a.k$.error,message:e.message,id:"sitejet__error"}),this.router.navigate([l.error]),(0,xt._)(e)}navigateToRoute(e,n){this.router.navigate([e],{queryParams:{site_id:n}})}processWebsiteData(e){1===e.processedData.length&&e.processedData[0].quota.is_docroot_empty?this.navigateToRoute(l.create,e.processedData[0].domain):this.router.navigate([l.list])}hasWebsiteRestrictions(e){return e.redirection_enabled||e.shared_doc_root}set aiOption(e){this._aiOption=e}get aiOption(){return this._aiOption}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(Y),t.LFG(_.F0),t.LFG(a.gq),t.LFG(Window))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),mt=(()=>{class i{constructor(e,n,s,r,m,M){this.router=e,this.notificationService=n,this.loadingService=s,this.route=r,this.window=m,this.initService=M,this.loadingService.startLoading()}ngOnInit(){const e=this.route.snapshot.queryParams.site_id;this.initService.hasApiToken()?this.initService.fetchAllWebsiteData({domain:e}).subscribe({next:n=>{const s=n.processedData[0];return s.status.has_sitejet_website?this.handleWebsiteExists(s.domain):this.handleWebsiteNotExists(s)},error:n=>{this.loadingService.stopLoading(),this.notificationService.add({type:a.k$.error,message:n.message,id:"create__error--getAllSitejetInfo"}),this.router.navigate([l.list])}}):this.handleAccountCreation(e)}handleAccountCreation(e){this.initService.createAccount().pipe((0,w.x)(()=>this.loadingService.stopLoading())).subscribe({next:n=>{this.initService.setApiToken(n.data.key),this.createWebsiteAndRedirect(e)},error:n=>this.initService.handleError(n)})}createWebsiteAndRedirect(e){this.initService.createWebsiteAndGetSsoLink(e,f.PROMPT).pipe((0,w.x)(()=>this.loadingService.stopLoading())).subscribe({next:n=>this.handleSsoResponse(n),error:n=>{this.notificationService.add({type:a.k$.error,message:n.message,id:"create__error--createWebsiteAndRedirect"})}})}handleSsoResponse(e){e&&e.data?this.window.location.href=e.data:this.initService.handleError({message:"Invalid SSO link response"})}handleWebsiteExists(e){this.loadingService.stopLoading(),this.router.navigate([l.details,l.view],{queryParams:{site_id:e}})}handleWebsiteNotExists(e){if(this.initService.hasWebsiteRestrictions(e))return this.loadingService.stopLoading(),void this.router.navigate([l.list]);this.createWebsiteAndRedirect(e.domain)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(_.F0),t.Y36(a.gq),t.Y36(J),t.Y36(_.gz),t.Y36(Window),t.Y36(E))},i.\u0275cmp=t.Xpm({type:i,selectors:[["sitejet-create"]],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();var P=c(7806),R=(()=>((R||(R={})).preview="sitejetWebsitePreview",R))();let B=(()=>{class i{constructor(e,n){this.router=e,this.domainInfo=n}goToDetailsView(e){this.router.navigate([l.details,l.view],{queryParams:{site_id:e}})}setData(e,n){sessionStorage.setItem(e,JSON.stringify(n))}getData(e){const n=sessionStorage.getItem(e);return n?JSON.parse(n):null}getWebsiteData(e,n){return n.find(s=>s.cpanelDomainGUID===e)}getWebsiteDataByWebsiteId(e,n){return n.find(s=>s.websiteId===Number(e))}isPrimaryDomain(e){return e===this.domainInfo.main_domain}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(_.F0),t.LFG(F))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})(),$=(()=>{class i{constructor(){this.messageSubject=new P.xQ,this.messagesSubject=new P.xQ,this.publishSubject=new L.X(!1),this.errorSubject=new P.xQ,this.message$=this.messageSubject.asObservable(),this.messages$=this.messagesSubject.asObservable(),this.publishComplete$=this.publishSubject.asObservable(),this.publishError$=this.errorSubject.asObservable()}sendMessage(e){this.messageSubject.next(e)}sendMessages(e){this.messagesSubject.next(e)}publishComplete(e=!0){this.publishSubject.next(e)}publishError(e){this.errorSubject.next(e)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var O=(()=>{return(i=O||(O={})).desktop="xl",i.tablet="lg",i.mobile="md",O;var i})(),kt=c(7020);const Tt=["canvas"];function yt(i,o){1&i&&t._UZ(0,"canvas",null,1)}let jt=(()=>{class i{constructor(e){this.cd=e,this.numberOfParticles=100,this.confettiCreateFunction=kt.U,this.showCanvas=!1}createConfetti(){this.showCanvas=!0,this.cd.detectChanges();const e=this.canvas.nativeElement;e.width=window.innerWidth,e.height=window.innerHeight,this.confettiCreateFunction(e,{resize:!0})({particleCount:this.numberOfParticles,spread:75,disableForReducedMotion:!0,ticks:100,origin:{y:.7}}).then(()=>this.showCanvas=!1)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.sBO))},i.\u0275cmp=t.Xpm({type:i,selectors:[["sitejet-confetti"]],viewQuery:function(e,n){if(1&e&&t.Gf(Tt,5),2&e){let s;t.iGM(s=t.CRH())&&(n.canvas=s.first)}},inputs:{numberOfParticles:"numberOfParticles"},decls:1,vars:1,consts:[[4,"ngIf"],["canvas",""]],template:function(e,n){1&e&&t.YNc(0,yt,2,0,"canvas",0),2&e&&t.Q6J("ngIf",n.showCanvas)},directives:[d.O5],styles:["canvas[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;bottom:0;z-index:1}html[dir=ltr][_ngcontent-%COMP%] canvas[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] canvas[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] canvas[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] canvas[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] canvas[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] canvas[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] canvas[_ngcontent-%COMP%]{right:0}html[dir=rtl][_ngcontent-%COMP%] canvas[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] canvas[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] canvas[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] canvas[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] canvas[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] canvas[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] canvas[_ngcontent-%COMP%]{left:0}"]}),i})();const Dt=["modalTemplate"];function At(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"div",4),t.Hsn(1,1),t.TgZ(2,"button",5),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).closeModal()}),t.TgZ(3,"span",6),t._uU(4,"\xd7"),t.qZA()()()}if(2&i){const e=t.oxw(2);t.xp6(2),t.uIk("data-testid","modal__close-button")("aria-label",e.locale.maketext("Close"))}}function It(i,o){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"button",9),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).decline()}),t.qZA(),t.TgZ(2,"button",10),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).confirm()}),t.qZA(),t.BQk()}if(2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("innerHTML",e.declineActionText,t.oJD),t.uIk("data-testid","modal__decline-button"),t.xp6(1),t.Q6J("innerHTML",e.confirmActionText,t.oJD),t.uIk("data-testid","modal__confirm-button")}}function Zt(i,o){if(1&i&&(t.TgZ(0,"div",7),t.Hsn(1,2),t.YNc(2,It,3,4,"ng-container",8),t.qZA()),2&i){const e=t.oxw(2);t.xp6(2),t.Q6J("ngIf",e.config.confirmWindow)}}function Lt(i,o){if(1&i&&(t.YNc(0,At,5,2,"div",1),t.TgZ(1,"div",2),t.Hsn(2),t.qZA(),t.YNc(3,Zt,3,1,"div",3)),2&i){const e=t.oxw();t.Q6J("ngIf",!(null!=e.config&&e.config.hideHeader)),t.xp6(3),t.Q6J("ngIf",!(null!=e.config&&e.config.hideFooter))}}const Jt=[[["","modalBody",""]],[["","modalHeader",""]],[["","modalFooter",""]]],Rt=["[modalBody]","[modalHeader]","[modalFooter]"];let W=(()=>{class i{constructor(e,n,s){this.locale=e,this.modalService=n,this.renderer=s,this.dismissModal=new t.vpe,this.onDecline=new t.vpe,this.onConfirm=new t.vpe,this.config={confirmWindow:!1,size:O.mobile,ignoreBackdropClick:!1,keyboard:!0,backdrop:!0,hideFooter:!1,hideHeader:!1},this.modalSize=O.desktop,this.destroySubject=new P.xQ}ngOnInit(){this.confirmActionText??(this.confirmActionText=this.locale.maketext("Continue")),this.declineActionText??(this.declineActionText=this.locale.maketext("Cancel")),this.modalService.onHide.pipe((0,j.R)(this.destroySubject)).subscribe(e=>{this.dismissModal.emit()})}ngOnChanges(e){e?.show&&(e.show.currentValue?this.openModal():this.closeModal()),e.modalSize&&this.bsModalRef&&this.changeSize(e.modalSize.currentValue)}ngOnDestroy(){this.closeModal(),this.destroySubject.next()}openModal(){this.bsModalRef=this.modalService.show(this.modalTemplate,this.config),this.changeSize(this.config.size)}closeModal(){this.bsModalRef&&this.bsModalRef.hide()}confirm(){this.onConfirm.emit(),this.bsModalRef?.hide()}decline(){this.onDecline.emit(),this.bsModalRef?.hide()}changeSize(e){const n=document.querySelector(".modal-dialog");!n||(this.renderer.removeClass(n,`modal-${O.desktop}`),this.renderer.removeClass(n,`modal-${O.tablet}`),this.renderer.removeClass(n,`modal-${O.mobile}`),this.renderer.addClass(n,`modal-${e}`))}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(b.g),t.Y36(ot.tT),t.Y36(t.Qsj))},i.\u0275cmp=t.Xpm({type:i,selectors:[["sitejet-modal"]],viewQuery:function(e,n){if(1&e&&t.Gf(Dt,7),2&e){let s;t.iGM(s=t.CRH())&&(n.modalTemplate=s.first)}},inputs:{confirmActionText:"confirmActionText",declineActionText:"declineActionText",config:"config",modalSize:"modalSize",show:"show"},outputs:{dismissModal:"dismissModal",onDecline:"onDecline",onConfirm:"onConfirm"},features:[t.TTD],ngContentSelectors:Rt,decls:2,vars:0,consts:[["modalTemplate",""],["class","modal-header",4,"ngIf"],[1,"modal-body"],["class","modal-footer",4,"ngIf"],[1,"modal-header"],["type","button",1,"btn-close","close","pull-right",3,"click"],["aria-hidden","true",1,"visually-hidden"],[1,"modal-footer"],[4,"ngIf"],[1,"btn","btn-outline-primary",3,"innerHTML","click"],[1,"btn","btn-primary",3,"innerHTML","click"]],template:function(e,n){1&e&&(t.F$t(Jt),t.YNc(0,Lt,4,2,"ng-template",null,0,t.W1O))},directives:[d.O5],styles:["[_nghost-%COMP%]{display:none} .modal-dialog.modal-xl{width:90vw} .modal-dialog.modal-lg{width:800px} .modal-dialog.modal-md{width:500px} .modal-header>div{display:block;width:100%}"],changeDetection:0}),i})();var Nt=c(4858),Qt=c(5398);const Yt=["terminalScreen"];function Bt(i,o){1&i&&t._UZ(0,"p",3),2&i&&t.Q6J("innerHtml",o.$implicit,t.oJD)}let Ft=(()=>{class i{constructor(e){this.messageService=e,this.sentMessages=[],this.destroySubject=new P.xQ}ngAfterViewInit(){this.messageService.messages$.pipe((0,j.R)(this.destroySubject),(0,T.b)(e=>{const n=e.slice(this.sentMessages.length);return(0,Nt.D)(n).pipe((0,T.b)(s=>(0,Qt.H)(100).pipe((0,C.q)(1),(0,Q.U)(()=>s))))})).subscribe(e=>{this.addMessage(e)})}ngOnDestroy(){this.destroySubject.next()}addMessage(e){this.sentMessages.push(e),this.scrollToBottom()}scrollToBottom(){this.terminalScreen.nativeElement.scrollTop=this.terminalScreen.nativeElement.scrollHeight}}return i.\u0275fac=function(e){return new(e||i)(t.Y36($))},i.\u0275cmp=t.Xpm({type:i,selectors:[["sitejet-scrolling-messages"]],viewQuery:function(e,n){if(1&e&&t.Gf(Yt,5),2&e){let s;t.iGM(s=t.CRH())&&(n.terminalScreen=s.first)}},decls:3,vars:1,consts:[[1,"scrolling-messages-wrapper"],["terminalScreen",""],[3,"innerHtml",4,"ngFor","ngForOf"],[3,"innerHtml"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0,1),t.YNc(2,Bt,1,1,"p",2),t.qZA()),2&e&&(t.xp6(2),t.Q6J("ngForOf",n.sentMessages))},directives:[d.sg],styles:["html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{height:100%}[_nghost-%COMP%]{--cp-spacer-1: .25rem;--cp-spacer-2: .5rem;--cp-spacer-3: .75rem;--cp-spacer-4: 1rem;--cp-spacer-5: 1.25rem;--cp-spacer-6: 1.5rem;--cp-spacer-7: 1.75rem;--cp-spacer-8: 2rem;--cp-spacer-9: 2.5rem;--cp-spacer-10: 3rem}html[dir=ltr][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{padding-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{padding-left:var(--cp-spacer-1)}html[dir=ltr][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%]{padding-right:0;padding-left:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%]{padding-left:0;padding-right:var(--cp-spacer-1)}.sitejet-cp-button--with-icon[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:inline-flex;justify-content:center;align-items:center}.icon-btn-link-text[_ngcontent-%COMP%]{text-transform:none}.toast-header[_ngcontent-%COMP%]{font-weight:600}.page-title-section[_ngcontent-%COMP%] > .breadcrumb[_ngcontent-%COMP%]{padding-top:var(--cp-spacer-2);font-size:1rem}.page-title-section[_ngcontent-%COMP%] > .breadcrumb[_ngcontent-%COMP%] .breadcrumb-separator[_ngcontent-%COMP%]{padding:0 var(--cp-spacer-1)}.sitejet-modal-header[_ngcontent-%COMP%]{font-size:1.25rem;margin:0}@media (max-width: 575.98px){.hidden-xs[_ngcontent-%COMP%]{display:none}}.scrolling-messages-wrapper[_ngcontent-%COMP%]{background-color:#000;color:var(--cp-success, #198754);font-family:Courier New,monospace;padding:var(--cp-spacer-4);width:100%;height:60vh;overflow-y:scroll;border:1px solid var(--cp-gray-700, #54636f);box-shadow:0 0 var(--cp-spacer-2) #0000004d;border-radius:.25rem;white-space:pre-wrap;position:relative;z-index:0}.scrolling-messages-wrapper[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;word-break:break-word}"]}),i})();const qt=["confetti"];function Et(i,o){if(1&i&&(t.ynx(0),t._UZ(1,"progressbar",10),t.TgZ(2,"div",11),t._UZ(3,"span",12),t.TgZ(4,"span",13),t._uU(5),t.qZA()(),t.BQk()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("animate",!0)("value",e.progress||e.minProgressValue),t.xp6(4),t.Oqu(e.loadingText)}}const $t=function(){return{backdrop:"static",keyboard:!1,ignoreBackdropClick:!0,hideFooter:!0,hideHeader:!0}},Wt=function(i,o){return{"ri-arrow-down-s-line":i,"ri-arrow-up-s-line":o}};let Ut=(()=>{class i{constructor(e,n,s,r){this.wsMessageService=e,this.sitejetHelperService=n,this.window=s,this.locale=r,this.progress=1,this.hide=new t.vpe,this.isCollapsed=!0,this.buttonState=a.BN,this.buttonVariant=a.Wu,this.minProgressValue=4,this.textMoreDetails=this.locale.maketext("More details"),this.textLessDetails=this.locale.maketext("Less details")}ngOnInit(){this.loadingText=this.locale.maketext("Your site is being published \u2026")}ngAfterViewInit(){this.wsMessageService.publishComplete$.pipe((0,C.q)(1)).subscribe(e=>{e&&(this.confetti.createConfetti(),this.wsMessageService.publishComplete(!1))})}showMore(){this.isCollapsed=!this.isCollapsed,this.window.mixpanel?.track("Sitejet-PublishDetails",{domain:this.domain,"primary-domain":this.sitejetHelperService.isPrimaryDomain(this.domain),"is-collapsed":this.isCollapsed}),this.modalSize=this.isCollapsed?void 0:O.desktop}getMoreLessLabel(e){return e?this.textMoreDetails:this.textLessDetails}}return i.\u0275fac=function(e){return new(e||i)(t.Y36($),t.Y36(B),t.Y36(Window),t.Y36(b.g))},i.\u0275cmp=t.Xpm({type:i,selectors:[["sitejet-publish"]],viewQuery:function(e,n){if(1&e&&t.Gf(qt,7),2&e){let s;t.iGM(s=t.CRH())&&(n.confetti=s.first)}},inputs:{show:"show",progress:"progress",domain:"domain"},outputs:{hide:"hide"},decls:11,vars:17,consts:[[3,"numberOfParticles"],["confetti",""],[3,"show","modalSize","config"],["modalBody",""],[4,"ngIf"],[1,"publish-modal__actions"],["id","publish-modal__collapse",1,"sitejet-cp-button--with-icon",3,"buttonVariant","buttonState","onBtnClick"],[1,"ri-md",3,"ngClass"],[1,"icon-btn-link-text",3,"innerHtml"],[3,"collapse","isAnimated"],[3,"animate","value"],[1,"my-3"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"],[1,"px-1"]],template:function(e,n){1&e&&(t._UZ(0,"sitejet-confetti",0,1),t.TgZ(2,"sitejet-modal",2)(3,"div",3),t.YNc(4,Et,6,3,"ng-container",4),t.TgZ(5,"div",5)(6,"cp-button",6),t.NdJ("onBtnClick",function(){return n.showMore()}),t._UZ(7,"i",7)(8,"span",8),t.qZA()(),t.TgZ(9,"div",9),t._UZ(10,"sitejet-scrolling-messages"),t.qZA()()()),2&e&&(t.Q6J("numberOfParticles",50),t.xp6(2),t.Q6J("show",n.show)("modalSize",n.modalSize)("config",t.DdM(13,$t)),t.xp6(2),t.Q6J("ngIf",n.isCollapsed),t.xp6(2),t.Q6J("buttonVariant",n.buttonVariant.iconLink)("buttonState",n.buttonState.enabled),t.uIk("data-test","publish-modal__collapse"),t.xp6(1),t.Q6J("ngClass",t.WLB(14,Wt,n.isCollapsed,!n.isCollapsed)),t.xp6(1),t.Q6J("innerHtml",n.getMoreLessLabel(n.isCollapsed),t.oJD),t.xp6(1),t.Q6J("collapse",n.isCollapsed)("isAnimated",!0),t.uIk("data-testid","publish-modal__detailed-view"))},directives:[jt,W,d.O5,st.O1,a.r0,d.mk,H.Y,Ft],styles:[".publish-modal__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"]}),i})();const Vt=function(){return{confirmWindow:!0}},zt=function(){return{backdrop:"static",keyboard:!1,hideFooter:!0,ignoreBackdropClick:!0}};let Gt=(()=>{class i{constructor(e,n,s,r){this.locale=e,this.loadingService=n,this.notificationService=s,this.router=r,this.show=!1,this.hide=new t.vpe,this.progressModalShow=!1,this.completeSubject=new P.xQ,this.setRestoreMessages()}ngOnInit(){this.loadingText=this.getRandomElement(this.backupLoadingMessages)}resetState(){this.completeSubject.next(!0),this.progressModalShow=!1,this.hide.emit(!0)}handleModalConfirm(){this.progressModalShow=!0,this.startRestore()}handleModalDecline(){this.hide.emit(!0)}handleModalDismissed(){this.hide.emit(!0)}startRestore(){this.completeSubject.next(!1),this.initLoadingMessages(),this.httpRequest.pipe((0,w.x)(()=>{this.resetState()})).subscribe({next:e=>{this.notificationService.add({type:a.k$.success,message:this.locale.maketext("Successfully restored data for the \u201c[_1]\u201d domain.",this.domain),id:"restore__success--restoreDocumentRoot"}),this.router.navigate([l.list])},error:e=>{this.notificationService.add({type:a.k$.error,message:e.message,id:"restore__error--restoreDocumentRoot"})}})}getRandomElement(e){return e[Math.floor(Math.random()*e.length)]}initLoadingMessages(){this.loadingService.displayLoadingMessages({displayIntervalMs:2e3,messages:this.backupLoadingMessages,complete$:this.completeSubject}).subscribe(e=>this.loadingText=e)}setRestoreMessages(){this.backupLoadingMessages=[this.locale.maketext("Initializing data transfer \u2026"),this.locale.maketext("Recovering data from archive \u2026"),this.locale.maketext("Retrieving files \u2026"),this.locale.maketext("Preparing restoration \u2026"),this.locale.maketext("Extracting data from archive \u2026"),this.locale.maketext("Verifying data integrity \u2026"),this.locale.maketext("Restoring document root to previous state \u2026"),this.locale.maketext("Data restoration in progress \u2026"),this.locale.maketext("Files being recovered \u2026"),this.locale.maketext("Analyzing data restoration \u2026"),this.locale.maketext("Finalizing restoration process \u2026")]}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(b.g),t.Y36(J),t.Y36(a.gq),t.Y36(_.F0))},i.\u0275cmp=t.Xpm({type:i,selectors:[["sitejet-restore"]],inputs:{restoreFilePath:"restoreFilePath",show:"show",domain:"domain",httpRequest:"httpRequest"},outputs:{hide:"hide"},decls:14,vars:13,consts:[[3,"show","config","modalSize","dismissModal","onConfirm","onDecline"],["modalHeader",""],[1,"sitejet-modal-header",3,"innerHTML"],["modalBody",""],[3,"innerHTML"],[3,"show","modalSize","config"],[1,"my-3"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"],[1,"px-1"]],template:function(e,n){1&e&&(t.TgZ(0,"sitejet-modal",0),t.NdJ("dismissModal",function(){return n.handleModalDismissed()})("onConfirm",function(){return n.handleModalConfirm()})("onDecline",function(){return n.handleModalDecline()}),t.TgZ(1,"div",1),t._UZ(2,"p",2),t.qZA(),t.TgZ(3,"div",3),t._UZ(4,"p",4),t.qZA()(),t.TgZ(5,"sitejet-modal",5)(6,"div",1),t._UZ(7,"p",2),t.qZA(),t.TgZ(8,"div",3),t._UZ(9,"p",4),t.TgZ(10,"div",6),t._UZ(11,"span",7),t.TgZ(12,"span",8),t._uU(13),t.qZA()()()()),2&e&&(t.Q6J("show",n.show)("config",t.DdM(11,Vt))("modalSize",void 0),t.xp6(2),t.Q6J("innerHTML",n.locale.maketext("Restore Directory"),t.oJD),t.xp6(2),t.Q6J("innerHTML",n.locale.maketext("This option will remove the existing Sitejet website for \u201c[output,strong,_1]\u201d and use the restore point to recover any files from your website\u2019s directory. The Sitejet Website Builder (CMS) saves your Sitejet website. You can publish it again in the future.",n.domain),t.oJD),t.xp6(1),t.Q6J("show",n.progressModalShow)("modalSize",void 0)("config",t.DdM(12,zt)),t.xp6(2),t.Q6J("innerHTML",n.locale.maketext("Restoring [output,strong,_1]",n.domain),t.oJD),t.xp6(2),t.Q6J("innerHTML",n.locale.maketext("Restoring file \u201c[_1]\u201d.",n.restoreFilePath),t.oJD),t.xp6(4),t.Oqu(n.loadingText))},directives:[W],styles:[""]}),i})(),Xt=(()=>{class i{constructor(e){this.sanitizer=e}transform(e,n){switch(n){case"html":default:return this.sanitizer.bypassSecurityTrustHtml(e);case"style":return this.sanitizer.bypassSecurityTrustStyle(e);case"script":return this.sanitizer.bypassSecurityTrustScript(e);case"url":return this.sanitizer.bypassSecurityTrustUrl(e);case"resourceUrl":return this.sanitizer.bypassSecurityTrustResourceUrl(e)}}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(Z.H7,16))},i.\u0275pipe=t.Yjl({name:"safe",type:i,pure:!0}),i})();function Kt(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"cp-button",27),t.NdJ("onBtnClick",function(){return t.CHM(e),t.oxw().restoreSite()}),t._UZ(1,"i",28)(2,"span",29),t.qZA()}if(2&i){const e=t.oxw();t.Q6J("buttonVariant",e.buttonVariant.iconLink)("buttonState",e.buttonState.enabled),t.uIk("data-test","domain-details__restore-site"),t.xp6(2),t.Q6J("innerHtml",e.locale.maketext("Restore"),t.oJD)}}function te(i,o){1&i&&(t.TgZ(0,"div",30)(1,"div",31),t._UZ(2,"cp-loading-spinner",32),t.qZA()()),2&i&&(t.uIk("data-testid","domain-details__loading-state"),t.xp6(2),t.Q6J("isActive",!0),t.uIk("data-testid","domain-details__loading-spinner"))}function ee(i,o){1&i&&(t.TgZ(0,"div",30)(1,"div",31),t._UZ(2,"cp-loading-spinner",33),t.qZA()()),2&i&&(t.uIk("data-testid","domain-details__backup-state"),t.xp6(2),t.Q6J("isActive",!0),t.uIk("data-test","domain-details__backup-spinner"))}function ne(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"div",34)(1,"iframe",35),t.NdJ("load",function(s){return t.CHM(e),t.oxw().iframeLoadDone(s)})("error",function(s){return t.CHM(e),t.oxw().onIframeError(s)}),t.ALo(2,"safe"),t.qZA()()}if(2&i){const e=t.oxw();t.uIk("data-testid","domain-details__iframe-wrapper"),t.xp6(1),t.Udp("display",e.displayIframe?"block":"none"),t.Q6J("src",t.xi3(2,6,e.iframeSource,"resourceUrl"),t.uOi)("alt",e.locale.maketext("Website Preview")),t.uIk("data-testid","domain-details__preview-iframe")}}function ie(i,o){if(1&i&&(t.TgZ(0,"div",30)(1,"div",36)(2,"div",37),t._UZ(3,"i",38),t.qZA(),t.TgZ(4,"p",39),t._uU(5),t.qZA(),t.TgZ(6,"p",40),t._uU(7),t.qZA()()()),2&i){const e=t.oxw();t.uIk("data-testid","domain-details__unpublished-state"),t.xp6(3),t.uIk("data-testid","domain-details__unpublished-icon"),t.xp6(1),t.uIk("data-testid","domain-details__unpublished-text"),t.xp6(1),t.hij(" ",e.locale.maketext("No preview available")," "),t.xp6(1),t.uIk("data-testid","domain-details__unpublished-subtext"),t.xp6(1),t.hij(" ",e.locale.maketext("Publish your website to see a preview here.")," ")}}function oe(i,o){if(1&i&&(t.ynx(0),t._uU(1),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.hij(" ",e.locale.maketext("This website uses an untrusted SSL certificate, but may still be accessible directly.")," ")}}function se(i,o){if(1&i&&(t.ynx(0),t._uU(1),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.hij(" ",e.locale.maketext("You cannot preview temporary domains here due to cookie consent requirements. View your site in a new tab instead.")," ")}}function ae(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"div")(1,"p",42),t.YNc(2,oe,2,1,"ng-container",41),t.YNc(3,se,2,1,"ng-container",41),t.qZA(),t.TgZ(4,"cp-button",43),t.NdJ("onBtnClick",function(){return t.CHM(e),t.oxw(2).openSiteInNewTab()}),t._uU(5),t.qZA()()}if(2&i){const e=t.oxw(2);t.uIk("data-testid","domain-details__ssl-help-container"),t.xp6(1),t.uIk("data-testid","domain-details__ssl-help-text"),t.xp6(1),t.Q6J("ngIf",e.showSslHelp),t.xp6(1),t.Q6J("ngIf",e.showTemporaryDomainHelp),t.xp6(1),t.Q6J("buttonVariant",e.buttonVariant.primary)("buttonState",e.buttonState.enabled),t.uIk("data-testid","domain-details__open-new-tab"),t.xp6(1),t.hij(" ",e.locale.maketext("Open in a New Tab")," ")}}function re(i,o){if(1&i&&(t.TgZ(0,"div",30)(1,"div",36)(2,"div",37),t._UZ(3,"i",38),t.qZA(),t.TgZ(4,"p",39),t._uU(5),t.qZA(),t.TgZ(6,"p",40),t._uU(7),t.qZA(),t.YNc(8,ae,6,8,"div",41),t.qZA()()),2&i){const e=t.oxw();t.uIk("data-testid","domain-details__ssl-error-state"),t.xp6(3),t.uIk("data-testid","domain-details__ssl-error-icon"),t.xp6(1),t.uIk("data-testid","domain-details__ssl-error-text"),t.xp6(1),t.hij(" ",e.locale.maketext("Preview not available")," "),t.xp6(1),t.uIk("data-testid","domain-details__ssl-error-subtext"),t.xp6(1),t.hij(" ",e.locale.maketext("Unable to load website preview.")," "),t.xp6(1),t.Q6J("ngIf",e.showSslHelp||e.showTemporaryDomainHelp)}}function le(i,o){if(1&i&&t._UZ(0,"p",20),2&i){const e=t.oxw();t.Q6J("innerHTML",e.diskWarningText,t.oJD)}}function ce(i,o){if(1&i&&t._UZ(0,"cp-notification",44),2&i){const e=t.oxw();t.Q6J("notification",e.myNotification)("isInPage",!0)}}const de=function(){return{confirmWindow:!0}};let _t=(()=>{class i{constructor(e,n,s,r,m,M,G,X,K,tt,et,gn){this.homeDir=e,this.deprefix=n,this.locale=s,this.route=r,this.apiService=m,this.window=M,this.notificationService=G,this.clipboard=X,this.router=K,this.formBuilder=tt,this.sitejetHelperService=et,this.wsMessageService=gn,this.fetchingSsoLink=!1,this.displayIframe=!1,this.hasIframeError=!1,this.loading=!0,this.isPublishing=!1,this.takingBackup=!1,this.showWarningModal=!1,this.showDiskWarning=!1,this.showRestoreModal=!1,this.editSiteButtonState=a.BN.enabled,this.buttonState=a.BN,this.buttonVariant=a.Wu,this.iframeTimeoutDuration=5e3,this.destroySubject=new P.xQ}ngOnDestroy(){clearTimeout(this.loadTimeout),this.destroySubject.next()}ngOnInit(){this.warningForm=this.formBuilder.group({restoreCheckbox:this.formBuilder.control(!0)}),this.domain=this.route.snapshot.queryParams.site_id,this.apiService.getAllSitejetInfo({domain:this.domain}).pipe((0,C.q)(1)).subscribe({next:e=>{this.website=e.processedData.find(m=>m.domain===this.domain);const{metadata:n,quota:s,status:r}=this.website;if(this.docrootDirectory=n?.document_root,this.backupDirectory=n?.restore_file,this.canRestore=Boolean(this.website?.is_restore_point_available),this.routeComesFromSitejet(this.router.url)){if(r.is_sitejet||s.is_docroot_empty)return void this.publish();this.showDiskWarning=!s.can_backup,this.diskWarningText=this.locale.maketext("The system requires [numf,_1] MB to create a restore point for the directory. Your account\u2019s quota limit only has [numf,_2] MB available. You must increase your quota limit or remove files to create a restore point.",s.required_space,s.available_space),this.showDiskWarning&&(this.warningForm.get("restoreCheckbox").setValue(!1),this.warningForm.get("restoreCheckbox").disable()),this.showWarningModal=!0,this.loading=!1}else this.fetchSiteMetadata()},error:e=>{this.notificationService.add({type:a.k$.error,message:e.message,id:"domain-details__error--getAllSitejetInfo"}),this.loading=!1}})}ngAfterViewInit(){this.myNotification=new a.P_(this.locale.maketext("Without a restore point, you will be unable to recover your current website\u2019s files."),a.k$.warning,{isCloseable:!1,id:"domain-details__warn-uncheck-restore"})}get hasValidSsl(){return this.website?.status?.ssl_status??!1}get isTemporaryDomain(){return this.website?.is_temporary_domain??!1}get showSslHelp(){return this.hasIframeError&&!this.hasValidSsl&&!this.isTemporaryDomain}get showTemporaryDomainHelp(){return this.hasIframeError&&this.isTemporaryDomain}openSiteInNewTab(){this.iframeSource&&window.open(this.iframeSource,"_blank","noopener,noreferrer")}viewSite(){this.window.open(`https://${this.website.domain}`,R.preview)}restoreSite(){this.showRestoreModal=!0}getSso(){this.window.mixpanel?.track("Sitejet-EditSite",{domain:this.domain,"primary-domain":this.sitejetHelperService.isPrimaryDomain(this.domain),"launched-from":"Sitejet website details view"}),this.editSiteButtonState=a.BN.loading,this.apiService.getSsoLink(this.domain,f.PROMPT).pipe((0,w.x)(()=>this.editSiteButtonState=a.BN.enabled),(0,C.q)(1)).subscribe({next:e=>{this.window.location.href=e.data},error:e=>{this.notificationService.add({type:a.k$.error,message:e.message,id:"domain-details__error--getSsoLink"})}})}iframeLoadDone(e){clearTimeout(this.loadTimeout),this.isPublishing=!1,this.loading=!1,this.hasIframeError=!1,e.target.src&&(this.displayIframe=!0)}onIframeError(e){clearTimeout(this.loadTimeout),this.isPublishing=!1,this.loading=!1,this.displayIframe=!1,this.hasIframeError=!0,this.hasValidSsl&&this.notificationService.add({type:a.k$.warning,message:this.locale.maketext("Unable to load website preview. The site may still be accessible directly."),id:"iframe-preview__warning--load-error"})}publish(e){clearTimeout(this.loadTimeout),this.displayIframe=!1,this.isPublishing=!0,this.iframeSource=null,this.apiService.startPublish(this.domain,e?.cleanup).pipe((0,C.q)(1)).subscribe({next:n=>{this.window.mixpanel?.track("Sitejet-SitePublished",{domain:this.domain,"primary-domain":this.sitejetHelperService.isPrimaryDomain(this.domain)}),this.startPoll(n.data.pid,n.data.file_name)},error:n=>{this.notificationService.clear(),this.notificationService.add({type:a.k$.error,message:n.message,id:"domain-details__error--startPublish"}),this.reRouteToView()}})}startPoll(e,n){this.wsMessageService.sendMessages([this.locale.maketext("Starting publish \u2026")]),(0,at.F)(3e3).pipe((0,j.R)(this.destroySubject),(0,T.b)(()=>this.apiService.pollPublish(e,n))).subscribe({next:s=>{if(this.wsMessageService.sendMessages(s.data.log),this.progress=Number(s.data.progress),!s.data.is_running){if(this.notificationService.clear(),this.destroySubject.next(),s.data.failed)return this.notificationService.add({type:a.k$.error,message:this.locale.maketext("Something went wrong when publishing your Sitejet website. If this condition persists, contact your system administrator."),id:"domain-details__error--pollPublish-handled"}),void this.reRouteToView();this.notificationService.add({type:a.k$.success,message:this.locale.maketext("Published successfully."),id:"domain-details__success--pollPublish"}),this.reRouteToView(),this.wsMessageService.publishComplete()}},error:s=>{this.notificationService.clear(),this.notificationService.add({type:a.k$.error,message:s.message,id:"domain-details__error--pollPublish"}),this.destroySubject.next(),this.website.status.is_sitejet?this.reRouteToView():this.router.navigate([l.list])}})}handleModalConfirm(){this.showWarningModal=!1,this.warningForm.get("restoreCheckbox").value?(this.takingBackup=!0,this.notificationService.add({type:a.k$.information,message:this.locale.maketext("Creating restore point \u2026"),id:"domain-details__info--createRestorationPoint"}),this.apiService.createRestorePoint(this.domain).pipe((0,C.q)(1),(0,w.x)(()=>{this.takingBackup=!1})).subscribe({next:n=>{this.notificationService.clear(),this.publish()},error:n=>{this.notificationService.clear(),this.notificationService.add({type:a.k$.error,message:n.message,id:"domain-details__error--createRestorePoint"})}})):this.publish({cleanup:!0})}handleModalDismissed(){this.showWarningModal=!1}reRouteToView(){this.router.navigate([l.details,l.view],{queryParams:{site_id:this.domain}})}copyToClipboard(e,n){this.clipboard.copy(e),this.notificationService.add({type:a.k$.information,autoClosePeriod:2e3,message:n,id:"domain-details__info--copy"})}routeComesFromSitejet(e){return e.includes(l.pleskPublish)}fetchSiteMetadata(){this.website?.status?.has_sitejet_published?(this.iframeSource="https://"+this.website.domain+"/?cacheBust="+Date.now(),this.website?.is_temporary_domain?(this.hasIframeError=!0,this.loading=!1):this.website?.status?.ssl_status?this.startLoadTimeout():(this.hasIframeError=!0,this.loading=!1)):this.loading=!1}startLoadTimeout(){this.loadTimeout=setTimeout(()=>{this.notificationService.add({type:a.k$.warning,message:this.locale.maketext("The preview is taking too long to load. If this is a self-signed SSL, please visit the page to see the preview."),id:"domain-details__warning--iframe"}),this.loading=!1,this.isPublishing=!1},this.iframeTimeoutDuration)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(lt),t.Y36(q),t.Y36(b.g),t.Y36(_.gz),t.Y36(Y),t.Y36(Window),t.Y36(a.gq),t.Y36(it.TU),t.Y36(_.F0),t.Y36(x.qu),t.Y36(B),t.Y36($))},i.\u0275cmp=t.Xpm({type:i,selectors:[["sitejet-domain-details"]],decls:35,vars:36,consts:[[1,"domain-details__container"],[1,"domain-details__title-container"],[1,"domain-details__h2"],["type","button",1,"btn","btn-link","domain-details__title",3,"disabled","click"],[1,"domain-details_icon-group"],[1,"domain-details__title-text"],[1,"ri-md","ri-external-link-line"],[1,"domain-details__top-actions-container"],["id","domain-details__restore-site","class","sitejet-cp-button--with-icon",3,"buttonVariant","buttonState","onBtnClick",4,"ngIf"],["id","domain-details__edit-site",1,"sitejet-cp-button--with-icon",3,"buttonVariant","buttonState","onBtnClick"],[1,"ri-md","ri-pencil-fill"],[3,"innerHtml"],[3,"show","progress","domain"],["class","domain-details__preview-image",4,"ngIf"],["class","domain-details__preview-iframe-wrapper",4,"ngIf"],[3,"show","config","confirmActionText","modalSize","dismissModal","onConfirm","onDecline"],["modalHeader",""],[1,"sitejet-modal-header",3,"innerHTML"],["modalBody",""],[3,"innerHTML","click"],[3,"innerHTML"],[3,"innerHTML",4,"ngIf"],[1,"mb-3",3,"formGroup"],["id","modal-backup-checkbox","type","checkbox","formControlName","restoreCheckbox",1,"form-check-input"],["for","modal-backup-checkbox",1,"form-check-label",3,"innerHTML"],[3,"notification","isInPage",4,"ngIf"],[3,"show","domain","httpRequest","restoreFilePath","hide"],["id","domain-details__restore-site",1,"sitejet-cp-button--with-icon",3,"buttonVariant","buttonState","onBtnClick"],[1,"ri-md","ri-history-fill"],[1,"icon-btn-link-text",3,"innerHtml"],[1,"domain-details__preview-image"],[1,"domain-details__loading-container"],["id","domain-details__loading-spinner",3,"isActive"],["id","domain-details__backup-spinner",3,"isActive"],[1,"domain-details__preview-iframe-wrapper"],[1,"domain-details__preview-iframe",3,"src","alt","load","error"],[1,"domain-details__no-preview-container"],[1,"domain-details__no-preview-icon-wrapper"],[1,"ri-2x","ri-pages-line","domain-details__no-preview-icon"],[1,"domain-details__no-preview-text"],[1,"domain-details__no-preview-subtext"],[4,"ngIf"],[1,"domain-details__ssl-help-text"],["id","domain-details__open-new-tab",3,"buttonVariant","buttonState","onBtnClick"],[3,"notification","isInPage"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"h2",2)(3,"button",3),t.NdJ("click",function(){return n.viewSite()}),t.TgZ(4,"span",4)(5,"span",5),t._uU(6),t.qZA(),t._UZ(7,"i",6),t.qZA()()(),t.TgZ(8,"div",7),t.YNc(9,Kt,3,4,"cp-button",8),t.TgZ(10,"cp-button",9),t.NdJ("onBtnClick",function(){return n.getSso()}),t._UZ(11,"i",10)(12,"span",11),t.qZA()()(),t._UZ(13,"sitejet-publish",12),t.YNc(14,te,3,3,"div",13),t.YNc(15,ee,3,3,"div",13),t.YNc(16,ne,3,9,"div",14),t.YNc(17,ie,8,6,"div",13),t.YNc(18,re,9,7,"div",13),t.qZA(),t.TgZ(19,"sitejet-modal",15),t.NdJ("dismissModal",function(){return n.handleModalDismissed()})("onConfirm",function(){return n.handleModalConfirm()})("onDecline",function(){return n.reRouteToView()}),t.TgZ(20,"div",16),t._UZ(21,"p",17),t.qZA(),t.TgZ(22,"div",18)(23,"p")(24,"span",19),t.NdJ("click",function(){return n.copyToClipboard(n.docrootDirectory,n.locale.maketext("Website directory copied to clipboard."))}),t.qZA(),t._UZ(25,"span",20),t.TgZ(26,"span"),t._uU(27),t.qZA()(),t.YNc(28,le,1,1,"p",21),t.TgZ(29,"form",22)(30,"div"),t._UZ(31,"input",23)(32,"label",24),t.qZA()(),t.YNc(33,ce,1,2,"cp-notification",25),t.qZA()(),t.TgZ(34,"sitejet-restore",26),t.NdJ("hide",function(){return n.showRestoreModal=!1}),t.qZA()),2&e&&(t.xp6(2),t.uIk("data-testid","domain-details__title-"+n.domain),t.xp6(1),t.Q6J("disabled",!(null!=n.website&&n.website.status.has_sitejet_published&&null!=n.website&&n.website.domain)),t.uIk("data-testid","domain-details__view-site"),t.xp6(3),t.Oqu(n.domain),t.xp6(3),t.Q6J("ngIf",n.canRestore),t.xp6(1),t.Q6J("buttonVariant",n.buttonVariant.primary)("buttonState",n.editSiteButtonState),t.uIk("data-testid","domain-details__edit-site"),t.xp6(2),t.Q6J("innerHtml",n.locale.maketext("Edit Site"),t.oJD),t.xp6(1),t.Q6J("show",n.isPublishing)("progress",n.progress)("domain",n.domain),t.xp6(1),t.Q6J("ngIf",n.loading||n.isPublishing),t.xp6(1),t.Q6J("ngIf",!n.loading&&!n.isPublishing&&n.takingBackup&&!n.displayIframe),t.xp6(1),t.Q6J("ngIf",n.iframeSource&&n.hasValidSsl&&!n.isTemporaryDomain&&!n.isPublishing),t.xp6(1),t.Q6J("ngIf",!(null!=n.website&&null!=n.website.status&&n.website.status.has_sitejet_published||n.loading||n.isPublishing||n.takingBackup)),t.xp6(1),t.Q6J("ngIf",(null==n.website||null==n.website.status?null:n.website.status.has_sitejet_published)&&!n.loading&&!n.isPublishing&&!n.takingBackup&&n.hasIframeError&&!n.displayIframe),t.xp6(1),t.Q6J("show",n.showWarningModal)("config",t.DdM(35,de))("confirmActionText",n.locale.maketext("Publish"))("modalSize",void 0),t.uIk("data-testid","publish-warning__modal"),t.xp6(2),t.Q6J("innerHTML",n.locale.maketext("Directory Not Empty"),t.oJD),t.xp6(3),t.Q6J("innerHTML",n.locale.maketext("The publishing process will remove any website files from your [output,abbr,website directory,_1].",n.docrootDirectory),t.oJD),t.xp6(1),t.Q6J("innerHTML","\xa0",t.oJD),t.xp6(2),t.Oqu(n.locale.maketext("We strongly recommend creating a restore point.")),t.xp6(1),t.Q6J("ngIf",n.showDiskWarning),t.xp6(1),t.Q6J("formGroup",n.warningForm),t.xp6(2),t.uIk("data-testid","publish-warning__backup-checkbox"),t.xp6(1),t.Q6J("innerHTML"," "+n.locale.maketext("Create a restore point."),t.oJD),t.xp6(1),t.Q6J("ngIf",!n.warningForm.get("restoreCheckbox").value),t.xp6(1),t.Q6J("show",n.showRestoreModal)("domain",n.domain)("httpRequest",n.apiService.restore(n.domain))("restoreFilePath",n.backupDirectory))},directives:[d.O5,a.r0,Ut,a.go,W,x._Y,x.JL,x.sg,x.Wl,x.JJ,x.u,a.c7,Gt],pipes:[Xt],styles:["html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{height:100%}[_nghost-%COMP%]{--cp-spacer-1: .25rem;--cp-spacer-2: .5rem;--cp-spacer-3: .75rem;--cp-spacer-4: 1rem;--cp-spacer-5: 1.25rem;--cp-spacer-6: 1.5rem;--cp-spacer-7: 1.75rem;--cp-spacer-8: 2rem;--cp-spacer-9: 2.5rem;--cp-spacer-10: 3rem}html[dir=ltr][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{padding-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{padding-left:var(--cp-spacer-1)}html[dir=ltr][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%]{padding-right:0;padding-left:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%]{padding-left:0;padding-right:var(--cp-spacer-1)}.sitejet-cp-button--with-icon[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:inline-flex;justify-content:center;align-items:center}.icon-btn-link-text[_ngcontent-%COMP%]{text-transform:none}.toast-header[_ngcontent-%COMP%]{font-weight:600}.page-title-section[_ngcontent-%COMP%] > .breadcrumb[_ngcontent-%COMP%]{padding-top:var(--cp-spacer-2);font-size:1rem}.page-title-section[_ngcontent-%COMP%] > .breadcrumb[_ngcontent-%COMP%] .breadcrumb-separator[_ngcontent-%COMP%]{padding:0 var(--cp-spacer-1)}.sitejet-modal-header[_ngcontent-%COMP%]{font-size:1.25rem;margin:0}@media (max-width: 575.98px){.hidden-xs[_ngcontent-%COMP%]{display:none}}.domain-details__container[_ngcontent-%COMP%]{position:relative}.domain-details__title-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.domain-details__h2[_ngcontent-%COMP%]{margin:0}.domain-details__title[_ngcontent-%COMP%]{text-decoration:none;font-size:inherit;text-transform:none}html[dir=ltr][_ngcontent-%COMP%] .domain-details__title-text[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .domain-details__title-text[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .domain-details__title-text[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .domain-details__title-text[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .domain-details__title-text[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .domain-details__title-text[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .domain-details__title-text[_ngcontent-%COMP%]{padding-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%] .domain-details__title-text[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .domain-details__title-text[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .domain-details__title-text[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .domain-details__title-text[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .domain-details__title-text[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .domain-details__title-text[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .domain-details__title-text[_ngcontent-%COMP%]{padding-left:var(--cp-spacer-1)}.domain-details__title[_ngcontent-%COMP%]:hover .domain-details__title-text[_ngcontent-%COMP%]{text-decoration:underline}.domain-details__preview-iframe[_ngcontent-%COMP%], .domain-details__preview-image[_ngcontent-%COMP%]{width:100%;border:1px solid var(--cp-gray-300, #c3c7cc);border-radius:.25rem;height:60vh}.domain-details__preview-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%}.domain-details__preview-iframe-wrapper[_ngcontent-%COMP%]{width:100%}html[dir=ltr][_ngcontent-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type, [dir=ltr][_ngcontent-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type, [dir=ltr][_nghost-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type, html[dir=ltr][_nghost-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type, html[dir=ltr] [_nghost-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type, [dir=ltr][_nghost-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type, [dir=ltr] [_nghost-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type{margin:var(--cp-spacer-2) var(--cp-spacer-2) var(--cp-spacer-2) 0}html[dir=rtl][_ngcontent-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type, [dir=rtl][_ngcontent-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type, [dir=rtl][_nghost-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type, html[dir=rtl][_nghost-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type, html[dir=rtl] [_nghost-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type, [dir=rtl][_nghost-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type, [dir=rtl] [_nghost-%COMP%] .domain-details__button[_ngcontent-%COMP%]:first-of-type{margin:var(--cp-spacer-2) 0 var(--cp-spacer-2) var(--cp-spacer-2)}.domain-details_icon-group[_ngcontent-%COMP%]{display:flex;align-items:center}html[dir=ltr][_ngcontent-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%]{padding-left:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .domain-details_icon-padding[_ngcontent-%COMP%]{padding-right:var(--cp-spacer-1)}.domain-details__top-actions-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--cp-spacer-2)}.domain-details__loading-skeleton[_ngcontent-%COMP%]{width:100%;text-align:center}@media (max-width: 540px){.domain-details__top-actions-container[_ngcontent-%COMP%]{position:unset}}@media (max-width: 991.98px){.domain-details__top-actions-container[_ngcontent-%COMP%]{flex-direction:column;gap:var(--cp-spacer-2) 0;align-items:flex-start}html[dir=ltr][_ngcontent-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%]{padding-left:var(--cp-spacer-4)}html[dir=rtl][_ngcontent-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .domain-details__top-actions-container[_ngcontent-%COMP%]{padding-right:var(--cp-spacer-4)}.domain-details__title-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;flex-direction:column;gap:1rem;margin-bottom:1rem}}.dropdown-toggle[_ngcontent-%COMP%]:after{display:none}.domain-details__no-preview-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:var(--cp-spacer-4);text-align:center}.domain-details__no-preview-icon-wrapper[_ngcontent-%COMP%]{margin-bottom:var(--cp-spacer-3)}.domain-details__no-preview-icon[_ngcontent-%COMP%]{color:var(--cp-gray-400, #9ca3af)}.domain-details__no-preview-text[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500;margin-bottom:var(--cp-spacer-2);color:var(--cp-gray-900, #1f2937)}.domain-details__no-preview-subtext[_ngcontent-%COMP%]{font-size:.875rem;margin-bottom:var(--cp-spacer-2);color:var(--cp-gray-600, #6b7280)}.domain-details__ssl-help-text[_ngcontent-%COMP%]{margin:var(--cp-spacer-3) 0;padding:0 1rem;font-size:.875rem;color:var(--cp-gray-700, #4b5563);font-weight:500}.domain-details__loading-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;min-height:200px}"]}),i})(),me=(()=>{class i{constructor(e,n){this.locale=e,this.router=n}onPageRefresh(){this.router.navigate(["/"])}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(b.g),t.Y36(_.F0))},i.\u0275cmp=t.Xpm({type:i,selectors:[["sitejet-error"]],decls:8,vars:3,consts:[[1,"error-wrapper"],[1,"ri-xxl","ri-error-warning-fill"],[1,"btn","btn-link","error-warpper__button-refresh",3,"click"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"i",1),t.TgZ(2,"h2"),t._uU(3),t.qZA(),t.TgZ(4,"p"),t._uU(5),t.qZA(),t.TgZ(6,"button",2),t.NdJ("click",function(){return n.onPageRefresh()}),t._uU(7),t.qZA()()),2&e&&(t.xp6(3),t.hij(" ",n.locale.maketext("Oops!")," "),t.xp6(2),t.hij(" ",n.locale.maketext("Something went wrong when initializing your Sitejet account.")," "),t.xp6(2),t.hij(" ",n.locale.maketext("Click here to retry.")," "))},styles:[".error-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-direction:column}.ri-xxl[_ngcontent-%COMP%]{font-size:4.5rem;line-height:1}.error-warpper__button-refresh[_ngcontent-%COMP%]{text-transform:none}"]}),i})();var p=(()=>{return(i=p||(p={})).domain="domain",i.info="info",i.actions="actions",i.actionPrimary="action-primary",p;var i})();const _e={displayValue:null,isSortable:!1,isCollapsed:!1,customCellTemplate:null};class D{constructor(o,e){this.value=o,this.options={..._e,...e}}}var ht=c(8494),A=c(5085);let U=(()=>{class i{constructor(){this.pagination={showPageSize:!0,pageSizeDisabled:!1,pageSizeOptions:[25,50,100,500],currentPageSize:25,totalItems:0,paginationDisabled:!1,currentPage:1,recordsBeforeFilter:0},this.sorts=[],this.loading=new L.X(!1)}updateSearchFilter(e,n){this.filters=[new ht.w(e,ht.p.Contains,n)],this.pagination.currentPage=1}changeSort(e){const n=this.sorts?.find(s=>s.column===e);n&&(n.direction=this.changeSortDirection(n.direction)),this.setSort(e,n?.direction||A.Sr.Ascending)}setSort(e,n){this.sorts=[new A.PE(e,n)]}getTableMetadata(){return{pager:{page:this.pagination.currentPage,pageSize:this.pagination.currentPageSize},filters:this.filters,sorts:this.sorts}}getSortColumn(){return this.sorts[0]?.column}sortedInAscendingOrder(){return this.sorts[0]?.direction===A.Sr.Ascending}changeSortDirection(e){return e===A.Sr.Ascending?A.Sr.Descending:A.Sr.Ascending}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var ut=c(1755);function he(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"th",14)(1,"input",15),t.NdJ("change",function(s){t.CHM(e);const r=t.oxw();return s?r.toggleAllRows():null}),t.qZA()()}if(2&i){const e=t.oxw();t.xp6(1),t.Q6J("indeterminate",e.selection.hasValue()&&!e.isAllSelected())("checked",e.selection.hasValue()&&e.isAllSelected()),t.uIk("aria-label",e.checkboxLabel())}}function ue(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"td",16)(1,"input",17),t.NdJ("click",function(s){return s.stopPropagation()})("change",function(s){const m=t.CHM(e).$implicit,M=t.oxw();return s?M.selection.toggle(m):null}),t.qZA()()}if(2&i){const e=o.$implicit,n=t.oxw();t.xp6(1),t.Q6J("checked",n.selection.isSelected(e)),t.uIk("aria-label",n.checkboxLabel(e))}}function ge(i,o){if(1&i&&(t.TgZ(0,"th",14)(1,"span",18),t._uU(2),t.qZA()()),2&i){const e=t.oxw();t.xp6(2),t.Oqu(e.locale.maketext("Expand/Collapse"))}}function Ce(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"td",19),t.NdJ("click",function(s){const m=t.CHM(e).$implicit,M=t.oxw();return M.expandedRow=M.expandedRow===m?null:m,s.stopPropagation()}),t.qZA()}if(2&i){const e=o.$implicit,n=t.oxw();t.uIk("aria-expanded",n.expandedRow===e)}}function fe(i,o){1&i&&(t.ynx(0),t.TgZ(1,"p")(2,"strong"),t._uU(3,"Attention Developer"),t.qZA()(),t.TgZ(4,"p"),t._uU(5," This table has no defined template for expandable rows. "),t.qZA(),t.TgZ(6,"p"),t._uU(7," Either define the row template or set expandableRows to false. "),t.qZA(),t.BQk())}function be(i,o){}const gt=function(i){return{$implicit:i}};function Me(i,o){if(1&i&&t.YNc(0,be,0,0,"ng-template",24),2&i){const e=t.oxw().$implicit,n=t.oxw();t.Q6J("ngTemplateOutlet",n.expandRowTemplate)("ngTemplateOutletContext",t.VKq(2,gt,e))}}function we(i,o){if(1&i&&(t.TgZ(0,"td",20)(1,"div",21),t.YNc(2,fe,8,0,"ng-container",22),t.YNc(3,Me,1,4,"ng-template",null,23,t.W1O),t.qZA()()),2&i){const e=o.$implicit,n=t.MAs(4),s=t.oxw();t.uIk("colspan",s.displayedColumns.length),t.xp6(1),t.Q6J("collapse",e!==s.expandedRow)("isAnimated",!0),t.xp6(1),t.Q6J("ngIf",!s.expandRowTemplate)("ngIfElse",n)}}function Pe(i,o){if(1&i&&(t.TgZ(0,"th",14)(1,"span"),t._uU(2),t.qZA()()),2&i){const e=t.oxw().$implicit;let n;t.ekj("table-col-sortable",e.options.isSortable),t.xp6(2),t.Oqu(null!==(n=e.options.displayValue)&&void 0!==n?n:e.value)}}function Oe(i,o){if(1&i&&(t.ynx(0),t._uU(1),t.BQk()),2&i){const e=t.oxw().$implicit,n=t.oxw().$implicit;t.xp6(1),t.hij(" ",e[n.value]," ")}}function xe(i,o){}function ve(i,o){if(1&i&&t.YNc(0,xe,0,0,"ng-template",24),2&i){const e=t.oxw().$implicit,n=t.oxw().$implicit;t.Q6J("ngTemplateOutlet",n.options.customCellTemplate)("ngTemplateOutletContext",t.VKq(2,gt,e[n.value]))}}function Se(i,o){if(1&i&&(t.TgZ(0,"td",16),t.YNc(1,Oe,2,1,"ng-container",22),t.YNc(2,ve,1,4,"ng-template",null,27,t.W1O),t.qZA()),2&i){const e=t.MAs(3),n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",!n.options.customCellTemplate)("ngIfElse",e)}}function ke(i,o){if(1&i&&(t.ynx(0)(1,25),t.YNc(2,Pe,3,3,"th",26),t.YNc(3,Se,4,2,"td",3),t.BQk()()),2&i){const e=o.$implicit;t.xp6(1),t.s9C("cdkColumnDef",e.value)}}function Te(i,o){1&i&&t._UZ(0,"tr",28)}function ye(i,o){if(1&i&&t._UZ(0,"tr",29),2&i){const e=o.$implicit,n=t.oxw();t.ekj("table-row-expandable",n.hasExpandableRows),t.uIk("data-testid","row_"+e.domain)}}function je(i,o){1&i&&t._UZ(0,"tr",31)}const De=function(){return["expandedDetail"]};function Ae(i,o){1&i&&(t.ynx(0),t.YNc(1,je,1,0,"tr",30),t.BQk()),2&i&&(t.xp6(1),t.Q6J("cdkRowDefColumns",t.DdM(1,De)))}function Ie(i,o){if(1&i&&(t.TgZ(0,"div",32),t._UZ(1,"cp-loading-spinner",33),t.ALo(2,"async"),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("isActive",t.lcZ(2,1,e.tableService.loading))}}function Ze(i,o){if(1&i&&(t.TgZ(0,"div",34),t._UZ(1,"td",35),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("innerHTML",e.noResultsReason,t.oJD)}}const Le=function(i,o){return{"table-bulk-actionable":i,"table-actionable":o}};let Je=(()=>{class i{constructor(e,n){this.locale=e,this.tableService=n,this.dataList=[],this.dataColumns=[],this.hasBulkActions=!1,this.hasExpandableRows=!1,this.displayedColumns=[],this.hasActions=!1,this.selection=new ut.Ov(!0,[])}get noResultsReason(){const e=this.tableService.loading.value,n=this.dataSource$.data.value.length,s=this.tableService.pagination?.recordsBeforeFilter;return e||n||s?e||n||!s?null:this.noQueryResultMessage||this.locale.maketext("No results match your query."):this.noResultsMessage||this.locale.maketext("No results available.")}isAllSelected(){return this.selection.selected.length===this.dataSource$.data.value.length}toggleAllRows(){this.isAllSelected()?this.selection.clear():this.selection.select(...this.dataSource$.data.value)}checkboxLabel(e){return e?this.selection.isSelected(e)?this.locale.maketext("Deselect row"):this.locale.maketext("Select row"):this.isAllSelected()?this.locale.maketext("Deselect all rows"):this.locale.maketext("Select all rows")}ngOnInit(){this.dataSource$=new Ct(this.dataList),this.refreshDisplayedColumns()}ngOnChanges(e){(e.dataColumns||e.hasBulkActions||e.hasExpandableRows)&&this.refreshDisplayedColumns(),e.dataList&&!e.dataList.firstChange&&(this.dataSource$?.data?this.dataSource$.data.next(this.dataList):this.dataSource$=new Ct(this.dataList))}refreshDisplayedColumns(){const e=this.dataColumns.map(n=>n.value);this.hasExpandableRows&&e.unshift("expandRowCol"),this.hasBulkActions&&e.unshift("bulkActionCol"),this.displayedColumns=e,this.hasActions=this.displayedColumns.includes("actions")||this.displayedColumns.includes("action-primary")}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(b.g),t.Y36(U))},i.\u0275cmp=t.Xpm({type:i,selectors:[["sitejet-table"]],inputs:{dataList:"dataList",dataColumns:"dataColumns",hasBulkActions:"hasBulkActions",hasExpandableRows:"hasExpandableRows",expandRowTemplate:"expandRowTemplate",noResultsMessage:"noResultsMessage",noQueryResultMessage:"noQueryResultMessage"},features:[t.TTD],decls:16,vars:13,consts:[["cdk-table","","multiTemplateDataRows","",1,"table","mb-0",3,"ngClass","dataSource"],["cdkColumnDef","bulkActionCol"],["cdk-header-cell","",4,"cdkHeaderCellDef"],["cdk-cell","",4,"cdkCellDef"],["cdkColumnDef","expandRowCol"],["cdk-cell","","class","table-cell-expand",3,"click",4,"cdkCellDef"],["cdkColumnDef","expandedDetail"],["cdk-cell","","class","p-0 border-top-0",4,"cdkCellDef"],[4,"ngFor","ngForOf"],["cdk-header-row","",4,"cdkHeaderRowDef"],["cdk-row","",3,"table-row-expandable",4,"cdkRowDef","cdkRowDefColumns"],[4,"ngIf"],["class","table__loading-container",4,"ngIf"],["class","table__no-results","id","emptySearchRow",4,"ngIf"],["cdk-header-cell",""],["type","checkbox",1,"form-check-input",3,"indeterminate","checked","change"],["cdk-cell",""],["type","checkbox",1,"form-check-input",3,"checked","click","change"],[1,"visually-hidden"],["cdk-cell","",1,"table-cell-expand",3,"click"],["cdk-cell","",1,"p-0","border-top-0"],[3,"collapse","isAnimated"],[4,"ngIf","ngIfElse"],["expandedCell",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"cdkColumnDef"],["cdk-header-cell","",3,"table-col-sortable",4,"cdkHeaderCellDef"],["customCellTemplate",""],["cdk-header-row",""],["cdk-row",""],["cdk-row","","class","example-detail-row",4,"cdkRowDef","cdkRowDefColumns"],["cdk-row","",1,"example-detail-row"],[1,"table__loading-container"],["id","loader",3,"isActive"],["id","emptySearchRow",1,"table__no-results"],[3,"innerHTML"]],template:function(e,n){1&e&&(t.TgZ(0,"table",0),t.ynx(1,1),t.YNc(2,he,2,3,"th",2),t.YNc(3,ue,2,2,"td",3),t.BQk(),t.ynx(4,4),t.YNc(5,ge,3,1,"th",2),t.YNc(6,Ce,1,1,"td",5),t.BQk(),t.ynx(7,6),t.YNc(8,we,5,5,"td",7),t.BQk(),t.YNc(9,ke,4,1,"ng-container",8),t.YNc(10,Te,1,0,"tr",9),t.YNc(11,ye,1,3,"tr",10),t.YNc(12,Ae,2,2,"ng-container",11),t.qZA(),t.YNc(13,Ie,3,3,"div",12),t.ALo(14,"async"),t.YNc(15,Ze,2,1,"div",13)),2&e&&(t.Q6J("ngClass",t.WLB(10,Le,n.hasBulkActions,n.hasActions))("dataSource",n.dataSource$),t.xp6(9),t.Q6J("ngForOf",n.dataColumns),t.xp6(1),t.Q6J("cdkHeaderRowDef",n.displayedColumns),t.xp6(1),t.Q6J("cdkRowDefColumns",n.displayedColumns),t.xp6(1),t.Q6J("ngIf",n.hasExpandableRows),t.xp6(1),t.Q6J("ngIf",t.lcZ(14,8,n.tableService.loading)),t.xp6(2),t.Q6J("ngIf",n.noResultsReason))},directives:[g.zC,d.mk,g.fo,g.D5,g.Af,g.O_,g.hD,H.Y,d.O5,d.tP,d.sg,g.s$,g.xN,g.Sq,g._J,a.go],pipes:[d.Ov],styles:["html,body{height:100%}:host{--cp-spacer-1: .25rem;--cp-spacer-2: .5rem;--cp-spacer-3: .75rem;--cp-spacer-4: 1rem;--cp-spacer-5: 1.25rem;--cp-spacer-6: 1.5rem;--cp-spacer-7: 1.75rem;--cp-spacer-8: 2rem;--cp-spacer-9: 2.5rem;--cp-spacer-10: 3rem}html[dir=ltr] .sitejet-cp-button--with-icon i,[dir=ltr] .sitejet-cp-button--with-icon i,:host([dir=ltr]) .sitejet-cp-button--with-icon i,:host-context(html[dir=ltr]) .sitejet-cp-button--with-icon i,:host-context([dir=ltr]) .sitejet-cp-button--with-icon i{padding-right:var(--cp-spacer-1)}html[dir=rtl] .sitejet-cp-button--with-icon i,[dir=rtl] .sitejet-cp-button--with-icon i,:host([dir=rtl]) .sitejet-cp-button--with-icon i,:host-context(html[dir=rtl]) .sitejet-cp-button--with-icon i,:host-context([dir=rtl]) .sitejet-cp-button--with-icon i{padding-left:var(--cp-spacer-1)}html[dir=ltr] .sitejet-cp-button--with-icon i.ri-external-link-line,[dir=ltr] .sitejet-cp-button--with-icon i.ri-external-link-line,:host([dir=ltr]) .sitejet-cp-button--with-icon i.ri-external-link-line,:host-context(html[dir=ltr]) .sitejet-cp-button--with-icon i.ri-external-link-line,:host-context([dir=ltr]) .sitejet-cp-button--with-icon i.ri-external-link-line{padding-right:0;padding-left:var(--cp-spacer-1)}html[dir=rtl] .sitejet-cp-button--with-icon i.ri-external-link-line,[dir=rtl] .sitejet-cp-button--with-icon i.ri-external-link-line,:host([dir=rtl]) .sitejet-cp-button--with-icon i.ri-external-link-line,:host-context(html[dir=rtl]) .sitejet-cp-button--with-icon i.ri-external-link-line,:host-context([dir=rtl]) .sitejet-cp-button--with-icon i.ri-external-link-line{padding-left:0;padding-right:var(--cp-spacer-1)}.sitejet-cp-button--with-icon button{display:inline-flex;justify-content:center;align-items:center}.icon-btn-link-text{text-transform:none}.toast-header{font-weight:600}.page-title-section>.breadcrumb{padding-top:var(--cp-spacer-2);font-size:1rem}.page-title-section>.breadcrumb .breadcrumb-separator{padding:0 var(--cp-spacer-1)}.sitejet-modal-header{font-size:1.25rem;margin:0}@media (max-width: 575.98px){.hidden-xs{display:none}}.table__loading-container{height:200px}.table__no-results{padding:var(--cp-spacer-3) var(--cp-spacer-1)}.cdk-column-action-primary button{width:100%}\n"],encapsulation:2,changeDetection:0}),i})();class Ct extends ut.o2{constructor(o){super(),this.data=new L.X(o)}connect(){return this.data}disconnect(){this.data.complete()}}const Re=["domainCell"],Ne=["infoCell"],Qe=["actionCell"],Ye=["actionPrimaryCell"];function Be(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"cp-button",18),t.NdJ("onBtnClick",function(){const r=t.CHM(e).$implicit;return t.oxw().viewSite(r)}),t.TgZ(1,"span",19),t._uU(2),t.qZA(),t._UZ(3,"i",20),t.qZA()}if(2&i){const e=o.$implicit,n=t.oxw();t.Q6J("buttonVariant",n.buttonVariant.iconLink)("buttonState",n.buttonState.enabled),t.uIk("data-testid","list-domains__view-site--"+e),t.xp6(2),t.Oqu(e)}}const y=function(i){return{$implicit:i}};function He(i,o){if(1&i&&(t.ynx(0),t.GkF(1,22),t.BQk()),2&i){const e=t.oxw().$implicit;t.oxw();const n=t.MAs(21);t.xp6(1),t.Q6J("ngTemplateOutlet",n)("ngTemplateOutletContext",t.VKq(2,y,e))}}function Fe(i,o){1&i&&t.YNc(0,He,2,4,"ng-container",21),2&i&&t.Q6J("ngIf",!o.$implicit.builderDisabled)}function qe(i,o){if(1&i&&(t.ynx(0),t.GkF(1,22),t.BQk()),2&i){const e=t.oxw().$implicit;t.oxw();const n=t.MAs(23);t.xp6(1),t.Q6J("ngTemplateOutlet",n)("ngTemplateOutletContext",t.VKq(2,y,e))}}function Ee(i,o){1&i&&t.YNc(0,qe,2,4,"ng-container",21),2&i&&t.Q6J("ngIf",!o.$implicit.builderDisabled)}function $e(i,o){if(1&i&&t.GkF(0,22)(1,22),2&i){const e=o.$implicit;t.oxw();const n=t.MAs(19),s=t.MAs(27),r=t.MAs(25);t.Q6J("ngTemplateOutlet",n)("ngTemplateOutletContext",t.VKq(4,y,e.info)),t.xp6(1),t.Q6J("ngTemplateOutlet",e.actions.isSitejet?s:r)("ngTemplateOutletContext",t.VKq(6,y,e.actions))}}function We(i,o){if(1&i&&t._UZ(0,"span",26),2&i){const e=t.oxw(3);t.Q6J("innerHtml",e.locale.maketext("You cannot create a Sitejet website currently because this domain shares its document root with another domain."),t.oJD)}}function Ue(i,o){if(1&i&&t._UZ(0,"span",26),2&i){const e=t.oxw(3);t.Q6J("innerHtml",e.locale.maketext("You cannot create a Sitejet website currently because this is a redirected domain."),t.oJD)}}function Ve(i,o){if(1&i&&(t.TgZ(0,"div",24),t.YNc(1,We,1,1,"span",25),t.YNc(2,Ue,1,1,"span",25),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",e.sharesDocRoot),t.xp6(1),t.Q6J("ngIf",e.isRedirect)}}function ze(i,o){1&i&&t.YNc(0,Ve,3,2,"div",23),2&i&&t.Q6J("ngIf",o.$implicit)}function Ge(i,o){if(1&i&&(t.ynx(0),t.GkF(1,22),t.BQk()),2&i){const e=t.oxw().$implicit;t.oxw();const n=t.MAs(25);t.xp6(1),t.Q6J("ngTemplateOutlet",n)("ngTemplateOutletContext",t.VKq(2,y,e))}}function Xe(i,o){if(1&i&&(t.ynx(0),t.GkF(1,22),t.BQk()),2&i){const e=t.oxw().$implicit;t.oxw();const n=t.MAs(27);t.xp6(1),t.Q6J("ngTemplateOutlet",n)("ngTemplateOutletContext",t.VKq(2,y,e))}}function Ke(i,o){if(1&i&&(t.TgZ(0,"div",27),t.YNc(1,Ge,2,4,"ng-container",21),t.YNc(2,Xe,2,4,"ng-container",21),t.qZA()),2&i){const e=o.$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngIf",!e.isSitejet&&!n.collapseActions),t.xp6(1),t.Q6J("ngIf",e.isSitejet&&!n.collapseActions)}}function tn(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"cp-button",30),t.NdJ("onBtnClick",function(){t.CHM(e);const s=t.oxw().$implicit;return t.oxw().editSite(s)}),t._UZ(1,"i",31)(2,"span",26),t.qZA()}if(2&i){const e=t.oxw().$implicit,n=t.oxw();t.Q6J("buttonVariant",n.buttonVariant.secondary)("buttonState",e.isLoading?n.buttonState.loading:n.buttonState.enabled),t.uIk("data-testid","list-domains__edit-button--"+e.domain),t.xp6(2),t.Q6J("innerHtml",n.locale.maketext("Edit Site"),t.oJD)}}function en(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"cp-button",34),t.NdJ("onBtnClick",function(){t.CHM(e);const s=t.oxw(2).$implicit;return t.oxw().continueEditing(s)}),t._UZ(1,"i",35),t._uU(2),t.qZA()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.Q6J("buttonVariant",n.buttonVariant.secondary)("buttonState",e.isLoading?n.buttonState.loading:n.buttonState.enabled),t.uIk("data-testid","list-domains__continue-button--"+e.domain),t.xp6(2),t.hij(" ",n.locale.maketext("Continue Editing")," ")}}function nn(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"cp-button",36),t.NdJ("onBtnClick",function(){t.CHM(e);const s=t.oxw(2).$implicit;return t.oxw().trySitejet(s)}),t._UZ(1,"i",35),t._uU(2),t.qZA()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.Q6J("buttonVariant",n.buttonVariant.secondary)("buttonState",e.builderDisabled?n.buttonState.disabled:e.isLoading?n.buttonState.loading:n.buttonState.enabled),t.uIk("data-testid","list-domains__try-button--"+e.domain),t.xp6(2),t.hij(" ",n.trySitejetButtonText," ")}}function on(i,o){if(1&i&&(t.ynx(0),t.YNc(1,en,3,4,"cp-button",32),t.YNc(2,nn,3,4,"cp-button",33),t.BQk()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",e.hasWebsite),t.xp6(1),t.Q6J("ngIf",!e.hasWebsite)}}function sn(i,o){if(1&i&&(t.TgZ(0,"div",28),t.YNc(1,tn,3,4,"cp-button",29),t.YNc(2,on,3,2,"ng-container",21),t.qZA()),2&i){const e=o.$implicit;t.xp6(1),t.Q6J("ngIf",e.isSitejet),t.xp6(1),t.Q6J("ngIf",!e.isSitejet)}}function an(i,o){if(1&i&&(t.ynx(0),t.GkF(1,22),t.BQk()),2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngTemplateOutlet",n.changeTemplateButton)("ngTemplateOutletContext",t.VKq(2,y,e))}}function rn(i,o){1&i&&t.YNc(0,an,2,4,"ng-container",21),2&i&&t.Q6J("ngIf",o.$implicit.hasTemplateId)}function ln(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"cp-button",37),t.NdJ("onBtnClick",function(){const r=t.CHM(e).$implicit;return t.oxw().goToDetails(r.domain)}),t._UZ(1,"i",38)(2,"span",39),t.qZA()}if(2&i){const e=o.$implicit,n=t.oxw();t.Q6J("buttonVariant",n.buttonVariant.iconLink)("buttonState",n.buttonState.enabled),t.uIk("data-testid","list-domains__details-link--"+e.domain),t.xp6(2),t.Q6J("innerHtml",n.locale.maketext("Details"),t.oJD)}}let cn=(()=>{class i{constructor(e,n,s,r,m,M,G,X,K,tt,et){this.deprefix=e,this.domainsApp=n,this.showSitejetDomains=s,this.canCreateDomains=r,this.apiService=m,this.breakpointObserver=M,this.notificationService=G,this.window=X,this.sitejetHelperService=K,this.tableService=tt,this.locale=et,this.buttonVariant=a.Wu,this.buttonState=a.BN,this.dataList=[],this.fetchingSsoLink=!1,this.collapseActions=!1,this.createDomainClicked=!1,this.destroySubject=new P.xQ,this.navigationAway=new P.xQ}onBeforeUnload(){this.navigationAway.next()}ngOnInit(){this.setTableRows(),this.breakpointObserver.observe([N.u3.Large,N.u3.XLarge]).pipe((0,j.R)(this.destroySubject)).subscribe(e=>{if(e.matches)return this.collapseActions=!1,void this.setTableColumns();this.collapseActions=!0,this.setTableColumnsCollapsed()})}ngOnDestroy(){this.destroySubject.next()}createClicked(){this.canCreateDomains?this.fetchingSsoLink||(this.createDomainClicked=!0,this.window.mixpanel?.track("Sitejet-CreateNewDomainClicked"),this.window.location.href=`${this.deprefix}${this.showSitejetDomains?this.domainsApp.url:this.domainsApp.oldUrl}#/create`):this.notificationService.add({type:a.k$.warning,message:this.locale.maketext("You have reached the maximum number of websites for this account. Contact your hosting provider to upgrade your account."),id:"list-domains__error--maxWebsites"})}onPaginatorChanged(e){this.fetchingSsoLink||e&&(this.tableService.pagination.currentPage=e.currentPage,this.tableService.pagination.currentPageSize=e.pageSize,this.setTableRows())}updateRows(){this.setTableRows()}viewSite(e){this.fetchingSsoLink||this.window.open(`https://${e}`,R.preview)}goToDetails(e){this.fetchingSsoLink||this.sitejetHelperService.goToDetailsView(e)}editSite(e){this.fetchingSsoLink||(this.window.mixpanel?.track("Sitejet-EditSite",{domain:e.domain,"primary-domain":this.sitejetHelperService.isPrimaryDomain(e.domain),"launched-from":"Sitejet Builder landing view"}),this.getSso(e))}filterRows(e){this.tableService.updateSearchFilter(p.domain,e),this.setTableRows()}continueEditing(e){this.fetchingSsoLink||(this.window.mixpanel?.track("Sitejet-ContinueEditing-Clicked",{domain:e.domain,"primary-domain":this.sitejetHelperService.isPrimaryDomain(e.domain),"launched-from":"Sitejet Builder landing view"}),this.getSso(e))}trySitejet(e){this.fetchingSsoLink||(this.window.mixpanel?.track("Sitejet-TrySitejet-Clicked",{domain:e.domain,"primary-domain":this.sitejetHelperService.isPrimaryDomain(e.domain),"launched-from":"Sitejet Builder landing view"}),this.getSso(e))}setTableColumns(){this.tableColumns=[new D(p.domain,{displayValue:this.locale.maketext("Website Name"),customCellTemplate:this.domainCell}),new D(p.info,{displayValue:"",customCellTemplate:this.infoCell}),new D(p.actions,{displayValue:this.locale.maketext("Actions"),customCellTemplate:this.actionCell}),new D(p.actionPrimary,{displayValue:"",customCellTemplate:this.actionPrimaryCell})]}setTableColumnsCollapsed(){this.tableColumns=[new D(p.domain,{displayValue:this.locale.maketext("Website Name"),customCellTemplate:this.domainCell}),new D(p.actionPrimary,{displayValue:this.locale.maketext("Actions"),customCellTemplate:this.actionPrimaryCell})]}getSso(e){if(!this.fetchingSsoLink){if(this.fetchingSsoLink=!0,e.isLoading=!0,!e.hasWebsite)return void this.handleNoWebsite(e);this.apiService.getSsoLink(e.domain,f.PROMPT).pipe((0,C.q)(1),(0,w.x)(()=>{this.fetchingSsoLink=!1,e.isLoading=!1})).subscribe({next:n=>{this.window.location.href=n.data},error:n=>{this.notificationService.add({type:a.k$.error,message:n.message,id:"list-domains__error--getSsoLink"})}})}}handleNoWebsite(e){this.apiService.createWebsite(e.domain,e.domain).pipe((0,C.q)(1),(0,T.b)(n=>this.apiService.getSsoLink(e.domain,f.PROMPT)),(0,w.x)(()=>{this.fetchingSsoLink=!1,e.isLoading=!1})).subscribe({next:n=>{this.window.location.href=n.data},error:n=>{e.isLoading=!1,this.notificationService.add({type:a.k$.error,message:n.message,id:"list-domains__error--getSsoLink"})}})}setTableRows(){this.tableService.loading.next(!0),this.dataList=[],this.apiService.getAllSitejetInfo({tableMetadata:this.tableService.getTableMetadata()}).pipe((0,j.R)(this.navigationAway)).pipe((0,w.x)(()=>this.tableService.loading.next(!1))).pipe((0,C.q)(1)).subscribe({next:e=>{const n=this.locale.maketext("Try Sitejet AI");this.trySitejetButtonText=n,this.tableService.pagination.totalItems=e?.meta?.totalRecords,this.dataList=e.processedData.map(s=>({...s,builderDisabled:s.redirection_enabled||s.shared_doc_root})).sort((s,r)=>s.domain.localeCompare(r.domain)).sort((s,r)=>Number(r.status.is_sitejet)-Number(s.status.is_sitejet)).sort((s,r)=>Number(r.status.has_sitejet_website)-Number(s.status.has_sitejet_website)).sort((s,r)=>Number(s.builderDisabled)-Number(r.builderDisabled)).map(s=>({status:s.status,[p.domain]:s.domain,[p.info]:{isRedirect:s.redirection_enabled,sharesDocRoot:s.shared_doc_root,docRoot:s.metadata.document_root},[p.actions]:{builderDisabled:s.builderDisabled,domain:s.domain,isSitejet:s.status.is_sitejet,hasWebsite:s.status.has_sitejet_website},[p.actionPrimary]:{builderDisabled:s.builderDisabled,domain:s.domain,isSitejet:s.status.is_sitejet,hasWebsite:s.status.has_sitejet_website,isLoading:!1}}))},error:e=>{this.notificationService.add({type:a.k$.error,message:e.message,id:"list-domains__error--getAllSitejetInfo"})}})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(q),t.Y36(ct),t.Y36(dt),t.Y36(pt),t.Y36(Y),t.Y36(N.Yg),t.Y36(a.gq),t.Y36(Window),t.Y36(B),t.Y36(U),t.Y36(b.g))},i.\u0275cmp=t.Xpm({type:i,selectors:[["sitejet-list-domains"]],viewQuery:function(e,n){if(1&e&&(t.Gf(Re,7),t.Gf(Ne,7),t.Gf(Qe,7),t.Gf(Ye,7)),2&e){let s;t.iGM(s=t.CRH())&&(n.domainCell=s.first),t.iGM(s=t.CRH())&&(n.infoCell=s.first),t.iGM(s=t.CRH())&&(n.actionCell=s.first),t.iGM(s=t.CRH())&&(n.actionPrimaryCell=s.first)}},hostBindings:function(e,n){1&e&&t.NdJ("beforeunload",function(){return n.onBeforeUnload()},!1,t.Jf7)},decls:28,vars:19,consts:[["id","description",1,"description"],[3,"innerHTML"],[1,"list-domains__pre-table-container"],["debounce","500","id","list-domains__search",3,"label","placeholder","valueChange"],["id","create",1,"sitejet-cp-button--with-icon",3,"buttonVariant","buttonState","onBtnClick"],[1,"ri-md","ri-add-fill"],[1,"ui-element"],[3,"dataColumns","dataList","hasExpandableRows","expandRowTemplate"],["domainCell",""],["actionCell",""],["actionPrimaryCell",""],["expandTemplate",""],["id","tablePagination",3,"currentPage","currentPageSize","pageSizeDisabled","pageSizeOptions","paginationDisabled","showPageSize","totalItems","paginatorChange"],["infoCell",""],["actionCellTemplate",""],["actionPrimaryCellTemplate",""],["collapsedActionsNonSitejet",""],["collapsedActionsSitejet",""],["id","list-domains__domain-btn",1,"sitejet-cp-button--with-icon",3,"buttonVariant","buttonState","onBtnClick"],[1,"icon-btn-link-text"],[1,"ri-md","ri-external-link-line"],[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","table__info-column",4,"ngIf"],[1,"table__info-column"],[3,"innerHtml",4,"ngIf"],[3,"innerHtml"],[1,"table__action-column"],[1,"table__primary-action-column"],["id","list-domains__edit-site","class","sitejet-cp-button--with-icon","cssClass","list-domains__btn-same-width",3,"buttonVariant","buttonState","onBtnClick",4,"ngIf"],["id","list-domains__edit-site","cssClass","list-domains__btn-same-width",1,"sitejet-cp-button--with-icon",3,"buttonVariant","buttonState","onBtnClick"],[1,"ri-md","ri-pencil-fill"],["id","list-domains__continue-editing","class","sitejet-cp-button--with-icon","cssClass","list-domains__btn-same-width",3,"buttonVariant","buttonState","onBtnClick",4,"ngIf"],["id","list-domains__try-sitejet","class","sitejet-cp-button--with-icon","cssClass","list-domains__btn-same-width",3,"buttonVariant","buttonState","onBtnClick",4,"ngIf"],["id","list-domains__continue-editing","cssClass","list-domains__btn-same-width",1,"sitejet-cp-button--with-icon",3,"buttonVariant","buttonState","onBtnClick"],[1,"ri-send-plane-fill"],["id","list-domains__try-sitejet","cssClass","list-domains__btn-same-width",1,"sitejet-cp-button--with-icon",3,"buttonVariant","buttonState","onBtnClick"],["id","list-domains__details",1,"sitejet-cp-button--with-icon",3,"buttonVariant","buttonState","onBtnClick"],[1,"ri-md","ri-list-check-2"],[1,"icon-btn-link-text",3,"innerHtml"]],template:function(e,n){if(1&e&&(t.TgZ(0,"section",0),t._UZ(1,"span",1),t.qZA(),t.TgZ(2,"section",2)(3,"cp-search",3),t.NdJ("valueChange",function(r){return n.filterRows(r)}),t.qZA(),t.TgZ(4,"cp-button",4),t.NdJ("onBtnClick",function(){return n.createClicked()}),t._UZ(5,"i",5)(6,"span",1),t.qZA()(),t.TgZ(7,"section",6)(8,"sitejet-table",7),t.YNc(9,Be,4,4,"ng-template",null,8,t.W1O),t.YNc(11,Fe,1,1,"ng-template",null,9,t.W1O),t.YNc(13,Ee,1,1,"ng-template",null,10,t.W1O),t.YNc(15,$e,2,8,"ng-template",null,11,t.W1O),t.qZA(),t.TgZ(17,"cp-paginator",12),t.NdJ("paginatorChange",function(r){return n.onPaginatorChanged(r)}),t.qZA()(),t.YNc(18,ze,1,1,"ng-template",null,13,t.W1O),t.YNc(20,Ke,3,2,"ng-template",null,14,t.W1O),t.YNc(22,sn,3,2,"ng-template",null,15,t.W1O),t.YNc(24,rn,1,1,"ng-template",null,16,t.W1O),t.YNc(26,ln,3,4,"ng-template",null,17,t.W1O)),2&e){const s=t.MAs(16);t.xp6(1),t.Q6J("innerHTML",n.locale.maketext("You can use this interface to view and manage your Sitejet domains. For more information, read our [output,url,_1,Sitejet Builder documentation,title,Sitejet Builder documentation,target,_2,class,cp-external-link].","https://go.cpanel.net/sitejet-builder","Sitejet Builder documentation"),t.oJD),t.xp6(2),t.Q6J("label",n.locale.maketext("Search websites"))("placeholder",n.locale.maketext("Search websites")),t.uIk("data-testid","list-domains__search"),t.xp6(1),t.Q6J("buttonVariant",n.buttonVariant.secondary)("buttonState",n.createDomainClicked?n.buttonState.loading:n.buttonState.enabled),t.uIk("data-testid","list-domains__create-button"),t.xp6(2),t.Q6J("innerHTML",n.locale.maketext("Create a New Website"),t.oJD),t.xp6(2),t.Q6J("dataColumns",n.tableColumns)("dataList",n.dataList)("hasExpandableRows",n.collapseActions)("expandRowTemplate",s),t.xp6(9),t.Q6J("currentPage",n.tableService.pagination.currentPage)("currentPageSize",n.tableService.pagination.currentPageSize)("pageSizeDisabled",n.tableService.pagination.pageSizeDisabled)("pageSizeOptions",n.tableService.pagination.pageSizeOptions)("paginationDisabled",n.tableService.pagination.paginationDisabled)("showPageSize",n.tableService.pagination.showPageSize)("totalItems",n.tableService.pagination.totalItems)}},directives:[a.gS,a.r0,Je,d.O5,d.tP,a.Jb],styles:["html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{height:100%}[_nghost-%COMP%]{--cp-spacer-1: .25rem;--cp-spacer-2: .5rem;--cp-spacer-3: .75rem;--cp-spacer-4: 1rem;--cp-spacer-5: 1.25rem;--cp-spacer-6: 1.5rem;--cp-spacer-7: 1.75rem;--cp-spacer-8: 2rem;--cp-spacer-9: 2.5rem;--cp-spacer-10: 3rem}html[dir=ltr][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{padding-right:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{padding-left:var(--cp-spacer-1)}html[dir=ltr][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%]{padding-right:0;padding-left:var(--cp-spacer-1)}html[dir=rtl][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .sitejet-cp-button--with-icon[_ngcontent-%COMP%] i.ri-external-link-line[_ngcontent-%COMP%]{padding-left:0;padding-right:var(--cp-spacer-1)}.sitejet-cp-button--with-icon[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:inline-flex;justify-content:center;align-items:center}.icon-btn-link-text[_ngcontent-%COMP%]{text-transform:none}.toast-header[_ngcontent-%COMP%]{font-weight:600}.page-title-section[_ngcontent-%COMP%] > .breadcrumb[_ngcontent-%COMP%]{padding-top:var(--cp-spacer-2);font-size:1rem}.page-title-section[_ngcontent-%COMP%] > .breadcrumb[_ngcontent-%COMP%] .breadcrumb-separator[_ngcontent-%COMP%]{padding:0 var(--cp-spacer-1)}.sitejet-modal-header[_ngcontent-%COMP%]{font-size:1.25rem;margin:0}@media (max-width: 575.98px){.hidden-xs[_ngcontent-%COMP%]{display:none}}.description[_ngcontent-%COMP%]{padding-bottom:var(--cp-spacer-5)}.list-domains__pre-table-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--cp-spacer-4)}.table__info-column[_ngcontent-%COMP%]{white-space:normal;font-size:.75rem;padding:0 var(--cp-spacer-3)}html[dir=ltr][_ngcontent-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], html[dir=ltr][_ngcontent-%COMP%] .table__action-column[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .table__action-column[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .table__action-column[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .table__action-column[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .table__action-column[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .table__action-column[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .table__action-column[_ngcontent-%COMP%]{text-align:right}html[dir=rtl][_ngcontent-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .table__primary-action-column[_ngcontent-%COMP%], html[dir=rtl][_ngcontent-%COMP%] .table__action-column[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .table__action-column[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .table__action-column[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .table__action-column[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .table__action-column[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .table__action-column[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .table__action-column[_ngcontent-%COMP%]{text-align:left}.table__action-column[_ngcontent-%COMP%]{white-space:nowrap}@media (max-width: 991.98px){.table__info-column[_ngcontent-%COMP%]{padding:var(--cp-spacer-3)}}@media (max-width: 767.98px){.list-domains__pre-table-container[_ngcontent-%COMP%]{flex-direction:column-reverse;gap:var(--cp-spacer-5);align-items:unset}}"]}),i})();var V=c(4139),ft=c(7418);let z=(()=>{class i{constructor(e,n,s,r){this.sitejetApiToken=e,this.loadingService=n,this.initService=s,this.router=r}resolve(e,n){return this.classRoute=e,this.initService.aiOption=n.url.includes(l.createAI)?f.AI:f.NONE,this.loadingService.startLoading(),this.initService.hasApiToken(this.sitejetApiToken)?this.withApiToken():this.noApiToken()}handleWebsiteData(e){return this.initService.processWebsiteData(e),(0,V.of)(!0)}noApiToken(){return this.initService.createAccount().pipe((0,T.b)(e=>(this.initService.setApiToken(e.data.key),this.withApiToken())),(0,ft.K)(e=>(this.loadingService.stopLoading(),this.initService.handleError(e),(0,V.of)(!1))))}withApiToken(){return this.initService.fetchAllWebsiteData({tableMetadata:{pager:{page:1,pageSize:2}}}).pipe((0,w.x)(()=>this.loadingService.stopLoading()),(0,T.b)(e=>this.handleWebsiteData(e)),(0,ft.K)(e=>(this.initService.handleError(e),(0,V.of)(!1))))}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(rt),t.LFG(J),t.LFG(E),t.LFG(_.F0))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const dn=[{path:l.create,component:mt},{path:l.createAI,resolve:{route:z},component:mt},{path:l.details,pathMatch:"prefix",children:[{path:"",redirectTo:l.view,pathMatch:"full"},{path:l.pleskPublish,component:_t,data:{breadcrumb:{id:l.details}}},{path:l.view,component:_t,data:{breadcrumb:{id:l.details}}},{path:"**",redirectTo:l.view,pathMatch:"full"}]},{path:l.list,component:cn,data:{breadcrumb:{id:l.list}}},{path:l.error,component:me},{path:`${l.pleskPublish}`,pathMatch:"prefix",redirectTo:`${l.details}/${l.pleskPublish}`},{path:`${l.pleskBack}`,redirectTo:`${l.list}`,pathMatch:"prefix"},{path:"",resolve:{route:z},pathMatch:"full"},{path:"**",resolve:{route:z},pathMatch:"full"}];let pn=(()=>{class i{constructor(e,n){this.locale=e,this.breadcrumbService=n;const s={[l.details]:{displayName:e.maketext("Website Details"),id:l.details,link:e.maketext("Edit your website details."),longName:e.maketext("Website Details"),path:`/${l.details}`,parentId:l.list},[l.list]:{displayName:e.maketext("Sitejet Websites"),id:l.list,link:e.maketext("View a list of your Sitejet websites."),longName:e.maketext("Sitejet Websites"),path:`/${l.list}`,parentId:""}};this.breadcrumbService.initializeBreadcrumbs(),this.breadcrumbService.flattenedRoutesData=Object.values(s)}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(b.g),t.LFG(a.pm))},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[[_.Bz.forRoot(dn,{useHash:!0,relativeLinkResolution:"legacy"})],_.Bz]}),i})();var mn=c(8132);function _n(i,o){if(1&i&&(t.TgZ(0,"div",3)(1,"span",4),t._uU(2),t.qZA(),t._UZ(3,"span",5),t.qZA()),2&i){const e=t.oxw();t.xp6(2),t.Oqu(e.locale.maketext("Loading \u2026"))}}let hn=(()=>{class i{constructor(e,n){this.locale=e,this.loadingService=n,this.title="sitejet",(0,mn.Dc)("bs5"),this.removeLegacyStyleSheets()}removeLegacyStyleSheets(){document.querySelector('link[href*="_assets/css/master"]')?.remove();const n=document.querySelector('link[href*="bootstrap.min.css"]'),s=document.querySelector('link[href*="cpanel_base.min.css"]'),r=document.querySelector('link[href*="ux-styles.min.css"]');n?.remove(),r?.remove(),s?.remove()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(b.g),t.Y36(J))},i.\u0275cmp=t.Xpm({type:i,selectors:[["sitejet-root"]],decls:5,vars:4,consts:[[1,"body-content"],[1,"section","animate-view","ng-cloak"],["class","app__spinner",4,"ngIf"],[1,"app__spinner"],[1,"visually-hidden"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"]],template:function(e,n){1&e&&(t._UZ(0,"cp-notification-list"),t.TgZ(1,"div",0),t._UZ(2,"router-outlet",1),t.qZA(),t.YNc(3,_n,4,1,"div",2),t.ALo(4,"async")),2&e&&(t.uIk("data-testid","appAlertList"),t.xp6(3),t.Q6J("ngIf",t.lcZ(4,2,null==n.loadingService?null:n.loadingService.loading$)))},directives:[a.ZP,_.lC,d.O5],pipes:[d.Ov],styles:[""]}),i})(),un=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i,bootstrap:[hn]}),i.\u0275inj=t.cJS({providers:[Y,Pt.a,B,E,J,U,{provide:Window,useValue:window},{provide:rt,useValue:window.PAGE.sitejetApiToken},{provide:F,useValue:window.PAGE.domainInfo},{provide:lt,useValue:window.PAGE.homeDir},{provide:q,useValue:window.PAGE.deprefix},{provide:ct,useValue:{url:"sitejet-domains/index.html",oldUrl:"domains/index.html"}},{provide:dt,useValue:window.PAGE.showSitejetDomains},{provide:pt,useValue:window.PAGE.canCreateDomains}],imports:[[a.hJ,a.u5,a.pR,wt.m,pn,a.wH,Mt.PW,Z.b2,g.HT,d.ez,bt.JF,a.zf,a.UX,a.t8,it.Iq,N.xu,x.UX,st.HC.forRoot(),Ot.mr.forRoot(),H.f.forRoot(),ot.zk.forRoot()]]}),i})();(0,t.G48)(),Z.q6().bootstrapModule(un).catch(i=>console.error(i))}},I=>{I.O(0,[647,534],()=>I(I.s=9557)),I.O()}]);
//# sourceMappingURL=main.3af9a323acb6c4b1.js.map
Back to Directory
File Manager