1import{$c as R,Aa as s,Ba as g,C as p,Ca as y,Cb as q,D as f,Da as S,Db as O,Ee as ee,Fa as _,Fd as W,Ga as h,Ha as d,I as w,J as N,Na as H,Ne as te,Oa as $,Od as D,Pa as G,Pe as ie,Qd as X,Rd as T,Sd as C,Ta as v,Td as Y,Ua as I,Ud as B,Va as K,Vl as re,Wb as z,X as r,Xl as ae,aa as E,bc as k,ea as x,ec as Q,ee as J,gc as L,ja as u,lg as ne,m as M,ma as F,mc as A,na as o,ne as Z,v as U,va as b,z as l,za as a}from"./chunk-IUUIX7WT.js";import{a as V,b as j}from"./chunk-EQDQRRRY.js";function ce(t,c){if(t&1&&(a(0,"h6",10),v(1),s()),t&2){let e=d(2);r(),K(" ",e.data.name," ")}}function le(t,c){if(t&1&&(a(0,"p",11),v(1," Fundraising for "),a(2,"strong"),v(3),s()()),t&2){let e,i=d(2);r(3),I((e=i.givingExperienceName)!==null&&e!==void 0?e:"loading...")}}function me(t,c){if(t&1){let e=_();y(0),a(1,"div",1),h("click",function(n){p(e);let m=d();return f(m.teamId?m.joinTeam(n):m.linkToFundraiser(n))}),a(2,"div",2),g(3,"nova-image",3),s(),a(4,"div",4)(5,"div",5)(6,"div",6),u(7,ce,2,1,"h6",7)(8,le,4,1,"p",8),s(),a(9,"nova-button",9),h("callbackEmitter",function(){p(e);let n=d();return f(n.teamId?n.joinTeam():n.linkToFundraiser())}),s()()()(),S()}if(t&2){let e=d();r(),F("data-theme-item",e.getItemTheme()),r(2),o("ignoreRatio",!0)("ignoreMargin",!0)("loadModuleImage",!0)("moduleImageType",e.eResourceType.FUNDRAISER)("showPlaceholder",!0)("module",e.data)("data",e.image),r(4),o("ngIf",e.data.name),r(),o("ngIf",!e.teamId),r(),o("data",e.button)}}var oe=(()=>{class t{constructor(){this.joinTeamEvent=new N,this.eResourceType=J,this.fundraiserMembersService=l(B),this.campaignService=l(ne),this.loadingService=l(T),this.destroyRef=l(w),this.image=new ie,this.image.visible=!0,this.button=ae()}ngOnInit(){if(!this.data)throw new Error("Data is required for the fundraiser link card component");this.image.imageUrl=this.data?.imageUrl,this.teamId||this.campaignService.getCampaginById(this.data.campaignId).pipe(A(this.destroyRef)).subscribe({next:e=>{this.givingExperienceName=e?.name}})}joinTeam(e){if(e?.preventDefault(),e?.stopPropagation(),!this.teamId)throw new Error("Team ID is required to join a team");this.loadingService.loadingItemOn(),this.fundraiserMembersService.joinTeam(this.teamId,this.data.id).subscribe({next:i=>{this.joinTeamEvent.emit(i),this.loadingService.loadingItemOff()},error:i=>{console.error(i),this.loadingService.loadingItemOff()}})}linkToFundraiser(e){e?.preventDefault(),e?.stopPropagation(),window.location.href=this.data?.url?.fullUrl}getItemTheme(){switch(W("var(--nv-modal-theme)")??C.WHITE){case C.DARK:case C.WHITE:return C.LIGHT;case C.LIGHT:return C.WHITE}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=x({type:t,selectors:[["nova-fundraiser-link-card"]],inputs:{data:"data",teamId:"teamId"},outputs:{joinTeamEvent:"joinTeamEvent"},standalone:!1,decls:1,vars:1,consts:[[4,"ngIf"],[1,"content-wrapper","w-100","z-index-3","panel-radius","min-h-70px","cursor-pointer","card-grid",3,"click"],[1,"d-flex","w-100","mw-70px","position-relative"],["placeholderImgClasses","rounded-start-panel","placeholderContClasses","position-absolute","customImgClasses","rounded-start-panel",3,"ignoreRatio","ignoreMargin","loadModuleImage","moduleImageType","showPlaceholder","module","data"],[1,"gap-3"],[1,"gap-2","text-button-grid"],[1,"d-grid"],["class","text-left no-text-overflow",4,"ngIf"],["class","mb-0 text-left no-text-overflow p-small",4,"ngIf"],[1,"mr-4",3,"callbackEmitter","data"],[1,"text-left","no-text-overflow"],[1,"mb-0","text-left","no-text-overflow","p-small"]],template:function(i,n){i&1&&u(0,me,10,11,"ng-container",0),i&2&&o("ngIf",n.data)},dependencies:[O,te,re],styles:["[_nghost-%COMP%] .card-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:70px 1fr;grid-gap:10px;align-items:center}[_nghost-%COMP%] .card-grid[_ngcontent-%COMP%] .text-button-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 0fr;align-items:center}[_nghost-%COMP%] .card-grid[_ngcontent-%COMP%] .text-button-grid[_ngcontent-%COMP%] .no-text-overflow[_ngcontent-%COMP%]{text-overflow:ellipsis;overflow:hidden;text-wrap:nowrap}"]})}}return t})();function pe(t,c){t&1&&(a(0,"h4",7),v(1," Sorry, you do not have any fundraising pages. "),s())}function fe(t,c){t&1&&(a(0,"h4",8),v(1,"My fundraising pages"),s())}function ve(t,c){if(t&1&&(y(0),g(1,"nova-fundraiser-link-card",16),S()),t&2){let e=c.$implicit;r(),o("data",e)}}function ge(t,c){if(t&1&&(a(0,"div",12)(1,"h6"),v(2),s(),a(3,"div",13)(4,"div",14),u(5,ve,2,1,"ng-container",15),s()()()),t&2){let e=d(2);r(2),I(e.individualTerm),r(3),o("ngForOf",e.individualFundraisers
1)}}function he(t,c){if(t&1&&(y(0),g(1,"nova-fundraiser-link-card",16),S()),t&2){let e=c.$implicit;r(),o("data",e)}}function _e(t,c){if(t&1&&(a(0,"div",12)(1,"h6"),v(2),s(),a(3,"div",13)(4,"div",14),u(5,he,2,1,"ng-container",15),s()()()),t&2){let e=d(2);r(2),I(e.teamTerm),r(3),o("ngForOf",e.teamFundraisers)}}function Ce(t,c){if(t&1){let e=_();a(0,"button",17),h("click",function(){p(e);let n=d(2);return f(n.activeModal.close())}),v(1," Okay "),s()}}function xe(t,c){if(t&1){let e=_();a(0,"div",1)(1,"div",2)(2,"button",3),h("click",function(){p(e);let n=d();return f(n.activeModal.dismiss(!1))}),s()(),a(3,"div",4)(4,"div",5)(5,"div",6),u(6,pe,2,0,"h4",7)(7,fe,2,0,"h4",8)(8,ge,6,2,"div",9)(9,_e,6,2,"div",9),s()()(),a(10,"div",10),u(11,Ce,2,0,"button",11),s()()}if(t&2){let e=d();r(6),b(e.hasFundraisers?6:7),r(2),o("ngIf",e.individualFundraisers&&e.individualFundraisers.length>0),r(),o("ngIf",e.teamFundraisers&&e.teamFundraisers.length>0),r(2),o("ngIf",e.hasFundraisers)}}var ze=(()=>{class t{constructor(e,i,n){this.activeModal=e,this.fundraiserService=i,this.loadingService=n,this.loadingService.loadingOn(),this.isBusy=!0,this.hasFundraisers=!1,this.individualFundraisers=[],this.teamFundraisers=[],this.individualTerm="Individual",this.teamTerm="Team"}ngOnInit(){this.fundraiserService.getAllFundraiserTeamsAsOwner({offset:0,count:20}).subscribe(e=>{this.individualFundraisers=e.items.filter(i=>!i.isTeam),this.teamFundraisers=e.items.filter(i=>i.isTeam),this.individualFundraisers.length>0?(this.individualTerm=this.individualFundraisers.at(0)?.individualTerm??"Individual",this.teamTerm=this.individualFundraisers.at(0)?.teamTerm??"Team"):this.teamFundraisers.length>0&&(this.individualTerm=this.teamFundraisers.at(0)?.individualTerm??"Individual",this.teamTerm=this.teamFundraisers.at(0)?.teamTerm??"Team"),this.hasFundraisers=this.individualFundraisers&&this.individualFundraisers.length<=0&&this.teamFundraisers&&this.teamFundraisers.length<=0,this.loadingService.loadingOff(),this.isBusy=!1})}static{this.\u0275fac=function(i){return new(i||t)(E(R),E(X),E(T))}}static{this.\u0275cmp=x({type:t,selectors:[["nova-list-fundraisers-modal"]],inputs:{data:"data"},standalone:!1,decls:1,vars:1,consts:[["class","nv-modal-md","novaTheme","var(--nv-modal-theme)",4,"ngIf"],["novaTheme","var(--nv-modal-theme)",1,"nv-modal-md"],[1,"modal-header","border-bottom-0"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body","d-flex","justify-content-center"],[1,"w-100","d-flex","flex-column","justify-content-center","align-items-center"],[1,"w-100","vstack","gap-3"],[1,"text-center"],[1,"mb-4","text-left"],["class","vstack gap-3",4,"ngIf"],[1,"modal-footer","border-0","d-block","pb-5","px-5","pt-3"],["type","button","class","btn flex-grow-1 btn-primary w-100",3,"click",4,"ngIf"],[1,"vstack","gap-3"],[1,"scrollable","scroll-bar"],[1,"mr-2"],[4,"ngFor","ngForOf"],[3,"data"],["type","button",1,"btn","flex-grow-1","btn-primary","w-100",3,"click"]],template:function(i,n){i&1&&u(0,xe,12,4,"div",0),i&2&&o("ngIf",!n.isBusy)},dependencies:[Y,q,O,oe],styles:["[_nghost-%COMP%] .scrollable[_ngcontent-%COMP%]{max-height:230px;overflow:auto}[_nghost-%COMP%] .scrollable[_ngcontent-%COMP%] nova-fundraiser-link-card[_ngcontent-%COMP%]{display:block;margin:5px 0}"]})}}return t})();var se=(()=>{class t{constructor(){this.httpClient=l(z),this.authService=l(Q)}getUserAccountForm(){return this.httpClient.get(`${D}/${L.FORMS}/user/1`,k("GET",this.authService)).pipe(M(1))}createUser(e){return this.httpClient.post(`${D}/${L.USERS}`,JSON.stringify(e),j(V({},k("POST",this.authService)),{observe:"response"})).pipe(M(1))}getAccountCreateLibraryItem(){let e=`${D}/${L.CMSLIBRARYSECTIONS}`,i=`filters.type=${Z.ACCOUNTCREATE}&filters.isSystemElement=true&count=1&offset=0`;return this.httpClient.get(`${e}?${i}`,k("GET",this.authService)).pipe(M(1))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Te=["container"];function be(t,c){if(t&1&&(a(0,"div",8)(1,"div",11),g(2,"nova-alert",12),s()()),t&2){let e=d(2);r(2),o("showAlert",!!e.errorMessage)("alertMsg",e.errorMessage)("dismissible",!0)}}function ye(t,c){if(t&1){let e=_();a(0,"div",1),g(1,"nova-loading-item",2),a(2,"div",3),g(3,"nova-background",4),a(4,"div",5)(5,"button",6),h("click",function(){p(e);let n=d();return f(n.activeModal.dismiss())}),s()(),a(6,"div",7,0),u(8,be,3,3,"div",8),a(9,"div",9)(10,"nova-account-create-wrapper",10),h("accountCreated",function(n){p(e);let m=d();return f(m.accountCreated(n))})("accountLoginSuccess",function(n){p(e);let m=d();return f(m.accountLoginSuccess(n))}),s()()()()()}if(t&2){let e=c,i=d();o("border",e.border),F("data-theme",e.theme),r(),o("theme",e.theme),r(2),o("data",e.background)("section",e),r(),o("hidden",i.disableClose),r(4),b(i.errorMessage?8:-1),r(2),o("data",e)("page",i.page)("subModule",i.subModule)("module",i.module)("parentData",i.parentData)}}var ft=(()=>{class t{constructor(){this.disableClose=!0,this.activeModal=l(R),this.adminService=l(ee),this.loadingService=l(T),this.accountCreateService=l(se),this.destroyRef=l(w),this.getActionPanelData()}accountCreated(e){e&&(this.activeModal.close(e),this.loadingService.loadingItemOff())}accountLoginSuccess(e){e&&(e.loggedIn=!0,this.loadingService.loadingItemOff(),this.activeModal.close(e))}getActionPanelData(){this.accountCreateService.getAccountCreateLibraryItem().pipe(A(this.destroyRef)).subscribe({next:e=>{if(!e)return;(!e||!e.items||!e.items.length)&&(this.errorMessage="There was an error, please contact site admin.");let i=e.items.at(0);
1i?(this.data=i.section,this.data.libraryId=Number(i.id)):this.errorMessage="There was an error, please contact site admin."},error:e=>{console.error("error when retrieving create element from library sections API",e)}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=x({type:t,selectors:[["nova-account-create-modal"]],viewQuery:function(i,n){if(i&1&&H(Te,5),i&2){let m;$(m=G())&&(n.accountCreateContainer=m.first)}},inputs:{parentData:"parentData",page:"page",module:"module",subModule:"subModule",customClasses:"customClasses",disableClose:"disableClose"},standalone:!1,decls:1,vars:1,consts:[["container",""],[1,"position-relative","overflow-auto","scroll-bar","panel-radius",3,"border"],[3,"theme"],[1,"position-relative"],[3,"data","section"],[1,"modal-header","border-0","pb-0","px-3","z-index-3","d-flex","align-items-center","justify-content-end",3,"hidden"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"content-wrapper","d-flex","w-100","gap-3","flex-column","z-index-3","pt-20px","pb-40px"],[1,"row"],[1,"modal-body","d-flex","justify-content-center"],["customClasses","action-panel-content",1,"flex-column","d-flex","w-100","z-index-3","position-relative",3,"accountCreated","accountLoginSuccess","data","page","subModule","module","parentData"],[1,"col-12"],["alertId","card-errors","textClass","text-white","customClasses"," alert-sm","bgClass"," bg-danger",3,"showAlert","alertMsg","dismissible"]],template:function(i,n){if(i&1&&u(0,ye,11,12,"div",1),i&2){let m;b((m=n.data)?0:-1,m)}},encapsulation:2})}}return t})();var Se=(function(t){return t.CHECKOUTREADY="checkoutReady",t.CHECKOUTLOADED="checkoutLoaded",t.CHECKOUTCANCEL="checkoutCancel",t.CHECKOUTEXPIRED="checkoutExpired",t.CHECKOUTERROR="checkoutError",t.CHECKOUTCOMPLETE="checkoutComplete",t})(Se||{}),Ie=(function(t){return t.IFRAMEEVENT="iframeEvent",t.IFRAMEEVENTDATA="iframeEventData",t})(Ie||{}),Me=(function(t){return t.TRIGGERCHECKOUT="triggerCheckout",t.TRIGGERRESIZE="triggerResize",t.APPLOADED="appLoaded",t})(Me||{});export{oe as a,ze as b,se as c,ft as d,Se as e,Ie as f,Me as g};
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.