1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ad60afea-c941-5577-86c5-e2dfe3f6efcb")}catch(e){}}(); 3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[29922],{67759:function(e,t,s){"use strict";var a=s(27624);t.FU=t.v9=t.B_=t.T_=void 0;var n=new(a(s(76774))).default;t.T_=function(e,t){return n.post("groups/role/upsert",{data:e},t)},t.B_=function(e,t){return n.post("posts/role/upsert",{data:e},t)},t.v9=function(e,t){return n.post("leagues/admin/userAdminRoles/upsert",{data:e},t)},t.FU=function(e,t){return n.get("adminRoles/list",{params:e},t)}},47443:function(e,t,s){var a=s(42118);e.exports=function(e,t){return!!(null==e?0:e.length)&&a(e,t,0)>-1}},1196:function(e){e.exports=function(e,t,s){for(var a=-1,n=null==e?0:e.length;++a<n;)if(s(t,e[a]))return!0;return!1}},42118:function(e,t,s){var a=s(41848),n=s(62722),o=s(42351);e.exports=function(e,t,s){return t==t?o(e,t,s):a(e,n,s)}},62722:function(e){e.exports=function(e){return e!=e}},45652:function(e,t,s){var a=s(88668),n=s(47443),o=s(1196),l=s(74757),i=s(23593),r=s(21814);e.exports=function(e,t,s){var d=-1,u=n,c=e.length,h=!0,m=[],p=m;if(s)h=!1,u=o;else if(c>=200){var g=t?null:i(e);if(g)return r(g);h=!1,u=l,p=new a}else p=t?[]:m;e:for(;++d<c;){var f=e[d],x=t?t(f):f;if(f=s||0!==f?f:0,h&&x==x){for(var _=p.length;_--;)if(p[_]===x)continue e;t&&p.push(x),m.push(f)}
3else u(p,x,s)||(p!==m&&p.push(x),m.push(f))}return m}},23593:function(e,t,s){var a=s(58525),n=s(50308),o=s(21814),l=a&&1/o(new a([,-0]))[1]==1/0?function(e){return new a(e)}:n;e.exports=l},42351:function(e){e.exports=function(e,t,s){for(var a=s-1,n=e.length;++a<n;)if(e[a]===t)return a;return -1}},45578:function(e,t,s){var a=s(67206),n=s(45652);e.exports=function(e,t){return e&&e.length?n(e,a(t,2)):[]}},37922:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/leagues/[leagueSeasonID]/admin/home",function(){return s(63869)}])},63869:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return te}});var a=s(85893),n=s(67294),o=s(11163),l=s.n(o),i=s(41484),r=s(41664),d=s.n(r),u=s(93967),c=s.n(u),h=s(30381),m=s.n(h),p=s(11524),g=s(51329),f=s(96825),x=s(56989),_=s(92444),v=s(66232),b=s(41886),C=s(48452),j=s(2664),y=s(50812),S=s(86153),N=s(68356),D=s(88835),w=s(24211),T=s(56201),R=s(96777),I=s(42254),L=s(86955),P=s.n(L);let{LeagueSeason:{fetchAdminLeagueSeasonStandings:M}}=D.ActionCreators,{LeagueSeason:{getLeagueSeason:A}}=D.Selectors,k=(0,j.$j)((e,t)=>{let s=A(e,t.leagueSeasonID);return{user:e.auth.user,standings:null==s?void 0:s.adminStandings}},{fetchAdminLeagueSeasonStandings:M}),E=(0,i.Zh)(["helpers","league","leagueAdmin"]);class Z extends n.Component{componentDidMount(){this._fetchStandings()}render(){let{standings:e}=this.props,t=[...(null==e?void 0:e.pools)?[...e.pools]:[]].sort((e,t)=>e.title.localeCompare(t.title));t.unshift({id:null,title:this.props.t("leagueAdmin:notInPool")});let s=[];return e&&t.forEach(t=>{let a=e.list.filter(e=>200===e.status&&e.poolID===t.id),n=!0;null===t.id&&(n=a.length>0),n&&s.push({...t,data:a})}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:P().poolManagement,children:[this._renderHeader(),(0,a.jsx)("div",{className:P().content,children:s.map(this._renderItem)}),this._renderFooter()]}),this._renderError()]})}constructor(...e){super(...e),this.state={error:null},this._fetchStandings=()=>{let{leagueSeasonID:e}=this.props;this.props.fetchAdminLeagueSeasonStandings(e)},this._addAllTeamsToPools=async()=>{let{leagueSeasonID:e,user:t,onRefresh:s,t:a}=this.props;0===this._getNumNotInPool()?this.setState({error:{title:a("league:noTeamsToAdd"),body:a("league:allTeamsInPool")}}):(await (0,f.hm)({leagueSeasonID:e},t),this._fetchStandings(),s())},this._getNumNotInPool=()=>this.props.standings?this.props.standings.list.filter(e=>200===e.status&&!e.poolID).length:0,this._onSelectPool=async(e,t)=>{var s;let{user:a,t:n,onRefresh:o}=this.props,l=e.poolTeamID;if(e.poolID!==(null!==(s=null==t?void 0:t.id)&&void 0!==s?s:null))try{t?await (0,f.wq)({poolID:t.id,teamSeasonID:e.teamSeasonID},a):l&&await (0,f.pm)({poolTeamID:l},a),this._fetchStandings(),o()}catch(e){this.setState({error:{title:n("helpers:error"),body:(0,x.prettifyErrorMessage)(n,e,n("leagueAdmin:couldNotMoveTeamBetweenPools"))}})}},this._renderTeamMenu=e=>{var t;let s=null===(t=this.props.standings)||void 0===t?void 0:t.pools,{t:n}=this.props;if(!s){this.setState({error:{title:n("helpers:error"),body:n("league:couldNotLoadPools")}});return}let o=[],l=t=>({type:"item",label:n("leagueAdmin:moveToPool",{poolTitle:t.title}),onClick:()=>this._onSelectPool(e,t)}),i=(e,t)=>e.label.localeCompare(t.label);if(e.poolID){let t=s.filter(t=>t.id!==e.poolID).map(l).sort(i),a={type:"item",label:n("leagueAdmin:removeFromPool"),onClick:()=>this._onSelectPool(e,null)};o.push(...t,a)}else{let e=s.map(l).sort(i);o.push(...e)}return(0,a.jsx)(I.Z,{buttonText:(0,a.jsx)("i",{className:"fa fa-ellipsis-h","aria-label":n("leagueAdmin:managePool")}),buttonClassName:c()("btn btn-xs btn-default",P().dropdown),itemClassName:P().dropdownItem,actions:o})},this._renderTeam=e=>(0,a.jsxs)("div",{className:P().sectionTeam,children:[(0,a.jsx)(R.Z,{teamName:e.name,size:"xs",photoURL:e.photoURL,backgroundColor:e.color}),(0,a.jsx)("span",{children:e.name}),this._renderTeamMenu(e)]},"team-".concat(e.teamSeasonID)),this._renderSectionHeader=(e,t)=>(0,a.jsxs)("div",{className:P().sectionHeader,children:[(0,a.jsx)("span",{className:P().title,children:e}),(0,a.jsx)("span",{className:P().teamSize,children:this.props.t("leagueAdmin:teamCountCapital",{count:t})})]}),this._renderFooter=()=>{let{hideModal:e,t}=this.props;return(0,a.jsxs)("div",{className:P().footer,children:[this._renderFooterActionButton(),(0,a.jsx)("button",{className:"btn btn-default btn-sm",onClick:()=>e(),children:t("helpers:close")})]})},this._renderFooterActionButton=()=>{let e=0===this._getNumNotInPool();return e?null:(0,a.jsx)("div",{children:(0,a.jsx)("button",{className:"btn btn-primary btn-sm",onClick:this._addAllTeamsToPools,disabled:e,children:this.props.t("league:addAllTeamsToPools")})})},this._renderHeader=()=>(0,a.jsx)("div",{className:P().header,children:(0,a.jsx)("h4",{children:this.props.t("league:managePools")})}),this._renderItem=e=>(0,a.jsxs)("div",{className:P().item,children:[this._renderSectionHeader(e.title,e.data.length),e.data.map(this._renderTeam)]},"pool-item-".concat(e.id)),this._renderError=()=>{let{error:e}=this.state;
3return e?(0,a.jsx)("div",{className:P().errorModal,onClick:()=>this.setState({error:null}),children:(0,a.jsxs)("div",{className:P().errorContainer,children:[(0,a.jsx)("i",{className:"fa fa-exclamation-circle"}),(0,a.jsx)("span",{children:e.title}),(0,a.jsx)("span",{children:e.body})]})}):null}}}var F=k(E(Z)),B=s(67759),O=s(48910),U=s(77636),H=s.n(U),Y=s(22839),q=s(28519),G=s(42280),z=s(41219),Q=s(51823),V=s(36545);class K extends n.Component{componentDidMount(){this._updateData()}render(){let{adminRoles:e}=this.props;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:P().adminRoleEditorOuterContainer,children:(0,a.jsx)("div",{className:P().adminRoleEditorInnerContainer,children:(0,a.jsxs)("div",{className:H().modalContainer,children:[this._renderHeader(),(0,a.jsxs)("div",{className:c()(P().adminRoleEditorRoleContainer,H().modalContent),children:[(0,a.jsx)("div",{className:P().editorItem,children:(0,a.jsx)(V.Z,{userProfile:this.props.userToUpdate.userProfile})}),e.map(this._renderRole)]}),this._renderFooter()]})})}),this._renderError()]})}constructor(e){super(e),this._updateData=()=>{let{userToUpdate:e}=this.props,t={};e&&e.userAdminRoles.length&&e.userAdminRoles.forEach(e=>t[e]=!0),this.setState({selected:t})},this._toggleRole=e=>{this.setState({selected:{...this.state.selected,[e.role]:!this.state.selected[e.role]}})},this._onSubmit=async()=>{let{authUser:e,userToUpdate:t,adminRoles:s,groupID:a,postID:n,leagueSeasonID:o,t:l}=this.props,{selected:i}=this.state,r=function(e){let{userAdminRoles:t,adminRoles:s,selected:a}=e,n=[];for(let e of s){let s=e.role,o=t.some(e=>e===s),l=!0===a[s];o!==l&&n.push({role:s,status:l?200:410})}return n}({userAdminRoles:t.userAdminRoles,adminRoles:s,selected:i});if(0===r.length){this.props.onSubmit(null),this.props.onClose();return}this.setState({processing:!0});let d=t.userID;try{for(let t of r)n?await (0,B.B_)({postID:n,granteeUserID:d,...t},e):a?await (0,B.T_)({groupID:a,granteeUserID:d,...t},e):o&&await (0,B.v9)({leagueSeasonID:o,granteeUserID:d,...t},e);let t=s.map(e=>e.role).filter(e=>!!i[e]);this.props.onSubmit({roles:t}),this.props.onClose()}catch(e){this.setState({error:(0,x.prettifyErrorMessage)(l,e,"helpers:updateMemberAdminStatus")})}finally{this.setState({processing:!1})}},this._renderRole=e=>{let{leagueSeasonID:t,groupID:s,postID:n}=this.props,o="";return n?o=e.postLongDescription:s?o=e.groupLongDescription:t&&(o=e.leagueLongDescription),(0,a.jsxs)("div",{className:P().editorItem,children:[(0,a.jsxs)("div",{className:P().details,children:[(0,a.jsx)("label",{children:e.title}),(0,a.jsx)("span",{children:o})]}),(0,a.jsx)(Q.Z,{name:"checkbox-".concat(e.role),type:"checkbox",onChange:()=>this._toggleRole(e),value:!!this.state.selected[e.role],disabled:this.state.processing})]},e.role)},this._renderHeader=()=>{let{userToUpdate:e}=this.props,t=[e&&e.firstName,e&&e.lastName].join(" ");return(0,a.jsx)("div",{className:H().modalHeader,children:t})},this._renderFooter=()=>{let{t:e}=this.props,{processing:t}=this.state;return(0,a.jsxs)("div",{className:H().modalFooter,style:{position:"relative"},children:[(0,a.jsx)("button",{className:"btn btn-default btn-sm",onClick:()=>{this.props.onSubmit(null),this.props.onClose()},children:e("helpers:cancel")}),(0,a.jsx)(z.Z,{className:"btn btn-primary btn-sm",onClick:this._onSubmit,isLoading:t,disabled:t,children:e("helpers:update")})]})},this._renderError=()=>{let{t:e}=this.props,{error:t}=this.state;return t?(0,a.jsx)("div",{className:P().errorModal,onClick:()=>this.setState({error:null}),children:(0,a.jsxs)("div",{className:P().errorContainer,children:[(0,a.jsx)("i",{className:"fa fa-exclamation-circle"}),(0,a.jsx)("span",{children:e("helpers:error")}),(0,a.jsx)("span",{children:t})]})}):null},this.state={selected:{},processing:!1,error:null}}}let{helpers:W}=x.constantModule,{LeagueSeason:{fetchAdminLeagueSeasonUserAdminRoles:X,fetchAdminLeagueSeasonPotentialAdmins:$,updatePotentialAdminRoles:J,clearPotentialAdminRoles:ee}}=D.ActionCreators,{LeagueSeason:{getLeagueSeason:et}}=D.Selectors,es=(0,j.$j)((e,t)=>{let s=et(e,t.leagueSeasonID);return{user:e.auth.user,userAdminRoles:null==s?void 0:s.userAdminRoles,potentialAdmins:null==s?void 0:s.potentialAdmins}},{fetchAdminLeagueSeasonUserAdminRoles:X,fetchAdminLeagueSeasonPotentialAdmins:$,updatePotentialAdminRoles:J,clearPotentialAdminRoles:ee}),ea=(0,i.Zh)(["helpers"]);class en extends n.Component{componentDidMount(){this._fetchUserAdminRoles(),this._fetchRoles()}render(){let{userAdminRoles:e,potentialAdmins:t}=this.props,{query:s}=this.state,n=[];t&&""!==s?n=t.list:e&&(n=e.list);let o=0===n.length;return(0,a.jsxs)("div",{className:c()(P().adminRoles,H().modalContainer),children:[this._renderHeader(),(0,a.jsxs)("div",{className:P().content,children:[this._renderSearchbox(),o?this._renderEmpty(""!==s?"No Users Found":"No Admins Found"):(0,a.jsx)("div",{className:P().userList,children:n.map(this._renderUser)})]}),this._renderFooter()]})}constructor(...e){super(...e),this.state={adminRoles:[],adminRoleProcessing:!1,query:""},this._fetchUserAdminRoles=()=>{let{leagueSeasonID:e}=this.props;this.props.fetchAdminLeagueSeasonUserAdminRoles(e)},this._fetchRoles=async()=>{let{user:e,t}=this.props;try{this.setState({adminRoleProcessing:!0});let s=(await (0,B.FU)({type:"league"},e)).map((e,s)=>W.getAdminRole(t,e.role)||{...e,order:s});this.setState({adminRoles:s,adminRoleProcessing:!1})}catch(e){this.setState({adminRoleProcessing:!1})}},this._fetchPotentialAdmins=()=>{let{leagueSeasonID:e}=this.props,{query:t}=this.state;t&&this.props.fetchAdminLeagueSeasonPotentialAdmins({leagueSeasonID:e,isRefresh:!0,isLoadMore:!1,query:t})},this._onQueryChange=e=>{this._queryTimeout&&clearTimeout(this._queryTimeout),this.setState({query:e}),this._queryTimeout=setTimeout(()=>{this.state.query.trim()===e.trim()&&this._fetchPotentialAdmins()},250)},this._renderUser=e=>{var t,s,n,o;return(0,a.jsx)(eo,{adminUserRecord:e,adminRoles:this.state.adminRoles,groupID:this.props.groupID,leagueSeasonID:this.props.leagueSeasonID,t:this.props.t,onReload:()=>this._fetchUserAdminRoles(),userAdminRolesData:null!==(n=null===(t=this.props.userAdminRoles)||void 0===t?void 0:t.list)&&void 0!==n?n:[],potentialAdminData:null!==(o=null===(s=this.props.potentialAdmins)||void 0===s?void 0:s.list)&&void 0!==o?o:[]})},this._renderEmpty=e=>{var t,s;return null===(null!==(s=null===(t=this.props.userAdminRoles)||void 0===t?void 0:t.receivedAt)&&void 0!==s?s:null)?null:(0,a.jsx)("div",{className:P().noAdmin,children:e})},this._renderHeader=()=>(0,a.jsx)("div",{className:H().modalHeader,children:"Add/Edit Admins"}),this._renderSearchbox=()=>{let{t:e}=this.props,{query:t}=this.state;return(0,a.jsx)("div",{className:P().searchBox,children:(0,a.jsx)(O.Z,{query:t,searching:!1,onSearch:()=>{},onQueryChange:this._onQueryChange,t:e,name:"searchStaff",placeholder:"Search by name to add/edit admin roles",border:!0})})},this._renderFooter=()=>{let{t:e,hideModal:t}=this.props;return(0,a.jsx)("div",{className:H().modalFooter,children:(0,a.jsx)("button",{className:"btn btn-default btn-sm",onClick:t,children:e("helpers:cancel")})})}}}function eo(e){let t=(0,C.Qy)(e=>
3e.auth.user),s=(0,C.u5)(),[o,l]=(0,n.useState)(!1),i=0===e.adminUserRecord.roles.length?e.t("helpers:add"):e.t("helpers:edit");async function r(){l(!0);try{let n=await (0,q.Nr)({userID:e.adminUserRecord.userID,groupID:e.groupID},t),o=await function(n){var o,l;let i=null!==(o=e.userAdminRolesData.find(e=>{let{userID:t}=e;return t===n.id}))&&void 0!==o?o:e.potentialAdminData.find(e=>{let{userID:t}=e;return t===n.id}),r=null!==(l=null==i?void 0:i.roles)&&void 0!==l?l:[];return new Promise(o=>{s((0,S.Ll)({showCloseButton:!1,shouldCloseOnOverlayClick:!1,onRequestClose:()=>{o(null),s((0,S.GZ)())},content:(0,a.jsx)(K,{adminRoles:e.adminRoles,userToUpdate:{userID:n.id,firstName:n.firstName,lastName:n.lastName,userAdminRoles:r,userProfile:n},leagueSeasonID:e.leagueSeasonID,onClose:()=>s((0,S.GZ)()),onSubmit:o,authUser:t,t:e.t})}))})}(n);if(!o){l(!1);return}s(J({leagueSeasonID:e.leagueSeasonID,roles:o.roles,userID:e.adminUserRecord.userID})),e.onReload()}catch(e){s((0,S.b0)((0,x.prettifyErrorMessage)(Y.t,e)))}finally{l(!1)}}return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:P().adminUserProfile,children:[(0,a.jsxs)(d(),{href:"/users/".concat(e.adminUserRecord.userID),target:"_blank",className:P().userItem,children:[(0,a.jsx)(G.Z,{quality:"low",user:e.adminUserRecord,style:{width:45,height:45,borderRadius:25}}),(0,a.jsxs)("div",{className:P().details,children:[(0,a.jsx)("span",{children:e.t("helpers:fullName",{firstName:e.adminUserRecord.firstName,lastName:e.adminUserRecord.lastName})}),(0,a.jsx)("div",{className:P().roles,children:e.adminUserRecord.roles.map(t=>{var s;let n=e.adminRoles.find(e=>e.role===t);return n?(0,a.jsx)("div",{className:P().badge,title:null!==(s=n.title)&&void 0!==s?s:void 0,children:n.title},"".concat(e.adminUserRecord.userID,"-").concat(n.title)):null})})]})]}),(0,a.jsx)(z.Z,{className:"btn btn-primary btn-xs",onClick:r,isLoading:o,disabled:o,children:i})]})})}var el=es(ea(en)),ei=s(21513);class er extends n.Component{render(){let{loading:e,matches:t}=this.props;return 0!==t.length||e?(0,a.jsx)("div",{className:c()(P().events),children:t.map(this._renderEvent)}):null}constructor(...e){super(...e),this.state={expandedMap:{}},this._getMatchStaffList=e=>{let t=[];return e&&e.forEach(e=>{let s=t.findIndex(t=>t.id===e.user.id);-1===s?t.push({id:e.user.id,firstName:e.user.firstName,lastName:e.user.lastName,roles:[e.staffPosition.title]}):t[s].roles.push(e.staffPosition.title)}),t},this._handleCalendarDetailClick=e=>{let t={...this.state.expandedMap};t[e]=!t[e],this.setState({expandedMap:t})},this._renderMatchStaffDetails=e=>{var t;let s=this._getMatchStaffList(null!==(t=e.staffAssignments)&&void 0!==t?t:void 0);return 0===s.length?null:(0,a.jsxs)("div",{className:P().staff,children:[(0,a.jsx)("label",{children:"Staff:"}),null==s?void 0:s.map(e=>(0,a.jsxs)("div",{className:P().staffItem,children:[(0,a.jsxs)(d(),{href:"/users/".concat(e.id),style:{fontWeight:600},children:[e.firstName," ",e.lastName]}),(0,a.jsx)("div",{className:P().roles,children:e.roles.map(t=>(0,a.jsx)("span",{className:P().role,children:t},"".concat(e.id,"-").concat(t)))})]},"details-staff-".concat(e.id)))]})},this._renderEventDetails=e=>{var t,s;let n="Misc.";return"round-robin"===e.scheduleType?n="Round Robin":"knockout"===e.scheduleType&&(n="Elimination"),(0,a.jsxs)("div",{className:P().details,children:[(0,a.jsxs)("div",{className:P().location,children:[(0,a.jsx)("label",{children:"Location:"}),(0,a.jsx)("span",{children:null!==(t=e.facility.title)&&void 0!==t?t:"No Facility"}),!!e.resource&&(0,a.jsx)("span",{children:null!==(s=e.resource.name)&&void 0!==s?s:""})]}),(0,a.jsxs)("div",{className:P().location,children:[(0,a.jsx)("label",{children:"Schedule:"}),(0,a.jsx)("span",{children:n})]}),this._renderMatchStaffDetails(e)]})},this._renderEvent=e=>{let{leagueSeasonID:t}=this.props,{expandedMap:s}=this.state,{title:n,time:o}=(0,v.Dw)(e),l="/leagues/".concat(t,"/admin/matches/").concat(e.id,"/details"),i=!!s[e.id];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:P().eventItem,children:[(0,a.jsxs)(d(),{href:l,title:"Open match",children:[(0,a.jsx)("span",{className:P().title,children:n}),(0,a.jsx)("span",{className:P().time,children:o})]}),(0,a.jsx)("button",{className:c()("btn btn-default btn-xs",i&&P().expanded),onClick:()=>this._handleCalendarDetailClick(e.id),children:(0,a.jsx)("i",{className:"fa fa-caret-down"})})]},"match-event-".concat(e.id)),i&&this._renderEventDetails(e)]})}}}var ed=s(8334);class eu extends n.Component{render(){let{hasPools:e,teams:t,loading:s}=this.props;if(s)return(0,a.jsx)(ed.Z,{});if(0===t.length)return(0,a.jsx)("div",{className:c()(P().teamsList,P().noTeams),children:"No Teams"});if(!e)return(0,a.jsx)("div",{className:P().teamsList,children:t.map(this._renderTeam)});let n=[],o=!1;
3if(t.forEach(e=>{let t=n.findIndex(t=>t.id===e.poolID);if(-1===t){var s;o=!0,n.push({id:e.poolID,title:null!==(s=e.poolTitle)&&void 0!==s?s:"Not in pool",teams:[e]})}else n[t].teams.push(e)}),n.sort((e,t)=>e.title.localeCompare(t.title)),o){let e=n.findIndex(e=>null===e.id);-1!==e&&([n[0],n[e]]=[n[e],n[0]])}return(0,a.jsx)("div",{className:P().teamsList,children:n.map(e=>(0,a.jsxs)("div",{className:P().poolTeams,children:[(0,a.jsx)("span",{className:P().poolHeader,children:e.title}),e.teams.map(this._renderTeam)]},"team-list-pool-".concat(e.id)))})}constructor(...e){super(...e),this._renderTeam=e=>{var t,s;let{leagueSeasonID:n,messageCaptain:o,t:l}=this.props,i="/leagues/".concat(n,"/admin/team/").concat(e.teamSeasonID,"/details"),r=null!==(s=null===(t=e.captains)||void 0===t?void 0:t.length)&&void 0!==s?s:0;return(0,a.jsxs)("div",{className:P().teamItem,children:[(0,a.jsxs)(d(),{href:i,target:"_blank",children:[(0,a.jsx)(R.Z,{teamName:e.name,size:"xxs-md",photoURL:e.photoURL,backgroundColor:e.color}),(0,a.jsxs)("span",{className:P().teamName,children:[e.name,(0,a.jsx)("span",{children:l("league:numPlayer",{count:e.numPlayers})})]})]}),r>0&&(0,a.jsx)("button",{className:"btn btn-default btn-xs",title:l(1===r?"leagueMatchList:messageSingleCaptain":"leagueMatchList:messageAllCaptains"),onClick:()=>o(e),children:(0,a.jsx)("i",{className:"fa fa-commenting"})})]},"team-".concat(e.teamSeasonID))}}}var ec=s(95714),eh=s(89382),em=s(99717);function ep(e){var t;let{t:s}=(0,i.$G)(["helpers"]),n=(0,C.u5)(),o=null!==(t=e.validateInput)&&void 0!==t?t:{minLength:4,maxLength:500};return e.children({handlePress:function(){for(var t=arguments.length,l=Array(t),i=0;i<t;i++)l[i]=arguments[i];let r=e.getSubmitFn(...l);if(!r)return;let d=[{text:s("helpers:cancel"),onPress:()=>{n((0,S.GZ)())}},[{text:e.submitText,onPress:()=>{r({notify:!1}),n((0,S.GZ)())}},{text:e.submitText+" & Notify",onPressWithText:e=>{r({notify:!0,reason:e}),n((0,S.GZ)())}}]],u=(0,a.jsx)(em.Z,{hideOnOptionClick:!1,maxRows:10,validateInput:o,title:e.title,body:e.body,placeholder:s("helpers:minMaxCharacter",o),options:d});n((0,S.Ll)({content:u}))}})}let eg={showModal:y.K4,hideModal:y.VG},ef=(0,j.$j)(null,eg);class ex extends n.Component{render(){let{schedules:e}=this.props;return(0,a.jsxs)("div",{className:c()(P().manageSchedule,P().card,P().dashboardFunctionList),children:[(0,a.jsxs)("h5",{className:P().header,children:[(0,a.jsx)("i",{className:"fa fa-calendar-o"}),"Manage Schedules",this._renderAddSchedulesButton()]}),e.map(this._renderScheduleButtons),this._renderCreateButtons()]})}constructor(...e){super(...e),this._goDuplicateSchedule=e=>{let{leagueSeason:t}=this.props;"v2"===e.scheduleType?ec.Z.push({pathname:"/leagues/".concat(t.id,"/admin/schedules/new"),query:{scheduleID:e.id}}):ec.Z.push({pathname:"/leagues/admin/round-robin-setup",query:{scheduleID:e.id,leagueSeasonID:t.id,groupID:t.groupID,mode:"duplicate"}})},this._goDeleteSchedule=async e=>{let{t,user:s,onRefresh:a}=this.props,n="Delete ".concat(e.title);if(await this._renderConfirmationModal(n,"Are you sure you want to delete this schedule? This will NOT send a notification to players, because the schedule is unpublished"))try{await (0,f.fd)({scheduleID:e.id},s),a()}catch(e){this.props.showModal({modalType:y.Qi.Alert,modalProps:{type:"ERROR",body:(0,x.prettifyErrorMessage)(t,e)}})}},this._goSetupRoundRobin=()=>{let{leagueSeason:e}=this.props;ec.Z.push({pathname:"/leagues/admin/round-robin-setup",query:{leagueSeasonID:e.id,groupID:e.groupID,mode:"new"}})},this._goSetupElimination=()=>{let{leagueSeason:e}=this.props;ec.Z.push({pathname:"/leagues/admin/elimination-setup",query:{leagueSeasonID:e.id,groupID:e.groupID,mode:"new"}})},this._goEditSchedule=e=>{let{leagueSeason:t}=this.props;if("v2"===e.scheduleType){ec.Z.push({pathname:"/leagues/".concat(t.id,"/admin/schedules/").concat(e.id,"/edit")});return}let s="round-robin"===e.scheduleType?"round-robin-setup":"elimination-setup";ec.Z.push({pathname:"/leagues/admin/".concat(s),query:{leagueSeasonID:t.id,groupID:t.groupID,mode:"edit",scheduleID:e.id}})},this._getPublishSchedule=e=>{let{onRefresh:t,user:s,t:a}=this.props,{published:n}=e;return async o=>{try{await (0,f.bj)({scheduleID:e.id,published:!n,...o},s),t()}catch(e){this._renderErrorModal((0,x.prettifyErrorMessage)(a,e,"Could not publish/unpublish the schedule at this time, please try again later"))}}},this._renderErrorModal=e=>{this.props.showModal({modalType:y.Qi.Alert,modalProps:{type:"ERROR",body:e}})},this._goFinalizeSchedule=e=>{let{leagueSeason:t}=this.props;if("v2"===e.scheduleType){ec.Z.push({pathname:"/leagues/".concat(t.id,"/admin/schedules/").concat(e.id,"/finalize")});return}ec.Z.push({pathname:"/leagues/".concat(t.id,"/admin/schedules/").concat(e.id,"/finalize-legacy")})},this._renderActionButton=e=>(0,a.jsxs)("button",{className:"btn btn-default btn-sm",onClick:e.onPress,"data-testid":e.testID,children:[(0,a.jsx)("i",{className:e.icon}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:e.text}),(0,a.jsx)("span",{className:P().subText,children:e.subText})]})]}),this._renderScheduleButtons=e=>{let t;let{leagueSeason:s}=this.props,{scheduleType:n,published:o,title:l,endDate:i,startDate:r}=e,d=s.timeZone,u=()=>this._goEditSchedule(e),c=function(e){if(!e.scheduleType)return null;if("round-robin"===e.scheduleType){var t;return(null===(t=e.params)||void 0===t?void 0:t.source)==="csv"?"round-robin":(0,v.G7)(e.params)?"round-robin":null}return"knockout"===e.scheduleType?(0,v.fC)(e.params)?"placeholder-elimination":(0,v.qg)(e.params)?"elimination":null:"v2"===e.scheduleType&&(0,v.Tr)(e.params)?"v2":null}(e),h=[],m=()=>{h.push(this._renderActionButton({text:"Edit",icon:"fa fa-pencil-square-o",testID:"edit-schedule-btn",onPress:u}))},p=()=>{h.push((0,a.jsx)(ep,{getSubmitFn:this._getPublishSchedule,title:"Publish ".concat(e.title),body:"Are you sure you want to publish this
3schedule? You can choose to send a notification to players, along with an optional message, or publish the schedule without a notification. Publishing the schedule will make all the matches in this schedule visible for all players.",submitText:"Publish",validateInput:{minLength:0,maxLength:500},children:t=>{let{handlePress:s}=t;return this._renderActionButton({text:"Publish",icon:"fa fa-send",onPress:()=>s(e)})}}))},g=()=>{let t="Unpublish ".concat(e.title);h.push((0,a.jsx)(ep,{getSubmitFn:this._getPublishSchedule,title:t,body:"Are you sure you want to unpublish this schedule? You can choose to notify players of this change, along with an optional message, or unpublish the schedule without a notification. Unpublishing the schedule will hide all the matches in this schedule for all players.",submitText:"Unpublish",validateInput:{minLength:0,maxLength:500},children:t=>{let{handlePress:s}=t;return this._renderActionButton({text:"Unpublish",icon:"fa fa-eye-slash",onPress:()=>s(e)})}}))},f=()=>{h.push(this._renderActionButton({text:"Duplicate",icon:"fa fa-files-o",testID:"duplicate-schedule-btn",onPress:()=>this._goDuplicateSchedule(e)}))},_=()=>{h.push(this._renderActionButton({text:"Finalize",icon:"fa fa-check",onPress:()=>this._goFinalizeSchedule(e)}))},b=()=>{h.push(this._renderActionButton({text:"Delete",icon:"fa fa-trash-o",onPress:()=>this._goDeleteSchedule(e)}))};if(null!==c||o){if("v2"===c){var C;(null===(C=e.params)||void 0===C?void 0:C.teamSeasonMode)==="placeholder"?(_(),t={text:"Placeholder",color:"#777"}):t={text:o?"Published":"Unpublished",color:o?"#67a468":"#f0ad4e"},o?g():(p(),m()),f(),b()}else"placeholder-elimination"===c?(_(),o?o&&(g(),t={text:"Published",color:"#67a468"}):(p(),m(),t={text:"Placeholder",color:"#777"}),b()):o&&null!==c?(f(),g(),t={text:"Published",color:"#67a468"}):null===c||o||(p(),m(),"round-robin"===c&&f(),b(),t={text:"Unpublished",color:"#f0ad4e"})}else(()=>{h.push(this._renderActionButton({text:"Setup",icon:"fa fa-cogs",onPress:u,testID:"round-robin"===n?"round-robin-setup-btn":void 0}))})(),b(),t={text:"None",color:"#777"};return t?(0,a.jsxs)("div",{className:P().scheduleBtnContainer,children:[(0,a.jsxs)("div",{className:"py-2 px-4 flex justify-between items-center gap-1",children:[(0,a.jsx)("b",{className:"text-[15px] text-[#2a3746]",children:l}),(0,a.jsx)("div",{className:"flex gap-2",children:(0,a.jsx)("span",{className:"text-[13px] rounded px-[4px] py-[2px] h-fit text-center",style:{color:t.color,border:"1px solid ".concat(t.color)},children:t.text})})]}),(0,a.jsxs)("div",{className:P().scheduleDetail,children:[(0,a.jsx)("span",{children:"Start Date: "}),(0,a.jsx)("span",{children:(0,x.prettifyDateTimeTZ)(r,d,"MMM D")}),(0,a.jsx)("span",{children:"End Date: "}),(0,a.jsx)("span",{children:(0,x.prettifyDateTimeTZ)(i,d,"MMM D")})]}),(0,a.jsx)("div",{className:P().actionBtnContainer,style:{flexWrap:"wrap"},children:h})]}):null},this._renderConfirmationModal=(e,t)=>{let{t:s}=this.props;return new Promise(a=>{let n=[{text:s("helpers:no"),onPress:()=>{this.props.hideModal(),a(!1)}},{text:s("helpers:yes"),onPress:()=>{this.props.hideModal(),a(!0)}}];this.props.showModal({modalType:y.Qi.Custom,modalProps:{shouldCloseOnOverlayClick:!1,showCloseButton:!1,CustomComponent:eh.Z,isFullScreen:!0,props:{hideModal:this.props.hideModal,title:e,body:t,options:n}}})})},this._renderCreateButtons=()=>{let{schedules:e}=this.props,t=e.some(e=>"round-robin"===e.scheduleType),s=e.some(e=>"knockout"===e.scheduleType),n=e.some(e=>"v2"===e.scheduleType);return(0,a.jsxs)("div",{className:P().buttonContainer,style:{marginTop:"0px"},children:[!t&&!n&&(0,a.jsxs)("button",{className:"btn btn-default btn-sm",onClick:this._goSetupRoundRobin,"data-testid":"round-robin-setup-btn",children:[(0,a.jsx)("i",{className:"fa fa-gears",style:{height:"20px",width:"20px"}}),(0,a.jsx)("span",{children:"Create Round Robin Schedule"})]}),!s&&!n&&(0,a.jsxs)("button",{className:"btn btn-default btn-sm",onClick:this._goSetupElimination,children:[(0,a.jsx)("i",{className:"fa fa-gears",style:{height:"20px",width:"20px"}}),(0,a.jsx)("span",{children:"Create Elimination Schedule"})]}),this.props.scheduleTemplatesEnabled&&!n&&(0,a.jsxs)("button",{className:"btn btn-default btn-sm",onClick:this._goSetupCustomSchedule,children:[(0,a.jsx)("i",{className:"fa fa-gears",style:{height:"20px",width:"20px"}}),(0,a.jsx)("span",{children:"Create Custom Schedule"})]})]})},this._goSetupCustomSchedule=()=>{let{leagueSeason:e}=this.props;ec.Z.push({pathname:"/leagues/".concat(e.id,"/admin/schedules/new")})},this._renderAddSchedulesButton=()=>{let{schedules:e}=this.props;if(0===e.length)return null;let t=[{type:"item",label:"Create Round Robin Schedule",onClick:this._goSetupRoundRobin},{type:"item",label:"Create Elimination Schedule",onClick:this._goSetupElimination}];return this.props.scheduleTemplatesEnabled&&t.push({type:"item",label:"Create Custom Schedule",onClick:this._goSetupCustomSchedule}),(0,a.jsx)(I.Z,{buttonText:(0,a.jsx)("i",{className:"fa fa-plus","aria-label":"Add Schedule"}),buttonClassName:c()("btn btn-xs btn-default",P().dropdown),itemClassName:P().dropdownItem,actions:t})}}}var e_=ef(ex);class ev extends n.Component{render(){return(0,a.jsx)("div",{className:P().contentContainer,children:(0,a.jsxs)("div",{className:c()(P().summaryContent,P().num),children:[(0,a.jsx)("div",{className:P().single,children:this._renderTotalTeamMembers()}),(0,a.jsxs)("div",{className:P().double,children:[this._renderTotalTeams(),this._renderTotalFreeAgents()]})]})})}constructor(...e){super(...e),this._renderTotalTeamMembers=()=>{let{teamPlayers:e,leagueSeasonID:t}=this.props;return(0,a.jsxs)(d(),{href:"/leagues/".concat(t,"/admin/reports/teamSeasonMembers"),target:"_blank",title:"Go to players report",children:[(0,a.jsx)("h5",{children:"Total Team Members"}),(0,a.jsx)("span",{children:e})]})},this._renderTotalTeams=()=>{let{leagueSeasonID:e,teams:t}=this.props;return(0,a.jsxs)(d(),{href:"/leagues/".concat(e,"/admin/reports/teamSeasonPayments"),target:"_blank",title:"Go to transactions report",children:[(0,a.jsx)("h5",{children:"Teams"}),(0,a.jsx)("span",{children:t})]})},this._renderTotalFreeAgents=()=>{let{leagueSeasonID:e,freeAgents:t}=this.props;return(0,a.jsxs)(d(),{href:"/leagues/".concat(e,"/admin/reports/teamSeasonMembers"),target:"_blank",title:"Go to players report",children:[(0,a.jsx)("h5",{children:"Free Agents"}),(0,a.jsx)("span",{children:t})]})}}}class eb extends n.Component{render(){return(0,a.jsx)("div",{className:P().contentContainer,children:(0,a.jsxs)("div",{className:P().summaryContent,children:[(0,a.jsx)("div",{className:P().single,children:this._renderProjected()}),(0,a.jsxs)("div",{className:P().double,children:[this._renderPaid(),this._renderOutstanding()]})]})})}constructor(...e){super(...e),this._renderProjected=()=>{let{leagueSeasonID:e,overviewData:t,t:s,currency:n}=this.props,o="-";return t&&(o=(0,x.prettifyPrice)(s,t.amountProjectedInCents/100,n,!0,!0)),(0,a.jsxs)(d(),{href:"/leagues/".concat(e,"/admin/reports/teamSeasonPayments"),target:"_blank",title:"Go to transaction report",children:[(0,a.jsxs)("h5",{title:"Projected = expected revenue from registrations",children:["Projected",(0,a.jsx)("i",{className:"fa fa-info-circle"})]}),(0,a.jsx)("span",{children:o})]})},this._renderPaid=()=>{let{leagueSeasonID:e,overviewData:t,t:s,currency:n}=this.props,o="-";return t&&(o=(0,x.prettifyPrice)(s,t.amountPaidInCents/100,n,!0,!0)),(0,a.jsxs)(d(),{href:"/leagues/".concat(e,"/admin/reports/teamSeasonPayments"),target:"_blank",title:"Go to transactions report",children:[(0,a.jsx)("h5",{children:"Paid"}),(0,a.jsx)("span",{children:o})]})},this._renderOutstanding=()=>{let{leagueSeasonID:e,overviewData:t,t:s,currency:n}=this.props,o="-";return t&&(o=(0,x.prettifyPrice)(s,t.amountRefundedInCents/100,n,!0,!0)),(0,a.jsxs)(d(),{href:"/leagues/".concat(e,"/admin/reports/teamSeasonPayments"),target:"_blank",title:"Go to transactions report",children:[(0,a.jsx)("h5",{children:"Refunded"}),(0,a.jsx)("span",{className:P().red,children:o})]})}}}var eC=s(86763),ej=s(17196),ey=s(42143),eS=s(67742);function eN(e){let{t,ticketClasses:s,id:n,isTournament:o,timeZone:l}=e,i=(0,C.u5)();if(!s)return null;let r=s.filter(e=>"team"===e.data.mode),d=s.filter(e=>"free-agent"===e.data.mode),u=async e=>{let s=eC.default.wwwURL;o?s+="tournaments/":s+="leagues/",s+=n+"/info?code="+e;try{await (0,ej.vQ)(s),i((0,ey.CF)({message:t("helpers:copiedToClipboard")}))}catch(e){}},h=(s,n)=>(0,a.jsxs)("div",{children:[(0,a.jsx)("h6",{children:"team"===n?"Team Registration":"Free-Agent Registration"}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:s.map(s=>{let{id:n,title:o,price:i,quantityTotal:r,quantitySold:d,salesEnd:h,salesStart:m,code:p,currency:g,data:f,depositMode:_,depositInCents:v}=s,b=m&&h&&(0,x.prettifyDateRangeTZ)(m,h,l),{displayPrice:C,description:j,depositDesc:y}=(0,x.prettifyLeagueTicketPriceFormat)(t,{data:f,price:i,depositInCents:v,depositMode:_}),S="team"===f.mode;return(0,a.jsxs)("div",{className:"flex flex-col gap-2 border border-solid border-[#ddd] rounded-[3px] p-3",children:[(0,a.jsxs)("div",{className:"flex flex-row justify-between items-center text-[14px]",children:[(0,a.jsx)("b",{className:"text-[#2a3746]",children:o}),(0,a.jsx)("span",{children:t("league:quantitySoldOverTotal",{quantitySold:d,quantityTotal:null!=r?r:"â"})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 text-[14px]",children:[(0,a.jsxs)("span",{className:"flex flex-row gap-2 items-center",children:[(0,a.jsx)("i",{className:"fa fa-calendar-o"}),b]}),(0,a.jsxs)("span",{className:"flex flex-row gap-1 items-center",children:[(0,a.jsx)("i",{className:"fa fa-ticket"}),0===i?t("helpers:freePrice"):(0,x.prettifyPriceShort)(t,C,g),0!==i&&(0,a.jsxs)("span",{children:[y,S&&(0,a.jsxs)("span",{children:[" (",j,")"]})]})]}),p&&(0,a.jsxs)("div",{className:"flex flex-row gap-2 items-center",children:[(0,a.jsx)("i",{className:"fa fa-eye-slash"}),(0,a.jsx)("span",{children:"Secret"}),(0,a.jsxs)("button",{type:"button",onClick:()=>u(p),className:c()("btn btn-xs btn-default flex flex-row items-center gap-2"),title:t("league:copyLink"),children:[(0,a.jsx)("i",{className:"fa fa-copy"}),(0,a.jsx)("span",{className:"text-[12px]",children:"Copy Link"})]})]})]}),s.priceRanges&&s.priceRanges.length>0&&(0,a.jsx)(eS.Z,{priceRanges:s.priceRanges,price:i,joinTeamEnd:e.joinTeamEnd,currency:g,timeZone:l,salesStart:m||""})]},n)})})]});return(0,a.jsxs)("div",{className:P().card,children:[(0,a.jsxs)("h5",{className:"mb-4 flex flex-row gap-4 text-[#2a3746]",children:[(0,a.jsx)("i",{className:"fa fa-ticket"}),t("league:registrationOptions")]}),(0,a.jsxs)("div",{className:P().buttonContainer,children:[r.length>0&&h(r,"team"),d.length>0&&h(d,"free-agent")]})]})}var eD=s(35599),ew=s(4547),eT=s.n(ew);let eR=new D.ApiClient;function eI(e){let t="https://embed.opensports.net/",s="iframe/leagues/".concat(e.view,"?leagueSeasonID=").concat(e.leagueSeasonID,"&key=").concat(e.key);return'<a class="os-iframe-link" href="'.concat(t+s,'"></a><script src="').concat(t,'dist/iframe.min.js"></script>')}function eL(e){let{isTournament:t,leagueSeasonID:s,groupID:o,user:l,hideModal:r}=e,{t:d}=(0,i.$G)(["invite","helpers","league"]),u=(0,C.u5)(),[h,m]=(0,n.use
3State)(null),p=t?d("league:tournament"):d("league:league"),g=null;h&&(g=eI({leagueSeasonID:s,key:h,view:"standings"}));let f=null;function _(e){e.target.select()}h&&(f=eI({leagueSeasonID:s,key:h,view:"schedules"}));let v=e=>async()=>{try{(0,ej.vQ)(e),u((0,ey.CF)({message:d("helpers:copiedToClipboard")}))}catch(e){u((0,ey.CF)({message:d("helpers:copyToClipboardFailed")}))}};return(0,n.useEffect)(()=>{(async function(){try{var e;let t=await eR.get("publishableKeys/list",{params:{groupID:o}},l),s=null==t?void 0:null===(e=t[0])||void 0===e?void 0:e.publishableKey;if(!s){let{publishableKey:e}=await eR.post("publishableKeys/insert",{data:{groupID:o}},l);s=e}m(s)}catch(e){u((0,y.K4)({modalType:y.Qi.Alert,modalProps:{type:"ERROR",body:(0,x.prettifyErrorMessage)(d,e)}}))}})()},[o,l,u,d]),(0,a.jsxs)("div",{className:c()(H().modalContainer,H().addTeamModalContainer),children:[(0,a.jsxs)("div",{className:H().modalHeader,children:[d("invite:embed")," ",p]}),(0,a.jsxs)("div",{className:c()(H().modalContent,H().embedCode),children:[!h&&(0,a.jsx)("div",{className:eT().containerL,children:(0,a.jsx)(ed.Z,{})}),!!g&&!!f&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:d("invite:copyAndPasteCode")}),(0,a.jsxs)("div",{className:H().embedContainer,children:[(0,a.jsx)("h5",{children:d("league:standings")}),(0,a.jsxs)("div",{className:H().embedForm,children:[(0,a.jsx)("input",{className:"form-control",value:g,readOnly:!0,onFocus:_}),(0,a.jsx)("button",{type:"button",className:"btn btn-primary",onClick:v(g),children:d("helpers:copyToClipboard")})]})]}),(0,a.jsxs)("div",{className:H().embedContainer,children:[(0,a.jsx)("h5",{children:"Schedules"}),(0,a.jsxs)("div",{className:H().embedForm,children:[(0,a.jsx)("input",{className:"form-control",value:f,readOnly:!0,onFocus:_}),(0,a.jsx)("button",{type:"button",className:"btn btn-primary",onClick:v(f),children:d("helpers:copyToClipboard")})]})]}),h&&!eC.default.isProduction&&(0,a.jsxs)("div",{className:H().embedContainer,children:[(0,a.jsx)("h5",{children:"Publishable Key"}),(0,a.jsxs)("div",{className:H().embedForm,children:[(0,a.jsx)("input",{className:"form-control",value:h,readOnly:!0,onFocus:_}),(0,a.jsx)("button",{type:"button",className:"btn btn-primary",onClick:v(h),children:d("helpers:copyToClipboard")})]})]})]})]}),(0,a.jsx)("div",{className:H().modalFooter,children:(0,a.jsx)("button",{className:"btn btn-sm btn-default",onClick:r,children:d("helpers:cancel")})})]})}var eP=s(71508),eM=s(28945),eA=s.n(eM),ek=s(71892),eE=s.n(ek);function eZ(e){let t=(0,C.u5)(),{t:s,url:o,title:l,hideModal:i}=e,r=function(e,t){let s=e.includes("?")?"&":"?";return e+s+new URLSearchParams(t).toString()}(o,{utm_source:"qr_code"}),d=(0,n.useCallback)(()=>{let e=document.querySelector(".".concat(eE().qrContainer," canvas"));if(e){let t=document.createElement("a"),s=l.replace(/[<>:"/\\|?*]+/g,"").replace(/\s+/g,"_").replace(/_+/g,"_").slice(0,50);t.href=e.toDataURL("image/png"),t.download="".concat(s,"_qrcode.png"),t.click()}},[l]),u=(0,n.useCallback)(()=>{let e=document.querySelector(".".concat(eE().qrContainer," canvas"));e&&e.toBlob(async e=>{if(e)try{let a=new ClipboardItem({"image/png":e});await navigator.clipboard.write([a]),t((0,ey.CF)({message:s("helpers:copiedToClipboard")}))}catch(e){t((0,ey.CF)({message:s("helpers:copyToClipboardFailed")}))}})},[t,s]);return(0,a.jsxs)("div",{className:c()(H().modalContainer,H().qrCodeModalContainer),children:[(0,a.jsx)("div",{className:H().modalHeader,children:s("helpers:qrCode")}),(0,a.jsx)("div",{className:H().modalContent,children:(0,a.jsxs)("div",{className:"flex flex-col items-center w-full mb-4",children:[(0,a.jsx)("div",{className:eE().qrContainer,children:(0,a.jsx)(eP.Qd,{size:1024,value:r})}),(0,a.jsx)("button",{className:c()("btn btn-primary btn-sm mt-4 rounded-md text-white",eA().primary),type:"button",onClick:u,children:s("helpers:copyToClipboard")})]})}),(0,a.jsxs)("div",{className:H().modalFooter,children:[(0,a.jsx)("button",{className:c()("btn btn-default btn-sm",eA().default),type:"button",onClick:i,children:s("helpers:cancel")}),(0,a.jsx)("button",{className:c()("btn btn-primary btn-sm",eA().primary),type:"button",onClick:d,children:s("helpers:download")})]})]})}var eF=s(25286),eB=s(60509),eO=s(12229),eU=s(32496),eH=s(43167);let{LeagueSeason:{fetchAdminLeagueSeasonTeamSeasons:eY,fetchAdminLeagueSeasonSchedules:eq,fetchLeagueAdminDashboard:eG}}=D.ActionCreators,{LeagueSeason:{getLeagueSeason:ez}}=D.Selectors;function eQ(e){var t,s,o,l,r,d,u;let{t:h}=(0,i.$G)(["helpers","league"]),p=(0,C.u5)(),g=(0,C.Qy)(e=>e.auth.user),{leagueSeasonID:_}=e,v=(0,C.Qy)(e=>{var t;return null===(t=ez(e,_))||void 0===t?void 0:t.adminTeamSeasons}),b=(0,C.Qy)(e=>{var t;return null===(t=ez(e,_))||void 0===t?void 0:t.adminSchedules}),j=(0,C.Qy)(e=>{var t;return null===(t=ez(e,_))||void 0===t?void 0:t.dashboard});(0,n.useEffect)(()=>{p(eY(_)),p(eq(_))},[p,_]);
3let[y,N]=(0,n.useState)(null),[D,w]=(0,n.useState)(null),[T,R]=(0,n.useState)(null),[I,L]=(0,n.useState)(!1),[P,M]=(0,n.useState)(!1),A=m()().startOf("day").add(1,"day"),[k,E]=(0,n.useState)(A.toDate()),[Z,F]=(0,n.useState)(m()(A).add(1,"month").toDate()),B=[{value:-1,label:"Select team",disabled:!0},...null!==(r=null==v?void 0:null===(t=v.list)||void 0===t?void 0:t.map(e=>({value:e.teamSeasonID,label:e.name})).sort((e,t)=>e.label.localeCompare(t.label)))&&void 0!==r?r:[]],O=[{value:-1,label:"Select schedule",disabled:!0},...null!==(d=null==b?void 0:null===(s=b.list)||void 0===s?void 0:s.map(e=>({value:e.id,label:e.title})).sort((e,t)=>e.label.localeCompare(t.label)))&&void 0!==d?d:[]];return(0,a.jsxs)("div",{className:c()(H().modalContainer,H().swapSchedulesModalContainer),children:[(0,a.jsx)("div",{className:H().modalHeader,children:h("league:swapTeamSchedules")}),(0,a.jsxs)("div",{className:H().modalContent,children:[(0,a.jsx)("div",{style:{border:"1px solid #ddd",backgroundColor:"white",padding:"14px",fontSize:"16px",marginBottom:"14px",borderRadius:"4px"},children:"Swap the schedules of two teams. By default, all the selected teams' matches without results will be swapped. However, you can choose to only swap matches that are part of a specific schedule and/or matches that start within a given date range."}),(0,a.jsx)(Q.Z,{label:"Team 1",type:"select",value:null!=y?y:-1,options:B.filter(e=>e.value!==D),onChange:e=>N(e)}),(0,a.jsx)(Q.Z,{label:"Team 2",type:"select",value:null!=D?D:-1,options:B.filter(e=>e.value!==y),onChange:e=>w(e)}),(0,a.jsx)(Q.Z,{label:"Swap Matches In",type:"select",value:null!=T?T:-1,options:O,onChange:e=>R("-1"===e?null:e)}),(0,a.jsx)(Q.Z,{name:"useCustomDates",label:"Swap Matches Starting in Date Range",type:"checkbox",value:I,onChange:e=>{L(e)}}),I&&(0,a.jsx)(eH.Z,{t:h,type:"datetime",name:"minMaxScheduledStart",start:k,end:Z,timeZone:null!==(u=null==j?void 0:null===(l=j.details)||void 0===l?void 0:null===(o=l.league)||void 0===o?void 0:o.timeZone)&&void 0!==u?u:m().tz.guess(),startLabel:h("helpers:start"),endLabel:h("helpers:end"),onChange:e=>{e.start&&e.end&&(E(e.start),F(e.end))}})]}),(0,a.jsx)("div",{className:H().modalFooter,children:(0,a.jsx)(eB.Z,{submitText:"Swap",getSubmitFn:function(){return y&&D?I&&k>Z?(p((0,S.Ll)({showCloseButton:!0,content:(0,a.jsx)(eU.Z,{type:"ERROR",body:"Swap start date must be before swap end date."})})),null):T?async e=>{M(!0);try{await (0,f.GQ)({leagueSeasonID:_,teamSeasonIDs:[y,D],minScheduledStart:I?k.toISOString():null,maxScheduledStart:I?Z.toISOString():null,scheduleID:T,...e},g),M(!1),p(eG(_));let t=[{text:h("helpers:ok"),onPress:()=>p((0,S.j_)())}];p((0,S.Ll)({showCloseButton:!1,content:(0,a.jsx)(eh.Z,{title:"Success",body:"Schedules swapped successfully. Tap OK to go back and see the updated schedules.",options:t})}))}catch(t){M(!1);let e=(0,x.prettifyErrorMessage)(h,t,"Could not swap team schedules.");p((0,S.Ll)({showCloseButton:!0,content:(0,a.jsx)(eU.Z,{type:"ERROR",body:e})}))}}:(p((0,S.Ll)({showCloseButton:!0,content:(0,a.jsx)(eU.Z,{type:"ERROR",body:"You must select a schedule"})})),null):(p((0,S.Ll)({showCloseButton:!0,content:(0,a.jsx)(eU.Z,{type:"ERROR",body:"You must select two teams to swap."})})),null)},title:"Swap Team Schedules",body:"Enter the message you send will be sent to the teams being swapped, as well as any of their opponents. If none of the affected matches are published, then no notification will be sent to any teams.",children:e=>(0,a.jsx)(eO.Z,{handleSubmitAndNotify:e.handleSubmitAndNotify,handleSubmit:e.handleSubmit,handleCancel:()=>p((0,S.GZ)()),submitText:"Swap",enableNotify:!0,processing:P})})})]})}var eV=s(62662),eK=s(10168),eW=s(93446),eX=s(74611);let{LeagueSeason:{fetchLeagueAdminDashboard:e$,fetchAdminLeagueSeasonSchedules:eJ,fetchAdminLeagueSeasonMatches:e0},GroupDetail:{fetchGroupFacilitiesResources:e1}}=D.ActionCreators,{LeagueSeason:{getLeagueSeason:e2}}=D.Selectors,e4=["common","helpers","league","group","leagueMatchList"],e5=(0,j.$j)((e,t)=>{var s,a,n,o;let{router:{query:{leagueSeasonID:l}}}=t,i=e2(e,l),r=null==i?void 0:i.dashboard,d=null!==(n=null==r?void 0:null===(s=r.details)||void 0===s?void 0:s.league.timeZone)&&void 0!==n?n:"America/Toronto",u=e.groupDetail.list.find(e=>
3e.details.id===(null==i?void 0:i.adminDetails.groupID)),c=(null==u?void 0:u.facilityResources)?{...null==u?void 0:u.facilityResources}:void 0;if(c){let e=c.list.filter(e=>null!==e.resources);c={...c,list:e}}return{user:e.auth.user,dashboard:r,matches:null==i?void 0:i.adminMatches,schedules:null==i?void 0:i.adminSchedules,timeZone:d,facilityResources:c,groupID:null==i?void 0:i.adminDetails.groupID,currentAdminRoles:null!==(o=null==i?void 0:null===(a=i.currentUserAdminRoles)||void 0===a?void 0:a.list)&&void 0!==o?o:[]}},e=>({dispatch:e,...(0,N.DE)({fetchLeagueAdminDashboard:e$,fetchAdminLeagueSeasonSchedules:eJ,fetchAdminLeagueSeasonMatches:e0,showModal:y.K4,hideModal:y.VG,pushModal:S.Ll,fetchGroupFacilitiesResources:e1},e)})),e6=(0,i.Zh)(e4),e8=(0,g.s)("Home");class e9 extends n.Component{static getInitialProps(){return{namespacesRequired:e4}}componentDidMount(){this._fetchLeagueAdminDashboard(),this._fetchOverviewData(),this._fetchMatchDates()}render(){var e;let{dashboard:t,currentAdminRoles:s}=this.props,n=(0,_.D)({title:this.props.t("helpers:home")});if("number"!=typeof(null==t?void 0:t.receivedAt)||!(null==t?void 0:t.details))return(0,a.jsx)("div",{className:P().spinner,style:{margin:"auto"},children:(0,a.jsx)(ed.Z,{height:100})});let o=(0,f.X3)(s,["group_admin"]),l=(0,f.X3)(s,["group_admin","league_manager"]);return(0,a.jsxs)("div",{className:P().dashboard,children:[n,this._renderHeader(),(0,a.jsxs)("div",{className:c()(P().content,!l&&P().notAdmin),children:[(0,a.jsxs)("div",{className:c()(P().firstRow,!o&&P().onlyRowGap),children:[(0,a.jsxs)("div",{className:c()(P().firstRowNested,P().summary),children:[o&&this._renderLeagueRevenueSummary(),o&&this._renderLeagueMemberSummary()]}),(0,a.jsxs)("div",{className:P().firstRowNested,children:[this._renderCalendar(),this._renderTeamSummary()]})]}),l&&(0,a.jsxs)("div",{className:P().secondRow,children:[(0,a.jsx)(e7,{groupID:null!==(e=this.props.groupID)&&void 0!==e?e:null,children:e=>this._renderAdminFunctions(e)}),this._renderManageSchedule(),this._renderTicketClasses()]})]})]})}constructor(e){super(e),this._fetchLeagueAdminDashboard=async()=>{var e,t,s;let{router:{query:{leagueSeasonID:a}}}=this.props;if(!a)return;await this.props.fetchLeagueAdminDashboard(a);let n=null===(s=this.props)||void 0===s?void 0:null===(t=s.dashboard)||void 0===t?void 0:null===(e=t.details)||void 0===e?void 0:e.league.groupID;n&&await this.props.fetchGroupFacilitiesResources(n),this.props.fetchAdminLeagueSeasonSchedules(a)},this._fetchMatchDates=async()=>{let{data:{leagueSeasonID:e},user:t,t:s,timeZone:a}=this.props;this.setState({isLoadingMatchDates:!0});try{let s=await (0,f.sN)({leagueSeasonID:e},t),n=(0,v.Gu)(s,a),o=m()().tz(a).startOf("day");if(n.includes(o.toISOString())){let e=o.toISOString(),t=o.add(1,"day").toISOString();this._fetchLeagueSeasonMatches(e,t)}this.setState({isLoadingMatchDates:!1,matchDates:n,rawMatchDates:s})}catch(e){this._renderErrorModal((0,x.prettifyErrorMessage)(s,e)),this.setState({isLoadingMatchDates:!1})}},this._fetchOverviewData=async()=>{let{data:{leagueSeasonID:e},user:t,t:s,currentAdminRoles:a}=this.props;if((0,f.X3)(a,["group_admin"]))try{let s=await (0,f.XQ)({leagueSeasonID:e,minDateCreated:void 0,maxDateCreated:void 0},t);this.setState({overviewData:s})}catch(e){this._renderErrorModal((0,x.prettifyErrorMessage)(s,e))}},this._fetchLeagueSeasonMatches=(e,t)=>{let{data:{leagueSeasonID:s}}=this.props;this.props.fetchAdminLeagueSeasonMatches({leagueSeasonID:s,isRefresh:!1,isLoadMore:!1,filter:{showUnpublished:!0,limit:null,inclusiveStart:e,inclusiveEnd:t}})},this._onCalendarDateChange=e=>{let{timeZone:t}=this.props,s=m().tz(e,t).startOf("day").toISOString(),a=m().tz(e,t).endOf("day").toISOString();this._fetchLeagueSeasonMatches(s,a),this.setState({selectedDate:e})},this._messageCaptain=e=>{let{groupID:t}=this.props;if(!e.captains||0===e.captains.length){this._renderErrorModal(this.props.t("common:teamHasNoCaptain"));return}if(!t)return;if(1===e.captains.length){var s,a;(0,eV.BR)({users:[{id:e.captains[0].userID,firstName:null!==(s=e.captains[0].firstName)&&void 0!==s?s:"",lastName:null!==(a=e.captains[0].lastName)&&void 0!==a?a:""}],groupID:t});return}let n=e.captains.map(e=>{var t,s;return{id:e.userID,firstName:null!==(t=e.firstName)&&void 0!==t?t:"",lastName:null!==(s=e.lastName)&&void 0!==s?s:""}});(0,eV.BR)({users:n,groupID:t})},this._onAddTeamSuccess=e=>{let{t,dashboard:s}=this.props,a=t((null==s?void 0:s.details.league.isTournament)?"league:tournament":"league:league"),n=null==s?void 0:s.details.league.collectTeamSeasonName;this.props.showModal({modalType:y.Qi.Alert,modalProps:{type:"SUCCESS",body:t("leagueMatchList:addTeamSuccess",{team:n?e.name:t("helpers:team"),leagueType:a})}}),this._fetchLeagueAdminDashboard()},this._onAddTeam=()=>{var e,t;let{t:s,user:a,data:{leagueSeasonID:n},dashboard:o}=this.props,l=null==o?void 0:o.details.league;if(!l){this._renderErrorModal(s("common:failedToOpenAddTeamModal"));return}this.props.showModal({modalType:y.Qi.Custom,modalProps:{showCloseButton:!0,shouldCloseOnOverlayClick:!1,isFullScreen:!0,CustomComponent:T.Z,props:{t:s,user:a,onSuccess:this._onAddTeamSuccess,leagueSeasonID:n,isTournament:l.isTournament,ticketClasses:null!==(t=l.ticketClasses)&&void 0!==t?t:[],collectTeamSeasonName:l.collectTeamSeasonName,onePlayerTeams:(null===(e=l.teamRegistrationConstraints)||void 0===e?void 0:e.maxTeamRegistrations)===1,isESports:l.isESports}}})},this._onAddPlayer=()=>{let{data:{leagueSeasonID:e}}=this.props,t={leagueSeasonID:e,onSuccess:this._onAddPlayerSuccess};this.props.showModal({modalType:y.Qi.Custom,modalProps:{showCloseButton:!0,shouldCloseOnOverlayClick:!1,isFullScreen:!0,CustomComponent:eF.Z,props:t}})},this._onAddPlayerSuccess=e=>{let{t,dashboard:s}=this.props,a=t((null==s?void 0:s.details.league.isTournament)?"league:tournament":"league:league");this.props.showModal({modalType:y.Qi.Alert,modalProps:{type:"SUCCESS",body:t("leagueMatchList:addPlayerSuccess",{name:t("helpers:fullName",e),leagueType:a})}})},this._onAddMatch=()=>{var e;let{user:t,t:s,dashboard:n,data:{leagueSeasonID:o},timeZone:l,facilityResources:i}=this.props,r=null==n?void 0:n.details.league,d=null==n?void 0:n.details.teams;if(!r)return;if(!i){this._renderErrorModal(s("common:noFacilitiesAddFirst"));return}if(!d){this._renderErrorModal(s("common:noTeamsInLeague"));return}let u=d.map(e=>({...e,pool:e.poolID&&"string"==typeof e.poolTitle?{id:e.poolID,title:e.poolTitle}:null})),c=u.some(e=>e.pool&&e.pool.title);this.props.pushModal({isFullScreen:!0,shouldCloseOnOverlayClick:!1,showCloseButton:!0,content:(0,a.jsx)(w.Z,{groupID:r.groupID,leagueSeasonID:o,isTournament:r.isTournament,leagueTeams:u,facilityResources:null!==(e=i.list)&&void 0!==e?e:[],timeZone:l,t:s,user:t,onRefresh:()=>{},scheduleID:null,hasPools:c,isMisc:!0,isPublished:!1})})},this._goGroupFacilities=()=>{let{dashboard:e}=this.props;if(!e||!e.details)return;let{groupAliasID:t}=e.details.league;l().push({pathname:"/".concat(t,"/admin/settings/facilities")})},this._goManagePools=()=>{let{dashboard:e,t,data:{leagueSeasonID:s}}=this.props;if(!e||!e.details)return;let a={t,leagueSeasonID:s,hideModal:y.VG,onRefresh:this._fetchLeagueAdminDashboard};this.props.showModal({modalType:y.Qi.Custom,modalProps:{showCloseButton:!0,shouldCloseOnOverlayClick:!1,isFullScreen:!0,CustomComponent:F,props:a}})},this._goSwapSchedules=()=>{let{data:{leagueSeasonID:e}}=this.props;this.props.pushModal({showCloseButton:!0,content:(0,a.jsx)(eQ,{leagueSeasonID:e})})},this._goUserAdminRoles=()=>{let{dashboard:e,t}=this.props;if(!e||!e.details)return;let{id:s,groupID:a}=e.details.league,n={t,hideModal:y.VG,leagueSeasonID:s,groupID:a};this.props.showModal({modalType:y.Qi.Custom,modalProps:{showCloseButton:!0,shouldCloseOnOverlayClick:!1,isFullScreen:!0,CustomComponent:el,props:n}})},this._openQRCodeModal=()=>{var e;let{t,dashboard:s}=this.props,a=null==s?void 0:null===(e=s.details)||void 0===e?void 0:e.league;if(!(null==a?void 0:a.id))return;let n="".concat("https://opensports.net/","leagues/").concat(a.id,"/info");this.props.showModal({modalType:y.Qi.Custom,modalProps:{showCloseButton:!0,shouldCloseOnOverlayClick:!1,isFullScreen:!0,CustomComponent:eZ,props:{t,url:n,title:a.title}}})},this._openEmbedCodeModal=async()=>{let{user:e,data:{leagueSeasonID:t},dashboard:s}=this.props;this.props.showModal({modalType:y.Qi.Custom,modalProps:{showCloseButton:!0,shouldCloseOnOverlayClick:!1,isFullScreen:!0,CustomComponent:eL,props:{user:e,leagueSeasonID:t,groupID:null==s?void 0:s.details.league.groupID,isTournament:null==s?void 0:s.details.league.isTournament}}})},this._removeLeagueSeason=async()=>{let{dashboard:e,data:{leagueSeasonID:t},dispatch:s,t:a,user:n}=this.props;if(!e||!e.details)return;let o=a(e.details.league.isTournament?"league:tournament":"league:league"),i=o.toLowerCase();try{if(!await (0,S.SR)(a,s,{title:a("common:deleteType",{type:o}),body:a("common:deleteTypeConfirmation",{title:e.details.league.title}),confirmationText:a("common:deleteTypeConfirmationText",{type:i}),buttonText:a("helpers:confirm")}))return;await (0,b._i)({leagueSeasonID:t},n),l().replace("/".concat(e.details.league.groupAliasID,"/admin/leagues/ongoing"))}catch(e){this._renderErrorModal((0,x.prettifyErrorMessage)(a,e,a("common:unableToDeleteType",{type:i})))}},this._renderErrorModal=e=>{this.props.showModal({modalType:y.Qi.Alert,modalProps:{type:"ERROR",body:e}})},this._renderAdminFunctions=e=>{var t;let{dashboard:s,router:{query:{leagueSeasonID:n}},currentAdminRoles:o}=this.props,i=(0,f.X3)(o,["group_admin"]),r=(0,f.X3)(o,["league_manager","group_admin"]),d=(0,f.X3)(o,["league_manager","group_admin"],"group");if(!(null==s?void 0:null===(t=s.details)||void 0===t?void 0:t.teams))return null;let u=[],h=s.details.teams.length,{league:m}=s.details,p=s.details.league.isTournament?this.props.t("league:tournament"):this.props.t("league:league"),g=this.props.t("common:manageType",{type:p});r||(g=p),d&&u.push({icon:"fa fa-building",text:this.props.t("league:facilities"),onPress:this._goGroupFacilities,testID:"admin-functions-facilities"}),r&&h&&s.details.league.hasPools&&u.push({icon:"fa fa-users",text:this.props.t("league:managePools"),onPress:this._goManagePools,testID:"admin-functions-pools"}),r&&h>2&&u.push({icon:"fa fa-exchange",text:this.props.t("league:swapTeamSchedules"),onPress:this._goSwapSchedules,testID:"admin-functions-swap-schedules"});
3let x=["silverwood","ssia-los-cabos","northeast-florida-soccer","southeast-florida-soccer","treasure-coast-soccer","basl-youth-soccer"].includes(s.details.league.groupAliasID);return r&&(u.push({icon:"fa fa-sliders",text:this.props.t("helpers:adminRoles"),onPress:this._goUserAdminRoles,testID:"admin-functions-adminRoles"},{icon:"fa fa-plus",text:this.props.t("league:addMatch"),onPress:this._onAddMatch,testID:"admin-functions-add-match"},{icon:"fa fa-user-circle-o",text:this.props.t("league:addTeam"),onPress:this._onAddTeam,testID:"admin-functions-add-team"},{icon:"fa fa-plus-circle",text:this.props.t("common:addMultipleTeams"),onPress:()=>l().push("/leagues/".concat(n,"/admin/add-teams")),testID:"admin-functions-add-multiple-team"},{icon:"fa fa-user-plus",text:this.props.t("league:addPlayer"),onPress:this._onAddPlayer,testID:"admin-functions-add-player"}),x&&u.push({icon:"fa fa-users",text:this.props.t("common:addMultiplePlayers"),onPress:()=>l().push("/leagues/".concat(n,"/admin/add-players")),testID:"admin-functions-add-multiple-players"})),i&&e.includes("leagueDelegatedRegistration")&&u.push({icon:"fa fa-money",text:"Register Member",onPress:()=>l().push("/leagues/".concat(n,"/admin/add-delegated")),testID:"admin-function-delegated"}),d&&(u.push({icon:"fa fa-repeat",text:this.props.t("helpers:repeat"),onPress:()=>l().push("/leagues/admin/new?groupID=".concat(m.groupID,"&leagueSeasonID=").concat(n)),testID:"admin-functions-repeat"}),e.includes("leagueBulkCharge")&&u.push({icon:"fa fa-money",text:this.props.t("common:bulkChargeTeams"),onPress:()=>l().push("/leagues/".concat(n,"/admin/bulk-charge")),testID:"admin-functions-bulk-charge"})),i&&(u.push({icon:"fa fa-code",text:this.props.t("common:embedOnWebsite"),onPress:this._openEmbedCodeModal,testID:"admin-function-embed"}),u.push({icon:"fa fa-qrcode",text:this.props.t("common:viewQrCode"),onPress:this._openQRCodeModal,testID:"admin-function-view-qr-code"})),r&&u.push({icon:"fa fa-trash-o",text:this.props.t("helpers:delete"),onPress:this._removeLeagueSeason,testID:"admin-function-delete"}),(0,a.jsx)("div",{className:c()(P().card,P().adminFunctions),children:(0,a.jsx)(ei.Z,{header:{title:g,icon:"fa fa-tasks"},actionButtons:u})})},this._renderFooter=(e,t)=>(0,a.jsxs)(d(),{href:t,className:P().footer,children:[(0,a.jsx)("i",{className:"fa fa-arrow-right"}),e]}),this._renderCalendar=()=>{var e,t;let{matches:s,timeZone:n,data:{leagueSeasonID:o}}=this.props,l=this.props.t("common:goToCalendar"),i="/leagues/".concat(o,"/admin/calendar?date=").concat(this.state.selectedDate);return(0,a.jsxs)("div",{className:c()(P().card,P().calendar),children:[(0,a.jsx)("div",{style:{padding:16},children:(0,a.jsx)(eX.Z,{selectedYMD:this.state.selectedDate,dateYMDPairs:this.state.rawMatchDates.map(e=>[e,"filled"]),timeZone:n,onSelectedYMDChange:this._onCalendarDateChange})}),(0,a.jsx)(er,{matches:null!==(e=null==s?void 0:s.list)&&void 0!==e?e:[],loading:null===(t=null==s?void 0:s.loading)||void 0===t||t,leagueSeasonID:o}
3),this._renderFooter(l,i)]})},this._renderHeader=()=>(0,a.jsx)(eD.Z,{headerTitle:this.props.t("helpers:home")}),this._renderTeamSummary=()=>{var e,t,s,n;let{t:o,dashboard:l,data:{leagueSeasonID:i},currentAdminRoles:r}=this.props,d=(0,f.X3)(r,["group_admin","league_manager"]);return(0,a.jsxs)("div",{className:c()(P().card,P().teamSummary),children:[(0,a.jsx)("div",{className:P().header,children:(0,a.jsxs)("h5",{children:[(0,a.jsx)("i",{className:"fa fa-users"}),o("league:teams")]})}),(0,a.jsx)("div",{className:P().teamSummaryContent,children:(0,a.jsx)(eu,{messageCaptain:this._messageCaptain,leagueSeasonID:i,teams:null!==(t=null==l?void 0:null===(e=l.details)||void 0===e?void 0:e.teams)&&void 0!==t?t:[],loading:null===(s=null==l?void 0:l.loading)||void 0===s||s,hasPools:null!==(n=null==l?void 0:l.details.league.hasPools)&&void 0!==n&&n,t:o})}),d&&this._renderFooter(o("common:goToTeams"),"/leagues/".concat(i,"/admin/teams/active"))]})},this._renderLeagueRevenueSummary=()=>{let{dashboard:e,data:{leagueSeasonID:t},t:s}=this.props,{overviewData:n}=this.state,o=null==e?void 0:e.details.league.currency;return(0,a.jsxs)("div",{className:c()(P().leagueSummary,P().card),children:[(0,a.jsxs)("h5",{className:P().header,children:[(0,a.jsx)("i",{className:"fa fa-bar-chart"}),s("common:revenueSummary")]}),o?(0,a.jsx)(eb,{t:s,leagueSeasonID:t,overviewData:n,currency:o}):(0,a.jsx)(ed.Z,{}),this._renderFooter(s("common:goToTransactionsReport"),"/leagues/".concat(t,"/admin/reports/teamSeasonPayments"))]})},this._renderLeagueMemberSummary=()=>{var e,t,s,n;let{dashboard:o,data:{leagueSeasonID:l}}=this.props,i=null==o?void 0:null===(e=o.details)||void 0===e?void 0:e.league,r=null!==(t=null==i?void 0:i.registrations.teamPlayers)&&void 0!==t?t:0,d=null!==(s=null==i?void 0:i.registrations.freeAgents)&&void 0!==s?s:0,u=null!==(n=null==i?void 0:i.registrations.teams)&&void 0!==n?n:0;return(0,a.jsxs)("div",{className:c()(P().leagueSummary,P().card),children:[(0,a.jsxs)("h5",{className:P().header,children:[(0,a.jsx)("i",{className:"fa fa-area-chart"}),this.props.t("common:registrationSummary")]}),(0,a.jsx)(ev,{teamPlayers:r,freeAgents:d,teams:u,leagueSeasonID:l}),this._renderFooter(this.props.t("common:goToPlayersReport"),"/leagues/".concat(l,"/admin/reports/teamSeasonMembers"))]})},this._renderManageSchedule=()=>{var e,t,s;let{dashboard:n,t:o,user:l}=this.props,i=null==n?void 0:n.details.league,r=null!==(t=null===(e=this.props.schedules)||void 0===e?void 0:e.list)&&void 0!==t?t:[],d=null==n?void 0:n.details.teams;return i&&d?(0,a.jsx)(e7,{groupID:null!==(s=this.props.groupID)&&void 0!==s?s:null,children:e=>(0,a.jsx)(e_,{leagueSeason:i,teams:d,schedules:r,t:o,user:l,onRefresh:this._fetchLeagueAdminDashboard,scheduleTemplatesEnabled:e.includes("scheduleTemplates")})}):null},this._renderTicketClasses=()=>{var e;let{dashboard:t,data:s,t:n}=this.props,o=null==t?void 0:t.details.league,l=null==o?void 0:o.ticketClasses;if(!o||!l||!l.length)return null;let i=s.leagueSeasonID,r=null==o?void 0:o.groupID;return(0,a.jsxs)("div",{className:c()(P().leagueSummary,P().card),children:[(0,a.jsx)(eN,{ticketClasses:l,t:n,id:s.leagueSeasonID,isTournament:o.isTournament,joinTeamEnd:o.joinTeamEnd,timeZone:null!==(e=null==o?void 0:o.timeZone)&&void 0!==e?e:"America/Toronto"}),this._renderFooter(n("common:goToRegistrationOptions"),"/leagues/".concat(i,"/admin/edit?groupID=").concat(r,"#registration-options"))]})},this.state={isLoadingMatchDates:!0,rawMatchDates:[],matchDates:[],selectedDate:m()().tz(e.timeZone).format("YYYY-MM-DD"),overviewData:null}}}let e3=e5(e6(e9)),e7=e=>{var t,s,o;let l=(0,C.u5)(),i=(0,eK.V)((0,n.useCallback)(async()=>e.groupID?l((0,eW.fetchOneGroup)({id:e.groupID})):null,[l,e.groupID]));return(0,a.jsx)(a.Fragment,{children:e.children(null!==(o=null===(s=i.data)||void 0===s?void 0:null===(t=s.metadata)||void 0===t?void 0:t.features)&&void 0!==o?o:[])})};var te=(0,p.cA)(e8(e3))},48910:function(e,t,s){"use strict";s.d(t,{Z:function(){return c}});var a=s(85893),n=s(67294),o=s(93967),l=s.n(o),i=s(41219),r=s(90330),d=s.n(r);let u="searchBoxInput";class c extends n.PureComponent{render(){var e,t;let{query:s,defaultValue:n,searching:o,t:r,name:c=u,border:h=!1,containerClassName:m}=this.props,p=this.props.placeholder||r("helpers:searchByName");return(0,a.jsxs)("form",{className:null!=m?m:d().searchBox,onSubmit:this._onSubmit,children:[(0,a.jsx)(i.Z,{type:"submit",isLoading:o,spinnerColor:"#aaa",customClass:d().searchIcon,timeout:0,children:(0,a.jsx)("i",{className:"fa fa-search","aria-hidden":"true"})}),(0,a.jsx)("input",{ref:this._inputRef,name:c,type:"text",value:s,defaultValue:n,placeholder:p,className:l()("form-control",h&&d().inputBorder),onChange:this._onChange}),(0,a.jsx)("button",{className:l()({[d().hide]:!(null===(t=this._inputRef)||void 0===t?void 0:null===(e=t.current)||void 0===e?void 0:e.value),[d().clearBtn]:!0}),type:"button",onClick:this._clear,name:"search",children:(0,a.jsx)("i",{className:"fa fa-times-circle","aria-hidden":"true"})})]})}constructor(e){super(e),this._clear=()=>{var e;this.props.onQueryChange(""),this.props.onSearch(""),(null===(e=this._inputRef)||void 0===e?void 0:e.current)&&(this._inputRef.current.value="")},this._onChange=e=>this.props.onQueryChange(e.target.value),this._onSubmit=e=>{var t,s;e.preventDefault();let a=null===(t=e.target[null!==(s=this.props.name)&&void 0!==s?s:u])||void 0===t?void 0:t.value;this.props.onSearch(a)},this._inputRef=n.createRef()}}},36545:function(e,t,s){"use strict";s.d(t,{Z:function(){return o}});var a=s(85893);s(67294);var n=s(56989);function o(e){let{userProfile:t}=e,s=t.email&&(0,a.jsxs)("p",{children:["Email: ",(0,a.jsx)("b",{children:t.email})]}),o=(0,a.jsxs)("p",{children:["Authenticates with:"," ",t.userAccounts.map((e,s)=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("b",{children:(0,n.capitalizeFirstLetter)(e.accountType)},s),s<t.userAccounts.length-1&&","]}))]});return(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{children:[(0,a.jsxs)("a",{rel:"noreferrer",target:"_blank",href:"/user-dashboard/".concat(t.id,"/orders"),children:[t.firstName," ",t.lastName]})," ","signed up on ",(0,a.jsx)("b",{children:(0,n.prettifyDateToNow)(t.dateCreated)}),"."]}),s,o]})}},43167:function(e,t,s){"use strict";s.d(t,{Z:function(){return d}});var a=s(85893);s(67294);var n=s(80008),o=s.n(n),l=s(51823),i=s(11298),r=s.n(i);function d(e){let{start:t,end:s,timeZone:n,startLabel:i,endLabel:d,max:u,maxSpan:c,pushEndDateBy:
3h,hideLabel:m,name:p,type:g,format:f,containerClassName:x,dateClassName:_,renderBetweenInputs:v,additionalStartProps:b={},additionalEndProps:C={},description:j}=e,{startSpan:y,endSpan:S}=function(e){let{start:t,min:s,max:a,maxSpan:n}=e,l=t||void 0,i=a||void 0;if(n&&t){let e=o()(t).add(n.value,n.unit);i=a&&o()(a)<e?a:e.toDate()}return{startSpan:{min:s,max:a},endSpan:{min:l,max:i}}}(e);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:null!=x?x:r().defaultContainer,children:[(0,a.jsx)(l.Z,{name:p?p+"Start":"start",label:i,type:g,value:t,min:y.min,max:y.max,timeZone:n,onChange:t=>{if(!t){e.onChange({start:t,end:s,timeZone:n});return}let a={start:t,end:s,timeZone:n};if(u&&t>u&&(a.start=u),(!s||s<a.start)&&(h?a.end=o()(t).add(h.value,h.unit).toDate():a.end=a.start),c){let e=o()(a.start).add(c.value,c.unit).toDate();if(a.end&&a.end>e){var l;a.end=new Date(Math.min(e.getTime(),null!==(l=null==u?void 0:u.getTime())&&void 0!==l?l:1/0))}}e.onChange(a)},time:"dateCalendar"!==g,format:f,className:null!=_?_:r().defaultDate,hideLabel:m,...b}),v&&v(),(0,a.jsx)(l.Z,{name:p?p+"End":"end",label:d,type:g,value:s,max:S.max,min:S.min,timeZone:n,onChange:s=>{e.onChange({end:s,start:t,timeZone:n})},time:"dateCalendar"!==g,format:f,className:null!=_?_:r().defaultDate,hideLabel:m,...C})]}),j&&(0,a.jsx)("p",{className:r().description,children:j})]})}},35599:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});var a=s(85893);s(67294);var n=s(93967),o=s.n(n),l=s(52737),i=s.n(l);function r(e){let{headerTitle:t,hideHeader:s,isTabbed:n}=e;return(0,a.jsxs)("div",{className:n?i().headerWithTabs:o()(i().header,s&&i().hideHeader),children:[(0,a.jsx)("h4",{children:t}),e.children]})}},21513:function(e,t,s){"use strict";s.d(t,{Z:function(){return i}});var a=s(85893),n=s(67294),o=s(86955),l=s.n(o);class i extends n.Component{render(){let{header:e}=this.props;return(0,a.jsxs)("div",{className:l().dashboardFunctionList,children:[(0,a.jsxs)("h5",{children:[(0,a.jsx)("i",{className:e.icon}),e.title]}),this._renderButtonContainer()]})}constructor(...e){super(...e),this._renderButtonContainer=()=>{let{actionButtons:e}=this.props;return(0,a.jsx)("div",{className:l().buttonContainer,children:e.map(e=>{var t;return(0,a.jsxs)("button",{className:"btn btn-default btn-sm",onClick:e.onPress,"data-testid":null!==(t=e.testID)&&void 0!==t?t:void 0,children:[(0,a.jsx)("i",{className:e.icon}),(0,a.jsxs)("div",{children:[e.text,e.subText&&(0,a.jsx)("span",{children:e.subText})]})]},"function-list-".concat(e.text))})})}}}},74611:function(e,t,s){"use strict";s.d(t,{Z:function(){return g}});var a=s(85893);s(67294);var n=s(30381),o=s.n(n),l=s(96827),i=s(93967),r=s.n(i),d=s(6021),u=s(66232);let c=(0,l.Zt)(o()),h="#".concat(d.Dp),m={backgroundColor:h,color:"white"},p={backgroundColor:"".concat(d.uP,"33"),color:h};function g(e){let t=o().tz(e.timeZone),s=(0,u.G_)(t);return(0,a.jsx)("div",{className:r()("h-[300px] pb-0","[&_.rbc-row-bg]:w-full","[&_.rbc-calendar]:bg-white","[&_.rbc-toolbar]:mb-4 [&_.rbc-toolbar]:flex-row-reverse","[&_.rbc-month-view]:border-0","[&_.rbc-header]:border-0","[&_.rbc-header>span]:text-xs [&_.rbc-header>span]:font-semibold","[&_.rbc-month-row]:border-0","[&_.rbc-row-bg>div]:mx-1 [&_.rbc-row-bg>div]:h-10 [&_.rbc-row-bg>div]:border-0","[&_.rbc-off-range-bg]:bg-transparent","[&_.rbc-event]:mx-auto [&_.rbc-event]:h-2.5 [&_.rbc-event]:w-[3px] [&_.rbc-event]:rounded-full","[&_.rbc-date-cell]:hidden","[&_.rbc-row.rbc-month-header]:mb-2"),children:(0,a.jsx)(l.f,{events:e.dateYMDPairs.map(t=>{let[s]=t;return{title:"",start:(0,u.G_)(o().tz(s,e.timeZone)),end:(0,u.G_)(o().tz(s,e.timeZone).add(1,"day"))}}),localizer:c,defaultView:l.kO.MONTH,startAccessor:"start",endAccessor:"end",onNavigate:t=>e.onSelectedYMDChange(o()(t).format("YYYY-MM-DD")),views:[l.kO.MONTH],getNow:()=>s,components:{toolbar:e=>(0,a.jsx)(x,{currentDate:s,toolbarProps:e}),eventWrapper:()=>null,dateCellWrapper:t=>(0,a.jsx)(f,{date:t.value,selectedYMD:e.selectedYMD,dateYMDPairs:e.dateYMDPairs,onSelectedYMDChange:e.onSelectedYMDChange})},date:(0,u.G_)(o().tz(e.selectedYMD,e.timeZone))})})}g.Container=e=>(0,a.jsx)("div",{className:r()("flex flex-col gap-2 overflow-y-auto",e.className),children:e.children});let f=e=>{var t;let s=o()(e.date),n=s.format("YYYY-MM-DD"),l=null===(t=e.dateYMDPairs.find(e=>{let[t]=e;return t===n}))||void 0===t?void 0:t[1],i=e.selectedYMD===n,d="filled"===l||"filled-dotted"===l,u=s.isSame(o()(e.selectedYMD),"month"),c=s.format("D");return(0,a.jsx)("div",{className:"group z-10 flex flex-1 cursor-pointer items-center justify-center",onClick:()=>e.onSelectedYMDChange(n),children:(0,a.jsxs)("span",{className:r()("relative flex size-[30px] items-center justify-center rounded bg-white p-1 text-center text-xs font-normal transition-colors",!u&&"text-[#aaa]/40",!l&&"group-hover:bg-black/5",(i||d)&&"font-bold"),style:i?m:d?p:void 0,children:[c,("dotted"===l||"filled-dotted"===l)&&(0,a.jsx)("span",{className:"absolute inset-x-0 bottom-[0.20rem] mx-auto
3size-1 rounded-full bg-white",style:{backgroundColor:i?"white":h},"aria-hidden":"true"})]})})},x=e=>(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,a.jsx)("span",{className:"mb-0 ml-2 font-bold text-sm",children:o()(e.toolbarProps.date).format("MMMM YYYY")}),(0,a.jsxs)("div",{className:"flex h-6 items-center gap-1",children:[(0,a.jsx)("button",{type:"button",className:"btn btn-default btn-xs flex size-6 items-center justify-center p-0",onClick:()=>{e.toolbarProps.onNavigate("PREV")},"aria-label":"Previous month",title:"Previous month",children:(0,a.jsx)("i",{className:"fa fa-angle-left text-lg","aria-hidden":"true"})}),(0,a.jsx)("button",{type:"button",className:"btn btn-default btn-xs flex h-full items-center justify-center px-2 py-0 text-sm font-normal leading-none",onClick:()=>{let t=e.currentDate;e.toolbarProps.date.setMonth(t.getMonth()),e.toolbarProps.date.setFullYear(t.getFullYear()),e.toolbarProps.date.setDate(t.getDate()),e.toolbarProps.onNavigate("DATE")},"aria-label":"Go to today",title:"Today",children:"Today"}),(0,a.jsx)("button",{type:"button",className:"btn btn-default btn-xs flex size-6 items-center justify-center p-0",onClick:()=>{e.toolbarProps.onNavigate("NEXT")},"aria-label":"Next month",title:"Next month",children:(0,a.jsx)("i",{className:"fa fa-angle-right text-lg","aria-hidden":"true"})})]})]});g.Border=function(e){return(0,a.jsx)("div",{className:"p-2 bg-white rounded border border-solid border-[#ddd] flex-shrink-0",children:e.children})},g.Legend=function(e){return(0,a.jsx)("div",{className:"flex gap-2 text-xs",children:e.options.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-1.5",role:"listitem",children:[(0,a.jsx)("span",{className:"relative inline-block size-4 shrink-0 rounded",style:"filled"===e.variant||"filled-dotted"===e.variant?p:void 0,"aria-hidden":"true",children:("dotted"===e.variant||"filled-dotted"===e.variant)&&(0,a.jsx)("span",{className:"absolute inset-0 m-auto size-1 rounded-full",style:{backgroundColor:h}})}),(0,a.jsx)("span",{children:e.label})]},"".concat(e.variant,"-").concat(e.label)))})}},67742:function(e,t,s){"use strict";s.d(t,{Z:function(){return h}});var a=s(85893);s(67294);var n=s(41484),o=s(93967),l=s.n(o),i=s(56989),r=s(17656),d=s.n(r),u=s(30381),c=s.n(u);function h(e){let t=(0,i.getPriceRangesCleaned)({priceRanges:e.priceRanges,joinTeamEnd:e.joinTeamEnd,price:e.price,salesStart:e.salesStart});return(0,a.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4,fontSize:"1rem"},children:[(0,a.jsx)("span",{style:{textAlign:"start",fontSize:"0.9rem"},children:"Price Ranges"}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:d().tableStructureContainer,style:{borderBottom:"1px solid #ddd",fontSize:"0.8rem",textAlign:"start"},children:[(0,a.jsx)("div",{children:"Start"}),(0,a.jsx)("div",{children:"End"}),(0,a.jsx)("div",{children:"Price / player"})]}),t.map((s,n)=>{var o;return(0,a.jsx)(m,{priceRange:s,currency:e.currency,isLast:n===t.length-1,timeZone:null!==(o=e.timeZone)&&void 0!==o?o:"America/Toronto",priceRangeEnd:s.end},"price-range-".concat(n,"-").concat(s.priceInCents))})]})]})}function m(e){let{priceRange:t,priceRangeEnd:s,currency:o,isLast:r,timeZone:u}=e,{t:h}=(0,n.$G)(["helpers"]),m=t.priceInCents>0?(0,i.prettifyPriceShort)(h,t.priceInCents/100,o):"Free",p=c()(),g=c()(t.start).isSameOrBefore(p)&&c()(s).isSameOrAfter(p);return(0,a.jsx)("div",{style:{borderBottom:r?"none":"1px solid #ddd",fontSize:"0.8rem",textAlign:"start"},children:(0,a.jsxs)("div",{className:l()(d().tableStructureContainer,g&&d().isWithinDateRange),children:[(0,a.jsx)("span",{children:(0,i.prettifyDateTimeTZ)(t.start,u,"llll")}),(0,a.jsx)("span",{children:(0,i.prettifyDateTimeTZ)(s,u,"llll")}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{style:{fontWeight:"bold"},children:m})," ","/ "+h("helpers:player")]})]})})}},51329:function(e,t,s){"use strict";s.d(t,{s:function(){return x}});var a=s(85893),n=s(67294),o=s(41484),l=s(2664),i=s(48452),r=s(88835),d=s(9124),u=s(96825);let{LeagueSeason:{fetchLeagueSeasonAdmin:c,fetchCurrentUserAdminRoles:h},GroupDetail:{fetchOneGroup:m}}=r.ActionCreators,{LeagueSeason:{getLeagueSeason:p}}=r.Selectors;var g=(0,l.$j)((e,t)=>{var s;
3let a=p(e,t.data.leagueSeasonID),n=null==a?void 0:a.adminDetails.groupID,o=e.groupDetail.list.find(e=>e.details.id===n);return{user:e.auth.user,leagueSeasonData:a,leagueSeasonTitle:null==a?void 0:null===(s=a.adminDetails)||void 0===s?void 0:s.title,groupID:n,groupDetails:null==o?void 0:o.details}},{fetchLeagueSeasonAdmin:c})((0,o.Zh)(["helpers","league","group"])(function(e){var t,s,o,l,r,p,g,f,x,_,v;let b=(0,i.u5)(),{t:C,leagueSeasonData:j,groupID:y,groupDetails:S}=e,{leagueSeasonID:N}=e.data,D=null!==(p=null==j?void 0:null===(t=j.currentUserAdminRoles)||void 0===t?void 0:t.list)&&void 0!==p?p:[],w=null!==(g=null==S?void 0:null===(o=S.metadata)||void 0===o?void 0:null===(s=o.features)||void 0===s?void 0:s.includes("checklists"))&&void 0!==g&&g;if((0,n.useEffect)(()=>{(async()=>{b(h(N));let e=await b(c(N));(null==e?void 0:e.groupID)&&b(m({id:e.groupID}))})()},[N,b]),!j||j.adminDetails.loading&&!j.adminDetails.receivedAt||!(null==S?void 0:S.receivedAt))return(0,a.jsx)(a.Fragment,{});if((null==j?void 0:null===(l=j.adminDetails)||void 0===l?void 0:l.error)||(null==j?void 0:j.currentUserAdminRoles.error)||(null==S?void 0:S.error))return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{children:C("helpers:error")}),(0,a.jsx)("div",{children:(null==j?void 0:null===(x=j.adminDetails)||void 0===x?void 0:null===(f=x.error)||void 0===f?void 0:f.message)||(null==j?void 0:null===(_=j.currentUserAdminRoles.error)||void 0===_?void 0:_.message)||(null===(v=S.error)||void 0===v?void 0:v.message)})]});let T=(0,u.X3)(D,["group_admin","league_manager"]),R="/leagues/".concat(e.data.leagueSeasonID,"/admin/"),I="/leagues/".concat(e.data.leagueSeasonID,"/info/"),L=[{title:C("helpers:home"),selectedKey:"Home",url:R+"home",icon:(0,a.jsx)("i",{className:"fa fa-home"})}];return(0,u.X3)(D,["group_admin"])&&L.push({title:C("helpers:reports"),selectedKey:"Reports",url:R+"reports/overview",icon:(0,a.jsx)("i",{className:"fa fa-bar-chart"})}),w&&L.push({title:C("group:checklist"),selectedKey:"Checklist",url:R+"checklist",icon:(0,a.jsx)("i",{className:"fa fa-check-circle-o"})}),L.push({title:C("helpers:announcements"),selectedKey:"Announcements",url:R+"announcements",icon:(0,a.jsx)("i",{className:"fa fa-bullhorn"})},{title:C("helpers:notifications"),selectedKey:"Notifications",url:R+"notifications",icon:(0,a.jsx)("i",{className:"fa fa-bell"})},{title:C("league:matches"),selectedKey:"Matches",url:R+"matches",icon:(0,a.jsx)("i",{className:"fa fa-flag"})}),T&&L.push({title:C("helpers:calendar"),selectedKey:"Calendar",url:R+"calendar",icon:(0,a.jsx)("i",{className:"fa fa-calendar-o"})}),L.push({title:C("league:standings"),selectedKey:"Standings",url:R+"standings",icon:(0,a.jsx)("i",{className:"fa fa-trophy"})}),T&&L.push({title:C("league:teams"),selectedKey:"Teams",url:R+"teams/active",icon:(0,a.jsx)("i",{className:"fa fa-users"})},{title:C("helpers:players"),selectedKey:"Players",url:R+"players/active",icon:(0,a.jsx)("i",{className:"fa fa-user"})},{title:C("helpers:edit"),selectedKey:"Edit",url:R+"edit?groupID=".concat(y),icon:(0,a.jsx)("i",{className:"fa fa-cog"})}),L.push({title:C("league:viewRegistration"),selectedKey:"View Registration",url:I,icon:(0,a.jsx)("i",{className:"fa fa-external-link"})}),(0,a.jsx)(d.YE,{...e,tabs:L,title:e.leagueSeasonTitle,backLinkText:C("league:switchLeague"),backlinkHref:{pathname:"/".concat(null===(r=e.leagueSeasonData)||void 0===r?void 0:r.adminDetails.groupAliasID,"/admin/leagues/ongoing")}})})),f=s(11163);function x(e){return function(t){let s=s=>{let n={leagueSeasonID:(0,f.useRouter)().query.leagueSeasonID};return(0,a.jsx)(g,{data:n,selectedTab:e,children:(0,a.jsx)(t,{...s})})};return s.getInitialProps=async e=>{let s;return t.getInitialProps&&(s=await t.getInitialProps(e)),{...s,leagueSeasonID:e.query.leagueSeasonID,showCustomNavbar:!0}},s}}},71892:function(e){e.exports={container:"AppDownload_container__X4lGJ",cardContainer:"AppDownload_cardContainer__CORW_",desktopLink:"AppDownload_desktopLink__98KPN",mobileLink:"AppDownload_mobileLink__woUft",qrContainer:"AppDownload_qrContainer__fwK_s",qrScanIndicator:"AppDownload_qrScanIndicator__3zG4V",qrScanLabel:"Ap
3pDownload_qrScanLabel__TsgTB",headerContainer:"AppDownload_headerContainer__ElGWY",brandContainer:"AppDownload_brandContainer__UEdi5",brandLogo:"AppDownload_brandLogo__nRi_Y",groupName:"AppDownload_groupName__MCUoa",description:"AppDownload_description__fqPHh",groupXOSContainer:"AppDownload_groupXOSContainer__s5YPf",x:"AppDownload_x__frMem"}},11298:function(e){e.exports={description:"DateRange_description__U_RHT",defaultTimeZone:"DateRange_defaultTimeZone__k3VHr",defaultContainer:"DateRange_defaultContainer__qiv5Y",defaultDate:"DateRange_defaultDate__c7VJK",reportFilter:"DateRange_reportFilter__J2Z3B",dateInput:"DateRange_dateInput__Bg_C8",timezoneInput:"DateRange_timezoneInput___TRKq"}},95335:function(e){e.exports={tabContainer:"LeagueCommon_tabContainer__akMz_",reports:"LeagueCommon_reports__YGANg",matchList:"LeagueCommon_matchList__MKM2N",calendar:"LeagueCommon_calendar__9u0Rc",tabs:"LeagueCommon_tabs__yMnur",filterButtons:"LeagueCommon_filterButtons__EHcs1",adjustForFilter:"LeagueCommon_adjustForFilter__heceI",primary:"LeagueCommon_primary__82AlD",filterButtonsWithoutColor:"LeagueCommon_filterButtonsWithoutColor__gy6BZ",greenRoundButton:"LeagueCommon_greenRoundButton__REUhM",xs:"LeagueCommon_xs__nbioE",toolTipContainer:"LeagueCommon_toolTipContainer__5133W",tooltip:"LeagueCommon_tooltip__RC8FW",semanticUIDropdown:"LeagueCommon_semanticUIDropdown__7zQoY",transparent:"LeagueCommon_transparent__pMwiB",isLastElement:"LeagueCommon_isLastElement__MtMuI",link:"LeagueCommon_link__7vEg1",tableContainer:"LeagueCommon_tableContainer__2BkZU",content:"LeagueCommon_content__xmtVH",tableContainerWithSummary:"LeagueCommon_tableContainerWithSummary__VeTDt",tableContainerWithSummaryNew:"LeagueCommon_tableContainerWithSummaryNew__xVdaA",border:"LeagueCommon_border__7ROBq",matchListTableContainer:"LeagueCommon_matchListTableContainer__9_Roi",filtersContainer:"LeagueCommon_filtersContainer__MWCTR",showingModal:"LeagueCommon_showingModal__9GIeM",filtersContent:"LeagueCommon_filtersContent__RM3U6",selected:"LeagueCommon_selected__oAzU7",hide:"LeagueCommon_hide__Pelvr",filtersContentHeader:"LeagueCommon_filtersContentHeader__j_Q9m",clearBtn:"LeagueCommon_clearBtn__krB67",doneBtn:"LeagueCommon_doneBtn__QwUwE",filtersContentRow:"LeagueCommon_filtersContentRow__YNQ_z",rowItem:"LeagueCommon_rowItem__C4UI9",filtersContentCollapsibleContent:"LeagueCommon_filtersContentCollapsibleContent__RCixx",checked:"LeagueCommon_checked__BuJ35",location:"LeagueCommon_location__fmz0t",resources:"LeagueCommon_resources__cingP",leagueContainer:"LeagueCommon_leagueContainer__mG_xZ",leagueSpinner:"LeagueCommon_leagueSpinner__MCJyb",captainTag:"LeagueCommon_captainTag__AS67N",osTitleThemedTag:"LeagueCommon_osTitleThemedTag__VszYF",toast:"LeagueCommon_toast__m3v_I",all:"LeagueCommon_all__g_fMV",show:"LeagueCommon_show__xGaOd",leagueMatchListFiltersSelectedText:"LeagueCommon_leagueMatchListFiltersSelectedText__HCSp_",leaguePopupHeaderView:"LeagueCommon_leaguePopupHeaderView__C7WsU",leaguePopupHeaderBtn:"LeagueCommon_leaguePopupHeaderBtn__L2cfa",leaguePopupCloseBtn:"LeagueCommon_leaguePopupCloseBtn__748T5",leaguePopupViewInfoColumn:"LeagueCommon_leaguePopupViewInfoColumn__qy8AJ",leaguePopupViewInfoColumnText:"LeagueCommon_leaguePopupViewInfoColumnText__WrPzd",placeholder:"LeagueCommon_placeholder__BlTxN",leaguePopupViewInfoRow:"LeagueCommon_leaguePopupViewInfoRow__tYhDC",extendedLeft:"LeagueCommon_extendedLeft__sHWj5",leaguePopupViewInfoRowText:"LeagueCommon_leaguePopupViewInfoRowText__4tfpS",withClick:"LeagueCommon_withClick__H128Y",leaguePopupViewDetails:"LeagueCommon_leaguePopupViewDetails__gDypy",twoBtn:"LeagueCommon_twoBtn__JD7FC",emptyContainer:"LeagueCommon_emptyContainer__NoeNK",tableHeader:"LeagueCommon_tableHeader__vrw0b",tableHeaderColumns:"LeagueCommon_tableHeaderColumns__tyHKU",tableRow:"LeagueCommon_tableRow__xmD78",cell:"LeagueCommon_cell__dEe9D",dataTableDateRangeSelectorContainer:"LeagueCommon_dataTableDateRangeSelectorContainer__jO2Ei",dataTableDateRangeSelectorDate:"LeagueCommon_dataTableDateRangeSelectorDate__S5I1O",dataTableDropdown:"LeagueCommon_dataTableDropdown__Nukdd"}},52737:function(e){e.exports={header:"LeagueHeader_header__Fso1u",hideHeader:"LeagueHeader_hideHeader___h6ZF",optionalContainer:"LeagueHeader_optionalContainer__kb2Eb",headerWithTabs:"LeagueHeader_headerWithTabs__wZRMs",headerButtonContainer:"LeagueHeader_headerButtonContainer__t2vcZ"}},17656:function(e){e.exports={tableStructureContainer:"LeagueTicketPriceRanges_tableStructureContainer__eSKyG",isWithinDateRange:"LeagueTicketPriceRanges_isWithinDateRange__ZbGfS",tableStructureSimpleContainer:"LeagueTicketPriceRanges_tableStructureSimpleContainer__gPa3_"}}},function(e){e.O(0,[22770,96825,42369,6167,71508,41160,92796,41886,12661,9126,25286,56201,92888,49774,40179],function(){return e(e.s=37922)}),_N_E=e.O()}]); 4//# sourceMappingURL=home-bf93168cc7288a34.js.map 5//# debugId=ad60afea-c941-5577-86c5-e2dfe3f6efcb
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.