1import{b as te,c as re}from"./chunk-RF4ESXXV.js";import"./chunk-IN6JNWJL.js";import"./chunk-GT2RX7V4.js";import"./chunk-Z52L74DH.js";import{a as ne}from"./chunk-NFUILKBB.js";import{b as j}from"./chunk-4D5SN44G.js";import"./chunk-6Q5DDO7R.js";import{$b as w,Ef as D,Hd as O,Mf as X,Nf as Z,Of as ee,ea as C,kd as P,kh as ie}from"./chunk-X5J6QTCG.js";import{$ as g,$a as v,Ad as k,E as T,Fa as m,Ib as e,Ka as u,Ma as x,Na as F,Pf as J,Rh as K,U as _,W as Y,bb as S,cc as G,d as U,fa as h,ga as y,gb as d,hb as r,ib as o,jb as f,k as B,nb as z,ob as H,pj as E,qb as N,sb as I,tb as p,u as M,vd as b,wd as Q,xb as $,xe as V,yb as L,yd as W,zb as q}from"./chunk-SMW7PHYX.js";import{a as R}from"./chunk-BMIYOSOG.js";var ae=(()=>{let s=class s{};s.\u0275fac=function(t){return new(t||s)},s.\u0275cmp=x({type:s,selectors:[["app-players"]],standalone:!1,decls:1,vars:0,template:function(t,a){t&1&&f(0,"router-outlet")},dependencies:[Q],encapsulation:2});let l=s;return l})();var he=["proofOfInsuranceField"],ye=["proofOfAgeField"],Ie=()=>["/dashboard"];function xe(l,s){if(l&1){let n=N();e(0,` 2 `),r(1,"app-dynamic-form",5),I("onSubmit",function(t){h(n);let a=p(2);return y(a.save(t))}),e(2,` 3 `),r(3,"section",6),e(4,` 4 `),r(5,"h3"),e(6,"Profile"),o(),e(7,` 5 `),r(8,"div",3),e(9,` 6 `),r(10,"div",7),e(11,` 7 `),e(12,` 8 `),o(),e(13,` 9 `),r(14,"div",8),e(15,` 10 `),r(16,"app-dynamic-form-field",9),e(17,` 11 `),o(),e(18,` 12 `),r(19,"app-dynamic-form-field",10),e(20,` 13 `),o(),e(21,` 14 `),r(22,"app-dynamic-form-field",11),e(23,` 15 `),o(),e(24,` 16 `),r(25,"app-dynamic-form-field",12),e(26,` 17 `),o(),e(27,` 18 `),o(),e(28,` 19 `),o(),e(29,` 20 `),o(),e(30,` 21 `),r(31,"section",13),e(32,` 22 `),r(33,"h3"),e(34,"Address"),o(),e(35,` 23 `),r(36,"app-dynamic-form-field",14),e(37,` 24 `),o(),e(38,` 25 `),r(39,"app-dynamic-form-field",15),e(40,` 26 `),o(),e(41,` 27 `),f(42,"app-dynamic-form-field",16),e(43,` 28 `),r(44,"app-dynamic-form-field",17),e(45,` 29 `),o(),e(46,` 30 `),f(47,"app-dynamic-form-field",18),e(48,` 31 `),o(),e(49,` 32 `),r(50,"section",13),e(51,` 33 `),r(52,"h3"),e(53,"Emergency Contacts"),o(),e(54,` 34 `),f(55,"app-dynamic-form-field",19),e(56,` 35 `),f(57,"app-dynamic-form-field",20),e(58,` 36 `),f(59,"app-dynamic-form-field",21),e(60,` 37 `),f(61,"app-dynamic-form-field",22),e(62,` 38 `),f(63,"app-dynamic-form-field",23),e(64,` 39 `),r(65,"app-dynamic-form-field",24),e(66,` 40 `),o(),e(67,` 41 `),o(),e(68,` 42 `),r(69,"section",13),e(70,` 43 `),r(71,"h3"),e(72,"Medical & Insurance Information"),o(),e(73,` 44 `),r(74,"app-dynamic-form-field",25),I("onChange",function(t){h(n);let a=p(2);return y(a.medicalInsuranceChange(t))}),o(),e(75,` 45 `),r(76,"app-dynamic-form-field",26),e(77,` 46 `),o(),e(78,` 47 `),r(79,"app-dynamic-form-field",27),e(80,` 48 `),o(),e(81,` 49 `),r(82,"app-dynamic-form-field",28),e(83,` 50 `),o(),e(84,` 51 `),r(85,"app-dynamic-form-field",29),e(86,` 52 `),o(),e(87,` 53 `),r(88,"app-dynamic-form-field",30),e(89,` 54 `),o(),e(90,` 55 `),r(91,"app-dynamic-form-field",31,0),I("onChange",function(t){h(n);let a=p(2);return y(a.fileUploaded(a.DocumentTypeID.PLAYER_PROOF_OF_INSURANCE,t.target.files[0]))})("onFileDownload",function(){h(n);let t=p(2);return y(t.downloadPlayerDocument(t.playerDocuments[t.DocumentTypeID.PLAYER_PROOF_OF_INSURANCE].playerDocument.playerDocumentID))}),e(93,` 56 `),o(),e(94,` 57 `),r(95,"app-dynamic-form-field",32),e(96,` 58 `),o(),e(97,` 59 `),r(98,"app-dynamic-form-field",33),e(99,` 60 `),o(),e(100,` 61 `),r(101,"app-dynamic-form-field",34),e(102,` 62 `),o(),e(103,` 63 `),o(),e(104,` 64 `),r(105,"section",13),e(106,`
65 `),r(107,"h3"),e(108,"School Information"),o(),e(109,` 66 `),f(110,"app-dynamic-form-field",35),e(111,` 67 `),f(112,"app-dynamic-form-field",36),e(113,` 68 `),o(),e(114,` 69 `),z(115,37),e(116,` 70 `),r(117,"a",38),e(118,` 71 `),f(119,"i",39),e(120,` 72 Dashboard 73 `),o(),e(121,` 74 `),H(),e(122,` 75 `),o(),e(123,` 76 `)}if(l&2){let n=p(2);m(),d("fields",n.fields)("entity",n.player)("contentFieldsMode",!0)("horizontalForm",!0)("showCancelButton",!1)("buttonsPosition","left"),m(30),d("hidden",!n.showAddressInfo),m(19),d("hidden",!n.showEmergencyContactsInfo),m(19),d("hidden",!n.showMedicalInfo),m(7),d("required",n.player.user.userMedicalInfo==null?null:n.player.user.userMedicalInfo.hasMedicalInsurance)("hidden",!(n.player.user.userMedicalInfo!=null&&n.player.user.userMedicalInfo.hasMedicalInsurance)),m(3),d("required",n.player.user.userMedicalInfo==null?null:n.player.user.userMedicalInfo.hasMedicalInsurance)("hidden",!(n.player.user.userMedicalInfo!=null&&n.player.user.userMedicalInfo.hasMedicalInsurance)),m(3),d("required",n.player.user.userMedicalInfo==null?null:n.player.user.userMedicalInfo.hasMedicalInsurance)("hidden",!(n.player.user.userMedicalInfo!=null&&n.player.user.userMedicalInfo.hasMedicalInsurance)),m(3),d("required",n.player.user.userMedicalInfo==null?null:n.player.user.userMedicalInfo.hasMedicalInsurance)("hidden",!(n.player.user.userMedicalInfo!=null&&n.player.user.userMedicalInfo.hasMedicalInsurance)),m(3),d("required",n.player.user.userMedicalInfo==null?null:n.player.user.userMedicalInfo.hasMedicalInsurance)("hidden",!(n.player.user.userMedicalInfo!=null&&n.player.user.userMedicalInfo.hasMedicalInsurance)),m(3),d("required",n.player.user.userMedicalInfo==null?null:n.player.user.userMedicalInfo.hasMedicalInsurance)("hidden",!(n.player.user.userMedicalInfo!=null&&n.player.user.userMedicalInfo.hasMedicalInsurance))("selectedFileName",n.playerDocuments[n.DocumentTypeID.PLAYER_PROOF_OF_INSURANCE]!=null&&n.playerDocuments[n.DocumentTypeID.PLAYER_PROOF_OF_INSURANCE].playerDocument?n.playerDocuments[n.DocumentTypeID.PLAYER_PROOF_OF_INSURANCE].playerDocument.uploadedDocumentName:null),m(14),d("hidden",!n.showSchoolInfo),m(12),d("routerLink",G(24,Ie))}}function ve(l,s){if(l&1&&(e(0,` 77 `),r(1,"div",1),e(2,` 78 `),r(3,"div",2),e(4,` 79 `),r(5,"div",3),e(6,` 80 `),r(7,"div",4),e(8,` 81 `),v(9,xe,124,25),o(),e(10,` 82 `),o(),e(11,` 83 `),o(),e(12,` 84`),o(),e(13,` 85`)),l&2){let n=p();m(9),S(!n.loading&&n.fields?9:-1)}}var se=(()=>{let s=class s{constructor(i,t,a,c){this.siteDataService=i,this.playerService=t,this.route=a,this.formService=c,this.unsubscribe$=new U,this.loading=!0,this.playerDocuments={},this.DocumentTypeID=C,this.showAddressInfo=!0,this.addressFields=["address1","address2","city","state","zip"],this.showMedicalInfo=!0,this.medicalFields=["hasMedicalInsurance","insuranceCompanyName","insurancePolicyHolderName","insuranceGroupNumber","insuranceMemberNumber","insuranceCompanyPhoneNumber","physicianName","physiciansPhoneNumber","hospitalName","proofOfInsuranceDocumentID"],this.showEmergencyContactsInfo=!0,this.emergencyContactsFields=["primaryContactLastName","primaryContactFirstName","primaryContactCellPhone","secondaryContactLastName","secondaryContactFirstName","secondaryContactCellPhone"],this.showSchoolInfo=!0,this.schoolFields=["gradeID","schoolName"]}ngOnInit(){this.route.params.subscribe(i=>{i.id&&i.id!=="new"&&(this.playerService.playerID=+i.id,this.playerID=+i.id,M([this.playerService.getPlayerMissingInformationMetadata(),this.playerService.getPlayer(this.playerID)]).pipe(Y(t=>{this.player=t[1],this.fields=t[0].fields,this.showAddressInfo=!X(this.player),this.showMedicalInfo=!ee(this.player),this.showEmergencyContactsInfo=!Z(this.player),this.setMedicalFieldMetadata()}),T(()=>{let t=[];return this.player.user.userMedicalInfo?.proofOfInsuranceDocumentID&&t.push(this.playerService.getPlayerDocument(this.player.user.userMedicalInfo.proofOfInsuranceDocumentID)),t.length>0?M(t):B(null)}),_(this.unsubscribe$)).subscribe(t=>{t&&t.forEach(a=>{this.playerDocuments[a.documentTypeID]={playerDocument:a}}
85),this.siteDataService.hideSiteLoader(),this.loading=!1}))})}fileUploaded(i,t){this.playerDocuments[i]?this.playerDocuments[i].file=t:this.playerDocuments[i]={file:t}}save(i){i=R(R({},this.player),i);let t=[];Object.keys(this.playerDocuments).forEach(a=>{this.playerDocuments[a].file&&t.push(this.playerService.createPlayerDocument(this.playerDocuments[a].file,+a))}),t.length>0?M(t).pipe(T(a=>(a.forEach(c=>{switch(c.documentTypeID){case C.PLAYER_PHOTO:break;case C.PLAYER_PROOF_OF_AGE:break;case C.PLAYER_PROOF_OF_INSURANCE:i.user.userMedicalInfo||(i.user.userMedicalInfo=new V),i.user.userMedicalInfo.proofOfInsuranceDocumentID=c.playerDocumentID;break}this.playerDocuments[c.documentTypeID]={playerDocument:c}}),this.playerService.savePlayerMissingInformation(i))),_(this.unsubscribe$)).subscribe(a=>{this.formService.hideFormLoader(),this.proofOfInsuranceField&&(this.proofOfInsuranceField.hasFileChanged=!1),this.proofOfAgeField&&(this.proofOfAgeField.hasFileChanged=!1),this.playerService.playerUpdated(i),this.siteDataService.showSiteSuccessAlert("Player information saved successfully")},a=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving your player's information.")}):this.playerService.savePlayerMissingInformation(i).pipe(_(this.unsubscribe$)).subscribe(a=>{this.formService.hideFormLoader(),this.proofOfInsuranceField&&(this.proofOfInsuranceField.hasFileChanged=!1),this.proofOfAgeField&&(this.proofOfAgeField.hasFileChanged=!1),this.playerService.playerUpdated(i),this.siteDataService.showSiteSuccessAlert("Player information saved successfully")},a=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving your player's information.")})}profilePhotoChange(i){this.playerDocuments[C.PLAYER_PHOTO]={file:i}}medicalInsuranceChange(i){this.player.user.userMedicalInfo||(this.player.user.userMedicalInfo=new V),this.player.user.userMedicalInfo.hasMedicalInsurance=i,this.setMedicalFieldMetadata()}filterFields(){this.showAddressInfo||(this.fields=this.fields.filter(i=>!this.addressFields.includes(i.controlName))),this.showEmergencyContactsInfo||(this.fields=this.fields.filter(i=>!this.emergencyContactsFields.includes(i.controlName))),this.showMedicalInfo||(this.fields=this.fields.filter(i=>!this.medicalFields.includes(i.controlName))),this.showSchoolInfo||(this.fields=this.fields.filter(i=>!this.schoolFields.includes(i.controlName)))}setMedicalFieldMetadata(){let i=!1;this.player.user.userMedicalInfo?.hasMedicalInsurance&&(i=!0);let t=Array.from(this.fields);t.forEach(a=>{switch(a.controlName){case"insuranceCompanyName":case"insuranceCompanyPhoneNumber":case"insurancePolicyHolderName":case"insuranceMemberNumber":case"insuranceGroupNumber":case"proofOfInsuranceDocumentID":a.required=i,a.hidden=!i;break;case"hasMedicalInsurance":a.value=this.player.user.userMedicalInfo?.hasMedicalInsurance;break}}),this.fields=Array.from(t)}downloadPlayerDocument(i){this.playerService.downloadPlayerDocument(i).pipe(_(this.unsubscribe$)).subscribe(t=>{J(t)},t=>{this.siteDataService.showSiteErrorAlert("The requested file could not be found.")})}ngOnDestroy(){this.playerService.playerID=void 0,this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(t){return new(t||s)(u(E),u(D),u(b),u(w))},s.\u0275cmp=x({type:s,selectors:[["ng-component"]],viewQuery:function(t,a){if(t&1&&$(he,5)(ye,5),t&2){let c;L(c=q())&&(a.proofOfInsuranceField=c.first),L(c=q())&&(a.proofOfAgeField=c.first)}},standalone:!1,decls:1,vars:1,consts:[["proofOfInsuranceField",""],[1,"main"],[1,"container"],[1,"row"],[1,"col-lg-12"],["formID","player-form","submitButtonText","Save",3,"onSubmit","fields","entity","contentFieldsMode","horizontalForm","showCancelButton","buttonsPosition"],[1,"card"],[1,"col-lg-3","text-center"],[1,"col-lg-9"],["fieldName","firstName","formID","player-form"],["fieldName","lastName","formID","player-form"],["fieldName","dob","formID","player-form"],["fieldName","genderID","formID","player-form"],[1,"card",3,"hidden"],["fieldName","address1","formID","player-form"],["fieldName","address2","formID","player-form"],["fieldName","city","formID","player-form"],["fieldName","state","formID","player-form"],["fieldName","zip","formID","player-form"],["fieldName","primaryContactFirstName"],["fieldName","primaryContactLastName"],["fieldName","primaryContactCellPhone"],["fieldName","secondaryContactFirstName"],["fieldName","secondaryContactLastName"],["fieldName","secondaryContactCellPhone","autoComplete","off"],["fieldName","hasMedicalInsurance",3,"onChange"],["fieldName","insuranceCompanyName",3,"required","hidden"],["fieldName","insuranceCompanyPhoneNumber","autoComplete","off",3,"required","hidden"],["fieldName","insurancePolicyHolderName",3,"required","hidden"],["fieldName","insuranceMemberNumber",3,"required","hidden"],["fieldName","insuranceGroupNumber",3,"required","hidden"],["fieldName","proofOfInsuranceDocumentID",3,"onChange","onFileDownload","required","hidden","selectedFileName"],["fieldName","physicianName"],["fieldName","physiciansPhoneNumber","autoComplete","off"],["fieldName","hospitalName"],["fieldName","schoolName"],["fieldName","gradeID"],["afterSubmitButtonsContent",""],[1,"btn","btn-lg",3,"routerLink"],[1,"fa","fa-home"]],template:function(t,a){t&1&&v(0,ve,14,1),t&2&&S(a.loading?-1:0)},dependencies:[O,P,W],styles:[`#player-form.horizontal-form .profile-image .form-note,#player-form.horizontal-form .profile-image .form-error-message{max-width:100%;padding-left:0} 86`],encapsulation:2});let l=s;return l})();function Se(l,s){l&1&&(e(0,` 87 `),r(1,"p",4),e(2,`We\u2019re sorry you won\u2019t be playing with us! Please take a 88 moment to let us know your reasons for declining so that we can 89 continue to improve our club\u2019s programming and service for all kids and families.`),o(),e(3,` 90 `))}function Ce(l,s){if(l&1){let n=N();e(0,` 91 `),r(1,"app-dynamic-form",5),I("onSubmit",function(t){h(n);let a=p();return y(a.save(t))}),e(2,` 92 `),r(3,"app-dynamic-form-field",6),I("onChange",function(t){h(n);let a=p();return y(a.updateFields(t))}),e(4,` 93 `),o(),e(5,` 94 `),r(6,"app-dynamic-form-field",7),e(7,` 95 `),o(),e(8,` 96 `),o(),e(9,` 97 `)}if(l&2){let n=p();m(),d("fields",n.activeFields)("contentFieldsMode",!0)("horizontalForm",!1)("buttonsPosition","left")("showCancelButton",!1)}}var le=(()=>{let s=class s{constructor(i,t,a,c){this.playerService=i,this.siteDataService=t,this.route=a,this.formService=c}
97ngOnInit(){this.token=this.route.snapshot.params.id,this.playerService.getDeclineInviteMetadata(this.token,null).subscribe({next:i=>{i?(this.fields=i.fields,this.updateFields(null)):this.activeFields=[],this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.hideSiteLoader()}})}updateFields(i){i!==K.Other?this.activeFields=this.fields?.filter(t=>t.controlName!=="declineReasonText"):this.activeFields=this.fields}save(i){this.playerService.declineInviteByToken(this.token,i).subscribe({next:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteSuccessAlert("Invitation declined successfully.")},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem declining invitation.")}})}};s.\u0275fac=function(t){return new(t||s)(u(D),u(E),u(b),u(w))},s.\u0275cmp=x({type:s,selectors:[["ng-component"]],standalone:!1,decls:14,vars:2,consts:[[2,"padding-top","60px"],[1,"container-half"],[1,"text-red","text-header-2"],[1,"card",2,"padding","30px"],[1,"text-medium"],["submitButtonText","Submit","submitButtonText","Decline Invitation",3,"onSubmit","fields","contentFieldsMode","horizontalForm","buttonsPosition","showCancelButton"],["fieldName","declineReasonID",3,"onChange"],["fieldName","declineReasonText","placeholder","Please type reason here"]],template:function(t,a){t&1&&(r(0,"main",0),e(1,` 98 `),r(2,"div",1),e(3,` 99 `),r(4,"h1",2),e(5,"Are you sure that you want to decline this invitation?"),o(),e(6,` 100 `),e(7,` 101 `),r(8,"div",3),e(9,` 102 `),v(10,Se,4,0),v(11,Ce,10,5),o(),e(12,` 103`),o(),e(13,` 104`),o()),t&2&&(m(10),S(a.activeFields!=null&&a.activeFields.length?10:-1),m(),S(a.activeFields?11:-1))},dependencies:[O,P],encapsulation:2});let l=s;return l})();var me=(()=>{let s=class s{};s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=F({type:s}),s.\u0275inj=g({imports:[k.forChild([{path:"",component:ae,children:[{path:":id/missing-information",component:se,canActivate:[j],data:{metaTitle:"Missing Information"}},{path:":id/missing-waivers",component:te,canActivate:[j],data:{bodyClass:"registration",metaTitle:"Missing Waivers"}},{path:":id/decline",component:le},{path:":id",loadChildren:()=>import("./chunk-DL4PAI6I.js").then(i=>i.PlayerModule)},{path:"**",redirectTo:"error/not-found"}]}]),k]});let l=s;return l})();var ci=(()=>{let s=class s{};s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=F({type:s}),s.\u0275inj=g({providers:[D,ne],imports:[ie,me,re]});let l=s;return l})();export{ci as PlayersModule};
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.