1import{a as ke}from"./chunk-R6YKEWAF.js";import{a as Nt,c as Oe}from"./chunk-ZLBN6FZV.js";import{b as We,c as Pe,d as lt}from"./chunk-PMGCU7IV.js";import"./chunk-OVWSJLKC.js";import{a as Fe,b as Ae,g as Ve}from"./chunk-QLS2HGKB.js";import"./chunk-BTQPKA7U.js";import"./chunk-D5WNKLON.js";import"./chunk-FLFERWGO.js";import{a as Yt,b as Ht,c as O,d as B}from"./chunk-M2HVR7PD.js";import"./chunk-QUG4HHXZ.js";import{a as Te,b as Ie}from"./chunk-PSOULVZL.js";import"./chunk-XAXLMUF6.js";import"./chunk-O3BD2LYL.js";import"./chunk-6ORYOOUQ.js";import"./chunk-ZB44PIZA.js";import{c as Ee}from"./chunk-YBFQQSLW.js";import"./chunk-MB6YAV2B.js";import"./chunk-BT6MT7GL.js";import{a as _e}from"./chunk-CHFQMRFX.js";import{a as me}from"./chunk-4CVZBQNN.js";import"./chunk-IAGBH4HM.js";import"./chunk-MJKUV2I5.js";import"./chunk-4T73AMAL.js";import"./chunk-G2OHGTWE.js";import"./chunk-NAW6KKAQ.js";import"./chunk-GNX3F6NH.js";import"./chunk-VFXJ4ZBD.js";import"./chunk-YVLOHBDK.js";import{a as kt}from"./chunk-Z3AXU4EF.js";import"./chunk-ZB64W4XA.js";import{a as Ot}from"./chunk-SVABVB5X.js";import"./chunk-CMY6WAF3.js";import"./chunk-FUY7HSJY.js";import"./chunk-JTYXZXFU.js";import"./chunk-CYDDDATF.js";import"./chunk-GWQPV7EH.js";import"./chunk-RQ74XYI3.js";import"./chunk-3IFGWXMA.js";import"./chunk-EME7BUOO.js";import"./chunk-GXCJ5QS4.js";import{b as ue}from"./chunk-4D5SN44G.js";import"./chunk-VVVN3YIZ.js";import"./chunk-FWW3IJT2.js";import"./chunk-HYGNXZJR.js";import{a as Vt}from"./chunk-B6XXRKU5.js";import"./chunk-6Q5DDO7R.js";import{a as St}from"./chunk-NXTJBJRP.js";import"./chunk-U22BTVEZ.js";import{$b as wt,Cc as Ce,Ce as At,Ec as yt,Ed as Pt,Ee as ye,Gb as K,Gc as Dt,Gd as Ft,Hc as Rt,Hd as rt,Jc as Et,Kb as bt,Lc as Tt,Mc as It,Rc as fe,Sc as J,Wc as he,Xc as ve,Zc as Se,b as Zt,d as te,id as Wt,jb as at,jc as xe,k as ee,kd as ot,kh as Re,lc as ge,m as ie,mb as de,tf as De,ve as be,xb as pe,ye as we}from"./chunk-X5J6QTCG.js";import{$ as pt,$a as p,Ad as $t,Db as Xt,E as Jt,Eg as se,Fa as l,Fb as F,Fh as ht,Gb as tt,H as ct,Hg as ce,Ib as t,Jb as E,Ka as w,Kb as b,Lc as xt,Ma as V,Na as _t,Pf as Ct,Qb as y,Rb as D,Sa as A,Sb as R,Th as q,U as T,W as dt,Wc as gt,Xa as H,bb as m,be as Q,bg as ft,cc as et,d as Y,db as k,dc as st,di as vt,eb as N,fa as u,fb as M,fj as I,ga as x,gb as _,hb as o,ib as r,jb as v,lc as z,lf as ae,ma as Z,mf as oe,nb as W,nc as j,nf as re,ob as P,pj as nt,qb as f,qc as ut,sb as g,tb as d,u as Kt,ua as mt,xb as G,xd as ne,yb as L,zb as U,zg as le}from"./chunk-SMW7PHYX.js";import{a as $,b as X}from"./chunk-BMIYOSOG.js";var qe=["endDateForm"];function Ke(n,c){if(n&1){let i=f();t(0,` 2 `),o(1,"app-dynamic-form",3,0),g("onSubmit",function(a){u(i);let s=d();return x(s.save.emit(a))}),t(3,` 3 `),o(4,"app-dynamic-form-field",4),t(5,` 4 `),r(),t(6,` 5 `),r(),t(7,` 6 `)}if(n&2){let i=d();l(),_("fields",i.endDateFields)("entity",i.endDateEntity)("contentFieldsMode",!0)("showSubmitButton",!1)("showCancelButton",!1)("horizontalForm",!1)}}function Je(n,c){if(n&1){let i=f();t(0,` 7 `),o(1,"app-dialog-footer"),t(2,` 8 `),W(3,5),t(4,` 9 `),o(5,"button",6),g("click",function(){u(i);let a=d(2);return x(a.cancel.emit())}),t(6,"Cancel"),r(),t(7,` 10 `),P(),t(8,` 11 `),W(9,7),t(10,` 12 `),o(11,"button",8),g("click",function(){u(i);let a=d(2);return x(a.endDateForm.submitForm())}),t(12,"Update All"),r(),t(13,` 13 `),P(),t(14,` 14 `),r(),t(15,` 15 `)}}function Xe(n,c){if(n&1&&(t(0,` 16 `),p(1,Je,16,0)),n&2){let i=d();l(),m(i.showEndDateDialog?1:-1)}}var Mt=(()=>{let c=class c{constructor(){this.endDateEntity={endDate:new Date},this.isModal=!0,this.cancel=new Z,this.save=new Z,this.showEndDateDialog=!0}};c.\u0275fac=function(a){return new(a||c)},c.\u0275cmp=V({type:c,selectors:[["app-edit-end-date-all-dialog"]],viewQuery:function(a,s){if(a&1&&G(qe,5),a&2){let C;L(C=U())&&(s.endDateForm=C.first)}},inputs:{endDateFields:"endDateFields",endDateEntity:"endDateEntity",isModal:"isModal"},outputs:{cancel:"cancel",save:"save"},standalone:!1,decls:8,vars:6,consts:[["endDateForm",""],["header","Edit End Date","appendTo","body",3,"visibleChange","onHide","close","visible","showHeader","closable","modal","draggable"],["pTemplate","footer"],["formID","endDateForm",3,"onSubmit","fields","entity","contentFieldsMode","showSubmitButton","showCancelButton","horizontalForm"],["fieldName","endDate","formID","endDateForm"],["slot","secondary"],["type","button",1,"btn",3,"click"],["slot","primary"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(a,s){a&1&&(o(0,"p-dialog",1),R("visibleChange",function(h){return D(s.showEndDateDialog,h)||(s.showEndDateDialog=h),h}),g("onHide",function(){return s.cancel.emit()})("close",function(){return s.cancel.emit()}),t(1,` 17 `),o(2,"div"),t(3,` 18 `),p(4,Ke,8,6),r(),t(5,` 19 `),A(6,Xe,2,1,"ng-template",2),t(7,` 20`),r()),a&2&&(y("visible",s.showEndDateDialog),_("showHeader",!0)("closable",!0)("modal",s.isModal)("draggable",!1),l(4),m(s.showEndDateDialog?4:-1))},dependencies:[rt,ot,Q,J,K],encapsulation:2});let n=c;return n})();function ti(n,c){if(n&1){let i=f();t(0,` 21 `),o(1,"a",2),g("click",function(){u(i);let a=d();return x(a.showModal=!0)}),t(2),r(),t(3,` 22`)}if(n&2){let i=d();l(2),b(` 23 `,i.clubName,` 24 `)}}function ei(n,c){if(n&1&&t(0),n&2){let i=d();b(` 25 `,i.clubName,` 26`)}}function ii(n,c){if(n&1){let i=f();t(0,` 27 `),o(1,"app-dialog-footer"),t(2,` 28 `),W(3,3),t(4,` 29 `),o(5,"button",4),g("click",function(){u(i);let a=d();return x(a.showModal=!1)}),t(6,"Cancel"),r(),t(7,` 30 `),P(),t(8,` 31 `),W(9,5),t(10,` 32 `),o(11,"button",6),g("click",function(){u(i);let a=d();return x(a.goToClub())}),t(12,"Yes, Proceed"),r(),t(13,` 33 `),P(),t(14,` 34 `),r(),t(15,` 35 `)}}var Lt=(()=>{let c=class c{constructor(e){this.authorizeService=e,this.showModal=!1}goToClub(){this.authorizeService.removeUser(),window.location.href=`${window.location.origin.replace(/(\/\/)([\w\d-])*\./i,`//${this.subdomain}.`)}/admin/registration-waitlist`}};c.\u0275fac=function(a){return new(a||c)(w(vt))},c.\u0275cmp=V({type:c,selectors:[["app-club-link"]],inputs:{currentClubID:"currentClubID",clubID:"clubID",clubName:"clubName",subdomain:"subdomain"},standalone:!1,decls:6,vars:5,consts:[["styleClass","shortWidthDialog",3,"visibleChange","header","visible"],["pTemplate","footer"],["href","javascript:void(0);",3,"click"],["slot","secondary"],[1,"btn",3,"click"],["slot","primary"],[1,"btn","btn-primary",3,"click"]],template:function(a,s){a&1&&(p(0,ti,4,1),p(1,ei,1,1),o(2,"p-dialog",0),R("visibleChange",function(h){return D(s.showModal,h)||(s.showModal=h),h}),t(3),A(4,ii,16,0,"ng-template",1),t(5,` 36`),r()),a&2&&(m(s.clubID!==s.currentClubID?0:-1),l(),m(s.clubID===s.currentClubID?1:-1),l(),_("header","Navigate To "+s.clubName),y("visible",s.showModal),l(),b(` 37 You will be taken to `,s.clubName,` site, do you wish to proceed? 38 `))},dependencies:[Q,J,K],encapsulation:2});let n=c;return n})();var ni=["optionsMenu"],ai=()=>({width:"auto"});function oi(n,c){if(n&1&&(t(0,` 39 `),o(1,"div",8),t(2,` 40 `),o(3,"span",9),t(4,` 41 Gender: 42 `),r(),t(5,` 43 `),o(6,"span",10),t(7),r(),t(8,` 44 `),r(),t(9,` 45 `)),n&2){let i=d(3);l(7),b(` 46 `,i.details.gender,` 47 `)}}function ri(n,c){if(n&1&&(t(0,` 48 `),o(1,"div",8),t(2,` 49 `),o(3,"span",9),t(4,` 50 Birth Year: 51 `),r(),t(5,` 52 `),o(6,"span",10),t(7),r(),t(8,` 53 `),r(),t(9,` 54 `)),n&2){let i=d(3);l(7),b(` 55 `,i.details.birthYear,` 56 `)}}function li(n,c){if(n&1&&(t(0,` 57 `),o(1,"div",8),t(2,` 58 `),o(3,"span",9),t(4,` 59 Team: 60 `),r(),t(5,` 61 `),o(6,"span",10),t(7),r(),t(8,` 62 `),r(),t(9,` 63 `)),n&2){let i=d(3);l(7),b(` 64 `,i.item.teamName,` 65 `)}}function si(n,c){if(n&1&&(t(0,` 66 `),o(1,"div",7),t(2,` 67 `),p(3,oi,10,1),p(4,ri,10,1),p(5,li,10,1),r(),t(6,` 68 `)),n&2){let i=d(2);l(3),m(i.details.gender?3:-1),l(),m(i.details.birthYear?4:-1),l(),m(i.item.teamName?5:-1)}}function ci(n,c){if(n&1&&(t(0,` 69 `),o(1,"div",13),t(2,` 70 `),o(3,"div",12),t(4),r(),t(5,` 71 `),o(6,"div",12),t(7),r(),t(8,` 72 `),o(9,"div",12),t(10),r(),t(11,` 73 `),o(12,"div",12),t(13),r(),t(14,` 74 `),o(15,"div",12),t(16),r(),t(17,` 75 `),r(),t(18,` 76 `)),n&2){let i=c.$implicit,e=c.$index,a=c.$count,s=d(4);l(),F("mb-2",e!==a-1),l(2),F("fw-800",i.genderID===s.details.genderID),l(),b(` 77 `,i.genderName||"Any",` 78 `),l(2),F("fw-800",i.birthYear===s.details.birthYear),l(),b(` 79 `,i.birthYear||"Any",` 80 `),l(3),b(` 81 `,i.maxCapacity,` 82 `),l(3),b(` 83 `,i.registrationCount||0,` 84 `),l(3),b(` 85 `,i.cancellationCount||0,` 86 `)}}function di(n,c){if(n&1&&(t(0,` 87 `),o(1,"div",11),t(2,` 88 `),o(3,"div",12),t(4,"Gender"),r(),t(5,` 89 `),o(6,"div",12),t(7,"Birth Year"),r(),t(8,` 90 `),o(9,"div",12),t(10,"Max Capacity"),r(),t(11,` 91 `),o(12,"div",12),t(13,"Registration Count"),r(),t(14,` 92 `),o(15,"div",12),t(16,"Cancellations"),r(),t(17,` 93 `),r(),t(18,` 94 `),N(19,ci,19,11,null,null,k)),n&2){let i=d(3);l(19),M(i.details.applicableAdvancedCapacityRules)}}function pi(n,c){if(n&1&&(t(0,` 95 `),p(1,di,21,0)),n&2){let i=d(2);l(),m(i.details.applicableAdvancedCapacityRules!=null&&i.details.applicableAdvancedCapacityRules.length?1:-1)}}function mi(n,c){if(n&1&&(t(0,` 96 `),o(1,"div",14),t(2,` 97 `),o(3,"div",12),t(4),r(),t(5,` 98 `),o(6,"div",12),t(7),r(),t(8,` 99 `),o(9,"div",12),t(10),r(),t(11,` 100 `),o(12,"div",12),t(13),r(),t(14,` 101 `),r(),t(15,` 102 `)),n&2){let i=c.$implicit,e=d().$implicit,a=d(4);l(3),F("fw-800",i.teamID===a.item.teamID),l(),b(` 103 `,i.teamName||"Any",` 104 `),l(3),b(` 105 `,e.maxCapacity,` 106 `),l(3),b(` 107 `,i.registrationCount||0,` 108 `),l(3),b(` 109 `,i.cancellationCount||0,` 110 `)}}function _i(n,c){if(n&1&&(t(0,` 111 `),o(1,"div"),t(2,`
112 `),N(3,mi,16,6,null,null,k),r(),t(5,` 113 `)),n&2){let i=c.$implicit,e=c.$index,a=c.$count;l(),F("mb-2",e!==a-1),l(2),M(i.teamAssignments)}}function ui(n,c){if(n&1&&(t(0,` 114 `),o(1,"div",11),t(2,` 115 `),o(3,"div",12),t(4,"Team"),r(),t(5,` 116 `),o(6,"div",12),t(7,"Max Capacity"),r(),t(8,` 117 `),o(9,"div",12),t(10,"Registration Count"),r(),t(11,` 118 `),o(12,"div",12),t(13,"Cancellations"),r(),t(14,` 119 `),r(),t(15,` 120 `),N(16,_i,6,2,null,null,k)),n&2){let i=d(3);l(16),M(i.details.applicableAdvancedCapacityTeamRules)}}function xi(n,c){if(n&1&&(t(0,` 121 `),p(1,ui,18,0)),n&2){let i=d(2);l(),m(i.details.applicableAdvancedCapacityTeamRules!=null&&i.details.applicableAdvancedCapacityTeamRules.length?1:-1)}}function gi(n,c){if(n&1&&(t(0,` 122 `),o(1,"div",4),t(2,` 123 `),o(3,"div",5),t(4,` 124 Player/Waitlist Details 125 `),r(),t(5,` 126 `),p(6,si,7,3),r(),t(7,` 127 `),o(8,"div",6),t(9,` 128 `),o(10,"div",5),t(11,` 129 Applicable Advanced Capacity Rules 130 `),r(),t(12,` 131 `),o(13,"div",7),t(14,` 132 `),p(15,pi,2,1)(16,xi,2,1),t(17,` 133 `),r(),t(18,` 134 `),r(),t(19,` 135 `)),n&2){let i,e=d();l(6),m(e.details.gender||e.details.birthYear||e.item.teamName?6:-1),l(2),F("border-bottom",e.item.conflicts==null?null:e.item.conflicts.length),l(7),m((i=e.item.registrationAdvancedCapacityOptionID)===e.RegistrationAdvancedCapacityOption.GENDER_BIRTHYEAR?15:i===e.RegistrationAdvancedCapacityOption.TEAM?16:-1)}}function Ci(n,c){if(n&1){let i=f();t(0,` 136 `),o(1,"app-tag",20),g("onClick",function(a){u(i);let s=d().$implicit,C=d(2);return x(C.toggleOptionsMenu(s,a))}),t(2,` 137 `),r(),t(3,` 138 `)}if(n&2){let i=d().$implicit;l(),_("text",i.registrationName)("clickable",!0)}}function fi(n,c){if(n&1&&(t(0,` 139 `),o(1,"span",21),t(2,` 140 `),v(3,"app-tag",22),t(4,` 141 `),r(),t(5,` 142 `)),n&2){let i=d().$implicit;l(3),_("text",i.registrationName)}}function hi(n,c){if(n&1&&(t(0,` 143 `),o(1,"div",19),t(2,` 144 `),p(3,Ci,4,2)(4,fi,6,1),r(),t(5,` 145 `)),n&2){let i=d(2);l(3),m(i.item.clubID===i.currentClubID&&i.hasPlayerProgramPermission?3:4)}}function vi(n,c){if(n&1&&(t(0,` 146 `),o(1,"div",15),t(2,` 147 `),o(3,"div",16),t(4,` 148 Conflicts 149 `),o(5,"span",17),t(6,` 150 `),v(7,"i",18),t(8,` 151 `),r(),t(9,` 152 `),r(),t(10,` 153 `),o(11,"div",7),t(12,` 154 `),o(13,"div",13),t(14,` 155 `),o(15,"div",7),t(16,` 156 `),N(17,hi,6,1,null,null,k),r(),t(19,` 157 `),r(),t(20,` 158 `),r(),t(21,` 159 `),r(),t(22,` 160 `)),n&2){let i=d();l(17),M(i.item.conflicts)}}function Si(n,c){if(n&1){let i=f();t(0,` 161`),o(1,"app-cancel-player-registration",23),g("close",function(){u(i);let a=d();return x(a.cancelDialogVisible=!1)})("save",function(){u(i);let a=d();return a.cancelDialogVisible=!1,x(a.conflictRemoved())}),t(2,` 162`),r(),t(3,` 163`)}if(n&2){let i=d();l(),_("program",i.selectedPlayerProgramSearch)("playerID",i.item.playerID)}}function bi(n,c){if(n&1){let i=f();t(0,`
164`),o(1,"app-change-player-registration",23),g("close",function(){u(i);let a=d();return x(a.changeDialogVisible=!1)})("save",function(){u(i);let a=d();return x(a.conflictRemoved())}),t(2,` 165`),r(),t(3,` 166`)}if(n&2){let i=d();l(),_("program",i.selectedPlayerProgramSearch)("playerID",i.item.playerID)}}var Ut=(()=>{let c=class c{constructor(e){this.waitlistService=e,this.hasPlayerProgramPermission=!1,this.Permission=q,this.options=[{label:"Options",items:[{label:"Change Registration",command:()=>{this.changeDialogVisible=!0}},{label:"Cancel Registration",command:()=>{this.cancelDialogVisible=!0}}]}],this.activeOptions=[],this.changeDialogVisible=!1,this.cancelDialogVisible=!1,this.RegistrationAdvancedCapacityOption=De}toggleOptionsMenu(e,a){this.activeOptions=JSON.parse(JSON.stringify(this.options)),e.canChange||this.activeOptions[0].items.splice(0,1),this.selectedPlayerProgramSearch=e,this.optionsMenu.toggle(a)}conflictRemoved(){let e=this.item.conflicts.findIndex(a=>a.entityRegistrationID===this.selectedPlayerProgramSearch.entityRegistrationID);this.item.conflicts.splice(e,1),this.item.conflicts.length===0&&(this.waitlistService.expandedItems[this.item.registrationWaitlistID]=!1,this.waitlistService.search())}};c.\u0275fac=function(a){return new(a||c)(w(B))},c.\u0275cmp=V({type:c,selectors:[["app-registration-waitlist-details"]],viewQuery:function(a,s){if(a&1&&G(ni,5),a&2){let C;L(C=U())&&(s.optionsMenu=C.first)}},inputs:{details:"details",user:"user",currentClubID:"currentClubID",item:"item",hasPlayerProgramPermission:"hasPlayerProgramPermission"},standalone:!1,decls:14,vars:9,consts:[["optionsMenu",""],[1,"details-row"],[1,"details-wrapper"],["appendTo","body",3,"model","popup"],[1,"row","mx-0","py-2","border-bottom","d-flex","align-items-center"],[1,"col-2","pl-0","text-small","text-uppercase"],[1,"row","mx-0","py-2","d-flex","align-items-center"],[1,"col"],[1,"bg-navy","text-white","border-radius-sm","mr-2","px-2","py-1","d-inline-block"],[1,"text-small","text-uppercase","mr-2"],[1,"text-uppercase","fw-600"],[1,"row","fw-700","text-small","mb-2"],[1,"col-md-2"],[1,"row"],[1,"row","line-height-1","text-small"],[1,"row","mx-0","py-2","d-flex"],[1,"col-2","pl-0","text-small","text-uppercase","pt-2"],[1,"ml-1","text-red"],[1,"fa","fa-exclamation-triangle"],[1,"d-inline-block","mb-2"],["icon","fa-regular fa-pen-to-square",3,"onClick","text","clickable"],["pTooltip","Go to this player's record to cancel or change this conflicting registration."],[3,"text"],[3,"close","save","program","playerID"]],template:function(a,s){a&1&&(o(0,"div",1),t(1,` 167 `),o(2,"div",2),t(3,` 168 `),p(4,gi,20,4),p(5,vi,23,0),r(),t(6,` 169`),r(),t(7,` 170 171`),o(8,"p-menu",3,0),t(10,` 172`),r(),t(11,` 173 174`),p(12,Si,4,2),p(13,bi,4,2)),a&2&&(l(4),m(s.details&&s.item.registrationAdvancedCapacityOptionID&&(s.details.applicableAdvancedCapacityRules!=null&&s.details.applicableAdvancedCapacityRules.length||s.details.applicableAdvancedCapacityTeamRules!=null&&s.details.applicableAdvancedCapacityTeamRules.length)?4:-1),l(),m(s.item.conflicts!=null&&s.item.conflicts.length?5:-1),l(3),tt(et(8,ai)),_("model",s.activeOptions)("popup",!0),l(4),m(s.cancelDialogVisible?12:-1),l(),m(s.changeDialogVisible?13:-1))},dependencies:[ye,at,de,Ae,Fe],styles:[".details-row[_ngcontent-%COMP%]{text-align:left!important}.details-wrapper[_ngcontent-%COMP%]{background-color:var(--grey-50);padding:.5rem 1rem}a.detail-link[_ngcontent-%COMP%]:hover{color:var(--grey-800)}"]});let n=c;return n})();var Vi=["specialRegistrationForm"],Oi=n=>({registrationWaitlistID:n});function ki(n,c){if(n&1&&(t(0,` 175 `),o(1,"th",15),t(2),v(3,"p-sortIcon",16),t(4,` 176 `),r(),t(5,` 177 `)),n&2){let i=c.$implicit,e=d(2);l(),_("pSortableColumn",i.field),H("aria-label",e.AriaLabels.ACTIVATE_SORT),l(),b(` 178 `,i.header,` 179 `),l(),_("field",i.field)}}function Ni(n,c){n&1&&(t(0,` 180 `),v(1,"th"),t(2,` 181 `))}function Mi(n,c){n&1&&(t(0,` 182 `),v(1,"th"),t(2,` 183 `))}function Li(n,c){if(n&1&&(t(0,` 184 `),o(1,"tr"),t(2,` 185 `),o(3,"th"),t(4,` 186 `),v(5,"p-tableHeaderCheckbox"),t(6,` 187 `),r(),t(7,` 188 `),N(8,ki,6,4,null,null,k),p(10,Ni,3,0),p(11,Mi,3,0),r(),t(12,` 189 `)),n&2){let i=d();l(8),M(i.columns),l(2),m(i.showConflicts?10:-1),l(),m(i.showConflicts?11:-1)}}function Ui(n,c){if(n&1&&(t(0,` 190 `),v(1,"p-tableCheckbox",18),t(2,` 191 `)),n&2){let i=d().$implicit;l(),_("value",i)}}function Bi(n,c){if(n&1&&(t(0,` 192 `),o(1,"td"),t(2),r(),t(3,` 193 `)),n&2){let i=d().$implicit,e=d();l(2),E(i.ageClass?e.formatAgeGroup(i.ageClass):"")}}function $i(n,c){if(n&1&&(t(0,` 194 `),o(1,"td"),t(2),r(),t(3,` 195 `)),n&2){let i=d().$implicit;l(2),E(i.positionName)}}function Yi(n,c){if(n&1&&(t(0,` 196 `),o(1,"td"),t(2),r(),t(3,` 197 `)),n&2){let i=d().$implicit;l(2),E(i.grade)}}function Hi(n,c){if(n&1&&(t(0,` 198 `),o(1,"td"),t(2),r(),t(3,` 199 `)),n&2){let i=d().$implicit;l(2),E(i.school)}}function Gi(n,c){if(n&1&&(t(0),z(1,"date")),n&2){let i=d().$implicit;b(` 200 `,j(1,1,i.specialRegistration.startDate,"M/d/yy"),` 201 `)}}function zi(n,c){if(n&1&&(t(0),z(1,"date")),n&2){let i=d().$implicit;b(` 202 `,j(1,1,i.specialRegistration.endDate,"M/d/yy"),` 203 `)}}function ji(n,c){if(n&1&&(t(0,` 204 `),o(1,"app-status-indicator",19),z(2,"utcDate"),t(3,` 205 `),r(),t(4,` 206 `)),n&2){let i=d().$implicit;l(),_("dots",!1)("text","Registered "+j(2,2,i.registeredOn,"M/d/yy"))}}function Qi(n,c){n&1&&(t(0,` 207 `),v(1,"app-status-indicator",20),t(2,` 208 `)),n&2&&(l(),_("dots",!0))}function qi(n,c){n&1&&(t(0,` 209 `),v(1,"app-status-indicator",21),t(2,` 210 `)),n&2&&(l(),_("dots",!1))}function Ki(n,c){if(n&1&&(t(0,` 211 `),o(1,"td"),t(2,` 212 `),v(3,"app-club-link",22),t(4,` 213 `),r(),t(5,` 214 `)),n&2){let i=d().$implicit,e=d();l(3),_("currentClubID",e.clubID)("clubName",i.clubName)("subdomain",i.subdomain)("clubID",i.clubID)}}function Ji(n,c){n&1&&(t(0,` 215 `),o(1,"app-pill",24),t(2,` 216 `),r(),t(3,` 217 `)),n&2&&(l(),_("nowrap",!0))}function Xi(n,c){n&1&&(t(0,` 218 `),v(1,"app-pill",25),t(2,` 219 `)),n&2&&(l(),_("nowrap",!0))}function Zi(n,c){if(n&1&&(t(0,` 220 `),o(1,"td",23),t(2,` 221 `),p(3,Ji,4,1),p(4,Xi,3,1),r(),t(5,` 222 `)),n&2){let i=d().$implicit;l(3),m(i.hasConflicts?3:-1),l(),m(i.hasConflicts?-1:4)}}function tn(n,c){if(n&1&&(t(0,` 223 `),o(1,"button",26),t(2,` 224 `),v(3,"i",27),t(4,` 225 `),o(5,"span",28),t(6,` 226 Expand 227 `),r(),t(7,` 228 `),r(),t(8,` 229 `)),n&2){let i=d(2),e=i.$implicit,a=i.expanded;l(),_("pRowToggler",e),l(2),_("ngClass",a?"fa-rotate-180":"")}}function en(n,c){if(n&1&&(t(0,` 230 `),o(1,"td"),t(2,` 231 `),p(3,tn,9,2),r(),t(4,` 232 `)),n&2){let i=d().$implicit;l(3),m(i.conflicts!=null&&i.conflicts.length?3:-1)}}function nn(n,c){if(n&1&&(t(0,` 233 `),o(1,"tr"),t(2,` 234 `),o(3,"td"),t(4,` 235 `),p(5,Ui,3,1),r(),t(6,` 236 `),o(7,"td"),t(8,` 237 `),o(9,"app-player-search-link",17),t(10,` 238 `),r(),t(11,` 239 `),r(),t(12,` 240 `),o(13,"td"),t(14),r(),t(15,` 241 `),o(16,"td"),t(17),z(18,"date"),r(),t(19,` 242 `),o(20,"td"),t(21),r(),t(22,` 243 `),o(23,"td"),t(24),r(),t(25,` 244 `),o(26,"td"),t(27),r(),t(28,` 245 `),p(29,Bi,4,1),p(30,$i,4,1),p(31,Yi,4,1),p(32,Hi,4,1),o(33,"td"),t(34,` 246 `),p(35,Gi,2,4),r(),t(36,` 247 `),o(37,"td"),t(38,` 248 `),p(39,zi,2,4),r(),t(40,` 249 `),o(41,"td"),t(42,` 250 `),p(43,ji,5,5)(44,Qi,3,1)(45,qi,3,1),t(46,` 251 `),r(),t(47,` 252 `),p(48,Ki,6,4),p(49,Zi,6,2),p(50,en,5,1),r(),t(51,` 253 `)),n&2){let i,e=c.$implicit,a=d();l(5),m(a.isRowSelectable(e)?5:-1),l(4),_("hasPlayerAdminPermission",a.user[a.Permission.PlayerAdmin])("currentClubID",a.clubID)("playerID",e.playerID)("playerClubID",e.clubID)("playerName",e.playerName)("playerClubName",e.clubName)("playerSubdomain",e.subdomain),l(5),E(e.genderID===1?"Male":e.genderID===2?"Female":"Other"),l(3),E(j(18,23,e.dob,"MM/dd
253/y")),l(4),E(e.programName),l(3),E(e.registrationName),l(3),E(e.teamName),l(2),m(a.optionEnabled(a.FieldOption.AGE_CLASS)?29:-1),l(),m(a.optionEnabled(a.FieldOption.PRIMARY_POSITION)?30:-1),l(),m(a.optionEnabled(a.FieldOption.GRADE)?31:-1),l(),m(a.optionEnabled(a.FieldOption.SCHOOL)?32:-1),l(3),m(e.specialRegistration!=null&&e.specialRegistration.startDate?35:-1),l(4),m(e.specialRegistration!=null&&e.specialRegistration.endDate?39:-1),l(4),m((i=e.status)===a.ApprovedStatus.REGISTERED?43:i===a.ApprovedStatus.OPEN?44:i===a.ApprovedStatus.EXPIRED?45:-1),l(5),m(a.waitlistService.searchOptions.showClubs?48:-1),l(),m(a.showConflicts?49:-1),l(),m(a.showConflicts?50:-1)}}function an(n,c){if(n&1&&(t(0,` 254 `),v(1,"app-registration-waitlist-details",30),t(2,` 255 `)),n&2){let i=d().$implicit,e=d();l(),_("item",i)("user",e.user)("currentClubID",e.clubID)("hasPlayerProgramPermission",e.user[e.Permission.PlayerPrograms]&&e.user[e.Permission.CancelRegistrations])}}function on(n,c){if(n&1&&(t(0,` 256 `),o(1,"tr"),t(2,` 257 `),o(3,"td",29),t(4,` 258 `),p(5,an,3,4),r(),t(6,` 259 `),r(),t(7,` 260 `)),n&2){let i=c.$implicit;l(3),H("colspan","15"),l(2),m(i.conflicts!=null&&i.conflicts.length?5:-1)}}function rn(n,c){if(n&1&&(t(0,` 261 `),o(1,"tr"),t(2,` 262 `),o(3,"td",31),t(4,` 263 The search criteria produced no results. 264 `),r(),t(5,` 265 `),r(),t(6,` 266 `)),n&2){let i=c.$implicit,e=d();l(3),H("colspan",i.length+(e.user[e.Permission.SpecialRegistration]?1:0))}}function ln(n,c){if(n&1){let i=f();t(0,` 267 `),o(1,"button",32),g("click",function(){u(i);let a=d();return x(a.emailPlayers())}),t(2,` 268 Notify Player(s) 269 `),r(),t(3,` 270 `)}if(n&2){let i=d();l(),_("disabled",!(i.selection!=null&&i.selection.length))}}function sn(n,c){if(n&1){let i=f();t(0,` 271 `),o(1,"button",7),g("click",function(){u(i);let a=d();return x(a.openSpecialRegistrationEdit())}),t(2,` 272 Extend 273 `),r(),t(3,` 274 `)}if(n&2){let i=d();l(),F("btn-primary",!i.user[i.Permission.EmailCommunications]),_("disabled",!(i.selection!=null&&i.selection.length))}}function cn(n,c){if(n&1){let i=f();t(0,` 275 `),o(1,"button",7),g("click",function(){u(i);let a=d();return x(a.showRevokeDialog=!0)}),t(2,` 276 Revoke 277 `),r(),t(3,` 278 `)}if(n&2){let i=d();l(),_("disabled",!(i.selection!=null&&i.selection.length))}}function dn(n,c){if(n&1){let i=f();t(0,` 279 `),o(1,"app-yes-no-modal",33),g("onYesSelect",function(){u(i);let a=d();return x(a.revoke())})("onNoSelect",function(){u(i);let a=d();return x(a.showRevokeDialog=!1)}),r(),t(2,` 280 `)}}function pn(n,c){n&1&&(t(0,` 281 `),o(1,"div"),t(2,` 282 `),o(3,"h1",34),t(4,"Extend Special Registration"),r(),t(5,` 283 `),r(),t(6,` 284 `))}function mn(n,c){if(n&1){let i=f();t(0,` 285 `),o(1,"button",35),g("click",function(){u(i);let a=d();return x(a.showEndDateDialog=!0)}),t(2,` 286 Edit All 287 `),r(),t(3,` 288 `)}}function _n(n,c){if(n&1&&(t(0,` 289 `),o(1,"app-dynamic-form",36,1),t(3,` 290 `),o(4,"div",37),t(5,` 291 `),o(6,"div",38),t(7),r(),t(8,` 292 `),o(9,"div",12),t(10),r(),t(11,` 293 `),o(12,"div",12),t(13),r(),t(14,` 294 `),o(15,"div",13),t(16,` 295 `),o(17,"app-dynamic-form-field",39),t(18,` 296 `),r(),t(19,` 297 `),r(),t(20,` 298 `),r(),t(21,` 299 `),r(),t(22,` 300 `)),n&2){let i=d(),e=i.$implicit,a=i.$index,s=i.$count,C=d(2);l(),_("formID","player-form-"+e.selection.registrationWaitlistID)("fields",C.editSpecialRegistrationFields)("entity",e.entity)("contentFieldsMode",!0)("horizontalForm",!0)("showCancelButton",!0)("showSubmitButton",!1)("showCancelButton",!1)("horizontalForm",!1)("formData",st(19,Oi,e.selection.registrationWaitlistID)),l(3),F("border-bottom",a!==s-1)("mt-3",a!==0),l(3),b(` 301 `,e.selection.playerName,` 302 `),l(3),b(` 303 `,e.selection.programName,` 304 `),l(3),b(` 305 `,e.selection.registrationName,` 306 `),l(4),_("formID","player-form-"+e.selection.registrationWaitlistID)("hideLabel",!0)}}function un(n,c){if(n&1&&(t(0,` 307 `),p(1,_n,23,21)),n&2){let i=c.$implicit;l(),m(i?1:-1)}}function xn(n,c){if(n&1&&(t(0,` 308 `),o(1,"div"),t(2,` 309 `),N(3,un,2,1,null,null,k),r(),t(5,` 310 `)),n&2){let i=d();l(3),M(i.editSpecialRegistrationFormData)}}function gn(n,c){n&1&&(t(0,` 311 `),v(1,"app-button-loader"),t(2,` 312 Saving... 313 `))}function Cn(n,c){n&1&&t(0,` 314 Save 315 `)}function fn(n,c){if(n&1){let i=f();t(0,` 316 `),o(1,"app-dialog-footer"),t(2,` 317 `),W(3,40),t(4,` 318 `),o(5,"button",41),g("click",function(){u(i);let a=d(2);return x(a.showEditSpecialRegistrationDialog=!1)}),t(6,"Cancel"),r(),t(7,` 319 `),P(),t(8,` 320 `),W(9,42),t(10,` 321 `),o(11,"button",43),g("click",function(){u(i);let a=d(2);return x(a.saveSpecialRegistrations())}),t(12,` 322 `),p(13,gn,3,0),p(14,Cn,1,0),r(),t(15,` 323 `),P(),t(16,` 324 `),r(),t(17,` 325 `)}if(n&2){let i=d(2);l(5),F("btn-disabled",i.saving),_("disabled",i.saving),l(6),F("btn-disabled",i.saving),_("disabled",i.saving),l(2),m(i.saving?13:-1),l(),m(i.saving?-1:14)}}function hn(n,c){if(n&1&&(t(0,` 326 `),p(1,fn,18,8)),n&2){let i=d();l(),m(i.showEditSpecialRegistrationDialog?1:-1)}}function vn(n,c){if(n&1){let i=f();t(0,` 327 `),o(1,"app-edit-end-date-all-dialog",44),g("cancel",function(){u(i);let a=d();return x(a.showEndDateDialog=!1)})("save",function(a){u(i);let s=d();return x(s.endDateSave(a))}),t(2,` 328 `),r(),t(3,` 329 `)}if(n&2){let i=d();l(),_("endDateFields",i.editSpecialRegistrationFields)}}function Sn(n,c){if(n&1){let i=f();t(0,` 330 `),o(1,"app-yes-no-modal",45),g("onYesSelect",function(){u(i);let a=d();return x(a.removeFromWaitlist())})("onNoSelect",function(){u(i);let a=d();return x(a.showRemoveDialog=!1)}),r(),t(2,` 331 `)}}
331var He=(()=>{let c=class c{constructor(e,a,s,C,h){this.waitlistService=e,this.siteDataService=a,this.registrationPlayerOverrideService=s,this.formService=C,this.clubService=h,this.revokeUser=new Z,this.columns=[],this.totalRecords=0,this.loading=!1,this.AriaLabels=ft,this.Permission=q,this.ApprovedStatus=Ht,this.FieldOption=I,this.selection=[],this.showRemoveDialog=!1,this.showRevokeDialog=!1,this.showEditSpecialRegistrationDialog=!1,this.editSpecialRegistrationFullScreen=!1,this.editSpecialRegistrationFormData=[],this.editSpecialRegistrationSelectionCountLimit=5,this.specialRegistrationForms=new mt,this.showEndDateDialog=!1,this.saving=!1,this.showConflicts=!1,this.expandedRows={},this.unsubscribe$=new Y,this.sportID=0,this.isRowPSelectable=this.isRowPSelectable.bind(this)}formatAgeGroup(e){return ht(e,this.sportID)}ngOnInit(){this.clubService.getSport().subscribe({next:e=>this.sportID=e.sportID}),this.columns=[{field:"playerName",header:"Player"},{field:"gender",header:"Gender"},{field:"birthDate",header:"Birth Date"},{field:"programName",header:"Program"},{field:"registrationName",header:"Registration"},{field:"teamName",header:"Team"}],this.optionEnabled(I.AGE_CLASS)&&this.columns.push({field:"ageClass",header:this.fieldName(I.AGE_CLASS)}),this.optionEnabled(I.PRIMARY_POSITION)&&this.columns.push({field:"positionName",header:this.fieldName(I.PRIMARY_POSITION)}),this.optionEnabled(I.GRADE)&&this.columns.push({field:"grade",header:this.fieldName(I.GRADE)}),this.optionEnabled(I.SCHOOL)&&this.columns.push({field:"school",header:this.fieldName(I.SCHOOL)}),this.waitlistService.searchOptions.showClubs&&this.columns.push({field:"clubName",header:"Club"}),this.columns.push({field:"specialRegistrationStartDate",header:"Start"},{field:"specialRegistrationEndDate",header:"End"},{header:"Status"}),this.waitlistService.search$.pipe(T(this.unsubscribe$)).subscribe(()=>{this.run()}),this.waitlistService.export$.pipe(T(this.unsubscribe$)).subscribe({next:e=>{e.exporting&&e.waitlistTabID===O.APPROVED&&this.run(!0)}}),this.openingPlayerReg.subscribe(()=>{this.run()})}search(e=null,a=!1){this.lastEvent=e;let s=this.waitlistService.filters;e&&e.sortField&&(s.orderBy=e.sortField+" "+(e.sortOrder===1?"ASC":"DESC"),s.page=e.first/s.rows+1),s.getTotalCount=this.totalRecords===0,a?this.waitlistService.getApprovedWaitlistCSV().pipe(T(this.unsubscribe$)).subscribe({next:C=>{Ct(C),this.waitlistService.exportCSV({waitlistTabID:O.APPROVED,exporting:!1})},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}}):(this.loading=!0,this.waitlistService.searchApprovedWaitlist().subscribe({next:C=>{this.searchResults=C.results,s.getTotalCount&&(this.totalRecords=C.count),this.searchResults.some(h=>h.hasConflicts)?this.showConflicts=!0:this.showConflicts=!1,this.loading=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}}))}run(e=!1){this.totalRecords=0,this.search(this.lastEvent,e)}isRowPSelectable(e){return this.isRowSelectable(e.data)}isRowSelectable(e){return e.clubID===this.clubID&&e.status!==Ht.REGISTERED}removeFromWaitlist(){this.saving=!0,this.waitlistService.removeFromWaitlist(this.selection.map(e=>e.registrationWaitlistID),!0).pipe(T(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Selected player(s) removed from waitlist"),this.saving=!1,this.showRemoveDialog=!1,this.selection=[],this.run()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem removing player(s) from the waitlist"),this.saving=!1}})}revoke(){this.saving=!0,this.registrationPlayerOverrideService.deleteRegistrationPlayerOverrides(this.selection.map(e=>e.specialRegistration.registrationPlayerOverrideID)).pipe(T(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Selected player(s) special registration(s) revoked"),this.saving=!1,this.showRevokeDialog=!1,this.revokeUser.emit(),this.selection=[],this.run()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem revoking the selected player(s) special registration(s)"),this.saving=!1}})}emailPlayers(){let e=this.selection.map(a=>({firstName:a.playerName,lastName:"",playerID:a.playerID,player:void 0,clubUser:void 0,recipientType:void 0,selectAll:void 0,expandedRecipientType:void 0,isCC:!1}));this.waitlistService.showEmail({show:!0,players:e})}openSpecialRegistrationEdit(){this.editSpecialRegistrationFormData=[],this.selection.forEach(e
331=>{let a={selection:e,entity:new Pe(e.specialRegistration.endDate,e.specialRegistration.registrationPlayerOverrideID)};this.editSpecialRegistrationFormData.push(a)}),this.editSpecialRegistrationFullScreen=this.selection?.length>this.editSpecialRegistrationSelectionCountLimit,this.editSpecialRegistrationFields?this.showEditSpecialRegistrationDialog=!0:this.registrationPlayerOverrideService.getRegistrationPlayerOverrideWaitlistMetadata().pipe(T(this.unsubscribe$)).subscribe({next:e=>{this.editSpecialRegistrationFields=e.fields.filter(a=>a.controlName==="endDate"),this.showEditSpecialRegistrationDialog=!0}})}endDateSave(e){this.editSpecialRegistrationFormData.forEach(a=>{a.entity=X($({},a.entity),{endDate:e.endDate})}),this.formService.hideFormLoader(),this.showEndDateDialog=!1}saveSpecialRegistrations(){this.specialRegistrationForms.some(e=>!e.isValid)?this.specialRegistrationForms.filter(e=>!e.isValid).forEach(e=>e.submitForm()):(this.saving=!0,this.editSpecialRegistrationFormData.forEach(e=>{let a=this.specialRegistrationForms.find(s=>s.formData.registrationWaitlistID===e.selection.registrationWaitlistID).value;e.entity=X($({},e.entity),{endDate:a.endDate})}),this.registrationPlayerOverrideService.updateWaitlistRegistrationPlayerOverrides(this.editSpecialRegistrationFormData.map(e=>e.entity)).pipe(T(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Selected player(s) special registrations saved"),this.saving=!1,this.selection.forEach(e=>{e.specialRegistration.endDate=this.editSpecialRegistrationFormData.find(a=>a.entity.registrationPlayerOverrideID===e.specialRegistration.registrationPlayerOverrideID).entity.endDate}),this.selection=[],this.run(),this.showEditSpecialRegistrationDialog=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem saving data"),this.saving=!1}}))}optionEnabled(e){return this.clubFieldOptions?.find(a=>a.fieldOptionID===e)!==void 0}fieldName(e){return this.clubFieldOptions.find(a=>a.fieldOptionID===e).fieldName}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};c.\u0275fac=function(a){return new(a||c)(w(B),w(nt),w(lt),w(wt),w(St))},c.\u0275cmp=V({type:c,selectors:[["app-approved"]],viewQuery:function(a,s){if(a&1&&G(Vi,5),a&2){let C;L(C=U())&&(s.specialRegistrationForms=C)}},inputs:{user:"user",clubID:"clubID",openingPlayerReg:"openingPlayerReg",clubFieldOptions:"clubFieldOptions"},outputs:{revokeUser:"revokeUser"},standalone:!1,decls:58,vars:31,consts:[["expandedrow",""],["specialRegistrationForm",""],["sortField","dateAddedToWaitlist",1,"table","table-striped","table-sm",3,"selectionChange","onLazyLoad","columns","value","lazy","selection","paginator","alwaysShowPaginator","totalRecords","rows","sortOrder","loading","rowSelectable","dataKey","expandedRowKeys"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["appStickyFormButtons",""],[1,"btn",3,"click","disabled"],["header","Extend Special Registration","appendTo","body",3,"visibleChange","onHide","close","visible","showHeader","closable","modal","draggable","styleClass"],[1,"row","mb-3","edit-registration-section"],[1,"col-md-12"],[1,"row","fw-800","my-3","no-gutters"],[1,"col-md-3"],[1,"col-md-3","d-flex","justify-content-end"],["pTemplate","footer"],[3,"pSortableColumn"],[3,"field"],[3,"hasPlayerAdminPermission","currentClubID","playerID","playerClubID","playerName","playerClubName","playerSubdomain"],[3,"value"],["status","success",3,"dots","text"],["status","warning","text","Open",3,"dots"],["status","error","text","Expired",3,"dots"],[3,"currentClubID","clubName","subdomain","clubID"],[1,"text-center"],["status","error","text","Conflicts","pTooltip","This player is registered in a program that conflicts with this registration.","tooltipPosition","left",3,"nowrap"],["status","success","text","No Conflicts",3,"nowrap"],["type","button",1,"btn","btn-tertiary","btn-sm",3,"pRowToggler"],[1,"fa-solid","fa-chevron-down",3,"ngClass"],[1,"sr-only"],[1,"p-0","pb-3"],[3,"item","user","currentClubID","hasPlayerProgramPermission"],[2,"text-align","left"],[1,"btn","btn-primary",3,"click","disabled"],["headerText","Revoke Special Registration","modalText","Are you sure you want to revoke the selected player(s) special registration(s)?","yesButtonText","Yes, Remove","yesButtonLoadingText","Removing...","noButtonText","Cancel",3,"onYesSelect","onNoSelect"],[1,"text-large"],["type","button",1,"btn","btn-sm","btn-naked","btn-icon-edit-after",3,"click"],[3,"formID","fields","entity","contentFieldsMode","horizontalForm","showCancelButton","showSubmitButton","formData"],[1,"row","waitlist-row","d-flex","align-items-center","no-gutters","pb-3"],[1,"col-md-3","fw-600"],["fieldName","endDate","styleClass","mb-0",3,"formID","hideLabel"],["slot","secondary"],["type","button",1,"btn","btn-naked",3,"click","disabled"],["slot","primary"],["type","button",1,"btn","btn-primary",3,"click","disabled"],[3,"cancel","save","endDateFields"],["headerText","Revoke Special Registration","modalText","Are you sure you want to remove the selected player(s) from the waitlist?","yesButtonText","Yes, Remove","yesButtonLoadingText","Removing...","noButtonText","Cancel",3,"onYesSelect","onNoSelect"]],template:function(a,s){if(a&1){let C=f();o(0,"p-table",2),R("selectionChange",function(S){return u(C),D(s.selection,S)||(s.selection=S),x(S)}),g("onLazyLoad",function(S){return s.search(S)}),t(1,` 332 `),A(2,Li,13,2,"ng-template",3),t(3,` 333 `),A(4,nn,52,26,"ng-template",4),t(5,` 334 `),A(6,on,8,2,"ng-template",null,0,ut),t(8,` 335 `),A(9,rn,7,1,"ng-template",5),t(10,` 336`),r(),t(11,` 337`),v(12,"br"),t(13,` 338 `),o(14,"div",6),t(15,` 339 `),p(16,ln,4,1),p(17,sn,4,3),p(18,cn,4,1),o(19,"button",7),g("click",function(){return s.showRemoveDialog=!0}),t(20,` 340 Revoke & Remove from Waitlist 341 `),r(),t(21,` 342 `),r(),t(22,` 343 344 `),p(23,dn,3,0),o(24,"p-dialog",8),R("visibleChange",function(S){return u(C),D(s.showEditSpecialRegistrationDialog,S)||(s.showEditSpecialRegistrationDialog=S),x(S)}),g("onHide",function(){return s.showEditSpecialRegistrationDialog=!1})("close",function(){return s.showEditSpecialRegistrationDialog=!1}),t(25,` 345 `),p(26,pn,7,0),o(27,"div",9),t(28,` 346 `),o(29,"div",10),t(30,` 347 `),o(31,"div",11),t(32,` 348 `),o(33,"div",12),t(34,` 349 Player 350 `),r(),t(35,` 351 `),o(36,"div",12),t(37,` 352 Program 353 `),r(),t(38,` 354 `),o(39,"div",12),t(40,` 355 Registration 356 `),r(),t(41,` 357 `),o(42,"div",13),t(43,` 358 `),o(44,"span"),t(45,"End Date"),r(),t(46,` 359 `),p(47,mn,4,0),r(),t(48,` 360 `),r(),t(49,` 361 `),p(50,xn,6,0),r(),t(51,` 362 `),r(),t(52,` 363 `),A(53,hn,2,1,"ng-template",14),t(54,` 364 `),r(),t(55,` 365 366 `),p(56,vn,4,1),p(57,Sn,3,0)}a&2&&(_("columns",s.columns)("value",s.searchResults)("lazy",!0),y("selection",s.selection),_("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",s.totalRecords)("rows",25)("sortOrder",1)("loading",s.loading)("rowSelectable",s.isRowPSelectable)("dataKey","registrationWaitlistID")("expandedRowKeys",s.expandedRows),l(16),m(s.user[s.Permission.EmailCommunications]?16:-1),l(),m(s.user[s.Permission.SpecialRegistration]?17:-1),l(),m(s.user[s.Permission.SpecialRegistration]?18:-1),l(),F("btn-primary",!s.user[s.Permission.SpecialRegistration]&&!s.user[s.Permission.EmailCommunications]),_("disabled",!(s.selection!=null&&s.selection.length)),l(4),m(s.showRevokeDialog?23:-1),l(),y("visible",s.showEditSpecialRegistrationDialog),_("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1)("styleClass",s.editSpecialRegistrationFullScreen?"fullPageDialog":"largeWidthDialog"),l(2),m(s.editSpecialRegistrationFullScreen?26:-1),l(21),m(s.editSpecialRegistrationFullScreen?47:-1),l(3),m(s.showEditSpecialRegistrationDialog&&s.editSpecialRegistrationFields?50:-1),l(6),m(s.showEndDateDialog?56:-1),l(),m(s.showRemoveDialog?57:-1))},dependencies:[xt,rt,ot,fe,Q,bt,Ft,At,J,Pt,yt,Dt,Et,Rt,Tt,It,K,at,Nt,Mt,Lt,Ut,gt,Wt],styles:[".edit-registration-section[_ngcontent-%COMP%]{background:var(--grey-75)}"]});let n=c;return n})();var wn=["startDateForm"],yn=["endDateForm"],Dn=["notesForm"],Rn=["specialRegistrationForm"],En=n=>({"d-flex justify-content-end":n}),Tn=n=>({registrationWaitlistID:n});function In(n,c){if(n&1&&(t(0,` 367 `),v(1,"p-sortIcon",21),t(2,` 368 `)),n&2){let i=d().$implicit;l(),_("field",i.field)}}function Wn(n,c){if(n&1&&(t(0,` 369 `),o(1,"th",20),t(2),p(3,In,3,1),r(),t(4,` 370 `)),n&2){let i=c.$implicit,e=d(2);l(),_("pSortableColumn",i.field),H("aria-label",e.AriaLabels.ACTIVATE_SORT),l(),b(` 371 `,i.header,`
372 `),l(),m(i.field?3:-1)}}function Pn(n,c){n&1&&(t(0,` 373 `),v(1,"th"),t(2,` 374 `))}function Fn(n,c){n&1&&(t(0,` 375 `),v(1,"th"),t(2,` 376 `))}function An(n,c){if(n&1&&(t(0,` 377 `),o(1,"tr"),t(2,` 378 `),o(3,"th"),t(4,` 379 `),v(5,"p-tableHeaderCheckbox"),t(6,` 380 `),r(),t(7,` 381 `),N(8,Wn,5,4,null,null,k),p(10,Pn,3,0),p(11,Fn,3,0),r(),t(12,` 382 `)),n&2){let i=d();l(8),M(i.columns),l(2),m(i.showConflicts?10:-1),l(),m(i.showConflicts||i.showAdvancedCapacity?11:-1)}}function Vn(n,c){if(n&1&&(t(0,` 383 `),v(1,"p-tableCheckbox",23),t(2,` 384 `)),n&2){let i=d().$implicit;l(),_("value",i)}}function On(n,c){if(n&1&&(t(0,` 385 `),o(1,"td"),t(2),r(),t(3,` 386 `)),n&2){let i=d().$implicit,e=d();l(2),E(i.ageClass?e.formatAgeGroup(i.ageClass):"")}}function kn(n,c){if(n&1&&(t(0,` 387 `),o(1,"td"),t(2),r(),t(3,` 388 `)),n&2){let i=d().$implicit;l(2),E(i.positionName)}}function Nn(n,c){if(n&1&&(t(0,` 389 `),o(1,"td"),t(2),r(),t(3,` 390 `)),n&2){let i=d().$implicit;l(2),E(i.grade)}}function Mn(n,c){if(n&1&&(t(0,` 391 `),o(1,"td"),t(2),r(),t(3,` 392 `)),n&2){let i=d().$implicit;l(2),E(i.school)}}function Ln(n,c){if(n&1&&(t(0,` 393 `),o(1,"td"),t(2,` 394 `),v(3,"app-club-link",24),t(4,` 395 `),r(),t(5,` 396 `)),n&2){let i=d().$implicit,e=d();l(3),_("currentClubID",e.clubID)("clubName",i.clubName)("subdomain",i.subdomain)("clubID",i.clubID)}}function Un(n,c){if(n&1&&t(0),n&2){let i=d().$implicit;b(` 397 `,i.registrationCapacity,` 398 `)}}function Bn(n,c){n&1&&(t(0,` 399 `),o(1,"app-pill",26),t(2,` 400 `),r(),t(3,` 401 `)),n&2&&(l(),_("nowrap",!0))}function $n(n,c){n&1&&(t(0,` 402 `),v(1,"app-pill",27),t(2,` 403 `)),n&2&&(l(),_("nowrap",!0))}function Yn(n,c){if(n&1&&(t(0,` 404 `),o(1,"td",25),t(2,` 405 `),p(3,Bn,4,1),p(4,$n,3,1),r(),t(5,` 406 `)),n&2){let i=d().$implicit;l(3),m(i.hasConflicts?3:-1),l(),m(i.hasConflicts?-1:4)}}function Hn(n,c){if(n&1&&(t(0,` 407 `),o(1,"button",28),t(2,` 408 `),v(3,"i",29),t(4,` 409 `),o(5,"span",30),t(6,` 410 Expand 411 `),r(),t(7,` 412 `),r(),t(8,` 413 `)),n&2){let i=d(2),e=i.$implicit,a=i.expanded;l(),_("pRowToggler",e),l(2),_("ngClass",a?"fa-rotate-180":"")}}function Gn(n,c){if(n&1&&(t(0,` 414 `),o(1,"td"),t(2,` 415 `),p(3,Hn,9,2),r(),t(4,` 416 `)),n&2){let i=d().$implicit;l(3),m(i.conflicts!=null&&i.conflicts.length||i.registrationAdvancedCapacityOptionID?3:-1)}}function zn(n,c){if(n&1&&(t(0,` 417 `),o(1,"tr"),t(2,` 418 `),o(3,"td"),t(4,` 419 `),p(5,Vn,3,1),r(),t(6,` 420 `),o(7,"td"),t(8,` 421 `),o(9,"app-player-search-link",22),t(10,` 422 `),r(),t(11,` 423 `),r(),t(12,` 424 `),o(13,"td"),t(14),r(),t(15,` 425 `),o(16,"td"),t(17),z(18,"date"),r(),t(19,` 426 `),o(20,"td"),t(21),r(),t(22,` 427 `),o(23,"td"),t(24),r(),t(25,` 428 `),o(26,"td"),t(27),r(),t(28,` 429 `),p(29,On,4,1),p(30,kn,4,1),p(31,Nn,4,1),p(32,Mn,4,1),p(33,Ln,6,4),o(34,"td"),t(35),z(36,"utcDate"),r(),t(37,` 430 `),o(38,"td"),t(39,` 431 `),p(40,Un,1,1),r(),t(41,` 432 `),o(42,"td"),t(43),r(),t(44,` 433 `),o(45,"td"),t(46),r(),t(47,` 434 `),p(48,Yn,6,2),p(49,Gn,5,1),r(),t(50,` 435 `)),n&2){let i=c.$implicit,e=d();l(5),m(e.isRowSelectable(i)?5:-1),l(4),_("hasPlayerAdminPermission",e.user[e.Permission.PlayerAdmin])("currentClubID",e.clubID)("playerID",i.playerID)("playerClubID",i.clubID)("playerName",i.playerName)("playerClubName",i.clubName)("playerSubdomain",i.subdomain),l(5),E(i.genderID===1?"Male":i.genderID===2?"Female":"Other"),l(3),E(j(18,24,i.dob,"MM/dd/y")),l(4),E(i.programName),l(3),E(i.registrationName),l(3),E(i.teamName),l(2),m(e.optionEnabled(e.FieldOption.AGE_CLASS)?29:-1),l(),m(e.optionEnabled(e.FieldOption.PRIMARY_POSITION)?30:-1),l(),m(e.optionEnabled(e.FieldOption.GRADE)?31:-1),l(),m(e.optionEnabled(e.FieldOption.SCHOOL)?32:-1),l(),m(e.waitlistService.searchOptions.showClubs?33:-1),l(2),E(j(36,27,i.dateAddedToWaitlist,"M/d/yy h:mm a")),l(5),m(i.registrationCapacity?40:-1),l(3),b(` 436 `,i.registrationCount||0,` 437 `),l(3),E(i.registrationCancellationCount||0),l(2),m(e.showConflicts?48:-1),l(),m(e.showConflicts||e.showAdvancedCapacity?49:-1)}}function jn(n,c){if(n&1&&(t(0,` 438 `),v(1,"app-registration-waitlist-details",32),t(2,` 439 `)),n&2){let i=d(2).$implicit,e=d();l(),_("item",i)("details",e.details[i.registrationWaitlistID])("user",e.user)("currentClubID",e.clubID)("hasPlayerProgramPermission",e.user[e.Permission.PlayerPrograms]&&e.user[e.Permission.CancelRegistrations])}}function Qn(n,c){if(n&1&&(t(0,` 440 `),p(1,jn,3,5)),n&2){let i=d().$implicit,e=d();l(),m(e.details[i.registrationWaitlistID]||i.conflicts!=null&&i.conflicts.length?1:-1)}}function qn(n,c){n&1&&(t(0,` 441 `),v(1,"app-skeleton-template",33),t(2,` 442 `))}function Kn(n,c){if(n&1&&(t(0,` 443 `),o(1,"tr"),t(2,` 444 `),o(3,"td",31),t(4,` 445 `),p(5,Qn,2,1),p(6,qn,3,0),r(),t(7,` 446 `),r(),t(8,` 447 `)),n&2){let i=c.$implicit,e=d();l(3),H("colspan","15"),l(2),m(!e.loadingDetails[i.registrationWaitlistID]&&(e.details[i.registrationWaitlistID]||i.conflicts!=null&&i.conflicts.length)?5:-1),l(),m(!e.details[i.registrationID]&&e.loadingDetails[i.registrationWaitlistID]?6:-1)}}function Jn(n,c){if(n&1&&(t(0,` 448 `),o(1,"tr"),t(2,` 449 `),o(3,"td",34),t(4,` 450 The search criteria produced no results. 451 `),r(),t(5,` 452 `),r(),t(6,` 453 `)),n&2){let i=c.$implicit;l(3),H("colspan",i.length+1)}}function Xn(n,c){if(n&1){let i=f();t(0,` 454 `),o(1,"button",35),g("click",function(){u(i);let a=d();return x(a.openRegistration())}),t(2,` 455 Open Registration 456 `),r(),t(3,` 457 `)}if(n&2){let i=d();l(),_("disabled",!(i.selection!=null&&i.selection.length))}}function Zn(n,c){if(n&1){let i=f();t(0,` 458 `),o(1,"button",9),g("click",function(){u(i);let a=d();return x(a.emailPlayers())}),t(2,` 459 Notify Player(s) 460 `),r(),t(3,` 461 `)}if(n&2){let i=d();l(),F("btn-primary",!i.user[i.Permission.SpecialRegistration]),_("disabled",!(i.selection!=null&&i.selection.length))}}function ta(n,c){n&1&&(t(0,` 462 `),o(1,"div"),t(2,` 463 `),o(3,"h1",36),t(4,"Open Special Registration"),r(),t(5,` 464 `),r(),t(6,` 465 `))}function ea(n,c){if(n&1){let i=f();t(0,` 466 `),o(1,"button",37),g("click",function(){u(i);let a=d();return x(a.showStartDateDialog=!0)}),t(2,` 467 Edit All 468 `),r(),t(3,` 469 `)}}function ia(n,c){if(n&1){let i=f();t(0,` 470 `),o(1,"button",37),g("click",function(){u(i);let a=d();return x(a.showEndDateDialog=!0)}),t(2,` 471 Edit All 472 `),r(),t(3,` 473 `)}}function na(n,c){if(n&1){let i=f();t(0,` 474 `),o(1,"button",37),g("click",function(){u(i);let a=d();return x(a.showNotesDialog=!0)}),t(2,` 475 Edit All 476 `),r(),t(3,` 477 `)}}function aa(n,c){if(n&1&&(t(0,` 478 `),o(1,"app-dynamic-form",38,1),t(3,` 479 `),o(4,"div",39),t(5,` 480 `),o(6,"div",40),t(7),r(),t(8,` 481 `),o(9,"div",15),t(10),r(),t(11,` 482 `),o(12,"div",15),t(13),r(),t(14,` 483 `),o(15,"div",41),t(16,` 484 `),o(17,"app-dynamic-form-field",42),t(18,` 485 `),r(),t(19,` 486 `),r(),t(20,` 487 `),o(21,"div",15),t(22,` 488 `),o(23,"app-dynamic-form-field",43),t(24,` 489 `),r(),t(25,` 490 `),r(),t(26,` 491 `),o(27,"div",15),t(28,` 492 `),o(29,"app-dynamic-form-field",44),t(30,` 493 `),r(),t(31,` 494 `),r(),t(32,` 495 `),r(),t(33,` 496 `),r(),t(34,` 497 `)),n&2){let i=d(),e=i.$implicit,a=i.$index,s=i.$count,C=d(2);l(),_("formID","player-form-"+e.selection.registrationWaitlistID)("fields",C.openRegistrationFields)("entity",e.entity)("contentFieldsMode",!0)("horizontalForm",!0)("showCancelButton",!0)("showSubmitButton",!1)("showCancelButton",!1)("horizontalForm",!1)("formData",st(23,Tn,e.selection.registrationWaitlistID)),l(3),F("border-bottom",a!==s-1)("mt-3",a!==0),l(3),b(` 498 `,e.selection.playerName,` 499 `),l(3),b(` 500 `,e.selection.programName,` 501 `),l(3),b(` 502 `,e.selection.registrationName,` 503 `),l(4),_("formID","player-form-"+e.selection.registrationWaitlistID)("hideLabel",!0),l(6),_("formID","player-form-"+e.selection.registrationWaitlistID)("hideLabel",!0),l(6),_("formID","player-form-"+e.selection.registrationWaitlistID)("hideLabel",!0)}}function oa(n,c){if(n&1&&(t(0,` 504 `),p(1,aa,35,25)),n&2){let i=c.$implicit;l(),m(i?1:-1)}}function ra(n,c){if(n&1&&(t(0,` 505 `),o(1,"div"),t(2,` 506 `),N(3,oa,2,1,null,null,k),r(),t(5,` 507 `)),n&2){let i=d();l(3),M(i.openRegistrationFormData)}}function la(n,c){n&1&&(t(0,` 508 `),v(1,"app-button-loader"),t(2,` 509 Opening... 510 `))}function sa(n,c){n&1&&t(0,` 511 Open 512 `)}function ca(n,c){if(n&1){let i=f();t(0,` 513 `),o(1,"app-dialog-footer"),t(2,` 514 `),W(3,45),t(4,` 515 `),o(5,"button",46),g("click",function(){u(i);let a=d(2);return x(a.showOpenRegistrationDialog=!1)}),t(6,"Cancel"),r(),t(7,` 516 `),P(),t(8,` 517 `),W(9,47),t(10,` 518 `),o(11,"button",48),g("click",function(){u(i);let a=d(2);return x(a.saveSpecialRegistrations())}),t(12,` 519 `),p(13,la,3,0),p(14,sa,1,0),r(),t(15,` 520 `),P(),t(16,` 521 `),r(),t(17,` 522 `)}if(n&2){let i=d(2);l(5),F("btn-disabled",i.saving),_("disabled",i.saving),l(6),F("btn-disabled",i.saving),_("disabled",i.saving),l(2),m(i.saving?13:-1),l(),m(i.saving?-1:14)}}function da(n,c){if(n&1&&(t(0,` 523 `),p(1,ca,18,8)),n&2){let i=d();l(),m(i.showOpenRegistrationDialog?1:-1)}}function pa(n,c){if(n&1){let i=f();t(0,` 524 `),o(1,"app-dynamic-form",49,2),g("onSubmit",function(a){u(i);let s=d();return x(s.startDateSave(a))}),t(3,` 525 `),o(4,"app-dynamic-form-field",50),t(5,` 526 `),r(),t(6,` 527 `),r(),t(7,` 528 `)}if(n&2){let i=d();l(),_("fields",i.startDateFields)("entity",i.startDateEntity)("contentFieldsMode",!0)("showCancelButton",!1)("showSubmitButton",!1)("horizontalForm",!1)}}function ma(n,c){if(n&1){let i=f();t(0,` 529 `),o(1,"app-dialog-footer"),t(2,` 530 `),W(3,45),t(4,` 531 `),o(5,"button",51),g("click",function(){u(i);let a=d(2);return x(a.showStartDateDialog=!1)}),t(6,"Cancel"),r(),t(7,` 532 `),P(),t(8,` 533 `),W(9,47),t(10,` 534 `),o(11,"button",52),g("click",function(){u(i);let a=d(2);
534return x(a.startDateForm.submitForm())}),t(12,"Update All"),r(),t(13,` 535 `),P(),t(14,` 536 `),r(),t(15,` 537 `)}}function _a(n,c){if(n&1&&(t(0,` 538 `),p(1,ma,16,0)),n&2){let i=d();l(),m(i.showStartDateDialog?1:-1)}}function ua(n,c){if(n&1){let i=f();t(0,` 539 `),o(1,"app-edit-end-date-all-dialog",53),g("cancel",function(){u(i);let a=d();return x(a.showEndDateDialog=!1)})("save",function(a){u(i);let s=d();return x(s.endDateSave(a))}),t(2,` 540 `),r(),t(3,` 541 `)}if(n&2){let i=d();l(),_("endDateEntity",i.endDateEntity)("endDateFields",i.endDateFields)("isModal",!1)}}function xa(n,c){if(n&1){let i=f();t(0,` 542 `),o(1,"app-dynamic-form",54,3),g("onSubmit",function(a){u(i);let s=d();return x(s.notesSave(a))}),t(3,` 543 `),o(4,"app-dynamic-form-field",55),t(5,` 544 `),r(),t(6,` 545 `),r(),t(7,` 546 `)}if(n&2){let i=d();l(),_("fields",i.notesFields)("contentFieldsMode",!0)("showCancelButton",!1)("showSubmitButton",!1)("horizontalForm",!1)}}function ga(n,c){if(n&1){let i=f();t(0,` 547 `),o(1,"app-dialog-footer"),t(2,` 548 `),W(3,45),t(4,` 549 `),o(5,"button",51),g("click",function(){u(i);let a=d(2);return x(a.showNotesDialog=!1)}),t(6,"Cancel"),r(),t(7,` 550 `),P(),t(8,` 551 `),W(9,47),t(10,` 552 `),o(11,"button",52),g("click",function(){u(i);let a=d(2);return x(a.notesForm.submitForm())}),t(12,"Update All"),r(),t(13,` 553 `),P(),t(14,` 554 `),r(),t(15,` 555 `)}}function Ca(n,c){if(n&1&&(t(0,` 556 `),p(1,ga,16,0)),n&2){let i=d();l(),m(i.showNotesDialog?1:-1)}}function fa(n,c){if(n&1){let i=f();t(0,` 557 `),o(1,"app-yes-no-modal",56),g("onYesSelect",function(){u(i);let a=d();return x(a.removeFromWaitlist())})("onNoSelect",function(){u(i);let a=d();return x(a.showRemoveDialog=!1)}),r(),t(2,` 558 `)}}var Ge=(()=>{let c=class c{constructor(e,a,s,C,h){this.waitlistService=e,this.siteDataService=a,this.registrationPlayerOverrideService=s,this.formService=C,this.clubService=h,this.openReg=new Z,this.columns=[],this.totalRecords=0,this.loading=!1,this.AriaLabels=ft,this.Permission=q,this.FieldOption=I,this.selection=[],this.showOpenRegistrationDialog=!1,this.openRegistrationFormData=[],this.openRegistrationFullScreen=!1,this.openRegistrationSelectionCountLimit=5,this.specialRegistrationForms=new mt,this.showStartDateDialog=!1,this.startDateEntity={startDate:new Date},this.showEndDateDialog=!1,this.endDateEntity={endDate:new Date},this.showNotesDialog=!1,this.showRemoveDialog=!1,this.showConflicts=!1,this.showAdvancedCapacity=!1,this.saving=!1,this.loadingDetails={},this.details={},this.expandedRows={},this.unsubscribe$=new Y,this.sportID=0,this.isRowPSelectable=this.isRowPSelectable.bind(this)}formatAgeGroup(e){return ht(e,this.sportID)}ngOnInit(){this.clubService.getSport().subscribe({next:e=>this.sportID=e.sportID}),this.columns=[{field:"playerName",header:"Player"},{field:"gender",header:"Gender"},{field:"birthDate",header:"Birth Date"},{field:"programName",header:"Program"},{field:"registrationName",header:"Registration"},{field:"teamName",header:"Team"}],this.optionEnabled(I.AGE_CLASS)&&this.columns.push({field:"ageClass",header:this.fieldName(I.AGE_CLASS)}),this.optionEnabled(I.PRIMARY_POSITION)&&this.columns.push({field:"positionName",header:this.fieldName(I.PRIMARY_POSITION)}),this.optionEnabled(I.GRADE)&&this.columns.push({field:"grade",header:this.fieldName(I.GRADE)}),this.optionEnabled(I.SCHOOL)&&this.columns.push({field:"school",header:this.fieldName(I.SCHOOL)}),this.waitlistService.searchOptions.showClubs&&this.columns.push({field:"clubName",header:"Club"}),this.columns.push({field:"dateAddedToWaitlist",header:"Date Added"},{header:"Total Capacity"},{header:"Total Registration Count"},{header:"Total Cancellations"}),this.waitlistService.search$.pipe(T(this.unsubscribe$)).subscribe(()=>{this.run()}),this.waitlistService.export$.pipe(T(this.unsubscribe$)).subscribe({next:e=>{e.exporting&&e.waitlistTabID===O.UNAPPROVED&&this.run(!0)}}),this.revoking.subscribe(()=>{this.run()})}search(e=null,a=!1){this.lastEvent=e;let s=this.waitlistService.filters;e&&e.sortField&&(s.orderBy=e.sortField+" "+(e.sortOrder===1?"ASC":"DESC"),s.page=e.first/s.rows+1),s.getTotalCount=this.totalRecords===0,a?this.waitlistService.getUnapprovedWaitlistCSV().pipe(T(this.unsubscribe$)).subscribe({next:C=>
558{Ct(C),this.waitlistService.exportCSV({waitlistTabID:O.UNAPPROVED,exporting:!1})},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}}):(this.loading=!0,this.waitlistService.searchUnapprovedWaitlist().subscribe({next:C=>{this.searchResults=C.results,s.getTotalCount&&(this.totalRecords=C.count),this.showConflicts=this.searchResults.some(h=>h.hasConflicts),this.showAdvancedCapacity=this.searchResults.some(h=>h.registrationAdvancedCapacityOptionID),this.loading=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}}))}run(e=!1){this.totalRecords=0,this.search(this.lastEvent,e)}isRowPSelectable(e){return this.isRowSelectable(e.data)}isRowSelectable(e){return e.clubID===this.clubID}expandRow(e){let a=e.data.registrationWaitlistID;e.data.registrationAdvancedCapacityOptionID?(this.loadingDetails[a]=!0,this.details[a]?this.loadingDetails[a]=!1:this.waitlistService.getRegistrationWaitlistDetails(a).pipe(ct(1)).subscribe(s=>{s&&(this.details[a]=s),this.loadingDetails[a]=!1})):this.details[a]=null}removeFromWaitlist(){this.saving=!0,this.waitlistService.removeFromWaitlist(this.selection.map(e=>e.registrationWaitlistID),!1).pipe(T(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Selected player(s) removed from waitlist"),this.saving=!1,this.showRemoveDialog=!1,this.selection=[],this.run()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem removing player(s) from the waitlist"),this.saving=!1}})}openRegistration(){this.openRegistrationFormData=[],this.selection.forEach(e=>{let a={selection:e,entity:new We(e.playerID,e.registrationID)};this.openRegistrationFormData.push(a)}),this.openRegistrationFullScreen=this.selection?.length>this.openRegistrationSelectionCountLimit,this.endDateEntity.endDate=this.openRegistrationFormData[0].entity.endDate,this.openRegistrationFields?this.showOpenRegistrationDialog=!0:this.registrationPlayerOverrideService.getRegistrationPlayerOverrideWaitlistMetadata().pipe(T(this.unsubscribe$)).subscribe({next:e=>{this.openRegistrationFields=e.fields,this.startDateFields=e.fields.filter(a=>a.controlName==="startDate"),this.endDateFields=e.fields.filter(a=>a.controlName==="endDate"),this.notesFields=e.fields.filter(a=>a.controlName==="notes"),this.showOpenRegistrationDialog=!0}})}startDateSave(e){this.openRegistrationFormData.forEach(a=>{a.entity=X($({},a.entity),{startDate:e.startDate})}),this.formService.hideFormLoader(),this.showStartDateDialog=!1}endDateSave(e){this.openRegistrationFormData.forEach(a=>{a.entity=X($({},a.entity),{endDate:e.endDate})}),this.formService.hideFormLoader(),this.showEndDateDialog=!1}notesSave(e){this.openRegistrationFormData.forEach(a=>{a.entity=X($({},a.entity),{notes:e.notes})}),this.formService.hideFormLoader(),this.showNotesDialog=!1}saveSpecialRegistrations(){this.specialRegistrationForms.some(e=>!e.isValid)?this.specialRegistrationForms.filter(e=>!e.isValid).forEach(e=>e.submitForm()):(this.saving=!0,this.openRegistrationFormData.forEach(e=>{let a=this.specialRegistrationForms.find(s=>s.formData.registrationWaitlistID===e.selection.registrationWaitlistID).value;e.entity=$($({},e.entity),a)}),this.registrationPlayerOverrideService.createWaitlistRegistrationPlayerOverrides(this.openRegistrationFormData.map(e=>e.entity)).pipe(T(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Selected player(s) special registrations saved"),this.saving=!1,this.selection=[],this.run(),this.openReg.emit(),this.showOpenRegistrationDialog=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem saving data"),this.saving=!1}}))}emailPlayers(){let e=this.selection.map(a=>({firstName:a.playerName,lastName:"",playerID:a.playerID,player:void 0,clubUser:void 0,recipientType:void 0,selectAll:void 0,expandedRecipientType:void 0,isCC:!1}));this.waitlistService.showEmail({show:!0,players:e})}optionEnabled(e){return this.clubFieldOptions?.find(a=>a.fieldOptionID===e)!==void 0}fieldName(e){return this.clubFieldOptions.find(a=>a.fieldOptionID===e).fieldName}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};c.\u0275fac=function(a){return new(a||c)(w(B),w(nt),w(lt),w(wt),w(St))},c.\u0275cmp=V({type:c,selectors:[["app-unapproved"]],viewQuery:function(a,s){if(a&1&&G(wn,5)(yn,5)(Dn,5)(Rn,5),a&2){let C;L(C=U())&&(s.startDateForm=C.first),L(C=U())&&(s.endDateForm=C.first),L(C=U())&&(s.notesForm=C.first),L(C=U())&&(s.specialRegistrationForms=C)}},inputs:{user:"user",clubID:"clubID",revoking:"revoking",clubFieldOptions:"clubFieldOptions"},outputs:{openReg:"openReg"},standalone:!1,decls:91,vars:46,consts:[["expandedrow",""],["specialRegistrationForm",""],["startDateForm",""],["notesForm",""],["sortField","dateAddedToWaitlist",1,"table","table-striped","table-sm",3,"selectionChange","onLazyLoad","onRowExpand","columns","value","lazy","selection","paginator","alwaysShowPaginator","totalRecords","rows","sortOrder","loading","rowSelectable","dataKey","expandedRowKeys"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["appStickyFormButtons",""],[1,"btn",3,"click","disabled"],["header","Open Special Registration","appendTo","body",3,"visibleChange","onHide","close","visible","showHeader","closable","modal","draggable","styleClass"],[1,"mb-3"],[1,"row","mb-3","open-registration-section"],[1,"col-md-12"],[1,"row","fw-800","my-3","no-gutters"],[1,"col-md-2"],[1,"col-md-2",3,"ngClass"],["pTemplate","footer"],["header","Edit Start Date",3,"visibleChange","onHide","close","visible","showHeader","closable","modal","draggable"],["header","Edit Notes","appendTo","body",3,"visibleChange","onHide","close","visible","showHeader","closable","modal","draggable"],[3,"pSortableColumn"],[3,"field"],[3,"hasPlayerAdminPermission","currentClubID","playerID","playerClubID","playerName","playerClubName","playerSubdomain"],[3,"value"],[3,"currentClubID","clubName","subdomain","clubID"],[1,"text-center"],["status","error","text","Conflicts","pTooltip","This player is registered in a program that c
558onflicts with this registration.","tooltipPosition","left",3,"nowrap"],["status","success","text","No Conflicts",3,"nowrap"],["type","button",1,"btn","btn-tertiary","btn-sm",3,"pRowToggler"],[1,"fa-solid","fa-chevron-down",3,"ngClass"],[1,"sr-only"],[1,"p-0","pb-3"],[3,"item","details","user","currentClubID","hasPlayerProgramPermission"],["height","5rem"],[2,"text-align","left"],[1,"btn","btn-primary",3,"click","disabled"],[1,"text-large"],["type","button",1,"btn","btn-sm","btn-naked","btn-icon-edit-after",3,"click"],[3,"formID","fields","entity","contentFieldsMode","horizontalForm","showCancelButton","showSubmitButton","formData"],[1,"row","waitlist-row","d-flex","align-items-center","no-gutters","pb-3"],[1,"col-md-2","fw-600"],[1,"col-md-2","no-wrap"],["fieldName","startDate","styleClass","mb-0",3,"formID","hideLabel"],["fieldName","endDate","styleClass","mb-0",3,"formID","hideLabel"],["fieldName","notes","styleClass","mb-0",3,"formID","hideLabel"],["slot","secondary"],["type","button",1,"btn",3,"click","disabled"],["slot","primary"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["formID","startDateForm",3,"onSubmit","fields","entity","contentFieldsMode","showCancelButton","showSubmitButton","horizontalForm"],["fieldName","startDate","formID","startDateForm"],["type","button",1,"btn",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],[3,"cancel","save","endDateEntity","endDateFields","isModal"],["formID","notesForm",3,"onSubmit","fields","contentFieldsMode","showCancelButton","showSubmitButton","horizontalForm"],["fieldName","notes","formID","notesForm"],["headerText","Revoke Special Registration","modalText","Are you sure you want to remove the selected player(s) from the waitlist?","yesButtonText","Yes, Remove","yesButtonLoadingText","Removing...","noButtonText","Cancel",3,"onYesSelect","onNoSelect"]],template:function(a,s){if(a&1){let C=f();o(0,"p-table",4),R("selectionChange",function(S){return u(C),D(s.selection,S)||(s.selection=S),x(S)}),g("onLazyLoad",function(S){return s.search(S)})("onRowExpand",function(S){return s.expandRow(S)}),t(1,` 559 `),A(2,An,13,2,"ng-template",5),t(3,` 560 `),A(4,zn,51,30,"ng-template",6),t(5,` 561 `),A(6,Kn,9,3,"ng-template",null,0,ut),t(8,` 562 `),A(9,Jn,7,1,"ng-template",7),t(10,` 563`),r(),t(11,` 564`),v(12,"br"),t(13,` 565 `),o(14,"div",8),t(15,` 566 `),p(16,Xn,4,1),p(17,Zn,4,3),o(18,"button",9),g("click",function(){return s.showRemoveDialog=!0}),t(19,` 567 Remove from Waitlist 568 `),r(),t(20,` 569 `),r(),t(21,` 570 571 `),o(22,"p-dialog",10),R("visibleChange",function(S){return u(C),D(s.showOpenRegistrationDialog,S)||(s.showOpenRegistrationDialog=S),x(S)}),g("onHide",function(){return s.showOpenRegistrationDialog=!1})("close",function(){return s.showOpenRegistrationDialog=!1}),t(23,` 572 `),p(24,ta,7,0),o(25,"div",11),t(26,` 573 Confirm the players below who should have a special registration opened. Once the registration is opened, you 574 can notify players on the Approved tab. If you see a player you don't want to open a special registration for, 575 click Cancel and uncheck them from the search page. 576 `),r(),t(27,` 577 `),o(28,"div",12),t(29,` 578 `),o(30,"div",13),t(31,` 579 `),o(32,"div",14),t(33,` 580 `),o(34,"div",15),t(35,` 581 Player 582 `),r(),t(36,` 583 `),o(37,"div",15),t(38,` 584 Program 585 `),r(),t(39,` 586 `),o(40,"div",15),t(41,` 587 Registration 588 `),r(),t(42,` 589 `),o(43,"div",15),t(44,` 590 `),o(45,"span"),t(46,"Start Date"),r(),t(47,` 591 `),p(48,ea,4,0),r(),t(49,` 592 `),o(50,"div",15),t(51,` 593 `),o(52,"span"),t(53,"End Date"),r(),t(54,` 594 `),p(55,ia,4,0),r(),t(56,` 595 `),o(57,"div",16),t(58,` 596 `),o(59,"span"),t(60,"Notes"),r(),t(61,` 597 `),p(62,na,4,0),r(),t(63,` 598 `),r(),t(64,` 599 `),p(65,ra,6,0),r(),t(66,` 600 `),r(),t(67,` 601 `),A(68,da,2,1,"ng-template",17),t(69,` 602 `),r(),t(70,` 603 604 `),o(71,"p-dialog",18),R("visibleChange",function(S){return u(C),D(s.showStartDateDialog,S)||(s.showStartDateDialog=S),x(S)}),g("onHide",function(){return s.showStartDateDialog=!1})("close",function(){return s.showStartDateDialog=!1}),t(72,` 605 `),o(73,"div"),t(74,` 606 `),p(75,pa,8,6),r(),t(76,` 607 `),A(77,_a,2,1,"ng-template",17),t(78,` 608 `),r(),t(79,` 609 610 `),p(80,ua,4,3),o(81,"p-dialog",19),R("visibleChange",function(S){return u(C),D(s.showNotesDialog,S)||(s.showNotesDialog=S),x(S)}),g("onHide",function(){return s.showNotesDialog=!1})("close",function(){return s.showNotesDialog=!1}),t(82,` 611 `),o(83,"div"),t(84,` 612 `),p(85,xa,8,5),r(),t(86,` 613 `),A(87,Ca,2,1,"ng-template",17),t(88,` 614 `),r(),t(89,` 615 616 `),p(90,fa,3,0)}a&2&&(_("columns",s.columns)("value",s.searchResults)("lazy",!0),y("selection",s.selection),_("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",s.totalRecords)("rows",25)("sortOrder",1)("loading",s.loading)("rowSelectable",s.isRowPSelectable)("dataKey","registrationWaitlistID")("expandedRowKeys",s.expandedRows),l(16),m(s.user[s.Permission.SpecialRegistration]?16:-1),l(),m(s.user[s.Permission.EmailCommunications]?17:-1),l(),F("btn-primary",!s.user[s.Permission.SpecialRegistration]&&!s.user[s.Permission.EmailCommunications]),_("disabled",!(s.selection!=null&&s.selection.length)),l(4),y("visible",s.showOpenRegistrationDialog),_("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1)("styleClass",s.openRegistrationFullScreen?"fullPageDialog":"largeWidthDialog"),l(2),m(s.openRegistrationFullScreen?24:-1),l(24),m(s.openRegistrationFullScreen?48:-1),l(7),m(s.openRegistrationFullScreen?55:-1),l(2),_("ngClass",st(44,En,!s.openRegistrationFullScreen)),l(5),m(s.openRegistrationFullScreen?62:-1),l(3),m(s.showOpenRegistrationDialog&&s.openRegistrationFields?65:-1),l(6),y("visible",s.showStartDateDialog),_("showHeader",!0)("closable",!0)("modal",!1)("draggable",!1),l(4),m(s.showStartDateDialog?75:-1),l(5),m(s.showEndDateDialog?80:-1),l(),y("visible",s.showNotesDialog),_("showHeader",!0)("closable",!0)("modal",!1)("draggable",!1),l(4),m(s.showNotesDialog?85:-1),l(5),m(s.showRemoveDialog?90:-1))},dependencies:[xt,rt,ot,Q,bt,he,Ft,At,J,Pt,yt,Dt,Et,Rt,Tt,It,K,at,Nt,Mt,Lt,Ut,gt,Wt],styles:[".open-registration-section[_ngcontent-%COMP%]{background:var(--grey-75)}"]});let n=c;return n})();var Bt=()=>({width:"100%"});function va(n,c){if(n&1){let i=f();t(0,` 617 `),o(1,"div",6),t(2,` 618 `),o(3,"div",7),t(4,` 619 `),o(5,"label",32),t(6,"Club"),r(),t(7,` 620 `),o(8,"p-multiSelect",33),R("ngModelChange",function(a){u(i);let s=d(2);return D(s.waitlistService.filters.clubs,a)||(s.waitlistService.filters.clubs=a),x(a)}),g("onChange",function(){u(i);let a=d(2);return x(a.getPrograms())}),r(),t(9,` 621 `),r(),t(10,` 622 `),r(),t(11,` 623 `)}if(n&2){let i=d(2);l(8),tt(et(8,Bt)),_("autofocusFilter",!0)("options",i.clubs)("filter",!0),y("ngModel",i.waitlistService.filters.clubs),_("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function Sa(n,c){if(n&1){let i=f();t(0,` 624 `),o(1,"app-unapproved",34),g("openReg",function(){u(i);let a=d(2);return x(a.openPlayerReg())}),r(),t(2,` 625 `)}if(n&2){let i=d(2);l(),_("user",i.user)("clubFieldOptions",i.clubFieldOptions)("clubID",i.clubID)("revoking",i.revokePlayer$)}}function ba(n,c){if(n&1){let i=f();t(0,` 626 `),o(1,"app-approved",35),g("revokeUser",function(){u(i);let a=d(2);return x(a.revokeUser())}),r(),t(2,` 627 `)}if(n&2){let i=d(2);l(),_("user",i.user)("clubID",i.clubID)("clubFieldOptions",i.clubFieldOptions)("openingPlayerReg",i.openPlayerReg$)}}function wa(n,c){if(n&1){let i=f();t(0,` 628 `),o(1,"div",36),t(2,` 629 `),o(3,"div",37),t(4,` 630 `),o(5,"button",38),g("click",function(){u(i);let a=d(2);return x(a.hideEmail())}),t(6,"Back"),r(),t(7,` 631 `),r(),t(8,` 632 `),r(),t(9,` 633 `),o(10,"app-email-compose",39),g("send",function(){u(i);let a=d(2);return x(a.hideEmail())})("cancel",function(){u(i);let a=d(2);return x(a.hideEmail())}),r(),t(11,` 634 `)}if(n&2){let i=d(2);l(10),_("showHeader",!1)("recipients",i.showEmail.players)("showSteps",!1)("emailCategoryID",i.EmailCategoryLV.TEAM_MANAGEMENT)("lockRecipients",!0)("hideSearch",!0)("selectRecipientsButtonText","Continue")}}function ya(n,c){if(n&1){let i=f();t(0,` 635 `),o(1,"main",1),g("keydown.enter",function(){u(i);let a=d();return x(a.run())}),t(2,` 636 `),o(3,"app-admin-header",2),g("primaryBtnAction",function(){u(i);let a=d();return x(a.exportCSV())}),r(),t(4,` 637 `),o(5,"div",3),t(6,` 638 `),o(7,"app-admin-filter",4),g("adminFilterReset",function(){u(i);let a=d();return x(a.resetFilters())})("adminFilterSearch",function(){u(i);let a=d();return x(a.run())}),t(8,` 639 `),W(9,5),t(10,` 640 `),p(11,va,12,9),o(12,"div",6),t(13,` 641 `),o(14,"div",7),t(15,` 642 `),o(16,"label",8),t(17,"Program Type"),r(),t(18,` 643 `),o(19,"p-select",9),R("ngModelChange",function(a){u(i);let s=d();return D(s.waitlistService.filters.programTypeID,a)||(s.waitlistService.filters.programTypeID=a),x(a)}),g("onChange",function(){u(i);let a=d();return x(a.getPrograms())}),r(),t(20,` 644 `),r(),t(21,` 645 `),r(),t(22,` 646 `),o(23,"div",6),t(24,` 647 `),o(25,"div",7),t(26,` 648 `),o(27,"label",10),t(28,"Program"),r(),t(29,` 649 `),o(30,"p-multiSelect",11),R("ngModelChange",function(a){u(i);let s=d();return D(s.waitlistService.filters.programID,a)||(s.waitlistService.filters.programID=a),x(a)}),g("onChange",function(){u(i);let a=d();return x(a.getRegistrations())}),r(),t(31,` 650 `),r(),t(32,` 651 `),r(),t(33,` 652 `),o(34,"div",6),t(35,` 653 `),o(36,"div",7),t(37,` 654 `),o(38,"label",12),t(39,"Registration"),r(),t(40,` 655 `),o(41,"p-multiSelect",13),R("ngModelChange",function(a){u(i);let s=d();return D(s.waitlistService.filters.registrationID,a)||(s.waitlistService.filters.registrationID=a),x(a)}),r(),t(42,` 656 `),r(),t(43,` 657 `),r(),t(44,` 658 `),P(),t(45,` 659 `),W(46,14),t(47,` 660 `),o(48,"div",15),t(49,` 661 `),o(50,"div",16),t(51,` 662 `),o(52,"div",7),t(53,` 663 `),o(54,"div",7),t(55,` 664 `),o(56,"label",17),t(57,"Player Last Name"),r(),t(58,` 665 `),o(59,"input",18),R("ngModelChange",function(a){u(i);let s=d();return D(s.waitlistService.filters.playerLastName,a)||(s.waitlistService.filters.playerLastName=a),x(a)}),r(),t(60,` 666 `),r(),t(61,` 667 `),r(),t(62,` 668 `),r(),t(63,` 669 `),o(64,"div",19),t(65,` 670 `),o(66,"div",7),t(67,` 671 `),o(68,"div",7),t(69,` 672 `),o(70,"label"),t(71,"Test Players"),r(),t(72,` 673 `),o(73,"p-select",20),R("ngModelChange",function(a){u(i);let s=d();return D(s.waitlistService.filters.testPlayerOption,a)||(s.waitlistService.filters.testPlayerOption=a),x(a)}),r(),t(74,` 674 `),r(),t(75,` 675 `),r(),t(76,` 676 `),r(),t(77,` 677 `),o(78,"div",19),t(79,` 678 `),o(80,"div",7),t(81,` 679 `),o(82,"label"),t(83,"Inactive Players"),r(),t(84,` 680 `),o(85,"p-select",20),R("ngModelChange",function(a){u(i);let s=d();return D(s.waitlistService.filters.inactivePlayerOption,a)||(s.waitlistService.filters.inactivePlayerOption=a),x(a)}),r(),t(86,` 681 `),r(),t(87,` 682 `),r(),t(88,` 683 `),o(89,"div",16),t(90,` 684 `),o(91,"div",7),t(92,` 685 `),o(93,"label",21),t(94,"Player ID"),r(),t(95,` 686 `),o(96,"input",22),R("ngModelChange",function(a){u(i);let s=d();return D(s.waitlistService.filters.playerID,a)||(s.waitlistService.filters.playerID=a),x(a)}),r(),t(97,` 687 `),r(),t(98,` 688 `),r(),t(99,` 689 `),o(100,"div",16),t(101,` 690 `),o(102,"div",7),t(103,` 691 `),o(104,"label"),t(105,"Birth Year"),r(),t(106,` 692 `),o(107,"span",23),t(108,` 693 `),o(109,"p-inputgroup"),t(110,` 694 `),o(111,"p-datepicker",24,0),R("ngModelChange",function(a){u(i);let s=d();return D(s.waitlistService.filters.dobFrom,a)||(s.waitlistService.filters.dobFrom
694=a),x(a)}),r(),t(113,` 695 `),o(114,"p-inputgroup-addon"),t(115,"to"),r(),t(116,` 696 `),o(117,"p-datepicker",25),R("ngModelChange",function(a){u(i);let s=d();return D(s.waitlistService.filters.dobTo,a)||(s.waitlistService.filters.dobTo=a),x(a)}),g("onSelect",function(){u(i);let a=d();return x(a.waitlistService.filters.dobTo=a.setToDateToEOY(a.waitlistService.filters.dobTo))}),r(),t(118,` 697 `),r(),t(119,` 698 `),o(120,"a",26),g("click",function(){u(i);let a=d();return a.waitlistService.filters.dobFrom=void 0,x(a.waitlistService.filters.dobTo=void 0)}),t(121,` 699 `),v(122,"i",27),t(123,` 700 `),r(),t(124,` 701 `),r(),t(125,` 702 `),r(),t(126,` 703 `),r(),t(127,` 704 `),o(128,"div",19),t(129,` 705 `),o(130,"div",7),t(131,` 706 `),o(132,"label"),t(133,"Gender"),r(),t(134,` 707 `),o(135,"p-select",20),R("ngModelChange",function(a){u(i);let s=d();return D(s.waitlistService.filters.genderID,a)||(s.waitlistService.filters.genderID=a),x(a)}),r(),t(136,` 708 `),r(),t(137,` 709 `),r(),t(138,` 710 `),r(),t(139,` 711 `),P(),t(140,` 712 `),r(),t(141,` 713 `),o(142,"div",28),t(143,` 714 `),t(144,` 715 `),o(145,"p-selectButton",29),g("onChange",function(a){u(i);let s=d();return x(s.changeTab(a.value))}),r(),t(146,` 716 `),r(),t(147,` 717 `),t(148,` 718 `),o(149,"section",30),t(150,` 719 `),o(151,"div",31),t(152,` 720 `),o(153,"div",3),t(154,` 721 `),p(155,Sa,3,4),r(),t(156,` 722 `),o(157,"div",3),t(158,` 723 `),p(159,ba,3,4),r(),t(160,` 724 `),r(),t(161,` 725 `),r(),t(162,` 726 `),r(),t(163,` 727 `),p(164,wa,12,7),r(),t(165,` 728`)}if(n&2){let i=Xt(112),e=d();l(3),_("primaryBtnText","Export"),l(2),_("hidden",e.showEmail.show),l(2),_("showAdvanced",!0)("showLabels",!0),l(4),m(e.waitlistService.searchOptions.showClubs?11:-1),l(8),tt(et(55,Bt)),_("options",e.programTypes)("filter",!0),y("ngModel",e.waitlistService.filters.programTypeID),_("showClear",!0),l(11),tt(et(56,Bt)),_("autofocusFilter",!0),y("ngModel",e.waitlistService.filters.programID),_("options",e.programs)("filter",!0)("showToggleAll",!1)("maxSelectedLabels",1)("selectedItemsLabel","{0} programs selected")("disabled",e.loadingPrograms),l(11),tt(et(57,Bt)),_("autofocusFilter",!0)("options",e.registrations),y("ngModel",e.waitlistService.filters.registrationID),_("filter",!0)("showToggleAll",!1)("maxSelectedLabels",1)("selectedItemsLabel","{0} registrations selected")("disabled",e.loadingRegistrations),l(18),y("ngModel",e.waitlistService.filters.playerLastName),l(14),y("ngModel",e.waitlistService.filters.testPlayerOption),_("options",e.testUserOptions),l(12),y("ngModel",e.waitlistService.filters.inactivePlayerOption),_("options",e.inactivePlayerOptions),l(11),y("ngModel",e.waitlistService.filters.playerID),l(15),y("ngModel",e.waitlistService.filters.dobFrom),_("defaultDate",e.minBirthYear)("minDate",e.minBirthYear)("maxDate",e.maxBirthYear),l(6),y("ngModel",e.waitlistService.filters.dobTo),_("defaultDate",e.minBirthYear)("minDate",i.value?i.value:e.minBirthYear)("maxDate",e.maxBirthYear),l(18),y("ngModel",e.waitlistService.filters.genderID),_("options",e.genderOptions),l(10),_("options",e.statusOptions)("ngModel",e.waitlistService.searchOptions.tabID)("allowEmpty",!1),l(8),_("hidden",e.waitlistService.searchOptions.tabID===e.RegistrationWaitlistTab.APPROVED),l(2),m(e.showTable[e.RegistrationWaitlistTab.UNAPPROVED]?155:-1),l(2),_("hidden",e.waitlistService.searchOptions.tabID===e.RegistrationWaitlistTab.UNAPPROVED),l(2),m(e.showTable[e.RegistrationWaitlistTab.APPROVED]?159:-1),l(5),m(e.showEmail.show?164:-1)}}var ze=(()=>{let c=class c{constructor(e,a,s,C,h,S,Qe){this.siteDataService=e,this.waitlistService=a,this.clubService=s,this.router=C,this.authorizeService=h,this.adminProgramService=S,this.programService=Qe,this.showTable={}
728,this.statusOptions=[{label:"Waitlist",value:O.UNAPPROVED},{label:"Approved",value:O.APPROVED}],this.EmailCategoryLV=Ee,this.inactivePlayerOptions=se,this.testUserOptions=le,this.loadingPrograms=!0,this.loadingRegistrations=!0,this.minBirthYear=ae,this.maxBirthYear=oe,this.genderOptions=ce,this.showEmail={show:!1,players:[]},this.exporting=!1,this.RegistrationWaitlistTab=O,this.revokePlayer$=new Y,this.openPlayerReg$=new Y,this.unsubscribe$=new Y;let qt=this.router.getCurrentNavigation()??this.router.lastSuccessfulNavigation();qt?.extras.state&&(this.clubID=qt.extras.state.clubID)}ngOnInit(){this.waitlistService.filters||(this.waitlistService.filters=new Yt),this.authorizeService.getUser().pipe(ct(1),dt(e=>{this.user=e,e&&!this.clubID&&(this.clubID=+e.clubID)}),Jt(()=>Kt({clubs:this.clubService.getClubsDropdown(!0),programTypes:this.adminProgramService.getProgramTypes(),clubFieldOptions:this.siteDataService.getClubFieldOptions()})),dt(({clubs:e,programTypes:a,clubFieldOptions:s})=>{e?.length&&(this.clubs=e,this.waitlistService.filters.clubs=[this.clubID],this.waitlistService.searchOptions.showClubs=e?.length>1),this.programTypes=a,this.clubFieldOptions=s})).subscribe({next:()=>{this.getPrograms(),this.showTable[O.UNAPPROVED]=!0,this.siteDataService.hideSiteLoader()}}),this.waitlistService.showEmail$.pipe(T(this.unsubscribe$)).subscribe({next:e=>{this.showEmail=e}}),this.waitlistService.export$.pipe(T(this.unsubscribe$)).subscribe({next:e=>{this.exporting=e.exporting}})}setToDateToEOY(e){return re(e)}run(){this.showTable[this.waitlistService.searchOptions.tabID]?this.waitlistService.search():this.showTable[this.waitlistService.searchOptions.tabID]=!0}changeTab(e){this.waitlistService.searchOptions.tabID!==e&&(this.showTable[e]||(this.showTable[e]=!0),this.waitlistService.searchOptions.tabID=e)}resetFilters(){this.waitlistService.filters=new Yt(this.waitlistService.filters.orderBy)}getPrograms(){this.loadingPrograms=!0,this.adminProgramService.getPrograms({programType:this.waitlistService.filters.programTypeID,includeChildrenClubs:this.waitlistService.searchOptions.showClubs,includeProgramsPastEndDate:!1,includeProgramsFromLastSixMonths:!1,clubID:this.waitlistService.filters.clubs}).pipe(dt(e=>{e&&e.forEach(a=>{this.waitlistService.filters.clubs?.length>1?a.displayName=`${this.clubs.find(s=>s.clubID===a.clubID).name} - ${a.name}`:a.displayName=a.name})}),T(this.unsubscribe$)).subscribe(e=>{this.programs=e,this.waitlistService.filters.programID&&(this.waitlistService.filters.programID=this.waitlistService.filters.programID.filter(a=>this.programs?.some(s=>s.programID===a))),this.loadingPrograms=!1,this.getRegistrations()})}getRegistrations(){this.loadingRegistrations=!0,this.programService.getRegistrations(this.waitlistService.filters.programID,this.waitlistService.filters.clubs).pipe(T(this.unsubscribe$)).subscribe(e=>{this.registrations=e,this.waitlistService.filters.registrationID&&(this.waitlistService.filters.registrationID=this.waitlistService.filters.registrationID.filter(a=>this.registrations?.some(s=>s.value===a))),this.loadingRegistrations=!1})}hideEmail(){this.waitlistService.showEmail({show:!1,players:[]})}exportCSV(){this.waitlistService.exportCSV({waitlistTabID:this.waitlistService.searchOptions.tabID,exporting:!0})}revokeUser(){this.revokePlayer$.next()}openPlayerReg(){this.openPlayerReg$.next()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.waitlistService.searchOptions.tabID=O.UNAPPROVED,this.waitlistService.expandedItems={}}};c.\u0275fac=function(a){return new(a||c)(w(nt),w(B),w(Ot),w(ne),w(vt),w(Vt),w(kt))},c.\u0275cmp=V({type:c,selectors:[["ng-component"]],standalone:!1,decls:1,vars:1,consts:[["dobFromInput",""],["role","main",3,"keydown.enter"],["pageTitle","Registration Waitlist","primaryBtnIcon","fa-regular fa-table",3,"primaryBtnAction","primaryBtnText"],[3,"hidden"],[3,"adminFilterReset","adminFilterSearch","showAdvanced","showLabels"],["primary",""],[1,"col"],[1,"form-group"],["for","programTypeID"],["inputId","programTypeID","placeholder","All","appendTo","body",3,"ngModelChange","onChange","options","filter","ngModel","showClear"],["for","programID"],["optionLabel","displayName","optionValue","programID","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel","disabled"],["for","registrationID"],["inputId","registrationID","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","options","ngModel","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel","disabled"],["advanced",""],[1,"row"],[1,"col-md-4"],["for","playerLastName"],["type","text","id","playerLastName","pInputText","",1,"full-width",3,"ngModelChange","ngModel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["for","playerID"],["type","number","id","playerID",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"assign-tabs"],["optionLabel","label","optionValue","value",3,"onChange","options","ngModel","allowEmpty"],[1,"report-filters"],[1,"report-table","table-responsive"],["for","clubID"],["inputId","clubID","optionLabel","name","optionValue","clubID","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","options","filter","ngModel","maxSelectedLabels","selectedItemsLabel"],[3,"openReg","user","clubFieldOptions","clubID","revoking"],[3,"revokeUser","user","clubID","clubFieldOptions","openingPlayerReg"],[1,"row","header-row","mb-2"],[1,"col-md-12"],["type","button",1,"btn","btn-naked","btn-icon-chevron-left","pl-0",3,"click"],["subheader","Notify Player(s)","defaultEmailSubject","Registration Waitlist Update",3,"send","cancel","showHeader","recipients","showSteps","emailCategoryID","lockRecipients","hideSearch","selectRecipientsButtonText"]],template:function(a,s){a&1&&p(0,ya,166,58),a&2&&m(s.waitlistService.filters?0:-1)},dependencies:[Zt,ie,te,ee,be,we,ve,Se,xe,pe,ge,Ce,Te,He,Ge],encapsulation:2});let n=c;return n})();var je=(()=>{let c=class c{};c.\u0275fac=function(a){return new(a||c)},c.\u0275mod=_t({type:c}),c.\u0275inj=pt({imports:[$t.forChild([{path:"",canActivate:[me,ue,_e],component:ze,data:{permissions:[q.RegistrationWaitlist],metaTitle:"Registration Waitlist"}}]),$t]});let n=c;return n})();var Qr=(()=>{let c=class c{};c.\u0275fac=function(a){return new(a||c)},c.\u0275mod=_t({type:c}),c.\u0275inj=pt({providers:[B,Ot,ke,Vt,kt,lt],imports:[Re,je,Oe,Ie,Ve]});let n=c;return n})();export{Qr as RegistrationWaitlistModule};
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.