From c79ab6e3603659dcbc5454cd11d3ffb3524e6daf Mon Sep 17 00:00:00 2001 From: miladsoft Date: Tue, 17 Dec 2024 09:37:02 +0000 Subject: [PATCH] Auto-generated commit Triggered by commit: https://github.com/block-core/angor-hub/commit/3a001ebe436e281e186ec48d5460a71de9913144 --- 364.66f8a9acfa3f5fdf.js => 364.54b0716593d7a906.js | 2 +- 404.html | 2 +- index.html | 2 +- ngsw.json | 2 +- runtime.b77179006516b525.js => runtime.bca0f404c3dcc582.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename 364.66f8a9acfa3f5fdf.js => 364.54b0716593d7a906.js (73%) rename runtime.b77179006516b525.js => runtime.bca0f404c3dcc582.js (74%) diff --git a/364.66f8a9acfa3f5fdf.js b/364.54b0716593d7a906.js similarity index 73% rename from 364.66f8a9acfa3f5fdf.js rename to 364.54b0716593d7a906.js index f941854..e76b93f 100644 --- a/364.66f8a9acfa3f5fdf.js +++ b/364.54b0716593d7a906.js @@ -1 +1 @@ -"use strict";(self.webpackChunkangor=self.webpackChunkangor||[]).push([[364],{8364:(K,d,r)=>{r.r(d),r.d(d,{default:()=>L});var c=r(467),f=r(9345),l=r(177),t=r(4438),m=r(8834),k=r(833),x=r(3),h=r(2408),g=r(9213),j=r(9042),y=r(7575),p=r(9183),b=r(7250),F=r(450),I=r(4823),v=r(5245),$=r(8098),B=r(1413),S=r(6977),u=r(8141),R=r(9437),P=r(7673),C=r(497),E=r(7291),T=r(8729);const D=(i,a)=>a.nostrPubKey,G=i=>["/chat",i];function w(i,a){if(1&i){const e=t.RV6();t.j41(0,"div",52),t.bIt("click",function(){t.eBV(e);const n=t.XpG().$implicit,s=t.XpG();return t.Njj(s.goToProjectDetails(n))}),t.EFF(1),t.k0s()}if(2&i){const e=t.XpG().$implicit;t.R7$(),t.SpI(" ",e.displayName||e.nostrPubKey," ")}}function M(i,a){if(1&i&&(t.j41(0,"div",27),t.EFF(1),t.k0s()),2&i){const e=t.XpG().$implicit;t.R7$(),t.SpI(" ",e.displayName||e.nostrPubKey," ")}}function N(i,a){if(1&i){const e=t.RV6();t.j41(0,"div",29)(1,"div",53)(2,"button",54),t.nrm(3,"mat-icon",55),t.k0s()(),t.j41(4,"div",53)(5,"button",56),t.bIt("click",function(){t.eBV(e);const n=t.XpG().$implicit,s=t.XpG();return t.Njj(s.toggleBookmark(n.nostrPubKey))}),t.nrm(6,"mat-icon",55),t.nI1(7,"async"),t.k0s()()()}if(2&i){let e;const o=t.XpG().$implicit,n=t.XpG();t.R7$(2),t.Y8G("routerLink",t.eq3(5,G,o.nostrPubKey)),t.R7$(),t.Y8G("svgIcon","heroicons_outline:chat-bubble-left-right"),t.R7$(3),t.Y8G("svgIcon",null!=(e=t.bMT(7,3,n.bookmarks$))&&e.includes(o.nostrPubKey)?"heroicons_solid:bookmark":"heroicons_outline:bookmark")}}function Y(i,a){if(1&i){const e=t.RV6();t.j41(0,"angor-card",13)(1,"div",16),t.nrm(2,"img",17),t.k0s(),t.j41(3,"div",18)(4,"div",19),t.nrm(5,"img",20),t.k0s(),t.j41(6,"div",21),t.nrm(7,"countdown-timer",22),t.k0s()(),t.j41(8,"div",23)(9,"div",24)(10,"div",25),t.DNE(11,w,2,1,"div",26)(12,M,2,1,"div",27),t.j41(13,"div",28),t.EFF(14),t.k0s()(),t.DNE(15,N,8,7,"div",29),t.k0s(),t.nrm(16,"hr",30),t.j41(17,"div",31)(18,"div",32),t.nrm(19,"mat-icon",33),t.j41(20,"div",34)(21,"span",35),t.EFF(22,"Target Amount"),t.k0s(),t.j41(23,"span",36),t.EFF(24),t.nI1(25,"number"),t.k0s()()(),t.j41(26,"div",32),t.nrm(27,"mat-icon",33),t.j41(28,"div",34)(29,"span",35),t.EFF(30,"Start Date"),t.k0s(),t.j41(31,"span",36),t.EFF(32),t.nI1(33,"date"),t.k0s()()(),t.j41(34,"div",32),t.nrm(35,"mat-icon",33),t.j41(36,"div",34)(37,"span",35),t.EFF(38,"Penalty Days"),t.k0s(),t.j41(39,"span",36),t.EFF(40),t.k0s()()(),t.j41(41,"div",32),t.nrm(42,"mat-icon",33),t.j41(43,"div",34)(44,"span",35),t.EFF(45,"Expiry Date"),t.k0s(),t.j41(46,"span",36),t.EFF(47),t.nI1(48,"date"),t.k0s()()()(),t.j41(49,"div",37)(50,"div",38)(51,"span",35),t.EFF(52,"Investment Progress"),t.k0s(),t.j41(53,"span",39),t.EFF(54),t.nI1(55,"number"),t.nI1(56,"number"),t.k0s()(),t.j41(57,"div",40),t.nrm(58,"div",41),t.k0s(),t.j41(59,"div",42)(60,"span",43),t.EFF(61),t.k0s(),t.j41(62,"span",43),t.EFF(63),t.nI1(64,"number"),t.k0s()()(),t.j41(65,"div",44)(66,"a",45)(67,"span",46),t.nrm(68,"mat-icon",47),t.j41(69,"span",48),t.EFF(70,"Invest Now"),t.k0s()()(),t.j41(71,"button",49),t.bIt("click",function(){const n=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.goToProjectDetails(n))}),t.j41(72,"span",46),t.nrm(73,"mat-icon",50),t.j41(74,"span",51),t.EFF(75,"View Details"),t.k0s()()()()()()}if(2&i){const e=a.$implicit,o=t.XpG();t.R7$(2),t.Y8G("src",e.banner||"/images/pages/profile/cover.jpg",t.B4B),t.R7$(3),t.Y8G("src",e.picture||"images/avatars/avatar-placeholder.png",t.B4B),t.R7$(2),t.Y8G("startDate",e.startDate)("expiryDate",e.expiryDate),t.R7$(4),t.vxM(e.displayName||e.name?11:-1),t.R7$(),t.vxM(e.name||e.displayName?-1:12),t.R7$(2),t.SpI(" ",e.about||"No description available"," "),t.R7$(),t.vxM(e.displayName||e.name?15:-1),t.R7$(4),t.Y8G("svgIcon","heroicons_outline:currency-dollar"),t.R7$(5),t.Lme("",t.bMT(25,27,e.targetAmount)," ","mainnet"===o.indexerService.getNetwork()?"BTC":"TBTC",""),t.R7$(3),t.Y8G("svgIcon","heroicons_outline:calendar"),t.R7$(5),t.JRh(t.bMT(33,29,1e3*e.startDate)),t.R7$(3),t.Y8G("svgIcon","heroicons_outline:clock"),t.R7$(5),t.SpI("",e.penaltyDays," days"),t.R7$(2),t.Y8G("svgIcon","heroicons_outline:calendar"),t.R7$(5),t.JRh(t.bMT(48,31,1e3*e.expiryDate)),t.R7$(7),t.E5c(" ",t.bMT(55,33,(null==o.projectStats[e.projectIdentifier]?null:o.projectStats[e.projectIdentifier].amountInvested)/1e8||0)," / ",t.bMT(56,35,e.targetAmount)," ","mainnet"===o.indexerService.getNetwork()?"BTC":"TBTC"," "),t.R7$(4),t.xc7("width",o.Math.min(((null==o.projectStats[e.projectIdentifier]?null:o.projectStats[e.projectIdentifier].amountInvested)/1e8||0)/e.targetAmount*100,100)+"%"),t.R7$(3),t.SpI(" ",(null==o.projectStats[e.projectIdentifier]?null:o.projectStats[e.projectIdentifier].investorCount)||0," Investors "),t.R7$(2),t.SpI(" ",t.i5U(64,37,((null==o.projectStats[e.projectIdentifier]?null:o.projectStats[e.projectIdentifier].amountInvested)/1e8||0)/e.targetAmount*100,"1.0-1"),"% Complete "),t.R7$(3),t.Y8G("href",("mainnet"===o.indexerService.getNetwork()?"https://beta.angor.io/view/":"https://test.angor.io/view/")+e.projectIdentifier,t.B4B),t.R7$(2),t.Y8G("svgIcon","heroicons_solid:circle-stack"),t.R7$(5),t.Y8G("svgIcon","heroicons_outline:document-text")}}function A(i,a){1&i&&(t.j41(0,"div",14),t.nrm(1,"mat-spinner",57),t.j41(2,"div",58),t.EFF(3,"Loading projects..."),t.k0s()()),2&i&&(t.R7$(),t.Y8G("diameter",40))}function X(i,a){1&i&&(t.j41(0,"div",15),t.nrm(1,"mat-icon",59),t.j41(2,"div",60),t.EFF(3," No projects "),t.k0s()()),2&i&&(t.R7$(),t.Y8G("svgIcon","heroicons_outline:archive-box-x-mark"))}const L=[{path:"",component:(()=>{class i{constructor(e,o,n){this._storageService=e,this._router=o,this._projectsService=n,this.bookmarkService=(0,t.WQX)($.U),this.indexerService=(0,t.WQX)(k.F),this.savedProjectDetailes=(0,t.vPA)([]),this.isLoading=(0,t.vPA)(!1),this.bookmarks$=this.bookmarkService.bookmarks$,this._unsubscribeAll=new B.B,this.projectStats={},this.Math=Math}ngOnInit(){var e=this;return(0,c.A)(function*(){try{yield e.bookmarkService.initializeForCurrentUser(),yield e.loadBookmarkedProjects(),e.subscribeToBookmarkChanges(),e.isLoading.set(!1)}catch(o){console.error("Error during initialization:",o),e.isLoading.set(!1)}e._projectsService.projectStats$.subscribe(o=>{e.projectStats=o})})()}trackByFn(e,o){return o.nostrPubKey||e}loadBookmarkedProjects(){var e=this;return(0,c.A)(function*(){e.isLoading.set(!0);try{const o=yield e.bookmarkService.getBookmarks(),n=yield e._storageService.getProjectsByNostrPubKeys(o);e.savedProjectDetailes.set(n),e.isLoading.set(!1)}catch(o){console.error("Error loading bookmarked projects:",o),e.isLoading.set(!1)}})()}subscribeToBookmarkChanges(){var e=this;this.bookmarks$.pipe((0,S.Q)(this._unsubscribeAll)).subscribe(function(){var o=(0,c.A)(function*(n){try{const s=yield e._storageService.getProjectsByNostrPubKeys(n);e.savedProjectDetailes.set(s),e.fetchMetadataForProjects(e.savedProjectDetailes()),e.isLoading.set(!1)}catch(s){console.error("Error updating bookmarks:",s),e.isLoading.set(!1)}});return function(n){return o.apply(this,arguments)}}())}fetchMetadataForProjects(e){e.forEach(o=>{this._storageService.getProfile(o.nostrPubKey).then(n=>{n&&this.updateProjectMetadata(o,n)})})}updateProjectMetadata(e,o){e.displayName=o.name||e.displayName,e.about=o.about||e.about,e.picture=o.picture||e.picture,e.banner=o.banner||e.banner}toggleBookmark(e){var o=this;return(0,c.A)(function*(){(yield o.bookmarkService.isBookmarked(e))?yield o.bookmarkService.removeBookmark(e):yield o.bookmarkService.addBookmark(e)})()}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}goToProjectDetails(e){this._projectsService.fetchProjectStats(e.projectIdentifier).pipe((0,u.M)(o=>{this._storageService.saveProjectStats(e.projectIdentifier,o)}),(0,u.M)(()=>{this._router.navigate(["/profile",e.nostrPubKey,e.projectIdentifier])}),(0,R.W)(o=>(console.error(`Failed to navigate to project details for ${e.projectIdentifier}:`,o),(0,P.of)(null)))).subscribe()}static{this.\u0275fac=function(o){return new(o||i)(t.rXU(E.n),t.rXU(v.Ix),t.rXU(T.i))}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-bookmark"]],decls:20,vars:2,consts:[[1,"flex","min-w-0","flex-auto","flex-col"],[1,"dark","relative","flex-0","overflow-hidden","bg-gray-800","px-4","py-8","sm:p-16"],["viewBox","0 0 960 540","width","100%","height","100%","preserveAspectRatio","xMidYMax slice","xmlns","http://www.w3.org/2000/svg",1,"pointer-events-none","absolute","inset-0"],["fill","none","stroke","currentColor","stroke-width","100",1,"text-gray-700","opacity-25"],["r","234","cx","196","cy","23"],["r","234","cx","790","cy","491"],[1,"relative","z-10","flex","flex-col","items-center"],[1,"text-xl","font-semibold"],[1,"mt-1","text-center","text-4xl","font-extrabold","leading-tight","tracking-tight","sm:text-7xl"],[1,"text-secondary","mt-6","max-w-2xl","text-center","tracking-tight","sm:text-2xl"],[1,"p-6","sm:p-10"],[1,"mx-auto","flex","w-full","flex-auto","flex-col","sm:max-w-5xl"],[1,"mt-10","grid","w-full","min-w-0","grid-cols-1","gap-6","sm:grid-cols-1","md:grid-cols-1","lg:grid-cols-2"],[1,"filter-info","flex","w-full","flex-col"],[1,"flex","flex-auto","flex-col","items-center","justify-center"],[1,"flex","flex-auto","flex-col","items-center","justify-center","bg-gray-100","dark:bg-transparent"],[1,"flex","h-32"],["alt","Card cover image","onerror","this.onerror=null; this.src='/images/pages/profile/cover.jpg';","alt","Card cover image",1,"object-cover",3,"src"],[1,"flex","px-8"],[1,"bg-card","-mt-12","rounded-full","p-1"],["onerror","this.onerror=null; this.src='/images/avatars/avatar-placeholder.png';","alt","Project logo",1,"h-24","w-24","rounded-full","object-cover",3,"src"],[1,"ml-auto"],[3,"startDate","expiryDate"],[1,"flex","flex-col","px-8","pb-6","pt-4"],[1,"flex","items-center","justify-between"],[1,"min-w-0","flex-1"],["role","button",1,"truncate","text-2xl","font-semibold","leading-tight"],[1,"truncate","text-2xl","font-semibold","leading-tight"],[1,"text-secondary","mt-1","truncate","leading-tight"],[1,"absolute","top-2","right-2","flex","space-x-2"],[1,"my-6","w-full","border-t"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-4"],[1,"flex","items-center","space-x-2","p-4"],[1,"text-primary","text-3xl",3,"svgIcon"],[1,"flex","flex-col"],[1,"text-sm","dark:text-gray-100","text-gray-500"],[1,"font-semibold"],[1,"mt-6","p-4","bg-gray-50","dark:bg-gray-800","rounded-lg"],[1,"flex","justify-between","mb-2"],[1,"text-sm","font-semibold"],[1,"w-full","bg-gray-200","rounded-full","h-2.5","dark:bg-gray-700"],[1,"bg-primary","h-2.5","rounded-full"],[1,"flex","justify-between","mt-2"],[1,"text-xs","dark:text-gray-100","text-gray-500"],[1,"mt-6","grid","grid-cols-1","sm:grid-cols-2","gap-4"],["target","_blank",1,"group","relative","inline-flex","items-center","justify-center","overflow-hidden","rounded-lg","bg-primary","p-0.5","text-sm","font-medium","hover:bg-primary-700","focus:outline-none","focus:ring-4","focus:ring-primary-300","dark:bg-primary","dark:hover:bg-primary-600","dark:focus:ring-primary-800","w-full",3,"href"],[1,"relative","flex","items-center","justify-center","gap-2","rounded-md","bg-card","w-full","px-4","py-2.5","transition-all","duration-75","ease-in","group-hover:bg-opacity-0"],[1,"icon-size-5","text-primary","dark:text-primary-400","group-hover:text-white",3,"svgIcon"],[1,"text-primary","dark:text-primary-400","group-hover:text-white"],[1,"group","relative","inline-flex","items-center","justify-center","overflow-hidden","rounded-lg","bg-primary","p-0.5","text-sm","font-medium","hover:bg-primary-700","focus:outline-none","focus:ring-4","focus:ring-primary-300","dark:bg-primary","dark:hover:bg-primary-600","dark:focus:ring-primary-800","w-full",3,"click"],[1,"icon-size-5","text-gray-700","dark:text-gray-300","group-hover:text-white",3,"svgIcon"],[1,"text-gray-700","dark:text-gray-300","group-hover:text-white"],["role","button",1,"truncate","text-2xl","font-semibold","leading-tight",3,"click"],[1,"flex","h-10","w-10","items-center","justify-center","rounded-full","border","bg-white","shadow-md"],["mat-icon-button","",3,"routerLink"],[1,"icon-size-5",3,"svgIcon"],["mat-icon-button","",3,"click"],[3,"diameter"],[1,"text-secondary","mt-4","text-lg"],[1,"icon-size-24",3,"svgIcon"],[1,"text-secondary","mt-4","text-2xl","font-semibold","tracking-tight"]],template:function(o,n){1&o&&(t.j41(0,"div",0)(1,"div",1),t.qSk(),t.j41(2,"svg",2)(3,"g",3),t.nrm(4,"circle",4)(5,"circle",5),t.k0s()(),t.joV(),t.j41(6,"div",6)(7,"h2",7),t.EFF(8,"Bookmark"),t.k0s(),t.j41(9,"div",8),t.EFF(10," Explore Your Saved Projects "),t.k0s(),t.j41(11,"div",9),t.EFF(12," Review and manage your bookmarked projects below. "),t.k0s()()(),t.j41(13,"div",10)(14,"div",11)(15,"div",12),t.Z7z(16,Y,76,40,"angor-card",13,D),t.k0s(),t.DNE(18,A,4,1,"div",14)(19,X,4,1,"div",15),t.k0s()()()),2&o&&(t.R7$(16),t.Dyx(n.savedProjectDetailes()),t.R7$(2),t.vxM(n.isLoading()?18:-1),t.R7$(),t.vxM(n.isLoading()||0!==n.savedProjectDetailes().length?-1:19))},dependencies:[v.Wk,m.Hl,m.iY,g.m_,g.An,f.n,h.RG,b.Ve,x.Sy,j.fS,F.mV,I.uc,y.PO,l.MD,l.Jj,l.QX,l.vh,p.D6,p.LG,C.W],encapsulation:2})}}return i})()}]}}]); \ No newline at end of file +"use strict";(self.webpackChunkangor=self.webpackChunkangor||[]).push([[364],{8364:(K,d,r)=>{r.r(d),r.d(d,{default:()=>L});var c=r(467),f=r(9345),l=r(177),t=r(4438),m=r(8834),k=r(833),x=r(3),h=r(2408),g=r(9213),j=r(9042),y=r(7575),p=r(9183),b=r(7250),F=r(450),I=r(4823),v=r(5245),$=r(8098),B=r(1413),S=r(6977),u=r(8141),R=r(9437),P=r(7673),C=r(497),E=r(7291),T=r(8729);const D=(i,a)=>a.nostrPubKey,G=i=>["/chat",i];function w(i,a){if(1&i){const e=t.RV6();t.j41(0,"div",52),t.bIt("click",function(){t.eBV(e);const n=t.XpG().$implicit,s=t.XpG();return t.Njj(s.goToProjectDetails(n))}),t.EFF(1),t.k0s()}if(2&i){const e=t.XpG().$implicit;t.R7$(),t.SpI(" ",e.displayName||e.nostrPubKey," ")}}function M(i,a){if(1&i&&(t.j41(0,"div",27),t.EFF(1),t.k0s()),2&i){const e=t.XpG().$implicit;t.R7$(),t.SpI(" ",e.displayName||e.nostrPubKey," ")}}function N(i,a){if(1&i){const e=t.RV6();t.j41(0,"div",29)(1,"div",53)(2,"button",54),t.nrm(3,"mat-icon",55),t.k0s()(),t.j41(4,"div",53)(5,"button",56),t.bIt("click",function(){t.eBV(e);const n=t.XpG().$implicit,s=t.XpG();return t.Njj(s.toggleBookmark(n.nostrPubKey))}),t.nrm(6,"mat-icon",55),t.nI1(7,"async"),t.k0s()()()}if(2&i){let e;const o=t.XpG().$implicit,n=t.XpG();t.R7$(2),t.Y8G("routerLink",t.eq3(5,G,o.nostrPubKey)),t.R7$(),t.Y8G("svgIcon","heroicons_outline:chat-bubble-left-right"),t.R7$(3),t.Y8G("svgIcon",null!=(e=t.bMT(7,3,n.bookmarks$))&&e.includes(o.nostrPubKey)?"heroicons_solid:bookmark":"heroicons_outline:bookmark")}}function Y(i,a){if(1&i){const e=t.RV6();t.j41(0,"angor-card",13)(1,"div",16),t.nrm(2,"img",17),t.k0s(),t.j41(3,"div",18)(4,"div",19),t.nrm(5,"img",20),t.k0s(),t.j41(6,"div",21),t.nrm(7,"countdown-timer",22),t.k0s()(),t.j41(8,"div",23)(9,"div",24)(10,"div",25),t.DNE(11,w,2,1,"div",26)(12,M,2,1,"div",27),t.j41(13,"div",28),t.EFF(14),t.k0s()(),t.DNE(15,N,8,7,"div",29),t.k0s(),t.nrm(16,"hr",30),t.j41(17,"div",31)(18,"div",32),t.nrm(19,"mat-icon",33),t.j41(20,"div",34)(21,"span",35),t.EFF(22,"Target Amount"),t.k0s(),t.j41(23,"span",36),t.EFF(24),t.nI1(25,"number"),t.k0s()()(),t.j41(26,"div",32),t.nrm(27,"mat-icon",33),t.j41(28,"div",34)(29,"span",35),t.EFF(30,"Start Date"),t.k0s(),t.j41(31,"span",36),t.EFF(32),t.nI1(33,"date"),t.k0s()()(),t.j41(34,"div",32),t.nrm(35,"mat-icon",33),t.j41(36,"div",34)(37,"span",35),t.EFF(38,"Penalty Days"),t.k0s(),t.j41(39,"span",36),t.EFF(40),t.k0s()()(),t.j41(41,"div",32),t.nrm(42,"mat-icon",33),t.j41(43,"div",34)(44,"span",35),t.EFF(45,"Expiry Date"),t.k0s(),t.j41(46,"span",36),t.EFF(47),t.nI1(48,"date"),t.k0s()()()(),t.j41(49,"div",37)(50,"div",38)(51,"span",35),t.EFF(52,"Investment Progress"),t.k0s(),t.j41(53,"span",39),t.EFF(54),t.nI1(55,"number"),t.nI1(56,"number"),t.k0s()(),t.j41(57,"div",40),t.nrm(58,"div",41),t.k0s(),t.j41(59,"div",42)(60,"span",43),t.EFF(61),t.k0s(),t.j41(62,"span",43),t.EFF(63),t.nI1(64,"number"),t.k0s()()(),t.j41(65,"div",44)(66,"a",45)(67,"span",46),t.nrm(68,"mat-icon",47),t.j41(69,"span",48),t.EFF(70,"Invest Now"),t.k0s()()(),t.j41(71,"button",49),t.bIt("click",function(){const n=t.eBV(e).$implicit,s=t.XpG();return t.Njj(s.goToProjectDetails(n))}),t.j41(72,"span",46),t.nrm(73,"mat-icon",50),t.j41(74,"span",51),t.EFF(75,"View Details"),t.k0s()()()()()()}if(2&i){const e=a.$implicit,o=t.XpG();t.R7$(2),t.Y8G("src",e.banner||"/images/pages/profile/cover.jpg",t.B4B),t.R7$(3),t.Y8G("src",e.picture||"images/avatars/avatar-placeholder.png",t.B4B),t.R7$(2),t.Y8G("startDate",e.startDate)("expiryDate",e.expiryDate),t.R7$(4),t.vxM(e.displayName||e.name?11:-1),t.R7$(),t.vxM(e.name||e.displayName?-1:12),t.R7$(2),t.SpI(" ",e.about||"No description available"," "),t.R7$(),t.vxM(e.displayName||e.name?15:-1),t.R7$(4),t.Y8G("svgIcon","heroicons_outline:currency-dollar"),t.R7$(5),t.Lme("",t.bMT(25,27,e.targetAmount)," ","mainnet"===o.indexerService.getNetwork()?"BTC":"TBTC",""),t.R7$(3),t.Y8G("svgIcon","heroicons_outline:calendar"),t.R7$(5),t.JRh(t.bMT(33,29,1e3*e.startDate)),t.R7$(3),t.Y8G("svgIcon","heroicons_outline:clock"),t.R7$(5),t.SpI("",e.penaltyDays," days"),t.R7$(2),t.Y8G("svgIcon","heroicons_outline:calendar"),t.R7$(5),t.JRh(t.bMT(48,31,1e3*e.expiryDate)),t.R7$(7),t.E5c(" ",t.bMT(55,33,(null==o.projectStats[e.projectIdentifier]?null:o.projectStats[e.projectIdentifier].amountInvested)/1e8||0)," / ",t.bMT(56,35,e.targetAmount)," ","mainnet"===o.indexerService.getNetwork()?"BTC":"TBTC"," "),t.R7$(4),t.xc7("width",o.Math.min(((null==o.projectStats[e.projectIdentifier]?null:o.projectStats[e.projectIdentifier].amountInvested)/1e8||0)/e.targetAmount*100,100)+"%"),t.R7$(3),t.SpI(" ",(null==o.projectStats[e.projectIdentifier]?null:o.projectStats[e.projectIdentifier].investorCount)||0," Investors "),t.R7$(2),t.SpI(" ",t.i5U(64,37,((null==o.projectStats[e.projectIdentifier]?null:o.projectStats[e.projectIdentifier].amountInvested)/1e8||0)/e.targetAmount*100,"1.0-1"),"% Complete "),t.R7$(3),t.Y8G("href",("mainnet"===o.indexerService.getNetwork()?"https://beta.angor.io/view/":"https://test.angor.io/view/")+e.projectIdentifier,t.B4B),t.R7$(2),t.Y8G("svgIcon","heroicons_solid:circle-stack"),t.R7$(5),t.Y8G("svgIcon","heroicons_outline:document-text")}}function A(i,a){1&i&&(t.j41(0,"div",14),t.nrm(1,"mat-spinner",57),t.j41(2,"div",58),t.EFF(3,"Loading projects..."),t.k0s()()),2&i&&(t.R7$(),t.Y8G("diameter",40))}function X(i,a){1&i&&(t.j41(0,"div",15),t.nrm(1,"mat-icon",59),t.j41(2,"div",60),t.EFF(3," No projects "),t.k0s()()),2&i&&(t.R7$(),t.Y8G("svgIcon","heroicons_outline:archive-box-x-mark"))}const L=[{path:"",component:(()=>{class i{constructor(e,o,n){this._storageService=e,this._router=o,this._projectsService=n,this.bookmarkService=(0,t.WQX)($.U),this.indexerService=(0,t.WQX)(k.F),this.savedProjectDetailes=(0,t.vPA)([]),this.isLoading=(0,t.vPA)(!1),this.bookmarks$=this.bookmarkService.bookmarks$,this._unsubscribeAll=new B.B,this.projectStats={},this.Math=Math}ngOnInit(){var e=this;return(0,c.A)(function*(){try{yield e.bookmarkService.initializeForCurrentUser(),yield e.loadBookmarkedProjects(),e.subscribeToBookmarkChanges(),e.isLoading.set(!1)}catch(o){console.error("Error during initialization:",o),e.isLoading.set(!1)}e._projectsService.projectStats$.subscribe(o=>{e.projectStats=o})})()}trackByFn(e,o){return o.nostrPubKey||e}loadBookmarkedProjects(){var e=this;return(0,c.A)(function*(){e.isLoading.set(!0);try{const o=yield e.bookmarkService.getBookmarks(),n=yield e._storageService.getProjectsByNostrPubKeys(o);e.savedProjectDetailes.set(n),e.isLoading.set(!1)}catch(o){console.error("Error loading bookmarked projects:",o),e.isLoading.set(!1)}})()}subscribeToBookmarkChanges(){var e=this;this.bookmarks$.pipe((0,S.Q)(this._unsubscribeAll)).subscribe(function(){var o=(0,c.A)(function*(n){try{const s=yield e._storageService.getProjectsByNostrPubKeys(n);e.savedProjectDetailes.set(s),e.fetchMetadataForProjects(e.savedProjectDetailes()),e.isLoading.set(!1)}catch(s){console.error("Error updating bookmarks:",s),e.isLoading.set(!1)}});return function(n){return o.apply(this,arguments)}}())}fetchMetadataForProjects(e){e.forEach(o=>{this._storageService.getProfile(o.nostrPubKey).then(n=>{n&&this.updateProjectMetadata(o,n)})})}updateProjectMetadata(e,o){e.displayName=o.name||e.displayName,e.about=o.about||e.about,e.picture=o.picture||e.picture,e.banner=o.banner||e.banner}toggleBookmark(e){var o=this;return(0,c.A)(function*(){(yield o.bookmarkService.isBookmarked(e))?yield o.bookmarkService.removeBookmark(e):yield o.bookmarkService.addBookmark(e)})()}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}goToProjectDetails(e){this._projectsService.fetchProjectStats(e.projectIdentifier).pipe((0,u.M)(o=>{this._storageService.saveProjectStats(e.projectIdentifier,o)}),(0,u.M)(()=>{this._router.navigate(["/profile",e.nostrPubKey,e.projectIdentifier])}),(0,R.W)(o=>(console.error(`Failed to navigate to project details for ${e.projectIdentifier}:`,o),(0,P.of)(null)))).subscribe()}static{this.\u0275fac=function(o){return new(o||i)(t.rXU(E.n),t.rXU(v.Ix),t.rXU(T.i))}}static{this.\u0275cmp=t.VBU({type:i,selectors:[["app-bookmark"]],decls:20,vars:2,consts:[[1,"flex","min-w-0","flex-auto","flex-col"],[1,"dark","relative","flex-0","overflow-hidden","bg-gray-800","px-4","py-8","sm:p-16"],["viewBox","0 0 960 540","width","100%","height","100%","preserveAspectRatio","xMidYMax slice","xmlns","http://www.w3.org/2000/svg",1,"pointer-events-none","absolute","inset-0"],["fill","none","stroke","currentColor","stroke-width","100",1,"text-gray-700","opacity-25"],["r","234","cx","196","cy","23"],["r","234","cx","790","cy","491"],[1,"relative","z-10","flex","flex-col","items-center"],[1,"text-xl","font-semibold"],[1,"mt-1","text-center","text-4xl","font-extrabold","leading-tight","tracking-tight","sm:text-7xl"],[1,"text-secondary","mt-6","max-w-2xl","text-center","tracking-tight","sm:text-2xl"],[1,"p-6","sm:p-10"],[1,"mx-auto","flex","w-full","flex-auto","flex-col","sm:max-w-5xl"],[1,"mt-10","grid","w-full","min-w-0","grid-cols-1","gap-6","sm:grid-cols-1","md:grid-cols-1","lg:grid-cols-2"],[1,"filter-info","flex","w-full","flex-col"],[1,"flex","flex-auto","flex-col","items-center","justify-center"],[1,"flex","flex-auto","flex-col","items-center","justify-center","bg-gray-100","dark:bg-transparent"],[1,"flex","h-32"],["alt","Card cover image","onerror","this.onerror=null; this.src='/images/pages/profile/cover.jpg';","alt","Card cover image",1,"object-cover",3,"src"],[1,"flex","px-8"],[1,"bg-card","-mt-12","rounded-full","p-1"],["onerror","this.onerror=null; this.src='/images/avatars/avatar-placeholder.png';","alt","Project logo",1,"h-24","w-24","rounded-full","object-cover",3,"src"],[1,"ml-auto"],[3,"startDate","expiryDate"],[1,"flex","flex-col","px-8","pb-6","pt-4","mt-4"],[1,"flex","items-center","justify-between"],[1,"min-w-0","flex-1"],["role","button",1,"truncate","text-2xl","font-semibold","leading-tight"],[1,"truncate","text-2xl","font-semibold","leading-tight"],[1,"text-secondary","mt-1","truncate","leading-tight"],[1,"absolute","top-2","right-2","flex","space-x-2"],[1,"my-6","w-full","border-t"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-4"],[1,"flex","items-center","space-x-2","p-4"],[1,"text-primary","text-3xl",3,"svgIcon"],[1,"flex","flex-col"],[1,"text-sm","dark:text-gray-100","text-gray-500"],[1,"font-semibold"],[1,"mt-6","p-4","bg-gray-50","dark:bg-gray-800","rounded-lg"],[1,"flex","justify-between","mb-2"],[1,"text-sm","font-semibold"],[1,"w-full","bg-gray-200","rounded-full","h-2.5","dark:bg-gray-700"],[1,"bg-primary","h-2.5","rounded-full"],[1,"flex","justify-between","mt-2"],[1,"text-xs","dark:text-gray-100","text-gray-500"],[1,"mt-6","grid","grid-cols-1","sm:grid-cols-2","gap-4"],["target","_blank",1,"group","relative","inline-flex","items-center","justify-center","overflow-hidden","rounded-lg","bg-primary","p-0.5","text-sm","font-medium","hover:bg-primary-700","focus:outline-none","focus:ring-4","focus:ring-primary-300","dark:bg-primary","dark:hover:bg-primary-600","dark:focus:ring-primary-800","w-full",3,"href"],[1,"relative","flex","items-center","justify-center","gap-2","rounded-md","bg-card","w-full","px-4","py-2.5","transition-all","duration-75","ease-in","group-hover:bg-opacity-0"],[1,"icon-size-5","text-primary","dark:text-primary-400","group-hover:text-white",3,"svgIcon"],[1,"text-primary","dark:text-primary-400","group-hover:text-white"],[1,"group","relative","inline-flex","items-center","justify-center","overflow-hidden","rounded-lg","bg-primary","p-0.5","text-sm","font-medium","hover:bg-primary-700","focus:outline-none","focus:ring-4","focus:ring-primary-300","dark:bg-primary","dark:hover:bg-primary-600","dark:focus:ring-primary-800","w-full",3,"click"],[1,"icon-size-5","text-gray-700","dark:text-gray-300","group-hover:text-white",3,"svgIcon"],[1,"text-gray-700","dark:text-gray-300","group-hover:text-white"],["role","button",1,"truncate","text-2xl","font-semibold","leading-tight",3,"click"],[1,"flex","h-10","w-10","items-center","justify-center","rounded-full","border","bg-white","shadow-md"],["mat-icon-button","",3,"routerLink"],[1,"icon-size-5",3,"svgIcon"],["mat-icon-button","",3,"click"],[3,"diameter"],[1,"text-secondary","mt-4","text-lg"],[1,"icon-size-24",3,"svgIcon"],[1,"text-secondary","mt-4","text-2xl","font-semibold","tracking-tight"]],template:function(o,n){1&o&&(t.j41(0,"div",0)(1,"div",1),t.qSk(),t.j41(2,"svg",2)(3,"g",3),t.nrm(4,"circle",4)(5,"circle",5),t.k0s()(),t.joV(),t.j41(6,"div",6)(7,"h2",7),t.EFF(8,"Bookmark"),t.k0s(),t.j41(9,"div",8),t.EFF(10," Explore Your Saved Projects "),t.k0s(),t.j41(11,"div",9),t.EFF(12," Review and manage your bookmarked projects below. "),t.k0s()()(),t.j41(13,"div",10)(14,"div",11)(15,"div",12),t.Z7z(16,Y,76,40,"angor-card",13,D),t.k0s(),t.DNE(18,A,4,1,"div",14)(19,X,4,1,"div",15),t.k0s()()()),2&o&&(t.R7$(16),t.Dyx(n.savedProjectDetailes()),t.R7$(2),t.vxM(n.isLoading()?18:-1),t.R7$(),t.vxM(n.isLoading()||0!==n.savedProjectDetailes().length?-1:19))},dependencies:[v.Wk,m.Hl,m.iY,g.m_,g.An,f.n,h.RG,b.Ve,x.Sy,j.fS,F.mV,I.uc,y.PO,l.MD,l.Jj,l.QX,l.vh,p.D6,p.LG,C.W],encapsulation:2})}}return i})()}]}}]); \ No newline at end of file diff --git a/404.html b/404.html index 5754ed3..cd3f8ce 100644 --- a/404.html +++ b/404.html @@ -41,5 +41,5 @@ - + diff --git a/index.html b/index.html index 5754ed3..cd3f8ce 100644 --- a/index.html +++ b/index.html @@ -41,5 +41,5 @@ - + diff --git a/ngsw.json b/ngsw.json index 8a59e9e..063cd5a 100644 --- a/ngsw.json +++ b/ngsw.json @@ -1,6 +1,6 @@ { "configVersion": 1, - "timestamp": 1734426295195, + "timestamp": 1734428221199, "index": "/index.html", "assetGroups": [], "dataGroups": [], diff --git a/runtime.b77179006516b525.js b/runtime.bca0f404c3dcc582.js similarity index 74% rename from runtime.b77179006516b525.js rename to runtime.bca0f404c3dcc582.js index c2ae038..0c6ecc0 100644 --- a/runtime.b77179006516b525.js +++ b/runtime.bca0f404c3dcc582.js @@ -1 +1 @@ -(()=>{"use strict";var e,v={},g={};function r(e){var n=g[e];if(void 0!==n)return n.exports;var a=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.m=v,e=[],r.O=(n,a,c,i)=>{if(!a){var t=1/0;for(f=0;f=i)&&Object.keys(r.O).every(p=>r.O[p](a[d]))?a.splice(d--,1):(l=!1,i0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[a,c,i]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var a in n)r.o(n,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,a)=>(r.f[a](e,n),n),[])),r.u=e=>e+"."+{206:"9e348e2e000c6d9e",218:"2bca28c01b9b375e",258:"af17269ef75cc52e",307:"441271afb8e1ca40",364:"66f8a9acfa3f5fdf",408:"3d872a77a722dae4",416:"703750621db94112",450:"8d64c1caeaab7f13",514:"ce4ee6ed06b70a1c",541:"46351ef9bd7cb3af",551:"3b95db84ed212394",588:"03aaa7103dd6314e",735:"7aac8a5f319a562f",740:"470288d9c9e8a26a",770:"39fda8b208991504",790:"84244f740f14be1a",837:"5790cd60449c39c3",861:"d49e02341f420dfa",865:"390f59ee2c366d2a",888:"e4547c5c0d4811fa"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="angor:";r.l=(a,c,i,f)=>{if(e[a])e[a].push(c);else{var t,l;if(void 0!==i)for(var d=document.getElementsByTagName("script"),u=0;u{t.onerror=t.onload=null,clearTimeout(s);var h=e[a];if(delete e[a],t.parentNode&&t.parentNode.removeChild(t),h&&h.forEach(_=>_(p)),m)return m(p)},s=setTimeout(b.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=b.bind(null,t.onerror),t.onload=b.bind(null,t.onload),l&&document.head.appendChild(t)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={121:0};r.f.j=(c,i)=>{var f=r.o(e,c)?e[c]:void 0;if(0!==f)if(f)i.push(f[2]);else if(121!=c){var t=new Promise((o,b)=>f=e[c]=[o,b]);i.push(f[2]=t);var l=r.p+r.u(c),d=new Error;r.l(l,o=>{if(r.o(e,c)&&(0!==(f=e[c])&&(e[c]=void 0),f)){var b=o&&("load"===o.type?"missing":o.type),s=o&&o.target&&o.target.src;d.message="Loading chunk "+c+" failed.\n("+b+": "+s+")",d.name="ChunkLoadError",d.type=b,d.request=s,f[1](d)}},"chunk-"+c,c)}else e[c]=0},r.O.j=c=>0===e[c];var n=(c,i)=>{var d,u,[f,t,l]=i,o=0;if(f.some(s=>0!==e[s])){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(l)var b=l(r)}for(c&&c(i);o{"use strict";var e,v={},g={};function r(e){var n=g[e];if(void 0!==n)return n.exports;var a=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.m=v,e=[],r.O=(n,a,c,i)=>{if(!a){var t=1/0;for(f=0;f=i)&&Object.keys(r.O).every(p=>r.O[p](a[d]))?a.splice(d--,1):(l=!1,i0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[a,c,i]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var a in n)r.o(n,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,a)=>(r.f[a](e,n),n),[])),r.u=e=>e+"."+{206:"9e348e2e000c6d9e",218:"2bca28c01b9b375e",258:"af17269ef75cc52e",307:"441271afb8e1ca40",364:"54b0716593d7a906",408:"3d872a77a722dae4",416:"703750621db94112",450:"8d64c1caeaab7f13",514:"ce4ee6ed06b70a1c",541:"46351ef9bd7cb3af",551:"3b95db84ed212394",588:"03aaa7103dd6314e",735:"7aac8a5f319a562f",740:"470288d9c9e8a26a",770:"39fda8b208991504",790:"84244f740f14be1a",837:"5790cd60449c39c3",861:"d49e02341f420dfa",865:"390f59ee2c366d2a",888:"e4547c5c0d4811fa"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="angor:";r.l=(a,c,i,f)=>{if(e[a])e[a].push(c);else{var t,l;if(void 0!==i)for(var d=document.getElementsByTagName("script"),u=0;u{t.onerror=t.onload=null,clearTimeout(b);var h=e[a];if(delete e[a],t.parentNode&&t.parentNode.removeChild(t),h&&h.forEach(_=>_(p)),m)return m(p)},b=setTimeout(s.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=s.bind(null,t.onerror),t.onload=s.bind(null,t.onload),l&&document.head.appendChild(t)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={121:0};r.f.j=(c,i)=>{var f=r.o(e,c)?e[c]:void 0;if(0!==f)if(f)i.push(f[2]);else if(121!=c){var t=new Promise((o,s)=>f=e[c]=[o,s]);i.push(f[2]=t);var l=r.p+r.u(c),d=new Error;r.l(l,o=>{if(r.o(e,c)&&(0!==(f=e[c])&&(e[c]=void 0),f)){var s=o&&("load"===o.type?"missing":o.type),b=o&&o.target&&o.target.src;d.message="Loading chunk "+c+" failed.\n("+s+": "+b+")",d.name="ChunkLoadError",d.type=s,d.request=b,f[1](d)}},"chunk-"+c,c)}else e[c]=0},r.O.j=c=>0===e[c];var n=(c,i)=>{var d,u,[f,t,l]=i,o=0;if(f.some(b=>0!==e[b])){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(l)var s=l(r)}for(c&&c(i);o