1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[227],{47075:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/myevent/participants/hosts",function(){return a(37012)}])},5136:function(e,t,a){"use strict";a.d(t,{Z:function(){return UIBulkActions}});var n=a(11527),l=a(62585),r=a(50455),o=a(92900),i=a(68469),s=a.n(i);function UIActionBar(e){let{isOpen:t=!1,children:a}=e;return(0,n.jsx)(o.ZP,{anchor:"bottom",open:t,variant:"persistent",hideBackdrop:!0,elevation:1,classes:{paper:s().actionBar},children:(0,n.jsx)(l.Z,{className:s().actionBarContent,children:a})})}var c=a(74995),d=a(69799),u=a(70628),g=a(82568),h=a(50959),m=a(55419);function UIBulkActions(e){let{title:t,selected:a=[],actions:o,onDeselect:i}=e,[s,_]=(0,h.useState)(a.length);return(0,u.Z)(()=>_(a.length),a.length?0:300,[a]),(0,g.Z)("Escape",i),(0,n.jsx)(UIActionBar,{isOpen:!!a.length,children:(0,n.jsxs)(l.Z,{display:"flex",alignItems:"center",gap:"8px",width:"100%",flexWrap:"wrap",children:[i&&(0,n.jsx)("button",{onClick:i,style:{background:"#E6E6E6",width:24,height:24,border:0,borderRadius:100,padding:0,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,n.jsx)(d.X,{size:16})}),(0,n.jsxs)(r.Z,{fontSize:"14px",mr:"auto",minWidth:"176px",children:[(0,n.jsx)(r.Z,{component:"span",fontSize:"14px",color:"#9F9F9F",children:"Selected:"})," ",(0,n.jsx)(r.Z,{component:"span",fontSize:"14px",fontWeight:"800",children:s})," ",t&&("string"==typeof t?t:1===s?t.singular:t.plural)]}),(0,n.jsx)(l.Z,{gap:"8px",display:"flex",alignItems:"center",children:o.map((e,t)=>{let l,r={theme:"light",variant:"outlined",key:t,disabled:e.disabled},onClick=()=>{};return(e.options?l=t=>e.options.map(e=>({...e,onClick:()=>e.handler(a,t),label:e.label||""})):onClick=()=>e.handler(a),e.icon&&!e.label)?(0,n.jsx)(m.Z,{...r,onClick:()=>onClick(),dropdown:l,children:e.icon}):(0,n.jsx)(c.Z,{...r,onClick:()=>onClick(),dropdown:l,startIcon:e.icon,endIcon:e.endIcon,children:e.label})})})]})})}},43946:function(e,t,a){"use strict";a.d(t,{z:function(){return useCreateOrganiser}});var n=a(88164),l=a(50951),r=a(1775);function useCreateOrganiser(){return(0,n.D)(async e=>{let{competition_id:t,user_id:a,role:n,desired_role:r,experience:o,available_dates:i,competition_form_id:s,judge_group_id:c}=e,d={user_id:a,role:n};r&&(d.desired_role=r),o&&(d.experience=o),i&&(d.available_dates=i),s&&(d.competition_form_id=s),c&&(d.judge_group_id=c);let{data:u}=await l.x1.post("/api/competition/".concat(t,"/organisers"),d);return u},{onSuccess(e,t){r.Eh.invalidateQueries()}})}},13802:function(e,t,a){"use strict";a.d(t,{U:function(){return useDeleteOrganiser}});var n=a(88164),l=a(50951),r=a(1775);function useDeleteOrganiser(){return(0,n.D)(async e=>{let{competition_id:t,user_id:a}=e,{data:n}=await l.x1.delete("/api/competition/".concat(t,"/organisers/").concat(a));return n},{onSuccess(e,t){r.Eh.invalidateQueries(),r.Eh.invalidateQueries({queryKey:["competition-forms-stats"]})}})}},11866:function(e,t,a){"use strict";a.d(t,{m:function(){return useGetAllUsers}});var n=a(23405),l=a(50951),r=a(17252);let useGetAllUsers=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return(0,n.N)(["/users/keyword",e.debouncedFilter,e.exclude_global_organization_id],async t=>{let{pageParam:a,queryKey:n}=t,{current_page:o=1}=a||{},{debouncedFilter:i,...s}=e;s.page=o,s.keyword=i,s.sort="created_at",s.order="desc";let c=r.Z.stringify(s),{data:d}=await l.x1.get("api/users?".concat(c));return d},{getNextPageParam:e=>{if(e.current_page<e.last_page)return{current_page:e.current_page+1}},enabled:t})}},33734:function(e,t,a){"use strict";a.d(t,{B:function(){return l},z:function(){return combineRoleDescriptions}});var n=a(88027);let l={[n.u.admin]:"Same access as the Organizer role, except the Finance Dashboard is not available.",[n.u.scoring_admin]:"The Scoring Admin role has access to the Scoring Panel, where they can review and validate scores for all athletes across all workouts and heats. This role is designed for overseeing the scoring process and ensuring score accuracy, without access to the broader event management features like workout setup, heat structure, or leaderboard review.",[n.u.head_judge]:"The Scoring / Head Judge role has access to Planning, Workouts, Heats, Timetable, Messaging, Leaderboard, and the Judging Panel. This role is designed for managing and overseeing the full scoring and judging process, including workout setup, heat structure, communication, leaderboard review, and score validation.",[n.u.judge]:"For virtual events, Judges can review videos and validate scores for the athletes assigned to them through a dedicated Judges Panel, without access to the leaderboard or current athlete rankings. For on-site events, the Judge role currently has no system functionality, except allowing the Organizer to assign Judges to heats or Live Scoring.",[
1n.u.volunteer]:"The Volunteer role is informational only.\n\nVolunteers are listed within the system for organizational overview purposes but do not have operational permissions or access to system functions.\n\nThis role allows organizers to keep a structured overview of their team without granting system control.",[n.u.organiser]:"Full event management access.",[n.u.host]:"The Host role is primarily responsible for athlete check-ins and entrance management.\n\nHosts can:\n ⢠Perform athlete, spectators, judges and volunteers check-ins at the venue entrance (QR code scanning)\n ⢠Manage Athlete Control check-ins (if enabled)\n ⢠Perform check-ins for each individual heat\n\nThis role is ideal for front-desk staff and personnel managing athlete flow during the competition.",[n.u.manager]:"The Manager role has full operational oversight within the event staff structure.\nManagers have access to the complete list of volunteers and can assign, edit, and manage their roles accordingly.\n\nIn addition, Managers have access to the event timetable and are authorized to start and control the competition clock.\n\nThis role is intended for key operational leaders responsible for event coordination and time management.",[n.u.stage_manager_mc]:"MCs / Stage Managers have access to the Timetable, where they can start the timer and control which Heat is currently active. This role is mainly relevant for events using Live Scoring technology.",[n.u.pending]:"This means the person has applied for a specific role, but has not been accepted yet. No role has been assigned, so they currently have no permissions and cannot perform any actions in the system."};function combineRoleDescriptions(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.map(e=>l[e]).filter(Boolean).join("\n\n")}},37012:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return Hosts}});var n=a(11527),l=a(50959),r=a(16205),o=a.n(r),i=a(55383),s=a(69730),c=a(93293),d=a(43704),u=a.n(d),g=a(76195),h=a(29256),m=a(5482),_=a(27360),p=a(39164),y=a(9710),f=a(89546),v=a(96600),b=a(85335),x=a(35422),S=a(13802),w=a(86036),j=a(65985),k=a(18302),M=a(59342),H=a(88027),R=a(48691),Z=a(74995),B=a(83714),C=a(19977),E=a(5136),A=a(12223),T=a(6896),L=a(65266),F=a(33734);function Hosts(){var e,t,a;let r=(0,b.useSearchParams)(),d=r.get("competitionId"),{data:f}=(0,k.e)({competitionId:d}),B=r.get("q")||"",N=(0,v.useRouter)(),z=(0,M.HP)(e=>e.data),[I,O]=(0,l.useState)(!0),setSearchKeyword=e=>{N.push({pathname:N.pathname,query:new URLSearchParams({q:e,competitionId:d}).toString()})},[P,D]=(0,l.useState)(),X=(0,i.N)(B,300),W=(0,x.I)(d,"host/manager",X,P),V=(0,S.U)(),[J,U]=(0,l.useState)([]),[q,G]=(0,l.useState)(),[Q,K]=(0,l.useState)(!1),[Y,$]=(0,l.useState)(!1);(0,l.useEffect)(()=>{U([])},[null===(e=W.data)||void 0===e?void 0:e.data]);let ee=(0,l.useMemo)(()=>{var e;return null===(e=W.data)||void 0===e?void 0:e.data.find(e=>e.id===q)},[null===(t=W.data)||void 0===t?void 0:t.data,q]),sortTable=e=>{let t=null==P?void 0:P[0],a=null==P?void 0:P[1];if(e===t)return"desc"===a?D(void 0):D([e,"desc"]);D([e,"asc"])},et=[{id:"name",content:"Name",sticky:!0,columnStyles:{minWidth:180},active:(null==P?void 0:P[0])==="name",onClick:()=>sortTable("name")},{id:"role",content:"Role",columnStyles:{minWidth:150}}],renderRole=e=>(0,n.jsx)(C.Z,{onsite:(null==f?void 0:f.onsite)===1,organiser:e,competitionId:d}),ea=(0,l.useMemo)(()=>{var e;return null===(e=W.data)||void 0===e?void 0:e.data.map((e,t)=>{let a=[{column:"name",content:e.user.name,style:{fontWeight:"bold",textTransform:"uppercase",verticalAlign:"middle"}},{column:"role",content:e.role?renderRole(e):"-",style:{textTransform:"capitalize"}}];return{id:e.id,columns:a,checkDisabled:(null==z?void 0:z.id)===e.user_id||e.role===H.u.organiser,onClick:G}})},[null===(a=W.data)||void 0===a?void 0:a.data]),[en,el]=(0,l.useState)(787),er=(0,l.useRef)(null);(0,l.useEffect)(()=>{er.current&&el(window.innerHeight-er.current.getBoundingClientRect().top-78)},[er]);let eo=(0,l.useCallback)(async()=>{try{await Promise.all(J.map(async e=>{await V.mutateAsync({competition_id:f.id,user_id:e})})),$(!1),T.Am.success("Host".concat(J.length>
11?"s":"","/Manager").concat(J.length>1?"s":""," deleted successfully"))}catch(e){$(!1),T.Am.error("Error deleting hosts/managers")}},[J,f,V]),ei=[{handler:()=>$(!0),loading:V.isLoading,icon:(0,n.jsx)(A.r,{size:14,color:"var(--color-error) !important"})}];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j.Z,{title:"Host / Manager",info:(0,F.z)(H.u.host,H.u.manager),actions:(0,n.jsxs)("div",{className:o().header__actions,children:[(0,n.jsx)(R.Z,{value:B,onChange:e=>{setSearchKeyword(e.target.value)},placeholder:"Search Host/Manager",icon:(0,n.jsx)(s._Ve,{}),size:"small",type:"search"}),(0,n.jsx)(Z.Z,{onClick:()=>K(!0),children:"Add"})]}),loading:W.isFetching}),(0,n.jsxs)("div",{children:[(0,n.jsx)("section",{ref:er,children:ea&&(0,n.jsx)(g.Z,{style:{maxHeight:en},idColumn:!0,className:o().table,head:et,body:ea,check:{values:J,onCheck:e=>U(e)}})}),(0,n.jsxs)("button",{className:o().addNew,onClick:()=>K(!0),children:[(0,n.jsx)(u(),{src:c.Z,alt:"Add member icon"}),(0,n.jsx)("span",{children:"Add"})]})]}),(0,n.jsx)(h.n,{title:"Host/Manager Details",isOpen:!!ee,setIsOpen:()=>G(void 0),children:ee&&(0,n.jsx)(m.Z,{member:ee})}),(0,n.jsx)(h.n,{formId:w.e,title:"Add Host/Manager",isOpen:Q,setIsOpen:K,children:Q&&(0,n.jsx)(w.Z,{role:H.u.host,limitTo:[H.u.host,H.u.manager,H.u.stage_manager_mc],onComplete:()=>K(!1)})}),(0,n.jsxs)(_.Z,{isOpen:Y,onClose:$,title:"Delete Host".concat(J.length>1?"s":"","/Manager").concat(J.length>1?"s":""),children:[(0,n.jsxs)(p.x,{fontPack:"bodySmallRegular",color:"var(--color-neutral800)",style:{textAlign:"center"},children:["Are you sure you want to delete ",J.length>1?"these":"this"," ",(0,n.jsxs)("b",{children:["host",J.length>1?"s":"","/manager",J.length>1?"s":""]}),"?"]}),(0,n.jsx)(y.F,{margin:"12px"}),(0,n.jsxs)(y.F,{gap:"8px",children:[(0,n.jsx)(Z.Z,{theme:"light",loading:V.isLoading,onClick:eo,children:"Delete"}),(0,n.jsx)(Z.Z,{onClick:()=>$(!1),variant:"outlined",theme:"light",children:"Cancel"})]})]}),f&&(0,n.jsx)(L.Z,{open:I,competitionId:null==f?void 0:f.id}),(0,n.jsx)(E.Z,{title:{singular:"Host/Manager",plural:"Hosts/Managers"},selected:J,actions:ei,onDeselect:()=>U([])})]})}Hosts.getLayout=e=>(0,n.jsx)(f.Z,{SubLayout:B.Z,restrictedTo:[H.u.admin,H.u.organiser,H.u.host,H.u.manager,H.u.stage_manager_mc],redirectTo:"/myevent/scoring/leaderboard",children:e})},68469:function(e){e.exports={actionBar:"style_actionBar__VSn7S",actionBarContent:"style_actionBarContent__4cJqf"}},71608:function(e){e.exports={modalWrapper:"style_modalWrapper__cbW0S",roleWrapper:"style_roleWrapper__kQ2jb",template:"style_template__T9nDd",actions:"style_actions__dsorr"}},16205:function(e){e.exports={displaySmallRegular:"style_displaySmallRegular___M7gK",displaySmallBold:"style_displaySmallBold__c8eFz",displayXSmallBold:"style_displayXSmallBold__0lJmm",displayXSmallRegular:"style_displayXSmallRegular__7Lel4",displayMediumRegular:"style_displayMediumRegular__y8JE6",bodyLargeRegular:"style_bodyLargeRegular__uu_VW",bodyLargeBold:"style_bodyLargeBold__L_Nx7",bodyMediumRegular:"style_bodyMediumRegular__NRYy3",bodyMediumBold:"style_bodyMediumBold__E2lWz",bodySmallRegular:"style_bodySmallRegular__Jy7ED",bodySmallBold:"style_bodySmallBold__SyxDi",bodyXSmallBold:"style_bodyXSmallBold__yc2mZ",bodyXSmallRegular:"style_bodyXSmallRegular__awakn",actionLargeBold:"style_actionLargeBold__vMCPV",actionLargeMedium:"style_actionLargeMedium__fm4F1",actionMediumMedium:"style_actionMediumMedium__7zyML",actionMediumBold:"style_actionMediumBold__2OFiD",actionMediumRegular:"style_actionMediumRegular__NW7qd",actionSmallRegular:"style_actionSmallRegular__XOVD8",headerH1:"style_headerH1__2HxGw",headerRegular:"style_headerRegular__GJelM",actionXSmallRegular:"style_actionXSmallRegular__bHc_j",actionSmallMedium:"style_actionSmallMedium__HB4v_",headingH1Bold:"style_headingH1Bold__H5d4w",headingH1Regular:"style_headingH1Regular__s4nzC",headingH2Bold:"style_headingH2Bold__KCXRT",headingH3Bold:"style_headingH3Bold__0PahG",headingH3Regular:"style_headingH3Regular__OEG3w",captionRegular:"style_captionRegular__qTVup",header__tabs:"style_header__tabs__pZoSB",header__actions:"style_header__actions__Q9ytr",searchField:"style_searchField__Od7Vw",table:"style_table__AImqw",content__actions:"style_content__actions__xk6h6",addNew:"style_addNew__nlfZB"}},84228:function(e,t,a){"use strict";a.d(t,{X:function(){return i},Y:function(){return o}});var n=a(50959),l=a(18329);let r=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),n.createElement("path",{d:"M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"}))]]),o=n.forwardRef((e,t)=>
1n.createElement(l.Z,{ref:t,...e,weights:r}));o.displayName="ArrowLeftIcon";let i=o}},function(e){e.O(0,[8217,9714,7458,6750,708,6479,5372,338,6446,8447,5482,1085,9591,9774,2888,179],function(){return e(e.s=47075)}),_N_E=e.O()}]);
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.