1"use strict";(self.webpackChunklightx=self.webpackChunklightx||[]).push([[7581],{87581:($e,U,p)=>{p.r(U),p.d(U,{AppUserModule:()=>Co});var l=p(60177),Y=p(83339),K=p(79421),k=p(84341),h=p(33391),T=p(53428),I=p(74710),E=p(10467),e=p(54438),g=p(16478),w=p(68010),A=p(74983),y=p(68064);const B=(o,c)=>({active:o,disabled:c}),Q=o=>({activetext:o});function J(o,c){1&o&&(e.j41(0,"span",19),e.nrm(1,"pi",20),e.k0s())}function W(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",12),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);return e.Njj(s.selectFolder(i))}),e.j41(1,"div",13)(2,"div",14),e.EFF(3),e.k0s()(),e.j41(4,"div",15)(5,"div",16),e.nrm(6,"input",17),e.DNE(7,J,2,0,"span",18),e.k0s()()()}if(2&o){const n=c.$implicit,t=e.XpG(2);e.FS9("id",n.assetId),e.Y8G("ngClass",e.l_i(8,B,n.assetId===t.selectedFolder.assetId&&!n.locked,n.locked)),e.R7$(2),e.Y8G("ngClass",e.eq3(11,Q,n.assetId===t.selectedFolder.assetId))("title",n.name),e.R7$(),e.JRh(n.name),e.R7$(3),e.Y8G("disabled",n.locked)("checked",n.assetId===t.selectedFolder.assetId),e.R7$(),e.Y8G("ngIf",n.locked)}}function Z(o,c){if(1&o&&(e.j41(0,"div")(1,"div",9)(2,"div",10),e.DNE(3,W,8,13,"div",11),e.k0s()()()),2&o){const n=e.XpG();e.R7$(3),e.Y8G("ngForOf",n.folders)}}let v=(()=>{var o;class c{constructor(t,i,s,r){this.activeModal=t,this.projectsService=i,this.authService=s,this.toastService=r,this.projectName="untitled",this.submit=!1,this.inProgress=!0,this.user=this.authService.currentUser(),this.folders=this.projectsService.folders}ngOnInit(){this.selectedFolder={assetId:this.selectedFolderId},this.leftSelectedFolder={assetId:this.selectedFolderId}}selectFolder(t){t.locked||(this.selectedFolder=t,this.inProgress=!1,this.selectedFolder.assetId==this.leftSelectedFolder.assetId&&(this.inProgress=!0))}move(){if(this.selectedFolder.assetId!=this.leftSelectedFolder.assetId){const t={folderId:this.selectedFolder.assetId,designIds:this.projectIds};this.inProgress=!0,this.projectsService.moveDesignsToFolder(t,i=>{this.activeModal.close("ok"),this.toastService.showSuccess(g.b.message.moveToFolderSuccess),this.inProgress=!1},i=>{this.inProgress=!1})}}}return(o=c).\u0275fac=function(t){return new(t||o)(e.rXU(h.Lw),e.rXU(T.i),e.rXU(w.u),e.rXU(A.f))},o.\u0275cmp=e.VBU({type:o,selectors:[["folder-list"]],inputs:{projectIds:"projectIds",selectedFolderId:"selectedFolderId"},decls:12,vars:2,consts:[[1,"move-folder","modal-header","border-0"],["id","modal-basic-title",1,"text-24","text-black","text-semi"],[1,"row","g-0"],[1,"col-sm-12"],[1,"card-body","pl-12","pr-12","pt-0"],[4,"ngIf"],[1,"move-folder","text-center","mt-10","mb-4"],["type","button",1,"btn","btn-outline-primary","text-13","btn-h40","me-2",3,"click"],["type","button",1,"btn","btn-primary","text-13","btn-h40",3,"click","disabled"],[1,"list-group","bg-transparent","ml-13","mr-13"],[1,"row","g-0","align-items-center"],["class","folder-name-box mt-3 mb-2",3,"id","ngClass","click",4,"ngFor","ngForOf"],[1,"folder-name-box","mt-3","mb-2",3,"click","id","ngClass"],[1,"col-lg-11","col-md-11","col-sm-11","col-11"],[1,"folder-name-text","folder-Name-move","text-semi",3,"ngClass","title"],[1,"col-lg-1","col-md-1","col-sm-1","col-1","p-0"],[1,"me-2"],["type","radio","name","folder","value","",1,"float-end",3,"disabled","checked"],["class","float-end","style","padding-top: 3px;right: 16px;\n position: absolute;",4,"ngIf"],[1,"float-end",2,"padding-top","3px","right","16px","position","absolute"],["name","proicon",2,"margin-left","14px"]],template:function(t,i){1&t&&(e.j41(0,"div",0)(1,"span",1),e.EFF(2," Move to folder"),e.k0s()(),e.j41(3,"div",2)(4,"div",3)(5,"div",4),e.DNE(6,Z,4,1,"div",5),e.k0s()()(),e.j41(7,"div",6)(8,"button",7),e.bIt("click",function(){return i.activeModal.dismiss("Cross click")}),e.EFF(9,"Cancel"),e.k0s(),e.j41(10,"button",8),e.bIt("click",function(){return i.move()}),e.EFF(11,"Next"),e.k0s()()),2&t&&(e.R7$(6),e.Y8G("ngIf",i.folders),e.R7$(4),e.Y8G("disabled",i.inProgress))},dependencies:[l.YU,l.Sq,l.bT,y.b],styles:['.modal-title[_ngcontent-%COMP%]{font-size:24px;color:#000;font-weight:600}.card1[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:0 solid #f6f6f6;border-radius:16px}.folder-name-box[_ngcontent-%COMP%]{position:relative;border-radius:12px;color:#000;background:#e2e3e94d;width:100%;height:40px;border:2px solid transparent;cursor:pointer;font-size:12px;font-weight:400;display:flex;align-items:center}.folder-name-box.active[_ngcontent-%COMP%]{font-weight:600;background:#e2e3e94d 0% 0% no-repeat padding-box;border:2px solid #626ADF;color:#626adf;font-size:14px}.radiobtn[_ngcontent-%COMP%]{float:left;margin-top:4px}
1.folder-name[_ngcontent-%COMP%]{margin-left:45px}@supports (-webkit-appearance: none) or (-moz-appearance: none){input[type=radio][_ngcontent-%COMP%]{--active: #626ADF;--active-inner: #626ADF;--focus: 2px rgba(39, 94, 254, .3);--border: none;--border-hover: #9EABFF;--background: none;--disabled: #060607;--disabled-inner: #E1E6F9;-webkit-appearance:none;-moz-appearance:none;height:24px;width:24px;outline:none;display:inline-block;vertical-align:top;position:relative;margin:0;cursor:pointer;border:2px solid var(--bc, var(--border));background:var(--bc, var(--border))}input[type=radio][_ngcontent-%COMP%]:after{content:"";display:block;left:0;top:0;position:absolute;transition:transform var(--d-t, .3s) var(--d-t-e, ease),opacity var(--d-o, .2s)}input[type=radio][_ngcontent-%COMP%]:checked{--bc: var(--active);--d-o: .3s;--d-t: .6s;--d-t-e: cubic-bezier(.2, .85, .32, 1.2)}input[type=radio][_ngcontent-%COMP%]:not(.switch):after{opacity:var(--o, 0)}input[type=radio][_ngcontent-%COMP%]:not(.switch):checked{--o: 1}input[type=radio][_ngcontent-%COMP%]:not(.switch){border-radius:6px}input[type=radio][_ngcontent-%COMP%]:not(.switch):after{width:7px;height:12px;border:2px solid #fff;border-top:0;border-left:0;left:6px;top:3px;transform:rotate(var(--r, 43deg))}input[type=radio][_ngcontent-%COMP%]:not(.switch):checked{--r: 43deg}input[type=radio].switch[_ngcontent-%COMP%]{width:38px;border-radius:11px}input[type=radio].switch[_ngcontent-%COMP%]:after{left:2px;top:2px;border-radius:50%;width:15px;height:15px;background:var(--ab, var(--border));transform:translate(var(--x, 0))}input[type=radio].switch[_ngcontent-%COMP%]:checked{--ab: var(--active);--x: 17px;background:var(--active)}}.folder-name-text[_ngcontent-%COMP%]{font-weight:600;font-size:14px;margin-left:10px;overflow:hidden;width:100%}.folder-name-text.activetext[_ngcontent-%COMP%]{font-weight:600;color:#626adf;margin-left:6px}.card-body[_ngcontent-%COMP%]{max-height:320px;overflow-y:scroll}[_ngcontent-%COMP%]::-webkit-scrollbar{width:4px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 5px #b0b3bf;border-radius:4px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#626adf;border-radius:4px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#626adf}.folder-Name-move[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}']}),c})();var j=p(81947),b=p(20999),f=p(28662),u=p(68887);let x=(()=>{var o;class c{constructor(t,i,s,r,a){this.activeModal=t,this.projectsService=i,this.authService=s,this.toastService=r,this.projectSyncService=a,this.projectName="untitled",this.submit=!1,this.inProgress=!1,this.user=this.authService.currentUser(),this.folders=this.projectsService.folders}ngOnInit(){this.selectedFolder={assetId:this.selectedFolderId},this.selectedImage={assetId:this.projectIds},this.imgName=this.projectName}selectFolder(t){this.selectedFolder=t}renameProjectName(t){if("img_edits"===this.assetType)if(t.trim()&&t.trim()!==this.projectName.trim()){this.inProgress=!0;let i={assetId:this.selectedImage.assetId,name:t.trim()};this.projectSyncService.updatePhotoEditProjectName(i,s=>{"SUCCESS"==s.status&&(this.toastService.showSuccess(g.b.message.saveSuccess),this.activeModal.close(t.trim()),this.inProgress=!1)},s=>{this.toastService.showError(s.description||s.message),this.activeModal.close(),this.inProgress=!1})}else this.toastService.showSuccess(g.b.message.saveSuccess),this.activeModal.close(t.trim()),this.inProgress=!1;else if(t.trim()&&t.trim()!==this.projectName.trim()){this.inProgress=!0;let i={assetId:this.selectedImage.assetId,name:t.trim()};this.projectSyncService.updateDesign(i,s=>{"SUCCESS"==s.status&&(this.toastService.showSuccess(g.b.message.saveSuccess),this.activeModal.close(t.trim()),this.inProgress=!1)},s=>{this.toastService.showError(s.description||s.message),this.activeModal.close(),this.inProgress=!1})}else this.toastService.showSuccess(g.b.message.saveSuccess),this.activeModal.close(t.trim()),this.inProgress=!1}onKeyup(t){this.inProgress=!t.target.value.trim()}}return(o=c).\u0275fac=function(t){return new(t||o)(e.rXU(h.Lw),e.rXU(T.i),e.rXU(w.u),e.rXU(A.f),e.rXU(u.A))}
1,o.\u0275cmp=e.VBU({type:o,selectors:[["rename-image"]],inputs:{projectName:"projectName",projectIds:"projectIds",selectedFolderId:"selectedFolderId",assetType:"assetType"},decls:20,vars:2,consts:[["nameInput",""],[1,"modal-header","border-0","modal-header","border-0","mt-2","justify-content-center"],["id","modal-basic-title",1,"modal-title1"],[1,"row","g-0"],[1,"col-sm-12"],[1,"card1"],[1,"card-body","pl-10","pr-10","pt-0"],[1,"create-project"],[1,"form-group","mb-10"],[1,"list-group","bg-transparent","ms-5","me-5"],[1,"col-lg-12","col-md-12","col-sm-12","col-12"],["type","text","name","rename","maxlength","40",1,"",3,"keyup","keyup.enter","value"],[1,"text-center","mb-4"],["type","button",1,"btn-all","btn-outline-primary","text-13","btn-h40","mr-8",3,"click"],["type","button",1,"btn","btn-primary","text-13","btn-h40",3,"click","disabled"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"div",1)(1,"span",2),e.EFF(2," Rename Project"),e.k0s()(),e.j41(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7)(8,"div",8)(9,"div")(10,"div",9)(11,"div",3)(12,"div",10)(13,"input",11,0),e.bIt("keyup",function(a){return e.eBV(s),e.Njj(i.onKeyup(a))})("keyup.enter",function(){e.eBV(s);const a=e.sdS(14);return e.Njj(i.renameProjectName(a.value))}),e.k0s()()()()()(),e.j41(15,"div",12)(16,"button",13),e.bIt("click",function(){return e.eBV(s),e.Njj(i.activeModal.dismiss("Cross click"))}),e.EFF(17,"Cancel"),e.k0s(),e.j41(18,"button",14),e.bIt("click",function(){e.eBV(s);const a=e.sdS(14);return e.Njj(i.renameProjectName(a.value))}),e.EFF(19,"Rename"),e.k0s()()()()()()()}2&t&&(e.R7$(13),e.FS9("value",i.imgName),e.R7$(5),e.Y8G("disabled",i.inProgress))},styles:[".modal-title1[_ngcontent-%COMP%]{font-weight:600;color:#000;font-size:24px;line-height:1}input[type=text][_ngcontent-%COMP%]{width:100%;padding:0 20px;margin:0 0 8px;display:inline-block;border:1px solid transparent;border-radius:12px;box-sizing:border-box;background:#626adf1a;height:40px;font-size:14px;font-weight:400;color:#000}input[type=text][_ngcontent-%COMP%]:focus{outline:none}"]}),c})();var R=p(6421),O=p(24886),ue=p(33726),_e=p(70152),he=p(23294),ee=p(79774),Xe=p(30198),D=p(16471),L=p(94223),Ue=p(45312),Ye=p(55697),fe=p(94896),Be=p(97410),S=p(54321),Le=p(55349),ve=p(49449),te=p(41300),He=p(32764),ze=p(6755),ie=p(68287),qe=p(11497),H=p(90521),Ke=p(32452),Qe=p(22154),be=p(79301),ne=p(10634),Pe=p(46212),Ce=p(39385),xe=p(41845),oe=p(60004),je=p(33645),ke=p(82853),se=p(86820);const Je=["container"],N=o=>({active:o}),V=(o,c)=>({"text-primary":o,"grey-300":c}),We=o=>({disabled:o}),G=o=>({"d-none":o}),Ze=o=>({"pe-none":o}),et=(o,c,n,t)=>({"image-popup":o,"selected-image":c,"dropdown-hover":n,"img-format-a h-auto-img":t}),z=o=>({show:o}),tt=(o,c)=>({"c-img-err":o,"c-img-width":c}),Ie=o=>({imgPortrait:o}),it=o=>({"icon-pos1":o}),we=(o,c,n)=>({"image-popup":o,"selected-image":c,"dropdown-hover":n}),ye=o=>({"c-img-err":o}),Me=o=>({disableDiv:o}),nt=(o,c)=>({"selected-image":o,"dropdown-hover":c});function ot(o,c){1&o&&(e.j41(0,"span"),e.nrm(1,"pi",53),e.k0s())}function st(o,c){1&o&&(e.j41(0,"span"),e.nrm(1,"pi",71),e.k0s())}function rt(o,c){if(1&o){const n=e.RV6();e.j41(0,"li")(1,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.editFolderName(i))}),e.nrm(2,"pi",72),e.EFF(3,"Rename "),e.k0s()()}}function at(o,c){if(1&o){const n=e.RV6();e.j41(0,"li",54)(1,"div",55),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);return e.Njj(s.getFolderDetails(i))}),e.j41(2,"span",56),e.EFF(3),e.k0s(),e.DNE(4,st,2,0,"span",31),e.j41(5,"span",57)(6,"div",58)(7,"div",59)(8,"button",60),e.nrm(9,"pi",61),e.k0s(),e.j41(10,"div",62)(11,"ul"),e.DNE(12,rt,4,0,"li",31),e.j41(13,"li")(14,"a",63),e.bIt("click",function(){const i=e.eBV(n),s=i.$implicit,r=i.index,a=e.XpG(2);return e.Njj(a.deleteFolder(s,r))}),e.nrm(15,"pi",64),e.EFF(16,"Delete "),e.k0s()()()()()()()(),e.j41(17,"div",65)(18,"input",66),e.bIt("blur",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);return e.Njj(s.saveFolderName(i))}),e.mxI("ngModelChange",function(i){const s=e.eBV(n).$implicit;return e.DH7(s.name,i)||(s.name=i),e.Njj(i)}),e.bIt("keyup",function(i){e.eBV(n);const s=e.XpG(2);return e.Njj(s.changeName(i))})("keyup.enter",function(){const i=e.eBV(n).$implicit,s=e.XpG(2);
1return e.Njj(s.saveFolderName(i))}),e.k0s(),e.j41(19,"div",67)(20,"div",68)(21,"button",69),e.nrm(22,"pi",70),e.k0s()()()()()}if(2&o){const n=c.$implicit,t=e.XpG(2);e.Y8G("ngClass",e.eq3(13,N,n.assetId===t.selectedFolder.assetId&&-1===t.templateType)),e.R7$(),e.xc7("display",n.isEdit?"none":"flex"),e.Y8G("ngClass",e.eq3(15,Ze,t.inProgress)),e.R7$(2),e.JRh(n.name),e.R7$(),e.Y8G("ngIf",n.locked&&!t.isSubscribed),e.R7$(8),e.Y8G("ngIf",!n.isEdit&&!n.locked),e.R7$(5),e.xc7("display",n.isEdit?"flex":"none"),e.R7$(),e.Mz_("id","input-",n.assetId,""),e.R50("ngModel",n.name),e.R7$(3),e.Y8G("disabled",!t.designTitle)}}function ct(o,c){1&o&&(e.j41(0,"span",87),e.EFF(1,"Select all"),e.k0s())}function lt(o,c){1&o&&(e.j41(0,"span",87),e.EFF(1,"Deselect all"),e.k0s())}function dt(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",73)(1,"div",74)(2,"div",75)(3,"button",76),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.markAllProject(!0))}),e.nrm(4,"pi",77),e.k0s()(),e.j41(5,"div",78),e.EFF(6),e.k0s(),e.j41(7,"div",79)(8,"div",80)(9,"input",81),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.markAllProject(i.isSelectAll))}),e.k0s()(),e.DNE(10,ct,2,0,"span",82)(11,lt,2,0,"span",82),e.k0s()(),e.j41(12,"div",74)(13,"div")(14,"button",83),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.moveMultipleProjects())}),e.nrm(15,"pi",84),e.EFF(16,"Move To Folder "),e.k0s(),e.j41(17,"button",85),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.deleteMarkedProjects())}),e.nrm(18,"pi",86),e.EFF(19,"Delete "),e.k0s()()()()}if(2&o){const n=e.XpG(2);e.Y8G("ngClass",e.eq3(6,G,n.markedProjects.length<1)),e.R7$(6),e.SpI("",n.markedProjects.length," items selected"),e.R7$(3),e.Y8G("checked",n.isSelectAll),e.R7$(),e.Y8G("ngIf",!n.isSelectAll),e.R7$(),e.Y8G("ngIf",n.isSelectAll),e.R7$(3),e.Y8G("disabled",n.folders&&0===n.folders.length)}}function pt(o,c){1&o&&(e.j41(0,"span",87),e.EFF(1,"Select all"),e.k0s())}function mt(o,c){1&o&&(e.j41(0,"span",87),e.EFF(1,"Deselect all"),e.k0s())}function gt(o,c){1&o&&(e.j41(0,"div",93)(1,"span",94),e.EFF(2,"Loading..."),e.k0s()())}function ut(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Download"),e.k0s())}function _t(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Downloading..."),e.k0s())}function ht(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",73)(1,"div",74)(2,"div",75)(3,"button",88),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.markAllProject(!0))}),e.nrm(4,"pi",77),e.k0s()(),e.j41(5,"div",78),e.EFF(6),e.k0s(),e.j41(7,"div",79)(8,"div",80)(9,"input",81),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.markAllProject(i.isSelectAll))}),e.k0s()(),e.DNE(10,pt,2,0,"span",82)(11,mt,2,0,"span",82),e.k0s()(),e.j41(12,"div",74)(13,"div")(14,"button",89),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.deleteMarkedProjects())}),e.nrm(15,"pi",86),e.EFF(16,"Delete "),e.k0s()(),e.j41(17,"div")(18,"button",90),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.downloadAll())}),e.DNE(19,gt,3,0,"div",91),e.nrm(20,"pi",92),e.DNE(21,ut,2,0,"span",31)(22,_t,2,0,"span",31),e.k0s()()()()}if(2&o){const n=e.XpG(2);e.Y8G("ngClass",e.eq3(8,G,n.markedProjects.length<1)),e.R7$(6),e.SpI("",n.markedProjects.length," items selected"),e.R7$(3),e.Y8G("checked",n.isSelectAll),e.R7$(),e.Y8G("ngIf",!n.isSelectAll),e.R7$(),e.Y8G("ngIf",n.isSelectAll),e.R7$(8),e.Y8G("ngIf",n.inDownloadProgress),e.R7$(2),e.Y8G("ngIf",!n.inDownloadProgress),e.R7$(),e.Y8G("ngIf",n.inDownloadProgress)}}function ft(o,c){1&o&&(e.j41(0,"div",95)(1,"div",96),e.nrm(2,"div",97)(3,"div",97)(4,"div",97)(5,"div",97)(6,"div",97),e.k0s()())}function vt(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",98),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.createProjectFromScratch())}),e.j41(1,"div",99),e.nrm(2,"img",100),e.k0s(),e.j41(3,"div",101)(4,"span",102),e.EFF(5,"Create New"),e.k0s()(),e.j41(6,"div",103),e.nrm(7,"pi",104),e.k0s()()}if(2&o){const n=e.XpG(2);e.xc7("margin-left",n.thumbLeftMargin,"px")("margin-right",n.thumbRightMargin,"px"),e.Y8G("ngClass",e.eq3(5,G,n.projectList&&0===n.projectList.length||-1==n.templateType))}}function bt(o,c){if(1&o&&(e.j41(0,"div",102),e.EFF(1),e.nI1(2,"date"),e.k0s()),2&o){const n=e.XpG(2).$implicit;e.R7$(),e.SpI(" Updated on ",e.i5U(2,1,n.updatedTimestamp,"d MMM yyyy")," ")}}function Pt(o,c){if(1&o&&(e.j41(0,"div",102),e.EFF(1),e.nI1(2,"date"),e.k0s()),2&o){const n=e.XpG(2).$implicit;e.R7$(),e.SpI(" Updated on ",e.i5U(2,1,n.updatedTimestamp,"d MMM")," ")}}function Ct(o,c){if(1&o&&(e.j41(0,"div",135),e.EFF(1),e.k0s()),2&o){const n=e.XpG(2).$implicit;e.R7$(),e.JRh(null==n?null:n.name)}}function xt(o,c){if(1&o&&(e.j41(0,"div",136)(1,"span",137),e.nrm(2,"pi",138),e.k0s()()),2&o){e.XpG(4);const n=e.sdS(4);e.R7$(),e.Y8G("ngbPopover",n)}}function jt(o,c){1&o&&e.nrm(0,"pi",139)}function kt(o,c){if(1&o&&(e.j41(0,"span",140),e.nrm(1,"pi",141),e.k0s()),2&o){const n=e.XpG(2).$implicit;e.Y8G("ngClass",e.eq3(1,it,4===n.templateType))}}function It(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",108,4),e.bIt("click",function(){e.eBV(n);const i=e.XpG(),s=i.$implicit,r=i.index,a=e.XpG(2);return e.Njj(a.imageOnClick(r,s))}),e.j41(2,"div",109)(3,"div",110)(4,"div",111)(5,"input",112),e.bIt("click",function(i){e.eBV(n);const s=e.XpG().$implicit,r=e.XpG(2);return e.Njj(r.markProject(s,i))}),e.k0s()()(),e.j41(6,"div",113)(7,"div",114,5),e.bIt("openChange",function(i){e.eBV(n);const s=e.sdS(8),r=e.XpG().index,a=e.XpG(2);return e.Njj(a.checkDropDown(i,s,r))}),e.j41(9,"button",115),e.nrm(10,"pi",116),e.k0s(),e.j41(11,"div",117)(12,"ul")(13,"li")(14,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.editImageName(i))}),e.nrm(15,"pi",72),e.EFF(16,"Rename "),e.k0s()(),e.j41(17,"li")(18,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.duplicate(i))}),e.nrm(19,"pi",118),e.EFF(20,"Duplicate "),e.k0s()(),e.j41(21,"li")(22,"a",119),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.move(i))}),e.nrm(23,"pi",120),e.EFF(24,"Move to Folder "),e.k0s()(),e.j41(25,"li")(26,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.moveToTrash(i))}),e.nrm(27,"pi",64),e.EFF(28,"Delete "),e.k0s()()()()()()(),e.j41(29,"div",121)(30,"div",122),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.loadProject(i))}),e.j41(31,"div",123)(32,"img",124),e.bIt("error",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.errorOnImg(i))}),e.k0s(),e.j41(33,"div",125)(34,"div",126),e.DNE(35,bt,3,4,"div",127)(36,Pt,3,4,"ng-template",null,6,e.C5r),e.k0s()(),e.j41(38,"div",128)(39,"div",129),e.DNE(40,Ct,2,1,"div",130),e.k0s(),e.nrm(41,"div",131),e.k0s()()()(),e.DNE(42,xt,3,1,"div",132)(43,jt,1,0,"pi",133)(44,kt,2,3,"span",134),e.k0s()}
1if(2&o){const n=e.sdS(37),t=e.XpG(),i=t.$implicit,s=t.index,r=e.XpG(2);e.xc7("margin-left",r.thumbLeftMargin,"px")("margin-right",r.thumbRightMargin,"px"),e.Y8G("ngClass",e.ziG(21,et,r.imagePopup,r.activeImageIndex==s&&1==r.isDropDownOpen,1==r.isDropDownOpen,(null==i.properties?null:i.properties.format)>15)),e.R7$(4),e.Y8G("ngClass",e.eq3(26,z,r.markedProjects.length>0)),e.R7$(),e.Y8G("checked",null==i?null:i.checked),e.R7$(2),e.Y8G("ngClass",e.eq3(28,G,r.markedProjects.length>0)),e.R7$(15),e.Y8G("disabled",r.folders&&0===r.folders.length),e.R7$(7),e.muq("background: url(",i.thumbUrl,") no-repeat; background-size: cover;height: 100%;"),e.R7$(),e.Y8G("ngClass",e.l_i(30,tt,i.originalThumbUrl,"img_edits"==i.assetType)),e.R7$(2),e.FS9("src",i.thumbUrl,e.B4B),e.Y8G("ngClass",e.eq3(33,Ie,(null==i||null==i.properties?null:i.properties.height)>(null==i||null==i.properties?null:i.properties.width)||"3"==(null==i||null==i.properties?null:i.properties.originalFormat))),e.R7$(3),e.Y8G("ngIf",(null==i?null:i.name)&&i.displayTimestamp)("ngIfElse",n),e.R7$(5),e.Y8G("ngIf",null==i?null:i.name),e.R7$(2),e.Y8G("ngIf",r.selectedFolder.locked&&!r.isSubscribed),e.R7$(),e.Y8G("ngIf",1==(null==i||null==i.properties?null:i.properties.pro)&&!r.isSubscribed),e.R7$(),e.Y8G("ngIf",2===i.templateType||4===i.templateType)}}function wt(o,c){if(1&o&&(e.j41(0,"div",102),e.EFF(1),e.nI1(2,"date"),e.k0s()),2&o){const n=e.XpG(2).$implicit;e.R7$(),e.SpI(" Updated on ",e.i5U(2,1,n.updatedDate,"d MMM yyyy")," ")}}function yt(o,c){if(1&o&&(e.j41(0,"div",102),e.EFF(1),e.nI1(2,"date"),e.k0s()),2&o){const n=e.XpG(2).$implicit;e.R7$(),e.SpI(" Updated on ",e.i5U(2,1,n.updatedDate,"d MMM")," ")}}function Mt(o,c){if(1&o&&(e.j41(0,"div",135),e.EFF(1),e.k0s()),2&o){const n=e.XpG(2).$implicit;e.R7$(),e.JRh(null==n?null:n.name)}}function Tt(o,c){if(1&o&&(e.j41(0,"div",136)(1,"span",137),e.nrm(2,"pi",138),e.k0s()()),2&o){e.XpG(4);const n=e.sdS(4);e.R7$(),e.Y8G("ngbPopover",n)}}function Ot(o,c){1&o&&e.nrm(0,"span",150)}function St(o,c){1&o&&(e.j41(0,"span",151),e.nrm(1,"pi",141),e.k0s())}function Gt(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",142,4),e.bIt("click",function(){e.eBV(n);const i=e.XpG(),s=i.$implicit,r=i.index,a=e.XpG(2);return e.Njj(a.imageOnClick(r,s))}),e.j41(2,"div",143)(3,"div",110)(4,"div",111)(5,"input",112),e.bIt("click",function(i){e.eBV(n);const s=e.XpG().$implicit,r=e.XpG(2);return e.Njj(r.markProject(s,i))}),e.k0s()()(),e.j41(6,"div",113)(7,"div",114,5),e.bIt("openChange",function(i){e.eBV(n);const s=e.sdS(8),r=e.XpG().index,a=e.XpG(2);return e.Njj(a.checkDropDown(i,s,r))}),e.j41(9,"button",115),e.nrm(10,"pi",116),e.k0s(),e.j41(11,"div",117)(12,"ul")(13,"li")(14,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.openInsprrationsEditDialog(i))}),e.nrm(15,"pi",144),e.EFF(16,"Change with AI "),e.k0s()(),e.j41(17,"li")(18,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.editImageName(i))}),e.nrm(19,"pi",72),e.EFF(20,"Rename "),e.k0s()(),e.j41(21,"li")(22,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.download(null==i||null==i.metadata?null:i.metadata.contentUrl,"",null==i?null:i.contentType))}),e.nrm(23,"pi",145),e.EFF(24,"Download "),e.k0s()(),e.j41(25,"li")(26,"a",119),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.move(i))}),e.nrm(27,"pi",120),e.EFF(28,"Move to Folder "),e.k0s()(),e.j41(29,"li")(30,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.deletePhotoEdits(i))}),e.nrm(31,"pi",64),e.EFF(32,"Delete "),e.k0s()()()()()()(),e.j41(33,"div",121)(34,"div",122),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.loadProject(i))}),e.j41(35,"div",146)(36,"div")(37,"img",147),e.bIt("error",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.errorOnImg(i))}),e.k0s()(),e.j41(38,"div",125)(39,"div",126),e.DNE(40,wt,3,4,"div",127)(41,yt,3,4,"ng-template",null,6,e.C5r),e.k0s()(),e.j41(43,"div",128)(44,"div",129),e.DNE(45,Mt,2,1,"div",130),e.k0s(),e.nrm(46,"div",131),e.k0s()()()(),e.DNE(47,Tt,3,1,"div",132)(48,Ot,1,0,"span",148)(49,St,2,0,"span",149),e.k0s()}
1if(2&o){const n=e.sdS(42),t=e.XpG(),i=t.$implicit,s=t.index,r=e.XpG(2);e.xc7("margin-left",r.thumbLeftMargin,"px")("margin-right",r.thumbRightMargin,"px"),e.Y8G("ngClass",e.sMw(22,we,r.imagePopup,r.activeImageIndex==s&&1==r.isDropDownOpen,1==r.isDropDownOpen)),e.R7$(4),e.Y8G("ngClass",e.eq3(26,z,r.markedProjects.length>0)),e.R7$(),e.Y8G("checked",null==i?null:i.checked),e.R7$(2),e.Y8G("ngClass",e.eq3(28,G,r.markedProjects.length>0)),e.R7$(19),e.Y8G("disabled",r.folders&&0===r.folders.length),e.R7$(7),e.muq("background: url(",i.thumbUrl,") no-repeat; background-size: cover;height: 100%;"),e.R7$(),e.Y8G("ngClass",e.eq3(30,ye,i.originalThumbUrl)),e.R7$(),e.Y8G("ngClass",e.eq3(32,Me,i.assetId==r.disableAssetId)),e.R7$(2),e.Y8G("ngClass",e.eq3(34,Ie,(null==i||null==i.metadata?null:i.metadata.height)>(null==i||null==i.metadata?null:i.metadata.width)))("src",i.thumbUrl||i.metadata.contentUrl,e.B4B),e.R7$(3),e.Y8G("ngIf",(null==i?null:i.name)&&i.displayTimestamp)("ngIfElse",n),e.R7$(5),e.Y8G("ngIf",null==i?null:i.name),e.R7$(2),e.Y8G("ngIf",r.selectedFolder.locked&&!r.isSubscribed),e.R7$(),e.Y8G("ngIf",1==(null==i||null==i.properties?null:i.properties.pro)&&!r.isSubscribed),e.R7$(),e.Y8G("ngIf",2===i.templateType)}}function Ft(o,c){if(1&o){const n=e.RV6();e.j41(0,"img",159),e.bIt("error",function(){e.eBV(n);const i=e.XpG(2).$implicit,s=e.XpG(2);return e.Njj(s.errorOnImg(i))}),e.k0s()}if(2&o){const n=e.XpG(2).$implicit;e.Y8G("src",n.thumbUrl||n.urls[0],e.B4B)}}function At(o,c){if(1&o&&(e.j41(0,"div",160),e.EFF(1),e.k0s()),2&o){const n=e.XpG(2).$implicit,t=e.XpG(2);e.R7$(),e.SpI(" ",t.getDisplayToolName(n)," ")}}function Rt(o,c){if(1&o&&(e.j41(0,"div",136)(1,"span",137),e.nrm(2,"pi",138),e.k0s()()),2&o){e.XpG(4);const n=e.sdS(4);e.R7$(),e.Y8G("ngbPopover",n)}}function Et(o,c){1&o&&e.nrm(0,"span",150)}function Dt(o,c){1&o&&(e.j41(0,"span",151),e.nrm(1,"pi",141),e.k0s())}function Nt(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",142,4),e.bIt("click",function(){e.eBV(n);const i=e.XpG(),s=i.$implicit,r=i.index,a=e.XpG(2);return e.Njj(a.imageOnClick(r,s))}),e.j41(2,"div",143)(3,"div",110)(4,"div",111)(5,"input",112),e.bIt("click",function(i){e.eBV(n);const s=e.XpG().$implicit,r=e.XpG(2);return e.Njj(r.markProject(s,i))}),e.k0s()()(),e.j41(6,"div",113)(7,"div",114,5),e.bIt("openChange",function(i){e.eBV(n);const s=e.sdS(8),r=e.XpG().index,a=e.XpG(2);return e.Njj(a.checkDropDown(i,s,r))}),e.j41(9,"button",115),e.nrm(10,"pi",116),e.k0s(),e.j41(11,"div",117)(12,"ul")(13,"li")(14,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.loadBgInputImage(i.urls[0]))}),e.nrm(15,"pi",152),e.EFF(16,"Open in Photo Editor "),e.k0s()(),e.j41(17,"li")(18,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.download(i.urls[0]))}),e.nrm(19,"pi",153),e.EFF(20,"Download "),e.k0s()(),e.j41(21,"li")(22,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.reportabuse(i))}),e.nrm(23,"pi",154),e.EFF(24,"Report "),e.k0s()(),e.j41(25,"li")(26,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.deleteAIGenerations(i))}),e.nrm(27,"pi",64),e.EFF(28,"Delete "),e.k0s()()()()()()(),e.j41(29,"div",155),e.bIt("click",function(){e.eBV(n);const i=e.XpG(),s=i.$implicit,r=i.index,a=e.XpG(2);return e.Njj(a.openThumbPreview(null==s?null:s.urls[0],r))})("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.loadProject(i))}),e.j41(30,"div",156)(31,"div"),e.DNE(32,Ft,1,1,"img",157)(33,At,2,1,"div",158),e.k0s()()(),e.DNE(34,Rt,3,1,"div",132)(35,Et,1,0,"span",148)(36,Dt,2,0,"span",149),e.k0s()}if(2&o){const n=e.XpG(),t=n.$implicit,i=n.index,s=e.XpG(2);e.xc7("margin-left",s.thumbLeftMargin,"px")("margin-right",s.thumbRightMargin,"px"),e.Y8G("ngClass",e.sMw(15,we,s.imagePopup,s.activeImageIndex==i&&1==s.isDropDownOpen,1==s.isDropDownOpen)),e.R7$(4),e.Y8G("ngClass",e.eq3(19,z,s.markedProjects.length>0)),e.R7$(),e.Y8G("checked",null==t?null:t.checked),e.R7$(2),e.Y8G("ngClass",e.eq3(21,G,s.markedProjects.length>0)),e.R7$(22),e.Y8G("ngClass",e.eq3(23,ye,t.originalThumbUrl)),e.R7$(),e.Y8G("ngClass",e.eq3(25,Me,t.assetId==s.disableAssetId)),e.R7$(2),e.Y8G("ngIf",(null==t?null:t.urls)&&(null==t?null:t.urls.length)),e.R7$(),e.Y8G("ngIf",t.toolName),e.R7$(),e.Y8G("ngIf",s.selectedFolder.locked&&!s.isSubscribed),e.R7$(),e.Y8G("ngIf",1==(null==t||null==t.properties?null:t.properties.pro)&&!s.isSubscribed),e.R7$(),e.Y8G("ngIf",2===t.templateType)}}function Vt(o,c){if(1&o&&(e.j41(0,"div",160),e.EFF(1),e.k0s()),2&o){const n=e.XpG(2).$implicit,t=e.XpG(2);e.R7$(),e.SpI(" ",t.getDisplayToolName(n)," ")}}function $t(o,c){if(1&o&&(e.j41(0,"div",160),e.EFF(1),e.k0s()),2&o){const n=e.XpG(3).$implicit,t=e.XpG(2);e.R7$(),e.SpI(" ",t.getDisplayToolName(n)," ")}}function Xt(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",173),e.bIt("click",function(i){e.eBV(n);const s=e.XpG(2),r=s.$implicit,a=s.index,d=e.XpG(2);return e.Njj(d.openThumbPreview(r.url,a,i))}),e.j41(1,"video",174),e.bIt("ended",function(){e.eBV(n);const i=e.XpG(2).$implicit,s=e.XpG(2);return e.Njj(s.endVideo(i))}),e.nrm(2,"source",175),e.k0s(),e.DNE(3,$t,2,1,"div",158),e.k0s()}if(2&o){const n=e.XpG(2).$implicit;e.R7$(),e.FS9("id",n.assetId),e.R7$(),e.Y8G("src",n.urls[0],e.B4B),e.R7$(),e.Y8G("ngIf",n.toolName)}}function Ut(o,c){if(1&o){const n=e.RV6();e.j41(0,"a",176),e.bIt("click",function(i){e.eBV(n);const s=e.XpG(2).$implicit,r=e.XpG(2);return e.Njj(r.playVideo(s,i))}),e.nrm(1,"pi",141),e.k0s()}}function Yt(o,c){if(1&o){const n=e.RV6();e.qex(0),e.j41(1,"div",161,4),e.bIt("mouseleave",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.stopVideoPlay())})("mouseenter",function(i){e.eBV(n);const s=e.XpG().$implicit,r=e.XpG(2);return e.Njj(r.playVideo(s,i))})("click",function(){e.eBV(n);const i=e.XpG(),s=i.$implicit,r=i.index,a=e.XpG(2);return e.Njj(a.imageOnClick(r,s))}),e.j41(3,"div",143)(4,"div",110)(5,"div",162)(6,"input",112),e.bIt("click",function(i){e.eBV(n);const s=e.XpG().$implicit,r=e.XpG(2);return e.Njj(r.markProject(s,i))}),e.k0s()()(),e.j41(7,"div",113)(8,"div",163,5),e.bIt("openChange",function(i){e.eBV(n);const s=e.sdS(9),r=e.XpG().index,a=e.XpG(2);return e.Njj(a.checkDropDown(i,s,r))}),e.j41(10,"button",115),e.nrm(11,"pi",116),e.k0s(),e.j41(12,"div",117)(13,"ul")(14,"li")(15,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.loadInputVideo(i.urls[0]))}
1),e.nrm(16,"pi",164),e.EFF(17,"Open in Video Editor "),e.k0s()(),e.j41(18,"li")(19,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.download(i.urls[0],null==i?null:i.featureType))}),e.nrm(20,"pi",153),e.EFF(21,"Download "),e.k0s()(),e.j41(22,"li")(23,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.reportabuse(i))}),e.nrm(24,"pi",154),e.EFF(25,"Report "),e.k0s()(),e.j41(26,"li")(27,"a",63),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(2);return e.Njj(s.deleteAIGenerations(i))}),e.nrm(28,"pi",64),e.EFF(29,"Delete "),e.k0s()()()()()()(),e.j41(30,"div",165),e.bIt("click",function(i){e.eBV(n);const s=e.XpG(),r=s.$implicit,a=s.index,d=e.XpG(2);return e.Njj(d.openThumbPreview(r.urls[0],a,i))}),e.j41(31,"div",166),e.nrm(32,"img",167),e.k0s(),e.DNE(33,Vt,2,1,"div",158),e.j41(34,"span",168),e.EFF(35),e.k0s()(),e.DNE(36,Xt,4,3,"div",169),e.j41(37,"div",170)(38,"div",171),e.DNE(39,Ut,2,0,"a",172),e.k0s()()(),e.bVm()}if(2&o){const n=e.XpG(),t=n.$implicit,i=n.index,s=e.XpG(2);e.R7$(),e.xc7("margin-left",s.thumbLeftMargin,"px")("margin-right",s.thumbRightMargin,"px"),e.Y8G("ngClass",e.l_i(13,nt,s.activeImageIndex==i&&1==s.isDropDownOpen,1==s.isDropDownOpen)),e.R7$(4),e.Y8G("ngClass",e.eq3(16,z,s.markedProjects.length>0)),e.R7$(),e.Y8G("checked",null==t?null:t.checked),e.R7$(2),e.Y8G("ngClass",e.eq3(18,G,s.markedProjects.length>0)),e.R7$(24),e.Y8G("src",t.thumbUrl,e.B4B),e.R7$(),e.Y8G("ngIf",!t.isPlay),e.R7$(2),e.SpI("",null==t||null==t.videoDuration?null:t.videoDuration.replace(".0",""),"sec"),e.R7$(),e.Y8G("ngIf",t.isPlay),e.R7$(3),e.Y8G("ngIf",!t.isPlay)}}function Bt(o,c){if(1&o&&(e.qex(0),e.j41(1,"div",177)(2,"div",178)(3,"div",179),e.nrm(4,"app-ai-processing-bar",180),e.k0s()(),e.j41(5,"div",181)(6,"div",182),e.nrm(7,"div",183)(8,"div",184)(9,"div",185),e.k0s()()(),e.bVm()),2&o){const n=e.XpG().$implicit,t=e.XpG(2);e.R7$(),e.xc7("margin-left",t.thumbLeftMargin,"px")("margin-right",t.thumbRightMargin,"px"),e.R7$(3),e.Y8G("progress",n.generationProgress||0)("message",t.GlobalConstants.label.generatingVideo)}}function Lt(o,c){if(1&o&&(e.qex(0),e.DNE(1,It,45,35,"div",105)(2,Gt,50,36,"div",106)(3,Nt,37,27,"div",107)(4,Yt,40,20,"ng-container",31)(5,Bt,10,6,"ng-container",31),e.bVm()),2&o){const n=c.$implicit,t=c.index,i=e.XpG(2);e.R7$(),e.Y8G("ngIf","img_edits"!==n.assetType&&"img"!==n.assetType),e.R7$(),e.Y8G("ngIf","img_edits"==n.assetType),e.R7$(),e.Y8G("ngIf","img"==n.assetType&&!("text2video"==(null==n?null:n.featureType)||"aifaceanimate"==(null==n?null:n.featureType)||"imageanimate"==(null==n?null:n.featureType)||"frameinterpolation"==(null==n?null:n.featureType)||"image2video"==(null==n?null:n.featureType)||"duoimageanimate"==(null==n?null:n.featureType))),e.R7$(),e.Y8G("ngIf","img"==n.assetType&&"active"==(null==n?null:n.status)&&("text2video"==(null==n?null:n.featureType)||"aifaceanimate"==(null==n?null:n.featureType)||"imageanimate"==(null==n?null:n.featureType)||"frameinterpolation"==(null==n?null:n.featureType)||"image2video"==(null==n?null:n.featureType)||"duoimageanimate"==(null==n?null:n.featureType))),e.R7$(),e.Y8G("ngIf","img"==n.assetType&&"init"==(null==n?null:n.status)&&("text2video"==(null==n?null:n.featureType)||"aifaceanimate"==(null==n?null:n.featureType)||"imageanimate"==(null==n?null:n.featureType)||"frameinterpolation"==(null==n?null:n.featureType)||"image2video"==(null==n?null:n.featureType)||"duoimageanimate"==(null==n?null:n.featureType))&&i.checkStatus(n,t))}}function Ht(o,c){1&o&&e.nrm(0,"blank-thumbs",186),2&o&&e.Y8G("count",3)}function zt(o,c){if(1&o&&(e.j41(0,"div",193),e.EFF(1),e.k0s()),2&o){const n=e.XpG(4);e.R7$(),e.SpI(" Your folder is empty. ",-1==n.templateType?"Move existing designs here to get started.":"Add your design to get started."," ")}}function qt(o,c){1&o&&(e.j41(0,"div",193),e.EFF(1," Your AI generations will be displayed here. "),e.k0s())}function Kt(o,c){if(1&o){const n=e.RV6();e.j41(0,"button",195),e.bIt("click",function(){e.eBV(n);const i=e.XpG(5);return e.Njj(i.createProjectFromScratch())}),e.EFF(1,"Create Now"),e.k0s()}}
1function Qt(o,c){if(1&o){const n=e.RV6();e.j41(0,"button",195),e.bIt("click",function(){e.eBV(n);const i=e.XpG(5);return e.Njj(i.createProjectFromScratch())}),e.EFF(1,"Generate Now"),e.k0s()}}function Jt(o,c){if(1&o&&e.DNE(0,Kt,2,0,"button",194)(1,Qt,2,0,"button",194),2&o){const n=e.XpG(4);e.Y8G("ngIf",5!=n.templateType),e.R7$(),e.Y8G("ngIf",5==n.templateType)}}function Wt(o,c){if(1&o&&(e.j41(0,"div",189)(1,"div",190),e.nrm(2,"img",191),e.k0s(),e.DNE(3,zt,2,1,"div",192)(4,qt,2,0,"div",192)(5,Jt,2,2),e.k0s()),2&o){const n=e.XpG(3);e.R7$(3),e.Y8G("ngIf",5!=n.templateType),e.R7$(),e.Y8G("ngIf",5==n.templateType),e.R7$(),e.vxM(-1!=n.templateType?5:-1)}}function Zt(o,c){if(1&o&&(e.j41(0,"div",187),e.DNE(1,Wt,6,3,"div",188),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("ngIf",n.projectList&&0===n.projectList.length&&n.isProjectListLoaded&&!n.inProgress&&!n.deleteinprogess)}}function ei(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",189)(1,"div",190),e.nrm(2,"img",191),e.k0s(),e.j41(3,"div",193),e.EFF(4," Your folder is empty. To access this folder upgrade to Pro. "),e.k0s(),e.j41(5,"button",196),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.upgradePlan())}),e.EFF(6,"Upgrade Now"),e.k0s()()}}function ti(o,c){if(1&o&&(e.j41(0,"div",187),e.DNE(1,ei,7,0,"div",188),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("ngIf",n.projectList&&0===n.projectList.length&&n.isProjectListLoaded)}}function ii(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",197)(1,"div",198)(2,"div",199),e.EFF(3,"Your Pro folder is safe with us. To access this folder upgrade to Pro. "),e.j41(4,"button",200),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.upgradePlan())}),e.EFF(5," Upgrade Now "),e.k0s()()()()}}function ni(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",8)(1,"div",9)(2,"div",10)(3,"div",11)(4,"div",12)(5,"div",13)(6,"ul",14)(7,"li",15),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.goToDashboard())}),e.nrm(8,"pi",16),e.EFF(9,"To Dashboard "),e.k0s(),e.nrm(10,"hr",17),e.j41(11,"li",18),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.getAllDesignsImage(5))}),e.j41(12,"label",19)(13,"span",20),e.nrm(14,"pi",21),e.k0s(),e.EFF(15," AI Generations "),e.k0s()(),e.j41(16,"li",22),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.getAllDesignsImage(1))}),e.j41(17,"label",19)(18,"span",20),e.nrm(19,"pi",23),e.k0s(),e.EFF(20," Design Templates "),e.k0s()(),e.j41(21,"li",24),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.getAllDesignsImage(2))}),e.j41(22,"label",19)(23,"span",20),e.nrm(24,"pi",25),e.k0s(),e.EFF(25," Video Templates "),e.k0s()(),e.j41(26,"li",24),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.getAllDesignsImage(3))}),e.j41(27,"label",19)(28,"span",20),e.nrm(29,"pi",26),e.k0s(),e.EFF(30," Photo Edits "),e.k0s()(),e.j41(31,"li",24),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.getAllDesignsImage(4))}),e.j41(32,"label",19)(33,"span",20),e.nrm(34,"pi",27),e.k0s(),e.EFF(35," Video Edits "),e.k0s()()(),e.nrm(36,"hr",17),e.j41(37,"ul",28)(38,"li",29),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.addFolder())}),e.j41(39,"label",30),e.EFF(40," Add Folder "),e.DNE(41,ot,2,0,"span",31),e.k0s(),e.j41(42,"div",32),e.nrm(43,"pi",33),e.k0s()(),e.DNE(44,at,23,17,"li",34),e.k0s()(),e.j41(45,"div",35)(46,"div",36)(47,"div",37)(48,"ul",38),e.nrm(49,"hr",39)(50,"space-utilized"),e.k0s()()()()()()(),e.j41(51,"div",40)(52,"div",41)(53,"div",42)(54,"div",43),e.EFF(55),e.k0s(),e.DNE(56,dt,20,8,"div",44)(57,ht,23,10,"div",44),e.k0s(),e.j41(58,"div",45),e.DNE(59,ft,7,0,"div",46),e.j41(60,"div",47,3),e.bIt("scrolled",function(i){e.eBV(n);const s=e.XpG();return e.Njj(s.onScroll(i))}),e.DNE(62,vt,8,7,"div",48)(63,Lt,6,5,"ng-container",49)(64,Ht,1,1,"blank-thumbs",50),e.k0s(),e.DNE(65,Zt,2,1,"div",51)(66,ti,2,1,"div",51)(67,ii,6,0,"div",52),e.k0s()()()()()}if(2&o){const n=e.XpG();e.R7$(11),e.Y8G("ngClass",e.eq3(27,N,5===n.templateType)),e.R7$(2),e.Y8G("ngClass",e.l_i(29,V,5===n.templateType,5!==n.templateType)),e.R7$(3),e.Y8G("ngClass",e.eq3(32,N,0===n.templateType||1===n.templateType)),e.R7$(2),e.Y8G("ngClass",e.l_i(34,V,0===n.templateType||1===n.templateType,!(0===n.templateType||1===n.templateType))),e.R7$(3),e.Y8G("ngClass",e.eq3(37,N,2===n.templateType)),e.R7$(2),e.Y8G("ngClass",e.l_i(39,V,2===n.templateType,2!==n.templateType)),e.R7$(3),e.Y8G("ngClass",e.eq3(42,N,3===n.templateType)),e.R7$(2),e.Y8G("ngClass",e.l_i(44,V,3===n.templateType,3!==n.templateType)),e.R7$(3),e.Y8G("ngClass",e.eq3(47,N,4===n.templateType)),e.R7$(2),e.Y8G("ngClass",e.l_i(49,V,4===n.templateType,4!==n.templateType)),e.R7$(5),e.Y8G("ngClass",e.eq3(52,We,n.folders.length>=100)),e.R7$(3),e.Y8G("ngIf",!(n.user&&n.user.subscribed)&&n.folders.length>0),e.R7$(3),e.Y8G("ngForOf",n.folders),e.R7$(10),e.Y8G("ngClass",e.eq3(54,G,n.markedProjects.length>=1)),e.R7$(),e.SpI(" ",n.designTitle,""),e.R7$(),e.Y8G("ngIf",5!=n.templateType),e.R7$(),e.Y8G("ngIf",5==n.templateType),e.R7$(2),e.Y8G("ngIf",!n.isProjectListLoaded),e.R7$(),e.Y8G("infiniteScrollDistance",.1)("infiniteScrollUpDistance",2)("infiniteScrollThrottle",50),e.R7$(2),e.Y8G("ngIf",!n.selectedFolder.locked&&5!==n.templateType),e.R7$(),e.Y8G("ngForOf",n.projectList),e.R7$(),e.Y8G("ngIf",n.inProgress),e.R7$(),e.Y8G("ngIf",!n.selectedFolder.locked),e.R7$(),e.Y8G("ngIf",n.selectedFolder.locked&&!n.isSubscribed),e.R7$(),e.Y8G("ngIf",n.selectedFolder.locked&&n.projectList.length>0&&!n.isSubscribed)}}function oi(o,c){1&o&&e.eu8(0)}function si(o,c){if(1&o&&e.DNE(0,oi,1,0,"ng-container",201),2&o){const n=e.XpG();e.Y8G("ngComponentOutlet",n.propopover)("ngComponentOutletInjector",n.injector)}}function ri(o,c){1&o&&e.eu8(0)}function ai(o,c){if(1&o&&e.DNE(0,ri,1,0,"ng-container",201),2&o){const n=e.XpG();e.Y8G("ngComponentOutlet",n.propopover)("ngComponentOutletInjector",n.injector)}}function ci(o,c){1&o&&e.eu8(0)}function li(o,c){if(1&o&&e.DNE(0,ci,1,0,"ng-container",201),2&o){const n=e.XpG();e.Y8G("ngComponentOutlet",n.propopover)("ngComponentOutletInjector",n.injector)}}let di=(()=>{var o;class c{constructor(t,i,s,r,a,d,m,_,P,C,M,F,X,le,de,pe,me,xo,jo,ko,Io,wo,yo,Mo,To){this.projectsService=t,this.aiPhotoService=i,this.editorUiService=s,this.authService=r,this.modalService=a,this.router=d,this.toastService=m,this.subsService=_,this.dialogService=P,this.createProjectService=C,this.templateService=M,this.projectSyncService=F,this.document=X,this.injector=le,this.uploadImageService=de,this.location=pe,this.env=me,this.route=xo,this.uploadVideoService=jo,this.aiGenerationService=ko,this.topbarbroadcast=Io,this.configService=wo,this.commonService=yo,this.paymentService=Mo,this.topStrip=To,this.GlobalConstants=g.b,this.genAsInputImageEvent=ne
1w e.bkB,this.folders=[],this.inProgress=!1,this.markedProjects=[],this.isFoldersLoaded=!1,this.isProjectListLoaded=!1,this.tempFolderName="",this.subscriptions=[],this.mainSelectedProduct={productId:"",displayName:"",imageSizel:"",imageObjects:[]},this.activeImageIndex=-1,this.imagePopup=!1,this.manageImageRatio=!1,this.textDirection="ltr",this.thumbLeftMargin=0,this.thumbRightMargin=24,this.mainSelectedFormat=0,this.rowsCount=15,this.isProductsEnd=!1,this.designTitle="All Designs Projects",this.templateType=5,this.propopover=R.A,this.showLockedInfo=!0,this.lastScrollPos=0,this.currentYear=(new Date).getFullYear(),this.isDropDownOpen=!1,this.isMobileView=!1,this.disableAssetId="",this.imgQueryParams={imageUrl:"",tabName:"",from:"",editorType:""},this.isSelectAll=!1,this.minThumbHeight=250,this.videoProgressTimer=null,this.deleteinprogess=!1,this.inDownloadProgress=!1,this.aiGenerationService.abortCheckFn=!1,this.user=this.authService.currentUser(),this.isSubscribed=!!this.user&&this.user.subscribed,this.createProjectService.executeActionAfterPayment(),this.toastService.removeAll(),this.defaultFolder=this._getDefaultFolder(),this.selectedFolder=this.defaultFolder,this.initData(),this.injector=this.createInjector("profolder"),this.tabName=g.b.defaultPhotoEditTool,this.menuClick=this.topbarbroadcast.click.subscribe(ge=>{"PROJECTS"===ge?this.getAllDesignsImage(1):"GENERATIONS"===ge&&this.getAllDesignsImage(5)}),this.usrPropChangedObserver=this.authService.usrPropChanged.subscribe(ge=>{this.user=this.authService.currentUser(),this.isSubscribed=this.user?.subscribed})}createInjector(t){let i;return i={title:g.b.popover.lockedFolderInfoTitle,desc:g.b.popover.lockedFolderInfoDesc,name:t},e.zZn.create([{provide:b.hl,useValue:i}],this.injector)}close(t){this.location.back()}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe()),this.aiGenerationService.abortCheckFn=!0,this.stopVideoProgress(),this.usrPropChangedObserver&&this.usrPropChangedObserver.unsubscribe()}playVideo(t,i){i.preventDefault(),t.isPlay?(t.isPlay=!1,t.currentTime=0,this.lastPlayedVideo&&(this.lastPlayedVideo.isPlay=!1)):(this.lastPlayedVideo&&(this.lastPlayedVideo.isPlay=!1),t.isPlay=!0,this.lastPlayedVideo=t,t.currentTime=0)}endVideo(t){t.isPlay=!1,t.currentTime=0}loadInputVideo(t){this.uploadVideoService.loadInputVideoToNewTab(t)}stopVideoPlay(){this.lastPlayedVideo&&(this.lastPlayedVideo.isPlay=!1,this.lastPlayedVideo.currentTime=0)}ngOnInit(){window.innerWidth<1340&&(this.minThumbHeight=200),this.showMobileView(),this.screenOnResize();let i=this.route.snapshot.queryParams;if(i.type){let s=parseInt(i.type);s<6&&s>0&&(this.templateType=s)}this.getAllDesignsImage(this.templateType),this.topStrip.removeTopStripClass()}screenOnResize(){const t=(0,ue.R)(window,"resize").pipe((0,_e.B)(200),(0,he.F)()).subscribe(()=>{this.showMobileView()});this.subscriptions.push(t)}showMobileView(){this.isMobileView=!(window.innerWidth>921)}resetUser(){return new Promise((t,i)=>{this.authService.getUserDetails(this.user.systemRefKey,s=>{s&&(this.user=this.authService.currentUser(),t(!0))},s=>{t(!0)})})}initData(){Promise.all([this.resetUser(),this.getFolders()]).then(t=>{if(this.user.subscribed){if(this.folders&&this.folders.length>1)for(let i=1;i<this.folders.length;i++)this.folders[i].locked=!1}else if(this.folders&&this.folders.length>1)for(let i=1;i<this.folders.length;i++)this.folders[i].locked=!0}).catch(t=>{console.log("error in getFolders project home "+t)})}upgradePlan(){this.subsService.upgradePlanCheckout("","","",t=>{this.user=this.authService.currentUser(),this.isSubscribed=this.user.subscribed})}getFolders(){return new Promise((t,i)=>{let s=(new Date).getTime();this.projectsService.getFolders({systemRefKey:this.user.systemRefKey,time:"lt",fromTime:s},a=>{a.body?(this.folders=a.body.folders,this.projectsService.folders=a.body.folders,this.isFoldersLoaded=!0,this.inProgress=!1,t(!0)):(this.inProgress=!1,t(!0))},a=>{t(!0)})})}getFolderDetails(t){t.assetId!==this.selectedFolder.assetId&&(this.activeImageIndex=-1,this.isSelectAll=!1,this.unselectAll(),this.isProjectListLoaded=!1,this.lastScrollPos=0,this.projectList=[],this.templateType=-1,this.designTitle=t.name,this.selectedFolder=t,window.scrollTo({top:0,behavior:"smooth"}),this.loadMoreFolderDetails())}startNew(){}changeName(t){this.designTitle=t.target.value}addFolder(){if(this.isFoldersLoaded&&!this.user.subscribed&&this.folders.length>0)return void this.subsService.upgradePlanCheckout("","","",i=>{this.user=this.authService.currentUser(),this.isSubscribed=this.user.subscribed});if(this.folders.length>=100)return;let t=this.showProgress();this.inProgress=!0,this.projectsService.createFolder({name:this.getUntitledFolderName()},i=>{"SUCCESS"===i.status?(this.folders.push(i.body),this.inProgress=!1,t.dismiss()):this.inProgress=!1},i=>{this.inProgress=!1,t.dismiss()})}loadProject(t){if(0===this.markedProjects.length)if(t.templateType==O.If.VIDEO||t.templateType==O.If.OTHERS){const i={project_id:t.assetId,product_id:t.properties.productId};t.properties.editorType==D._Y.VideoEditor?(i.tab="project",this.router.navigate(["/video-editor/edit"],{queryParams:i}
1)):(t.properties.projectType==f.gM.VideoEditor&&(i.project_type=t.properties.projectType,i.tab="text"),this.router.navigate(["/video-template-editor/edit"],{queryParams:i}))}else t.templateType==O.If.DESIGN||t.templateType==O.If.PHOTO?this.router.navigate(["/design-editor/edit"],{queryParams:{project_id:t.assetId,product_id:t.properties.productId}}):"img_edits"==t.assetType&&(this.imgQueryParams.imageUrl=t.metadata.contentUrl,this.imgQueryParams.editorType=D._Y.Photo,this.imgQueryParams.name=t.name,this.imgQueryParams.tabName=t.metadata.tool||this.tabName,this.imgQueryParams.subTool=t.metadata.subTool,this.uploadImageService.loadInputImage(this.imgQueryParams,()=>{}));else this.markProject(t,null)}showProgress(){const t=this.modalService.open(j.x,{backdrop:"static",size:"sm",centered:!0});return t.result.then(i=>{}),t}getUntitledFolderName(){let t=0;for(let i=0;i<this.folders.length;i++)if(this.folders[i].name.startsWith("Untitled")){const s=this.folders[i].name.match(/\d+/g);s.length>0&&(t=parseInt(s[0]))}return"Untitled Folder "+(t+1)}editFolderName(t){t.isEdit||(t.isEdit=!0,this.tempFolderName=t.name,setTimeout(()=>{let i=this.document.getElementById("input-"+t.assetId);i&&i.focus()},100))}deleteFolder(t,i){this.dialogService.open({okButtonText:g.b.message.okDeleteButtonText,title:"Delete Folder",message:g.b.message.deleteConfirmFolder},s=>{let a=this.dialogService.showProgress();this.projectsService.deleteFolder({assetId:t.assetId},d=>{"SUCCESS"===d.status?(this.inProgress=!1,this.folders.splice(i,1),this.selectNextFolder(i),this.authService.usedQuota()):this.inProgress=!1,a.dismiss()},d=>{this.inProgress=!1,a.dismiss()})},s=>{})}selectNextFolder(t){this.folders.length>t?this.getFolderDetails(this.folders[t]):this.getAllDesignsImage(1)}saveFolderName(t){if(this.inProgress=!0,t.name&&t.name!==this.tempFolderName){const i={assetId:t.assetId,name:t.name,systemRefKey:this.user.systemRefKey,metadata:{},folderIds:[],designIds:[]};this.toastService.show(g.b.message.saveProgress),this.projectsService.updateFolder(i,s=>{"SUCCESS"===s.status?(this.toastService.removeAll(),this.toastService.showSuccess(g.b.message.saveSuccess),this.inProgress=!1,this.tempFolderName=t.name):this.inProgress=!1},s=>{this.inProgress=!1})}else""==t.name.trim()&&this.toastService.show(g.b.message.blankFolderError),t.name=this.tempFolderName;setTimeout(()=>{t.isEdit=!1},500)}move(t){this.moveToFolder([t.assetId])}editImageName(t,i=null){i&&i.stopPropagation();let s=t.assetId,r=t?.name;const a=this.modalService.open(x,{centered:!0,size:"md",backdrop:"static"});a.componentInstance.projectIds=s,a.componentInstance.projectName=r,a.componentInstance.selectedFolderId=this.selectedFolder.assetId,a.componentInstance.assetType=t.assetType,a.result.then(d=>{d&&(t.name=d)})}duplicate(t){this.getProjectTemplate(t)}getProjectTemplate(t){this.inProgress=!0;let i=this.showProgress();this.templateService.GetProject(t.assetId,s=>{this.projectSyncService.createProject(s,s.metadata.data.sceneItems[0]).then(m=>{this.projectList.unshift({assetId:m.assetId,assetType:"design",createdTimestamp:m.createdTimestamp,updatedTimestamp:m.updatedTimestamp,folderIds:m.folderIds,name:m.name,properties:m.properties,status:"active",thumbUrl:m.thumbUrl,checked:!1,templateType:this.templateType}),i.dismiss(),this.inProgress=!1}).catch(m=>{m&&(i.dismiss(),this.toastService.showError(m))})},s=>{})}moveMultipleProjects(){this.moveToFolder(this.markedProjects)}moveToFolder(t){const i=this.modalService.open(v,{centered:!0,size:"md",backdrop:"static"});i.componentInstance.projectIds=t,i.componentInstance.selectedFolderId=this.selectedFolder.assetId,i.result.then(s=>{"ok"===s&&(-1===this.templateType&&this.afterMoveToFolder(t),this.unselectAll())})}removeProjectFromList(t){for(let i=0;i<this.projectList.length;i++)if(this.projectList[i].assetId===t){this.projectList.splice(i,1);break}for(let i=0;i<this.mainSelectedProduct.imageObjects.length;i++)if(this.mainSelectedProduct.imageObjects[i].item.assetId===t){this.mainSelectedProduct.imageObjects.splice(i,1);break}}afterMoveToFolder(t){for(let i=0;i<t.length;
1i++)this.removeProjectFromList(t[i])}moveToTrash(t){let i={name:t.name,assetId:t.assetId};this.dialogService.open({okButtonText:g.b.message.okDeleteButtonText,title:g.b.message.singleProjectDeleteLabel,message:g.b.message.deleteConfirmProjects},a=>{this.projectsService.deleteDesign(i,d=>{this.removeProjectFromList(t.assetId),this.toastService.showSuccess(g.b.message.deleteConfirmProjectsSucces),this.authService.usedQuota()},d=>{this.toastService.showError(d.description)})},a=>{})}deleteMarkedProjects(){let t,i;this.markedProjects.length>1?(i=g.b.message.deleteConfirmAllProjects,t=g.b.message.multipleProjectDeleteLabel):(i=g.b.message.deleteConfirmProjects,t=g.b.message.singleProjectDeleteLabel),this.dialogService.open({okButtonText:g.b.message.okDeleteButtonText,title:t,message:i},s=>{let r=this.markedProjects,a=this.dialogService.showProgress();this.deleteinprogess=!0,5==this.templateType?this.projectsService.deleteAIAssets(r,d=>{for(let m=0;m<this.markedProjects.length;m++)this.removeProjectFromList(this.markedProjects[m]);this.markedProjects=[],this.isSelectAll=!1,this.toastService.showSuccess(g.b.message.deleteConfirmProjectsSucces),a.dismiss(),this.authService.usedQuota(),this.projectList&&0==this.projectList.length&&(this.isProjectListLoaded=!1,setTimeout(()=>{this.inProgress=!1,this.isProjectListLoaded=!0,this.markedProjects=[],this.onScroll(null)},500))},d=>{this.deleteinprogess=!1,this.inProgress=!1,this.toastService.showError(d.description),a.dismiss()}):this.projectsService.deleteAssets(r,d=>{for(let m=0;m<this.markedProjects.length;m++)this.removeProjectFromList(this.markedProjects[m]);this.markedProjects=[],this.toastService.showSuccess(g.b.message.deleteConfirmProjectsSucces),a.dismiss(),this.isSelectAll=!1,this.authService.usedQuota(),this.projectList&&0==this.projectList.length&&(this.isProjectListLoaded=!1,setTimeout(()=>{this.inProgress=!1,this.isProjectListLoaded=!0,this.markedProjects=[],this.onScroll(null)},500))},d=>{this.deleteinprogess=!1,this.inProgress=!1,this.toastService.showError(d.description),a.dismiss()})},s=>{this.markedProjects=[],this.projectList.forEach(r=>{r.checked&&(r.checked=!1)})})}deleteAIMarkedProjects(){let t,i;this.markedProjects.length>1?(i=g.b.message.deleteConfirmAllProjects,t=g.b.message.multipleProjectDeleteLabel):(i=g.b.message.deleteConfirmProjects,t=g.b.message.singleProjectDeleteLabel),this.dialogService.open({okButtonText:g.b.message.okDeleteButtonText,title:t,message:i},s=>{let r=this.markedProjects,a=this.dialogService.showProgress();this.projectsService.deleteAIAssets(r,d=>{for(let m=0;m<this.markedProjects.length;m++)this.removeProjectFromList(this.markedProjects[m]);this.markedProjects=[],this.toastService.showSuccess(g.b.message.deleteConfirmProjectsSucces),this.authService.usedQuota(),this.projectList&&0==this.projectList.length?(this.isProjectListLoaded=!1,setTimeout(()=>{this.inProgress=!1,a.dismiss(),this.isProjectListLoaded=!0,this.markedProjects=[],this.onScroll(null)},500)):a.dismiss()},d=>{this.toastService.showError(d.description),a.dismiss()})},s=>{this.markedProjects=[]})}deletePhotoEdits(t){this.markedProjects.push(t.assetId),this.deleteMarkedProjects()}deleteAIGenerations(t){this.markedProjects.push(t.assetId),this.deleteAIMarkedProjects()}markProject(t,i){if(this.isDropDownOpen=!1,this.stopVideoPlay(),t.checked){t.checked=!1;
1let s=this.getIndexOfMarkedProject(t.assetId);-1!==s&&this.markedProjects.splice(s,1)}else t.checked=!0,-1===this.getIndexOfMarkedProject(t.assetId)&&this.markedProjects.push(t.assetId);this.isSelectAll=this.projectList?.length==this.markedProjects.length}markAllProject(t){this.markedProjects=[],this.isSelectAll=!t,this.projectList?.forEach(i=>{i.checked=this.isSelectAll,this.isSelectAll&&this.markedProjects.push(i.assetId)})}getIndexOfMarkedProject(t){for(let i=0;i<this.markedProjects.length;i++)if(this.markedProjects[i]===t)return i;return-1}_getDefaultFolder(){return{assetId:this.user.systemRefKey,assetType:"FOLDER",createdDate:null,name:"Unsorted",size:0,status:"ACTIVE",systemRefKey:this.user.systemRefKey,updatedDate:null,locked:!1}}unselectAll(){for(let t=0;t<this.projectList.length;t++)this.projectList[t].checked=!1;this.markedProjects=[]}imageOnClick(t,i){this.activeImageIndex=t}getAllDesignsImage(t){this.inProgress||(this.activeImageIndex=-1,this.isSelectAll=!1,this.projectList=[],this.stopVideoProgress(),this.unselectAll(),this.isProjectListLoaded=!1,this.lastScrollPos=0,this.templateType=t,this.designTitle=0==t||1==t?"All Design Templates":2==t?"All Video Templates":4==t?"All Video Edits":5==t?"All AI Generations":"All Photo Edits",this.selectedFolder=this.defaultFolder,3==t?this.getAllPhotoEditAssets(this.templateType):5==t?this.getAllAiGenerations(this.templateType):this.loadMoreByTemplateType(t),window.scrollTo({top:0,behavior:"smooth"}),this.router.navigate([],5===t?{relativeTo:this.route,queryParams:{},replaceUrl:!0,queryParamsHandling:"merge"}:{relativeTo:this.route,queryParams:{},replaceUrl:!0}))}loadMoreFolderDetails(){this.isProductsEnd=!1,this.inProgress=!0,this.deleteinprogess=!1;const t=this.projectList&&this.projectList.length>0?this.projectList[this.projectList.length-1].updatedDate:0;setTimeout(()=>{this.projectsService.getProjects({folderId:this.selectedFolder.assetId,assetTypes:["DESIGN","IMG_EDITS"],fromTime:t,time:"lt"},s=>{let r=s.body.projectAssets;r&&r.length>0?(r.forEach(a=>{a.checked=this.isSelectAll,this.isSelectAll&&this.markedProjects.push(a.assetId),a.updatedTimestamp=a.updatedDate,a.displayTimestamp=new Date(a.updatedDate).getFullYear()==this.currentYear?null:a.updatedDate}),this.projectList=this.projectList.concat(r),this.isProductsEnd=!1):this.isProductsEnd=!0,this.isProjectListLoaded=!0,this.inProgress=!1,this.markedProjects=[]},s=>{this.inProgress=!1,this.markedProjects=[],this.isProjectListLoaded=!0})},100)}
1checkAndLoadMore(t){setTimeout(()=>{document.documentElement.scrollHeight<=window.innerHeight&&!this.isProductsEnd&&!this.inProgress&&this.loadMoreByTemplateType(t)},100)}loadMoreByTemplateType(t){var i=this;this.isProductsEnd=!1,this.inProgress=!0,this.deleteinprogess=!1,setTimeout(()=>{const s=this.projectList&&this.projectList.length>0?this.projectList[this.projectList.length-1].createdTimestamp:(new Date).getTime();this.projectsService.getAllProjects({systemRefKey:this.user.systemRefKey,time:"lt",fromTime:s,templateType:t},function(){var a=(0,E.A)(function*(d){if(i.templateType==t){let m=d.body.designs;m&&m.length>0?(yield i.configService.waitForSettings(),m.forEach(_=>{if(_.checked=i.isSelectAll,i.isSelectAll&&i.markedProjects.push(_.assetId),_.displayTimestamp=new Date(_.updatedTimestamp).getFullYear()==i.currentYear?null:_.updatedTimestamp,!_.properties?.width&&_.properties.socialPlatformId){const C=i.configService.settings?.[D.jn.SocialFormat]?.[_.properties.socialPlatformId];C&&(_.properties.width=C.width,_.properties.height=C.height)}}),i.projectList=i.projectList.concat(m),i.isProductsEnd=!1,i.isProjectListLoaded=!0,i.inProgress=!1,i.checkAndLoadMore(t)):i.isProductsEnd=!0,i.thumbUrl=d.thumbUrl,i.isProjectListLoaded=!0,i.inProgress=!1}});return function(d){return a.apply(this,arguments)}}(),a=>{this.isProjectListLoaded=!1,this.inProgress=!1})},100)}onScroll(t){this.inProgress||0!=this.templateType&&1!=this.templateType&&2!=this.templateType&&4!=this.templateType?this.inProgress||-1!=this.templateType?this.inProgress||3!=this.templateType?!this.inProgress&&5==this.templateType&&(!this.isProductsEnd&&this.isProjectListLoaded?this.getAllAiGenerations(this.templateType):this.deleteinprogess=!1):!this.isProductsEnd&&this.isProjectListLoaded?this.getAllPhotoEditAssets(this.templateType):this.deleteinprogess=!1:!this.isProductsEnd&&this.isProjectListLoaded?this.loadMoreFolderDetails():this.deleteinprogess=!1:!this.isProductsEnd&&this.isProjectListLoaded?this.loadMoreByTemplateType(this.templateType):this.deleteinprogess=!1}errorOnImg(t){t.originalThumbUrl=t.thumbUrl,t.thumbUrl=t.properties&&3===t.properties.format?"https://static.lightxeditor.com/assets/images/thumb-error-format-3.png":"https://static.lightxeditor.com/assets/images/thumb-error-default.png"}checkDropDown(t,i,s){i.isOpen()?this.isDropDownOpen=!0:s==this.activeImageIndex&&(this.isDropDownOpen=!1)}checkAllPhotoEditAssets(t){setTimeout(()=>{document.documentElement.scrollHeight<=window.innerHeight&&!this.isProductsEnd&&!this.inProgress&&this.getAllPhotoEditAssets(t)},100)}getAllPhotoEditAssets(t){this.isProductsEnd=!1,this.inProgress=!0,this.deleteinprogess=!1;const i=this.projectList&&this.projectList.length>0?this.projectList[this.projectList.length-1].createdDate:(new Date).getTime();this.projectSyncService.getUploadedAssets(this.user,[ee.P.IMG_EDITS],i,s=>{if(this.templateType==t){let r=s.body?s.body.projectAssets:[];r&&r.length>0?(r.forEach(a=>{a.checked=this.isSelectAll,this.isSelectAll&&this.markedProjects.push(a.assetId),a.displayTimestamp=new Date(a.updatedDate).getFullYear()==this.currentYear?null:a.updatedDate}),this.projectList=this.projectList.concat(r),this.isProductsEnd=!1,this.checkAllPhotoEditAssets(t)):this.isProductsEnd=!0,this.isProjectListLoaded=!0,this.inProgress=!1}},s=>{this.isProjectListLoaded=!1,this.inProgress=!1})}updatefeatureType(t,i=""){switch(t){case"selfie":return"AI Portrait";case"avatar":return"AI Avatar";case"photoshoot":return"AI Product Photoshoot";case"modelphotoshoot":return"AI Person Photoshoot";case"inpaint":return"Cleanup Picture";case"aifilter":return"AI Filter";case"sticker":return"AI Sticker";case"text2image":return"AI Text to Image";case"image2image":return""!=i&&"sketch to image"==i.toLocaleLowerCase()?"AI Sketch to Image":"AI Image to Image";case"avatarify":return"AI Avatar";case"text2video":return"AI Text to Video";case"image2video":case D.Fs.ImageToAnimate||D.Fs.Frameinterpolation:return"AI Image to Video";case"outpaint":return"AI Expand";case"aifaceanimate":return"AI Face Animator";case"upscale":return"Upscale";case"headshot":return"AI Headshot";case"aivirtualtryon":return"AI TryOn";case D.do.Duo_Photoshoot:return"AI Duo Photoshoot";case"design":return"AI Design Generator";default:return i}}getDisplayToolName(t){return t&&((0,S.w7)(t.featureType)||(0,S.w7)(t.toolName)||(0,S.w7)(t?.metadata?.subTool)||t.toolName)||""}checkLoadMoreAllAiGenerations(t){setTimeout(()=>{document.documentElement.scrollHeight<=window.innerHeight&&!this.isProductsEnd&&!this.inProgress&&this.getAllAiGenerations(t)},100)}getAllAiGenerations(t){this.isProductsEnd=!1,this.inProgress=!0,this.deleteinprogess=!1;const i=this.projectList&&this.projectList.length>0?this.projectList[this.projectList.length-1].createdDate:(new Date).getTime();this.projectSyncService.getAiAssets(this.user,[ee.P.IMG_EDITS],i,s=>{if(this.templateType==t){let r=s.body?s.body.projectAssets:[];r&&r.length>0?(r.forEach(a=>{a.isVideo=a.urls&&a.urls.length>0&&this.commonService.isVideo(a.urls[0]),a.checked=this.isSelectAll,this.isSelectAll&&this.markedProjects.push(a.assetId),a.displayTimestamp=new Date(a.updatedDate).getFullYear()==this.currentYear?null:a.updatedDate}),this.projectList=this.projectList.concat(r),this.isProductsEnd=!1,this.checkLoadMoreAllAiGenerations(t)):this.isProductsEnd=!0,this.isProjectListLoaded=!0,this.inProgress=!1}},s=>{this.isProjectListLoaded=!1,this.inProgress=!1})}createProjectFromScratch(){this.env.isMobileView?this.env.openPlayStoreUrl():1==this.templateType?this.createProjectService.createProjectFromScratch(O.If.DESIGN):2==this.templateType?this.createProjectService.createProjectFromScratch(O.If.VIDEO):3==this.templateType?this.editorUiService.uploadOpenImageModal(this.tabName,""):4==this.templateType?this.makeProjectFromScratch():5==this.templateType?this.redirectToAiEditor(this.route.
1snapshot.queryParams):-1==this.templateType&&this.createProjectService.createNewComponent(this.templateType)}redirectToAiEditor(t){this.router.navigate(["/ai-photo-editor/edit"],{queryParams:{from:t.from,tab:"image-tools"}})}manageSpace(){this.modalService.open(Xe.D,{centered:!0,size:"xl",backdrop:"static",windowClass:"create-video-dialog"}).result.then(i=>{})}makeProjectFromScratch(){this.router.navigate(["/video-editor/edit"],{queryParams:{action:"blank_project",tab:"project",project_id:"",format:26,project_type:f.gM.VideoEditor,h:1080,w:1920,duration:6e4}})}openThumbPreview(t,i,s=null){this.projectList[i].checked||(this.projectList.forEach(a=>{a.urls&&a.urls.length&&(a.url=a.urls[0],a.toolName=a.toolName,a.toolPrompt=a.prompt?a.prompt:"",a.width=a.dw_width?a.dw_width:a.width,a.height=a.dh_height?a.dh_height:a.height,a.imgUrl=a.urls[0],a.seed="text2image"!=a.featureType&&"design"!=a.featureType&&"image2image"!=a.featureType||!a?.seed||-1==a?.seed?0:a?.seed,a.isVideo=a.urls&&a.urls.length>0&&this.commonService.isVideo(a.urls[0]))}),0==this.markedProjects.length&&this.openThumbnailPreview(t,i,this.projectList,!0).result.then(d=>{"2"==d.value?this.loadBgInputImage(d.img.urls[0]):"6"==d.value?this.loadInputVideo(t):"7"==d.value?this.loadBgInputImage(d.img.url,7):"8"==d.value?this.loadBgInputImage(d.img.url,8):"9"==d.value?this.loadBgInputImage(d.img.url,9):"10"==d.value?this.loadBgInputImage(d.img.url,10):"11"==d.value?this.loadBgInputImage(d.img.url,11):"12"==d.value&&this.loadBgInputImage(d.img.url,12)}))}openThumbnailPreview(t,i,s,r=!1){const a=this.modalService.open(Ye.g,{centered:!0,size:"lg",backdrop:!0,windowClass:"ai-thumb-dialog"});return a.componentInstance.url=t,a.componentInstance.index=i,a.componentInstance.aiImages1=s,a.componentInstance.aiPhotoService=this.aiPhotoService,a.componentInstance.isMyProject=r,a}loadBgInputImage(t){var i=this;return(0,E.A)(function*(s,r=0){const a=new Image;yield new Promise(d=>{a.onload=d,a.src=s}).then(()=>{let d,m=a.width,_=a.height;d=6==r?i.router.createUrlTree(["edit-tools/edit"],{queryParams:{tab:"remove_bg",subTool:"",img:a.src,w:m,h:_,action:"default_project",social_platform_id:0,targetPage:"",edType:"3"}}):7==r?i.router.createUrlTree(["design-editor/edit"],{queryParams:{tab:"text",subTool:"",img:a.src,w:m,h:_,action:"default_project",social_platform_id:26,targetPage:"",edType:"1"}}):8==r?i.router.createUrlTree(["edit-tools/edit"],{queryParams:{tab:"aitools",subTool:"eraser",img:a.src,w:m,h:_,action:"default_project",social_platform_id:0,targetPage:"",edType:"3"}}):9==r?i.router.createUrlTree(["edit-tools/edit"],{queryParams:{tab:"aitools",subTool:"expand",img:a.src,w:m,h:_,action:"default_project",social_platform_id:0,targetPage:"",edType:"3"}}):10==r?i.router.createUrlTree(["ai-photo-editor/edit"],{queryParams:{tab:"video-tools",toolName:"image2video",subTool:"image",imgUrl:a.src,o_img:a.src,w:m,h:_,action:"default_project",social_platform_id:0,targetPage:"",edType:"4"}}):i.router.createUrlTree(["edit-tools/edit"],11==r?{queryParams:{tab:"aitools",subTool:"changecameraangle",img:a.src,w:m,h:_,action:"default_project",social_platform_id:0,targetPage:"",edType:"3"}}:12==r?{queryParams:{tab:"aitools",subTool:"changelighting",img:a.src,w:m,h:_,action:"default_project",social_platform_id:0,targetPage:"",edType:"3"}}:{queryParams:{tab:"remove_bg",subTool:"",img:a.src,w:m,h:_,action:"default_project",social_platform_id:0,targetPage:"",edType:"3"}});let P=Ue.c.siteUrl+i.router.serializeUrl(d);window.open(P,"_blank")})}).apply(this,arguments)}download(t,i,s){if("binary/octet-stream"==s||"application/octet-stream"==s)return void this.resolveOctetStreamExtension(t).then(a=>{this.aiPhotoService.myDownload(t,this.templateType,a,i)});let r=this.getUrlFileExtension(t)||this.commonService._getExtension(t)||"jpg";r=String(r).split(/[?#]/)[0].toLowerCase(),"jpeg"===r&&(r="jpg"),this.aiPhotoService.myDownload(t,this.templateType,r,i)}resolveOctetStreamExtension(t){const i=this.getUrlFileExtension(t);return i?Promise.resolve(i):new Promise(s=>{if(!t)return void s("jpg");const r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="blob",r.onload=()=>{200===r.status&&r.response?r.response.slice(0,12).arrayBuffer().then(d=>{s(this.extensionFromMagicBytes(new Uint8Array(d))||"jpg")}).catch(()=>s("jpg")):s("jpg")},r.onerror=()=>s("jpg"),r.send()})}getUrlFileExtension(t){if(!t)return null;try{const i=new URL(t,window.location.href).pathname.toLowerCase(),s=/\.([a-z0-9]+)$/i.exec(i);if(!s?.[1])return null;let r=s[1].toLowerCase();return"jpeg"===r&&(r="jpg"),["jpg","png","webp","gif","bmp","mp4"].includes(r)?r:null}catch{return null}}extensionFromMagicBytes(t){return t.length>=8&&137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]?"png":t.length>=3&&255===t[0]&&216===t[1]&&255===t[2]?"jpg":t.length>=12&&82===t[0]&&73===t[1]&&70===t[2]&&70===t[3]&&87===t[8]&&69===t[9]&&66===t[10]&&80===t[11]?"webp":t.length>=6&&71===t[0]&&73===t[1]&&70===t[2]?"gif":t.length>=8&&102===t[4]&&116===t[5]&&121===t[6]&&112===t[7]?"mp4":null}downloadAll(){let t=[];this.inDownloadProgress||(this.projectList.forEach(s=>{if(s.checked){switch(this.templateType){case 1:case 2:case 3:case 4:s.url=s.thumbUrl;break;case 5:s.url=s.urls&&s.urls.length?s.urls[0]:"";break;default:s.url=""}t.push(s)}}),t.length>0?(this.inDownloadProgress=!0,this.aiPhotoService.downloadAllMy(t,s=>{setTimeout(()=>{this.inDownloadProgress=!1},200)})):this.inDownloadProgress=!1)}checkStatus(t,i){const s=new Date(t.createdDate),r=new Date(s.setMinutes(s.getMinutes()+60));return"init"==t.status&&!t.inProgress&&r>new Date&&(t.inProgress=!0,this.startVideoProgress(t),this.aiGenerationService.checkStatus({assetId:t.assetId,avgResponseTimeInSec:3600,maxRetriesAllowed:360},0,m=>{if(m&&m.urls&&m.urls.length)return t.urls=m.urls,t.thumbUrl=m.thumbUrl,this.finishVideoProgress(t,()=>{t.status="active",t.inProgress=!1}),!1},m=>{},!0)),!0}startVideoProgress(t){this.stopVideoProgress();const i=new Date(t.createdDate).getTime(),s=Number.isFinite(i)?i:Date.now(),r=1e3*Math.max(1,this.paymentService.getGenerationTime(t.featureType)),a=()=>{const d=Math.max(0,Date.now()-s);t.generationProgress=Math.min(90,Math.floor(d/r*100))};a(),this.videoProgressTimer=setInterval(a,250)}finishVideoProgress(t,i){this.stopVideoProgress(),t.generationProgress=100,setTimeout(i,450)}stopVideoProgress(){null!=this.videoProgressTimer&&(clearInterval(this.videoProgressTimer),this.videoProgressTimer=null)}
1goToDashboard(){this.router.navigate(["/user-dashboard"])}onBrowserBack(){this.modalService.hasOpenModals()&&this.modalService.dismissAll()}reportabuse(t){const i=this.modalService.open(fe.e,{centered:!0,size:"lg",backdrop:"static",windowClass:"report-abuse-dialog"});i.componentInstance.item=t,i.result.then(s=>{s&&t?.assetId&&(this.removeProjectFromList(t.assetId),this.toastService.showSuccess("Report submitted successfully"))},()=>{})}openInsprrationsEditDialog(t){const i=this.modalService.open(Be.h,{centered:!0,size:"xxl",backdrop:"static",windowClass:"ai-design-editor-dialog"});this.aiPhotoService.isCompareEnable=!1,t.imgUrl=t.metadata.contentUrl,this.aiPhotoService.inspirationImgUrl=t.metadata.contentUrl,this.aiPhotoService.compareImageUrl=t.metadata.contentUrl,i.componentInstance.activeImgObj=t,i.componentInstance.aiPhotoService=this.aiPhotoService,i.result.then(s=>{})}}return(o=c).\u0275fac=function(t){return new(t||o)(e.rXU(T.i),e.rXU(L.s),e.rXU(Le.f),e.rXU(w.u),e.rXU(h.Bq),e.rXU(I.Ix),e.rXU(A.f),e.rXU(ve.n),e.rXU(te.g),e.rXU(b.Zg),e.rXU(He.I),e.rXU(u.A),e.rXU(l.qQ),e.rXU(e.zZn),e.rXU(ze.A),e.rXU(l.aZ),e.rXU(ie.L),e.rXU(I.nX),e.rXU(qe.k),e.rXU(H.K),e.rXU(Ke.P),e.rXU(Qe.w),e.rXU(be.h),e.rXU(ne.W),e.rXU(Pe.l))},o.\u0275cmp=e.VBU({type:o,selectors:[["app-projects-home"]],viewQuery:function(t,i){if(1&t&&e.GBs(Je,7),2&t){let s;e.mGM(s=e.lsd())&&(i.container=s.first)}},hostBindings:function(t,i){1&t&&e.bIt("popstate",function(){return i.onBrowserBack()},!1,e.tSv)},inputs:{aiImages:"aiImages"},outputs:{genAsInputImageEvent:"genAsInputImageEvent"},features:[e.Jv_([L.s,b.Zg])],decls:7,vars:1,consts:[["createinpro",""],["profolder",""],["proproject",""],["scrollContainer",""],["imageDiv",""],["myDrop","ngbDropdown"],["currentYearDate",""],["class","container-fluid projects-home p-ltrt ps-0","style","padding-right: calc(60px - 24px) !important;",4,"ngIf"],[1,"container-fluid","projects-home","p-ltrt","ps-0",2,"padding-right","calc(60px - 24px) !important"],[1,"row","g-0"],[1,"sidenav","mb-3","mt-3",2,"top","31px"],[1,"pane-section","box-right-wrapper","overflow-hidden",2,"height","calc(100%)"],[1,"scroll-content","pb-0"],["customScrollDir","",1,"is-popover-tb","scroll-container",2,"height","calc(100vh - 152px)"],[1,"list-unstyled","pt-3","pb-0","mb-0"],[1,"list-group-item","lh-normal",3,"click"],["name","leftarrownew",1,"f-24","mr-8","grey-500"],[1,"mt-2","mb-2"],[1,"list-group-item","lh-normal",3,"click","ngClass"],[1,"d-flex","align-items-center","pointer"],[3,"ngClass"],["name","aitools",1,"mr-8"],[1,"list-group-item","lh-normal","mt-1",3,"click","ngClass"],["name","uploadimage",1,"mr-8"],[1,"list-group-item","mt-1","lh-normal",3,"click","ngClass"],["name","videotemplates",1,"mr-8"],["name","photoeditor",1,"mr-8","f-24"],["name","videoeditor",1,"mr-8"],[1,"list-group","ps-0","pe-0","pb-0"],[1,"list-group-item","justify-content-between","pe-2",3,"click","ngClass"],[1,"d-flex","align-items-center","text-semi","grey-800"],[4,"ngIf"],[1,"d-inline-flex","align-items-center","justify-content-center","hw-32","add-icon"],["name","plusnew",1,"f-32","grey-800"],["class","list-group-item mt-1 d-flex pe-0",3,"ngClass",4,"ngFor","ngForOf"],[1,"settings-panel","ps-3","pe-3"],[1,"left-bar"],[1,"box-right-wrapper","bg-transparent","border-0","border-radius-0","p-0","shadow-none"],[1,"list-group","ps-0","pe-0","pb-3"],[1,"mt-2","mb-1"],[1,"main-user-content","pe-lg-0","pe-md-0","p-ltrt",2,"margin-top","48px"],[1,"page-user-content"],[1,"position-fixed","pe-2",2,"background","#f8f8fb","z-index","2","width","calc(100% - 414px)","padding","36px 0 0 0"],[1,"text-24","text-black","text-semi","h-48",3,"ngClass"],["class","d-flex justify-content-between selectedItem h-48",3,"ngClass",4,"ngIf"],[1,"d-flex","align-items-center","pt-5"],["class","placeholder-view ng-image-slider",4,"ngIf"],["infiniteScroll","",1,"templates-thumbs-list","mb-5","image-name","pt-5",2,"--row-height","176px",3,"scrolled","infiniteScrollDistance","infiniteScrollUpDistance","infiniteScrollThrottle"],["class","img-div img-format-2","data-toggle","modal","data-target","#exampleModal",3,"margin-left","margin-right","ngClass","click",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"count",4,"ngIf"],["class","mx-auto",4,"ngIf"],["class","upload-delete-section bg-primary text-white",4,"ngIf"],["name","proicon",1,"ms-1"],[1,"list-group-item","mt-1","d-flex","pe-0",3,"ngClass"],[1,"w-100","justify-content-between","align-items-center",3,"click","ngClass"],[1,"folder-Name","text-normal","text-regular","w-70","folder-Name"],[1,""],[1,"me-2"],["ngbDropdown","","container","body",1,"d-inline-block"],["id","dropdownBasic1","ngbDropdownToggle","",1,"btn-icon","icon","hw-32"],["name","dotes",1,"f-22"],["ngbDropdownMenu","","aria-labelledby","dropdownBasic1",1,"myproject","nav-small-device"],["ngbDropdownItem","",3,"click"],["name","deleteoth",1,"mr-8","f-20"],[1,"align-items-center"],["maxlength","40",1,"edit-folder","form-control","text-normal",3,"blur","ngModelChange","keyup","keyup.enter","id","ngModel"],[1,"input-group-append",2,"width","42px"],[1,"border-0"],[1,"btn","btn-primary","border-0","border-radius-8","hw-32","ms-1","p-0",3,"disabled"],["name","rightround",1,"f-30","btn-icon"],["name","proicon",2,"margin-right","14px"],["name","rename",1,"mr-8","f-20"],[1,"d-flex","justify-content-between","selectedItem","h-48",3,"ngClass"],[1,"d-flex","align-items-center"],[1,"me-3"],[1,"btn","btnCross","p-0",3,"click"],["name","closeprojects",1,"f-40"],[1,"text-13","text-dark","mr-12"],[1,"d-flex","align-items-center","p-2","selectAll"],[1,"checkboxc","d-flex"],["type","checkbox",1,"marked-check","mr-9",3,"click","checked"],["class","text-13 text-semi",4,"ngIf"],[1,"btn","btnTransparent","text-13","btn-h40","d-inline-flex",3,"click","disabled"],["name","movetofolder",1,"f-24","me-2"],[1,"btn","btnTransparent","text-13","btn-h40","ms-2","d-inline-flex",3,"click"],["name","deleteoth",1,"f-24","me-2"],[1,"text-13","text-semi"],[1,"btn","btnCross","p-6",3,"click"],[1,"btn","btnTransparent","text-13","btn-h40",3,"click"],["type","button","id","createZipButton",1,"btn","btnTransparent","text-13","btn-h40","ms-2",3,"click"],["class","spinner-border spinner-border-lg me-2 hw-24","role","status",4,"ngIf"],["name","downloadblack",1,"f-24","me-2"],["role","status",1,"spinner-border","spinner-border-lg","me-2","hw-24"],[1,"sr-only","text-nowrap","border-0","position-absolute","overflow-hidden"],[1,"placeholder-view","ng-image-slider"],[1,"inner",2,"--row-height","200px"],[1,"img",2,"width","calc(var(--row-height))","height","calc(var(--row-height))"],["data-toggle","modal","data-target","#exampleModal",1,"img-div","img-format-2",3,"click","ngClass"],[1,"c-img","d-flex","align-items-center","position-relative",2,"background","#ebebeb","border-radius","12px"],["loading","lazy","src","https://static.lightxeditor.com/assets/images/blankBgImg-add.png","alt","","title","",1,"",2,"opacity","1","top","0"],[1,"addNewProject","d-flex","align-items-center","justify-content-center"],[1,"caption","text-semi"],[1,"d-flex","align-items-center","justify-content-center","w-100","h-100","position-absolute"],["name","addtemplate",1,"f-32"],["class","img-div img-format-2 project-outer thumb-options",3,"ngClass","margin-left","margin-right","click",4,"ngIf"],["class","img-div img-edit-div img-format-2 project-outer thumb-options ",3,"ngClass","margin-left","margin-right","click",4,"ngIf"],["class"," img-div img-edit-div img-format-2 project-outer thumb-options",3,"ngClass","margin-left","margin-right","click",4,"ngIf"],[1,"img-div","img-format-2","project-outer","thumb-options",3,"click","ngClass"],[1,"row","m-0"],[1,"col-6"],[1,"checkboxc",3,"ngClass"],["type","checkbox",1,"marked-check",3,"click","checked"],[1,"col-6","text-end"],["ngbDropdown","","container","body",1,"edit-menu","d-inline-block",3,"openChange","ngClass"],["
1id","dropdownBasic1","ngbDropdownToggle","",1,"btn","btn-lg","btn-dropdwn","icon","hw-30"],["name","dotverticalwhite",1,"f-24"],["ngbDropdownMenu","","aria-labelledby","dropdownBasic1",1,"nav-small-device"],["name","duplicate",1,"mr-8","f-18"],["ngbDropdownItem","",3,"click","disabled"],["name","movetofolder",1,"f-18","mr-8"],[1,"border-radius-12","w-100"],[1,"c-img","d-flex","align-items-center","blur-bg",3,"click","ngClass"],[1,"custom-image-main","image-scape"],["loading","lazy","alt","","title","",1,"image","template__img","imgLandscape",2,"opacity","1","object-fit","contain","background","transparent",3,"error","src","ngClass"],[1,"row","m-0","d-name","d-flex","align-items-center"],[1,"col-12"],["class","caption text-semi",4,"ngIf","ngIfElse"],[1,"row","m-0","p-name","d-flex","align-items-center"],[1,"col-8"],["class","caption text-semi text-13",4,"ngIf"],[1,"col-4"],["class","project-locked div-backdrop d-flex align-items-center justify-content-center",4,"ngIf"],["name","proTemplateIcon","class","f-28 icon pro-template-icon image template__img",4,"ngIf"],["class","template__img playvideo-icon",3,"ngClass",4,"ngIf"],[1,"caption","text-semi","text-13"],[1,"project-locked","div-backdrop","d-flex","align-items-center","justify-content-center"],["container","body","popoverClass","pro-popover",1,"position-absolute","hw-20","pointer",3,"ngbPopover"],["name","infowhite",1,"f-32"],["name","proTemplateIcon",1,"f-28","icon","pro-template-icon","image","template__img"],[1,"template__img","playvideo-icon",3,"ngClass"],["name","playvideo",1,"f-32"],[1,"img-div","img-edit-div","img-format-2","project-outer","thumb-options",3,"click","ngClass"],[1,"row"],["name","remix16",1,"mr-8","f-20"],["name","downloadblack",1,"mr-8","f-18"],[1,"custom-image-main","edit-image-main","image-scape",2,"position","initial",3,"ngClass"],["loading","lazy",1,"image","template__img","imgLandscape",2,"opacity","1","object-fit","contain","background","transparent",3,"error","ngClass","src"],["class","hw-28 icon pro-template-icon image template__img",4,"ngIf"],["class","template__img playvideo-icon",4,"ngIf"],[1,"hw-28","icon","pro-template-icon","image","template__img"],[1,"template__img","playvideo-icon"],["name","photoeditor",1,"mr-8","f-20"],["name","downloadblack",1,"mr-8","f-20"],["name","reportabuse",1,"mr-8","f-20"],[1,"c-img","d-flex","align-items-center","ai-tools-related",2,"height","var(--row-height)","background","#ebebeb","border-radius","12px",3,"click","ngClass"],[1,"custom-image-main","edit-image-main",2,"position","initial",3,"ngClass"],["loading","lazy","class","image template__img overflow-hidden","style","transform: unset; object-fit: contain;",3,"src","error",4,"ngIf"],["class","ai-projects-label text-13 text-semi text-white text-truncate align-items-center ps-2 pe-2 justify-content-center",4,"ngIf"],["loading","lazy",1,"image","template__img","overflow-hidden",2,"transform","unset","object-fit","contain",3,"error","src"],[1,"ai-projects-label","text-13","text-semi","text-white","text-truncate","align-items-center","ps-2","pe-2","justify-content-center"],[1,"img-div","img-edit-div","img-format-2","project-outer","thumb-options",3,"mouseleave","mouseenter","click","ngClass"],[1,"checkboxc",2,"z-index","2 !important",3,"ngClass"],["ngbDropdown","","container","body",1,"edit-menu","d-inline-block",2,"z-index","2 !important",3,"openChange","ngClass"],["name","aivideo",1,"mr-8","f-20"],[1,"c-img","ai-tools-related",2,"height","var(--row-height)",3,"click"],[1,"custom-image-main"],["loading","lazy",1,"image","template__img",2,"opacity","1","height","100%","object-fit","contain","overflow","hidden",3,"src"],[1,"duration-text","text-10","text-semi","d-inline-flex","align-items-center","justify-content-center","text-white","ps-1","pe-1"],["class","c-img ai-tools-related is-playing","style","position: absolute;width: 100%;height: 100%; top: 0;z-index: 1;",3,"click",4,"ngIf"],[1,"template__img","playvideo-icon","icon-pos"],[2,"cursor","pointer"],["class","d-flex hw-32",3,"click",4,"ngIf"],[1,"c-img","ai-tools-related","is-playing",2,"position","absolute","width","100%","height","100%","top","0","z-index","1",3,"click"],["width","100%","height","100%","muted","","playsinline","","webkit-playsinline","","autoplay","","disableRC","","disablePictureInPicture","","controlslist","nodownload nofullscreen noremoteplayback",1,"video-box","p-0",3,"ended","i
1d"],[3,"src"],[1,"d-flex","hw-32",3,"click"],[1,"img-div","ai-thumb-genrated-item","d-flex","justify-content-center","align-items-center","flex-column","img-format-2","not-hov","circle-animation","mypro-bg-animation"],[1,"c-img","d-flex","justify-content-center","align-items-center",2,"height","var(--row-height)"],[1,"progress-col","text-center","custom-image-main","position-absolute","ps-2","pe-2",2,"top","calc(50% - 40px)"],["size","sm",3,"progress","message"],[1,"canvas"],[1,"aurora-bg"],[1,"blob","blob-1"],[1,"blob","blob-2"],[1,"blob","blob-3"],[3,"count"],[1,"mx-auto"],["class","mx-auto col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12 text-center d-flex align-items-center justify-content-center flex-column","style","height: 72vh;",4,"ngIf"],[1,"mx-auto","col-xs-12","col-sm-12","col-md-12","col-lg-12","col-xl-12","text-center","d-flex","align-items-center","justify-content-center","flex-column",2,"height","72vh"],[1,"mt-4"],["src","https://static.lightxeditor.com/assets/images/empty-folder.png",1,"img-fluid"],["class","container-msg mt-4",4,"ngIf"],[1,"container-msg","mt-4"],["class","btn btn-primary text-13 btn-h40 mt-3",3,"click",4,"ngIf"],[1,"btn","btn-primary","text-13","btn-h40","mt-3",3,"click"],[1,"btn","btn-primary","text-13","btn-h40","mt-3",2,"min-height","40px",3,"click"],[1,"upload-delete-section","bg-primary","text-white"],[1,"container-fluid"],[1,"d-flex","w-100","align-items-center","justify-content-between"],[1,"upgradenow-btn","btn-gradient","flo",3,"click"],[4,"ngComponentOutlet","ngComponentOutletInjector"]],template:function(t,i){1&t&&e.DNE(0,ni,68,56,"div",7)(1,si,1,2,"ng-template",null,0,e.C5r)(3,ai,1,2,"ng-template",null,1,e.C5r)(5,li,1,2,"ng-template",null,2,e.C5r),2&t&&e.Y8G("ngIf",!i.isMobileView)},dependencies:[l.YU,l.OI,l.Sq,l.bT,k.me,k.BC,k.tU,k.vS,Ce.f,xe.q,oe.G,je.q,ke.g,h.tg,h.do,h.U0,h._H,h.ZM,se.D,y.b,l.vh],styles:['.project-outer[_ngcontent-%COMP%]{float:left;position:relative}.edit-folder[_ngcontent-%COMP%]{width:210px;padding:1.4rem 0rem;background:transparent;border:none;outline:none;height:48px;color:#000;font-size:14px;border-radius:8px 0 0 8px}.upload-delete-section[_ngcontent-%COMP%]{position:fixed;bottom:12px;margin-left:370px;padding:.6rem 1rem;color:#000;background:#fffffff2;height:80px;display:flex;align-items:center;z-index:999;left:12px;right:12px;font-size:.875rem;font-weight:600;letter-spacing:.35px;box-shadow:0 4px 4px #00000040;border-radius:12px;border:0px!important}.upload-delete-section[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover{background:#626adf0d!important;border-radius:8px}.upload-delete-section[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:active{border-color:transparent!important}.checkboxc[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{width:32px;height:32px}input[type=checkbox][_ngcontent-%COMP%]:checked{width:20px;height:20px}.thumb-options[_ngcontent-%COMP%] .checkboxc[_ngcontent-%COMP%]{left:8px;top:8px}.thumb-options[_ngcontent-%COMP%] .edit-menu[_ngcontent-%COMP%]{right:8px;top:8px}.bottom-nav[_ngcontent-%COMP%]{display:inline-flex}.show[_ngcontent-%COMP%]{visibility:visible!important;opacity:1!important;border-radius:8px}.show[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{background-color:#ffffff0d;background-size:32px 32px!important}.show[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:hover{background-color:#fff3}.img-div[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-self:flex-end;cursor:pointer;transition:all .3s ease}.img-div[_ngcontent-%COMP%] .caption[_ngcontent-%COMP%]{display:none!important;overflow:hidden}.c-img[_ngcontent-%COMP%]{position:relative;width:100%;will-change:transform}.img-format-5[_ngcontent-%COMP%]{width:calc(var(--row-height) * .75);flex-grow:7.5}.img-format-5[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%]{padding-bottom:133.33%}.img-format-6[_ngcontent-%COMP%]{width:calc(var(--row-height) * 1.5);flex-grow:15}.img-format-6[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%]{padding-bottom:66%}.img-format-7[_ngcontent-%COMP%]{width:calc(var(--row-height) * .667);
1flex-grow:6.67}.img-format-7[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%]{padding-bottom:150%}.img-format-8[_ngcontent-%COMP%]{width:calc(var(--row-height) * .8);flex-grow:8}.img-format-8[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%]{padding-bottom:125%}.img-format-4[_ngcontent-%COMP%]{width:calc(var(--row-height) * 1.33);flex-grow:13.33}.img-format-4[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%]{padding-bottom:75%}.img-format-3[_ngcontent-%COMP%]{width:calc(var(--row-height) * .5625);flex-grow:5.625}.img-format-3[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%]{padding-bottom:178%}.img-format-2[_ngcontent-%COMP%], .img-format-a[_ngcontent-%COMP%]{width:calc(var(--row-height) * 1);flex-grow:10}.img-format-2[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%], .img-format-a[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%]{padding-bottom:100%}.img-format-1[_ngcontent-%COMP%], .img-format-10[_ngcontent-%COMP%], .img-format-30[_ngcontent-%COMP%]{width:calc(var(--row-height) * 1.777);flex-grow:17.77}.img-format-1[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%], .img-format-10[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%], .img-format-30[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%]{padding-bottom:56.3%}.btn-dropdwn[_ngcontent-%COMP%]{width:32px;height:32px;background:#00000040;padding:3px 0;border:0px;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.btn-dropdwn[_ngcontent-%COMP%]:hover, .btn-dropdwn[_ngcontent-%COMP%]:focus{background:#0006}.dropdown-item.disabled[_ngcontent-%COMP%]{color:#b0b3bf!important}.folder-Name[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.img-div[_ngcontent-%COMP%] .p-name[_ngcontent-%COMP%]{position:absolute;bottom:0;width:100%;height:12%}.img-div[_ngcontent-%COMP%] .p-name[_ngcontent-%COMP%] .caption[_ngcontent-%COMP%]{text-align:left;font-size:14px;color:#fff;white-space:nowrap;text-overflow:ellipsis}.img-div[_ngcontent-%COMP%] .p-name[_ngcontent-%COMP%] .edit-icon[_ngcontent-%COMP%], .p-date[_ngcontent-%COMP%]{display:none}.img-div[_ngcontent-%COMP%] .addNewProject[_ngcontent-%COMP%]{position:absolute;bottom:0;width:100%;height:12%}.img-div[_ngcontent-%COMP%] .addNewProject[_ngcontent-%COMP%] .caption[_ngcontent-%COMP%]{text-align:center;font-size:14px;color:#fff;line-height:19.07px;white-space:nowrap;text-overflow:ellipsis}.img-div[_ngcontent-%COMP%]:hover{transform:translateY(-8px)}.img-div[_ngcontent-%COMP%]:hover .p-name[_ngcontent-%COMP%]{background:#000000b3;transition:ease-out .24s;border-bottom-left-radius:12px;border-bottom-right-radius:12px}.img-div[_ngcontent-%COMP%]:hover .addNewProject[_ngcontent-%COMP%]{background:#0000004d;transition:ease-out .24s;border-bottom-left-radius:12px;border-bottom-right-radius:12px}.img-div[_ngcontent-%COMP%]:hover .p-date[_ngcontent-%COMP%]{display:block}.img-div[_ngcontent-%COMP%]:hover .caption[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%]:hover .edit-icon[_ngcontent-%COMP%]{display:block!important}.img-div[_ngcontent-%COMP%]:hover .d-name[_ngcontent-%COMP%]{background:linear-gradient(360deg,#0006,#0000);transition:ease-out .24s}.img-div[_ngcontent-%COMP%]:hover .d-nameAI[_ngcontent-%COMP%]{background:linear-gradient(360deg,#0006,#0000);transition:ease-out .24s;border-bottom-left-radius:12px;border-bottom-right-radius:12px}.img-div[_ngcontent-%COMP%] .d-name[_ngcontent-%COMP%]{position:absolute;bottom:12%;width:100%;height:12%}.img-div[_ngcontent-%COMP%] .d-name[_ngcontent-%COMP%] .caption[_ngcontent-%COMP%]{text-align:left;font-size:10px;color:#fff;text-shadow:0px 0px 1px #000000}.img-div[_ngcontent-%COMP%] .d-name[_ngcontent-%COMP%] .edit-icon[_ngcontent-%COMP%]{display:none}.img-div[_ngcontent-%COMP%] .d-nameAI[_ngcontent-%COMP%]{position:absolute;bottom:12%;width:100%;height:12%}.img-div[_ngcontent-%COMP%] .d-nameAI[_ngcontent-%COMP%] .caption[_ngcontent-%COMP%]{text-align:left;font-size:10px;color:#fff;text-shadow:0px 0px 1px #000000}.img-div[_ngcontent-%COMP%] .d-nameAI[_ngcontent-%COMP%] .edit-icon[_ngcontent-%COMP%]{display:none}.img-div[_ngcontent-%COMP%]:hover, .dropdown-hover[_ngcontent-%COMP%]{opacity:1;cursor:pointer}.pro-template-icon[_ngcontent-%COMP%]{position:absolute;top:unset;bottom:8px}.upgradenow-btn[_ngcontent-%COMP%]{width:152px;height:48px;color:#fff;border-radius:12px;border:1px solid #FFFFFF;box-shadow:none;font-size:16px}.playvideo-icon[_ngcontent-%COMP%]{position:absolute;right:8px;top:unset;bottom:8px}.playvideo-icon.icon-pos[_ngcontent-%COMP%]{position:absolute;right:auto;bottom:8px;left:8px}.img-div[_ngcontent-%COMP%]:hover .pro-template-icon[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%]:hover .playvideo-icon[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%]:hover .duration-text[_ngcontent-%COMP%]{display:none!important}.edit-image-main[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;margin:auto;height:100%;width:100%;left:0;right:0;border-radius:12px}.img-edit-div[_ngcontent-%COMP%], .img-format-0[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-self:flex-end;cursor:pointer}.img-edit-div[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .img-format-0[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain!important;overflow:hidden;border-radius:12px}.disableDiv[_ngcontent-%COMP%]{pointer-events:none}.container-msg[_ngcontent-%COMP%]{font-size:16px;color:#000;line-height:25.6px}.selectedItem[_ngcontent-%COMP%] .checkboxc[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{width:24px;height:24px}.btnTransparent[_ngcontent-%COMP%]{display:flex;align-items:center;background:transparent;border-radius:12px;padding:0 12px;border:0!important}.btnTransparent[_ngcontent-%COMP%]:hover{background:#626adf0d}.btnCross[_ngcontent-%COMP%]{border-radius:12px}
1.btnCross[_ngcontent-%COMP%]:hover{background:#626adf0d}.selectAll[_ngcontent-%COMP%]{border-radius:12px}.selectAll[_ngcontent-%COMP%]:hover{background:#626adf0d}.selectAll[_ngcontent-%COMP%] .checkboxc[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{cursor:pointer;-webkit-appearance:none;appearance:none;background-color:transparent!important;position:relative;width:24px;height:24px;border:0px solid transparent;border-radius:0!important;background:url(https://static.lightxeditor.com/assets/images/checkbox-grey.svg) no-repeat;background-size:cover!important}.selectAll[_ngcontent-%COMP%] .checkboxc[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked{background:url(https://static.lightxeditor.com/assets/images/checkbox-grey-active.svg) no-repeat!important;border:0px!important;background-size:cover!important}.selected-image[_ngcontent-%COMP%]{transform:translateY(-8px)}.dropdown[_ngcontent-%COMP%]{z-index:1!important}.ai-thumb-genrated-item[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%]{border-radius:12px;background:#626adf0d;position:relative;margin:0 20px 40px;display:inline-flex;justify-content:center;align-items:center}.ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%]{position:relative}.ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%] .ai-projects-label[_ngcontent-%COMP%], .ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%] .ai-projects-badge[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%] .ai-projects-label[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%] .ai-projects-badge[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:opacity .1s ease-in-out,visibility .1s ease-in-out}.ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img.ai-tools-related[_ngcontent-%COMP%]:hover .ai-projects-label[_ngcontent-%COMP%], .ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img.ai-tools-related[_ngcontent-%COMP%]:hover .ai-projects-badge[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%] .c-img.ai-tools-related[_ngcontent-%COMP%]:hover .ai-projects-label[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%] .c-img.ai-tools-related[_ngcontent-%COMP%]:hover .ai-projects-badge[_ngcontent-%COMP%]{opacity:1;visibility:visible;transition:opacity .1s ease-in-out,visibility .1s ease-in-out}.ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img.ai-tools-related[_ngcontent-%COMP%]:hover:after, .img-div[_ngcontent-%COMP%] .c-img.ai-tools-related[_ngcontent-%COMP%]:hover:after{position:absolute;content:"";height:44px;border-radius:0 0 16px 16px;background:linear-gradient(0deg,#000000a1,#6660);bottom:0;left:0;width:100%;z-index:1}.ai-thumb-genrated-item[_ngcontent-%COMP%] .progress-col[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%] .progress-col[_ngcontent-%COMP%]{flex-wrap:wrap}.ai-thumb-genrated-item[_ngcontent-%COMP%] .progress-col[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%] .progress-col[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:77px!important;height:58px!important}.ai-thumb-genrated-item[_ngcontent-%COMP%] .progress-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%] .progress-col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#181a20;display:inline-block}.ai-thumb-genrated-item[_ngcontent-%COMP%] video[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{background:transparent!important}.ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img.ai-tools-related.is-playing[_ngcontent-%COMP%] video.video-box[_ngcontent-%COMP%], .img-div[_ngcontent-%COMP%] .c-img.ai-tools-related.is-playing[_ngcontent-%COMP%] video.video-box[_ngcontent-%COMP%]{object-fit:contain;background:transparent!important;-webkit-appearance:none}.ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img.ai-tools-related.is-playing[_ngcontent-%COMP%] video.video-box[_ngcontent-%COMP%]::-webkit-media-controls, .ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img.ai-tools-related.is-playing[_ngcontent-%COMP%] video.video-box[_ngcontent-%COMP%]::-webkit-media-controls-enclosure, .ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img.ai-tools-related.is-playing[_ngcontent-%COMP%] video.video-box[_ngcontent-%COMP%]::-webkit-media-controls-panel, .ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img.ai-tools-related.is-playing[_ngcontent-%COMP%] video.video-box[_ngcontent-%COMP%]::-webkit-media-controls-start-playback-button, .ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img.ai-tools-related.is-playing[_ngcontent-%COMP%] video.video-box[_ngcontent-%COMP%]::-webkit-media-controls-overlay-play-button, .img-div[_ngcontent-%COMP%] .c-img.ai-tools-related.is-playing[_ngcontent-%COMP%] video.video-box[_ngcontent-%COMP%]::-webkit-media-controls, .
1img-div[_ngcontent-%COMP%] .c-img.ai-tools-related.is-playing[_ngcontent-%COMP%] video.video-box[_ngcontent-%COMP%]::-webkit-media-controls-enclosure, .img-div[_ngcontent-%COMP%] .c-img.ai-tools-related.is-playing[_ngcontent-%COMP%] video.video-box[_ngcontent-%COMP%]::-webkit-media-controls-panel, .img-div[_ngcontent-%COMP%] .c-img.ai-tools-related.is-playing[_ngcontent-%COMP%] video.video-box[_ngcontent-%COMP%]::-webkit-media-controls-start-playback-button, .img-div[_ngcontent-%COMP%] .c-img.ai-tools-related.is-playing[_ngcontent-%COMP%] video.video-box[_ngcontent-%COMP%]::-webkit-media-controls-overlay-play-button{display:none!important;-webkit-appearance:none;opacity:0!important;pointer-events:none!important}.progress-col-item[_ngcontent-%COMP%]{background:#eeedf3!important;-webkit-backdrop-filter:blur(8px)!important;backdrop-filter:blur(8px)!important}.not-hov[_ngcontent-%COMP%]:hover .c-img[_ngcontent-%COMP%]:before{background:transparent!important}.image-scape[_ngcontent-%COMP%] .imgLandscape[_ngcontent-%COMP%]{border:1px solid #E2E3E9;height:auto!important;width:83%!important}.image-scape[_ngcontent-%COMP%] .imgPortrait[_ngcontent-%COMP%]{border:1px solid #E2E3E9;height:83%!important;width:auto!important}.blur-bg[_ngcontent-%COMP%]{height:var(--row-height);border-radius:12px;background:#c3c2cf66;-webkit-backdrop-filter:blur(40px);backdrop-filter:blur(40px);height:100%;width:100%}.ai-projects-label[_ngcontent-%COMP%]{position:absolute;width:auto;max-width:calc(100% - 16px);line-height:28px;height:28px;left:8px;bottom:8px;border-radius:50px;background:linear-gradient(273deg,#626adfcc,#a64dffcc);z-index:2}.duration-text[_ngcontent-%COMP%]{border-radius:6px;background:#181a2066;position:absolute;right:8px;bottom:9px;height:22px}.add-icon[_ngcontent-%COMP%]{border-radius:6px}.add-icon[_ngcontent-%COMP%]:hover{background:#626adf0d!important}']}),c})();function pi(o,c){if(1&o){const n=e.RV6();e.j41(0,"button",16),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.activeModal.dismiss("Cross click"))}),e.nrm(1,"pi",17),e.k0s()}}let Te=(()=>{var o;class c{constructor(t,i,s){this.activeModal=t,this.modalService=i,this.env=s}ngOnInit(){}delete(){this.activeModal.close("ok")}}return(o=c).\u0275fac=function(t){return new(t||o)(e.rXU(h.Lw),e.rXU(h.Bq),e.rXU(ie.L))},o.\u0275cmp=e.VBU({type:o,selectors:[["app-account-delete"]],decls:31,vars:1,consts:[[1,"modal-header","border-0"],["type","button","aria-hidden","close","class","close",3,"click",4,"ngIf"],[1,"wp-100"],[1,"border-0"],[1,"accountImg","mx-auto",2,"width","193px"],["srcset","https://static.lightxeditor.com/assets/images/account-delete.webp","type","image/webp"],["src","https://static.lightxeditor.com/assets/images/account-delete.png","width","auto","height","auto","alt","Professional Level Graphic Designing - LightX","loading","lazy",1,"responsive"],[1,""],[1,"mx-auto","scroll-y","mt-13","p-ltrt"],[1,"headingTxt","text-semi"],[1,"mt-3"],[1,"lite","mt-1","text-semi"],[1,"text-semi","mt-12"],[1,"wp-100","mt-12","mb-12","d-flex","justify-content-center","p-ltrt"],[1,"btn","btn-primary","text-13","btn-h40","w-100",3,"click"],[1,"btn-all","btn-outline-secondary","text-13","btn-h40","w-100","ms-2",3,"click"],["type","button","aria-hidden","close",1,"close",3,"click"],["name","close",1,"f-30"]],template:function(t,i){1&t&&(e.j41(0,"div",0),e.DNE(1,pi,2,0,"button",1),e.k0s(),e.j41(2,"div",2)(3,"div",3)(4,"div",4)(5,"picture"),e.nrm(6,"source",5)(7,"img",6),e.k0s()(),e.j41(8,"div",7)(9,"div",8)(10,"p",9),e.EFF(11,"Delete Account"),e.k0s(),e.j41(12,"p",10),e.EFF(13,"This will permanently delete your LightX account. Please note that you will not be able to Sign Up with the same email-id again for the next 15 days. "),e.k0s(),e.j41(14,"p",10),e.EFF(15,"The following will be deleted as well"),e.k0s(),e.j41(16,"ul",11)(17,"li"),e.EFF(18,"All projects and folders created"),e.k0s(),e.j41(19,"li"),e.EFF(20,"All uploaded media"),e.k0s(),e.j41(21,"li"),e.EFF(22,"Any ongoing subscription will be deactivated"),e.k0s()(),e.j41(23,"div",12)(24,"p"),e.EFF(25,"Are you sure you want to delete?"),e.k0s()()(),e.j41(26,"div",13)(27,"button",14),e.bIt("click",function(){return i.activeModal.dismiss("Cross click")}),e.EFF(28,"Cancel"),e.k0s(),e.j41(29,"button",15),e.bIt("click",function(){return i.delete()}),e.EFF(30,"Delete"),e.k0s()()()()()),2&t&&(e.R7$(),e.Y8G("ngIf",!i.env.isMobileView))},dependencies:[l.bT,y.b],styles:[".headingTxt[_ngcontent-%COMP%]{font-size:24px;line-height:33px;color:#000}p[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:#000}.text-bold[_ngcontent-%COMP%]{font-weight:700;font-size:14px;color:#000}ul[_ngcontent-%COMP%]{list-style:disc;margin:-12px 0 0;padding:0;padding-left:1rem}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:14px;color:#000}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .check-blue[_ngcontent-%COMP%]{display:inline-block;margin-right:1.3rem;-webkit-mask-size:cover;mask-size:cover}.accountImg[_ngcontent-%COMP%]{text-align:center}.modal-sm[_ngcontent-%COMP%]{max-width:400px!important;float:none!important;top:37px!important;right:20px!important}"]}),c})();var mi=p(24895),Oe=p(53543),q=p(71242),gi=p(22392),ui=p(33674),Se=p(52595);let _i=(()=>{var o;class c extends h.dn{constructor(){super(...arguments),this.DELIMITER="/"}fromModel(t){if(t){let i=t.split(this.DELIMITER);return{day:parseInt(i[1],10),month:parseInt(i[0],10),year:parseInt(i[2],10)}}return null}toModel(t){return t?t.month+this.DELIMITER+t.day+this.DELIMITER+t.year:null}}return(o=c).\u0275fac=(()=>{let n;return function(i){return(n||(n=e.xGo(o)))(i||o)}})(),o.\u0275prov=e.jDH({token:o,factory:o.\u0275fac}),c})(),hi=(()=>{var o;class c extends h.tN{constructor(){super(...arguments),this.DELIMITER="/"}parse(t){if(t){let i=t.split(this.DELIMITER);return{day:parseInt(i[1],10),month:parseInt(i[0],10),year:parseInt(i[2],10)}}return null}format(t){return t?t.month+this.DELIMITER+t.day+this.DELIMITER+t.year:""}}return(o=c).\u0275fac=(()=>{let n;return function(i){return(n||(n=e.xGo(o)))(i||o)}})(),o.\u0275prov=e.jDH({token:o,factory:o.\u0275fac}),c})();var fi=p(43695),Ge=p(27707),re=p(89818),vi=p(44425);const $=o=>({"is-invalid":o}),ae=o=>({active:o}),Fe=o=>({passwordactive:o}),bi=o=>({"w-100":o}),Ae=o=>({"d-none":o}),Pi=o=>
1({"invalid-feedback":o});function Ci(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",62)(1,"div",63),e.EFF(2),e.nI1(3,"codename"),e.k0s(),e.j41(4,"div",64)(5,"button",65),e.bIt("click",function(){e.eBV(n),e.XpG();const i=e.sdS(13);return e.Njj(i.click())}),e.j41(6,"span",66),e.EFF(7,"Change"),e.k0s()(),e.j41(8,"button",67)(9,"span",66),e.EFF(10,"Remove"),e.k0s()()(),e.j41(11,"div",68),e.bIt("click",function(){e.eBV(n),e.XpG();const i=e.sdS(13);return e.Njj(i.click())}),e.nrm(12,"pi",69),e.k0s()()}if(2&o){const n=e.XpG();e.xc7("background",n.gravtarBg),e.R7$(2),e.JRh(e.bMT(3,6,n.user.name||n.user.email)),e.R7$(2),e.Y8G("ngClass",n.env.isMobileView?"d-none":"d-flex"),e.R7$(4),e.Y8G("ngClass",e.eq3(8,Ae,!n.user.profilePicUrl)),e.R7$(3),e.Y8G("ngClass",n.env.isMobileView?"d-flex":"d-none")}}function xi(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",62),e.nrm(1,"div",70),e.j41(2,"div",64)(3,"button",65),e.bIt("click",function(){e.eBV(n),e.XpG();const i=e.sdS(13);return e.Njj(i.click())}),e.j41(4,"span",66),e.EFF(5,"Change"),e.k0s()(),e.j41(6,"button",71),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.deleteProfilePic())}),e.j41(7,"span",66),e.EFF(8,"Remove"),e.k0s()()(),e.j41(9,"div",68),e.bIt("click",function(){e.eBV(n),e.XpG();const i=e.sdS(13);return e.Njj(i.click())}),e.nrm(10,"pi",69),e.k0s()()}if(2&o){const n=e.XpG();e.R7$(),e.xc7("background-image","url("+n.profilePicUrl||0),e.R7$(),e.Y8G("ngClass",n.env.isMobileView?"d-none":"d-flex"),e.R7$(4),e.Y8G("ngClass",e.eq3(5,Ae,!n.user.profilePicUrl)),e.R7$(3),e.Y8G("ngClass",n.env.isMobileView?"d-flex":"d-none")}}function ji(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Please provide a valid Name"),e.k0s())}function ki(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Name can be max 25 characters long"),e.k0s())}function Ii(o,c){if(1&o&&(e.j41(0,"div",72),e.DNE(1,ji,2,0,"span",73)(2,ki,2,0,"span",73),e.k0s()),2&o){const n=e.XpG();e.Y8G("ngClass",e.eq3(3,Pi,n.submit)),e.R7$(),e.Y8G("ngIf",!n.editProfile.name||!(n.editProfile.name&&n.editProfile.name.trim())),e.R7$(),e.Y8G("ngIf",n.editProfile.name&&(null==n.editProfile.name?null:n.editProfile.name.length)>24)}}function wi(o,c){if(1&o&&(e.j41(0,"ng-option",74),e.EFF(1),e.k0s()),2&o){const n=c.$implicit;e.Y8G("value",n.professionTypeId),e.R7$(),e.SpI(" ",n.professionType,"")}}function yi(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Please select your valid date of birth"),e.k0s())}function Mi(o,c){if(1&o&&(e.j41(0,"div",75),e.DNE(1,yi,2,0,"span",73),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",n.submit&&""===n.editProfile.dob)}}function Ti(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Please provide your old password"),e.k0s())}function Oi(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Password must be at least 8 characters long"),e.k0s())}function Si(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Password can be max 40 characters long"),e.k0s())}function Gi(o,c){if(1&o&&(e.j41(0,"div",75),e.DNE(1,Ti,2,0,"span",73)(2,Oi,2,0,"span",73)(3,Si,2,0,"span",73),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.Y8G("ngIf",n.submitPassword&&""===n.oldPassword),e.R7$(),e.Y8G("ngIf",n.submitPassword&&""!==n.oldPassword&&n.oldPassword.length<8),e.R7$(),e.Y8G("ngIf",n.submitPassword&&""!==n.oldPassword&&n.oldPassword.length>40)}}function Fi(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",76)(1,"h6",77),e.EFF(2,"Current Password"),e.k0s(),e.j41(3,"input",78),e.mxI("ngModelChange",function(i){e.eBV(n);const s=e.XpG();return e.DH7(s.oldPassword,i)||(s.oldPassword=i),e.Njj(i)}),e.k0s(),e.DNE(4,Gi,4,3,"div",40),e.k0s()}if(2&o){const n=e.XpG();e.R7$(3),e.R50("ngModel",n.oldPassword),e.Y8G("ngClass",e.eq3(3,$,n.submitPassword&&(""===n.oldPassword||n.oldPassword.length<8||n.oldPassword.length>40))),e.R7$(),e.Y8G("ngIf",n.submitPassword&&(""===n.oldPassword||n.oldPassword.length<8||n.oldPassword.length>40))}}function Ai(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Please enter the password"),e.k0s())}function Ri(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Password must be at least 8 characters long"),e.k0s())}function Ei(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Password can be max 40 characters long"),e.k0s())}function Di(o,c){if(1&o&&(e.j41(0,"div",75),e.DNE(1,Ai,2,0,"span",73)(2,Ri,2,0,"span",73)(3,Ei,2,0,"span",73),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",n.submitPassword&&""===n.password),e.R7$(),e.Y8G("ngIf",n.submitPassword&&""!==n.password&&n.password.length<8),e.R7$(),e.Y8G("ngIf",n.submitPassword&&""!==n.password&&n.password.length>40)}}
1function Ni(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Please enter the confirm password"),e.k0s())}function Vi(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Password did not match"),e.k0s())}function $i(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Password must be at least 8 characters long"),e.k0s())}function Xi(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Password can be max 40 characters long"),e.k0s())}function Ui(o,c){if(1&o&&(e.j41(0,"div",75),e.DNE(1,Ni,2,0,"span",73)(2,Vi,2,0,"span",73)(3,$i,2,0,"span",73)(4,Xi,2,0,"span",73),e.k0s()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",n.submitPassword&&""===n.retypePassword),e.R7$(),e.Y8G("ngIf",n.submitPassword&&n.misMatchPassword),e.R7$(),e.Y8G("ngIf",n.submitPassword&&""!==n.retypePassword&&n.retypePassword.length<8),e.R7$(),e.Y8G("ngIf",n.submitPassword&&""!==n.retypePassword&&n.retypePassword.length>40)}}function Yi(o,c){1&o&&(e.j41(0,"div",79)(1,"span"),e.EFF(2,"Please provide a valid Name"),e.k0s()())}let Bi=(()=>{var o;class c{constructor(t,i,s,r,a,d,m,_,P){this.env=t,this.authService=i,this.modalService=s,this.toastService=r,this.commonService=a,this.projectService=d,this.confirmDialogService=m,this.ngbCalendar=_,this.dateAdapter=P,this.inProgress=!1,this.submit=!1,this.submitPassword=!1,this.oldPassword="",this.password="",this.retypePassword="",this.professionOptions=[],this.profilePicUrl="",this.oldPasswordTextType=!1,this.passwordTextType=!1,this.confirmPasswordTextType=!1,this.gravtarBg="#00AA55",this.invalidFile=!1,this.minDate={year:1917,month:1,day:1},this.toastService.removeAll(),this.user=this.authService.profile.user,this.getProfessionList(),this.gravtarBg=this.getGravtarbg(),this.editProfile={name:this.user.name?this.user.name:"",bio:"",gender:this.user.gender,dob:this.user.dob,email:this.user.email,professionTypeId:null},this.user&&(this.profilePicUrl=this.user.profilePicUrl+"?"+(new Date).getTime()),this.refreshUserDetails();let C=new Date;this.maxDate={year:C.getFullYear(),month:C.getMonth()+1,day:C.getDate()}}getGravtarbg(){return this.user&&this.user.name?Ge.PV.gravtarbg[this.user.name.charAt(0).toLowerCase()]:this.user&&this.user.email?Ge.PV.gravtarbg[this.user.email.charAt(0).toLowerCase()]:"#00AA55"}ngOnInit(){}get misMatchPassword(){return this.password!==this.retypePassword}get today(){return this.dateAdapter.toModel(this.ngbCalendar.getToday())}getProfessionList(){this.projectService.professionList(t=>{if(t){let i=t.professions,s=[];for(let r=0;r<i.length;r++)s[r]=i[r];s.unshift({professionType:"Select your profession",professionTypeId:0}),this.professionOptions=s}this.editProfile.professionTypeId=this.user.professionTypeId},t=>{})}selectGender(t){this.editProfile.gender=t}updatePassword(t){if(this.password||this.oldPassword){if(this.submitPassword=!0,!this.misMatchPassword){let i="";this.oldPassword&&(i=Se.sha512.hex(this.oldPassword));let s=Se.sha512.hex(this.password),r={systemRefKey:this.user.systemRefKey,audits:[{auditType:"PASSWORD",oldValue:i,newValue:s}]};this.inProgress=!0,this.authService.updatePassword(r,a=>{this.password="",this.oldPassword="",this.retypePassword="",this.inProgress=!1,this.submitPassword=!1,t()},a=>{this.inProgress=!1})}}else t()}updateProfile(t){this.detactChanges()?(this.inProgress=!0,this.authService.updateProfile(this.editProfile,i=>{this.refreshUserDetails(),t(),this.inProgress=!1},i=>{this.inProgress=!1})):t()}update(){this.submit=!0,this.validate()&&this.updateProfile(()=>{this.updatePassword(()=>{this.toastService.removeAll(),this.toastService.showSuccess(g.b.message.saveSuccess),this.submit=!1,this.submitPassword=!1})})}validate(){return!(!this.editProfile.name||!this.editProfile.name.trim()||this.editProfile.name.length>25||(this.password||this.oldPassword)&&(this.submitPassword=!0,this.misMatchPassword||this.user.passwordPresent&&(!this.oldPassword||this.oldPassword.length<8||this.oldPassword.length>40)||!this.password||this.password.length<8||this.password.length>40))}detactChanges(){return this.editProfile.name!==this.user.name||this.editProfile.gender!==this.user.gender||this.editProfile.professionTypeId!==this.user.professionTypeId||this.editProfile.dob!==this.user.dob||this.editProfile.email!==this.user.email||""!==this.oldPassword||""!==this.password||""!==this.retypePassword}refreshUserDetails(){this.authService.getUserDetails(this.user.systemRefKey,t=>{t?(this.inProgress=!1,this.user=t.body.user,this.editProfile.professionTypeId=this.user.professionTypeId):(this.inProgress=!1,this.user=this.authService.profile.user,this.editProfile.professionTypeId=this.user.professionTypeId)},t=>{this.inProgress=!1})}onFileInput(t){let i=t.target||t.currentTarget,s=i.files.length>0?i.files[0]:null;if(s.name.substr(s.name.lastIndexOf(".")+1),"image/jpg"===s.type||"image/jpeg"===s.type||"image/png"===s.type||"image/webp"===s.type){let a=this.confirmDialogService.showProgress(),d=s.type;this.delete(()=>
1{this.resizeFile(s,d,m=>{this.profilePicUrl=window.URL.createObjectURL(m),this.authService.updateProfilePicture({size:m.size,contentType:d,name:s.name},P=>{if(P&&P.body){let C=P.body.presignedUrl,M=new File([m],s.name,{type:d});this.commonService.upload(M,C).then(()=>{this.toastService.removeAll(),setTimeout(()=>{this.refreshUserDetails(),a.dismiss(),this.toastService.showSuccess(g.b.message.profilepicuploadsuccess)},3e3),this.invalidFile=!1}).catch(()=>{a.dismiss()})}},P=>{a.dismiss()})})})}else this.invalidFile=!0,this.toastService.showError(g.b.message.uploadImageCommonValidMsg)}delete(t){this.authService.deleteProfilePicture(i=>{i&&t()},i=>{})}deleteProfilePic(){this.confirmDialogService.open({title:g.b.message.removeprofilepicture,okButtonText:"Yes",cancelButtonText:"No"},()=>{this.authService.deleteProfilePicture(t=>{t&&(this.toastService.removeAll(),this.toastService.showSuccess(g.b.message.profilepicremovesuccess),this.refreshUserDetails(),this.user=this.authService.profile.user,this.profilePicUrl=this.tempPicUrl)},t=>{})},()=>{})}deleteLightXaccount(){this.modalService.open(Te,{centered:!0,size:"sm",backdrop:"static",windowClass:"account-delete"}).result.then(i=>{"ok"===i&&this.authService.deleteAccount(s=>{s&&this.authService.logout(r=>{})},s=>{})})}imageValidate(t){return!(t.size<2048&&("image/png"===t.contentType||"image/jpg"===t.contentType||"image/jpeg"===t.contentType))}loadImage(t){return new Promise((i,s)=>{let r=new Image;r.onload=()=>i(r),r.onerror=s,r.crossOrigin="anonymous",r.src=t})}resizeFile(t,i,s=null){if("image/png"===i)return void s(t);let r=new Image;r.src=window.URL.createObjectURL(t),r.onload=()=>{r.width>500||r.height>500?fi.k.checkAndResizeImage(r,(a,d,m)=>{s(m)},500,500,i):s(t)}}}return(o=c).\u0275fac=function(t){return new(t||o)(e.rXU(ie.L),e.rXU(w.u),e.rXU(h.Bq),e.rXU(A.f),e.rXU(be.h),e.rXU(T.i),e.rXU(te.g),e.rXU(h.iF),e.rXU(h.dn))},o.\u0275cmp=e.VBU({type:o,selectors:[["app-account"]],features:[e.Jv_([{provide:h.dn,useClass:_i},{provide:h.tN,useClass:hi}])],decls:98,vars:58,consts:[["fileInput",""],["d","ngbDatepicker"],[1,"container-fluid","pe-md-0","ps-md-0","pl-13","pr-13","pe-0","ps-0","p-ltrt","account-settings","remove-padding"],[1,"row","g-0"],[1,"page-user-content","container-fluid","p-0","ps-0","pe-0"],[1,""],[1,"text-black","text-semi"],[1,"p-4","mt-4","box-right-wrapper"],[1,"col-xs-12","col-sm-12","col-md-12","col-lg-3","col-xl-3","p-0"],[1,"d-flex","justify-content-center","mb-36"],["type","file","accept","image/jpg, image/jpeg, image/png, image/webp",2,"display","none",3,"change","click"],["class","edit-profile-blank",3,"background",4,"ngIf"],["class","edit-profile-blank",4,"ngIf"],[1,"col-xs-12","col-sm-12","col-md-12","col-lg-6","col-xl-6","ms-lg-5","text-semi"],[1,"form-group","m-0","form-label-group"],["for","fname"],["type","text","id","fname","id","name","autocomplete","off","aria-describedby","emailHelp","placeholder","Enter name",1,"form-control",3,"ngModelChange","ngModel","ngClass"],[3,"ngClass",4,"ngIf"],[1,"form-group","mb-0","form-label-group",3,"ngClass"],["for","email"],["type","text","id","email","disabled","","id","email","placeholder","Enter email address",1,"form-control",3,"ngModelChange","ngModel"],[1,"form-group","mb-0","form-label-group","account-settings",3,"ngClass"],["for","profession"],["autofocus","","id","profession","placeholder","Select your profession",1,"select-menu","drop-d",3,"ngModelChange","searchable","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"form-group","mb-0",3,"ngClass"],[1,"mb-7"],[1,"subnav-btn-group","wp-100","d-flex"],[1,"btn","btn-outline-primary","btn-gender","active","mr-11",3,"click","ngClass"],["name","male",1,"icon","f-24","me-0"],[1,"mt-8"],[1,"btn","btn-outline-primary","btn-gender","mr-11",3,"click","ngClass"],["name","female",1,"icon","f-24","me-0"],[1,"btn","btn-outline-primary","btn-gender",3,"click","ngClass"],["name","othergender",1,"icon","f-24","me-0"],[1,"form-group","form-label-group","calendar",3,"ngClass"],["for","dob"],["type","text","id","dob","readonly","true","id","dob","autocomplete","off","aria-describedby","emailHelp","placeholder","Select your birth date","name","dp","ngbDatepicker","",1,"form-control",3,"ngModelChange","click","ngModel","ngClass","minDate","maxDate"],[1,"link",3,"click"],["name","calender",1,"show-password-cal","f-24"],["class","invali
1d-feedback p-0",4,"ngIf"],[1,"text-semi"],[1,"mt-4","mb-4"],[1,"p-12","mt-3","box-right-wrapper"],[1,"col-xs-12","col-sm-12","col-md-3","col-lg-3","col-xl-3","d-flex","align-items-center","justify-content-center"],[1,"col-xs-12","col-sm-12","col-md-12","col-lg-6","col-xl-6","ms-lg-5"],["class","form-group mb-36 form-label-group",4,"ngIf"],[1,"form-group","mb-0","form-label-group"],["for","password"],["type","password","id","password","placeholder","Enter Password",1,"form-control","with-icon",3,"ngModelChange","ngModel","type","ngClass"],["name","grayeye",1,"show-password","f-22",3,"ngClass"],[1,"form-group","mt-36","mb-0","form-label-group"],["for","retypePassword"],["type","password","id","retypePassword","placeholder","Enter Password",1,"form-control","with-icon",3,"ngModelChange","ngModel","type","ngClass"],["class","invalid-feedback wp-100 mt-36 d-flex",4,"ngIf"],[1,"wp-100","mt-36","d-flex","flex-column","justify-content-between"],[1,"btn","btn-primary","btn-h48","text-lg","pl-12","pr-12",2,"width","max-content",3,"click","disabled","ngClass"],[1,"mb-5"],["for","retypePassword",1,"text-black","text-normal","text-semi"],[1,"text-normal","grey-300","lh-p5"],[1,"wp-100","mt-10","d-flex","justify-content-between"],[1,"btn","btn-light","btn-delete","btn-link","btn-h48","text-lg","pl-12","pr-12",3,"click","disabled"],[1,"edit-profile-blank"],[1,"profile-code-name","d-flex","align-items-center","justify-content-center"],[1,"btnBox",3,"ngClass"],[1,"btn","btn-white","btn-h40","text-13","ps-4","pe-4",3,"click"],[1,"text-dark"],[1,"btn","btn-white","btn-h40","text-13","ps-4","pe-4","mt-2",3,"ngClass"],[1,"edit-pic-div","hw-30","link","float-end",3,"click","ngClass"],["name","editpic",1,"f-16","editpos",2,"to
1p","-1px"],[1,"profile-picture","d-flex","align-items-center","justify-content-center"],[1,"btn","btn-white","btn-h40","text-13","ps-4","pe-4","mt-2",3,"click","ngClass"],[3,"ngClass"],[4,"ngIf"],[3,"value"],[1,"invalid-feedback","p-0"],[1,"form-group","mb-36","form-label-group"],["for","oldPassword"],["type","password","id","oldPassword","placeholder","Enter Password",1,"form-control","with-icon",3,"ngModelChange","ngModel","ngClass"],[1,"invalid-feedback","wp-100","mt-36","d-flex"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",5)(5,"div",5)(6,"h3",6),e.EFF(7,"Personal Details"),e.k0s()(),e.j41(8,"div",7)(9,"div",3)(10,"div",8)(11,"div",9)(12,"input",10,0),e.bIt("change",function(a){return e.eBV(s),e.Njj(i.onFileInput(a))})("click",function(){e.eBV(s);const a=e.sdS(13);return e.Njj(a.value="")}),e.k0s(),e.DNE(14,Ci,13,10,"div",11)(15,xi,11,7,"div",12),e.k0s()(),e.j41(16,"div",13)(17,"div",14)(18,"h6",15),e.EFF(19,"Full name"),e.k0s(),e.j41(20,"input",16),e.mxI("ngModelChange",function(a){return e.eBV(s),e.DH7(i.editProfile.name,a)||(i.editProfile.name=a),e.Njj(a)}),e.k0s(),e.DNE(21,Ii,3,5,"div",17),e.k0s(),e.j41(22,"div",18)(23,"h6",19),e.EFF(24,"Email"),e.k0s(),e.j41(25,"input",20),e.mxI("ngModelChange",function(a){return e.eBV(s),e.DH7(i.editProfile.email,a)||(i.editProfile.email=a),e.Njj(a)}),e.k0s()(),e.j41(26,"div",21)(27,"h6",22),e.EFF(28,"Profession"),e.k0s(),e.j41(29,"ng-select",23),e.mxI("ngModelChange",function(a){return e.eBV(s),e.DH7(i.editProfile.professionTypeId,a)||(i.editProfile.professionTypeId=a),e.Njj(a)}),e.DNE(30,wi,2,2,"ng-option",24),e.k0s()(),e.j41(31,"div",25)(32,"h6",26),e.EFF(33,"Gender"),e.k0s(),e.j41(34,"div",27)(35,"button",28),e.bIt("click",function(){return e.eBV(s),e.Njj(i.selectGender("M"))}),e.nrm(36,"pi",29),e.j41(37,"span",30),e.EFF(38,"Male"),e.k0s()(),e.j41(39,"button",31),e.bIt("click",function(){return e.eBV(s),e.Njj(i.selectGender("F"))}),e.nrm(40,"pi",32),e.j41(41,"span",30),e.EFF(42,"Female"),e.k0s()(),e.j41(43,"button",33),e.bIt("click",function(){return e.eBV(s),e.Njj(i.selectGender("O"))}),e.nrm(44,"pi",34),e.j41(45,"span",30),e.EFF(46,"Other"),e.k0s()()()(),e.j41(47,"div",35)(48,"h6",36),e.EFF(49,"Date of Birth"),e.k0s(),e.j41(50,"input",37,1),e.mxI("ngModelChange",function(a){return e.eBV(s),e.DH7(i.editProfile.dob,a)||(i.editProfile.dob=a),e.Njj(a)})("ngModelChange",function(a){return e.eBV(s),e.DH7(i.editProfile.dob,a)||(i.editProfile.dob=a),e.Njj(a)}),e.bIt("click",function(){e.eBV(s);const a=e.sdS(51);return e.Njj(a.toggle())}),e.k0s(),e.j41(52,"span",38),e.bIt("click",function(){e.eBV(s);const a=e.sdS(51);return e.Njj(a.toggle())}),e.nrm(53,"pi",39),e.k0s(),e.DNE(54,Mi,2,1,"div",40),e.k0s()()()()(),e.j41(55,"div",41)(56,"div",42)(57,"h3",6),e.EFF(58,"Change Password"),e.k0s()(),e.j41(59,"div",43)(60,"div",3),e.nrm(61,"div",44),e.j41(62,"div",45),e.DNE(63,Fi,5,5,"div",46),e.j41(64,"div",47)(65,"h6",48),e.EFF(66,"New Password"),e.k0s(),e.j41(67,"input",49),e.mxI("ngModelChange",function(a){return e.eBV(s),e.DH7(i.password,a)||(i.password=a),e.Njj(a)}),e.k0s(),e.j41(68,"span",38),e.bIt("click",function(){return e.eBV(s),e.Njj(i.passwordTextType=!i.passwordTextType)}),e.nrm(69,"pi",50),e.k0s(),e.DNE(70,Di,4,3,"div",40),e.k0s(),e.j41(71,"div",51)(72,"h6",52),e.EFF(73,"Confirm Password"),e.k0s(),e.j41(74,"input",53),e.mxI("ngModelChange",function(a){return e.eBV(s),e.DH7(i.retypePassword,a)||(i.retypePassword=a),e.Njj(a)}),e.k0s(),e.j41(75,"span",38),e.bIt("click",function(){return e.eBV(s),e.Njj(i.confirmPasswordTextType=!i.confirmPasswordTextType)}),e.nrm(76,"pi",50),e.k0s(),e.DNE(77,Ui,5,4,"div",40),e.k0s(),e.DNE(78,Yi,3,0,"div",54),e.j41(79,"div",55)(80,"button",56),e.bIt("click",function(){return e.eBV(s),e.Njj(i.update())}),e.EFF(81,"Save Changes"),e.k0s()()()()()(),e.j41(82,"div",57)(83,"div",42)(84,"h3",6),e.EFF(85,"Delete Account"),e.k0s()(),e.j41(86,"div",43)(87,"div",3),e.nrm(88,"div",44),e.j41(89,"div",45)(90,"div",47)(91,"h6",58),e.EFF(92,"Delete your account"),e.k0s(),e.j41(93,"p",59),e.EFF(94,"By deleting your account, you'll no longer be able to access any of your designs or log in to LightX"),e.k0s()(),e.j41(95,"div",60)(96,"button",61),e.bIt("click",function(){return e.eBV(s),e.Njj(i.deleteLightXaccount())}),e.EFF(97,"Delete LightX Account"),e.k0s()()()()()()()()()()}2&t&&(e.R7$(14),e.Y8G("ngIf",!i.user.profilePicUrl),e.R7$(),e.Y8G("ngIf",i.user.profilePicUrl),e.R7$(5),e.R50("ngModel",i.editProfile.name),e.Y8G("ngClass",e.eq3(38,$,i.submit&&(!i.editProfile.name||!(i.editProfile.name&&i.editProfile.name.trim())||(null==i.editProfile.name?null:i.editProfile.name.length)>24))),e.R7$(),e.Y8G("ngIf",i.submit),e.R7$(),e.Y8G("ngClass",i.env.isMobileView?"mt-28":"mt-36"),e.R7$(3),e.R50("ngModel",i.editProfile.email),e.R7$(),e.Y8G("ngClass",i.env.isMobileView?"mt-28":"mt-36"),e.R7$(3),e.Y8G("searchable",!1)("clearable",!1),e.R50("ngModel",i.editProfile.professionTypeId),e.R7$(),e.Y8G("ngForOf",i.professionOptions),e.R7$(),e.Y8G("ngClass",i.env.isMobileView?"mt-28":"mt-36"),e.R7$(4),e.Y8G("ngClass",e.eq3(40,ae,"M"===i.editProfile.gender)),e.R7$(4),e.Y8G("ngClass",e.eq3(42,ae,"F"===i.editProfile.gender)),e.R7$(4),e.Y8G("ngClass",e.eq3(44,ae,"O"===i.editProfile.gender)),e.R7$(4),e.Y8G("ngClass",i.env.isMobileView?"mt-28":"mt-36"),e.R7$(3),e.R50("ngModel",i.editProfile.dob),e.Y8G("ngClass",e.eq3(46,$,i.submit&&(""===i.editProfile.dob||(null==i.editProfile.dob?null:i.editProfile.dob.length)>24))),e.R50("ngModel",i.editProfile.dob),e.Y8G("minDate",i.minDate)("maxDate",i.maxDate),e.R7$(4),e.Y8G("ngIf",i.submit&&(""===i.editProfile.dob||(null==i.editProfile.dob?null:i.editProfile.dob.length)>24)),e.R7$(9),e.Y8G("ngIf",i.user.passwordPresent),e.R7$(4),e.R50("ngModel",i.password),e.Y8G("type",i.passwordTextType?"text":"password")("ngClass",e.eq3(48,$,i.submitPassword&&(""===i.password||i.password.length<8||i.password.length>40))),e.R7$(2),e.Y8G("ngClass",e.eq3(50,Fe,!i.passwordTextType)),e.R7$(),e.Y8G("ngIf",i.submitPassword&&(""===i.password||i.password.length<8||i.password.length>40)),e.R7$(4),e.R50("ngModel",i.retypePassword),e.Y8G("type",i.confirmPasswordTextType?"text":"password")("ngClass",e.eq3(52,$,i.submitPassword&&(""===i.retypePassword||i.misMatchPassword||i.retypePassword.length<8||i.retypePassword.length>40))),e.R7$(2),e.Y8G("ngClass",e.eq3(54,Fe,!i.confirmPasswordTextType)),e.R7$(),e.Y8G("ngIf",i.submitPassword&&(""===i.retypePassword||i.misMatchPassword||i.retypePassword.length<8||i.retypePassword.length>40)),e.R7$(),e.Y8G("ngIf",i.env.isMobileView&&i.submit&&(!i.editProfile.name||!(i.editProfile.name&&i.editProfile.name.trim())||(null==i.editProfile.name?null:i.editProfile.name.length)>24)),e.R7$(2),e.Y8G("disabled",!i.detactChanges()||i.inProgress)("ngClass",e.eq3(56,bi,i.env.isMobileView)),e.R7$(16),e.Y8G("disabled",i.inProgress))},dependencies:[l.YU,l.Sq,l.bT,k.me,k.BC,k.vS,h.cw,re.vr,re.xt,y.b,vi.R],styles:["@media (max-width: 576px){.edit-profile-blank[_ngcontent-%COMP%], .edit-profile-pic[_ngcontent-%COMP%]{width:124px!important;height:124px!important}}.edit-profile-blank[_ngcontent-%COMP%], .edit-profile-pic[_ngcontent-%COMP%]{border-radius:50%;width:160px;height:160px;cursor:pointer}.edit-profile-blank[_ngcontent-%COMP%] .btnBox[_ngcontent-%COMP%], .edit-profile-pic[_ngcontent-%COMP%] .btnBox[_ngcontent-%COMP%], .edit-profile-blank[_ngcontent-%COMP%] .infoText[_ngcontent-%COMP%], .edit-profile-pic[_ngcontent-%COMP%] .infoText[_ngcontent-%COMP%]{visibility:hidden;opacity:0}
1@media (min-width: 577px){.edit-profile-blank[_ngcontent-%COMP%]:hover .btnBox[_ngcontent-%COMP%], .edit-profile-pic[_ngcontent-%COMP%]:hover .btnBox[_ngcontent-%COMP%]{opacity:1;visibility:visible;width:100%;height:100%;border-radius:50%;background:#0006;position:absolute;display:flex;align-items:center;justify-content:center;flex-direction:column;transition:opacity .3s ease-in,visibility .3s ease-in!important}}.edit-profile-blank[_ngcontent-%COMP%]:hover .infoText[_ngcontent-%COMP%], .edit-profile-pic[_ngcontent-%COMP%]:hover .infoText[_ngcontent-%COMP%]{visibility:visible;position:absolute;left:0;right:0;bottom:-26px;opacity:1;transition:opacity .3s ease-in,visibility .3s ease-in!important}.edit-profile-blank[_ngcontent-%COMP%], .edit-profile-pic[_ngcontent-%COMP%]{background:#d6d6d640;position:relative}.edit-pic-div[_ngcontent-%COMP%]{background:#626adf;border-radius:50%;display:flex;justify-content:center;align-items:center;position:absolute;bottom:3px;right:4px}.editpos[_ngcontent-%COMP%]{position:relative;top:-4px}.profile-code-name[_ngcontent-%COMP%]{text-align:center;height:100%;position:absolute;width:100%;font-size:90px;color:#000}.profile-picture[_ngcontent-%COMP%]{text-align:center;height:100%;position:absolute;width:100%;color:#aaa;background-size:cover;border-radius:50%}.btn-gender[_ngcontent-%COMP%]{width:80px;height:80px;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#e2e3e966!important;font-size:12px!important;font-weight:600}.btn-gender[_ngcontent-%COMP%]:hover{font-weight:700}.btn-gender[_ngcontent-%COMP%]:active{color:#959aa7!important}.btn-gender.active[_ngcontent-%COMP%]{font-weight:700}.form-control[_ngcontent-%COMP%]:disabled{background-color:#e2e3e966}.form-control[_ngcontent-%COMP%]:disabled:hover{background-color:#e2e3e966}.email-lock[_ngcontent-%COMP%]{position:absolute;right:4px;top:20%;cursor:pointer}.form-control-main[_ngcontent-%COMP%]{border-top:0;border-right:0;border-left:0;border-radius:0;background:#e2e3e9;border-bottom:solid 1px #e4e4eb}.form-control-lock[_ngcontent-%COMP%]{border:none;background:#f8f8fa}.form-control[_ngcontent-%COMP%]{border-top:0;border-bottom:0;border-right:0;border-left:0;background:#e2e3e966;border-radius:12px;color:#000!important;transition:none!important;font-size:14px}.form-control[_ngcontent-%COMP%]:hover{background:#e2e3e94d;outline:none!important;color:#b0b3bf}.form-control[_ngcontent-%COMP%]:focus{background:#e2e3e94d;outline:none!important;color:#b0b3bf}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown){padding-top:0rem;padding-bottom:0rem}.form-label-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{position:relative!important;padding-left:0;padding-bottom:0}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{height:3rem!important;padding-left:24px}.ng-select[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%] .ng-value-container[_ngcontent-%COMP%] .ng-input[_ngcontent-%COMP%]{opacity:1!important}.select-menu.ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%] .ng-value-container[_ngcontent-%COMP%], .ng-select.ng-select-single[_ngcontent-%COMP%] .ng-select-container[_ngcontent-%COMP%] .ng-value-container[_ngcontent-%COMP%] .ng-value[_ngcontent-%COMP%]{color:#495057!important}.subnav-btn-group[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{border-radius:20px!important}.show-password-cal[_ngcontent-%COMP%]{position:absolute;right:0;top:37px;cursor:pointer}.show-password[_ngcontent-%COMP%]{position:absolute;right:0;top:37px;cursor:pointer;content:url(https://static.lightxeditor.com/assets/icons/password-show.svg)}.passwordactive[_ngcontent-%COMP%]{content:url(https://static.lightxeditor.com/assets/icons/password-hide.svg)}h6[_ngcontent-%COMP%]{font-size:14px;color:#000;line-height:17.04px}.btn-light[_ngcontent-%COMP%]:focus, .btn-light.focus[_ngcontent-%COMP%]{color:#626adf!important;background-color:#626adf1a!important;border-color:#626adf1a!important;box-shadow:none;text-decoration:none}.ng-value-label[_ngcontent-%COMP%]{color:#000!important}@media (max-width: 576px){h3[_ngcontent-%COMP%]{font-size:20px;line-height:125%}}"]}),c})(),Li=(()=>{var o;class c{constructor(t){this.authService=t,this.inProgress=!0,this.user=this.authService.profile.user}
1ngOnInit(){}}return(o=c).\u0275fac=function(t){return new(t||o)(e.rXU(w.u))},o.\u0275cmp=e.VBU({type:o,selectors:[["app-password"]],decls:6,vars:0,consts:[[1,"container-fluid"],[1,"row","my-project"],[1,"page-user-content","container","mt-4"],[1,"right","ms-3","grid-row"]],template:function(t,i){1&t&&(e.j41(0,"div",0)(1,"div",1)(2,"div")(3,"div",2)(4,"div",3),e.EFF(5,"\nPassword "),e.k0s()()()()())}}),c})();const Re=o=>({liActive:o}),Ee=o=>({"btn-tab-account-active":o}),Hi=o=>({"text-red":o});function zi(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"ul",14)(6,"li",15),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.goToDashboard())}),e.nrm(7,"pi",16),e.EFF(8,"To Dashboard "),e.k0s(),e.nrm(9,"hr",17),e.j41(10,"li",18),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return i.activeSettingPanel="account",e.Njj(i.addBodyClass())}),e.nrm(11,"pi",19),e.EFF(12,"Account Settings "),e.k0s(),e.j41(13,"li",20),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return i.activeSettingPanel="subs",e.Njj(i.addBodyClass())}),e.nrm(14,"pi",21),e.EFF(15," Subscription "),e.k0s()()(),e.j41(16,"div")(17,"ul",22),e.nrm(18,"hr",17)(19,"space-utilized"),e.k0s()()()()()()}if(2&o){const n=e.XpG();e.R7$(10),e.Y8G("ngClass",e.eq3(2,Re,"account"==n.activeSettingPanel)),e.R7$(3),e.Y8G("ngClass",e.eq3(4,Re,"subs"==n.activeSettingPanel))}}function qi(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",23)(1,"div",24)(2,"div",25),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.backToLastPage())}),e.nrm(3,"pi",26),e.k0s(),e.j41(4,"div",27),e.EFF(5,"Settings"),e.k0s()(),e.j41(6,"div",28)(7,"div",29)(8,"ul",30)(9,"li",31),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.activeSettingPanel="account")}),e.j41(10,"a",32),e.nrm(11,"pi",33),e.EFF(12,"Account Settings"),e.k0s()(),e.j41(13,"li",31),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.activeSettingPanel="subs")}),e.j41(14,"a",32),e.nrm(15,"pi",34),e.EFF(16,"Subscription"),e.k0s()()()()()()}if(2&o){const n=e.XpG();e.R7$(9),e.Y8G("ngClass",e.eq3(2,Ee,"account"==n.activeSettingPanel)),e.R7$(4),e.Y8G("ngClass",e.eq3(4,Ee,"subs"==n.activeSettingPanel))}}function Ki(o,c){1&o&&e.nrm(0,"app-account")}function Qi(o,c){1&o&&e.nrm(0,"app-password")}function Ji(o,c){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"div",1)(2,"div",41)(3,"div",42)(4,"div",43)(5,"div",44)(6,"picture"),e.nrm(7,"source",45)(8,"img",46),e.k0s()()(),e.j41(9,"div",47)(10,"div",48)(11,"div",49),e.EFF(12,"Starter"),e.k0s(),e.j41(13,"div",50),e.EFF(14,"Lifetime"),e.k0s()()()()(),e.j41(15,"div",51)(16,"button",52),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.upgradeSubs())}),e.EFF(17,"Upgrade Subscription"),e.k0s()()()()}if(2&o){const n=e.XpG(2);e.R7$(10),e.Y8G("ngClass",n.isMobileView?"ml-0 align-items-center":"ml-9")}}function Wi(o,c){1&o&&(e.j41(0,"div",63),e.EFF(1,"Free 7 days plan"),e.k0s())}function Zi(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Renew automatically"),e.k0s())}function en(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Expiring"),e.k0s())}function tn(o,c){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"date"),e.k0s()),2&o){const n=e.XpG(5);e.R7$(),e.SpI(" on ",e.i5U(2,1,null==n.subscription?null:n.subscription.expiryDate,"mediumDate"),"")}}function nn(o,c){if(1&o&&(e.j41(0,"div",60),e.DNE(1,Zi,2,0,"span",39)(2,en,2,0,"span",39)(3,tn,3,4,"span",39),e.k0s()),2&o){const n=e.XpG(4);e.R7$(),e.Y8G("ngIf",!n.isCanceledSubs),e.R7$(),e.Y8G("ngIf",n.isCanceledSubs),e.R7$(),e.Y8G("ngIf",n.subscription)}}function on(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"Subscription valid till"),e.k0s())}function sn(o,c){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"date"),e.k0s()),2&o){const n=e.XpG(5);e.R7$(),e.SpI(" ",e.i5U(2,1,null==n.subscription?null:n.subscription.expiryDate,"mediumDate"),"")}}function rn(o,c){if(1&o&&(e.j41(0,"div",66),e.DNE(1,on,2,0,"span",39)(2,sn,3,4,"span",39),e.k0s()),2&o){const n=e.XpG(4);e.R7$(),e.Y8G("ngIf",!n.isCanceledSubs),e.R7$(),e.Y8G("ngIf",n.subscription)}}function an(o,c){if(1&o&&e.DNE(0,nn,4,3,"div",64)(1,rn,3,2,"div",65),2&o){const n=e.XpG(3);e.Y8G("ngIf","web"==(null==n.subscription?null:n.subscription.platform)),e.R7$(),e.Y8G("ngIf","iphone"==(null==n.subscription?null:n.subscription.platform)||"android"==(null==n.subscription?null:n.subscription.platform))}}function cn(o,c){1&o&&(e.j41(0,"div",60)(1,"span"),e.EFF(2,"Lifetime"),e.k0s()())}function ln(o,c){1&o&&(e.j41(0,"div",67)(1,"span",68),e.EFF(2,"Manage your subscription via App Store"),e.k0s()())}function dn(o,c){1&o&&(e.j41(0,"div",67)(1,"span",68),e.EFF(2,"Manage your subscription via Play Store"),e.k0s()())}function pn(o,c){if(1&o){const n=e.RV6();e.j41(0,"button",72),e.bIt("click",function(){e.eBV(n);const i=e.XpG(4);return e.Njj(i.cancelSubscription())}),e.EFF(1,"Manage Subscription"),e.k0s()}if(2&o){const n=e.XpG(4);e.Y8G("disabled","web"!=(null==n.subscription?null:n.subscription.platform))}}function mn(o,c){if(1&o){const n=e.RV6();e.j41(0,"button",52),e.bIt("click",function(){e.eBV(n);const i=e.XpG(4);return e.Njj(i.cancelSubs())}),e.EFF(1,"Restore Plan"),e.k0s()}}function gn(o,c){if(1&o&&(e.j41(0,"div",69),e.DNE(1,pn,2,1,"button",70)(2,mn,2,0,"button",71),e.k0s()),2&o){const n=e.XpG(3);e.R7$(),e.Y8G("ngIf",!n.isCanceledSubs),e.R7$(),e.Y8G("ngIf",(0===(null==n.subscription?null:n.subscription.paymentGateway)||3===(null==n.subscription?null:n.subscription.paymentGateway))&&n.isCanceledSubs)}}function un(o,c){if(1&o&&(e.j41(0,"div")(1,"div",1)(2,"div",53)(3,"div",54)(4,"div",43)(5,"div",44)(6,"picture"),e.nrm(7,"source",55)(8,"img",56),e.k0s()()(),e.j41(9,"div",57)(10,"div",48)(11,"div",58),e.EFF(12,"Premium"),e.k0s(),e.DNE(13,Wi,2,0,"div",59)(14,an,2,2)(15,cn,3,0,"div",60)(16,ln,3,0,"div",61)(17,dn,3,0,"div",61),e.k0s()()()(),e.DNE(18,gn,3,2,"div",62),e.k0s()()),2&o){const n=e.XpG(2);e.R7$(10),e.Y8G("ngClass",n.isMobileView?"ml-0 align-items-center":"ml-9"),e.R7$(3),e.Y8G("ngIf",null==n.subscription?null:n.subscription.isTrial),e.R7$(),e.vxM(1!==(null==n.subscription?null:n.subscription.lifeTime)?14:15),e.R7$(2),e.Y8G("ngIf","iphone"==(null==n.subscription?null:n.subscription.platform)),e.R7$(),e.Y8G("ngIf","android"==(null==n.subscription?null:n.subscription.platform)),e.R7$(),e.Y8G("ngIf",1!==(null==n.subscription?null:n.subscription.lifeTime)||n.additionalSubscription)}}function _n(o,c){1&o&&(e.j41(0,"span"),e.EFF(1,"0"),e.k0s())}function hn(o,c){if(1&o&&(e.j41(0,"div",79),e.DNE(1,_n,2,0,"span",39),e.EFF(2),e.k0s()),2&o){const n=e.XpG(3);e.Y8G("ngClass",e.eq3(3,Hi,!n.user.remainingCoins)),e.R7$(),e.Y8G("ngIf",n.user.remainingCoins<10),e.R7$(),e.SpI("",n.user.remainingCoins," AI Credits left")}}function fn(o,c){1&o&&(e.j41(0,"div",80),e.EFF(1,"0 AI Credits left"),e.k0s())}function vn(o,c){1&o&&(e.j41(0,"div",81),e.EFF(1,"Lifetime validity"),e.k0s())}function bn(o,c){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const n=e.XpG(4);e.R7$(),e.SpI("",null==n.paymentConfig?null:n.paymentConfig.aiSubscriptionCredits," AI credits will be refilled each month automatically.")}}function Pn(o,c){if(1&o&&(e.j41(0,"div",81),e.DNE(1,bn,2,1,"span",39),e.k0s()),2&o){const n=e.XpG(3);e.R7$(),e.Y8G("ngIf",1!==(null==n.subscription?null:n.subscription.lifeTime)&&"web"==(null==n.subscription?null:n.subscription.platform))}}function Cn(o,c){1&o&&(e.j41(0,"div",81),e.EFF(1,"Lifetime validity"),e.k0s())}function xn(o,c){if(1&o){const n=e.RV6();e.j41(0,"div")(1,"div",1)(2,"div",41)(3,"div",42)(4,"div",43)(5,"div",44)(6,"picture"),e.nrm(7,"source",73)(8,"img",74),e.k0s()()(),e.j41(9,"div",75),e.DNE(10,hn,3,5,"div",76)(11,fn,2,0,"div",77)(12,vn,2,0,"div",78)(13,Pn,2,1,"div",78)(14,Cn,2,0,"div",78),e.k0s()()(),e.j41(15,"div",51)(16,"button",52),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.addCredits())}),e.EFF(17,"Add Credits"),e.k0s()()()()}if(2&o){const n=e.XpG(2);e.R7$(10),e.Y8G("ngIf",n.user.remainingCoins>=0),e.R7$(),e.Y8G("ngIf",n.user.remainingCoins<0),e.R7$(),e.Y8G("ngIf",!n.user.subscribed),e.R7$(),e.Y8G("ngIf",n.user.subscribed&&!n.isCanceledSubs),e.R7$(),e.Y8G("ngIf",n.user.subscribed&&n.isCanceledSubs)}}
1function jn(o,c){if(1&o&&(e.j41(0,"div"),e.nrm(1,"div",35),e.j41(2,"div",36)(3,"div",37)(4,"div",38),e.DNE(5,Ji,18,1,"div",39),e.k0s(),e.DNE(6,un,19,6,"div",39),e.k0s()(),e.j41(7,"div",40)(8,"div",37)(9,"div",38),e.DNE(10,xn,18,5,"div",39),e.k0s()()()()),2&o){const n=e.XpG();e.R7$(5),e.Y8G("ngIf",!n.user.subscribed),e.R7$(),e.Y8G("ngIf",n.user.subscribed),e.R7$(4),e.Y8G("ngIf",n.user)}}let kn=(()=>{var o;class c{constructor(t,i,s,r,a,d,m,_,P,C){this.document=t,this.authService=i,this.modalService=s,this.paymentService=r,this.route=a,this.subsService=d,this.aiService=m,this.location=_,this.router=P,this.topStrip=C,this.inProgress=!0,this.activeSettingPanel="account",this.canValue=!1,this.isMobileView=!1,this.subscriptions=[],this.additionalSubscription=null,this.user=this.authService.currentUser(),this.loggedInObserver=this.authService.loggedIn.subscribe(F=>{this.user=this.authService.currentUser()}),this.usrPropChangedObserver=this.authService.usrPropChanged.subscribe(F=>{this.user=this.authService.currentUser(),this.setSubscription()}),this.setSubscription(),this.initStrip(()=>{});let M=this.route.snapshot.queryParamMap;if(M){let F=M.get("from");M.get("action"),"subs"==F&&(this.activeSettingPanel="subs")}this.resetUser()}resetUser(){this.authService.getUserDetails(this.user.systemRefKey,t=>{t&&(this.user=this.authService.currentUser(),this.setSubscription())},t=>{})}setSubscription(){if(this.authService.profile&&this.authService.profile.purchaseDetails&&(this.purchaseDetails=this.authService.profile.purchaseDetails,this.purchaseDetails)){let t=this.purchaseDetails.subscriptions;t.length>0&&(this.subscription=t[0],this.additionalSubscription=t[1]?t[1]:null)}}findLifetimeSubscription(t){return t.find(i=>1===i.lifeTime)}ngOnInit(){this.showMobileView(),this.screenOnResize(),this.getProducts(),this.topStrip.removeTopStripClass()}screenOnResize(){const t=(0,ue.R)(window,"resize").pipe((0,_e.B)(200),(0,he.F)()).subscribe(()=>{this.showMobileView()});this.subscriptions.push(t)}showMobileView(){this.isMobileView=!(window.innerWidth>991)}upgradePlan(){this.subsService.upgradePlanCheckout("","","",t=>{this.user=this.authService.currentUser()})}cancelSubscription(){this.modalService.open(mi.N,{centered:!0,size:"sm",backdrop:"static",windowClass:"cancel-subscription d-flex justify-content-center"}).result.then(i=>{"ok"===i&&(this.canValue=!0,this.cancelSubs())})}createNewVideo(){const t=this.modalService.open(Te,{centered:!0,size:"xl",backdrop:"static"});t.componentInstance.folderId=this.user.systemRefKey,t.result.then(i=>{})}upgradeSubs(){this.subsService.upgradePlanCheckout("","","",t=>{this.user=this.authService.currentUser()})}cancelSubs(){if(1===this.subscription.lifeTime&&this.additionalSubscription){let t=this.additionalSubscription;if(1===t.lifeTime)return;this.subscription.paymentGateway=t.paymentGateway}else if(1===this.subscription.lifeTime&&!this.additionalSubscription)return;if(this.subscription.paymentGateway===q.Z.Razorpay){const t=this.modalService.open(Oe.H,{centered:!0,size:"lg",backdrop:"static",windowClass:"d-flex justify-content-center razorpay"});t.componentInstance.isAPISubscription=!1,t.result.then(i=>{"ok"===i&&(this.canValue=!0)})}else if(this.subscription.paymentGateway===q.Z.Paypal){const t=this.modalService.open(Oe.H,{centered:!0,size:"lg",backdrop:"static",windowClass:"d-flex justify-content-center razorpay"});t.componentInstance.isAPISubscription=!1,t.componentInstance.paymentGateway=q.Z.Paypal,t.result.then(i=>{"ok"===i&&(this.canValue=!0)})}else this.paymentService.customerPortal(this.subscription.paymentGateway,t=>{t&&(window.location.href=t.publishableKey)},t=>{})}get isCanceledSubs(){let t=this.authService.profile.purchaseDetails;return!!(t&&t.subscriptions&&t.subscriptions.length>0)&&0!==t.subscriptions[0].cancelDate}get needToShowRestorePlan(){return this.subscription.paymentGateway===q.Z.Stripe}restoreSubs(){}initStrip(t){this.paymentService.initStrip(i=>{i&&this.paymentService.stripe&&this.checkStatus(this.paymentService.stripe),t(i)})}checkStatus(t){var i=this;return(0,E.A)(function*(){const s=new URLSearchParams(window.location.search).get("setup_intent_client_secret");if(!s)return;const{setupIntent:r}=yield t.retrieveSetupIntent(s);switch(r.status){case"succeeded":i.showMessage("Payment succeeded!");break;case"processing":i.showMessage("Your payment is processing.");break;case"requires_payment_method":i.showMessage("Your payment was not successful, please try again.");break;default:i.showMessage("Something went wrong.")}})()}showMessage(t){const i=document.querySelector("#payment-message");i.classList.remove("hidden"),i.textContent=t,setTimeout(function(){i.classList.add("hidden"),t.textContent=""},4e3)}addCredits(){this.aiService.aiCreditPlanCheckout({toolName:"account_page",plan_type:"one_time"},()=>{this.user=this.authService.currentUser()})}getProducts(){this.paymentService.getPaymentProducts(t=>{t&&(this.paymentConfig=t.config)},t=>{})}
1addBodyClass(){"subs"==this.activeSettingPanel?this.document.body.classList.add("modal-without-scroll"):this.document.body.classList.remove("modal-without-scroll")}ngOnDestroy(){this.document?.body?.classList.remove("modal-without-scroll"),this.loggedInObserver&&this.loggedInObserver.unsubscribe(),this.usrPropChangedObserver&&this.usrPropChangedObserver.unsubscribe(),this.subscriptions.forEach(t=>t.unsubscribe())}selectTab(t){this.selectedTab=t}backToLastPage(){this.location.back()}goToDashboard(){this.router.navigate(["/user-dashboard"])}getTheApp(){this.modalService.open(gi.V,{centered:!0,size:"lg",backdrop:"static",windowClass:"gettheapp-dialog"}).componentInstance.sectionObj={title:"Get the App"}}}return(o=c).\u0275fac=function(t){return new(t||o)(e.rXU(l.qQ),e.rXU(w.u),e.rXU(h.Bq),e.rXU(ne.W),e.rXU(I.nX),e.rXU(ve.n),e.rXU(ui.U),e.rXU(l.aZ),e.rXU(I.Ix),e.rXU(Pe.l))},o.\u0275cmp=e.VBU({type:o,selectors:[["app-account-settings"]],decls:11,vars:8,consts:[[1,"container-fluid","common","ps-3","pe-3","ps-lg-0","pe-lg-0","pt-0","pb-5"],[1,"row","g-0"],["class","sidenav mb-3 mt-3 settings-panel","style","top: 33px;",4,"ngIf"],[1,"",3,"ngClass"],["class","container-fluid ps-0 pe-0 as-smallscreen",4,"ngIf"],[1,"container-fluid","ps-0","pe-0","mt-4",3,"ngClass"],[1,"",3,"ngSwitch"],[4,"ngSwitchCase"],[1,"container-fluid","ps-0","pe-0"],[1,"sidenav","mb-3","mt-3","settings-panel",2,"top","33px"],["id","#sidebar1",1,"left-bar",2,"height","calc(100vh - 79px)"],[1,"pane-section","box-right-wrapper","overflow-hidden",2,"height","calc(100% - 0.20rem)"],[1,"scroll-content"],["customScrollDir","",1,"scroll-container",2,"height","calc(100% - 70px)"],[1,"p-0","pt-3","mb-0"],[1,"lh-normal",3,"click"],["name","leftarrownew",1,"f-24","mr-8","grey-500"],[1,"mt-2","mb-2"],[1,"lh-normal",3,"click","ngClass"],["name","settings",1,"f-24","mr-8"],[1,"lh-normal","mt-1",3,"click","ngClass"],["name","subscription",1,"hw-24","me-3"],[1,"p-3","pt-0","pb-0","mb-0"],[1,"container-fluid","ps-0","pe-0","as-smallscreen"],[1,"d-flex","align-items-center",2,"height","44px","width","calc(100% - 24px)"],[3,"click"],["name","leftarrow",1,"f-24"],[1,"w-100","text-center","text-lg","text-dark","text-semi","lh-160"],[1,"d-inline-flex","wp-100","justify-content-between","mt-2"],[1,"mx-auto"],["id","myTab","role","tablist",1,"nav","nav-pills","tab-bg-account"],["role","presentation",1,"nav-item","btn-tab-account",3,"click","ngClass"],["role","tab",1,"d-flex","align-items-center","justify-content-center"],["name","settings",1,"f-24","me-1"],["name","subscription",1,"me-1"],[1,"text-24","text-primary"],[1,"w-100","ps-0","ps-lg-0","pl-13","pr-13","account-settings","remove-padding"],[1,"box-right-wrapper","border-radius-12","p-12"],[1,""],[4,"ngIf"],[1,"w-100","ps-0","ps-lg-0","pl-13","pr-13","account-settings","remove-padding","mt-4"],[1,"col-12","col-sm-12","col-lg-8","col-md-12","col-xl-8"],[1,"row","text-center"],[1,"col-12","col-sm-12","col-lg-2","col-md-12","col-xl-2","mx-auto","mx-lg-0","w-100",2,"max-width","fit-content"],[1,"text-center","text-lg-start"],["srcset","https://static.lightxeditor.com/assets/images/Starter.webp","type","image/webp"],["src","https://static.lightxeditor.com/assets/images/Starter.png","width","auto","height","auto","alt","Professional Level Graphic Designing - LightX","loading","lazy",1,"responsive"],[1,"col-12","col-sm-12","col-lg-6","col-md-12","col-xl-6","d-block","align-self-center","text-semi"],[1,"d-flex","flex-column",3,"ngClass"],[1,"text-24","text-primary","text-lg-start","mt-4","mt-lg-0"],[1,"text-black","text-lg","text-lg-start","mt-8"],[1,"col-12","col-sm-12","col-lg-4","col-md-12","col-xl-4","d-flex","align-items-center","justify-content-lg-end","justify-content-center","mt-4","mt-lg-0"],[1,"btn","btn-grey","btn-h48","text-primary","text-lg","text-semi","pe-4","ps-4",3,"click"],[1,"col-12","col-sm-12","col-lg-9","col-md-12","col-xl-9"],[1,"row"],["srcset","https://static.lightxeditor.com/assets/images/Premium.webp","type","image/webp"],["src","https://static.lightxeditor.com/assets/images/Premium.png","width","auto","height","auto","alt","Professional Level Graphic Designing - LightX","loading","lazy",1,"responsive"],[1,"col-12","col-sm-12","col-lg-6","col-md-12","col-xl-6","align-self-center"],[1,"text-24","text-primary","text-bold","text-lg-start","mt-4","mt-lg-0"],["class","text-black text-lg mt-8 ml-9",4,"ngIf"],[1,"validtill-text","text-lg","mt-8","text-center","text-lg-start"],["class","d-flex align-items-center manageSubscription mt-8",4,"ngIf"],["class","col-12 col-sm-12 col-lg-3 col-md-12 col-xl-3 d-flex align-items-center justify-content-lg-end justify-content-center mt-4 mt-lg-0",4,"ngIf"],[1,"text-black","text-lg","mt-8","ml-9"],["class","validtill-text text-lg mt-8 text-center text-lg-start",4,"ngIf"],["class","validtill-text text-lg mt-8",4,"ngIf"],[1,"validtill-text","text-lg","mt-8"],[1,"d-flex","align-items-center","manageSubscription","mt-8"],[1,"text","text-semi","ms-3","me-3"],[1,"col-12","col-sm-12","col-lg-3","col-md-12","col-xl-3","d-flex","align-items-center","justify-content-lg-end","justify-content-center","mt-4","mt-lg-0"],["class","btn btn-grey btn-h48 text-primary text-lg text-semi pe-4 ps-4",3,"disabled","click",4,"ngIf"],["class","btn btn-grey btn-h48 text-primary text-lg text-semi pe-4 ps-4",3,"click",4,"ngIf"],[1,"btn","btn-grey","btn-h48","text-primary","text-lg","text-semi","pe-4","ps-4",3,"click","disabled"],["srcset","https://static.lightxeditor.com/assets/images/Credits.png","type","image/webp"],["src","https://static.lightxeditor.com/assets/images/Credits.png","width","auto","height","auto","alt","Professional Level Graphic Designing - LightX","loading","lazy",1,"responsive"],[1,"col-12","col-sm-12","col-lg-8","col-md-12","col-xl-8","d-block","align-self-center"],["class","text-24 text-primary text-lg-start ml-9 text-bold mt-4 mt-lg-0",3,"ngClass",4,"ngIf"],["class","text-24 text-red text-lg-start ml-9 text-bold",4,"ngIf"],["class","text-black text-lg text-lg-start mt-8 ml-9",4,"ngIf"],[1,"text-24","text-primary","text-lg-start","ml-9","text-bold","mt-4","mt-lg-0",3,"ngClass"],[1,"text-24","text-red","text-lg-start","ml-9","text-bold"],[1,"text-black","text-lg","text-lg-start","mt-8","ml-9"]],template:function(t,i){1&t&&(e.j41(0,"div",0)(1,"div",1),e.DNE(2,zi,20,6,"div",2),e.j41(3,"div",3),e.DNE(4,qi,17,6,"div",4),e.j41(5,"div",5)(6,"div",6),e.DNE(7,Ki,1,0,"app-account",7)(8,Qi,1,0,"app-password",7),e.j41(9,"div",8),e.DNE(10,jn,11,3,"div",7),e.k0s()()()()()()),2&t&&(e.R7$(2),e.Y8G("ngIf",!i.isMobileView),e.R7$(),e.Y8G("ngClass",i.isMobileView?"":"main-user-content"),e.R7$(),e.Y8G("ngIf",i.isMobileView),e.R7$(),e.Y8G("ngClass",i.isMobileView?"pt-0":"pt-8"),e.R7$(),e.Y8G("ngSwitch",i.activeSettingPanel),e.R7$(),e.Y8G("ngSwitchCase","account"),e.R7$(),e.Y8G("ngSwitchCase","password"),e.R7$(2),e.Y8G("ngSwitchCase","subs"))},dependencies:[l.YU,l.bT,l.ux,l.e1,xe.q,je.q,y.b,Bi,Li,l.vh],styles:[".validtill-text[_ngcontent-%COMP%]{font-size:16px;color:#000;line-height:21.79px}img[_ngcontent-%COMP%]{width:124px;height:124px;background:#f6eefd;border-radius:36px}.manageSubscription[_ngcontent-%COMP%]{min-height:30px;width:max-content;background:#626adf1a;border-radius:8px}.manageSubscription[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-size:13px;color:#626adf}.projects-home[_ngcontent-%COMP%] .pane-section[_ngcontent-%COMP%]{height:calc(100% - 13rem)}.text-red[_ngcontent-%COMP%]{color:#f25555!important}.tab-bg-account[_ngcontent-%COMP%]{border-radius:16px;background:#eeedf3;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);min-height:48px;color:#626adf}.btn-tab-account[_ngcontent-%COMP%]{background:transparent;height:40px;border-radius:12px;color:#272b34;font-size:13px;align-items:center;display:flex;justify-content:center;margin:4px;cursor:pointer;font-weight:600;padding:0 16px}.btn-tab-account-active[_ngcontent-%COMP%]{background:#626adf;color:#fff}.settings-panel[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{height:44px;border-radius:12px;scroll-margin:16px;cursor:pointer;display:flex;align-items:center;border:1px solid transparent;font-size:14px;color:#28282a;padding:0 12px;margin-top:4px}.settings-panel[_ngcontent-%COMP%] li[_ngcontent-%COMP%] pi[_ngcontent-%COMP%], .settings-panel[_ngcontent-%COMP%] li[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{color:#606576}.settings-panel[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background:#626adf0d;border:1px solid transparent}.settings-panel[_ngcontent-%COMP%] .liActive[_ngcontent-%COMP%]{border:1px solid #eeebff!important;background:linear-gradient(90deg,#df61ff26 -4%,#3ad0ff26)!important;font-weight:600}.settings-panel[_ngcontent-%COMP%] .liActive[_ngcontent-%COMP%] pi[_ngcontent-%COMP%], .settings-panel[_ngcontent-%COMP%] .liActive[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{color:#4a4f5e}.settings-panel[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{margin-top:8px;margin-bottom:8px;border:0;border-top:2px solid rgba(98,106,223,.1)!important}.main-user-content[_ngcontent-%COMP%]{margin-top:44px}"]}),c})();var In=p(67294),De=p(55756),wn=p(45975),yn=p(80006);const Mn=["carousel"],Tn=(o,c,n)=>({"hide-arrow":o,isFirst:c,isLast:n});function On(o,c){if(1&o){const n=e.RV6();e.j41(0,"button",28),e.bIt("click",function(i){e.eBV(n),e.XpG();const s=e.sdS(2),r=e.XpG(3);return i.stopPropagation(),e.Njj(r.toggleMute(s))}),e.nrm(1,"pi",24),e.k0s()}if(2&o){const n=e.XpG(4);e.R7$(),e.Y8G("name",n.isMuted?"mute":"unmute")}}function Sn(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",21)(1,"video",22,2),e.bIt("canplay",function(){e.eBV(n);const i=e.sdS(2),s=e.XpG(3);return e.Njj(s.onVideoCanPlay(i))})("loadedmetadata",function(){e.eBV(n);const i=e.sdS(2),s=e.XpG(3);return e.Njj(s.onVideoLoadedMetadata(i))})("timeupdate",function(){e.eBV(n);const i=e.sdS(2),s=e.XpG(3);return e.Njj(s.onVideoTimeUpdate(i))})("pause",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.onVideoPause())})("play",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.onVideoPlay())})("ended",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.onVideoEnded())}),e.k0s(),e.j41(3,"button",23),e.bIt("click",function(i){e.eBV(n);const s=e.sdS(2),r=e.XpG(3);return i.stopPropagation(),e.Njj(r.togglePlay(s))}),e.nrm(4,"pi",24),e.k0s(),e.j41(5,"div",25)(6,"span",26),e.EFF(7),e.k0s(),e.EFF(8),e.k0s(),e.DNE(9,On,2,1,"button",27),e.k0s()}if(2&o){const n=e.XpG(2).$implicit,t=e.XpG();e.R7$(),e.Y8G("id",null==n?null:n.assetId)("src",t.getItemUrl(n),e.B4B),e.R7$(3),e.Y8G("name",t.isPlaying?"pausenew":"playnew"),e.R7$(3),e.SpI("",t.currentTimeLabel," "),e.R7$(),e.SpI("/ ",t.durationLabel," "),e.R7$(),e.Y8G("ngIf",t.hasAudio)}}function Gn(o,c){if(1&o&&(e.j41(0,"div",29),e.nrm(1,"img",30),e.k0s()),2&o){const n=e.XpG(2).$implicit,t=e.XpG();e.R7$(),e.Y8G("src",t.getItemUrl(n),e.B4B)}}function Fn(o,c){if(1&o&&(e.j41(0,"div",18),e.DNE(1,Sn,10,6,"div",19)(2,Gn,2,1,"div",20),e.k0s()),2&o){const n=e.XpG().$implicit;e.R7$(),e.Y8G("ngIf",null==n?null:n.isVideo),e.R7$(),e.Y8G("ngIf",!(null!=n&&n.isVideo))}}function An(o,c){if(1&o){const n=e.RV6();e.DNE(0,Fn,3,2,"ng-template",17),e.bIt("slid",function(i){const s=e.eBV(n),r=s.first,a=s.last,d=e.XpG();return e.Njj(d.nextSlide(i,r,a))})}if(2&o){const n=c.$implicit,t=c.index,i=e.XpG();e.Y8G("id",i.getSlideId(n,t))}}function Rn(o,c){if(1&o){const n=e.RV6();e.j41(0,"button",31),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.changeWithAI())}),e.nrm(1,"pi",32),e.EFF(2,"Change with AI "),e.k0s()}}
1function En(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",44)(1,"div",45)(2,"span",36),e.EFF(3,"Prompt"),e.k0s(),e.j41(4,"div")(5,"button",46),e.bIt("click",function(){e.eBV(n);const i=e.XpG(2);return e.Njj(i.copy(null==i.activeImage?null:i.activeImage.prompt))}),e.j41(6,"span",47),e.nrm(7,"pi",48),e.EFF(8),e.k0s(),e.j41(9,"span",49),e.nrm(10,"pi",50),e.EFF(11,"Copied "),e.k0s()()()(),e.j41(12,"div",51),e.EFF(13),e.k0s()()}if(2&o){const n=e.XpG(2);e.R7$(5),e.Y8G("ngClass",n.iscopy?"popupBtn-active":""),e.R7$(3),e.SpI("",n.iscopy?"Copied":"Copy"," "),e.R7$(5),e.SpI(" ",null==n.activeImage?null:n.activeImage.prompt," ")}}function Dn(o,c){if(1&o&&(e.j41(0,"div",38)(1,"span",39),e.EFF(2,"AI Model"),e.k0s(),e.j41(3,"span",40),e.EFF(4),e.k0s()()),2&o){const n=e.XpG(2);e.R7$(4),e.JRh(n.modelDisplayName)}}function Nn(o,c){if(1&o&&(e.j41(0,"div",38)(1,"span",39),e.EFF(2,"Duration"),e.k0s(),e.j41(3,"span",40),e.EFF(4),e.k0s()()),2&o){const n=e.XpG(2);e.R7$(4),e.SpI("",n.durationLabel," sec")}}function Vn(o,c){if(1&o&&(e.j41(0,"div",38)(1,"span",39),e.EFF(2,"Style"),e.k0s(),e.j41(3,"span",40),e.EFF(4),e.k0s()()),2&o){const n=e.XpG(2);e.R7$(4),e.JRh(null==n.activeImage?null:n.activeImage.styleName)}}function $n(o,c){if(1&o&&(e.j41(0,"span",40),e.EFF(1),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.JRh(null==n.activeImage?null:n.activeImage.resolution)}}function Xn(o,c){if(1&o&&(e.j41(0,"span",40),e.EFF(1),e.k0s()),2&o){const n=e.XpG(2);e.R7$(),e.Lme("",null==n.activeImage?null:n.activeImage.width," x ",null==n.activeImage?null:n.activeImage.height,"")}}function Un(o,c){if(1&o&&(e.j41(0,"div",38)(1,"span",39),e.EFF(2,"Aspect Ratio"),e.k0s(),e.j41(3,"span",40),e.EFF(4),e.k0s()()),2&o){const n=e.XpG(2);e.R7$(4),e.JRh(null==n.activeImage?null:n.activeImage.aspectRatio)}}function Yn(o,c){if(1&o&&(e.qex(0),e.DNE(1,En,14,3,"div",33),e.j41(2,"div",34)(3,"div",35)(4,"span",36),e.EFF(5,"Generation Info"),e.k0s()(),e.j41(6,"div",37)(7,"div",38)(8,"span",39),e.EFF(9,"Module"),e.k0s(),e.j41(10,"span",40),e.EFF(11),e.k0s()(),e.DNE(12,Dn,5,1,"div",41)(13,Nn,5,1,"div",41)(14,Vn,5,1,"div",41),e.j41(15,"div",38)(16,"span",39),e.EFF(17),e.k0s(),e.DNE(18,$n,2,1,"span",42)(19,Xn,2,2,"span",42),e.k0s(),e.DNE(20,Un,5,1,"div",41),e.j41(21,"div",43)(22,"span",39),e.EFF(23,"Created Date"),e.k0s(),e.j41(24,"span",40),e.EFF(25),e.nI1(26,"date"),e.k0s()()()(),e.bVm()),2&o){const n=e.XpG();e.R7$(),e.Y8G("ngIf",null==n.activeImage?null:n.activeImage.prompt),e.R7$(10),e.JRh(n.module),e.R7$(),e.Y8G("ngIf",n.modelDisplayName),e.R7$(),e.Y8G("ngIf",null==n.activeImage?null:n.activeImage.isVideo),e.R7$(),e.Y8G("ngIf",null==n.activeImage?null:n.activeImage.styleName),e.R7$(3),e.JRh(null!=n.activeImage&&n.activeImage.isVideo?"Resolution":"Resolution (px)"),e.R7$(),e.Y8G("ngIf",null==n.activeImage?null:n.activeImage.isVideo),e.R7$(),e.Y8G("ngIf",!(null!=n.activeImage&&n.activeImage.isVideo)),e.R7$(),e.Y8G("ngIf",(null==n.activeImage?null:n.activeImage.isVideo)&&(null==n.activeImage?null:n.activeImage.aspectRatio)),e.R7$(5),e.JRh(e.i5U(26,10,n.activeImage.createdDate,"dd/MM/yyyy"))}}function Bn(o,c){if(1&o&&(e.j41(0,"div",43)(1,"span",39),e.EFF(2,"Tool"),e.k0s(),e.j41(3,"span",40),e.EFF(4),e.k0s()()),2&o){const n=e.XpG(2);e.R7$(4),e.JRh(n.toolName)}}function Ln(o,c){if(1&o&&(e.j41(0,"div",34)(1,"div",35)(2,"span",36),e.EFF(3,"Details"),e.k0s()(),e.j41(4,"div",37)(5,"div",43)(6,"span",39),e.EFF(7,"Updated Date"),e.k0s(),e.j41(8,"span",40),e.EFF(9),e.nI1(10,"date"),e.k0s()(),e.DNE(11,Bn,5,1,"div",52),e.k0s()()),2&o){const n=e.XpG();e.R7$(9),e.JRh(e.i5U(10,2,(null==n.activeImage?null:n.activeImage.updatedDate)||(null==n.activeImage?null:n.activeImage.createdDate),"d MMMM")),e.R7$(2),e.Y8G("ngIf",n.toolName)}}let Hn=(()=>{var o;class c{constructor(t,i,s,r){this.gtmService=t,this.aiGenService=i,this.aiPhotoService=s,this.activeModal=r,this.modelDisplayName="",this.changeStep=new e.bkB,this.activeIndexChange=new e.bkB,this.images=[],this.activeIndex=0,this.isPhotoEdit=!1,this.iscopy=!1,this.module="",this.isPlaying=!1,this.isMuted=!0,this.hasAudio=!0,this.currentTimeLabel="00:00",this.durationLabel="00:00",this.activeId="",this.isFirst=!0,this.isLast=!0,this.isVideo=!1,this.toolName=""}get carouselImages(){return(this.images||[]).filter(t=>this.hasPreviewUrl(t))}ngOnInit(){this.syncActiveId(),this.applyActiveImage(),this.updateNavigationFlags()}ngAfterViewInit(){this.selectActiveSlide()}ngOnChanges(t){(t.activeImage||t.activeIndex||t.images)&&(this.syncActiveId(),this.applyActiveImage(),this.updateNavigationFlags(),this.selectActiveSlide())}getSlideId(t,i){if(null!=t?.assetId&&""!==t?.assetId)return String(t.assetId);const r=i??this.carouselImages.indexOf(t);return`slide-${r>=0?r:0}`}getItemUrl(t){return t?.urls?.[0]||t?.metadata?.contentUrl||t?.thumbUrl||""}nextSlide(t,i,s){t?.isShown&&(i?(this.isLast=!1,this.isFirst=!0):s?(this.isFirst=!1,this.isLast=!0):(this.isLast=!1,this.isFirst=!1))}onSlide(t){const i=this.carouselImages;if(!t||!i.length)return;const s=t.current;if(!s)return;const r=i.findIndex((m,_)=>this.getSlideId(m,_)===String(s));if(r<0)return;const a=i[r];this.activeId=this.getSlideId(a,r),this.updateNavigationFlags();const d=(this.images||[]).indexOf(a);d>-1&&d!==this.activeIndex&&this.activeIndexChange.emit(d)}syncActiveId(){const t=this.carouselImages;if(!t.length)return void(this.activeId=this.getSlideId(this.activeImage,0));const i=t.indexOf(this.activeImage),s=Math.min(Math.max(this.activeIndex,0),t.length-1),r=i>-1?i:s;this.activeId=this.getSlideId(t[r]||t[0],r)}selectActiveSlide(){setTimeout(()=>{this.carousel&&this.activeId&&this.carousel.select(this.activeId),this.updateNavigationFlags()},0)}updateNavigationFlags(){const t=this.carouselImages;if(t.length<=1)return this.isFirst=!0,void(this.isLast=!0);const i=t.findIndex((r,a)=>this.getSlideId(r,a)===String(this.activeId)),s=i>=0?i:0;this.isFirst=0===s,this.isLast=s===t.length-1}hasPreviewUrl(t){return!!(t?.urls?.[0]||t?.metadata?.contentUrl||t?.thumbUrl)}applyActiveImage(){this.url=this.getItemUrl(this.activeImage),this.module=this.resolveDisplayToolName(this.activeImage),this.modelDisplayName=this.activeImage?.modelDisplayName,this.isPlaying=!1,this.isMuted=!0,this.hasAudio=!0,this.currentTimeLabel="00:00",this.durationLabel="00:00",this.iscopy=!1,this.toolName=this.resolveDisplayToolName(this.activeImage)}resolveDisplayToolName(t){return(0,S.w7)(t?.featureType)||(0,S.w7)(t?.toolName)||(0,S.w7)(t?.metadata?.subTool)||this.getToolName(t?.metadata)||t?.toolName||this.aiGenService.getfeatureType(t?.featureType,t?.toolName)||""}
1delete(){this.isPhotoEdit?this.changeStep.emit({requestDelete:!0,step:1}):this.aiGenService.delete(this.activeImage?.assetId,()=>{this.changeStep.emit({deleted:!0,step:1})},this.activeImage)}download(){this.gtmService.pushTag({eventName:g.b.gtm.eventname.aiDownloadMob,itemName:"My_Gen_"+this.activeImage?.featureType}),this.aiPhotoService.downloadImg(this.url)}copy(t){this.iscopy=!0,navigator.clipboard.writeText(t),setTimeout(()=>{this.iscopy=!1},3e3)}share(){this.aiGenService.shareFileUrl(this.url)}changeWithAI(){this.changeStep.emit({isChangeWithAI:!0,imageobj:this.activeImage,step:3})}onVideoLoadedMetadata(t){this.hasAudio=this.detectHasAudio(t),this.durationLabel=this.formatTime(t.duration),this.currentTimeLabel=this.formatTime(t.currentTime)}onVideoTimeUpdate(t){this.currentTimeLabel=this.formatTime(t.currentTime),t.duration&&isFinite(t.duration)&&(this.durationLabel=this.formatTime(t.duration))}onVideoPause(){this.isPlaying=!1}onVideoPlay(){this.isPlaying=!0}onVideoEnded(){this.isPlaying=!1,this.currentTimeLabel="00:00"}onVideoCanPlay(t){if(!t)return;const i=t.play();i&&"function"==typeof i.then&&i.then(()=>{this.isPlaying=!0}).catch(()=>{})}detectHasAudio(t){try{if(t.audioTracks&&"number"==typeof t.audioTracks.length)return t.audioTracks.length>0;if("boolean"==typeof t.mozHasAudio)return t.mozHasAudio;if("number"==typeof t.webkitAudioDecodedByteCount)return t.webkitAudioDecodedByteCount>0;if(t.mozAudioTracks&&t.mozAudioTracks.length)return t.mozAudioTracks.length>0}catch{}return!0}togglePlay(t){if(t)if(this.isPlaying)t.pause(),this.isPlaying=!1;else{const i=t.play();i&&"function"==typeof i.then?i.then(()=>this.isPlaying=!0).catch(()=>{}):this.isPlaying=!0}}toggleMute(t){t&&(this.isMuted=!this.isMuted,t.muted=this.isMuted)}formatTime(t){if(!isFinite(t)||t<0)return"00:00";const i=Math.floor(t),s=Math.floor(i/60),r=i%60;return`${String(s).padStart(2,"0")}:${String(r).padStart(2,"0")}`}getToolName(t){const i=(0,S.w7)(t?.subTool)||(0,S.w7)(t?.tool);if(i)return i;const r=[{id:1,toolName:"adjustment",displayName:"Adjustment",subTools:[]},{id:2,toolName:"remove_bg",displayName:"Remove-Bg",subTools:[]},{id:3,toolName:"portrait",displayName:"Retouch",subTools:[{id:1,subTool:"airetouch",displayName:"Face Retouch"},{id:2,subTool:"face-retouch",displayName:"Face Retouch"},{id:3,subTool:"aireshape",displayName:"Body Reshape"},{id:4,subTool:"body-reshape",displayName:"Body Reshape"},{id:5,subTool:"expression",displayName:"Face Expression"},{id:6,subTool:"face-expression",displayName:"Face Expression"},{id:7,subTool:"facereshape",displayName:"Face Reshape"},{id:8,subTool:"face-reshape",displayName:"Face Reshape"}]},{id:4,toolName:"tools",displayName:"Tools",subTools:[{id:1,subTool:"resize",displayName:"Resize"},{id:2,subTool:"crop",displayName:"Crop"},{id:3,subTool:"blur",displayName:"Blur"},{id:4,subTool:"silhouette",displayName:"Silhouette"},{id:5,subTool:"cutout",displayName:"Cutout"},{id:6,subTool:"stickify",displayName:"Sticker Maker"},{id:7,subTool:"splash",displayName:"Change Color"},{id:8,subTool:"design",displayName:"Design"}]},{id:5,toolName:"profile-maker",displayName:"Profile Picture Maker",subTools:[]},{id:6,toolName:"product-showcase",displayName:"Product Showcase",subTools:[{id:1,subTool:"design",displayName:"Design"},{id:2,subTool:"video",displayName:"Video"}]},{id:7,toolName:"aitools",displayName:"AI Tools",subTools:[{id:1,subTool:"replace",displayName:"AI Replace"},{id:2,subTool:"eraser",displayName:"AI Cleanup"},{id:3,subTool:"aieraser",displayName:"AI Cleanup"},{id:4,subTool:"upscale",displayName:"AI Upscale"},{id:5,subTool:"expand",displayName:"AI Expand"},{id:6,subTool:"changelighting",displayName:"Change Lighting"},{id:7,subTool:"changecameraangle",displayName:"Change Camera"},{id:8,subTool:"restorephoto",displayName:"Restore Old Photo"},{id:9,subTool:"colorisephoto",displayName:"Colorize Photo"},{id:10,subTool:"removewatermark",displayName:"Remove Watermark"},{id:11,subTool:"removetext",displayName:"Remove Text"},{id:12,subTool:"removelogo",displayName:"Remove Logo"},{id:13,subTool:"quickedit",displayName:"Quick Edits"},{id:14,subTool:"quickedits",displayName:"Quick Edits"},{id:15,subTool:"aighostmannequin",displayName:"Ghost Mannequin"},{id:16,subTool:"aiflatlaygenerator",displayName:"AI Flat Lay"}
1,{id:17,subTool:"airecolor",displayName:"AI Recolor"}]},{id:8,toolName:"blur",displayName:"Blur",subTools:[]},{id:9,toolName:"cutout",displayName:"Cutout",subTools:[{id:1,subTool:"cutout",displayName:"Cutout"},{id:2,subTool:"stickify",displayName:"Sticker Maker"}]}].find(a=>a.toolName===t?.tool);if(r){if(r.subTools.length>0&&t?.subTool){const a=r.subTools.find(d=>d.subTool===t.subTool);if(a)return a.displayName}return r.displayName}return""}}return(o=c).\u0275fac=function(t){return new(t||o)(e.rXU(De.y),e.rXU(H.K),e.rXU(L.s),e.rXU(h.Lw))},o.\u0275cmp=e.VBU({type:o,selectors:[["ai-image-preview"]],viewQuery:function(t,i){if(1&t&&e.GBs(Mn,5),2&t){let s;e.mGM(s=e.lsd())&&(i.carousel=s.first)}},inputs:{activeImage:"activeImage",images:"images",activeIndex:"activeIndex",isPhotoEdit:"isPhotoEdit",isVideo:"isVideo"},outputs:{changeStep:"changeStep",activeIndexChange:"activeIndexChange"},features:[e.OA$],decls:21,vars:12,consts:[["carousel",""],["photoEditDetails",""],["vid",""],[1,"generation-preview-section","d-flex","align-items-center","justify-content-center","ps-3","pe-3","pt-3","flex-column",2,"margin-top","48px"],[1,"generation-thumb-preview-wrap","position-relative","w-100","mb-4"],[1,"d-flex","align-items-center","justify-content-start","generation-thumb-preview","border-radius-12","ngb-carousel","position-relative"],[1,"h-100","border-radius-12","w-100","preview-carousel",3,"slide","activeId","wrap","interval","ngClass"],[4,"ngFor","ngForOf"],["class","changeWithAIBtn text-white d-flex align-items-center justify-content-center position-absolute text-13 text-semi","style","right: 8px; bottom: 8px; z-index: 2;",3,"click",4,"ngIf"],[1,"generation-thumb-action","d-flex","align-items-center","justify-content-start","new-scroll-behave"],[1,"btn","btn-grey","text-13","btn-h40","me-2","border-0","text-primary","ps-3","pe-3","d-flex","align-items-center","justify-content-center",3,"click"],["name","shareicon",1,"f-24","me-2"],["name","downloadblack",1,"f-24","me-2"],[1,"btn","btn-grey","text-13","btn-h40","border-0","text-primary","ps-3","pe-3","d-flex","align-items-center","justify-content-center",3,"click"],["name","deletecommon",1,"f-24","me-2"],[1,"generation-thumb-details","d-flex","align-items-center","justify-content-center","w-100","flex-column","mt-4"],[4,"ngIf","ngIfElse"],["ngbSlide","",3,"slid","id"],[1,"d-flex","overflow-hidden","w-100","flex-column","align-items-center","justify-content-center","h-100","preview-slide"],["class","res-round h-100 position-relative w-100",4,"ngIf"],["class","res-round h-100 w-100",4,"ngIf"],[1,"res-round","h-100","position-relative","w-100"],["width","100%","height","100%","playsinline","","autoplay","","disableRC","",1,"video-box","p-0",2,"border-radius","8px",3,"canplay","loadedmetadata","timeupdate","pause","play","ended","id","src"],[1,"btn-video-action","btn-play","position-absolute","d-flex","align-items-center","justify-content-center","text-white","pointer","btn-alpha",3,"click"],[1,"f-24",3,"name"],[1,"vid-time","d-inline-flex","align-items-center","justify-content-center","text-13","text-white","text-regular","lh-125","position-absolute"],[2,"min-width","39px"],["class","btn-video-action btn-audio position-absolute d-flex align-items-center justify-content-center text-white pointer btn-alpha border-radius-12",3,"click",4,"ngIf"],[1,"btn-video-action","btn-audio","position-absolute","d-flex","align-items-center","justify-content-center","text-white","pointer","btn-alpha","border-radius-12",3,"click"],[1,"res-round","h-100","w-100"],[1,"overflow-hidden","border-radius-12",3,"src"],[1,"changeWithAIBtn","text-white","d-flex","align-items-center","justify-content-center","position-absolute","text-13","text-semi",2,"right","8px","bottom","8px","z-index","2",3,"click"],["name","remixbutton",1,"f-16","me-1"],["class","prompt-section d-flex align-items-center justify-content-start w-100 flex-column",4,"ngIf"],[1,"generation-info","d-flex","align-items-center","justify-content-start","w-100","flex-column","pt-9","pb-9"],[1,"d-flex","align-items-center","justify-content-start","w-100","mb-1",2,"min-height","24px"],[1,"text-lg","text-semi",2,"color","#272B34"],[1,"all-info","pl-9","pr-9","d-flex","align-items-center","justify-content-start","w-100","flex-column"],[1,"info-list","d-flex","align-items-center","justify-content-between","w-100"],[1,"span-1","text-13","text-semi"],[1,"span-2"],["class","info-list d-flex align-items-center justify-content-between w-100",4,"ngIf"],["class","span-2",4,"ngIf"],[1,"info-list","d-flex","align-items-center","justify-content-between","w-100","border-0"],[1,"prompt-section","d-flex","align-items-center","justify-content-start","w-100","flex-column"],[1,"d-flex","align-items-center","justify-content-between","w-100","mb-9",2,"min-height","24px"],[1,"border-0","bg-transparent","popupBtn","p-0","d-inline-flex","align-items-center","justify-content-center","f-13","text-semi",3,"click","ngClass"],[1,"span-1","align-items-center","justify-content-center"],["name","copyprompt",1,"f-16","me-1"],[1,"span-2","align-items-center","justify-content-center"],["name","bluetick",1,"f-16","me-1"],[1,"prompt-textbox","border-radius-12","grey-600","w-100","mb-3","text-break"],["class","info-list d-flex align-items-center justify-content-between w-100 border-0",4,"ngIf"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"div",3)(1,"div",4)(2,"div",5)(3,"ngb-carousel",6,0),e.bIt("slide",function(a){return e.eBV(s),e.Njj(i.onSlide(a))}),e.DNE(5,An,1,1,null,7),e.k0s(),e.DNE(6,Rn,3,0,"button",8),e.k0s()(),e.j41(7,"div",9)(8,"button",10),e.bIt("click",function(){return e.eBV(s),e.Njj(i.share())}),e.nrm(9,"pi",11),e.EFF(10," Share "),e.k0s(),e.j41(11,"button",10),e.bIt("click",function(){return e.eBV(s),e.Njj(i.download())}),e.nrm(12,"pi",12),e.EFF(13," Download "),e.k0s(),e.j41(14,"button",13),e.bIt("click",function(){return e.eBV(s),e.Njj(i.delete())}),e.nrm(15,"pi",14),e.EFF(16," Delete "),e.k0s()(),e.j41(17,"div",15),e.DNE(18,Yn,27,13,"ng-container",16)(19,Ln,12,5,"ng-template",null,1,e.C5r),e.k0s()()}if(2&t){const s=e.sdS(20);e.R7$(3),e.Y8G("activeId",i.activeId)("wrap",!1)("interval",0)("ngClass",e.sMw(8,Tn,i.carouselImages.length<=1,i.isFirst,i.isLast)),e.R7$(2),e.Y8G("ngForOf",i.carouselImages),e.R7$(),e.Y8G("ngIf",!(null!=i.activeImage&&i.activeImage.isVideo)),e.R7$(12),e.Y8G("ngIf",!i.isPhotoEdit)("ngIfElse",s)}},dependencies:[l.YU,l.Sq,l.bT,oe.G,h.Oj,h.bD,y.b,l.vh],styles:[".generation-preview-section[_ngcontent-%COMP%] .generation-thumb-preview-wrap[_ngcontent-%COMP%]{min-width:320px}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-preview[_ngcontent-%COMP%]{width:100%;min-width:320px;height:330px;min-height:330px;max-height:330px;overflow:visible;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid #E2E3E9;background:#eeedf3}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-preview[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .generation-preview-section[_ngcontent-%COMP%] .generation-thumb-preview[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{height:100%;object-fit:contain;width:100%;max-height:330px}.generation-preview-section[_ngcontent-%COMP%] .res-round[_ngcontent-%COMP%]{overflow:hidden;display:flex;justify-content:center;align-items:center;margin:0 auto}.generation-preview-section[_ngcontent-%COMP%] .res-round[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .generation-preview-section[_ngcontent-%COMP%] .res-round[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}.generation-preview-section[_ngcontent-%COMP%] .preview-slide[_ngcontent-%COMP%]{min-height:330px}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-action[_ngcontent-%COMP%]{width:-webkit-fill-available!important;overflow:auto;margin:0 -16px;padding:0 16px}.generation-preview-section[_ngcontent-%COMP%] .new-scroll-behave[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none}.generation-preview-section[_ngcontent-%COMP%] .new-scroll-behave[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .popupBtn[_ngcontent-%COMP%]{border-radius:12px;border:1px solid #E2E3E9;font-size:13px;background:#fff;color:#2a2f3c}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .popupBtn[_ngcontent-%COMP%] .span-2[_ngcontent-%COMP%]{display:none}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .popupBtn[_ngcontent-%COMP%] .span-1[_ngcontent-%COMP%]{display:flex}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .popupBtn[_ngcontent-%COMP%]:hover, .generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .popupBtn[_ngcontent-%COMP%]:focus{border:1px solid #E2E3E9;background:#626adf0d}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .popupBtn[_ngcontent-%COMP%]:focus{border:1px solid #E2E3E9;background:#fff}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .btn-disabled[_ngcontent-%COMP%]{pointer-events:none!important;color:#c0bfc4}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .btn-disabled[_ngcontent-%COMP%] pi[_ngcontent-%COMP%]{color:#c0bfc4!important}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .popupBtn-active[_ngcontent-%COMP%] .span-1[_ngcontent-%COMP%]{display:none}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .popupBtn-active[_ngcontent-%COMP%] .span-2[_ngcontent-%COMP%]{color:#626adf;display:flex}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .prompt-textbox[_ngcontent-%COMP%]{border:1px solid #EEEDF3;background:#eeedf366;padding:8px;font-size:12px}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .generation-info[_ngcontent-%COMP%] .all-info[_ngcontent-%COMP%] .info-list[_ngcontent-%COMP%]{min-height:45px;border-bottom:1px solid #E2E3E9}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .generation-info[_ngcontent-%COMP%] .all-info[_ngcontent-%COMP%] .info-list[_ngcontent-%COMP%] .span-1[_ngcontent-%COMP%]{color:#606576}.generation-preview-section[_ngcontent-%COMP%] .generation-thumb-details[_ngcontent-%COMP%] .generation-info[_ngcontent-%COMP%] .all-info[_ngcontent-%COMP%] .info-list[_ngcontent-%COMP%] .span-2[_ngcontent-%COMP%]{color:#4a4f5e;font-size:12px}
1.btn-grey[_ngcontent-%COMP%]:hover{background:#626adf0d}.btn-video-action[_ngcontent-%COMP%]{bottom:8px;height:40px;width:40px;border-radius:40px;background:#60657699;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:0px}.btn-video-action[_ngcontent-%COMP%]:hover{background:#606576cc}.btn-play[_ngcontent-%COMP%]{left:8px}.btn-audio[_ngcontent-%COMP%]{right:8px}.vid-time[_ngcontent-%COMP%]{border-radius:6px;background:#5f6578b3;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:2px 6px;bottom:18px;left:56px}"]}),c})();const Ne=o=>({"d-block":o}),Ve=o=>({"d-flex":o}),ce=o=>({"d-none":o});function zn(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",24)(1,"button",25),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.switchTab("generations"))}),e.EFF(2,"AI Generations"),e.k0s(),e.j41(3,"button",25),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.switchTab("photo-edits"))}),e.EFF(4,"Photo Edits"),e.k0s()()}if(2&o){const n=e.XpG();e.R7$(),e.AVh("active","generations"===n.activeTab),e.R7$(2),e.AVh("active","photo-edits"===n.activeTab)}}function qn(o,c){1&o&&(e.j41(0,"span",26),e.EFF(1," Preview "),e.k0s())}function Kn(o,c){if(1&o&&(e.j41(0,"div",27),e.nrm(1,"img",28),e.j41(2,"span",29),e.EFF(3,"There is no AI generations as of now"),e.k0s()()),2&o){const n=e.XpG();e.Y8G("ngClass",e.eq3(1,ce,n.aiImagesA.length>0))}}function Qn(o,c){if(1&o&&(e.j41(0,"div",27),e.nrm(1,"img",28),e.j41(2,"span",29),e.EFF(3,"There is no photo edits as of now"),e.k0s()()),2&o){const n=e.XpG();e.Y8G("ngClass",e.eq3(1,ce,n.photoEdits.length>0))}}function Jn(o,c){1&o&&e.nrm(0,"div")}function Wn(o,c){if(1&o&&(e.j41(0,"video",42,1),e.nrm(2,"source",46),e.k0s()),2&o){const n=e.XpG().$implicit;e.FS9("id",n.assetId),e.Y8G("muted","muted"),e.R7$(2),e.Y8G("src",n.urls[0],e.B4B)}}function Zn(o,c){if(1&o&&e.nrm(0,"img",43),2&o){const n=e.XpG().$implicit;e.Y8G("src",(null==n?null:n.thumbUrl)||(null!=n&&null!=n.urls&&n.urls.length?n.urls[0]:""),e.B4B)}}function eo(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",47)(1,"pi",48),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.previewImage(i))}),e.k0s()()}}function to(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",49)(1,"button",50),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,s=e.XpG(3);return s.previousstep=s.step,e.Njj(s.GoToInspiraction(3,i))}),e.nrm(2,"pi",51),e.k0s()()}}function io(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",36)(1,"div",37)(2,"button",38),e.bIt("click",function(){const i=e.eBV(n),s=i.$implicit,r=i.index,a=e.XpG(3);return e.Njj(a.showPreviewModal(s,r))}),e.nrm(3,"pi",39),e.k0s()(),e.j41(4,"div",40)(5,"div",41),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(3);return e.Njj(s.previewImage(i))}),e.DNE(6,Wn,3,3,"video",42)(7,Zn,1,1,"img",43),e.k0s()(),e.DNE(8,eo,2,0,"div",44)(9,to,3,0,"div",45),e.k0s()}if(2&o){const n=c.$implicit,t=e.XpG(3);e.xc7("margin-left",t.thumbLeftMargin,"px")("margin-right",t.thumbRightMargin,"px"),e.AVh("d-none",!(null!=n&&n.thumbUrl||null!=n&&null!=n.urls&&n.urls.length)),e.R7$(6),e.vxM(null!=n&&n.isVideo?6:null!=n&&n.thumbUrl||null!=n&&null!=n.urls&&n.urls.length?7:-1),e.R7$(2),e.Y8G("ngIf",null==n?null:n.isVideo),e.R7$(),e.Y8G("ngIf",!(null!=n&&n.isVideo))}}function no(o,c){if(1&o&&(e.j41(0,"div",32)(1,"div",33),e.DNE(2,Jn,1,0,"div",34)(3,io,10,9,"div",35),e.k0s()()),2&o){const n=e.XpG(2),t=e.sdS(34);e.R7$(2),e.Y8G("ngTemplateOutlet",t),e.R7$(),e.Y8G("ngForOf",n.aiImagesA)}}function oo(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",30),e.bIt("scrolled",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onScroll())}),e.DNE(1,no,4,2,"div",31),e.k0s()}if(2&o){const n=e.XpG();e.Y8G("infiniteScrollDistance",1)("infiniteScrollUpDistance",5)("infiniteScrollThrottle",50),e.R7$(),e.Y8G("ngIf",n.aiImagesA.length)}}function so(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",36)(1,"div",37)(2,"button",38),e.bIt("click",function(){const i=e.eBV(n),s=i.$implicit,r=i.index,a=e.XpG(3);return e.Njj(a.showPreviewModal(s,r))}),e.nrm(3,"pi",39),e.k0s()(),e.j41(4,"div",40)(5,"div",41),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(3);return e.Njj(s.previewImage(i))}),e.nrm(6,"img",43),e.k0s()(),e.j41(7,"div",49)(8,"button",50),e.bIt("click",function(){const i=e.eBV(n).$implicit,s=e.XpG(3);return s.previousstep=s.step,e.Njj(s.GoToInspiraction(3,i))}),e.nrm(9,"pi",51),e.k0s()()()}if(2&o){const n=c.$implicit,t=e.XpG(3);e.xc7("margin-left",t.thumbLeftMargin,"px")("margin-right",t.thumbRightMargin,"px"),e.AVh("d-none",!(null!=n&&n.thumbUrl||null!=n&&null!=n.urls&&n.urls.length||null!=n&&null!=n.metadata&&n.metadata.contentUrl)),e.R7$(6),e.Y8G("src",(null==n?null:n.thumbUrl)||(null!=n&&null!=n.urls&&n.urls.length?n.urls[0]:null==n||null==n.metadata?null:n.metadata.contentUrl),e.B4B)}}function ro(o,c){if(1&o&&(e.j41(0,"div",32)(1,"div",33),e.DNE(2,so,10,7,"div",35),e.k0s()()),2&o){const n=e.XpG(2);e.R7$(2),e.Y8G("ngForOf",n.photoEdits)}}function ao(o,c){if(1&o){const n=e.RV6();e.j41(0,"div",30),e.bIt("scrolled",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.onScroll())}),e.DNE(1,ro,3,1,"div",31),e.k0s()}if(2&o){const n=e.XpG();e.Y8G("infiniteScrollDistance",.1)("infiniteScrollUpDistance",2)("infiniteScrollThrottle",50),e.R7$(),e.Y8G("ngIf",n.photoEdits.length)}}function co(o,c){1&o&&e.nrm(0,"blank-thumbs",52),2&o&&e.Y8G("count",6)}function lo(o,c){if(1&o){const n=e.RV6();e.j41(0,"li",15),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return i.previousstep=i.step,e.Njj(i.GoToInspiraction(3,i.item))}),e.nrm(1,"pi",53),e.EFF(2,"Change with AI "),e.k0s()}}function po(o,c){if(1&o){const n=e.RV6();e.j41(0,"li",15),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.reportAbuse())}
1),e.nrm(1,"pi",54),e.EFF(2,"Report "),e.k0s()}}function mo(o,c){if(1&o){const n=e.RV6();e.qex(0),e.j41(1,"div",55)(2,"div",56)(3,"pi",57),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.backStep())}),e.k0s(),e.j41(4,"span",26),e.EFF(5,"Preview"),e.k0s(),e.j41(6,"pi",58),e.bIt("click",function(){e.eBV(n);const i=e.XpG();return e.Njj(i.closePreview())}),e.k0s()(),e.j41(7,"ai-image-preview",59),e.bIt("activeIndexChange",function(i){e.eBV(n);const s=e.XpG();return e.Njj(s.onPreviewNavigate(i))})("changeStep",function(i){e.eBV(n);const s=e.XpG();return e.Njj(s.changeStep(i))}),e.k0s()(),e.bVm()}if(2&o){const n=e.XpG();e.R7$(3),e.Y8G("ngClass",e.eq3(6,ce,2==n.step)),e.R7$(3),e.Y8G("ngClass",e.eq3(8,Ne,2==n.step)),e.R7$(),e.Y8G("activeImage",n.item)("images",n.previewList)("activeIndex",n.activeItemIndex)("isPhotoEdit","photo-edits"===n.activeTab)}}function go(o,c){if(1&o&&(e.j41(0,"div",61)(1,"div",40)(2,"div",62)(3,"div",63),e.nrm(4,"app-ai-processing-bar",64),e.k0s()()(),e.j41(5,"div",65)(6,"div",66),e.nrm(7,"div",67)(8,"div",68)(9,"div",69),e.k0s()()()),2&o){const n=e.XpG(2);e.xc7("margin-left",n.thumbLeftMargin,"px")("margin-right",n.thumbRightMargin,"px"),e.R7$(4),e.Y8G("progress",(null==n.videoGenerationItem?null:n.videoGenerationItem.generationProgress)||0)("message",n.GlobalConstants.label.generatingVideo)}}function uo(o,c){if(1&o&&e.DNE(0,go,10,6,"div",60),2&o){const n=e.XpG();e.vxM(n.videoGenerationItem||n.aiPhotoService.inVideoProgress?0:-1)}}const _o=[{path:"",redirectTo:"projects",pathMatch:"full"},{path:"projects",component:di},{path:"account-settings",component:kn},{path:"ai-generations",component:(()=>{var o;class c{get isActiveLoading(){return"generations"===this.activeTab?this.inProgress:this.photoInProgress}get previewList(){return"generations"===this.activeTab?this.aiImagesA:this.photoEdits}constructor(t,i,s,r,a,d,m,_,P,C,M,F,X,le,de,pe){this.aiGenService=t,this.location=i,this.gtmService=s,this.aiPhotoService=r,this.uploadService=a,this.aiUploadImageService=d,this.authService=m,this.router=_,this.route=P,this.platformLocation=C,this.paymentService=M,this.offcanvasService=F,this.toastService=X,this.projectSyncService=le,this.projectsService=de,this.dialogService=pe,this.GlobalConstants=g.b,this.activeTab="generations",this.aiImages=[],this.aiImagesA=[],this.aiImagesB=[],this.photoEdits=[],this.isLoaded=!1,this.isPhotoLoaded=!1,this.inProgress=!1,this.photoInProgress=!1,this.isProductsEnd=!1,this.isPhotoProductsEnd=!1,this.photoFromTime=(new Date).getTime(),this.pageSize=20,this.step=1,this.thumbLeftMargin=8,this.thumbRightMargin=8,this.isShowPreview=!1,this.isPreview=!1,this.previousstep=1,this.featureTypes=[],this.activeItemIndex=-1,this.videoGenerationItem=null,this.videoProgressTimer=null,this.videoPollingAssetId="",this.authService.updateUserAiConis("ai-gen"),this.platformLocation.onPopState(()=>{2==this.step&&(this.step=1)}),this.paymentServiceSubs=this.paymentService.configUpdated.subscribe(me=>{me&&!this.config&&(this.getFeatureTypes(),setTimeout(()=>{this.getAllAiGenerations()},0))})}getFeatureTypes(){this.config=this.paymentService.config,this.featureTypes=this.config.featureDetails.filter(t=>1==t.webMobileHistoryStatus).map(t=>t.featureType)}ngOnInit(){document.body.classList.add("m-h-auto"),this.aiImagesA=[],this.aiImagesB=[],this.aiImages=[],this.photoEdits=[],"photo-edits"===this.route.snapshot.queryParamMap.get("tab")&&this.switchTab("photo-edits"),this.checkStatusSub=this.aiPhotoService.checkStatusSub.subscribe(i=>{i&&i?.isVideo&&this.getAllAiGenerations()})}ngOnDestroy(){document.body.classList.remove("m-h-auto"),document.body.classList.remove("overflow-hidden"),this.checkStatusSub&&this.checkStatusSub.unsubscribe(),this.paymentServiceSubs&&this.paymentServiceSubs.unsubscribe(),this.stopVideoProgress()}switchTab(t){this.activeTab===t||1!==this.step||(this.isShowPreview=!1,this.activeTab=t,window.scrollTo({top:0}),"photo-edits"===t&&!this.isPhotoLoaded&&!this.photoInProgress&&(this.photoFromTime=(new Date).getTime(),this.isPhotoProductsEnd=!1,this.getAllPhotoEdits()))}changeStep(t){if(t.requestDelete)this.delete();else{if(t.deleted){if(this.isShowPreview=!1,this.deleteItem()&&2===this.step)return;this.step=t.step??1}else t.isChangeWithAI?(this.item=t?.imageobj?t?.imageobj:this.item,this.GoToInspiraction(3,this.item)):this.step=t;document.body.classList.remove("overflow-hidden")}}deleteItem(){const t="generations"===this.activeTab,i=t?this.aiImagesA:this.photoEdits,s=i.indexOf(this.item),r=this.item;if(s>-1&&i.splice(s,1),t){const m=this.aiImages.indexOf(r);m>-1&&this.aiImages.splice(m,1),this.aiImagesA=this.aiImagesA.slice()}else this.photoEdits=this.photoEdits.slice();const a=t?this.aiImagesA:this.photoEdits;if(!a.length)return this.item=null,this.activeItemIndex=-1,!1;const d=s>-1?s>=a.length?a.length-1:s:0;return this.activeItemIndex=d,this.item=a[d],!0}previewImage(t=null){t&&(this.item=t,this.activeItemIndex=this.previewList.indexOf(t)),this.isShowPreview=!1,document.body.classList.add("overflow-hidden"),this.step=2,this.platformLocation.pushState(null,"","my/ai-generations/")}onPreviewNavigate(t){const i=this.previewList;t<0||t>=i.length||(this.activeItemIndex=t,this.item=i[t])}getItemUrl(t){return t?.imgUrl||t?.urls?.[0]||t?.metadata?.contentUrl||t?.thumbUrl||""}GoToInspiraction(t=0,i){this.aiPhotoService.isCompareEnable=!1,i.imgUrl=this.getItemUrl(i),this.aiPhotoService.mobileImageObj=i,this.router.navigate(["/mob-ai-editor/edit"],{queryParams:{tab:"design-tools",toolName:"design",productId:this.activeImgObj?.productId?this.activeImgObj?.productId:0,isEd:!0,from:"ai-generations"}})}getAllAiGenerations(){if(this.inProgress)return;this.inProgress=!0;const i=this.aiImages&&this.aiImages.length>0?this.aiImages[this.aiImages.length-1].createdDate:(new Date).getTime();this.aiGenService.getAiGeneratedImages([],i,s=>{this.isLoaded=!0;let r=s.body?s.body.projectAssets:[];r=r.map(d=>(d.isVideo=d.urls&&d.urls.length>0&&d.urls[0].includes(".mp4"),d));const a=r.find(d=>"init"===d?.status&&this.isVideoGenerationFeature(d.featureType));a&&this.showGeneratingVideo(a),r&&r.length>0&&(this.aiImages=this.aiImages.concat(r),this.aiImagesA=this.aiImagesA.concat(r)),(r.length<this.pageSize||!r.length)&&(this.isProductsEnd=!0),setTimeout(()=>{this.inProgress=!1},500)},s=>{this.isLoaded=!0,this.inProgress=!1})}showGeneratingVideo(t){this.videoGenerationItem=t,this.startVideoProgress(t),this.videoPollingAssetId!==t.assetId&&(this.videoPollingAssetId=t.assetId,this.aiGenService.checkStatus({assetId:t.assetId,avgResponseTimeInSec:3600,maxRetriesAllowed:360},0,s=>{s?.urls?.length&&(t.urls=s.urls,t.thumbUrl=s.thumbUrl,t.status="active",t.isVideo=!0,this.finishVideoProgress())},()=>{this.videoPollingAssetId=""},!0))}startVideoProgress(t){this.stopVideoProgress();const i=new Date(t.createdDate).getTime(),s=Number.isFinite(i)?i:Date.now(),r=1e3*Math.max(1,this.paymentService.getGenerationTime(t.featureType)),a=()=>{const d=Math.max(0,Date.now()-s);t.generationProgress=Math.min(90,Math.floor(d/r*100))};a(),this.videoProgressTimer=setInterval(a,250)}finishVideoProgress(){this.stopVideoProgress(),this.videoGenerationItem&&(this.videoGenerationItem.generationProgress=100),setTimeout(()=>{this.videoGenerationItem=null,this.videoPollingAssetId=""},450)}stopVideoProgress(){null!=this.videoProgressTimer&&(clearInterval(this.videoProgressTimer),this.videoProgressTimer=null)}isVideoGenerationFeature(t){return["text2video","aifaceanimate","imageanimate","frameinterpolation","image2video","duoimageanimate"].includes(t)}getAllPhotoEdits(){if(this.photoInProgress||this.isPhotoProductsEnd)return;const t=this.authService.currentUser();t?(this.photoInProgress=!0,this.projectSyncService.getUploadedAssets(t,[ee.P.IMG_EDITS],this.photoFromTime,i=>{if(this.isPhotoLoaded=!0,"FAIL"===i?.status)return void(this.photoInProgress=!1);let s=i.body?i.body.projectAssets:[];if(s=(s||[]).map(m=>(m.isVideo=m.urls&&m.urls.length>0&&m.urls[0].includes(".mp4"),!m.urls?.length&&m.metadata?.contentUrl&&(m.urls=[m.metadata.contentUrl]),m)),!s.length)return this.isPhotoProductsEnd=!0,void(this.photoInProgress=!1);const r=s[s.length-1],a=r.createdDate||r.updatedDate;a&&(this.photoFromTime=a===this.photoFromTime?a-1:a);let d=s;if(this.photoEdits.length){const m=new Set(this.photoEdits.map(_=>_.assetId));d=s.filter(_=>!m.has(_.assetId))}d.length>0&&(this.photoEdits=this.photoEdits.concat(d)),this.isPhotoProductsEnd=!1,this.photoInProgress=!1,0===d.length?this.getAllPhotoEdits():this.checkLoadMorePhotoEdits()},i=>{this.isPhotoLoaded=!0,this.photoInProgress=!1})):this.isPhotoLoaded=!0}checkLoadMorePhotoEdits(){setTimeout(()=>{"photo-edits"!==this.activeTab||this.isPhotoProductsEnd||this.photoInProgress||document.documentElement.scrollHeight<=window.innerHeight&&this.getAllPhotoEdits()},100)}onScroll(){1==this.step&&("generations"===this.activeTab?!this.inProgress&&!this.isProductsEnd&&this.isLoaded&&this.getAllAiGenerations():!this.photoInProgress&&!this.isPhotoProductsEnd&&this.isPhotoLoaded&&this.getAllPhotoEdits())}download(t=null){const i=t||this.item,s=this.getItemUrl(i);this.gtmService.pushTag({eventName:g.b.gtm.eventname.aiDownloadMob,itemName:"My_Gen_"+i?.featureType||0}),this.aiPhotoService.downloadImg(s)}showPreviewModal(t,i){this.isShowPreview=!0,this.item=t,this.activeItemIndex=i}share(){this.isShowPreview=!1,this.aiGenService.shareFileUrl(this.getItemUrl(this.item))}backStep(){1==this.step?(this.aiPhotoService.activeTool===In.sv.FACE_BODY_TOOLS&&this.aiPhotoService.queryParams?.imgUrl&&(this.aiPhotoService.queryParams.isBack="true"),this.location.back(),setTimeout(()=>{this.location.path().includes("my/ai-generations")&&this.location.back()},50)):this.step=1,document.body.classList.remove("overflow-hidden")}closePreview(){this.step=1,document.body.classList.remove("overflow-hidden"),window.history.go(-1)}delete(){this.isShowPreview=!1,"photo-edits"!==this.activeTab?this.aiGenService.delete(this.item.assetId,()=>{this.deleteItem()},this.item):this.deletePhotoEdit()}deletePhotoEdit(){this.dialogService.open({okButtonText:g.b.message.okDeleteButtonText,title:g.b.message.okDeleteAIImgBtnText,message:g.b.message.okDeleteAIImgMessage},()=>{this.projectsService.deleteAssets([this.item.assetId],()=>{const i=2===this.step,s=this.deleteItem();this.isShowPreview=!1,(!s||!i)&&(this.step=1,document.body.classList.remove("overflow-hidden")),this.toastService.showSuccess(g.b.message.deleteConfirmProjectsSucces)},i=>{this.toastService.showError(i?.description||i?.message)})},()=>{})}generate(t){t&&t.click()}onFileUploaded(t){t.length&&(this.uploadService.tempFiles=t[0],this.router.navigate(["/mob-ai-editor/edit"],{queryParams:{from:"ai-generations"}}))}reportAbuse(){this.isShowPreview=!1;const t=this.offcanvasService.open(fe.e,{position:"bottom",backdrop:!0,panelClass:"report-offcanvas",backdropClass:"showpreview-overlay"});t.componentInstance.item=this.item,t.result.then(i=>{i&&this.activeItemIndex>-1&&(("generations"===this.activeTab?this.aiImagesA:this.photoEdits).splice(this.activeItemIndex,1),this.activeItemIndex=-1,this.toastService.showSuccess("Report submitted successfully"))},()=>{})}}return(o=c).\u0275fac=function(t){return new(t||o)(e.rXU(H.K),e.rXU(l.aZ),e.rXU(De.y),e.rXU(L.s),e.rXU(wn.B),e.rXU(yn.M),e.rXU(w.u),e.rXU(I.Ix),e.rXU(I.nX),e.rXU(l.Vw),e.rXU(ne.W),e.rXU(h.RS),e.rXU(A.f),e.rXU(u.A),e.rXU(T.i),e.rXU(te.g))}
1,o.\u0275cmp=e.VBU({type:o,selectors:[["ai-generations"]],decls:35,vars:19,consts:[["videoGenerationInProgress",""],["video",""],[1,"d-flex","align-items-center","justify-content-center","position-fixed","top-header","ps-3","pe-3"],["name","backarrow",1,"position-absolute",2,"left","16px",3,"click"],["class","header-tabs d-flex align-items-center",4,"ngIf"],["class","hed-title text-semi text-lg",4,"ngIf"],["name","previewclose",1,"position-absolute","close-icon",2,"right","16px",3,"click","ngClass"],[1,"pane-section","mobile-media-list"],["class","d-flex w-100 align-items-center justify-content-center no-generation pt-14 flex-column","style","height: calc(100vh - 48px);",3,"ngClass",4,"ngIf"],["infiniteScroll","","class","ps-2 pe-2 pt-3 d-flex align-items-center justify-content-start web-margin","style","margin-top: 48px;",3,"infiniteScrollDistance","infiniteScrollUpDistance","infiniteScrollThrottle","scrolled",4,"ngIf"],["class","template-placeholder w-100",3,"count",4,"ngIf"],[1,"showpreview-modal","align-items-center","justify-content-start","position-fixed","flex-column",2,"bottom","0px",3,"ngClass"],[1,"top-handle","d-flex","align-items-center","justify-content-center"],[1,"middle-section","d-flex","align-items-center","justify-content-start"],[1,"m-0","p-0","w-100"],[1,"d-flex","align-items-center","justify-content-start","text-dark","text-lg","text-semi","w-100","mb-1",3,"click"],["name","previeweye",1,"me-3","f-24"],["class","d-flex align-items-center justify-content-start text-dark text-lg text-semi w-100 mb-1",3,"click",4,"ngIf"],["name","downloadblack",1,"me-3","f-24"],["name","shareicon",1,"me-3","f-24"],[1,"d-flex","align-items-center","justify-content-start","text-dark","text-lg","text-semi","w-100","mb-2",3,"click"],["name","deletecommon",1,"me-3","f-24"],[1,"showpreview-overlay","align-items-center","justify-content-start","position-fixed",3,"click","ngClass"],[4,"ngIf"],[1,"header-tabs","d-flex","align-items-center"],["type","button",1,"header-tab",3,"click"],[1,"hed-title","text-semi","text-lg"],[1,"d-flex","w-100","align-items-center","justify-content-center","no-generation","pt-14","flex-column",2,"height","calc(100vh - 48px)",3,"ngClass"],["src","https://static.lightxeditor.com/assets/images/no-project-graphics.png","width","120px","height","120px"],[1,"d-flex","text-center","f-14","text-dark","mt-11","mb-3"],["infiniteScroll","",1,"ps-2","pe-2","pt-3","d-flex","align-items-center","justify-content-start","web-margin",2,"margin-top","48px",3,"scrolled","infiniteScrollDistance","infiniteScrollUpDistance","infiniteScrollThrottle"],["class","d-inline-flex align-items-center justify-content-start column-left",4,"ngIf"],[1,"d-inline-flex","align-items-center","justify-content-start","column-left"],[1,"templates-thumbs-list","image-name","device-row-height","w-100",2,"--row-height","154px"],[4,"ngTemplateOutlet"],["class","img-div img-edit-div img-format-2 project-outer thumb-options mb-3",3,"margin-left","margin-right","d-none",4,"ngFor","ngForOf"],[1,"img-div","img-edit-div","img-format-2","project-outer","thumb-options","mb-3"],[1,"cta-float-top","position-absolute"],[1,"btn-icon-white","d-flex","align-items-center","justify-content-center",3,"click"],["name","threedotsnew"],[1,"c-img","d-flex","align-items-center",2,"height","var(--row-height)","border-radius","8px"],[1,"custom-image-main","edit-image-main",3,"click"],["width","100%","height","100%","playsinline","","disableRC","",1,"video-box","p-0",2,"border-radius","8px",3,"muted","id"],["loading","lazy",1,"image","template__img",2,"transform","unset",3,"src"],["class","position-absolute hw-32","style","left: 4px; bottom: 4px;",4,"ngIf"],["class","cta-float-bottom position-absolute",4,"ngIf"],[3,"src"],[1,"position-absolute","hw-32",2,"left","4px","bottom","4px"],["name","playvideo",1,"f-32",3,"click"],[1,"cta-float-bottom","position-absolute"],[1,"btn-icon-remix","outer","d-flex","align-items-center","justify-content-center",3,"click"],["name","remixbutton",1,"f-24"],[1,"template-placeholder","w-100",3,"count"],["name","remixbutton",1,"me-3","f-24","text-dark"],["name","reportabuse",1,"me-3","f-24"],[1,"div-overlay"],[1,"d-flex","align-items-center","justify-content-center","position-fixed","top-header","ps-2","pe-2"],["name","backarrow",1,"position-absolute",2,"left","16px",3,"click","ngClass"],["name","previewclose",1,"position-absolute","close-icon",2,"left","8px",3,"click","ngClass"],[1,"div-dialog",3,"activeIndexChange","changeStep","activeImage","images","activeIndex","isPhotoEdit"],[1,"img-div","img-edit-div","img-format-2","project-outer","thumb-options","mb-3","circle-animation","aigen-bg-animation",3,"margin-left","margin-right"],[1,"img-div","img-edit-div","img-format-2","project-outer","thumb-options","mb-3","circle-animation","aigen-bg-animation"],[1,"custom-image-main","edit-image-main"],[1,"d-flex","align-items-center","justify-content-center","w-100","h-100","overflow-hidden","border-radius-8"],["size","sm",3,"progress","message"],[1,"canvas"],[1,"aurora-bg"],[1,"blob","blob-1"],[1,"blob","blob-2"],[1,"blob","blob-3"]],template:function(t,i){if(1&t){const s=e.RV6();e.j41(0,"div",2)(1,"pi",3),e.bIt("click",function(){return e.eBV(s),e.Njj(i.backStep())}),e.k0s(),e.DNE(2,zn,5,4,"div",4)(3,qn,2,0,"span",5),e.j41(4,"pi",6),e.bIt("click",function(){return e.eBV(s),e.Njj(i.step=1)}),e.k0s()(),e.j41(5,"div")(6,"div",7),e.DNE(7,Kn,4,3,"div",8)(8,Qn,4,3,"div",8)(9,oo,2,4,"div",9)(10,ao,2,4,"div",9)(11,co,1,1,"blank-thumbs",10),e.k0s(),e.j41(12,"div",11)(13,"div",12),e.nrm(14,"span"),e.k0s(),e.j41(15,"div",13)(16,"ul",14)(17,"li",15),e.bIt("click",function(){return e.eBV(s),e.Njj(i.previewImage())}),e.nrm(18,"pi",16),e.EFF(19,"Preview "),e.k0s(),e.DNE(20,lo,3,0,"li",17),e.j41(21,"li",15),e.bIt("click",function(){return e.eBV(s),e.Njj(i.download(i.item))}),e.nrm(22,"pi",18),e.EFF(23,"Download "),e.k0s(),e.j41(24,"li",15),e.bIt("click",function(){return e.eBV(s),e.Njj(i.share())}),e.nrm(25,"pi",19),e.EFF(26,"Share "),e.k0s(),e.DNE(27,po,3,0,"li",17),e.j41(28,"li",20),e.bIt("click",function(){return e.eBV(s),e.Njj(i.delete())}),e.nrm(29,"pi",21),e.EFF(30,"Delete "),e.k0s()()()(),e.j41(31,"div",22),e.bIt("click",function(){return e.eBV(s),e.Njj(i.isS
1howPreview=!1)}),e.k0s()(),e.DNE(32,mo,8,10,"ng-container",23)(33,uo,1,1,"ng-template",null,0,e.C5r)}2&t&&(e.R7$(2),e.Y8G("ngIf",1==i.step),e.R7$(),e.Y8G("ngIf",2==i.step),e.R7$(),e.Y8G("ngClass",e.eq3(13,Ne,2==i.step)),e.R7$(3),e.Y8G("ngIf","generations"===i.activeTab&&i.isLoaded&&!i.aiImagesA.length&&!i.inProgress),e.R7$(),e.Y8G("ngIf","photo-edits"===i.activeTab&&i.isPhotoLoaded&&!i.photoEdits.length&&!i.photoInProgress),e.R7$(),e.Y8G("ngIf","generations"===i.activeTab),e.R7$(),e.Y8G("ngIf","photo-edits"===i.activeTab),e.R7$(),e.Y8G("ngIf",i.isActiveLoading),e.R7$(),e.Y8G("ngClass",e.eq3(15,Ve,i.isShowPreview)),e.R7$(8),e.Y8G("ngIf",!(null!=i.item&&i.item.isVideo)),e.R7$(7),e.Y8G("ngIf","generations"===i.activeTab),e.R7$(4),e.Y8G("ngClass",e.eq3(17,Ve,i.isShowPreview)),e.R7$(),e.Y8G("ngIf",2==i.step))},dependencies:[l.YU,l.Sq,l.bT,l.T3,Ce.f,oe.G,ke.g,se.D,y.b,Hn],styles:['.top-header[_ngcontent-%COMP%]{width:100%;height:48px;background-color:#f8f9f9;top:0;z-index:999}.top-header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#181a20}.top-header[_ngcontent-%COMP%] .close-icon[_ngcontent-%COMP%]{display:none}.top-header[_ngcontent-%COMP%] .header-tabs[_ngcontent-%COMP%]{background:#efeef2;border-radius:99px;padding:2px;max-width:calc(100% - 80px);max-height:32px}.top-header[_ngcontent-%COMP%] .header-tabs[_ngcontent-%COMP%] .header-tab[_ngcontent-%COMP%]{border:0;outline:none;background:transparent;color:#272b34;font-size:13px;font-weight:400;line-height:120%;height:28px;min-height:28px;max-height:28px;padding:0 16px;border-radius:99px;white-space:nowrap}.top-header[_ngcontent-%COMP%] .header-tabs[_ngcontent-%COMP%] .header-tab.active[_ngcontent-%COMP%]{background:#fff;border:.5px solid #e5e4e7;font-weight:600}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%]{width:100%;flex-wrap:wrap}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-self:flex-end;cursor:pointer}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .cta-float-bottom[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .cta-float-bottom[_ngcontent-%COMP%]{bottom:4px;right:4px;z-index:99;width:40px;height:40px;display:flex;justify-content:end}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .cta-float-bottom[_ngcontent-%COMP%] .btn-icon-white[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .cta-float-bottom[_ngcontent-%COMP%] .btn-icon-white[_ngcontent-%COMP%]{height:36px;width:36px;border-radius:50px;border:0px;background:#0006;color:#fff;outline:none}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .cta-float-bottom[_ngcontent-%COMP%] .btn-icon-white[_ngcontent-%COMP%]:hover, .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .cta-float-bottom[_ngcontent-%COMP%] .btn-icon-white[_ngcontent-%COMP%]:hover{background:#000000b3}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .cta-float-top[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .cta-float-top[_ngcontent-%COMP%]{top:4px;right:4px;z-index:99}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .cta-float-top[_ngcontent-%COMP%] .btn-icon-white[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .cta-float-top[_ngcontent-%COMP%] .btn-icon-white[_ngcontent-%COMP%]{height:20px;width:28px;border-radius:4px;border:0px;background:#0006;color:#fff;outline:none}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .cta-float-top[_ngcontent-%COMP%] .btn-icon-white[_ngcontent-%COMP%]:hover, .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .cta-float-top[_ngcontent-%COMP%] .btn-icon-white[_ngcontent-%COMP%]:hover{background:#000000b3}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%]{position:relative;width:100%;will-change:transform}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-format-2[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-format-a[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-format-2[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-format-a[_ngcontent-%COMP%]{width:calc(var(--row-height) * 1);flex-grow:10}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-format-2[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-format-a[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-format-2[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-format-a[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%]{padding-bottom:100%}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .edit-image-main[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .edit-image-main[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;margin:auto;height:100%;width:100%;left:0;right:0;border-radius:8px}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-edit-div[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-edit-div[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-self:flex-end;cursor:pointer}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-edit-div[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-edit-div[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain!important;overflow:hidden;border-radius:8px;background:transparent!important}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .ai-thumb-genrated-item[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .ai-thumb-genrated-item[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%]{border-radius:8px;background:#eeedf3;position:relative;display:inline-flex;justify-content:center;align-items:center;border:1px solid #E2E3E9;overflow:hidden;margin-top:0}.mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-left[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .ai-thumb-genrated-item[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%], .mobile-media-list[_ngcontent-%COMP%] .column-right[_ngcontent-%COMP%] .img-div[_ngcontent-%COMP%] .c-img[_ngcontent-%COMP%]{position:relative}.showpreview-modal[_ngcontent-%COMP%]{display:none;border-radius:24px 24px 0 0;background:#f8f9f9;width:100%;z-index:9999}
1.showpreview-modal[_ngcontent-%COMP%] .top-handle[_ngcontent-%COMP%]{width:100%;height:32px}.showpreview-modal[_ngcontent-%COMP%] .top-handle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:28px;height:5px;background:#e2e3e9;border-radius:5px}.showpreview-modal[_ngcontent-%COMP%] .middle-section[_ngcontent-%COMP%]{width:100%;padding:0 24px}.showpreview-modal[_ngcontent-%COMP%] .middle-section[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style-type:none}.showpreview-modal[_ngcontent-%COMP%] .middle-section[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{height:48px;cursor:pointer}.showpreview-modal[_ngcontent-%COMP%] .middle-section[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] pi[_ngcontent-%COMP%]{color:#272b34}.showpreview-overlay[_ngcontent-%COMP%]{display:none;background:#0003;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);width:100%;height:100%;top:0;bottom:0;z-index:999}@media (min-width: 320px){.device-row-height[_ngcontent-%COMP%]{--row-height: 134px !important}}@media (min-width: 344px){.device-row-height[_ngcontent-%COMP%]{--row-height: 148px !important}}@media (min-width: 353px){.device-row-height[_ngcontent-%COMP%]{--row-height: 152px !important}}@media (min-width: 360px){.device-row-height[_ngcontent-%COMP%]{--row-height: 154px !important}}@media (min-width: 384px){.device-row-height[_ngcontent-%COMP%]{--row-height: 168px !important}}@media (min-width: 412px){.device-row-height[_ngcontent-%COMP%]{--row-height: 180px !important}}@media (min-width: 480px){.device-row-height[_ngcontent-%COMP%]{--row-height: 214px !important}}@media (min-width: 600px){.device-row-height[_ngcontent-%COMP%]{--row-height: 177px !important}}@media (min-width: 720px){.device-row-height[_ngcontent-%COMP%]{--row-height: 158px !important}}@media (min-width: 768px){.device-row-height[_ngcontent-%COMP%]{--row-height: 240px !important}}@media (min-width: 991px){.web-margin[_ngcontent-%COMP%]{margin-top:73px!important}}.div-overlay[_ngcontent-%COMP%]{display:block;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#fff;z-index:1000}.div-dialog[_ngcontent-%COMP%]{background:#f8f9f9;overflow-y:scroll;height:100%;display:block}.btn-icon-remix[_ngcontent-%COMP%]{height:32px;width:32px;border-radius:8px;border:0px;background:linear-gradient(90deg,#fc5cff -4%,#2520f6);color:#fff;padding:4px;outline:none;transition:all .3s ease-in-out;position:relative;overflow:hidden}.btn-icon-remix[_ngcontent-%COMP%]:before{content:"";position:absolute;width:100px;height:100%;background-image:linear-gradient(120deg,#fff0 30%,#fffc,#fff0 70%);top:0;left:-100px;opacity:.6;animation:_ngcontent-%COMP%_shine 1.5s ease-out infinite}.btn-icon-remix[_ngcontent-%COMP%]:hover{background:linear-gradient(90deg,#fc5cff -4%,#2520f6)}.btn-icon-remix[_ngcontent-%COMP%]:focus{background:linear-gradient(90deg,#fc5cff -4%,#2520f6)}@keyframes _ngcontent-%COMP%_shine{0%{left:-50px}60%{left:50%}to{left:50%}}.video-progress[_ngcontent-%COMP%]{background:#e2e3e9cc url(https://static.lightxeditor.com/assets/images/overlay-thumb.webp) center center no-repeat;background-blend-mode:overlay;background-size:cover}']}),c})()}];let ho=(()=>{var o;class c{}return(o=c).\u0275fac=function(t){return new(t||o)}
1,o.\u0275mod=e.$C({type:o}),o.\u0275inj=e.G2t({imports:[I.iI.forChild(_o),I.iI]}),c})();var fo=p(48928),vo=p(23679),bo=p(77183),Po=p(27263);let Co=(()=>{var o;class c{}return(o=c).\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.$C({type:o}),o.\u0275inj=e.G2t({providers:[T.i,H.K],imports:[l.MD,k.YN,Y.G,k.X1,ho,h.Gk,fo.RI,h.c9,h.h_,h.IQ,h.J0,h.UN,re.MQ,se.e,K.r,vo.Y,bo.f,Po.O]}),c})()},94896:($e,U,p)=>{p.d(U,{e:()=>Z});var l=p(54438),Y=p(33391),K=p(45312),k=p(95301);let h=(()=>{var v;class j{constructor(f){this.dataService=f,this.baseUrl=K.c.centralCmsUrl,this.urlPath="andor-cms-1.0/detail/"}postReportAbuseDetail(f){return this.dataService.postApi(`${this.baseUrl}${this.urlPath}postReportAbuseDetail`,f)}}return(v=j).\u0275fac=function(f){return new(f||v)(l.KVO(k.u))},v.\u0275prov=l.jDH({token:v,factory:v.\u0275fac,providedIn:"root"}),j})();var T=p(68287),I=p(74983),E=p(60177),e=p(68064),g=p(84341);const w=["report-abuse-dialog",""],A=v=>({"d-none":v}),y=v=>({"lh-160 mb-4":v}),B=v=>({"mt-4":v}),Q=(v,j)=>({"info-up":v,"info-blue":j}),J=(v,j)=>({active:v,"pl-9 pr-9":j});function W(v,j){if(1&v){const b=l.RV6();l.j41(0,"label",18)(1,"span",19)(2,"input",20),l.bIt("change",function(){const u=l.eBV(b).$implicit,x=l.XpG();return l.Njj(x.toggleReason(u))}),l.k0s()(),l.j41(3,"span",21),l.EFF(4),l.k0s()()}if(2&v){const b=j.$implicit,f=l.XpG();l.Y8G("ngClass",l.l_i(6,J,f.isReasonSelected(b),f.envService.isMobileView)),l.R7$(2),l.Y8G("title",b)("checked",f.isReasonSelected(b)),l.BMQ("aria-label",b),l.R7$(),l.Y8G("ngClass",f.envService.isMobileView?"text-13 lh-120":"text-14 lh-160"),l.R7$(),l.JRh(b)}}let Z=(()=>{var v;class j{constructor(f,u,x,R,O){this.activeModal=f,this.activeOffcanvas=u,this.reportItemService=x,this.envService=R,this.toastService=O,this.isFocused=!1,this.reasons=["Illegal","Biased","Harmful","Offensive","Violence","Copyright violation","Trademark violation","Nudity or sexual content"],this.selectedReasons=[],this.userComment="",this.inProgress=!1}ngOnInit(){}isReasonSelected(f){return-1!==this.selectedReasons.indexOf(f)}toggleReason(f,u){u&&u.stopPropagation();const x=this.selectedReasons.indexOf(f);-1===x?this.selectedReasons.push(f):this.selectedReasons.splice(x,1)}reportAndDelete(){if(!this.selectedReasons.length||this.inProgress)return;const f=this.getReportPayload();this.inProgress=!0,this.reportItemService.postReportAbuseDetail(f).subscribe(u=>{"SUCCESS"===u.status?(this.inProgress=!1,this.closeDialog(u)):(this.inProgress=!1,this.toastService.showError(u.description))},()=>{this.inProgress=!1})}getReportPayload(){return{reasons:this.selectedReasons,assetId:this.item?.assetId||"",featureType:this.item?.featureType||"",userComment:this.userComment||"",prompt:this.item?.prompt||this.item?.toolPrompt||"",inputImgUrl:this.item?.contentUrl||this.item?.initImageUrl||this.item?.inputImgUrl||this.item?.inputImageUrl||this.item?.originalImgUrl||this.item?.originalImageUrl||"",presetStyleImgUrl:this.item?.presetStyleImgUrl||this.item?.styleImgUrl||this.item?.referenceImageUrl||"",outputImgUrl:this.item?.outputImgUrl||this.item?.url||this.item?.urls?.[0]||this.item?.thumbUrl||"",appname:"LightX Web"}}closeDialog(f){const u={reasons:this.selectedReasons,userComment:this.userComment,response:f};this.activeOffcanvas?this.activeOffcanvas.close(u):this.activeModal&&this.activeModal.close(u)}focusIn(){this.isFocused=!0}focusOut(){this.isFocused=!1}closePreview(){this.activeOffcanvas?this.activeOffcanvas.close():this.activeModal&&this.activeModal.close()}}return(v=j).\u0275fac=function(f){return new(f||v)(l.rXU(Y.Lw,8),l.rXU(Y.DI,8),l.rXU(h),l.rXU(T.L),l.rXU(I.f))},v.\u0275cmp=l.VBU({type:v,selectors:[["","report-abuse-dialog",""]],inputs:{item:"item"},attrs:w,decls:24,vars:22,consts:[[1,"modal-header","border-0","ugct-header","upgrade-page","d-none","d-lg-flex"],["type","button","aria-hidden","close",1,"close",3,"click"],["name","close",1,"f-30"],[1,"d-flex","align-items-center","justify-content-start","w-100","flex-column","pt-4","pb-4","modal-container-section"],[1,"d-flex","align-items-center","justify-content-between","h-32","mb-1","w-100"],[1,"text-semi","f-20","grey-800","lh-125","m-0"],["name","previewclose",1,"f-24",3,"click","ngClass"],[1,"grey-500","text-14","lh-125","d-inline-flex","align-items-center","justify-content-start","mb-3",3,"ngClass"],[1,"d-flex","align-items-center","justify-content-start","mb-1","w-100","checkbox-group"],[1,"d-inline-flex","align-items-center","justify-content-start","text-semi","text-lg","grey-800","h-32","lh-160","m-0","w-100"],[1,"d-inline-flex","ms-1","text-12","text-medium","text-red","lh-140"],[1,"reasons-list","w-100"],["class","reason-item h-40 border-radius-8 ps-2 pe-2 d-flex align-items-center pointer",3,"ngClass",4,"ngFor","ngForOf"],[1,"d-flex","align-items-center","justify-content-start","mb-1","w-100","mt-3","text-lg","text-semi","grey-800","h-32",3,"ngClass"],[1,"prompt-view"],[1,"textarea-col","position-relative",3,"ngClass"],["rows","4","maxlength","255","placeholder","Please describe your concern (optional)",1,"prompt-text",3,"ngModelChange","blur","focus","ngModel"],["type","button",1,"btn","btn-primary","btn-h48","w-100","report-submit","mt-3",3,"click","ngClass","disabled"],[1,"reason-item","h-40","border-radius-8","ps-2","pe-2","d-flex","align-items-center","pointer",3,"ngClass"],[1,"checkboxc","d-inline-flex","mr-9"],["type","checkbox",3,"change","title","checked"],[1,"grey-600",3,"ngClass"]],template:function(f,u){1&f&&(l.j41(0,"div",0)(1,"button",1),l.bIt("click",function(){return u.closePreview()}),l.nrm(2,"pi",2),l.k0s()(),l.j41(3,"div",3)(4,"div",4)(5,"h2",5),l.EFF(6,"Report"),l.k0s(),l.j41(7,"pi",6),l.bIt("click",function(){return u.closePreview()}),l.k0s()(),l.j41(8,"span",7),l.EFF(9," Your feedback allows us to enhance the images we display in the future. Please let us know what you expected and what occurred. "),l.k0s(),l.j41(10,"div",8)(11,"h3",9),l.EFF(12," Why are you reporting this? "),l.j41(13,"span",10),l.EFF(14,"Required"),l.k0s()()(),l.j41(15,"div",11),l.DNE(16,W,5,9,"label",12),l.k0s(),l.j41(17,"div",13),l.EFF(18,"Please describe your concern"),l.k0s(),l.j41(19,"div",14)(20,"div",15)(21,"textarea",16),l.mxI("ngModelChange",function(R){return l.DH7(u.userComment,R)||(u.userComment=R),R}),l.bIt("blur",function(){return u.focusOut()})("focus",function(){return u.focusIn()}),l.k0s()()(),l.j41(22,"button",17),l.bIt("click",function(){return u.reportAndDelete()}),l.EFF(23),l.k0s()()),2&f&&(l.R7$(7),l.Y8G("ngClass",l.eq3(11,A,!u.envService.isMobileView)),l.R7$(),l.Y8G("ngClass",l.eq3(13,y,u.envService.isMobileView)),l.R7$(8),l.Y8G("ngForOf",u.reasons),l.R7$(),l.Y8G("ngClass",l.eq3(15,B,u.envService.isMobileView)),l.R7$(3),l.Y8G("ngClass",l.l_i(17,Q,u.userComment.length,u.isFocused)),l.R7$(),l.AVh("blue-active",u.isFocused),l.R50("ngModel",u.userComment),l.R7$(),l.Y8G("ngClass",l.eq3(20,B,u.envService.isMobileView))("disabled",!u.selectedReasons.length||u.inProgress),l.R7$(),l.SpI(" ",u.inProgress?"Reporting...":"Report and Delete"," "))},dependencies:[E.YU,E.Sq,e.b,g.me,g.BC,g.tU,g.vS],styles:['.modal-container-section[_ngcontent-%COMP%]{padding-left:28px;padding-right:28px}.reasons-list[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:12px;row-gap:8px}.reason-item[_ngcontent-%COMP%]:hover{background:#626adf0d}.reason-item.active[_ngcontent-%COMP%]{background:#626adf0d;font-weight:500!important}.checkboxc[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;border-radius:8px;border:1px solid #B0B3BF;background:#ffffff0d;cursor:pointer;height:24px;margin:0;width:24px}.checkboxc[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked{background:#626adf url(https://static.lightxeditor.com/assets/icons/checkbox-tick-32.svg) center no-repeat!important;background-size:24px 24px!important;border:1px solid #626ADF!important}.checkboxc[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked:hover{background:#626adf url(https://static.lightxeditor.com/assets/icons/checkbox-tick-32.svg) center no-repeat!important;border:1px solid #626ADF!important;background-size:24px 24px!important}.concern-input[_ngcontent-%COMP%]{background:#fbfbfd;border:1px solid #D1D4DE;border-radius:12px;color:#121212;font-size:14px;font-weight:500;height:106px;line-height:20px;outline:none;padding:12px;resize:none;width:100%}@media (max-width: 575px){.report-abuse-dialog[_ngcontent-%COMP%]{padding:22px}.reasons-list[_ngcontent-%COMP%]{grid-template-columns:1fr}}.prompt-view[_ngcontent-%COMP%]{width:100%}.prompt-view[_ngcontent-%COMP%] .textarea-col[_ngcontent-%COMP%]{width:100%;height:110px;border-radius:12px;border:0px!important;background:linear-gradient(90deg,#fc5cff05 -4%,#2520f605);padding:0 4px 4px}.prompt-view[_ngcontent-%COMP%] .textarea-col[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:12px;padding:.9px;border:none;background:linear-gradient(90deg,#c9cad4 -4% 100%);-webkit-mask:linear-gradient(90deg,#C9CAD4 -4%,#C9CAD4 100%) content-box,linear-gradient(90deg,#C9CAD4 -4%,#C9CAD4 100%);-webkit-mask-composite:xor;mask-composite:exclude;z-index:1}.prompt-view[_ngcontent-%COMP%] .textarea-col[_ngcontent-%COMP%]:hover:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:12px;padding:.9px;border:none;background:linear-gradient(90deg,#606576 -4% 100%);-webkit-mask:linear-gradient(90deg,#606576 -4%,#606576 100%) content-box,linear-gradient(90deg,#606576 -4%,#606576 100%);-webkit-mask-composite:xor;mask-composite:exclude;z-index:1}.prompt-view[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none;outline:none;width:100%;height:100%;padding:8px;font-size:13px;color:#b0b3bf;border:0px;background:transparent;border-radius:12px;line-height:160%;position:relative;z-index:2}.prompt-view[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-scrollbar{width:4px;height:4px;border-radius:12px}.prompt-view[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#e3e3e3;border-radius:12px;margin-top:8px;margin-bottom:8px}.prompt-view[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#9a9a9a;border-radius:12px}.prompt-view[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#555}.prompt-view[_ngcontent-%COMP%] .prompt-info[_ngcontent-%COMP%]{font-size:11px;color:#b0b3bf;margin-top:0;padding-left:8px;line-height:10px;min-height:8px}.info-up[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:12px;padding:.9px;border:none;background:linear-gradient(90deg,#c9cad4 -4% 100%)!important;-webkit-mask:linear-gradient(90deg,#C9CAD4 -4%,#C9CAD4 100%) content-box,linear-gradient(90deg,#C9CAD4 -4%,#C9CAD4 100%)!important;-webkit-mask-composite:xor!important;mask-composite:exclude!important;z-index:1}.info-blue[_ngcontent-%COMP%]{background:linear-gradient(90deg,#fc5cff0d -4%,#2520f60d)!important}.info-blue[_ngcontent-%COMP%]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:12px;padding:.92px;border:none;background:linear-gradient(90deg,#fc5cff -4%,#2520f6)!important;-webkit-mask:linear-gradient(90deg,#FC5CFF -4%,#2520F6 100%) content-box,linear-gradient(90deg,#FC5CFF -4%,#2520F6 100%)!important;-webkit-mask-composite:xor!important;mask-composite:exclude!important;z-index:1}.info-blue[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#626adf!important}.prompt-text[_ngcontent-%COMP%]{color:#272b34!important}']}),j})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.