1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a335d2a0-6fe5-5d98-a222-6e5e0e9a137f")}catch(e){}}(); 3import{b as $,j as K}from"./chunk-SZK6MIY7.js";import{a as Z}from"./chunk-C3PMDAPN.js";import{a as Q}from"./chunk-6WS62NFZ.js";import{Cc as A,Y as X,Z as ee,jc as J}from"./chunk-3LVKRIDY.js";import{Ab as L,Cc as B,Gb as N,Hc as o,Ia as w,Ib as F,Na as d,Ub as U,Vb as j,Wc as R,Xb as c,Ya as T,Yb as m,Yd as q,_d as z,ga as I,ib as k,ka as h,kb as S,lb as C,nb as P,ne as G,oa as x,ob as M,pa as D,pb as u,qb as l,qg as b,rb as s,sb as f,tf as H,uc as g,vc as p,vg as V,xg as Y,zg as W}from"./chunk-JLCF3INP.js";import{a as v,h as E}from"./chunk-3EAH7Z56.js";function ne(r,t){if(r&1&&f(0,"app-v2-badge",3),r&2){let a=t.$implicit;u("label",a.label)("color",a.color)("icon",a.icon)("textual",a.textual)}}function ie(r,t){if(r&1){let a=L();l(0,"li",18)(1,"img",19),g(2,"translatable"),g(3,"translatable"),N("error",function(n){return x(a),n.target.src="assets/svg/icons/contribution-cash-plus-sign.svg",D(n.target.classList.add("placeholder"))}),s()()}if(r&2){let a=t.$implicit;d(),u("src",p(2,2,a.iconUrl),w)("matTooltip",p(3,4,a.label))}}function re(r,t){if(r&1&&(l(0,"div",15)(1,"div",16),c(2),g(3,"translatable"),s(),l(4,"ul",17),P(5,ie,4,6,"li",18,C),s()()),r&2){let a=F();d(2),m(p(3,1,a.finAddTitle())),d(3),M(a.finAddIcons())}}var ve=(()=>{let t=class t{constructor(){this.id=o(),this.currentAmount=o(),this.badges=o([]),this.imageUrl=o(),this.progress=o(),this.region=o(),this.targetAmount=o(),this.title=o(),this.routerLink=o(),this.queryParams=o(),this.trackingClass=o(),this.finAddTitle=o(),this.finAddIcons=o([]),this.isDisabled=B(()=>!this.routerLink())}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=T({type:t,selectors:[["app-v2-projects-card"]],inputs:{id:[1,"id"],currentAmount:[1,"currentAmount"],badges:[1,"badges"],imageUrl:[1,"imageUrl"],progress:[1,"progress"],region:[1,"region"],targetAmount:[1,"targetAmount"],title:[1,"title"],routerLink:[1,"routerLink"],queryParams:[1,"queryParams"],trackingClass:[1,"trackingClass"],finAddTitle:[1,"finAddTitle"],finAddIcons:[1,"finAddIcons"]},decls:24,vars:17,consts:[[1,"container","gtm-campagne","no-link-styles","lrd-shadow","lrd-shadow--hoverable",3,"routerLink","queryParams","ngClass"],[1,"header"],[1,"badges"],[3,"label","color","icon","textual"],[1,"content"],[1,"title-wrapper"],[1,"title","text-h4","ellipsis"],[1,"region","text-tag","ellipsis"],[1,"thumbnail"],[1,"objective"],[1,"objective__current-amount"],[1,"objective__separator"],[1,"objective__target-amount"],[1,"progress"],[1,"progress-bar",3,"progress"],[1,"fin-add"],[1,"fin-add__title"],[1,"fin-add__icons"],[1,"fin-add__icons-item"],["matTooltipPosition","above","alt","icon.label | translatable",3,"error","src","matTooltip"]],template:function(n,i){if(n&1&&(l(0,"a",0)(1,"div",1)(2,"div",2),P(3,ne,1,4,"app-v2-badge",3,C),s()(),l(5,"div",4)(6,"div",5)(7,"div",6),c(8),g(9,"translatable"),s(),l(10,"div",7),c(11),g(12,"translatable"),s()(),f(13,"div",8),l(14,"div",9)(15,"div",10),c(16),s(),l(17,"div",11),c(18,"/"),s(),l(19,"div",12),c(20),s()(),l(21,"div",13),f(22,"app-v2-progress-bar",14),s(),k(23,re,7,3,"div",15),s()()),n&2){let O;U("disabled",i.isDisabled()),u("routerLink",i.routerLink())("queryParams",i.queryParams())("ngClass",i.trackingClass()),d(3),M(i.badges()),d(5),m(p(9,13,i.title())),d(3),m(p(12,15,i.region())),d(2),j("background-image: url("+i.imageUrl()+")"),d(3),m(i.currentAmount()),d(4),m(i.targetAmount()),d(2),u("progress",i.progress()),d(),S((O=i.finAddIcons())!=null&&O.length?23:-1)}},dependencies:[z,q,K,Z,R,J,V],styles:[`[_nghost-%COMP%], [_nghost-%COMP%] .container[_ngcontent-%COMP%], [_nghost-%COMP%] .title-wrapper[_ngcontent-%COMP%], [_nghost-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%], [_nghost-%COMP%] .content[_ngcontent-%COMP%]{flex-grow:1;gap:1rem}.container[_ngcontent-%COMP%]{justify-content:space-between;flex-grow:1;gap:.625rem;width:100%;padding:1.5rem;border:1px solid #000;border-radius:.75rem;background-color:var(--color-primary-white)}.container[_ngcontent-%COMP%]:hover:not(.disabled){background-color:var(--color-primary-beige)}.container[_ngcontent-%COMP%]:hover:not(.disabled) .progress-bar[_ng
3content-%COMP%]{--track-color: var(--color-primary-white)}.container[_ngcontent-%COMP%]:hover:not(.disabled) .fin-add__icons-item[_ngcontent-%COMP%]{overflow:hidden;background:var(--color-primary-white)}.container.disabled[_ngcontent-%COMP%]{cursor:default}.content[_ngcontent-%COMP%]{flex-grow:1}.badges[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}.title-wrapper[_ngcontent-%COMP%]{gap:.625rem}.title[_ngcontent-%COMP%]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;min-height:2lh;white-space:wrap}.region[_ngcontent-%COMP%]{padding:.1rem 0 0;text-transform:uppercase}.thumbnail[_ngcontent-%COMP%]{height:9.625rem;background-size:cover;background-position:center;border-radius:.75rem}.objective[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:baseline;gap:.25rem;font-family:var(--font-primary);font-size:.875rem;overflow:hidden}.objective__current-amount[_ngcontent-%COMP%]{font-family:var(--font-primary-semi-bold);font-size:1.875rem}.fin-add[_ngcontent-%COMP%]{justify-content:space-between;gap:.5rem}.fin-add[_ngcontent-%COMP%], .fin-add__icons[_ngcontent-%COMP%]{display:flex;align-items:center}.fin-add__title[_ngcontent-%COMP%]{font-size:.75rem}.fin-add__icons[_ngcontent-%COMP%]{gap:4px}.fin-add__icons-item[_ngcontent-%COMP%]{display:flex;flex:0 0 auto;align-items:center;justify-content:center;border-radius:100%;background:var(--color-primary-beige);cursor:default;width:28px;height:28px}.fin-add__icons-item[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:22px;height:22px;object-fit:contain}.fin-add__icons-item[_ngcontent-%COMP%] img.placeholder[_ngcontent-%COMP%]{width:16px;height:16px} 4/*# sourceMappingURL=card.component-Q3ETSPAZ.css.map */`],changeDetection:0});let r=t;return r})();var y=E(ee()),_=E(X());var oe="/assets/images/v2/project-placeholder.jpg",ae=G.production?new Date("2024/06/01 00:00:00"):new Date(0),de=[y.ProjectFinAddConditionEnum.CONDITIONAL,y.ProjectFinAddConditionEnum.CONDITIONAL_PERCENTAGE],we=(()=>{let t=class t{constructor(){this.currencyFormatter=h(Q),this.routingService=h(W)}createFromProjectThumbnail(e,n={}){return v({id:e.projectId,currentAmount:this.currencyFormatter.format(e.currentAmount||0),imageUrl:this.thumbnailUrl(e.image),progress:e.progress,region:e.ruche.name,targetAmount:this.currencyFormatter.format(e.targetAmount||0),title:e.title,badges:[this.badge(e.status,e.endAt)].filter(i=>i!==null),finAddTitle:H("components.projects-card.fin-add"),finAddIcons:this.finAddIcons(e),routerLink:this.routingService.routeFor(Y.PROJECT,{slug:e.slug})},n)}createFromPublicProject(e,n={}){return v({id:e.projectId,currentAmount:this.currencyFormatter.format(e.data.campaign.currentAmount||0),progress:e.data.campaign.progress,region:e.ruche.name,targetAmount:this.currencyFormatter.format(e.data.campaign.targetAmount||0),title:e.attributes.name,badges:[this.badge(e.status,e.data.campaign.endAt)].filter(i=>i!==null)},n)}thumbnailUrl(e){return e?e.replace("dev.ruche.elucidia.ca","dev.laruchequebec.com"):oe}badge(e,n){switch(e){case _.ProjectStatusEnum.COMPLETED_SUCCESS:return{label:{key:"components.projects-card.badges.success"},icon:A.SUCCESS_WHITE_ALT,color:b.GREEN};case _.ProjectStatusEnum.COMPLETED_FAILED:return{label:{key:"components.projects-card.badges.failure"},icon:A.FLAG,color:b.YELLOW_PALEST};case _.ProjectStatusEnum.PUBLISHED:return{label:$(n),color:b.BEIGE,textual:!0};default:return null}}finAddIcons(e){return e.createdAt<ae.getTime()?[]:e.programs.filter(n=>de.includes(n.conditional)).map(({logo:n,name:i})=>({iconUrl:n,label:i}))}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=I({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();export{we as a,ve as b}; 5//# sourceMappingURL=chunk-ID2VWFRY.js.map 6 7//# debugId=a335d2a0-6fe5-5d98-a222-6e5e0e9a137f
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.