1import{a as ct,b as $n}from"./chunk-7V7RXI7D.js";import{a as je}from"./chunk-F56RS3OJ.js";import{a as hi}from"./chunk-PHZJLURG.js";import{a as Fn,b as Ln,c as ft,d as St,e as Un}from"./chunk-MSSEBO72.js";import{c as be,d as Bn,e as ue,f as Jt,g as Mn,k as Vn}from"./chunk-FP3J5B6H.js";import{a as On}from"./chunk-BQRBWX66.js";import"./chunk-L5ZOOU2J.js";import"./chunk-KOPGZV6B.js";import"./chunk-BTQPKA7U.js";import"./chunk-AF6G7XUW.js";import{a as Ve}from"./chunk-WR7JO7XW.js";import{a as Xt}from"./chunk-HEXCNDVV.js";import"./chunk-4NM77DS2.js";import{b as En,r as Rn}from"./chunk-ADMKBOBN.js";import"./chunk-LCPPMNQ3.js";import{a as ui}from"./chunk-BT6MT7GL.js";import"./chunk-RF4ESXXV.js";import"./chunk-IN6JNWJL.js";import"./chunk-GT2RX7V4.js";import{a as Mt}from"./chunk-WZTRTKC4.js";import{a as Ft,b as Ki,c as We,d as it,e as Bt,f as Ge,g as ne,i as ge,j as nt,k as _e}from"./chunk-NTPMZIRS.js";import{a as An}from"./chunk-SP6WZPWS.js";import{b as kn}from"./chunk-64WGMCQL.js";import"./chunk-DBNHDKST.js";import{a as ve}from"./chunk-4CVZBQNN.js";import"./chunk-N5PZSBUY.js";import"./chunk-4T73AMAL.js";import"./chunk-G2OHGTWE.js";import"./chunk-NAW6KKAQ.js";import"./chunk-GNX3F6NH.js";import{d as K}from"./chunk-QQKJHWTF.js";import{Hb as qt,Rb as Tn,Sb as Qt,_b as Kt}from"./chunk-PXZNPNHI.js";import"./chunk-KWNDGQWR.js";import"./chunk-2ZFY6MCW.js";import"./chunk-KQ7PEKEE.js";import"./chunk-KVMIYEBS.js";import"./chunk-DLHY2JKF.js";import"./chunk-WLMRFXCZ.js";import"./chunk-WN3UI2QV.js";import"./chunk-YVLOHBDK.js";import"./chunk-Z3AXU4EF.js";import"./chunk-TP3A6IN2.js";import"./chunk-XNFXA3ZT.js";import"./chunk-QLTRNXEK.js";import"./chunk-TEFEWVO6.js";import"./chunk-ZB64W4XA.js";import"./chunk-SVABVB5X.js";import"./chunk-CMY6WAF3.js";import"./chunk-FUY7HSJY.js";import"./chunk-JTYXZXFU.js";import"./chunk-7MK6I7GJ.js";import"./chunk-3HFTO6XY.js";import"./chunk-XNSH6ILV.js";import"./chunk-IZKA562T.js";import"./chunk-BROSYERN.js";import"./chunk-Y2KCFOCP.js";import"./chunk-Z52L74DH.js";import"./chunk-CYDDDATF.js";import"./chunk-GWQPV7EH.js";import"./chunk-RQ74XYI3.js";import"./chunk-3IFGWXMA.js";import"./chunk-EME7BUOO.js";import{a as Pn,j as Dn,q as wn}from"./chunk-QH3IRCHN.js";import"./chunk-PLEH3NAH.js";import"./chunk-GXCJ5QS4.js";import{b as ye}from"./chunk-4D5SN44G.js";import"./chunk-22ACI5KU.js";import"./chunk-FXUQQQIE.js";import"./chunk-VVVN3YIZ.js";import{b as st}from"./chunk-FSUBAQYH.js";import"./chunk-7CVCGK4Q.js";import{b as In}from"./chunk-FWW3IJT2.js";import"./chunk-B6LCWWQX.js";import"./chunk-HYGNXZJR.js";import"./chunk-B6XXRKU5.js";import"./chunk-6Q5DDO7R.js";import"./chunk-RW2MVE4O.js";import"./chunk-3ZVRFUA4.js";import"./chunk-H4PCL6BZ.js";import"./chunk-NXTJBJRP.js";import"./chunk-U22BTVEZ.js";import{$f as Yt,Ac as nn,Be as mn,Ce as dn,Cg as fn,Ec as rn,Ef as we,Fb as Ji,Gb as ot,Hd as sn,Ia as Lt,Ib as at,Jb as Zi,Kb as lt,Mb as Oe,Sc as on,Td as cn,Ug as Sn,Wc as an,Xc as Ut,Zc as $t,Zf as Gt,_f as jt,af as pn,ag as zt,b as Vi,bf as Nt,bg as Ht,cc as en,cg as Cn,d as Me,dg as xn,ff as gn,fh as vn,gf as _n,jb as Ot,jc as Vt,jh as yn,k as Le,kb as Xi,kd as ln,kh as bn,lc as tn,sf as un,tf as hn,ua as At,xa as xt,xb as rt,zf as Wt}from"./chunk-X5J6QTCG.js";import{$ as It,$a as _,Aa as ht,Ad as pi,C as se,Db as te,E as Re,Fa as s,Fb as $,Gb as Ke,Hg as Yi,Ib as e,Ic as Li,Ie as or,Jb as w,Ka as R,Kb as D,Lb as le,Lc as Ze,Ma as Te,Na as Tt,Ne as F,Q as ki,Qb as N,Qe as Ct,Rb as W,Sa as M,Sb as G,Sc as Fe,Sh as Hi,Tb as ci,Tc as Oi,U as A,Ub as mi,Vb as di,W as Ne,Wc as Be,Wg as zi,Xa as fe,Yb as Bi,_ as qe,_c as Rt,ai as qi,ba as oe,bb as u,be as Wi,ca as Ai,cb as Fi,cc as Xe,d as xe,db as de,dc as ke,di as tt,e as Ee,eb as L,ec as Je,fa as S,fb as O,fc as Mi,fj as Qi,ga as v,gb as x,hb as a,hf as Gi,ib as l,ij as ar,j as Ei,jb as T,jf as ji,k as U,l as ze,lc as B,lh as ee,mc as ce,mh as kt,nb as X,nc as q,o as He,ob as J,pb as ie,pj as De,q as re,qb as P,qc as ae,sb as b,se as gi,tb as d,td as Ui,u as Ie,vd as et,wd as $i,xb as Dt,xd as Se,xg as _i,ya as Qe,yb as wt,yd as Ni,z as Ri,zb as Et}from"./chunk-SMW7PHYX.js";import{a as j,b as z,h as wi,j as $e}from"./chunk-BMIYOSOG.js";var sr=()=>[1,2,3,4];function cr(r,c){if(r&1&&(e(0,` 2 `),a(1,"app-global-banner-content",2),e(2,` 3 `),a(3,"h1"),e(4,"Find a program"),l(),e(5,` 4 `),l(),e(6,` 5`)),r&2){let i=d();s(),x("primaryBannerImage",i.primaryBannerImage||void 0)("bannerTextAlign","left")("displayFullWidth",!0)("hidePrimaryBannerImage",!i.primaryBannerImage)("hideSecondaryBannerImage",!0)}}function mr(r,c){if(r&1){let i=P();e(0,` 6 `),a(1,"div",6),e(2,` 7 `),a(3,"app-blog-card",7),b("blogCardClick",function(){let n=S(i).$implicit,o=d(4);return v(o.navigateToPrograms(n))}),l(),e(4,`
8 `),l(),e(5,` 9 `)}if(r&2){let i=c.$implicit;s(3),x("blogImage",i.image?"url("+i.image+")":"var(--logo-url)")("showClubLogo",!i.image)("blogTitle",i.title)("blogExcerpt",i.count+" Program"+(i.count!==1?"s":""))("blogSavedOn",void 0)("fourByThreeRatio",!0)("backgroundSize","cover")}}function dr(r,c){if(r&1&&(e(0,` 10 `),a(1,"div",5),e(2,` 11 `),L(3,mr,6,7,null,null,de),l(),e(5,` 12 `)),r&2){let i=c.$implicit;s(3),O(i)}}function pr(r,c){if(r&1&&(e(0,` 13 `),e(1,` 14 `),L(2,dr,6,0,null,null,de)),r&2){let i=d(2);s(2),O(i.rows)}}function gr(r,c){r&1&&(e(0,` 15 `),a(1,"app-inline-alert",8),e(2,` 16 No programs are currently available. 17 `),l(),e(3,` 18 `)),r&2&&(s(),x("isInline",!0))}function _r(r,c){if(r&1&&(e(0,` 19 `),a(1,"app-inline-alert",9),e(2),l(),e(3,` 20 `)),r&2){let i=d(2);s(),x("isInline",!0)("alertType","error"),s(),D(` 21 `,i.error,` 22 `)}}function ur(r,c){if(r&1&&(e(0,` 23 `),a(1,"div",3),e(2,` 24 `),a(3,"h2",4),e(4,"All Programs"),l(),e(5,` 25 `),l(),e(6,` 26 `),_(7,pr,4,0),_(8,gr,4,1),_(9,_r,4,3)),r&2){let i=d();s(7),u(!i.error&&i.groupedCards.length>0?7:-1),s(),u(!i.error&&i.groupedCards.length===0?8:-1),s(),u(i.error?9:-1)}}function hr(r,c){r&1&&(e(0,` 27 `),a(1,"div",6),e(2,` 28 `),T(3,"app-skeleton-template"),e(4,` 29 `),l(),e(5,` 30 `))}function Cr(r,c){r&1&&(e(0,` 31 `),a(1,"div",10),e(2,` 32 `),a(3,"div",5),e(4,` 33 `),L(5,hr,6,0,null,null,de),l(),e(7,` 34 `),l(),e(8,` 35 `)),r&2&&(s(5),O(Xe(0,sr)))}var Gn=(()=>{let c=class c{constructor(t,n,o,m,p){this.router=t,this.pageBuilderContentService=n,this.siteDataService=o,this.allProgramsShellService=m,this.authorizeService=p,this.programs=[],this.groupedCards=[],this.loading=!0,this.error="",this.defaultImage="",this.primaryBannerImage="",this.paidV2Enabled=!1,this.isAuthenticated=!1,this.rows=[],this.unsubscribe$=new xe}ngOnInit(){return $e(this,null,function*(){this.allProgramsShellService.resetShellState(),this.isAuthenticated=yield He(this.authorizeService.isAuthenticated()),this.loadPrograms()})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}loadPrograms(){this.loading=!0,this.siteDataService.showSiteLoader(),Ie({programs:this.pageBuilderContentService.getOpenPrograms(),clubSettings:this.siteDataService.getClubSettings(),paidV2Enabled:this.isAuthenticated?this.siteDataService.isPaidSignupsV2Enabled$():U(!1)}).pipe(A(this.unsubscribe$)).subscribe({next:t=>{this.paidV2Enabled=t.paidV2Enabled,t.clubSettings?.theme?.primaryBannerImage&&(this.primaryBannerImage=t.clubSettings.theme.primaryBannerImage),this.sportID=t.clubSettings?.club?.sport?.sportID,t.programs&&(this.programs=t.programs,this.groupedCards=this.groupPrograms(),this.rows=this.getRows()),this.loading=!1,this.siteDataService.hideSiteLoader()},error:()=>{this.error="Unable to load programs.",this.loading=!1,this.siteDataService.hideSiteLoader(),this.siteDataService.showSiteErrorAlert("Unable to load programs.")}})}groupPrograms(){let t=[],n=new Map;this.programs.forEach(p=>{if(p.categoryName){let g=p.categoryName;n.has(g)||n.set(g,[]),n.get(g).push(p)}else if(this.paidV2Enabled&&p.programTypeID===xt.TRAINING_SESSIONS){let g="Sessions";n.has(g)||n.set(g,[]),n.get(g).push(p)}}),n.forEach((p,g)=>{let C=p.find(y=>y.file)?.file||this.pageBuilderContentService.getProgramTypeImage(p[0]?.programTypeID,this.sportID),h=p[0]?.categoryID,f=h?void 0:p[0]?.programTypeID;t.push({title:g,count:p.length,image:C,programs:p,categoryID:h,programTypeID:f})});let o=this.programs.filter(p=>!p.categoryName&&p.programTypeID!==xt.TRAINING_SESSIONS),m=new Map;return o.forEach(p=>{let g=p.programTypeName||"Unknown";m.has(g)||m.set(g,[]),m.get(g).push(p)}),m.forEach((p,g)=>{let C=p.find(f=>f.file)?.file||this.pageBuilderContentService.getProgramTypeImage(p[0]?.programTypeID,this.sportID),h=p[0]?.programTypeID;t.push({title:g,count:p.length,image:C,programs:p,programTypeID:h})}),t}getRows(){let t=[];for(let n=0;n<this.groupedCards.length;n+=4)t.push(this.groupedCards.slice(n,n+4));return t}navigateToPrograms(t){let n=t.categoryID?["/all-programs/category",t.categoryID]:["/all-programs/type",t.programTypeID];this.router.navigate(n,{state:{programs:t.programs,allPrograms:this.programs}})}};c.\u0275fac=function(n){return new(n||c)(R(Se),R(Ve),R(De),R(ue),R(tt))},c.\u0275cmp=Te({type:c,selectors:[["app-all-programs"]],standalone:!1,decls:8,vars:2,consts:[[1,"main"],[1,"container"],[3,"primaryBannerImage","bannerTextAlign","displayFullWidth","hidePrimaryBannerImage","hideSecondaryBannerImage"],[1,"mb-4"],[1,"text-h3","mb-3"],[1,"row"],[1,"col-lg-3","col-md-6","mb-4"],[1,"d-flex","full-height",3,"blogCardClick","blogImage","showClubLogo","blogTitle","blogExcerpt","blogSavedOn","fourByThreeRatio","backgroundSize"],[3,"isInline"],[3,"isInline","alertType"],[1,"skeleton-loader"]],template:function(n,o){n&1&&(_(0,cr,7,5),a(1,"div",0),e(2,` 36 `),a(3,"div",1),e(4,` 37 `),_(5,ur,10,3)(6,Cr,9,1),l(),e(7,` 38`),l()),n&2&&(u(!o.loading&&!o.paidV2Enabled?0:-1),s(5),u(o.loading?6:5))},dependencies:[an,Oe,Gt,xn],encapsulation:2});let r=c;return r})();var xi=wi(ar());var gt=(()=>{let c=class c{constructor(t,n,o){this.cartService=t,this.checkoutChainService=n,this.playerService=o,this.checkoutChainService.registerPendingLinkBuilder((m,p,g)=>this.buildCheckoutChainLinks(m,-1,null,p,g))}markCheckoutCompleted(t){this.cartService.markCheckoutOrchestrationPlanCompleted(t)}getAssignedSlotsForDisplay(){return[...this.checkoutChainService.getCheckoutOrchestrationPlan()?.assignedSlots||[]]}getCoverageBundleRowsForProgram(t){let n=this.cartService.getALaCarteRegistrationIDForProgram(t);return this.cartService.getPurchasedBundlesFullForProgram(t).filter(o=>o?.registrationID!==n)}getCoverageCandidatesForProgram(t){return this.getCoverageBundleRowsForProgram(t).filter(n=>F(n?.registrationID)&&F(n?.entityRegistrationID)).map(n=>{let o=this.getPurchasedBundleSessionCount(n);return{registrationID:n.registrationID,entityRegistrationID:n.entityRegistrationID,bundleName:n.registration?.name||`Bundle ${n.registrationID}
38`,capacity:Number.isFinite(o)?o:null,endDate:n.registration?.sessionOverrideEndDate??n.registration?.endDate}}).filter(n=>n.capacity===null||n.capacity>0)}reassignSlotCoverage(t,n,o){if(!t||!F(n)||!F(o?.entityRegistrationID))return{errorMessage:"That session could not be moved."};let m=(t.assignedSlots||[]).find(f=>f.signUpTimeSlotID===n);if(!m||m.assignmentKind!==ne.EXISTING_BUNDLE)return{errorMessage:"Only sessions covered by a bundle you already own can be moved."};if(m.targetEntityRegistrationID===o.entityRegistrationID)return this.pinCoverageToCartItem(t,n,o),{plan:t};let p=this.getCoverageCandidatesForProgram(t.programID).find(f=>f.entityRegistrationID===o.entityRegistrationID);if(!p)return{errorMessage:"That bundle is no longer available."};let g=this.countCoverageUsageByEntityRegistration(t).get(p.entityRegistrationID)||0;if(p.capacity!==null&&g>=p.capacity)return{errorMessage:`${p.bundleName} has no sessions left to cover this one.`};let C=f=>f.signUpTimeSlotID!==n?f:z(j({},f),{registrationID:p.registrationID,targetEntityRegistrationID:p.entityRegistrationID,bundleName:p.bundleName,timeSlot:f.timeSlot?z(j({},f.timeSlot),{playerRegistrationID:p.registrationID,registrationIDs:[p.registrationID]}):f.timeSlot}),h={registrationID:p.registrationID,entityRegistrationID:p.entityRegistrationID};return this.pinCoverageToCartItem(t,n,h),{plan:z(j({},t),{slotCoverageOverrides:z(j({},t.slotCoverageOverrides||{}),{[n]:h}),assignedSlots:(t.assignedSlots||[]).map(C),pendingReservations:(t.pendingReservations||[]).map(C)})}}pinCoverageToCartItem(t,n,o){F(t?.playerID)&&this.cartService.setCartItemCoverage(n,t.playerID,o)}getCoverageAllocation(t,n){let o=this.calculatePurchasedBundleState(this.getCoverageBundleRowsForProgram(n)),m=(0,xi.cloneDeep)(this.cartService.getCartItemsForPlayer(t,n)),p=m.filter(V=>V.timeSlot),g=[...p],C=new Map;o.regIdToBundleRowsMap.forEach(V=>{V.forEach(H=>C.set(H,this.getPurchasedBundleSessionCount(H)))});let h=new Map;this.assignTimeSlotsToChosenBundleRows(g,C,h),o.regIdToBundleRowsMap.forEach(V=>{this.assignTimeSlotsToPurchasedBundleRows(g,V,h,C)});let f=new Map;h.forEach((V,H)=>{F(H.timeSlot?.signUpTimeSlotID)&&F(V?.entityRegistrationID)&&f.set(H.timeSlot.signUpTimeSlotID,V.entityRegistrationID)});let y=this.cartService.getALaCarteRegistrationIDForProgram(n);m.filter(V=>!V.timeSlot&&F(V.registration?.registrationID)&&V.registration.registrationID!==y).forEach(V=>this.assignTimeSlotsToRegistrations(g,V.registration));let I=new Set(g.map(V=>V.timeSlot?.signUpTimeSlotID)),k=new Set;return p.forEach(V=>{let H=V.timeSlot?.signUpTimeSlotID;F(H)&&!I.has(H)&&k.add(H)}),{purchasedCoverageBySlot:f,coveredSlotIDs:k}}countCoverageUsageByEntityRegistration(t){let n=new Map;return(t?.assignedSlots||[]).filter(o=>o.assignmentKind===ne.EXISTING_BUNDLE&&F(o.targetEntityRegistrationID)).forEach(o=>n.set(o.targetEntityRegistrationID,(n.get(o.targetEntityRegistrationID)||0)+1)),n}finalizePendingReservations(){let t=this.checkoutChainService.getCheckoutOrchestrationPlan();return!t||!t.pendingReservations?.length?U({success:!0,successfulReservations:[],failedReservations:[],reservedTimeSlotIDs:[]}):this.resolveReservationTargets(t).pipe(Re(n=>{ee("Resolved checkout orchestration plan:",n.pendingReservations);let o=n.pendingReservations.filter(g=>g.assignmentKind===ne.EXISTING_BUNDLE),m=o.reduce((g,C)=>{let h=C.signUpTimeSlotID,f=C.timeSlot?.staffID||C.timeSlot?.staffAssignments?.[0]?.clubUserID;return F(h)&&F(f)&&(g[h]=f),g},{}),p=o.filter(g=>g.targetEntityRegistrationID!==void 0).reduce((g,C)=>{let h=g[C.targetEntityRegistrationID]||[];return h.push(C.signUpTimeSlotID),g[C.targetEntityRegistrationID]=h,g},{});return this.playerService.reserveCompletedRegistrationTimeSlots(n.playerID,n.programID,p,m).pipe(re(g=>{let C=Array.from(new Set((g||[]).map(k=>k?.signUpTimeSlotID).filter(F))),h=o.filter(k=>C.includes(k.signUpTimeSlotID)),f=o.filter(k=>!C.includes(k.signUpTimeSlotID)),y=Array.from(new Set([...n.completedReservationTimeSlotIDs||[],...h.map(k=>k.signUpTimeSlotID)]));return this.checkoutChainService.updateCheckoutPendingReservations(f,y),f.length===0&&this.cartService.clearCheckoutOrchestrationPlan(),{success:f.length===0,successfulReservations:h,failedReservations:f,reservedTimeSlotIDs:C}}),se(g=>(kt("Error finalizing pending reservations:",g),U({success:!1,successfulReservations:[],failedReservations:t.pendingReservations,reservedTimeSlotIDs:[]}))))}))}buildCheckoutPlan(t,n,o,m,p){if(!F(t)||!F(o))throw new Error("Invalid player or registration ID when building checkout plan.");let g=F(p)?p:o,C=F(p)?p:0,h=(0,xi.cloneDeep)(this.cartService.getCartItemsForPlayer(t,n)),f=this.getAllPurchasedBundleIDsFromPurchasedBundles(m),y=h.filter(E=>!E.timeSlot&&E.registration.registrationID!==C&&!f.has(E.registration.registrationID)&&F(E.registration.registrationID)).map(E=>E.registration.registrationID),I=Array.from(this.cartService.getBundleRegistrationIDsForPlayer(t,n)).filter(E=>F(E)&&E!==C),k=h.filter(E=>E.timeSlot),V=this.calculatePurchasedBundleState(m),H=[...k];ee("Initial selected time slot items for checkout:",H);let he=new Map;if(V.regIdToBundleRowsMap.size>0){let E=new Map;
38V.regIdToBundleRowsMap.forEach(Z=>{Z.forEach(Ce=>E.set(Ce,this.getPurchasedBundleSessionCount(Ce)))}),this.assignTimeSlotsToChosenBundleRows(H,E,he),V.regIdToBundleRowsMap.forEach(Z=>{this.assignTimeSlotsToPurchasedBundleRows(H,Z,he,E)})}let Y=h.filter(E=>!E.timeSlot&&E.registration.registrationID!==C);ee("Proceeding to assign time slots to bundle items in cart:",Y),Y.forEach(E=>{this.assignTimeSlotsToRegistrations(H,E.registration)}),H.forEach(E=>{let Z=E.timeSlot;E.sourceRegistrationID=g,Z.playerRegistrationID=g,Z.registrationIDs=[g],E.timeSlot=Z});let me=k.map(E=>E.sourceRegistrationID||C).filter(F),Ue=new Set(Y.map(E=>E.registration.registrationID).filter(F)),Pe=Array.from(new Set([...y,...me,...I])).filter(E=>!f.has(E)||Ue.has(E));!Pe.length&&F(C)&&Pe.push(C);let Pt=k.map(E=>{let Z=E.sourceRegistrationID||g,Ce=V.purchasedBundleIDs.has(Z),ut=Y.some(rr=>rr.registration.registrationID===Z),si=ne.A_LA_CARTE;Ce?si=ne.EXISTING_BUNDLE:ut&&(si=ne.NEW_BUNDLE);let nr=Ce?he.get(E):null;return{item:E,sourceRegistrationID:Z,assignmentKind:si,existingBundle:nr}}),Q=Pt.map(({item:E,sourceRegistrationID:Z,assignmentKind:Ce,existingBundle:ut})=>({programName:E.programName,bundleName:ut?ut.registration?.name:"Single Time Slot",signUpTimeSlotID:E.timeSlot.signUpTimeSlotID,registrationID:Z,assignmentKind:Ce,targetEntityRegistrationID:ut?.entityRegistrationID,currentTimeSlotID:E.timeSlot.playerRegistrationID||void 0,timeSlot:z(j({},E.timeSlot),{playerRegistrationID:Z,registrationIDs:[Z],price:Ce===ne.A_LA_CARTE&&E.timeSlot.price||0})})),Zn=Pt.filter(({assignmentKind:E})=>E!==ne.EXISTING_BUNDLE).map(({item:E,sourceRegistrationID:Z})=>{let Ce=E.timeSlot;return Ce.playerRegistrationID=Z,Ce.registrationIDs=[Z],Ce}),er=(m||[]).reduce((E,Z)=>(!Z?.registrationID||!Z?.entityRegistrationID||(E[Z.registrationID]||(E[Z.registrationID]=[]),E[Z.registrationID].push(Z.entityRegistrationID)),E),{}),tr=H.length===0&&I.length>0&&(k.length===0||Q.every(E=>E.assignmentKind===ne.NEW_BUNDLE))?I[0]:o,ir=Q.filter(E=>E.assignmentKind!==ne.A_LA_CARTE),Di={playerID:t,programID:n,primaryCheckoutRegistrationID:tr,selectedRegistrationIDsForCheckout:Pe,checkoutTimeSlots:Zn,assignedSlots:Q,pendingReservations:ir,completedReservationTimeSlotIDs:[],checkoutCompleted:!1,preCheckoutCompletedEntityIDsByRegistration:er};return this.cartService.setCheckoutOrchestrationPlan(Di),Di}buildCheckoutPlanForProgram(t,n){let o=this.cartService.getBaseRegistrationIDForProgram(t)||this.resolveBaseRegistrationIDFromCart(n,t);if(!F(o))return kt("No base registration recorded for program",t,"\u2014 its cart items cannot become a checkout-chain link."),null;let m=this.cartService.getALaCarteRegistrationIDForProgram(t),p=this.cartService.getPurchasedBundlesFullForProgram(t);try{return this.buildCheckoutPlan(n,t,o,p.filter(g=>g.registrationID!==m),m)}catch(g){return kt("Failed to build checkout plan for program",t,"and player",n,JSON.stringify(g)),null}}resolveBaseRegistrationIDFromCart(t,n){let o=this.cartService.getCartItemsForPlayer(t,n),m=o.find(p=>!p.timeSlot&&F(p.registration?.registrationID))?.registration.registrationID;return F(m)?m:o.map(p=>p.sourceRegistrationID??p.timeSlot?.playerRegistrationID).find(F)??0}buildCombinedRegistrationCheckoutPlan(t,n){let o=new Set,m=0;for(let g of n){let C=this.cartService.getCartItemsForPlayer(t,g).filter(h=>!h.timeSlot&&F(h.registration?.registrationID)).map(h=>h.registration.registrationID);C.length&&m<=0&&(m=g),C.forEach(h=>o.add(h))}if(!o.size)return null;let p=Array.from(o);return{playerID:t,programID:m,primaryCheckoutRegistrationID:p[0],selectedRegistrationIDsForCheckout:p,checkoutTimeSlots:[],assignedSlots:[],pendingReservations:[],completedReservationTimeSlotIDs:[],checkoutCompleted:!1,preCheckoutCompletedEntityIDsByRegistration:{}}}buildReservePlanFromCheckoutPlan(t){let n=(t.pendingReservations||[]).filter(o=>o.assignmentKind===ne.EXISTING_BUNDLE);return n.length?z(j({},t),{pendingReservations:n,checkoutTimeSlots:[],selectedRegistrationIDsForCheckout:[]}):null}buildCheckoutChainFromCart(t,n=null){let o=this.cartService.getProgramsWithCartItems();return o.length?this.buildCheckoutChainLinks(t,-1,null,o,n):[]}buildCheckoutChainLinks(t,n,o,m,p=null){let g=[],C=[];for(let h of m){if(!(this.cartService.isTrainingSessionProgram(h)||h===n&&!!o)){C.push(h);continue}let y=h===n?o:this.buildCheckoutPlanForProgram(h,t);
38if(!y)continue;let I=this.buildReservePlanFromCheckoutPlan(y);g.push({programID:h,collection:p??void 0,reservePlan:I??void 0,checkoutPlan:y,currentPhase:I?Bt.RESERVE:Bt.CHECKOUT,status:g.length===0?Ge.IN_PROGRESS:Ge.PENDING})}if(C.length>0){let h=this.buildCombinedRegistrationCheckoutPlan(t,C);h&&g.push({programID:h.programID,collection:p??void 0,checkoutPlan:h,currentPhase:Bt.CHECKOUT,status:g.length===0?Ge.IN_PROGRESS:Ge.PENDING,isCombinedRegistrationLink:!0})}return g}getAllPurchasedBundleIDsFromPurchasedBundles(t){return new Set((t||[]).map(n=>n.registrationID).filter(F))}calculatePurchasedBundleState(t){let n=new Map;(t||[]).forEach(g=>{g?.registrationID&&(n.has(g.registrationID)||n.set(g.registrationID,[]),n.get(g.registrationID).push(g))});let o=new Set,m=new Map,p=0;return n.forEach((g,C)=>{let h=g.reduce((f,y)=>f+this.getPurchasedBundleSessionCount(y),0);ee(`Bundle ${C} total remaining sessions across ${g.length} row(s): ${h}`),h>0&&(o.add(C),m.set(C,g),p+=h)}),{purchasedBundleIDs:o,regIdToBundleRowsMap:m,purchasedBundleSessionsLeft:p}}assignTimeSlotsToPurchasedBundleRows(t,n,o,m){for(let p of n)if(!(!p?.registrationID||!t.length))for(;(m.get(p)??0)>0&&t.length>0;){let g=t.shift();this.coverTimeSlotWithBundleRow(g,p,o,m)}}assignTimeSlotsToChosenBundleRows(t,n,o){for(let m of[...t]){let p=m.chosenCoverage?.entityRegistrationID;if(!F(p))continue;let g=Array.from(n.keys()).find(C=>C.entityRegistrationID===p&&(n.get(C)??0)>0);if(!g){ee("Chosen bundle row",p,"cannot cover time slot",m.timeSlot?.signUpTimeSlotID,"\u2014 falling back to the greedy assignment");continue}t.splice(t.indexOf(m),1),this.coverTimeSlotWithBundleRow(m,g,o,n)}}coverTimeSlotWithBundleRow(t,n,o,m){t.sourceRegistrationID=n.registrationID,t.timeSlot.playerRegistrationID=n.registrationID,t.timeSlot.registrationIDs=[n.registrationID],t.timeSlot.price=0,o.set(t,n);let p=m.get(n)??0;ee("Assigning time slot",t.timeSlot.signUpTimeSlotID,"to registration",n.registrationID,"(entity registration",n.entityRegistrationID,") with remaining sessions",p),m.set(n,p-1)}assignTimeSlotsToRegistrations(t,n){if(!n.registrationID){ee("Cannot assign time slots to registration without registration ID:",n);return}let o=this.getPurchasedBundleSessionCount(n);for(;o>0&&t.length>0;){let m=t.shift();m.sourceRegistrationID=n.registrationID,m.timeSlot.playerRegistrationID=n.registrationID,m.timeSlot.registrationIDs=[n.registrationID],m.timeSlot.price=0,ee("Assigning time slot",m.timeSlot.signUpTimeSlotID,"to registration",n.registrationID,"with remaining sessions",o),o--}}getPurchasedBundleSessionCount(t){return ee("Calculating session count for bundle:",t),t?.registration?.registrationCostTypeID===K.UNLIMITED||t?.registrationCostTypeID===K.UNLIMITED?Number.POSITIVE_INFINITY:Number(t?.remainingSessions??t?.numberOfSessions??0)}resolveReservationTargets(t){return t.pendingReservations.some(o=>!F(o.targetEntityRegistrationID))?this.playerService.getCompletedPlayerRegistrations(t.playerID,!1).pipe(re(o=>{let m=o.reduce((h,f)=>{let y=f?.registrationID;return F(y)&&(h[y]||(h[y]=[]),h[y].push(f.entityRegistrationID)),h},{}),p=new Map,g=t.pendingReservations.map(h=>{if(F(h.targetEntityRegistrationID))return this.trackConsumedEntityRegistration(p,h.registrationID,h.targetEntityRegistrationID),h;let f=h.registrationID,y=m[f]||[],I;if(h.assignmentKind===ne.NEW_BUNDLE){let k=new Set(t.preCheckoutCompletedEntityIDsByRegistration?.[f]||[]),V=p.get(f)||new Set;I=y.find(H=>!k.has(H)&&!V.has(H))}else{let k=p.get(f)||new Set;I=y.find(V=>!k.has(V))}return F(I)?(this.trackConsumedEntityRegistration(p,f,I),z(j({},h),{targetEntityRegistrationID:I})):h}),C=z(j({},t),{pendingReservations:g});return this.cartService.setCheckoutOrchestrationPlan(C),C})):U(t)}trackConsumedEntityRegistration(t,n,o){t.has(n)||t.set(n,new Set),t.get(n).add(o)}};c.\u0275fac=function(n){return new(n||c)(oe(ge),oe(_e),oe(we))},c.\u0275prov=qe({token:c,factory:c.\u0275fac,providedIn:"root"});let r=c;return r})();var pe=(function(r){return r.InvalidSelection="invalid-selection",r.InvalidContext="invalid-context",r.NeedsBundleConfirm="needs-bundle-confirm",r.ReadyForCheckout="ready-for-checkout",r})(pe||{});var ti={height:"auto","max-height":"85dvh"},ii={content:{class:"d-flex flex-column overflow-hidden"}};function jn(r){return Ct((r||[]).map(c=>c?.registration?.registrationID))}var _t=(()=>{let c=class c{get bundleEligibility$(){return this._bundleEligibility$.asObservable()}get currentBundleEligibility(){return this._bundleEligibility$.value}get timeSlotFilters$(){return this._timeSlotFilters$.asObservable()}get canProceedToCheckout$(){return this._canProceedToCheckout$.asObservable()}get isLoadingInitialContext$(){return this._isLoadingInitialContext$.asObservable()}get initializationError$(){return this._initializationError$.asObservable()}constructor(t,n,o,m,p,g,C,h){this.cartService=t,this.checkoutChainService=n,this.registerService=o,this.allProgramsShellService=m,this.checkoutOrchestrationService=p,this.playerService=g,this.programDetailsService=C,this.scheduleSignUpService=h,this._bundleEligibility$=new Ee({sessionsRemaining:0,isEligibleForBundle:!1,isEligibleForALaCarte:!0,sessionRegistrationID:null,purchasedBundles:[],selectedBundleIDs:new Set}
38),this._timeSlotFilters$=new Ee(new qt),this._canProceedToCheckout$=new Ee({isReady:!1,reason:"No time slots selected"}),this._isLoadingInitialContext$=new Ee(!1),this._initializationError$=new Ee(null),this.destroy$=new xe,this.cartService.cartItems$.pipe(A(this.destroy$)).subscribe(f=>{let y=this._bundleEligibility$.value,I=new Set;if(y.selectedBundleIDs.forEach(k=>{f.some(V=>V.registration?.registrationID===k)&&I.add(k)}),I.size!==y.selectedBundleIDs.size){let k=y.purchasedBundles;this._bundleEligibility$.next(z(j({},y),{selectedBundleIDs:I,sessionsRemaining:this.computeSessionsRemaining(k,I)}))}this.updateCheckoutReadiness()})}ngOnDestroy(){this.destroy$.next(null),this.destroy$.complete()}canRepurchaseBundle(t,n,o){return!this.cartService.getActiveBundleIDsForProgram(o??this.cartService.currentProgramID).has(t)&&!n}getBundleSessionLabel(t,n){let o=n??this.cartService.currentProgramID,m=this.cartService.getCombinedBundleSessionsForProgram(o).get(t.registrationID);return Number.isFinite(m)?m:0}getBundleSessionsRemaining(t,n){let o=new Map(this.cartService.getCombinedBundleSessionsForProgram(t)),m=Math.max(0,n);return this.getPinnedSessionCounts(t).forEach((p,g)=>{let C=o.get(g);if(C===void 0)return;let h=Math.min(C,p,m);m-=h,o.set(g,C-h)}),o.forEach((p,g)=>{let C=Math.min(p,m);m-=C,o.set(g,p-C)}),o}getPinnedSessionCounts(t){let n=this.playerService?.playerID,o=n>0?this.cartService.getCartItemsForPlayer(n,t):this.cartService.getCartItems(t),m=new Map;return(o||[]).forEach(p=>{let g=(p?.timeSlot?p.chosenCoverage?.registrationID:0)??0;g>0&&m.set(g,(m.get(g)??0)+1)}),m}getBundleActionLabel(t,n,o){return this.cartService.getActiveBundleIDsForProgram(o??this.cartService.currentProgramID).has(t.registrationID)?"Purchased":n.has(t.registrationID)?"Added":"Buy Bundle"}updateBundleDisplayState(t,n,o){t.label=this.getBundleActionLabel(t,n,o);let m=o??this.cartService.currentProgramID,p=this.cartService.getCombinedBundleSessionsForProgram(m),g=p.get(t.registrationID)??0;t.sessionLabel=this.formatSessionLabel(g,t,p.has(t.registrationID)),t.tooltipText=this.buildBundleTooltipText(t)}buildBundleTooltipText(t){if(t.numberOfSessions)return`Includes ${t.numberOfSessions} time slot(s).`;let n=t.sessionOverrideEndDate||t.endDate,o=n?_i(n,!1):"";return o?`Includes an unlimited number of time slot(s) through ${o}.`:"Includes an unlimited number of time slot(s)."}formatSessionLabel(t,n,o){return o?Number.isFinite(t)?t>0||n.registrationCostTypeID===K.SUBSCRIPTION?`${t} Time Slots Left`:"":n.registrationCostTypeID===K.UNLIMITED?`An unlimited number of Time Slots Left until ${_i(n.endDate,!1)}`:"":""}updateBundleDisplayStateFromContext(t){this.updateBundleDisplayState(t,this._bundleEligibility$.value.selectedBundleIDs)}refreshBundlesDisplayState(t,n,o){let m=o??this.cartService.currentProgramID,p=this._bundleEligibility$.value.selectedBundleIDs,g=this.getBundleSessionsRemaining(m,n),C=this.cartService.getActiveBundleIDsForProgram(m);t.forEach(h=>{h.label=this.getBundleActionLabel(h,p,m);let f=g.get(h.registrationID)??0;h.sessionLabel=this.formatSessionLabel(f,h,g.has(h.registrationID)),h.tooltipText=this.buildBundleTooltipText(h),h.canRepurchase=!C.has(h.registrationID)})}buildPurchasedBundleSummaries(t,n,o){let m=n??this.cartService.currentProgramID,p=this.cartService.getActiveBundleIDsForProgram(m),g=this.collectSummarizablePurchases(t,p),C=this.countSelectedSessionsByPurchase(m,o),h=new Map;g.forEach(y=>h.set(y.registrationID,(h.get(y.registrationID)??0)+1));let f=new Map;return g.map(y=>{let I=y.registration,k=y.registrationID,V=(f.get(k)??0)+1;f.set(k,V);let H=this.getPurchaseSessionBalance(y),he=C.get(y.entityRegistrationID)??0,Y=Math.max(0,H-he),me=I?.numberOfSessions??0,Ue=!Number.isFinite(H),Pe=me>0?me:H;return{registrationID:k,entityRegistrationID:y.entityRegistrationID,name:this.buildPurchaseName(I?.name,V,h.get(k)),remainingSessions:Ue?null:Y,numberOfSessions:me,usedPercent:!Ue&&Pe>0?Math.min(100,Math.max(0,(Pe-Y)/Pe*100)):0,isUnlimited:Ue,expiresOn:I?.sessionOverrideEndDate||I?.endDate||null}})}collectSummarizablePurchases(t,n){let o=new Set;return(t||[]).filter(m=>{let p=m?.entityRegistrationID;return!n.has(m?.registrationID)||!F(p)||o.has(p)||this.isSpentPurchase(m)?!1:(o.add(p),!0)})}getCoverageAllocation(t){let n=this.playerService?.playerID;return F(n)?this.checkoutOrchestrationService.getCoverageAllocation(n,t??this.cartService.currentProgramID):{purchasedCoverageBySlot:new Map,coveredSlotIDs:new Set}}countSelectedSessionsByPurchase(t,n){let o=new Map;return(n??this.getCoverageAllocation(t)).purchasedCoverageBySlot.forEach(m=>o.set(m,(o.get(m)??0)+1)),o}isSpentPurchase(t){return t?.registration?.registrationCostTypeID!==K.SUBSCRIPTION&&this.getPurchaseSessionBalance(t)<=0}getPurchaseSessionBalance(t){return t?.registration?.registrationCostTypeID===K.UNLIMITED?Number.POSITIVE_INFINITY:Number(t?.remainingSessions??0)}buildPurchaseName(t,n,o){let m=t||"Bundle";return o>1?`${n}. ${m}`:m}buildSignUpFilters(t,n){return z(j({},t),{signUpIds:n})}buildFacilityFilters(t,n){return z(j({},t),{facilityIDs:n})}buildCoachFilters(t,n){return z(j({},t),{staffIDs:n})}buildDayFilters(t,n){return z(j({},t),{daysOfWeek:n})}buildTitleFilter(t,n){return z(j({},t),{title:n})}buildTimeRangeFilters(t,n,o){return z(j({},t),{startTime:n,endTime:o})}prepareProceedToCheckout(t,n,o,m,p,g=null){let C=this.cartService.getCartItems(n).some(Y=>Y.player?.playerID===t&&!Y.timeSlot&&Y.registration?.registrationCostTypeID!==K.VARIABLE);if(m===0&&!C)return{status:pe.InvalidSelection,errorMessage:"Please select at least one time slot or bundle before proceeding."};if(m>this.currentBundleEligibility.sessionsRemaining&&!this.currentBundleEligibility.isEligibleForALaCarte)return{status:pe.InvalidSelection,errorMessage:"This player has exceeded the sessions included in their bundle(s) and is not eligible to purchase additional single time slots."};if(!Number.isFinite(t)||t<=0)return{status:pe.InvalidContext,errorMessage:"Unable to proceed to checkout. Please select a player and try again."};let{isEligibleForALaCarte:h,sessionRegistrationID:f}=this.currentBundleEligibility;if(!h&&!f)return{status:pe.InvalidContext,errorMessage:"This player is not eligible for this program."};let y=h?o:f;if(!F(y))return{status:pe.InvalidContext,errorMessage:"Unable to determine the base registration for this program. Please reload the page and try again."};let I=this.checkoutOrchestrationService.buildCheckoutPlan(t,n,y,p.filter(Y=>Y.registrationID!==o),o),k=this.cartService.getCartItemsForPlayer(t,n).map(Y=>Y.sourceRegistrationID||Y.registration?.registrationID).filter(Y=>Number.isFinite(Y)&&Y>0);I.selectedRegistrationIDsForCheckout=Ct([...I.selectedRegistrationIDsForCheckout,...k]);let V=this.cartService.getProgramsWithCartItems(),H=[n,...V.filter(Y=>Y!==n)];if(V.length>1){let Y=this.checkoutOrchestrationService.buildCheckoutChainLinks(t,n,I,H,g);
38if(Y.length>1){this.checkoutChainService.setCheckoutChain(Y);let me=Y[0];return me.reservePlan?{status:pe.NeedsBundleConfirm,checkoutPlan:me.reservePlan,bundleConfirmRoute:this.allProgramsShellService.buildProgramLeafRoute("bundle-confirm",me.programID,me.collection??null)}:{status:pe.ReadyForCheckout,checkoutPlan:me.checkoutPlan}}}return this.cartService.setCheckoutOrchestrationPlan(I),I.pendingReservations?.some(Y=>Y.assignmentKind===ne.EXISTING_BUNDLE)??!1?{status:pe.NeedsBundleConfirm,checkoutPlan:I,bundleConfirmRoute:this.allProgramsShellService.buildProgramLeafRoute("bundle-confirm",n,g)}:{status:pe.ReadyForCheckout,checkoutPlan:I}}buildCheckoutChainFromCart(t,n=null){return this.checkoutOrchestrationService.buildCheckoutChainFromCart(t,n)}commitCheckoutPlan(t,n){this.registerService.setSelectedRegistrationIDsForSessions(n.selectedRegistrationIDsForCheckout);let o=n.checkoutTimeSlots.map(m=>{let p=new Wt(m);return p.assignedRegistrationID=m.registrationIDs[0],p});return this.registerService.setSignUpTimeSlotsForSessions(o),this.allProgramsShellService.updatePlayerRegistrationSessionSelections(t,n.primaryCheckoutRegistrationID,n.selectedRegistrationIDsForCheckout,o).pipe(re(m=>(Number.isFinite(m)&&m>0&&(this.registerService.entityRegistrationID=m),{entityRegistrationID:m,checkoutRoute:["/players",`${t}`,"registrations",`${n.primaryCheckoutRegistrationID}`,"register"]})),se(()=>U({checkoutRoute:["/players",`${t}`,"registrations",`${n.primaryCheckoutRegistrationID}`,"register"]})))}setCheckoutSessionForContext(t,n){if(!t||!n)return U([]);let o=this.cartService.getCartItems(),m=jn(o.filter(g=>g.player?.playerID===t&&!g.timeSlot)),p=Ct([...m,n]);return ee("[AllProgramsTimeslots] cartRegistrationIDs ... ",m),this.registerService.setSelectedRegistrationIDsForSessions(p),U(p)}initializeForContext(t,n){return!Number.isFinite(t)||t<=0||!Number.isFinite(n)||n<=0?ze(()=>new Error("Invalid program ID or player ID for initialization")):(this._isLoadingInitialContext$.next(!0),this._initializationError$.next(null),this._timeSlotFilters$.next(new qt),Ie({loadedPlayer:this.loadPlayer(n),bundles:this.fetchBundles(t,n),signUps:this.fetchSignUps(t)}).pipe(re(({bundles:o,signUps:m,loadedPlayer:p})=>({programName:o.programName,programCategory:o.programCategory,programType:o.programType,player:p,bundles:o.bundles,purchasedBundles:o.purchasedBundles,aLaCarteRegistrationID:o.aLaCarteRegistrationID,isEligibleForALaCarte:o.isEligibleForALaCarte,sessionRegistrationID:o.sessionRegistrationID,signUps:m})),Ne(o=>{if(!F(o.aLaCarteRegistrationID)&&!F(o.sessionRegistrationID))throw new Error("Unable to determine the base registration for this player");let m=this.cartService.getBundleRegistrationIDsForPlayer(n,t);this._bundleEligibility$.next({sessionsRemaining:this.computeSessionsRemaining(o.purchasedBundles,m),isEligibleForBundle:o.purchasedBundles.length>0,isEligibleForALaCarte:o.isEligibleForALaCarte,sessionRegistrationID:o.sessionRegistrationID,purchasedBundles:o.purchasedBundles,selectedBundleIDs:m}),this._isLoadingInitialContext$.next(!1),this._initializationError$.next(null),this.cartService.setPurchasedBundleState(o.purchasedBundles,t),this.cartService.setALaCarteRegistrationIDForProgram(t,o.aLaCarteRegistrationID);let p=F(o.aLaCarteRegistrationID)?o.aLaCarteRegistrationID:o.sessionRegistrationID;this.cartService.setBaseRegistrationIDForProgram(t,p),this.registerService.registrationID=p,this.cartService.currentProgramID=t,this.updateCheckoutReadiness()}),se(o=>(console.error("Error during initialization:",o),this._isLoadingInitialContext$.next(!1),this._initializationError$.next(o?.message||"Failed to initialize context"),ze(()=>o)))))}reloadPurchasedBundlesForPlayer(t,n){return!Number.isFinite(t)||t<=0||!Number.isFinite(n)||n<=0?ze(()=>new Error("Invalid player ID or program ID")):this.playerService.getCompletedPlayerRegistrations(t,!1).pipe(re(o=>{let m=this.cartService.getALaCarteRegistrationIDForProgram(n),p=(o||[]).filter(g=>g&&g.registration.programID===n&&(!m||g.registration.registrationID!==m));return ee("Reloaded purchased bundles for player:",t,{program:n,bundleCount:p.length}),this.cartService.setPurchasedBundleState(p,n),p}),se(o=>(console.error("Error reloading purchased bundles:",o),ze(()=>new Error("Unable to reload purchased bundles")))))}refreshPurchasedBundlesForCartPrograms(t,n){let o=this.cartService.getProgramsWithCartItems().filter(m=>m!==n&&this.cartService.isTrainingSessionProgram(m));return o.length?Ie(o.map(m=>this.reloadPurchasedBundlesForPlayer(t,m).pipe(se(()=>U(null))))):U(null)}refreshEligibilityForPlayer(t,n){return this.fetchBundles(t,n).pipe(Ne(o=>{let m=this.cartService.getBundleRegistrationIDsForPlayer(n,t);this._bundleEligibility$.next({sessionsRemaining:this.computeSessionsRemaining(o.purchasedBundles,m),isEligibleForBundle:o.purchasedBundles.length>0,isEligibleForALaCarte:o.isEligibleForALaCarte,sessionRegistrationID:o.sessionRegistrationID,purchasedBundles:o.purchasedBundles,selectedBundleIDs:m}
38),this.cartService.setPurchasedBundleState(o.purchasedBundles,t),F(o.aLaCarteRegistrationID)||this.cartService.setBaseRegistrationIDForProgram(t,o.sessionRegistrationID)}),re(o=>({bundles:o.bundles,purchasedBundles:o.purchasedBundles,isEligibleForALaCarte:o.isEligibleForALaCarte,sessionRegistrationID:o.sessionRegistrationID})))}updateFacilitiesFilter(t){let n=this.buildFacilityFilters(this._timeSlotFilters$.value,t);this._timeSlotFilters$.next(n)}updateCoachesFilter(t){let n=this.buildCoachFilters(this._timeSlotFilters$.value,t);this._timeSlotFilters$.next(n)}updateDaysFilter(t){let n=this.buildDayFilters(this._timeSlotFilters$.value,t);this._timeSlotFilters$.next(n)}get currentDaysOfWeek(){return this._timeSlotFilters$.value.daysOfWeek}clearDayFilter(){let t=z(j({},this._timeSlotFilters$.value),{daysOfWeek:void 0});this._timeSlotFilters$.next(t)}updateSignUpsFilter(t){let n=this.buildSignUpFilters(this._timeSlotFilters$.value,t);this._timeSlotFilters$.next(n)}updateTitleFilter(t){let n=this.buildTitleFilter(this._timeSlotFilters$.value,t);this._timeSlotFilters$.next(n)}updateTimeRangeFilter(t,n){let o=this.buildTimeRangeFilters(this._timeSlotFilters$.value,t,n);this._timeSlotFilters$.next(o)}clearTimeSlotFilters(){this._timeSlotFilters$.next(new qt)}addBundleAndUpdateEligibility(t,n){let o=this.cartService.selectedPlayer;if(!o){ee("addBundleAndUpdateEligibility called before player was initialized");return}this.cartService.addBundleToCart(t,o,n);let m=this._bundleEligibility$.value,p=new Set(m.selectedBundleIDs);p.add(t.registrationID),this._bundleEligibility$.next(z(j({},m),{selectedBundleIDs:p,sessionsRemaining:this.computeSessionsRemaining(m.purchasedBundles,p)})),this.updateCheckoutReadiness()}updateCheckoutReadiness(){let t=this.cartService.getCartItems(this.cartService.currentProgramID)||[],n=t.some(p=>p.timeSlot),o=t.some(p=>!p.timeSlot&&p.registration),m=n||o;this._canProceedToCheckout$.next({isReady:m,reason:m?void 0:"Please select at least one time slot or bundle"})}computeSessionsRemaining(t,n){let o=t.reduce((p,g)=>p+(g?.registration?.registrationCostTypeID===K.UNLIMITED?Number.POSITIVE_INFINITY:Number(g.remainingSessions??0)),0),m=this.cartService.getCartItems().filter(p=>p.registration&&n.has(p.registration.registrationID)).reduce((p,g)=>p+(g.registration?.registrationCostTypeID===K.UNLIMITED?Number.POSITIVE_INFINITY:Number(g.registration?.numberOfSessions??0)),0);return o+m}loadPlayer(t){return this.cartService.selectedPlayer?.playerID===t&&!this.cartService.isSelectedPlayerIdentityOnly()?U(this.cartService.selectedPlayer):this.playerService.getPlayer(t).pipe(Ne(n=>{this.cartService.selectedPlayer=n,this.playerService.player=n,this.playerService.playerID=t}))}fetchBundles(t,n){let o=new $n;return o.page=1,o.rows=100,o.includeProgram=!0,Ie({registrations:this.programDetailsService.getProgramRegistrationSearch([t],o),playerRegistrations:this.playerService.getCompletedPlayerRegistrations(n,!1),eligibleRegistrations:this.registerService.getPlayerEligibleTrainingSessionRegistrations(n)}).pipe(re(({registrations:m,playerRegistrations:p,eligibleRegistrations:g})=>{let C=new Set((g||[]).map(Q=>Q.registrationID)),h=(m.registrations||[]).filter(Q=>Q.programID===t),y=h.find(Q=>Q.registrationCostTypeID===K.VARIABLE)?.registrationID||0,I=Ft(g,y),k=h.filter(Q=>Q.registrationID===y||C.has(Q.registrationID)),V=k.find(Q=>Q.registrationID!==y)?.registrationID,H=I?y:V??null,he=m.programs?.find(Q=>Q.programID===t),Y=he?.name||"",me=he?.programCategory||"",Ue=he?.programType||"",Pe=(p||[]).filter(Q=>Q&&Q?.registration.programID===t&&Q.registration.registrationID!==y),Pt=new Map(Pe.map(Q=>[Q.registrationID,Q.registration?.endDate]));return k.forEach(Q=>{Q.endDate=Pt.get(Q.registrationID)??Q.endDate}),ee("Fetched bundles for program:",t,{available:k.length,purchased:Pe.length,aLaCarte:y}),{programName:Y,programCategory:me,programType:Ue,bundles:k,purchasedBundles:Pe,aLaCarteRegistrationID:y,isEligibleForALaCarte:I,sessionRegistrationID:H}}),se(m=>(console.error("Error fetching bundles:",m),ze(()=>new Error("Unable to load registrations")))))}fetchSignUps(t){return this.scheduleSignUpService.getScheduleSignUpsByProgram([t]).pipe(re(n=>n?Object.values(n).flat().filter(o=>Number.isFinite(o.scheduleSignUpID)).map(o=>this.toSelectableSignUp(o)):[]),se(n=>(console.error("Error fetching sign-ups:",n),U([]))))}toSelectableSignUp(t){let n=t.name||t.scheduleSignUpName||"";return z(j({},t),{scheduleSignUpID:t.scheduleSignUpID,name:n,selected:!0})}};c.\u0275fac=function(n){return new(n||c)(oe(ge),oe(_e),oe(be),oe(ue),oe(gt),oe(we),oe(ct),oe(Qt))},c.\u0275prov=qe({token:c,factory:c.\u0275fac});let r=c;return r})();var Si={navigating:!1,errorMessage:null},yr={navigating:!0,errorMessage:null},yt=r=>({navigating:!1,errorMessage:r}),ri=(()=>{let c=class c{constructor(t,n,o,m,p,g,C){this.router=t,this.cartService=n,this.checkoutChainService=o,this.checkoutChainRouter=m,this.allProgramsShellService=p,this.allProgramsTimeslotsService=g,this.registerService=C}startCartCheckout(t){return this.registerService.reservedSlotsSummary=[],this.allProgramsTimeslotsService.refreshPurchasedBundlesForCartPrograms(t.selectedPlayer.playerID).pipe(Re(()=>
38this.buildAndRoute(t)))}buildAndRoute(t){let{selectedPlayer:n,currentUrl:o}=t,m=this.allProgramsShellService.resolveCollectionContextFromUrl(o),p=this.allProgramsTimeslotsService.buildCheckoutChainFromCart(n.playerID,m);if(p.length>1)return this.checkoutChainService.setCheckoutChain(p),this.checkoutChainRouter.navigateForChain(),U(Si);let g=p[0]?.checkoutPlan,C=!!g&&this.cartService.getBundleRegistrationIDsForPlayer(n.playerID,g.programID).size>0;return g&&((g.checkoutTimeSlots?.length??0)>0||(g.pendingReservations?.length??0)>0||C)?this.routeSingleTrainingSession(n.playerID,g,o):this.routePlainRegistration(t)}routeSingleTrainingSession(t,n,o){if(this.cartService.setCheckoutOrchestrationPlan(n),n.pendingReservations?.some(p=>p.assignmentKind===ne.EXISTING_BUNDLE)??!1){let p=this.allProgramsShellService.resolveCollectionContextFromUrl(o),g=this.allProgramsShellService.buildProgramLeafRoute("bundle-confirm",n.programID,p),C="Unable to navigate to bundle confirmation. Please try again.";return Ei(this.router.navigate(g,{queryParams:this.allProgramsShellService.getMobileAppUserQueryParams()})).pipe(re(h=>h?yr:yt(C)),se(()=>U(yt(C))))}return this.allProgramsTimeslotsService.commitCheckoutPlan(t,n).pipe(re(p=>(this.requestOverduePaymentGate(p.checkoutRoute),Si)),se(()=>U(yt("Unable to proceed to checkout. Please try again."))))}routePlainRegistration(t){let{selectedPlayer:n,registrationCartItems:o,currentUrl:m}=t;if(o.length===0)return U(yt("Unable to start registration for the selected sessions. Please try again."));let p=o[0].registration,g=p.registrationID,C=o.filter(h=>h.registration.programID===p.programID&&h.registration.registrationID!==g).map(h=>h.registration.registrationID);return this.allProgramsShellService.updatePlayerRegistrationSessionSelections(n.playerID,g,C).pipe(re(()=>{let h=this.allProgramsShellService.resolveCollectionContextFromUrl(m),f=p.programID?this.allProgramsShellService.buildProgramRegisterRoute(n.playerID,g,p.programID,h):null,I=this.cartService.getPlayerEligibleRegistrationsFromCache(n.playerID).filter(k=>C.includes(k.registration.registrationID)).every(k=>k.registration.hasSpecialRegistration);return this.requestOverduePaymentGate(f||["registrations",g,"register"],I),Si}),se(()=>U(yt("Unable to start registration from cart."))))}requestOverduePaymentGate(t,n=!1){let o=this.router.serializeUrl(this.router.createUrlTree(t,{queryParams:this.allProgramsShellService.getMobileAppUserQueryParams()}));this.allProgramsShellService.requestOverduePaymentModal(o,n)}};c.\u0275fac=function(n){return new(n||c)(oe(Se),oe(ge),oe(_e),oe(Jt),oe(ue),oe(_t),oe(be))},c.\u0275prov=qe({token:c,factory:c.\u0275fac});let r=c;return r})();var Pr=["cartDrawer"],Ir=(r,c)=>({"position-sticky-top":r,"position-sticky top-0 admin-header-sticky-mobile":c}),Tr=()=>["/all-programs"],Dr=(r,c)=>c.registration.registrationID,wr=(r,c)=>c.programID,Er=(r,c)=>c.item.timeSlot?"ts-"+c.item.timeSlot.signUpTimeSlotID:"reg-"+(c.item.registration==null?null:c.item.registration.registrationID),Rr=(r,c)=>c.entityRegistrationID,kr=(r,c)=>c.value;function Ar(r,c){if(r&1&&(e(0,` 39`),a(1,"app-global-banner-content",16),e(2,` 40 `),a(3,"h1"),e(4,"Find a program"),l(),e(5,` 41`),l(),e(6,` 42`)),r&2){let i=d();s(),x("primaryBannerImage",i.primaryBannerImage||void 0)("bannerTextAlign","left")("displayFullWidth",!0)("hidePrimaryBannerImage",!i.primaryBannerImage)("hideSecondaryBannerImage",!0)}}function Fr(r,c){if(r&1&&(e(0,` 43 `),e(1,` 44 `),a(2,"div",17),e(3,` 45 `),e(4,` 46 `),a(5,"a",18),e(6,` 47 `),T(7,"i",19),e(8,` 48 `),a(9,"span",20),e(10,"Back"),l(),e(11,` 49 `),l(),e(12,` 50 `),l(),e(13,` 51 `)),r&2){let i=d();s(2),$("border-right",!i.shellState.isMobileUser)("px-0",i.shellState.isMobileUser),s(3),$("text-large",!i.shellState.isMobileUser)("text-md",i.shellState.isMobileUser),x("routerLink",i.shellState.parentRoute||Xe(9,Tr))}}function Br(r,c){if(r&1&&(e(0,` 52 `),e(1,` 53 `),a(2,"span",21),e(3,` 54 `),a(4,"span",22),e(5,` 55 `),a(6,"app-player-profile-photo",23),e(7,`
56 `),l(),e(8,` 57 `),l(),e(9,` 58 `),a(10,"span",20),e(11),l(),e(12,` 59 `),l(),e(13,` 60 `)),r&2){let i=d(3);s(6),x("player",i.cartService.selectedPlayer)("largeCircle",!1)("initialsOnly",!1),s(5),D("Reserving for ",i.cartService.selectedPlayer.user==null?null:i.cartService.selectedPlayer.user.firstName)}}function Mr(r,c){if(r&1){let i=P();e(0,` 61 `),e(1,` 62 `),a(2,"button",24),b("click",function(){S(i);let n=d(3);return v(n.requestPickPlayer())}),e(3,` 63 `),a(4,"span",22),e(5,` 64 `),a(6,"app-player-profile-photo",23),e(7,` 65 `),l(),e(8,` 66 `),l(),e(9,` 67 `),T(10,"i",25),e(11,` 68 `),l(),e(12,` 69 `)}if(r&2){let i=d(3);s(6),x("player",i.cartService.selectedPlayer)("largeCircle",!1)("initialsOnly",!1)}}function Lr(r,c){if(r&1&&(e(0,` 70 `),_(1,Br,14,4)(2,Mr,13,3)),r&2){let i=d(2);s(),u(i.shellState.lockPlayerSelection?1:2)}}function Or(r,c){if(r&1&&(e(0,` 71 `),_(1,Lr,3,1)),r&2){let i=d();s(),u(i.cartService.selectedPlayer?1:-1)}}function Vr(r,c){if(r&1&&(e(0,` 72 `),a(1,"a",26),e(2),l(),e(3,` 73 `)),r&2){let i=d(2).$implicit;s(),x("routerLink",i.route),s(),D(` 74 `,i.label,` 75 `)}}function Ur(r,c){if(r&1&&(e(0,` 76 `),_(1,Vr,4,2)),r&2){let i=d(2);s(),u(i.shellState.isMobileUser?-1:1)}}function $r(r,c){r&1&&(e(0,` 77 `),a(1,"span",27),e(2,"\xA0/\xA0"),l(),e(3,` 78 `))}function Nr(r,c){if(r&1&&(e(0,` 79 `),_(1,$r,4,0)),r&2){let i=d(2);s(),u(i.shellState.isMobileUser?-1:1)}}function Wr(r,c){if(r&1){let i=P();e(0,` 80 `),a(1,"button",29),b("click",function(){S(i);let n=d(2).$index,o=d();return v(o.openBreadcrumbPicker(n))}),e(2,` 81 `),a(3,"span",30),e(4),l(),e(5,` 82 `),T(6,"i",31),e(7,` 83 `),l(),e(8,` 84 `)}if(r&2){let i=d(2).$implicit,t=d();s(4),w(t.selectedBreadcrumbLabel(i))}}function Gr(r,c){if(r&1){let i=P();e(0,` 85 `),e(1,` 86 `),a(2,"p-select",32),b("onChange",function(n){S(i);let o=d(2).$index,m=d();return v(m.onBreadcrumbChange(o,n))}),e(3,` 87 `),l(),e(4,` 88 `)}if(r&2){let i=d(2).$implicit;s(2),x("ngModel",i.selectedValue)("options",i.options)}}function jr(r,c){if(r&1&&(e(0,` 89 `),e(1,` 90 `),a(2,"span",28),e(3,` 91 `),_(4,Wr,9,1)(5,Gr,5,2),l(),e(6,` 92 `)),r&2){let i=d(),t=i.$index,n=i.$count,o=d();s(2),$("flex-grow-1",o.shellState.isMobileUser)("flex-shrink-0",o.shellState.isMobileUser)("breadcrumb-hide-narrow",o.shellState.isMobileUser&&t!==n-1),s(2),u(o.shellState.isMobileUser?4:5)}}function Yr(r,c){if(r&1&&(e(0,` 93 `),a(1,"span",28),e(2),l(),e(3,` 94 `)),r&2){let i=d().$implicit;s(2),w(i.label)}}function zr(r,c){if(r&1&&(e(0,` 95 `),_(1,Ur,2,1)(2,Nr,2,1)(3,jr,7,7)(4,Yr,4,1),e(5,` 96 `)),r&2){let i,t=c.$implicit;s(),u((i=t.type)==="link"?1:i==="text"?2:i==="dropdown"?3:i==="label"?4:-1)}}function Hr(r,c){if(r&1&&(e(0,` 97 `),a(1,"span",36),e(2),l(),e(3,` 98 `)),r&2){let i=d(2);s(2),w(i.cartItemCount)}}function qr(r,c){if(r&1){let i=P();e(0,` 99 `),a(1,"div",17),e(2,` 100 `),a(3,"div",33),e(4,` 101 `),a(5,"button",34),b("click",function(){S(i);let n=d();return v(n.toggleCart())}),e(6,` 102 `),T(7,"i",35),e(8,` 103 `),_(9,Hr,4,1),l(),e(10,`
104 `),l(),e(11,` 105 `),l(),e(12,` 106 `)}if(r&2){let i=d();s(),$("px-0",i.shellState.isMobileUser),s(4),$("btn-xs",i.shellState.isMobileUser)("ml-2",i.shellState.isMobileUser)("mt-2",i.shellState.isMobileUser),s(2),$("mr-2",i.cartItemCount>0),s(2),u(i.cartItemCount>0?9:-1)}}function Qr(r,c){r&1&&ie(0)}function Kr(r,c){if(r&1&&(e(0,` 107 `),M(1,Qr,1,0,"ng-container",37),e(2,` 108 `)),r&2){d();let i=te(33);s(),x("ngTemplateOutlet",i)}}function Xr(r,c){r&1&&ie(0)}function Jr(r,c){if(r&1&&(e(0,` 109 `),M(1,Xr,1,0,"ng-container",37),e(2,` 110 `)),r&2){d();let i=te(33);s(),x("ngTemplateOutlet",i)}}function Zr(r,c){if(r&1&&(e(0,` 111 `),a(1,"app-checkout-chain-progress",38),e(2,` 112 `),l(),e(3,` 113 `)),r&2){let i=d(2);s(),$("chain-progress-bottom-anchor",i.shellState.isMobileUser)("mb-3",!i.shellState.isMobileUser),x("isMobileView",!!i.shellState.isMobileUser)("liveChainOnly",!0)}}function eo(r,c){if(r&1&&(e(0,` 114 `),_(1,Zr,4,6)),r&2){let i=d();s(),u(i.paidV2Enabled&&i.shellState.isInProgramView?1:-1)}}function to(r,c){if(r&1&&(e(0,` 115 `),a(1,"div",39),e(2,` 116 `),a(3,"div",11),e(4,` 117 `),T(5,"app-player-profile-photo",40),e(6,` 118 `),a(7,"div",41),e(8),l(),e(9,` 119 `),l(),e(10,` 120 `),l(),e(11,` 121 `)),r&2){let i=d();s(5),x("player",i.cartService.selectedPlayer)("playerNumber","1")("initialsOnly",!1),s(3),le(` 122 `,i.cartService.selectedPlayer.user.firstName," ",i.cartService.selectedPlayer.user.lastName,` 123 `)}}function io(r,c){if(r&1&&(e(0,` 124 `),a(1,"div",50),e(2,` 125 `),a(3,"span"),e(4,"List Price"),l(),e(5,` 126 `),a(6,"span",51),e(7),B(8,"currency"),l(),e(9,` 127 `),l(),e(10,` 128 `)),r&2){let i=d().$implicit;s(7),w(ce(8,1,i.registration.price))}}function no(r,c){if(r&1){let i=P();e(0,` 129 `),a(1,"div",43),e(2,` 130 `),a(3,"div",44),e(4,` 131 `),e(5,` 132 `),a(6,"div",45),e(7,` 133 `),a(8,"div",46),e(9),l(),e(10,` 134 `),a(11,"div",47),e(12,` 135 `),a(13,"button",48),b("click",function(){let n=S(i).$implicit,o=d(2);return v(o.removeFromCart(n))}),e(14,` 136 `),T(15,"i",49),e(16,` 137 `),l(),e(17,` 138 `),l(),e(18,` 139 `),l(),e(19,` 140 `),_(20,io,11,3),l(),e(21,` 141 `),l(),e(22,` 142 `)}if(r&2){let i=c.$implicit;s(9),w(i.registration.name),s(11),u(i.registration.price!==null&&i.registration.price!==void 0?20:-1)}}function ro(r,c){if(r&1&&(e(0,` 143 `),a(1,"div",42),e(2,` 144 `),L(3,no,23,2,null,null,Dr),l(),e(5,` 145 `)),r&2){let i=d();s(3),O(i.cartItems)}}function oo(r,c){if(r&1&&(e(0,` 146 `),a(1,"h3",53),e(2),l(),e(3,` 147 `)),r&2){let i=d().$implicit;s(2),w(i.programName)}}function ao(r,c){r&1&&(e(0,` 148 `),T(1,"i",59),e(2,` 149 `))}function lo(r,c){if(r&1&&(e(0,` 150 `),a(1,"div",61),e(2,` 151 `),T(3,"i",64),e(4,` 152 `),a(5,"span"),e(6),l(),e(7,` 153 `),l(),e(8,` 154 `)),r&2){let i=d(2).$implicit;s(6),w(i.locationLabel)}}function so(r,c){if(r&1&&(e(0,` 155 `),a(1,"div",11),e(2,` 156 `),T(3,"i",65),e(4,` 157 `),a(5,"span"),e(6),l(),e(7,`
158 `),l(),e(8,` 159 `)),r&2){let i=d(2).$implicit;s(6),w(i.coachLabel)}}function co(r,c){if(r&1&&(e(0,` 160 `),a(1,"div",60),e(2,` 161 `),a(3,"div",61),e(4,` 162 `),T(5,"i",62),e(6,` 163 `),a(7,"span"),e(8),B(9,"date"),l(),e(10,` 164 `),l(),e(11,` 165 `),a(12,"div",61),e(13,` 166 `),T(14,"i",63),e(15,` 167 `),a(16,"span"),e(17),B(18,"date"),B(19,"date"),l(),e(20,` 168 `),l(),e(21,` 169 `),_(22,lo,9,1),_(23,so,9,1),l(),e(24,` 170 `)),r&2){let i=d().$implicit;s(8),w(q(9,5,i.item.timeSlot.startDate,"EEE, MMMM d, y")),s(9),le(` 171 `,q(18,8,i.item.timeSlot.startDate,"h:mm a")," - ",q(19,11,i.item.timeSlot.endDate,"h:mm a"),` 172 `),s(5),u(i.locationLabel?22:-1),s(),u(i.coachLabel?23:-1)}}function mo(r,c){if(r&1){let i=P();e(0,` 173 `),a(1,"div",68),e(2,` 174 `),e(3,` 175 `),a(4,"p-radioButton",69),b("onClick",function(){let n=S(i).$implicit,o=d(2).$implicit,m=d(3);return v(m.onPassSelected(o.item,n))}),e(5,` 176 `),l(),e(6,` 177 `),a(7,"label",70),e(8),l(),e(9,` 178 `),l(),e(10,` 179 `)}if(r&2){let i=c.$implicit,t=d(2).$implicit;s(4),x("name",t.passGroupName)("value",i.entityRegistrationID)("ngModel",t.selectedPassEntityRegistrationID)("disabled",i.disabled)("inputId",t.passGroupName+"-"+i.entityRegistrationID),s(3),fe("for",t.passGroupName+"-"+i.entityRegistrationID),s(),D(` 180 `,i.bundleName,` 181 `)}}function po(r,c){if(r&1&&(e(0,` 182 `),a(1,"div",66),e(2,` 183 `),a(3,"div",67),e(4,"Select which bundle to apply to this time slot:"),l(),e(5,` 184 `),L(6,mo,11,7,null,null,Rr),l(),e(8,` 185 `)),r&2){let i=d().$implicit;s(6),O(i.passOptions)}}function go(r,c){if(r&1&&(e(0,` 186 `),a(1,"div",50),e(2,` 187 `),a(3,"span"),e(4,"List Price"),l(),e(5,` 188 `),a(6,"span",51),e(7),B(8,"currency"),l(),e(9,` 189 `),l(),e(10,` 190 `)),r&2){let i=d().$implicit;s(7),w(ce(8,1,i.item.registration.price))}}function _o(r,c){if(r&1&&(e(0,` 191 `),a(1,"span"),e(2,` 192 `),a(3,"span",71),e(4),B(5,"currency"),l(),e(6,` 193 `),a(7,"span",51),e(8),B(9,"currency"),l(),e(10,` 194 `),l(),e(11,` 195 `)),r&2){let i=d(2).$implicit;s(4),w(ce(5,2,i.item.timeSlot.price)),s(4),w(ce(9,4,0))}}function uo(r,c){if(r&1&&(e(0,` 196 `),a(1,"span",51),e(2),B(3,"currency"),l(),e(4,` 197 `)),r&2){let i=d(2).$implicit;s(2),w(ce(3,1,i.item.timeSlot.price))}}function ho(r,c){if(r&1&&(e(0,` 198 `),a(1,"div",50),e(2,` 199 `),a(3,"span"),e(4,"List Price"),l(),e(5,` 200 `),e(6,` 201 `),_(7,_o,12,6)(8,uo,5,3),l(),e(9,` 202 `)),r&2){let i=d().$implicit;s(7),u(i.isCoveredByBundle?7:8)}}function Co(r,c){if(r&1){let i=P();e(0,` 203 `),a(1,"div",54),e(2,` 204 `),a(3,"div",55),e(4,` 205 `),a(5,"div",56),e(6,` 206 `),a(7,"div",57),e(8,` 207 `),_(9,ao,3,0),e(10),l(),e(11,` 208 `),a(12,"button",58),b("click",function(){let n=S(i).$implicit,o=d(3);return v(o.removeFromCart(n.item))}),e(13,` 209 `),T(14,"i",49),e(15,`
210 `),l(),e(16,` 211 `),l(),e(17,` 212 213 `),_(18,co,25,14),_(19,po,9,0),_(20,go,11,3),_(21,ho,10,1),l(),e(22,` 214 `),l(),e(23,` 215 `)}if(r&2){let i=c.$implicit;s(9),u(i.item.registration!==null?9:-1),s(),D("",i.title,` 216 `),s(2),fe("aria-label",i.removeAriaLabel),s(6),u(i.item.timeSlot?18:-1),s(),u(i.passOptions.length?19:-1),s(),u(i.item.registration!==null&&i.item.registration.price!==null&&i.item.registration.price!==void 0?20:-1),s(),u(i.item.timeSlot&&i.item.timeSlot.price!==null&&i.item.timeSlot.price!==void 0?21:-1)}}function xo(r,c){if(r&1&&(e(0,` 217 `),a(1,"div",42),e(2,` 218 `),_(3,oo,4,1),L(4,Co,24,7,null,null,Er),l(),e(6,` 219 `)),r&2){let i=c.$implicit;s(3),u(i.programName?3:-1),s(),O(i.rows)}}function fo(r,c){if(r&1&&(e(0,` 220 `),e(1,` 221 `),a(2,"h2",52),e(3,"Sessions"),l(),e(4,` 222 `),L(5,xo,7,1,null,null,wr)),r&2){let i=d();s(5),O(i.trainingSessionCartGroups)}}function So(r,c){r&1&&(e(0,` 223 `),a(1,"div",72),e(2,` 224 `),T(3,"i",73),e(4,` 225 Your cart is empty 226 `),l(),e(5,` 227 `))}function vo(r,c){if(r&1&&(e(0,` 228 `),a(1,"app-inline-alert",76),e(2),l(),e(3,` 229 `)),r&2){let i=d(2);s(),x("isInline",!0),s(),D(` 230 Checks out as `,i.separateCheckoutCount,` separate payments, one per program. 231 `)}}function yo(r,c){if(r&1){let i=P();e(0,` 232 `),a(1,"div",74),e(2,` 233 `),e(3,` 234 `),_(4,vo,4,2),a(5,"button",75),b("click",function(){S(i);let n=d();return v(n.register())}),e(6,"Register"),l(),e(7,` 235 `),l(),e(8,` 236 `)}if(r&2){let i=d();s(4),u(i.paidV2Enabled&&i.separateCheckoutCount>1?4:-1),s(),x("disabled",i.isRegistering)}}function bo(r,c){if(r&1){let i=P();e(0,` 237 `),a(1,"button",78),b("click",function(){let n=S(i).$implicit,o=d(2);return v(o.selectBreadcrumbOption(n))}),e(2,` 238 `),e(3,` 239 `),T(4,"i",79),e(5,` 240 `),a(6,"span"),e(7),l(),e(8,` 241 `),l(),e(9,` 242 `)}if(r&2){let i=c.$implicit,t=c.$index,n=c.$count,o=d(2);s(),$("border-bottom",t!==n-1),fe("aria-current",i.value===o.breadcrumbPicker.selectedValue?"true":null),s(3),$("fa-check",i.value===o.breadcrumbPicker.selectedValue),s(3),w(i.label)}}function Po(r,c){if(r&1){let i=P();e(0,` 243`),a(1,"p-dialog",77),G("visibleChange",function(n){S(i);let o=d();return W(o.showBreadcrumbPicker,n)||(o.showBreadcrumbPicker=n),v(n)}),b("onHide",function(){S(i);let n=d();return v(n.breadcrumbPicker=void 0)}),e(2,` 244 `),L(3,bo,10,6,null,null,kr),l(),e(5,` 245`)}if(r&2){let i=d();s(),N("visible",i.showBreadcrumbPicker),x("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1)("header",i.breadcrumbPicker.title),s(2),O(i.breadcrumbPicker.options)}}function Io(r,c){if(r&1&&(e(0,` 246 `),a(1,"app-overdue-payment-modal",80),e(2,` 247 `),l(),e(3,` 248`)),r&2){let i=d();s(),x("player",i.cartService.selectedPlayer)("redirectUrl",i.redirectUrl)("specialRegistration",i.specialRegistration)}}var vi=[],Ye=(()=>{let c=class c{constructor(t,n,o,m,p,g,C,h){this.siteDataService=t,this.allProgramsShellService=n,this.router=o,this.cartService=m,this.authorizeService=p,this.cartCheckoutService=g,this.checkoutOrchestrationService=C,this.checkoutChainService=h,this.primaryBannerImage="",this.shellState=Bn,this.isAuthenticated=!1,this.showCart=!1,this.cartItems=[],this.trainingSessionCartItems=[],this.cartItemCount=0,this.trainingSessionCartItemCount=0,this.showOverduePaymentWarning=!1,this.redirectUrl="",this.specialRegistration=!1,this.isRegistering=!1,this.paidV2Enabled=!1,this.trainingSessionCartGroups=[],this.passOptionsByProgram=new Map,this.effectiveCoverageBySlot=new Map,this.coveredSlotIDs=new Set,this.separateCheckoutCount=0,this.showBreadcrumbPicker=!1,this.breadcrumbLabels=new WeakMap,this.unsubscribe$=new xe}ngOnInit(){return $e(this,null,function*(){this.allProgramsShellService.routedShellState$.pipe(A(this.unsubscribe$)).subscribe({next:t=>{this.shellState=t},error:()=>{}}),this.allProgramsShellService.openCartRequested$.pipe(A(this.unsubscribe$)).subscribe({next:()=>{this.showCart=!0},error:()=>{}}),this.allProgramsShellService.overduePaymentModalRequested$.pipe(A(this.unsubscribe$)).subscribe(t=>{this.redirectUrl=t.redirectUrl,this.specialRegistration=t.specialRegistration,this.showOverduePaymentWarning=!0}),this.isAuthenticated=yield He(this.authorizeService.isAuthenticated()),(this.isAuthenticated?this.siteDataService.isPaidSignupsV2Enabled$():U(!1)).pipe(A(this.unsubscribe$)).subscribe({next:t=>{this.paidV2Enabled=t},error:()=>{this.paidV2Enabled=!1}}),this.siteDataService.getClubSettings().pipe(A(this.unsubscribe$)).subscribe({next:t=>{this.primaryBannerImage=t?.theme?.primaryBannerImage||""},error:()=>{this.primaryBannerImage=""}}
248),this.router.events.pipe(Ri(t=>t instanceof Ui),A(this.unsubscribe$)).subscribe({next:()=>{this.showCart=!1,this.destroyStrayCartDrawerMask(),this.isRegistering=!1},error:()=>{}}),this.cartService.cartItems$.pipe(A(this.unsubscribe$)).subscribe({next:t=>{this.cartItems=t.filter(n=>n.cartItemType===We.REGISTRATION),this.trainingSessionCartItems=t.filter(n=>n.cartItemType!==We.REGISTRATION),this.cartItemCount=t.length,this.trainingSessionCartItemCount=this.trainingSessionCartItems.length,this.refreshPassSelection(),this.trainingSessionCartGroups=this.groupByProgram(this.trainingSessionCartItems)},error:()=>{this.cartItems=[],this.cartItemCount=0,this.trainingSessionCartGroups=[],this.passOptionsByProgram.clear(),this.effectiveCoverageBySlot.clear(),this.coveredSlotIDs.clear()}}),this.checkoutChainService.checkoutChain$.pipe(A(this.unsubscribe$)).subscribe({next:t=>{this.separateCheckoutCount=(t?.links??[]).filter(n=>n.status!==Ge.COMPLETED).length},error:()=>{this.separateCheckoutCount=0}})})}destroyStrayCartDrawerMask(){this.cartDrawer?.destroyModal()}requestPickPlayer(){this.allProgramsShellService.requestPickPlayer()}onBreadcrumbChange(t,n){if(t<0||t>=this.shellState.breadcrumbs.length)return;let o=this.shellState.breadcrumbs[t];if(o.type!=="dropdown")return;let m=o.options.find(p=>p.value===n.value);m&&this.router.navigate(m.route,{queryParams:this.allProgramsShellService.getMobileAppUserQueryParams()})}toggleCart(){this.showCart=!this.showCart}selectedBreadcrumbLabel(t){let n=this.breadcrumbLabels.get(t);if(n!==void 0)return n;let o=t.options?.find(m=>m.value===t.selectedValue)?.label??"";return this.breadcrumbLabels.set(t,o),o}openBreadcrumbPicker(t){let n=this.shellState.breadcrumbs?.[t];if(n?.type!=="dropdown"||!n.options?.length)return;let o=n.options.some(m=>typeof m.value=="string"&&m.value.startsWith("program-"));this.breadcrumbPicker={index:t,title:o?"Switch program":"Switch category",options:n.options,selectedValue:n.selectedValue},this.showBreadcrumbPicker=!0}selectBreadcrumbOption(t){if(!this.breadcrumbPicker)return;let n=this.breadcrumbPicker.index;this.showBreadcrumbPicker=!1,this.breadcrumbPicker=void 0,this.onBreadcrumbChange(n,{value:t.value})}refreshPassSelection(){this.passOptionsByProgram.clear(),this.effectiveCoverageBySlot.clear(),this.coveredSlotIDs.clear();let t=this.cartService.selectedPlayer?.playerID;if(t>0)for(let n of this.cartService.getProgramsWithCartItems()){let o=this.checkoutOrchestrationService.getCoverageAllocation(t,n);o.purchasedCoverageBySlot.forEach((m,p)=>this.effectiveCoverageBySlot.set(p,m)),o.coveredSlotIDs.forEach(m=>this.coveredSlotIDs.add(m)),this.passOptionsByProgram.set(n,this.buildPassOptions(this.checkoutOrchestrationService.getCoverageCandidatesForProgram(n),o.purchasedCoverageBySlot))}}buildPassOptions(t,n){let o=new Map;return n.forEach(m=>o.set(m,(o.get(m)??0)+1)),(t||[]).map(m=>({registrationID:m.registrationID,entityRegistrationID:m.entityRegistrationID,bundleName:m.bundleName,disabled:m.capacity!==null&&(o.get(m.entityRegistrationID)??0)>=m.capacity}))}passOptionsFor(t){let n=this.passOptionsByProgram.get(t.programID??t.timeSlot?.programID)??vi,o=this.selectedPassFor(t),m=n.filter(p=>!p.disabled||p.entityRegistrationID===o);return m.length>1&&m.some(p=>!p.disabled)?m:vi}selectedPassFor(t){return this.effectiveCoverageBySlot.get(t.timeSlot?.signUpTimeSlotID)}onPassSelected(t,n){!t.timeSlot||!t.player||n?.disabled||this.cartService.setCartItemCoverage(t.timeSlot.signUpTimeSlotID,t.player.playerID,{registrationID:n.registrationID,entityRegistrationID:n.entityRegistrationID})}groupByProgram(t){let n=new Map;for(let o of t){let m=o.programID??o.timeSlot?.programID??o.registration?.programID??0;n.has(m)||n.set(m,{programID:m,programName:o.programName??"",rows:[]}),n.get(m).rows.push(this.buildCartSessionRow(o))}return Array.from(n.values())}buildCartSessionRow(t){let n=(t.timeSlot?t.timeSlot.timeSlotName:t.registration?.name)??"",o=t.timeSlot?this.passOptionsFor(t):vi;return{item:t,title:n,removeAriaLabel:`Remove ${n} from cart`,locationLabel:this.locationLabelFor(t),coachLabel:this.coachLabelFor(t),passOptions:o,passGroupName:`pass-${t.timeSlot?.signUpTimeSlotID}`,selectedPassEntityRegistrationID:o.length?this.selectedPassFor(t):void 0,isCoveredByBundle:this.coveredSlotIDs.has(t.timeSlot?.signUpTimeSlotID)}}locationLabelFor(t){return[t.timeSlot?.locationName,t.timeSlot?.facilityFieldName].filter(n=>!!n).join(", ")}coachLabelFor(t){return nt((t.timeSlot?.staffAssignments??[]).slice(0,1))}removeFromCart(t){if(t.timeSlot){this.cartService.removeTimeSlotFromCart(t.timeSlot.signUpTimeSlotID,t.player.playerID);return}this.cartService.removeFromCart(t.registration.registrationID,t.player.playerID)}register(){if(this.isRegistering)return;let t=this.cartService.selectedPlayer;if(!t||!this.cartItemCount){this.siteDataService.showSiteErrorAlert("Please select a player and add an item to cart first.");return}this.isRegistering=!0,this.showCart=!1,this.cartCheckoutService.startCartCheckout({selectedPlayer:t,registrationCartItems:this.cartItems,currentUrl:this.router.url}).pipe(A(this.unsubscribe$)).subscribe({next:n=>{this.isRegistering=n.navigating,n.errorMessage&&this.siteDataService.showSiteErrorAlert(n.errorMessage)},error:()=>{this.isRegistering=!1,this.siteDataService.showSiteErrorAlert("Unable to start registration from cart.")}})}ngOnDestroy(){this.destroyStrayCartDrawerMask(),this.unsubscribe$.next(),this.unsubscribe$.complete()}};c.\u0275fac=function(n){return new(n||c)(R(De),R(ue),R(Se),R(ge),R(tt),R(ri),R(gt),R(_e))},c.\u0275cmp=Te({type:c,selectors:[["app-all-programs-shell"]],viewQuery:function(n,o){if(n&1&&Dt(Pr,5),n&2){let m;
vendor: 4,914 bytes, lines 248-255
248wt(m=Et())&&(o.cartDrawer=m.first)}},standalone:!1,decls:73,vars:33,consts:[["chainProgress",""],["cartDrawer",""],[1,"programs-list-container"],[1,"admin-header","justify-content-between","mb-3","card",3,"ngClass","appStickyHeightPublisher"],[1,"row","align-items-center","breadcrumbs-wrapper"],[1,"col","breadcrumbs-inner-wrapper"],[1,"align-self-center","mb-0"],[1,"mt-0"],["position","right","styleClass","cart-sidebar",3,"visibleChange","visible","baseZIndex","showCloseIcon"],[1,"d-flex","flex-column","justify-content-between","full-height"],[1,"cart-modal-header","d-flex","align-items-center","justify-content-between","mb-3"],[1,"d-flex","align-items-center"],["type","button","data-testid","all-programs-cart-close","title","Close cart",1,"btn-a11y","cursor-pointer",3,"click"],[1,"far","fa-times-circle","text-largest"],[1,"cart-title","text-h4","ml-3"],["data-testid","all-programs-cart-body",1,"cart-body"],[3,"primaryBannerImage","bannerTextAlign","displayFullWidth","hidePrimaryBannerImage","hideSecondaryBannerImage"],[1,"col-auto"],["data-testid","all-programs-back",1,"text-grey","text-large",3,"routerLink"],["aria-hidden","true",1,"far","fa-arrow-left"],[1,"sr-only"],[1,"player-chip-button","d-flex","align-items-center","flex-shrink-0","ml-1","mr-1","px-1"],[1,"profile-image"],[3,"player","largeCircle","initialsOnly"],["type","button","aria-label","Change player",1,"btn-a11y","btn-a11y-light-hover","player-chip-button","border-all","border-radius","d-flex","align-items-center","flex-shrink-0","ml-1","mr-1","px-1",3,"click"],["aria-hidden","true",1,"fa-regular","fa-chevron-down","ml-1"],[1,"header--parent-link","breadcrumb",3,"routerLink"],["aria-hidden","true",1,"header-separator"],[1,"header--page-label","breadcrumb"],["type","button","aria-haspopup","dialog",1,"btn-a11y","btn-a11y-light-hover","breadcrumb-title-button","full-width","min-width-0","d-flex","align-items-center","px-1","text-default","fw-700",3,"click"],[1,"text-overflow-ellipsis"],["aria-hidden","true",1,"fa-regular","fa-chevron-down","ml-2","flex-shrink-0"],["optionLabel","label","optionValue","value","placeholder","Select an option","filterBy","label","styleClass","full-width","appendTo","body",3,"onChange","ngModel","options"],[1,"cart-button-container"],["data-testid","all-programs-cart-toggle","type","button",1,"btn","d-flex","align-items-center",3,"click"],[1,"fa","fa-shopping-cart"],["data-testid","all-programs-cart-count",1,"cart-count-badge"],[4,"ngTemplateOutlet"],[3,"isMobileView","liveChainOnly"],[1,"card","bg-navy","p-2"],[3,"player","playerNumber","initialsOnly"],[1,"player-name","flex-grow-1","ml-2"],[1,"cart-items"],[1,"cart-item","card","p-0"],[1,"cart-item-content","p-3","text-medium"],[1,"d-flex","justify-content-between","align-items-center"],[1,"cart-item-name","fw-700","line-height-2","mb-3","flex-grow-1"],[1,"d-flex","justify-content-between","align-items-center","mb-2"],["type","button",1,"btn-a11y",3,"click"],[1,"fal","fa-trash"],[1,"cart-item-price","p-2","border-top","d-flex","justify-content-between"],[1,"final-price"],[1,"text-h4"],[1,"text-h5","mb-2"],["data-testid","cart-session-row",1,"card","pb-0"],[1,"cart-item-content","p-0","text-medium"],[1,"d-flex","justify-content-between","align-items-start"],[1,"cart-item-name","fw-700","line-height-2","flex-grow-1"],["type","button",1,"btn-a11y","ml-2",3,"click"],[1,"fa-light","fa-box","mr-2"],[1,"cart-item-details","mt-2"],[1,"d-flex","align-items-center","mb-1"],[1,"fa-light","fa-calendar","mr-2"],[1,"fa-light","fa-clock","mr-2"],[1,"fa-light","fa-location-dot","mr-2"],[1,"fa-light","fa-user","mr-2"],[1,"border-top","mt-3","pt-3"],[1,"mb-2"],[1,"d-flex","align-items-center","mb-2"],[3,"onClick","name","value","ngModel","disabled","inputId"],[1,"ml-2","mb-0"],[1,"text-line-through","text-grey","mr-1"],["data-testid","cart-empty",1,"cart-empty","text-center","full-width","my-5","py-5"],[1,"d-block","full-width","fal","fa-shopping-cart","text-large"],[1,"cart-footer"],["type","button","data-testid","cart-register",1,"btn","btn-primary","btn-block",3,"click","disabled"],["alertType","info","styleClass","mb-2","data-testid","cart-separate-payments",3,"isInline"],["styleClass","standardWidthDialog",3,"visibleChange","onHide","visible","showHeader","closable","modal","draggable","header"],["type","button",1,"btn-a11y","btn-a11y-light-hover","breadcrumb-picker-option","full-width","text-left","d-flex","align-items-center","py-2",3,"click"],["aria-hidden","true",1,"fa-regular","fa-fw","mr-2","flex-shrink-0"],[3,"player","redirectUrl","specialRegistration"]],template:function(n,o){if(n&1){let m=P();_(0,Ar,7,5),a(1,"div"),e(2,` 249 `),a(3,"div",2),e(4,` 250 `),a(5,"div",3),e(6,` 251 `),a(7,"div",4),e(8,` 252 253 `),_(9,Fr,14,10),a(10,"div",5),e(11,` 254 `),_(12,Or,2,1),a(13,"h1",6),e(14,` 255 `),L(15,zr,6,1,null,null,Fi),l(),e(17,`
256 `),l(),e(18,` 257 `),e(19,` 258 `),_(20,qr,13,11),l(),e(21,` 259 `),e(22,` 260 `),_(23,Kr,3,1),l(),e(24,` 261 `),e(25,` 262 `),_(26,Jr,3,1),T(27,"router-outlet",7),e(28,` 263 `),l(),e(29,` 264`),l(),e(30,` 265`),e(31,` 266`),M(32,eo,2,1,"ng-template",null,0,ae),e(34,` 267 268`),a(35,"p-drawer",8,1),G("visibleChange",function(g){return S(m),W(o.showCart,g)||(o.showCart=g),v(g)}),e(37,` 269 `),a(38,"div",9),e(39,` 270 `),a(40,"div"),e(41,` 271 `),a(42,"div",10),e(43,` 272 `),a(44,"div",11),e(45,` 273 `),a(46,"button",12),b("click",function(){return o.toggleCart()}),e(47,` 274 `),T(48,"i",13),e(49,` 275 `),l(),e(50,` 276 `),a(51,"div",14),e(52,` 277 `),a(53,"span"),e(54,"Your Cart"),l(),e(55,` 278 `),l(),e(56,` 279 `),l(),e(57,` 280 `),l(),e(58,` 281 `),a(59,"div",15),e(60,` 282 `),_(61,to,12,5),_(62,ro,6,0),_(63,fo,7,0),_(64,So,6,0),l(),e(65,` 283 `),l(),e(66,` 284 285 `),_(67,yo,9,2),l(),e(68,` 286`),l(),e(69,` 287 288`),e(70,` 289`),_(71,Po,6,6),_(72,Io,4,3)}n&2&&(u(o.shellState.isMobileUser?-1:0),s(),$("pt-3",!o.shellState.isMobileUser),s(2),$("container",!o.shellState.isMobileUser),s(2),x("ngClass",Je(30,Ir,!o.shellState.isMobileUser,o.shellState.isMobileUser))("appStickyHeightPublisher",o.shellState.isMobileUser?"--admin-header-height":null),s(4),u(o.shellState.showBackButton?9:-1),s(),$("flex-grow-1",o.shellState.isMobileUser)("flex-shrink-0",o.shellState.isMobileUser)("px-0",o.shellState.isMobileUser),s(2),u(o.shellState.isMobileUser&&o.shellState.isInProgramView?12:-1),s(),$("full-width",o.shellState.isMobileUser),s(2),O(o.shellState.breadcrumbs),s(5),u(o.isAuthenticated&&!(o.shellState.isMobileUser&&o.shellState.hideHeaderCart)?20:-1),s(3),u(o.shellState.isMobileUser?23:-1),s(3),u(o.shellState.isMobileUser?-1:26),s(9),N("visible",o.showCart),x("baseZIndex",1e4)("showCloseIcon",!1),s(26),u(o.cartService.selectedPlayer?61:-1),s(),u(o.cartItemCount>0?62:-1),s(),u(o.paidV2Enabled&&o.trainingSessionCartItemCount>0?63:-1),s(),u(o.cartItemCount===0&&o.trainingSessionCartItemCount===0?64:-1),s(3),u(o.cartItemCount>0||o.trainingSessionCartItemCount>0?67:-1),s(4),u(o.breadcrumbPicker?71:-1),s(),u(o.showOverduePaymentWarning?72:-1))},dependencies:[yn,Ze,Fe,Me,Le,$i,Ni,at,Oe,Gt,ot,rt,nn,st,En,Ln,Rt,Be],styles:[".admin-header[_ngcontent-%COMP%]{z-index:1}.programs-filters-wrapper[_ngcontent-%COMP%]{top:6.5rem}.programs-filters-wrapper[_ngcontent-%COMP%] .programs-filters-inner[_ngcontent-%COMP%]{max-height:calc(100vh - 6.5rem);overflow:auto}.registration-groups-accordion.p-accordion-naked[_ngcontent-%COMP%] .p-accordionpanel.card[_ngcontent-%COMP%], .program-groups-accordion.p-accordion-naked[_ngcontent-%COMP%] .p-accordionpanel.card[_ngcontent-%COMP%]{--p-accordion-content-padding: 1rem 1rem 1rem 1.25rem}.registration-custom-text-row[_ngcontent-%COMP%] {font-size:.875rem}.registration-custom-text-row[_ngcontent-%COMP%] p{margin-bottom:.5rem}.registration-custom-text-row[_ngcontent-%COMP%] h1{font-size:1.5rem}.registration-custom-text-row[_ngcontent-%COMP%] h2{font-size:1.375rem}.registration-custom-text-row[_ngcontent-%COMP%] h3{font-size:1.25rem}.registration-custom-text-row[_ngcontent-%COMP%] h4{font-size:1.125rem}.registration-custom-text-row[_ngcontent-%COMP%] h5{font-size:1rem}.programs-list-container[_ngcontent-%COMP%] .all-programs-card:hover{box-shadow:var(--box-sha
289dow-lg);border-color:var(--grey-500)}.registration-card-info[_ngcontent-%COMP%]{border-right:none;border-bottom:var(--border);padding-bottom:1rem;margin-bottom:1rem}@media(min-width:768px){.registration-card-info[_ngcontent-%COMP%]{border-right:var(--border);border-bottom:none;padding-bottom:unset;margin-bottom:unset}}.registration-details-grid[_ngcontent-%COMP%], .registration-details-grid--price[_ngcontent-%COMP%]{text-align:left}@media(min-width:768px){.registration-details-grid[_ngcontent-%COMP%], .registration-details-grid--price[_ngcontent-%COMP%]{text-align:right}}.cart-item-badge[_ngcontent-%COMP%]{position:absolute;bottom:0;left:5rem;font-size:.5rem;height:1.25rem;padding:.25rem;background-color:var(--primary, #007bff);color:#fff;border-bottom-left-radius:.5rem}.mobile-coverage-row[_ngcontent-%COMP%]{min-height:2.75rem}.mobile-app-layout[_ngcontent-%COMP%]{height:calc(100dvh - var(--admin-header-height, 0px))}",".admin-header-sticky-mobile[_ngcontent-%COMP%]{z-index:1000;overflow:visible}.chain-progress-bottom-anchor[_ngcontent-%COMP%]{position:absolute;left:50%;bottom:0;z-index:1001;transform:translate(-50%,50%)}.breadcrumb-title-button[_ngcontent-%COMP%], .breadcrumb-picker-option[_ngcontent-%COMP%], .player-chip-button[_ngcontent-%COMP%]{min-height:2.75rem}.player-chip-button[_ngcontent-%COMP%] .profile-image[_ngcontent-%COMP%]{width:2.25rem;height:2.25rem}.profile-image[_ngcontent-%COMP%]{width:3rem;height:3rem;border-radius:50%;overflow:hidden;object-fit:cover;flex-shrink:0;padding:0;display:flex;align-items:center;justify-content:center;align-self:center}@media(max-width:575px){.header--page-label.breadcrumb-hide-narrow[_ngcontent-%COMP%]{display:none}}"]});let r=c;return r})();var Pi=wi(or());var Mo=(r,c)=>({"fa-chevron-down":r,"fa-chevron-up":c}),Lo=(r,c)=>({"d-none":r,"d-block":c}),Oo=r=>({"border-bottom pb-2 mb-2":r}),Vo=r=>({registration:r}),Uo=(r,c)=>({registration:r,program:c}),$o=(r,c,i)=>({registration:r,program:c,isBundle:i}),No=(r,c)=>c.program.programID,Ii=(r,c)=>c.registrationID,Wo=(r,c)=>c.groupName,Go=(r,c)=>c.scheduleSignUpID;function jo(r,c){if(r&1){let i=P();e(0,` 290 `),a(1,"div",12),e(2,` 291 `),a(3,"div",13),e(4,"REGISTRATIONS FOR:"),l(
291),e(5,` 292 `),a(6,"div",14),e(7,` 293 `),a(8,"span",15),e(9,` 294 `),a(10,"div",16),e(11,` 295 `),a(12,"app-player-profile-photo",17),e(13,` 296 `),l(),e(14,` 297 `),l(),e(15,` 298 `),a(16,"div",18),e(17),l(),e(18,` 299 `),l(),e(19,` 300 `),a(20,"button",19),b("click",function(){S(i);let n=d(3);return v(n.showPickPlayer=!0)}),e(21,` 301 Change 302 `),l(),e(22,` 303 `),l(),e(23,` 304 `),l(),e(24,` 305 `)}if(r&2){let i=d(3);s(12),x("player",i.cartService.selectedPlayer)("playerNumber","1")("initialsOnly",!1),s(5),le("",i.cartService.selectedPlayer.user.firstName,` 306 `,i.cartService.selectedPlayer.user.lastName)}}function Yo(r,c){if(r&1){let i=P();e(0,` 307 `),a(1,"div",27),e(2,` 308 `),a(3,"div",28),e(4,"Location"),l(),e(5,` 309 `),a(6,"div",29),e(7,` 310 `),a(8,"p-multiSelect",30),G("ngModelChange",function(n){S(i);let o=d(4);
310return W(o.searchParams.location,n)||(o.searchParams.location=n),v(n)}),b("onChange",function(){S(i);let n=d(4);return v(n.applyFilters())}),e(9,` 311 `),l(),e(10,` 312 `),l(),e(11,` 313 `),l(),e(12,` 314 `)}if(r&2){let i=d(4);s(8),x("autofocusFilter",!0),N("ngModel",i.searchParams.location),x("options",i.locations)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} items selected")}}function zo(r,c){if(r&1){let i=P();e(0,` 315 `),a(1,"div",27),e(2,` 316 `),a(3,"div",28),e(4,"Day"),l(),e(5,` 317 `),a(6,"p-multiSelect",31),G("ngModelChange",function(n){S(i);let o=d(4);return W(o.searchParams.dayOfWeek,n)||(o.searchParams.dayOfWeek=n),v(n)}),b("onChange",function(){S(i);let n=d(4);return v(n.applyFilters())}),e(7,` 318 `),l(),e(8,` 319 `),l(),e(9,` 320 `)}if(r&2){let i=d(4);s(6),N("ngModel",i.searchParams.dayOfWeek),x("options",i.daysOfWeek)("maxSelectedLabels",1)("selectedItemsLabel","{0} items selected")}}function Ho(r,c){if(r&1){let i=P();e(0,` 321 `),a(1,"div",27),e(2,` 322 `),a(3,"div",28),e(4,"Times"),l(),e(5,` 323 `),a(6,"p-multiSelect",31),G("ngModelChange",function(n){S(i);let o=d(4);return W(o.searchParams.dayOfWeek,n)||(o.searchParams.dayOfWeek=n),v(n)}),b("onChange",function(){S(i);let n=d(4);return v(n.applyFilters())}),e(7,` 324 `),l(),e(8,` 325 `),l(),e(9,` 326 `)}if(r&2){let i=d(4);s(6),N("ngModel",i.searchParams.dayOfWeek),x("options",i.times)("maxSelectedLabels",1)("selectedItemsLabel","{0} items selected")}}function qo(r,c){if(r&1){let i=P();e(0,` 327 `),a(1,"div",27),e(2,` 328 `),a(3,"div",28),e(4,"Season"),l(),e(5,` 329 `),a(6,"p-multiSelect",31),G("ngModelChange",function(n){S(i);let o=d(4);return W(o.searchParams.seasonIDs,n)||(o.searchParams.seasonIDs=n),v(n)}),b("onChange",function(){S(i);let n=d(4);return v(n.applyFilters())}),e(7,` 330 `),l(),e(8,` 331 `),l(),e(9,` 332 `)}if(r&2){let i=d(4);s(6),N("ngModel",i.searchParams.seasonIDs),x("options",i.seasons)("maxSelectedLabels",1)("selectedItemsLabel","{0} items selected")}}function Qo(r,c){if(r&1){let i=P();e(0,` 333 `),a(1,"div",27),e(2,` 334 `),a(3,"div",28),e(4),l(),e(5,` 335 `),a(6,"p-multiSelect",32),G("ngModelChange",function(n){S(i);let o=d(4);return W(o.searchParams.ageClass,n)||(o.searchParams.ageClass=n),v(n)}),b("onChange",function(){S(i);let n=d(4);return v(n.applyFilters())}),e(7,` 336 `),l(),e(8,` 337 `),l(),e(9,` 338 `)}if(r&2){let i=d(4);s(4),D(` 339 `,i.fieldName(i.FieldOption.AGE_CLASS)),s(2),N("ngModel",i.searchParams.ageClass),x("options",i.ageClasses)("maxSelectedLabels",1)("selectedItemsLabel","{0} items selected")}}function Ko(r,c){if(r&1){let i=P();e(0,` 340 `),a(1,"div",27),e(2,` 341 `),a(3,"div",28),e(4,"Training Focus"),l(),e(5,` 342 `),a(6,"p-multiSelect",32),G("ngModelChange",function(n){S(i);let o=d(4);return W(o.searchParams.trainingFocusIDs,n)||(o.searchParams.trainingFocusIDs=n),v(n)}),b("onChange",function(){S(i);let n=d(4);return v(n.applyFilters())}),e(7,` 343 `),l(),e(8,` 344 `),l(),e(9,` 345 `)}if(r&2){let i=d(4);s(6),N("ngModel",i.searchParams.trainingFocusIDs),x("options",i.trainingFocuses)("maxSelectedLabels",1)("selectedItemsLabel","{0} items selected")}}function Xo(r,c){if(r&1){let i=P();e(0,` 346 `),a(1,"div",27),e(2,` 347 `),a(3,"div",28),e(4,"Birth Year"),l(),e(5,` 348 `),a(6,"p-inputgroup"),e(7,` 349 `),a(8,"p-datepicker",33),G("ngModelChange",function(n){S(i);let o=d(4);return W(o.searchParams.birthYear,n)||(o.searchParams.birthYear=n),v(n)}),e(9,`
350 `),l(),e(10,` 351 `),a(11,"p-inputgroup-addon"),e(12,` 352 `),a(13,"button",34),b("click",function(){S(i);let n=d(4);return n.searchParams.birthYear=null,v(n.applyFilters())}),e(14,` 353 `),T(15,"i",35),e(16,` 354 `),l(),e(17,` 355 `),l(),e(18,` 356 `),l(),e(19,` 357 `),l(),e(20,` 358 `)}if(r&2){let i=d(4);s(8),N("ngModel",i.searchParams.birthYear),s(5),x("disabled",!i.searchParams.birthYear)}}function Jo(r,c){if(r&1){let i=P();e(0,` 359 `),a(1,"div",27),e(2,` 360 `),a(3,"div",28),e(4,"Gender"),l(),e(5,` 361 `),a(6,"p-select",36),G("ngModelChange",function(n){S(i);let o=d(4);return W(o.searchParams.genderID,n)||(o.searchParams.genderID=n),v(n)}),b("onChange",function(){S(i);let n=d(4);return v(n.applyFilters())}),e(7,` 362 `),l(),e(8,` 363 `),l(),e(9,` 364 `)}if(r&2){let i=d(4);s(6),N("ngModel",i.searchParams.genderID),x("options",i.genders)}}function Zo(r,c){if(r&1){let i=P();e(0,` 365 `),a(1,"div",27),e(2,` 366 `),a(3,"div",28),e(4,"Grade"),l(),e(5,` 367 `),a(6,"p-multiSelect",32),G("ngModelChange",function(n){S(i);let o=d(4);return W(o.searchParams.gradeID,n)||(o.searchParams.gradeID=n),v(n)}),b("onChange",function(){S(i);let n=d(4);return v(n.applyFilters())}),e(7,` 368 `),l(),e(8,` 369 `),l(),e(9,` 370 `)}if(r&2){let i=d(4);s(6),N("ngModel",i.searchParams.gradeID),x("options",i.grades)("maxSelectedLabels",1)("selectedItemsLabel","{0} items selected")}}function ea(r,c){if(r&1){let i=P();e(0,` 371 `),a(1,"div",27),e(2,` 372 `),a(3,"div",28),e(4,"Graduation Year"),l(),e(5,` 373 `),a(6,"p-inputgroup"),e(7,` 374 `),a(8,"p-datepicker",37),G("ngModelChange",function(n){S(i);let o=d(4);return W(o.searchParams.graduationYear,n)||(o.searchParams.graduationYear=n),v(n)}),b("onChange",function(){S(i);let n=d(4);return v(n.applyFilters())}),e(9,` 375 `),l(),e(10,` 376 `),a(11,"p-inputgroup-addon"),e(12,` 377 `),a(13,"button",34),b("click",function(){S(i);let n=d(4);return n.searchParams.graduationYear=null,v(n.applyFilters())}),e(14,` 378 `),T(15,"i",35),e(16,` 379 `),l(),e(17,` 380 `),l(),e(18,` 381 `),l(),e(19,` 382 `),l(),e(20,` 383 `)}if(r&2){let i=d(4);s(8),N("ngModel",i.searchParams.graduationYear),s(5),x("disabled",!i.searchParams.graduationYear)}}function ta(r,c){if(r&1){let i=P();e(0,` 384 `),a(1,"div",12),e(2,` 385 `),a(3,"div",20),e(4,"FILTERS"),l(),e(5,` 386 `),a(6,"div",21),e(7,` 387 `),a(8,"span"),e(9,"FILTERS"),l(),e(10,` 388 `),a(11,"i",22),b("click",function(){S(i);let n=d(3);return v(n.showFilters=!n.showFilters)}),l(),e(12,` 389 `),l(),e(13,` 390 `),a(14,"div",23),e(15,` 391 `),_(16,Yo,13,6),_(17,zo,10,4),_(18,Ho,10,4),_(19,qo,10,4),_(20,Qo,10,5),_(21,Ko,10,4),_(22,Xo,21,2),_(23,Jo,10,2),_(24,Zo,10,4),_(25,ea,21,2),a(26,"div",24),e(27,` 392 `),a(28,"button",25),b("click",function(){S(i);let n=d(3);return v(n.resetFilters())}),e(29,` 393 `),T(30,"i",26),e(31," Reset Filters"),l(),e(32,` 394 `),e(33,`
395 `),l(),e(34,` 396 `),l(),e(35,` 397 `),l(),e(36,` 398 `)}if(r&2){let i=d(3);s(6),$("border-bottom",i.showFilters)("pb-2",i.showFilters)("mb-3",i.showFilters),s(5),x("ngClass",Je(18,Mo,!i.showFilters,i.showFilters)),s(3),x("ngClass",Je(21,Lo,!i.showFilters,i.showFilters)),s(2),u((i.locations==null?null:i.locations.length)>1?16:-1),s(),u((i.daysOfWeek==null?null:i.daysOfWeek.length)>1?17:-1),s(),u((i.times==null?null:i.times.length)>1?18:-1),s(),u((i.seasons==null?null:i.seasons.length)>1?19:-1),s(),u((i.ageClasses==null?null:i.ageClasses.length)>1?20:-1),s(),u((i.trainingFocuses==null?null:i.trainingFocuses.length)>1?21:-1),s(),u(i.enableBirthYearFilter?22:-1),s(),u((i.genders==null?null:i.genders.length)>1?23:-1),s(),u((i.grades==null?null:i.grades.length)>1?24:-1),s(),u(i.enableGraduationYearFilter?25:-1)}}function ia(r,c){if(r&1&&(e(0,` 399 `),a(1,"div",9),e(2,` 400 `),a(3,"div",10),e(4,` 401 `),a(5,"div",11),e(6,` 402 `),e(7,` 403 `),_(8,jo,25,5),_(9,ta,37,24),l(),e(10,` 404 `),l(),e(11,` 405 `),l(),e(12,` 406 `)),r&2){let i=d(2);s(8),u(i.cartService.selectedPlayer?8:-1),s(),u(i.anyFilters?9:-1)}}function na(r,c){if(r&1){let i=P();e(0,` 407 `),a(1,"li"),e(2,` 408 `),a(3,"button",41),b("click",function(){let n=S(i).$implicit,o=d(4);return v(o.collectData(n))}),e(4),l(),e(5,` 409 `),l(),e(6,` 410 `)}if(r&2){let i=c.$implicit;s(4),le(`Enter 411 `,i.playerName,"'s ",i.yearString," School Grade")}}function ra(r,c){if(r&1&&(e(0,` 412 `),a(1,"div",38),e(2,` 413 `),a(3,"div",39),e(4,` 414 `),a(5,"em"),e(6,`Your player(s) may be eligible for more programs 415 based on their school grade.`),l(),e(7,` 416 `),l(),e(8,` 417 `),a(9,"ul",40),e(10,` 418 `),L(11,na,7,2,null,null,de),l(),e(13,` 419 `),l(),e(14,` 420 `)),r&2){let i=d(3);s(11),O(i.getMissingPlayerGradeData())}}function oa(r,c){if(r&1){let i=P();e(0,` 421 `),a(1,"li"),e(2,` 422 `),a(3,"button",41),b("click",function(){let n=S(i).$implicit,o=d(4);return v(o.collectGraduationYearData(n))}),e(4),l(),e(5,` 423 `),l(),e(6,` 424 `)}if(r&2){let i=c.$implicit;s(4),D("Enter ",i.playerName,`'s 425 Graduation Year`)}}function aa(r,c){if(r&1&&(e(0,` 426 `),a(1,"div",38),e(2,` 427 `),a(3,"div",39),e(4,` 428 `),a(5,"em"),e(6,`Your player(s) may be eligible for more programs 429 based on their graduation year.`),l(),e(7,` 430 `),l(),e(8,` 431 `),a(9,"ul",40),e(10,` 432 `),L(11,oa,7,1,null,null,de),l(),e(13,` 433 `),l(),e(14,` 434 `)),r&2){let i=d(3);s(11),O(i.getMissingPlayerGraduationYearData())}}function la(r,c){if(r&1&&(e(0,` 435 `),a(1,"div"),e(2,` 436 `),_(3,ra,15,0),_(4,aa,15,0),l(),e(5,` 437 `)),r&2){let i=d(2);s(3),u(i.haveMissingPlayerGradeData()?3:-1),s(),u(i.haveMissingPlayerGraduationYearData()?4:-1)}}function sa(r,c){r&1&&(e(0,` 438 `),T(1,"i",52),e(2,` 439 `))}function ca(r,c){if(r&1&&(e(0),B(1,"date")),r&2){let i=d(2).registration;D(` 440 \u2013 `,q(1,1,i.sessionOverrideEndDate,"MM/dd/yyyy"),` 441 `)}}function ma(r,c){r&1&&(e(0,` 442 `),a(1,"span"),e(2,"\u2022"),l(),e(3,` 443 `))}function da(r,c){if(r&1&&(e(0,` 444 `),_(1,ma,4,0),a(2,"span"),e(3),B(4,"date"),l(),e(5,` 445 `)),r&2){let i=d(2).registration;s(),u(i.sessionOverrideStartDate?1:-1),s(2),D("Register by ",q(4,2,i.endDate,"MM/dd
445/y"))}}function pa(r,c){if(r&1&&(e(0,` 446 `),X(1),e(2),B(3,"date"),_(4,ca,2,4),J(),e(5,` 447 `),_(6,da,6,5)),r&2){let i=d().registration;s(2),D(` 448 `,q(3,3,i.sessionOverrideStartDate,"MM/dd/yyyy"),` 449 `),s(2),u(i.sessionOverrideEndDate?4:-1),s(2),u(i.endDate?6:-1)}}function ga(r,c){r&1&&e(0,` 450 , 451 `)}function _a(r,c){if(r&1&&(e(0),_(1,ga,1,0)),r&2){let i=c.$implicit,t=c.$index,n=c.$count,o=d(8);D(` 452 `,o.getDayOfWeek(i),` 453 `),s(),u(t!==n-1?1:-1)}}function ua(r,c){if(r&1&&(e(0,` 454 `),a(1,"span"),e(2,` 455 `),L(3,_a,2,2,null,null,de),l(),e(5,` 456 `)),r&2){let i=d(3).registration;s(3),O(i.daysOfWeek)}}function ha(r,c){if(r&1&&e(0),r&2){let i=d(4).registration,t=d(4);D(` 457 - `,t.formatTime(i.endTime),` 458 `)}}function Ca(r,c){if(r&1&&(e(0,` 459 `),a(1,"span",57),e(2),_(3,ha,1,1),l(),e(4,` 460 `)),r&2){let i=d(3).registration,t=d(4);s(2),D(` \u2022 461 `,t.formatTime(i.startTime),` 462 `),s(),u(i.endTime?3:-1)}}function xa(r,c){if(r&1&&(e(0,` 463 `),a(1,"div",54),e(2,` 464 `),a(3,"div",55),e(4,` 465 `),T(5,"i",56),e(6,` 466 `),l(),e(7,` 467 `),a(8,"div"),e(9,` 468 `),_(10,ua,6,0),_(11,Ca,5,2),l(),e(12,` 469 `),l(),e(13,` 470 `)),r&2){let i=d(2).registration;s(10),u(i.daysOfWeek!=null&&i.daysOfWeek.length?10:-1),s(),u(i.startTime?11:-1)}}function fa(r,c){if(r&1&&(e(0,` 471 `),X(1,58),e(2,` 472 `),a(3,"a",60),e(4),l(),e(5,` 473 `),J(),e(6,` 474 `)),r&2){let i=d(3).registration;s(3),x("href",Bi("http://www.google.com/maps/place/",i.practiceFacility.latitude,",",i.practiceFacility.longitude),ht),s(),D(` 475 `,i.practiceFacility.name,` 476 `)}}function Sa(r,c){if(r&1&&(e(0,` 477 `),a(1,"span"),e(2),l(),e(3,` 478 `)),r&2){let i=d(3).registration;s(2),w(i.location)}}function va(r,c){if(r&1&&(e(0,` 479 `),a(1,"div",58),e(2,` 480 `),a(3,"div",55),e(4,` 481 `),T(5,"i",59),e(6,` 482 `),l(),e(7,` 483 `),_(8,fa,7,4),_(9,Sa,4,1),l(),e(10,` 484 `)),r&2){let i=d(2).registration;s(8),u(i.practiceFacility!=null&&i.practiceFacility.latitude?8:-1),s(),u(i.practiceFacility!=null&&i.practiceFacility.latitude?-1:9)}}function ya(r,c){if(r&1&&(e(0,` 485 `),a(1,"div",53),e(2,` 486 `),_(3,xa,14,2),_(4,va,11,2),l(),e(5,` 487 `)),r&2){let i=d().registration;s(3),u(i.daysOfWeek!=null&&i.daysOfWeek.length||i.startTime?3:-1),s(),u(i.location?4:-1)}}function ba(r,c){r&1&&(e(0,` 488 `),a(1,"span"),e(2,","),l(),e(3,` 489 `))}function Pa(r,c){if(r&1&&(e(0,` 490 `),a(1,"span"),e(2),_(3,ba,4,0),l(),e(4,` 491 `)),r&2){let i=c.$implicit,t=c.$index,n=c.$count;s(2),D(` 492 `,i.description,` 493 `),s(),u(t!==n-1?3:-1)}}function Ia(r,c){if(r&1&&(e(0,` 494 Grades: 495 `),L(1,Pa,5,2,null,null,de),e(3,`; 496 `)),r&2){let i=d(2).registration;s(),O(i.grades)}}function Ta(r,c){if(r&1&&(e(0,` 497 Age: `),a(1,"span"),e(2),l(),e(3,`; 498 `)),r&2){let i=d(2).registration,t=d(4);s(2),w(t.getAgeRange(i.birthDateFrom,i.birthDateTo))}}function Da(r,c){r&1&&(e(0,` 499 `),a(1,"span"),e(2,","),l(),e(3,` 500 `))}function wa(r,c){if(r&1&&(e(0,` 501 `),a(1,"span"),e(2),_(3,Da,4,0),l(),e(4,` 502 `)),r&2){let i=c.$implicit,t=c.$index,n=c.$count;s(2),D(` 503 `,i.description,` 504 `),s(),u(t!==n-1?3:-1)}}function Ea(r,c){if(r&1&&(e(0,` 505 Age class: 506 `),L(1,wa,5,2,null,null,de),e(3,`; 507 `)),r&2){let i=d(2).registration;s(),O(i.ageClasses)}}function Ra(r,c){if(r&1&&(e(0,` 508 Graduation year: `),a(1,"span"),e(2),l(),e(3,`; 509 `)),r&2){let i=d(2).registration;s(2),le("",i.graduationYearFrom," - ",i.graduationYearTo)}}function ka(r,c){if(r&1&&(e(0,` 510 `),a(1,"div",61),e(2,` 511 `),a(3,"div",55),e(4,` 512 `),T(5,"i",62),e(6,`
513 `),l(),e(7,` 514 `),a(8,"span"),e(9,` 515 `),_(10,Ia,4,0),_(11,Ta,4,1),_(12,Ea,4,0),_(13,Ra,4,2),e(14,` 516 Gender: `),a(15,"span"),e(16),l(),e(17,` 517 `),l(),e(18,` 518 `),l(),e(19,` 519 `)),r&2){let i=d().registration;s(10),u(i.grades!=null&&i.grades.length?10:-1),s(),u(i.birthDateFrom&&i.birthDateTo?11:-1),s(),u(i.ageClasses!=null&&i.ageClasses.length?12:-1),s(),u(i.graduationYearFrom&&i.graduationYearTo?13:-1),s(3),w(i.gender||"All")}}function Aa(r,c){if(r&1&&(e(0,` 520 `),a(1,"div",63),e(2,` 521 `),T(3,"app-training-focus-pills",64),e(4,` 522 `),l(),e(5,` 523 `)),r&2){let i=d().registration;s(3),x("focuses",i.trainingFocuses)}}function Fa(r,c){if(r&1&&(e(0,` 524 `),T(1,"div",65),e(2,` 525 `)),r&2){let i=d().registration;s(),x("innerHTML",i.description,Qe)}}function Ba(r,c){if(r&1&&(e(0,` 526 `),a(1,"p-accordion",66),e(2,` 527 `),a(3,"p-accordion-panel",67),e(4,` 528 `),a(5,"p-accordion-header"),e(6,` 529 `),a(7,"span",68),e(8,`More 530 Details`),l(),e(9,` 531 `),l(),e(10,` 532 `),a(11,"p-accordion-content"),e(12,` 533 `),T(13,"div",69),e(14,` 534 `),l(),e(15,` 535 `),l(),e(16,` 536 `),l(),e(17,` 537 `)),r&2){let i=d().registration;s(13),x("innerHTML",i.details,Qe)}}function Ma(r,c){if(r&1&&(e(0,` 538 `),a(1,"span"),e(2),B(3,"date"),l(),e(4,` 539 `)),r&2){let i=d(2).registration;s(2),D(` 540 until `,q(3,1,i.endDate,"MM/dd/yyyy"),` 541 `)}}function La(r,c){if(r&1&&(e(0,` 542 `),a(1,"div",70),e(2,` 543 `),a(3,"span"),e(4),l(),e(5,` 544 `),_(6,Ma,5,4),l(),e(7,` 545 `)),r&2){let i=d().registration,t=d(4);s(4),le(` 546 `,i.numberOfSessions??"Unlimited"," time slots ",i.registrationCostTypeID===t.RegistrationCostType.SUBSCRIPTION?"every month":"",` 547 `),s(2),u(i.registrationCostTypeID===t.RegistrationCostType.UNLIMITED&&i.endDate?6:-1)}}function Oa(r,c){if(r&1&&(e(0,` 548 `),a(1,"div",13),e(2,` 549 `),a(3,"strong"),e(4),B(5,"sprocketCurrency"),l(),e(6,` 550 `),l(),e(7,` 551 `)),r&2){let i=d().registration;s(4),w(ce(5,1,i.price))}}function Va(r,c){if(r&1&&(e(0),B(1,"sprocketCurrency")),r&2){let i=d().$implicit;D(` 552 `,ce(1,1,i.value),` 553 `)}}function Ua(r,c){if(r&1&&e(0),r&2){let i=d().$implicit;D(` 554 `,i.value,`% off 555 `)}}function $a(r,c){if(r&1&&(e(0,` 556 `),a(1,"div",72),e(2,` 557 `),a(3,"span",73),e(4),l(),e(5,` 558 `),a(6,"span",74),e(7,` 559 `),_(8,Va,2,3),_(9,Ua,1,1),l(),e(10,`
560 `),l(),e(11,` 561 `)),r&2){let i=c.$implicit,t=c.$index,n=c.$count,o=d(6);s(),x("ngClass",ke(4,Oo,t!==n-1)),s(3),w(i.name),s(4),u(i.clubCreditTypeID===o.ClubCreditType.FIXED_AMOUNT?8:-1),s(),u(i.clubCreditTypeID===o.ClubCreditType.PERCENTAGE?9:-1)}}function Na(r,c){if(r&1&&(e(0,` 562 `),a(1,"div",71),e(2,` 563 `),L(3,$a,12,6,null,null,de),l(),e(5,` 564 `)),r&2){let i=d().registration;s(3),O(i.availableCredits)}}function Wa(r,c){if(r&1){let i=P();e(0,` 565 `),a(1,"div",75),e(2,` 566 `),a(3,"a",76),b("click",function(){S(i);let n=d().registration,o=d(4);return v(o.storeHighlightReg(n.registrationID))}),e(4,`Log in to 567 register`),l(),e(5,` 568 `),l(),e(6,` 569 `)}if(r&2){let i=d(5);s(3),x("href",i.getLoginUrl(),ht)}}function Ga(r,c){if(r&1&&e(0),r&2){let i=d(4).registration;D(` 570 `,i.remainingCapacity,` spot left! 571 `)}}function ja(r,c){if(r&1&&e(0),r&2){let i=d(4).registration;D(` 572 `,i.remainingCapacity,` spots left! 573 `)}}function Ya(r,c){if(r&1&&(e(0,` 574 `),a(1,"span",79),e(2,` 575 `),T(3,"i",80),e(4,` 576 `),_(5,Ga,1,1),_(6,ja,1,1),l(),e(7,` 577 `)),r&2){let i=d(3).registration;s(5),u(i.remainingCapacity===1?5:-1),s(),u(i.remainingCapacity>1?6:-1)}}function za(r,c){if(r&1&&e(0),r&2){let i=d(6).registration;D(` 578 `,i.remainingAdvancedCapacity,` 579 spot left! 580 `)}}function Ha(r,c){if(r&1&&e(0),r&2){let i=d(6).registration;D(` 581 `,i.remainingAdvancedCapacity,` 582 spots left! 583 `)}}function qa(r,c){if(r&1&&(e(0,` 584 `),a(1,"span",79),e(2,` 585 `),T(3,"i",80),e(4,` 586 `),_(5,za,1,1),_(6,Ha,1,1),l(),e(7,` 587 `)),r&2){let i=d(5).registration;s(5),u(i.remainingAdvancedCapacity===1?5:-1),s(),u(i.remainingAdvancedCapacity>1?6:-1)}}function Qa(r,c){if(r&1&&(e(0,` 588 `),_(1,qa,8,2)),r&2){let i=d(4).registration;s(),u(i.showAdvancedCapacityMessage?1:-1)}}function Ka(r,c){if(r&1&&(e(0,` 589 `),_(1,Qa,2,1),e(2,` 590 `)),r&2){let i,t=d(3).registration,n=d(4);s(),u((i=t.registrationAdvancedCapacityOptionID)===n.RegistrationAdvancedCapacityOption.GENDER_BIRTHYEAR?1:-1)}}function Xa(r,c){if(r&1&&(e(0,` 591 `),_(1,Ya,8,2)(2,Ka,3,1)),r&2){let i=d(2).registration;s(),u(i.showMaxCapacityMessage?1:2)}}function Ja(r,c){r&1&&(e(0,` 592 `),a(1,"span",81),e(2,` 593 `),T(3,"i",80),e(4,` 594 Registration full 595 `),l(),e(5,` 596 `))}function Za(r,c){if(r&1&&(e(0,` 597 `),a(1,"app-pill",82),e(2,` 598 `),l(),e(3,` 599 `)),r&2){let i=d(6);s(),x("pTooltip",i.cartService.selectedPlayer.user.firstName+" is ineligible for this program due to other selections")}}function el(r,c){if(r&1){let i=P();e(0,` 600 `),a(1,"button",83),b("click",function(){S(i);let n=d(2).registration,o=d(4);return v(o.registerNow(n))}),e(2,` 601 `),T(3,"i",84),e(4,` 602 Register Now
603 `),l(),e(5,` 604 `)}}function tl(r,c){if(r&1){let i=P();e(0,` 605 `),a(1,"button",85),b("click",function(){S(i);let n=d(2).registration,o=d(4);return v(o.addToCart(n))}),e(2,` 606 `),T(3,"i",86),e(4),l(),e(5,` 607 `)}if(r&2){d(2);let i=di(3);s(),x("ngClass",i?"btn-secondary":"btn-primary")("disabled",i),s(2),x("ngClass",i?"pi-check":"pi-shopping-cart"),s(),D(` 608 `,i?"Added":"Add to Cart",` 609 `)}}function il(r,c){r&1&&e(0,` 610 Add to Waitlist 611 `)}function nl(r,c){r&1&&e(0,` 612 Adding to Waitlist... 613 `)}function rl(r,c){if(r&1){let i=P();e(0,` 614 `),a(1,"button",87),b("click",function(){S(i);let n=d(2).registration,o=d(4);return v(o.addToWaitlist(n))}),e(2,` 615 `),T(3,"i",88),e(4,` 616 `),_(5,il,1,0),_(6,nl,1,0),l(),e(7,` 617 `)}if(r&2){let i=d(6);s(),x("disabled",i.savingWaitlist),s(4),u(i.savingWaitlist?-1:5),s(),u(i.savingWaitlist?6:-1)}}function ol(r,c){r&1&&e(0,` 618 Remove from Waitlist 619 `)}function al(r,c){r&1&&e(0,` 620 Removing from Waitlist... 621 `)}function ll(r,c){if(r&1){let i=P();e(0,` 622 `),a(1,"button",89),b("click",function(){S(i);let n=d(2).registration,o=d(4);return v(o.confirmRemoveFromWaitlist(n))}),e(2,` 623 `),T(3,"i",90),e(4,` 624 `),_(5,ol,1,0),_(6,al,1,0),l(),e(7,` 625 `)}if(r&2){let i=d(6);s(),x("disabled",i.savingWaitlist),s(4),u(i.savingWaitlist?-1:5),s(),u(i.savingWaitlist?6:-1)}}function sl(r,c){if(r&1&&(e(0,` 626 `),a(1,"div",77),e(2,` 627 `),a(3,"div"),e(4,` 628 `),_(5,Xa,3,1),_(6,Ja,6,0),a(7,"div",78),e(8,` 629 `),_(9,Za,4,1),_(10,el,6,0),_(11,tl,6,4),_(12,rl,8,3),_(13,ll,8,3),l(),e(14,` 630 `),l(),e(15,` 631 `),l(),e(16,` 632 `)),r&2){let i=d().registration,t=di(1);s(5),u(!i.isCapacityFull&&!i.isAdvancedCapacityFull?5:-1),s(),u(i.isCapacityFull||i.isAdvancedCapacityFull?6:-1),s(3),u(t?-1:9),s(),u(!i.isCapacityFull&&!i.isAdvancedCapacityFull&&!i.isPlayerRegistration?10:-1),s(),u(t&&!i.isCapacityFull&&!i.isAdvancedCapacityFull&&i.isPlayerRegistration?11:-1),s(),u(t&&(i.isCapacityFull||i.isAdvancedCapacityFull)&&i.enableWaitlist&&!i.registrationWaitlistID?12:-1),s(),u(t&&i.registrationWaitlistID?13:-1)}}function cl(r,c){r&1&&ie(0)}function ml(r,c){if(r&1&&(e(0,` 633 `),M(1,cl,1,0,"ng-container",95),e(2,` 634 `)),r&2){let i=c.$implicit;d(3);let t=te(2);s(),x("ngTemplateOutlet",t)("ngTemplateOutletContext",ke(2,Vo,i))}}function dl(r,c){if(r&1&&(e(0,` 635 `),a(1,"div",91),e(2,` 636 `),a(3,"p-accordion",92),e(4,` 637 `),a(5,"p-accordion-panel",93),e(6,` 638 `),a(7,"p-accordion-header"),e(8,` 639 `),a(9,"span",68),e(10,"Drop-In Sessions"),l(
639),e(11,` 640 `),l(),e(12,` 641 `),a(13,"p-accordion-content"),e(14,` 642 `),a(15,"div",94),e(16,` 643 `),L(17,ml,3,4,null,null,Ii),l(),e(19,` 644 `),l(),e(20,` 645 `),l(),e(21,` 646 `),l(),e(22,` 647 `),l(),e(23,` 648 `)),r&2){let i=d().registration;s(3),x("multiple",!1),s(14),O(i.childRegistrations)}}function pl(r,c){if(r&1&&(e(0,` 649 `),ci(1),e(2,` 650 `),ci(3),e(4,` 651 `),a(5,"div",44),e(6,` 652 `),a(7,"div",45),e(8,` 653 `),a(9,"div",46),e(10,` 654 `),a(11,"div",47),e(12,` 655 `),_(13,sa,3,0),e(14),l(),e(15,` 656 `),e(16,` 657 `),a(17,"div",48),e(18,` 658 `),_(19,pa,7,6),l(),e(20,` 659 `),a(21,"div",49),e(22,` 660 `),a(23,"div"),e(24,` 661 `),_(25,ya,6,2),_(26,ka,20,5),_(27,Aa,6,1),l(),e(28,` 662 `),_(29,Fa,3,1),_(30,Ba,18,1),l(),e(31,` 663 `),l(),e(32,` 664 665 `),a(33,"div",50),e(34,` 666 `),a(35,"div"),e(36,` 667 `),a(37,"div",51),e(38,` 668 `),_(39,La,8,3),_(40,Oa,8,3),l(),e(41,` 669 `),_(42,Na,6,0),l(),e(43,` 670 `),a(44,"div"),e(45,` 671 `),_(46,Wa,7,1),_(47,sl,17,7),l(),e(48,` 672 `),l(),e(49,` 673 `),l(),e(50,` 674 `),e(51,` 675 `),e(52,` 676 `),_(53,dl,24,1),l(),e(54,` 677 `)),r&2){let i=c.registration,t=c.program,n=c.isBundle,o=d(4);s(),mi(o.isEligible(i.registrationID)),s(2),mi(o.isInCart(i)),s(2),x("id","registration-"+i.registrationID),s(8),u(n?13:-1),s(),D(` 678 `,i.name,` 679 `),s(5),u(i.sessionOverrideStartDate?19:-1),s(6),u(i.daysOfWeek!=null&&i.daysOfWeek.length||i.startTime||i.location?25:-1),s(),u(i.grades!=null&&i.grades.length||i.birthDateFrom&&i.birthDateTo||i.ageClasses!=null&&i.ageClasses.length||i.graduationYearFrom&&i.graduationYearTo||i.gender?26:-1),s(),u(i.trainingFocuses!=null&&i.trainingFocuses.length?27:-1),s(2),u(i.description?29:-1),s(),u(i.details?30:-1),s(9),u(o.paidV2Enabled&&(t==null?null:t.programTypeID)===o.programType.TRAINING_SESSIONS?39:-1),s(),u(i.price?40:-1),s(2),u(i.availableCredits!=null&&i.availableCredits.length&&(!o.paidV2Enabled||(t==null?null:t.programTypeID)!==o.programType.TRAINING_SESSIONS)?42:-1),s(4),u(o.isAuthenticated?-1:46),s(),u(o.isAuthenticated?47:-1),s(6),u((i.childRegistrations==null?null:i.childRegistrations.length)>0?53:-1)}}function gl(r,c){if(r&1&&(e(0,` 680 `),T(1,"img",102),e(2,` 681 `)),r&2){let i=d(2).$implicit;s(),x("src",i.program.image,ht)}}function _l(r,c){if(r&1&&(e(0,` 682 `),a(1,"div",63),e(2,` 683 `),a(3,"span",103),e(4,` 684 `),a(5,"span",104),e(6,"Register by:"),l(),e(7),l(),e(8,` 685 `),l(),e(9,` 686 `)),r&2){let i=d(2).$implicit,t=d(4);s(7),D(` 687 `,t.formatDate(i.program.eligibilityEndDate),` 688 `)}}function ul(r,c){if(r&1&&(e(0,` 689 `),a(1,"a",106),e(2),l(),e(3,` 690 `)),r&2){let i=d(3).$implicit;s(),x("href",i.program.linkURL,ht)("target",i.program.openLinkInNewTab?"_blank":"_self"),s(),D(` 691 `,i.program.buttonText||"Info",` 692 `)}}function hl(r,c){if(r&1&&(e(0,` 693 `),a(1,"app-page-link",107),e(2,`
694 `),l(),e(3,` 695 `)),r&2){let i=d(3).$implicit;s(),x("title",i.program.buttonText||"Info")("customURL",i.program.pageBuilderPageID.toString())("openLinkInNewTab",i.program.openLinkInNewTab)}}function Cl(r,c){if(r&1&&(e(0,` 696 `),a(1,"div",105),e(2,` 697 `),_(3,ul,4,3),_(4,hl,4,3),l(),e(5,` 698 `)),r&2){let i=d(2).$implicit;s(3),u(i.program.linkURL?3:-1),s(),u(i.program.pageBuilderPageID?4:-1)}}function xl(r,c){r&1&&(e(0,` 699 `),T(1,"hr"),e(2,` 700 `))}function fl(r,c){if(r&1&&(e(0,` 701 `),a(1,"section",101),e(2,` 702 `),_(3,gl,3,1),_(4,_l,10,1),_(5,Cl,6,2),_(6,xl,3,0),l(),e(7,` 703 `)),r&2){let i=d().$implicit;s(3),u(i.program.image?3:-1),s(),u(i.program.eligibilityEndDate?4:-1),s(),u(i.program.linkURL||i.program.pageBuilderPageID?5:-1),s(),u(i.program.image||i.program.eligibilityEndDate||i.program.linkURL||i.program.pageBuilderPageID?6:-1)}}function Sl(r,c){if(r&1&&(e(0,` 704 `),a(1,"div",108),e(2,` 705 `),a(3,"div",109),e(4,` 706 `),l(),e(5,` 707 `),l(),e(6,` 708 `)),r&2){let i=d().$implicit;s(),$("mt-3",!(i.program.image||i.program.eligibilityEndDate||i.program.linkURL||i.program.pageBuilderPageID)),s(2),x("innerHTML",i.program.detailText,Qe)}}function vl(r,c){r&1&&ie(0)}function yl(r,c){if(r&1&&(e(0,` 709 `),M(1,vl,1,0,"ng-container",95),e(2,` 710 `),e(3,` 711 `)),r&2){let i=c.$implicit,t=d(3).$implicit;d();let n=te(2);s(),x("ngTemplateOutlet",n)("ngTemplateOutletContext",Je(2,Uo,i,t.program))}}function bl(r,c){if(r&1&&(e(0,` 712 `),a(1,"p-accordion-panel",111),e(2,` 713 `),a(3,"p-accordion-header"),e(4,` 714 `),a(5,"h4",112),e(6),l(),e(7,` 715 `),l(),e(8,` 716 `),a(9,"p-accordion-content",99),e(10,` 717 `),a(11,"div",113),e(12,` 718 `),L(13,yl,4,5,null,null,Ii),l(),e(15,` 719 `),l(),e(16,` 720 `),l(),e(17,` 721 `)),r&2){let i=c.$implicit,t=c.$index;s(),x("value",t),s(5),w(i.groupName),s(7),O(i.registrations)}}function Pl(r,c){if(r&1){let i=P();e(0,` 722 `),a(1,"p-accordion",110),G("valueChange",function(n){S(i);let o=d().$implicit,m=d(4);return W(m.openRegistrationGroupPanelIndexes[o.program.programID],n)||(m.openRegistrationGroupPanelIndexes[o.program.programID]=n),v(n)}),e(2,` 723 `),L(3,bl,18,2,null,null,Wo),l(),e(5,` 724 `)}if(r&2){let i=d().$implicit,t=d(4);s(),x("multiple",!0),N("value",t.openRegistrationGroupPanelIndexes[i.program.programID]),s(2),O(i.registrationGroups)}}function Il(r,c){r&1&&(e(0,` 725 `),a(1,"div",116),e(2,"Available Time Slot Groups"),l(),e(3,` 726 `))}function Tl(r,c){if(r&1&&(e(0),B(1,"date")),r&2){let i=d(3).$implicit;D(` 727 \u2013 `,q(1,1,i.endDate,"MM/dd/yyyy"),` 728 `)}}function Dl(r,c){if(r&1&&(e(0,` 729 `),a(1,"div",48),e(2),B(3,"date"),_(4,Tl,2,4),l(),e(5,` 730 `)),r&2){let i=d(2).$implicit;s(2),D(` 731 `,q(3,2,i.startDate,"MM/dd
731/yyyy"),` 732 `),s(2),u(i.endDate?4:-1)}}function wl(r,c){if(r&1&&(e(0,` 733 `),a(1,"div",120),e(2),l(),e(3,` 734 `)),r&2){let i=d(2).$implicit;s(2),w(i.scheduleSignUpDescription)}}function El(r,c){if(r&1&&(e(0),B(1,"sprocketCurrency")),r&2){let i=d(3).$implicit;D(` 735 `,ce(1,1,i.priceRange[0]),` 736 `)}}function Rl(r,c){if(r&1&&(e(0),B(1,"sprocketCurrency"),B(2,"sprocketCurrency")),r&2){let i=d(3).$implicit;le(` 737 `,ce(1,2,i.priceRange[0])," - ",ce(2,4,i.priceRange[1]),` 738 `)}}function kl(r,c){if(r&1&&(e(0,` 739 `),a(1,"div",13),e(2,` 740 `),a(3,"strong"),e(4,` 741 `),_(5,El,2,3)(6,Rl,3,6),l(),e(7,` 742 `),l(),e(8,` 743 `)),r&2){let i=d(2).$implicit;s(5),u(i.priceRange[0]===i.priceRange[1]?5:6)}}function Al(r,c){if(r&1){let i=P();e(0,` 744 `),a(1,"div",117),e(2,` 745 `),a(3,"div",45),e(4,` 746 `),a(5,"div",46),e(6,` 747 `),a(7,"div",118),e(8),l(),e(9,` 748 `),_(10,Dl,6,5),a(11,"div",49),e(12,` 749 `),_(13,wl,4,1),l(),e(14,` 750 `),l(),e(15,` 751 `),a(16,"div",50),e(17,` 752 `),a(18,"div"),e(19,` 753 `),a(20,"div",51),e(21,` 754 `),_(22,kl,9,1),l(),e(23,` 755 `),l(),e(24,` 756 `),a(25,"div",63),e(26,` 757 `),a(27,"div",78),e(28,` 758 `),a(29,"button",119),b("click",function(){S(i);let n=d().$implicit,o=d(6);return v(o.viewSchedule(n))}),e(30,` 759 `),e(31,` 760 View Schedule 761 `),l(),e(32,` 762 `),l(),e(33,` 763 `),l(),e(34,` 764 `),l(),e(35,` 765 `),l(),e(36,` 766 `),l(),e(37,` 767 `)}if(r&2){let i=d().$implicit,t=d(2).$implicit,n=d(4);s(8),w(i.name),s(2),u(i.startDate?10:-1),s(3),u(i.scheduleSignUpDescription?13:-1),s(9),u(i.priceRange&&i.priceRange.length>0&&n.showSignUpPriceRange(t)?22:-1)}}function Fl(r,c){if(r&1&&(e(0,` 768 `),_(1,Al,38,4)),r&2){let i=c.$implicit;s(),u(i.isRemoved?-1:1)}}function Bl(r,c){if(r&1){let i=P();e(0,` 769 `),a(1,"div",114),e(2,` 770 `),e(3,` 771 `),a(4,"span"),e(5,` 772 `),a(6,"button",115),b("click",function(){S(i);let n=d().$implicit,o=d(4);return v(o.viewSchedule(n))}),e(7,` 773 View Full Schedule
774 `),l(),e(8,` 775 `),l(),e(9,` 776 `),e(10,` 777 `),_(11,Il,4,0),L(12,Fl,2,1,null,null,Go),l(),e(14,` 778 `)}if(r&2){let i=d().$implicit;s(11),u(i.signUps.length>0?11:-1),s(),O(i.signUps)}}function Ml(r,c){r&1&&ie(0)}function Ll(r,c){if(r&1&&(e(0,` 779 `),e(1,` 780 `),M(2,Ml,1,0,"ng-container",95),e(3,` 781 `)),r&2){let i=d().$implicit,t=d().$implicit;d();let n=te(2),o=d(3),m=o.paidV2Enabled&&(t.program==null?null:t.program.programTypeID)===o.programType.TRAINING_SESSIONS&&i.registrationCostTypeID!==o.RegistrationCostType.VARIABLE;s(2),x("ngTemplateOutlet",n)("ngTemplateOutletContext",Mi(2,$o,i,t.program,m))}}function Ol(r,c){if(r&1&&(e(0,` 782 `),_(1,Ll,4,6)),r&2){let i=c.$implicit,t=d(5);s(),u(!t.paidV2Enabled||t.showRegistration(i)?1:-1)}}function Vl(r,c){if(r&1&&(e(0,` 783 `),a(1,"p-accordion-panel",96),e(2,` 784 `),a(3,"p-accordion-header",97),e(4,` 785 `),a(5,"span",98),e(6),l(),e(7,` 786 `),l(),e(8,` 787 `),a(9,"p-accordion-content",99),e(10,` 788 `),e(11,` 789 `),a(12,"div",100),e(13,` 790 `),e(14,` 791 `),_(15,fl,8,4),_(16,Sl,7,3),_(17,Pl,6,2),_(18,Bl,15,1),L(19,Ol,2,1,null,null,Ii),l(),e(21,` 792 `),l(),e(22,` 793 `),l(),e(23,` 794 `)),r&2){let i=c.$implicit,t=d(4);s(),x("value",i.program.programID),fe("data-testid","program-panel-"+i.program.programID),s(5),w(i.program.name),s(9),u(i.program.image||i.program.eligibilityEndDate||i.program.linkURL||i.program.pageBuilderPageID?15:-1),s(),u(i.program.detailText?16:-1),s(),u((i.registrationGroups==null?null:i.registrationGroups.length)>0?17:-1),s(),u(t.paidV2Enabled&&(i.signUps==null?null:i.signUps.length)>0?18:-1),s(),O(i.ungroupedRegistrations)}}function Ul(r,c){if(r&1){let i=P();e(0,` 795 `),M(1,pl,55,17,"ng-template",null,0,ae),e(3,` 796 `),e(4,` 797 `),a(5,"p-accordion",43),G("valueChange",function(n){S(i);let o=d(3);return W(o.openProgramPanelIDs,n)||(o.openProgramPanelIDs=n),v(n)}),e(6,` 798 `),L(7,Vl,24,7,null,null,No),l(),e(9,` 799 `)}if(r&2){let i=d(3);s(5),x("multiple",!0),N("value",i.openProgramPanelIDs),s(2),O(i.programGroups)}}function $l(r,c){r&1&&(e(0,` 800 `),a(1,"app-inline-alert",121),e(2,` 801 No programs are currently available. 802 `),l(),e(3,` 803 `)),r&2&&(s(),x("isInline",!0))}function Nl(r,c){if(r&1&&(e(0,` 804 `),a(1,"div",42),e(2,` 805 `),_(3,Ul,10,2)(4,$l,4,1),l(),e(5,` 806 `)),r&2){let i=d(2);s(3),u(i.programGroups.length>0?3:4)}}function Wl(r,c){r&1&&(e(0,` 807 `),a(1,"app-loader"),e(2,"\xA0\xA0\xA0Loading..."),l(),e(3,` 808 `))}function Gl(r,c){if(r&1&&(e(0,` 809 `),a(1,"div",8),e(2,` 810 `),e(3,` 811 `),_(4,ia,13,2),a(5,"div"),e(6,` 812 `),e(7,` 813 `),_(8,la,6,2),_(9,Nl,6,1)(10,Wl,4,0),l(),e(11,` 814 `),l(),e(12,` 815 `)),r&2){let i=d();s(4),u(i.filtersVisible?4:-1),s(),$("col-lg-9",i.filtersVisible)("col-md-8",i.filtersVisible)("col-12",!i.anyFilters&&(i.players==null?null:i.players.length)===0),s(3),u((i.players==null?null:i.players.length)>0?8:-1),s(),u(i.loading?10:9)}}function jl(r,c){if(r&1&&(e(0,` 816 `),a(1,"app-inline-alert",122),e(2),l(),e(3,` 817 `)),r&2){let i=d();s(),x("isInline",!0),s(),D(` 818 `,i.error,` 819 `)}}function Yl(r,c){if(r&1){let i=P();e(0,` 820 `),a(1,"app-add-player",123),b("cancel",function(){S(i);let n=d();return v(n.showAddPlayer=!1)})("add",function(n){S(i);let o=d();return v(o.updateOpenProgramsForGenderAndDOB(n))}),e(2,`
821 `),l(),e(3,` 822 `)}if(r&2){let i=d();s(),x("horizontalForm",!1)("allowAddPlayerLogin",!1)("player",i.player)}}function zl(r,c){r&1&&(e(0,` 823 `),a(1,"p"),e(2,`If you pick a different player, your current selections will be reset. You are 824 able to 825 register only a single player at a time.`),l(),e(3,` 826 `))}function Hl(r,c){if(r&1){let i=P();e(0,` 827 `),a(1,"div",125),b("click",function(){let n=S(i).$implicit,o=d(2);return v(o.selectPlayer(n))}),e(2,` 828 `),a(3,"div",8),e(4,` 829 `),a(5,"div",126),e(6,` 830 `),a(7,"div",127),e(8,` 831 `),a(9,"app-player-profile-photo",128),e(10,` 832 `),l(),e(11,` 833 `),l(),e(12,` 834 `),a(13,"div",129),e(14,` 835 `),a(15,"span",130),e(16),l(),e(17,` 836 `),a(18,"div",131)(19,"i"),e(20),l()(),e(21,` 837 `),l(),e(22,` 838 `),l(),e(23,` 839 `),l(),e(24,` 840 `),l(),e(25,` 841 `)}if(r&2){let i=c.$implicit,t=c.$index;s(9),x("player",i)("playerNumber",(t+1).toString())("largeCircle",!1)("initialsOnly",!1),s(7),le("",i.user.firstName,` 842 `,i.user.lastName),s(4),D("",i.inactive?"Inactive":"Active"," Player")}}function ql(r,c){if(r&1){let i=P();e(0,` 843 `),L(1,Hl,26,7,null,null,de),a(3,"button",124),b("click",function(){S(i);let n=d();return v(n.showAddPlayer=!0)}),e(4,"Add Player"),l(),e(5,` 844 `)}if(r&2){let i=d();s(),O(i.players)}}function Ql(r,c){if(r&1){let i=P();e(0,` 845 `),a(1,"app-null-card",132),b("buttonClicked",function(){S(i);let n=d();return v(n.showAddPlayer=!0)}),e(2,` 846 `),l(),e(3,` 847 `)}if(r&2){let i=d();s(),x("image",i.ImageType.PLAYER)("showButton",!0)("showCard",!1)}}function Kl(r,c){r&1&&(e(0,` 848 `),a(1,"div",133),e(2,` 849 `),a(3,"div",134),e(4,` 850 Selecting this program will make the following program(s) ineligible: 851 `),l(),e(5,` 852 `),l(),e(6,` 853 `))}function Xl(r,c){if(r&1&&(e(0,` 854 `),a(1,"li"),e(2),l(),e(3,` 855 `)),r&2){let i=c.$implicit;s(2),D(` 856 `,i.registration.name,` 857 `)}}function Jl(r,c){if(r&1&&(e(0,` 858 `),a(1,"div",133),e(2,` 859 `),a(3,"div",134),e(4,` 860 `),a(5,"ul"),e(6,` 861 `),L(7,Xl,4,1,null,null,de),l(),e(9,` 862 `),l(),e(10,` 863 `),l(),e(11,` 864 `)),r&2){let i=d();s(7),O(i.exclusionsAndOverlaps)}}function Zl(r,c){if(r&1){let i=P();e(0,` 865 `),a(1,"app-dialog-footer"),e(2,` 866 `),X(3,135),e(4,` 867 `),a(5,"button",136),b("click",function(){S(i);let n=d();return v(n.showExclusionOverlapDialog=!1)}),e(6,"Cancel"),l(),e(7,` 868 `),J(),e(8,` 869 `),X(9,137),e(10,` 870 `),a(11,"button",138),b("click",function(){S(i);let n=d();return v(n.handleRegistrationClick())}),e(12,"Continue"),l(),e(13,` 871 `),J(),e(14,` 872 `),l(),e(15,` 873 `)}}function es(r,c){if(r&1){let i=P();e(0,` 874 `),a(1,"app-dynamic-form",139),b("onSubmit",function(n){S(i);let o=d();return v(o.updateOpenProgramsForGraduationYear(n))})("onCancel",function(){S(i);let n=d();return v(n.showPlayerGraduationYearModal=!1)}),e(2,` 875 `),T(3,"app-dynamic-form-field",140),e(4,` 876 `),l(),e(5,` 877 `)}if(r&2){let i=d();s(),x("fields",i.editFields)("entity",i.selectedPlayerClubData)("contentFieldsMode",!0)("horizontalForm",!0)("showCancelButton",!0)("showSubmitButton",!0)("buttonsPosition","left")}}function ts(r,c){if(r&1){let i=P();e(0,` 878`),a(1,"app-player-yearly-club-data",141),b("saved",function(n){S(i);let o=d();return v(o.updateOpenProgramsForGrade(n))})("cancelled",function(){S(i);let n=d();return v(n.showPlayerYearlyDataModal=!1)}),l(),e(2,` 879`)}if(r&2){let i=d();s(),x("player",i.selectedPlayer)("collectDataOnly",!0)("year",i.missingData.year)("editPlayerYearlyFieldType",i.editPlayerYearlyFieldType)}}function is(r,c){if(r&1){let i=P();e(0,` 880`),a(1,"app-yes-no-modal",142),b("onNoSelect",function(){S(i);let n=d();return v(n.showPlayerRegistrationCartWarning=!1)})("onYesSelect",function(){S(i);let n=d();return v(n.confirmRegisterNow())}),e(2,` 881 `),a(3,"div",143),e(4,` 882 `),T(5,"i",144),e(6,` 883 `),a(7,"strong"),e(8,"Team registrations require a separate checkout"),l(),e(9,`
884 `),l(),e(10,` 885 `),a(11,"p"),e(12,`You currently have items in your cart. Team registrations can't be purchased with other program items, so 886 you'll need to complete this registration separately.`),l(),e(13,` 887 `),a(14,"p"),e(15,`To register this team now, your current cart will be cleared. To keep your cart items, check out with them 888 first, then come back to register the team.`),l(),e(16,` 889`),l(),e(17,` 890`)}r&2&&(s(),x("showHeader",!0)("showModalText",!1))}function ns(r,c){if(r&1&&(e(0,` 891 `),a(1,"div",148),e(2),l(),e(3,` 892 `)),r&2){let i=d(2);s(2),le(` 893 Are you sure you want to remove `,i.cartService.selectedPlayer.user.firstName,` from the waitlist for 894 `,i.selectedRegistrationForWaitlist.name,`? 895 `)}}function rs(r,c){if(r&1){let i=P();e(0,` 896`),a(1,"app-yes-no-modal",145),b("onNoSelect",function(){S(i);let n=d();return v(n.showRemoveWaitlistConfirm=!1)})("onYesSelect",function(){S(i);let n=d();return v(n.removeFromWaitlist())}),e(2,` 897 `),_(3,ns,4,2),a(4,"div",146),e(5,` 898 `),a(6,"app-inline-alert",147),e(7,` 899 Please note: if you remove a player from the waitlist you may be giving up the spot for another player 900 `),l(),e(8,` 901 `),l(),e(9,` 902`),l(),e(10,` 903`)}if(r&2){let i=d();s(),x("showHeader",!0)("showModalText",!1)("loading",i.savingWaitlist),s(2),u(i.cartService.selectedPlayer&&i.selectedRegistrationForWaitlist?3:-1),s(3),x("isInline",!0)}}var oi=(()=>{let c=class c{get programGroups(){return this._programGroups}set programGroups(t){this._programGroups=t??[],this.applyDefaultExpansion()}constructor(t,n,o,m,p,g,C,h,f,y,I,k,V,H,he,Y){this.router=t,this.route=n,this.location=o,this.pageBuilderContentService=m,this.programDetailService=p,this.siteDataService=g,this.userService=C,this.authorizeService=h,this.cartService=f,this.playerService=y,this.waitlistService=I,this.scheduleSignUpService=k,this.registerService=V,this.allProgramsShellService=H,this.checkoutChainService=he,this.checkoutStatePersistenceService=Y,this.loading=!0,this.error="",this._programGroups=[],this.openProgramPanelIDs=[],this.openRegistrationGroupPanelIndexes={},this.signUpToProgramIDMap=new Map,this.allProgramGroups=[],this.allRegistrations=[],this.programs=[],this.allPrograms=[],this.categoryOptions=[],this.programTypeOptions=[],this.selectedCategoryOrType=null,this.showFilters=!1,this.pendingRegistration=null,this.programType=xt,this.RegistrationCostType=K,this.seasons=[],this.grades=[],this.locations=[],this.times=[],this.daysOfWeek=zi,this.practiceFacilities=[],this.genders=Yi,this.ageClasses=[],this.trainingFocuses=[],this.isAuthenticated=!1,this.showPickPlayer=!1,this.showAddPlayer=!1,this.savingWaitlist=!1,this.showRemoveWaitlistConfirm=!1,this.selectedRegistrationForWaitlist=null,this.showPlayerRegistrationCartWarning=!1,this.showExclusionOverlapDialog=!1,this.FieldOption=Qi,this.ClubCreditType=In,this.RegistrationAdvancedCapacityOption=hn,this.ActivitySessionType=un,this.missingPlayerData=[],this.showPlayerYearlyDataModal=!1,this.showPlayerGraduationYearModal=!1,this.editPlayerYearlyFieldType=Hi.Grade,this.searchParams={genderID:null,seasonIDs:[],dayOfWeek:[],gradeID:[],ageClass:[],trainingFocusIDs:[],location:[],birthYear:null,graduationYear:null,page:1,rows:9999,includeProgram:!0},this.unsubscribe$=new xe,this.pendingScrollRegistrationID=null,this.signUpsByProgram={},this.ownedActiveBundleRegistrationIDs=new Set,this.ImageType=pn,this.paidV2Enabled=!1;let me=this.router.getCurrentNavigation()??this.router.lastSuccessfulNavigation();me?.extras.state&&(this.allPrograms=me.extras.state.allPrograms)}ngOnInit(){return $e(this,null,function*(){this.isAuthenticated=yield He(this.authorizeService.isAuthenticated());let t=this.route.snapshot.params.programID,n=sessionStorage.getItem(c.HIGHLIGHT_REG_KEY);if(n)this.pendingScrollRegistrationID=+n,sessionStorage.removeItem(c.HIGHLIGHT_REG_KEY);else{let o=this.route.snapshot.queryParams.highlightReg;o&&(this.pendingScrollRegistrationID=+o)}Ie({programs:this.allPrograms?.length>0?U(this.allPrograms):this.pageBuilderContentService.getOpenPrograms(t?+t:void 0),players:this.isAuthenticated?this.userService.getCurrentUserPlayers(!0):U(null),fieldOptions:this.siteDataService.getClubFieldOptions(this.isAuthenticated),openProgramCategories:this.isAuthenticated?this.playerService.getOpenPrograms(!0,t?+t:void 0):U(null),privateClubDomain:this.siteDataService.getPrivateClubDomain(),paidV2Enabled:this.siteDataService.isPaidSignupsV2Enabled$(this.isAuthenticated)}).pipe(A(this.unsubscribe$)).subscribe({next:o=>{o&&(this.paidV2Enabled=o.paidV2Enabled,this.allPrograms=this.paidV2Enabled?o.programs:(o.programs||[]).filter(m=>m.programTypeID!==this.programType.TRAINING_SESSIONS),this.players=o.players,this.clubFieldOptions=o.fieldOptions,this.privateClubDomain=o.privateClubDomain,this.isAuthenticated&&this.cartService.setAllOpenProgramCategories(o.openProgramCategories),o.openProgramCategories&&this.checkForMissingPlayerData(o.openProgramCategories),this.buildDropdownOptions(),this.route.paramMap.pipe(Re(()=>
903(this.loadProgramsAndRegistrations(),U(null))),A(this.unsubscribe$)).subscribe())},error:()=>{console.error("Unable to load programs for dropdown."),this.loading=!1,this.siteDataService.hideSiteLoader(),this.siteDataService.showSiteErrorAlert("Unable to load programs. Please try again.")}})})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}showRegistration(t){return t.registrationCostTypeID!==K.VARIABLE}showSignUpPriceRange(t){return[...t.ungroupedRegistrations||[],...(t.registrationGroups||[]).flatMap(n=>n.registrations||[])].some(n=>n.registrationCostTypeID===K.VARIABLE)}loadProgramsAndRegistrations(){this.loading=!0,this.siteDataService.showSiteLoader();let t=this.route.snapshot.params.categoryID,n=this.route.snapshot.params.programTypeID,o=this.route.snapshot.params.programID;if(o)this.programs=this.allPrograms.filter(m=>m.programID===+o),this.categoryName=null,this.programTypeName=null,this.selectedCategoryOrType=null,this.loadRegistrations([+o]);else if(t){let m=this.categoryOptions.find(p=>p.value===+t);m&&(this.categoryName=m.label,this.programTypeName=null,this.selectedCategoryOrType=m.value,this.programs=m.programs),this.loadRegistrations()}else if(n){let m=this.programTypeOptions.find(p=>p.value===+n);m&&(this.programTypeName=m.label,this.categoryName=null,this.selectedCategoryOrType=m.value,this.programs=m.programs),this.loadRegistrations()}else this.loadRegistrations()}loadRegistrations(t){let n=t??[...new Set(this.programs.map(o=>o.programID))];Ie({searchFilters:this.programDetailService.getProgramSearchFilters(n),registrations:this.programDetailService.getProgramRegistrationSearch(n,this.searchParams),signUps:this.scheduleSignUpService.getScheduleSignUpsByProgram(n)}).pipe(A(this.unsubscribe$)).subscribe({next:o=>{if(o.registrations&&(o.registrations.registrations.forEach(m=>this.sortDaysOfWeek(m)),this.allRegistrations=o.registrations.registrations,this.signUpsByProgram=o.signUps||{},this.allProgramGroups=this.groupByProgram(o.registrations.programs,o.registrations.registrations,this.getProgramIDsWithSignUps()),this.stampCapacityFromEligibility(),this.assignSignUpsToPrograms(this.allProgramGroups,o.signUps),t?.length===1&&o.registrations.programs?.length>0&&(this.programName=o.registrations.programs[0].name,this.allProgramsShellService.setShellState({pageTitle:this.programName})),this.rehydrateRestoredPlayer(),this.cartService.selectedPlayer&&this.cartService.hasLoadedOpenProgramCategories()?this.loadOwnedActiveBundles(this.cartService.selectedPlayer.playerID).pipe(A(this.unsubscribe$)).subscribe({next:()=>this.filterProgramGroupsByPlayerEligibility(),error:()=>this.filterProgramGroupsByPlayerEligibility()}):this.programGroups=this.allProgramGroups,this.cartService.selectedPlayer||(this.hasPlayerRegistrationsInCurrentGroups()?this.players?.length===1?this.selectPlayer(this.players[0]):this.players?.length>1&&(this.showPickPlayer=!0):this.showPickPlayer=!1)),this.seasons=o.searchFilters.season||[],this.grades=o.searchFilters.grades||[],this.locations=o.searchFilters.locations||[],this.ageClasses=o.searchFilters.ageClasses||[],this.trainingFocuses=o.searchFilters.trainingFocuses||[],this.enableBirthYearFilter=o.searchFilters.hasBirthDateFilters,this.enableGraduationYearFilter=o.searchFilters.hasGraduationYearFilters,o.searchFilters.genders?.length||(this.genders=void 0),this.pendingScrollRegistrationID&&(this.cartService.selectedPlayer||!this.players?.length)&&this.expandToRegistration(this.pendingScrollRegistrationID),this.loading=!1,this.siteDataService.hideSiteLoader(),this.pendingScrollRegistrationID&&(this.cartService.selectedPlayer||!this.players?.length)){let m=this.pendingScrollRegistrationID;this.pendingScrollRegistrationID=null,setTimeout(()=>{let p=document.getElementById(`registration-${m}`);p&&p.scrollIntoView({behavior:"smooth",block:"center"})},500)}},error:()=>{this.error="Unable to load program registrations.",this.loading=!1,this.siteDataService.hideSiteLoader(),this.siteDataService.showSiteErrorAlert("Unable to load program registrations.")}})}
903applyFilters(){let t=this.route.snapshot.params.programID,n=t?[+t]:[...new Set(this.programs.map(o=>o.programID))];this.loading=!0,this.programDetailService.getProgramRegistrationSearch(n,this.searchParams).pipe(A(this.unsubscribe$)).subscribe({next:o=>{o&&(o.registrations.forEach(m=>this.sortDaysOfWeek(m)),this.allRegistrations=o.registrations,this.allProgramGroups=this.groupByProgram(o.programs,o.registrations,this.getProgramIDsWithSignUps()),this.assignSignUpsToPrograms(this.allProgramGroups,this.signUpsByProgram),this.cartService.selectedPlayer&&this.cartService.hasLoadedOpenProgramCategories()?this.filterProgramGroupsByPlayerEligibility():this.programGroups=this.allProgramGroups),this.loading=!1},error:()=>{this.error="Unable to load program registrations.",this.loading=!1,this.siteDataService.showSiteErrorAlert("Unable to load program registrations.")}})}resetFilters(){this.searchParams={genderID:null,seasonIDs:[],dayOfWeek:[],gradeID:[],ageClass:[],trainingFocusIDs:[],location:[],birthYear:null,graduationYear:null,page:1,rows:9999,includeProgram:!0},this.applyFilters()}hasFilters(){return this.seasons?.length>1||this.grades?.length>1||this.locations?.length>1||this.daysOfWeek?.length>1||this.genders?.length>1||this.ageClasses?.length>1||this.trainingFocuses?.length>1}get anyFilters(){return this.hasFilters()}get filtersVisible(){return this.anyFilters||(this.players?.length??0)>0}viewSchedule(t){return $e(this,null,function*(){if(!this.isAuthenticated&&(yield this.authorizeService.signIn({returnUrl:this.router.url})).status!==qi.Success)return;if(this.isProgramGroup(t)){this.navigateToProgramSchedule(t.programID);return}let n=this.signUpToProgramIDMap.get(t.scheduleSignUpID);if(!n){this.siteDataService.showSiteErrorAlert("Unable to find the selected activity.");return}this.navigateToProgramSchedule(n,t.scheduleSignUpID)})}isProgramGroup(t){return t.programID!==void 0}navigateToProgramSchedule(t,n){this.registerService.reservedSlotsSummary=[];let o=this.programGroups.find(I=>I.programID===t)||this.allProgramGroups.find(I=>I.programID===t);if(!this.cartService.selectedPlayer){this.showPickPlayer=!0,this.siteDataService.showSiteErrorAlert("Please select a player before registering.");return}if(!o){this.siteDataService.showSiteErrorAlert("Unable to start the registration flow for this program.");return}let{cartRegistrationIDs:m,registration:p,aLaCarteRegistration:g,bundleRegistrations:C}=this.resolveRegistrationForProgram(o,t);if(!p){this.siteDataService.showSiteErrorAlert("Unable to start the registration flow for this program due to missing registration.");return}let{registerRoute:h,navigationExtras:f}=this.buildRegistrationNavigation(o,t,p,n),y=o.program?.programTypeID===this.programType.TRAINING_SESSIONS;if(y&&g){this.navigateToTimeslotsHonoringALaCarteEligibility(t,g,C,h,f);return}if(y&&this.paidV2Enabled){this.cartService.switchToProgram(t),this.router.navigate(h,f).catch(()=>{this.siteDataService.showSiteErrorAlert("Unable to navigate to the schedule for this program.")});return}this.completeRegistrationSessionAndNavigate(t,p,m,h,f)}navigateToTimeslotsHonoringALaCarteEligibility(t,n,o,m,p){let g=this.cartService.selectedPlayer;if(!g?.playerID){this.siteDataService.showSiteErrorAlert("Unable to start the registration flow for this program.");return}let C=g.playerID;this.registerService.getPlayerEligibleTrainingSessionRegistrations(C).pipe(A(this.unsubscribe$)).subscribe({next:h=>{let f=Ft(h,n.registrationID);if(f){this.completeRegistrationSessionAndNavigate(t,n,[n.registrationID],m,p);return}!f&&o.length>0&&this.siteDataService.showSiteInfoAlert(`${g.user?.firstName??"This player"} can't purchase single time slots for this program, but is eligible for bundles \u2014 select a bundle on the next page. Going over its included sessions with single time slots isn't allowed.`),this.cartService.switchToProgram(t),this.router.navigate(m,p).catch(()=>{this.siteDataService.showSiteErrorAlert("Unable to navigate to the schedule for this program.")})},error:()=>{this.siteDataService.showSiteErrorAlert("Unable to start the registration flow for this program.")}})}completeRegistrationSessionAndNavigate(t,n,o,m,p){let g=F(n.registrationID)?Array.from(new Set([...o,n.registrationID])):o;this.cartService.switchToProgram(t),this.registerService.setSelectedRegistrationIDsForSessions(g),this.allProgramsShellService.updatePlayerRegistrationSessionSelections(this.cartService.selectedPlayer.playerID,n.registrationID,g).pipe(A(this.unsubscribe$)).subscribe({next:()=>{this.updateShellBreadcrumbsForRegistrationChildView(t),this.router.navigate(m,p).catch(()=>{this.siteDataService.showSiteErrorAlert("Unable to start the registration flow for this program.")})},error:()=>{this.siteDataService.showSiteErrorAlert("Unable to start the registration flow for this program.")}})}resolveRegistrationForProgram(t,n){let o=(t.registrationGroups||[]).flatMap(I=>
903I.registrations||[]),m=[...t.ungroupedRegistrations||[],...o],p=m.find(I=>I.registrationCostTypeID===K.VARIABLE),g=m.find(I=>I.programID===n&&I.registrationID!==p?.registrationID),C=m.filter(I=>I.registrationID!==p?.registrationID),h=this.cartService.getRegistrationCartItems().filter(I=>I.player?.playerID===this.cartService?.selectedPlayer?.playerID).map(I=>I.registration.registrationID).filter(I=>F(I)),f=m.find(I=>h.includes(I.registrationID)),y=f||p||g;return!f&&p?.registrationID&&this.cartService.setALaCarteRegistrationIDForProgram(n,p.registrationID),{cartRegistrationIDs:h,cartBundleRegistration:f,aLaCarteRegistration:p,supplementalRegistration:g,registration:y,bundleRegistrations:C}}buildRegistrationNavigation(t,n,o,m){let p=this.paidV2Enabled&&t.program?.programTypeID===this.programType.TRAINING_SESSIONS,g=this.allProgramsShellService.resolveCollectionContextFromUrl(this.router.url),C=p?this.allProgramsShellService.buildProgramLeafRoute("timeslots",t.programID,g):null,h=this.allProgramsShellService.buildProgramRegisterRoute(this.cartService.selectedPlayer.playerID,o.registrationID,n,g),f=C||h||["registrations",o.registrationID,"register"],y=this.allProgramsShellService.getMobileAppUserQueryParams(),I=m||y?j(j({},m?{scheduleSignUpID:m}:{}),y||{}):void 0;return{registerRoute:f,navigationExtras:I?{queryParams:I}:void 0}}getProgramIDsWithSignUps(){return new Set(Object.keys(this.signUpsByProgram).map(Number).filter(t=>(this.signUpsByProgram[t]||[]).length>0))}assignSignUpsToPrograms(t,n){t.forEach(o=>{let m=n[o.programID]||[];o.signUps=m,m.forEach(p=>{p?.scheduleSignUpID&&this.signUpToProgramIDMap.set(p.scheduleSignUpID,o.programID)})})}playerAdded(t){this.players||(this.players=[]),this.players.some(n=>n.playerID===t.playerID)||this.players.push(t),this.showAddPlayer=!1}sortDaysOfWeek(t){if(!t.daysOfWeek||t.daysOfWeek.length<=1||!t.sessionOverrideStartDate||!t.sessionOverrideEndDate)return;let n=new Date(t.sessionOverrideStartDate);if((new Date(t.sessionOverrideEndDate).getTime()-n.getTime())/(1e3*60*60*24)>7)return;let p=n.getDay();t.daysOfWeek=[...t.daysOfWeek].sort((g,C)=>{let h=(g-p+7)%7,f=(C-p+7)%7;return h-f})}groupByProgram(t,n,o){let m=new Map;t.forEach(h=>{m.set(h.programID,{programID:h.programID,program:h,isExpanded:t.length===1,registrationGroups:[],ungroupedRegistrations:[]})});let p=[],g=new Map,C=new Set(n.map(h=>h.registrationID));return n.forEach(h=>{h.childRegistrations=[],h.isExpanded=!1,h.parentRegistrationID&&C.has(h.parentRegistrationID)?(g.has(h.parentRegistrationID)||g.set(h.parentRegistrationID,[]),g.get(h.parentRegistrationID).push(h)):p.push(h)}),p.forEach(h=>{let f=g.get(h.registrationID);f&&(h.childRegistrations=f)}),p.forEach(h=>{let f=m.get(h.programID);if(f)if(h.registrationGroupName){let y=f.registrationGroups.find(I=>I.groupName===h.registrationGroupName);y||(y={groupName:h.registrationGroupName,isExpanded:!1,registrations:[]},f.registrationGroups.push(y)),y.registrations.push(h)}else f.ungroupedRegistrations.push(h)}),Array.from(m.values()).filter(h=>h.program?.programTypeID===this.programType.TRAINING_SESSIONS?this.paidV2Enabled&&!!o?.has(h.programID):h.registrationGroups.length>0||h.ungroupedRegistrations.some(f=>f.registrationCostTypeID!==K.VARIABLE)||!!o?.has(h.programID)).sort((h,f)=>{let y=h.program.startDate?new Date(h.program.startDate).getTime():0,I=f.program.startDate?new Date(f.program.startDate).getTime():0;return y-I})}toggleProgram(t){t.isExpanded=!t.isExpanded}toggleRegistrationGroup(t){t.isExpanded=!t.isExpanded}toggleChildRegistrations(t){t.isExpanded=!t.isExpanded}formatDate(t){return(0,Pi.default)(t).format("MMMM D, YYYY")}formatTime(t){return t?(0,Pi.default)(t,"HH:mm:ss").format("h:mm A"):""}getAgeRange(t,n){if(!t&&!n)return"";let o=m=>{let p=new Date,g=new Date(m),C=p.getFullYear()-g.getFullYear(),h=p.getMonth()-g.getMonth();return(h<0||h===0&&p.getDate()<g.getDate())&&C--,C};return t&&n?`${o(n)} - ${o(t)}`:t?`${o(t)}+`:`Up to ${o(n)}`}getDayOfWeek(t){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][t]||""}getCurrentUrl(){return this.location.path()}getLoginUrl(){let t=this.getCurrentUrl();return this.privateClubDomain+`/authentication/login?returnUrl=${encodeURIComponent(t)}`}storeHighlightReg(t){sessionStorage.setItem(c.HIGHLIGHT_REG_KEY,String(t))}addToCart(t){if(!this.cartService.selectedPlayer)this.pendingRegistration=t,this.showPickPlayer=!0;else{let n=this.getSelectedRegistrationExclusionsAndSeasonOverlaps(t.registrationID);n.length>0?(this.pendingRegistration=t,this.exclusionsAndOverlaps=n,this.showExclusionOverlapDialog=!0):this.cartService.addToCart(t,this.cartService.selectedPlayer)}}registerNow(t){this.registerService.reservedSlotsSummary=[],this.cartService.getCartCount()>0?(this.pendingRegistration=t,this.showPlayerRegistrationCartWarning=!0):this.allProgramsShellService.requestOverduePaymentModal(this.allProgramsShellService.appendMobileAppUserQueryParam("/registrations/"+t.registrationID+"/register"))}confirmRegisterNow(){this.cartService.clearCart(),this.cartService.addToCart(this.pendingRegistration,null),this.showPlayerRegistrationCartWarning=!1,this.allProgramsShellService.requestOverduePaymentModal(this.allProgramsShellService.appendMobileAppUserQueryParam("/registrations/"+this.pendingRegistration.registrationID+"/register")),this.pendingRegistration=null}rehydrateRestoredPlayer(){if(!this.cartService.isSelectedPlayerIdentityOnly())return;let t=this.cartService.selectedPlayer?.playerID,n=this.players?.find(o=>o.playerID===t);n&&(this.cartService.selectedPlayer=n,this.checkoutStatePersistenceService.verifyRestoredPlayer(n.playerID))}selectPlayer(t){if(this.checkoutStatePersistenceService.verifyRestoredPlayer(t.playerID),t?.playerID!==this.cartService.selectedPlayer?.playerID&&(this.cartService.clearAllCarts(),this.checkoutChainService.cancelCheckoutChain()),this.cartService.selectedPlayer=t,this.showPickPlayer=!1,this.cartService.hasLoadedOpenProgramCategories()&&this.loadOwnedActiveBu
903ndles(t.playerID).pipe(A(this.unsubscribe$)).subscribe({next:()=>this.filterProgramGroupsByPlayerEligibility(),error:()=>this.filterProgramGroupsByPlayerEligibility()}),this.pendingRegistration){let o=this.cartService.getPlayerEligibleRegistrationsFromCache(t.playerID)?.find(C=>C.registration.registrationID===this.pendingRegistration.registrationID),m=o?.registration.playerOpenRegistrations?.find(C=>C.playerID===t.playerID),p=m&&(m.collectPlayerGrade||m.collectPlayerGraduationYear||m.collectPlayerDOB);!!o&&!p?this.cartService.addToCart(this.pendingRegistration,t):this.siteDataService.showSiteErrorAlert(`${t.user.firstName} is not eligible for this program.`),this.pendingRegistration=null}if(this.pendingScrollRegistrationID&&!this.loading){let n=this.pendingScrollRegistrationID;this.pendingScrollRegistrationID=null,this.expandToRegistration(n),setTimeout(()=>{document.getElementById(`registration-${n}`)?.scrollIntoView({behavior:"smooth",block:"center"})},500)}}isInCart(t){return this.cartService.isInCart(t.registrationID)}buildDropdownOptions(){let t=this.allProgramsShellService.buildCollectionOptions(this.allPrograms);if(this.categoryOptions=t.categoryOptions,this.programTypeOptions=t.programTypeOptions,this.categoryName){let n=this.categoryOptions.find(o=>o.label===this.categoryName);this.selectedCategoryOrType=n?.value||null}else if(this.programTypeName){let n=this.programTypeOptions.find(o=>o.label===this.programTypeName);this.selectedCategoryOrType=n?.value||null}this.updateShellBreadcrumbs()}updateShellBreadcrumbs(){let t=+this.route.snapshot.params.categoryID||0,n=+this.route.snapshot.params.programTypeID||0,o=t?this.categoryOptions.find(m=>m.value===t):this.programTypeOptions.find(m=>m.value===n);this.allProgramsShellService.setShellState({showBreadcrumbs:!0,parentRoute:["/all-programs"],showBackButton:!0,options:[...this.allProgramsShellService.buildAllProgramsBreadcrumbOptions(this.categoryOptions,this.programTypeOptions),...this.allProgramsShellService.buildProgramSwitcherOptions(o?.programs)]})}getSelectedProgramLabel(t){return this.programGroups.find(n=>n.programID===t)?.program?.name||this.allProgramGroups.find(n=>n.programID===t)?.program?.name||this.programs.find(n=>n.programID===t)?.pageBuilderPageFeatureText||this.programs.find(n=>n.programID===t)?.linkText||"Selected Program"}updateShellBreadcrumbsForRegistrationChildView(t){let n=this.allProgramsShellService.resolveCollectionContextFromUrl(this.router.url),o=n?this.allProgramsShellService.buildAllProgramsCollectionRoute(n.collectionType,n.collectionID):["/all-programs"],m=this.getSelectedProgramLabel(t),p=this.allProgramsShellService.buildRegistrationChildBreadcrumbOptions(t.toString(),m,o,this.categoryOptions,this.programTypeOptions);this.allProgramsShellService.setShellState({showBreadcrumbs:!0,parentRoute:o,showBackButton:!0,options:p})}handleRegistrationClick(){if(!this.cartService.selectedPlayer)return;if(this.cartService.isInCart(this.pendingRegistration.registrationID))this.cartService.removeFromCart(this.pendingRegistration.registrationID,this.cartService.selectedPlayer.playerID);else if(this.cartService.getPlayerEligibleRegistrationsFromCache(this.cartService.selectedPlayer.playerID).find(m=>m.registration.registrationID===this.pendingRegistration.registrationID)){let m=this.getRegistrationExclusionsAndSeasonOverlaps(this.pendingRegistration.registrationID);m.length>
9030&&this.cartService.getRegistrationCartItems().forEach(g=>{m.some(C=>C.registration.registrationID===g.registration.registrationID)&&this.cartService.removeFromCart(g.registration.registrationID,g.player.playerID)}),this.cartService.addToCart(this.pendingRegistration,this.cartService.selectedPlayer)}this.showExclusionOverlapDialog=!1}getExclusionsAndSeasonOverlapsForRegistration(t){let n=[],o=this.cartService.getPlayerEligibleRegistrationsFromCache(this.cartService.selectedPlayer.playerID);n=o.filter(p=>p.registration.playerOpenRegistrations?.find(C=>C.playerID===this.cartService.selectedPlayer.playerID)?.registrationExclusions?.some(C=>C.exclusionRegistrationID===t));let m=o.filter(p=>p.registration.registrationID===t)[0];if(m&&m.registration.seasons){let p=o.filter(g=>g.registration.preventSeasonOverlap&&g.program.programID===m.program.programID&&g.registration.registrationID!==t);p&&p.length>0&&p.forEach(g=>{g.registration.seasons&&g.registration.seasons.length>0&&g.registration.seasons.some(C=>m.registration.seasons.some(h=>h.seasonID===C.seasonID))&&(n.some(C=>C.registration.registrationID===g.registration.registrationID)||n.push(g))})}return n}getRegistrationExclusionsAndSeasonOverlaps(t){let n=[];if(!this.cartService.selectedPlayer)return n;let o=this.cartService.getPlayerEligibleRegistrationsFromCache(this.cartService.selectedPlayer.playerID),m=o.filter(g=>g.registration.registrationID===t)[0];if(!m)return n;let p=m.registration.playerOpenRegistrations?.find(g=>g.playerID===this.cartService.selectedPlayer.playerID);if(p?.registrationExclusions&&(n=o.filter(g=>p.registrationExclusions.some(C=>C.exclusionRegistrationID===g.registration.registrationID))),m&&m.registration.seasons&&m.registration.preventSeasonOverlap&&this.cartService.getCartCount()>0){let g=o.filter(C=>C.program.programID===m.program.programID&&C.registration.registrationID!==t);g&&g.length>0&&g.forEach(C=>{C.registration.seasons&&C.registration.seasons.length>0&&m.registration.seasons.some(h=>C.registration.seasons.some(f=>f.seasonID===h.seasonID))&&(n.some(h=>h.registration.registrationID===C.registration.registrationID)||n.push(C))})}return n}isEligible(t){if(!this.cartService.selectedPlayer||!t.isPlayerRegistration)return!0;let n=t.registrationID;if(!this.cartService.isInCart(n)&&this.cartService.getCartCount()>0){let o=this.cartService.getPlayerEligibleRegistrationsFromCache(this.cartService.selectedPlayer.playerID),m=o.filter(C=>C.registration.registrationID===n)[0];if(o.filter(C=>this.cartService.getRegistrationCartItems().some(h=>h.registration.registrationID===C.registration.registrationID)).some(C=>!C.program.useRegistrationGroups&&C.program.programID===m.program.programID)||this.getSelectedExclusionsAndSeasonOverlapsForRegistration(n).length)return!1}return!0}getSelectedExclusionsAndSeasonOverlapsForRegistration(t){let n=[];return this.cartService.getCartCount()>0&&(n=this.getExclusionsAndSeasonOverlapsForRegistration(t).filter(o=>this.cartService.getRegistrationCartItems().some(m=>m.registration.registrationID===o.registration.registrationID))),n}getSelectedRegistrationExclusionsAndSeasonOverlaps(t){let n=[];return this.cartService.getCartCount()>0&&(n=this.getRegistrationExclusionsAndSeasonOverlaps(t).filter(o=>this.cartService.getRegistrationCartItems().some(m=>m.registration.registrationID===o.registration.registrationID))),n}applyDefaultExpansion(){let t=this._programGroups.length<=c.AUTO_EXPAND_PROGRAM_LIMIT;this.openProgramPanelIDs=t?this._programGroups.map(n=>n.program.programID):[],this.openRegistrationGroupPanelIndexes={},this._programGroups.forEach(n=>{this.openRegistrationGroupPanelIndexes[n.program.programID]=t?(n.registrationGroups??[]).map((o,m)=>m):[]})}expandToRegistration(t){let n=o=>o.registrationID===t?o:o.childRegistrations?.some(m=>m.registrationID===t)?z(j({},o),{isExpanded:!0}):o;this.programGroups=this.programGroups.map(o=>{let m=o.ungroupedRegistrations.some(g=>g.registrationID===t||g.childRegistrations?.some(C=>C.registrationID===t)),p=o.registrationGroups.findIndex(g=>g.registrations.some(C=>C.registrationID===t||C.childRegistrations?.some(h=>h.registrationID===t)));return!m&&p===-1?o:z(j({}
903,o),{isExpanded:!0,ungroupedRegistrations:m?o.ungroupedRegistrations.map(n):o.ungroupedRegistrations,registrationGroups:p!==-1?o.registrationGroups.map((g,C)=>C===p?z(j({},g),{isExpanded:!0,registrations:g.registrations.map(n)}):g):o.registrationGroups})})}scrollToRegistrationIfEligible(t){this.expandToRegistration(t),setTimeout(()=>{document.getElementById(`registration-${t}`)?.scrollIntoView({behavior:"smooth",block:"center"})},500)}hasPlayerRegistrationsInCurrentGroups(){return this.allProgramGroups.some(t=>t.registrationGroups.some(n=>n.registrations.some(o=>o.isPlayerRegistration))||t.ungroupedRegistrations.some(n=>n.isPlayerRegistration))}stampCapacityFromEligibility(){if(!this.cartService.hasAllOpenProgramCategories())return;let t=new Map;this.cartService.allOpenProgramCategories.forEach(n=>{n.openPrograms?.forEach(o=>{o.openRegistrations?.forEach(m=>{t.set(m.registrationID,{enableWaitlist:m.enableWaitlist,maxCapacity:m.maxCapacity,remainingCapacity:m.remainingCapacity,showMaxCapacityMessage:m.showMaxCapacityMessage,isCapacityFull:m.isCapacityFull,registrationAdvancedCapacityOptionID:m.registrationAdvancedCapacityOptionID,showAdvancedCapacityMessage:m.showAdvancedCapacityMessage,remainingAdvancedCapacity:m.remainingAdvancedCapacity})})})}),this.allProgramGroups.forEach(n=>{n.registrationGroups.forEach(o=>{o.registrations.forEach(m=>{let p=t.get(m.registrationID);p&&Object.assign(m,p),m.childRegistrations?.forEach(g=>{let C=t.get(g.registrationID);C&&Object.assign(g,C)})})}),n.ungroupedRegistrations.forEach(o=>{let m=t.get(o.registrationID);m&&Object.assign(o,m),o.childRegistrations?.forEach(p=>{let g=t.get(p.registrationID);g&&Object.assign(p,g)})})})}loadOwnedActiveBundles(t){return this.playerService.getCompletedPlayerRegistrations(t,!1).pipe(re(n=>(this.ownedActiveBundleRegistrationIDs=Ki(n||[],new Date),this.ownedActiveBundleRegistrationIDs)),se(()=>(this.ownedActiveBundleRegistrationIDs=new Set,U(this.ownedActiveBundleRegistrationIDs))))}filterProgramGroupsByPlayerEligibility(){if(!this.cartService.selectedPlayer||!this.allProgramGroups.length){this.programGroups=this.allProgramGroups;return}let n=this.cartService.getPlayerEligibleRegistrationsFromCache(this.cartService.selectedPlayer.playerID).filter(f=>{if(!f.registration.isPlayerRegistration)return!0;let y=f.registration.playerOpenRegistrations?.find(I=>I.playerID===this.cartService.selectedPlayer.playerID);return y&&!y.collectPlayerGrade&&!y.collectPlayerGraduationYear&&!y.collectPlayerDOB}),o=new Set(n.map(f=>f.registration.registrationID)),m=new Map,p=new Map;n.forEach(f=>{let y=f.registration.playerOpenRegistrations?.find(I=>I.playerID===this.cartService.selectedPlayer.playerID);y?.registrationWaitlistID&&m.set(f.registration.registrationID,y.registrationWaitlistID),y?.availableCredits&&p.set(f.registration.registrationID,y.availableCredits)});let g=this.allRegistrations.filter(f=>f.registrationCostTypeID===K.VARIABLE||!this.ownedActiveBundleRegistrationIDs.has(f.registrationID)).filter(f=>!f.isPlayerRegistration||f.registrationCostTypeID===K.VARIABLE||o.has(f.registrationID)).map(f=>z(j({},f),{childRegistrations:[],isExpanded:!1})),C=this.allProgramGroups.map(f=>f.program),h=this.groupByProgram(C,g,this.getProgramIDsWithSignUps());h.forEach(f=>{[...f.registrationGroups.flatMap(I=>I.registrations),...f.ungroupedRegistrations].forEach(I=>{I.registrationWaitlistID=m.get(I.registrationID)||null,I.availableCredits=p.get(I.registrationID)||null,I.childRegistrations?.forEach(k=>{k.registrationWaitlistID=m.get(k.registrationID)||null,k.availableCredits=p.get(k.registrationID)||null})})}),this.assignSignUpsToPrograms(h,this.signUpsByProgram),this.programGroups=h}fieldName(t){return this.clubFieldOptions.find(n=>n.fieldOptionID===t).fieldName}checkForMissingPlayerData(t){this.missingPlayerData=[],t?.forEach(n=>n.openPrograms.forEach(o=>o.openRegistrations.forEach(m=>{m.playerOpenRegistrations.filter(p=>p.collectPlayerGrade).forEach(p=>{let g=`${p.programEffectiveYear}/${p.programEffectiveYear+1}`;this.players?.some(C=>C.playerID===p.playerID&&C.user.userTypeID===gi.CHILD)&&this.missingPlayerData.findIndex(C=>C.playerID===p.playerID&&C.year===p.programEffectiveYear)===-1&&this.missingPlayerData.push({playerID:p.playerID,playerName:p.playerFirstName,yearString:g,year:p.programEffectiveYear,collectPlayerGrade:!0})}),m.playerOpenRegistrations.filter(p=>p.collectPlayerGraduationYear).forEach(p=>{this.players?.some(g=>g.playerID===p.playerID&&g.user.userTypeID===gi.CHILD)&&this.missingPlayerData.findIndex(g=>g.playerID===p.playerID)===-1&&this.missingPlayerData.push({playerID:p.playerID,playerName:p.playerFirstName,yearString:null,year:null,collectPlayerGraduationYear:!0})}),m.playerOpenRegistrations.filter(p=>
903p.collectPlayerDOB).forEach(p=>{this.missingPlayerData.findIndex(g=>g.playerID===p.playerID)===-1&&this.missingPlayerData.push({playerID:p.playerID,playerName:p.playerFirstName,yearString:null,year:null,collectPlayerDOB:!0})})})))}haveMissingPlayerGradeData(){return this.missingPlayerData.some(t=>t.collectPlayerGrade)}getMissingPlayerGradeData(){return this.missingPlayerData.filter(t=>t.collectPlayerGrade)}haveMissingPlayerGraduationYearData(){return this.missingPlayerData.some(t=>t.collectPlayerGraduationYear)}getMissingPlayerGraduationYearData(){return this.missingPlayerData.filter(t=>t.collectPlayerGraduationYear)}haveMissingPlayerGenderAndDOBData(){return this.missingPlayerData.some(t=>t.collectPlayerDOB)}collectData(t){this.missingData=t,this.selectedPlayer=this.players.find(n=>n.playerID===t.playerID),this.showPlayerYearlyDataModal=!0}collectGraduationYearData(t){this.missingData=t,this.selectedPlayerClubData=this.players.find(n=>n.playerID===t.playerID)?.playerClubData,Ie({metadata:this.editFields?.length>0?U(null):this.playerService.getPlayerClubDataMetadata(),clubData:this.selectedPlayerClubData?U(null):this.playerService.getPlayerClubData(t.playerID)}).subscribe({next:n=>{n.metadata&&(this.editFields=n.metadata.fields.filter(o=>o.controlName==="graduationYear")),n.clubData&&(this.selectedPlayerClubData=n.clubData),this.showPlayerGraduationYearModal=!0},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem loading data.")}})}showAddSelf(){this.player={firstName:this.userService.loggedInClubUser.user.firstName,lastName:this.userService.loggedInClubUser.user.lastName,email:this.userService.loggedInClubUser.user.email,cellPhone:this.userService.loggedInClubUser.user.cellPhone},this.showAddPlayer=!0}updateOpenProgramsForGrade(t){let n=this.players.find(o=>o.playerID===t.playerID);n&&(n.playerYearlyClubData=t.playerYearlyClubData),this.missingPlayerData=this.missingPlayerData.filter(o=>o.playerID!==this.missingData.playerID||o.year!==this.missingData.year),this.playerService.getOpenPrograms().pipe(A(this.unsubscribe$)).subscribe({next:o=>{this.cartService.setAllOpenProgramCategories(o),this.checkForMissingPlayerData(o),this.filterProgramGroupsByPlayerEligibility(),this.showPlayerYearlyDataModal=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem refreshing programs."),this.showPlayerYearlyDataModal=!1}})}addToWaitlist(t){if(!this.cartService.selectedPlayer){this.siteDataService.showSiteErrorAlert("Please select a player first");return}this.savingWaitlist=!0,this.waitlistService.createWaitlistEntry(t.registrationID,this.cartService.selectedPlayer.playerID,null).pipe(A(this.unsubscribe$)).subscribe({next:n=>{this.siteDataService.showSiteSuccessAlert(`${this.cartService.selectedPlayer.user.firstName} added to waitlist`),t.registrationWaitlistID=n.registrationWaitlistID;let m=this.cartService.getPlayerEligibleRegistrationsFromCache(this.cartService.selectedPlayer.playerID).find(p=>p.registration.registrationID===t.registrationID);if(m){let p=m.registration.playerOpenRegistrations?.find(g=>g.playerID===this.cartService.selectedPlayer.playerID);p&&(p.registrationWaitlistID=n.registrationWaitlistID)}this.savingWaitlist=!1},error:()=>{this.siteDataService.showSiteErrorAlert(`There was a problem adding ${this.cartService.selectedPlayer.user.firstName} to the waitlist`),this.savingWaitlist=!1}})}confirmRemoveFromWaitlist(t){this.selectedRegistrationForWaitlist=t,this.showRemoveWaitlistConfirm=!0}removeFromWaitlist(){!this.selectedRegistrationForWaitlist||!this.cartService.selectedPlayer||(this.savingWaitlist=!0,this.waitlistService.deleteWaitlistEntry(this.selectedRegistrationForWaitlist.registrationID,this.cartService.selectedPlayer.playerID,null).pipe(A(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert(`${this.cartService.selectedPlayer.user.firstName} removed from waitlist`),this.selectedRegistrationForWaitlist.registrationWaitlistID=null;let n=this.cartService.getPlayerEligibleRegistrationsFromCache(this.cartService.selectedPlayer.playerID).find(o=>o.registration.registrationID===this.selectedRegistrationForWaitlist.registrationID);if(n){let o=n.registration.playerOpenRegistrations?.find(m=>m.playerID===this.cartService.selectedPlayer.playerID);o&&(o.registrationWaitlistID=null)}this.showRemoveWaitlistConfirm=!1,this.selectedRegistrationForWaitlist=null,this.savingWaitlist=!1},error:()=>{this.siteDataService.showSiteErrorAlert(`There was a problem removing ${this.cartService.selectedPlayer.user.firstName} from the waitlist`),this.savingWaitlist=!1}}))}updateOpenProgramsForGenderAndDOB(t){this.players||(this.players=[]);let n=this.players?.findIndex(o=>o.playerID===t.playerID);n===-1?this.players.push(t):this.players[n]=t,this.missingPlayerData=this.missingPlayerData.filter(o=>o.playerID!==t.playerID),this.playerService.getOpenPrograms().pipe(A(this.unsubscribe$)).subscribe({next:o=>{this.cartService.setAllOpenProgramCategories(o),this.checkForMissingPlayerData(o),this.filterProgramGroupsByPlayerEligibility(),this.showAddPlayer=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem refreshing programs."),this.showAddPlayer=!1}})}updateOpenProgramsForGraduationYear(t){t.graduationYear?this.playerService.savePlayerClubData(this.missingData.playerID,t,this.selectedPlayerClubData!==null).subscribe({next:()=>{this.missingPlayerData=this.missingPlayerData.filter(n=>n.playerID!==this.missingData.playerID),this.playerService.getOpenPrograms().pipe(A(this.unsubscribe$)).subscribe({next:n=>{this.cartService.setAllOpenProgramCategories(n),this.checkForMissingPlayerData(n),this.filterProgramGroupsByPlayerEligibility(),this.showPlayerGraduationYearModal=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem refreshing programs."),this.showPlayerGraduationYearModal=!1}})},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem saving information.")}}):this.showPlayerGraduationYearModal=!1}};c.AUTO_EXPAND_PROGRAM_LIMIT=3,c.HIGHLIGHT_REG_KEY="programsListHighlightReg",c.\u0275fac=function(n){return new(n||c)(R(Se),R(et),R(Li),R(Ve),R(ct),R(De),R(At),R(tt),R(ge),R(we),R(Xt),R(Qt),R(be),R(ue),R(_e),R(Mt))},c.\u0275cmp=Te({type:c,selectors:[["app-programs-list"]],standalone:!1,decls:32,vars:28,consts:[["registrationCardTemplate",""],[1,"main","pt-3"],[1,"container","programs-list-container","px-0"],["header","Add Player","styleClass","standardWidthDialog",3,"visible","showHeader","closable","modal","draggable"],["header","Select Player","styleClass","standardWidthDialog",3,"visibleChange","visible","showHeader","closable","modal","draggable"],["header","Warning",3,"visibleChange","visible","closable"],["pTemplate","footer"],["header","Graduation Year","styleClass","standardWidthDialog",3,"visibleChange","visible","showHeader","closable","modal","draggable"],[1,"row","no-gutters"],[1,"col-lg-3","col-md-4","pr-md-3"],[1,"position-sticky-top","mb
903-3","programs-filters-wrapper"],[1,"programs-filters-inner","hide-scrollbar"],[1,"card"],[1,"mb-2","text-medium"],[1,"d-flex","align-items-center","justify-content-between"],[1,"d-flex","align-items-center"],[1,"player-photo","mr-3"],[3,"player","playerNumber","initialsOnly"],[1,"player-name"],["type","button",1,"btn","btn-sm",3,"click"],[1,"text-header-5","border-bottom","fw-700","d-none","d-md-block"],[1,"text-medium","fw-400","d-md-none","d-flex","justify-content-between","align-items-center"],[1,"fa",3,"click","ngClass"],[1,"d-md-block",3,"ngClass"],[1,"form-group","mt-3"],["type","button","id","reset",1,"btn","full-width","d-block",3,"click"],[1,"fa-solid","fa-rotate-left"],[1,"form-group"],[1,"text-uppercase","text-smallest","text-grey","mb-1"],[1,"full-width"],["styleClass","full-width","optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","maxSelectedLabels","selectedItemsLabel"],["placeholder","All","styleClass","full-width","appendTo","body",3,"ngModelChange","onChange","ngModel","options","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","placeholder","All","styleClass","full-width","appendTo","body",3,"ngModelChange","onChange","ngModel","options","maxSelectedLabels","selectedItemsLabel"],["view","year","dateFormat","yy","inputId","birthYearPicker","styleClass","full-width","placeholder","All",3,"ngModelChange","ngModel"],["type","button",1,"btn","btn-sm","btn-naked",3,"click","disabled"],[1,"fa-regular","fa-times"],["styleClass","full-width","appendTo","body",3,"ngModelChange","onChange","ngModel","options"],["view","year","dateFormat","yy","inputId","graduationYearPicker","styleClass","full-width","placeholder","All",3,"ngModelChange","onChange","ngModel"],[1,"card","bg-grey-lt","p-3","text-small","mb-3","border-all","border-radius"],[1,"line-height-2","mb-2"],[1,"mb-0","line-height-1"],[1,"btn-a11y","text-primary-link",3,"click"],["data-testid","programs-list-page",1,"programs-container"],[1,"program-groups-accordion","mb-3","p-accordion-naked","accordion-toggle-first",3,"valueChange","multiple","value"],[1,"card","registration-card","px-md-3","px-2","pb-2",3,"id"],[1,"d-md-flex","full-width"],[1,"flex-grow-1","registration-card-info","mr-3","pr-3","d-flex","flex-column"],[1,"registration-title","fw-700","line-height-2","mb-1"],[1,"text-medium","fw-400","mb-3"],[1,"d-flex","flex-column","justify-content-between","flex-grow-1"],[1,"registration-details-grid","d-flex","flex-column","justify-content-between"],[1,"registration-details-grid--price","full-width"],[1,"fa-light","fa-ticket-perforated","mr-2"],[1,"d-block","d-md-flex","justify-content-between","text-medium","mb-2"],[1,"mr-md-3","d-flex"],[1,"icon-wrapper"],[1,"fal","fa-calendar","mr-2"],[1,"nowrap"],[1,"d-flex"],[1,"fal","fa-location-dot","mr-2"],["target","_blank","rel","noopener noreferrer",3,"href"],[1,"d-flex","text-medium","mb-2"],[1,"fal","fa-user","mr-2"],[1,"mb-2"],[3,"focuses"],[1,"text-medium","mb-2",3,"innerHTML"],[1,"p-accordion-naked","accordion-content-p-0","accordion-toggle-first"],["value","details"],[1,"text-medium","fw-500","text-primary-link"],[1,"registration-custom-text-row","border-radius-lg","bg-grey-lt","p-3","mb-3",3,"innerHTML"],[1,"mb-2","text-medium","d-flex","flex-column"],[1,"credits","text-medium"],[1,"credit-item","d-flex","justify-content-between","align-items-center","py-1",3,"ngClass"],[1,"credit-name","flex-grow-1","pr-2"],[1,"credit-value","text-success","font-weight-bold"],[1,"my-2"],[1,"btn","btn-primary",3,"click","href"],[1,"d-flex","align-items-center","justify-content-between","mb-2"],[1,"text-right"],[1,"text-warning"],[1,"fa-solid","fa-triangle-exclamation"],[1,"text-red"],["status","error","text","Ineligible",3,"pTooltip"],[1,"btn","btn-primary",3,"click"],[1,"fa-regular","fa-arrow-right","mr-2"],[1,"btn",3,"click","ngClass","disabled"],[1,"pi","mr-2",3,"ngClass"],["type","button",1,"btn","btn-primary",3,"click","disabled"],[1,"fa-regular","fa-plus","mr-2"],["type","button",1,"btn","btn-secondary",3,"click","disabled"],[1,"fa-regular","fa-times","mr-2"],[1,"mt-3","border-top","pt-3"],[1,"child-registrations-accordion","p-accordion-naked","accordion-content-p-0","accordion-toggle-first",3,"multiple"],["value","0"],[1,"child-registrations-content","mt-3","pl-3","pl-md-4","border-left","border-lg"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"card","all-programs-card","py-1","px-0","mb-2","p-accordion-naked","accordion-content-p-3",3,"value"],["data-testid","program-panel-header",1,"py-3","px-3"],[1,"program-title","mb-0","fw-700","text-h3"],[1,"ml-4"],[1,"programs-list"],[1,"mb-4"],["alt","Program Image",1,"program-image","d-block","mx-auto","mb-5",3,"src"],[1,"end-date"],[1,"small-label"],[1,"nowrap","mb
903-3"],[1,"btn",3,"href","target"],["customCssClass","btn btn-m mr-1",3,"title","customURL","openLinkInNewTab"],[1,"registration-custom-text-row","border-radius-lg","bg-grey-lt","p-3","mb-3"],[1,"registration-custom-text",3,"innerHTML"],[1,"registration-groups-accordion","mb-3","p-accordion-naked","accordion-toggle-first","accordion-border-bottom",3,"valueChange","multiple","value"],[3,"value"],[1,"registration-group-title","mb-0"],[1,"registration-group-content","pt-2"],[1,"d-flex","flex-column","gap-1","full-width"],["data-testid","program-view-full-schedule",1,"btn","btn-primary","mt-1",3,"click"],[1,"border-top","text-h5"],["data-testid","program-signup-card",1,"card","registration-card","px-md-3","px-2","pb-2"],["data-testid","program-signup-name",1,"registration-title","fw-700","line-height-2","mb-1"],["data-testid","program-signup-view-schedule",1,"btn","btn-primary",3,"click"],[1,"text-medium","mb-2"],["alertType","info",3,"isInline"],["alertType","error",3,"isInline"],[3,"cancel","add","horizontalForm","allowAddPlayerLogin","player"],[1,"btn","btn-add",3,"click"],["data-testid","programs-list-player-option",1,"card","clickable-card",2,"cursor","pointer",3,"click"],[1,"col-12"],[1,"profile-image","pull-left","mr-3"],[3,"player","playerNumber","largeCircle","initialsOnly"],[1,"mb-1"],[1,"text-capitalize","fw-700"],[1,"text-small"],["text","You currently do not have any players in your account.","buttonText","Add a player",3,"buttonClicked","image","showButton","showCard"],[1,"row"],[1,"col"],["slot","secondary"],["type","button",1,"btn",3,"click"],["slot","primary"],["type","button",1,"btn","btn-primary",3,"click"],[3,"onSubmit","onCancel","fields","entity","contentFieldsMode","horizontalForm","showCancelButton","showSubmitButton","buttonsPosition"],["fieldName","graduationYear"],[3,"saved","cancelled","player","collectDataOnly","year","editPlayerYearlyFieldType"],["headerText","Please Note","noButtonText","Cancel","yesButtonText","Register Now",3,"onNoSelect","onYesSelect","showHeader","showModalText"],[1,"mb-3"],[1,"fa-regular","fa-circle-info","mr-2"],["headerText","Remove from Waitlist","noButtonText","Cancel","yesButtonText","Yes, Remove","yesButtonLoadingText","Removing...",3,"onNoSelect","onYesSelect","showHeader","showModalText","loading"],[1,"mb-3","text-small"],["alertType","warning",3,"isInline"],[1,"mb-3","fw-600"]],template:function(n,o){n&1&&(a(0,"div",1),e(1,` 904 `),a(2,"div",2),e(3,` 905 `),_(4,Gl,13,9),_(5,jl,4,2),l(),e(6,` 906`),l(),e(7,` 907 908`),a(8,"p-dialog",3),e(9,` 909 `),_(10,Yl,4,3),l(),e(11,` 910 911`),a(12,"p-dialog",4),G("visibleChange",function(p){return W(o.showPickPlayer,p)||(o.showPickPlayer=p),p}),e(13,` 912 `),_(14,zl,4,0),_(15,ql,6,0)(16,Ql,4,3),l(),e(17,` 913`),a(18,"p-dialog",5),G("visibleChange",function(p){return W(o.showExclusionOverlapDialog,p)||(o.showExclusionOverlapDialog=p),p}),e(19,` 914 `),_(20,Kl,7,0),_(21,Jl,12,0),M(22,Zl,16,0,"ng-template",6),e(23,` 915`),l(),e(24,` 916`),a(25,"p-dialog",7),G("visibleChange",function(p){return W(o.showPlayerGraduationYearModal,p)||(o.showPlayerGraduationYearModal=p),p}),e(26,` 917 `),_(27,es,6,7),l(),e(28,` 918`),_(29,ts,3,4),_(30,is,18,2),_(31,rs,11,5)),n&2&&(s(4),u(o.error?-1:4),s(),u(o.error?5:-1),s(3),x("visible",o.showAddPlayer)("showHeader",!0)("closable",!1)("modal",!0)("draggable",!1),s(2),u(o.showAddPlayer?10:-1),s(2),N("visible",o.showPickPlayer),x("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),s(2),u(o.cartService.selectedPlayer?14:-1),s(),u(o.players?15:16),s(3),N("visible",o.showExclusionOverlapDialog),x("closable",!1),s(2),u(o.exclusionsAndOverlaps&&o.exclusionsAndOverlaps.length>0?20:-1),s(),u(o.exclusionsAndOverlaps&&o.exclusionsAndOverlaps.length>0?21:-1),s(4),N("visible",o.showPlayerGraduationYearModal),x("showHeader",!0)("closable",!1)("modal",!0)("draggable",!1),s(2),u(o.showPlayerGraduationYearModal&&o.editFields?27:-1),s(2),u(o.showPlayerYearlyDataModal?29:-1),s(),u(o.showPlayerRegistrationCartWarning?30:-1),s(),u(o.showRemoveWaitlistConfirm?31:-1))},dependencies:[vn,Ze,Fe,sn,ln,Me,Le,Lt,Wi,lt,Oe,dn,Nt,on,Ut,$t,fn,Vt,ot,rt,tn,Ot,Ht,jt,Yt,zt,Dn,st,Pn,Be,cn],styles:[".admin-header[_ngcontent-%COMP%]{z-index:1}.programs-filters-wrapper[_ngcontent-%COMP%]{top:6.5rem}.programs-filters-wrapper[_ngcontent-%COMP%] .programs-filters-inner[_ngcontent-%COMP%]{max-height:calc(100vh - 6.5rem);overflow:auto}.registration-groups-accordion.p-accordion-naked[_ngcontent-%COMP%] .p-accordionpanel.card[_ngcontent-%COMP%], .program-groups-accordion.p-accordion-naked[_ngcontent-%COMP%] .p-accordionpanel.card[_ngcontent-%COMP%]{--p-accordion-content-padding: 1rem 1rem 1rem 1.25rem}.registration-custom-text-row[_ngcontent-%COMP%] {font-size:.875rem}.registration-custom-text-row[_ngcontent-%COMP%] p{margin-bottom:.5rem}.registration-custom-text-row[_ngcontent-%COMP%] h1{font-size:1.5rem}.registration-custom-text-row[_ngcontent-%COMP%] h2{font-size:1.375rem}.registration-custom-text-row[_ngcontent-%COMP%] h3{font-size:1.25rem}.registration-custom-text-row[_ngcontent-%COMP%] h4{font-size:1.125rem}.registration-custom-text-row[_ngcontent-%COMP%] h5{font-size:1rem}.programs-list-container[_ngcontent-%COMP%] .all-programs-card:hover{box-shadow:var(--box-sha
918dow-lg);border-color:var(--grey-500)}.registration-card-info[_ngcontent-%COMP%]{border-right:none;border-bottom:var(--border);padding-bottom:1rem;margin-bottom:1rem}@media(min-width:768px){.registration-card-info[_ngcontent-%COMP%]{border-right:var(--border);border-bottom:none;padding-bottom:unset;margin-bottom:unset}}.registration-details-grid[_ngcontent-%COMP%], .registration-details-grid--price[_ngcontent-%COMP%]{text-align:left}@media(min-width:768px){.registration-details-grid[_ngcontent-%COMP%], .registration-details-grid--price[_ngcontent-%COMP%]{text-align:right}}.cart-item-badge[_ngcontent-%COMP%]{position:absolute;bottom:0;left:5rem;font-size:.5rem;height:1.25rem;padding:.25rem;background-color:var(--primary, #007bff);color:#fff;border-bottom-left-radius:.5rem}.mobile-coverage-row[_ngcontent-%COMP%]{min-height:2.75rem}.mobile-app-layout[_ngcontent-%COMP%]{height:calc(100dvh - var(--admin-header-height, 0px))}"]});let r=c;return r})();var os=r=>({bundles:r,heading:"",showCard:!1}),as=()=>({showCard:!1}),ls=r=>({bundles:r,heading:"BUNDLES"}),Ti=r=>({"border-bottom":r}),ss=(r,c)=>c.group,cs=(r,c)=>c.playerID,ms=(r,c)=>c.entityRegistrationID,Xn=(r,c)=>c.registrationID,ds=(r,c)=>c.registrationGradeID,ps=(r,c)=>c.scheduleSignUpID,gs=(r,c)=>c.locationID,_s=(r,c)=>c.staffID,us=(r,c)=>c.dayOfWeek;function hs(r,c){r&1&&(e(0,` 919 `),a(1,"app-loader"),e(2,"Loading Time Slots..."),l(),e(3,` 920 `))}function Cs(r,c){r&1&&ie(0)}function xs(r,c){if(r&1&&(e(0,` 921 `),a(1,"div",20),e(2,` 922 `),a(3,"div",21),e(4,` 923 `),a(5,"div",22),e(6,` 924 `),M(7,Cs,1,0,"ng-container",14),e(8,` 925 `),l(),e(9,` 926 `),l(),e(10,` 927 `),l(),e(11,` 928 `)),r&2){d(3);let i=te(74);s(7),x("ngTemplateOutlet",i)}}function fs(r,c){if(r&1&&(e(0,` 929 `),_(1,xs,12,1)),r&2){let i=d(2);s(),u(i.hasSidebar?1:-1)}}function Ss(r,c){r&1&&ie(0)}function vs(r,c){if(r&1){let i=P();e(0,` 930 `),a(1,"button",41),b("click",function(){S(i);let n=d(5);return v(n.showMobileBundles=!0)}),e(2,` 931 Buy another bundle 932 `),l(),e(3,` 933 `)}}function ys(r,c){if(r&1&&(e(0,` 934 `),a(1,"div",40),e(2,` 935 `),M(3,Ss,1,0,"ng-container",18),e(4,` 936 `),_(5,vs,4,0),l(),e(6,` 937 `)),r&2){let i=d(4),t=te(55);s(3),x("ngTemplateOutlet",t)("ngTemplateOutletContext",Xe(3,as)),s(2),u(i.hasPurchasableBundles?5:-1)}}function bs(r,c){if(r&1){let i=P();e(0,` 938 `),a(1,"div",35),e(2,` 939 `),e(3,` 940 `),a(4,"button",36),b("click",function(){S(i);let n=d(3);return v(n.showMobileBundleSummary=!n.showMobileBundleSummary)}),e(5,` 941 `),a(6,"span",37),e(7,` 942 `),T(8,"i",38),e(9),l(),e(10,` 943 `),T(11,"i",39),e(12,` 944 `),a(13,"span",28),e(14),l(),e(15,` 945 `),l(),e(16,` 946 `),_(17,ys,7,4),l(),e(18,` 947 `)}if(r&2){let i=d(3);s(4),fe("aria-expanded",i.showMobileBundleSummary),s(5),D("",i.purchasedBundleSummaryLabel,` 948 `),s(2),$("fa-chevron-down",!i.showMobileBundleSummary)("fa-chevron-up",i.showMobileBundleSummary),s(3),w(i.showMobileBundleSummary?"Hide bundle details":"Show bundle details"),s(3),u(i.showMobileBundleSummary?17:-1)}}function Ps(r,c){if(r&1){let i=P();e(0,` 949 `),e(1,` 950 `),a(2,"div",35),e(3,` 951 `),a(4,"button",42),b("click",function(){S(i);let n=d(3);return v(n.showMobileBundles=!0)}),e(5,` 952 `),a(6,"span",37),e(7,` 953 `),T(8,"i",38),e(9,`Bundles available for this program
954 `),l(),e(10,` 955 `),T(11,"i",43),e(12,` 956 `),l(),e(13,` 957 `),l(),e(14,` 958 `)}}function Is(r,c){if(r&1&&(e(0,` 959 `),a(1,"span",44),e(2),l(),e(3,` 960 `)),r&2){let i=d(3);s(2),w(i.activeFilterCount)}}function Ts(r,c){if(r&1){let i=P();e(0,` 961 `),a(1,"button",47),b("click",function(){let n=S(i).$implicit,o=d(4);return v(o.removeFilterChip(n))}),e(2),T(3,"i",48),e(4,` 962 `),l(),e(5,` 963 `)}if(r&2){let i=c.$implicit;s(),fe("aria-label",i.removeAriaLabel),s(),D(` 964 `,i.label)}}function Ds(r,c){if(r&1){let i=P();e(0,` 965 `),a(1,"div",45),e(2,` 966 `),L(3,Ts,6,2,null,null,ss),a(5,"button",46),b("click",function(){S(i);let n=d(3);return v(n.clearFilters())}),e(6,` 967 Clear all 968 `),l(),e(7,` 969 `),l(),e(8,` 970 `)}if(r&2){let i=d(3);s(3),O(i.activeFilterChips)}}function ws(r,c){if(r&1&&e(0),r&2){let i=d(3);D(` 971 `,i.mobileCartLabel,` 972 `)}}function Es(r,c){r&1&&e(0,` 973 Cart is empty 974 `)}function Rs(r,c){r&1&&(e(0,` 975 `),a(1,"span"),e(2,"Checkout"),T(3,"i",49),l(),e(4,` 976 `))}function ks(r,c){r&1&&(e(0,` 977 `),a(1,"span"),T(2,"i",50),e(3,"Processing..."),l(),e(4,` 978 `))}function As(r,c){if(r&1){let i=P();e(0,` 979 `),a(1,"div",23),e(2,` 980 `),_(3,bs,19,8)(4,Ps,15,0),a(5,"app-time-slot",24,7),B(7,"async"),b("onClearFiltersRequested",function(){S(i);let n=d(2);return v(n.clearFilters())})("onPlayerReservedTimeSlots",function(n){S(i);let o=d(2);return v(o.handleReservedTimeSlots(n))})("onTimeSlotSelected",function(n){S(i);let o=d(2);return v(o.timeSlotSelected(n))}),e(8,` 981 `),e(9,` 982 `),a(10,"div",25),e(11,` 983 `),a(12,"button",26),b("click",function(){S(i);let n=d(2);return v(n.showMobileFilters=!0)}),e(13,` 984 `),T(14,"i",27),e(15,` 985 `),_(16,Is,4,1),a(17,"span",28),e(18),l(),e(19,` 986 `),l(),e(20,` 987 `),l(),e(21,` 988 `),e(22,` 989 `),X(23,29),e(24,` 990 `),_(25,Ds,9,0),J(),e(26,` 991 `),l(),e(27,` 992 `),e(28,` 993 `),a(29,"div",30),e(30,` 994 `),a(31,"button",31),b("click",function(){S(i);let n=d(2);return v(n.openCart())}),e(32,` 995 `),T(33,"i",32),e(34,` 996 `),a(35,"span",33),e(36,` 997 `),_(37,ws,1,1)(38,Es,1,0),l(),e(39,` 998 `),a(40,"span",28),e(41,"Review cart"),l(),e(42,` 999 `),l(),e(43,` 1000 `),a(44,"button",34),B(45,"async"),b("click",function(){S(i);let n=d(2);return v(n.proceedToCheckout())}),e(46,` 1001 `),_(47,Rs,5,0)(48,ks,5,0),l(),e(49,` 1002 `),l(),e(50,` 1003 `),l(),e(51,` 1004 `)}if(r&2){let i,t=d(2);s(3),u(t.purchasedBundleSummaries.length>0?3:t.hasPurchasableBundles?4:-1),s(2),x("registrationID",t.sessionRegistrationID)("playerID",t.player.playerID)("filters",ce(7,22,t.timeSlotFilters$))("totalBundleSessions$",t.totalBundleSessions$)("selectedTimeSlotsCount$",t.selectedTimeSlotsCount$)("coveredTimeSlotIDs",t.coveredTimeSlotIDs)("preSelectTimeSlotIDs",t.initialTimeSlotIDs)("registrationPricingRules",t.currentRegistration==null?null:t.currentRegistration.registrationPricingRules)("registrationNumberOfSessions",t.currentRegistration==null?null:t.currentRegistration.numberOfSessions)("componentView",t.TimeSlotComponentView.REGISTRATION)("isMobileView",t.isMobileUser)("fixedHeight",!1)("autoAdvanceToFirstAvailable",!0),s(7),$("active",t.activeFilterCount>0),s(4),u(t.activeFilterCount>0?16:-1),s(2),D("Filters",t.activeFilterCount>0?", "+t.activeFilterCount+" active":""),s(7),u(t.activeFilterChips.length>0?25:-1),s(12),u(t.mobileCartLabel?37:38),s(7),x("disabled",!((i=ce(45,24,t.canProceedToCheckout$))!=null&&i.isReady)||t.procedingToCheckout),s(3),u(t.procedingToCheckout?48:47)}}function Fs(r,c){r&1&&(X(0),e(1,` 1005 `),J())}function Bs(r,c){if(r&1&&(e(0,` 1006 `),M(1,Fs,2,0,"ng-container",18),e(2,` 1007 `)),r&2){let i=d(3),t=te(62);s(),x("ngTemplateOutlet",t)("ngTemplateOutletContext",ke(2,ls,i.bundles))}}function Ms(r,c){r&1&&ie(0)}function Ls(r,c){if(r&1&&(e(0,` 1008 `),M(1,Ms,1,0,"ng-container",14),e(2,` 1009 `)),r&2){d(3);let i=te(55);s(),x("ngTemplateOutlet",i)}}function Os(r,c){r&1&&(e(0,` 1010 `),a(1,"span"),e(2,"Continue to Checkout"),l(),e(3,` 1011 `))}function Vs(r,c){r&1&&(e(0,` 1012 `),a(1,"span"),e(2,` 1013 `),T(3,"i",59),e(4,`Processing...
1014 `),l(),e(5,` 1015 `))}function Us(r,c){if(r&1){let i=P();e(0,` 1016 `),a(1,"div"),e(2,` 1017 `),_(3,Bs,3,4),_(4,Ls,3,1),a(5,"div",51),e(6,` 1018 `),a(7,"div",52),e(8,` 1019 `),a(9,"app-time-slot",53,7),B(11,"async"),b("onClearFiltersRequested",function(){S(i);let n=d(2);return v(n.clearFilters())})("onPlayerReservedTimeSlots",function(n){S(i);let o=d(2);return v(o.handleReservedTimeSlots(n))})("onTimeSlotSelected",function(n){S(i);let o=d(2);return v(o.timeSlotSelected(n))}),e(12,` 1020 `),l(),e(13,` 1021 `),l(),e(14,` 1022 `),l(),e(15,` 1023 `),a(16,"div",54),e(17,` 1024 `),a(18,"div",55),e(19,` 1025 `),a(20,"button",56),b("click",function(){S(i);let n=d(2);return v(n.goBack())}),e(21,` 1026 `),T(22,"i",57),e(23,`Back 1027 `),l(),e(24,` 1028 `),a(25,"button",58),B(26,"async"),b("click",function(){S(i);let n=d(2);return v(n.proceedToCheckout())}),e(27,` 1029 `),_(28,Os,4,0)(29,Vs,6,0),l(),e(30,` 1030 `),l(),e(31,` 1031 `),l(),e(32,` 1032 `),l(),e(33,` 1033 `)}if(r&2){let i,t=d(2);s(),$("col-lg-9",t.hasSidebar)("col-md-8",t.hasSidebar)("col-12",!t.hasSidebar),s(2),u(t.hasPurchasableBundles?3:-1),s(),u(t.purchasedBundleSummaries.length>0?4:-1),s(5),x("registrationID",t.sessionRegistrationID)("playerID",t.player.playerID)("filters",ce(11,22,t.timeSlotFilters$))("totalBundleSessions$",t.totalBundleSessions$)("selectedTimeSlotsCount$",t.selectedTimeSlotsCount$)("coveredTimeSlotIDs",t.coveredTimeSlotIDs)("preSelectTimeSlotIDs",t.initialTimeSlotIDs)("registrationPricingRules",t.currentRegistration==null?null:t.currentRegistration.registrationPricingRules)("registrationNumberOfSessions",t.currentRegistration==null?null:t.currentRegistration.numberOfSessions)("componentView",t.TimeSlotComponentView.REGISTRATION)("autoAdvanceToFirstAvailable",!0)("fixedHeight",!1),s(16),x("disabled",!((i=ce(26,24,t.canProceedToCheckout$))!=null&&i.isReady)||t.procedingToCheckout),s(3),u(t.procedingToCheckout?29:28)}}function $s(r,c){if(r&1&&(e(0,` 1034 `),X(1),e(2,` 1035 `),a(3,"div",19),e(4,` 1036 `),_(5,fs,2,1),_(6,As,52,26)(7,Us,34,26),l(),e(8,` 1037 `),J(),e(9,` 1038 `)),r&2){let i=d();s(3),$("p-0",i.isMobileUser)("m-0",i.isMobileUser),s(2),u(i.isMobileUser?-1:5),s(),u(i.isMobileUser?6:7)}}function Ns(r,c){if(r&1){let i=P();e(0,` 1039 `),a(1,"app-null-card",60),b("buttonClicked",function(){S(i);let n=d();return v(n.showPickPlayer=!0)}),e(2,` 1040 `),l(),e(3,` 1041 `)}r&2&&(s(),x("image","player")("showButton",!0)("showCard",!1))}function Ws(r,c){r&1&&ie(0)}function Gs(r,c){if(r&1){let i=P();e(0,` 1042`),a(1,"p-drawer",61),G("visibleChange",function(n){S(i);let o=d();return W(o.showPickPlayer,n)||(o.showPickPlayer=n),v(n)}),e(2,` 1043 `),a(3,"div",13),e(4,` 1044 `),M(5,Ws,1,0,"ng-container",14),e(6,` 1045 `),l(),e(7,` 1046`),l(),e(8,` 1047`)}if(r&2){let i=d(),t=te(13);s(),Ke(i.mobileSheetStyle),N("visible",i.showPickPlayer),x("pt",i.mobileSheetPt),s(4),x("ngTemplateOutlet",t)}}function js(r,c){r&1&&ie(0)}function Ys(r,c){if(r&1){let i=P();e(0,` 1048`),a(1,"p-dialog",62),G("visibleChange",function(n){S(i);let o=d();return W(o.showPickPlayer,n)||(o.showPickPlayer=n),v(n)}),e(2,` 1049 `),M(3,js,1,0,"ng-container",14),e(4,` 1050`),l(),e(5,` 1051`)}if(r&2){let i=d(),t=te(13);s(),N("visible",i.showPickPlayer),x("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),s(2),x("ngTemplateOutlet",t)}}function zs(r,c){r&1&&(e(0,` 1052 `),a(1,"p"),e(2,`If you pick a different player, your current selections will be reset. You are 1053 able to 1054 register only a single player at a time. 1055 `),l(),e(3,` 1056 `))}function Hs(r,c){if(r&1){let i=P();e(0,` 1057 `),a(1,"div",64),b("click",function(){let n=S(i).$implicit,o=d(3);return v(o.selectPlayer(n))}),e(2,` 1058 `),a(3,"div",65),e(4,` 1059 `),a(5,"div",66),e(6,` 1060 `),a(7,"div",67),e(8,` 1061 `),a(9,"app-player-profile-photo",68),e(10,`
1062 `),l(),e(11,` 1063 `),l(),e(12,` 1064 `),a(13,"div",69),e(14,` 1065 `),a(15,"span",70),e(16),l(),e(17,` 1066 `),a(18,"div",71)(19,"i"),e(20),l()(),e(21,` 1067 `),l(),e(22,` 1068 `),l(),e(23,` 1069 `),l(),e(24,` 1070 `),l(),e(25,` 1071 `)}if(r&2){let i=c.$implicit,t=c.$index;s(9),x("player",i)("playerNumber",(t+1).toString())("largeCircle",!1)("initialsOnly",!1),s(7),le("",i.user.firstName,` 1072 `,i.user.lastName),s(4),D("",i.inactive?"Inactive":"Active"," Player")}}function qs(r,c){if(r&1){let i=P();e(0,` 1073 `),L(1,Hs,26,7,null,null,cs),a(3,"button",63),b("click",function(){S(i);let n=d(2);return v(n.showAddPlayer=!0)}),e(4,"Add Player"),l(),e(5,` 1074 `)}if(r&2){let i=d(2);s(),O(i.players)}}function Qs(r,c){if(r&1){let i=P();e(0,` 1075 `),a(1,"app-null-card",72),b("buttonClicked",function(){S(i);let n=d(2);return v(n.showAddPlayer=!0)}),e(2,` 1076 `),l(),e(3,` 1077 `)}r&2&&(s(),x("image","player")("showButton",!0)("showCard",!1))}function Ks(r,c){if(r&1&&(e(0,` 1078 `),_(1,zs,4,0),_(2,qs,6,0)(3,Qs,4,3)),r&2){let i=d();s(),u(i.cartService.selectedPlayer?1:-1),s(),u(i.players&&i.players.length>0?2:3)}}function Xs(r,c){if(r&1&&(X(0),e(1),B(2,"date"),J()),r&2){let i=d(4);s(),D(" \u2013 ",q(2,1,i.selectedTimeslot.endDate,"h:mm a"))}}function Js(r,c){if(r&1&&(e(0,` 1079 `),a(1,"div",82),e(2,` 1080 `),a(3,"div",83),e(4,` 1081 `),T(5,"i",84),e(6,` 1082 `),l(),e(7,` 1083 `),a(8,"span"),e(9),B(10,"date"),l(),e(11,` 1084 `),l(),e(12,` 1085 `),a(13,"div",82),e(14,` 1086 `),a(15,"div",83),e(16,` 1087 `),T(17,"i",85),e(18,` 1088 `),l(),e(19,` 1089 `),a(20,"span"),e(21),B(22,"date"),_(23,Xs,3,4,"ng-container"),l(),e(24,` 1090 `),l(),e(25,` 1091 `)),r&2){let i=d(3);s(9),D(` 1092 `,q(10,3,i.selectedTimeslot.startDate,"EEE, MMMM d"),` 1093 `),s(12),D(` 1094 `,q(22,6,i.selectedTimeslot.startDate,"h:mm a")),s(2),u(i.selectedTimeslot.endDate?23:-1)}}function Zs(r,c){if(r&1&&(e(0,` 1095 `),a(1,"div",77),e(2,` 1096 `),a(3,"div",78),e(4),l(),e(5,` 1097 `),_(6,Js,26,9),T(7,"hr",79),e(8,` 1098 `),a(9,"div",80),e(10,` 1099 `),a(11,"span",81),e(12,"Cost"),l(),e(13,` 1100 `),a(14,"span",81),e(15),B(16,"currency"),l(),e(17,` 1101 `),l(),e(18,` 1102 `),l(),e(19,` 1103 `)),r&2){let i=d(2);s(4),w(i.selectedTimeslot.timeSlotName||i.selectedTimeslot.title),s(2),u(i.selectedTimeslot.startDate?6:-1),s(9),w(q(16,3,i.selectedTimeslot.price??0,"USD"))}}function ec(r,c){if(r&1&&(e(0,` 1104 `),a(1,"span",87),e(2,` 1105 `),a(3,"span",88),e(4,` 1106 `),a(5,"app-player-profile-photo",89),e(6,` 1107 `),l(),e(7,` 1108 `),l(),e(8,` 1109 `),a(9,"span"),e(10),l(),e(11,` 1110 `),l(),e(12,` 1111 `)),r&2){let i=d(),t=i.$implicit,n=i.$index;s(5),x("player",t.player)("playerNumber",(n+1).toString())("initialsOnly",!1),s(5),w(t.name)}}function tc(r,c){if(r&1){let i=P();e(0,` 1112 `),a(1,"app-checkbox-row",86),G("ngModelChange",function(n){let o=S(i).$implicit;return W(o.selected,n)||(o.selected=n),v(n)}),b("selectionChange",function(n){let o=S(i).$implicit,m=d(2);return v(m.setSelectedCoach(o,n))}),e(2,` 1113 `),M(3,ec,13,4,"ng-template",null,8,ae),e(5,` 1114 `),l(),e(6,` 1115 `)}if(r&2){let i=c.$implicit,t=c.$index;s(),x("boldLabel",!0)("inputId","coach-"+t),N("ngModel",i.selected)}}function ic(r,c){if(r&1){let i=P();e(0,` 1116 `),X(1),e(2,` 1117 `),_(3,Zs,20,6),a(4,"div",73),e(5,"Please select a coach"),l(),e(6,` 1118 `),L(7,tc,7,3,null,null,de),a(9,"div",74),e(10,` 1119 `),a(11,"button",75),b("click",function(){S(i);let n=d();return v(n.selectCoach())}),e(12,"Add to Cart"),l(),e(13,` 1120 `),a(14,"button",76),b("click",function(){S(i);let n=d();return v(n.showPickCoach=!1)}),e(15,"Cancel"),l(),e(16,`
1121 `),l(),e(17,` 1122 `),J(),e(18,` 1123 `)}if(r&2){let i=d();s(3),u(i.selectedTimeslot?3:-1),s(4),O(i.coachesToSelect),s(4),x("disabled",!i.selectedCoach)}}function nc(r,c){r&1&&ie(0)}function rc(r,c){r&1&&ie(0)}function oc(r,c){r&1&&ie(0)}function ac(r,c){if(r&1&&e(0),r&2){let i=d();D(` 1124 Done \xB7 `,i.mobileCartLabel,` 1125 `)}}function lc(r,c){r&1&&e(0,` 1126 Done 1127 `)}function sc(r,c){if(r&1&&(e(0,` 1128 `),a(1,"app-pip-status-bar",99),e(2,` 1129 `),l(),e(3,` 1130 `)),r&2){let i=d(2).$implicit;s(),x("total",i.numberOfSessions)("totalUsed",i.numberOfSessions-i.remainingSessions)("ariaLabel",i.name+" time slots used")}}function cc(r,c){if(r&1&&(e(0,` 1131 `),a(1,"app-status-bar",100),e(2,` 1132 `),l(),e(3,` 1133 `)),r&2){let i=d(2).$implicit;s(),x("percent",i.usedPercent)("successThreshold",75)("criticalThreshold",100)("ariaLabel",i.name+" time slots used")}}function mc(r,c){if(r&1&&(e(0,` 1134 `),_(1,sc,4,3)(2,cc,4,4)),r&2){let i=d().$implicit;s(),u(i.numberOfSessions<25?1:2)}}function dc(r,c){r&1&&(e(0,` 1135 `),a(1,"span"),e(2,"Unlimited Time Slots"),l(),e(3,` 1136 `))}function pc(r,c){if(r&1&&(e(0,` 1137 `),a(1,"span"),e(2),l(),e(3,` 1138 `)),r&2){let i=d().$implicit;s(2),le("",i.remainingSessions," of ",i.numberOfSessions," Time Slots Left")}}function gc(r,c){if(r&1&&(e(0,` 1139 `),a(1,"span"),e(2),l(),e(3,` 1140 `)),r&2){let i=d().$implicit;s(2),D("",i.remainingSessions," Time Slots Left")}}function _c(r,c){if(r&1&&(e(0,` 1141 `),a(1,"span",71),e(2),B(3,"date"),l(),e(4,` 1142 `)),r&2){let i=d().$implicit;s(2),D("Expires ",q(3,1,i.expiresOn,"MMM d, y"))}}function uc(r,c){if(r&1&&(e(0,` 1143 `),a(1,"div",90),e(2,` 1144 `),a(3,"div",91),e(4,` 1145 `),T(5,"i",92),e(6,` 1146 `),a(7,"div",93),e(8,` 1147 `),e(9,` 1148 `),a(10,"div"),e(11,` 1149 `),a(12,"span",94),e(13),l(),e(14,` 1150 `),l(),e(15,` 1151 `),a(16,"div",95),e(17,` 1152 `),_(18,mc,3,1),l(),e(19,` 1153 `),l(),e(20,` 1154 `),l(),e(21,` 1155 `),a(22,"div",96),e(23,` 1156 `),a(24,"div",97),e(25,` 1157 `),_(26,dc,4,0)(27,pc,4,2)(28,gc,4,1),l(),e(29,` 1158 `),a(30,"div",98),e(31,` 1159 `),_(32,_c,5,4),l(),e(33,` 1160 `),l(),e(34,` 1161 `),l(),e(35,` 1162 `)),r&2){let i=c.$implicit,t=c.$index,n=c.$count;s(),$("pt-2",t!==0)("pb-2",t!==n-1)("border-bottom",t!==n-1),s(12),w(i.name),s(5),u(i.isUnlimited?-1:18),s(8),u(i.isUnlimited?26:i.numberOfSessions>0?27:28),s(6),u(i.expiresOn?32:-1)}}function hc(r,c){if(r&1&&(e(0,` 1163 `),a(1,"div"),e(2,` 1164 `),L(3,uc,36,10,null,null,ms),l(),e(5,` 1165`)),r&2){let i=c.showCard,t=d();s(),$("card",i!==!1),s(2),O(t.purchasedBundleSummaries)}}function Cc(r,c){if(r&1&&(e(0,` 1166 `),a(1,"div",101),e(2),l(),e(3,` 1167 `)),r&2){let i=d().heading;s(2),w(i)}}function xc(r,c){if(r&1&&(e(0,` 1168 `),a(1,"span",107),e(2),l(),e(3,` 1169 `)),r&2){let i=d(2).$implicit;s(),x("pTooltip",i.tooltipText),s(),w(i.sessionLabel)}}function fc(r,c){if(r&1&&(e(0,` 1170 `),a(1,"span"),e(2,` 1171 `),T(3,"app-pill",108),e(4,` 1172 `),l(),e(5,` 1173 `)),r&2){let i=c;s(3),x("nowrap",!0)("status",i.status)("text",i.name)}}function Sc(r,c){if(r&1&&(e(0,` 1174 `),a(1,"div",109),e(2),l(),e(3,` 1175 `)),r&2){let i=d(2).$implicit;s(2),w(i.tooltipText)}}function vc(r,c){if(r&1){let i=P();e(0,` 1176 `),e(1,` 1177 `),a(2,"div",102),e(3,` 1178 `),a(4,"div",103),e(5,` 1179 `),a(6,"div",104),e(7,` 1180 `),a(8,"span",105),e(9),l(),e(10,`
1181 `),_(11,xc,4,2),_(12,fc,6,3),l(),e(13,` 1182 `),a(14,"button",106),b("click",function(){S(i);let n=d().$implicit,o=d(2);return v(o.updateBundleEligibility(n.registrationID))}),e(15),l(),e(16,` 1183 `),l(),e(17,` 1184 `),_(18,Sc,4,1),l(),e(19,` 1185 `)}if(r&2){let i,t=d(),n=t.$implicit,o=t.$index,m=t.$count,p=d().showCard,g=d(),C=n.canRepurchase&&!g.procedingToCheckout;s(2),$("pb-2",p===!1)("mb-2",p===!1)("border-bottom",p===!1&&o!==m-1),s(7),w(n.name),s(2),u(n.sessionLabel?11:-1),s(),u((i=g.getBundleType(n.registrationCostTypeID))?12:-1,i),s(2),x("pTooltip",n.tooltipText)("disabled",!C),s(),D(` 1186 `,n.label,` 1187 `),s(3),u(g.isMobileUser&&n.tooltipText&&C?18:-1)}}function yc(r,c){if(r&1&&(e(0,` 1188 `),_(1,vc,20,13)),r&2){let i=c.$implicit,t=d(2);s(),u(i.registrationCostTypeID!==t.RegistrationCostType.VARIABLE?1:-1)}}function bc(r,c){if(r&1&&(e(0,` 1189 `),a(1,"div"),e(2,` 1190 `),_(3,Cc,4,1),L(4,yc,2,1,null,null,Xn),l(),e(6,` 1191`)),r&2){let i=c.bundles,t=c.heading,n=c.showCard;s(),$("card",n!==!1),s(2),u(t?3:-1),s(),O(i)}}function Pc(r,c){if(r&1&&(e(0,` 1192 `),a(1,"span",116),e(2),l(),e(3,` 1193 `)),r&2){let i=d(2);s(2),w(i.bundlesPromoLabel)}}function Ic(r,c){if(r&1&&(e(0,` 1194 `),T(1,"app-pill",127),e(2,` 1195 `)),r&2){let i=c;s(),x("nowrap",!0)("status",i.status)("text",i.name)}}function Tc(r,c){if(r&1&&(e(0,` 1196 `),a(1,"span",128),e(2),l(),e(3,` 1197 `)),r&2){let i=d(2).$implicit;s(2),w(i.description)}}function Dc(r,c){if(r&1&&(e(0,` 1198 `),T(1,"i",129),e(2,` 1199 `)),r&2){let i=c.active;s(),$("fa-chevron-down",i)("fa-chevron-right",!i)}}function wc(r,c){r&1&&(X(0),e(1," every month"),J())}function Ec(r,c){if(r&1&&(X(0),e(1),B(2,"date"),J()),r&2){let i=d(3).$implicit;s(),D(" \u2013 ",q(2,1,i.sessionOverrideEndDate,"MMM d, y"))}}function Rc(r,c){if(r&1&&(e(0,` 1200 `),a(1,"div",82),e(2,` 1201 `),a(3,"div",83),e(4,` 1202 `),T(5,"i",84),e(6,` 1203 `),l(),e(7,` 1204 `),a(8,"span"),e(9),B(10,"date"),_(11,Ec,3,4,"ng-container"),l(),e(12,` 1205 `),l(),e(13,` 1206 `)),r&2){let i=d(2).$implicit;s(9),D(` 1207 `,q(10,2,i.sessionOverrideStartDate,"MMM d, y")),s(2),u(i.sessionOverrideEndDate?11:-1)}}function kc(r,c){if(r&1&&(e(0,` 1208 `),a(1,"div",82),e(2,` 1209 `),a(3,"div",83),e(4,` 1210 `),T(5,"i",130),e(6,` 1211 `),l(),e(7,` 1212 `),a(8,"span"),e(9),B(10,"date"),l(),e(11,` 1213 `),l(),e(12,` 1214 `)),r&2){let i=d(2).$implicit;s(9),D(` 1215 Register by `,q(10,1,i.endDate,"MMM d, y"),` 1216 `)}}function Ac(r,c){r&1&&(X(0),e(1,", "),J())}function Fc(r,c){if(r&1&&(e(0),_(1,Ac,2,0,"ng-container")),r&2){let i=c.$implicit,t=c.$index,n=c.$count,o=d(5);w(o.getDayOfWeek(i)),s(),u(t!==n-1?1:-1)}}function Bc(r,c){if(r&1&&(e(0,` 1217 `),a(1,"div",131),e(2,` 1218 `),a(3,"div",83),e(4,` 1219 `),T(5,"i",85),e(6,`
1220 `),l(),e(7,` 1221 `),a(8,"span"),e(9,` 1222 `),L(10,Fc,2,2,null,null,de),l(),e(12,` 1223 `),l(),e(13,` 1224 `)),r&2){let i=d(2).$implicit;s(10),O(i.daysOfWeek)}}function Mc(r,c){if(r&1&&(e(0,` 1225 `),a(1,"div",131),e(2,` 1226 `),a(3,"div",83),e(4,` 1227 `),T(5,"i",132),e(6,` 1228 `),l(),e(7,` 1229 `),a(8,"span"),e(9),l(),e(10,` 1230 `),l(),e(11,` 1231 `)),r&2){let i=d(2).$implicit;s(9),w((i.practiceFacility==null?null:i.practiceFacility.name)||i.location)}}function Lc(r,c){r&1&&(X(0),e(1,", "),J())}function Oc(r,c){if(r&1&&(e(0),_(1,Lc,2,0,"ng-container")),r&2){let i=c.$implicit,t=c.$index,n=c.$count;w(i.description),s(),u(t!==n-1?1:-1)}}function Vc(r,c){if(r&1&&(e(0,` 1232 `),X(1),e(2,"Grades: "),L(3,Oc,2,2,null,null,ds),e(5,"; "),J(),e(6,` 1233 `)),r&2){let i=d(3).$implicit;s(3),O(i.grades)}}function Uc(r,c){if(r&1&&(e(0,` 1234 `),X(1),e(2),B(3,"date"),B(4,"date"),J(),e(5,` 1235 `)),r&2){let i=d(3).$implicit;s(2),le("Born ",q(3,2,i.birthDateFrom,"MMM d, y")," \u2013 ",q(4,5,i.birthDateTo,"MMM d, y"),"; ")}}function $c(r,c){if(r&1&&(e(0,` 1236 `),a(1,"div",131),e(2,` 1237 `),a(3,"div",83),e(4,` 1238 `),T(5,"i",133),e(6,` 1239 `),l(),e(7,` 1240 `),a(8,"span"),e(9,` 1241 `),_(10,Vc,7,0),_(11,Uc,6,8),e(12),l(),e(13,` 1242 `),l(),e(14,` 1243 `)),r&2){let i=d(2).$implicit;s(10),u(i.grades!=null&&i.grades.length?10:-1),s(),u(i.birthDateFrom&&i.birthDateTo?11:-1),s(),D(` 1244 Gender: `,i.gender||"All",` 1245 `)}}function Nc(r,c){if(r&1&&(e(0,` 1246 `),T(1,"div",134),e(2,` 1247 `)),r&2){let i=d(2).$implicit;s(),x("innerHTML",i.details,Qe)}}function Wc(r,c){if(r&1&&(e(0,` 1248 `),a(1,"div",109),e(2),l(),e(3,` 1249 `)),r&2){let i=d(2).$implicit;s(2),w(i.tooltipText)}}function Gc(r,c){if(r&1){let i=P();e(0,` 1250 `),e(1,` 1251 `),a(2,"div",51),e(3,` 1252 `),a(4,"div",117),e(5,` 1253 `),a(6,"div",118),e(7,` 1254 `),a(8,"div",119),e(9,` 1255 `),a(10,"div"),e(11,` 1256 `),T(12,"i",120),e(13," "),a(14,"span",81),e(15),l(),e(16,` 1257 `),_(17,Ic,3,3),l(),e(18,` 1258 `),_(19,Tc,4,1),l(),e(20,` 1259 `),a(21,"p-accordion",121),e(22,` 1260 `),a(23,"p-accordion-panel",122),e(24,` 1261 `),a(25,"p-accordion-header"),e(26,` 1262 `),M(27,Dc,3,4,"ng-template",null,9,ae),e(29,` 1263 `),a(30,"span",123),e(31,"More Details"),l(),e(32,` 1264 `),l(),e(33,` 1265 `),a(34,"p-accordion-content"),e(35,` 1266 `),a(36,"div",124),e(37,` 1267 `),a(38,"div",82),e(39,` 1268 `),a(40,"div",83),e(41,` 1269 `),T(42,"i",38),e(43,`
1270 `),l(),e(44,` 1271 `),a(45,"span"),e(46),_(47,wc,2,0,"ng-container"),l(),e(48,` 1272 `),l(),e(49,` 1273 `),_(50,Rc,14,5),_(51,kc,13,4),_(52,Bc,14,0),_(53,Mc,12,1),_(54,$c,15,3),_(55,Nc,3,1),l(),e(56,` 1274 `),l(),e(57,` 1275 `),l(),e(58,` 1276 `),l(),e(59,` 1277 `),l(),e(60,` 1278 `),a(61,"div",125),e(62,` 1279 `),a(63,"span",126),e(64),B(65,"currency"),l(),e(66,` 1280 `),a(67,"div"),e(68,` 1281 `),a(69,"button",106),b("click",function(){S(i);let n=d().$implicit,o=d(2);return v(o.updateBundleEligibility(n.registrationID))}),e(70),l(),e(71,` 1282 `),l(),e(72,` 1283 `),l(),e(73,` 1284 `),l(),e(74,` 1285 `),_(75,Wc,4,1),l(),e(76,` 1286 `)}if(r&2){let i,t=d(),n=t.$implicit,o=t.$index,m=t.$count,p=d(2),g=n.canRepurchase&&!p.procedingToCheckout;s(2),$("mb-0",o===m-1),s(13),w(n.name),s(2),u((i=p.getBundleType(n.registrationCostTypeID))?17:-1,i),s(2),u(n.description?19:-1),s(2),x("value",n.name),s(25),D(` 1287 `,n.numberOfSessions??"Unlimited"," time slots"),s(),u(n.registrationCostTypeID===p.RegistrationCostType.SUBSCRIPTION?47:-1),s(3),u(n.sessionOverrideStartDate?50:-1),s(),u(n.endDate?51:-1),s(),u(n.daysOfWeek!=null&&n.daysOfWeek.length?52:-1),s(),u(n.practiceFacility!=null&&n.practiceFacility.name||n.location?53:-1),s(),u(n.grades!=null&&n.grades.length||n.birthDateFrom&&n.birthDateTo||n.gender?54:-1),s(),u(n.details?55:-1),s(9),w(ce(65,19,n.price||0)),s(5),x("pTooltip",n.tooltipText)("disabled",!g),s(),D(` 1288 `,n.label,` 1289 `),s(5),u(p.isMobileUser&&n.tooltipText&&g?75:-1)}}function jc(r,c){if(r&1&&(e(0,` 1290 `),_(1,Gc,77,21)),r&2){let i=c.$implicit,t=d(2);s(),u(i.registrationCostTypeID!==t.RegistrationCostType.VARIABLE?1:-1)}}function Yc(r,c){if(r&1){let i=P();e(0,` 1291 `),a(1,"div",110),e(2,` 1292 `),a(3,"div",111),e(4,` 1293 `),a(5,"div",87),e(6,` 1294 `),T(7,"i",112),e(8,` 1295 `),a(9,"div"),e(10,` 1296 `),a(11,"div"),e(12,"Save with a training bundle"),l(),e(13,` 1297 `),_(14,Pc,4,1),l(),e(15,` 1298 `),l(),e(16,` 1299 `),a(17,"div"),e(18,` 1300 `),a(19,"button",113),b("click",function(){S(i);let n=d();return v(n.showBundles=!n.showBundles)}),e(20,` 1301 View Bundle Options 1302 `),T(21,"i",114),e(22,` 1303 `),l(),e(23,` 1304 `),l(),e(24,` 1305 `),l(),e(25,` 1306 `),a(26,"div",115),e(27,` 1307 `),L(28,jc,2,1,null,null,Xn),l(),e(30,` 1308 `),l(),e(31,` 1309`)}if(r&2){let i=c.bundles,t=c.showCard,n=d();s(),$("card",t!==!1)("py-2",t!==!1),s(2),$("mb-3",n.showBundles),s(11),u(n.bundlesPromoLabel?14:-1),s(7),$("fa-chevron-up",n.showBundles)("fa-chevron-down",!n.showBundles),s(5),$("expand-height--expanded",n.showBundles),s(2),O(i)}}function zc(r,c){if(r&1){let i=P();e(0,` 1310 `),a(1,"div",95),e(2,` 1311 `),a(3,"p-checkbox",135),G("ngModelChange",function(n){let o=S(i).$implicit;return W(o.selected,n)||(o.selected=n),v(n)}),b("onChange",function(n){let o=S(i).$implicit,m=d(3);return v(m.toggleSignUpFilter(o,n))}),e(4,` 1312 `),l(),e(5,` 1313 `),a(6,"label",136),e(7),l(),e(8,` 1314 `),l(),e(9,` 1315 `)}if(r&2){let i=c.$implicit;s(3),N("ngModel",i.selected),x("inputId","checkbox-"+i.scheduleSignUpID),s(3),x("for","checkbox-"+i.scheduleSignUpID),s(),w(i.name)}}function Hc(r,c){if(r&1&&(e(0,` 1316 `),a(1,"div",51),e(2,` 1317 `),a(3,"div",101),e(4,"Time Slot Groups"),l(),e(5,` 1318 `),a(6,"div",95),e(7,` 1319 `),L(8,zc,10,4,null,null,ps),l(),e(10,`
1320 `),l(),e(11,` 1321 `)),r&2){let i=d(2);s(8),O(i.signUps)}}function qc(r,c){if(r&1&&(e(0,` 1322 `),_(1,Hc,12,0)),r&2){let i=d();s(),u(i.signUps&&i.signUps.length>0?1:-1)}}function Qc(r,c){if(r&1){let i=P();e(0,` 1323 `),a(1,"div",149),e(2,` 1324 `),a(3,"p-checkbox",150),G("ngModelChange",function(n){let o=S(i).$implicit;return W(o.selected,n)||(o.selected=n),v(n)}),b("onChange",function(n){let o=S(i).$implicit,m=d(4);return v(m.toggleFacilityFilter(o,n))}),e(4,` 1325 `),l(),a(5,"label",151),e(6),l(),e(7,` 1326 `),l(),e(8,` 1327 `)}if(r&2){let i=c.$implicit,t=c.$index,n=c.$count;s(),x("ngClass",ke(3,Ti,t!==n-1)),s(2),N("ngModel",i.selected),s(3),w(i.locationName)}}function Kc(r,c){if(r&1&&(e(0,` 1328 `),a(1,"p-accordion-panel",148),e(2,` 1329 `),a(3,"p-accordion-header"),e(4,"Facilities"),l(),e(5,` 1330 `),a(6,"p-accordion-content"),e(7,` 1331 `),L(8,Qc,9,5,null,null,gs),l(),e(10,` 1332 `),l(),e(11,` 1333 `)),r&2){let i=d(3);s(),x("value",0),s(7),O(i.facilities)}}function Xc(r,c){if(r&1){let i=P();e(0,` 1334 `),a(1,"div",152),e(2,` 1335 `),a(3,"p-checkbox",150),G("ngModelChange",function(n){let o=S(i).$implicit;return W(o.selected,n)||(o.selected=n),v(n)}),b("onChange",function(n){let o=S(i).$implicit,m=d(4);return v(m.toggleCoachFilter(o,n))}),e(4,` 1336 `),l(),a(5,"label",151),e(6),l(),e(7,` 1337 `),l(),e(8,` 1338 `)}if(r&2){let i=c.$implicit,t=c.$index,n=c.$count;s(),x("ngClass",ke(3,Ti,t!==n-1)),s(2),N("ngModel",i.selected),s(3),w(i.name)}}function Jc(r,c){if(r&1&&(e(0,` 1339 `),a(1,"p-accordion-panel",148),e(2,` 1340 `),a(3,"p-accordion-header"),e(4,"Coaches"),l(),e(5,` 1341 `),a(6,"p-accordion-content"),e(7,` 1342 `),L(8,Xc,9,5,null,null,_s),l(),e(10,` 1343 `),l(),e(11,` 1344 `)),r&2){let i=d(3);s(),x("value",1),s(7),O(i.coaches)}}function Zc(r,c){if(r&1){let i=P();e(0,` 1345 `),a(1,"div",152),e(2,` 1346 `),a(3,"p-checkbox",153),G("ngModelChange",function(n){let o=S(i).$implicit;return W(o.selected,n)||(o.selected=n),v(n)}),b("onChange",function(n){let o=S(i).$implicit,m=d(4);return v(m.toggleDayFilter(o,n))}),e(4,` 1347 `),l(),a(5,"label",151),e(6),l(),e(7,` 1348 `),l(),e(8,` 1349 `)}if(r&2){let i=c.$implicit,t=c.$index,n=c.$count;s(),x("ngClass",ke(3,Ti,t!==n-1)),s(2),N("ngModel",i.selected),s(3),w(i.label)}}function em(r,c){if(r&1&&(e(0,` 1350 `),a(1,"p-accordion-panel",148),e(2,` 1351 `),a(3,"p-accordion-header"),e(4,"Day of Week"),l(),e(5,` 1352 `),a(6,"p-accordion-content"),e(7,` 1353 `),L(8,Zc,9,5,null,null,us),l(),e(10,` 1354 `),l(),e(11,` 1355 `)),r&2){let i=d(3);s(),x("value",2),s(7),O(i.days)}}function tm(r,c){if(r&1&&(e(0,` 1356 `),a(1,"p-accordion",147),e(2,` 1357 `),_(3,Kc,12,1),_(4,Jc,12,1),_(5,em,12,1),l(),e(6,` 1358 `)),r&2){let i=d(2);s(),x("multiple",!0),s(2),u(i.hasFacilities?3:-1),s(),u(i.hasCoaches?4:-1),s(),u(i.hasDays?5:-1)}}function im(r,c){if(r&1){let i=P();e(0,` 1359 `),a(1,"div",137),e(2,` 1360 `),a(3,"div",138),e(4,` 1361 `),a(5,"span"),e(6,"FILTERS"),l(),e(7,` 1362 `),e(8,` 1363 `),a(9,"button",139),b("click",function(){S(i);let n=d();return v(n.clearFilters())}),e(10,` 1364 `),T(11,"i",140),e(12,`Reset all 1365 `),l(),e(13,` 1366 `),l(),e(14,` 1367 `),a(15,"div",141),e(16,` 1368 `),a(17,"label",142),e(18,"Search"),l(),e(19,` 1369 `),a(20,"input",143),G("ngModelChange",function(n){S(i);let o=d();return W(o.titleFilter,n)||(o.titleFilter=n),v(n)}),b("ngModelChange",function(n){S(i);let o=d();return v(o.onTitleFilterChange(n))}
1369),l(),e(21,` 1370 `),l(),e(22,` 1371 `),a(23,"div"),e(24,` 1372 `),a(25,"label",144),e(26,"Time of Day"),l(),e(27,` 1373 `),a(28,"p-inputgroup"),e(29,` 1374 `),a(30,"p-datepicker",145),G("ngModelChange",function(n){S(i);let o=d();return W(o.startTimeFilter,n)||(o.startTimeFilter=n),v(n)}),b("ngModelChange",function(){S(i);let n=d();return v(n.onTimeRangeFilterChange())}),l(),e(31,` 1375 `),a(32,"p-inputgroup-addon"),e(33,"to"),l(),e(34,` 1376 `),a(35,"p-datepicker",146),G("ngModelChange",function(n){S(i);let o=d();return W(o.endTimeFilter,n)||(o.endTimeFilter=n),v(n)}),b("ngModelChange",function(){S(i);let n=d();return v(n.onTimeRangeFilterChange())}),l(),e(36,` 1377 `),l(),e(37,` 1378 `),l(),e(38,` 1379 `),_(39,tm,7,4),l(),e(40,` 1380`)}if(r&2){let i=d();s(20),N("ngModel",i.titleFilter),s(10),x("timeOnly",!0),N("ngModel",i.startTimeFilter),s(5),x("timeOnly",!0),N("ngModel",i.endTimeFilter),s(4),u(i.hasFilterOptions?39:-1)}}function nm(r,c){if(r&1){let i=P();e(0,` 1381 `),a(1,"div",51),e(2,` 1382 `),a(3,"div",154),e(4,` 1383 `),a(5,"div",155),e(6,` 1384 `),a(7,"app-player-profile-photo",89),e(8,` 1385 `),l(),e(9,` 1386 `),l(),e(10,` 1387 `),a(11,"div",156),e(12),l(),e(13,` 1388 `),l(),e(14,` 1389 `),a(15,"div",157),e(16,` 1390 `),a(17,"button",158),b("click",function(){S(i);let n=d(2);return v(n.showPickPlayer=!0)}),e(18,` 1391 Change Player 1392 `),l(),e(19,` 1393 `),l(),e(20,` 1394 `),l(),e(21,` 1395 `)}if(r&2){let i=d(2);s(7),x("player",i.cartService.selectedPlayer)("playerNumber","1")("initialsOnly",!1),s(5),le("",i.cartService.selectedPlayer.user.firstName,` 1396 `,i.cartService.selectedPlayer.user.lastName)}}function rm(r,c){r&1&&ie(0)}function om(r,c){r&1&&ie(0)}function am(r,c){if(r&1&&(e(0,` 1397 `),_(1,nm,22,5),M(2,rm,1,0,"ng-container",14),e(3,` 1398 `),M(4,om,1,0,"ng-container",14),e(5,` 1399`)),r&2){let i=d(),t=te(66),n=te(70);s(),u(i.cartService.selectedPlayer?1:-1),s(),x("ngTemplateOutlet",t),s(2),x("ngTemplateOutlet",n)}}var Kn=[{costTypeID:K.FIXED,name:"Bundle Pack",status:"info"},{costTypeID:K.SUBSCRIPTION,name:"Subscription",status:"primary"},{costTypeID:K.UNLIMITED,name:"Unlimited Session",status:"active"}],ai=(()=>{let c=class c{constructor(t,n,o,m,p,g,C,h,f,y,I){this.cartService=t,this.route=n,this.router=o,this.registerService=m,this.playerService=p,this.userService=g,this.siteDataService=C,this.allProgramsShellService=h,this.checkoutChainService=f,this.checkoutStatePersistenceService=y,this.pageBuilderContentService=I,this.unsubscribe$=new xe,this.TimeSlotComponentView=Tn,this.RegistrationCostType=K,this.mobileSheetStyle=ti,this.mobileSheetPt=ii,this.loading=!0,this.procedingToCheckout=!1,this.showPickPlayer=!1,this.showAddPlayer=!1,this.showPickCoach=!1,this.showMobileFilters=!1,this.showMobileBundles=!1,this.showMobileBundleSummary=!1,this.cantCheckOut=!0,this.coachesToSelect=[],this.error="",this.sessionRegistrationID=null,this.selectedTimeSlots=[],this.initialTimeSlotIDs=[],this.signUps=[],this.allSignUps=[],this.regIdToBundleMap=new Map,this.programName="",this.players=[],this.bundles=[],this.bundlesPromoLabel="",this.facilities=[],this.coaches=[],this.days=[],this.hasFacilities=!1,this.hasCoaches=!1,this.hasDays=!1,this.hasFilterOptions=!1,this.titleFilter="",this.startTimeFilter="",this.endTimeFilter="",this.hasSidebar=!1,this.hasPurchasableBundles=!1,this.activeFilterCount=0,this.activeFilterChips=[],this.purchasedBundles=[],this.purchasedBundleIDs=new Set,this.purchasedBundleSummaries=[],this.purchasedBundleSummaryLabel="",this.coveredTimeSlotIDs=new Set,this.mobileCartLabel="",this.programContextInitialized=!1,this.facilitiesDiscoveryAttached=!1,this.cartItemsListenerAttached=!1,this.selectedTimeSlots$=new Ee([]),this._totalBundleSessions$=new Ee(0),this.allProgramsTimeslotsService=Ai(_t),this.isMobileUser=!1,this.bundleEligibility$=this.allProgramsTimeslotsService.bundleEligibility$,this.timeSlotFilters$=this.allProgramsTimeslotsService.timeSlotFilters$,this.canProceedToCheckout$=this.allProgramsTimeslotsService.canProceedToCheckout$,this.isLoadingInitialContext$=this.allProgramsTimeslotsService.isLoadingInitialContext$,this.initializationError$=this.allProgramsTimeslotsService.initializationError$,this.totalBundleSessions$=this._totalBundleSessions$.asObservable(),this.selectedTimeSlotsCount$=this.selectedTimeSlots$.pipe(re(k=>k.length)),this.showBundles=!1,this.dayLabels=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1399ay","Saturday"]}ngOnInit(){this.allProgramsShellService.isInProgramView=!0,this.isMobileUser=this.allProgramsShellService.getShellStateSnapshot().isMobileUser??!1,this.allProgramsShellService.setShellState({hideHeaderCart:this.isMobileUser}),this.allProgramsShellService.shellState$.pipe(re(t=>t.isMobileUser??!1),A(this.unsubscribe$)).subscribe({next:t=>{t!==this.isMobileUser&&(this.isMobileUser=t,this.allProgramsShellService.setShellState({hideHeaderCart:t}))},error:()=>{}}),this.allProgramsShellService.pickPlayerRequested$.pipe(A(this.unsubscribe$)).subscribe(()=>{this.showPickPlayer=!0}),this.route.params.pipe(A(this.unsubscribe$)).subscribe({next:t=>{let n=+t.programID||this.cartService.currentProgramID;this.programID=n,this.updateShellBreadcrumbs("","","");let o=+this.route.snapshot.queryParams.playerID||void 0;this.lastHandledQueryPlayerID=o,this.loadPlayers(o);let m=this.cartService.selectedPlayer?.playerID;if(!(o&&o!==m)){if(!m){this.promptForPlayerPick();return}this.initializeForPlayer(n,m)}},error:()=>{this.error="Unable to read registration details.",this.siteDataService.hideSiteLoader(),this.loading=!1}}),this.route.queryParams.pipe(A(this.unsubscribe$)).subscribe({next:t=>{let n=+t.playerID||void 0;if(!(!n||n===this.lastHandledQueryPlayerID||n===this.player?.playerID))if(this.lastHandledQueryPlayerID=n,this.players.length>0){let o=this.players.find(m=>m.playerID===n);o?this.selectPlayer(o):this.promptForPlayerPick()}else this.loadPlayers(n)},error:()=>{this.error="Unable to read registration details.",this.siteDataService.hideSiteLoader(),this.loading=!1}})}ngOnDestroy(){this.allProgramsShellService.isInProgramView=!1,this.allProgramsShellService.setShellState({hideHeaderCart:!1}),this.closeMobileSheets(),this.unsubscribe$.next(),this.unsubscribe$.complete()}closeMobileSheets(){this.showMobileFilters=!1,this.showMobileBundles=!1,this.showPickPlayer=!1}initializeForPlayer(t,n){this.loading=!0,this.error="",this.closeMobileSheets(),this.playerService.playerID=n,this.allProgramsTimeslotsService.initializeForContext(t,n).pipe(A(this.unsubscribe$),Ne(o=>{this.bundles=o.bundles,this.purchasedBundles=o.purchasedBundles,this.aLaCarteRegistrationID=o.aLaCarteRegistrationID,this.sessionRegistrationID=o.sessionRegistrationID,this.programName=o.programName,this.updateShellBreadcrumbs(o.programName,o.programCategory,o.programType);let m=this.route.snapshot.queryParams,p=new Set;m&&m.scheduleSignUpID&&(Array.isArray(m.scheduleSignUpID)?m.scheduleSignUpID.forEach(g=>p.add(+g)):typeof m.scheduleSignUpID=="string"&&p.add(+m.scheduleSignUpID)),this.signUps=o.signUps.map(g=>z(j({},g),{selected:p.size===0||p.has(g.scheduleSignUpID)})),this.allSignUps=[...this.signUps],this.player=o.player,this.regIdToBundleMap=new Map(o.purchasedBundles.map(g=>[g.registrationID,g])),this.purchasedBundleIDs=new Set(o.purchasedBundles.map(g=>g.registrationID)),this.refreshBundleDisplayState(),this.facilitiesDiscoveryAttached||(this.discoverFacilitiesAndCoaches(),this.facilitiesDiscoveryAttached=!0),this.loadRegistrationContext(),this.updateTotalBundleSessionsCount(),this.updateSidebarVisibility(),this.programContextInitialized=!0,p.size>0&&this.allProgramsTimeslotsService.updateSignUpsFilter(Array.from(p))}),se(o=>(console.error("Error during initialization:",o),this.error=o?.message||"Unable to load registration details.",this.siteDataService.hideSiteLoader(),this.loading=!1,U(void 0)))).subscribe({next:()=>{},error:o=>{console.error("Error during initialization:",o),this.error=o?.message||"Unable to load registration details.",this.siteDataService.hideSiteLoader(),this.loading=!1}}),this.cartItemsListenerAttached||(this.listenToCartItems(),this.cartItemsListenerAttached=!0)}setSelectedCoach(t,n){this.selectedCoach=n?t:void 0,this.coachesToSelect.forEach(o=>{o.selected=o.staffID===this.selectedCoach?.staffID})}getDayOfWeek(t){return ji(t)}updateBundleEligibility(t){let n=this.bundles.find(o=>o.registrationID===t);if(ee("Updating bundle eligibility for bundle in all-programs-timeslots component:",n,"requested registration ID:",t),!n?.registrationID){this.siteDataService.showSiteErrorAlert("Invalid bundle data. Please try again.");return}this.allProgramsTimeslotsService.addBundleAndUpdateEligibility(n,this.programName),this.refreshBundleDisplayState(),this.updateTotalBundleSessionsCount()}listenToCartItems(){this.cartService.cartItems$.pipe(A(this.unsubscribe$)).subscribe({next:t=>{this.syncSelectedTimeSlotsFromCart(t),this.refreshBundleDisplayState(),this.updateTotalBundleSessionsCount(),this.updateSidebarVisibility(),this.mobileCartLabel=this.buildMobileCartLabel()},error:()=>{this.error="Unable to load selected time slots."}})}buildMobileCartLabel(){let t=this.cartService.getCartItems()??[],n=t.filter(g=>
1399g.cartItemType===We.TIME_SLOT||!!g.timeSlot).length,o=t.filter(g=>g.cartItemType===We.BUNDLE).length,m=t.filter(g=>g.cartItemType===We.REGISTRATION).length,p=[];return n>0&&p.push(`${n} ${n===1?"time slot":"time slots"}`),o>0&&p.push(`${o} ${o===1?"bundle":"bundles"}`),m>0&&p.push(`${m} ${m===1?"registration":"registrations"}`),p.join(" \xB7 ")}get filterResultsLabel(){if(!this.timeSlots||this.timeSlots.loading)return"Updating\u2026";let t=this.timeSlots.totalRecords??0;return t===1?"Show 1 session":`Show ${t} sessions`}openCart(){this.allProgramsShellService.requestOpenCart()}updateTotalBundleSessionsCount(){this._totalBundleSessions$.next(this.cartService.getTotalBundleSessionsForProgram(this.programID))}discoverFacilitiesAndCoaches(){this.siteDataService.loadedTimeSlots.pipe(A(this.unsubscribe$)).subscribe(t=>{let n=new Set,o=[],m=[],p=new Set,g=new Set;t.forEach(h=>{h.locationID&&!n.has(h.locationID)&&(n.add(h.locationID),o.push({locationID:h.locationID,locationName:h.locationName,selected:!0})),h.staffAssignments?.filter(f=>(f?.isAccepted??!1)===!0).forEach(f=>{let y=f.clubUserID;y&&!p.has(y)&&(p.add(y),m.push({staffID:y,name:nt([f])||"Coach",selected:!0}))}),h.startDate&&g.add(new Date(h.startDate).getDay())}),this.facilities=o,this.coaches=m,this.days=Array.from(g).sort((h,f)=>h-f).map(h=>({dayOfWeek:h,label:this.dayLabels[h],selected:!0})),this.hasFacilities=this.facilities.length>0,this.hasCoaches=this.coaches.length>0,this.hasDays=this.days.length>0,this.hasFilterOptions=this.hasFacilities||this.hasCoaches||this.hasDays;let C=this.allProgramsTimeslotsService.currentDaysOfWeek;if(C&&C.length>0){let h=this.days.map(f=>f.dayOfWeek).filter(f=>!C.includes(f));if(h.length>0){let f=[...C,...h];this.allProgramsTimeslotsService.updateDaysFilter(f),this.days.forEach(y=>y.selected=f.includes(y.dayOfWeek))}else this.days.forEach(f=>f.selected=C.includes(f.dayOfWeek))}this.updateSidebarVisibility(),ee("coaches:",this.coaches)})}updateSidebarVisibility(){this.hasPurchasableBundles=(this.bundles??[]).some(t=>t.registrationCostTypeID!==K.VARIABLE),this.bundlesPromoLabel=this.buildBundlesPromoLabel(),this.hasSidebar=!!this.cartService.selectedPlayer||this.signUps?.length>0||this.hasPurchasableBundles||this.hasFilterOptions,this.refreshActiveFilterCount()}getBundleType(t){return Kn.find(n=>n.costTypeID===t)??null}buildBundlesPromoLabel(){let t=Kn.filter(n=>(this.bundles??[]).some(o=>o.registrationCostTypeID===n.costTypeID)).map(n=>n.name);return t.length?t.length===1?`${t[0]} options available`:t.length===2?`${t[0]} and ${t[1]} options available`:`${t.slice(0,-1).join(", ")}, and ${t[t.length-1]} options available`:""}refreshActiveFilterCount(){let t=[],n=(o,m)=>{t.push({group:o,label:m,removeAriaLabel:`Remove filter: ${m}`})};this.titleFilter?.trim()&&n("title",`\u201C${this.titleFilter.trim()}\u201D`),(this.startTimeFilter||this.endTimeFilter)&&n("time",this.buildTimeFilterLabel()),this.pushGroupChip(n,"signUp",this.signUps,o=>o.name,"sign ups"),this.pushGroupChip(n,"facility",this.facilities,o=>o.locationName,"facilities"),this.pushGroupChip(n,"coach",this.coaches,o=>o.name,"coaches"),this.pushGroupChip(n,"day",this.days,o=>o.label,"days"),this.activeFilterChips=t,this.activeFilterCount=t.length}pushGroupChip(t,n,o,m,p){if(!(o?.length>0)||!o.some(C=>!C.selected))return;let g=o.filter(C=>C.selected);if(g.length===1){t(n,m(g[0])||`1 ${p}`);return}t(n,g.length===0?`No ${p}`:`${g.length} ${p}`)}buildTimeFilterLabel(){let t=m=>{let p=m instanceof Date?m:new Date(m);return Gi(p)?p.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"}):""},n=this.startTimeFilter?t(this.startTimeFilter):"",o=this.endTimeFilter?t(this.endTimeFilter):"";return n&&o?`${n} \u2013 ${o}`:n?`After ${n}`:`Before ${o}`}removeFilterChip(t){switch(t.group){case"title":this.onTitleFilterChange("");break;case"time":this.startTimeFilter="",this.endTimeFilter="",this.onTimeRangeFilterChange();break;case"signUp":this.signUps?.forEach(n=>n.selected=!0),this.allProgramsTimeslotsService.updateSignUpsFilter(this.signUps.map(n=>n.scheduleSignUpID)),this.refreshActiveFilterCount();break;
1399case"facility":this.facilities.forEach(n=>n.selected=!0),this.allProgramsTimeslotsService.updateFacilitiesFilter(this.facilities.map(n=>n.locationID)),this.refreshActiveFilterCount();break;case"coach":this.coaches.forEach(n=>n.selected=!0),this.allProgramsTimeslotsService.updateCoachesFilter(this.coaches.map(n=>n.staffID)),this.refreshActiveFilterCount();break;case"day":this.days.forEach(n=>n.selected=!0),this.allProgramsTimeslotsService.updateDaysFilter(this.days.map(n=>n.dayOfWeek)),this.refreshActiveFilterCount();break}}refreshBundleDisplayState(){this.allProgramsTimeslotsService.refreshBundlesDisplayState(this.bundles,this.selectedTimeSlots.length,this.programID);let t=this.allProgramsTimeslotsService.getCoverageAllocation(this.programID);this.purchasedBundleSummaries=this.allProgramsTimeslotsService.buildPurchasedBundleSummaries(this.purchasedBundles,this.programID,t),this.purchasedBundleSummaryLabel=this.buildPurchasedBundleSummaryLabel(this.purchasedBundleSummaries),this.coveredTimeSlotIDs=t.coveredSlotIDs}buildPurchasedBundleSummaryLabel(t){if(!t?.length)return"";let n=`${t.length} ${t.length===1?"bundle":"bundles"}`,o=t.some(p=>p.isUnlimited),m=t.reduce((p,g)=>p+(g.remainingSessions??0),0);return o&&m===0?`${n} \xB7 Unlimited time slots`:o?`${n} \xB7 ${m} time slots left + unlimited`:`${n} \xB7 ${m} ${m===1?"time slot":"time slots"} left`}toggleSignUpFilter(t,n){if(!t)return;n?.checked!==void 0&&(t.selected=n.checked);let o=this.signUps.filter(m=>m.selected===!0).map(m=>m.scheduleSignUpID);this.allProgramsTimeslotsService.updateSignUpsFilter(o),this.refreshActiveFilterCount()}toggleFacilityFilter(t,n){n?.checked!==void 0&&(t.selected=n.checked),ee("Facility filter toggled:",t);let o=this.facilities.filter(m=>m.selected).map(m=>m.locationID);this.allProgramsTimeslotsService.updateFacilitiesFilter(o),this.refreshActiveFilterCount()}toggleCoachFilter(t,n){n?.checked!==void 0&&(t.selected=n.checked),ee("Coach filter toggled:",t);let o=this.coaches.filter(m=>m.selected).map(m=>m.staffID);this.allProgramsTimeslotsService.updateCoachesFilter(o),this.refreshActiveFilterCount()}toggleDayFilter(t,n){n?.checked!==void 0&&(t.selected=n.checked);let o=this.days.filter(m=>m.selected).map(m=>m.dayOfWeek);this.allProgramsTimeslotsService.updateDaysFilter(o),this.refreshActiveFilterCount()}onTitleFilterChange(t){this.titleFilter=t??"",this.allProgramsTimeslotsService.updateTitleFilter(this.titleFilter.trim()),this.refreshActiveFilterCount()}onTimeRangeFilterChange(){this.allProgramsTimeslotsService.updateTimeRangeFilter(this.startTimeFilter,this.endTimeFilter),this.refreshActiveFilterCount()}clearFilters(){this.titleFilter="",this.startTimeFilter="",this.endTimeFilter="",this.signUps?.forEach(t=>t.selected=!0),this.facilities.forEach(t=>t.selected=!0),this.coaches.forEach(t=>t.selected=!0),this.days.forEach(t=>t.selected=!0),this.allProgramsTimeslotsService.clearTimeSlotFilters(),this.refreshActiveFilterCount()}loadPlayers(t){this.userService.getCurrentUserPlayers(!0).pipe(A(this.unsubscribe$)).subscribe({next:n=>{if(this.players=n||[],t&&t!==this.cartService.selectedPlayer?.playerID){let o=this.players.find(m=>m.playerID===t);o?this.selectPlayer(o):this.promptForPlayerPick()}},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("Unable to load player information. Please try again.")}})}promptForPlayerPick(){this.loading=!1,this.siteDataService.hideSiteLoader(),this.showPickPlayer=!0}clearPlayerQueryParam(){this.route.snapshot.queryParams.playerID&&this.router.navigate([],{relativeTo:this.route,queryParams:{playerID:null},queryParamsHandling:"merge",replaceUrl:!0})}reloadPurchasedBundlesForPlayer(t){this.allProgramsTimeslotsService.refreshEligibilityForPlayer(this.programID,t).pipe(A(this.unsubscribe$)).subscribe({next:({bundles:n,purchasedBundles:o,sessionRegistrationID:m})=>{this.bundles=n,this.purchasedBundles=o,this.sessionRegistrationID=m,this.regIdToBundleMap=new Map(o.map(p=>[p.registrationID,p])),this.purchasedBundleIDs=new Set(o.map(p=>p.registrationID)),this.updateTotalBundleSessionsCount(),this.refreshBundleDisplayState(),this.updateSidebarVisibility(),this.loadRegistrationContext()},error:()=>{console.error("Error reloading purchased bundles for new player"),this.siteDataService.showSiteErrorAlert("Unable to load bundle information. Please try again."),this.siteDataService.hide
1399SiteLoader(),this.loading=!1}})}selectPlayer(t){if(!t)return;this.checkoutStatePersistenceService.verifyRestoredPlayer(t.playerID);let n=+this.route.snapshot.queryParams.playerID||void 0;if(n&&n!==t.playerID&&this.clearPlayerQueryParam(),t.playerID!==this.cartService.selectedPlayer?.playerID&&(this.cartService.clearAllCarts(),this.checkoutChainService.cancelCheckoutChain(),this.purchasedBundles=[],this.purchasedBundleIDs=new Set,this.regIdToBundleMap.clear(),this._totalBundleSessions$.next(0)),this.player=t,this.cartService.selectedPlayer=t,this.playerService.player=t,this.playerService.playerID=t.playerID,this.showPickPlayer=!1,!this.programContextInitialized){this.initializeForPlayer(this.programID,t.playerID);return}this.reloadPurchasedBundlesForPlayer(t.playerID)}loadRegistrationContext(){if(this.loading=!0,this.error="",!this.allProgramsTimeslotsService.currentBundleEligibility.isEligibleForALaCarte){this.currentRegistration=void 0,this.siteDataService.hideSiteLoader(),this.loading=!1;return}this.registerService.registrationID=this.aLaCarteRegistrationID;let n=+this.route.snapshot.paramMap.get("teamID");n&&(this.registerService.teamID=n),this.currentRegistration=this.registerService.getCurrentRegistration(),this.ensureCurrentRegistration().pipe(Re(()=>this.setupRegistrationSession()),A(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.hideSiteLoader(),this.loading=!1},error:o=>{console.error("Error loading registration context:",o),this.siteDataService.hideSiteLoader(),this.loading=!1,this.siteDataService.showSiteErrorAlert("Unable to load registration time slot data. Please try again.")}})}ensureCurrentRegistration(){return this.currentRegistration?U(void 0):this.registerService.getPlayerEligibleRegistrations().pipe(Ne(t=>{this.registerService.allRegistrations=t||[],this.currentRegistration=this.getCurrentEligibleRegistration()}),re(()=>{}))}getCurrentEligibleRegistration(){let t=this.registerService.allRegistrations||[],n=this.playerService.playerID,o=t.find(m=>m.programID===this.programID&&m.registrationCostTypeID===K.VARIABLE);return o?(this.aLaCarteRegistrationID=o.registrationID,o):t.find(m=>m.programID===this.programID&&(!n||m.playerRegistrations?.some(p=>p.playerID===n)))}setupRegistrationSession(){let t=this.playerService.playerID;return!this.programID||!t||!this.aLaCarteRegistrationID?U(void 0):(ee("Setting up registration session for programID:",this.programID,"playerID:",t,"aLaCarteRegistrationID:",this.aLaCarteRegistrationID),this.cartService.switchToProgram(this.programID),this.allProgramsTimeslotsService.setCheckoutSessionForContext(t,this.sessionRegistrationID).pipe(Re(n=>this.allProgramsShellService.updatePlayerRegistrationSessionSelections(t,this.sessionRegistrationID,n,this.registerService.session?.sessionData?.signUpTimeSlots)),re(()=>{}),se(()=>U(void 0))))}resolveALaCarteRegistrationID(t){return this.cartService.getALaCarteRegistrationIDForProgram(t)||this.aLaCarteRegistrationID}handleReservedTimeSlots(t){let n=this.cartService.pruneReservedTimeSlots(t,this.player?.playerID);n.length&&this.siteDataService.showSiteErrorAlert(n.length===1?"A time slot you had selected was removed because this player is already registered for it.":`${n.length} time slots you had selected were removed because this player is already registered for them.`)}syncSelectedTimeSlotsFromCart(t){if(!this.playerService.playerID)return;let n=t.filter(o=>o.timeSlot&&o?.player?.playerID===this.playerService?.playerID&&(o.programID??o.timeSlot?.programID??o.registration?.programID)===this.programID).map(o=>o.timeSlot);this.selectedTimeSlots=n.sort((o,m)=>new Date(m.startDate).getTime()-new Date(o.startDate).getTime()),this.initialTimeSlotIDs=this.selectedTimeSlots.map(o=>o.signUpTimeSlotID),this.selectedTimeSlots$.next(this.selectedTimeSlots)}selectCoach(){if(!this.coachesToSelect||this.coachesToSelect.length===0)return;if(!this.selectedTimeslot){this.siteDataService.showSiteErrorAlert("No time slot selected. Please select a time slot before choosing a coach."),this.showPickCoach=!1;return}let t=this.coachesToSelect.find(o=>o.selected);if(!t){this.siteDataService.showSiteErrorAlert("Please select a coach to proceed.");return}this.selectedCoach=t;let n=z(j({},this.selectedTimeslot),{staffID:t.staffID,staffAssignments:this.selectedTimeslot.staffAssignments.filter(o=>o.clubUserID===t.staffID)});this.cartService.addTimeSlotToCart(n,this.player,this.programName,this.resolveALaCarteRegistrationID(this.programID)),this.selectedTimeslot=void 0,this.showPickCoach=!1}onPickCoachHidden(){let t=this.selectedTimeslot;this.selectedCoach=void 0,this.selectedTimeslot=void 0,t&&this.deSelectTimeSlot(t)}timeSlotSelected(t){if(!this.player){this.error="Select a player before choosing time slots.";return}if(t.isChecked&&!this.allProgramsTimeslotsService.currentBundleEligibility.isEligibleForALaCarte&&this.selectedTimeSlots.length>=this._totalBundleSessions$.value){this.timeSlots?.deSelectTimeSlot(t),this.siteDataService.showSiteErrorAlert("This player has used all time slots included in their bundle(s) and is not eligible to purchase additional single time slots.");return}if(t.isChecked){let n=t.staffAssignments?.filter(o=>(o.isAccepted??!1)===!0)??[];if(n.length>1)this.coachesToSelect=n.map(o=>({staffID:o.clubUserID,userID:o.userID,name:o.firstName+" "+o.lastName,selected:!1,player:{userID:o.userID,user:{userID:o.userID,firstName:o.firstName,lastName:o.lastName}}})),this.showPickCoach=!0,this.selectedTimeslot=t;else if(n.length===1){let o=z(j({},t),{staffID:n[0].clubUserID,staffAssignments:n});this.cartService.addTimeSlotToCart(o,this.player,this.programName,this.resolveALaCarteRegistrationID(this.programID))}else{let o=z(j({},t),{staffID:null,staffAssignments:[]});this.cartService.addTimeSlotToCart(o,this.player,this.programName,this.resolveALaCarteRegistrationID(this.programID))}return}this.cartService.removeTimeSlotFromCart(t.signUpTimeSlotID,this.player.playerID)}deSelectTimeSlot(t){this.timeSlots?.deSelectTimeSlot(t),this.player&&this.cartService.removeTimeSlotFromCart(t.signUpTimeSlotID,this.player.playerID)}goBack(){this.router.navigate(["/all-programs"],{queryParams:this.allProgramsShellService.getMobileAppUserQueryParams()})}updateShellBreadcrumbs(t,n,o){let m=this.allProgramsShellService.resolve
1399CollectionContextFromUrl(this.router.url);this.breadcrumbsSeededForProgramID!==this.programID&&this.loadOpenProgramsCatalog().pipe(A(this.unsubscribe$)).subscribe({next:p=>{if(this.breadcrumbsSeededForProgramID===this.programID)return;let g=(p||[]).find(I=>I?.programID===this.programID),C=t||g?.pageBuilderPageFeatureText||g?.linkText||"";if(!C)return;let h=this.allProgramsShellService.buildCollectionOptions(p),f=this.resolveBreadcrumbCollection(p,h,m,n,o),y=this.allProgramsShellService.buildAllProgramsBreadcrumbOptions(h.categoryOptions,h.programTypeOptions);this.seedShellBreadcrumbs(C,f.collection,f.label,y,this.allProgramsShellService.buildProgramSwitcherOptions(f.programs,this.programID))},error:()=>{t&&this.seedShellBreadcrumbs(t,m,"",this.allProgramsShellService.getShellStateSnapshot()?.options||[])}})}loadOpenProgramsCatalog(){return this.openProgramsCatalog$||(this.openProgramsCatalog$=this.pageBuilderContentService.getOpenPrograms().pipe(ki({bufferSize:1,refCount:!1}))),this.openProgramsCatalog$}resolveBreadcrumbCollection(t,n,o,m,p){if(o){let y=this.collectionBucket(n,o);return{collection:o,label:y?.label||(o.collectionType===it.TYPE?p:m),programs:y?.programs||[]}}let g=(t||[]).find(y=>y?.programID===this.programID),C=this.allProgramsShellService.resolveCollectionContextForProgram(g);if(C)return{collection:C,label:C.collectionType===it.TYPE?g.programTypeName:g.categoryName,programs:this.collectionBucket(n,C)?.programs||[]};let h=n.categoryOptions.find(y=>y.label===m);if(h)return{collection:{collectionType:it.CATEGORY,collectionID:h.value},label:h.label,programs:h.programs};let f=n.programTypeOptions.find(y=>y.label===p);return f?{collection:{collectionType:it.TYPE,collectionID:f.value},label:f.label,programs:f.programs}:{collection:null,label:"",programs:[]}}collectionBucket(t,n){return(n.collectionType===it.CATEGORY?t.categoryOptions:t.programTypeOptions).find(m=>m.value===n.collectionID)}seedShellBreadcrumbs(t,n,o,m,p=[]){let g=n?this.allProgramsShellService.buildAllProgramsCollectionRoute(n.collectionType,n.collectionID):["/all-programs"];this.breadcrumbsSeededForProgramID=this.programID,this.allProgramsShellService.setShellState({showBreadcrumbs:!0,showBackButton:!0,parentRoute:g,options:[...this.allProgramsShellService.buildProgramViewBreadcrumbOptions(this.programID,t,n,o,m),...p]})}proceedToCheckout(){if(this.procedingToCheckout)return;this.procedingToCheckout=!0,this.registerService.reservedSlotsSummary=[];let t=this.programID||this.cartService.currentProgramID;this.allProgramsTimeslotsService.refreshPurchasedBundlesForCartPrograms(this.player?.playerID,t).pipe(A(this.unsubscribe$)).subscribe({next:()=>this.buildAndRouteCheckout(t),error:()=>this.buildAndRouteCheckout(t)})}buildAndRouteCheckout(t){let n=this.resolveALaCarteRegistrationID(t),o=this.allProgramsShellService.resolveCollectionContextFromUrl(this.router.url),m=this.allProgramsTimeslotsService.prepareProceedToCheckout(this.player?.playerID,t,n,this.selectedTimeSlots.length,this.purchasedBundles,o);if(m.status===pe.InvalidSelection||m.status===pe.InvalidContext){this.procedingToCheckout=!1,m.errorMessage&&(this.error=m.errorMessage,this.siteDataService.showSiteErrorAlert(m.errorMessage));return}if(m.status===pe.NeedsBundleConfirm){this.procedingToCheckout=!1,this.router.navigate(m.bundleConfirmRoute||[],{queryParams:this.allProgramsShellService.getMobileAppUserQueryParams()}).then(p=>{p||(this.error="Unable to navigate to bundle confirmation. Please try again.",this.siteDataService.showSiteErrorAlert(this.error))},p=>{this.procedingToCheckout=!1,this.error="Navigation error: "+(p?.message||"Unknown error"),this.siteDataService.showSiteErrorAlert(this.error)});return}if(!m.checkoutPlan||!this.player?.playerID){this.procedingToCheckout=!1,this.error="Unable to proceed to checkout. Missing checkout data.",this.siteDataService.showSiteErrorAlert(this.error);return}this.allProgramsTimeslotsService.commitCheckoutPlan(this.player.playerID,m.checkoutPlan).pipe(A(this.unsubscribe$)).subscribe({next:p=>{this.procedingToCheckout=!1;let g=this.router.serializeUrl(this.router.createUrlTree(p.checkoutRoute,{queryParams:this.allProgramsShellService.getMobileAppUserQueryParams()}));this.allProgramsShellService.requestOverduePaymentModal(g)},error:()=>{this.procedingToCheckout=!1,this.error="Unable to proceed to checkout.",this.siteDataService.showSiteErrorAlert("Unable to proceed to checkout. Please try again.")}})}isActivePurchasedBundle(t){return this.cartService.getActiveBundleIDsForProgram(this.programID).has(t)}};c.\u0275fac=function(n){return new(n||c)(R(ge),R(et),R(Se),R(be),R(we),R(At),R(De),R(ue),R(_e),R(Mt),R(Ve))},c.\u0275cmp=Te({type:c,selectors:[["app-all-programs-timeslots"]],viewQuery:function(n,o){if(n&1&&Dt(Kt,5),n&2){let m;wt(m=Et())&&(o.timeSlots=m.first)}},standalone:!1,decls:76,vars:32,consts:[["playerPickerContent",""],["purchasedBundlesCard",""],["bundlesCard",""],["bundlesCardHeader",""],["signUpsContent",""],["filterControlsContent",""],["filtersContent",""],["t
1399imeSlots",""],["rowLabel",""],["toggleicon",""],[1,"programs-list-container"],["header","Select Coach","styleClass","standardWidthDialog",3,"visibleChange","onHide","visible","showHeader","closable","modal","draggable"],["position","bottom","header","Filters",3,"visibleChange","visible","pt"],[1,"mobile-action-sheet-body"],[4,"ngTemplateOutlet"],[1,"mobile-action-sheet-footer","border-top","pt-2"],["type","button",1,"btn","btn-primary","btn-block",3,"click"],["position","bottom","header","Bundles",3,"visibleChange","visible","pt"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-testid","time-slots-page",1,"row","no-gutters"],[1,"col-lg-3","col-md-4","pr-md-3"],[1,"position-sticky-top","mb-3","programs-filters-wrapper"],[1,"programs-filters-inner","hide-scrollbar"],[1,"mobile-app-layout","full-width","d-flex","flex-column"],[1,"d-block","flex-fill","min-height-0","overflow-y-auto","pl-2","pr-2",3,"onClearFiltersRequested","onPlayerReservedTimeSlots","onTimeSlotSelected","registrationID","playerID","filters","totalBundleSessions$","selectedTimeSlotsCount$","coveredTimeSlotIDs","preSelectTimeSlotIDs","registrationPricingRules","registrationNumberOfSessions","componentView","isMobileView","fixedHeight","autoAdvanceToFirstAvailable"],["rangeToolbarActions","",1,"d-flex","align-items-center","ml-2"],["type","button","data-testid","time-slots-mobile-filters-toggle",1,"btn","btn-sm","btn-tertiary","flex-shrink-0",3,"click"],["aria-hidden","true",1,"fa-regular","fa-filter"],[1,"sr-only"],["rangeToolbarBelow",""],["data-testid","time-slots-mobile-checkout-bar",1,"flex-grow-0","flex-shrink-0","bg-white","border-top","p-2","d-flex","align-items-center","justify-content-between"],["type","button","data-testid","time-slots-mobile-cart",1,"btn-a11y","btn-a11y-light-hover","mobile-checkout-bar-cart","min-width-0","d-flex","align-items-center","px-1",3,"click"],[1,"fa","fa-shopping-cart","mr-2","flex-shrink-0"],[1,"text-small","text-overflow-ellipsis"],["type","button","data-testid","time-slots-continue",1,"btn","btn-primary","flex-shrink-0","ml-2",3,"click","disabled"],[1,"flex-grow-0","flex-shrink-0","bg-white","border-bottom"],["type","button","data-testid","time-slots-mobile-bundle-bar","aria-controls","mobileBundleSummaryPanel",1,"btn-a11y","btn-a11y-light-hover","mobile-bundle-summary-toggle","full-width","d-flex","justify-content-between","align-items-center","px-2",3,"click"],[1,"text-small","fw-700","min-width-0","text-overflow-ellipsis"],[1,"fa-regular","fa-ticket","mr-2"],["aria-hidden","true",1,"fa-regular","text-grey","ml-2","flex-shrink-0"],["id","mobileBundleSummaryPanel",1,"max-height-md","overflow-y-auto","border-top","bg-grey-lt","px-2","py-2"],["type","button",1,"btn","btn-add","full-width","mt-2",3,"click"],["type","button","data-testid","time-slots-mobile-bundle-bar",1,"btn-a11y","btn-a11y-light-hover","mobile-bundle-summary-toggle","full-width","d-flex","justify-content-between","align-items-center","px-2",3,"click"],["aria-hidden","true",1,"fa-regular","fa-chevron-right","text-grey","ml-2","flex-shrink-0"],[1,"badge","badge-secondary","ml-1"],[1,"d-flex","align-items-center","mt-1","overflow-x-auto","hide-scrollbar"],["type","button","data-testid","time-slots-clear-filters",1,"btn","btn-sm","btn-naked","text-nowrap","flex-shrink-0",3,"click"],["type","button","data-testid","time-slots-filter-chip",1,"btn","btn-sm","btn-tertiary","text-nowrap","flex-shrink-0","mr-1",3,"click"],["aria-hidden","true",1,"fa-regular","fa-xmark","ml-2"],["aria-hidden","true",1,"fa-regular","fa-chevron-right","ml-2"],[1,"fa","fa-spinner","fa-spin","mr-2"],[1,"card"],[1,"card-body","p-0"],[3,"onClearFiltersRequested","onPlayerReservedTimeSlots","onTimeSlotSelected","registrationID","playerID","filters","totalBundleSessions$","selectedTimeSlotsCount$","coveredTimeSlotIDs","preSelectTimeSlotIDs","registrationPricingRules","registrationNumberOfSessions","componentView","autoAdvanceToFirstAvailable","fixedHeight"],[1,"card","mt-3"],[1,"card-body","d-flex","gap-2","justify-content-between"],["type","button","data-testid","time-slots-back",1,"btn","btn-secondary",3,"click"],[1,"fa","fa-chevron-left","me-2"],["type","button","data-testid","time-slots-continue",1,"btn","btn-primary",3,"click","disabled"],[1,"fa","fa-spinner","fa-spin","me-2"],["text","Select a player to view available time slots.","buttonText","Select a player",3,"buttonClicked","image","showButton","showCard"],["position","bottom","header","Select Player",3,"visibleChange","visible","pt"],["header","Select Player","styleClass","standardWidthDialog",3,"visibleChange","visible","showHeader","closable","modal","draggable"],["type","button",1,"btn","btn-add",3,"click"],["data-testid","time-slots-player-option",1,"card","clickable-card",2,"cursor","pointer",3,"click"],[1,"row","no-gutters"],[1,"col-12"],[1,"profile-image","pull-left","mr-3"],[3,"player","playerNumber","largeCircle","initialsOnly"],[1,"mb-1"],[1,"text-capitalize","fw-700"],[1,"text-small"],["text","You currently do not have any players in your account.","buttonText","Add a player",3,"buttonClicked","image","showButton","showCard"],[1,"text-header-5","fw-700","text-uppercase","text-navy","mb-3"],[1,"row","no-gutters","p-3","d-flex","justify-content-space-between"],[1,"btn","btn-primary",3,"click","disabled"],[1,"btn","btn-secondary","ml-2",3,"click"],[1,"card","mb-3"],[1,"fw-700","mb-2"],[1,"my-2"],[1,"d-flex","justify-content-between","align-items-center","full-width"],[1,"fw-700"],[1,"d-flex","text-nowrap","text-small","text-grey","mb-1"],[1,"icon-wrapper"],[1,"fa-regular","fa-calendar","mr-2"],[1,"fa-regular","fa-clock","mr-2"],["controlType","checkbox","styleClass","mb-2 mx-0",3,"ngModelChange","selectionChange","boldLabel","inputId","ngModel"],[1,"d-flex","align-items-center"],[1,"profile-image","mr-3"],[3,"player","playerNumber","initialsOnly"],["data-testid","purchased-bundle-row",1,"row","no-gutters"],[1,"d-flex","align-items-center","col"],[1,"fa-light","fa-ticket-perforated","text-largest","mr-3"],[1,"flex-grow-1"],[1,"fw-500"],[1,""],[1,"text-right","col-md-3"],[1,"fw-600","line-height-2"],[1,"line-height-1"],[1,"d-block","col-6","p-0",3,"total","totalUsed","ariaLabel"],["direction","higherIsWorse",1,"d-block","col-6","p-0",3,"percent","successThreshold","criticalThreshold","ariaLabel"],[1,"text-header-5","border-bottom","fw-700"],["data-testid","purchasable-bundle-row"],[1,"d-flex","justify-content-between","align-items-center","mb-2"],[1,"d-flex","flex-column"],["data-testid","purchasable-bundle-name"],["type","button","data-testid","purchasable-bundle-action","tooltipPosition","right",1,"btn","btn-sm","bundle-action-button",3,"click","pTooltip","disabled"],["tooltipPosition","right",1,"text-small","bundle-session-label",3,"pTooltip"],["data-testid","purchasable-bundle-type","variant","tag",3,"nowrap","status","text"],[1,"text-small","text-grey","mt-1"],["data-testid","time-slots-bundles-block"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-regular","fa-ticket-perforated","text-jumbo","mr-3"],["role","button","data-testid","time-slots-bundles-toggle",1,"btn","btn-naked","text-medium","text-decoration-none",3,"click"],[1,"mr-1","far"],[1,"expand-height"],[1,"text-small","text-muted"],[1,"d-flex","justify-content-between","align-items-stretch"],[1,"d-flex","flex-column","justify-content-between","flex-grow-1"],[1,"line-height-2","mb-2"],[1,"fa-light","fa-ticket"],[1,"p-accordion-naked","p-0","accordion-toggle-first","accordion-content-p-0","accordion-header-p-0",3,"value"],["value","0"],[1,"text-small","text-primary-link"],[1,"p-0","pl-4","pt-2"],[1,"border-left","ml-3","pl-3","d-flex","flex-column","justify-content-between","align-items-end"],[1,"fw-700","text-medium","mb-3"],["data-testid","purchasable-bundle-type","variant","tag","styleClass","ml-2",3,"nowrap","status","text"],[1,"text-medium"],["aria-hidden","true",1,"p-icon","fa-regular","text-small","text-primary-link"],[1,"fa-regular","fa-calendar-check","mr-2"],[1,"d-flex","text-small","text-grey","mb-1"],[1,"fa-regular","fa-location-dot","mr-2"],[1,"fa-regular","fa-user","mr-2"],[1,"registration-custom-text-row","border-radius-lg","bg-grey-lt","p-3","mt-2","text-small","full-width",3,"innerHTML"],["name","signUpFilter","binary","true",3,"ngModelChange","onChange","ngModel","inputId"],[1,"d-inline-block","ml-2","text-medium",3,"for"],[1,"card","mt-1"],[1,"text-header-5","border-bottom","fw-700","d-flex","justify-content-between","align-items-center"],["type","button","data-testid","time-slots-clear-filters",1,"btn","btn-sm","btn-naked","text-nowrap",3,"click"],["aria-hidden","true",1,"fa-regular","fa-rotate-right","mr-1"],[1,"border-bottom","pb-2"],["for","titleSearch",1,"text-small","fw-700"],["pInputText","","id","titleSearch","type","text","placeholder","Search by name","data-testid","time-slots-title-filter",1,"form-control",3,"ngModelChange","ngModel"],[1,"text-small","fw-700"],["aria-label","Earliest start time",3,"ngModelChange","timeOnly","ngModel"],["aria-label","Latest end time",3,"ngModelChange","timeOnly","ngModel"],[1,"p-accordion-naked","accordion-content-p-0",3,"multiple"],[1,"mt-2",3,"value"],[1,"d-flex","align-items-center",3,"ngClass"],["binary","true",1,"flex-shrink-0",3,"ngModelChange","onChange","ngModel"],[1,"ml-2","mb-0","text-medium"],[1,"d-flex","align-items-center","py-1",3,"ngClass"],["binary","true",2,"flex-shrink","0",3,"ngModelChange","onChange","ngModel"],[1,"card-header","pb-2","d-flex","align-items-center","border-bottom"],[1,"player-photo","mr-3"],[1,"player-name"],[1,"change-player
1399-button"],["type","button",1,"btn","btn-sm","full-width",3,"click"]],template:function(n,o){if(n&1){let m=P();e(0,` 1400 1401`),a(1,"div"),e(2,` 1402 `),a(3,"div",10),e(4,` 1403 `),_(5,hs,4,0),_(6,$s,10,6),_(7,Ns,4,3),l(),e(8,` 1404`),l(),e(9,` 1405`),_(10,Gs,9,5)(11,Ys,6,6),M(12,Ks,4,2,"ng-template",null,0,ae),e(14,` 1406`),a(15,"p-dialog",11),G("visibleChange",function(g){return S(m),W(o.showPickCoach,g)||(o.showPickCoach=g),v(g)}),b("onHide",function(){return o.onPickCoachHidden()}),e(16,` 1407 `),_(17,ic,19,2),l(),e(18,` 1408 1409`),e(19,` 1410`),a(20,"p-drawer",12),G("visibleChange",function(g){return S(m),W(o.showMobileFilters,g)||(o.showMobileFilters=g),v(g)}),e(21,` 1411 `),a(22,"div",13),e(23,` 1412 `),M(24,nc,1,0,"ng-container",14),e(25,` 1413 `),M(26,rc,1,0,"ng-container",14),e(27,` 1414 `),l(),e(28,` 1415 `),a(29,"div",15),e(30,` 1416 `),a(31,"button",16),b("click",function(){return o.showMobileFilters=!1}),e(32),l(),e(33,` 1417 `),l(),e(34,` 1418`),l(),e(35,` 1419 1420`),e(36,` 1421`),a(37,"p-drawer",17),G("visibleChange",function(g){return S(m),W(o.showMobileBundles,g)||(o.showMobileBundles=g),v(g)}),e(38,` 1422 `),a(39,"div",13),e(40,` 1423 `),M(41,oc,1,0,"ng-container",18),e(42,` 1424 `),l(),e(43,` 1425 `),a(44,"div",15),e(45,` 1426 `),a(46,"button",16),b("click",function(){return o.showMobileBundles=!1}),e(47,` 1427 `),_(48,ac,1,1)(49,lc,1,0),l(),e(50,` 1428 `),l(),e(51,` 1429`),l(),e(52,` 1430 1431`),e(53,` 1432`),M(54,hc,6,2,"ng-template",null,1,ae),e(56,` 1433 1434`),e(57,` 1435`),M(58,bc,7,3,"ng-template",null,2,ae),e(60,` 1436`),M(61,Yc,32,13,"ng-template",null,3,ae),e(63,` 1437 1438`),e(64,` 1439`),M(65,qc,2,1,"ng-template",null,4,ae),e(67,` 1440 1441`),e(68,` 1442`),M(69,im,41,6,"ng-template",null,5,ae),e(71,` 1443 1444`),e(72,` 1445`),M(73,am,6,3,"ng-template",null,6,ae),e(75,` 1446`)}if(n&2){let m=te(59),p=te(66),g=te(70);s(),$("main",!o.isMobileUser)("pt-3",!o.isMobileUser),s(2),$("container",!o.isMobileUser),s(2),u(o.loading?5:-1),s(),u(!o.loading&&o.player?6:-1),s(),u(!o.loading&&!o.player?7:-1),s(3),u(o.isMobileUser?10:11),s(5),N("visible",o.showPickCoach),x("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),s(2),u(o.coachesToSelect.length>0?17:-1),s(3),Ke(o.mobileSheetStyle),N("visible",o.showMobileFilters),x("pt",o.mobileSheetPt),s(4),x("ngTemplateOutlet",p),s(2),x("ngTemplateOutlet",g),s(6),D(` 1447 `,o.filterResultsLabel,` 1448 `),s(5),Ke(o.mobileSheetStyle),N("visible",o.showMobileBundles),x("pt",o.mobileSheetPt),s(4),x("ngTemplateOutlet",m)("ngTemplateOutletContext",ke(30,os,o.bundles)),s(7),u(o.mobileCartLabel?48:49)}},dependencies:[Ze,Fe,Vi,Me,Le,Lt,at,lt,mn,Nt,gn,_n,Ut,$t,Vt,ot,en,Ot,Ht,jt,Yt,zt,st,Kt,Oi,Rt,Be],styles:[".admin-header[_ngcontent-%COMP%]{z-index:1}.programs-filters-wrapper[_ngcontent-%COMP%]{top:6.5rem}.programs-filters-wrapper[_ngcontent-%COMP%] .programs-filters-inner[_ngcontent-%COMP%]{max-height:calc(100vh - 6.5rem);overflow:auto}.registration-groups-accordion.p-accordion-naked[_ngcontent-%COMP%] .p-accordionpanel.card[_ngcontent-%COMP%], .program-groups-accordion.p-accordion-naked[_ngcontent-%COMP%] .p-accordionpanel.card[_ngcontent-%COMP%]{--p-accordion-content-padding: 1rem 1rem 1rem 1.25rem}.registration-custom-text-row[_ngcontent-%COMP%] {font-size:.875rem}.registration-custom-text-row[_ngcontent-%COMP%] p{margin-bottom:.5rem}.registration-custom-text-row[_ngcontent-%COMP%] h1{font-size:1.5rem}.registration-custom-text-row[_ngcontent-%COMP%] h2{font-size:1.375rem}.registration-custom-text-row[_ngcontent-%COMP%] h3{font-size:1.25rem}.registration-custom-text-row[_ngcontent-%COMP%] h4{font-size:1.125rem}.registration-custom-text-row[_ngcontent-%COMP%] h5{font-size:1rem}.programs-list-container[_ngcontent-%COMP%] .all-programs-card:hover{box-shadow:var(--box-sha
1448dow-lg);border-color:var(--grey-500)}.registration-card-info[_ngcontent-%COMP%]{border-right:none;border-bottom:var(--border);padding-bottom:1rem;margin-bottom:1rem}@media(min-width:768px){.registration-card-info[_ngcontent-%COMP%]{border-right:var(--border);border-bottom:none;padding-bottom:unset;margin-bottom:unset}}.registration-details-grid[_ngcontent-%COMP%], .registration-details-grid--price[_ngcontent-%COMP%]{text-align:left}@media(min-width:768px){.registration-details-grid[_ngcontent-%COMP%], .registration-details-grid--price[_ngcontent-%COMP%]{text-align:right}}.cart-item-badge[_ngcontent-%COMP%]{position:absolute;bottom:0;left:5rem;font-size:.5rem;height:1.25rem;padding:.25rem;background-color:var(--primary, #007bff);color:#fff;border-bottom-left-radius:.5rem}.mobile-coverage-row[_ngcontent-%COMP%]{min-height:2.75rem}.mobile-app-layout[_ngcontent-%COMP%]{height:calc(100dvh - var(--admin-header-height, 0px))}",".mobile-action-sheet-body[_ngcontent-%COMP%]{flex:1 1 auto;overflow-y:auto;min-height:0}.mobile-action-sheet-footer[_ngcontent-%COMP%]{flex:0 0 auto}",".mobile-bundle-summary-toggle[_ngcontent-%COMP%], .mobile-checkout-bar-cart[_ngcontent-%COMP%]{min-height:2.75rem}"]});let r=c;return r})();var lm=(r,c)=>c.value,sm=(r,c)=>c.signUpTimeSlotID;function cm(r,c){r&1&&ie(0)}function mm(r,c){r&1&&ie(0)}function dm(r,c){if(r&1&&(e(0,` 1449`),e(1,` 1450`),a(2,"div",8),e(3,` 1451 `),e(4,` 1452 `),a(5,"div",9),e(6,` 1453 `),M(7,cm,1,0,"ng-container",10),e(8,` 1454 `),l(),e(9,` 1455 `),M(10,mm,1,0,"ng-container",10),e(11,` 1456`),l(),e(12,` 1457`)),r&2){d();let i=te(7),t=te(10);s(7),x("ngTemplateOutlet",i),s(3),x("ngTemplateOutlet",t)}}function pm(r,c){r&1&&ie(0)}function gm(r,c){r&1&&ie(0)}function _m(r,c){if(r&1&&(e(0,` 1458`),a(1,"div",11),e(2,` 1459 `),a(3,"div",12),e(4,` 1460 `),a(5,"div",13),e(6,` 1461 `),M(7,pm,1,0,"ng-container",10),e(8,` 1462 `),a(9,"div",14),e(10,` 1463 `),M(11,gm,1,0,"ng-container",10),e(12,` 1464 `),l(),e(13,` 1465 `),l(),e(14,` 1466 `),l(),e(15,` 1467`),l(),e(16,` 1468`)),r&2){d();let i=te(3),t=te(24);s(7),x("ngTemplateOutlet",i),s(4),x("ngTemplateOutlet",t)}}function um(r,c){r&1&&e(0,` 1469 Your time slot is reserved. 1470 `)}function hm(r,c){if(r&1&&e(0),r&2){let i=d(3);D(` 1471 `,i.successfulReservationTimeSlotIDs.length,` time slots are reserved. 1472 `)}}function Cm(r,c){if(r&1&&(e(0,` 1473 `),e(1,` 1474 `),a(2,"app-inline-alert",18),e(3,` 1475 `),_(4,um,1,0)(5,hm,1,1),l(),e(6,` 1476 `),a(7,"div",19),e(8,` 1477 These time slots have been reserved using your existing bundle(s). No payment was required. 1478 `),l(),e(9,` 1479 `)),r&2){let i=d(2);s(2),x("isInline",!0),s(2),u(i.successfulReservationTimeSlotIDs.length===1?4:5)}}function xm(r,c){r&1&&(e(0,` 1480 `),X(1),e(2,` 1481 You can change which bundle covers each time slot below. 1482 `),J(),e(3,` 1483 `))}function fm(r,c){r&1&&(e(0,` 1484 `),X(1),e(2,` 1485 After confirming, you will be taken to checkout to complete your remaining purchase. 1486 `),J(),e(3,` 1487 `))}function Sm(r,c){r&1&&(e(0,` 1488 `),X(1),e(2,` 1489 No payment is required for these time slots. 1490 `),J(),e(3,` 1491 `))}function vm(r,c){if(r&1&&(e(0,` 1492 `),a(1,"div",19),e(2,` 1493 The following time slots will be reserved using your existing bundle(s). 1494 `),_(3,xm,4,0),_(4,fm,4,0)(5,Sm,4,0),l(),e(6,` 1495 `)),r&2){let i=d(2);s(3),u(i.canChooseCoverage?3:-1),s(),u(i.hasCheckoutRemaining?4:5)}}function ym(r,c){r&1&&(e(0,` 1496 `),a(1,"tr"),e(2,` 1497 `),a(3,"th"),e(4,"Bundle"),l(),e(5,` 1498 `),a(6,"th"),e(7,"Date & Time"),l(),e(8,` 1499 `),a(9,"th"),e(10,"Coach"),l(),e(11,` 1500 `),a(12,"th"),e(13,"Location"),l(),e(14,` 1501 `),a(15,"th",22),e(16,"Status"),l(),e(17,`
1502 `),l(),e(18,` 1503 `))}function bm(r,c){if(r&1){let i=P();e(0,` 1504 `),a(1,"p-select",25),b("onChange",function(n){S(i);let o=d().$implicit,m=d(3);return v(m.onCoverageChange(o,n.value))}),e(2,` 1505 `),l(),e(3,` 1506 `)}if(r&2){let i=d().$implicit,t=d(3);s(),x("options",t.coverageOptions)("ngModel",i.targetEntityRegistrationID)}}function Pm(r,c){if(r&1&&e(0),r&2){let i=d().$implicit;D(` 1507 `,i.bundleName,` 1508 `)}}function Im(r,c){if(r&1&&(e(0,` 1509 `),X(1),e(2),B(3,"date"),J(),e(4,` 1510 `)),r&2){let i=d(2).$implicit;s(2),D(` 1511 \u2013 `,q(3,1,i.timeSlot.endDate,"h:mm a"),` 1512 `)}}function Tm(r,c){if(r&1&&(e(0,` 1513 `),X(1),e(2),B(3,"date"),T(4,"br"),e(5,` 1514 `),a(6,"span",26),e(7),B(8,"date"),_(9,Im,5,4),l(),e(10,` 1515 `),J(),e(11,` 1516 `)),r&2){let i=d().$implicit;s(2),D(` 1517 `,q(3,3,i.timeSlot.startDate,"EEE, MMM d, y")),s(5),D(` 1518 `,q(8,6,i.timeSlot.startDate,"h:mm a"),` 1519 `),s(2),u(i.timeSlot!=null&&i.timeSlot.endDate?9:-1)}}function Dm(r,c){r&1&&(e(0,` 1520 `),X(1),e(2,"-"),J(),e(3,` 1521 `))}function wm(r,c){r&1&&(e(0," "),T(1,"app-pill",27),e(2," ")),r&2&&(s(),x("nowrap",!0))}function Em(r,c){r&1&&(e(0," "),T(1,"app-pill",28),e(2," ")),r&2&&(s(),x("nowrap",!0))}function Rm(r,c){r&1&&(e(0," "),T(1,"app-pill",29),e(2," ")),r&2&&(s(),x("nowrap",!0))}function km(r,c){if(r&1&&(e(0,` 1522 `),a(1,"tr",23),e(2,` 1523 `),a(3,"td"),e(4,` 1524 `),_(5,bm,4,2)(6,Pm,1,1),l(),e(7,` 1525 `),a(8,"td"),e(9,` 1526 `),_(10,Tm,12,9)(11,Dm,4,0),l(),e(12,` 1527 `),a(13,"td"),e(14),l(),e(15,` 1528 `),a(16,"td"),e(17),l(),e(18,` 1529 `),a(19,"td",24),e(20,` 1530 `),_(21,wm,3,1)(22,Em,3,1)(23,Rm,3,1),e(24,` 1531 `),l(),e(25,` 1532 `),l(),e(26,` 1533 `)),r&2){let i,t=c.$implicit,n=d(3);s(5),u(n.canChooseCoverage?5:6),s(5),u(t.timeSlot!=null&&t.timeSlot.startDate?10:11),s(4),D(` 1534 `,n.coachLabelBySlot.get(t.signUpTimeSlotID),` 1535 `),s(3),D(` 1536 `,(t.timeSlot==null?null:t.timeSlot.locationName)||"-",` 1537 `),s(4),u((i=n.getReservationStatus(t))===n.ReservationStatus.SUCCESS?21:i===n.ReservationStatus.ISSUE?22:23)}}function Am(r,c){if(r&1&&(e(0,` 1538 `),a(1,"div",20),e(2,` 1539 `),a(3,"p-table",21),e(4,` 1540 `),M(5,ym,19,0,"ng-template",null,4,ae),e(7,` 1541 `),M(8,km,27,5,"ng-template",null,5,ae),e(10,` 1542 `),l(),e(11,` 1543 `),l(),e(12,` 1544 `)),r&2){let i=d(2);s(3),x("value",i.existingBundleReservations)}}function Fm(r,c){if(r&1&&(e(0,` 1545 `),a(1,"app-inline-alert",30),e(2),l(),e(3,` 1546 `)),r&2){let i=d(2);s(),x("isInline",!0),s(),w(i.coverageError)}}function Bm(r,c){if(r&1&&(e(0,` 1547 `),a(1,"app-inline-alert",31),e(2),l(),e(3,` 1548 `)),r&2){let i=d(2);s(),x("isInline",!0),s(),w(i.error)}}function Mm(r,c){if(r&1&&(e(0,` 1549 `),a(1,"div",15),e(2,` 1550 `),a(3,"h2",16),e(4),l(),e(5,` 1551 `),l(),e(6,` 1552 1553 `),a(7,"div",17),e(8,` 1554 `),_(9,Cm,10,2)(10,vm,7,2),_(11,Am,13,1),_(12,Fm,4,2),_(13,Bm,4,2),l(),e(14,` 1555`)),r&2){let i=d();s(4),D("",i.programName," \u2013 Confirm Bundle Reservations"),s(5),u(i.reservationSucceeded?9:10),s(2),u(i.existingBundleReservations.length>0?11:-1),s(),u(i.coverageError?12:-1),s(),u(i.error?13:-1)}}function Lm(r,c){r&1&&e(0,` 1556 Your time slot is reserved. 1557 `)}function Om(r,c){if(r&1&&e(0),r&2){let i=d(3);D(` 1558 `,i.successfulReservationTimeSlotIDs.length,` time slots are reserved. 1559 `)}}function Vm(r,c){if(r&1&&(e(0,` 1560 `),a(1,"app-inline-alert",32),e(2,` 1561 `),_(3,Lm,1,0)(4,Om,1,1),l(),e(5,` 1562 `),a(6,"p",33),e(7,` 1563 These time slots have been reserved using your existing bundle(s). No payment was required.
1564 `),l(),e(8,` 1565 `)),r&2){let i=d(2);s(),x("isInline",!0),s(2),u(i.successfulReservationTimeSlotIDs.length===1?3:4)}}function Um(r,c){r&1&&(e(0,` 1566 `),X(1),e(2,"Tap a bundle to change which one covers a time slot."),J(),e(3,` 1567 `))}function $m(r,c){if(r&1&&(e(0,` 1568 `),a(1,"h2",34),e(2),l(),e(3,` 1569 `),a(4,"p",33),e(5,` 1570 The following time slots will be reserved using your existing bundle(s). 1571 `),_(6,Um,4,0),l(),e(7,` 1572 `)),r&2){let i=d(2);s(2),w(i.programName),s(4),u(i.canChooseCoverage?6:-1)}}function Nm(r,c){if(r&1&&(e(0),B(1,"date"),B(2,"date")),r&2){let i=d().$implicit;le(` 1573 `,q(1,2,i.timeSlot.startDate,"EEE, MMM d"),` 1574 \xB7 `,q(2,5,i.timeSlot.startDate,"h:mm a"),` 1575 `)}}function Wm(r,c){r&1&&e(0,` 1576 Time Slot 1577 `)}function Gm(r,c){if(r&1&&(e(0,` 1578 `),X(1),e(2),J(),e(3,` 1579 `)),r&2){let i=d().$implicit;s(2),D("\xB7 ",i.timeSlot.locationName)}}function jm(r,c){r&1&&(e(0,` 1580 `),T(1,"i",42),e(2,` 1581 `),a(3,"span",43),e(4,"Success"),l(),e(5,` 1582 `))}function Ym(r,c){r&1&&(e(0,` 1583 `),T(1,"i",44),e(2,` 1584 `),a(3,"span",43),e(4,"Issue occurred"),l(),e(5,` 1585 `))}function zm(r,c){if(r&1&&(e(0,` 1586 `),a(1,"span",41),e(2,` 1587 `),e(3,` 1588 `),_(4,jm,6,0)(5,Ym,6,0),e(6,` 1589 `),l(),e(7,` 1590 `)),r&2){let i,t=d().$implicit,n=d(2);s(4),u((i=n.getReservationStatus(t))===n.ReservationStatus.SUCCESS?4:i===n.ReservationStatus.ISSUE?5:-1)}}function Hm(r,c){if(r&1){let i=P();e(0,` 1591 `),a(1,"button",45),b("click",function(){S(i);let n=d().$implicit,o=d(2);return v(o.openCoverageSheet(n))}),e(2,` 1592 `),a(3,"span",40),e(4,"Covered by"),l(),e(5,` 1593 `),a(6,"span",46),e(7),T(8,"i",47),e(9,` 1594 `),l(),e(10,` 1595 `),l(),e(11,` 1596 `)}if(r&2){let i=d().$implicit,t=d(2);s(),fe("aria-label","Change which bundle covers this time slot. Currently "+t.coverageLabelBySlot.get(i.signUpTimeSlotID)),s(6),D(` 1597 `,t.coverageLabelBySlot.get(i.signUpTimeSlotID))}}function qm(r,c){if(r&1&&(e(0,` 1598 `),a(1,"div",48),e(2,` 1599 `),a(3,"span",40),e(4,"Covered by"),l(),e(5,` 1600 `),a(6,"span",49),e(7),l(),e(8,` 1601 `),l(),e(9,` 1602 `)),r&2){let i=d().$implicit;s(7),w(i.bundleName)}}function Qm(r,c){if(r&1&&(e(0,` 1603 `),a(1,"div",35),e(2,` 1604 `),a(3,"div",36),e(4,` 1605 `),a(5,"div",37),e(6,` 1606 `),a(7,"div",38),e(8,` 1607 `),a(9,"div",39),e(10,` 1608 `),_(11,Nm,3,8)(12,Wm,1,0),l(),e(13,` 1609 `),a(14,"div",40),e(15),_(16,Gm,4,1),l(),e(17,` 1610 `),l(),e(18,` 1611 `),_(19,zm,8,1),l(),e(20,` 1612 `),e(21,` 1613 `),_(22,Hm,12,2)(23,qm,10,1),l(),e(24,` 1614 `),l(),e(25,` 1615 `)),r&2){let i=c.$implicit,t=d(2);s(11),u(i.timeSlot!=null&&i.timeSlot.startDate?11:12),s(4),D(` 1616 `,t.coachLabelBySlot.get(i.signUpTimeSlotID),` 1617 `),s(),u(i.timeSlot!=null&&i.timeSlot.locationName?16:-1),s(3),u(t.reservationAttempted?19:-1),s(3),u(t.canChooseCoverage?22:23)}}function Km(r,c){if(r&1&&(e(0,` 1618 `),a(1,"app-inline-alert",50),e(2),l(),e(3,` 1619 `)),r&2){let i=d(2);s(),x("isInline",!0),s(),w(i.coverageError)}}function Xm(r,c){if(r&1&&(e(0,` 1620 `),a(1,"app-inline-alert",51),e(2),l(),e(3,` 1621 `)),r&2){let i=d(2);s(),x("isInline",!0),s(),w(i.error)}}function Jm(r,c){if(r&1&&(e(0,` 1622 `),_(1,Vm,9,2)(2,$m,8,2),L(3,Qm,26,5,null,null,sm),_(5,Km,4,2),_(6,Xm,4,2)),r&2){let i=d();s(),u(i.reservationSucceeded?1:2),s(2),O(i.existingBundleReservations),s(2),u(i.coverageError&&!i.coverageSheetReservation?5:-1),s(),u(i.error?6:-1)}}function Zm(r,c){if(r&1){let i=P();e(0,` 1623 `),a(1,"button",53),b("click",function(){S(i);let n=d(2);return v(n.done())}),e(2,"Done"),l(),e(3,` 1624 `)}}function ed(r,c){if(r&1){let i=P();e(0,` 1625 `),a(1,"button",57),b("click",function(){S(i);let n=d(3);return v(n.tryAgain())}),e(2,"Try Again"),l(),e(3,` 1626 `)}if(r&2){let i=d(3);s(),x("disabled",i.confirming)}}function td(r,c){if(r&1){let i=P();e(0,` 1627 `),a(1,"button",58),b("click",function(){S(i);let n=d(3);return v(n.continueToCheckout())}),e(2,"Checkout"),l(),e(3,` 1628 `)}if(r&2){let i=d(3);s(),x("disabled",i.confirming)}}function id(r,c){r&1&&(e(0,` 1629 `),T(1,"span",60),e(2,` 1630 `))}
1630function nd(r,c){if(r&1){let i=P();e(0,` 1631 `),a(1,"button",59),b("click",function(){S(i);let n=d(3);return v(n.confirm())}),e(2,` 1632 `),_(3,id,3,0),e(4,` 1633 Confirm 1634 `),l(),e(5,` 1635 `)}if(r&2){let i=d(3);s(),x("disabled",i.confirming),s(2),u(i.confirming?3:-1)}}function rd(r,c){if(r&1&&(e(0,` 1636 `),a(1,"div",54),e(2,` 1637 `),a(3,"div",49),e(4),l(),e(5,` 1638 `),a(6,"div",55),e(7),l(),e(8,` 1639 `),l(),e(9,` 1640 `),a(10,"div",56),e(11,` 1641 `),_(12,ed,4,1),_(13,td,4,1),_(14,nd,6,2),l(),e(15,` 1642 `)),r&2){let i=d(2);s(4),le(` 1643 `,i.existingBundleReservations.length,` 1644 `,i.existingBundleReservations.length===1?"time slot":"time slots",` 1645 `),s(3),D(` 1646 `,i.hasCheckoutRemaining?"Payment follows":"No payment required",` 1647 `),s(5),u(i.confirmationFailed&&i.canTryAgain?12:-1),s(),u(i.confirmationFailed&&i.hasCheckoutRemaining?13:-1),s(),u(!i.confirmationFailed&&!i.reservationAttempted?14:-1)}}function od(r,c){if(r&1&&(e(0,` 1648 `),a(1,"div",52),e(2,` 1649 `),_(3,Zm,4,0)(4,rd,16,6),l(),e(5,` 1650`)),r&2){let i=d();s(3),u(i.canFinish?3:4)}}function ad(r,c){if(r&1&&(e(0,` 1651 `),a(1,"app-inline-alert",61),e(2),l(),e(3,` 1652 `)),r&2){let i=d();s(),x("isInline",!0),s(),w(i.coverageError)}}function ld(r,c){r&1&&(e(0,` 1653 `),T(1,"i",64),e(2,` 1654 `),a(3,"span",43),e(4,"Currently covering this time slot"),l(),e(5,` 1655 `))}function sd(r,c){if(r&1){let i=P();e(0,` 1656 `),a(1,"button",62),b("click",function(){let n=S(i).$implicit,o=d();return v(o.selectCoverageFromSheet(n.value))}),e(2,` 1657 `),a(3,"span",63),e(4),l(),e(5,` 1658 `),_(6,ld,6,0),l(),e(7,` 1659 `)}if(r&2){let i=c.$implicit,t=d();s(),x("disabled",i.disabled),fe("aria-current",i.value===(t.coverageSheetReservation==null?null:t.coverageSheetReservation.targetEntityRegistrationID)),s(3),w(i.label),s(2),u(i.value===(t.coverageSheetReservation==null?null:t.coverageSheetReservation.targetEntityRegistrationID)?6:-1)}}function cd(r,c){if(r&1){let i=P();e(0,` 1660 `),a(1,"button",57),b("click",function(){S(i);let n=d(2);return v(n.tryAgain())}),e(2,"Try Again"),l(),e(3,` 1661 `)}if(r&2){let i=d(2);s(),x("disabled",i.confirming)}}function md(r,c){if(r&1){let i=P();e(0,` 1662 `),a(1,"button",67),b("click",function(){S(i);let n=d(2);return v(n.continueToCheckout())}),e(2,"Continue to Checkout"),l(),e(3,` 1663 `)}if(r&2){let i=d(2);s(),x("disabled",i.confirming)}}function dd(r,c){r&1&&(e(0,` 1664 `),e(1,` 1665 `),T(2,"span",60),e(3,` 1666 `))}function pd(r,c){if(r&1){let i=P();e(0,` 1667 `),a(1,"button",59),b("click",function(){S(i);let n=d(2);return v(n.confirm())}),e(2,` 1668 `),_(3,dd,4,0),e(4),l(),e(5,` 1669 `)}if(r&2){let i=d(2);s(),x("disabled",i.confirming),s(2),u(i.confirming?3:-1),s(),D(` 1670 `,i.hasCheckoutRemaining?"Confirm & Continue to Checkout":"Confirm Reservations",` 1671 `)}}function gd(r,c){if(r&1){let i=P();e(0,` 1672 `),a(1,"button",68),b("click",function(){S(i);let n=d(2);return v(n.done())}),e(2,"Done"),l(),e(3,` 1673 `)}}function _d(r,c){if(r&1){let i=P();e(0,` 1674 `),a(1,"button",65),b("click",function(){S(i);let n=d();return v(n.goBack())}),e(2,"Back"),l(),e(3,` 1675 `),a(4,"div",66),e(5,` 1676 `),_(6,cd,4,1),_(7,md,4,1),_(8,pd,6,3),_(9,gd,4,0),l(),e(10,` 1677`)}if(r&2){let i=d();s(),x("disabled",i.confirming),s(5),u(i.confirmationFailed&&i.canTryAgain?6:-1),s(),u(i.confirmationFailed&&i.hasCheckoutRemaining?7:-1),s(),u(!i.confirmationFailed&&!i.reservationAttempted?8:-1),s(),u(i.canFinish?9:-1)}}var bt=(function(r){return r.PENDING="pending",r.SUCCESS="success",r.ISSUE="issue",r})(bt||{}),li=(()=>{let c=class c{get successfulReservationTimeSlotIDs(){return this._successfulReservationTimeSlotIDs}set successfulReservationTimeSlotIDs(t){this._successfulReservationTimeSlotIDs=t||[],this.successfulReservationTimeSlotIDSet=new Set(this._successfulReservationTimeSlotIDs)}constructor(t,n,o,m,p,g,C,h,f,y){this.cartService=t,this.checkoutChainService=n,this.checkoutOrchestrationService=o,this.allProgramsShellService=m,this.registerService=p,this.router=g,this.route=C,this.siteDataService=h,this.playerService=f,this.checkoutChainRouter=y,this.ReservationStatus=bt,this.mobileSheetStyle=ti,this.mobileSheetPt=ii,this.unsubscribe$=new xe,this.plan=null,this.existingBundleReservations=[],this.hasCheckoutRemaining=!1,this.confirming=!1,this.error="",this.programName="",this.confirmationFailed=!1,this.reservationAttempted=!1,this.canTryAgain=!1,this.retryAvailabilityLoaded=!1,this._successfulReservationTimeSlotIDs=[],this.successfulReservationTimeSlotIDSet=new Set,this.coachLabelBySlot=new Map,this.coverageLabelBySlot=new Map,this.isMobileUser=!1,this.coverageCandidates=[],this.coverageOptions=[],this.coverageError="",this.coverageSheetReservation=null}ngOnInit(){this.allProgramsShellService.isInProgramView=!0,this.isMobileUser=this.allProgramsShellService.getShellStateSnapshot().isMobileUser??!1,this.allProgramsShellService.setShellState({hideHeaderCart:this.isMobileUser,lockPlayerSelection:!0}
1677),this.allProgramsShellService.shellState$.pipe(A(this.unsubscribe$)).subscribe(t=>{let n=t.isMobileUser??!1;n!==this.isMobileUser&&(this.isMobileUser=n,this.allProgramsShellService.setShellState({hideHeaderCart:n}))}),this.route.paramMap.pipe(A(this.unsubscribe$)).subscribe(()=>this.initialize())}ngOnDestroy(){this.allProgramsShellService.isInProgramView=!1,this.allProgramsShellService.setShellState({hideHeaderCart:!1,lockPlayerSelection:!1}),this.unsubscribe$.next(),this.unsubscribe$.complete()}initialize(){if(this.plan=null,this.existingBundleReservations=[],this.hasCheckoutRemaining=!1,this.confirming=!1,this.error="",this.confirmationFailed=!1,this.reservationAttempted=!1,this.canTryAgain=!1,this.retryAvailabilityLoaded=!1,this.successfulReservationTimeSlotIDs=[],this.coachLabelBySlot=new Map,this.coverageLabelBySlot=new Map,this.coverageCandidates=[],this.coverageOptions=[],this.coverageError="",this.coverageSheetReservation=null,this.registerService.reservedSlotsSummary=[],this.plan=this.checkoutChainService.getCheckoutOrchestrationPlan(),this.programName=this.plan!==null&&this.plan?.pendingReservations.length>0?this.plan?.pendingReservations[0].programName:"",!this.plan){this.error="No pending reservations were found.",this.siteDataService.hideSiteLoader(),setTimeout(()=>this.router.navigate(["/all-programs"],{queryParams:this.allProgramsShellService.getMobileAppUserQueryParams()}),1200);return}if(this.existingBundleReservations=this.plan.pendingReservations?.filter(t=>t.assignmentKind===ne.EXISTING_BUNDLE)||[],this.cacheReservationRowState(),this.existingBundleReservations.length===0){this.error="No existing bundle reservations are pending.",this.siteDataService.hideSiteLoader(),setTimeout(()=>this.router.navigate(["/all-programs"],{queryParams:this.allProgramsShellService.getMobileAppUserQueryParams()}),1200);return}if(this.coverageCandidates=this.checkoutOrchestrationService.getCoverageCandidatesForProgram(this.plan.programID),this.buildCoverageOptions(),this.checkoutChainService.isInCheckoutChain()){let t=this.checkoutChainService.getCheckoutChainCurrentLink()?.checkoutPlan;this.hasCheckoutRemaining=!!t&&(t.checkoutTimeSlots?.length>0||t.pendingReservations?.some(n=>n.assignmentKind===ne.NEW_BUNDLE)),ee("remaining links in checkout chain",this.checkoutChainService.getRemainingCheckoutChainLinks())}else{let t=this.plan.checkoutTimeSlots?.length>0;ee("has checkout time slots?",t,"checkout time slots:",this.plan.checkoutTimeSlots),this.hasCheckoutRemaining=t||this.plan.pendingReservations.some(n=>n.assignmentKind===ne.NEW_BUNDLE)}this.siteDataService.hideSiteLoader(),this.loadRetryAvailability()}coachLabel(t){let n=(t?.timeSlot?.staffAssignments??[]).filter(o=>(o?.isAccepted??!1)===!0);return nt(n)||"-"}cacheReservationRowState(){this.coachLabelBySlot=new Map(this.existingBundleReservations.map(t=>[t.signUpTimeSlotID,this.coachLabel(t)]))}get canChooseCoverage(){return this.coverageCandidates.length>1&&this.coverageOptions.some(t=>!t.disabled)&&!this.confirming&&!this.reservationAttempted}get reservationSucceeded(){return this.reservationAttempted&&!this.confirmationFailed&&this.successfulReservationTimeSlotIDs.length>0}get canFinish(){return this.reservationSucceeded&&!this.hasCheckoutRemaining&&!this.checkoutChainService.isInCheckoutChain()}openCoverageSheet(t){this.canChooseCoverage&&(this.coverageError="",this.coverageSheetReservation=t)}closeCoverageSheet(){this.coverageSheetReservation=null}onCoverageSheetVisibleChange(t){t||this.closeCoverageSheet()}selectCoverageFromSheet(t){let n=this.coverageSheetReservation;n&&(this.onCoverageChange(n,t),this.coverageError||this.closeCoverageSheet())}coverageLabelFor(t){return this.coverageOptions.find(n=>n.value===t?.targetEntityRegistrationID)?.label||t?.bundleName||""}onCoverageChange(t,n){this.coverageError="";let o=this.coverageCandidates.find(p=>p.entityRegistrationID===n);if(!this.plan||!o){this.existingBundleReservations=[...this.existingBundleReservations];return}let m=this.checkoutOrchestrationService.reassignSlotCoverage(this.plan,t.signUpTimeSlotID,{registrationID:o.registrationID,entityRegistrationID:o.entityRegistrationID});if(!m.plan){this.coverageError=m.errorMessage,this.existingBundleReservations=[...this.existingBundleReservations];return}this.checkoutChainService.applyCoverageChange(m.plan),this.plan=m.plan,this.existingBundleReservations=(m.plan.pendingReservations||[]).filter(p=>p.assignmentKind===ne.EXISTING_BUNDLE),this.cacheReservationRowState(),this.buildCoverageOptions()}buildCoverageOptions(){let t=this.checkoutOrchestrationService.countCoverageUsageByEntityRegistration(this.plan);this.coverageOptions=this.coverageCandidates.map(n=>{let o=t.get(n.entityRegistrationID)||0,m=n.capacity===null?null:n.capacity-o;return{label:m===null?`${n.bundleName} (unlimited)`:`${n.bundleName} (${Math.max(m,0)} of ${n.capacity} left)`,value:n.entityRegistrationID,disabled:m!==null&&m<=0}}),this.coverageLabelBySlot=new Map(this.existingBundleReservations.map(n=>[n.signUpTimeSlotID,this.coverageLabelFor(n)]))}confirm(){this.confirming||(this.confirming=!0,this.error="",this.confirmationFailed=!1,this.checkoutOrchestrationService.finalizePendingReservations().pipe(A(this.unsubscribe$)).subscribe({next:t=>{if(this.reservationAttempted=!0,this.successfulReservationTimeSlotIDs=[...t.reservedTimeSlotIDs||[]],!t.success){this.confirming=!1,this.confirmationFailed=!0,this.error="Some reservations could not be completed.",this.loadRetryAvailability();return}if(this.recordReservationsForConfirmation(t.successfulReservations),ee("has checkout remaining?",this.hasCheckoutRemaining,"result reserved time slot IDs:",t.reservedTimeSlotIDs),t.successfulReservations?.length)for(let n of t.successfulReservations)this.cartService.removeTimeSlotFromCart(n.signUpTimeSlotID,this.cartService.selectedPlayer?.playerID,this.plan?.programID);this.hasCheckoutRemaining?this.continueToCheckout():this.finalizeReservations()},error:t=>{this.confirming=!1,this.confirmationFailed=!0,this.error=t?.name==="TimeoutError"?"The reservation request timed out. Please try again.":`Unable to confirm reservations. ${t?.message||"Unknown error"}`,this.siteDataService.showSiteErrorAlert(this.error)}}))}recordReservationsForConfirmation(t){if(!t?.length)return;let n=t.filter(p=>p.timeSlot).map(p=>({bundleName:p.bundleName,signUpTimeSlotID:p.signUpTimeSlotID,timeSlot:p.timeSlot}));if(!n.length)return;if(!this.checkoutChainService.isInCheckoutChain()){this.registerService.reservedSlotsSummary=n;return}let o=this.checkoutChainService.getCheckoutChainCurrentLink(),m=o?.programID??this.plan?.programID;Number.isFinite(m)&&this.checkoutChainService.recordChainReservations({programID:m,programName:o?.programName||t[0]?.programName||`Program ${m}`,reservedSlots:n})}tryAgain(){!this.canTryAgain||this.confirming||this.confirm()}continueToCheckout(){if(this.checkoutChainService.isInCheckoutChain()){this.checkoutChainService.completeCheckoutChainPhase(),this.confirming=!1,this.checkoutChainRouter.navigateForChain();return}let t=this.checkoutChainService.getCheckoutOrchestrationPlan()||this.plan,n=(t?.checkoutTimeSlots||[]).map(o=>
1677new Wt(o));if(!t){this.router.navigate(["/all-programs"],{queryParams:this.allProgramsShellService.getMobileAppUserQueryParams()});return}this.registerService.setSelectedRegistrationIDsForSessions(t.selectedRegistrationIDsForCheckout),this.registerService.setSignUpTimeSlotsForSessions(n),this.allProgramsShellService.updatePlayerRegistrationSessionSelections(t.playerID,t.primaryCheckoutRegistrationID,t.selectedRegistrationIDsForCheckout,n).pipe(A(this.unsubscribe$)).subscribe({next:()=>{this.confirming=!1;let o=this.router.serializeUrl(this.router.createUrlTree(["/players",t.playerID,"registrations",t.primaryCheckoutRegistrationID,"register"],{queryParams:this.allProgramsShellService.getMobileAppUserQueryParams()}));this.allProgramsShellService.requestOverduePaymentModal(o)},error:()=>{this.confirming=!1,this.error="Unable to continue to checkout.",this.siteDataService.showSiteErrorAlert(this.error)}})}getReservationStatus(t){return this.reservationAttempted?this.successfulReservationTimeSlotIDSet.has(t.signUpTimeSlotID)?bt.SUCCESS:bt.ISSUE:bt.PENDING}loadRetryAvailability(){if(this.retryAvailabilityLoaded=!1,!this.plan){this.retryAvailabilityLoaded=!0,this.siteDataService.showSiteErrorAlert("Unable to load retry availability.");return}if(!this.plan.playerID){this.retryAvailabilityLoaded=!0,this.siteDataService.showSiteErrorAlert("Unable to load retry availability due to missing player information.");return}this.playerService.getCompletedPlayerRegistrations(this.plan?.playerID,!1).pipe(A(this.unsubscribe$)).subscribe({next:t=>{let n=this.plan?.programID;this.canTryAgain=t.some(o=>o.remainingSessions>0&&o.registration?.programID===n),this.retryAvailabilityLoaded=!0},error:()=>{this.retryAvailabilityLoaded=!0,this.siteDataService.showSiteErrorAlert("Unable to load retry availability.")}})}finalizeReservations(){if(this.confirming=!1,this.checkoutChainService.isInCheckoutChain()){if(this.checkoutChainService.completeCheckoutChainPhase(),this.checkoutChainService.completeCheckoutChainPhase(),this.checkoutChainService.isCheckoutChainComplete()){this.cartService.clearAllCarts(),this.checkoutChainService.cancelCheckoutChain();return}this.checkoutChainRouter.navigateForChain();return}}goBack(){this.navigateToProgramTimeSlots()}done(){this.navigateToProgramTimeSlots()}navigateToProgramTimeSlots(){let n=+this.route.snapshot.paramMap.get("programID"),o=this.allProgramsShellService.resolveCollectionContextFromUrl(this.router.url);this.router.navigate(this.allProgramsShellService.buildProgramLeafRoute("timeslots",n,o),{queryParams:this.allProgramsShellService.getMobileAppUserQueryParams()})}};c.\u0275fac=function(n){return new(n||c)(R(ge),R(_e),R(gt),R(ue),R(be),R(Se),R(et),R(De),R(we),R(Jt))},c.\u0275cmp=Te({type:c,selectors:[["app-all-programs-bundle-confirm"]],standalone:!1,decls:26,vars:6,consts:[["cardContent",""],["mobileContent",""],["mobileActionBar",""],["buttonRow",""],["header",""],["body",""],["position","bottom","header","Covered by",3,"visibleChange","visible","pt"],[1,"mobile-action-sheet-body"],["data-testid","bundle-confirm-page",1,"mobile-app-layout","full-width","d-flex","flex-column"],[1,"flex-grow-1","flex-shrink-1","min-height-0","overflow-y-auto","p-2"],[4,"ngTemplateOutlet"],[1,"main","pt-3"],["data-testid","bundle-confirm-page",1,"programs-list-container","container"],[1,"card","mb-3"],[1,"card-footer","d-flex","justify-content-between","align-items-center"],[1,"card-header","d-flex","align-items-center"],[1,"text-h4","mb-0"],[1,"card-body"],["alertType","success","data-testid","bundle-confirm-success",1,"d-block","mb-3",3,"isInline"],[1,"text-grey","mb-3"],[1,"mb-3"],[1,"p-datatable-sm",3,"value"],[1,"text-center"],["data-testid","bundle-confirm-row"],["data-testid","bundle-confirm-status",1,"text-center"],["optionLabel","label","optionValue","value","optionDisabled","disabled","styleClass","full-width","appendTo","body",3,"onChange","options","ngModel"],[1,"text-muted","text-small"],["status","success","text","Success",3,"nowrap"],["status","error","text","Issue occurred",3,"nowrap"],["status","info","text","Pending confirmation",3,"nowrap"],["alertType","warning",1,"d-block","mt-3",3,"isInline"],["alertType","error",1,"d-block","mt-3",3,"isInline"],["alertType","success","data-testid","bundle-confirm-success",1,"d-block","mb-2",3,"isInline"],[1,"text-muted","text-small","mb-3"],[1,"text-h5","mb-1"],["data-testid","bundle-confirm-row",1,"card","mb-2"],[1,"card-body","p-2"],[1,"d-flex","align-items-start","justify-content-between"],[1,"min-width-0"],[1,"fw-700","line-height-2"],[1,"text-small","text-grey"],["data-testid","bundle-confirm-status",1,"flex-shrink-0","ml-2"],["aria-hidden","true",1,"fa-solid","fa-circle-check","text-green"],[1,"sr-only"],["aria-hidden","true",1,"fa-solid","fa-circle-xmark","text-red"],["type","button",1,"btn-a11y","btn-a11y-light-hover","mobile-coverage-row","full-width","d-flex","align-items-center","justify-content-between","border-top","mt-2","pt-2",3,"click"],[1,"text-small","fw-700","text-right","min-width-0","text-overflow-ellipsis"],["aria-hidden","true",1,"fa-regular","fa-chevron-right","ml-2"],[1,"d-flex","align-items-center","justify-content-between","border-top","mt-2","pt-2"],[1,"text-small","fw-700"],["alertType","warning",1,"d-block","mt-2",3,"isInline"],["alertType","error",1,"d-block","mt-2",3,"isInline"],[1,"flex-grow-0","flex-shrink-0","bg-white","border-top","p-2","d-flex","align-items-center","justify-content-between"],["type","button","data-testid","bundle-confirm-done",1,"btn","btn-primary","full-width",3,"click"],[1,"min-width-0","mr-2"],[1,"text-small","text-grey","text-overflow-ellipsis"],[1,"d-flex","align-items-center","flex-shrink-0"],["type","button","data-testid","bundle-confirm-try-again",1,"btn","mr-2",3,"click","disabled"],["type","button","data-testid","bundle-confirm-continue-checkout",1,"btn","btn-primary",3,"click","disabled"],["type","button","data-testid","bundle-confirm-submit",1,"btn","btn-primary",3,"click","disabled"],["aria-hidden","true",1,"spinner-border","spinner-border-sm","mr-2"],["alertType","warning",1,"d-block","mb-2",3,"isInline"],["type","button",1,"btn-a11y","btn-a11y-light-hover","mobile-coverage-row","full-width","d-flex","align-items-center","justify-content-between","border-bottom","px-1",3,"click","disabled"],[1,"min-width-0","text-overflow-ellipsis","text-left"],["aria-hidden","true",1,"fa-regular","fa-check","text-green","ml-2","flex-shrink-0"],["type","button","data-testid","bundle-confirm-back",1,"btn",3,"click","disabled"],[1,"d-flex","align-items-center"],["type","button","data-testid","bundle-confirm-continue-checkout",1,"btn","btn-primary","mr-2",3,"click","disabled"],["type","button","data-testid","bundle-confirm-done",1,"btn","btn-primary",3,"click"]],template:function(n,o){n&1&&(_(0,dm,13,2)(1,_m,17,2),M(2,Mm,15,5,"ng-template",null,0,ae),e(4,` 1678 1679`),e(5,` 1680`),M(6,Jm,7,3,"ng-template",null,1,ae),e(8,` 1681 1682`),M(9,od,6,1,"ng-template",null,2,ae),e(11,` 1683 1684`),e(12,` 1685`),a(13,"p-drawer",6),b("visibleChange",function(p){return o.onCoverageSheetVisibleChange(p)}),e(14,` 1686 `),a(15,"div",7),e(16,` 1687 `),_(17,ad,4,2),L(18,sd,8,4,null,null,lm),l(),e(20,`
1688`),l(),e(21,` 1689 1690`),e(22,` 1691`),M(23,_d,11,5,"ng-template",null,3,ae),e(25,` 1692`)),n&2&&(u(o.isMobileUser?0:1),s(13),Ke(o.mobileSheetStyle),x("visible",!!o.coverageSheetReservation)("pt",o.mobileSheetPt),s(4),u(o.coverageError?17:-1),s(),O(o.coverageOptions))},dependencies:[Fe,Me,Le,at,lt,Oe,rn,rt,Be],styles:[".admin-header[_ngcontent-%COMP%]{z-index:1}.programs-filters-wrapper[_ngcontent-%COMP%]{top:6.5rem}.programs-filters-wrapper[_ngcontent-%COMP%] .programs-filters-inner[_ngcontent-%COMP%]{max-height:calc(100vh - 6.5rem);overflow:auto}.registration-groups-accordion.p-accordion-naked[_ngcontent-%COMP%] .p-accordionpanel.card[_ngcontent-%COMP%], .program-groups-accordion.p-accordion-naked[_ngcontent-%COMP%] .p-accordionpanel.card[_ngcontent-%COMP%]{--p-accordion-content-padding: 1rem 1rem 1rem 1.25rem}.registration-custom-text-row[_ngcontent-%COMP%] {font-size:.875rem}.registration-custom-text-row[_ngcontent-%COMP%] p{margin-bottom:.5rem}.registration-custom-text-row[_ngcontent-%COMP%] h1{font-size:1.5rem}.registration-custom-text-row[_ngcontent-%COMP%] h2{font-size:1.375rem}.registration-custom-text-row[_ngcontent-%COMP%] h3{font-size:1.25rem}.registration-custom-text-row[_ngcontent-%COMP%] h4{font-size:1.125rem}.registration-custom-text-row[_ngcontent-%COMP%] h5{font-size:1rem}.programs-list-container[_ngcontent-%COMP%] .all-programs-card:hover{box-shadow:var(--box-sha
1692dow-lg);border-color:var(--grey-500)}.registration-card-info[_ngcontent-%COMP%]{border-right:none;border-bottom:var(--border);padding-bottom:1rem;margin-bottom:1rem}@media(min-width:768px){.registration-card-info[_ngcontent-%COMP%]{border-right:var(--border);border-bottom:none;padding-bottom:unset;margin-bottom:unset}}.registration-details-grid[_ngcontent-%COMP%], .registration-details-grid--price[_ngcontent-%COMP%]{text-align:left}@media(min-width:768px){.registration-details-grid[_ngcontent-%COMP%], .registration-details-grid--price[_ngcontent-%COMP%]{text-align:right}}.cart-item-badge[_ngcontent-%COMP%]{position:absolute;bottom:0;left:5rem;font-size:.5rem;height:1.25rem;padding:.25rem;background-color:var(--primary, #007bff);color:#fff;border-bottom-left-radius:.5rem}.mobile-coverage-row[_ngcontent-%COMP%]{min-height:2.75rem}.mobile-app-layout[_ngcontent-%COMP%]{height:calc(100dvh - var(--admin-header-height, 0px))}",".mobile-action-sheet-body[_ngcontent-%COMP%]{flex:1 1 auto;overflow-y:auto;min-height:0}.mobile-action-sheet-footer[_ngcontent-%COMP%]{flex:0 0 auto}"]});let r=c;return r})();var Jn=(()=>{let c=class c{};c.\u0275fac=function(n){return new(n||c)},c.\u0275mod=Tt({type:c}),c.\u0275inj=It({imports:[pi.forChild([{path:"",component:Gn},{path:"category/:categoryID",component:Ye,children:[{path:"",component:oi},{path:"program/:programID/timeslots",canActivate:[ve,ye,je],component:ai,data:{bodyClass:"time-slots",metaTitle:"Select Time Slots"}},{path:"program/:programID/bundle-confirm",canActivate:[ve,ye,je],component:li,data:{bodyClass:"bundle-confirm",metaTitle:"Confirm Bundle Reservations"}},{path:"program/:programID/players/:id/registrations/:registrationID/register",canActivate:[ve,ye],canDeactivate:[St],component:ft,data:{bodyClass:"registration",metaTitle:"Registration"}},{path:"program/:programID/players/:id/registrations/:registrationID/teams/:teamID/register",canActivate:[ve,ye],canDeactivate:[St],component:ft,data:{bodyClass:"registration",metaTitle:"Registration"}}]},{path:"type/:programTypeID",component:Ye,children:[{path:"",component:oi},{path:"program/:programID/timeslots",canActivate:[ve,ye,je],component:ai,data:{bodyClass:"time-slots",metaTitle:"Select Time Slots"}},{path:"program/:programID/bundle-confirm",canActivate:[ve,ye,je],component:li,data:{bodyClass:"bundle-confirm",metaTitle:"Confirm Bundle Reservations"}},{path:"program/:programID/players/:id/registrations/:registrationID/register",canActivate:[ve,ye],canDeactivate:[St],component:ft,data:{bodyClass:"registration",metaTitle:"Registration"}},{path:"program/:programID/players/:id/registrations/:registrationID/teams/:teamID/register",canActivate:[ve,ye],canDeactivate:[St],component:ft,data:{bodyClass:"registration",metaTitle:"Registration"}}]},{path:"checkout-summary",canActivate:[ve,ye],component:Ye,children:[{path:"",component:Mn,data:{bodyClass:"checkout-summary",metaTitle:"Registration Summary"}}]},{path:":programID/timeslots",canActivate:[ve,ye,je],component:Ye,children:[{path:"",component:ai,data:{bodyClass:"time-slots",metaTitle:"Select Time Slots"}}]},{path:":programID/bundle-confirm",canActivate:[ve,ye,je],component:Ye,children:[{path:"",component:li,data:{bodyClass:"bundle-confirm",metaTitle:"Confirm Bundle Reservations"}}]},{path:":programID",component:Ye,children:[{path:"",component:oi}]}]),pi]});let r=c;return r})();var nu=(()=>{let c=class c{};c.\u0275fac=function(n){return new(n||c)},c.\u0275mod=Tt({type:c}),c.\u0275inj=It({providers:[Ve,ct,Xt,ui,hi,be,Fn,ui,hi,_t,ri],imports:[bn,Jn,wn,Rn,Zi,kn,Ji,Vn,Un,On,Cn,Sn,Xi,An]});let r=c;return r})();export{nu as AllProgramsModule};
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.